Tweaked steam boilers to have lower fuel consumption when fully heated. - #5302
Open
Archengius wants to merge 1 commit into
Open
Tweaked steam boilers to have lower fuel consumption when fully heated.#5302Archengius wants to merge 1 commit into
Archengius wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What
Tweaked steam boilers to have lower fuel consumption when fully heated.
The new fuel consumption when fully heated matches the optimal fuel consumption that presently can be reached if the player lets the boiler heat up to maximum temperature and then removes fuel, and adds one fuel item at a time once boiler temperature drops back down enough for the entirety of the burned fuel item to be spent on heating the boiler up. This can be automated with redstone as well to remove the manual player interaction from the picture.
To simulate this scenario, the boilers now have a fuel consumption discount when at maximum temperature. The consumption discount matches the optimal fuel efficiency that can already be reached via the scenario described above:
Fuel Consumption Discount = 1.0 - (Heating Interval * Cool Down Rate / Cool Down Interval)
The math above produces 45% fuel consumption discount for low pressure solid and liquid boilers and 70% fuel consumption discount for their high pressure versions. Solar boilers are unaffected due to not burning conventional fuel.
This reduces the early game grind significantly by removing the boilerplate of having to manually interact with small boilers to achieve reasonable fuel efficiency for them (given their horrible fuel efficiency compared to large boilers), without the need of building a setup specifically to reach satisfactory fuel consumption rate.
Implementation Details
Boilers now throttle their fuel consumption by stopping the recipe working by failing the handleTickRecipe in a controlled fashion to achieve the desired fuel consumption rate. When at max temperature, the boiler simulates the cooling off mechanic without actually modifying the externally observed temperature, preventing it from continuously jumping between maximum temperature and maximum temperature - 1. Heating time needed to counteract the cooling is added to the heating time debt, where the time debt is calculated as
getHeatingInterval() * getCoolDownRate(), from which the formula presented above is derived. The boiler pauses its fuel consumption at max temperature if it has no heating time debt, and resumes it once the debt is accumulated. Additionally, fuel consumption discount is now shown in JADE when it is applicable.AI Usage
Claude Sonnet 5 was used to review the code.
Outcome
Boilers consume less fuel now when at max temperature, with the discounted consumption ratio matching the optimal consumption ratio that could previously be achieved by the players by manually controlling the boiler fuel consumption.
How Was This Tested
By placing the boilers down and timing their fuel consumption under various circumstances.
Additional Information
Screenshot of fuel consumption discount in JADE.
