Skip to content
This repository has been archived by the owner on Jun 23, 2024. It is now read-only.

Commit

Permalink
hopefully bugfix incompatibility with Infinite Trading
Browse files Browse the repository at this point in the history
  • Loading branch information
gbl committed Apr 30, 2020
1 parent 3341a9d commit 9ed9295
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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--;
Expand Down

0 comments on commit 9ed9295

Please sign in to comment.