Skip to content

Commit dc33564

Browse files
committed
Swap hollow layer definition to use wall instead of component
1 parent ff394f2 commit dc33564

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

src/main/java/com/robotgryphon/compactcrafting/recipes/json/loaders/HollowLayerLoader.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
package com.robotgryphon.compactcrafting.recipes.json.loaders;
22

33
import com.google.gson.JsonObject;
4-
import com.google.gson.JsonParseException;
4+
import com.robotgryphon.compactcrafting.recipes.json.RecipeLoadingException;
55
import com.robotgryphon.compactcrafting.recipes.layers.HollowComponentRecipeLayer;
66
import com.robotgryphon.compactcrafting.recipes.layers.IRecipeLayer;
77

88
public class HollowLayerLoader implements ILayerLoader {
99
@Override
10-
public IRecipeLayer createLayerFromDefinition(JsonObject layer) {
11-
if(!layer.has("component"))
12-
throw new JsonParseException("Hollow layer definition does not have an associated component key.");
10+
public IRecipeLayer createLayerFromDefinition(JsonObject layer) throws RecipeLoadingException {
11+
if(!layer.has("wall"))
12+
throw new RecipeLoadingException("Hollow layer definition does not have an associated component key (wall).");
1313

14-
String component = layer.get("component").getAsString();
14+
String component = layer.get("wall").getAsString();
1515

1616
return new HollowComponentRecipeLayer(component);
1717
}
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
package com.robotgryphon.compactcrafting.recipes.json.loaders;
22

33
import com.google.gson.JsonObject;
4+
import com.robotgryphon.compactcrafting.recipes.json.RecipeLoadingException;
45
import com.robotgryphon.compactcrafting.recipes.layers.IRecipeLayer;
56

67
public interface ILayerLoader {
78

8-
IRecipeLayer createLayerFromDefinition(JsonObject layer);
9+
IRecipeLayer createLayerFromDefinition(JsonObject layer) throws RecipeLoadingException;
910
}

0 commit comments

Comments
 (0)