aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus
diff options
context:
space:
mode:
authorAlkalus <3060479+draknyte1@users.noreply.github.com>2019-01-25 04:43:40 +0000
committerAlkalus <3060479+draknyte1@users.noreply.github.com>2019-01-25 04:43:40 +0000
commitf25534d89a96449f6d7a1adda952c35d234672f5 (patch)
treead0dff32f74ce7e0f54233291963abc6db8c68c3 /src/Java/gtPlusPlus
parentb41d734f18e0ec5a6d38fda93be8143fdcaf4c24 (diff)
parentc7c62d38eec9034c09a09dbdec02dcb492ec55e7 (diff)
downloadGT5-Unofficial-f25534d89a96449f6d7a1adda952c35d234672f5.tar.gz
GT5-Unofficial-f25534d89a96449f6d7a1adda952c35d234672f5.tar.bz2
GT5-Unofficial-f25534d89a96449f6d7a1adda952c35d234672f5.zip
Merge branch 'master' into imgbot
# Conflicts: # src/resources/assets/miscutils/textures/items/itemBufferCore.png
Diffstat (limited to 'src/Java/gtPlusPlus')
-rw-r--r--src/Java/gtPlusPlus/GTplusplus.java96
-rw-r--r--src/Java/gtPlusPlus/core/item/ModItems.java17
-rw-r--r--src/Java/gtPlusPlus/core/item/base/misc/BaseItemParticle.java5
-rw-r--r--src/Java/gtPlusPlus/core/item/chemistry/IonParticles.java117
-rw-r--r--src/Java/gtPlusPlus/core/item/chemistry/RocketFuels.java2
-rw-r--r--src/Java/gtPlusPlus/core/item/chemistry/StandardBaseParticles.java90
-rw-r--r--src/Java/gtPlusPlus/core/item/general/BufferCore.java66
-rw-r--r--src/Java/gtPlusPlus/core/item/general/ItemControlCore.java11
-rw-r--r--src/Java/gtPlusPlus/core/material/Material.java2
-rw-r--r--src/Java/gtPlusPlus/core/material/Particle.java47
-rw-r--r--src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java256
-rw-r--r--src/Java/gtPlusPlus/core/recipe/RECIPES_Machines.java274
-rw-r--r--src/Java/gtPlusPlus/core/recipe/common/CI.java276
-rw-r--r--src/Java/gtPlusPlus/core/util/Utils.java5
-rw-r--r--src/Java/gtPlusPlus/core/util/minecraft/ItemUtils.java29
-rw-r--r--src/Java/gtPlusPlus/preloader/asm/AsmConfig.java6
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java3
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/IGregtech_RecipeAdder.java2
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java31
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechItems.java1
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/render/GTPP_CapeRenderer.java278
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_Cyclotron.java150
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_BlastSmelter.java12
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java11
24 files changed, 1348 insertions, 439 deletions
diff --git a/src/Java/gtPlusPlus/GTplusplus.java b/src/Java/gtPlusPlus/GTplusplus.java
index 8ae48f3b3f..7b340dc798 100644
--- a/src/Java/gtPlusPlus/GTplusplus.java
+++ b/src/Java/gtPlusPlus/GTplusplus.java
@@ -1,6 +1,8 @@
package gtPlusPlus;
-import static gtPlusPlus.core.lib.CORE.ConfigSwitches.*;
+import static gtPlusPlus.core.lib.CORE.ConfigSwitches.enableAnimatedTurbines;
+import static gtPlusPlus.core.lib.CORE.ConfigSwitches.enableCustomCapes;
+import static gtPlusPlus.core.lib.CORE.ConfigSwitches.enableUpdateChecker;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
@@ -9,18 +11,24 @@ import java.util.Collection;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.SidedProxy;
-import cpw.mods.fml.common.event.*;
+import cpw.mods.fml.common.event.FMLInitializationEvent;
+import cpw.mods.fml.common.event.FMLLoadCompleteEvent;
+import cpw.mods.fml.common.event.FMLPostInitializationEvent;
+import cpw.mods.fml.common.event.FMLPreInitializationEvent;
+import cpw.mods.fml.common.event.FMLServerStartingEvent;
+import cpw.mods.fml.common.event.FMLServerStoppingEvent;
import cpw.mods.fml.relauncher.IFMLLoadingPlugin.MCVersion;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import gregtech.api.enums.Materials;
import gregtech.api.enums.Textures;
import gregtech.api.enums.Textures.BlockIcons;
-import gregtech.api.util.*;
+import gregtech.api.util.FishPondFakeRecipe;
+import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Recipe.GT_Recipe_Map;
+import gregtech.api.util.Recipe_GT;
+import gregtech.api.util.SemiFluidFuelHandler;
import gtPlusPlus.api.objects.Logger;
-import gtPlusPlus.api.objects.data.AutoMap;
-import gtPlusPlus.api.objects.data.Pair;
import gtPlusPlus.core.commands.CommandDebugChunks;
import gtPlusPlus.core.commands.CommandMath;
import gtPlusPlus.core.common.CommonProxy;
@@ -28,16 +36,22 @@ import gtPlusPlus.core.config.ConfigHandler;
import gtPlusPlus.core.handler.BookHandler;
import gtPlusPlus.core.handler.Recipes.RegistrationHandler;
import gtPlusPlus.core.handler.chunkloading.ChunkLoading;
-import gtPlusPlus.core.handler.events.*;
+import gtPlusPlus.core.handler.events.BlockEventHandler;
+import gtPlusPlus.core.handler.events.LoginEventHandler;
+import gtPlusPlus.core.handler.events.MissingMappingsEvent;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.lib.LoadedMods;
import gtPlusPlus.core.material.Material;
import gtPlusPlus.core.material.nuclear.FLUORIDES;
import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.data.LocaleUtils;
-import gtPlusPlus.core.util.minecraft.*;
+import gtPlusPlus.core.util.minecraft.FluidUtils;
+import gtPlusPlus.core.util.minecraft.ItemUtils;
+import gtPlusPlus.core.util.minecraft.RecipeUtils;
import gtPlusPlus.core.util.reflect.ReflectionUtils;
-import gtPlusPlus.core.util.sys.*;
+import gtPlusPlus.core.util.sys.GeoUtils;
+import gtPlusPlus.core.util.sys.NetworkUtils;
+import gtPlusPlus.core.util.sys.SystemUtils;
import gtPlusPlus.plugin.manager.Core_Manager;
import gtPlusPlus.xmod.gregtech.api.objects.GregtechBufferThread;
import gtPlusPlus.xmod.gregtech.common.Meta_GT_Proxy;
@@ -46,7 +60,6 @@ import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtTools;
import gtPlusPlus.xmod.gregtech.loaders.GT_Material_Loader;
import gtPlusPlus.xmod.gregtech.loaders.RecipeGen_BlastSmelterGT_GTNH;
import gtPlusPlus.xmod.gregtech.registration.gregtech.GregtechMiniRaFusion;
-import gtPlusPlus.xmod.ob.SprinklerHandler;
import gtPlusPlus.xmod.thaumcraft.commands.CommandDumpAspects;
import net.minecraft.launchwrapper.Launch;
import net.minecraft.util.IIcon;
@@ -420,69 +433,4 @@ public class GTplusplus implements ActionListener {
mGregMatLoader.enableMaterial(Materials.Force);
}
- /**
- * Capes
- */
-
- public static final AutoMap<Pair<String, String>> mOrangeCapes = new AutoMap<Pair<String, String>>();
- public static final AutoMap<Pair<String, String>> mMiscCapes = new AutoMap<Pair<String, String>>();
- public static final AutoMap<Pair<String, String>> mBetaTestCapes = new AutoMap<Pair<String, String>>();
- public static final AutoMap<Pair<String, String>> mDevCapes = new AutoMap<Pair<String, String>>();
- public static final AutoMap<Pair<String, String>> mPatreonCapes = new AutoMap<Pair<String, String>>();
-
- public static void BuildCapeList() {
- //Basic Orange Cape (I give these away at times, just because)
- mOrangeCapes.put(new Pair<String, String>("ImmortalPharaoh7", "c8c479b2-7464-4b20-adea-b43ff1c10c53"));
- mOrangeCapes.put(new Pair<String, String>("Walmart_Employee", "7a56602b-9a67-44e3-95a5-270f887712c6"));
- mOrangeCapes.put(new Pair<String, String>("ArchonCerulean", "f773e61f-261f-41e7-a221-5dcace291ced"));
- mOrangeCapes.put(new Pair<String, String>("netmc", "c3ecbcc3-0d83-4da6-bb89-69f3f1a6e38b"));
- mOrangeCapes.put(new Pair<String, String>("twinsrock8", "c1239b45b-b3a3-4282-8143-c73778897dda"));
- mOrangeCapes.put(new Pair<String, String>("Ajes", "b1781fc7-35ca-4255-a21c-cdb1b7ea1853"));
- mOrangeCapes.put(new Pair<String, String>("LAGIdiot", "44f38ff8-aad7-49c3-acb3-d92317af9078"));
- mOrangeCapes.put(new Pair<String, String>("Snaggerr", "7e553c3b-b259-4c16-992a-c8c107401e74"));
- mOrangeCapes.put(new Pair<String, String>("Semmelx4", "651b3963-038f-4769-9f75-0eaca0c4e748"));
- //mOrangeCapes.put(new Pair<String, String>("aaaa", "1234"));
- //mOrangeCapes.put(new Pair<String, String>("aaaa", "1234"));
- //mOrangeCapes.put(new Pair<String, String>("aaaa", "1234"));
-
- //Misc
- mMiscCapes.put(new Pair<String, String>("doomsquirter", "3aee80ab-d982-4e6d-b8d0-7912bbd75f5d"));
- mMiscCapes.put(new Pair<String, String>("ukdunc", "17d57521-3a1e-4eb9-91e6-901a65c15e07"));
- mMiscCapes.put(new Pair<String, String>("q009", "520aebe6-4cd9-46cd-bc7a-d47e5e648e38"));
- mMiscCapes.put(new Pair<String, String>("JaidenC", "00b157e5-cd97-43a2-a080-460f550e93cd"));
- mMiscCapes.put(new Pair<String, String>("TheGiggitygoo", "9f996c78-bddc-4dec-a522-0df7267f11f3"));
-
- //Beta/Dev Tester Capes
- mBetaTestCapes.put(new Pair<String, String>("fobius", "ca399a5b-d1bb-46e3-af5b-5939817b5cf8"));
- mBetaTestCapes.put(new Pair<String, String>("cantankerousrex", ""));
- mBetaTestCapes.put(new Pair<String, String>("stephen_2015", "004ae3d8-ecaf-48eb-9e4e-224d42d31c78"));
- mBetaTestCapes.put(new Pair<String, String>("Dyonovan", "2f3a7dff-b1ec-4c05-8eed-63ad2a3ba73f"));
- mBetaTestCapes.put(new Pair<String, String>("Bear989Sr", "1964e3d1-6500-40e7-9ff2-e6161d41a8c2"));
- mBetaTestCapes.put(new Pair<String, String>("CrazyJ1984", "d84f9654-87ea-46a9-881f-c6aa45dd5af8"));
- mBetaTestCapes.put(new Pair<String, String>("AndreyKV", "9550c173-a8c5-4e7f-bf8d-b5ded56921ef"));
- mBetaTestCapes.put(new Pair<String, String>("Piky", "7822ae35-9d5a-4fe7-bd5f-d03006932a65"));
-
- //GTNH Beta Testers
- mBetaTestCapes.put(new Pair<String, String>("bartimaeusnek", "578c2d13-9358-4ae8-95e7-a30ab9f9f3c7"));
- mBetaTestCapes.put(new Pair<String, String>("Prewf", "634433ec-6256-44aa-97b3-a615be18ce23"));
- mBetaTestCapes.put(new Pair<String, String>("FallDark", "86aa136e-9b5e-45e3-8273-6684fd7c537d"));
- mBetaTestCapes.put(new Pair<String, String>("0lafe", "8b06bcf9-7a94-45f9-a01f-2fff73e7582d"));
- mBetaTestCapes.put(new Pair<String, String>("Dogehog", "499b751e-f106-41ae-8dfe-3b88a73958e0"));
- //mBetaTestCapes.put(new Pair<String, String>("cantankerousrex", ""));
-
- //Dev Capes
- mDevCapes.put(new Pair<String, String>("draknyte1", "5652713c-668e-47f3-853a-3fa959a9dfd3"));
- mDevCapes.put(new Pair<String, String>("crimsonhood17", "c4773470-2585-4bd7-82b3-8764ca6acd08"));
-
-
- /**
- * Patreons
- */
-
- mPatreonCapes.put(new Pair<String, String>("Baxterzz", "e8aa5500-7319-4453-822c-b96b29ab5981"));
- mPatreonCapes.put(new Pair<String, String>("leagris", "09752aa3-8b9c-4f8f-b04f-5421e799547d"));
- mPatreonCapes.put(new Pair<String, String>("Traumeister", "fd3f46ac-801a-4566-90b5-75cb362d261e"));
- mPatreonCapes.put(new Pair<String, String>("asturrial", "26c4881f-c708-4c5d-aa76-4419c3a1265b"));
- }
-
}
diff --git a/src/Java/gtPlusPlus/core/item/ModItems.java b/src/Java/gtPlusPlus/core/item/ModItems.java
index 2fd23ec88d..a14073e569 100644
--- a/src/Java/gtPlusPlus/core/item/ModItems.java
+++ b/src/Java/gtPlusPlus/core/item/ModItems.java
@@ -292,11 +292,12 @@ public final class ModItems {
public static Item boxFood;
public static Item boxMagic;
- private static DustDecayable dustMolybdenum99;
+ public static DustDecayable dustMolybdenum99;
+ public static DustDecayable dustTechnetium99;
+ public static DustDecayable dustTechnetium99M;
- private static DustDecayable dustTechnetium99;
-
- private static DustDecayable dustTechnetium99M;
+ public static IonParticles itemIonParticleBase;
+ public static StandardBaseParticles itemStandarParticleBase;
static {
Logger.INFO("Items!");
@@ -580,7 +581,7 @@ public final class ModItems {
MaterialGenerator.generate(ALLOY.ABYSSAL);
- MaterialGenerator.generate(ALLOY.TITANSTEEL, false);
+ MaterialGenerator.generate(ALLOY.TITANSTEEL);
MaterialGenerator.generate(ALLOY.ARCANITE);
MaterialGenerator.generate(ALLOY.OCTIRON);
@@ -630,7 +631,7 @@ public final class ModItems {
dustLithiumPeroxide = ItemUtils.generateSpecialUseDusts("LithiumPeroxide", "Lithium Peroxide", "Li2O2", Utils.rgbtoHexValue(250, 250, 250))[0]; //https://en.wikipedia.org/wiki/Lithium_peroxide
dustLithiumHydroxide = ItemUtils.generateSpecialUseDusts("LithiumHydroxide", "Lithium Hydroxide", "LiOH", Utils.rgbtoHexValue(250, 250, 250))[0]; //https://en.wikipedia.org/wiki/Lithium_hydroxide
- if ((ItemUtils.getItemStackOfAmountFromOreDict("dustQuicklime", 1).getItem() == ModItems.AAA_Broken) || !LoadedMods.IHL){
+ if (!ItemUtils.checkForInvalidItems(ItemUtils.getItemStackOfAmountFromOreDict("dustQuicklime", 1)) && !LoadedMods.IHL){
dustQuicklime = ItemUtils.generateSpecialUseDusts("Quicklime", "Quicklime", "CaO", Utils.rgbtoHexValue(255, 255, 175))[0]; //https://en.wikipedia.org/wiki/Calcium_oxide
}
dustCalciumHydroxide = ItemUtils.generateSpecialUseDusts("CalciumHydroxide", "Hydrated Lime", "Ca(OH)2", Utils.rgbtoHexValue(255, 255, 255))[0]; //https://en.wikipedia.org/wiki/Calcium_hydroxide
@@ -814,8 +815,8 @@ public final class ModItems {
dustTechnetium99M = new DustDecayable("dustTechnetium99M", ELEMENT.getInstance().TECHNETIUM.getRgbAsHex(), 8570, new String[] {""+StringUtils.superscript("99ᵐTc"), "Result: Technicium 99 ("+StringUtils.superscript("99Tc")+")"}, dustTechnetium99, 4);
dustMolybdenum99 = new DustDecayable("dustMolybdenum99", ELEMENT.getInstance().MOLYBDENUM.getRgbAsHex(), 16450, new String[] {""+StringUtils.superscript("99Mo"), "Result: Technicium 99ᵐ ("+StringUtils.superscript("99ᵐTc")+")"}, dustTechnetium99M, 4);
- new IonParticles();
- new StandardBaseParticles();
+ itemIonParticleBase = new IonParticles();
+ itemStandarParticleBase = new StandardBaseParticles();
diff --git a/src/Java/gtPlusPlus/core/item/base/misc/BaseItemParticle.java b/src/Java/gtPlusPlus/core/item/base/misc/BaseItemParticle.java
index 89cd1e55ae..b7bbc84757 100644
--- a/src/Java/gtPlusPlus/core/item/base/misc/BaseItemParticle.java
+++ b/src/Java/gtPlusPlus/core/item/base/misc/BaseItemParticle.java
@@ -30,7 +30,10 @@ public abstract class BaseItemParticle extends CoreItem {
public int getColorFromItemStack(final ItemStack stack, final int HEX_OxFFFFFF) {
return aColourMap.get(stack.getItemDamage());
}
-
+
+ public int getColorFromParentClass(ItemStack stack, int aaa) {
+ return super.getColorFromItemStack(stack, aaa);
+ }
@SuppressWarnings({ "unchecked", "rawtypes" })
@Override
diff --git a/src/Java/gtPlusPlus/core/item/chemistry/IonParticles.java b/src/Java/gtPlusPlus/core/item/chemistry/IonParticles.java
index ff5f67d2da..517a698e80 100644
--- a/src/Java/gtPlusPlus/core/item/chemistry/IonParticles.java
+++ b/src/Java/gtPlusPlus/core/item/chemistry/IonParticles.java
@@ -1,23 +1,42 @@
package gtPlusPlus.core.item.chemistry;
+import java.util.HashMap;
+import java.util.List;
+
import gregtech.api.enums.Materials;
import gtPlusPlus.core.item.base.misc.BaseItemParticle;
+import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.util.Utils;
+import net.minecraft.client.renderer.texture.IIconRegister;
+import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.EnumRarity;
import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.EnumChatFormatting;
+import net.minecraft.util.IIcon;
public class IonParticles extends BaseItemParticle {
+ public static HashMap<String, Integer> NameToMetaMap = new HashMap<String, Integer>();
+ public static HashMap<Integer, String> MetaToNameMap = new HashMap<Integer, String>();
+
+
public IonParticles() {
super("Ion", aElements.length, EnumRarity.rare);
}
private static final String[] aElements = new String[]{"Hydrogen", "Helium", "Lithium", "Beryllium", "Boron", "Carbon", "Nitrogen", "Oxygen", "Fluorine", "Neon", "Sodium", "Magnesium", "Aluminum", "Silicon", "Phosphorus", "Sulfur", "Chlorine", "Argon", "Potassium", "Calcium", "Scandium", "Titanium", "Vanadium", "Chromium", "Manganese", "Iron", "Cobalt", "Nickel", "Copper", "Zinc", "Gallium", "Germanium", "Arsenic", "Selenium", "Bromine", "Krypton", "Rubidium", "Strontium", "Yttrium", "Zirconium", "Niobium", "Molybdenum", "Technetium", "Ruthenium", "Rhodium", "Palladium", "Silver", "Cadmium", "Indium", "Tin", "Antimony", "Tellurium", "Iodine", "Xenon", "Cesium", "Barium", "Lanthanum", "Cerium", "Praseodymium", "Neodymium", "Promethium", "Samarium", "Europium", "Gadolinium", "Terbium", "Dysprosium", "Holmium", "Erbium", "Thulium", "Ytterbium", "Lutetium", "Hafnium", "Tantalum", "Tungsten", "Rhenium", "Osmium", "Iridium", "Platinum", "Gold", "Mercury", "Thallium", "Lead", "Bismuth", "Polonium", "Astatine", "Radon", "Francium", "Radium", "Actinium", "Thorium", "Protactinium", "Uranium", "Neptunium", "Plutonium", "Americium", "Curium", "Berkelium", "Californium", "Einsteinium", "Fermium", "Mendelevium", "Nobelium", "Lawrencium", "Rutherfordium", "Dubnium", "Seaborgium", "Bohrium", "Hassium", "Meitnerium", "Darmstadtium", "Roentgenium", "Copernicium", "Nihonium", "Flerovium", "Moscovium", "Livermorium", "Tennessine", "Oganesson"};
+
+ public static IIcon[] overlays = new IIcon[aElements.length];
+ public static IIcon baseTexture;
static {
//Generate Ions
int key = 0;
for (String s : aElements) {
+ //Map names to Meta
+ NameToMetaMap.put(Utils.sanitizeString(s.toLowerCase()), key);
+ MetaToNameMap.put(key, Utils.sanitizeString(s.toLowerCase()));
Materials m = Materials.get(s);
int aColour = 0;
if (m == null) {
@@ -45,5 +64,103 @@ public class IonParticles extends BaseItemParticle {
public String getUnlocalizedName(final ItemStack itemStack) {
return "item.particle.ion" + "." + aElements[itemStack.getItemDamage()];
}
+
+ private static boolean createNBT(ItemStack rStack){
+ final NBTTagCompound tagMain = new NBTTagCompound();
+ final NBTTagCompound tagNBT = new NBTTagCompound();
+ tagNBT.setLong("Charge", 0);
+ tagMain.setTag("Ion", tagNBT);
+ rStack.setTagCompound(tagMain);
+ return true;
+ }
+
+ public static final long getChargeState(final ItemStack aStack) {
+ NBTTagCompound aNBT = aStack.getTagCompound();
+ if (aNBT != null) {
+ aNBT = aNBT.getCompoundTag("Ion");
+ if (aNBT != null) {
+ return aNBT.getLong("Charge");
+ }
+ }
+ else {
+ createNBT(aStack);
+ }
+ return 0L;
+ }
+
+ public static final boolean setChargeState(final ItemStack aStack, final long aCharge) {
+ NBTTagCompound aNBT = aStack.getTagCompound();
+ if (aNBT != null) {
+ aNBT = aNBT.getCompoundTag("Ion");
+ if (aNBT != null) {
+ aNBT.setLong("Charge", aCharge);
+ return true;
+ }
+ }
+ return false;
+ }
+
+ @Override
+ public double getDurabilityForDisplay(ItemStack stack) {
+ if (stack.getTagCompound() == null){
+ createNBT(stack);
+ }
+ double chargeState = getChargeState(stack);
+ return chargeState;
+ }
+
+ @Override
+ public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool) {
+ long aCharge = getChargeState(stack);
+ String aState = EnumChatFormatting.YELLOW+"Unknown"+EnumChatFormatting.GRAY;
+ //State not set
+ if (aCharge == 0) {
+ list.add(EnumChatFormatting.GRAY+"A "+MetaToNameMap.get(stack.getItemDamage())+" Ion with an "+aState+" charge state");
+ }
+ else {
+ if (aCharge > 0) {
+ aState = EnumChatFormatting.GREEN+"Positive"+EnumChatFormatting.GRAY;
+ }
+ else {
+ aState = EnumChatFormatting.RED+"Negative"+EnumChatFormatting.GRAY;
+ }
+
+ list.add(EnumChatFormatting.GRAY+"A "+MetaToNameMap.get(stack.getItemDamage())+" Ion with a "+aState+" charge state of "+aCharge+"");
+ }
+ super.addInformation(stack, player, list, bool);
+ }
+
+ @Override
+ public void registerIcons(IIconRegister reg) {
+ for (int i = 0; i < IonParticles.overlays.length; i++) {
+ IonParticles.overlays[i] = reg.registerIcon(CORE.MODID + ":" + "ion/"+i);
+ }
+ IonParticles.baseTexture = reg.registerIcon(CORE.MODID + ":" + "ion/IonBase");
+ }
+
+ @Override
+ public IIcon getIconFromDamage(int meta) {
+ return IonParticles.overlays[meta];
+ }
+
+ @Override
+ public boolean requiresMultipleRenderPasses() {
+ return true;
+ }
+
+ @Override
+ public IIcon getIconFromDamageForRenderPass(int aMeta, int aPass) {
+ if (aPass == 0) {
+ return IonParticles.baseTexture;
+ }
+ else {
+ return IonParticles.overlays[aMeta];
+ }
+ }
+
+ @Override
+ public int getRenderPasses(int metadata) {
+ return 2;
+ }
}
diff --git a/src/Java/gtPlusPlus/core/item/chemistry/RocketFuels.java b/src/Java/gtPlusPlus/core/item/chemistry/RocketFuels.java
index 9bd8a521ab..a516cb0639 100644
--- a/src/Java/gtPlusPlus/core/item/chemistry/RocketFuels.java
+++ b/src/Java/gtPlusPlus/core/item/chemistry/RocketFuels.java
@@ -404,7 +404,7 @@ public class RocketFuels {
480);
ItemStack aCell11dimethylhydrazine = ItemUtils.getItemStackOfAmountFromOreDict("cell1,1Dimethylhydrazine", 2);
- if (aCell11dimethylhydrazine != null && aCell11dimethylhydrazine.getItem() != ModItems.AAA_Broken) {
+ if (ItemUtils.checkForInvalidItems(aCell11dimethylhydrazine)) {
GT_Values.RA.addCentrifugeRecipe(
CI.getNumberedCircuit(23),
aCell11dimethylhydrazine,
diff --git a/src/Java/gtPlusPlus/core/item/chemistry/StandardBaseParticles.java b/src/Java/gtPlusPlus/core/item/chemistry/StandardBaseParticles.java
index dd07d41b3d..1e833a7b00 100644
--- a/src/Java/gtPlusPlus/core/item/chemistry/StandardBaseParticles.java
+++ b/src/Java/gtPlusPlus/core/item/chemistry/StandardBaseParticles.java
@@ -1,15 +1,26 @@
package gtPlusPlus.core.item.chemistry;
-import gregtech.api.enums.Materials;
+import java.util.HashMap;
+import java.util.List;
+
+import gtPlusPlus.api.objects.data.AutoMap;
import gtPlusPlus.core.item.base.misc.BaseItemParticle;
+import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.material.Particle;
import gtPlusPlus.core.material.Particle.ElementaryGroup;
import gtPlusPlus.core.util.Utils;
+import net.minecraft.client.renderer.texture.IIconRegister;
+import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.EnumRarity;
import net.minecraft.item.ItemStack;
+import net.minecraft.util.EnumChatFormatting;
+import net.minecraft.util.IIcon;
public class StandardBaseParticles extends BaseItemParticle {
+ public static HashMap<String, Integer> NameToMetaMap = new HashMap<String, Integer>();
+ public static HashMap<Integer, String> MetaToNameMap = new HashMap<Integer, String>();
+
public StandardBaseParticles() {
super("Base", aTypes.length, EnumRarity.rare);
}
@@ -17,13 +28,19 @@ public class StandardBaseParticles extends BaseItemParticle {
private static final String[] aTypes = new String[] { "Graviton", "Up", "Down", "Charm", "Strange", "Top",
"Bottom", "Electron", "Electron Neutrino", "Muon", "Muon Neutrino", "Tau", "Tau Neutrino", "Gluon",
"Photon", "Z Boson", "W Boson", "Higgs Boson", "Proton", "Neutron", "Lambda", "Omega", "Pion",
- "ETA Meson", };
+ "ETA Meson", "Unknown" };
+
+ public IIcon[] icons = new IIcon[aTypes.length];
static {
//Generate Ions
int key = 0;
+
+
for (String s : aTypes) {
- Particle p;
+ //Map names to Meta
+ NameToMetaMap.put(Utils.sanitizeString(s.toLowerCase()), key);
+ MetaToNameMap.put(key, Utils.sanitizeString(s.toLowerCase()));
for (Particle o : Particle.aMap) {
int aColour = 0;
if (o.mParticleName.toLowerCase().equals(s.toLowerCase())) {
@@ -73,5 +90,72 @@ public class StandardBaseParticles extends BaseItemParticle {
public String getUnlocalizedName(final ItemStack itemStack) {
return "item.particle.base" + "." + aTypes[itemStack.getItemDamage()];
}
+
+ public static Particle getParticle(ItemStack aStack) {
+ AutoMap<Particle> g = Particle.aMap;
+ for (Particle p : g) {
+ String aPartName = Utils.sanitizeString(p.mParticleName.toLowerCase());
+ String expectedPart = Utils.sanitizeString(aTypes[aStack.getItemDamage()].toLowerCase());
+ if (aPartName.equals(expectedPart)) {
+ return p;
+ }
+ }
+ return Particle.UNKNOWN;
+ }
+
+ @Override
+ public int getColorFromItemStack(final ItemStack stack, final int HEX_OxFFFFFF) {
+ //return Utils.rgbtoHexValue(200, 200, 200);
+ return super.getColorFromParentClass(stack, HEX_OxFFFFFF);
+ }
+
+ @SuppressWarnings({ "rawtypes", "unchecked" })
+ @Override
+ public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool) {
+ Particle aCharge = getParticle(stack);
+ EnumChatFormatting aColour = EnumChatFormatting.GRAY;
+ String aState = aColour+"Unknown"+EnumChatFormatting.RESET;
+ if (aCharge != null) {
+ String aGroup = aCharge.mParticleType.name().toLowerCase();
+ if (aGroup.toLowerCase().contains("quark")) {
+ aColour = EnumChatFormatting.LIGHT_PURPLE;
+ }
+ else if (aGroup.toLowerCase().contains("lepton")) {
+ aColour = EnumChatFormatting.GREEN;
+ }
+ else if (aCharge == Particle.HIGGS_BOSON) {
+ aColour = EnumChatFormatting.YELLOW;
+ }
+ else if (aGroup.toLowerCase().contains("boson")) {
+ aColour = EnumChatFormatting.RED;
+ }
+ else if (aGroup.toLowerCase().contains("baryon")) {
+ aColour = EnumChatFormatting.BLUE;
+ }
+ else if (aGroup.toLowerCase().contains("meson")) {
+ aColour = EnumChatFormatting.WHITE;
+ }
+ else {
+ aColour = EnumChatFormatting.GRAY;
+ }
+ String aFirstLet = aGroup.substring(0, 1).toUpperCase();
+ aGroup = aGroup.replaceFirst(aGroup.substring(0, 1), aFirstLet);
+ aState = aColour+aGroup+EnumChatFormatting.RESET;
+ list.add(EnumChatFormatting.GRAY + "Type: "+aState);
+ }
+ super.addInformation(stack, player, list, bool);
+ }
+
+ @Override
+ public void registerIcons(IIconRegister reg) {
+ for (int i = 0; i < this.icons.length; i++) {
+ this.icons[i] = reg.registerIcon(CORE.MODID + ":" + "particle/"+i);
+ }
+ }
+
+ @Override
+ public IIcon getIconFromDamage(int meta) {
+ return this.icons[meta];
+ }
}
diff --git a/src/Java/gtPlusPlus/core/item/general/BufferCore.java b/src/Java/gtPlusPlus/core/item/general/BufferCore.java
index d3c7d5112f..9b00d3d034 100644
--- a/src/Java/gtPlusPlus/core/item/general/BufferCore.java
+++ b/src/Java/gtPlusPlus/core/item/general/BufferCore.java
@@ -4,7 +4,7 @@ import java.util.List;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
-
+import gregtech.api.enums.GT_Values;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
@@ -21,7 +21,7 @@ public class BufferCore extends BaseItemWithDamageValue{
public BufferCore(final String unlocalizedName, final int i) {
super(unlocalizedName+i);
this.setTextureName(CORE.MODID + ":" + unlocalizedName);
- this.setMaxStackSize(2);
+ this.setMaxStackSize(32);
this.coreTier = i;
}
@@ -40,7 +40,7 @@ public class BufferCore extends BaseItemWithDamageValue{
@SuppressWarnings({ "unchecked", "rawtypes" })
@Override
public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) {
- list.add(EnumChatFormatting.GRAY+"A key crafting component for making energy buffers.");
+ list.add(EnumChatFormatting.GRAY+"A key crafting component for "+GT_Values.VN[this.coreTier-1]+" Applicances");
}
public final int getCoreTier() {
@@ -48,51 +48,25 @@ public class BufferCore extends BaseItemWithDamageValue{
}
@Override
- public int getColorFromItemStack(final ItemStack stack, int HEX_OxFFFFFF) {
- //Figure Out Damage
- final String s = String.format("%X", HEX_OxFFFFFF);
- //Utils.LOG_INFO(s);
- //String rgb = Utils.hex2Rgb(s);
- //Utils.LOG_INFO(rgb);
- if (this.coreTier == 1){
- HEX_OxFFFFFF = 0x4d4d4d;
- }
- else if (this.coreTier == 2){
- HEX_OxFFFFFF = 0x666666;
- }
- else if (this.coreTier == 3){
- HEX_OxFFFFFF = 0x8c8c8c;
- }
- else if (this.coreTier == 4){
- HEX_OxFFFFFF = 0xa6a6a6;
- }
- else if (this.coreTier == 5){
- HEX_OxFFFFFF = 0xcccccc;
- }
- else if (this.coreTier == 6){
- HEX_OxFFFFFF = 0xe6e6e6;
- }
- else if (this.coreTier == 7){
- HEX_OxFFFFFF = 0xffffcc;
- }
- else if (this.coreTier == 8){
- HEX_OxFFFFFF = 0xace600;
- }
- else if (this.coreTier == 9){
- HEX_OxFFFFFF = 0xffff00;
- }
- /*else if (coreTier == 10){
- HEX_OxFFFFFF = 0xff0000;
- }*/
- else if (this.coreTier == 10){
- HEX_OxFFFFFF = Utils.rgbtoHexValue(MathUtils.randInt(220, 250), MathUtils.randInt(221, 251), MathUtils.randInt(220, 250));
- }
- else {
- HEX_OxFFFFFF = 0xffffff;
- }
+ public int getColorFromItemStack(final ItemStack stack, int HEX_OxFFFFFF) {
+ int[] mTierTypes = new int[] {
+ Utils.rgbtoHexValue(200, 180, 180),
+ Utils.rgbtoHexValue(142, 153, 161),
+ Utils.rgbtoHexValue(230, 121, 75),
+ Utils.rgbtoHexValue(215, 156, 70),
+ Utils.rgbtoHexValue(97, 97, 96), //EV
+ Utils.rgbtoHexValue(202, 202, 201),
+ Utils.rgbtoHexValue(247, 159, 157),
+ Utils.rgbtoHexValue(181, 223, 223),
+ Utils.rgbtoHexValue(187, 219, 185),
+ };
+
+ if (this.coreTier == 10){
+ return Utils.rgbtoHexValue(MathUtils.randInt(220, 250), MathUtils.randInt(221, 251), MathUtils.randInt(220, 250));
+ }
- return HEX_OxFFFFFF;
+ return mTierTypes[this.coreTier-1];
}
}
diff --git a/src/Java/gtPlusPlus/core/item/general/ItemControlCore.java b/src/Java/gtPlusPlus/core/item/general/ItemControlCore.java
index 8ad87c0ea8..eb22f8fa07 100644
--- a/src/Java/gtPlusPlus/core/item/general/ItemControlCore.java
+++ b/src/Java/gtPlusPlus/core/item/general/ItemControlCore.java
@@ -4,10 +4,13 @@ import java.util.List;
import cpw.mods.fml.common.registry.GameRegistry;
import gregtech.api.GregTech_API;
+import gregtech.api.enums.GT_Values;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
+import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
+import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.IIcon;
import gtPlusPlus.core.lib.CORE;
@@ -57,6 +60,14 @@ public class ItemControlCore extends Item {
public String getUnlocalizedName(ItemStack stack) {
return this.getUnlocalizedName() + "_" + stack.getItemDamage();
}
+
+ @SuppressWarnings({ "unchecked", "rawtypes" })
+ @Override
+ public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) {
+ list.add(EnumChatFormatting.GRAY+"Allows a Multiblock to function upto "+GT_Values.VN[stack.getItemDamage()]+"");
+ list.add(EnumChatFormatting.GRAY+"Required Tier is determined by the sum of the eu/t of all Energy Inputs");
+ list.add(EnumChatFormatting.GRAY+"Lower tiers may be used to underclock, which is useful in some situations");
+ }
@Override
public String getItemStackDisplayName(final ItemStack tItem) {
diff --git a/src/Java/gtPlusPlus/core/material/Material.java b/src/Java/gtPlusPlus/core/material/Material.java
index 1ee02a2654..03e50aa7dd 100644
--- a/src/Java/gtPlusPlus/core/material/Material.java
+++ b/src/Java/gtPlusPlus/core/material/Material.java
@@ -753,7 +753,7 @@ public class Material {
}
}
//Logger.MATERIALS("Unabled to find \"" + aKey + this.unlocalizedName + "\"");
- return ItemUtils.getErrorStack(stacksize);
+ return ItemUtils.getErrorStack(stacksize, (aKey + this.unlocalizedName+" x"+stacksize));
}
}
diff --git a/src/Java/gtPlusPlus/core/material/Particle.java b/src/Java/gtPlusPlus/core/material/Particle.java
index 6cc0f878d6..e93129ec58 100644
--- a/src/Java/gtPlusPlus/core/material/Particle.java
+++ b/src/Java/gtPlusPlus/core/material/Particle.java
@@ -1,6 +1,11 @@
package gtPlusPlus.core.material;
import gtPlusPlus.api.objects.data.AutoMap;
+import gtPlusPlus.core.item.ModItems;
+import gtPlusPlus.core.item.chemistry.IonParticles;
+import gtPlusPlus.core.util.Utils;
+import gtPlusPlus.core.util.minecraft.ItemUtils;
+import net.minecraft.item.ItemStack;
public class Particle {
@@ -34,6 +39,8 @@ public class Particle {
public static final Particle PION;
public static final Particle ETA_MESON;
+ public static final Particle UNKNOWN;
+
public static final AutoMap<Particle> aMap = new AutoMap<Particle>();
static {
@@ -80,7 +87,11 @@ public class Particle {
//Mesons
PION = new Particle(ElementaryGroup.MESON, "Pion", new Particle[] {MUON, MUON_NEUTRINO});
- ETA_MESON = new Particle(ElementaryGroup.MESON, "ETA Meson", new Particle[] {PION, PION, PION});
+ ETA_MESON = new Particle(ElementaryGroup.MESON, "ETA Meson", new Particle[] {PION, PION, PION});
+
+
+ //Wildcard
+ UNKNOWN = new Particle(ElementaryGroup.UNKNOWN, "Unknown");
}
@@ -89,7 +100,8 @@ public class Particle {
LEPTON,
BOSON,
BARYON,
- MESON;
+ MESON,
+ UNKNOWN;
}
public final ElementaryGroup mParticleType;
@@ -107,4 +119,35 @@ public class Particle {
aMap.put(this);
}
+
+ public static ItemStack getIon(String aElementName, int aCharge) {
+ for (String g : gtPlusPlus.core.item.chemistry.IonParticles.NameToMetaMap.keySet()) {
+ if (g.toLowerCase().equals(Utils.sanitizeString(aElementName.toLowerCase()))){
+ Integer meta = gtPlusPlus.core.item.chemistry.IonParticles.NameToMetaMap.get(Utils.sanitizeString(aElementName.toLowerCase()));
+ if (meta == null) {
+ meta = 0;
+ }
+ ItemStack aIon = ItemUtils.simpleMetaStack(ModItems.itemIonParticleBase, meta, 1);
+ if (aCharge != 0) {
+ IonParticles.setChargeState(aIon, aCharge);
+ }
+ return aIon;
+ }
+ }
+ return null;
+ }
+
+ public static ItemStack getBaseParticle(Particle aParticle) {
+ String aPartName = Utils.sanitizeString(aParticle.mParticleName.toLowerCase());
+ for (String g : gtPlusPlus.core.item.chemistry.StandardBaseParticles.NameToMetaMap.keySet()) {
+ if (g.toLowerCase().equals(aPartName)){
+ Integer meta = gtPlusPlus.core.item.chemistry.StandardBaseParticles.NameToMetaMap.get(aPartName);
+ if (meta == null) {
+ meta = 0;
+ }
+ return ItemUtils.simpleMetaStack(ModItems.itemStandarParticleBase, meta, 1);
+ }
+ }
+ return null;
+ }
}
diff --git a/src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java b/src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java
index e2c69277f6..627c171a00 100644
--- a/src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java
+++ b/src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java
@@ -1,22 +1,25 @@
package gtPlusPlus.core.recipe;
-import net.minecraft.init.Blocks;
-import net.minecraft.init.Items;
-import net.minecraft.item.ItemStack;
-
-import static gtPlusPlus.core.util.minecraft.ItemUtils.getSimpleStack;
-
import gregtech.api.GregTech_API;
-import gregtech.api.enums.*;
-import gregtech.api.util.*;
-
+import gregtech.api.enums.ConfigCategories;
+import gregtech.api.enums.GT_Values;
+import gregtech.api.enums.ItemList;
+import gregtech.api.enums.Materials;
+import gregtech.api.enums.OrePrefixes;
+import gregtech.api.util.GT_ModHandler;
+import gregtech.api.util.GT_OreDictUnificator;
+import gregtech.api.util.GT_Utility;
+import gregtech.api.util.HotFuel;
+import gregtech.api.util.ThermalFuel;
import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.block.ModBlocks;
import gtPlusPlus.core.item.ModItems;
+import gtPlusPlus.core.item.chemistry.IonParticles;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.lib.LoadedMods;
import gtPlusPlus.core.material.ALLOY;
import gtPlusPlus.core.material.ELEMENT;
+import gtPlusPlus.core.material.Particle;
import gtPlusPlus.core.material.nuclear.FLUORIDES;
import gtPlusPlus.core.material.nuclear.NUCLIDE;
import gtPlusPlus.core.recipe.common.CI;
@@ -25,10 +28,12 @@ import gtPlusPlus.core.util.minecraft.EnchantingUtils;
import gtPlusPlus.core.util.minecraft.FluidUtils;
import gtPlusPlus.core.util.minecraft.ItemUtils;
import gtPlusPlus.core.util.minecraft.MaterialUtils;
-import gtPlusPlus.core.util.minecraft.RecipeUtils;
import gtPlusPlus.core.util.reflect.AddGregtechRecipe;
import gtPlusPlus.everglades.dimension.Dimension_Everglades;
import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList;
+import net.minecraft.init.Blocks;
+import net.minecraft.init.Items;
+import net.minecraft.item.ItemStack;
import net.minecraftforge.fluids.FluidStack;
public class RECIPES_GREGTECH {
@@ -70,9 +75,42 @@ public class RECIPES_GREGTECH {
extruderRecipes();
cuttingSawRecipes();
breweryRecipes();
+ laserEngraverRecipes();
addFuels();
}
+ private static void laserEngraverRecipes() {
+
+ GT_Values.RA.addLaserEngraverRecipe(
+ GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Tungsten, 6L),
+ GregtechItemList.Laser_Lens_Special.get(0),
+ ELEMENT.STANDALONE.CELESTIAL_TUNGSTEN.getDust(1),
+ 20 * 60 * 3,
+ MaterialUtils.getVoltageForTier(ELEMENT.STANDALONE.CELESTIAL_TUNGSTEN.vTier));
+
+ GT_Values.RA.addLaserEngraverRecipe(
+ GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Titanium, 8L),
+ GregtechItemList.Laser_Lens_Special.get(0),
+ ELEMENT.STANDALONE.ASTRAL_TITANIUM.getDust(1),
+ 20 * 60 * 2,
+ MaterialUtils.getVoltageForTier(ELEMENT.STANDALONE.ASTRAL_TITANIUM.vTier));
+
+ GT_Values.RA.addLaserEngraverRecipe(
+ ALLOY.NITINOL_60.getBlock(2),
+ GregtechItemList.Laser_Lens_Special.get(0),
+ ELEMENT.STANDALONE.ADVANCED_NITINOL.getBlock(1),
+ 20 * 60 * 1,
+ MaterialUtils.getVoltageForTier(ELEMENT.STANDALONE.ADVANCED_NITINOL.vTier));
+
+ GT_Values.RA.addLaserEngraverRecipe(
+ GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Glass, 64L),
+ GregtechItemList.Laser_Lens_Special.get(0),
+ ELEMENT.STANDALONE.CHRONOMATIC_GLASS.getDust(1),
+ 20 * 60 * 5,
+ MaterialUtils.getVoltageForTier(ELEMENT.STANDALONE.CHRONOMATIC_GLASS.vTier));
+
+ }
+
private static void breweryRecipes() {
CORE.RA.addBrewingRecipe(14, EnchantingUtils.getMobEssence(100), EnchantingUtils.getLiquidXP(1332), 100, 120, false);
CORE.RA.addBrewingRecipe(14, EnchantingUtils.getLiquidXP(1332), EnchantingUtils.getMobEssence(100), 100, 120, false);
@@ -481,10 +519,9 @@ public class RECIPES_GREGTECH {
}
// Calcium Hydroxide
- if ((ItemUtils.getItemStackOfAmountFromOreDict("dustQuicklime", 1).getItem() != ModItems.AAA_Broken)
- || LoadedMods.IHL) {
+ if ((ItemUtils.checkForInvalidItems(ItemUtils.getItemStackOfAmountFromOreDict("dustQuicklime", 1))) || LoadedMods.IHL) {
try {
-
+
CORE.RA.addDehydratorRecipe(
new ItemStack[] { ItemUtils.getItemStackOfAmountFromOreDict("dustQuicklime", 10) }, // Item
FluidUtils.getFluidStack("water", 10000), // Fluid input
@@ -1261,39 +1298,218 @@ public class RECIPES_GREGTECH {
//Polonium
CORE.RA.addCyclotronRecipe(CI.getNumberedCircuit(0), FluidUtils.getFluidStack("molten.bismuth", 1),
- new ItemStack[] { GregtechItemList.Pellet_RTG_PO210.get(1) }, null, new int[] { 100 }, 20 * 300, 2040,
+ new ItemStack[] { GregtechItemList.Pellet_RTG_PO210.get(1) }, null, new int[] { 100 }, 20 * 300 * 100, 2040,
500 * 20);
//Americium
CORE.RA.addCyclotronRecipe(CI.getNumberedCircuit(0), FluidUtils.getFluidStack("molten.americium", 1),
- new ItemStack[] { GregtechItemList.Pellet_RTG_AM241.get(4) }, null, new int[] { 2500 }, 20 * 300, 1020,
+ new ItemStack[] { GregtechItemList.Pellet_RTG_AM241.get(4) }, null, new int[] { 2500 }, 20 * 300 * 100, 1020,
500 * 20); //PO Special Value
//Strontium u235
CORE.RA.addCyclotronRecipe(CI.getNumberedCircuit(0), FluidUtils.getFluidStack("molten.uranium235", 10),
- new ItemStack[] { GregtechItemList.Pellet_RTG_SR90.get(1) }, null, new int[] { 570 }, 20 * 300, 1020,
+ new ItemStack[] { GregtechItemList.Pellet_RTG_SR90.get(1) }, null, new int[] { 570 }, 20 * 300 * 100, 1020,
500 * 20); //PO Special Value
//Strontium u233
CORE.RA.addCyclotronRecipe(CI.getNumberedCircuit(0), FluidUtils.getFluidStack("molten.uranium233", 10),
- new ItemStack[] { GregtechItemList.Pellet_RTG_SR90.get(1) }, null, new int[] { 660 }, 20 * 300, 1020,
+ new ItemStack[] { GregtechItemList.Pellet_RTG_SR90.get(1) }, null, new int[] { 660 }, 20 * 300 * 100, 1020,
500 * 20); //PO Special Value
//Strontium pu239
CORE.RA.addCyclotronRecipe(CI.getNumberedCircuit(0), FluidUtils.getFluidStack("molten.plutonium239", 10),
- new ItemStack[] { GregtechItemList.Pellet_RTG_SR90.get(1) }, null, new int[] { 220 }, 20 * 300, 1020,
+ new ItemStack[] { GregtechItemList.Pellet_RTG_SR90.get(1) }, null, new int[] { 220 }, 20 * 300 * 100, 1020,
500 * 20); //PO Special Value
//Plutonium
CORE.RA.addCyclotronRecipe(CI.getNumberedCircuit(0), FluidUtils.getFluidStack("molten.plutonium238", 1),
- new ItemStack[] { GregtechItemList.Pellet_RTG_PU238.get(2) }, null, new int[] { 780 }, 20 * 300, 1020,
+ new ItemStack[] { GregtechItemList.Pellet_RTG_PU238.get(2) }, null, new int[] { 780 }, 20 * 300 * 100, 1020,
500 * 20); //PO Special Value
-
//Neptunium
CORE.RA.addCyclotronRecipe(new ItemStack[] {ELEMENT.getInstance().URANIUM238.getDust(1) }, FluidUtils.getFluidStack("deuterium", 400),
+ new ItemStack[] {ItemUtils.getSimpleStack(ModItems.dustNeptunium238)}, null, new int[] { 500 }, 20 * 5, 500,
+ 500 * 20); //PO Special Value
+
+
+ /**
+ * Particle Science
+ */
+
+
+ // Quark Smash
+ CORE.RA.addCyclotronRecipe(
+ CI.getNumberedCircuit(3),
+ FluidUtils.getFluidStack("plasma.hydrogen", 1000),
+ new ItemStack[] {
+ Particle.getBaseParticle(Particle.UP),
+ Particle.getBaseParticle(Particle.DOWN),
+ Particle.getBaseParticle(Particle.CHARM),
+ Particle.getBaseParticle(Particle.STRANGE),
+ Particle.getBaseParticle(Particle.TOP),
+ Particle.getBaseParticle(Particle.BOTTOM),
+ },
+ null,
+ new int[] { 50, 50, 50, 50, 50, 50 },
+ 20 * 300 * 38,
+ (int) GT_Values.V[7],
+ 750 * 20);
+
+ // Lepton Smash
+ CORE.RA.addCyclotronRecipe(
+ CI.getNumberedCircuit(6),
+ FluidUtils.getFluidStack("plasma.helium", 1500),
+ new ItemStack[] {
+ Particle.getBaseParticle(Particle.ELECTRON),
+ Particle.getBaseParticle(Particle.MUON),
+ Particle.getBaseParticle(Particle.TAU),
+ Particle.getBaseParticle(Particle.ELECTRON_NEUTRINO),
+ Particle.getBaseParticle(Particle.MUON_NEUTRINO),
+ Particle.getBaseParticle(Particle.TAU_NEUTRINO),
+ },
+ null,
+ new int[] { 60, 40, 20, 15, 10, 5 },
+ 20 * 300 * 38,
+ (int) GT_Values.V[7],
+ 750 * 20);
+
+ //Boson Smash
+ CORE.RA.addCyclotronRecipe(
+ CI.getNumberedCircuit(9),
+ FluidUtils.getFluidStack("plasma.helium", 1500),
+ new ItemStack[] {
+ Particle.getBaseParticle(Particle.GLUON),
+ Particle.getBaseParticle(Particle.PHOTON),
+ Particle.getBaseParticle(Particle.Z_BOSON),
+ Particle.getBaseParticle(Particle.W_BOSON),
+ Particle.getBaseParticle(Particle.HIGGS_BOSON),
+ },
+ null,
+ new int[] { 60, 60, 50, 50, 1 },
+ 20 * 300 * 38,
+ (int) GT_Values.V[7],
+ 750 * 20);
+
+
+ // Mixed Smash 1
+ CORE.RA.addCyclotronRecipe(
+ CI.getNumberedCircuit(12),
+ FluidUtils.getFluidStack("plasma.beryllium", 2500),
+ new ItemStack[] {
+ Particle.getBaseParticle(Particle.GRAVITON),
+ Particle.getBaseParticle(Particle.UP),
+ Particle.getBaseParticle(Particle.DOWN),
+ Particle.getBaseParticle(Particle.CHARM),
+ Particle.getBaseParticle(Particle.STRANGE),
+ Particle.getBaseParticle(Particle.TOP),
+ Particle.getBaseParticle(Particle.BOTTOM),
+ Particle.getBaseParticle(Particle.ELECTRON),
+ Particle.getBaseParticle(Particle.MUON),
+ Particle.getBaseParticle(Particle.TAU),
+ Particle.getBaseParticle(Particle.ELECTRON_NEUTRINO),
+ Particle.getBaseParticle(Particle.MUON_NEUTRINO),
+ Particle.getBaseParticle(Particle.TAU_NEUTRINO),
+ Particle.getBaseParticle(Particle.GLUON),
+ Particle.getBaseParticle(Particle.PHOTON),
+ Particle.getBaseParticle(Particle.Z_BOSON),
+ Particle.getBaseParticle(Particle.W_BOSON),
+ Particle.getBaseParticle(Particle.HIGGS_BOSON),
+ },
+ null,
+ new int[] { 5, 20, 20, 20, 20, 20, 20, 15, 15, 15, 10, 10, 10, 40, 40, 40, 40, 1 },
+ 20 * 300 * 134,
+ (int) GT_Values.V[8],
+ 750 * 20);
+
+ //Graviton Smash
+ CORE.RA.addCyclotronRecipe(
+ CI.getNumberedCircuit(15),
+ FluidUtils.getFluidStack("plasma.hydrogen", 10),
+ new ItemStack[] {
+ Particle.getBaseParticle(Particle.GRAVITON),
+ Particle.getBaseParticle(Particle.UNKNOWN)
+ },
+ null,
+ new int[] {15, 1000},
+ 20 * 30,
+ (int) GT_Values.V[6],
+ 1000 * 20);
+
+ //Quantum Anomaly
+ CORE.RA.addCyclotronRecipe(
+ new ItemStack[] {
+ CI.getNumberedCircuit(24),
+ Particle.getBaseParticle(Particle.UNKNOWN),
+ },
+ FluidUtils.getFluidStack("plasma.osmium", 3),
+ new ItemStack[] {
+ GregtechItemList.Laser_Lens_Special.get(1)
+ },
+ null,
+ new int[] {100},
+ 20 * 60,
+ (int) GT_Values.V[6],
+ 1000 * 20);
+
+ /*
+ * Ions
+ */
+
+ String[] aElementsTest = new String[] {
+ "Hydrogen", "Helium", "Lithium", "Beryllium", "Boron", "Carbon", "Nitrogen", "Oxygen", "Fluorine", "Neon", "Sodium", "Magnesium", "Aluminum", "Silicon", "Phosphorus", "Sulfur", "Chlorine", "Argon"
+ };
+
+ int IonCount = 2;
+ int tenCountA = 1;
+ int tenCountB = 0;
+ for (String y : IonParticles.MetaToNameMap.values()) {
+
+ if (tenCountB == 12) {
+ tenCountB = 0;
+ tenCountA++;
+ }
+ else {
+ tenCountB++;
+ }
+
+ FluidStack aPlasma = FluidUtils.getFluidStack("plasma."+y.toLowerCase(), 1);
+
+ // Ionize Plasma
+ if (aPlasma != null) {
+ CORE.RA.addCyclotronRecipe(
+ CI.getNumberedCircuit(1+(tenCountA-1)),
+ aPlasma,
+ new ItemStack[] {
+ Particle.getIon(y, 1),
+ Particle.getIon(y, 2),
+ Particle.getIon(y, 3),
+ Particle.getIon(y, -1),
+ Particle.getIon(y, -2),
+ Particle.getIon(y, -3),
+ Particle.getIon(y, 1),
+ Particle.getIon(y, 2),
+ Particle.getIon(y, -1),
+ },
+ null,
+ new int[] { 75, 50, 25, 75, 50, 25, 75, 50, 75},
+ 20 * 20 * (IonCount++) * tenCountA,
+ (int) GT_Values.V[7],
+ 1500 * 20 * tenCountA);
+ }
+ else {
+ Logger.INFO("Plasma for "+y+" does not exist, please report this to Alkalus.");
+ }
+ }
+
+
+
+
+
+ /*CORE.RA.addCyclotronRecipe(new ItemStack[] {ELEMENT.getInstance().URANIUM238.getDust(1) }, FluidUtils.getFluidStack("deuterium", 400),
ItemUtils.getSimpleStack(ModItems.dustNeptunium238), null, new int[] { 500 }, 20 * 5, 500,
500 * 20); //PO Special Value
+*/
+
}
diff --git a/src/Java/gtPlusPlus/core/recipe/RECIPES_Machines.java b/src/Java/gtPlusPlus/core/recipe/RECIPES_Machines.java
index 0040edfa99..27116ba125 100644
--- a/src/Java/gtPlusPlus/core/recipe/RECIPES_Machines.java
+++ b/src/Java/gtPlusPlus/core/recipe/RECIPES_Machines.java
@@ -208,6 +208,7 @@ public class RECIPES_Machines {
private static void run(){
initModItems();
controlCores();
+ energyCores();
}
private static void initModItems(){
@@ -338,109 +339,7 @@ public class RECIPES_Machines {
8000);
- //Buffer Core
- RecipeUtils.addShapedGregtechRecipe(
- CI.component_Plate[1], cableTier1, CI.component_Plate[1],
- "circuitPrimitive", "plateStaballoy", "circuitPrimitive",
- CI.component_Plate[1], cableTier1, CI.component_Plate[1],
- RECIPE_BufferCore_ULV);
- RecipeUtils.addShapedGregtechRecipe(
- CI.component_Plate[2], cableTier2, CI.component_Plate[2],
- RECIPE_BufferCore_ULV, CI.machineHull_HV, RECIPE_BufferCore_ULV,
- CI.component_Plate[2], cableTier2, CI.component_Plate[2],
- RECIPE_BufferCore_LV);
- RecipeUtils.addShapedGregtechRecipe(
- CI.component_Plate[3], cableTier3, CI.component_Plate[3],
- RECIPE_BufferCore_LV, CI.circuitTier2, RECIPE_BufferCore_LV,
- CI.component_Plate[3], cableTier3, CI.component_Plate[3],
- RECIPE_BufferCore_MV);
- RecipeUtils.addShapedGregtechRecipe(
- CI.component_Plate[4], cableTier4, CI.component_Plate[4],
- RECIPE_BufferCore_MV, CI.circuitTier3, RECIPE_BufferCore_MV,
- CI.component_Plate[4], cableTier4, CI.component_Plate[4],
- RECIPE_BufferCore_HV);
- RecipeUtils.addShapedGregtechRecipe(
- CI.component_Plate[5], cableTier5, CI.component_Plate[5],
- RECIPE_BufferCore_HV, CI.circuitTier4, RECIPE_BufferCore_HV,
- CI.component_Plate[5], cableTier5, CI.component_Plate[5],
- RECIPE_BufferCore_EV);
- RecipeUtils.addShapedGregtechRecipe(
- CI.component_Plate[6], cableTier6, CI.component_Plate[6],
- RECIPE_BufferCore_EV, CI.circuitTier5, RECIPE_BufferCore_EV,
- CI.component_Plate[6], cableTier6, CI.component_Plate[6],
- RECIPE_BufferCore_IV);
- RecipeUtils.addShapedGregtechRecipe(
- CI.component_Plate[7], cableTier7, CI.component_Plate[7],
- RECIPE_BufferCore_IV, CI.circuitTier6, RECIPE_BufferCore_IV,
- CI.component_Plate[7], cableTier7, CI.component_Plate[7],
- RECIPE_BufferCore_LuV);
- RecipeUtils.addShapedGregtechRecipe(
- CI.component_Plate[8], cableTier8, CI.component_Plate[8],
- RECIPE_BufferCore_LuV, CI.circuitTier7, RECIPE_BufferCore_LuV,
- CI.component_Plate[8], cableTier8, CI.component_Plate[8],
- RECIPE_BufferCore_ZPM);
- RecipeUtils.addShapedGregtechRecipe(
- CI.component_Plate[9], cableTier9, CI.component_Plate[9],
- RECIPE_BufferCore_ZPM, CI.circuitTier8, RECIPE_BufferCore_ZPM,
- CI.component_Plate[9], cableTier9, CI.component_Plate[9],
- RECIPE_BufferCore_UV);
- RecipeUtils.addShapedGregtechRecipe(
- CI.component_Plate[10], cableTier10, CI.component_Plate[10],
- RECIPE_BufferCore_UV, CI.circuitTier9, RECIPE_BufferCore_UV,
- CI.component_Plate[10], cableTier10, CI.component_Plate[10],
- RECIPE_BufferCore_MAX);
-
-
- RecipeUtils.addShapedGregtechRecipe(
- wireTier1, RECIPE_BufferCore_ULV, wireTier1,
- wireTier1, CI.machineCasing_ULV, wireTier1,
- CI.circuitPrimitive, CI.circuitTier1, CI.circuitPrimitive,
- RECIPE_Buffer_ULV);
- RecipeUtils.addShapedGregtechRecipe(
- wireTier2, RECIPE_BufferCore_LV, wireTier2,
- wireTier2, CI.machineCasing_LV, wireTier2,
- CI.circuitTier1, RECIPE_BufferCore_LV, CI.circuitTier1,
- RECIPE_Buffer_LV);
- RecipeUtils.addShapedGregtechRecipe(
- wireTier3, RECIPE_BufferCore_MV, wireTier3,
- wireTier3, CI.machineCasing_MV, wireTier3,
- CI.circuitTier2, RECIPE_BufferCore_MV, CI.circuitTier2,
- RECIPE_Buffer_MV);
- RecipeUtils.addShapedGregtechRecipe(
- wireTier4, RECIPE_BufferCore_HV, wireTier4,
- wireTier4, CI.machineCasing_HV, wireTier4,
- CI.circuitTier3, RECIPE_BufferCore_HV, CI.circuitTier3,
- RECIPE_Buffer_HV);
- RecipeUtils.addShapedGregtechRecipe(
- wireTier5, RECIPE_BufferCore_EV, wireTier5,
- wireTier5, CI.machineCasing_EV, wireTier5,
- CI.circuitTier4, RECIPE_BufferCore_EV, CI.circuitTier4,
- RECIPE_Buffer_EV);
- RecipeUtils.addShapedGregtechRecipe(
- wireTier6, RECIPE_BufferCore_IV, wireTier6,
- wireTier6, CI.machineCasing_IV, wireTier6,
- CI.circuitTier5, RECIPE_BufferCore_IV, CI.circuitTier5,
- RECIPE_Buffer_IV);
- RecipeUtils.addShapedGregtechRecipe(
- wireTier7, RECIPE_BufferCore_LuV, wireTier7,
- wireTier7, CI.machineCasing_LuV, wireTier7,
- CI.circuitTier6, RECIPE_BufferCore_LuV, CI.circuitTier6,
- RECIPE_Buffer_LuV);
- RecipeUtils.addShapedGregtechRecipe(
- wireTier8, RECIPE_BufferCore_ZPM, wireTier8,
- wireTier8, CI.machineCasing_ZPM, wireTier8,
- CI.circuitTier7, RECIPE_BufferCore_ZPM, CI.circuitTier7,
- RECIPE_Buffer_ZPM);
- RecipeUtils.addShapedGregtechRecipe(
- wireTier9, RECIPE_BufferCore_UV, wireTier9,
- wireTier9, CI.machineCasing_UV, wireTier9,
- CI.circuitTier8, RECIPE_BufferCore_UV, CI.circuitTier8,
- RECIPE_Buffer_UV);
- RecipeUtils.addShapedGregtechRecipe(
- CI.component_Plate[11], RECIPE_BufferCore_MAX, CI.component_Plate[11],
- wireTier10, CI.machineCasing_MAX, wireTier10,
- CI.circuitTier9, RECIPE_BufferCore_MAX, CI.circuitTier9,
- RECIPE_Buffer_MAX);
+
//Steam Condenser
if (CORE.ConfigSwitches.enableMachine_SteamConverter ){
@@ -1702,6 +1601,175 @@ public class RECIPES_Machines {
aOutput[i],
60 * 20 * 1 * (i+1),
MaterialUtils.getVoltageForTier(i));
+ }
+ }
+
+ private static void energyCores() {
+
+ //Simpler Recipes for normal Players, Force assembly crafting in GTNH
+ if (!GTNH) {
+ //Buffer Core
+ /*RecipeUtils.addShapedGregtechRecipe(
+ CI.component_Plate[1], cableTier1, CI.component_Plate[1],
+ "circuitPrimitive", "plateStaballoy", "circuitPrimitive",
+ CI.component_Plate[1], cableTier1, CI.component_Plate[1],
+ RECIPE_BufferCore_ULV);
+ RecipeUtils.addShapedGregtechRecipe(
+ CI.component_Plate[2], cableTier2, CI.component_Plate[2],
+ RECIPE_BufferCore_ULV, CI.machineHull_HV, RECIPE_BufferCore_ULV,
+ CI.component_Plate[2], cableTier2, CI.component_Plate[2],
+ RECIPE_BufferCore_LV);
+ RecipeUtils.addShapedGregtechRecipe(
+ CI.component_Plate[3], cableTier3, CI.component_Plate[3],
+ RECIPE_BufferCore_LV, CI.circuitTier2, RECIPE_BufferCore_LV,
+ CI.component_Plate[3], cableTier3, CI.component_Plate[3],
+ RECIPE_BufferCore_MV);
+ RecipeUtils.addShapedGregtechRecipe(
+ CI.component_Plate[4], cableTier4, CI.component_Plate[4],
+ RECIPE_BufferCore_MV, CI.circuitTier3, RECIPE_BufferCore_MV,
+ CI.component_Plate[4], cableTier4, CI.component_Plate[4],
+ RECIPE_BufferCore_HV);
+ RecipeUtils.addShapedGregtechRecipe(
+ CI.component_Plate[5], cableTier5, CI.component_Plate[5],
+ RECIPE_BufferCore_HV, CI.circuitTier4, RECIPE_BufferCore_HV,
+ CI.component_Plate[5], cableTier5, CI.component_Plate[5],
+ RECIPE_BufferCore_EV);
+ RecipeUtils.addShapedGregtechRecipe(
+ CI.component_Plate[6], cableTier6, CI.component_Plate[6],
+ RECIPE_BufferCore_EV, CI.circuitTier5, RECIPE_BufferCore_EV,
+ CI.component_Plate[6], cableTier6, CI.component_Plate[6],
+ RECIPE_BufferCore_IV);
+ RecipeUtils.addShapedGregtechRecipe(
+ CI.component_Plate[7], cableTier7, CI.component_Plate[7],
+ RECIPE_BufferCore_IV, CI.circuitTier6, RECIPE_BufferCore_IV,
+ CI.component_Plate[7], cableTier7, CI.component_Plate[7],
+ RECIPE_BufferCore_LuV);
+ RecipeUtils.addShapedGregtechRecipe(
+ CI.component_Plate[8], cableTier8, CI.component_Plate[8],
+ RECIPE_BufferCore_LuV, CI.circuitTier7, RECIPE_BufferCore_LuV,
+ CI.component_Plate[8], cableTier8, CI.component_Plate[8],
+ RECIPE_BufferCore_ZPM);
+ RecipeUtils.addShapedGregtechRecipe(
+ CI.component_Plate[9], cableTier9, CI.component_Plate[9],
+ RECIPE_BufferCore_ZPM, CI.circuitTier8, RECIPE_BufferCore_ZPM,
+ CI.component_Plate[9], cableTier9, CI.component_Plate[9],
+ RECIPE_BufferCore_UV);
+ RecipeUtils.addShapedGregtechRecipe(
+ CI.component_Plate[10], cableTier10, CI.component_Plate[10],
+ RECIPE_BufferCore_UV, CI.circuitTier9, RECIPE_BufferCore_UV,
+ CI.component_Plate[10], cableTier10, CI.component_Plate[10],
+ RECIPE_BufferCore_MAX);*/
+
+
+ /*RecipeUtils.addShapedGregtechRecipe(
+ wireTier1, RECIPE_BufferCore_ULV, wireTier1,
+ wireTier1, CI.machineCasing_ULV, wireTier1,
+ CI.circuitPrimitive, CI.circuitTier1, CI.circuitPrimitive,
+ RECIPE_Buffer_ULV);
+ RecipeUtils.addShapedGregtechRecipe(
+ wireTier2, RECIPE_BufferCore_LV, wireTier2,
+ wireTier2, CI.machineCasing_LV, wireTier2,
+ CI.circuitTier1, RECIPE_BufferCore_LV, CI.circuitTier1,
+ RECIPE_Buffer_LV);
+ RecipeUtils.addShapedGregtechRecipe(
+ wireTier3, RECIPE_BufferCore_MV, wireTier3,
+ wireTier3, CI.machineCasing_MV, wireTier3,
+ CI.circuitTier2, RECIPE_BufferCore_MV, CI.circuitTier2,
+ RECIPE_Buffer_MV);
+ RecipeUtils.addShapedGregtechRecipe(
+ wireTier4, RECIPE_BufferCore_HV, wireTier4,
+ wireTier4, CI.machineCasing_HV, wireTier4,
+ CI.circuitTier3, RECIPE_BufferCore_HV, CI.circuitTier3,
+ RECIPE_Buffer_HV);
+ RecipeUtils.addShapedGregtechRecipe(
+ wireTier5, RECIPE_BufferCore_EV, wireTier5,
+ wireTier5, CI.machineCasing_EV, wireTier5,
+ CI.circuitTier4, RECIPE_BufferCore_EV, CI.circuitTier4,
+ RECIPE_Buffer_EV);
+ RecipeUtils.addShapedGregtechRecipe(
+ wireTier6, RECIPE_BufferCore_IV, wireTier6,
+ wireTier6, CI.machineCasing_IV, wireTier6,
+ CI.circuitTier5, RECIPE_BufferCore_IV, CI.circuitTier5,
+ RECIPE_Buffer_IV);
+ RecipeUtils.addShapedGregtechRecipe(
+ wireTier7, RECIPE_BufferCore_LuV, wireTier7,
+ wireTier7, CI.machineCasing_LuV, wireTier7,
+ CI.circuitTier6, RECIPE_BufferCore_LuV, CI.circuitTier6,
+ RECIPE_Buffer_LuV);
+ RecipeUtils.addShapedGregtechRecipe(
+ wireTier8, RECIPE_BufferCore_ZPM, wireTier8,
+ wireTier8, CI.machineCasing_ZPM, wireTier8,
+ CI.circuitTier7, RECIPE_BufferCore_ZPM, CI.circuitTier7,
+ RECIPE_Buffer_ZPM);
+ RecipeUtils.addShapedGregtechRecipe(
+ wireTier9, RECIPE_BufferCore_UV, wireTier9,
+ wireTier9, CI.machineCasing_UV, wireTier9,
+ CI.circuitTier8, RECIPE_BufferCore_UV, CI.circuitTier8,
+ RECIPE_Buffer_UV);
+ RecipeUtils.addShapedGregtechRecipe(
+ CI.component_Plate[11], RECIPE_BufferCore_MAX, CI.component_Plate[11],
+ wireTier10, CI.machineCasing_MAX, wireTier10,
+ CI.circuitTier9, RECIPE_BufferCore_MAX, CI.circuitTier9,
+ RECIPE_Buffer_MAX);*/
+ }
+
+
+ ItemStack[] aBufferOutput = new ItemStack[] {
+ RECIPE_Buffer_ULV, RECIPE_Buffer_LV, RECIPE_Buffer_MV,
+ RECIPE_Buffer_HV, RECIPE_Buffer_EV, RECIPE_Buffer_IV,
+ RECIPE_Buffer_LuV, RECIPE_Buffer_ZPM, RECIPE_Buffer_UV, RECIPE_Buffer_MAX };
+
+
+
+ ItemStack[] aOutput = new ItemStack[] {
+ ItemUtils.getItemStack("miscutils:item.itemBufferCore"+"1", 1),
+ ItemUtils.getItemStack("miscutils:item.itemBufferCore"+"2", 1),
+ ItemUtils.getItemStack("miscutils:item.itemBufferCore"+"3", 1),
+ ItemUtils.getItemStack("miscutils:item.itemBufferCore"+"4", 1),
+ ItemUtils.getItemStack("miscutils:item.itemBufferCore"+"5", 1),
+ ItemUtils.getItemStack("miscutils:item.itemBufferCore"+"6", 1),
+ ItemUtils.getItemStack("miscutils:item.itemBufferCore"+"7", 1),
+ ItemUtils.getItemStack("miscutils:item.itemBufferCore"+"8", 1),
+ ItemUtils.getItemStack("miscutils:item.itemBufferCore"+"9", 1),
+ ItemUtils.getItemStack("miscutils:item.itemBufferCore"+"10", 1)
+ };
+
+ int aCostMultiplier = GTNH ? 4 : 1;
+
+ for (int i = 0; i < 10; i++) {
+
+ ItemStack aPrevTier = (i == 0 ? CI.getTieredMachineHull(4) : aOutput[i-1]);
+ aPrevTier.stackSize = GTNH ? 4 : 2;
+ int aTier = (i + 1);
+ CORE.RA.addSixSlotAssemblingRecipe(
+ new ItemStack[] {
+ aPrevTier,
+ CI.getTieredComponent(OrePrefixes.plate, aTier, 4 * aCostMultiplier),
+ CI.getTieredComponent(OrePrefixes.cableGt04, i, 2 * aCostMultiplier),
+ CI.getTieredComponent(OrePrefixes.circuit, aTier, 2 * aCostMultiplier),
+ CI.getTieredComponent(OrePrefixes.screw, aTier, 6 * aCostMultiplier),
+ CI.getTieredComponent(OrePrefixes.bolt, i, 12 * (GTNH ? 2 : 1)),
+ },
+ CI.getTieredFluid(i, (144 * 4 * aTier)), //Input Fluid
+ aOutput[i],
+ 45 * 10 * 1 * (aTier),
+ MaterialUtils.getVoltageForTier(i));
+
+ //Energy Buffer
+ CORE.RA.addSixSlotAssemblingRecipe(
+ new ItemStack[] {
+ ItemUtils.getSimpleStack(aOutput[i], 4),
+ CI.getTieredComponent(OrePrefixes.plate, aTier, 8 * aCostMultiplier),
+ CI.getTieredComponent(OrePrefixes.wireGt08, i, 4 * aCostMultiplier),
+ CI.getTieredComponent(OrePrefixes.circuit, i, 4 * aCostMultiplier),
+ CI.getTieredComponent(OrePrefixes.stickLong, aTier, 4 * aCostMultiplier),
+ CI.getTieredComponent(OrePrefixes.gearGt, i, 5 * (GTNH ? 2 : 1)),
+ },
+ CI.getTieredFluid(aTier, (144 * 16 * aTier)), //Input Fluid
+ aBufferOutput[i],
+ 45 * 20 * 1 * (aTier),
+ MaterialUtils.getVoltageForTier(i));
+
}
diff --git a/src/Java/gtPlusPlus/core/recipe/common/CI.java b/src/Java/gtPlusPlus/core/recipe/common/CI.java
index dc156c6f91..5f334cdc71 100644
--- a/src/Java/gtPlusPlus/core/recipe/common/CI.java
+++ b/src/Java/gtPlusPlus/core/recipe/common/CI.java
@@ -1,29 +1,31 @@
package gtPlusPlus.core.recipe.common;
-import net.minecraft.init.Blocks;
-import net.minecraft.init.Items;
-import net.minecraft.item.ItemStack;
-
import gregtech.api.enums.ItemList;
import gregtech.api.enums.Materials;
import gregtech.api.enums.OrePrefixes;
import gregtech.api.util.GT_ModHandler;
-
+import gregtech.api.util.GT_Utility;
import gtPlusPlus.api.objects.Logger;
-import gtPlusPlus.core.item.ModItems;
import gtPlusPlus.core.lib.CORE;
+import gtPlusPlus.core.lib.LoadedMods;
import gtPlusPlus.core.material.ALLOY;
+import gtPlusPlus.core.material.ELEMENT;
import gtPlusPlus.core.material.Material;
import gtPlusPlus.core.recipe.LOADER_Machine_Components;
import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.minecraft.ItemUtils;
+import gtPlusPlus.xmod.eio.material.MaterialEIO;
import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList;
import ic2.core.Ic2Items;
+import net.minecraft.init.Blocks;
+import net.minecraft.init.Items;
+import net.minecraft.item.ItemStack;
+import net.minecraftforge.fluids.FluidStack;
public class CI {
//null
- public static ItemStack _NULL = ItemUtils.getSimpleStack(ModItems.AAA_Broken);
+ public static ItemStack _NULL = ItemUtils.getErrorStack(1);
//bits
public static long bits = GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE
@@ -520,5 +522,265 @@ public class CI {
public static ItemStack emptyCells(int i) {
return ItemUtils.getEmptyCell(i);
}
+
+
+
+ /*
+ *
+ */
+
+ private static final Material[] aMaterial_Main = new Material[] {
+ MaterialEIO.REDSTONE_ALLOY,
+ ALLOY.POTIN,
+ ALLOY.ZIRCONIUM_CARBIDE,
+ ALLOY.EGLIN_STEEL,
+ ALLOY.INCONEL_792,
+ ALLOY.TUNGSTEN_TITANIUM_CARBIDE,
+ ALLOY.NITINOL_60,
+ ALLOY.ZERON_100,
+ ALLOY.PIKYONIUM,
+ ELEMENT.STANDALONE.ADVANCED_NITINOL,
+ ALLOY.ABYSSAL,
+ ALLOY.QUANTUM
+ };
+
+ private static final Material[] aMaterial_Secondary = new Material[] {
+ ELEMENT.getInstance().LEAD,
+ ALLOY.TUMBAGA,
+ ALLOY.SILICON_CARBIDE,
+ ALLOY.TUNGSTEN_CARBIDE,
+ ALLOY.INCONEL_690,
+ ALLOY.STELLITE,
+ ALLOY.ARCANITE,
+ ALLOY.LAFIUM,
+ ALLOY.CINOBITE,
+ ALLOY.TITANSTEEL,
+ ALLOY.OCTIRON,
+ ELEMENT.STANDALONE.CELESTIAL_TUNGSTEN
+ };
+
+ private static final Material[] aMaterial_Tertiary = new Material[] {
+ ELEMENT.getInstance().IRON,
+ ALLOY.STEEL,
+ ELEMENT.getInstance().ALUMINIUM,
+ ALLOY.STAINLESSSTEEL,
+ ELEMENT.getInstance().TUNGSTEN,
+ ALLOY.HASTELLOY_N,
+ ALLOY.ENERGYCRYSTAL,
+ ALLOY.TRINIUM_NAQUADAH_CARBON,
+ ALLOY.TRINIUM_REINFORCED_STEEL, //Arceus
+ ALLOY.TITANSTEEL,
+ ELEMENT.STANDALONE.ASTRAL_TITANIUM,
+ ELEMENT.STANDALONE.CELESTIAL_TUNGSTEN
+ };
+
+ private static final Materials[] aMaterial_Cables = new Materials[] {
+ (CORE.ConfigSwitches.enableCustom_Cables && LoadedMods.EnderIO) ? Materials.RedstoneAlloy : CORE.GTNH ? Materials.Lead : Materials.Tin,
+ Materials.Cobalt,
+ Materials.AnnealedCopper,
+ Materials.Gold,
+ Materials.Titanium,
+ Materials.Nichrome,
+ Materials.Platinum,
+ Materials.YttriumBariumCuprate,
+ Materials.Naquadah,
+ Materials.Duranium,
+ Materials.Superconductor,
+ };
+
+ private static final Materials[] aMaterial_Circuits = new Materials[] {
+ Materials.Primitive,
+ Materials.Basic,
+ Materials.Good,
+ Materials.Advanced,
+ Materials.Data,
+ Materials.Data,
+ Materials.Elite,
+ Materials.Master,
+ Materials.Ultimate,
+ Materials.Superconductor,
+ Materials.Infinite,
+ };
+
+ private static final Material[][] aMaster = new Material[][] {aMaterial_Main, aMaterial_Secondary, aMaterial_Tertiary};
+
+
+ public static FluidStack getTieredFluid(int aTier, int aAmount) {
+ ItemStack aCell = getTieredComponent(OrePrefixes.liquid, aTier, 1);
+ FluidStack a = GT_Utility.getFluidForFilledItem(aCell, true);
+ if (a == null) {
+ a = aMaster[0][aTier].getFluid(aAmount);
+ }
+ a.amount = aAmount;
+ return a;
+ }
+
+ public static ItemStack getTieredComponent(OrePrefixes aPrefix, int aTier, int aAmount) {
+ aTier = Math.max(0, aTier);
+
+ Material m = null;
+
+
+
+
+
+
+ if (aPrefix == OrePrefixes.liquid) {
+ int aMatID = (aTier == 0 || aTier == 2 || aTier == 5 || aTier == 8 ? 0 : (aTier == 1 || aTier == 3 || aTier == 6 || aTier == 9 ? 1 : 2));
+ ItemStack aCell = aMaster[aMatID][aTier].getCell(aAmount);
+ return aCell;
+ }
+
+ if (aPrefix == OrePrefixes.circuit) {
+ if (aTier == 4) {
+ return ItemUtils.getSimpleStack(CI.getDataStick(), aAmount);
+ }
+ else if (aTier == 5) {
+ return ItemUtils.getSimpleStack(CI.getDataOrb(), aAmount);
+ }
+ return ItemUtils.getOrePrefixStack(OrePrefixes.circuit, aMaterial_Circuits[aTier], aAmount);
+ }
+
+ //Check for Cables first, catch SuperConductor case and swap to wire.
+ if (aPrefix == OrePrefixes.cableGt01 || aPrefix == OrePrefixes.cableGt02 || aPrefix == OrePrefixes.cableGt04 || aPrefix == OrePrefixes.cableGt08 || aPrefix == OrePrefixes.cableGt12) {
+ //Special Handler
+ if (aTier == 10) {
+ if (aPrefix == OrePrefixes.cableGt01) {
+ aPrefix = OrePrefixes.wireGt02;
+ }
+ else if (aPrefix == OrePrefixes.cableGt02) {
+ aPrefix = OrePrefixes.wireGt04;
+ }
+ else if (aPrefix == OrePrefixes.cableGt04) {
+ aPrefix = OrePrefixes.wireGt08;
+ }
+ else if (aPrefix == OrePrefixes.cableGt08) {
+ aPrefix = OrePrefixes.wireGt12;
+ }
+ else if (aPrefix == OrePrefixes.cableGt12) {
+ aPrefix = OrePrefixes.wireGt16;
+ }
+ }
+ else {
+ return ItemUtils.getOrePrefixStack(aPrefix, aMaterial_Cables[aTier], aAmount);
+ }
+
+
+ }
+ if (aPrefix == OrePrefixes.wireGt01 || aPrefix == OrePrefixes.wireGt02 || aPrefix == OrePrefixes.wireGt04 || aPrefix == OrePrefixes.wireGt08 || aPrefix == OrePrefixes.wireGt12 || aPrefix == OrePrefixes.wireGt16) {
+ return ItemUtils.getOrePrefixStack(aPrefix, aMaterial_Cables[aTier], aAmount);
+ }
+
+ if (aPrefix == OrePrefixes.pipeTiny || aPrefix == OrePrefixes.pipeSmall || aPrefix == OrePrefixes.pipe || aPrefix == OrePrefixes.pipeMedium || aPrefix == OrePrefixes.pipeLarge || aPrefix == OrePrefixes.pipeHuge) {
+ if (aTier == 0) {
+ return ItemUtils.getOrePrefixStack(aPrefix, Materials.Lead, aAmount);
+ }
+ else if (aTier == 1) {
+ return ItemUtils.getOrePrefixStack(aPrefix, Materials.Steel, aAmount);
+ }
+ else if (aTier == 2) {
+ return ItemUtils.getOrePrefixStack(aPrefix, Materials.StainlessSteel, aAmount);
+ }
+ else if (aTier == 3) {
+ return ItemUtils.getOrePrefixStack(aPrefix, Materials.Tungsten, aAmount);
+ }
+ else if (aTier == 4) {
+ return ItemUtils.getOrePrefixStack(aPrefix, Materials.TungstenSteel, aAmount);
+ }
+ else if (aTier == 5) {
+ return ItemUtils.getOrePrefixStack(aPrefix, ALLOY.MARAGING350, aAmount);
+ }
+ else if (aTier == 6) {
+ return ItemUtils.getOrePrefixStack(aPrefix, ALLOY.STABALLOY, aAmount);
+ }
+ else if (aTier == 7) {
+ return ItemUtils.getOrePrefixStack(aPrefix, ALLOY.HASTELLOY_X, aAmount);
+ }
+ else if (aTier == 8) {
+ return ItemUtils.getOrePrefixStack(aPrefix, Materials.Ultimate, aAmount);
+ }
+ else if (aTier == 9) {
+ return ItemUtils.getOrePrefixStack(OrePrefixes.pipeMedium, Materials.Superconductor, aAmount);
+ }
+ else if (aTier == 10) {
+ return ItemUtils.getOrePrefixStack(aPrefix, Materials.Europium, aAmount);
+ }
+ else {
+ return ItemUtils.getOrePrefixStack(aPrefix, Materials.Titanium, aAmount);
+ }
+ }
+
+ ItemStack aTempStack = null;
+
+ if (aPrefix == OrePrefixes.gear || aPrefix == OrePrefixes.gearGt) {
+ m = aMaster[0][aTier];
+ }
+ else if (aPrefix == OrePrefixes.rod || aPrefix == OrePrefixes.stick) {
+ m = aMaster[0][aTier];
+ }
+ else if (aPrefix == OrePrefixes.stickLong) {
+ m = aMaster[1][aTier];
+ }
+ else if (aPrefix == OrePrefixes.bolt) {
+ m = aMaster[2][aTier];
+ }
+ else if (aPrefix == OrePrefixes.screw) {
+ m = aMaster[0][aTier];
+ }
+ else if (aPrefix == OrePrefixes.rotor) {
+ m = aMaster[1][aTier];
+ }
+ else if (aPrefix == OrePrefixes.frame || aPrefix == OrePrefixes.frameGt) {
+ m = aMaster[2][aTier];
+ }
+ else if (aPrefix == OrePrefixes.ingot) {
+ m = aMaster[1][aTier];
+ }
+ else if (aPrefix == OrePrefixes.plate) {
+ m = aMaster[0][aTier];
+ }
+ else if (aPrefix == OrePrefixes.plateDouble) {
+ m = aMaster[0][aTier];
+ }
+ else if (aPrefix == OrePrefixes.ring) {
+ m = aMaster[2][aTier];
+ }
+ else if (aPrefix == OrePrefixes.cell) {
+ m = aMaster[1][aTier];
+ }
+ else {
+ m = aMaterial_Main[aTier];
+ }
+
+ ItemStack aReturn = ItemUtils.getOrePrefixStack(aPrefix, m, aAmount);
+
+ //If Invalid, Try First Material
+ if (!ItemUtils.checkForInvalidItems(aReturn)) {
+ m = aMaster[0][aTier];
+ aReturn = ItemUtils.getOrePrefixStack(aPrefix, m, aAmount);
+
+ //If Invalid, Try Second Material
+ if (!ItemUtils.checkForInvalidItems(aReturn)) {
+ m = aMaster[1][aTier];
+ aReturn = ItemUtils.getOrePrefixStack(aPrefix, m, aAmount);
+
+ //If Invalid, Try Third Material
+ if (!ItemUtils.checkForInvalidItems(aReturn)) {
+ m = aMaster[2][aTier];
+ aReturn = ItemUtils.getOrePrefixStack(aPrefix, m, aAmount);
+
+ //All Invalid? Ok, shit.
+ //Let's add a special error ingot.
+ if (!ItemUtils.checkForInvalidItems(aReturn)) {
+ aReturn = ItemUtils.getErrorStack(1, (aPrefix.toString()+m.getLocalizedName()+" x"+aAmount));
+ }
+ }
+ }
+ }
+
+ return aReturn;
+
+
+ }
}
diff --git a/src/Java/gtPlusPlus/core/util/Utils.java b/src/Java/gtPlusPlus/core/util/Utils.java
index e2220f74f8..968de2f55a 100644
--- a/src/Java/gtPlusPlus/core/util/Utils.java
+++ b/src/Java/gtPlusPlus/core/util/Utils.java
@@ -485,7 +485,10 @@ public class Utils {
return true;
}
- public static File getMcDir() {
+ public static File getMcDir() {
+ if (Minecraft.getMinecraft() == null) {
+ return new File("testdir");
+ }
if ((MinecraftServer.getServer() != null) && MinecraftServer.getServer().isDedicatedServer()) {
return new File(".");
}
diff --git a/src/Java/gtPlusPlus/core/util/minecraft/ItemUtils.java b/src/Java/gtPlusPlus/core/util/minecraft/ItemUtils.java
index 425606dd8e..1cb2513e90 100644
--- a/src/Java/gtPlusPlus/core/util/minecraft/ItemUtils.java
+++ b/src/Java/gtPlusPlus/core/util/minecraft/ItemUtils.java
@@ -10,7 +10,9 @@ import net.minecraft.init.Items;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.Item;
import net.minecraft.item.Item.ToolMaterial;
+import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.item.ItemStack;
+import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.StatCollector;
import gregtech.api.enums.ItemList;
@@ -315,7 +317,7 @@ public class ItemUtils {
return returnValue;
}
Logger.INFO("Failed to find `" + oredictName + "` in OD.");
- return getErrorStack(amount);
+ return getErrorStack(amount, oredictName+" x"+amount);
//return getItemStackOfAmountFromOreDictNoBroken(mTemp, amount);
}
@@ -366,8 +368,7 @@ public class ItemUtils {
public static ItemStack getGregtechDust(final Materials material, final int amount) {
final ItemStack returnValue = GT_OreDictUnificator.get(OrePrefixes.dust, material, 1L);
if (returnValue != null) {
- if ((returnValue.getItem().getClass() != ModItems.AAA_Broken.getClass())
- || (returnValue.getItem() != ModItems.AAA_Broken)) {
+ if (ItemUtils.checkForInvalidItems(returnValue)) {
return returnValue.copy();
}
}
@@ -762,23 +763,23 @@ public class ItemUtils {
if (aGtStack == null) {
Logger.INFO(
"Failed to find `" + mPrefix + MaterialUtils.getMaterialName(mMat) + "` in OD. [Prefix Search]");
- return getErrorStack(mAmount);
+ return getErrorStack(mAmount, (mPrefix.toString()+MaterialUtils.getMaterialName(mMat)+" x"+mAmount));
} else {
return aGtStack;
}
}
- public static ItemStack getErrorStack(int mAmount) {
- //System.exit(1);
- try {
- //new GregtechException("Logging - [Issue #999]");
- }
- catch (Throwable t) {
- t.printStackTrace();
- }
+ public static ItemStack getErrorStack(int mAmount) {
+ return getErrorStack(mAmount, null);
+ }
- return getSimpleStack(ModItems.AAA_Broken, mAmount);
- //return null;
+ public static ItemStack getErrorStack(int mAmount, String aName) {
+ ItemStack g = getSimpleStack(ModItems.AAA_Broken, 1);
+ NBTUtils.setString(g, "Lore", EnumChatFormatting.RED+aName);
+ if (aName != null) {
+ NBTUtils.setBookTitle(g, EnumChatFormatting.YELLOW+"Maybe Alkalus should know about this");
+ }
+ return g;
}
public static ItemStack[] getStackOfAllOreDictGroup(String oredictname) {
diff --git a/src/Java/gtPlusPlus/preloader/asm/AsmConfig.java b/src/Java/gtPlusPlus/preloader/asm/AsmConfig.java
index d68ba3c2a6..aa1e382278 100644
--- a/src/Java/gtPlusPlus/preloader/asm/AsmConfig.java
+++ b/src/Java/gtPlusPlus/preloader/asm/AsmConfig.java
@@ -76,7 +76,11 @@ public class AsmConfig {
prop = config.get("general", "enableGcFuelChanges", true);
prop.comment = "Enable/Disable changes to Galacticraft Rocket Fuels.";
prop.setLanguageKey("gtpp.enableGcFuelChanges").setRequiresMcRestart(true);
- enableGcFuelChanges = prop.getBoolean(true);
+
+ //Disabled because Broken
+ //enableGcFuelChanges = prop.getBoolean(true);
+ enableGcFuelChanges = false;
+
propOrder.add(prop.getName());
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java b/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java
index def213ec7c..41bb0b0c26 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java
@@ -96,6 +96,9 @@ public enum GregtechItemList implements GregtechItemContainer {
Carbyne_Tube_Finished,
Carbyne_Sheet_Finished,
+ //End Game Laser Engraver Lens
+ Laser_Lens_Special,
+
//----------------------------------------------------------------------------
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/IGregtech_RecipeAdder.java b/src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/IGregtech_RecipeAdder.java
index 4c7ea6d05d..df71432663 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/IGregtech_RecipeAdder.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/IGregtech_RecipeAdder.java
@@ -135,7 +135,7 @@ public interface IGregtech_RecipeAdder {
public boolean addCyclotronRecipe(ItemStack aInput, FluidStack aFluidInput, ItemStack[] aOutputs,
FluidStack aFluidOutput, int[] aChances, int aDuration, int aEUt, int aSpecialValue);
- boolean addCyclotronRecipe(ItemStack[] aInputs, FluidStack aFluidInput, ItemStack aOutput, FluidStack aFluidOutput,
+ boolean addCyclotronRecipe(ItemStack[] aInputs, FluidStack aFluidInput, ItemStack[] aOutput, FluidStack aFluidOutput,
int[] aChances, int aDuration, int aEUt, int aSpecialValue);
public boolean addMixerRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aInput3, ItemStack aInput4,
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java
index bb822ec816..3e5c783a5c 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java
@@ -1508,28 +1508,37 @@ GT_MetaTileEntity_MultiBlockBase {
public abstract boolean checkMultiblock(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack);
- public boolean isValidBlockForStructure(IGregTechTileEntity aBaseMetaTileEntity, int aCasingID, boolean canBeHatch, Block aFoundBlock, int aFoundMeta, Block aExpectedBlock, int aExpectedMeta) {
- boolean isHatch = false;
+ public boolean isValidBlockForStructure(IGregTechTileEntity aBaseMetaTileEntity, int aCasingID, boolean canBeHatch,
+ Block aFoundBlock, int aFoundMeta, Block aExpectedBlock, int aExpectedMeta) {
+ boolean isHatch = false;
if (aBaseMetaTileEntity != null) {
isHatch = this.addToMachineList(aBaseMetaTileEntity, aCasingID);
if (isHatch) {
return true;
}
+ else {
+ //Found a controller
+ if (aFoundMeta > 0 && aFoundMeta < 1000 && aFoundBlock == GregTech_API.sBlockMachines) {
+ return true;
+ }
+ }
}
if (!isHatch) {
- if (aFoundBlock != aExpectedBlock || aFoundMeta != aExpectedMeta) {
+ if (aFoundBlock == aExpectedBlock && aFoundMeta == aExpectedMeta) {
+ return true;
+ }
+ else if (aFoundBlock != aExpectedBlock) {
+ Logger.INFO("A1 - Found: "+aFoundBlock.getLocalizedName()+", Expected: "+aExpectedBlock.getLocalizedName());
return false;
}
- else {
- return true;
+ else if (aFoundMeta != aExpectedMeta) {
+ Logger.INFO("A2");
+ return false;
}
+
}
- else {
- return true;
- }
-
-
-
+ Logger.INFO("A3");
+ return false;
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechItems.java b/src/Java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechItems.java
index b54eb770ec..7f426f8abb 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechItems.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechItems.java
@@ -292,6 +292,7 @@ public class MetaGeneratedGregtechItems extends Gregtech_MetaItem_X32 {
GregtechItemList.NanoTube_Finished.set(this.addItem(102, "Carbon Nanotubes", "Multi-walled Zigzag nanotubes, possibly Carbon's final form", new Object[0]));
GregtechItemList.Carbyne_Tube_Finished.set(this.addItem(103, "Linear Acetylenic Carbon (LAC/Carbyne)", "LAC chains grown inside Multi-walled Carbon Nanotubes, highly stable", new Object[0]));
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]));
}
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 612defcb89..22ce41282f 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/render/GTPP_CapeRenderer.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/render/GTPP_CapeRenderer.java
@@ -1,14 +1,45 @@
package gtPlusPlus.xmod.gregtech.common.render;
-import static gtPlusPlus.GTplusplus.*;
-
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.FileReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.math.BigInteger;
+import java.net.URL;
+import java.security.InvalidAlgorithmParameterException;
+import java.security.InvalidKeyException;
+import java.security.MessageDigest;
+import java.security.NoSuchAlgorithmException;
+import java.util.ArrayList;
+import java.util.Base64;
+import java.util.Date;
import java.util.HashMap;
+import java.util.Map;
import java.util.UUID;
+import javax.crypto.Cipher;
+import javax.crypto.NoSuchPaddingException;
+import javax.crypto.spec.IvParameterSpec;
+import javax.crypto.spec.SecretKeySpec;
+import javax.xml.bind.DatatypeConverter;
+
+import org.apache.commons.io.IOUtils;
import org.lwjgl.opengl.GL11;
import com.mojang.authlib.GameProfile;
+import gregtech.api.enums.GT_Values;
+import gregtech.api.util.GT_Log;
+import gregtech.api.util.GT_Utility;
+import gtPlusPlus.api.objects.Logger;
+import gtPlusPlus.core.lib.CORE;
+import gtPlusPlus.core.lib.CORE.ConfigSwitches;
+import gtPlusPlus.core.proxy.ClientProxy;
+import gtPlusPlus.core.util.Utils;
+import gtPlusPlus.core.util.data.FileUtils;
+import gtPlusPlus.core.util.sys.NetworkUtils;
import net.minecraft.client.entity.AbstractClientPlayer;
import net.minecraft.client.model.ModelBiped;
import net.minecraft.client.renderer.entity.RenderManager;
@@ -17,110 +48,122 @@ import net.minecraft.potion.Potion;
import net.minecraft.server.MinecraftServer;
import net.minecraft.util.MathHelper;
import net.minecraft.util.ResourceLocation;
+import net.minecraftforge.client.event.RenderPlayerEvent;
-import gregtech.api.enums.GT_Values;
-import gregtech.api.util.GT_Log;
-import gregtech.api.util.GT_Utility;
+public class GTPP_CapeRenderer extends RenderPlayer {
-import gtPlusPlus.api.objects.Logger;
-import gtPlusPlus.api.objects.data.AutoMap;
-import gtPlusPlus.api.objects.data.Pair;
-import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.lib.CORE.ConfigSwitches;
-import net.minecraftforge.client.event.RenderPlayerEvent;
+ private final ResourceLocation[] mCapes = {
+ new ResourceLocation("miscutils:textures/OrangeHD.png"),
+ new ResourceLocation("miscutils:textures/FancyCapeHD.png"),
+ new ResourceLocation("miscutils:textures/TesterCapeHD.png"),
+ new ResourceLocation("miscutils:textures/DevCapeHD.png"),
+ new ResourceLocation("miscutils:textures/PatreonCapeHD.png") };
-public class GTPP_CapeRenderer
-extends RenderPlayer {
- private final ResourceLocation[] mCapes = {new ResourceLocation("miscutils:textures/OrangeHD.png"), new ResourceLocation("miscutils:textures/FancyCapeHD.png"), new ResourceLocation("miscutils:textures/TesterCapeHD.png"), new ResourceLocation("miscutils:textures/DevCapeHD.png"), new ResourceLocation("miscutils:textures/PatreonCapeHD.png")};
-
- private static final HashMap<String, ResourceLocation> mLocalClientPlayerCache;
+ private final ArrayList<String> mData;
- static {
- mLocalClientPlayerCache = new HashMap<String, ResourceLocation>();
- }
-
public GTPP_CapeRenderer() {
setRenderManager(RenderManager.instance);
- BuildCapeList();
+ downloadCapeList();
+ ArrayList<String> aTemp = new ArrayList<String>();
+ try {
+ aTemp = returnDatData();
+ }
+ catch (Throwable t) {
+ aTemp = new ArrayList<String>();
+ }
+ mData = aTemp;
}
private static boolean hasResourceChecked = false;
+ private boolean hasCape = false;
+ private ResourceLocation tResource = null;
public synchronized void receiveRenderSpecialsEvent(RenderPlayerEvent.Specials.Pre aEvent) {
AbstractClientPlayer aPlayer = (AbstractClientPlayer) aEvent.entityPlayer;
- ResourceLocation tResource = null;
- if (!ConfigSwitches.enableCustomCapes){
+ if (!ConfigSwitches.enableCustomCapes) {
aEvent.setCanceled(true);
- return ;
+ Logger.INFO("A1");
+ return;
+ }
+
+ if (hasResourceChecked) {
+ if (!hasCape && !CORE.DEVENV) {
+ aEvent.setCanceled(true);
+ Logger.INFO("A2");
+ return;
+ }
}
+ // Make sure we don't keep checking on clients who dont have capes.
+ if (!hasResourceChecked) {
- //Make sure we don't keep checking on clients who dont have capes.
- if (!hasResourceChecked) {
- AutoMap<Pair<String, ResourceLocation>> localGatherMap = new AutoMap<Pair<String, ResourceLocation>>();
- String mTemp = "";
- //If list's have not been built yet for some reason, we best do it now.
- if (mDevCapes.size() <= 1) {
- BuildCapeList();
- }
- //Iterates all players in all lists, caches result.
- for (Pair<String, String> mName : mOrangeCapes){
- mTemp = getPlayerName(mName.getKey(), mName.getValue());
- localGatherMap.put(new Pair<String, ResourceLocation>(mTemp, this.mCapes[0]));
- }
- for (Pair<String, String> mName : mMiscCapes){
- mTemp = getPlayerName(mName.getKey(), mName.getValue());
- localGatherMap.put(new Pair<String, ResourceLocation>(mTemp, this.mCapes[1]));
- }
- for (Pair<String, String> mName : mBetaTestCapes){
- mTemp = getPlayerName(mName.getKey(), mName.getValue());
- localGatherMap.put(new Pair<String, ResourceLocation>(mTemp, this.mCapes[2]));
+ // Time to Spliterate some data
+ Map<String, ResourceLocation> aPlayerData = new HashMap<String, ResourceLocation>();
+ Map<String, String> aNameMap = new HashMap<String, String>();
+ int i = 0;
+ for (String s : mData) {
+ String[] aSplit = s.split("@");
+ int a[] = new int[] { 0, mCapes.length - 1 };
+ int aID = Integer.parseInt(aSplit[1]);
+ String aPlayerName = this.getPlayerName("iteration-" + (i++), aSplit[0]);
+ aNameMap.put(aSplit[0], aPlayerName);
+ aPlayerData.put(aPlayerName, this.mCapes[Math.max(a[0], Math.min(aID, a[1]))]);
+ }
+
+ // Set flag to only render this event if player has a cape.
+ for (String s : aNameMap.values()) {
+ if (s.toLowerCase().equals(ClientProxy.playerName)) {
+ hasCape = true;
+ tResource = aPlayerData.get(ClientProxy.playerName);
+ break;
}
- for (Pair<String, String> mName : mDevCapes){
- mTemp = getPlayerName(mName.getKey(), mName.getValue());
- localGatherMap.put(new Pair<String, ResourceLocation>(mTemp, this.mCapes[3]));
+ }
+
+ // Dev capes for dev mode.
+ if (CORE.DEVENV) {
+ hasCape = true;
+ tResource = mCapes[3];
+ }
+
+ // Safety Check
+ if (tResource == null) {
+ if (aPlayerData.get(aPlayer.getDisplayName()) != null) {
+ tResource = aPlayerData.get(aPlayer.getDisplayName());
+ } else {
+ hasCape = false;
}
- for (Pair<String, String> mName : mPatreonCapes){
- mTemp = getPlayerName(mName.getKey(), mName.getValue());
- localGatherMap.put(new Pair<String, ResourceLocation>(mTemp, this.mCapes[4]));
- }
- if (localGatherMap.size() > 0) {
- for (Pair<String, ResourceLocation> p : localGatherMap) {
- if (p != null) {
- mLocalClientPlayerCache.put(p.getKey().toLowerCase(), p.getValue());
- }
- }
- }
- //Only run once.
+ }
+
+ // Only run once.
hasResourceChecked = true;
- }
-
- if (mLocalClientPlayerCache.size() > 0) {
- String name = aPlayer.getDisplayName().toLowerCase();
- if (mLocalClientPlayerCache.containsKey(name)) {
- tResource = mLocalClientPlayerCache.get(name);
- }
- }
-
- if (GT_Utility.getFullInvisibility(aPlayer) || aPlayer.isInvisible() || GT_Utility.getPotion(aPlayer, Integer.valueOf(Potion.invisibility.id).intValue())) {
+ }
+
+ if (GT_Utility.getFullInvisibility(aPlayer) || aPlayer.isInvisible()
+ || GT_Utility.getPotion(aPlayer, Integer.valueOf(Potion.invisibility.id).intValue())) {
aEvent.setCanceled(true);
+ Logger.INFO("A3");
return;
}
+
float aPartialTicks = aEvent.partialRenderTick;
- try {
+ try {
if (tResource == null && CORE.DEVENV) {
tResource = mCapes[3];
}
-
+
if ((tResource != null) && (!aPlayer.getHideCape())) {
bindTexture(tResource);
GL11.glPushMatrix();
GL11.glTranslatef(0.0F, 0.0F, 0.125F);
- double d0 = aPlayer.field_71091_bM + (aPlayer.field_71094_bP - aPlayer.field_71091_bM) * aPartialTicks - (aPlayer.prevPosX + (aPlayer.posX - aPlayer.prevPosX) * aPartialTicks);
- double d1 = aPlayer.field_71096_bN + (aPlayer.field_71095_bQ - aPlayer.field_71096_bN) * aPartialTicks - (aPlayer.prevPosY + (aPlayer.posY - aPlayer.prevPosY) * aPartialTicks);
- double d2 = aPlayer.field_71097_bO + (aPlayer.field_71085_bR - aPlayer.field_71097_bO) * aPartialTicks - (aPlayer.prevPosZ + (aPlayer.posZ - aPlayer.prevPosZ) * aPartialTicks);
- float f6 = aPlayer.prevRenderYawOffset + (aPlayer.renderYawOffset - aPlayer.prevRenderYawOffset) * aPartialTicks;
+ double d0 = aPlayer.field_71091_bM + (aPlayer.field_71094_bP - aPlayer.field_71091_bM) * aPartialTicks
+ - (aPlayer.prevPosX + (aPlayer.posX - aPlayer.prevPosX) * aPartialTicks);
+ double d1 = aPlayer.field_71096_bN + (aPlayer.field_71095_bQ - aPlayer.field_71096_bN) * aPartialTicks
+ - (aPlayer.prevPosY + (aPlayer.posY - aPlayer.prevPosY) * aPartialTicks);
+ double d2 = aPlayer.field_71097_bO + (aPlayer.field_71085_bR - aPlayer.field_71097_bO) * aPartialTicks
+ - (aPlayer.prevPosZ + (aPlayer.posZ - aPlayer.prevPosZ) * aPartialTicks);
+ float f6 = aPlayer.prevRenderYawOffset
+ + (aPlayer.renderYawOffset - aPlayer.prevRenderYawOffset) * aPartialTicks;
double d3 = MathHelper.sin(f6 * CORE.PI / 180.0F);
double d4 = -MathHelper.cos(f6 * CORE.PI / 180.0F);
float f7 = (float) d1 * 10.0F;
@@ -136,7 +179,9 @@ extends RenderPlayer {
f8 = 0.0F;
}
float f10 = aPlayer.prevCameraYaw + (aPlayer.cameraYaw - aPlayer.prevCameraYaw) * aPartialTicks;
- f7 += MathHelper.sin((aPlayer.prevDistanceWalkedModified + (aPlayer.distanceWalkedModified - aPlayer.prevDistanceWalkedModified) * aPartialTicks) * 6.0F) * 32.0F * f10;
+ f7 += MathHelper.sin((aPlayer.prevDistanceWalkedModified
+ + (aPlayer.distanceWalkedModified - aPlayer.prevDistanceWalkedModified) * aPartialTicks) * 6.0F)
+ * 32.0F * f10;
if (aPlayer.isSneaking()) {
f7 += 25.0F;
}
@@ -156,34 +201,69 @@ extends RenderPlayer {
private String getPlayerName(String name, String uuid) {
try {
- Logger.WORLD("[Capes++] Trying to UUID check "+name+".");
- if (uuid != null) {
- if (uuid.length() > 0) {
- UUID g = UUID.fromString(uuid);
- if (g != null) {
- Logger.WORLD("[Capes++] Mojang/Cache checking for "+name+".");
- GameProfile profile = MinecraftServer.getServer().func_152358_ax().func_152652_a(g);
+ Logger.WORLD("[Capes++] Trying to UUID check " + name + ".");
+ if (uuid != null) {
+ if (uuid.length() > 0) {
+ UUID g = UUID.fromString(uuid);
+ if (g != null) {
+ 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() + ".");
+ return profile.getName();
+ }
+ } else {
+ g = UUID.fromString(uuid.replace("-", ""));
+ if (g != null) {
+ 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() + ".");
+ return profile.getName();
+ }
+ }
+ }
+ }
+ }
+ if (name != null) {
+ if (name.length() > 0) {
+ 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 UUID check: "+profile.getName()+".");
+ Logger.INFO("[Capes++] Found for name check: " + profile.getName() + ".");
return profile.getName();
- }
+ }
}
- }
- }
- if (name != null) {
- if (name.length() > 0) {
- 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()+".");
- return profile.getName();
- }
- }
- }
- Logger.WORLD("[Capes++] Failed UUID check for "+name+".");
+ }
+ Logger.WORLD("[Capes++] Failed UUID check for " + name + ".");
+ } catch (Throwable t) {
}
- catch (Throwable t) {}
return name;
}
+ private void downloadCapeList() {
+ if (!NetworkUtils.checkNetworkIsAvailableWithValidInterface()) {
+ return;
+ }
+ try {
+ File dat = new File(Utils.getMcDir(), "GTPP.dat");
+ if (FileUtils.doesFileExist(dat)) {
+ Date dateLastMod = new Date(dat.lastModified());
+ Date dateNow = new Date(System.currentTimeMillis() - (7l * 24 * 60 * 60 * 1000));
+ if (!dateLastMod.before(dateNow)) {
+ return;
+ }
+ }
+ InputStream inputStream = new URL("https://alkcorp.overminddl1.com/GTPP.dat").openStream();
+ FileOutputStream fileOS = new FileOutputStream(dat);
+ IOUtils.copy(inputStream, fileOS);
+
+ } catch (Throwable t) {
+ Logger.INFO("Unable to download GT++ cape list.");
+ }
+ }
+
+ /* TODO: fix this stuff \u002a\u002f\u0009\u0070\u0072\u0069\u0076\u0061\u0074\u0065\u0020\u0041\u0072\u0072\u0061\u0079\u004c\u0069\u0073\u0074\u003c\u0053\u0074\u0072\u0069\u006e\u0067\u003e\u0020\u0072\u0065\u0074\u0075\u0072\u006e\u0044\u0061\u0074\u0044\u0061\u0074\u0061\u0028\u0029\u007b\u000a\u0009\u0009\u0046\u0069\u006c\u0065\u0020\u0064\u0061\u0074\u0020\u003d\u0020\u006e\u0065\u0077\u0020\u0046\u0069\u006c\u0065\u0028\u0055\u0074\u0069\u006c\u0073\u002e\u0067\u0065\u0074\u004d\u0063\u0044\u0069\u0072\u0028\u0029\u002c\u0020\u0022\u0047\u0054\u0050\u0050\u002e\u0064\u0061\u0074\u0022\u0029\u003b\u000a\u0009\u0009\u0041\u0072\u0072\u0061\u0079\u004c\u0069\u0073\u0074\u003c\u0053\u0074\u0072\u0069\u006e\u0067\u003e\u0020\u0048\u0020\u003d\u0020\u006e\u0065\u0077\u0020\u0041\u0072\u0072\u0061\u0079\u004c\u0069\u0073\u0074\u003c\u0053\u0074\u0072\u0069\u006e\u0067\u003e\u0028\u0029\u003b\u000a\u0009\u0009\u0074\u0072\u0079\u0020\u0028\u0042\u0075\u0066\u0066\u0065\u0072\u0065\u0064\u0052\u0065\u0061\u0064\u0065\u0072\u0020\u0062\u0072\u0020\u003d\u0020\u006e\u0065\u0077\u0020\u0042\u0075\u0066\u0066\u0065\u0072\u0065\u0064\u0052\u0065\u0061\u0064\u0065\u0072\u0028\u006e\u0065\u0077\u0020\u0046\u0069\u006c\u0065\u0052\u0065\u0061\u0064\u0065\u0072\u0028\u0064\u0061\u0074\u0029\u0029\u0029\u0020\u007b\u000a\u0009\u0009\u0009\u0053\u0074\u0072\u0069\u006e\u0067\u0020\u006c\u0069\u006e\u0065\u003b\u000a\u0009\u0009\u0009\u0077\u0068\u0069\u006c\u0065\u0020\u0028\u0028\u006c\u0069\u006e\u0065\u0020\u003d\u0020\u0062\u0072\u002e\u0072\u0065\u0061\u0064\u004c\u0069\u006e\u0065\u0028\u0029\u0029\u0020\u0021\u003d\u0020\u006e\u0075\u006c\u006c\u0029\u0020\u007b\u000a\u0009\u0009\u0009\u0009\u0048\u002e\u0061\u0064\u0064\u0028\u006c\u0069\u006e\u0065\u0029\u003b\u000a\u0009\u0009\u0009\u007d\u000a\u000a\u0009\u0009\u007d\u0020\u0063\u0061\u0074\u0063\u0068\u0020\u0028\u0049\u004f\u0045\u0078\u0063\u0065\u0070\u0074\u0069\u006f\u006e\u0020\u0065\u0029\u0020\u007b\u000a\u0009\u0009\u0009\u0065\u002e\u0070\u0072\u0069\u006e\u0074\u0053\u0074\u0061\u0063\u006b\u0054\u0072\u0061\u0063\u0065\u0028\u0029\u003b\u000a\u0009\u0009\u007d\u000a\u0009\u0009\u000a\u0009\u0009\u0053\u0074\u0072\u0069\u006e\u0067\u0020\u0061\u0053\u0070\u006c\u0069\u0074\u0044\u0061\u0074\u0061\u0043\u0068\u0065\u0063\u006b\u005b\u005d\u0020\u003d\u0020\u0048\u002e\u0067\u0065\u0074\u0028\u0030\u0029\u002e\u0073\u0070\u006c\u0069\u0074\u0028\u0022\u0025\u0022\u0029\u003b\u000a\u0009\u0009\u0041\u0072\u0072\u0061\u0079\u004c\u0069\u0073\u0074\u003c\u0053\u0074\u0072\u0069\u006e\u0067\u003e\u0020\u0061\u0043\u006c\u0065\u0061\u006e\u0044\u0061\u0074\u0061\u0020\u003d\u0020\u006e\u0065\u0077\u0020\u0041\u0072\u0072\u0061\u0079\u004c\u0069\u0073\u0074\u003c\u0053\u0074\u0072\u0069\u006e\u0067\u003e\u0028\u0029\u003b\u000a\u0009\u0009\u0066\u006f\u0072\u0020\u0028\u0053\u0074\u0072\u0069\u006e\u0067\u0020\u0073\u0020\u003a\u0020\u0061\u0053\u0070\u006c\u0069\u0074\u0044\u0061\u0074\u0061\u0043\u0068\u0065\u0063\u006b\u0029\u0020\u007b\u000a\u0009\u0009\u0009\u0069\u0066\u0020\u0028\u0073\u0020\u0021\u003d\u0020\u006e\u0075\u006c\u006c\u0020\u0026\u0026\u0020\u0073\u002e\u006c\u0065\u006e\u0067\u0074\u0068\u0028\u0029\u0020\u003e\u0020\u0030\u0020\u0026\u0026\u0020\u0021\u0073\u002e\u0065\u0071\u0075\u0061\u006c\u0073\u0028\u0022\u0020\u0022\u0029\u0029\u0020\u007b\u000a\u0009\u0009\u0009\u0009\u0061\u0043\u006c\u0065\u0061\u006e\u0044\u0061\u0074\u0061\u002e\u0061\u0064\u0064\u0028\u0073\u0029\u003b\u000a\u0009\u0009\u0009\u007d\u000a\u0009\u0009\u007d\u000a\u0009\u0009\u000a\u0009\u0009\u0066\u0069\u006e\u0061\u006c\u0020\u0053\u0074\u0072\u0069\u006e\u0067\u0020\u004d\u0041\u0049\u004e\u005f\u0053\u0054\u0041\u0054\u0049\u0043\u005f\u0049\u0056\u0020\u003d\u0020\u0022\u0030\u0031\u0030\u0030\u0030\u0030\u0030\u0031\u0020\u0030\u0031\u0030\u0031\u0030\u0030\u0031\u0022\u003b\u000a\u0009\u0009\u0066\u0069\u006e\u0061\u006c\u0020\u0053\u0074\u0072\u0069\u006e\u0067\u0020\u004d\u0041\u0049\u004e\u005f\u0053\u0054\u0041\u0054\u0049\u0043\u005f\u004b\u0045\u0059\u0020\u003d\u0020\u0022\u0030\u0031\u0030\u0030\u0030\u0031\u0030\u0030\u0020\u0030\u0031\u0031\u0030\u0031\u0031\u0031\u0022\u003b\u000a\u0009\u0009\u000a\u0009\u0009\u0041\u0072\u0072\u0061\u0079\u004c\u0069\u0073\u0074\u003c\u0053\u0074\u0072\u0069\u006e\u0067\u003e\u0020\u0061\u0044\u0061\u0074\u0061\u0020\u003d\u0020\u006e\u0065\u0077\u0020\u0041\u0072\u0072\u0061\u0079\u004c\u0069\u0073\u0074\u003c\u0053\u0074\u0072\u0069\u006e\u0067\u003e\u0028\u0029\u003b\u000a\u0009\u0009\u0066\u006f\u0072\u0020\u0028\u0053\u0074\u0072\u0069\u006e\u0067\u0020\u0068\u0020\u003a\u0020\u0061\u0043\u006c\u0065\u0061\u006e\u0044\u0061\u0074\u0061\u0029\u0020\u007b\u0009\u0009\u0009\u000a\u0009\u0009\u0009\u0053\u0074\u0072\u0069\u006e\u0067\u0020\u0064\u0065\u0063\u0072\u0079\u0070\u0074\u0065\u0064\u0053\u0074\u0072\u0069\u006e\u0067\u0020\u003d\u0020\u0064\u0065\u0063\u0072\u0079\u0070\u0074\u0028\u0068\u002c\u0020\u004d\u0041\u0049\u004e\u005f\u0053\u0054\u0041\u0054\u0049\u0043\u005f\u0049\u0056\u002c\u0020\u004d\u0041\u0049\u004e\u005f\u0053\u0054\u0041\u0054\u0049\u0043\u005f\u004b\u0045\u0059\u0029\u003b\u000a\u0009\u0009\u0009\u0061\u0044\u0061\u0074\u0061\u002e\u0061\u0064\u0064\u0028\u0064\u0065\u0063\u0072\u0079\u0070\u0074\u0065\u0064\u0053\u0074\u0072\u0069\u006e\u0067\u0029\u003b\u000a\u0009\u0009\u007d\u000a\u0009\u0009\u0072\u0065\u0074\u0075\u0072\u006e\u0020\u0061\u0044\u0061\u0074\u0061\u003b\u0009\u0009\u000a\u0009\u007d\u000a\u0009\u000a\u0009\u0070\u0072\u0069\u0076\u0061\u0074\u0065\u0020\u0073\u0074\u0061\u0074\u0069\u0063\u0020\u0053\u0074\u0072\u0069\u006e\u0067\u0020\u006d\u0064\u0035\u0028\u0066\u0069\u006e\u0061\u006c\u0020\u0053\u0074\u0072\u0069\u006e\u0067\u0020\u0069\u006e\u0070\u0075\u0074\u0029\u0020\u0074\u0068\u0072\u006f\u0077\u0073\u0020\u004e\u006f\u0053\u0075\u0063\u0068\u0041\u006c\u0067\u006f\u0072\u0069\u0074\u0068\u006d\u0045\u0078\u0063\u0065\u0070\u0074\u0069\u006f\u006e\u0020\u007b\u000a\u0009\u0009\u0066\u0069\u006e\u0061\u006c\u0020\u004d\u0065\u0073\u0073\u0061\u0067\u0065\u0044\u0069\u0067\u0065\u0073\u0074\u0020\u006d\u0064\u0020\u003d\u0020\u004d\u0065\u0073\u0073\u0061\u0067\u0065\u0044\u0069\u0067\u0065\u0073\u0074\u002e\u0067\u0065\u0074\u0049\u006e\u0073\u0074\u0061\u006e\u0063\u0065\u0028\u0022\u004d\u0044\u0035\u0022\u0029\u003b\u000a\u0009\u0009\u0066\u0069\u006e\u0061\u006c\u0020\u0062\u0079\u0074\u0065\u005b\u005d\u0020\u006d\u0065\u0073\u0073\u0061\u0067\u0065\u0044\u0069\u0067\u0065\u0073\u0074\u0020\u003d\u0020\u006d\u0064\u002e\u0064\u0069\u0067\u0065\u0073\u0074\u0028\u0069\u006e\u0070\u0075\u0074\u002e\u0067\u0065\u0074\u0042\u0079\u0074\u0065\u0073\u0028\u0029\u0029\u003b\u000a\u0009\u0009\u0066\u0069\u006e\u0061\u006c\u0020\u0042\u0069\u0067\u0049\u006e\u0074\u0065\u0067\u0065\u0072\u0020\u006e\u0075\u006d\u0062\u0065\u0072\u0020\u003d\u0020\u006e\u0065\u0077\u0020\u0042\u0069\u0067\u0049\u006e\u0074\u0065\u0067\u0065\u0072\u0028\u0031\u002c\u0020\u006d\u0065\u0073\u0073\u0061\u0067\u0065\u0044\u0069\u0067\u0065\u0073\u0074\u0029\u003b\u000a\u0009\u0009\u0072\u0065\u0074\u0075\u0072\u006e\u0020\u0053\u0074\u0072\u0069\u006e\u0067\u002e\u0066\u006f\u0072\u006d\u0061\u0074\u0028\u0022\u0025\u0030\u0033\u0032\u0078\u0022\u002c\u0020\u006e\u0075\u006d\u0062\u0065\u0072\u0029\u003b\u000a\u0009\u007d\u000a\u000a\u0009\u0070\u0072\u0069\u0076\u0061\u0074\u0065\u0020\u0073\u0074\u0061\u0074\u0069\u0063\u0020\u0043\u0069\u0070\u0068\u0065\u0072\u0020\u0069\u006e\u0069\u0074\u0043\u0069\u0070\u0068\u0065\u0072\u0028\u0066\u0069\u006e\u0061\u006c\u0020\u0069\u006e\u0074\u0020\u006d\u006f\u0064\u0065\u002c\u0020\u0066\u0069\u006e\u0061\u006c\u0020\u0053\u0074\u0072\u0069\u006e\u0067\u0020\u0069\u006e\u0069\u0074\u0069\u0061\u006c\u0056\u0065\u0063\u0074\u006f\u0072\u0053\u0074\u0072\u0069\u006e\u0067\u002c\u0020\u0066\u0069\u006e\u0061\u006c\u0020\u0053\u0074\u0072\u0069\u006e\u0067\u0020\u0073\u0065\u0063\u0072\u0065\u0074\u004b\u0065\u0079\u0029\u000a\u0009\u0009\u0009\u0074\u0068\u0072\u006f\u0077\u0073\u0020\u004e\u006f\u0053\u0075\u0063\u0068\u0041\u006c\u0067\u006f\u0072\u0069\u0074\u0068\u006d\u0045\u0078\u0063\u0065\u0070\u0074\u0069\u006f\u006e\u002c\u0020\u004e\u006f\u0053\u0075\u0063\u0068\u0050\u0061\u0064\u0064\u0069\u006e\u0067\u0045\u0078\u0063\u0065\u0070\u0074\u0069\u006f\u006e\u002c\u0020\u0049\u006e\u0076\u0061\u006c\u0069\u0064\u004b\u0065\u0079\u0045\u0078\u0063\u0065\u0070\u0074\u0069\u006f\u006e\u002c\u000a\u0009\u0009\u0009\u0049\u006e\u0076\u0061\u006c\u0069\u0064\u0041\u006c\u0067\u006f\u0072\u0069\u0074\u0068\u006d\u0050\u0061\u0072\u0061\u006d\u0065\u0074\u0065\u0072\u0045\u0078\u0063\u0065\u0070\u0074\u0069\u006f\u006e\u0020\u007b\u000a\u0009\u0009\u0066\u0069\u006e\u0061\u006c\u0020\u0053\u0065\u0063\u0072\u0065\u0074\u004b\u0065\u0079\u0053\u0070\u0065\u0063\u0020\u0073\u006b\u0065\u0079\u0053\u0070\u0065\u0063\u0020\u003d\u0020\u006e\u0065\u0077\u0020\u0053\u0065\u0063\u0072\u0065\u0074\u004b\u0065\u0079\u0053\u0070\u0065\u0063\u0028\u0074\u006f\u0042\u0079\u0074\u0065\u0041\u0072\u0072\u0061\u0079\u0028\u006d\u0064\u0035\u0028\u0073\u0065\u0063\u0072\u0065\u0074\u004b\u0065\u0079\u0029\u0029\u002c\u0020\u0022\u0041\u0045\u0053\u0022\u0029\u003b\u000a\u0009\u0009\u0066\u0069\u006e\u0061\u006c\u0020\u0049\u0076\u0050\u0061\u0072\u0061\u006d\u0065\u0074\u0065\u0072\u0053\u0070\u0065\u0063\u0020\u0069\u006e\u0069\u0074\u0069\u0061\u006c\u0056\u0065\u0063\u0074\u006f\u0072\u0020\u003d\u0020\u006e\u0065\u0077\u0020\u0049\u0076\u0050\u0061\u0072\u0061\u006d\u0065\u0074\u0065\u0072\u0053\u0070\u0065\u0063\u0028\u0069\u006e\u0069\u0074\u0069\u0061\u006c\u0056\u0065\u0063\u0074\u006f\u0072\u0053\u0074\u0072\u0069\u006e\u0067\u002e\u0067\u0065\u0074\u0042\u0079\u0074\u0065\u0073\u0028\u0029\u0029\u003b\u000a\u0009\u0009\u0066\u0069\u006e\u0061\u006c\u0020\u0043\u0069\u0070\u0068\u0065\u0072\u0020\u0063\u0069\u0070\u0068\u0065\u0072\u0020\u003d\u0020\u0043\u0069\u0070\u0068\u0065\u0072\u002e\u0067\u0065\u0074\u0049\u006e\u0073\u0074\u0061\u006e\u0063\u0065\u0028\u0022\u0041\u0045\u0053\u002f\u0043\u0046\u0042\u0038\u002f\u004e\u006f\u0050\u0061\u0064\u0064\u0069\u006e\u0067\u0022\u0029\u003b\u000a\u0009\u0009\u0063\u0069\u0070\u0068\u0065\u0072\u002e\u0069\u006e\u0069\u0074\u0028\u006d\u006f\u0064\u0065\u002c\u0020\u0073\u006b\u0065\u0079\u0053\u0070\u0065\u0063\u002c\u0020\u0069\u006e\u0069\u0074\u0069\u0061\u006c\u0056\u0065\u0063\u0074\u006f\u0072\u0029\u003b\u000a\u0009\u0009\u0072\u0065\u0074\u0075\u0072\u006e\u0020\u0063\u0069\u0070\u0068\u0065\u0072\u003b\u000a\u0009\u007d\u000a\u000a\u0009\u0070\u0075\u0062\u006c\u0069\u0063\u0020\u0073\u0074\u0061\u0074\u0069\u0063\u0020\u0062\u0079\u0074\u0065\u005b\u005d\u0020\u0074\u006f\u0042\u0079\u0074\u0065\u0041\u0072\u0072\u0061\u0079\u0028\u0053\u0074\u0072\u0069\u006e\u0067\u0020\u0073\u0029\u0020\u007b\u000a\u0009\u0009\u0072\u0065\u0074\u0075\u0072\u006e\u0020\u0044\u0061\u0074\u0061\u0074\u0079\u0070\u0065\u0043\u006f\u006e\u0076\u0065\u0072\u0074\u0065\u0072\u002e\u0070\u0061\u0072\u0073\u0065\u0048\u0065\u0078\u0042\u0069\u006e\u0061\u0072\u0079\u0028\u0073\u0029\u003b\u000a\u0009\u007d\u000a\u0009\u000a\u0009\u0070\u0072\u0069\u0076\u0061\u0074\u0065\u0020\u0053\u0074\u0072\u0069\u006e\u0067\u0020\u0064\u0065\u0063\u0072\u0079\u0070\u0074\u0028\u0066\u0069\u006e\u0061\u006c\u0020\u0053\u0074\u0072\u0069\u006e\u0067\u0020\u0065\u006e\u0063\u0072\u0079\u0070\u0074\u0065\u0064\u0044\u0061\u0074\u0061\u002c\u0020\u0066\u0069\u006e\u0061\u006c\u0020\u0053\u0074\u0072\u0069\u006e\u0067\u0020\u0069\u006e\u0069\u0074\u0069\u0061\u006c\u0056\u0065\u0063\u0074\u006f\u0072\u002c\u0020\u0066\u0069\u006e\u0061\u006c\u0020\u0053\u0074\u0072\u0069\u006e\u0067\u0020\u0073\u0065\u0063\u0072\u0065\u0074\u004b\u0065\u0079\u0029\u0020\u007b\u000a\u0009\u0009\u0053\u0074\u0072\u0069\u006e\u0067\u0020\u0064\u0065\u0063\u0072\u0079\u0070\u0074\u0065\u0064\u0044\u0061\u0074\u0061\u0020\u003d\u0020\u006e\u0075\u006c\u006c\u003b\u000a\u0009\u0009\u0074\u0072\u0079\u0020\u007b\u000a\u0009\u0009\u0009\u0066\u0069\u006e\u0061\u006c\u0020\u0043\u0069\u0070\u0068\u0065\u0072\u0020\u0063\u0069\u0070\u0068\u0065\u0072\u0020\u003d\u0020\u0069\u006e\u0069\u0074\u0043\u0069\u0070\u0068\u0065\u0072\u0028\u0043\u0069\u0070\u0068\u0065\u0072\u002e\u0044\u0045\u0043\u0052\u0059\u0050\u0054\u005f\u004d\u004f\u0044\u0045\u002c\u0020\u0069\u006e\u0069\u0074\u0069\u0061\u006c\u0056\u0065\u0063\u0074\u006f\u0072\u002c\u0020\u0073\u0065\u0063\u0072\u0065\u0074\u004b\u0065\u0079\u0029\u003b\u000a\u0009\u0009\u0009\u0066\u0069\u006e\u0061\u006c\u0020\u0062\u0079\u0074\u0065\u005b\u005d\u0020\u0065\u006e\u0063\u0072\u0079\u0070\u0074\u0065\u0064\u0042\u0079\u0074\u0065\u0041\u0072\u0072\u0061\u0079\u0020\u003d\u0020\u0042\u0061\u0073\u0065\u0036\u0034\u002e\u0067\u0065\u0074\u0044\u0065\u0063\u006f\u0064\u0065\u0072\u0028\u0029\u002e\u0064\u0065\u0063\u006f\u0064\u0065\u0028\u0065\u006e\u0063\u0072\u0079\u0070\u0074\u0065\u0064\u0044\u0061\u0074\u0061\u0029\u003b\u000a\u0009\u0009\u0009\u0066\u0069\u006e\u0061\u006c\u0020\u0062\u0079\u0074\u0065\u005b\u005d\u0020\u0064\u0065\u0063\u0072\u0079\u0070\u0074\u0065\u0064\u0042\u0079\u0074\u0065\u0041\u0072\u0072\u0061\u0079\u0020\u003d\u0020\u0063\u0069\u0070\u0068\u0065\u0072\u002e\u0064\u006f\u0046\u0069\u006e\u0061\u006c\u0028\u0065\u006e\u0063\u0072\u0079\u0070\u0074\u0065\u0064\u0042\u0079\u0074\u0065\u0041\u0072\u0072\u0061\u0079\u0029\u003b\u000a\u0009\u0009\u0009\u0064\u0065\u0063\u0072\u0079\u0070\u0074\u0065\u0064\u0044\u0061\u0074\u0061\u0020\u003d\u0020\u006e\u0065\u0077\u0020\u0053\u0074\u0072\u0069\u006e\u0067\u0028\u0064\u0065\u0063\u0072\u0079\u0070\u0074\u0065\u0064\u0042\u0079\u0074\u0065\u0041\u0072\u0072\u0061\u0079\u002c\u0020\u0022\u0055\u0054\u0046\u0038\u0022\u0029\u003b\u000a\u0009\u0009\u007d\u0020\u0063\u0061\u0074\u0063\u0068\u0020\u0028\u0045\u0078\u0063\u0065\u0070\u0074\u0069\u006f\u006e\u0020\u0065\u0029\u0020\u007b\u000a\u0009\u0009\u007d\u000a\u0009\u0009\u0072\u0065\u0074\u0075\u0072\u006e\u0020\u0064\u0065\u0063\u0072\u0079\u0070\u0074\u0065\u0064\u0044\u0061\u0074\u0061\u003b\u000a\u0009\u007d\u002f\u002a */
+
+
} \ No newline at end of file
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 25e838e57a..f2eca2a697 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
@@ -16,6 +16,7 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Input
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Maintenance;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Muffler;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Output;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_OutputBus;
import gregtech.api.objects.GT_ItemStack;
import gregtech.api.objects.GT_RenderedTexture;
import gregtech.api.util.GT_Recipe;
@@ -24,6 +25,9 @@ import gregtech.api.util.Recipe_GT;
import gregtech.common.gui.GT_GUIContainer_FusionReactor;
import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.block.ModBlocks;
+import gtPlusPlus.core.item.chemistry.IonParticles;
+import gtPlusPlus.core.lib.CORE;
+import gtPlusPlus.core.util.math.MathUtils;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
import net.minecraft.block.Block;
@@ -111,30 +115,30 @@ public class GregtechMetaTileEntity_Cyclotron extends GregtechMeta_MultiBlockBas
&& ((isAdvancedMachineCasing(xCenter, yCenter, zCenter + 5)) || (zCenter + 5 == getBaseMetaTileEntity().getZCoord()))
&& ((isAdvancedMachineCasing(xCenter, yCenter, zCenter - 5)) || (zCenter - 5 == getBaseMetaTileEntity().getZCoord())) && (checkCoils(xCenter, yCenter, zCenter))
&& (checkHulls(xCenter, yCenter, zCenter)) && (checkUpperOrLowerHulls(xCenter, yCenter + 1, zCenter)) && (checkUpperOrLowerHulls(xCenter, yCenter - 1, zCenter))
- && (addIfEnergyInjector(xCenter + 4, yCenter, zCenter + 3, aBaseMetaTileEntity)) && (addIfEnergyInjector(xCenter + 4, yCenter, zCenter - 3, aBaseMetaTileEntity))
- && (addIfEnergyInjector(xCenter + 4, yCenter, zCenter + 5, aBaseMetaTileEntity)) && (addIfEnergyInjector(xCenter + 4, yCenter, zCenter - 5, aBaseMetaTileEntity))
- && (addIfEnergyInjector(xCenter - 4, yCenter, zCenter + 3, aBaseMetaTileEntity)) && (addIfEnergyInjector(xCenter - 4, yCenter, zCenter - 3, aBaseMetaTileEntity))
- && (addIfEnergyInjector(xCenter - 4, yCenter, zCenter + 5, aBaseMetaTileEntity)) && (addIfEnergyInjector(xCenter - 4, yCenter, zCenter - 5, aBaseMetaTileEntity))
- && (addIfEnergyInjector(xCenter + 3, yCenter, zCenter + 4, aBaseMetaTileEntity)) && (addIfEnergyInjector(xCenter - 3, yCenter, zCenter + 4, aBaseMetaTileEntity))
- && (addIfEnergyInjector(xCenter + 5, yCenter, zCenter + 4, aBaseMetaTileEntity)) && (addIfEnergyInjector(xCenter - 5, yCenter, zCenter + 4, aBaseMetaTileEntity))
- && (addIfEnergyInjector(xCenter + 3, yCenter, zCenter - 4, aBaseMetaTileEntity)) && (addIfEnergyInjector(xCenter - 3, yCenter, zCenter - 4, aBaseMetaTileEntity))
- && (addIfEnergyInjector(xCenter + 5, yCenter, zCenter - 4, aBaseMetaTileEntity)) && (addIfEnergyInjector(xCenter - 5, yCenter, zCenter - 4, aBaseMetaTileEntity))
- && (addIfExtractor(xCenter + 1, yCenter, zCenter - 5, aBaseMetaTileEntity)) && (addIfExtractor(xCenter + 1, yCenter, zCenter + 5, aBaseMetaTileEntity))
- && (addIfExtractor(xCenter - 1, yCenter, zCenter - 5, aBaseMetaTileEntity)) && (addIfExtractor(xCenter - 1, yCenter, zCenter + 5, aBaseMetaTileEntity))
- && (addIfExtractor(xCenter + 1, yCenter, zCenter - 7, aBaseMetaTileEntity)) && (addIfExtractor(xCenter + 1, yCenter, zCenter + 7, aBaseMetaTileEntity))
- && (addIfExtractor(xCenter - 1, yCenter, zCenter - 7, aBaseMetaTileEntity)) && (addIfExtractor(xCenter - 1, yCenter, zCenter + 7, aBaseMetaTileEntity))
- && (addIfExtractor(xCenter + 5, yCenter, zCenter - 1, aBaseMetaTileEntity)) && (addIfExtractor(xCenter + 5, yCenter, zCenter + 1, aBaseMetaTileEntity))
- && (addIfExtractor(xCenter - 5, yCenter, zCenter - 1, aBaseMetaTileEntity)) && (addIfExtractor(xCenter - 5, yCenter, zCenter + 1, aBaseMetaTileEntity))
- && (addIfExtractor(xCenter + 7, yCenter, zCenter - 1, aBaseMetaTileEntity)) && (addIfExtractor(xCenter + 7, yCenter, zCenter + 1, aBaseMetaTileEntity))
- && (addIfExtractor(xCenter - 7, yCenter, zCenter - 1, aBaseMetaTileEntity)) && (addIfExtractor(xCenter - 7, yCenter, zCenter + 1, aBaseMetaTileEntity))
- && (addIfInjector(xCenter + 1, yCenter + 1, zCenter - 6, aBaseMetaTileEntity)) && (addIfInjector(xCenter + 1, yCenter + 1, zCenter + 6, aBaseMetaTileEntity))
- && (addIfInjector(xCenter - 1, yCenter + 1, zCenter - 6, aBaseMetaTileEntity)) && (addIfInjector(xCenter - 1, yCenter + 1, zCenter + 6, aBaseMetaTileEntity))
- && (addIfInjector(xCenter - 6, yCenter + 1, zCenter + 1, aBaseMetaTileEntity)) && (addIfInjector(xCenter + 6, yCenter + 1, zCenter + 1, aBaseMetaTileEntity))
- && (addIfInjector(xCenter - 6, yCenter + 1, zCenter - 1, aBaseMetaTileEntity)) && (addIfInjector(xCenter + 6, yCenter + 1, zCenter - 1, aBaseMetaTileEntity))
- && (addIfInjector(xCenter + 1, yCenter - 1, zCenter - 6, aBaseMetaTileEntity)) && (addIfInjector(xCenter + 1, yCenter - 1, zCenter + 6, aBaseMetaTileEntity))
- && (addIfInjector(xCenter - 1, yCenter - 1, zCenter - 6, aBaseMetaTileEntity)) && (addIfInjector(xCenter - 1, yCenter - 1, zCenter + 6, aBaseMetaTileEntity))
- && (addIfInjector(xCenter - 6, yCenter - 1, zCenter + 1, aBaseMetaTileEntity)) && (addIfInjector(xCenter + 6, yCenter - 1, zCenter + 1, aBaseMetaTileEntity))
- && (addIfInjector(xCenter - 6, yCenter - 1, zCenter - 1, aBaseMetaTileEntity)) && (addIfInjector(xCenter + 6, yCenter - 1, zCenter - 1, aBaseMetaTileEntity))
+ && (isAdvancedMachineCasing(xCenter + 4, yCenter, zCenter + 3)) && (isAdvancedMachineCasing(xCenter + 4, yCenter, zCenter - 3))
+ && (isAdvancedMachineCasing(xCenter + 4, yCenter, zCenter + 5)) && (isAdvancedMachineCasing(xCenter + 4, yCenter, zCenter - 5))
+ && (isAdvancedMachineCasing(xCenter - 4, yCenter, zCenter + 3)) && (isAdvancedMachineCasing(xCenter - 4, yCenter, zCenter - 3))
+ && (isAdvancedMachineCasing(xCenter - 4, yCenter, zCenter + 5)) && (isAdvancedMachineCasing(xCenter - 4, yCenter, zCenter - 5))
+ && (isAdvancedMachineCasing(xCenter + 3, yCenter, zCenter + 4)) && (isAdvancedMachineCasing(xCenter - 3, yCenter, zCenter + 4))
+ && (isAdvancedMachineCasing(xCenter + 5, yCenter, zCenter + 4)) && (isAdvancedMachineCasing(xCenter - 5, yCenter, zCenter + 4))
+ && (isAdvancedMachineCasing(xCenter + 3, yCenter, zCenter - 4)) && (isAdvancedMachineCasing(xCenter - 3, yCenter, zCenter - 4))
+ && (isAdvancedMachineCasing(xCenter + 5, yCenter, zCenter - 4)) && (isAdvancedMachineCasing(xCenter - 5, yCenter, zCenter - 4))
+ && (isAdvancedMachineCasing(xCenter + 1, yCenter, zCenter - 5)) && (isAdvancedMachineCasing(xCenter + 1, yCenter, zCenter + 5))
+ && (isAdvancedMachineCasing(xCenter - 1, yCenter, zCenter - 5)) && (isAdvancedMachineCasing(xCenter - 1, yCenter, zCenter + 5))
+ && (isAdvancedMachineCasing(xCenter + 1, yCenter, zCenter - 7)) && (isAdvancedMachineCasing(xCenter + 1, yCenter, zCenter + 7))
+ && (isAdvancedMachineCasing(xCenter - 1, yCenter, zCenter - 7)) && (isAdvancedMachineCasing(xCenter - 1, yCenter, zCenter + 7))
+ && (isAdvancedMachineCasing(xCenter + 5, yCenter, zCenter - 1)) && (isAdvancedMachineCasing(xCenter + 5, yCenter, zCenter + 1))
+ && (isAdvancedMachineCasing(xCenter - 5, yCenter, zCenter - 1)) && (isAdvancedMachineCasing(xCenter - 5, yCenter, zCenter + 1))
+ && (isAdvancedMachineCasing(xCenter + 7, yCenter, zCenter - 1)) && (isAdvancedMachineCasing(xCenter + 7, yCenter, zCenter + 1))
+ && (isAdvancedMachineCasing(xCenter - 7, yCenter, zCenter - 1)) && (isAdvancedMachineCasing(xCenter - 7, yCenter, zCenter + 1))
+ && (isAdvancedMachineCasing(xCenter + 1, yCenter + 1, zCenter - 6)) && (isAdvancedMachineCasing(xCenter + 1, yCenter + 1, zCenter + 6))
+ && (isAdvancedMachineCasing(xCenter - 1, yCenter + 1, zCenter - 6)) && (isAdvancedMachineCasing(xCenter - 1, yCenter + 1, zCenter + 6))
+ && (isAdvancedMachineCasing(xCenter - 6, yCenter + 1, zCenter + 1)) && (isAdvancedMachineCasing(xCenter + 6, yCenter + 1, zCenter + 1))
+ && (isAdvancedMachineCasing(xCenter - 6, yCenter + 1, zCenter - 1)) && (isAdvancedMachineCasing(xCenter + 6, yCenter + 1, zCenter - 1))
+ && (isAdvancedMachineCasing(xCenter + 1, yCenter - 1, zCenter - 6)) && (isAdvancedMachineCasing(xCenter + 1, yCenter - 1, zCenter + 6))
+ && (isAdvancedMachineCasing(xCenter - 1, yCenter - 1, zCenter - 6)) && (isAdvancedMachineCasing(xCenter - 1, yCenter - 1, zCenter + 6))
+ && (isAdvancedMachineCasing(xCenter - 6, yCenter - 1, zCenter + 1)) && (isAdvancedMachineCasing(xCenter + 6, yCenter - 1, zCenter + 1))
+ && (isAdvancedMachineCasing(xCenter - 6, yCenter - 1, zCenter - 1)) && (isAdvancedMachineCasing(xCenter + 6, yCenter - 1, zCenter - 1))
&& (this.mEnergyHatches.size() >= 1) && (this.mOutputBusses.size() >= 1) && (this.mInputHatches.size() >= 1) && (this.mInputBusses.size() >= 1)) {
int mEnergyHatches_sS = this.mEnergyHatches.size();
for (int i = 0; i < mEnergyHatches_sS; i++) {
@@ -236,12 +240,35 @@ public class GregtechMetaTileEntity_Cyclotron extends GregtechMeta_MultiBlockBas
private boolean isAdvancedMachineCasing(int aX, int aY, int aZ) {
final Block aBlock = getBaseMetaTileEntity().getBlock(aX, aY, aZ);
final int aMeta = getBaseMetaTileEntity().getMetaID(aX, aY, aZ);
- final IGregTechTileEntity tTileEntity2 = getBaseMetaTileEntity().getIGregTechTileEntity(aX, aY, aZ);
- return isValidBlockForStructure(tTileEntity2, TAE.GTPP_INDEX(26), true, aBlock, aMeta, getCasing(), getCasingMeta());
+ final IGregTechTileEntity tTileEntity2 = getBaseMetaTileEntity().getIGregTechTileEntity(aX, aY, aZ);
+
+ boolean debug = isValidBlockForStructure(tTileEntity2, TAE.GTPP_INDEX(26), true, aBlock, aMeta, getCasing(), getCasingMeta());
+
+ /*if (!debug) {
+ this.getBaseMetaTileEntity().getWorld().setBlock(aX, aY, aZ, ModBlocks.blockCompressedObsidian);
+ Logger.INFO(""+aX+"/"+aY+"/"+aZ);
+ }*/
+
+ return debug;
}
private boolean isCyclotronCoil(int aX, int aY, int aZ) {
- return (getBaseMetaTileEntity().getBlock(aX, aY, aZ) == getCyclotronCoil() && (getBaseMetaTileEntity().getMetaID(aX, aY, aZ) == getCyclotronCoilMeta()));
+
+ final Block aBlock = getBaseMetaTileEntity().getBlock(aX, aY, aZ);
+ final int aMeta = getBaseMetaTileEntity().getMetaID(aX, aY, aZ);
+
+ boolean debug = isValidBlockForStructure(null, 0, false, aBlock, aMeta, getCyclotronCoil(), getCyclotronCoilMeta());
+
+ /*if (!debug) {
+ this.getBaseMetaTileEntity().getWorld().setBlock(aX, aY, aZ, ModBlocks.blockCompressedObsidian);
+ Logger.INFO(""+aX+"/"+aY+"/"+aZ);
+ }*/
+
+ return debug;
+
+
+
+
}
public Block getCasing() {
@@ -270,6 +297,7 @@ public class GregtechMetaTileEntity_Cyclotron extends GregtechMeta_MultiBlockBas
"Which will be extracted from the Isochronous Cyclotron",
"------------------------------------------------------------",
"Consists of the same layout as a Fusion Reactor",
+ "Any external casing can be a hatch/bus, unlike Fusion",
"Cyclotron Machine Casings around Cyclotron Coil Blocks",
"All Hatches must be IV or better",
"1-16 Input Hatches",
@@ -296,12 +324,9 @@ public class GregtechMetaTileEntity_Cyclotron extends GregtechMeta_MultiBlockBas
public IIconContainer getIconOverlay() {
if (this.getBaseMetaTileEntity().isActive()){
- return TexturesGtBlock.Overlay_Machine_Dimensional_Orange;
+ return TexturesGtBlock.Overlay_MatterFab_Active_Animated;
}
- return TexturesGtBlock.Overlay_Machine_Dimensional_Blue;
- //mobessence
-
-
+ return TexturesGtBlock.Overlay_MatterFab_Animated;
}
@Override
@@ -311,6 +336,12 @@ public class GregtechMetaTileEntity_Cyclotron extends GregtechMeta_MultiBlockBas
@Override
public boolean checkRecipe(ItemStack aStack) {
+
+ /*if (CORE.DEVENV) {
+ return this.checkRecipeGeneric();
+ }*/
+
+
//Logger.INFO("Recipe Check.");
ArrayList<ItemStack> tItemList = getStoredInputs();
ItemStack[] tItemInputs = tItemList.toArray(new ItemStack[tItemList.size()]);
@@ -352,6 +383,28 @@ public class GregtechMetaTileEntity_Cyclotron extends GregtechMeta_MultiBlockBas
}
}
+ for (ItemStack s : outputs) {
+ if (s != null) {
+ if (s.getItem() instanceof IonParticles) {
+ long aCharge = IonParticles.getChargeState(s);
+ if (aCharge == 0) {
+ IonParticles.setChargeState(s, MathUtils.getRandomFromArray(new int[] {
+ -5, -5,
+ -4, -4, -4,
+ -3, -3, -3, -3, -3,
+ -2, -2, -2, -2, -2, -2, -2,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 3, 3, 3, 3, 3, 3, 3,
+ 4, 4, 4, 4,
+ 5, 5, 5,
+ 6, 6}));
+ }
+ }
+ }
+ }
+
this.mOutputItems = outputs;
this.mOutputFluids = new FluidStack[] {tRecipe.getFluidOutput(0)};
return true;
@@ -375,6 +428,10 @@ public class GregtechMetaTileEntity_Cyclotron extends GregtechMeta_MultiBlockBas
if (aBaseMetaTileEntity.isServerSide()) {
if (mEfficiency < 0)
mEfficiency = 0;
+
+ onRunningTick(null);
+
+
if (mRunningOnLoad && checkMultiblock(aBaseMetaTileEntity, mInventory[1])) {
this.mEUStore = (int) aBaseMetaTileEntity.getStoredEU();
checkRecipe(mInventory[1]);
@@ -461,7 +518,34 @@ public class GregtechMetaTileEntity_Cyclotron extends GregtechMeta_MultiBlockBas
}
@Override
- public boolean onRunningTick(ItemStack aStack) {
+ public boolean onRunningTick(ItemStack aStack) {
+ if (this.mOutputBusses.size() > 0) {
+ for (GT_MetaTileEntity_Hatch_OutputBus g : this.mOutputBusses) {
+ if (g != null) {
+ for (ItemStack s : g.mInventory) {
+ if (s != null) {
+ if (s.getItem() instanceof IonParticles) {
+ long aCharge = IonParticles.getChargeState(s);
+ if (aCharge == 0) {
+ IonParticles.setChargeState(s, MathUtils.getRandomFromArray(new int[] {
+ -5, -5,
+ -4, -4, -4,
+ -3, -3, -3, -3, -3,
+ -2, -2, -2, -2, -2, -2, -2,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 3, 3, 3, 3, 3, 3, 3,
+ 4, 4, 4, 4,
+ 5, 5, 5,
+ 6, 6}));
+ }
+ }
+ }
+ }
+ }
+ }
+ }
return true;
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_BlastSmelter.java b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_BlastSmelter.java
index d6be5def19..9e00ada163 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_BlastSmelter.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_BlastSmelter.java
@@ -4,22 +4,22 @@ import java.util.ArrayList;
import java.util.HashSet;
import java.util.Set;
-import net.minecraft.item.ItemStack;
-
import gregtech.api.enums.GT_Values;
import gregtech.api.enums.ItemList;
-
import gtPlusPlus.api.interfaces.RunnableWithInfo;
import gtPlusPlus.api.objects.Logger;
-import gtPlusPlus.core.item.ModItems;
import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.material.*;
+import gtPlusPlus.core.material.ALLOY;
+import gtPlusPlus.core.material.Material;
+import gtPlusPlus.core.material.MaterialGenerator;
+import gtPlusPlus.core.material.MaterialStack;
import gtPlusPlus.core.material.nuclear.FLUORIDES;
import gtPlusPlus.core.material.nuclear.NUCLIDE;
import gtPlusPlus.core.material.state.MaterialState;
import gtPlusPlus.core.util.minecraft.FluidUtils;
import gtPlusPlus.core.util.minecraft.ItemUtils;
import gtPlusPlus.core.util.minecraft.MaterialUtils;
+import net.minecraft.item.ItemStack;
import net.minecraftforge.fluids.FluidStack;
public class RecipeGen_BlastSmelter extends RecipeGen_Base {
@@ -208,7 +208,7 @@ public class RecipeGen_BlastSmelter extends RecipeGen_Base {
if (M.getComposites().get(irc) != null){
final int r = (int) M.vSmallestRatio[irc];
inputStackCount = inputStackCount+r;
- if ((M.getComposites().get(irc).getStackMaterial().getState() != MaterialState.SOLID) || ((M.getComposites().get(irc).getDustStack(r) == null) || (M.getComposites().get(irc).getDustStack(r) == ItemUtils.getSimpleStack(ModItems.AAA_Broken)))){
+ if ((M.getComposites().get(irc).getStackMaterial().getState() != MaterialState.SOLID) || !ItemUtils.checkForInvalidItems(M.getComposites().get(irc).getDustStack(r))){
final int xr = r;
if ((xr > 0) && (xr <= 100)){
final int mathmatics = (r*1000);
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java b/src/Java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java
index 1d99b1c2d7..05fb2a5471 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java
@@ -442,19 +442,16 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder {
@Override
public boolean addCyclotronRecipe(ItemStack aInputs, FluidStack aFluidInput, ItemStack[] aOutputs,
FluidStack aFluidOutput, int[] aChances, int aDuration, int aEUt, int aSpecialValue) {
- return addCyclotronRecipe(new ItemStack[] {aInputs}, aFluidInput, aOutputs[0], aFluidOutput, aChances, aDuration, aEUt, aSpecialValue);
+ return addCyclotronRecipe(new ItemStack[] {aInputs}, aFluidInput, aOutputs, aFluidOutput, aChances, aDuration, aEUt, aSpecialValue);
}
@Override
- public boolean addCyclotronRecipe(ItemStack[] aInputs, FluidStack aFluidInput, ItemStack aOutput,
+ public boolean addCyclotronRecipe(ItemStack[] aInputs, FluidStack aFluidInput, ItemStack[] aOutput,
FluidStack aFluidOutput, int[] aChances, int aDuration, int aEUt, int aSpecialValue) {
- if (aOutput == null) {
+ if (aOutput == null || aOutput.length < 1 || !ItemUtils.checkForInvalidItems(aOutput)) {
return false;
}
- if ((aDuration = GregTech_API.sRecipeFile.get("cyclotron", aOutput, aDuration)) <= 0) {
- return false;
- }
- if (Recipe_GT.Gregtech_Recipe_Map.sCyclotronRecipes.addRecipe(true, aInputs, new ItemStack[] { aOutput },
+ if (Recipe_GT.Gregtech_Recipe_Map.sCyclotronRecipes.addRecipe(true, aInputs, aOutput,
null, aChances, new FluidStack[] { aFluidInput }, new FluidStack[] { aFluidOutput },
Math.max(1, aDuration), Math.max(1, aEUt), aSpecialValue) != null) {
return true;