Paper/Spigot-Server-Patches/0266-MC-99321-Dont-check-for-blocked-double-chest-for-hop.patch
Aikar 094bb03a37
Optimize Hoppers
- Lots of itemstack cloning removed. Only clone if the item is actually moved
- Return true when a plugin cancels inventory move item event instead of false, as false causes pulls to cycle through all items.
  However, pushes do not exhibit the same behavior, so this is not something plugins could of been relying on.
- Add option (Default on) to cooldown hoppers when they fail to move an item due to full inventory
- Skip subsequent InventoryMoveItemEvents if a plugin does not use the item after first event fire for an iteration
2018-02-12 23:26:02 -05:00

29 Zeilen
1.1 KiB
Diff

From d4e195955eeef8c475479e8c5bb6e265395ea706 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 24 Jan 2018 20:06:39 -0500
Subject: [PATCH] MC-99321 - Dont check for blocked double chest for hoppers
etc
This is a source of MAJOR lag for hoppers, as well as a gameplay bug.
This removes the necessity to disable the cat on chest behavior to improve performance.
now performance will be improved even if you have cat chest detection on.
diff --git a/src/main/java/net/minecraft/server/BlockChest.java b/src/main/java/net/minecraft/server/BlockChest.java
index 90267a1fb..91d3308c1 100644
--- a/src/main/java/net/minecraft/server/BlockChest.java
+++ b/src/main/java/net/minecraft/server/BlockChest.java
@@ -348,7 +348,7 @@ public class BlockChest extends BlockTileEntity {
// Paper end
if (block == this) {
- if (this.e(world, blockposition1)) {
+ if (!flag && this.e(world, blockposition1)) { // Paper - check for allowBlocked flag - MC-99321
return null;
}
--
2.16.1