Advertisement
Guest User

Untitled

a guest
Jul 5th, 2015
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.14 KB | None | 0 0
  1. public class PylonBlock extends BlockContainer {
  2.  
  3. // Treat it like a normal block here. The Block Bounds are a good idea - the
  4. // first three are X Y and Z of the botton-left corner,
  5. // And the second three are the top-right corner.
  6. public PylonBlock() {
  7. super(Material.iron);
  8. this.setCreativeTab(GeomancyCreativeTab.tabGeomancy);
  9. // this.setBlockBounds(0.4F, 0.0F, 0.4F, 0.6F, 3.0F, 0.6F);
  10. }
  11.  
  12. // Make sure you set this as your TileEntity class relevant for the block!
  13. @Override
  14. public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
  15. return new TEPylon();
  16. }
  17.  
  18. // You don't want the normal render type, or it wont render properly.
  19. @Override
  20. public int getRenderType() {
  21. return -1;
  22. }
  23.  
  24. // It's not an opaque cube, so you need this.
  25. @Override
  26. public boolean isOpaqueCube() {
  27. return false;
  28. }
  29.  
  30. // It's not a normal block, so you need this too.
  31. public boolean renderAsNormalBlock() {
  32. return false;
  33. }
  34.  
  35. // This is the icon to use for showing the block in your hand.
  36. public void registerIcons(IIconRegister icon) {
  37. this.blockIcon = icon.registerIcon("geomancy:models/pylon.png");
  38. }
  39.  
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement