use of org.dragonet.net.packet.minecraft.MobEffectPacket in project Dragonet-Legacy by DragonetMC.
the class EntityEffectMessageTranslator method handleSpecific.
@Override
public PEPacket[] handleSpecific(EntityEffectMessage packet) {
MobEffectPacket pk = new MobEffectPacket();
pk.eid = packet.id;
pk.action = MobEffectPacket.EffectAction.ADD;
PocketPotionEffect effect = PocketPotionEffect.getByID(packet.effect);
effect.setAmpilifier(packet.amplifier);
effect.setParticles(!packet.hideParticles);
effect.setDuration(packet.duration);
pk.effect = effect;
return new PEPacket[] { pk };
}
Aggregations