mirror of
https://github.com/ViaVersion/ViaVersion.git
synced 2025-02-26 00:21:25 +01:00
Replace keyset map lookups with value iterator
This commit is contained in:
parent
867cd4ee39
commit
a82bbc4e66
@ -56,8 +56,8 @@ public class WorldPackets {
|
||||
}
|
||||
|
||||
CompoundTag heightMaps = chunk.getHeightMap();
|
||||
for (String key : heightMaps.keySet()) {
|
||||
LongArrayTag heightMap = heightMaps.get(key);
|
||||
for (Tag heightMapTag : heightMaps) {
|
||||
LongArrayTag heightMap = (LongArrayTag) heightMapTag;
|
||||
int[] heightMapData = new int[256];
|
||||
CompactArrayUtil.iterateCompactArray(9, heightMapData.length, heightMap.getValue(), (i, v) -> heightMapData[i] = v);
|
||||
heightMap.setValue(CompactArrayUtil.createCompactArrayWithPadding(9, heightMapData.length, i -> heightMapData[i]));
|
||||
|
Loading…
Reference in New Issue
Block a user