Skip to content

Commit

Permalink
Update DataGenerators.java
Browse files Browse the repository at this point in the history
  • Loading branch information
SammySemicolon committed Oct 28, 2024
1 parent fe55e62 commit 889b3de
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions src/main/java/com/sammy/malum/data/DataGenerators.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,26 @@ public class DataGenerators {

@SubscribeEvent
public static void gatherData(GatherDataEvent event) {
DataGenerator generator = event.getGenerator();
PackOutput output = generator.getPackOutput();
CompletableFuture<HolderLookup.Provider> provider = event.getLookupProvider();
ExistingFileHelper helper = event.getExistingFileHelper();
var generator = event.getGenerator();
var output = generator.getPackOutput();
var provider = event.getLookupProvider();
var helper = event.getExistingFileHelper();

MalumItemModels itemModelsProvider = new MalumItemModels(output, helper);
MalumBlockTags blockTagsProvider = new MalumBlockTags(output, provider, helper);
var itemModelsProvider = new MalumItemModels(output, helper);
var blockStatesProvider = new MalumBlockStates(output, helper, itemModelsProvider);

var blockTagsProvider = new MalumBlockTags(output, provider, helper);
var itemTagsProvider = new MalumItemTags(output, provider, blockTagsProvider.contentsGetter(), helper);

// generator.addProvider(event.includeClient(), new MalumFusionBlockModels(output));

generator.addProvider(event.includeClient(), new MalumBlockStates(output, helper, itemModelsProvider));
generator.addProvider(event.includeClient(), itemModelsProvider);

generator.addProvider(event.includeClient(), blockStatesProvider);

generator.addProvider(event.includeServer(), blockTagsProvider);
generator.addProvider(event.includeServer(), itemTagsProvider);

generator.addProvider(event.includeServer(), new MalumBlockLootTables(output));
generator.addProvider(event.includeServer(), new MalumItemTags(output, provider, blockTagsProvider.contentsGetter(), helper));

generator.addProvider(event.includeServer(), new MalumRecipes(output));

Expand Down

0 comments on commit 889b3de

Please sign in to comment.