Reduce Code Duplication
Dieser Commit ist enthalten in:
Ursprung
f532dce64b
Commit
a2a4b96b44
@ -82,9 +82,7 @@ public abstract class REntity {
|
||||
DataWatcherObject<Byte> dataWatcherObject = new DataWatcherObject<>(0, DataWatcherRegistry.a);
|
||||
dataWatcher.register(dataWatcherObject, (byte) 1);
|
||||
dataWatcher.markDirty(dataWatcherObject);
|
||||
PacketPlayOutEntityMetadata packet = new PacketPlayOutEntityMetadata(entity.entity.getId(), dataWatcher, false);
|
||||
|
||||
((CraftPlayer) player).getHandle().playerConnection.sendPacket(packet);
|
||||
entity.sendDataWatcher(dataWatcher);
|
||||
}
|
||||
if(entity.entity.isSneaking()) {
|
||||
DataWatcher dataWatcher = new DataWatcher(null);
|
||||
@ -92,10 +90,7 @@ public abstract class REntity {
|
||||
DataWatcherObject<EntityPose> dataWatcherObject = new DataWatcherObject<>(6, DataWatcherRegistry.s);
|
||||
dataWatcher.register(dataWatcherObject, EntityPose.CROUCHING);
|
||||
dataWatcher.markDirty(dataWatcherObject);
|
||||
|
||||
PacketPlayOutEntityMetadata packet = new PacketPlayOutEntityMetadata(entity.entity.getId(), dataWatcher, false);
|
||||
|
||||
((CraftPlayer) player).getHandle().playerConnection.sendPacket(packet);
|
||||
entity.sendDataWatcher(dataWatcher);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren