Added full OmniWrench support and partial IC2 wrench support
IC2 team: if you're reading this, ADD FREAKING SHIFT-RIGHT-CLICK FUNCTIONALITY TO YOUR STUPID WRENCH!
This commit is contained in:
parent
bde31f8d30
commit
1346f22e4e
4 changed files with 22 additions and 14 deletions
|
@ -1,6 +1,7 @@
|
|||
package assemblyline.common;
|
||||
|
||||
import ic2.api.Ic2Recipes;
|
||||
import ic2.api.Items;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.logging.Logger;
|
||||
|
@ -229,21 +230,21 @@ public class AssemblyLine
|
|||
{
|
||||
System.out.println("IC2 Found...adding IC2 recipes for Assembly Line.");
|
||||
// Armbot
|
||||
Ic2Recipes.addCraftingRecipe(new ItemStack(blockArmbot, 1), "II ", "SIS", "MCM", 'S', "advancedAlloy", 'C', "electronicCircuit", 'I', "ingotRefinedIron", 'M', "generator");
|
||||
Ic2Recipes.addCraftingRecipe(new ItemStack(blockArmbot, 1), "II ", "SIS", "MCM", 'S', Items.getItem("advancedAlloy"), 'C', Items.getItem("electronicCircuit"), 'I', "ingotRefinedIron", 'M', Items.getItem("generator"));
|
||||
// Disk
|
||||
Ic2Recipes.addCraftingRecipe(new ItemStack(itemDisk, 1), "III", "ICI", "III", 'I', itemImprint, 'C', "advancedCircuit");
|
||||
Ic2Recipes.addCraftingRecipe(new ItemStack(itemDisk, 1), "III", "ICI", "III", 'I', itemImprint, 'C', Items.getItem("advancedCircuit"));
|
||||
// Encoder
|
||||
Ic2Recipes.addCraftingRecipe(new ItemStack(blockEncoder, 1), "SIS", "SCS", "SSS", 'I', itemImprint, 'S', "ingotRefinedIron", 'C', "advancedCircuit");
|
||||
Ic2Recipes.addCraftingRecipe(new ItemStack(blockEncoder, 1), "SIS", "SCS", "SSS", 'I', itemImprint, 'S', "ingotRefinedIron", 'C', Items.getItem("advancedCircuit"));
|
||||
// Detector
|
||||
Ic2Recipes.addCraftingRecipe(new ItemStack(blockDetector, 1), "SES", "SCS", "S S", 'S', "ingotRefinedIron", 'C', "electronicCircuit", 'E', Item.eyeOfEnder);
|
||||
Ic2Recipes.addCraftingRecipe(new ItemStack(blockDetector, 1), "SES", "SCS", "S S", 'S', "ingotRefinedIron", 'C', Items.getItem("electronicCircuit"), 'E', Item.eyeOfEnder);
|
||||
// Conveyor Belt
|
||||
Ic2Recipes.addCraftingRecipe(new ItemStack(blockConveyorBelt, 10), "III", "WMW", 'I', "ingotRefinedIron", 'W', Block.planks, 'M', "generator");
|
||||
Ic2Recipes.addCraftingRecipe(new ItemStack(blockConveyorBelt, 10), "III", "WMW", 'I', "ingotRefinedIron", 'W', Block.planks, 'M', Items.getItem("generator"));
|
||||
// Rejector
|
||||
Ic2Recipes.addCraftingRecipe(new ItemStack(blockRejector, 1), "WPW", "@R@", '@', "ingotRefinedIron", 'R', Item.redstone, 'P', Block.pistonBase, 'C', "electronicCircuit", 'W', "insulatedCopperCableItem");
|
||||
Ic2Recipes.addCraftingRecipe(new ItemStack(blockRejector, 1), "WPW", "@R@", '@', "ingotRefinedIron", 'R', Item.redstone, 'P', Block.pistonBase, 'C', Items.getItem("electronicCircuit"), 'W', Items.getItem("insulatedCopperCableItem"));
|
||||
// Turntable
|
||||
Ic2Recipes.addCraftingRecipe(new ItemStack(blockTurntable, 1), "M", "P", 'M', "generator", 'P', Block.pistonBase);
|
||||
Ic2Recipes.addCraftingRecipe(new ItemStack(blockTurntable, 1), "M", "P", 'M', Items.getItem("generator"), 'P', Block.pistonBase);
|
||||
// Manipulator
|
||||
Ic2Recipes.addShapelessCraftingRecipe(new ItemStack(blockManipulator, 2), new Object[] { Block.dispenser, "electronicCircuit" });
|
||||
Ic2Recipes.addShapelessCraftingRecipe(new ItemStack(blockManipulator, 2), Block.dispenser, Items.getItem("electronicCircuit"));
|
||||
}
|
||||
|
||||
private void createStandardRecipes()
|
||||
|
|
|
@ -1,14 +1,12 @@
|
|||
package assemblyline.common.block;
|
||||
|
||||
import ic2.api.Items;
|
||||
import assemblyline.common.CommonProxy;
|
||||
import universalelectricity.core.implement.IItemElectric;
|
||||
import universalelectricity.prefab.BlockMachine;
|
||||
import universalelectricity.prefab.implement.IToolConfigurator;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.world.World;
|
||||
import universalelectricity.prefab.BlockMachine;
|
||||
import buildcraft.api.tools.IToolWrench;
|
||||
|
||||
public class BlockALMachine extends BlockMachine
|
||||
{
|
||||
|
@ -45,10 +43,16 @@ public class BlockALMachine extends BlockMachine
|
|||
{
|
||||
if (isHoldingWrench(player))
|
||||
{
|
||||
if (player.isSneaking())
|
||||
{
|
||||
if (this.onSneakMachineActivated(world, x, y, z, player, side, hitX, hitY, hitZ))
|
||||
return true;
|
||||
if (this.onSneakUseWrench(world, x, y, z, player, side, hitX, hitY, hitZ))
|
||||
return true;
|
||||
}
|
||||
return this.onUseWrench(world, x, y, z, player, side, hitX, hitY, hitZ);
|
||||
}
|
||||
}
|
||||
|
||||
return super.onBlockActivated(world, x, y, z, player, side, hitX, hitY, hitZ);
|
||||
}
|
||||
|
||||
|
@ -59,7 +63,7 @@ public class BlockALMachine extends BlockMachine
|
|||
{
|
||||
if (player.getCurrentEquippedItem() != null)
|
||||
{
|
||||
return (Items.getItem("wrench") != null && player.getCurrentEquippedItem().isItemEqual(Items.getItem("wrench")));
|
||||
return ((Items.getItem("wrench") != null && player.getCurrentEquippedItem().isItemEqual(Items.getItem("wrench"))) || player.getCurrentEquippedItem().getItem() instanceof IToolWrench);
|
||||
}
|
||||
|
||||
return false;
|
||||
|
|
|
@ -12,6 +12,7 @@ import net.minecraft.world.World;
|
|||
import universalelectricity.prefab.implement.IRedstoneReceptor;
|
||||
import assemblyline.api.IFilterable;
|
||||
import assemblyline.common.block.BlockALMachine;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
|
||||
/**
|
||||
* Extend this block class if a filter is allowed to be placed inside of this block.
|
||||
|
@ -83,6 +84,7 @@ public abstract class BlockImprintable extends BlockALMachine
|
|||
{
|
||||
((TileEntityFilterable) tileEntity).toggleInversion();
|
||||
world.markBlockForRenderUpdate(x, y, z);
|
||||
world.markBlockForUpdate(x, y, z);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -138,6 +138,7 @@ public abstract class TileEntityFilterable extends TileEntityAssemblyNetwork imp
|
|||
x = dis.readInt();
|
||||
y = dis.readInt();
|
||||
z = dis.readInt();
|
||||
this.worldObj.markBlockForRenderUpdate(x, y, z);
|
||||
NBTTagCompound tag = Packet.readNBTTagCompound(dis);
|
||||
readFromNBT(tag);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue