From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Dreeam <61569423+Dreeam-qwq@users.noreply.github.com> Date: Fri, 7 Jun 2024 17:43:43 +0800 Subject: [PATCH] Remove stream in BlockBehaviour cache blockstate diff --git a/net/minecraft/world/level/block/state/BlockBehaviour.java b/net/minecraft/world/level/block/state/BlockBehaviour.java index bf77d02d8fc58b5a16c67a305fe0991ad08a795c..7afaa15102eb625245c2ccb31deeb6d1df658284 100644 --- a/net/minecraft/world/level/block/state/BlockBehaviour.java +++ b/net/minecraft/world/level/block/state/BlockBehaviour.java @@ -1067,8 +1067,14 @@ public abstract class BlockBehaviour implements FeatureElement { ) ); } else { - this.largeCollisionShape = Arrays.stream(Direction.Axis.values()) - .anyMatch(dir -> this.collisionShape.min(dir) < 0.0 || this.collisionShape.max(dir) > 1.0); + // Leaf start - Remove stream + for (Direction.Axis axis : Direction.Axis.values()) { + if (this.collisionShape.min(axis) < 0.0 || this.collisionShape.max(axis) > 1.0) { + this.largeCollisionShape = true; + break; + } + } + // Leaf end - Remove stream this.faceSturdy = new boolean[DIRECTIONS.length * SUPPORT_TYPE_COUNT]; for (Direction direction : DIRECTIONS) {