mirror of
https://github.com/YatopiaMC/Yatopia.git
synced 2025-02-27 09:42:45 +01:00
Upstream/An Sidestream has released updates that appears to apply and compile correctly This update has NOT been tested by YatopiaMC and as with ANY update, please do your own testing. Tuinity Changes: f32fe9a Updated Upstream (Paper) Airplane Changes: 125aff7 Updated Upstream (Tuinity) Origami Changes: 756162f Update Paper 2f9721c Update snakeyaml and enable comment loading/saving
40 lines
2.0 KiB
Diff
40 lines
2.0 KiB
Diff
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 902cdf1b2ba56534d80ce270a84b8d3ab0b026dc..84e753804f58cbbe1b3b30aa1fe1fecd739a1551 100644
|
|
--- a/src/main/java/net/minecraft/core/BlockPosition.java
|
|
+++ b/src/main/java/net/minecraft/core/BlockPosition.java
|
|
@@ -318,7 +318,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 9465bce44f5ac4b448736d9c029ea411c27843ac..59dcb83f04bebb4f3b28b5e0e01da5fb7f03be34 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
|
|
@@ -732,6 +732,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);
|
|
}
|