
Merchant hostility applying to random entities?
itsmeow opened this issue ยท 5 comments
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:
- Download sihywtcamd & install alongside betteranimalsplus
- Navigate to config\sihywtcamd\overworld.json and change merchantHostility to true
- 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
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
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.
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).
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 =)