Skip to content

Commit

Permalink
Fix crash on right click
Browse files Browse the repository at this point in the history
  • Loading branch information
samolego committed Dec 21, 2021
1 parent c58864d commit 088a1e9
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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);
}
Expand Down
4 changes: 4 additions & 0 deletions fabric/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
}
Expand Down
3 changes: 2 additions & 1 deletion fabric/src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down
5 changes: 5 additions & 0 deletions forge/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
}
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 088a1e9

Please sign in to comment.