Advertisement
Guest User

Untitled

a guest
Feb 1st, 2015
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.87 KB | None | 0 0
  1. //this is a really crappy custom command that'll gets removed immediately if it works!
  2.  
  3. //blabla, codestuff
  4.  
  5.   @Override
  6.     public void processCommand(ICommandSender sender, String[] args) {
  7.  
  8.         try {
  9.             int x,y,z;
  10.  
  11.             RGBVec vec = new RGBVec(args[0]);
  12.  
  13.             EntityPlayer player = (EntityPlayer) sender;
  14.             World world = player.getEntityWorld();
  15.  
  16.             x = (int)player.posX; y = (int) player.posY - 1; z = (int) player.posZ;
  17.  
  18.             LampTileEntity tile = (LampTileEntity) world.getTileEntity(x,y,z);
  19.  
  20.             tile.RGB_VALUES = vec;
  21.  
  22.  
  23.             if (tile.RGB_VALUES != null)
  24.             {
  25.                 System.out.println(tile.RGB_VALUES.toString() + "@" + x + ";" + y + ";" + z);
  26.             }
  27.  
  28.  
  29.             tile.CustomupdateEntity();
  30.  
  31.        }
  32.         catch (Exception e)
  33.         {
  34.  
  35.         }
  36.  
  37.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement