Skip to content

Commit

Permalink
fix: import crash
Browse files Browse the repository at this point in the history
  • Loading branch information
bconlon1 committed Sep 29, 2024
1 parent 887f55b commit 697ce60
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

import com.aetherteam.nitrogen.Nitrogen;
import net.minecraft.client.resources.language.I18n;
import net.minecraft.core.registries.BuiltInRegistries;
import net.minecraft.network.chat.Component;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.item.ItemStack;
import net.minecraftforge.event.entity.player.ItemTooltipEvent;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.registries.ForgeRegistries;

import java.util.HashMap;
import java.util.List;
Expand All @@ -32,7 +32,7 @@ public static void addAbilityTooltips(Player player, ItemStack stack, List<Compo
String string = stack.getDescriptionId() + "." + Nitrogen.MODID + ".ability.tooltip." + i;
if (I18n.exists(string)) {
Component component = Component.translatable(string);
ResourceLocation location = BuiltInRegistries.ITEM.getKey(stack.getItem());
ResourceLocation location = ForgeRegistries.ITEMS.getKey(stack.getItem());
if (PREDICATES.containsKey(location)) {
component = PREDICATES.get(location).override(player, stack, components, component);
}
Expand Down

0 comments on commit 697ce60

Please sign in to comment.