Obey Others Option Conflicts with Dog Attacking Mobs
DefenderOfVarn opened this issue ยท 2 comments
Environment And Mod Information:
- Minecraft Version: 1.14.4 [i.e. 1.12.1]
- Forge Version: 28.0.45 [i.e. 14.21.1.2443]
- Doggy Talents Version: 1.15.1.3 [i.e. 1.14.1.240]
- Java Version: 1.8.0_131[i.e. 8 Update 144 64 bit]
- Operating System (OS): Windows 10 64-bit [i.e. Windows 10 64-bit Build 17134]
Logs
N/A
Issue Description:
When a dog is set to obey others, it will not attack mobs as expected when it is in aggressive or berserker mode. Initially the two of us who were playing were unsure why the dogs were not attacking, eventually I peeked through the source code and noticed the canAttack method in EntityDog chains a call to the canInteract method, which always returns true regardless of the entity being passed in when the dog is set to obey others, thus causing canAttack to always return false. After that I tested with a sheep, turning the obey others option on and off, and sure enough when obey others was on, the dog would not attack the sheep if I attacked it first, but as soon as I toggled the option off he began attacking the sheep.
Steps to reproduce:
- Set a dog to obey others
- Set dog to aggressive mode (berserk will show same symptoms)
- Attack a mob (sheep, zombie, skeleton, etc), dog will not attack
Additional Information:
- More Details:
- Screenshots:
Yes you are exactly right, thanks for describing the issue so thoroughly. New version available now :)