Rename all "liquid" mentions to "fluid"
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
// block models, in the shape of minecraft's block model json: boxes ("elements") with a texture per face.
|
||||
// a block picks one with "model" and fills in its texture variables with "textures". baking turns a model
|
||||
// into quads in block space (0 to 1) that the chunk mesher and the item renderers draw
|
||||
import { type BlockRegistry, type BlockTextures, liquid_textures } from "./everything_registry.ts";
|
||||
import { type BlockRegistry, type BlockTextures, fluid_textures } from "./everything_registry.ts";
|
||||
import { tint_without_biome } from "./worldgen/biome_colors.ts";
|
||||
import { get_state_value } from "./utils.ts";
|
||||
import { type DisplayContext, MODEL_FACES, type ModelFace } from "./mod_data.ts";
|
||||
@@ -365,12 +365,12 @@ export function cube_face_texture(block: BlockRegistry, face: "top" | "bottom" |
|
||||
return resolve_texture(`#${face}`, cube_textures(block), BUILTIN_MODELS[DEFAULT_MODEL]);
|
||||
}
|
||||
|
||||
// the block's textures as engine:cube's. a liquid's { still, flowing } are its top and bottom, and its sides, for its
|
||||
// item and its particles. the chunk mesher draws liquids itself
|
||||
// the block's textures as engine:cube's. a fluid's { still, flowing } are its top and bottom, and its sides, for its
|
||||
// item and its particles. the chunk mesher draws fluids itself
|
||||
export function cube_textures(block: BlockRegistry): BlockTextures {
|
||||
if (!block.liquid) return block.textures;
|
||||
if (!block.fluid) return block.textures;
|
||||
// through the variables, so a "tint" on still or flowing still finds them
|
||||
return { ...liquid_textures(block.textures), top: "#still", bottom: "#still", side: "#flowing" };
|
||||
return { ...fluid_textures(block.textures), top: "#still", bottom: "#still", side: "#flowing" };
|
||||
}
|
||||
|
||||
// the color to draw a face of a block's item in, as r g b from 0 to 1. items aren't in a biome, so a biome "tint"
|
||||
|
||||
Reference in New Issue
Block a user