What's the intended overclocker limit? (Speed increase limit is defined twice with different values)
KonSola5 opened this issue ยท 2 comments
Describe the bug
On default configs:
Each Overclocker reduces the ticks needed (a.k.a. the "speed multiplier") by 0.25.
So according to this code in MachineBaseBlockEntity
:
the speed cap gets clamped to 0.99 with 4 overclockers.
However, when it comes to calculating the final amount of ticks needed for recipe, the value gets clamped AGAIN by the getSpeedMultiplier
in RecipeCrafter
:
to 0.975.
What's the intended speed cap then? 99% or 97.5%?
Steps to Reproduce
Steps to reproduce the behavior:
- Open Minecraft in debug mode
- Place a machine and insert 4 Overclocker Upgrades into it
- Observe that the needed ticks for a recipe that takes 5000 ticks is 125 ticks.
- Use a breakpoint on the
getSpeedMultiplier
inRecipeCrafter
- that's a point between two clamps.
Environment (please complete the following information with the version):
- Minecraft: Any (present on 1.20.4)
- Mod Loader: Fabric
Logs
No logs, since it's an issue with the coding.
Additional context
I was trying to find out, why the top machine speed is 97.5% instead of 99%.
After some debugging, finally found out that the value is clamped twice.