mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-11-22 21:19:49 +00:00
Fix unnecessary object creation in TileEntityEio#getLocation
This commit is contained in:
1 parent
2d33e7ad55
commit
48c253d3ed
1 file changed
+3
-1
@@ -56,8 +56,10 @@ public abstract class TileEntityEio extends TileEntity {
|
||||
public void init() {
|
||||
}
|
||||
|
||||
private BlockCoord cachedLocation = null;
|
||||
|
||||
public BlockCoord getLocation() {
|
||||
return new BlockCoord(this);
|
||||
return cachedLocation == null || !cachedLocation.equals(xCoord, yCoord, zCoord) ? (cachedLocation = new BlockCoord(this)) : cachedLocation;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user