Fixed effect sounds and vines

- Store the effect sound category as a vanilla category name
- Resolve the sound category to a Bukkit category when an effect plays
- Send modded effect sounds on the authored category
- Skip the sound and warn once for an unknown sound category
- Keep authored vine side faces only where a sturdy block or the vine above holds them
- Attach kept vine faces upward under a sturdy block
- Reattach multi-face blocks with no holdable side face to sturdy neighbours
- Cover sound category and vine face rules on Bukkit and modded
- Repin the studio schema digest
This commit is contained in:
Brian Neumann-Fopiano committed 2026-10-31 21:58:58 -04:00
1 parent 64dc22025e
commit c2eb8b5f42
8 files changed
+498 -26

No files matched your search

@@ -55,6 +55,7 @@ public final class ModdedEngineEffects extends EngineAssignedComponent implement
private static final double PLAYER_REFRESH_CHANCE = 0.02D;
private static final Set<String> UNKNOWN_POTIONS = ConcurrentHashMap.newKeySet();
private static final Set<String> UNKNOWN_SOUNDS = ConcurrentHashMap.newKeySet();
private static final Set<String> UNKNOWN_SOUND_CATEGORIES = ConcurrentHashMap.newKeySet();
private static final Set<String> UNKNOWN_PARTICLES = ConcurrentHashMap.newKeySet();
private static final Set<String> UNSUPPORTED_PARTICLES = ConcurrentHashMap.newKeySet();
@@ -252,6 +253,14 @@ public final class ModdedEngineEffects extends EngineAssignedComponent implement
warnUnknown(UNKNOWN_SOUNDS, "sound", key);
return;
}
String categoryKey = effect.getSoundCategoryKey();
NativePlayerEffects.SoundCategory category = NativePlayerEffects.soundCategory(categoryKey);
if (category == null) {
if (UNKNOWN_SOUND_CATEGORIES.add(categoryKey)) {
IrisLogging.warn("Unknown sound category: \"" + categoryKey + "\".");
}
return;
}
int distance = effect.getSoundDistance();
double x = player.x() + RNG.r.i(-distance, distance);
@@ -260,7 +269,7 @@ public final class ModdedEngineEffects extends EngineAssignedComponent implement
float volume = (float) effect.getVolume();
float pitch = (float) RNG.r.d(effect.getMinPitch(), effect.getMaxPitch());
NativePlayerEffects.sound(player, sound, new NativePlayerEffects.SoundEmission(
x, y, z, volume, pitch, ThreadLocalRandom.current().nextLong()));
category, x, y, z, volume, pitch, ThreadLocalRandom.current().nextLong()));
}
private void applyParticles(NativeWorld level, NativeProtocolPlayer player, IrisEffect effect) {