From 6fc0b72b0169b0e6351339dec94efa721059ac9d Mon Sep 17 00:00:00 2001 From: gniftygnome Date: Thu, 4 Jul 2024 14:27:36 -0700 Subject: [PATCH] Maybe fix bad CinderscapesSoundEvents interaction with unknown other mod? - Maybe fix bad CinderscapesSoundEvents interaction with unknown other mod --- .../cinderscapes/init/CinderscapesSoundEvents.java | 4 ++-- .../cinderscapes/mixin/SoundEventAccessor.java | 12 ------------ .../main/resources/mixins.cinderscapes-common.json | 3 +-- 3 files changed, 3 insertions(+), 16 deletions(-) delete mode 100644 common/src/main/java/com/terraformersmc/cinderscapes/mixin/SoundEventAccessor.java diff --git a/common/src/main/java/com/terraformersmc/cinderscapes/init/CinderscapesSoundEvents.java b/common/src/main/java/com/terraformersmc/cinderscapes/init/CinderscapesSoundEvents.java index b31ec8df..f50945be 100644 --- a/common/src/main/java/com/terraformersmc/cinderscapes/init/CinderscapesSoundEvents.java +++ b/common/src/main/java/com/terraformersmc/cinderscapes/init/CinderscapesSoundEvents.java @@ -1,7 +1,6 @@ package com.terraformersmc.cinderscapes.init; import com.terraformersmc.cinderscapes.Cinderscapes; -import com.terraformersmc.cinderscapes.mixin.SoundEventAccessor; import net.minecraft.registry.Registries; import net.minecraft.registry.Registry; import net.minecraft.sound.SoundEvent; @@ -24,7 +23,8 @@ public class CinderscapesSoundEvents { public static final SoundEvent MUSIC_DISC_CHILLING_IN_HELL = add(SoundEvent.of(Identifier.of(Cinderscapes.MOD_ID, "music_disc.chilling_in_hell"))); private static S add(S sound_event) { - SOUND_EVENTS.put(((SoundEventAccessor) sound_event).cinderscapes$getId(), sound_event); + SOUND_EVENTS.put(sound_event.getId(), sound_event); + return sound_event; } diff --git a/common/src/main/java/com/terraformersmc/cinderscapes/mixin/SoundEventAccessor.java b/common/src/main/java/com/terraformersmc/cinderscapes/mixin/SoundEventAccessor.java deleted file mode 100644 index 45c173da..00000000 --- a/common/src/main/java/com/terraformersmc/cinderscapes/mixin/SoundEventAccessor.java +++ /dev/null @@ -1,12 +0,0 @@ -package com.terraformersmc.cinderscapes.mixin; - -import net.minecraft.sound.SoundEvent; -import net.minecraft.util.Identifier; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.gen.Accessor; - -@Mixin(SoundEvent.class) -public interface SoundEventAccessor { - @Accessor("id") - Identifier cinderscapes$getId(); -} diff --git a/common/src/main/resources/mixins.cinderscapes-common.json b/common/src/main/resources/mixins.cinderscapes-common.json index 5e995d73..1ebba0f3 100644 --- a/common/src/main/resources/mixins.cinderscapes-common.json +++ b/common/src/main/resources/mixins.cinderscapes-common.json @@ -7,8 +7,7 @@ "MixinNetherrackBlock", "MixinPlantBlock", "MixinServerWorld", - "OverworldBiomeCreatorAccessor", - "SoundEventAccessor" + "OverworldBiomeCreatorAccessor" ], "client": [ ],