# [1.7.10][solved] speed upgrade, I can't seem to wrap my head around the math...

## Recommended Posts

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

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

##### Share on other sites

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

##### Share on other sites

This topic is now closed to further replies.

• ### Posts

• Every single time I start a mod pack it brings me to the launcher and then I play the game it opens up the game with the red screen and then eventually it crashes. It worked earlier this morning and I don't know why this is happening because I thought it was just one modpack but now nothing will open, it will just get to red screen loading everything and then eventually it crashes.
• LUCONETWORK  LucoNetwork is a brand new SkyBlock and Prisons server and we are looking for staff & Developers. We are always in need of players and we want to make this a very fun and enjoyable server for all to enjoy. We are welcoming ALL. We hope to be the best and we want your support to make our servers better. Thank you so much for reading this. About the server: We are currently working on getting the SkyBlock server up and released. Then we will be working on some more servers to get them up. We will be bug fixing once the server released & working hard to get updates out to Skyblock too. we are striving to be the best network. What game modes can I hope to see inside Luco Network?  Prisons  Lifesteal  SkyBlock  Survival / Earth SMP Why should I join LucoNetwork? We strive to listen to our player base, we want to work for our player base.  We strive to make the best & enjoyable servers for all to enjoy. Our links: https://discord.gg/fmd4SrzdWt
• When i try to launch Minecraft Java 1.20.1 forge with mods (82 mods),on start it loaded all mods,but at end Java just crashed.  p.s i allocated 8GB ram for minecraft and i didn't runned another instance.Log file pp.s I use ATlauncher   Environment: Organising filesystem [24/04/2024 23:40:08 PM] ATLauncher Version: 3.4.36.3 [11ae0b2334c236e93ee8128de980952b2a1b8900] [24/04/2024 23:40:08 PM] App Arguments: ["--install-method=aur","--no-launcher-update"] [24/04/2024 23:40:08 PM] JVM Arguments: ["-Dawt.useSystemAAFontSettings=on","-Dswing.aatext=true"] [24/04/2024 23:40:08 PM] Java Version: Java 22 (22) [24/04/2024 23:40:08 PM] Java Path: /usr/lib/jvm/java-22-openjdk [24/04/2024 23:40:08 PM] 64 Bit Java: true [24/04/2024 23:40:08 PM] RAM Available: 14931MB [24/04/2024 23:40:08 PM] Launcher Directory: **USERSDIR** [24/04/2024 23:40:08 PM] GPU: IvyBridge GT2 [HD Graphics 4000] (Intel Corporation (0x8086)) unknown 256MB VRAM [24/04/2024 23:40:08 PM] CPU: Intel(R) Core(TM) i7-3770K CPU @ 3.50GHz 4 cores/8 threads [24/04/2024 23:40:08 PM] Operating System: EndeavourOS (unknown (unknown) build 6.8.7-arch1-1) [24/04/2024 23:40:08 PM] Bitness: 64 [24/04/2024 23:40:08 PM] Uptime: 15889 [24/04/2024 23:40:08 PM] Manufacturer: GNU/Linux

• ### Who's Online (See full list)

×

• #### Activity

×
• Create New...