Fix datagen resolving tags and exploding. (#6865)

This commit is contained in:
Cyborgmas authored and GitHub committed 2020-06-29 16:39:04 -07:00
1 parent 20d231bbed
commit d5aa0c4a91
19 files changed
+377 -19

No files matched your search

@@ -131,6 +131,7 @@ public class ForgeItemTagsProvider extends ItemTagsProvider
func_240522_a_(Tags.Items.SEEDS_MELON).func_240534_a_(Items.MELON_SEEDS);
func_240522_a_(Tags.Items.SEEDS_PUMPKIN).func_240534_a_(Items.PUMPKIN_SEEDS);
func_240522_a_(Tags.Items.SEEDS_WHEAT).func_240534_a_(Items.WHEAT_SEEDS);
func_240522_a_(Tags.Items.SHEARS).func_240534_a_(Items.SHEARS);
func_240522_a_(Tags.Items.SLIMEBALLS).func_240534_a_(Items.SLIME_BALL);
func_240521_a_(Tags.Blocks.STAINED_GLASS, Tags.Items.STAINED_GLASS);
func_240521_a_(Tags.Blocks.STAINED_GLASS_PANES, Tags.Items.STAINED_GLASS_PANES);
@@ -153,7 +153,7 @@ public class ForgeRecipeProvider extends RecipeProvider
boolean modified = false;
List<IItemList> items = new ArrayList<>();
IItemList[] vanillaItems = getField(Ingredient.class, vanilla, 3);
IItemList[] vanillaItems = getField(Ingredient.class, vanilla, 2); //This will probably crash between versions, if null fix index
for (IItemList entry : vanillaItems)
{
if (entry instanceof SingleItemList)
@@ -285,9 +285,16 @@ public class ModLoader
this.loadingWarnings.add(warning);
}
private static boolean runningDataGen = false;
public static boolean isDataGenRunning () {
return runningDataGen;
}
public void runDataGenerator(final Set<String> mods, final Path path, final Collection<Path> inputs, Collection<Path> existingPacks, final boolean serverGenerators, final boolean clientGenerators, final boolean devToolGenerators, final boolean reportsGenerator, final boolean structureValidator, final boolean flat) {
if (mods.contains("minecraft") && mods.size() == 1) return;
LOGGER.info("Initializing Data Gatherer for mods {}", mods);
runningDataGen = true;
Bootstrap.register();
dataGeneratorConfig = new GatherDataEvent.DataGeneratorConfig(mods, path, inputs, serverGenerators, clientGenerators, devToolGenerators, reportsGenerator, structureValidator, flat);
existingFileHelper = new ExistingFileHelper(existingPacks, structureValidator);