mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-27 15:17:59 +01:00
Add sculk events when the bulb roars and kirin rage
This commit is contained in:
parent
afe44d0ca1
commit
2f68d4409a
2 changed files with 9 additions and 4 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue