9
0
mirror of https://github.com/BX-Team/DivineMC.git synced 2025-12-23 16:59:24 +00:00
Files
DivineMC/patches/server/0041-lithium-entity.fast_powder_snow_check.patch
2023-01-08 12:29:20 +03: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 f24b8baf01c4e25c0ddff6f7726d1ac6d5345930..857fb16dfb9593ea1ef1da7c4f80f0f7f5a729f7 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -570,11 +570,11 @@ public abstract class LivingEntity extends Entity {
}
protected void tryAddFrost() {
- if (!this.getBlockStateOnLegacy().isAir()) {
+ //if (!this.getBlockStateOnLegacy().isAir()) { // DivineMC
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); // DivineMC
if (attributemodifiable == null) {
return;
@@ -584,7 +584,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));
}
- }
+ //} // DivineMC
}