Advertisement
Guest User

RadarBlock

a guest
Jan 31st, 2015
271
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.12 KB | None | 0 0
  1. public class BlockRadar extends Block {
  2.     public World radar;
  3.     public AxisAlignedBB boundingBox;
  4.     private int range;
  5.     TileEntityRadar TERadar = new TileEntityRadar(range);
  6.     public BlockRadar(int range) {
  7.         super(Material.iron);
  8.         this.range = range;
  9.         this.setCreativeTab(Main.tabPowerTools);
  10.         this.setBlockName("radar");
  11.         // TODO Auto-generated constructor stub
  12.     }
  13.    
  14.     public TileEntity createNewTileEntity(World world, int par2)
  15.     {
  16.         TERadar = new TileEntityRadar(range);
  17.         return TERadar;
  18.     }
  19.    
  20.     public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_)
  21.     {
  22.         return Item.getItemFromBlock(this);
  23.     }
  24.  
  25.     /**
  26.      * Returns the quantity of items to drop on block destruction.
  27.      */
  28.     public int quantityDropped(Random p_149745_1_)
  29.     {
  30.         return 1;
  31.     }
  32.    
  33.     public boolean onBlockActivated(World world, int p_149727_2_, int p_149727_3_, int p_149727_4_, EntityPlayer player, int p_149727_6_, float p_149727_7_, float p_149727_8_, float p_149727_9_) {
  34.         //TERadar.shouldPrint = true;
  35.         TERadar.printInfo();
  36.         return false;
  37.     }
  38.  
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement