add config options for melter/heater fuels temperature#32
add config options for melter/heater fuels temperature#32artisteinconnu wants to merge 1 commit intoKnightMiner:masterfrom
Conversation
KnightMiner
left a comment
There was a problem hiding this comment.
I did not notice this PR until just now. I left some comments on the code, though I would like a bit more description about what specific fuels you are wanting to override before merging as well. Flexibility is good, but flexibility with a reason is more important
| @Mod.EventHandler | ||
| public void init(FMLInitializationEvent event) { | ||
| TileMelter.init(); | ||
| } |
| "Disallows creating seared stone in the melter using cobblestone or tool parts"); | ||
| oreToIngotRatio = configFile.getFloat("oreToIngotRatio", "melter", 1.0f, 0f, 16.0f, | ||
| "Ratio of ore to material produced in the melter."); | ||
| heaterFuels = configFile.getStringList("heaterFuels", "melter", new String[]{}, "List of fuels that can be used in the heater and their respective temp (in Celcius).items mod:xxx[:data_value]=temp\nFuels in this list require to be valid minecraft furnace fuels."); |
There was a problem hiding this comment.
Comment should be more clear that the format is a format.
| @Override | ||
| public boolean isItemValid(ItemStack stack) { | ||
| return TileEntityFurnace.isItemFuel(stack); | ||
| return TileMelter.isFuelValid(stack); |
|
|
||
| public class TileMelter extends TileHeatingStructureFuelTank<MultiblockMelter> implements ITickable, IInventoryGui { | ||
|
|
||
| private static Map<String, Integer> fuelsMap = new HashMap<>(); |
There was a problem hiding this comment.
Should be in TCompRegistry. Also, I really do not like using strings here, that is so inefficient. Try something like Inspirations ItemMetaKey.
| } | ||
|
|
||
| public static void init() { | ||
| for(String item : Config.heaterFuels) { |
There was a problem hiding this comment.
This should be in Config. Add an init method there and have it feed into TCompRegistry
|
Also, if you plan to update this, I should point out in 223f44b I gave the melter its own JEI tab which shows fuels that can be used to perform a melting recipe. Right now it just shows a small list of furnace fuels if the temperature is 500 or less, but if this is implemented it will need to look through the overrides in case any of those are applicable. See the Tinkers Construct liquid fuels for an example. |
A simple addition to the configuration file to allow configuration of fuels for the heater.
With the default config, the mod should behave exactly as before (all fuels burn at 200). However, these options allow to set different temperatures to specific fuels or to disable some others (setting temperature at 0). You can also disable all fuels but the specified one by setting the defaultHeaterFuelTemperature to 0.