From afbbf076c79be134918854053ba34ae448153d85 Mon Sep 17 00:00:00 2001 From: Luke Bemish Date: Thu, 7 Mar 2024 23:20:24 -0600 Subject: [PATCH] Update defaultresources and fix ItemModelPlanner --- .../excavatedvariants/impl/JsonHelper.java | 18 ------------------ .../impl/client/ItemModelPlanner.java | 2 +- gradle/libs.versions.toml | 2 +- 3 files changed, 2 insertions(+), 20 deletions(-) delete mode 100644 common/src/main/java/dev/lukebemish/excavatedvariants/impl/JsonHelper.java diff --git a/common/src/main/java/dev/lukebemish/excavatedvariants/impl/JsonHelper.java b/common/src/main/java/dev/lukebemish/excavatedvariants/impl/JsonHelper.java deleted file mode 100644 index 05e1b92e..00000000 --- a/common/src/main/java/dev/lukebemish/excavatedvariants/impl/JsonHelper.java +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Copyright (C) 2023 Luke Bemish and contributors - * SPDX-License-Identifier: LGPL-3.0-or-later - */ - -package dev.lukebemish.excavatedvariants.impl; - -import net.minecraft.server.packs.resources.IoSupplier; - -import java.io.ByteArrayInputStream; -import java.io.InputStream; - -public class JsonHelper { - public static IoSupplier getItemModel(String id) { - String json = "{\"parent\": \"" + ExcavatedVariants.MOD_ID + ":" + "block/" + id + "__0\"}"; - return () -> new ByteArrayInputStream(json.getBytes()); - } -} diff --git a/common/src/main/java/dev/lukebemish/excavatedvariants/impl/client/ItemModelPlanner.java b/common/src/main/java/dev/lukebemish/excavatedvariants/impl/client/ItemModelPlanner.java index 2ba78b2f..ca20e38f 100644 --- a/common/src/main/java/dev/lukebemish/excavatedvariants/impl/client/ItemModelPlanner.java +++ b/common/src/main/java/dev/lukebemish/excavatedvariants/impl/client/ItemModelPlanner.java @@ -46,7 +46,7 @@ public void add(String id) { return () -> { var json = baseModel.deepCopy(); - json.addProperty("parent", ExcavatedVariants.MOD_ID + ":block/" + outRl.getPath().replace(".json", "").replace("models/item/", "") + "_0"); + json.addProperty("parent", ExcavatedVariants.MOD_ID + ":block/" + outRl.getPath().replace(".json", "").replace("models/item/", "") + "__0"); return new ByteArrayInputStream(ExcavatedVariants.GSON.toJson(json).getBytes()); }; } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 3f3d0709..d813775f 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -18,7 +18,7 @@ architectury_loom = "1.4.373" quilt_licenser = "2.0.1" dynassetgen = "5.1.2" -defaultresources = "3.3.1" +defaultresources = "3.3.3" mixinextras = "0.3.2"