Advertisement
Guest User

Untitled

a guest
Jul 21st, 2017
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.11 KB | None | 0 0
  1. package net.minecraft.src;
  2.  
  3. public class BlockJump extends Block
  4. {
  5.  
  6. public BlockJump(int blockID)
  7. {
  8. // Call our inherited's class telling it
  9. // we want to use the jukebox texture and
  10. // have wood like properties
  11. super(blockID, 74, Material.wood);
  12.  
  13. this.setResistance(2.0F).setHardness(10F).setStepSound(soundClothFootstep);
  14.  
  15. // Need to create the item that will be dropped
  16. Item.itemsList[blockID] = new ItemBlock(blockID-256);
  17.  
  18. // Sets the recipe be two planks horizontal to each other
  19. CraftingManager.getInstance().addRecipe(new ItemStack(blockID, 1), new Object[] {
  20. "##", Character.valueOf('#'), Block.planks
  21. });
  22. }
  23.  
  24. public int getBlockTextureFromSide(int side)
  25. {
  26. if(1==side)
  27. {
  28. // Workshop top
  29. return 43;
  30. }
  31. return blockIndexInTexture;
  32. }
  33.  
  34. public void onEntityWalking(World world, int x, int y, int z, Entity entity)
  35. {
  36. // Add to the entities upward velocity to send them up into the air
  37. entity.motionY += 2.0;
  38. }
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement