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

Pelts from MCDA do not drop if Better Animals Plus is installed #371

Open
chronosacaria opened this issue Sep 20, 2022 · 4 comments
Open
Labels
enhancement New feature or request mod compat A feature or issue caused or for another mod priority:medium An issue with medium priority

Comments

@chronosacaria
Copy link

Describe the bug

Hi itsmeow! I noticed that you're doing the following: https://github.com/itsmeow/betteranimalsplus/blob/1.19/fabric/src/main/java/dev/itsmeow/betteranimalsplus/mixin/fabric/LivingEntityMixin.java

However, it is causing a conflict with MC Dungeons Armors' wolf pelt drops (i.e. it prevents the pelts from dropping at all in favour of the pelts from Better Animals Plus) and this issue is present within the latest version of the mod. I was wondering if there was any particular reason why you do this rather than using the loottable management system or using json files as this would not cause such a conflict. If there is anything that we can do to assist in this issue, please let me know.

To Reproduce

Steps to reproduce the behavior:

  1. Install Better Animals Plus, MC Dungeons Armors and their relative dependencies
  2. Spawn many Minecraft Wolves
  3. Proceed to kill said summoned wolves
  4. Notice that no MCDA pelts drop

Log output/error (if present)

N/A

Expected behavior

Both MCDA and/or Better Animals Plus pelts should drop from their respective entity

Screenshots

N/A

Versions

  • Minecraft Version: 1.19.2
  • Architectury API Version: 6.2.46
  • Platform (Forge/Fabric): Fabric
  • Forge Version: N/A
  • Fabric Loader Version: 0.14.9
  • Fabric API Version: 0.60.0+1.19.2
  • Mod Version: 1.19-11.0.7
  • MCDA Version: 2.2.0

Additional context

N/A

@itsmeow
Copy link
Owner

itsmeow commented Sep 24, 2022

I was mainly doing this because we do multi-platform and a mixin works easily on both APIs rather than trying to abstract between both as Architectury doesn't have a loot table injection system. I didn't realize this messed with other injections.

@chronosacaria
Copy link
Author

Ohhhh okay. I know that this is was a relatively new addition, and admittedly, I have not tried it out yet, but there is this event that is now present in Architectury since architectury/architectury-api@6b83a15#diff-807a40996658f3953e2b6be695a9d2f184a8b53b1c4ca1973b17919fd22b4333: https://github.com/architectury/architectury-api/blob/1.19.2/common/src/main/java/dev/architectury/event/events/common/LootEvent.java

This should allow you to make your loot table changes without the need for a mixin :)

@itsmeow itsmeow added enhancement New feature or request mod compat A feature or issue caused or for another mod priority:medium An issue with medium priority labels Dec 21, 2022
@itsmeow
Copy link
Owner

itsmeow commented Jan 11, 2023

Hi itsmeow! I noticed that you're doing the following: https://github.com/itsmeow/betteranimalsplus/blob/1.19/fabric/src/main/java/dev/itsmeow/betteranimalsplus/mixin/fabric/LivingEntityMixin.java

I just wanted to note, this is not actually what adds the wolf drops, that's for when something is attacked by another entity, i.e., a shark kills a fish. This prevents item clutter because the fish will not drop any items.

The wolf drops are done using individual events per-platform, e.g. LootTableEvents.MODIFY and LootTableLoadEvent

@itsmeow
Copy link
Owner

itsmeow commented Jan 11, 2023

It's weird that it's removing your drops considering it is using events and simply appending a new pool rather than overwriting them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request mod compat A feature or issue caused or for another mod priority:medium An issue with medium priority
Projects
None yet
Development

No branches or pull requests

2 participants