Skip to content

Fix/issue 19 steam tier2 controller rendering - #34

Merged
ABKQPO merged 3 commits into
GTNewHorizons:masterfrom
Windorain:fix/issue-19-steam-tier2-controller-rendering
Jul 2, 2026
Merged

Fix/issue 19 steam tier2 controller rendering#34
ABKQPO merged 3 commits into
GTNewHorizons:masterfrom
Windorain:fix/issue-19-steam-tier2-controller-rendering

Conversation

@Windorain

Copy link
Copy Markdown
QQ20260630-231017

Close Issue#19

@ABKQPO ABKQPO added the Bug Fix Fixes a bug. Please link it in the PR if an issue exists for it. label Jun 30, 2026
…ABKQPO#19)

In the import flow, StructureLib has just built the structure correctly
from the trigger stack. Calling checkMachine to reverse-infer tier and
formed state is redundant and unreliable — the guidebook fake world has
no functional hatch TileEntities, causing checkPiece to fail for all
multiblocks with hatches.

Instead of relying on checkMachine, inject state directly from the
known-correct trigger stack:

- applyTierFromTriggerStack: scan the class hierarchy for int fields
  whose name matches '(tier|casing)' and set them to triggerStack.stackSize.
  Works generically for all multiblock types (steam uses tierMachineCasing,
  LNE uses structureTier, etc.) without hardcoded field names.

- Set mMachine=true and active=true directly since the structure is
  known to be correct.

- refreshHatchTexturesInWorld: propagate the controller's casing texture
  to all MTEHatch tiles in the level via updateTexture().

The prepareForPreview flow (triggerStack is null) retains the existing
checkMachine validation path unchanged.

Fixes ABKQPO#19
@Windorain
Windorain force-pushed the fix/issue-19-steam-tier2-controller-rendering branch from a227558 to 6341150 Compare July 1, 2026 15:05
@ABKQPO
ABKQPO merged commit 7c9c688 into GTNewHorizons:master Jul 2, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Fix Fixes a bug. Please link it in the PR if an issue exists for it.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tier 2 steam multiblock controller is rendered incorrectly

2 participants