use linked lists in favor of ArrayDeques as they use far less memory when empty

This commit is contained in:
Ell 2020-10-15 21:01:43 +02:00
parent 4f78e7ecc8
commit 585e003327
2 changed files with 2 additions and 2 deletions

View file

@ -63,7 +63,7 @@ public class PipeTileEntity extends TileEntity implements INamedContainerProvide
return 1;
}
};
public final Queue<NetworkLock> craftIngredientRequests = new ArrayDeque<>();
public final Queue<NetworkLock> craftIngredientRequests = new LinkedList<>();
public final List<Pair<BlockPos, ItemStack>> craftResultRequests = new ArrayList<>();
public PressurizerTileEntity pressurizer;
public int moduleDropCheck;

View file

@ -54,7 +54,7 @@ public class ItemTerminalTileEntity extends TileEntity implements INamedContaine
}
};
protected Map<EquatableItemStack, NetworkItem> networkItems;
private final Queue<NetworkLock> existingRequests = new ArrayDeque<>();
private final Queue<NetworkLock> existingRequests = new LinkedList<>();
protected ItemTerminalTileEntity(TileEntityType<?> tileEntityTypeIn) {
super(tileEntityTypeIn);