mirror of
https://code.chipmunk.land/ChomeNS/chipmunkmod.git
synced 2025-11-13 18:46:15 +00:00
fix: fall back to chat if above or below world Y limit
This commit is contained in:
parent
a6d6ed198c
commit
051a2b2f27
1 changed files with 10 additions and 0 deletions
|
|
@ -358,6 +358,16 @@ public class CommandCore {
|
||||||
|
|
||||||
if (player == null || world == null || !player.isInCreativeMode()) return;
|
if (player == null || world == null || !player.isInCreativeMode()) return;
|
||||||
|
|
||||||
|
final DimensionType dimensionType = world.getDimension();
|
||||||
|
|
||||||
|
if (
|
||||||
|
player.getPos().getY() < dimensionType.minY()
|
||||||
|
|| player.getPos().getY() > dimensionType.height() + dimensionType.minY()
|
||||||
|
) {
|
||||||
|
networkHandler.sendChatCommand(command);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
final ClientPlayerInteractionManager interactionManager = client.interactionManager;
|
final ClientPlayerInteractionManager interactionManager = client.interactionManager;
|
||||||
if (interactionManager == null) return;
|
if (interactionManager == null) return;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue