mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-22 08:11:59 +01:00
Re-add TileEntity removal list, fix build
This commit is contained in:
parent
482147a830
commit
eb5c119269
@ -26,7 +26,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
// Spigot end
|
// Spigot end
|
||||||
- protected final List<Entity> f = Lists.newArrayList();
|
- protected final List<Entity> f = Lists.newArrayList();
|
||||||
+ protected final Set<Entity> f = Sets.newHashSet(); // Paper
|
+ 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();
|
public final List<TileEntity> tileEntityListTick = Lists.newArrayList();
|
||||||
private final List<TileEntity> b = Lists.newArrayList();
|
private final List<TileEntity> b = Lists.newArrayList();
|
||||||
- private final List<TileEntity> tileEntityListUnload = 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);
|
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 New Issue
Block a user