Skip to content

Commit

Permalink
Use DimensionType#isUltraWarm
Browse files Browse the repository at this point in the history
  • Loading branch information
SamB440 committed Aug 9, 2024
1 parent b5c8558 commit 4bed626
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 4bed626

Please sign in to comment.