fixed mouse being centered when switching between pipe tabs

This commit is contained in:
Ell 2024-09-27 16:41:31 +02:00
parent 861f219806
commit 69eb4387f2
2 changed files with 9 additions and 0 deletions

View file

@ -80,6 +80,10 @@ public record PacketButton(BlockPos pos, int result, List<Integer> data) impleme
return ((IModule) stack.getItem()).getContainer(stack, tile, windowId, inv, player, data.getFirst());
}
@Override
public boolean shouldTriggerClientSideContainerClosingOnOpen() {
return false;
}
}, buf -> {
buf.writeBlockPos(pos);
buf.writeInt(data.getFirst());

View file

@ -427,6 +427,11 @@ public class PipeBlockEntity extends BlockEntity implements MenuProvider, IPipeC
return new MainPipeContainer(Registry.pipeContainer, window, player, PipeBlockEntity.this.worldPosition);
}
@Override
public boolean shouldTriggerClientSideContainerClosingOnOpen() {
return false;
}
@Override
public ConnectionType getConnectionType(BlockPos pipePos, Direction direction) {
var state = this.level.getBlockState(pipePos.relative(direction));