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

[Suggestion] Changing Cursed Ring tamed mob check from TamableAnimal to OwnableEntity #542

Open
SodiumZH opened this issue Dec 21, 2024 · 0 comments
Assignees
Labels
awaits review This issue was not yet reviewed by developer enhancement New feature or request

Comments

@SodiumZH
Copy link

SodiumZH commented Dec 21, 2024

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.

@SodiumZH SodiumZH added awaits review This issue was not yet reviewed by developer enhancement New feature or request labels Dec 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaits review This issue was not yet reviewed by developer enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants