juliarn / npc-lib

Asynchronous, high-performance Minecraft NPC library for 1.8-1.21 servers.
MIT License
303 stars 51 forks source link

Making npc sleep #58

Closed lbirkert closed 2 years ago

lbirkert commented 2 years ago

Hello, how can i make my npc sleep on the floor?

(1.18.1)

juliarn commented 2 years ago

Hey, setting the sleep state is done via the entity metadata, which can be done trough the MetadataModifier. I'm not entirely sure, but just setting EntityMetadata.POSE to SLEEPING should just work.

lbirkert commented 2 years ago

Okay thank you