-
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
De-hardcode Shears #1287
base: 1.16
Are you sure you want to change the base?
De-hardcode Shears #1287
Conversation
For now, replacing the whole loot table jsons is fine in my opinion, however at some point I think we need a better way to do this, so that any mod can go in and replace stuff like this in a way that would allow for multiple mods to work on the same loot table. |
That sounds like a nightmare to support :P |
maybe it would make sense to mixin to where the condition is checked, then to see if its shears then to check if its in the tag rather than change the loottables |
I believe I could mixin to |
hm thats a good point. however, im not sure why someone would want something specific to the vanilla shears. There also might be a way to add another condition that forces the item in that case, but this feels hacky. The idea of transforming the loottables isn't bad, i was just hoping there would be a better way in code to do so. |
I definitely think Fabric should only ever touch vanilla loot tables, not modded ones, what I was mainly talking about would be allowing multiple other mods to make similar modifications to vanilla loot tables. For example, one mod that changed a drop, and another that changed a condition. However, as I said, out of scope for this PR. |
For leaves/cobweb loot tables, etc., you can use Fabric Loot Table API v1 or wait for new v2. Would be a good test for @Juuxel |
As Prospector said, there's currently no easy way to modify entries via code. Adding a new pool with same result won't work since there will be duplicates. https://youtu.be/9zXBNFLADGg |
Guess we will write a loot table visitor, like the tree visitors used by asm, javac api and all those cool stuff? |
Is anyone currently working on that? Edit: I mean if no one is, I can work on that. |
|
@deirn I think that can be done with #1241's |
Wouldn't that require a way to not modify "manual" loot tables? We probably want users to be able to override our changes. Can't we use datagen to replace vanilla's tables? |
Yeah, and that's an issue with the loot api in general; see Fabricord #api.
How do we ensure that FAPI's "augmented" vanilla loot tables are not loaded instead of loot tables in other mods? If a mod makes an actual replacement for the loot table, that should be preferred over that sort of compat replacement. |
No idea how we could prevent that tbh. Possibly with a resource condition that allows other mods to disable our tables? |
would love this, as im currently trying to make a mod that adds stone shears |
Would be interesting to see how Forge addresses this. |
Last time I looked at Forge it just replaced the loot tables. |
That seems fine by me, we could likely datagen them. |
Multi-Item-Lib does not handle loot tables, it seems like. |
Redirects all
item == Items.SHEARS
from vanilla.Used this to transform the loot tables (of course i'm not doing that manually)
Closes #1226