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

Make NPCs names hide when behind blocks (like when sneaking) without sneaking #1676

Open
madtomic opened this issue Jan 22, 2019 · 18 comments
Open
Labels
Feature Request A suggestion for a feature to develop. Research To Do The development team needs to research the issue.

Comments

@madtomic
Copy link

How can I make citizens names hidden if the NPC is behind a block?

@mcmonkey4eva
Copy link
Member

/npc sneak if you have Denizen installed ( https://www.spigotmc.org/resources/denizen.21039/ ) per the standard Minecraft functionality on that.

Not sure offhand if there's a way to make names hide like sneaking without actually making the NPC sneak.

@mcmonkey4eva mcmonkey4eva added the Help Request User needs help. label Jan 22, 2019
@madtomic
Copy link
Author

I will try this Denizen. Thanks for getting back. I thought about using /npc name but it just a toggle to turn the nameplate on and off.

@madtomic
Copy link
Author

Well, sneak is is not what I am looking for. What I need is to hide the NPC names if they are no in line of sight with a player. So if a NPC is behind a wall of stones, their nameplate would be hidden. When the player come in line of sight with the NPC. NPC nameplate would be visual relative to the player looking at it.

@madtomic
Copy link
Author

madtomic commented Jan 22, 2019

I wonder if /npc name can be schedule to toggle based on line of sight with NPC and player? So, if they aren't in line of sight, it will set npc nameplate off by default and toggle on if they are in line of sight.

@mcmonkey4eva
Copy link
Member

So if a NPC is behind a wall of stones, their nameplate would be hidden. When the player come in line of sight with the NPC. NPC nameplate would be visual relative to the player looking at it.
That's how minecraft handles nameplates of players that are sneaking, isn't it?

@madtomic
Copy link
Author

madtomic commented Jan 22, 2019

Yes but if the NPC isn't sneaking. Their nameplates can be seen through walls. I would like be hidden and not make the NPC sneaking but rather standing like normal.

image

@madtomic
Copy link
Author

madtomic commented Jan 22, 2019

As you can see there are other NPC nameplates in the background further out from where I am looking at. It's annoying.

@madtomic
Copy link
Author

Is there anything can be done to achieve this? Maybe using ProtocolLib?

@mcmonkey4eva mcmonkey4eva added Feature Request A suggestion for a feature to develop. and removed Help Request User needs help. labels Jan 23, 2019
@mcmonkey4eva
Copy link
Member

mcmonkey4eva commented Jan 23, 2019

I'm going to change this to a feature request for a way to make NPC nameplates hide (as though they were sneaking, but without actually sneaking)


We don't currently have a way to do what you're asking, but perhaps it can be added as a feature.

As a placeholder/workaround until then, you can hide nameplates that way by using /npc sneak (with the side effect that they will actually crouch down)

@madtomic
Copy link
Author

Thank you and I really hope this feature will get added in future release.

@axemwa
Copy link

axemwa commented Jan 26, 2019

this would be a cool feature to add

@mcmonkey4eva mcmonkey4eva changed the title Question: How can I make citizens names hidden if the NPC is behind a block? Make NPCs names hide when behind blocks (like when sneaking) without sneaking Jan 26, 2019
@mcmonkey4eva mcmonkey4eva added the Research To Do The development team needs to research the issue. label Jan 26, 2019
@madtomic
Copy link
Author

madtomic commented Mar 7, 2020

So did you come up with something after a year of research?

I came across this. Maybe it can help us here. Grauly seems to came up with a method using armorstands with Map.

https://bukkit.org/threads/hiding-nametags.478947/

@mcmonkey4eva
Copy link
Member

You could theoretically write a Denizen script that dynamically uses hide_entity/show_entity with holograms to achieve this

@madtomic
Copy link
Author

madtomic commented Mar 8, 2020

Any chance you could write one?

@mylo081
Copy link

mylo081 commented Apr 3, 2020

Alright I know I'm late, but here is my solution. make your npc stand and make a denizen script for whatever, it just has to have one line as the first action run from a trigger:
"- animate npc animation:sneak"
make sure the npc part is inside the less than and greater than signs tho.
hope i could help!
(p.s. no this wont make them sneak, it will just give their nameplate the effect)

@ghost
Copy link

ghost commented Aug 23, 2020

Any updates on this? Now that citizens has holograms would be a cool functionality aswell. Its easier to do it with holograms then nameplates, perhaps make the nameplate a hologram then aswell.

@mcmonkey4eva
Copy link
Member

This is really late as I apparently forgot to post it here, but a system to hack fake-sneak into packets was added to Denizen, and there's a sample script to automatically apply it to an NPC @ https://forum.denizenscript.com/threads/tiny-sample-scripts-to-start-with.354/

@axemwa
Copy link

axemwa commented Oct 12, 2021

Awesome I can't wait to check it out, you're a genius well done for achieving this :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request A suggestion for a feature to develop. Research To Do The development team needs to research the issue.
Projects
None yet
Development

No branches or pull requests

4 participants