Re-add TileEntity removal list, fix build
Dieser Commit ist enthalten in:
Ursprung
dab9d40bfd
Commit
a6a5b12b9e
@ -1,4 +1,4 @@
|
||||
From 51149a1548ebefd3cf6296a1f0f6f6b715f7a3b5 Mon Sep 17 00:00:00 2001
|
||||
From 2cebd0ced2df69501ec09ec55788bcc160feac17 Mon Sep 17 00:00:00 2001
|
||||
From: Zach Brown <zach.brown@destroystokyo.com>
|
||||
Date: Tue, 1 Mar 2016 22:01:19 -0600
|
||||
Subject: [PATCH] Optimize TileEntity Ticking
|
||||
@ -186,55 +186,6 @@ index e454622..d01b65a 100644
|
||||
this.world.playBlockAction(this.position, Blocks.ENDER_CHEST, 1, this.g);
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index 9124558..2ccfa1b 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -60,7 +60,7 @@ public abstract class World implements IBlockAccess {
|
||||
};
|
||||
// Spigot end
|
||||
protected final List<Entity> f = Lists.newArrayList();
|
||||
- public final List<TileEntity> tileEntityList = Lists.newArrayList();
|
||||
+ //public final List<TileEntity> tileEntityList = Lists.newArrayList(); // Paper - Remove unused list
|
||||
public final List<TileEntity> tileEntityListTick = Lists.newArrayList();
|
||||
private final List<TileEntity> b = Lists.newArrayList();
|
||||
private final List<TileEntity> tileEntityListUnload = Lists.newArrayList();
|
||||
@@ -1461,7 +1461,7 @@ public abstract class World implements IBlockAccess {
|
||||
// CraftBukkit start - From below, clean up tile entities before ticking them
|
||||
if (!this.tileEntityListUnload.isEmpty()) {
|
||||
this.tileEntityListTick.removeAll(this.tileEntityListUnload);
|
||||
- this.tileEntityList.removeAll(this.tileEntityListUnload);
|
||||
+ //this.tileEntityList.removeAll(this.tileEntityListUnload); // Paper - Remove unused list
|
||||
this.tileEntityListUnload.clear();
|
||||
}
|
||||
// CraftBukkit end
|
||||
@@ -1509,7 +1509,7 @@ public abstract class World implements IBlockAccess {
|
||||
if (tileentity.x()) {
|
||||
tilesThisCycle--;
|
||||
this.tileEntityListTick.remove(tileTickPosition--);
|
||||
- this.tileEntityList.remove(tileentity);
|
||||
+ //this.tileEntityList.remove(tileentity); // Paper - Remove unused list
|
||||
if (this.isLoaded(tileentity.getPosition())) {
|
||||
this.getChunkAtWorldCoords(tileentity.getPosition()).d(tileentity.getPosition());
|
||||
}
|
||||
@@ -1567,7 +1567,7 @@ public abstract class World implements IBlockAccess {
|
||||
protected void l() {}
|
||||
|
||||
public boolean a(TileEntity tileentity) {
|
||||
- boolean flag = this.tileEntityList.add(tileentity);
|
||||
+ boolean flag = true; // Paper - Remove unused list
|
||||
|
||||
if (flag && tileentity instanceof ITickable) {
|
||||
this.tileEntityListTick.add(tileentity);
|
||||
@@ -2038,7 +2038,7 @@ public abstract class World implements IBlockAccess {
|
||||
} else {
|
||||
if (tileentity != null) {
|
||||
this.b.remove(tileentity);
|
||||
- this.tileEntityList.remove(tileentity);
|
||||
+ //this.tileEntityList.remove(tileentity); // Paper - Remove unused list
|
||||
this.tileEntityListTick.remove(tileentity);
|
||||
}
|
||||
|
||||
--
|
||||
2.7.4
|
||||
|
||||
|
@ -1,11 +1,11 @@
|
||||
From 5d2b01e642cb5ef8b70cdf786376be1610e2e2a2 Mon Sep 17 00:00:00 2001
|
||||
From 5f62245e7a6eaa0c63251b6ae75698fd0e6765c5 Mon Sep 17 00:00:00 2001
|
||||
From: Joseph Hirschfeld <joe@ibj.io>
|
||||
Date: Thu, 3 Mar 2016 02:39:54 -0600
|
||||
Subject: [PATCH] Change implementation of (tile)entity removal list
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index c93af22..6cfd38c 100644
|
||||
index 4f1c1b5..ccef853 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -30,6 +30,11 @@ import org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason;
|
||||
@ -26,7 +26,7 @@ index c93af22..6cfd38c 100644
|
||||
// Spigot end
|
||||
- protected final List<Entity> f = Lists.newArrayList();
|
||||
+ protected final Set<Entity> f = Sets.newHashSet(); // Paper
|
||||
//public final List<TileEntity> tileEntityList = Lists.newArrayList(); // Paper - Remove unused list
|
||||
public final List<TileEntity> tileEntityList = Lists.newArrayList();
|
||||
public final List<TileEntity> tileEntityListTick = Lists.newArrayList();
|
||||
private final List<TileEntity> b = Lists.newArrayList();
|
||||
- private final List<TileEntity> tileEntityListUnload = Lists.newArrayList();
|
||||
@ -64,5 +64,5 @@ index c93af22..6cfd38c 100644
|
||||
this.f.clear();
|
||||
this.l();
|
||||
--
|
||||
2.7.1.windows.2
|
||||
2.7.4
|
||||
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren