mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-11-28 07:55:41 +00:00
NEI and build craft triggers left to do.
This commit is contained in:
1 parent
59cbda3ba0
commit
d421d5e2b1
17 files changed
+206
-148
No files matched your search
@@ -1,5 +1,6 @@
|
||||
package crazypants.enderio.conduit.facade;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
@@ -17,6 +18,8 @@ import crazypants.enderio.EnderIO;
|
||||
import crazypants.enderio.EnderIOTab;
|
||||
import crazypants.enderio.ModObject;
|
||||
import crazypants.enderio.conduit.IConduitBundle;
|
||||
import crazypants.enderio.crafting.IEnderIoRecipe;
|
||||
import crazypants.enderio.crafting.impl.EnderIoRecipe;
|
||||
import crazypants.enderio.machine.painter.BasicPainterTemplate;
|
||||
import crazypants.enderio.machine.painter.PainterUtil;
|
||||
|
||||
@@ -118,13 +121,12 @@ public class ItemConduitFacade extends Item {
|
||||
return target != null && target.getItem() == EnderIO.itemConduitFacade;
|
||||
}
|
||||
|
||||
//TODO:1.7
|
||||
// @Override
|
||||
// public List<IEnderIoRecipe> getAllRecipes() {
|
||||
// ItemStack is = new ItemStack(ModObject.itemConduitFacade.actualId, 1, 0);
|
||||
// IEnderIoRecipe recipe = new EnderIoRecipe(IEnderIoRecipe.PAINTER_ID, DEFAULT_ENERGY_PER_TASK, is, is);
|
||||
// return Collections.singletonList(recipe);
|
||||
// }
|
||||
@Override
|
||||
public List<IEnderIoRecipe> getAllRecipes() {
|
||||
ItemStack is = new ItemStack(EnderIO.itemConduitFacade, 1, 0);
|
||||
IEnderIoRecipe recipe = new EnderIoRecipe(IEnderIoRecipe.PAINTER_ID, DEFAULT_ENERGY_PER_TASK, is, is);
|
||||
return Collections.singletonList(recipe);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ public interface IEnderIoRecipe {
|
||||
|
||||
public static final String ALLOY_SMELTER_ID = ModObject.blockAlloySmelter.unlocalisedName;
|
||||
|
||||
public static final String SAG_MILL_ID = ModObject.blockCrusher.unlocalisedName;
|
||||
public static final String SAG_MILL_ID = ModObject.blockSagMill.unlocalisedName;
|
||||
|
||||
String getCrafterId();
|
||||
|
||||
|
||||
@@ -7,7 +7,6 @@ import java.util.List;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import crazypants.enderio.crafting.IRecipeInput;
|
||||
import crazypants.util.Util;
|
||||
|
||||
public class RecipeInput extends RecipeComponent implements IRecipeInput {
|
||||
|
||||
@@ -31,11 +30,11 @@ public class RecipeInput extends RecipeComponent implements IRecipeInput {
|
||||
|
||||
public RecipeInput(ItemStack input, boolean addSubtypes) {
|
||||
super(input, -1);
|
||||
Item inputItem = Util.getItem(input.itemID);
|
||||
Item inputItem = input.getItem();
|
||||
if(addSubtypes && inputItem != null && inputItem.getHasSubtypes()) {
|
||||
equivelents = new ArrayList<ItemStack>();
|
||||
ArrayList<ItemStack> sublist = new ArrayList<ItemStack>();
|
||||
inputItem.getSubItems(inputItem.itemID, null, sublist);
|
||||
inputItem.getSubItems(inputItem, null, sublist);
|
||||
for (ItemStack st : sublist) {
|
||||
if(itemPrototype.getItemDamage() != st.getItemDamage()) {
|
||||
equivelents.add(st.copy());
|
||||
|
||||
@@ -30,8 +30,8 @@ public class RecipeInputClass<T> extends RecipeComponent implements IRecipeInput
|
||||
|
||||
@Override
|
||||
public boolean isEquivalent(ItemStack candidate) {
|
||||
Block block = Util.getBlockFromItemId(candidate.itemID);
|
||||
Item item = Util.getItem(candidate.itemID);
|
||||
Block block = Util.getBlockFromItemId(candidate);
|
||||
Item item = candidate.getItem();
|
||||
return (item != null && allowedClass.isAssignableFrom(item.getClass()) || (block != null && allowedClass.isAssignableFrom(block.getClass())));
|
||||
}
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@ import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import buildcraft.api.tools.IToolWrench;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.common.network.IGuiHandler;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
@@ -24,6 +25,7 @@ import crazypants.enderio.ClientProxy;
|
||||
import crazypants.enderio.EnderIO;
|
||||
import crazypants.enderio.EnderIOTab;
|
||||
import crazypants.enderio.ModObject;
|
||||
import crazypants.enderio.conduit.ConduitUtil;
|
||||
import crazypants.util.Util;
|
||||
|
||||
public abstract class AbstractMachineBlock<T extends AbstractMachineEntity> extends BlockContainer implements IGuiHandler {
|
||||
@@ -68,19 +70,18 @@ public abstract class AbstractMachineBlock<T extends AbstractMachineEntity> exte
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer entityPlayer, int par6, float par7, float par8, float par9) {
|
||||
|
||||
//TODO:1.7
|
||||
// if(ConduitUtil.isToolEquipped(entityPlayer) && entityPlayer.isSneaking()) {
|
||||
// if(entityPlayer.getCurrentEquippedItem().getItem() instanceof IToolWrench) {
|
||||
// IToolWrench wrench = (IToolWrench) entityPlayer.getCurrentEquippedItem().getItem();
|
||||
// if(wrench.canWrench(entityPlayer, x, y, z)) {
|
||||
// removeBlockByPlayer(world, entityPlayer, x, y, z);
|
||||
// if(entityPlayer.getCurrentEquippedItem().getItem() instanceof IToolWrench) {
|
||||
// ((IToolWrench) entityPlayer.getCurrentEquippedItem().getItem()).wrenchUsed(entityPlayer, x, y, z);
|
||||
// }
|
||||
// return true;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
if(ConduitUtil.isToolEquipped(entityPlayer) && entityPlayer.isSneaking()) {
|
||||
if(entityPlayer.getCurrentEquippedItem().getItem() instanceof IToolWrench) {
|
||||
IToolWrench wrench = (IToolWrench) entityPlayer.getCurrentEquippedItem().getItem();
|
||||
if(wrench.canWrench(entityPlayer, x, y, z)) {
|
||||
removedByPlayer(world, entityPlayer, x, y, z);
|
||||
if(entityPlayer.getCurrentEquippedItem().getItem() instanceof IToolWrench) {
|
||||
((IToolWrench) entityPlayer.getCurrentEquippedItem().getItem()).wrenchUsed(entityPlayer, x, y, z);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(entityPlayer.isSneaking()) {
|
||||
return false;
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
package crazypants.enderio.machine;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import crazypants.enderio.crafting.IEnderIoRecipe;
|
||||
|
||||
/**
|
||||
* A MachineRecipe implementation must be stateless, always returning the same
|
||||
@@ -95,7 +98,6 @@ public interface IMachineRecipe {
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
//TODO:1.7
|
||||
//List<IEnderIoRecipe> getAllRecipes();
|
||||
List<IEnderIoRecipe> getAllRecipes();
|
||||
|
||||
}
|
||||
@@ -5,9 +5,16 @@ import java.util.List;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import crazypants.enderio.ModObject;
|
||||
import crazypants.enderio.crafting.IEnderIoRecipe;
|
||||
import crazypants.enderio.crafting.IRecipeComponent;
|
||||
import crazypants.enderio.crafting.IRecipeInput;
|
||||
import crazypants.enderio.crafting.IRecipeOutput;
|
||||
import crazypants.enderio.crafting.impl.EnderIoRecipe;
|
||||
import crazypants.enderio.crafting.impl.RecipeInput;
|
||||
import crazypants.enderio.machine.MachineRecipeInput;
|
||||
import crazypants.enderio.machine.recipe.AbstractMachineRecipe;
|
||||
import crazypants.enderio.machine.recipe.IRecipe;
|
||||
import crazypants.enderio.machine.recipe.RecipeOutput;
|
||||
|
||||
public class AlloyMachineRecipe extends AbstractMachineRecipe {
|
||||
|
||||
@@ -45,28 +52,27 @@ public class AlloyMachineRecipe extends AbstractMachineRecipe {
|
||||
return AlloyRecipeManager.instance.getExperianceForOutput(output);
|
||||
}
|
||||
|
||||
//TODO:1.7
|
||||
// @Override
|
||||
// public List<IEnderIoRecipe> getAllRecipes() {
|
||||
// List<IEnderIoRecipe> result = new ArrayList<IEnderIoRecipe>();
|
||||
// List<IAlloyRecipe> recipes = AlloyRecipeManager.getInstance().getRecipes();
|
||||
// for (IRecipe cr : recipes) {
|
||||
// List<IRecipeComponent> components = new ArrayList<IRecipeComponent>();
|
||||
// for (crazypants.enderio.machine.recipe.RecipeInput ri : cr.getInputs()) {
|
||||
// if(ri.getInput() != null) {
|
||||
// IRecipeInput input = new RecipeInput(ri.getInput(), -1, ri.getEquivelentInputs());
|
||||
// components.add(input);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// for (RecipeOutput co : cr.getOutputs()) {
|
||||
// IRecipeOutput output = new crazypants.enderio.crafting.impl.RecipeOutput(co.getOutput(), co.getChance());
|
||||
// components.add(output);
|
||||
// }
|
||||
// result.add(new EnderIoRecipe(IEnderIoRecipe.ALLOY_SMELTER_ID, cr.getEnergyRequired(), components));
|
||||
// }
|
||||
// return result;
|
||||
// }
|
||||
@Override
|
||||
public List<IEnderIoRecipe> getAllRecipes() {
|
||||
List<IEnderIoRecipe> result = new ArrayList<IEnderIoRecipe>();
|
||||
List<IAlloyRecipe> recipes = AlloyRecipeManager.getInstance().getRecipes();
|
||||
for (IRecipe cr : recipes) {
|
||||
List<IRecipeComponent> components = new ArrayList<IRecipeComponent>();
|
||||
for (crazypants.enderio.machine.recipe.RecipeInput ri : cr.getInputs()) {
|
||||
if(ri.getInput() != null) {
|
||||
IRecipeInput input = new RecipeInput(ri.getInput(), -1, ri.getEquivelentInputs());
|
||||
components.add(input);
|
||||
}
|
||||
}
|
||||
|
||||
for (RecipeOutput co : cr.getOutputs()) {
|
||||
IRecipeOutput output = new crazypants.enderio.crafting.impl.RecipeOutput(co.getOutput(), co.getChance());
|
||||
components.add(output);
|
||||
}
|
||||
result.add(new EnderIoRecipe(IEnderIoRecipe.ALLOY_SMELTER_ID, cr.getEnergyRequired(), components));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public boolean isValidRecipeComponents(ItemStack[] resultInv) {
|
||||
return AlloyRecipeManager.instance.isValidRecipeComponents(resultInv);
|
||||
|
||||
@@ -1,13 +1,21 @@
|
||||
package crazypants.enderio.machine.alloy;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.FurnaceRecipes;
|
||||
import net.minecraft.tileentity.TileEntityFurnace;
|
||||
import crazypants.enderio.ModObject;
|
||||
import crazypants.enderio.crafting.IEnderIoRecipe;
|
||||
import crazypants.enderio.crafting.IRecipeInput;
|
||||
import crazypants.enderio.crafting.IRecipeOutput;
|
||||
import crazypants.enderio.crafting.impl.EnderIoRecipe;
|
||||
import crazypants.enderio.crafting.impl.RecipeOutput;
|
||||
import crazypants.enderio.machine.IMachineRecipe;
|
||||
import crazypants.enderio.machine.MachineRecipeInput;
|
||||
import crazypants.enderio.machine.recipe.RecipeInput;
|
||||
@@ -151,27 +159,26 @@ public class VanillaSmeltingRecipe implements IMachineRecipe {
|
||||
return result.toArray(new MachineRecipeInput[result.size()]);
|
||||
}
|
||||
|
||||
//TODO:1.7
|
||||
// @Override
|
||||
// public List<IEnderIoRecipe> getAllRecipes() {
|
||||
// if(!enabled) {
|
||||
// return Collections.emptyList();
|
||||
// }
|
||||
// List<IEnderIoRecipe> result = new ArrayList<IEnderIoRecipe>();
|
||||
// Map<List<Integer>, ItemStack> metaList = FurnaceRecipes.smelting().getMetaSmeltingList();
|
||||
// for (Entry<List<Integer>, ItemStack> entry : metaList.entrySet()) {
|
||||
// List<Integer> idMeta = entry.getKey();
|
||||
// IRecipeInput input = new crazypants.enderio.crafting.impl.RecipeInput(new ItemStack(idMeta.get(0), 1, idMeta.get(1)), false);
|
||||
// IRecipeOutput output = new RecipeOutput(entry.getValue());
|
||||
// result.add(new EnderIoRecipe(IEnderIoRecipe.ALLOY_SMELTER_ID, MJ_PER_ITEM, input, output));
|
||||
// }
|
||||
// Map<Integer, ItemStack> sl = FurnaceRecipes.smelting().getSmeltingList();
|
||||
// for (Entry<Integer, ItemStack> entry : sl.entrySet()) {
|
||||
// IRecipeInput input = new crazypants.enderio.crafting.impl.RecipeInput(new ItemStack(entry.getKey(), 1, 0), false);
|
||||
// IRecipeOutput output = new RecipeOutput(entry.getValue());
|
||||
// result.add(new EnderIoRecipe(IEnderIoRecipe.ALLOY_SMELTER_ID, MJ_PER_ITEM, input, output));
|
||||
// }
|
||||
// return result;
|
||||
// }
|
||||
@Override
|
||||
public List<IEnderIoRecipe> getAllRecipes() {
|
||||
if(!enabled) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
List<IEnderIoRecipe> result = new ArrayList<IEnderIoRecipe>();
|
||||
// Map<List<Integer>, ItemStack> metaList = FurnaceRecipes.smelting().getMetaSmeltingList();
|
||||
// for (Entry<List<Integer>, ItemStack> entry : metaList.entrySet()) {
|
||||
// List<Integer> idMeta = entry.getKey();
|
||||
// IRecipeInput input = new crazypants.enderio.crafting.impl.RecipeInput(new ItemStack(idMeta.get(0), 1, idMeta.get(1)), false);
|
||||
// IRecipeOutput output = new RecipeOutput(entry.getValue());
|
||||
// result.add(new EnderIoRecipe(IEnderIoRecipe.ALLOY_SMELTER_ID, MJ_PER_ITEM, input, output));
|
||||
// }
|
||||
Map<Integer, ItemStack> sl = FurnaceRecipes.smelting().getSmeltingList();
|
||||
for (Entry<Integer, ItemStack> entry : sl.entrySet()) {
|
||||
IRecipeInput input = new crazypants.enderio.crafting.impl.RecipeInput(new ItemStack(entry.getValue().getItem(), 1, 0), false);
|
||||
IRecipeOutput output = new RecipeOutput(entry.getValue());
|
||||
result.add(new EnderIoRecipe(IEnderIoRecipe.ALLOY_SMELTER_ID, MJ_PER_ITEM, input, output));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,9 +1,20 @@
|
||||
package crazypants.enderio.machine.crusher;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import crazypants.enderio.ModObject;
|
||||
import crazypants.enderio.crafting.IEnderIoRecipe;
|
||||
import crazypants.enderio.crafting.IRecipeComponent;
|
||||
import crazypants.enderio.crafting.IRecipeInput;
|
||||
import crazypants.enderio.crafting.IRecipeOutput;
|
||||
import crazypants.enderio.crafting.impl.EnderIoRecipe;
|
||||
import crazypants.enderio.crafting.impl.RecipeInput;
|
||||
import crazypants.enderio.machine.MachineRecipeInput;
|
||||
import crazypants.enderio.machine.recipe.AbstractMachineRecipe;
|
||||
import crazypants.enderio.machine.recipe.IRecipe;
|
||||
import crazypants.enderio.machine.recipe.Recipe;
|
||||
import crazypants.enderio.machine.recipe.RecipeOutput;
|
||||
|
||||
public class CrusherMachineRecipe extends AbstractMachineRecipe {
|
||||
|
||||
@@ -30,27 +41,27 @@ public class CrusherMachineRecipe extends AbstractMachineRecipe {
|
||||
return ModObject.blockSagMill.unlocalisedName;
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public List<IEnderIoRecipe> getAllRecipes() {
|
||||
// List<IEnderIoRecipe> result = new ArrayList<IEnderIoRecipe>();
|
||||
// List<Recipe> recipes = CrusherRecipeManager.getInstance().getRecipes();
|
||||
// for (IRecipe cr : recipes) {
|
||||
// List<IRecipeComponent> components = new ArrayList<IRecipeComponent>();
|
||||
// for (crazypants.enderio.machine.recipe.RecipeInput ri : cr.getInputs()) {
|
||||
// if(ri.getInput() != null) {
|
||||
// IRecipeInput input = new RecipeInput(ri.getInput(), -1, ri.getEquivelentInputs());
|
||||
// components.add(input);
|
||||
// }
|
||||
// }
|
||||
// for (RecipeOutput co : cr.getOutputs()) {
|
||||
// IRecipeOutput output = new crazypants.enderio.crafting.impl.RecipeOutput(co.getOutput(), co.getChance());
|
||||
// components.add(output);
|
||||
// }
|
||||
// // IRecipeInput input = new RecipeInput(CrusherRecipeManager.getInput(cr));
|
||||
// // List<IRecipeComponent> components = new ArrayList<IRecipeComponent>();
|
||||
// // components.add(input);
|
||||
// result.add(new EnderIoRecipe(IEnderIoRecipe.SAG_MILL_ID, cr.getEnergyRequired(), components));
|
||||
// }
|
||||
// return result;
|
||||
// }
|
||||
@Override
|
||||
public List<IEnderIoRecipe> getAllRecipes() {
|
||||
List<IEnderIoRecipe> result = new ArrayList<IEnderIoRecipe>();
|
||||
List<Recipe> recipes = CrusherRecipeManager.getInstance().getRecipes();
|
||||
for (IRecipe cr : recipes) {
|
||||
List<IRecipeComponent> components = new ArrayList<IRecipeComponent>();
|
||||
for (crazypants.enderio.machine.recipe.RecipeInput ri : cr.getInputs()) {
|
||||
if(ri.getInput() != null) {
|
||||
IRecipeInput input = new RecipeInput(ri.getInput(), -1, ri.getEquivelentInputs());
|
||||
components.add(input);
|
||||
}
|
||||
}
|
||||
for (RecipeOutput co : cr.getOutputs()) {
|
||||
IRecipeOutput output = new crazypants.enderio.crafting.impl.RecipeOutput(co.getOutput(), co.getChance());
|
||||
components.add(output);
|
||||
}
|
||||
// IRecipeInput input = new RecipeInput(CrusherRecipeManager.getInput(cr));
|
||||
// List<IRecipeComponent> components = new ArrayList<IRecipeComponent>();
|
||||
// components.add(input);
|
||||
result.add(new EnderIoRecipe(IEnderIoRecipe.SAG_MILL_ID, cr.getEnergyRequired(), components));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,7 @@
|
||||
package crazypants.enderio.machine.painter;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
@@ -24,6 +26,8 @@ import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import crazypants.enderio.EnderIO;
|
||||
import crazypants.enderio.ModObject;
|
||||
import crazypants.enderio.crafting.IEnderIoRecipe;
|
||||
import crazypants.enderio.crafting.impl.EnderIoRecipe;
|
||||
import crazypants.enderio.machine.MachineRecipeInput;
|
||||
import crazypants.enderio.machine.MachineRecipeRegistry;
|
||||
|
||||
@@ -266,12 +270,12 @@ public class BlockPaintedFence extends BlockFence implements ITileEntityProvider
|
||||
return new ItemStack[] { createItemStackForSourceBlock(getBlockFromItem(paintSource.getItem()), paintSource.getItemDamage()) };
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public List<IEnderIoRecipe> getAllRecipes() {
|
||||
// IEnderIoRecipe recipe = new EnderIoRecipe(IEnderIoRecipe.PAINTER_ID, DEFAULT_ENERGY_PER_TASK, new ItemStack(Block.fence), new ItemStack(
|
||||
// ModObject.blockCustomFence.actualId, 1, 0));
|
||||
// return Collections.singletonList(recipe);
|
||||
// }
|
||||
@Override
|
||||
public List<IEnderIoRecipe> getAllRecipes() {
|
||||
IEnderIoRecipe recipe = new EnderIoRecipe(IEnderIoRecipe.PAINTER_ID, DEFAULT_ENERGY_PER_TASK, new ItemStack(Blocks.fence), new ItemStack(
|
||||
EnderIO.blockPaintedFence, 1, 0));
|
||||
return Collections.singletonList(recipe);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package crazypants.enderio.machine.painter;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
@@ -23,6 +25,8 @@ import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import crazypants.enderio.EnderIO;
|
||||
import crazypants.enderio.ModObject;
|
||||
import crazypants.enderio.crafting.IEnderIoRecipe;
|
||||
import crazypants.enderio.crafting.impl.EnderIoRecipe;
|
||||
import crazypants.enderio.machine.MachineRecipeInput;
|
||||
import crazypants.enderio.machine.MachineRecipeRegistry;
|
||||
|
||||
@@ -233,13 +237,13 @@ public class BlockPaintedFenceGate extends BlockFenceGate implements ITileEntity
|
||||
return new ItemStack[] { createItemStackForSourceBlock(Block.getBlockFromItem(paintSource.getItem()), paintSource.getItemDamage()) };
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public List<IEnderIoRecipe> getAllRecipes() {
|
||||
// IEnderIoRecipe recipe = new EnderIoRecipe(IEnderIoRecipe.PAINTER_ID, DEFAULT_ENERGY_PER_TASK, new ItemStack(Block.fence), new ItemStack(
|
||||
// ModObject.blockCustomFenceGate.actualId,
|
||||
// 1, 0));
|
||||
// return Collections.singletonList(recipe);
|
||||
// }
|
||||
@Override
|
||||
public List<IEnderIoRecipe> getAllRecipes() {
|
||||
IEnderIoRecipe recipe = new EnderIoRecipe(IEnderIoRecipe.PAINTER_ID, DEFAULT_ENERGY_PER_TASK, new ItemStack(Blocks.fence_gate), new ItemStack(
|
||||
EnderIO.blockPaintedFenceGate,
|
||||
1, 0));
|
||||
return Collections.singletonList(recipe);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,5 +1,7 @@
|
||||
package crazypants.enderio.machine.painter;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
@@ -25,6 +27,12 @@ import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import crazypants.enderio.EnderIO;
|
||||
import crazypants.enderio.ModObject;
|
||||
import crazypants.enderio.crafting.IEnderIoRecipe;
|
||||
import crazypants.enderio.crafting.IRecipeInput;
|
||||
import crazypants.enderio.crafting.IRecipeOutput;
|
||||
import crazypants.enderio.crafting.impl.EnderIoRecipe;
|
||||
import crazypants.enderio.crafting.impl.RecipeInputClass;
|
||||
import crazypants.enderio.crafting.impl.RecipeOutput;
|
||||
import crazypants.enderio.machine.MachineRecipeInput;
|
||||
import crazypants.enderio.machine.MachineRecipeRegistry;
|
||||
|
||||
@@ -244,23 +252,23 @@ public class BlockPaintedSlab extends BlockSlab implements ITileEntityProvider {
|
||||
return new ItemStack[] { createItemStackForSourceBlock(Block.getBlockFromItem(paintSource.getItem()), paintSource.getItemDamage()) };
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public boolean isValidTarget(ItemStack target) {
|
||||
// if(target == null) {
|
||||
// return false;
|
||||
// }
|
||||
// Block blk = Util.getBlockFromItemId(target.itemID);
|
||||
// return blk instanceof BlockHalfSlab;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public List<IEnderIoRecipe> getAllRecipes() {
|
||||
// IRecipeInput input = new RecipeInputClass<BlockHalfSlab>(new ItemStack(Block.stoneSingleSlab), BlockHalfSlab.class, new ItemStack(Block.woodSingleSlab));
|
||||
// IRecipeOutput output = new RecipeOutput(new ItemStack(ModObject.blockCustomSlab.actualId, 1, 0));
|
||||
//
|
||||
// IEnderIoRecipe recipe = new EnderIoRecipe(getMachineName(), DEFAULT_ENERGY_PER_TASK, input, output);
|
||||
// return Collections.singletonList(recipe);
|
||||
// }
|
||||
@Override
|
||||
public boolean isValidTarget(ItemStack target) {
|
||||
if(target == null) {
|
||||
return false;
|
||||
}
|
||||
Block blk = Block.getBlockFromItem(target.getItem());
|
||||
return blk instanceof BlockSlab;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<IEnderIoRecipe> getAllRecipes() {
|
||||
IRecipeInput input = new RecipeInputClass<BlockSlab>(new ItemStack(Blocks.stone_slab), BlockSlab.class, new ItemStack(Blocks.wooden_slab));
|
||||
IRecipeOutput output = new RecipeOutput(new ItemStack(EnderIO.blockPaintedSlab, 1, 0));
|
||||
|
||||
IEnderIoRecipe recipe = new EnderIoRecipe(getMachineName(), DEFAULT_ENERGY_PER_TASK, input, output);
|
||||
return Collections.singletonList(recipe);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,5 +1,7 @@
|
||||
package crazypants.enderio.machine.painter;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
@@ -23,6 +25,12 @@ import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import crazypants.enderio.EnderIO;
|
||||
import crazypants.enderio.ModObject;
|
||||
import crazypants.enderio.crafting.IEnderIoRecipe;
|
||||
import crazypants.enderio.crafting.IRecipeInput;
|
||||
import crazypants.enderio.crafting.IRecipeOutput;
|
||||
import crazypants.enderio.crafting.impl.EnderIoRecipe;
|
||||
import crazypants.enderio.crafting.impl.RecipeInputClass;
|
||||
import crazypants.enderio.crafting.impl.RecipeOutput;
|
||||
import crazypants.enderio.machine.MachineRecipeInput;
|
||||
import crazypants.enderio.machine.MachineRecipeRegistry;
|
||||
|
||||
@@ -250,15 +258,15 @@ public class BlockPaintedStair extends BlockStairs implements ITileEntityProvide
|
||||
return blk instanceof BlockStairs;
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public List<IEnderIoRecipe> getAllRecipes() {
|
||||
// IRecipeInput input = new RecipeInputClass<BlockStairs>(new ItemStack(Block.stairsWoodOak), BlockStairs.class, new ItemStack(Block.stairsCobblestone),
|
||||
// new ItemStack(Block.stairsStoneBrick));
|
||||
// IRecipeOutput output = new RecipeOutput(new ItemStack(ModObject.blockCustomStair.actualId, 1, 0));
|
||||
//
|
||||
// IEnderIoRecipe recipe = new EnderIoRecipe(getMachineName(), DEFAULT_ENERGY_PER_TASK, input, output);
|
||||
// return Collections.singletonList(recipe);
|
||||
// }
|
||||
@Override
|
||||
public List<IEnderIoRecipe> getAllRecipes() {
|
||||
IRecipeInput input = new RecipeInputClass<BlockStairs>(new ItemStack(Blocks.oak_stairs), BlockStairs.class, new ItemStack(Blocks.stone_stairs),
|
||||
new ItemStack(Blocks.stone_stairs));
|
||||
IRecipeOutput output = new RecipeOutput(new ItemStack(EnderIO.blockPaintedStair, 1, 0));
|
||||
|
||||
IEnderIoRecipe recipe = new EnderIoRecipe(getMachineName(), DEFAULT_ENERGY_PER_TASK, input, output);
|
||||
return Collections.singletonList(recipe);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,5 +1,7 @@
|
||||
package crazypants.enderio.machine.painter;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
@@ -22,6 +24,8 @@ import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import crazypants.enderio.EnderIO;
|
||||
import crazypants.enderio.ModObject;
|
||||
import crazypants.enderio.crafting.IEnderIoRecipe;
|
||||
import crazypants.enderio.crafting.impl.EnderIoRecipe;
|
||||
import crazypants.enderio.machine.MachineRecipeInput;
|
||||
import crazypants.enderio.machine.MachineRecipeRegistry;
|
||||
|
||||
@@ -240,12 +244,12 @@ public class BlockPaintedWall extends BlockWall implements ITileEntityProvider {
|
||||
return new ItemStack[] { createItemStackForSourceBlock(Block.getBlockFromItem(paintSource.getItem()), paintSource.getItemDamage()) };
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public List<IEnderIoRecipe> getAllRecipes() {
|
||||
// IEnderIoRecipe recipe = new EnderIoRecipe(IEnderIoRecipe.PAINTER_ID, DEFAULT_ENERGY_PER_TASK, new ItemStack(Block.cobblestoneWall), new ItemStack(
|
||||
// ModObject.blockCustomWall.actualId, 1, 0));
|
||||
// return Collections.singletonList(recipe);
|
||||
// }
|
||||
@Override
|
||||
public List<IEnderIoRecipe> getAllRecipes() {
|
||||
IEnderIoRecipe recipe = new EnderIoRecipe(IEnderIoRecipe.PAINTER_ID, DEFAULT_ENERGY_PER_TASK, new ItemStack(Blocks.cobblestone_wall), new ItemStack(
|
||||
EnderIO.blockPaintedWall, 1, 0));
|
||||
return Collections.singletonList(recipe);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package crazypants.enderio.material;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
@@ -13,6 +14,8 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||
import crazypants.enderio.EnderIO;
|
||||
import crazypants.enderio.EnderIOTab;
|
||||
import crazypants.enderio.ModObject;
|
||||
import crazypants.enderio.crafting.IEnderIoRecipe;
|
||||
import crazypants.enderio.crafting.impl.EnderIoRecipe;
|
||||
import crazypants.enderio.machine.MachineRecipeRegistry;
|
||||
import crazypants.enderio.machine.painter.BasicPainterTemplate;
|
||||
import crazypants.enderio.machine.painter.PainterUtil;
|
||||
@@ -88,11 +91,11 @@ public class ItemFusedQuartzFrame extends Item {
|
||||
return target != null && target.getItem() == EnderIO.itemFusedQuartzFrame;
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public List<IEnderIoRecipe> getAllRecipes() {
|
||||
// ItemStack is = new ItemStack(ModObject.itemFusedQuartzFrame.actualId, 1, 0);
|
||||
// IEnderIoRecipe recipe = new EnderIoRecipe(IEnderIoRecipe.PAINTER_ID, DEFAULT_ENERGY_PER_TASK, is, is);
|
||||
// return Collections.singletonList(recipe);
|
||||
// }
|
||||
@Override
|
||||
public List<IEnderIoRecipe> getAllRecipes() {
|
||||
ItemStack is = new ItemStack(EnderIO.itemFusedQuartzFrame, 1, 0);
|
||||
IEnderIoRecipe recipe = new EnderIoRecipe(IEnderIoRecipe.PAINTER_ID, DEFAULT_ENERGY_PER_TASK, is, is);
|
||||
return Collections.singletonList(recipe);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user