Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-15 12:30:06 +01:00
654b792caf
Upstream has released updates that appears to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing CraftBukkit Changes:a339310c
#755: Fix NPE when calling getInventory() for virtual EnderChests2577f9bf
Increase outdated build delay1dabfdc8
#754: Fix pre-1.16 serialized SkullMeta being broken on 1.16+, losing textures
22 Zeilen
1.3 KiB
Diff
22 Zeilen
1.3 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Aikar <aikar@aikar.co>
|
|
Date: Sat, 9 May 2020 13:54:25 -0400
|
|
Subject: [PATCH] Don't toString block unless actually showing the message
|
|
|
|
This is causing MASSIVE performance issues with hoppers and block states
|
|
in general.
|
|
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java
|
|
index 6e9eff2c29528b857cf758e9e45606c8a1c1cc8d..dc0e6e49e9eb5004e53d24304bce095bcef8f4c2 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java
|
|
@@ -26,7 +26,7 @@ public class CraftBlockEntityState<T extends TileEntity> extends CraftBlockState
|
|
// get tile entity from block:
|
|
CraftWorld world = (CraftWorld) this.getWorld();
|
|
this.tileEntity = tileEntityClass.cast(world.getHandle().getTileEntity(this.getPosition()));
|
|
- Preconditions.checkState(this.tileEntity != null, "Tile is null, asynchronous access? " + block);
|
|
+ if (tileEntity == null) Preconditions.checkState(false, "Tile is null, asynchronous access? " + block); // Paper - Don't toString block unless actually error'ing...
|
|
|
|
// Paper start
|
|
this.snapshotDisabled = DISABLE_SNAPSHOT;
|