mirror of
https://github.com/Winds-Studio/Leaf.git
synced 2025-12-24 01:19:25 +00:00
Cleanup Remove stream in Brain
This commit is contained in:
@@ -6,7 +6,7 @@ Subject: [PATCH] Remove stream in BehaviorUtils
|
||||
Dreeam TODO: Check this
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/ai/behavior/BehaviorUtils.java b/src/main/java/net/minecraft/world/entity/ai/behavior/BehaviorUtils.java
|
||||
index 74fe07a3737728b67987ef794103346c1e428109..e2de86d7a86fde183c3ece4de0a1f899a7c3b8b0 100644
|
||||
index 74fe07a3737728b67987ef794103346c1e428109..2c602383d1e440cb250a31d41f3fd0ecb74d7247 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/ai/behavior/BehaviorUtils.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/ai/behavior/BehaviorUtils.java
|
||||
@@ -122,12 +122,20 @@ public class BehaviorUtils {
|
||||
@@ -16,7 +16,7 @@ index 74fe07a3737728b67987ef794103346c1e428109..e2de86d7a86fde183c3ece4de0a1f899
|
||||
- Stream<SectionPos> stream = SectionPos.cube(center, radius).filter((sectionposition1) -> { // CraftBukkit - decompile error
|
||||
- return world.sectionsToVillage(sectionposition1) < j;
|
||||
- });
|
||||
+ // Leaf start - Remove stream usage
|
||||
+ // Leaf start - Remove stream in BehaviorUtils
|
||||
+ SectionPos closestSection = center;
|
||||
+ int closestDistance = j;
|
||||
|
||||
@@ -30,7 +30,7 @@ index 74fe07a3737728b67987ef794103346c1e428109..e2de86d7a86fde183c3ece4de0a1f899
|
||||
+ }
|
||||
+ }
|
||||
+ return closestSection;
|
||||
+ // Leaf end - Remove stream usage
|
||||
+ // Leaf end - Remove stream in BehaviorUtils
|
||||
}
|
||||
|
||||
public static boolean isWithinAttackRange(Mob mob, LivingEntity target, int rangedWeaponReachReduction) {
|
||||
|
||||
Reference in New Issue
Block a user