32 lines
1.5 KiB
Diff
32 lines
1.5 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: MrHua269 <novau233@163.com>
|
|
Date: Sun, 28 Jan 2024 09:30:22 +0000
|
|
Subject: [PATCH] Gale Check frozen ticks before landing block
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
|
index dc80c44f52bb7acaf7d90e1c6f01c4de981f69b4..623304ea71a30d967e5ae3fa4c17f02fe305d37b 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
|
@@ -589,11 +589,10 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
|
}
|
|
|
|
protected void tryAddFrost() {
|
|
- if (!this.getBlockStateOnLegacy().isAir()) {
|
|
int i = this.getTicksFrozen();
|
|
|
|
if (i > 0) {
|
|
- AttributeInstance attributemodifiable = this.getAttribute(Attributes.MOVEMENT_SPEED);
|
|
+ AttributeInstance attributemodifiable = this.getBlockStateOnLegacy().isAir() ? null : this.getAttribute(Attributes.MOVEMENT_SPEED); // Gale - Lithium - check frozen ticks before landing block
|
|
|
|
if (attributemodifiable == null) {
|
|
return;
|
|
@@ -603,7 +602,6 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
|
|
|
attributemodifiable.addTransientModifier(new AttributeModifier(LivingEntity.SPEED_MODIFIER_POWDER_SNOW_UUID, "Powder snow slow", (double) f, AttributeModifier.Operation.ADDITION));
|
|
}
|
|
- }
|
|
|
|
}
|
|
|