This commit is contained in:
modmuss50 2017-02-23 12:38:36 +00:00
parent 26c208e811
commit d126edaa1b
No known key found for this signature in database
GPG key ID: 773D17BE8BF49C82
2 changed files with 13 additions and 0 deletions

View file

@ -25,9 +25,11 @@
package techreborn.api.recipe.machines;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.fluids.FluidStack;
import techreborn.api.Reference;
import techreborn.api.recipe.BaseRecipe;
import techreborn.tiles.multiblock.TileIndustrialGrinder;
public class IndustrialGrinderRecipe extends BaseRecipe {
@ -65,4 +67,12 @@ public class IndustrialGrinderRecipe extends BaseRecipe {
public boolean useOreDic() {
return useOreDic;
}
@Override
public boolean canCraft(TileEntity tile) {
if(tile instanceof TileIndustrialGrinder){
return ((TileIndustrialGrinder) tile).getMutliBlock();
}
return false;
}
}

View file

@ -104,6 +104,9 @@ public class TileIndustrialGrinder extends TilePowerAcceptor implements IWrencha
}
public boolean getMutliBlock() {
if(multiblockChecker == null){
return false;
}
final boolean down = this.multiblockChecker.checkRectY(1, 1, MultiblockChecker.CASING_NORMAL,
MultiblockChecker.ZERO_OFFSET);
final boolean up = this.multiblockChecker.checkRectY(1, 1, MultiblockChecker.CASING_NORMAL,