Guest User

CrafterClass

a guest
Aug 18th, 2017
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.20 KB | None | 0 0
  1. package kyros.testMod.blocks;
  2.  
  3. import kyros.testMod.testMod;
  4. import kyros.testMod.tileentity.TileEntityCrafter;
  5. import net.minecraft.block.Block;
  6. import net.minecraft.block.BlockContainer;
  7. import net.minecraft.block.material.Material;
  8. import net.minecraft.entity.player.EntityPlayer;
  9. import net.minecraft.tileentity.TileEntity;
  10. import net.minecraft.world.World;
  11.  
  12. public class Crafter extends BlockContainer {
  13.  
  14. public Crafter() {
  15. super(Material.wood);
  16.  
  17. this.setHardness(3.0F);
  18. this.setResistance(5.0F);
  19. this.setCreativeTab(testMod.Ultranium_Mod);
  20.  
  21. }
  22.  
  23. public int getRenderType()
  24. {
  25. return -1;
  26. }
  27.  
  28. public boolean isOpaqueCube()
  29. {
  30. return false;
  31. }
  32.  
  33. public boolean renderAsNormalBlock()
  34. {
  35. return false;
  36. }
  37.  
  38. @Override
  39. public TileEntity createNewTileEntity(World var1, int var2)
  40. {
  41. return new TileEntityCrafter();
  42. }
  43.  
  44. public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ)
  45. {
  46. if (!world.isRemote)
  47. {
  48. player.openGui(testMod.intance, testMod.ENUM_IDS.CRafter.ordinal(), world, x, y, z);
  49. }
  50. return true;
  51.  
  52. }
  53.  
  54. }
Advertisement
Add Comment
Please, Sign In to add comment