Пример #1
0
 public VAnvil(EntityPlayer entityplayer)
 {
     super(entityplayer.inventory, null, 0, 0, 0, entityplayer);
     checkReachable = false;
     _player = entityplayer;
     for(int i = 0; i < #FIELD_CONTAINER_3#.size(); i++)
     {
         try
         {
             if(Class.forName("net.minecraft.server.v#MC_VERSION#.SlotAnvilResult").isInstance(#FIELD_CONTAINER_3#.get(i)))
             {
                 #FIELD_CONTAINER_3#.set(i, new VAnvilSlot(this, getInv("#FIELD_CONTAINERANVIL_2#"), 2, 134, 47));
                 break;
             }
         }
         catch(Throwable t)
         {
             t.printStackTrace();
             break;
         }
     }
 }
Пример #2
0
 public ItemStack #FIELD_CONTAINER_10#(EntityHuman entityhuman, int i)
 {
     ItemStack itemstack = null;
     Slot slot = (Slot) #FIELD_CONTAINER_3#.get(i);
     if(slot != null && slot.#FIELD_SLOT_1#())
     {
         ItemStack itemstack1 = slot.getItem();
         itemstack = itemstack1.cloneItemStack();
         if(i == 2)
         {
             if(!#FIELD_CONTAINER_8#(itemstack1, 3, 39, true))
             {
                 return null;
             }
             slot.#FIELD_SLOT_2#(itemstack1, itemstack);
         }
         else if(i != 0 && i != 1)
         {
             if(i >= 3 && i < 39 && !#FIELD_CONTAINER_8#(itemstack1, 0, 2, false))
             {
                 return null;
             }
         }
         else if(!#FIELD_CONTAINER_8#(itemstack1, 3, 39, false))
         {
             return null;
         }
         if(itemstack1.count == 0)
         {
             slot.set((ItemStack) null);
         }
         else
         {
             slot.#FIELD_SLOT_3#();
         }
         if(itemstack1.count == itemstack.count)
         {
             return null;
         }
         slot.#FIELD_SLOT_2#(entityhuman, itemstack1);
     }
     return itemstack;
 }