1.12.2 lenvills fuels - #70
Open
Lenvill-Jarlsen wants to merge 7 commits into
Open
Conversation
expanded the forge_fuel_types registry. All vanilla fuels register fine, but MFR fuels registered this way haven't been working. I need to learn how to utilize Ingredients next, lol
# Conflicts: # src/main/resources/assets/minefantasyreforged/registry/materials_mfr/minefantasyreforged/forge_fuel_types.json
The "MineFantasyFuels" class has been renamed "MineFantasyCarbons," as it now only handles the carbon system for the bloomery & blast furnace. The functions that handled manual forgeFuels additions have been moved to the MineFantasyReforgedAPI class, while the JSON file version is in the ForgeFuelRegistry class. The ForgeFuel class has been reworked a little, but after some failed drafts is still very close to what it was before my additions A FirepitFuel class has been added mirroring the ForgeFuel class, but for the firepit. I try to keep my names informative, lol The old "ForgeItemHandler" class has been removed, as literally everything it did is now depreciated. All that is now handled by the ForgeFuelRegistry class. Added functions to manually add ForgeFuels and FirepitFuels in the MineFantasyAPI class For the Firepit: The Block now checks if the fuel being added has the "doesLight" trait, and ignites if it does. Also I changed the sequences of checks to the creative-mode check no longer stops the function from returning "true"--in SinglePlayer this didn't make a difference, but I encountered a little weirdness in creative when adding fuels to the firepit that could also be placed as a block. As for the tileentity component, I entirely rewrote the "getItemBurnTime" function to use the new registry, rather than containing a series of static if statements that had previously been how firepit fuels were handled. Also fixed a bug where, if the firepit ran out of fuel, the blockstate would not be updated to show that it was out of fuel. For the forge: Because I kept the forge stats basically identical to the old ones, I just had to switch out where the forge looked for fuel stats. The tileentity didn't need any other special treatment either. Removed the "initFuels()" section of MineFantasyItems which was previously responsible for adding all fuels to the forge. Instead, the ForgeFuelRegistry and FirepitFuelRegistry now have lines in the post-init stage of loading where they initialize. I tried to have this happen in the init stage, but that caused it to occur before item initialization. FirepitFuelRegistry and ForgeFuelRegistry classes added. They handle JSON parsing and also contain the hashmaps where the fuel registries are stored. Tweaked the big furnace heater slightly to get it to correctly pull from the new registry I updated the Power Armor to pull from the new registry. Lastly, I added two new JSON files that have the fuel stats for all vanilla and MFR fuels. Most were kept exactly the same, except for the discussed stick & timber change.
| @Mod(modid = MineFantasyReforged.MOD_ID, name = MineFantasyReforged.NAME, version = "@VERSION@", dependencies = "required:forge@[0.000.000.001,);" + CodeChickenLib.MOD_VERSION_DEP + "required-after:mixinbooter;") | ||
| public class MineFantasyReforged { | ||
| public static final boolean shouldRemap = true;//DO NOT COMMIT AS FALSE | ||
| public static final boolean shouldRemap = false;//DO NOT COMMIT AS FALSE |
Contributor
There was a problem hiding this comment.
lets make sure to change this to true
Contributor
Author
There was a problem hiding this comment.
Whoops--good catch.
…uels # Conflicts: # src/main/java/minefantasy/mfr/api/MineFantasyReforgedAPI.java
And also fixed a mislabeled note I noticed
This got flipped back during the merger
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.
The "MineFantasyFuels" class has been renamed "MineFantasyCarbons," as it now only handles the carbon system for the bloomery & blast furnace. The functions that handled manual forgeFuels additions have been moved to the MineFantasyReforgedAPI class, while the JSON file version is in the ForgeFuelRegistry class.
The ForgeFuel class has been reworked a little, but after some failed drafts is still very close to what it was before my additions
A FirepitFuel class has been added mirroring the ForgeFuel class, but for the firepit. I try to keep my names informative, lol
The old "ForgeItemHandler" class has been removed, as literally everything it did is now depreciated. All that is now handled by the ForgeFuelRegistry class.
Added functions to manually add ForgeFuels and FirepitFuels in the MineFantasyAPI class
For the Firepit:
The Block now checks if the fuel being added has the "doesLight" trait, and ignites if it does. Also I changed the sequences of checks to the creative-mode check no longer stops the function from returning "true"--in SinglePlayer this didn't make a difference, but I encountered a little weirdness in creative when adding fuels to the firepit that could also be placed as a block.
As for the tileentity component, I entirely rewrote the "getItemBurnTime" function to use the new registry, rather than containing a series of static if statements that had previously been how firepit fuels were handled. Also fixed a bug where, if the firepit ran out of fuel, the blockstate would not be updated to show that it was out of fuel.
For the forge:
Because I kept the forge stats basically identical to the old ones, I just had to switch out where the forge looked for fuel stats.
The tileentity didn't need any other special treatment either.
Removed the "initFuels()" section of MineFantasyItems which was previously responsible for adding all fuels to the forge.
Instead, the ForgeFuelRegistry and FirepitFuelRegistry now have lines in the post-init stage of loading where they initialize. I tried to have this happen in the init stage, but that caused it to occur before item initialization.
FirepitFuelRegistry and ForgeFuelRegistry classes added. They handle JSON parsing and also contain the hashmaps where the fuel registries are stored.
Tweaked the big furnace heater slightly to get it to correctly pull from the new registry
I updated the Power Armor to pull from the new registry.
Lastly, I added two new JSON files that have the fuel stats for all vanilla and MFR fuels. Most were kept exactly the same, except for the discussed stick & timber change.