And the latest Lithium patches
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
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 df33f1021eda772605bb4423eb2b103d51397557..35a15b012653e493b554c17afa1b01e423ed6d6b 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -566,11 +566,11 @@ public abstract class LivingEntity extends Entity {
|
||||
}
|
||||
|
||||
protected void tryAddFrost() {
|
||||
- if (!this.getBlockStateOn().isAir()) {
|
||||
+ //if (!this.getBlockStateOn().isAir()) { // Mirai
|
||||
int i = this.getTicksFrozen();
|
||||
|
||||
if (i > 0) {
|
||||
- AttributeInstance attributemodifiable = this.getAttribute(Attributes.MOVEMENT_SPEED);
|
||||
+ AttributeInstance attributemodifiable = this.getBlockStateOn().isAir() ? null : this.getAttribute(Attributes.MOVEMENT_SPEED); // Mirai
|
||||
|
||||
if (attributemodifiable == null) {
|
||||
return;
|
||||
@@ -580,7 +580,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
|
||||
|
||||
}
|
||||
|
||||
32
patches/server/0098-lithium-collections.attributes.patch
Normal file
32
patches/server/0098-lithium-collections.attributes.patch
Normal file
@@ -0,0 +1,32 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: 2No2Name <2No2Name@web.de>
|
||||
Date: Sun, 9 Jan 2022 17:53:11 +0100
|
||||
Subject: [PATCH] lithium: collections.attributes
|
||||
|
||||
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/ai/attributes/AttributeMap.java b/src/main/java/net/minecraft/world/entity/ai/attributes/AttributeMap.java
|
||||
index 52ddf38d5a1894a248e142c6b9ebaff5cc921e5b..a4a49fde55ccbbe9a91018b422e61dc17a6922e7 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/ai/attributes/AttributeMap.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/ai/attributes/AttributeMap.java
|
||||
@@ -3,6 +3,8 @@ package net.minecraft.world.entity.ai.attributes;
|
||||
import com.google.common.collect.Maps;
|
||||
import com.google.common.collect.Multimap;
|
||||
import com.google.common.collect.Sets;
|
||||
+import it.unimi.dsi.fastutil.objects.Reference2ReferenceOpenHashMap; // Mirai
|
||||
+import it.unimi.dsi.fastutil.objects.ReferenceOpenHashSet; // Mirai
|
||||
import java.util.Collection;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
@@ -19,8 +21,8 @@ import org.apache.logging.log4j.Logger;
|
||||
|
||||
public class AttributeMap {
|
||||
private static final Logger LOGGER = LogManager.getLogger();
|
||||
- private final Map<Attribute, AttributeInstance> attributes = Maps.newHashMap();
|
||||
- private final Set<AttributeInstance> dirtyAttributes = Sets.newHashSet();
|
||||
+ private final Map<Attribute, AttributeInstance> attributes = new Reference2ReferenceOpenHashMap<>(); // Mirai
|
||||
+ private final Set<AttributeInstance> dirtyAttributes = new ReferenceOpenHashSet<>(); // Mirai
|
||||
private final AttributeSupplier supplier;
|
||||
private final java.util.function.Function<Attribute, AttributeInstance> createInstance; // Pufferfish
|
||||
|
||||
Reference in New Issue
Block a user