Added separate recipes for IC2, vanilla, and BasicComponents

Fixed "buildlocal.bat". Dark, make a copy...
Tried fixing an imprinter bug; seems like a vanilla problem
This commit is contained in:
Brian Ricketts 2013-03-01 23:08:31 -06:00
parent 88c909c502
commit 6eb4a93b88
14 changed files with 278 additions and 111 deletions

View file

@ -12,15 +12,15 @@ runtime\bin\python\python_mcp runtime\reobfuscate.py %*
::ZIP-UP ::ZIP-UP
cd reobf\minecraft\ cd reobf\minecraft\
"..\..\..\7za.exe" a "..\..\builds\%FILE_NAME%" "*" 7z a "..\..\builds\%FILE_NAME%" "*"
cd ..\..\ cd ..\..\
cd resources\ cd resources\
"..\..\7za.exe" a "..\builds\%FILE_NAME%" "*" 7z a "..\builds\%FILE_NAME%" "*"
"..\..\7za.exe" a "..\builds\%BACKUP_NAME%" "*" -pdarkguardsman 7z a "..\builds\%BACKUP_NAME%" "*" -pdarkguardsman
cd ..\ cd ..\
cd src\ cd src\
"..\..\7za.exe" a "..\builds\%BACKUP_NAME%" "*\assemblyline\" -pdarkguardsman 7z a "..\builds\%BACKUP_NAME%" "*\assemblyline\" -pdarkguardsman
"..\..\7za.exe" a "..\builds\%API_NAME%" "*\assemblyline\api\" 7z a "..\builds\%API_NAME%" "*\assemblyline\api\"
cd ..\ cd ..\
echo Done building %FILE_NAME% for UE %UE_VERSION% echo Done building %FILE_NAME% for UE %UE_VERSION%

BIN
models/Crane/Arm.tcn Normal file

Binary file not shown.

BIN
models/Crane/Head.tcn Normal file

Binary file not shown.

BIN
models/Crane/MountPoint.tcn Normal file

Binary file not shown.

View file

