Citizens2 icon indicating copy to clipboard operation
Citizens2 copied to clipboard

Player NPCs crawling

Open VladMoore opened this issue 3 years ago • 5 comments

I confirm that I have ...

  • [X] ...tried the latest Development Build to make sure my feature doesn't exist already.
  • [X] ...checked the Wiki for any possible information about my feature.
  • [X] ...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

VladMoore avatar Jan 28 '22 22:01 VladMoore

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

fullwall avatar Feb 14 '22 16:02 fullwall

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 avatar Apr 23 '22 08:04 mcmonkey4eva

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

HowardZHY avatar May 01 '22 16:05 HowardZHY

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

mcmonkey4eva avatar May 01 '22 22:05 mcmonkey4eva

my discord is unavailable now. sorry about that.

At 2022-05-02 06:47:32, "mcmonkey4eva" @.***> wrote:

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

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

HowardZHY avatar May 02 '22 15:05 HowardZHY