9
0
mirror of https://github.com/LeavesMC/Leaves.git synced 2026-01-04 15:41:31 +00:00
Files
LeavesMC/leaves-server/minecraft-patches/features/0066-Check-frozen-ticks-before-landing-block.patch
MC_XiaoHei 90080d238e 1.21.10 (#752)
---------

Co-authored-by: Lumine1909 <133463833+Lumine1909@users.noreply.github.com>
Co-authored-by: violetc <58360096+s-yh-china@users.noreply.github.com>
Co-authored-by: Helvetica Volubi <88063803+Suisuroru@users.noreply.github.com>
2025-11-28 03:15:54 +08:00

25 lines
1.5 KiB
Diff

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/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java
index 545e9c5f46dd4f8e016ed0a93f2049d1b687dd3c..1a7135f2fda41265c75448e8ca9fec1c64de8e97 100644
--- a/net/minecraft/world/entity/LivingEntity.java
+++ b/net/minecraft/world/entity/LivingEntity.java
@@ -544,10 +544,10 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
}
protected void tryAddFrost() {
- if (!this.getBlockStateOnLegacy().isAir()) {
+ if (org.leavesmc.leaves.LeavesConfig.performance.checkFrozenTicksBeforeLandingBlock || !this.getBlockStateOnLegacy().isAir()) { // Leaves - check frozen ticks before landing block
int ticksFrozen = this.getTicksFrozen();
if (ticksFrozen > 0) {
- AttributeInstance attribute = this.getAttribute(Attributes.MOVEMENT_SPEED);
+ AttributeInstance attribute = !org.leavesmc.leaves.LeavesConfig.performance.checkFrozenTicksBeforeLandingBlock || !this.getBlockStateOnLegacy().isAir() ? this.getAttribute(Attributes.MOVEMENT_SPEED) : null; // Leaves - check frozen ticks before landing block
if (attribute == null) {
return;
}