Source:
<code>private static ShapelessOreRecipe shapelessFactory( JsonContext context, JsonObject json ) { String group = JsonUtils.getString( json, "group", AppEng.MOD_ID + ":part_shapeless_crafting" ); NonNullList<Ingredient> ings = NonNullList.create(); for( JsonElement ele : JsonUtils.getJsonArray( json, "ingredients" ) ) { ings.add( CraftingHelper.getIngredient( ele, context ) ); } if( ings.isEmpty() ) { throw new JsonParseException( "No ingredients for shapeless recipe" ); } JsonObject resultObject = (JsonObject) json.get( "result" ); int count = JsonUtils.getInt( resultObject, "count", 1 ); String ingredient = resultObject.get( "part" ).getAsString(); <START> Object result = (Object) Api.INSTANCE.registries().recipes().resolveItem( AppEng.MOD_ID, ingredient ); <END> if( result instanceof ResolverResult ) { ResolverResult resolverResult = (ResolverResult) result; Item item = Item.getByNameOrId( AppEng.MOD_ID + ":" + resolverResult.itemName ); if( item == null ) { AELog.warn( "item was null for " + resolverResult.itemName + " ( " + ingredient + " )!" ); throw new JsonSyntaxException( "Got a null item for " + resolverResult.itemName + " ( " + ingredient + " ). This should never happen!" ); } ItemStack itemStack = new ItemStack( item, count, resolverResult.damageValue, resolverResult.compound ); return new ShapelessOreRecipe( new ResourceLocation( group ), ings, itemStack ); } throw new JsonSyntaxException( "Couldn't find the resulting item in AE. This means AE was provided a recipe that it shouldn't be handling.\n" + "Was looking for : '" + ingredient + "'." ); }</code><technical_language>![MINOR](<LINK_2> 'Severity: MINOR') Remove this unnecessary cast "Object". [![rule](<LINK_1>](<LINK_0></technical_language>

Target:
private static ShapelessOreRecipe shapelessFactory( JsonContext context, JsonObject json ) { String group = JsonUtils.getString( json, "group", "" ); NonNullList<Ingredient> ings = NonNullList.create(); for( JsonElement ele : JsonUtils.getJsonArray( json, "ingredients" ) ) { ings.add( CraftingHelper.getIngredient( ele, context ) ); } if( ings.isEmpty() ) { throw new JsonParseException( "No ingredients for shapeless recipe" ); } JsonObject resultObject = (JsonObject) json.get( "result" ); int count = JsonUtils.getInt( resultObject, "count", 1 ); String ingredient = resultObject.get( "part" ).getAsString(); Object result = (Object) Api.INSTANCE.registries().recipes().resolveItem( AppEng.MOD_ID, ingredient ); if( result instanceof ResolverResult ) { ResolverResult resolverResult = (ResolverResult) result; Item item = Item.getByNameOrId( AppEng.MOD_ID + ":" + resolverResult.itemName ); if( item == null ) { AELog.warn( "item was null for " + resolverResult.itemName + " ( " + ingredient + " )!" ); throw new JsonSyntaxException( "Got a null item for " + resolverResult.itemName + " ( " + ingredient + " ). This should never happen!" ); } ItemStack itemStack = new ItemStack( item, count, resolverResult.damageValue, resolverResult.compound ); return new ShapelessOreRecipe( group.isEmpty() ? null : new ResourceLocation( group ), ings, itemStack ); } throw new JsonSyntaxException( "Couldn't find the resulting item in AE. This means AE was provided a recipe that it shouldn't be handling.\n" + "Was looking for : '" + ingredient + "'." ); }