Skip to content

Commit

Permalink
Fix tooltips
Browse files Browse the repository at this point in the history
  • Loading branch information
WenXin20 committed Jul 21, 2024
1 parent 486c454 commit 431261b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 0 additions & 4 deletions src/main/java/com/wenxin2/warp_pipes/items/LinkerItem.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.wenxin2.warp_pipes.items;

import com.mojang.logging.LogUtils;
import com.wenxin2.warp_pipes.blocks.ClearWarpPipeBlock;
import com.wenxin2.warp_pipes.blocks.WarpPipeBlock;
import com.wenxin2.warp_pipes.blocks.entities.WarpPipeBlockEntity;
Expand All @@ -16,10 +15,7 @@
import net.minecraft.core.GlobalPos;
import net.minecraft.core.particles.ParticleOptions;
import net.minecraft.core.particles.ParticleTypes;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.nbt.NbtOps;
import net.minecraft.network.chat.Component;
import net.minecraft.resources.ResourceKey;
import net.minecraft.sounds.SoundEvent;
import net.minecraft.sounds.SoundSource;
import net.minecraft.util.RandomSource;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/wenxin2/warp_pipes/items/WrenchItem.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public WrenchItem(Item.Properties properties, Tier tier, Tool toolComponentData)
}

@Override
public void appendHoverText(ItemStack stack, @org.jetbrains.annotations.Nullable Level world, List<Component> list, TooltipFlag tooltip) {
public void appendHoverText(ItemStack stack, Item.TooltipContext tooltipContext, List<Component> list, TooltipFlag tooltip) {

list.add(Component.literal(""));

Expand All @@ -48,7 +48,7 @@ public void appendHoverText(ItemStack stack, @org.jetbrains.annotations.Nullable
list.add(Component.translatable(this.getDescriptionId() + ".tooltip").withStyle(ChatFormatting.GRAY).withStyle(ChatFormatting.ITALIC));
}

super.appendHoverText(stack, world, list, tooltip);
super.appendHoverText(stack, tooltipContext, list, tooltip);
}

@Override
Expand Down

0 comments on commit 431261b

Please sign in to comment.