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] LevelledMobs Compatibility #1116

Closed
lokka30 opened this issue Aug 19, 2021 · 10 comments
Closed

[Suggestion] LevelledMobs Compatibility #1116

lokka30 opened this issue Aug 19, 2021 · 10 comments
Labels
type: feature request New feature request. verdict: complex to implement Too complex to be implemented. Example: requires a big recode of the plugin or a laggy code addition

Comments

@lokka30
Copy link

lokka30 commented Aug 19, 2021

Problem

LevelledMobs's nametags are not being displayed on ItemsAdder mobs

Intended behaviour

LevelledMobs nametags to appear on ItemsAdder mobs

Additional context

  • I am the developer of LevelledMobs
  • We are sending entity metadata packets to display name tags on mobs
  • ItemsAdder mobs are being levelled properly, the only issue is that they are not being nametagged by LM
  • This issue was brought to my attention by Xafnir#1337. I am unable to test it myself since I do not own a license to ItemsAdder

I am unsure if this is a LevelledMobs issue, ItemsAdder issue, both or neither. Regardless, I wish that we can resolve this issue so our two plugins can seamlessly integrate with each other.

Thank you very much. 😃

@lokka30 lokka30 added the type: feature request New feature request. label Aug 19, 2021
@fnrcum
Copy link

fnrcum commented Aug 19, 2021

Yeah I can confirm here that this is the case. The mobs themselves get leveled but the nametags are not displayed

@LoneDev6
Copy link
Collaborator

Hello!
I'm investigating and I think this would require a complex update, so I will work on it in the next days.
Basically the ItemsAdder entities are invisible (only the skin is shown) so that's why the nametag is hidden. I have to somehow show the nametag even if the entity is invisible and hide it when the player is too far.

@LoneDev6 LoneDev6 added verdict: complex to implement Too complex to be implemented. Example: requires a big recode of the plugin or a laggy code addition Future update labels Aug 21, 2021
@lokka30
Copy link
Author

lokka30 commented Aug 21, 2021

Hello!
I'm investigating and I think this would require a complex update, so I will work on it in the next days.
Basically the ItemsAdder entities are invisible (only the skin is shown) so that's why the nametag is hidden. I have to somehow show the nametag even if the entity is invisible and hide it when the player is too far.

Hey, thanks for the reply. :)

I wish to note that LevelledMobs uses packets to send name tags, so ItemsAdder won't be able to tell what nametag LevelledMobs is using. This is probably going to be quite painful to work with, so I'm unsure how any integration will be added yet. I am planning on re-programming LevelledMobs in December to clear the spaghetti and make it far easier for other plugins to integrate - even then, it might be difficult to work with packet nametags.

Secondly, this could be achieved with floating armor stand entities (packet-based of course). I know armor stands are a nuisance for everyone, so I am also unsure how you will fix the issue.

Cheers

@LoneDev6
Copy link
Collaborator

Thanks for the details!
The issue about using armorstands is that we have to make sure the player is actually near the entity or players can use the nametag this to find mobs underground.

It's a bit of a pain, yea

@Gyztor
Copy link

Gyztor commented Jul 6, 2022

Thanks for the details! The issue about using armorstands is that we have to make sure the player is actually near the entity or players can use the nametag this to find mobs underground.

It's a bit of a pain, yea

There is at setting in TAB that handles custom name tags to allow longer than 16 letter nametags with armor stands. maybe how TAB does it can help speed up and (possibly) lower some complexity? It may help give some ideas on how to tackle the problem, i think this is where they handle the armor stand name tags: https://github.com/NEZNAMY/TAB/tree/master/api/src/main/java/me/neznamy/tab/api

for the nametags and mobs underground, maybe making the y distance from the player 10 when the x and z distance is 64 would help hide name tags if mobs are further down as i am not sure if minecraft has a thing such as line of sight requirements other than endermen. Not sure if that would be possible but just an idea i had.

@LoneDev6
Copy link
Collaborator

LoneDev6 commented Jul 6, 2022

This would require serverside calculation.
Basically we'd have to make a task which checks all the entities for every player and hides the nametag for every single player if the entity is not visible.

This is not a very good thing do to since it can easily increate CPU usage.
There might be a better clientside workaround for that but I'm not aware of any.

@Gyztor
Copy link

Gyztor commented Jul 6, 2022

maybe something with protocol lib? so it technically doesn't exist on the server but is being sent by the server and would only check if within a certain distance of an entity and if it isn't just end there and if it is than continue, would make the calculation per a player too rather than everyone at once no matter where they are since those armorstands technically wouldn't exist on the server

@LoneDev6
Copy link
Collaborator

LoneDev6 commented Jul 6, 2022

I have to cite what the LevelledMobs dev said:

I wish to note that LevelledMobs uses packets to send name tags, so ItemsAdder won't be able to tell what nametag LevelledMobs is using. This is probably going to be quite painful to work with, so I'm unsure how any integration will be added yet

We have to wait them in order to find a solution

@lokka30
Copy link
Author

lokka30 commented Jul 7, 2022

In LevelledMobs 4, I'll be adding a basic API which should (fingers crossed) expand in the future. Just taking baby steps to ensure everything is stable 😄. This should be possible in the future to simply fetch the final (fully formatted) nametag that LM wants to set to a mob. There should be an event for it too so plugins can listen to whenever LM wants to change it.

@lokka30
Copy link
Author

lokka30 commented Jan 18, 2023

Closed as per conversation in ArcanePlugins/LevelledMobs#415

@lokka30 lokka30 closed this as completed Jan 18, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: feature request New feature request. verdict: complex to implement Too complex to be implemented. Example: requires a big recode of the plugin or a laggy code addition
Projects
Status: New
Development

No branches or pull requests

4 participants