25 lines
771 B
Java
25 lines
771 B
Java
package xyz.pixelatedw.betterbeta.mixin;
|
|
|
|
import java.io.File;
|
|
|
|
import org.spongepowered.asm.mixin.Mixin;
|
|
import org.spongepowered.asm.mixin.injection.At;
|
|
import org.spongepowered.asm.mixin.injection.Inject;
|
|
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
|
|
|
import net.minecraft.client.Minecraft;
|
|
|
|
@Mixin(Minecraft.class)
|
|
public class MinecraftMixin {
|
|
@Inject(method = "loadSoundFromDir", at = @At("HEAD"))
|
|
public void loadSoundFromDir(String string, File file, CallbackInfo ci) {
|
|
Minecraft mc = (Minecraft) (Object) this;
|
|
int split = string.indexOf("/");
|
|
String type = string.substring(0, split);
|
|
String newSound = string.substring(split + 1);
|
|
if (type.equalsIgnoreCase("sound3")) {
|
|
mc.soundHelper.method_2011(newSound, file);
|
|
}
|
|
}
|
|
}
|