Work on updating blocks... Down to 737
This commit is contained in:
parent
f7e8d3a293
commit
ebbf1cd592
28 changed files with 77 additions and 51 deletions
|
@ -16,6 +16,8 @@ import net.minecraft.block.SoundType;
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.block.properties.IProperty;
|
import net.minecraft.block.properties.IProperty;
|
||||||
import net.minecraft.block.properties.PropertyInteger;
|
import net.minecraft.block.properties.PropertyInteger;
|
||||||
|
import net.minecraft.block.state.BlockStateBase;
|
||||||
|
import net.minecraft.block.state.BlockStateContainer;
|
||||||
import net.minecraft.block.state.IBlockState;
|
import net.minecraft.block.state.IBlockState;
|
||||||
import net.minecraft.init.Blocks;
|
import net.minecraft.init.Blocks;
|
||||||
import net.minecraft.util.EnumFacing;
|
import net.minecraft.util.EnumFacing;
|
||||||
|
@ -32,7 +34,7 @@ public class BlockBOPBamboo extends BlockBOPDecoration
|
||||||
// add properties
|
// add properties
|
||||||
public static final PropertyInteger AGE = PropertyInteger.create("age", 0, 15);
|
public static final PropertyInteger AGE = PropertyInteger.create("age", 0, 15);
|
||||||
@Override
|
@Override
|
||||||
protected BlockState createBlockState() {return new BlockState(this, new IProperty[] { AGE });}
|
protected BlockStateContainer createBlockState() {return new BlockStateContainer(this, new IProperty[] { AGE });}
|
||||||
|
|
||||||
|
|
||||||
public BlockBOPBamboo()
|
public BlockBOPBamboo()
|
||||||
|
|
|
@ -19,6 +19,7 @@ import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.SoundType;
|
import net.minecraft.block.SoundType;
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.block.state.IBlockState;
|
import net.minecraft.block.state.IBlockState;
|
||||||
|
import net.minecraft.init.Biomes;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
@ -47,16 +48,16 @@ public class BlockBOPBiomeBlock extends BlockBOPGeneric
|
||||||
|
|
||||||
List<BiomeGenBase> vanillaBiomesToExclude = Arrays.asList(
|
List<BiomeGenBase> vanillaBiomesToExclude = Arrays.asList(
|
||||||
new BiomeGenBase[] {
|
new BiomeGenBase[] {
|
||||||
BiomeGenBase.sky,
|
Biomes.sky,
|
||||||
BiomeGenBase.hell,
|
Biomes.hell,
|
||||||
BiomeGenBase.beach,
|
Biomes.beach,
|
||||||
BiomeGenBase.coldBeach,
|
Biomes.coldBeach,
|
||||||
BiomeGenBase.stoneBeach,
|
Biomes.stoneBeach,
|
||||||
BiomeGenBase.ocean,
|
Biomes.ocean,
|
||||||
BiomeGenBase.frozenOcean,
|
Biomes.frozenOcean,
|
||||||
BiomeGenBase.deepOcean,
|
Biomes.deepOcean,
|
||||||
BiomeGenBase.river,
|
Biomes.river,
|
||||||
BiomeGenBase.frozenRiver
|
Biomes.frozenRiver
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -15,6 +15,7 @@ import net.minecraft.block.SoundType;
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.block.properties.IProperty;
|
import net.minecraft.block.properties.IProperty;
|
||||||
import net.minecraft.block.properties.PropertyEnum;
|
import net.minecraft.block.properties.PropertyEnum;
|
||||||
|
import net.minecraft.block.state.BlockStateContainer;
|
||||||
import net.minecraft.block.state.IBlockState;
|
import net.minecraft.block.state.IBlockState;
|
||||||
import net.minecraft.entity.EntityLivingBase;
|
import net.minecraft.entity.EntityLivingBase;
|
||||||
import net.minecraft.item.ItemBlock;
|
import net.minecraft.item.ItemBlock;
|
||||||
|
@ -49,7 +50,7 @@ public class BlockBOPBones extends Block implements IBOPBlock
|
||||||
public static final PropertyEnum VARIANT = PropertyEnum.create("variant", BoneType.class);
|
public static final PropertyEnum VARIANT = PropertyEnum.create("variant", BoneType.class);
|
||||||
public static final PropertyEnum AXIS = PropertyEnum.create("axis", EnumFacing.Axis.class);
|
public static final PropertyEnum AXIS = PropertyEnum.create("axis", EnumFacing.Axis.class);
|
||||||
@Override
|
@Override
|
||||||
protected BlockState createBlockState() {return new BlockState(this, new IProperty[] { AXIS, VARIANT });}
|
protected BlockStateContainer createBlockState() {return new BlockStateContainer(this, new IProperty[] { AXIS, VARIANT });}
|
||||||
|
|
||||||
|
|
||||||
// implement IBOPBlock
|
// implement IBOPBlock
|
||||||
|
|
|
@ -11,11 +11,11 @@ package biomesoplenty.common.block;
|
||||||
import static net.minecraft.block.BlockLiquid.LEVEL;
|
import static net.minecraft.block.BlockLiquid.LEVEL;
|
||||||
|
|
||||||
import biomesoplenty.api.block.BlockQueries;
|
import biomesoplenty.api.block.BlockQueries;
|
||||||
import net.minecraft.block.Block;
|
|
||||||
import net.minecraft.block.SoundType;
|
import net.minecraft.block.SoundType;
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.block.properties.IProperty;
|
import net.minecraft.block.properties.IProperty;
|
||||||
import net.minecraft.block.properties.PropertyEnum;
|
import net.minecraft.block.properties.PropertyEnum;
|
||||||
|
import net.minecraft.block.state.BlockStateContainer;
|
||||||
import net.minecraft.block.state.IBlockState;
|
import net.minecraft.block.state.IBlockState;
|
||||||
import net.minecraft.util.IStringSerializable;
|
import net.minecraft.util.IStringSerializable;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
@ -41,7 +41,7 @@ public class BlockBOPCoral extends BlockBOPDecoration
|
||||||
};
|
};
|
||||||
public static PropertyEnum VARIANT = PropertyEnum.create("variant", CoralType.class);
|
public static PropertyEnum VARIANT = PropertyEnum.create("variant", CoralType.class);
|
||||||
@Override
|
@Override
|
||||||
protected BlockState createBlockState() {return new BlockState(this, new IProperty[] { LEVEL, VARIANT });}
|
protected BlockStateContainer createBlockState() {return new BlockStateContainer(this, new IProperty[] { LEVEL, VARIANT });}
|
||||||
|
|
||||||
// implement IBOPBlock
|
// implement IBOPBlock
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -21,6 +21,7 @@ import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.block.properties.IProperty;
|
import net.minecraft.block.properties.IProperty;
|
||||||
import net.minecraft.block.properties.PropertyBool;
|
import net.minecraft.block.properties.PropertyBool;
|
||||||
import net.minecraft.block.properties.PropertyEnum;
|
import net.minecraft.block.properties.PropertyEnum;
|
||||||
|
import net.minecraft.block.state.BlockStateContainer;
|
||||||
import net.minecraft.block.state.IBlockState;
|
import net.minecraft.block.state.IBlockState;
|
||||||
import net.minecraft.init.Blocks;
|
import net.minecraft.init.Blocks;
|
||||||
import net.minecraft.item.ItemBlock;
|
import net.minecraft.item.ItemBlock;
|
||||||
|
@ -51,7 +52,7 @@ public class BlockBOPDirt extends Block implements IBOPBlock, ISustainsPlantType
|
||||||
public static final PropertyEnum VARIANT = PropertyEnum.create("variant", BOPDirtType.class);
|
public static final PropertyEnum VARIANT = PropertyEnum.create("variant", BOPDirtType.class);
|
||||||
public static final PropertyBool COARSE = PropertyBool.create("coarse");
|
public static final PropertyBool COARSE = PropertyBool.create("coarse");
|
||||||
@Override
|
@Override
|
||||||
protected BlockState createBlockState() {return new BlockState(this, new IProperty[] { COARSE, VARIANT });}
|
protected BlockStateContainer createBlockState() {return new BlockStateContainer(this, new IProperty[] { COARSE, VARIANT });}
|
||||||
|
|
||||||
// implement IBOPBlock
|
// implement IBOPBlock
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -14,6 +14,7 @@ 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;
|
||||||
import net.minecraft.block.properties.PropertyEnum;
|
import net.minecraft.block.properties.PropertyEnum;
|
||||||
|
import net.minecraft.block.state.BlockStateContainer;
|
||||||
import net.minecraft.block.state.IBlockState;
|
import net.minecraft.block.state.IBlockState;
|
||||||
import net.minecraft.entity.EntityLivingBase;
|
import net.minecraft.entity.EntityLivingBase;
|
||||||
import net.minecraft.init.Blocks;
|
import net.minecraft.init.Blocks;
|
||||||
|
@ -43,7 +44,7 @@ public class BlockBOPDoubleDecoration extends BlockBOPDecoration {
|
||||||
};
|
};
|
||||||
public static final PropertyEnum HALF = PropertyEnum.create("half", Half.class);
|
public static final PropertyEnum HALF = PropertyEnum.create("half", Half.class);
|
||||||
@Override
|
@Override
|
||||||
protected BlockState createBlockState() {return new BlockState(this, new IProperty[] { HALF });}
|
protected BlockStateContainer createBlockState() {return new BlockStateContainer(this, new IProperty[] { HALF });}
|
||||||
@Override
|
@Override
|
||||||
public IProperty[] getNonRenderingProperties() { return null; }
|
public IProperty[] getNonRenderingProperties() { return null; }
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@ import biomesoplenty.common.enums.BOPPlants;
|
||||||
import biomesoplenty.common.util.block.BlockStateUtils;
|
import biomesoplenty.common.util.block.BlockStateUtils;
|
||||||
import net.minecraft.block.properties.IProperty;
|
import net.minecraft.block.properties.IProperty;
|
||||||
import net.minecraft.block.properties.PropertyEnum;
|
import net.minecraft.block.properties.PropertyEnum;
|
||||||
import net.minecraft.block.state.BlockStateBase;
|
import net.minecraft.block.state.BlockStateContainer;
|
||||||
import net.minecraft.block.state.IBlockState;
|
import net.minecraft.block.state.IBlockState;
|
||||||
import net.minecraft.creativetab.CreativeTabs;
|
import net.minecraft.creativetab.CreativeTabs;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
@ -57,7 +57,7 @@ public class BlockBOPDoublePlant extends BlockBOPDoubleDecoration implements ISh
|
||||||
};
|
};
|
||||||
public static final PropertyEnum VARIANT = PropertyEnum.create("variant", DoublePlantType.class);
|
public static final PropertyEnum VARIANT = PropertyEnum.create("variant", DoublePlantType.class);
|
||||||
@Override
|
@Override
|
||||||
protected BlockState createBlockState() {return new BlockStateBase(this, new IProperty[] { HALF, VARIANT });}
|
protected BlockStateContainer createBlockState() {return new BlockStateContainer(this, new IProperty[] { HALF, VARIANT });}
|
||||||
|
|
||||||
|
|
||||||
// implement IBOPBlock
|
// implement IBOPBlock
|
||||||
|
|
|
@ -18,8 +18,10 @@ import biomesoplenty.common.enums.BOPWoods;
|
||||||
import biomesoplenty.common.util.block.BlockStateUtils;
|
import biomesoplenty.common.util.block.BlockStateUtils;
|
||||||
import biomesoplenty.common.util.block.VariantPagingHelper;
|
import biomesoplenty.common.util.block.VariantPagingHelper;
|
||||||
import net.minecraft.block.BlockSlab;
|
import net.minecraft.block.BlockSlab;
|
||||||
|
import net.minecraft.block.SoundType;
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.block.properties.IProperty;
|
import net.minecraft.block.properties.IProperty;
|
||||||
|
import net.minecraft.block.state.BlockStateContainer;
|
||||||
import net.minecraft.block.state.IBlockState;
|
import net.minecraft.block.state.IBlockState;
|
||||||
import net.minecraft.creativetab.CreativeTabs;
|
import net.minecraft.creativetab.CreativeTabs;
|
||||||
import net.minecraft.init.Blocks;
|
import net.minecraft.init.Blocks;
|
||||||
|
@ -64,10 +66,10 @@ public class BlockBOPDoubleWoodSlab extends BlockSlab implements IBOPBlock
|
||||||
|
|
||||||
// add properties (note we inherit HALF property from parent BlockSlab)
|
// add properties (note we inherit HALF property from parent BlockSlab)
|
||||||
@Override
|
@Override
|
||||||
protected BlockState createBlockState()
|
protected BlockStateContainer createBlockState()
|
||||||
{
|
{
|
||||||
this.variantProperty = currentVariantProperty; // get from static variable
|
this.variantProperty = currentVariantProperty; // get from static variable
|
||||||
return new BlockState(this, new IProperty[] { HALF, this.variantProperty });
|
return new BlockStateContainer(this, new IProperty[] { HALF, this.variantProperty });
|
||||||
}
|
}
|
||||||
|
|
||||||
// implement IBOPBlock
|
// implement IBOPBlock
|
||||||
|
@ -90,7 +92,7 @@ public class BlockBOPDoubleWoodSlab extends BlockSlab implements IBOPBlock
|
||||||
{
|
{
|
||||||
super(Material.wood);
|
super(Material.wood);
|
||||||
this.useNeighborBrightness = true;
|
this.useNeighborBrightness = true;
|
||||||
this.setHardness(2.0F).setResistance(5.0F).setStepSound(soundTypeWood);
|
this.setHardness(2.0F).setResistance(5.0F).setStepSound(SoundType.WOOD);
|
||||||
this.setHarvestLevel("axe", 0);
|
this.setHarvestLevel("axe", 0);
|
||||||
this.setDefaultState(this.blockState.getBaseState().withProperty(HALF, BlockSlab.EnumBlockHalf.BOTTOM));
|
this.setDefaultState(this.blockState.getBaseState().withProperty(HALF, BlockSlab.EnumBlockHalf.BOTTOM));
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,6 +20,7 @@ import net.minecraft.block.BlockFarmland;
|
||||||
import net.minecraft.block.SoundType;
|
import net.minecraft.block.SoundType;
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.block.properties.IProperty;
|
import net.minecraft.block.properties.IProperty;
|
||||||
|
import net.minecraft.block.state.BlockStateContainer;
|
||||||
import net.minecraft.block.state.IBlockState;
|
import net.minecraft.block.state.IBlockState;
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.entity.EntityLivingBase;
|
import net.minecraft.entity.EntityLivingBase;
|
||||||
|
@ -54,10 +55,10 @@ public class BlockBOPFarmland extends BlockFarmland implements IBOPBlock
|
||||||
public IProperty variantProperty;
|
public IProperty variantProperty;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected BlockState createBlockState()
|
protected BlockStateContainer createBlockState()
|
||||||
{
|
{
|
||||||
this.variantProperty = currentVariantProperty;
|
this.variantProperty = currentVariantProperty;
|
||||||
return new BlockState(this, new IProperty[] { MOISTURE, this.variantProperty });
|
return new BlockStateContainer(this, new IProperty[] { MOISTURE, this.variantProperty });
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -19,6 +19,7 @@ import biomesoplenty.common.item.ItemBOPFlower;
|
||||||
import biomesoplenty.common.util.block.VariantPagingHelper;
|
import biomesoplenty.common.util.block.VariantPagingHelper;
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.properties.IProperty;
|
import net.minecraft.block.properties.IProperty;
|
||||||
|
import net.minecraft.block.state.BlockStateContainer;
|
||||||
import net.minecraft.block.state.IBlockState;
|
import net.minecraft.block.state.IBlockState;
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.entity.EntityLivingBase;
|
import net.minecraft.entity.EntityLivingBase;
|
||||||
|
@ -68,10 +69,10 @@ public class BlockBOPFlower extends BlockBOPDecoration implements IShearable
|
||||||
public IProperty variantProperty;
|
public IProperty variantProperty;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected BlockState createBlockState()
|
protected BlockStateContainer createBlockState()
|
||||||
{
|
{
|
||||||
this.variantProperty = currentVariantProperty; // get from static variable
|
this.variantProperty = currentVariantProperty; // get from static variable
|
||||||
return new BlockState(this, new IProperty[] { this.variantProperty });
|
return new BlockStateContainer(this, new IProperty[] { this.variantProperty });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -16,6 +16,7 @@ import net.minecraft.block.SoundType;
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.block.properties.IProperty;
|
import net.minecraft.block.properties.IProperty;
|
||||||
import net.minecraft.block.properties.PropertyEnum;
|
import net.minecraft.block.properties.PropertyEnum;
|
||||||
|
import net.minecraft.block.state.BlockStateContainer;
|
||||||
import net.minecraft.block.state.IBlockState;
|
import net.minecraft.block.state.IBlockState;
|
||||||
import net.minecraft.item.ItemBlock;
|
import net.minecraft.item.ItemBlock;
|
||||||
|
|
||||||
|
@ -24,7 +25,7 @@ public class BlockBOPGem extends Block implements IBOPBlock
|
||||||
// add properties
|
// add properties
|
||||||
public static final PropertyEnum VARIANT = PropertyEnum.create("variant", BOPGems.class);
|
public static final PropertyEnum VARIANT = PropertyEnum.create("variant", BOPGems.class);
|
||||||
@Override
|
@Override
|
||||||
protected BlockState createBlockState() {return new BlockState(this, new IProperty[] { VARIANT });}
|
protected BlockStateContainer createBlockState() {return new BlockStateContainer(this, new IProperty[] { VARIANT });}
|
||||||
|
|
||||||
|
|
||||||
// implement IBOPBlock
|
// implement IBOPBlock
|
||||||
|
|
|
@ -21,6 +21,7 @@ import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.SoundType;
|
import net.minecraft.block.SoundType;
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.block.properties.IProperty;
|
import net.minecraft.block.properties.IProperty;
|
||||||
|
import net.minecraft.block.state.BlockStateContainer;
|
||||||
import net.minecraft.block.state.IBlockState;
|
import net.minecraft.block.state.IBlockState;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemBlock;
|
import net.minecraft.item.ItemBlock;
|
||||||
|
@ -34,7 +35,7 @@ public class BlockBOPGemOre extends Block implements IBOPBlock
|
||||||
|
|
||||||
// add properties (note VARIANT is imported statically from the BlockGem class)
|
// add properties (note VARIANT is imported statically from the BlockGem class)
|
||||||
@Override
|
@Override
|
||||||
protected BlockState createBlockState() {return new BlockState(this, new IProperty[] { VARIANT });}
|
protected BlockStateContainer createBlockState() {return new BlockStateContainer(this, new IProperty[] { VARIANT });}
|
||||||
|
|
||||||
|
|
||||||
// implement IBOPBlock
|
// implement IBOPBlock
|
||||||
|
|
|
@ -22,6 +22,7 @@ import net.minecraft.block.SoundType;
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.block.properties.IProperty;
|
import net.minecraft.block.properties.IProperty;
|
||||||
import net.minecraft.block.properties.PropertyEnum;
|
import net.minecraft.block.properties.PropertyEnum;
|
||||||
|
import net.minecraft.block.state.BlockStateContainer;
|
||||||
import net.minecraft.block.state.IBlockState;
|
import net.minecraft.block.state.IBlockState;
|
||||||
import net.minecraft.client.particle.EffectRenderer;
|
import net.minecraft.client.particle.EffectRenderer;
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
|
@ -61,7 +62,7 @@ public class BlockBOPGrass extends BlockGrass implements IBOPBlock, ISustainsPla
|
||||||
};
|
};
|
||||||
public static final PropertyEnum VARIANT = PropertyEnum.create("variant", BOPGrassType.class);
|
public static final PropertyEnum VARIANT = PropertyEnum.create("variant", BOPGrassType.class);
|
||||||
@Override
|
@Override
|
||||||
protected BlockState createBlockState() {return new BlockState(this, new IProperty[] { SNOWY, VARIANT });}
|
protected BlockStateContainer createBlockState() {return new BlockStateContainer(this, new IProperty[] { SNOWY, VARIANT });}
|
||||||
|
|
||||||
|
|
||||||
// implement IBOPBlock
|
// implement IBOPBlock
|
||||||
|
|
|
@ -19,6 +19,7 @@ import net.minecraft.block.BlockSlab;
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.block.properties.IProperty;
|
import net.minecraft.block.properties.IProperty;
|
||||||
import net.minecraft.block.properties.PropertyEnum;
|
import net.minecraft.block.properties.PropertyEnum;
|
||||||
|
import net.minecraft.block.state.BlockStateContainer;
|
||||||
import net.minecraft.block.state.IBlockState;
|
import net.minecraft.block.state.IBlockState;
|
||||||
import net.minecraft.creativetab.CreativeTabs;
|
import net.minecraft.creativetab.CreativeTabs;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
|
@ -66,7 +67,7 @@ public class BlockBOPHalfOtherSlab extends BlockSlab implements IBOPBlock
|
||||||
// add properties (note we inherit HALF property from parent BlockSlab)
|
// add properties (note we inherit HALF property from parent BlockSlab)
|
||||||
public static final PropertyEnum VARIANT = PropertyEnum.create("variant", SlabType.class);
|
public static final PropertyEnum VARIANT = PropertyEnum.create("variant", SlabType.class);
|
||||||
@Override
|
@Override
|
||||||
protected BlockState createBlockState() {return new BlockState(this, new IProperty[] { HALF, VARIANT });}
|
protected BlockStateContainer createBlockState() {return new BlockStateContainer(this, new IProperty[] { HALF, VARIANT });}
|
||||||
|
|
||||||
|
|
||||||
// implement IBOPBlock
|
// implement IBOPBlock
|
||||||
|
|
|
@ -20,6 +20,7 @@ import net.minecraft.block.BlockSlab;
|
||||||
import net.minecraft.block.SoundType;
|
import net.minecraft.block.SoundType;
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.block.properties.IProperty;
|
import net.minecraft.block.properties.IProperty;
|
||||||
|
import net.minecraft.block.state.BlockStateContainer;
|
||||||
import net.minecraft.block.state.IBlockState;
|
import net.minecraft.block.state.IBlockState;
|
||||||
import net.minecraft.creativetab.CreativeTabs;
|
import net.minecraft.creativetab.CreativeTabs;
|
||||||
import net.minecraft.init.Blocks;
|
import net.minecraft.init.Blocks;
|
||||||
|
@ -64,10 +65,10 @@ public class BlockBOPHalfWoodSlab extends BlockSlab implements IBOPBlock
|
||||||
|
|
||||||
// add properties (note we inherit HALF property from parent BlockSlab)
|
// add properties (note we inherit HALF property from parent BlockSlab)
|
||||||
@Override
|
@Override
|
||||||
protected BlockState createBlockState()
|
protected BlockStateContainer createBlockState()
|
||||||
{
|
{
|
||||||
this.variantProperty = currentVariantProperty; // get from static variable
|
this.variantProperty = currentVariantProperty; // get from static variable
|
||||||
return new BlockState(this, new IProperty[] { HALF, this.variantProperty });
|
return new BlockStateContainer(this, new IProperty[] { HALF, this.variantProperty });
|
||||||
}
|
}
|
||||||
|
|
||||||
// implement IBOPBlock
|
// implement IBOPBlock
|
||||||
|
|
|
@ -19,6 +19,7 @@ import net.minecraft.block.SoundType;
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.block.properties.IProperty;
|
import net.minecraft.block.properties.IProperty;
|
||||||
import net.minecraft.block.properties.PropertyEnum;
|
import net.minecraft.block.properties.PropertyEnum;
|
||||||
|
import net.minecraft.block.state.BlockStateContainer;
|
||||||
import net.minecraft.block.state.IBlockState;
|
import net.minecraft.block.state.IBlockState;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemBlock;
|
import net.minecraft.item.ItemBlock;
|
||||||
|
@ -46,7 +47,7 @@ public class BlockBOPHive extends Block implements IBOPBlock
|
||||||
};
|
};
|
||||||
public static final PropertyEnum VARIANT = PropertyEnum.create("variant", HiveType.class);
|
public static final PropertyEnum VARIANT = PropertyEnum.create("variant", HiveType.class);
|
||||||
@Override
|
@Override
|
||||||
protected BlockState createBlockState() {return new BlockState(this, new IProperty[] { VARIANT });}
|
protected BlockStateContainer createBlockState() {return new BlockStateContainer(this, new IProperty[] { VARIANT });}
|
||||||
|
|
||||||
|
|
||||||
// implement IBOPBlock
|
// implement IBOPBlock
|
||||||
|
|
|
@ -19,6 +19,7 @@ import biomesoplenty.common.util.block.VariantPagingHelper;
|
||||||
import net.minecraft.block.BlockLeaves;
|
import net.minecraft.block.BlockLeaves;
|
||||||
import net.minecraft.block.BlockPlanks;
|
import net.minecraft.block.BlockPlanks;
|
||||||
import net.minecraft.block.properties.IProperty;
|
import net.minecraft.block.properties.IProperty;
|
||||||
|
import net.minecraft.block.state.BlockStateContainer;
|
||||||
import net.minecraft.block.state.IBlockState;
|
import net.minecraft.block.state.IBlockState;
|
||||||
import net.minecraft.entity.EntityLivingBase;
|
import net.minecraft.entity.EntityLivingBase;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
@ -69,10 +70,10 @@ public class BlockBOPLeaves extends BlockLeaves implements IBOPBlock
|
||||||
public IProperty variantProperty;
|
public IProperty variantProperty;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected BlockState createBlockState()
|
protected BlockStateContainer createBlockState()
|
||||||
{
|
{
|
||||||
this.variantProperty = currentVariantProperty; // get from static variable
|
this.variantProperty = currentVariantProperty; // get from static variable
|
||||||
return new BlockState(this, new IProperty[] { CHECK_DECAY, DECAYABLE, this.variantProperty });
|
return new BlockStateContainer(this, new IProperty[] { CHECK_DECAY, DECAYABLE, this.variantProperty });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,7 @@ import net.minecraft.block.BlockLilyPad;
|
||||||
import net.minecraft.block.SoundType;
|
import net.minecraft.block.SoundType;
|
||||||
import net.minecraft.block.properties.IProperty;
|
import net.minecraft.block.properties.IProperty;
|
||||||
import net.minecraft.block.properties.PropertyEnum;
|
import net.minecraft.block.properties.PropertyEnum;
|
||||||
|
import net.minecraft.block.state.BlockStateContainer;
|
||||||
import net.minecraft.block.state.IBlockState;
|
import net.minecraft.block.state.IBlockState;
|
||||||
import net.minecraft.item.ItemBlock;
|
import net.minecraft.item.ItemBlock;
|
||||||
import net.minecraft.util.IStringSerializable;
|
import net.minecraft.util.IStringSerializable;
|
||||||
|
@ -44,7 +45,7 @@ public class BlockBOPLilypad extends BlockLilyPad implements IBOPBlock
|
||||||
};
|
};
|
||||||
public static final PropertyEnum VARIANT = PropertyEnum.create("variant", LilypadType.class);
|
public static final PropertyEnum VARIANT = PropertyEnum.create("variant", LilypadType.class);
|
||||||
@Override
|
@Override
|
||||||
protected BlockState createBlockState() {return new BlockState(this, new IProperty[] { VARIANT });}
|
protected BlockStateContainer createBlockState() {return new BlockStateContainer(this, new IProperty[] { VARIANT });}
|
||||||
|
|
||||||
|
|
||||||
// implement IBOPBlock
|
// implement IBOPBlock
|
||||||
|
|
|
@ -14,6 +14,7 @@ import biomesoplenty.common.item.ItemBOPBlock;
|
||||||
import biomesoplenty.common.util.block.VariantPagingHelper;
|
import biomesoplenty.common.util.block.VariantPagingHelper;
|
||||||
import net.minecraft.block.BlockLog;
|
import net.minecraft.block.BlockLog;
|
||||||
import net.minecraft.block.properties.IProperty;
|
import net.minecraft.block.properties.IProperty;
|
||||||
|
import net.minecraft.block.state.BlockStateContainer;
|
||||||
import net.minecraft.block.state.IBlockState;
|
import net.minecraft.block.state.IBlockState;
|
||||||
import net.minecraft.init.Blocks;
|
import net.minecraft.init.Blocks;
|
||||||
import net.minecraft.item.ItemBlock;
|
import net.minecraft.item.ItemBlock;
|
||||||
|
@ -50,10 +51,10 @@ public class BlockBOPLog extends BlockLog implements IBOPBlock
|
||||||
public IProperty variantProperty;
|
public IProperty variantProperty;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected BlockState createBlockState()
|
protected BlockStateContainer createBlockState()
|
||||||
{
|
{
|
||||||
this.variantProperty = currentVariantProperty; // get from static variable
|
this.variantProperty = currentVariantProperty; // get from static variable
|
||||||
return new BlockState(this, new IProperty[] { LOG_AXIS, this.variantProperty });
|
return new BlockStateContainer(this, new IProperty[] { LOG_AXIS, this.variantProperty });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -19,6 +19,7 @@ import net.minecraft.block.SoundType;
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.block.properties.IProperty;
|
import net.minecraft.block.properties.IProperty;
|
||||||
import net.minecraft.block.properties.PropertyEnum;
|
import net.minecraft.block.properties.PropertyEnum;
|
||||||
|
import net.minecraft.block.state.BlockStateContainer;
|
||||||
import net.minecraft.block.state.IBlockState;
|
import net.minecraft.block.state.IBlockState;
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
@ -53,7 +54,7 @@ public class BlockBOPMud extends Block implements IBOPBlock, ISustainsPlantType
|
||||||
};
|
};
|
||||||
public static final PropertyEnum VARIANT = PropertyEnum.create("variant", MudType.class);
|
public static final PropertyEnum VARIANT = PropertyEnum.create("variant", MudType.class);
|
||||||
@Override
|
@Override
|
||||||
protected BlockState createBlockState() {return new BlockState(this, new IProperty[] { VARIANT });}
|
protected BlockStateContainer createBlockState() {return new BlockStateContainer(this, new IProperty[] { VARIANT });}
|
||||||
|
|
||||||
|
|
||||||
// implement IBOPBlock
|
// implement IBOPBlock
|
||||||
|
|
|
@ -12,6 +12,7 @@ import biomesoplenty.api.block.BlockQueries;
|
||||||
import biomesoplenty.common.item.ItemBOPBlock;
|
import biomesoplenty.common.item.ItemBOPBlock;
|
||||||
import net.minecraft.block.properties.IProperty;
|
import net.minecraft.block.properties.IProperty;
|
||||||
import net.minecraft.block.properties.PropertyEnum;
|
import net.minecraft.block.properties.PropertyEnum;
|
||||||
|
import net.minecraft.block.state.BlockStateContainer;
|
||||||
import net.minecraft.block.state.IBlockState;
|
import net.minecraft.block.state.IBlockState;
|
||||||
import net.minecraft.item.ItemBlock;
|
import net.minecraft.item.ItemBlock;
|
||||||
import net.minecraft.util.IStringSerializable;
|
import net.minecraft.util.IStringSerializable;
|
||||||
|
@ -39,7 +40,7 @@ public class BlockBOPMushroom extends BlockBOPDecoration
|
||||||
};
|
};
|
||||||
public static final PropertyEnum VARIANT = PropertyEnum.create("variant", MushroomType.class);
|
public static final PropertyEnum VARIANT = PropertyEnum.create("variant", MushroomType.class);
|
||||||
@Override
|
@Override
|
||||||
protected BlockState createBlockState() {return new BlockState(this, new IProperty[] { VARIANT });}
|
protected BlockStateContainer createBlockState() {return new BlockStateContainer(this, new IProperty[] { VARIANT });}
|
||||||
|
|
||||||
|
|
||||||
// implement IBOPBlock
|
// implement IBOPBlock
|
||||||
|
|
|
@ -16,6 +16,7 @@ import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.SoundType;
|
import net.minecraft.block.SoundType;
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.block.properties.IProperty;
|
import net.minecraft.block.properties.IProperty;
|
||||||
|
import net.minecraft.block.state.BlockStateContainer;
|
||||||
import net.minecraft.block.state.IBlockState;
|
import net.minecraft.block.state.IBlockState;
|
||||||
import net.minecraft.init.Blocks;
|
import net.minecraft.init.Blocks;
|
||||||
import net.minecraft.item.ItemBlock;
|
import net.minecraft.item.ItemBlock;
|
||||||
|
@ -53,10 +54,10 @@ public class BlockBOPPlanks extends Block implements IBOPBlock
|
||||||
public IProperty variantProperty;
|
public IProperty variantProperty;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected BlockState createBlockState()
|
protected BlockStateContainer createBlockState()
|
||||||
{
|
{
|
||||||
this.variantProperty = currentVariantProperty; // get from static variable
|
this.variantProperty = currentVariantProperty; // get from static variable
|
||||||
return new BlockState(this, new IProperty[] { this.variantProperty });
|
return new BlockStateContainer(this, new IProperty[] { this.variantProperty });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -18,6 +18,7 @@ import biomesoplenty.common.item.ItemBOPPlant;
|
||||||
import biomesoplenty.common.util.block.VariantPagingHelper;
|
import biomesoplenty.common.util.block.VariantPagingHelper;
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.properties.IProperty;
|
import net.minecraft.block.properties.IProperty;
|
||||||
|
import net.minecraft.block.state.BlockStateContainer;
|
||||||
import net.minecraft.block.state.IBlockState;
|
import net.minecraft.block.state.IBlockState;
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.entity.EntityLivingBase;
|
import net.minecraft.entity.EntityLivingBase;
|
||||||
|
@ -79,10 +80,10 @@ public class BlockBOPPlant extends BlockBOPDecoration implements IShearable
|
||||||
public IProperty variantProperty;
|
public IProperty variantProperty;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected BlockState createBlockState()
|
protected BlockStateContainer createBlockState()
|
||||||
{
|
{
|
||||||
this.variantProperty = currentVariantProperty; // get from static variable
|
this.variantProperty = currentVariantProperty; // get from static variable
|
||||||
return new BlockState(this, new IProperty[] { this.variantProperty });
|
return new BlockStateContainer(this, new IProperty[] { this.variantProperty });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -11,12 +11,12 @@ package biomesoplenty.common.block;
|
||||||
import biomesoplenty.api.block.IBOPBlock;
|
import biomesoplenty.api.block.IBOPBlock;
|
||||||
import biomesoplenty.api.block.ISustainsPlantType;
|
import biomesoplenty.api.block.ISustainsPlantType;
|
||||||
import biomesoplenty.common.item.ItemBOPBlock;
|
import biomesoplenty.common.item.ItemBOPBlock;
|
||||||
import net.minecraft.block.Block;
|
|
||||||
import net.minecraft.block.BlockFalling;
|
import net.minecraft.block.BlockFalling;
|
||||||
import net.minecraft.block.SoundType;
|
import net.minecraft.block.SoundType;
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.block.properties.IProperty;
|
import net.minecraft.block.properties.IProperty;
|
||||||
import net.minecraft.block.properties.PropertyEnum;
|
import net.minecraft.block.properties.PropertyEnum;
|
||||||
|
import net.minecraft.block.state.BlockStateContainer;
|
||||||
import net.minecraft.block.state.IBlockState;
|
import net.minecraft.block.state.IBlockState;
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.item.ItemBlock;
|
import net.minecraft.item.ItemBlock;
|
||||||
|
@ -48,7 +48,7 @@ public class BlockBOPSand extends BlockFalling implements IBOPBlock, ISustainsPl
|
||||||
};
|
};
|
||||||
public static final PropertyEnum VARIANT = PropertyEnum.create("variant", SandType.class);
|
public static final PropertyEnum VARIANT = PropertyEnum.create("variant", SandType.class);
|
||||||
@Override
|
@Override
|
||||||
protected BlockState createBlockState() {return new BlockState(this, new IProperty[] { VARIANT });}
|
protected BlockStateContainer createBlockState() {return new BlockStateContainer(this, new IProperty[] { VARIANT });}
|
||||||
|
|
||||||
|
|
||||||
// implement IBOPBlock
|
// implement IBOPBlock
|
||||||
|
|
|
@ -30,6 +30,7 @@ import net.minecraft.block.IGrowable;
|
||||||
import net.minecraft.block.SoundType;
|
import net.minecraft.block.SoundType;
|
||||||
import net.minecraft.block.properties.IProperty;
|
import net.minecraft.block.properties.IProperty;
|
||||||
import net.minecraft.block.properties.PropertyInteger;
|
import net.minecraft.block.properties.PropertyInteger;
|
||||||
|
import net.minecraft.block.state.BlockStateContainer;
|
||||||
import net.minecraft.block.state.IBlockState;
|
import net.minecraft.block.state.IBlockState;
|
||||||
import net.minecraft.init.Blocks;
|
import net.minecraft.init.Blocks;
|
||||||
import net.minecraft.item.ItemBlock;
|
import net.minecraft.item.ItemBlock;
|
||||||
|
@ -70,10 +71,10 @@ public class BlockBOPSapling extends BlockBOPDecoration implements IGrowable {
|
||||||
public static final PropertyInteger STAGE = PropertyInteger.create("stage", 0, 1);
|
public static final PropertyInteger STAGE = PropertyInteger.create("stage", 0, 1);
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected BlockState createBlockState()
|
protected BlockStateContainer createBlockState()
|
||||||
{
|
{
|
||||||
this.variantProperty = currentVariantProperty; // get from static variable
|
this.variantProperty = currentVariantProperty; // get from static variable
|
||||||
return new BlockState(this, new IProperty[] { STAGE, this.variantProperty });
|
return new BlockStateContainer(this, new IProperty[] { STAGE, this.variantProperty });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -13,11 +13,11 @@ import static net.minecraft.block.BlockLiquid.LEVEL;
|
||||||
import biomesoplenty.api.block.BlockQueries;
|
import biomesoplenty.api.block.BlockQueries;
|
||||||
import biomesoplenty.api.block.IBOPBlock;
|
import biomesoplenty.api.block.IBOPBlock;
|
||||||
import biomesoplenty.common.item.ItemBOPBlock;
|
import biomesoplenty.common.item.ItemBOPBlock;
|
||||||
import net.minecraft.block.Block;
|
|
||||||
import net.minecraft.block.SoundType;
|
import net.minecraft.block.SoundType;
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.block.properties.IProperty;
|
import net.minecraft.block.properties.IProperty;
|
||||||
import net.minecraft.block.properties.PropertyEnum;
|
import net.minecraft.block.properties.PropertyEnum;
|
||||||
|
import net.minecraft.block.state.BlockStateContainer;
|
||||||
import net.minecraft.block.state.IBlockState;
|
import net.minecraft.block.state.IBlockState;
|
||||||
import net.minecraft.init.Blocks;
|
import net.minecraft.init.Blocks;
|
||||||
import net.minecraft.item.ItemBlock;
|
import net.minecraft.item.ItemBlock;
|
||||||
|
@ -65,7 +65,7 @@ public class BlockBOPSeaweed extends BlockBOPDecoration implements IBOPBlock
|
||||||
public static final PropertyEnum POSITION = PropertyEnum.create("position", SeaweedPosition.class);
|
public static final PropertyEnum POSITION = PropertyEnum.create("position", SeaweedPosition.class);
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected BlockState createBlockState() {return new BlockState(this, new IProperty[] { LEVEL, POSITION, VARIANT });}
|
protected BlockStateContainer createBlockState() {return new BlockStateContainer(this, new IProperty[] { LEVEL, POSITION, VARIANT });}
|
||||||
|
|
||||||
|
|
||||||
// implement IBOPBlock
|
// implement IBOPBlock
|
||||||
|
|
|
@ -16,6 +16,7 @@ import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.block.properties.IProperty;
|
import net.minecraft.block.properties.IProperty;
|
||||||
import net.minecraft.block.properties.PropertyBool;
|
import net.minecraft.block.properties.PropertyBool;
|
||||||
import net.minecraft.block.properties.PropertyEnum;
|
import net.minecraft.block.properties.PropertyEnum;
|
||||||
|
import net.minecraft.block.state.BlockStateContainer;
|
||||||
import net.minecraft.block.state.IBlockState;
|
import net.minecraft.block.state.IBlockState;
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.item.ItemBlock;
|
import net.minecraft.item.ItemBlock;
|
||||||
|
@ -45,7 +46,7 @@ public class BlockBOPStone extends Block implements IBOPBlock
|
||||||
public static final PropertyEnum VARIANT = PropertyEnum.create("variant", StoneType.class);
|
public static final PropertyEnum VARIANT = PropertyEnum.create("variant", StoneType.class);
|
||||||
public static PropertyBool POLISHED = PropertyBool.create("polished");
|
public static PropertyBool POLISHED = PropertyBool.create("polished");
|
||||||
@Override
|
@Override
|
||||||
protected BlockState createBlockState() {return new BlockState(this, new IProperty[] { VARIANT, POLISHED });}
|
protected BlockStateContainer createBlockState() {return new BlockStateContainer(this, new IProperty[] { VARIANT, POLISHED });}
|
||||||
|
|
||||||
|
|
||||||
// implement IBOPBlock
|
// implement IBOPBlock
|
||||||
|
|
|
@ -14,6 +14,7 @@ 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;
|
||||||
import net.minecraft.block.properties.PropertyEnum;
|
import net.minecraft.block.properties.PropertyEnum;
|
||||||
|
import net.minecraft.block.state.BlockStateContainer;
|
||||||
import net.minecraft.block.state.IBlockState;
|
import net.minecraft.block.state.IBlockState;
|
||||||
import net.minecraft.item.ItemBlock;
|
import net.minecraft.item.ItemBlock;
|
||||||
import net.minecraft.util.IStringSerializable;
|
import net.minecraft.util.IStringSerializable;
|
||||||
|
@ -40,7 +41,7 @@ public class BlockBOPTerrarium extends Block implements IBOPBlock
|
||||||
};
|
};
|
||||||
public static final PropertyEnum VARIANT = PropertyEnum.create("variant", TerrariumType.class);
|
public static final PropertyEnum VARIANT = PropertyEnum.create("variant", TerrariumType.class);
|
||||||
@Override
|
@Override
|
||||||
protected BlockState createBlockState() {return new BlockState(this, new IProperty[] { VARIANT });}
|
protected BlockStateContainer createBlockState() {return new BlockStateContainer(this, new IProperty[] { VARIANT });}
|
||||||
|
|
||||||
|
|
||||||
// implement IBOPBlock
|
// implement IBOPBlock
|
||||||
|
|
Loading…
Reference in a new issue