Add sculk events when the bulb roars and kirin rage

This commit is contained in:
Sollace 2024-02-06 16:06:29 +00:00
parent afe44d0ca1
commit 2f68d4409a
No known key found for this signature in database
GPG key ID: E52FACE7B5C773DB
2 changed files with 9 additions and 4 deletions

View file

@ -1,6 +1,7 @@
package com.minelittlepony.unicopia.ability.magic.spell;
import com.minelittlepony.unicopia.InteractionManager;
import com.minelittlepony.unicopia.USounds;
import com.minelittlepony.unicopia.ability.magic.Caster;
import com.minelittlepony.unicopia.ability.magic.spell.effect.*;
import com.minelittlepony.unicopia.client.render.PlayerPoser.Animation;
@ -13,11 +14,11 @@ import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.damage.DamageTypes;
import net.minecraft.nbt.NbtCompound;
import net.minecraft.particle.ParticleTypes;
import net.minecraft.sound.SoundEvents;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.MathHelper;
import net.minecraft.world.BlockView;
import net.minecraft.world.World.ExplosionSourceType;
import net.minecraft.world.event.GameEvent;
import net.minecraft.world.explosion.Explosion;
import net.minecraft.world.explosion.ExplosionBehavior;
@ -50,7 +51,7 @@ public class RageAbilitySpell extends AbstractSpell {
if (source.asEntity().isInsideWaterOrBubbleColumn() || source.asEntity().isFrozen() || ticksToExtenguish > 0) {
ticksExtenguishing++;
source.playSound(SoundEvents.ENTITY_GENERIC_EXTINGUISH_FIRE, 1);
source.playSound(USounds.Vanilla.ENTITY_GENERIC_EXTINGUISH_FIRE, 1);
source.spawnParticles(ParticleTypes.CLOUD, 12);
setDirty();
} else {
@ -79,7 +80,8 @@ public class RageAbilitySpell extends AbstractSpell {
if (source instanceof Pony pony) {
pony.setAnimation(Animation.ARMS_UP, Recipient.ANYONE, 12);
}
source.playSound(SoundEvents.ENTITY_POLAR_BEAR_WARNING, 2F, 0.1F);
source.playSound(USounds.ENTITY_PLAYER_KIRIN_RAGE, 2F, 0.1F);
source.asEntity().emitGameEvent(GameEvent.EXPLODE);
}
if (source.asEntity().isOnGround() && source.asWorld().isAir(pos) && age % 10 == 0) {
@ -118,7 +120,7 @@ public class RageAbilitySpell extends AbstractSpell {
}
if (source.asWorld().hasRain(pos.up()) && source.asWorld().random.nextInt(15) == 0) {
source.playSound(SoundEvents.ENTITY_GENERIC_EXTINGUISH_FIRE, 0.3F);
source.playSound(USounds.Vanilla.ENTITY_GENERIC_EXTINGUISH_FIRE, 0.3F);
source.spawnParticles(ParticleTypes.CLOUD, 3);
}

View file

@ -35,6 +35,7 @@ import net.minecraft.util.math.MathHelper;
import net.minecraft.util.math.Vec3d;
import net.minecraft.world.RaycastContext;
import net.minecraft.world.World;
import net.minecraft.world.event.GameEvent;
public class TentacleEntity extends AbstractDecorationEntity {
static final byte ATTACK_STATUS = 54;
@ -152,6 +153,7 @@ public class TentacleEntity extends AbstractDecorationEntity {
}
addActiveTicks(20 + getWorld().random.nextInt(30));
playSound(USounds.ENTITY_TENTACLE_ROAR, 5, 1);
emitGameEvent(GameEvent.ENTITY_ROAR);
return true;
}
@ -208,6 +210,7 @@ public class TentacleEntity extends AbstractDecorationEntity {
if (growth == 0) {
playSound(USounds.ENTITY_TENTACLE_DIG, 1, 1);
emitGameEvent(GameEvent.RESONATE_1);
}
}