Sawmill recipes work again
This commit is contained in:
parent
426001251f
commit
5570a52539
1 changed files with 9 additions and 10 deletions
|
@ -29,6 +29,8 @@ import net.minecraft.init.Items;
|
||||||
import net.minecraft.inventory.Container;
|
import net.minecraft.inventory.Container;
|
||||||
import net.minecraft.inventory.InventoryCrafting;
|
import net.minecraft.inventory.InventoryCrafting;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.item.crafting.CraftingManager;
|
||||||
|
import net.minecraft.item.crafting.IRecipe;
|
||||||
import net.minecraft.util.NonNullList;
|
import net.minecraft.util.NonNullList;
|
||||||
import net.minecraftforge.fluids.FluidRegistry;
|
import net.minecraftforge.fluids.FluidRegistry;
|
||||||
import net.minecraftforge.fluids.FluidStack;
|
import net.minecraftforge.fluids.FluidStack;
|
||||||
|
@ -50,11 +52,8 @@ public class IndustrialSawmillRecipes extends RecipeMethods {
|
||||||
public boolean canInteractWith(EntityPlayer playerIn) {
|
public boolean canInteractWith(EntityPlayer playerIn) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}, 3, 3);
|
}, 1, 1);
|
||||||
|
inventoryCrafting.setInventorySlotContents(0, ItemStack.EMPTY);
|
||||||
for (int i = 0; i < 9; i++) {
|
|
||||||
inventoryCrafting.setInventorySlotContents(i, ItemStack.EMPTY);
|
|
||||||
}
|
|
||||||
|
|
||||||
NonNullList<ItemStack> logs = OreDictionary.getOres("logWood");
|
NonNullList<ItemStack> logs = OreDictionary.getOres("logWood");
|
||||||
for (ItemStack logStack : logs) {
|
for (ItemStack logStack : logs) {
|
||||||
|
@ -85,11 +84,11 @@ public class IndustrialSawmillRecipes extends RecipeMethods {
|
||||||
|
|
||||||
@Nonnull
|
@Nonnull
|
||||||
public static ItemStack findMatchingRecipe(InventoryCrafting inv) {
|
public static ItemStack findMatchingRecipe(InventoryCrafting inv) {
|
||||||
// for (IRecipe recipe : CraftingManager.REGISTRY) {
|
for (IRecipe recipe : CraftingManager.REGISTRY) {
|
||||||
// if (recipe.matches(inv, null)) {
|
if (recipe.canFit(1, 1) && recipe.matches(inv, null)) {
|
||||||
// return recipe.getCraftingResult(inv);
|
return recipe.getCraftingResult(inv);
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
return ItemStack.EMPTY;
|
return ItemStack.EMPTY;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue