2020-04-10 10:51:27 +10:00
|
|
|
From 4f5acd6ae00e289c51f94cd55c0cf0061184c073 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
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
2020-04-10 10:51:27 +10:00
|
|
|
index 3717444bc..e48cb6991 100644
|
2013-02-03 09:21:35 +11:00
|
|
|
--- a/src/main/java/net/minecraft/server/World.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/World.java
|
2020-04-10 10:51:27 +10:00
|
|
|
@@ -577,6 +577,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
|
|
|
--
|
2019-04-23 09:33:25 +10:00
|
|
|
2.20.1
|
2013-02-03 09:21:35 +11:00
|
|
|
|