Package logisticspipes.network.packets

Examples of logisticspipes.network.packets.NEISetCraftingRecipe


    } else {
      return;
    }
   
    ItemStack[] stack = new ItemStack[9];
    NEISetCraftingRecipe packet = PacketHandler.getPacket(NEISetCraftingRecipe.class);
    for(PositionedStack ps : recipe.getIngredientStacks(recipeIndex)) {
      int x = (ps.relx - 25) / 18;
      int y = (ps.rely - 6) / 18;
      int slot = x + y * 3;
      if(x < 0 || x > 2 || y < 0 || y > 2 || slot < 0 || slot > 8) {
        FMLClientHandler.instance().getClient().thePlayer.sendChatMessage("Internal Error. This button is broken.");
        return;
      }
      if(slot < 9) {
        stack[slot] = ps.items[0];
      }
    }
    MainProxy.sendPacketToServer(packet.setContent(stack).setPosX(tile.xCoord).setPosY(tile.yCoord).setPosZ(tile.zCoord));
  }
View Full Code Here

TOP

Related Classes of logisticspipes.network.packets.NEISetCraftingRecipe

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.