3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-12-25 18:40:05 +01:00

Don't default to air for legacy mapper

Dieser Commit ist enthalten in:
Jesse Boyd 2018-08-22 04:13:42 +10:00
Ursprung 260290aa85
Commit 6d3aabecda
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 59F1DE6293AF6E1F

Datei anzeigen

@ -179,7 +179,9 @@ public class LegacyMapper {
private BlockState getBlock(int combinedId) { private BlockState getBlock(int combinedId) {
if (combinedId < blockArr.length) { if (combinedId < blockArr.length) {
try { try {
return BlockState.get(blockArr[combinedId]); int internalId = blockArr[combinedId];
if (internalId == 0) return null;
return BlockState.get(internalId);
} catch (IndexOutOfBoundsException ignore) { } catch (IndexOutOfBoundsException ignore) {
return null; return null;
} }
@ -191,7 +193,7 @@ public class LegacyMapper {
if (extra != null) { if (extra != null) {
return BlockState.get(extra); return BlockState.get(extra);
} }
return BlockTypes.AIR.getDefaultState(); return null;
} }
public void register(int id, int data, BlockStateHolder state) { public void register(int id, int data, BlockStateHolder state) {