Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class PTSGLeaves extends BlockLeaves implements IShearable{
- public static final String[][] leaftypes = new String[][] {{"leafPine", "leafSpruce"}, {"leafPineOpaque", "leafSpruceOpaque"}};
- public static final String[] leaves = new String[] {"Pine", "Spruce"};
- protected void func_150124_c(World world, int x, int y, int z, int side, int meta)
- {
- if ((side & 3) == 1 && world.rand.nextInt(meta) == 0)
- {
- this.dropBlockAsItem(world, x, y, z, new ItemStack(Items.apple, 1, 0));
- }
- }
- public int damageDropped(int var01)
- {
- return super.damageDropped(var01) + 4;
- }
- public int getDamageValue(World world, int x, int y, int z)
- {
- return world.getBlockMetadata(x, y, z) & 3;
- }
- @SideOnly(Side.CLIENT)
- public void getSubBlocks(Item item, CreativeTabs tab, List list)
- {
- for (int i = 0; i <leaves.length; i++){
- list.add(new ItemStack(item, 1, i));
- }
- }
- @SideOnly(Side.CLIENT)
- public void registerBlockIcons(IIconRegister icon)
- {
- for (int i = 0; i < leaftypes.length; ++i)
- {
- this.field_150129_M[i] = new IIcon[leaftypes[i].length];
- for (int j = 0; j < leaftypes[i].length; ++j)
- {
- this.field_150129_M[i][j] = icon.registerIcon(leaftypes[i][j]);
- }
- }
- }
- @Override
- public IIcon getIcon(int side, int meta) {
- return (meta & 3) == 1 ? this.field_150129_M[this.field_150127_b][1] : this.field_150129_M[this.field_150127_b][0];
- }
- @Override
- public String[] func_150125_e() {
- return leaves;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement