mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-04-11 10:16:15 +00:00
feat: return air if block type not found
This commit is contained in:
@@ -118,6 +118,10 @@ public final class Mapping {
|
||||
var identifier = new Identifier((String) data.get("bedrock_identifier"));
|
||||
// 方块类型
|
||||
var blockType = Registries.BLOCKS.get(identifier);
|
||||
if (blockType == null) {
|
||||
log.error("Cannot find bedrock block type: {}", identifier);
|
||||
return BE_AIR_STATE;
|
||||
}
|
||||
// 方块属性
|
||||
Map<String, Object> state = (Map<String, Object>) data.get("state");
|
||||
if (state == null) return blockType.getDefaultState();
|
||||
|
||||
Reference in New Issue
Block a user