Files
VoxelEngine/World/IBlock.cs

22 lines
550 B
C#

namespace VoxelEngine.World;
public interface IBlock
{
ushort Id { get; }
string Name { get; }
// Drives face culling: a face is emitted only if its neighbor is not opaque.
bool IsOpaque { get; }
// Reserved for future collision (not used in the baseline).
bool IsSolid { get; }
// Atlas tile index for the given face.
int GetTextureIndex(BlockFace face);
// Interaction hooks — capability present now, system built post-baseline.
void OnInteract() { }
void OnPlaced() { }
void OnBroken() { }
}