Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
package com.robertx22.library_of_exile.registry;

import com.google.common.base.Preconditions;
import com.google.gson.Gson;
import com.google.gson.JsonElement;
import com.robertx22.library_of_exile.main.ExileLog;
import com.robertx22.library_of_exile.registry.loaders.BaseDataPackLoader;
import com.robertx22.library_of_exile.registry.serialization.ISerializable;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.server.packs.resources.ResourceManager;
import net.minecraftforge.event.AddReloadListenerEvent;
import net.minecraftforge.fml.ModList;

Expand Down Expand Up @@ -108,6 +112,8 @@ public ExileDatapackGenerator getDatapackGenerator() {
return new ExileDatapackGenerator<>(modid, getAllForSerialization(), this.id);
}

public void injectResources(ResourceManager manager, String name, Gson gson, Map<ResourceLocation, JsonElement> output) {
}

public List getAllForSerialization() {
return Database.getRegistry(this)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,10 @@ public enum LoaderType {

@Override
protected Map<ResourceLocation, JsonElement> prepare(ResourceManager manager, ProfilerFiller profiler) {


return super.prepare(manager, profiler);
Map<ResourceLocation, JsonElement> map = new HashMap();
scanDirectory(manager, id, GSON, map);
registryType.injectResources(manager, id, GSON, map);
return map;
}

public static String ENABLED = "enabled";
Expand Down