Null pointer exception when selecting an item to build in the assembly table.
This commit is contained in:
parent
648cbf7dda
commit
20e5a70575
1 changed files with 10 additions and 8 deletions
|
@ -14,6 +14,7 @@ import java.util.LinkedList;
|
||||||
|
|
||||||
import net.minecraft.src.IInventory;
|
import net.minecraft.src.IInventory;
|
||||||
import net.minecraft.src.ItemStack;
|
import net.minecraft.src.ItemStack;
|
||||||
|
import net.minecraft.src.buildcraft.api.APIProxy;
|
||||||
import net.minecraft.src.buildcraft.core.AssemblyRecipe;
|
import net.minecraft.src.buildcraft.core.AssemblyRecipe;
|
||||||
import net.minecraft.src.buildcraft.core.CoreProxy;
|
import net.minecraft.src.buildcraft.core.CoreProxy;
|
||||||
import net.minecraft.src.buildcraft.core.GuiAdvancedInterface;
|
import net.minecraft.src.buildcraft.core.GuiAdvancedInterface;
|
||||||
|
@ -148,16 +149,17 @@ public class GuiAssemblyTable extends GuiAdvancedInterface {
|
||||||
|
|
||||||
ContainerAssemblyTable container = (ContainerAssemblyTable)inventorySlots;
|
ContainerAssemblyTable container = (ContainerAssemblyTable)inventorySlots;
|
||||||
|
|
||||||
PacketPayload payload = TileAssemblyTable.selectionMessageWrapper
|
if(APIProxy.isRemote()) {
|
||||||
.toPayload(container.x, container.y,
|
PacketPayload payload = TileAssemblyTable.selectionMessageWrapper.toPayload(container.x, container.y,container.z, message);
|
||||||
container.z, message);
|
|
||||||
|
|
||||||
PacketUpdate packet = new PacketUpdate(PacketIds.SELECTION_ASSEMBLY, payload);
|
PacketUpdate packet = new PacketUpdate(PacketIds.SELECTION_ASSEMBLY, payload);
|
||||||
packet.posX = container.x;
|
packet.posX = container.x;
|
||||||
packet.posY = container.y;
|
packet.posY = container.y;
|
||||||
packet.posZ = container.z;
|
packet.posZ = container.z;
|
||||||
|
|
||||||
CoreProxy.sendToServer(packet.getPacket());
|
CoreProxy.sendToServer(packet.getPacket());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue