mirror of
https://github.com/Ellpeck/PrettyPipes.git
synced 2024-11-22 19:58:35 +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());
|
return ((IModule) stack.getItem()).getContainer(stack, tile, windowId, inv, player, data.getFirst());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean shouldTriggerClientSideContainerClosingOnOpen() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}, buf -> {
|
}, buf -> {
|
||||||
buf.writeBlockPos(pos);
|
buf.writeBlockPos(pos);
|
||||||
buf.writeInt(data.getFirst());
|
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);
|
return new MainPipeContainer(Registry.pipeContainer, window, player, PipeBlockEntity.this.worldPosition);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean shouldTriggerClientSideContainerClosingOnOpen() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ConnectionType getConnectionType(BlockPos pipePos, Direction direction) {
|
public ConnectionType getConnectionType(BlockPos pipePos, Direction direction) {
|
||||||
var state = this.level.getBlockState(pipePos.relative(direction));
|
var state = this.level.getBlockState(pipePos.relative(direction));
|
||||||
|
|
Loading…
Reference in a new issue