Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
...Not. Bwahahah.
- Loading branch information
Sunstrike
committed
Dec 1, 2013
1 parent
9ccbe48
commit a181dc9
Showing
2 changed files
with
78 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
package tconstruct.plugins.ic2; | ||
|
||
import net.minecraft.block.Block; | ||
import net.minecraft.item.Item; | ||
import net.minecraft.item.ItemStack; | ||
import net.minecraftforge.fluids.Fluid; | ||
import net.minecraftforge.fluids.FluidRegistry; | ||
import net.minecraftforge.fluids.FluidStack; | ||
import tconstruct.TConstruct; | ||
import tconstruct.common.TRepo; | ||
import tconstruct.library.TConstructRegistry; | ||
import tconstruct.library.crafting.LiquidCasting; | ||
import tconstruct.library.crafting.Smeltery; | ||
import tconstruct.plugins.ICompatPlugin; | ||
|
||
import java.util.Map; | ||
|
||
public class IC2 implements ICompatPlugin { | ||
|
||
private static final String IC2_UUM_FLUIDNAME = "uumatter"; | ||
private Fluid fluidUUM; | ||
|
||
@Override | ||
public String getModId() { | ||
return "IC2"; | ||
} | ||
|
||
@Override | ||
public void preInit() { | ||
|
||
} | ||
|
||
@Override | ||
public void init() { | ||
TConstruct.logger.info("[IC2] Preparing for shenanigans."); | ||
|
||
fluidUUM = FluidRegistry.getFluid(IC2_UUM_FLUIDNAME); | ||
if (fluidUUM == null) return; | ||
|
||
// Useful stuff | ||
ItemStack ingotCast = new ItemStack(TRepo.metalPattern, 1, 0); | ||
ItemStack gemCast = new ItemStack(TRepo.metalPattern, 1, 26); | ||
FluidStack fluidStack = new FluidStack(fluidUUM, 1); | ||
FluidStack fluidStackBlock = new FluidStack(fluidUUM, 9); | ||
LiquidCasting tableCasting = TConstructRegistry.getTableCasting(); | ||
LiquidCasting basinCasting = TConstructRegistry.getBasinCasting(); | ||
|
||
// Table casting | ||
tableCasting.addCastingRecipe(new ItemStack(Item.ingotIron), fluidStack, ingotCast, 20); | ||
tableCasting.addCastingRecipe(new ItemStack(Item.emerald), fluidStack, gemCast, 20); | ||
|
||
// Block casting | ||
basinCasting.addCastingRecipe(new ItemStack(Block.blockIron), fluidStackBlock, null, true, 50); // Iron convenience | ||
// Dirt <-> Diamonds | ||
basinCasting.addCastingRecipe(new ItemStack(Block.dirt), new FluidStack(fluidUUM, 500), new ItemStack(Block.blockDiamond), true, 50); | ||
basinCasting.addCastingRecipe(new ItemStack(Block.blockDiamond), fluidStackBlock, new ItemStack(Block.dirt), true, 50); | ||
// RS cycle | ||
basinCasting.addCastingRecipe(new ItemStack(Block.blockRedstone), fluidStack, new ItemStack(Item.redstone), true, 50); | ||
basinCasting.addCastingRecipe(new ItemStack(Block.hardenedClay, 14, 1), fluidStack, new ItemStack(Block.blockRedstone), true, 50); | ||
basinCasting.addCastingRecipe(new ItemStack(Item.dyePowder, 1, 1), fluidStack, new ItemStack(Block.hardenedClay, 14, 1), true, 50); | ||
basinCasting.addCastingRecipe(new ItemStack(Block.blockRedstone), fluidStack, new ItemStack(Item.dyePowder, 1, 1), true, 50); | ||
|
||
// Alloy Mixing | ||
// 1mB Anything + 1mB UU = 2mB UU | ||
for (Map.Entry<String, Fluid> ent : FluidRegistry.getRegisteredFluids().entrySet()) { | ||
if (ent.getValue() != fluidUUM) | ||
Smeltery.addAlloyMixing(new FluidStack(fluidUUM, 2), new FluidStack(fluidUUM, 1), new FluidStack(ent.getValue(), 1)); | ||
} | ||
} | ||
|
||
@Override | ||
public void postInit() { | ||
|
||
} | ||
|
||
} |