Overhaul system for dividing classes with lots of variants up into smaller "pages" - no longer uses generic enums with names like A,B,C,D - now uses meaningful names, new system also allows for filtering the enums to allow removal of (for example) giant_flower_planks

This commit is contained in:
Cheeserolls 2015-04-06 17:16:23 +01:00
parent 1597322d1c
commit 918dbdd5ff
59 changed files with 1212 additions and 479 deletions

View file

@ -39,8 +39,8 @@ public class BOPBlocks
public static Block sapling_2; public static Block sapling_2;
// TODO fruit tree leaves and saplings // TODO fruit tree leaves and saplings
public static Block planks_0; public static Block planks_0;
public static Block half_wood_slab_0; public static Block wood_slab_0;
public static Block half_wood_slab_1; public static Block wood_slab_1;
public static Block double_wood_slab_0; public static Block double_wood_slab_0;
public static Block double_wood_slab_1; public static Block double_wood_slab_1;
public static Block sacred_oak_stairs; public static Block sacred_oak_stairs;

View file

@ -28,67 +28,4 @@ public class BOPTreeEnums
} }
} }
public static enum TwoTrees implements IStringSerializable {
A, B;
public AllTrees map(int page)
{
return AllTrees.values()[page * 2 + this.ordinal()];
}
public static TwoTrees mapFrom(AllTrees e)
{
return TwoTrees.values()[ e.ordinal() % 2 ];
}
@Override
public String getName() {
return this.name().toLowerCase();
}
@Override
public String toString()
{
return this.getName();
}
}
public static enum FourTrees implements IStringSerializable {
A, B, C, D;
public AllTrees map(int page)
{
return AllTrees.values()[page * 4 + this.ordinal()];
}
public static FourTrees mapFrom(AllTrees e)
{
return FourTrees.values()[ e.ordinal() % 4 ];
}
@Override
public String getName() {
return this.name().toLowerCase();
}
@Override
public String toString()
{
return this.getName();
}
}
public static enum EightTrees implements IStringSerializable {
A, B, C, D, E, F, G, H;
public AllTrees map(int page)
{
return AllTrees.values()[page * 8 + this.ordinal()];
}
public static EightTrees mapFrom(AllTrees e)
{
return EightTrees.values()[ e.ordinal() % 8 ];
}
@Override
public String getName() {
return this.name().toLowerCase();
}
@Override
public String toString()
{
return this.getName();
}
}
} }

View file

@ -27,88 +27,4 @@ public class BOPWoodEnums
} }
} }
public static enum TwoWoods implements IStringSerializable {
A, B;
public AllWoods map(int page)
{
return AllWoods.values()[page * 2 + this.ordinal()];
}
public static TwoWoods mapFrom(AllWoods e)
{
return TwoWoods.values()[ e.ordinal() % 2 ];
}
@Override
public String getName() {
return this.name().toLowerCase();
}
@Override
public String toString()
{
return this.getName();
}
}
public static enum FourWoods implements IStringSerializable {
A, B, C, D;
public AllWoods map(int page)
{
return AllWoods.values()[page * 4 + this.ordinal()];
}
public static FourWoods mapFrom(AllWoods e)
{
return FourWoods.values()[ e.ordinal() % 4 ];
}
@Override
public String getName() {
return this.name().toLowerCase();
}
@Override
public String toString()
{
return this.getName();
}
}
public static enum EightWoods implements IStringSerializable {
A, B, C, D, E, F, G, H;
public AllWoods map(int page)
{
return AllWoods.values()[page * 8 + this.ordinal()];
}
public static EightWoods mapFrom(AllWoods e)
{
return EightWoods.values()[ e.ordinal() % 8 ];
}
@Override
public String getName() {
return this.name().toLowerCase();
}
@Override
public String toString()
{
return this.getName();
}
}
public static enum SixteenWoods implements IStringSerializable {
A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P;
public AllWoods map(int page)
{
return AllWoods.values()[page * 16 + this.ordinal()];
}
public static SixteenWoods mapFrom(AllWoods e)
{
return SixteenWoods.values()[ e.ordinal() % 16 ];
}
@Override
public String getName() {
return this.name().toLowerCase();
}
@Override
public String toString()
{
return this.getName();
}
}
} }

View file

@ -1,12 +1,12 @@
package biomesoplenty.common.block; package biomesoplenty.common.block;
import biomesoplenty.api.block.BOPWoodEnums.EightWoods; import biomesoplenty.api.block.BOPWoodEnums.AllWoods;
import biomesoplenty.api.block.IBOPBlock; import biomesoplenty.api.block.IBOPBlock;
import net.minecraft.block.properties.IProperty; import net.minecraft.block.properties.IProperty;
import net.minecraft.block.state.IBlockState; import net.minecraft.block.state.IBlockState;
public class BlockBOPDoubleWoodSlab extends BlockBOPHalfWoodSlab implements IBOPBlock public abstract class BlockBOPDoubleWoodSlab extends BlockBOPHalfWoodSlab implements IBOPBlock
{ {
// HALF isn't used in double slab because both halves are present // HALF isn't used in double slab because both halves are present
@ -15,23 +15,23 @@ public class BlockBOPDoubleWoodSlab extends BlockBOPHalfWoodSlab implements IBOP
@Override @Override
public String getStateName(IBlockState state) public String getStateName(IBlockState state)
{ {
return "double_" + ((EightWoods) state.getValue(VARIANT)).map(this.pageNum).toString() + "_wood_slab"; return "double_" + super.getStateName(state);
} }
public BlockBOPDoubleWoodSlab(int pageNum) public BlockBOPDoubleWoodSlab()
{ {
super(pageNum); super();
} }
@Override @Override
public IBlockState getStateFromMeta(int meta) public IBlockState getStateFromMeta(int meta)
{ {
return this.getDefaultState().withProperty(VARIANT, EightWoods.values()[meta & 7]); return this.getDefaultState().withProperty(getMyVariantProperty(), variantFromMeta(meta & 7));
} }
@Override @Override
public int getMetaFromState(IBlockState state) public int getMetaFromState(IBlockState state)
{ {
return ((EightWoods) state.getValue(VARIANT)).ordinal(); return metaFromVariant((AllWoods) state.getValue(getMyVariantProperty()));
} }
@Override @Override

View file

@ -0,0 +1,25 @@
/*******************************************************************************
* Copyright 2014, the Biomes O' Plenty Team
*
* This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
*
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
******************************************************************************/
package biomesoplenty.common.block;
import net.minecraft.block.properties.PropertyEnum;
public class BlockBOPDoubleWoodSlab0 extends BlockBOPDoubleWoodSlab {
public static final int PAGENUM = 0;
// create a static reference to this block's variant property
// this is for convenience, and for consistency with other Block classes
public static final PropertyEnum VARIANT = BlockBOPDoubleWoodSlab0.getVariantProperty(PAGENUM);
@Override
public int getPageNum() {return PAGENUM;}
}

View file

@ -0,0 +1,25 @@
/*******************************************************************************
* Copyright 2014, the Biomes O' Plenty Team
*
* This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
*
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
******************************************************************************/
package biomesoplenty.common.block;
import net.minecraft.block.properties.PropertyEnum;
public class BlockBOPDoubleWoodSlab1 extends BlockBOPDoubleWoodSlab {
public static final int PAGENUM = 1;
// create a static reference to this block's variant property
// this is for convenience, and for consistency with other Block classes
public static final PropertyEnum VARIANT = BlockBOPDoubleWoodSlab0.getVariantProperty(PAGENUM);
@Override
public int getPageNum() {return PAGENUM;}
}

View file

@ -2,9 +2,10 @@ package biomesoplenty.common.block;
import java.util.List; import java.util.List;
import com.google.common.base.Predicate;
import com.google.common.collect.ImmutableSet; import com.google.common.collect.ImmutableSet;
import biomesoplenty.api.block.BOPWoodEnums.EightWoods; import biomesoplenty.api.block.BOPWoodEnums.AllWoods;
import biomesoplenty.api.block.IBOPBlock; import biomesoplenty.api.block.IBOPBlock;
import biomesoplenty.common.util.block.BlockStateUtils; import biomesoplenty.common.util.block.BlockStateUtils;
import net.minecraft.block.BlockSlab; import net.minecraft.block.BlockSlab;
@ -21,15 +22,71 @@ import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.fml.relauncher.SideOnly;
public class BlockBOPHalfWoodSlab extends BlockSlab implements IBOPBlock public abstract class BlockBOPHalfWoodSlab extends BlockSlab implements IBOPBlock
{ {
// add properties (note we inherit HALF property from parent BlockSlab)
// HALF requires 1 meta bit, so we have 3 left for the VARIANT, which means we can have eight woods per instance // store the variant properties for each page in this array
public static final PropertyEnum VARIANT = PropertyEnum.create("variant", EightWoods.class ); private static PropertyEnum[] variantProperties;
protected int pageNum; // number of variants per page - HALF requires 1 meta bit, so we have 3 left for the VARIANT, which means we can have eight woods per instance
public static final int variantsPerPage = 8;
// fetch a particular page's variant property
// the first time this is called, it also sets up the array of variant properties
protected static PropertyEnum getVariantProperty(int pageNum)
{
int len = AllWoods.values().length;
int numPages = (int) Math.ceil( (double)len / variantsPerPage);
if (variantProperties == null)
{
variantProperties = new PropertyEnum[numPages];
}
pageNum = Math.max(0, Math.min(pageNum, numPages - 1));
if (variantProperties[pageNum] == null)
{
variantProperties[pageNum] = PropertyEnum.create("variant", AllWoods.class, getVariantEnumFilter(pageNum));
}
return variantProperties[pageNum];
}
// define the filter function used to reduce the set of enum values to the subset for the given page
protected static Predicate<AllWoods> getVariantEnumFilter(final int pageNum)
{
return new Predicate<AllWoods>()
{
@Override @Override
protected BlockState createBlockState() {return new BlockState(this, new IProperty[] {HALF, VARIANT});} public boolean apply(AllWoods wood)
{
switch (wood)
{
case GIANT_FLOWER: case DEAD:
return false;
default:
return (wood.ordinal() >= (variantsPerPage * pageNum)) && (wood.ordinal() < (variantsPerPage * (pageNum+1)));
}
}
};
}
// child classes must implement to define their page number
abstract public int getPageNum();
// fetch the current instance's variant property
public PropertyEnum getMyVariantProperty()
{
return getVariantProperty(this.getPageNum());
}
public int metaFromVariant(AllWoods wood)
{
return wood.ordinal() % variantsPerPage;
}
public AllWoods variantFromMeta(int meta)
{
int i = Math.max(0, Math.min(meta + (this.getPageNum() * variantsPerPage), AllWoods.values().length)); // clamp to
return AllWoods.values()[i];
}
// add properties (note we inherit HALF property from parent BlockSlab)
@Override
protected BlockState createBlockState() {return new BlockState(this, new IProperty[] {HALF, getMyVariantProperty()});}
// implement IBOPBlock // implement IBOPBlock
@Override @Override
@ -37,59 +94,59 @@ public class BlockBOPHalfWoodSlab extends BlockSlab implements IBOPBlock
@Override @Override
public int getItemRenderColor(IBlockState state, int tintIndex) { return this.getRenderColor(state); } public int getItemRenderColor(IBlockState state, int tintIndex) { return this.getRenderColor(state); }
@Override @Override
public IProperty[] getPresetProperties() { return new IProperty[] {VARIANT}; } public IProperty[] getPresetProperties() { return new IProperty[] {getMyVariantProperty()}; }
@Override @Override
public IProperty[] getNonRenderingProperties() { return null; } public IProperty[] getNonRenderingProperties() { return null; }
@Override @Override
public String getStateName(IBlockState state) public String getStateName(IBlockState state)
{ {
return ((EightWoods) state.getValue(VARIANT)).map(this.pageNum).toString() + "_wood_slab"; return ((AllWoods) state.getValue(getMyVariantProperty())).getName() + "_wood_slab";
} }
public BlockBOPHalfWoodSlab(int pageNum) public BlockBOPHalfWoodSlab()
{ {
super(Material.wood); super(Material.wood);
this.pageNum = pageNum;
this.useNeighborBrightness = true; this.useNeighborBrightness = true;
this.setHardness(2.0F).setResistance(5.0F).setStepSound(soundTypeWood); this.setHardness(2.0F).setResistance(5.0F).setStepSound(soundTypeWood);
this.setHarvestLevel("axe", 0); this.setHarvestLevel("axe", 0);
this.setDefaultState(this.blockState.getBaseState().withProperty(HALF, BlockSlab.EnumBlockHalf.BOTTOM).withProperty(VARIANT, EightWoods.A)); this.setDefaultState(this.blockState.getBaseState().withProperty(HALF, BlockSlab.EnumBlockHalf.BOTTOM));
} }
// these 3 functions are required by BlockSlab for setting up the corresponding ItemSlab
@Override @Override
public String getUnlocalizedName(int meta) public String getUnlocalizedName(int meta)
{ {
return this.getStateName(this.getStateFromMeta(meta)); return this.getStateName(this.getStateFromMeta(meta));
} }
@Override @Override
public IProperty getVariantProperty() public IProperty getVariantProperty()
{ {
return VARIANT; return getMyVariantProperty();
} }
@Override @Override
public Object getVariant(ItemStack stack) public Object getVariant(ItemStack stack)
{ {
return EightWoods.values()[stack.getMetadata() & 7]; return variantFromMeta(stack.getMetadata() & 7);
} }
@Override @Override
public IBlockState getStateFromMeta(int meta) public IBlockState getStateFromMeta(int meta)
{ {
return this.getDefaultState().withProperty(VARIANT, EightWoods.values()[meta & 7]).withProperty(HALF, (meta & 8) == 0 ? BlockSlab.EnumBlockHalf.BOTTOM : BlockSlab.EnumBlockHalf.TOP); return this.getDefaultState().withProperty(getMyVariantProperty(), variantFromMeta(meta & 7)).withProperty(HALF, (meta & 8) == 0 ? BlockSlab.EnumBlockHalf.BOTTOM : BlockSlab.EnumBlockHalf.TOP);
} }
@Override @Override
public int getMetaFromState(IBlockState state) public int getMetaFromState(IBlockState state)
{ {
return (state.getValue(HALF) == BlockSlab.EnumBlockHalf.TOP ? 8 : 0) + ((EightWoods) state.getValue(VARIANT)).ordinal(); return (state.getValue(HALF) == BlockSlab.EnumBlockHalf.TOP ? 8 : 0) + metaFromVariant((AllWoods) state.getValue(getMyVariantProperty()));
} }
@Override @Override
public int damageDropped(IBlockState state) public int damageDropped(IBlockState state)
{ {
return this.getMetaFromState(this.getDefaultState().withProperty(VARIANT, (EightWoods) state.getValue(VARIANT))); // always drop a bottom slab
return this.getMetaFromState(state.withProperty(HALF, BlockSlab.EnumBlockHalf.BOTTOM));
} }
@Override @Override

View file

@ -0,0 +1,25 @@
/*******************************************************************************
* Copyright 2014, the Biomes O' Plenty Team
*
* This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
*
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
******************************************************************************/
package biomesoplenty.common.block;
import net.minecraft.block.properties.PropertyEnum;
public class BlockBOPHalfWoodSlab0 extends BlockBOPHalfWoodSlab {
public static final int PAGENUM = 0;
// create a static reference to this block's variant property
// this is for convenience, and for consistency with other Block classes
public static final PropertyEnum VARIANT = BlockBOPHalfWoodSlab.getVariantProperty(PAGENUM);
@Override
public int getPageNum() {return PAGENUM;}
}

View file

@ -0,0 +1,25 @@
/*******************************************************************************
* Copyright 2014, the Biomes O' Plenty Team
*
* This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
*
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
******************************************************************************/
package biomesoplenty.common.block;
import net.minecraft.block.properties.PropertyEnum;
public class BlockBOPHalfWoodSlab1 extends BlockBOPHalfWoodSlab {
public static final int PAGENUM = 1;
// create a static reference to this block's variant property
// this is for convenience, and for consistency with other Block classes
public static final PropertyEnum VARIANT = BlockBOPHalfWoodSlab.getVariantProperty(PAGENUM);
@Override
public int getPageNum() {return PAGENUM;}
}

View file

@ -11,9 +11,10 @@ package biomesoplenty.common.block;
import java.util.List; import java.util.List;
import java.util.Random; import java.util.Random;
import com.google.common.base.Predicate;
import biomesoplenty.api.block.BOPBlocks; import biomesoplenty.api.block.BOPBlocks;
import biomesoplenty.api.block.IBOPBlock; import biomesoplenty.api.block.IBOPBlock;
import biomesoplenty.api.block.BOPTreeEnums.FourTrees;
import biomesoplenty.api.block.BOPTreeEnums.AllTrees; import biomesoplenty.api.block.BOPTreeEnums.AllTrees;
import biomesoplenty.common.item.ItemBOPBlock; import biomesoplenty.common.item.ItemBOPBlock;
import net.minecraft.block.BlockLeaves; import net.minecraft.block.BlockLeaves;
@ -37,15 +38,67 @@ import net.minecraftforge.fml.relauncher.SideOnly;
// TODO: sort out proper base color when using fast graphics // TODO: sort out proper base color when using fast graphics
// TODO: flowers look tinted when using fast graphics // TODO: flowers look tinted when using fast graphics
public class BlockBOPLeaves extends BlockLeaves implements IBOPBlock public abstract class BlockBOPLeaves extends BlockLeaves implements IBOPBlock
{ {
// add properties - note CHECK_DECAY and DECAYABLE are both inherited from BlockLeaves
// both are boolean, requiring one bit each, so we have 2 bits left for the VARIANT which means we can have four per instance // store the variant properties for each page in this array
public static final PropertyEnum VARIANT = PropertyEnum.create("variant", FourTrees.class ); private static PropertyEnum[] variantProperties;
protected int pageNum; // CHECK_DECAY and DECAYABLE require one bit each, so we have 2 bits left for the VARIANT which means we can have four per instance
public static final int variantsPerPage = 4;
// fetch a particular page's variant property
// the first time this is called, it also sets up the array of variant properties
protected static PropertyEnum getVariantProperty(int pageNum)
{
int len = AllTrees.values().length;
int numPages = (int) Math.ceil( (double)len / variantsPerPage);
if (variantProperties == null)
{
variantProperties = new PropertyEnum[numPages];
}
pageNum = Math.max(0, Math.min(pageNum, numPages - 1));
if (variantProperties[pageNum] == null)
{
variantProperties[pageNum] = PropertyEnum.create("variant", AllTrees.class, getVariantEnumFilter(pageNum));
}
return variantProperties[pageNum];
}
// define the filter function used to reduce the set of enum values to the subset for the given page
protected static Predicate<AllTrees> getVariantEnumFilter(final int pageNum)
{
return new Predicate<AllTrees>()
{
@Override @Override
protected BlockState createBlockState() {return new BlockState(this, new IProperty[] { CHECK_DECAY, DECAYABLE, VARIANT });} public boolean apply(AllTrees tree)
{
return (tree.ordinal() >= (variantsPerPage * pageNum)) && (tree.ordinal() < (variantsPerPage * (pageNum+1)));
}
};
}
// child classes must implement to define their page number
abstract public int getPageNum();
// fetch the current instance's variant property
public PropertyEnum getMyVariantProperty()
{
return getVariantProperty(this.getPageNum());
}
public int metaFromVariant(AllTrees tree)
{
return tree.ordinal() % variantsPerPage;
}
public AllTrees variantFromMeta(int meta)
{
int i = Math.max(0, Math.min(meta + (this.getPageNum() * variantsPerPage), AllTrees.values().length)); // clamp to
return AllTrees.values()[i];
}
// add properties - note CHECK_DECAY and DECAYABLE are both inherited from BlockLeaves
@Override
protected BlockState createBlockState() {return new BlockState(this, new IProperty[] { CHECK_DECAY, DECAYABLE, getMyVariantProperty() });}
// implement IBOPBlock // implement IBOPBlock
@ -54,28 +107,26 @@ public class BlockBOPLeaves extends BlockLeaves implements IBOPBlock
@Override @Override
public int getItemRenderColor(IBlockState state, int tintIndex) { return this.getRenderColor(state); } public int getItemRenderColor(IBlockState state, int tintIndex) { return this.getRenderColor(state); }
@Override @Override
public IProperty[] getPresetProperties() { return new IProperty[] {VARIANT}; } public IProperty[] getPresetProperties() { return new IProperty[] {getMyVariantProperty()}; }
@Override @Override
public IProperty[] getNonRenderingProperties() { return new IProperty[] {CHECK_DECAY, DECAYABLE}; } public IProperty[] getNonRenderingProperties() { return new IProperty[] {CHECK_DECAY, DECAYABLE}; }
@Override @Override
public String getStateName(IBlockState state) public String getStateName(IBlockState state)
{ {
AllTrees treeType = ((FourTrees) state.getValue(VARIANT)).map(this.pageNum); AllTrees tree = ((AllTrees) state.getValue(getMyVariantProperty()));
switch (treeType) switch (tree)
{ {
case RED_BIG_FLOWER: case YELLOW_BIG_FLOWER: case RED_BIG_FLOWER: case YELLOW_BIG_FLOWER:
return treeType.getName() + "_petal"; return tree.getName() + "_petal";
default: default:
return treeType.getName() + "_leaves"; return tree.getName() + "_leaves";
} }
} }
public BlockBOPLeaves(int pageNum) public BlockBOPLeaves()
{ {
super(); super();
this.setDefaultState(this.blockState.getBaseState().withProperty(CHECK_DECAY, Boolean.valueOf(true)).withProperty(DECAYABLE, Boolean.valueOf(true)));
this.pageNum = pageNum;
this.setDefaultState(this.blockState.getBaseState().withProperty(VARIANT, FourTrees.A).withProperty(CHECK_DECAY, Boolean.valueOf(true)).withProperty(DECAYABLE, Boolean.valueOf(true)));
} }
@ -86,12 +137,12 @@ public class BlockBOPLeaves extends BlockLeaves implements IBOPBlock
@Override @Override
public IBlockState getStateFromMeta(int meta) public IBlockState getStateFromMeta(int meta)
{ {
return this.getDefaultState().withProperty(VARIANT, FourTrees.values()[meta & 3]).withProperty(DECAYABLE, Boolean.valueOf((meta & 4) == 0)).withProperty(CHECK_DECAY, Boolean.valueOf((meta & 8) > 0)); return this.getDefaultState().withProperty(getMyVariantProperty(), variantFromMeta(meta & 3)).withProperty(DECAYABLE, Boolean.valueOf((meta & 4) == 0)).withProperty(CHECK_DECAY, Boolean.valueOf((meta & 8) > 0));
} }
@Override @Override
public int getMetaFromState(IBlockState state) public int getMetaFromState(IBlockState state)
{ {
int i = ((FourTrees)state.getValue(VARIANT)).ordinal(); int i = metaFromVariant(((AllTrees) state.getValue(getMyVariantProperty())));
if (!((Boolean)state.getValue(DECAYABLE)).booleanValue()) if (!((Boolean)state.getValue(DECAYABLE)).booleanValue())
{ {
i |= 4; i |= 4;
@ -110,30 +161,33 @@ public class BlockBOPLeaves extends BlockLeaves implements IBOPBlock
return 20; return 20;
} }
// TODO: use some kind of mapping to saplings
@Override @Override
public Item getItemDropped(IBlockState state, Random rand, int fortune) public Item getItemDropped(IBlockState state, Random rand, int fortune)
{ {
AllTrees treeType = ((FourTrees) state.getValue(VARIANT)).map(this.pageNum); AllTrees treeType = ((AllTrees) state.getValue(getMyVariantProperty()));
int saplingPage = treeType.ordinal() / 8; int saplingPage = treeType.ordinal() / 8;
if (saplingPage == 2) {return Item.getItemFromBlock(BOPBlocks.sapling_2);} if (saplingPage == 2) {return Item.getItemFromBlock(BOPBlocks.sapling_2);}
if (saplingPage == 1) {return Item.getItemFromBlock(BOPBlocks.sapling_1);} if (saplingPage == 1) {return Item.getItemFromBlock(BOPBlocks.sapling_1);}
return Item.getItemFromBlock(BOPBlocks.sapling_0); return Item.getItemFromBlock(BOPBlocks.sapling_0);
} }
// TODO: use some kind of mapping to saplings
@Override @Override
public int damageDropped(IBlockState state) public int damageDropped(IBlockState state)
{ {
AllTrees treeType = ((FourTrees) state.getValue(VARIANT)).map(this.pageNum); AllTrees tree = ((AllTrees) state.getValue(getMyVariantProperty()));
return treeType.ordinal() % 8; return tree.ordinal() % 8;
} }
// TODO: different fruits for different trees? // TODO: different fruits for different trees?
// TODO: fruit seems to be falling too often
@Override @Override
protected void dropApple(World worldIn, BlockPos pos, IBlockState state, int chance) protected void dropApple(World worldIn, BlockPos pos, IBlockState state, int chance)
{ {
AllTrees treeType = ((FourTrees) state.getValue(VARIANT)).map(this.pageNum); AllTrees tree = ((AllTrees) state.getValue(getMyVariantProperty()));
ItemStack fruit; ItemStack fruit;
switch (treeType) switch (tree)
{ {
case YELLOW_AUTUMN: case YELLOW_AUTUMN:
case ORANGE_AUTUMN: case ORANGE_AUTUMN:
@ -172,7 +226,7 @@ public class BlockBOPLeaves extends BlockLeaves implements IBOPBlock
public List<ItemStack> onSheared(ItemStack item, net.minecraft.world.IBlockAccess world, BlockPos pos, int fortune) public List<ItemStack> onSheared(ItemStack item, net.minecraft.world.IBlockAccess world, BlockPos pos, int fortune)
{ {
List<ItemStack> ret = new java.util.ArrayList<ItemStack>(); List<ItemStack> ret = new java.util.ArrayList<ItemStack>();
int meta = this.getMetaFromState(this.getDefaultState().withProperty(VARIANT, world.getBlockState(pos).getValue(VARIANT))); int meta = this.getMetaFromState(this.getDefaultState().withProperty(getMyVariantProperty(), world.getBlockState(pos).getValue(getMyVariantProperty())));
ret.add(new ItemStack(this, 1, meta)); ret.add(new ItemStack(this, 1, meta));
return ret; return ret;
} }
@ -180,7 +234,7 @@ public class BlockBOPLeaves extends BlockLeaves implements IBOPBlock
@Override @Override
public int getFlammability(IBlockAccess world, BlockPos pos, EnumFacing face) public int getFlammability(IBlockAccess world, BlockPos pos, EnumFacing face)
{ {
AllTrees tree = ((FourTrees) world.getBlockState(pos).getValue(VARIANT)).map(this.pageNum); AllTrees tree = ((AllTrees) world.getBlockState(pos).getValue(getMyVariantProperty()));
switch (tree) switch (tree)
{ {
case HELLBARK: case HELLBARK:
@ -193,7 +247,7 @@ public class BlockBOPLeaves extends BlockLeaves implements IBOPBlock
@Override @Override
public int getFireSpreadSpeed(IBlockAccess world, BlockPos pos, EnumFacing face) public int getFireSpreadSpeed(IBlockAccess world, BlockPos pos, EnumFacing face)
{ {
AllTrees tree = ((FourTrees) world.getBlockState(pos).getValue(VARIANT)).map(this.pageNum); AllTrees tree = ((AllTrees) world.getBlockState(pos).getValue(getMyVariantProperty()));
switch (tree) switch (tree)
{ {
case HELLBARK: case HELLBARK:

View file

@ -0,0 +1,25 @@
/*******************************************************************************
* Copyright 2014, the Biomes O' Plenty Team
*
* This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
*
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
******************************************************************************/
package biomesoplenty.common.block;
import net.minecraft.block.properties.PropertyEnum;
public class BlockBOPLeaves0 extends BlockBOPLeaves {
public static final int PAGENUM = 0;
// create a static reference to this block's variant property
// this is for convenience, and for consistency with other Block classes
public static final PropertyEnum VARIANT = BlockBOPLeaves.getVariantProperty(PAGENUM);
@Override
public int getPageNum() {return PAGENUM;}
}

View file

@ -0,0 +1,25 @@
/*******************************************************************************
* Copyright 2014, the Biomes O' Plenty Team
*
* This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
*
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
******************************************************************************/
package biomesoplenty.common.block;
import net.minecraft.block.properties.PropertyEnum;
public class BlockBOPLeaves1 extends BlockBOPLeaves {
public static final int PAGENUM = 1;
// create a static reference to this block's variant property
// this is for convenience, and for consistency with other Block classes
public static final PropertyEnum VARIANT = BlockBOPLeaves.getVariantProperty(PAGENUM);
@Override
public int getPageNum() {return PAGENUM;}
}

View file

@ -0,0 +1,25 @@
/*******************************************************************************
* Copyright 2014, the Biomes O' Plenty Team
*
* This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
*
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
******************************************************************************/
package biomesoplenty.common.block;
import net.minecraft.block.properties.PropertyEnum;
public class BlockBOPLeaves2 extends BlockBOPLeaves {
public static final int PAGENUM = 2;
// create a static reference to this block's variant property
// this is for convenience, and for consistency with other Block classes
public static final PropertyEnum VARIANT = BlockBOPLeaves.getVariantProperty(PAGENUM);
@Override
public int getPageNum() {return PAGENUM;}
}

View file

@ -0,0 +1,25 @@
/*******************************************************************************
* Copyright 2014, the Biomes O' Plenty Team
*
* This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
*
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
******************************************************************************/
package biomesoplenty.common.block;
import net.minecraft.block.properties.PropertyEnum;
public class BlockBOPLeaves3 extends BlockBOPLeaves {
public static final int PAGENUM = 3;
// create a static reference to this block's variant property
// this is for convenience, and for consistency with other Block classes
public static final PropertyEnum VARIANT = BlockBOPLeaves.getVariantProperty(PAGENUM);
@Override
public int getPageNum() {return PAGENUM;}
}

View file

@ -0,0 +1,25 @@
/*******************************************************************************
* Copyright 2014, the Biomes O' Plenty Team
*
* This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
*
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
******************************************************************************/
package biomesoplenty.common.block;
import net.minecraft.block.properties.PropertyEnum;
public class BlockBOPLeaves4 extends BlockBOPLeaves {
public static final int PAGENUM = 4;
// create a static reference to this block's variant property
// this is for convenience, and for consistency with other Block classes
public static final PropertyEnum VARIANT = BlockBOPLeaves.getVariantProperty(PAGENUM);
@Override
public int getPageNum() {return PAGENUM;}
}

View file

@ -0,0 +1,25 @@
/*******************************************************************************
* Copyright 2014, the Biomes O' Plenty Team
*
* This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
*
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
******************************************************************************/
package biomesoplenty.common.block;
import net.minecraft.block.properties.PropertyEnum;
public class BlockBOPLeaves5 extends BlockBOPLeaves {
public static final int PAGENUM = 5;
// create a static reference to this block's variant property
// this is for convenience, and for consistency with other Block classes
public static final PropertyEnum VARIANT = BlockBOPLeaves.getVariantProperty(PAGENUM);
@Override
public int getPageNum() {return PAGENUM;}
}

View file

@ -8,8 +8,9 @@
package biomesoplenty.common.block; package biomesoplenty.common.block;
import com.google.common.base.Predicate;
import biomesoplenty.api.block.BOPWoodEnums.AllWoods; import biomesoplenty.api.block.BOPWoodEnums.AllWoods;
import biomesoplenty.api.block.BOPWoodEnums.FourWoods;
import biomesoplenty.api.block.IBOPBlock; import biomesoplenty.api.block.IBOPBlock;
import biomesoplenty.common.item.ItemBOPBlock; import biomesoplenty.common.item.ItemBOPBlock;
import net.minecraft.block.BlockLog; import net.minecraft.block.BlockLog;
@ -19,15 +20,63 @@ import net.minecraft.block.state.BlockState;
import net.minecraft.block.state.IBlockState; import net.minecraft.block.state.IBlockState;
import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemBlock;
public class BlockBOPLog extends BlockLog implements IBOPBlock public abstract class BlockBOPLog extends BlockLog implements IBOPBlock
{ {
// add properties (note we inherit LOG_AXIS property from parent BlockLog)
// LOG_AXIS requires 2 meta bits, so we have 2 left for the VARIANT, which means we can have four woods per instance // store the variant properties for each page in this array
public static final PropertyEnum VARIANT = PropertyEnum.create("variant", FourWoods.class ); private static PropertyEnum[] variantProperties;
protected int pageNum; // number of variants per page
public static final int variantsPerPage = 4;
// fetch a particular page's variant property
// the first time this is called, it also sets up the array of variant properties
protected static PropertyEnum getVariantProperty(int pageNum)
{
int len = AllWoods.values().length;
int numPages = (int) Math.ceil( (double)len / variantsPerPage);
if (variantProperties == null)
{
variantProperties = new PropertyEnum[numPages];
}
pageNum = Math.max(0, Math.min(pageNum, numPages - 1));
if (variantProperties[pageNum] == null)
{
variantProperties[pageNum] = PropertyEnum.create("variant", AllWoods.class, getVariantEnumFilter(pageNum));
}
return variantProperties[pageNum];
}
// define the filter function used to reduce the set of enum values to the subset for the given page
protected static Predicate<AllWoods> getVariantEnumFilter(final int pageNum)
{
return new Predicate<AllWoods>()
{
@Override @Override
protected BlockState createBlockState() {return new BlockState(this, new IProperty[] { LOG_AXIS, VARIANT });} public boolean apply(AllWoods wood)
{
return (wood.ordinal() >= (variantsPerPage * pageNum)) && (wood.ordinal() < (variantsPerPage * (pageNum+1)));
}
};
}
// child classes must implement to define their page number
abstract public int getPageNum();
// fetch the current instance's variant property
public PropertyEnum getMyVariantProperty()
{
return getVariantProperty(this.getPageNum());
}
public int metaFromVariant(AllWoods wood)
{
return wood.ordinal() % variantsPerPage;
}
public AllWoods variantFromMeta(int meta)
{
int i = Math.max(0, Math.min(meta + (this.getPageNum() * variantsPerPage), AllWoods.values().length)); // clamp to
return AllWoods.values()[i];
}
@Override
protected BlockState createBlockState() {return new BlockState(this, new IProperty[] { LOG_AXIS, getMyVariantProperty() });}
// implement IBOPBlock // implement IBOPBlock
@ -36,13 +85,13 @@ public class BlockBOPLog extends BlockLog implements IBOPBlock
@Override @Override
public int getItemRenderColor(IBlockState state, int tintIndex) { return this.getRenderColor(state); } public int getItemRenderColor(IBlockState state, int tintIndex) { return this.getRenderColor(state); }
@Override @Override
public IProperty[] getPresetProperties() { return new IProperty[] {VARIANT}; } public IProperty[] getPresetProperties() { return new IProperty[] {getMyVariantProperty()}; }
@Override @Override
public IProperty[] getNonRenderingProperties() { return null; } public IProperty[] getNonRenderingProperties() { return null; }
@Override @Override
public String getStateName(IBlockState state) public String getStateName(IBlockState state)
{ {
AllWoods wood = ((FourWoods) state.getValue(VARIANT)).map(this.pageNum); AllWoods wood = (AllWoods) state.getValue(getMyVariantProperty());
switch (wood) switch (wood)
{ {
case GIANT_FLOWER: case GIANT_FLOWER:
@ -53,11 +102,10 @@ public class BlockBOPLog extends BlockLog implements IBOPBlock
} }
public BlockBOPLog(int pageNum) public BlockBOPLog()
{ {
super(); super();
this.pageNum = pageNum; this.setDefaultState(this.blockState.getBaseState().withProperty(LOG_AXIS, BlockLog.EnumAxis.Y));
this.setDefaultState(this.blockState.getBaseState().withProperty(LOG_AXIS, BlockLog.EnumAxis.Y).withProperty(VARIANT, FourWoods.A));
this.setHarvestLevel("axe", 0); this.setHarvestLevel("axe", 0);
} }
@ -65,12 +113,12 @@ public class BlockBOPLog extends BlockLog implements IBOPBlock
@Override @Override
public IBlockState getStateFromMeta(int meta) public IBlockState getStateFromMeta(int meta)
{ {
return this.getDefaultState().withProperty(LOG_AXIS, BlockLog.EnumAxis.values()[meta >> 2]).withProperty(VARIANT, FourWoods.values()[meta & 3]); return this.getDefaultState().withProperty(LOG_AXIS, BlockLog.EnumAxis.values()[meta >> 2]).withProperty(getMyVariantProperty(), variantFromMeta(meta & 3));
} }
@Override @Override
public int getMetaFromState(IBlockState state) public int getMetaFromState(IBlockState state)
{ {
return ((BlockLog.EnumAxis) state.getValue(LOG_AXIS)).ordinal() * 4 + ((FourWoods) state.getValue(VARIANT)).ordinal(); return ((BlockLog.EnumAxis) state.getValue(LOG_AXIS)).ordinal() * 4 + metaFromVariant((AllWoods) state.getValue(getMyVariantProperty()));
} }
// discard the axis information - otherwise logs facing different directions would not stack together // discard the axis information - otherwise logs facing different directions would not stack together

View file

@ -0,0 +1,25 @@
/*******************************************************************************
* Copyright 2014, the Biomes O' Plenty Team
*
* This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
*
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
******************************************************************************/
package biomesoplenty.common.block;
import net.minecraft.block.properties.PropertyEnum;
public class BlockBOPLog0 extends BlockBOPLog {
public static final int PAGENUM = 0;
// create a static reference to this block's variant property
// this is for convenience, and for consistency with other Block classes
public static final PropertyEnum VARIANT = BlockBOPLog.getVariantProperty(PAGENUM);
@Override
public int getPageNum() {return PAGENUM;}
}

View file

@ -0,0 +1,25 @@
/*******************************************************************************
* Copyright 2014, the Biomes O' Plenty Team
*
* This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
*
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
******************************************************************************/
package biomesoplenty.common.block;
import net.minecraft.block.properties.PropertyEnum;
public class BlockBOPLog1 extends BlockBOPLog {
public static final int PAGENUM = 1;
// create a static reference to this block's variant property
// this is for convenience, and for consistency with other Block classes
public static final PropertyEnum VARIANT = BlockBOPLog.getVariantProperty(PAGENUM);
@Override
public int getPageNum() {return PAGENUM;}
}

View file

@ -0,0 +1,25 @@
/*******************************************************************************
* Copyright 2014, the Biomes O' Plenty Team
*
* This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
*
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
******************************************************************************/
package biomesoplenty.common.block;
import net.minecraft.block.properties.PropertyEnum;
public class BlockBOPLog2 extends BlockBOPLog {
public static final int PAGENUM = 2;
// create a static reference to this block's variant property
// this is for convenience, and for consistency with other Block classes
public static final PropertyEnum VARIANT = BlockBOPLog.getVariantProperty(PAGENUM);
@Override
public int getPageNum() {return PAGENUM;}
}

View file

@ -0,0 +1,25 @@
/*******************************************************************************
* Copyright 2014, the Biomes O' Plenty Team
*
* This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
*
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
******************************************************************************/
package biomesoplenty.common.block;
import net.minecraft.block.properties.PropertyEnum;
public class BlockBOPLog3 extends BlockBOPLog {
public static final int PAGENUM = 3;
// create a static reference to this block's variant property
// this is for convenience, and for consistency with other Block classes
public static final PropertyEnum VARIANT = BlockBOPLog.getVariantProperty(PAGENUM);
@Override
public int getPageNum() {return PAGENUM;}
}

View file

@ -8,6 +8,8 @@
package biomesoplenty.common.block; package biomesoplenty.common.block;
import com.google.common.base.Predicate;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.material.Material; import net.minecraft.block.material.Material;
import net.minecraft.block.properties.IProperty; import net.minecraft.block.properties.IProperty;
@ -17,18 +19,73 @@ import net.minecraft.block.state.IBlockState;
import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemBlock;
import biomesoplenty.api.block.IBOPBlock; import biomesoplenty.api.block.IBOPBlock;
import biomesoplenty.api.block.BOPWoodEnums.AllWoods; import biomesoplenty.api.block.BOPWoodEnums.AllWoods;
import biomesoplenty.api.block.BOPWoodEnums.SixteenWoods;
import biomesoplenty.common.item.ItemBOPBlock; import biomesoplenty.common.item.ItemBOPBlock;
public class BlockBOPPlanks extends Block implements IBOPBlock public abstract class BlockBOPPlanks extends Block implements IBOPBlock
{ {
// add properties (note we inherit LOG_AXIS property from parent BlockLog)
// all 4 bits available for VARIANT, which means we can have 16 woods per instance // store the variant properties for each page in this array
public static final PropertyEnum VARIANT = PropertyEnum.create("variant", SixteenWoods.class ); private static PropertyEnum[] variantProperties;
protected int pageNum; // number of variants per page - all 4 meta bits are available so we can have 16
public static final int variantsPerPage = 16;
// fetch a particular page's variant property
// the first time this is called, it also sets up the array of variant properties
protected static PropertyEnum getVariantProperty(int pageNum)
{
int len = AllWoods.values().length;
int numPages = (int) Math.ceil( (double)len / variantsPerPage);
if (variantProperties == null)
{
variantProperties = new PropertyEnum[numPages];
}
pageNum = Math.max(0, Math.min(pageNum, numPages - 1));
if (variantProperties[pageNum] == null)
{
variantProperties[pageNum] = PropertyEnum.create("variant", AllWoods.class, getVariantEnumFilter(pageNum));
}
return variantProperties[pageNum];
}
// define the filter function used to reduce the set of enum values to the subset for the given page
protected static Predicate<AllWoods> getVariantEnumFilter(final int pageNum)
{
return new Predicate<AllWoods>()
{
@Override @Override
protected BlockState createBlockState() {return new BlockState(this, new IProperty[] { VARIANT });} public boolean apply(AllWoods wood)
{
switch (wood)
{
case GIANT_FLOWER: case DEAD:
return false;
default:
return (wood.ordinal() >= (variantsPerPage * pageNum)) && (wood.ordinal() < (variantsPerPage * (pageNum+1)));
}
}
};
}
// child classes must implement to define their page number
abstract public int getPageNum();
// fetch the current instance's variant property
public PropertyEnum getMyVariantProperty()
{
return getVariantProperty(this.getPageNum());
}
public int metaFromVariant(AllWoods wood)
{
return wood.ordinal() % variantsPerPage;
}
public AllWoods variantFromMeta(int meta)
{
int i = Math.max(0, Math.min(meta + (this.getPageNum() * variantsPerPage), AllWoods.values().length)); // clamp to
return AllWoods.values()[i];
}
// add properties (note we inherit LOG_AXIS property from parent BlockLog)
@Override
protected BlockState createBlockState() {return new BlockState(this, new IProperty[] { getMyVariantProperty() });}
// implement IBOPBlock // implement IBOPBlock
@ -37,21 +94,20 @@ public class BlockBOPPlanks extends Block implements IBOPBlock
@Override @Override
public int getItemRenderColor(IBlockState state, int tintIndex) { return this.getRenderColor(state); } public int getItemRenderColor(IBlockState state, int tintIndex) { return this.getRenderColor(state); }
@Override @Override
public IProperty[] getPresetProperties() { return new IProperty[] {VARIANT}; } public IProperty[] getPresetProperties() { return new IProperty[] {getMyVariantProperty()}; }
@Override @Override
public IProperty[] getNonRenderingProperties() { return null; } public IProperty[] getNonRenderingProperties() { return null; }
@Override @Override
public String getStateName(IBlockState state) public String getStateName(IBlockState state)
{ {
return ((SixteenWoods) state.getValue(VARIANT)).map(this.pageNum).getName() + "_planks"; return ((AllWoods) state.getValue(getMyVariantProperty())).getName() + "_planks";
} }
public BlockBOPPlanks(int pageNum) public BlockBOPPlanks()
{ {
super(Material.wood); super(Material.wood);
this.pageNum = pageNum; this.setDefaultState(this.blockState.getBaseState());
this.setDefaultState(this.blockState.getBaseState().withProperty(VARIANT, SixteenWoods.A));
this.setHarvestLevel("axe", 0); this.setHarvestLevel("axe", 0);
} }
@ -59,12 +115,12 @@ public class BlockBOPPlanks extends Block implements IBOPBlock
@Override @Override
public IBlockState getStateFromMeta(int meta) public IBlockState getStateFromMeta(int meta)
{ {
return this.getDefaultState().withProperty(VARIANT, SixteenWoods.values()[meta]); return this.getDefaultState().withProperty(getMyVariantProperty(), variantFromMeta(meta));
} }
@Override @Override
public int getMetaFromState(IBlockState state) public int getMetaFromState(IBlockState state)
{ {
return ((SixteenWoods) state.getValue(VARIANT)).ordinal(); return metaFromVariant((AllWoods) state.getValue(getMyVariantProperty()));
} }
@Override @Override
@ -75,7 +131,7 @@ public class BlockBOPPlanks extends Block implements IBOPBlock
public IBlockState getStateByWood(AllWoods wood) public IBlockState getStateByWood(AllWoods wood)
{ {
return this.getDefaultState().withProperty(VARIANT, SixteenWoods.mapFrom(wood)); return this.getDefaultState().withProperty(getMyVariantProperty(), wood);
} }
} }

View file

@ -0,0 +1,25 @@
/*******************************************************************************
* Copyright 2014, the Biomes O' Plenty Team
*
* This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
*
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
******************************************************************************/
package biomesoplenty.common.block;
import net.minecraft.block.properties.PropertyEnum;
public class BlockBOPPlanks0 extends BlockBOPPlanks {
public static final int PAGENUM = 0;
// create a static reference to this block's variant property
// this is for convenience, and for consistency with other Block classes
public static final PropertyEnum VARIANT = BlockBOPPlanks.getVariantProperty(PAGENUM);
@Override
public int getPageNum() {return PAGENUM;}
}

View file

@ -10,9 +10,10 @@ package biomesoplenty.common.block;
import java.util.Random; import java.util.Random;
import com.google.common.base.Predicate;
import biomesoplenty.api.block.BOPBlocks; import biomesoplenty.api.block.BOPBlocks;
import biomesoplenty.api.block.BOPTreeEnums.AllTrees; import biomesoplenty.api.block.BOPTreeEnums.AllTrees;
import biomesoplenty.api.block.BOPTreeEnums.EightTrees;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.IGrowable; import net.minecraft.block.IGrowable;
import net.minecraft.block.properties.IProperty; import net.minecraft.block.properties.IProperty;
@ -27,33 +28,89 @@ import net.minecraft.world.gen.feature.WorldGenAbstractTree;
import net.minecraft.world.gen.feature.WorldGenTrees; import net.minecraft.world.gen.feature.WorldGenTrees;
import net.minecraft.world.gen.feature.WorldGenerator; import net.minecraft.world.gen.feature.WorldGenerator;
public class BlockBOPSapling extends BlockDecoration implements IGrowable { public abstract class BlockBOPSapling extends BlockDecoration implements IGrowable {
// store the variant properties for each page in this array
private static PropertyEnum[] variantProperties;
// STAGE require one bit, so we have 3 bits left for the VARIANT which means we can have eight per instance
public static final int variantsPerPage = 8;
// fetch a particular page's variant property
// the first time this is called, it also sets up the array of variant properties
protected static PropertyEnum getVariantProperty(int pageNum)
{
int len = AllTrees.values().length;
int numPages = (int) Math.ceil( (double)len / variantsPerPage);
if (variantProperties == null)
{
variantProperties = new PropertyEnum[numPages];
}
pageNum = Math.max(0, Math.min(pageNum, numPages - 1));
if (variantProperties[pageNum] == null)
{
variantProperties[pageNum] = PropertyEnum.create("variant", AllTrees.class, getVariantEnumFilter(pageNum));
}
return variantProperties[pageNum];
}
// define the filter function used to reduce the set of enum values to the subset for the given page
protected static Predicate<AllTrees> getVariantEnumFilter(final int pageNum)
{
return new Predicate<AllTrees>()
{
@Override
public boolean apply(AllTrees tree)
{
switch (tree)
{
case RED_BIG_FLOWER: case YELLOW_BIG_FLOWER:
return false;
default:
return (tree.ordinal() >= (variantsPerPage * pageNum)) && (tree.ordinal() < (variantsPerPage * (pageNum+1)));
}
}
};
}
// child classes must implement to define their page number
abstract public int getPageNum();
// fetch the current instance's variant property
public PropertyEnum getMyVariantProperty()
{
return getVariantProperty(this.getPageNum());
}
public int metaFromVariant(AllTrees tree)
{
return tree.ordinal() % variantsPerPage;
}
public AllTrees variantFromMeta(int meta)
{
int i = Math.max(0, Math.min(meta + (this.getPageNum() * variantsPerPage), AllTrees.values().length)); // clamp to
return AllTrees.values()[i];
}
// add properties // add properties
public static final PropertyInteger STAGE = PropertyInteger.create("stage", 0, 1); public static final PropertyInteger STAGE = PropertyInteger.create("stage", 0, 1);
// stage requires one bit, so we have 3 bits left for the VARIANT which means we can have eight per instance
public static final PropertyEnum VARIANT = PropertyEnum.create("variant", EightTrees.class );
protected int pageNum;
@Override @Override
protected BlockState createBlockState() {return new BlockState(this, new IProperty[] { STAGE, VARIANT });} protected BlockState createBlockState() {return new BlockState(this, new IProperty[] { STAGE, getMyVariantProperty() });}
// implement IBOPBlock // implement IBOPBlock
@Override @Override
public IProperty[] getPresetProperties() { return new IProperty[] {VARIANT}; } public IProperty[] getPresetProperties() { return new IProperty[] {getMyVariantProperty()}; }
@Override @Override
public IProperty[] getNonRenderingProperties() { return new IProperty[] {STAGE}; } public IProperty[] getNonRenderingProperties() { return new IProperty[] {STAGE}; }
@Override @Override
public String getStateName(IBlockState state) public String getStateName(IBlockState state)
{ {
return ((EightTrees) state.getValue(VARIANT)).map(this.pageNum).getName() + "_sapling"; return ((AllTrees) state.getValue(getMyVariantProperty())).getName() + "_sapling";
} }
public BlockBOPSapling(int pageNum) public BlockBOPSapling()
{ {
super(); super();
this.pageNum = pageNum;
this.setStepSound(Block.soundTypeGrass); this.setStepSound(Block.soundTypeGrass);
this.setBlockBoundsByRadiusAndHeight(0.4F, 0.8F); this.setBlockBoundsByRadiusAndHeight(0.4F, 0.8F);
this.setDefaultState(this.blockState.getBaseState().withProperty(STAGE, Integer.valueOf(0))); this.setDefaultState(this.blockState.getBaseState().withProperty(STAGE, Integer.valueOf(0)));
@ -64,12 +121,12 @@ public class BlockBOPSapling extends BlockDecoration implements IGrowable {
@Override @Override
public IBlockState getStateFromMeta(int meta) public IBlockState getStateFromMeta(int meta)
{ {
return this.getDefaultState().withProperty(VARIANT, EightTrees.values()[meta & 7]).withProperty(STAGE, Integer.valueOf(meta >> 3)); return this.getDefaultState().withProperty(getMyVariantProperty(), variantFromMeta(meta & 7)).withProperty(STAGE, Integer.valueOf(meta >> 3));
} }
@Override @Override
public int getMetaFromState(IBlockState state) public int getMetaFromState(IBlockState state)
{ {
return ((Integer)state.getValue(STAGE)).intValue() * 8 + ((EightTrees)state.getValue(VARIANT)).ordinal(); return ((Integer)state.getValue(STAGE)).intValue() * 8 + metaFromVariant((AllTrees)state.getValue(getMyVariantProperty()));
} }
// which types of block allow trees // which types of block allow trees
@ -199,7 +256,7 @@ public class BlockBOPSapling extends BlockDecoration implements IGrowable {
{ {
if (!net.minecraftforge.event.terraingen.TerrainGen.saplingGrowTree(worldIn, rand, pos)) {return false;} if (!net.minecraftforge.event.terraingen.TerrainGen.saplingGrowTree(worldIn, rand, pos)) {return false;}
AllTrees treeType = ((EightTrees) state.getValue(VARIANT)).map(this.pageNum); AllTrees treeType = ((AllTrees) state.getValue(getMyVariantProperty()));
WorldGenAbstractTree smallTreeGenerator = this.getSmallTreeGenerator(treeType); WorldGenAbstractTree smallTreeGenerator = this.getSmallTreeGenerator(treeType);
WorldGenAbstractTree bigTreeGenerator = this.getBigTreeGenerator(treeType); WorldGenAbstractTree bigTreeGenerator = this.getBigTreeGenerator(treeType);
WorldGenAbstractTree megaTreeGenerator = this.getMegaTreeGenerator(treeType); WorldGenAbstractTree megaTreeGenerator = this.getMegaTreeGenerator(treeType);

View file

@ -0,0 +1,25 @@
/*******************************************************************************
* Copyright 2014, the Biomes O' Plenty Team
*
* This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
*
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
******************************************************************************/
package biomesoplenty.common.block;
import net.minecraft.block.properties.PropertyEnum;
public class BlockBOPSapling0 extends BlockBOPSapling {
public static final int PAGENUM = 0;
// create a static reference to this block's variant property
// this is for convenience, and for consistency with other Block classes
public static final PropertyEnum VARIANT = BlockBOPSapling.getVariantProperty(PAGENUM);
@Override
public int getPageNum() {return PAGENUM;}
}

View file

@ -0,0 +1,25 @@
/*******************************************************************************
* Copyright 2014, the Biomes O' Plenty Team
*
* This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
*
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
******************************************************************************/
package biomesoplenty.common.block;
import net.minecraft.block.properties.PropertyEnum;
public class BlockBOPSapling1 extends BlockBOPSapling {
public static final int PAGENUM = 1;
// create a static reference to this block's variant property
// this is for convenience, and for consistency with other Block classes
public static final PropertyEnum VARIANT = BlockBOPSapling.getVariantProperty(PAGENUM);
@Override
public int getPageNum() {return PAGENUM;}
}

View file

@ -0,0 +1,25 @@
/*******************************************************************************
* Copyright 2014, the Biomes O' Plenty Team
*
* This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
*
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
******************************************************************************/
package biomesoplenty.common.block;
import net.minecraft.block.properties.PropertyEnum;
public class BlockBOPSapling2 extends BlockBOPSapling {
public static final int PAGENUM = 2;
// create a static reference to this block's variant property
// this is for convenience, and for consistency with other Block classes
public static final PropertyEnum VARIANT = BlockBOPSapling.getVariantProperty(PAGENUM);
@Override
public int getPageNum() {return PAGENUM;}
}

View file

@ -0,0 +1,116 @@
/*******************************************************************************
* Copyright 2014, the Biomes O' Plenty Team
*
* This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
*
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
******************************************************************************/
package biomesoplenty.common.block;
import com.google.common.base.Predicate;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.block.properties.IProperty;
import net.minecraft.block.properties.PropertyEnum;
import net.minecraft.block.state.BlockState;
import net.minecraft.block.state.IBlockState;
import net.minecraft.util.IStringSerializable;
public abstract class BlockCheese extends Block
{
public enum AllCheeses implements IStringSerializable
{
CHEDDAR, EDAM, MOZARELLA, STILTON, PARMESAN, BRIE, LANCS, WENSLEYDALE, GRUYERE, COMTE;
@Override
public String getName()
{
return this.name().toLowerCase();
}
@Override
public String toString()
{
return this.getName();
}
}
// store the variant properties for each page in this array
private static PropertyEnum[] variantProperties;
// number of variants per page
public static final int variantsPerPage = 4;
// fetch a particular page's variant property
// the first time this is called, it also sets up the array of variant properties
protected static PropertyEnum getVariantProperty(int pageNum)
{
int len = AllCheeses.values().length;
int numPages = (int) Math.ceil( (double)len / variantsPerPage);
if (variantProperties == null)
{
variantProperties = new PropertyEnum[numPages];
}
pageNum = Math.max(0, Math.min(pageNum, numPages - 1));
if (variantProperties[pageNum] == null)
{
variantProperties[pageNum] = PropertyEnum.create("variant", AllCheeses.class, getVariantEnumFilter(pageNum));
}
return variantProperties[pageNum];
}
// child classes must implement to define their page number
abstract public int getPageNum();
// fetch the current instance's variant property
public PropertyEnum getMyVariantProperty()
{
return getVariantProperty(this.getPageNum());
}
// define the filter function used to reduce the set of enum values to the subset for the given page
protected static Predicate<AllCheeses> getVariantEnumFilter(final int pageNum)
{
return new Predicate<AllCheeses>()
{
@Override
public boolean apply(AllCheeses cheese)
{
return (cheese.ordinal() >= (variantsPerPage * pageNum)) && (cheese.ordinal() < (variantsPerPage * (pageNum+1)));
}
};
}
public int metaFromVariant(AllCheeses type)
{
return type.ordinal() % variantsPerPage;
}
public AllCheeses variantFromMeta(int meta)
{
int i = Math.max(0, Math.min(meta + (this.getPageNum() * variantsPerPage), AllCheeses.values().length)); // clamp to
return AllCheeses.values()[i];
}
@Override
protected BlockState createBlockState()
{
return new BlockState(this, new IProperty[] { getMyVariantProperty() });
}
public BlockCheese()
{
super(Material.cake);
}
// map from state to meta and vice verca
@Override
public IBlockState getStateFromMeta(int meta)
{
return this.getDefaultState().withProperty(getMyVariantProperty(), variantFromMeta(meta & 3)); // in addition to other properties
}
@Override
public int getMetaFromState(IBlockState state)
{
return metaFromVariant((AllCheeses) state.getValue(getMyVariantProperty())); // plus bits from other properties
}
}

View file

@ -0,0 +1,17 @@
package biomesoplenty.common.block;
import net.minecraft.block.properties.PropertyEnum;
public class BlockCheese0 extends BlockCheese
{
public static final int PAGENUM = 0;
// create a static reference to this block's variant property
// this is for convenience, and for consistency with other Block classes
public static final PropertyEnum VARIANT = BlockCheese.getVariantProperty(PAGENUM);
@Override
public int getPageNum() {return PAGENUM;}
}

View file

@ -0,0 +1,17 @@
package biomesoplenty.common.block;
import net.minecraft.block.properties.PropertyEnum;
public class BlockCheese1 extends BlockCheese
{
public static final int PAGENUM = 1;
// create a static reference to this block's variant property
// this is for convenience, and for consistency with other Block classes
public static final PropertyEnum VARIANT = BlockCheese.getVariantProperty(PAGENUM);
@Override
public int getPageNum() {return PAGENUM;}
}

View file

@ -34,20 +34,33 @@ import biomesoplenty.api.item.BOPItems;
import biomesoplenty.common.block.BlockAsh; import biomesoplenty.common.block.BlockAsh;
import biomesoplenty.common.block.BlockBOPDirt; import biomesoplenty.common.block.BlockBOPDirt;
import biomesoplenty.common.block.BlockBOPDoor; import biomesoplenty.common.block.BlockBOPDoor;
import biomesoplenty.common.block.BlockBOPDoubleWoodSlab; import biomesoplenty.common.block.BlockBOPDoubleWoodSlab0;
import biomesoplenty.common.block.BlockBOPDoubleWoodSlab1;
import biomesoplenty.common.block.BlockBOPFence; import biomesoplenty.common.block.BlockBOPFence;
import biomesoplenty.common.block.BlockBOPFenceGate; import biomesoplenty.common.block.BlockBOPFenceGate;
import biomesoplenty.common.block.BlockBOPFlower1; import biomesoplenty.common.block.BlockBOPFlower1;
import biomesoplenty.common.block.BlockBOPFlower2; import biomesoplenty.common.block.BlockBOPFlower2;
import biomesoplenty.common.block.BlockBOPGeneric; import biomesoplenty.common.block.BlockBOPGeneric;
import biomesoplenty.common.block.BlockBOPGrass; import biomesoplenty.common.block.BlockBOPGrass;
import biomesoplenty.common.block.BlockBOPHalfWoodSlab; import biomesoplenty.common.block.BlockBOPHalfWoodSlab0;
import biomesoplenty.common.block.BlockBOPLeaves; import biomesoplenty.common.block.BlockBOPHalfWoodSlab1;
import biomesoplenty.common.block.BlockBOPLeaves0;
import biomesoplenty.common.block.BlockBOPLeaves1;
import biomesoplenty.common.block.BlockBOPLeaves2;
import biomesoplenty.common.block.BlockBOPLeaves3;
import biomesoplenty.common.block.BlockBOPLeaves4;
import biomesoplenty.common.block.BlockBOPLeaves5;
import biomesoplenty.common.block.BlockBOPLilypad; import biomesoplenty.common.block.BlockBOPLilypad;
import biomesoplenty.common.block.BlockBOPLog; import biomesoplenty.common.block.BlockBOPLog0;
import biomesoplenty.common.block.BlockBOPLog1;
import biomesoplenty.common.block.BlockBOPLog2;
import biomesoplenty.common.block.BlockBOPLog3;
import biomesoplenty.common.block.BlockBOPMushroom; import biomesoplenty.common.block.BlockBOPMushroom;
import biomesoplenty.common.block.BlockBOPPlanks; import biomesoplenty.common.block.BlockBOPPlanks;
import biomesoplenty.common.block.BlockBOPSapling; import biomesoplenty.common.block.BlockBOPPlanks0;
import biomesoplenty.common.block.BlockBOPSapling0;
import biomesoplenty.common.block.BlockBOPSapling1;
import biomesoplenty.common.block.BlockBOPSapling2;
import biomesoplenty.common.block.BlockBOPStairs; import biomesoplenty.common.block.BlockBOPStairs;
import biomesoplenty.common.block.BlockBOPStone; import biomesoplenty.common.block.BlockBOPStone;
import biomesoplenty.common.block.BlockBOPVine; import biomesoplenty.common.block.BlockBOPVine;
@ -115,32 +128,32 @@ public class ModBlocks
mud_brick = registerBlock( (new BlockBOPGeneric()).setResistance(2.0F), "mud_brick" ); mud_brick = registerBlock( (new BlockBOPGeneric()).setResistance(2.0F), "mud_brick" );
// 16 wood types, 4 per BlockBOPLog instance, needs 4 'pages' // 16 wood types, 4 per BlockBOPLog instance, needs 4 'pages'
log_0 = registerBlock( new BlockBOPLog(0), "log_0" ); log_0 = registerBlock( new BlockBOPLog0(), "log_0" );
log_1 = registerBlock( new BlockBOPLog(1), "log_1" ); log_1 = registerBlock( new BlockBOPLog1(), "log_1" );
log_2 = registerBlock( new BlockBOPLog(2), "log_2" ); log_2 = registerBlock( new BlockBOPLog2(), "log_2" );
log_3 = registerBlock( new BlockBOPLog(3), "log_3" ); log_3 = registerBlock( new BlockBOPLog3(), "log_3" );
// 22 tree types, 4 per BlockBOPLeaves instance, needs 6 'pages'
leaves_0 = registerBlock( new BlockBOPLeaves(0), "leaves_0");
leaves_1 = registerBlock( new BlockBOPLeaves(1), "leaves_1" );
leaves_2 = registerBlock( new BlockBOPLeaves(2), "leaves_2" );
leaves_3 = registerBlock( new BlockBOPLeaves(3), "leaves_3" );
leaves_4 = registerBlock( new BlockBOPLeaves(4), "leaves_4" );
leaves_5 = registerBlock( new BlockBOPLeaves(5), "leaves_5" );
// 22 tree types, 8 per BlockBOPSapling instance, needs 3 'pages'
sapling_0 = registerBlock( new BlockBOPSapling(0), "sapling_0");
sapling_1 = registerBlock( new BlockBOPSapling(1), "sapling_1");
sapling_2 = registerBlock( new BlockBOPSapling(2), "sapling_2");
// TODO: check if hellbark planks, fence etc can burn // TODO: check if hellbark planks, fence etc can burn
// 16 wood types, 8 per BlockBOPHalfWoodSlab and BlockBOPDoubleWoodSlab intance, needs 2 'pages' // 16 wood types, 8 per BlockBOPHalfWoodSlab and BlockBOPDoubleWoodSlab intance, needs 2 'pages'
registerWoodSlab( half_wood_slab_0, double_wood_slab_0, BOPItems.wood_slab_0, 0); registerWoodSlab( wood_slab_0, double_wood_slab_0, BOPItems.wood_slab_0, 0);
registerWoodSlab( half_wood_slab_1, double_wood_slab_1, BOPItems.wood_slab_1, 1); registerWoodSlab( wood_slab_1, double_wood_slab_1, BOPItems.wood_slab_1, 1);
// 16 wood types, 16 per BlockBOPPlanks instance, needs 1 'pages' // 16 wood types, 16 per BlockBOPPlanks instance, needs 1 'pages'
planks_0 = registerBlock( new BlockBOPPlanks(0), "planks_0"); planks_0 = registerBlock( new BlockBOPPlanks0(), "planks_0");
// 22 tree types, 4 per BlockBOPLeaves instance, needs 6 'pages'
leaves_0 = registerBlock( new BlockBOPLeaves0(), "leaves_0");
leaves_1 = registerBlock( new BlockBOPLeaves1(), "leaves_1" );
leaves_2 = registerBlock( new BlockBOPLeaves2(), "leaves_2" );
leaves_3 = registerBlock( new BlockBOPLeaves3(), "leaves_3" );
leaves_4 = registerBlock( new BlockBOPLeaves4(), "leaves_4" );
leaves_5 = registerBlock( new BlockBOPLeaves5(), "leaves_5" );
// 22 tree types, 8 per BlockBOPSapling instance, needs 3 'pages'
sapling_0 = registerBlock( new BlockBOPSapling0(), "sapling_0");
sapling_1 = registerBlock( new BlockBOPSapling1(), "sapling_1");
sapling_2 = registerBlock( new BlockBOPSapling2(), "sapling_2");
// stairs have no variant metadata, use a new BlockBOPStairs instance for each (note there's no giant_flower_stairs or dead_stairs) // stairs have no variant metadata, use a new BlockBOPStairs instance for each (note there's no giant_flower_stairs or dead_stairs)
sacred_oak_stairs = registerBlock( new BlockBOPStairs(((BlockBOPPlanks)planks_0).getStateByWood(AllWoods.SACRED_OAK)), "sacred_oak_stairs" ); sacred_oak_stairs = registerBlock( new BlockBOPStairs(((BlockBOPPlanks)planks_0).getStateByWood(AllWoods.SACRED_OAK)), "sacred_oak_stairs" );
@ -226,8 +239,19 @@ public class ModBlocks
// use a separate function for registering slabs because the half slab, double slab, and item really need to be registered together // use a separate function for registering slabs because the half slab, double slab, and item really need to be registered together
public static void registerWoodSlab(Block half_slab, Block double_slab, Item slab_item, int pageNum) public static void registerWoodSlab(Block half_slab, Block double_slab, Item slab_item, int pageNum)
{ {
half_slab = registerBlock( new BlockBOPHalfWoodSlab(pageNum), "half_wood_slab_" + pageNum ); switch (pageNum)
double_slab = registerBlock( new BlockBOPDoubleWoodSlab(pageNum), "double_wood_slab_" + pageNum, null ); // no creative tab for double slab {
case 0:
half_slab = registerBlock( new BlockBOPHalfWoodSlab0(), "wood_slab_0");
double_slab = registerBlock( new BlockBOPDoubleWoodSlab0(), "double_wood_slab_0", null ); // no creative tab for double slab
break;
case 1:
half_slab = registerBlock( new BlockBOPHalfWoodSlab1(), "wood_slab_1");
double_slab = registerBlock( new BlockBOPDoubleWoodSlab1(), "double_wood_slab_1", null ); // no creative tab for double slab
break;
default:
throw new IllegalArgumentException("No switch case yet for slab page " + pageNum);
}
slab_item = ModItems.registerItem( new ItemSlab(half_slab, (BlockSlab)half_slab, (BlockSlab)double_slab), "wood_slab_" + pageNum ); slab_item = ModItems.registerItem( new ItemSlab(half_slab, (BlockSlab)half_slab, (BlockSlab)double_slab), "wood_slab_" + pageNum );
GameData.getBlockItemMap().put(half_slab, slab_item); GameData.getBlockItemMap().put(half_slab, slab_item);
GameData.getBlockItemMap().put(double_slab, slab_item); GameData.getBlockItemMap().put(double_slab, slab_item);

View file

@ -0,0 +1,5 @@
{
"variants": {
"normal": { "model": "biomesoplenty:ash_block" }
}
}

View file

@ -0,0 +1,5 @@
{
"variants": {
"normal": { "model": "biomesoplenty:ash_block" }
}
}

View file

@ -1,12 +1,12 @@
{ {
"variants": { "variants": {
"variant=a": { "model": "biomesoplenty:sacred_oak_planks" }, "variant=sacred_oak": { "model": "biomesoplenty:sacred_oak_planks" },
"variant=b": { "model": "biomesoplenty:cherry_planks" }, "variant=cherry": { "model": "biomesoplenty:cherry_planks" },
"variant=c": { "model": "biomesoplenty:dark_planks" }, "variant=dark": { "model": "biomesoplenty:dark_planks" },
"variant=d": { "model": "biomesoplenty:fir_planks" }, "variant=fir": { "model": "biomesoplenty:fir_planks" },
"variant=e": { "model": "biomesoplenty:ethereal_planks" }, "variant=ethereal": { "model": "biomesoplenty:ethereal_planks" },
"variant=f": { "model": "biomesoplenty:magic_planks" }, "variant=magic": { "model": "biomesoplenty:magic_planks" },
"variant=g": { "model": "biomesoplenty:mangrove_planks" }, "variant=mangrove": { "model": "biomesoplenty:mangrove_planks" },
"variant=h": { "model": "biomesoplenty:palm_planks" } "variant=palm": { "model": "biomesoplenty:palm_planks" }
} }
} }

View file

@ -1,12 +1,10 @@
{ {
"variants": { "variants": {
"variant=a": { "model": "biomesoplenty:redwood_planks" }, "variant=redwood": { "model": "biomesoplenty:redwood_planks" },
"variant=b": { "model": "biomesoplenty:willow_planks" }, "variant=willow": { "model": "biomesoplenty:willow_planks" },
"variant=c": { "model": "biomesoplenty:pine_planks" }, "variant=pine": { "model": "biomesoplenty:pine_planks" },
"variant=d": { "model": "biomesoplenty:hell_bark_planks" }, "variant=hell_bark": { "model": "biomesoplenty:hell_bark_planks" },
"variant=e": { "model": "biomesoplenty:jacaranda_planks" }, "variant=jacaranda": { "model": "biomesoplenty:jacaranda_planks" },
"variant=f": { "model": "biomesoplenty:mahogany_planks" }, "variant=mahogany": { "model": "biomesoplenty:mahogany_planks" }
"variant=g": { "model": "biomesoplenty:giant_flower_planks" },
"variant=h": { "model": "biomesoplenty:dead_planks" }
} }
} }

View file

@ -1,8 +1,8 @@
{ {
"variants": { "variants": {
"variant=a": { "model": "biomesoplenty:yellow_autumn_leaves" }, "variant=yellow_autumn": { "model": "biomesoplenty:yellow_autumn_leaves" },
"variant=b": { "model": "biomesoplenty:orange_autumn_leaves" }, "variant=orange_autumn": { "model": "biomesoplenty:orange_autumn_leaves" },
"variant=c": { "model": "biomesoplenty:bamboo_leaves" }, "variant=bamboo": { "model": "biomesoplenty:bamboo_leaves" },
"variant=d": { "model": "biomesoplenty:magic_leaves" } "variant=magic": { "model": "biomesoplenty:magic_leaves" }
} }
} }

View file

@ -1,8 +1,8 @@
{ {
"variants": { "variants": {
"variant=a": { "model": "biomesoplenty:dark_leaves" }, "variant=dark": { "model": "biomesoplenty:dark_leaves" },
"variant=b": { "model": "biomesoplenty:dead_leaves" }, "variant=dead": { "model": "biomesoplenty:dead_leaves" },
"variant=c": { "model": "biomesoplenty:fir_leaves" }, "variant=fir": { "model": "biomesoplenty:fir_leaves" },
"variant=d": { "model": "biomesoplenty:ethereal_leaves" } "variant=ethereal": { "model": "biomesoplenty:ethereal_leaves" }
} }
} }

View file

@ -1,8 +1,8 @@
{ {
"variants": { "variants": {
"variant=a": { "model": "biomesoplenty:origin_leaves" }, "variant=origin": { "model": "biomesoplenty:origin_leaves" },
"variant=b": { "model": "biomesoplenty:pink_cherry_leaves" }, "variant=pink_cherry": { "model": "biomesoplenty:pink_cherry_leaves" },
"variant=c": { "model": "biomesoplenty:white_cherry_leaves" }, "variant=white_cherry": { "model": "biomesoplenty:white_cherry_leaves" },
"variant=d": { "model": "biomesoplenty:maple_leaves" } "variant=maple": { "model": "biomesoplenty:maple_leaves" }
} }
} }

View file

@ -1,8 +1,8 @@
{ {
"variants": { "variants": {
"variant=a": { "model": "biomesoplenty:hellbark_leaves" }, "variant=hellbark": { "model": "biomesoplenty:hellbark_leaves" },
"variant=b": { "model": "biomesoplenty:flowering_leaves" }, "variant=flowering": { "model": "biomesoplenty:flowering_leaves" },
"variant=c": { "model": "biomesoplenty:jacaranda_leaves" }, "variant=jacaranda": { "model": "biomesoplenty:jacaranda_leaves" },
"variant=d": { "model": "biomesoplenty:sacred_oak_leaves" } "variant=sacred_oak": { "model": "biomesoplenty:sacred_oak_leaves" }
} }
} }

View file

@ -1,8 +1,8 @@
{ {
"variants": { "variants": {
"variant=a": { "model": "biomesoplenty:mangrove_leaves" }, "variant=mangrove": { "model": "biomesoplenty:mangrove_leaves" },
"variant=b": { "model": "biomesoplenty:palm_leaves" }, "variant=palm": { "model": "biomesoplenty:palm_leaves" },
"variant=c": { "model": "biomesoplenty:redwood_leaves" }, "variant=redwood": { "model": "biomesoplenty:redwood_leaves" },
"variant=d": { "model": "biomesoplenty:willow_leaves" } "variant=willow": { "model": "biomesoplenty:willow_leaves" }
} }
} }

View file

@ -1,8 +1,8 @@
{ {
"variants": { "variants": {
"variant=a": { "model": "biomesoplenty:pine_leaves" }, "variant=pine": { "model": "biomesoplenty:pine_leaves" },
"variant=b": { "model": "biomesoplenty:mahogany_leaves" }, "variant=mahogany": { "model": "biomesoplenty:mahogany_leaves" },
"variant=c": { "model": "biomesoplenty:red_big_flower_petal" }, "variant=red_big_flower": { "model": "biomesoplenty:red_big_flower_petal" },
"variant=d": { "model": "biomesoplenty:yellow_big_flower_petal" } "variant=yellow_big_flower": { "model": "biomesoplenty:yellow_big_flower_petal" }
} }
} }

View file

@ -1,21 +1,21 @@
{ {
"variants": { "variants": {
"axis=y,variant=a": { "model": "biomesoplenty:sacred_oak_log" }, "axis=y,variant=sacred_oak": { "model": "biomesoplenty:sacred_oak_log" },
"axis=z,variant=a": { "model": "biomesoplenty:sacred_oak_log_side" }, "axis=z,variant=sacred_oak": { "model": "biomesoplenty:sacred_oak_log_side" },
"axis=x,variant=a": { "model": "biomesoplenty:sacred_oak_log_side", "y": 90 }, "axis=x,variant=sacred_oak": { "model": "biomesoplenty:sacred_oak_log_side", "y": 90 },
"axis=none,variant=a": { "model": "biomesoplenty:sacred_oak_bark" }, "axis=none,variant=sacred_oak": { "model": "biomesoplenty:sacred_oak_bark" },
"axis=y,variant=b": { "model": "biomesoplenty:cherry_log" }, "axis=y,variant=cherry": { "model": "biomesoplenty:cherry_log" },
"axis=z,variant=b": { "model": "biomesoplenty:cherry_log_side" }, "axis=z,variant=cherry": { "model": "biomesoplenty:cherry_log_side" },
"axis=x,variant=b": { "model": "biomesoplenty:cherry_log_side", "y": 90 }, "axis=x,variant=cherry": { "model": "biomesoplenty:cherry_log_side", "y": 90 },
"axis=none,variant=b": { "model": "biomesoplenty:cherry_bark" }, "axis=none,variant=cherry": { "model": "biomesoplenty:cherry_bark" },
"axis=y,variant=c": { "model": "biomesoplenty:dark_log" }, "axis=y,variant=dark": { "model": "biomesoplenty:dark_log" },
"axis=z,variant=c": { "model": "biomesoplenty:dark_log_side" }, "axis=z,variant=dark": { "model": "biomesoplenty:dark_log_side" },
"axis=x,variant=c": { "model": "biomesoplenty:dark_log_side", "y": 90 }, "axis=x,variant=dark": { "model": "biomesoplenty:dark_log_side", "y": 90 },
"axis=none,variant=c": { "model": "biomesoplenty:dark_bark" }, "axis=none,variant=dark": { "model": "biomesoplenty:dark_bark" },
"axis=y,variant=d": { "model": "biomesoplenty:fir_log" }, "axis=y,variant=fir": { "model": "biomesoplenty:fir_log" },
"axis=z,variant=d": { "model": "biomesoplenty:fir_log_side" }, "axis=z,variant=fir": { "model": "biomesoplenty:fir_log_side" },
"axis=x,variant=d": { "model": "biomesoplenty:fir_log_side", "y": 90 }, "axis=x,variant=fir": { "model": "biomesoplenty:fir_log_side", "y": 90 },
"axis=none,variant=d": { "model": "biomesoplenty:fir_bark" } "axis=none,variant=fir": { "model": "biomesoplenty:fir_bark" }
} }
} }

View file

@ -1,21 +1,21 @@
{ {
"variants": { "variants": {
"axis=y,variant=a": { "model": "biomesoplenty:ethereal_log" }, "axis=y,variant=ethereal": { "model": "biomesoplenty:ethereal_log" },
"axis=z,variant=a": { "model": "biomesoplenty:ethereal_log_side" }, "axis=z,variant=ethereal": { "model": "biomesoplenty:ethereal_log_side" },
"axis=x,variant=a": { "model": "biomesoplenty:ethereal_log_side", "y": 90 }, "axis=x,variant=ethereal": { "model": "biomesoplenty:ethereal_log_side", "y": 90 },
"axis=none,variant=a": { "model": "biomesoplenty:ethereal_bark" }, "axis=none,variant=ethereal": { "model": "biomesoplenty:ethereal_bark" },
"axis=y,variant=b": { "model": "biomesoplenty:magic_log" }, "axis=y,variant=magic": { "model": "biomesoplenty:magic_log" },
"axis=z,variant=b": { "model": "biomesoplenty:magic_log_side" }, "axis=z,variant=magic": { "model": "biomesoplenty:magic_log_side" },
"axis=x,variant=b": { "model": "biomesoplenty:magic_log_side", "y": 90 }, "axis=x,variant=magic": { "model": "biomesoplenty:magic_log_side", "y": 90 },
"axis=none,variant=b": { "model": "biomesoplenty:magic_bark" }, "axis=none,variant=magic": { "model": "biomesoplenty:magic_bark" },
"axis=y,variant=c": { "model": "biomesoplenty:mangrove_log" }, "axis=y,variant=mangrove": { "model": "biomesoplenty:mangrove_log" },
"axis=z,variant=c": { "model": "biomesoplenty:mangrove_log_side" }, "axis=z,variant=mangrove": { "model": "biomesoplenty:mangrove_log_side" },
"axis=x,variant=c": { "model": "biomesoplenty:mangrove_log_side", "y": 90 }, "axis=x,variant=mangrove": { "model": "biomesoplenty:mangrove_log_side", "y": 90 },
"axis=none,variant=c": { "model": "biomesoplenty:mangrove_bark" }, "axis=none,variant=mangrove": { "model": "biomesoplenty:mangrove_bark" },
"axis=y,variant=d": { "model": "biomesoplenty:palm_log" }, "axis=y,variant=palm": { "model": "biomesoplenty:palm_log" },
"axis=z,variant=d": { "model": "biomesoplenty:palm_log_side" }, "axis=z,variant=palm": { "model": "biomesoplenty:palm_log_side" },
"axis=x,variant=d": { "model": "biomesoplenty:palm_log_side", "y": 90 }, "axis=x,variant=palm": { "model": "biomesoplenty:palm_log_side", "y": 90 },
"axis=none,variant=d": { "model": "biomesoplenty:palm_bark" } "axis=none,variant=palm": { "model": "biomesoplenty:palm_bark" }
} }
} }

View file

@ -1,21 +1,21 @@
{ {
"variants": { "variants": {
"axis=y,variant=a": { "model": "biomesoplenty:redwood_log" }, "axis=y,variant=redwood": { "model": "biomesoplenty:redwood_log" },
"axis=z,variant=a": { "model": "biomesoplenty:redwood_log_side" }, "axis=z,variant=redwood": { "model": "biomesoplenty:redwood_log_side" },
"axis=x,variant=a": { "model": "biomesoplenty:redwood_log_side", "y": 90 }, "axis=x,variant=redwood": { "model": "biomesoplenty:redwood_log_side", "y": 90 },
"axis=none,variant=a": { "model": "biomesoplenty:redwood_bark" }, "axis=none,variant=redwood": { "model": "biomesoplenty:redwood_bark" },
"axis=y,variant=b": { "model": "biomesoplenty:willow_log" }, "axis=y,variant=willow": { "model": "biomesoplenty:willow_log" },
"axis=z,variant=b": { "model": "biomesoplenty:willow_log_side" }, "axis=z,variant=willow": { "model": "biomesoplenty:willow_log_side" },
"axis=x,variant=b": { "model": "biomesoplenty:willow_log_side", "y": 90 }, "axis=x,variant=willow": { "model": "biomesoplenty:willow_log_side", "y": 90 },
"axis=none,variant=b": { "model": "biomesoplenty:willow_bark" }, "axis=none,variant=willow": { "model": "biomesoplenty:willow_bark" },
"axis=y,variant=c": { "model": "biomesoplenty:pine_log" }, "axis=y,variant=pine": { "model": "biomesoplenty:pine_log" },
"axis=z,variant=c": { "model": "biomesoplenty:pine_log_side" }, "axis=z,variant=pine": { "model": "biomesoplenty:pine_log_side" },
"axis=x,variant=c": { "model": "biomesoplenty:pine_log_side", "y": 90 }, "axis=x,variant=pine": { "model": "biomesoplenty:pine_log_side", "y": 90 },
"axis=none,variant=c": { "model": "biomesoplenty:pine_bark" }, "axis=none,variant=pine": { "model": "biomesoplenty:pine_bark" },
"axis=y,variant=d": { "model": "biomesoplenty:hell_bark_log" }, "axis=y,variant=hell_bark": { "model": "biomesoplenty:hell_bark_log" },
"axis=z,variant=d": { "model": "biomesoplenty:hell_bark_log_side" }, "axis=z,variant=hell_bark": { "model": "biomesoplenty:hell_bark_log_side" },
"axis=x,variant=d": { "model": "biomesoplenty:hell_bark_log_side", "y": 90 }, "axis=x,variant=hell_bark": { "model": "biomesoplenty:hell_bark_log_side", "y": 90 },
"axis=none,variant=d": { "model": "biomesoplenty:hell_bark_bark" } "axis=none,variant=hell_bark": { "model": "biomesoplenty:hell_bark_bark" }
} }
} }

View file

@ -1,21 +1,21 @@
{ {
"variants": { "variants": {
"axis=y,variant=a": { "model": "biomesoplenty:jacaranda_log" }, "axis=y,variant=jacaranda": { "model": "biomesoplenty:jacaranda_log" },
"axis=z,variant=a": { "model": "biomesoplenty:jacaranda_log_side" }, "axis=z,variant=jacaranda": { "model": "biomesoplenty:jacaranda_log_side" },
"axis=x,variant=a": { "model": "biomesoplenty:jacaranda_log_side", "y": 90 }, "axis=x,variant=jacaranda": { "model": "biomesoplenty:jacaranda_log_side", "y": 90 },
"axis=none,variant=a": { "model": "biomesoplenty:jacaranda_bark" }, "axis=none,variant=jacaranda": { "model": "biomesoplenty:jacaranda_bark" },
"axis=y,variant=b": { "model": "biomesoplenty:mahogany_log" }, "axis=y,variant=mahogany": { "model": "biomesoplenty:mahogany_log" },
"axis=z,variant=b": { "model": "biomesoplenty:mahogany_log_side" }, "axis=z,variant=mahogany": { "model": "biomesoplenty:mahogany_log_side" },
"axis=x,variant=b": { "model": "biomesoplenty:mahogany_log_side", "y": 90 }, "axis=x,variant=mahogany": { "model": "biomesoplenty:mahogany_log_side", "y": 90 },
"axis=none,variant=b": { "model": "biomesoplenty:mahogany_bark" }, "axis=none,variant=mahogany": { "model": "biomesoplenty:mahogany_bark" },
"axis=y,variant=c": { "model": "biomesoplenty:giant_flower_stem" }, "axis=y,variant=giant_flower": { "model": "biomesoplenty:giant_flower_stem" },
"axis=z,variant=c": { "model": "biomesoplenty:giant_flower_stem_side" }, "axis=z,variant=giant_flower": { "model": "biomesoplenty:giant_flower_stem_side" },
"axis=x,variant=c": { "model": "biomesoplenty:giant_flower_stem_side", "y": 90 }, "axis=x,variant=giant_flower": { "model": "biomesoplenty:giant_flower_stem_side", "y": 90 },
"axis=none,variant=c": { "model": "biomesoplenty:giant_flower_bark" }, "axis=none,variant=giant_flower": { "model": "biomesoplenty:giant_flower_bark" },
"axis=y,variant=d": { "model": "biomesoplenty:dead_log" }, "axis=y,variant=dead": { "model": "biomesoplenty:dead_log" },
"axis=z,variant=d": { "model": "biomesoplenty:dead_log_side" }, "axis=z,variant=dead": { "model": "biomesoplenty:dead_log_side" },
"axis=x,variant=d": { "model": "biomesoplenty:dead_log_side", "y": 90 }, "axis=x,variant=dead": { "model": "biomesoplenty:dead_log_side", "y": 90 },
"axis=none,variant=d": { "model": "biomesoplenty:dead_bark" } "axis=none,variant=dead": { "model": "biomesoplenty:dead_bark" }
} }
} }

View file

@ -1,20 +1,18 @@
{ {
"variants": { "variants": {
"variant=a": { "model": "biomesoplenty:sacred_oak_planks" }, "variant=sacred_oak": { "model": "biomesoplenty:sacred_oak_planks" },
"variant=b": { "model": "biomesoplenty:cherry_planks" }, "variant=cherry": { "model": "biomesoplenty:cherry_planks" },
"variant=c": { "model": "biomesoplenty:dark_planks" }, "variant=dark": { "model": "biomesoplenty:dark_planks" },
"variant=d": { "model": "biomesoplenty:fir_planks" }, "variant=fir": { "model": "biomesoplenty:fir_planks" },
"variant=e": { "model": "biomesoplenty:ethereal_planks" }, "variant=ethereal": { "model": "biomesoplenty:ethereal_planks" },
"variant=f": { "model": "biomesoplenty:magic_planks" }, "variant=magic": { "model": "biomesoplenty:magic_planks" },
"variant=g": { "model": "biomesoplenty:mangrove_planks" }, "variant=mangrove": { "model": "biomesoplenty:mangrove_planks" },
"variant=h": { "model": "biomesoplenty:palm_planks" }, "variant=palm": { "model": "biomesoplenty:palm_planks" },
"variant=i": { "model": "biomesoplenty:redwood_planks" }, "variant=redwood": { "model": "biomesoplenty:redwood_planks" },
"variant=j": { "model": "biomesoplenty:willow_planks" }, "variant=willow": { "model": "biomesoplenty:willow_planks" },
"variant=k": { "model": "biomesoplenty:pine_planks" }, "variant=pine": { "model": "biomesoplenty:pine_planks" },
"variant=l": { "model": "biomesoplenty:hell_bark_planks" }, "variant=hell_bark": { "model": "biomesoplenty:hell_bark_planks" },
"variant=m": { "model": "biomesoplenty:jacaranda_planks" }, "variant=jacaranda": { "model": "biomesoplenty:jacaranda_planks" },
"variant=n": { "model": "biomesoplenty:mahogany_planks" }, "variant=mahogany": { "model": "biomesoplenty:mahogany_planks" }
"variant=o": { "model": "biomesoplenty:giant_flower_planks" },
"variant=p": { "model": "biomesoplenty:dead_planks" }
} }
} }

View file

@ -1,12 +1,12 @@
{ {
"variants": { "variants": {
"variant=a": { "model": "biomesoplenty:yellow_autumn_sapling" }, "variant=yellow_autumn": { "model": "biomesoplenty:yellow_autumn_sapling" },
"variant=b": { "model": "biomesoplenty:orange_autumn_sapling" }, "variant=orange_autumn": { "model": "biomesoplenty:orange_autumn_sapling" },
"variant=c": { "model": "biomesoplenty:bamboo_sapling" }, "variant=bamboo": { "model": "biomesoplenty:bamboo_sapling" },
"variant=d": { "model": "biomesoplenty:magic_sapling" }, "variant=magic": { "model": "biomesoplenty:magic_sapling" },
"variant=e": { "model": "biomesoplenty:dark_sapling" }, "variant=dark": { "model": "biomesoplenty:dark_sapling" },
"variant=f": { "model": "biomesoplenty:dead_sapling" }, "variant=dead": { "model": "biomesoplenty:dead_sapling" },
"variant=g": { "model": "biomesoplenty:fir_sapling" }, "variant=fir": { "model": "biomesoplenty:fir_sapling" },
"variant=h": { "model": "biomesoplenty:ethereal_sapling" } "variant=ethereal": { "model": "biomesoplenty:ethereal_sapling" }
} }
} }

View file

@ -1,12 +1,12 @@
{ {
"variants": { "variants": {
"variant=a": { "model": "biomesoplenty:origin_sapling" }, "variant=origin": { "model": "biomesoplenty:origin_sapling" },
"variant=b": { "model": "biomesoplenty:pink_cherry_sapling" }, "variant=pink_cherry": { "model": "biomesoplenty:pink_cherry_sapling" },
"variant=c": { "model": "biomesoplenty:white_cherry_sapling" }, "variant=white_cherry": { "model": "biomesoplenty:white_cherry_sapling" },
"variant=d": { "model": "biomesoplenty:maple_sapling" }, "variant=maple": { "model": "biomesoplenty:maple_sapling" },
"variant=e": { "model": "biomesoplenty:hellbark_sapling" }, "variant=hellbark": { "model": "biomesoplenty:hellbark_sapling" },
"variant=f": { "model": "biomesoplenty:flowering_sapling" }, "variant=flowering": { "model": "biomesoplenty:flowering_sapling" },
"variant=g": { "model": "biomesoplenty:jacaranda_sapling" }, "variant=jacaranda": { "model": "biomesoplenty:jacaranda_sapling" },
"variant=h": { "model": "biomesoplenty:sacred_oak_sapling" } "variant=sacred_oak": { "model": "biomesoplenty:sacred_oak_sapling" }
} }
} }

View file

@ -1,12 +1,10 @@
{ {
"variants": { "variants": {
"variant=a": { "model": "biomesoplenty:mangrove_sapling" }, "variant=mangrove": { "model": "biomesoplenty:mangrove_sapling" },
"variant=b": { "model": "biomesoplenty:palm_sapling" }, "variant=palm": { "model": "biomesoplenty:palm_sapling" },
"variant=c": { "model": "biomesoplenty:redwood_sapling" }, "variant=redwood": { "model": "biomesoplenty:redwood_sapling" },
"variant=d": { "model": "biomesoplenty:willow_sapling" }, "variant=willow": { "model": "biomesoplenty:willow_sapling" },
"variant=e": { "model": "biomesoplenty:pine_sapling" }, "variant=pine": { "model": "biomesoplenty:pine_sapling" },
"variant=f": { "model": "biomesoplenty:mahogany_sapling" }, "variant=mahogany": { "model": "biomesoplenty:mahogany_sapling" }
"variant=g": { "model": "biomesoplenty:red_big_flower_sapling" },
"variant=h": { "model": "biomesoplenty:yellow_big_flower_sapling" }
} }
} }

View file

@ -0,0 +1,20 @@
{
"variants": {
"half=bottom,variant=sacred_oak": { "model": "biomesoplenty:half_slab_sacred_oak" },
"half=top,variant=sacred_oak": { "model": "biomesoplenty:upper_slab_sacred_oak" },
"half=bottom,variant=cherry": { "model": "biomesoplenty:half_slab_cherry" },
"half=top,variant=cherry": { "model": "biomesoplenty:upper_slab_cherry" },
"half=bottom,variant=dark": { "model": "biomesoplenty:half_slab_dark" },
"half=top,variant=dark": { "model": "biomesoplenty:upper_slab_dark" },
"half=bottom,variant=fir": { "model": "biomesoplenty:half_slab_fir" },
"half=top,variant=fir": { "model": "biomesoplenty:upper_slab_fir" },
"half=bottom,variant=ethereal": { "model": "biomesoplenty:half_slab_ethereal" },
"half=top,variant=ethereal": { "model": "biomesoplenty:upper_slab_ethereal" },
"half=bottom,variant=magic": { "model": "biomesoplenty:half_slab_magic" },
"half=top,variant=magic": { "model": "biomesoplenty:upper_slab_magic" },
"half=bottom,variant=mangrove": { "model": "biomesoplenty:half_slab_mangrove" },
"half=top,variant=mangrove": { "model": "biomesoplenty:upper_slab_mangrove" },
"half=bottom,variant=palm": { "model": "biomesoplenty:half_slab_palm" },
"half=top,variant=palm": { "model": "biomesoplenty:upper_slab_palm" }
}
}

View file

@ -0,0 +1,16 @@
{
"variants": {
"half=bottom,variant=redwood": { "model": "biomesoplenty:half_slab_redwood" },
"half=top,variant=redwood": { "model": "biomesoplenty:upper_slab_redwood" },
"half=bottom,variant=willow": { "model": "biomesoplenty:half_slab_willow" },
"half=top,variant=willow": { "model": "biomesoplenty:upper_slab_willow" },
"half=bottom,variant=pine": { "model": "biomesoplenty:half_slab_pine" },
"half=top,variant=pine": { "model": "biomesoplenty:upper_slab_pine" },
"half=bottom,variant=hell_bark": { "model": "biomesoplenty:half_slab_hell_bark" },
"half=top,variant=hell_bark": { "model": "biomesoplenty:upper_slab_hell_bark" },
"half=bottom,variant=jacaranda": { "model": "biomesoplenty:half_slab_jacaranda" },
"half=top,variant=jacaranda": { "model": "biomesoplenty:upper_slab_jacaranda" },
"half=bottom,variant=mahogany": { "model": "biomesoplenty:half_slab_mahogany" },
"half=top,variant=mahogany": { "model": "biomesoplenty:upper_slab_mahogany" }
}
}

View file

@ -1,6 +0,0 @@
{
"parent": "block/cube_all",
"textures": {
"all": "biomesoplenty:blocks/dead_planks"
}
}

View file

@ -1,6 +0,0 @@
{
"parent": "block/cube_all",
"textures": {
"all": "biomesoplenty:blocks/giant_flower_planks"
}
}

View file

@ -1,8 +0,0 @@
{
"parent": "block/half_slab",
"textures": {
"bottom": "biomesoplenty:blocks/dead_planks",
"top": "biomesoplenty:blocks/dead_planks",
"side": "biomesoplenty:blocks/dead_planks"
}
}

View file

@ -1,8 +0,0 @@
{
"parent": "block/half_slab",
"textures": {
"bottom": "biomesoplenty:blocks/giant_flower_planks",
"top": "biomesoplenty:blocks/giant_flower_planks",
"side": "biomesoplenty:blocks/giant_flower_planks"
}
}

View file

@ -1,6 +0,0 @@
{
"parent": "block/cross",
"textures": {
"cross": "biomesoplenty:blocks/sapling_red_big_flower"
}
}

View file

@ -1,8 +0,0 @@
{
"parent": "block/upper_slab",
"textures": {
"bottom": "biomesoplenty:blocks/dead_planks",
"top": "biomesoplenty:blocks/dead_planks",
"side": "biomesoplenty:blocks/dead_planks"
}
}

View file

@ -1,8 +0,0 @@
{
"parent": "block/upper_slab",
"textures": {
"bottom": "biomesoplenty:blocks/giant_flower_planks",
"top": "biomesoplenty:blocks/giant_flower_planks",
"side": "biomesoplenty:blocks/giant_flower_planks"
}
}

View file

@ -1,6 +0,0 @@
{
"parent": "block/cross",
"textures": {
"cross": "biomesoplenty:blocks/sapling_yellow_big_flower"
}
}