Add input overrides for machine specializations #60
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
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
toBoolean
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)
andSmelterManager.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.