-
-
Notifications
You must be signed in to change notification settings - Fork 213
Making entires field public for loot pool modifcation purposes #2133
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
base: 1.21.x
Are you sure you want to change the base?
Conversation
modified: src/main/resources/META-INF/accesstransformer.cfg
|
This is a very common AT for mods to make, so it makes sense for this to be in Neo as its very useful when used with Neo's LootTableLoadEvent API. |
Also please implement this in 1.21.1 as well |
I haven't worked much with newer 1.21 versions, is that list mutable? And is it still final? If it's immutable, a definal might be appropriate to allow adding entries. |
It is still final and always mutable (even if you pass in an immutable list to the constructor it gets copied into a new ArrayList... leading to interesting bugs with the empty loot table having pools added). |
Those bugs make me wonder if an AT is the best approach over a method that protects against itself being the empty loot table. Could be an add method, or something as simple as a getter that checks if it is equal to the empty instance, upon which it returns either |
Im making a neoforge mod and i m coming across an issue where i cant modify the loot pool because certain fields are private
so i made a mixin for that
But doing it like this makes it so that i need to have multiple accessors
How i add items to the loot pool right now is very messy
So i hope this pull request can be accepted so i can modify the loot pools properly