mirror of
https://hub.spigotmc.org/stash/scm/spigot/spigot.git
synced 2025-04-13 09:32:09 +00:00
27 lines
1.1 KiB
Diff
27 lines
1.1 KiB
Diff
From f8ec2ae56a0c0eccfda218a80378ee6849902aaa Mon Sep 17 00:00:00 2001
|
|
From: md_5 <md_5@live.com.au>
|
|
Date: Sun, 3 Feb 2013 09:20:19 +1100
|
|
Subject: [PATCH] Handle Null Tile Entities
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/level/World.java b/src/main/java/net/minecraft/world/level/World.java
|
|
index 9b786aff08..fa0391b5ed 100644
|
|
--- a/src/main/java/net/minecraft/world/level/World.java
|
|
+++ b/src/main/java/net/minecraft/world/level/World.java
|
|
@@ -635,6 +635,13 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
|
|
|
while (iterator.hasNext()) {
|
|
TickingBlockEntity tickingblockentity = (TickingBlockEntity) iterator.next();
|
|
+ // Spigot start
|
|
+ if (tickingblockentity == null) {
|
|
+ getCraftServer().getLogger().severe("Spigot has detected a null entity and has removed it, preventing a crash");
|
|
+ iterator.remove();
|
|
+ continue;
|
|
+ }
|
|
+ // Spigot end
|
|
|
|
if (tickingblockentity.isRemoved()) {
|
|
iterator.remove();
|
|
--
|
|
2.42.0
|
|
|