mirror of
https://github.com/GTNewHorizons/Angelica.git
synced 2026-11-21 21:02:15 +00:00
Switch up the signature to take ints instead of a blockpos and stop allocating one (#324)
This commit is contained in:
1 parent
8898a6f252
commit
ce97ef876d
2 files changed
+5
-5
No files matched your search
@@ -35,10 +35,10 @@ public class ChunkSectionPos extends Vector3i {
|
||||
return coord & 15;
|
||||
}
|
||||
|
||||
public static short packLocal(BlockPos pos) {
|
||||
int i = getLocalCoord(pos.x);
|
||||
int j = getLocalCoord(pos.y);
|
||||
int k = getLocalCoord(pos.z);
|
||||
public static short packLocal(int x, int y, int z) {
|
||||
final int i = getLocalCoord(x);
|
||||
final int j = getLocalCoord(y);
|
||||
final int k = getLocalCoord(z);
|
||||
return (short)(i << 8 | k << 4 | j << 0);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user