@ -63,13 +63,16 @@ public class ClientProxy extends CommonProxy
{ {
TileEntity tileEntity = world.getBlockTileEntity(x, y, z); TileEntity tileEntity = world.getBlockTileEntity(x, y, z);
switch (ID) if (tileEntity != null)
{ {
case GUI_IMPRINTER: switch (ID)
return new GuiImprinter(player.inventory, (TileEntityImprinter) tileEntity); {
case GUI_ENCODER: case GUI_IMPRINTER:
if (tileEntity != null && tileEntity instanceof TileEntityEncoder) return new GuiImprinter(player.inventory, (TileEntityImprinter) tileEntity);
return new GuiEncoder(player.inventory, (TileEntityEncoder) tileEntity); case GUI_ENCODER:
if (tileEntity != null && tileEntity instanceof TileEntityEncoder)
return new GuiEncoder(player.inventory, (TileEntityEncoder) tileEntity);
}
} }
return null; return null;

View file

@ -0,0 +1,93 @@
package assemblyline.client.model;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
public class ModelCraneArmMount extends ModelBase
{
// fields
private ModelRenderer RailGuard1;
private ModelRenderer ArmMount;
private ModelRenderer RailGuard2;
private ModelRenderer Base;
private ModelRenderer WheelMount1;
private ModelRenderer Wheel2;
private ModelRenderer WheelMount2;
private ModelRenderer Wheel1;
public ModelCraneArmMount()
{
textureWidth = 64;
textureHeight = 64;
RailGuard1 = new ModelRenderer(this, 0, 20);
RailGuard1.addBox(0F, 0F, 0F, 16, 8, 2);
RailGuard1.setRotationPoint(-8F, 12F, 4F);
RailGuard1.setTextureSize(64, 32);
RailGuard1.mirror = true;
setRotation(RailGuard1, 0F, 0F, 0F);
ArmMount = new ModelRenderer(this, 36, 26);
ArmMount.addBox(0F, 0F, 0F, 8, 4, 2);
ArmMount.setRotationPoint(-4F, 4F, -8F);
ArmMount.setTextureSize(64, 32);
ArmMount.mirror = true;
setRotation(ArmMount, 0F, 0F, 0F);
RailGuard2 = new ModelRenderer(this, 0, 20);
RailGuard2.addBox(0F, 0F, 0F, 16, 8, 2);
RailGuard2.setRotationPoint(-8F, 12F, -6F);
RailGuard2.setTextureSize(64, 32);
RailGuard2.mirror = true;
setRotation(RailGuard2, 0F, 0F, 0F);
Base = new ModelRenderer(this, 0, 0);
Base.addBox(0F, 0F, 0F, 16, 4, 16);
Base.setRotationPoint(-8F, 8F, -8F);
Base.setTextureSize(64, 32);
Base.mirror = true;
setRotation(Base, 0F, 0F, 0F);
WheelMount1 = new ModelRenderer(this, 0, 30);
WheelMount1.addBox(0F, 0F, 0F, 14, 4, 4);
WheelMount1.setRotationPoint(-7F, 4F, 2F);
WheelMount1.setTextureSize(64, 32);
WheelMount1.mirror = true;
setRotation(WheelMount1, 0F, 0F, 0F);
Wheel2 = new ModelRenderer(this, 36, 20);
Wheel2.addBox(0F, 0F, 0F, 5, 4, 2);
Wheel2.setRotationPoint(1F, 6F, -1F);
Wheel2.setTextureSize(64, 32);
Wheel2.mirror = true;
setRotation(Wheel2, 0F, 0F, 0F);
WheelMount2 = new ModelRenderer(this, 0, 30);
WheelMount2.addBox(0F, 0F, 0F, 14, 4, 4);
WheelMount2.setRotationPoint(-7F, 4F, -6F);
WheelMount2.setTextureSize(64, 32);
WheelMount2.mirror = true;
setRotation(WheelMount2, 0F, 0F, 0F);
Wheel1 = new ModelRenderer(this, 36, 20);
Wheel1.addBox(0F, 0F, 0F, 5, 4, 2);
Wheel1.setRotationPoint(-6F, 6F, -1F);
Wheel1.setTextureSize(64, 32);
Wheel1.mirror = true;
setRotation(Wheel1, 0F, 0F, 0F);
}
public void render(float scale)
{
RailGuard1.render(scale);
ArmMount.render(scale);
RailGuard2.render(scale);
Base.render(scale);
WheelMount1.render(scale);
Wheel2.render(scale);
WheelMount2.render(scale);
Wheel1.render(scale);
}
private void setRotation(ModelRenderer model, float x, float y, float z)
{
model.rotateAngleX = x;
model.rotateAngleY = y;
model.rotateAngleZ = z;
}
}

View file

@ -6,32 +6,32 @@ import net.minecraft.client.model.ModelRenderer;
public class ModelLaserDrill extends ModelBase public class ModelLaserDrill extends ModelBase
{ {
// fields // fields
ModelRenderer Spitze; ModelRenderer Tip;
ModelRenderer Upper_plating; ModelRenderer Upper_plating;
ModelRenderer Middle_plating; ModelRenderer Middle_plating;
ModelRenderer Shape3_1; ModelRenderer Shape3_1;
ModelRenderer Shape3_2; ModelRenderer Shape3_2;
ModelRenderer Shape3_3; ModelRenderer Shape3_3;
ModelRenderer Shape3_4; ModelRenderer Shape3_4;
ModelRenderer lower_plating; ModelRenderer LowerPlating_1;
ModelRenderer lower_plating_2; ModelRenderer LowerPlating_2;
ModelRenderer Hubbel_1; ModelRenderer Bump_1;
ModelRenderer Hubbel_2; ModelRenderer Bump_2;
ModelRenderer Hubbel_3; ModelRenderer Bump_3;
ModelRenderer Hubbel_4; ModelRenderer Bump_4;
ModelRenderer Querbatzen; ModelRenderer Cross;
public ModelLaserDrill() public ModelLaserDrill()
{ {
textureWidth = 64; textureWidth = 64;
textureHeight = 32; textureHeight = 32;
Spitze = new ModelRenderer(this, 0, 8); Tip = new ModelRenderer(this, 0, 8);
Spitze.addBox(-1F, 0F, -1F, 2, 16, 2); Tip.addBox(-1F, 0F, -1F, 2, 16, 2);
Spitze.setRotationPoint(0F, 8F, 0F); Tip.setRotationPoint(0F, 8F, 0F);
Spitze.setTextureSize(64, 32); Tip.setTextureSize(64, 32);
Spitze.mirror = true; Tip.mirror = true;
setRotation(Spitze, 0F, 0F, 0F); setRotation(Tip, 0F, 0F, 0F);
Upper_plating = new ModelRenderer(this, 0, 0); Upper_plating = new ModelRenderer(this, 0, 0);
Upper_plating.addBox(-2F, 0F, -2F, 4, 1, 4); Upper_plating.addBox(-2F, 0F, -2F, 4, 1, 4);
Upper_plating.setRotationPoint(0F, 11F, 0F); Upper_plating.setRotationPoint(0F, 11F, 0F);
@ -68,66 +68,66 @@ public class ModelLaserDrill extends ModelBase
Shape3_4.setTextureSize(64, 32); Shape3_4.setTextureSize(64, 32);
Shape3_4.mirror = true; Shape3_4.mirror = true;
setRotation(Shape3_4, 0F, 0F, 0F); setRotation(Shape3_4, 0F, 0F, 0F);
lower_plating = new ModelRenderer(this, 40, 0); LowerPlating_1 = new ModelRenderer(this, 40, 0);
lower_plating.addBox(-2F, 0F, -2F, 4, 1, 4); LowerPlating_1.addBox(-2F, 0F, -2F, 4, 1, 4);
lower_plating.setRotationPoint(0F, 18F, 0F); LowerPlating_1.setRotationPoint(0F, 18F, 0F);
lower_plating.setTextureSize(64, 32); LowerPlating_1.setTextureSize(64, 32);
lower_plating.mirror = true; LowerPlating_1.mirror = true;
setRotation(lower_plating, 0F, 0F, 0F); setRotation(LowerPlating_1, 0F, 0F, 0F);
lower_plating_2 = new ModelRenderer(this, 40, 0); LowerPlating_2 = new ModelRenderer(this, 40, 0);
lower_plating_2.addBox(-2F, 0F, -2F, 4, 1, 4); LowerPlating_2.addBox(-2F, 0F, -2F, 4, 1, 4);
lower_plating_2.setRotationPoint(0F, 20F, 0F); LowerPlating_2.setRotationPoint(0F, 20F, 0F);
lower_plating_2.setTextureSize(64, 32); LowerPlating_2.setTextureSize(64, 32);
lower_plating_2.mirror = true; LowerPlating_2.mirror = true;
setRotation(lower_plating_2, 0F, 0F, 0F); setRotation(LowerPlating_2, 0F, 0F, 0F);
Hubbel_1 = new ModelRenderer(this, 56, 0); Bump_1 = new ModelRenderer(this, 56, 0);
Hubbel_1.addBox(-0.5F, -0.5F, -0.5F, 1, 4, 1); Bump_1.addBox(-0.5F, -0.5F, -0.5F, 1, 4, 1);
Hubbel_1.setRotationPoint(0F, 12F, 3F); Bump_1.setRotationPoint(0F, 12F, 3F);
Hubbel_1.setTextureSize(64, 32); Bump_1.setTextureSize(64, 32);
Hubbel_1.mirror = true; Bump_1.mirror = true;
setRotation(Hubbel_1, 0F, 0.7853982F, 0F); setRotation(Bump_1, 0F, 0.7853982F, 0F);
Hubbel_2 = new ModelRenderer(this, 56, 0); Bump_2 = new ModelRenderer(this, 56, 0);
Hubbel_2.addBox(-0.5F, -0.5F, -0.5F, 1, 4, 1); Bump_2.addBox(-0.5F, -0.5F, -0.5F, 1, 4, 1);
Hubbel_2.setRotationPoint(3F, 12F, 0F); Bump_2.setRotationPoint(3F, 12F, 0F);
Hubbel_2.setTextureSize(64, 32); Bump_2.setTextureSize(64, 32);
Hubbel_2.mirror = true; Bump_2.mirror = true;
setRotation(Hubbel_2, 0F, 0.7853982F, 0F); setRotation(Bump_2, 0F, 0.7853982F, 0F);
Hubbel_3 = new ModelRenderer(this, 56, 0); Bump_3 = new ModelRenderer(this, 56, 0);
Hubbel_3.addBox(-0.5F, -0.5F, -0.5F, 1, 4, 1); Bump_3.addBox(-0.5F, -0.5F, -0.5F, 1, 4, 1);
Hubbel_3.setRotationPoint(0F, 12F, -3F); Bump_3.setRotationPoint(0F, 12F, -3F);
Hubbel_3.setTextureSize(64, 32); Bump_3.setTextureSize(64, 32);
Hubbel_3.mirror = true; Bump_3.mirror = true;
setRotation(Hubbel_3, 0F, 0.7853982F, 0F); setRotation(Bump_3, 0F, 0.7853982F, 0F);
Hubbel_4 = new ModelRenderer(this, 56, 0); Bump_4 = new ModelRenderer(this, 56, 0);
Hubbel_4.addBox(-0.5F, -0.5F, -0.5F, 1, 4, 1); Bump_4.addBox(-0.5F, -0.5F, -0.5F, 1, 4, 1);
Hubbel_4.setRotationPoint(-3F, 12F, 0F); Bump_4.setRotationPoint(-3F, 12F, 0F);
Hubbel_4.setTextureSize(64, 32); Bump_4.setTextureSize(64, 32);
Hubbel_4.mirror = true; Bump_4.mirror = true;
setRotation(Hubbel_4, 0F, 0.7853982F, 0F); setRotation(Bump_4, 0F, 0.7853982F, 0F);
Querbatzen = new ModelRenderer(this, 14, 8); Cross = new ModelRenderer(this, 14, 8);
Querbatzen.addBox(-0.5F, -0.5F, -0.5F, 3, 1, 3); Cross.addBox(-0.5F, -0.5F, -0.5F, 3, 1, 3);
Querbatzen.setRotationPoint(-1.5F, 11F, 0F); Cross.setRotationPoint(-1.5F, 11F, 0F);
Querbatzen.setTextureSize(64, 32); Cross.setTextureSize(64, 32);
Querbatzen.mirror = true; Cross.mirror = true;
setRotation(Querbatzen, 0F, 0.7853982F, 0F); setRotation(Cross, 0F, 0.7853982F, 0F);
} }
public void render(float rotation, float f5) public void render(float rotation, float f5)
{ {
Spitze.render(f5); Tip.render(f5);
Upper_plating.render(f5); Upper_plating.render(f5);
Middle_plating.render(f5); Middle_plating.render(f5);
Shape3_1.render(f5); Shape3_1.render(f5);
Shape3_2.render(f5); Shape3_2.render(f5);
Shape3_3.render(f5); Shape3_3.render(f5);
Shape3_4.render(f5); Shape3_4.render(f5);
lower_plating.render(f5); LowerPlating_1.render(f5);
lower_plating_2.render(f5); LowerPlating_2.render(f5);
Hubbel_1.render(f5); Bump_1.render(f5);
Hubbel_2.render(f5); Bump_2.render(f5);
Hubbel_3.render(f5); Bump_3.render(f5);
Hubbel_4.render(f5); Bump_4.render(f5);
Querbatzen.render(f5); Cross.render(f5);
} }
private void setRotation(ModelRenderer model, float x, float y, float z) private void setRotation(ModelRenderer model, float x, float y, float z)

View file

@ -1,5 +1,7 @@
package assemblyline.common; package assemblyline.common;
import ic2.api.Ic2Recipes;
import java.io.File; import java.io.File;
import java.util.logging.Logger; import java.util.logging.Logger;
@ -93,8 +95,9 @@ public class AssemblyLine
public static Logger FMLog = Logger.getLogger(AssemblyLine.NAME); public static Logger FMLog = Logger.getLogger(AssemblyLine.NAME);
// TODO: MAKE THIS FALSE EVERY BUILD! //TODO: MAKE THIS FALSE EVERY BUILD!
public static final boolean DEBUG_MODE = false; public static final boolean DEBUG = false;
public static boolean REQUIRE_NO_POWER = false;
@PreInit @PreInit
public void preInit(FMLPreInitializationEvent event) public void preInit(FMLPreInitializationEvent event)
@ -119,6 +122,8 @@ public class AssemblyLine
itemImprint = new ItemImprinter(CONFIGURATION.getItem("Imprint", ITEM_ID_PREFIX).getInt()); itemImprint = new ItemImprinter(CONFIGURATION.getItem("Imprint", ITEM_ID_PREFIX).getInt());
itemDisk = new ItemDisk(CONFIGURATION.getItem("Disk", ITEM_ID_PREFIX + 1).getInt()); itemDisk = new ItemDisk(CONFIGURATION.getItem("Disk", ITEM_ID_PREFIX + 1).getInt());
REQUIRE_NO_POWER = DEBUG || !CONFIGURATION.get("general", "requirePower", true).getBoolean(true);
CONFIGURATION.save(); CONFIGURATION.save();
NetworkRegistry.instance().registerGuiHandler(this, this.proxy); NetworkRegistry.instance().registerGuiHandler(this, this.proxy);
@ -149,46 +154,105 @@ public class AssemblyLine
FMLog.info("Loaded: " + TranslationHelper.loadLanguages(LANGUAGE_PATH, LANGUAGES_SUPPORTED) + " languages."); FMLog.info("Loaded: " + TranslationHelper.loadLanguages(LANGUAGE_PATH, LANGUAGES_SUPPORTED) + " languages.");
// Crane Controller // Crane Controller
//GameRegistry.addRecipe(new ShapedOreRecipe(blockCraneController, new Object[] { "SFS", "MCM", "SMS", 'F', blockCraneFrame, 'S', "plateSteel", 'C', "advancedCircuit", 'I', "ingotSteel", 'M', "motor" })); // GameRegistry.addRecipe(new ShapedOreRecipe(blockCraneController, new Object[] { "SFS",
// "MCM", "SMS", 'F', blockCraneFrame, 'S', "plateSteel", 'C', "advancedCircuit", 'I',
// "ingotSteel", 'M', "motor" }));
// Crane Frame // Crane Frame
//GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(blockCraneFrame, 4), new Object[] { "ISI", "ISI", 'I', Item.ingotIron, 'S', Item.stick })); // GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(blockCraneFrame, 4), new
//GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(blockCraneFrame, 4), new Object[] { "ISI", "ISI", 'I', "ingotBronze", 'S', Item.stick })); // Object[] { "ISI", "ISI", 'I', Item.ingotIron, 'S', Item.stick }));
// GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(blockCraneFrame, 4), new
// Object[] { "ISI", "ISI", 'I', "ingotBronze", 'S', Item.stick }));
boolean ic2 = Loader.isModLoaded("IC2");
boolean ue = Loader.isModLoaded("BasicComponents");
createStandardRecipes();
if (ic2)
{
createIC2Recipes();
}
if (ue)
{
createUERecipes();
}
if (!ic2 && !ue)
{
createVanillaRecipes();
REQUIRE_NO_POWER = true;
}
}
private void createVanillaRecipes()
{
// Armbot
GameRegistry.addRecipe(new ShapedOreRecipe(blockArmbot, new Object[] { "II ", "SIS", "MCM", 'S', "ingotIron", 'C', Item.redstoneRepeater, 'I', "ingotIron", 'M', Block.pistonBase }));
// Disk
GameRegistry.addRecipe(new ShapedOreRecipe(itemDisk, new Object[] { "III", "ICI", "III", 'I', itemImprint, 'C', Item.redstoneRepeater }));
// Encoder
GameRegistry.addRecipe(new ShapedOreRecipe(blockEncoder, new Object[] { "SIS", "SCS", "SSS", 'I', itemImprint, 'S', "ingotIron", 'C', Item.redstoneRepeater }));
// Detector
GameRegistry.addRecipe(new ShapedOreRecipe(blockDetector, new Object[] { "SES", "SCS", "SPS", 'S', "ingotIron", 'C', Block.torchRedstoneActive, 'E', Item.eyeOfEnder }));
// Conveyor Belt
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(blockConveyorBelt, 10), new Object[] { "III", "WMW", 'I', "ingotIron", 'W', Block.wood, 'M', Block.pistonBase }));
// Rejector
GameRegistry.addRecipe(new ShapedOreRecipe(blockRejector, new Object[] { "WPW", "@R@", '@', "ingotIron", 'R', Item.redstone, 'P', Block.pistonBase, 'C', Block.torchRedstoneActive, 'W', Item.redstone }));
// Turntable
GameRegistry.addRecipe(new ShapedOreRecipe(blockTurntable, new Object[] { "P", "P", 'P', Block.pistonBase }));
// Manipulator
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(blockManipulator, 2), new Object[] { Block.dispenser, Block.torchRedstoneActive }));
}
private void createUERecipes()
{
// Armbot // Armbot
GameRegistry.addRecipe(new ShapedOreRecipe(blockArmbot, new Object[] { "II ", "SIS", "MCM", 'S', "plateSteel", 'C', "advancedCircuit", 'I', "ingotSteel", 'M', "motor" })); GameRegistry.addRecipe(new ShapedOreRecipe(blockArmbot, new Object[] { "II ", "SIS", "MCM", 'S', "plateSteel", 'C', "advancedCircuit", 'I', "ingotSteel", 'M', "motor" }));
// Disk // Disk
GameRegistry.addRecipe(new ShapedOreRecipe(itemDisk, new Object[] { "III", "ICI", "III", 'I', itemImprint, 'C', "advancedCircuit" })); GameRegistry.addRecipe(new ShapedOreRecipe(itemDisk, new Object[] { "III", "ICI", "III", 'I', itemImprint, 'C', "advancedCircuit" }));
// Encoder // Encoder
GameRegistry.addRecipe(new ShapedOreRecipe(blockEncoder, new Object[] { "SIS", "SCS", "SSS", 'I', itemImprint, 'S', "ingotSteel", 'C', "advancedCircuit" })); GameRegistry.addRecipe(new ShapedOreRecipe(blockEncoder, new Object[] { "SIS", "SCS", "SSS", 'I', itemImprint, 'S', "ingotSteel", 'C', "advancedCircuit" }));
// Imprint
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(itemImprint, 2), new Object[] { "R", "P", "I", 'P', Item.paper, 'R', Item.redstone, 'I', new ItemStack(Item.dyePowder, 1, 0) }));
// Imprinter (VANILLA)
GameRegistry.addRecipe(new ShapedOreRecipe(blockImprinter, new Object[] { "SIS", "SPS", "WCW", 'S', Item.ingotIron, 'C', Block.chest, 'W', Block.workbench, 'P', Block.pistonBase, 'I', new ItemStack(Item.dyePowder, 1, 0) }));
// Detector // Detector
GameRegistry.addRecipe(new ShapedOreRecipe(blockDetector, new Object[] { "SES", "SCS", "SPS", 'S', "ingotSteel", 'C', "basicCircuit", 'E', Item.eyeOfEnder })); GameRegistry.addRecipe(new ShapedOreRecipe(blockDetector, new Object[] { "SES", "SCS", "SPS", 'S', "ingotSteel", 'C', "basicCircuit", 'E', Item.eyeOfEnder }));
// Conveyor Belt
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(blockConveyorBelt, 10), new Object[] { "III", "WMW", 'I', "ingotSteel", 'W', Block.wood, 'M', "motor" }));
// Rejector
GameRegistry.addRecipe(new ShapedOreRecipe(blockRejector, new Object[] { "WPW", "@R@", '@', "ingotSteel", 'R', Item.redstone, 'P', Block.pistonBase, 'C', "basicCircuit", 'W', "copperWire" }));
// Turntable
GameRegistry.addRecipe(new ShapedOreRecipe(blockTurntable, new Object[] { "M", "P", 'M', "motor", 'P', Block.pistonBase }));
// Manipulator
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(blockManipulator, 2), new Object[] { Block.dispenser, "basicCircuit" }));
}
// Crate (VANILLA) private void createIC2Recipes()
{
// Armbot
Ic2Recipes.addCraftingRecipe(new ItemStack(blockArmbot, 1), new Object[] { "II ", "SIS", "MCM", 'S', "advancedAlloy", 'C', "electronicCircuit", 'I', "ingotRefinedIron", 'M', "generator" });
// Disk
Ic2Recipes.addCraftingRecipe(new ItemStack(itemDisk, 1), new Object[] { "III", "ICI", "III", 'I', itemImprint, 'C', "advancedCircuit" });
// Encoder
Ic2Recipes.addCraftingRecipe(new ItemStack(blockEncoder, 1), new Object[] { "SIS", "SCS", "SSS", 'I', itemImprint, 'S', "ingotRefinedIron", 'C', "advancedCircuit" });
// Detector
Ic2Recipes.addCraftingRecipe(new ItemStack(blockDetector, 1), new Object[] { "SES", "SCS", "SPS", 'S', "ingotRefinedIron", 'C', "electronicCircuit", 'E', Item.eyeOfEnder });
// Conveyor Belt
Ic2Recipes.addCraftingRecipe(new ItemStack(blockConveyorBelt, 10), new Object[] { "III", "WMW", 'I', "ingotRefinedIron", 'W', Block.wood, 'M', "generator" });
// Rejector
Ic2Recipes.addCraftingRecipe(new ItemStack(blockRejector, 1), new Object[] { "WPW", "@R@", '@', "ingotRefinedIron", 'R', Item.redstone, 'P', Block.pistonBase, 'C', "electronicCircuit", 'W', "insulatedCopperCableItem" });
// Turntable
Ic2Recipes.addCraftingRecipe(new ItemStack(blockTurntable, 1), new Object[] { "M", "P", 'M', "generator", 'P', Block.pistonBase });
// Manipulator
Ic2Recipes.addCraftingRecipe(new ItemStack(blockManipulator, 2), new Object[] { Block.dispenser, "electronicCircuit" });
}
private void createStandardRecipes()
{
// Imprint
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(itemImprint, 2), new Object[] { "R", "P", "I", 'P', Item.paper, 'R', Item.redstone, 'I', new ItemStack(Item.dyePowder, 1, 0) }));
// Imprinter
GameRegistry.addRecipe(new ShapedOreRecipe(blockImprinter, new Object[] { "SIS", "SPS", "WCW", 'S', Item.ingotIron, 'C', Block.chest, 'W', Block.workbench, 'P', Block.pistonBase, 'I', new ItemStack(Item.dyePowder, 1, 0) }));
// Crate
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(blockCrate, 1, 0), new Object[] { "TST", "S S", "TST", 'S', Item.ingotIron, 'T', Block.wood })); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(blockCrate, 1, 0), new Object[] { "TST", "S S", "TST", 'S', Item.ingotIron, 'T', Block.wood }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(blockCrate, 1, 1), new Object[] { "TST", "SCS", "TST", 'C', new ItemStack(blockCrate, 1, 0), 'S', Item.ingotIron, 'T', Block.wood })); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(blockCrate, 1, 1), new Object[] { "TST", "SCS", "TST", 'C', new ItemStack(blockCrate, 1, 0), 'S', Item.ingotIron, 'T', Block.wood }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(blockCrate, 1, 2), new Object[] { "TST", "SCS", "TST", 'C', new ItemStack(blockCrate, 1, 1), 'S', Item.ingotIron, 'T', Block.wood })); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(blockCrate, 1, 2), new Object[] { "TST", "SCS", "TST", 'C', new ItemStack(blockCrate, 1, 1), 'S', Item.ingotIron, 'T', Block.wood }));
// Conveyor Belt
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(blockConveyorBelt, 10), new Object[] { "III", "WMW", 'I', "ingotSteel", 'W', Block.wood, 'M', "motor" }));
// Rejector
GameRegistry.addRecipe(new ShapedOreRecipe(blockRejector, new Object[] { "WPW", "@R@", '@', "ingotSteel", 'R', Item.redstone, 'P', Block.pistonBase, 'C', "basicCircuit", 'W', "copperWire" }));
// Turntable
GameRegistry.addRecipe(new ShapedOreRecipe(blockTurntable, new Object[] { "M", "P", 'M', "motor", 'P', Block.pistonBase }));
// Manipulator
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(blockManipulator, 2), new Object[] { Block.dispenser, "basicCircuit" }));
} }
public static void printSidedData(String data) public static void printSidedData(String data)

