diff --git a/src/main/java/eu/ha3/presencefootsteps/sound/Isolator.java b/src/main/java/eu/ha3/presencefootsteps/sound/Isolator.java index 0c613e3b..c455e787 100644 --- a/src/main/java/eu/ha3/presencefootsteps/sound/Isolator.java +++ b/src/main/java/eu/ha3/presencefootsteps/sound/Isolator.java @@ -13,6 +13,7 @@ import eu.ha3.presencefootsteps.util.JsonObjectWriter; import eu.ha3.presencefootsteps.util.ResourceUtils; import eu.ha3.presencefootsteps.util.BlockReport.Reportable; +import eu.ha3.presencefootsteps.world.BiomeVarianceLookup; import eu.ha3.presencefootsteps.world.GolemLookup; import eu.ha3.presencefootsteps.world.HeuristicStateLookup; import eu.ha3.presencefootsteps.world.Index; @@ -34,10 +35,12 @@ public record Isolator ( HeuristicStateLookup heuristics, Lookup> golems, Lookup blocks, + Index biomes, Lookup primitives, AcousticLibrary acoustics ) implements Reportable { private static final Identifier BLOCK_MAP = PresenceFootsteps.id("config/blockmap.json"); + private static final Identifier BIOME_MAP = PresenceFootsteps.id("config/biomevariancemap.json"); private static final Identifier GOLEM_MAP = PresenceFootsteps.id("config/golemmap.json"); private static final Identifier LOCOMOTION_MAP = PresenceFootsteps.id("config/locomotionmap.json"); private static final Identifier PRIMITIVE_MAP = PresenceFootsteps.id("config/primitivemap.json"); @@ -50,6 +53,7 @@ public Isolator(SoundEngine engine) { new HeuristicStateLookup(), new GolemLookup(), new StateLookup(), + new BiomeVarianceLookup(), new PrimitiveLookup(), new AcousticsPlayer(new DelayedSoundPlayer(engine.soundPlayer)) ); @@ -57,7 +61,8 @@ public Isolator(SoundEngine engine) { public boolean load(ResourceManager manager) { boolean hasConfigurations = false; - hasConfigurations |= ResourceUtils.forEachReverse(BLOCK_MAP, manager, blocks()::load); + hasConfigurations |= ResourceUtils.forEach(BLOCK_MAP, manager, blocks()::load); + hasConfigurations |= ResourceUtils.forEach(BIOME_MAP, manager, biomes()::load); hasConfigurations |= ResourceUtils.forEach(GOLEM_MAP, manager, golems()::load); hasConfigurations |= ResourceUtils.forEach(PRIMITIVE_MAP, manager, primitives()::load); hasConfigurations |= ResourceUtils.forEach(LOCOMOTION_MAP, manager, locomotions()::load); diff --git a/src/main/java/eu/ha3/presencefootsteps/sound/generator/StepSoundGenerator.java b/src/main/java/eu/ha3/presencefootsteps/sound/generator/StepSoundGenerator.java index 89bf5f5b..84110a0f 100644 --- a/src/main/java/eu/ha3/presencefootsteps/sound/generator/StepSoundGenerator.java +++ b/src/main/java/eu/ha3/presencefootsteps/sound/generator/StepSoundGenerator.java @@ -6,6 +6,11 @@ * @author Hurry */ public interface StepSoundGenerator { + + float getLocalPitch(float tickDelta); + + float getLocalVolume(float tickDelta); + /** * Gets the motion tracker used to determine the direction and speed for an entity during simulation. */ diff --git a/src/main/java/eu/ha3/presencefootsteps/sound/generator/TerrestrialStepSoundGenerator.java b/src/main/java/eu/ha3/presencefootsteps/sound/generator/TerrestrialStepSoundGenerator.java index ae25a21e..d3742625 100644 --- a/src/main/java/eu/ha3/presencefootsteps/sound/generator/TerrestrialStepSoundGenerator.java +++ b/src/main/java/eu/ha3/presencefootsteps/sound/generator/TerrestrialStepSoundGenerator.java @@ -7,6 +7,7 @@ import net.minecraft.entity.LivingEntity; import net.minecraft.entity.passive.AbstractHorseEntity; import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.registry.RegistryKey; import net.minecraft.registry.tag.FluidTags; import net.minecraft.util.math.BlockPos; import org.jetbrains.annotations.Nullable; @@ -15,11 +16,13 @@ import eu.ha3.presencefootsteps.config.Variator; import eu.ha3.presencefootsteps.mixins.ILivingEntity; import eu.ha3.presencefootsteps.sound.State; +import eu.ha3.presencefootsteps.util.Lerp; import eu.ha3.presencefootsteps.util.PlayerUtil; import eu.ha3.presencefootsteps.sound.Options; import eu.ha3.presencefootsteps.sound.SoundEngine; import eu.ha3.presencefootsteps.world.Association; import eu.ha3.presencefootsteps.world.AssociationPool; +import eu.ha3.presencefootsteps.world.BiomeVarianceLookup; import eu.ha3.presencefootsteps.world.Solver; import eu.ha3.presencefootsteps.world.SoundsKey; import eu.ha3.presencefootsteps.world.Substrates; @@ -58,6 +61,9 @@ class TerrestrialStepSoundGenerator implements StepSoundGenerator { protected final MotionTracker motionTracker = new MotionTracker(this); protected final AssociationPool associations; + private final Lerp biomePitch = new Lerp(); + private final Lerp biomeVolume = new Lerp(); + public TerrestrialStepSoundGenerator(LivingEntity entity, SoundEngine engine, Modifier modifier) { this.entity = entity; this.engine = engine; @@ -65,6 +71,16 @@ public TerrestrialStepSoundGenerator(LivingEntity entity, SoundEngine engine, Mo this.associations = new AssociationPool(entity, engine); } + @Override + public float getLocalPitch(float tickDelta) { + return biomePitch.get(tickDelta); + } + + @Override + public float getLocalVolume(float tickDelta) { + return biomeVolume.get(tickDelta); + } + @Override public MotionTracker getMotionTracker() { return motionTracker; @@ -72,6 +88,13 @@ public MotionTracker getMotionTracker() { @Override public void generateFootsteps() { + BiomeVarianceLookup.BiomeVariance variance = entity.getWorld().getBiome(entity.getBlockPos()).getKey().map(RegistryKey::getValue).map(key -> { + return engine.getIsolator().biomes().lookup(key); + }).orElse(BiomeVarianceLookup.BiomeVariance.DEFAULT); + + biomePitch.update(variance.pitch(), 0.01F); + biomeVolume.update(variance.volume(), 0.01F); + motionTracker.simulateMotionData(entity); simulateFootsteps(); simulateAirborne(); diff --git a/src/main/java/eu/ha3/presencefootsteps/sound/player/ImmediateSoundPlayer.java b/src/main/java/eu/ha3/presencefootsteps/sound/player/ImmediateSoundPlayer.java index 7b9d735e..868a28d9 100644 --- a/src/main/java/eu/ha3/presencefootsteps/sound/player/ImmediateSoundPlayer.java +++ b/src/main/java/eu/ha3/presencefootsteps/sound/player/ImmediateSoundPlayer.java @@ -11,6 +11,8 @@ import eu.ha3.presencefootsteps.util.PlayerUtil; import eu.ha3.presencefootsteps.sound.Options; import eu.ha3.presencefootsteps.sound.SoundEngine; +import eu.ha3.presencefootsteps.sound.StepSoundSource; +import eu.ha3.presencefootsteps.sound.generator.StepSoundGenerator; /** * A Library that can also play sounds and default footsteps. @@ -41,6 +43,13 @@ public void playSound(LivingEntity location, String soundName, float volume, flo volume *= engine.getVolumeForSource(location); pitch /= ((PlayerUtil.getScale(location) - 1) * 0.6F) + 1; + StepSoundGenerator generator = ((StepSoundSource) location).getStepGenerator(engine).orElse(null); + if (generator != null) { + float tickDelta = mc.getRenderTickCounter().getTickDelta(false); + volume *= generator.getLocalVolume(tickDelta); + pitch *= generator.getLocalPitch(tickDelta); + } + PositionedSoundInstance sound = new UncappedSoundInstance(soundName, volume, pitch, location); if (distance > 100) { diff --git a/src/main/java/eu/ha3/presencefootsteps/util/Lerp.java b/src/main/java/eu/ha3/presencefootsteps/util/Lerp.java new file mode 100644 index 00000000..f077671a --- /dev/null +++ b/src/main/java/eu/ha3/presencefootsteps/util/Lerp.java @@ -0,0 +1,22 @@ +package eu.ha3.presencefootsteps.util; + +import net.minecraft.util.math.MathHelper; + +public class Lerp { + public float previous; + public float current; + + public void update(float newTarget, float rate) { + previous = current; + if (current < newTarget) { + current = Math.min(current + rate, newTarget); + } + if (current > newTarget) { + current = Math.max(current - rate, newTarget); + } + } + + public float get(float tickDelta) { + return MathHelper.lerp(tickDelta, previous, current); + } +} diff --git a/src/main/java/eu/ha3/presencefootsteps/world/AbstractSubstrateLookup.java b/src/main/java/eu/ha3/presencefootsteps/world/AbstractSubstrateLookup.java index 03a2ab21..7e619ba2 100644 --- a/src/main/java/eu/ha3/presencefootsteps/world/AbstractSubstrateLookup.java +++ b/src/main/java/eu/ha3/presencefootsteps/world/AbstractSubstrateLookup.java @@ -5,6 +5,8 @@ import org.jetbrains.annotations.Nullable; +import com.google.gson.JsonElement; + import it.unimi.dsi.fastutil.objects.Object2ObjectLinkedOpenHashMap; import net.minecraft.util.Identifier; @@ -46,14 +48,14 @@ public Set getSubstrates() { } @Override - public void add(String key, String value) { + public void add(String key, JsonElement value) { final String[] split = key.trim().split("@"); final String primitive = split[0]; final String substrate = split.length > 1 ? split[1] : Substrates.DEFAULT; substrates .computeIfAbsent(substrate, s -> new Object2ObjectLinkedOpenHashMap<>()) - .put(Identifier.of(primitive), SoundsKey.of(value)); + .put(Identifier.of(primitive), SoundsKey.of(value.getAsString())); } @Override diff --git a/src/main/java/eu/ha3/presencefootsteps/world/Association.java b/src/main/java/eu/ha3/presencefootsteps/world/Association.java index 62147aa4..9055500d 100644 --- a/src/main/java/eu/ha3/presencefootsteps/world/Association.java +++ b/src/main/java/eu/ha3/presencefootsteps/world/Association.java @@ -13,18 +13,19 @@ public record Association ( BlockState state, BlockPos pos, @Nullable LivingEntity source, + boolean forcePlay, SoundsKey dry, SoundsKey wet, SoundsKey foliage ) { - public static final Association NOT_EMITTER = new Association(Blocks.AIR.getDefaultState(), BlockPos.ORIGIN, null, SoundsKey.NON_EMITTER, SoundsKey.NON_EMITTER, SoundsKey.NON_EMITTER); + public static final Association NOT_EMITTER = new Association(Blocks.AIR.getDefaultState(), BlockPos.ORIGIN, null, false, SoundsKey.NON_EMITTER, SoundsKey.NON_EMITTER, SoundsKey.NON_EMITTER); - public static Association of(BlockState state, BlockPos pos, LivingEntity source, SoundsKey dry, SoundsKey wet, SoundsKey foliage) { + public static Association of(BlockState state, BlockPos pos, LivingEntity source, boolean forcePlay, SoundsKey dry, SoundsKey wet, SoundsKey foliage) { if (dry.isSilent() && wet.isSilent() && foliage.isSilent()) { return NOT_EMITTER; } - return new Association(state, pos.toImmutable(), source, dry, wet, foliage); + return new Association(state, pos.toImmutable(), source, forcePlay, dry, wet, foliage); } public boolean isResult() { @@ -32,7 +33,7 @@ public boolean isResult() { } public boolean isSilent() { - return this == NOT_EMITTER || state.isAir(); + return this == NOT_EMITTER || (state.isAir() && !forcePlay); } public boolean dataEquals(Association other) { diff --git a/src/main/java/eu/ha3/presencefootsteps/world/AssociationPool.java b/src/main/java/eu/ha3/presencefootsteps/world/AssociationPool.java index a123621f..612fea85 100644 --- a/src/main/java/eu/ha3/presencefootsteps/world/AssociationPool.java +++ b/src/main/java/eu/ha3/presencefootsteps/world/AssociationPool.java @@ -69,6 +69,7 @@ public SoundsKey get(BlockPos pos, BlockState state, String substrate) { return !e.isCollidable() || e.getBoundingBox().maxY < entity.getY() + 0.2F; })) { if ((association = engine.getIsolator().golems().getAssociation(golem.getType(), substrate)).isEmitter()) { + wasGolem = true; return association; } } diff --git a/src/main/java/eu/ha3/presencefootsteps/world/BiomeVarianceLookup.java b/src/main/java/eu/ha3/presencefootsteps/world/BiomeVarianceLookup.java new file mode 100644 index 00000000..069340ae --- /dev/null +++ b/src/main/java/eu/ha3/presencefootsteps/world/BiomeVarianceLookup.java @@ -0,0 +1,48 @@ +package eu.ha3.presencefootsteps.world; + +import java.io.IOException; +import java.util.HashMap; +import java.util.Map; + +import com.google.gson.JsonElement; +import com.mojang.datafixers.util.Pair; +import com.mojang.serialization.Codec; +import com.mojang.serialization.JsonOps; +import com.mojang.serialization.codecs.RecordCodecBuilder; + +import eu.ha3.presencefootsteps.util.JsonObjectWriter; +import net.minecraft.sound.BlockSoundGroup; +import net.minecraft.util.Identifier; + +public class BiomeVarianceLookup implements Index { + private final Map entries = new HashMap<>(); + + @Override + public BiomeVariance lookup(Identifier key) { + return entries.getOrDefault(key, BiomeVariance.DEFAULT); + } + + @Override + public boolean contains(Identifier key) { + return entries.containsKey(key); + } + + @Override + public void add(String key, JsonElement value) { + BiomeVariance.CODEC.decode(JsonOps.INSTANCE, value).result().map(Pair::getFirst).ifPresent(i -> { + entries.put(Identifier.of(key), i); + }); + } + + @Override + public void writeToReport(boolean full, JsonObjectWriter writer, Map groups) throws IOException { + } + + public record BiomeVariance(float volume, float pitch) { + public static final BiomeVariance DEFAULT = new BiomeVariance(1, 1); + static final Codec CODEC = RecordCodecBuilder.create(i -> i.group( + Codec.FLOAT.fieldOf("volume").forGetter(BiomeVariance::volume), + Codec.FLOAT.fieldOf("pitch").forGetter(BiomeVariance::pitch) + ).apply(i, BiomeVariance::new)); + } +} diff --git a/src/main/java/eu/ha3/presencefootsteps/world/Loadable.java b/src/main/java/eu/ha3/presencefootsteps/world/Loadable.java index 0d6b6449..c30f5c65 100644 --- a/src/main/java/eu/ha3/presencefootsteps/world/Loadable.java +++ b/src/main/java/eu/ha3/presencefootsteps/world/Loadable.java @@ -3,6 +3,7 @@ import java.io.Reader; import com.google.gson.Gson; +import com.google.gson.JsonElement; import com.google.gson.JsonObject; public interface Loadable { @@ -11,7 +12,7 @@ public interface Loadable { /** * Register a blockmap entry. */ - void add(String key, String value); + void add(String key, JsonElement json); /** * Loads new entries from the given config reader. @@ -21,7 +22,7 @@ default void load(Reader reader) { JsonObject json = GSON.fromJson(reader, JsonObject.class); json.entrySet().forEach(entry -> { - add(entry.getKey(), entry.getValue().getAsString()); + add(entry.getKey(), entry.getValue()); }); } } diff --git a/src/main/java/eu/ha3/presencefootsteps/world/LocomotionLookup.java b/src/main/java/eu/ha3/presencefootsteps/world/LocomotionLookup.java index 945d4bf5..0300b3b0 100644 --- a/src/main/java/eu/ha3/presencefootsteps/world/LocomotionLookup.java +++ b/src/main/java/eu/ha3/presencefootsteps/world/LocomotionLookup.java @@ -18,6 +18,8 @@ import java.io.IOException; import java.util.Map; +import com.google.gson.JsonElement; + public class LocomotionLookup implements Index { private final Map values = new Object2ObjectLinkedOpenHashMap<>(); @@ -36,14 +38,14 @@ public Locomotion lookup(Entity key) { } @Override - public void add(String key, String value) { + public void add(String key, JsonElement value) { Identifier id = Identifier.of(key); if (!Registries.ENTITY_TYPE.containsId(id)) { PresenceFootsteps.logger.warn("Locomotion registered for unknown entity type " + id); } - values.put(id, Locomotion.byName(value.toUpperCase())); + values.put(id, Locomotion.byName(value.getAsString().toUpperCase())); } @Override diff --git a/src/main/java/eu/ha3/presencefootsteps/world/PFSolver.java b/src/main/java/eu/ha3/presencefootsteps/world/PFSolver.java index db716688..b8c0e276 100644 --- a/src/main/java/eu/ha3/presencefootsteps/world/PFSolver.java +++ b/src/main/java/eu/ha3/presencefootsteps/world/PFSolver.java @@ -80,7 +80,7 @@ public Association findAssociation(AssociationPool associations, LivingEntity pl // we discard the normal block association, and mark the foliage as detected if (foliage.isEmitter() && engine.getIsolator().blocks().getAssociation(above, Substrates.MESSY) == SoundsKey.MESSY_GROUND) { - return Association.of(above, pos, ply, SoundsKey.NON_EMITTER, SoundsKey.NON_EMITTER, foliage); + return Association.of(above, pos, ply, false, SoundsKey.NON_EMITTER, SoundsKey.NON_EMITTER, foliage); } return Association.NOT_EMITTER; @@ -211,9 +211,9 @@ private Association findAssociation(AssociationPool associations, LivingEntity p if (state.isLiquid()) { if (state.getFluidState().isIn(FluidTags.LAVA)) { - return Association.of(state, pos.down(), player, SoundsKey.LAVAFINE, SoundsKey.NON_EMITTER, SoundsKey.NON_EMITTER); + return Association.of(state, pos.down(), player, false, SoundsKey.LAVAFINE, SoundsKey.NON_EMITTER, SoundsKey.NON_EMITTER); } - return Association.of(state, pos.down(), player, SoundsKey.WATERFINE, SoundsKey.NON_EMITTER, SoundsKey.NON_EMITTER); + return Association.of(state, pos.down(), player, false, SoundsKey.WATERFINE, SoundsKey.NON_EMITTER, SoundsKey.NON_EMITTER); } return association; @@ -237,30 +237,26 @@ private Association findAssociation(AssociationPool associations, LivingEntity e target = carpet; // reference frame moved up by 1 } else { - association = SoundsKey.UNASSIGNED; - pos.move(Direction.DOWN); // This condition implies that if the carpet is NOT_EMITTER, solving will // CONTINUE with the actual block surface the player is walking on - if (target.isAir()) { + pos.move(Direction.DOWN); + association = associations.get(pos, target, Substrates.DEFAULT); + + // If the block surface we're on is not an emitter, check for fences below us + if (!association.isEmitter() || !association.isResult()) { pos.move(Direction.DOWN); BlockState fence = getBlockStateAt(entity, pos); // Only check fences if we're actually touching them - if (checkCollision(entity.getWorld(), fence, pos, collider)) { - if ((association = associations.get(pos, fence, Substrates.FENCE)).isResult()) { - carpet = target; - target = fence; - // reference frame moved down by 1 - } else { - pos.move(Direction.UP); - } + if (checkCollision(entity.getWorld(), fence, pos, collider) && (association = associations.get(pos, fence, Substrates.FENCE)).isResult()) { + carpet = target; + target = fence; + // reference frame moved down by 1 + } else { + pos.move(Direction.UP); } } - if (!association.isResult()) { - association = associations.get(pos, target, Substrates.DEFAULT); - } - if (engine.getConfig().foliageSoundsVolume.get() > 0) { if (entity.getEquippedStack(EquipmentSlot.FEET).isEmpty() || entity.isSprinting()) { if (association.isEmitter() && carpet.getCollisionShape(entity.getWorld(), pos).isEmpty()) { @@ -291,6 +287,6 @@ private Association findAssociation(AssociationPool associations, LivingEntity e wetAssociation = associations.get(pos, target, Substrates.WET); } - return Association.of(target, pos, entity, association, wetAssociation, foliage); + return Association.of(target, pos, entity, associations.wasLastMatchGolem() && entity.isOnGround(), association, wetAssociation, foliage); } } diff --git a/src/main/java/eu/ha3/presencefootsteps/world/StateLookup.java b/src/main/java/eu/ha3/presencefootsteps/world/StateLookup.java index 52f63a09..da92b44b 100644 --- a/src/main/java/eu/ha3/presencefootsteps/world/StateLookup.java +++ b/src/main/java/eu/ha3/presencefootsteps/world/StateLookup.java @@ -22,6 +22,8 @@ import org.jetbrains.annotations.Nullable; +import com.google.gson.JsonElement; + /** * A state lookup that finds an association for a given block state within a specific substrate (or no substrate). * @@ -39,8 +41,8 @@ public SoundsKey getAssociation(BlockState state, String substrate) { } @Override - public void add(String key, String value) { - SoundsKey sound = SoundsKey.of(value); + public void add(String key, JsonElement value) { + SoundsKey sound = SoundsKey.of(value.getAsString()); if (!sound.isResult()) { return; } @@ -77,7 +79,19 @@ public void writeToReport(boolean full, JsonObjectWriter writer, Map { writer.field("class", getClassData(state)); writer.field("tags", getTagData(state)); diff --git a/src/main/resources/assets/presencefootsteps/config/acoustics.json b/src/main/resources/assets/presencefootsteps/config/acoustics.json index d79396a7..63b5cdef 100644 --- a/src/main/resources/assets/presencefootsteps/config/acoustics.json +++ b/src/main/resources/assets/presencefootsteps/config/acoustics.json @@ -88,6 +88,62 @@ } ] }, + "softrug": { + "type": "events", + "walk": { + "name": "rug.rug_walk", + "volume": 30.0 + }, + "wander": { + "name": "grass.grass_wander", + "volume": 30 + }, + "land": [ + "rug.rug_walk", + { + "type": "delayed", + "delay": 20, + "acoustic": "rug.rug_walk" + } + ] + }, + "heavymetal": { + "type": "events", + "walk": "@minecraft:block.heavy_core.step", + "run": "@minecraft:block.heavy_core.step", + "wander": [ + "@minecraft:block.heavy_core.step", + { + "type": "probability", + "entries": [ + 4, + { + "type": "basic", + "name": "metalbox.metalbox_wander", + "volume": { + "min": 10.0, + "max": 50.0 + } + }, + 7, + "@" + ] + } + ], + "land": [ + "@minecraft:block.heavy_core.step", + { + "type": "basic", + "name": "@minecraft:block.heavy_core.step", + "volume": 50.0 + }, + { + "type": "delayed", + "delay": 50, + "acoustic": "metalbox.metalbox_run" + } + ] + }, "hardmetal": { "type": "events", "walk": "metalbox.metalbox_walk", @@ -505,6 +561,64 @@ } ] }, + "softleaves": { + "type": "events", + "walk": [ + { + "name": "dirt.dirt_walk", + "volume": 20 + }, + { + "name": "leaves.leaves_through", + "volume": 30, + "pitch": 80 + } + ], + "run": [ + { + "name": "dirt.dirt_run", + "volume": 20 + }, + { + "name": "leaves.leaves_through", + "volume": 30 + } + ], + "jump": [ + { + "name": "dirt.dirt_wander", + "volume": 40 + }, + { + "name": "leaves.leaves_through", + "volume": 40 + } + ], + "wander": { + "name": "dirt.dirt_wander", + "volume": 40 + }, + "land": [ + { + "name": "dirt.dirt_land", + "volume": 40 + }, + { + "name": "leaves.leaves_through", + "volume": 40 + }, + { + "type": "basic", + "name": "dirt.dirt_walk", + "volume": 50.0 + }, + { + "type": "delayed", + "delay": 50, + "acoustic": "dirt.dirt_run" + } + ] + }, "hardsteel": { "type": "events", "walk": "marble.marble_walk", @@ -711,6 +825,45 @@ } ] }, + "softwood": { + "type": "events", + "walk": [ + { + "type": "basic", + "name": "wood.wood_walk", + "volume": 40 + }, + { + "pitch": 20, + "delay": 50, + "volume": 10, + "name": "squeakywood.squeakywood_walk" + } + ], + "wander": [ + "dirt.dirt_wander", + { + "type": "delayed", + "delay": 50, + "pitch": 30, + "volume": 10, + "acoustic": "squeakywood.squeakywood_wander" + } + ], + "land": [ + { + "type": "basic", + "name": "wood.wood_walk", + "volume": 30 + }, + { + "type": "delayed", + "delay": 30, + "acoustic": "wood.wood_walk", + "volume": 30 + } + ] + }, "slate_ore": { "type": "events", "walk": [ @@ -1597,6 +1750,12 @@ "wander": "@minecraft:block.honey_block.step", "land": "@minecraft:block.honey_block.break" }, + "creaking": { + "type": "events", + "walk": "@minecraft:block.creaking_heart.step", + "wander": "@minecraft:block.creaking_heart.step", + "land": "@minecraft:block.creaking_heart.break" + }, "grass": { "type": "events", "walk": [ @@ -1646,6 +1805,61 @@ } ] }, + "softgrass": { + "type": "events", + "walk": [ + { + "type": "basic", + "name": "grass.grass_walk", + "volume": { + "min": 10.0, + "max": 20.0 + } + }, + { + "type": "basic", + "name": "brush.brush_through", + "volume": 5.0 + } + ], + "run": [ + { + "type": "basic", + "name": "grass.grass_run", + "volume": { + "min": 10.0, + "max": 30.0 + } + }, + { + "type": "basic", + "name": "brush.brush_through", + "volume": 20.0 + } + ], + "wander": { + "name": "grass.grass_wander", + "volume": 20.0 + }, + "land": [ + { + "name": "grass.grass_run", + "volume": 20.0 + }, + { + "type": "delayed", + "delay": 50, + "acoustic": { + "type": "basic", + "name": "grass.grass_run", + "volume": { + "min": 30.0, + "max": 40.0 + } + } + } + ] + }, "brickstone": { "type": "events", "walk": "concrete.concrete_walk", @@ -2091,6 +2305,85 @@ } ] }, + "resin": { + "type": "events", + "walk": [ + { + "name": "bluntwood.bluntwood_walk", + "volume": 10, + "pitch": { + "min": 15.0, + "max": 25.0 + } + }, + { + "type": "basic", + "name": "lino.lino_walk", + "volume": 30, + "pitch": { + "min": 75.0, + "max": 85.0 + } + } + ], + "run": [ + { + "name": "bluntwood.bluntwood_walk", + "volume": 30, + "pitch": { + "min": 15.0, + "max": 25.0 + } + }, + { + "type": "basic", + "name": "lino.lino_run", + "volume": 30, + "pitch": { + "min": 75.0, + "max": 85.0 + } + } + ], + "wander": [ + { + "name": "bluntwood.bluntwood_wander", + "volume": 10, + "pitch": { + "min": 15.0, + "max": 25.0 + } + }, + { + "name": "marble.marble_wander", + "volume": 30, + "pitch": { + "min": 75.0, + "max": 85.0 + } + } + ], + "land": [ + { + "name": "bluntwood.bluntwood_walk", + "volume": 20, + "pitch": { + "min": 15.0, + "max": 25.0 + } + }, + { + "type": "delayed", + "delay": 50, + "volume": 30, + "pitch": { + "min": 75.0, + "max": 85.0 + }, + "acoustic": "bluntwood.bluntwood_walk" + } + ] + }, "ladder": { "type": "events", "walk": { diff --git a/src/main/resources/assets/presencefootsteps/config/biomevariancemap.json b/src/main/resources/assets/presencefootsteps/config/biomevariancemap.json new file mode 100644 index 00000000..53f36d2a --- /dev/null +++ b/src/main/resources/assets/presencefootsteps/config/biomevariancemap.json @@ -0,0 +1,6 @@ +{ + "minecraft:pale_garden": { + "volume": 0.5, + "pitch": 1 + } +} diff --git a/src/main/resources/assets/presencefootsteps/config/blockmap.json b/src/main/resources/assets/presencefootsteps/config/blockmap.json index 1f2f5a47..8b45ebbe 100644 --- a/src/main/resources/assets/presencefootsteps/config/blockmap.json +++ b/src/main/resources/assets/presencefootsteps/config/blockmap.json @@ -59,10 +59,12 @@ "minecraft:cracked_deepslate_tiles": "brickstone", "#minecraft:planks": "wood", + "minecraft:pale_oak_planks": "softwood", "minecraft:bedrock": "bedrock", "#minecraft:sand": "sand", "minecraft:gravel": "gravel", + "minecraft:suspicious_gravel": "gravel", "minecraft:diamond_ore": "ore", "minecraft:copper_ore": "ore", @@ -90,6 +92,10 @@ "minecraft:acacia_log": "wood", "minecraft:dark_oak_log": "wood", "minecraft:mangrove_log": "wood", + "minecraft:cherry_log": "wood", + "minecraft:pale_oak_log": "softwood", + + "minecraft:creaking_heart": "softwood,creaking", "minecraft:stripped_oak_log": "wood,stone", "minecraft:stripped_spruce_log": "wood,stone", @@ -98,6 +104,8 @@ "minecraft:stripped_acacia_log": "wood,stone", "minecraft:stripped_dark_oak_log": "wood,stone", "minecraft:stripped_mangrove_log": "wood,stone", + "minecraft:stripped_cherry_log": "wood,stone", + "minecraft:stripped_pale_oak_log": "softwood,stone", "minecraft:stripped_oak_wood": "wood,stone", "minecraft:stripped_spruce_wood": "wood,stone", @@ -106,6 +114,8 @@ "minecraft:stripped_acacia_wood": "wood,stone", "minecraft:stripped_dark_oak_wood": "wood,stone", "minecraft:stripped_mangrove_wood": "wood,stone", + "minecraft:stripped_cherry_wood": "wood,stone", + "minecraft:stripped_pale_oak_wood": "softwood,stone", "minecraft:oak_wood": "wood", "minecraft:spruce_wood": "wood", @@ -114,8 +124,11 @@ "minecraft:acacia_wood": "wood", "minecraft:dark_oak_wood": "wood", "minecraft:mangrove_wood": "wood", + "minecraft:cherry_wood": "wood", + "minecraft:pale_oak_wood": "softwood", "#minecraft:leaves": "leaves", + "minecraft:pale_oak_leaves": "softleaves", "minecraft:sponge": "organic", "minecraft:wet_sponge": "mud", @@ -171,24 +184,10 @@ "#minecraft:wool": "rug", "minecraft:dandelion": "NOT_EMITTER", - "minecraft:poppy": "NOT_EMITTER", - "minecraft:blue_orchid": "NOT_EMITTER", - "minecraft:allium": "NOT_EMITTER", - "minecraft:azure_bluet": "NOT_EMITTER", - - "minecraft:red_tulip": "NOT_EMITTER", - "minecraft:orange_tulip": "NOT_EMITTER", - "minecraft:white_tulip": "NOT_EMITTER", - "minecraft:pink_tulip": "NOT_EMITTER", - - "minecraft:oxeye_daisy": "NOT_EMITTER", - "minecraft:oxeye_daisy.foliage": "brush", - "minecraft:cornflower": "NOT_EMITTER", - "minecraft:lily_of_the_valley": "NOT_EMITTER", - - "minecraft:wither_rose": "NOT_EMITTER", + + "#minecraft:small_flowers": "NOT_EMITTER", + "#minecraft:small_flowers.foliage": "brush", "minecraft:wither_rose.messy": "straw", - "minecraft:wither_rose.foliage": "brush", "minecraft:brown_mushroom": "NOT_EMITTER", "minecraft:red_mushroom": "NOT_EMITTER", @@ -204,6 +203,8 @@ "minecraft:acacia_slab": "wood", "minecraft:dark_oak_slab": "wood", "minecraft:mangrove_slab": "wood", + "minecraft:cherry_slab": "wood", + "minecraft:pale_oak_slab": "softwood", "minecraft:stone_slab": "stone", "minecraft:smooth_stone_slab": "marble", @@ -242,6 +243,7 @@ "minecraft:soul_torch": "NOT_EMITTER", "minecraft:soul_wall_torch": "NOT_EMITTER", "minecraft:end_rod": "metalbar", + "minecraft:heavy_core": "heavymetal", "minecraft:chorus_flower": "organic_solid", "minecraft:chorus_plant": "squeakywood,organic_dry", @@ -265,6 +267,7 @@ "minecraft:stone_pressure_plate": "stone", "minecraft:stone_pressure_plate.carpet": "stone", "#minecraft:wooden_pressure_plates": "wood", + "minecraft:pale_oak_pressure_plate.foliage": "softwood", "#minecraft:wooden_pressure_plates.carpet": "wood", "minecraft:lightning_rod": "copper", @@ -376,6 +379,7 @@ "minecraft:mossy_stone_bricks": "brickstone", "minecraft:cracked_stone_bricks": "brickstone", "minecraft:chiseled_stone_bricks": "brickstone", + "minecraft:decorated_pot": "stone", "minecraft:brown_mushroom_block": "mushroom", "minecraft:red_mushroom_block": "mushroom", @@ -413,7 +417,11 @@ "minecraft:moss_block": "rug", "minecraft:moss_carpet": "rug", "minecraft:moss_carpet.carpet": "rug,grass", - + + "minecraft:pale_moss_block": "softrug", + "minecraft:pale_moss_carpet": "softrug", + "minecraft:pale_moss_carpet.carpet": "softrug,softgrass", + "minecraft:azalea": "leaves", "minecraft:flowering_azalea": "leaves", "minecraft:mangrove_roots": "rug,leaves", @@ -429,15 +437,14 @@ "minecraft:spore_blossom": "NOT_EMITTER", "minecraft:hanging_roots": "NOT_EMITTER", + "minecraft:hanging_roots.messy": "softgrass", + "minecraft:hanging_roots.foliage": "softgrass", + + "minecraft:pale_hanging_moss": "NOT_EMITTER", + "minecraft:pale_hanging_moss.messy": "softgrass", + "minecraft:pale_hanging_moss.foliage": "softgrass", - "minecraft:oak_fence_gate.bigger": "bluntwood", - "minecraft:spruce_fence_gate.bigger": "bluntwood", - "minecraft:birch_fence_gate.bigger": "bluntwood", - "minecraft:jungle_fence_gate.bigger": "bluntwood", - "minecraft:acacia_fence_gate.bigger": "bluntwood", - "minecraft:dark_oak_fence_gate.bigger": "bluntwood", - "minecraft:mangrove_fence_gate.bigger": "bluntwood", - "minecraft:bamboo_fence_gate.bigger": "bluntwood", + "#minecraft:fence_gates.bigger": "bluntwood", "minecraft:brick_stairs": "brickstone", "minecraft:stone_brick_stairs": "brickstone", @@ -468,6 +475,7 @@ "minecraft:crimson_stairs": "wood,mushroom", "minecraft:warped_stairs": "wood,mushroom", + "minecraft:pale_oak_stairs": "softwood", "#minecraft:wooden_stairs": "wood", "minecraft:beacon": "glass", @@ -487,20 +495,9 @@ "minecraft:end_stone_brick_wall.bigger": "brickstone", "minecraft:diorite_wall.bigger": "stone,ore", - "minecraft:oak_button[face=floor].foliage": "wood", - "minecraft:oak_button": "NOT_EMITTER", - "minecraft:spruce_button[face=floor].foliage": "wood", - "minecraft:spruce_button": "NOT_EMITTER", - "minecraft:birch_button[face=floor].foliage": "wood", - "minecraft:birch_button": "NOT_EMITTER", - "minecraft:jungle_button[face=floor].foliage": "wood", - "minecraft:jungle_button": "NOT_EMITTER", - "minecraft:acacia_button[face=floor].foliage": "wood", - "minecraft:acacia_button": "NOT_EMITTER", - "minecraft:dark_oak_button[face=floor].foliage": "wood", - "minecraft:dark_oak_button": "NOT_EMITTER", - "minecraft:mangrove_button[face=floor].foliage": "wood", - "minecraft:mangrove_button": "NOT_EMITTER", + "minecraft:pale_oak_button[face=floor].foliage": "softwood", + "#minecraft:wooden_buttons[face=floor].foliage": "wood", + "#minecraft:wooden_buttons": "NOT_EMITTER", "#minecraft:anvil": "metalcompressed,hardmetal", @@ -701,6 +698,7 @@ "minecraft:black_concrete_powder": "sand", "minecraft:turtle_egg": "bone", + "minecraft:sniffer_egg": "bone", "minecraft:dragon_egg": "obsidian", "#minecraft:coral_blocks": "organic", @@ -841,7 +839,16 @@ "minecraft:wheat[age=6].foliage": "straw", "minecraft:wheat[age=7].foliage": "straw", - "#minecraft:standing_signs": "NOT_EMITTER", + "minecraft:pitcher_plant": "NOT_EMITTER", + "minecraft:pitcher_plant.foliage": "brush", + + "minecraft:pitcher_crop": "NOT_EMITTER", + "minecraft:pitcher_crop[age=1].foliage": "brush", + "minecraft:pitcher_crop[age=2].foliage": "brush_straw_transition", + "minecraft:pitcher_crop[age=3].foliage": "brush_straw_transition", + "minecraft:pitcher_crop[age=4].foliage": "straw", + + "#minecraft:all_signs": "NOT_EMITTER", "#minecraft:all_hanging_signs": "bluntwood", "minecraft:sugar_cane": "NOT_EMITTER", @@ -1033,5 +1040,16 @@ "minecraft:stripped_crimson_stem": "organic_dry,mushroom,stone", "minecraft:stripped_crimson_hyphae": "organic_dry,mushroom,stone", - "#minecraft:crimson_stems": "organic_dry,wood_sticky,mushroom" + "#minecraft:crimson_stems": "organic_dry,wood_sticky,mushroom", + + "minecraft:resin_clump": "NOT_EMITTER", + "minecraft:resin_clump.carpet": "NOT_EMITTER", + "minecraft:resin_clump[down=true].foliage": "slick", + + "minecraft:resin_block": "resin,slick", + "minecraft:resin_bricks": "resin", + "minecraft:resin_brick_stairs": "resin", + "minecraft:resin_brick_slab": "resin", + "minecraft:resin_brick_wall": "resin", + "minecraft:chiseled_resin_bricks": "resin" } diff --git a/src/main/resources/assets/presencefootsteps/config/golemmap.json b/src/main/resources/assets/presencefootsteps/config/golemmap.json index cc0c27d8..ac351f36 100644 --- a/src/main/resources/assets/presencefootsteps/config/golemmap.json +++ b/src/main/resources/assets/presencefootsteps/config/golemmap.json @@ -3,8 +3,28 @@ "minecraft:armor_stand@carpet": "marble", - "minecraft:boat": "wood", - "minecraft:chest_boat": "wood", + "minecraft:oak_boat": "wood", + "minecraft:spruce_boat": "wood", + "minecraft:birch_boat": "wood", + "minecraft:jungle_boat": "wood", + "minecraft:acacia_boat": "wood", + "minecraft:dark_oak_boat": "wood", + "minecraft:mangrove_boat": "wood", + "minecraft:cherry_boat": "wood", + "minecraft:pale_oak_boat": "softwood", + "minecraft:bamboo_raft": "squeakywood", + + "minecraft:oak_chest_boat": "wood", + "minecraft:spruce_chest_boat": "wood", + "minecraft:birch_chest_boat": "wood", + "minecraft:jungle_chest_boat": "wood", + "minecraft:acacia_chest_boat": "wood", + "minecraft:dark_oak_chest_boat": "wood", + "minecraft:mangrove_chest_boat": "wood", + "minecraft:cherry_chest_boat": "wood", + "minecraft:pale_oak_chest_boat": "wood", + "minecraft:bamboo_chest_raft": "squeakywood", + "minecraft:minecart": "metalbar", "minecraft:chest_minecart": "squeakywood", "minecraft:furnace_minecart": "stonemachine", diff --git a/src/main/resources/assets/presencefootsteps/config/locomotionmap.json b/src/main/resources/assets/presencefootsteps/config/locomotionmap.json index 2871e941..5ea908df 100644 --- a/src/main/resources/assets/presencefootsteps/config/locomotionmap.json +++ b/src/main/resources/assets/presencefootsteps/config/locomotionmap.json @@ -78,5 +78,9 @@ "minecraft:allay": "NONE", "minecraft:frog": "BIPED", "minecraft:tadpole": "NONE", - "minecraft:warden": "BIPED" + "minecraft:warden": "BIPED", + "minecraft:armadillo": "QUADRUPED", + "minecraft:bogged": "BIPED", + "minecraft:breeze": "NONE", + "minecraft:creaking": "BIPED" } diff --git a/src/main/resources/assets/presencefootsteps/config/primitivemap.json b/src/main/resources/assets/presencefootsteps/config/primitivemap.json index f89c4ea6..d893bef4 100644 --- a/src/main/resources/assets/presencefootsteps/config/primitivemap.json +++ b/src/main/resources/assets/presencefootsteps/config/primitivemap.json @@ -99,6 +99,13 @@ "minecraft:block.copper_bulb.step": "glass", "minecraft:block.polished_tuff.step": "marble", "minecraft:block.tuff_bricks.step": "brickstone", + "minecraft:block.vault.step": "metalbar", + "minecraft:block.resin.step": "resin,slick", + "minecraft:block.resin_bricks.step": "resin", + "minecraft:block.cobweb.step": "NOT_EMITTER", + "minecraft:block.heavy_core.step": "heavymetal", + "minecraft:block.spawner.step": "metalbar", + "minecraft:block.creaking_heart.step": "softwood,creaking", "item.armor.equip_generic": "boots", "item.armor.equip_chain": "chainmail",