mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 23:38:25 +01:00
Re-add TileEntity removal list, fix build
This commit is contained in:
parent
482147a830
commit
eb5c119269
2 changed files with 1 additions and 50 deletions
|
@ -26,7 +26,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
// 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();
|
||||
|
|
|
@ -186,53 +186,4 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -0,0 +0,0 @@ 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();
|
||||
@@ -0,0 +0,0 @@ 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
|
||||
@@ -0,0 +0,0 @@ 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());
|
||||
}
|
||||
@@ -0,0 +0,0 @@ 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);
|
||||
@@ -0,0 +0,0 @@ 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);
|
||||
}
|
||||
|
||||
--
|
Loading…
Reference in a new issue