Skip to content

Commit

Permalink
Fixed Quilt resource loading issue, bumped version to 1.7.1
Browse files Browse the repository at this point in the history
  • Loading branch information
apace100 committed Oct 23, 2022
1 parent fbd46ef commit 9f6da2a
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 8 deletions.
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ org.gradle.jvmargs=-Xmx4G
loader_version=0.14.9

# Mod Properties
mod_version = 1.7.0
mod_version = 1.7.1
maven_group = com.github.apace100
archives_base_name = Origins-1.19.2

# Dependencies
fabric_version=0.60.0+1.19.2
cca_version=5.0.1
apoli_version=v2.6.0
apoli_version=624eb4d094
reach_version=2.3.0
clothconfig_version=7.0.65
modmenu_version=3.1.0
2 changes: 1 addition & 1 deletion jitpack.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
before_install:
- wget https://github.com/sormuras/bach/raw/master/install-jdk.sh
- wget https://github.com/sormuras/bach/raw/releases/11/install-jdk.sh
- source install-jdk.sh --feature 17
9 changes: 7 additions & 2 deletions src/main/java/io/github/apace100/origins/Origins.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import com.google.gson.JsonPrimitive;
import io.github.apace100.apoli.Apoli;
import io.github.apace100.apoli.power.PowerType;
import io.github.apace100.apoli.power.PowerTypes;
import io.github.apace100.apoli.util.NamespaceAlias;
import io.github.apace100.calio.mixin.CriteriaRegistryInvoker;
import io.github.apace100.calio.resource.OrderedResourceListenerInitializer;
Expand All @@ -27,6 +28,7 @@
import me.shedaniel.autoconfig.serializer.ConfigSerializer;
import net.fabricmc.api.ModInitializer;
import net.fabricmc.fabric.api.command.v2.CommandRegistrationCallback;
import net.fabricmc.fabric.api.resource.IdentifiableResourceReloadListener;
import net.fabricmc.loader.api.FabricLoader;
import net.minecraft.resource.ResourceType;
import net.minecraft.util.Identifier;
Expand Down Expand Up @@ -107,12 +109,15 @@ public void registerResourceListeners(OrderedResourceListenerManager manager) {
Identifier powerData = Apoli.identifier("powers");
Identifier originData = Origins.identifier("origins");

manager.register(ResourceType.SERVER_DATA, new OriginManager()).after(powerData).complete();
OriginManager originLoader = new OriginManager();
manager.register(ResourceType.SERVER_DATA, originLoader).after(powerData).complete();
manager.register(ResourceType.SERVER_DATA, new OriginLayers()).after(originData).complete();

BadgeManager.init();

manager.register(ResourceType.SERVER_DATA, BadgeManager.REGISTRY.getLoader()).before(powerData).complete();
IdentifiableResourceReloadListener badgeLoader = BadgeManager.REGISTRY.getLoader();
manager.register(ResourceType.SERVER_DATA, badgeLoader).before(powerData).complete();
PowerTypes.DEPENDENCIES.add(badgeLoader.getFabricId());
}

@Config(name = Origins.MODID + "_server")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,4 +99,9 @@ public static void add(OriginLayer layer) {
public Identifier getFabricId() {
return new Identifier(Origins.MODID, "origin_layers");
}

@Override
public Collection<Identifier> getFabricDependencies() {
return Set.of(Origins.identifier("origins"));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.JsonElement;
import io.github.apace100.apoli.Apoli;
import io.github.apace100.apoli.power.PowerType;
import io.github.apace100.calio.data.MultiJsonDataLoader;
import io.github.apace100.origins.Origins;
Expand All @@ -11,9 +12,7 @@
import net.minecraft.util.Identifier;
import net.minecraft.util.profiler.Profiler;

import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.*;
import java.util.concurrent.atomic.AtomicBoolean;

public class OriginManager extends MultiJsonDataLoader implements IdentifiableResourceReloadListener {
Expand Down Expand Up @@ -69,4 +68,9 @@ protected void apply(Map<Identifier, List<JsonElement>> loader, ResourceManager
public Identifier getFabricId() {
return new Identifier(Origins.MODID, "origins");
}

@Override
public Collection<Identifier> getFabricDependencies() {
return Set.of(Apoli.identifier("powers"));
}
}

0 comments on commit 9f6da2a

Please sign in to comment.