mirror of
https://github.com/YatopiaMC/Yatopia.git
synced 2025-02-02 21:41:25 +01:00
Updated upstream & removed 1 patch from EMC
Fixes #150 Should help with #151 , #149 , #148
This commit is contained in:
parent
e1a085de4c
commit
78c24fde6d
@ -1 +1 @@
|
|||||||
Subproject commit 6231ef066e60b26b109b841fc7c1056a50a6700e
|
Subproject commit ff909c448adee41a4de623acaf181b87314bdeaa
|
2
Origami
2
Origami
@ -1 +1 @@
|
|||||||
Subproject commit 71e7cd37ec36dbcedabcce74d49509b7aacba6cf
|
Subproject commit a67089df00f153c488382147160cf88b70b3fe58
|
@ -101,7 +101,6 @@ # Patches
|
|||||||
| server | Squid EAR immunity | William Blake Galbreath | |
|
| server | Squid EAR immunity | William Blake Galbreath | |
|
||||||
| server | Swaps the predicate order of collision | ㄗㄠˋ ㄑㄧˊ | |
|
| server | Swaps the predicate order of collision | ㄗㄠˋ ㄑㄧˊ | |
|
||||||
| server | Tulips change fox type | William Blake Galbreath | |
|
| server | Tulips change fox type | William Blake Galbreath | |
|
||||||
| server | Tweak Explosions | Aikar | |
|
|
||||||
| server | Use arrow despawn rate for all projectiles | William Blake Galbreath | |
|
| server | Use arrow despawn rate for all projectiles | William Blake Galbreath | |
|
||||||
| server | Use block distance in portal search radius | Patrick Hemmer | |
|
| server | Use block distance in portal search radius | Patrick Hemmer | |
|
||||||
| server | Use offline uuids if we need to | Ivan Pekov | |
|
| server | Use offline uuids if we need to | Ivan Pekov | |
|
||||||
|
2
Purpur
2
Purpur
@ -1 +1 @@
|
|||||||
Subproject commit e28eb8c47dc20132e4282ac38ad0186e93724887
|
Subproject commit 7ae2890175b843e954aa975f9a099f746bc16456
|
2
Tuinity
2
Tuinity
@ -1 +1 @@
|
|||||||
Subproject commit f2ac6495ff13f7123bbca4180832723c699e3141
|
Subproject commit 193d9bfd9aa644a173e955e9324c1f5e49e30589
|
@ -1 +1 @@
|
|||||||
Improve-Hopper-Performance&Don-t-trigger-Lootable-Refresh-for-non-player-intera&Tweak-Explosions&Fix-Bukkit.createInventory-with-type-LECTERN&dont-load-chunks-for-physics
|
Improve-Hopper-Performance&Don-t-trigger-Lootable-Refresh-for-non-player-intera&Fix-Bukkit.createInventory-with-type-LECTERN&dont-load-chunks-for-physics
|
@ -1830,19 +1830,10 @@ index a40eff6d66cb3518d1773856dfdf2da816c52470..00000000000000000000000000000000
|
|||||||
- }
|
- }
|
||||||
- }
|
- }
|
||||||
diff --git a/src/main/java/net/minecraft/server/Explosion.java b/src/main/java/net/minecraft/server/Explosion.java
|
diff --git a/src/main/java/net/minecraft/server/Explosion.java b/src/main/java/net/minecraft/server/Explosion.java
|
||||||
index 1ca8dcf2fbcf6a920c18d470f7da90b6daa50b7b..99c88522ad28ceb9489783960e9ff1e3deb7250b 100644
|
index 9544defe124c8f423f0a444fba678aeb95e69f9f..2306c5ac8504bb8a52f73d3f952c8b4ca9b129a4 100644
|
||||||
--- a/src/main/java/net/minecraft/server/Explosion.java
|
--- a/src/main/java/net/minecraft/server/Explosion.java
|
||||||
+++ b/src/main/java/net/minecraft/server/Explosion.java
|
+++ b/src/main/java/net/minecraft/server/Explosion.java
|
||||||
@@ -105,7 +105,7 @@ public class Explosion {
|
@@ -291,7 +291,7 @@ public class Explosion {
|
||||||
int i;
|
|
||||||
int j;
|
|
||||||
|
|
||||||
- if (this.a || this.b != Effect.NONE) { // EMC - don't run block processing if neither flag is set
|
|
||||||
+ if (this.b || this.c != Effect.NONE) { // EMC - don't run block processing if neither flag is set
|
|
||||||
for (int k = 0; k < 16; ++k) {
|
|
||||||
for (i = 0; i < 16; ++i) {
|
|
||||||
for (j = 0; j < 16; ++j) {
|
|
||||||
@@ -293,7 +293,7 @@ public class Explosion {
|
|
||||||
if (!iblockdata.isAir() && iblockdata.isDestroyable()) { // Paper
|
if (!iblockdata.isAir() && iblockdata.isDestroyable()) { // Paper
|
||||||
BlockPosition blockposition1 = blockposition.immutableCopy();
|
BlockPosition blockposition1 = blockposition.immutableCopy();
|
||||||
|
|
||||||
@ -2276,6 +2267,43 @@ index 759862aba781ec6f1ae0c9a76c4ab6352d603a4c..00000000000000000000000000000000
|
|||||||
- // Paper end
|
- // Paper end
|
||||||
-
|
-
|
||||||
- if (chunkHolder.protoChunk != null) {try (Timing ignored2 = this.world.timings.chunkLoadLevelTimer.startTimingIfSync()) { // Paper start - timings // Paper - chunk is created async
|
- if (chunkHolder.protoChunk != null) {try (Timing ignored2 = this.world.timings.chunkLoadLevelTimer.startTimingIfSync()) { // Paper start - timings // Paper - chunk is created async
|
||||||
|
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||||
|
index 68ab91309cce095090940c909caeeae4a1f341b6..511862b33897371f19da9c0a61f81fbd0522e6a2 100644
|
||||||
|
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||||
|
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||||
|
@@ -2827,7 +2827,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||||
|
// Paper end
|
||||||
|
|
||||||
|
public final boolean isDisconnected() {
|
||||||
|
- return (!this.player.joining && !this.networkManager.isConnected()) || this.processedDisconnect; // Paper
|
||||||
|
+ return (!this.player.joining && !this.networkManager.isConnected()) || com.proximyst.rainforest.RainforestConfig.allowPlayerItemDuplication || this.processedDisconnect; // Paper // Rainforest
|
||||||
|
}
|
||||||
|
// CraftBukkit end
|
||||||
|
|
||||||
|
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java.rej b/src/main/java/net/minecraft/server/PlayerConnection.java.rej
|
||||||
|
deleted file mode 100644
|
||||||
|
index 88fabfe2d407a400a95c0ae39482c30eddf17955..0000000000000000000000000000000000000000
|
||||||
|
--- a/src/main/java/net/minecraft/server/PlayerConnection.java.rej
|
||||||
|
+++ /dev/null
|
||||||
|
@@ -1,18 +0,0 @@
|
||||||
|
-diff a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java (rejected hunks)
|
||||||
|
-@@ -4,6 +4,7 @@ import com.google.common.primitives.Doubles;
|
||||||
|
- import com.google.common.primitives.Floats;
|
||||||
|
- import com.mojang.brigadier.ParseResults;
|
||||||
|
- import com.mojang.brigadier.StringReader;
|
||||||
|
-+import com.proximyst.rainforest.RainforestConfig;
|
||||||
|
- import io.netty.util.concurrent.Future;
|
||||||
|
- import io.netty.util.concurrent.GenericFutureListener;
|
||||||
|
- import it.unimi.dsi.fastutil.ints.Int2ShortMap;
|
||||||
|
-@@ -2774,7 +2775,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- public final boolean isDisconnected() {
|
||||||
|
-- return (!this.player.joining && !this.networkManager.isConnected()) || this.processedDisconnect; // Paper
|
||||||
|
-+ return (!this.player.joining && !this.networkManager.isConnected()) || RainforestConfig.allowPlayerItemDuplication || this.processedDisconnect; // Paper // Rainforest
|
||||||
|
- }
|
||||||
|
- // CraftBukkit end
|
||||||
|
-
|
||||||
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
|
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
|
||||||
index 07c54c58f7a9256e2f1c51d99ede36371955be25..2a15972c0a48153fba481b08351642ed36a9da12 100644
|
index 07c54c58f7a9256e2f1c51d99ede36371955be25..2a15972c0a48153fba481b08351642ed36a9da12 100644
|
||||||
--- a/src/main/java/net/minecraft/server/PlayerList.java
|
--- a/src/main/java/net/minecraft/server/PlayerList.java
|
||||||
@ -3086,12 +3114,12 @@ index 361f7857e461578e90cb71e15027dadaf794cb69..1739821b6b0759bcca89b01452fa9bb2
|
|||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java.rej b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java.rej
|
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java.rej b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java.rej
|
||||||
deleted file mode 100644
|
deleted file mode 100644
|
||||||
index 2899c94ef3dadf9e139f8d78003805814288544e..0000000000000000000000000000000000000000
|
index 10ef0fa97bb8ddf026a572d8509e343299d1495e..0000000000000000000000000000000000000000
|
||||||
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java.rej
|
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java.rej
|
||||||
+++ /dev/null
|
+++ /dev/null
|
||||||
@@ -1,13 +0,0 @@
|
@@ -1,13 +0,0 @@
|
||||||
-diff a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java (rejected hunks)
|
-diff a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java (rejected hunks)
|
||||||
-@@ -336,6 +336,11 @@ public class PurpurWorldConfig {
|
-@@ -343,6 +343,11 @@ public class PurpurWorldConfig {
|
||||||
- creeperChargedChance = getDouble("mobs.creeper.naturally-charged-chance", creeperChargedChance);
|
- creeperChargedChance = getDouble("mobs.creeper.naturally-charged-chance", creeperChargedChance);
|
||||||
- }
|
- }
|
||||||
-
|
-
|
||||||
|
@ -4,19 +4,6 @@ Date: Fri, 26 Jun 2020 01:11:47 +0200
|
|||||||
Subject: [PATCH] Optimize Hopper logic
|
Subject: [PATCH] Optimize Hopper logic
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/BlockDropper.java b/src/main/java/net/minecraft/server/BlockDropper.java
|
|
||||||
index 65c212690d8ba7c8ea55d4d3b6af1ba3d9f4a7f6..da8c0ee5184a234f485c2f05e2c6edd965576cbe 100644
|
|
||||||
--- a/src/main/java/net/minecraft/server/BlockDropper.java
|
|
||||||
+++ b/src/main/java/net/minecraft/server/BlockDropper.java
|
|
||||||
@@ -36,7 +36,7 @@ public class BlockDropper extends BlockDispenser {
|
|
||||||
|
|
||||||
if (!itemstack.isEmpty()) {
|
|
||||||
EnumDirection enumdirection = (EnumDirection) worldserver.getType(blockposition).get(BlockDropper.FACING);
|
|
||||||
- IInventory iinventory = TileEntityHopper.b((World) worldserver, blockposition.shift(enumdirection));
|
|
||||||
+ IInventory iinventory = TileEntityHopper.b((World) worldserver, blockposition.shift(enumdirection), false); // Yatopia
|
|
||||||
ItemStack itemstack1;
|
|
||||||
|
|
||||||
if (iinventory == null) {
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/BlockHopper.java b/src/main/java/net/minecraft/server/BlockHopper.java
|
diff --git a/src/main/java/net/minecraft/server/BlockHopper.java b/src/main/java/net/minecraft/server/BlockHopper.java
|
||||||
index a29294fbc7cd6fcfff0df9eadd11de3bd7f1405e..2f66740de68667e5c0054a0bc7990256163087cd 100644
|
index a29294fbc7cd6fcfff0df9eadd11de3bd7f1405e..2f66740de68667e5c0054a0bc7990256163087cd 100644
|
||||||
--- a/src/main/java/net/minecraft/server/BlockHopper.java
|
--- a/src/main/java/net/minecraft/server/BlockHopper.java
|
||||||
@ -35,15 +22,15 @@ index a29294fbc7cd6fcfff0df9eadd11de3bd7f1405e..2f66740de68667e5c0054a0bc7990256
|
|||||||
|
|
||||||
private void a(World world, BlockPosition blockposition, IBlockData iblockdata) {
|
private void a(World world, BlockPosition blockposition, IBlockData iblockdata) {
|
||||||
diff --git a/src/main/java/net/minecraft/server/TileEntityHopper.java b/src/main/java/net/minecraft/server/TileEntityHopper.java
|
diff --git a/src/main/java/net/minecraft/server/TileEntityHopper.java b/src/main/java/net/minecraft/server/TileEntityHopper.java
|
||||||
index 95bede605c6401af10f18b641cd12c9d8ec2f207..1e74b550e4f1ffc7800db24605f9b3f5f5736aae 100644
|
index 95bede605c6401af10f18b641cd12c9d8ec2f207..0a975642ce0cce4cbce02e9be976427ed42cce65 100644
|
||||||
--- a/src/main/java/net/minecraft/server/TileEntityHopper.java
|
--- a/src/main/java/net/minecraft/server/TileEntityHopper.java
|
||||||
+++ b/src/main/java/net/minecraft/server/TileEntityHopper.java
|
+++ b/src/main/java/net/minecraft/server/TileEntityHopper.java
|
||||||
@@ -661,14 +661,62 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi
|
@@ -661,14 +661,93 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
private IInventory l() {
|
private IInventory l() {
|
||||||
+ // Yatopia start
|
+ // Yatopia start
|
||||||
+ if (!blockUnderWasComposter && cachedPush != null) {
|
+ if (!shouldNotCachePush && cachedPush != null) {
|
||||||
+ return cachedPush;
|
+ return cachedPush;
|
||||||
+ }
|
+ }
|
||||||
+ // Yatopia end
|
+ // Yatopia end
|
||||||
@ -54,15 +41,15 @@ index 95bede605c6401af10f18b641cd12c9d8ec2f207..1e74b550e4f1ffc7800db24605f9b3f5
|
|||||||
+ //return b(this.getWorld(), this.position.shift(enumdirection));
|
+ //return b(this.getWorld(), this.position.shift(enumdirection));
|
||||||
+ // basically reimplement TileEntityHopper#b but in a better way in order to
|
+ // basically reimplement TileEntityHopper#b but in a better way in order to
|
||||||
+ // not make them composters bork
|
+ // not make them composters bork
|
||||||
+ BlockPosition shifted = this.position.shift(enumdirection);
|
+ if (shouldNotCachePush || !cachedPushAir) {
|
||||||
+ BlockPosition checkedPosition = new BlockPosition(shifted.getX() + 0.5D, shifted.getY() + 0.5D, shifted.getZ() + 0.5D);
|
+ BlockPosition shifted = this.position.shift(enumdirection);
|
||||||
+ if (blockUnderWasComposter || !cachedPushAir) {
|
+ BlockPosition checkedPosition = new BlockPosition(shifted.getX() + 0.5D, shifted.getY() + 0.5D, shifted.getZ() + 0.5D);
|
||||||
+ if (!world.isLoaded(checkedPosition)) return null;
|
+ if (!world.isLoaded(checkedPosition)) return null;
|
||||||
+ IBlockData blockData = world.getType(checkedPosition);
|
+ IBlockData blockData = world.getType(checkedPosition);
|
||||||
+ Block block = blockData.getBlock();
|
+ Block block = blockData.getBlock();
|
||||||
+ if (block instanceof IInventoryHolder) {
|
+ if (block instanceof IInventoryHolder) {
|
||||||
+ this.cachedPush = ((IInventoryHolder) block).a(blockData, world, checkedPosition);
|
+ this.cachedPush = ((IInventoryHolder) block).a(blockData, world, checkedPosition);
|
||||||
+ blockUnderWasComposter = true;
|
+ shouldNotCachePush = true;
|
||||||
+ } else if (block.isTileEntity()) {
|
+ } else if (block.isTileEntity()) {
|
||||||
+ TileEntity tileEntity = world.getTileEntity(checkedPosition);
|
+ TileEntity tileEntity = world.getTileEntity(checkedPosition);
|
||||||
+ if (tileEntity instanceof IInventory) {
|
+ if (tileEntity instanceof IInventory) {
|
||||||
@ -70,6 +57,9 @@ index 95bede605c6401af10f18b641cd12c9d8ec2f207..1e74b550e4f1ffc7800db24605f9b3f5
|
|||||||
+ if (inv instanceof TileEntityChest && block instanceof BlockChest) {
|
+ if (inv instanceof TileEntityChest && block instanceof BlockChest) {
|
||||||
+ inv = BlockChest.getInventory((BlockChest) block, blockData, world, checkedPosition, true);
|
+ inv = BlockChest.getInventory((BlockChest) block, blockData, world, checkedPosition, true);
|
||||||
+ }
|
+ }
|
||||||
|
+ if (inv instanceof EntityMinecartContainer) {
|
||||||
|
+ shouldNotCachePush = true;
|
||||||
|
+ }
|
||||||
+ this.cachedPush = inv;
|
+ this.cachedPush = inv;
|
||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
@ -86,15 +76,43 @@ index 95bede605c6401af10f18b641cd12c9d8ec2f207..1e74b550e4f1ffc7800db24605f9b3f5
|
|||||||
+ // Yatopia start - replaced logic
|
+ // Yatopia start - replaced logic
|
||||||
+ if (ihopper instanceof TileEntityHopper) {
|
+ if (ihopper instanceof TileEntityHopper) {
|
||||||
+ TileEntityHopper hopper = (TileEntityHopper) ihopper;
|
+ TileEntityHopper hopper = (TileEntityHopper) ihopper;
|
||||||
+ if (hopper.cachedAbove != null) {
|
+ if (!hopper.shouldNotCachePull && hopper.cachedAbove != null) {
|
||||||
+ return hopper.cachedAbove;
|
+ return hopper.cachedAbove;
|
||||||
+ }
|
+ }
|
||||||
+ IInventory inv = a(ihopper.getWorld(), ihopper.x(), ihopper.z() + 1.0D, ihopper.A(), hopper.cachedPullAir);
|
+ // reimplement here too cuz minecarts
|
||||||
+ hopper.cachedAbove = inv;
|
+ BlockPosition pos = new BlockPosition(ihopper.getX(), ihopper.getY() + 1.0D, ihopper.getZ());
|
||||||
|
+ if (hopper.shouldNotCachePull || hopper.cachedPullAir) {
|
||||||
|
+ if (hopper.world.isLoaded(pos)) return null;
|
||||||
|
+ IBlockData blockData = hopper.world.getType(pos);
|
||||||
|
+ Block block = blockData.getBlock();
|
||||||
|
+ if (block instanceof IInventoryHolder) {
|
||||||
|
+ hopper.cachedAbove = ((IInventoryHolder) block).a(blockData, hopper.world, pos);
|
||||||
|
+ hopper.shouldNotCachePull = true;
|
||||||
|
+ } else if (block.isTileEntity()) {
|
||||||
|
+ TileEntity tileEntity = hopper.world.getTileEntity(pos);
|
||||||
|
+ if (tileEntity instanceof IInventory) {
|
||||||
|
+ IInventory inv = (IInventory) tileEntity;
|
||||||
|
+ if (inv instanceof TileEntityChest && block instanceof BlockChest) {
|
||||||
|
+ inv = BlockChest.getInventory((BlockChest) block, blockData, hopper.world, pos, true);
|
||||||
|
+ }
|
||||||
|
+ if (inv instanceof EntityMinecartContainer) {
|
||||||
|
+ hopper.shouldNotCachePull = true;
|
||||||
|
+ }
|
||||||
|
+ hopper.cachedAbove = inv;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ if (hopper.cachedAbove == null) {
|
||||||
|
+ List<Entity> list = hopper.world.getEntities((Entity) null, new AxisAlignedBB(pos.getX() - 0.5D, pos.getY() - 0.5D, pos.getZ() - 0.5D, pos.getX() + 0.5D, pos.getY() + 0.5D, pos.getZ() + 0.5D), IEntitySelector.d);
|
||||||
|
+
|
||||||
|
+ if (!list.isEmpty()) {
|
||||||
|
+ hopper.cachedAbove = (IInventory) list.get(java.util.concurrent.ThreadLocalRandom.current().nextInt(list.size()));
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
+ if (hopper.cachedAbove == null) {
|
+ if (hopper.cachedAbove == null) {
|
||||||
+ hopper.cachedPullAir = true;
|
+ hopper.cachedPullAir = true;
|
||||||
+ }
|
+ }
|
||||||
+ return inv;
|
+ return hopper.cachedAbove;
|
||||||
+ } else {
|
+ } else {
|
||||||
return a(ihopper.getWorld(), ihopper.x(), ihopper.z() + 1.0D, ihopper.A());
|
return a(ihopper.getWorld(), ihopper.x(), ihopper.z() + 1.0D, ihopper.A());
|
||||||
+ }
|
+ }
|
||||||
@ -102,39 +120,7 @@ index 95bede605c6401af10f18b641cd12c9d8ec2f207..1e74b550e4f1ffc7800db24605f9b3f5
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static List<EntityItem> c(IHopper ihopper) {
|
public static List<EntityItem> c(IHopper ihopper) {
|
||||||
@@ -683,14 +731,16 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi
|
@@ -779,4 +858,21 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi
|
||||||
}
|
|
||||||
|
|
||||||
@Nullable
|
|
||||||
- public static IInventory b(World world, BlockPosition blockposition) {
|
|
||||||
- return a(world, (double) blockposition.getX() + 0.5D, (double) blockposition.getY() + 0.5D, (double) blockposition.getZ() + 0.5D, true); // Paper
|
|
||||||
+ public static IInventory b(World world, BlockPosition blockposition, boolean skipBlockCheck) { // Yatopia
|
|
||||||
+ return a(world, (double) blockposition.getX() + 0.5D, (double) blockposition.getY() + 0.5D, (double) blockposition.getZ() + 0.5D, true, skipBlockCheck); // Paper // Yatopia
|
|
||||||
}
|
|
||||||
|
|
||||||
@Nullable
|
|
||||||
- public static IInventory a(World world, double d0, double d1, double d2) { return a(world, d0, d1, d2, false); } // Paper - overload to default false
|
|
||||||
- public static IInventory a(World world, double d0, double d1, double d2, boolean optimizeEntities) { // Paper
|
|
||||||
+ public static IInventory a(World world, double d0, double d1, double d2) { return a(world, d0, d1, d2, false); } // Yatopia
|
|
||||||
+ public static IInventory a(World world, double d0, double d1, double d2, boolean skipBlockCheck) { return a(world, d0, d1, d2, false, skipBlockCheck); } // Paper - overload to default false // Yatopia
|
|
||||||
+ public static IInventory a(World world, double d0, double d1, double d2, boolean optimizeEntities, boolean skipBlockCheck) { // Paper // Yatopia
|
|
||||||
Object object = null;
|
|
||||||
+ if (!skipBlockCheck) { // Yatopia
|
|
||||||
BlockPosition blockposition = new BlockPosition(d0, d1, d2);
|
|
||||||
if ( !world.isLoaded( blockposition ) ) return null; // Spigot
|
|
||||||
IBlockData iblockdata = world.getType(blockposition);
|
|
||||||
@@ -708,8 +758,9 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
+ } // Yatopia
|
|
||||||
|
|
||||||
- if (object == null && (!optimizeEntities || !org.bukkit.craftbukkit.util.CraftMagicNumbers.getMaterial(block).isOccluding())) { // Paper
|
|
||||||
+ if (object == null && !optimizeEntities) { // Paper // Yatopia
|
|
||||||
List<Entity> list = world.getEntities((Entity) null, new AxisAlignedBB(d0 - 0.5D, d1 - 0.5D, d2 - 0.5D, d0 + 0.5D, d1 + 0.5D, d2 + 0.5D), IEntitySelector.d);
|
|
||||||
|
|
||||||
if (!list.isEmpty()) {
|
|
||||||
@@ -779,4 +830,18 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi
|
|
||||||
protected Container createContainer(int i, PlayerInventory playerinventory) {
|
protected Container createContainer(int i, PlayerInventory playerinventory) {
|
||||||
return new ContainerHopper(i, playerinventory, this);
|
return new ContainerHopper(i, playerinventory, this);
|
||||||
}
|
}
|
||||||
@ -144,12 +130,15 @@ index 95bede605c6401af10f18b641cd12c9d8ec2f207..1e74b550e4f1ffc7800db24605f9b3f5
|
|||||||
+ private IInventory cachedPush = null;
|
+ private IInventory cachedPush = null;
|
||||||
+ private boolean cachedPushAir = false;
|
+ private boolean cachedPushAir = false;
|
||||||
+ private boolean cachedPullAir = false;
|
+ private boolean cachedPullAir = false;
|
||||||
+ private boolean blockUnderWasComposter = false;
|
+ private boolean shouldNotCachePush = false;
|
||||||
|
+ private boolean shouldNotCachePull = false;
|
||||||
+ public void flushCaches() {
|
+ public void flushCaches() {
|
||||||
+ cachedAbove = null;
|
+ cachedAbove = null;
|
||||||
+ cachedPush = null;
|
+ cachedPush = null;
|
||||||
+ cachedPushAir = false;
|
+ cachedPushAir = false;
|
||||||
+ cachedPullAir = false;
|
+ cachedPullAir = false;
|
||||||
+ blockUnderWasComposter = false;
|
+ shouldNotCachePush = false;
|
||||||
|
+ shouldNotCachePull = false;
|
||||||
+ }
|
+ }
|
||||||
|
+ // Yatopia end
|
||||||
}
|
}
|
||||||
|
@ -42,7 +42,7 @@ Ported to Yatopia and 1.16.1 by MrIvanPlays
|
|||||||
Co-authored-by: MrIvanPlays <ivan@mrivanplays.com>
|
Co-authored-by: MrIvanPlays <ivan@mrivanplays.com>
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/BehaviorFindPosition.java b/src/main/java/net/minecraft/server/BehaviorFindPosition.java
|
diff --git a/src/main/java/net/minecraft/server/BehaviorFindPosition.java b/src/main/java/net/minecraft/server/BehaviorFindPosition.java
|
||||||
index 63a761ebef80d4af09cdc2682e496d78492c4a3a..db72d203ebfdfcd27f2dae240ccb998d746d518d 100644
|
index 63a761ebef80d4af09cdc2682e496d78492c4a3a..42ef6fd1c5a61f84b50ce9993d0c42152466a089 100644
|
||||||
--- a/src/main/java/net/minecraft/server/BehaviorFindPosition.java
|
--- a/src/main/java/net/minecraft/server/BehaviorFindPosition.java
|
||||||
+++ b/src/main/java/net/minecraft/server/BehaviorFindPosition.java
|
+++ b/src/main/java/net/minecraft/server/BehaviorFindPosition.java
|
||||||
@@ -48,7 +48,7 @@ public class BehaviorFindPosition extends Behavior<EntityCreature> {
|
@@ -48,7 +48,7 @@ public class BehaviorFindPosition extends Behavior<EntityCreature> {
|
||||||
@ -107,8 +107,7 @@ index 63a761ebef80d4af09cdc2682e496d78492c4a3a..db72d203ebfdfcd27f2dae240ccb998d
|
|||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
this.g.long2ObjectEntrySet().removeIf((entry) -> {
|
this.g.long2ObjectEntrySet().removeIf((entry) -> {
|
||||||
- return !((BehaviorFindPosition.a) entry.getValue()).b(i);
|
return !((BehaviorFindPosition.a) entry.getValue()).b(i);
|
||||||
+ return entry.getValue().b < f;
|
|
||||||
});
|
});
|
||||||
+ /*
|
+ /*
|
||||||
Predicate<BlockPosition> predicate = (blockposition) -> {
|
Predicate<BlockPosition> predicate = (blockposition) -> {
|
||||||
|
Loading…
Reference in New Issue
Block a user