Fluid containers
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
// 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, fluid_textures } from "./everything_registry.ts";
|
||||
import { tint_without_biome } from "./worldgen/biome_colors.ts";
|
||||
import { color_rgb, 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";
|
||||
|
||||
@@ -382,8 +382,7 @@ export function cube_face_tint(block: BlockRegistry, face: "top" | "bottom" | "f
|
||||
// the color to draw a part of a block's item in that got its texture through these variables, see cube_face_tint
|
||||
export function item_tint(block: BlockRegistry, variables: string[]): number[] {
|
||||
if (!is_tinted(block, variables)) return [1, 1, 1];
|
||||
const color = tint_without_biome(block.tint!.color);
|
||||
return [color >> 16, (color >> 8) & 0xff, color & 0xff].map((c) => c / 255);
|
||||
return color_rgb(tint_without_biome(block.tint!.color));
|
||||
}
|
||||
|
||||
// how much darker each side of an item's model is drawn, like the mesher's: top, bottom, south, north, west, east
|
||||
|
||||
Reference in New Issue
Block a user