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

Use temporal correlation to detect drops #4537

Open
2 tasks done
ZacSharp opened this issue Oct 27, 2024 · 0 comments
Open
2 tasks done

Use temporal correlation to detect drops #4537

ZacSharp opened this issue Oct 27, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@ZacSharp
Copy link
Collaborator

Describe your suggestion

When MineProcess breaks a target block and an item appears within x ticks, we want that item.
No fancy loot table machinery.
This does have the drawback of not detecting target items randomly lying around though.

Settings

We could make the detection delay configurable, but automatically adjusting it based on ping/tps would be better.
A hybrid would also be possible: positive means fixed delay, zero means automatic.

Context

The current approach to detect drops requires loading loot tables client side and frequently leads to incompatibilities with other mods. It also misses drops in presence of enchantments like silk touch and cannot possibly work with server side loot table modifications (tough installing datapacks clientside could be made possible).

Alternatives

  • Fixing the loot table code to work reliably even with other mods installed, making it work with tool enchantments and allowing additional datapacks to be used.
    Ideally we would load just loot tables (and enchantment definitions) without invoking mod code, but given that other mods likely hook up their loading code using Mixin that would mean reimplementing datapack parsing.
  • Try doing loot table magic, but fall back to time based detection if it fails. However it seems like a possible failure mode is freezing rather than crashing, so this might be impossible.

Final checklist

  • I know how to properly use check boxes
  • I have not written any OwO's or UwU's in this issue.
@ZacSharp ZacSharp added the enhancement New feature or request label Oct 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant