mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 20:07:41 +01:00
Remove an unused list of TileEntities slowing down removal
This commit is contained in:
parent
43fee1c16e
commit
2d37e27b37
@ -208,6 +208,15 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
@Override
|
||||
public Entity remove(int index)
|
||||
{
|
||||
@@ -0,0 +0,0 @@ public abstract class World implements IBlockAccess {
|
||||
};
|
||||
// Spigot end
|
||||
protected final List<Entity> g = Lists.newArrayList();
|
||||
- public final List<TileEntity> h = Lists.newArrayList();
|
||||
+ //public final List<TileEntity> h = Lists.newArrayList(); // PaperSpigot - Remove unused list
|
||||
public final List<TileEntity> tileEntityList = Lists.newArrayList();
|
||||
private final List<TileEntity> b = Lists.newArrayList();
|
||||
private final List<TileEntity> c = Lists.newArrayList();
|
||||
@@ -0,0 +0,0 @@ public abstract class World implements IBlockAccess {
|
||||
guardEntityList = true; // Spigot
|
||||
// CraftBukkit start - Use field for loop variable
|
||||
@ -233,4 +242,49 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
tickPosition = (tickPosition < entityList.size()) ? tickPosition : 0;
|
||||
entity = (Entity) this.entityList.get(this.tickPosition);
|
||||
// CraftBukkit end
|
||||
@@ -0,0 +0,0 @@ public abstract class World implements IBlockAccess {
|
||||
// CraftBukkit start - From below, clean up tile entities before ticking them
|
||||
if (!this.c.isEmpty()) {
|
||||
this.tileEntityList.removeAll(this.c);
|
||||
- this.h.removeAll(this.c);
|
||||
+ //this.h.removeAll(this.c); // PaperSpigot - Remove unused list
|
||||
this.c.clear();
|
||||
}
|
||||
// CraftBukkit end
|
||||
@@ -0,0 +0,0 @@ public abstract class World implements IBlockAccess {
|
||||
if (tileentity.x()) {
|
||||
tilesThisCycle--;
|
||||
this.tileEntityList.remove(tileTickPosition--);
|
||||
- this.h.remove(tileentity);
|
||||
+ //this.h.remove(tileentity); // PaperSpigot - Remove unused list
|
||||
if (this.isLoaded(tileentity.getPosition())) {
|
||||
this.getChunkAtWorldCoords(tileentity.getPosition()).e(tileentity.getPosition());
|
||||
}
|
||||
@@ -0,0 +0,0 @@ public abstract class World implements IBlockAccess {
|
||||
}
|
||||
|
||||
public boolean a(TileEntity tileentity) {
|
||||
- boolean flag = this.h.add(tileentity);
|
||||
+ boolean flag = true; // PaperSpigot - Remove unused list
|
||||
|
||||
if (flag && tileentity instanceof IUpdatePlayerListBox) {
|
||||
this.tileEntityList.add(tileentity);
|
||||
@@ -0,0 +0,0 @@ public abstract class World implements IBlockAccess {
|
||||
while (iterator.hasNext()) {
|
||||
TileEntity tileentity = (TileEntity) iterator.next();
|
||||
|
||||
- this.h.add(tileentity);
|
||||
+ //this.h.add(tileentity); // PaperSpigot - Remove unused list
|
||||
if (tileentity instanceof IUpdatePlayerListBox) {
|
||||
this.tileEntityList.add(tileentity);
|
||||
}
|
||||
@@ -0,0 +0,0 @@ public abstract class World implements IBlockAccess {
|
||||
} else {
|
||||
if (tileentity != null) {
|
||||
this.b.remove(tileentity);
|
||||
- this.h.remove(tileentity);
|
||||
+ //this.h.remove(tileentity); // PaperSpigot - Remove unused list
|
||||
this.tileEntityList.remove(tileentity);
|
||||
}
|
||||
|
||||
--
|
Loading…
Reference in New Issue
Block a user