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

Merchant hostility applying to random entities? #30

Closed
itsmeow opened this issue Feb 4, 2022 · 5 comments
Closed

Merchant hostility applying to random entities? #30

itsmeow opened this issue Feb 4, 2022 · 5 comments
Labels
Incompatibility Found an incompatibility with another mod invalid This doesn't seem right

Comments

@itsmeow
Copy link

itsmeow commented Feb 4, 2022

We received a bug report over at Better Animals Plus about this mod interacting with our entities when merchant hostility is enabled.
itsmeow/betteranimalsplus#300

We also received a similar bug report in the comments on CurseForge, so it seems multiple users have been affected by this. I took a look at your code, I'm really not sure how this would happen unless your mixin target somehow applied to the base classes of entities.

Issue Content

When sihywtcamd's config

"merchantHostility": true

then every mob in this mod attempts to murder villagers and guildmasters.

To Reproduce

Steps to reproduce the behavior:

  1. Download sihywtcamd & install alongside betteranimalsplus
  2. Navigate to config\sihywtcamd\overworld.json and change merchantHostility to true
  3. Put any villagers next to any animals from betteranimalsplus.

Versions

  • Minecraft Version: 1.18.1
  • Architectury API Version: architectury-3.6.15.jar
  • Platform (Forge/Fabric): Fabric
  • Fabric Loader Version: 0.12.12
  • Fabric API Version: fabric-api-0.46.1+1.18.jar
  • Mod Version: betteranimalsplus-1.18.1-11.0.3-fabric.jar with sihywtcamd-1.5.2+1.18.jar
@charlyb01
Copy link
Member

Hello, thanks for the report!
Impossible for me to reproduce the issue... May I know which mobs exactly attack villagers? This is not really expected to happen because the goal added to attack merchant entities (maybe also your guild master if he is a special merchant entity) is added only to specific vanilla mobs. Unless you add a new type of skeletons that extends vanilla ones (which is intended that way), you shouldn't encounter this kind of issue.

@itsmeow
Copy link
Author

itsmeow commented Feb 5, 2022

Yeah, like I said, I looked at your code, I have no idea. According to reports it happens for all entities, but I've also received a report specifically about the songbird (which doesn't extend any mixined entity).

@itsmeow
Copy link
Author

itsmeow commented Feb 5, 2022

It could be that your injects are applying to the parent class due to a lack of full method qualification, or that the method is not overridden in the targeted class, so it applies to the parent? You could also try adding instanceof checks to the mixins. I don't have a reproduction of the issue considering it's not my report, but you can ask @AshrielV

@charlyb01
Copy link
Member

The method is overriden by the classes I inject, because I couldn't inject otherwise. And even though it would apply to parent class (which is unlikely the case), the parent classes are HostileEntity or RaidEntity which is not related to animals. I've also checked your code and did not find anything that could cause the issue with my mod.
If @AshrielV can tell me more about the issue, I'd be glad to help fix it =)

@charlyb01 charlyb01 added Incompatibility Found an incompatibility with another mod invalid This doesn't seem right labels Feb 10, 2022
@charlyb01
Copy link
Member

Feel free to reopen if relevant

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Incompatibility Found an incompatibility with another mod invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants