Brick Furnace

Brick Furnace

288k Downloads

Furnace Cook Speed

7ekhed opened this issue ยท 5 comments

commented

Hello! I love the mod, and you've coded it expertly. I have taken inspiration and made my own mod using the same kind of methods you did, but I am unsure how to change how long it takes to smelt things in the furnace. How do I change the speed of which, and where would that be found? Would that be found under the BrickFurnaceTileEntity, or somewhere else?

Thank you for you consideration in my request, it is greatly appreciated.

commented

In every tile entity there is such a method. The multiplication of the return value should be enough.

protected int func_214005_h() {
AbstractCookingRecipe rec = getRecipe();
if (rec == null) return 200 * 0.5;
return rec.getCookTime() * 0.5;
}

should be enough. If it does not work, than I cannot help you sorry.

commented

Okay! Thank you so much!

commented

for anyone else who may read this, this addition requires the variable to be converted to an integer as such:

protected int func_214005_h()
{
    AbstractCookingRecipe rec = getRecipe();
    if (rec == null) return (int) (200 * 0.1);
    return (int) (rec.getCookTime() * 0.1);
}
commented

Hey, thanks a lot! :)
There is a method in the tile entities where the cooking time is returned. The normal cooking time of a furnace is 200. So you can multiply 0.5 or 2 to half or double this value for example.
In the brick furnace tile entity the method is called func_214005_h()

Good luck. And if you share a link to you repository will be awesome :)

commented

Awesome, thank you so much! I have found what you referenced, and divided it in half, but the cooking time is the same. Do I need to modify ONLY this variable, or are there multiple things?

I have not a repository yet, but I will once I am complete, thank you!