From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: violetc <58360096+s-yh-china@users.noreply.github.com> Date: Thu, 20 Jul 2023 20:33:52 +0800 Subject: [PATCH] Check frozen ticks before landing block This patch is Powered by Gale(https://github.com/GaleMC/Gale) diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java index af8f8161b940afb1b77dee7cc2711e42738a6bed..c578497c824021e571b21b1b938705e7f585632c 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -564,11 +564,11 @@ public abstract class LivingEntity extends Entity implements Attackable { } protected void tryAddFrost() { - if (!this.getBlockStateOnLegacy().isAir()) { + if (org.leavesmc.leaves.LeavesConfig.checkFrozenTicksBeforeLandingBlock || !this.getBlockStateOnLegacy().isAir()) { // Leaves - check frozen ticks before landing block int i = this.getTicksFrozen(); if (i > 0) { - AttributeInstance attributemodifiable = this.getAttribute(Attributes.MOVEMENT_SPEED); + AttributeInstance attributemodifiable = !org.leavesmc.leaves.LeavesConfig.checkFrozenTicksBeforeLandingBlock || !this.getBlockStateOnLegacy().isAir() ? this.getAttribute(Attributes.MOVEMENT_SPEED) : null; // Leaves - check frozen ticks before landing block if (attributemodifiable == null) { return;