Skip to content

Commit

Permalink
fix: 🐛 Fixed backpacks to show their UUID in advanced tooltips
Browse files Browse the repository at this point in the history
  • Loading branch information
P3pp3rF1y committed Jan 16, 2025
1 parent 08437b7 commit f3e79e4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ loader_version_range=[4,)
mod_id=sophisticatedbackpacks
mod_name=Sophisticated Backpacks
mod_license=GNU General Public License v3.0
mod_version=3.22.4
mod_version=3.22.5
mod_group_id=sophisticatedbackpacks
mod_authors=P3pp3rF1y, Ridanisaurus
mod_description=Fancy and functional backpacks.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,9 @@ public void addCreativeTabItems(Consumer<ItemStack> itemConsumer) {
}

@Override
public void appendHoverText(ItemStack stack, Item.TooltipContext context, List<Component> tooltip, TooltipFlag flagIn) {
super.appendHoverText(stack, context, tooltip, flagIn);
if (flagIn == TooltipFlag.ADVANCED) {
public void appendHoverText(ItemStack stack, Item.TooltipContext context, List<Component> tooltip, TooltipFlag tooltipFlag) {
super.appendHoverText(stack, context, tooltip, tooltipFlag);
if (tooltipFlag.isAdvanced()) {
BackpackWrapper.fromStack(stack).getContentsUuid()
.ifPresent(uuid -> tooltip.add(Component.literal("UUID: " + uuid).withStyle(ChatFormatting.DARK_GRAY)));
}
Expand Down

0 comments on commit f3e79e4

Please sign in to comment.