use of org.dragonet.common.data.entity.meta.type.Vector3FMeta in project DragonProxy by DragonetMC.
the class PCEntitySetPassengerPacketTranslator method setRiding.
// if offset is null, it's a dismount action
private void setRiding(UpstreamSession session, CachedEntity rider, Vector3F offset) {
EntityMetaData peMeta = EntityMetaTranslator.translateToPE(session, rider.pcMeta, rider.peType);
peMeta.setGenericFlag(EntityMetaData.Constants.DATA_FLAG_RIDING, offset != null);
if (offset != null) {
peMeta.set(EntityMetaData.Constants.DATA_RIDER_SEAT_POSITION, new Vector3FMeta(offset));
}
SetEntityDataPacket pk = new SetEntityDataPacket();
pk.rtid = rider.proxyEid;
pk.meta = peMeta;
session.putCachePacket(pk);
}
Aggregations