Skip to content

1.12.2 lenvills fuels - #70

Open
Lenvill-Jarlsen wants to merge 7 commits into
TeamMFR:1.12.2from
Lenvill-Jarlsen:1.12.2_Lenvills_fuels
Open

1.12.2 lenvills fuels#70
Lenvill-Jarlsen wants to merge 7 commits into
TeamMFR:1.12.2from
Lenvill-Jarlsen:1.12.2_Lenvills_fuels

Conversation

@Lenvill-Jarlsen

Copy link
Copy Markdown
Contributor

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.

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lets make sure to change this to true

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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
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.

2 participants