Package org.spout.api.inventory.shape

Examples of org.spout.api.inventory.shape.Grid


  public CraftingInventory(Grid grid, int outputSlot) {
    this(grid, outputSlot, 0);
  }

  public CraftingInventory(int length, int width, int outputSlot, int offset) {
    this(new Grid(length, width), outputSlot, offset);
  }
View Full Code Here


  public CraftingInventory(int length, int width, int outputSlot, int offset) {
    this(new Grid(length, width), outputSlot, offset);
  }

  public CraftingInventory(int length, int width, int outputSlot) {
    this(new Grid(length, width), outputSlot);
  }
View Full Code Here

    // 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;
            inv.add(x1, x2, stack);
            from.set(slot, stack);
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;
            inv.add(startSlot, endSlot, stack);
            from.set(slot, stack);
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);
            if (stack.isEmpty()) {
View Full Code Here

TOP

Related Classes of org.spout.api.inventory.shape.Grid

Copyright © 2018 www.massapicom. 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.