PaperSpigot-Parent/CraftBukkit-Patches/0115-Fix-TileEntities-getting-ticked-after-being-queued-f.patch

39 lines
1.4 KiB
Diff
Raw Normal View History

From 2d9138dc3f2c4ca53182bcd514bdb54b9f0eaa67 Mon Sep 17 00:00:00 2001
2014-04-12 06:18:37 +02:00
From: FrozenBrain <carstenbamsti@googlemail.com>
Date: Sun, 23 Mar 2014 01:49:13 +0100
Subject: [PATCH] Fix TileEntities getting ticked after being queued for
removal
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index caf3244..64ac7ee 100644
2014-04-12 06:18:37 +02:00
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -1443,6 +1443,12 @@ public abstract class World implements IBlockAccess {
2014-04-12 06:18:37 +02:00
timings.entityTick.stopTiming(); // Spigot
this.methodProfiler.c("blockEntities");
timings.tileEntityTick.startTiming(); // Spigot
+ // Spigot start - brought up from below
+ if (!this.b.isEmpty()) {
+ this.tileEntityList.removeAll(this.b);
+ this.b.clear();
+ }
+ // Spigot End
this.M = true;
Iterator iterator = this.tileEntityList.iterator();
@@ -1491,10 +1497,6 @@ public abstract class World implements IBlockAccess {
2014-04-12 06:18:37 +02:00
timings.tileEntityTick.stopTiming(); // Spigot
timings.tileEntityPending.startTiming(); // Spigot
this.M = false;
- if (!this.b.isEmpty()) {
- this.tileEntityList.removeAll(this.b);
- this.b.clear();
- }
this.methodProfiler.c("pendingBlockEntities");
if (!this.a.isEmpty()) {
--
2014-04-19 01:15:23 +02:00
1.9.1
2014-04-12 06:18:37 +02:00