paramtype2 `"customrotation"`
Author: The4codeblocksCreated Sep 29, 2026Updated Sep 30, 2026
LabelsFeature requestAction / change neededPossible close
Usecase
for minimizing redundant rotations with symmetrical nodes (stairs only need 12 out of 24 facedir rotations, logs only need 3 of 6 wallmounted rotations) additionally wallmounted is upside-down with param2 = 0 so having a minor change is useful
with colorcustomrotation, this helps maximize the number of bits dedicated to color
otherwise this may be useful for saving space in param2 for custom mod behavior
also the field overloads act as a helper for converting param2 to facedir
Solutions
paramtype2 = "customrotation":
rotation_bitsdefinition sets lower bit count dedicated to rotationfacedir_equivalentdefinition is a table from the param2 bitslice (sizedrotation_bits) to the facedir equivalent
paramtype2 = "colorcustomrotation":
- same as above but the remainder of bits are dedicated to color everything else:
- when reading a definition table,
rotation_bitsis overloaded with the bit count of existingparamtype2s (2 for 4dir, 3 for wallmounted, 5 for facedir) andfacedir_equivalentis also overloaded with the facedir equivalents of otherparamtype2s ({[0]=0,1,2,3}for 4dir, identity for facedir)
Alternatives
engine support for each type individually (not very engine-like)
Additional context
No response
Source: luanti-org/luanti