fix: Jade crash sometimes causing resource reload failures

This commit is contained in:
Linnea Gräf
2025-06-05 19:31:34 +02:00
parent 620d189084
commit 120fba3bbc
3 changed files with 9 additions and 1 deletions

View File

@@ -126,6 +126,7 @@ fun innerJarsOf(name: String, dependency: Dependency): Provider<FileTree> {
val collectTranslations by tasks.registering(CollectTranslations::class) {
this.baseTranslations.from(file("translations/en_us.json"))
this.baseTranslations.from(file("translations/extra.json"))
this.classes.from(sourceSets.main.get().kotlin.classesDirectory)
}

View File

@@ -16,7 +16,8 @@ import org.spongepowered.asm.mixin.injection.At;
@Mixin(ClientPlayerInteractionManager.class)
public class ReplaceBlockHitSoundPatch {
@WrapOperation(method = "updateBlockBreakingProgress", at = @At(value = "NEW", target = "(Lnet/minecraft/sound/SoundEvent;Lnet/minecraft/sound/SoundCategory;FFLnet/minecraft/util/math/random/Random;Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/client/sound/PositionedSoundInstance;"))
@WrapOperation(method = "updateBlockBreakingProgress",
at = @At(value = "NEW", target = "(Lnet/minecraft/sound/SoundEvent;Lnet/minecraft/sound/SoundCategory;FFLnet/minecraft/util/math/random/Random;Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/client/sound/PositionedSoundInstance;"))
private PositionedSoundInstance replaceSound(
SoundEvent sound, SoundCategory category, float volume, float pitch,
Random random, BlockPos pos, Operation<PositionedSoundInstance> original,

6
translations/extra.json Normal file
View File

@@ -0,0 +1,6 @@
{
// These are require by jade, but i don't think they are actually rendered in game.
// Jade throws exceptions if they are not present however.
"config.jade.plugin_firmament.toolprovider": "Firmament Tool Provider",
"config.jade.plugin_firmament.custom_mining_hardness": "Firmament Mining Hardness"
}