Skip to content

Threshold switch improvements #8097

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: mc1.20.1/dev
Choose a base branch
from

Conversation

Klisz
Copy link

@Klisz Klisz commented Mar 23, 2025

  • Closes Quantity error when threshold switch checks Mekanism's fluid tanks' liquid reserves #8074 by adding block tags for blocks whose block entities have item/fluid capabilities, but whose items/fluids respectively should not be measured by threshold switches (principally for those that can contain both). The Mekanism fluid tanks that the issue was originally opened for are added to the ignore-items tag.
  • Allows ThresholdSwitchObservable implementations to define an override for the value step, similarly to how they already can override the formatting.

Klisz added 2 commits March 23, 2025 15:36
Allows ThresholdSwitchObservables to override the value step much like they already can for the formatting
Comment on lines +168 to +170
TagGen.addOptional(prov.tag(AllBlockTags.THRESHOLD_SWITCH_IGNORE_ITEMS.tag), Mods.MEK,
List.of("basic_fluid_tank", "advanced_fluid_tank", "elite_fluid_tank", "ultimate_fluid_tank"));

Copy link
Collaborator

Choose a reason for hiding this comment

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

Could this not be done from the json file if that contains the mod separately? That way it could be Open-Close by letting people edit the JSON file which should be possible to target with datapacks, or not?

Copy link
Author

Choose a reason for hiding this comment

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

This method is called as part of the process of generating the datapack json files, and shouldn't run anywhere else.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I see, so it is the other way around. The JSON file was generated from this.

@adaliszk adaliszk added area: compatibility Issue only happens when other mods are present pr type: fix PR fixes a bug labels Mar 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: compatibility Issue only happens when other mods are present pr type: fix PR fixes a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Quantity error when threshold switch checks Mekanism's fluid tanks' liquid reserves
2 participants