Advertisement
AwesomeSpider8

PurifierMessageHandler *Changed Energy*

Feb 12th, 2017
97
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public class PurifierMessageHandler implements IMessageHandler<PurifierMessage, IMessage> {
  2.  
  3.     @Override
  4.     public IMessage onMessage(PurifierMessage message, MessageContext ctx) {
  5.         EntityPlayer player = RobotiCraft.proxy.getPlayerFromContext(ctx);
  6.         Container container = player.openContainer;
  7.  
  8.         if(container.windowId == message.id) {
  9.             container.updateProgressBar(0, message.progress);
  10.             container.updateProgressBar(1, message.currentProgress);
  11.             container.updateProgressBar(2, message.powerReceived);
  12.         }
  13.  
  14.         return null;
  15.     }
  16. }
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement