Don't default to air for legacy mapper

This commit is contained in:
Jesse Boyd 2018-08-22 04:13:42 +10:00
parent 260290aa85
commit 6d3aabecda
No known key found for this signature in database
GPG Key ID: 59F1DE6293AF6E1F

View File

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