Skip to content

Commit

Permalink
Fixed slabs not placing against doubleslabs, closes #269
Browse files Browse the repository at this point in the history
Removed Arc Furance from rreative tab. My oversight, but users are stil la
bit dense.
fixed Villager selling the wrong wire
fixed steel not beign craftable into blocks and nuggets
  • Loading branch information
BluSunrize committed Aug 4, 2015
1 parent aae0fca commit 3bc2e46
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public void postInit(FMLPostInitializationEvent event)
for(IECompatModule compat : IECompatModule.modules)
if(Loader.isModLoaded(compat.modId))
compat.postInit();
IERecipes.postInitCrusherRecipes();
IERecipes.postInitCrusherAndArcRecipes();
}
@Mod.EventHandler
public void loadComplete(FMLLoadCompleteEvent event)
Expand Down
46 changes: 24 additions & 22 deletions src/main/java/blusunrize/immersiveengineering/common/IERecipes.java
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ else if(!OreDictionary.getOres("ingotCyanite").isEmpty())
addOredictRecipe(new ItemStack(IEContent.blockStoneDevice,2,4), " G ","IDI"," G ", 'G',"blockGlass",'I',"dustIron",'D',"dyeGreen");

addTwoWayStorageRecipe(new ItemStack(Items.iron_ingot), new ItemStack(IEContent.itemMetal,1,21));
for(int i=0; i<7; i++)
for(int i=0; i<=7; i++)
{
addTwoWayStorageRecipe(new ItemStack(IEContent.itemMetal,1,i), new ItemStack(IEContent.itemMetal,1,22+i));
addTwoWayStorageRecipe(new ItemStack(IEContent.blockStorage,1,i), new ItemStack(IEContent.itemMetal,1,i));
Expand Down Expand Up @@ -221,7 +221,7 @@ public static void addTwoWayStorageRecipe(ItemStack storage, ItemStack component
addOredictRecipe(storage, "III","III","III", 'I',component);
addShapelessOredictRecipe(Utils.copyStackWithAmount(component,9), storage);
}


public static void initFurnaceRecipes()
{
Expand Down Expand Up @@ -268,7 +268,7 @@ public static void initCrusherRecipes()

oreOutputModifier.put("Nickel", new ItemStack(IEContent.itemMetal,2,14));
oreOutputSecondaries.put("Nickel", new Object[]{"dustPlatinum",.1f});

addCrusherRecipe(new ItemStack(IEContent.itemMetal,1,15), "ingotConstantan", 3600, null,0);
addCrusherRecipe(new ItemStack(IEContent.itemMetal,1,16), "ingotElectrum", 3600, null,0);
addCrusherRecipe(new ItemStack(IEContent.itemMetal,1,19), "ingotHOPGraphite", 3600, null,0);
Expand Down Expand Up @@ -305,7 +305,7 @@ public static void initCrusherRecipes()
addItemToOreDictCrusherRecipe("dustCoal",1, new ItemStack(Items.coal), 2400);
addItemToOreDictCrusherRecipe("dustWood",2, "logWood", 1600);
}
public static void postInitCrusherRecipes()
public static void postInitCrusherAndArcRecipes()
{
for(String name : OreDictionary.getOreNames())
if(name.startsWith("ore"))
Expand All @@ -331,6 +331,16 @@ public static void postInitCrusherRecipes()
Float f = secondaries!=null&&secondaries.length>1&&secondaries[1] instanceof Float?(Float)secondaries[1]: 0;
addOreProcessingRecipe(out, ore, 6000, true, s, f);
}

out = arcOutputModifier.get(ore);
if(out==null)
{
ArrayList<ItemStack> ingots = OreDictionary.getOres("ingot"+ore);
if(!ingots.isEmpty())
out = Utils.copyStackWithAmount(ingots.get(0), 2);
}
if(out!=null)
addArcRecipe(out, "ore"+ore, 200,512, new ItemStack(IEContent.itemMaterial,1,13));
}
}

