Skip to content

Commit

Permalink
fix crash
Browse files Browse the repository at this point in the history
  • Loading branch information
IThundxr committed Jan 1, 2025
1 parent 054c64f commit ad9ed08
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 1 deletion.
1 change: 1 addition & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ dependencies {
isChanging = true
isTransitive = false
}
modCompileOnly("maven.modrinth:dcintegration:WLOprDDs")

modCompileOnly("maven.modrinth:enchancement:1.20-26")

Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ org.gradle.jvmargs=-Xmx2G
org.gradle.caching = true

# Mod Properties
mod_version = 0.0.50
mod_version = 0.0.51
maven_group = dev.ithundxr
archives_base_name = RailwaysTweaks

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package dev.ithundxr.railwaystweaks.mixin.compat.dcintegration;

import com.llamalad7.mixinextras.injector.ModifyExpressionValue;
import de.erdbeerbaerlp.dcintegration.fabric.util.FabricMessageUtils;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;

@Mixin(FabricMessageUtils.class)
public class FabricMessageUtilsMixin {
@ModifyExpressionValue(method = "genItemStackEmbedIfAvailable", at = @At(value = "INVOKE", target = "Ljava/lang/StringBuilder;toString()Ljava/lang/String;"))
private static String railwaysTweaks$fixCrashWhenDescriptionIsNull(String original) {
return original == null ? "" : original;
}
}
1 change: 1 addition & 0 deletions src/main/resources/railwaystweaks.mixins.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"compat.appleskin.SyncHandlerMixin",
"compat.carryon.PlacementHandlerMixin",
"compat.dcintegration.DiscordEventListenerMixin",
"compat.dcintegration.FabricMessageUtilsMixin",
"compat.enchancement.SlideComponentMixin",
"compat.sereneseasons.RandomUpdateHandlerMixin",
"compat.tconstruct.LazyModifierMixin",
Expand Down

0 comments on commit ad9ed08

Please sign in to comment.