Commit Graph
5 Commits
Author SHA1 Message Date
Algent 255b817c92 fix: re-resolve microblock icons after texture stitch
loadIcons runs in TextureStitchEvent.Post and could cache icons before
other mods finished theirs in the same event (Chisel CTMLib -v4 submaps),
leaving microblocks with missing or previous-stitch textures.

loadIcons now marks icons stale; the first icont() read after a stitch
rebuilds them once. Icons set through icont_$eq are kept. Addon materials
reading icont() get the fix without API changes.

Fixes GTNH issue 27183 without relying on handler priority (upstream #63).
2026-10-14 16:37:20 +02:00
Algent f86a31d908 feat: Tint microblock breaking particles by material colour
Covers whose texture is greyscale and coloured at render time broke into
grey particles. A grass cover hit on the top face gave stone coloured
particles while its sides and bottom looked right, and a leaves cover was
wrong on every face. The cover itself rendered correctly, because
BlockMicroMaterial.renderMicroFace already feeds colorMultiplier to the
face renderer, but nothing carried that tint through to the particles.

Add getBreakingColour to IMicroMaterial, defaulting to no tint.
BlockMicroMaterial returns the block colour multiplier and
GrassMicroMaterial restricts it to the top face, since grass_side and
dirt are already coloured, matching the carve out in vanilla
EntityDiggingFX. JIconHitEffects gains matching getBreakingColour and
getBrokenColour defaults, IconHitEffects passes them to the colour aware
EntityDigIconFX overloads, and McBlockPart uses the colour multiplier of
the block it wraps.

Microblock carries the part level override rather than the
MicroblockClient trait. A new Scala trait member is abstract on the
compiled interface, so mixins built against older FMP would fail with
AbstractMethodError, which the frozen ReferenceScalaMicroblockTraits
fixture caught. A concrete method on the class is inherited by those
mixins instead, and still wins over the interface default.

Characterization expectations are updated for the added signatures and
for the hit effect evaluation order, which now reads the colour from the
material right after the icon for the same side.

Needs the CodeChickenCore build that adds the colour aware
EntityDigIconFX overloads.
2026-09-14 11:28:11 +02:00
Algent 37d5ea98f6 docs: define direct Java material access 2026-09-05 14:58:24 +02:00
Algent 5995e366b7 fix: preserve material property dispatch 2026-09-04 22:53:52 +02:00
Algent d334d21653 refactor: port block micro material to Java 2026-09-01 13:50:41 +02:00