From a82bbc4e66ad6be1255a6a7fecd22232cb413dbb Mon Sep 17 00:00:00 2001 From: KennyTV Date: Wed, 22 Apr 2020 21:47:14 +0200 Subject: [PATCH] Replace keyset map lookups with value iterator --- .../protocols/protocol1_16to1_15_2/packets/WorldPackets.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_16to1_15_2/packets/WorldPackets.java b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_16to1_15_2/packets/WorldPackets.java index c788bde27..5f877d60c 100644 --- a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_16to1_15_2/packets/WorldPackets.java +++ b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_16to1_15_2/packets/WorldPackets.java @@ -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]));