Files
MiraiMC/patches/server/0064-lithium-entity.fast_powder_snow_check.patch
2022-07-21 19:36:05 +02:00

36 lines
1.7 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: 2No2Name <2No2Name@web.de>
Date: Sat, 8 Jan 2022 03:51:28 +0100
Subject: [PATCH] lithium: entity.fast_powder_snow_check
Original code by CaffeineMC, licensed under GNU Lesser General Public License v3.0
You can find the original code on https://github.com/CaffeineMC/lithium-fabric (Yarn mappings)
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 9e71182c927dec5ede91d7e7c6a842e69b10db6a..858ccbfd456777a61e9579beb997abb568d5b75e 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -569,11 +569,11 @@ public abstract class LivingEntity extends Entity {
}
protected void tryAddFrost() {
- if (!this.getBlockStateOnLegacy().isAir()) {
+ //if (!this.getBlockStateOnLegacy().isAir()) { // Mirai
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); // Mirai
if (attributemodifiable == null) {
return;
@@ -583,7 +583,7 @@ public abstract class LivingEntity extends Entity {
attributemodifiable.addTransientModifier(new AttributeModifier(LivingEntity.SPEED_MODIFIER_POWDER_SNOW_UUID, "Powder snow slow", (double) f, AttributeModifier.Operation.ADDITION));
}
- }
+ //} // Mirai
}