Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package net.minecraft.src;
- import java.util.Random;
- public class BlockPamFlower extends BlockFlower
- {
- protected BlockPamFlower(int i, int j)
- {
- super(i, j);
- blockIndexInTexture = j;
- setTickOnLoad(true);
- float f = 0.2F;
- setBlockBounds(0.5F - f, 0.0F, 0.5F - f, 0.5F + f, f * 3F, 0.5F + f);
- }
- public int getBlockTextureFromSideAndMetadata(int i, int j)
- {
- if(j == 0)
- {
- return mod_Pamflowers.blackplant;
- }
- if(j == 1)
- {
- return mod_Pamflowers.blueplant;
- }
- if(j == 2)
- {
- return mod_Pamflowers.brownplant;
- } else
- if(j == 3)
- {
- return mod_Pamflowers.cyanplant;
- } else
- if(j == 4)
- {
- return mod_Pamflowers.greenplant;
- } else
- if(j == 5)
- {
- return mod_Pamflowers.greyplant;
- } else
- if(j == 6)
- {
- return mod_Pamflowers.lightblueplant;
- } else
- if(j == 7)
- {
- return mod_Pamflowers.lightgreyplant;
- } else
- if(j == 8)
- {
- return mod_Pamflowers.limeplant;
- } else
- if(j == 9)
- {
- return mod_Pamflowers.magentaplant;
- } else
- if(j == 10)
- {
- return mod_Pamflowers.orangeplant;
- } else
- if(j == 11)
- {
- return mod_Pamflowers.pinkplant;
- } else
- if(j == 2)
- {
- return mod_Pamflowers.purpleplant;
- } else
- if(j == 2)
- {
- return mod_Pamflowers.whiteplant;
- } else
- {
- j = ~(j & 0xf);
- return 113 + ((j & 8) >> 3) + (j & 7) * 16;
- }
- }
- protected int damageDropped(int j)
- {
- return j;
- }
- public static int func_21034_c(int j)
- {
- return ~j & 0xf;
- }
- public static int func_21035_d(int j)
- {
- return ~j & 0xf;
- }
- public boolean canPlaceBlockAt(World world, int i, int j, int k)
- {
- return super.canPlaceBlockAt(world, i, j, k) && canThisPlantGrowOnThisBlockID(world.getBlockId(i, j - 1, k));
- }
- protected boolean canThisPlantGrowOnThisBlockID(int i)
- {
- return i == Block.grass.blockID || i == Block.dirt.blockID || i == Block.tilledField.blockID;
- }
- public void onNeighborBlockChange(World world, int i, int j, int k, int l)
- {
- super.onNeighborBlockChange(world, i, j, k, l);
- func_268_h(world, i, j, k);
- }
- public void updateTick(World world, int i, int j, int k, Random random)
- {
- func_268_h(world, i, j, k);
- }
- public boolean canBlockStay(World world, int i, int j, int k)
- {
- return (world.getFullBlockLightValue(i, j, k) >= 8 || world.canBlockSeeTheSky(i, j, k)) && canThisPlantGrowOnThisBlockID(world.getBlockId(i, j - 1, k));
- }
- public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int i, int j, int k)
- {
- return null;
- }
- public boolean isOpaqueCube()
- {
- return false;
- }
- public boolean renderAsNormalBlock()
- {
- return false;
- }
- public int getRenderType()
- {
- return 1;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement