-
Notifications
You must be signed in to change notification settings - Fork 17
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
Clumps x Inventorio #118
Comments
Unfortunately this seems like a mod compat issue that I don't see a quick and easy fix for, at-least from my side alone. If @Lizard-Of-Oz is willing to work together, I can fire an event here https://github.com/jaredlll08/Clumps/blob/1.19/Common/src/main/java/com/blamejared/clumps/mixin/MixinExperienceOrb.java#L126 that they can then listen to and change the value of it to be an item from their toolbelt. That would solve the issue, beyond I'm not sure there is a simple fix. |
When you inject Alternatively, you can call int xpLeft = InventorioAPI.getInventoryAddon(player).mendToolBeltItems(amount); The return value of this method is the amount of xp left after mending the toolbelt items. |
I think you may be misunderstanding my mod, I wholesale replace a lot of the experience orb code to account for it all being clumped together into a single orb (vanilla only clumps orbs of the same experience value, Clumps does any amount of experience value). So I can't just move the inject as that will not function the same in any way. I am not interested in calling other mod's code myself, that will end up with me having a lot of That is why I suggested the event based approach, that way it doesn't matter how your code changes, the mods are going to remain compatible. After further thought, I believe I actually already have an event that you can use.
ClumpsEvents.VALUE_EVENT.register(event -> {
int xpLeft = InventorioAPI.getInventoryAddon(event.getPlayer()).mendToolBeltItems(event.getValue);
event.setValue(xpLeft );
return null;
}); |
|
Actually, nevermind. I got the idea and will implement the change once I have the time. I see the point that you can't really inject Inventorio code in a neat way. |
Sounds good, unfortunately yes this will require one of our mods to add support for the other. If you would like, I can look into making a PR into Inventorio to add the support (I would do it how I suggested above with the event, but if you have another idea, I'm all ears) |
I'll figure it out. Will have to change some things in my mod anyway. Thanks for the example. |
It seems like This result in Inventorio's ToolBelt mending not getting nearly as much xp from a clumped orb as it should. |
I checked multiple times that the issue is on the event's side: I get far less events with far less total xp than a clumped orb should have (when a clumped orb's xp get applied to the character, it gets the full expected xp) |
My theory: the event system prevents from firing too many events at the same time, and it seems like you're firing an event for every orb collected inside the clump. |
What modloader are you testing on and can you test on the other modloader? I have never heard of an issue like that before (too many events being fired), but I will investigate and make sure that |
Both Forge and Fabric appear to have this issue it seems like. |
If it's possible, could you please build a fabric version of your mod using the event so that I can test |
Ah okay, I see the issue, it seems that I had forgotten what that event was actually for, which is not this. I've now added a
Clumps/common/src/main/java/com/blamejared/clumps/mixin/MixinExperienceOrb.java Lines 109 to 116 in b78c8d8
ClumpsEvents.REPAIR_EVENT.register(event -> {
event.setValue(event.getValue());
return null;
}); Sorry for the confusion |
So in the modpack im running 1.19.2
I run another mod called Inventorio, where it adds a Toolbelt where you can have your tools and basically a auto-tool feature to it. (and other non relateable features for my issue)
So the issue is, inventorio lets XP repair tools in toolbelt when they have mending,
but after instlalling Clumps, it doesnt seem to mend the tools in toolbelt.
is there any Config to the mod (Clumps) where it might be a setting i can change
The text was updated successfully, but these errors were encountered: