VoxelBlockDef class

What the engine needs to know about one block id: how it is drawn, whether it stops a body or light, the light it gives, and whether it is a liquid. Names, drops, tools and every other gameplay fact stay with the game.

Constructors

VoxelBlockDef({required BlockShape shape, required bool solid, required bool opaque, required double r, required double g, required double b, double a = 1.0, int emission = 0, int liquidKind = noLiquid, bool liquidSource = false})
One block's engine facts. r, g, b and a are linear, 0..1.
const

Properties

a → double
Linear colour; a below 1 draws on the transparent surface.
final
b → double
Linear colour; a below 1 draws on the transparent surface.
final
emission → int
0..15 emitted light.
final
g → double
Linear colour; a below 1 draws on the transparent surface.
final
hashCode → int
The hash code for this object.
no setterinherited
liquidKind → int
The game's index of the liquid this block is (water, lava, ...), or noLiquid. A source and its flowing form share one kind.
final
liquidSource → bool
A liquid source rather than its flowing form.
final
opaque → bool
Occludes faces and stops light.
final
r → double
Linear colour; a below 1 draws on the transparent surface.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
shape → BlockShape
How it is drawn, and its collision boxes when solid.
final
solid → bool
Stops a body.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Constants

noLiquid → const int
liquidKind of a block that is not a liquid.