Waterlogging
This commit is contained in:
@@ -155,6 +155,10 @@ export interface BlockRegistry {
|
||||
item_display?: { surface: number };
|
||||
// a liquid like water, drawn like luanti's: its top slopes down towards where it flows. see LiquidProperties
|
||||
liquid?: LiquidProperties;
|
||||
// the liquid it can hold, like minecraft's waterlogged fences. it gets a "waterlogged" state, see WATERLOGGED
|
||||
waterloggable?: string;
|
||||
// it can only be placed into a source of that liquid, so it's always placed holding it, like farmer's delight's rice
|
||||
waterlogged_only?: boolean;
|
||||
|
||||
compiled_states?: CompiledStateDefinition[];
|
||||
}
|
||||
@@ -173,6 +177,9 @@ export interface LiquidProperties {
|
||||
}
|
||||
|
||||
export const LIQUID_LEVEL: BlockStateDefinition = { name: "level", bits: 3, default: 0 };
|
||||
// a waterloggable block's state, 1 while it holds a source of its liquid. blocks get it without listing it, after
|
||||
// their own states
|
||||
export const WATERLOGGED: BlockStateDefinition = { name: "waterlogged", bits: 1, default: 0 };
|
||||
export const MAX_LIQUID_RANGE = 7;
|
||||
// what a liquid that doesn't say has
|
||||
export const LIQUID_DEFAULTS: LiquidProperties = { range: MAX_LIQUID_RANGE, ticks: 5, renewable: true };
|
||||
|
||||
Reference in New Issue
Block a user