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

Rework lucky ores to become datapacks #10343

Open
wants to merge 8 commits into
base: version/main
Choose a base branch
from

Conversation

Thodor12
Copy link
Contributor

Changes proposed in this pull request

  • Lucky ores use datapacks in favor of configuration values
  • Changed the obtaining of random ores from an O(1) to an O(logn) call at the benefit of having to store a lot less data.
    • Listener now stores a map of random collections, which contain Item instances as opposed to Itemstacks, should use quite a bit less data
  • Features a random collection that can pick from a random weighed distribution, could be useful for other things

Testing

  • Yes I tested this before submitting it.
  • I also did a multiplayer test.

Review please

@uecasm
Copy link
Contributor

uecasm commented Oct 25, 2024

Why not just use a loot table for this? That's what I was planning to do (eventually).

@Raycoms
Copy link
Contributor

Raycoms commented Oct 26, 2024

Why not just use a loot table for this? That's what I was planning to do (eventually).

I actually like the loottable idea.

@Thodor12
Copy link
Contributor Author

Converted it to a loot table

# Conflicts:
#	src/main/java/com/minecolonies/api/compatibility/CompatibilityManager.java
#	src/main/java/com/minecolonies/api/compatibility/ICompatibilityManager.java
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants