Skip to content

Fix blocks displaying as wrong block types (IE model cache collision)#19

Merged
AngelWingsPanda merged 1 commit intomainfrom
dev/fix-c
Apr 13, 2026
Merged

Fix blocks displaying as wrong block types (IE model cache collision)#19
AngelWingsPanda merged 1 commit intomainfrom
dev/fix-c

Conversation

@mica-alex
Copy link
Copy Markdown
Collaborator

IE's ConnModelReal uses a Guava cache keyed by ExtBlockstateAdapter, which compares block state property VALUES but not the Block identity. Blocks with the same facing and connection state (e.g. all blocks with no wires facing north) shared a single cache entry, causing the first block rendered to win and its model to display for all others.

Fix: implement ICacheData on all TE base classes and pass the TE via IEProperties.TILEENTITY_PASSTHROUGH in the extended block state. IE reads getCacheData() and includes it in the cache key, ensuring each block type gets its own cached model.

IE's ConnModelReal uses a Guava cache keyed by ExtBlockstateAdapter,
which compares block state property VALUES but not the Block identity.
Blocks with the same facing and connection state (e.g. all blocks with
no wires facing north) shared a single cache entry, causing the first
block rendered to win and its model to display for all others.

Fix: implement ICacheData on all TE base classes and pass the TE via
IEProperties.TILEENTITY_PASSTHROUGH in the extended block state. IE
reads getCacheData() and includes it in the cache key, ensuring each
block type gets its own cached model.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@mica-alex mica-alex self-assigned this Apr 13, 2026
@AngelWingsPanda AngelWingsPanda merged commit 861b446 into main Apr 13, 2026
1 check passed
@AngelWingsPanda AngelWingsPanda deleted the dev/fix-c branch April 13, 2026 20:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants