Fixed wrong BoP log & leave subblocks showing up in JEI

This commit is contained in:
GirafiStudios 2016-11-14 11:05:37 +01:00
parent 423303329b
commit 82341155b0
2 changed files with 19 additions and 4 deletions

View file

@ -20,6 +20,7 @@ import net.minecraft.block.state.BlockStateContainer;
import net.minecraft.block.state.IBlockState; import net.minecraft.block.state.IBlockState;
import net.minecraft.client.renderer.color.IBlockColor; import net.minecraft.client.renderer.color.IBlockColor;
import net.minecraft.client.renderer.color.IItemColor; import net.minecraft.client.renderer.color.IItemColor;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks; import net.minecraft.init.Blocks;
@ -154,6 +155,11 @@ public class BlockBOPLeaves extends BlockLeaves implements IBOPBlock
this.setDefaultState(this.blockState.getBaseState().withProperty(CHECK_DECAY, Boolean.valueOf(true)).withProperty(DECAYABLE, Boolean.valueOf(true))); 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<ItemStack> list)
{
}
// map from meta to state and vice verca. Use the same scheme as for the vanilla leaf blocks // 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 // highest bit is for CHECK_DECAY true=>1 false=>0

View file

@ -17,14 +17,19 @@ import net.minecraft.block.state.BlockStateContainer;
import net.minecraft.block.state.IBlockState; import net.minecraft.block.state.IBlockState;
import net.minecraft.client.renderer.color.IBlockColor; import net.minecraft.client.renderer.color.IBlockColor;
import net.minecraft.client.renderer.color.IItemColor; import net.minecraft.client.renderer.color.IItemColor;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.init.Blocks; import net.minecraft.init.Blocks;
import net.minecraft.item.Item;
import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumFacing; import net.minecraft.util.EnumFacing;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess; import net.minecraft.world.IBlockAccess;
import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.fml.relauncher.SideOnly;
import java.util.List;
public class BlockBOPLog extends BlockLog implements IBOPBlock public class BlockBOPLog extends BlockLog implements IBOPBlock
{ {
@ -94,6 +99,12 @@ public class BlockBOPLog extends BlockLog implements IBOPBlock
this.setHarvestLevel("axe", 0); this.setHarvestLevel("axe", 0);
} }
@Override
@SideOnly(Side.CLIENT)
public void getSubBlocks(Item item, CreativeTabs tab, List<ItemStack> list)
{
}
// map from state to meta and vice verca - use high 2 bits for LOG_AXIS, low 2 bits for VARIANT // map from state to meta and vice verca - use high 2 bits for LOG_AXIS, low 2 bits for VARIANT
@Override @Override
public IBlockState getStateFromMeta(int meta) public IBlockState getStateFromMeta(int meta)
@ -139,6 +150,4 @@ public class BlockBOPLog extends BlockLog implements IBOPBlock
return Blocks.LOG.getFireSpreadSpeed(world, pos, face); return Blocks.LOG.getFireSpreadSpeed(world, pos, face);
} }
} }
} }