Some additional fixes from other branch.
This commit is contained in:
@@ -5,7 +5,7 @@ package appeng.recipes.handlers;
|
||||
import com.google.gson.JsonObject;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.JsonUtils;
|
||||
import net.minecraft.util.JSONUtils;
|
||||
import net.minecraftforge.common.crafting.CraftingHelper;
|
||||
import net.minecraftforge.common.crafting.JsonContext;
|
||||
|
||||
@@ -24,14 +24,14 @@ public class GrinderHandler implements IAERecipeFactory
|
||||
{
|
||||
// TODO only primary for now
|
||||
|
||||
JsonObject result = JsonUtils.getJsonObject( json, "result" );
|
||||
JsonObject result = JSONUtils.getJsonObject( json, "result" );
|
||||
ItemStack primary = PartRecipeFactory.getResult( result, ctx, "primary" );
|
||||
ItemStack[] input = CraftingHelper.getIngredient( json.get( "input" ), ctx ).getMatchingStacks();
|
||||
|
||||
int turns = 5;
|
||||
if( json.has( "turns" ) )
|
||||
{
|
||||
turns = JsonUtils.getInt( json, "turns" );
|
||||
turns = JSONUtils.getInt( json, "turns" );
|
||||
}
|
||||
|
||||
final IGrinderRegistry reg = AEApi.instance().registries().grinder();
|
||||
|
||||
@@ -8,7 +8,7 @@ import java.util.List;
|
||||
import com.google.gson.JsonObject;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.JsonUtils;
|
||||
import net.minecraft.util.JSONUtils;
|
||||
import net.minecraftforge.common.crafting.CraftingHelper;
|
||||
import net.minecraftforge.common.crafting.JsonContext;
|
||||
|
||||
@@ -27,21 +27,21 @@ public class InscriberHandler implements IAERecipeFactory
|
||||
public void register( JsonObject json, JsonContext ctx )
|
||||
{
|
||||
ItemStack result = PartRecipeFactory.getResult( json, ctx );
|
||||
String mode = JsonUtils.getString( json, "mode" );
|
||||
String mode = JSONUtils.getString( json, "mode" );
|
||||
|
||||
JsonObject ingredients = JsonUtils.getJsonObject( json, "ingredients" );
|
||||
JsonObject ingredients = JSONUtils.getJsonObject( json, "ingredients" );
|
||||
|
||||
List<ItemStack> middle = Arrays.asList( CraftingHelper.getIngredient( ingredients.get( "middle" ), ctx ).getMatchingStacks() );
|
||||
ItemStack[] top = new ItemStack[] { null };
|
||||
if( ingredients.has( "top" ) )
|
||||
{
|
||||
top = CraftingHelper.getIngredient( JsonUtils.getJsonObject( ingredients, "top" ), ctx ).getMatchingStacks();
|
||||
top = CraftingHelper.getIngredient( JSONUtils.getJsonObject( ingredients, "top" ), ctx ).getMatchingStacks();
|
||||
}
|
||||
|
||||
ItemStack[] bottom = new ItemStack[] { null };
|
||||
if( ingredients.has( "bottom" ) )
|
||||
{
|
||||
bottom = CraftingHelper.getIngredient( JsonUtils.getJsonObject( ingredients, "bottom" ), ctx ).getMatchingStacks();
|
||||
bottom = CraftingHelper.getIngredient( JSONUtils.getJsonObject( ingredients, "bottom" ), ctx ).getMatchingStacks();
|
||||
}
|
||||
|
||||
final IInscriberRegistry reg = AEApi.instance().registries().inscriber();
|
||||
|
||||
@@ -5,7 +5,7 @@ package appeng.recipes.handlers;
|
||||
import com.google.gson.JsonObject;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.JsonUtils;
|
||||
import net.minecraft.util.JSONUtils;
|
||||
import net.minecraftforge.common.crafting.CraftingHelper;
|
||||
import net.minecraftforge.common.crafting.JsonContext;
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||
@@ -24,7 +24,7 @@ public class SmeltingHandler implements IAERecipeFactory
|
||||
float xp = 0.0f;
|
||||
if( json.has( "xp" ) )
|
||||
{
|
||||
xp = JsonUtils.getFloat( json, "xp" );
|
||||
xp = JSONUtils.getFloat( json, "xp" );
|
||||
}
|
||||
|
||||
for( int i = 0; i < input.length; ++i )
|
||||
|
||||
Reference in New Issue
Block a user