3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-12-26 00:00:28 +01:00

don't create chunksection on remove

Dieser Commit ist enthalten in:
creeper123123321 2019-01-15 15:45:18 -02:00
Ursprung 2285c453da
Commit d5f65eceb0
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 0AC57D54786721D1

Datei anzeigen

@ -45,7 +45,8 @@ public class BlockConnectionStorage extends StoredObject {
public void remove(Position position) { public void remove(Position position) {
long pair = getChunkSectionIndex(position); long pair = getChunkSectionIndex(position);
short[] map = getChunkSection(pair); short[] map = blockStorage.get(pair);
if (map == null) return;
map[encodeBlockPos(position)] = 0; map[encodeBlockPos(position)] = 0;
if (Arrays.equals(short4096, map)) { if (Arrays.equals(short4096, map)) {
blockStorage.remove(pair); blockStorage.remove(pair);