Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

InscriberBlockEntity has logical bug, making inscribe slower and taking more energy than expected. #8348

Open
Yang00002 opened this issue Jan 25, 2025 · 0 comments
Labels
bug Self explanatory?

Comments

@Yang00002
Copy link

Describe the bug

Image

The annotation in the code said that inscribe require 16 + ceil(MAX_PROCESSING_STEPS / speedFactor) ticks. Since MAX_PROCESSING_STEPS is 200, it's expected to take 16 + ceil(200 / speedFactor) ticks.

But the bottom lines of the code use this.getProcessingTime() > this.getMaxProcessingTime() instead of >=. The speedFactor of 4 speed cards is 50, so the processingTime after 4 ticks is 200, 200 is not bigger than maxProcessingTime(200), so inscribe will need 16 + 5 = 21 ticks instead of 20 ticks.

How to reproduce the bug

Using an inscriber with 4 speed cards, inscribe once will take 21 ticks, 2.5kAE. Overall, an inscriber can only inscribe 3429 times an hour, a full energy cell only supports it to inscribe 80 times.

Expected behavior

Using an inscriber with 4 speed cards, inscribe once take 20 ticks, 2kAE. An inscriber can inscribe 3600 times an hour, a full energy cell supports it to inscribe 100 times.

Additional details

Up to now, I have found this bug in code in fabric/1.20, forge/1.20 and main branch.

Which minecraft version are you using?

1.20

On which mod loaders does it happen?

Fabric

Crash log

no crash

@Yang00002 Yang00002 added the bug Self explanatory? label Jan 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Self explanatory?
Projects
None yet
Development

No branches or pull requests

1 participant