Fix transparent blocks

This commit is contained in:
2026-09-25 15:01:03 -03:00
parent dfabe40e7a
commit f8d406dcf0
13 changed files with 645 additions and 192 deletions
+9 -1
View File
@@ -93,10 +93,18 @@ interface BlockStateVariant {
y: number;
}
// solid: fully opaque. cutout: texels are either opaque or see-through (leaves).
// translucent: blended and sorted back to front (water, glass)
export const RENDER_LAYERS = ["solid", "cutout", "translucent"] as const;
export type RenderLayer = typeof RENDER_LAYERS[number];
export interface BlockRegistry {
id: string;
textures: string | TextureSideTopBottom | TextureFront;
transparent?: boolean;
// solid when not set. anything else doesn't hide its neighbors' faces
render_layer?: RenderLayer;
// hide faces between two of this block, like glass and water. defaults to true for translucent blocks
cull_same?: boolean;
alpha?: number;
has_collision: boolean;