diff --git a/build.gradle b/build.gradle index 9017231..c8ae4cc 100644 --- a/build.gradle +++ b/build.gradle @@ -11,7 +11,7 @@ apply plugin: 'net.minecraftforge.gradle.forge' //Only edit below this line, the above code adds and enables the necessary things for Forge to be setup. -version = "1.12-forge14.21.1.2387-1.3" +version = "1.12-forge14.21.1.2387-1.3.1" group = "de.guntram.mcmod.easiervillagertrading" // http://maven.apache.org/guides/mini/guide-naming-conventions.html archivesBaseName = "easiervillagertrading" diff --git a/src/main/java/de/guntram/mcmod/easiervillagertrading/BetterGuiMerchant.java b/src/main/java/de/guntram/mcmod/easiervillagertrading/BetterGuiMerchant.java index eb61fb3..f3df44a 100644 --- a/src/main/java/de/guntram/mcmod/easiervillagertrading/BetterGuiMerchant.java +++ b/src/main/java/de/guntram/mcmod/easiervillagertrading/BetterGuiMerchant.java @@ -70,7 +70,7 @@ protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY) // System.out.println("drawForegroundLayer"); } super.drawGuiContainerForegroundLayer(mouseX, mouseY); - MerchantRecipeList trades=getMerchant().getRecipes(null); + MerchantRecipeList trades=getMerchant().getRecipes(mc.player); if (trades==null) return; int topAdjust=getTopAdjust(trades.size()); @@ -225,7 +225,7 @@ protected void mouseClicked(final int mouseX, final int mouseY, final int mouseB && (mouseX - this.guiLeft) >= xBase && (mouseX - this.guiLeft) <= xBase+textXpos ) { - MerchantRecipeList trades=getMerchant().getRecipes(null); + MerchantRecipeList trades=getMerchant().getRecipes(mc.player); if (trades==null) return; int numTrades=trades.size(); @@ -279,7 +279,7 @@ public void handleMouseInput() throws IOException public void mouseScrolled(int delta) { // System.out.println("scrolled by "+delta); MerchantRecipeList trades; - if ((trades=getMerchant().getRecipes(null))!=null) { + if ((trades=getMerchant().getRecipes(mc.player))!=null) { scrollCount-=(int)delta; while ((trades.size()-scrollCount)*lineHeight + titleDistance*2 < height) { scrollCount--;