Skip to content

Commit

Permalink
Fix items sometimes failing to apply UUID correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
stefvanschie committed Feb 2, 2021
1 parent ab573eb commit 9212d76
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,10 @@ public GuiItem(@NotNull ItemStack item, @Nullable Consumer<InventoryClickEvent>
this.action = action;
this.visible = true;
this.properties = new ArrayList<>();
this.item = item;

//remove this call after the removal of InventoryComponent#setItem(ItemStack, int, int)
applyUUID();

this.item = item;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ public void display(@NotNull InventoryComponent inventoryComponent, int paneOffs
int finalRow = getY() + newY + paneOffsetY;
int finalColumn = getX() + newX + paneOffsetX;

inventoryComponent.setItem(item.getItem(), finalColumn, finalRow);
inventoryComponent.setItem(item, finalColumn, finalRow);
}

int gapCount = gap;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public void display(@NotNull InventoryComponent inventoryComponent, int paneOffs
int finalRow = getY() + y + paneOffsetY;
int finalColumn = getX() + x + paneOffsetX;

inventoryComponent.setItem(item.getItem(), finalColumn, finalRow);
inventoryComponent.setItem(item, finalColumn, finalRow);
});
}

Expand Down

0 comments on commit 9212d76

Please sign in to comment.