Skip to content

Commit

Permalink
added way to make any item remove the default mc durability tooltip
Browse files Browse the repository at this point in the history
  • Loading branch information
Trinsdar committed Aug 25, 2024
1 parent fa72ffc commit 41d606e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import muramasa.antimatter.client.RenderHelper;
import muramasa.antimatter.cover.IHaveCover;
import muramasa.antimatter.data.AntimatterDefaultTools;
import muramasa.antimatter.item.ICustomDurability;
import muramasa.antimatter.machine.BlockMachine;
import muramasa.antimatter.mixin.client.LevelRendererAccessor;
import muramasa.antimatter.mixin.client.MultiPlayerGameModeAccessor;
Expand Down Expand Up @@ -159,7 +160,7 @@ public static void onRenderDebugInfo(ArrayList<String> left) {

//TODO still needed?
public static void onItemTooltip(ItemStack stack, List<Component> tooltips, Player player, TooltipFlag flag) {
if (stack.getItem() instanceof IAntimatterTool tool){
if (stack.getItem() instanceof ICustomDurability tool){
int j = -1;
for (int i = 0; i < tooltips.size(); i++) {
Component component = tooltips.get(i);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package muramasa.antimatter.item;

public interface ICustomDurability {
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import muramasa.antimatter.behaviour.*;
import muramasa.antimatter.capability.energy.ItemEnergyHandler;
import muramasa.antimatter.datagen.providers.AntimatterItemModelProvider;
import muramasa.antimatter.item.ICustomDurability;
import muramasa.antimatter.item.ItemBattery;
import muramasa.antimatter.material.Material;
import muramasa.antimatter.material.MaterialTags;
Expand Down Expand Up @@ -54,7 +55,7 @@

import static muramasa.antimatter.material.Material.NULL;

public interface IAntimatterTool extends ISharedAntimatterObject, IBasicAntimatterTool, IEnergyItem {
public interface IAntimatterTool extends ISharedAntimatterObject, IBasicAntimatterTool, IEnergyItem, ICustomDurability {

AntimatterItemTier getAntimatterItemTier();

Expand Down

0 comments on commit 41d606e

Please sign in to comment.