-
Notifications
You must be signed in to change notification settings - Fork 433
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
Loot table Visitors [WIP] #1327
Conversation
@@ -0,0 +1,65 @@ | |||
package net.fabricmc.fabric.api.loot.v1.visitor; | |||
|
|||
public interface LootTableVisitor { |
There was a problem hiding this comment.
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 default
s 😄
There was a problem hiding this comment.
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.
If anyone wants to take over this, be my guest. I no longer have an interest in continuing it. |
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.