Fix some tag references and fix diets not loading

This commit is contained in:
Sollace 2024-04-05 15:07:07 +01:00
parent eeded18c36
commit 56e91629b1
No known key found for this signature in database
GPG key ID: E52FACE7B5C773DB
3 changed files with 15 additions and 15 deletions

View file

@ -35,7 +35,7 @@ public class DietsLoader implements IdentifiableResourceReloadListener {
CompletableFuture<Map<Identifier, Effect>> foodGroupsFuture = CompletableFuture.supplyAsync(() -> { CompletableFuture<Map<Identifier, Effect>> foodGroupsFuture = CompletableFuture.supplyAsync(() -> {
Map<Identifier, Effect> foodGroups = new HashMap<>(); Map<Identifier, Effect> foodGroups = new HashMap<>();
for (var group : loadData(manager, prepareExecutor, "diets/food_groups").entrySet()) { for (var group : loadData(manager, prepareExecutor, "diet/food_groups").entrySet()) {
try { try {
FoodGroup.CODEC.parse(JsonOps.INSTANCE, group.getValue()) FoodGroup.CODEC.parse(JsonOps.INSTANCE, group.getValue())
.resultOrPartial(error -> LOGGER.error("Could not load food group {}: {}", group.getKey(), error)) .resultOrPartial(error -> LOGGER.error("Could not load food group {}: {}", group.getKey(), error))
@ -50,7 +50,7 @@ public class DietsLoader implements IdentifiableResourceReloadListener {
}, prepareExecutor); }, prepareExecutor);
CompletableFuture<Map<Race, DietProfile>> profilesFuture = CompletableFuture.supplyAsync(() -> { CompletableFuture<Map<Race, DietProfile>> profilesFuture = CompletableFuture.supplyAsync(() -> {
Map<Race, DietProfile> profiles = new HashMap<>(); Map<Race, DietProfile> profiles = new HashMap<>();
for (var entry : loadData(manager, prepareExecutor, "diets/races").entrySet()) { for (var entry : loadData(manager, prepareExecutor, "diet/races").entrySet()) {
Identifier id = entry.getKey(); Identifier id = entry.getKey();
try { try {
Race.REGISTRY.getOrEmpty(id).ifPresentOrElse(race -> { Race.REGISTRY.getOrEmpty(id).ifPresentOrElse(race -> {

View file

@ -1,16 +1,16 @@
{ {
"replace": false, "replace": false,
"values": [ "values": [
"#unicopia:food_types/forage_dangerous", "#unicopia:forage/dangerous",
"#unicopia:food_types/forage_edible_filling", "#unicopia:forage/filling",
"#unicopia:food_types/forage_edible", "#unicopia:forage/safe",
"#unicopia:food_types/forage_nauseating", "#unicopia:forage/nauseating",
"#unicopia:food_types/forage_blinding", "#unicopia:forage/blinding",
"#unicopia:food_types/forage_prickly", "#unicopia:forage/prickly",
"#unicopia:food_types/forage_radioactive", "#unicopia:forage/glowing",
"#unicopia:food_types/forage_risky", "#unicopia:forage/risky",
"#unicopia:food_types/forage_severely_nauseating", "#unicopia:forage/severe/nauseating",
"#unicopia:food_types/forage_severely_prickly", "#unicopia:forage/severe/prickly",
"#unicopia:food_types/forage_strengthening" "#unicopia:forage/strenghtening"
] ]
} }

View file

@ -4,7 +4,7 @@
"unicopia:pearl_necklace", "unicopia:pearl_necklace",
"#unicopia:shells", "#unicopia:shells",
"#unicopia:special_shells", "#unicopia:special_shells",
"#unicopia:food_types/raw_sea_vegitable", "#unicopia:food_types/low_quality_sea_vegetables",
"#unicopia:food_types/cooked_sea_vegitable" "#unicopia:food_types/high_quality_sea_vegetables"
] ]
} }