From 82341155b0ec76aa1a0a9848b2b08160484f28ac Mon Sep 17 00:00:00 2001 From: GirafiStudios Date: Mon, 14 Nov 2016 11:05:37 +0100 Subject: [PATCH] Fixed wrong BoP log & leave subblocks showing up in JEI --- .../common/block/BlockBOPLeaves.java | 8 +++++++- .../biomesoplenty/common/block/BlockBOPLog.java | 15 ++++++++++++--- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPLeaves.java b/src/main/java/biomesoplenty/common/block/BlockBOPLeaves.java index f5fb571a5..f4bc2ba4f 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPLeaves.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPLeaves.java @@ -20,6 +20,7 @@ import net.minecraft.block.state.BlockStateContainer; import net.minecraft.block.state.IBlockState; import net.minecraft.client.renderer.color.IBlockColor; import net.minecraft.client.renderer.color.IItemColor; +import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; @@ -153,7 +154,12 @@ public class BlockBOPLeaves extends BlockLeaves implements IBOPBlock super(); this.setDefaultState(this.blockState.getBaseState().withProperty(CHECK_DECAY, Boolean.valueOf(true)).withProperty(DECAYABLE, Boolean.valueOf(true))); } - + + @Override + @SideOnly(Side.CLIENT) + public void getSubBlocks(Item item, CreativeTabs tab, List list) + { + } // map from meta to state and vice verca. Use the same scheme as for the vanilla leaf blocks // highest bit is for CHECK_DECAY true=>1 false=>0 diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPLog.java b/src/main/java/biomesoplenty/common/block/BlockBOPLog.java index fcf297381..db74964cc 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPLog.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPLog.java @@ -17,14 +17,19 @@ import net.minecraft.block.state.BlockStateContainer; import net.minecraft.block.state.IBlockState; import net.minecraft.client.renderer.color.IBlockColor; import net.minecraft.client.renderer.color.IItemColor; +import net.minecraft.creativetab.CreativeTabs; import net.minecraft.init.Blocks; +import net.minecraft.item.Item; import net.minecraft.item.ItemBlock; +import net.minecraft.item.ItemStack; import net.minecraft.util.EnumFacing; import net.minecraft.util.math.BlockPos; import net.minecraft.world.IBlockAccess; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; +import java.util.List; + public class BlockBOPLog extends BlockLog implements IBOPBlock { @@ -93,6 +98,12 @@ public class BlockBOPLog extends BlockLog implements IBOPBlock this.setDefaultState(this.blockState.getBaseState().withProperty(LOG_AXIS, BlockLog.EnumAxis.Y)); this.setHarvestLevel("axe", 0); } + + @Override + @SideOnly(Side.CLIENT) + public void getSubBlocks(Item item, CreativeTabs tab, List list) + { + } // map from state to meta and vice verca - use high 2 bits for LOG_AXIS, low 2 bits for VARIANT @Override @@ -139,6 +150,4 @@ public class BlockBOPLog extends BlockLog implements IBOPBlock return Blocks.LOG.getFireSpreadSpeed(world, pos, face); } } - - -} +} \ No newline at end of file