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

Loot table Visitors [WIP] #1327

Closed
wants to merge 7 commits into from
Closed

Loot table Visitors [WIP] #1327

wants to merge 7 commits into from

Conversation

RedstoneParadox
Copy link
Contributor

This PR intends to provide a way to directly modify certain aspects vanilla loot tables without having to write complex boilerplate or replace the whole thing (See #1287). This is done using the visitor pattern to avoid coupling the algorithm to the structure of the loot table in the event it changes.

This PR is nowhere near done and is only being opened so people are aware that it's being worked on and can comment on it.

@Technici4n Technici4n added enhancement New feature or request in progress This issue has PR(s) open to resolve it (or a PR that is WIP) priority:low Low priority PRs that don't immediately need to be resolved new module Pull requests that introduce new modules labels Feb 22, 2021
@@ -0,0 +1,65 @@
package net.fabricmc.fabric.api.loot.v1.visitor;

public interface LootTableVisitor {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this needs some defaults 😄

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, definitely, once I add methods to nodes that allow getting their children, which will come once I add the dozens of different nodes required for all vanilla functions, loot conditions, and whatever else I deem necessary.

@liach liach mentioned this pull request Mar 13, 2021
@RedstoneParadox
Copy link
Contributor Author

If anyone wants to take over this, be my guest. I no longer have an interest in continuing it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request in progress This issue has PR(s) open to resolve it (or a PR that is WIP) new module Pull requests that introduce new modules priority:low Low priority PRs that don't immediately need to be resolved
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants