mirror of
https://github.com/Ellpeck/PrettyPipes.git
synced 2024-11-22 03:43:30 +01:00
fixed mouse being centered when switching between pipe tabs
This commit is contained in:
parent
861f219806
commit
69eb4387f2
2 changed files with 9 additions and 0 deletions
|
@ -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());
|
||||
|
|
|
@ -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));
|
||||
|
|
Loading…
Reference in a new issue