2018-01-22 01:19:57 +11:00
|
|
|
From 7ee72d625fc0f262fc875662b73df960f902d93c 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
|
2017-12-09 18:08:16 +11:00
|
|
|
index 195e20727..73e951673 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
|
2017-12-09 18:08:16 +11:00
|
|
|
@@ -1410,6 +1410,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
|
|
|
|
2016-11-17 12:41:12 +11:00
|
|
|
if (!tileentity.y() && tileentity.u()) {
|
2014-11-26 08:27:08 +11:00
|
|
|
BlockPosition blockposition = tileentity.getPosition();
|
2013-02-03 09:21:35 +11:00
|
|
|
--
|
2017-12-09 18:08:16 +11:00
|
|
|
2.14.1
|
2013-02-03 09:21:35 +11:00
|
|
|
|