2021-04-07 15:03:34 +10:00
|
|
|
From f01c08fe4410184f6df92b660c2fb8f6db38f100 Mon Sep 17 00:00:00 2001
|
2013-02-03 09:21:35 +11:00
|
|
|
From: md_5 <md_5@live.com.au>
|
|
|
|
Date: Sun, 3 Feb 2013 09:20:19 +1100
|
2013-06-11 14:11:48 +10:00
|
|
|
Subject: [PATCH] Handle Null Tile Entities
|
2013-02-03 09:21:35 +11:00
|
|
|
|
|
|
|
|
2021-03-16 09:00:00 +11:00
|
|
|
diff --git a/src/main/java/net/minecraft/world/level/World.java b/src/main/java/net/minecraft/world/level/World.java
|
|
|
|
index 6c4926e0a..44de94398 100644
|
|
|
|
--- a/src/main/java/net/minecraft/world/level/World.java
|
|
|
|
+++ b/src/main/java/net/minecraft/world/level/World.java
|
|
|
|
@@ -653,6 +653,13 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
2013-02-03 09:21:35 +11:00
|
|
|
|
|
|
|
while (iterator.hasNext()) {
|
|
|
|
TileEntity tileentity = (TileEntity) iterator.next();
|
|
|
|
+ // Spigot start
|
|
|
|
+ if (tileentity == null) {
|
|
|
|
+ getServer().getLogger().severe("Spigot has detected a null entity and has removed it, preventing a crash");
|
|
|
|
+ iterator.remove();
|
|
|
|
+ continue;
|
|
|
|
+ }
|
|
|
|
+ // Spigot end
|
2014-06-22 19:25:10 +10:00
|
|
|
|
2019-04-23 12:00:00 +10:00
|
|
|
if (!tileentity.isRemoved() && tileentity.hasWorld()) {
|
2014-11-26 08:27:08 +11:00
|
|
|
BlockPosition blockposition = tileentity.getPosition();
|
2013-02-03 09:21:35 +11:00
|
|
|
--
|
2020-05-09 18:48:11 +10:00
|
|
|
2.25.1
|
2013-02-03 09:21:35 +11:00
|
|
|
|