LimpLungs Posted August 2, 2015 Posted August 2, 2015 Uggh, It looks like I'm back again, haha. Ok, so I have a speed upgrade for my custom machine and I have a slot to install speed upgrades. My problem is the recipes work when there is no speed upgrade in. When I put the speed upgrade in, the values for the recipes don't return as intended. I'll use an example of a recipe. 25 cobblestone (1500 burn required) needs to be "smelted" with 2 paper (750 burn) for the ratio. Without speed upgrades, it should go at a rate of 50 per .updateEntity(), Input Paper 1 1500____750 1450____700 etc ____ etc When you add upgrades, it should speed up proportionally. Redstone is worth .2 to the speed so 1 redstone runs it at 1.2x speed. I can't seem to wrap my head around this math involved. I know it isn't: CookTime += this.cookTick * this.getSpeedRatio() BurnTime -= this.cookTick * this.getSpeedRatio() Because that makes it more efficient along with speedy (i.e. at speed ratio of 2, it runs twice as fast but also twice as energy efficient) How do I get the math right for this? As for code, if you REALLY need it, I can post it, but it's kinda messy right now after all my tinkering to fit in my new fuel system. I haven't reorganized it yet. But I honestly don't think you should need the code because its just replacing the standard 200 cook time of the minecraft furnace per recipe, grabbing based on the item instead of a flat rate for all items. EDIT: Here is some of the code, but I can't get the insert code to work lol... http://pastebin.com/ixwKaiBy
LimpLungs Posted August 2, 2015 Author Posted August 2, 2015 Ehh I figured it out, lol when I multiply the stuff removed by the speed, I must divide the total amount at the start by the speed. Lol I'm so stupid for not thinking this one through, good job me (and to think they placed me into Calc II for college this fall...)
Recommended Posts