mirror of
https://github.com/Winds-Studio/Leaf.git
synced 2026-01-06 15:51:31 +00:00
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@1004374a Add further information to thread check errors PaperMC/Paper@e2f0efd1 Remove nms.Entity#isChunkLoaded PaperMC/Paper@54b2e9d9 Add buffer to CraftWorld#warnUnsafeChunk PaperMC/Paper@d4a95784 Experimental annotation changes (#12028) PaperMC/Paper@5bcfb12a Fix activation range config and water animal status (#12047) PaperMC/Paper@e0711af5 Deprecate UnsafeValues#getSpawnEggLayerColor (#12041) PaperMC/Paper@8927091a Do not record movement for vehicles/players unaffected by blocks PaperMC/Paper@5395ae37 Fix composter block setting bukkit owner twice (#12058) Gale Changes: Dreeam-qwq/Gale@534623a0 Updated Upstream (Paper) Dreeam-qwq/Gale@7274f287 Updated Upstream (Paper) Dreeam-qwq/Gale@e9ffadfd Updated Upstream (Paper) Dreeam-qwq/Gale@9e6d19de Updated Upstream (Paper) Dreeam-qwq/Gale@f35382c4 Updated Upstream (Paper) Purpur Changes: PurpurMC/Purpur@9b575764 Updated Upstream (Paper) PurpurMC/Purpur@88ed7442 Updated Upstream (Paper) PurpurMC/Purpur@79c11927 only initialize the config once, closes #1637 PurpurMC/Purpur@c7bb955e Updated Upstream (Paper) PurpurMC/Purpur@2fe4cf18 [ci/skip] fix indentation PurpurMC/Purpur@65637fa6 fix(mobs/bee): Set `takes-damage-from-water` back to false by default, closes #1639 PurpurMC/Purpur@16cfd04b feat(mobs/bee): Add `can-instantly-start-drowning` option, defaults to `true` PurpurMC/Purpur@4f481858 fix: correctly call force when sending particles
76 lines
3.1 KiB
Diff
76 lines
3.1 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Taiyou06 <kaandindar21@gmail.com>
|
|
Date: Mon, 11 Nov 2024 16:55:50 -0500
|
|
Subject: [PATCH] Remove stream in updateFluidOnEyes
|
|
|
|
|
|
diff --git a/net/minecraft/core/Holder.java b/net/minecraft/core/Holder.java
|
|
index 6c7edbbf3935c40ccb78bee680ea75431718b9bd..a1b4dc70d555cce5e06c0298736d8b89e04a96be 100644
|
|
--- a/net/minecraft/core/Holder.java
|
|
+++ b/net/minecraft/core/Holder.java
|
|
@@ -29,6 +29,8 @@ public interface Holder<T> {
|
|
|
|
Stream<TagKey<T>> tags();
|
|
|
|
+ Set<TagKey<T>> tagsAsSet(); // Leaf - Remove stream in updateFluidOnEyes
|
|
+
|
|
Either<ResourceKey<T>, T> unwrap();
|
|
|
|
Optional<ResourceKey<T>> unwrapKey();
|
|
@@ -105,6 +107,13 @@ public interface Holder<T> {
|
|
public Stream<TagKey<T>> tags() {
|
|
return Stream.of();
|
|
}
|
|
+
|
|
+ // Leaf start - Remove stream in updateFluidOnEyes
|
|
+ @Override
|
|
+ public Set<TagKey<T>> tagsAsSet() {
|
|
+ return Set.of();
|
|
+ }
|
|
+ // Leaf end - Remove stream in updateFluidOnEyes
|
|
}
|
|
|
|
public static enum Kind {
|
|
@@ -238,6 +247,13 @@ public interface Holder<T> {
|
|
return this.boundTags().stream();
|
|
}
|
|
|
|
+ // Leaf start - Remove stream in updateFluidOnEyes
|
|
+ @Override
|
|
+ public Set<TagKey<T>> tagsAsSet() {
|
|
+ return this.boundTags();
|
|
+ }
|
|
+ // Leaf end - Remove stream in updateFluidOnEyes
|
|
+
|
|
@Override
|
|
public String toString() {
|
|
return "Reference{" + this.key + "=" + this.value + "}";
|
|
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
|
index 8bb2abb01f1af34d6829cbbf759a425d871f3e3f..40bc2f9ffc565229f1ba8910ebc3bb7be5f849c6 100644
|
|
--- a/net/minecraft/world/entity/Entity.java
|
|
+++ b/net/minecraft/world/entity/Entity.java
|
|
@@ -1983,7 +1983,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
|
FluidState fluidState = this.level().getFluidState(blockPos);
|
|
double d = blockPos.getY() + fluidState.getHeight(this.level(), blockPos);
|
|
if (d > eyeY) {
|
|
- fluidState.getTags().forEach(this.fluidOnEyes::add);
|
|
+ this.fluidOnEyes.addAll(fluidState.getTagsAsSet()); // Leaf - Remove stream in updateFluidOnEyes
|
|
}
|
|
}
|
|
}
|
|
diff --git a/net/minecraft/world/level/material/FluidState.java b/net/minecraft/world/level/material/FluidState.java
|
|
index 481cb46973acb9785fdee5732e98aac560c6ec08..06581fe010ca722d62d0b6d3c44d845f9db0231f 100644
|
|
--- a/net/minecraft/world/level/material/FluidState.java
|
|
+++ b/net/minecraft/world/level/material/FluidState.java
|
|
@@ -158,4 +158,10 @@ public final class FluidState extends StateHolder<Fluid, FluidState> implements
|
|
public Stream<TagKey<Fluid>> getTags() {
|
|
return this.owner.builtInRegistryHolder().tags();
|
|
}
|
|
+
|
|
+ // Leaf start - Remove stream in updateFluidOnEyes
|
|
+ public java.util.Set<TagKey<Fluid>> getTagsAsSet() {
|
|
+ return this.owner.builtInRegistryHolder().tagsAsSet();
|
|
+ }
|
|
+ // Leaf end - Remove stream in updateFluidOnEyes
|
|
}
|