Rename all "liquid" mentions to "fluid"

This commit is contained in:
2026-10-25 13:54:53 -03:00
parent bcca8fa4a5
commit 0cfa4d9b4a
58 changed files with 547 additions and 548 deletions
+4 -4
View File
@@ -160,7 +160,7 @@ export function check_references(mods: LoadedMod[], engine_textures: Iterable<st
const entity_model_jsons = new Map<string, EntityModelJson>();
const effect_owners = new Map<string, string[]>();
const tag_owners = new Map<TagRegistry, Set<string>>();
const liquids = new Set<string>();
const fluids = new Set<string>();
const loot_tables = new Set<string>();
const biome_owners = new Map<string, string[]>();
const add = (map: Map<string, string[]>, id: string, mod: string) => map.set(id, [...(map.get(id) ?? []), mod]);
@@ -181,7 +181,7 @@ export function check_references(mods: LoadedMod[], engine_textures: Iterable<st
for (const { json } of mod.blocks) {
add(block_owners, json.id, mod.id);
if (json.item !== false) add(item_owners, json.id, mod.id);
if (json.liquid) liquids.add(json.id);
if (json.fluid) fluids.add(json.id);
}
// one without a texture is the item of the mod's block, which is already counted
for (const { json } of mod.items) if (json.texture !== undefined) add(item_owners, json.id, mod.id);
@@ -279,8 +279,8 @@ export function check_references(mods: LoadedMod[], engine_textures: Iterable<st
if (json.loot_table) uses(file, json.loot_table, "loot table");
if (json.waterloggable) {
uses(file, json.waterloggable, "block");
if (block_owners.has(json.waterloggable) && !liquids.has(json.waterloggable)) {
errors.push(`${file}: waterloggable ${json.waterloggable} isn't a liquid`);
if (block_owners.has(json.waterloggable) && !fluids.has(json.waterloggable)) {
errors.push(`${file}: waterloggable ${json.waterloggable} isn't a fluid`);
}
}
for (const id of [...(json.place_on ?? []), ...(json.place_in ?? [])]) {