2019-04-23 09:33:25 +10:00
|
|
|
From 727f2d8a6782bb09a95269888079ccf64d393d11 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
|
2019-04-23 09:33:25 +10:00
|
|
|
index 32d00f15..0cfcb0a8 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
|
2018-12-26 08:00:00 +11:00
|
|
|
@@ -1099,6 +1099,13 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
|
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
|
|
|
|
2018-08-26 12:00:00 +10:00
|
|
|
if (!tileentity.x() && 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
|
|
|
|