Skip to content
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

Add input overrides for machine specializations #60

Open
wants to merge 1 commit into
base: 1.12
Choose a base branch
from

Conversation

JoshieGemFinder
Copy link

Currently, there are four specializations that only accept that external mods cannot interact with or add input items to. The most important of these are:

  1. The Induction Smelter's Pyro-Concentrator specialization.
  2. The Pulverizer's Tectonic Initiator specialization.
  3. The Redstone Furnace's Trivection Chamber and Flux Anodizers specialization.

This pull request adds methods to add overrides to the helper methods that these specializations rely on to let external code mark items as valid inputs for these specializations.
Originally, I was going to add a separate recipe map for each of these specializations; however, after considering the popularity and importance that of Thermal Expansion, I concluded that this would be an inappropriate course of action as it would require significant code changes that had the possibility of creating incompatibilities with pre-existing mods. Instead a simple ComparableItemStack to Boolean map was introduced that overrides the default return value of the related method, as this would not create any incompatibilities (excluding any mods that might use ASM to modify the Thermal Expansion bytecode, of which I know none).

Only four existing codepoints were touched in this request: FurnaceManager.isFood(stack), FurnaceManager.isOre(stack), PulverizerManager.isOre(stack) and SmelterManager.isOre(stack). The only other changes are methods being added to interface with the override maps. The mods has been built and tested to ensure that the existing behaviours remain unmodified.

If this pull request is accepted, I will likely immediately create a second pull request for ModTweaker to add support for this new functionality.

Currently, there are four specializations that only accept that external mods cannot interact with or add input items to. The most important of these are:
1. The Induction Smelter's *Pyro-Concentrator* specialization.
2. The Pulverizer's *Tectonic Initiator* specialization.
3. The Redstone Furnace's *Trivection Chamber* and *Flux Anodizers* specialization.

This pull request adds methods to add overrides to the helper methods that these specializations rely on to let external code mark items as valid inputs for these specializations.
Originally, I was going to add a seperate recipe map for each of these specializations; however, after some thought I concluded that this would be an inappropriate course of action considering the popularity and importance that this mod has, as this would require significant changes that would likely create incompatibilities with pre-existing mods that rely on Thermal Expansion.

Only four existing codepoints were touched in this request: `FurnaceManager.isFood(stack)`, `FurnaceManager.isOre(stack)`, `PulverizerManager.isOre(stack)` and `SmelterManager.isOre(stack)`. The only other changes are methods being added to interface with the override maps. The mods has been built and tested to ensure that the existing behaviours remain unmodified.

If this pull request is accepted, I will likely immediately create a second pull request for ModTweaker to add this functionality.
@JoshieGemFinder JoshieGemFinder changed the title Add overrides to machine specializations Add input overrides for machine specializations Jul 2, 2024
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.

1 participant