use of net.minecraft.world.entity.AreaEffectCloud in project Tropicraft by Tropicraft.
the class TropiCreeperEntity method spawnLingeringCloud.
private void spawnLingeringCloud() {
Collection<MobEffectInstance> collection = this.getActiveEffects();
if (!collection.isEmpty()) {
AreaEffectCloud areaeffectcloudentity = new AreaEffectCloud(level, getX(), getY(), getZ());
areaeffectcloudentity.setRadius(2.5F);
areaeffectcloudentity.setRadiusOnUse(-0.5F);
areaeffectcloudentity.setWaitTime(10);
areaeffectcloudentity.setDuration(areaeffectcloudentity.getDuration() / 2);
areaeffectcloudentity.setRadiusPerTick(-areaeffectcloudentity.getRadius() / (float) areaeffectcloudentity.getDuration());
for (MobEffectInstance effectinstance : collection) {
areaeffectcloudentity.addEffect(new MobEffectInstance(effectinstance));
}
this.level.addFreshEntity(areaeffectcloudentity);
}
}
Aggregations