mirror of
https://github.com/YatopiaMC/Yatopia.git
synced 2024-12-01 23:23:27 +01:00
0f2c8e806a
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. Paper Changes: bc7ea673a Add internal channel initialization listeners (#5557) b28ad17ac Check for world change in MoveEvent API methods 3095c7592 [Auto] Updated Upstream (CraftBukkit) f56989c97 Add RespawnFlags to PlayerRespawnEvent (#5533) 7579c2667 Add more API to PlayerMoveEvent (#5553) ef60c01c4 [Auto] Updated Upstream (CraftBukkit) 0256dbea3 [Auto] Updated Upstream (Bukkit/CraftBukkit) 91ef74029 Updated Upstream (Spigot) (#5550) fdf2a59d5 Updated Upstream (Bukkit/CraftBukkit) (#5549) Purpur Changes: 97185df [CI-SKIP] Update mcdevimports documentation 1099c24 Config for wither explosion radius (closes #265) c5c9527 Configurable damage settings for magma blocks (adds #247) 1389b02 Updated Upstream (Paper) (#300) 79c82d2 Configuration to change the maximum number of bees in a hive (#301) 9fd776e Add configurable minecart speed and move controllable minecart options
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 21ed288b5d0e7416fb6c5ec7d3112281ab805c0b..04d8ef920afd473c8218e2065d3fe9cc57543d37 100644
|
|
--- a/src/main/java/net/minecraft/core/BlockPosition.java
|
|
+++ b/src/main/java/net/minecraft/core/BlockPosition.java
|
|
@@ -324,7 +324,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);
|
|
}
|