npc-lib icon indicating copy to clipboard operation
npc-lib copied to clipboard

1.20 support?

Open MeexReay opened this issue 1 year ago • 12 comments

love this library, pls 1.20 support

MeexReay avatar Nov 13 '23 19:11 MeexReay

There is already full 1.20 support in v3 🙂

derklaro avatar Nov 13 '23 19:11 derklaro

also 1.20.4 Support?

Panda260 avatar Feb 28 '24 19:02 Panda260

Should be, but there might be some new entity poses missing. Everything else should work fine.

derklaro avatar Feb 28 '24 20:02 derklaro

Indeed i haven't had luck with poses in 1.20.4, unsure what's changed.

Cryptite avatar Feb 28 '24 20:02 Cryptite

I've just took a look and entity pose meta is still the same in 1.20.4, except some new poses are missing. Gonna add them later.

derklaro avatar Feb 28 '24 21:02 derklaro

Can you provide a code example on how to use them? Even using old poses, I've tried a few ways to get them to send to players and none seem to work

Cryptite avatar Feb 28 '24 21:02 Cryptite

Well, if you're running 1.20.4, just set the sneak meta. This will indirectly cause a pose update to sneaking.

derklaro avatar Feb 28 '24 21:02 derklaro

Yeah the sneakingMetaFactory() one works, but the previous way of providing a Collection<EntityStatus> to a entityStatusMetaFactory() is what doesn't work.

Cryptite avatar Feb 28 '24 22:02 Cryptite

Weird, a few days ago I've tried to set the elytra flying status without any issues... Can you pass the code snippet you're using to set the entity status?

derklaro avatar Feb 28 '24 22:02 derklaro

Collection<EntityStatus> statuses = Set.of(EntityStatus.SWIMMING);
npc.changeMetadata(EntityMetadataFactory.entityStatusMetaFactory(), statuses).schedule(player);

Cryptite avatar Feb 28 '24 22:02 Cryptite

Can you try using FLYING_WITH_ELYTRA?

derklaro avatar Feb 28 '24 22:02 derklaro

Yeah looks like that works but only when you approach npcs close enough that they turn towards you.

Cryptite avatar Feb 28 '24 23:02 Cryptite