Better Animals Plus

Better Animals Plus

24M Downloads

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

chronosacaria opened this issue ยท 4 comments

commented

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

commented

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.

commented

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 :)

commented

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

commented

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