Skip to content

Commit 1b5ff08

Browse files
Respect override_type of Schemas (#1077)
* ow * Cache that
1 parent 33510f4 commit 1b5ff08

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/main/java/dev/latvian/mods/kubejs/recipe/KubeRecipe.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,7 @@ public KubeRecipe serializeChanges() {
515515
}
516516

517517
if (newRecipe) {
518-
json.addProperty("type", getSerializationTypeFunction().idString);
518+
json.addProperty("type", getSerializationTypeFunction().schemaType.serializerType);
519519
}
520520

521521
if (type.event.stageSerializer != null && json.has(KubeJSCraftingRecipe.STAGE_KEY) && !type.idString.equals("recipestages:stage")) {

src/main/java/dev/latvian/mods/kubejs/recipe/schema/RecipeSchemaType.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ public class RecipeSchemaType {
1414
public final ResourceLocation id;
1515
public final RecipeSchema schema;
1616
public final ResourceKey<RecipeSerializer<?>> serializerKey;
17+
public final String serializerType;
1718
public RecipeSchemaType parent;
1819
protected Optional<RecipeSerializer<?>> serializer;
1920

@@ -22,6 +23,7 @@ public RecipeSchemaType(RecipeNamespace namespace, ResourceLocation id, RecipeSc
2223
this.id = id;
2324
this.schema = schema;
2425
this.serializerKey = ResourceKey.create(Registries.RECIPE_SERIALIZER, schema.typeOverride == null ? id : schema.typeOverride);
26+
serializerType = serializerKey.location().toString();
2527
}
2628

2729
public RecipeSerializer<?> getSerializer() {

0 commit comments

Comments
 (0)