File tree Expand file tree Collapse file tree 2 files changed +16
-2
lines changed
java/gay/object/hexdebug/mixin
kotlin/gay/object/hexdebug/gui/splicing Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change 88import at .petrak .hexcasting .common .msgs .MsgNewSpellPatternC2S ;
99import at .petrak .hexcasting .xplat .IClientXplatAbstractions ;
1010import com .llamalad7 .mixinextras .injector .v2 .WrapWithCondition ;
11+ import com .llamalad7 .mixinextras .injector .wrapoperation .Operation ;
12+ import com .llamalad7 .mixinextras .injector .wrapoperation .WrapOperation ;
1113import gay .object .hexdebug .gui .splicing .IMixinGuiSpellcasting ;
14+ import net .minecraft .client .resources .sounds .SoundInstance ;
15+ import net .minecraft .client .sounds .SoundManager ;
1216import net .minecraft .world .InteractionHand ;
1317import org .jetbrains .annotations .NotNull ;
1418import org .jetbrains .annotations .Nullable ;
@@ -41,6 +45,18 @@ public abstract class MixinGuiSpellcasting implements IMixinGuiSpellcasting {
4145 @ Override
4246 public abstract InteractionHand getHandOpenedWith ();
4347
48+ @ WrapWithCondition (
49+ method = "init" ,
50+ at = @ At (
51+ value = "INVOKE" ,
52+ target = "Lnet/minecraft/client/sounds/SoundManager;play(Lnet/minecraft/client/resources/sounds/SoundInstance;)V"
53+ )
54+ )
55+ private boolean cancelAmbiance$hexdebug (SoundManager instance , SoundInstance sound ) {
56+ // if this is being used for a splicing table, don't play the sound
57+ return onDrawSplicingTablePattern$hexdebug == null ;
58+ }
59+
4460 @ WrapWithCondition (
4561 method = "drawEnd" ,
4662 at = @ At (
Original file line number Diff line number Diff line change @@ -2,7 +2,6 @@ package gay.`object`.hexdebug.gui.splicing
22
33import at.petrak.hexcasting.api.utils.asTranslatedComponent
44import at.petrak.hexcasting.client.gui.GuiSpellcasting
5- import at.petrak.hexcasting.common.lib.HexSounds
65import com.mojang.blaze3d.systems.RenderSystem
76import gay.`object`.hexdebug.HexDebug
87import gay.`object`.hexdebug.config.HexDebugConfig
@@ -117,7 +116,6 @@ class SplicingTableScreen(
117116 super .init ()
118117
119118 guiSpellcasting.init (minecraft!! , width, height)
120- Minecraft .getInstance().soundManager.stop(HexSounds .CASTING_AMBIANCE .location, null )
121119
122120 titleLabelX = (imageWidth - font.width(title)) / 2
123121
You can’t perform that action at this time.
0 commit comments