Skip to content

Commit

Permalink
spawn ash particles when a vampire player is under the sun without su…
Browse files Browse the repository at this point in the history
…nscreen
  • Loading branch information
Cheaterpaul committed Oct 1, 2024
1 parent 45e573c commit b3e9826
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
import de.teamlapen.vampirism.modcompat.PlayerReviveHelper;
import de.teamlapen.vampirism.network.ServerboundSimpleInputEvent;
import de.teamlapen.vampirism.particle.FlyingBloodEntityParticleOptions;
import de.teamlapen.vampirism.particle.GenericParticleOptions;
import de.teamlapen.vampirism.util.*;
import de.teamlapen.vampirism.world.MinionWorldData;
import de.teamlapen.vampirism.world.ModDamageSources;
Expand Down Expand Up @@ -876,6 +877,13 @@ public void onUpdatePlayer(PlayerTickEvent event) {
this.bloodStats.onUpdate();
player.level().getProfiler().pop();
}

if (event.getEntity().level().isClientSide && getTicksInSun() > 0 && !event.getEntity().hasEffect(ModEffects.SUNSCREEN)) {
int i = event.getEntity().isInvisible() ? 15 : 4;
if (event.getEntity().getRandom().nextInt(i) == 0) {
event.getEntity().level().addParticle(new GenericParticleOptions(VResourceLocation.mc("drip_hang"),20,9145227, 0.2f), event.getEntity().getRandomX(0.5), event.getEntity().getRandomY(), event.getEntity().getRandomZ(0.5), 0, -3, 0);
}
}
}
}

Expand Down

0 comments on commit b3e9826

Please sign in to comment.