Skip blocks that don't exist on schematics
This commit is contained in:
+7
-1
@@ -509,7 +509,13 @@ export function check_references(mods: LoadedMod[], engine_textures: Iterable<st
|
||||
}
|
||||
// cubi: entities, like dropped items, are the engine's
|
||||
for (const { file, json } of mod.schematics) {
|
||||
for (const { id } of json.palette) uses(file, id, "block");
|
||||
// the server skips blocks that don't exist, so a schematic still loads without the mod they came from
|
||||
for (const id of new Set(json.palette.map((entry) => entry.id))) {
|
||||
check_namespace(file, id);
|
||||
if (!block_owners.has(id)) {
|
||||
warnings.push(`${file}: block ${id} doesn't exist, it will be left out`);
|
||||
}
|
||||
}
|
||||
for (const { id } of json.entities) {
|
||||
check_namespace(file, id);
|
||||
if (!id.startsWith("cubi:") && !entity_owners.has(id)) {
|
||||
|
||||
Reference in New Issue
Block a user