Skip to content

Fix CassetteListener.EntityAdded to use Level.ShouldCreateCassetteManager - #1162

Open
aonkeeper4 wants to merge 1 commit into
EverestAPI:devfrom
aonkeeper4:fix-cassettelistener-entityadded
Open

Fix CassetteListener.EntityAdded to use Level.ShouldCreateCassetteManager#1162
aonkeeper4 wants to merge 1 commit into
EverestAPI:devfrom
aonkeeper4:fix-cassettelistener-entityadded

Conversation

@aonkeeper4

Copy link
Copy Markdown
Contributor

This PR makes CassetteListener.EntityAdded use Level.ShouldCreateCassetteManager directly when checking whether to add a CassetteBlockManager, instead of duplicating the logic. This makes mods hooking ShouldCreateCassetteManager (e.g. custom cassette blocks, most notably Quantum Mechanics' wonky cassette blocks) work properly with cassette listeners, as previously this would have required a hook into Everest.

@maddie480-bot maddie480-bot added the 1: review needed This PR needs 2 approvals to be merged (bot-managed) label Aug 22, 2026
Comment on lines +49 to +52
// we want to expose `ShouldCreateCassetteManager` to `CassetteListener` without modifying its visibility, so create an internal property that forwards to it
[MonoModIgnore]
private bool ShouldCreateCassetteManager { get; }
internal bool _ShouldCreateCassetteManager => ShouldCreateCassetteManager;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not just. make it public?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

people hook it manually :(

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:cryplant:

ah well..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1: review needed This PR needs 2 approvals to be merged (bot-managed)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants