2016-09-11 14:27:07 +10:00
|
|
|
From f2c99ad9d2b53987bb84d84695a47b3bb1e316ef 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
|
2016-09-11 14:27:07 +10:00
|
|
|
index c197b65..a5b5e8e 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
|
2016-09-11 14:27:07 +10:00
|
|
|
@@ -1407,6 +1407,13 @@ public abstract class World implements IBlockAccess {
|
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
|
|
|
|
2014-11-26 08:27:08 +11:00
|
|
|
if (!tileentity.x() && tileentity.t()) {
|
|
|
|
BlockPosition blockposition = tileentity.getPosition();
|
2013-02-03 09:21:35 +11:00
|
|
|
--
|
2016-05-10 21:48:25 +10:00
|
|
|
2.7.4
|
2013-02-03 09:21:35 +11:00
|
|
|
|