Skip to main content

Module support

Module support 

Source
Expand description

What a block needs beside it to stay — the pinned game’s BlockState.canSurvive, as a table.

A wall torch on a glass pane, a lantern hung under air, a flower on stone, a rail on a fence: each is a block a structure or a setblock writes and the server drops the first time a shape update reaches it, because its canSurvive rule asks a neighbour for something the neighbour does not give. This module answers that rule for every blockstate of the pin, read from two tables measured inside the pinned server jar by tools/maintenance/dump-support.py (provenance in crates/delvec/data/PROVENANCE.md):

  • crates/dsl/data/support-1.21.11.tsv — per state, free (it survives in air), support (the neighbours any one of which keeps it, each a base set the game names plus its exact differences), or unjudged (the single-neighbour reading cannot be its whole rule, with the reason);
  • crates/dsl/data/support-bases-1.21.11.tsv — per state, the base sets’ own questions: CENTER- and RIGID-sturdy faces, air, solid, still water. The FULL-sturdy faces are crate::blockshape::face_is_sturdy’s table.

Nothing here is classified by hand: a block is “attached” because the jar says it does not survive in air, and what holds it is the set of neighbours the jar said yes to. The compiler’s DW1002 judges every block of the world a build writes with Needs::kept.

Structs§

Rule
One neighbour that keeps a block: the neighbour across cell is in base, or is one of added, and is not one of removed.

Enums§

Base
A base set of neighbours, as the game names it.
Needs
What one block state needs beside it.

Functions§

needs
What a block state needs beside it to survive, by the pinned jar, or None for a block the table does not hold (a non-minecraft: id, or one the pin lacks).