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

Player NPCs crawling #2737

Closed
3 tasks done
VladMoore opened this issue Jan 28, 2022 · 6 comments
Closed
3 tasks done

Player NPCs crawling #2737

VladMoore opened this issue Jan 28, 2022 · 6 comments
Labels
Feature Request A suggestion for a feature to develop.

Comments

@VladMoore
Copy link

I confirm that I have ...

  • ...tried the latest Development Build to make sure my feature doesn't exist already.
  • ...checked the Wiki for any possible information about my feature.
  • ...checked other existing issues for my feature request.

Description

1.As of 1.14 (I believe) players have been able to get into a crawling position in 1 block vertical gap. It just seems like something an NPC should be able to do.
2. A lot of cool builds could be achieved by having NPCs crawl or lay; like crime scenes, etc.
3. I have not found an alternative, unfortunately.

Code Example

No response

@fullwall
Copy link
Member

Is this for pathfinding? I thought this was a visual thing when in small gaps

@fullwall fullwall changed the title Ability for player NPCs to Crawl/Lay Player NPCs crawling Feb 14, 2022
@mcmonkey4eva
Copy link
Member

Theoretically you can just call LivingEntity#setSwimming(true) and it should apply the visual effect (crawling and swimming are the same stance internally). In practice, this doesn't currently work on NPCs, so there's likely something in the NMS that would need to be changed for it to be possible to apply.

For real players, it works (excluding self-view) with a combination of setSwimming(true) and cancelling EntityToggleSwimEvent when event.isSwimming() is false. (For a player to see it on their own client, there's a much more complicated solution, but that can be ignored for NPC usage)

@mcmonkey4eva mcmonkey4eva added the Feature Request A suggestion for a feature to develop. label Apr 23, 2022
@HowardZHY
Copy link

is there a way to let player type NPCs sitting(riding on a arrow) ?

@mcmonkey4eva
Copy link
Member

@HowardZHY ask on Discord @ https://discord.gg/Q6pZGSR , don't hijack unrelated github issues please

@HowardZHY

This comment was marked as off-topic.

@fullwall
Copy link
Member

Track here #2993

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.
Projects
None yet
Development

No branches or pull requests

4 participants