mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-23 21:38:00 +01:00
Pull together and organise all the sound events we use so we can assign them proper subtitles later
This commit is contained in:
parent
ec2242f22a
commit
3029a96a38
34 changed files with 133 additions and 96 deletions
|
@ -4,19 +4,26 @@ import net.minecraft.sound.SoundEvent;
|
||||||
import net.minecraft.sound.SoundEvents;
|
import net.minecraft.sound.SoundEvents;
|
||||||
import net.minecraft.util.Identifier;
|
import net.minecraft.util.Identifier;
|
||||||
import net.minecraft.registry.Registry;
|
import net.minecraft.registry.Registry;
|
||||||
|
import net.minecraft.registry.entry.RegistryEntry;
|
||||||
import net.minecraft.registry.Registries;
|
import net.minecraft.registry.Registries;
|
||||||
|
|
||||||
public interface USounds {
|
import static net.minecraft.sound.SoundEvents.*;
|
||||||
SoundEvent AMBIENT_WIND_GUST = register("ambient.wind.gust");
|
|
||||||
|
|
||||||
|
public interface USounds {
|
||||||
|
SoundEvent ENTITY_GENERIC_BUTTER_FINGERS = BLOCK_HONEY_BLOCK_SLIDE;
|
||||||
|
|
||||||
|
SoundEvent ENTITY_PLAYER_CORRUPTION = PARTICLE_SOUL_ESCAPE;
|
||||||
SoundEvent ENTITY_PLAYER_BATPONY_SCREECH = register("entity.player.batpony.screech");
|
SoundEvent ENTITY_PLAYER_BATPONY_SCREECH = register("entity.player.batpony.screech");
|
||||||
SoundEvent ENTITY_PLAYER_REBOUND = register("entity.player.rebound");
|
SoundEvent ENTITY_PLAYER_REBOUND = register("entity.player.rebound");
|
||||||
SoundEvent ENTITY_PLAYER_PEGASUS_WINGSFLAP = register("entity.player.pegasus.wingsflap");
|
SoundEvent ENTITY_PLAYER_PEGASUS_WINGSFLAP = register("entity.player.pegasus.wingsflap");
|
||||||
SoundEvent ENTITY_PLAYER_PEGASUS_FLYING = register("entity.player.pegasus.flying");
|
SoundEvent ENTITY_PLAYER_PEGASUS_FLYING = register("entity.player.pegasus.flying");
|
||||||
SoundEvent ENTITY_PLAYER_PEGASUS_DASH = register("entity.player.pegasus.dash");
|
SoundEvent ENTITY_PLAYER_PEGASUS_DASH = register("entity.player.pegasus.dash");
|
||||||
SoundEvent ENTITY_PLAYER_PEGASUS_MOLT = register("entity.player.pegasus.molt");
|
SoundEvent ENTITY_PLAYER_PEGASUS_MOLT = register("entity.player.pegasus.molt");
|
||||||
|
SoundEvent ENTITY_PLAYER_EARTHPONY_DASH = ENTITY_RAVAGER_STEP;
|
||||||
SoundEvent ENTITY_PLAYER_CHANGELING_BUZZ = register("entity.player.changeling.buzz");
|
SoundEvent ENTITY_PLAYER_CHANGELING_BUZZ = register("entity.player.changeling.buzz");
|
||||||
SoundEvent ENTITY_PLAYER_CHANGELING_TRANSFORM = register("entity.player.changeling.transform");
|
SoundEvent ENTITY_PLAYER_CHANGELING_TRANSFORM = register("entity.player.changeling.transform");
|
||||||
|
SoundEvent ENTITY_PLAYER_CHANGELING_FEED = ENTITY_GENERIC_DRINK;
|
||||||
|
SoundEvent ENTITY_PLAYER_CHANGELING_CLIMB = ENTITY_CHICKEN_STEP;
|
||||||
SoundEvent ENTITY_PLAYER_UNICORN_TELEPORT = register("entity.player.unicorn.teleport");
|
SoundEvent ENTITY_PLAYER_UNICORN_TELEPORT = register("entity.player.unicorn.teleport");
|
||||||
|
|
||||||
SoundEvent ENTITY_PLAYER_EARS_RINGING = register("entity.player.ears_ring");
|
SoundEvent ENTITY_PLAYER_EARS_RINGING = register("entity.player.ears_ring");
|
||||||
|
@ -39,11 +46,18 @@ public interface USounds {
|
||||||
SoundEvent ENTITY_CRYSTAL_HEART_ACTIVATE = register("entity.crystal_heart.activate");
|
SoundEvent ENTITY_CRYSTAL_HEART_ACTIVATE = register("entity.crystal_heart.activate");
|
||||||
SoundEvent ENTITY_CRYSTAL_HEART_DEACTIVATE = register("entity.crystal_heart.deactivate");
|
SoundEvent ENTITY_CRYSTAL_HEART_DEACTIVATE = register("entity.crystal_heart.deactivate");
|
||||||
|
|
||||||
|
SoundEvent ENTITY_HOT_AIR_BALLOON_BOOST = ENTITY_GHAST_SHOOT;
|
||||||
|
SoundEvent ENTITY_HOT_AIR_BALLOON_BURNER_FIRE = ENTITY_GHAST_SHOOT;
|
||||||
|
SoundEvent ENTITY_HOT_AIR_BALLOON_STEP = BLOCK_WOOL_STEP;
|
||||||
|
SoundEvent ENTITY_HOT_AIR_BALLOON_BASKET_STEP = BLOCK_BAMBOO_STEP;
|
||||||
|
SoundEvent ENTITY_HOT_AIR_BALLOON_EQUIP_CANOPY = ITEM_ARMOR_EQUIP_LEATHER;
|
||||||
|
SoundEvent ENTITY_HOT_AIR_BALLOON_EQUIP_BURNER = ENTITY_IRON_GOLEM_DAMAGE;
|
||||||
|
|
||||||
SoundEvent ITEM_AMULET_CHARGING = register("item.amulet.charging");
|
SoundEvent ITEM_AMULET_CHARGING = register("item.amulet.charging");
|
||||||
SoundEvent ITEM_AMULET_RECHARGE = register("item.amulet.recharge");
|
SoundEvent ITEM_AMULET_RECHARGE = register("item.amulet.recharge");
|
||||||
|
|
||||||
SoundEvent ITEM_DRAGON_BREATH_SCROLL_USE = SoundEvents.ITEM_FIRECHARGE_USE;
|
SoundEvent ITEM_DRAGON_BREATH_SCROLL_USE = ITEM_FIRECHARGE_USE;
|
||||||
SoundEvent ITEM_DRAGON_BREATH_ARRIVE = SoundEvents.ITEM_FIRECHARGE_USE;
|
SoundEvent ITEM_DRAGON_BREATH_ARRIVE = ITEM_FIRECHARGE_USE;
|
||||||
|
|
||||||
SoundEvent ITEM_ICARUS_WINGS_PURIFY = register("item.icarus_wings.resonate");
|
SoundEvent ITEM_ICARUS_WINGS_PURIFY = register("item.icarus_wings.resonate");
|
||||||
SoundEvent ITEM_ICARUS_WINGS_CORRUPT = register("item.icarus_wings.corrupted");
|
SoundEvent ITEM_ICARUS_WINGS_CORRUPT = register("item.icarus_wings.corrupted");
|
||||||
|
@ -54,12 +68,26 @@ public interface USounds {
|
||||||
SoundEvent ITEM_ALICORN_AMULET_HALLUCINATION = register("item.alicorn_amulet.hallucination");
|
SoundEvent ITEM_ALICORN_AMULET_HALLUCINATION = register("item.alicorn_amulet.hallucination");
|
||||||
SoundEvent ITEM_ALICORN_AMULET_AMBIENT = register("item.alicorn_amulet.ambient");
|
SoundEvent ITEM_ALICORN_AMULET_AMBIENT = register("item.alicorn_amulet.ambient");
|
||||||
|
|
||||||
|
SoundEvent ITEM_GROGAR_BELL_USE = BLOCK_BELL_USE;
|
||||||
|
SoundEvent ITEM_GROGAR_BELL_STOP_USING = BLOCK_BELL_USE;
|
||||||
|
SoundEvent ITEM_GROGAR_BELL_CHARGE = BLOCK_BELL_RESONATE;
|
||||||
|
SoundEvent ITEM_GROGAR_BELL_DRAIN = ENTITY_GUARDIAN_ATTACK;
|
||||||
|
|
||||||
|
SoundEvent ITEM_STAFF_STRIKE = ENTITY_PLAYER_ATTACK_CRIT;
|
||||||
|
SoundEvent ITEM_MAGIC_STAFF_CHARGE = ENTITY_GUARDIAN_ATTACK;
|
||||||
|
|
||||||
|
SoundEvent ITEM_ROCK_LAND = BLOCK_STONE_HIT;
|
||||||
|
RegistryEntry.Reference<SoundEvent> ITEM_MUFFIN_BOUNCE = BLOCK_NOTE_BLOCK_BANJO;
|
||||||
|
|
||||||
|
SoundEvent ITEM_SUNGLASSES_SHATTER = BLOCK_GLASS_BREAK;
|
||||||
|
|
||||||
SoundEvent ITEM_APPLE_ROT = register("item.apple.rot");
|
SoundEvent ITEM_APPLE_ROT = register("item.apple.rot");
|
||||||
SoundEvent ITEM_BRACELET_SIGN = register("item.bracelet.sign");
|
SoundEvent ITEM_BRACELET_SIGN = register("item.bracelet.sign");
|
||||||
SoundEvent ITEM_MAGIC_AURA = register("item.magic.aura");
|
SoundEvent ITEM_MAGIC_AURA = register("item.magic.aura");
|
||||||
|
|
||||||
SoundEvent BLOCK_WEATHER_VANE_ROTATE = SoundEvents.BLOCK_LANTERN_STEP;
|
SoundEvent BLOCK_WEATHER_VANE_ROTATE = BLOCK_LANTERN_STEP;
|
||||||
SoundEvent BLOCK_PIE_SLICE = SoundEvents.BLOCK_BEEHIVE_SHEAR;
|
SoundEvent BLOCK_PIE_SLICE = BLOCK_BEEHIVE_SHEAR;
|
||||||
|
SoundEvent BLOCK_PIE_SLICE_POP = ENTITY_ITEM_PICKUP;
|
||||||
|
|
||||||
SoundEvent SPELL_CAST_FAIL = register("spell.cast.fail");
|
SoundEvent SPELL_CAST_FAIL = register("spell.cast.fail");
|
||||||
SoundEvent SPELL_CAST_SUCCESS = register("spell.cast.success");
|
SoundEvent SPELL_CAST_SUCCESS = register("spell.cast.success");
|
||||||
|
@ -70,17 +98,29 @@ public interface USounds {
|
||||||
SoundEvent SPELL_SHIELD_BURN_PROJECTILE = register("spell.shield.projectile.burn");
|
SoundEvent SPELL_SHIELD_BURN_PROJECTILE = register("spell.shield.projectile.burn");
|
||||||
SoundEvent SPELL_TRANSFORM_TRANSMUTE_ENTITY = register("spell.transform.transmute.entity");
|
SoundEvent SPELL_TRANSFORM_TRANSMUTE_ENTITY = register("spell.transform.transmute.entity");
|
||||||
|
|
||||||
SoundEvent SPELL_AMBIENT = SoundEvents.BLOCK_BEACON_AMBIENT;
|
SoundEvent SPELL_AMBIENT = BLOCK_BEACON_AMBIENT;
|
||||||
SoundEvent SPELL_MINDSWAP_SWAP = SoundEvents.ENTITY_ZOMBIE_INFECT;
|
SoundEvent SPELL_MINDSWAP_SWAP = ENTITY_ZOMBIE_INFECT;
|
||||||
SoundEvent SPELL_MINDSWAP_UNSWAP = SoundEvents.ENTITY_ZOMBIE_VILLAGER_CURE;
|
SoundEvent SPELL_MINDSWAP_UNSWAP = ENTITY_ZOMBIE_VILLAGER_CURE;
|
||||||
|
|
||||||
SoundEvent SPELL_DISPLACEMENT_TELEPORT = SoundEvents.ENTITY_HUSK_CONVERTED_TO_ZOMBIE;
|
SoundEvent SPELL_BUBBLE_DISTURB = BLOCK_HONEY_BLOCK_STEP;
|
||||||
|
SoundEvent SPELL_FIRE_CRACKLE = BLOCK_FURNACE_FIRE_CRACKLE;
|
||||||
|
|
||||||
|
SoundEvent SPELL_NECROMANCY_ACTIVATE = BLOCK_BELL_USE;
|
||||||
|
|
||||||
|
SoundEvent SPELL_DISPLACEMENT_TELEPORT = ENTITY_HUSK_CONVERTED_TO_ZOMBIE;
|
||||||
|
|
||||||
|
SoundEvent ENCHANTMENT_CONSUMPTION_CONSUME = ENTITY_PLAYER_BURP;
|
||||||
|
|
||||||
|
SoundEvent PARTICLE_RAINBOOM_THUNDER = ENTITY_LIGHTNING_BOLT_THUNDER;
|
||||||
|
SoundEvent PARTICLE_RAINBOOM_REVERB = ENTITY_LIGHTNING_BOLT_THUNDER;
|
||||||
|
|
||||||
|
SoundEvent AMBIENT_WIND_GUST = register("ambient.wind.gust");
|
||||||
SoundEvent AMBIENT_DARK_VORTEX_MOOD = register("ambient.dark_vortex.mood");
|
SoundEvent AMBIENT_DARK_VORTEX_MOOD = register("ambient.dark_vortex.mood");
|
||||||
SoundEvent AMBIENT_DARK_VORTEX_ADDITIONS = register("ambient.dark_vortex.additions");
|
SoundEvent AMBIENT_DARK_VORTEX_ADDITIONS = register("ambient.dark_vortex.additions");
|
||||||
|
|
||||||
SoundEvent GUI_ABILITY_FAIL = register("gui.ability.fail");
|
SoundEvent GUI_ABILITY_FAIL = register("gui.ability.fail");
|
||||||
SoundEvent GUI_SPELL_CRAFT_SUCCESS = register("gui.spellcraft.success");
|
SoundEvent GUI_SPELL_CRAFT_SUCCESS = register("gui.spellcraft.success");
|
||||||
|
RegistryEntry.Reference<SoundEvent> GUI_SPELL_EQUIP = UI_BUTTON_CLICK;
|
||||||
|
|
||||||
SoundEvent RECORD_CRUSADE = register("music_disc.crusade");
|
SoundEvent RECORD_CRUSADE = register("music_disc.crusade");
|
||||||
SoundEvent RECORD_PET = register("music_disc.pet");
|
SoundEvent RECORD_PET = register("music_disc.pet");
|
||||||
|
@ -93,4 +133,6 @@ public interface USounds {
|
||||||
}
|
}
|
||||||
|
|
||||||
static void bootstrap() {}
|
static void bootstrap() {}
|
||||||
|
|
||||||
|
static final class Vanilla extends SoundEvents {}
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,7 +19,6 @@ import com.minelittlepony.unicopia.util.VecHelper;
|
||||||
|
|
||||||
import net.minecraft.entity.LivingEntity;
|
import net.minecraft.entity.LivingEntity;
|
||||||
import net.minecraft.particle.ParticleTypes;
|
import net.minecraft.particle.ParticleTypes;
|
||||||
import net.minecraft.sound.SoundEvents;
|
|
||||||
import net.minecraft.util.math.MathHelper;
|
import net.minecraft.util.math.MathHelper;
|
||||||
import net.minecraft.util.math.Vec3d;
|
import net.minecraft.util.math.Vec3d;
|
||||||
import net.minecraft.util.math.random.Random;
|
import net.minecraft.util.math.random.Random;
|
||||||
|
@ -111,7 +110,7 @@ public class BatEeeeAbility implements Ability<Numeric> {
|
||||||
if (e.getWorld().random.nextInt(MOB_SPOOK_PROBABILITY) == 0) {
|
if (e.getWorld().random.nextInt(MOB_SPOOK_PROBABILITY) == 0) {
|
||||||
RegistryUtils.pickRandom(e.getWorld(), UTags.SPOOKED_MOB_DROPS).ifPresent(drop -> {
|
RegistryUtils.pickRandom(e.getWorld(), UTags.SPOOKED_MOB_DROPS).ifPresent(drop -> {
|
||||||
e.dropStack(drop.getDefaultStack());
|
e.dropStack(drop.getDefaultStack());
|
||||||
e.playSound(SoundEvents.ENTITY_ITEM_PICKUP, 1, 0.1F);
|
e.playSound(USounds.Vanilla.ENTITY_ITEM_PICKUP, 1, 0.1F);
|
||||||
UCriteria.SPOOK_MOB.trigger(player.asEntity());
|
UCriteria.SPOOK_MOB.trigger(player.asEntity());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,6 +7,7 @@ import java.util.stream.Collectors;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
import com.minelittlepony.unicopia.Race;
|
import com.minelittlepony.unicopia.Race;
|
||||||
|
import com.minelittlepony.unicopia.USounds;
|
||||||
import com.minelittlepony.unicopia.ability.data.Hit;
|
import com.minelittlepony.unicopia.ability.data.Hit;
|
||||||
import com.minelittlepony.unicopia.entity.damage.UDamageTypes;
|
import com.minelittlepony.unicopia.entity.damage.UDamageTypes;
|
||||||
import com.minelittlepony.unicopia.entity.player.Pony;
|
import com.minelittlepony.unicopia.entity.player.Pony;
|
||||||
|
@ -28,7 +29,6 @@ import net.minecraft.entity.passive.PigEntity;
|
||||||
import net.minecraft.entity.passive.SheepEntity;
|
import net.minecraft.entity.passive.SheepEntity;
|
||||||
import net.minecraft.entity.player.PlayerEntity;
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
import net.minecraft.particle.ParticleTypes;
|
import net.minecraft.particle.ParticleTypes;
|
||||||
import net.minecraft.sound.SoundEvents;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Changeling ability to restore health from mobs
|
* Changeling ability to restore health from mobs
|
||||||
|
@ -122,9 +122,9 @@ public class ChangelingFeedAbility implements Ability<Hit> {
|
||||||
|
|
||||||
|
|
||||||
if (!canFeed(iplayer)) {
|
if (!canFeed(iplayer)) {
|
||||||
iplayer.playSound(SoundEvents.ENTITY_PLAYER_BURP, 1, (float)player.getWorld().random.nextTriangular(1F, 0.2F));
|
iplayer.playSound(USounds.Vanilla.ENTITY_PLAYER_BURP, 1, (float)player.getWorld().random.nextTriangular(1F, 0.2F));
|
||||||
} else {
|
} else {
|
||||||
iplayer.playSound(SoundEvents.ENTITY_GENERIC_DRINK, 0.1F, iplayer.getRandomPitch());
|
iplayer.playSound(USounds.ENTITY_PLAYER_CHANGELING_FEED, 0.1F, iplayer.getRandomPitch());
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -23,7 +23,6 @@ import net.minecraft.entity.attribute.*;
|
||||||
import net.minecraft.entity.attribute.EntityAttributeModifier.Operation;
|
import net.minecraft.entity.attribute.EntityAttributeModifier.Operation;
|
||||||
import net.minecraft.nbt.NbtCompound;
|
import net.minecraft.nbt.NbtCompound;
|
||||||
import net.minecraft.particle.ParticleTypes;
|
import net.minecraft.particle.ParticleTypes;
|
||||||
import net.minecraft.sound.SoundEvents;
|
|
||||||
import net.minecraft.util.hit.EntityHitResult;
|
import net.minecraft.util.hit.EntityHitResult;
|
||||||
import net.minecraft.util.math.MathHelper;
|
import net.minecraft.util.math.MathHelper;
|
||||||
import net.minecraft.util.math.Vec3d;
|
import net.minecraft.util.math.Vec3d;
|
||||||
|
@ -121,7 +120,7 @@ public class BubbleSpell extends AbstractSpell implements TimedSpell,
|
||||||
if (source instanceof Pony pony && pony.sneakingChanged() && pony.asEntity().isSneaking()) {
|
if (source instanceof Pony pony && pony.sneakingChanged() && pony.asEntity().isSneaking()) {
|
||||||
setDirty();
|
setDirty();
|
||||||
radius += 0.5F;
|
radius += 0.5F;
|
||||||
source.playSound(SoundEvents.BLOCK_HONEY_BLOCK_STEP, 1);
|
source.playSound(USounds.SPELL_BUBBLE_DISTURB, 1);
|
||||||
if (struggles-- <= 0) {
|
if (struggles-- <= 0) {
|
||||||
setDead();
|
setDead();
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package com.minelittlepony.unicopia.ability.magic.spell.effect;
|
package com.minelittlepony.unicopia.ability.magic.spell.effect;
|
||||||
|
|
||||||
import com.minelittlepony.unicopia.EquinePredicates;
|
import com.minelittlepony.unicopia.EquinePredicates;
|
||||||
|
import com.minelittlepony.unicopia.USounds;
|
||||||
import com.minelittlepony.unicopia.ability.magic.Caster;
|
import com.minelittlepony.unicopia.ability.magic.Caster;
|
||||||
import com.minelittlepony.unicopia.ability.magic.spell.Situation;
|
import com.minelittlepony.unicopia.ability.magic.spell.Situation;
|
||||||
import com.minelittlepony.unicopia.ability.magic.spell.AbstractAreaEffectSpell;
|
import com.minelittlepony.unicopia.ability.magic.spell.AbstractAreaEffectSpell;
|
||||||
|
@ -24,7 +25,6 @@ import net.minecraft.entity.damage.DamageTypes;
|
||||||
import net.minecraft.entity.player.PlayerEntity;
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
import net.minecraft.particle.ParticleTypes;
|
import net.minecraft.particle.ParticleTypes;
|
||||||
import net.minecraft.sound.SoundCategory;
|
import net.minecraft.sound.SoundCategory;
|
||||||
import net.minecraft.sound.SoundEvents;
|
|
||||||
import net.minecraft.registry.tag.BlockTags;
|
import net.minecraft.registry.tag.BlockTags;
|
||||||
import net.minecraft.util.hit.BlockHitResult;
|
import net.minecraft.util.hit.BlockHitResult;
|
||||||
import net.minecraft.util.hit.EntityHitResult;
|
import net.minecraft.util.hit.EntityHitResult;
|
||||||
|
@ -166,7 +166,7 @@ public class FireSpell extends AbstractAreaEffectSpell implements ProjectileDele
|
||||||
int y = pos.getY();
|
int y = pos.getY();
|
||||||
int z = pos.getZ();
|
int z = pos.getZ();
|
||||||
|
|
||||||
world.playSound(null, pos, SoundEvents.BLOCK_FURNACE_FIRE_CRACKLE, SoundCategory.AMBIENT, 0.5F, 2.6F + (world.random.nextFloat() - world.random.nextFloat()) * 0.8F);
|
world.playSound(null, pos, USounds.SPELL_FIRE_CRACKLE, SoundCategory.AMBIENT, 0.5F, 2.6F + (world.random.nextFloat() - world.random.nextFloat()) * 0.8F);
|
||||||
|
|
||||||
for (int i = 0; i < 8; ++i) {
|
for (int i = 0; i < 8; ++i) {
|
||||||
ParticleUtils.spawnParticle(world, ParticleTypes.LARGE_SMOKE, new Vec3d(
|
ParticleUtils.spawnParticle(world, ParticleTypes.LARGE_SMOKE, new Vec3d(
|
||||||
|
|
|
@ -4,6 +4,7 @@ import java.util.*;
|
||||||
import java.util.function.Predicate;
|
import java.util.function.Predicate;
|
||||||
import java.util.function.Supplier;
|
import java.util.function.Supplier;
|
||||||
|
|
||||||
|
import com.minelittlepony.unicopia.USounds;
|
||||||
import com.minelittlepony.unicopia.ability.magic.Caster;
|
import com.minelittlepony.unicopia.ability.magic.Caster;
|
||||||
import com.minelittlepony.unicopia.ability.magic.spell.AbstractAreaEffectSpell;
|
import com.minelittlepony.unicopia.ability.magic.spell.AbstractAreaEffectSpell;
|
||||||
import com.minelittlepony.unicopia.ability.magic.spell.CastingMethod;
|
import com.minelittlepony.unicopia.ability.magic.spell.CastingMethod;
|
||||||
|
@ -31,7 +32,6 @@ import net.minecraft.nbt.NbtCompound;
|
||||||
import net.minecraft.nbt.NbtElement;
|
import net.minecraft.nbt.NbtElement;
|
||||||
import net.minecraft.nbt.NbtList;
|
import net.minecraft.nbt.NbtList;
|
||||||
import net.minecraft.particle.ParticleTypes;
|
import net.minecraft.particle.ParticleTypes;
|
||||||
import net.minecraft.sound.SoundEvents;
|
|
||||||
import net.minecraft.util.hit.BlockHitResult;
|
import net.minecraft.util.hit.BlockHitResult;
|
||||||
import net.minecraft.util.hit.EntityHitResult;
|
import net.minecraft.util.hit.EntityHitResult;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
@ -185,7 +185,7 @@ public class NecromancySpell extends AbstractAreaEffectSpell implements Projecti
|
||||||
minion.setVelocity(0, 0.3, 0);
|
minion.setVelocity(0, 0.3, 0);
|
||||||
|
|
||||||
source.asWorld().syncWorldEvent(WorldEvents.DRAGON_BREATH_CLOUD_SPAWNS, minion.getBlockPos(), 0);
|
source.asWorld().syncWorldEvent(WorldEvents.DRAGON_BREATH_CLOUD_SPAWNS, minion.getBlockPos(), 0);
|
||||||
source.playSound(SoundEvents.BLOCK_BELL_USE, 1, 0.3F);
|
source.playSound(USounds.SPELL_NECROMANCY_ACTIVATE, 1, 0.3F);
|
||||||
source.spawnParticles(ParticleTypes.LARGE_SMOKE, 10);
|
source.spawnParticles(ParticleTypes.LARGE_SMOKE, 10);
|
||||||
|
|
||||||
int level = source.getLevel().get();
|
int level = source.getLevel().get();
|
||||||
|
|
|
@ -14,7 +14,6 @@ import net.minecraft.fluid.Fluids;
|
||||||
import net.minecraft.item.*;
|
import net.minecraft.item.*;
|
||||||
import net.minecraft.particle.ParticleTypes;
|
import net.minecraft.particle.ParticleTypes;
|
||||||
import net.minecraft.sound.SoundCategory;
|
import net.minecraft.sound.SoundCategory;
|
||||||
import net.minecraft.sound.SoundEvents;
|
|
||||||
import net.minecraft.stat.Stats;
|
import net.minecraft.stat.Stats;
|
||||||
import net.minecraft.state.StateManager;
|
import net.minecraft.state.StateManager;
|
||||||
import net.minecraft.state.property.*;
|
import net.minecraft.state.property.*;
|
||||||
|
@ -89,7 +88,7 @@ public class PieBlock extends Block implements Waterloggable {
|
||||||
SoundEmitter.playSoundAt(player, USounds.BLOCK_PIE_SLICE, SoundCategory.NEUTRAL, 1, 1);
|
SoundEmitter.playSoundAt(player, USounds.BLOCK_PIE_SLICE, SoundCategory.NEUTRAL, 1, 1);
|
||||||
removeSlice(world, pos, state, player);
|
removeSlice(world, pos, state, player);
|
||||||
itemStack.damage(1, player, p -> p.sendToolBreakStatus(hand));
|
itemStack.damage(1, player, p -> p.sendToolBreakStatus(hand));
|
||||||
SoundEmitter.playSoundAt(player, SoundEvents.ENTITY_ITEM_PICKUP, SoundCategory.NEUTRAL, 0.5F, world.getRandom().nextFloat() * 0.1F + 0.9F);
|
SoundEmitter.playSoundAt(player, USounds.BLOCK_PIE_SLICE_POP, SoundCategory.NEUTRAL, 0.5F, world.getRandom().nextFloat() * 0.1F + 0.9F);
|
||||||
Block.dropStack(world, pos, sliceItem.asItem().getDefaultStack());
|
Block.dropStack(world, pos, sliceItem.asItem().getDefaultStack());
|
||||||
return ActionResult.SUCCESS;
|
return ActionResult.SUCCESS;
|
||||||
}
|
}
|
||||||
|
@ -105,10 +104,10 @@ public class PieBlock extends Block implements Waterloggable {
|
||||||
player.getHungerManager().add(state.get(STOMPED) ? 1 : 2, 0.1f);
|
player.getHungerManager().add(state.get(STOMPED) ? 1 : 2, 0.1f);
|
||||||
|
|
||||||
world.emitGameEvent(player, GameEvent.EAT, pos);
|
world.emitGameEvent(player, GameEvent.EAT, pos);
|
||||||
SoundEmitter.playSoundAt(player, SoundEvents.ENTITY_GENERIC_EAT, 0.5F, world.getRandom().nextFloat() * 0.1F + 0.9F);
|
SoundEmitter.playSoundAt(player, USounds.Vanilla.ENTITY_GENERIC_EAT, 0.5F, world.getRandom().nextFloat() * 0.1F + 0.9F);
|
||||||
if (world instanceof World ww && (!player.canConsume(false) || world.getRandom().nextInt(10) == 0)) {
|
if (world instanceof World ww && (!player.canConsume(false) || world.getRandom().nextInt(10) == 0)) {
|
||||||
AwaitTickQueue.scheduleTask(ww, w -> {
|
AwaitTickQueue.scheduleTask(ww, w -> {
|
||||||
SoundEmitter.playSoundAt(player, SoundEvents.ENTITY_PLAYER_BURP, 0.5F, world.getRandom().nextFloat() * 0.1F + 0.9F);
|
SoundEmitter.playSoundAt(player, USounds.Vanilla.ENTITY_PLAYER_BURP, 0.5F, world.getRandom().nextFloat() * 0.1F + 0.9F);
|
||||||
}, 5);
|
}, 5);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,6 @@ import net.minecraft.entity.vehicle.AbstractMinecartEntity;
|
||||||
import net.minecraft.network.PacketByteBuf;
|
import net.minecraft.network.PacketByteBuf;
|
||||||
import net.minecraft.server.world.ServerWorld;
|
import net.minecraft.server.world.ServerWorld;
|
||||||
import net.minecraft.sound.SoundCategory;
|
import net.minecraft.sound.SoundCategory;
|
||||||
import net.minecraft.sound.SoundEvents;
|
|
||||||
import net.minecraft.util.Identifier;
|
import net.minecraft.util.Identifier;
|
||||||
import net.minecraft.util.math.random.Random;
|
import net.minecraft.util.math.random.Random;
|
||||||
import net.minecraft.world.BlockView;
|
import net.minecraft.world.BlockView;
|
||||||
|
@ -83,7 +82,7 @@ public class ClientInteractionManager extends InteractionManager {
|
||||||
return physics.isFlying() && physics.getFlightType() == FlightType.INSECTOID;
|
return physics.isFlying() && physics.getFlightType() == FlightType.INSECTOID;
|
||||||
}, 0.25F, 0.5F, 0.66F, Random.create(seed)));
|
}, 0.25F, 0.5F, 0.66F, Random.create(seed)));
|
||||||
} else if (type == SOUND_GLIDING && source instanceof PlayerEntity player && isClientPlayer(player)) {
|
} else if (type == SOUND_GLIDING && source instanceof PlayerEntity player && isClientPlayer(player)) {
|
||||||
soundManager.play(new MotionBasedSoundInstance<>(SoundEvents.ITEM_ELYTRA_FLYING, player, e -> {
|
soundManager.play(new MotionBasedSoundInstance<>(USounds.Vanilla.ITEM_ELYTRA_FLYING, player, e -> {
|
||||||
Pony pony = Pony.of(e);
|
Pony pony = Pony.of(e);
|
||||||
return pony.getPhysics().isFlying() && pony.getPhysics().getFlightType().isAvian();
|
return pony.getPhysics().isFlying() && pony.getPhysics().getFlightType().isAvian();
|
||||||
}, 0, 1, 1, Random.create(seed)));
|
}, 0, 1, 1, Random.create(seed)));
|
||||||
|
|
|
@ -7,6 +7,7 @@ import java.util.Set;
|
||||||
|
|
||||||
import org.lwjgl.glfw.GLFW;
|
import org.lwjgl.glfw.GLFW;
|
||||||
|
|
||||||
|
import com.minelittlepony.unicopia.USounds;
|
||||||
import com.minelittlepony.unicopia.Unicopia;
|
import com.minelittlepony.unicopia.Unicopia;
|
||||||
import com.minelittlepony.unicopia.ability.AbilityDispatcher;
|
import com.minelittlepony.unicopia.ability.AbilityDispatcher;
|
||||||
import com.minelittlepony.unicopia.ability.AbilitySlot;
|
import com.minelittlepony.unicopia.ability.AbilitySlot;
|
||||||
|
@ -18,7 +19,6 @@ import net.fabricmc.fabric.api.client.keybinding.v1.KeyBindingHelper;
|
||||||
import net.minecraft.client.MinecraftClient;
|
import net.minecraft.client.MinecraftClient;
|
||||||
import net.minecraft.client.option.KeyBinding;
|
import net.minecraft.client.option.KeyBinding;
|
||||||
import net.minecraft.client.sound.PositionedSoundInstance;
|
import net.minecraft.client.sound.PositionedSoundInstance;
|
||||||
import net.minecraft.sound.SoundEvents;
|
|
||||||
import net.minecraft.text.Text;
|
import net.minecraft.text.Text;
|
||||||
import net.minecraft.util.math.MathHelper;
|
import net.minecraft.util.math.MathHelper;
|
||||||
|
|
||||||
|
@ -104,7 +104,7 @@ public class KeyBindingsHandler {
|
||||||
int page = Unicopia.getConfig().hudPage.get();
|
int page = Unicopia.getConfig().hudPage.get();
|
||||||
page += sigma;
|
page += sigma;
|
||||||
Unicopia.getConfig().hudPage.set(page);
|
Unicopia.getConfig().hudPage.set(page);
|
||||||
client.getSoundManager().play(PositionedSoundInstance.master(SoundEvents.UI_BUTTON_CLICK, 1.75F + (0.25F * sigma)));
|
client.getSoundManager().play(PositionedSoundInstance.master(USounds.Vanilla.UI_BUTTON_CLICK, 1.75F + (0.25F * sigma)));
|
||||||
UHud.INSTANCE.setMessage(Text.translatable("gui.unicopia.page_num", page + 1, max + 1));
|
UHud.INSTANCE.setMessage(Text.translatable("gui.unicopia.page_num", page + 1, max + 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,6 +6,7 @@ import java.util.List;
|
||||||
import org.joml.Vector4f;
|
import org.joml.Vector4f;
|
||||||
|
|
||||||
import com.minelittlepony.common.client.gui.GameGui;
|
import com.minelittlepony.common.client.gui.GameGui;
|
||||||
|
import com.minelittlepony.unicopia.USounds;
|
||||||
import com.minelittlepony.unicopia.ability.magic.spell.*;
|
import com.minelittlepony.unicopia.ability.magic.spell.*;
|
||||||
import com.minelittlepony.unicopia.client.FlowingText;
|
import com.minelittlepony.unicopia.client.FlowingText;
|
||||||
import com.minelittlepony.unicopia.client.render.model.SphereModel;
|
import com.minelittlepony.unicopia.client.render.model.SphereModel;
|
||||||
|
@ -19,7 +20,6 @@ import net.minecraft.client.gui.screen.narration.NarrationMessageBuilder;
|
||||||
import net.minecraft.client.sound.PositionedSoundInstance;
|
import net.minecraft.client.sound.PositionedSoundInstance;
|
||||||
import net.minecraft.client.util.math.MatrixStack;
|
import net.minecraft.client.util.math.MatrixStack;
|
||||||
import net.minecraft.screen.ScreenTexts;
|
import net.minecraft.screen.ScreenTexts;
|
||||||
import net.minecraft.sound.SoundEvents;
|
|
||||||
import net.minecraft.text.MutableText;
|
import net.minecraft.text.MutableText;
|
||||||
import net.minecraft.text.Text;
|
import net.minecraft.text.Text;
|
||||||
import net.minecraft.util.StringHelper;
|
import net.minecraft.util.StringHelper;
|
||||||
|
@ -234,7 +234,7 @@ public class DismissSpellScreen extends GameGui {
|
||||||
}
|
}
|
||||||
|
|
||||||
static void playClickEffect() {
|
static void playClickEffect() {
|
||||||
MinecraftClient.getInstance().getSoundManager().play(PositionedSoundInstance.master(SoundEvents.UI_BUTTON_CLICK.value(), 6, 0.3F));
|
MinecraftClient.getInstance().getSoundManager().play(PositionedSoundInstance.master(USounds.Vanilla.UI_BUTTON_CLICK.value(), 6, 0.3F));
|
||||||
}
|
}
|
||||||
|
|
||||||
static double squareDistance(double x1, double y1, double x2, double y2) {
|
static double squareDistance(double x1, double y1, double x2, double y2) {
|
||||||
|
|
|
@ -25,7 +25,6 @@ import net.minecraft.client.gui.hud.InGameHud;
|
||||||
import net.minecraft.client.util.math.MatrixStack;
|
import net.minecraft.client.util.math.MatrixStack;
|
||||||
import net.minecraft.entity.player.PlayerEntity;
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.sound.SoundEvents;
|
|
||||||
import net.minecraft.text.Text;
|
import net.minecraft.text.Text;
|
||||||
import net.minecraft.util.*;
|
import net.minecraft.util.*;
|
||||||
import net.minecraft.util.math.*;
|
import net.minecraft.util.math.*;
|
||||||
|
@ -272,7 +271,7 @@ public class UHud {
|
||||||
client.getSoundManager().play(
|
client.getSoundManager().play(
|
||||||
partySound = new LoopingSoundInstance<>(client.player, player -> {
|
partySound = new LoopingSoundInstance<>(client.player, player -> {
|
||||||
return UItems.SUNGLASSES.isApplicable(player) || true;
|
return UItems.SUNGLASSES.isApplicable(player) || true;
|
||||||
}, SoundEvents.MUSIC_DISC_PIGSTEP, 1, 1, client.world.random)
|
}, USounds.Vanilla.MUSIC_DISC_PIGSTEP, 1, 1, client.world.random)
|
||||||
);
|
);
|
||||||
} else if (partySound != null) {
|
} else if (partySound != null) {
|
||||||
partySound.setMuted(false);
|
partySound.setMuted(false);
|
||||||
|
|
|
@ -9,6 +9,7 @@ import com.minelittlepony.common.client.gui.dimension.Bounds;
|
||||||
import com.minelittlepony.common.client.gui.element.Button;
|
import com.minelittlepony.common.client.gui.element.Button;
|
||||||
import com.minelittlepony.common.client.gui.sprite.TextureSprite;
|
import com.minelittlepony.common.client.gui.sprite.TextureSprite;
|
||||||
import com.minelittlepony.unicopia.Debug;
|
import com.minelittlepony.unicopia.Debug;
|
||||||
|
import com.minelittlepony.unicopia.USounds;
|
||||||
import com.minelittlepony.unicopia.Unicopia;
|
import com.minelittlepony.unicopia.Unicopia;
|
||||||
import com.minelittlepony.unicopia.client.gui.*;
|
import com.minelittlepony.unicopia.client.gui.*;
|
||||||
import com.minelittlepony.unicopia.client.gui.spellbook.SpellbookChapterList.*;
|
import com.minelittlepony.unicopia.client.gui.spellbook.SpellbookChapterList.*;
|
||||||
|
@ -30,7 +31,6 @@ import net.minecraft.client.render.GameRenderer;
|
||||||
import net.minecraft.client.util.math.MatrixStack;
|
import net.minecraft.client.util.math.MatrixStack;
|
||||||
import net.minecraft.entity.player.PlayerInventory;
|
import net.minecraft.entity.player.PlayerInventory;
|
||||||
import net.minecraft.screen.slot.Slot;
|
import net.minecraft.screen.slot.Slot;
|
||||||
import net.minecraft.sound.SoundEvents;
|
|
||||||
import net.minecraft.text.Text;
|
import net.minecraft.text.Text;
|
||||||
import net.minecraft.util.Identifier;
|
import net.minecraft.util.Identifier;
|
||||||
import net.minecraft.util.math.ColorHelper;
|
import net.minecraft.util.math.ColorHelper;
|
||||||
|
@ -223,7 +223,7 @@ public class SpellbookScreen extends HandledScreen<SpellbookScreenHandler> imple
|
||||||
return tabs.getAllTabs().anyMatch(tab -> {
|
return tabs.getAllTabs().anyMatch(tab -> {
|
||||||
if (tab.bounds().contains(mouseX, mouseY) && chapters.getCurrentChapter() != tab.chapter()) {
|
if (tab.bounds().contains(mouseX, mouseY) && chapters.getCurrentChapter() != tab.chapter()) {
|
||||||
getState().setCurrentPageId(tab.chapter().id());
|
getState().setCurrentPageId(tab.chapter().id());
|
||||||
GameGui.playSound(SoundEvents.ITEM_BOOK_PAGE_TURN);
|
GameGui.playSound(USounds.Vanilla.ITEM_BOOK_PAGE_TURN);
|
||||||
clearAndInit();
|
clearAndInit();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,6 +7,7 @@ import com.minelittlepony.common.client.gui.*;
|
||||||
import com.minelittlepony.common.client.gui.element.Button;
|
import com.minelittlepony.common.client.gui.element.Button;
|
||||||
import com.minelittlepony.common.client.gui.element.Label;
|
import com.minelittlepony.common.client.gui.element.Label;
|
||||||
import com.minelittlepony.common.client.gui.sprite.TextureSprite;
|
import com.minelittlepony.common.client.gui.sprite.TextureSprite;
|
||||||
|
import com.minelittlepony.unicopia.USounds;
|
||||||
import com.minelittlepony.unicopia.ability.magic.spell.trait.*;
|
import com.minelittlepony.unicopia.ability.magic.spell.trait.*;
|
||||||
import com.minelittlepony.unicopia.client.gui.spellbook.SpellbookChapterList.Chapter;
|
import com.minelittlepony.unicopia.client.gui.spellbook.SpellbookChapterList.Chapter;
|
||||||
import com.minelittlepony.unicopia.client.gui.spellbook.SpellbookScreen.ImageButton;
|
import com.minelittlepony.unicopia.client.gui.spellbook.SpellbookScreen.ImageButton;
|
||||||
|
@ -19,7 +20,6 @@ import net.minecraft.client.MinecraftClient;
|
||||||
import net.minecraft.client.gui.DrawContext;
|
import net.minecraft.client.gui.DrawContext;
|
||||||
import net.minecraft.client.util.math.MatrixStack;
|
import net.minecraft.client.util.math.MatrixStack;
|
||||||
import net.minecraft.item.*;
|
import net.minecraft.item.*;
|
||||||
import net.minecraft.sound.SoundEvents;
|
|
||||||
import net.minecraft.text.Text;
|
import net.minecraft.text.Text;
|
||||||
import net.minecraft.util.Identifier;
|
import net.minecraft.util.Identifier;
|
||||||
import net.minecraft.util.Util;
|
import net.minecraft.util.Util;
|
||||||
|
@ -77,7 +77,7 @@ public class SpellbookTraitDexPageContent implements SpellbookChapterList.Conten
|
||||||
leftPage.verticalScrollbar.scrollBy(leftPage.verticalScrollbar.getScrubber().getPosition());
|
leftPage.verticalScrollbar.scrollBy(leftPage.verticalScrollbar.getScrubber().getPosition());
|
||||||
rightPage.verticalScrollbar.scrollBy(rightPage.verticalScrollbar.getScrubber().getPosition());
|
rightPage.verticalScrollbar.scrollBy(rightPage.verticalScrollbar.getScrubber().getPosition());
|
||||||
|
|
||||||
GameGui.playSound(SoundEvents.ITEM_BOOK_PAGE_TURN);
|
GameGui.playSound(USounds.Vanilla.ITEM_BOOK_PAGE_TURN);
|
||||||
screen.clearAndInit();
|
screen.clearAndInit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,7 @@ import java.util.List;
|
||||||
|
|
||||||
import org.joml.Vector3f;
|
import org.joml.Vector3f;
|
||||||
|
|
||||||
|
import com.minelittlepony.unicopia.USounds;
|
||||||
import com.mojang.blaze3d.systems.RenderSystem;
|
import com.mojang.blaze3d.systems.RenderSystem;
|
||||||
|
|
||||||
import net.minecraft.client.MinecraftClient;
|
import net.minecraft.client.MinecraftClient;
|
||||||
|
@ -15,7 +16,6 @@ import net.minecraft.client.render.VertexConsumerProvider;
|
||||||
import net.minecraft.client.world.ClientWorld;
|
import net.minecraft.client.world.ClientWorld;
|
||||||
import net.minecraft.particle.DefaultParticleType;
|
import net.minecraft.particle.DefaultParticleType;
|
||||||
import net.minecraft.sound.SoundCategory;
|
import net.minecraft.sound.SoundCategory;
|
||||||
import net.minecraft.sound.SoundEvents;
|
|
||||||
import net.minecraft.util.math.MathHelper;
|
import net.minecraft.util.math.MathHelper;
|
||||||
import net.minecraft.util.math.Vec3d;
|
import net.minecraft.util.math.Vec3d;
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ public class LightningBoltParticle extends AbstractGeometryBasedParticle {
|
||||||
branches.add(generateBranch());
|
branches.add(generateBranch());
|
||||||
}
|
}
|
||||||
|
|
||||||
world.playSound(x, y, z, SoundEvents.ENTITY_LIGHTNING_BOLT_THUNDER, SoundCategory.WEATHER, 10000, 8, true);
|
world.playSound(x, y, z, USounds.Vanilla.ENTITY_LIGHTNING_BOLT_THUNDER, SoundCategory.WEATHER, 10000, 8, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
world.setLightningTicksLeft(2);
|
world.setLightningTicksLeft(2);
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
package com.minelittlepony.unicopia.client.particle;
|
package com.minelittlepony.unicopia.client.particle;
|
||||||
|
|
||||||
|
import com.minelittlepony.unicopia.USounds;
|
||||||
import com.minelittlepony.unicopia.Unicopia;
|
import com.minelittlepony.unicopia.Unicopia;
|
||||||
import com.minelittlepony.unicopia.particle.OrientedBillboardParticleEffect;
|
import com.minelittlepony.unicopia.particle.OrientedBillboardParticleEffect;
|
||||||
|
|
||||||
import net.minecraft.client.world.ClientWorld;
|
import net.minecraft.client.world.ClientWorld;
|
||||||
import net.minecraft.sound.SoundCategory;
|
import net.minecraft.sound.SoundCategory;
|
||||||
import net.minecraft.sound.SoundEvents;
|
|
||||||
import net.minecraft.util.Identifier;
|
import net.minecraft.util.Identifier;
|
||||||
import net.minecraft.util.math.MathHelper;
|
import net.minecraft.util.math.MathHelper;
|
||||||
|
|
||||||
|
@ -38,8 +38,8 @@ public class RainboomParticle extends OrientedBillboardParticle {
|
||||||
baseSize++;
|
baseSize++;
|
||||||
|
|
||||||
if (age == 1) {
|
if (age == 1) {
|
||||||
world.playSound(x, y, z, SoundEvents.ENTITY_LIGHTNING_BOLT_THUNDER, SoundCategory.AMBIENT, 5, 0.3F, true);
|
world.playSound(x, y, z, USounds.PARTICLE_RAINBOOM_THUNDER, SoundCategory.AMBIENT, 5, 0.3F, true);
|
||||||
world.playSound(x, y, z, SoundEvents.ENTITY_LIGHTNING_BOLT_THUNDER, SoundCategory.AMBIENT, 10, 1.3F, true);
|
world.playSound(x, y, z, USounds.PARTICLE_RAINBOOM_REVERB, SoundCategory.AMBIENT, 10, 1.3F, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,6 @@ import net.minecraft.item.Items;
|
||||||
import net.minecraft.nbt.NbtCompound;
|
import net.minecraft.nbt.NbtCompound;
|
||||||
import net.minecraft.particle.ParticleTypes;
|
import net.minecraft.particle.ParticleTypes;
|
||||||
import net.minecraft.registry.RegistryKey;
|
import net.minecraft.registry.RegistryKey;
|
||||||
import net.minecraft.sound.SoundEvents;
|
|
||||||
import net.minecraft.util.ActionResult;
|
import net.minecraft.util.ActionResult;
|
||||||
import net.minecraft.util.Hand;
|
import net.minecraft.util.Hand;
|
||||||
import net.minecraft.util.Identifier;
|
import net.minecraft.util.Identifier;
|
||||||
|
@ -36,6 +35,7 @@ import java.util.function.Consumer;
|
||||||
import java.util.function.IntFunction;
|
import java.util.function.IntFunction;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
|
import com.minelittlepony.unicopia.USounds;
|
||||||
import com.minelittlepony.unicopia.entity.collision.EntityCollisions;
|
import com.minelittlepony.unicopia.entity.collision.EntityCollisions;
|
||||||
import com.minelittlepony.unicopia.entity.collision.MultiBox;
|
import com.minelittlepony.unicopia.entity.collision.MultiBox;
|
||||||
import com.minelittlepony.unicopia.entity.duck.EntityDuck;
|
import com.minelittlepony.unicopia.entity.duck.EntityDuck;
|
||||||
|
@ -213,11 +213,11 @@ public class AirBalloonEntity extends MobEntity implements EntityCollisions.Comp
|
||||||
}
|
}
|
||||||
|
|
||||||
if (boosting && !prevBoosting) {
|
if (boosting && !prevBoosting) {
|
||||||
playSound(SoundEvents.ENTITY_GHAST_SHOOT, 1, 1);
|
playSound(USounds.ENTITY_HOT_AIR_BALLOON_BOOST, 1, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isAscending() && age % 15 + rng.nextInt(5) == 0) {
|
if (isAscending() && age % 15 + rng.nextInt(5) == 0) {
|
||||||
playSound(SoundEvents.ENTITY_GHAST_SHOOT, 0.2F, 1);
|
playSound(USounds.ENTITY_HOT_AIR_BALLOON_BURNER_FIRE, 0.2F, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isLeashed()) {
|
if (isLeashed()) {
|
||||||
|
@ -294,7 +294,7 @@ public class AirBalloonEntity extends MobEntity implements EntityCollisions.Comp
|
||||||
if (getWorld().isClient) {
|
if (getWorld().isClient) {
|
||||||
if (e.distanceTraveled > ((EntityDuck)e).getNextStepSoundDistance()) {
|
if (e.distanceTraveled > ((EntityDuck)e).getNextStepSoundDistance()) {
|
||||||
e.distanceTraveled--;
|
e.distanceTraveled--;
|
||||||
e.playSound(inBalloon ? SoundEvents.BLOCK_WOOL_STEP : SoundEvents.BLOCK_BAMBOO_STEP, 0.5F, 1);
|
e.playSound(inBalloon ? USounds.ENTITY_HOT_AIR_BALLOON_STEP : USounds.ENTITY_HOT_AIR_BALLOON_BASKET_STEP, 0.5F, 1);
|
||||||
if (!e.isSneaky()) {
|
if (!e.isSneaky()) {
|
||||||
getWorld().emitGameEvent(e, GameEvent.STEP, getBlockPos());
|
getWorld().emitGameEvent(e, GameEvent.STEP, getBlockPos());
|
||||||
}
|
}
|
||||||
|
@ -311,10 +311,10 @@ public class AirBalloonEntity extends MobEntity implements EntityCollisions.Comp
|
||||||
if (stack.isOf(Items.FLINT_AND_STEEL)) {
|
if (stack.isOf(Items.FLINT_AND_STEEL)) {
|
||||||
setAscending(!isAscending());
|
setAscending(!isAscending());
|
||||||
if (isAscending()) {
|
if (isAscending()) {
|
||||||
playSound(SoundEvents.ENTITY_GHAST_SHOOT, 1, 1);
|
playSound(USounds.ENTITY_HOT_AIR_BALLOON_BOOST, 1, 1);
|
||||||
}
|
}
|
||||||
stack.damage(1, player, p -> p.sendEquipmentBreakStatus(hand == Hand.MAIN_HAND ? EquipmentSlot.MAINHAND : EquipmentSlot.OFFHAND));
|
stack.damage(1, player, p -> p.sendEquipmentBreakStatus(hand == Hand.MAIN_HAND ? EquipmentSlot.MAINHAND : EquipmentSlot.OFFHAND));
|
||||||
playSound(SoundEvents.ITEM_FLINTANDSTEEL_USE, 1, 1);
|
playSound(USounds.Vanilla.ITEM_FLINTANDSTEEL_USE, 1, 1);
|
||||||
getWorld().emitGameEvent(this, GameEvent.ENTITY_INTERACT, getBlockPos());
|
getWorld().emitGameEvent(this, GameEvent.ENTITY_INTERACT, getBlockPos());
|
||||||
return ActionResult.SUCCESS;
|
return ActionResult.SUCCESS;
|
||||||
}
|
}
|
||||||
|
@ -343,7 +343,7 @@ public class AirBalloonEntity extends MobEntity implements EntityCollisions.Comp
|
||||||
if (!player.getAbilities().creativeMode) {
|
if (!player.getAbilities().creativeMode) {
|
||||||
stack.decrement(1);
|
stack.decrement(1);
|
||||||
}
|
}
|
||||||
playSound(SoundEvents.ITEM_ARMOR_EQUIP_LEATHER, 1, 1);
|
playSound(USounds.ENTITY_HOT_AIR_BALLOON_EQUIP_CANOPY, 1, 1);
|
||||||
getWorld().emitGameEvent(this, GameEvent.ENTITY_INTERACT, getBlockPos());
|
getWorld().emitGameEvent(this, GameEvent.ENTITY_INTERACT, getBlockPos());
|
||||||
setDesign(HotAirBalloonItem.getDesign(getWorld(), stack));
|
setDesign(HotAirBalloonItem.getDesign(getWorld(), stack));
|
||||||
return ActionResult.SUCCESS;
|
return ActionResult.SUCCESS;
|
||||||
|
@ -354,7 +354,7 @@ public class AirBalloonEntity extends MobEntity implements EntityCollisions.Comp
|
||||||
if (!player.getAbilities().creativeMode) {
|
if (!player.getAbilities().creativeMode) {
|
||||||
stack.decrement(1);
|
stack.decrement(1);
|
||||||
}
|
}
|
||||||
playSound(SoundEvents.ENTITY_IRON_GOLEM_DAMAGE, 0.2F, 1);
|
playSound(USounds.ENTITY_HOT_AIR_BALLOON_EQUIP_BURNER, 0.2F, 1);
|
||||||
getWorld().emitGameEvent(this, GameEvent.ENTITY_INTERACT, getBlockPos());
|
getWorld().emitGameEvent(this, GameEvent.ENTITY_INTERACT, getBlockPos());
|
||||||
return ActionResult.SUCCESS;
|
return ActionResult.SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,7 +49,6 @@ import net.minecraft.network.packet.s2c.play.EntityPassengersSetS2CPacket;
|
||||||
import net.minecraft.particle.ParticleTypes;
|
import net.minecraft.particle.ParticleTypes;
|
||||||
import net.minecraft.registry.tag.DamageTypeTags;
|
import net.minecraft.registry.tag.DamageTypeTags;
|
||||||
import net.minecraft.server.world.ServerWorld;
|
import net.minecraft.server.world.ServerWorld;
|
||||||
import net.minecraft.sound.SoundEvents;
|
|
||||||
import net.minecraft.util.Hand;
|
import net.minecraft.util.Hand;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.util.math.Box;
|
import net.minecraft.util.math.Box;
|
||||||
|
@ -429,7 +428,7 @@ public abstract class Living<T extends LivingEntity> implements Equine<T>, Caste
|
||||||
ItemStack broken = UItems.BROKEN_SUNGLASSES.getDefaultStack();
|
ItemStack broken = UItems.BROKEN_SUNGLASSES.getDefaultStack();
|
||||||
broken.setNbt(glasses.getNbt());
|
broken.setNbt(glasses.getNbt());
|
||||||
TrinketsDelegate.getInstance().setEquippedStack(entity, TrinketsDelegate.FACE, broken);
|
TrinketsDelegate.getInstance().setEquippedStack(entity, TrinketsDelegate.FACE, broken);
|
||||||
playSound(SoundEvents.BLOCK_GLASS_BREAK, 1, 1);
|
playSound(USounds.ITEM_SUNGLASSES_SHATTER, 1, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,7 @@ package com.minelittlepony.unicopia.entity;
|
||||||
|
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
|
import com.minelittlepony.unicopia.USounds;
|
||||||
import com.minelittlepony.unicopia.UTags;
|
import com.minelittlepony.unicopia.UTags;
|
||||||
import com.minelittlepony.unicopia.ability.magic.Caster;
|
import com.minelittlepony.unicopia.ability.magic.Caster;
|
||||||
|
|
||||||
|
@ -25,7 +26,6 @@ import net.minecraft.nbt.NbtCompound;
|
||||||
import net.minecraft.registry.tag.BlockTags;
|
import net.minecraft.registry.tag.BlockTags;
|
||||||
import net.minecraft.sound.SoundCategory;
|
import net.minecraft.sound.SoundCategory;
|
||||||
import net.minecraft.sound.SoundEvent;
|
import net.minecraft.sound.SoundEvent;
|
||||||
import net.minecraft.sound.SoundEvents;
|
|
||||||
import net.minecraft.util.hit.BlockHitResult;
|
import net.minecraft.util.hit.BlockHitResult;
|
||||||
import net.minecraft.util.hit.EntityHitResult;
|
import net.minecraft.util.hit.EntityHitResult;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
@ -218,7 +218,7 @@ public class PhysicsBodyProjectileEntity extends PersistentProjectileEntity impl
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected SoundEvent getHitSound() {
|
protected SoundEvent getHitSound() {
|
||||||
return isBouncy() ? SoundEvents.BLOCK_NOTE_BLOCK_BANJO.value() : SoundEvents.BLOCK_STONE_HIT;
|
return isBouncy() ? USounds.ITEM_MUFFIN_BOUNCE.value() : USounds.ITEM_ROCK_LAND;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package com.minelittlepony.unicopia.entity;
|
package com.minelittlepony.unicopia.entity;
|
||||||
|
|
||||||
import com.minelittlepony.unicopia.EquinePredicates;
|
import com.minelittlepony.unicopia.EquinePredicates;
|
||||||
|
import com.minelittlepony.unicopia.USounds;
|
||||||
import com.minelittlepony.unicopia.UTags;
|
import com.minelittlepony.unicopia.UTags;
|
||||||
import com.minelittlepony.unicopia.container.SpellbookScreenHandler;
|
import com.minelittlepony.unicopia.container.SpellbookScreenHandler;
|
||||||
import com.minelittlepony.unicopia.container.SpellbookState;
|
import com.minelittlepony.unicopia.container.SpellbookState;
|
||||||
|
@ -28,7 +29,6 @@ import net.minecraft.screen.*;
|
||||||
import net.minecraft.server.network.ServerPlayerEntity;
|
import net.minecraft.server.network.ServerPlayerEntity;
|
||||||
import net.minecraft.sound.BlockSoundGroup;
|
import net.minecraft.sound.BlockSoundGroup;
|
||||||
import net.minecraft.sound.SoundCategory;
|
import net.minecraft.sound.SoundCategory;
|
||||||
import net.minecraft.sound.SoundEvents;
|
|
||||||
import net.minecraft.text.Text;
|
import net.minecraft.text.Text;
|
||||||
import net.minecraft.util.ActionResult;
|
import net.minecraft.util.ActionResult;
|
||||||
import net.minecraft.util.Hand;
|
import net.minecraft.util.Hand;
|
||||||
|
@ -204,7 +204,7 @@ public class SpellbookEntity extends MobEntity {
|
||||||
if (player.isSneaking()) {
|
if (player.isSneaking()) {
|
||||||
setForcedState(TriState.of(!isOpen()));
|
setForcedState(TriState.of(!isOpen()));
|
||||||
keepAwake();
|
keepAwake();
|
||||||
player.playSound(SoundEvents.ITEM_BOOK_PAGE_TURN, 2, 1);
|
player.playSound(USounds.Vanilla.ITEM_BOOK_PAGE_TURN, 2, 1);
|
||||||
return ActionResult.SUCCESS;
|
return ActionResult.SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -226,7 +226,7 @@ public class SpellbookEntity extends MobEntity {
|
||||||
state.toPacket(buf);
|
state.toPacket(buf);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
player.playSound(SoundEvents.ITEM_BOOK_PAGE_TURN, 2, 1);
|
player.playSound(USounds.Vanilla.ITEM_BOOK_PAGE_TURN, 2, 1);
|
||||||
return ActionResult.SUCCESS;
|
return ActionResult.SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package com.minelittlepony.unicopia.entity.behaviour;
|
package com.minelittlepony.unicopia.entity.behaviour;
|
||||||
|
|
||||||
|
import com.minelittlepony.unicopia.USounds;
|
||||||
import com.minelittlepony.unicopia.entity.Living;
|
import com.minelittlepony.unicopia.entity.Living;
|
||||||
import com.minelittlepony.unicopia.entity.player.Pony;
|
import com.minelittlepony.unicopia.entity.player.Pony;
|
||||||
|
|
||||||
|
@ -9,7 +10,6 @@ import net.minecraft.entity.passive.ChickenEntity;
|
||||||
import net.minecraft.entity.player.PlayerEntity;
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.item.Items;
|
import net.minecraft.item.Items;
|
||||||
import net.minecraft.sound.SoundEvents;
|
|
||||||
import net.minecraft.util.math.Vec3d;
|
import net.minecraft.util.math.Vec3d;
|
||||||
|
|
||||||
public class ChickenBehaviour extends EntityBehaviour<ChickenEntity> {
|
public class ChickenBehaviour extends EntityBehaviour<ChickenEntity> {
|
||||||
|
@ -34,7 +34,7 @@ public class ChickenBehaviour extends EntityBehaviour<ChickenEntity> {
|
||||||
int slot = player.asEntity().getInventory().indexOf(egg);
|
int slot = player.asEntity().getInventory().indexOf(egg);
|
||||||
if (slot > -1) {
|
if (slot > -1) {
|
||||||
player.asEntity().getInventory().removeStack(slot, 1);
|
player.asEntity().getInventory().removeStack(slot, 1);
|
||||||
entity.playSound(SoundEvents.ENTITY_CHICKEN_EGG,
|
entity.playSound(USounds.Vanilla.ENTITY_CHICKEN_EGG,
|
||||||
1,
|
1,
|
||||||
(entity.getWorld().random.nextFloat() - entity.getWorld().random.nextFloat()) * 0.2F + 4
|
(entity.getWorld().random.nextFloat() - entity.getWorld().random.nextFloat()) * 0.2F + 4
|
||||||
);
|
);
|
||||||
|
|
|
@ -5,6 +5,7 @@ import java.util.function.Supplier;
|
||||||
|
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
|
import com.minelittlepony.unicopia.USounds;
|
||||||
import com.minelittlepony.unicopia.Unicopia;
|
import com.minelittlepony.unicopia.Unicopia;
|
||||||
import com.minelittlepony.unicopia.ability.magic.Caster;
|
import com.minelittlepony.unicopia.ability.magic.Caster;
|
||||||
import com.minelittlepony.unicopia.compat.pehkui.PehkUtil;
|
import com.minelittlepony.unicopia.compat.pehkui.PehkUtil;
|
||||||
|
@ -33,7 +34,6 @@ import net.minecraft.entity.player.PlayerEntity;
|
||||||
import net.minecraft.entity.projectile.LlamaSpitEntity;
|
import net.minecraft.entity.projectile.LlamaSpitEntity;
|
||||||
import net.minecraft.entity.projectile.thrown.SnowballEntity;
|
import net.minecraft.entity.projectile.thrown.SnowballEntity;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.sound.SoundEvents;
|
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.util.math.Vec3d;
|
import net.minecraft.util.math.Vec3d;
|
||||||
import net.minecraft.registry.Registry;
|
import net.minecraft.registry.Registry;
|
||||||
|
@ -281,8 +281,8 @@ public class EntityBehaviour<T extends Entity> {
|
||||||
register(GhastBehaviour::new, EntityType.GHAST);
|
register(GhastBehaviour::new, EntityType.GHAST);
|
||||||
register(AxolotlBehaviour::new, EntityType.AXOLOTL);
|
register(AxolotlBehaviour::new, EntityType.AXOLOTL);
|
||||||
register(EndermanBehaviour::new, EntityType.ENDERMAN);
|
register(EndermanBehaviour::new, EntityType.ENDERMAN);
|
||||||
EntityBehaviour.<LlamaEntity>register(() -> new RangedAttackBehaviour<>(SoundEvents.ENTITY_LLAMA_SPIT, LlamaSpitEntity::new), EntityType.LLAMA, EntityType.TRADER_LLAMA);
|
EntityBehaviour.<LlamaEntity>register(() -> new RangedAttackBehaviour<>(USounds.Vanilla.ENTITY_LLAMA_SPIT, LlamaSpitEntity::new), EntityType.LLAMA, EntityType.TRADER_LLAMA);
|
||||||
EntityBehaviour.<SnowGolemEntity>register(() -> new RangedAttackBehaviour<>(SoundEvents.ENTITY_SNOW_GOLEM_SHOOT, SnowballEntity::new), EntityType.SNOW_GOLEM);
|
EntityBehaviour.<SnowGolemEntity>register(() -> new RangedAttackBehaviour<>(USounds.Vanilla.ENTITY_SNOW_GOLEM_SHOOT, SnowballEntity::new), EntityType.SNOW_GOLEM);
|
||||||
register(SpellcastingIllagerBehaviour::new, EntityType.ILLUSIONER, EntityType.EVOKER);
|
register(SpellcastingIllagerBehaviour::new, EntityType.ILLUSIONER, EntityType.EVOKER);
|
||||||
register(ShulkerBehaviour::new, EntityType.SHULKER);
|
register(ShulkerBehaviour::new, EntityType.SHULKER);
|
||||||
register(CreeperBehaviour::new, EntityType.CREEPER);
|
register(CreeperBehaviour::new, EntityType.CREEPER);
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package com.minelittlepony.unicopia.entity.behaviour;
|
package com.minelittlepony.unicopia.entity.behaviour;
|
||||||
|
|
||||||
|
import com.minelittlepony.unicopia.USounds;
|
||||||
import com.minelittlepony.unicopia.entity.player.Pony;
|
import com.minelittlepony.unicopia.entity.player.Pony;
|
||||||
import com.minelittlepony.unicopia.mixin.MixinSheepEntity;
|
import com.minelittlepony.unicopia.mixin.MixinSheepEntity;
|
||||||
|
|
||||||
|
@ -10,7 +11,6 @@ import net.minecraft.entity.ItemEntity;
|
||||||
import net.minecraft.entity.passive.SheepEntity;
|
import net.minecraft.entity.passive.SheepEntity;
|
||||||
import net.minecraft.entity.player.PlayerInventory;
|
import net.minecraft.entity.player.PlayerInventory;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.sound.SoundEvents;
|
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.util.math.random.Random;
|
import net.minecraft.util.math.random.Random;
|
||||||
import net.minecraft.world.WorldEvents;
|
import net.minecraft.world.WorldEvents;
|
||||||
|
@ -38,7 +38,7 @@ public class SheepBehaviour extends EntityBehaviour<SheepEntity> {
|
||||||
} else if (!entity.isSheared()) {
|
} else if (!entity.isSheared()) {
|
||||||
ItemStack dropType = new ItemStack(MixinSheepEntity.getDrops().get(entity.getColor()).asItem());
|
ItemStack dropType = new ItemStack(MixinSheepEntity.getDrops().get(entity.getColor()).asItem());
|
||||||
|
|
||||||
player.asEntity().playSound(SoundEvents.ENTITY_SHEEP_SHEAR, 1, 1);
|
player.asEntity().playSound(USounds.Vanilla.ENTITY_SHEEP_SHEAR, 1, 1);
|
||||||
entity.setSheared(true);
|
entity.setSheared(true);
|
||||||
|
|
||||||
Random rng = entity.getWorld().random;
|
Random rng = entity.getWorld().random;
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
package com.minelittlepony.unicopia.entity.behaviour;
|
package com.minelittlepony.unicopia.entity.behaviour;
|
||||||
|
|
||||||
|
import com.minelittlepony.unicopia.USounds;
|
||||||
import com.minelittlepony.unicopia.entity.Living;
|
import com.minelittlepony.unicopia.entity.Living;
|
||||||
import com.minelittlepony.unicopia.entity.player.Pony;
|
import com.minelittlepony.unicopia.entity.player.Pony;
|
||||||
import com.minelittlepony.unicopia.mixin.MixinShulkerEntity;
|
import com.minelittlepony.unicopia.mixin.MixinShulkerEntity;
|
||||||
|
|
||||||
import net.minecraft.entity.mob.ShulkerEntity;
|
import net.minecraft.entity.mob.ShulkerEntity;
|
||||||
import net.minecraft.sound.SoundEvents;
|
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.util.math.Direction;
|
import net.minecraft.util.math.Direction;
|
||||||
import net.minecraft.util.math.Direction.Axis;
|
import net.minecraft.util.math.Direction.Axis;
|
||||||
|
@ -56,7 +56,7 @@ public class ShulkerBehaviour extends EntityBehaviour<ShulkerEntity> {
|
||||||
} else if (peekAmount > 0.2 && mx.callGetPeekAmount() == 0) {
|
} else if (peekAmount > 0.2 && mx.callGetPeekAmount() == 0) {
|
||||||
if (shulker.isAlive() && shulker.getWorld().random.nextInt(1000) < shulker.ambientSoundChance++) {
|
if (shulker.isAlive() && shulker.getWorld().random.nextInt(1000) < shulker.ambientSoundChance++) {
|
||||||
shulker.ambientSoundChance = -shulker.getMinAmbientSoundDelay();
|
shulker.ambientSoundChance = -shulker.getMinAmbientSoundDelay();
|
||||||
shulker.playSound(SoundEvents.ENTITY_SHULKER_AMBIENT, 1, 1);
|
shulker.playSound(USounds.Vanilla.ENTITY_SHULKER_AMBIENT, 1, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
package com.minelittlepony.unicopia.entity.behaviour;
|
package com.minelittlepony.unicopia.entity.behaviour;
|
||||||
|
|
||||||
|
import com.minelittlepony.unicopia.USounds;
|
||||||
import com.minelittlepony.unicopia.entity.player.Pony;
|
import com.minelittlepony.unicopia.entity.player.Pony;
|
||||||
|
|
||||||
import net.minecraft.entity.passive.MerchantEntity;
|
import net.minecraft.entity.passive.MerchantEntity;
|
||||||
import net.minecraft.sound.SoundEvents;
|
|
||||||
|
|
||||||
public class TraderBehaviour extends EntityBehaviour<MerchantEntity> {
|
public class TraderBehaviour extends EntityBehaviour<MerchantEntity> {
|
||||||
@Override
|
@Override
|
||||||
|
@ -12,7 +12,7 @@ public class TraderBehaviour extends EntityBehaviour<MerchantEntity> {
|
||||||
entity.setHeadRollingTimeLeft(40);
|
entity.setHeadRollingTimeLeft(40);
|
||||||
|
|
||||||
if (!entity.getWorld().isClient()) {
|
if (!entity.getWorld().isClient()) {
|
||||||
entity.playSound(SoundEvents.ENTITY_VILLAGER_NO, 1, 1);
|
entity.playSound(USounds.Vanilla.ENTITY_VILLAGER_NO, 1, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,8 @@ package com.minelittlepony.unicopia.entity.effect;
|
||||||
|
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
|
import com.minelittlepony.unicopia.USounds;
|
||||||
|
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.entity.LivingEntity;
|
import net.minecraft.entity.LivingEntity;
|
||||||
import net.minecraft.entity.effect.StatusEffect;
|
import net.minecraft.entity.effect.StatusEffect;
|
||||||
|
@ -10,7 +12,6 @@ import net.minecraft.entity.player.PlayerInventory;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.network.packet.s2c.play.ScreenHandlerSlotUpdateS2CPacket;
|
import net.minecraft.network.packet.s2c.play.ScreenHandlerSlotUpdateS2CPacket;
|
||||||
import net.minecraft.server.network.ServerPlayerEntity;
|
import net.minecraft.server.network.ServerPlayerEntity;
|
||||||
import net.minecraft.sound.SoundEvents;
|
|
||||||
import net.minecraft.util.Hand;
|
import net.minecraft.util.Hand;
|
||||||
import net.minecraft.util.math.MathHelper;
|
import net.minecraft.util.math.MathHelper;
|
||||||
|
|
||||||
|
@ -39,7 +40,7 @@ public class ButterfingersStatusEffect extends StatusEffect {
|
||||||
|
|
||||||
if (target instanceof ServerPlayerEntity player) {
|
if (target instanceof ServerPlayerEntity player) {
|
||||||
if (player.dropSelectedItem(proximity < 1)) {
|
if (player.dropSelectedItem(proximity < 1)) {
|
||||||
player.getWorld().playSound(null, player.getBlockPos(), SoundEvents.BLOCK_HONEY_BLOCK_SLIDE, player.getSoundCategory());
|
player.getWorld().playSound(null, player.getBlockPos(), USounds.ENTITY_GENERIC_BUTTER_FINGERS, player.getSoundCategory());
|
||||||
PlayerInventory inventory = player.getInventory();
|
PlayerInventory inventory = player.getInventory();
|
||||||
player.networkHandler.sendPacket(new ScreenHandlerSlotUpdateS2CPacket(-2, 0, inventory.selectedSlot, inventory.getStack(inventory.selectedSlot)));
|
player.networkHandler.sendPacket(new ScreenHandlerSlotUpdateS2CPacket(-2, 0, inventory.selectedSlot, inventory.getStack(inventory.selectedSlot)));
|
||||||
}
|
}
|
||||||
|
@ -48,7 +49,7 @@ public class ButterfingersStatusEffect extends StatusEffect {
|
||||||
if (!stack.isEmpty()) {
|
if (!stack.isEmpty()) {
|
||||||
target.setStackInHand(Hand.MAIN_HAND, ItemStack.EMPTY);
|
target.setStackInHand(Hand.MAIN_HAND, ItemStack.EMPTY);
|
||||||
target.dropStack(stack);
|
target.dropStack(stack);
|
||||||
target.getWorld().playSound(null, target.getBlockPos(), SoundEvents.BLOCK_HONEY_BLOCK_SLIDE, target.getSoundCategory());
|
target.getWorld().playSound(null, target.getBlockPos(), USounds.ENTITY_GENERIC_BUTTER_FINGERS, target.getSoundCategory());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package com.minelittlepony.unicopia.entity.player;
|
package com.minelittlepony.unicopia.entity.player;
|
||||||
|
|
||||||
import com.google.common.collect.Streams;
|
import com.google.common.collect.Streams;
|
||||||
|
import com.minelittlepony.unicopia.USounds;
|
||||||
import com.minelittlepony.unicopia.ability.magic.spell.effect.CustomisedSpellType;
|
import com.minelittlepony.unicopia.ability.magic.spell.effect.CustomisedSpellType;
|
||||||
import com.minelittlepony.unicopia.ability.magic.spell.effect.SpellType;
|
import com.minelittlepony.unicopia.ability.magic.spell.effect.SpellType;
|
||||||
import com.minelittlepony.unicopia.item.EnchantableItem;
|
import com.minelittlepony.unicopia.item.EnchantableItem;
|
||||||
|
@ -9,7 +10,6 @@ import com.minelittlepony.unicopia.util.NbtSerialisable;
|
||||||
import net.minecraft.nbt.NbtCompound;
|
import net.minecraft.nbt.NbtCompound;
|
||||||
import net.minecraft.nbt.NbtElement;
|
import net.minecraft.nbt.NbtElement;
|
||||||
import net.minecraft.nbt.NbtList;
|
import net.minecraft.nbt.NbtList;
|
||||||
import net.minecraft.sound.SoundEvents;
|
|
||||||
import net.minecraft.util.Hand;
|
import net.minecraft.util.Hand;
|
||||||
import net.minecraft.util.TypedActionResult;
|
import net.minecraft.util.TypedActionResult;
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@ public class PlayerCharmTracker implements NbtSerialisable {
|
||||||
|
|
||||||
public void equipSpell(Hand hand, CustomisedSpellType<?> spell) {
|
public void equipSpell(Hand hand, CustomisedSpellType<?> spell) {
|
||||||
handSpells[hand.ordinal()] = spell;
|
handSpells[hand.ordinal()] = spell;
|
||||||
pony.asEntity().playSound(SoundEvents.UI_BUTTON_CLICK.value(), 0.25F, 1.75F);
|
pony.asEntity().playSound(USounds.GUI_SPELL_EQUIP.value(), 0.25F, 1.75F);
|
||||||
pony.setDirty();
|
pony.setDirty();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -32,6 +32,7 @@ import net.minecraft.entity.EntityPose;
|
||||||
import net.minecraft.entity.EntityType;
|
import net.minecraft.entity.EntityType;
|
||||||
import net.minecraft.entity.EquipmentSlot;
|
import net.minecraft.entity.EquipmentSlot;
|
||||||
import net.minecraft.entity.LightningEntity;
|
import net.minecraft.entity.LightningEntity;
|
||||||
|
import net.minecraft.entity.LivingEntity;
|
||||||
import net.minecraft.entity.player.PlayerEntity;
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
import net.minecraft.entity.damage.DamageSource;
|
import net.minecraft.entity.damage.DamageSource;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
@ -40,7 +41,6 @@ import net.minecraft.particle.ParticleTypes;
|
||||||
import net.minecraft.predicate.entity.EntityPredicates;
|
import net.minecraft.predicate.entity.EntityPredicates;
|
||||||
import net.minecraft.registry.RegistryKeys;
|
import net.minecraft.registry.RegistryKeys;
|
||||||
import net.minecraft.sound.SoundCategory;
|
import net.minecraft.sound.SoundCategory;
|
||||||
import net.minecraft.sound.SoundEvents;
|
|
||||||
import net.minecraft.util.math.*;
|
import net.minecraft.util.math.*;
|
||||||
import net.minecraft.world.dimension.DimensionType;
|
import net.minecraft.world.dimension.DimensionType;
|
||||||
import net.minecraft.world.event.GameEvent;
|
import net.minecraft.world.event.GameEvent;
|
||||||
|
@ -584,7 +584,8 @@ public class PlayerPhysics extends EntityPhysics<PlayerEntity> implements Tickab
|
||||||
velocity.fromImmutable(entity.getVelocity());
|
velocity.fromImmutable(entity.getVelocity());
|
||||||
distance /= bouncyness;
|
distance /= bouncyness;
|
||||||
} else {
|
} else {
|
||||||
entity.playSound(distance > 4 ? SoundEvents.ENTITY_PLAYER_BIG_FALL : SoundEvents.ENTITY_PLAYER_SMALL_FALL, 1, entity.getSoundPitch());
|
LivingEntity.FallSounds fallSounds = entity.getFallSounds();
|
||||||
|
entity.playSound(distance > 4 ? fallSounds.big() : fallSounds.small(), 1, entity.getSoundPitch());
|
||||||
}
|
}
|
||||||
entity.damage(entity.getDamageSources().flyIntoWall(), distance);
|
entity.damage(entity.getDamageSources().flyIntoWall(), distance);
|
||||||
}
|
}
|
||||||
|
@ -756,7 +757,7 @@ public class PlayerPhysics extends EntityPhysics<PlayerEntity> implements Tickab
|
||||||
if (isFlying()) {
|
if (isFlying()) {
|
||||||
pony.playSound(USounds.ENTITY_PLAYER_PEGASUS_DASH, 1);
|
pony.playSound(USounds.ENTITY_PLAYER_PEGASUS_DASH, 1);
|
||||||
} else {
|
} else {
|
||||||
pony.playSound(SoundEvents.ENTITY_RAVAGER_STEP, 2, 0.3F);
|
pony.playSound(USounds.ENTITY_PLAYER_EARTHPONY_DASH, 2, 0.3F);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -54,7 +54,6 @@ import net.minecraft.nbt.NbtCompound;
|
||||||
import net.minecraft.registry.tag.DamageTypeTags;
|
import net.minecraft.registry.tag.DamageTypeTags;
|
||||||
import net.minecraft.server.network.ServerPlayerEntity;
|
import net.minecraft.server.network.ServerPlayerEntity;
|
||||||
import net.minecraft.server.world.ServerWorld;
|
import net.minecraft.server.world.ServerWorld;
|
||||||
import net.minecraft.sound.SoundEvents;
|
|
||||||
import net.minecraft.text.Text;
|
import net.minecraft.text.Text;
|
||||||
import net.minecraft.util.ActionResult;
|
import net.minecraft.util.ActionResult;
|
||||||
import net.minecraft.util.Hand;
|
import net.minecraft.util.Hand;
|
||||||
|
@ -115,8 +114,8 @@ public class Pony extends Living<PlayerEntity> implements Copyable<Pony>, Update
|
||||||
|
|
||||||
public Pony(PlayerEntity player) {
|
public Pony(PlayerEntity player) {
|
||||||
super(player, EFFECT);
|
super(player, EFFECT);
|
||||||
this.levels = new PlayerLevelStore(this, LEVEL, true, SoundEvents.ENTITY_PLAYER_LEVELUP);
|
this.levels = new PlayerLevelStore(this, LEVEL, true, USounds.Vanilla.ENTITY_PLAYER_LEVELUP);
|
||||||
this.corruption = new PlayerLevelStore(this, CORRUPTION, false, SoundEvents.PARTICLE_SOUL_ESCAPE);
|
this.corruption = new PlayerLevelStore(this, CORRUPTION, false, USounds.ENTITY_PLAYER_CORRUPTION);
|
||||||
this.mana = addTicker(new ManaContainer(this));
|
this.mana = addTicker(new ManaContainer(this));
|
||||||
|
|
||||||
player.getDataTracker().startTracking(RACE, Race.DEFAULT_ID);
|
player.getDataTracker().startTracking(RACE, Race.DEFAULT_ID);
|
||||||
|
@ -394,7 +393,7 @@ public class Pony extends Living<PlayerEntity> implements Copyable<Pony>, Update
|
||||||
|
|
||||||
if (distanceClimbed > 1.5) {
|
if (distanceClimbed > 1.5) {
|
||||||
if (vel.length() > 0.08F && entity.age % (3 + entity.getRandom().nextInt(5)) == 0) {
|
if (vel.length() > 0.08F && entity.age % (3 + entity.getRandom().nextInt(5)) == 0) {
|
||||||
entity.playSound(SoundEvents.ENTITY_CHICKEN_STEP,
|
entity.playSound(USounds.ENTITY_PLAYER_CHANGELING_CLIMB,
|
||||||
(float)entity.getRandom().nextTriangular(0.5, 0.3),
|
(float)entity.getRandom().nextTriangular(0.5, 0.3),
|
||||||
entity.getSoundPitch()
|
entity.getSoundPitch()
|
||||||
);
|
);
|
||||||
|
|
|
@ -4,6 +4,7 @@ import java.util.List;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
import com.minelittlepony.unicopia.Race;
|
import com.minelittlepony.unicopia.Race;
|
||||||
|
import com.minelittlepony.unicopia.USounds;
|
||||||
import com.minelittlepony.unicopia.entity.Creature;
|
import com.minelittlepony.unicopia.entity.Creature;
|
||||||
import com.minelittlepony.unicopia.entity.Living;
|
import com.minelittlepony.unicopia.entity.Living;
|
||||||
import com.minelittlepony.unicopia.entity.damage.UDamageTypes;
|
import com.minelittlepony.unicopia.entity.damage.UDamageTypes;
|
||||||
|
@ -24,7 +25,6 @@ import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.particle.ParticleEffect;
|
import net.minecraft.particle.ParticleEffect;
|
||||||
import net.minecraft.particle.ParticleTypes;
|
import net.minecraft.particle.ParticleTypes;
|
||||||
import net.minecraft.sound.SoundEvents;
|
|
||||||
import net.minecraft.text.Text;
|
import net.minecraft.text.Text;
|
||||||
import net.minecraft.util.ActionResult;
|
import net.minecraft.util.ActionResult;
|
||||||
import net.minecraft.util.Hand;
|
import net.minecraft.util.Hand;
|
||||||
|
@ -58,7 +58,7 @@ public class BellItem extends Item implements ChargeableItem {
|
||||||
player.setCurrentHand(hand);
|
player.setCurrentHand(hand);
|
||||||
Pony pony = Pony.of(player);
|
Pony pony = Pony.of(player);
|
||||||
pony.getCorruption().add(1);
|
pony.getCorruption().add(1);
|
||||||
pony.playSound(SoundEvents.BLOCK_BELL_USE, 0.4F, 0.2F);
|
pony.playSound(USounds.ITEM_GROGAR_BELL_USE, 0.4F, 0.2F);
|
||||||
Living<?> targetLiving = target instanceof MobEntity || target instanceof PlayerEntity ? Living.getOrEmpty(target)
|
Living<?> targetLiving = target instanceof MobEntity || target instanceof PlayerEntity ? Living.getOrEmpty(target)
|
||||||
.filter(living -> !(living instanceof Creature c && c.isDiscorded()))
|
.filter(living -> !(living instanceof Creature c && c.isDiscorded()))
|
||||||
.orElse(null) : null;
|
.orElse(null) : null;
|
||||||
|
@ -78,7 +78,7 @@ public class BellItem extends Item implements ChargeableItem {
|
||||||
Pony pony = Pony.of(player);
|
Pony pony = Pony.of(player);
|
||||||
|
|
||||||
if (hasCharge(stack)) {
|
if (hasCharge(stack)) {
|
||||||
pony.playSound(SoundEvents.BLOCK_BELL_RESONATE, 0.6F, 1);
|
pony.playSound(USounds.ITEM_GROGAR_BELL_CHARGE, 0.6F, 1);
|
||||||
pony.getCorruption().add(1);
|
pony.getCorruption().add(1);
|
||||||
if (offhandStack.getItem() instanceof ChargeableItem chargeable) {
|
if (offhandStack.getItem() instanceof ChargeableItem chargeable) {
|
||||||
float maxChargeBy = chargeable.getMaxCharge() - ChargeableItem.getEnergy(offhandStack);
|
float maxChargeBy = chargeable.getMaxCharge() - ChargeableItem.getEnergy(offhandStack);
|
||||||
|
@ -97,7 +97,7 @@ public class BellItem extends Item implements ChargeableItem {
|
||||||
return TypedActionResult.consume(stack);
|
return TypedActionResult.consume(stack);
|
||||||
}
|
}
|
||||||
|
|
||||||
pony.playSound(SoundEvents.BLOCK_BELL_USE, 0.01F, 0.9F);
|
pony.playSound(USounds.ITEM_GROGAR_BELL_USE, 0.01F, 0.9F);
|
||||||
return TypedActionResult.consume(stack);
|
return TypedActionResult.consume(stack);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -121,7 +121,7 @@ public class BellItem extends Item implements ChargeableItem {
|
||||||
|
|
||||||
private void onStoppedDraining(Living<?> user, Living<?> target, boolean completed) {
|
private void onStoppedDraining(Living<?> user, Living<?> target, boolean completed) {
|
||||||
user.setTarget(null);
|
user.setTarget(null);
|
||||||
user.playSound(SoundEvents.BLOCK_BELL_USE, 0.2F, 0.3F);
|
user.playSound(USounds.ITEM_GROGAR_BELL_STOP_USING, 0.2F, 0.3F);
|
||||||
if (target instanceof Creature creature && (completed || target.asEntity().getHealth() < (target.asEntity().getMaxHealth() * 0.5F) + 1)) {
|
if (target instanceof Creature creature && (completed || target.asEntity().getHealth() < (target.asEntity().getMaxHealth() * 0.5F) + 1)) {
|
||||||
creature.setDiscorded(true);
|
creature.setDiscorded(true);
|
||||||
}
|
}
|
||||||
|
@ -170,7 +170,7 @@ public class BellItem extends Item implements ChargeableItem {
|
||||||
}
|
}
|
||||||
ChargeableItem.consumeEnergy(stack, -amountDrawn);
|
ChargeableItem.consumeEnergy(stack, -amountDrawn);
|
||||||
|
|
||||||
user.playSound(SoundEvents.ENTITY_GUARDIAN_ATTACK, 0.2F, progress);
|
user.playSound(USounds.ITEM_GROGAR_BELL_DRAIN, 0.2F, progress);
|
||||||
|
|
||||||
for (int i = 0; i < 4; i++) {
|
for (int i = 0; i < 4; i++) {
|
||||||
living.addParticle(
|
living.addParticle(
|
||||||
|
|
|
@ -7,6 +7,7 @@ import java.util.stream.Stream;
|
||||||
|
|
||||||
import javax.annotation.Nullable;
|
import javax.annotation.Nullable;
|
||||||
|
|
||||||
|
import com.minelittlepony.unicopia.USounds;
|
||||||
import com.minelittlepony.unicopia.ability.magic.Caster;
|
import com.minelittlepony.unicopia.ability.magic.Caster;
|
||||||
import com.minelittlepony.unicopia.ability.magic.SpellPredicate;
|
import com.minelittlepony.unicopia.ability.magic.SpellPredicate;
|
||||||
import com.minelittlepony.unicopia.ability.magic.spell.CastingMethod;
|
import com.minelittlepony.unicopia.ability.magic.spell.CastingMethod;
|
||||||
|
@ -27,7 +28,6 @@ import net.minecraft.entity.player.PlayerEntity;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.particle.ParticleTypes;
|
import net.minecraft.particle.ParticleTypes;
|
||||||
import net.minecraft.sound.SoundCategory;
|
import net.minecraft.sound.SoundCategory;
|
||||||
import net.minecraft.sound.SoundEvents;
|
|
||||||
import net.minecraft.text.Text;
|
import net.minecraft.text.Text;
|
||||||
import net.minecraft.util.ActionResult;
|
import net.minecraft.util.ActionResult;
|
||||||
import net.minecraft.util.Hand;
|
import net.minecraft.util.Hand;
|
||||||
|
@ -177,7 +177,7 @@ public class EnchantedStaffItem extends StaffItem implements EnchantableItem, Ch
|
||||||
(world.random.nextGaussian() - 0.5) / 10,
|
(world.random.nextGaussian() - 0.5) / 10,
|
||||||
(world.random.nextGaussian() - 0.5) / 10
|
(world.random.nextGaussian() - 0.5) / 10
|
||||||
);
|
);
|
||||||
world.playSound(null, entity.getBlockPos(), SoundEvents.ENTITY_GUARDIAN_ATTACK, SoundCategory.PLAYERS, 1, i / 20);
|
world.playSound(null, entity.getBlockPos(), USounds.ITEM_MAGIC_STAFF_CHARGE, SoundCategory.PLAYERS, 1, i / 20);
|
||||||
|
|
||||||
if (i > 200) {
|
if (i > 200) {
|
||||||
living.clearActiveItem();
|
living.clearActiveItem();
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package com.minelittlepony.unicopia.item;
|
package com.minelittlepony.unicopia.item;
|
||||||
|
|
||||||
import com.minelittlepony.unicopia.AwaitTickQueue;
|
import com.minelittlepony.unicopia.AwaitTickQueue;
|
||||||
|
import com.minelittlepony.unicopia.USounds;
|
||||||
import com.minelittlepony.unicopia.UTags;
|
import com.minelittlepony.unicopia.UTags;
|
||||||
import com.minelittlepony.unicopia.util.RegistryUtils;
|
import com.minelittlepony.unicopia.util.RegistryUtils;
|
||||||
|
|
||||||
|
@ -9,7 +10,6 @@ import net.minecraft.entity.effect.StatusEffectInstance;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.sound.SoundCategory;
|
import net.minecraft.sound.SoundCategory;
|
||||||
import net.minecraft.sound.SoundEvents;
|
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
public class PineappleItem extends Item {
|
public class PineappleItem extends Item {
|
||||||
|
@ -24,7 +24,7 @@ public class PineappleItem extends Item {
|
||||||
if (!world.isClient) {
|
if (!world.isClient) {
|
||||||
stack.damage(1, user, u -> {
|
stack.damage(1, user, u -> {
|
||||||
AwaitTickQueue.scheduleTask(u.getWorld(), w -> {
|
AwaitTickQueue.scheduleTask(u.getWorld(), w -> {
|
||||||
w.playSoundFromEntity(null, u, SoundEvents.ENTITY_PLAYER_BURP, SoundCategory.PLAYERS, 1, 0.7F);
|
w.playSoundFromEntity(null, u, USounds.Vanilla.ENTITY_PLAYER_BURP, SoundCategory.PLAYERS, 1, 0.7F);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,7 @@ import java.util.UUID;
|
||||||
|
|
||||||
import com.google.common.collect.HashMultimap;
|
import com.google.common.collect.HashMultimap;
|
||||||
import com.google.common.collect.Multimap;
|
import com.google.common.collect.Multimap;
|
||||||
|
import com.minelittlepony.unicopia.USounds;
|
||||||
import com.minelittlepony.unicopia.entity.UEntityAttributes;
|
import com.minelittlepony.unicopia.entity.UEntityAttributes;
|
||||||
|
|
||||||
import net.minecraft.block.Blocks;
|
import net.minecraft.block.Blocks;
|
||||||
|
@ -22,7 +23,6 @@ import net.minecraft.item.SwordItem;
|
||||||
import net.minecraft.item.ToolMaterials;
|
import net.minecraft.item.ToolMaterials;
|
||||||
import net.minecraft.particle.BlockStateParticleEffect;
|
import net.minecraft.particle.BlockStateParticleEffect;
|
||||||
import net.minecraft.particle.ParticleTypes;
|
import net.minecraft.particle.ParticleTypes;
|
||||||
import net.minecraft.sound.SoundEvents;
|
|
||||||
import net.minecraft.text.Text;
|
import net.minecraft.text.Text;
|
||||||
import net.minecraft.util.ActionResult;
|
import net.minecraft.util.ActionResult;
|
||||||
import net.minecraft.util.Formatting;
|
import net.minecraft.util.Formatting;
|
||||||
|
@ -70,7 +70,7 @@ public class StaffItem extends SwordItem {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected boolean castContainedEffect(ItemStack stack, LivingEntity target, LivingEntity attacker) {
|
protected boolean castContainedEffect(ItemStack stack, LivingEntity target, LivingEntity attacker) {
|
||||||
target.getEntityWorld().playSound(null, target.getBlockPos(), SoundEvents.ENTITY_PLAYER_ATTACK_CRIT, attacker.getSoundCategory(), 1, 1);
|
target.getEntityWorld().playSound(null, target.getBlockPos(), USounds.ITEM_STAFF_STRIKE, attacker.getSoundCategory(), 1, 1);
|
||||||
|
|
||||||
target.takeKnockback(attacker.getVelocity().subtract(target.getVelocity()).horizontalLength(),
|
target.takeKnockback(attacker.getVelocity().subtract(target.getVelocity()).horizontalLength(),
|
||||||
MathHelper.sin(attacker.getYaw() * 0.017453292F),
|
MathHelper.sin(attacker.getYaw() * 0.017453292F),
|
||||||
|
|
|
@ -4,6 +4,7 @@ import java.util.function.DoubleSupplier;
|
||||||
|
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
|
import com.minelittlepony.unicopia.USounds;
|
||||||
import com.minelittlepony.unicopia.advancement.UCriteria;
|
import com.minelittlepony.unicopia.advancement.UCriteria;
|
||||||
import com.minelittlepony.unicopia.util.VecHelper;
|
import com.minelittlepony.unicopia.util.VecHelper;
|
||||||
|
|
||||||
|
@ -17,7 +18,6 @@ import net.minecraft.entity.LivingEntity;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.server.world.ServerWorld;
|
import net.minecraft.server.world.ServerWorld;
|
||||||
import net.minecraft.sound.SoundCategory;
|
import net.minecraft.sound.SoundCategory;
|
||||||
import net.minecraft.sound.SoundEvents;
|
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.util.math.Vec3d;
|
import net.minecraft.util.math.Vec3d;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
@ -43,7 +43,7 @@ public class ConsumptionEnchantment extends SimpleEnchantment {
|
||||||
DoubleSupplier vecComponentFactory = () -> world.random.nextTriangular(0, 0.3);
|
DoubleSupplier vecComponentFactory = () -> world.random.nextTriangular(0, 0.3);
|
||||||
|
|
||||||
Block.getDroppedStacks(state, world, pos, blockEntity, entity, tool).forEach(s -> {
|
Block.getDroppedStacks(state, world, pos, blockEntity, entity, tool).forEach(s -> {
|
||||||
world.playSound(null, pos, SoundEvents.ENTITY_PLAYER_BURP, SoundCategory.BLOCKS, 0.05F, (float)world.random.nextTriangular(0.6F, 0.2F));
|
world.playSound(null, pos, USounds.ENCHANTMENT_CONSUMPTION_CONSUME, SoundCategory.BLOCKS, 0.05F, (float)world.random.nextTriangular(0.6F, 0.2F));
|
||||||
ExperienceOrbEntity.spawn(world, Vec3d.ofCenter(pos).add(VecHelper.supply(vecComponentFactory)), s.getCount());
|
ExperienceOrbEntity.spawn(world, Vec3d.ofCenter(pos).add(VecHelper.supply(vecComponentFactory)), s.getCount());
|
||||||
UCriteria.USE_CONSUMPTION.trigger(entity);
|
UCriteria.USE_CONSUMPTION.trigger(entity);
|
||||||
});
|
});
|
||||||
|
|
|
@ -3,6 +3,7 @@ package com.minelittlepony.unicopia.server.world;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
import java.util.stream.StreamSupport;
|
import java.util.stream.StreamSupport;
|
||||||
|
|
||||||
|
import com.minelittlepony.unicopia.USounds;
|
||||||
import com.minelittlepony.unicopia.Unicopia;
|
import com.minelittlepony.unicopia.Unicopia;
|
||||||
import com.minelittlepony.unicopia.block.UBlocks;
|
import com.minelittlepony.unicopia.block.UBlocks;
|
||||||
import com.minelittlepony.unicopia.block.ZapAppleLeavesBlock;
|
import com.minelittlepony.unicopia.block.ZapAppleLeavesBlock;
|
||||||
|
@ -15,7 +16,6 @@ import net.minecraft.entity.EntityType;
|
||||||
import net.minecraft.entity.LightningEntity;
|
import net.minecraft.entity.LightningEntity;
|
||||||
import net.minecraft.nbt.*;
|
import net.minecraft.nbt.*;
|
||||||
import net.minecraft.sound.SoundCategory;
|
import net.minecraft.sound.SoundCategory;
|
||||||
import net.minecraft.sound.SoundEvents;
|
|
||||||
import net.minecraft.util.Identifier;
|
import net.minecraft.util.Identifier;
|
||||||
import net.minecraft.util.StringIdentifiable;
|
import net.minecraft.util.StringIdentifiable;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
@ -91,7 +91,7 @@ public class ZapAppleStageStore extends PersistentState implements Tickable {
|
||||||
playedMoonEffect = true;
|
playedMoonEffect = true;
|
||||||
markDirty();
|
markDirty();
|
||||||
|
|
||||||
world.playSound(null, pos.getX(), pos.getY(), pos.getZ(), SoundEvents.ENTITY_WOLF_HOWL, SoundCategory.BLOCKS, 1.5F, 0.3F, world.random.nextInt(1200));
|
world.playSound(null, pos.getX(), pos.getY(), pos.getZ(), USounds.Vanilla.ENTITY_WOLF_HOWL, SoundCategory.BLOCKS, 1.5F, 0.3F, world.random.nextInt(1200));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue