From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Ivan Pekov <ivan@mrivanplays.com>
Date: Tue, 1 Sep 2020 19:11:50 +0300
Subject: [PATCH] Nuke streams off BlockPosition


diff --git a/src/main/java/net/minecraft/core/BlockPosition.java b/src/main/java/net/minecraft/core/BlockPosition.java
index bb520b56d797cabec86fce42dd4afff018e66fdd..9c508cc41575175d442cd51d75706830351a24f2 100644
--- a/src/main/java/net/minecraft/core/BlockPosition.java
+++ b/src/main/java/net/minecraft/core/BlockPosition.java
@@ -325,7 +325,15 @@ public class BlockPosition extends BaseBlockPosition {
     }
 
     public static Optional<BlockPosition> a(BlockPosition blockposition, int i, int j, Predicate<BlockPosition> predicate) {
-        return b(blockposition, i, j, i).filter(predicate).findFirst();
+        // Yatopia start - avoid using stream
+        // return b(blockposition, i, j, i).filter(predicate).findFirst();
+        for (BlockPosition pos : a(blockposition, i, j, i)) {
+            if (predicate.test(pos)) {
+                return Optional.of(pos);
+            }
+        }
+        return Optional.empty();
+        // Yatopia end
     }
 
     public static Stream<BlockPosition> b(BlockPosition blockposition, int i, int j, int k) {
diff --git a/src/main/java/net/minecraft/world/level/block/state/BlockBase.java b/src/main/java/net/minecraft/world/level/block/state/BlockBase.java
index 66ab0911279f8b6e4718c99009e5194bef62e57d..b6de70c3630d96d0782a657c0389ce03839d8c43 100644
--- a/src/main/java/net/minecraft/world/level/block/state/BlockBase.java
+++ b/src/main/java/net/minecraft/world/level/block/state/BlockBase.java
@@ -735,6 +735,7 @@ public abstract class BlockBase {
             return this.getBlock().getInventory(this.p(), world, blockposition);
         }
 
+        public final boolean hasTag(Tag<Block> tag) { return a(tag); } // Yatopia - OBFHELPER
         public boolean a(Tag<Block> tag) {
             return this.getBlock().a(tag);
         }
