player.openGui( XActMod.instance, (meta << 8) | guiID, player.worldObj, x, y, z );
return;
}
if( action == 0x02 ) {
InteractiveCraftingContainer container = (InteractiveCraftingContainer) ((EntityPlayer) packetSender).openContainer;
int stacks = packetData.readByte();
int offSet = packetData.readByte();
for( int i = 0; i < stacks; i++ ) {
ItemStack item = getItemStack( packetData );
container.setStack( offSet++, item );
}
return;
}
// Gui sending an ItemStack to Container.
if( action == 0x03 ) {
int slotID = packetData.readByte();
InteractiveCraftingContainer container = (InteractiveCraftingContainer) ((EntityPlayer) packetSender).openContainer;
// clear the grid before placing the stacks.
if( slotID == -1 ) {
container.setStack( -1, null );
return;
}
// place a recipe on the slot.
ItemStack stack = getItemStack( packetData );
container.setStack( slotID, stack );
return;
}
// GuiPlan requesting a recipe (server side)
if( action == 0x04 ) {