Merge pull request #896 from GirafiStudios/subblock_fix

Fixed wrong BoP log & leave subblocks showing up in JEI, Closes #892
This commit is contained in:
Adubbz 2016-11-14 21:07:11 +11:00 committed by GitHub
commit 711c696b87
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;
@ -153,7 +154,12 @@ public class BlockBOPLeaves extends BlockLeaves implements IBOPBlock
super(); super();
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
{ {
@ -93,6 +98,12 @@ public class BlockBOPLog extends BlockLog implements IBOPBlock
this.setDefaultState(this.blockState.getBaseState().withProperty(LOG_AXIS, BlockLog.EnumAxis.Y)); this.setDefaultState(this.blockState.getBaseState().withProperty(LOG_AXIS, BlockLog.EnumAxis.Y));
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
@ -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);
} }
} }
}
}