Fixes the auto crafting table, as it broke a bit with the forge update.

This commit is contained in:
modmuss50 2017-06-26 22:30:13 +01:00
parent f2c753cf1d
commit ac7a4246f6
No known key found for this signature in database
GPG key ID: 203A5ED4D3E48BEA
3 changed files with 8 additions and 5 deletions

View file

@ -22,6 +22,7 @@ public class GuiAutoCraftingRecipeSlector extends GuiRecipeBook {
//Pulls the button off the screen as we dont need it
toggleRecipesBtn = new GuiButtonToggle(0, -1000, -1000, 26, 16, false);
toggleRecipesBtn.initTextureValues(152, 41, 28, 18, RECIPE_BOOK);
//recipeBook.setGuiOpen(true);
}
@Override
@ -30,6 +31,11 @@ public class GuiAutoCraftingRecipeSlector extends GuiRecipeBook {
}
@Override
public boolean isVisible() {
return true;
}
@Override
public void setContainerRecipe(IRecipe recipe, RecipeList recipes) {
guiAutoCrafting.setRecipe(recipe, false);

View file

@ -28,10 +28,7 @@ public class PacketSetRecipe implements INetworkPacket<PacketSetRecipe> {
this.recipe = recipe.getRegistryName();
}
if(this.recipe == null){
//TODO fix vanilla recipes
this.recipe = new ResourceLocation("");
}
System.out.println(this.recipe);
this.custom = custom;
}

View file

@ -331,7 +331,7 @@ public class TileAutoCraftingTable extends TilePowerAcceptor implements IContain
return -1;
}
List<Integer> possibleSlots = new ArrayList<>();
for (int i = 0; i < 9; i++) {
for (int i = 0; i < recipe.getIngredients().size(); i++) {
ItemStack stackInSlot = inventory.getStackInSlot(i);
Ingredient ingredient = recipe.getIngredients().get(i);
if (ingredient != Ingredient.EMPTY && ingredient.apply(stack)) {