Added a "sourceSets.all" block to make bugtesting easier
Removed duplicate implementation of JEI
IIgnitable:
Added IIgnitable interface for all blocks that can be ignited. Has a static "playIgnitionSound" method that plays a slightly randomized ignition sound at target block, and requires all classes it is applied to to implement a "fireItUp" function that other things can now reference to ignite those blocks.
For each of BlockBloomery, BlockFirepit, and BlockForge:
Gave it the IIgnitable interface
Annotated elements "onBlockActivated" method
Reworked the section of "onBlockActivated" that handles ignition. Is now near identical across all blocks
Added implementation of FireItUp, which checks all block-and-tile-related conditions influencing whether or not the IIgnitable can ignite, and if it can ignite, puts it into an ignited state.
All blocks now play a pitch-shifted fire charge sound when ignited, instead of just the firepit
Blocks only fire fireItUp on the server side to avoid the false start bug when the random success chance rolled a success on the client side but failed on the server side
If clicked on with an instance of IIgniter that has its "canLight" boolean set to false, it will end the interact process. I did this intentionally to make implimentinng support for pyrotech's weird lighters easier, but it can also be put on any item if it should not open up the GUI of the block in question
BlockBloomery:
Now has ignition sound
If unable to be ignited, right clicking on it with an igniter will open the GUI
Fixed ignition check to solve the issues of the bloomery being ignited and stuck in an active state if ignited when totally empty, and entering a false start when fuel and ore didn't match.
BlockFirepit
Changed unsuccessful ignition sound to the same flint and steel click as other blocks
If clicked on by an igniter while lacking fuel, will precent the igniter from trying to set fire to an adjacent block
If an attempt to ignite it in the rain is made, it will make a sizzle noise without ever entering an active state
BlockForge
Can no longer be activated when its top is exposed to the rain. It will make a sizzle if the presence of rain prevents its activation
No longer flashes when ignited when it has no fuel in it
Auto-igniting forges now make a noise when being ignited and when being extinguished.
ItemLighter
tryUse now returns a 0 if the ILighter canLlight boolean is false. Used to bypass normal ignition steps.
Added @Nonnull annotation to EnumActionResult because IntelliJ told me to
ILighters now only light fires on the server side. This is done to fix the bug where a client-side-only fire would briefly appear when it rolled a successful ignition on the client but a failed ignition on the server
TileEntityBloomery
Renamed isActive() to getIsActive()
Added setIsActive method
added setProgressMax method
Added check to Update() method to set isActive to false if it was true but it has no fuel.
Removed AP's old light() function, as the ignition process is now handled on the block side.
TileEntityFirepit
Renamed isLit() to getIsLit()
Renamed isLit() to setIsLit()
changed isWet from private to public
tryLight() uses fireItUp() to handle igition
TileEntityForge
Added getFuel() method
Removed the fireUpForge() method, as that is now handled by the fireItUp() method in the block class
Changed addFuel to use fireItUp() when a hot fuel is added to the forge, which means it will play the whoosh noise
Build.Gradle:
IIgnitable:
For each of BlockBloomery, BlockFirepit, and BlockForge:
BlockBloomery:
BlockFirepit
BlockForge
ItemLighter
TileEntityBloomery
TileEntityFirepit
TileEntityForge