diff --git a/common/build.gradle b/common/build.gradle index 7d413be2..2d4e3714 100644 --- a/common/build.gradle +++ b/common/build.gradle @@ -34,7 +34,6 @@ dependencies { // implementation group: 'com.google.code.findbugs', name: 'jsr305', version: '3.0.2' - annotationProcessor "org.spongepowered:mixin:0.8.7:processor" implementation(annotationProcessor("io.github.llamalad7:mixinextras-common:${rootProject.mixin_extras}")) } @@ -42,10 +41,13 @@ architectury { common("fabric", "neoforge") } +// No mixin AP / refmap in common: the fabric project compiles common's sources itself +// and generates its own refmap. With the legacy AP enabled here, loom injects a +// "refmap" line into the built antarchy-common.mixins.json, which breaks NeoForge +// (it resolves to fabric-only intermediary names like field_6353). loom { mixin { - useLegacyMixinAp = true - defaultRefmapName = "antarchy.refmap.json" + useLegacyMixinAp = false } } diff --git a/common/src/main/java/com/craisinlord/antarchy/content/AntarchySoundEvents.java b/common/src/main/java/com/craisinlord/antarchy/content/AntarchySoundEvents.java index 08a19965..8cabf511 100644 --- a/common/src/main/java/com/craisinlord/antarchy/content/AntarchySoundEvents.java +++ b/common/src/main/java/com/craisinlord/antarchy/content/AntarchySoundEvents.java @@ -126,6 +126,9 @@ public final class AntarchySoundEvents { public static Supplier TORETERROR_HURT = (Supplier) UNBOUND; public static Supplier TORETERROR_DEATH = (Supplier) UNBOUND; public static Supplier TORETERROR_BOMBER_FIRE = (Supplier) UNBOUND; + public static Supplier TORETERROR_SPIN = (Supplier) UNBOUND; + public static Supplier TORETERROR_RICOCHET = (Supplier) UNBOUND; + public static Supplier WATER_CANNON_FIRE = (Supplier) UNBOUND; public static Supplier TORETERROR_JUMP_UP = (Supplier) UNBOUND; public static Supplier TORETERROR_JUMP_LAND = (Supplier) UNBOUND; public static Supplier STINKY_FLY = (Supplier) UNBOUND; @@ -259,6 +262,9 @@ public final class AntarchySoundEvents { Supplier toreterrorHurt, Supplier toreterrorDeath, Supplier toreterrorBomberFire, + Supplier toreterrorSpin, + Supplier toreterrorRicochet, + Supplier waterCannonFire, Supplier toreterrorJumpUp, Supplier toreterrorJumpLand, Supplier stinkyFly, @@ -388,6 +394,9 @@ public final class AntarchySoundEvents { TORETERROR_HURT = toreterrorHurt; TORETERROR_DEATH = toreterrorDeath; TORETERROR_BOMBER_FIRE = toreterrorBomberFire; + TORETERROR_SPIN = toreterrorSpin; + TORETERROR_RICOCHET = toreterrorRicochet; + WATER_CANNON_FIRE = waterCannonFire; TORETERROR_JUMP_UP = toreterrorJumpUp; TORETERROR_JUMP_LAND = toreterrorJumpLand; STINKY_FLY = stinkyFly; diff --git a/common/src/main/java/com/craisinlord/antarchy/content/entity/ToreterrorEntity.java b/common/src/main/java/com/craisinlord/antarchy/content/entity/ToreterrorEntity.java index 9ff71f9b..5a5c5d98 100644 --- a/common/src/main/java/com/craisinlord/antarchy/content/entity/ToreterrorEntity.java +++ b/common/src/main/java/com/craisinlord/antarchy/content/entity/ToreterrorEntity.java @@ -122,6 +122,7 @@ public class ToreterrorEntity extends Monster implements GeoEntity { private int shootCooldown; private int jumpCooldown; private int spinCooldown; + private int spinRicochetCooldown; private boolean jumpLaunched; private boolean jumpAirborne; private boolean shockwaveApplied; @@ -227,6 +228,7 @@ public class ToreterrorEntity extends Monster implements GeoEntity { if (this.shootCooldown > 0) this.shootCooldown--; if (this.jumpCooldown > 0) this.jumpCooldown--; if (this.spinCooldown > 0) this.spinCooldown--; + if (this.spinRicochetCooldown > 0) this.spinRicochetCooldown--; if (this.jumpShakeTicks > 0) { this.jumpShakeTicks--; if (this.jumpShakeTicks <= 0) { @@ -575,6 +577,7 @@ public class ToreterrorEntity extends Monster implements GeoEntity { return true; } + this.playSpinRicochetSound(); this.spinStrafeSign *= -1; Vec3 bounced = rotateHorizontal(direction, this.spinStrafeSign * 35.0D); if (this.trySpinMoves(bounced, true)) { @@ -590,6 +593,14 @@ public class ToreterrorEntity extends Monster implements GeoEntity { return this.trySpinMoves(reversedBounce, true); } + private void playSpinRicochetSound() { + if (this.spinRicochetCooldown > 0) { + return; + } + this.spinRicochetCooldown = 6; + this.playSound(AntarchySoundEvents.TORETERROR_RICOCHET.get(), 1.0F, 0.95F + this.random.nextFloat() * 0.1F); + } + private boolean trySpinMoves(Vec3 baseDirection, boolean bounced) { Vec3[] attempts = new Vec3[]{ baseDirection, @@ -715,7 +726,7 @@ public class ToreterrorEntity extends Monster implements GeoEntity { if (!(this.level() instanceof ServerLevel serverLevel)) return; LivingEntity target = this.getTarget(); if (target == null) return; - this.playSound(AntarchySoundEvents.SQUIDZOOKA_FIRE.get(), 0.8F, 0.9F + this.random.nextFloat() * 0.2F); + this.playSound(AntarchySoundEvents.WATER_CANNON_FIRE.get(), 0.8F, 0.9F + this.random.nextFloat() * 0.2F); Vec3 from = new Vec3(this.getX(), this.getEyeY(), this.getZ()); Vec3 to = new Vec3(target.getX(), target.getEyeY(), target.getZ()); Vec3 baseVel = calcLaunchVelocity(from, to, 1.5); @@ -917,6 +928,7 @@ public class ToreterrorEntity extends Monster implements GeoEntity { ToreterrorEntity.this.spinDirection = target == null ? Vec3.ZERO : ToreterrorEntity.this.horizontalDirectionTo(target.position()); + ToreterrorEntity.this.playSound(AntarchySoundEvents.TORETERROR_SPIN.get(), 1.1F, 0.95F + ToreterrorEntity.this.random.nextFloat() * 0.1F); } @Override diff --git a/common/src/main/java/com/craisinlord/antarchy/content/item/WaterCannonItem.java b/common/src/main/java/com/craisinlord/antarchy/content/item/WaterCannonItem.java index 2490f715..ec158ce5 100644 --- a/common/src/main/java/com/craisinlord/antarchy/content/item/WaterCannonItem.java +++ b/common/src/main/java/com/craisinlord/antarchy/content/item/WaterCannonItem.java @@ -65,7 +65,7 @@ public class WaterCannonItem extends ProjectileWeaponItem implements GeoItem { if (usedTicks % FIRE_INTERVAL_TICKS != 0) return; level.playSound(null, player.getX(), player.getY(), player.getZ(), - AntarchySoundEvents.SQUIDZOOKA_FIRE.get(), SoundSource.PLAYERS, + AntarchySoundEvents.WATER_CANNON_FIRE.get(), SoundSource.PLAYERS, 0.8F, 0.9F + level.getRandom().nextFloat() * 0.2F); if (!level.isClientSide()) { diff --git a/common/src/main/resources/assets/antarchy/lang/en_us.json b/common/src/main/resources/assets/antarchy/lang/en_us.json index ad312c44..44d41ea1 100644 --- a/common/src/main/resources/assets/antarchy/lang/en_us.json +++ b/common/src/main/resources/assets/antarchy/lang/en_us.json @@ -661,6 +661,9 @@ "subtitles.antarchy.toreterror_hurt": "Toreterror hurts", "subtitles.antarchy.toreterror_death": "Toreterror dies", "subtitles.antarchy.toreterror_bomber_fire": "Toreterror launches bombers", + "subtitles.antarchy.toreterror_spin": "Toreterror spins", + "subtitles.antarchy.toreterror_ricochet": "Toreterror ricochets", + "subtitles.antarchy.water_cannon_fire": "Water Cannon fires", "subtitles.antarchy.toreterror_jump_up": "Toreterror jumps", "subtitles.antarchy.toreterror_jump_land": "Toreterror lands", "subtitles.antarchy.creeping_horror_growl": "Creeping Horror growls", diff --git a/common/src/main/resources/assets/antarchy/sounds.json b/common/src/main/resources/assets/antarchy/sounds.json index 5316cdc8..698e1e6f 100644 --- a/common/src/main/resources/assets/antarchy/sounds.json +++ b/common/src/main/resources/assets/antarchy/sounds.json @@ -513,6 +513,45 @@ } ] }, + "toreterror_spin": { + "subtitle": "subtitles.antarchy.toreterror_spin", + "sounds": [ + { + "name": "antarchy:mob/toreterror/spin" + } + ] + }, + "toreterror_ricochet": { + "subtitle": "subtitles.antarchy.toreterror_ricochet", + "sounds": [ + { + "name": "antarchy:mob/toreterror/richochet1" + }, + { + "name": "antarchy:mob/toreterror/richochet2" + }, + { + "name": "antarchy:mob/toreterror/richochet3" + } + ] + }, + "water_cannon_fire": { + "subtitle": "subtitles.antarchy.water_cannon_fire", + "sounds": [ + { + "name": "antarchy:mob/toreterror/water_cannon1" + }, + { + "name": "antarchy:mob/toreterror/water_cannon2" + }, + { + "name": "antarchy:mob/toreterror/water_cannon3" + }, + { + "name": "antarchy:mob/toreterror/water_cannon4" + } + ] + }, "toreterror_jump_up": { "subtitle": "subtitles.antarchy.toreterror_jump_up", "sounds": [ diff --git a/common/src/main/resources/assets/antarchy/sounds/mob/toreterror/richochet1.ogg b/common/src/main/resources/assets/antarchy/sounds/mob/toreterror/richochet1.ogg new file mode 100644 index 00000000..0edf0d91 Binary files /dev/null and b/common/src/main/resources/assets/antarchy/sounds/mob/toreterror/richochet1.ogg differ diff --git a/common/src/main/resources/assets/antarchy/sounds/mob/toreterror/richochet2.ogg b/common/src/main/resources/assets/antarchy/sounds/mob/toreterror/richochet2.ogg new file mode 100644 index 00000000..07adebac Binary files /dev/null and b/common/src/main/resources/assets/antarchy/sounds/mob/toreterror/richochet2.ogg differ diff --git a/common/src/main/resources/assets/antarchy/sounds/mob/toreterror/richochet3.ogg b/common/src/main/resources/assets/antarchy/sounds/mob/toreterror/richochet3.ogg new file mode 100644 index 00000000..330d217e Binary files /dev/null and b/common/src/main/resources/assets/antarchy/sounds/mob/toreterror/richochet3.ogg differ diff --git a/common/src/main/resources/assets/antarchy/sounds/mob/toreterror/spin.ogg b/common/src/main/resources/assets/antarchy/sounds/mob/toreterror/spin.ogg new file mode 100644 index 00000000..6a40acf4 Binary files /dev/null and b/common/src/main/resources/assets/antarchy/sounds/mob/toreterror/spin.ogg differ diff --git a/common/src/main/resources/assets/antarchy/sounds/mob/toreterror/water_cannon1.ogg b/common/src/main/resources/assets/antarchy/sounds/mob/toreterror/water_cannon1.ogg new file mode 100644 index 00000000..e67b59bf Binary files /dev/null and b/common/src/main/resources/assets/antarchy/sounds/mob/toreterror/water_cannon1.ogg differ diff --git a/common/src/main/resources/assets/antarchy/sounds/mob/toreterror/water_cannon2.ogg b/common/src/main/resources/assets/antarchy/sounds/mob/toreterror/water_cannon2.ogg new file mode 100644 index 00000000..8d815b66 Binary files /dev/null and b/common/src/main/resources/assets/antarchy/sounds/mob/toreterror/water_cannon2.ogg differ diff --git a/common/src/main/resources/assets/antarchy/sounds/mob/toreterror/water_cannon3.ogg b/common/src/main/resources/assets/antarchy/sounds/mob/toreterror/water_cannon3.ogg new file mode 100644 index 00000000..ece40272 Binary files /dev/null and b/common/src/main/resources/assets/antarchy/sounds/mob/toreterror/water_cannon3.ogg differ diff --git a/common/src/main/resources/assets/antarchy/sounds/mob/toreterror/water_cannon4.ogg b/common/src/main/resources/assets/antarchy/sounds/mob/toreterror/water_cannon4.ogg new file mode 100644 index 00000000..922db688 Binary files /dev/null and b/common/src/main/resources/assets/antarchy/sounds/mob/toreterror/water_cannon4.ogg differ diff --git a/fabric/src/main/java/com/craisinlord/antarchy/fabric/AntarchyFabricContent.java b/fabric/src/main/java/com/craisinlord/antarchy/fabric/AntarchyFabricContent.java index 959cc55d..4af2287e 100644 --- a/fabric/src/main/java/com/craisinlord/antarchy/fabric/AntarchyFabricContent.java +++ b/fabric/src/main/java/com/craisinlord/antarchy/fabric/AntarchyFabricContent.java @@ -402,6 +402,9 @@ public final class AntarchyFabricContent { public static final DeferredHolder TORETERROR_HURT = registerSoundEvent("toreterror_hurt"); public static final DeferredHolder TORETERROR_DEATH = registerSoundEvent("toreterror_death"); public static final DeferredHolder TORETERROR_BOMBER_FIRE = registerSoundEvent("toreterror_bomber_fire"); + public static final DeferredHolder TORETERROR_SPIN = registerSoundEvent("toreterror_spin"); + public static final DeferredHolder TORETERROR_RICOCHET = registerSoundEvent("toreterror_ricochet"); + public static final DeferredHolder WATER_CANNON_FIRE = registerSoundEvent("water_cannon_fire"); public static final DeferredHolder TORETERROR_JUMP_UP = registerSoundEvent("toreterror_jump_up"); public static final DeferredHolder TORETERROR_JUMP_LAND = registerSoundEvent("toreterror_jump_land"); public static final DeferredHolder STINKY_FLY_SOUND = registerSoundEvent("stinky_fly"); @@ -2510,6 +2513,9 @@ public final class AntarchyFabricContent { TORETERROR_HURT, TORETERROR_DEATH, TORETERROR_BOMBER_FIRE, + TORETERROR_SPIN, + TORETERROR_RICOCHET, + WATER_CANNON_FIRE, TORETERROR_JUMP_UP, TORETERROR_JUMP_LAND, STINKY_FLY_SOUND, diff --git a/neoforge/src/main/java/com/craisinlord/antarchy/neoforge/AntarchyNeoforge.java b/neoforge/src/main/java/com/craisinlord/antarchy/neoforge/AntarchyNeoforge.java index 155812b3..a3e20f77 100644 --- a/neoforge/src/main/java/com/craisinlord/antarchy/neoforge/AntarchyNeoforge.java +++ b/neoforge/src/main/java/com/craisinlord/antarchy/neoforge/AntarchyNeoforge.java @@ -141,6 +141,9 @@ public class AntarchyNeoforge { AntarchyNeoforgeSounds.TORETERROR_HURT, AntarchyNeoforgeSounds.TORETERROR_DEATH, AntarchyNeoforgeSounds.TORETERROR_BOMBER_FIRE, + AntarchyNeoforgeSounds.TORETERROR_SPIN, + AntarchyNeoforgeSounds.TORETERROR_RICOCHET, + AntarchyNeoforgeSounds.WATER_CANNON_FIRE, AntarchyNeoforgeSounds.TORETERROR_JUMP_UP, AntarchyNeoforgeSounds.TORETERROR_JUMP_LAND, AntarchyNeoforgeSounds.STINKY_FLY, diff --git a/neoforge/src/main/java/com/craisinlord/antarchy/neoforge/registry/AntarchyNeoforgeSounds.java b/neoforge/src/main/java/com/craisinlord/antarchy/neoforge/registry/AntarchyNeoforgeSounds.java index a98d76a8..4d2b76e8 100644 --- a/neoforge/src/main/java/com/craisinlord/antarchy/neoforge/registry/AntarchyNeoforgeSounds.java +++ b/neoforge/src/main/java/com/craisinlord/antarchy/neoforge/registry/AntarchyNeoforgeSounds.java @@ -128,6 +128,9 @@ public final class AntarchyNeoforgeSounds { public static final DeferredHolder TORETERROR_HURT = registerSoundEvent("toreterror_hurt"); public static final DeferredHolder TORETERROR_DEATH = registerSoundEvent("toreterror_death"); public static final DeferredHolder TORETERROR_BOMBER_FIRE = registerSoundEvent("toreterror_bomber_fire"); + public static final DeferredHolder TORETERROR_SPIN = registerSoundEvent("toreterror_spin"); + public static final DeferredHolder TORETERROR_RICOCHET = registerSoundEvent("toreterror_ricochet"); + public static final DeferredHolder WATER_CANNON_FIRE = registerSoundEvent("water_cannon_fire"); public static final DeferredHolder TORETERROR_JUMP_UP = registerSoundEvent("toreterror_jump_up"); public static final DeferredHolder TORETERROR_JUMP_LAND = registerSoundEvent("toreterror_jump_land"); public static final DeferredHolder STINKY_FLY = registerSoundEvent("stinky_fly");