File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed
src/main/java/com/robotgryphon/compactcrafting/recipes/json/loaders Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change 11package com .robotgryphon .compactcrafting .recipes .json .loaders ;
22
33import com .google .gson .JsonObject ;
4- import com .google . gson . JsonParseException ;
4+ import com .robotgryphon . compactcrafting . recipes . json . RecipeLoadingException ;
55import com .robotgryphon .compactcrafting .recipes .layers .HollowComponentRecipeLayer ;
66import com .robotgryphon .compactcrafting .recipes .layers .IRecipeLayer ;
77
88public 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 }
Original file line number Diff line number Diff line change 11package com .robotgryphon .compactcrafting .recipes .json .loaders ;
22
33import com .google .gson .JsonObject ;
4+ import com .robotgryphon .compactcrafting .recipes .json .RecipeLoadingException ;
45import com .robotgryphon .compactcrafting .recipes .layers .IRecipeLayer ;
56
67public interface ILayerLoader {
78
8- IRecipeLayer createLayerFromDefinition (JsonObject layer );
9+ IRecipeLayer createLayerFromDefinition (JsonObject layer ) throws RecipeLoadingException ;
910}
You can’t perform that action at this time.
0 commit comments