Skip to content

Commit 40d4f2d

Browse files
committed
Updated to 1.21.6
1 parent bc28d65 commit 40d4f2d

8 files changed

Lines changed: 12 additions & 18 deletions

File tree

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
plugins {
2-
id 'fabric-loom' version '1.10-SNAPSHOT'
2+
id 'fabric-loom' version "${loom_version}"
33
id 'maven-publish'
44
}
55

gradle.properties

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,12 @@ archives_base_name = soundcontroller
1111
## Fabric: https://fabricmc.net/develop
1212
## ModMenu: https://maven.terraformersmc.com/com/terraformersmc/modmenu
1313

14-
modmenu_version=14.0.0-rc.2
14+
modmenu_version=15.0.0-beta.3
1515

16-
minecraft_version=1.21.5
17-
yarn_mappings=1.21.5+build.1
18-
loader_version=0.16.10
16+
minecraft_version=1.21.6
17+
yarn_mappings=1.21.6+build.1
18+
loader_version=0.16.14
19+
loom_version=1.10-SNAPSHOT
1920

2021
# Fabric API
21-
fabric_version=0.119.5+1.21.5
22+
fabric_version=0.127.1+1.21.6

src/main/java/com/bvengo/soundcontroller/gui/buttons/HoverableButtonWidget.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
import com.bvengo.soundcontroller.SoundController;
44
import net.fabricmc.api.EnvType;
55
import net.fabricmc.api.Environment;
6+
import net.minecraft.client.gl.RenderPipelines;
67
import net.minecraft.client.gui.DrawContext;
78
import net.minecraft.client.gui.widget.ButtonWidget;
8-
import net.minecraft.client.render.RenderLayer;
99
import net.minecraft.screen.ScreenTexts;
1010
import net.minecraft.util.Identifier;
1111

@@ -40,6 +40,6 @@ public void renderWidget(DrawContext context, int mouseX, int mouseY, float delt
4040
Identifier texture = isPressed ? (hovered ? ON_HOVER_TEXTURE : ON_TEXTURE)
4141
: (hovered ? OFF_HOVER_TEXTURE : OFF_TEXTURE);
4242

43-
context.drawGuiTexture(RenderLayer::getGuiTextured, texture, getX(), getY(), width, height);
43+
context.drawGuiTexture(RenderPipelines.GUI_TEXTURED, texture, getX(), getY(), width, height);
4444
}
4545
}

src/main/java/com/bvengo/soundcontroller/gui/buttons/ToggleButtonWidget.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,7 @@
11
package com.bvengo.soundcontroller.gui.buttons;
22

3-
import com.bvengo.soundcontroller.SoundController;
43
import net.fabricmc.api.EnvType;
54
import net.fabricmc.api.Environment;
6-
import net.minecraft.client.gui.DrawContext;
7-
import net.minecraft.client.gui.widget.ButtonWidget;
8-
import net.minecraft.client.render.RenderLayer;
9-
import net.minecraft.screen.ScreenTexts;
10-
import net.minecraft.util.Identifier;
115

126
/**
137
* Custom button widget that is used as a trigger rather than a toggle.

src/main/java/com/bvengo/soundcontroller/mixin/SoundSystemAccessor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ public interface SoundSystemAccessor {
1010
@Invoker("updateSoundVolume")
1111
void invokeUpdateSoundVolume(SoundCategory category, float volume);
1212

13-
@Invoker("getSoundVolume")
13+
@Invoker("method_72233")
1414
float invokeGetSoundVolume(SoundCategory category);
1515
}

src/main/java/com/bvengo/soundcontroller/mixin/SoundSystemMixin.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
@Mixin(SoundSystem.class)
1616
public class SoundSystemMixin {
17-
@WrapOperation(method = "play(Lnet/minecraft/client/sound/SoundInstance;)V", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/sound/SoundSystem;getAdjustedVolume(FLnet/minecraft/sound/SoundCategory;)F"))
17+
@WrapOperation(method = "play(Lnet/minecraft/client/sound/SoundInstance;)Lnet/minecraft/client/sound/SoundSystem$PlayResult;", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/sound/SoundSystem;getAdjustedVolume(FLnet/minecraft/sound/SoundCategory;)F"))
1818
private float modifyH(SoundSystem instance, float volume, SoundCategory category, Operation<Float> original, SoundInstance sound) {
1919
// h comes from getAdjustedVolume(float volume, Category category) - we can't inject there, because no ID is available
2020
return SoundController.CONFIG.getAdjustedVolume(sound, (SoundSystemAccessor) this);

src/main/java/com/bvengo/soundcontroller/mixin/SubtitlesHudMixin.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package com.bvengo.soundcontroller.mixin;
22

33
import com.bvengo.soundcontroller.SoundController;
4-
import com.llamalad7.mixinextras.injector.ModifyExpressionValue;
54
import com.llamalad7.mixinextras.injector.wrapoperation.Operation;
65
import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation;
76
import net.minecraft.client.gui.hud.SubtitlesHud;

src/main/resources/fabric.mod.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
],
2929
"depends": {
3030
"fabricloader": ">=0.16.0",
31-
"minecraft": ">=1.21.4",
31+
"minecraft": ">=1.21.6",
3232
"java": ">=21",
3333
"fabric-api": "*"
3434
},

0 commit comments

Comments
 (0)