Examples of onSlotChanged()


Examples of net.minecraft.inventory.Slot.onSlotChanged()

      if (stackInSlot.stackSize <= 0)
      {
        slot.putStack(null);
      } else
      {
        slot.onSlotChanged();
      }
      if (stackInSlot.stackSize == originalStack.stackSize)
      {
        return null;
      }
View Full Code Here

Examples of net.minecraft.inventory.Slot.onSlotChanged()

      stackInSlot = ((SlotCraft) slot).getCraftedStack();
      ItemStack copy = stackInSlot == null ? null : stackInSlot.copy();

      if( mergeCraftedStack( stackInSlot, 8 + 10, 8 + 10 + 27 ) ) {
        slot.onPickupFromSlot( player, copy );
        slot.onSlotChanged();
        return copy;
      }
      return null;
    }
View Full Code Here

Examples of net.minecraft.inventory.Slot.onSlotChanged()

    }

    if( stackInSlot.stackSize == 0 ) {
      slot.putStack( null );
    }
    slot.onSlotChanged();

    return stack;
  }

  // Whether if the slot can accept dragged items.
View Full Code Here

Examples of net.minecraft.inventory.Slot.onSlotChanged()

          int sum = itemStack.stackSize + stackInSlot.stackSize;
          int maxStackSize = Math.min( stackInSlot.getMaxStackSize(), targetSlot.getSlotStackLimit() );

          if( sum <= maxStackSize ) {
            stackInSlot.stackSize = sum;
            targetSlot.onSlotChanged();
            return true;
          } else if( stackInSlot.stackSize < maxStackSize ) {
            itemStack.stackSize -= maxStackSize - stackInSlot.stackSize;
            stackInSlot.stackSize = maxStackSize;
            targetSlot.onSlotChanged();
View Full Code Here

Examples of net.minecraft.inventory.Slot.onSlotChanged()

            targetSlot.onSlotChanged();
            return true;
          } else if( stackInSlot.stackSize < maxStackSize ) {
            itemStack.stackSize -= maxStackSize - stackInSlot.stackSize;
            stackInSlot.stackSize = maxStackSize;
            targetSlot.onSlotChanged();
          }
        }
      }
    }
View Full Code Here

Examples of net.minecraft.inventory.Slot.onSlotChanged()

        if( stackInSlot != null )
          continue;

        targetSlot.putStack( itemStack );
        targetSlot.onSlotChanged();
        return true;
      }
    }

    return true;
View Full Code Here

Examples of net.minecraft.inventory.Slot.onSlotChanged()

          int sum = stackInSlot.stackSize + itemStack.stackSize;

          if( sum <= maxStackSize ) {
            itemStack.stackSize = 0;
            stackInSlot.stackSize = sum;
            slot.onSlotChanged();
            retValue = true;
          } else if( stackInSlot.stackSize < maxStackSize ) {
            itemStack.stackSize -= maxStackSize - stackInSlot.stackSize;
            stackInSlot.stackSize = maxStackSize;
            slot.onSlotChanged();
View Full Code Here

Examples of net.minecraft.inventory.Slot.onSlotChanged()

            slot.onSlotChanged();
            retValue = true;
          } else if( stackInSlot.stackSize < maxStackSize ) {
            itemStack.stackSize -= maxStackSize - stackInSlot.stackSize;
            stackInSlot.stackSize = maxStackSize;
            slot.onSlotChanged();
            retValue = true;
          }
        }

        if( reverse ) {
View Full Code Here

Examples of net.minecraft.inventory.Slot.onSlotChanged()

            remaining = itemStack.stackSize - maxStackSize;
            tempStack = itemStack.splitStack( maxStackSize );
          }

          slot.putStack( tempStack.copy() );
          slot.onSlotChanged();
          itemStack.stackSize = remaining;
          retValue = true;
          break;
        }
View Full Code Here

Examples of net.minecraft.inventory.Slot.onSlotChanged()

      stackInSlot = ((SlotCraft) slot).getCraftedStack();
      ItemStack copy = stackInSlot == null ? null : stackInSlot.copy();

      if( mergeCraftedStack( stackInSlot, 11, inventorySlots.size() ) ) {
        slot.onPickupFromSlot( player, stackInSlot );
        slot.onSlotChanged();
        return copy;
      }
      return null;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.