[Suggestion] Changing Cursed Ring tamed mob check from `TamableAnimal` to `OwnableEntity`
SodiumZH opened this issue ยท 0 comments
In the feature of Cursed Ring neutral mob being hostile, tamed mob check (CursedRing.java row 365) could be changed from
if (neutral instanceof TamableAnimal tamable && tamable.isTame())
to
if (neutral instanceof OwnableEntity ownable && ownable.getOwnerUUID() != null)
I recommend to change to OwnableEntity interface because ownable entities are not necessarily TamableAnimal, as TamableAnimal's full type hierarchy is fixed. In my mod (https://github.com/SodiumZH/NFF-Girls), the ownable mobs can extend any mob types but with an additional OwnableEntity implementation, so that they can reuse other non-TamableAnimal mobs' features. In this case the owned mob may attack its owner.
In vanilla, only TamableAnimal class implements OwnableEntity, and the mechanic should be the same as previous.