Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-11-08 17:20:24 +01:00
Replace keyset map lookups with value iterator
Dieser Commit ist enthalten in:
Ursprung
867cd4ee39
Commit
a82bbc4e66
@ -56,8 +56,8 @@ public class WorldPackets {
|
|||||||
}
|
}
|
||||||
|
|
||||||
CompoundTag heightMaps = chunk.getHeightMap();
|
CompoundTag heightMaps = chunk.getHeightMap();
|
||||||
for (String key : heightMaps.keySet()) {
|
for (Tag heightMapTag : heightMaps) {
|
||||||
LongArrayTag heightMap = heightMaps.get(key);
|
LongArrayTag heightMap = (LongArrayTag) heightMapTag;
|
||||||
int[] heightMapData = new int[256];
|
int[] heightMapData = new int[256];
|
||||||
CompactArrayUtil.iterateCompactArray(9, heightMapData.length, heightMap.getValue(), (i, v) -> heightMapData[i] = v);
|
CompactArrayUtil.iterateCompactArray(9, heightMapData.length, heightMap.getValue(), (i, v) -> heightMapData[i] = v);
|
||||||
heightMap.setValue(CompactArrayUtil.createCompactArrayWithPadding(9, heightMapData.length, i -> heightMapData[i]));
|
heightMap.setValue(CompactArrayUtil.createCompactArrayWithPadding(9, heightMapData.length, i -> heightMapData[i]));
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren