aboutsummaryrefslogtreecommitdiff
path: root/src/Java
diff options
context:
space:
mode:
authorDraknyte1 <Draknyte1@hotmail.com>2016-06-26 22:28:21 +1000
committerDraknyte1 <Draknyte1@hotmail.com>2016-06-26 22:28:21 +1000
commit87bfa35039be5fae405619baa0fbb05d4b1cf491 (patch)
tree3b9c66ee14c44e9b47a4f758640417ac244d110d /src/Java
parent0cb9dc85ec330225e27fc946ab16d712ad2ba03d (diff)
downloadGT5-Unofficial-87bfa35039be5fae405619baa0fbb05d4b1cf491.tar.gz
GT5-Unofficial-87bfa35039be5fae405619baa0fbb05d4b1cf491.tar.bz2
GT5-Unofficial-87bfa35039be5fae405619baa0fbb05d4b1cf491.zip
+Electric Blast Furnace clone - For Testing
+Added Blazing Pyrotheum +Added Gelid Cryotheum +Added Blizz Rods
Diffstat (limited to 'src/Java')
-rw-r--r--src/Java/miscutil/MiscUtils.java6
-rw-r--r--src/Java/miscutil/core/common/CommonProxy.java4
-rw-r--r--src/Java/miscutil/core/handler/COMPAT_HANDLER.java2
-rw-r--r--src/Java/miscutil/core/handler/COMPAT_IntermodStaging.java29
-rw-r--r--src/Java/miscutil/core/handler/registration/gregtech/GregtechSteamCondenser.java2
-rw-r--r--src/Java/miscutil/core/intermod/growthcraft/HANDLER_Growthcraft.java (renamed from src/Java/miscutil/core/intermod/growthcraft/Growthcraft_Handler.java)10
-rw-r--r--src/Java/miscutil/core/intermod/thermalfoundation/HANDLER_ThermalFoundation.java37
-rw-r--r--src/Java/miscutil/core/intermod/thermalfoundation/block/TF_Block_Fluid_Cryotheum.java187
-rw-r--r--src/Java/miscutil/core/intermod/thermalfoundation/block/TF_Block_Fluid_Pyrotheum.java180
-rw-r--r--src/Java/miscutil/core/intermod/thermalfoundation/block/TF_Blocks.java26
-rw-r--r--src/Java/miscutil/core/intermod/thermalfoundation/fluid/TF_Fluids.java42
-rw-r--r--src/Java/miscutil/core/intermod/thermalfoundation/item/TF_Items.java66
-rw-r--r--src/Java/miscutil/core/intermod/thermalfoundation/recipe/TF_Gregtech_Recipes.java48
-rw-r--r--src/Java/miscutil/core/lib/LoadedMods.java20
-rw-r--r--src/Java/miscutil/gregtech/HANDLER_Gregtech.java26
-rw-r--r--src/Java/miscutil/gregtech/api/enums/GregtechItemList.java5
-rw-r--r--src/Java/miscutil/gregtech/api/enums/GregtechOrePrefixes.java1374
-rw-r--r--src/Java/miscutil/gregtech/common/Meta_GT_Proxy.java84
-rw-r--r--src/Java/miscutil/gregtech/common/blocks/fluid/GregtechFluidHandler.java35
-rw-r--r--src/Java/miscutil/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntityElectricBlastFurnace.java236
20 files changed, 1722 insertions, 697 deletions
diff --git a/src/Java/miscutil/MiscUtils.java b/src/Java/miscutil/MiscUtils.java
index 9281429a91..ba9cf34692 100644
--- a/src/Java/miscutil/MiscUtils.java
+++ b/src/Java/miscutil/MiscUtils.java
@@ -1,13 +1,18 @@
package miscutil;
+import gregtech.api.util.GT_Config;
+
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
+import java.io.File;
import miscutil.core.commands.CommandMath;
import miscutil.core.common.CommonProxy;
import miscutil.core.lib.CORE;
import miscutil.core.util.Utils;
+import miscutil.gregtech.HANDLER_Gregtech;
import net.minecraftforge.common.MinecraftForge;
+import net.minecraftforge.common.config.Configuration;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
@@ -37,6 +42,7 @@ implements ActionListener
Utils.LOG_INFO("Loading "+CORE.MODID+" V"+CORE.VERSION);
proxy.registerTileEntities();
proxy.registerRenderThings();
+ HANDLER_Gregtech.mMaterialProperties = new GT_Config(new Configuration(new File(new File(event.getModConfigurationDirectory(), "MiscUtils"), "MaterialProperties.cfg")));
proxy.preInit(event);
}
diff --git a/src/Java/miscutil/core/common/CommonProxy.java b/src/Java/miscutil/core/common/CommonProxy.java
index ac1aa32801..3197eaffca 100644
--- a/src/Java/miscutil/core/common/CommonProxy.java
+++ b/src/Java/miscutil/core/common/CommonProxy.java
@@ -36,6 +36,7 @@ public class CommonProxy {
Utils.LOG_WARNING("Development mode not set.");
}
AddToCreativeTab.initialiseTabs();
+ COMPAT_IntermodStaging.preInit();
//Apparently I should do this here. Might put it in Init for a test.
//Growthcraft_Handler.run();
}
@@ -53,7 +54,7 @@ public class CommonProxy {
COMPAT_HANDLER.registerMyModsOreDictEntries();
COMPAT_HANDLER.registerGregtechMachines();
COMPAT_HANDLER.intermodOreDictionarySupport();
- COMPAT_IntermodStaging.load();
+ COMPAT_IntermodStaging.init();
}
public void postInit(FMLPostInitializationEvent e) {
@@ -63,6 +64,7 @@ public class CommonProxy {
COMPAT_HANDLER.InitialiseHandlerThenAddRecipes();
COMPAT_HANDLER.RemoveRecipesFromOtherMods();
COMPAT_HANDLER.startLoadingGregAPIBasedRecipes();
+ COMPAT_IntermodStaging.postInit();
}
diff --git a/src/Java/miscutil/core/handler/COMPAT_HANDLER.java b/src/Java/miscutil/core/handler/COMPAT_HANDLER.java
index 4ab66d3099..a62d7c6734 100644
--- a/src/Java/miscutil/core/handler/COMPAT_HANDLER.java
+++ b/src/Java/miscutil/core/handler/COMPAT_HANDLER.java
@@ -121,7 +121,7 @@ public class COMPAT_HANDLER {
}
if (LoadedMods.IndustrialCraft2){
COMPAT_IC2.OreDict();
- }
+ }
}
public static void RemoveRecipesFromOtherMods(){
diff --git a/src/Java/miscutil/core/handler/COMPAT_IntermodStaging.java b/src/Java/miscutil/core/handler/COMPAT_IntermodStaging.java
index b3c7934c9a..668487c5b7 100644
--- a/src/Java/miscutil/core/handler/COMPAT_IntermodStaging.java
+++ b/src/Java/miscutil/core/handler/COMPAT_IntermodStaging.java
@@ -1,18 +1,27 @@
package miscutil.core.handler;
-import growthcraft.core.GrowthCraftCore;
-import miscutil.core.intermod.growthcraft.Growthcraft_Handler;
-import miscutil.core.lib.LoadedMods;
+import miscutil.core.intermod.growthcraft.HANDLER_Growthcraft;
+import miscutil.core.intermod.thermalfoundation.HANDLER_ThermalFoundation;
+import miscutil.gregtech.HANDLER_Gregtech;
public class COMPAT_IntermodStaging {
- public static void load(){
- if (LoadedMods.Growthcraft || GrowthCraftCore.instance != null){
- Growthcraft_Handler.run();
- }
-
+ public static void preInit(){
+ HANDLER_Growthcraft.preInit();
+ HANDLER_ThermalFoundation.preInit();
+ HANDLER_Gregtech.preInit();
}
-
-
+
+ public static void init(){
+ HANDLER_ThermalFoundation.Init();
+ HANDLER_Gregtech.init();
+ }
+
+ public static void postInit(){
+ HANDLER_ThermalFoundation.postInit();
+ HANDLER_Gregtech.postInit();
+ }
+
+
}
diff --git a/src/Java/miscutil/core/handler/registration/gregtech/GregtechSteamCondenser.java b/src/Java/miscutil/core/handler/registration/gregtech/GregtechSteamCondenser.java
index afc899410b..781daccde3 100644
--- a/src/Java/miscutil/core/handler/registration/gregtech/GregtechSteamCondenser.java
+++ b/src/Java/miscutil/core/handler/registration/gregtech/GregtechSteamCondenser.java
@@ -3,6 +3,7 @@ package miscutil.core.handler.registration.gregtech;
import miscutil.core.util.Utils;
import miscutil.gregtech.api.enums.GregtechItemList;
import miscutil.gregtech.api.metatileentity.implementations.GregtechMetaCondensor;
+import miscutil.gregtech.common.tileentities.machines.multi.GregtechMetaTileEntityElectricBlastFurnace;
import miscutil.gregtech.common.tileentities.machines.multi.GregtechMetaTileEntityIronBlastFurnace;
public class GregtechSteamCondenser
@@ -27,6 +28,7 @@ public class GregtechSteamCondenser
GregtechItemList.Machine_Iron_BlastFurnace.set(new GregtechMetaTileEntityIronBlastFurnace(768, "ironmachine.blastfurnace", "Iron Plated Blast Furnace").getStackForm(1L));
+ GregtechItemList.Machine_Electric_BlastFurnace.set(new GregtechMetaTileEntityElectricBlastFurnace(796, "electric.blastfurnace", "Electric Blast Furnace").getStackForm(1L));
//ItemUtils.recipeBuilder(slot_1, slot_2, slot_3, slot_4, slot_5, slot_6, slot_7, slot_8, slot_9, resultItem);
diff --git a/src/Java/miscutil/core/intermod/growthcraft/Growthcraft_Handler.java b/src/Java/miscutil/core/intermod/growthcraft/HANDLER_Growthcraft.java
index 96912df9bc..9ff80c735a 100644
--- a/src/Java/miscutil/core/intermod/growthcraft/Growthcraft_Handler.java
+++ b/src/Java/miscutil/core/intermod/growthcraft/HANDLER_Growthcraft.java
@@ -7,7 +7,9 @@ import growthcraft.cellar.item.ItemBoozeBottle;
import growthcraft.cellar.item.ItemBoozeBucketDEPRECATED;
import growthcraft.cellar.item.ItemBucketBooze;
import growthcraft.cellar.utils.BoozeRegistryHelper;
+import growthcraft.core.GrowthCraftCore;
import growthcraft.hops.GrowthCraftHops;
+import miscutil.core.lib.LoadedMods;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.potion.Potion;
@@ -15,7 +17,7 @@ import net.minecraftforge.fluids.Fluid;
import net.minecraftforge.fluids.FluidRegistry;
import cpw.mods.fml.common.registry.GameRegistry;
-public class Growthcraft_Handler {
+public class HANDLER_Growthcraft {
public static BlockFluidBooze[] jackDanielsWhiskeyFluids;
public static Item jackDaniels;
@@ -28,8 +30,10 @@ public class Growthcraft_Handler {
private static int internalColour = 0000000;
//Run me during Pre-Init
- public static void run(){
- start();
+ public static void preInit(){
+ if (LoadedMods.Growthcraft || GrowthCraftCore.instance != null){
+ start();
+ }
}
private static void start(){
diff --git a/src/Java/miscutil/core/intermod/thermalfoundation/HANDLER_ThermalFoundation.java b/src/Java/miscutil/core/intermod/thermalfoundation/HANDLER_ThermalFoundation.java
new file mode 100644
index 0000000000..e5eb609fe8
--- /dev/null
+++ b/src/Java/miscutil/core/intermod/thermalfoundation/HANDLER_ThermalFoundation.java
@@ -0,0 +1,37 @@
+package miscutil.core.intermod.thermalfoundation;
+
+import miscutil.core.intermod.thermalfoundation.block.TF_Blocks;
+import miscutil.core.intermod.thermalfoundation.fluid.TF_Fluids;
+import miscutil.core.intermod.thermalfoundation.item.TF_Items;
+import miscutil.core.intermod.thermalfoundation.recipe.TF_Gregtech_Recipes;
+import miscutil.core.lib.LoadedMods;
+
+public class HANDLER_ThermalFoundation {
+
+ public static void preInit(){
+ if (LoadedMods.CoFHCore){
+ TF_Fluids.preInit();
+ TF_Items.preInit();
+ TF_Blocks.preInit();
+ }
+ }
+
+ public static void Init(){
+ if (LoadedMods.CoFHCore){
+ TF_Fluids.init();
+ TF_Items.init();
+ TF_Blocks.init();
+ }
+ }
+
+ public static void postInit(){
+ if (LoadedMods.CoFHCore){
+ TF_Fluids.postInit();
+ TF_Items.postInit();
+ TF_Blocks.postInit();
+ if(LoadedMods.Gregtech){
+ TF_Gregtech_Recipes.run();
+ }
+ }
+ }
+}
diff --git a/src/Java/miscutil/core/intermod/thermalfoundation/block/TF_Block_Fluid_Cryotheum.java b/src/Java/miscutil/core/intermod/thermalfoundation/block/TF_Block_Fluid_Cryotheum.java
new file mode 100644
index 0000000000..cc9094714e
--- /dev/null
+++ b/src/Java/miscutil/core/intermod/thermalfoundation/block/TF_Block_Fluid_Cryotheum.java
@@ -0,0 +1,187 @@
+package miscutil.core.intermod.thermalfoundation.block;
+
+import java.util.Random;
+
+import miscutil.core.intermod.thermalfoundation.fluid.TF_Fluids;
+import net.minecraft.block.Block;
+import net.minecraft.block.material.MapColor;
+import net.minecraft.block.material.Material;
+import net.minecraft.block.material.MaterialLiquid;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.EntityLivingBase;
+import net.minecraft.entity.monster.EntityBlaze;
+import net.minecraft.entity.monster.EntityCreeper;
+import net.minecraft.entity.monster.EntitySnowman;
+import net.minecraft.entity.monster.EntityZombie;
+import net.minecraft.init.Blocks;
+import net.minecraft.potion.Potion;
+import net.minecraft.potion.PotionEffect;
+import net.minecraft.world.IBlockAccess;
+import net.minecraft.world.World;
+import net.minecraftforge.common.util.ForgeDirection;
+import cofh.core.fluid.BlockFluidInteractive;
+import cofh.lib.util.BlockWrapper;
+import cofh.lib.util.helpers.DamageHelper;
+import cofh.lib.util.helpers.ServerHelper;
+import cpw.mods.fml.common.registry.GameRegistry;
+
+public class TF_Block_Fluid_Cryotheum
+ extends BlockFluidInteractive
+{
+ Random random = new Random();
+ public static final int LEVELS = 5;
+ public static final Material materialFluidCryotheum = new MaterialLiquid(MapColor.iceColor);
+ private static boolean enableSourceFall = true;
+ private static boolean effect = true;
+
+ public TF_Block_Fluid_Cryotheum()
+ {
+ super("MiscUtils", TF_Fluids.fluidCryotheum, materialFluidCryotheum, "cryotheum");
+ setQuantaPerBlock(5);
+ setTickRate(15);
+
+ setHardness(1000.0F);
+ setLightOpacity(1);
+ setParticleColor(0.15F, 0.7F, 1.0F);
+ }
+
+ public boolean preInit()
+ {
+ GameRegistry.registerBlock(this, "FluidCryotheum");
+
+ addInteraction(Blocks.grass, Blocks.dirt);
+ addInteraction(Blocks.water, 0, Blocks.ice);
+ addInteraction(Blocks.water, Blocks.snow);
+ addInteraction(Blocks.flowing_water, 0, Blocks.ice);
+ addInteraction(Blocks.flowing_water, Blocks.snow);
+ addInteraction(Blocks.lava, 0, Blocks.obsidian);
+ addInteraction(Blocks.lava, Blocks.stone);
+ addInteraction(Blocks.flowing_lava, 0, Blocks.obsidian);
+ addInteraction(Blocks.flowing_lava, Blocks.stone);
+ addInteraction(Blocks.leaves, Blocks.air);
+ addInteraction(Blocks.tallgrass, Blocks.air);
+ addInteraction(Blocks.fire, Blocks.air);
+ //addInteraction(TFBlocks.blockFluidGlowstone, 0, Blocks.glowstone);
+
+ String str1 = "Fluid.Cryotheum";
+ String str2 = "Enable this for Fluid Cryotheum to be worse than lava, except cold.";
+ effect = true;
+
+ str2 = "Enable this for Fluid Cryotheum Source blocks to gradually fall downwards.";
+ enableSourceFall = true;
+
+ return true;
+ }
+
+ public void onEntityCollidedWithBlock(World paramWorld, int paramInt1, int paramInt2, int paramInt3, Entity paramEntity)
+ {
+ paramEntity.extinguish();
+ if (!effect) {
+ return;
+ }
+ if ((paramEntity.motionY < -0.05D) || (paramEntity.motionY > 0.05D)) {
+ paramEntity.motionY *= 0.05D;
+ }
+ if ((paramEntity.motionZ < -0.05D) || (paramEntity.motionZ > 0.05D)) {
+ paramEntity.motionZ *= 0.05D;
+ }
+ if ((paramEntity.motionX < -0.05D) || (paramEntity.motionX > 0.05D)) {
+ paramEntity.motionX *= 0.05D;
+ }
+ if (ServerHelper.isClientWorld(paramWorld)) {
+ return;
+ }
+ if (paramWorld.getTotalWorldTime() % 8L != 0L) {
+ return;
+ }
+ if (((paramEntity instanceof EntityZombie)) || ((paramEntity instanceof EntityCreeper)))
+ {
+ EntitySnowman localEntitySnowman = new EntitySnowman(paramWorld);
+ localEntitySnowman.setLocationAndAngles(paramEntity.posX, paramEntity.posY, paramEntity.posZ, paramEntity.rotationYaw, paramEntity.rotationPitch);
+ paramWorld.spawnEntityInWorld(localEntitySnowman);
+
+ paramEntity.setDead();
+ }
+ else if (/*((paramEntity instanceof EntityBlizz)) ||*/((paramEntity instanceof EntitySnowman)))
+ {
+ ((EntityLivingBase)paramEntity).addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 120, 0));
+ ((EntityLivingBase)paramEntity).addPotionEffect(new PotionEffect(Potion.regeneration.id, 120, 0));
+ }
+ else if ((paramEntity instanceof EntityBlaze))
+ {
+ paramEntity.attackEntityFrom(DamageHelper.cryotheum, 10.0F);
+ }
+ else
+ {
+ boolean bool = paramEntity.velocityChanged;
+ paramEntity.attackEntityFrom(DamageHelper.cryotheum, 2.0F);
+ paramEntity.velocityChanged = bool;
+ }
+ }
+
+ public int getLightValue(IBlockAccess paramIBlockAccess, int paramInt1, int paramInt2, int paramInt3)
+ {
+ return TF_Fluids.fluidCryotheum.getLuminosity();
+ }
+
+ public void updateTick(World paramWorld, int paramInt1, int paramInt2, int paramInt3, Random paramRandom)
+ {
+ if (effect) {
+ checkForInteraction(paramWorld, paramInt1, paramInt2, paramInt3);
+ }
+ if ((enableSourceFall) && (paramWorld.getBlockMetadata(paramInt1, paramInt2, paramInt3) == 0))
+ {
+ Block localBlock = paramWorld.getBlock(paramInt1, paramInt2 + this.densityDir, paramInt3);
+ int i = paramWorld.getBlockMetadata(paramInt1, paramInt2 + this.densityDir, paramInt3);
+ if ((localBlock == this) && (i != 0))
+ {
+ paramWorld.setBlock(paramInt1, paramInt2 + this.densityDir, paramInt3, this, 0, 3);
+ paramWorld.setBlockToAir(paramInt1, paramInt2, paramInt3);
+ return;
+ }
+ }
+ super.updateTick(paramWorld, paramInt1, paramInt2, paramInt3, paramRandom);
+ }
+
+ protected void checkForInteraction(World paramWorld, int paramInt1, int paramInt2, int paramInt3)
+ {
+ if (paramWorld.getBlock(paramInt1, paramInt2, paramInt3) != this) {
+ return;
+ }
+ int i = paramInt1;
+ int j = paramInt2;
+ int k = paramInt3;
+ for (int m = 0; m < 6; m++)
+ {
+ i = paramInt1 + cofh.lib.util.helpers.BlockHelper.SIDE_COORD_MOD[m][0];
+ j = paramInt2 + cofh.lib.util.helpers.BlockHelper.SIDE_COORD_MOD[m][1];
+ k = paramInt3 + cofh.lib.util.helpers.BlockHelper.SIDE_COORD_MOD[m][2];
+
+ interactWithBlock(paramWorld, i, j, k);
+ }
+ interactWithBlock(paramWorld, paramInt1 - 1, paramInt2, paramInt3 - 1);
+ interactWithBlock(paramWorld, paramInt1 - 1, paramInt2, paramInt3 + 1);
+ interactWithBlock(paramWorld, paramInt1 + 1, paramInt2, paramInt3 - 1);
+ interactWithBlock(paramWorld, paramInt1 + 1, paramInt2, paramInt3 + 1);
+ }
+
+ protected void interactWithBlock(World paramWorld, int paramInt1, int paramInt2, int paramInt3)
+ {
+ Block localBlock = paramWorld.getBlock(paramInt1, paramInt2, paramInt3);
+ if ((localBlock == Blocks.air) || (localBlock == this)) {
+ return;
+ }
+ int i = paramWorld.getBlockMetadata(paramInt1, paramInt2, paramInt3);
+ if (hasInteraction(localBlock, i))
+ {
+ BlockWrapper localBlockWrapper = getInteraction(localBlock, i);
+ paramWorld.setBlock(paramInt1, paramInt2, paramInt3, localBlockWrapper.block, localBlockWrapper.metadata, 3);
+ }
+ else if ((paramWorld.isSideSolid(paramInt1, paramInt2, paramInt3, ForgeDirection.UP)) && (paramWorld.isAirBlock(paramInt1, paramInt2 + 1, paramInt3)))
+ {
+ paramWorld.setBlock(paramInt1, paramInt2 + 1, paramInt3, Blocks.snow_layer, 0, 3);
+ }
+ }
+
+ protected void triggerInteractionEffects(World paramWorld, int paramInt1, int paramInt2, int paramInt3) {}
+}
diff --git a/src/Java/miscutil/core/intermod/thermalfoundation/block/TF_Block_Fluid_Pyrotheum.java b/src/Java/miscutil/core/intermod/thermalfoundation/block/TF_Block_Fluid_Pyrotheum.java
new file mode 100644
index 0000000000..461f4cdbef
--- /dev/null
+++ b/src/Java/miscutil/core/intermod/thermalfoundation/block/TF_Block_Fluid_Pyrotheum.java
@@ -0,0 +1,180 @@
+package miscutil.core.intermod.thermalfoundation.block;
+
+import java.util.Random;
+
+import miscutil.core.intermod.thermalfoundation.fluid.TF_Fluids;
+import net.minecraft.block.Block;
+import net.minecraft.block.material.MapColor;
+import net.minecraft.block.material.Material;
+import net.minecraft.block.material.MaterialLiquid;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.monster.EntityCreeper;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.init.Blocks;
+import net.minecraft.world.IBlockAccess;
+import net.minecraft.world.World;
+import net.minecraftforge.common.util.ForgeDirection;
+import cofh.core.fluid.BlockFluidInteractive;
+import cofh.lib.util.BlockWrapper;
+import cofh.lib.util.helpers.ServerHelper;
+import cpw.mods.fml.common.registry.GameRegistry;
+
+public class TF_Block_Fluid_Pyrotheum
+ extends BlockFluidInteractive
+{
+ Random random = new Random();
+ public static final int LEVELS = 5;
+ public static final Material materialFluidPyrotheum = new MaterialLiquid(MapColor.tntColor);
+ private static boolean effect = true;
+ private static boolean enableSourceFall = true;
+
+ public TF_Block_Fluid_Pyrotheum()
+ {
+ super("MiscUtils", TF_Fluids.fluidPyrotheum, Material.lava, "pyrotheum");
+ setQuantaPerBlock(5);
+ setTickRate(10);
+
+ setHardness(1000.0F);
+ setLightOpacity(1);
+ setParticleColor(1.0F, 0.7F, 0.15F);
+ }
+
+ public boolean preInit()
+ {
+ GameRegistry.registerBlock(this, "FluidPyrotheum");
+
+ addInteraction(Blocks.cobblestone, Blocks.stone);
+ addInteraction(Blocks.grass, Blocks.dirt);
+ addInteraction(Blocks.sand, Blocks.glass);
+ addInteraction(Blocks.water, Blocks.stone);
+ addInteraction(Blocks.flowing_water, Blocks.stone);
+ addInteraction(Blocks.clay, Blocks.hardened_clay);
+ addInteraction(Blocks.ice, Blocks.stone);
+ addInteraction(Blocks.snow, Blocks.air);
+ addInteraction(Blocks.snow_layer, Blocks.air);
+ for (int i = 0; i < 8; i++) {
+ addInteraction(Blocks.stone_stairs, i, Blocks.stone_brick_stairs, i);
+ }
+ String str1 = "Fluid.Pyrotheum";
+ String str2 = "Enable this for Fluid Pyrotheum to be worse than lava.";
+ effect = true;
+
+ str2 = "Enable this for Fluid Pyrotheum Source blocks to gradually fall downwards.";
+ enableSourceFall = true;
+
+ return true;
+ }
+
+ public void onEntityCollidedWithBlock(World paramWorld, int paramInt1, int paramInt2, int paramInt3, Entity paramEntity)
+ {
+ if (!effect) {
+ return;
+ }
+ if (ServerHelper.isClientWorld(paramWorld)) {
+ return;
+ }
+ if (!(paramEntity instanceof EntityPlayer)) {
+ if ((paramEntity instanceof EntityCreeper))
+ {
+ paramWorld.createExplosion(paramEntity, paramEntity.posX, paramEntity.posY, paramEntity.posZ, 6.0F, paramEntity.worldObj.getGameRules().getGameRuleBooleanValue("mobGriefing"));
+ paramEntity.setDead();
+ }
+ }
+ }
+
+ public int getLightValue(IBlockAccess paramIBlockAccess, int paramInt1, int paramInt2, int paramInt3)
+ {
+ return TF_Fluids.fluidPyrotheum.getLuminosity();
+ }
+
+ public int getFireSpreadSpeed(IBlockAccess paramIBlockAccess, int paramInt1, int paramInt2, int paramInt3, ForgeDirection paramForgeDirection)
+ {
+ return effect ? 800 : 0;
+ }
+
+ public int getFlammability(IBlockAccess paramIBlockAccess, int paramInt1, int paramInt2, int paramInt3, ForgeDirection paramForgeDirection)
+ {
+ return 0;
+ }
+
+ public boolean isFlammable(IBlockAccess paramIBlockAccess, int paramInt1, int paramInt2, int paramInt3, ForgeDirection paramForgeDirection)
+ {
+ return (effect) && (paramForgeDirection.ordinal() > ForgeDirection.UP.ordinal()) && (paramIBlockAccess.getBlock(paramInt1, paramInt2 - 1, paramInt3) != this);
+ }
+
+ public boolean isFireSource(World paramWorld, int paramInt1, int paramInt2, int paramInt3, ForgeDirection paramForgeDirection)
+ {
+ return effect;
+ }
+
+ public void updateTick(World paramWorld, int paramInt1, int paramInt2, int paramInt3, Random paramRandom)
+ {
+ if (effect) {
+ checkForInteraction(paramWorld, paramInt1, paramInt2, paramInt3);
+ }
+ if ((enableSourceFall) && (paramWorld.getBlockMetadata(paramInt1, paramInt2, paramInt3) == 0))
+ {
+ Block localBlock = paramWorld.getBlock(paramInt1, paramInt2 + this.densityDir, paramInt3);
+ int i = paramWorld.getBlockMetadata(paramInt1, paramInt2 + this.densityDir, paramInt3);
+ if (((localBlock == this) && (i != 0)) || (localBlock.isFlammable(paramWorld, paramInt1, paramInt2 + this.densityDir, paramInt3, ForgeDirection.UP)))
+ {
+ paramWorld.setBlock(paramInt1, paramInt2 + this.densityDir, paramInt3, this, 0, 3);
+ paramWorld.setBlockToAir(paramInt1, paramInt2, paramInt3);
+ return;
+ }
+ }
+ super.updateTick(paramWorld, paramInt1, paramInt2, paramInt3, paramRandom);
+ }
+
+ protected void checkForInteraction(World paramWorld, int paramInt1, int paramInt2, int paramInt3)
+ {
+ if (paramWorld.getBlock(paramInt1, paramInt2, paramInt3) != this) {
+ return;
+ }
+ int i = paramInt1;
+ int j = paramInt2;
+ int k = paramInt3;
+ for (int m = 0; m < 6; m++)
+ {
+ i = paramInt1 + cofh.lib.util.helpers.BlockHelper.SIDE_COORD_MOD[m][0];
+ j = paramInt2 + cofh.lib.util.helpers.BlockHelper.SIDE_COORD_MOD[m][1];
+ k = paramInt3 + cofh.lib.util.helpers.BlockHelper.SIDE_COORD_MOD[m][2];
+
+ interactWithBlock(paramWorld, i, j, k);
+ }
+ interactWithBlock(paramWorld, paramInt1 - 1, paramInt2, paramInt3 - 1);
+ interactWithBlock(paramWorld, paramInt1 - 1, paramInt2, paramInt3 + 1);
+ interactWithBlock(paramWorld, paramInt1 + 1, paramInt2, paramInt3 - 1);
+ interactWithBlock(paramWorld, paramInt1 + 1, paramInt2, paramInt3 + 1);
+ }
+
+ protected void interactWithBlock(World paramWorld, int paramInt1, int paramInt2, int paramInt3)
+ {
+ Block localBlock = paramWorld.getBlock(paramInt1, paramInt2, paramInt3);
+ if ((localBlock == Blocks.air) || (localBlock == this)) {
+ return;
+ }
+ int i = paramWorld.getBlockMetadata(paramInt1, paramInt2, paramInt3);
+ if (hasInteraction(localBlock, i))
+ {
+ BlockWrapper localBlockWrapper = getInteraction(localBlock, i);
+ paramWorld.setBlock(paramInt1, paramInt2, paramInt3, localBlockWrapper.block, localBlockWrapper.metadata, 3);
+ triggerInteractionEffects(paramWorld, paramInt1, paramInt2, paramInt3);
+ }
+ else if (localBlock.isFlammable(paramWorld, paramInt1, paramInt2, paramInt3, ForgeDirection.UP))
+ {
+ paramWorld.setBlock(paramInt1, paramInt2, paramInt3, Blocks.fire);
+ }
+ else if ((paramWorld.isSideSolid(paramInt1, paramInt2, paramInt3, ForgeDirection.UP)) && (paramWorld.isAirBlock(paramInt1, paramInt2 + 1, paramInt3)))
+ {
+ paramWorld.setBlock(paramInt1, paramInt2 + 1, paramInt3, Blocks.fire, 0, 3);
+ }
+ }
+
+ protected void triggerInteractionEffects(World paramWorld, int paramInt1, int paramInt2, int paramInt3)
+ {
+ if (this.random.nextInt(16) == 0) {
+ paramWorld.playSoundEffect(paramInt1 + 0.5F, paramInt2 + 0.5F, paramInt3 + 0.5F, "random.fizz", 0.5F, 2.2F + (paramWorld.rand.nextFloat() - paramWorld.rand.nextFloat()) * 0.8F);
+ }
+ }
+}
diff --git a/src/Java/miscutil/core/intermod/thermalfoundation/block/TF_Blocks.java b/src/Java/miscutil/core/intermod/thermalfoundation/block/TF_Blocks.java
new file mode 100644
index 0000000000..4dadc4b688
--- /dev/null
+++ b/src/Java/miscutil/core/intermod/thermalfoundation/block/TF_Blocks.java
@@ -0,0 +1,26 @@
+package miscutil.core.intermod.thermalfoundation.block;
+
+import cofh.core.fluid.BlockFluidCoFHBase;
+
+public class TF_Blocks
+{
+
+ public static BlockFluidCoFHBase blockFluidPyrotheum;
+ public static BlockFluidCoFHBase blockFluidCryotheum;
+
+
+ public static void preInit()
+ {
+ blockFluidPyrotheum = new TF_Block_Fluid_Pyrotheum();
+ blockFluidCryotheum = new TF_Block_Fluid_Cryotheum();
+ blockFluidPyrotheum.preInit();
+ blockFluidCryotheum.preInit();
+ }
+
+ public static void init() {}
+
+ public static void postInit()
+ {
+
+ }
+}
diff --git a/src/Java/miscutil/core/intermod/thermalfoundation/fluid/TF_Fluids.java b/src/Java/miscutil/core/intermod/thermalfoundation/fluid/TF_Fluids.java
new file mode 100644
index 0000000000..7554a9a594
--- /dev/null
+++ b/src/Java/miscutil/core/intermod/thermalfoundation/fluid/TF_Fluids.java
@@ -0,0 +1,42 @@
+package miscutil.core.intermod.thermalfoundation.fluid;
+
+import miscutil.core.intermod.thermalfoundation.item.TF_Items;
+import net.minecraft.block.BlockDispenser;
+import net.minecraft.init.Items;
+import net.minecraft.item.EnumRarity;
+import net.minecraftforge.fluids.Fluid;
+import net.minecraftforge.fluids.FluidRegistry;
+import cofh.core.util.fluid.DispenserEmptyBucketHandler;
+import cofh.core.util.fluid.DispenserFilledBucketHandler;
+
+public class TF_Fluids
+{
+ public static Fluid fluidPyrotheum;
+ public static Fluid fluidCryotheum;
+
+ public static void preInit()
+ {
+ fluidPyrotheum = new Fluid("pyrotheum").setLuminosity(15).setDensity(2000).setViscosity(1200).setTemperature(4000).setRarity(EnumRarity.rare);
+ fluidCryotheum = new Fluid("cryotheum").setLuminosity(0).setDensity(4000).setViscosity(3000).setTemperature(50).setRarity(EnumRarity.rare);
+ registerFluid(fluidPyrotheum, "pyrotheum");
+ registerFluid(fluidCryotheum, "cryotheum");
+ }
+
+ public static void init() {}
+
+ public static void postInit() {}
+
+ public static void registerFluid(Fluid paramFluid, String paramString)
+ {
+ if (!FluidRegistry.isFluidRegistered(paramString)) {
+ FluidRegistry.registerFluid(paramFluid);
+ }
+ paramFluid = FluidRegistry.getFluid(paramString);
+ }
+
+ public static void registerDispenserHandlers()
+ {
+ BlockDispenser.dispenseBehaviorRegistry.putObject(TF_Items.itemBucket, new DispenserFilledBucketHandler());
+ BlockDispenser.dispenseBehaviorRegistry.putObject(Items.bucket, new DispenserEmptyBucketHandler());
+ }
+}
diff --git a/src/Java/miscutil/core/intermod/thermalfoundation/item/TF_Items.java b/src/Java/miscutil/core/intermod/thermalfoundation/item/TF_Items.java
new file mode 100644
index 0000000000..0853580c6b
--- /dev/null
+++ b/src/Java/miscutil/core/intermod/thermalfoundation/item/TF_Items.java
@@ -0,0 +1,66 @@
+package miscutil.core.intermod.thermalfoundation.item;
+
+import miscutil.core.creative.AddToCreativeTab;
+import miscutil.core.intermod.thermalfoundation.block.TF_Blocks;
+import miscutil.core.intermod.thermalfoundation.fluid.TF_Fluids;
+import net.minecraft.init.Items;
+import net.minecraft.item.ItemStack;
+import net.minecraftforge.fluids.FluidContainerRegistry;
+import cofh.core.item.ItemBase;
+import cofh.core.item.ItemBucket;
+import cofh.core.util.energy.FurnaceFuelHandler;
+import cofh.core.util.fluid.BucketHandler;
+import cofh.lib.util.helpers.ItemHelper;
+
+public class TF_Items {
+
+ public static ItemBase itemMaterial;
+ public static ItemStack rodBlizz;
+ public static ItemStack dustBlizz;
+ public static ItemStack dustPyrotheum;
+ public static ItemStack dustCryotheum;
+ public static ItemBucket itemBucket;
+ public static ItemStack bucketPyrotheum;
+ public static ItemStack bucketCryotheum;
+
+ public static void preInit(){
+
+
+ itemBucket = (ItemBucket)new ItemBucket("MiscUtils").setUnlocalizedName("bucket").setCreativeTab(AddToCreativeTab.tabMisc);
+ itemMaterial = (ItemBase)new ItemBase("MiscUtils").setUnlocalizedName("material").setCreativeTab(AddToCreativeTab.tabMisc);
+
+ bucketPyrotheum = itemBucket.addOreDictItem(6661, "bucketPyrotheum", 2);
+ bucketCryotheum = itemBucket.addOreDictItem(6662, "bucketCryotheum", 2);
+ dustPyrotheum = itemMaterial.addOreDictItem(6663, "dustPyrotheum", 2);
+ dustCryotheum = itemMaterial.addOreDictItem(6664, "dustCryotheum", 2);
+
+ FurnaceFuelHandler.registerFuel(dustPyrotheum, 2400);
+
+ rodBlizz = itemMaterial.addOreDictItem(6665, "rodBlizz");
+ dustBlizz = itemMaterial.addOreDictItem(6666, "dustBlizz");
+
+
+
+ }
+
+ public static void init(){
+
+ BucketHandler.registerBucket(TF_Blocks.blockFluidPyrotheum, 0, bucketPyrotheum);
+ BucketHandler.registerBucket(TF_Blocks.blockFluidCryotheum, 0, bucketCryotheum);
+ FluidContainerRegistry.registerFluidContainer(TF_Fluids.fluidPyrotheum, bucketPyrotheum, FluidContainerRegistry.EMPTY_BUCKET);
+ FluidContainerRegistry.registerFluidContainer(TF_Fluids.fluidCryotheum, bucketCryotheum, FluidContainerRegistry.EMPTY_BUCKET);
+
+
+ }
+
+ public static void postInit(){
+
+ ItemHelper.addRecipe(ItemHelper.ShapelessRecipe(ItemHelper.cloneStack(dustPyrotheum, 1), new Object[] { "dustCoal", "dustSulfur", "dustRedstone", Items.blaze_powder }));
+ ItemHelper.addRecipe(ItemHelper.ShapelessRecipe(ItemHelper.cloneStack(dustCryotheum, 1), new Object[] { Items.snowball, "dustSaltpeter", "dustRedstone", "dustBlizz" }));
+ //ItemHelper.addRecipe(ItemHelper.ShapelessRecipe(ItemHelper.cloneStack(dustBlizz, 2), new Object[] { "rodBlizz" }));
+
+
+
+ }
+
+}
diff --git a/src/Java/miscutil/core/intermod/thermalfoundation/recipe/TF_Gregtech_Recipes.java b/src/Java/miscutil/core/intermod/thermalfoundation/recipe/TF_Gregtech_Recipes.java
new file mode 100644
index 0000000000..75f50e7634
--- /dev/null
+++ b/src/Java/miscutil/core/intermod/thermalfoundation/recipe/TF_Gregtech_Recipes.java
@@ -0,0 +1,48 @@
+package miscutil.core.intermod.thermalfoundation.recipe;
+
+import gregtech.api.enums.GT_Values;
+import gregtech.api.enums.Materials;
+import gregtech.api.enums.OrePrefixes;
+import gregtech.api.util.GT_ModHandler;
+import gregtech.api.util.GT_OreDictUnificator;
+import miscutil.core.intermod.thermalfoundation.item.TF_Items;
+import miscutil.core.util.Utils;
+import miscutil.gregtech.api.enums.GregtechOrePrefixes.GT_Materials;
+import net.minecraft.init.Items;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+
+public class TF_Gregtech_Recipes {
+
+ public static void run(){
+ start();
+ }
+
+ private static void start(){
+ //Get Items to work with
+ Item dust_Cryotheum = TF_Items.dustCryotheum.getItem();
+ Item dust_Pyrotheum = TF_Items.dustPyrotheum.getItem();
+ Item dust_Blizz = TF_Items.dustBlizz.getItem();
+ Item rod_Blizz = TF_Items.rodBlizz.getItem();
+
+ //Gelid Cryotheum
+ Utils.LOG_INFO("Adding Recipes for Gelid Cryotheum");
+ GT_Values.RA.addFluidExtractionRecipe(new ItemStack(dust_Cryotheum, 6664, 1), GT_Values.NI, GT_Materials.Cryotheum.getFluid(250L), 10000, 32, 2);
+ GT_Values.RA.addChemicalBathRecipe((GT_OreDictUnificator.get(OrePrefixes.ore, Materials.Cinnabar, 1L)), GT_Materials.Cryotheum.getFluid(200L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Cinnabar, 2L), GT_Values.NI, GT_Values.NI, null, 400, 2);
+
+ //Blizz Powder
+ Utils.LOG_INFO("Adding Recipes for Blizz Powder");
+ GT_Values.RA.addChemicalBathRecipe(new ItemStack(Items.snowball, 1), Materials.Redstone.getFluid(200L), new ItemStack(dust_Blizz, 6666, 1), GT_Values.NI, GT_Values.NI, null, 400, 2);
+
+ //Blizz Rod
+ Utils.LOG_INFO("Adding Recipes for Blizz Rod");
+ GT_ModHandler.addPulverisationRecipe(new ItemStack(rod_Blizz, 6665, 1), new ItemStack(dust_Blizz, 6666, 3), new ItemStack(Items.snowball, 1), 50, false);
+
+
+ //Blazing Pyrotheum
+ GT_Values.RA.addFluidExtractionRecipe(new ItemStack(dust_Pyrotheum, 6663, 1), GT_Values.NI, GT_Materials.Pyrotheum.getFluid(250L), 10000, 32, 2);
+ Utils.LOG_INFO("Adding Recipes for Blazing Pyrotheum");
+
+ }
+
+}
diff --git a/src/Java/miscutil/core/lib/LoadedMods.java b/src/Java/miscutil/core/lib/LoadedMods.java
index 7e234b970b..6baa6c115a 100644
--- a/src/Java/miscutil/core/lib/LoadedMods.java
+++ b/src/Java/miscutil/core/lib/LoadedMods.java
@@ -22,6 +22,7 @@ public class LoadedMods {
public static boolean CompactWindmills = false;
public static boolean Railcraft = false;
public static boolean Growthcraft = false;
+ public static boolean CoFHCore = false;
public static boolean MiscUtils = true; //Dummy For MetaData Lookups in MT Wrapper
@@ -31,6 +32,7 @@ public class LoadedMods {
Utils.LOG_INFO("Looking for optional mod prereqs.");
if (Loader.isModLoaded("gregtech") == true ){
Gregtech = true;
+ Utils.LOG_INFO("Components enabled for: Gregtech");
if (Gregtech){
try {
CORE.sRecipeAdder = CORE.RA = new GregtechRecipeAdder();
@@ -44,54 +46,72 @@ public class LoadedMods {
}
if (Loader.isModLoaded("EnderIO") == true){
EnderIO = true;
+ Utils.LOG_INFO("Components enabled for: EnderIO");
totalMods++;
}
if (Loader.isModLoaded("BigReactors") == true){
Big_Reactors = true;
+ Utils.LOG_INFO("Components enabled for: Big Reactors");
totalMods++;
}
if (Loader.isModLoaded("IC2") == true){
IndustrialCraft2 = true;
+ Utils.LOG_INFO("Components enabled for: IndustrialCraft2");
totalMods++;
}
if (Loader.isModLoaded("simplyjetpacks") == true){
Simply_Jetpacks = true;
+ Utils.LOG_INFO("Components enabled for: Simply Jetpacks");
totalMods++;
}
if (Loader.isModLoaded("rftools") == true){
RFTools = true;
+ Utils.LOG_INFO("Components enabled for: RFTools");
totalMods++;
}
if (Loader.isModLoaded("Thaumcraft") == true){
Thaumcraft = true;
+ Utils.LOG_INFO("Components enabled for: Thaumcraft");
totalMods++;
}
if (Loader.isModLoaded("ExtraUtilities") == true){
Extra_Utils = true;
+ Utils.LOG_INFO("Components enabled for: Extra_Utils");
totalMods++;
}
if (Loader.isModLoaded("PneumaticCraft") == true){
PneumaticCraft = true;
+ Utils.LOG_INFO("Components enabled for: PneumaticCraft");
totalMods++;
}
if (Loader.isModLoaded("MorePlanet") == true){
MorePlanets = true;
+ Utils.LOG_INFO("Components enabled for: MorePlanets");
totalMods++;
}
if (Loader.isModLoaded("ForbiddenMagic") == true){
ForbiddenMagic = true;
+ Utils.LOG_INFO("Components enabled for: ForbiddenMagic");
totalMods++;
}
if (Loader.isModLoaded("CompactWindmills") == true){
CompactWindmills = true;
+ Utils.LOG_INFO("Components enabled for: CompactWindmills");
totalMods++;
}
if (Loader.isModLoaded("Railcraft") == true){
Railcraft = true;
+ Utils.LOG_INFO("Components enabled for: Railcraft");
totalMods++;
}
if (Loader.isModLoaded("Growthcraft") == true){
Growthcraft = true;
+ Utils.LOG_INFO("Components enabled for: Growthcraft");
+ totalMods++;
+ }
+ if (Loader.isModLoaded("CoFHCore") == true){
+ CoFHCore = true;
+ Utils.LOG_INFO("Components enabled for: CoFHCore");
totalMods++;
}
diff --git a/src/Java/miscutil/gregtech/HANDLER_Gregtech.java b/src/Java/miscutil/gregtech/HANDLER_Gregtech.java
new file mode 100644
index 0000000000..7d13ff7b36
--- /dev/null
+++ b/src/Java/miscutil/gregtech/HANDLER_Gregtech.java
@@ -0,0 +1,26 @@
+package miscutil.gregtech;
+
+import gregtech.api.util.GT_Config;
+import miscutil.gregtech.api.enums.GregtechOrePrefixes.GT_Materials;
+import miscutil.gregtech.common.blocks.fluid.GregtechFluidHandler;
+
+public class HANDLER_Gregtech {
+
+ public static GT_Config mMaterialProperties = null;
+
+ public static void preInit(){
+ if (mMaterialProperties != null){
+ GT_Materials.init(mMaterialProperties);
+ }
+ GregtechFluidHandler.run();
+ }
+
+ public static void init(){
+
+ }
+
+ public static void postInit(){
+
+ }
+
+}
diff --git a/src/Java/miscutil/gregtech/api/enums/GregtechItemList.java b/src/Java/miscutil/gregtech/api/enums/GregtechItemList.java
index 6db2a06be7..4dfa9c674c 100644
--- a/src/Java/miscutil/gregtech/api/enums/GregtechItemList.java
+++ b/src/Java/miscutil/gregtech/api/enums/GregtechItemList.java
@@ -78,7 +78,10 @@ public enum GregtechItemList implements GregtechItemContainer {
Circuit_Board_IV, Circuit_Board_LuV, Circuit_Board_ZPM,
Circuit_Parts_Crystal_Chip_IV, Circuit_Parts_Crystal_Chip_LuV, Circuit_Parts_Crystal_Chip_ZPM,
Circuit_Parts_IV, Circuit_Parts_LuV, Circuit_Parts_ZPM,
- Circuit_Parts_Wiring_IV, Circuit_Parts_Wiring_LuV, Circuit_Parts_Wiring_ZPM;
+ Circuit_Parts_Wiring_IV, Circuit_Parts_Wiring_LuV, Circuit_Parts_Wiring_ZPM,
+
+ //Blast Furnace Test
+ Machine_Electric_BlastFurnace;
public static final GregtechItemList[]
DYE_ONLY_ITEMS = {
diff --git a/src/Java/miscutil/gregtech/api/enums/GregtechOrePrefixes.java b/src/Java/miscutil/gregtech/api/enums/GregtechOrePrefixes.java
index 305f248345..76ca8c71fa 100644
--- a/src/Java/miscutil/gregtech/api/enums/GregtechOrePrefixes.java
+++ b/src/Java/miscutil/gregtech/api/enums/GregtechOrePrefixes.java
@@ -34,8 +34,8 @@ import net.minecraftforge.fluids.Fluid;
import net.minecraftforge.fluids.FluidStack;
public enum GregtechOrePrefixes {
- /* Electric Components.
- *
+ /* Electric Components.
+ *
* usual Materials for this are:
* Primitive (Tier 1)
* Basic (Tier 2) as used by UE as well : IC2 Circuit and RE-Battery
@@ -47,241 +47,253 @@ public enum GregtechOrePrefixes {
* Ultimate (Tier 8) : Data Orb and Lapotronic Energy Orb
* Infinite (Cheaty)
*/
- batterySingleuse("Single Use Batteries", "", "", false, true, false, false, false, false, false, false, false, false, 0, -1, 64, -1),
- battery("Reusable Batteries", "", "", false, true, false, false, false, false, false, false, false, false, 0, -1, 64, -1), // Introduced by Calclavia
- circuit("Circuits", "", "", true, true, false, false, false, false, false, false, false, false, 0, -1, 64, -1), // Introduced by Calclavia
- chipset("Chipsets", "", "", true, true, false, false, false, false, false, false, false, false, 0, -1, 64, -1), // Introduced by Buildcraft
- computer("Computers", "", "", true, true, false, false, true, false, false, false, false, false, 0, -1, 64, -1); // A whole Computer. "computerMaster" = ComputerCube
-
- //public static volatile int VERSION = 508;
-
- public final ArrayList<ItemStack> mPrefixedItems = new ArrayList<ItemStack>();
- public final short mTextureIndex;
- public final String mRegularLocalName, mLocalizedMaterialPre, mLocalizedMaterialPost;
- public final boolean mIsUsedForOreProcessing, mIsEnchantable, mIsUnificatable, mIsMaterialBased, mIsSelfReferencing, mIsContainer, mDontUnificateActively, mIsUsedForBlocks, mAllowNormalRecycling, mGenerateDefaultItem;
- public final List<TC_AspectStack> mAspects = new ArrayList<TC_AspectStack>();
- public final Collection<GregtechOrePrefixes> mFamiliarPrefixes = new HashSet<GregtechOrePrefixes>();
- /**
- * Used to determine the amount of Material this Prefix contains.
- * Multiply or Divide GregTech_API.MATERIAL_UNIT to get the Amounts in comparision to one Ingot.
- * 0 = Null
- * Negative = Undefined Amount
- */
- public final long mMaterialAmount;
- private final Collection<Materials> mNotGeneratedItems = new HashSet<Materials>(), mIgnoredMaterials = new HashSet<Materials>(), mGeneratedItems = new HashSet<Materials>();
- private final ArrayList<Interface_OreRecipeRegistrator> mOreProcessing = new ArrayList<Interface_OreRecipeRegistrator>();
- public ItemStack mContainerItem = null;
- public ICondition<ISubTagContainer> mCondition = null;
- public byte mDefaultStackSize = 64;
- public MaterialStack mSecondaryMaterial = null;
- public GregtechOrePrefixes mPrefixInto = this;
- public float mHeatDamage = 0.0F; // Negative for Frost Damage
- /**
- * Yes this Value can be changed to add Bits for the MetaGenerated-Item-Check.
- */
- public int mMaterialGenerationBits = 0;
- private GregtechOrePrefixes(String aRegularLocalName, String aLocalizedMaterialPre, String aLocalizedMaterialPost, boolean aIsUnificatable, boolean aIsMaterialBased, boolean aIsSelfReferencing, boolean aIsContainer, boolean aDontUnificateActively, boolean aIsUsedForBlocks, boolean aAllowNormalRecycling, boolean aGenerateDefaultItem, boolean aIsEnchantable, boolean aIsUsedForOreProcessing, int aMaterialGenerationBits, long aMaterialAmount, int aDefaultStackSize, int aTextureindex) {
- mIsUnificatable = aIsUnificatable;
- mIsMaterialBased = aIsMaterialBased;
- mIsSelfReferencing = aIsSelfReferencing;
- mIsContainer = aIsContainer;
- mDontUnificateActively = aDontUnificateActively;
- mIsUsedForBlocks = aIsUsedForBlocks;
- mAllowNormalRecycling = aAllowNormalRecycling;
- mGenerateDefaultItem = aGenerateDefaultItem;
- mIsEnchantable = aIsEnchantable;
- mIsUsedForOreProcessing = aIsUsedForOreProcessing;
- mMaterialGenerationBits = aMaterialGenerationBits;
- mMaterialAmount = aMaterialAmount;
- mRegularLocalName = aRegularLocalName;
- mLocalizedMaterialPre = aLocalizedMaterialPre;
- mLocalizedMaterialPost = aLocalizedMaterialPost;
- mDefaultStackSize = (byte) aDefaultStackSize;
- mTextureIndex = (short) aTextureindex;
-
- if (name().startsWith("ore")) {
- new TC_AspectStack(TC_Aspects.TERRA, 1).addToAspectList(mAspects);
- } else if (name().startsWith("wire") || name().startsWith("cable")) {
- new TC_AspectStack(TC_Aspects.ELECTRUM, 1).addToAspectList(mAspects);
- } else if (name().startsWith("dust")) {
- new TC_AspectStack(TC_Aspects.PERDITIO, 1).addToAspectList(mAspects);
- } else if (name().startsWith("crushed")) {
- new TC_AspectStack(TC_Aspects.PERFODIO, 1).addToAspectList(mAspects);
- } else if (name().startsWith("ingot") || name().startsWith("nugget")) {
- new TC_AspectStack(TC_Aspects.METALLUM, 1).addToAspectList(mAspects);
- } else if (name().startsWith("armor")) {
- new TC_AspectStack(TC_Aspects.TUTAMEN, 1).addToAspectList(mAspects);
- } else if (name().startsWith("stone")) {
- new TC_AspectStack(TC_Aspects.TERRA, 1).addToAspectList(mAspects);
- } else if (name().startsWith("pipe")) {
- new TC_AspectStack(TC_Aspects.ITER, 1).addToAspectList(mAspects);
- } else if (name().startsWith("gear")) {
- new TC_AspectStack(TC_Aspects.MOTUS, 1).addToAspectList(mAspects);
- new TC_AspectStack(TC_Aspects.MACHINA, 1).addToAspectList(mAspects);
- } else if (name().startsWith("frame") || name().startsWith("plate")) {
- new TC_AspectStack(TC_Aspects.FABRICO, 1).addToAspectList(mAspects);
- } else if (name().startsWith("tool")) {
- new TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2).addToAspectList(mAspects);
- } else if (name().startsWith("gem") || name().startsWith("crystal") || name().startsWith("lens")) {
- new TC_AspectStack(TC_Aspects.VITREUS, 1).addToAspectList(mAspects);
- } else if (name().startsWith("crate")) {
- new TC_AspectStack(TC_Aspects.ITER, 2).addToAspectList(mAspects);
- } else if (name().startsWith("circuit")) {
- new TC_AspectStack(TC_Aspects.COGNITIO, 1).addToAspectList(mAspects);
- } else if (name().startsWith("computer")) {
- new TC_AspectStack(TC_Aspects.COGNITIO, 4).addToAspectList(mAspects);
- } else if (name().startsWith("battery")) {
- new TC_AspectStack(TC_Aspects.ELECTRUM, 1).addToAspectList(mAspects);
- }
- }
-
- public static GregtechOrePrefixes getOrePrefix(String aOre) {
- for (GregtechOrePrefixes tPrefix : values())
- if (aOre.startsWith(tPrefix.toString())) {
- return tPrefix;
- }
- return null;
- }
-
- public static String stripPrefix(String aOre) {
- for (GregtechOrePrefixes tPrefix : values()) {
- if (aOre.startsWith(tPrefix.toString())) {
- return aOre.replaceFirst(tPrefix.toString(), "");
- }
- }
- return aOre;
- }
-
- public static String replacePrefix(String aOre, GregtechOrePrefixes aPrefix) {
- for (GregtechOrePrefixes tPrefix : values()) {
- if (aOre.startsWith(tPrefix.toString())) {
- return aOre.replaceFirst(tPrefix.toString(), aPrefix.toString());
- }
- }
- return "";
- }
-
- public static GregtechOrePrefixes getPrefix(String aPrefixName) {
- return getPrefix(aPrefixName, null);
- }
-
- public static GregtechOrePrefixes getPrefix(String aPrefixName, GregtechOrePrefixes aReplacement) {
- Object tObject = GT_Utility.getFieldContent(GregtechOrePrefixes.class, aPrefixName, false, false);
- if (tObject != null && tObject instanceof GregtechOrePrefixes) return (GregtechOrePrefixes) tObject;
- return aReplacement;
- }
-
- public static Materials getMaterial(String aOre) {
- return Materials.get(stripPrefix(aOre));
- }
-
- public static Materials getMaterial(String aOre, GregtechOrePrefixes aPrefix) {
- return Materials.get(aOre.replaceFirst(aPrefix.toString(), ""));
- }
-
- public static Materials getRealMaterial(String aOre, GregtechOrePrefixes aPrefix) {
- return Materials.getRealMaterial(aOre.replaceFirst(aPrefix.toString(), ""));
- }
-
- public static boolean isInstanceOf(String aName, GregtechOrePrefixes aPrefix) {
- return aName == null ? false : aName.startsWith(aPrefix.toString());
- }
-
- public boolean add(ItemStack aStack) {
- if (aStack == null) return false;
- if (!contains(aStack)) mPrefixedItems.add(aStack);
- while (mPrefixedItems.contains(null)) mPrefixedItems.remove(null);
- return true;
- }
-
- public boolean contains(ItemStack aStack) {
- if (aStack == null) return false;
- for (ItemStack tStack : mPrefixedItems)
- if (GT_Utility.areStacksEqual(aStack, tStack, !tStack.hasTagCompound())) return true;
- return false;
- }
-
- public boolean doGenerateItem(Materials aMaterial) {
- return aMaterial != null && aMaterial != Materials._NULL && ((aMaterial.mTypes & mMaterialGenerationBits) != 0 || mGeneratedItems.contains(aMaterial)) && !mNotGeneratedItems.contains(aMaterial) && (mCondition == null || mCondition.isTrue(aMaterial));
- }
-
- public boolean ignoreMaterials(Materials... aMaterials) {
- for (Materials tMaterial : aMaterials) if (tMaterial != null) mIgnoredMaterials.add(tMaterial);
- return true;
- }
-
- public boolean isIgnored(Materials aMaterial) {
- if (aMaterial != null && (!aMaterial.mUnificatable || aMaterial != aMaterial.mMaterialInto)) return true;
- return mIgnoredMaterials.contains(aMaterial);
- }
-
- public boolean addFamiliarPrefix(GregtechOrePrefixes aPrefix) {
- if (aPrefix == null || mFamiliarPrefixes.contains(aPrefix) || aPrefix == this) return false;
- return mFamiliarPrefixes.add(aPrefix);
- }
-
- public boolean add(Interface_OreRecipeRegistrator aRegistrator) {
- if (aRegistrator == null) return false;
- return mOreProcessing.add(aRegistrator);
- }
-
- public void processOre(Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) {
- if (aMaterial != null && (aMaterial != Materials._NULL || mIsSelfReferencing || !mIsMaterialBased) && GT_Utility.isStackValid(aStack))
- for (Interface_OreRecipeRegistrator tRegistrator : mOreProcessing) {
- if (D2)
- GT_Log.ore.println("Processing '" + aOreDictName + "' with the Prefix '" + name() + "' and the Material '" + aMaterial.name() + "' at " + GT_Utility.getClassName(tRegistrator));
- tRegistrator.registerOre(this, aMaterial, aOreDictName, aModName, GT_Utility.copyAmount(1, aStack));
- }
- }
-
- public Object get(Object aMaterial) {
- if (aMaterial instanceof Materials) return new GregtechItemData(this, (Materials) aMaterial);
- return name() + aMaterial;
- }
-
- @SuppressWarnings("incomplete-switch")
- public String getDefaultLocalNameForItem(Materials aMaterial) {
-
-
- // Use Standard Localization
- return mLocalizedMaterialPre + aMaterial.mDefaultLocalName + mLocalizedMaterialPost;
- }
-
- public enum GT_Materials implements IColorModulationContainer, ISubTagContainer {
-
-
-
- /**
- * This is the Default Material returned in case no Material has been found or a NullPointer has been inserted at a location where it shouldn't happen.
- * <p/>
- * Mainly for preventing NullPointer Exceptions and providing Default Values.
- */
- _NULL(-1, TextureSet.SET_NONE, 1.0F, 0, 0, 0, 255, 255, 255, 0, "NULL", 0, 0, 0, 0, false, false, 1, 1, 1, Dyes._NULL, Element._NULL, Arrays.asList(new TC_AspectStack(TC_Aspects.VACUOS, 1))),
-
-
- /**
- * Circuitry, Batteries and other Technical things
- */
- Symbiotic(-1, TextureSet.SET_NONE, 1.0F, 0, 0, 0, 255, 255, 255, 0, "IV Tier", 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeLightGray, Arrays.asList(new TC_AspectStack(TC_Aspects.ELECTRUM, 4), new TC_AspectStack(TC_Aspects.MACHINA, 4))),
- Neutronic(-1, TextureSet.SET_NONE, 1.0F, 0, 0, 0, 255, 255, 255, 0, "LuV Tier", 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeLightGray, Arrays.asList(new TC_AspectStack(TC_Aspects.ELECTRUM, 6), new TC_AspectStack(TC_Aspects.MACHINA, 6))),
- Quantum(-1, TextureSet.SET_NONE, 1.0F, 0, 0, 0, 255, 255, 255, 0, "ZPM Tier", 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeLightGray, Arrays.asList(new TC_AspectStack(TC_Aspects.ELECTRUM, 8), new TC_AspectStack(TC_Aspects.MACHINA, 8)));
-
- /*Advanced(-1, TextureSet.SET_NONE, 1.0F, 0, 0, 0, 255, 255, 255, 0, "Advanced", 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeLightGray, Arrays.asList(new TC_AspectStack(TC_Aspects.MACHINA, 4))),
+ batterySingleuse("Single Use Batteries", "", "", false, true, false, false, false, false, false, false, false, false, 0, -1, 64, -1),
+ battery("Reusable Batteries", "", "", false, true, false, false, false, false, false, false, false, false, 0, -1, 64, -1), // Introduced by Calclavia
+ circuit("Circuits", "", "", true, true, false, false, false, false, false, false, false, false, 0, -1, 64, -1), // Introduced by Calclavia
+ chipset("Chipsets", "", "", true, true, false, false, false, false, false, false, false, false, 0, -1, 64, -1), // Introduced by Buildcraft
+ computer("Computers", "", "", true, true, false, false, true, false, false, false, false, false, 0, -1, 64, -1); // A whole Computer. "computerMaster" = ComputerCube
+
+ //public static volatile int VERSION = 508;
+
+ public final ArrayList<ItemStack> mPrefixedItems = new ArrayList<ItemStack>();
+ public final short mTextureIndex;
+ public final String mRegularLocalName, mLocalizedMaterialPre, mLocalizedMaterialPost;
+ public final boolean mIsUsedForOreProcessing, mIsEnchantable, mIsUnificatable, mIsMaterialBased, mIsSelfReferencing, mIsContainer, mDontUnificateActively, mIsUsedForBlocks, mAllowNormalRecycling, mGenerateDefaultItem;
+ public final List<TC_AspectStack> mAspects = new ArrayList<TC_AspectStack>();
+ public final Collection<GregtechOrePrefixes> mFamiliarPrefixes = new HashSet<GregtechOrePrefixes>();
+ /**
+ * Used to determine the amount of Material this Prefix contains.
+ * Multiply or Divide GregTech_API.MATERIAL_UNIT to get the Amounts in comparision to one Ingot.
+ * 0 = Null
+ * Negative = Undefined Amount
+ */
+ public final long mMaterialAmount;
+ private final Collection<Materials> mNotGeneratedItems = new HashSet<Materials>(), mIgnoredMaterials = new HashSet<Materials>(), mGeneratedItems = new HashSet<Materials>();
+ private final ArrayList<Interface_OreRecipeRegistrator> mOreProcessing = new ArrayList<Interface_OreRecipeRegistrator>();
+ public ItemStack mContainerItem = null;
+ public ICondition<ISubTagContainer> mCondition = null;
+ public byte mDefaultStackSize = 64;
+ public MaterialStack mSecondaryMaterial = null;
+ public GregtechOrePrefixes mPrefixInto = this;
+ public float mHeatDamage = 0.0F; // Negative for Frost Damage
+ /**
+ * Yes this Value can be changed to add Bits for the MetaGenerated-Item-Check.
+ */
+ public int mMaterialGenerationBits = 0;
+ private GregtechOrePrefixes(String aRegularLocalName, String aLocalizedMaterialPre, String aLocalizedMaterialPost, boolean aIsUnificatable, boolean aIsMaterialBased, boolean aIsSelfReferencing, boolean aIsContainer, boolean aDontUnificateActively, boolean aIsUsedForBlocks, boolean aAllowNormalRecycling, boolean aGenerateDefaultItem, boolean aIsEnchantable, boolean aIsUsedForOreProcessing, int aMaterialGenerationBits, long aMaterialAmount, int aDefaultStackSize, int aTextureindex) {
+ mIsUnificatable = aIsUnificatable;
+ mIsMaterialBased = aIsMaterialBased;
+ mIsSelfReferencing = aIsSelfReferencing;
+ mIsContainer = aIsContainer;
+ mDontUnificateActively = aDontUnificateActively;
+ mIsUsedForBlocks = aIsUsedForBlocks;
+ mAllowNormalRecycling = aAllowNormalRecycling;
+ mGenerateDefaultItem = aGenerateDefaultItem;
+ mIsEnchantable = aIsEnchantable;
+ mIsUsedForOreProcessing = aIsUsedForOreProcessing;
+ mMaterialGenerationBits = aMaterialGenerationBits;
+ mMaterialAmount = aMaterialAmount;
+ mRegularLocalName = aRegularLocalName;
+ mLocalizedMaterialPre = aLocalizedMaterialPre;
+ mLocalizedMaterialPost = aLocalizedMaterialPost;
+ mDefaultStackSize = (byte) aDefaultStackSize;
+ mTextureIndex = (short) aTextureindex;
+
+ if (name().startsWith("ore")) {
+ new TC_AspectStack(TC_Aspects.TERRA, 1).addToAspectList(mAspects);
+ } else if (name().startsWith("wire") || name().startsWith("cable")) {
+ new TC_AspectStack(TC_Aspects.ELECTRUM, 1).addToAspectList(mAspects);
+ } else if (name().startsWith("dust")) {
+ new TC_AspectStack(TC_Aspects.PERDITIO, 1).addToAspectList(mAspects);
+ } else if (name().startsWith("crushed")) {
+ new TC_AspectStack(TC_Aspects.PERFODIO, 1).addToAspectList(mAspects);
+ } else if (name().startsWith("ingot") || name().startsWith("nugget")) {
+ new TC_AspectStack(TC_Aspects.METALLUM, 1).addToAspectList(mAspects);
+ } else if (name().startsWith("armor")) {
+ new TC_AspectStack(TC_Aspects.TUTAMEN, 1).addToAspectList(mAspects);
+ } else if (name().startsWith("stone")) {
+ new TC_AspectStack(TC_Aspects.TERRA, 1).addToAspectList(mAspects);
+ } else if (name().startsWith("pipe")) {
+ new TC_AspectStack(TC_Aspects.ITER, 1).addToAspectList(mAspects);
+ } else if (name().startsWith("gear")) {
+ new TC_AspectStack(TC_Aspects.MOTUS, 1).addToAspectList(mAspects);
+ new TC_AspectStack(TC_Aspects.MACHINA, 1).addToAspectList(mAspects);
+ } else if (name().startsWith("frame") || name().startsWith("plate")) {
+ new TC_AspectStack(TC_Aspects.FABRICO, 1).addToAspectList(mAspects);
+ } else if (name().startsWith("tool")) {
+ new TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2).addToAspectList(mAspects);
+ } else if (name().startsWith("gem") || name().startsWith("crystal") || name().startsWith("lens")) {
+ new TC_AspectStack(TC_Aspects.VITREUS, 1).addToAspectList(mAspects);
+ } else if (name().startsWith("crate")) {
+ new TC_AspectStack(TC_Aspects.ITER, 2).addToAspectList(mAspects);
+ } else if (name().startsWith("circuit")) {
+ new TC_AspectStack(TC_Aspects.COGNITIO, 1).addToAspectList(mAspects);
+ } else if (name().startsWith("computer")) {
+ new TC_AspectStack(TC_Aspects.COGNITIO, 4).addToAspectList(mAspects);
+ } else if (name().startsWith("battery")) {
+ new TC_AspectStack(TC_Aspects.ELECTRUM, 1).addToAspectList(mAspects);
+ }
+ }
+
+ public static GregtechOrePrefixes getOrePrefix(String aOre) {
+ for (GregtechOrePrefixes tPrefix : values())
+ if (aOre.startsWith(tPrefix.toString())) {
+ return tPrefix;
+ }
+ return null;
+ }
+
+ public static String stripPrefix(String aOre) {
+ for (GregtechOrePrefixes tPrefix : values()) {
+ if (aOre.startsWith(tPrefix.toString())) {
+ return aOre.replaceFirst(tPrefix.toString(), "");
+ }
+ }
+ return aOre;
+ }
+
+ public static String replacePrefix(String aOre, GregtechOrePrefixes aPrefix) {
+ for (GregtechOrePrefixes tPrefix : values()) {
+ if (aOre.startsWith(tPrefix.toString())) {
+ return aOre.replaceFirst(tPrefix.toString(), aPrefix.toString());
+ }
+ }
+ return "";
+ }
+
+ public static GregtechOrePrefixes getPrefix(String aPrefixName) {
+ return getPrefix(aPrefixName, null);
+ }
+
+ public static GregtechOrePrefixes getPrefix(String aPrefixName, GregtechOrePrefixes aReplacement) {
+ Object tObject = GT_Utility.getFieldContent(GregtechOrePrefixes.class, aPrefixName, false, false);
+ if (tObject != null && tObject instanceof GregtechOrePrefixes) return (GregtechOrePrefixes) tObject;
+ return aReplacement;
+ }
+
+ public static Materials getMaterial(String aOre) {
+ return Materials.get(stripPrefix(aOre));
+ }
+
+ public static Materials getMaterial(String aOre, GregtechOrePrefixes aPrefix) {
+ return Materials.get(aOre.replaceFirst(aPrefix.toString(), ""));
+ }
+
+ public static Materials getRealMaterial(String aOre, GregtechOrePrefixes aPrefix) {
+ return Materials.getRealMaterial(aOre.replaceFirst(aPrefix.toString(), ""));
+ }
+
+ public static boolean isInstanceOf(String aName, GregtechOrePrefixes aPrefix) {
+ return aName == null ? false : aName.startsWith(aPrefix.toString());
+ }
+
+ public boolean add(ItemStack aStack) {
+ if (aStack == null) return false;
+ if (!contains(aStack)) mPrefixedItems.add(aStack);
+ while (mPrefixedItems.contains(null)) mPrefixedItems.remove(null);
+ return true;
+ }
+
+ public boolean contains(ItemStack aStack) {
+ if (aStack == null) return false;
+ for (ItemStack tStack : mPrefixedItems)
+ if (GT_Utility.areStacksEqual(aStack, tStack, !tStack.hasTagCompound())) return true;
+ return false;
+ }
+
+ public boolean doGenerateItem(Materials aMaterial) {
+ return aMaterial != null && aMaterial != Materials._NULL && ((aMaterial.mTypes & mMaterialGenerationBits) != 0 || mGeneratedItems.contains(aMaterial)) && !mNotGeneratedItems.contains(aMaterial) && (mCondition == null || mCondition.isTrue(aMaterial));
+ }
+
+ public boolean ignoreMaterials(Materials... aMaterials) {
+ for (Materials tMaterial : aMaterials) if (tMaterial != null) mIgnoredMaterials.add(tMaterial);
+ return true;
+ }
+
+ public boolean isIgnored(Materials aMaterial) {
+ if (aMaterial != null && (!aMaterial.mUnificatable || aMaterial != aMaterial.mMaterialInto)) return true;
+ return mIgnoredMaterials.contains(aMaterial);
+ }
+
+ public boolean addFamiliarPrefix(GregtechOrePrefixes aPrefix) {
+ if (aPrefix == null || mFamiliarPrefixes.contains(aPrefix) || aPrefix == this) return false;
+ return mFamiliarPrefixes.add(aPrefix);
+ }
+
+ public boolean add(Interface_OreRecipeRegistrator aRegistrator) {
+ if (aRegistrator == null) return false;
+ return mOreProcessing.add(aRegistrator);
+ }
+
+ public void processOre(Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) {
+ if (aMaterial != null && (aMaterial != Materials._NULL || mIsSelfReferencing || !mIsMaterialBased) && GT_Utility.isStackValid(aStack))
+ for (Interface_OreRecipeRegistrator tRegistrator : mOreProcessing) {
+ if (D2)
+ GT_Log.ore.println("Processing '" + aOreDictName + "' with the Prefix '" + name() + "' and the Material '" + aMaterial.name() + "' at " + GT_Utility.getClassName(tRegistrator));
+ tRegistrator.registerOre(this, aMaterial, aOreDictName, aModName, GT_Utility.copyAmount(1, aStack));
+ }
+ }
+
+ public Object get(Object aMaterial) {
+ if (aMaterial instanceof Materials) return new GregtechItemData(this, (Materials) aMaterial);
+ return name() + aMaterial;
+ }
+
+ @SuppressWarnings("incomplete-switch")
+ public String getDefaultLocalNameForItem(Materials aMaterial) {
+
+
+ // Use Standard Localization
+ return mLocalizedMaterialPre + aMaterial.mDefaultLocalName + mLocalizedMaterialPost;
+ }
+
+ public enum GT_Materials implements IColorModulationContainer, ISubTagContainer {
+
+
+
+ /**
+ * This is the Default Material returned in case no Material has been found or a NullPointer has been inserted at a location where it shouldn't happen.
+ * <p/>
+ * Mainly for preventing NullPointer Exceptions and providing Default Values.
+ *
+ * Unknown Material Components. Dead End Section.
+ *
+ * Alkalus Range 730-799 & 970-998
+ * (aMetaItemSubID, TextureSet, aToolSpeed, aToolDurability, aToolQuality, aTypes, R, G, B, Alpha, aLocalName,
+ * aFuelType, aFuelPower, aMeltingPoint, aBlastFurnaceTemp, aBlastFurnaceRequired, aTransparent, aOreValue, aDensityMultiplier, aDensityDivider, aColor
+ * this(aMetaItemSubID, aIconSet, aToolSpeed, aToolDurability, aToolQuality, true);
+ *
+ */
+ _NULL(-1, TextureSet.SET_NONE, 1.0F, 0, 0, 0, 255, 255, 255, 0, "NULL", 0, 0, 0, 0, false, false, 1, 1, 1, Dyes._NULL, Element._NULL, Arrays.asList(new TC_AspectStack(TC_Aspects.VACUOS, 1))),
+
+
+ //Lapis(526, TextureSet.SET_LAPIS, 1.0F, 0, 1, 1 | 4 | 8, 70, 70, 220, 0, "Lapis", 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeBlue, 2, Arrays.asList(new MaterialStack(Materials.Lazurite, 12), new MaterialStack(Materials.Sodalite, 2), new MaterialStack(Materials.Pyrite, 1), new MaterialStack(Materials.Calcite, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.SENSUS, 1))),
+ Pyrotheum(20, TextureSet.SET_FIERY, 1.0F, 0, 1, 1, 255, 128, 0, 0, "Pyrotheum", 2, 62, -1, 0, false, false, 2, 3, 1, Dyes.dyeYellow, 2, Arrays.asList(new MaterialStack(Materials.Coal, 1), new MaterialStack(Materials.Redstone, 1), new MaterialStack(Materials.Blaze, 1), new MaterialStack(Materials.Sulfur, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.PRAECANTATIO, 2), new TC_AspectStack(TC_Aspects.IGNIS, 1))),
+ Cryotheum(21, TextureSet.SET_FIERY, 1.0F, 0, 1, 1, 102, 178, 255, 0, "Cryotheum", 2, 62, -1, 0, false, false, 2, 3, 1, Dyes.dyeLightBlue, 2, Arrays.asList(new MaterialStack(Materials.Blizz, 1), new MaterialStack(Materials.Redstone, 1), new MaterialStack(Materials.Snow, 1), new MaterialStack(Materials.Niter, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.PRAECANTATIO, 2), new TC_AspectStack(TC_Aspects.GELUM, 1))),
+
+ /**
+ * Circuitry, Batteries and other Technical things
+ */
+ Symbiotic(-1, TextureSet.SET_NONE, 1.0F, 0, 0, 0, 255, 255, 255, 0, "IV Tier", 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeLightGray, Arrays.asList(new TC_AspectStack(TC_Aspects.ELECTRUM, 4), new TC_AspectStack(TC_Aspects.MACHINA, 4))),
+ Neutronic(-1, TextureSet.SET_NONE, 1.0F, 0, 0, 0, 255, 255, 255, 0, "LuV Tier", 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeLightGray, Arrays.asList(new TC_AspectStack(TC_Aspects.ELECTRUM, 6), new TC_AspectStack(TC_Aspects.MACHINA, 6))),
+ Quantum(-1, TextureSet.SET_NONE, 1.0F, 0, 0, 0, 255, 255, 255, 0, "ZPM Tier", 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeLightGray, Arrays.asList(new TC_AspectStack(TC_Aspects.ELECTRUM, 8), new TC_AspectStack(TC_Aspects.MACHINA, 8)));
+
+ /*Advanced(-1, TextureSet.SET_NONE, 1.0F, 0, 0, 0, 255, 255, 255, 0, "Advanced", 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeLightGray, Arrays.asList(new TC_AspectStack(TC_Aspects.MACHINA, 4))),
Data(-1, TextureSet.SET_NONE, 1.0F, 0, 0, 0, 255, 255, 255, 0, "Data", 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeLightGray, Arrays.asList(new TC_AspectStack(TC_Aspects.MACHINA, 5))),
Elite(-1, TextureSet.SET_NONE, 1.0F, 0, 0, 0, 255, 255, 255, 0, "Elite", 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeLightGray, Arrays.asList(new TC_AspectStack(TC_Aspects.MACHINA, 6))),
Master(-1, TextureSet.SET_NONE, 1.0F, 0, 0, 0, 255, 255, 255, 0, "Master", 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeLightGray, Arrays.asList(new TC_AspectStack(TC_Aspects.MACHINA, 7))),
Ultimate(-1, TextureSet.SET_NONE, 1.0F, 0, 0, 0, 255, 255, 255, 0, "Ultimate", 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeLightGray, Arrays.asList(new TC_AspectStack(TC_Aspects.MACHINA, 8))),
Superconductor(-1, TextureSet.SET_NONE, 1.0F, 0, 0, 0, 255, 255, 255, 0, "Superconductor", 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeLightGray, Arrays.asList(new TC_AspectStack(TC_Aspects.ELECTRUM, 8))),
Infinite(-1, TextureSet.SET_NONE, 1.0F, 0, 0, 0, 255, 255, 255, 0, "Infinite", 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeLightGray);*/
-
- /**
- * List of all Materials.
- */
- public static final Collection<GT_Materials> VALUES = new HashSet<GT_Materials>(Arrays.asList(values()));
-
-
- static {
- /*Primitive.add(SubTag.NO_SMASHING, SubTag.NO_SMELTING);
+
+ /**
+ * List of all Materials.
+ */
+ public static final Collection<GT_Materials> VALUES = new HashSet<GT_Materials>(Arrays.asList(values()));
+
+
+ static {
+ /*Primitive.add(SubTag.NO_SMASHING, SubTag.NO_SMELTING);
Basic.add(SubTag.NO_SMASHING, SubTag.NO_SMELTING);
Good.add(SubTag.NO_SMASHING, SubTag.NO_SMELTING);
Advanced.add(SubTag.NO_SMASHING, SubTag.NO_SMELTING);
@@ -291,454 +303,454 @@ public enum GregtechOrePrefixes {
Ultimate.add(SubTag.NO_SMASHING, SubTag.NO_SMELTING);
Superconductor.add(SubTag.NO_SMASHING, SubTag.NO_SMELTING);
Infinite.add(SubTag.NO_SMASHING, SubTag.NO_SMELTING);*/
- Symbiotic.add(SubTag.NO_SMASHING, SubTag.NO_SMELTING);
- Neutronic.add(SubTag.NO_SMASHING, SubTag.NO_SMELTING);
- Quantum.add(SubTag.NO_SMASHING, SubTag.NO_SMELTING);
- }
-
-
- /**
- * This Array can be changed dynamically by a Tick Handler in order to get a glowing Effect on all GT Meta Items out of this Material.
- */
- public final short[] mRGBa = new short[]{255, 255, 255, 0}, mMoltenRGBa = new short[]{255, 255, 255, 0};
- public final TextureSet mIconSet;
- public final int mMetaItemSubID;
- public final boolean mUnificatable;
- public final GT_Materials mMaterialInto;
- public final List<MaterialStack> mMaterialList = new ArrayList<MaterialStack>();
- public final List<GT_Materials> mOreByProducts = new ArrayList<GT_Materials>(), mOreReRegistrations = new ArrayList<GT_Materials>();
- public final List<TC_AspectStack> mAspects = new ArrayList<TC_AspectStack>();
- private final ArrayList<ItemStack> mMaterialItems = new ArrayList<ItemStack>();
- private final Collection<SubTag> mSubTags = new HashSet<SubTag>();
- public Enchantment mEnchantmentTools = null, mEnchantmentArmors = null;
- public byte mEnchantmentToolsLevel = 0, mEnchantmentArmorsLevel = 0;
- public boolean mBlastFurnaceRequired = false;
- public float mToolSpeed = 1.0F, mHeatDamage = 0.0F;
- public String mChemicalFormula = "?", mDefaultLocalName = "null";
- public Dyes mColor = Dyes._NULL;
- public short mMeltingPoint = 0, mBlastFurnaceTemp = 0;
- public int mTypes = 0, mDurability = 16, mFuelPower = 0, mFuelType = 0, mExtraData = 0, mOreValue = 0, mOreMultiplier = 1, mByProductMultiplier = 1, mSmeltingMultiplier = 1;
- public long mDensity = M;
- public Element mElement = null;
- public GT_Materials mDirectSmelting = this, mOreReplacement = this, mMacerateInto = this, mSmeltInto = this, mArcSmeltInto = this, mHandleMaterial = this;
- public byte mToolQuality = 0;
- public Fluid mSolid = null, mFluid = null, mGas = null, mPlasma = null;
- /**
- * This Fluid is used as standard Unit for Molten Materials. 1296 is a Molten Block, what means 144 is one Material Unit worth
- */
- public Fluid mStandardMoltenFluid = null;
-
- private GT_Materials(int aMetaItemSubID, TextureSet aIconSet, float aToolSpeed, int aToolDurability, int aToolQuality, boolean aUnificatable) {
- mUnificatable = aUnificatable;
- mMaterialInto = this;
- mMetaItemSubID = aMetaItemSubID;
- mToolQuality = (byte) aToolQuality;
- mDurability = aToolDurability;
- mToolSpeed = aToolSpeed;
- mIconSet = aIconSet;
- if (aMetaItemSubID >= 0) {
- if (CORE.sMU_GeneratedMaterials[aMetaItemSubID] == null) {
- CORE.sMU_GeneratedMaterials[aMetaItemSubID] = this;
- } else {
- throw new IllegalArgumentException("The Index " + aMetaItemSubID + " is already used!");
- }
- }
- }
-
- private GT_Materials(GT_Materials aMaterialInto, boolean aReRegisterIntoThis) {
- mUnificatable = false;
- mDefaultLocalName = aMaterialInto.mDefaultLocalName;
- mMaterialInto = aMaterialInto.mMaterialInto;
- if (aReRegisterIntoThis) mMaterialInto.mOreReRegistrations.add(this);
- mChemicalFormula = aMaterialInto.mChemicalFormula;
- mMetaItemSubID = -1;
- mIconSet = TextureSet.SET_NONE;
- }
-
- /**
- * @param aMetaItemSubID the Sub-ID used in my own MetaItems. Range 0-1000. -1 for no Material
- * @param aTypes which kind of Items should be generated. Bitmask as follows:
- * 1 = Dusts of all kinds.
- * 2 = Dusts, Ingots, Plates, Rods/Sticks, Machine Components and other Metal specific things.
- * 4 = Dusts, Gems, Plates, Lenses (if transparent).
- * 8 = Dusts, Impure Dusts, crushed Ores, purified Ores, centrifuged Ores etc.
- * 16 = Cells
- * 32 = Plasma Cells
- * 64 = Tool Heads
- * 128 = Gears
- * @param aR, aG, aB Color of the Material 0-255 each.
- * @param aA transparency of the Material Texture. 0 = fully visible, 255 = Invisible.
- * @param aLocalName The Name used as Default for localization.
- * @param aFuelType Type of Generator to get Energy from this Material.
- * @param aFuelPower EU generated. Will be multiplied by 1000, also additionally multiplied by 2 for Gems.
- * @param aAmplificationValue Amount of UUM amplifier gotten from this.
- * @param aUUMEnergy Amount of EU needed to shape the UUM into this Material.
- * @param aMeltingPoint Used to determine the smelting Costs in Furnii.
- * @param aBlastFurnaceTemp Used to determine the needed Heat capactiy Costs in Blast Furnii.
- * @param aBlastFurnaceRequired If this requires a Blast Furnace.
- * @param aColor Vanilla MC Wool Color which comes the closest to this.
- */
- private GT_Materials(int aMetaItemSubID, TextureSet aIconSet, float aToolSpeed, int aToolDurability, int aToolQuality, int aTypes, int aR, int aG, int aB, int aA, String aLocalName, int aFuelType, int aFuelPower, int aMeltingPoint, int aBlastFurnaceTemp, boolean aBlastFurnaceRequired, boolean aTransparent, int aOreValue, int aDensityMultiplier, int aDensityDivider, Dyes aColor) {
- this(aMetaItemSubID, aIconSet, aToolSpeed, aToolDurability, aToolQuality, true);
- mDefaultLocalName = aLocalName;
- mMeltingPoint = (short) aMeltingPoint;
- mBlastFurnaceTemp = (short) aBlastFurnaceTemp;
- mBlastFurnaceRequired = aBlastFurnaceRequired;
- if (aTransparent) add(SubTag.TRANSPARENT);
- mFuelPower = aFuelPower;
- mFuelType = aFuelType;
- mOreValue = aOreValue;
- mDensity = (M * aDensityMultiplier) / aDensityDivider;
- mColor = aColor == null ? Dyes._NULL : aColor;
- if (mColor != null) add(SubTag.HAS_COLOR);
- mRGBa[0] = mMoltenRGBa[0] = (short) aR;
- mRGBa[1] = mMoltenRGBa[1] = (short) aG;
- mRGBa[2] = mMoltenRGBa[2] = (short) aB;
- mRGBa[3] = mMoltenRGBa[3] = (short) aA;
- mTypes = aTypes;
- if ((mTypes & 2) != 0) add(SubTag.SMELTING_TO_FLUID);
- }
-
- private GT_Materials(int aMetaItemSubID, TextureSet aIconSet, float aToolSpeed, int aToolDurability, int aToolQuality, int aTypes, int aR, int aG, int aB, int aA, String aLocalName, int aFuelType, int aFuelPower, int aMeltingPoint, int aBlastFurnaceTemp, boolean aBlastFurnaceRequired, boolean aTransparent, int aOreValue, int aDensityMultiplier, int aDensityDivider, Dyes aColor, List<TC_AspectStack> aAspects) {
- this(aMetaItemSubID, aIconSet, aToolSpeed, aToolDurability, aToolQuality, aTypes, aR, aG, aB, aA, aLocalName, aFuelType, aFuelPower, aMeltingPoint, aBlastFurnaceTemp, aBlastFurnaceRequired, aTransparent, aOreValue, aDensityMultiplier, aDensityDivider, aColor);
- mAspects.addAll(aAspects);
- }
-
- /**
- * @param aElement The Element Enum represented by this Material
- */
- private GT_Materials(int aMetaItemSubID, TextureSet aIconSet, float aToolSpeed, int aToolDurability, int aToolQuality, int aTypes, int aR, int aG, int aB, int aA, String aLocalName, int aFuelType, int aFuelPower, int aMeltingPoint, int aBlastFurnaceTemp, boolean aBlastFurnaceRequired, boolean aTransparent, int aOreValue, int aDensityMultiplier, int aDensityDivider, Dyes aColor, Element aElement, List<TC_AspectStack> aAspects) {
- this(aMetaItemSubID, aIconSet, aToolSpeed, aToolDurability, aToolQuality, aTypes, aR, aG, aB, aA, aLocalName, aFuelType, aFuelPower, aMeltingPoint, aBlastFurnaceTemp, aBlastFurnaceRequired, aTransparent, aOreValue, aDensityMultiplier, aDensityDivider, aColor);
- mElement = aElement;
- //mElement.mLinkedMaterials.add(this);
- if (aElement == Element._NULL) {
- mChemicalFormula = "Empty";
- } else {
- mChemicalFormula = aElement.toString();
- mChemicalFormula = mChemicalFormula.replaceAll("_", "-");
- }
- mAspects.addAll(aAspects);
- }
-
- private GT_Materials(int aMetaItemSubID, TextureSet aIconSet, float aToolSpeed, int aToolDurability, int aToolQuality, int aTypes, int aR, int aG, int aB, int aA, String aLocalName, int aFuelType, int aFuelPower, int aMeltingPoint, int aBlastFurnaceTemp, boolean aBlastFurnaceRequired, boolean aTransparent, int aOreValue, int aDensityMultiplier, int aDensityDivider, Dyes aColor, int aExtraData, List<MaterialStack> aMaterialList) {
- this(aMetaItemSubID, aIconSet, aToolSpeed, aToolDurability, aToolQuality, aTypes, aR, aG, aB, aA, aLocalName, aFuelType, aFuelPower, aMeltingPoint, aBlastFurnaceTemp, aBlastFurnaceRequired, aTransparent, aOreValue, aDensityMultiplier, aDensityDivider, aColor, aExtraData, aMaterialList, null);
- }
-
- private GT_Materials(int aMetaItemSubID, TextureSet aIconSet, float aToolSpeed, int aToolDurability, int aToolQuality, int aTypes, int aR, int aG, int aB, int aA, String aLocalName, int aFuelType, int aFuelPower, int aMeltingPoint, int aBlastFurnaceTemp, boolean aBlastFurnaceRequired, boolean aTransparent, int aOreValue, int aDensityMultiplier, int aDensityDivider, Dyes aColor, int aExtraData, List<MaterialStack> aMaterialList, List<TC_AspectStack> aAspects) {
- this(aMetaItemSubID, aIconSet, aToolSpeed, aToolDurability, aToolQuality, aTypes, aR, aG, aB, aA, aLocalName, aFuelType, aFuelPower, aMeltingPoint, aBlastFurnaceTemp, aBlastFurnaceRequired, aTransparent, aOreValue, aDensityMultiplier, aDensityDivider, aColor);
- mExtraData = aExtraData;
- mMaterialList.addAll(aMaterialList);
- mChemicalFormula = "";
- for (MaterialStack tMaterial : mMaterialList) mChemicalFormula += tMaterial.toString();
- mChemicalFormula = mChemicalFormula.replaceAll("_", "-");
-
- int tAmountOfComponents = 0, tMeltingPoint = 0;
- for (MaterialStack tMaterial : mMaterialList) {
- tAmountOfComponents += tMaterial.mAmount;
- if (tMaterial.mMaterial.mMeltingPoint > 0)
- tMeltingPoint += tMaterial.mMaterial.mMeltingPoint * tMaterial.mAmount;
- if (aAspects == null)
- for (TC_AspectStack tAspect : tMaterial.mMaterial.mAspects) tAspect.addToAspectList(mAspects);
- }
-
- if (mMeltingPoint < 0) mMeltingPoint = (short) (tMeltingPoint / tAmountOfComponents);
-
- tAmountOfComponents *= aDensityMultiplier;
- tAmountOfComponents /= aDensityDivider;
- if (aAspects == null) for (TC_AspectStack tAspect : mAspects)
- tAspect.mAmount = Math.max(1, tAspect.mAmount / Math.max(1, tAmountOfComponents));
- else mAspects.addAll(aAspects);
- }
-
- public static GT_Materials get(String aMaterialName) {
- Object tObject = GT_Utility.getFieldContent(GT_Materials.class, aMaterialName, false, false);
- if (tObject != null && tObject instanceof Materials) return (GT_Materials) tObject;
- return _NULL;
- }
-
- public static GT_Materials getRealMaterial(String aMaterialName) {
- return get(aMaterialName).mMaterialInto;
- }
-
- /**
- * Called in preInit with the Config to set Values.
- *
- * @param aConfiguration
- */
- public static void init(GT_Config aConfiguration) {
- for (GT_Materials tMaterial : VALUES) {
- String tString = tMaterial.toString().toLowerCase();
- tMaterial.mHeatDamage = (float) aConfiguration.get(ConfigCategories.Materials.heatdamage, tString, tMaterial.mHeatDamage);
- if (tMaterial.mBlastFurnaceRequired)
- tMaterial.mBlastFurnaceRequired = aConfiguration.get(ConfigCategories.Materials.blastfurnacerequirements, tString, true);
- if (tMaterial.mBlastFurnaceRequired && aConfiguration.get(ConfigCategories.Materials.blastinductionsmelter, tString, tMaterial.mBlastFurnaceTemp < 1500)){}
- //GT_ModHandler.ThermalExpansion.addSmelterBlastOre(tMaterial);
- //tMaterial.mHandleMaterial = (tMaterial == Desh ? tMaterial.mHandleMaterial : tMaterial == Diamond || tMaterial == Thaumium ? Wood : tMaterial.contains(SubTag.BURNING) ? Blaze : tMaterial.contains(SubTag.MAGICAL) && tMaterial.contains(SubTag.CRYSTAL) && Loader.isModLoaded(MOD_ID_TC) ? Thaumium : tMaterial.getMass() > Element.Tc.getMass() * 2 ? TungstenSteel : tMaterial.getMass() > Element.Tc.getMass() ? Steel : Wood);
- }
- }
-
- public boolean isRadioactive() {
- if (mElement != null) return mElement.mHalfLifeSeconds >= 0;
- for (MaterialStack tMaterial : mMaterialList) if (tMaterial.mMaterial.isRadioactive()) return true;
- return false;
- }
-
- public long getProtons() {
- if (mElement != null) return mElement.getProtons();
- if (mMaterialList.size() <= 0) return Element.Tc.getProtons();
- long rAmount = 0, tAmount = 0;
- for (MaterialStack tMaterial : mMaterialList) {
- tAmount += tMaterial.mAmount;
- rAmount += tMaterial.mAmount * tMaterial.mMaterial.getProtons();
- }
- return (getDensity() * rAmount) / (tAmount * M);
- }
-
- public long getNeutrons() {
- if (mElement != null) return mElement.getNeutrons();
- if (mMaterialList.size() <= 0) return Element.Tc.getNeutrons();
- long rAmount = 0, tAmount = 0;
- for (MaterialStack tMaterial : mMaterialList) {
- tAmount += tMaterial.mAmount;
- rAmount += tMaterial.mAmount * tMaterial.mMaterial.getNeutrons();
- }
- return (getDensity() * rAmount) / (tAmount * M);
- }
-
- public long getMass() {
- if (mElement != null) return mElement.getMass();
- if (mMaterialList.size() <= 0) return Element.Tc.getMass();
- long rAmount = 0, tAmount = 0;
- for (MaterialStack tMaterial : mMaterialList) {
- tAmount += tMaterial.mAmount;
- rAmount += tMaterial.mAmount * tMaterial.mMaterial.getMass();
- }
- return (getDensity() * rAmount) / (tAmount * M);
- }
-
- public long getDensity() {
- return mDensity;
- }
-
- public String getToolTip() {
- return getToolTip(1, false);
- }
-
- public String getToolTip(boolean aShowQuestionMarks) {
- return getToolTip(1, aShowQuestionMarks);
- }
-
- public String getToolTip(long aMultiplier) {
- return getToolTip(aMultiplier, false);
- }
-
- public String getToolTip(long aMultiplier, boolean aShowQuestionMarks) {
- if (!aShowQuestionMarks && mChemicalFormula.equals("?")) return "";
- if (aMultiplier >= M * 2 && !mMaterialList.isEmpty()) {
- return ((mElement != null || (mMaterialList.size() < 2 && mMaterialList.get(0).mAmount == 1)) ? mChemicalFormula : "(" + mChemicalFormula + ")") + aMultiplier;
- }
- return mChemicalFormula;
- }
-
- /**
- * Adds an ItemStack to this Material.
- */
- public GT_Materials add(ItemStack aStack) {
- if (aStack != null && !contains(aStack)) mMaterialItems.add(aStack);
- return this;
- }
-
- /**
- * This is used to determine if any of the ItemStacks belongs to this Material.
- */
- public boolean contains(ItemStack... aStacks) {
- if (aStacks == null || aStacks.length <= 0) return false;
- for (ItemStack tStack : mMaterialItems)
- for (ItemStack aStack : aStacks)
- if (GT_Utility.areStacksEqual(aStack, tStack, !tStack.hasTagCompound())) return true;
- return false;
- }
-
- /**
- * This is used to determine if an ItemStack belongs to this Material.
- */
- public boolean remove(ItemStack aStack) {
- if (aStack == null) return false;
- boolean temp = false;
- for (int i = 0; i < mMaterialItems.size(); i++)
- if (GT_Utility.areStacksEqual(aStack, mMaterialItems.get(i))) {
- mMaterialItems.remove(i--);
- temp = true;
- }
- return temp;
- }
-
- /**
- * Adds a SubTag to this Material
- */
- @Override
- public ISubTagContainer add(SubTag... aTags) {
- if (aTags != null) for (SubTag aTag : aTags)
- if (aTag != null && !contains(aTag)) {
- aTag.addContainerToList(this);
- mSubTags.add(aTag);
- }
- return this;
- }
-
- /**
- * If this Material has this exact SubTag
- */
- @Override
- public boolean contains(SubTag aTag) {
- return mSubTags.contains(aTag);
- }
-
- /**
- * Removes a SubTag from this Material
- */
- @Override
- public boolean remove(SubTag aTag) {
- return mSubTags.remove(aTag);
- }
-
- /**
- * Sets the Heat Damage for this Material (negative = frost)
- */
- public GT_Materials setHeatDamage(float aHeatDamage) {
- mHeatDamage = aHeatDamage;
- return this;
- }
-
- /**
- * Adds a Material to the List of Byproducts when grinding this Ore.
- * Is used for more precise Ore grinding, so that it is possible to choose between certain kinds of Materials.
- */
- public GT_Materials addOreByProduct(GT_Materials aMaterial) {
- if (!mOreByProducts.contains(aMaterial.mMaterialInto)) mOreByProducts.add(aMaterial.mMaterialInto);
- return this;
- }
-
- /**
- * Adds multiple Materials to the List of Byproducts when grinding this Ore.
- * Is used for more precise Ore grinding, so that it is possible to choose between certain kinds of Materials.
- */
- public GT_Materials addOreByProducts(GT_Materials... aMaterials) {
- for (GT_Materials tMaterial : aMaterials) if (tMaterial != null) addOreByProduct(tMaterial);
- return this;
- }
-
- /**
- * If this Ore gives multiple drops of its Main Material.
- * Lapis Ore for example gives about 6 drops.
- */
- public GT_Materials setOreMultiplier(int aOreMultiplier) {
- if (aOreMultiplier > 0) mOreMultiplier = aOreMultiplier;
- return this;
- }
-
- /**
- * If this Ore gives multiple drops of its Byproduct Material.
- */
- public GT_Materials setByProductMultiplier(int aByProductMultiplier) {
- if (aByProductMultiplier > 0) mByProductMultiplier = aByProductMultiplier;
- return this;
- }
-
- /**
- * If this Ore gives multiple drops of its Main Material.
- * Lapis Ore for example gives about 6 drops.
- */
- public GT_Materials setSmeltingMultiplier(int aSmeltingMultiplier) {
- if (aSmeltingMultiplier > 0) mSmeltingMultiplier = aSmeltingMultiplier;
- return this;
- }
-
- /**
- * This Ore should be smolten directly into an Ingot of this Material instead of an Ingot of itself.
- */
- public GT_Materials setDirectSmelting(GT_Materials aMaterial) {
- if (aMaterial != null) mDirectSmelting = aMaterial.mMaterialInto.mDirectSmelting;
- return this;
- }
-
- /**
- * This Material should be the Main Material this Ore gets ground into.
- * Example, Chromite giving Chrome or Tungstate giving Tungsten.
- */
- public GT_Materials setOreReplacement(GT_Materials aMaterial) {
- if (aMaterial != null) mOreReplacement = aMaterial.mMaterialInto.mOreReplacement;
- return this;
- }
-
- /**
- * This Material smelts always into an instance of aMaterial. Used for Magnets.
- */
- public GT_Materials setSmeltingInto(GT_Materials aMaterial) {
- if (aMaterial != null) mSmeltInto = aMaterial.mMaterialInto.mSmeltInto;
- return this;
- }
-
- /**
- * This Material arc smelts always into an instance of aMaterial. Used for Wrought Iron.
- */
- public GT_Materials setArcSmeltingInto(GT_Materials aMaterial) {
- if (aMaterial != null) mArcSmeltInto = aMaterial.mMaterialInto.mArcSmeltInto;
- return this;
- }
-
- /**
- * This Material macerates always into an instance of aMaterial.
- */
- public GT_Materials setMaceratingInto(GT_Materials aMaterial) {
- if (aMaterial != null) mMacerateInto = aMaterial.mMaterialInto.mMacerateInto;
- return this;
- }
-
- public GT_Materials setEnchantmentForTools(Enchantment aEnchantment, int aEnchantmentLevel) {
- mEnchantmentTools = aEnchantment;
- mEnchantmentToolsLevel = (byte) aEnchantmentLevel;
- return this;
- }
-
- public GT_Materials setEnchantmentForArmors(Enchantment aEnchantment, int aEnchantmentLevel) {
- mEnchantmentArmors = aEnchantment;
- mEnchantmentArmorsLevel = (byte) aEnchantmentLevel;
- return this;
- }
-
- public FluidStack getSolid(long aAmount) {
- if (mSolid == null) return null;
- return new GT_FluidStack(mSolid, (int) aAmount);
- }
-
- public FluidStack getFluid(long aAmount) {
- if (mFluid == null) return null;
- return new GT_FluidStack(mFluid, (int) aAmount);
- }
-
- public FluidStack getGas(long aAmount) {
- if (mGas == null) return null;
- return new GT_FluidStack(mGas, (int) aAmount);
- }
-
- public FluidStack getPlasma(long aAmount) {
- if (mPlasma == null) return null;
- return new GT_FluidStack(mPlasma, (int) aAmount);
- }
-
- public FluidStack getMolten(long aAmount) {
- if (mStandardMoltenFluid == null) return null;
- return new GT_FluidStack(mStandardMoltenFluid, (int) aAmount);
- }
-
- @Override
- public short[] getRGBA() {
- return mRGBa;
- }
-
- public static volatile int VERSION = 508;
-
- }
-
+ Symbiotic.add(SubTag.NO_SMASHING, SubTag.NO_SMELTING);
+ Neutronic.add(SubTag.NO_SMASHING, SubTag.NO_SMELTING);
+ Quantum.add(SubTag.NO_SMASHING, SubTag.NO_SMELTING);
+ }
+
+
+ /**
+ * This Array can be changed dynamically by a Tick Handler in order to get a glowing Effect on all GT Meta Items out of this Material.
+ */
+ public final short[] mRGBa = new short[]{255, 255, 255, 0}, mMoltenRGBa = new short[]{255, 255, 255, 0};
+ public final TextureSet mIconSet;
+ public final int mMetaItemSubID;
+ public final boolean mUnificatable;
+ public final GT_Materials mMaterialInto;
+ public final List<MaterialStack> mMaterialList = new ArrayList<MaterialStack>();
+ public final List<GT_Materials> mOreByProducts = new ArrayList<GT_Materials>(), mOreReRegistrations = new ArrayList<GT_Materials>();
+ public final List<TC_AspectStack> mAspects = new ArrayList<TC_AspectStack>();
+ private final ArrayList<ItemStack> mMaterialItems = new ArrayList<ItemStack>();
+ private final Collection<SubTag> mSubTags = new HashSet<SubTag>();
+ public Enchantment mEnchantmentTools = null, mEnchantmentArmors = null;
+ public byte mEnchantmentToolsLevel = 0, mEnchantmentArmorsLevel = 0;
+ public boolean mBlastFurnaceRequired = false;
+ public float mToolSpeed = 1.0F, mHeatDamage = 0.0F;
+ public String mChemicalFormula = "?", mDefaultLocalName = "null";
+ public Dyes mColor = Dyes._NULL;
+ public short mMeltingPoint = 0, mBlastFurnaceTemp = 0;
+ public int mTypes = 0, mDurability = 16, mFuelPower = 0, mFuelType = 0, mExtraData = 0, mOreValue = 0, mOreMultiplier = 1, mByProductMultiplier = 1, mSmeltingMultiplier = 1;
+ public long mDensity = M;
+ public Element mElement = null;
+ public GT_Materials mDirectSmelting = this, mOreReplacement = this, mMacerateInto = this, mSmeltInto = this, mArcSmeltInto = this, mHandleMaterial = this;
+ public byte mToolQuality = 0;
+ public Fluid mSolid = null, mFluid = null, mGas = null, mPlasma = null;
+ /**
+ * This Fluid is used as standard Unit for Molten Materials. 1296 is a Molten Block, what means 144 is one Material Unit worth
+ */
+ public Fluid mStandardMoltenFluid = null;
+
+ private GT_Materials(int aMetaItemSubID, TextureSet aIconSet, float aToolSpeed, int aToolDurability, int aToolQuality, boolean aUnificatable) {
+ mUnificatable = aUnificatable;
+ mMaterialInto = this;
+ mMetaItemSubID = aMetaItemSubID;
+ mToolQuality = (byte) aToolQuality;
+ mDurability = aToolDurability;
+ mToolSpeed = aToolSpeed;
+ mIconSet = aIconSet;
+ if (aMetaItemSubID >= 0) {
+ if (CORE.sMU_GeneratedMaterials[aMetaItemSubID] == null) {
+ CORE.sMU_GeneratedMaterials[aMetaItemSubID] = this;
+ } else {
+ throw new IllegalArgumentException("The Index " + aMetaItemSubID + " is already used!");
+ }
+ }
+ }
+
+ private GT_Materials(GT_Materials aMaterialInto, boolean aReRegisterIntoThis) {
+ mUnificatable = false;
+ mDefaultLocalName = aMaterialInto.mDefaultLocalName;
+ mMaterialInto = aMaterialInto.mMaterialInto;
+ if (aReRegisterIntoThis) mMaterialInto.mOreReRegistrations.add(this);
+ mChemicalFormula = aMaterialInto.mChemicalFormula;
+ mMetaItemSubID = -1;
+ mIconSet = TextureSet.SET_NONE;
+ }
+
+ /**
+ * @param aMetaItemSubID the Sub-ID used in my own MetaItems. Range 0-1000. -1 for no Material
+ * @param aTypes which kind of Items should be generated. Bitmask as follows:
+ * 1 = Dusts of all kinds.
+ * 2 = Dusts, Ingots, Plates, Rods/Sticks, Machine Components and other Metal specific things.
+ * 4 = Dusts, Gems, Plates, Lenses (if transparent).
+ * 8 = Dusts, Impure Dusts, crushed Ores, purified Ores, centrifuged Ores etc.
+ * 16 = Cells
+ * 32 = Plasma Cells
+ * 64 = Tool Heads
+ * 128 = Gears
+ * @param aR, aG, aB Color of the Material 0-255 each.
+ * @param aA transparency of the Material Texture. 0 = fully visible, 255 = Invisible.
+ * @param aLocalName The Name used as Default for localization.
+ * @param aFuelType Type of Generator to get Energy from this Material.
+ * @param aFuelPower EU generated. Will be multiplied by 1000, also additionally multiplied by 2 for Gems.
+ * @param aAmplificationValue Amount of UUM amplifier gotten from this.
+ * @param aUUMEnergy Amount of EU needed to shape the UUM into this Material.
+ * @param aMeltingPoint Used to determine the smelting Costs in Furnii.
+ * @param aBlastFurnaceTemp Used to determine the needed Heat capactiy Costs in Blast Furnii.
+ * @param aBlastFurnaceRequired If this requires a Blast Furnace.
+ * @param aColor Vanilla MC Wool Color which comes the closest to this.
+ */
+ private GT_Materials(int aMetaItemSubID, TextureSet aIconSet, float aToolSpeed, int aToolDurability, int aToolQuality, int aTypes, int aR, int aG, int aB, int aA, String aLocalName, int aFuelType, int aFuelPower, int aMeltingPoint, int aBlastFurnaceTemp, boolean aBlastFurnaceRequired, boolean aTransparent, int aOreValue, int aDensityMultiplier, int aDensityDivider, Dyes aColor) {
+ this(aMetaItemSubID, aIconSet, aToolSpeed, aToolDurability, aToolQuality, true);
+ mDefaultLocalName = aLocalName;
+ mMeltingPoint = (short) aMeltingPoint;
+ mBlastFurnaceTemp = (short) aBlastFurnaceTemp;
+ mBlastFurnaceRequired = aBlastFurnaceRequired;
+ if (aTransparent) add(SubTag.TRANSPARENT);
+ mFuelPower = aFuelPower;
+ mFuelType = aFuelType;
+ mOreValue = aOreValue;
+ mDensity = (M * aDensityMultiplier) / aDensityDivider;
+ mColor = aColor == null ? Dyes._NULL : aColor;
+ if (mColor != null) add(SubTag.HAS_COLOR);
+ mRGBa[0] = mMoltenRGBa[0] = (short) aR;
+ mRGBa[1] = mMoltenRGBa[1] = (short) aG;
+ mRGBa[2] = mMoltenRGBa[2] = (short) aB;
+ mRGBa[3] = mMoltenRGBa[3] = (short) aA;
+ mTypes = aTypes;
+ if ((mTypes & 2) != 0) add(SubTag.SMELTING_TO_FLUID);
+ }
+
+ private GT_Materials(int aMetaItemSubID, TextureSet aIconSet, float aToolSpeed, int aToolDurability, int aToolQuality, int aTypes, int aR, int aG, int aB, int aA, String aLocalName, int aFuelType, int aFuelPower, int aMeltingPoint, int aBlastFurnaceTemp, boolean aBlastFurnaceRequired, boolean aTransparent, int aOreValue, int aDensityMultiplier, int aDensityDivider, Dyes aColor, List<TC_AspectStack> aAspects) {
+ this(aMetaItemSubID, aIconSet, aToolSpeed, aToolDurability, aToolQuality, aTypes, aR, aG, aB, aA, aLocalName, aFuelType, aFuelPower, aMeltingPoint, aBlastFurnaceTemp, aBlastFurnaceRequired, aTransparent, aOreValue, aDensityMultiplier, aDensityDivider, aColor);
+ mAspects.addAll(aAspects);
+ }
+
+ /**
+ * @param aElement The Element Enum represented by this Material
+ */
+ private GT_Materials(int aMetaItemSubID, TextureSet aIconSet, float aToolSpeed, int aToolDurability, int aToolQuality, int aTypes, int aR, int aG, int aB, int aA, String aLocalName, int aFuelType, int aFuelPower, int aMeltingPoint, int aBlastFurnaceTemp, boolean aBlastFurnaceRequired, boolean aTransparent, int aOreValue, int aDensityMultiplier, int aDensityDivider, Dyes aColor, Element aElement, List<TC_AspectStack> aAspects) {
+ this(aMetaItemSubID, aIconSet, aToolSpeed, aToolDurability, aToolQuality, aTypes, aR, aG, aB, aA, aLocalName, aFuelType, aFuelPower, aMeltingPoint, aBlastFurnaceTemp, aBlastFurnaceRequired, aTransparent, aOreValue, aDensityMultiplier, aDensityDivider, aColor);
+ mElement = aElement;
+ //mElement.mLinkedMaterials.add(this);
+ if (aElement == Element._NULL) {
+ mChemicalFormula = "Empty";
+ } else {
+ mChemicalFormula = aElement.toString();
+ mChemicalFormula = mChemicalFormula.replaceAll("_", "-");
+ }
+ mAspects.addAll(aAspects);
+ }
+
+ private GT_Materials(int aMetaItemSubID, TextureSet aIconSet, float aToolSpeed, int aToolDurability, int aToolQuality, int aTypes, int aR, int aG, int aB, int aA, String aLocalName, int aFuelType, int aFuelPower, int aMeltingPoint, int aBlastFurnaceTemp, boolean aBlastFurnaceRequired, boolean aTransparent, int aOreValue, int aDensityMultiplier, int aDensityDivider, Dyes aColor, int aExtraData, List<MaterialStack> aMaterialList) {
+ this(aMetaItemSubID, aIconSet, aToolSpeed, aToolDurability, aToolQuality, aTypes, aR, aG, aB, aA, aLocalName, aFuelType, aFuelPower, aMeltingPoint, aBlastFurnaceTemp, aBlastFurnaceRequired, aTransparent, aOreValue, aDensityMultiplier, aDensityDivider, aColor, aExtraData, aMaterialList, null);
+ }
+
+ private GT_Materials(int aMetaItemSubID, TextureSet aIconSet, float aToolSpeed, int aToolDurability, int aToolQuality, int aTypes, int aR, int aG, int aB, int aA, String aLocalName, int aFuelType, int aFuelPower, int aMeltingPoint, int aBlastFurnaceTemp, boolean aBlastFurnaceRequired, boolean aTransparent, int aOreValue, int aDensityMultiplier, int aDensityDivider, Dyes aColor, int aExtraData, List<MaterialStack> aMaterialList, List<TC_AspectStack> aAspects) {
+ this(aMetaItemSubID, aIconSet, aToolSpeed, aToolDurability, aToolQuality, aTypes, aR, aG, aB, aA, aLocalName, aFuelType, aFuelPower, aMeltingPoint, aBlastFurnaceTemp, aBlastFurnaceRequired, aTransparent, aOreValue, aDensityMultiplier, aDensityDivider, aColor);
+ mExtraData = aExtraData;
+ mMaterialList.addAll(aMaterialList);
+ mChemicalFormula = "";
+ for (MaterialStack tMaterial : mMaterialList) mChemicalFormula += tMaterial.toString();
+ mChemicalFormula = mChemicalFormula.replaceAll("_", "-");
+
+ int tAmountOfComponents = 0, tMeltingPoint = 0;
+ for (MaterialStack tMaterial : mMaterialList) {
+ tAmountOfComponents += tMaterial.mAmount;
+ if (tMaterial.mMaterial.mMeltingPoint > 0)
+ tMeltingPoint += tMaterial.mMaterial.mMeltingPoint * tMaterial.mAmount;
+ if (aAspects == null)
+ for (TC_AspectStack tAspect : tMaterial.mMaterial.mAspects) tAspect.addToAspectList(mAspects);
+ }
+
+ if (mMeltingPoint < 0) mMeltingPoint = (short) (tMeltingPoint / tAmountOfComponents);
+
+ tAmountOfComponents *= aDensityMultiplier;
+ tAmountOfComponents /= aDensityDivider;
+ if (aAspects == null) for (TC_AspectStack tAspect : mAspects)
+ tAspect.mAmount = Math.max(1, tAspect.mAmount / Math.max(1, tAmountOfComponents));
+ else mAspects.addAll(aAspects);
+ }
+
+ public static GT_Materials get(String aMaterialName) {
+ Object tObject = GT_Utility.getFieldContent(GT_Materials.class, aMaterialName, false, false);
+ if (tObject != null && tObject instanceof Materials) return (GT_Materials) tObject;
+ return _NULL;
+ }
+
+ public static GT_Materials getRealMaterial(String aMaterialName) {
+ return get(aMaterialName).mMaterialInto;
+ }
+
+ /**
+ * Called in preInit with the Config to set Values.
+ *
+ * @param aConfiguration
+ */
+ public static void init(GT_Config aConfiguration) {
+ for (GT_Materials tMaterial : VALUES) {
+ String tString = tMaterial.toString().toLowerCase();
+ tMaterial.mHeatDamage = (float) aConfiguration.get(ConfigCategories.Materials.heatdamage, tString, tMaterial.mHeatDamage);
+ if (tMaterial.mBlastFurnaceRequired)
+ tMaterial.mBlastFurnaceRequired = aConfiguration.get(ConfigCategories.Materials.blastfurnacerequirements, tString, true);
+ if (tMaterial.mBlastFurnaceRequired && aConfiguration.get(ConfigCategories.Materials.blastinductionsmelter, tString, tMaterial.mBlastFurnaceTemp < 1500)){}
+ //GT_ModHandler.ThermalExpansion.addSmelterBlastOre(tMaterial);
+ //tMaterial.mHandleMaterial = (tMaterial == Desh ? tMaterial.mHandleMaterial : tMaterial == Diamond || tMaterial == Thaumium ? Wood : tMaterial.contains(SubTag.BURNING) ? Blaze : tMaterial.contains(SubTag.MAGICAL) && tMaterial.contains(SubTag.CRYSTAL) && Loader.isModLoaded(MOD_ID_TC) ? Thaumium : tMaterial.getMass() > Element.Tc.getMass() * 2 ? TungstenSteel : tMaterial.getMass() > Element.Tc.getMass() ? Steel : Wood);
+ }
+ }
+
+ public boolean isRadioactive() {
+ if (mElement != null) return mElement.mHalfLifeSeconds >= 0;
+ for (MaterialStack tMaterial : mMaterialList) if (tMaterial.mMaterial.isRadioactive()) return true;
+ return false;
+ }
+
+ public long getProtons() {
+ if (mElement != null) return mElement.getProtons();
+ if (mMaterialList.size() <= 0) return Element.Tc.getProtons();
+ long rAmount = 0, tAmount = 0;
+ for (MaterialStack tMaterial : mMaterialList) {
+ tAmount += tMaterial.mAmount;
+ rAmount += tMaterial.mAmount * tMaterial.mMaterial.getProtons();
+ }
+ return (getDensity() * rAmount) / (tAmount * M);
+ }
+
+ public long getNeutrons() {
+ if (mElement != null) return mElement.getNeutrons();
+ if (mMaterialList.size() <= 0) return Element.Tc.getNeutrons();
+ long rAmount = 0, tAmount = 0;
+ for (MaterialStack tMaterial : mMaterialList) {
+ tAmount += tMaterial.mAmount;
+ rAmount += tMaterial.mAmount * tMaterial.mMaterial.getNeutrons();
+ }
+ return (getDensity() * rAmount) / (tAmount * M);
+ }
+
+ public long getMass() {
+ if (mElement != null) return mElement.getMass();
+ if (mMaterialList.size() <= 0) return Element.Tc.getMass();
+ long rAmount = 0, tAmount = 0;
+ for (MaterialStack tMaterial : mMaterialList) {
+ tAmount += tMaterial.mAmount;
+ rAmount += tMaterial.mAmount * tMaterial.mMaterial.getMass();
+ }
+ return (getDensity() * rAmount) / (tAmount * M);
+ }
+
+ public long getDensity() {
+ return mDensity;
+ }
+
+ public String getToolTip() {
+ return getToolTip(1, false);
+ }
+
+ public String getToolTip(boolean aShowQuestionMarks) {
+ return getToolTip(1, aShowQuestionMarks);
+ }
+
+ public String getToolTip(long aMultiplier) {
+ return getToolTip(aMultiplier, false);
+ }
+
+ public String getToolTip(long aMultiplier, boolean aShowQuestionMarks) {
+ if (!aShowQuestionMarks && mChemicalFormula.equals("?")) return "";
+ if (aMultiplier >= M * 2 && !mMaterialList.isEmpty()) {
+ return ((mElement != null || (mMaterialList.size() < 2 && mMaterialList.get(0).mAmount == 1)) ? mChemicalFormula : "(" + mChemicalFormula + ")") + aMultiplier;
+ }
+ return mChemicalFormula;
+ }
+
+ /**
+ * Adds an ItemStack to this Material.
+ */
+ public GT_Materials add(ItemStack aStack) {
+ if (aStack != null && !contains(aStack)) mMaterialItems.add(aStack);
+ return this;
+ }
+
+ /**
+ * This is used to determine if any of the ItemStacks belongs to this Material.
+ */
+ public boolean contains(ItemStack... aStacks) {
+ if (aStacks == null || aStacks.length <= 0) return false;
+ for (ItemStack tStack : mMaterialItems)
+ for (ItemStack aStack : aStacks)
+ if (GT_Utility.areStacksEqual(aStack, tStack, !tStack.hasTagCompound())) return true;
+ return false;
+ }
+
+ /**
+ * This is used to determine if an ItemStack belongs to this Material.
+ */
+ public boolean remove(ItemStack aStack) {
+ if (aStack == null) return false;
+ boolean temp = false;
+ for (int i = 0; i < mMaterialItems.size(); i++)
+ if (GT_Utility.areStacksEqual(aStack, mMaterialItems.get(i))) {
+ mMaterialItems.remove(i--);
+ temp = true;
+ }
+ return temp;
+ }
+
+ /**
+ * Adds a SubTag to this Material
+ */
+ @Override
+ public ISubTagContainer add(SubTag... aTags) {
+ if (aTags != null) for (SubTag aTag : aTags)
+ if (aTag != null && !contains(aTag)) {
+ aTag.addContainerToList(this);
+ mSubTags.add(aTag);
+ }
+ return this;
+ }
+
+ /**
+ * If this Material has this exact SubTag
+ */
+ @Override
+ public boolean contains(SubTag aTag) {
+ return mSubTags.contains(aTag);
+ }
+
+ /**
+ * Removes a SubTag from this Material
+ */
+ @Override
+ public boolean remove(SubTag aTag) {
+ return mSubTags.remove(aTag);
+ }
+
+ /**
+ * Sets the Heat Damage for this Material (negative = frost)
+ */
+ public GT_Materials setHeatDamage(float aHeatDamage) {
+ mHeatDamage = aHeatDamage;
+ return this;
+ }
+
+ /**
+ * Adds a Material to the List of Byproducts when grinding this Ore.
+ * Is used for more precise Ore grinding, so that it is possible to choose between certain kinds of Materials.
+ */
+ public GT_Materials addOreByProduct(GT_Materials aMaterial) {
+ if (!mOreByProducts.contains(aMaterial.mMaterialInto)) mOreByProducts.add(aMaterial.mMaterialInto);
+ return this;
+ }
+
+ /**
+ * Adds multiple Materials to the List of Byproducts when grinding this Ore.
+ * Is used for more precise Ore grinding, so that it is possible to choose between certain kinds of Materials.
+ */
+ public GT_Materials addOreByProducts(GT_Materials... aMaterials) {
+ for (GT_Materials tMaterial : aMaterials) if (tMaterial != null) addOreByProduct(tMaterial);
+ return this;
+ }
+
+ /**
+ * If this Ore gives multiple drops of its Main Material.
+ * Lapis Ore for example gives about 6 drops.
+ */
+ public GT_Materials setOreMultiplier(int aOreMultiplier) {
+ if (aOreMultiplier > 0) mOreMultiplier = aOreMultiplier;
+ return this;
+ }
+
+ /**
+ * If this Ore gives multiple drops of its Byproduct Material.
+ */
+ public GT_Materials setByProductMultiplier(int aByProductMultiplier) {
+ if (aByProductMultiplier > 0) mByProductMultiplier = aByProductMultiplier;
+ return this;
+ }
+
+ /**
+ * If this Ore gives multiple drops of its Main Material.
+ * Lapis Ore for example gives about 6 drops.
+ */
+ public GT_Materials setSmeltingMultiplier(int aSmeltingMultiplier) {
+ if (aSmeltingMultiplier > 0) mSmeltingMultiplier = aSmeltingMultiplier;
+ return this;
+ }
+
+ /**
+ * This Ore should be smolten directly into an Ingot of this Material instead of an Ingot of itself.
+ */
+ public GT_Materials setDirectSmelting(GT_Materials aMaterial) {
+ if (aMaterial != null) mDirectSmelting = aMaterial.mMaterialInto.mDirectSmelting;
+ return this;
+ }
+
+ /**
+ * This Material should be the Main Material this Ore gets ground into.
+ * Example, Chromite giving Chrome or Tungstate giving Tungsten.
+ */
+ public GT_Materials setOreReplacement(GT_Materials aMaterial) {
+ if (aMaterial != null) mOreReplacement = aMaterial.mMaterialInto.mOreReplacement;
+ return this;
+ }
+
+ /**
+ * This Material smelts always into an instance of aMaterial. Used for Magnets.
+ */
+ public GT_Materials setSmeltingInto(GT_Materials aMaterial) {
+ if (aMaterial != null) mSmeltInto = aMaterial.mMaterialInto.mSmeltInto;
+ return this;
+ }
+
+ /**
+ * This Material arc smelts always into an instance of aMaterial. Used for Wrought Iron.
+ */
+ public GT_Materials setArcSmeltingInto(GT_Materials aMaterial) {
+ if (aMaterial != null) mArcSmeltInto = aMaterial.mMaterialInto.mArcSmeltInto;
+ return this;
+ }
+
+ /**
+ * This Material macerates always into an instance of aMaterial.
+ */
+ public GT_Materials setMaceratingInto(GT_Materials aMaterial) {
+ if (aMaterial != null) mMacerateInto = aMaterial.mMaterialInto.mMacerateInto;
+ return this;
+ }
+
+ public GT_Materials setEnchantmentForTools(Enchantment aEnchantment, int aEnchantmentLevel) {
+ mEnchantmentTools = aEnchantment;
+ mEnchantmentToolsLevel = (byte) aEnchantmentLevel;
+ return this;
+ }
+
+ public GT_Materials setEnchantmentForArmors(Enchantment aEnchantment, int aEnchantmentLevel) {
+ mEnchantmentArmors = aEnchantment;
+ mEnchantmentArmorsLevel = (byte) aEnchantmentLevel;
+ return this;
+ }
+
+ public FluidStack getSolid(long aAmount) {
+ if (mSolid == null) return null;
+ return new GT_FluidStack(mSolid, (int) aAmount);
+ }
+
+ public FluidStack getFluid(long aAmount) {
+ if (mFluid == null) return null;
+ return new GT_FluidStack(mFluid, (int) aAmount);
+ }
+
+ public FluidStack getGas(long aAmount) {
+ if (mGas == null) return null;
+ return new GT_FluidStack(mGas, (int) aAmount);
+ }
+
+ public FluidStack getPlasma(long aAmount) {
+ if (mPlasma == null) return null;
+ return new GT_FluidStack(mPlasma, (int) aAmount);
+ }
+
+ public FluidStack getMolten(long aAmount) {
+ if (mStandardMoltenFluid == null) return null;
+ return new GT_FluidStack(mStandardMoltenFluid, (int) aAmount);
+ }
+
+ @Override
+ public short[] getRGBA() {
+ return mRGBa;
+ }
+
+ public static volatile int VERSION = 508;
+
+ }
+
} \ No newline at end of file
diff --git a/src/Java/miscutil/gregtech/common/Meta_GT_Proxy.java b/src/Java/miscutil/gregtech/common/Meta_GT_Proxy.java
new file mode 100644
index 0000000000..0d40c312d7
--- /dev/null
+++ b/src/Java/miscutil/gregtech/common/Meta_GT_Proxy.java
@@ -0,0 +1,84 @@
+package miscutil.gregtech.common;
+
+import gregtech.api.enums.Dyes;
+import gregtech.api.enums.GT_Values;
+import gregtech.api.objects.GT_Fluid;
+import gregtech.api.util.GT_LanguageManager;
+import gregtech.api.util.GT_Utility;
+import miscutil.gregtech.api.enums.GregtechOrePrefixes.GT_Materials;
+import net.minecraft.item.ItemStack;
+import net.minecraftforge.fluids.Fluid;
+import net.minecraftforge.fluids.FluidContainerRegistry;
+import net.minecraftforge.fluids.FluidRegistry;
+import net.minecraftforge.fluids.FluidStack;
+
+public class Meta_GT_Proxy {
+
+ public static Fluid addFluid(String aName, String aLocalized, GT_Materials aMaterial, int aState, int aTemperatureK) {
+ return addFluid(aName, aLocalized, aMaterial, aState, aTemperatureK, null, null, 0);
+ }
+
+ public static Fluid addFluid(String aName, String aLocalized, GT_Materials cryotheum, int aState, int aTemperatureK, ItemStack aFullContainer,
+ ItemStack aEmptyContainer, int aFluidAmount) {
+ return addFluid(aName, aName.toLowerCase(), aLocalized, cryotheum, null, aState, aTemperatureK, aFullContainer, aEmptyContainer, aFluidAmount);
+ }
+
+ public static Fluid addFluid(String aName, String aTexture, String aLocalized, GT_Materials aMaterial, short[] aRGBa, int aState, int aTemperatureK,
+ ItemStack aFullContainer, ItemStack aEmptyContainer, int aFluidAmount) {
+ aName = aName.toLowerCase();
+ Fluid rFluid = new GT_Fluid(aName, aTexture, aRGBa != null ? aRGBa : Dyes._NULL.getRGBA());
+ GT_LanguageManager.addStringLocalization(rFluid.getUnlocalizedName(), aLocalized == null ? aName : aLocalized);
+ if (FluidRegistry.registerFluid(rFluid)) {
+ switch (aState) {
+ case 0:
+ rFluid.setGaseous(false);
+ rFluid.setViscosity(10000);
+ break;
+ case 1:
+ case 4:
+ rFluid.setGaseous(false);
+ rFluid.setViscosity(1000);
+ break;
+ case 2:
+ rFluid.setGaseous(true);
+ rFluid.setDensity(-100);
+ rFluid.setViscosity(200);
+ break;
+ case 3:
+ rFluid.setGaseous(true);
+ rFluid.setDensity(55536);
+ rFluid.setViscosity(10);
+ rFluid.setLuminosity(15);
+ }
+ } else {
+ rFluid = FluidRegistry.getFluid(aName);
+ }
+ if (rFluid.getTemperature() == new Fluid("test").getTemperature()) {
+ rFluid.setTemperature(aTemperatureK);
+ }
+ if (aMaterial != null) {
+ switch (aState) {
+ case 0:
+ aMaterial.mSolid = rFluid;
+ break;
+ case 1:
+ aMaterial.mFluid = rFluid;
+ break;
+ case 2:
+ aMaterial.mGas = rFluid;
+ break;
+ case 3:
+ aMaterial.mPlasma = rFluid;
+ break;
+ case 4:
+ aMaterial.mStandardMoltenFluid = rFluid;
+ }
+ }
+ if ((aFullContainer != null) && (aEmptyContainer != null)
+ && (!FluidContainerRegistry.registerFluidContainer(new FluidStack(rFluid, aFluidAmount), aFullContainer, aEmptyContainer))) {
+ GT_Values.RA.addFluidCannerRecipe(aFullContainer, GT_Utility.getContainerItem(aFullContainer, false), null, new FluidStack(rFluid, aFluidAmount));
+ }
+ return rFluid;
+ }
+
+}
diff --git a/src/Java/miscutil/gregtech/common/blocks/fluid/GregtechFluidHandler.java b/src/Java/miscutil/gregtech/common/blocks/fluid/GregtechFluidHandler.java
new file mode 100644
index 0000000000..cfda074689
--- /dev/null
+++ b/src/Java/miscutil/gregtech/common/blocks/fluid/GregtechFluidHandler.java
@@ -0,0 +1,35 @@
+package miscutil.gregtech.common.blocks.fluid;
+
+import gregtech.api.enums.ItemList;
+import gregtech.api.enums.OrePrefixes;
+import gregtech.api.util.GT_OreDictUnificator;
+import miscutil.gregtech.api.enums.GregtechOrePrefixes.GT_Materials;
+import miscutil.gregtech.common.Meta_GT_Proxy;
+
+public class GregtechFluidHandler {
+
+ public static void run(){
+ start();
+ }
+
+ private static void start(){
+
+ /* Meta_GT_Proxy.addFluid("lubricant", "Lubricant", Materials.Lubricant, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Lubricant, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000);
+ Meta_GT_Proxy.addFluid("creosote", "Creosote Oil", Materials.Creosote, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Creosote, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000);
+ Meta_GT_Proxy.addFluid("seedoil", "Seed Oil", Materials.SeedOil, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.SeedOil, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000);
+ Meta_GT_Proxy.addFluid("fishoil", "Fish Oil", Materials.FishOil, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.FishOil, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000);
+ Meta_GT_Proxy.addFluid("oil", "Oil", Materials.Oil, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Oil, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000);
+ Meta_GT_Proxy.addFluid("fuel", "Diesel", Materials.Fuel, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Fuel, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000);
+ Meta_GT_Proxy.addFluid("for.honey", "Honey", Materials.Honey, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Honey, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000);
+ Meta_GT_Proxy.addFluid("biomass", "Biomass", Materials.Biomass, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Biomass, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000);
+ Meta_GT_Proxy.addFluid("bioethanol", "Bio Ethanol", Materials.Ethanol, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Ethanol, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000);
+ Meta_GT_Proxy.addFluid("sulfuricacid", "Sulfuric Acid", Materials.SulfuricAcid, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.SulfuricAcid, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000);
+ Meta_GT_Proxy.addFluid("milk", "Milk", Materials.Milk, 1, 290, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Milk, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000);
+ Meta_GT_Proxy.addFluid("mcguffium", "Mc Guffium 239", Materials.McGuffium239, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.McGuffium239, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000);
+ Meta_GT_Proxy.addFluid("glue", "Glue", Materials.Glue, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Glue, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000);
+ */
+ Meta_GT_Proxy.addFluid("gelidcryotheum", "Gelic Cryotheum", GT_Materials.Cryotheum, 1, 400, GT_OreDictUnificator.get(OrePrefixes.cell, GT_Materials.Cryotheum, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000);
+
+ }
+
+}
diff --git a/src/Java/miscutil/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntityElectricBlastFurnace.java b/src/Java/miscutil/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntityElectricBlastFurnace.java
new file mode 100644
index 0000000000..0b77693648
--- /dev/null
+++ b/src/Java/miscutil/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntityElectricBlastFurnace.java
@@ -0,0 +1,236 @@
+package miscutil.gregtech.common.tileentities.machines.multi;
+
+import gregtech.api.GregTech_API;
+import gregtech.api.enums.Textures;
+import gregtech.api.gui.GT_GUIContainer_MultiMachine;
+import gregtech.api.interfaces.ITexture;
+import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
+import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase;
+import gregtech.api.objects.GT_RenderedTexture;
+import gregtech.api.util.GT_Recipe;
+import gregtech.api.util.GT_Utility;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+
+import net.minecraft.entity.player.InventoryPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraftforge.common.util.ForgeDirection;
+import net.minecraftforge.fluids.FluidStack;
+
+public class GregtechMetaTileEntityElectricBlastFurnace
+ extends GT_MetaTileEntity_MultiBlockBase {
+ private int mHeatingCapacity = 0;
+
+ public GregtechMetaTileEntityElectricBlastFurnace(int aID, String aName, String aNameRegional) {
+ super(aID, aName, aNameRegional);
+ }
+
+ public GregtechMetaTileEntityElectricBlastFurnace(String aName) {
+ super(aName);
+ }
+
+ @Override
+ public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
+ return new GregtechMetaTileEntityElectricBlastFurnace(this.mName);
+ }
+
+ @Override
+ public String[] getDescription() {
+ return new String[]{"Controller Block for the Blast Furnace",
+ "Size: 3x3x4 (Hollow)", "Controller (front middle at bottom)",
+ "16x Heating Coils (two middle Layers, hollow)",
+ "1x Input (one of bottom)",
+ "1x Output (one of bottom)",
+ "1x Energy Hatch (one of bottom)",
+ "1x Maintenance Hatch (one of bottom)",
+ "1x Muffler Hatch (top middle)",
+ "Heat Proof Machine Casings for the rest"};
+ }
+
+ @Override
+ public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
+ if (aSide == aFacing) {
+ return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[11], new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE)};
+ }
+ return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[11]};
+ }
+
+ @Override
+ public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
+ return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "ElectricBlastFurnace.png");
+ }
+
+ @Override
+ public GT_Recipe.GT_Recipe_Map getRecipeMap() {
+ return GT_Recipe.GT_Recipe_Map.sBlastRecipes;
+ }
+
+ @Override
+ public boolean isCorrectMachinePart(ItemStack aStack) {
+ return true;
+ }
+
+ @Override
+ public boolean isFacingValid(byte aFacing) {
+ return aFacing > 1;
+ }
+
+ @Override
+ public boolean checkRecipe(ItemStack aStack) {
+ ArrayList<ItemStack> tInputList = getStoredInputs();
+ for (int i = 0; i < tInputList.size() - 1; i++) {
+ for (int j = i + 1; j < tInputList.size(); j++) {
+ if (GT_Utility.areStacksEqual((ItemStack) tInputList.get(i), (ItemStack) tInputList.get(j))) {
+ if (((ItemStack) tInputList.get(i)).stackSize >= ((ItemStack) tInputList.get(j)).stackSize) {
+ tInputList.remove(j--);
+ } else {
+ tInputList.remove(i--);
+ break;
+ }
+ }
+ }
+ }
+ ItemStack[] tInputs = (ItemStack[]) Arrays.copyOfRange(tInputList.toArray(new ItemStack[tInputList.size()]), 0, 2);
+
+ ArrayList<FluidStack> tFluidList = getStoredFluids();
+ for (int i = 0; i < tFluidList.size() - 1; i++) {
+ for (int j = i + 1; j < tFluidList.size(); j++) {
+ if (GT_Utility.areFluidsEqual((FluidStack) tFluidList.get(i), (FluidStack) tFluidList.get(j))) {
+ if (((FluidStack) tFluidList.get(i)).amount >= ((FluidStack) tFluidList.get(j)).amount) {
+ tFluidList.remove(j--);
+ } else {
+ tFluidList.remove(i--);
+ break;
+ }
+ }
+ }
+ }
+ FluidStack[] tFluids = (FluidStack[]) Arrays.copyOfRange(tFluidList.toArray(new FluidStack[tInputList.size()]), 0, 1);
+ if (tInputList.size() > 0) {
+ long tVoltage = getMaxInputVoltage();
+ byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage));
+ GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sBlastRecipes.findRecipe(getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[tTier], tFluids, tInputs);
+ if ((tRecipe != null) && (this.mHeatingCapacity >= tRecipe.mSpecialValue) && (tRecipe.isRecipeInputEqual(true, tFluids, tInputs))) {
+ this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000);
+ this.mEfficiencyIncrease = 10000;
+ if (tRecipe.mEUt <= 16) {
+ this.mEUt = (tRecipe.mEUt * (1 << tTier - 1) * (1 << tTier - 1));
+ this.mMaxProgresstime = (tRecipe.mDuration / (1 << tTier - 1));
+ } else {
+ this.mEUt = tRecipe.mEUt;
+ this.mMaxProgresstime = tRecipe.mDuration;
+ while (this.mEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) {
+ this.mEUt *= 4;
+ this.mMaxProgresstime /= 2;
+ }
+ }
+ if (this.mEUt > 0) {
+ this.mEUt = (-this.mEUt);
+ }
+ this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime);
+ this.mOutputItems = new ItemStack[]{tRecipe.getOutput(0), tRecipe.getOutput(1)};
+ updateSlots();
+ return true;
+ }
+ }
+ return false;
+ }
+
+ @Override
+ public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) {
+ int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX;
+ int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ;
+
+ this.mHeatingCapacity = 0;
+ if (!aBaseMetaTileEntity.getAirOffset(xDir, 1, zDir)) {
+ return false;
+ }
+ if (!aBaseMetaTileEntity.getAirOffset(xDir, 2, zDir)) {
+ return false;
+ }
+ addMufflerToMachineList(aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir, 3, zDir), 11);
+
+ byte tUsedMeta = aBaseMetaTileEntity.getMetaIDOffset(xDir + 1, 2, zDir);
+ switch (tUsedMeta) {
+ case 12:
+ this.mHeatingCapacity = 1800;
+ break;
+ case 13:
+ this.mHeatingCapacity = 2700;
+ break;
+ case 14:
+ this.mHeatingCapacity = 3600;
+ break;
+ default:
+ return false;
+ }
+ for (int i = -1; i < 2; i++) {
+ for (int j = -1; j < 2; j++) {
+ if ((i != 0) || (j != 0)) {
+ if (aBaseMetaTileEntity.getBlockOffset(xDir + i, 2, zDir + j) != GregTech_API.sBlockCasings1) {
+ return false;
+ }
+ if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, 2, zDir + j) != tUsedMeta) {
+ return false;
+ }
+ if (aBaseMetaTileEntity.getBlockOffset(xDir + i, 1, zDir + j) != GregTech_API.sBlockCasings1) {
+ return false;
+ }
+ if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, 1, zDir + j) != tUsedMeta) {
+ return false;
+ }
+ if (aBaseMetaTileEntity.getBlockOffset(xDir + i, 3, zDir + j) != GregTech_API.sBlockCasings1) {
+ return false;
+ }
+ if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, 3, zDir + j) != 11) {
+ return false;
+ }
+ }
+ }
+ }
+ for (int i = -1; i < 2; i++) {
+ for (int j = -1; j < 2; j++) {
+ if ((xDir + i != 0) || (zDir + j != 0)) {
+ IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i, 0, zDir + j);
+ if ((!addMaintenanceToMachineList(tTileEntity, 11)) && (!addInputToMachineList(tTileEntity, 11)) && (!addOutputToMachineList(tTileEntity, 11)) && (!addEnergyInputToMachineList(tTileEntity, 11))) {
+ if (aBaseMetaTileEntity.getBlockOffset(xDir + i, 0, zDir + j) != GregTech_API.sBlockCasings1) {
+ return false;
+ }
+ if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, 0, zDir + j) != 11) {
+ return false;
+ }
+ }
+ }
+ }
+ }
+ this.mHeatingCapacity += 100 * (GT_Utility.getTier(getMaxInputVoltage()) - 2);
+ return true;
+ }
+
+ @Override
+ public int getMaxEfficiency(ItemStack aStack) {
+ return 10000;
+ }
+
+ @Override
+ public int getPollutionPerTick(ItemStack aStack) {
+ return 10;
+ }
+
+ @Override
+ public int getDamageToComponent(ItemStack aStack) {
+ return 0;
+ }
+
+ @Override
+ public int getAmountOfOutputs() {
+ return 2;
+ }
+
+ @Override
+ public boolean explodesOnComponentBreak(ItemStack aStack) {
+ return false;
+ }
+}