From 4bed6260bf4b516c33dac70f3cacd736e7f6154b Mon Sep 17 00:00:00 2001 From: SamB440 Date: Fri, 9 Aug 2024 15:01:43 +0100 Subject: [PATCH] Use DimensionType#isUltraWarm --- .../java/ac/grim/grimac/predictionengine/PlayerBaseTick.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/ac/grim/grimac/predictionengine/PlayerBaseTick.java b/src/main/java/ac/grim/grimac/predictionengine/PlayerBaseTick.java index b6dd26c08a..a519bf65b3 100644 --- a/src/main/java/ac/grim/grimac/predictionengine/PlayerBaseTick.java +++ b/src/main/java/ac/grim/grimac/predictionengine/PlayerBaseTick.java @@ -133,10 +133,10 @@ private void updateFluidOnEyes() { public void updateInWaterStateAndDoFluidPushing() { updateInWaterStateAndDoWaterCurrentPushing(); - double d = player.bukkitPlayer != null && player.bukkitPlayer.getWorld().getEnvironment() == World.Environment.NETHER ? 0.007 : 0.0023333333333333335; + final double multiplier = player.dimensionType.isUltraWarm() ? 0.007 : 0.0023333333333333335; // 1.15 and below clients use block collisions to check for being in lava if (player.getClientVersion().isNewerThanOrEquals(ClientVersion.V_1_16)) - player.wasTouchingLava = this.updateFluidHeightAndDoFluidPushing(FluidTag.LAVA, d); + player.wasTouchingLava = this.updateFluidHeightAndDoFluidPushing(FluidTag.LAVA, multiplier); // 1.13 and below clients use this stupid method to check if in lava else if (player.getClientVersion().isOlderThan(ClientVersion.V_1_14)) { SimpleCollisionBox playerBox = player.boundingBox.copy().expand(-0.1F, -0.4F, -0.1F);