Guest User

blockWire

a guest
May 26th, 2014
237
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.65 KB | None | 0 0
  1. public class blockWire extends BlockContainer{
  2.    
  3.     public TileEntityWire wire;
  4.    
  5.     protected blockWire() {
  6.         super(Material.carpet); //this sets what the block can be harvested ex. you need a pick to mine stone
  7.     }
  8.    
  9.     public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ){
  10.    
  11.     if(!world.isRemote){
  12.         FMLNetworkHandler.openGui(player, TrialMod.instance, TrialMod.guiIDWire, world, x, y, z);
  13.         System.out.println("Right Clicked");
  14.     }
  15.        
  16.         return true;
  17.  
  18. }
  19.     public TileEntity createNewTileEntity(World var1, int var2) {
  20.         return new TileEntityWire();
  21.     }
  22.      
  23.    
  24.    
  25.  
  26. }
Advertisement
Add Comment
Please, Sign In to add comment