diff --git a/src/main/java/codechicken/lib/datagen/LanguageProvider.java b/src/main/java/codechicken/lib/datagen/LanguageProvider.java index b7862be5..87e232c3 100644 --- a/src/main/java/codechicken/lib/datagen/LanguageProvider.java +++ b/src/main/java/codechicken/lib/datagen/LanguageProvider.java @@ -10,6 +10,7 @@ import net.minecraft.world.item.Item; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.enchantment.Enchantment; +import net.minecraft.world.level.ItemLike; import net.minecraft.world.level.block.Block; import net.minecraftforge.data.event.GatherDataEvent; @@ -72,6 +73,7 @@ private void save(CachedOutput cache, Object object, Path target) { //@formatter:off public void add(Block key, String name) { add(key.getDescriptionId(), name); } public void add(Item key, String name) { add(key.getDescriptionId(), name); } + public void add(Supplier key, String name) { add(key.get().asItem(), name); } public void add(ItemStack key, String name) { add(key.getDescriptionId(), name); } public void add(Enchantment key, String name) { add(key.getDescriptionId(), name); } public void add(MobEffect key, String name) { add(key.getDescriptionId(), name); }