diff --git a/common/src/main/java/org/samo_lego/tradernpcs/gui/TradeGUI.java b/common/src/main/java/org/samo_lego/tradernpcs/gui/TradeGUI.java index 52b6681..034158f 100644 --- a/common/src/main/java/org/samo_lego/tradernpcs/gui/TradeGUI.java +++ b/common/src/main/java/org/samo_lego/tradernpcs/gui/TradeGUI.java @@ -4,6 +4,7 @@ import net.minecraft.server.level.ServerPlayer; import org.samo_lego.tradernpcs.profession.TraderNPCProfession; + public class TradeGUI extends MerchantGui { /** * Constructs a new simple container gui for the supplied player. @@ -12,7 +13,7 @@ public class TradeGUI extends MerchantGui { */ public TradeGUI(TraderNPCProfession profession, ServerPlayer player) { super(player, false); - this.setTitle(profession.getNpc().getName().copy()); + this.setTitle(profession.getNpc().getDisplayName()); profession.getTrades().forEach(this::addTrade); } diff --git a/fabric/build.gradle b/fabric/build.gradle index 3e1d5f3..855e29b 100644 --- a/fabric/build.gradle +++ b/fabric/build.gradle @@ -26,6 +26,10 @@ dependencies { modImplementation "net.fabricmc:fabric-loader:${rootProject.loader_version}" modApi "net.fabricmc.fabric-api:fabric-api:${rootProject.fabric_version}" + // Taterzens + // We need this for profession API + modCompileOnly("com.github.samolego.Taterzens:taterzens-fabric:${project.taterzens}") + common(project(path: ":common", configuration: "namedElements")) { transitive false } shadowCommon(project(path: ":common", configuration: "transformProductionFabric")) { transitive false } } diff --git a/fabric/src/main/resources/fabric.mod.json b/fabric/src/main/resources/fabric.mod.json index 92b7c9a..42fa325 100644 --- a/fabric/src/main/resources/fabric.mod.json +++ b/fabric/src/main/resources/fabric.mod.json @@ -23,7 +23,8 @@ "mixins": ["tradernpcs-common.mixins.json"], "depends": { "fabric": "*", - "minecraft": ">=1.17.1" + "minecraft": ">=1.17.1", + "taterzens": ">=1.6.1" }, "recommends": { "taterzens": ">=${taterzens}" diff --git a/forge/build.gradle b/forge/build.gradle index 9aba877..baa4d05 100644 --- a/forge/build.gradle +++ b/forge/build.gradle @@ -30,6 +30,11 @@ configurations { dependencies { forge "net.minecraftforge:forge:${rootProject.minecraft_version}-${rootProject.forge_version}" + // Taterzens + // We need this for profession API + //modCompileOnly("com.github.samolego.Taterzens:taterzens-fabric:${project.taterzens}") + modCompileOnly("com.github.samolego.Taterzens:taterzens-forge:47bd17b207") + common(project(path: ":common", configuration: "namedElements")) { transitive false } shadowCommon(project(path: ":common", configuration: "transformProductionForge")) { transitive false } } diff --git a/gradle.properties b/gradle.properties index 4b1e8f0..f24bed1 100644 --- a/gradle.properties +++ b/gradle.properties @@ -11,7 +11,7 @@ fabric_version=0.44.0+1.18 #Forge forge_version=39.0.5 -mod_version = 1.0.2 +mod_version = 1.0.3 maven_group = org.samo_lego archives_base_name = tradernpcs