Advertisement
akSource

TileEntityというかIInventoryで更新されたとき、クライアントにパケット投げるやつ。効率悪い。

Aug 10th, 2014
234
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.53 KB | None | 0 0
  1.     @Override
  2.     public void markDirty()
  3.     {
  4.         if(isMax())
  5.         {
  6.             inputSlot = getCopy(chestItem.getMaxStackSize());
  7.         }else{
  8.             inputSlot = null;
  9.         }
  10.         if(container != null) container.changeSlot();
  11.  
  12.         @SuppressWarnings("unchecked")
  13.         List<EntityPlayer> list= this.worldObj.playerEntities;
  14.         for (EntityPlayer player : list) {
  15.             if (player instanceof EntityPlayerMP) {
  16.                 ((EntityPlayerMP)player).playerNetServerHandler.sendPacket(this.getDescriptionPacket());
  17.             }
  18.         }
  19.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement