Guest User

Untitled

a guest
Apr 21st, 2018
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.33 KB | None | 0 0
  1. package net.minecraft.src;
  2.  
  3. import java.util.Random;
  4.  
  5. public class BlockUraniumBlock extends Block
  6. {
  7. protected BlockUraniumBlock(int i, int j)
  8. {
  9. super (i,j,Material.iron);
  10. }
  11.  
  12. public int idDropped(int i, Random random)
  13. {
  14. return mod_SciFiCraft.uraniumBlock.blockID;
  15. }
  16.  
  17. public int quantityDropped(Random random)
  18. {
  19. return 1;
  20. }
  21.  
  22.  
  23. public void onEntityCollidedWithBlock(World world, int i, int j, int k, Entity entity)
  24. {
  25. if (entity instanceof EntityLiving)
  26. {
  27. byte byte0 = 5;
  28.  
  29. if(byte0 > 0)
  30. {
  31. ((EntityLiving)entity).addPotionEffect(new PotionEffect(Potion.potionPoison.id, byte0 * 20, 2));
  32. }
  33.  
  34. entity.attackEntityFrom(DamageSource.cactus, 1);
  35.  
  36. }
  37. }
  38.  
  39. public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int i, int j, int k)
  40. {
  41. float f = 0.0625F;
  42. return AxisAlignedBB.getBoundingBoxFromPool((float)i + f, j, (float)k + f, (float)(i + 1) - f, (float)(j + 1) - f, (float)(k + 1) - f);
  43. }
  44.  
  45. public AxisAlignedBB getSelectedBoundingBoxFromPool(World world, int i, int j, int k)
  46. {
  47. float f = 0.0625F;
  48. return AxisAlignedBB.getBoundingBoxFromPool((float)i + f, j, (float)k + f, (float)(i + 1) - f, j + 1, (float)(k + 1) - f);
  49. }
  50.  
  51. }
Add Comment
Please, Sign In to add comment