public class ModBlockLootTableProvider extends BlockLootSubProvider { public ModBlockLootTableProvider(HolderLookup.Provider provider) { super(Set.of(), FeatureFlags.REGISTRY.allFlags(), provider); }
}
} Cannot resolve symbol 'BlockStateProvider' Cannot resolve symbol 'ConfiguredModel' Cannot resolve symbol 'ModelFile' Cannot resolve symbol 'ExistingFileHelper' Cannot resolve symbol 'BlockStateProvider' Cannot resolve symbol 'ExistingFileHelper' Cannot resolve method 'super' in 'ModBlockStateProvider' Cannot resolve method 'getVariantBuilder' in 'ModBlockStateProvider' Cannot resolve symbol 'ConfiguredModel' Cannot resolve symbol 'ModelFile' Cannot resolve method 'modLoc' in 'ModBlockStateProvider' Cannot resolve method 'itemModels' in 'ModBlockStateProvider' Cannot resolve method 'modLoc' in 'ModBlockStateProvider'
this.tag(BlockTags.WOOL);
for (PedestalVariant variant : PedestalVariants.VARIANTS) {
Block block = ModBlocks.REGISTERED_VARIANT_MAP.get(variant).get();
String name = variant.registryName();
if (name.contains("wool")) {
this.tag(BlockTags.WOOL).add(block);
} else if (name.contains("soul")) {
this.tag(BlockTags.MINEABLE_WITH_SHOVEL).add(block);
} else if (name.contains("log") || name.contains("planks")) {
this.tag(BlockTags.MINEABLE_WITH_AXE).add(block);
} else {
this.tag(BlockTags.MINEABLE_WITH_PICKAXE).add(block);
}
}
this.tag(Tags.Blocks.NEEDS_WOOD_TOOL)
.add(ModBlocks.PEDESTAL.get());
for (PedestalVariant variant : PedestalVariants.VARIANTS) {
this.tag(Tags.Blocks.NEEDS_WOOD_TOOL)
.add(ModBlocks.REGISTERED_VARIANT_MAP.get(variant).get());
}
// this.tag(BlockTags.NEEDS_DIAMOND_TOOL)
// .add(ModBlocks.OBSIDIAN_PEDESTAL.get(), ModBlocks.CRYING_OBSIDIAN_PEDESTAL.get());
}
} Cannot resolve symbol 'ExistingFileHelper' Cannot resolve symbol 'ExistingFileHelper' Expected 3 arguments but found 4
Assistant
The errors you're encountering are due to changes in NeoForge's data generation API between versions 1.21 and 1.21.5. Let me help you fix these issues:
Main Issues and Fixes:
ExistingFileHelper Removal:
ExistingFileHelper has been removed in newer versions of NeoForge. You'll need to remove all references to it.
GatherDataEvent Changes:
The methods includeClient() and includeServer() have been removed. You should use the new DataGenerator methods instead.
BlockStateProvider Changes:
The block state provider API has been updated. You'll need to adjust your implementation.
Removed all ExistingFileHelper references as it's no longer needed
Updated the DataGenerator to use the new provider registration methods
Simplified the BlockStateProvider implementation to use the new API
Updated the BlockTagsProvider constructor to match the new signature
Changed model registration to use the new simpleBlock and simpleBlockItem methods
Updated the modLoc references to use ResourceLocation directly
These changes should resolve all the compilation errors you were seeing. The data generation system in NeoForge 1.21.5 has been simplified and some of the helper classes have been removed or changed significantly.