Expand Down Expand Up @@ -395,29 +405,21 @@ public static CrusherRecipe addItemToOreDictCrusherRecipe(String oreName, int ou
}



public static HashMap<String, ItemStack> arcOutputModifier = new HashMap<String, ItemStack>();
public static void initArcSmeltingRecipes()
{
//Steel
ArcFurnaceRecipe.addRecipe(new ItemStack(IEContent.itemMetal,1,7), "ingotIron", new ItemStack(IEContent.itemMaterial,1,13), 400,512, "dustCoke");
ArcFurnaceRecipe.addRecipe(new ItemStack(IEContent.itemMetal,1,7), "dustIron", new ItemStack(IEContent.itemMaterial,1,13), 400,512, "dustCoke");
//Vanilla+IE Ores
ArcFurnaceRecipe.addRecipe(new ItemStack(Items.iron_ingot,2), "oreIron", new ItemStack(IEContent.itemMaterial,1,13), 200,512);
ArcFurnaceRecipe.addRecipe(new ItemStack(Items.gold_ingot,2), "oreGold", new ItemStack(IEContent.itemMaterial,1,13), 200,512);
ArcFurnaceRecipe.addRecipe(new ItemStack(IEContent.itemMetal,2,0), "oreCopper", new ItemStack(IEContent.itemMaterial,1,13), 200,512);
ArcFurnaceRecipe.addRecipe(new ItemStack(IEContent.itemMetal,2,1), "oreAluminum", new ItemStack(IEContent.itemMaterial,1,13), 200,512);
ArcFurnaceRecipe.addRecipe(new ItemStack(IEContent.itemMetal,2,2), "oreLead", new ItemStack(IEContent.itemMaterial,1,13), 200,512);
ArcFurnaceRecipe.addRecipe(new ItemStack(IEContent.itemMetal,2,3), "oreSilver", new ItemStack(IEContent.itemMaterial,1,13), 200,512);
ArcFurnaceRecipe.addRecipe(new ItemStack(IEContent.itemMetal,2,4), "oreNickel", new ItemStack(IEContent.itemMaterial,1,13), 200,512);
//Other common ores
addArcOreSmelting("Tin");
addArcOreSmelting("Mithril");
addArcOreSmelting("Platinum");
addArcOreSmelting("Ardite");
addArcOreSmelting("Cobalt");
addArcOreSmelting("Zinc");
addArcOreSmelting("Uranium");
addArcOreSmelting("Yellorium");
arcOutputModifier.put("Iron", new ItemStack(Items.iron_ingot,2));
arcOutputModifier.put("Gold", new ItemStack(Items.gold_ingot,2));
arcOutputModifier.put("Copper", new ItemStack(IEContent.itemMetal,2,0));
arcOutputModifier.put("Aluminum", new ItemStack(IEContent.itemMetal,2,1));
arcOutputModifier.put("Aluminium", new ItemStack(IEContent.itemMetal,2,1));
arcOutputModifier.put("Lead", new ItemStack(IEContent.itemMetal,2,2));
arcOutputModifier.put("Silver", new ItemStack(IEContent.itemMetal,2,3));
arcOutputModifier.put("Nickel", new ItemStack(IEContent.itemMetal,2,4));
}
public static void addArcRecipe(ItemStack output, Object input, int time, int energyPerTick, ItemStack slag, Object... additives)
{
Expand All @@ -427,7 +429,7 @@ public static void addArcOreSmelting(String oreName)
{
if(!OreDictionary.getOres("ore"+oreName).isEmpty() && !OreDictionary.getOres("ingot"+oreName).isEmpty() )
{
ItemStack out = OreDictionary.getOres("ingot"+oreName).get(0);
ItemStack out = Utils.copyStackWithAmount(OreDictionary.getOres("ingot"+oreName).get(0), 2);
addArcRecipe(out, "ore"+oreName, 200,512, new ItemStack(IEContent.itemMaterial,1,13));
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ public IEVillagerTradeHandler()
addDeal(.4f, new ItemStack(IEContent.itemWireCoil,1,0),12,20, Items.emerald);
addDeal(.3f, Items.emerald,1,3, new ItemStack(IEContent.itemWireCoil,1,1),12,20);
addDeal(.3f, new ItemStack(IEContent.itemWireCoil,1,1),12,20, Items.emerald,1,3);
addDeal(.2f, Items.emerald,1,3, new ItemStack(IEContent.itemWireCoil,1,1),6,12);
addDeal(.2f, new ItemStack(IEContent.itemWireCoil,1,1),6,12, Items.emerald,1,3);
addDeal(.2f, Items.emerald,1,3, new ItemStack(IEContent.itemWireCoil,1,2),6,12);
addDeal(.2f, new ItemStack(IEContent.itemWireCoil,1,2),6,12, Items.emerald,1,3);

addDeal(.4f, Items.emerald,1,3, new ItemStack(IEContent.itemMaterial,1,11),2,6);
addDeal(.4f, new ItemStack(IEContent.itemMaterial,1,11),2,6, Items.emerald,1,3);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ else if(field_150939_a.equals(world.getBlock(x1,y1,z1)) && world.getBlockMetadat
--stack.stackSize;
return true;
}
return false;
else
return super.onItemUse(stack,player,world,x,y,z,side,hitX,hitY,hitZ);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public boolean allowHammerHarvest(int meta)
public void getSubBlocks(Item item, CreativeTabs tab, List list)
{
for(int i=0; i<subNames.length; i++)
if(i!=META_dieselGenerator && i!=META_refinery && i!=META_crusher && i!=META_bucketWheel && i!=META_excavator)
if(i!=META_dieselGenerator && i!=META_refinery && i!=META_crusher && i!=META_bucketWheel && i!=META_excavator && i!=META_arcFurnace)
list.add(new ItemStack(item, 1, i));
}

Expand Down Expand Up @@ -272,6 +272,22 @@ else if(tile.pos==9 && side.ordinal()==tile.facing)
return super.isSideSolid(world, x, y, z, side);
}

@Override
public boolean canConnectRedstone(IBlockAccess world, int x, int y, int z, int side)
{
if(world.getTileEntity(x, y, z) instanceof TileEntityDieselGenerator)
return ((TileEntityDieselGenerator)world.getTileEntity(x, y, z)).pos==21 || ((TileEntityDieselGenerator)world.getTileEntity(x, y, z)).pos==23;
if(world.getTileEntity(x, y, z) instanceof TileEntityRefinery)
return ((TileEntityRefinery)world.getTileEntity(x, y, z)).pos==9 && side==((TileEntityRefinery)world.getTileEntity(x, y, z)).facing;
if(world.getTileEntity(x, y, z) instanceof TileEntityCrusher)
return ((TileEntityCrusher)world.getTileEntity(x, y, z)).pos==9 && side==((TileEntityCrusher)world.getTileEntity(x, y, z)).facing;
if(world.getTileEntity(x, y, z) instanceof TileEntityExcavator)
return ((TileEntityExcavator)world.getTileEntity(x, y, z)).pos==3 || ((TileEntityExcavator)world.getTileEntity(x, y, z)).pos==5;
if(world.getTileEntity(x, y, z) instanceof TileEntityArcFurnace)
return ((TileEntityArcFurnace)world.getTileEntity(x, y, z)).pos==25;
return false;
}

@Override
public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ public void updateEntity()
if(!formed || pos!=62)
return;

// worldObj.spawnParticle("reddust", xCoord+.5+(facing==4?-2:facing==5?2:facing==(mirrored?2:3)?-2:2), yCoord+.5-1, zCoord+.5+(facing==2?-2:facing==3?2:facing==(mirrored?5:4)?-2:2), 0,0,0);
if(worldObj.isRemote)
return;
boolean update = false;
Expand Down

0 comments on commit 3bc2e46

Please sign in to comment.