mirror of
https://github.com/libraryaddict/LibsDisguises.git
synced 2024-09-29 04:17:29 +02:00
Fix dropped items not working as a disguise
This commit is contained in:
parent
af4bf5cff5
commit
04fbe0dc39
@ -371,6 +371,15 @@ public class PacketHandlerSpawn implements IPacketHandler {
|
||||
|
||||
packets.addPacket(spawnEntity);
|
||||
|
||||
// Since 1.19.3 we apparently no longer send all metadata but only the non-default
|
||||
if (NmsVersion.v1_19_R2.isSupported()) {
|
||||
List<WatcherValue> watcherValues =
|
||||
DisguiseUtilities.createSanitizedWatcherValues(observer, WrappedDataWatcher.getEntityWatcher(disguisedEntity), disguise.getWatcher());
|
||||
PacketContainer metaPacket = ReflectionManager.getMetadataPacket(disguisedEntity.getEntityId(), watcherValues);
|
||||
|
||||
packets.addPacket(metaPacket);
|
||||
}
|
||||
|
||||
// If it's not the same type, then highly likely they have different velocity settings which we'd want to
|
||||
// cancel
|
||||
if (DisguiseType.getType(disguisedEntity) != disguise.getType()) {
|
||||
|
Loading…
Reference in New Issue
Block a user