diff options
Diffstat (limited to 'src/Java/gtPlusPlus/xmod/gregtech/common')
26 files changed, 394 insertions, 243 deletions
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/Meta_GT_Proxy.java b/src/Java/gtPlusPlus/xmod/gregtech/common/Meta_GT_Proxy.java index 0556a7f4fe..6b4bab9e26 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/Meta_GT_Proxy.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/Meta_GT_Proxy.java @@ -5,6 +5,7 @@ import static gtPlusPlus.xmod.gregtech.common.covers.GTPP_Cover_Overflow.mOverfl import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; import java.util.ArrayList; +import java.util.Collection; import java.util.HashMap; import java.util.LinkedHashMap; import java.util.List; @@ -15,37 +16,42 @@ import java.util.TimerTask; import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.block.Block; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.EnumChatFormatting; -import net.minecraftforge.fluids.FluidStack; import gregtech.GT_Mod; import gregtech.api.GregTech_API; import gregtech.api.enums.GT_Values; -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.enums.Materials; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.BaseMetaTileEntity; import gregtech.api.util.GT_LanguageManager; import gregtech.api.util.GT_Log; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Recipe.GT_Recipe_Map; import gregtech.api.util.GT_Utility; +import gregtech.api.util.Recipe_GT; +import gregtech.api.util.Recipe_GT.Gregtech_Recipe_Map; import gregtech.common.GT_Proxy; -import gregtech.common.blocks.GT_Block_Machines; -import gregtech.common.render.GT_Renderer_Block; import gtPlusPlus.api.objects.Logger; import gtPlusPlus.api.objects.data.AutoMap; import gtPlusPlus.api.objects.data.ObjMap; import gtPlusPlus.api.objects.minecraft.FormattedTooltipString; +import gtPlusPlus.core.handler.AchievementHandler; import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.material.ELEMENT; +import gtPlusPlus.core.util.minecraft.FluidUtils; +import gtPlusPlus.core.util.minecraft.MaterialUtils; import gtPlusPlus.core.util.reflect.ProxyFinder; import gtPlusPlus.core.util.reflect.ReflectionUtils; import gtPlusPlus.xmod.gregtech.api.metatileentity.BaseCustomTileEntity; import gtPlusPlus.xmod.gregtech.api.metatileentity.custom.power.BaseCustomPower_MTE; -import gtPlusPlus.xmod.gregtech.common.blocks.GTPP_Block_Machines; -import gtPlusPlus.xmod.gregtech.common.render.GTPP_Render_MachineBlock; +import gtPlusPlus.xmod.gregtech.loaders.misc.AssLineAchievements; +import net.minecraft.block.Block; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.EnumChatFormatting; +import net.minecraftforge.fluids.FluidStack; public class Meta_GT_Proxy { @@ -64,6 +70,8 @@ public class Meta_GT_Proxy { private static Class sBaseMetaTileEntityClass; private static Class sBaseMetaTileEntityClass2; + public static AchievementHandler mAssemblyAchievements; + public static final Map<String, FormattedTooltipString> mCustomGregtechMetaTooltips = new LinkedHashMap<String, FormattedTooltipString>(); @@ -102,7 +110,121 @@ public class Meta_GT_Proxy { } public void postInit() { + mAssemblyAchievements = new AchievementHandler(); + } + + public static boolean generatePlasmaRecipesForAdvVacFreezer() { + + AutoMap<Recipe_GT> aFreezerMapRebaked = new AutoMap<Recipe_GT>(); + AutoMap<Recipe_GT> aRemovedRecipes = new AutoMap<Recipe_GT>(); + + //Find recipes containing Plasma and map them + for (Recipe_GT y : Recipe_GT.Gregtech_Recipe_Map.sAdvFreezerRecipes.mRecipeList) { + if (y.mFluidInputs.length > 0) { + for (FluidStack r : y.mFluidInputs) { + if (r.getUnlocalizedName().toLowerCase().contains("plasma")) { + aRemovedRecipes.put(y); + continue; + } + } + aFreezerMapRebaked.put(y); + } + } + + AutoMap<Recipe_GT> aNewRecipes = new AutoMap<Recipe_GT>(); + int aAtomicMass = 0; + int aAtomicTier = 0; + + final FluidStack NULL_PLASMA = Materials._NULL.getPlasma(1); + + for (String s : ELEMENT.NAMES) { + + aAtomicMass++; + aAtomicTier = (aAtomicMass/30)+1; + FluidStack aMoltenFluid = null; + FluidStack aPlasma = null; + + //Try Get Material via Gregtech + Materials aGregMaterial = MaterialUtils.getMaterial(s); + if (aGregMaterial != null) { + aMoltenFluid = aGregMaterial.getMolten(1); + if (aMoltenFluid == null) { + aMoltenFluid = aGregMaterial.getFluid(1); + if (aMoltenFluid == null) { + aMoltenFluid = aGregMaterial.getGas(1); + if (aMoltenFluid == null) { + aMoltenFluid = aGregMaterial.getSolid(1); + } + } + } + aPlasma = aGregMaterial.getPlasma(100); + } + + //Just wildcard values + if (aMoltenFluid == null || aPlasma == null) { + if (aMoltenFluid == null) { + aMoltenFluid = FluidUtils.getWildcardFluidStack(s, 1); + } + if (aPlasma == null) { + aPlasma = FluidUtils.getFluidStack("plasma."+s.toLowerCase(), 1); + } + } + + //Skip this material + if (aMoltenFluid == null || aPlasma == null || aPlasma.isFluidEqual(NULL_PLASMA)) { + Logger.INFO("Could not generate Advanced Vacuum Freezer recipe. Cooling "+s+" plasma. Molten Form Exists? "+(aMoltenFluid != null)+" | Plasma Exists? "+(aPlasma != null)); + continue; + } + else { + //Build a new plasma recipe + int aTotalTickTime = (20 * 1 + (aAtomicMass)); + Recipe_GT aTempRecipe = new Recipe_GT(true, + new ItemStack[] {}, + new ItemStack[] {}, + null, + new int[] {10000}, + new FluidStack[] { + aPlasma, + FluidUtils.getFluidStack("cryotheum", aTotalTickTime) + }, + new FluidStack[] { + aMoltenFluid + }, + aTotalTickTime, + (int) GT_Values.V[4+aAtomicTier], + aAtomicMass); + + //Add it to the map if it's valid + if (aTempRecipe != null) { + aNewRecipes.put(aTempRecipe); + } + } + + } + + + //Add the new recipes to the map we will rebake over the original + for (Recipe_GT w : aNewRecipes) { + aFreezerMapRebaked.put(w); + } + + //Best not touch the original map if we don't have a valid map to override it with. + if (aFreezerMapRebaked.size() > 0) { + + int aOriginalCount = Recipe_GT.Gregtech_Recipe_Map.sAdvFreezerRecipes.mRecipeList.size(); + + //Empty the original map + Recipe_GT.Gregtech_Recipe_Map.sAdvFreezerRecipes.mRecipeList.clear(); + + //Rebake the real map + for (Recipe_GT w : aFreezerMapRebaked) { + Recipe_GT.Gregtech_Recipe_Map.sAdvFreezerRecipes.mRecipeList.add(w); + } + + return Recipe_GT.Gregtech_Recipe_Map.sAdvFreezerRecipes.mRecipeList.size() >= aOriginalCount; + } + return false; } public static TileEntity constructCustomGregtechMetaTileEntityByMeta(int aMeta) { @@ -280,7 +402,7 @@ public class Meta_GT_Proxy { if (proxyGT != null && proxyGT instanceof GT_Proxy) { try { return ReflectionUtils.getField(proxyGT.getClass(), fieldName).get(proxyGT); - } catch (IllegalArgumentException | IllegalAccessException | NoSuchFieldException e) { + } catch (IllegalArgumentException | IllegalAccessException e) { } } return null; diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/StaticFields59.java b/src/Java/gtPlusPlus/xmod/gregtech/common/StaticFields59.java index c1db39b132..1604cc5acd 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/StaticFields59.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/StaticFields59.java @@ -5,7 +5,6 @@ import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.util.ArrayList; import java.util.Collection; -import java.util.HashSet; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; @@ -33,6 +32,8 @@ public class StaticFields59 { public static final Field mMultiblockChemicalRecipes; public static final Field mDescriptionArray; public static final Field mCasingTexturePages; + public static final Field mAssLineVisualMapNEI; + public static final GT_Recipe_Map sAssemblylineVisualRecipes; public static final Method mCalculatePollutionReduction; public static final Method mAddFurnaceRecipe; @@ -43,28 +44,51 @@ public class StaticFields59 { //OrePrefixes static { + Logger.INFO("[SH] Creating Static Helper for various fields which require reflective access."); mGtBlockCasings5 = getField(GregTech_API.class, "sBlockCasings5"); + Logger.INFO("[SH] Got Field: sBlockCasings5"); mPreventableComponents = getField(OrePrefixes.class, "mPreventableComponents"); + Logger.INFO("[SH] Got Field: mPreventableComponents"); mDisabledItems = getField(OrePrefixes.class, "mDisabledItems"); - mMultiblockChemicalRecipes = getField(GT_Recipe_Map.class, "sMultiblockChemicalRecipes"); + Logger.INFO("[SH] Got Field: mDisabledItems"); mDescriptionArray = getField(GT_MetaTileEntity_TieredMachineBlock.class, "mDescriptionArray"); + Logger.INFO("[SH] Got Field: mDescriptionArray"); mCasingTexturePages = getField(BlockIcons.class, "casingTexturePages"); - - mCalculatePollutionReduction = getMethod(GT_MetaTileEntity_Hatch_Muffler.class, "calculatePollutionReduction", int.class); - - Logger.INFO("Initializing a recipe handler for different versions of Gregtech 5."); - //Yep... - if (!CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK) { - Logger.INFO("Selecting GT 5.7/5.8 Recipe Set"); - mAddFurnaceRecipe = getMethod(GT_ModHandler.class, "addSmeltingAndAlloySmeltingRecipe", ItemStack.class, ItemStack.class); + Logger.INFO("[SH] Got Field: casingTexturePages"); + + mAssLineVisualMapNEI = getField(GT_Recipe_Map.class, "sAssemblylineVisualRecipes"); + Logger.INFO("[SH] Got Field: mAssLineVisualMapNEI"); + GT_Recipe_Map aTemp; + if (mAssLineVisualMapNEI != null) { + try { + aTemp = (GT_Recipe_Map) mAssLineVisualMapNEI.get(null); + Logger.INFO("[SH] Got Field: sAssemblylineVisualRecipes"); + } catch (IllegalArgumentException | IllegalAccessException e) { + aTemp = null; + } + } else { + aTemp = null; } - else { - Logger.INFO("Selecting GT 5.9 Recipe Set"); - mAddFurnaceRecipe = getMethod(GT_ModHandler.class, "addSmeltingAndAlloySmeltingRecipe", ItemStack.class, ItemStack.class, boolean.class); + + sAssemblylineVisualRecipes = aTemp; + mMultiblockChemicalRecipes = getField(GT_Recipe_Map.class, "sMultiblockChemicalRecipes"); + Logger.INFO("[SH] Got Field: sMultiblockChemicalRecipes"); + + mCalculatePollutionReduction = getMethod(GT_MetaTileEntity_Hatch_Muffler.class, "calculatePollutionReduction", + int.class); + Logger.INFO("[SH] Got Method: calculatePollutionReduction"); + + // Yep... + if (!CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK) { + mAddFurnaceRecipe = getMethod(GT_ModHandler.class, "addSmeltingAndAlloySmeltingRecipe", ItemStack.class, + ItemStack.class); + Logger.INFO("[SH] Got Method: addSmeltingAndAlloySmeltingRecipe"); + } else { + mAddFurnaceRecipe = getMethod(GT_ModHandler.class, "addSmeltingAndAlloySmeltingRecipe", ItemStack.class, + ItemStack.class, boolean.class); + Logger.INFO("[SH] Got Method: addSmeltingAndAlloySmeltingRecipe"); } - - - + } public static synchronized final Block getBlockCasings5() { @@ -84,11 +108,7 @@ public class StaticFields59 { } public static Field getField(Class a, String b) { - try { - return ReflectionUtils.getField(a, b); - } catch (NoSuchFieldException e) { - return null; - } + return ReflectionUtils.getField(a, b); } public static Method getMethod(Class a, String b, Class... params) { diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks4.java b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks4.java index b3366df96b..54323d8c2e 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks4.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks4.java @@ -86,8 +86,8 @@ extends GregtechMetaCasingBlocksAbstract { case 2: return TexturesGtBlock.TEXTURE_ORGANIC_PANEL_A_GLOWING.getIcon(); //Coke Oven Casing Tier 2 - case 3: - return TexturesGtBlock.Casing_Material_MaragingSteel.getIcon(); + case 3: + return TexturesGtBlock.TEXTURE_METAL_PANEL_A.getIcon(); //Material Press Casings case 4: return TexturesGtBlock.Casing_Material_MaragingSteel.getIcon(); diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/helpers/ChargingHelper.java b/src/Java/gtPlusPlus/xmod/gregtech/common/helpers/ChargingHelper.java index 0178bac4da..bda75be793 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/helpers/ChargingHelper.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/helpers/ChargingHelper.java @@ -23,6 +23,7 @@ import gtPlusPlus.api.objects.minecraft.BlockPos; import gtPlusPlus.core.util.Utils; import gtPlusPlus.core.util.math.MathUtils; import gtPlusPlus.core.util.minecraft.NBTUtils; +import gtPlusPlus.core.util.reflect.ReflectionUtils; import gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic.GregtechMetaWirelessCharger; import ic2.api.info.Info; import ic2.api.item.ElectricItem; @@ -291,12 +292,11 @@ public class ChargingHelper { } //Try get charge direct from NBT for GT and IC2 stacks - try { Logger.WARNING("3"); if (mTemp.getItem() instanceof GT_MetaGenerated_Tool_01 || mTemp.getItem() instanceof GT_MetaGenerated_Item_01 || mTemp.getItem() instanceof GT_MetaGenerated_Item_02 - || Class.forName("gregtech.common.items.GT_MetaGenerated_Item_03").isInstance(mTemp.getItem()) + || ReflectionUtils.getClass("gregtech.common.items.GT_MetaGenerated_Item_03").isInstance(mTemp.getItem()) || mTemp.getItem().getClass().getName().toLowerCase().equals(("gregtech.common.items.GT_MetaGenerated_Tool_01").toLowerCase())){ if (!NBTUtils.hasKey(mTemp, "GT.ItemCharge")){ if (!mTemp.getDisplayName().toLowerCase().contains("battery")){ @@ -314,10 +314,7 @@ public class ChargingHelper { } else if (mTemp.getItem() instanceof IElectricItem){ mitemCurrentCharge = NBTUtils.getLong(mTemp, "charge"); - } - } catch (ClassNotFoundException e) { - - } + } double mVoltageIncrease; if (mItemEuTLimit >= mVoltage){ diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/helpers/TreeFarmHelper.java b/src/Java/gtPlusPlus/xmod/gregtech/common/helpers/TreeFarmHelper.java index 2bfb07ff4a..3c60ae664e 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/helpers/TreeFarmHelper.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/helpers/TreeFarmHelper.java @@ -321,14 +321,12 @@ public class TreeFarmHelper { return blockHumus; } else if (ReflectionUtils.doesClassExist("forestry.core.blocks.BlockSoil")){ - try { - final Class<?> humusClass = Class.forName("forestry.core.blocks.BlockSoil"); + final Class<?> humusClass = ReflectionUtils.getClass("forestry.core.blocks.BlockSoil"); final ItemStack humusStack = ItemUtils.getCorrectStacktype("Forestry:soil", 1); if (humusClass != null){ blockHumus = Block.getBlockFromItem(humusStack.getItem()); return Block.getBlockFromItem(humusStack.getItem()); } - } catch (final ClassNotFoundException e) {} } return null; } diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechItems.java b/src/Java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechItems.java index 7f426f8abb..f42fc49e53 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechItems.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechItems.java @@ -169,12 +169,12 @@ public class MetaGeneratedGregtechItems extends Gregtech_MetaItem_X32 { * Power Gems */ - GregtechItemList.Battery_Gem_1.set(this.addItem(tLastID = 66, "Fission Power Cell", "Reusable", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 8L), getTcAspectStack(TC_Aspects.METALLUM, 24L), getTcAspectStack(TC_Aspects.POTENTIA, 16L)})); - this.setElectricStats(32000 + tLastID, 32000000L, GT_Values.V[5], 5L, -3L, false); - GregtechItemList.Battery_Gem_2.set(this.addItem(tLastID = 68, "Fusion Power Cell", "Reusable", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 16L), getTcAspectStack(TC_Aspects.METALLUM, 32L), getTcAspectStack(TC_Aspects.POTENTIA, 32L)})); - this.setElectricStats(32000 + tLastID, 750000000L, GT_Values.V[6], 6L, -3L, false); - GregtechItemList.Battery_Gem_3.set(this.addItem(tLastID = 70, "Portable Neutron Star", "Reusable", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 32L), getTcAspectStack(TC_Aspects.METALLUM, 48L), getTcAspectStack(TC_Aspects.POTENTIA, 64L)})); - this.setElectricStats(32000 + tLastID, 64000000000L, GT_Values.V[7], 7L, -3L, false); + GregtechItemList.Battery_Gem_1.set(this.addItem(tLastID = 66, "Proton Cell", "Reusable", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 8L), getTcAspectStack(TC_Aspects.METALLUM, 24L), getTcAspectStack(TC_Aspects.POTENTIA, 16L)})); + this.setElectricStats(32000 + tLastID, GT_Values.V[6] * 20 * 300 / 4, GT_Values.V[6], 6L, -3L, false); + GregtechItemList.Battery_Gem_2.set(this.addItem(tLastID = 68, "Electron Cell", "Reusable", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 16L), getTcAspectStack(TC_Aspects.METALLUM, 32L), getTcAspectStack(TC_Aspects.POTENTIA, 32L)})); + this.setElectricStats(32000 + tLastID, GT_Values.V[7] * 20 * 300 / 4, GT_Values.V[7], 7L, -3L, false); + GregtechItemList.Battery_Gem_3.set(this.addItem(tLastID = 70, "Quark Entanglement", "Reusable", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 32L), getTcAspectStack(TC_Aspects.METALLUM, 48L), getTcAspectStack(TC_Aspects.POTENTIA, 64L)})); + this.setElectricStats(32000 + tLastID, GT_Values.V[8] * 20 * 300 / 4, GT_Values.V[8], 8L, -3L, false); //ItemUtils.addItemToOreDictionary(GregtechItemList.Battery_Gem_1.get(1), "batteryFutureBasic"); //ItemUtils.addItemToOreDictionary(GregtechItemList.Battery_Gem_2.get(1), "batteryFutureGood"); //ItemUtils.addItemToOreDictionary(GregtechItemList.Battery_Gem_3.get(1), "batteryFutureAdvanced"); @@ -285,7 +285,7 @@ public class MetaGeneratedGregtechItems extends Gregtech_MetaItem_X32 { //Fusion Reactor MK4 Singularity GregtechItemList.Compressed_Fusion_Reactor.set(this.addItem(100, "Hypervisor Matrix (Fusion)", "A memory unit containing an RI (Restricted Intelligence)", new Object[0])); - CORE.RA.addCompressorRecipe(ItemList.FusionComputer_UV.get(9), GregtechItemList.Compressed_Fusion_Reactor.get(1), (int) GT_Values.V[7], (int) GT_Values.V[8]); + //NanoTubes GregtechItemList.NanoTube_Base_Substrate.set(this.addItem(101, "Silicon Base Substrate", "Used in the production of Carbon Nanotubes", new Object[0])); @@ -294,6 +294,30 @@ public class MetaGeneratedGregtechItems extends Gregtech_MetaItem_X32 { GregtechItemList.Carbyne_Sheet_Finished.set(this.addItem(104, "Carbyne Composite Panel", "Nanotubes which contain LAC, arranged side by side and compressed further", new Object[0])); GregtechItemList.Laser_Lens_Special.set(this.addItem(105, "Quantum Anomaly", "Probably should shoot it with lasers", new Object[0])); + GregtechItemList.Battery_Casing_Gem_1.set(this.addItem(106, "Containment Unit I", "Used in crafting", new Object[0])); + GregtechItemList.Battery_Casing_Gem_2.set(this.addItem(107, "Containment Unit II", "Used in crafting", new Object[0])); + GregtechItemList.Battery_Casing_Gem_3.set(this.addItem(108, "Advanced Containment Unit", "Used in crafting", new Object[0])); + GregtechItemList.Battery_Casing_Gem_4.set(this.addItem(109, "Exotic Containment Unit", "Used in crafting", new Object[0])); + + GregtechItemList.Battery_Gem_4.set(this.addItem(tLastID = 110, "Graviton Anomaly", "Reusable", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 64L), getTcAspectStack(TC_Aspects.METALLUM, 64L), getTcAspectStack(TC_Aspects.POTENTIA, 64L)})); + this.setElectricStats(32000 + tLastID, (64000000000L*16), GT_Values.V[9], 9L, -3L, false); + + + + /* + * Bombs + */ + GregtechItemList.Bomb_Cast.set(this.addItem(111, "Bomb Cast", "Used in the production of Bombs", new Object[0])); + GregtechItemList.Bomb_Cast_Molten.set(this.addItem(112, "Bomb Cast (Hot)", "Consider cooling this off", new Object[0])); + GregtechItemList.Bomb_Cast_Set.set(this.addItem(113, "Bomb Cast (Set)", "Break it open for the goodies inside!", new Object[0])); + GregtechItemList.Bomb_Cast_Broken.set(this.addItem(114, "Bomb Cast (Broken)", "This is probably just junk", new Object[0])); + GregtechItemList.Bomb_Cast_Mold.set(this.addItem(115, "Mold (Bomb Cast)", "Used in the production of Bombs", new Object[0])); + + + + + + } private boolean registerComponents_ULV(){ diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/render/GTPP_CapeRenderer.java b/src/Java/gtPlusPlus/xmod/gregtech/common/render/GTPP_CapeRenderer.java index 22ce41282f..7dd376759a 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/render/GTPP_CapeRenderer.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/render/GTPP_CapeRenderer.java @@ -82,14 +82,14 @@ public class GTPP_CapeRenderer extends RenderPlayer { AbstractClientPlayer aPlayer = (AbstractClientPlayer) aEvent.entityPlayer; if (!ConfigSwitches.enableCustomCapes) { aEvent.setCanceled(true); - Logger.INFO("A1"); + Logger.WARNING("A1"); return; } if (hasResourceChecked) { if (!hasCape && !CORE.DEVENV) { aEvent.setCanceled(true); - Logger.INFO("A2"); + Logger.WARNING("A2"); return; } } @@ -141,7 +141,7 @@ public class GTPP_CapeRenderer extends RenderPlayer { if (GT_Utility.getFullInvisibility(aPlayer) || aPlayer.isInvisible() || GT_Utility.getPotion(aPlayer, Integer.valueOf(Potion.invisibility.id).intValue())) { aEvent.setCanceled(true); - Logger.INFO("A3"); + Logger.WARNING("A3"); return; } @@ -209,7 +209,7 @@ public class GTPP_CapeRenderer extends RenderPlayer { Logger.WORLD("[Capes++] Mojang/Cache checking for " + name + "."); GameProfile profile = MinecraftServer.getServer().func_152358_ax().func_152652_a(g); if (profile != null) { - Logger.INFO("[Capes++] Found for UUID check: " + profile.getName() + "."); + Logger.WARNING("[Capes++] Found for UUID check: " + profile.getName() + "."); return profile.getName(); } } else { @@ -218,7 +218,7 @@ public class GTPP_CapeRenderer extends RenderPlayer { Logger.WORLD("[Capes++] Mojang/Cache checking for " + name + "."); GameProfile profile = MinecraftServer.getServer().func_152358_ax().func_152652_a(g); if (profile != null) { - Logger.INFO("[Capes++] Found for UUID check 2: " + profile.getName() + "."); + Logger.WARNING("[Capes++] Found for UUID check 2: " + profile.getName() + "."); return profile.getName(); } } @@ -230,7 +230,7 @@ public class GTPP_CapeRenderer extends RenderPlayer { Logger.WORLD("[Capes++] Mojang/Cache checking for " + name + "."); GameProfile profile = MinecraftServer.getServer().func_152358_ax().func_152655_a(name); if (profile != null) { - Logger.INFO("[Capes++] Found for name check: " + profile.getName() + "."); + Logger.WARNING("[Capes++] Found for name check: " + profile.getName() + "."); return profile.getName(); } } diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntityRocketFuelGenerator.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntityRocketFuelGenerator.java index 288501086b..6a42232e40 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntityRocketFuelGenerator.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntityRocketFuelGenerator.java @@ -1,9 +1,6 @@ package gtPlusPlus.xmod.gregtech.common.tileentities.generators; import cpw.mods.fml.common.registry.GameRegistry; - -import net.minecraft.item.ItemStack; - import gregtech.api.GregTech_API; import gregtech.api.enums.ConfigCategories; import gregtech.api.enums.ItemList; @@ -18,6 +15,7 @@ import gregtech.api.util.Recipe_GT; import gtPlusPlus.core.util.math.MathUtils; import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.generators.GregtechRocketFuelGeneratorBase; import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; +import net.minecraft.item.ItemStack; public class GregtechMetaTileEntityRocketFuelGenerator extends GregtechRocketFuelGeneratorBase { @@ -25,7 +23,7 @@ extends GregtechRocketFuelGeneratorBase { public int mEfficiency; public GregtechMetaTileEntityRocketFuelGenerator(final int aID, final String aName, final String aNameRegional, final int aTier) { - super(aID, aName, aNameRegional, aTier, "Requires Rocket Fuels.", new ITexture[0]); + super(aID, aName, aNameRegional, aTier, "Requires GT++ Rocket Fuels", new ITexture[0]); this.onConfigLoad(); } @@ -41,6 +39,7 @@ extends GregtechRocketFuelGeneratorBase { @Override public MetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { + //Logger.INFO("Valid Fuels: "+Recipe_GT.Gregtech_Recipe_Map.sRocketFuels.mRecipeList.size()); return new GregtechMetaTileEntityRocketFuelGenerator(this.mName, this.mTier, this.mDescription, this.mTextures); } @@ -60,7 +59,9 @@ extends GregtechRocketFuelGeneratorBase { @Override public int getEfficiency() { - return ((40+((this.mTier) * 16))/4)+(this.mTier); + int eff = ((40+((this.mTier) * 16))/4)+(this.mTier); + return eff; + } @Override diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaAtmosphericReconditioner.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaAtmosphericReconditioner.java index eb6a9bfcd3..c364fe5e9e 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaAtmosphericReconditioner.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaAtmosphericReconditioner.java @@ -229,7 +229,7 @@ public class GregtechMetaAtmosphericReconditioner extends GT_MetaTileEntity_Basi //I stole this code reduction = (MathUtils.safeInt((long)reduction*this.mBaseEff)/100000)*mAirSides*Math.max((tTier-2), 1); Logger.WARNING("reduction[2]:"+reduction); - reduction = GT_Utility.safeInt(((long)reduction/100)*this.mOptimalAirFlow); + reduction = MathUtils.safeInt(((long)reduction/100)*this.mOptimalAirFlow); Logger.WARNING("reduction[3]:"+reduction); mPollutionReduction = reduction; @@ -683,7 +683,7 @@ public class GregtechMetaAtmosphericReconditioner extends GT_MetaTileEntity_Basi byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage)); reduction += (((Math.max((tTier-2), 1)*2)*50)*mAirSides); reduction = (MathUtils.safeInt((long)reduction*this.mBaseEff)/100000)*mAirSides*Math.max((tTier-2), 1); - reduction = GT_Utility.safeInt(((long)reduction/100)*this.mOptimalAirFlow); + reduction = MathUtils.safeInt(((long)reduction/100)*this.mOptimalAirFlow); aTooltipSuper.put("Maximum pollution removed per second: "+reduction); } diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaWirelessCharger.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaWirelessCharger.java index 25c14a68e7..f2e3b3c3c0 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaWirelessCharger.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaWirelessCharger.java @@ -17,7 +17,6 @@ import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.objects.GT_RenderedTexture; import gregtech.api.util.GT_Utility; - import gtPlusPlus.api.objects.minecraft.BlockPos; import gtPlusPlus.core.lib.CORE; import gtPlusPlus.core.util.minecraft.EntityUtils; @@ -457,7 +456,7 @@ public class GregtechMetaWirelessCharger extends GregtechMetaTileEntity { } } - public BlockPos getTileEntityPosition(){ + public BlockPos getTileEntityPosition(){ return new BlockPos(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord(), this.getBaseMetaTileEntity().getWorld()); } @@ -533,10 +532,7 @@ public class GregtechMetaWirelessCharger extends GregtechMetaTileEntity { @Override public void onServerStart() { mWirelessChargingMap.clear(); - mLocalChargingMap.clear(); - if (!mHasBeenMapped && ChargingHelper.addEntry(getTileEntityPosition(), this)){ - mHasBeenMapped = true; - } + mLocalChargingMap.clear(); super.onServerStart(); } @@ -552,4 +548,12 @@ public class GregtechMetaWirelessCharger extends GregtechMetaTileEntity { super.doExplosion(aExplosionPower); } + @Override + public void onPreTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { + if (!mHasBeenMapped && ChargingHelper.addEntry(getTileEntityPosition(), this)){ + mHasBeenMapped = true; + } + super.onPreTick(aBaseMetaTileEntity, aTick); + } + }
\ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/misc/GMTE_AmazonPackager.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/misc/GMTE_AmazonPackager.java index 6515589905..eca02d290e 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/misc/GMTE_AmazonPackager.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/misc/GMTE_AmazonPackager.java @@ -70,13 +70,11 @@ public class GMTE_AmazonPackager extends GregtechMeta_MultiBlockBase { "Only uses 75% of the eu/t normally required", "Processes five items per voltage tier", "Size: 3x3x3 (Hollow)", + "Supply Depot. Casings (10 at least!)", "Controller (front centered)", - "1x Input Bus (anywhere)", - "1x Output Bus (anywhere)", - "1x Energy Hatch (anywhere)", - "1x Maintenance Hatch (anywhere)", - "1x Muffler (anywhere)", - "Supply Depot. Casings for the rest (10 at least!)" + "1x Input Bus", + "1x Output Bus", + "1x Energy Hatch", }; } diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialArcFurnace.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialArcFurnace.java index d90b88e4d8..c549cf9216 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialArcFurnace.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialArcFurnace.java @@ -65,15 +65,13 @@ extends GregtechMeta_MultiBlockBase { "Size: nx3xn [WxHxL] (Hollow)", "n can be 3, 5 or 7", "Max Size required to process Plasma recipes", + mCasingName+"s (10 at least!)", "Controller (top centered)", - "1x Input Bus (anywhere)", - "1x Output Bus (anywhere)", - "1x Input Hatch (anywhere)", - "1x Output Hatch (anywhere)", - "1x Energy Hatch (anywhere)", - "1x Muffler Hatch (anywhere)", - "1x Maintenance Hatch (Back Center)", - mCasingName+"s for the rest", + "1x Input Bus", + "1x Output Bus", + "1x Input Hatch", + "1x Output Hatch", + "1x Energy Hatch", }; } @@ -85,10 +83,10 @@ extends GregtechMeta_MultiBlockBase { @Override public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { if (aSide == 0 || aSide == 1) { - return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[TAE.getIndexFromPage(2, 1)], + return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[mCasingTextureID], new GT_RenderedTexture(aActive ? TexturesGtBlock.Overlay_Machine_Controller_Default_Active : TexturesGtBlock.Overlay_Machine_Controller_Default)}; } - return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[TAE.getIndexFromPage(2, 1)]}; + return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[mCasingTextureID]}; } @Override diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialCuttingMachine.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialCuttingMachine.java index e627e99aa7..5e852b5f76 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialCuttingMachine.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialCuttingMachine.java @@ -51,7 +51,6 @@ extends GregtechMeta_MultiBlockBase { "1x Output Bus", "1x Input Hatch", "1x Energy Hatch", - "Maintenance Hatch must be at the back, centered", }; } @@ -114,6 +113,24 @@ extends GregtechMeta_MultiBlockBase { final int tX = this.getBaseMetaTileEntity().getXCoord(); final int tY = this.getBaseMetaTileEntity().getYCoord(); final int tZ = this.getBaseMetaTileEntity().getZCoord(); + + + //Check Rear Middle + { + Block aBlock = this.getBaseMetaTileEntity() + .getBlockAtSideAndDistance(this.getBaseMetaTileEntity().getBackFacing(), 4); + int aMeta = this.getBaseMetaTileEntity() + .getMetaIDAtSideAndDistance(this.getBaseMetaTileEntity().getBackFacing(), 4); + IGregTechTileEntity aTile = this.getBaseMetaTileEntity() + .getIGregTechTileEntityAtSideAndDistance(this.getBaseMetaTileEntity().getBackFacing(), 4); + if (!isValidBlockForStructure(aTile, getCasingTextureIndex(), true, aBlock, aMeta, getCasingBlock(), + getCasingMeta())) { + log("Bad Casing on Cutting Machine."); + return false; + } + } + + for (byte i = -1; i < 2; i = (byte) (i + 1)) { for (byte j = -1; j < 2; j = (byte) (j + 1)) { if ((i != 0) || (j != 0)) { @@ -122,41 +139,26 @@ extends GregtechMeta_MultiBlockBase { int aMeta = this.getBaseMetaTileEntity().getMetaID(tX + (tSide == 5 ? k : tSide == 4 ? -k : i), tY + j, tZ + (tSide == 2 ? -k : tSide == 3 ? k : i)); IGregTechTileEntity aTile = this.getBaseMetaTileEntity().getIGregTechTileEntity(tX + (tSide == 5 ? k : tSide == 4 ? -k : i), tY + j, tZ + (tSide == 2 ? -k : tSide == 3 ? k : i)); if (!isValidBlockForStructure(aTile, getCasingTextureIndex(), true, aBlock, aMeta, getCasingBlock(), getCasingMeta())) { - Logger.INFO("Bad Casing on Cutting Machine."); + log("Bad Casing on Cutting Machine."); return false; } } } } } - if ((this.mOutputHatches.size() != 0) || (this.mInputHatches.size() != 0)) { - Logger.INFO("Use Busses, Not Hatches for Input/Output."); - return false; - } if ((this.mInputBusses.size() == 0) || (this.mOutputBusses.size() == 0)) { - Logger.INFO("Incorrect amount of Input & Output busses."); + log("Incorrect amount of Input & Output busses."); return false; } - this.mMaintenanceHatches.clear(); - final IGregTechTileEntity tTileEntity = this.getBaseMetaTileEntity().getIGregTechTileEntityAtSideAndDistance(this.getBaseMetaTileEntity().getBackFacing(), 4); - if ((tTileEntity != null) && (tTileEntity.getMetaTileEntity() != null)) { - if ((tTileEntity.getMetaTileEntity() instanceof GT_MetaTileEntity_Hatch_Maintenance)) { - this.mMaintenanceHatches.add((GT_MetaTileEntity_Hatch_Maintenance) tTileEntity.getMetaTileEntity()); - ((GT_MetaTileEntity_Hatch) tTileEntity.getMetaTileEntity()).mMachineBlock = this.getCasingTextureIndex(); - } else { - Logger.INFO("Maintenance hatch must be in the middle block on the back."); - return false; - } - } if ((this.mMaintenanceHatches.size() != 1)) { - Logger.INFO("Incorrect amount of Maintenance or Energy hatches."); + log("Incorrect amount of Maintenance or Energy hatches."); return false; } } else { - Logger.INFO("False 5"); + log("False 5"); return false; } - Logger.INFO("True"); + log("True"); return true; } diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialExtruder.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialExtruder.java index 0b1691358c..f4f8a5fe78 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialExtruder.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialExtruder.java @@ -113,9 +113,9 @@ extends GregtechMeta_MultiBlockBase { } if (inputs.length > 0) { int para = (4* GT_Utility.getTier(this.getMaxInputVoltage())); - Logger.WARNING("Recipe. ["+inputs.length+"]["+para+"]"); + log("Recipe. ["+inputs.length+"]["+para+"]"); if (checkRecipeGeneric(inputs, new FluidStack[]{}, para, 100, 250, 10000)) { - Logger.WARNING("Recipe 2."); + log("Recipe 2."); return true; } } @@ -152,6 +152,22 @@ extends GregtechMeta_MultiBlockBase { return false; } } + + //Check Rear Middle + { + Block aBlock = this.getBaseMetaTileEntity() + .getBlockAtSideAndDistance(this.getBaseMetaTileEntity().getBackFacing(), 4); + int aMeta = this.getBaseMetaTileEntity() + .getMetaIDAtSideAndDistance(this.getBaseMetaTileEntity().getBackFacing(), 4); + IGregTechTileEntity aTile = this.getBaseMetaTileEntity() + .getIGregTechTileEntityAtSideAndDistance(this.getBaseMetaTileEntity().getBackFacing(), 4); + if (!isValidBlockForStructure(aTile, getCasingTextureIndex(), true, aBlock, aMeta, getCasingBlock(), + getCasingMeta())) { + log("Bad Casing on Extruder."); + return false; + } + } + final int tX = this.getBaseMetaTileEntity().getXCoord(); final int tY = this.getBaseMetaTileEntity().getYCoord(); final int tZ = this.getBaseMetaTileEntity().getZCoord(); @@ -164,7 +180,7 @@ extends GregtechMeta_MultiBlockBase { int aMeta = this.getBaseMetaTileEntity().getMetaID(tX + (tSide == 5 ? k : tSide == 4 ? -k : i), tY + j, tZ + (tSide == 2 ? -k : tSide == 3 ? k : i)); IGregTechTileEntity aTile = this.getBaseMetaTileEntity().getIGregTechTileEntity(tX + (tSide == 5 ? k : tSide == 4 ? -k : i), tY + j, tZ + (tSide == 2 ? -k : tSide == 3 ? k : i)); if (!isValidBlockForStructure(aTile, getCasingTextureIndex(), true, aBlock, aMeta, getCasingBlock(), getCasingMeta())) { - Logger.INFO("Bad Casing on Extruder."); + log("Bad Casing on Extruder."); return false; } @@ -173,29 +189,18 @@ extends GregtechMeta_MultiBlockBase { } } if ((this.mInputBusses.size() == 0) || (this.mOutputBusses.size() == 0)) { - Logger.WARNING("Incorrect amount of Input || Output busses."); + log("Incorrect amount of Input || Output busses."); return false; } - this.mMaintenanceHatches.clear(); - final IGregTechTileEntity tTileEntity = this.getBaseMetaTileEntity().getIGregTechTileEntityAtSideAndDistance(this.getBaseMetaTileEntity().getBackFacing(), 4); - if ((tTileEntity != null) && (tTileEntity.getMetaTileEntity() != null)) { - if ((tTileEntity.getMetaTileEntity() instanceof GT_MetaTileEntity_Hatch_Maintenance)) { - this.mMaintenanceHatches.add((GT_MetaTileEntity_Hatch_Maintenance) tTileEntity.getMetaTileEntity()); - ((GT_MetaTileEntity_Hatch) tTileEntity.getMetaTileEntity()).mMachineBlock = this.getCasingTextureIndex(); - } else { - Logger.WARNING("Maintenance hatch must be in the middle block on the back."); - return false; - } - } if ((this.mMaintenanceHatches.size() != 1)) { - Logger.WARNING("Incorrect amount of Maintenance hatches."); + log("Incorrect amount of Maintenance hatches."); return false; } } else { - Logger.WARNING("False 5"); + log("False 5"); return false; } - Logger.WARNING("True"); + log("True"); return true; } diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialVacuumFreezer.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialVacuumFreezer.java index 7472b71a95..064dc8372b 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialVacuumFreezer.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialVacuumFreezer.java @@ -3,6 +3,7 @@ package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing; import static gregtech.api.util.Recipe_GT.Gregtech_Recipe_Map.sAdvFreezerRecipes; import static gregtech.api.util.Recipe_GT.Gregtech_Recipe_Map.sAdvFreezerRecipes_GT; +import gregtech.api.GregTech_API; import gregtech.api.enums.TAE; import gregtech.api.enums.Textures; import gregtech.api.interfaces.IIconContainer; @@ -28,6 +29,7 @@ public class GregtechMetaTileEntity_IndustrialVacuumFreezer extends GregtechMeta public static int CASING_TEXTURE_ID; public static String mCryoFuelName = "Gelid Cryotheum"; public static String mCasingName = "Advanced Cryogenic Casing"; + public static String mHatchName = "Cryotheum Hatch"; public static FluidStack mFuelStack; public GregtechMetaTileEntity_IndustrialVacuumFreezer(final int aID, final String aName, final String aNameRegional) { @@ -36,6 +38,7 @@ public class GregtechMetaTileEntity_IndustrialVacuumFreezer extends GregtechMeta CASING_TEXTURE_ID = TAE.getIndexFromPage(2, 10); mCryoFuelName = mFuelStack.getLocalizedName(); mCasingName = ItemUtils.getLocalizedNameOfBlock(ModBlocks.blockCasings3Misc, 10); + mHatchName = ItemUtils.getLocalizedNameOfBlock(GregTech_API.sBlockMachines, 967); } public GregtechMetaTileEntity_IndustrialVacuumFreezer(final String aName) { @@ -44,6 +47,7 @@ public class GregtechMetaTileEntity_IndustrialVacuumFreezer extends GregtechMeta CASING_TEXTURE_ID = TAE.getIndexFromPage(2, 10); mCryoFuelName = mFuelStack.getLocalizedName(); mCasingName = ItemUtils.getLocalizedNameOfBlock(ModBlocks.blockCasings3Misc, 10); + mHatchName = ItemUtils.getLocalizedNameOfBlock(GregTech_API.sBlockMachines, 967); } public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { @@ -63,21 +67,19 @@ public class GregtechMetaTileEntity_IndustrialVacuumFreezer extends GregtechMeta if (mCryoFuelName.toLowerCase().contains(".")) { mCryoFuelName = FluidUtils.getFluidStack("cryotheum", 1).getLocalizedName(); } + if (mHatchName.toLowerCase().contains(".name")) { + mHatchName = ItemUtils.getLocalizedNameOfBlock(GregTech_API.sBlockMachines, 967); + } return new String[]{ - "Controller Block for the Advanced Cryogenic Freezer", - "Super cools hot ingots and cells", - "Processes four Vacuum Freezer Recipes at 200% speed", + "Factory Grade Advanced Vacuum Freezer", + "Speed: 200% | Eu Usage: 100% | Parallel: 4", "Consumes 1L of "+mCryoFuelName+"/t during operation", - "Size(WxHxD): 3x3x3 (Hollow)", - mCasingName+"s for the rest (10 at least!)", - "Controller (Front centered)", - "1x Input Bus", - "1x Output Bus", - "1x Input Hatch", - "1x Output Hatch (optional)", - "1x Energy Hatch", - }; + "Constructed exactly the same as a normal Vacuum Freezer", + "Use "+mCasingName+"s (10 at least!)", + "1x " + mHatchName + " (Required)", + "TAG_HIDE_HATCHES" + }; } public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialWireMill.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialWireMill.java index bf33892420..d798691d04 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialWireMill.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialWireMill.java @@ -118,6 +118,21 @@ extends GregtechMeta_MultiBlockBase { return false; } } + + //Check Rear Middle + { + Block aBlock = this.getBaseMetaTileEntity() + .getBlockAtSideAndDistance(this.getBaseMetaTileEntity().getBackFacing(), 4); + int aMeta = this.getBaseMetaTileEntity() + .getMetaIDAtSideAndDistance(this.getBaseMetaTileEntity().getBackFacing(), 4); + IGregTechTileEntity aTile = this.getBaseMetaTileEntity() + .getIGregTechTileEntityAtSideAndDistance(this.getBaseMetaTileEntity().getBackFacing(), 4); + if (!isValidBlockForStructure(aTile, getCasingTextureIndex(), true, aBlock, aMeta, getCasingBlock(), + getCasingMeta())) { + log("Bad Casing on Wiremill."); + return false; + } + } final int tX = this.getBaseMetaTileEntity().getXCoord(); final int tY = this.getBaseMetaTileEntity().getYCoord(); final int tZ = this.getBaseMetaTileEntity().getZCoord(); @@ -129,7 +144,7 @@ extends GregtechMeta_MultiBlockBase { int aMeta = this.getBaseMetaTileEntity().getMetaID(tX + (tSide == 5 ? k : tSide == 4 ? -k : i), tY + j, tZ + (tSide == 2 ? -k : tSide == 3 ? k : i)); IGregTechTileEntity aTile = this.getBaseMetaTileEntity().getIGregTechTileEntity(tX + (tSide == 5 ? k : tSide == 4 ? -k : i), tY + j, tZ + (tSide == 2 ? -k : tSide == 3 ? k : i)); if (!isValidBlockForStructure(aTile, getCasingTextureIndex(), true, aBlock, aMeta, getCasingBlock(), getCasingMeta())) { - Logger.INFO("Bad Casing on Wiremill."); + log("Bad Casing on Wiremill."); return false; } } @@ -137,33 +152,22 @@ extends GregtechMeta_MultiBlockBase { } } if ((this.mOutputHatches.size() != 0) || (this.mInputHatches.size() != 0)) { - Logger.INFO("Use Busses, Not Hatches for Input/Output."); + log("Use Busses, Not Hatches for Input/Output."); return false; } if ((this.mInputBusses.size() == 0) || (this.mOutputBusses.size() == 0)) { - Logger.INFO("Incorrect amount of Input & Output busses."); + log("Incorrect amount of Input & Output busses."); return false; } - this.mMaintenanceHatches.clear(); - final IGregTechTileEntity tTileEntity = this.getBaseMetaTileEntity().getIGregTechTileEntityAtSideAndDistance(this.getBaseMetaTileEntity().getBackFacing(), 4); - if ((tTileEntity != null) && (tTileEntity.getMetaTileEntity() != null)) { - if ((tTileEntity.getMetaTileEntity() instanceof GT_MetaTileEntity_Hatch_Maintenance)) { - this.mMaintenanceHatches.add((GT_MetaTileEntity_Hatch_Maintenance) tTileEntity.getMetaTileEntity()); - ((GT_MetaTileEntity_Hatch) tTileEntity.getMetaTileEntity()).mMachineBlock = this.getCasingTextureIndex(); - } else { - Logger.INFO("Maintenance hatch must be in the middle block on the back."); - return false; - } - } if ((this.mMaintenanceHatches.size() != 1)) { - Logger.INFO("Incorrect amount of Maintenance or Energy hatches."); + log("Incorrect amount of Maintenance or Energy hatches."); return false; } } else { - Logger.INFO("False 5"); + log("False 5"); return false; } - Logger.INFO("True"); + log("True"); return true; } @@ -200,12 +204,4 @@ extends GregtechMeta_MultiBlockBase { public byte getCasingTextureIndex() { return (byte) TAE.GTPP_INDEX(6); } - - private boolean addToMachineList(final IGregTechTileEntity tTileEntity) { - return ((this.addMaintenanceToMachineList(tTileEntity, this.getCasingTextureIndex())) || (this.addInputToMachineList(tTileEntity, this.getCasingTextureIndex())) || (this.addOutputToMachineList(tTileEntity, this.getCasingTextureIndex())) || (this.addMufflerToMachineList(tTileEntity, this.getCasingTextureIndex()))); - } - - private boolean addEnergyInputToMachineList(final IGregTechTileEntity tTileEntity) { - return ((this.addEnergyInputToMachineList(tTileEntity, this.getCasingTextureIndex()))); - } }
\ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_EBF.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_EBF.java index e4f984ee18..ac362e2c40 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_EBF.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_EBF.java @@ -103,21 +103,14 @@ public class GregtechMetaTileEntity_Adv_EBF extends GregtechMeta_MultiBlockBase mHatchName = ItemUtils.getLocalizedNameOfBlock(GregTech_API.sBlockMachines, 968); } - return new String[] { "Controller Block for the Advanced Electric Blast Furnace", - "120% faster than using an equal tier EBF", "Only uses 90% of the eu/t normally required", - "Processes upto 8 recipes at once", - "Consumes 10L of " + mHotFuelName + "/s during operation", - "Each 900K over the min. Heat Capacity grants 5% speedup (multiplicatively)", - "Each 1800K over the min. Heat Capacity allows for one upgraded overclock", - "Upgraded overclocks reduce recipe time to 25% and increase EU/t to 400%", - "Size(WxHxD): 3x4x3 (Hollow), Controller (Front middle bottom)", - "16x Heating Coils (Two middle Layers, hollow)", - "1x " + mHatchName, - "1x Input Hatch/Bus", - "1x Output Hatch/Bus (Bottom Layer)", - "1x Output Hatch to recover CO2/CO/SO2 (optional, any top layer casing),", - " Recovery scales with Muffler Hatch tier", mCasingName + "s for the rest", - "1x Energy Hatch", + return new String[] { + "Factory Grade Advanced Blast Furnace", + "Speed: 120% | Eu Usage: 90% | Parallel: 8", + "Consumes 10L of " + mHotFuelName + " per second during operation", + "Constructed exactly the same as a normal EBF", + "Use "+mCasingName+"s (10 at least!)", + "1x " + mHatchName + " (Required)", + "TAG_HIDE_HATCHES" }; } @@ -230,10 +223,10 @@ public class GregtechMetaTileEntity_Adv_EBF extends GregtechMeta_MultiBlockBase this.mHeatingCapacity = 9001; break; case 7: - this.mHeatingCapacity = 12001; + this.mHeatingCapacity = 9901; break; case 8: - this.mHeatingCapacity = 15001; + this.mHeatingCapacity = 10801; break; default: Logger.INFO("Heating Coils are bad."); diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_Implosion.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_Implosion.java index 8abf506e55..7dfdbf75d6 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_Implosion.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_Implosion.java @@ -47,15 +47,12 @@ extends GregtechMeta_MultiBlockBase { if (mCasingName.contains("gt.blockcasings")) { mCasingName = ItemList.Casing_RobustTungstenSteel.get(1).getDisplayName(); } - return new String[]{ - "Controller Block for the Advanced Implosion Compressor", - "Processes upto ((Tier/2)+1) recipes at once", - "Size(WxHxD): 3x3x3 (Hollow)", - mCasingName+"s (10 at least!)", - "Controller (Front centered)", - "1x Input Bus", - "1x Output Bus", - "1x Energy Hatch", + return new String[]{ + "Factory Grade Advanced Implosion Compressor", + "Speed: 100% | Eu Usage: 100% | Parallel: ((Tier/2)+1)", + "Constructed exactly the same as a normal Implosion Compressor", + "Use "+mCasingName+"s (10 at least!)", + "TAG_HIDE_HATCHES" }; } diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GT4Entity_AutoCrafter.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GT4Entity_AutoCrafter.java index 759378013c..c31a7c0758 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GT4Entity_AutoCrafter.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GT4Entity_AutoCrafter.java @@ -221,7 +221,7 @@ public class GT4Entity_AutoCrafter extends GregtechMeta_MultiBlockBase { return r; } } - } catch (NoSuchFieldException | IllegalArgumentException | IllegalAccessException e) { + } catch (IllegalArgumentException | IllegalAccessException e) { } } return GT_Recipe.GT_Recipe_Map.sAssemblerRecipes; diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_MiniFusionPlant.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_MiniFusionPlant.java index 6ec95ff16b..8925caf480 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_MiniFusionPlant.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_MiniFusionPlant.java @@ -130,19 +130,18 @@ public class GregtechMTE_MiniFusionPlant extends GregtechMeta_MultiBlockBase { //"Input voltage can be changed within the GUI", "Place Input/Output Hatches on sides and bottom", "Power can only be inserted into the back", - "Power can only be extracted from the top", + //e"Power can only be extracted from the top", + TAG_HIDE_HATCHES }; } @Override public int getMaxParallelRecipes() { - // TODO Auto-generated method stub return 1; } @Override public int getEuDiscountForParallelism() { - // TODO Auto-generated method stub return 0; } @@ -317,7 +316,7 @@ public class GregtechMTE_MiniFusionPlant extends GregtechMeta_MultiBlockBase { @Override public boolean isEnetOutput() { - return true; + return false; } @Override diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntityGeneratorArray.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntityGeneratorArray.java index 8446737017..23ca94e54d 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntityGeneratorArray.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntityGeneratorArray.java @@ -22,6 +22,7 @@ import gregtech.api.util.Recipe_GT.Gregtech_Recipe_Map; import gregtech.common.GT_Pollution; import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.util.minecraft.FluidUtils; +import gtPlusPlus.core.util.minecraft.gregtech.PollutionUtils; import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; import net.minecraft.block.Block; @@ -401,7 +402,7 @@ public class GregtechMetaTileEntityGeneratorArray extends GregtechMeta_MultiBloc if (this.addOutput(tEmptyContainer1)) { aBaseMetaTileEntity.increaseStoredEnergyUnits((long) tFuelValue, true); this.depleteInput(a); - GT_Pollution.addPollution(this.getBaseMetaTileEntity(), 10 * this.getPollutionPerTick(null)); + PollutionUtils.addPollution(this.getBaseMetaTileEntity(), 10 * this.getPollutionPerTick(null)); } } } @@ -418,7 +419,7 @@ public class GregtechMetaTileEntityGeneratorArray extends GregtechMeta_MultiBloc (this.maxEUStore() - aBaseMetaTileEntity.getUniversalEnergyStored()) / (long) tFuelValue); if (tFluidAmountToUse > 0L && aBaseMetaTileEntity .increaseStoredEnergyUnits(tFluidAmountToUse * (long) tFuelValue, true)) { - GT_Pollution.addPollution(this.getBaseMetaTileEntity(), 10 * this.getPollutionPerTick(null)); + PollutionUtils.addPollution(this.getBaseMetaTileEntity(), 10 * this.getPollutionPerTick(null)); mFluid.amount = (int) ((long) mFluid.amount - tFluidAmountToUse * (long) tEmptyContainer); } diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_Cyclotron.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_Cyclotron.java index 1623e7cb54..de5d731dd5 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_Cyclotron.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_Cyclotron.java @@ -410,9 +410,13 @@ public class GregtechMetaTileEntity_Cyclotron extends GregtechMeta_MultiBlockBas //Time Counter this.mTotalRunTime++; - onRunningTick(null); + onRunningTick(null); - if (mRunningOnLoad && checkMultiblock(aBaseMetaTileEntity, mInventory[1])) { + boolean aFormCheck = (aTick % 100 == 0 ? checkMultiblock(aBaseMetaTileEntity, mInventory[1]) : true); + + + + if (mRunningOnLoad && aFormCheck) { this.mEUStore = (int) aBaseMetaTileEntity.getStoredEU(); checkRecipe(mInventory[1]); } @@ -429,7 +433,7 @@ public class GregtechMetaTileEntity_Cyclotron extends GregtechMeta_MultiBlockBas mDischargeHatches.clear(); mControlCoreBus.clear(); mMultiDynamoHatches.clear(); - mMachine = checkMultiblock(aBaseMetaTileEntity, mInventory[1]); + mMachine = aFormCheck; } if (mStartUpCheck < 0) { if (mMachine) { diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_IndustrialFishingPond.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_IndustrialFishingPond.java index b1e433e276..fc0cb85bac 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_IndustrialFishingPond.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_IndustrialFishingPond.java @@ -459,7 +459,7 @@ public class GregtechMetaTileEntity_IndustrialFishingPond extends GregtechMeta_M ItemStack k = ItemUtils.getSimpleStack(t, 1); reflectiveFishMap.put(y, k); return t; - } catch (IllegalArgumentException | IllegalAccessException | NoSuchFieldException e) { + } catch (IllegalArgumentException | IllegalAccessException e) { } return null; } diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_MassFabricator.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_MassFabricator.java index f052d64a34..e531103a37 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_MassFabricator.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_MassFabricator.java @@ -134,13 +134,13 @@ public class GregtechMetaTileEntity_MassFabricator extends GregtechMeta_MultiBlo public static ItemStack getScrapPile() { if (mScrap[0] == null) { - mScrap[0] = ItemUtils.getSimpleStack(ItemUtils.getItem("IC2:itemScrap")); + mScrap[0] = ItemUtils.getSimpleStack(ItemUtils.getItemFromFQRN("IC2:itemScrap")); } return mScrap[0]; } public static ItemStack getScrapBox() { if (mScrap[1] == null) { - mScrap[1] = ItemUtils.getSimpleStack(ItemUtils.getItem("IC2:itemScrapbox")); + mScrap[1] = ItemUtils.getSimpleStack(ItemUtils.getItemFromFQRN("IC2:itemScrapbox")); } return mScrap[1]; } diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_Refinery.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_Refinery.java index 1a19bc7b96..07c8a4a7ac 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_Refinery.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_Refinery.java @@ -1,23 +1,25 @@ package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production; -import java.util.ArrayList; +import static gregtech.api.enums.GT_Values.E; +import static gregtech.api.enums.GT_Values.RES_PATH_GUI; + +import java.util.HashSet; -import gregtech.api.enums.GT_Values; import gregtech.api.enums.TAE; import gregtech.api.enums.Textures; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Input; import gregtech.api.objects.GT_RenderedTexture; import gregtech.api.util.CustomRecipeMap; import gregtech.api.util.GT_Recipe; -import gregtech.api.util.GT_Utility; +import gregtech.api.util.GT_Recipe.GT_Recipe_Map; import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.block.ModBlocks; import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; import net.minecraft.item.ItemStack; import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.FluidStack; public class GregtechMetaTileEntity_Refinery extends GregtechMeta_MultiBlockBase { @@ -69,42 +71,30 @@ public class GregtechMetaTileEntity_Refinery extends GregtechMeta_MultiBlockBase @Override public String getCustomGUIResourceName() { - return "LFTR"; + return "MatterFabricator"; } + private static final GT_Recipe_Map mGregTypeRecipeMap = new GT_Recipe_Map(new HashSet<GT_Recipe>(), "internal.recipe.fissionfuel", "Fission Fuel Processing", null, RES_PATH_GUI + "basicmachines/FissionFuel", 0, 0, 0, 4, 1, E, 1, E, true, true); + @Override - public boolean checkRecipe(ItemStack aStack) { - ArrayList<FluidStack> tFluidList = getStoredFluids(); - int tFluidList_sS=tFluidList.size(); - for (int i = 0; i < tFluidList_sS - 1; i++) { - for (int j = i + 1; j < tFluidList_sS; j++) { - if (GT_Utility.areFluidsEqual(tFluidList.get(i), tFluidList.get(j))) { - if (tFluidList.get(i).amount >= tFluidList.get(j).amount) { - tFluidList.remove(j--); tFluidList_sS=tFluidList.size(); - } else { - tFluidList.remove(i--); tFluidList_sS=tFluidList.size(); - break; - } - } - } - } - if (tFluidList.size() > 1) { - FluidStack[] tFluids = tFluidList.toArray(new FluidStack[tFluidList.size()]); - GT_Recipe tRecipe = CustomRecipeMap.sFissionFuelProcessing.findRecipe(this.getBaseMetaTileEntity(), this.mLastRecipe, false, GT_Values.V[4], tFluids, new ItemStack[]{}); - if (tRecipe == null) { - this.mLastRecipe = null; - return false; - } - if (tRecipe.isRecipeInputEqual(true, tFluids, new ItemStack[]{})) { - this.mLastRecipe = tRecipe; - this.mEUt = this.mLastRecipe.mEUt; - this.mMaxProgresstime = this.mLastRecipe.mDuration; - this.mEfficiencyIncrease = 10000; - this.mOutputFluids = this.mLastRecipe.mFluidOutputs; - return true; - } - } - return false; + public GT_Recipe_Map getRecipeMap() { + if (mGregTypeRecipeMap.mRecipeList.size() <= 0) { + for (GT_Recipe g : CustomRecipeMap.sFissionFuelProcessing.mRecipeList) { + mGregTypeRecipeMap.mRecipeList.add(g); + } + } + return mGregTypeRecipeMap; + } + + @Override + public boolean checkRecipe(ItemStack aStack) { + //this.resetRecipeMapForAllInputHatches(); + for (GT_MetaTileEntity_Hatch_Input g : this.mInputHatches) { + g.mRecipeMap = null; + } + boolean ab = super.checkRecipeGeneric(); + //Logger.INFO("Did Recipe? "+ab); + return ab; } @Override @@ -261,7 +251,8 @@ public class GregtechMetaTileEntity_Refinery extends GregtechMeta_MultiBlockBase Logger.INFO("Your Muffler must be AT LEAST ZPM tier or higher."); } } - Logger.INFO("Fission Fuel Production Plant Formed."); + Logger.INFO("Fission Fuel Production Plant Formed. "+mGregTypeRecipeMap.mRecipeList.size()); + this.resetRecipeMapForAllInputHatches(this.getRecipeMap()); return true; } diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GregtechMetaEnergyBuffer.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GregtechMetaEnergyBuffer.java index 1d2fad941b..b77529220f 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GregtechMetaEnergyBuffer.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GregtechMetaEnergyBuffer.java @@ -294,7 +294,6 @@ public class GregtechMetaEnergyBuffer extends GregtechMetaTileEntity { cur = String.format(fmt, cur); return new String[] { - this.getLocalName(), cur+" EU stored", max+" EU capacity"}; } @@ -345,7 +344,7 @@ public class GregtechMetaEnergyBuffer extends GregtechMetaTileEntity { @Override public String getInventoryName() { - return null; + return super.getInventoryName(); } @Override |