Fixes the auto crafting table, as it broke a bit with the forge update.
This commit is contained in:
parent
f2c753cf1d
commit
ac7a4246f6
3 changed files with 8 additions and 5 deletions
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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)) {
|
||||
|
|
Loading…
Reference in a new issue