Package org.spout.api.inventory

Examples of org.spout.api.inventory.Inventory.grid()


    // From main inventory/quickbar to the dispenser
    if (from instanceof PlayerMainInventory || from instanceof PlayerQuickbar) {
      for (InventoryConverter conv : this.getInventoryConverters()) {
        Inventory inv = conv.getInventory();
        if (inv instanceof DropperInventory) {
          Grid grid = inv.grid(3);
          final int height = grid.getHeight();
          final int length = grid.getLength();
          for (int y = height - 1; y >= 0; y--) {
            int x1 = length * y;
            int x2 = x1 + length - 1;
View Full Code Here


    // From main inventory/quickbar to the dispenser
    if (from instanceof PlayerMainInventory || from instanceof QuickbarInventory) {
      for (InventoryConverter conv : this.getInventoryConverters()) {
        Inventory inv = conv.getInventory();
        if (inv instanceof DispenserInventory) {
          Grid grid = inv.grid(3);
          final int height = grid.getHeight();
          final int length = grid.getLength();
          for (int row = height - 1; row >= 0; row--) {
            int startSlot = length * row;
            int endSlot = startSlot + length - 1;
View Full Code Here

    // From main inventory/quickbar to the chest
    if (from instanceof PlayerMainInventory || from instanceof PlayerQuickbar) {
      for (InventoryConverter conv : this.getInventoryConverters()) {
        Inventory inv = conv.getInventory();
        if (inv instanceof ChestInventory) {
          Grid grid = inv.grid(ChestInventory.LENGTH);
          for (int row = grid.getHeight() - 1; row >= 0; row--) {
            int startSlot = ChestInventory.LENGTH * row;
            int endSlot = startSlot + ChestInventory.LENGTH - 1;
            inv.add(startSlot, endSlot, stack);
            from.set(slot, stack);
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.