Advertisement
4epB9Ik

TC_Fix#1

Jun 30th, 2017
263
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 2.23 KB | None | 0 0
  1. @Override
  2.     public void handleServerSide (EntityPlayer player)
  3.     {
  4.         World world = player.worldObj;
  5.         TileEntity te = world.getTileEntity(this.x, this.y, this.z);
  6.         if ((te instanceof StencilTableLogic))
  7.         {
  8.           StencilTableLogic logic = (StencilTableLogic)te;
  9.           if ((player.openContainer != null) && ((player.openContainer instanceof PatternShaperContainer)))
  10.           {
  11.             PatternShaperContainer container = (PatternShaperContainer)player.openContainer;
  12.             if (container.logic == logic) {
  13.               if (this.contents == null)
  14.               {
  15.                 logic.setSelectedPattern(null);
  16.               }
  17.               else
  18.               {
  19.                 ItemStack stackBlank = logic.getStackInSlot(0);
  20.                 if ((stackBlank != null) && (stackBlank.stackSize > 0) && (StencilBuilder.isBlank(stackBlank)))
  21.                 {
  22.                   boolean warning = true;
  23.                   for (ItemStack stack : StencilBuilder.instance.stencils.values()) {
  24.                     if ((stack != null) && (this.contents.isItemEqual(stack)))
  25.                     {
  26.                       this.contents = stack.copy();
  27.                       warning = false;
  28.                       break;
  29.                     }
  30.                   }
  31.                   if (warning)
  32.                   {
  33.                     TConstruct.logger.warn(player.getCommandSenderName() + " - этот пидор пытался юзануть дыру");
  34.                     TConstruct.logger.warn(player.getCommandSenderName() + " выдавал конкретно " + this.contents.getItem().getUnlocalizedName() + "");
  35.                   }
  36.                   else
  37.                   {
  38.                     logic.setSelectedPattern(this.contents);
  39.                   }
  40.                 }
  41.                 else
  42.                 {
  43.                     TConstruct.logger.warn(player.getCommandSenderName() + " - этот пидор пытался юзануть дыру");
  44.                     TConstruct.logger.warn(player.getCommandSenderName() + " выдавал конкретно " + this.contents.getItem().getUnlocalizedName() + "");
  45.                 }
  46.               }
  47.             }
  48.           }
  49.         }
  50.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement