Skip to content

Commit

Permalink
fix: gate guis not opening when on walls
Browse files Browse the repository at this point in the history
  • Loading branch information
MrTJP committed Jun 12, 2023
1 parent 32f4345 commit 8e9c9fa
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import codechicken.lib.packet.PacketCustomChannelBuilder;
import codechicken.multipart.api.part.TMultiPart;
import codechicken.multipart.block.BlockMultiPart;
import codechicken.multipart.block.TileMultiPart;
import mrtjp.projectred.integration.gui.screen.CounterScreen;
import mrtjp.projectred.integration.gui.screen.TimerScreen;
import mrtjp.projectred.integration.part.ComplexGatePart;
Expand Down Expand Up @@ -48,8 +49,8 @@ public static MCDataOutput writePartIndex(MCDataOutput out, TMultiPart part) {

public static TMultiPart readPartIndex(World world, MCDataInput in) {
BlockPos pos = in.readPos();
int slot = in.readUByte();
return BlockMultiPart.getPart(world, pos, slot);
int index = in.readUByte();
return BlockMultiPart.getTile(world, pos).getPartList().get(index);
}

private static class ClientHandler implements ICustomPacketHandler.IClientPacketHandler {
Expand Down

0 comments on commit 8e9c9fa

Please sign in to comment.