mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-02 03:16:41 +00:00
fix: some improvements to GET chunk writing (#2853)
* fix: some improvements to GET chunk writing - ensure levelChunk is loaded before giving to copy GET - this is not necessarily guaranteed to be nonnull if two edits overlap. Whilst not advised, such an easy failure should not occur when two edits collide * Prevent writing chunk sections when FAWE is also sending packets for a chunk and vice versa - alter IntPair hashcode to be more often unique - Utilise ConcurrentHashMap for free synchronisation * Minor comment changes * Use one-per-world-instance FaweBukkitWorld to store world chunk map
This commit is contained in:
@ -4,7 +4,9 @@ public record IntPair(int x, int z) {
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return (x << 16) | (z & 0xFFFF);
|
||||
int i = 1664525 * x + 1013904223;
|
||||
int j = 1664525 * (z ^ -559038737) + 1013904223;
|
||||
return i ^ j;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user