diff --git a/NeoForge/src/main/java/com/autovw/advancednetherite/datagen/ModDataGenerator.java b/NeoForge/src/main/java/com/autovw/advancednetherite/datagen/ModDataGenerator.java index cfb0a78..4dbe8a6 100644 --- a/NeoForge/src/main/java/com/autovw/advancednetherite/datagen/ModDataGenerator.java +++ b/NeoForge/src/main/java/com/autovw/advancednetherite/datagen/ModDataGenerator.java @@ -9,7 +9,6 @@ import net.neoforged.api.distmarker.Dist; import net.neoforged.bus.api.SubscribeEvent; import net.neoforged.fml.common.EventBusSubscriber; -import net.neoforged.neoforge.common.data.ExistingFileHelper; import net.neoforged.neoforge.data.event.GatherDataEvent; import java.util.concurrent.CompletableFuture; @@ -37,16 +36,15 @@ public static void onGatherData(final GatherDataEvent.Client event) DataGenerator generator = event.getGenerator(); PackOutput packOutput = generator.getPackOutput(); CompletableFuture lookupProvider = event.getLookupProvider(); - ExistingFileHelper helper = event.getExistingFileHelper(); - ModBlockTagsProvider blockTagsProvider = new ModBlockTagsProvider(packOutput, lookupProvider, AdvancedNetherite.MOD_ID, helper); + ModBlockTagsProvider blockTagsProvider = new ModBlockTagsProvider(packOutput, lookupProvider, AdvancedNetherite.MOD_ID); // server event.addProvider(blockTagsProvider); - event.addProvider(new ModItemTagsProvider(packOutput, lookupProvider, blockTagsProvider.contentsGetter(), AdvancedNetherite.MOD_ID, helper)); - event.addProvider(new ModEnchantmentTagsProvider(packOutput, lookupProvider, AdvancedNetherite.MOD_ID, helper)); + event.addProvider(new ModItemTagsProvider(packOutput, lookupProvider, blockTagsProvider.contentsGetter(), AdvancedNetherite.MOD_ID)); + event.addProvider(new ModEnchantmentTagsProvider(packOutput, lookupProvider, AdvancedNetherite.MOD_ID)); event.addProvider(new ModRecipeProvider.Runner(packOutput, lookupProvider)); event.addProvider(new ModLootTableProvider(packOutput, lookupProvider)); - event.addProvider(new ModAdvancementProvider(packOutput, lookupProvider, helper)); + event.addProvider(new ModAdvancementProvider(packOutput, lookupProvider)); event.addProvider(new ModLootModifierProvider(packOutput, lookupProvider, AdvancedNetherite.MOD_ID)); // client diff --git a/NeoForge/src/main/java/com/autovw/advancednetherite/datagen/providers/ModAdvancementProvider.java b/NeoForge/src/main/java/com/autovw/advancednetherite/datagen/providers/ModAdvancementProvider.java index c8abaaa..e89d618 100644 --- a/NeoForge/src/main/java/com/autovw/advancednetherite/datagen/providers/ModAdvancementProvider.java +++ b/NeoForge/src/main/java/com/autovw/advancednetherite/datagen/providers/ModAdvancementProvider.java @@ -9,10 +9,10 @@ import net.minecraft.advancements.critereon.InventoryChangeTrigger; import net.minecraft.core.HolderLookup; import net.minecraft.data.PackOutput; +import net.minecraft.data.advancements.AdvancementProvider; +import net.minecraft.data.advancements.AdvancementSubProvider; import net.minecraft.network.chat.Component; import net.minecraft.resources.ResourceLocation; -import net.neoforged.neoforge.common.data.AdvancementProvider; -import net.neoforged.neoforge.common.data.ExistingFileHelper; import java.util.List; import java.util.concurrent.CompletableFuture; @@ -23,15 +23,15 @@ */ public class ModAdvancementProvider extends AdvancementProvider { - public ModAdvancementProvider(PackOutput packOutput, CompletableFuture registries, ExistingFileHelper existingFileHelper) + public ModAdvancementProvider(PackOutput packOutput, CompletableFuture registries) { - super(packOutput, registries, existingFileHelper, List.of(new ModNetherAdvancements())); + super(packOutput, registries, List.of(new ModNetherAdvancements())); } - public static class ModNetherAdvancements implements AdvancementGenerator + public static class ModNetherAdvancements implements AdvancementSubProvider { @Override - public void generate(HolderLookup.Provider registries, Consumer consumer, ExistingFileHelper fileHelper) + public void generate(HolderLookup.Provider registries, Consumer consumer) { Advancement.Builder.advancement() .parent(ResourceLocation.withDefaultNamespace("husbandry/obtain_netherite_hoe")) diff --git a/NeoForge/src/main/java/com/autovw/advancednetherite/datagen/providers/ModBlockTagsProvider.java b/NeoForge/src/main/java/com/autovw/advancednetherite/datagen/providers/ModBlockTagsProvider.java index 733be7f..4364402 100644 --- a/NeoForge/src/main/java/com/autovw/advancednetherite/datagen/providers/ModBlockTagsProvider.java +++ b/NeoForge/src/main/java/com/autovw/advancednetherite/datagen/providers/ModBlockTagsProvider.java @@ -6,8 +6,6 @@ import net.minecraft.data.PackOutput; import net.minecraft.tags.BlockTags; import net.neoforged.neoforge.common.data.BlockTagsProvider; -import net.neoforged.neoforge.common.data.ExistingFileHelper; -import org.jetbrains.annotations.Nullable; import java.util.concurrent.CompletableFuture; @@ -16,9 +14,9 @@ */ public class ModBlockTagsProvider extends BlockTagsProvider { - public ModBlockTagsProvider(PackOutput packOutput, CompletableFuture lookupProvider, String modId, @Nullable ExistingFileHelper existingFileHelper) + public ModBlockTagsProvider(PackOutput packOutput, CompletableFuture lookupProvider, String modId) { - super(packOutput, lookupProvider, modId, existingFileHelper); + super(packOutput, lookupProvider, modId); } @Override diff --git a/NeoForge/src/main/java/com/autovw/advancednetherite/datagen/providers/ModEnchantmentTagsProvider.java b/NeoForge/src/main/java/com/autovw/advancednetherite/datagen/providers/ModEnchantmentTagsProvider.java index 51c5a2e..d8ce33d 100644 --- a/NeoForge/src/main/java/com/autovw/advancednetherite/datagen/providers/ModEnchantmentTagsProvider.java +++ b/NeoForge/src/main/java/com/autovw/advancednetherite/datagen/providers/ModEnchantmentTagsProvider.java @@ -5,8 +5,6 @@ import net.minecraft.data.PackOutput; import net.minecraft.data.tags.EnchantmentTagsProvider; import net.minecraft.world.item.enchantment.Enchantments; -import net.neoforged.neoforge.common.data.ExistingFileHelper; -import org.jetbrains.annotations.Nullable; import java.util.concurrent.CompletableFuture; @@ -15,9 +13,9 @@ */ public class ModEnchantmentTagsProvider extends EnchantmentTagsProvider { - public ModEnchantmentTagsProvider(PackOutput output, CompletableFuture registries, String modId, @Nullable ExistingFileHelper existingFileHelper) + public ModEnchantmentTagsProvider(PackOutput output, CompletableFuture registries, String modId) { - super(output, registries, modId, existingFileHelper); + super(output, registries, modId); } @Override diff --git a/NeoForge/src/main/java/com/autovw/advancednetherite/datagen/providers/ModItemTagsProvider.java b/NeoForge/src/main/java/com/autovw/advancednetherite/datagen/providers/ModItemTagsProvider.java index 64927d2..4e3f03f 100644 --- a/NeoForge/src/main/java/com/autovw/advancednetherite/datagen/providers/ModItemTagsProvider.java +++ b/NeoForge/src/main/java/com/autovw/advancednetherite/datagen/providers/ModItemTagsProvider.java @@ -9,8 +9,6 @@ import net.minecraft.tags.ItemTags; import net.minecraft.world.item.Items; import net.minecraft.world.level.block.Block; -import net.neoforged.neoforge.common.data.ExistingFileHelper; -import org.jetbrains.annotations.Nullable; import java.util.concurrent.CompletableFuture; @@ -19,9 +17,9 @@ */ public class ModItemTagsProvider extends ItemTagsProvider { - public ModItemTagsProvider(PackOutput packOutput, CompletableFuture lookupProvider, CompletableFuture> blockTagsProvider, String modId, @Nullable ExistingFileHelper existingFileHelper) + public ModItemTagsProvider(PackOutput packOutput, CompletableFuture lookupProvider, CompletableFuture> blockTagsProvider, String modId) { - super(packOutput, lookupProvider, blockTagsProvider, modId, existingFileHelper); + super(packOutput, lookupProvider, blockTagsProvider, modId); } @Override diff --git a/NeoForge/src/main/resources/META-INF/neoforge.mods.toml b/NeoForge/src/main/resources/META-INF/neoforge.mods.toml index 01d19d4..dda7aea 100644 --- a/NeoForge/src/main/resources/META-INF/neoforge.mods.toml +++ b/NeoForge/src/main/resources/META-INF/neoforge.mods.toml @@ -23,7 +23,7 @@ Visit the GitHub Wiki for more information on everything this mod adds. # 'required' requires the mod to exist, 'optional' does not # 'incompatible' will prevent the game from loading when the mod exists, and 'discouraged' will show a warning type="required" - versionRange="[21.4.41-beta,)" + versionRange="[21.4.47-beta,)" ordering="NONE" side="BOTH" [[dependencies.advancednetherite]]