Examples of onSlotChanged()


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

          // swap the chips.
          slot.putStack( currentChip );

          Slot chipSlot = (Slot) inventorySlots.get( 10 );
          chipSlot.putStack( stackInSlot );
          chipSlot.onSlotChanged();
        }
      }
    }

    if( stackInSlot.stackSize == 0 ) {
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()

            if( Utils.equalsStacks( stackInSlot, playerStack ) && sum <= stackInSlot.getMaxStackSize() ) {
              playerStack.stackSize = sum;
              slot.onPickupFromSlot( player, inventoryPlayer.getItemStack() );
            }
          }
          slot.onSlotChanged();
          return stackInSlot;

        case 12: // interacting with the hotkeys
          if( !slot.canTakeStack( player ) )
            return null;
View Full Code Here

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

        } else if( buttomPressed == 1 ) {
          ItemStack copy = playerStack.copy();
          copy.stackSize = 1;
          slot.putStack( copy );
        }
        slot.onSlotChanged();
        return null;
      }

      if( flag == 1 )
        return null; // do nothing on shift click.
View Full Code Here

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

        if( invStack != null ) {
          ItemStack copy = invStack.copy();
          copy.stackSize = 1;

          slot.putStack( copy );
          slot.onSlotChanged();

          return invStack;
        }

      }
View Full Code Here

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

    }

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

    slot.onSlotChanged();
    return stack;
  }

  ///////////////
  ///// ContainerItem
View Full Code Here

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

      }

      if(itemstack1.stackSize == 0) {
        slot.putStack((ItemStack) null);
      } else {
        slot.onSlotChanged();
      }
    }
    return itemstack;
  }
View Full Code Here

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

      }

      if(origStack.stackSize == 0) {
        slot.putStack((ItemStack) null);
      } else {
        slot.onSlotChanged();
      }

      slot.onSlotChanged();

      if(origStack.stackSize == copystack.stackSize) {
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.