mirror of
https://github.com/Dreeam-qwq/Gale.git
synced 2025-12-27 10:39:12 +00:00
Replace shape full block cache with hashtable
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: MartijnMuijsers <martijnmuijsers@live.nl>
|
||||
Date: Wed, 30 Nov 2022 20:17:41 +0100
|
||||
Subject: [PATCH] Check frozen ticks before landing block
|
||||
|
||||
License: LGPL-3.0 (https://www.gnu.org/licenses/lgpl-3.0.html)
|
||||
|
||||
This patch is based on the following mixin:
|
||||
"me/jellysquid/mods/lithium/mixin/entity/fast_powder_snow_check/LivingEntityMixin.java"
|
||||
By: 2No2Name <2No2Name@web.de>
|
||||
As part of: Lithium (https://github.com/CaffeineMC/lithium-fabric)
|
||||
Licensed under: LGPL-3.0 (https://www.gnu.org/licenses/lgpl-3.0.html)
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 5926ea4a5ad74cfaf8a33ad8d14e60e21bae606b..05168f8b8f542e73e7296a0b3f892d35924394ba 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -574,11 +574,10 @@ public abstract class LivingEntity extends Entity {
|
||||
}
|
||||
|
||||
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;
|
||||
@@ -588,7 +587,6 @@ public abstract class LivingEntity extends Entity {
|
||||
|
||||
attributemodifiable.addTransientModifier(new AttributeModifier(LivingEntity.SPEED_MODIFIER_POWDER_SNOW_UUID, "Powder snow slow", (double) f, AttributeModifier.Operation.ADDITION));
|
||||
}
|
||||
- }
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user