View file

@ -1,5 +1,7 @@
package assemblyline.common; package assemblyline.common;
import ic2.api.Items;
import java.io.File; import java.io.File;
import java.io.FileInputStream; import java.io.FileInputStream;
import java.io.FileOutputStream; import java.io.FileOutputStream;
@ -118,14 +120,17 @@ public class CommonProxy implements IGuiHandler
{ {
TileEntity tileEntity = world.getBlockTileEntity(x, y, z); TileEntity tileEntity = world.getBlockTileEntity(x, y, z);
switch (ID) if (tileEntity != null)
{ {
case GUI_IMPRINTER: switch (ID)
return new ContainerImprinter(player.inventory, (TileEntityImprinter) tileEntity);
case GUI_ENCODER:
{ {
if (tileEntity != null && tileEntity instanceof TileEntityEncoder) case GUI_IMPRINTER:
return new ContainerEncoder(player.inventory, (TileEntityEncoder) tileEntity); return new ContainerImprinter(player.inventory, (TileEntityImprinter) tileEntity);
case GUI_ENCODER:
{
if (tileEntity != null && tileEntity instanceof TileEntityEncoder)
return new ContainerEncoder(player.inventory, (TileEntityEncoder) tileEntity);
}
} }
} }
@ -149,6 +154,6 @@ public class CommonProxy implements IGuiHandler
{ {
return false; return false;
} }
return player.getCurrentEquippedItem().getItem() instanceof IToolWrench; return player.getCurrentEquippedItem().getItem() instanceof IToolWrench || (Items.getItem("wrench") != null && player.getCurrentEquippedItem().isItemEqual(Items.getItem("wrench")));
} }
} }

View file

@ -23,7 +23,7 @@ public abstract class TileEntityAssemblyNetwork extends TIC2Runnable
public boolean isRunning() public boolean isRunning()
{ {
return AssemblyLine.DEBUG_MODE || this.powerTransferRange > 0 || this.wattsReceived > this.getRequest().getWatts(); return AssemblyLine.REQUIRE_NO_POWER || this.powerTransferRange > 0 || this.wattsReceived > this.getRequest().getWatts();
} }
public void updatePowerTransferRange() public void updatePowerTransferRange()

View file

@ -206,6 +206,8 @@ public class TileEntityImprinter extends TileEntityAdvanced implements ISidedInv
@Override @Override
public boolean isUseableByPlayer(EntityPlayer player) public boolean isUseableByPlayer(EntityPlayer player)
{ {
if (this.worldObj.getBlockTileEntity(xCoord, yCoord, zCoord) != this)
return false;
return true; return true;
} }