aboutsummaryrefslogtreecommitdiff
path: root/main/java/gregtech/api
diff options
context:
space:
mode:
authorShawn Buckley <shawntbuckley@gmail.com>2015-10-18 23:04:39 -0400
committerShawn Buckley <shawntbuckley@gmail.com>2015-10-18 23:04:39 -0400
commit85c804fa112fd1f19c91e45d150a787cfbf0f7a8 (patch)
treecb302d8e0f46e06be0b1d391317578b165aec245 /main/java/gregtech/api
parentce25063b910bb3bdd2b0c234b185fc4077caebdb (diff)
downloadGT5-Unofficial-85c804fa112fd1f19c91e45d150a787cfbf0f7a8.tar.gz
GT5-Unofficial-85c804fa112fd1f19c91e45d150a787cfbf0f7a8.tar.bz2
GT5-Unofficial-85c804fa112fd1f19c91e45d150a787cfbf0f7a8.zip
Move source directory
Diffstat (limited to 'main/java/gregtech/api')
-rw-r--r--main/java/gregtech/api/GregTech_API.java566
-rw-r--r--main/java/gregtech/api/damagesources/GT_DamageSources.java86
-rw-r--r--main/java/gregtech/api/enchants/Enchantment_EnderDamage.java58
-rw-r--r--main/java/gregtech/api/enchants/Enchantment_Radioactivity.java61
-rw-r--r--main/java/gregtech/api/enums/ConfigCategories.java64
-rw-r--r--main/java/gregtech/api/enums/Dyes.java105
-rw-r--r--main/java/gregtech/api/enums/Element.java311
-rw-r--r--main/java/gregtech/api/enums/GT_Values.java160
-rw-r--r--main/java/gregtech/api/enums/ItemList.java785
-rw-r--r--main/java/gregtech/api/enums/Materials.java1670
-rw-r--r--main/java/gregtech/api/enums/OreDictNames.java78
-rw-r--r--main/java/gregtech/api/enums/OrePrefixes.java798
-rw-r--r--main/java/gregtech/api/enums/SubTag.java306
-rw-r--r--main/java/gregtech/api/enums/TC_Aspects.java108
-rw-r--r--main/java/gregtech/api/enums/TextureSet.java184
-rw-r--r--main/java/gregtech/api/enums/Textures.java453
-rw-r--r--main/java/gregtech/api/enums/Tier.java91
-rw-r--r--main/java/gregtech/api/enums/ToolDictNames.java32
-rw-r--r--main/java/gregtech/api/events/BlockScanningEvent.java41
-rw-r--r--main/java/gregtech/api/gui/GT_Container.java564
-rw-r--r--main/java/gregtech/api/gui/GT_ContainerMetaTile_Machine.java152
-rw-r--r--main/java/gregtech/api/gui/GT_Container_1by1.java27
-rw-r--r--main/java/gregtech/api/gui/GT_Container_2by2.java30
-rw-r--r--main/java/gregtech/api/gui/GT_Container_3by3.java35
-rw-r--r--main/java/gregtech/api/gui/GT_Container_4by4.java42
-rw-r--r--main/java/gregtech/api/gui/GT_Container_BasicMachine.java249
-rw-r--r--main/java/gregtech/api/gui/GT_Container_BasicTank.java70
-rw-r--r--main/java/gregtech/api/gui/GT_Container_MaintenanceHatch.java30
-rw-r--r--main/java/gregtech/api/gui/GT_Container_MultiMachine.java35
-rw-r--r--main/java/gregtech/api/gui/GT_GUIContainer.java67
-rw-r--r--main/java/gregtech/api/gui/GT_GUIContainerMetaTile_Machine.java39
-rw-r--r--main/java/gregtech/api/gui/GT_GUIContainer_1by1.java28
-rw-r--r--main/java/gregtech/api/gui/GT_GUIContainer_2by2.java28
-rw-r--r--main/java/gregtech/api/gui/GT_GUIContainer_3by3.java28
-rw-r--r--main/java/gregtech/api/gui/GT_GUIContainer_4by4.java28
-rw-r--r--main/java/gregtech/api/gui/GT_GUIContainer_BasicMachine.java86
-rw-r--r--main/java/gregtech/api/gui/GT_GUIContainer_BasicTank.java35
-rw-r--r--main/java/gregtech/api/gui/GT_GUIContainer_MaintenanceHatch.java26
-rw-r--r--main/java/gregtech/api/gui/GT_GUIContainer_MultiMachine.java55
-rw-r--r--main/java/gregtech/api/gui/GT_Slot_Armor.java27
-rw-r--r--main/java/gregtech/api/gui/GT_Slot_DataOrb.java17
-rw-r--r--main/java/gregtech/api/gui/GT_Slot_Holo.java46
-rw-r--r--main/java/gregtech/api/gui/GT_Slot_Output.java16
-rw-r--r--main/java/gregtech/api/gui/GT_Slot_Render.java22
-rw-r--r--main/java/gregtech/api/interfaces/IColorModulationContainer.java5
-rw-r--r--main/java/gregtech/api/interfaces/ICondition.java104
-rw-r--r--main/java/gregtech/api/interfaces/IDamagableItem.java7
-rw-r--r--main/java/gregtech/api/interfaces/IDebugableBlock.java26
-rw-r--r--main/java/gregtech/api/interfaces/IDescribable.java11
-rw-r--r--main/java/gregtech/api/interfaces/IFoodStat.java21
-rw-r--r--main/java/gregtech/api/interfaces/IIconContainer.java21
-rw-r--r--main/java/gregtech/api/interfaces/IItemBehaviour.java30
-rw-r--r--main/java/gregtech/api/interfaces/IItemContainer.java24
-rw-r--r--main/java/gregtech/api/interfaces/IOreRecipeRegistrator.java15
-rw-r--r--main/java/gregtech/api/interfaces/IProjectileItem.java16
-rw-r--r--main/java/gregtech/api/interfaces/IRedstoneCircuitBlock.java66
-rw-r--r--main/java/gregtech/api/interfaces/ISubTagContainer.java20
-rw-r--r--main/java/gregtech/api/interfaces/ITexture.java15
-rw-r--r--main/java/gregtech/api/interfaces/IToolStats.java147
-rw-r--r--main/java/gregtech/api/interfaces/internal/IBCTileEntity.java8
-rw-r--r--main/java/gregtech/api/interfaces/internal/IGT_CraftingRecipe.java7
-rw-r--r--main/java/gregtech/api/interfaces/internal/IGT_Mod.java34
-rw-r--r--main/java/gregtech/api/interfaces/internal/IGT_RecipeAdder.java412
-rw-r--r--main/java/gregtech/api/interfaces/internal/IIC2TileEntity.java13
-rw-r--r--main/java/gregtech/api/interfaces/internal/IThaumcraftCompat.java43
-rw-r--r--main/java/gregtech/api/interfaces/internal/IUETileEntity.java6
-rw-r--r--main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntity.java383
-rw-r--r--main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntityCable.java9
-rw-r--r--main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntityItemPipe.java96
-rw-r--r--main/java/gregtech/api/interfaces/tileentity/IBasicEnergyContainer.java99
-rw-r--r--main/java/gregtech/api/interfaces/tileentity/IColoredTileEntity.java14
-rw-r--r--main/java/gregtech/api/interfaces/tileentity/ICoverable.java35
-rw-r--r--main/java/gregtech/api/interfaces/tileentity/IDigitalChest.java29
-rw-r--r--main/java/gregtech/api/interfaces/tileentity/IEnergyConductor.java40
-rw-r--r--main/java/gregtech/api/interfaces/tileentity/IEnergyConnected.java89
-rw-r--r--main/java/gregtech/api/interfaces/tileentity/IExperimentalEnergyTileEntity.java86
-rw-r--r--main/java/gregtech/api/interfaces/tileentity/IFibreConnected.java31
-rw-r--r--main/java/gregtech/api/interfaces/tileentity/IGearEnergyTileEntity.java16
-rw-r--r--main/java/gregtech/api/interfaces/tileentity/IGregTechDeviceInformation.java20
-rw-r--r--main/java/gregtech/api/interfaces/tileentity/IGregTechTileEntity.java124
-rw-r--r--main/java/gregtech/api/interfaces/tileentity/IHasInventory.java33
-rw-r--r--main/java/gregtech/api/interfaces/tileentity/IHasWorldObjectAndCoords.java132
-rw-r--r--main/java/gregtech/api/interfaces/tileentity/IMachineBlockUpdateable.java16
-rw-r--r--main/java/gregtech/api/interfaces/tileentity/IMachineProgress.java69
-rw-r--r--main/java/gregtech/api/interfaces/tileentity/IPipeRenderedTileEntity.java9
-rw-r--r--main/java/gregtech/api/interfaces/tileentity/IRedstoneEmitter.java37
-rw-r--r--main/java/gregtech/api/interfaces/tileentity/IRedstoneReceiver.java29
-rw-r--r--main/java/gregtech/api/interfaces/tileentity/IRedstoneTileEntity.java17
-rw-r--r--main/java/gregtech/api/interfaces/tileentity/ITexturedTileEntity.java10
-rw-r--r--main/java/gregtech/api/interfaces/tileentity/ITurnable.java33
-rw-r--r--main/java/gregtech/api/interfaces/tileentity/IUpgradableMachine.java42
-rw-r--r--main/java/gregtech/api/items/GT_CoolantCellIC_Item.java78
-rw-r--r--main/java/gregtech/api/items/GT_CoolantCell_Item.java82
-rw-r--r--main/java/gregtech/api/items/GT_EnergyArmor_Item.java327
-rw-r--r--main/java/gregtech/api/items/GT_Generic_Block.java19
-rw-r--r--main/java/gregtech/api/items/GT_Generic_Item.java144
-rw-r--r--main/java/gregtech/api/items/GT_MetaBase_Item.java555
-rw-r--r--main/java/gregtech/api/items/GT_MetaGenerated_Item.java331
-rw-r--r--main/java/gregtech/api/items/GT_MetaGenerated_Item_X01.java159
-rw-r--r--main/java/gregtech/api/items/GT_MetaGenerated_Item_X32.java169
-rw-r--r--main/java/gregtech/api/items/GT_MetaGenerated_Tool.java562
-rw-r--r--main/java/gregtech/api/items/GT_RadioactiveCellIC_Item.java176
-rw-r--r--main/java/gregtech/api/items/GT_RadioactiveCell_Item.java161
-rw-r--r--main/java/gregtech/api/items/GT_SolderingTool_Item.java40
-rw-r--r--main/java/gregtech/api/items/GT_Spray_Bug_Item.java66
-rw-r--r--main/java/gregtech/api/items/GT_Spray_Foam_Item.java160
-rw-r--r--main/java/gregtech/api/items/GT_Spray_Hardener_Item.java70
-rw-r--r--main/java/gregtech/api/items/GT_Spray_Hydration_Item.java53
-rw-r--r--main/java/gregtech/api/items/GT_Spray_Ice_Item.java81
-rw-r--r--main/java/gregtech/api/items/GT_Spray_Pepper_Item.java52
-rw-r--r--main/java/gregtech/api/items/GT_Tool_Item.java25
-rw-r--r--main/java/gregtech/api/metatileentity/BaseMetaPipeEntity.java1016
-rw-r--r--main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java1353
-rw-r--r--main/java/gregtech/api/metatileentity/BaseMetaTileEntityUE.java98
-rw-r--r--main/java/gregtech/api/metatileentity/BaseTileEntity.java227
-rw-r--r--main/java/gregtech/api/metatileentity/MetaPipeEntity.java534
-rw-r--r--main/java/gregtech/api/metatileentity/MetaTileEntity.java721
-rw-r--r--main/java/gregtech/api/metatileentity/examples/GT_MetaTileEntity_E_Furnace.java56
-rw-r--r--main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Cable.java253
-rw-r--r--main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Fluid.java343
-rw-r--r--main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Frame.java59
-rw-r--r--main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Item.java269
-rw-r--r--main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicBatteryBuffer.java213
-rw-r--r--main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicGenerator.java167
-rw-r--r--main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicHull.java99
-rw-r--r--main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicHull_NonElectric.java32
-rw-r--r--main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine.java602
-rw-r--r--main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine_Bronze.java187
-rw-r--r--main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine_GT_Recipe.java319
-rw-r--r--main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine_Steel.java103
-rw-r--r--main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicTank.java206
-rw-r--r--main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Buffer.java172
-rw-r--r--main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch.java89
-rw-r--r--main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Dynamo.java54
-rw-r--r--main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Energy.java55
-rw-r--r--main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Input.java86
-rw-r--r--main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_InputBus.java101
-rw-r--r--main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Maintenance.java108
-rw-r--r--main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler.java58
-rw-r--r--main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Output.java141
-rw-r--r--main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_OutputBus.java79
-rw-r--r--main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java729
-rw-r--r--main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_TieredMachineBlock.java65
-rw-r--r--main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Transformer.java144
-rw-r--r--main/java/gregtech/api/net/GT_Packet.java29
-rw-r--r--main/java/gregtech/api/net/GT_Packet_Block_Event.java59
-rw-r--r--main/java/gregtech/api/net/GT_Packet_Sound.java56
-rw-r--r--main/java/gregtech/api/net/GT_Packet_TileEntity.java83
-rw-r--r--main/java/gregtech/api/net/IGT_NetworkHandler.java12
-rw-r--r--main/java/gregtech/api/objects/ElementStack.java41
-rw-r--r--main/java/gregtech/api/objects/GT_ArrayList.java59
-rw-r--r--main/java/gregtech/api/objects/GT_CopiedBlockTexture.java96
-rw-r--r--main/java/gregtech/api/objects/GT_Cover_Default.java68
-rw-r--r--main/java/gregtech/api/objects/GT_Cover_None.java89
-rw-r--r--main/java/gregtech/api/objects/GT_Fluid.java28
-rw-r--r--main/java/gregtech/api/objects/GT_FluidStack.java55
-rw-r--r--main/java/gregtech/api/objects/GT_HashSet.java81
-rw-r--r--main/java/gregtech/api/objects/GT_ItemStack.java52
-rw-r--r--main/java/gregtech/api/objects/GT_MultiTexture.java53
-rw-r--r--main/java/gregtech/api/objects/GT_RenderedTexture.java140
-rw-r--r--main/java/gregtech/api/objects/GT_SidedTexture.java169
-rw-r--r--main/java/gregtech/api/objects/ItemData.java116
-rw-r--r--main/java/gregtech/api/objects/MaterialStack.java41
-rw-r--r--main/java/gregtech/api/threads/GT_Runnable_MachineBlockUpdate.java38
-rw-r--r--main/java/gregtech/api/threads/GT_Runnable_Sound.java26
-rw-r--r--main/java/gregtech/api/util/GT_BaseCrop.java129
-rw-r--r--main/java/gregtech/api/util/GT_CircuitryBehavior.java178
-rw-r--r--main/java/gregtech/api/util/GT_Config.java86
-rw-r--r--main/java/gregtech/api/util/GT_CoverBehavior.java217
-rw-r--r--main/java/gregtech/api/util/GT_CreativeTab.java24
-rw-r--r--main/java/gregtech/api/util/GT_FoodStat.java102
-rw-r--r--main/java/gregtech/api/util/GT_IBoxableWrapper.java12
-rw-r--r--main/java/gregtech/api/util/GT_ItsNotMyFaultException.java16
-rw-r--r--main/java/gregtech/api/util/GT_LanguageManager.java95
-rw-r--r--main/java/gregtech/api/util/GT_Log.java35
-rw-r--r--main/java/gregtech/api/util/GT_ModHandler.java1730
-rw-r--r--main/java/gregtech/api/util/GT_OreDictUnificator.java332
-rw-r--r--main/java/gregtech/api/util/GT_PlayedSound.java28
-rw-r--r--main/java/gregtech/api/util/GT_Recipe.java1046
-rw-r--r--main/java/gregtech/api/util/GT_RecipeRegistrator.java313
-rw-r--r--main/java/gregtech/api/util/GT_Shaped_Recipe.java95
-rw-r--r--main/java/gregtech/api/util/GT_Shapeless_Recipe.java95
-rw-r--r--main/java/gregtech/api/util/GT_SpawnEventHandler.java46
-rw-r--r--main/java/gregtech/api/util/GT_Utility.java1791
-rw-r--r--main/java/gregtech/api/world/GT_Worldgen.java61
-rw-r--r--main/java/gregtech/api/world/GT_Worldgen_Boulder.java70
-rw-r--r--main/java/gregtech/api/world/GT_Worldgen_Ore.java29
-rw-r--r--main/java/gregtech/api/world/GT_Worldgen_Ore_Normal.java69
-rw-r--r--main/java/gregtech/api/world/GT_Worldgen_Ore_SingleBlock.java30
-rw-r--r--main/java/gregtech/api/world/GT_Worldgen_Ore_SingleBlock_UnderLava.java30
190 files changed, 0 insertions, 30386 deletions
diff --git a/main/java/gregtech/api/GregTech_API.java b/main/java/gregtech/api/GregTech_API.java
deleted file mode 100644
index 15140242d8..0000000000
--- a/main/java/gregtech/api/GregTech_API.java
+++ /dev/null
@@ -1,566 +0,0 @@
-package gregtech.api;
-
-import static gregtech.api.enums.GT_Values.*;
-import gregtech.api.enums.Materials;
-import gregtech.api.enums.Textures;
-import gregtech.api.interfaces.IDamagableItem;
-import gregtech.api.interfaces.ITexture;
-import gregtech.api.interfaces.internal.IGT_RecipeAdder;
-import gregtech.api.interfaces.internal.IThaumcraftCompat;
-import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
-import gregtech.api.items.GT_CoolantCellIC_Item;
-import gregtech.api.items.GT_CoolantCell_Item;
-import gregtech.api.items.GT_Tool_Item;
-import gregtech.api.metatileentity.BaseMetaTileEntity;
-import gregtech.api.objects.GT_Cover_Default;
-import gregtech.api.objects.GT_Cover_None;
-import gregtech.api.objects.GT_HashSet;
-import gregtech.api.objects.GT_ItemStack;
-import gregtech.api.threads.GT_Runnable_MachineBlockUpdate;
-import gregtech.api.util.*;
-import gregtech.api.world.GT_Worldgen;
-
-import java.util.*;
-
-import net.minecraft.block.Block;
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.creativetab.CreativeTabs;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.world.World;
-import net.minecraftforge.fluids.Fluid;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-
-/**
- * Please do not include this File in your Mod-download as it ruins compatiblity, like with the IC2-API
- * You may just copy those Functions into your Code, or better call them via reflection.
- *
- * The whole API is the basic construct of my Mod. Everything is dependent on it.
- * I change things quite often so please don't include any File inside your Mod, even if it is an Interface.
- * Since some Authors were stupid enough to break this simple Rule, I added Version checks to enforce it.
- *
- * In these Folders are many useful Functions. You can use them via reflection if you want.
- * I know not everything is compilable due to API's of other Mods, but these are easy to fix in your Setup.
- *
- * You can use this to learn about Modding, but I would recommend simpler Mods.
- * You may even copypaste Code from these API-Files into your Mod, as I have nothing against that, but you should look exactly at what you are copying.
- *
- * @author Gregorius Techneticies
- */
-public class GregTech_API {
- /** For the API Version check */
- public static volatile int VERSION = 508;
-
- @Deprecated
- public static IGT_RecipeAdder sRecipeAdder;
-
- @Deprecated
- public static final long MATERIAL_UNIT = M, FLUID_MATERIAL_UNIT = L;
-
- /** Used to register Aspects to ThaumCraft, this Object might be null if ThaumCraft isn't installed */
- public static IThaumcraftCompat sThaumcraftCompat;
-
- /** These Lists are getting executed at their respective timings. Useful if you have to do things right before/after I do them, without having to control the load order. Add your "Commands" in the Constructor or in a static Code Block of your Mods Main Class. These are not Threaded, I just use a native Java Interface for their execution. Implement just the Method run() and everything should work */
- public static List<Runnable> sBeforeGTPreload = new ArrayList<Runnable>(), sAfterGTPreload = new ArrayList<Runnable>(), sBeforeGTLoad = new ArrayList<Runnable>(), sAfterGTLoad = new ArrayList<Runnable>(), sBeforeGTPostload = new ArrayList<Runnable>(), sAfterGTPostload = new ArrayList<Runnable>(), sBeforeGTServerstart = new ArrayList<Runnable>(), sAfterGTServerstart = new ArrayList<Runnable>(), sBeforeGTServerstop = new ArrayList<Runnable>(), sAfterGTServerstop = new ArrayList<Runnable>(), sGTBlockIconload = new ArrayList<Runnable>(), sGTItemIconload = new ArrayList<Runnable>();
-
- /** Fixes the HashMap Mappings for ItemStacks once the Server started */
- public static final Collection<Map<GT_ItemStack, ?>> sItemStackMappings = new ArrayList<Map<GT_ItemStack, ?>>();
- public static final Collection<Map<Fluid, ?>> sFluidMappings = new ArrayList<Map<Fluid, ?>>();
-
- /** The Icon Registers from Blocks and Items. They will get set right before the corresponding Icon Load Phase as executed in the Runnable List above. */
- @SideOnly(Side.CLIENT)
- public static IIconRegister sBlockIcons, sItemIcons;
-
- /** The Configuration Objects */
- public static GT_Config sRecipeFile = null, sMachineFile = null, sWorldgenFile = null, sMaterialProperties = null, sUnification = null, sSpecialFile = null, sClientDataFile, sOPStuff = null;
-
- /** The MetaTileEntity-ID-List-Length */
- public static final short MAXIMUM_METATILE_IDS = Short.MAX_VALUE - 1;
-
- /** My Creative Tab */
- public static final CreativeTabs TAB_GREGTECH = new GT_CreativeTab("Main", "Main"), TAB_GREGTECH_MATERIALS = new GT_CreativeTab("Materials", "Materials"), TAB_GREGTECH_ORES = new GT_CreativeTab("Ores", "Ores");
-
- public static int TICKS_FOR_LAG_AVERAGING = 25, MILLISECOND_THRESHOLD_UNTIL_LAG_WARNING = 100;
-
- /**
- * A List of all registered MetaTileEntities
- *
- * 0 - 1199 are used by GregTech.
- * 1200 - 2047 are used for GregTech Cables.
- * 2048 - 2559 are reserved for OvermindDL.
- * 2560 - 3071 are reserved for Immibis.
- * 3072 - 3583 are reserved for LinusPhoenix.
- * 3584 - 4095 are reserved for BloodyAsp.
- * 4096 - 5095 are used for GregTech Frames.
- * 5096 - 6099 are used for GregTech Pipes.
- * 6100 - 8191 are used for GregTech Decoration Blocks.
- * 8192 - 8703 are reserved for ZL123.
- * 8704 - 9215 are reserved for Mr10Movie.
- * 9216 - 9727 are used for GregTech Automation Machines.
- * 9728 - 10239 are reserved for 28Smiles.
- * 10240 - 10751 are reserved for VirMan.
- * 10752 - 11263 are reserved for the next one who asks me.
- * 9728 - 32766 are currently free.
- *
- * Contact me if you need a free ID-Range, which doesn't conflict with other Addons.
- * You could make an ID-Config, but we all know, what "stupid" customers think about conflicting ID's
- */
- public static final IMetaTileEntity[] METATILEENTITIES = new IMetaTileEntity[MAXIMUM_METATILE_IDS];
-
- /** Initialized by the Block creation. */
- public static Block sBlockMachines;
- public static Block sBlockOres1;
- public static Block sBlockGranites, sBlockConcretes;
- public static Block sBlockCasings1, sBlockCasings2, sBlockCasings3, sBlockCasings4;
-
- /** Getting assigned by the Config */
- public static boolean sTimber = F, sDrinksAlwaysDrinkable = F, sMultiThreadedSounds = F, sDoShowAllItemsInCreative = F, sColoredGUI = T, sConstantEnergy = T, sMachineExplosions = T, sMachineFlammable = T, sMachineNonWrenchExplosions = T, sMachineRainExplosions = T, sMachineThunderExplosions = T, sMachineFireExplosions = T, sMachineWireFire = true;
- public static boolean mOutputRF =false;
- public static boolean mInputRF =false;
- public static boolean meIOLoaded =false;
- public static int mEUtoRF = 360;
- public static int mRFtoEU = 20;
- public static boolean mRFExplosions = true;
-
- /** Getting assigned by the Mod loading */
- public static boolean sUnificationEntriesRegistered = F, sPreloadStarted = F, sPreloadFinished = F, sLoadStarted = F, sLoadFinished = F, sPostloadStarted = F, sPostloadFinished = F;
-
- /** The Icon List for Covers */
- public static final Map<GT_ItemStack, ITexture> sCovers = new HashMap<GT_ItemStack, ITexture>();
-
- /** The List of Cover Behaviors for the Covers */
- public static final Map<GT_ItemStack, GT_CoverBehavior> sCoverBehaviors = new HashMap<GT_ItemStack, GT_CoverBehavior>();
-
- /** The List of Circuit Behaviors for the Redstone Circuit Block */
- public static final Map<Integer, GT_CircuitryBehavior> sCircuitryBehaviors = new HashMap<Integer, GT_CircuitryBehavior>();
-
- /** The List of Blocks, which can conduct Machine Block Updates */
- public static final Map<Block, Integer> sMachineIDs = new HashMap<Block, Integer>();
-
- /** The Redstone Frequencies */
- public static final Map<Integer, Byte> sWirelessRedstone = new HashMap<Integer, Byte>();
-
- /** The IDSU Frequencies */
- public static final Map<Integer, Integer> sIDSUList = new HashMap<Integer, Integer>();
-
- /** A List of all Books, which were created using @GT_Utility.getWrittenBook the original Title is the Key Value */
- public static final Map<String, ItemStack> sBookList = new HashMap<String, ItemStack>();
-
- /** The List of all Sounds used in GT, indices are in the static Block at the bottom */
- public static final Map<Integer, String> sSoundList = new HashMap<Integer, String>();
-
- /** The List of Tools, which can be used. Accepts regular damageable Items and Electric Items */
- public static final GT_HashSet<GT_ItemStack> sToolList = new GT_HashSet<GT_ItemStack>(), sCrowbarList = new GT_HashSet<GT_ItemStack>(), sScrewdriverList = new GT_HashSet<GT_ItemStack>(), sWrenchList = new GT_HashSet<GT_ItemStack>(), sSoftHammerList = new GT_HashSet<GT_ItemStack>(), sHardHammerList = new GT_HashSet<GT_ItemStack>(), sSolderingToolList = new GT_HashSet<GT_ItemStack>(), sSolderingMetalList = new GT_HashSet<GT_ItemStack>();
- /** The List of Hazmat Armors */
- public static final GT_HashSet<GT_ItemStack> sGasHazmatList = new GT_HashSet<GT_ItemStack>(), sBioHazmatList = new GT_HashSet<GT_ItemStack>(), sFrostHazmatList = new GT_HashSet<GT_ItemStack>(), sHeatHazmatList = new GT_HashSet<GT_ItemStack>(), sRadioHazmatList = new GT_HashSet<GT_ItemStack>(), sElectroHazmatList = new GT_HashSet<GT_ItemStack>();
-
- /**
- * The List of Dimensions, which are Whitelisted for the Teleporter. This list should not contain other Planets.
- * Mystcraft Dimensions and other Dimensional Things should be allowed.
- * Mystcraft and Twilight Forest are automatically considered a Dimension, without being in this List.
- */
- public static final Collection<Integer> sDimensionalList = new HashSet<Integer>();
-
- /** Lists of all the active World generation Features, these are getting Initialized in Postload! */
- public static final List<GT_Worldgen> sWorldgenList = new ArrayList<GT_Worldgen>();
-
- /** A List containing all the Materials, which are somehow in use by GT and therefor receive a specific Set of Items. */
- public static final Materials[] sGeneratedMaterials = new Materials[1000];
-
- /**
- * You want OreDict-Unification for YOUR Mod/Addon, when GregTech is installed? This Function is especially for YOU.
- * Call this Function after the load-Phase, as I register the the most of the Unification at that Phase (Redpowers Storageblocks are registered at postload).
- * A recommended use of this Function is inside your Recipe-System itself (if you have one), as the unification then makes 100% sure, that every added non-unificated Output gets automatically unificated.
- *
- * I will personally make sure, that only common prefixes of Ores get registered at the Unificator, as of now there are:
- * pulp, dust, dustSmall, ingot, nugget, gem, ore and block
- * If another Mod-Author messes these up, then it's not my fault and it's especially not your fault. As these are commonly used prefixes.
- *
- * This Unificator-API-Function uses the same Functions I use, for unificating Items. So if there is something messed up (very unlikely), then everything is messed up.
- *
- * You shouldn't use this to unificate the Inputs of your Recipes, this is only meant for the Outputs.
- *
- * @param aOreStack the Stack you want to get unificated. It is stackSize Sensitive.
- * @return Either an unificated Stack or the stack you toss in, but it should never be null, unless you throw a Nullpointer into it.
- */
- public static ItemStack getUnificatedOreDictStack(ItemStack aOreStack) {
- if (!GregTech_API.sPreloadFinished) GT_Log.err.println("GregTech_API ERROR: " + aOreStack.getItem() + "." + aOreStack.getItemDamage() + " - OreDict Unification Entries are not registered now, please call it in the postload phase.");
- return GT_OreDictUnificator.get(T, aOreStack);
- }
-
- /**
- * Causes a Machineblock Update
- * This update will cause surrounding MultiBlock Machines to update their Configuration.
- * You should call this Function in @Block.breakBlock and in @Block.onBlockAdded of your Machine.
- * @param aWorld is being the World
- * @param aX is the X-Coord of the update causing Block
- * @param aY is the Y-Coord of the update causing Block
- * @param aZ is the Z-Coord of the update causing Block
- */
- public static boolean causeMachineUpdate(World aWorld, int aX, int aY, int aZ) {
- if (!aWorld.isRemote) new Thread(new GT_Runnable_MachineBlockUpdate(aWorld, aX, aY, aZ), "Machine Block Updating").start();
- return T;
- }
-
- /**
- * Adds a Multi-Machine Block, like my Machine Casings for example.
- * You should call @causeMachineUpdate in @Block.breakBlock and in @Block.onBlockAdded of your registered Block.
- * You don't need to register TileEntities which implement @IMachineBlockUpdateable
- * @param aID the ID of your Block
- * @param aMeta the Metadata of the Blocks as Bitmask! -1 or ~0 for all Metavalues
- */
- public static boolean registerMachineBlock(Block aBlock, int aMeta) {
- if (GT_Utility.isBlockInvalid(aBlock)) return F;
- if (GregTech_API.sThaumcraftCompat != null) GregTech_API.sThaumcraftCompat.registerPortholeBlacklistedBlock(aBlock);
- sMachineIDs.put(aBlock, aMeta);
- return T;
- }
-
- /**
- * Like above but with boolean Parameters instead of a BitMask
- */
- public static boolean registerMachineBlock(Block aBlock, boolean... aMeta) {
- if (GT_Utility.isBlockInvalid(aBlock) || aMeta == null || aMeta.length == 0) return F;
- if (GregTech_API.sThaumcraftCompat != null) GregTech_API.sThaumcraftCompat.registerPortholeBlacklistedBlock(aBlock);
- int rMeta = 0;
- for (byte i = 0; i < aMeta.length && i < 16; i++) if (aMeta[i]) rMeta |= B[i];
- sMachineIDs.put(aBlock, rMeta);
- return T;
- }
-
- /**
- * if this Block is a Machine Update Conducting Block
- */
- public static boolean isMachineBlock(Block aBlock, int aMeta) {
- if (GT_Utility.isBlockInvalid(aBlock)) return F;
- return (sMachineIDs.containsKey(aBlock) && (sMachineIDs.get(aBlock) & B[aMeta]) != 0);
- }
-
- /**
- * Creates a new Coolant Cell Item for your Nuclear Reactor
- */
- public static Item constructCoolantCellItem(String aUnlocalized, String aEnglish, int aMaxStore) {
- try {
- return new GT_CoolantCellIC_Item(aUnlocalized, aEnglish, aMaxStore);
-// return (Item)Class.forName("gregtech.api.items.GT_CoolantCellIC_Item").getConstructors()[0].newInstance(aUnlocalized, aEnglish, aMaxStore);
- } catch(Throwable e) {/*Do nothing*/}
- try {
- return new GT_CoolantCell_Item(aUnlocalized, aEnglish, aMaxStore);
-// return (Item)Class.forName("gregtech.api.items.GT_CoolantCell_Item").getConstructors()[0].newInstance(aUnlocalized, aEnglish, aMaxStore);
- } catch(Throwable e) {/*Do nothing*/}
- return new gregtech.api.items.GT_Generic_Item(aUnlocalized, aEnglish, "Doesn't work as intended, this is a Bug", F);
- }
-
- /**
- * Creates a new Energy Armor Item
- */
- public static Item constructElectricArmorItem(String aUnlocalized, String aEnglish, int aCharge, int aTransfer, int aTier, int aDamageEnergyCost, int aSpecials, double aArmorAbsorbtionPercentage, boolean aChargeProvider, int aType, int aArmorIndex) {
- try {
- return (Item)Class.forName("gregtechmod.api.items.GT_EnergyArmorIC_Item").getConstructors()[0].newInstance(aUnlocalized, aEnglish, aCharge, aTransfer, aTier, aDamageEnergyCost, aSpecials, aArmorAbsorbtionPercentage, aChargeProvider, aType, aArmorIndex);
- } catch(Throwable e) {/*Do nothing*/}
- try {
- return (Item)Class.forName("gregtechmod.api.items.GT_EnergyArmor_Item").getConstructors()[0].newInstance(aUnlocalized, aEnglish, aCharge, aTransfer, aTier, aDamageEnergyCost, aSpecials, aArmorAbsorbtionPercentage, aChargeProvider, aType, aArmorIndex);
- } catch(Throwable e) {/*Do nothing*/}
- return new gregtech.api.items.GT_Generic_Item(aUnlocalized, aEnglish, "Doesn't work as intended, this is a Bug", F);
- }
-
- /**
- * Creates a new Energy Battery Item
- */
- public static Item constructElectricEnergyStorageItem(String aUnlocalized, String aEnglish, int aCharge, int aTransfer, int aTier, int aEmptyID, int aFullID) {
- try {
- return (Item)Class.forName("gregtechmod.api.items.GT_EnergyStoreIC_Item").getConstructors()[0].newInstance(aUnlocalized, aEnglish, aCharge, aTransfer, aTier, aEmptyID, aFullID);
- } catch(Throwable e) {/*Do nothing*/}
- try {
- return (Item)Class.forName("gregtechmod.api.items.GT_EnergyStore_Item").getConstructors()[0].newInstance(aUnlocalized, aEnglish, aCharge, aTransfer, aTier, aEmptyID, aFullID);
- } catch(Throwable e) {/*Do nothing*/}
- return new gregtech.api.items.GT_Generic_Item(aUnlocalized, aEnglish, "Doesn't work as intended, this is a Bug", F);
- }
-
- /**
- * Creates a new Hard Hammer Item
- */
- public static GT_Tool_Item constructHardHammerItem(String aUnlocalized, String aEnglish, int aMaxDamage, int aEntityDamage) {
- try {
- return (GT_Tool_Item)Class.forName("gregtechmod.api.items.GT_HardHammer_Item").getConstructors()[0].newInstance(aUnlocalized, aEnglish, aMaxDamage, aEntityDamage);
- } catch(Throwable e) {/*Do nothing*/}
- return new gregtech.api.items.GT_Tool_Item(aUnlocalized, aEnglish, "Doesn't work as intended, this is a Bug", aMaxDamage, aEntityDamage, F);
- }
-
- /**
- * Creates a new Crowbar Item
- */
- public static GT_Tool_Item constructCrowbarItem(String aUnlocalized, String aEnglish, int aMaxDamage, int aEntityDamage) {
- try {
- return (GT_Tool_Item)Class.forName("gregtechmod.api.items.GT_CrowbarRC_Item").getConstructors()[0].newInstance(aUnlocalized, aEnglish, aMaxDamage, aEntityDamage);
- } catch(Throwable e) {/*Do nothing*/}
- try {
- return (GT_Tool_Item)Class.forName("gregtechmod.api.items.GT_Crowbar_Item").getConstructors()[0].newInstance(aUnlocalized, aEnglish, aMaxDamage, aEntityDamage);
- } catch(Throwable e) {/*Do nothing*/}
- return new gregtech.api.items.GT_Tool_Item(aUnlocalized, aEnglish, "Doesn't work as intended, this is a Bug", aMaxDamage, aEntityDamage, F);
- }
-
- /**
- * Creates a new Wrench Item
- */
- public static GT_Tool_Item constructWrenchItem(String aUnlocalized, String aEnglish, int aMaxDamage, int aEntityDamage, int aDisChargedGTID) {
- try {
- return (GT_Tool_Item)Class.forName("gregtechmod.api.items.GT_Wrench_Item").getConstructors()[0].newInstance(aUnlocalized, aEnglish, aMaxDamage, aEntityDamage, aDisChargedGTID);
- } catch(Throwable e) {/*Do nothing*/}
- return new gregtech.api.items.GT_Tool_Item(aUnlocalized, aEnglish, "Doesn't work as intended, this is a Bug", aMaxDamage, aEntityDamage, F);
- }
-
- /**
- * Creates a new electric Screwdriver Item
- */
- public static GT_Tool_Item constructElectricScrewdriverItem(String aUnlocalized, String aEnglish, int aMaxDamage, int aEntityDamage, int aDisChargedGTID) {
- try {
- return (GT_Tool_Item)Class.forName("gregtechmod.api.items.GT_ScrewdriverIC_Item").getConstructors()[0].newInstance(aUnlocalized, aEnglish, aMaxDamage, aEntityDamage, aDisChargedGTID);
- } catch(Throwable e) {/*Do nothing*/}
- return new gregtech.api.items.GT_Tool_Item(aUnlocalized, aEnglish, "Doesn't work as intended, this is a Bug", aMaxDamage, aEntityDamage, F);
- }
-
- /**
- * Creates a new electric Wrench Item
- */
- public static GT_Tool_Item constructElectricWrenchItem(String aUnlocalized, String aEnglish, int aMaxDamage, int aEntityDamage, int aDisChargedGTID) {
- try {
- return (GT_Tool_Item)Class.forName("gregtechmod.api.items.GT_WrenchIC_Item").getConstructors()[0].newInstance(aUnlocalized, aEnglish, aMaxDamage, aEntityDamage, aDisChargedGTID);
- } catch(Throwable e) {/*Do nothing*/}
- return new gregtech.api.items.GT_Tool_Item(aUnlocalized, aEnglish, "Doesn't work as intended, this is a Bug", aMaxDamage, aEntityDamage, F);
- }
-
- /**
- * Creates a new electric Saw Item
- */
- public static GT_Tool_Item constructElectricSawItem(String aUnlocalized, String aEnglish, int aMaxDamage, int aEntityDamage, int aToolQuality, float aToolStrength, int aEnergyConsumptionPerBlockBreak, int aDisChargedGTID) {
- try {
- return (GT_Tool_Item)Class.forName("gregtechmod.api.items.GT_SawIC_Item").getConstructors()[0].newInstance(aUnlocalized, aEnglish, aMaxDamage, aEntityDamage, aToolQuality, aToolStrength, aEnergyConsumptionPerBlockBreak, aDisChargedGTID);
- } catch(Throwable e) {/*Do nothing*/}
- return new gregtech.api.items.GT_Tool_Item(aUnlocalized, aEnglish, "Doesn't work as intended, this is a Bug", aMaxDamage, aEntityDamage, F);
- }
-
- /**
- * Creates a new electric Drill Item
- */
- public static GT_Tool_Item constructElectricDrillItem(String aUnlocalized, String aEnglish, int aMaxDamage, int aEntityDamage, int aToolQuality, float aToolStrength, int aEnergyConsumptionPerBlockBreak, int aDisChargedGTID) {
- try {
- return (GT_Tool_Item)Class.forName("gregtechmod.api.items.GT_DrillIC_Item").getConstructors()[0].newInstance(aUnlocalized, aEnglish, aMaxDamage, aEntityDamage, aToolQuality, aToolStrength, aEnergyConsumptionPerBlockBreak, aDisChargedGTID);
- } catch(Throwable e) {/*Do nothing*/}
- return new gregtech.api.items.GT_Tool_Item(aUnlocalized, aEnglish, "Doesn't work as intended, this is a Bug", aMaxDamage, aEntityDamage, F);
- }
-
- /**
- * Creates a new electric Soldering Tool
- */
- public static GT_Tool_Item constructElectricSolderingToolItem(String aUnlocalized, String aEnglish, int aMaxDamage, int aEntityDamage, int aDisChargedGTID) {
- try {
- return (GT_Tool_Item)Class.forName("gregtechmod.api.items.GT_SolderingToolIC_Item").getConstructors()[0].newInstance(aUnlocalized, aEnglish, aMaxDamage, aEntityDamage, aDisChargedGTID);
- } catch(Throwable e) {/*Do nothing*/}
- return new gregtech.api.items.GT_Tool_Item(aUnlocalized, aEnglish, "Doesn't work as intended, this is a Bug", aMaxDamage, aEntityDamage, F);
- }
-
- /**
- * Creates a new empty electric Tool
- */
- public static GT_Tool_Item constructEmptyElectricToolItem(String aUnlocalized, String aEnglish, int aMaxDamage, int aChargedGTID) {
- try {
- return (GT_Tool_Item)Class.forName("gregtechmod.api.items.GT_EmptyToolIC_Item").getConstructors()[0].newInstance(aUnlocalized, aEnglish, aMaxDamage, aChargedGTID);
- } catch(Throwable e) {/*Do nothing*/}
- return new gregtech.api.items.GT_Tool_Item(aUnlocalized, aEnglish, "Doesn't work as intended, this is a Bug", aMaxDamage, 0, F);
- }
-
- private static Class sBaseMetaTileEntityClass = null;
-
- /**
- * This gives you a new BaseMetaTileEntity. As some Interfaces are not always loaded (Buildcraft, Univeral Electricity) I have to use Invocation at the Constructor of the BaseMetaTileEntity
- */
- public static BaseMetaTileEntity constructBaseMetaTileEntity() {
- if (sBaseMetaTileEntityClass == null) {
- try {
- return (BaseMetaTileEntity)(sBaseMetaTileEntityClass = BaseMetaTileEntity.class).newInstance();
- } catch(Throwable e) {/*Do nothing*/}
- }
-
- try {
- return (BaseMetaTileEntity)(sBaseMetaTileEntityClass.newInstance());
- } catch(Throwable e) {
- GT_Log.err.println("GT_Mod: Fatal Error ocurred while initializing TileEntities, crashing Minecraft.");
- e.printStackTrace(GT_Log.err);
- throw new RuntimeException(e);
- }
- }
-
- public static void registerCover(ItemStack aStack, ITexture aCover, GT_CoverBehavior aBehavior) {
- if (!sCovers.containsKey(new GT_ItemStack(aStack))) sCovers.put(new GT_ItemStack(aStack), aCover==null||!aCover.isValidTexture()?Textures.BlockIcons.ERROR_RENDERING[0]:aCover);
- if (aBehavior != null) sCoverBehaviors.put(new GT_ItemStack(aStack), aBehavior);
- }
-
- public static void registerCoverBehavior(ItemStack aStack, GT_CoverBehavior aBehavior) {
- sCoverBehaviors.put(new GT_ItemStack(aStack), aBehavior==null?sDefaultBehavior:aBehavior);
- }
-
- /**
- * Registers multiple Cover Items. I use that for the OreDict Functionality.
- * @param aBehavior can be null
- */
- public static void registerCover(Collection<ItemStack> aStackList, ITexture aCover, GT_CoverBehavior aBehavior) {
- if (aCover.isValidTexture()) for (ItemStack tStack : aStackList) registerCover(tStack, aCover, aBehavior);
- }
-
- /**
- * This is the generic Cover behavior. Used for the default Covers, which have no Behavior.
- */
- public static final GT_CoverBehavior sDefaultBehavior = new GT_Cover_Default(), sNoBehavior = new GT_Cover_None();
-
- /**
- * returns a Cover behavior, guaranteed to not return null after preload
- */
- public static GT_CoverBehavior getCoverBehavior(ItemStack aStack) {
- if (aStack == null || aStack.getItem() == null) return sNoBehavior;
- GT_CoverBehavior rCover = sCoverBehaviors.get(new GT_ItemStack(aStack));
- if (rCover == null) return sDefaultBehavior;
- return rCover;
- }
-
- /**
- * returns a Cover behavior, guaranteed to not return null
- */
- public static GT_CoverBehavior getCoverBehavior(int aStack) {
- if (aStack == 0) return sNoBehavior;
- return getCoverBehavior(GT_Utility.intToStack(aStack));
- }
-
- /**
- * Register a Wrench to be usable on GregTech Machines.
- * The Wrench MUST have some kind of Durability unlike certain Buildcraft Wrenches.
- *
- * You need to register Tools in the Load Phase, because otherwise the Autodetection will assign a Tool Type in certain Cases during postload (When IToolWrench or similar Interfaces are implemented).
- *
- * -----
- *
- * Returning true at isDamagable was a great Idea, KingLemming. Well played.
- * Since the OmniWrench is just a Single-Item-Mod, people can choose if they want your infinite durability or not. So that's not really a Problem.
- * I even have a new Config to autodisable most infinite BC Wrenches (but that one is turned off).
- *
- * One last Bug for you to fix:
- * My Autoregistration detects Railcrafts Crowbars, Buildcrafts Wrenches and alike, due to their Interfaces.
- * Guess what now became a Crowbar by accident. Try registering the Wrench at the load phase to prevent things like that from happening.
- * Yes, I know that "You need to register Tools in the Load Phase"-Part wasn't there before this. Sorry about that.
- */
- public static boolean registerWrench(ItemStack aTool) {
- return registerTool(aTool, sWrenchList);
- }
-
- /**
- * Register a Crowbar to extract Covers from Machines
- * Crowbars are NOT Wrenches btw.
- *
- * You need to register Tools in the Load Phase, because otherwise the Autodetection will assign a Tool Type in certain Cases during postload (When IToolWrench or similar Interfaces are implemented).
- */
- public static boolean registerCrowbar(ItemStack aTool) {
- return registerTool(aTool, sCrowbarList);
- }
-
- /**
- * Register a Screwdriver to interact directly with Machines and Covers
- * Did I mention, that it is intentionally not possible to make a Multitool, which doesn't switch ItemID (like a Mode) all the time?
- *
- * You need to register Tools in the Load Phase, because otherwise the Autodetection will assign a Tool Type in certain Cases during postload (When IToolWrench or similar Interfaces are implemented).
- */
- public static boolean registerScrewdriver(ItemStack aTool) {
- return registerTool(aTool, sScrewdriverList);
- }
-
- /**
- * Register a Soft Hammer to interact with Machines
- *
- * You need to register Tools in the Load Phase, because otherwise the Autodetection will assign a Tool Type in certain Cases during postload (When IToolWrench or similar Interfaces are implemented).
- */
- public static boolean registerSoftHammer(ItemStack aTool) {
- return registerTool(aTool, sSoftHammerList);
- }
-
- /**
- * Register a Hard Hammer to interact with Machines
- *
- * You need to register Tools in the Load Phase, because otherwise the Autodetection will assign a Tool Type in certain Cases during postload (When IToolWrench or similar Interfaces are implemented).
- */
- public static boolean registerHardHammer(ItemStack aTool) {
- return registerTool(aTool, sHardHammerList);
- }
-
- /**
- * Register a Soldering Tool to interact with Machines
- *
- * You need to register Tools in the Load Phase, because otherwise the Autodetection will assign a Tool Type in certain Cases during postload (When IToolWrench or similar Interfaces are implemented).
- */
- public static boolean registerSolderingTool(ItemStack aTool) {
- return registerTool(aTool, sSolderingToolList);
- }
-
- /**
- * Register a Soldering Tin to interact with Soldering Tools
- *
- * You need to register Tools in the Load Phase, because otherwise the Autodetection will assign a Tool Type in certain Cases during postload (When IToolWrench or similar Interfaces are implemented).
- */
- public static boolean registerSolderingMetal(ItemStack aTool) {
- return registerTool(aTool, sSolderingMetalList);
- }
-
- /**
- * Generic Function to add Tools to the Lists.
- * Contains all sanity Checks for Tools, like preventing one Tool from being registered for multiple purposes as controls would override each other.
- */
- public static boolean registerTool(ItemStack aTool, Collection<GT_ItemStack> aToolList) {
- if (aTool == null || GT_Utility.isStackInList(aTool, sToolList) || (!aTool.getItem().isDamageable() && !GT_ModHandler.isElectricItem(aTool) && !(aTool.getItem() instanceof IDamagableItem))) return F;
- aToolList.add(new GT_ItemStack(GT_Utility.copyAmount(1, aTool)));
- sToolList.add(new GT_ItemStack(GT_Utility.copyAmount(1, aTool)));
- return T;
- }
-
- /**
- * Adds Biomes to the Biome Lists for World Generation
- */
- static {
- sItemStackMappings.add(sCovers);
- sItemStackMappings.add(sCoverBehaviors);
-
- sDimensionalList.add(-1);
- sDimensionalList.add( 0);
- sDimensionalList.add( 1);
-
- sSoundList.put( 0, "random.break");
- sSoundList.put( 1, "random.anvil_use");
- sSoundList.put( 2, "random.anvil_break");
- sSoundList.put( 3, "random.click");
- sSoundList.put( 4, "random.fizz");
- sSoundList.put( 5, "random.explode");
- sSoundList.put( 6, "fire.ignite");
-
- sSoundList.put(100, MOD_ID_IC2.toLowerCase() + ":" + "tools.Wrench");
- sSoundList.put(101, MOD_ID_IC2.toLowerCase() + ":" + "tools.RubberTrampoline");
- sSoundList.put(102, MOD_ID_IC2.toLowerCase() + ":" + "tools.Painter");
- sSoundList.put(103, MOD_ID_IC2.toLowerCase() + ":" + "tools.BatteryUse");
- sSoundList.put(104, MOD_ID_IC2.toLowerCase() + ":" + "tools.chainsaw.ChainsawUseOne");
- sSoundList.put(105, MOD_ID_IC2.toLowerCase() + ":" + "tools.chainsaw.ChainsawUseTwo");
- sSoundList.put(106, MOD_ID_IC2.toLowerCase() + ":" + "tools.drill.DrillSoft");
- sSoundList.put(107, MOD_ID_IC2.toLowerCase() + ":" + "tools.drill.DrillHard");
- sSoundList.put(108, MOD_ID_IC2.toLowerCase() + ":" + "tools.ODScanner");
-
- sSoundList.put(200, MOD_ID_IC2.toLowerCase() + ":" + "machines.ExtractorOp");
- sSoundList.put(201, MOD_ID_IC2.toLowerCase() + ":" + "machines.MaceratorOp");
- sSoundList.put(202, MOD_ID_IC2.toLowerCase() + ":" + "machines.InductionLoop");
- sSoundList.put(203, MOD_ID_IC2.toLowerCase() + ":" + "machines.CompressorOp");
- sSoundList.put(204, MOD_ID_IC2.toLowerCase() + ":" + "machines.RecyclerOp");
- sSoundList.put(205, MOD_ID_IC2.toLowerCase() + ":" + "machines.MinerOp");
- sSoundList.put(206, MOD_ID_IC2.toLowerCase() + ":" + "machines.PumpOp");
- sSoundList.put(207, MOD_ID_IC2.toLowerCase() + ":" + "machines.ElectroFurnaceLoop");
- sSoundList.put(208, MOD_ID_IC2.toLowerCase() + ":" + "machines.InductionLoop");
- sSoundList.put(209, MOD_ID_IC2.toLowerCase() + ":" + "machines.MachineOverload");
- sSoundList.put(210, MOD_ID_IC2.toLowerCase() + ":" + "machines.InterruptOne");
- sSoundList.put(211, MOD_ID_IC2.toLowerCase() + ":" + "machines.KaChing");
- sSoundList.put(212, MOD_ID_IC2.toLowerCase() + ":" + "machines.MagnetizerLoop");
- }
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/damagesources/GT_DamageSources.java b/main/java/gregtech/api/damagesources/GT_DamageSources.java
deleted file mode 100644
index d83bf661fe..0000000000
--- a/main/java/gregtech/api/damagesources/GT_DamageSources.java
+++ /dev/null
@@ -1,86 +0,0 @@
-package gregtech.api.damagesources;
-
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.util.*;
-
-public class GT_DamageSources {
- public static DamageSource getElectricDamage() {
- return ic2.api.info.Info.DMG_ELECTRIC;
- }
-
- public static DamageSource getRadioactiveDamage() {
- return ic2.api.info.Info.DMG_RADIATION;
- }
-
- public static DamageSource getNukeExplosionDamage() {
- return ic2.api.info.Info.DMG_NUKE_EXPLOSION;
- }
-
- public static DamageSource getExplodingDamage() {
- return new DamageSourceExploding();
- }
-
- public static DamageSource getCombatDamage(String aType, EntityLivingBase aPlayer, IChatComponent aDeathMessage) {
- return new DamageSourceCombat(aType, aPlayer, aDeathMessage);
- }
-
- public static DamageSource getHeatDamage() {
- return new DamageSourceHeat();
- }
-
- public static DamageSource getFrostDamage() {
- return new DamageSourceFrost();
- }
-
- private static class DamageSourceCombat extends EntityDamageSource {
- private IChatComponent mDeathMessage;
-
- public DamageSourceCombat(String aType, EntityLivingBase aPlayer, IChatComponent aDeathMessage) {
- super(aType, aPlayer);
- mDeathMessage = aDeathMessage;
- }
-
- @Override
- public IChatComponent func_151519_b(EntityLivingBase aTarget) {
- return mDeathMessage == null ? super.func_151519_b(aTarget) : mDeathMessage;
- }
- }
-
- private static class DamageSourceFrost extends DamageSource {
- public DamageSourceFrost() {
- super("frost");
- setDifficultyScaled();
- }
-
- @Override
- public IChatComponent func_151519_b(EntityLivingBase aTarget) {
- return new ChatComponentText(EnumChatFormatting.RED+aTarget.getCommandSenderName()+EnumChatFormatting.WHITE + " got frozen");
- }
- }
-
- private static class DamageSourceHeat extends DamageSource {
- public DamageSourceHeat() {
- super("steam");
- setDifficultyScaled();
- }
-
- @Override
- public IChatComponent func_151519_b(EntityLivingBase aTarget) {
- return new ChatComponentText(EnumChatFormatting.RED+aTarget.getCommandSenderName()+EnumChatFormatting.WHITE + " was boiled alive");
- }
- }
-
- public static class DamageSourceExploding extends DamageSource {
- public DamageSourceExploding() {
- super("exploded");
- setDamageAllowedInCreativeMode();
- setDamageBypassesArmor();
- setDamageIsAbsolute();
- }
-
- @Override
- public IChatComponent func_151519_b(EntityLivingBase aTarget) {
- return new ChatComponentText(EnumChatFormatting.RED+aTarget.getCommandSenderName()+EnumChatFormatting.WHITE + " exploded");
- }
- }
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/enchants/Enchantment_EnderDamage.java b/main/java/gregtech/api/enchants/Enchantment_EnderDamage.java
deleted file mode 100644
index 69919fe396..0000000000
--- a/main/java/gregtech/api/enchants/Enchantment_EnderDamage.java
+++ /dev/null
@@ -1,58 +0,0 @@
-package gregtech.api.enchants;
-
-import gregtech.api.enums.ConfigCategories;
-import gregtech.api.enums.Materials;
-import gregtech.api.util.GT_Config;
-import gregtech.api.util.GT_LanguageManager;
-import net.minecraft.enchantment.EnchantmentDamage;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.entity.boss.EntityDragon;
-import net.minecraft.entity.monster.EntityEnderman;
-import net.minecraft.potion.Potion;
-import net.minecraft.potion.PotionEffect;
-
-public class Enchantment_EnderDamage extends EnchantmentDamage {
- public static Enchantment_EnderDamage INSTANCE;
-
- public Enchantment_EnderDamage() {
- super(GT_Config.addIDConfig(ConfigCategories.IDs.enchantments, "Disjunction", 15), 2, -1);
- GT_LanguageManager.addStringLocalization(getName(), "Disjunction");
- Materials.Silver .setEnchantmentForTools(this, 2);
- Materials.Mercury .setEnchantmentForTools(this, 3);
- Materials.Electrum .setEnchantmentForTools(this, 3);
- Materials.SterlingSilver .setEnchantmentForTools(this, 4);
- Materials.AstralSilver .setEnchantmentForTools(this, 5);
- INSTANCE = this;
- }
-
- @Override
- public int getMinEnchantability(int aLevel) {
- return 5 + (aLevel - 1) * 8;
- }
-
- @Override
- public int getMaxEnchantability(int aLevel) {
- return this.getMinEnchantability(aLevel) + 20;
- }
-
- @Override
- public int getMaxLevel() {
- return 5;
- }
-
- @Override
- public void func_151367_b(EntityLivingBase aHurtEntity, Entity aDamagingEntity, int aLevel) {
- if ((aHurtEntity instanceof EntityEnderman || aHurtEntity instanceof EntityDragon || (aHurtEntity.getClass().getName().indexOf(".") >= 0 && aHurtEntity.getClass().getName().substring(aHurtEntity.getClass().getName().lastIndexOf(".")).contains("Ender")))) {
- // Weakness causes Endermen to not be able to teleport with GT being installed.
- aHurtEntity.addPotionEffect(new PotionEffect(Potion.weakness.id , aLevel * 200, Math.max(1, (5*aLevel) / 7)));
- // They also get Poisoned. If you have this Enchant on an Arrow, you can kill the Ender Dragon easier.
- aHurtEntity.addPotionEffect(new PotionEffect(Potion.poison.id , aLevel * 200, Math.max(1, (5*aLevel) / 7)));
- }
- }
-
- @Override
- public String getName() {
- return "enchantment.damage.endermen";
- }
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/enchants/Enchantment_Radioactivity.java b/main/java/gregtech/api/enchants/Enchantment_Radioactivity.java
deleted file mode 100644
index f05d00d08d..0000000000
--- a/main/java/gregtech/api/enchants/Enchantment_Radioactivity.java
+++ /dev/null
@@ -1,61 +0,0 @@
-package gregtech.api.enchants;
-
-import gregtech.api.enums.ConfigCategories;
-import gregtech.api.enums.Materials;
-import gregtech.api.util.GT_Config;
-import gregtech.api.util.GT_LanguageManager;
-import gregtech.api.util.GT_Utility;
-import net.minecraft.enchantment.EnchantmentDamage;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.item.ItemStack;
-
-public class Enchantment_Radioactivity extends EnchantmentDamage {
- public static Enchantment_Radioactivity INSTANCE;
-
- public Enchantment_Radioactivity() {
- super(GT_Config.addIDConfig(ConfigCategories.IDs.enchantments, "Radioactivity", 14), 0, -1);
- GT_LanguageManager.addStringLocalization(getName(), "Radioactivity");
- Materials.Plutonium .setEnchantmentForTools(this, 1).setEnchantmentForArmors(this, 1);
- Materials.Uranium235 .setEnchantmentForTools(this, 2).setEnchantmentForArmors(this, 2);
- Materials.Plutonium241 .setEnchantmentForTools(this, 3).setEnchantmentForArmors(this, 3);
- Materials.NaquadahEnriched .setEnchantmentForTools(this, 4).setEnchantmentForArmors(this, 4);
- Materials.Naquadria .setEnchantmentForTools(this, 5).setEnchantmentForArmors(this, 5);
- INSTANCE = this;
- }
-
- @Override
- public int getMinEnchantability(int aLevel) {
- return Integer.MAX_VALUE;
- }
-
- @Override
- public int getMaxEnchantability(int aLevel) {
- return 0;
- }
-
- @Override
- public int getMaxLevel() {
- return 5;
- }
-
- @Override
- public boolean canApply(ItemStack par1ItemStack) {
- return false;
- }
-
- @Override
- public boolean isAllowedOnBooks() {
- return false;
- }
-
- @Override
- public void func_151367_b(EntityLivingBase aHurtEntity, Entity aDamagingEntity, int aLevel) {
- GT_Utility.applyRadioactivity(aHurtEntity, aLevel, 1);
- }
-
- @Override
- public String getName() {
- return "enchantment.damage.radioactivity";
- }
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/enums/ConfigCategories.java b/main/java/gregtech/api/enums/ConfigCategories.java
deleted file mode 100644
index ba61c759da..0000000000
--- a/main/java/gregtech/api/enums/ConfigCategories.java
+++ /dev/null
@@ -1,64 +0,0 @@
-package gregtech.api.enums;
-
-public enum ConfigCategories {
- news,
- general,
- machineconfig,
- specialunificationtargets;
-
- public enum IDs {
- crops,
- enchantments;
- }
-
- public enum Materials {
- heatdamage,
- oreprocessingoutputmultiplier,
- blastfurnacerequirements,
- blastinductionsmelter,;
- }
-
- public enum Recipes {
- researches,
- harderrecipes,
- gregtechrecipes,
- disabledrecipes,
- recipereplacements,
- storageblockcrafting,
- storageblockdecrafting;
- }
-
- public enum Machines {
- smelting,
- squeezer,
- liquidtransposer,
- liquidtransposerfilling,
- liquidtransposeremptying,
- extractor,
- sawmill,
- compression,
- thermalcentrifuge,
- orewashing,
- inductionsmelter,
- rcblastfurnace,
- scrapboxdrops,
- massfabamplifier,
- maceration,
- rockcrushing,
- pulverization;
- }
-
- public enum Fuels {
- boilerfuels;
- }
-
- public enum Tools {
- mortar,
- hammerplating,
- hammermultiingot,
- hammerdoubleplate,
- hammertripleplate,
- hammerquadrupleplate,
- hammerquintupleplate;
- }
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/enums/Dyes.java b/main/java/gregtech/api/enums/Dyes.java
deleted file mode 100644
index e37648dbef..0000000000
--- a/main/java/gregtech/api/enums/Dyes.java
+++ /dev/null
@@ -1,105 +0,0 @@
-package gregtech.api.enums;
-
-import gregtech.api.interfaces.IColorModulationContainer;
-import gregtech.api.objects.GT_ArrayList;
-import gregtech.api.util.GT_Utility;
-
-import java.util.ArrayList;
-
-import net.minecraftforge.fluids.Fluid;
-import net.minecraftforge.fluids.FluidStack;
-
-public enum Dyes implements IColorModulationContainer {
- /** The valid Colors, see VALUES Array below */
- dyeBlack ( 0, 32, 32, 32, "Black"),
- dyeRed ( 1, 255, 0, 0, "Red"),
- dyeGreen ( 2, 0, 255, 0, "Green"),
- dyeBrown ( 3, 96, 64, 0, "Brown"),
- dyeBlue ( 4, 0, 0, 255, "Blue"),
- dyePurple ( 5, 128, 0, 128, "Purple"),
- dyeCyan ( 6, 0, 255, 255, "Cyan"),
- dyeLightGray ( 7, 192, 192, 192, "Light Gray"),
- dyeGray ( 8, 128, 128, 128, "Gray"),
- dyePink ( 9, 255, 192, 192, "Pink"),
- dyeLime (10, 128, 255, 128, "Lime"),
- dyeYellow (11, 255, 255, 0, "Yellow"),
- dyeLightBlue (12, 128, 128, 255, "Light Blue"),
- dyeMagenta (13, 255, 0, 255, "Magenta"),
- dyeOrange (14, 255, 128, 0, "Orange"),
- dyeWhite (15, 255, 255, 255, "White"),
- /** The NULL Color */
- _NULL (-1, 255, 255, 255, "INVALID COLOR"),
- /** Additional Colors only used for direct Color referencing */
- CABLE_INSULATION (-1, 64, 64, 64, "Cable Insulation"),
- CONSTRUCTION_FOAM (-1, 64, 64, 64, "Construction Foam"),
- MACHINE_METAL (-1, 220, 220, 255, "Machine Metal");
-
- public static final Dyes VALUES[] = {dyeBlack, dyeRed, dyeGreen, dyeBrown, dyeBlue, dyePurple, dyeCyan, dyeLightGray, dyeGray, dyePink, dyeLime, dyeYellow, dyeLightBlue, dyeMagenta, dyeOrange, dyeWhite};
-
- public final byte mIndex;
- public final String mName;
- public final short[] mRGBa;
- private final ArrayList<Fluid> mFluidDyes = new GT_ArrayList<Fluid>(false, 1);
-
- private Dyes(int aIndex, int aR, int aG, int aB, String aName) {
- mIndex = (byte)aIndex;
- mName = aName;
- mRGBa = new short[] {(short)aR, (short)aG, (short)aB, 0};
- }
-
- public static Dyes get(int aColor) {
- if (aColor >= 0 && aColor < 16) return VALUES[aColor];
- return _NULL;
- }
-
- public static short[] getModulation(int aColor, short[] aDefaultModulation) {
- if (aColor >= 0 && aColor < 16) return VALUES[aColor].mRGBa;
- return aDefaultModulation;
- }
-
- public static Dyes get(String aColor) {
- Object tObject = GT_Utility.getFieldContent(Dyes.class, aColor, false, false);
- if (tObject != null && tObject instanceof Dyes) return (Dyes)tObject;
- return _NULL;
- }
-
- public static boolean isAnyFluidDye(FluidStack aFluid) {
- return aFluid != null && isAnyFluidDye(aFluid.getFluid());
- }
-
- public static boolean isAnyFluidDye(Fluid aFluid) {
- if (aFluid != null) for (Dyes tDye : VALUES) if (tDye.isFluidDye(aFluid)) return true;
- return false;
- }
-
- public boolean isFluidDye(FluidStack aFluid) {
- return aFluid != null && isFluidDye(aFluid.getFluid());
- }
-
- public boolean isFluidDye(Fluid aFluid) {
- return aFluid != null && mFluidDyes.contains(aFluid);
- }
-
- public boolean addFluidDye(Fluid aDye) {
- if (aDye == null || mFluidDyes.contains(aDye)) return false;
- mFluidDyes.add(aDye);
- return true;
- }
-
- public int getSizeOfFluidList() {
- return mFluidDyes.size();
- }
-
- /**
- * @param aAmount 1 Fluid Material Unit (144) = 1 Dye Item
- */
- public FluidStack getFluidDye(int aIndex, long aAmount) {
- if (aIndex >= mFluidDyes.size() || aIndex < 0) return null;
- return new FluidStack(mFluidDyes.get(aIndex), (int)aAmount);
- }
-
- @Override
- public short[] getRGBA() {
- return mRGBa;
- }
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/enums/Element.java b/main/java/gregtech/api/enums/Element.java
deleted file mode 100644
index b9ff795320..0000000000
--- a/main/java/gregtech/api/enums/Element.java
+++ /dev/null
@@ -1,311 +0,0 @@
-package gregtech.api.enums;
-
-import gregtech.api.util.GT_Utility;
-
-import java.util.ArrayList;
-
-/**
- * This is some kind of Periodic Table, which I use to determine Properties of the Materials.
- */
-public enum Element {
- _NULL ( 0, 0, 0, -1, null , "" , false),
- H ( 1, 0, 0, -1, null , "Hydrogen" , false),
- D ( 1, 1, 0, -1, "H" , "Deuterium" , true),
- T ( 1, 2, 0, -1, "D" , "Tritium" , true),
- He ( 2, 2, 0, -1, null , "Helium" , false),
- He_3 ( 2, 1, 0, -1, "H&D" , "Helium-3" , true),
- Li ( 3, 4, 0, -1, null , "Lithium" , false),
- Be ( 4, 5, 0, -1, null , "Beryllium" , false),
- B ( 5, 5, 0, -1, null , "Boron" , false),
- C ( 6, 6, 0, -1, null , "Carbon" , false),
- N ( 7, 7, 0, -1, null , "Nitrogen" , false),
- O ( 8, 8, 0, -1, null , "Oxygen" , false),
- F ( 9, 9, 0, -1, null , "Fluorine" , false),
- Ne ( 10, 10, 0, -1, null , "Neon" , false),
- Na ( 11, 11, 0, -1, null , "Sodium" , false),
- Mg ( 12, 12, 0, -1, null , "Magnesium" , false),
- Al ( 13, 13, 0, -1, null , "Aluminium" , false),
- Si ( 14, 14, 0, -1, null , "Silicon" , false),
- P ( 15, 15, 0, -1, null , "Phosphorus" , false),
- S ( 16, 16, 0, -1, null , "Sulfur" , false),
- Cl ( 17, 18, 0, -1, null , "Chlorine" , false),
- Ar ( 18, 22, 0, -1, null , "Argon" , false),
- K ( 19, 20, 0, -1, null , "Potassium" , false),
- Ca ( 20, 20, 0, -1, null , "Calcium" , false),
- Sc ( 21, 24, 0, -1, null , "Scandium" , false),
- Ti ( 22, 26, 0, -1, null , "Titanium" , false),
- V ( 23, 28, 0, -1, null , "Vanadium" , false),
- Cr ( 24, 28, 0, -1, null , "Chrome" , false),
- Mn ( 25, 30, 0, -1, null , "Manganese" , false),
- Fe ( 26, 30, 0, -1, null , "Iron" , false),
- Co ( 27, 32, 0, -1, null , "Cobalt" , false),
- Ni ( 28, 30, 0, -1, null , "Nickel" , false),
- Cu ( 29, 34, 0, -1, null , "Copper" , false),
- Zn ( 30, 35, 0, -1, null , "Zinc" , false),
- Ga ( 31, 39, 0, -1, null , "Gallium" , false),
- Ge ( 32, 40, 0, -1, null , "Germanium" , false),
- As ( 33, 42, 0, -1, null , "Arsenic" , false),
- Se ( 34, 45, 0, -1, null , "Selenium" , false),
- Br ( 35, 45, 0, -1, null , "Bromine" , false),
- Kr ( 36, 48, 0, -1, null , "Krypton" , false),
- Rb ( 37, 48, 0, -1, null , "Rubidium" , false),
- Sr ( 38, 49, 0, -1, null , "Strontium" , false),
- Y ( 39, 50, 0, -1, null , "Yttrium" , false),
- Zr ( 40, 51, 0, -1, null , "Zirconium" , false),
- Nb ( 41, 53, 0, -1, null , "Niobium" , false),
- Mo ( 42, 53, 0, -1, null , "Molybdenum" , false),
- Tc ( 43, 55, 0, -1, null , "Technetium" , false),
- Ru ( 44, 57, 0, -1, null , "Ruthenium" , false),
- Rh ( 45, 58, 0, -1, null , "Rhodium" , false),
- Pd ( 46, 60, 0, -1, null , "Palladium" , false),
- Ag ( 47, 60, 0, -1, null , "Silver" , false),
- Cd ( 48, 64, 0, -1, null , "Cadmium" , false),
- In ( 49, 65, 0, -1, null , "Indium" , false),
- Sn ( 50, 68, 0, -1, null , "Tin" , false),
- Sb ( 51, 70, 0, -1, null , "Antimony" , false),
- Te ( 52, 75, 0, -1, null , "Tellurium" , false),
- I ( 53, 74, 0, -1, null , "Iodine" , false),
- Xe ( 54, 77, 0, -1, null , "Xenon" , false),
- Cs ( 55, 77, 0, -1, null , "Caesium" , false),
- Ba ( 56, 81, 0, -1, null , "Barium" , false),
- La ( 57, 81, 0, -1, null , "Lantanium" , false),
- Ce ( 58, 82, 0, -1, null , "Cerium" , false),
- Pr ( 59, 81, 0, -1, null , "Praseodymium" , false),
- Nd ( 60, 84, 0, -1, null , "Neodymium" , false),
- Pm ( 61, 83, 0, -1, null , "Promethium" , false),
- Sm ( 62, 88, 0, -1, null , "Samarium" , false),
- Eu ( 63, 88, 0, -1, null , "Europium" , false),
- Gd ( 64, 93, 0, -1, null , "Gadolinium" , false),
- Tb ( 65, 93, 0, -1, null , "Terbium" , false),
- Dy ( 66, 96, 0, -1, null , "Dysprosium" , false),
- Ho ( 67, 97, 0, -1, null , "Holmium" , false),
- Er ( 68, 99, 0, -1, null , "Erbium" , false),
- Tm ( 69, 99, 0, -1, null , "Thulium" , false),
- Yb ( 70, 103, 0, -1, null , "Ytterbium" , false),
- Lu ( 71, 103, 0, -1, null , "Lutetium" , false),
- Hf ( 72, 106, 0, -1, null , "Hafnium" , false),
- Ta ( 73, 107, 0, -1, null , "Tantalum" , false),
- W ( 74, 109, 0, -1, null , "Wolframium" , false),
- Re ( 75, 111, 0, -1, null , "Rhenium" , false),
- Os ( 76, 114, 0, -1, null , "Osmium" , false),
- Ir ( 77, 115, 0, -1, null , "Iridium" , false),
- Pt ( 78, 117, 0, -1, null , "Platinum" , false),
- Au ( 79, 117, 0, -1, null , "Gold" , false),
- Hg ( 80, 120, 0, -1, null , "Mercury" , false),
- Tl ( 81, 123, 0, -1, null , "Thallium" , false),
- Pb ( 82, 125, 0, -1, null , "Lead" , false),
- Bi ( 83, 125, 0, -1, null , "Bismuth" , false),
- Po ( 84, 124, 0, -1, null , "Polonium" , false),
- At ( 85, 124, 0, -1, null , "Astatine" , false),
- Rn ( 86, 134, 0, -1, null , "Radon" , false),
- Fr ( 87, 134, 0, -1, null , "Francium" , false),
- Ra ( 88, 136, 0, -1, null , "Radium" , false),
- Ac ( 89, 136, 0, -1, null , "Actinium" , false),
- Th ( 90, 140, 0, -1, null , "Thorium" , false),
- Pa ( 91, 138, 0, -1, null , "Protactinium" , false),
- U ( 92, 146, 0, -1, null , "Uranium" , false),
- U_235 ( 92, 143, 0, -1, null , "Uranium-235" , true),
- Np ( 93, 144, 0, -1, null , "Neptunium" , false),
- Pu ( 94, 152, 0, -1, null , "Plutonium" , false),
- Pu_241 ( 94, 149, 0, -1, null , "Plutonium-241" , true),
- Am ( 95, 150, 0, -1, null , "Americium" , false),
- Cm ( 96, 153, 0, -1, null , "Curium" , false),
- Bk ( 97, 152, 0, -1, null , "Berkelium" , false),
- Cf ( 98, 153, 0, -1, null , "Californium" , false),
- Es ( 99, 153, 0, -1, null , "Einsteinium" , false),
- Fm ( 100, 157, 0, -1, null , "Fermium" , false),
- Md ( 101, 157, 0, -1, null , "Mendelevium" , false),
- No ( 102, 157, 0, -1, null , "Nobelium" , false),
- Lr ( 103, 159, 0, -1, null , "Lawrencium" , false),
- Rf ( 104, 161, 0, -1, null , "Rutherfordium" , false),
- Db ( 105, 163, 0, -1, null , "Dubnium" , false),
- Sg ( 106, 165, 0, -1, null , "Seaborgium" , false),
- Bh ( 107, 163, 0, -1, null , "Bohrium" , false),
- Hs ( 108, 169, 0, -1, null , "Hassium" , false),
- Mt ( 109, 167, 0, -1, null , "Meitnerium" , false),
- Ds ( 110, 171, 0, -1, null , "Darmstadtium" , false),
- Rg ( 111, 169, 0, -1, null , "Roentgenium" , false),
- Cn ( 112, 173, 0, -1, null , "Copernicium" , false),
- Uut ( 113, 171, 0, -1, null , "Ununtrium" , false),
- Fl ( 114, 175, 0, -1, null , "Flerovium" , false),
- Uup ( 115, 173, 0, -1, null , "Ununpentium" , false),
- Lv ( 116, 177, 0, -1, null , "Livermorium" , false),
- Fa ( 117, 177, 0, -1, null , "Farnsium" , false), // Uus, Ununseptium
- Uuo ( 118, 176, 0, -1, null , "Ununoctium" , false),
-
- Ma ( 0, 0, 100, -1, null , "Magic" , false),
- Nt ( 0,100000, 0, -1, null , "Neutronium" , false),
-
- $H (- 1,- 0, 0, -1, null , "Anti-Hydrogen" , false),
- $D (- 1,- 1, 0, -1, "H" , "Anti-Deuterium" , true),
- $T (- 1,- 2, 0, -1, "D" , "Anti-Tritium" , true),
- $He (- 2,- 2, 0, -1, null , "Anti-Helium" , false),
- $He_3 (- 2,- 1, 0, -1, "H&D" , "Anti-Helium-3" , true),
- $Li (- 3,- 4, 0, -1, null , "Anti-Lithium" , false),
- $Be (- 4,- 5, 0, -1, null , "Anti-Beryllium" , false),
- $B (- 5,- 5, 0, -1, null , "Anti-Boron" , false),
- $C (- 6,- 6, 0, -1, null , "Anti-Carbon" , false),
- $N (- 7,- 7, 0, -1, null , "Anti-Nitrogen" , false),
- $O (- 8,- 8, 0, -1, null , "Anti-Oxygen" , false),
- $F (- 9,- 9, 0, -1, null , "Anti-Fluorine" , false),
- $Ne (- 10,- 10, 0, -1, null , "Anti-Neon" , false),
- $Na (- 11,- 11, 0, -1, null , "Anti-Sodium" , false),
- $Mg (- 12,- 12, 0, -1, null , "Anti-Magnesium" , false),
- $Al (- 13,- 13, 0, -1, null , "Anti-Aluminium" , false),
- $Si (- 14,- 14, 0, -1, null , "Anti-Silicon" , false),
- $P (- 15,- 15, 0, -1, null , "Anti-Phosphorus" , false),
- $S (- 16,- 16, 0, -1, null , "Anti-Sulfur" , false),
- $Cl (- 17,- 18, 0, -1, null , "Anti-Chlorine" , false),
- $Ar (- 18,- 22, 0, -1, null , "Anti-Argon" , false),
- $K (- 19,- 20, 0, -1, null , "Anti-Potassium" , false),
- $Ca (- 20,- 20, 0, -1, null , "Anti-Calcium" , false),
- $Sc (- 21,- 24, 0, -1, null , "Anti-Scandium" , false),
- $Ti (- 22,- 26, 0, -1, null , "Anti-Titanium" , false),
- $V (- 23,- 28, 0, -1, null , "Anti-Vanadium" , false),
- $Cr (- 24,- 28, 0, -1, null , "Anti-Chrome" , false),
- $Mn (- 25,- 30, 0, -1, null , "Anti-Manganese" , false),
- $Fe (- 26,- 30, 0, -1, null , "Anti-Iron" , false),
- $Co (- 27,- 32, 0, -1, null , "Anti-Cobalt" , false),
- $Ni (- 28,- 30, 0, -1, null , "Anti-Nickel" , false),
- $Cu (- 29,- 34, 0, -1, null , "Anti-Copper" , false),
- $Zn (- 30,- 35, 0, -1, null , "Anti-Zinc" , false),
- $Ga (- 31,- 39, 0, -1, null , "Anti-Gallium" , false),
- $Ge (- 32,- 40, 0, -1, null , "Anti-Germanium" , false),
- $As (- 33,- 42, 0, -1, null , "Anti-Arsenic" , false),
- $Se (- 34,- 45, 0, -1, null , "Anti-Selenium" , false),
- $Br (- 35,- 45, 0, -1, null , "Anti-Bromine" , false),
- $Kr (- 36,- 48, 0, -1, null , "Anti-Krypton" , false),
- $Rb (- 37,- 48, 0, -1, null , "Anti-Rubidium" , false),
- $Sr (- 38,- 49, 0, -1, null , "Anti-Strontium" , false),
- $Y (- 39,- 50, 0, -1, null , "Anti-Yttrium" , false),
- $Zr (- 40,- 51, 0, -1, null , "Anti-Zirconium" , false),
- $Nb (- 41,- 53, 0, -1, null , "Anti-Niobium" , false),
- $Mo (- 42,- 53, 0, -1, null , "Anti-Molybdenum" , false),
- $Tc (- 43,- 55, 0, -1, null , "Anti-Technetium" , false),
- $Ru (- 44,- 57, 0, -1, null , "Anti-Ruthenium" , false),
- $Rh (- 45,- 58, 0, -1, null , "Anti-Rhodium" , false),
- $Pd (- 46,- 60, 0, -1, null , "Anti-Palladium" , false),
- $Ag (- 47,- 60, 0, -1, null , "Anti-Silver" , false),
- $Cd (- 48,- 64, 0, -1, null , "Anti-Cadmium" , false),
- $In (- 49,- 65, 0, -1, null , "Anti-Indium" , false),
- $Sn (- 50,- 68, 0, -1, null , "Anti-Tin" , false),
- $Sb (- 51,- 70, 0, -1, null , "Anti-Antimony" , false),
- $Te (- 52,- 75, 0, -1, null , "Anti-Tellurium" , false),
- $I (- 53,- 74, 0, -1, null , "Anti-Iodine" , false),
- $Xe (- 54,- 77, 0, -1, null , "Anti-Xenon" , false),
- $Cs (- 55,- 77, 0, -1, null , "Anti-Caesium" , false),
- $Ba (- 56,- 81, 0, -1, null , "Anti-Barium" , false),
- $La (- 57,- 81, 0, -1, null , "Anti-Lantanium" , false),
- $Ce (- 58,- 82, 0, -1, null , "Anti-Cerium" , false),
- $Pr (- 59,- 81, 0, -1, null , "Anti-Praseodymium" , false),
- $Nd (- 60,- 84, 0, -1, null , "Anti-Neidymium" , false),
- $Pm (- 61,- 83, 0, -1, null , "Anti-Promethium" , false),
- $Sm (- 62,- 88, 0, -1, null , "Anti-Samarium" , false),
- $Eu (- 63,- 88, 0, -1, null , "Anti-Europium" , false),
- $Gd (- 64,- 93, 0, -1, null , "Anti-Gadolinium" , false),
- $Tb (- 65,- 93, 0, -1, null , "Anti-Terbium" , false),
- $Dy (- 66,- 96, 0, -1, null , "Anti-Dysprosium" , false),
- $Ho (- 67,- 97, 0, -1, null , "Anti-Holmium" , false),
- $Er (- 68,- 99, 0, -1, null , "Anti-Erbium" , false),
- $Tm (- 69,- 99, 0, -1, null , "Anti-Thulium" , false),
- $Yb (- 70,-103, 0, -1, null , "Anti-Ytterbium" , false),
- $Lu (- 71,-103, 0, -1, null , "Anti-Lutetium" , false),
- $Hf (- 72,-106, 0, -1, null , "Anti-Hafnium" , false),
- $Ta (- 73,-107, 0, -1, null , "Anti-Tantalum" , false),
- $W (- 74,-109, 0, -1, null , "Anti-Wolframium" , false),
- $Re (- 75,-111, 0, -1, null , "Anti-Rhenium" , false),
- $Os (- 76,-114, 0, -1, null , "Anti-Osmium" , false),
- $Ir (- 77,-115, 0, -1, null , "Anti-Iridium" , false),
- $Pt (- 78,-117, 0, -1, null , "Anti-Platinum" , false),
- $Au (- 79,-117, 0, -1, null , "Anti-Gold" , false),
- $Hg (- 80,-120, 0, -1, null , "Anti-Mercury" , false),
- $Tl (- 81,-123, 0, -1, null , "Anti-Thallium" , false),
- $Pb (- 82,-125, 0, -1, null , "Anti-Lead" , false),
- $Bi (- 83,-125, 0, -1, null , "Anti-Bismuth" , false),
- $Po (- 84,-124, 0, -1, null , "Anti-Polonium" , false),
- $At (- 85,-124, 0, -1, null , "Anti-Astatine" , false),
- $Rn (- 86,-134, 0, -1, null , "Anti-Radon" , false),
- $Fr (- 87,-134, 0, -1, null , "Anti-Francium" , false),
- $Ra (- 88,-136, 0, -1, null , "Anti-Radium" , false),
- $Ac (- 89,-136, 0, -1, null , "Anti-Actinium" , false),
- $Th (- 90,-140, 0, -1, null , "Anti-Thorium" , false),
- $Pa (- 91,-138, 0, -1, null , "Anti-Protactinium" , false),
- $U (- 92,-146, 0, -1, null , "Anti-Uranium" , false),
- $U_235 (- 92,-143, 0, -1, null , "Anti-Uranium-235" , true),
- $Np (- 93,-144, 0, -1, null , "Anti-Neptunium" , false),
- $Pu (- 94,-152, 0, -1, null , "Anti-Plutonium" , false),
- $Pu_241 (- 94,-149, 0, -1, null , "Anti-Plutonium-241" , true),
- $Am (- 95,-150, 0, -1, null , "Anti-Americum" , false),
- $Cm (- 96,-153, 0, -1, null , "Anti-Curium" , false),
- $Bk (- 97,-152, 0, -1, null , "Anti-Berkelium" , false),
- $Cf (- 98,-153, 0, -1, null , "Anti-Californium" , false),
- $Es (- 99,-153, 0, -1, null , "Anti-Einsteinium" , false),
- $Fm (-100,-157, 0, -1, null , "Anti-Fermium" , false),
- $Md (-101,-157, 0, -1, null , "Anti-Mendelevium" , false),
- $No (-102,-157, 0, -1, null , "Anti-Nobelium" , false),
- $Lr (-103,-159, 0, -1, null , "Anti-Lawrencium" , false),
- $Rf (-104,-161, 0, -1, null , "Anti-Rutherfordium" , false),
- $Db (-105,-163, 0, -1, null , "Anti-Dubnium" , false),
- $Sg (-106,-165, 0, -1, null , "Anti-Seaborgium" , false),
- $Bh (-107,-163, 0, -1, null , "Anti-Bohrium" , false),
- $Hs (-108,-169, 0, -1, null , "Anti-Hassium" , false),
- $Mt (-109,-167, 0, -1, null , "Anti-Meitnerium" , false),
- $Ds (-110,-171, 0, -1, null , "Anti-Darmstadtium" , false),
- $Rg (-111,-169, 0, -1, null , "Anti-Roentgenium" , false),
- $Cn (-112,-173, 0, -1, null , "Anti-Copernicium" , false),
- $Uut (-113,-171, 0, -1, null , "Anti-Ununtrium" , false),
- $Fl (-114,-175, 0, -1, null , "Anti-Flerovium" , false),
- $Uup (-115,-173, 0, -1, null , "Anti-Ununpentium" , false),
- $Lv (-116,-177, 0, -1, null , "Anti-Livermorium" , false),
- $Uus (-117,-177, 0, -1, null , "Anti-Ununseptium" , false),
- $Uuo (-118,-176, 0, -1, null , "Anti-Ununoctium" , false),
-
- $Ma ( 0, 0,-100, -1, null , "Anti-Magic" , false),
- $Nt (0, -10000, 0, -1, null , "Anti-Neutronium" , false);
-
- public static Element get(String aMaterialName) {
- Object tObject = GT_Utility.getFieldContent(Element.class, aMaterialName, false, false);
- if (tObject != null && tObject instanceof Element) return (Element)tObject;
- return _NULL;
- }
-
- public final long mProtons, mNeutrons, mAdditionalMass, mHalfLifeSeconds;
- public final String mName, mDecayTo;
- public final boolean mIsIsotope;
-
- /**
- * Links to every pure Material containing just this Element.
- */
- public ArrayList<Materials> mLinkedMaterials = new ArrayList<Materials>();
-
- /**
- * @param aProtons Amount of Protons. Antiprotons if negative.
- * @param aNeutrons Amount of Neutrons. Antineutrons if negative. (I could have made mistakes with the Neutron amount calculation, please tell me if I did something wrong)
- * @param aHalfLifeSeconds Amount of Half Life this Material has in Seconds. -1 for stable Materials.
- * @param aDecayTo String representing the Elements it decays to. Separated by an '&' Character.
- * @param aName Name of the Element
- */
- private Element(long aProtons, long aNeutrons, long aAdditionalMass, long aHalfLifeSeconds, String aDecayTo, String aName, boolean aIsIsotope) {
- mProtons = aProtons;
- mNeutrons = aNeutrons;
- mAdditionalMass = aAdditionalMass;
- mHalfLifeSeconds = aHalfLifeSeconds;
- mDecayTo = aDecayTo;
- mName = aName;
- mIsIsotope = aIsIsotope;
- }
-
- public long getProtons() {
- return mProtons;
- }
-
- public long getNeutrons() {
- return mNeutrons;
- }
-
- public long getMass() {
- return mProtons + mNeutrons + mAdditionalMass;
- }
-
- public static volatile int VERSION = 508;
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/enums/GT_Values.java b/main/java/gregtech/api/enums/GT_Values.java
deleted file mode 100644
index e04b2be941..0000000000
--- a/main/java/gregtech/api/enums/GT_Values.java
+++ /dev/null
@@ -1,160 +0,0 @@
-package gregtech.api.enums;
-
-import gregtech.api.interfaces.internal.IGT_Mod;
-import gregtech.api.interfaces.internal.IGT_RecipeAdder;
-import gregtech.api.net.IGT_NetworkHandler;
-
-import java.util.Arrays;
-import java.util.HashSet;
-
-import net.minecraft.item.ItemStack;
-import net.minecraft.world.World;
-import net.minecraftforge.fluids.FluidStack;
-import net.minecraftforge.oredict.OreDictionary;
-
-/**
- * Made for static imports, this Class is just a Helper.
- *
- * I am doing this to have a better Table alike view on my Code, so I can change things faster using the Block Selection Mode of eclipse.
- *
- * Go to "Window > Preferences > Java > Editor > Content Assist > Favorites" to set static importable Constant Classes such as this one as AutoCompleteable.
- */
-public class GT_Values {
- // unused: A, C, D, G, H, I, J, K, N, O, Q, R, S, T
-
- // TODO: Rename Material Units to 'U'
- // TODO: Rename OrePrefixes Class to 'P'
- // TODO: Rename Materials Class to 'M'
-
- /** Because "true" and "false" are too long. Some Programmers might wanna kill me for that, but this looks much better than true and false, and also it is better to have something that is not 4 and 5 Characters long, because of symmetry */
- public static final boolean T = true, F = false;
-
- /** Empty String for an easier Call Hierarchy */
- public static final String E = "";
-
- /** Character Set with all Numbers */
- public static final HashSet<Character> CN = new HashSet<Character>(Arrays.asList('0', '1', '2', '3', '4', '5', '6', '7', '8', '9'));
- /** Character Set with all lowercased Characters */
- public static final HashSet<Character> CL = new HashSet<Character>(Arrays.asList('a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'));
- /** Character Set with all uppercased Characters */
- public static final HashSet<Character> CU = new HashSet<Character>(Arrays.asList('A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'));
-
- /** The first 32 Bits */
- public static final int[] B = new int[] {1<<0,1<<1,1<<2,1<<3,1<<4,1<<5,1<<6,1<<7,1<<8,1<<9,1<<10,1<<11,1<<12,1<<13,1<<14,1<<15,1<<16,1<<17,1<<18,1<<19,1<<20,1<<21,1<<22,1<<23,1<<24,1<<25,1<<26,1<<27,1<<28,1<<29,1<<30,1<<31};
-
- /**
- * Renamed from "MATERIAL_UNIT" to just "M"
- *
- * This is worth exactly one normal Item.
- * This Constant can be divided by many commonly used Numbers such as
- * 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 24, ... 64 or 81
- * without loosing precision and is for that reason used as Unit of Amount.
- * But it is also small enough to be multiplied with larger Numbers.
- *
- * This is used to determine the amount of Material contained inside a prefixed Ore.
- * For example Nugget = M / 9 as it contains out of 1/9 of an Ingot.
- */
- public static final long M = 3628800;
-
- /**
- * Renamed from "FLUID_MATERIAL_UNIT" to just "L"
- *
- * Fluid per Material Unit (Prime Factors: 3 * 3 * 2 * 2 * 2 * 2)
- */
- public static final long L = 144;
-
- /** The Item WildCard Tag. Even shorter than the "-1" of the past */
- public static final short W = OreDictionary.WILDCARD_VALUE;
-
- /** The Voltage Tiers. Use this Array instead of the old named Voltage Variables */
- public static final long[] V = new long[] {8, 32, 128, 512, 2048, 8192, 32768, 131072, 524288, Integer.MAX_VALUE, Integer.MAX_VALUE, Integer.MAX_VALUE, Integer.MAX_VALUE, Integer.MAX_VALUE, Integer.MAX_VALUE, Integer.MAX_VALUE};
-
- /** The short Names for the Voltages */
- public static final String[] VN = new String[] {"ULV", "LV", "MV", "HV", "EV", "IV", "LuV", "ZPM", "UV", "MAX", "MAX", "MAX", "MAX", "MAX", "MAX", "MAX"};
-
- /** The long Names for the Voltages */
- public static final String[] VOLTAGE_NAMES = new String[] {"Ultra Low Voltage", "Low Voltage", "Medium Voltage", "High Voltage", "Extreme Voltage", "Insane Voltage", "Ludicrous Voltage", "ZPM Voltage", "Ultimate Voltage", "Maximum Voltage", "Maximum Voltage", "Maximum Voltage", "Maximum Voltage", "Maximum Voltage", "Maximum Voltage", "Maximum Voltage"};
-
- /** The Mod Object itself. That is the GT_Mod-Object. It's needed to open GUI's and similar. */
- public static IGT_Mod GT;
-
- /** Use this Object to add Recipes. (Recipe Adder) */
- public static IGT_RecipeAdder RA;
-
- /** For Internal Usage (Network) */
- public static IGT_NetworkHandler NW;
-
- /** This way it is possible to have a Call Hierarchy of NullPointers in ItemStack based Functions, and also because most of the time I don't know what kind of Data Type the "null" stands for */
- public static final ItemStack NI = null;
-
- /** This way it is possible to have a Call Hierarchy of NullPointers in FluidStack based Functions, and also because most of the time I don't know what kind of Data Type the "null" stands for */
- public static final FluidStack NF = null;
-
- /** Not really Constants, but they set using the Config and therefore should be constant (those are for the Debug Mode) */
- public static boolean D1 = false, D2 = false;
-
- /** If you have to give something a World Parameter but there is no World... (Dummy World) */
- public static World DW;
-
- /**
- * MOD ID Strings, since they are very common Parameters.
- */
- public static final String
- MOD_ID = "gregtech"
-
- , MOD_ID_IC2 = "IC2"
- , MOD_ID_NC = "IC2NuclearControl"
-
- , MOD_ID_TC = "Thaumcraft"
-
- , MOD_ID_TF = "TwilightForest"
-
- , MOD_ID_RC = "Railcraft"
-
- , MOD_ID_TE = "ThermalExpansion"
-
- , MOD_ID_AE = "appliedenergistics2"
-
- , MOD_ID_TFC = "terrafirmacraft"
-
- , MOD_ID_PFAA = "PFAAGeologica"
-
- , MOD_ID_FR = "Forestry"
- , MOD_ID_HaC = "harvestcraft"
- , MOD_ID_APC = "AppleCore"
- , MOD_ID_MaCr = "magicalcrops"
- , MOD_ID_GaEn = "ganysend"
- , MOD_ID_GaSu = "ganyssurface"
- , MOD_ID_GaNe = "ganysnether"
-
- , MOD_ID_BC_SILICON = "BuildCraft|Silicon"
- , MOD_ID_BC_TRANSPORT = "BuildCraft|Transport"
- , MOD_ID_BC_FACTORY = "BuildCraft|Factory"
- , MOD_ID_BC_ENERGY = "BuildCraft|Energy"
- , MOD_ID_BC_BUILDERS = "BuildCraft|Builders"
- , MOD_ID_BC_CORE = "BuildCraft|Core"
-
- , MOD_ID_GC_CORE = "GalacticraftCore"
- , MOD_ID_GC_MARS = "GalacticraftMars"
- , MOD_ID_GC_PLANETS = "GalacticraftPlanets"
- ;
-
- /** File Paths and Resource Paths */
- public static final String
- TEX_DIR = "textures/"
- , TEX_DIR_GUI = TEX_DIR + "gui/"
- , TEX_DIR_ITEM = TEX_DIR + "items/"
- , TEX_DIR_BLOCK = TEX_DIR + "blocks/"
- , TEX_DIR_ENTITY = TEX_DIR + "entity/"
- , TEX_DIR_ASPECTS = TEX_DIR + "aspects/"
-
- , RES_PATH = MOD_ID + ":" + TEX_DIR
- , RES_PATH_GUI = MOD_ID + ":" + TEX_DIR_GUI
- , RES_PATH_ITEM = MOD_ID + ":"
- , RES_PATH_BLOCK = MOD_ID + ":"
- , RES_PATH_ENTITY = MOD_ID + ":" + TEX_DIR_ENTITY
- , RES_PATH_ASPECTS = MOD_ID + ":" + TEX_DIR_ASPECTS
-
- , RES_PATH_IC2 = MOD_ID_IC2.toLowerCase() + ":"
- ;
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/enums/ItemList.java b/main/java/gregtech/api/enums/ItemList.java
deleted file mode 100644
index 2085071249..0000000000
--- a/main/java/gregtech/api/enums/ItemList.java
+++ /dev/null
@@ -1,785 +0,0 @@
-package gregtech.api.enums;
-
-import static gregtech.api.enums.GT_Values.W;
-import gregtech.api.interfaces.IItemContainer;
-import gregtech.api.util.GT_ModHandler;
-import gregtech.api.util.GT_OreDictUnificator;
-import gregtech.api.util.GT_Utility;
-import net.minecraft.block.Block;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraftforge.fluids.Fluid;
-
-/**
- * Class containing all non-OreDict Items of GregTech.
- */
-public enum ItemList implements IItemContainer {
- Display_ITS_FREE,
- Display_Fluid,
- TE_Slag,
- TE_Slag_Rich,
- TE_Rockwool,
- TE_Hardened_Glass,
- FR_Lemon,
- FR_Mulch,
- FR_Fertilizer,
- FR_Compost,
- FR_Silk,
- FR_Wax,
- FR_RefractoryWax,
- FR_WaxCapsule,
- FR_RefractoryCapsule,
- FR_Stick,
- FR_Casing_Impregnated,
- FR_Casing_Sturdy,
- FR_Casing_Hardened,
- FR_Bee_Drone,
- FR_Bee_Princess,
- FR_Bee_Queen,
- FR_Tree_Sapling,
- FR_Butterfly,
- FR_Larvae,
- FR_Serum,
- FR_Caterpillar,
- FR_PollenFertile,
- TF_LiveRoot,
- TF_Vial_FieryBlood,
- TF_Vial_FieryTears,
- RC_ShuntingWire,
- RC_ShuntingWireFrame,
- RC_Rail_Reinforced,
- RC_Rail_Electric,
- RC_Rail_Standard,
- RC_Rail_Wooden,
- RC_Rail_Adv,
- RC_Rail_HS,
- RC_Tie_Wood,
- RC_Tie_Stone,
- RC_Bed_Wood,
- RC_Bed_Stone,
- RC_Rebar,
- IC2_Item_Casing_Tin,
- IC2_Item_Casing_Copper,
- IC2_Item_Casing_Iron,
- IC2_Item_Casing_Steel,
- IC2_Item_Casing_Lead,
- IC2_Item_Casing_Bronze,
- IC2_Item_Casing_Gold,
- IC2_Spray_WeedEx,
- IC2_Scrap,
- IC2_Scrapbox,
- IC2_Fertilizer,
- IC2_Mixed_Metal_Ingot,
- IC2_Hops,
- IC2_Resin,
- IC2_Plantball,
- IC2_PlantballCompressed,
- IC2_CoffeeBeans,
- IC2_CoffeePowder,
- IC2_Crop_Seeds,
- IC2_Grin_Powder,
- IC2_Energium_Dust,
- IC2_Compressed_Coal_Ball,
- IC2_Compressed_Coal_Chunk,
- IC2_Fuel_Rod_Empty,
- IC2_Fuel_Can_Empty,
- IC2_Fuel_Can_Filled,
- IC2_Food_Can_Empty,
- IC2_Food_Can_Filled,
- IC2_Food_Can_Spoiled,
- IC2_ShaftIron,
- IC2_ShaftSteel,
- IC2_Industrial_Diamond,
- IC2_ForgeHammer,
- IC2_WireCutter,
- IC2_SuBattery,
- IC2_ReBattery,
- IC2_AdvBattery,
- IC2_EnergyCrystal,
- IC2_LapotronCrystal,
- Arrow_Head_Glass_Emtpy,
- Arrow_Head_Glass_Poison,
- Arrow_Head_Glass_Poison_Long,
- Arrow_Head_Glass_Poison_Strong,
- Arrow_Head_Glass_Slowness,
- Arrow_Head_Glass_Slowness_Long,
- Arrow_Head_Glass_Weakness,
- Arrow_Head_Glass_Weakness_Long,
- Arrow_Head_Glass_Holy_Water,
- Arrow_Wooden_Glass_Emtpy,
- Arrow_Wooden_Glass_Poison,
- Arrow_Wooden_Glass_Poison_Long,
- Arrow_Wooden_Glass_Poison_Strong,
- Arrow_Wooden_Glass_Slowness,
- Arrow_Wooden_Glass_Slowness_Long,
- Arrow_Wooden_Glass_Weakness,
- Arrow_Wooden_Glass_Weakness_Long,
- Arrow_Wooden_Glass_Holy_Water,
- Arrow_Plastic_Glass_Emtpy,
- Arrow_Plastic_Glass_Poison,
- Arrow_Plastic_Glass_Poison_Long,
- Arrow_Plastic_Glass_Poison_Strong,
- Arrow_Plastic_Glass_Slowness,
- Arrow_Plastic_Glass_Slowness_Long,
- Arrow_Plastic_Glass_Weakness,
- Arrow_Plastic_Glass_Weakness_Long,
- Arrow_Plastic_Glass_Holy_Water,
- Shape_Empty,
- Shape_Mold_Bottle,
- Shape_Mold_Plate,
- Shape_Mold_Ingot,
- Shape_Mold_Casing,
- Shape_Mold_Gear,
- Shape_Mold_Gear_Small,
- Shape_Mold_Credit,
- Shape_Mold_Nugget,
- Shape_Mold_Block,
- Shape_Mold_Ball,
- Shape_Mold_Bun,
- Shape_Mold_Bread,
- Shape_Mold_Baguette,
- Shape_Mold_Cylinder,
- Shape_Mold_Anvil,
- Shape_Mold_Arrow,
- Shape_Mold_Name,
- Shape_Slicer_Flat,
- Shape_Slicer_Stripes,
- Shape_Extruder_Bottle,
- Shape_Extruder_Plate,
- Shape_Extruder_Cell,
- Shape_Extruder_Ring,
- Shape_Extruder_Rod,
- Shape_Extruder_Bolt,
- Shape_Extruder_Ingot,
- Shape_Extruder_Wire,
- Shape_Extruder_Casing,
- Shape_Extruder_Pipe_Tiny,
- Shape_Extruder_Pipe_Small,
- Shape_Extruder_Pipe_Medium,
- Shape_Extruder_Pipe_Large,
- Shape_Extruder_Pipe_Huge,
- Shape_Extruder_Block,
- Shape_Extruder_Sword,
- Shape_Extruder_Pickaxe,
- Shape_Extruder_Shovel,
- Shape_Extruder_Axe,
- Shape_Extruder_Hoe,
- Shape_Extruder_Hammer,
- Shape_Extruder_File,
- Shape_Extruder_Saw,
- Shape_Extruder_Gear,
- Crate_Empty,
- Credit_Copper,
- Credit_Iron,
- Credit_Silver,
- Credit_Gold,
- Credit_Platinum,
- Credit_Osmium,
- Credit_Greg_Copper,
- Credit_Greg_Cupronickel,
- Credit_Greg_Silver,
- Credit_Greg_Gold,
- Credit_Greg_Platinum,
- Credit_Greg_Osmium,
- Credit_Greg_Naquadah,
- Credit_Greg_Neutronium,
- Coin_Gold_Ancient,
- Coin_Doge,
- Coin_Chocolate,
- Cell_Universal_Fluid,
- Cell_Empty,
- Cell_Water,
- Cell_Lava,
- Cell_Air,
- Large_Fluid_Cell_Steel,
- Large_Fluid_Cell_TungstenSteel,
- ThermosCan_Empty,
- ThermosCan_Dark_Coffee,
- ThermosCan_Dark_Cafe_au_lait,
- ThermosCan_Coffee,
- ThermosCan_Cafe_au_lait,
- ThermosCan_Lait_au_cafe,
- ThermosCan_Dark_Chocolate_Milk,
- ThermosCan_Chocolate_Milk,
- ThermosCan_Tea,
- ThermosCan_Sweet_Tea,
- ThermosCan_Ice_Tea,
- Bottle_Empty,
- Bottle_Milk,
- Bottle_Holy_Water,
- Bottle_Purple_Drink,
- Bottle_Grape_Juice,
- Bottle_Wine,
- Bottle_Vinegar,
- Bottle_Potato_Juice,
- Bottle_Vodka,
- Bottle_Leninade,
- Bottle_Mineral_Water,
- Bottle_Salty_Water,
- Bottle_Reed_Water,
- Bottle_Rum,
- Bottle_Pirate_Brew,
- Bottle_Hops_Juice,
- Bottle_Dark_Beer,
- Bottle_Dragon_Blood,
- Bottle_Wheaty_Juice,
- Bottle_Scotch,
- Bottle_Glen_McKenner,
- Bottle_Wheaty_Hops_Juice,
- Bottle_Beer,
- Bottle_Chilly_Sauce,
- Bottle_Hot_Sauce,
- Bottle_Diabolo_Sauce,
- Bottle_Diablo_Sauce,
- Bottle_Snitches_Glitch_Sauce,
- Bottle_Apple_Juice,
- Bottle_Cider,
- Bottle_Golden_Apple_Juice,
- Bottle_Golden_Cider,
- Bottle_Iduns_Apple_Juice,
- Bottle_Notches_Brew,
- Bottle_Lemon_Juice,
- Bottle_Limoncello,
- Bottle_Lemonade,
- Bottle_Alcopops,
- Bottle_Cave_Johnsons_Grenade_Juice,
- Food_Potato_On_Stick,
- Food_Potato_On_Stick_Roasted,
- Food_Fries,
- Food_ChiliChips,
- Food_PotatoChips,
- Food_Baked_Potato,
- Food_Poisonous_Potato,
- Food_Cheese,
- Food_Chum,
- Food_Chum_On_Stick,
- Food_Dough,
- Food_Dough_Sugar,
- Food_Dough_Chocolate,
- Food_Raw_Cookie,
- Food_Flat_Dough,
- Food_Burger_Veggie,
- Food_Burger_Cheese,
- Food_Burger_Meat,
- Food_Burger_Chum,
- Food_Sandwich_Veggie,
- Food_Sandwich_Cheese,
- Food_Sandwich_Bacon,
- Food_Sandwich_Steak,
- Food_Large_Sandwich_Veggie,
- Food_Large_Sandwich_Cheese,
- Food_Large_Sandwich_Bacon,
- Food_Large_Sandwich_Steak,
- Food_Sliced_Lemon,
- Food_Sliced_Tomato,
- Food_Sliced_Onion,
- Food_Sliced_Cucumber,
- Food_Sliced_Cheese,
- Food_Sliced_Bread,
- Food_Sliced_Bun,
- Food_Sliced_Baguette,
- Food_Sliced_Breads,
- Food_Sliced_Buns,
- Food_Sliced_Baguettes,
- Food_Packaged_Fries,
- Food_Packaged_PotatoChips,
- Food_Packaged_ChiliChips,
- Food_Raw_Potato,
- Food_Raw_Fries,
- Food_Raw_PotatoChips,
- Food_Raw_Bread,
- Food_Raw_Bun,
- Food_Raw_Baguette,
- Food_Raw_Cake,
- Food_Raw_Pizza_Veggie,
- Food_Raw_Pizza_Cheese,
- Food_Raw_Pizza_Meat,
- Food_Baked_Bread,
- Food_Baked_Bun,
- Food_Baked_Baguette,
- Food_Baked_Cake,
- Food_Baked_Pizza_Veggie,
- Food_Baked_Pizza_Cheese,
- Food_Baked_Pizza_Meat,
- Crop_Drop_Argentia,
- Crop_Drop_Plumbilia,
- Crop_Drop_Indigo,
- Crop_Drop_Ferru,
- Crop_Drop_Aurelia,
- Crop_Drop_OilBerry,
- Crop_Drop_MilkWart,
- Crop_Drop_BobsYerUncleRanks,
- Crop_Drop_Coppon,
- Crop_Drop_Tine,
- Crop_Drop_Chilly,
- Crop_Drop_Lemon,
- Crop_Drop_Onion,
- Crop_Drop_Tomato,
- Crop_Drop_MTomato,
- Crop_Drop_Grapes,
- Crop_Drop_TeaLeaf,
- Crop_Drop_Cucumber,
- Schematic,
- Schematic_Crafting,
- Schematic_1by1,
- Schematic_2by2,
- Schematic_3by3,
- Schematic_Dust,
- Circuit_Integrated,
- Circuit_Board_Basic,
- Circuit_Board_Advanced,
- Circuit_Board_Elite,
- Circuit_Parts_Advanced,
- Circuit_Parts_Wiring_Basic,
- Circuit_Parts_Wiring_Advanced,
- Circuit_Parts_Wiring_Elite,
- Circuit_Parts_Crystal_Chip_Elite,
- Circuit_Parts_Crystal_Chip_Master,
- Circuit_Primitive,
- Circuit_Basic,
- Circuit_Good,
- Circuit_Advanced,
- Circuit_Data,
- Circuit_Elite,
- Circuit_Master,
- Circuit_Ultimate,
- Rotor_LV, Rotor_MV, Rotor_HV, Rotor_EV, Rotor_IV, Rotor_LuV, Rotor_ZPM, Rotor_UV,
- Electric_Motor_LV, Electric_Motor_MV, Electric_Motor_HV, Electric_Motor_EV, Electric_Motor_IV, Electric_Motor_LuV, Electric_Motor_ZPM, Electric_Motor_UV,
- Electric_Pump_LV, Electric_Pump_MV, Electric_Pump_HV, Electric_Pump_EV, Electric_Pump_IV, Electric_Pump_LuV, Electric_Pump_ZPM, Electric_Pump_UV,
- Conveyor_Module_LV, Conveyor_Module_MV, Conveyor_Module_HV, Conveyor_Module_EV, Conveyor_Module_IV, Conveyor_Module_LuV, Conveyor_Module_ZPM, Conveyor_Module_UV,
- Electric_Piston_LV, Electric_Piston_MV, Electric_Piston_HV, Electric_Piston_EV, Electric_Piston_IV, Electric_Piston_LuV, Electric_Piston_ZPM, Electric_Piston_UV,
- Field_Generator_LV, Field_Generator_MV, Field_Generator_HV, Field_Generator_EV, Field_Generator_IV, Field_Generator_LuV, Field_Generator_ZPM, Field_Generator_UV,
- Robot_Arm_LV, Robot_Arm_MV, Robot_Arm_HV, Robot_Arm_EV, Robot_Arm_IV, Robot_Arm_LuV, Robot_Arm_ZPM, Robot_Arm_UV,
- Emitter_LV, Emitter_MV, Emitter_HV, Emitter_EV, Emitter_IV, Emitter_LuV, Emitter_ZPM, Emitter_UV,
- Sensor_LV, Sensor_MV, Sensor_HV, Sensor_EV, Sensor_IV, Sensor_LuV, Sensor_ZPM, Sensor_UV,
- Battery_Hull_LV, Battery_Hull_MV, Battery_Hull_HV,
- Battery_SU_LV_SulfuricAcid,
- Battery_SU_LV_Mercury,
- Battery_SU_MV_SulfuricAcid,
- Battery_SU_MV_Mercury,
- Battery_SU_HV_SulfuricAcid,
- Battery_SU_HV_Mercury,
- Battery_RE_ULV_Tantalum,
- Battery_RE_LV_Cadmium,
- Battery_RE_LV_Lithium,
- Battery_RE_LV_Sodium,
- Battery_RE_MV_Cadmium,
- Battery_RE_MV_Lithium,
- Battery_RE_MV_Sodium,
- Battery_RE_HV_Cadmium,
- Battery_RE_HV_Lithium,
- Battery_RE_HV_Sodium,
- ZPM,
- Fuel_Can_Plastic_Empty,
- Fuel_Can_Plastic_Filled,
- Upgrade_Battery,
- Upgrade_Overclocker,
- Upgrade_Muffler,
- Upgrade_SteamEngine,
- Upgrade_Lock,
- Cover_Controller,
- Cover_ActivityDetector,
- Cover_FluidDetector,
- Cover_ItemDetector,
- Cover_EnergyDetector,
- Cover_Drain,
- Cover_Shutter,
- Cover_Crafting,
- Cover_Screen,
- Cover_SolarPanel,
- Cover_SolarPanel_8V,
- Cover_SolarPanel_LV,
- Cover_SolarPanel_MV,
- Cover_SolarPanel_HV,
- Cover_SolarPanel_EV,
- Cover_SolarPanel_IV,
- Cover_SolarPanel_LuV,
- Cover_SolarPanel_ZPM,
- Cover_SolarPanel_UV,
- Ingot_IridiumAlloy,
- Plank_Oak,
- Plank_Spruce,
- Plank_Birch,
- Plank_Jungle,
- Plank_Acacia,
- Plank_DarkOak,
- Plank_Larch,
- Plank_Teak,
- Plank_Acacia_Green,
- Plank_Lime,
- Plank_Chestnut,
- Plank_Wenge,
- Plank_Baobab,
- Plank_Sequoia,
- Plank_Kapok,
- Plank_Ebony,
- Plank_Mahagony,
- Plank_Balsa,
- Plank_Willow,
- Plank_Walnut,
- Plank_Greenheart,
- Plank_Cherry,
- Plank_Mahoe,
- Plank_Poplar,
- Plank_Palm,
- Plank_Papaya,
- Plank_Pine,
- Plank_Plum,
- Plank_Maple,
- Plank_Citrus,
- Dye_Indigo,
- Dye_SquidInk,
- Dye_Bonemeal,
- Dye_Cocoa,
- Duct_Tape,
- Book_Written_00,
- Book_Written_01,
- Book_Written_02,
- Book_Written_03,
- Paper_Printed_Pages,
- Paper_Magic_Empty,
- Paper_Magic_Page,
- Paper_Magic_Pages,
- Paper_Punch_Card_Empty,
- Paper_Punch_Card_Encoded,
- McGuffium_239,
- NC_SensorCard,
- NC_SensorKit,
- Tool_Matches,
- Tool_MatchBox_Used,
- Tool_MatchBox_Full,
- Tool_Lighter_Invar_Empty,
- Tool_Lighter_Invar_Used,
- Tool_Lighter_Invar_Full,
- Tool_Lighter_Platinum_Empty,
- Tool_Lighter_Platinum_Used,
- Tool_Lighter_Platinum_Full,
- Tool_Cheat,
- Tool_Scanner,
- Tool_DataOrb,
- Tool_DataStick,
- Tool_Sonictron,
- Tool_Sword_Bronze,
- Tool_Pickaxe_Bronze,
- Tool_Shovel_Bronze,
- Tool_Axe_Bronze,
- Tool_Hoe_Bronze,
- Tool_Sword_Steel,
- Tool_Pickaxe_Steel,
- Tool_Shovel_Steel,
- Tool_Axe_Steel,
- Tool_Hoe_Steel,
-
- Spray_Empty, Spray_Bug, Spray_Ice, Spray_Hardener, Spray_CFoam, Spray_Pepper, Spray_Hydration,
- Color_00, Color_01, Color_02, Color_03, Color_04, Color_05, Color_06, Color_07, Color_08, Color_09, Color_10, Color_11, Color_12, Color_13, Color_14, Color_15,
- Spray_Color_00, Spray_Color_01, Spray_Color_02, Spray_Color_03, Spray_Color_04, Spray_Color_05, Spray_Color_06, Spray_Color_07, Spray_Color_08, Spray_Color_09, Spray_Color_10, Spray_Color_11, Spray_Color_12, Spray_Color_13, Spray_Color_14, Spray_Color_15,
- Spray_Color_Used_00, Spray_Color_Used_01, Spray_Color_Used_02, Spray_Color_Used_03, Spray_Color_Used_04, Spray_Color_Used_05, Spray_Color_Used_06, Spray_Color_Used_07, Spray_Color_Used_08, Spray_Color_Used_09, Spray_Color_Used_10, Spray_Color_Used_11, Spray_Color_Used_12, Spray_Color_Used_13, Spray_Color_Used_14, Spray_Color_Used_15,
-
- Armor_Cheat,
- Armor_Cloaking,
- Armor_Lamp,
- Armor_LithiumPack,
- Armor_LapotronicPack,
- Armor_ForceField,
- Energy_LapotronicOrb,
- Reactor_NeutronReflector,
- Component_Turbine_Bronze,
- Component_Turbine_Steel,
- Component_Turbine_Magnalium,
- Component_Turbine_TungstenSteel,
- Component_Turbine_Carbon,
- Component_LavaFilter,
- Component_Sawblade_Diamond,
- Component_Grinder_Diamond,
- Component_Grinder_Tungsten,
- Component_Filter,
- Component_Minecart_Wheels_Iron,
- Component_Minecart_Wheels_Steel,
-
- Generator_Diesel_LV,
- Generator_Diesel_MV,
- Generator_Diesel_HV,
- Generator_Gas_Turbine_LV,
- Generator_Gas_Turbine_MV,
- Generator_Gas_Turbine_HV,
- Generator_Steam_Turbine_LV,
- Generator_Steam_Turbine_MV,
- Generator_Steam_Turbine_HV,
- Generator_Naquadah_Mark_I,
- Generator_Naquadah_Mark_II,
- Generator_Naquadah_Fluid,
-
- Machine_Bronze_Boiler,
- Machine_Bronze_Boiler_Solar,
- Machine_Bronze_CraftingTable,
- Machine_Bronze_Furnace,
- Machine_Bronze_Macerator,
- Machine_Bronze_Extractor,
- Machine_Bronze_Hammer,
- Machine_Bronze_Compressor,
- Machine_Bronze_AlloySmelter,
- Machine_Bronze_BlastFurnace,
- Machine_Steel_Boiler_Lava,
- Machine_Steel_Boiler,
- Machine_Steel_Furnace,
- Machine_Steel_Macerator,
- Machine_Steel_Extractor,
- Machine_Steel_Hammer,
- Machine_Steel_Compressor,
- Machine_Steel_AlloySmelter,
-
- Hull_Bronze, Hull_Steel, Hull_Bronze_Bricks, Hull_Steel_Bricks,
-
- Transformer_LV_ULV, Transformer_MV_LV, Transformer_HV_MV, Transformer_EV_HV, Transformer_IV_EV, Transformer_LuV_IV, Transformer_ZPM_LuV, Transformer_UV_ZPM, Transformer_MAX_UV,
-
- Casing_ULV, Casing_LV, Casing_MV, Casing_HV, Casing_EV, Casing_IV, Casing_LuV, Casing_ZPM, Casing_UV, Casing_MAX, Casing_BronzePlatedBricks, Casing_HeatProof, Casing_Coil_Cupronickel, Casing_Coil_Kanthal, Casing_Coil_Nichrome, Casing_Coil_Superconductor,
- Casing_SolidSteel, Casing_FrostProof, Casing_Gearbox_Bronze, Casing_Gearbox_Steel, Casing_Gearbox_Titanium, Casing_Gearbox_TungstenSteel, Casing_Processor, Casing_DataDrive, Casing_ContainmentField, Casing_Assembler, Casing_Pump, Casing_Motor, Casing_Pipe_Bronze, Casing_Pipe_Steel, Casing_Pipe_Titanium, Casing_Pipe_TungstenSteel,
- Casing_Stripes_A, Casing_Stripes_B, Casing_RadioactiveHazard, Casing_BioHazard, Casing_ExplosionHazard, Casing_FireHazard, Casing_AcidHazard, Casing_MagicHazard, Casing_FrostHazard, Casing_NoiseHazard, Casing_Grate, Casing_Vent, Casing_RadiationProof, Casing_Firebox_Bronze, Casing_Firebox_Steel, Casing_Firebox_TungstenSteel,
- Casing_RobustTungstenSteel, Casing_CleanStainlessSteel, Casing_StableTitanium, Casing_Firebox_Titanium,
- Hull_ULV, Hull_LV, Hull_MV, Hull_HV, Hull_EV, Hull_IV, Hull_LuV, Hull_ZPM, Hull_UV, Hull_MAX,
-
- Automation_Filter_ULV, Automation_Filter_LV, Automation_Filter_MV, Automation_Filter_HV, Automation_Filter_EV, Automation_Filter_IV, Automation_Filter_LuV, Automation_Filter_ZPM, Automation_Filter_UV, Automation_Filter_MAX,
- Automation_TypeFilter_ULV, Automation_TypeFilter_LV, Automation_TypeFilter_MV, Automation_TypeFilter_HV, Automation_TypeFilter_EV, Automation_TypeFilter_IV, Automation_TypeFilter_LuV, Automation_TypeFilter_ZPM, Automation_TypeFilter_UV, Automation_TypeFilter_MAX,
- Automation_ChestBuffer_ULV, Automation_ChestBuffer_LV, Automation_ChestBuffer_MV, Automation_ChestBuffer_HV, Automation_ChestBuffer_EV, Automation_ChestBuffer_IV, Automation_ChestBuffer_LuV, Automation_ChestBuffer_ZPM, Automation_ChestBuffer_UV, Automation_ChestBuffer_MAX,
- Automation_SuperBuffer_ULV, Automation_SuperBuffer_LV, Automation_SuperBuffer_MV, Automation_SuperBuffer_HV, Automation_SuperBuffer_EV, Automation_SuperBuffer_IV, Automation_SuperBuffer_LuV, Automation_SuperBuffer_ZPM, Automation_SuperBuffer_UV, Automation_SuperBuffer_MAX,
- Automation_Regulator_ULV, Automation_Regulator_LV, Automation_Regulator_MV, Automation_Regulator_HV, Automation_Regulator_EV, Automation_Regulator_IV, Automation_Regulator_LuV, Automation_Regulator_ZPM, Automation_Regulator_UV, Automation_Regulator_MAX,
-
- Hatch_Dynamo_ULV, Hatch_Dynamo_LV, Hatch_Dynamo_MV, Hatch_Dynamo_HV, Hatch_Dynamo_EV, Hatch_Dynamo_IV, Hatch_Dynamo_LuV, Hatch_Dynamo_ZPM, Hatch_Dynamo_UV, Hatch_Dynamo_MAX,
- Hatch_Energy_ULV, Hatch_Energy_LV, Hatch_Energy_MV, Hatch_Energy_HV, Hatch_Energy_EV, Hatch_Energy_IV, Hatch_Energy_LuV, Hatch_Energy_ZPM, Hatch_Energy_UV, Hatch_Energy_MAX,
- Hatch_Input_ULV, Hatch_Input_LV, Hatch_Input_MV, Hatch_Input_HV, Hatch_Input_EV, Hatch_Input_IV, Hatch_Input_LuV, Hatch_Input_ZPM, Hatch_Input_UV, Hatch_Input_MAX,
- Hatch_Input_Bus_ULV, Hatch_Input_Bus_LV, Hatch_Input_Bus_MV, Hatch_Input_Bus_HV, Hatch_Input_Bus_EV, Hatch_Input_Bus_IV, Hatch_Input_Bus_LuV, Hatch_Input_Bus_ZPM, Hatch_Input_Bus_UV, Hatch_Input_Bus_MAX,
- Hatch_Output_ULV, Hatch_Output_LV, Hatch_Output_MV, Hatch_Output_HV, Hatch_Output_EV, Hatch_Output_IV, Hatch_Output_LuV, Hatch_Output_ZPM, Hatch_Output_UV, Hatch_Output_MAX,
- Hatch_Output_Bus_ULV, Hatch_Output_Bus_LV, Hatch_Output_Bus_MV, Hatch_Output_Bus_HV, Hatch_Output_Bus_EV, Hatch_Output_Bus_IV, Hatch_Output_Bus_LuV, Hatch_Output_Bus_ZPM, Hatch_Output_Bus_UV, Hatch_Output_Bus_MAX,
- Hatch_Muffler_LV, Hatch_Muffler_MV, Hatch_Muffler_HV, Hatch_Muffler_EV, Hatch_Muffler_IV, Hatch_Muffler_LuV, Hatch_Muffler_ZPM, Hatch_Muffler_UV, Hatch_Muffler_MAX,
- Hatch_Maintenance,
-
- Battery_Buffer_1by1_ULV, Battery_Buffer_1by1_LV, Battery_Buffer_1by1_MV, Battery_Buffer_1by1_HV, Battery_Buffer_1by1_EV, Battery_Buffer_1by1_IV, Battery_Buffer_1by1_LuV, Battery_Buffer_1by1_ZPM, Battery_Buffer_1by1_UV, Battery_Buffer_1by1_MAX,
- Battery_Buffer_2by2_ULV, Battery_Buffer_2by2_LV, Battery_Buffer_2by2_MV, Battery_Buffer_2by2_HV, Battery_Buffer_2by2_EV, Battery_Buffer_2by2_IV, Battery_Buffer_2by2_LuV, Battery_Buffer_2by2_ZPM, Battery_Buffer_2by2_UV, Battery_Buffer_2by2_MAX,
- Battery_Buffer_3by3_ULV, Battery_Buffer_3by3_LV, Battery_Buffer_3by3_MV, Battery_Buffer_3by3_HV, Battery_Buffer_3by3_EV, Battery_Buffer_3by3_IV, Battery_Buffer_3by3_LuV, Battery_Buffer_3by3_ZPM, Battery_Buffer_3by3_UV, Battery_Buffer_3by3_MAX,
- Battery_Buffer_4by4_ULV, Battery_Buffer_4by4_LV, Battery_Buffer_4by4_MV, Battery_Buffer_4by4_HV, Battery_Buffer_4by4_EV, Battery_Buffer_4by4_IV, Battery_Buffer_4by4_LuV, Battery_Buffer_4by4_ZPM, Battery_Buffer_4by4_UV, Battery_Buffer_4by4_MAX,
-
- Locker_ULV, Locker_LV, Locker_MV, Locker_HV, Locker_EV, Locker_IV, Locker_LuV, Locker_ZPM, Locker_UV, Locker_MAX,
-
- Machine_Multi_LargeBoiler_Bronze, Machine_Multi_LargeBoiler_Steel, Machine_Multi_LargeBoiler_Titanium, Machine_Multi_LargeBoiler_TungstenSteel, Machine_Multi_BlastFurnace, Machine_Multi_ImplosionCompressor, Machine_Multi_VacuumFreezer, Machine_Multi_Furnace,
- Machine_LV_AlloySmelter, Machine_MV_AlloySmelter, Machine_HV_AlloySmelter, Machine_EV_AlloySmelter, Machine_IV_AlloySmelter,
- Machine_LV_Assembler, Machine_MV_Assembler, Machine_HV_Assembler, Machine_EV_Assembler, Machine_IV_Assembler,
- Machine_LV_Bender, Machine_MV_Bender, Machine_HV_Bender, Machine_EV_Bender, Machine_IV_Bender,
- Machine_LV_Canner, Machine_MV_Canner, Machine_HV_Canner, Machine_EV_Canner, Machine_IV_Canner,
- Machine_LV_Compressor, Machine_MV_Compressor, Machine_HV_Compressor, Machine_EV_Compressor, Machine_IV_Compressor,
- Machine_LV_Cutter, Machine_MV_Cutter, Machine_HV_Cutter, Machine_EV_Cutter, Machine_IV_Cutter,
- Machine_LV_Slicer, Machine_MV_Slicer, Machine_HV_Slicer, Machine_EV_Slicer, Machine_IV_Slicer,
- Machine_LV_Sifter, Machine_MV_Sifter, Machine_HV_Sifter, Machine_EV_Sifter, Machine_IV_Sifter,
- Machine_LV_ArcFurnace, Machine_MV_ArcFurnace, Machine_HV_ArcFurnace, Machine_EV_ArcFurnace, Machine_IV_ArcFurnace,
- Machine_LV_PlasmaArcFurnace, Machine_MV_PlasmaArcFurnace, Machine_HV_PlasmaArcFurnace, Machine_EV_PlasmaArcFurnace, Machine_IV_PlasmaArcFurnace,
- Machine_LV_Oven, Machine_MV_Oven, Machine_HV_Oven, Machine_EV_Oven, Machine_IV_Oven,
- Machine_LV_E_Furnace, Machine_MV_E_Furnace, Machine_HV_E_Furnace, Machine_EV_E_Furnace, Machine_IV_E_Furnace,
- Machine_LV_Extractor, Machine_MV_Extractor, Machine_HV_Extractor, Machine_EV_Extractor, Machine_IV_Extractor,
- Machine_LV_Extruder, Machine_MV_Extruder, Machine_HV_Extruder, Machine_EV_Extruder, Machine_IV_Extruder,
- Machine_LV_Lathe, Machine_MV_Lathe, Machine_HV_Lathe, Machine_EV_Lathe, Machine_IV_Lathe,
- Machine_LV_Macerator, Machine_MV_Macerator, Machine_HV_Macerator, Machine_EV_Macerator, Machine_IV_Macerator,
- Machine_LV_Microwave, Machine_MV_Microwave, Machine_HV_Microwave, Machine_EV_Microwave, Machine_IV_Microwave,
- Machine_LV_Printer, Machine_MV_Printer, Machine_HV_Printer, Machine_EV_Printer, Machine_IV_Printer,
- Machine_LV_Recycler, Machine_MV_Recycler, Machine_HV_Recycler, Machine_EV_Recycler, Machine_IV_Recycler,
- Machine_LV_Scanner, Machine_MV_Scanner, Machine_HV_Scanner, Machine_EV_Scanner, Machine_IV_Scanner,
- Machine_LV_Wiremill, Machine_MV_Wiremill, Machine_HV_Wiremill, Machine_EV_Wiremill, Machine_IV_Wiremill,
- Machine_LV_Electrolyzer, Machine_MV_Electrolyzer, Machine_HV_Electrolyzer, Machine_EV_Electrolyzer, Machine_IV_Electrolyzer,
- Machine_LV_Centrifuge, Machine_MV_Centrifuge, Machine_HV_Centrifuge, Machine_EV_Centrifuge, Machine_IV_Centrifuge,
- Machine_LV_ThermalCentrifuge, Machine_MV_ThermalCentrifuge, Machine_HV_ThermalCentrifuge, Machine_EV_ThermalCentrifuge, Machine_IV_ThermalCentrifuge,
- Machine_LV_OreWasher, Machine_MV_OreWasher, Machine_HV_OreWasher, Machine_EV_OreWasher, Machine_IV_OreWasher,
- Machine_LV_RockBreaker, Machine_MV_RockBreaker, Machine_HV_RockBreaker, Machine_EV_RockBreaker, Machine_IV_RockBreaker,
- Machine_LV_Boxinator, Machine_MV_Boxinator, Machine_HV_Boxinator, Machine_EV_Boxinator, Machine_IV_Boxinator,
- Machine_LV_Unboxinator, Machine_MV_Unboxinator, Machine_HV_Unboxinator, Machine_EV_Unboxinator, Machine_IV_Unboxinator,
- Machine_LV_ChemicalReactor, Machine_MV_ChemicalReactor, Machine_HV_ChemicalReactor, Machine_EV_ChemicalReactor, Machine_IV_ChemicalReactor,
- Machine_LV_FluidCanner, Machine_MV_FluidCanner, Machine_HV_FluidCanner, Machine_EV_FluidCanner, Machine_IV_FluidCanner,
- Machine_LV_Disassembler, Machine_MV_Disassembler, Machine_HV_Disassembler, Machine_EV_Disassembler, Machine_IV_Disassembler,
- Machine_LV_Bundler, Machine_MV_Bundler, Machine_HV_Bundler, Machine_EV_Bundler, Machine_IV_Bundler,
- Machine_LV_Massfab, Machine_MV_Massfab, Machine_HV_Massfab, Machine_EV_Massfab, Machine_IV_Massfab,
- Machine_LV_Amplifab, Machine_MV_Amplifab, Machine_HV_Amplifab, Machine_EV_Amplifab, Machine_IV_Amplifab,
- Machine_LV_Replicator, Machine_MV_Replicator, Machine_HV_Replicator, Machine_EV_Replicator, Machine_IV_Replicator,
- Machine_LV_Brewery, Machine_MV_Brewery, Machine_HV_Brewery, Machine_EV_Brewery, Machine_IV_Brewery,
- Machine_LV_Fermenter, Machine_MV_Fermenter, Machine_HV_Fermenter, Machine_EV_Fermenter, Machine_IV_Fermenter,
- Machine_LV_FluidExtractor, Machine_MV_FluidExtractor, Machine_HV_FluidExtractor, Machine_EV_FluidExtractor, Machine_IV_FluidExtractor,
- Machine_LV_FluidSolidifier, Machine_MV_FluidSolidifier, Machine_HV_FluidSolidifier, Machine_EV_FluidSolidifier, Machine_IV_FluidSolidifier,
- Machine_LV_Distillery, Machine_MV_Distillery, Machine_HV_Distillery, Machine_EV_Distillery, Machine_IV_Distillery,
- Machine_LV_ChemicalBath, Machine_MV_ChemicalBath, Machine_HV_ChemicalBath, Machine_EV_ChemicalBath, Machine_IV_ChemicalBath,
- Machine_LV_Polarizer, Machine_MV_Polarizer, Machine_HV_Polarizer, Machine_EV_Polarizer, Machine_IV_Polarizer,
- Machine_LV_ElectromagneticSeparator, Machine_MV_ElectromagneticSeparator, Machine_HV_ElectromagneticSeparator, Machine_EV_ElectromagneticSeparator, Machine_IV_ElectromagneticSeparator,
- Machine_LV_Autoclave, Machine_MV_Autoclave, Machine_HV_Autoclave, Machine_EV_Autoclave, Machine_IV_Autoclave,
- Machine_LV_Mixer, Machine_MV_Mixer, Machine_HV_Mixer, Machine_EV_Mixer, Machine_IV_Mixer,
- Machine_LV_LaserEngraver, Machine_MV_LaserEngraver, Machine_HV_LaserEngraver, Machine_EV_LaserEngraver, Machine_IV_LaserEngraver,
- Machine_LV_Press, Machine_MV_Press, Machine_HV_Press, Machine_EV_Press, Machine_IV_Press,
- Machine_LV_Hammer, Machine_MV_Hammer, Machine_HV_Hammer, Machine_EV_Hammer, Machine_IV_Hammer,
- Machine_LV_FluidHeater, Machine_MV_FluidHeater, Machine_HV_FluidHeater, Machine_EV_FluidHeater, Machine_IV_FluidHeater,
-
- Neutron_Reflector,
- Reactor_Coolant_He_1,
- Reactor_Coolant_He_3,
- Reactor_Coolant_He_6,
- Reactor_Coolant_NaK_1,
- Reactor_Coolant_NaK_3,
- Reactor_Coolant_NaK_6,
- ThoriumCell_1,
- ThoriumCell_2,
- ThoriumCell_4,
- FusionComputer_LuV,
- FusionComputer_ZPMV,
- FusionComputer_UV,
- Casing_Fusion_Coil,
- Casing_Fusion,
- Casing_Fusion2,
- Generator_Plasma_IV,
- Generator_Plasma_LuV,
- Generator_Plasma_ZPMV,
- MagicEnergyConverter_LV,
- MagicEnergyConverter_MV,
- MagicEnergyConverter_HV,
- MagicEnergyAbsorber_LV,
- MagicEnergyAbsorber_MV,
- MagicEnergyAbsorber_HV,
- MagicEnergyAbsorber_EV,
- Depleted_Thorium_1,
- Depleted_Thorium_2,
- Depleted_Thorium_4,
- Processing_Array,
- Distillation_Tower,
- Energy_LapotronicOrb2,
- ZPM2, Quantum_Tank_LV,Quantum_Tank_MV,Quantum_Tank_HV,Quantum_Tank_EV,Quantum_Tank_IV, Quantum_Chest_LV, Quantum_Chest_MV, Quantum_Chest_HV, Quantum_Chest_EV, Quantum_Chest_IV,
-
- NULL, Cover_RedstoneTransmitterExternal,Cover_RedstoneTransmitterInternal,Cover_RedstoneReceiverExternal,Cover_RedstoneReceiverInternal,
- LargeSteamTurbine,
- Ingot_Heavy1,Ingot_Heavy2,Ingot_Heavy3,
- Pump_LV, Pump_MV, Pump_HV, Pump_EV, Pump_IV,
- Teleporter,
- Cover_NeedsMaintainance,
- Casing_Turbine,
- MobRep_LV,MobRep_MV,MobRep_HV,MobRep_EV,MobRep_IV, LargeGasTurbine, LargeHPSteamTurbine, LargePlasmaTurbine, Cover_PlayerDetector, Machine_Multi_HeatExchanger;
-
- public static final ItemList[]
- DYE_ONLY_ITEMS = {Color_00, Color_01, Color_02, Color_03, Color_04, Color_05, Color_06, Color_07, Color_08, Color_09, Color_10, Color_11, Color_12, Color_13, Color_14, Color_15}
- , SPRAY_CAN_DYES = {Spray_Color_00, Spray_Color_01, Spray_Color_02, Spray_Color_03, Spray_Color_04, Spray_Color_05, Spray_Color_06, Spray_Color_07, Spray_Color_08, Spray_Color_09, Spray_Color_10, Spray_Color_11, Spray_Color_12, Spray_Color_13, Spray_Color_14, Spray_Color_15}
- , SPRAY_CAN_DYES_USED = {Spray_Color_Used_00, Spray_Color_Used_01, Spray_Color_Used_02, Spray_Color_Used_03, Spray_Color_Used_04, Spray_Color_Used_05, Spray_Color_Used_06, Spray_Color_Used_07, Spray_Color_Used_08, Spray_Color_Used_09, Spray_Color_Used_10, Spray_Color_Used_11, Spray_Color_Used_12, Spray_Color_Used_13, Spray_Color_Used_14, Spray_Color_Used_15}
- , TRANSFORMERS = {Transformer_LV_ULV, Transformer_MV_LV, Transformer_HV_MV, Transformer_EV_HV, Transformer_IV_EV, Transformer_LuV_IV, Transformer_ZPM_LuV, Transformer_UV_ZPM, Transformer_MAX_UV}
- , MACHINE_HULLS = {Hull_ULV, Hull_LV, Hull_MV, Hull_HV, Hull_EV, Hull_IV, Hull_LuV, Hull_ZPM, Hull_UV, Hull_MAX}
- , HATCHES_DYNAMO = {Hatch_Dynamo_ULV, Hatch_Dynamo_LV, Hatch_Dynamo_MV, Hatch_Dynamo_HV, Hatch_Dynamo_EV, Hatch_Dynamo_IV, Hatch_Dynamo_LuV, Hatch_Dynamo_ZPM, Hatch_Dynamo_UV, Hatch_Dynamo_MAX}
- , HATCHES_ENERGY = {Hatch_Energy_ULV, Hatch_Energy_LV, Hatch_Energy_MV, Hatch_Energy_HV, Hatch_Energy_EV, Hatch_Energy_IV, Hatch_Energy_LuV, Hatch_Energy_ZPM, Hatch_Energy_UV, Hatch_Energy_MAX}
- , HATCHES_INPUT = {Hatch_Input_ULV, Hatch_Input_LV, Hatch_Input_MV, Hatch_Input_HV, Hatch_Input_EV, Hatch_Input_IV, Hatch_Input_LuV, Hatch_Input_ZPM, Hatch_Input_UV, Hatch_Input_MAX}
- , HATCHES_INPUT_BUS = {Hatch_Input_Bus_ULV, Hatch_Input_Bus_LV, Hatch_Input_Bus_MV, Hatch_Input_Bus_HV, Hatch_Input_Bus_EV, Hatch_Input_Bus_IV, Hatch_Input_Bus_LuV, Hatch_Input_Bus_ZPM, Hatch_Input_Bus_UV, Hatch_Input_Bus_MAX}
- , HATCHES_OUTPUT = {Hatch_Output_ULV, Hatch_Output_LV, Hatch_Output_MV, Hatch_Output_HV, Hatch_Output_EV, Hatch_Output_IV, Hatch_Output_LuV, Hatch_Output_ZPM, Hatch_Output_UV, Hatch_Output_MAX}
- , HATCHES_OUTPUT_BUS = {Hatch_Output_Bus_ULV, Hatch_Output_Bus_LV, Hatch_Output_Bus_MV, Hatch_Output_Bus_HV, Hatch_Output_Bus_EV, Hatch_Output_Bus_IV, Hatch_Output_Bus_LuV, Hatch_Output_Bus_ZPM, Hatch_Output_Bus_UV, Hatch_Output_Bus_MAX}
- , HATCHES_MUFFLER = {Hatch_Muffler_LV, Hatch_Muffler_LV, Hatch_Muffler_MV, Hatch_Muffler_HV, Hatch_Muffler_EV, Hatch_Muffler_IV, Hatch_Muffler_LuV, Hatch_Muffler_ZPM, Hatch_Muffler_UV, Hatch_Muffler_MAX}
- ;
- private ItemStack mStack;
- private boolean mHasNotBeenSet = true;
-
- public static Fluid sOilExtraHeavy, sOilHeavy, sOilMedium, sOilLight, sNaturalGas;
-
- @Override
- public IItemContainer set(Item aItem) {
- mHasNotBeenSet = false;
- if (aItem == null) return this;
- ItemStack aStack = new ItemStack(aItem, 1, 0);
- mStack = GT_Utility.copyAmount(1, aStack);
- return this;
- }
-
- @Override
- public IItemContainer set(ItemStack aStack) {
- mHasNotBeenSet = false;
- mStack = GT_Utility.copyAmount(1, aStack);
- return this;
- }
-
- @Override
- public Item getItem() {
- if (mHasNotBeenSet) throw new IllegalAccessError("The Enum '" + name() + "' has not been set to an Item at this time!");
- if (GT_Utility.isStackInvalid(mStack)) return null;
- return mStack.getItem();
- }
-
- @Override
- public Block getBlock() {
- if (mHasNotBeenSet) throw new IllegalAccessError("The Enum '" + name() + "' has not been set to an Item at this time!");
- return GT_Utility.getBlockFromStack(getItem());
- }
-
- @Override
- public final boolean hasBeenSet() {
- return !mHasNotBeenSet;
- }
-
- @Override
- public boolean isStackEqual(Object aStack) {
- return isStackEqual(aStack, false, false);
- }
-
- @Override
- public boolean isStackEqual(Object aStack, boolean aWildcard, boolean aIgnoreNBT) {
- if (GT_Utility.isStackInvalid(aStack)) return false;
- return GT_Utility.areUnificationsEqual((ItemStack)aStack, aWildcard?getWildcard(1):get(1), aIgnoreNBT);
- }
-
- @Override
- public ItemStack get(long aAmount, Object... aReplacements) {
- if (mHasNotBeenSet) throw new IllegalAccessError("The Enum '" + name() + "' has not been set to an Item at this time!");
- if (GT_Utility.isStackInvalid(mStack)) return GT_Utility.copyAmount(aAmount, aReplacements);
- return GT_Utility.copyAmount(aAmount, GT_OreDictUnificator.get(mStack));
- }
-
- @Override
- public ItemStack getWildcard(long aAmount, Object... aReplacements) {
- if (mHasNotBeenSet) throw new IllegalAccessError("The Enum '" + name() + "' has not been set to an Item at this time!");
- if (GT_Utility.isStackInvalid(mStack)) return GT_Utility.copyAmount(aAmount, aReplacements);
- return GT_Utility.copyAmountAndMetaData(aAmount, W, GT_OreDictUnificator.get(mStack));
- }
-
- @Override
- public ItemStack getUndamaged(long aAmount, Object... aReplacements) {
- if (mHasNotBeenSet) throw new IllegalAccessError("The Enum '" + name() + "' has not been set to an Item at this time!");
- if (GT_Utility.isStackInvalid(mStack)) return GT_Utility.copyAmount(aAmount, aReplacements);
- return GT_Utility.copyAmountAndMetaData(aAmount, 0, GT_OreDictUnificator.get(mStack));
- }
-
- @Override
- public ItemStack getAlmostBroken(long aAmount, Object... aReplacements) {
- if (mHasNotBeenSet) throw new IllegalAccessError("The Enum '" + name() + "' has not been set to an Item at this time!");
- if (GT_Utility.isStackInvalid(mStack)) return GT_Utility.copyAmount(aAmount, aReplacements);
- return GT_Utility.copyAmountAndMetaData(aAmount, mStack.getMaxDamage()-1, GT_OreDictUnificator.get(mStack));
- }
-
- @Override
- public ItemStack getWithName(long aAmount, String aDisplayName, Object... aReplacements) {
- ItemStack rStack = get(1, aReplacements);
- if (GT_Utility.isStackInvalid(rStack)) return null;
- rStack.setStackDisplayName(aDisplayName);
- return GT_Utility.copyAmount(aAmount, rStack);
- }
-
- @Override
- public ItemStack getWithCharge(long aAmount, int aEnergy, Object... aReplacements) {
- ItemStack rStack = get(1, aReplacements);
- if (GT_Utility.isStackInvalid(rStack)) return null;
- GT_ModHandler.chargeElectricItem(rStack, aEnergy, Integer.MAX_VALUE, true, false);
- return GT_Utility.copyAmount(aAmount, rStack);
- }
-
- @Override
- public ItemStack getWithDamage(long aAmount, long aMetaValue, Object... aReplacements) {
- if (mHasNotBeenSet) throw new IllegalAccessError("The Enum '" + name() + "' has not been set to an Item at this time!");
- if (GT_Utility.isStackInvalid(mStack)) return GT_Utility.copyAmount(aAmount, aReplacements);
- return GT_Utility.copyAmountAndMetaData(aAmount, aMetaValue, GT_OreDictUnificator.get(mStack));
- }
-
- @Override
- public IItemContainer registerOre(Object... aOreNames) {
- if (mHasNotBeenSet) throw new IllegalAccessError("The Enum '" + name() + "' has not been set to an Item at this time!");
- for (Object tOreName : aOreNames) GT_OreDictUnificator.registerOre(tOreName, get(1));
- return this;
- }
-
- @Override
- public IItemContainer registerWildcardAsOre(Object... aOreNames) {
- if (mHasNotBeenSet) throw new IllegalAccessError("The Enum '" + name() + "' has not been set to an Item at this time!");
- for (Object tOreName : aOreNames) GT_OreDictUnificator.registerOre(tOreName, getWildcard(1));
- return this;
- }
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/enums/Materials.java b/main/java/gregtech/api/enums/Materials.java
deleted file mode 100644
index 2efef3ac89..0000000000
--- a/main/java/gregtech/api/enums/Materials.java
+++ /dev/null
@@ -1,1670 +0,0 @@
-package gregtech.api.enums;
-
-import static gregtech.api.enums.GT_Values.F;
-import static gregtech.api.enums.GT_Values.M;
-import static gregtech.api.enums.GT_Values.MOD_ID_TC;
-import static gregtech.api.enums.GT_Values.T;
-import gregtech.api.GregTech_API;
-import gregtech.api.enums.TC_Aspects.TC_AspectStack;
-import gregtech.api.interfaces.IColorModulationContainer;
-import gregtech.api.interfaces.ISubTagContainer;
-import gregtech.api.objects.GT_FluidStack;
-import gregtech.api.objects.MaterialStack;
-import gregtech.api.util.GT_Config;
-import gregtech.api.util.GT_ModHandler;
-import gregtech.api.util.GT_Utility;
-
-import java.util.*;
-
-import net.minecraft.enchantment.Enchantment;
-import net.minecraft.item.ItemStack;
-import net.minecraftforge.fluids.Fluid;
-import net.minecraftforge.fluids.FluidStack;
-import cpw.mods.fml.common.Loader;
-
-/**
- * This List contains every Material I know about, and is used to determine Recipes for the
- */
-public enum Materials implements IColorModulationContainer, ISubTagContainer {
- /**
- * This is the Default Material returned in case no Material has been found or a NullPointer has been inserted at a location where it shouldn't happen.
- *
- * Mainly for preventing NullPointer Exceptions and providing Default Values.
- */
- _NULL ( -1, TextureSet.SET_NONE , 1.0F, 0, 0, 0 , 255, 255, 255, 0, "NULL" , 0, 0, 0, 0, F, F, 1, 1, 1, Dyes._NULL , Element._NULL , Arrays.asList(new TC_AspectStack(TC_Aspects.VACUOS, 1))),
-
- /**
- * Direct Elements
- */
- Aluminium ( 19, TextureSet.SET_DULL , 10.0F, 128, 2, 1|2 |8 |32|64|128 , 128, 200, 240, 0, "Aluminium" , 0, 0, 933, 1700, T, F, 3, 1, 1, Dyes.dyeLightBlue , Element.Al , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.VOLATUS, 1))),
- Americium ( 103, TextureSet.SET_METALLIC , 1.0F, 0, 3, 1|2 |8 |32 , 200, 200, 200, 0, "Americium" , 0, 0, 1449, 0, F, F, 3, 1, 1, Dyes.dyeLightGray , Element.Am , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.RADIO, 1))),
- Antimony ( 58, TextureSet.SET_SHINY , 1.0F, 0, 2, 1|2 |8 |32 , 220, 220, 240, 0, "Antimony" , 0, 0, 903, 0, F, F, 2, 1, 1, Dyes.dyeLightGray , Element.Sb , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.AQUA, 1))),
- Argon ( 24, TextureSet.SET_FLUID , 1.0F, 0, 2, 16|32 , 0, 255, 0, 240, "Argon" , 0, 0, 83, 0, F, T, 5, 1, 1, Dyes.dyeGreen , Element.Ar , Arrays.asList(new TC_AspectStack(TC_Aspects.AER, 2))),
- Arsenic ( 39, TextureSet.SET_DULL , 1.0F, 0, 2, 1|2 |8|16|32 , 255, 255, 255, 0, "Arsenic" , 0, 0, 1090, 0, F, F, 3, 1, 1, Dyes.dyeOrange , Element.As , Arrays.asList(new TC_AspectStack(TC_Aspects.VENENUM, 3))),
- Barium ( 63, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1 |8 |32 , 255, 255, 255, 0, "Barium" , 0, 0, 1000, 0, F, F, 1, 1, 1, Dyes._NULL , Element.Ba , Arrays.asList(new TC_AspectStack(TC_Aspects.VINCULUM, 3))),
- Beryllium ( 8, TextureSet.SET_METALLIC , 14.0F, 64, 2, 1|2 |8 |32|64 , 100, 180, 100, 0, "Beryllium" , 0, 0, 1560, 0, F, F, 6, 1, 1, Dyes.dyeGreen , Element.Be , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.LUCRUM, 1))),
- Bismuth ( 90, TextureSet.SET_METALLIC , 6.0F, 64, 1, 1|2 |8 |32|64|128 , 100, 160, 160, 0, "Bismuth" , 0, 0, 544, 0, F, F, 2, 1, 1, Dyes.dyeCyan , Element.Bi , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.INSTRUMENTUM, 1))),
- Boron ( 9, TextureSet.SET_DULL , 1.0F, 0, 2, 1 |8 |32 , 250, 250, 250, 0, "Boron" , 0, 0, 2349, 0, F, F, 1, 1, 1, Dyes.dyeWhite , Element.B , Arrays.asList(new TC_AspectStack(TC_Aspects.VITREUS, 3))),
- Caesium ( 62, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1|2 |8 |32 , 255, 255, 255, 0, "Caesium" , 0, 0, 301, 0, F, F, 4, 1, 1, Dyes._NULL , Element.Cs , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.RADIO, 1))),
- Calcium ( 26, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1 |32 , 255, 245, 245, 0, "Calcium" , 0, 0, 1115, 0, F, F, 4, 1, 1, Dyes.dyePink , Element.Ca , Arrays.asList(new TC_AspectStack(TC_Aspects.SANO, 1), new TC_AspectStack(TC_Aspects.TUTAMEN, 1))),
- Carbon ( 10, TextureSet.SET_DULL , 1.0F, 64, 2, 1|2 |32|64|128 , 20, 20, 20, 0, "Carbon" , 0, 0, 3800, 0, F, F, 2, 1, 1, Dyes.dyeBlack , Element.C , Arrays.asList(new TC_AspectStack(TC_Aspects.VITREUS, 1), new TC_AspectStack(TC_Aspects.IGNIS, 1))),
- Cadmium ( 55, TextureSet.SET_SHINY , 1.0F, 0, 2, 1 |8 |32 , 50, 50, 60, 0, "Cadmium" , 0, 0, 594, 0, F, F, 3, 1, 1, Dyes.dyeGray , Element.Cd , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 1), new TC_AspectStack(TC_Aspects.POTENTIA, 1), new TC_AspectStack(TC_Aspects.VENENUM, 1))),
- Cerium ( 65, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1|2 |8 |32 , 255, 255, 255, 0, "Cerium" , 0, 0, 1068, 1068, T, F, 4, 1, 1, Dyes._NULL , Element.Ce , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.RADIO, 1))),
- Chlorine ( 23, TextureSet.SET_FLUID , 1.0F, 0, 2, 16|32 , 255, 255, 255, 0, "Chlorine" , 0, 0, 171, 0, F, F, 2, 1, 1, Dyes.dyeCyan , Element.Cl , Arrays.asList(new TC_AspectStack(TC_Aspects.AQUA, 2), new TC_AspectStack(TC_Aspects.PANNUS, 1))),
- Chrome ( 30, TextureSet.SET_SHINY , 11.0F, 256, 3, 1|2 |8 |32|64|128 , 255, 230, 230, 0, "Chrome" , 0, 0, 2180, 1700, T, F, 5, 1, 1, Dyes.dyePink , Element.Cr , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.MACHINA, 1))),
- Cobalt ( 33, TextureSet.SET_METALLIC , 8.0F, 512, 3, 1|2 |8 |32|64 , 80, 80, 250, 0, "Cobalt" , 0, 0, 1768, 0, F, F, 3, 1, 1, Dyes.dyeBlue , Element.Co , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.INSTRUMENTUM, 1))),
- Copper ( 35, TextureSet.SET_SHINY , 1.0F, 0, 1, 1|2 |8 |32 |128 , 255, 100, 0, 0, "Copper" , 0, 0, 1357, 0, F, F, 3, 1, 1, Dyes.dyeOrange , Element.Cu , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.PERMUTATIO, 1))),
- Deuterium ( 2, TextureSet.SET_FLUID , 1.0F, 0, 2, 16|32 , 255, 255, 0, 240, "Deuterium" , 0, 0, 14, 0, F, T, 10, 1, 1, Dyes.dyeYellow , Element.D , Arrays.asList(new TC_AspectStack(TC_Aspects.AQUA, 3))),
- Dysprosium ( 73, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1|2 |8 |32 , 255, 255, 255, 0, "Dysprosium" , 0, 0, 1680, 1680, T, F, 4, 1, 1, Dyes._NULL , Element.Dy , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 3))),
- Empty ( 0, TextureSet.SET_NONE , 1.0F, 0, 2, 256/*Only for Prefixes which need it*/, 255, 255, 255, 255, "Empty" , 0, 0, -1, 0, F, T, 1, 1, 1, Dyes._NULL , Element._NULL , Arrays.asList(new TC_AspectStack(TC_Aspects.VACUOS, 2))),
- Erbium ( 75, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1|2 |8 |32 , 255, 255, 255, 0, "Erbium" , 0, 0, 1802, 1802, T, F, 4, 1, 1, Dyes._NULL , Element.Er , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.RADIO, 1))),
- Europium ( 70, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1|2 |8 |32 , 255, 255, 255, 0, "Europium" , 0, 0, 1099, 1099, T, F, 4, 1, 1, Dyes._NULL , Element.Eu , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.RADIO, 1))),
- Fluorine ( 14, TextureSet.SET_FLUID , 1.0F, 0, 2, 16|32 , 255, 255, 255, 127, "Fluorine" , 0, 0, 53, 0, F, T, 2, 1, 1, Dyes.dyeGreen , Element.F , Arrays.asList(new TC_AspectStack(TC_Aspects.PERDITIO, 2))),
- Gadolinium ( 71, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1|2 |8 |32 , 255, 255, 255, 0, "Gadolinium" , 0, 0, 1585, 1585, T, F, 4, 1, 1, Dyes._NULL , Element.Gd , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.RADIO, 1))),
- Gallium ( 37, TextureSet.SET_SHINY , 1.0F, 64, 2, 1|2 |8 |32 , 220, 220, 255, 0, "Gallium" , 0, 0, 302, 0, F, F, 5, 1, 1, Dyes.dyeLightGray , Element.Ga , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.ELECTRUM, 1))),
- Gold ( 86, TextureSet.SET_SHINY , 12.0F, 64, 2, 1|2 |8 |32|64|128 , 255, 255, 30, 0, "Gold" , 0, 0, 1337, 0, F, F, 4, 1, 1, Dyes.dyeYellow , Element.Au , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.LUCRUM, 2))),
- Holmium ( 74, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1|2 |8 |32 , 255, 255, 255, 0, "Holmium" , 0, 0, 1734, 1734, T, F, 4, 1, 1, Dyes._NULL , Element.Ho , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.RADIO, 1))),
- Hydrogen ( 1, TextureSet.SET_FLUID , 1.0F, 0, 2, 16|32 , 0, 0, 255, 240, "Hydrogen" , 1, 15, 14, 0, F, T, 2, 1, 1, Dyes.dyeBlue , Element.H , Arrays.asList(new TC_AspectStack(TC_Aspects.AQUA, 1))),
- Helium ( 4, TextureSet.SET_FLUID , 1.0F, 0, 2, 16|32 , 255, 255, 0, 240, "Helium" , 0, 0, 1, 0, F, T, 5, 1, 1, Dyes.dyeYellow , Element.He , Arrays.asList(new TC_AspectStack(TC_Aspects.AER, 2))),
- Helium_3 ( 5, TextureSet.SET_FLUID , 1.0F, 0, 2, 16|32 , 255, 255, 0, 240, "Helium-3" , 0, 0, 1, 0, F, T, 10, 1, 1, Dyes.dyeYellow , Element.He_3 , Arrays.asList(new TC_AspectStack(TC_Aspects.AER, 3))),
- Indium ( 56, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1|2 |8 |32 , 64, 0, 128, 0, "Indium" , 0, 0, 429, 0, F, F, 4, 1, 1, Dyes.dyeGray , Element.In , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.RADIO, 1))),
- Iridium ( 84, TextureSet.SET_DULL , 6.0F, 5120, 4, 1|2 |8 |32|64|128 , 240, 240, 245, 0, "Iridium" , 0, 0, 2719, 0, F, F, 10, 1, 1, Dyes.dyeWhite , Element.Ir , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.MACHINA, 1))),
- Iron ( 32, TextureSet.SET_METALLIC , 6.0F, 256, 2, 1|2 |8 |32|64|128 , 200, 200, 200, 0, "Iron" , 0, 0, 1811, 0, F, F, 3, 1, 1, Dyes.dyeLightGray , Element.Fe , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 3))),
- Lanthanum ( 64, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1|2 |8 |32 , 255, 255, 255, 0, "Lanthanum" , 0, 0, 1193, 1193, T, F, 4, 1, 1, Dyes._NULL , Element.La , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.RADIO, 1))),
- Lead ( 89, TextureSet.SET_DULL , 8.0F, 64, 1, 1|2 |8 |32|64|128 , 140, 100, 140, 0, "Lead" , 0, 0, 600, 0, F, F, 3, 1, 1, Dyes.dyePurple , Element.Pb , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.ORDO, 1))),
- Lithium ( 6, TextureSet.SET_DULL , 1.0F, 0, 2, 1|2 |8 |32 , 225, 220, 255, 0, "Lithium" , 0, 0, 454, 0, F, F, 4, 1, 1, Dyes.dyeLightBlue , Element.Li , Arrays.asList(new TC_AspectStack(TC_Aspects.VITREUS, 1), new TC_AspectStack(TC_Aspects.POTENTIA, 2))),
- Lutetium ( 78, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1|2 |8 |32 , 255, 255, 255, 0, "Lutetium" , 0, 0, 1925, 1925, T, F, 4, 1, 1, Dyes._NULL , Element.Lu , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.RADIO, 1))),
- Magic (-128, TextureSet.SET_SHINY , 8.0F, 5120, 5, 1|2|4|8|16|32|64|128 , 100, 0, 200, 0, "Magic" , 5, 32, 5000, 0, F, F, 7, 1, 1, Dyes.dyePurple , Element.Ma , Arrays.asList(new TC_AspectStack(TC_Aspects.PRAECANTIO, 4))),
- Magnesium ( 18, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1|2 |8 |32 , 255, 200, 200, 0, "Magnesium" , 0, 0, 923, 0, F, F, 3, 1, 1, Dyes.dyePink , Element.Mg , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.SANO, 1))),
- Manganese ( 31, TextureSet.SET_DULL , 7.0F, 512, 2, 1|2 |8 |32|64 , 250, 250, 250, 0, "Manganese" , 0, 0, 1519, 0, F, F, 3, 1, 1, Dyes.dyeWhite , Element.Mn , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 3))),
- Mercury ( 87, TextureSet.SET_SHINY , 1.0F, 0, 0, 16|32 , 255, 220, 220, 0, "Mercury" , 5, 32, 234, 0, F, F, 3, 1, 1, Dyes.dyeLightGray , Element.Hg , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 1), new TC_AspectStack(TC_Aspects.AQUA, 1), new TC_AspectStack(TC_Aspects.VENENUM, 1))),
- Molybdenum ( 48, TextureSet.SET_SHINY , 7.0F, 512, 2, 1|2 |8 |32|64 , 180, 180, 220, 0, "Molybdenum" , 0, 0, 2896, 0, F, F, 1, 1, 1, Dyes.dyeBlue , Element.Mo , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.INSTRUMENTUM, 1))),
- Neodymium ( 67, TextureSet.SET_METALLIC , 7.0F, 512, 2, 1|2 |8 |32|64|128 , 100, 100, 100, 0, "Neodymium" , 0, 0, 1297, 1297, T, F, 4, 1, 1, Dyes._NULL , Element.Nd , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.MAGNETO, 2))),
- Neutronium ( 129, TextureSet.SET_DULL , 6.0F, 81920, 6, 1|2 |8 |32|64|128 , 250, 250, 250, 0, "Neutronium" , 0, 0, 10000, 0, F, F, 20, 1, 1, Dyes.dyeWhite , Element.Nt , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 4), new TC_AspectStack(TC_Aspects.VITREUS, 3), new TC_AspectStack(TC_Aspects.ALIENIS, 2))),
- Nickel ( 34, TextureSet.SET_METALLIC , 6.0F, 64, 2, 1|2 |8 |32|64|128 , 200, 200, 250, 0, "Nickel" , 0, 0, 1728, 0, F, F, 4, 1, 1, Dyes.dyeLightBlue , Element.Ni , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.IGNIS, 1))),
- Niobium ( 47, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1|2 |8 |32 , 190, 180, 200, 0, "Niobium" , 0, 0, 2750, 2750, T, F, 5, 1, 1, Dyes._NULL , Element.Nb , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.ELECTRUM, 1))),
- Nitrogen ( 12, TextureSet.SET_FLUID , 1.0F, 0, 2, 16|32 , 0, 150, 200, 240, "Nitrogen" , 0, 0, 63, 0, F, T, 2, 1, 1, Dyes.dyeCyan , Element.N , Arrays.asList(new TC_AspectStack(TC_Aspects.AER, 2))),
- Osmium ( 83, TextureSet.SET_METALLIC , 16.0F, 1280, 4, 1|2 |8 |32|64|128 , 50, 50, 255, 0, "Osmium" , 0, 0, 3306, 0, F, F, 10, 1, 1, Dyes.dyeBlue , Element.Os , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.MACHINA, 1), new TC_AspectStack(TC_Aspects.NEBRISUM, 1))),
- Oxygen ( 13, TextureSet.SET_FLUID , 1.0F, 0, 2, 16|32 , 0, 100, 200, 240, "Oxygen" , 0, 0, 54, 0, F, T, 1, 1, 1, Dyes.dyeWhite , Element.O , Arrays.asList(new TC_AspectStack(TC_Aspects.AER, 1))),
- Palladium ( 52, TextureSet.SET_SHINY , 8.0F, 512, 2, 1|2 |8 |32|64|128 , 128, 128, 128, 0, "Palladium" , 0, 0, 1828, 1828, F, F, 4, 1, 1, Dyes.dyeGray , Element.Pd , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 3))),
- Phosphor ( 21, TextureSet.SET_DULL , 1.0F, 0, 2, 1 |8 |32 , 255, 255, 0, 0, "Phosphor" , 0, 0, 317, 0, F, F, 2, 1, 1, Dyes.dyeYellow , Element.P , Arrays.asList(new TC_AspectStack(TC_Aspects.IGNIS, 2), new TC_AspectStack(TC_Aspects.POTENTIA, 1))),
- Platinum ( 85, TextureSet.SET_SHINY , 12.0F, 64, 2, 1|2 |8 |32|64|128 , 255, 255, 200, 0, "Platinum" , 0, 0, 2041, 0, F, F, 6, 1, 1, Dyes.dyeOrange , Element.Pt , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.NEBRISUM, 1))),
- Plutonium ( 100, TextureSet.SET_METALLIC , 6.0F, 512, 3, 1|2 |8 |32|64 , 240, 50, 50, 0, "Plutonium 244" , 0, 0, 912, 0, F, F, 6, 1, 1, Dyes.dyeLime , Element.Pu , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.RADIO, 2))),
- Plutonium241 ( 101, TextureSet.SET_SHINY , 6.0F, 512, 3, 1|2 |8 |32|64 , 250, 70, 70, 0, "Plutonium 241" , 0, 0, 912, 0, F, F, 6, 1, 1, Dyes.dyeLime , Element.Pu_241 , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.RADIO, 3))),
- Potassium ( 25, TextureSet.SET_METALLIC , 1.0F, 0, 1, 1|2 |32 , 250, 250, 250, 0, "Potassium" , 0, 0, 336, 0, F, F, 2, 1, 1, Dyes.dyeWhite , Element.K , Arrays.asList(new TC_AspectStack(TC_Aspects.VITREUS, 1), new TC_AspectStack(TC_Aspects.POTENTIA, 1))),
- Praseodymium ( 66, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1|2 |8 |32 , 255, 255, 255, 0, "Praseodymium" , 0, 0, 1208, 1208, T, F, 4, 1, 1, Dyes._NULL , Element.Pr , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.RADIO, 1))),
- Promethium ( 68, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1|2 |8 |32 , 255, 255, 255, 0, "Promethium" , 0, 0, 1315, 1315, T, F, 4, 1, 1, Dyes._NULL , Element.Pm , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.RADIO, 1))),
- Radon ( 93, TextureSet.SET_FLUID , 1.0F, 0, 2, 16|32 , 255, 0, 255, 240, "Radon" , 0, 0, 202, 0, F, T, 5, 1, 1, Dyes.dyePurple , Element.Rn , Arrays.asList(new TC_AspectStack(TC_Aspects.AER, 1), new TC_AspectStack(TC_Aspects.RADIO, 1))),
- Rubidium ( 43, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1|2 |8 |32 , 240, 30, 30, 0, "Rubidium" , 0, 0, 312, 0, F, F, 4, 1, 1, Dyes.dyeRed , Element.Rb , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.VITREUS, 1))),
- Samarium ( 69, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1|2 |8 |32 , 255, 255, 255, 0, "Samarium" , 0, 0, 1345, 1345, T, F, 4, 1, 1, Dyes._NULL , Element.Sm , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.RADIO, 1))),
- Scandium ( 27, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1|2 |8 |32 , 255, 255, 255, 0, "Scandium" , 0, 0, 1814, 1814, T, F, 2, 1, 1, Dyes.dyeYellow , Element.Sc , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.RADIO, 1))),
- Silicon ( 20, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1|2 |8 |32 , 60, 60, 80, 0, "Silicon" , 0, 0, 1687, 1687, T, F, 1, 1, 1, Dyes.dyeBlack , Element.Si , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.TENEBRAE, 1))),
- Silver ( 54, TextureSet.SET_SHINY , 10.0F, 64, 2, 1|2 |8 |32|64|128 , 220, 220, 255, 0, "Silver" , 0, 0, 1234, 0, F, F, 3, 1, 1, Dyes.dyeLightGray , Element.Ag , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.LUCRUM, 1))),
- Sodium ( 17, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1 |32 , 0, 0, 150, 0, "Sodium" , 0, 0, 370, 0, F, F, 1, 1, 1, Dyes.dyeBlue , Element.Na , Arrays.asList(new TC_AspectStack(TC_Aspects.VITREUS, 2), new TC_AspectStack(TC_Aspects.LUX, 1))),
- Strontium ( 44, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1 |8 |32 , 200, 200, 200, 0, "Strontium" , 0, 0, 1050, 0, F, F, 1, 1, 1, Dyes.dyeLightGray , Element.Sr , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.STRONTIO, 1))),
- Sulfur ( 22, TextureSet.SET_DULL , 1.0F, 0, 2, 1 |8 |32 , 200, 200, 0, 0, "Sulfur" , 0, 0, 388, 0, F, F, 2, 1, 1, Dyes.dyeYellow , Element.S , Arrays.asList(new TC_AspectStack(TC_Aspects.IGNIS, 1))),
- Tantalum ( 80, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1|2 |8 |32 , 255, 255, 255, 0, "Tantalum" , 0, 0, 3290, 0, F, F, 4, 1, 1, Dyes._NULL , Element.Ta , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.VINCULUM, 1))),
- Tellurium ( 59, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1|2 |8 |32 , 255, 255, 255, 0, "Tellurium" , 0, 0, 722, 0, F, F, 4, 1, 1, Dyes.dyeGray , Element.Te , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.RADIO, 1))),
- Terbium ( 72, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1|2 |8 |32 , 255, 255, 255, 0, "Terbium" , 0, 0, 1629, 1629, T, F, 4, 1, 1, Dyes._NULL , Element.Tb , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.RADIO, 1))),
- Thorium ( 96, TextureSet.SET_SHINY , 6.0F, 512, 2, 1|2 |8 |32|64 , 0, 30, 0, 0, "Thorium" , 0, 0, 2115, 0, F, F, 4, 1, 1, Dyes.dyeBlack , Element.Th , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.RADIO, 1))),
- Thulium ( 76, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1|2 |8 |32 , 255, 255, 255, 0, "Thulium" , 0, 0, 1818, 1818, T, F, 4, 1, 1, Dyes._NULL , Element.Tm , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.RADIO, 1))),
- Tin ( 57, TextureSet.SET_DULL , 1.0F, 0, 1, 1|2 |8 |32 |128 , 220, 220, 220, 0, "Tin" , 0, 0, 505, 505, F, F, 3, 1, 1, Dyes.dyeWhite , Element.Sn , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.VITREUS, 1))),
- Titanium ( 28, TextureSet.SET_METALLIC , 8.0F, 2560, 3, 1|2 |8 |32|64|128 , 220, 160, 240, 0, "Titanium" , 0, 0, 1941, 1500, T, F, 5, 1, 1, Dyes.dyePurple , Element.Ti , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.TUTAMEN, 1))),
- Tritium ( 3, TextureSet.SET_METALLIC , 1.0F, 0, 2, 16|32 , 255, 0, 0, 240, "Tritium" , 0, 0, 14, 0, F, T, 10, 1, 1, Dyes.dyeRed , Element.T , Arrays.asList(new TC_AspectStack(TC_Aspects.AQUA, 4))),
- Tungsten ( 81, TextureSet.SET_METALLIC , 8.0F, 5120, 3, 1|2 |8 |32|64|128 , 50, 50, 50, 0, "Tungsten" , 0, 0, 3695, 2500, T, F, 4, 1, 1, Dyes.dyeBlack , Element.W , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 3), new TC_AspectStack(TC_Aspects.TUTAMEN, 1))),
- Uranium ( 98, TextureSet.SET_METALLIC , 6.0F, 512, 3, 1|2 |8 |32|64 , 50, 240, 50, 0, "Uranium 238" , 0, 0, 1405, 0, F, F, 4, 1, 1, Dyes.dyeGreen , Element.U , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.RADIO, 1))),
- Uranium235 ( 97, TextureSet.SET_SHINY , 6.0F, 512, 3, 1|2 |8 |32|64 , 70, 250, 70, 0, "Uranium 235" , 0, 0, 1405, 0, F, F, 4, 1, 1, Dyes.dyeGreen , Element.U_235 , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.RADIO, 2))),
- Vanadium ( 29, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1|2 |8 |32 , 50, 50, 50, 0, "Vanadium" , 0, 0, 2183, 2183, T, F, 2, 1, 1, Dyes.dyeBlack , Element.V , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.RADIO, 1))),
- Ytterbium ( 77, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1|2 |8 |32 , 255, 255, 255, 0, "Ytterbium" , 0, 0, 1097, 1097, T, F, 4, 1, 1, Dyes._NULL , Element.Yb , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.RADIO, 1))),
- Yttrium ( 45, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1|2 |8 |32 , 220, 250, 220, 0, "Yttrium" , 0, 0, 1799, 1799, T, F, 4, 1, 1, Dyes._NULL , Element.Y , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.RADIO, 1))),
- Zinc ( 36, TextureSet.SET_METALLIC , 1.0F, 0, 1, 1|2 |8 |32 , 250, 240, 240, 0, "Zinc" , 0, 0, 692, 0, F, F, 2, 1, 1, Dyes.dyeWhite , Element.Zn , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.SANO, 1))),
-
- /**
- * The "Random Material" ones.
- */
- Organic ( -1, TextureSet.SET_LEAF , 1.0F, 0, 1, F),
- AnyCopper ( -1, TextureSet.SET_SHINY , 1.0F, 0, 3, F),
- AnyBronze ( -1, TextureSet.SET_SHINY , 1.0F, 0, 3, F),
- AnyIron ( -1, TextureSet.SET_SHINY , 1.0F, 0, 3, F),
- Crystal ( -1, TextureSet.SET_SHINY , 1.0F, 0, 3, F),
- Quartz ( -1, TextureSet.SET_QUARTZ , 1.0F, 0, 2, F),
- Metal ( -1, TextureSet.SET_METALLIC , 1.0F, 0, 2, F),
- Unknown ( -1, TextureSet.SET_DULL , 1.0F, 0, 2, F),
- Cobblestone ( -1, TextureSet.SET_DULL , 1.0F, 0, 1, F),
- Brick ( -1, TextureSet.SET_DULL , 1.0F, 0, 1, F),
- BrickNether ( -1, TextureSet.SET_DULL , 1.0F, 0, 1, F),
-
- /**
- * The "I don't care" Section, everything I don't want to do anything with right now, is right here. Just to make the Material Finder shut up about them.
- * But I do see potential uses in some of these Materials.
- */
- TarPitch ( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1|2 , 255, 255, 255, 0, "Tar Pitch" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes._NULL ),
- Carborundum ( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1 , 255, 255, 255, 0, "Carborundum" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes._NULL ),
- Satinspar ( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1|2 |8 , 255, 255, 255, 0, "Satinspar" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes._NULL ),
- Selenite ( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1|2 |8 , 255, 255, 255, 0, "Selenite" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes._NULL ),
- PetrifiedWood ( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1 |8 , 255, 255, 255, 0, "Petrified Wood" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes._NULL ),
- Jet ( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1 |4|8 , 255, 255, 255, 0, "Jet" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes._NULL ),
- Microcline ( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1|2 |8 , 255, 255, 255, 0, "Microcline" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes._NULL ),
- Serpentine ( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1|2 |8 , 255, 255, 255, 0, "Serpentine" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes._NULL ),
- Sylvite ( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1|2 |8 , 255, 255, 255, 0, "Sylvite" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes._NULL ),
- Flux ( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1 , 255, 255, 255, 0, "Flux" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes._NULL ),
- Goshen ( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1 , 255, 255, 255, 0, "Goshen" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes._NULL ),
- Joshen ( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1 , 255, 255, 255, 0, "Joshen" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes._NULL ),
- Itarius ( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1 , 255, 255, 255, 0, "Itarius" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes._NULL ),
- Legendary ( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1 , 255, 255, 255, 0, "Legendary" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes._NULL ),
- MutatedIron ( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1 , 255, 255, 255, 0, "Mutated Iron" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes._NULL ),
- Witheria ( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1 , 255, 255, 255, 0, "Witheria" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes._NULL ),
- RedstoneAlloy ( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1 , 255, 255, 255, 0, "Redstone Alloy" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes._NULL ),
- OsmiumTetroxide ( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1 , 255, 255, 255, 0, "Osmium Tetroxide" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes._NULL ),
- NitricAcid ( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 0 , 255, 255, 255, 0, "Nitric Acid" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes._NULL ),
- RubberTreeSap ( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 0 , 255, 255, 255, 0, "Rubber Tree Sap" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes._NULL ),
- AquaRegia ( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 0 , 255, 255, 255, 0, "Aqua Regia" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes._NULL ),
- SolutionBlueVitriol ( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 0 , 255, 255, 255, 0, "Blue Vitriol Solution" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes._NULL ),
- SolutionNickelSulfate( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 0 , 255, 255, 255, 0, "Nickel Sulfate Solution" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes._NULL ),
- Signalum ( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1|2 , 255, 255, 255, 0, "Signalum" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes._NULL ),
- Lumium ( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1|2 , 255, 255, 255, 0, "Lumium" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes._NULL ),
- PhasedIron ( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1|2 , 255, 255, 255, 0, "Phased Iron" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes._NULL ),
- PhasedGold ( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1|2 , 255, 255, 255, 0, "Phased Gold" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes._NULL ),
- Soularium ( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1 , 255, 255, 255, 0, "Soularium" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes._NULL ),
- Endium ( 770, TextureSet.SET_DULL , 1.0F, 0, 2, 1|2 |8 , 165, 220, 250, 0, "Endium" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes.dyeYellow ),
- Prismarine ( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1 |4 , 255, 255, 255, 0, "Prismarine" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes._NULL ),
- GraveyardDirt ( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1 , 255, 255, 255, 0, "Graveyard Dirt" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes._NULL ),
- DarkSteel ( 364, TextureSet.SET_DULL , 8.0F, 512, 3, 1|2 |8 |64 , 80, 70, 80, 0, "Dark Steel" , 0, 0, 1811, 0, F, F, 5, 1, 1, Dyes.dyePurple ),
- Terrasteel ( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1|2 , 255, 255, 255, 0, "Terrasteel" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes._NULL ),
- TerrasteelAlloyRaw ( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1|2 , 255, 255, 255, 0, "Raw Terrasteel Alloy" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes._NULL ),
- TerrasteelAlloyStrengthened ( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1|2 , 255, 255, 255, 0, "Strengthened Terrasteel Alloy" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes._NULL ),
- ConductiveIron ( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1|2 , 255, 255, 255, 0, "Conductive Iron" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes._NULL ),
- ElectricalSteel ( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1|2 , 255, 255, 255, 0, "Electrical Steel" , 0, 0, 1811, 1000, T, F, 3, 1, 1, Dyes._NULL ),
- EnergeticAlloy ( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1|2 , 255, 255, 255, 0, "Energetic Alloy" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes._NULL ),
- VibrantAlloy ( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1|2 , 255, 255, 255, 0, "Vibrant Alloy" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes._NULL ),
- PulsatingIron ( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1|2 , 255, 255, 255, 0, "Pulsating Iron" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes._NULL ),
- Rutile ( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1 , 255, 255, 255, 0, "Rutile" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes._NULL ), // TiO2
- Teslatite ( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1 , 60, 180, 200, 0, "Teslatite" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes._NULL ),
- Fluix ( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1 |4 , 255, 255, 255, 0, "Fluix" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes._NULL ),
- Manasteel ( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1|2 , 255, 255, 255, 0, "Manasteel" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes._NULL ),
- Tennantite ( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1 , 255, 255, 255, 0, "Tennantite" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes._NULL ),
- DarkThaumium ( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1|2 , 255, 255, 255, 0, "Dark Thaumium" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes._NULL ),
- Alfium ( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1 , 255, 255, 255, 0, "Alfium" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes._NULL ),
- Ryu ( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1 , 255, 255, 255, 0, "Ryu" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes._NULL ),
- Mutation ( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1 , 255, 255, 255, 0, "Mutation" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes._NULL ),
- Aquamarine ( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1 |4 , 255, 255, 255, 0, "Aquamarine" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes._NULL ),
- Ender ( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1 , 255, 255, 255, 0, "Ender" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes._NULL ),
- ElvenElementium ( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1|2 , 255, 255, 255, 0, "Elven Elementium" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes._NULL ),
- EnrichedCopper ( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1|2 , 255, 255, 255, 0, "Enriched Copper" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes._NULL ),
- DiamondCopper ( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1|2 , 255, 255, 255, 0, "Diamond Copper" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes._NULL ),
- SodiumPeroxide ( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1 , 255, 255, 255, 0, "Sodium Peroxide" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes._NULL ),
- IridiumSodiumOxide ( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1 , 255, 255, 255, 0, "Iridium Sodium Oxide" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes._NULL ),
- PlatinumGroupSludge ( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1 , 255, 255, 255, 0, "Platinum Group Sluge" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes._NULL ),
- Fairy ( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1|2 , 255, 255, 255, 0, "Fairy" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes._NULL ),
- Ludicrite ( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1|2 , 255, 255, 255, 0, "Ludicrite" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes._NULL ),
- Pokefennium ( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1|2 , 255, 255, 255, 0, "Pokefennium" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes._NULL ),
- Draconium ( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1|2 , 255, 255, 255, 0, "Draconium" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes._NULL ),
- DraconiumAwakened ( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1|2 , 255, 255, 255, 0, "Awakened Draconium" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes._NULL ),
- PurpleAlloy ( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 0 , 100, 180, 255, 0, "Purple Alloy" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes._NULL ),
- InfusedTeslatite ( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 0 , 100, 180, 255, 0, "Infused Teslatite" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes._NULL ),
-
- /**
- * Unknown Material Components. Dead End Section.
- */
- Adamantium ( 319, TextureSet.SET_SHINY , 10.0F, 5120, 5, 1|2 |8 |64|128 , 255, 255, 255, 0, "Adamantium" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeLightGray ),
- Adamite ( -1, TextureSet.SET_NONE , 1.0F, 0, 3, 1 |8 , 255, 255, 255, 0, "Adamite" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeLightGray ),
- Adluorite ( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1 |8 , 255, 255, 255, 0, "Adluorite" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes._NULL ),
- Agate ( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1 , 255, 255, 255, 0, "Agate" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes._NULL ),
- Alduorite ( 485, TextureSet.SET_SHINY , 1.0F, 0, 2, 1 |8|16 , 159, 180, 180, 0, "Alduorite" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes._NULL ),
- Amber ( 514, TextureSet.SET_RUBY , 4.0F, 128, 2, 1 |4|8 |64 , 255, 128, 0, 127, "Amber" , 5, 3, -1, 0, F, T, 1, 1, 1, Dyes.dyeOrange , Arrays.asList(new TC_AspectStack(TC_Aspects.VINCULUM, 2), new TC_AspectStack(TC_Aspects.VITREUS, 1))),
- Ammonium ( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1 , 255, 255, 255, 0, "Ammonium" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes._NULL ),
- Amordrine ( -1, TextureSet.SET_NONE , 6.0F, 64, 2, 1|2 |8|16 |64 , 255, 255, 255, 0, "Amordrine" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes._NULL ),
- Andesite ( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1 |8 , 255, 255, 255, 0, "Andesite" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes._NULL ),
- Angmallen ( 958, TextureSet.SET_METALLIC , 10.0F, 128, 2, 1|2 |8|16 |64 , 215, 225, 138, 0, "Angmallen" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes._NULL ),
- Ardite ( -1, TextureSet.SET_NONE , 6.0F, 64, 2, 1|2 |8 |64 , 255, 0, 0, 0, "Ardite" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeYellow ),
- Aredrite ( -1, TextureSet.SET_NONE , 6.0F, 64, 2, 1|2 |8 |64 , 255, 0, 0, 0, "Aredrite" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeYellow ),
- Atlarus ( 965, TextureSet.SET_METALLIC , 6.0F, 64, 2, 1|2 |8 |64 , 255, 255, 255, 0, "Atlarus" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes._NULL ),
- Bitumen ( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1 |8 , 255, 255, 255, 0, "Bitumen" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes._NULL ),
- Black ( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 0 , 0, 0, 0, 0, "Black" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes.dyeBlack ),
- Blizz ( 851, TextureSet.SET_SHINY , 1.0F, 0, 2, 1 , 220, 233, 255, 0, "Blizz" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes._NULL ),
- Blueschist ( 852, TextureSet.SET_DULL , 1.0F, 0, 2, 1 , 255, 255, 255, 0, "Blueschist" , 0, 0, -1, 0, F, F, 0, 1, 1, Dyes.dyeLightBlue ),
- Bluestone ( 813, TextureSet.SET_DULL , 1.0F, 0, 2, 1 , 255, 255, 255, 0, "Bluestone" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeBlue ),
- Bloodstone ( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1 , 255, 255, 255, 0, "Bloodstone" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes.dyeRed ),
- Blutonium ( -1, TextureSet.SET_SHINY , 1.0F, 0, 2, 1|2 |8 , 0, 0, 255, 0, "Blutonium" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes.dyeBlue ),
- Carmot ( 962, TextureSet.SET_METALLIC , 16.0F, 128, 1, 1|2 |8 |64 , 217, 205, 140, 0, "Carmot" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes._NULL ),
- Celenegil ( 964, TextureSet.SET_METALLIC , 10.0F, 4096, 2, 1|2 |8|16 |64 , 148, 204, 72, 0, "Celenegil" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes._NULL ),
- CertusQuartz ( 516, TextureSet.SET_QUARTZ , 5.0F, 32, 1, 1 |4|8 |64 , 210, 210, 230, 0, "Certus Quartz" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes.dyeLightGray , Arrays.asList(new TC_AspectStack(TC_Aspects.POTENTIA, 1), new TC_AspectStack(TC_Aspects.VITREUS, 1))),
- Ceruclase ( 952, TextureSet.SET_METALLIC , 6.0F, 1280, 2, 1|2 |8 , 140, 189, 208, 0, "Ceruclase" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes._NULL ),
- Citrine ( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1 , 255, 255, 255, 0, "Citrine" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes._NULL ),
- //ChargedCertusQuartz ( 517, TextureSet.SET_QUARTZ , 5.0F, 32, 1, 1 |4|8 |64 , 210, 210, 230, 0, "Charged Certus Quartz" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes.dyeLightGray , Arrays.asList(new TC_AspectStack(TC_Aspects.POTENTIA, 2), new TC_AspectStack(TC_Aspects.VITREUS, 1))),
- CobaltHexahydrate ( 853, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1 |16 , 80, 80, 250, 0, "Cobalt Hexahydrate" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeBlue ),
- ConstructionFoam ( 854, TextureSet.SET_DULL , 1.0F, 0, 2, 1 |16 , 128, 128, 128, 0, "Construction Foam" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeGray ),
- Chert ( 857, TextureSet.SET_DULL , 1.0F, 0, 2, 1 , 255, 255, 255, 0, "Chert" , 0, 0, -1, 0, F, F, 0, 1, 1, Dyes._NULL ),
- Chimerite ( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1 , 255, 255, 255, 0, "Chimerite" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes._NULL ),
- Coral ( -1, TextureSet.SET_NONE , 1.0F, 0, 1, 1 , 255, 128, 255, 0, "Coral" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes._NULL ),
- CrudeOil ( 858, TextureSet.SET_DULL , 1.0F, 0, 2, 1 , 10, 10, 10, 0, "Crude Oil" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeBlack ),
- Chrysocolla ( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1 , 255, 255, 255, 0, "Chrysocolla" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes._NULL ),
- CrystalFlux ( -1, TextureSet.SET_QUARTZ , 1.0F, 0, 3, 1 |4 , 100, 50, 100, 0, "Flux Crystal" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes._NULL ),
- Cyanite ( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1 , 255, 255, 255, 0, "Cyanite" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes.dyeCyan ),
- Dacite ( 859, TextureSet.SET_DULL , 1.0F, 0, 2, 1 , 255, 255, 255, 0, "Dacite" , 0, 0, -1, 0, F, F, 0, 1, 1, Dyes.dyeLightGray ),
- DarkIron ( 342, TextureSet.SET_DULL , 7.0F, 384, 3, 1|2 |8 |64 , 55, 40, 60, 0, "Dark Iron" , 0, 0, -1, 0, F, F, 5, 1, 1, Dyes.dyePurple ),
- DarkStone ( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1 , 255, 255, 255, 0, "Dark Stone" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes.dyeBlack ),
- Demonite ( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1 , 255, 255, 255, 0, "Demonite" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes.dyeRed ),
- Desh ( 884, TextureSet.SET_DULL , 1.0F, 1280, 3, 1|2 |8 |64|128 , 40, 40, 40, 0, "Desh" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeBlack ),
- Desichalkos ( -1, TextureSet.SET_NONE , 6.0F, 1280, 3, 1|2 |8|16 |64 , 255, 255, 255, 0, "Desichalkos" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes._NULL ),
- Dilithium ( 515, TextureSet.SET_DIAMOND , 1.0F, 0, 1, 1 |4|8|16 , 255, 250, 250, 127, "Dilithium" , 0, 0, -1, 0, F, T, 1, 1, 1, Dyes.dyeWhite ),
- Draconic ( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1 , 255, 255, 255, 0, "Draconic" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeRed ),
- Drulloy ( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1|16 , 255, 255, 255, 0, "Drulloy" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeRed ),
- Duranium ( 328, TextureSet.SET_METALLIC , 8.0F, 1280, 4, 1|2 |64 , 255, 255, 255, 0, "Duranium" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeLightGray ),
- Eclogite ( 860, TextureSet.SET_DULL , 1.0F, 0, 2, 1 , 255, 255, 255, 0, "Eclogite" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes._NULL ),
- ElectrumFlux ( 320, TextureSet.SET_SHINY , 16.0F, 512, 3, 1|2 |64 , 255, 255, 120, 0, "Fluxed Electrum" , 0, 0, 3000, 3000, T, F, 1, 1, 1, Dyes.dyeYellow ),
- Emery ( 861, TextureSet.SET_DULL , 1.0F, 0, 2, 1 |8 , 255, 255, 255, 0, "Emery" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes._NULL ),
- Enderium ( 321, TextureSet.SET_DULL , 8.0F, 256, 3, 1|2 |64 , 89, 145, 135, 0, "Enderium" , 0, 0, 3000, 3000, T, F, 1, 1, 1, Dyes.dyeGreen , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.ALIENIS, 1))),
- EnderiumBase ( -1, TextureSet.SET_DULL , 8.0F, 256, 3, 1|2 |64 , 89, 145, 135, 0, "Enderium Base" , 0, 0, 3000, 3000, T, F, 1, 1, 1, Dyes.dyeGreen , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.ALIENIS, 1))),
- Energized ( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 0 , 255, 255, 255, 0, "Energized" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes._NULL ),
- Epidote ( 862, TextureSet.SET_DULL , 1.0F, 0, 2, 1 , 255, 255, 255, 0, "Epidote" , 0, 0, -1, 0, F, F, 0, 1, 1, Dyes._NULL ),
- Eximite ( 959, TextureSet.SET_METALLIC , 5.0F, 2560, 3, 1|2 |8 |64 , 124, 90, 150, 0, "Eximite" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes._NULL ),
- FierySteel ( 346, TextureSet.SET_FIERY , 8.0F, 256, 3, 1|2 |16 |64|128 , 64, 0, 0, 0, "Fiery Steel" , 5, 2048, 1811, 1000, T, F, 1, 1, 1, Dyes.dyeRed , Arrays.asList(new TC_AspectStack(TC_Aspects.PRAECANTIO, 3), new TC_AspectStack(TC_Aspects.IGNIS, 3), new TC_AspectStack(TC_Aspects.CORPUS, 3))),
- Firestone ( 347, TextureSet.SET_QUARTZ , 6.0F, 1280, 3, 1 |4|8 |64 , 200, 20, 0, 0, "Firestone" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes.dyeRed ),
- Fluorite ( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1 |8 , 255, 255, 255, 0, "Fluorite" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes.dyeGreen ),
- FoolsRuby ( 512, TextureSet.SET_RUBY , 1.0F, 0, 2, 1 |4|8 , 255, 100, 100, 127, "Ruby" , 0, 0, -1, 0, F, T, 3, 1, 1, Dyes.dyeRed , Arrays.asList(new TC_AspectStack(TC_Aspects.LUCRUM, 2), new TC_AspectStack(TC_Aspects.VITREUS, 2))),
- Force ( 521, TextureSet.SET_DIAMOND , 10.0F, 128, 3, 1|2|4|8 |64|128 , 255, 255, 0, 0, "Force" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes.dyeYellow , Arrays.asList(new TC_AspectStack(TC_Aspects.POTENTIA, 5))),
- Forcicium ( 518, TextureSet.SET_DIAMOND , 1.0F, 0, 1, 1 |4|8|16 , 50, 50, 70, 0, "Forcicium" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes.dyeGreen , Arrays.asList(new TC_AspectStack(TC_Aspects.POTENTIA, 2))),
- Forcillium ( 519, TextureSet.SET_DIAMOND , 1.0F, 0, 1, 1 |4|8|16 , 50, 50, 70, 0, "Forcillium" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes.dyeGreen , Arrays.asList(new TC_AspectStack(TC_Aspects.POTENTIA, 2))),
- Gabbro ( 863, TextureSet.SET_DULL , 1.0F, 0, 1, 1 , 255, 255, 255, 0, "Gabbro" , 0, 0, -1, 0, F, F, 0, 1, 1, Dyes._NULL ),
- Glowstone ( 811, TextureSet.SET_SHINY , 1.0F, 0, 1, 1 |16 , 255, 255, 0, 0, "Glowstone" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeYellow , Arrays.asList(new TC_AspectStack(TC_Aspects.LUX, 2), new TC_AspectStack(TC_Aspects.SENSUS, 1))),
- Gneiss ( 864, TextureSet.SET_DULL , 1.0F, 0, 1, 1 , 255, 255, 255, 0, "Gneiss" , 0, 0, -1, 0, F, F, 0, 1, 1, Dyes._NULL ),
- Graphite ( 865, TextureSet.SET_DULL , 5.0F, 32, 2, 1 |8|16 |64 , 128, 128, 128, 0, "Graphite" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes.dyeGray , Arrays.asList(new TC_AspectStack(TC_Aspects.VITREUS, 2), new TC_AspectStack(TC_Aspects.IGNIS, 1))),
- Graphene ( 819, TextureSet.SET_DULL , 6.0F, 32, 1, 1 |64 , 128, 128, 128, 0, "Graphene" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes.dyeGray , Arrays.asList(new TC_AspectStack(TC_Aspects.VITREUS, 2), new TC_AspectStack(TC_Aspects.ELECTRUM, 1))),
- Greenschist ( 866, TextureSet.SET_DULL , 1.0F, 0, 1, 1 , 255, 255, 255, 0, "Green Schist" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeGreen ),
- Greenstone ( 867, TextureSet.SET_DULL , 1.0F, 0, 1, 1 , 255, 255, 255, 0, "Greenstone" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeGreen ),
- Greywacke ( 868, TextureSet.SET_DULL , 1.0F, 0, 1, 1 , 255, 255, 255, 0, "Greywacke" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeGray ),
- Haderoth ( 963, TextureSet.SET_METALLIC , 10.0F, 3200, 3, 1|2 |8|16 |64 , 119, 52, 30, 0, "Haderoth" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes._NULL ),
- Hematite ( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1|2 |8 , 255, 255, 255, 0, "Hematite" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes._NULL ),
- Hepatizon ( 957, TextureSet.SET_METALLIC , 12.0F, 128, 2, 1|2 |8|16 |64 , 117, 94, 117, 0, "Hepatizon" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes._NULL ),
- HSLA ( 322, TextureSet.SET_METALLIC , 6.0F, 500, 2, 1|2 |64|128 , 128, 128, 128, 0, "HSLA Steel" , 0, 0, 1811, 1000, T, F, 3, 1, 1, Dyes._NULL , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 1), new TC_AspectStack(TC_Aspects.ORDO, 1))),
- Ignatius ( 950, TextureSet.SET_METALLIC , 12.0F, 512, 2, 1|2 |16 , 255, 169, 83, 0, "Ignatius" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes._NULL ),
- Infernal ( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 0 , 255, 255, 255, 0, "Infernal" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes._NULL ),
- Infuscolium ( 490, TextureSet.SET_METALLIC , 6.0F, 64, 2, 1|2 |8|16 |64 , 146, 33, 86, 0, "Infuscolium" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes._NULL ),
- InfusedGold ( 323, TextureSet.SET_SHINY , 12.0F, 64, 3, 1|2 |8 |64|128 , 255, 200, 60, 0, "Infused Gold" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes.dyeYellow ),
- InfusedAir ( 540, TextureSet.SET_SHARDS , 8.0F, 64, 3, 1 |4|8 |64|128 , 255, 255, 0, 0, "Aer" , 5, 160, -1, 0, F, T, 3, 1, 1, Dyes.dyeYellow , Arrays.asList(new TC_AspectStack(TC_Aspects.PRAECANTIO, 1), new TC_AspectStack(TC_Aspects.AER, 2))),
- InfusedFire ( 541, TextureSet.SET_SHARDS , 8.0F, 64, 3, 1 |4|8 |64|128 , 255, 0, 0, 0, "Ignis" , 5, 320, -1, 0, F, T, 3, 1, 1, Dyes.dyeRed , Arrays.asList(new TC_AspectStack(TC_Aspects.PRAECANTIO, 1), new TC_AspectStack(TC_Aspects.IGNIS, 2))),
- InfusedEarth ( 542, TextureSet.SET_SHARDS , 8.0F, 256, 3, 1 |4|8 |64|128 , 0, 255, 0, 0, "Terra" , 5, 160, -1, 0, F, T, 3, 1, 1, Dyes.dyeGreen , Arrays.asList(new TC_AspectStack(TC_Aspects.PRAECANTIO, 1), new TC_AspectStack(TC_Aspects.TERRA, 2))),
- InfusedWater ( 543, TextureSet.SET_SHARDS , 8.0F, 64, 3, 1 |4|8 |64|128 , 0, 0, 255, 0, "Aqua" , 5, 160, -1, 0, F, T, 3, 1, 1, Dyes.dyeBlue , Arrays.asList(new TC_AspectStack(TC_Aspects.PRAECANTIO, 1), new TC_AspectStack(TC_Aspects.AQUA, 2))),
- InfusedEntropy ( 544, TextureSet.SET_SHARDS , 32.0F, 64, 4, 1 |4|8 |64|128 , 62, 62, 62, 0, "Perditio" , 5, 320, -1, 0, F, T, 3, 1, 1, Dyes.dyeBlack , Arrays.asList(new TC_AspectStack(TC_Aspects.PRAECANTIO, 1), new TC_AspectStack(TC_Aspects.PERDITIO, 2))),
- InfusedOrder ( 545, TextureSet.SET_SHARDS , 8.0F, 64, 3, 1 |4|8 |64|128 , 252, 252, 252, 0, "Ordo" , 5, 240, -1, 0, F, T, 3, 1, 1, Dyes.dyeWhite , Arrays.asList(new TC_AspectStack(TC_Aspects.PRAECANTIO, 1), new TC_AspectStack(TC_Aspects.ORDO, 2))),
- InfusedVis ( -1, TextureSet.SET_SHARDS , 8.0F, 64, 3, 1 |4|8 |64|128 , 255, 0, 255, 0, "Auram" , 5, 240, -1, 0, F, T, 3, 1, 1, Dyes.dyePurple , Arrays.asList(new TC_AspectStack(TC_Aspects.PRAECANTIO, 1), new TC_AspectStack(TC_Aspects.AURAM, 2))),
- InfusedDull ( -1, TextureSet.SET_SHARDS , 32.0F, 64, 3, 1 |4|8 |64|128 , 100, 100, 100, 0, "Vacuus" , 5, 160, -1, 0, F, T, 3, 1, 1, Dyes.dyeLightGray , Arrays.asList(new TC_AspectStack(TC_Aspects.PRAECANTIO, 1), new TC_AspectStack(TC_Aspects.VACUOS, 2))),
- Inolashite ( 954, TextureSet.SET_NONE , 8.0F, 2304, 3, 1|2 |8|16 |64 , 148, 216, 187, 0, "Inolashite" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes._NULL ),
- Invisium ( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1 , 255, 255, 255, 0, "Invisium" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes._NULL ),
- Jade ( 537, TextureSet.SET_SHINY , 1.0F, 0, 2, 1 |8 , 0, 100, 0, 0, "Jade" , 0, 0, -1, 0, F, F, 5, 1, 1, Dyes.dyeGreen , Arrays.asList(new TC_AspectStack(TC_Aspects.LUCRUM, 6), new TC_AspectStack(TC_Aspects.VITREUS, 3))),
- Jasper ( 511, TextureSet.SET_EMERALD , 1.0F, 0, 2, 1 |4|8 , 200, 80, 80, 100, "Jasper" , 0, 0, -1, 0, F, T, 3, 1, 1, Dyes.dyeRed , Arrays.asList(new TC_AspectStack(TC_Aspects.LUCRUM, 4), new TC_AspectStack(TC_Aspects.VITREUS, 2))),
- Kalendrite ( 953, TextureSet.SET_METALLIC , 5.0F, 2560, 3, 1|2 |16 , 170, 91, 189, 0, "Kalendrite" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes._NULL ),
- Komatiite ( 869, TextureSet.SET_DULL , 1.0F, 0, 1, 1 , 255, 255, 255, 0, "Komatiite" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeYellow ),
- Lava ( 700, TextureSet.SET_FLUID , 1.0F, 0, 1, 16 , 255, 64, 0, 0, "Lava" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeOrange ),
- Lemurite ( 486, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1 |16 , 219, 219, 219, 0, "Lemurite" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes._NULL ),
- Limestone ( -1, TextureSet.SET_NONE , 1.0F, 0, 1, 1 , 255, 255, 255, 0, "Limestone" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes._NULL ),
- Lodestone ( -1, TextureSet.SET_NONE , 1.0F, 0, 1, 1 |8 , 255, 255, 255, 0, "Lodestone" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes._NULL ),
- Luminite ( -1, TextureSet.SET_NONE , 1.0F, 0, 1, 1 |8 , 250, 250, 250, 0, "Luminite" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes.dyeWhite ),
- Magma ( -1, TextureSet.SET_NONE , 1.0F, 0, 1, 0 , 255, 64, 0, 0, "Magma" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeOrange ),
- Mawsitsit ( -1, TextureSet.SET_NONE , 1.0F, 0, 1, 1 , 255, 255, 255, 0, "Mawsitsit" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes._NULL ),
- Mercassium ( -1, TextureSet.SET_NONE , 6.0F, 64, 1, 1|2 |8 |64 , 255, 255, 255, 0, "Mercassium" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes._NULL ),
- MeteoricIron ( 340, TextureSet.SET_METALLIC , 6.0F, 384, 2, 1|2 |8 |64 , 100, 50, 80, 0, "Meteoric Iron" , 0, 0, 1811, 0, F, F, 1, 1, 1, Dyes.dyeGray , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.MAGNETO, 1))),
- MeteoricSteel ( 341, TextureSet.SET_METALLIC , 6.0F, 768, 2, 1|2 |64 , 50, 25, 40, 0, "Meteoric Steel" , 0, 0, 1811, 1000, T, F, 1, 1, 1, Dyes.dyeGray , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.MAGNETO, 1), new TC_AspectStack(TC_Aspects.ORDO, 1))),
- Meteorite ( -1, TextureSet.SET_NONE , 1.0F, 0, 1, 1 |8 , 80, 35, 60, 0, "Meteorite" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyePurple ),
- Meutoite ( 487, TextureSet.SET_METALLIC , 1.0F, 0, 1, 1 |8|16 , 95, 82, 105, 0, "Meutoite" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes._NULL ),
- Migmatite ( 872, TextureSet.SET_DULL , 1.0F, 0, 1, 1 , 255, 255, 255, 0, "Migmatite" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes._NULL ),
- Mimichite ( -1, TextureSet.SET_GEM_VERTICAL , 1.0F, 0, 1, 1 |4|8 , 255, 255, 255, 0, "Mimichite" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes._NULL ),
- Moonstone ( -1, TextureSet.SET_NONE , 1.0F, 0, 1, 1 |8 , 255, 255, 255, 0, "Moonstone" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes.dyeWhite , Arrays.asList(new TC_AspectStack(TC_Aspects.VITREUS, 1), new TC_AspectStack(TC_Aspects.ALIENIS, 1))),
- Naquadah ( 324, TextureSet.SET_METALLIC , 6.0F, 1280, 4, 1|2 |8|16 |64 , 50, 50, 50, 0, "Naquadah" , 0, 0, 3000, 3000, T, F, 10, 1, 1, Dyes.dyeBlack , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 3), new TC_AspectStack(TC_Aspects.RADIO, 1), new TC_AspectStack(TC_Aspects.NEBRISUM, 1))),
- NaquadahAlloy ( 325, TextureSet.SET_METALLIC , 8.0F, 5120, 5, 1|2 |64|128 , 40, 40, 40, 0, "Naquadah Alloy" , 0, 0, 3000, 3000, T, F, 10, 1, 1, Dyes.dyeBlack , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 4), new TC_AspectStack(TC_Aspects.NEBRISUM, 1))),
- NaquadahEnriched ( 326, TextureSet.SET_METALLIC , 6.0F, 1280, 4, 1|2 |8|16 |64 , 50, 50, 50, 0, "Enriched Naquadah" , 0, 0, 3000, 3000, T, F, 15, 1, 1, Dyes.dyeBlack , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 3), new TC_AspectStack(TC_Aspects.RADIO, 2), new TC_AspectStack(TC_Aspects.NEBRISUM, 2))),
- Naquadria ( 327, TextureSet.SET_SHINY , 1.0F, 512, 4, 1|2 |8 |64 , 30, 30, 30, 0, "Naquadria" , 0, 0, 3000, 3000, T, F, 20, 1, 1, Dyes.dyeBlack , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 4), new TC_AspectStack(TC_Aspects.RADIO, 3), new TC_AspectStack(TC_Aspects.NEBRISUM, 3))),
- Nether ( -1, TextureSet.SET_NONE , 1.0F, 0, 1, 0 , 255, 255, 255, 0, "Nether" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes._NULL ),
- NetherBrick ( 814, TextureSet.SET_DULL , 1.0F, 0, 1, 1 , 100, 0, 0, 0, "Nether Brick" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeRed , Arrays.asList(new TC_AspectStack(TC_Aspects.IGNIS, 1))),
- NetherQuartz ( 522, TextureSet.SET_QUARTZ , 1.0F, 32, 1, 1 |4|8 |64 , 230, 210, 210, 0, "Nether Quartz" , 0, 0, -1, 0, F, F, 2, 1, 1, Dyes.dyeWhite , Arrays.asList(new TC_AspectStack(TC_Aspects.POTENTIA, 1), new TC_AspectStack(TC_Aspects.VITREUS, 1))),
- NetherStar ( 506, TextureSet.SET_NETHERSTAR , 1.0F, 5120, 4, 1 |4 |64 , 255, 255, 255, 0, "Nether Star" , 5, 50000, -1, 0, F, F, 15, 1, 1, Dyes.dyeWhite ),
- Nikolite ( 812, TextureSet.SET_SHINY , 1.0F, 0, 1, 1 |8 , 60, 180, 200, 0, "Nikolite" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes.dyeCyan , Arrays.asList(new TC_AspectStack(TC_Aspects.ELECTRUM, 2))),
- ObsidianFlux ( -1, TextureSet.SET_DULL , 1.0F, 0, 1, 1|2 , 80, 50, 100, 0, "Fluxed Obsidian" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyePurple ),
- Oilsands ( 878, TextureSet.SET_NONE , 1.0F, 0, 1, 1 |8 , 10, 10, 10, 0, "Oilsands" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes._NULL ),
- Onyx ( -1, TextureSet.SET_NONE , 1.0F, 0, 1, 1 , 255, 255, 255, 0, "Onyx" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes._NULL ),
- Orichalcum ( 966, TextureSet.SET_METALLIC , 4.5F, 3456, 3, 1|2 |8 |64 , 84, 122, 56, 0, "Orichalcum" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes._NULL ),
- Osmonium ( -1, TextureSet.SET_NONE , 6.0F, 64, 1, 1|2 |8 |64 , 255, 255, 255, 0, "Osmonium" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes.dyeBlue ),
- Oureclase ( 961, TextureSet.SET_METALLIC , 6.0F, 1920, 3, 1|2 |8 |64 , 183, 98, 21, 0, "Oureclase" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes._NULL ),
- Painite ( -1, TextureSet.SET_NONE , 1.0F, 0, 1, 0 , 255, 255, 255, 0, "Painite" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes._NULL ),
- Peanutwood ( -1, TextureSet.SET_NONE , 1.0F, 0, 1, 0 , 255, 255, 255, 0, "Peanut Wood" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes._NULL ),
- Petroleum ( -1, TextureSet.SET_NONE , 1.0F, 0, 1, 1 |8 , 255, 255, 255, 0, "Petroleum" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes._NULL ),
- Pewter ( -1, TextureSet.SET_NONE , 1.0F, 0, 1, 0 , 255, 255, 255, 0, "Pewter" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes._NULL ),
- Phoenixite ( -1, TextureSet.SET_NONE , 6.0F, 64, 1, 1|2 |8 |64 , 255, 255, 255, 0, "Phoenixite" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes._NULL ),
- Potash ( -1, TextureSet.SET_NONE , 1.0F, 0, 1, 0 , 255, 255, 255, 0, "Potash" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes._NULL ),
- Prometheum ( 960, TextureSet.SET_METALLIC , 8.0F, 512, 1, 1|2 |8 |64 , 90, 129, 86, 0, "Prometheum" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes._NULL ),
- Quartzite ( 523, TextureSet.SET_QUARTZ , 1.0F, 0, 1, 1 |4|8 , 210, 230, 210, 0, "Quartzite" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes.dyeWhite ),
- Quicklime ( -1, TextureSet.SET_NONE , 1.0F, 0, 1, 1 , 255, 255, 255, 0, "Quicklime" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes._NULL ),
- Randomite ( -1, TextureSet.SET_NONE , 1.0F, 0, 1, 1 |8 , 255, 255, 255, 0, "Randomite" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes._NULL ),
- RefinedGlowstone (-326, TextureSet.SET_METALLIC , 1.0F, 0, 1, 1|2 , 255, 255, 0, 0, "Refined Glowstone" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeYellow ),
- RefinedObsidian (-327, TextureSet.SET_METALLIC , 1.0F, 0, 1, 1|2 , 80, 50, 100, 0, "Refined Obsidian" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyePurple ),
- Rhyolite ( 875, TextureSet.SET_DULL , 1.0F, 0, 1, 1 , 255, 255, 255, 0, "Rhyolite" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes._NULL ),
- Rubracium ( 488, TextureSet.SET_METALLIC , 1.0F, 0, 1, 1 |8|16 , 151, 45, 45, 0, "Rubracium" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes._NULL ),
- RyuDragonRyder ( -1, TextureSet.SET_NONE , 1.0F, 0, 1, 0 , 255, 255, 255, 0, "Ryu Dragon Ryder" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes._NULL ),
- Sand ( -1, TextureSet.SET_NONE , 1.0F, 0, 1, 0 , 255, 255, 255, 0, "Sand" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeYellow ),
- Sanguinite ( 955, TextureSet.SET_METALLIC , 3.0F, 4480, 4, 1|2 |8 , 185, 0, 0, 0, "Sanguinite" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes._NULL ),
- Siltstone ( 876, TextureSet.SET_DULL , 1.0F, 0, 1, 1 , 255, 255, 255, 0, "Siltstone" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes._NULL ),
- Spinel ( -1, TextureSet.SET_NONE , 1.0F, 0, 1, 0 , 255, 255, 255, 0, "Spinel" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes._NULL ),
- Starconium ( -1, TextureSet.SET_NONE , 1.0F, 0, 1, 1|2 |8 , 255, 255, 255, 0, "Starconium" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes._NULL ),
- Sugilite ( -1, TextureSet.SET_NONE , 1.0F, 0, 1, 1 , 255, 255, 255, 0, "Sugilite" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes._NULL ),
- Sunstone ( -1, TextureSet.SET_NONE , 1.0F, 0, 1, 1 |8 , 255, 255, 255, 0, "Sunstone" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes.dyeYellow , Arrays.asList(new TC_AspectStack(TC_Aspects.VITREUS, 1), new TC_AspectStack(TC_Aspects.ALIENIS, 1))),
- Tar ( -1, TextureSet.SET_NONE , 1.0F, 0, 1, 0 , 10, 10, 10, 0, "Tar" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeBlack ),
- Tartarite ( 956, TextureSet.SET_METALLIC , 20.0F, 7680, 5, 1|2 |8|16 , 255, 118, 60, 0, "Tartarite" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes._NULL ),
- Tapazite ( -1, TextureSet.SET_NONE , 1.0F, 0, 1, 1 , 255, 255, 255, 0, "Tapazite" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes.dyeGreen ),
- Thyrium ( -1, TextureSet.SET_NONE , 1.0F, 0, 1, 1|2 |8 , 255, 255, 255, 0, "Thyrium" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes._NULL ),
- Tourmaline ( -1, TextureSet.SET_RUBY , 1.0F, 0, 1, 1 , 255, 255, 255, 0, "Tourmaline" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes._NULL ),
- Tritanium ( 329, TextureSet.SET_METALLIC , 6.0F, 2560, 4, 1|2 |64 , 255, 255, 255, 0, "Tritanium" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeWhite , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.ORDO, 2))),
- Turquoise ( -1, TextureSet.SET_NONE , 1.0F, 0, 1, 1 , 255, 255, 255, 0, "Turquoise" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes._NULL ),
- UUAmplifier ( 721, TextureSet.SET_FLUID , 1.0F, 0, 1, 16 , 96, 0, 128, 0, "UU-Amplifier" , 0, 0, -1, 0, F, F, 10, 1, 1, Dyes.dyePink ),
- UUMatter ( 703, TextureSet.SET_FLUID , 1.0F, 0, 1, 16 , 128, 0, 196, 0, "UU-Matter" , 0, 0, -1, 0, F, F, 10, 1, 1, Dyes.dyePink ),
- Void ( -1, TextureSet.SET_NONE , 1.0F, 0, 1, 0 , 255, 255, 255, 200, "Void" , 0, 0, -1, 0, F, T, 1, 1, 1, Dyes._NULL , Arrays.asList(new TC_AspectStack(TC_Aspects.VACUOS, 1))),
- Voidstone ( -1, TextureSet.SET_NONE , 1.0F, 0, 1, 0 , 255, 255, 255, 200, "Voidstone" , 0, 0, -1, 0, F, T, 1, 1, 1, Dyes._NULL , Arrays.asList(new TC_AspectStack(TC_Aspects.VITREUS, 1), new TC_AspectStack(TC_Aspects.VACUOS, 1))),
- Vulcanite ( 489, TextureSet.SET_METALLIC , 6.0F, 64, 2, 1|2 |8|16 |64 , 255, 132, 72, 0, "Vulcanite" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes._NULL ),
- Vyroxeres ( 951, TextureSet.SET_METALLIC , 9.0F, 768, 3, 1|2 |8 |64 , 85, 224, 1, 0, "Vyroxeres" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes._NULL ),
- Wimalite ( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 8 , 255, 255, 255, 0, "Wimalite" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes.dyeYellow ),
- Yellorite ( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 8 , 255, 255, 255, 0, "Yellorite" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes.dyeYellow ),
- Yellorium ( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1|2 , 255, 255, 255, 0, "Yellorium" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes.dyeYellow ),
- Zectium ( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1|2 |8 , 255, 255, 255, 0, "Zectium" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes.dyeBlack ),
-
- /**
- * Circuitry, Batteries and other Technical things
- */
- Primitive ( -1, TextureSet.SET_NONE , 1.0F, 0, 0, 0 , 255, 255, 255, 0, "Primitive" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeLightGray , Arrays.asList(new TC_AspectStack(TC_Aspects.MACHINA, 1))),
- Basic ( -1, TextureSet.SET_NONE , 1.0F, 0, 0, 0 , 255, 255, 255, 0, "Basic" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeLightGray , Arrays.asList(new TC_AspectStack(TC_Aspects.MACHINA, 2))),
- Good ( -1, TextureSet.SET_NONE , 1.0F, 0, 0, 0 , 255, 255, 255, 0, "Good" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeLightGray , Arrays.asList(new TC_AspectStack(TC_Aspects.MACHINA, 3))),
- Advanced ( -1, TextureSet.SET_NONE , 1.0F, 0, 0, 0 , 255, 255, 255, 0, "Advanced" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeLightGray , Arrays.asList(new TC_AspectStack(TC_Aspects.MACHINA, 4))),
- Data ( -1, TextureSet.SET_NONE , 1.0F, 0, 0, 0 , 255, 255, 255, 0, "Data" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeLightGray , Arrays.asList(new TC_AspectStack(TC_Aspects.MACHINA, 5))),
- Elite ( -1, TextureSet.SET_NONE , 1.0F, 0, 0, 0 , 255, 255, 255, 0, "Elite" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeLightGray , Arrays.asList(new TC_AspectStack(TC_Aspects.MACHINA, 6))),
- Master ( -1, TextureSet.SET_NONE , 1.0F, 0, 0, 0 , 255, 255, 255, 0, "Master" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeLightGray , Arrays.asList(new TC_AspectStack(TC_Aspects.MACHINA, 7))),
- Ultimate ( -1, TextureSet.SET_NONE , 1.0F, 0, 0, 0 , 255, 255, 255, 0, "Ultimate" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeLightGray , Arrays.asList(new TC_AspectStack(TC_Aspects.MACHINA, 8))),
- Superconductor ( -1, TextureSet.SET_NONE , 1.0F, 0, 0, 0 , 255, 255, 255, 0, "Superconductor" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeLightGray , Arrays.asList(new TC_AspectStack(TC_Aspects.ELECTRUM, 8))),
- Infinite ( -1, TextureSet.SET_NONE , 1.0F, 0, 0, 0 , 255, 255, 255, 0, "Infinite" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeLightGray ),
-
- /**
- * Not possible to determine exact Components
- */
- Antimatter ( -1, TextureSet.SET_NONE , 1.0F, 0, 0, 0 , 255, 255, 255, 0, "Antimatter" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyePink , Arrays.asList(new TC_AspectStack(TC_Aspects.POTENTIA, 9), new TC_AspectStack(TC_Aspects.PERFODIO, 8))),
- BioFuel ( 705, TextureSet.SET_FLUID , 1.0F, 0, 0, 16 , 255, 128, 0, 0, "Biofuel" , 0, 6, -1, 0, F, F, 1, 1, 1, Dyes.dyeOrange ),
- Biomass ( 704, TextureSet.SET_FLUID , 1.0F, 0, 0, 16 , 0, 255, 0, 0, "Biomass" , 3, 8, -1, 0, F, F, 1, 1, 1, Dyes.dyeGreen ),
- Cheese ( 894, TextureSet.SET_FINE , 1.0F, 0, 0, 1 |8 , 255, 255, 0, 0, "Cheese" , 0, 0, 320, 0, F, F, 1, 1, 1, Dyes.dyeYellow ),
- Chili ( 895, TextureSet.SET_FINE , 1.0F, 0, 0, 1 , 200, 0, 0, 0, "Chili" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeRed ),
- Chocolate ( 886, TextureSet.SET_FINE , 1.0F, 0, 0, 1 , 190, 95, 0, 0, "Chocolate" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeBrown ),
- Cluster ( -1, TextureSet.SET_NONE , 1.0F, 0, 0, 0 , 255, 255, 255, 127, "Cluster" , 0, 0, -1, 0, F, T, 1, 1, 1, Dyes.dyeWhite ),
- CoalFuel ( 710, TextureSet.SET_FLUID , 1.0F, 0, 0, 16 , 50, 50, 70, 0, "Coalfuel" , 0, 16, -1, 0, F, F, 1, 1, 1, Dyes.dyeBlack ),
- Cocoa ( 887, TextureSet.SET_FINE , 1.0F, 0, 0, 1 , 190, 95, 0, 0, "Cocoa" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeBrown ),
- Coffee ( 888, TextureSet.SET_FINE , 1.0F, 0, 0, 1 , 150, 75, 0, 0, "Coffee" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeBrown ),
- Creosote ( 712, TextureSet.SET_FLUID , 1.0F, 0, 0, 16 , 128, 64, 0, 0, "Creosote" , 3, 8, -1, 0, F, F, 1, 1, 1, Dyes.dyeBrown ),
- Ethanol ( 706, TextureSet.SET_FLUID , 1.0F, 0, 0, 16 , 255, 128, 0, 0, "Ethanol" , 0, 128, -1, 0, F, F, 1, 1, 1, Dyes.dyePurple ),
- FishOil ( 711, TextureSet.SET_FLUID , 1.0F, 0, 0, 16 , 255, 196, 0, 0, "Fish Oil" , 3, 2, -1, 0, F, F, 1, 1, 1, Dyes.dyeYellow , Arrays.asList(new TC_AspectStack(TC_Aspects.CORPUS, 2))),
- Fuel ( 708, TextureSet.SET_FLUID , 1.0F, 0, 0, 16 , 255, 255, 0, 0, "Diesel" , 0, 128, -1, 0, F, F, 1, 1, 1, Dyes.dyeYellow ),
- Glue ( 726, TextureSet.SET_FLUID , 1.0F, 0, 0, 16 , 200, 196, 0, 0, "Glue" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeOrange , Arrays.asList(new TC_AspectStack(TC_Aspects.LIMUS, 2))),
- Gunpowder ( 800, TextureSet.SET_DULL , 1.0F, 0, 0, 1 , 128, 128, 128, 0, "Gunpowder" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeGray , Arrays.asList(new TC_AspectStack(TC_Aspects.PERDITIO, 3), new TC_AspectStack(TC_Aspects.IGNIS, 4))),
- FryingOilHot ( 727, TextureSet.SET_FLUID , 1.0F, 0, 0, 16 , 200, 196, 0, 0, "Hot Frying Oil" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeOrange , Arrays.asList(new TC_AspectStack(TC_Aspects.AQUA, 1), new TC_AspectStack(TC_Aspects.IGNIS, 1))),
- Honey ( 725, TextureSet.SET_FLUID , 1.0F, 0, 0, 16 , 210, 200, 0, 0, "Honey" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeYellow ),
- Leather ( -1, TextureSet.SET_ROUGH , 1.0F, 0, 0, 1 , 150, 150, 80, 127, "Leather" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeOrange ),
- LimePure ( -1, TextureSet.SET_NONE , 1.0F, 0, 0, 0 , 255, 255, 255, 0, "Pure Lime" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeLime ),
- Lubricant ( 724, TextureSet.SET_FLUID , 1.0F, 0, 0, 16 , 255, 196, 0, 0, "Lubricant" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeOrange , Arrays.asList(new TC_AspectStack(TC_Aspects.AQUA, 2), new TC_AspectStack(TC_Aspects.MACHINA, 1))),
- McGuffium239 ( 999, TextureSet.SET_FLUID , 1.0F, 0, 0, 16 , 200, 50, 150, 0, "Mc Guffium 239" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyePink , Arrays.asList(new TC_AspectStack(TC_Aspects.ALIENIS, 8), new TC_AspectStack(TC_Aspects.PERMUTATIO, 8), new TC_AspectStack(TC_Aspects.SPIRITUS, 8), new TC_AspectStack(TC_Aspects.AURAM, 8), new TC_AspectStack(TC_Aspects.VITIUM, 8), new TC_AspectStack(TC_Aspects.RADIO, 8), new TC_AspectStack(TC_Aspects.MAGNETO, 8), new TC_AspectStack(TC_Aspects.ELECTRUM, 8), new TC_AspectStack(TC_Aspects.NEBRISUM, 8), new TC_AspectStack(TC_Aspects.STRONTIO, 8))),
- MeatRaw ( 892, TextureSet.SET_FINE , 1.0F, 0, 0, 1 , 255, 100, 100, 0, "Raw Meat" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyePink ),
- MeatCooked ( 893, TextureSet.SET_FINE , 1.0F, 0, 0, 1 , 150, 60, 20, 0, "Cooked Meat" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyePink ),
- Milk ( 885, TextureSet.SET_FINE , 1.0F, 0, 0, 1 |16 , 254, 254, 254, 0, "Milk" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeWhite , Arrays.asList(new TC_AspectStack(TC_Aspects.SANO, 2))),
- Mud ( -1, TextureSet.SET_NONE , 1.0F, 0, 0, 0 , 255, 255, 255, 0, "Mud" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeBrown ),
- Oil ( 707, TextureSet.SET_FLUID , 1.0F, 0, 0, 16 , 10, 10, 10, 0, "Oil" , 3, 16, -1, 0, F, F, 1, 1, 1, Dyes.dyeBlack ),
- Paper ( 879, TextureSet.SET_PAPER , 1.0F, 0, 0, 1 , 250, 250, 250, 0, "Paper" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeWhite , Arrays.asList(new TC_AspectStack(TC_Aspects.COGNITO, 1))),
- Peat ( -1, TextureSet.SET_NONE , 1.0F, 0, 0, 0 , 255, 255, 255, 0, "Peat" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeBrown , Arrays.asList(new TC_AspectStack(TC_Aspects.POTENTIA, 2), new TC_AspectStack(TC_Aspects.IGNIS, 2))),
- Quantum ( -1, TextureSet.SET_NONE , 1.0F, 0, 0, 0 , 255, 255, 255, 0, "Quantum" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeWhite ),
- RareEarth ( 891, TextureSet.SET_FINE , 1.0F, 0, 0, 1 , 128, 128, 100, 0, "Rare Earth" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeGray , Arrays.asList(new TC_AspectStack(TC_Aspects.VITREUS, 1), new TC_AspectStack(TC_Aspects.LUCRUM, 1))),
- Red ( -1, TextureSet.SET_NONE , 1.0F, 0, 0, 0 , 255, 0, 0, 0, "Red" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeRed ),
- Reinforced ( -1, TextureSet.SET_NONE , 1.0F, 0, 0, 0 , 255, 255, 255, 0, "Reinforced" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeGray ),
- SeedOil ( 713, TextureSet.SET_FLUID , 1.0F, 0, 0, 16 , 196, 255, 0, 0, "Seed Oil" , 3, 2, -1, 0, F, F, 1, 1, 1, Dyes.dyeLime , Arrays.asList(new TC_AspectStack(TC_Aspects.GRANUM, 2))),
- SeedOilHemp ( 722, TextureSet.SET_FLUID , 1.0F, 0, 0, 16 , 196, 255, 0, 0, "Hemp Seed Oil" , 3, 2, -1, 0, F, F, 1, 1, 1, Dyes.dyeLime , Arrays.asList(new TC_AspectStack(TC_Aspects.GRANUM, 2))),
- SeedOilLin ( 723, TextureSet.SET_FLUID , 1.0F, 0, 0, 16 , 196, 255, 0, 0, "Lin Seed Oil" , 3, 2, -1, 0, F, F, 1, 1, 1, Dyes.dyeLime , Arrays.asList(new TC_AspectStack(TC_Aspects.GRANUM, 2))),
- Stone ( 299, TextureSet.SET_ROUGH , 4.0F, 32, 1, 1 |64|128 , 205, 205, 205, 0, "Stone" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeLightGray , Arrays.asList(new TC_AspectStack(TC_Aspects.TERRA, 1))),
- TNT ( -1, TextureSet.SET_NONE , 1.0F, 0, 0, 0 , 255, 255, 255, 0, "TNT" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeRed , Arrays.asList(new TC_AspectStack(TC_Aspects.PERDITIO, 7), new TC_AspectStack(TC_Aspects.IGNIS, 4))),
- Unstable ( -1, TextureSet.SET_NONE , 1.0F, 0, 4, 0 , 255, 255, 255, 127, "Unstable" , 0, 0, -1, 0, F, T, 1, 1, 1, Dyes.dyeWhite , Arrays.asList(new TC_AspectStack(TC_Aspects.PERDITIO, 4))),
- Unstableingot ( -1, TextureSet.SET_NONE , 1.0F, 0, 4, 0 , 255, 255, 255, 127, "Unstable" , 0, 0, -1, 0, F, T, 1, 1, 1, Dyes.dyeWhite , Arrays.asList(new TC_AspectStack(TC_Aspects.PERDITIO, 4))),
- Wheat ( 881, TextureSet.SET_POWDER , 1.0F, 0, 0, 1 , 255, 255, 196, 0, "Wheat" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeYellow , Arrays.asList(new TC_AspectStack(TC_Aspects.MESSIS, 2))),
-
- /**
- * TODO: This
- */
- AluminiumBrass ( -1, TextureSet.SET_METALLIC , 6.0F, 64, 2, 1|2 |64 , 255, 255, 255, 0, "Aluminium Brass" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeYellow ),
- Osmiridium ( 317, TextureSet.SET_METALLIC , 8.0F, 3000, 4, 1|2 |64|128 , 100, 100, 255, 0, "Osmiridium" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeLightBlue ),
- Sunnarium ( 318, TextureSet.SET_SHINY , 1.0F, 0, 1, 1|2 , 255, 255, 0, 0, "Sunnarium" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeYellow ),
- Endstone ( 808, TextureSet.SET_DULL , 1.0F, 0, 1, 1 , 255, 255, 255, 0, "Endstone" , 0, 0, -1, 0, F, F, 0, 1, 1, Dyes.dyeYellow ),
- Netherrack ( 807, TextureSet.SET_DULL , 1.0F, 0, 0, 1 , 200, 0, 0, 0, "Netherrack" , 0, 0, -1, 0, F, F, 0, 1, 1, Dyes.dyeRed ),
- SoulSand ( -1, TextureSet.SET_DULL , 1.0F, 0, 0, 1 , 255, 255, 255, 0, "Soulsand" , 0, 0, -1, 0, F, F, 0, 1, 1, Dyes.dyeBrown ),
-
- /**
- * First Degree Compounds
- */
- Air ( -1, TextureSet.SET_FLUID , 1.0F, 0, 2, 16|32 , 169, 208, 245, 240, "Air" , 0, 0, -1, 0, F, T, 1, 1, 1, Dyes.dyeLightBlue , 0, Arrays.asList(new MaterialStack(Nitrogen, 40), new MaterialStack(Oxygen, 11), new MaterialStack(Argon, 1))),
- Almandine ( 820, TextureSet.SET_ROUGH , 1.0F, 0, 1, 1 |8 , 255, 0, 0, 0, "Almandine" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes.dyeRed , 1, Arrays.asList(new MaterialStack(Aluminium, 2), new MaterialStack(Iron, 3), new MaterialStack(Silicon, 3), new MaterialStack(Oxygen, 12))),
- Andradite ( 821, TextureSet.SET_ROUGH , 1.0F, 0, 1, 1 |8 , 150, 120, 0, 0, "Andradite" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes.dyeYellow , 1, Arrays.asList(new MaterialStack(Calcium, 3), new MaterialStack(Iron, 2), new MaterialStack(Silicon, 3), new MaterialStack(Oxygen, 12))),
- AnnealedCopper ( 345, TextureSet.SET_SHINY , 1.0F, 0, 2, 1|2 |128 , 255, 120, 20, 0, "Annealed Copper" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes.dyeOrange , 2, Arrays.asList(new MaterialStack(Copper, 1))),
- Asbestos ( 946, TextureSet.SET_DULL , 1.0F, 0, 1, 1 |8 , 230, 230, 230, 0, "Asbestos" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeWhite , 1, Arrays.asList(new MaterialStack(Magnesium, 3), new MaterialStack(Silicon, 2), new MaterialStack(Hydrogen, 4), new MaterialStack(Oxygen, 9))), // Mg3Si2O5(OH)4
- Ash ( 815, TextureSet.SET_DULL , 1.0F, 0, 1, 1 , 150, 150, 150, 0, "Ashes" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeLightGray , 2, Arrays.asList(new MaterialStack(Carbon, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.PERDITIO, 1))),
- BandedIron ( 917, TextureSet.SET_DULL , 1.0F, 0, 2, 1 |8 , 145, 90, 90, 0, "Banded Iron" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeBrown , 1, Arrays.asList(new MaterialStack(Iron, 2), new MaterialStack(Oxygen, 3))),
- BatteryAlloy ( 315, TextureSet.SET_DULL , 1.0F, 0, 1, 1|2 , 156, 124, 160, 0, "Battery Alloy" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyePurple , 2, Arrays.asList(new MaterialStack(Lead, 4), new MaterialStack(Antimony, 1))),
- Bauxite ( 822, TextureSet.SET_DULL , 1.0F, 0, 1, 1 |8 , 200, 100, 0, 0, "Bauxite" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes.dyeBrown , 1, Arrays.asList(new MaterialStack(Titanium, 1), new MaterialStack(Aluminium, 16), new MaterialStack(Hydrogen, 10), new MaterialStack(Oxygen, 12))),
- BlueTopaz ( 513, TextureSet.SET_GEM_HORIZONTAL , 7.0F, 256, 3, 1 |4|8 |64 , 0, 0, 255, 127, "Blue Topaz" , 0, 0, -1, 0, F, T, 3, 1, 1, Dyes.dyeBlue , 1, Arrays.asList(new MaterialStack(Aluminium, 2), new MaterialStack(Silicon, 1), new MaterialStack(Fluorine, 2), new MaterialStack(Hydrogen, 2), new MaterialStack(Oxygen, 6)), Arrays.asList(new TC_AspectStack(TC_Aspects.LUCRUM, 6), new TC_AspectStack(TC_Aspects.VITREUS, 4))),
- Bone ( 806, TextureSet.SET_DULL , 1.0F, 0, 1, 1 , 250, 250, 250, 0, "Bone" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeWhite , 0, Arrays.asList(new MaterialStack(Calcium, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.MORTUUS, 2), new TC_AspectStack(TC_Aspects.CORPUS, 1))),
- Brass ( 301, TextureSet.SET_METALLIC , 7.0F, 96, 1, 1|2 |64|128 , 255, 180, 0, 0, "Brass" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeYellow , 2, Arrays.asList(new MaterialStack(Zinc, 1), new MaterialStack(Copper, 3)), Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.INSTRUMENTUM, 1))),
- Bronze ( 300, TextureSet.SET_METALLIC , 6.0F, 192, 2, 1|2 |64|128 , 255, 128, 0, 0, "Bronze" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeOrange , 2, Arrays.asList(new MaterialStack(Tin, 1), new MaterialStack(Copper, 3)), Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.INSTRUMENTUM, 1))),
- BrownLimonite ( 930, TextureSet.SET_METALLIC , 1.0F, 0, 1, 1 |8 , 200, 100, 0, 0, "Brown Limonite" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeBrown , 2, Arrays.asList(new MaterialStack(Iron, 1), new MaterialStack(Hydrogen, 1), new MaterialStack(Oxygen, 2))), // FeO(OH)
- Calcite ( 823, TextureSet.SET_DULL , 1.0F, 0, 1, 1 |8 , 250, 230, 220, 0, "Calcite" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeOrange , 1, Arrays.asList(new MaterialStack(Calcium, 1), new MaterialStack(Carbon, 1), new MaterialStack(Oxygen, 3))),
- Cassiterite ( 824, TextureSet.SET_METALLIC , 1.0F, 0, 1, 8 , 220, 220, 220, 0, "Cassiterite" , 0, 0, -1, 0, F, F, 4, 3, 1, Dyes.dyeWhite , 1, Arrays.asList(new MaterialStack(Tin, 1), new MaterialStack(Oxygen, 2))),
- CassiteriteSand ( 937, TextureSet.SET_SAND , 1.0F, 0, 1, 8 , 220, 220, 220, 0, "Cassiterite Sand" , 0, 0, -1, 0, F, F, 4, 3, 1, Dyes.dyeWhite , 1, Arrays.asList(new MaterialStack(Tin, 1), new MaterialStack(Oxygen, 2))),
- Celestine ( 913, TextureSet.SET_DULL , 1.0F, 0, 1, 1 |8 , 200, 205, 240, 0, "Celestine" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeLightGray , 1, Arrays.asList(new MaterialStack(Strontium, 1), new MaterialStack(Sulfur, 1), new MaterialStack(Oxygen, 4))),
- Chalcopyrite ( 855, TextureSet.SET_DULL , 1.0F, 0, 1, 1 |8 , 160, 120, 40, 0, "Chalcopyrite" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeYellow , 1, Arrays.asList(new MaterialStack(Copper, 1), new MaterialStack(Iron, 1), new MaterialStack(Sulfur, 2))),
- Chalk ( 856, TextureSet.SET_FINE , 1.0F, 0, 2, 1 , 250, 250, 250, 0, "Chalk" , 0, 0, -1, 0, F, F, 0, 1, 1, Dyes.dyeWhite , 1, Arrays.asList(new MaterialStack(Calcium, 1), new MaterialStack(Carbon, 1), new MaterialStack(Oxygen, 3))),
- Charcoal ( 536, TextureSet.SET_FINE , 1.0F, 0, 1, 1 |4 , 100, 70, 70, 0, "Charcoal" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeBlack , 1, Arrays.asList(new MaterialStack(Carbon, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.POTENTIA, 2), new TC_AspectStack(TC_Aspects.IGNIS, 2))),
- Chromite ( 825, TextureSet.SET_METALLIC , 1.0F, 0, 1, 1 |8 , 35, 20, 15, 0, "Chromite" , 0, 0, 1700, 1700, T, F, 6, 1, 1, Dyes.dyePink , 1, Arrays.asList(new MaterialStack(Iron, 1), new MaterialStack(Chrome, 2), new MaterialStack(Oxygen, 4))),
- ChromiumDioxide ( 361, TextureSet.SET_DULL , 11.0F, 256, 3, 1|2 , 230, 200, 200, 0, "Chromium Dioxide" , 0, 0, 650, 650, F, F, 5, 3, 1, Dyes.dyePink , 1, Arrays.asList(new MaterialStack(Chrome, 1), new MaterialStack(Oxygen, 2)), Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.MACHINA, 1))),
- Cinnabar ( 826, TextureSet.SET_ROUGH , 1.0F, 0, 1, 1 |8 , 150, 0, 0, 0, "Cinnabar" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes.dyeBrown , 2, Arrays.asList(new MaterialStack(Mercury, 1), new MaterialStack(Sulfur, 1))),
- Clay ( 805, TextureSet.SET_ROUGH , 1.0F, 0, 1, 1 , 200, 200, 220, 0, "Clay" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes.dyeLightBlue , 1, Arrays.asList(new MaterialStack(Sodium, 2), new MaterialStack(Lithium, 1), new MaterialStack(Aluminium, 2), new MaterialStack(Silicon, 2))),
- Coal ( 535, TextureSet.SET_ROUGH , 1.0F, 0, 1, 1 |4|8 , 70, 70, 70, 0, "Coal" , 0, 0, -1, 0, F, F, 2, 2, 1, Dyes.dyeBlack , 1, Arrays.asList(new MaterialStack(Carbon, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.POTENTIA, 2), new TC_AspectStack(TC_Aspects.IGNIS, 2))),
- Cobaltite ( 827, TextureSet.SET_METALLIC , 1.0F, 0, 1, 1 |8 , 80, 80, 250, 0, "Cobaltite" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes.dyeBlue , 1, Arrays.asList(new MaterialStack(Cobalt, 1), new MaterialStack(Arsenic, 1), new MaterialStack(Sulfur, 1))),
- Cooperite ( 828, TextureSet.SET_METALLIC , 1.0F, 0, 1, 1 |8 , 255, 255, 200, 0, "Sheldonite" , 0, 0, -1, 0, F, F, 5, 1, 1, Dyes.dyeYellow , 2, Arrays.asList(new MaterialStack(Platinum, 3), new MaterialStack(Nickel, 1), new MaterialStack(Sulfur, 1), new MaterialStack(Palladium, 1))),
- Cupronickel ( 310, TextureSet.SET_METALLIC , 6.0F, 64, 1, 1|2 |64 , 227, 150, 128, 0, "Cupronickel" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeOrange , 2, Arrays.asList(new MaterialStack(Copper, 1), new MaterialStack(Nickel, 1))),
- DarkAsh ( 816, TextureSet.SET_DULL , 1.0F, 0, 1, 1 , 50, 50, 50, 0, "Dark Ashes" , 0, 0, -1, 0, F, F, 1, 2, 1, Dyes.dyeGray , 1, Arrays.asList(new MaterialStack(Carbon, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.IGNIS, 1), new TC_AspectStack(TC_Aspects.PERDITIO, 1))),
- DeepIron ( 829, TextureSet.SET_METALLIC , 6.0F, 384, 2, 1|2 |8 |64 , 150, 140, 140, 0, "Deep Iron" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes.dyePink , 2, Arrays.asList(new MaterialStack(Iron, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.MAGNETO, 1))),
- Diamond ( 500, TextureSet.SET_DIAMOND , 8.0F, 1280, 3, 1 |4|8 |64|128 , 200, 255, 255, 127, "Diamond" , 0, 0, -1, 0, F, T, 5, 64, 1, Dyes.dyeWhite , 1, Arrays.asList(new MaterialStack(Carbon, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.VITREUS, 3), new TC_AspectStack(TC_Aspects.LUCRUM, 4))),
- Electrum ( 303, TextureSet.SET_SHINY , 12.0F, 64, 2, 1|2 |8 |64|128 , 255, 255, 100, 0, "Electrum" , 0, 0, -1, 0, F, F, 4, 1, 1, Dyes.dyeYellow , 2, Arrays.asList(new MaterialStack(Silver, 1), new MaterialStack(Gold, 1))),
- Emerald ( 501, TextureSet.SET_EMERALD , 7.0F, 256, 2, 1 |4|8 |64 , 80, 255, 80, 127, "Emerald" , 0, 0, -1, 0, F, T, 5, 1, 1, Dyes.dyeGreen , 1, Arrays.asList(new MaterialStack(Beryllium, 3), new MaterialStack(Aluminium, 2), new MaterialStack(Silicon, 6), new MaterialStack(Oxygen, 18)), Arrays.asList(new TC_AspectStack(TC_Aspects.VITREUS, 3), new TC_AspectStack(TC_Aspects.LUCRUM, 5))),
- FreshWater ( -1, TextureSet.SET_FLUID , 1.0F, 0, 0, 16 , 0, 0, 255, 0, "Fresh Water" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeBlue , 0, Arrays.asList(new MaterialStack(Hydrogen, 2), new MaterialStack(Oxygen, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.AQUA, 2))),
- Galena ( 830, TextureSet.SET_DULL , 1.0F, 0, 3, 1 |8 , 100, 60, 100, 0, "Galena" , 0, 0, -1, 0, F, F, 4, 1, 1, Dyes.dyePurple , 1, Arrays.asList(new MaterialStack(Lead, 3), new MaterialStack(Silver, 3), new MaterialStack(Sulfur, 2))),
- Garnierite ( 906, TextureSet.SET_METALLIC , 1.0F, 0, 3, 1 |8 , 50, 200, 70, 0, "Garnierite" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeLightBlue , 1, Arrays.asList(new MaterialStack(Nickel, 1), new MaterialStack(Oxygen, 1))),
- Glyceryl ( 714, TextureSet.SET_FLUID , 1.0F, 0, 1, 16 , 0, 150, 150, 0, "Glyceryl Trinitrate" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeCyan , 1, Arrays.asList(new MaterialStack(Carbon, 3), new MaterialStack(Hydrogen, 5), new MaterialStack(Nitrogen, 3), new MaterialStack(Oxygen, 9))),
- GreenSapphire ( 504, TextureSet.SET_GEM_HORIZONTAL , 7.0F, 256, 2, 1 |4|8 |64 , 100, 200, 130, 127, "Green Sapphire" , 0, 0, -1, 0, F, T, 5, 1, 1, Dyes.dyeCyan , 1, Arrays.asList(new MaterialStack(Aluminium, 2), new MaterialStack(Oxygen, 3)), Arrays.asList(new TC_AspectStack(TC_Aspects.LUCRUM, 5), new TC_AspectStack(TC_Aspects.VITREUS, 3))),
- Grossular ( 831, TextureSet.SET_ROUGH , 1.0F, 0, 1, 1 |8 , 200, 100, 0, 0, "Grossular" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes.dyeOrange , 1, Arrays.asList(new MaterialStack(Calcium, 3), new MaterialStack(Aluminium, 2), new MaterialStack(Silicon, 3), new MaterialStack(Oxygen, 12))),
- HolyWater ( 729, TextureSet.SET_FLUID , 1.0F, 0, 0, 16 , 0, 0, 255, 0, "Holy Water" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeBlue , 0, Arrays.asList(new MaterialStack(Hydrogen, 2), new MaterialStack(Oxygen, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.AQUA, 2), new TC_AspectStack(TC_Aspects.AURAM, 1))),
- Ice ( 702, TextureSet.SET_SHINY , 1.0F, 0, 0, 1| 16 , 200, 200, 255, 0, "Ice" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeBlue , 0, Arrays.asList(new MaterialStack(Hydrogen, 2), new MaterialStack(Oxygen, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.GELUM, 2))),
- Ilmenite ( 918, TextureSet.SET_METALLIC , 1.0F, 0, 3, 1 |8 , 70, 55, 50, 0, "Ilmenite" , 0, 0, -1, 0, F, F, 1, 2, 1, Dyes.dyePurple , 1, Arrays.asList(new MaterialStack(Iron, 1), new MaterialStack(Titanium, 1), new MaterialStack(Oxygen, 3))),
- Invar ( 302, TextureSet.SET_METALLIC , 6.0F, 256, 2, 1|2 |64|128 , 180, 180, 120, 0, "Invar" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeBrown , 2, Arrays.asList(new MaterialStack(Iron, 2), new MaterialStack(Nickel, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.GELUM, 1))),
- IronCompressed ( -1, TextureSet.SET_METALLIC , 7.0F, 96, 1, 1|2 |64|128 , 128, 128, 128, 0, "Compressed Iron" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeGray , 2, Arrays.asList(new MaterialStack(Iron, 1))),
- Kanthal ( 312, TextureSet.SET_METALLIC , 6.0F, 64, 2, 1|2 |64 , 194, 210, 223, 0, "Kanthal" , 0, 0, 1800, 1800, T, F, 1, 1, 1, Dyes.dyeYellow , 2, Arrays.asList(new MaterialStack(Iron, 1), new MaterialStack(Aluminium, 1), new MaterialStack(Chrome, 1))),
- Lazurite ( 524, TextureSet.SET_LAPIS , 1.0F, 0, 1, 1 |4|8 , 100, 120, 255, 0, "Lazurite" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes.dyeCyan , 1, Arrays.asList(new MaterialStack(Aluminium, 6), new MaterialStack(Silicon, 6), new MaterialStack(Calcium, 8), new MaterialStack(Sodium, 8))),
- Magnalium ( 313, TextureSet.SET_DULL , 6.0F, 256, 2, 1|2 |64|128 , 200, 190, 255, 0, "Magnalium" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeLightBlue , 2, Arrays.asList(new MaterialStack(Magnesium, 1), new MaterialStack(Aluminium, 2))),
- Magnesite ( 908, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1 |8 , 250, 250, 180, 0, "Magnesite" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyePink , 1, Arrays.asList(new MaterialStack(Magnesium, 1), new MaterialStack(Carbon, 1), new MaterialStack(Oxygen, 3))),
- Magnetite ( 870, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1 |8 , 30, 30, 30, 0, "Magnetite" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeGray , 1, Arrays.asList(new MaterialStack(Iron, 3), new MaterialStack(Oxygen, 4)), Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.MAGNETO, 1))),
- Methane ( 715, TextureSet.SET_FLUID , 1.0F, 0, 1, 16 , 255, 255, 255, 0, "Methane" , 1, 45, -1, 0, F, F, 3, 1, 1, Dyes.dyeMagenta , 1, Arrays.asList(new MaterialStack(Carbon, 1), new MaterialStack(Hydrogen, 4))),
- Molybdenite ( 942, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1 |8 , 25, 25, 25, 0, "Molybdenite" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeBlue , 1, Arrays.asList(new MaterialStack(Molybdenum, 1), new MaterialStack(Sulfur, 2))), // MoS2 (also source of Re)
- Nichrome ( 311, TextureSet.SET_METALLIC , 6.0F, 64, 2, 1|2 |64 , 205, 206, 246, 0, "Nichrome" , 0, 0, 2700, 2700, T, F, 1, 1, 1, Dyes.dyeRed , 2, Arrays.asList(new MaterialStack(Nickel, 4), new MaterialStack(Chrome, 1))),
- NiobiumNitride ( 359, TextureSet.SET_DULL , 1.0F, 0, 2, 1|2 , 29, 41, 29, 0, "Niobium Nitride" , 0, 0, 2573, 2573, T, F, 1, 1, 1, Dyes.dyeBlack , 1, Arrays.asList(new MaterialStack(Niobium, 1), new MaterialStack(Nitrogen, 1))), // Anti-Reflective Material
- NiobiumTitanium ( 360, TextureSet.SET_DULL , 1.0F, 0, 2, 1|2 , 29, 29, 41, 0, "Niobium-Titanium" , 0, 0, 2800, 2800, T, F, 1, 1, 1, Dyes.dyeBlack , 2, Arrays.asList(new MaterialStack(Niobium, 1), new MaterialStack(Titanium, 1))),
- NitroCarbon ( 716, TextureSet.SET_FLUID , 1.0F, 0, 1, 16 , 0, 75, 100, 0, "Nitro-Carbon" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeCyan , 1, Arrays.asList(new MaterialStack(Nitrogen, 1), new MaterialStack(Carbon, 1))),
- NitrogenDioxide ( 717, TextureSet.SET_FLUID , 1.0F, 0, 1, 16 , 100, 175, 255, 0, "Nitrogen Dioxide" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeCyan , 1, Arrays.asList(new MaterialStack(Nitrogen, 1), new MaterialStack(Oxygen, 2))),
- Obsidian ( 804, TextureSet.SET_DULL , 1.0F, 0, 3, 1 , 80, 50, 100, 0, "Obsidian" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeBlack , 1, Arrays.asList(new MaterialStack(Magnesium, 1), new MaterialStack(Iron, 1), new MaterialStack(Silicon, 2), new MaterialStack(Oxygen, 8))),
- Phosphate ( 833, TextureSet.SET_DULL , 1.0F, 0, 1, 1 |8|16 , 255, 255, 0, 0, "Phosphate" , 0, 0, -1, 0, F, F, 2, 1, 1, Dyes.dyeYellow , 1, Arrays.asList(new MaterialStack(Phosphor, 1), new MaterialStack(Oxygen, 4))),
- PigIron ( 307, TextureSet.SET_METALLIC , 6.0F, 384, 2, 1|2 |8 |64 , 200, 180, 180, 0, "Pig Iron" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes.dyePink , 2, Arrays.asList(new MaterialStack(Iron, 1))),
- Plastic ( 874, TextureSet.SET_DULL , 3.0F, 32, 1, 1|2 |64|128 , 200, 200, 200, 0, "Plastic" , 0, 0, 400, 0, F, F, 1, 1, 1, Dyes.dyeWhite , 0, Arrays.asList(new MaterialStack(Carbon, 1), new MaterialStack(Hydrogen, 2)), Arrays.asList(new TC_AspectStack(TC_Aspects.MOTUS, 2))),
- Powellite ( 883, TextureSet.SET_DULL , 1.0F, 0, 2, 1 |8 , 255, 255, 0, 0, "Powellite" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeYellow , 2, Arrays.asList(new MaterialStack(Calcium, 1), new MaterialStack(Molybdenum, 1), new MaterialStack(Oxygen, 4))),
- Pumice ( 926, TextureSet.SET_DULL , 1.0F, 0, 2, 1 |8 , 230, 185, 185, 0, "Pumice" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeGray , 2, Arrays.asList(new MaterialStack(Stone, 1))),
- Pyrite ( 834, TextureSet.SET_ROUGH , 1.0F, 0, 1, 1 |8 , 150, 120, 40, 0, "Pyrite" , 0, 0, -1, 0, F, F, 2, 1, 1, Dyes.dyeOrange , 1, Arrays.asList(new MaterialStack(Iron, 1), new MaterialStack(Sulfur, 2))),
- Pyrolusite ( 943, TextureSet.SET_DULL , 1.0F, 0, 2, 1 |8 , 150, 150, 170, 0, "Pyrolusite" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeLightGray , 1, Arrays.asList(new MaterialStack(Manganese, 1), new MaterialStack(Oxygen, 2))),
- Pyrope ( 835, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1 |8 , 120, 50, 100, 0, "Pyrope" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes.dyePurple , 1, Arrays.asList(new MaterialStack(Aluminium, 2), new MaterialStack(Magnesium, 3), new MaterialStack(Silicon, 3), new MaterialStack(Oxygen, 12))),
- RockSalt ( 944, TextureSet.SET_FINE , 1.0F, 0, 1, 1 |8 , 240, 200, 200, 0, "Rock Salt" , 0, 0, -1, 0, F, F, 2, 1, 1, Dyes.dyeWhite , 1, Arrays.asList(new MaterialStack(Potassium, 1), new MaterialStack(Chlorine, 1))),
- Rubber ( 880, TextureSet.SET_SHINY , 1.5F, 16, 0, 1|2 |64|128 , 0, 0, 0, 0, "Rubber" , 0, 0, 400, 0, F, F, 1, 1, 1, Dyes.dyeBlack , 0, Arrays.asList(new MaterialStack(Carbon, 5), new MaterialStack(Hydrogen, 8)), Arrays.asList(new TC_AspectStack(TC_Aspects.MOTUS, 2))),
- Ruby ( 502, TextureSet.SET_RUBY , 7.0F, 256, 2, 1 |4|8 |64 , 255, 100, 100, 127, "Ruby" , 0, 0, -1, 0, F, T, 5, 1, 1, Dyes.dyeRed , 1, Arrays.asList(new MaterialStack(Chrome, 1), new MaterialStack(Aluminium, 2), new MaterialStack(Oxygen, 3)), Arrays.asList(new TC_AspectStack(TC_Aspects.LUCRUM, 6), new TC_AspectStack(TC_Aspects.VITREUS, 4))),
- Salt ( 817, TextureSet.SET_FINE , 1.0F, 0, 1, 1 |8 , 250, 250, 250, 0, "Salt" , 0, 0, -1, 0, F, F, 2, 1, 1, Dyes.dyeWhite , 1, Arrays.asList(new MaterialStack(Sodium, 1), new MaterialStack(Chlorine, 1))),
- Saltpeter ( 836, TextureSet.SET_FINE , 1.0F, 0, 1, 1 |8 , 230, 230, 230, 0, "Saltpeter" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes.dyeWhite , 1, Arrays.asList(new MaterialStack(Potassium, 1), new MaterialStack(Nitrogen, 1), new MaterialStack(Oxygen, 3))),
- SaltWater ( -1, TextureSet.SET_FLUID , 1.0F, 0, 0, 16 , 0, 0, 255, 0, "Salt Water" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeBlue , 0, Arrays.asList(new MaterialStack(Hydrogen, 2), new MaterialStack(Oxygen, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.AQUA, 2))),
- Sapphire ( 503, TextureSet.SET_GEM_VERTICAL , 7.0F, 256, 2, 1 |4|8 |64 , 100, 100, 200, 127, "Sapphire" , 0, 0, -1, 0, F, T, 5, 1, 1, Dyes.dyeBlue , 1, Arrays.asList(new MaterialStack(Aluminium, 2), new MaterialStack(Oxygen, 3)), Arrays.asList(new TC_AspectStack(TC_Aspects.LUCRUM, 5), new TC_AspectStack(TC_Aspects.VITREUS, 3))),
- Scheelite ( 910, TextureSet.SET_DULL , 1.0F, 0, 3, 1 |8 , 200, 140, 20, 0, "Scheelite" , 0, 0, 2500, 2500, F, F, 4, 1, 1, Dyes.dyeBlack , 1, Arrays.asList(new MaterialStack(Tungsten, 1), new MaterialStack(Calcium, 2), new MaterialStack(Oxygen, 4))),
- SiliconDioxide ( 837, TextureSet.SET_QUARTZ , 1.0F, 0, 1, 1 |16 , 200, 200, 200, 0, "Silicon Dioxide" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeLightGray , 1, Arrays.asList(new MaterialStack(Silicon, 1), new MaterialStack(Oxygen, 2))),
- Snow ( 728, TextureSet.SET_FINE , 1.0F, 0, 0, 1| 16 , 250, 250, 250, 0, "Snow" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeWhite , 0, Arrays.asList(new MaterialStack(Hydrogen, 2), new MaterialStack(Oxygen, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.GELUM, 1))),
- Sodalite ( 525, TextureSet.SET_LAPIS , 1.0F, 0, 1, 1 |4|8 , 20, 20, 255, 0, "Sodalite" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes.dyeBlue , 1, Arrays.asList(new MaterialStack(Aluminium, 3), new MaterialStack(Silicon, 3), new MaterialStack(Sodium, 4), new MaterialStack(Chlorine, 1))),
- SodiumPersulfate ( 718, TextureSet.SET_FLUID , 1.0F, 0, 2, 16 , 255, 255, 255, 0, "Sodium Persulfate" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeOrange , 1, Arrays.asList(new MaterialStack(Sodium, 1), new MaterialStack(Sulfur, 1), new MaterialStack(Oxygen, 4))),
- SodiumSulfide ( 719, TextureSet.SET_FLUID , 1.0F, 0, 2, 16 , 255, 255, 255, 0, "Sodium Sulfide" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeOrange , 1, Arrays.asList(new MaterialStack(Sodium, 1), new MaterialStack(Sulfur, 1))),
- SolderingAlloy ( 314, TextureSet.SET_DULL , 1.0F, 0, 1, 1|2 , 220, 220, 230, 0, "Soldering Alloy" , 0, 0, 400, 400, F, F, 1, 1, 1, Dyes.dyeWhite , 2, Arrays.asList(new MaterialStack(Tin, 9), new MaterialStack(Antimony, 1))),
- Spessartine ( 838, TextureSet.SET_DULL , 1.0F, 0, 2, 1 |8 , 255, 100, 100, 0, "Spessartine" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes.dyeRed , 1, Arrays.asList(new MaterialStack(Aluminium, 2), new MaterialStack(Manganese, 3), new MaterialStack(Silicon, 3), new MaterialStack(Oxygen, 12))),
- Sphalerite ( 839, TextureSet.SET_DULL , 1.0F, 0, 1, 1 |8 , 255, 255, 255, 0, "Sphalerite" , 0, 0, -1, 0, F, F, 2, 1, 1, Dyes.dyeYellow , 1, Arrays.asList(new MaterialStack(Zinc, 1), new MaterialStack(Sulfur, 1))),
- StainlessSteel ( 306, TextureSet.SET_SHINY , 7.0F, 480, 2, 1|2 |64|128 , 200, 200, 220, 0, "Stainless Steel" , 0, 0, -1, 1700, T, F, 1, 1, 1, Dyes.dyeWhite , 1, Arrays.asList(new MaterialStack(Iron, 6), new MaterialStack(Chrome, 1), new MaterialStack(Manganese, 1), new MaterialStack(Nickel, 1))),
- Steel ( 305, TextureSet.SET_METALLIC , 6.0F, 512, 2, 1|2 |64|128 , 128, 128, 128, 0, "Steel" , 0, 0, 1811, 1000, T, F, 4, 51, 50, Dyes.dyeGray , 1, Arrays.asList(new MaterialStack(Iron, 50), new MaterialStack(Carbon, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.ORDO, 1))),
- Stibnite ( 945, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1 |8 , 70, 70, 70, 0, "Stibnite" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeWhite , 2, Arrays.asList(new MaterialStack(Antimony, 2), new MaterialStack(Sulfur, 3))),
- SulfuricAcid ( 720, TextureSet.SET_FLUID , 1.0F, 0, 2, 16 , 255, 128, 0, 0, "Sulfuric Acid" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeOrange , 1, Arrays.asList(new MaterialStack(Hydrogen, 2), new MaterialStack(Sulfur, 1), new MaterialStack(Oxygen, 4))),
- Tanzanite ( 508, TextureSet.SET_GEM_VERTICAL , 7.0F, 256, 2, 1 |4|8 |64 , 64, 0, 200, 127, "Tanzanite" , 0, 0, -1, 0, F, T, 5, 1, 1, Dyes.dyePurple , 1, Arrays.asList(new MaterialStack(Calcium, 2), new MaterialStack(Aluminium, 3), new MaterialStack(Silicon, 3), new MaterialStack(Hydrogen, 1), new MaterialStack(Oxygen, 13)), Arrays.asList(new TC_AspectStack(TC_Aspects.LUCRUM, 5), new TC_AspectStack(TC_Aspects.VITREUS, 3))),
- Tetrahedrite ( 840, TextureSet.SET_DULL , 1.0F, 0, 2, 1 |8 , 200, 32, 0, 0, "Tetrahedrite" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes.dyeRed , 2, Arrays.asList(new MaterialStack(Copper, 3), new MaterialStack(Antimony, 1), new MaterialStack(Sulfur, 3), new MaterialStack(Iron, 1))), //Cu3SbS3 + x(Fe,Zn)6Sb2S9
- TinAlloy ( 363, TextureSet.SET_METALLIC , 6.5F, 96, 2, 1|2 |64|128 , 200, 200, 200, 0, "Tin Alloy" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeWhite , 2, Arrays.asList(new MaterialStack(Tin, 1), new MaterialStack(Iron, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.INSTRUMENTUM, 1))),
- Topaz ( 507, TextureSet.SET_GEM_HORIZONTAL , 7.0F, 256, 3, 1 |4|8 |64 , 255, 128, 0, 127, "Topaz" , 0, 0, -1, 0, F, T, 5, 1, 1, Dyes.dyeOrange , 1, Arrays.asList(new MaterialStack(Aluminium, 2), new MaterialStack(Silicon, 1), new MaterialStack(Fluorine, 2), new MaterialStack(Hydrogen, 2), new MaterialStack(Oxygen, 6)), Arrays.asList(new TC_AspectStack(TC_Aspects.LUCRUM, 6), new TC_AspectStack(TC_Aspects.VITREUS, 4))),
- Tungstate ( 841, TextureSet.SET_DULL , 1.0F, 0, 3, 1 |8 , 55, 50, 35, 0, "Tungstate" , 0, 0, 2500, 2500, T, F, 4, 1, 1, Dyes.dyeBlack , 1, Arrays.asList(new MaterialStack(Tungsten, 1), new MaterialStack(Lithium, 2), new MaterialStack(Oxygen, 4))),
- Ultimet ( 344, TextureSet.SET_SHINY , 6.0F, 512, 3, 1|2 |64|128 , 180, 180, 230, 0, "Ultimet" , 0, 0, 2700, 2700, T, F, 1, 1, 1, Dyes.dyeLightBlue , 1, Arrays.asList(new MaterialStack(Cobalt, 5), new MaterialStack(Chrome, 2), new MaterialStack(Nickel, 1), new MaterialStack(Molybdenum, 1))), // 54% Cobalt, 26% Chromium, 9% Nickel, 5% Molybdenum, 3% Iron, 2% Tungsten, 0.8% Manganese, 0.3% Silicon, 0.08% Nitrogen and 0.06% Carbon
- Uraninite ( 922, TextureSet.SET_METALLIC , 1.0F, 0, 3, 1 |8 , 35, 35, 35, 0, "Uraninite" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeLime , 2, Arrays.asList(new MaterialStack(Uranium, 1), new MaterialStack(Oxygen, 2))),
- Uvarovite ( 842, TextureSet.SET_DIAMOND , 1.0F, 0, 2, 1 |8 , 180, 255, 180, 0, "Uvarovite" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes.dyeGreen , 1, Arrays.asList(new MaterialStack(Calcium, 3), new MaterialStack(Chrome, 2), new MaterialStack(Silicon, 3), new MaterialStack(Oxygen, 12))),
- VanadiumGallium ( 357, TextureSet.SET_SHINY , 1.0F, 0, 2, 1|2 , 128, 128, 140, 0, "Vanadium-Gallium" , 0, 0, 3000, 3000, T, F, 1, 1, 1, Dyes.dyeGray , 2, Arrays.asList(new MaterialStack(Vanadium, 3), new MaterialStack(Gallium, 1))),
- Water ( 701, TextureSet.SET_FLUID , 1.0F, 0, 0, 16 , 0, 0, 255, 0, "Water" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeBlue , 0, Arrays.asList(new MaterialStack(Hydrogen, 2), new MaterialStack(Oxygen, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.AQUA, 2))),
- Wood ( 809, TextureSet.SET_WOOD , 2.0F, 16, 0, 1|2 |64|128 , 100, 50, 0, 0, "Wood" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeBrown , 0, Arrays.asList(new MaterialStack(Carbon, 1), new MaterialStack(Oxygen, 1), new MaterialStack(Hydrogen, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.ARBOR, 2))),
- WroughtIron ( 304, TextureSet.SET_METALLIC , 6.0F, 384, 2, 1|2 |64|128 , 200, 180, 180, 0, "Wrought Iron" , 0, 0, 1811, 0, F, F, 3, 1, 1, Dyes.dyeLightGray , 2, Arrays.asList(new MaterialStack(Iron, 1))),
- Wulfenite ( 882, TextureSet.SET_DULL , 1.0F, 0, 3, 1 |8 , 255, 128, 0, 0, "Wulfenite" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeOrange , 2, Arrays.asList(new MaterialStack(Lead, 1), new MaterialStack(Molybdenum, 1), new MaterialStack(Oxygen, 4))),
- YellowLimonite ( 931, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1 |8 , 200, 200, 0, 0, "Yellow Limonite" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeYellow , 2, Arrays.asList(new MaterialStack(Iron, 1), new MaterialStack(Hydrogen, 1), new MaterialStack(Oxygen, 2))), // FeO(OH) + a bit Ni and Co
- YttriumBariumCuprate( 358, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1|2 , 80, 64, 70, 0, "Yttrium Barium Cuprate" , 0, 0, 1200, 1200, T, F, 1, 1, 1, Dyes.dyeGray , 0, Arrays.asList(new MaterialStack(Yttrium, 1), new MaterialStack(Barium, 2), new MaterialStack(Copper, 3), new MaterialStack(Oxygen, 7))),
-
- /**
- * Second Degree Compounds
- */
- WoodSealed ( 889, TextureSet.SET_WOOD , 3.0F, 24, 0, 1|2 |64|128 , 80, 40, 0, 0, "Sealed Wood" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeBrown , 0, Arrays.asList(new MaterialStack(Wood, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.ARBOR, 2), new TC_AspectStack(TC_Aspects.FABRICO, 1))),
- LiveRoot ( 832, TextureSet.SET_WOOD , 1.0F, 0, 1, 1 , 220, 200, 0, 0, "Liveroot" , 5, 16, -1, 0, F, F, 2, 4, 3, Dyes.dyeBrown , 2, Arrays.asList(new MaterialStack(Wood, 3), new MaterialStack(Magic, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.ARBOR, 2), new TC_AspectStack(TC_Aspects.VICTUS, 2), new TC_AspectStack(TC_Aspects.PRAECANTIO, 1))),
- IronWood ( 338, TextureSet.SET_WOOD , 6.0F, 384, 2, 1|2 |64|128 , 150, 140, 110, 0, "Ironwood" , 5, 8, -1, 0, F, F, 2, 19, 18, Dyes.dyeBrown , 2, Arrays.asList(new MaterialStack(Iron, 9), new MaterialStack(LiveRoot, 9), new MaterialStack(Gold, 1))),
- Glass ( 890, TextureSet.SET_GLASS , 1.0F, 4, 0, 1 |4 , 250, 250, 250, 220, "Glass" , 0, 0, 1500, 0, F, T, 1, 1, 1, Dyes.dyeWhite , 2, Arrays.asList(new MaterialStack(SiliconDioxide, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.VITREUS, 2))),
- Perlite ( 925, TextureSet.SET_DULL , 1.0F, 0, 1, 1 |8 , 30, 20, 30, 0, "Perlite" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeBlack , 2, Arrays.asList(new MaterialStack(Obsidian, 2), new MaterialStack(Water, 1))),
- Borax ( 941, TextureSet.SET_FINE , 1.0F, 0, 1, 1 |8 , 250, 250, 250, 0, "Borax" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeWhite , 1, Arrays.asList(new MaterialStack(Sodium, 2), new MaterialStack(Boron, 4), new MaterialStack(Water, 10), new MaterialStack(Oxygen, 7))),
- Lignite ( 538, TextureSet.SET_LIGNITE , 1.0F, 0, 0, 1 |4|8 , 100, 70, 70, 0, "Lignite Coal" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeBlack , 1, Arrays.asList(new MaterialStack(Carbon, 2), new MaterialStack(Water, 4), new MaterialStack(DarkAsh, 1))),
- Olivine ( 505, TextureSet.SET_RUBY , 7.0F, 256, 2, 1 |4|8 |64 , 150, 255, 150, 127, "Olivine" , 0, 0, -1, 0, F, T, 5, 1, 1, Dyes.dyeLime , 1, Arrays.asList(new MaterialStack(Magnesium, 2), new MaterialStack(Iron, 1), new MaterialStack(SiliconDioxide, 2)), Arrays.asList(new TC_AspectStack(TC_Aspects.LUCRUM, 4), new TC_AspectStack(TC_Aspects.VITREUS, 2))),
- Opal ( 510, TextureSet.SET_OPAL , 7.0F, 256, 2, 1 |4|8 |64 , 0, 0, 255, 0, "Opal" , 0, 0, -1, 0, F, T, 3, 1, 1, Dyes.dyeBlue , 1, Arrays.asList(new MaterialStack(SiliconDioxide, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.LUCRUM, 5), new TC_AspectStack(TC_Aspects.VITREUS, 3))),
- Amethyst ( 509, TextureSet.SET_FLINT , 7.0F, 256, 3, 1 |4|8 |64 , 210, 50, 210, 127, "Amethyst" , 0, 0, -1, 0, F, T, 3, 1, 1, Dyes.dyePink , 1, Arrays.asList(new MaterialStack(SiliconDioxide, 4), new MaterialStack(Iron, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.LUCRUM, 6), new TC_AspectStack(TC_Aspects.VITREUS, 4))),
- Redstone ( 810, TextureSet.SET_ROUGH , 1.0F, 0, 2, 1 |8 , 200, 0, 0, 0, "Redstone" , 0, 0, 500, 0, F, F, 3, 1, 1, Dyes.dyeRed , 2, Arrays.asList(new MaterialStack(Silicon, 1), new MaterialStack(Pyrite, 5), new MaterialStack(Ruby, 1), new MaterialStack(Mercury, 3)), Arrays.asList(new TC_AspectStack(TC_Aspects.MACHINA, 1), new TC_AspectStack(TC_Aspects.POTENTIA, 2))),
- Lapis ( 526, TextureSet.SET_LAPIS , 1.0F, 0, 1, 1 |4|8 , 70, 70, 220, 0, "Lapis" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes.dyeBlue , 2, Arrays.asList(new MaterialStack(Lazurite, 12), new MaterialStack(Sodalite, 2), new MaterialStack(Pyrite, 1), new MaterialStack(Calcite, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.SENSUS, 1))),
- Blaze ( 801, TextureSet.SET_POWDER , 2.0F, 16, 1, 1 |64 , 255, 200, 0, 0, "Blaze" , 0, 0, 6400, 0, F, F, 2, 3, 2, Dyes.dyeYellow , 2, Arrays.asList(new MaterialStack(DarkAsh, 1), new MaterialStack(Sulfur, 1), new MaterialStack(Magic, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.PRAECANTIO, 2), new TC_AspectStack(TC_Aspects.IGNIS, 4))),
- EnderPearl ( 532, TextureSet.SET_SHINY , 1.0F, 16, 1, 1 |4 , 108, 220, 200, 0, "Enderpearl" , 0, 0, -1, 0, F, F, 1, 16, 10, Dyes.dyeGreen , 1, Arrays.asList(new MaterialStack(Beryllium, 1), new MaterialStack(Potassium, 4), new MaterialStack(Nitrogen, 5), new MaterialStack(Magic, 6)), Arrays.asList(new TC_AspectStack(TC_Aspects.ALIENIS, 4), new TC_AspectStack(TC_Aspects.ITER, 4), new TC_AspectStack(TC_Aspects.PRAECANTIO, 2))),
- EnderEye ( 533, TextureSet.SET_SHINY , 1.0F, 16, 1, 1 |4 , 160, 250, 230, 0, "Endereye" , 5, 10, -1, 0, F, F, 1, 2, 1, Dyes.dyeGreen , 2, Arrays.asList(new MaterialStack(EnderPearl, 1), new MaterialStack(Blaze, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.SENSUS, 4), new TC_AspectStack(TC_Aspects.ALIENIS, 4), new TC_AspectStack(TC_Aspects.ITER, 4), new TC_AspectStack(TC_Aspects.PRAECANTIO, 3), new TC_AspectStack(TC_Aspects.IGNIS, 2))),
- Flint ( 802, TextureSet.SET_FLINT , 2.5F, 64, 1, 1 |64 , 0, 32, 64, 0, "Flint" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeGray , 2, Arrays.asList(new MaterialStack(SiliconDioxide, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.TERRA, 1), new TC_AspectStack(TC_Aspects.INSTRUMENTUM, 1))),
- Diatomite ( 948, TextureSet.SET_DULL , 1.0F, 0, 1, 1 |8 , 225, 225, 225, 0, "Diatomite" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeGray , 2, Arrays.asList(new MaterialStack(Flint, 8), new MaterialStack(BandedIron, 1), new MaterialStack(Sapphire, 1))),
- VolcanicAsh ( 940, TextureSet.SET_FLINT , 1.0F, 0, 0, 1 , 60, 50, 50, 0, "Volcanic Ashes" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeBlack , 2, Arrays.asList(new MaterialStack(Flint, 6), new MaterialStack(Iron, 1), new MaterialStack(Magnesium, 1))),
- Niter ( 531, TextureSet.SET_FLINT , 1.0F, 0, 1, 1 |4|8 , 255, 200, 200, 0, "Niter" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyePink , 2, Arrays.asList(new MaterialStack(Saltpeter, 1))),
- Pyrotheum ( 843, TextureSet.SET_FIERY , 1.0F, 0, 1, 1 , 255, 128, 0, 0, "Pyrotheum" , 2, 62, -1, 0, F, F, 2, 3, 1, Dyes.dyeYellow , 2, Arrays.asList(new MaterialStack(Coal, 1), new MaterialStack(Redstone, 1), new MaterialStack(Blaze, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.PRAECANTIO, 2), new TC_AspectStack(TC_Aspects.IGNIS, 1))),
- HydratedCoal ( 818, TextureSet.SET_ROUGH , 1.0F, 0, 1, 1 , 70, 70, 100, 0, "Hydrated Coal" , 0, 0, -1, 0, F, F, 1, 9, 8, Dyes.dyeBlack , 2, Arrays.asList(new MaterialStack(Coal, 8), new MaterialStack(Water, 1))),
- Apatite ( 530, TextureSet.SET_DIAMOND , 1.0F, 0, 1, 1 |4|8 , 200, 200, 255, 0, "Apatite" , 0, 0, -1, 0, F, F, 2, 1, 1, Dyes.dyeCyan , 1, Arrays.asList(new MaterialStack(Calcium, 5), new MaterialStack(Phosphate, 3), new MaterialStack(Chlorine, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.MESSIS, 2))),
- Alumite ( -1, TextureSet.SET_METALLIC , 1.5F, 64, 0, 1|2 |64 , 255, 255, 255, 0, "Alumite" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyePink , 2, Arrays.asList(new MaterialStack(Aluminium, 5), new MaterialStack(Iron, 2), new MaterialStack(Obsidian, 2)), Arrays.asList(new TC_AspectStack(TC_Aspects.STRONTIO, 2))),
- Manyullyn ( -1, TextureSet.SET_METALLIC , 1.5F, 64, 0, 1|2 |64 , 255, 255, 255, 0, "Manyullyn" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyePurple , 2, Arrays.asList(new MaterialStack(Cobalt, 1), new MaterialStack(Aredrite, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.STRONTIO, 2))),
- ShadowIron ( 336, TextureSet.SET_METALLIC , 6.0F, 384, 2, 1|2 |8 |64 , 120, 120, 120, 0, "Shadowiron" , 0, 0, -1, 0, F, F, 3, 4, 3, Dyes.dyeBlack , 2, Arrays.asList(new MaterialStack(Iron, 3), new MaterialStack(Magic, 1))),
- ShadowSteel ( 337, TextureSet.SET_METALLIC , 6.0F, 768, 2, 1|2 |64 , 90, 90, 90, 0, "Shadowsteel" , 0, 0, -1, 1700, T, F, 4, 4, 3, Dyes.dyeBlack , 2, Arrays.asList(new MaterialStack(Steel, 3), new MaterialStack(Magic, 1))),
- Steeleaf ( 339, TextureSet.SET_LEAF , 8.0F, 768, 3, 1|2 |64|128 , 50, 127, 50, 0, "Steeleaf" , 5, 24, -1, 0, F, F, 4, 1, 1, Dyes.dyeGreen , 2, Arrays.asList(new MaterialStack(Steel, 1), new MaterialStack(Magic, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.HERBA, 2), new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.PRAECANTIO, 1))),
- Knightmetal ( 362, TextureSet.SET_METALLIC , 8.0F, 1024, 3, 1|2 |64|128 , 210, 240, 200, 0, "Knightmetal" , 5, 24, -1, 0, F, F, 4, 1, 1, Dyes.dyeLime , 2, Arrays.asList(new MaterialStack(Steel, 2), new MaterialStack(Magic, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.LUCRUM, 1), new TC_AspectStack(TC_Aspects.METALLUM, 2))),
- SterlingSilver ( 350, TextureSet.SET_SHINY , 13.0F, 128, 2, 1|2 |64|128 , 250, 220, 225, 0, "Sterling Silver" , 0, 0, -1, 1700, T, F, 4, 1, 1, Dyes.dyeWhite , 2, Arrays.asList(new MaterialStack(Copper, 1), new MaterialStack(Silver, 4))),
- RoseGold ( 351, TextureSet.SET_SHINY , 14.0F, 128, 2, 1|2 |64|128 , 255, 230, 30, 0, "Rose Gold" , 0, 0, -1, 1600, T, F, 4, 1, 1, Dyes.dyeOrange , 2, Arrays.asList(new MaterialStack(Copper, 1), new MaterialStack(Gold, 4))),
- BlackBronze ( 352, TextureSet.SET_DULL , 12.0F, 256, 2, 1|2 |64|128 , 100, 50, 125, 0, "Black Bronze" , 0, 0, -1, 2000, T, F, 4, 1, 1, Dyes.dyePurple , 2, Arrays.asList(new MaterialStack(Gold, 1), new MaterialStack(Silver, 1), new MaterialStack(Copper, 3))),
- BismuthBronze ( 353, TextureSet.SET_DULL , 8.0F, 256, 2, 1|2 |64|128 , 100, 125, 125, 0, "Bismuth Bronze" , 0, 0, -1, 1100, T, F, 4, 1, 1, Dyes.dyeCyan , 2, Arrays.asList(new MaterialStack(Bismuth, 1), new MaterialStack(Zinc, 1), new MaterialStack(Copper, 3))),
- BlackSteel ( 334, TextureSet.SET_METALLIC , 6.5F, 768, 2, 1|2 |64 , 100, 100, 100, 0, "Black Steel" , 0, 0, -1, 1200, T, F, 4, 1, 1, Dyes.dyeBlack , 2, Arrays.asList(new MaterialStack(Nickel, 1), new MaterialStack(BlackBronze, 1), new MaterialStack(Steel, 3))),
- RedSteel ( 348, TextureSet.SET_METALLIC , 7.0F, 896, 2, 1|2 |64 , 140, 100, 100, 0, "Red Steel" , 0, 0, -1, 1300, T, F, 4, 1, 1, Dyes.dyeRed , 2, Arrays.asList(new MaterialStack(SterlingSilver, 1), new MaterialStack(BismuthBronze, 1), new MaterialStack(Steel, 2), new MaterialStack(BlackSteel, 4))),
- BlueSteel ( 349, TextureSet.SET_METALLIC , 7.5F, 1024, 2, 1|2 |64 , 100, 100, 140, 0, "Blue Steel" , 0, 0, -1, 1400, T, F, 4, 1, 1, Dyes.dyeBlue , 2, Arrays.asList(new MaterialStack(RoseGold, 1), new MaterialStack(Brass, 1), new MaterialStack(Steel, 2), new MaterialStack(BlackSteel, 4))),
- DamascusSteel ( 335, TextureSet.SET_METALLIC , 8.0F, 1280, 2, 1|2 |64 , 110, 110, 110, 0, "Damascus Steel" , 0, 0, 2000, 1500, T, F, 4, 1, 1, Dyes.dyeGray , 2, Arrays.asList(new MaterialStack(Steel, 1))),
- TungstenSteel ( 316, TextureSet.SET_METALLIC , 10.0F, 5120, 4, 1|2 |64|128 , 100, 100, 160, 0, "Tungstensteel" , 0, 0, -1, 3000, T, F, 4, 1, 1, Dyes.dyeBlue , 2, Arrays.asList(new MaterialStack(Steel, 1), new MaterialStack(Tungsten, 1))),
- NitroCoalFuel ( -1, TextureSet.SET_FLUID , 1.0F, 0, 2, 16 , 50, 70, 50, 0, "Nitro-Coalfuel" , 0, 48, -1, 0, F, F, 1, 1, 1, Dyes.dyeBlack , 0, Arrays.asList(new MaterialStack(Glyceryl, 1), new MaterialStack(CoalFuel, 4))),
- NitroFuel ( 709, TextureSet.SET_FLUID , 1.0F, 0, 2, 16 , 200, 255, 0, 0, "Nitro-Diesel" , 0, 384, -1, 0, F, F, 1, 1, 1, Dyes.dyeLime , 0, Arrays.asList(new MaterialStack(Glyceryl, 1), new MaterialStack(Fuel, 4))),
- AstralSilver ( 333, TextureSet.SET_SHINY , 10.0F, 64, 2, 1|2 |8 |64 , 230, 230, 255, 0, "Astral Silver" , 0, 0, -1, 0, F, F, 4, 3, 2, Dyes.dyeWhite , 2, Arrays.asList(new MaterialStack(Silver, 2), new MaterialStack(Magic, 1))),
- Midasium ( 332, TextureSet.SET_SHINY , 12.0F, 64, 2, 1|2 |8 |64 , 255, 200, 40, 0, "Midasium" , 0, 0, -1, 0, F, F, 4, 3, 2, Dyes.dyeOrange , 2, Arrays.asList(new MaterialStack(Gold, 2), new MaterialStack(Magic, 1))),
- Mithril ( 331, TextureSet.SET_SHINY , 14.0F, 64, 3, 1|2 |8 |64 , 255, 255, 210, 0, "Mithril" , 0, 0, -1, 0, F, F, 4, 3, 2, Dyes.dyeLightBlue , 2, Arrays.asList(new MaterialStack(Platinum, 2), new MaterialStack(Magic, 1))),
- BlueAlloy ( 309, TextureSet.SET_DULL , 1.0F, 0, 0, 1|2 , 100, 180, 255, 0, "Blue Alloy" , 0, 0, -1, 0, F, F, 3, 5, 1, Dyes.dyeLightBlue , 2, Arrays.asList(new MaterialStack(Silver, 1), new MaterialStack(Nikolite, 4)), Arrays.asList(new TC_AspectStack(TC_Aspects.ELECTRUM, 3))),
- RedAlloy ( 308, TextureSet.SET_DULL , 1.0F, 0, 0, 1|2 , 200, 0, 0, 0, "Red Alloy" , 0, 0, -1, 0, F, F, 3, 5, 1, Dyes.dyeRed , 2, Arrays.asList(new MaterialStack(Metal, 1), new MaterialStack(Redstone, 4)), Arrays.asList(new TC_AspectStack(TC_Aspects.MACHINA, 3))),
- CobaltBrass ( 343, TextureSet.SET_METALLIC , 8.0F, 256, 2, 1|2 |64|128 , 180, 180, 160, 0, "Cobalt Brass" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes.dyeOrange , 2, Arrays.asList(new MaterialStack(Brass, 7), new MaterialStack(Aluminium, 1), new MaterialStack(Cobalt, 1))),
- Phosphorus ( 534, TextureSet.SET_FLINT , 1.0F, 0, 2, 1 |4|8|16 , 255, 255, 0, 0, "Phosphorus" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes.dyeYellow , 2, Arrays.asList(new MaterialStack(Calcium, 3), new MaterialStack(Phosphate, 2))),
- Basalt ( 844, TextureSet.SET_ROUGH , 1.0F, 0, 1, 1 , 30, 20, 20, 0, "Basalt" , 0, 0, -1, 0, F, F, 2, 1, 1, Dyes.dyeBlack , 2, Arrays.asList(new MaterialStack(Olivine, 1), new MaterialStack(Calcite, 3), new MaterialStack(Flint, 8), new MaterialStack(DarkAsh, 4)), Arrays.asList(new TC_AspectStack(TC_Aspects.TENEBRAE, 1))),
- GarnetRed ( 527, TextureSet.SET_RUBY , 7.0F, 128, 2, 1 |4|8 |64 , 200, 80, 80, 127, "Red Garnet" , 0, 0, -1, 0, F, T, 4, 1, 1, Dyes.dyeRed , 2, Arrays.asList(new MaterialStack(Pyrope, 3), new MaterialStack(Almandine, 5), new MaterialStack(Spessartine, 8)), Arrays.asList(new TC_AspectStack(TC_Aspects.VITREUS, 3))),
- GarnetYellow ( 528, TextureSet.SET_RUBY , 7.0F, 128, 2, 1 |4|8 |64 , 200, 200, 80, 127, "Yellow Garnet" , 0, 0, -1, 0, F, T, 4, 1, 1, Dyes.dyeYellow , 2, Arrays.asList(new MaterialStack(Andradite, 5), new MaterialStack(Grossular, 8), new MaterialStack(Uvarovite, 3)), Arrays.asList(new TC_AspectStack(TC_Aspects.VITREUS, 3))),
- Marble ( 845, TextureSet.SET_FINE , 1.0F, 0, 1, 1 , 200, 200, 200, 0, "Marble" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeWhite , 2, Arrays.asList(new MaterialStack(Magnesium, 1), new MaterialStack(Calcite, 7)), Arrays.asList(new TC_AspectStack(TC_Aspects.PERFODIO, 1))),
- Sugar ( 803, TextureSet.SET_FINE , 1.0F, 0, 1, 1 , 250, 250, 250, 0, "Sugar" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeWhite , 1, Arrays.asList(new MaterialStack(Carbon, 2), new MaterialStack(Water, 5), new MaterialStack(Oxygen, 25)), Arrays.asList(new TC_AspectStack(TC_Aspects.HERBA, 1), new TC_AspectStack(TC_Aspects.AQUA, 1), new TC_AspectStack(TC_Aspects.AER, 1))),
- Thaumium ( 330, TextureSet.SET_METALLIC , 12.0F, 256, 3, 1|2 |64|128 , 150, 100, 200, 0, "Thaumium" , 0, 0, -1, 0, F, F, 5, 2, 1, Dyes.dyePurple , 0, Arrays.asList(new MaterialStack(Iron, 1), new MaterialStack(Magic, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.PRAECANTIO, 1))),
- Vinteum ( 529, TextureSet.SET_EMERALD , 10.0F, 128, 3, 1 |4|8 |64 , 100, 200, 255, 0, "Vinteum" , 5, 32, -1, 0, F, F, 4, 1, 1, Dyes.dyeLightBlue , 2, Arrays.asList(new MaterialStack(Magic, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.VITREUS, 2), new TC_AspectStack(TC_Aspects.PRAECANTIO, 1))),
- Vis ( -1, TextureSet.SET_SHINY , 1.0F, 0, 3, 0 , 128, 0, 255, 0, "Vis" , 5, 32, -1, 0, F, F, 1, 1, 1, Dyes.dyePurple , 2, Arrays.asList(new MaterialStack(Magic, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.AURAM, 2), new TC_AspectStack(TC_Aspects.PRAECANTIO, 1))),
- Redrock ( 846, TextureSet.SET_ROUGH , 1.0F, 0, 1, 1 , 255, 80, 50, 0, "Redrock" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeRed , 2, Arrays.asList(new MaterialStack(Calcite, 2), new MaterialStack(Flint, 1), new MaterialStack(Clay, 1))),
- PotassiumFeldspar ( 847, TextureSet.SET_FINE , 1.0F, 0, 1, 1 , 120, 40, 40, 0, "Potassium Feldspar" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyePink , 1, Arrays.asList(new MaterialStack(Potassium, 1), new MaterialStack(Aluminium, 1), new MaterialStack(Silicon, 3), new MaterialStack(Oxygen, 8))),
- Biotite ( 848, TextureSet.SET_METALLIC , 1.0F, 0, 1, 1 , 20, 30, 20, 0, "Biotite" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeGray , 1, Arrays.asList(new MaterialStack(Potassium, 1), new MaterialStack(Magnesium, 3), new MaterialStack(Aluminium, 3), new MaterialStack(Fluorine, 2), new MaterialStack(Silicon, 3), new MaterialStack(Oxygen, 10))),
- GraniteBlack ( 849, TextureSet.SET_ROUGH , 4.0F, 64, 3, 1 |64|128 , 10, 10, 10, 0, "Black Granite" , 0, 0, -1, 0, F, F, 0, 1, 1, Dyes.dyeBlack , 2, Arrays.asList(new MaterialStack(SiliconDioxide, 4), new MaterialStack(Biotite, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.TUTAMEN, 1))),
- GraniteRed ( 850, TextureSet.SET_ROUGH , 4.0F, 64, 3, 1 |64|128 , 255, 0, 128, 0, "Red Granite" , 0, 0, -1, 0, F, F, 0, 1, 1, Dyes.dyeMagenta , 1, Arrays.asList(new MaterialStack(Aluminium, 2), new MaterialStack(PotassiumFeldspar, 1), new MaterialStack(Oxygen, 3)), Arrays.asList(new TC_AspectStack(TC_Aspects.TUTAMEN, 1))),
- Chrysotile ( 912, TextureSet.SET_DULL , 1.0F, 0, 2, 1 |8 , 110, 140, 110, 0, "Chrysotile" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeWhite , 2, Arrays.asList(new MaterialStack(Asbestos, 1))),
- Realgar ( 555, TextureSet.SET_DULL , 1.0F, 0, 2, 1 |8 , 140, 100, 100, 0, "Realgar" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeWhite , 2, Arrays.asList(new MaterialStack(Arsenic, 4), new MaterialStack(Sulfur,4))),
- VanadiumMagnetite ( 923, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1 |8 , 35, 35, 60, 0, "Vanadium Magnetite" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeBlack , 2, Arrays.asList(new MaterialStack(Magnetite, 1), new MaterialStack(Vanadium, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.MAGNETO, 1))), // Mixture of Fe3O4 and V2O5
- BasalticMineralSand ( 935, TextureSet.SET_SAND , 1.0F, 0, 1, 1 |8 , 40, 50, 40, 0, "Basaltic Mineral Sand" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeBlack , 2, Arrays.asList(new MaterialStack(Magnetite, 1), new MaterialStack(Basalt, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.MAGNETO, 1))),
- GraniticMineralSand ( 936, TextureSet.SET_SAND , 1.0F, 0, 1, 1 |8 , 40, 60, 60, 0, "Granitic Mineral Sand" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeBlack , 2, Arrays.asList(new MaterialStack(Magnetite, 1), new MaterialStack(GraniteBlack, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.MAGNETO, 1))),
- GarnetSand ( 938, TextureSet.SET_SAND , 1.0F, 0, 1, 1 |8 , 200, 100, 0, 0, "Garnet Sand" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeOrange , 2, Arrays.asList(new MaterialStack(GarnetRed, 1), new MaterialStack(GarnetYellow, 1))),
- QuartzSand ( 939, TextureSet.SET_SAND , 1.0F, 0, 1, 1 |8 , 200, 200, 200, 0, "Quartz Sand" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeWhite , 2, Arrays.asList(new MaterialStack(CertusQuartz, 1), new MaterialStack(Quartzite, 1))),
- Bastnasite ( 905, TextureSet.SET_FINE , 1.0F, 0, 2, 1 |8 , 200, 110, 45, 0, "Bastnasite" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Cerium, 1), new MaterialStack(Carbon, 1), new MaterialStack(Fluorine, 1), new MaterialStack(Oxygen, 3))), // (Ce, La, Y)CO3F
- Pentlandite ( 909, TextureSet.SET_DULL , 1.0F, 0, 2, 1 |8 , 165, 150, 5, 0, "Pentlandite" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Nickel, 9), new MaterialStack(Sulfur, 8))), // (Fe,Ni)9S8
- Spodumene ( 920, TextureSet.SET_DULL , 1.0F, 0, 2, 1 |8 , 190, 170, 170, 0, "Spodumene" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Lithium, 1), new MaterialStack(Aluminium, 1), new MaterialStack(Silicon, 2), new MaterialStack(Oxygen, 6))), // LiAl(SiO3)2
- Pollucite ( 919, TextureSet.SET_DULL , 1.0F, 0, 2, 1 |8 , 240, 210, 210, 0, "Pollucite" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Caesium, 2), new MaterialStack(Aluminium, 2), new MaterialStack(Silicon, 4), new MaterialStack(Water, 2), new MaterialStack(Oxygen, 12))), // (Cs,Na)2Al2Si4O12 2H2O (also a source of Rb)
- Tantalite ( 921, TextureSet.SET_METALLIC , 1.0F, 0, 3, 1 |8 , 145, 80, 40, 0, "Tantalite" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Manganese, 1), new MaterialStack(Tantalum, 2), new MaterialStack(Oxygen, 6))), // (Fe, Mn)Ta2O6 (also source of Nb)
- Lepidolite ( 907, TextureSet.SET_FINE , 1.0F, 0, 2, 1 |8 , 240, 50, 140, 0, "Lepidolite" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Potassium, 1), new MaterialStack(Lithium, 3), new MaterialStack(Aluminium, 4), new MaterialStack(Fluorine, 2), new MaterialStack(Oxygen, 10))), // K(Li,Al,Rb)3(Al,Si)4O10(F,OH)2
- Glauconite ( 933, TextureSet.SET_DULL , 1.0F, 0, 2, 1 |8 , 130, 180, 60, 0, "Glauconite" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Potassium, 1), new MaterialStack(Magnesium, 2), new MaterialStack(Aluminium, 4), new MaterialStack(Hydrogen, 2), new MaterialStack(Oxygen, 12))), // (K,Na)(Fe3+,Al,Mg)2(Si,Al)4O10(OH)2
- GlauconiteSand ( 949, TextureSet.SET_DULL , 1.0F, 0, 2, 1 |8 , 130, 180, 60, 0, "Glauconite Sand" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Potassium, 1), new MaterialStack(Magnesium, 2), new MaterialStack(Aluminium, 4), new MaterialStack(Hydrogen, 2), new MaterialStack(Oxygen, 12))), // (K,Na)(Fe3+,Al,Mg)2(Si,Al)4O10(OH)2
- Vermiculite ( 932, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1 |8 , 200, 180, 15, 0, "Vermiculite" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Iron, 3), new MaterialStack(Aluminium, 4), new MaterialStack(Silicon, 4), new MaterialStack(Hydrogen, 2), new MaterialStack(Water, 4), new MaterialStack(Oxygen, 12))), // (Mg+2, Fe+2, Fe+3)3 [(AlSi)4O10] (OH)2 4H2O)
- Bentonite ( 927, TextureSet.SET_ROUGH , 1.0F, 0, 2, 1 |8 , 245, 215, 210, 0, "Bentonite" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Sodium, 1), new MaterialStack(Magnesium, 6), new MaterialStack(Silicon, 12), new MaterialStack(Hydrogen, 6), new MaterialStack(Water, 5), new MaterialStack(Oxygen, 36))), // (Na,Ca)0.33(Al,Mg)2(Si4O10)(OH)2 nH2O
- FullersEarth ( 928, TextureSet.SET_FINE , 1.0F, 0, 2, 1 |8 , 160, 160, 120, 0, "Fullers Earth" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Magnesium, 1), new MaterialStack(Silicon, 4), new MaterialStack(Hydrogen, 1), new MaterialStack(Water, 4), new MaterialStack(Oxygen, 11))), // (Mg,Al)2Si4O10(OH) 4(H2O)
- Pitchblende ( 873, TextureSet.SET_DULL , 1.0F, 0, 3, 1 |8 , 200, 210, 0, 0, "Pitchblende" , 0, 0, -1, 0, F, F, 5, 1, 1, Dyes.dyeYellow , 2, Arrays.asList(new MaterialStack(Uraninite, 3), new MaterialStack(Thorium, 1), new MaterialStack(Lead, 1))),
- Monazite ( 520, TextureSet.SET_DIAMOND , 1.0F, 0, 1, 1 |4|8 , 50, 70, 50, 0, "Monazite" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes.dyeGreen , 1, Arrays.asList(new MaterialStack(RareEarth, 1), new MaterialStack(Phosphate, 1))), // Wikipedia: (Ce, La, Nd, Th, Sm, Gd)PO4 Monazite also smelt-extract to Helium, it is brown like the rare earth Item Monazite sand deposits are inevitably of the monazite-(Ce) composition. Typically, the lanthanides in such monazites contain about 45–48% cerium, about 24% lanthanum, about 17% neodymium, about 5% praseodymium, and minor quantities of samarium, gadolinium, and yttrium. Europium concentrations tend to be low, about 0.05% Thorium content of monazite is variable and sometimes can be up to 20–30%
- Malachite ( 871, TextureSet.SET_DULL , 1.0F, 0, 2, 1 |8 , 5, 95, 5, 0, "Malachite" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes.dyeGreen , 1, Arrays.asList(new MaterialStack(Copper, 2), new MaterialStack(Carbon, 1), new MaterialStack(Hydrogen, 2), new MaterialStack(Oxygen, 5))), // Cu2CO3(OH)2
- Mirabilite ( 900, TextureSet.SET_DULL , 1.0F, 0, 2, 1 |8 , 240, 250, 210, 0, "Mirabilite" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Sodium, 2), new MaterialStack(Sulfur, 1), new MaterialStack(Water, 10), new MaterialStack(Oxygen, 4))), // Na2SO4 10H2O
- Mica ( 901, TextureSet.SET_FINE , 1.0F, 0, 1, 1 |8 , 195, 195, 205, 0, "Mica" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Potassium, 1), new MaterialStack(Aluminium, 3), new MaterialStack(Silicon, 3), new MaterialStack(Fluorine, 2), new MaterialStack(Oxygen, 10))), // KAl2(AlSi3O10)(F,OH)2
- Trona ( 903, TextureSet.SET_METALLIC , 1.0F, 0, 1, 1 |8 , 135, 135, 95, 0, "Trona" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Sodium, 3), new MaterialStack(Carbon, 2), new MaterialStack(Hydrogen, 1), new MaterialStack(Water, 2), new MaterialStack(Oxygen, 6))), // Na3(CO3)(HCO3) 2H2O
- Barite ( 904, TextureSet.SET_DULL , 1.0F, 0, 2, 1 |8 , 230, 235, 255, 0, "Barite" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Barium, 1), new MaterialStack(Sulfur, 1), new MaterialStack(Oxygen, 4))),
- Gypsum ( 934, TextureSet.SET_DULL , 1.0F, 0, 1, 1 |8 , 230, 230, 250, 0, "Gypsum" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Calcium, 1), new MaterialStack(Sulfur, 1), new MaterialStack(Water, 2), new MaterialStack(Oxygen, 4))), // CaSO4 2H2O
- Alunite ( 911, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1 |8 , 225, 180, 65, 0, "Alunite" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Potassium, 1), new MaterialStack(Aluminium, 3), new MaterialStack(Silicon, 2), new MaterialStack(Hydrogen, 6), new MaterialStack(Oxygen, 14))), // KAl3(SO4)2(OH)6
- Dolomite ( 914, TextureSet.SET_FLINT , 1.0F, 0, 1, 1 |8 , 225, 205, 205, 0, "Dolomite" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Calcium, 1), new MaterialStack(Magnesium, 1), new MaterialStack(Carbon, 2), new MaterialStack(Oxygen, 6))), // CaMg(CO3)2
- Wollastonite ( 915, TextureSet.SET_DULL , 1.0F, 0, 2, 1 |8 , 240, 240, 240, 0, "Wollastonite" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Calcium, 1), new MaterialStack(Silicon, 1), new MaterialStack(Oxygen, 3))), // CaSiO3
- Zeolite ( 916, TextureSet.SET_DULL , 1.0F, 0, 2, 1 |8 , 240, 230, 230, 0, "Zeolite" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Sodium, 1), new MaterialStack(Calcium, 4), new MaterialStack(Silicon, 27), new MaterialStack(Aluminium, 9), new MaterialStack(Water, 28), new MaterialStack(Oxygen, 72))), // NaCa4(Si27Al9)O72 28(H2O)
- Kyanite ( 924, TextureSet.SET_FLINT , 1.0F, 0, 2, 1 |8 , 110, 110, 250, 0, "Kyanite" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Aluminium, 2), new MaterialStack(Silicon, 1), new MaterialStack(Oxygen, 5))), // Al2SiO5
- Kaolinite ( 929, TextureSet.SET_DULL , 1.0F, 0, 2, 1 |8 , 245, 235, 235, 0, "Kaolinite" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Aluminium, 2), new MaterialStack(Silicon, 2), new MaterialStack(Hydrogen, 4), new MaterialStack(Oxygen, 9))), // Al2Si2O5(OH)4
- Talc ( 902, TextureSet.SET_DULL , 1.0F, 0, 2, 1 |8 , 90, 180, 90, 0, "Talc" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Magnesium, 3), new MaterialStack(Silicon, 4), new MaterialStack(Hydrogen, 2), new MaterialStack(Oxygen, 12))), // H2Mg3(SiO3)4
- Soapstone ( 877, TextureSet.SET_DULL , 1.0F, 0, 1, 1 |8 , 95, 145, 95, 0, "Soapstone" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Magnesium, 3), new MaterialStack(Silicon, 4), new MaterialStack(Hydrogen, 2), new MaterialStack(Oxygen, 12))), // H2Mg3(SiO3)4
- Concrete ( 947, TextureSet.SET_ROUGH , 1.0F, 0, 1, 1 , 100, 100, 100, 0, "Concrete" , 0, 0, 300, 0, F, F, 0, 1, 1, Dyes.dyeGray , 0, Arrays.asList(new MaterialStack(Stone, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.TERRA, 1))),
- IronMagnetic ( 354, TextureSet.SET_MAGNETIC , 6.0F, 256, 2, 1|2 |64|128 , 200, 200, 200, 0, "Magnetic Iron" , 0, 0, -1, 0, F, F, 4, 51, 50, Dyes.dyeGray , 1, Arrays.asList(new MaterialStack(Iron, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.MAGNETO, 1))),
- SteelMagnetic ( 355, TextureSet.SET_MAGNETIC , 6.0F, 512, 2, 1|2 |64|128 , 128, 128, 128, 0, "Magnetic Steel" , 0, 0, 1000, 1000, T, F, 4, 51, 50, Dyes.dyeGray , 1, Arrays.asList(new MaterialStack(Steel, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 1), new TC_AspectStack(TC_Aspects.ORDO, 1), new TC_AspectStack(TC_Aspects.MAGNETO, 1))),
- NeodymiumMagnetic ( 356, TextureSet.SET_MAGNETIC , 7.0F, 512, 2, 1|2 |64|128 , 100, 100, 100, 0, "Magnetic Neodymium" , 0, 0, 1297, 1297, T, F, 4, 51, 50, Dyes.dyeGray , 1, Arrays.asList(new MaterialStack(Neodymium, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 1), new TC_AspectStack(TC_Aspects.MAGNETO, 3))),
-
- /**
- * Materials which are renamed automatically
- */
- @Deprecated IridiumAndSodiumOxide(IridiumSodiumOxide, F),
- @Deprecated Palygorskite (FullersEarth, F),
- @Deprecated Adamantine (Adamantium, T),
- @Deprecated FzDarkIron (DarkIron, T),
- @Deprecated FZDarkIron (DarkIron, T),
- @Deprecated Ashes (Ash, F),
- @Deprecated DarkAshes (DarkAsh, F),
- @Deprecated Abyssal (Basalt, F),
- @Deprecated Adamant (Adamantium, T),
- @Deprecated AluminumBrass (AluminiumBrass, F),
- @Deprecated Aluminum (Aluminium, F),
- @Deprecated NaturalAluminum (Aluminium, F),
- @Deprecated NaturalAluminium (Aluminium, F),
- @Deprecated Americum (Americium, F),
- @Deprecated Beryl (Emerald, F), // 30,200,200
- @Deprecated BlackGranite (GraniteBlack, F),
- @Deprecated CalciumCarbonate (Calcite, F),
- @Deprecated CreosoteOil (Creosote, F),
- @Deprecated Chromium (Chrome, F),
- @Deprecated Diesel (Fuel, F),
- @Deprecated Enderpearl (EnderPearl, F),
- @Deprecated Endereye (EnderEye, F),
- @Deprecated EyeOfEnder (EnderEye, F),
- @Deprecated Eyeofender (EnderEye, F),
- @Deprecated RawTerrasteelAlloy (TerrasteelAlloyRaw, F),
- @Deprecated StrengthenedTerrasteelAlloy(TerrasteelAlloyStrengthened, F),
- @Deprecated Flour (Wheat, F),
- @Deprecated Meat (MeatRaw, F),
- @Deprecated Garnet (GarnetRed, T),
- @Deprecated Granite (GraniteBlack, F),
- @Deprecated Goethite (BrownLimonite, F),
- @Deprecated Kalium (Potassium, F),
- @Deprecated Lapislazuli (Lapis, F),
- @Deprecated LapisLazuli (Lapis, F),
- @Deprecated Monazit (Monazite, F),
- @Deprecated Natrium (Sodium, F),
- @Deprecated Mythril (Mithril, F),
- @Deprecated NitroDiesel (NitroFuel, F),
- @Deprecated Naquadriah (Naquadria, F),
- @Deprecated Obby (Obsidian, F),
- @Deprecated Peridot (Olivine, T),
- @Deprecated Phosphorite (Phosphorus, T),
- @Deprecated Quarried (Marble, F),
- @Deprecated Quicksilver (Mercury, T),
- @Deprecated QuickSilver (Mercury, F),
- @Deprecated RedRock (Redrock, F),
- @Deprecated RefinedIron (Iron, F),
- @Deprecated RedGranite (GraniteRed, F),
- @Deprecated Sheldonite (Cooperite, F),
- @Deprecated Soulsand (SoulSand, F),
- @Deprecated SilverLead (Galena, F),
- @Deprecated Titan (Titanium, F),
- @Deprecated Uran (Uranium, F),
- @Deprecated Wolframite (Tungstate, F),
- @Deprecated Wolframium (Tungsten, F),
- @Deprecated Wolfram (Tungsten, F),
- @Deprecated WrougtIron (WroughtIron, F);
-
- /** List of all Materials. */
- public static final Collection<Materials> VALUES = new HashSet<Materials>(Arrays.asList(values()));
-
- static {
- SubTag.ELECTROMAGNETIC_SEPERATION_NEODYMIUM.addTo(Bastnasite, Monazite, Forcicium, Forcillium);
- SubTag.ELECTROMAGNETIC_SEPERATION_GOLD.addTo(Magnetite, VanadiumMagnetite, BasalticMineralSand, GraniticMineralSand);
- SubTag.ELECTROMAGNETIC_SEPERATION_IRON.addTo(YellowLimonite, BrownLimonite, Pyrite, BandedIron, Nickel, Vermiculite, Glauconite, GlauconiteSand, Pentlandite, Tin, Antimony, Ilmenite, Manganese, Chrome, Chromite, Andradite);
- SubTag.BLASTFURNACE_CALCITE_DOUBLE.addTo(Pyrite, YellowLimonite, BasalticMineralSand, GraniticMineralSand);
- SubTag.BLASTFURNACE_CALCITE_TRIPLE.addTo(Iron, PigIron, DeepIron, ShadowIron, WroughtIron, MeteoricIron, BrownLimonite);
- SubTag.WASHING_MERCURY.addTo(Gold, Silver, Osmium, Mithril, Platinum, Midasium, Cooperite, AstralSilver);
- SubTag.WASHING_SODIUMPERSULFATE.addTo(Zinc, Nickel, Copper, Cobalt, Cobaltite, Tetrahedrite);
- SubTag.METAL.addTo(AnyIron, AnyCopper, AnyBronze, Metal, Aluminium, Americium, Antimony, Beryllium, Bismuth, Caesium, Cerium, Chrome, Cobalt, Copper, Dysprosium, Erbium, Europium, Gadolinium, Gallium, Gold, Holmium, Indium, Iridium, Iron, Lanthanum, Lead, Lutetium, Magnesium, Manganese, Mercury, Niobium, Molybdenum, Neodymium, Neutronium, Nickel, Osmium, Palladium, Platinum, Plutonium, Plutonium241, Praseodymium, Promethium, Rubidium, Samarium, Scandium, Silicon, Silver, Tantalum, Tellurium, Terbium, Thorium, Thulium, Tin, Titanium, Tungsten, Uranium, Uranium235, Vanadium, Ytterbium, Yttrium, Zinc, Satinspar, Selenite, Microcline, Serpentine, Sylvite, Signalum, Lumium, PhasedIron, PhasedGold, DarkSteel, Terrasteel, TerrasteelAlloyRaw, TerrasteelAlloyStrengthened, TinAlloy, ConductiveIron, ElectricalSteel, EnergeticAlloy, VibrantAlloy, PulsatingIron, Manasteel, DarkThaumium, ElvenElementium, EnrichedCopper, DiamondCopper, Adamantium, Amordrine, Angmallen, Ardite, Aredrite, Atlarus, Blutonium, Carmot, Celenegil, Ceruclase, DarkIron, Desh, Desichalkos, Duranium, ElectrumFlux, Enderium, EnderiumBase, Eximite, FierySteel, Force, Haderoth, Hematite, Hepatizon, HSLA, Infuscolium, InfusedGold, Inolashite, Mercassium, MeteoricIron, MeteoricSteel, Naquadah, NaquadahAlloy, NaquadahEnriched, Naquadria, ObsidianFlux, Orichalcum, Osmonium, Oureclase, Phoenixite, Prometheum, RefinedGlowstone, RefinedObsidian, Sanguinite, Starconium, Tartarite, Thyrium, Tritanium, Vulcanite, Vyroxeres, Yellorium, Zectium, AluminiumBrass, Osmiridium, Sunnarium, AnnealedCopper, BatteryAlloy, Brass, Bronze, ChromiumDioxide, Cupronickel, DeepIron, Electrum, Invar, IronCompressed, Kanthal, Magnalium, Nichrome, NiobiumNitride, NiobiumTitanium, PigIron, SolderingAlloy, StainlessSteel, Steel, Ultimet, VanadiumGallium, WroughtIron, YttriumBariumCuprate, IronWood, Alumite, Manyullyn, ShadowIron, ShadowSteel, Steeleaf, SterlingSilver, RoseGold, BlackBronze, BismuthBronze, BlackSteel, RedSteel, BlueSteel, DamascusSteel, TungstenSteel, AstralSilver, Midasium, Mithril, BlueAlloy, RedAlloy, CobaltBrass, Thaumium, IronMagnetic, SteelMagnetic, NeodymiumMagnetic, Knightmetal);
-
- SubTag.FOOD.addTo(MeatRaw, MeatCooked, Ice, Water, Salt, Chili, Cocoa, Cheese, Coffee, Chocolate, Milk, Honey, FryingOilHot, FishOil, SeedOil, SeedOilLin, SeedOilHemp, Wheat, Sugar, FreshWater);
-
- Wood .add(SubTag.WOOD, SubTag.FLAMMABLE, SubTag.NO_SMELTING, SubTag.NO_SMASHING);
- WoodSealed .add(SubTag.WOOD, SubTag.FLAMMABLE, SubTag.NO_SMELTING, SubTag.NO_SMASHING, SubTag.NO_WORKING);
- Peanutwood .add(SubTag.WOOD, SubTag.FLAMMABLE, SubTag.NO_SMELTING, SubTag.NO_SMASHING);
- LiveRoot .add(SubTag.WOOD, SubTag.FLAMMABLE, SubTag.NO_SMELTING, SubTag.NO_SMASHING, SubTag.MAGICAL, SubTag.MORTAR_GRINDABLE);
- IronWood .add(SubTag.WOOD, SubTag.FLAMMABLE, SubTag.MAGICAL, SubTag.MORTAR_GRINDABLE);
- Steeleaf .add(SubTag.WOOD, SubTag.FLAMMABLE, SubTag.MAGICAL, SubTag.MORTAR_GRINDABLE, SubTag.NO_SMELTING);
-
- MeatRaw .add(SubTag.NO_SMASHING);
- MeatCooked .add(SubTag.NO_SMASHING, SubTag.NO_SMELTING);
- Snow .add(SubTag.NO_SMASHING, SubTag.NO_SMELTING, SubTag.NO_RECYCLING);
- Ice .add(SubTag.NO_SMASHING, SubTag.NO_SMELTING, SubTag.NO_RECYCLING);
- Water .add(SubTag.NO_SMASHING, SubTag.NO_SMELTING, SubTag.NO_RECYCLING);
- Sulfur .add(SubTag.NO_SMASHING, SubTag.NO_SMELTING, SubTag.FLAMMABLE);
- Saltpeter .add(SubTag.NO_SMASHING, SubTag.NO_SMELTING, SubTag.FLAMMABLE);
- Graphite .add(SubTag.NO_SMASHING, SubTag.NO_SMELTING, SubTag.FLAMMABLE, SubTag.NO_SMELTING);
-
- Wheat .add(SubTag.FLAMMABLE, SubTag.MORTAR_GRINDABLE);
- Paper .add(SubTag.FLAMMABLE, SubTag.NO_SMELTING, SubTag.NO_SMASHING, SubTag.MORTAR_GRINDABLE, SubTag.PAPER);
- Coal .add(SubTag.FLAMMABLE, SubTag.NO_SMELTING, SubTag.NO_SMASHING, SubTag.MORTAR_GRINDABLE);
- Charcoal .add(SubTag.FLAMMABLE, SubTag.NO_SMELTING, SubTag.NO_SMASHING, SubTag.MORTAR_GRINDABLE);
- Lignite .add(SubTag.FLAMMABLE, SubTag.NO_SMELTING, SubTag.NO_SMASHING, SubTag.MORTAR_GRINDABLE);
-
- Rubber .add(SubTag.FLAMMABLE, SubTag.NO_SMASHING, SubTag.BOUNCY, SubTag.STRETCHY);
- Plastic .add(SubTag.FLAMMABLE, SubTag.NO_SMASHING, SubTag.BOUNCY);
-
- TNT .add(SubTag.FLAMMABLE, SubTag.EXPLOSIVE, SubTag.NO_SMELTING, SubTag.NO_SMASHING);
- Gunpowder .add(SubTag.FLAMMABLE, SubTag.EXPLOSIVE, SubTag.NO_SMELTING, SubTag.NO_SMASHING);
- Glyceryl .add(SubTag.FLAMMABLE, SubTag.EXPLOSIVE, SubTag.NO_SMELTING, SubTag.NO_SMASHING);
- NitroCoalFuel .add(SubTag.FLAMMABLE, SubTag.EXPLOSIVE, SubTag.NO_SMELTING, SubTag.NO_SMASHING);
- NitroFuel .add(SubTag.FLAMMABLE, SubTag.EXPLOSIVE, SubTag.NO_SMELTING, SubTag.NO_SMASHING);
- NitroCarbon .add(SubTag.FLAMMABLE, SubTag.EXPLOSIVE, SubTag.NO_SMELTING, SubTag.NO_SMASHING);
-
- Lead .add(SubTag.MORTAR_GRINDABLE, SubTag.SOLDERING_MATERIAL, SubTag.SOLDERING_MATERIAL_BAD);
- Tin .add(SubTag.MORTAR_GRINDABLE, SubTag.SOLDERING_MATERIAL);
- SolderingAlloy .add(SubTag.MORTAR_GRINDABLE, SubTag.SOLDERING_MATERIAL, SubTag.SOLDERING_MATERIAL_GOOD);
-
- Cheese .add(SubTag.SMELTING_TO_FLUID);
- Sugar .add(SubTag.SMELTING_TO_FLUID);
-
- Concrete .add(SubTag.STONE, SubTag.NO_SMASHING, SubTag.SMELTING_TO_FLUID);
- ConstructionFoam .add(SubTag.STONE, SubTag.NO_SMASHING, SubTag.EXPLOSIVE, SubTag.NO_SMELTING);
- Redstone .add(SubTag.STONE, SubTag.NO_SMASHING, SubTag.UNBURNABLE, SubTag.SMELTING_TO_FLUID, SubTag.PULVERIZING_CINNABAR);
- Glowstone .add(SubTag.STONE, SubTag.NO_SMASHING, SubTag.UNBURNABLE, SubTag.SMELTING_TO_FLUID);
- Nikolite .add(SubTag.STONE, SubTag.NO_SMASHING, SubTag.UNBURNABLE, SubTag.SMELTING_TO_FLUID);
- Teslatite .add(SubTag.STONE, SubTag.NO_SMASHING, SubTag.UNBURNABLE, SubTag.SMELTING_TO_FLUID);
- Netherrack .add(SubTag.STONE, SubTag.NO_SMASHING, SubTag.UNBURNABLE, SubTag.FLAMMABLE);
- Stone .add(SubTag.STONE, SubTag.NO_SMASHING, SubTag.NO_RECYCLING);
- Brick .add(SubTag.STONE, SubTag.NO_SMASHING);
- NetherBrick .add(SubTag.STONE, SubTag.NO_SMASHING);
- Endstone .add(SubTag.STONE, SubTag.NO_SMASHING);
- Marble .add(SubTag.STONE, SubTag.NO_SMASHING);
- Basalt .add(SubTag.STONE, SubTag.NO_SMASHING);
- Redrock .add(SubTag.STONE, SubTag.NO_SMASHING);
- Obsidian .add(SubTag.STONE, SubTag.NO_SMASHING);
- Flint .add(SubTag.STONE, SubTag.NO_SMASHING, SubTag.MORTAR_GRINDABLE);
- GraniteRed .add(SubTag.STONE, SubTag.NO_SMASHING);
- GraniteBlack .add(SubTag.STONE, SubTag.NO_SMASHING);
- Salt .add(SubTag.STONE, SubTag.NO_SMASHING);
- RockSalt .add(SubTag.STONE, SubTag.NO_SMASHING);
-
- Sand .add(SubTag.NO_RECYCLING);
-
- Gold .add(SubTag.MORTAR_GRINDABLE);
- Silver .add(SubTag.MORTAR_GRINDABLE);
- Iron .add(SubTag.MORTAR_GRINDABLE);
- IronMagnetic .add(SubTag.MORTAR_GRINDABLE);
- HSLA .add(SubTag.MORTAR_GRINDABLE);
- Steel .add(SubTag.MORTAR_GRINDABLE);
- SteelMagnetic .add(SubTag.MORTAR_GRINDABLE);
- Zinc .add(SubTag.MORTAR_GRINDABLE);
- Antimony .add(SubTag.MORTAR_GRINDABLE);
- Copper .add(SubTag.MORTAR_GRINDABLE);
- AnnealedCopper .add(SubTag.MORTAR_GRINDABLE);
- Bronze .add(SubTag.MORTAR_GRINDABLE);
- Nickel .add(SubTag.MORTAR_GRINDABLE);
- Invar .add(SubTag.MORTAR_GRINDABLE);
- Brass .add(SubTag.MORTAR_GRINDABLE);
- WroughtIron .add(SubTag.MORTAR_GRINDABLE);
- Electrum .add(SubTag.MORTAR_GRINDABLE);
- Clay .add(SubTag.MORTAR_GRINDABLE);
-
- Glass .add(SubTag.CRYSTAL, SubTag.NO_SMASHING, SubTag.NO_RECYCLING, SubTag.SMELTING_TO_FLUID);
- Diamond .add(SubTag.CRYSTAL, SubTag.NO_SMASHING, SubTag.NO_SMELTING, SubTag.FLAMMABLE);
- Emerald .add(SubTag.CRYSTAL, SubTag.NO_SMASHING, SubTag.NO_SMELTING);
- Amethyst .add(SubTag.CRYSTAL, SubTag.NO_SMASHING, SubTag.NO_SMELTING);
- Tanzanite .add(SubTag.CRYSTAL, SubTag.NO_SMASHING, SubTag.NO_SMELTING);
- Topaz .add(SubTag.CRYSTAL, SubTag.NO_SMASHING, SubTag.NO_SMELTING);
- BlueTopaz .add(SubTag.CRYSTAL, SubTag.NO_SMASHING, SubTag.NO_SMELTING);
- Amber .add(SubTag.CRYSTAL, SubTag.NO_SMASHING, SubTag.NO_SMELTING);
- GreenSapphire .add(SubTag.CRYSTAL, SubTag.NO_SMASHING, SubTag.NO_SMELTING);
- Sapphire .add(SubTag.CRYSTAL, SubTag.NO_SMASHING, SubTag.NO_SMELTING);
- Ruby .add(SubTag.CRYSTAL, SubTag.NO_SMASHING, SubTag.NO_SMELTING);
- FoolsRuby .add(SubTag.CRYSTAL, SubTag.NO_SMASHING, SubTag.NO_SMELTING);
- Opal .add(SubTag.CRYSTAL, SubTag.NO_SMASHING, SubTag.NO_SMELTING);
- Olivine .add(SubTag.CRYSTAL, SubTag.NO_SMASHING, SubTag.NO_SMELTING);
- Jasper .add(SubTag.CRYSTAL, SubTag.NO_SMASHING, SubTag.NO_SMELTING);
- GarnetRed .add(SubTag.CRYSTAL, SubTag.NO_SMASHING, SubTag.NO_SMELTING);
- GarnetYellow .add(SubTag.CRYSTAL, SubTag.NO_SMASHING, SubTag.NO_SMELTING);
- Mimichite .add(SubTag.CRYSTAL, SubTag.NO_SMASHING, SubTag.NO_SMELTING);
- CrystalFlux .add(SubTag.CRYSTAL, SubTag.NO_SMASHING, SubTag.NO_SMELTING);
- Crystal .add(SubTag.CRYSTAL, SubTag.NO_SMASHING, SubTag.NO_SMELTING);
- Niter .add(SubTag.CRYSTAL, SubTag.NO_SMASHING, SubTag.NO_SMELTING);
- Apatite .add(SubTag.CRYSTAL, SubTag.NO_SMASHING, SubTag.NO_SMELTING, SubTag.CRYSTALLISABLE);
- Lapis .add(SubTag.CRYSTAL, SubTag.NO_SMASHING, SubTag.NO_SMELTING, SubTag.CRYSTALLISABLE);
- Sodalite .add(SubTag.CRYSTAL, SubTag.NO_SMASHING, SubTag.NO_SMELTING, SubTag.CRYSTALLISABLE);
- Lazurite .add(SubTag.CRYSTAL, SubTag.NO_SMASHING, SubTag.NO_SMELTING, SubTag.CRYSTALLISABLE);
- Monazite .add(SubTag.CRYSTAL, SubTag.NO_SMASHING, SubTag.NO_SMELTING, SubTag.CRYSTALLISABLE);
- Quartzite .add(SubTag.CRYSTAL, SubTag.NO_SMASHING, SubTag.NO_SMELTING, SubTag.CRYSTALLISABLE, SubTag.QUARTZ);
- Quartz .add(SubTag.CRYSTAL, SubTag.NO_SMASHING, SubTag.NO_SMELTING, SubTag.CRYSTALLISABLE, SubTag.QUARTZ);
- SiliconDioxide .add(SubTag.CRYSTAL, SubTag.NO_SMASHING, SubTag.NO_SMELTING, SubTag.CRYSTALLISABLE, SubTag.QUARTZ);
- Dilithium .add(SubTag.CRYSTAL, SubTag.NO_SMASHING, SubTag.NO_SMELTING, SubTag.CRYSTALLISABLE, SubTag.QUARTZ);
- NetherQuartz .add(SubTag.CRYSTAL, SubTag.NO_SMASHING, SubTag.NO_SMELTING, SubTag.CRYSTALLISABLE, SubTag.QUARTZ);
- CertusQuartz .add(SubTag.CRYSTAL, SubTag.NO_SMASHING, SubTag.NO_SMELTING, SubTag.CRYSTALLISABLE, SubTag.QUARTZ);
- Fluix .add(SubTag.CRYSTAL, SubTag.NO_SMASHING, SubTag.NO_SMELTING, SubTag.CRYSTALLISABLE, SubTag.QUARTZ);
- //ChargedCertusQuartz .add(SubTag.CRYSTAL, SubTag.NO_SMASHING, SubTag.NO_SMELTING, SubTag.QUARTZ);
- Phosphorus .add(SubTag.CRYSTAL, SubTag.NO_SMASHING, SubTag.NO_SMELTING, SubTag.FLAMMABLE, SubTag.EXPLOSIVE);
- Phosphate .add(SubTag.CRYSTAL, SubTag.NO_SMASHING, SubTag.NO_SMELTING, SubTag.FLAMMABLE, SubTag.EXPLOSIVE);
- InfusedAir .add(SubTag.CRYSTAL, SubTag.NO_SMASHING, SubTag.NO_SMELTING, SubTag.MAGICAL, SubTag.UNBURNABLE);
- InfusedFire .add(SubTag.CRYSTAL, SubTag.NO_SMASHING, SubTag.NO_SMELTING, SubTag.MAGICAL, SubTag.UNBURNABLE);
- InfusedEarth .add(SubTag.CRYSTAL, SubTag.NO_SMASHING, SubTag.NO_SMELTING, SubTag.MAGICAL, SubTag.UNBURNABLE);
- InfusedWater .add(SubTag.CRYSTAL, SubTag.NO_SMASHING, SubTag.NO_SMELTING, SubTag.MAGICAL, SubTag.UNBURNABLE);
- InfusedEntropy .add(SubTag.CRYSTAL, SubTag.NO_SMASHING, SubTag.NO_SMELTING, SubTag.MAGICAL, SubTag.UNBURNABLE);
- InfusedOrder .add(SubTag.CRYSTAL, SubTag.NO_SMASHING, SubTag.NO_SMELTING, SubTag.MAGICAL, SubTag.UNBURNABLE);
- InfusedVis .add(SubTag.CRYSTAL, SubTag.NO_SMASHING, SubTag.NO_SMELTING, SubTag.MAGICAL, SubTag.UNBURNABLE);
- InfusedDull .add(SubTag.CRYSTAL, SubTag.NO_SMASHING, SubTag.NO_SMELTING, SubTag.MAGICAL, SubTag.UNBURNABLE);
- Vinteum .add(SubTag.CRYSTAL, SubTag.NO_SMASHING, SubTag.NO_SMELTING, SubTag.MAGICAL, SubTag.UNBURNABLE);
- NetherStar .add(SubTag.CRYSTAL, SubTag.NO_SMASHING, SubTag.NO_SMELTING, SubTag.MAGICAL, SubTag.UNBURNABLE);
- EnderPearl .add(SubTag.CRYSTAL, SubTag.NO_SMASHING, SubTag.NO_SMELTING, SubTag.MAGICAL, SubTag.PEARL);
- EnderEye .add(SubTag.CRYSTAL, SubTag.NO_SMASHING, SubTag.NO_SMELTING, SubTag.MAGICAL, SubTag.PEARL);
- Firestone .add(SubTag.CRYSTAL, SubTag.NO_SMASHING, SubTag.NO_SMELTING, SubTag.CRYSTALLISABLE, SubTag.MAGICAL, SubTag.QUARTZ, SubTag.UNBURNABLE, SubTag.BURNING);
- Forcicium .add(SubTag.CRYSTAL, SubTag.NO_SMASHING, SubTag.NO_SMELTING, SubTag.CRYSTALLISABLE, SubTag.MAGICAL);
- Forcillium .add(SubTag.CRYSTAL, SubTag.NO_SMASHING, SubTag.NO_SMELTING, SubTag.CRYSTALLISABLE, SubTag.MAGICAL);
- Force .add(SubTag.CRYSTAL, SubTag.MAGICAL, SubTag.UNBURNABLE);
- Magic .add(SubTag.CRYSTAL, SubTag.MAGICAL, SubTag.UNBURNABLE);
-
- Primitive .add(SubTag.NO_SMASHING, SubTag.NO_SMELTING);
- Basic .add(SubTag.NO_SMASHING, SubTag.NO_SMELTING);
- Good .add(SubTag.NO_SMASHING, SubTag.NO_SMELTING);
- Advanced .add(SubTag.NO_SMASHING, SubTag.NO_SMELTING);
- Data .add(SubTag.NO_SMASHING, SubTag.NO_SMELTING);
- Elite .add(SubTag.NO_SMASHING, SubTag.NO_SMELTING);
- Master .add(SubTag.NO_SMASHING, SubTag.NO_SMELTING);
- Ultimate .add(SubTag.NO_SMASHING, SubTag.NO_SMELTING);
- Superconductor .add(SubTag.NO_SMASHING, SubTag.NO_SMELTING);
- Infinite .add(SubTag.NO_SMASHING, SubTag.NO_SMELTING);
-
- Blaze .add(SubTag.MAGICAL, SubTag.NO_SMELTING, SubTag.SMELTING_TO_FLUID, SubTag.MORTAR_GRINDABLE, SubTag.UNBURNABLE, SubTag.BURNING);
- FierySteel .add(SubTag.MAGICAL, SubTag.UNBURNABLE, SubTag.BURNING);
- ElvenElementium .add(SubTag.MAGICAL);
- DarkThaumium .add(SubTag.MAGICAL);
- Thaumium .add(SubTag.MAGICAL);
- Enderium .add(SubTag.MAGICAL);
- AstralSilver .add(SubTag.MAGICAL);
- Midasium .add(SubTag.MAGICAL);
- Mithril .add(SubTag.MAGICAL);
-
- Iron .mOreReRegistrations.add(AnyIron );
- PigIron .mOreReRegistrations.add(AnyIron );
- WroughtIron .mOreReRegistrations.add(AnyIron );
-
- Copper .mOreReRegistrations.add(AnyCopper );
- AnnealedCopper .mOreReRegistrations.add(AnyCopper );
-
- Bronze .mOreReRegistrations.add(AnyBronze );
-
- Peanutwood .setMaceratingInto(Wood );
- WoodSealed .setMaceratingInto(Wood );
- NetherBrick .setMaceratingInto(Netherrack );
-
- NeodymiumMagnetic .setSmeltingInto(Neodymium ).setMaceratingInto(Neodymium ).setArcSmeltingInto(Neodymium );
- SteelMagnetic .setSmeltingInto(Steel ).setMaceratingInto(Steel ).setArcSmeltingInto(Steel );
- Iron .setSmeltingInto(Iron ).setMaceratingInto(Iron ).setArcSmeltingInto(WroughtIron );
- AnyIron .setSmeltingInto(Iron ).setMaceratingInto(Iron ).setArcSmeltingInto(WroughtIron );
- PigIron .setSmeltingInto(Iron ).setMaceratingInto(Iron ).setArcSmeltingInto(WroughtIron );
- WroughtIron .setSmeltingInto(Iron ).setMaceratingInto(Iron ).setArcSmeltingInto(WroughtIron );
- IronMagnetic .setSmeltingInto(Iron ).setMaceratingInto(Iron ).setArcSmeltingInto(WroughtIron );
- Copper .setSmeltingInto(Copper ).setMaceratingInto(Copper ).setArcSmeltingInto(AnnealedCopper );
- AnyCopper .setSmeltingInto(Copper ).setMaceratingInto(Copper ).setArcSmeltingInto(AnnealedCopper );
- AnnealedCopper .setSmeltingInto(Copper ).setMaceratingInto(Copper ).setArcSmeltingInto(AnnealedCopper );
- Netherrack .setSmeltingInto(NetherBrick );
- MeatRaw .setSmeltingInto(MeatCooked );
- Sand .setSmeltingInto(Glass );
- Ice .setSmeltingInto(Water );
- Snow .setSmeltingInto(Water );
-
- Mercury .add(SubTag.SMELTING_TO_GEM);
- Cinnabar .setDirectSmelting(Mercury ).add(SubTag.INDUCTIONSMELTING_LOW_OUTPUT).add(SubTag.SMELTING_TO_GEM);
- Celestine .setDirectSmelting(Strontium ).add(SubTag.INDUCTIONSMELTING_LOW_OUTPUT);
- Tetrahedrite .setDirectSmelting(Copper ).add(SubTag.INDUCTIONSMELTING_LOW_OUTPUT);
- Chalcopyrite .setDirectSmelting(Copper ).add(SubTag.INDUCTIONSMELTING_LOW_OUTPUT);
- Malachite .setDirectSmelting(Copper ).add(SubTag.INDUCTIONSMELTING_LOW_OUTPUT);
- Pentlandite .setDirectSmelting(Nickel ).add(SubTag.INDUCTIONSMELTING_LOW_OUTPUT);
- Sphalerite .setDirectSmelting(Zinc ).add(SubTag.INDUCTIONSMELTING_LOW_OUTPUT);
- Pyrite .setDirectSmelting(Iron ).add(SubTag.INDUCTIONSMELTING_LOW_OUTPUT);
- BasalticMineralSand .setDirectSmelting(Iron ).add(SubTag.INDUCTIONSMELTING_LOW_OUTPUT);
- GraniticMineralSand .setDirectSmelting(Iron ).add(SubTag.INDUCTIONSMELTING_LOW_OUTPUT);
- YellowLimonite .setDirectSmelting(Iron ).add(SubTag.INDUCTIONSMELTING_LOW_OUTPUT);
- BrownLimonite .setDirectSmelting(Iron );
- BandedIron .setDirectSmelting(Iron );
- Cassiterite .setDirectSmelting(Tin );
- CassiteriteSand .setDirectSmelting(Tin );
- Chromite .setDirectSmelting(Chrome );
- Garnierite .setDirectSmelting(Nickel );
- Cobaltite .setDirectSmelting(Cobalt );
- Stibnite .setDirectSmelting(Antimony );
- Cooperite .setDirectSmelting(Platinum );
- Pyrolusite .setDirectSmelting(Manganese );
- Magnesite .setDirectSmelting(Magnesium );
- Molybdenite .setDirectSmelting(Molybdenum );
-
- Amber .setOreMultiplier( 2).setSmeltingMultiplier( 2);
- InfusedAir .setOreMultiplier( 2).setSmeltingMultiplier( 2);
- InfusedFire .setOreMultiplier( 2).setSmeltingMultiplier( 2);
- InfusedEarth .setOreMultiplier( 2).setSmeltingMultiplier( 2);
- InfusedWater .setOreMultiplier( 2).setSmeltingMultiplier( 2);
- InfusedEntropy .setOreMultiplier( 2).setSmeltingMultiplier( 2);
- InfusedOrder .setOreMultiplier( 2).setSmeltingMultiplier( 2);
- InfusedVis .setOreMultiplier( 2).setSmeltingMultiplier( 2);
- InfusedDull .setOreMultiplier( 2).setSmeltingMultiplier( 2);
- Salt .setOreMultiplier( 2).setSmeltingMultiplier( 2);
- RockSalt .setOreMultiplier( 2).setSmeltingMultiplier( 2);
- Scheelite .setOreMultiplier( 2).setSmeltingMultiplier( 2);
- Tungstate .setOreMultiplier( 2).setSmeltingMultiplier( 2);
- Cassiterite .setOreMultiplier( 2).setSmeltingMultiplier( 2);
- CassiteriteSand .setOreMultiplier( 2).setSmeltingMultiplier( 2);
- NetherQuartz .setOreMultiplier( 2).setSmeltingMultiplier( 2);
- CertusQuartz .setOreMultiplier( 2).setSmeltingMultiplier( 2);
- //ChargedCertusQuartz .setOreMultiplier( 2).setSmeltingMultiplier( 2);
- Phosphorus .setOreMultiplier( 3).setSmeltingMultiplier( 3);
- Saltpeter .setOreMultiplier( 4).setSmeltingMultiplier( 4);
- Apatite .setOreMultiplier( 4).setSmeltingMultiplier( 4).setByProductMultiplier(2);
- Nikolite .setOreMultiplier( 5).setSmeltingMultiplier( 5);
- Teslatite .setOreMultiplier( 5).setSmeltingMultiplier( 5);
- Redstone .setOreMultiplier( 5).setSmeltingMultiplier( 5);
- Glowstone .setOreMultiplier( 5).setSmeltingMultiplier( 5);
- Lapis .setOreMultiplier( 6).setSmeltingMultiplier( 6).setByProductMultiplier(4);
- Sodalite .setOreMultiplier( 6).setSmeltingMultiplier( 6).setByProductMultiplier(4);
- Lazurite .setOreMultiplier( 6).setSmeltingMultiplier( 6).setByProductMultiplier(4);
- Monazite .setOreMultiplier( 8).setSmeltingMultiplier( 8).setByProductMultiplier(2);
-
- Plastic .setEnchantmentForTools(Enchantment.knockback, 1);
- Rubber .setEnchantmentForTools(Enchantment.knockback, 2);
- InfusedAir .setEnchantmentForTools(Enchantment.knockback, 2);
-
- IronWood .setEnchantmentForTools(Enchantment.fortune, 1);
- Steeleaf .setEnchantmentForTools(Enchantment.fortune, 2);
- Midasium .setEnchantmentForTools(Enchantment.fortune, 2);
- Mithril .setEnchantmentForTools(Enchantment.fortune, 3);
- Vinteum .setEnchantmentForTools(Enchantment.fortune, 1);
- Thaumium .setEnchantmentForTools(Enchantment.fortune, 2);
- DarkThaumium .setEnchantmentForTools(Enchantment.fortune, 3);
- Magic .setEnchantmentForTools(Enchantment.fortune, 3);
- InfusedWater .setEnchantmentForTools(Enchantment.fortune, 3);
-
- Flint .setEnchantmentForTools(Enchantment.fireAspect, 1);
- DarkIron .setEnchantmentForTools(Enchantment.fireAspect, 2);
- Firestone .setEnchantmentForTools(Enchantment.fireAspect, 3);
- FierySteel .setEnchantmentForTools(Enchantment.fireAspect, 3);
- Pyrotheum .setEnchantmentForTools(Enchantment.fireAspect, 3);
- Blaze .setEnchantmentForTools(Enchantment.fireAspect, 3);
- InfusedFire .setEnchantmentForTools(Enchantment.fireAspect, 3);
-
- Force .setEnchantmentForTools(Enchantment.silkTouch, 1);
- Amber .setEnchantmentForTools(Enchantment.silkTouch, 1);
- EnderPearl .setEnchantmentForTools(Enchantment.silkTouch, 1);
- Enderium .setEnchantmentForTools(Enchantment.silkTouch, 1);
- NetherStar .setEnchantmentForTools(Enchantment.silkTouch, 1);
- InfusedOrder .setEnchantmentForTools(Enchantment.silkTouch, 1);
-
- BlackBronze .setEnchantmentForTools(Enchantment.smite, 2);
- Gold .setEnchantmentForTools(Enchantment.smite, 3);
- RoseGold .setEnchantmentForTools(Enchantment.smite, 4);
- Platinum .setEnchantmentForTools(Enchantment.smite, 5);
- InfusedVis .setEnchantmentForTools(Enchantment.smite, 5);
-
- Lead .setEnchantmentForTools(Enchantment.baneOfArthropods, 2);
- Nickel .setEnchantmentForTools(Enchantment.baneOfArthropods, 2);
- Invar .setEnchantmentForTools(Enchantment.baneOfArthropods, 3);
- Antimony .setEnchantmentForTools(Enchantment.baneOfArthropods, 3);
- BatteryAlloy .setEnchantmentForTools(Enchantment.baneOfArthropods, 4);
- Bismuth .setEnchantmentForTools(Enchantment.baneOfArthropods, 4);
- BismuthBronze .setEnchantmentForTools(Enchantment.baneOfArthropods, 5);
- InfusedEarth .setEnchantmentForTools(Enchantment.baneOfArthropods, 5);
-
- Iron .setEnchantmentForTools(Enchantment.sharpness, 1);
- Bronze .setEnchantmentForTools(Enchantment.sharpness, 1);
- Brass .setEnchantmentForTools(Enchantment.sharpness, 2);
- HSLA .setEnchantmentForTools(Enchantment.sharpness, 2);
- Steel .setEnchantmentForTools(Enchantment.sharpness, 2);
- WroughtIron .setEnchantmentForTools(Enchantment.sharpness, 2);
- StainlessSteel .setEnchantmentForTools(Enchantment.sharpness, 3);
- Knightmetal .setEnchantmentForTools(Enchantment.sharpness, 3);
- ShadowIron .setEnchantmentForTools(Enchantment.sharpness, 3);
- ShadowSteel .setEnchantmentForTools(Enchantment.sharpness, 4);
- BlackSteel .setEnchantmentForTools(Enchantment.sharpness, 4);
- RedSteel .setEnchantmentForTools(Enchantment.sharpness, 4);
- BlueSteel .setEnchantmentForTools(Enchantment.sharpness, 5);
- DamascusSteel .setEnchantmentForTools(Enchantment.sharpness, 5);
- InfusedEntropy .setEnchantmentForTools(Enchantment.sharpness, 5);
-
- InfusedAir .setEnchantmentForArmors(Enchantment.respiration, 3);
-
- InfusedFire .setEnchantmentForArmors(Enchantment.featherFalling, 4);
-
- Steeleaf .setEnchantmentForArmors(Enchantment.protection, 2);
- Knightmetal .setEnchantmentForArmors(Enchantment.protection, 1);
- InfusedEarth .setEnchantmentForArmors(Enchantment.protection, 4);
-
- InfusedEntropy .setEnchantmentForArmors(Enchantment.thorns, 3);
-
- InfusedWater .setEnchantmentForArmors(Enchantment.aquaAffinity, 1);
- IronWood .setEnchantmentForArmors(Enchantment.aquaAffinity, 1);
-
- InfusedOrder .setEnchantmentForArmors(Enchantment.projectileProtection, 4);
-
- InfusedDull .setEnchantmentForArmors(Enchantment.blastProtection, 4);
-
- InfusedVis .setEnchantmentForArmors(Enchantment.protection, 4);
-
- /*
- Stone .setSpecialEffect(SpecialToolEffect.Crushing, 1);
- GraniteRed .setSpecialEffect(SpecialToolEffect.Crushing, 2);
- GraniteBlack .setSpecialEffect(SpecialToolEffect.Crushing, 2);
- Adamantium .setSpecialEffect(SpecialToolEffect.Crushing, 3);
-
- DeepIron .setSpecialEffect(SpecialToolEffect.Magnetic, 1);
- MeteoricIron .setSpecialEffect(SpecialToolEffect.Magnetic, 2);
- MeteoricSteel .setSpecialEffect(SpecialToolEffect.Magnetic, 3);
- IronMagnetic .setSpecialEffect(SpecialToolEffect.Magnetic, 1);
- SteelMagnetic .setSpecialEffect(SpecialToolEffect.Magnetic, 2);
- NeodymiumMagnetic .setSpecialEffect(SpecialToolEffect.Magnetic, 3);
- */
-
- FryingOilHot .setHeatDamage(1.0F);
- Lava .setHeatDamage(3.0F);
- Firestone .setHeatDamage(5.0F);
- Pyrotheum .setHeatDamage(5.0F);
-
- Chalcopyrite .addOreByProducts(Pyrite , Cobalt , Cadmium , Gold );
- Sphalerite .addOreByProducts(GarnetYellow , Cadmium , Gallium , Zinc );
- MeteoricIron .addOreByProducts(Iron , Nickel , Iridium , Platinum );
- GlauconiteSand .addOreByProducts(Sodium , Aluminium , Iron );
- Glauconite .addOreByProducts(Sodium , Aluminium , Iron );
- Vermiculite .addOreByProducts(Iron , Aluminium , Magnesium );
- FullersEarth .addOreByProducts(Aluminium , Silicon , Magnesium );
- Bentonite .addOreByProducts(Aluminium , Calcium , Magnesium );
- Uraninite .addOreByProducts(Uranium , Thorium , Plutonium );
- Pitchblende .addOreByProducts(Thorium , Uranium , Lead );
- Galena .addOreByProducts(Sulfur , Silver , Lead );
- Lapis .addOreByProducts(Lazurite , Sodalite , Pyrite );
- Pyrite .addOreByProducts(Sulfur , Phosphorus , Iron );
- Copper .addOreByProducts(Cobalt , Gold , Nickel );
- Nickel .addOreByProducts(Cobalt , Platinum , Iron );
- GarnetRed .addOreByProducts(Spessartine , Pyrope , Almandine );
- GarnetYellow .addOreByProducts(Andradite , Grossular , Uvarovite );
- Cooperite .addOreByProducts(Palladium , Nickel , Iridium );
- Cinnabar .addOreByProducts(Redstone , Sulfur , Glowstone );
- Tantalite .addOreByProducts(Manganese , Niobium , Tantalum );
- Pollucite .addOreByProducts(Caesium , Aluminium , Rubidium );
- Chrysotile .addOreByProducts(Asbestos , Silicon , Magnesium );
- Asbestos .addOreByProducts(Asbestos , Silicon , Magnesium );
- Pentlandite .addOreByProducts(Iron , Sulfur , Cobalt );
- Uranium .addOreByProducts(Lead , Plutonium , Thorium );
- Scheelite .addOreByProducts(Manganese , Molybdenum , Calcium );
- Tungstate .addOreByProducts(Manganese , Silver , Lithium );
- Bauxite .addOreByProducts(Grossular , Titanium , Gallium );
- QuartzSand .addOreByProducts(CertusQuartz , Quartzite , Barite );
- Quartzite .addOreByProducts(CertusQuartz , Barite );
- CertusQuartz .addOreByProducts(Quartzite , Barite );
- //ChargedCertusQuartz .addOreByProducts(CertusQuartz , Quartzite , Barite );
- Redstone .addOreByProducts(Cinnabar , RareEarth , Glowstone );
- Monazite .addOreByProducts(Thorium , Neodymium , RareEarth );
- Forcicium .addOreByProducts(Thorium , Neodymium , RareEarth );
- Forcillium .addOreByProducts(Thorium , Neodymium , RareEarth );
- Malachite .addOreByProducts(Copper , BrownLimonite , Calcite );
- YellowLimonite .addOreByProducts(Nickel , BrownLimonite , Cobalt );
- BrownLimonite .addOreByProducts(Malachite , YellowLimonite );
- Neodymium .addOreByProducts(Monazite , RareEarth );
- Bastnasite .addOreByProducts(Neodymium , RareEarth );
- Glowstone .addOreByProducts(Redstone , Gold );
- Zinc .addOreByProducts(Tin , Gallium );
- Tungsten .addOreByProducts(Manganese , Molybdenum );
- Diatomite .addOreByProducts(BandedIron , Sapphire );
- Iron .addOreByProducts(Nickel , Tin );
- Lepidolite .addOreByProducts(Lithium , Caesium );
- Gold .addOreByProducts(Copper , Nickel );
- Tin .addOreByProducts(Iron , Zinc );
- Antimony .addOreByProducts(Zinc , Iron );
- Silver .addOreByProducts(Lead , Sulfur );
- Lead .addOreByProducts(Silver , Sulfur );
- Thorium .addOreByProducts(Uranium , Lead );
- Plutonium .addOreByProducts(Uranium , Lead );
- Electrum .addOreByProducts(Gold , Silver );
- Bronze .addOreByProducts(Copper , Tin );
- Brass .addOreByProducts(Copper , Zinc );
- Coal .addOreByProducts(Lignite , Thorium );
- Ilmenite .addOreByProducts(Iron , Titanium );
- Manganese .addOreByProducts(Chrome , Iron );
- Sapphire .addOreByProducts(Aluminium , GreenSapphire );
- GreenSapphire .addOreByProducts(Aluminium , Sapphire );
- Platinum .addOreByProducts(Nickel , Iridium );
- Emerald .addOreByProducts(Beryllium , Aluminium );
- Olivine .addOreByProducts(Pyrope , Magnesium );
- Chrome .addOreByProducts(Iron , Magnesium );
- Chromite .addOreByProducts(Iron , Magnesium );
- Tetrahedrite .addOreByProducts(Antimony , Zinc );
- GarnetSand .addOreByProducts(GarnetRed , GarnetYellow );
- Magnetite .addOreByProducts(Iron , Gold );
- GraniticMineralSand .addOreByProducts(GraniteBlack , Magnetite );
- BasalticMineralSand .addOreByProducts(Basalt , Magnetite );
- Basalt .addOreByProducts(Olivine , DarkAsh );
- Celestine .addOreByProducts(Strontium , Sulfur );
- VanadiumMagnetite .addOreByProducts(Magnetite , Vanadium );
- Lazurite .addOreByProducts(Sodalite , Lapis );
- Sodalite .addOreByProducts(Lazurite , Lapis );
- Spodumene .addOreByProducts(Aluminium , Lithium );
- Ruby .addOreByProducts(Chrome , GarnetRed );
- Phosphorus .addOreByProducts(Apatite , Phosphate );
- Iridium .addOreByProducts(Platinum , Osmium );
- Pyrope .addOreByProducts(GarnetRed , Magnesium );
- Almandine .addOreByProducts(GarnetRed , Aluminium );
- Spessartine .addOreByProducts(GarnetRed , Manganese );
- Andradite .addOreByProducts(GarnetYellow , Iron );
- Grossular .addOreByProducts(GarnetYellow , Calcium );
- Uvarovite .addOreByProducts(GarnetYellow , Chrome );
- Calcite .addOreByProducts(Andradite , Malachite );
- NaquadahEnriched .addOreByProducts(Naquadah , Naquadria );
- Naquadah .addOreByProducts(NaquadahEnriched );
- Pyrolusite .addOreByProducts(Manganese );
- Molybdenite .addOreByProducts(Molybdenum );
- Stibnite .addOreByProducts(Antimony );
- Garnierite .addOreByProducts(Nickel );
- Lignite .addOreByProducts(Coal );
- Diamond .addOreByProducts(Graphite );
- Beryllium .addOreByProducts(Emerald );
- Apatite .addOreByProducts(Phosphorus );
- Nikolite .addOreByProducts(Diamond );
- Teslatite .addOreByProducts(Diamond );
- Magnesite .addOreByProducts(Magnesium );
- NetherQuartz .addOreByProducts(Netherrack );
- PigIron .addOreByProducts(Iron );
- DeepIron .addOreByProducts(Iron );
- ShadowIron .addOreByProducts(Iron );
- DarkIron .addOreByProducts(Iron );
- MeteoricIron .addOreByProducts(Iron );
- Steel .addOreByProducts(Iron );
- HSLA .addOreByProducts(Iron );
- Mithril .addOreByProducts(Platinum );
- Midasium .addOreByProducts(Gold );
- AstralSilver .addOreByProducts(Silver );
- Graphite .addOreByProducts(Carbon );
- Netherrack .addOreByProducts(Sulfur );
- Flint .addOreByProducts(Obsidian );
- Cobaltite .addOreByProducts(Cobalt );
- Cobalt .addOreByProducts(Cobaltite );
- Sulfur .addOreByProducts(Sulfur );
- Saltpeter .addOreByProducts(Saltpeter );
- Endstone .addOreByProducts(Helium_3 );
- Osmium .addOreByProducts(Iridium );
- Magnesium .addOreByProducts(Olivine );
- Aluminium .addOreByProducts(Bauxite );
- Titanium .addOreByProducts(Almandine );
- Obsidian .addOreByProducts(Olivine );
- Ash .addOreByProducts(Carbon );
- DarkAsh .addOreByProducts(Carbon );
- Redrock .addOreByProducts(Clay );
- Marble .addOreByProducts(Calcite );
- Clay .addOreByProducts(Clay );
- Cassiterite .addOreByProducts(Tin );
- CassiteriteSand .addOreByProducts(Tin );
- GraniteBlack .addOreByProducts(Biotite );
- GraniteRed .addOreByProducts(PotassiumFeldspar );
- Phosphate .addOreByProducts(Phosphor );
- Phosphor .addOreByProducts(Phosphate );
- Jade .addOreByProducts(Jade );
- Tanzanite .addOreByProducts(Opal );
- Opal .addOreByProducts(Tanzanite );
- Amethyst .addOreByProducts(Amethyst );
- Jasper .addOreByProducts(FoolsRuby );
- FoolsRuby .addOreByProducts(Jasper );
- Amber .addOreByProducts(Amber );
- Topaz .addOreByProducts(BlueTopaz );
- BlueTopaz .addOreByProducts(Topaz );
- Niter .addOreByProducts(Saltpeter );
- Vinteum .addOreByProducts(Vinteum );
- Force .addOreByProducts(Force );
- Dilithium .addOreByProducts(Dilithium );
- Neutronium .addOreByProducts(Neutronium );
- Lithium .addOreByProducts(Lithium );
- Silicon .addOreByProducts(SiliconDioxide );
- Salt .addOreByProducts(RockSalt );
- RockSalt .addOreByProducts(Salt );
-
- Glue.mChemicalFormula = "No Horses were harmed for the Production";
- UUAmplifier.mChemicalFormula = "Accelerates the Mass Fabricator";
- LiveRoot.mChemicalFormula = "";
- WoodSealed.mChemicalFormula = "";
- Wood.mChemicalFormula = "";
- FoolsRuby.mChemicalFormula = Ruby.mChemicalFormula;
-
- // Naquadah is green when molten, so this reflects the Color change approciately
- Naquadah.mMoltenRGBa[0] = 0;
- Naquadah.mMoltenRGBa[1] = 255;
- Naquadah.mMoltenRGBa[2] = 0;
- Naquadah.mMoltenRGBa[3] = 0;
- NaquadahEnriched.mMoltenRGBa[0] = 64;
- NaquadahEnriched.mMoltenRGBa[1] = 255;
- NaquadahEnriched.mMoltenRGBa[2] = 64;
- NaquadahEnriched.mMoltenRGBa[3] = 0;
- Naquadria.mMoltenRGBa[0] = 128;
- Naquadria.mMoltenRGBa[1] = 255;
- Naquadria.mMoltenRGBa[2] = 128;
- Naquadria.mMoltenRGBa[3] = 0;
-
- NaquadahEnriched.mChemicalFormula = "Nq+";
- Naquadah.mChemicalFormula = "Nq";
- Naquadria.mChemicalFormula = "NqX";
- }
-
- public static Materials get(String aMaterialName) {
- Object tObject = GT_Utility.getFieldContent(Materials.class, aMaterialName, F, F);
- if (tObject != null && tObject instanceof Materials) return (Materials)tObject;
- return _NULL;
- }
-
- public static Materials getRealMaterial(String aMaterialName) {
- return get(aMaterialName).mMaterialInto;
- }
-
- /**
- * Called in preInit with the Config to set Values.
- * @param aConfiguration
- */
- public static void init(GT_Config aConfiguration) {
- for (Materials tMaterial : VALUES) {
- String tString = tMaterial.toString().toLowerCase();
- tMaterial.mHeatDamage = (float)aConfiguration.get(ConfigCategories.Materials.heatdamage, tString, tMaterial.mHeatDamage);
- if (tMaterial.mBlastFurnaceRequired) tMaterial.mBlastFurnaceRequired = aConfiguration.get(ConfigCategories.Materials.blastfurnacerequirements, tString, T);
- if (tMaterial.mBlastFurnaceRequired && aConfiguration.get(ConfigCategories.Materials.blastinductionsmelter, tString, tMaterial.mBlastFurnaceTemp < 1500)) GT_ModHandler.ThermalExpansion.addSmelterBlastOre(tMaterial);
- tMaterial.mHandleMaterial = (tMaterial==Desh?tMaterial.mHandleMaterial:tMaterial==Diamond||tMaterial==Thaumium?Wood:tMaterial.contains(SubTag.BURNING)?Blaze:tMaterial.contains(SubTag.MAGICAL)&&tMaterial.contains(SubTag.CRYSTAL)&&Loader.isModLoaded(MOD_ID_TC)?Thaumium:tMaterial.getMass()>Element.Tc.getMass()*2?TungstenSteel:tMaterial.getMass()>Element.Tc.getMass()?Steel:Wood);
- }
- }
-
- public boolean isRadioactive() {
- if (mElement != null) return mElement.mHalfLifeSeconds >= 0;
- for (MaterialStack tMaterial : mMaterialList) if (tMaterial.mMaterial.isRadioactive()) return T;
- return F;
- }
-
- public long getProtons() {
- if (mElement != null) return mElement.getProtons();
- if (mMaterialList.size() <= 0) return Element.Tc.getProtons();
- long rAmount = 0, tAmount = 0;
- for (MaterialStack tMaterial : mMaterialList) {
- tAmount += tMaterial.mAmount;
- rAmount += tMaterial.mAmount * tMaterial.mMaterial.getProtons();
- }
- return (getDensity() * rAmount) / (tAmount * M);
- }
-
- public long getNeutrons() {
- if (mElement != null) return mElement.getNeutrons();
- if (mMaterialList.size() <= 0) return Element.Tc.getNeutrons();
- long rAmount = 0, tAmount = 0;
- for (MaterialStack tMaterial : mMaterialList) {
- tAmount += tMaterial.mAmount;
- rAmount += tMaterial.mAmount * tMaterial.mMaterial.getNeutrons();
- }
- return (getDensity() * rAmount) / (tAmount * M);
- }
-
- public long getMass() {
- if (mElement != null) return mElement.getMass();
- if (mMaterialList.size() <= 0) return Element.Tc.getMass();
- long rAmount = 0, tAmount = 0;
- for (MaterialStack tMaterial : mMaterialList) {
- tAmount += tMaterial.mAmount;
- rAmount += tMaterial.mAmount * tMaterial.mMaterial.getMass();
- }
- return (getDensity() * rAmount) / (tAmount * M);
- }
-
- public long getDensity() {
- return mDensity;
- }
-
- public String getToolTip() {
- return getToolTip(1, F);
- }
-
- public String getToolTip(boolean aShowQuestionMarks) {
- return getToolTip(1, aShowQuestionMarks);
- }
-
- public String getToolTip(long aMultiplier) {
- return getToolTip(aMultiplier, F);
- }
-
- public String getToolTip(long aMultiplier, boolean aShowQuestionMarks) {
- if (!aShowQuestionMarks && mChemicalFormula.equals("?")) return "";
- if (aMultiplier >= M * 2 && !mMaterialList.isEmpty()) {
- return ((mElement != null || (mMaterialList.size() < 2 && mMaterialList.get(0).mAmount == 1))?mChemicalFormula:"(" + mChemicalFormula + ")") + aMultiplier;
- }
- return mChemicalFormula;
- }
-
- private final ArrayList<ItemStack> mMaterialItems = new ArrayList<ItemStack>();
-
- /**
- * Adds an ItemStack to this Material.
- */
- public Materials add(ItemStack aStack) {
- if (aStack != null && !contains(aStack)) mMaterialItems.add(aStack);
- return this;
- }
-
- /**
- * This is used to determine if any of the ItemStacks belongs to this Material.
- */
- public boolean contains(ItemStack... aStacks) {
- if (aStacks == null || aStacks.length <= 0) return F;
- for (ItemStack tStack : mMaterialItems) for (ItemStack aStack : aStacks) if (GT_Utility.areStacksEqual(aStack, tStack, !tStack.hasTagCompound())) return T;
- return F;
- }
-
- /**
- * This is used to determine if an ItemStack belongs to this Material.
- */
- public boolean remove(ItemStack aStack) {
- if (aStack == null) return F;
- boolean temp = F;
- for (int i = 0; i < mMaterialItems.size(); i++) if (GT_Utility.areStacksEqual(aStack, mMaterialItems.get(i))) {
- mMaterialItems.remove(i--);
- temp = T;
- }
- return temp;
- }
-
- private final Collection<SubTag> mSubTags = new HashSet<SubTag>();
-
- /**
- * Adds a SubTag to this Material
- */
- @Override
- public ISubTagContainer add(SubTag... aTags) {
- if (aTags != null) for (SubTag aTag : aTags) if (aTag != null && !contains(aTag)) {
- aTag.addContainerToList(this);
- mSubTags.add(aTag);
- }
- return this;
- }
-
- /**
- * If this Material has this exact SubTag
- */
- @Override
- public boolean contains(SubTag aTag) {
- return mSubTags.contains(aTag);
- }
-
- /**
- * Removes a SubTag from this Material
- */
- @Override
- public boolean remove(SubTag aTag) {
- return mSubTags.remove(aTag);
- }
-
- /**
- * Sets the Heat Damage for this Material (negative = frost)
- */
- public Materials setHeatDamage(float aHeatDamage) {
- mHeatDamage = aHeatDamage;
- return this;
- }
-
- /**
- * Adds a Material to the List of Byproducts when grinding this Ore.
- * Is used for more precise Ore grinding, so that it is possible to choose between certain kinds of Materials.
- */
- public Materials addOreByProduct(Materials aMaterial) {
- if (!mOreByProducts.contains(aMaterial.mMaterialInto)) mOreByProducts.add(aMaterial.mMaterialInto);
- return this;
- }
-
- /**
- * Adds multiple Materials to the List of Byproducts when grinding this Ore.
- * Is used for more precise Ore grinding, so that it is possible to choose between certain kinds of Materials.
- */
- public Materials addOreByProducts(Materials... aMaterials) {
- for (Materials tMaterial : aMaterials) if (tMaterial != null) addOreByProduct(tMaterial);
- return this;
- }
-
- /**
- * If this Ore gives multiple drops of its Main Material.
- * Lapis Ore for example gives about 6 drops.
- */
- public Materials setOreMultiplier(int aOreMultiplier) {
- if (aOreMultiplier > 0) mOreMultiplier = aOreMultiplier;
- return this;
- }
-
- /**
- * If this Ore gives multiple drops of its Byproduct Material.
- */
- public Materials setByProductMultiplier(int aByProductMultiplier) {
- if (aByProductMultiplier > 0) mByProductMultiplier = aByProductMultiplier;
- return this;
- }
-
- /**
- * If this Ore gives multiple drops of its Main Material.
- * Lapis Ore for example gives about 6 drops.
- */
- public Materials setSmeltingMultiplier(int aSmeltingMultiplier) {
- if (aSmeltingMultiplier > 0) mSmeltingMultiplier = aSmeltingMultiplier;
- return this;
- }
-
- /**
- * This Ore should be smolten directly into an Ingot of this Material instead of an Ingot of itself.
- */
- public Materials setDirectSmelting(Materials aMaterial) {
- if (aMaterial != null) mDirectSmelting = aMaterial.mMaterialInto.mDirectSmelting;
- return this;
- }
-
- /**
- * This Material should be the Main Material this Ore gets ground into.
- * Example, Chromite giving Chrome or Tungstate giving Tungsten.
- */
- public Materials setOreReplacement(Materials aMaterial) {
- if (aMaterial != null) mOreReplacement = aMaterial.mMaterialInto.mOreReplacement;
- return this;
- }
-
- /**
- * This Material smelts always into an instance of aMaterial. Used for Magnets.
- */
- public Materials setSmeltingInto(Materials aMaterial) {
- if (aMaterial != null) mSmeltInto = aMaterial.mMaterialInto.mSmeltInto;
- return this;
- }
-
- /**
- * This Material arc smelts always into an instance of aMaterial. Used for Wrought Iron.
- */
- public Materials setArcSmeltingInto(Materials aMaterial) {
- if (aMaterial != null) mArcSmeltInto = aMaterial.mMaterialInto.mArcSmeltInto;
- return this;
- }
-
- /**
- * This Material macerates always into an instance of aMaterial.
- */
- public Materials setMaceratingInto(Materials aMaterial) {
- if (aMaterial != null) mMacerateInto = aMaterial.mMaterialInto.mMacerateInto;
- return this;
- }
-
- public Materials setEnchantmentForTools(Enchantment aEnchantment, int aEnchantmentLevel) {
- mEnchantmentTools = aEnchantment;
- mEnchantmentToolsLevel = (byte)aEnchantmentLevel;
- return this;
- }
-
- public Materials setEnchantmentForArmors(Enchantment aEnchantment, int aEnchantmentLevel) {
- mEnchantmentArmors = aEnchantment;
- mEnchantmentArmorsLevel = (byte)aEnchantmentLevel;
- return this;
- }
-
- /**
- * This Array can be changed dynamically by a Tick Handler in order to get a glowing Effect on all GT Meta Items out of this Material.
- */
- public final short[] mRGBa = new short[] {255, 255, 255, 0}, mMoltenRGBa = new short[] {255, 255, 255, 0};
-
- public Enchantment mEnchantmentTools = null, mEnchantmentArmors = null;
- public byte mEnchantmentToolsLevel = 0, mEnchantmentArmorsLevel = 0;
- public final TextureSet mIconSet;
- public boolean mBlastFurnaceRequired = F;
- public float mToolSpeed = 1.0F, mHeatDamage = 0.0F;
- public String mChemicalFormula = "?", mDefaultLocalName = "null";
- public Dyes mColor = Dyes._NULL;
- public short mMeltingPoint = 0, mBlastFurnaceTemp = 0;
- public int mTypes = 0, mDurability = 16, mFuelPower = 0, mFuelType = 0, mExtraData = 0, mOreValue = 0, mOreMultiplier = 1, mByProductMultiplier = 1, mSmeltingMultiplier = 1;
- public long mDensity = M;
- public Element mElement = null;
- public Materials mDirectSmelting = this, mOreReplacement = this, mMacerateInto = this, mSmeltInto = this, mArcSmeltInto = this, mHandleMaterial = this;
- public byte mToolQuality = 0;
- public final int mMetaItemSubID;
- public final boolean mUnificatable;
- public final Materials mMaterialInto;
- public final List<MaterialStack> mMaterialList = new ArrayList<MaterialStack>();
- public final List<Materials> mOreByProducts = new ArrayList<Materials>(), mOreReRegistrations = new ArrayList<Materials>();
- public final List<TC_AspectStack> mAspects = new ArrayList<TC_AspectStack>();
- public Fluid mSolid = null, mFluid = null, mGas = null, mPlasma = null;
- /** This Fluid is used as standard Unit for Molten Materials. 1296 is a Molten Block, what means 144 is one Material Unit worth */
- public Fluid mStandardMoltenFluid = null;
-
- public FluidStack getSolid(long aAmount) {
- if (mSolid == null) return null;
- return new GT_FluidStack(mSolid, (int)aAmount);
- }
-
- public FluidStack getFluid(long aAmount) {
- if (mFluid == null) return null;
- return new GT_FluidStack(mFluid, (int)aAmount);
- }
-
- public FluidStack getGas(long aAmount) {
- if (mGas == null) return null;
- return new GT_FluidStack(mGas, (int)aAmount);
- }
-
- public FluidStack getPlasma(long aAmount) {
- if (mPlasma == null) return null;
- return new GT_FluidStack(mPlasma, (int)aAmount);
- }
-
- public FluidStack getMolten(long aAmount) {
- if (mStandardMoltenFluid == null) return null;
- return new GT_FluidStack(mStandardMoltenFluid, (int)aAmount);
- }
-
- private Materials(int aMetaItemSubID, TextureSet aIconSet, float aToolSpeed, int aToolDurability, int aToolQuality, boolean aUnificatable) {
- mUnificatable = aUnificatable;
- mMaterialInto = this;
- mMetaItemSubID = aMetaItemSubID;
- mToolQuality = (byte)aToolQuality;
- mDurability = aToolDurability;
- mToolSpeed = aToolSpeed;
- mIconSet = aIconSet;
- if (aMetaItemSubID >= 0) {
- if (GregTech_API.sGeneratedMaterials[aMetaItemSubID] == null) {
- GregTech_API.sGeneratedMaterials[aMetaItemSubID] = this;
- } else {
- throw new IllegalArgumentException("The Index " + aMetaItemSubID + " is already used!");
- }
- }
- }
-
- private Materials(Materials aMaterialInto, boolean aReRegisterIntoThis) {
- mUnificatable = F;
- mDefaultLocalName = aMaterialInto.mDefaultLocalName;
- mMaterialInto = aMaterialInto.mMaterialInto;
- if (aReRegisterIntoThis) mMaterialInto.mOreReRegistrations.add(this);
- mChemicalFormula = aMaterialInto.mChemicalFormula;
- mMetaItemSubID = -1;
- mIconSet = TextureSet.SET_NONE;
- }
-
- /**
- * @param aMetaItemSubID the Sub-ID used in my own MetaItems. Range 0-1000. -1 for no Material
- * @param aTypes which kind of Items should be generated. Bitmask as follows:
- * 1 = Dusts of all kinds.
- * 2 = Dusts, Ingots, Plates, Rods/Sticks, Machine Components and other Metal specific things.
- * 4 = Dusts, Gems, Plates, Lenses (if transparent).
- * 8 = Dusts, Impure Dusts, crushed Ores, purified Ores, centrifuged Ores etc.
- * 16 = Cells
- * 32 = Plasma Cells
- * 64 = Tool Heads
- * 128 = Gears
- * @param aR, aG, aB Color of the Material 0-255 each.
- * @param aA transparency of the Material Texture. 0 = fully visible, 255 = Invisible.
- * @param aLocalName The Name used as Default for localization.
- * @param aFuelType Type of Generator to get Energy from this Material.
- * @param aFuelPower EU generated. Will be multiplied by 1000, also additionally multiplied by 2 for Gems.
- * @param aAmplificationValue Amount of UUM amplifier gotten from this.
- * @param aUUMEnergy Amount of EU needed to shape the UUM into this Material.
- * @param aMeltingPoint Used to determine the smelting Costs in Furnii.
- * @param aBlastFurnaceTemp Used to determine the needed Heat capactiy Costs in Blast Furnii.
- * @param aBlastFurnaceRequired If this requires a Blast Furnace.
- * @param aColor Vanilla MC Wool Color which comes the closest to this.
- */
- private Materials(int aMetaItemSubID, TextureSet aIconSet, float aToolSpeed, int aToolDurability, int aToolQuality, int aTypes, int aR, int aG, int aB, int aA, String aLocalName, int aFuelType, int aFuelPower, int aMeltingPoint, int aBlastFurnaceTemp, boolean aBlastFurnaceRequired, boolean aTransparent, int aOreValue, int aDensityMultiplier, int aDensityDivider, Dyes aColor) {
- this(aMetaItemSubID, aIconSet, aToolSpeed, aToolDurability, aToolQuality, T);
- mDefaultLocalName = aLocalName;
- mMeltingPoint = (short)aMeltingPoint;
- mBlastFurnaceTemp = (short)aBlastFurnaceTemp;
- mBlastFurnaceRequired = aBlastFurnaceRequired;
- if (aTransparent) add(SubTag.TRANSPARENT);
- mFuelPower = aFuelPower;
- mFuelType = aFuelType;
- mOreValue = aOreValue;
- mDensity = (M * aDensityMultiplier) / aDensityDivider;
- mColor = aColor==null?Dyes._NULL:aColor;
- if (mColor != null) add(SubTag.HAS_COLOR);
- mRGBa[0] = mMoltenRGBa[0] = (short)aR;
- mRGBa[1] = mMoltenRGBa[1] = (short)aG;
- mRGBa[2] = mMoltenRGBa[2] = (short)aB;
- mRGBa[3] = mMoltenRGBa[3] = (short)aA;
- mTypes = aTypes;
- if ((mTypes & 2) != 0) add(SubTag.SMELTING_TO_FLUID);
- }
-
- private Materials(int aMetaItemSubID, TextureSet aIconSet, float aToolSpeed, int aToolDurability, int aToolQuality, int aTypes, int aR, int aG, int aB, int aA, String aLocalName, int aFuelType, int aFuelPower, int aMeltingPoint, int aBlastFurnaceTemp, boolean aBlastFurnaceRequired, boolean aTransparent, int aOreValue, int aDensityMultiplier, int aDensityDivider, Dyes aColor, List<TC_AspectStack> aAspects) {
- this(aMetaItemSubID, aIconSet, aToolSpeed, aToolDurability, aToolQuality, aTypes, aR, aG, aB, aA, aLocalName, aFuelType, aFuelPower, aMeltingPoint, aBlastFurnaceTemp, aBlastFurnaceRequired, aTransparent, aOreValue, aDensityMultiplier, aDensityDivider, aColor);
- mAspects.addAll(aAspects);
- }
-
- /**
- * @param aElement The Element Enum represented by this Material
- */
- private Materials(int aMetaItemSubID, TextureSet aIconSet, float aToolSpeed, int aToolDurability, int aToolQuality, int aTypes, int aR, int aG, int aB, int aA, String aLocalName, int aFuelType, int aFuelPower, int aMeltingPoint, int aBlastFurnaceTemp, boolean aBlastFurnaceRequired, boolean aTransparent, int aOreValue, int aDensityMultiplier, int aDensityDivider, Dyes aColor, Element aElement, List<TC_AspectStack> aAspects) {
- this(aMetaItemSubID, aIconSet, aToolSpeed, aToolDurability, aToolQuality, aTypes, aR, aG, aB, aA, aLocalName, aFuelType, aFuelPower, aMeltingPoint, aBlastFurnaceTemp, aBlastFurnaceRequired, aTransparent, aOreValue, aDensityMultiplier, aDensityDivider, aColor);
- mElement = aElement;
- mElement.mLinkedMaterials.add(this);
- if (aElement == Element._NULL) {
- mChemicalFormula = "Empty";
- } else {
- mChemicalFormula = aElement.toString();
- mChemicalFormula = mChemicalFormula.replaceAll("_", "-");
- }
- mAspects.addAll(aAspects);
- }
-
- private Materials(int aMetaItemSubID, TextureSet aIconSet, float aToolSpeed, int aToolDurability, int aToolQuality, int aTypes, int aR, int aG, int aB, int aA, String aLocalName, int aFuelType, int aFuelPower, int aMeltingPoint, int aBlastFurnaceTemp, boolean aBlastFurnaceRequired, boolean aTransparent, int aOreValue, int aDensityMultiplier, int aDensityDivider, Dyes aColor, int aExtraData, List<MaterialStack> aMaterialList) {
- this(aMetaItemSubID, aIconSet, aToolSpeed, aToolDurability, aToolQuality, aTypes, aR, aG, aB, aA, aLocalName, aFuelType, aFuelPower, aMeltingPoint, aBlastFurnaceTemp, aBlastFurnaceRequired, aTransparent, aOreValue, aDensityMultiplier, aDensityDivider, aColor, aExtraData, aMaterialList, null);
- }
-
- private Materials(int aMetaItemSubID, TextureSet aIconSet, float aToolSpeed, int aToolDurability, int aToolQuality, int aTypes, int aR, int aG, int aB, int aA, String aLocalName, int aFuelType, int aFuelPower, int aMeltingPoint, int aBlastFurnaceTemp, boolean aBlastFurnaceRequired, boolean aTransparent, int aOreValue, int aDensityMultiplier, int aDensityDivider, Dyes aColor, int aExtraData, List<MaterialStack> aMaterialList, List<TC_AspectStack> aAspects) {
- this(aMetaItemSubID, aIconSet, aToolSpeed, aToolDurability, aToolQuality, aTypes, aR, aG, aB, aA, aLocalName, aFuelType, aFuelPower, aMeltingPoint, aBlastFurnaceTemp, aBlastFurnaceRequired, aTransparent, aOreValue, aDensityMultiplier, aDensityDivider, aColor);
- mExtraData = aExtraData;
- mMaterialList.addAll(aMaterialList);
- mChemicalFormula = "";
- for (MaterialStack tMaterial : mMaterialList) mChemicalFormula += tMaterial.toString();
- mChemicalFormula = mChemicalFormula.replaceAll("_", "-");
-
- int tAmountOfComponents = 0, tMeltingPoint = 0;
- for (MaterialStack tMaterial : mMaterialList) {
- tAmountOfComponents += tMaterial.mAmount;
- if (tMaterial.mMaterial.mMeltingPoint > 0) tMeltingPoint += tMaterial.mMaterial.mMeltingPoint * tMaterial.mAmount;
- if (aAspects == null) for (TC_AspectStack tAspect : tMaterial.mMaterial.mAspects) tAspect.addToAspectList(mAspects);
- }
-
- if (mMeltingPoint < 0) mMeltingPoint = (short)(tMeltingPoint / tAmountOfComponents);
-
- tAmountOfComponents *= aDensityMultiplier;
- tAmountOfComponents /= aDensityDivider;
- if (aAspects == null) for (TC_AspectStack tAspect : mAspects) tAspect.mAmount = Math.max(1, tAspect.mAmount / Math.max(1, tAmountOfComponents)); else mAspects.addAll(aAspects);
- }
-
- public static volatile int VERSION = 508;
-
- @Override
- public short[] getRGBA() {
- return mRGBa;
- }
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/enums/OreDictNames.java b/main/java/gregtech/api/enums/OreDictNames.java
deleted file mode 100644
index 4ba2b7b158..0000000000
--- a/main/java/gregtech/api/enums/OreDictNames.java
+++ /dev/null
@@ -1,78 +0,0 @@
-package gregtech.api.enums;
-
-
-public enum OreDictNames {
- craftingAnvil,
- craftingBook,
- craftingCentrifuge,
- craftingChest,
- craftingCompressor,
- craftingConveyor,
- craftingDiamondBlade,
- craftingDrain,
- craftingDuctTape,
- craftingElectricFurnace,
- craftingElectromagnet,
- enderChest, // Vanilla OreDict Name
- craftingEnergyCellUpgrade,
- craftingEnergyMeter,
- craftingExtractor,
- craftingFeather,
- craftingFurnace,
- craftingFilter,
- craftingGenerator,
- craftingGeothermalGenerator,
- craftingGrinder,
- craftingInductionFurnace,
- craftingIndustrialDiamond,
- craftingIronFurnace,
- craftingLensBlack,
- craftingLensBlue,
- craftingLensBrown,
- craftingLensCyan,
- craftingLensGray,
- craftingLensGreen,
- craftingLensLightBlue,
- craftingLensLightGray,
- craftingLensLime,
- craftingLensMagenta,
- craftingLensOrange,
- craftingLensPink,
- craftingLensPurple,
- craftingLensRed,
- craftingLensWhite,
- craftingLensYellow,
- craftingMacerator,
- craftingMetalformer,
- craftingPiston,
- craftingPump,
- craftingQuantumChestUpgrade,
- craftingQuartz,
- craftingRawMachineTier00,
- craftingRawMachineTier01,
- craftingRawMachineTier02,
- craftingRawMachineTier03,
- craftingRawMachineTier04,
- craftingRecycler,
- craftingRedstoneReceiver,
- craftingRedstoneTorch,
- craftingRedstoneTranceiver,
- craftingRedstoneTransmitter,
- craftingSafe,
- craftingSteamTank,
- craftingSteamUpgrade,
- craftingSuperconductor,
- craftingTank,
- craftingTeleporter,
- craftingThermalCentrifuge,
- craftingTurbineBladeBronze,
- craftingTurbineBladeCarbon,
- craftingTurbineBladeMagnalium,
- craftingTurbineBladeSteel,
- craftingTurbineBladeTungstenSteel,
- craftingWireCopper,
- craftingWireGold,
- craftingWireIron,
- craftingWireTin,
- craftingWorkBench,
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/enums/OrePrefixes.java b/main/java/gregtech/api/enums/OrePrefixes.java
deleted file mode 100644
index fb7510dd45..0000000000
--- a/main/java/gregtech/api/enums/OrePrefixes.java
+++ /dev/null
@@ -1,798 +0,0 @@
-package gregtech.api.enums;
-
-import static gregtech.api.enums.GT_Values.*;
-import gregtech.api.enums.TC_Aspects.TC_AspectStack;
-import gregtech.api.interfaces.ICondition;
-import gregtech.api.interfaces.IOreRecipeRegistrator;
-import gregtech.api.interfaces.ISubTagContainer;
-import gregtech.api.objects.ItemData;
-import gregtech.api.objects.MaterialStack;
-import gregtech.api.util.GT_Log;
-import gregtech.api.util.GT_Utility;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.List;
-
-import net.minecraft.item.ItemStack;
-
-public enum OrePrefixes {
- @Deprecated pulp ("Pulps" , "" , "" ,F,F,F,F,F,F,F,F,F,F, B[0]|B[1]|B[2]|B[3] , -1, 64, -1),
- @Deprecated leaves ("Leaves" , "" , "" ,F,F,F,F,F,F,F,F,F,F, 0 , -1, 64, -1),
- @Deprecated sapling ("Saplings" , "" , "" ,F,F,F,F,F,F,F,F,F,F, 0 , -1, 64, -1),
- @Deprecated itemDust ("Dusts" , "" , "" ,F,F,F,F,F,F,F,F,F,F, B[0]|B[1]|B[2]|B[3] , -1, 64, -1),
- oreBlackgranite ("Black Granite Ores" , "Granite " , " Ore" ,T,T,F,F,F,T,F,F,F,T, B[3] , -1, 64, -1), // In case of an End-Ores Mod. Ore -> Material is a Oneway Operation!
- oreRedgranite ("Red Granite Ores" , "Granite " , " Ore" ,T,T,F,F,F,T,F,F,F,T, B[3] , -1, 64, -1), // In case of an End-Ores Mod. Ore -> Material is a Oneway Operation!
- oreNetherrack ("Netherrack Ores" , "Nether " , " Ore" ,T,T,F,F,F,T,F,F,F,T, B[3] , -1, 64, -1), // Prefix of the Nether-Ores Mod. Causes Ores to double. Ore -> Material is a Oneway Operation!
- oreNether ("Nether Ores" , "Nether " , " Ore" ,T,T,F,F,F,T,F,F,F,T, B[3] , -1, 64, -1), // Prefix of the Nether-Ores Mod. Causes Ores to double. Ore -> Material is a Oneway Operation!
- @Deprecated denseore ("Dense Ores" , "" , "" ,F,F,F,F,F,T,F,F,F,T, B[3] , -1, 64, -1),
- oreDense ("Dense Ores" , "Dense " , " Ore" ,T,T,F,F,F,T,F,F,F,T, B[3] , -1, 64, -1), // Prefix of the Dense-Ores Mod. Causes Ores to double. Ore -> Material is a Oneway Operation!
- oreRich ("Rich Ores" , "Rich " , " Ore" ,T,T,F,F,F,T,F,F,F,T, B[3] , -1, 64, -1), // Prefix of TFC
- oreNormal ("Normal Ores" , "Normal " , " Ore" ,T,T,F,F,F,T,F,F,F,T, B[3] , -1, 64, -1), // Prefix of TFC
- oreSmall ("Small Ores" , "Small " , " Ore" ,T,T,F,F,F,T,F,F,F,T, B[3] , -1, 64, 67), // Prefix of Railcraft.
- orePoor ("Poor Ores" , "Poor " , " Ore" ,T,T,F,F,F,T,F,F,F,T, B[3] , -1, 64, -1), // Prefix of Railcraft.
- oreEndstone ("Endstone Ores" , "End " , " Ore" ,T,T,F,F,F,T,F,F,F,T, B[3] , -1, 64, -1), // In case of an End-Ores Mod. Ore -> Material is a Oneway Operation!
- oreEnd ("End Ores" , "End " , " Ore" ,T,T,F,F,F,T,F,F,F,T, B[3] , -1, 64, -1), // In case of an End-Ores Mod. Ore -> Material is a Oneway Operation!
- @Deprecated oreGem ("Ores" , "" , "" ,F,F,F,F,F,T,F,F,F,T, B[3] , -1, 64, -1),
- ore ("Ores" , "" , " Ore" ,T,T,F,F,F,T,F,F,F,T, B[3] , -1, 64, 68), // Regular Ore Prefix. Ore -> Material is a Oneway Operation! Introduced by Eloraam
- crushedCentrifuged ("Centrifuged Ores" , "Centrifuged " , " Ore" ,T,T,F,F,F,F,F,T,F,T, B[3] , -1, 64, 7),
- crushedPurified ("Purified Ores" , "Purified " , " Ore" ,T,T,F,F,F,F,F,T,F,T, B[3] , -1, 64, 6),
- crushed ("Crushed Ores" , "Crushed " , " Ore" ,T,T,F,F,F,F,F,T,F,T, B[3] , -1, 64, 5),
- shard ("Crystallised Shards" , "" , "" ,T,T,F,F,F,F,F,F,F,T, B[3] , -1, 64, -1), // Introduced by Mekanism
- clump ("Clumps" , "" , "" ,T,T,F,F,F,F,F,F,F,T, B[3] , -1, 64, -1),
- reduced ("Reduced Gravels" , "" , "" ,T,T,F,F,F,F,F,F,F,T, B[3] , -1, 64, -1),
- crystalline ("Crystallised Metals" , "" , "" ,T,T,F,F,F,F,F,F,F,T, B[3] , -1, 64, -1),
- cleanGravel ("Clean Gravels" , "" , "" ,T,T,F,F,F,F,F,F,F,T, B[3] , -1, 64, -1),
- dirtyGravel ("Dirty Gravels" , "" , "" ,T,T,F,F,F,F,F,F,F,T, B[3] , -1, 64, -1),
- ingotQuintuple ("5x Ingots" , "Quintuple " , " Ingot" ,T,T,F,F,F,F,T,T,F,F, B[1] , M * 5 , 12, 16), // A quintuple Ingot.
- ingotQuadruple ("4x Ingots" , "Quadruple " , " Ingot" ,T,T,F,F,F,F,T,T,F,F, B[1] , M * 4 , 16, 15), // A quadruple Ingot.
- @Deprecated ingotQuad ("4x Ingots" , "Quadruple " , " Ingot" ,F,F,F,F,F,F,F,F,F,F, B[1] , -1, 16, 15),
- ingotTriple ("3x Ingots" , "Triple " , " Ingot" ,T,T,F,F,F,F,T,F,F,F, B[1] , M * 3 , 21, 14), // A triple Ingot.
- ingotDouble ("2x Ingots" , "Double " , " Ingot" ,T,T,F,F,F,F,T,T,F,F, B[1] , M * 2 , 32, 13), // A double Ingot. Introduced by TerraFirmaCraft
- ingotHot ("Hot Ingots" , "Hot " , " Ingot" ,T,T,F,F,F,F,F,T,F,F, B[1] , M * 1 , 16, 12), // A hot Ingot, which has to be cooled down by a Vacuum Freezer.
- ingot ("Ingots" , "" , " Ingot" ,T,T,F,F,F,F,F,T,F,F, B[1] , M * 1 , 64, 11), // A regular Ingot. Introduced by Eloraam
- gemChipped ("Chipped Gemstones" , "Chipped " , "" ,T,T,T,F,F,F,T,T,F,F, B[2] , M / 4 , 64, 59), // A regular Gem worth one small Dust. Introduced by TerraFirmaCraft
- gemFlawed ("Flawed Gemstones" , "Flawed " , "" ,T,T,T,F,F,F,T,T,F,F, B[2] , M / 2 , 64, 60), // A regular Gem worth two small Dusts. Introduced by TerraFirmaCraft
- gemFlawless ("Flawless Gemstones" , "Flawless " , "" ,T,T,T,F,F,F,T,T,F,F, B[2] , M * 2 , 32, 61), // A regular Gem worth two Dusts. Introduced by TerraFirmaCraft
- gemExquisite ("Exquisite Gemstones" , "Exquisite " , "" ,T,T,T,F,F,F,T,T,F,F, B[2] , M * 4 , 16, 62), // A regular Gem worth four Dusts. Introduced by TerraFirmaCraft
- gem ("Gemstones" , "" , "" ,T,T,T,F,F,F,T,T,F,F, B[2] , M * 1 , 64, 8), // A regular Gem worth one Dust. Introduced by Eloraam
- @Deprecated dustDirty ("Impure Dusts" , "" , "" ,F,F,F,F,F,F,F,F,F,T, B[3] , -1, 64, 3),
- dustTiny ("Tiny Dusts" , "Tiny Pile of " , " Dust" ,T,T,F,F,F,F,F,T,F,F, B[0]|B[1]|B[2]|B[3] , M / 9 , 64, 0), // 1/9th of a Dust.
- dustSmall ("Small Dusts" , "Small Pile of " , " Dust" ,T,T,F,F,F,F,F,T,F,F, B[0]|B[1]|B[2]|B[3] , M / 4 , 64, 1), // 1/4th of a Dust.
- dustImpure ("Impure Dusts" , "Impure Pile of " , " Dust" ,T,T,F,F,F,F,F,T,F,T, B[3] , M * 1 , 64, 3), // Dust with impurities. 1 Unit of Main Material and 1/9 - 1/4 Unit of secondary Material
- dustRefined ("Refined Dusts" , "Refined Pile of " , " Dust" ,T,T,F,F,F,F,F,T,F,T, B[3] , M * 1 , 64, 2),
- dustPure ("Purified Dusts" , "Purified Pile of " , " Dust" ,T,T,F,F,F,F,F,T,F,T, B[3] , M * 1 , 64, 4),
- dust ("Dusts" , "" , " Dust" ,T,T,F,F,F,F,F,T,F,F, B[0]|B[1]|B[2]|B[3] , M * 1 , 64, 2), // Pure Dust worth of one Ingot or Gem. Introduced by Alblaka.
- nugget ("Nuggets" , "" , " Nugget" ,T,T,F,F,F,F,F,T,F,F, B[1] , M / 9 , 64, 9), // A Nugget. Introduced by Eloraam
- plateAlloy ("Alloy Plates" , "" , "" ,T,F,F,F,F,F,F,F,F,F, B[1] , -1, 64, 17), // Special Alloys have this prefix.
- plateSteamcraft ("Steamcraft Plates" , "" , "" ,F,F,F,F,F,F,F,F,F,F, B[1] , -1, 64, 17),
- plateDense ("Dense Plates" , "Dense " , " Plate" ,T,T,F,F,F,F,T,T,F,F, B[1] , M * 9 , 8, 22), // 9 Plates combined in one Item.
- plateQuintuple ("5x Plates" , "Quintuple " , " Plate" ,T,T,F,F,F,F,T,T,F,F, B[1] , M * 5 , 12, 21),
- plateQuadruple ("4x Plates" , "Quadruple " , " Plate" ,T,T,F,F,F,F,T,T,F,F, B[1] , M * 4 , 16, 20),
- @Deprecated plateQuad ("4x Plates" , "" , "" ,F,F,F,F,F,F,F,F,F,F, B[1] , -1, 16, 20),
- plateTriple ("3x Plates" , "Triple " , " Plate" ,T,T,F,F,F,F,T,T,F,F, B[1] , M * 3 , 21, 19),
- plateDouble ("2x Plates" , "Double " , " Plate" ,T,T,F,F,F,F,T,T,F,F, B[1] , M * 2 , 32, 18),
- plate ("Plates" , "" , " Plate" ,T,T,F,F,F,F,T,T,F,F, B[1]|B[2] , M * 1 , 64, 17), // Regular Plate made of one Ingot/Dust. Introduced by Calclavia
- foil ("Foils" , "" , " Foil" ,T,T,F,F,F,F,T,T,F,F, B[1] , M / 4 , 64, 29), // Foil made of 1/4 Ingot/Dust.
- stickLong ("Long Sticks/Rods" , "Long " , " Rod" ,T,T,F,F,F,F,T,T,F,F, B[1]|B[2] , M * 1 , 64, 54), // Stick made of an Ingot.
- stick ("Sticks/Rods" , "" , " Rod" ,T,T,F,F,F,F,T,T,F,F, B[1]|B[2] , M / 2 , 64, 23), // Stick made of half an Ingot. Introduced by Eloraam
- round ("Rounds" , "" , " Round" ,T,T,F,F,F,F,T,T,F,F, B[1] , M / 9 , 64, 25), // consisting out of one Nugget.
- bolt ("Bolts" , "" , " Bolt" ,T,T,F,F,F,F,T,T,F,F, B[1]|B[2] , M / 8 , 64, 26), // consisting out of 1/8 Ingot or 1/4 Stick.
- screw ("Screws" , "" , " Screw" ,T,T,F,F,F,F,T,T,F,F, B[1]|B[2] , M / 9 , 64, 27), // consisting out of a Bolt.
- ring ("Rings" , "" , " Ring" ,T,T,F,F,F,F,T,T,F,F, B[1] , M / 4 , 64, 28), // consisting out of 1/2 Stick.
- springSmall ("Small Springs" , "Small " , " Spring" ,T,T,F,F,F,F,T,T,F,F, B[1] , M / 4 , 64, 55), // consisting out of 1 Fine Wire.
- spring ("Springs" , "" , " Spring" ,T,T,F,F,F,F,T,T,F,F, B[1] , M * 1 , 64, 56), // consisting out of 2 Sticks.
- wireFine ("Fine Wires" , "Fine " , " Wire" ,T,T,F,F,F,F,T,T,F,F, B[1] , M / 8 , 64, 51), // consisting out of 1/8 Ingot or 1/4 Wire.
- rotor ("Rotors" , "" , " Rotor" ,T,T,F,F,F,F,T,T,F,F, B[7] ,M*4+M/4+M/9,16, 53), // consisting out of 4 Plates, 1 Ring and 1 Screw.
- gearGtSmall ("Small Gears" , "Small " , " Gear" ,T,T,F,F,F,F,T,T,F,F, B[7] , M * 1 , 64, 52),
- gearGt ("Gears" , "" , " Gear" ,T,T,F,F,F,F,T,T,F,F, B[7] , M * 4 , 16, 63), // Introduced by me because BuildCraft has ruined the gear Prefix...
- lens ("Lenses" , "" , " Lens" ,T,T,F,F,F,F,T,T,F,F, B[2] ,(M * 3)/ 4, 64, 24), // 3/4 of a Plate or Gem used to shape a Lense. Normally only used on Transparent Materials.
- crateGtDust ("Crates of Dust" , "Crate of " , " Dust" ,T,T,F,T,F,F,F,T,F,F, B[0]|B[1]|B[2]|B[3] , -1, 64, 96), // consisting out of 16 Dusts.
- crateGtPlate ("Crates of Plates" , "Crate of " , " Plate" ,T,T,F,T,F,F,F,T,F,F, B[1]|B[2] , -1, 64, 99), // consisting out of 16 Plates.
- crateGtIngot ("Crates of Ingots" , "Crate of " , " Ingot" ,T,T,F,T,F,F,F,T,F,F, B[1] , -1, 64, 97), // consisting out of 16 Ingots.
- crateGtGem ("Crates of Gems" , "Crate of " , " Gem" ,T,T,F,T,F,F,F,T,F,F, B[2] , -1, 64, 98), // consisting out of 16 Gems.
- cellPlasma ("Cells of Plasma" , "" , " Plasma Cell" ,T,T,T,T,F,F,F,T,F,F, B[5] , M * 1 , 64, 31), // Hot Cell full of Plasma, which can be used in the Plasma Generator.
- cell ("Cells" , "" , " Cell" ,T,T,T,T,F,F,T,T,F,F, B[4]|B[8] , M * 1 , 64, 30), // Regular Gas/Fluid Cell. Introduced by Calclavia
- bucket ("Buckets" , "" , " Bucket" ,T,T,T,T,F,F,T,F,F,F, B[4]|B[8] , M * 1 , 16, -1), // A vanilla Iron Bucket filled with the Material.
- bottle ("Bottles" , "" , " Bottle" ,T,T,T,T,F,F,F,F,F,F, B[4]|B[8] , -1, 16, -1), // Glass Bottle containing a Fluid.
- capsule ("Capsules" , "" , " Capsule" ,F,T,T,T,F,F,F,F,F,F, B[4]|B[8] , M * 1 , 16, -1),
- crystal ("Crystals" , "" , " Crystal" ,F,T,F,F,F,F,T,F,F,F, B[2] , M * 1 , 64, -1),
- bulletGtSmall ("Small Bullets" , "Small " , " Bullet" ,T,T,F,F,T,F,T,F,T,F, B[6]|B[8] , M / 9 , 64, -1),
- bulletGtMedium ("Medium Bullets" , "Medium " , " Bullet" ,T,T,F,F,T,F,T,F,T,F, B[6]|B[8] , M / 6 , 64, -1),
- bulletGtLarge ("Large Bullets" , "Large " , " Bullet" ,T,T,F,F,T,F,T,F,T,F, B[6]|B[8] , M / 3 , 64, -1),
- arrowGtWood ("Regular Arrows" , "" , " Arrow" ,T,T,F,F,T,F,T,F,T,F, B[6] , M / 4 , 64, 57), // Arrow made of 1/4 Ingot/Dust + Wooden Stick.
- arrowGtPlastic ("Light Arrows" , "Light " , " Arrow" ,T,T,F,F,T,F,T,F,T,F, B[6] , M / 4 , 64, 58), // Arrow made of 1/4 Ingot/Dust + Plastic Stick.
- arrow ("Arrows" , "" , "" ,F,F,T,F,F,F,F,F,T,F, B[6] , -1, 64, 57),
- toolHeadArrow ("Arrow Heads" , "" , " Arrow Head" ,T,T,F,F,F,F,T,T,F,F, B[6] , M / 4 , 64, 46), // consisting out of 1/4 Ingot.
- toolHeadSword ("Sword Blades" , "" , " Sword Blade" ,T,T,F,F,F,F,T,T,F,F, B[6] , M * 2 , 16, 32), // consisting out of 2 Ingots.
- toolHeadPickaxe ("Pickaxe Heads" , "" , " Pickaxe Head" ,T,T,F,F,F,F,T,T,F,F, B[6] , M * 3 , 16, 33), // consisting out of 3 Ingots.
- toolHeadShovel ("Shovel Heads" , "" , " Shovel Head" ,T,T,F,F,F,F,T,T,F,F, B[6] , M * 1 , 16, 34), // consisting out of 1 Ingots.
- toolHeadUniversalSpade ("Universal Spade Heads" , "" , " Universal Spade Head" ,T,T,F,F,F,F,T,T,F,F, B[6] , M * 1 , 16, 43), // consisting out of 1 Ingots.
- toolHeadAxe ("Axe Heads" , "" , " Axe Head" ,T,T,F,F,F,F,T,T,F,F, B[6] , M * 3 , 16, 35), // consisting out of 3 Ingots.
- toolHeadHoe ("Hoe Heads" , "" , " Hoe Head" ,T,T,F,F,F,F,T,T,F,F, B[6] , M * 2 , 16, 36), // consisting out of 2 Ingots.
- toolHeadSense ("Sense Blades" , "" , " Sense Blade" ,T,T,F,F,F,F,T,T,F,F, B[6] , M * 3 , 16, 44), // consisting out of 3 Ingots.
- toolHeadFile ("File Heads" , "" , " File Head" ,T,T,F,F,F,F,T,T,F,F, B[6] , M * 2 , 16, 38), // consisting out of 2 Ingots.
- toolHeadHammer ("Hammer Heads" , "" , " Hammer Head" ,T,T,F,F,F,F,T,T,F,F, B[6] , M * 6 , 16, 37), // consisting out of 6 Ingots.
- toolHeadPlow ("Plow Heads" , "" , " Plow Head" ,T,T,F,F,F,F,T,T,F,F, B[6] , M * 4 , 16, 45), // consisting out of 4 Ingots.
- toolHeadSaw ("Saw Blades" , "" , " Saw Blade" ,T,T,F,F,F,F,T,T,F,F, B[6] , M * 2 , 16, 39), // consisting out of 2 Ingots.
- toolHeadBuzzSaw ("Buzzsaw Blades" , "" , " Buzzsaw Blade" ,T,T,F,F,F,F,T,T,F,F, B[6] , M * 4 , 16, 48), // consisting out of 4 Ingots.
- toolHeadScrewdriver ("Screwdriver Tips" , "" , " Screwdriver Tip" ,T,T,F,F,F,F,T,F,F,F, B[6] , M * 1 , 16, 47), // consisting out of 1 Ingots.
- toolHeadDrill ("Drill Tips" , "" , " Drill Tip" ,T,T,F,F,F,F,T,T,F,F, B[6] , M * 4 , 16, 40), // consisting out of 4 Ingots.
- toolHeadChainsaw ("Chainsaw Tips" , "" , " Chainsaw Tip" ,T,T,F,F,F,F,T,T,F,F, B[6] , M * 2 , 16, 41), // consisting out of 2 Ingots.
- toolHeadWrench ("Wrench Tips" , "" , " Wrench Tip" ,T,T,F,F,F,F,T,T,F,F, B[6] , M * 4 , 16, 42), // consisting out of 4 Ingots.
- turbineBlade ("Turbine Blades" , "" , " Turbine Blade" ,T,T,F,F,F,F,T,T,F,F, B[6] , M * 6 , 64, 100), // consisting out of 6 Ingots.
- toolSword ("Swords" , "" , "" ,F,T,F,F,F,F,T,F,T,F, B[6] , M * 2 , 1, -1), // vanilly Sword
- toolPickaxe ("Pickaxes" , "" , "" ,F,T,F,F,F,F,T,F,T,F, B[6] , M * 3 , 1, -1), // vanilly Pickaxe
- toolShovel ("Shovels" , "" , "" ,F,T,F,F,F,F,T,F,T,F, B[6] , M * 1 , 1, -1), // vanilly Shovel
- toolAxe ("Axes" , "" , "" ,F,T,F,F,F,F,T,F,T,F, B[6] , M * 3 , 1, -1), // vanilly Axe
- toolHoe ("Hoes" , "" , "" ,F,T,F,F,F,F,T,F,T,F, B[6] , M * 2 , 1, -1), // vanilly Hoe
- toolShears ("Shears" , "" , "" ,F,T,F,F,F,F,T,F,T,F, B[6] , M * 2 , 1, -1), // vanilly Shears
- tool ("Tools" , "" , "" ,F,F,F,F,F,F,F,F,T,F, B[6] , -1, 1, -1), // toolPot, toolSkillet, toolSaucepan, toolBakeware, toolCuttingboard, toolMortarandpestle, toolMixingbowl, toolJuicer
- compressedCobblestone ("9^X Compressed Cobblestones" , "" , "" ,F,F,F,F,F,F,F,F,F,F, 0 , -1, 64, -1),
- compressedStone ("9^X Compressed Stones" , "" , "" ,F,F,F,F,F,F,F,F,F,F, 0 , -1, 64, -1),
- compressedDirt ("9^X Compressed Dirt" , "" , "" ,F,F,F,F,F,F,F,F,F,F, 0 , -1, 64, -1),
- compressedGravel ("9^X Compressed Gravel" , "" , "" ,F,F,F,F,F,F,F,F,F,F, 0 , -1, 64, -1),
- compressedSand ("9^X Compressed Sand" , "" , "" ,F,F,F,F,F,F,F,F,F,F, 0 , -1, 64, -1),
- compressed ("Compressed Materials" , "Compressed " , "" ,T,T,F,F,F,F,T,F,F,F, 0 , M * 2 , 64, -1), // Compressed Material, worth 1 Unit. Introduced by Galacticraft
- glass ("Glasses" , "" , "" ,F,F,T,F,T,F,F,F,F,F, 0 , -1, 64, -1),
- paneGlass ("Glass Panes" , "" , "" ,F,F,T,F,F,T,F,F,F,F, 0 , -1, 64, -1),
- blockGlass ("Glass Blocks" , "" , "" ,F,F,T,F,F,T,F,F,F,F, 0 , -1, 64, -1),
- blockWool ("Wool Blocks" , "" , "" ,F,F,T,F,F,T,F,F,F,F, 0 , -1, 64, -1),
- block_ ("Random Blocks" , "" , "" ,F,F,F,F,F,T,F,F,F,F, 0 , -1, 64, -1), // IGNORE
- block ("Storage Blocks" , "Block of " , "" ,T,T,F,F,F,T,T,F,F,F, 0 , M * 9 , 64, 71), // Storage Block consisting out of 9 Ingots/Gems/Dusts. Introduced by CovertJaguar
- craftingTool ("Crafting Tools" , "" , "" ,F,F,F,F,F,F,F,F,T,F, 0 , -1, 64, -1), // Special Prefix used mainly for the Crafting Handler.
- crafting ("Crafting Ingredients" , "" , "" ,F,F,F,F,F,F,F,F,F,F, 0 , -1, 64, -1), // Special Prefix used mainly for the Crafting Handler.
- craft ("Crafting Stuff?" , "" , "" ,F,F,F,F,F,F,F,F,F,F, 0 , -1, 64, -1), // Special Prefix used mainly for the Crafting Handler.
- log ("Logs" , "" , "" ,F,F,F,F,F,T,F,F,F,F, 0 , -1, 64, -1), // Prefix used for Logs. Usually as "logWood". Introduced by Eloraam
- slab ("Slabs" , "" , "" ,F,F,F,F,F,T,F,F,F,F, 0 , -1, 64, -1), // Prefix used for Slabs. Usually as "slabWood" or "slabStone". Introduced by SirSengir
- stair ("Stairs" , "" , "" ,F,F,F,F,F,T,F,F,F,F, 0 , -1, 64, -1), // Prefix used for Stairs. Usually as "stairWood" or "stairStone". Introduced by SirSengir
- fence ("Fences" , "" , "" ,F,F,F,F,F,F,F,F,F,F, 0 , -1, 64, -1), // Prefix used for Fences. Usually as "fenceWood". Introduced by Forge
- plank ("Planks" , "" , "" ,F,F,F,F,F,T,F,F,F,F, 0 , -1, 64, -1), // Prefix for Planks. Usually "plankWood". Introduced by Eloraam
- treeSapling ("Saplings" , "" , "" ,F,F,T,F,F,T,F,F,F,F, 0 , -1, 64, -1), // Prefix for Saplings.
- treeLeaves ("Leaves" , "" , "" ,F,F,T,F,F,T,F,F,F,F, 0 , -1, 64, -1), // Prefix for Leaves.
- tree ("Tree Parts" , "" , "" ,F,F,F,F,F,F,F,F,F,F, 0 , -1, 64, -1), // Prefix for Tree Parts.
- stoneCobble ("Cobblestones" , "" , "" ,F,F,T,F,F,T,F,F,F,F, 0 , -1, 64, -1), // Cobblestone Prefix for all Cobblestones.
- stoneSmooth ("Smoothstones" , "" , "" ,F,F,T,F,F,T,F,F,F,F, 0 , -1, 64, -1), // Smoothstone Prefix.
- stoneMossyBricks ("mossy Stone Bricks" , "" , "" ,F,F,T,F,F,T,F,F,F,F, 0 , -1, 64, -1), // Mossy Stone Bricks.
- stoneMossy ("Mossy Stones" , "" , "" ,F,F,T,F,F,T,F,F,F,F, 0 , -1, 64, -1), // Mossy Cobble.
- @Deprecated stoneBricksMossy("Mossy Stone Bricks" , "" , "" ,F,F,F,F,F,T,F,F,F,F, 0 , -1, 64, -1),
- stoneBricks ("Stone Bricks" , "" , "" ,F,F,T,F,F,T,F,F,F,F, 0 , -1, 64, -1), // Stone Bricks.
- @Deprecated stoneBrick ("Stone Bricks" , "" , "" ,F,F,F,F,F,T,F,F,F,F, 0 , -1, 64, -1),
- stoneCracked ("Cracked Stones" , "" , "" ,F,F,T,F,F,T,F,F,F,F, 0 , -1, 64, -1), // Cracked Bricks.
- stoneChiseled ("Chiseled Stones" , "" , "" ,F,F,T,F,F,T,F,F,F,F, 0 , -1, 64, -1), // Chiseled Stone.
- stone ("Stones" , "" , "" ,F,T,T,F,T,T,F,F,F,F, 0 , -1, 64, -1), // Prefix to determine which kind of Rock this is.
- cobblestone ("Cobblestones" , "" , "" ,F,T,T,F,F,T,F,F,F,F, 0 , -1, 64, -1),
- rock ("Rocks" , "" , "" ,F,T,T,F,T,T,F,F,F,F, 0 , -1, 64, -1), // Prefix to determine which kind of Rock this is.
- record ("Records" , "" , "" ,F,F,T,F,F,F,F,F,F,F, 0 , -1, 1, -1),
- rubble ("Rubbles" , "" , "" ,T,T,T,F,F,F,F,F,F,F, 0 , -1, 64, -1),
- scraps ("Scraps" , "" , "" ,T,T,F,F,F,F,F,F,F,F, 0 , -1, 64, -1),
- scrap ("Scraps" , "" , "" ,F,F,F,F,F,F,F,F,F,F, 0 , -1, 64, -1),
- item_ ("Items" , "" , "" ,F,F,F,F,F,F,F,F,F,F, 0 , -1, 64, -1), // IGNORE
- item ("Items" , "" , "" ,F,F,F,F,F,F,F,F,F,F, 0 , -1, 64, -1), // Random Item. Introduced by Alblaka
- book ("Books" , "" , "" ,F,F,F,F,F,F,F,F,F,F, 0 , -1, 64, -1), // Used for Books of any kind.
- paper ("Papers" , "" , "" ,F,F,F,F,F,F,F,F,F,F, 0 , -1, 64, -1), // Used for Papers of any kind.
- dye ("Dyes" , "" , "" ,F,F,T,F,F,F,F,F,F,F, 0 , -1, 64, -1), // Used for the 16 dyes. Introduced by Eloraam
- stainedClay ("Stained Clays" , "" , "" ,F,F,T,F,F,T,F,F,F,F, 0 , -1, 64, -1), // Used for the 16 colors of Stained Clay. Introduced by Forge
- armorHelmet ("Helmets" , "" , "" ,F,T,F,F,F,F,T,F,T,F, B[6] , M * 5 , 1, -1), // vanilly Helmet
- armorChestplate ("Chestplates" , "" , "" ,F,T,F,F,F,F,T,F,T,F, B[6] , M * 8 , 1, -1), // vanilly Chestplate
- armorLeggings ("Leggings" , "" , "" ,F,T,F,F,F,F,T,F,T,F, B[6] , M * 7 , 1, -1), // vanilly Pants
- armorBoots ("Boots" , "" , "" ,F,T,F,F,F,F,T,F,T,F, B[6] , M * 4 , 1, -1), // vanilly Boots
- armor ("Armor Parts" , "" , "" ,F,F,F,F,F,F,F,F,T,F, B[6] , -1, 1, -1),
- frameGt ("Frame Boxes" , "" , "" ,T,T,F,F,T,F,T,F,F,F, 0 , M * 2 , 64, 83),
- pipeTiny ("Tiny Pipes" , "Tiny " , " Pipe" ,T,T,F,F,T,F,T,F,F,F, 0 , M / 2 , 64, 78),
- pipeSmall ("Small Pipes" , "Small " , " Pipe" ,T,T,F,F,T,F,T,F,F,F, 0 , M * 1 , 64, 79),
- pipeMedium ("Medium Pipes" , "Medium " , " Pipe" ,T,T,F,F,T,F,T,F,F,F, 0 , M * 3 , 64, 80),
- pipeLarge ("Large pipes" , "Large " , " Pipe" ,T,T,F,F,T,F,T,F,F,F, 0 , M * 6 , 64, 81),
- pipeHuge ("Huge Pipes" , "Huge " , " Pipe" ,T,T,F,F,T,F,T,F,F,F, 0 , M *12 , 64, 82),
- pipeRestrictiveTiny ("Tiny Restrictive Pipes" , "Tiny Restrictive " , " Pipe" ,T,T,F,F,T,F,T,F,F,F, 0 , M / 2 , 64, 78),
- pipeRestrictiveSmall ("Small Restrictive Pipes" , "Small Restrictive " , " Pipe" ,T,T,F,F,T,F,T,F,F,F, 0 , M * 1 , 64, 79),
- pipeRestrictiveMedium ("Medium Restrictive Pipes" , "Medium Restrictive " , " Pipe" ,T,T,F,F,T,F,T,F,F,F, 0 , M * 3 , 64, 80),
- pipeRestrictiveLarge ("Large Restrictive Pipes" , "Large Restrictive " , " Pipe" ,T,T,F,F,T,F,T,F,F,F, 0 , M * 6 , 64, 81),
- pipeRestrictiveHuge ("Huge Restrictive Pipes" , "Huge Restrictive " , " Pipe" ,T,T,F,F,T,F,T,F,F,F, 0 , M *12 , 64, 82),
- pipe ("Pipes" , "" , " Pipe" ,F,F,F,F,F,F,F,F,F,F, 0 , -1, 64, 77),
- wireGt16 ("16x Wires" , "16x " , " Wire" ,T,T,F,F,F,F,T,F,F,F, 0 , M * 8 , 64, -1),
- wireGt12 ("12x Wires" , "12x " , " Wire" ,T,T,F,F,F,F,T,F,F,F, 0 , M * 6 , 64, -1),
- wireGt08 ("8x Wires" , "8x " , " Wire" ,T,T,F,F,F,F,T,F,F,F, 0 , M * 4 , 64, -1),
- wireGt04 ("4x Wires" , "4x " , " Wire" ,T,T,F,F,F,F,T,F,F,F, 0 , M * 2 , 64, -1),
- wireGt02 ("2x Wires" , "2x " , " Wire" ,T,T,F,F,F,F,T,F,F,F, 0 , M * 1 , 64, -1),
- wireGt01 ("1x Wires" , "1x " , " Wire" ,T,T,F,F,F,F,T,F,F,F, 0 , M / 2 , 64, -1),
- cableGt12 ("12x Cables" , "12x " , " Cable" ,T,T,F,F,F,F,T,F,F,F, 0 , M * 6 , 64, -1),
- cableGt08 ("8x Cables" , "8x " , " Cable" ,T,T,F,F,F,F,T,F,F,F, 0 , M * 4 , 64, -1),
- cableGt04 ("4x Cables" , "4x " , " Cable" ,T,T,F,F,F,F,T,F,F,F, 0 , M * 2 , 64, -1),
- cableGt02 ("2x Cables" , "2x " , " Cable" ,T,T,F,F,F,F,T,F,F,F, 0 , M * 1 , 64, -1),
- cableGt01 ("1x Cables" , "1x " , " Cable" ,T,T,F,F,F,F,T,F,F,F, 0 , M / 2 , 64, -1),
-
- /* Electric Components.
- *
- * usual Materials for this are:
- * Primitive (Tier 1)
- * Basic (Tier 2) as used by UE as well : IC2 Circuit and RE-Battery
- * Good (Tier 3)
- * Advanced (Tier 4) as used by UE as well : Advanced Circuit, Advanced Battery and Lithium Battery
- * Data (Tier 5) : Data Storage Circuit
- * Elite (Tier 6) as used by UE as well : Energy Crystal and Data Control Circuit
- * Master (Tier 7) : Energy Flow Circuit and Lapotron Crystal
- * Ultimate (Tier 8) : Data Orb and Lapotronic Energy Orb
- * Infinite (Cheaty)
- */
- batterySingleuse ("Single Use Batteries" , "" , "" ,F,T,F,F,F,F,F,F,F,F, 0 , -1, 64, -1),
- battery ("Reusable Batteries" , "" , "" ,F,T,F,F,F,F,F,F,F,F, 0 , -1, 64, -1), // Introduced by Calclavia
- circuit ("Circuits" , "" , "" ,T,T,F,F,F,F,F,F,F,F, 0 , -1, 64, -1), // Introduced by Calclavia
- chipset ("Chipsets" , "" , "" ,T,T,F,F,F,F,F,F,F,F, 0 , -1, 64, -1), // Introduced by Buildcraft
- computer ("Computers" , "" , "" ,T,T,F,F,T,F,F,F,F,F, 0 , -1, 64, -1), // A whole Computer. "computerMaster" = ComputerCube
-
- // random known prefixes without special abilities.
- skull ("Skulls" , "" , "" ,F,F,F,F,F,F,F,F,F,F, 0 , -1, 64, -1),
- plating ("Platings" , "" , "" ,F,F,F,F,F,F,F,F,F,F, 0 , -1, 64, -1),
- dinosaur ("Dinosaurs" , "" , "" ,F,F,F,F,F,F,F,F,F,F, 0 , -1, 64, -1),
- travelgear ("Travel Gear" , "" , "" ,F,F,F,F,F,F,F,F,F,F, 0 , -1, 64, -1),
- bauble ("Baubles" , "" , "" ,F,F,F,F,F,F,F,F,F,F, 0 , -1, 64, -1),
- cluster ("Clusters" , "" , "" ,F,F,F,F,F,F,F,F,F,F, 0 , -1, 64, -1),
- grafter ("Grafters" , "" , "" ,F,F,F,F,F,F,F,F,F,F, 0 , -1, 64, -1),
- scoop ("Scoops" , "" , "" ,F,F,F,F,F,F,F,F,F,F, 0 , -1, 64, -1),
- frame ("Frames" , "" , "" ,F,F,F,F,F,F,F,F,F,F, 0 , -1, 64, -1),
- tome ("Tomes" , "" , "" ,F,F,F,F,F,F,F,F,F,F, 0 , -1, 64, -1),
- junk ("Junk" , "" , "" ,F,F,F,F,F,F,F,F,F,F, 0 , -1, 64, -1),
- bee ("Bees" , "" , "" ,F,F,F,F,F,F,F,F,F,F, 0 , -1, 64, -1),
- rod ("Rods" , "" , "" ,F,F,F,F,F,F,F,F,F,F, 0 , -1, 64, -1),
- dirt ("Dirts" , "" , "" ,F,F,F,F,F,F,F,F,F,F, 0 , -1, 64, -1),
- sand ("Sands" , "" , "" ,F,F,T,F,F,T,F,F,F,F, 0 , -1, 64, -1),
- grass ("Grasses" , "" , "" ,F,F,F,F,F,F,F,F,F,F, 0 , -1, 64, -1),
- gravel ("Gravels" , "" , "" ,F,F,F,F,F,F,F,F,F,F, 0 , -1, 64, -1),
- mushroom ("Mushrooms" , "" , "" ,F,F,F,F,F,F,F,F,F,F, 0 , -1, 64, -1),
- wood ("Woods" , "" , "" ,F,F,F,F,F,F,F,F,F,F, 0 , -1, 64, -1), // Introduced by Eloraam
- drop ("Drops" , "" , "" ,F,F,F,F,F,F,F,F,F,F, 0 , -1, 64, -1),
- fuel ("Fuels" , "" , "" ,F,F,F,F,F,F,F,F,F,F, 0 , -1, 64, -1),
- panel ("Panels" , "" , "" ,F,F,F,F,F,F,F,F,F,F, 0 , -1, 64, -1),
- brick ("Bricks" , "" , "" ,F,F,F,F,F,F,F,F,F,F, 0 , -1, 64, -1),
- chunk ("Chunks" , "" , "" ,F,F,F,F,F,F,F,F,F,F, 0 , -1, 64, -1),
- wire ("Wires" , "" , "" ,F,F,F,F,T,F,F,F,F,F, 0 , -1, 64, -1),
- seed ("Seeds" , "" , "" ,F,F,F,F,F,F,F,F,F,F, 0 , -1, 64, -1),
- reed ("Reeds" , "" , "" ,F,F,F,F,F,F,F,F,F,F, 0 , -1, 64, -1),
- sheetDouble ("2x Sheets" , "" , "" ,F,F,F,F,F,F,F,F,F,F, 0 , -1, 64, -1),
- sheet ("Sheets" , "" , "" ,F,F,F,F,F,F,F,F,F,F, 0 , -1, 64, -1),
- crop ("Crops" , "" , "" ,F,F,F,F,F,F,F,F,F,F, 0 , -1, 64, -1),
- plant ("Plants" , "" , "" ,F,F,F,F,F,F,F,F,F,F, 0 , -1, 64, -1),
- coin ("Coins" , "" , "" ,F,F,F,F,F,F,F,F,F,F, 0 , -1, 64, -1),
- lumar ("Lumars" , "" , "" ,F,F,F,F,F,F,F,F,F,F, 0 , -1, 64, -1),
- ground ("Grounded Stuff" , "" , "" ,F,F,F,F,F,F,F,F,F,F, 0 , -1, 64, -1),
- cable ("Cables" , "" , "" ,F,F,F,F,F,F,F,F,F,F, 0 , -1, 64, -1),
- component ("Components" , "" , "" ,F,F,F,F,F,F,F,F,F,F, 0 , -1, 64, -1),
- wax ("Waxes" , "" , "" ,F,F,F,F,F,F,F,F,F,F, 0 , -1, 64, -1),
- wall ("Walls" , "" , "" ,F,F,F,F,F,F,F,F,F,F, 0 , -1, 64, -1),
- tube ("Tubes" , "" , "" ,F,F,F,F,F,F,F,F,F,F, 0 , -1, 64, -1),
- list ("Lists" , "" , "" ,F,F,F,F,F,F,F,F,F,F, 0 , -1, 64, -1),
- food ("Foods" , "" , "" ,F,F,F,F,F,F,F,F,F,F, 0 , -1, 64, -1),
- gear ("Gears" , "" , "" ,F,F,F,F,F,F,F,F,F,F, 0 , -1, 64, -1), // Introduced by SirSengir
- coral ("Corals" , "" , "" ,F,F,F,F,F,F,F,F,F,F, 0 , -1, 64, -1),
- flower ("Flowers" , "" , "" ,F,F,F,F,F,F,F,F,F,F, 0 , -1, 64, -1),
- storage ("Storages" , "" , "" ,F,F,F,F,F,F,F,F,F,F, 0 , -1, 64, -1),
- material ("Materials" , "" , "" ,F,F,F,F,F,F,F,F,F,F, 0 , -1, 64, -1),
- plasma ("Plasmas" , "" , "" ,F,F,F,F,F,F,F,F,F,F, 0 , -1, 64, -1),
- element ("Elements" , "" , "" ,F,F,F,F,F,F,F,F,F,F, 0 , -1, 64, -1),
- molecule ("Molecules" , "" , "" ,F,F,F,F,F,F,F,F,F,F, 0 , -1, 64, -1),
- wafer ("Wafers" , "" , "" ,F,F,F,F,F,F,F,F,F,F, 0 , -1, 64, -1),
- orb ("Orbs" , "" , "" ,F,F,F,F,F,F,F,F,F,F, 0 , -1, 64, -1),
- handle ("Handles" , "" , "" ,F,F,F,F,F,F,F,F,F,F, 0 , -1, 64, -1),
- blade ("Blades" , "" , "" ,F,F,F,F,F,F,F,F,F,F, 0 , -1, 64, -1),
- head ("Heads" , "" , "" ,F,F,F,F,F,F,F,F,F,F, 0 , -1, 64, -1),
- motor ("Motors" , "" , "" ,F,F,F,F,F,F,F,F,F,F, 0 , -1, 64, -1),
- bit ("Bits" , "" , "" ,F,F,F,F,F,F,F,F,F,F, 0 , -1, 64, -1),
- shears ("Shears" , "" , "" ,F,F,F,F,F,F,F,F,F,F, 0 , -1, 64, -1),
- turbine ("Turbines" , "" , "" ,F,F,F,F,F,F,F,F,F,F, 0 , -1, 64, -1),
- fertilizer ("Fertilizers" , "" , "" ,F,F,F,F,F,F,F,F,F,F, 0 , -1, 64, -1),
- chest ("Chests" , "" , "" ,F,F,F,F,F,F,F,F,F,F, 0 , -1, 64, -1),
- raw ("Raw Things" , "" , "" ,F,F,F,F,F,F,F,F,F,F, 0 , -1, 64, -1),
- stainedGlass ("Stained Glasses" , "" , "" ,F,F,F,F,F,F,F,F,F,F, 0 , -1, 64, -1),
- mystic ("Mystic Stuff" , "" , "" ,F,F,F,F,F,F,F,F,F,F, 0 , -1, 64, -1),
- mana ("Mana Stuff" , "" , "" ,F,F,F,F,F,F,F,F,F,F, 0 , -1, 64, -1),
- rune ("Runes" , "" , "" ,F,F,F,F,F,F,F,F,F,F, 0 , -1, 64, -1),
- petal ("Petals" , "" , "" ,F,F,F,F,F,F,F,F,F,F, 0 , -1, 64, -1),
- pearl ("Pearls" , "" , "" ,F,F,F,F,F,F,F,F,F,F, 0 , -1, 64, -1),
- powder ("Powders" , "" , "" ,F,F,F,F,F,F,F,F,F,F, 0 , -1, 64, -1),
- soulsand ("Soulsands" , "" , "" ,F,F,F,F,F,F,F,F,F,F, 0 , -1, 64, -1),
- obsidian ("Obsidians" , "" , "" ,F,F,F,F,F,F,F,F,F,F, 0 , -1, 64, -1),
- glowstone ("Glowstones" , "" , "" ,F,F,F,F,F,F,F,F,F,F, 0 , -1, 64, -1),
- beans ("Beans" , "" , "" ,F,F,F,F,F,F,F,F,F,F, 0 , -1, 64, -1),
- br ("br" , "" , "" ,F,F,F,F,F,F,F,F,F,F, 0 , -1, 64, -1),
- essence ("Essences" , "" , "" ,F,F,F,F,F,F,F,F,F,F, 0 , -1, 64, -1),
- alloy ("Alloys" , "" , "" ,F,F,F,F,F,F,F,F,F,F, 0 , -1, 64, -1),
- cooking ("Cooked Things" , "" , "" ,F,F,F,F,F,F,F,F,F,F, 0 , -1, 64, -1),
- elven ("Elven Stuff" , "" , "" ,F,F,F,F,F,F,F,F,F,F, 0 , -1, 64, -1),
- reactor ("Reactors" , "" , "" ,F,F,F,F,F,F,F,F,F,F, 0 , -1, 64, -1),
- mffs ("MFFS" , "" , "" ,F,F,F,F,F,F,F,F,F,F, 0 , -1, 64, -1),
- projred ("Project Red" , "" , "" ,F,F,F,F,F,F,F,F,F,F, 0 , -1, 64, -1),
- ganys ("Ganys Stuff" , "" , "" ,F,F,F,F,F,F,F,F,F,F, 0 , -1, 64, -1),
- liquid ("Liquids" , "" , "" ,F,F,F,F,F,F,F,F,F,F, 0 , -1, 64, -1),
- bars ("Bars" , "" , "" ,F,F,F,F,F,F,F,F,F,F, 0 , -1, 64, -1),
- bar ("Bars" , "" , "" ,F,F,F,F,F,F,F,F,F,F, 0 , -1, 64, -1);
-
- static {
- pulp.mPrefixInto = dust;
- oreGem.mPrefixInto = ore;
- leaves.mPrefixInto = treeLeaves;
- sapling.mPrefixInto = treeSapling;
- itemDust.mPrefixInto = dust;
- dustDirty.mPrefixInto = dustImpure;
- denseore.mPrefixInto = oreDense;
- ingotQuad.mPrefixInto = ingotQuadruple;
- plateQuad.mPrefixInto = plateQuadruple;
- stoneBrick.mPrefixInto = stoneBricks;
- stoneBricksMossy.mPrefixInto = stoneMossyBricks;
-
- ingotHot.mHeatDamage = 3.0F;
- cellPlasma.mHeatDamage = 6.0F;
-
- block.ignoreMaterials(Materials.Ice, Materials.Snow, Materials.Concrete, Materials.Glass, Materials.Glowstone, Materials.DarkIron, Materials.Marble, Materials.Quartz, Materials.CertusQuartz, Materials.Limestone);
- ingot.ignoreMaterials(Materials.Brick, Materials.NetherBrick);
-
- dust.addFamiliarPrefix(dustTiny);
- dust.addFamiliarPrefix(dustSmall);
- dustTiny.addFamiliarPrefix(dust);
- dustTiny.addFamiliarPrefix(dustSmall);
- dustSmall.addFamiliarPrefix(dust);
- dustSmall.addFamiliarPrefix(dustTiny);
-
- ingot.addFamiliarPrefix(nugget);
- nugget.addFamiliarPrefix(ingot);
-
- for (OrePrefixes tPrefix1 : values()) if (tPrefix1.name().startsWith("ore" )) for (OrePrefixes tPrefix2 : values()) if (tPrefix2.name().startsWith("ore" )) tPrefix1.addFamiliarPrefix(tPrefix2);
- for (OrePrefixes tPrefix1 : values()) if (tPrefix1.name().startsWith("pipe" )) for (OrePrefixes tPrefix2 : values()) if (tPrefix2.name().startsWith("pipe" )) tPrefix1.addFamiliarPrefix(tPrefix2);
- for (OrePrefixes tPrefix1 : values()) if (tPrefix1.name().startsWith("wireGt" )) for (OrePrefixes tPrefix2 : values()) if (tPrefix2.name().startsWith("wireGt" )) tPrefix1.addFamiliarPrefix(tPrefix2);
- for (OrePrefixes tPrefix1 : values()) if (tPrefix1.name().startsWith("cableGt" )) for (OrePrefixes tPrefix2 : values()) if (tPrefix2.name().startsWith("cableGt" )) tPrefix1.addFamiliarPrefix(tPrefix2);
-
- // These are only the important ones.
- gem .mNotGeneratedItems.add(Materials.Coal);
- gem .mNotGeneratedItems.add(Materials.Charcoal);
- gem .mNotGeneratedItems.add(Materials.NetherStar);
- gem .mNotGeneratedItems.add(Materials.Diamond);
- gem .mNotGeneratedItems.add(Materials.Emerald);
- gem .mNotGeneratedItems.add(Materials.NetherQuartz);
- gem .mNotGeneratedItems.add(Materials.EnderPearl);
- gem .mNotGeneratedItems.add(Materials.EnderEye);
- gem .mNotGeneratedItems.add(Materials.Flint);
- gem .mNotGeneratedItems.add(Materials.Lapis);
- dust .mNotGeneratedItems.add(Materials.Bone);
- dust .mNotGeneratedItems.add(Materials.Redstone);
- dust .mNotGeneratedItems.add(Materials.Glowstone);
- dust .mNotGeneratedItems.add(Materials.Gunpowder);
- dust .mNotGeneratedItems.add(Materials.Sugar);
- dust .mNotGeneratedItems.add(Materials.Blaze);
- stick .mNotGeneratedItems.add(Materials.Wood);
- stick .mNotGeneratedItems.add(Materials.Bone);
- stick .mNotGeneratedItems.add(Materials.Blaze);
- ingot .mNotGeneratedItems.add(Materials.Iron);
- ingot .mNotGeneratedItems.add(Materials.Gold);
- ingot .mNotGeneratedItems.add(Materials.Brick);
- ingot .mNotGeneratedItems.add(Materials.BrickNether);
- ingot .mNotGeneratedItems.add(Materials.WoodSealed);
- ingot .mNotGeneratedItems.add(Materials.Wood);
- nugget .mNotGeneratedItems.add(Materials.Gold);
- plate .mNotGeneratedItems.add(Materials.Paper);
- cell .mNotGeneratedItems.add(Materials.Empty);
- cell .mNotGeneratedItems.add(Materials.Water);
- cell .mNotGeneratedItems.add(Materials.Lava);
- cell .mNotGeneratedItems.add(Materials.ConstructionFoam);
- cell .mNotGeneratedItems.add(Materials.UUMatter);
- cell .mNotGeneratedItems.add(Materials.BioFuel);
- cell .mNotGeneratedItems.add(Materials.CoalFuel);
- bucket .mNotGeneratedItems.add(Materials.Empty);
- bucket .mNotGeneratedItems.add(Materials.Lava);
- bucket .mNotGeneratedItems.add(Materials.Milk);
- bucket .mNotGeneratedItems.add(Materials.Water);
- bottle .mNotGeneratedItems.add(Materials.Empty);
- bottle .mNotGeneratedItems.add(Materials.Water);
- bottle .mNotGeneratedItems.add(Materials.Milk);
- block .mNotGeneratedItems.add(Materials.Iron);
- block .mNotGeneratedItems.add(Materials.Gold);
- block .mNotGeneratedItems.add(Materials.Lapis);
- block .mNotGeneratedItems.add(Materials.Emerald);
- block .mNotGeneratedItems.add(Materials.Redstone);
- block .mNotGeneratedItems.add(Materials.Diamond);
- block .mNotGeneratedItems.add(Materials.Coal);
- toolHeadArrow .mNotGeneratedItems.add(Materials.Glass);
-
- //-----
-
- dustImpure .mGeneratedItems.add(Materials.GraniteRed);
- dustImpure .mGeneratedItems.add(Materials.GraniteBlack);
- dustImpure .mGeneratedItems.add(Materials.Quartzite);
- dustImpure .mGeneratedItems.add(Materials.Flint);
- dustImpure .mGeneratedItems.add(Materials.Redrock);
- dustImpure .mGeneratedItems.add(Materials.Basalt);
- dustImpure .mGeneratedItems.add(Materials.Marble);
- dustImpure .mGeneratedItems.add(Materials.Netherrack);
- dustImpure .mGeneratedItems.add(Materials.Endstone);
- dustImpure .mGeneratedItems.add(Materials.Stone);
-
- plate .mGeneratedItems.add(Materials.Redstone);
- plate .mGeneratedItems.add(Materials.Concrete);
- plate .mGeneratedItems.add(Materials.GraniteRed);
- plate .mGeneratedItems.add(Materials.GraniteBlack);
- plate .mGeneratedItems.add(Materials.Glowstone);
- plate .mGeneratedItems.add(Materials.Nikolite);
- plate .mGeneratedItems.add(Materials.Obsidian);
-
- plate .mGeneratedItems.add(Materials.Paper);
- plateDouble .mGeneratedItems.add(Materials.Paper);
- plateTriple .mGeneratedItems.add(Materials.Paper);
- plateQuadruple .mGeneratedItems.add(Materials.Paper);
- plateQuintuple .mGeneratedItems.add(Materials.Paper);
-
- lens .mGeneratedItems.add(Materials.EnderPearl);
- lens .mGeneratedItems.add(Materials.EnderEye);
-
- stickLong .mGeneratedItems.add(Materials.Blaze);
-
- //-----
-
- dust .mGeneratedItems.addAll(dustPure.mGeneratedItems);
- dust .mGeneratedItems.addAll(dustImpure.mGeneratedItems);
- dust .mGeneratedItems.addAll(dustRefined.mGeneratedItems);
- dustTiny .mGeneratedItems.addAll(dust.mGeneratedItems);
- dustSmall .mGeneratedItems.addAll(dust.mGeneratedItems);
- crateGtDust .mGeneratedItems.addAll(dust.mGeneratedItems);
- crateGtIngot .mGeneratedItems.addAll(ingot.mGeneratedItems);
- crateGtGem .mGeneratedItems.addAll(gem.mGeneratedItems);
- crateGtPlate .mGeneratedItems.addAll(plate.mGeneratedItems);
-
- //-----
-
- toolHeadFile .mCondition = new ICondition.And<ISubTagContainer>(new ICondition.Not<ISubTagContainer>(SubTag.NO_SMASHING), new ICondition.Not<ISubTagContainer>(SubTag.BOUNCY));
- toolHeadSaw .mCondition = new ICondition.And<ISubTagContainer>(new ICondition.Not<ISubTagContainer>(SubTag.NO_SMASHING), new ICondition.Not<ISubTagContainer>(SubTag.BOUNCY));
- toolHeadDrill .mCondition = new ICondition.And<ISubTagContainer>(new ICondition.Not<ISubTagContainer>(SubTag.NO_SMASHING), new ICondition.Not<ISubTagContainer>(SubTag.BOUNCY));
- toolHeadChainsaw .mCondition = new ICondition.And<ISubTagContainer>(new ICondition.Not<ISubTagContainer>(SubTag.NO_SMASHING), new ICondition.Not<ISubTagContainer>(SubTag.BOUNCY));
- toolHeadWrench .mCondition = new ICondition.And<ISubTagContainer>(new ICondition.Not<ISubTagContainer>(SubTag.NO_SMASHING), new ICondition.Not<ISubTagContainer>(SubTag.BOUNCY));
- toolHeadBuzzSaw .mCondition = new ICondition.And<ISubTagContainer>(new ICondition.Not<ISubTagContainer>(SubTag.NO_SMASHING), new ICondition.Not<ISubTagContainer>(SubTag.BOUNCY));
-
- rotor .mCondition = new ICondition.Nor<ISubTagContainer>(SubTag.CRYSTAL, SubTag.STONE, SubTag.BOUNCY);
-
- spring .mCondition = new ICondition.Or<ISubTagContainer>(SubTag.STRETCHY, SubTag.BOUNCY, new ICondition.Not<ISubTagContainer>(SubTag.NO_SMASHING));
- springSmall .mCondition = new ICondition.Or<ISubTagContainer>(SubTag.STRETCHY, SubTag.BOUNCY, new ICondition.Not<ISubTagContainer>(SubTag.NO_SMASHING));
-
- gemChipped .mCondition = new ICondition.And<ISubTagContainer>(SubTag.TRANSPARENT, SubTag.CRYSTAL, new ICondition.Not<ISubTagContainer>(SubTag.QUARTZ), new ICondition.Not<ISubTagContainer>(SubTag.PEARL), new ICondition.Not<ISubTagContainer>(SubTag.MAGICAL));
- gemFlawed .mCondition = new ICondition.And<ISubTagContainer>(SubTag.TRANSPARENT, SubTag.CRYSTAL, new ICondition.Not<ISubTagContainer>(SubTag.QUARTZ), new ICondition.Not<ISubTagContainer>(SubTag.PEARL), new ICondition.Not<ISubTagContainer>(SubTag.MAGICAL));
- gemFlawless .mCondition = new ICondition.And<ISubTagContainer>(SubTag.TRANSPARENT, SubTag.CRYSTAL, new ICondition.Not<ISubTagContainer>(SubTag.QUARTZ), new ICondition.Not<ISubTagContainer>(SubTag.PEARL), new ICondition.Not<ISubTagContainer>(SubTag.MAGICAL));
- gemExquisite .mCondition = new ICondition.And<ISubTagContainer>(SubTag.TRANSPARENT, SubTag.CRYSTAL, new ICondition.Not<ISubTagContainer>(SubTag.QUARTZ), new ICondition.Not<ISubTagContainer>(SubTag.PEARL), new ICondition.Not<ISubTagContainer>(SubTag.MAGICAL));
-
- lens .mCondition = new ICondition.Or<ISubTagContainer>(SubTag.MAGICAL, new ICondition.And<ISubTagContainer>(SubTag.TRANSPARENT, SubTag.HAS_COLOR));
-
- plateDouble .mCondition = new ICondition.Or<ISubTagContainer>(SubTag.PAPER, new ICondition.Not<ISubTagContainer>(SubTag.NO_SMASHING));
- plateTriple .mCondition = new ICondition.Or<ISubTagContainer>(SubTag.PAPER, new ICondition.Not<ISubTagContainer>(SubTag.NO_SMASHING));
- plateQuadruple .mCondition = new ICondition.Or<ISubTagContainer>(SubTag.PAPER, new ICondition.Not<ISubTagContainer>(SubTag.NO_SMASHING));
- plateQuintuple .mCondition = new ICondition.Or<ISubTagContainer>(SubTag.PAPER, new ICondition.Not<ISubTagContainer>(SubTag.NO_SMASHING));
-
- plateDense .mCondition = new ICondition.Not<ISubTagContainer>(SubTag.NO_SMASHING);
-
- ingotDouble .mCondition = new ICondition.Not<ISubTagContainer>(SubTag.NO_SMASHING);
- ingotTriple .mCondition = new ICondition.Not<ISubTagContainer>(SubTag.NO_SMASHING);
- ingotQuadruple .mCondition = new ICondition.Not<ISubTagContainer>(SubTag.NO_SMASHING);
- ingotQuintuple .mCondition = new ICondition.Not<ISubTagContainer>(SubTag.NO_SMASHING);
-
- wireFine .mCondition = SubTag.METAL;
-
- //-----
-
- pipeRestrictiveTiny.mSecondaryMaterial = new MaterialStack(Materials.Steel , ring.mMaterialAmount);
- pipeRestrictiveSmall.mSecondaryMaterial = new MaterialStack(Materials.Steel , ring.mMaterialAmount * 2);
- pipeRestrictiveMedium.mSecondaryMaterial = new MaterialStack(Materials.Steel , ring.mMaterialAmount * 3);
- pipeRestrictiveLarge.mSecondaryMaterial = new MaterialStack(Materials.Steel , ring.mMaterialAmount * 4);
- pipeRestrictiveHuge.mSecondaryMaterial = new MaterialStack(Materials.Steel , ring.mMaterialAmount * 5);
- cableGt12.mSecondaryMaterial = new MaterialStack(Materials.Rubber , plate.mMaterialAmount * 4);
- cableGt08.mSecondaryMaterial = new MaterialStack(Materials.Rubber , plate.mMaterialAmount * 3);
- cableGt04.mSecondaryMaterial = new MaterialStack(Materials.Rubber , plate.mMaterialAmount * 2);
- cableGt02.mSecondaryMaterial = new MaterialStack(Materials.Rubber , plate.mMaterialAmount);
- cableGt01.mSecondaryMaterial = new MaterialStack(Materials.Rubber , plate.mMaterialAmount);
- bucket.mSecondaryMaterial = new MaterialStack(Materials.Iron , ingot.mMaterialAmount * 3);
- cell.mSecondaryMaterial = new MaterialStack(Materials.Tin , plate.mMaterialAmount * 2);
- cellPlasma.mSecondaryMaterial = new MaterialStack(Materials.Tin , plate.mMaterialAmount * 2);
- oreRedgranite.mSecondaryMaterial = new MaterialStack(Materials.GraniteRed , dust.mMaterialAmount);
- oreBlackgranite.mSecondaryMaterial = new MaterialStack(Materials.GraniteBlack , dust.mMaterialAmount);
- oreNetherrack.mSecondaryMaterial = new MaterialStack(Materials.Netherrack , dust.mMaterialAmount);
- oreNether.mSecondaryMaterial = new MaterialStack(Materials.Netherrack , dust.mMaterialAmount);
- oreEndstone.mSecondaryMaterial = new MaterialStack(Materials.Endstone , dust.mMaterialAmount);
- oreEnd.mSecondaryMaterial = new MaterialStack(Materials.Endstone , dust.mMaterialAmount);
- oreDense.mSecondaryMaterial = new MaterialStack(Materials.Stone , dust.mMaterialAmount);
- orePoor.mSecondaryMaterial = new MaterialStack(Materials.Stone , dust.mMaterialAmount * 2);
- oreSmall.mSecondaryMaterial = new MaterialStack(Materials.Stone , dust.mMaterialAmount * 2);
- oreNormal.mSecondaryMaterial = new MaterialStack(Materials.Stone , dust.mMaterialAmount * 2);
- oreRich.mSecondaryMaterial = new MaterialStack(Materials.Stone , dust.mMaterialAmount * 2);
- ore.mSecondaryMaterial = new MaterialStack(Materials.Stone , dust.mMaterialAmount);
- crushed.mSecondaryMaterial = new MaterialStack(Materials.Stone , dust.mMaterialAmount);
- toolHeadDrill.mSecondaryMaterial = new MaterialStack(Materials.Steel , plate.mMaterialAmount * 4);
- toolHeadChainsaw.mSecondaryMaterial = new MaterialStack(Materials.Steel , plate.mMaterialAmount * 4 + ring.mMaterialAmount * 2);
- toolHeadWrench.mSecondaryMaterial = new MaterialStack(Materials.Steel , ring.mMaterialAmount + screw.mMaterialAmount * 2);
- arrowGtWood.mSecondaryMaterial = new MaterialStack(Materials.Wood , stick.mMaterialAmount);
- arrowGtPlastic.mSecondaryMaterial = new MaterialStack(Materials.Plastic , stick.mMaterialAmount);
- bulletGtSmall.mSecondaryMaterial = new MaterialStack(Materials.Brass , ingot.mMaterialAmount / 9);
- bulletGtMedium.mSecondaryMaterial = new MaterialStack(Materials.Brass , ingot.mMaterialAmount / 6);
- bulletGtLarge.mSecondaryMaterial = new MaterialStack(Materials.Brass , ingot.mMaterialAmount / 3);
- }
-
- public final ArrayList<ItemStack> mPrefixedItems = new ArrayList<ItemStack>();
-
- public boolean add(ItemStack aStack) {
- if (aStack == null) return false;
- if (!contains(aStack)) mPrefixedItems.add(aStack);
- while (mPrefixedItems.contains(null)) mPrefixedItems.remove(null);
- return true;
- }
-
- public boolean contains(ItemStack aStack) {
- if (aStack == null) return false;
- for (ItemStack tStack : mPrefixedItems) if (GT_Utility.areStacksEqual(aStack, tStack, !tStack.hasTagCompound())) return true;
- return false;
- }
-
- public boolean doGenerateItem(Materials aMaterial) {
- return aMaterial != null && aMaterial != Materials._NULL && ((aMaterial.mTypes & mMaterialGenerationBits) != 0 || mGeneratedItems.contains(aMaterial)) && !mNotGeneratedItems.contains(aMaterial) && (mCondition == null || mCondition.isTrue(aMaterial));
- }
-
- public boolean ignoreMaterials(Materials... aMaterials) {
- for (Materials tMaterial : aMaterials) if (tMaterial != null) mIgnoredMaterials.add(tMaterial);
- return true;
- }
-
- public boolean isIgnored(Materials aMaterial) {
- if (aMaterial != null && (!aMaterial.mUnificatable || aMaterial != aMaterial.mMaterialInto)) return true;
- return mIgnoredMaterials.contains(aMaterial);
- }
-
- public boolean addFamiliarPrefix(OrePrefixes aPrefix) {
- if (aPrefix == null || mFamiliarPrefixes.contains(aPrefix) || aPrefix == this) return false;
- return mFamiliarPrefixes.add(aPrefix);
- }
-
- public boolean add(IOreRecipeRegistrator aRegistrator) {
- if (aRegistrator == null) return false;
- return mOreProcessing.add(aRegistrator);
- }
-
- public void processOre(Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) {
- if (aMaterial != null && (aMaterial != Materials._NULL || mIsSelfReferencing || !mIsMaterialBased) && GT_Utility.isStackValid(aStack)) for (IOreRecipeRegistrator tRegistrator : mOreProcessing) {
- if (D2) GT_Log.ore.println("Processing '" + aOreDictName + "' with the Prefix '" + name() + "' and the Material '" + aMaterial.name() + "' at " + GT_Utility.getClassName(tRegistrator));
- tRegistrator.registerOre(this, aMaterial, aOreDictName, aModName, GT_Utility.copyAmount(1, aStack));
- }
- }
-
- public ItemStack mContainerItem = null;
- public ICondition<ISubTagContainer> mCondition = null;
- public byte mDefaultStackSize = 64;
- public final short mTextureIndex;
- public final String mRegularLocalName, mLocalizedMaterialPre, mLocalizedMaterialPost;
- public final boolean mIsUsedForOreProcessing, mIsEnchantable, mIsUnificatable, mIsMaterialBased, mIsSelfReferencing, mIsContainer, mDontUnificateActively, mIsUsedForBlocks, mAllowNormalRecycling, mGenerateDefaultItem;
- public MaterialStack mSecondaryMaterial = null;
- public OrePrefixes mPrefixInto = this;
- public final List<TC_AspectStack> mAspects = new ArrayList<TC_AspectStack>();
- public final Collection<OrePrefixes> mFamiliarPrefixes = new HashSet<OrePrefixes>();
- private final Collection<Materials> mNotGeneratedItems = new HashSet<Materials>(), mIgnoredMaterials = new HashSet<Materials>(), mGeneratedItems = new HashSet<Materials>();
- private final ArrayList<IOreRecipeRegistrator> mOreProcessing = new ArrayList<IOreRecipeRegistrator>();
- public float mHeatDamage = 0.0F; // Negative for Frost Damage
-
- /**
- * Used to determine the amount of Material this Prefix contains.
- * Multiply or Divide GregTech_API.MATERIAL_UNIT to get the Amounts in comparision to one Ingot.
- * 0 = Null
- * Negative = Undefined Amount
- */
- public final long mMaterialAmount;
-
- /**
- * Yes this Value can be changed to add Bits for the MetaGenerated-Item-Check.
- */
- public int mMaterialGenerationBits = 0;
-
- private OrePrefixes(String aRegularLocalName, String aLocalizedMaterialPre, String aLocalizedMaterialPost, boolean aIsUnificatable, boolean aIsMaterialBased, boolean aIsSelfReferencing, boolean aIsContainer, boolean aDontUnificateActively, boolean aIsUsedForBlocks, boolean aAllowNormalRecycling, boolean aGenerateDefaultItem, boolean aIsEnchantable, boolean aIsUsedForOreProcessing, int aMaterialGenerationBits, long aMaterialAmount, int aDefaultStackSize, int aTextureindex) {
- mIsUnificatable = aIsUnificatable;
- mIsMaterialBased = aIsMaterialBased;
- mIsSelfReferencing = aIsSelfReferencing;
- mIsContainer = aIsContainer;
- mDontUnificateActively = aDontUnificateActively;
- mIsUsedForBlocks = aIsUsedForBlocks;
- mAllowNormalRecycling = aAllowNormalRecycling;
- mGenerateDefaultItem = aGenerateDefaultItem;
- mIsEnchantable = aIsEnchantable;
- mIsUsedForOreProcessing = aIsUsedForOreProcessing;
- mMaterialGenerationBits = aMaterialGenerationBits;
- mMaterialAmount = aMaterialAmount;
- mRegularLocalName = aRegularLocalName;
- mLocalizedMaterialPre = aLocalizedMaterialPre;
- mLocalizedMaterialPost = aLocalizedMaterialPost;
- mDefaultStackSize = (byte)aDefaultStackSize;
- mTextureIndex = (short)aTextureindex;
-
- if (name().startsWith("ore")) {
- new TC_AspectStack(TC_Aspects.TERRA, 1).addToAspectList(mAspects);
- } else
- if (name().startsWith("wire") || name().startsWith("cable")) {
- new TC_AspectStack(TC_Aspects.ELECTRUM, 1).addToAspectList(mAspects);
- } else
- if (name().startsWith("dust")) {
- new TC_AspectStack(TC_Aspects.PERDITIO, 1).addToAspectList(mAspects);
- } else
- if (name().startsWith("crushed")) {
- new TC_AspectStack(TC_Aspects.PERFODIO, 1).addToAspectList(mAspects);
- } else
- if (name().startsWith("ingot") || name().startsWith("nugget")) {
- new TC_AspectStack(TC_Aspects.METALLUM, 1).addToAspectList(mAspects);
- } else
- if (name().startsWith("armor")) {
- new TC_AspectStack(TC_Aspects.TUTAMEN, 1).addToAspectList(mAspects);
- } else
- if (name().startsWith("stone")) {
- new TC_AspectStack(TC_Aspects.TERRA, 1).addToAspectList(mAspects);
- } else
- if (name().startsWith("pipe")) {
- new TC_AspectStack(TC_Aspects.ITER, 1).addToAspectList(mAspects);
- } else
- if (name().startsWith("gear")) {
- new TC_AspectStack(TC_Aspects.MOTUS, 1).addToAspectList(mAspects);
- new TC_AspectStack(TC_Aspects.MACHINA, 1).addToAspectList(mAspects);
- } else
- if (name().startsWith("frame") || name().startsWith("plate")) {
- new TC_AspectStack(TC_Aspects.FABRICO, 1).addToAspectList(mAspects);
- } else
- if (name().startsWith("tool")) {
- new TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2).addToAspectList(mAspects);
- } else
- if (name().startsWith("gem") || name().startsWith("crystal") || name().startsWith("lens")) {
- new TC_AspectStack(TC_Aspects.VITREUS, 1).addToAspectList(mAspects);
- } else
- if (name().startsWith("crate")) {
- new TC_AspectStack(TC_Aspects.ITER, 2).addToAspectList(mAspects);
- } else
- if (name().startsWith("circuit")) {
- new TC_AspectStack(TC_Aspects.COGNITO, 1).addToAspectList(mAspects);
- } else
- if (name().startsWith("computer")) {
- new TC_AspectStack(TC_Aspects.COGNITO, 4).addToAspectList(mAspects);
- } else
- if (name().startsWith("battery")) {
- new TC_AspectStack(TC_Aspects.ELECTRUM, 1).addToAspectList(mAspects);
- }
- }
-
- public static OrePrefixes getOrePrefix(String aOre) {
- for (OrePrefixes tPrefix : values()) if (aOre.startsWith(tPrefix.toString())) {
- if (tPrefix == oreNether && aOre.equals("oreNetherQuartz")) return ore;
- return tPrefix;
- }
- return null;
- }
-
- public static String stripPrefix(String aOre) {
- for (OrePrefixes tPrefix : values()) {
- if (aOre.startsWith(tPrefix.toString())) {
- return aOre.replaceFirst(tPrefix.toString(), "");
- }
- }
- return aOre;
- }
-
- public static String replacePrefix(String aOre, OrePrefixes aPrefix) {
- for (OrePrefixes tPrefix : values()) {
- if (aOre.startsWith(tPrefix.toString())) {
- return aOre.replaceFirst(tPrefix.toString(), aPrefix.toString());
- }
- }
- return "";
- }
-
- public static OrePrefixes getPrefix(String aPrefixName) {
- return getPrefix(aPrefixName, null);
- }
-
- public static OrePrefixes getPrefix(String aPrefixName, OrePrefixes aReplacement) {
- Object tObject = GT_Utility.getFieldContent(OrePrefixes.class, aPrefixName, false, false);
- if (tObject != null && tObject instanceof OrePrefixes) return (OrePrefixes)tObject;
- return aReplacement;
- }
-
- public Object get(Object aMaterial) {
- if (aMaterial instanceof Materials) return new ItemData(this, (Materials)aMaterial);
- return name() + aMaterial;
- }
-
- public static Materials getMaterial(String aOre) {
- return Materials.get(stripPrefix(aOre));
- }
-
- public static Materials getMaterial(String aOre, OrePrefixes aPrefix) {
- return Materials.get(aOre.replaceFirst(aPrefix.toString(), ""));
- }
-
- public static Materials getRealMaterial(String aOre, OrePrefixes aPrefix) {
- return Materials.getRealMaterial(aOre.replaceFirst(aPrefix.toString(), ""));
- }
-
- public static boolean isInstanceOf(String aName, OrePrefixes aPrefix) {
- return aName == null ? false : aName.startsWith(aPrefix.toString());
- }
-
- public static volatile int VERSION = 508;
-
- @SuppressWarnings("incomplete-switch")
- public String getDefaultLocalNameForItem(Materials aMaterial) {
- // Certain Materials have slightly different Localizations.
- switch (this) {
- case crateGtDust: return mLocalizedMaterialPre + OrePrefixes.dust.getDefaultLocalNameForItem(aMaterial);
- case crateGtIngot: return mLocalizedMaterialPre + OrePrefixes.ingot.getDefaultLocalNameForItem(aMaterial);
- case crateGtGem: return mLocalizedMaterialPre + OrePrefixes.gem.getDefaultLocalNameForItem(aMaterial);
- case crateGtPlate: return mLocalizedMaterialPre + OrePrefixes.plate.getDefaultLocalNameForItem(aMaterial);
- }
- switch (aMaterial) {
- case Glass:
- if (name().startsWith("gem")) return mLocalizedMaterialPre + aMaterial.mDefaultLocalName + " Crystal";
- if (name().startsWith("plate")) return mLocalizedMaterialPre + aMaterial.mDefaultLocalName + " Pane";
- break;
- case InfusedAir: case InfusedDull: case InfusedEarth: case InfusedEntropy: case InfusedFire: case InfusedOrder: case InfusedVis: case InfusedWater:
- if (name().startsWith("gem")) return mLocalizedMaterialPre + "Shard of " + aMaterial.mDefaultLocalName;
- if (name().startsWith("crystal")) return mLocalizedMaterialPre + "Shard of " + aMaterial.mDefaultLocalName;
- if (name().startsWith("plate")) return mLocalizedMaterialPre + aMaterial.mDefaultLocalName + " Crystal Plate";
- if (name().startsWith("dust")) return mLocalizedMaterialPre + aMaterial.mDefaultLocalName + " Crystal Powder";
- if (this == OrePrefixes.crushedCentrifuged) return mLocalizedMaterialPre + aMaterial.mDefaultLocalName + " Crystals";
- if (this == OrePrefixes.crushedPurified) return mLocalizedMaterialPre + aMaterial.mDefaultLocalName + " Crystals";
- if (this == OrePrefixes.crushed) return mLocalizedMaterialPre + aMaterial.mDefaultLocalName + " Crystals";
- break;
- case Wheat:
- if (name().startsWith("dust")) return mLocalizedMaterialPre + "Flour";
- break;
- case Ice:
- if (name().startsWith("dust")) return mLocalizedMaterialPre + "Crushed Ice";
- break;
- case Wood: case WoodSealed:
- if (name().startsWith("bolt")) return "Short " + aMaterial.mDefaultLocalName + " Stick";
- if (name().startsWith("stick")) return mLocalizedMaterialPre + aMaterial.mDefaultLocalName + " Stick";
- if (name().startsWith("dust")) return mLocalizedMaterialPre + aMaterial.mDefaultLocalName + " Pulp";
- if (name().startsWith("nugget")) return mLocalizedMaterialPre + aMaterial.mDefaultLocalName + " Chip";
- if (name().startsWith("plate")) return mLocalizedMaterialPre + aMaterial.mDefaultLocalName + " Plank";
- break;
- case Plastic: case Rubber:
- if (name().startsWith("dust")) return mLocalizedMaterialPre + aMaterial.mDefaultLocalName + " Pulp";
- if (name().startsWith("plate")) return mLocalizedMaterialPre + aMaterial.mDefaultLocalName + " Sheet";
- if (name().startsWith("ingot")) return mLocalizedMaterialPre + aMaterial.mDefaultLocalName + " Bar";
- if (name().startsWith("nugget")) return mLocalizedMaterialPre + aMaterial.mDefaultLocalName + " Chip";
- if (name().startsWith("foil")) return "Thin " + aMaterial.mDefaultLocalName + " Sheet";
- break;
- case FierySteel:
- if (mIsContainer) return mLocalizedMaterialPre + "Fiery Blood" + mLocalizedMaterialPost;
- break;
- case Steeleaf:
- if (name().startsWith("ingot")) return mLocalizedMaterialPre + aMaterial.mDefaultLocalName;
- break;
- case Bone:
- if (name().startsWith("dust")) return mLocalizedMaterialPre + "Bone Meal";
- break;
- case Blaze: case Milk: case Cocoa: case Chocolate: case Coffee: case Chili: case Cheese: case Snow:
- if (name().startsWith("dust")) return mLocalizedMaterialPre + aMaterial.mDefaultLocalName + " Powder";
- break;
- case Paper:
- if (name().startsWith("dust")) return mLocalizedMaterialPre + "Chad";
- if (this == OrePrefixes.plate) return "Sheet of Paper";
- if (this == OrePrefixes.plateDouble) return "Paperboard";
- if (this == OrePrefixes.plateTriple) return "Carton";
- if (this == OrePrefixes.plateQuadruple) return "Cardboard";
- if (this == OrePrefixes.plateQuintuple) return "Thick Cardboard";
- if (this == OrePrefixes.plateDense) return "Strong Cardboard";
- break;
- case MeatRaw:
- if (name().startsWith("dust")) return mLocalizedMaterialPre + "Mince Meat";
- break;
- case MeatCooked:
- if (name().startsWith("dust")) return mLocalizedMaterialPre + "Cooked Mince Meat";
- break;
- case Ash: case DarkAsh: case Gunpowder: case Sugar: case Salt: case RockSalt: case VolcanicAsh: case RareEarth:
- if (name().startsWith("dust")) return mLocalizedMaterialPre + aMaterial.mDefaultLocalName;
- break;
- case Vermiculite: case Bentonite: case Kaolinite: case Talc: case BasalticMineralSand: case GraniticMineralSand: case GlauconiteSand: case CassiteriteSand: case GarnetSand: case QuartzSand: case Pitchblende: case FullersEarth:
- if (name().startsWith("dust")) return mLocalizedMaterialPre + aMaterial.mDefaultLocalName;
- if (this == OrePrefixes.crushedCentrifuged) return mLocalizedMaterialPre + aMaterial.mDefaultLocalName;
- if (this == OrePrefixes.crushedPurified) return mLocalizedMaterialPre + aMaterial.mDefaultLocalName;
- if (this == OrePrefixes.crushed) return "Ground " + aMaterial.mDefaultLocalName;
- break;
- }
- // Use Standard Localization
- return mLocalizedMaterialPre + aMaterial.mDefaultLocalName + mLocalizedMaterialPost;
- }
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/enums/SubTag.java b/main/java/gregtech/api/enums/SubTag.java
deleted file mode 100644
index 854a64a701..0000000000
--- a/main/java/gregtech/api/enums/SubTag.java
+++ /dev/null
@@ -1,306 +0,0 @@
-package gregtech.api.enums;
-
-import gregtech.api.interfaces.ICondition;
-import gregtech.api.interfaces.ISubTagContainer;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashSet;
-
-/**
- * Just a simple Class to be able to add special Tags for Materials.
- *
- * The Tags should be added in preload and before I do my own preload to the Materials.
- * In order to make yourself a new SubTag, just create one new instance of SubTag using getNewSubTag
- * and use that one instance on all Materials you want to add those Tags to.
- *
- * You should look at this File whenever you update, maybe there are some new Tags you could use.
- *
- * -------------------------------------------------------------------------------------------------
- *
- * Some SubTags are used for other things than Materials too. It is useful when I need an easy way to declare Stuff in Items.
- */
-public final class SubTag implements ICondition<ISubTagContainer> {
- private static long sSubtagID = 0;
-
- public static final ArrayList<SubTag> sSubTags = new ArrayList<SubTag>();
-
- /**
- * Add this to your Material if you want to have its Ore Calcite heated in a Blast Furnace for more output. Already listed are:
- * Iron, Pyrite, PigIron, DeepIron, ShadowIron, WroughtIron and MeteoricIron.
- */
- public static final SubTag BLASTFURNACE_CALCITE_DOUBLE = getNewSubTag("BLASTFURNACE_CALCITE_DOUBLE"), BLASTFURNACE_CALCITE_TRIPLE = getNewSubTag("BLASTFURNACE_CALCITE_TRIPLE");
-
- /**
- * Materials which are outputting less in an Induction Smelter. Already listed are:
- * Pyrite, Tetrahedrite, Sphalerite, Cinnabar
- */
- public static final SubTag INDUCTIONSMELTING_LOW_OUTPUT = getNewSubTag("INDUCTIONSMELTING_LOW_OUTPUT");
-
- /**
- * Add this to your Material if you want to have its Ore Sodium Persulfate washed. Already listed are:
- * Zinc, Nickel, Copper, Cobalt, Cobaltite and Tetrahedrite.
- */
- public static final SubTag WASHING_SODIUMPERSULFATE = getNewSubTag("WASHING_SODIUMPERSULFATE");
-
- /**
- * Add this to your Material if you want to have its Ore Mercury washed. Already listed are:
- * Gold, Silver, Osmium, Mithril, Platinum, Midasium, Cooperite and AstralSilver.
- */
- public static final SubTag WASHING_MERCURY = getNewSubTag("WASHING_MERCURY");
-
- /**
- * Add this to your Material if you want to have its Ore electromagnetically separated to give Gold.
- */
- public static final SubTag ELECTROMAGNETIC_SEPERATION_GOLD = getNewSubTag("ELECTROMAGNETIC_SEPERATION_GOLD");
-
- /**
- * Add this to your Material if you want to have its Ore electromagnetically separated to give Iron.
- */
- public static final SubTag ELECTROMAGNETIC_SEPERATION_IRON = getNewSubTag("ELECTROMAGNETIC_SEPERATION_IRON");
-
- /**
- * Add this to your Material if you want to have its Ore electromagnetically separated to give Neodymium.
- */
- public static final SubTag ELECTROMAGNETIC_SEPERATION_NEODYMIUM = getNewSubTag("ELECTROMAGNETIC_SEPERATION_NEODYMIUM");
-
- /**
- * Add this to your Material if you want to have its Ore giving Cinnabar Crystals on Pulverization. Already listed are:
- * Redstone
- */
- public static final SubTag PULVERIZING_CINNABAR = getNewSubTag("PULVERIZING_CINNABAR");
-
- /**
- * This Material cannot be worked by any other means, than smashing or smelting. This is used for coated Materials.
- */
- public static final SubTag NO_WORKING = getNewSubTag("NO_WORKING");
-
- /**
- * This Material cannot be used for regular Metal working techniques since it is not possible to bend it. Already listed are:
- * Rubber, Plastic, Paper, Wood, Stone
- */
- public static final SubTag NO_SMASHING = getNewSubTag("NO_SMASHING");
-
- /**
- * This Material cannot be unificated
- */
- public static final SubTag NO_UNIFICATION = getNewSubTag("NO_UNIFICATION");
-
- /**
- * This Material cannot be used in any Recycler. Already listed are:
- * Stone, Glass, Water
- */
- public static final SubTag NO_RECYCLING = getNewSubTag("NO_RECYCLING");
-
- /**
- * This Material cannot be used in any Furnace alike Structure. Already listed are:
- * Paper, Wood, Gunpowder, Stone
- */
- public static final SubTag NO_SMELTING = getNewSubTag("NO_SMELTING");
-
- /**
- * This Material can be molten into a Fluid
- */
- public static final SubTag SMELTING_TO_FLUID = getNewSubTag("SMELTING_TO_FLUID");
-
- /**
- * This Ore should be molten directly into a Gem of this Material, if the Ingot is missing. Already listed are:
- * Cinnabar
- */
- public static final SubTag SMELTING_TO_GEM = getNewSubTag("SMELTING_TO_GEM");
-
- /**
- * If this Material is some kind of Wood
- */
- public static final SubTag WOOD = getNewSubTag("WOOD");
-
- /**
- * If this Material is some kind of Food (or edible at all)
- */
- public static final SubTag FOOD = getNewSubTag("FOOD");
-
- /**
- * If this Material is some kind of Stone
- */
- public static final SubTag STONE = getNewSubTag("STONE");
-
- /**
- * If this Material is some kind of Pearl
- */
- public static final SubTag PEARL = getNewSubTag("PEARL");
-
- /**
- * If this Material is some kind of Quartz
- */
- public static final SubTag QUARTZ = getNewSubTag("QUARTZ");
-
- /**
- * If this Material is Crystallisable
- */
- public static final SubTag CRYSTALLISABLE = getNewSubTag("CRYSTALLISABLE");
-
- /**
- * If this Material is some kind of Crystal
- */
- public static final SubTag CRYSTAL = getNewSubTag("CRYSTAL");
-
- /**
- * If this Material is some kind of Magical
- */
- public static final SubTag MAGICAL = getNewSubTag("MAGICAL");
-
- /**
- * If this Material is some kind of Metal
- */
- public static final SubTag METAL = getNewSubTag("METAL");
-
- /**
- * If this Material is some kind of Paper
- */
- public static final SubTag PAPER = getNewSubTag("PAPER");
-
- /**
- * If this Material is having a constantly burning Aura
- */
- public static final SubTag BURNING = getNewSubTag("BURNING");
-
- /**
- * If this Material is some kind of flammable
- */
- public static final SubTag FLAMMABLE = getNewSubTag("FLAMMABLE");
-
- /**
- * If this Material is not burnable at all
- */
- public static final SubTag UNBURNABLE = getNewSubTag("UNBURNABLE");
-
- /**
- * If this Material is some kind of explosive
- */
- public static final SubTag EXPLOSIVE = getNewSubTag("EXPLOSIVE");
-
- /**
- * If this Material is bouncy
- */
- public static final SubTag BOUNCY = getNewSubTag("BOUNCY");
-
- /**
- * If this Material is invisible
- */
- public static final SubTag INVISIBLE = getNewSubTag("INVISIBLE");
-
- /**
- * If this Material is transparent
- */
- public static final SubTag TRANSPARENT = getNewSubTag("TRANSPARENT");
-
- /**
- * If this Material has a Color
- */
- public static final SubTag HAS_COLOR = getNewSubTag("HAS_COLOR");
-
- /**
- * If this Material is stretchable
- */
- public static final SubTag STRETCHY = getNewSubTag("STRETCHY");
-
- /**
- * If this Material is grindable with a simple Mortar
- */
- public static final SubTag MORTAR_GRINDABLE = getNewSubTag("MORTAR_GRINDABLE");
-
- /**
- * If this Material is usable for Soldering
- */
- public static final SubTag SOLDERING_MATERIAL = getNewSubTag("SOLDERING_MATERIAL");
-
- /**
- * If this Material is has extra Costs for Soldering, requires the Tag "SOLDERING_MATERIAL" too
- */
- public static final SubTag SOLDERING_MATERIAL_BAD = getNewSubTag("SOLDERING_MATERIAL_BAD");
-
- /**
- * If this Material is has a discount for Soldering, requires the Tag "SOLDERING_MATERIAL" too
- */
- public static final SubTag SOLDERING_MATERIAL_GOOD = getNewSubTag("SOLDERING_MATERIAL_GOOD");
-
- /**
- * Energy Tag for Electricity
- * Primary = Voltage
- * Secondary = Amperage
- */
- public static final SubTag ENERGY_ELECTRICITY = getNewSubTag("ENERGY_ELECTRICITY");
-
- /**
- * Energy Tag for Rotating Power
- * Primary = Speed
- * Secondary = Power
- */
- public static final SubTag ENERGY_ROTATIONAL = getNewSubTag("ENERGY_ROTATIONAL");
-
- /**
- * Energy Tag for Steam Power
- * Primary = Steam per Tick
- * Secondary = unused (always 1)
- */
- public static final SubTag ENERGY_STEAM = getNewSubTag("ENERGY_STEAM");
-
- /**
- * Energy Tag for Air Pressure Power
- * Primary = Pressure
- * Secondary = unused (always 1)
- */
- public static final SubTag ENERGY_AIR = getNewSubTag("ENERGY_AIR");
-
- /**
- * Energy Tag for Heat
- * Primary = Temperature
- * Secondary = unused (always 1)
- */
- public static final SubTag ENERGY_HEAT = getNewSubTag("ENERGY_HEAT");
-
- /**
- * Energy Tag for RedstoneFlux
- * Primary = unused (always 1)
- * Secondary = RF
- */
- public static final SubTag ENERGY_REDSTONE_FLUX = getNewSubTag("ENERGY_REDSTONE_FLUX");
-
- /** Projectile Tag for Arrows */
- public static final SubTag PROJECTILE_ARROW = getNewSubTag("PROJECTILE_ARROW");
-
- public final long mSubtagID;
- public final String mName;
- public final Collection<ISubTagContainer> mRelevantTaggedItems = new HashSet<ISubTagContainer>(1);
-
- private SubTag(String aName) {
- mSubtagID = sSubtagID++;
- mName = aName;
- sSubTags.add(this);
- }
-
- public static SubTag getNewSubTag(String aName) {
- for (SubTag tSubTag : sSubTags) if (tSubTag.mName.equals(aName)) return tSubTag;
- return new SubTag(aName);
- }
-
- @Override
- public String toString() {
- return mName;
- }
-
- public SubTag addContainerToList(ISubTagContainer... aContainers) {
- if (aContainers != null) for (ISubTagContainer aContainer : aContainers) if (aContainer != null && !mRelevantTaggedItems.contains(aContainer)) mRelevantTaggedItems.add(aContainer);
- return this;
- }
-
- public SubTag addTo(ISubTagContainer... aContainers) {
- if (aContainers != null) for (ISubTagContainer aContainer : aContainers) if (aContainer != null) aContainer.add(this);
- return this;
- }
-
- @Override
- public boolean isTrue(ISubTagContainer aObject) {
- return aObject.contains(this);
- }
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/enums/TC_Aspects.java b/main/java/gregtech/api/enums/TC_Aspects.java
deleted file mode 100644
index 79a9b61782..0000000000
--- a/main/java/gregtech/api/enums/TC_Aspects.java
+++ /dev/null
@@ -1,108 +0,0 @@
-package gregtech.api.enums;
-
-import java.util.List;
-
-public enum TC_Aspects {
- AER(1)
- , ALIENIS(20)
- , AQUA(3)
- , ARBOR(1)
- , AURAM(16)
- , BESTIA(6)
- , COGNITO(2)
- , CORPUS(2)
- , ELECTRUM(24)
- , EXAMINIS(32)
- , FABRICO(2)
- , FAMES(2)
- , GELUM(1)
- , GRANUM(4)
- , HERBA(2)
- , HUMANUS(8)
- , IGNIS(4)
- , INSTRUMENTUM(4)
- , ITER(6)
- , LIMUS(3)
- , LUCRUM(32)
- , LUX(4)
- , MACHINA(16)
- , MAGNETO(24)
- , MESSIS(3)
- , METALLUM(8)
- , METO(2)
- , MORTUUS(16)
- , MOTUS(4)
- , NEBRISUM(48)
- , ORDO(8)
- , PANNUS(6)
- , PERDITIO(2)
- , PERFODIO(4)
- , PERMUTATIO(12)
- , POTENTIA(16)
- , PRAECANTIO(16)
- , RADIO(48)
- , SANO(24)
- , SENSUS(4)
- , SPIRITUS(24)
- , STRONTIO(64)
- , TELUM(6)
- , TERRA(1)
- , TEMPESTAS(64)
- , TENEBRAE(24)
- , TUTAMEN(12)
- , VACUOS(6)
- , VENENUM(16)
- , VICTUS(4)
- , VINCULUM(16)
- , VITIUM(48)
- , VITREUS(3)
- , VOLATUS(12)
- ;
-
- /**
- * The Thaumcraft Aspect Object of the Mod itself.
- */
- public Object mAspect;
- public int mValue;
-
- private TC_Aspects(int aValue){
- mValue = aValue;
- }
-
- public static class TC_AspectStack {
- public TC_Aspects mAspect;
- public long mAmount;
-
-
- public TC_AspectStack(TC_Aspects aAspect, long aAmount) {
- mAspect = aAspect;
- mAmount = aAmount;
- }
-
- public TC_AspectStack copy() {
- return new TC_AspectStack(mAspect, mAmount);
- }
-
- public TC_AspectStack copy(long aAmount) {
- return new TC_AspectStack(mAspect, aAmount);
- }
-
- public List<TC_AspectStack> addToAspectList(List<TC_AspectStack> aList) {
- if (mAmount == 0) return aList;
- for (TC_AspectStack tAspect : aList) if (tAspect.mAspect == mAspect) {tAspect.mAmount += mAmount; return aList;}
- aList.add(copy());
- return aList;
- }
-
- public boolean removeFromAspectList(List<TC_AspectStack> aList) {
- for (TC_AspectStack tAspect : aList) if (tAspect.mAspect == mAspect) {
- if (tAspect.mAmount >= mAmount) {
- tAspect.mAmount -= mAmount;
- if (tAspect.mAmount == 0) aList.remove(tAspect);
- return true;
- }
- }
- return false;
- }
- }
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/enums/TextureSet.java b/main/java/gregtech/api/enums/TextureSet.java
deleted file mode 100644
index 4a4bf6165e..0000000000
--- a/main/java/gregtech/api/enums/TextureSet.java
+++ /dev/null
@@ -1,184 +0,0 @@
-package gregtech.api.enums;
-
-import gregtech.api.interfaces.IIconContainer;
-
-public class TextureSet {
- public static final TextureSet
- SET_NONE = new TextureSet("NONE")
- , SET_DULL = new TextureSet("DULL")
- , SET_RUBY = new TextureSet("RUBY")
- , SET_OPAL = new TextureSet("OPAL")
- , SET_LEAF = new TextureSet("LEAF")
- , SET_WOOD = new TextureSet("WOOD")
- , SET_SAND = new TextureSet("SAND")
- , SET_FINE = new TextureSet("FINE")
- , SET_FIERY = new TextureSet("FIERY")
- , SET_FLUID = new TextureSet("FLUID")
- , SET_ROUGH = new TextureSet("ROUGH")
- , SET_PAPER = new TextureSet("PAPER")
- , SET_GLASS = new TextureSet("GLASS")
- , SET_FLINT = new TextureSet("FLINT")
- , SET_LAPIS = new TextureSet("LAPIS")
- , SET_SHINY = new TextureSet("SHINY")
- , SET_SHARDS = new TextureSet("SHARDS")
- , SET_POWDER = new TextureSet("POWDER")
- , SET_QUARTZ = new TextureSet("QUARTZ")
- , SET_EMERALD = new TextureSet("EMERALD")
- , SET_DIAMOND = new TextureSet("DIAMOND")
- , SET_LIGNITE = new TextureSet("LIGNITE")
- , SET_MAGNETIC = new TextureSet("MAGNETIC")
- , SET_METALLIC = new TextureSet("METALLIC")
- , SET_NETHERSTAR = new TextureSet("NETHERSTAR")
- , SET_GEM_VERTICAL = new TextureSet("GEM_VERTICAL")
- , SET_GEM_HORIZONTAL = new TextureSet("GEM_HORIZONTAL")
- ;
-
- /**
- * For the Indices of OrePrefixes you need to look into the OrePrefix Enum.
- */
- public static final short
- INDEX_wire = 69
- , INDEX_foil = 70
- , INDEX_block1 = 71
- , INDEX_block2 = 72
- , INDEX_block3 = 73
- , INDEX_block4 = 74
- , INDEX_block5 = 75
- , INDEX_block6 = 76
- ;
-
- public final IIconContainer[] mTextures = new IIconContainer[128];
- public final String mSetName;
-
- public TextureSet(String aSetName) {
- mSetName = aSetName;
- mTextures[ 0] = new Textures.ItemIcons .CustomIcon("materialicons/"+mSetName+"/dustTiny");
- mTextures[ 1] = new Textures.ItemIcons .CustomIcon("materialicons/"+mSetName+"/dustSmall");
- mTextures[ 2] = new Textures.ItemIcons .CustomIcon("materialicons/"+mSetName+"/dust");
- mTextures[ 3] = new Textures.ItemIcons .CustomIcon("materialicons/"+mSetName+"/dustImpure");
- mTextures[ 4] = new Textures.ItemIcons .CustomIcon("materialicons/"+mSetName+"/dustPure");
- mTextures[ 5] = new Textures.ItemIcons .CustomIcon("materialicons/"+mSetName+"/crushed");
- mTextures[ 6] = new Textures.ItemIcons .CustomIcon("materialicons/"+mSetName+"/crushedPurified");
- mTextures[ 7] = new Textures.ItemIcons .CustomIcon("materialicons/"+mSetName+"/crushedCentrifuged");
- mTextures[ 8] = new Textures.ItemIcons .CustomIcon("materialicons/"+mSetName+"/gem");
- mTextures[ 9] = new Textures.ItemIcons .CustomIcon("materialicons/"+mSetName+"/nugget");
- mTextures[ 10] = new Textures.ItemIcons .CustomIcon("materialicons/"+mSetName+"/void");
- mTextures[ 11] = new Textures.ItemIcons .CustomIcon("materialicons/"+mSetName+"/ingot");
- mTextures[ 12] = new Textures.ItemIcons .CustomIcon("materialicons/"+mSetName+"/ingotHot");
- mTextures[ 13] = new Textures.ItemIcons .CustomIcon("materialicons/"+mSetName+"/ingotDouble");
- mTextures[ 14] = new Textures.ItemIcons .CustomIcon("materialicons/"+mSetName+"/ingotTriple");
- mTextures[ 15] = new Textures.ItemIcons .CustomIcon("materialicons/"+mSetName+"/ingotQuadruple");
- mTextures[ 16] = new Textures.ItemIcons .CustomIcon("materialicons/"+mSetName+"/ingotQuintuple");
- mTextures[ 17] = new Textures.ItemIcons .CustomIcon("materialicons/"+mSetName+"/plate");
- mTextures[ 18] = new Textures.ItemIcons .CustomIcon("materialicons/"+mSetName+"/plateDouble");
- mTextures[ 19] = new Textures.ItemIcons .CustomIcon("materialicons/"+mSetName+"/plateTriple");
- mTextures[ 20] = new Textures.ItemIcons .CustomIcon("materialicons/"+mSetName+"/plateQuadruple");
- mTextures[ 21] = new Textures.ItemIcons .CustomIcon("materialicons/"+mSetName+"/plateQuintuple");
- mTextures[ 22] = new Textures.ItemIcons .CustomIcon("materialicons/"+mSetName+"/plateDense");
- mTextures[ 23] = new Textures.ItemIcons .CustomIcon("materialicons/"+mSetName+"/stick");
- mTextures[ 24] = new Textures.ItemIcons .CustomIcon("materialicons/"+mSetName+"/lens");
- mTextures[ 25] = new Textures.ItemIcons .CustomIcon("materialicons/"+mSetName+"/round");
- mTextures[ 26] = new Textures.ItemIcons .CustomIcon("materialicons/"+mSetName+"/bolt");
- mTextures[ 27] = new Textures.ItemIcons .CustomIcon("materialicons/"+mSetName+"/screw");
- mTextures[ 28] = new Textures.ItemIcons .CustomIcon("materialicons/"+mSetName+"/ring");
- mTextures[ 29] = new Textures.ItemIcons .CustomIcon("materialicons/"+mSetName+"/foil");
- mTextures[ 30] = new Textures.ItemIcons .CustomIcon("materialicons/"+mSetName+"/cell");
- mTextures[ 31] = new Textures.ItemIcons .CustomIcon("materialicons/"+mSetName+"/cellPlasma");
- mTextures[ 32] = new Textures.ItemIcons .CustomIcon("materialicons/"+mSetName+"/toolHeadSword");
- mTextures[ 33] = new Textures.ItemIcons .CustomIcon("materialicons/"+mSetName+"/toolHeadPickaxe");
- mTextures[ 34] = new Textures.ItemIcons .CustomIcon("materialicons/"+mSetName+"/toolHeadShovel");
- mTextures[ 35] = new Textures.ItemIcons .CustomIcon("materialicons/"+mSetName+"/toolHeadAxe");
- mTextures[ 36] = new Textures.ItemIcons .CustomIcon("materialicons/"+mSetName+"/toolHeadHoe");
- mTextures[ 37] = new Textures.ItemIcons .CustomIcon("materialicons/"+mSetName+"/toolHeadHammer");
- mTextures[ 38] = new Textures.ItemIcons .CustomIcon("materialicons/"+mSetName+"/toolHeadFile");
- mTextures[ 39] = new Textures.ItemIcons .CustomIcon("materialicons/"+mSetName+"/toolHeadSaw");
- mTextures[ 40] = new Textures.ItemIcons .CustomIcon("materialicons/"+mSetName+"/toolHeadDrill");
- mTextures[ 41] = new Textures.ItemIcons .CustomIcon("materialicons/"+mSetName+"/toolHeadChainsaw");
- mTextures[ 42] = new Textures.ItemIcons .CustomIcon("materialicons/"+mSetName+"/toolHeadWrench");
- mTextures[ 43] = new Textures.ItemIcons .CustomIcon("materialicons/"+mSetName+"/toolHeadUniversalSpade");
- mTextures[ 44] = new Textures.ItemIcons .CustomIcon("materialicons/"+mSetName+"/toolHeadSense");
- mTextures[ 45] = new Textures.ItemIcons .CustomIcon("materialicons/"+mSetName+"/toolHeadPlow");
- mTextures[ 46] = new Textures.ItemIcons .CustomIcon("materialicons/"+mSetName+"/toolHeadArrow");
- mTextures[ 47] = new Textures.ItemIcons .CustomIcon("materialicons/"+mSetName+"/toolHeadScrewdriver");
- mTextures[ 48] = new Textures.ItemIcons .CustomIcon("materialicons/"+mSetName+"/toolHeadBuzzSaw");
- mTextures[ 49] = new Textures.ItemIcons .CustomIcon("materialicons/"+mSetName+"/toolHeadSoldering");
- mTextures[ 50] = new Textures.ItemIcons .CustomIcon("materialicons/"+mSetName+"/void");
- mTextures[ 51] = new Textures.ItemIcons .CustomIcon("materialicons/"+mSetName+"/wireFine");
- mTextures[ 52] = new Textures.ItemIcons .CustomIcon("materialicons/"+mSetName+"/gearGtSmall");
- mTextures[ 53] = new Textures.ItemIcons .CustomIcon("materialicons/"+mSetName+"/rotor");
- mTextures[ 54] = new Textures.ItemIcons .CustomIcon("materialicons/"+mSetName+"/stickLong");
- mTextures[ 55] = new Textures.ItemIcons .CustomIcon("materialicons/"+mSetName+"/springSmall");
- mTextures[ 56] = new Textures.ItemIcons .CustomIcon("materialicons/"+mSetName+"/spring");
- mTextures[ 57] = new Textures.ItemIcons .CustomIcon("materialicons/"+mSetName+"/arrowGtWood");
- mTextures[ 58] = new Textures.ItemIcons .CustomIcon("materialicons/"+mSetName+"/arrowGtPlastic");
- mTextures[ 59] = new Textures.ItemIcons .CustomIcon("materialicons/"+mSetName+"/gemChipped");
- mTextures[ 60] = new Textures.ItemIcons .CustomIcon("materialicons/"+mSetName+"/gemFlawed");
- mTextures[ 61] = new Textures.ItemIcons .CustomIcon("materialicons/"+mSetName+"/gemFlawless");
- mTextures[ 62] = new Textures.ItemIcons .CustomIcon("materialicons/"+mSetName+"/gemExquisite");
- mTextures[ 63] = new Textures.ItemIcons .CustomIcon("materialicons/"+mSetName+"/gearGt");
- mTextures[ 64] = new Textures.BlockIcons.CustomIcon("materialicons/"+mSetName+"/void");
- mTextures[ 65] = new Textures.BlockIcons.CustomIcon("materialicons/"+mSetName+"/void");
- mTextures[ 66] = new Textures.BlockIcons.CustomIcon("materialicons/"+mSetName+"/void");
- mTextures[ 67] = new Textures.BlockIcons.CustomIcon("materialicons/"+mSetName+"/oreSmall");
- mTextures[ 68] = new Textures.BlockIcons.CustomIcon("materialicons/"+mSetName+"/ore");
- mTextures[ 69] = new Textures.BlockIcons.CustomIcon("materialicons/"+mSetName+"/wire");
- mTextures[ 70] = new Textures.BlockIcons.CustomIcon("materialicons/"+mSetName+"/foil");
- mTextures[ 71] = new Textures.BlockIcons.CustomIcon("materialicons/"+mSetName+"/block1");
- mTextures[ 72] = new Textures.BlockIcons.CustomIcon("materialicons/"+mSetName+"/block2");
- mTextures[ 73] = new Textures.BlockIcons.CustomIcon("materialicons/"+mSetName+"/block3");
- mTextures[ 74] = new Textures.BlockIcons.CustomIcon("materialicons/"+mSetName+"/block4");
- mTextures[ 75] = new Textures.BlockIcons.CustomIcon("materialicons/"+mSetName+"/block5");
- mTextures[ 76] = new Textures.BlockIcons.CustomIcon("materialicons/"+mSetName+"/block6");
- mTextures[ 77] = new Textures.BlockIcons.CustomIcon("materialicons/"+mSetName+"/pipeSide");
- mTextures[ 78] = new Textures.BlockIcons.CustomIcon("materialicons/"+mSetName+"/pipeTiny");
- mTextures[ 79] = new Textures.BlockIcons.CustomIcon("materialicons/"+mSetName+"/pipeSmall");
- mTextures[ 80] = new Textures.BlockIcons.CustomIcon("materialicons/"+mSetName+"/pipeMedium");
- mTextures[ 81] = new Textures.BlockIcons.CustomIcon("materialicons/"+mSetName+"/pipeLarge");
- mTextures[ 82] = new Textures.BlockIcons.CustomIcon("materialicons/"+mSetName+"/pipeHuge");
- mTextures[ 83] = new Textures.BlockIcons.CustomIcon("materialicons/"+mSetName+"/frameGt");
- mTextures[ 84] = new Textures.BlockIcons.CustomIcon("materialicons/"+mSetName+"/void");
- mTextures[ 85] = new Textures.BlockIcons.CustomIcon("materialicons/"+mSetName+"/void");
- mTextures[ 86] = new Textures.BlockIcons.CustomIcon("materialicons/"+mSetName+"/void");
- mTextures[ 87] = new Textures.BlockIcons.CustomIcon("materialicons/"+mSetName+"/void");
- mTextures[ 88] = new Textures.BlockIcons.CustomIcon("materialicons/"+mSetName+"/void");
- mTextures[ 89] = new Textures.BlockIcons.CustomIcon("materialicons/"+mSetName+"/void");
- mTextures[ 90] = new Textures.BlockIcons.CustomIcon("materialicons/"+mSetName+"/void");
- mTextures[ 91] = new Textures.BlockIcons.CustomIcon("materialicons/"+mSetName+"/void");
- mTextures[ 92] = new Textures.BlockIcons.CustomIcon("materialicons/"+mSetName+"/void");
- mTextures[ 93] = new Textures.BlockIcons.CustomIcon("materialicons/"+mSetName+"/void");
- mTextures[ 94] = new Textures.BlockIcons.CustomIcon("materialicons/"+mSetName+"/void");
- mTextures[ 95] = new Textures.BlockIcons.CustomIcon("materialicons/"+mSetName+"/void");
- mTextures[ 96] = new Textures.ItemIcons .CustomIcon("materialicons/"+mSetName+"/crateGtDust");
- mTextures[ 97] = new Textures.ItemIcons .CustomIcon("materialicons/"+mSetName+"/crateGtIngot");
- mTextures[ 98] = new Textures.ItemIcons .CustomIcon("materialicons/"+mSetName+"/crateGtGem");
- mTextures[ 99] = new Textures.ItemIcons .CustomIcon("materialicons/"+mSetName+"/crateGtPlate");
- mTextures[100] = new Textures.ItemIcons .CustomIcon("materialicons/"+mSetName+"/turbineBlade");
- mTextures[101] = new Textures.ItemIcons .CustomIcon("materialicons/"+mSetName+"/void");
- mTextures[102] = new Textures.ItemIcons .CustomIcon("materialicons/"+mSetName+"/void");
- mTextures[103] = new Textures.ItemIcons .CustomIcon("materialicons/"+mSetName+"/void");
- mTextures[104] = new Textures.ItemIcons .CustomIcon("materialicons/"+mSetName+"/void");
- mTextures[105] = new Textures.ItemIcons .CustomIcon("materialicons/"+mSetName+"/void");
- mTextures[106] = new Textures.ItemIcons .CustomIcon("materialicons/"+mSetName+"/void");
- mTextures[107] = new Textures.ItemIcons .CustomIcon("materialicons/"+mSetName+"/void");
- mTextures[108] = new Textures.ItemIcons .CustomIcon("materialicons/"+mSetName+"/void");
- mTextures[109] = new Textures.ItemIcons .CustomIcon("materialicons/"+mSetName+"/void");
- mTextures[110] = new Textures.ItemIcons .CustomIcon("materialicons/"+mSetName+"/void");
- mTextures[111] = new Textures.ItemIcons .CustomIcon("materialicons/"+mSetName+"/void");
- mTextures[112] = new Textures.ItemIcons .CustomIcon("materialicons/"+mSetName+"/void");
- mTextures[113] = new Textures.ItemIcons .CustomIcon("materialicons/"+mSetName+"/void");
- mTextures[114] = new Textures.ItemIcons .CustomIcon("materialicons/"+mSetName+"/void");
- mTextures[115] = new Textures.ItemIcons .CustomIcon("materialicons/"+mSetName+"/void");
- mTextures[116] = new Textures.ItemIcons .CustomIcon("materialicons/"+mSetName+"/void");
- mTextures[117] = new Textures.ItemIcons .CustomIcon("materialicons/"+mSetName+"/void");
- mTextures[118] = new Textures.ItemIcons .CustomIcon("materialicons/"+mSetName+"/void");
- mTextures[119] = new Textures.ItemIcons .CustomIcon("materialicons/"+mSetName+"/void");
- mTextures[120] = new Textures.ItemIcons .CustomIcon("materialicons/"+mSetName+"/void");
- mTextures[121] = new Textures.ItemIcons .CustomIcon("materialicons/"+mSetName+"/void");
- mTextures[122] = new Textures.ItemIcons .CustomIcon("materialicons/"+mSetName+"/void");
- mTextures[123] = new Textures.ItemIcons .CustomIcon("materialicons/"+mSetName+"/void");
- mTextures[124] = new Textures.ItemIcons .CustomIcon("materialicons/"+mSetName+"/void");
- mTextures[125] = new Textures.ItemIcons .CustomIcon("materialicons/"+mSetName+"/void");
- mTextures[126] = new Textures.ItemIcons .CustomIcon("materialicons/"+mSetName+"/void");
- mTextures[127] = new Textures.ItemIcons .CustomIcon("materialicons/"+mSetName+"/void");
- }
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/enums/Textures.java b/main/java/gregtech/api/enums/Textures.java
deleted file mode 100644
index 43c33fc8db..0000000000
--- a/main/java/gregtech/api/enums/Textures.java
+++ /dev/null
@@ -1,453 +0,0 @@
-package gregtech.api.enums;
-
-import static gregtech.api.enums.GT_Values.RES_PATH_BLOCK;
-import static gregtech.api.enums.GT_Values.RES_PATH_ITEM;
-import gregtech.api.GregTech_API;
-import gregtech.api.interfaces.IIconContainer;
-import gregtech.api.interfaces.ITexture;
-import gregtech.api.objects.GT_RenderedTexture;
-import gregtech.api.objects.GT_SidedTexture;
-import net.minecraft.client.renderer.texture.TextureMap;
-import net.minecraft.util.IIcon;
-import net.minecraft.util.ResourceLocation;
-
-public class Textures {
- public enum BlockIcons implements IIconContainer, Runnable {
- VOID // The Empty Texture
- , RENDERING_ERROR
- , PIPE_RESTRICTOR
- , INSULATION_FULL, INSULATION_TINY, INSULATION_SMALL, INSULATION_MEDIUM, INSULATION_LARGE, INSULATION_HUGE
- , CFOAM_FRESH, CFOAM_HARDENED
- , SOLARPANEL, SOLARPANEL_8V, SOLARPANEL_LV, SOLARPANEL_MV, SOLARPANEL_HV, SOLARPANEL_EV, SOLARPANEL_IV, SOLARPANEL_LuV, SOLARPANEL_ZPM, SOLARPANEL_UV
- , VENT_NORMAL, VENT_ADVANCED, COVER_WOOD_PLATE
- , ARROW_UP, ARROW_DOWN, ARROW_LEFT, ARROW_RIGHT
- , AUTOMATION_FILTER, AUTOMATION_TYPEFILTER, AUTOMATION_CHESTBUFFER, AUTOMATION_SUPERBUFFER, AUTOMATION_REGULATOR
- , CONCRETE_LIGHT_STONE, CONCRETE_LIGHT_COBBLE, CONCRETE_LIGHT_COBBLE_MOSSY, CONCRETE_LIGHT_BRICKS, CONCRETE_LIGHT_BRICKS_CRACKED, CONCRETE_LIGHT_BRICKS_MOSSY, CONCRETE_LIGHT_BRICKS_CHISELED, CONCRETE_LIGHT_SMOOTH
- , CONCRETE_DARK_STONE, CONCRETE_DARK_COBBLE, CONCRETE_DARK_COBBLE_MOSSY, CONCRETE_DARK_BRICKS, CONCRETE_DARK_BRICKS_CRACKED, CONCRETE_DARK_BRICKS_MOSSY, CONCRETE_DARK_BRICKS_CHISELED, CONCRETE_DARK_SMOOTH
- , GRANITE_BLACK_STONE, GRANITE_BLACK_COBBLE, GRANITE_BLACK_COBBLE_MOSSY, GRANITE_BLACK_BRICKS, GRANITE_BLACK_BRICKS_CRACKED, GRANITE_BLACK_BRICKS_MOSSY, GRANITE_BLACK_BRICKS_CHISELED, GRANITE_BLACK_SMOOTH
- , GRANITE_RED_STONE, GRANITE_RED_COBBLE, GRANITE_RED_COBBLE_MOSSY, GRANITE_RED_BRICKS, GRANITE_RED_BRICKS_CRACKED, GRANITE_RED_BRICKS_MOSSY, GRANITE_RED_BRICKS_CHISELED, GRANITE_RED_SMOOTH
- , MACHINE_BRONZEBRICKS_TOP, MACHINE_BRONZEBRICKS_SIDE, MACHINE_BRONZEBRICKS_BOTTOM
- , MACHINE_STEELBRICKS_TOP, MACHINE_STEELBRICKS_SIDE, MACHINE_STEELBRICKS_BOTTOM
- , MACHINE_BRONZE_TOP, MACHINE_BRONZE_SIDE, MACHINE_BRONZE_BOTTOM
- , MACHINE_STEEL_TOP, MACHINE_STEEL_SIDE, MACHINE_STEEL_BOTTOM
- , MACHINE_8V_TOP, MACHINE_8V_SIDE, MACHINE_8V_BOTTOM
- , MACHINE_LV_TOP, MACHINE_LV_SIDE, MACHINE_LV_BOTTOM
- , MACHINE_MV_TOP, MACHINE_MV_SIDE, MACHINE_MV_BOTTOM
- , MACHINE_HV_TOP, MACHINE_HV_SIDE, MACHINE_HV_BOTTOM
- , MACHINE_EV_TOP, MACHINE_EV_SIDE, MACHINE_EV_BOTTOM
- , MACHINE_IV_TOP, MACHINE_IV_SIDE, MACHINE_IV_BOTTOM
- , MACHINE_LuV_TOP, MACHINE_LuV_SIDE, MACHINE_LuV_BOTTOM
- , MACHINE_ZPM_TOP, MACHINE_ZPM_SIDE, MACHINE_ZPM_BOTTOM
- , MACHINE_UV_TOP, MACHINE_UV_SIDE, MACHINE_UV_BOTTOM
- , MACHINE_MAX_TOP, MACHINE_MAX_SIDE, MACHINE_MAX_BOTTOM
- , MACHINE_BRONZEPLATEDBRICKS, MACHINE_HEATPROOFCASING, MACHINE_BRONZEBLASTFURNACE, MACHINE_BRONZEBLASTFURNACE_ACTIVE
- , MACHINE_CASING_ROBUST_TUNGSTENSTEEL, MACHINE_CASING_CLEAN_STAINLESSSTEEL, MACHINE_CASING_STABLE_TITANIUM, MACHINE_CASING_FIREBOX_TITANIUM, MACHINE_CASING_FUSION_COIL, MACHINE_CASING_FUSION, MACHINE_CASING_FUSION_GLASS, MACHINE_CASING_FUSION_GLASS_YELLOW, MACHINE_CASING_FUSION_2,MACHINE_CASING_MAGIC,MACHINE_CASING_MAGIC_ACTIVE,MACHINE_CASING_MAGIC_FRONT,MACHINE_CASING_MAGIC_FRONT_ACTIVE,MACHINE_CASING_DRAGONEGG
- , MACHINE_CASING_SOLID_STEEL, MACHINE_CASING_FROST_PROOF, MACHINE_CASING_PUMP, MACHINE_CASING_MOTOR, MACHINE_CASING_PIPE_BRONZE, MACHINE_CASING_PIPE_STEEL, MACHINE_CASING_PIPE_TITANIUM, MACHINE_CASING_PIPE_TUNGSTENSTEEL, MACHINE_CASING_GEARBOX_BRONZE, MACHINE_CASING_GEARBOX_STEEL, MACHINE_CASING_GEARBOX_TITANIUM, MACHINE_CASING_GEARBOX_TUNGSTENSTEEL, MACHINE_CASING_DATA_DRIVE, MACHINE_CASING_CONTAINMENT_FIELD, MACHINE_CASING_ASSEMBLER, MACHINE_CASING_PROCESSOR
- , MACHINE_CASING_STRIPES_A, MACHINE_CASING_STRIPES_B, MACHINE_CASING_RADIOACTIVEHAZARD, MACHINE_CASING_BIOHAZARD, MACHINE_CASING_EXPLOSIONHAZARD, MACHINE_CASING_FIREHAZARD, MACHINE_CASING_ACIDHAZARD, MACHINE_CASING_MAGICHAZARD, MACHINE_CASING_FROSTHAZARD, MACHINE_CASING_NOISEHAZARD, MACHINE_CASING_GRATE, MACHINE_CASING_VENT, MACHINE_CASING_RADIATIONPROOF, MACHINE_CASING_FIREBOX_BRONZE, MACHINE_CASING_FIREBOX_STEEL, MACHINE_CASING_FIREBOX_TUNGSTENSTEEL
- , BOILER_SOLAR, BOILER_FRONT, BOILER_FRONT_ACTIVE, BOILER_LAVA_FRONT, BOILER_LAVA_FRONT_ACTIVE
- , NAQUADAH_REACTOR_SOLID_BACK, NAQUADAH_REACTOR_SOLID_FRONT, NAQUADAH_REACTOR_SOLID_SIDE, NAQUADAH_REACTOR_SOLID_BOTTOM, NAQUADAH_REACTOR_SOLID_TOP, NAQUADAH_REACTOR_SOLID_BACK_ACTIVE, NAQUADAH_REACTOR_SOLID_FRONT_ACTIVE, NAQUADAH_REACTOR_SOLID_SIDE_ACTIVE, NAQUADAH_REACTOR_SOLID_BOTTOM_ACTIVE, NAQUADAH_REACTOR_SOLID_TOP_ACTIVE
- , NAQUADAH_REACTOR_FLUID_BACK, NAQUADAH_REACTOR_FLUID_FRONT, NAQUADAH_REACTOR_FLUID_SIDE, NAQUADAH_REACTOR_FLUID_BOTTOM, NAQUADAH_REACTOR_FLUID_TOP, NAQUADAH_REACTOR_FLUID_BACK_ACTIVE, NAQUADAH_REACTOR_FLUID_FRONT_ACTIVE, NAQUADAH_REACTOR_FLUID_SIDE_ACTIVE, NAQUADAH_REACTOR_FLUID_BOTTOM_ACTIVE, NAQUADAH_REACTOR_FLUID_TOP_ACTIVE
- , DIESEL_GENERATOR_BACK, DIESEL_GENERATOR_FRONT, DIESEL_GENERATOR_SIDE, DIESEL_GENERATOR_BOTTOM, DIESEL_GENERATOR_TOP, DIESEL_GENERATOR_BACK_ACTIVE, DIESEL_GENERATOR_FRONT_ACTIVE, DIESEL_GENERATOR_SIDE_ACTIVE, DIESEL_GENERATOR_BOTTOM_ACTIVE, DIESEL_GENERATOR_TOP_ACTIVE
- , GAS_TURBINE_BACK, GAS_TURBINE_FRONT, GAS_TURBINE_SIDE, GAS_TURBINE_BOTTOM, GAS_TURBINE_TOP, GAS_TURBINE_BACK_ACTIVE, GAS_TURBINE_FRONT_ACTIVE, GAS_TURBINE_SIDE_ACTIVE, GAS_TURBINE_BOTTOM_ACTIVE, GAS_TURBINE_TOP_ACTIVE
- , STEAM_TURBINE_BACK, STEAM_TURBINE_FRONT, STEAM_TURBINE_SIDE, STEAM_TURBINE_BOTTOM, STEAM_TURBINE_TOP, STEAM_TURBINE_BACK_ACTIVE, STEAM_TURBINE_FRONT_ACTIVE, STEAM_TURBINE_SIDE_ACTIVE, STEAM_TURBINE_BOTTOM_ACTIVE, STEAM_TURBINE_TOP_ACTIVE
- , MACHINE_COIL_CUPRONICKEL, MACHINE_COIL_KANTHAL, MACHINE_COIL_NICHROME, MACHINE_COIL_SUPERCONDUCTOR
- , OVERLAY_LOCKER, OVERLAY_LOCKER_000, OVERLAY_LOCKER_001, OVERLAY_LOCKER_002, OVERLAY_LOCKER_003, OVERLAY_LOCKER_004, OVERLAY_LOCKER_005, OVERLAY_LOCKER_006, OVERLAY_LOCKER_007, OVERLAY_LOCKER_008, OVERLAY_LOCKER_009, OVERLAY_LOCKER_010, OVERLAY_LOCKER_011, OVERLAY_LOCKER_012, OVERLAY_LOCKER_013
- , OVERLAY_LENS, OVERLAY_PIPE, OVERLAY_PIPE_IN, OVERLAY_PIPE_OUT, OVERLAY_MUFFLER, OVERLAY_CONTROLLER, OVERLAY_ACTIVITYDETECTOR, OVERLAY_ENERGYDETECTOR, OVERLAY_FLUIDDETECTOR, OVERLAY_ITEMDETECTOR, OVERLAY_FUSION1, OVERLAY_FUSION2, OVERLAY_FUSION3, OVERLAY_SCREEN, OVERLAY_QTANK, OVERLAY_QCHEST, OVERLAY_SHUTTER, OVERLAY_CLOSET, OVERLAY_DUCTTAPE, OVERLAY_MAINTENANCE, OVERLAY_CONVEYOR, OVERLAY_PUMP, OVERLAY_ARM, OVERLAY_DRAIN, OVERLAY_CRAFTING
- , OVERLAY_ENERGY_IN, OVERLAY_ENERGY_OUT , OVERLAY_ENERGY_IN_MULTI, OVERLAY_ENERGY_OUT_MULTI
- , OVERLAY_FRONT_LARGE_BOILER, OVERLAY_FRONT_LARGE_BOILER_ACTIVE, OVERLAY_FRONT_VACUUM_FREEZER, OVERLAY_FRONT_VACUUM_FREEZER_ACTIVE, OVERLAY_FRONT_MULTI_SMELTER, OVERLAY_FRONT_MULTI_SMELTER_ACTIVE, OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE, OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ACTIVE, OVERLAY_FRONT_IMPLOSION_COMPRESSOR, OVERLAY_FRONT_IMPLOSION_COMPRESSOR_ACTIVE
- , OVERLAY_TOP_POTIONBREWER , OVERLAY_TOP_REPLICATOR , OVERLAY_TOP_MASSFAB , OVERLAY_TOP_STEAM_HAMMER , OVERLAY_TOP_STEAM_FURNACE , OVERLAY_TOP_STEAM_ALLOY_SMELTER , OVERLAY_TOP_STEAM_MACERATOR , OVERLAY_TOP_STEAM_COMPRESSOR , OVERLAY_TOP_STEAM_EXTRACTOR , OVERLAY_TOP_DISASSEMBLER , OVERLAY_TOP_BOXINATOR , OVERLAY_TOP_ROCK_BREAKER , OVERLAY_TOP_SCANNER
- , OVERLAY_FRONT_POTIONBREWER , OVERLAY_FRONT_REPLICATOR , OVERLAY_FRONT_MASSFAB , OVERLAY_FRONT_STEAM_HAMMER , OVERLAY_FRONT_STEAM_FURNACE , OVERLAY_FRONT_STEAM_ALLOY_SMELTER , OVERLAY_FRONT_STEAM_MACERATOR , OVERLAY_FRONT_STEAM_COMPRESSOR , OVERLAY_FRONT_STEAM_EXTRACTOR , OVERLAY_FRONT_DISASSEMBLER , OVERLAY_FRONT_BOXINATOR , OVERLAY_FRONT_ROCK_BREAKER , OVERLAY_FRONT_SCANNER
- , OVERLAY_BOTTOM_POTIONBREWER , OVERLAY_BOTTOM_REPLICATOR , OVERLAY_BOTTOM_MASSFAB , OVERLAY_BOTTOM_STEAM_HAMMER , OVERLAY_BOTTOM_STEAM_FURNACE , OVERLAY_BOTTOM_STEAM_ALLOY_SMELTER , OVERLAY_BOTTOM_STEAM_MACERATOR , OVERLAY_BOTTOM_STEAM_COMPRESSOR , OVERLAY_BOTTOM_STEAM_EXTRACTOR , OVERLAY_BOTTOM_DISASSEMBLER , OVERLAY_BOTTOM_BOXINATOR , OVERLAY_BOTTOM_ROCK_BREAKER , OVERLAY_BOTTOM_SCANNER
- , OVERLAY_SIDE_POTIONBREWER , OVERLAY_SIDE_REPLICATOR , OVERLAY_SIDE_MASSFAB , OVERLAY_SIDE_STEAM_HAMMER , OVERLAY_SIDE_STEAM_FURNACE , OVERLAY_SIDE_STEAM_ALLOY_SMELTER , OVERLAY_SIDE_STEAM_MACERATOR , OVERLAY_SIDE_STEAM_COMPRESSOR , OVERLAY_SIDE_STEAM_EXTRACTOR , OVERLAY_SIDE_DISASSEMBLER , OVERLAY_SIDE_BOXINATOR , OVERLAY_SIDE_ROCK_BREAKER , OVERLAY_SIDE_SCANNER
- , OVERLAY_TOP_POTIONBREWER_ACTIVE, OVERLAY_TOP_REPLICATOR_ACTIVE, OVERLAY_TOP_MASSFAB_ACTIVE, OVERLAY_TOP_STEAM_HAMMER_ACTIVE, OVERLAY_TOP_STEAM_FURNACE_ACTIVE, OVERLAY_TOP_STEAM_ALLOY_SMELTER_ACTIVE, OVERLAY_TOP_STEAM_MACERATOR_ACTIVE, OVERLAY_TOP_STEAM_COMPRESSOR_ACTIVE, OVERLAY_TOP_STEAM_EXTRACTOR_ACTIVE, OVERLAY_TOP_DISASSEMBLER_ACTIVE, OVERLAY_TOP_BOXINATOR_ACTIVE, OVERLAY_TOP_ROCK_BREAKER_ACTIVE, OVERLAY_TOP_SCANNER_ACTIVE
- , OVERLAY_FRONT_POTIONBREWER_ACTIVE, OVERLAY_FRONT_REPLICATOR_ACTIVE, OVERLAY_FRONT_MASSFAB_ACTIVE, OVERLAY_FRONT_STEAM_HAMMER_ACTIVE, OVERLAY_FRONT_STEAM_FURNACE_ACTIVE, OVERLAY_FRONT_STEAM_ALLOY_SMELTER_ACTIVE, OVERLAY_FRONT_STEAM_MACERATOR_ACTIVE, OVERLAY_FRONT_STEAM_COMPRESSOR_ACTIVE, OVERLAY_FRONT_STEAM_EXTRACTOR_ACTIVE, OVERLAY_FRONT_DISASSEMBLER_ACTIVE, OVERLAY_FRONT_BOXINATOR_ACTIVE, OVERLAY_FRONT_ROCK_BREAKER_ACTIVE, OVERLAY_FRONT_SCANNER_ACTIVE
- , OVERLAY_BOTTOM_POTIONBREWER_ACTIVE, OVERLAY_BOTTOM_REPLICATOR_ACTIVE, OVERLAY_BOTTOM_MASSFAB_ACTIVE, OVERLAY_BOTTOM_STEAM_HAMMER_ACTIVE, OVERLAY_BOTTOM_STEAM_FURNACE_ACTIVE, OVERLAY_BOTTOM_STEAM_ALLOY_SMELTER_ACTIVE, OVERLAY_BOTTOM_STEAM_MACERATOR_ACTIVE, OVERLAY_BOTTOM_STEAM_COMPRESSOR_ACTIVE, OVERLAY_BOTTOM_STEAM_EXTRACTOR_ACTIVE, OVERLAY_BOTTOM_DISASSEMBLER_ACTIVE, OVERLAY_BOTTOM_BOXINATOR_ACTIVE, OVERLAY_BOTTOM_ROCK_BREAKER_ACTIVE, OVERLAY_BOTTOM_SCANNER_ACTIVE
- , OVERLAY_SIDE_POTIONBREWER_ACTIVE, OVERLAY_SIDE_REPLICATOR_ACTIVE, OVERLAY_SIDE_MASSFAB_ACTIVE, OVERLAY_SIDE_STEAM_HAMMER_ACTIVE, OVERLAY_SIDE_STEAM_FURNACE_ACTIVE, OVERLAY_SIDE_STEAM_ALLOY_SMELTER_ACTIVE, OVERLAY_SIDE_STEAM_MACERATOR_ACTIVE, OVERLAY_SIDE_STEAM_COMPRESSOR_ACTIVE, OVERLAY_SIDE_STEAM_EXTRACTOR_ACTIVE, OVERLAY_SIDE_DISASSEMBLER_ACTIVE, OVERLAY_SIDE_BOXINATOR_ACTIVE, OVERLAY_SIDE_ROCK_BREAKER_ACTIVE, OVERLAY_SIDE_SCANNER_ACTIVE, OVERLAY_ADV_PUMP, OVERLAY_TELEPORTER,OVERLAY_TELEPORTER_ACTIVE
- ,FUSIONI_1,FUSIONI_2,FUSIONI_3,FUSIONI_4,FUSIONI_5,FUSIONI_6,FUSIONI_7,FUSIONI_8,FUSIONI_9,FUSIONI_10,FUSIONI_11,FUSIONI_12,FUSIONII_1,FUSIONII_2,FUSIONII_3,FUSIONII_4,FUSIONII_5,FUSIONII_6,FUSIONII_7,FUSIONII_8,FUSIONII_9,FUSIONII_10,FUSIONII_11,FUSIONII_12
- ,LARGETURBINE1,LARGETURBINE2,LARGETURBINE3,LARGETURBINE4,LARGETURBINE5,LARGETURBINE6,LARGETURBINE7,LARGETURBINE8,LARGETURBINE9,LARGETURBINE_ACTIVE1,LARGETURBINE_ACTIVE2,LARGETURBINE_ACTIVE3,LARGETURBINE_ACTIVE4,LARGETURBINE_ACTIVE5,LARGETURBINE_ACTIVE6,LARGETURBINE_ACTIVE7,LARGETURBINE_ACTIVE8,LARGETURBINE_ACTIVE9, MACHINE_CASING_TURBINE
-
- ;
-
- protected IIcon mIcon;
-
- @Override public IIcon getIcon() {return mIcon;}
- @Override public IIcon getOverlayIcon() {return null;}
-
- private BlockIcons() {
- GregTech_API.sGTBlockIconload.add(this);
- }
-
- @Override
- public void run() {
- mIcon = GregTech_API.sBlockIcons.registerIcon(RES_PATH_BLOCK + "iconsets/" + this);
- }
-
- @Override
- public ResourceLocation getTextureFile() {
- return TextureMap.locationBlocksTexture;
- }
-
- /**
- * Icon for Fresh CFoam
- */
- public static final ITexture[] FRESHFOAM = new ITexture[] {new GT_RenderedTexture(CFOAM_FRESH)};
-
- /**
- * Icons for Hardened CFoam
- * 0 = No Color
- * 1 - 16 = Colors
- */
- public static final ITexture[][] HARDENEDFOAMS = new ITexture[][] {
- new ITexture[] {new GT_RenderedTexture(CFOAM_HARDENED, Dyes.CONSTRUCTION_FOAM.mRGBa)},
- new ITexture[] {new GT_RenderedTexture(CFOAM_HARDENED, Dyes.VALUES[ 0].mRGBa)},
- new ITexture[] {new GT_RenderedTexture(CFOAM_HARDENED, Dyes.VALUES[ 1].mRGBa)},
- new ITexture[] {new GT_RenderedTexture(CFOAM_HARDENED, Dyes.VALUES[ 2].mRGBa)},
- new ITexture[] {new GT_RenderedTexture(CFOAM_HARDENED, Dyes.VALUES[ 3].mRGBa)},
- new ITexture[] {new GT_RenderedTexture(CFOAM_HARDENED, Dyes.VALUES[ 4].mRGBa)},
- new ITexture[] {new GT_RenderedTexture(CFOAM_HARDENED, Dyes.VALUES[ 5].mRGBa)},
- new ITexture[] {new GT_RenderedTexture(CFOAM_HARDENED, Dyes.VALUES[ 6].mRGBa)},
- new ITexture[] {new GT_RenderedTexture(CFOAM_HARDENED, Dyes.VALUES[ 7].mRGBa)},
- new ITexture[] {new GT_RenderedTexture(CFOAM_HARDENED, Dyes.VALUES[ 8].mRGBa)},
- new ITexture[] {new GT_RenderedTexture(CFOAM_HARDENED, Dyes.VALUES[ 9].mRGBa)},
- new ITexture[] {new GT_RenderedTexture(CFOAM_HARDENED, Dyes.VALUES[10].mRGBa)},
- new ITexture[] {new GT_RenderedTexture(CFOAM_HARDENED, Dyes.VALUES[11].mRGBa)},
- new ITexture[] {new GT_RenderedTexture(CFOAM_HARDENED, Dyes.VALUES[12].mRGBa)},
- new ITexture[] {new GT_RenderedTexture(CFOAM_HARDENED, Dyes.VALUES[13].mRGBa)},
- new ITexture[] {new GT_RenderedTexture(CFOAM_HARDENED, Dyes.VALUES[14].mRGBa)},
- new ITexture[] {new GT_RenderedTexture(CFOAM_HARDENED, Dyes.VALUES[15].mRGBa)}
- };
-
- /**
- * Machine Casings by Tier
- * 0 = 8V, 1 = LV, 2 = MV, 3 = HV, 4 = EV, 5 = IV, 6 = IV, 7 = IV, 8 = IV, 9 = IV
- */
- public static final IIconContainer[]
- MACHINECASINGS_SIDE = new IIconContainer[] {
- MACHINE_8V_SIDE,
- MACHINE_LV_SIDE,
- MACHINE_MV_SIDE,
- MACHINE_HV_SIDE,
- MACHINE_EV_SIDE,
- MACHINE_IV_SIDE,
- MACHINE_LuV_SIDE,
- MACHINE_ZPM_SIDE,
- MACHINE_UV_SIDE,
- MACHINE_MAX_SIDE,
- MACHINE_MAX_SIDE,
- MACHINE_MAX_SIDE,
- MACHINE_MAX_SIDE,
- MACHINE_MAX_SIDE,
- MACHINE_MAX_SIDE,
- MACHINE_MAX_SIDE,
- },
- MACHINECASINGS_TOP = new IIconContainer[] {
- MACHINE_8V_TOP,
- MACHINE_LV_TOP,
- MACHINE_MV_TOP,
- MACHINE_HV_TOP,
- MACHINE_EV_TOP,
- MACHINE_IV_TOP,
- MACHINE_LuV_TOP,
- MACHINE_ZPM_TOP,
- MACHINE_UV_TOP,
- MACHINE_MAX_TOP,
- MACHINE_MAX_TOP,
- MACHINE_MAX_TOP,
- MACHINE_MAX_TOP,
- MACHINE_MAX_TOP,
- MACHINE_MAX_TOP,
- MACHINE_MAX_TOP,
- },
- MACHINECASINGS_BOTTOM = new IIconContainer[] {
- MACHINE_8V_BOTTOM,
- MACHINE_LV_BOTTOM,
- MACHINE_MV_BOTTOM,
- MACHINE_HV_BOTTOM,
- MACHINE_EV_BOTTOM,
- MACHINE_IV_BOTTOM,
- MACHINE_LuV_BOTTOM,
- MACHINE_ZPM_BOTTOM,
- MACHINE_UV_BOTTOM,
- MACHINE_MAX_BOTTOM,
- MACHINE_MAX_BOTTOM,
- MACHINE_MAX_BOTTOM,
- MACHINE_MAX_BOTTOM,
- MACHINE_MAX_BOTTOM,
- MACHINE_MAX_BOTTOM,
- MACHINE_MAX_BOTTOM,
- },
- GRANITES = new IIconContainer[] {
- GRANITE_BLACK_STONE,
- GRANITE_BLACK_COBBLE,
- GRANITE_BLACK_COBBLE_MOSSY,
- GRANITE_BLACK_BRICKS,
- GRANITE_BLACK_BRICKS_CRACKED,
- GRANITE_BLACK_BRICKS_MOSSY,
- GRANITE_BLACK_BRICKS_CHISELED,
- GRANITE_BLACK_SMOOTH,
- GRANITE_RED_STONE,
- GRANITE_RED_COBBLE,
- GRANITE_RED_COBBLE_MOSSY,
- GRANITE_RED_BRICKS,
- GRANITE_RED_BRICKS_CRACKED,
- GRANITE_RED_BRICKS_MOSSY,
- GRANITE_RED_BRICKS_CHISELED,
- GRANITE_RED_SMOOTH,
- },
- CONCRETES = new IIconContainer[] {
- CONCRETE_DARK_STONE,
- CONCRETE_DARK_COBBLE,
- CONCRETE_DARK_COBBLE_MOSSY,
- CONCRETE_DARK_BRICKS,
- CONCRETE_DARK_BRICKS_CRACKED,
- CONCRETE_DARK_BRICKS_MOSSY,
- CONCRETE_DARK_BRICKS_CHISELED,
- CONCRETE_DARK_SMOOTH,
- CONCRETE_LIGHT_STONE,
- CONCRETE_LIGHT_COBBLE,
- CONCRETE_LIGHT_COBBLE_MOSSY,
- CONCRETE_LIGHT_BRICKS,
- CONCRETE_LIGHT_BRICKS_CRACKED,
- CONCRETE_LIGHT_BRICKS_MOSSY,
- CONCRETE_LIGHT_BRICKS_CHISELED,
- CONCRETE_LIGHT_SMOOTH,
- },
- TURBINE = new IIconContainer[] {
- LARGETURBINE1,
- LARGETURBINE2,
- LARGETURBINE3,
- LARGETURBINE4,
- LARGETURBINE5,
- LARGETURBINE6,
- LARGETURBINE7,
- LARGETURBINE8,
- LARGETURBINE9
- },
- TURBINE_ACTIVE = new IIconContainer[] {
- LARGETURBINE_ACTIVE1,
- LARGETURBINE_ACTIVE2,
- LARGETURBINE_ACTIVE3,
- LARGETURBINE_ACTIVE4,
- LARGETURBINE_ACTIVE5,
- LARGETURBINE_ACTIVE6,
- LARGETURBINE_ACTIVE7,
- LARGETURBINE_ACTIVE8,
- LARGETURBINE_ACTIVE9
- },
- CONNECTED_HULLS = new IIconContainer[] {
- CONCRETE_DARK_STONE,
- FUSIONI_1,
- FUSIONI_2,
- FUSIONI_3,
- FUSIONI_4,
- FUSIONI_5,
- FUSIONI_6,
- FUSIONI_7,
- FUSIONI_8,
- FUSIONI_9,
- FUSIONI_10,
- FUSIONI_11,
- FUSIONI_12,
- FUSIONII_1,
- FUSIONII_2,
- FUSIONII_3,
- FUSIONII_4,
- FUSIONII_5,
- FUSIONII_6,
- FUSIONII_7,
- FUSIONII_8,
- FUSIONII_9,
- FUSIONII_10,
- FUSIONII_11,
- FUSIONII_12,
- };
-
-
-
- public static ITexture[]
- ERROR_RENDERING = new ITexture[] {
- new GT_RenderedTexture(RENDERING_ERROR)
- },
- OVERLAYS_ENERGY_IN = new ITexture[] {
- new GT_RenderedTexture(OVERLAY_ENERGY_IN, new short[] {220, 220, 220, 0}),
- new GT_RenderedTexture(OVERLAY_ENERGY_IN, new short[] {220, 220, 220, 0}),
- new GT_RenderedTexture(OVERLAY_ENERGY_IN, new short[] {255, 100, 0, 0}),
- new GT_RenderedTexture(OVERLAY_ENERGY_IN, new short[] {255, 255, 30, 0}),
- new GT_RenderedTexture(OVERLAY_ENERGY_IN, new short[] {128, 128, 128, 0}),
- new GT_RenderedTexture(OVERLAY_ENERGY_IN, new short[] {240, 240, 245, 0}),
- new GT_RenderedTexture(OVERLAY_ENERGY_IN, new short[] {240, 240, 245, 0}),
- new GT_RenderedTexture(OVERLAY_ENERGY_IN, new short[] {240, 240, 245, 0}),
- new GT_RenderedTexture(OVERLAY_ENERGY_IN, new short[] {240, 240, 245, 0}),
- new GT_RenderedTexture(OVERLAY_ENERGY_IN, new short[] {240, 240, 245, 0}),
- },
- OVERLAYS_ENERGY_OUT = new ITexture[] {
- new GT_RenderedTexture(OVERLAY_ENERGY_OUT, new short[] {220, 220, 220, 0}),
- new GT_RenderedTexture(OVERLAY_ENERGY_OUT, new short[] {220, 220, 220, 0}),
- new GT_RenderedTexture(OVERLAY_ENERGY_OUT, new short[] {255, 100, 0, 0}),
- new GT_RenderedTexture(OVERLAY_ENERGY_OUT, new short[] {255, 255, 30, 0}),
- new GT_RenderedTexture(OVERLAY_ENERGY_OUT, new short[] {128, 128, 128, 0}),
- new GT_RenderedTexture(OVERLAY_ENERGY_OUT, new short[] {240, 240, 245, 0}),
- new GT_RenderedTexture(OVERLAY_ENERGY_OUT, new short[] {240, 240, 245, 0}),
- new GT_RenderedTexture(OVERLAY_ENERGY_OUT, new short[] {240, 240, 245, 0}),
- new GT_RenderedTexture(OVERLAY_ENERGY_OUT, new short[] {240, 240, 245, 0}),
- new GT_RenderedTexture(OVERLAY_ENERGY_OUT, new short[] {240, 240, 245, 0}),
- },
- OVERLAYS_ENERGY_IN_MULTI = new ITexture[] {
- new GT_RenderedTexture(OVERLAY_ENERGY_IN_MULTI, new short[] {220, 220, 220, 0}),
- new GT_RenderedTexture(OVERLAY_ENERGY_IN_MULTI, new short[] {220, 220, 220, 0}),
- new GT_RenderedTexture(OVERLAY_ENERGY_IN_MULTI, new short[] {255, 100, 0, 0}),
- new GT_RenderedTexture(OVERLAY_ENERGY_IN_MULTI, new short[] {255, 255, 30, 0}),
- new GT_RenderedTexture(OVERLAY_ENERGY_IN_MULTI, new short[] {128, 128, 128, 0}),
- new GT_RenderedTexture(OVERLAY_ENERGY_IN_MULTI, new short[] {240, 240, 245, 0}),
- new GT_RenderedTexture(OVERLAY_ENERGY_IN_MULTI, new short[] {240, 240, 245, 0}),
- new GT_RenderedTexture(OVERLAY_ENERGY_IN_MULTI, new short[] {240, 240, 245, 0}),
- new GT_RenderedTexture(OVERLAY_ENERGY_IN_MULTI, new short[] {240, 240, 245, 0}),
- new GT_RenderedTexture(OVERLAY_ENERGY_IN_MULTI, new short[] {240, 240, 245, 0}),
- },
- OVERLAYS_ENERGY_OUT_MULTI = new ITexture[] {
- new GT_RenderedTexture(OVERLAY_ENERGY_OUT_MULTI, new short[] {220, 220, 220, 0}),
- new GT_RenderedTexture(OVERLAY_ENERGY_OUT_MULTI, new short[] {220, 220, 220, 0}),
- new GT_RenderedTexture(OVERLAY_ENERGY_OUT_MULTI, new short[] {255, 100, 0, 0}),
- new GT_RenderedTexture(OVERLAY_ENERGY_OUT_MULTI, new short[] {255, 255, 30, 0}),
- new GT_RenderedTexture(OVERLAY_ENERGY_OUT_MULTI, new short[] {128, 128, 128, 0}),
- new GT_RenderedTexture(OVERLAY_ENERGY_OUT_MULTI, new short[] {240, 240, 245, 0}),
- new GT_RenderedTexture(OVERLAY_ENERGY_OUT_MULTI, new short[] {240, 240, 245, 0}),
- new GT_RenderedTexture(OVERLAY_ENERGY_OUT_MULTI, new short[] {240, 240, 245, 0}),
- new GT_RenderedTexture(OVERLAY_ENERGY_OUT_MULTI, new short[] {240, 240, 245, 0}),
- new GT_RenderedTexture(OVERLAY_ENERGY_OUT_MULTI, new short[] {240, 240, 245, 0}),
- },
- LOCKERS = new ITexture[] {
- new GT_RenderedTexture(OVERLAY_LOCKER_000),
- new GT_RenderedTexture(OVERLAY_LOCKER_001),
- new GT_RenderedTexture(OVERLAY_LOCKER_002),
- new GT_RenderedTexture(OVERLAY_LOCKER_003),
- new GT_RenderedTexture(OVERLAY_LOCKER_004),
- new GT_RenderedTexture(OVERLAY_LOCKER_005),
- new GT_RenderedTexture(OVERLAY_LOCKER_006),
- new GT_RenderedTexture(OVERLAY_LOCKER_007),
- new GT_RenderedTexture(OVERLAY_LOCKER_008),
- new GT_RenderedTexture(OVERLAY_LOCKER_009),
- new GT_RenderedTexture(OVERLAY_LOCKER_010),
- new GT_RenderedTexture(OVERLAY_LOCKER_011),
- new GT_RenderedTexture(OVERLAY_LOCKER_012),
- new GT_RenderedTexture(OVERLAY_LOCKER_013),
- },
- CASING_BLOCKS = new ITexture[128],
- MACHINE_CASINGS[] = new ITexture[10][17];
-
- static {
- for (byte i = 0; i < MACHINE_CASINGS.length; i++) for (byte j = 0; j < MACHINE_CASINGS[i].length; j++) MACHINE_CASINGS[i][j] = new GT_SidedTexture(MACHINECASINGS_BOTTOM[i], MACHINECASINGS_TOP[i], MACHINECASINGS_SIDE[i], Dyes.getModulation(j-1, Dyes.MACHINE_METAL.mRGBa));
- }
-
- public static class CustomIcon implements IIconContainer, Runnable {
- protected IIcon mIcon;
- protected String mIconName;
-
- @Override public IIcon getIcon() {return mIcon;}
- @Override public IIcon getOverlayIcon() {return null;}
-
- public CustomIcon(String aIconName) {
- mIconName = aIconName;
- GregTech_API.sGTBlockIconload.add(this);
- }
-
- @Override
- public void run() {
- mIcon = GregTech_API.sBlockIcons.registerIcon(RES_PATH_BLOCK + mIconName);
- }
-
- @Override
- public ResourceLocation getTextureFile() {
- return TextureMap.locationBlocksTexture;
- }
- }
- }
-
- public enum ItemIcons implements IIconContainer, Runnable {
- VOID // The Empty Texture
- , RENDERING_ERROR
- , WRENCH
- , MORTAR
- , CROWBAR
- , JACKHAMMER
- , WIRE_CUTTER
- , KNIFE, BUTCHERYKNIFE, SICKLE
- , SCOOP, GRAFTER
- , PLUNGER, ROLLING_PIN
- , HANDLE_SWORD, HANDLE_FILE, HANDLE_SAW, HANDLE_SCREWDRIVER, HANDLE_BUZZSAW, HANDLE_ELECTRIC_SCREWDRIVER, HANDLE_SOLDERING
- , POWER_UNIT_LV, POWER_UNIT_MV, POWER_UNIT_HV
- , DURABILITY_BAR_0, DURABILITY_BAR_1, DURABILITY_BAR_2, DURABILITY_BAR_3, DURABILITY_BAR_4, DURABILITY_BAR_5, DURABILITY_BAR_6, DURABILITY_BAR_7, DURABILITY_BAR_8
- , ENERGY_BAR_0, ENERGY_BAR_1, ENERGY_BAR_2, ENERGY_BAR_3, ENERGY_BAR_4, ENERGY_BAR_5, ENERGY_BAR_6, ENERGY_BAR_7, ENERGY_BAR_8, TURBINE, TURBINE_SMALL, TURBINE_LARGE, TURBINE_HUGE
- ;
-
- public static final IIconContainer[]
- DURABILITY_BAR = new IIconContainer[] {
- DURABILITY_BAR_0,
- DURABILITY_BAR_1,
- DURABILITY_BAR_2,
- DURABILITY_BAR_3,
- DURABILITY_BAR_4,
- DURABILITY_BAR_5,
- DURABILITY_BAR_6,
- DURABILITY_BAR_7,
- DURABILITY_BAR_8,
- },
- ENERGY_BAR = new IIconContainer[] {
- ENERGY_BAR_0,
- ENERGY_BAR_1,
- ENERGY_BAR_2,
- ENERGY_BAR_3,
- ENERGY_BAR_4,
- ENERGY_BAR_5,
- ENERGY_BAR_6,
- ENERGY_BAR_7,
- ENERGY_BAR_8,
- };
-
- public static final ITexture[] ERROR_RENDERING = new ITexture[] {new GT_RenderedTexture(RENDERING_ERROR)};
-
- protected IIcon mIcon, mOverlay;
-
- @Override public IIcon getIcon() {return mIcon;}
- @Override public IIcon getOverlayIcon() {return mOverlay;}
-
- private ItemIcons() {
- GregTech_API.sGTItemIconload.add(this);
- }
-
- @Override
- public ResourceLocation getTextureFile() {
- return TextureMap.locationItemsTexture;
- }
-
- @Override
- public void run() {
- mIcon = GregTech_API.sItemIcons.registerIcon(RES_PATH_ITEM + "iconsets/" + this);
- mOverlay = GregTech_API.sItemIcons.registerIcon(RES_PATH_ITEM + "iconsets/" + this + "_OVERLAY");
- }
-
- public static class CustomIcon implements IIconContainer, Runnable {
- protected IIcon mIcon, mOverlay;
- protected String mIconName;
-
- @Override public IIcon getIcon() {return mIcon;}
- @Override public IIcon getOverlayIcon() {return mOverlay;}
-
- public CustomIcon(String aIconName) {
- mIconName = aIconName;
- GregTech_API.sGTItemIconload.add(this);
- }
-
- @Override
- public void run() {
- mIcon = GregTech_API.sItemIcons.registerIcon(RES_PATH_ITEM + mIconName);
- mOverlay = GregTech_API.sItemIcons.registerIcon(RES_PATH_ITEM + mIconName + "_OVERLAY");
- }
-
- @Override
- public ResourceLocation getTextureFile() {
- return TextureMap.locationItemsTexture;
- }
- }
- }
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/enums/Tier.java b/main/java/gregtech/api/enums/Tier.java
deleted file mode 100644
index 8ee2bc6853..0000000000
--- a/main/java/gregtech/api/enums/Tier.java
+++ /dev/null
@@ -1,91 +0,0 @@
-package gregtech.api.enums;
-
-/**
- * Experimental Class for later
- */
-public class Tier {
- public static final Tier[]
- ELECTRIC = new Tier[] {
- new Tier(SubTag.ENERGY_ELECTRICITY , 0, 8, 1, 1, 1, Materials.WroughtIron , ItemList.Hull_ULV , OrePrefixes.cableGt01 .get(Materials.Lead ), OrePrefixes.cableGt04 .get(Materials.Lead ), OrePrefixes.circuit .get(Materials.Primitive ), OrePrefixes.circuit .get(Materials.Basic )),
- new Tier(SubTag.ENERGY_ELECTRICITY , 1, 32, 1, 1, 1, Materials.Steel , ItemList.Hull_LV , OrePrefixes.cableGt01 .get(Materials.Tin ), OrePrefixes.cableGt04 .get(Materials.Tin ), OrePrefixes.circuit .get(Materials.Basic ), OrePrefixes.circuit .get(Materials.Good )),
- new Tier(SubTag.ENERGY_ELECTRICITY , 2, 128, 1, 1, 1, Materials.Aluminium , ItemList.Hull_MV , OrePrefixes.cableGt01 .get(Materials.AnyCopper ), OrePrefixes.cableGt04 .get(Materials.AnyCopper ), OrePrefixes.circuit .get(Materials.Good ), OrePrefixes.circuit .get(Materials.Advanced )),
- new Tier(SubTag.ENERGY_ELECTRICITY , 3, 512, 1, 1, 1, Materials.StainlessSteel , ItemList.Hull_HV , OrePrefixes.cableGt01 .get(Materials.Gold ), OrePrefixes.cableGt04 .get(Materials.Gold ), OrePrefixes.circuit .get(Materials.Advanced ), OrePrefixes.circuit .get(Materials.Elite )),
- new Tier(SubTag.ENERGY_ELECTRICITY , 4, 2048, 1, 1, 1, Materials.Titanium , ItemList.Hull_EV , OrePrefixes.cableGt01 .get(Materials.Aluminium ), OrePrefixes.cableGt04 .get(Materials.Aluminium ), OrePrefixes.circuit .get(Materials.Elite ), OrePrefixes.circuit .get(Materials.Master )),
- new Tier(SubTag.ENERGY_ELECTRICITY , 5, 8192, 1, 1, 1, Materials.TungstenSteel , ItemList.Hull_IV , OrePrefixes.cableGt01 .get(Materials.Tungsten ), OrePrefixes.cableGt04 .get(Materials.Tungsten ), OrePrefixes.circuit .get(Materials.Master ), OrePrefixes.circuit .get(Materials.Ultimate )),
- new Tier(SubTag.ENERGY_ELECTRICITY , 6, 32768, 1, 1, 1, Materials.Chrome , ItemList.Hull_LuV , OrePrefixes.cableGt01 .get(Materials.Osmium ), OrePrefixes.cableGt04 .get(Materials.Osmium ), OrePrefixes.circuit .get(Materials.Ultimate ), OrePrefixes.circuit .get(Materials.Ultimate )),
- new Tier(SubTag.ENERGY_ELECTRICITY , 7, 131072, 1, 1, 1, Materials.Iridium , ItemList.Hull_ZPM , OrePrefixes.cableGt04 .get(Materials.Osmium ), OrePrefixes.wireGt16 .get(Materials.Osmium ), OrePrefixes.circuit .get(Materials.Ultimate ), OrePrefixes.circuit .get(Materials.Ultimate )),
- new Tier(SubTag.ENERGY_ELECTRICITY , 8, 524288, 1, 1, 1, Materials.Osmium , ItemList.Hull_UV , OrePrefixes.wireGt16 .get(Materials.Osmium ), OrePrefixes.wireGt01 .get(Materials.Superconductor ), OrePrefixes.circuit .get(Materials.Ultimate ), OrePrefixes.circuit .get(Materials.Ultimate )),
- new Tier(SubTag.ENERGY_ELECTRICITY , 9, Integer.MAX_VALUE, 1, 1, 1, Materials.Neutronium , ItemList.Hull_MAX , OrePrefixes.wireGt01 .get(Materials.Superconductor ), OrePrefixes.wireGt04 .get(Materials.Superconductor ), OrePrefixes.circuit .get(Materials.Ultimate ), OrePrefixes.circuit .get(Materials.Ultimate )),
- }, ROTATIONAL = new Tier[] {
- new Tier(SubTag.ENERGY_ROTATIONAL , 1, 32, 1, 1, 1, Materials.Wood , OrePrefixes.frameGt .get(Materials.Wood ), OrePrefixes.stick .get(Materials.Wood ), OrePrefixes.ingot .get(Materials.Wood ), OrePrefixes.gearGt .get(Materials.Wood ), OrePrefixes.gearGt .get(Materials.Stone )),
- new Tier(SubTag.ENERGY_ROTATIONAL , 1, 32, 1, 2, 2, Materials.WoodSealed , OrePrefixes.frameGt .get(Materials.WoodSealed ), OrePrefixes.stick .get(Materials.WoodSealed ), OrePrefixes.ingot .get(Materials.WoodSealed ), OrePrefixes.gearGt .get(Materials.WoodSealed ), OrePrefixes.gearGt .get(Materials.Stone )),
- new Tier(SubTag.ENERGY_ROTATIONAL , 2, 128, 1, 1, 1, Materials.Stone , OrePrefixes.frameGt .get(Materials.Stone ), OrePrefixes.stick .get(Materials.Stone ), OrePrefixes.ingot .get(Materials.Stone ), OrePrefixes.gearGt .get(Materials.Stone ), OrePrefixes.gearGt .get(Materials.Bronze )),
- new Tier(SubTag.ENERGY_ROTATIONAL , 2, 128, 1, 2, 2, Materials.IronWood , OrePrefixes.frameGt .get(Materials.IronWood ), OrePrefixes.stick .get(Materials.IronWood ), OrePrefixes.ingot .get(Materials.IronWood ), OrePrefixes.gearGt .get(Materials.IronWood ), OrePrefixes.gearGt .get(Materials.Bronze )),
- new Tier(SubTag.ENERGY_ROTATIONAL , 3, 512, 1, 1, 1, Materials.Bronze , OrePrefixes.frameGt .get(Materials.Bronze ), OrePrefixes.stick .get(Materials.Bronze ), OrePrefixes.ingot .get(Materials.Bronze ), OrePrefixes.gearGt .get(Materials.Bronze ), OrePrefixes.gearGt .get(Materials.Steel )),
- new Tier(SubTag.ENERGY_ROTATIONAL , 3, 512, 1, 2, 2, Materials.Brass , OrePrefixes.frameGt .get(Materials.Brass ), OrePrefixes.stick .get(Materials.Brass ), OrePrefixes.ingot .get(Materials.Brass ), OrePrefixes.gearGt .get(Materials.Brass ), OrePrefixes.gearGt .get(Materials.Steel )),
- new Tier(SubTag.ENERGY_ROTATIONAL , 4, 2048, 1, 1, 1, Materials.Steel , OrePrefixes.frameGt .get(Materials.Steel ), OrePrefixes.stick .get(Materials.Steel ), OrePrefixes.ingot .get(Materials.Steel ), OrePrefixes.gearGt .get(Materials.Steel ), OrePrefixes.gearGt .get(Materials.TungstenSteel )),
- new Tier(SubTag.ENERGY_ROTATIONAL , 4, 2048, 1, 2, 2, Materials.Titanium , OrePrefixes.frameGt .get(Materials.Titanium ), OrePrefixes.stick .get(Materials.Titanium ), OrePrefixes.ingot .get(Materials.Titanium ), OrePrefixes.gearGt .get(Materials.Titanium ), OrePrefixes.gearGt .get(Materials.TungstenSteel )),
- new Tier(SubTag.ENERGY_ROTATIONAL , 5, 8192, 1, 1, 1, Materials.TungstenSteel , OrePrefixes.frameGt .get(Materials.TungstenSteel ), OrePrefixes.stick .get(Materials.TungstenSteel ), OrePrefixes.ingot .get(Materials.TungstenSteel ), OrePrefixes.gearGt .get(Materials.TungstenSteel ), OrePrefixes.gearGt .get(Materials.Iridium )),
- new Tier(SubTag.ENERGY_ROTATIONAL , 6, 32768, 1, 1, 1, Materials.Iridium , OrePrefixes.frameGt .get(Materials.Iridium ), OrePrefixes.stick .get(Materials.Iridium ), OrePrefixes.ingot .get(Materials.Iridium ), OrePrefixes.gearGt .get(Materials.Iridium ), OrePrefixes.gearGt .get(Materials.Neutronium )),
- new Tier(SubTag.ENERGY_ROTATIONAL , 9, Integer.MAX_VALUE, 1, 1, 1, Materials.Neutronium , OrePrefixes.frameGt .get(Materials.Neutronium ), OrePrefixes.stick .get(Materials.Neutronium ), OrePrefixes.ingot .get(Materials.Neutronium ), OrePrefixes.gearGt .get(Materials.Neutronium ), OrePrefixes.gearGt .get(Materials.Neutronium )),
- }, STEAM = new Tier[] {
- new Tier(SubTag.ENERGY_STEAM , 1, 32, 1, 1, 1, Materials.Bronze , OrePrefixes.frameGt .get(Materials.Bronze ), OrePrefixes.pipeMedium .get(Materials.Bronze ), OrePrefixes.pipeHuge .get(Materials.Bronze ), OrePrefixes.pipeMedium .get(Materials.Bronze ), OrePrefixes.pipeLarge .get(Materials.Bronze )),
- new Tier(SubTag.ENERGY_STEAM , 2, 128, 1, 1, 1, Materials.Steel , OrePrefixes.frameGt .get(Materials.Steel ), OrePrefixes.pipeMedium .get(Materials.Steel ), OrePrefixes.pipeHuge .get(Materials.Steel ), OrePrefixes.pipeMedium .get(Materials.Steel ), OrePrefixes.pipeLarge .get(Materials.Steel )),
- new Tier(SubTag.ENERGY_STEAM , 3, 512, 1, 1, 1, Materials.Titanium , OrePrefixes.frameGt .get(Materials.Titanium ), OrePrefixes.pipeMedium .get(Materials.Titanium ), OrePrefixes.pipeHuge .get(Materials.Titanium ), OrePrefixes.pipeMedium .get(Materials.Titanium ), OrePrefixes.pipeLarge .get(Materials.Titanium )),
- new Tier(SubTag.ENERGY_STEAM , 4, 2048, 1, 1, 1, Materials.TungstenSteel , OrePrefixes.frameGt .get(Materials.TungstenSteel ), OrePrefixes.pipeMedium .get(Materials.TungstenSteel ), OrePrefixes.pipeHuge .get(Materials.TungstenSteel ), OrePrefixes.pipeMedium .get(Materials.TungstenSteel ), OrePrefixes.pipeLarge .get(Materials.TungstenSteel )),
- new Tier(SubTag.ENERGY_STEAM , 5, 8192, 1, 1, 1, Materials.Iridium , OrePrefixes.frameGt .get(Materials.Iridium ), OrePrefixes.pipeMedium .get(Materials.Iridium ), OrePrefixes.pipeHuge .get(Materials.Iridium ), OrePrefixes.pipeMedium .get(Materials.Iridium ), OrePrefixes.pipeLarge .get(Materials.Iridium )),
- new Tier(SubTag.ENERGY_STEAM , 9, Integer.MAX_VALUE, 1, 1, 1, Materials.Neutronium , OrePrefixes.frameGt .get(Materials.Neutronium ), OrePrefixes.pipeMedium .get(Materials.Neutronium ), OrePrefixes.pipeHuge .get(Materials.Neutronium ), OrePrefixes.pipeMedium .get(Materials.Neutronium ), OrePrefixes.pipeLarge .get(Materials.Neutronium )),
- };
-
- private final SubTag mType;
- private final byte mRank;
- private final long mPrimaryValue, mSecondaryValue, mSpeedMultiplier, mEnergyCostMultiplier;
- private final Materials mMaterial;
-
- /** Used for Crafting Recipes */
- public final Object mHullObject, mConductingObject, mLargerConductingObject, mManagingObject, mBetterManagingObject;
-
- public Tier(SubTag aType, int aRank, long aPrimaryValue, long aSecondaryValue, long aSpeedMultiplier, long aEnergyCostMultiplier, Materials aMaterial, Object aHullObject, Object aConductingObject, Object aLargerConductingObject, Object aManagingObject, Object aBetterManagingObject) {
- mType = aType;
- mRank = (byte)aRank;
- mPrimaryValue = aPrimaryValue;
- mSecondaryValue = aSecondaryValue;
- mSpeedMultiplier = aSpeedMultiplier;
- mEnergyCostMultiplier = Math.max(mSpeedMultiplier, aEnergyCostMultiplier);
- mMaterial = aMaterial;
-
- mHullObject = aHullObject;
- mConductingObject = aConductingObject;
- mManagingObject = aManagingObject;
- mBetterManagingObject = aBetterManagingObject;
- mLargerConductingObject = aLargerConductingObject;
- }
-
- public byte getRank() {
- return mRank;
- }
-
- public SubTag getEnergyType() {
- return mType;
- }
-
- public long getEnergyPrimary() {
- return mPrimaryValue;
- }
-
- public long getEnergySecondary() {
- return mSecondaryValue;
- }
-
- public long getSpeedMultiplier() {
- return mSpeedMultiplier;
- }
-
- public long getEnergyCostMultiplier() {
- return mEnergyCostMultiplier;
- }
-
- public Materials getMaterial() {
- return mMaterial;
- }
-}
diff --git a/main/java/gregtech/api/enums/ToolDictNames.java b/main/java/gregtech/api/enums/ToolDictNames.java
deleted file mode 100644
index dfa4486f23..0000000000
--- a/main/java/gregtech/api/enums/ToolDictNames.java
+++ /dev/null
@@ -1,32 +0,0 @@
-package gregtech.api.enums;
-
-public enum ToolDictNames {
- craftingToolSaw,
- craftingToolHoe,
- craftingToolAxe,
- craftingToolFile,
- craftingToolPlow,
- craftingToolDrill,
- craftingToolSword,
- craftingToolScoop,
- craftingToolKnife,
- craftingToolBlade,
- craftingToolMortar,
- craftingToolShovel,
- craftingToolWrench,
- craftingToolPlunger,
- craftingToolCrowbar,
- craftingToolPickaxe,
- craftingToolDrawplate,
- craftingToolRollingPin,
- craftingToolWireCutter,
- craftingToolBranchCutter,
- craftingToolHardHammer,
- craftingToolSoftHammer,
- craftingToolJackHammer,
- craftingToolMiningDrill,
- craftingToolForgeHammer,
- craftingToolScrewdriver,
- craftingToolSolderingIron,
- craftingToolSolderingMetal;
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/events/BlockScanningEvent.java b/main/java/gregtech/api/events/BlockScanningEvent.java
deleted file mode 100644
index 927919f5ba..0000000000
--- a/main/java/gregtech/api/events/BlockScanningEvent.java
+++ /dev/null
@@ -1,41 +0,0 @@
-package gregtech.api.events;
-
-import java.util.ArrayList;
-
-import net.minecraft.block.Block;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.world.World;
-
-@cpw.mods.fml.common.eventhandler.Cancelable
-public class BlockScanningEvent extends net.minecraftforge.event.world.WorldEvent {
-
- public final EntityPlayer mPlayer;
- public final int mX, mY, mZ, mScanLevel;
- public final ArrayList<String> mList;
- public final byte mSide;
- public final float mClickX, mClickY, mClickZ;
- public final TileEntity mTileEntity;
- public final Block mBlock;
-
- /**
- * used to determine the amount of Energy this Scan is costing.
- */
- public int mEUCost = 0;
-
- public BlockScanningEvent(World aWorld, EntityPlayer aPlayer, int aX, int aY, int aZ, byte aSide, int aScanLevel, Block aBlock, TileEntity aTileEntity, ArrayList<String> aList, float aClickX, float aClickY, float aClickZ) {
- super(aWorld);
- mPlayer = aPlayer;
- mScanLevel = aScanLevel;
- mTileEntity = aTileEntity;
- mBlock = aBlock;
- mList = aList;
- mSide = aSide;
- mX = aX;
- mY = aY;
- mZ = aZ;
- mClickX = aClickX;
- mClickY = aClickY;
- mClickZ = aClickZ;
- }
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/gui/GT_Container.java b/main/java/gregtech/api/gui/GT_Container.java
deleted file mode 100644
index dc5e59d7d4..0000000000
--- a/main/java/gregtech/api/gui/GT_Container.java
+++ /dev/null
@@ -1,564 +0,0 @@
-package gregtech.api.gui;
-
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.util.GT_Log;
-import gregtech.api.util.GT_Utility;
-import gregtech.common.tileentities.machines.multi.GT_MetaTileEntity_FusionComputer;
-
-import java.util.List;
-
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.inventory.Container;
-import net.minecraft.inventory.ICrafting;
-import net.minecraft.inventory.IInventory;
-import net.minecraft.inventory.Slot;
-import net.minecraft.item.ItemStack;
-
-/**
- * NEVER INCLUDE THIS FILE IN YOUR MOD!!!
- *
- * Main Container-Class, used for all my GUIs
- */
-public class GT_Container extends Container {
- public IGregTechTileEntity mTileEntity;
- public InventoryPlayer mPlayerInventory;
-
- public GT_Container (InventoryPlayer aPlayerInventory, IGregTechTileEntity aTileEntityInventory) {
-
- mTileEntity = aTileEntityInventory;
- mPlayerInventory = aPlayerInventory;
- }
-
- /**
- * To add the Slots to your GUI
- */
- public void addSlots(InventoryPlayer aPlayerInventory) {
- //
- }
-
- /**
- * Amount of regular Slots in the GUI (so, non-HoloSlots)
- */
- public int getSlotCount() {
- return 0;
- }
-
- /**
- * Amount of ALL Slots in the GUI including HoloSlots and ArmorSlots, but excluding regular Player Slots
- */
- protected final int getAllSlotCount() {
- if (inventorySlots != null) {
- if (doesBindPlayerInventory()) return inventorySlots.size()-36;
- return inventorySlots.size();
- }
- return getSlotCount();
- }
-
- /**
- * Start-Index of the usable Slots (the first non-HoloSlot)
- */
- public int getSlotStartIndex() {
- return 0;
- }
-
- public int getShiftClickStartIndex() {
- return getSlotStartIndex();
- }
-
- /**
- * Amount of Slots in the GUI the player can Shift-Click into. Uses also getSlotStartIndex
- */
- public int getShiftClickSlotCount() {
- return 0;
- }
-
- /**
- * Is Player-Inventory visible?
- */
- public boolean doesBindPlayerInventory() {
- return true;
- }
-
- /**
- * Override this Function with something like "return mTileEntity.isUseableByPlayer(aPlayer);"
- */
- @Override
- public boolean canInteractWith(EntityPlayer aPlayer) {
- return false;
- }
-
- protected void bindPlayerInventory(InventoryPlayer aInventoryPlayer) {
- for (int i = 0; i < 3; i++) {
- for (int j = 0; j < 9; j++) {
- addSlotToContainer(new Slot(aInventoryPlayer, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
- }
- }
-
- for (int i = 0; i < 9; i++) {
- addSlotToContainer(new Slot(aInventoryPlayer, i, 8 + i * 18, 142));
- }
- }
-
- @Override
- public ItemStack slotClick(int aSlotIndex, int aMouseclick, int aShifthold, EntityPlayer aPlayer) {
- mTileEntity.markDirty();
-
- if (aSlotIndex >= 0) {
- if (inventorySlots.get(aSlotIndex) == null || inventorySlots.get(aSlotIndex) instanceof GT_Slot_Holo) return null;
- if (!(inventorySlots.get(aSlotIndex) instanceof GT_Slot_Armor)) if (aSlotIndex < getAllSlotCount()) if (aSlotIndex < getSlotStartIndex() || aSlotIndex >= getSlotStartIndex() + getSlotCount()) return null;
- }
-
- try {return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer);} catch (Throwable e) {e.printStackTrace(GT_Log.err);}
-
- ItemStack rStack = null;
- InventoryPlayer aPlayerInventory = aPlayer.inventory;
- Slot aSlot;
- ItemStack tTempStack;
- int tTempStackSize;
- ItemStack aHoldStack;
-
- if ((aShifthold == 0 || aShifthold == 1) && (aMouseclick == 0 || aMouseclick == 1)) {
- if (aSlotIndex == -999) {
- if (aPlayerInventory.getItemStack() != null && aSlotIndex == -999) {
- if (aMouseclick == 0) {
- aPlayer.dropPlayerItemWithRandomChoice(aPlayerInventory.getItemStack(), true);
- aPlayerInventory.setItemStack(null);
- }
- if (aMouseclick == 1) {
- aPlayer.dropPlayerItemWithRandomChoice(aPlayerInventory.getItemStack().splitStack(1), true);
- if (aPlayerInventory.getItemStack().stackSize == 0) {
- aPlayerInventory.setItemStack(null);
- }
- }
- }
- } else if (aShifthold == 1) {
- aSlot = (Slot)this.inventorySlots.get(aSlotIndex);
- if (aSlot != null && aSlot.canTakeStack(aPlayer)) {
- tTempStack = this.transferStackInSlot(aPlayer, aSlotIndex);
- if (tTempStack != null) {
- rStack = GT_Utility.copy(tTempStack);
- if (aSlot.getStack() != null && aSlot.getStack().getItem() == tTempStack.getItem()) {
- slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer);
- }
- }
- }
- } else {
- if (aSlotIndex < 0) {
- return null;
- }
- aSlot = (Slot)this.inventorySlots.get(aSlotIndex);
- if (aSlot != null) {
- tTempStack = aSlot.getStack();
- ItemStack var13 = aPlayerInventory.getItemStack();
- if (tTempStack != null) {
- rStack = GT_Utility.copy(tTempStack);
- }
- if (tTempStack == null) {
- if (var13 != null && aSlot.isItemValid(var13)) {
- tTempStackSize = aMouseclick == 0 ? var13.stackSize : 1;
- if (tTempStackSize > aSlot.getSlotStackLimit()) {
- tTempStackSize = aSlot.getSlotStackLimit();
- }
- aSlot.putStack(var13.splitStack(tTempStackSize));
-
- if (var13.stackSize == 0) {
- aPlayerInventory.setItemStack((ItemStack)null);
- }
- }
- } else if (aSlot.canTakeStack(aPlayer)) {
- if (var13 == null) {
- tTempStackSize = aMouseclick == 0 ? tTempStack.stackSize : (tTempStack.stackSize + 1) / 2;
- aHoldStack = aSlot.decrStackSize(tTempStackSize);
- aPlayerInventory.setItemStack(aHoldStack);
- if (tTempStack.stackSize == 0) {
- aSlot.putStack((ItemStack)null);
- }
- aSlot.onPickupFromSlot(aPlayer, aPlayerInventory.getItemStack());
- } else if (aSlot.isItemValid(var13)) {
- if (tTempStack.getItem() == var13.getItem() && tTempStack.getItemDamage() == var13.getItemDamage() && ItemStack.areItemStackTagsEqual(tTempStack, var13)) {
- tTempStackSize = aMouseclick == 0 ? var13.stackSize : 1;
- if (tTempStackSize > aSlot.getSlotStackLimit() - tTempStack.stackSize) {
- tTempStackSize = aSlot.getSlotStackLimit() - tTempStack.stackSize;
- }
- if (tTempStackSize > var13.getMaxStackSize() - tTempStack.stackSize) {
- tTempStackSize = var13.getMaxStackSize() - tTempStack.stackSize;
- }
- var13.splitStack(tTempStackSize);
- if (var13.stackSize == 0) {
- aPlayerInventory.setItemStack((ItemStack)null);
- }
- tTempStack.stackSize += tTempStackSize;
- } else if (var13.stackSize <= aSlot.getSlotStackLimit()) {
- aSlot.putStack(var13);
- aPlayerInventory.setItemStack(tTempStack);
- }
- } else if (tTempStack.getItem() == var13.getItem() && var13.getMaxStackSize() > 1 && (!tTempStack.getHasSubtypes() || tTempStack.getItemDamage() == var13.getItemDamage()) && ItemStack.areItemStackTagsEqual(tTempStack, var13)) {
- tTempStackSize = tTempStack.stackSize;
-
- if (tTempStackSize > 0 && tTempStackSize + var13.stackSize <= var13.getMaxStackSize()) {
- var13.stackSize += tTempStackSize;
- tTempStack = aSlot.decrStackSize(tTempStackSize);
-
- if (tTempStack.stackSize == 0) {
- aSlot.putStack((ItemStack)null);
- }
-
- aSlot.onPickupFromSlot(aPlayer, aPlayerInventory.getItemStack());
- }
- }
- }
- aSlot.onSlotChanged();
- }
- }
- } else if (aShifthold == 2 && aMouseclick >= 0 && aMouseclick < 9) {
- aSlot = (Slot)this.inventorySlots.get(aSlotIndex);
-
- if (aSlot.canTakeStack(aPlayer)) {
- tTempStack = aPlayerInventory.getStackInSlot(aMouseclick);
- boolean var9 = tTempStack == null || aSlot.inventory == aPlayerInventory && aSlot.isItemValid(tTempStack);
- tTempStackSize = -1;
-
- if (!var9) {
- tTempStackSize = aPlayerInventory.getFirstEmptyStack();
- var9 |= tTempStackSize > -1;
- }
-
- if (aSlot.getHasStack() && var9) {
- aHoldStack = aSlot.getStack();
- aPlayerInventory.setInventorySlotContents(aMouseclick, aHoldStack);
-
- if ((aSlot.inventory != aPlayerInventory || !aSlot.isItemValid(tTempStack)) && tTempStack != null) {
- if (tTempStackSize > -1) {
- aPlayerInventory.addItemStackToInventory(tTempStack);
- aSlot.decrStackSize(aHoldStack.stackSize);
- aSlot.putStack((ItemStack)null);
- aSlot.onPickupFromSlot(aPlayer, aHoldStack);
- }
- } else {
- aSlot.decrStackSize(aHoldStack.stackSize);
- aSlot.putStack(tTempStack);
- aSlot.onPickupFromSlot(aPlayer, aHoldStack);
- }
- } else if (!aSlot.getHasStack() && tTempStack != null && aSlot.isItemValid(tTempStack)) {
- aPlayerInventory.setInventorySlotContents(aMouseclick, (ItemStack)null);
- aSlot.putStack(tTempStack);
- }
- }
- } else if (aShifthold == 3 && aPlayer.capabilities.isCreativeMode && aPlayerInventory.getItemStack() == null && aSlotIndex >= 0) {
- aSlot = (Slot)this.inventorySlots.get(aSlotIndex);
- if (aSlot != null && aSlot.getHasStack()) {
- tTempStack = GT_Utility.copy(aSlot.getStack());
- tTempStack.stackSize = tTempStack.getMaxStackSize();
- aPlayerInventory.setItemStack(tTempStack);
- }
- }
- return rStack;
- }
-
- @Override
- public ItemStack transferStackInSlot(EntityPlayer aPlayer, int aSlotIndex) {
- ItemStack stack = null;
- Slot slotObject = (Slot)inventorySlots.get(aSlotIndex);
-
- mTileEntity.markDirty();
-
- //null checks and checks if the item can be stacked (maxStackSize > 1)
- if (getSlotCount() > 0 && slotObject != null && slotObject.getHasStack() && !(slotObject instanceof GT_Slot_Holo)) {
- ItemStack stackInSlot = slotObject.getStack();
- stack = GT_Utility.copy(stackInSlot);
-
- //TileEntity -> Player
- if (aSlotIndex < getAllSlotCount()) {
- if (doesBindPlayerInventory())
- if (!mergeItemStack(stackInSlot, getAllSlotCount(), getAllSlotCount()+36, true)) {
- return null;
- }
- //Player -> TileEntity
- } else if (!mergeItemStack(stackInSlot, getShiftClickStartIndex(), getShiftClickStartIndex()+getShiftClickSlotCount(), false)) {
- return null;
- }
-
- if (stackInSlot.stackSize == 0) {
- slotObject.putStack(null);
- } else {
- slotObject.onSlotChanged();
- }
- }
- return stack;
- }
-
- /**
- * merges provided ItemStack with the first avaliable one in the container/player inventory
- */
- @Override
- protected boolean mergeItemStack(ItemStack aStack, int aStartIndex, int aSlotCount, boolean par4) {
- boolean var5 = false;
- int var6 = aStartIndex;
-
- mTileEntity.markDirty();
-
- if (par4) {
- var6 = aSlotCount - 1;
- }
-
- Slot var7;
- ItemStack var8;
-
- if (aStack.isStackable()) {
- while (aStack.stackSize > 0 && (!par4 && var6 < aSlotCount || par4 && var6 >= aStartIndex)) {
- var7 = (Slot)this.inventorySlots.get(var6);
- var8 = var7.getStack();
-
- if (!(var7 instanceof GT_Slot_Holo) && !(var7 instanceof GT_Slot_Output) && var8 != null && var8.getItem() == aStack.getItem() && (!aStack.getHasSubtypes() || aStack.getItemDamage() == var8.getItemDamage()) && ItemStack.areItemStackTagsEqual(aStack, var8)) {
- int var9 = var8.stackSize + aStack.stackSize;
-
- if (var9 <= aStack.getMaxStackSize()) {
- aStack.stackSize = 0;
- var8.stackSize = var9;
- var7.onSlotChanged();
- var5 = true;
- } else if (var8.stackSize < aStack.getMaxStackSize()) {
- aStack.stackSize -= aStack.getMaxStackSize() - var8.stackSize;
- var8.stackSize = aStack.getMaxStackSize();
- var7.onSlotChanged();
- var5 = true;
- }
- }
-
- if (par4) {
- --var6;
- } else {
- ++var6;
- }
- }
- }
-
- if (aStack.stackSize > 0)
- {
- if (par4)
- {
- var6 = aSlotCount - 1;
- }
- else
- {
- var6 = aStartIndex;
- }
-
- while (!par4 && var6 < aSlotCount || par4 && var6 >= aStartIndex)
- {
- var7 = (Slot)this.inventorySlots.get(var6);
- var8 = var7.getStack();
-
- if (var8 == null)
- {
- var7.putStack(GT_Utility.copy(aStack));
- var7.onSlotChanged();
- aStack.stackSize = 0;
- var5 = true;
- break;
- }
-
- if (par4)
- {
- --var6;
- }
- else
- {
- ++var6;
- }
- }
- }
-
- return var5;
- }
-
- @Override
- protected Slot addSlotToContainer(Slot par1Slot) {
- try {
- return super.addSlotToContainer(par1Slot);
- } catch(Throwable e) {
- e.printStackTrace(GT_Log.err);
- }
- return par1Slot;
- }
-
- @Override
- public void addCraftingToCrafters(ICrafting par1ICrafting) {
- try {
- super.addCraftingToCrafters(par1ICrafting);
- } catch(Throwable e) {
- e.printStackTrace(GT_Log.err);
- }
- }
-
- @Override
- public List getInventory() {
- try {
- return super.getInventory();
- } catch(Throwable e) {
- e.printStackTrace(GT_Log.err);
- }
- return null;
- }
-
- @Override
- public void removeCraftingFromCrafters(ICrafting par1ICrafting) {
- try {
- super.removeCraftingFromCrafters(par1ICrafting);
- } catch(Throwable e) {
- e.printStackTrace(GT_Log.err);
- }
- }
-
- @Override
- public void detectAndSendChanges() {
- try {
- super.detectAndSendChanges();
- } catch(Throwable e) {
- e.printStackTrace(GT_Log.err);
- }
- }
-
- @Override
- public boolean enchantItem(EntityPlayer par1EntityPlayer, int par2) {
- try {
- return super.enchantItem(par1EntityPlayer, par2);
- } catch(Throwable e) {
- e.printStackTrace(GT_Log.err);
- }
- return false;
- }
-
- @Override
- public Slot getSlotFromInventory(IInventory par1IInventory, int par2) {
- try {
- return super.getSlotFromInventory(par1IInventory, par2);
- } catch(Throwable e) {
- e.printStackTrace(GT_Log.err);
- }
- return null;
- }
-
- @Override
- public Slot getSlot(int par1) {
- try {
- if (this.inventorySlots.size() > par1) return super.getSlot(par1);
- } catch(Throwable e) {
- e.printStackTrace(GT_Log.err);
- }
- return null;
- }
-
- @Override
- public boolean func_94530_a(ItemStack par1ItemStack, Slot par2Slot) {
- try {
- return super.func_94530_a(par1ItemStack, par2Slot);
- } catch(Throwable e) {
- e.printStackTrace(GT_Log.err);
- }
- return true;
- }
-
- @Override
- protected void retrySlotClick(int par1, int par2, boolean par3, EntityPlayer par4EntityPlayer) {
- try {
- super.retrySlotClick(par1, par2, par3, par4EntityPlayer);
- } catch(Throwable e) {
- e.printStackTrace(GT_Log.err);
- }
- }
-
- @Override
- public void onContainerClosed(EntityPlayer par1EntityPlayer) {
- try {
- super.onContainerClosed(par1EntityPlayer);
- } catch(Throwable e) {
- e.printStackTrace(GT_Log.err);
- }
- }
-
- @Override
- public void onCraftMatrixChanged(IInventory par1IInventory) {
- try {
- super.onCraftMatrixChanged(par1IInventory);
- } catch(Throwable e) {
- e.printStackTrace(GT_Log.err);
- }
- }
-
- @Override
- public void putStackInSlot(int par1, ItemStack par2ItemStack) {
- try {
- super.putStackInSlot(par1, par2ItemStack);
- } catch(Throwable e) {
- e.printStackTrace(GT_Log.err);
- }
- }
-
- @Override
- public void putStacksInSlots(ItemStack[] par1ArrayOfItemStack) {
- try {
- super.putStacksInSlots(par1ArrayOfItemStack);
- } catch(Throwable e) {
- e.printStackTrace(GT_Log.err);
- }
- }
-
- @Override
- public void updateProgressBar(int par1, int par2) {
- try {
- super.updateProgressBar(par1, par2);
- } catch(Throwable e) {
- e.printStackTrace(GT_Log.err);
- }
- }
-
- @Override
- public short getNextTransactionID(InventoryPlayer par1InventoryPlayer) {
- try {
- return super.getNextTransactionID(par1InventoryPlayer);
- } catch(Throwable e) {
- e.printStackTrace(GT_Log.err);
- }
- return 0;
- }
-
- @Override
- public boolean isPlayerNotUsingContainer(EntityPlayer par1EntityPlayer) {
- try {
- return super.isPlayerNotUsingContainer(par1EntityPlayer);
- } catch(Throwable e) {
- e.printStackTrace(GT_Log.err);
- }
- return true;
- }
-
- @Override
- public void setPlayerIsPresent(EntityPlayer par1EntityPlayer, boolean par2) {
- try {
- super.setPlayerIsPresent(par1EntityPlayer, par2);
- } catch(Throwable e) {
- e.printStackTrace(GT_Log.err);
- }
- }
-
- @Override
- protected void func_94533_d() {
- try {
- super.func_94533_d();
- } catch(Throwable e) {
- e.printStackTrace(GT_Log.err);
- }
- }
-
- @Override
- public boolean canDragIntoSlot(Slot par1Slot) {
- try {
- return super.canDragIntoSlot(par1Slot);
- } catch(Throwable e) {
- e.printStackTrace(GT_Log.err);
- }
- return true;
- }
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/gui/GT_ContainerMetaTile_Machine.java b/main/java/gregtech/api/gui/GT_ContainerMetaTile_Machine.java
deleted file mode 100644
index d4fc27aaf9..0000000000
--- a/main/java/gregtech/api/gui/GT_ContainerMetaTile_Machine.java
+++ /dev/null
@@ -1,152 +0,0 @@
-package gregtech.api.gui;
-
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-
-import java.util.Iterator;
-
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.inventory.ICrafting;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-
-/**
- * NEVER INCLUDE THIS FILE IN YOUR MOD!!!
- *
- * The Container I use for all my MetaTileEntities
- */
-public class GT_ContainerMetaTile_Machine extends GT_Container {
-
- public GT_ContainerMetaTile_Machine(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) {
- super(aInventoryPlayer, aTileEntity);
-
- mTileEntity = aTileEntity;
-
- if (mTileEntity != null && mTileEntity.getMetaTileEntity() != null) {
- addSlots(aInventoryPlayer);
- if (doesBindPlayerInventory()) bindPlayerInventory(aInventoryPlayer);
- detectAndSendChanges();
- } else {
- aInventoryPlayer.player.openContainer = aInventoryPlayer.player.inventoryContainer;
- }
- }
- public GT_ContainerMetaTile_Machine(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, boolean doesBindInventory){
- super(aInventoryPlayer, aTileEntity);
- mTileEntity = aTileEntity;
-
- if (mTileEntity != null && mTileEntity.getMetaTileEntity() != null) {
- addSlots(aInventoryPlayer);
- if (doesBindPlayerInventory()&&doesBindInventory) bindPlayerInventory(aInventoryPlayer);
- detectAndSendChanges();
- } else {
- aInventoryPlayer.player.openContainer = aInventoryPlayer.player.inventoryContainer;
- }
- }
-
-
- public int mActive = 0, mMaxProgressTime = 0, mProgressTime = 0, mEnergy = 0, mSteam = 0, mSteamStorage = 0, mStorage = 0, mOutput = 0, mInput = 0, mID = 0, mDisplayErrorCode = 0;
- private int oActive = 0, oMaxProgressTime = 0, oProgressTime = 0, oEnergy = 0, oSteam = 0, oSteamStorage = 0, oStorage = 0, oOutput = 0, oInput = 0, oID = 0, oDisplayErrorCode = 0, mTimer = 0;
-
- @Override
- public void detectAndSendChanges() {
- super.detectAndSendChanges();
- if (mTileEntity.isClientSide() || mTileEntity.getMetaTileEntity() == null) return;
- mStorage = (int)Math.min(Integer.MAX_VALUE, mTileEntity.getEUCapacity());
- mEnergy = (int)Math.min(Integer.MAX_VALUE, mTileEntity.getStoredEU());
- mSteamStorage = (int)Math.min(Integer.MAX_VALUE, mTileEntity.getSteamCapacity());
- mSteam = (int)Math.min(Integer.MAX_VALUE, mTileEntity.getStoredSteam());
- mOutput = (int)Math.min(Integer.MAX_VALUE, mTileEntity.getOutputVoltage());
- mInput = (int)Math.min(Integer.MAX_VALUE, mTileEntity.getInputVoltage());
- mDisplayErrorCode = mTileEntity.getErrorDisplayID();
- mProgressTime = mTileEntity.getProgress();
- mMaxProgressTime = mTileEntity.getMaxProgress();
- mActive = mTileEntity.isActive()?1:0;
- mTimer++;
-
- Iterator var2 = this.crafters.iterator();
- while (var2.hasNext()) {
- ICrafting var1 = (ICrafting)var2.next();
- if (mTimer % 500 == 10 || oEnergy != mEnergy) {
- var1.sendProgressBarUpdate(this, 0, mEnergy & 65535);
- var1.sendProgressBarUpdate(this, 1, mEnergy >>> 16);
- }
- if (mTimer % 500 == 10 || oStorage != mStorage) {
- var1.sendProgressBarUpdate(this, 2, mStorage & 65535);
- var1.sendProgressBarUpdate(this, 3, mStorage >>> 16);
- }
- if (mTimer % 500 == 10 || oOutput != mOutput) {
- var1.sendProgressBarUpdate(this, 4, mOutput);
- }
- if (mTimer % 500 == 10 || oInput != mInput) {
- var1.sendProgressBarUpdate(this, 5, mInput);
- }
- if (mTimer % 500 == 10 || oDisplayErrorCode != mDisplayErrorCode) {
- var1.sendProgressBarUpdate(this, 6, mDisplayErrorCode);
- }
- if (mTimer % 500 == 10 || oProgressTime != mProgressTime) {
- var1.sendProgressBarUpdate(this, 11, mProgressTime & 65535);
- var1.sendProgressBarUpdate(this, 12, mProgressTime >>> 16);
- }
- if (mTimer % 500 == 10 || oMaxProgressTime != mMaxProgressTime) {
- var1.sendProgressBarUpdate(this, 13, mMaxProgressTime & 65535);
- var1.sendProgressBarUpdate(this, 14, mMaxProgressTime >>> 16);
- }
- if (mTimer % 500 == 10 || oID != mID) {
- var1.sendProgressBarUpdate(this, 15, mID);
- }
- if (mTimer % 500 == 10 || oActive != mActive) {
- var1.sendProgressBarUpdate(this, 16, mActive);
- }
- if (mTimer % 500 == 10 || oSteam != mSteam) {
- var1.sendProgressBarUpdate(this, 17, mSteam & 65535);
- var1.sendProgressBarUpdate(this, 18, mSteam >>> 16);
- }
- if (mTimer % 500 == 10 || oSteamStorage != mSteamStorage) {
- var1.sendProgressBarUpdate(this, 19, mSteamStorage & 65535);
- var1.sendProgressBarUpdate(this, 20, mSteamStorage >>> 16);
- }
- }
-
- oID = mID;
- oSteam = mSteam;
- oInput = mInput;
- oActive = mActive;
- oOutput = mOutput;
- oEnergy = mEnergy;
- oStorage = mStorage;
- oSteamStorage = mSteamStorage;
- oProgressTime = mProgressTime;
- oMaxProgressTime = mMaxProgressTime;
- oDisplayErrorCode = mDisplayErrorCode;
- }
-
- @SideOnly(Side.CLIENT)
- @Override
- public void updateProgressBar(int par1, int par2) {
- super.updateProgressBar(par1, par2);
- switch (par1) {
- case 0: mEnergy = mEnergy & -65536 | par2; break;
- case 1: mEnergy = mEnergy & 65535 | par2 << 16; break;
- case 2: mStorage = mStorage & -65536 | par2; break;
- case 3: mStorage = mStorage & 65535 | par2 << 16; break;
- case 4: mOutput = par2; break;
- case 5: mInput = par2; break;
- case 6: mDisplayErrorCode = par2; break;
- case 11: mProgressTime = mProgressTime & -65536 | par2; break;
- case 12: mProgressTime = mProgressTime & 65535 | par2 << 16; break;
- case 13: mMaxProgressTime = mMaxProgressTime & -65536 | par2; break;
- case 14: mMaxProgressTime = mMaxProgressTime & 65535 | par2 << 16; break;
- case 15: mID = par2; break;
- case 16: mActive = par2; break;
- case 17: mSteam = mSteam & -65536 | par2; break;
- case 18: mSteam = mSteam & 65535 | par2 << 16; break;
- case 19: mSteamStorage = mSteamStorage & -65536 | par2; break;
- case 20: mSteamStorage = mSteamStorage & 65535 | par2 << 16; break;
- }
- }
-
- @Override
- public boolean canInteractWith(EntityPlayer player) {
- return mTileEntity.isUseableByPlayer(player);
- }
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/gui/GT_Container_1by1.java b/main/java/gregtech/api/gui/GT_Container_1by1.java
deleted file mode 100644
index 3607d81e38..0000000000
--- a/main/java/gregtech/api/gui/GT_Container_1by1.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package gregtech.api.gui;
-
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.inventory.Slot;
-
-public class GT_Container_1by1 extends GT_ContainerMetaTile_Machine {
-
- public GT_Container_1by1(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) {
- super(aInventoryPlayer, aTileEntity);
- }
-
- @Override
- public void addSlots(InventoryPlayer aInventoryPlayer) {
- addSlotToContainer(new Slot(mTileEntity, 0, 80, 35));
- }
-
- @Override
- public int getSlotCount() {
- return 1;
- }
-
- @Override
- public int getShiftClickSlotCount() {
- return 1;
- }
-}
diff --git a/main/java/gregtech/api/gui/GT_Container_2by2.java b/main/java/gregtech/api/gui/GT_Container_2by2.java
deleted file mode 100644
index 2d4bdcd3ae..0000000000
--- a/main/java/gregtech/api/gui/GT_Container_2by2.java
+++ /dev/null
@@ -1,30 +0,0 @@
-package gregtech.api.gui;
-
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.inventory.Slot;
-
-public class GT_Container_2by2 extends GT_ContainerMetaTile_Machine {
-
- public GT_Container_2by2(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) {
- super(aInventoryPlayer, aTileEntity);
- }
-
- @Override
- public void addSlots(InventoryPlayer aInventoryPlayer) {
- addSlotToContainer(new Slot(mTileEntity, 0, 71, 26));
- addSlotToContainer(new Slot(mTileEntity, 1, 89, 26));
- addSlotToContainer(new Slot(mTileEntity, 2, 71, 44));
- addSlotToContainer(new Slot(mTileEntity, 3, 89, 44));
- }
-
- @Override
- public int getSlotCount() {
- return 4;
- }
-
- @Override
- public int getShiftClickSlotCount() {
- return 4;
- }
-}
diff --git a/main/java/gregtech/api/gui/GT_Container_3by3.java b/main/java/gregtech/api/gui/GT_Container_3by3.java
deleted file mode 100644
index 9206116de1..0000000000
--- a/main/java/gregtech/api/gui/GT_Container_3by3.java
+++ /dev/null
@@ -1,35 +0,0 @@
-package gregtech.api.gui;
-
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.inventory.Slot;
-
-public class GT_Container_3by3 extends GT_ContainerMetaTile_Machine {
-
- public GT_Container_3by3(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) {
- super(aInventoryPlayer, aTileEntity);
- }
-
- @Override
- public void addSlots(InventoryPlayer aInventoryPlayer) {
- addSlotToContainer(new Slot(mTileEntity, 0, 62, 17));
- addSlotToContainer(new Slot(mTileEntity, 1, 80, 17));
- addSlotToContainer(new Slot(mTileEntity, 2, 98, 17));
- addSlotToContainer(new Slot(mTileEntity, 3, 62, 35));
- addSlotToContainer(new Slot(mTileEntity, 4, 80, 35));
- addSlotToContainer(new Slot(mTileEntity, 5, 98, 35));
- addSlotToContainer(new Slot(mTileEntity, 6, 62, 53));
- addSlotToContainer(new Slot(mTileEntity, 7, 80, 53));
- addSlotToContainer(new Slot(mTileEntity, 8, 98, 53));
- }
-
- @Override
- public int getSlotCount() {
- return 9;
- }
-
- @Override
- public int getShiftClickSlotCount() {
- return 9;
- }
-}
diff --git a/main/java/gregtech/api/gui/GT_Container_4by4.java b/main/java/gregtech/api/gui/GT_Container_4by4.java
deleted file mode 100644
index eb6039cd1c..0000000000
--- a/main/java/gregtech/api/gui/GT_Container_4by4.java
+++ /dev/null
@@ -1,42 +0,0 @@
-package gregtech.api.gui;
-
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.inventory.Slot;
-
-public class GT_Container_4by4 extends GT_ContainerMetaTile_Machine {
-
- public GT_Container_4by4(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) {
- super(aInventoryPlayer, aTileEntity);
- }
-
- @Override
- public void addSlots(InventoryPlayer aInventoryPlayer) {
- addSlotToContainer(new Slot(mTileEntity, 0, 53, 8));
- addSlotToContainer(new Slot(mTileEntity, 1, 71, 8));
- addSlotToContainer(new Slot(mTileEntity, 2, 89, 8));
- addSlotToContainer(new Slot(mTileEntity, 3, 107, 8));
- addSlotToContainer(new Slot(mTileEntity, 4, 53, 26));
- addSlotToContainer(new Slot(mTileEntity, 5, 71, 26));
- addSlotToContainer(new Slot(mTileEntity, 6, 89, 26));
- addSlotToContainer(new Slot(mTileEntity, 7, 107, 26));
- addSlotToContainer(new Slot(mTileEntity, 8, 53, 44));
- addSlotToContainer(new Slot(mTileEntity, 9, 71, 44));
- addSlotToContainer(new Slot(mTileEntity,10, 89, 44));
- addSlotToContainer(new Slot(mTileEntity,11, 107, 44));
- addSlotToContainer(new Slot(mTileEntity,12, 53, 62));
- addSlotToContainer(new Slot(mTileEntity,13, 71, 62));
- addSlotToContainer(new Slot(mTileEntity,14, 89, 62));
- addSlotToContainer(new Slot(mTileEntity,15, 107, 62));
- }
-
- @Override
- public int getSlotCount() {
- return 16;
- }
-
- @Override
- public int getShiftClickSlotCount() {
- return 16;
- }
-}
diff --git a/main/java/gregtech/api/gui/GT_Container_BasicMachine.java b/main/java/gregtech/api/gui/GT_Container_BasicMachine.java
deleted file mode 100644
index 410d4c9801..0000000000
--- a/main/java/gregtech/api/gui/GT_Container_BasicMachine.java
+++ /dev/null
@@ -1,249 +0,0 @@
-package gregtech.api.gui;
-
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine;
-
-import java.util.Iterator;
-
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.inventory.ICrafting;
-import net.minecraft.inventory.Slot;
-import net.minecraft.item.ItemStack;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-
-/**
- * NEVER INCLUDE THIS FILE IN YOUR MOD!!!
- *
- * The Container I use for all my Basic Machines
- */
-public class GT_Container_BasicMachine extends GT_Container_BasicTank {
-
- public GT_Container_BasicMachine(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) {
- super(aInventoryPlayer, aTileEntity);
- }
-
- @Override
- public void addSlots(InventoryPlayer aInventoryPlayer) {
- addSlotToContainer(new GT_Slot_Holo(mTileEntity, 0, 8, 63, false, true, 1));
- addSlotToContainer(new GT_Slot_Holo(mTileEntity, 0, 26, 63, false, true, 1));
- addSlotToContainer(new GT_Slot_Render(mTileEntity, 2, 107, 63));
-
- int tStartIndex = ((GT_MetaTileEntity_BasicMachine)mTileEntity.getMetaTileEntity()).getInputSlot();
-
- switch (((GT_MetaTileEntity_BasicMachine)mTileEntity.getMetaTileEntity()).mInputSlotCount) {
- case 0:
- break;
- case 1:
- addSlotToContainer(new Slot(mTileEntity, tStartIndex++, 53, 25));
- break;
- case 2:
- addSlotToContainer(new Slot(mTileEntity, tStartIndex++, 35, 25));
- addSlotToContainer(new Slot(mTileEntity, tStartIndex++, 53, 25));
- break;
- case 3:
- addSlotToContainer(new Slot(mTileEntity, tStartIndex++, 17, 25));
- addSlotToContainer(new Slot(mTileEntity, tStartIndex++, 35, 25));
- addSlotToContainer(new Slot(mTileEntity, tStartIndex++, 53, 25));
- break;
- case 4:
- addSlotToContainer(new Slot(mTileEntity, tStartIndex++, 35, 16));
- addSlotToContainer(new Slot(mTileEntity, tStartIndex++, 53, 16));
- addSlotToContainer(new Slot(mTileEntity, tStartIndex++, 35, 34));
- addSlotToContainer(new Slot(mTileEntity, tStartIndex++, 53, 34));
- break;
- case 5:
- addSlotToContainer(new Slot(mTileEntity, tStartIndex++, 17, 16));
- addSlotToContainer(new Slot(mTileEntity, tStartIndex++, 35, 16));
- addSlotToContainer(new Slot(mTileEntity, tStartIndex++, 53, 16));
- addSlotToContainer(new Slot(mTileEntity, tStartIndex++, 35, 34));
- addSlotToContainer(new Slot(mTileEntity, tStartIndex++, 53, 34));
- break;
- case 6:
- addSlotToContainer(new Slot(mTileEntity, tStartIndex++, 17, 16));
- addSlotToContainer(new Slot(mTileEntity, tStartIndex++, 35, 16));
- addSlotToContainer(new Slot(mTileEntity, tStartIndex++, 53, 16));
- addSlotToContainer(new Slot(mTileEntity, tStartIndex++, 17, 34));
- addSlotToContainer(new Slot(mTileEntity, tStartIndex++, 35, 34));
- addSlotToContainer(new Slot(mTileEntity, tStartIndex++, 53, 34));
- break;
- case 7:
- addSlotToContainer(new Slot(mTileEntity, tStartIndex++, 17, 7));
- addSlotToContainer(new Slot(mTileEntity, tStartIndex++, 35, 7));
- addSlotToContainer(new Slot(mTileEntity, tStartIndex++, 53, 7));
- addSlotToContainer(new Slot(mTileEntity, tStartIndex++, 17, 25));
- addSlotToContainer(new Slot(mTileEntity, tStartIndex++, 35, 25));
- addSlotToContainer(new Slot(mTileEntity, tStartIndex++, 53, 25));
- addSlotToContainer(new Slot(mTileEntity, tStartIndex++, 17, 43));
- break;
- case 8:
- addSlotToContainer(new Slot(mTileEntity, tStartIndex++, 17, 7));
- addSlotToContainer(new Slot(mTileEntity, tStartIndex++, 35, 7));
- addSlotToContainer(new Slot(mTileEntity, tStartIndex++, 53, 7));
- addSlotToContainer(new Slot(mTileEntity, tStartIndex++, 17, 25));
- addSlotToContainer(new Slot(mTileEntity, tStartIndex++, 35, 25));
- addSlotToContainer(new Slot(mTileEntity, tStartIndex++, 53, 25));
- addSlotToContainer(new Slot(mTileEntity, tStartIndex++, 17, 43));
- addSlotToContainer(new Slot(mTileEntity, tStartIndex++, 35, 43));
- break;
- default:
- addSlotToContainer(new Slot(mTileEntity, tStartIndex++, 17, 7));
- addSlotToContainer(new Slot(mTileEntity, tStartIndex++, 35, 7));
- addSlotToContainer(new Slot(mTileEntity, tStartIndex++, 53, 7));
- addSlotToContainer(new Slot(mTileEntity, tStartIndex++, 17, 25));
- addSlotToContainer(new Slot(mTileEntity, tStartIndex++, 35, 25));
- addSlotToContainer(new Slot(mTileEntity, tStartIndex++, 53, 25));
- addSlotToContainer(new Slot(mTileEntity, tStartIndex++, 17, 43));
- addSlotToContainer(new Slot(mTileEntity, tStartIndex++, 35, 43));
- addSlotToContainer(new Slot(mTileEntity, tStartIndex++, 53, 43));
- break;
- }
-
- tStartIndex = ((GT_MetaTileEntity_BasicMachine)mTileEntity.getMetaTileEntity()).getOutputSlot();
-
- switch (((GT_MetaTileEntity_BasicMachine)mTileEntity.getMetaTileEntity()).mOutputItems.length) {
- case 0:
- break;
- case 1:
- addSlotToContainer(new GT_Slot_Output(mTileEntity, tStartIndex++, 107, 25));
- break;
- case 2:
- addSlotToContainer(new GT_Slot_Output(mTileEntity, tStartIndex++, 107, 25));
- addSlotToContainer(new GT_Slot_Output(mTileEntity, tStartIndex++, 125, 25));
- break;
- case 3:
- addSlotToContainer(new GT_Slot_Output(mTileEntity, tStartIndex++, 107, 25));
- addSlotToContainer(new GT_Slot_Output(mTileEntity, tStartIndex++, 125, 25));
- addSlotToContainer(new GT_Slot_Output(mTileEntity, tStartIndex++, 143, 25));
- break;
- case 4:
- addSlotToContainer(new GT_Slot_Output(mTileEntity, tStartIndex++, 107, 16));
- addSlotToContainer(new GT_Slot_Output(mTileEntity, tStartIndex++, 125, 16));
- addSlotToContainer(new GT_Slot_Output(mTileEntity, tStartIndex++, 107, 34));
- addSlotToContainer(new GT_Slot_Output(mTileEntity, tStartIndex++, 125, 34));
- break;
- case 5:
- addSlotToContainer(new GT_Slot_Output(mTileEntity, tStartIndex++, 107, 16));
- addSlotToContainer(new GT_Slot_Output(mTileEntity, tStartIndex++, 125, 16));
- addSlotToContainer(new GT_Slot_Output(mTileEntity, tStartIndex++, 143, 16));
- addSlotToContainer(new GT_Slot_Output(mTileEntity, tStartIndex++, 107, 34));
- addSlotToContainer(new GT_Slot_Output(mTileEntity, tStartIndex++, 125, 34));
- break;
- case 6:
- addSlotToContainer(new GT_Slot_Output(mTileEntity, tStartIndex++, 107, 16));
- addSlotToContainer(new GT_Slot_Output(mTileEntity, tStartIndex++, 125, 16));
- addSlotToContainer(new GT_Slot_Output(mTileEntity, tStartIndex++, 143, 16));
- addSlotToContainer(new GT_Slot_Output(mTileEntity, tStartIndex++, 107, 34));
- addSlotToContainer(new GT_Slot_Output(mTileEntity, tStartIndex++, 125, 34));
- addSlotToContainer(new GT_Slot_Output(mTileEntity, tStartIndex++, 143, 34));
- break;
- case 7:
- addSlotToContainer(new GT_Slot_Output(mTileEntity, tStartIndex++, 107, 7));
- addSlotToContainer(new GT_Slot_Output(mTileEntity, tStartIndex++, 125, 7));
- addSlotToContainer(new GT_Slot_Output(mTileEntity, tStartIndex++, 143, 7));
- addSlotToContainer(new GT_Slot_Output(mTileEntity, tStartIndex++, 107, 25));
- addSlotToContainer(new GT_Slot_Output(mTileEntity, tStartIndex++, 125, 25));
- addSlotToContainer(new GT_Slot_Output(mTileEntity, tStartIndex++, 143, 25));
- addSlotToContainer(new GT_Slot_Output(mTileEntity, tStartIndex++, 107, 43));
- break;
- case 8:
- addSlotToContainer(new GT_Slot_Output(mTileEntity, tStartIndex++, 107, 7));
- addSlotToContainer(new GT_Slot_Output(mTileEntity, tStartIndex++, 125, 7));
- addSlotToContainer(new GT_Slot_Output(mTileEntity, tStartIndex++, 143, 7));
- addSlotToContainer(new GT_Slot_Output(mTileEntity, tStartIndex++, 107, 25));
- addSlotToContainer(new GT_Slot_Output(mTileEntity, tStartIndex++, 125, 25));
- addSlotToContainer(new GT_Slot_Output(mTileEntity, tStartIndex++, 143, 25));
- addSlotToContainer(new GT_Slot_Output(mTileEntity, tStartIndex++, 107, 43));
- addSlotToContainer(new GT_Slot_Output(mTileEntity, tStartIndex++, 125, 43));
- break;
- default:
- addSlotToContainer(new GT_Slot_Output(mTileEntity, tStartIndex++, 107, 7));
- addSlotToContainer(new GT_Slot_Output(mTileEntity, tStartIndex++, 125, 7));
- addSlotToContainer(new GT_Slot_Output(mTileEntity, tStartIndex++, 143, 7));
- addSlotToContainer(new GT_Slot_Output(mTileEntity, tStartIndex++, 107, 25));
- addSlotToContainer(new GT_Slot_Output(mTileEntity, tStartIndex++, 125, 25));
- addSlotToContainer(new GT_Slot_Output(mTileEntity, tStartIndex++, 143, 25));
- addSlotToContainer(new GT_Slot_Output(mTileEntity, tStartIndex++, 107, 43));
- addSlotToContainer(new GT_Slot_Output(mTileEntity, tStartIndex++, 125, 43));
- addSlotToContainer(new GT_Slot_Output(mTileEntity, tStartIndex++, 143, 43));
- break;
- }
-
- addSlotToContainer(new Slot(mTileEntity, 1, 80, 63));
- addSlotToContainer(new Slot(mTileEntity, 3, 125, 63));
- addSlotToContainer(new GT_Slot_Render(mTileEntity, tStartIndex++, 53, 63));
- }
-
- public boolean mFluidTransfer = false, mItemTransfer = false, mStuttering = false;
-
- @Override
- public ItemStack slotClick(int aSlotIndex, int aMouseclick, int aShifthold, EntityPlayer aPlayer) {
- switch(aSlotIndex) {
- case 0:
- if (mTileEntity.getMetaTileEntity() == null) return null;
- ((GT_MetaTileEntity_BasicMachine)mTileEntity.getMetaTileEntity()).mFluidTransfer = !((GT_MetaTileEntity_BasicMachine)mTileEntity.getMetaTileEntity()).mFluidTransfer;
- return null;
- case 1:
- if (mTileEntity.getMetaTileEntity() == null) return null;
- ((GT_MetaTileEntity_BasicMachine)mTileEntity.getMetaTileEntity()).mItemTransfer = !((GT_MetaTileEntity_BasicMachine)mTileEntity.getMetaTileEntity()).mItemTransfer;
- return null;
- default:
- return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer);
- }
- }
-
- @Override
- public void detectAndSendChanges() {
- super.detectAndSendChanges();
- if (mTileEntity.isClientSide() || mTileEntity.getMetaTileEntity() == null) return;
-
- mFluidTransfer = ((GT_MetaTileEntity_BasicMachine)mTileEntity.getMetaTileEntity()).mFluidTransfer;
- mItemTransfer = ((GT_MetaTileEntity_BasicMachine)mTileEntity.getMetaTileEntity()).mItemTransfer;
- mStuttering = ((GT_MetaTileEntity_BasicMachine)mTileEntity.getMetaTileEntity()).mStuttering;
-
- Iterator var2 = this.crafters.iterator();
- while (var2.hasNext()) {
- ICrafting var1 = (ICrafting)var2.next();
- var1.sendProgressBarUpdate(this, 102, mFluidTransfer?1:0);
- var1.sendProgressBarUpdate(this, 103, mItemTransfer?1:0);
- var1.sendProgressBarUpdate(this, 104, mStuttering?1:0);
- }
- }
-
- @Override
- public void addCraftingToCrafters(ICrafting par1ICrafting) {
- super.addCraftingToCrafters(par1ICrafting);
- }
-
- @Override
- @SideOnly(Side.CLIENT)
- public void updateProgressBar(int par1, int par2) {
- super.updateProgressBar(par1, par2);
- switch (par1) {
- case 102: mFluidTransfer = (par2 != 0); break;
- case 103: mItemTransfer = (par2 != 0); break;
- case 104: mStuttering = (par2 != 0); break;
- }
- }
-
- @Override
- public int getSlotStartIndex() {
- return 3;
- }
-
- @Override
- public int getShiftClickStartIndex() {
- return 3;
- }
-
- @Override
- public int getSlotCount() {
- return getShiftClickSlotCount() + ((GT_MetaTileEntity_BasicMachine)mTileEntity.getMetaTileEntity()).mOutputItems.length + 2;
- }
-
- @Override
- public int getShiftClickSlotCount() {
- return ((GT_MetaTileEntity_BasicMachine)mTileEntity.getMetaTileEntity()).mInputSlotCount;
- }
-}
diff --git a/main/java/gregtech/api/gui/GT_Container_BasicTank.java b/main/java/gregtech/api/gui/GT_Container_BasicTank.java
deleted file mode 100644
index 7fe15f7474..0000000000
--- a/main/java/gregtech/api/gui/GT_Container_BasicTank.java
+++ /dev/null
@@ -1,70 +0,0 @@
-package gregtech.api.gui;
-
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicTank;
-import gregtech.common.tileentities.storage.GT_MetaTileEntity_QuantumChest;
-
-import java.util.Iterator;
-
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.inventory.ICrafting;
-import net.minecraft.inventory.Slot;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-
-/**
- * NEVER INCLUDE THIS FILE IN YOUR MOD!!!
- *
- * The Container I use for all my Basic Tanks
- */
-public class GT_Container_BasicTank extends GT_ContainerMetaTile_Machine {
-
- public GT_Container_BasicTank(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) {
- super(aInventoryPlayer, aTileEntity);
- }
-
- @Override
- public void addSlots(InventoryPlayer aInventoryPlayer) {
- addSlotToContainer(new Slot(mTileEntity, 0, 80, 17));
- addSlotToContainer(new GT_Slot_Output(mTileEntity, 1, 80, 53));
- addSlotToContainer(new GT_Slot_Render(mTileEntity, 2, 59, 42));
- }
-
- public int mContent = 0;
-
- @Override
- public void detectAndSendChanges() {
- super.detectAndSendChanges();
- if (mTileEntity.isClientSide() || mTileEntity.getMetaTileEntity() == null) return;
- if (((GT_MetaTileEntity_BasicTank)mTileEntity.getMetaTileEntity()).mFluid != null)
- mContent = ((GT_MetaTileEntity_BasicTank)mTileEntity.getMetaTileEntity()).mFluid.amount;
- else
- mContent = 0;
- Iterator var2 = this.crafters.iterator();
- while (var2.hasNext()) {
- ICrafting var1 = (ICrafting)var2.next();
- var1.sendProgressBarUpdate(this, 100, mContent & 65535);
- var1.sendProgressBarUpdate(this, 101, mContent >>> 16);
- }
- }
-
- @Override
- @SideOnly(Side.CLIENT)
- public void updateProgressBar(int par1, int par2) {
- super.updateProgressBar(par1, par2);
- switch (par1) {
- case 100: mContent = mContent & -65536 | par2; break;
- case 101: mContent = mContent & 65535 | par2 << 16; break;
- }
- }
-
- @Override
- public int getSlotCount() {
- return 2;
- }
-
- @Override
- public int getShiftClickSlotCount() {
- return 1;
- }
-}
diff --git a/main/java/gregtech/api/gui/GT_Container_MaintenanceHatch.java b/main/java/gregtech/api/gui/GT_Container_MaintenanceHatch.java
deleted file mode 100644
index 3f9846bb99..0000000000
--- a/main/java/gregtech/api/gui/GT_Container_MaintenanceHatch.java
+++ /dev/null
@@ -1,30 +0,0 @@
-package gregtech.api.gui;
-
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Maintenance;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.item.ItemStack;
-
-public class GT_Container_MaintenanceHatch extends GT_ContainerMetaTile_Machine {
-
- public GT_Container_MaintenanceHatch(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) {
- super(aInventoryPlayer, aTileEntity);
- }
-
- @Override
- public void addSlots(InventoryPlayer aInventoryPlayer) {
- addSlotToContainer(new GT_Slot_Holo(mTileEntity, 0, 80, 35, false, false, 1));
- }
-
- @Override
- public ItemStack slotClick(int aSlotIndex, int aMouseclick, int aShifthold, EntityPlayer aPlayer) {
- if (aSlotIndex != 0) return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer);
- ItemStack tStack = aPlayer.inventory.getItemStack();
- if (tStack != null) {
- ((GT_MetaTileEntity_Hatch_Maintenance)mTileEntity.getMetaTileEntity()).onToolClick(tStack, aPlayer);
- if (tStack.stackSize <= 0) aPlayer.inventory.setItemStack(null);
- }
- return null;
- }
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/gui/GT_Container_MultiMachine.java b/main/java/gregtech/api/gui/GT_Container_MultiMachine.java
deleted file mode 100644
index 289b783e25..0000000000
--- a/main/java/gregtech/api/gui/GT_Container_MultiMachine.java
+++ /dev/null
@@ -1,35 +0,0 @@
-package gregtech.api.gui;
-
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.inventory.Slot;
-
-/**
- * NEVER INCLUDE THIS FILE IN YOUR MOD!!!
- *
- * The Container I use for all my Basic Machines
- */
-public class GT_Container_MultiMachine extends GT_ContainerMetaTile_Machine {
- public GT_Container_MultiMachine(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) {
- super(aInventoryPlayer, aTileEntity);
- }
-
- public GT_Container_MultiMachine(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, boolean bindInventory) {
- super(aInventoryPlayer, aTileEntity, bindInventory);
- }
-
- @Override
- public void addSlots(InventoryPlayer aInventoryPlayer) {
- addSlotToContainer(new Slot(mTileEntity, 1, 152, 5));
- }
-
- @Override
- public int getSlotCount() {
- return 1;
- }
-
- @Override
- public int getShiftClickSlotCount() {
- return 1;
- }
-}
diff --git a/main/java/gregtech/api/gui/GT_GUIContainer.java b/main/java/gregtech/api/gui/GT_GUIContainer.java
deleted file mode 100644
index a92ca35666..0000000000
--- a/main/java/gregtech/api/gui/GT_GUIContainer.java
+++ /dev/null
@@ -1,67 +0,0 @@
-package gregtech.api.gui;
-
-import net.minecraft.client.gui.inventory.GuiContainer;
-import net.minecraft.client.renderer.Tessellator;
-import net.minecraft.inventory.Container;
-import net.minecraft.util.ResourceLocation;
-
-/**
- * NEVER INCLUDE THIS FILE IN YOUR MOD!!!
- *
- * Main GUI-Container-Class which basically contains the Code needed to prevent crashes from improperly Coded Items.
- */
-public class GT_GUIContainer extends GuiContainer {
-
- public boolean mCrashed = false;
-
- public ResourceLocation mGUIbackground;
-
- public String mGUIbackgroundPath;
-
- public int getLeft() {return guiLeft;}
- public int getTop() {return guiTop;}
-
- public GT_GUIContainer(Container aContainer, String aGUIbackground) {
- super(aContainer);
- mGUIbackground = new ResourceLocation(mGUIbackgroundPath = aGUIbackground);
- }
-
- @Override
- protected void drawGuiContainerForegroundLayer(int par1, int par2) {
- //
- }
-
- @Override
- protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) {
- mc.renderEngine.bindTexture(mGUIbackground);
- }
-
- @Override
- public void drawScreen(int par1, int par2, float par3) {
- try {
- super.drawScreen(par1, par2, par3);
- } catch(Throwable e) {
- try {
- Tessellator.instance.draw();
- } catch(Throwable f) {
- //
- }
- }
- }
- /*
- @Override
- protected void drawSlotInventory(Slot par1Slot) {
- try {
- super.drawSlotInventory(par1Slot);
- } catch(Throwable e) {
- try {
- Tessellator.instance.draw();
- } catch(Throwable f) {}
- if (!mCrashed) {
- GT_Log.out.println("Clientside Slot drawing Crash prevented. Seems one Itemstack causes Problems with negative Damage Values or the Wildcard Damage Value. This is absolutely NOT a Bug of the GregTech-Addon, so don't even think about reporting it to me, it's a Bug of the Mod, which belongs to the almost-crash-causing Item, so bug that Mods Author and not me! Did you hear it? NOT ME!!!");
- e.printStackTrace();
- mCrashed = true;
- }
- }
- }*/
-}
diff --git a/main/java/gregtech/api/gui/GT_GUIContainerMetaTile_Machine.java b/main/java/gregtech/api/gui/GT_GUIContainerMetaTile_Machine.java
deleted file mode 100644
index 0bfc774bfb..0000000000
--- a/main/java/gregtech/api/gui/GT_GUIContainerMetaTile_Machine.java
+++ /dev/null
@@ -1,39 +0,0 @@
-package gregtech.api.gui;
-
-import gregtech.api.GregTech_API;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.item.ItemDye;
-
-import org.lwjgl.opengl.GL11;
-
-/**
- * NEVER INCLUDE THIS FILE IN YOUR MOD!!!
- *
- * The GUI-Container I use for all my MetaTileEntities
- */
-public class GT_GUIContainerMetaTile_Machine extends GT_GUIContainer {
-
- public final GT_ContainerMetaTile_Machine mContainer;
-
- public GT_GUIContainerMetaTile_Machine(GT_ContainerMetaTile_Machine aContainer, String aGUIbackground) {
- super(aContainer, aGUIbackground);
- mContainer = aContainer;
- }
-
- public GT_GUIContainerMetaTile_Machine(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aGUIbackground) {
- this(new GT_ContainerMetaTile_Machine(aInventoryPlayer, aTileEntity), aGUIbackground);
- }
-
- @Override
- protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) {
- super.drawGuiContainerBackgroundLayer(par1, par2, par3);
- if (GregTech_API.sColoredGUI && mContainer != null && mContainer.mTileEntity != null) {
- int tColor = mContainer.mTileEntity.getColorization() & 15;
- if (tColor >= 0 && tColor < ItemDye.field_150922_c.length) {
- tColor = ItemDye.field_150922_c[tColor];
- GL11.glColor4f(((tColor >> 16) & 255) / 255.0F, ((tColor >> 8) & 255) / 255.0F, (tColor & 255) / 255.0F, 1.0F);
- } else GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
- } else GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
- }
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/gui/GT_GUIContainer_1by1.java b/main/java/gregtech/api/gui/GT_GUIContainer_1by1.java
deleted file mode 100644
index 2d4176ee84..0000000000
--- a/main/java/gregtech/api/gui/GT_GUIContainer_1by1.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package gregtech.api.gui;
-
-import static gregtech.api.enums.GT_Values.RES_PATH_GUI;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import net.minecraft.entity.player.InventoryPlayer;
-
-public class GT_GUIContainer_1by1 extends GT_GUIContainerMetaTile_Machine {
-
- private final String mName;
-
- public GT_GUIContainer_1by1(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName) {
- super(new GT_Container_1by1(aInventoryPlayer, aTileEntity), RES_PATH_GUI + "1by1.png");
- mName = aName;
- }
-
- @Override
- protected void drawGuiContainerForegroundLayer(int par1, int par2) {
- fontRendererObj.drawString(mName, 8, 4, 4210752);
- }
-
- @Override
- protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) {
- super.drawGuiContainerBackgroundLayer(par1, par2, par3);
- int x = (width - xSize) / 2;
- int y = (height - ySize) / 2;
- drawTexturedModalRect(x, y, 0, 0, xSize, ySize);
- }
-}
diff --git a/main/java/gregtech/api/gui/GT_GUIContainer_2by2.java b/main/java/gregtech/api/gui/GT_GUIContainer_2by2.java
deleted file mode 100644
index 3ad77d8a2b..0000000000
--- a/main/java/gregtech/api/gui/GT_GUIContainer_2by2.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package gregtech.api.gui;
-
-import static gregtech.api.enums.GT_Values.RES_PATH_GUI;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import net.minecraft.entity.player.InventoryPlayer;
-
-public class GT_GUIContainer_2by2 extends GT_GUIContainerMetaTile_Machine {
-
- private final String mName;
-
- public GT_GUIContainer_2by2(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName) {
- super(new GT_Container_2by2(aInventoryPlayer, aTileEntity), RES_PATH_GUI + "2by2.png");
- mName = aName;
- }
-
- @Override
- protected void drawGuiContainerForegroundLayer(int par1, int par2) {
- fontRendererObj.drawString(mName, 8, 4, 4210752);
- }
-
- @Override
- protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) {
- super.drawGuiContainerBackgroundLayer(par1, par2, par3);
- int x = (width - xSize) / 2;
- int y = (height - ySize) / 2;
- drawTexturedModalRect(x, y, 0, 0, xSize, ySize);
- }
-}
diff --git a/main/java/gregtech/api/gui/GT_GUIContainer_3by3.java b/main/java/gregtech/api/gui/GT_GUIContainer_3by3.java
deleted file mode 100644
index 4eb892d4ba..0000000000
--- a/main/java/gregtech/api/gui/GT_GUIContainer_3by3.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package gregtech.api.gui;
-
-import static gregtech.api.enums.GT_Values.RES_PATH_GUI;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import net.minecraft.entity.player.InventoryPlayer;
-
-public class GT_GUIContainer_3by3 extends GT_GUIContainerMetaTile_Machine {
-
- private final String mName;
-
- public GT_GUIContainer_3by3(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName) {
- super(new GT_Container_3by3(aInventoryPlayer, aTileEntity), RES_PATH_GUI + "3by3.png");
- mName = aName;
- }
-
- @Override
- protected void drawGuiContainerForegroundLayer(int par1, int par2) {
- fontRendererObj.drawString(mName, 8, 4, 4210752);
- }
-
- @Override
- protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) {
- super.drawGuiContainerBackgroundLayer(par1, par2, par3);
- int x = (width - xSize) / 2;
- int y = (height - ySize) / 2;
- drawTexturedModalRect(x, y, 0, 0, xSize, ySize);
- }
-}
diff --git a/main/java/gregtech/api/gui/GT_GUIContainer_4by4.java b/main/java/gregtech/api/gui/GT_GUIContainer_4by4.java
deleted file mode 100644
index e01e5f81d9..0000000000
--- a/main/java/gregtech/api/gui/GT_GUIContainer_4by4.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package gregtech.api.gui;
-
-import static gregtech.api.enums.GT_Values.RES_PATH_GUI;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import net.minecraft.entity.player.InventoryPlayer;
-
-public class GT_GUIContainer_4by4 extends GT_GUIContainerMetaTile_Machine {
-
- private final String mName;
-
- public GT_GUIContainer_4by4(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName) {
- super(new GT_Container_4by4(aInventoryPlayer, aTileEntity), RES_PATH_GUI + "4by4.png");
- mName = aName;
- }
-
- @Override
- protected void drawGuiContainerForegroundLayer(int par1, int par2) {
- fontRendererObj.drawString(mName, 8, 4, 4210752);
- }
-
- @Override
- protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) {
- super.drawGuiContainerBackgroundLayer(par1, par2, par3);
- int x = (width - xSize) / 2;
- int y = (height - ySize) / 2;
- drawTexturedModalRect(x, y, 0, 0, xSize, ySize);
- }
-}
diff --git a/main/java/gregtech/api/gui/GT_GUIContainer_BasicMachine.java b/main/java/gregtech/api/gui/GT_GUIContainer_BasicMachine.java
deleted file mode 100644
index 7898f3b635..0000000000
--- a/main/java/gregtech/api/gui/GT_GUIContainer_BasicMachine.java
+++ /dev/null
@@ -1,86 +0,0 @@
-package gregtech.api.gui;
-
-import static gregtech.api.enums.GT_Values.RES_PATH_GUI;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import net.minecraft.entity.player.InventoryPlayer;
-
-/**
- * NEVER INCLUDE THIS FILE IN YOUR MOD!!!
- *
- * The GUI-Container I use for all my Basic Machines
- *
- * As the NEI-RecipeTransferRect Handler can't handle one GUI-Class for all GUIs I needed to produce some dummy-classes which extend this class
- */
-public class GT_GUIContainer_BasicMachine extends GT_GUIContainerMetaTile_Machine {
-
- public final String mName, mNEI;
- public final byte mProgressBarDirection, mProgressBarAmount;
-
- public GT_GUIContainer_BasicMachine(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName, String aTextureFile, String aNEI) {
- this(aInventoryPlayer, aTileEntity, aName, aTextureFile, aNEI, (byte)0, (byte)1);
- }
-
- public GT_GUIContainer_BasicMachine(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName, String aTextureFile, String aNEI, byte aProgressBarDirection, byte aProgressBarAmount) {
- super(new GT_Container_BasicMachine(aInventoryPlayer, aTileEntity), RES_PATH_GUI + "basicmachines/" + aTextureFile);
- mProgressBarDirection = aProgressBarDirection;
- mProgressBarAmount = (byte)Math.max(1, aProgressBarAmount);
- mName = aName;
- mNEI = aNEI;
- }
-
- @Override
- protected void drawGuiContainerForegroundLayer(int par1, int par2) {
- fontRendererObj.drawString(mName, 8, 4, 4210752);
- drawTooltip(par1, par2);
- }
-
- private void drawTooltip(int x2, int y2){
- int xStart = (width - xSize) / 2;
- int yStart = (height - ySize) / 2;
- int x = x2 - xStart;
- int y = y2 - yStart +5;
- List<String> list = new ArrayList<String>();
- if (y >= 67 && y <= 84) {
- if (x >= 7 && x <= 24){
- list.add("Fluid Auto-Output");
- }
- if (x >= 25 && x <= 42){
- list.add("Item Auto-Output");
- }
- }
- if (!list.isEmpty())
- drawHoveringText(list, x, y, fontRendererObj);
- }
-
- @Override
- protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) {
- super.drawGuiContainerBackgroundLayer(par1, par2, par3);
- int x = (width - xSize) / 2;
- int y = (height - ySize) / 2;
- drawTexturedModalRect(x, y, 0, 0, xSize, ySize);
- if (mContainer != null) {
- if (((GT_Container_BasicMachine)mContainer).mFluidTransfer) drawTexturedModalRect(x + 7, y + 62, 176, 18, 18, 18);
- if (((GT_Container_BasicMachine)mContainer).mItemTransfer) drawTexturedModalRect(x + 25, y + 62, 176, 36, 18, 18);
- if (((GT_Container_BasicMachine)mContainer).mStuttering) drawTexturedModalRect(x + 79, y + 44, 176, 54, 18, 18);
-
- if (mContainer.mMaxProgressTime > 0) {
- int tSize = (mProgressBarDirection < 2 ? 20 : 18), tProgress = Math.max(1, Math.min(tSize * mProgressBarAmount, (mContainer.mProgressTime>0?1:0) + (mContainer.mProgressTime * tSize * mProgressBarAmount) / mContainer.mMaxProgressTime)) % (tSize+1);
-
- switch (mProgressBarDirection) { // yes, my OCD was mad at me before I did the Tabs.
- case 0: drawTexturedModalRect(x + 78 , y + 24 , 176 , 0 , tProgress , 18 ); break;
- case 1: drawTexturedModalRect(x + 78 + 20 - tProgress , y + 24 , 176 + 20 - tProgress , 0 , tProgress , 18 ); break;
- case 2: drawTexturedModalRect(x + 78 , y + 24 , 176 , 0 , 20 , tProgress ); break;
- case 3: drawTexturedModalRect(x + 78 , y + 24 + 18 - tProgress , 176 , 18 - tProgress , 20 , tProgress ); break;
- case 4: tProgress = 20 - tProgress; drawTexturedModalRect(x + 78 , y + 24 , 176 , 0 , tProgress , 18 ); break;
- case 5: tProgress = 20 - tProgress; drawTexturedModalRect(x + 78 + 20 - tProgress , y + 24 , 176 + 20 - tProgress , 0 , tProgress , 18 ); break;
- case 6: tProgress = 18 - tProgress; drawTexturedModalRect(x + 78 , y + 24 , 176 , 0 , 20 , tProgress ); break;
- case 7: tProgress = 18 - tProgress; drawTexturedModalRect(x + 78 , y + 24 + 18 - tProgress , 176 , 18 - tProgress , 20 , tProgress ); break;
- }
- }
- }
- }
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/gui/GT_GUIContainer_BasicTank.java b/main/java/gregtech/api/gui/GT_GUIContainer_BasicTank.java
deleted file mode 100644
index ae35067e42..0000000000
--- a/main/java/gregtech/api/gui/GT_GUIContainer_BasicTank.java
+++ /dev/null
@@ -1,35 +0,0 @@
-package gregtech.api.gui;
-
-import static gregtech.api.enums.GT_Values.RES_PATH_GUI;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.util.GT_Utility;
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.util.StatCollector;
-
-public class GT_GUIContainer_BasicTank extends GT_GUIContainerMetaTile_Machine {
-
- private final String mName;
-
- public GT_GUIContainer_BasicTank(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName) {
- super(new GT_Container_BasicTank(aInventoryPlayer, aTileEntity), RES_PATH_GUI + "BasicTank.png");
- mName = aName;
- }
-
- @Override
- protected void drawGuiContainerForegroundLayer(int par1, int par2) {
- fontRendererObj.drawString(StatCollector.translateToLocal("container.inventory"), 8, ySize - 96 + 2, 4210752);
- fontRendererObj.drawString(mName, 8, 6, 4210752);
- if (mContainer != null) {
- fontRendererObj.drawString("Liquid Amount", 10, 20, 16448255);
- fontRendererObj.drawString(GT_Utility.parseNumberToString(((GT_Container_BasicTank)mContainer).mContent), 10, 30, 16448255);
- }
- }
-
- @Override
- protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) {
- super.drawGuiContainerBackgroundLayer(par1, par2, par3);
- int x = (width - xSize) / 2;
- int y = (height - ySize) / 2;
- drawTexturedModalRect(x, y, 0, 0, xSize, ySize);
- }
-}
diff --git a/main/java/gregtech/api/gui/GT_GUIContainer_MaintenanceHatch.java b/main/java/gregtech/api/gui/GT_GUIContainer_MaintenanceHatch.java
deleted file mode 100644
index cc663ad258..0000000000
--- a/main/java/gregtech/api/gui/GT_GUIContainer_MaintenanceHatch.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package gregtech.api.gui;
-
-import static gregtech.api.enums.GT_Values.RES_PATH_GUI;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import net.minecraft.entity.player.InventoryPlayer;
-
-public class GT_GUIContainer_MaintenanceHatch extends GT_GUIContainerMetaTile_Machine {
-
- public GT_GUIContainer_MaintenanceHatch(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) {
- super(new GT_Container_MaintenanceHatch(aInventoryPlayer, aTileEntity), RES_PATH_GUI + "Maintenance.png");
- }
-
- @Override
- protected void drawGuiContainerForegroundLayer(int par1, int par2) {
- fontRendererObj.drawString("Maintenance Hatch", 8, 4, 4210752);
- fontRendererObj.drawString("Click with Tool to repair.", 8, 12, 4210752);
- }
-
- @Override
- protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) {
- super.drawGuiContainerBackgroundLayer(par1, par2, par3);
- int x = (width - xSize) / 2;
- int y = (height - ySize) / 2;
- drawTexturedModalRect(x, y, 0, 0, xSize, ySize);
- }
-}
diff --git a/main/java/gregtech/api/gui/GT_GUIContainer_MultiMachine.java b/main/java/gregtech/api/gui/GT_GUIContainer_MultiMachine.java
deleted file mode 100644
index b71b328293..0000000000
--- a/main/java/gregtech/api/gui/GT_GUIContainer_MultiMachine.java
+++ /dev/null
@@ -1,55 +0,0 @@
-package gregtech.api.gui;
-
-import static gregtech.api.enums.GT_Values.RES_PATH_GUI;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import net.minecraft.entity.player.InventoryPlayer;
-
-/**
- * NEVER INCLUDE THIS FILE IN YOUR MOD!!!
- *
- * The GUI-Container I use for all my Basic Machines
- *
- * As the NEI-RecipeTransferRect Handler can't handle one GUI-Class for all GUIs I needed to produce some dummy-classes which extend this class
- */
-public class GT_GUIContainer_MultiMachine extends GT_GUIContainerMetaTile_Machine {
-
- String mName = "";
-
- public GT_GUIContainer_MultiMachine(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName, String aTextureFile) {
- super(new GT_Container_MultiMachine(aInventoryPlayer, aTileEntity), RES_PATH_GUI + "multimachines/" + (aTextureFile==null?"MultiblockDisplay":aTextureFile));
- mName = aName;
- }
-
- @Override
- protected void drawGuiContainerForegroundLayer(int par1, int par2) {
- fontRendererObj.drawString(mName, 10, 8, 16448255);
-
- if (mContainer != null) {
- if ((((GT_Container_MultiMachine)mContainer).mDisplayErrorCode & 1) != 0) fontRendererObj.drawString("Pipe is loose.", 10, 16, 16448255);
- if ((((GT_Container_MultiMachine)mContainer).mDisplayErrorCode & 2) != 0) fontRendererObj.drawString("Screws are missing.", 10, 24, 16448255);
- if ((((GT_Container_MultiMachine)mContainer).mDisplayErrorCode & 4) != 0) fontRendererObj.drawString("Something is stuck.", 10, 32, 16448255);
- if ((((GT_Container_MultiMachine)mContainer).mDisplayErrorCode & 8) != 0) fontRendererObj.drawString("Platings are dented.", 10, 40, 16448255);
- if ((((GT_Container_MultiMachine)mContainer).mDisplayErrorCode & 16) != 0) fontRendererObj.drawString("Circuitry burned out.", 10, 48, 16448255);
- if ((((GT_Container_MultiMachine)mContainer).mDisplayErrorCode & 32) != 0) fontRendererObj.drawString("That doesn't belong there.", 10, 56, 16448255);
- if ((((GT_Container_MultiMachine)mContainer).mDisplayErrorCode & 64) != 0) fontRendererObj.drawString("Incomplete Structure.", 10, 64, 16448255);
-
- if (((GT_Container_MultiMachine)mContainer).mDisplayErrorCode == 0) {
- if (((GT_Container_MultiMachine)mContainer).mActive == 0) {
- fontRendererObj.drawString("Hit with Soft Hammer", 10, 16, 16448255);
- fontRendererObj.drawString("to (re-)start the Machine", 10, 24, 16448255);
- fontRendererObj.drawString("if it doesn't start.", 10, 32, 16448255);
- } else {
- fontRendererObj.drawString("Running perfectly.", 10, 16, 16448255);
- }
- }
- }
- }
-
- @Override
- protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) {
- super.drawGuiContainerBackgroundLayer(par1, par2, par3);
- int x = (width - xSize) / 2;
- int y = (height - ySize) / 2;
- drawTexturedModalRect(x, y, 0, 0, xSize, ySize);
- }
-}
diff --git a/main/java/gregtech/api/gui/GT_Slot_Armor.java b/main/java/gregtech/api/gui/GT_Slot_Armor.java
deleted file mode 100644
index fdd89bca38..0000000000
--- a/main/java/gregtech/api/gui/GT_Slot_Armor.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package gregtech.api.gui;
-
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.inventory.IInventory;
-import net.minecraft.inventory.Slot;
-import net.minecraft.item.ItemStack;
-
-public class GT_Slot_Armor extends Slot {
- final int mArmorType;
- final EntityPlayer mPlayer;
-
- public GT_Slot_Armor(IInventory par2IInventory, int par3, int par4, int par5, int par6, EntityPlayer aPlayer) {
- super(par2IInventory, par3, par4, par5);
- mArmorType = par6;
- mPlayer = aPlayer;
- }
-
- @Override
- public int getSlotStackLimit() {
- return 1;
- }
-
- @Override
- public boolean isItemValid(ItemStack aStack) {
- return aStack != null && aStack.getItem() != null && aStack.getItem().isValidArmor(aStack, mArmorType, mPlayer);
- }
-}
diff --git a/main/java/gregtech/api/gui/GT_Slot_DataOrb.java b/main/java/gregtech/api/gui/GT_Slot_DataOrb.java
deleted file mode 100644
index bd247148f3..0000000000
--- a/main/java/gregtech/api/gui/GT_Slot_DataOrb.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package gregtech.api.gui;
-
-import gregtech.api.enums.ItemList;
-import net.minecraft.inventory.IInventory;
-import net.minecraft.inventory.Slot;
-import net.minecraft.item.ItemStack;
-
-public class GT_Slot_DataOrb extends Slot {
- public GT_Slot_DataOrb(IInventory par1iInventory, int par2, int par3, int par4) {
- super(par1iInventory, par2, par3, par4);
- }
-
- @Override
- public boolean isItemValid(ItemStack aStack) {
- return ItemList.Tool_DataOrb.isStackEqual(aStack, false, true);
- }
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/gui/GT_Slot_Holo.java b/main/java/gregtech/api/gui/GT_Slot_Holo.java
deleted file mode 100644
index 87bb9c51dc..0000000000
--- a/main/java/gregtech/api/gui/GT_Slot_Holo.java
+++ /dev/null
@@ -1,46 +0,0 @@
-package gregtech.api.gui;
-
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.inventory.IInventory;
-import net.minecraft.inventory.Slot;
-import net.minecraft.item.ItemStack;
-
-public class GT_Slot_Holo extends Slot {
- public final int mSlotIndex;
- public boolean mCanInsertItem, mCanStackItem;
- public int mMaxStacksize = 127;
-
- public GT_Slot_Holo(IInventory par1iInventory, int par2, int par3, int par4, boolean aCanInsertItem, boolean aCanStackItem, int aMaxStacksize) {
- super(par1iInventory, par2, par3, par4);
- mCanInsertItem = aCanInsertItem;
- mCanStackItem = aCanStackItem;
- mMaxStacksize = aMaxStacksize;
- mSlotIndex = par2;
- }
-
- @Override
- public boolean isItemValid(ItemStack par1ItemStack) {
- return mCanInsertItem;
- }
-
- @Override
- public int getSlotStackLimit() {
- return mMaxStacksize;
- }
-
- @Override
- public boolean getHasStack() {
- return false;
- }
-
- @Override
- public ItemStack decrStackSize(int par1) {
- if (!mCanStackItem) return null;
- return super.decrStackSize(par1);
- }
-
- @Override
- public boolean canTakeStack(EntityPlayer par1EntityPlayer) {
- return false;
- }
-}
diff --git a/main/java/gregtech/api/gui/GT_Slot_Output.java b/main/java/gregtech/api/gui/GT_Slot_Output.java
deleted file mode 100644
index 3c91380d16..0000000000
--- a/main/java/gregtech/api/gui/GT_Slot_Output.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package gregtech.api.gui;
-
-import net.minecraft.inventory.IInventory;
-import net.minecraft.inventory.Slot;
-import net.minecraft.item.ItemStack;
-
-public class GT_Slot_Output extends Slot {
- public GT_Slot_Output(IInventory par1iInventory, int par2, int par3, int par4) {
- super(par1iInventory, par2, par3, par4);
- }
-
- @Override
- public boolean isItemValid(ItemStack par1ItemStack) {
- return false;
- }
-}
diff --git a/main/java/gregtech/api/gui/GT_Slot_Render.java b/main/java/gregtech/api/gui/GT_Slot_Render.java
deleted file mode 100644
index 15f4c339ae..0000000000
--- a/main/java/gregtech/api/gui/GT_Slot_Render.java
+++ /dev/null
@@ -1,22 +0,0 @@
-package gregtech.api.gui;
-
-import net.minecraft.inventory.IInventory;
-import net.minecraft.item.ItemStack;
-import net.minecraft.tileentity.TileEntity;
-
-public class GT_Slot_Render extends GT_Slot_Holo {
- public GT_Slot_Render(IInventory par1iInventory, int par2, int par3, int par4) {
- super(par1iInventory, par2, par3, par4, false, false, 0);
- }
-
- /**
- * NEI has a nice and "useful" Delete-All Function, which would delete the Content of this Slot. This is here to prevent that.
- */
- @Override
- public void putStack(ItemStack aStack) {
- if (inventory instanceof TileEntity && ((TileEntity)inventory).getWorldObj().isRemote) {
- inventory.setInventorySlotContents(getSlotIndex(), aStack);
- }
- onSlotChanged();
- }
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/interfaces/IColorModulationContainer.java b/main/java/gregtech/api/interfaces/IColorModulationContainer.java
deleted file mode 100644
index b1151cf808..0000000000
--- a/main/java/gregtech/api/interfaces/IColorModulationContainer.java
+++ /dev/null
@@ -1,5 +0,0 @@
-package gregtech.api.interfaces;
-
-public interface IColorModulationContainer {
- public short[] getRGBA();
-}
diff --git a/main/java/gregtech/api/interfaces/ICondition.java b/main/java/gregtech/api/interfaces/ICondition.java
deleted file mode 100644
index 507315ee91..0000000000
--- a/main/java/gregtech/api/interfaces/ICondition.java
+++ /dev/null
@@ -1,104 +0,0 @@
-package gregtech.api.interfaces;
-
-public interface ICondition<O> {
- public boolean isTrue(O aObject);
-
- // Utility Classes for adding relations between Conditions.
-
- public static class Not<O> implements ICondition<O> {
- private final ICondition<O> mCondition;
-
- public Not(ICondition<O> aCondition) {
- mCondition = aCondition;
- }
-
- @Override
- public boolean isTrue(O aObject) {
- return !mCondition.isTrue(aObject);
- }
- }
-
- public static class Or<O> implements ICondition<O> {
- private final ICondition<O>[] mConditions;
-
- public Or(ICondition<O>... aConditions) {
- mConditions = aConditions;
- }
-
- @Override
- public boolean isTrue(O aObject) {
- for (ICondition<O> tCondition : mConditions) if (tCondition.isTrue(aObject)) return true;
- return false;
- }
- }
-
- public static class Nor<O> implements ICondition<O> {
- private final ICondition<O>[] mConditions;
-
- public Nor(ICondition<O>... aConditions) {
- mConditions = aConditions;
- }
-
- @Override
- public boolean isTrue(O aObject) {
- for (ICondition<O> tCondition : mConditions) if (tCondition.isTrue(aObject)) return false;
- return true;
- }
- }
-
- public static class And<O> implements ICondition<O> {
- private final ICondition<O>[] mConditions;
-
- public And(ICondition<O>... aConditions) {
- mConditions = aConditions;
- }
-
- @Override
- public boolean isTrue(O aObject) {
- for (ICondition<O> tCondition : mConditions) if (!tCondition.isTrue(aObject)) return false;
- return true;
- }
- }
-
- public static class Nand<O> implements ICondition<O> {
- private final ICondition<O>[] mConditions;
-
- public Nand(ICondition<O>... aConditions) {
- mConditions = aConditions;
- }
-
- @Override
- public boolean isTrue(O aObject) {
- for (ICondition<O> tCondition : mConditions) if (!tCondition.isTrue(aObject)) return true;
- return false;
- }
- }
-
- public static class Xor<O> implements ICondition<O> {
- private final ICondition<O> mCondition1, mCondition2;
-
- public Xor(ICondition<O> aCondition1, ICondition<O> aCondition2) {
- mCondition1 = aCondition1;
- mCondition2 = aCondition2;
- }
-
- @Override
- public boolean isTrue(O aObject) {
- return mCondition1.isTrue(aObject) != mCondition2.isTrue(aObject);
- }
- }
-
- public static class Equal<O> implements ICondition<O> {
- private final ICondition<O> mCondition1, mCondition2;
-
- public Equal(ICondition<O> aCondition1, ICondition<O> aCondition2) {
- mCondition1 = aCondition1;
- mCondition2 = aCondition2;
- }
-
- @Override
- public boolean isTrue(O aObject) {
- return mCondition1.isTrue(aObject) == mCondition2.isTrue(aObject);
- }
- }
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/interfaces/IDamagableItem.java b/main/java/gregtech/api/interfaces/IDamagableItem.java
deleted file mode 100644
index f47c65f545..0000000000
--- a/main/java/gregtech/api/interfaces/IDamagableItem.java
+++ /dev/null
@@ -1,7 +0,0 @@
-package gregtech.api.interfaces;
-
-import net.minecraft.item.ItemStack;
-
-public interface IDamagableItem {
- public boolean doDamageToItem(ItemStack aStack, int aVanillaDamage);
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/interfaces/IDebugableBlock.java b/main/java/gregtech/api/interfaces/IDebugableBlock.java
deleted file mode 100644
index ce95982018..0000000000
--- a/main/java/gregtech/api/interfaces/IDebugableBlock.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package gregtech.api.interfaces;
-
-import java.util.ArrayList;
-
-import net.minecraft.entity.player.EntityPlayer;
-
-/**
- * You are allowed to include this File in your Download, as i will not change it.
- */
-public interface IDebugableBlock {
- /**
- * Returns a Debug Message, for a generic DebugItem
- * Blocks have to implement this interface NOT TileEntities!
- * @param aPlayer the Player, who rightclicked with his Debug Item
- * @param aX Block-Coordinate
- * @param aY Block-Coordinate
- * @param aZ Block-Coordinate
- * @param aLogLevel the Log Level of the Debug Item.
- * 0 = Obvious
- * 1 = Visible for the regular Scanner
- * 2 = Only visible to more advanced Scanners
- * 3 = Debug ONLY
- * @return a String-Array containing the DebugInfo, every Index is a separate line (0 = first Line)
- */
- public ArrayList<String> getDebugInfo(EntityPlayer aPlayer, int aX, int aY, int aZ, int aLogLevel);
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/interfaces/IDescribable.java b/main/java/gregtech/api/interfaces/IDescribable.java
deleted file mode 100644
index 7ccf1a6627..0000000000
--- a/main/java/gregtech/api/interfaces/IDescribable.java
+++ /dev/null
@@ -1,11 +0,0 @@
-package gregtech.api.interfaces;
-
-/**
- * To get simple things like a ToolTip Description
- */
-public interface IDescribable {
- /**
- * The Tooltip Text
- */
- public String[] getDescription();
-}
diff --git a/main/java/gregtech/api/interfaces/IFoodStat.java b/main/java/gregtech/api/interfaces/IFoodStat.java
deleted file mode 100644
index cb01e102c6..0000000000
--- a/main/java/gregtech/api/interfaces/IFoodStat.java
+++ /dev/null
@@ -1,21 +0,0 @@
-package gregtech.api.interfaces;
-
-import gregtech.api.items.GT_MetaBase_Item;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.EnumAction;
-import net.minecraft.item.ItemStack;
-
-public interface IFoodStat {
- /** Warning the "aPlayer" Parameter may be null! */
- public int getFoodLevel(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer);
- /** Warning the "aPlayer" Parameter may be null! */
- public float getSaturation(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer);
- /** Warning the "aPlayer" Parameter may be null! */
- public boolean alwaysEdible(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer);
- /** Warning the "aPlayer" Parameter may be null! */
- public boolean isRotten(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer);
- /** Warning the "aPlayer" Parameter may be null! */
- public EnumAction getFoodAction(GT_MetaBase_Item aItem, ItemStack aStack);
-
- public void onEaten(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer);
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/interfaces/IIconContainer.java b/main/java/gregtech/api/interfaces/IIconContainer.java
deleted file mode 100644
index dc9a845f06..0000000000
--- a/main/java/gregtech/api/interfaces/IIconContainer.java
+++ /dev/null
@@ -1,21 +0,0 @@
-package gregtech.api.interfaces;
-
-import net.minecraft.util.IIcon;
-import net.minecraft.util.ResourceLocation;
-
-public interface IIconContainer {
- /**
- * @return A regular Icon.
- */
- public IIcon getIcon();
-
- /**
- * @return Icon of the Overlay (or null if there is no Icon)
- */
- public IIcon getOverlayIcon();
-
- /**
- * @return the Default Texture File for this Icon.
- */
- public ResourceLocation getTextureFile();
-}
diff --git a/main/java/gregtech/api/interfaces/IItemBehaviour.java b/main/java/gregtech/api/interfaces/IItemBehaviour.java
deleted file mode 100644
index 1f28b6a696..0000000000
--- a/main/java/gregtech/api/interfaces/IItemBehaviour.java
+++ /dev/null
@@ -1,30 +0,0 @@
-package gregtech.api.interfaces;
-
-import gregtech.api.enums.SubTag;
-import gregtech.api.items.GT_MetaBase_Item;
-
-import java.util.List;
-
-import net.minecraft.dispenser.IBlockSource;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.entity.projectile.EntityArrow;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.world.World;
-
-public interface IItemBehaviour<E extends Item> {
- public boolean onLeftClickEntity(E aItem, ItemStack aStack, EntityPlayer aPlayer, Entity aEntity);
- public boolean onItemUse(E aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ);
- public boolean onItemUseFirst(E aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ);
- public ItemStack onItemRightClick(E aItem, ItemStack aStack, World aWorld, EntityPlayer aPlayer);
- public List<String> getAdditionalToolTips(E aItem, List<String> aList, ItemStack aStack);
- public void onUpdate(E aItem, ItemStack aStack, World aWorld, Entity aPlayer, int aTimer, boolean aIsInHand);
- public boolean isItemStackUsable(E aItem, ItemStack aStack);
- public boolean canDispense(E aItem, IBlockSource aSource, ItemStack aStack);
- public ItemStack onDispense(E aItem, IBlockSource aSource, ItemStack aStack);
- public boolean hasProjectile(GT_MetaBase_Item aItem, SubTag aProjectileType, ItemStack aStack);
- public EntityArrow getProjectile(E aItem, SubTag aProjectileType, ItemStack aStack, World aWorld, double aX, double aY, double aZ);
- public EntityArrow getProjectile(E aItem, SubTag aProjectileType, ItemStack aStack, World aWorld, EntityLivingBase aEntity, float aSpeed);
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/interfaces/IItemContainer.java b/main/java/gregtech/api/interfaces/IItemContainer.java
deleted file mode 100644
index e61553ce7d..0000000000
--- a/main/java/gregtech/api/interfaces/IItemContainer.java
+++ /dev/null
@@ -1,24 +0,0 @@
-package gregtech.api.interfaces;
-
-import net.minecraft.block.Block;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-
-public interface IItemContainer {
- public Item getItem();
- public Block getBlock();
- public boolean isStackEqual(Object aStack);
- public boolean isStackEqual(Object aStack, boolean aWildcard, boolean aIgnoreNBT);
- public ItemStack get(long aAmount, Object... aReplacements);
- public ItemStack getWildcard(long aAmount, Object... aReplacements);
- public ItemStack getUndamaged(long aAmount, Object... aReplacements);
- public ItemStack getAlmostBroken(long aAmount, Object... aReplacements);
- public ItemStack getWithDamage(long aAmount, long aMetaValue, Object... aReplacements);
- public IItemContainer set(Item aItem);
- public IItemContainer set(ItemStack aStack);
- public IItemContainer registerOre(Object... aOreNames);
- public IItemContainer registerWildcardAsOre(Object... aOreNames);
- public ItemStack getWithCharge(long aAmount, int aEnergy, Object... aReplacements);
- public ItemStack getWithName(long aAmount, String aDisplayName, Object... aReplacements);
- public boolean hasBeenSet();
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/interfaces/IOreRecipeRegistrator.java b/main/java/gregtech/api/interfaces/IOreRecipeRegistrator.java
deleted file mode 100644
index 4535c4d6c8..0000000000
--- a/main/java/gregtech/api/interfaces/IOreRecipeRegistrator.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package gregtech.api.interfaces;
-
-import gregtech.api.enums.Materials;
-import gregtech.api.enums.OrePrefixes;
-import net.minecraft.item.ItemStack;
-
-public interface IOreRecipeRegistrator {
- /**
- * Contains a Code Fragment, used in the OrePrefix to register Recipes. Better than using a switch/case, like I did before.
- * @param aPrefix always != null
- * @param aMaterial always != null, and can be == _NULL if the Prefix is Self Referencing or not Material based!
- * @param aStack always != null
- */
- public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack);
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/interfaces/IProjectileItem.java b/main/java/gregtech/api/interfaces/IProjectileItem.java
deleted file mode 100644
index 0b06a65373..0000000000
--- a/main/java/gregtech/api/interfaces/IProjectileItem.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package gregtech.api.interfaces;
-
-import gregtech.api.enums.SubTag;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.entity.projectile.EntityArrow;
-import net.minecraft.item.ItemStack;
-import net.minecraft.world.World;
-
-public interface IProjectileItem {
- /** @return if this Item has an Arrow Entity */
- public boolean hasProjectile(SubTag aProjectileType, ItemStack aStack);
- /** @return an Arrow Entity to be spawned. If null then this is not an Arrow. Note: Other Projectiles still extend EntityArrow */
- public EntityArrow getProjectile(SubTag aProjectileType, ItemStack aStack, World aWorld, double aX, double aY, double aZ);
- /** @return an Arrow Entity to be spawned. If null then this is not an Arrow. Note: Other Projectiles still extend EntityArrow */
- public EntityArrow getProjectile(SubTag aProjectileType, ItemStack aStack, World aWorld, EntityLivingBase aEntity, float aSpeed);
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/interfaces/IRedstoneCircuitBlock.java b/main/java/gregtech/api/interfaces/IRedstoneCircuitBlock.java
deleted file mode 100644
index 13c63b7555..0000000000
--- a/main/java/gregtech/api/interfaces/IRedstoneCircuitBlock.java
+++ /dev/null
@@ -1,66 +0,0 @@
-package gregtech.api.interfaces;
-
-import gregtech.api.interfaces.tileentity.ICoverable;
-import gregtech.api.util.GT_CoverBehavior;
-import net.minecraft.block.Block;
-import net.minecraft.tileentity.TileEntity;
-
-/**
- * Implemented by the MetaTileEntity of the Redstone Circuit Block
- */
-public interface IRedstoneCircuitBlock {
- /**
- * The Output Direction the Circuit Block is Facing
- */
- public byte getOutputFacing();
-
- /**
- * sets Output Redstone State at Side
- */
- public boolean setRedstone(byte aStrength, byte aSide);
-
- /**
- * returns Output Redstone State at Side
- * Note that setRedstone checks if there is a Difference between the old and the new Setting before consuming any Energy
- */
- public byte getOutputRedstone(byte aSide);
-
- /**
- * returns Input Redstone Signal at Side
- */
- public byte getInputRedstone(byte aSide);
-
- /**
- * If this Side is Covered up and therefor not doing any Redstone
- */
- public GT_CoverBehavior getCover(byte aSide);
-
- public int getCoverID(byte aSide);
-
- public int getCoverVariable(byte aSide);
-
- /**
- * returns whatever Block-ID is adjacent to the Redstone Circuit Block
- */
- public Block getBlockAtSide(byte aSide);
-
- /**
- * returns whatever Meta-Value is adjacent to the Redstone Circuit Block
- */
- public byte getMetaIDAtSide(byte aSide);
-
- /**
- * returns whatever TileEntity is adjacent to the Redstone Circuit Block
- */
- public TileEntity getTileEntityAtSide(byte aSide);
-
- /**
- * returns whatever TileEntity is used by the Redstone Circuit Block
- */
- public ICoverable getOwnTileEntity();
-
- /**
- * returns worldObj.rand.nextInt(aRange)
- */
- public int getRandom(int aRange);
-}
diff --git a/main/java/gregtech/api/interfaces/ISubTagContainer.java b/main/java/gregtech/api/interfaces/ISubTagContainer.java
deleted file mode 100644
index ae7d59ec1d..0000000000
--- a/main/java/gregtech/api/interfaces/ISubTagContainer.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package gregtech.api.interfaces;
-
-import gregtech.api.enums.SubTag;
-
-public interface ISubTagContainer {
- /**
- * @return if the Tag is inside the List.
- */
- public boolean contains(SubTag aTag);
-
- /**
- * @return The ISubTagContainer you called this Function on, for convenience.
- */
- public ISubTagContainer add(SubTag... aTags);
-
- /**
- * @return if the Tag was there before it has been removed.
- */
- public boolean remove(SubTag aTag);
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/interfaces/ITexture.java b/main/java/gregtech/api/interfaces/ITexture.java
deleted file mode 100644
index 534a738c45..0000000000
--- a/main/java/gregtech/api/interfaces/ITexture.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package gregtech.api.interfaces;
-
-import net.minecraft.block.Block;
-import net.minecraft.client.renderer.RenderBlocks;
-
-public interface ITexture {
- public void renderXPos(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ);
- public void renderXNeg(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ);
- public void renderYPos(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ);
- public void renderYNeg(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ);
- public void renderZPos(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ);
- public void renderZNeg(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ);
-
- public boolean isValidTexture();
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/interfaces/IToolStats.java b/main/java/gregtech/api/interfaces/IToolStats.java
deleted file mode 100644
index 9f894bfac8..0000000000
--- a/main/java/gregtech/api/interfaces/IToolStats.java
+++ /dev/null
@@ -1,147 +0,0 @@
-package gregtech.api.interfaces;
-
-import gregtech.api.items.GT_MetaGenerated_Tool;
-
-import java.util.List;
-
-import net.minecraft.block.Block;
-import net.minecraft.enchantment.Enchantment;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.DamageSource;
-import net.minecraftforge.event.world.BlockEvent;
-
-/**
- * The Stats for GT Tools. Not including any Material Modifiers.
- *
- * And this is supposed to not have any ItemStack Parameters as these are generic Stats.
- */
-public interface IToolStats {
- /**
- * Called when aPlayer crafts this Tool
- */
- public void onToolCrafted(ItemStack aStack, EntityPlayer aPlayer);
-
- /**
- * Called when this gets added to a Tool Item
- */
- public void onStatsAddedToTool(GT_MetaGenerated_Tool aItem, int aID);
-
- /**
- * @return Damage the Tool receives when breaking a Block. 100 is one Damage Point (or 100 EU).
- */
- public int getToolDamagePerBlockBreak();
-
- /**
- * @return Damage the Tool receives when converting the drops of a Block. 100 is one Damage Point (or 100 EU).
- */
- public int getToolDamagePerDropConversion();
-
- /**
- * @return Damage the Tool receives when being used as Container Item. 100 is one use, however it is usually 8 times more than normal.
- */
- public int getToolDamagePerContainerCraft();
-
- /**
- * @return Damage the Tool receives when being used as Weapon, 200 is the normal Value, 100 for actual Weapons.
- */
- public int getToolDamagePerEntityAttack();
-
- /**
- * @return Basic Quality of the Tool, 0 is normal. If increased, it will increase the general quality of all Tools of this Type. Decreasing is also possible.
- */
- public int getBaseQuality();
-
- /**
- * @return The Damage Bonus for this Type of Tool against Mobs. 1.0F is normal punch.
- */
- public float getBaseDamage();
-
- /**
- * @return This gets the Hurt Resistance time for Entities getting hit. (always does 1 as minimum)
- */
- public int getHurtResistanceTime(int aOriginalHurtResistance, Entity aEntity);
-
- /**
- * @return This is a multiplier for the Tool Speed. 1.0F = no special Speed.
- */
- public float getSpeedMultiplier();
-
- /**
- * @return This is a multiplier for the Tool Speed. 1.0F = no special Durability.
- */
- public float getMaxDurabilityMultiplier();
-
- public DamageSource getDamageSource(EntityLivingBase aPlayer, Entity aEntity);
-
- public String getMiningSound();
- public String getCraftingSound();
- public String getEntityHitSound();
- public String getBreakingSound();
-
- public Enchantment[] getEnchantments(ItemStack aStack);
- public int[] getEnchantmentLevels(ItemStack aStack);
-
- /**
- * @return If this Tool can be used for blocking Damage like a Sword.
- */
- public boolean canBlock();
-
- /**
- * @return If this Tool can be used as an RC Crowbar.
- */
- public boolean isCrowbar();
-
- /**
- * @return If this Tool can be used as an RC Crowbar.
- */
- public boolean isGrafter();
-
- /**
- * @return If this Tool can be used as Weapon i.e. if that is the main purpose.
- */
- public boolean isWeapon();
-
- /**
- * @return If this Tool is a Ranged Weapon. Return false at isWeapon unless you have a Blade attached to your Bow/Gun or something
- */
- public boolean isRangedWeapon();
-
- /**
- * @return If this Tool can be used as Weapon i.e. if that is the main purpose.
- */
- public boolean isMiningTool();
-
- /**
- * aBlock.getHarvestTool(aMetaData) can return the following Values for example.
- * "axe", "pickaxe", "sword", "shovel", "hoe", "grafter", "saw", "wrench", "crowbar", "file", "hammer", "plow", "plunger", "scoop", "screwdriver", "sense", "scythe", "softhammer", "cutter", "plasmatorch"
- * @return If this is a minable Block. Tool Quality checks (like Diamond Tier or something) are separate from this check.
- */
- public boolean isMinableBlock(Block aBlock, byte aMetaData);
-
- /**
- * This lets you modify the Drop List, when this type of Tool has been used.
- * @return the Amount of modified Items.
- */
- public int convertBlockDrops(List<ItemStack> aDrops, ItemStack aStack, EntityPlayer aPlayer, Block aBlock, int aX, int aY, int aZ, byte aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent);
-
- /**
- * @return Returns a broken Version of the Item.
- */
- public ItemStack getBrokenItem(ItemStack aStack);
-
- /**
- * @return the Damage actually done to the Mob.
- */
- public float getNormalDamageAgainstEntity(float aOriginalDamage, Entity aEntity, ItemStack aStack, EntityPlayer aPlayer);
-
- /**
- * @return the Damage actually done to the Mob.
- */
- public float getMagicDamageAgainstEntity(float aOriginalDamage, Entity aEntity, ItemStack aStack, EntityPlayer aPlayer);
-
- public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack);
- public short[] getRGBa(boolean aIsToolHead, ItemStack aStack);
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/interfaces/internal/IBCTileEntity.java b/main/java/gregtech/api/interfaces/internal/IBCTileEntity.java
deleted file mode 100644
index 3d471731ff..0000000000
--- a/main/java/gregtech/api/interfaces/internal/IBCTileEntity.java
+++ /dev/null
@@ -1,8 +0,0 @@
-package gregtech.api.interfaces.internal;
-
-/**
- * A simple compound Interface for generic BuildCraft Code.
- */
-public interface IBCTileEntity /*extends IPowerReceptor*/ {
- //
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/interfaces/internal/IGT_CraftingRecipe.java b/main/java/gregtech/api/interfaces/internal/IGT_CraftingRecipe.java
deleted file mode 100644
index a886cf67ac..0000000000
--- a/main/java/gregtech/api/interfaces/internal/IGT_CraftingRecipe.java
+++ /dev/null
@@ -1,7 +0,0 @@
-package gregtech.api.interfaces.internal;
-
-import net.minecraft.item.crafting.IRecipe;
-
-public interface IGT_CraftingRecipe extends IRecipe {
- public boolean isRemovable();
-}
diff --git a/main/java/gregtech/api/interfaces/internal/IGT_Mod.java b/main/java/gregtech/api/interfaces/internal/IGT_Mod.java
deleted file mode 100644
index f64d120ec8..0000000000
--- a/main/java/gregtech/api/interfaces/internal/IGT_Mod.java
+++ /dev/null
@@ -1,34 +0,0 @@
-package gregtech.api.interfaces.internal;
-
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.world.World;
-
-/**
- * Interface used by the Mods Main Class to reference to internals.
- *
- * Don't even think about including this File in your Mod.
- */
-public interface IGT_Mod {
- /** This means that Server specific Basefiles are definitely existing! Not if the World is actually server side or not! */
- public boolean isServerSide();
- /** This means that Client specific Basefiles are definitely existing! Not if the World is actually client side or not! */
- public boolean isClientSide();
- /** This means that Bukkit specific Basefiles are definitely existing! Not if the World is actually bukkit server or not! */
- public boolean isBukkitSide();
- /** works only ClientSide otherwise returns null */
- public EntityPlayer getThePlayer();
-
- //---------- Internal Usage Only ----------
-
- /**
- * works only ClientSide otherwise returns 0
- * @return the Index of the added Armor
- */
- public int addArmor(String aArmorPrefix);
-
- /**
- * Plays the Sonictron Sound for the ItemStack on the Client Side
- */
- public void doSonictronSound(ItemStack aStack, World aWorld, double aX, double aY, double aZ);
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/interfaces/internal/IGT_RecipeAdder.java b/main/java/gregtech/api/interfaces/internal/IGT_RecipeAdder.java
deleted file mode 100644
index ce72d93374..0000000000
--- a/main/java/gregtech/api/interfaces/internal/IGT_RecipeAdder.java
+++ /dev/null
@@ -1,412 +0,0 @@
-package gregtech.api.interfaces.internal;
-
-import net.minecraft.item.ItemStack;
-import net.minecraftforge.fluids.Fluid;
-import net.minecraftforge.fluids.FluidStack;
-
-public interface IGT_RecipeAdder {
- /**
- * Adds a FusionreactorRecipe
- * Does not work anymore!
- */
- @Deprecated
- public boolean addFusionReactorRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput1, int aFusionDurationInTicks, int aFusionEnergyPerTick, int aEnergyNeededForStartingFusion);
-
- /**
- * Adds a FusionreactorRecipe
- * @param aInput1 = first Input (not null, and respects StackSize)
- * @param aInput2 = second Input (not null, and respects StackSize)
- * @param aOutput = Output of the Fusion (can be null, and respects StackSize)
- * @param aFusionDurationInTicks = How many ticks the Fusion lasts (must be > 0)
- * @param aFusionEnergyPerTick = The EU generated per Tick (can even be negative!)
- * @param aEnergyNeededForStartingFusion = EU needed for heating the Reactor up (must be >= 0)
- * @return true if the Recipe got added, otherwise false.
- */
- public boolean addFusionReactorRecipe(FluidStack aInput1, FluidStack aInput2, FluidStack aOutput1, int aFusionDurationInTicks, int aFusionEnergyPerTick, int aEnergyNeededForStartingFusion);
-
- /**
- * Adds a Centrifuge Recipe
- * @param aInput1 must be != null
- * @param aCellInput this is for the needed Cells, > 0 for Tincellcount, < 0 for negative Fuelcancount, == 0 for nothing
- * @param aOutput1 must be != null
- * @param aOutput2 can be null
- * @param aOutput3 can be null
- * @param aOutput4 can be null
- * @param aDuration must be > 0
- */
- public boolean addCentrifugeRecipe(ItemStack aInput1, int aInput2, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, ItemStack aOutput4, ItemStack aOutput5, ItemStack aOutput6, int aDuration);
-
- /**
- * Adds a Centrifuge Recipe
- * @param aInput1 must be != null
- * @param aOutput1 must be != null
- * @param aOutput2 can be null
- * @param aOutput3 can be null
- * @param aOutput4 can be null
- * @param aDuration must be > 0
- */
- public boolean addCentrifugeRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, ItemStack aOutput4, ItemStack aOutput5, ItemStack aOutput6, int[] aChances, int aDuration, int aEUt);
-
- /**
- * Adds a Electrolyzer Recipe
- * @param aInput1 must be != null
- * @param aCellInput this is for the needed Cells, > 0 for Tincellcount, < 0 for negative Fuelcancount, == 0 for nothing
- * @param aOutput1 must be != null
- * @param aOutput2 can be null
- * @param aOutput3 can be null
- * @param aOutput4 can be null
- * @param aDuration must be > 0
- * @param aEUt should be > 0
- */
- public boolean addElectrolyzerRecipe(ItemStack aInput1, int aInput2, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, ItemStack aOutput4, ItemStack aOutput5, ItemStack aOutput6, int aDuration, int aEUt);
-
- /**
- * Adds a Electrolyzer Recipe
- * @param aInput1 must be != null
- * @param aCellInput this is for the needed Cells, > 0 for Tincellcount, < 0 for negative Fuelcancount, == 0 for nothing
- * @param aOutput1 must be != null
- * @param aOutput2 can be null
- * @param aOutput3 can be null
- * @param aOutput4 can be null
- * @param aDuration must be > 0
- * @param aEUt should be > 0
- */
- public boolean addElectrolyzerRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, ItemStack aOutput4, ItemStack aOutput5, ItemStack aOutput6, int[] aChances, int aDuration, int aEUt);
-
- /**
- * Adds a Chemical Recipe
- * @param aInput1 must be != null
- * @param aInput2 must be != null
- * @param aOutput1 must be != null
- * @param aDuration must be > 0
- */
- public boolean addChemicalRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput, int aDuration);
-
- /**
- * Adds a Chemical Recipe
- * @param aInput1 must be != null
- * @param aInput2 must be != null
- * @param aOutput1 must be != null
- * @param aDuration must be > 0
- */
- public boolean addChemicalRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput, int aDuration);
-
- /**
- * Adds a Blast Furnace Recipe
- * @param aInput1 must be != null
- * @param aInput2 can be null
- * @param aOutput1 must be != null
- * @param aOutput2 can be null
- * @param aDuration must be > 0
- * @param aEUt should be > 0
- * @param aLevel should be > 0 is the minimum Heat Level needed for this Recipe
- */
- @Deprecated
- public boolean addBlastRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput1, ItemStack aOutput2, int aDuration, int aEUt, int aLevel);
-
- /**
- * Adds a Blast Furnace Recipe
- * @param aInput1 must be != null
- * @param aInput2 can be null
- * @param aOutput1 must be != null
- * @param aOutput2 can be null
- * @param aDuration must be > 0
- * @param aEUt should be > 0
- * @param aLevel should be > 0 is the minimum Heat Level needed for this Recipe
- */
- public boolean addBlastRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput1, ItemStack aOutput2, int aDuration, int aEUt, int aLevel);
-
- /**
- * Adds a Canning Machine Recipe
- * @param aInput1 must be != null
- * @param aOutput1 must be != null
- * @param aDuration must be > 0, 100 ticks is standard.
- * @param aEUt should be > 0, 1 EU/t is standard.
- */
- public boolean addCannerRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput1, ItemStack aOutput2, int aDuration, int aEUt);
-
- /**
- * Adds an Alloy Smelter Recipe
- * @param aInput1 must be != null
- * @param aInput2 can be null
- * @param aOutput1 must be != null
- * @param aOutput2 can be null
- * @param aDuration must be > 0
- * @param aEUt should be > 0
- */
- public boolean addAlloySmelterRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput1, int aDuration, int aEUt);
-
- /**
- * Adds a CNC-Machine Recipe
- * @param aInput1 must be != null
- * @param aOutput1 must be != null
- * @param aDuration must be > 0
- * @param aEUt should be > 0
- */
- public boolean addCNCRecipe(ItemStack aInput1, ItemStack aOutput1, int aDuration, int aEUt);
-
- /**
- * Adds a Circuit Assembler Recipe
- * @param aInput1 must be != null
- * @param aOutput1 must be != null
- * @param aDuration must be > 0
- * @param aEUt should be > 0
- */
- public boolean addAssemblerRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput1, int aDuration, int aEUt);
-
- /**
- * Adds a Circuit Assembler Recipe
- * @param aInput1 must be != null
- * @param aOutput1 must be != null
- * @param aDuration must be > 0
- * @param aEUt should be > 0
- */
- public boolean addAssemblerRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, ItemStack aOutput1, int aDuration, int aEUt);
-
- /**
- * Adds a Forge Hammer Recipe
- * @param aInput1 must be != null
- * @param aOutput1 must be != null
- * @param aDuration must be > 0
- * @param aEUt should be > 0
- */
- public boolean addForgeHammerRecipe(ItemStack aInput1, ItemStack aOutput1, int aDuration, int aEUt);
-
- /**
- * Adds a Wiremill Recipe
- * @param aInput1 must be != null
- * @param aOutput1 must be != null
- * @param aDuration must be > 0
- * @param aEUt should be > 0
- */
- public boolean addWiremillRecipe(ItemStack aInput, ItemStack aOutput, int aDuration, int aEUt);
-
- /**
- * Adds a Polariser Recipe
- * @param aInput1 must be != null
- * @param aOutput1 must be != null
- * @param aDuration must be > 0
- * @param aEUt should be > 0
- */
- public boolean addPolarizerRecipe(ItemStack aInput, ItemStack aOutput, int aDuration, int aEUt);
-
- /**
- * Adds a Plate Bending Machine Recipe
- * @param aInput1 must be != null
- * @param aOutput1 must be != null
- * @param aDuration must be > 0
- * @param aEUt should be > 0
- */
- public boolean addBenderRecipe(ItemStack aInput, ItemStack aOutput, int aDuration, int aEUt);
-
- /**
- * Adds a Extruder Machine Recipe
- * @param aInput1 must be != null
- * @param aShape must be != null, Set the stackSize to 0 if you don't want to let it consume this Item.
- * @param aOutput1 must be != null
- * @param aDuration must be > 0
- * @param aEUt should be > 0
- */
- public boolean addExtruderRecipe(ItemStack aInput, ItemStack aShape, ItemStack aOutput, int aDuration, int aEUt);
-
- /**
- * Adds a Slicer Machine Recipe
- * @param aInput1 must be != null
- * @param aShape must be != null, Set the stackSize to 0 if you don't want to let it consume this Item.
- * @param aOutput1 must be != null
- * @param aDuration must be > 0
- * @param aEUt should be > 0
- */
- public boolean addSlicerRecipe(ItemStack aInput, ItemStack aShape, ItemStack aOutput, int aDuration, int aEUt);
-
- /**
- * Adds an Implosion Compressor Recipe
- * @param aInput1 must be != null
- * @param aInput2 amount of ITNT, should be > 0
- * @param aOutput1 must be != null
- * @param aOutput2 can be null
- */
- public boolean addImplosionRecipe(ItemStack aInput1, int aInput2, ItemStack aOutput1, ItemStack aOutput2);
-
- /**
- * Adds a Grinder Recipe
- * @param aInput1 must be != null
- * @param aInput2 id for the Cell needed for this Recipe
- * @param aOutput1 must be != null
- * @param aOutput2 can be null
- * @param aOutput3 can be null
- * @param aOutput4 can be null
- */
- public boolean addGrinderRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, ItemStack aOutput4);
-
- /**
- * Adds a Distillation Tower Recipe
- * @param aInput1 must be != null
- * @param aOutputs must be != null 1-5 Fluids
- * @param aOutput2 can be null
- */
- public boolean addDistillationTowerRecipe(FluidStack aInput, FluidStack[] aOutputs, ItemStack aOutput2, int aDuration, int aEUt);
-
-
- public boolean addSimpleArcFurnaceRecipe(ItemStack aInput, FluidStack aFluidInput, ItemStack[] aOutputs, int[] aChances, int aDuration, int aEUt);
-
- public boolean addPlasmaArcFurnaceRecipe(ItemStack aInput, FluidStack aFluidInput, ItemStack[] aOutputs, int[] aChances, int aDuration, int aEUt);
-
- public boolean addPlasmaArcFurnaceRecipe(ItemStack aInput, FluidStack aFluidInput, ItemStack[] aOutputs,FluidStack aFluidPutput, int[] aChances, int aDuration, int aEUt);
-
-
-
-
-
-
- /**
- * Adds a Distillation Tower Recipe
- */
- public boolean addDistillationRecipe(ItemStack aInput1, int aInput2, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, ItemStack aOutput4, int aDuration, int aEUt);
-
- /**
- * Adds a Lathe Machine Recipe
- */
- public boolean addLatheRecipe(ItemStack aInput1, ItemStack aOutput1, ItemStack aOutput2, int aDuration, int aEUt);
-
- /**
- * Adds a Cutter Recipe
- */
- public boolean addCutterRecipe(ItemStack aInput, FluidStack aLubricant, ItemStack aOutput1, ItemStack aOutput2, int aDuration, int aEUt);
-
- /**
- * Adds Cutter Recipes with default Lubricants
- */
- public boolean addCutterRecipe(ItemStack aInput, ItemStack aOutput1, ItemStack aOutput2, int aDuration, int aEUt);
-
- /**
- * Adds a Boxing Recipe
- */
- public boolean addBoxingRecipe(ItemStack aContainedItem, ItemStack aEmptyBox, ItemStack aFullBox, int aDuration, int aEUt);
-
- /**
- * Adds an Unboxing Recipe
- */
- public boolean addUnboxingRecipe(ItemStack aFullBox, ItemStack aContainedItem, ItemStack aEmptyBox, int aDuration, int aEUt);
-
- /**
- * Adds a Vacuum Freezer Recipe
- * @param aInput1 must be != null
- * @param aOutput1 must be != null
- * @param aDuration must be > 0
- */
- public boolean addVacuumFreezerRecipe(ItemStack aInput1, ItemStack aOutput1, int aDuration);
-
- /**
- * Adds a Fuel for My Generators
- * @param aInput1 must be != null
- * @param aOutput1 can be null
- * @param aEU EU per MilliBucket. If no Liquid Form of this Container is available, then it will give you EU*1000 per Item.
- * @param aType 0 = Diesel; 1 = Gas Turbine; 2 = Thermal; 3 = Dense Fluid; 4 = Plasma; 5 = Magic; And if something is unclear or missing, then look at the GT_Recipe-Class
- */
- public boolean addFuel(ItemStack aInput1, ItemStack aOutput1, int aEU, int aType);
-
- /**
- * Adds an Amplifier Recipe for the Amplifabricator
- */
- public boolean addAmplifier(ItemStack aAmplifierItem, int aDuration, int aAmplifierAmountOutputted);
-
- /**
- * Adds a Recipe for the Brewing Machine (intentionally limited to Fluid IDs)
- */
- public boolean addBrewingRecipe(ItemStack aIngredient, Fluid aInput, Fluid aOutput, boolean aHidden);
-
- /**
- * Adds a Recipe for the Fermenter
- */
- public boolean addFermentingRecipe(FluidStack aInput, FluidStack aOutput, int aDuration, boolean aHidden);
-
- /**
- * Adds a Recipe for the Fluid Heater
- */
- public boolean addFluidHeaterRecipe(ItemStack aCircuit, FluidStack aInput, FluidStack aOutput, int aDuration, int aEUt);
-
- /**
- * Adds a Recipe for the Distillery
- */
- public boolean addDistilleryRecipe(ItemStack aCircuit, FluidStack aInput, FluidStack aOutput, int aDuration, int aEUt, boolean aHidden);
-
- /**
- * Adds a Recipe for the Fluid Solidifier
- */
- public boolean addFluidSolidifierRecipe(ItemStack aMold, FluidStack aInput, ItemStack aOutput, int aDuration, int aEUt);
-
- /**
- * Adds a Recipe for Fluid Smelting
- */
- public boolean addFluidSmelterRecipe(ItemStack aInput, ItemStack aRemains, FluidStack aOutput, int aChance, int aDuration, int aEUt);
-
- /**
- * Adds a Recipe for Fluid Extraction
- */
- public boolean addFluidExtractionRecipe(ItemStack aInput, ItemStack aRemains, FluidStack aOutput, int aChance, int aDuration, int aEUt);
-
- /**
- * Adds a Recipe for the Fluid Canner
- */
- public boolean addFluidCannerRecipe(ItemStack aInput, ItemStack aOutput, FluidStack aFluidInput, FluidStack aFluidOutput);
-
- /**
- * Adds a Recipe for the Chemical Bath
- */
- public boolean addChemicalBathRecipe(ItemStack aInput, FluidStack aBathingFluid, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, int[] aChances, int aDuration, int aEUt);
-
- /**
- * Adds a Recipe for the Electromagnetic Separator
- */
- public boolean addElectromagneticSeparatorRecipe(ItemStack aInput, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, int[] aChances, int aDuration, int aEUt);
-
- /**
- * Adds a Recipe for the Printer
- */
- public boolean addPrinterRecipe(ItemStack aInput, FluidStack aFluid, ItemStack aSpecialSlot, ItemStack aOutput, int aDuration, int aEUt);
-
- /**
- * Adds a Recipe for the Autoclave
- */
- public boolean addAutoclaveRecipe(ItemStack aInput, FluidStack aFluid, ItemStack aOutput, int aChance, int aDuration, int aEUt);
-
- /**
- * Adds a Recipe for the Mixer
- */
- public boolean addMixerRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aInput3, ItemStack aInput4, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput, int aDuration, int aEUt);
-
- /**
- * Adds a Recipe for the Laser Engraver
- */
- public boolean addLaserEngraverRecipe(ItemStack aItemToEngrave, ItemStack aLens, ItemStack aEngravedItem, int aDuration, int aEUt);
-
- /**
- * Adds a Recipe for the Forming Press
- */
- public boolean addFormingPressRecipe(ItemStack aItemToImprint, ItemStack aForm, ItemStack aImprintedItem, int aDuration, int aEUt);
-
- /**
- * Adds a Recipe for the Sifter. (up to 9 Outputs)
- */
- public boolean addSifterRecipe(ItemStack aItemToSift, ItemStack[] aSiftedItems, int[] aChances, int aDuration, int aEUt);
-
- /**
- * Adds a Recipe for the Arc Furnace. (up to 4 Outputs)
- */
- public boolean addArcFurnaceRecipe(ItemStack aInput, ItemStack[] aOutputs, int[] aChances, int aDuration, int aEUt);
-
- /**
- * Adds a Recipe for the GT Pulveriser. (up to 4 Outputs)
- */
- public boolean addPulveriserRecipe(ItemStack aInput, ItemStack[] aOutputs, int[] aChances, int aDuration, int aEUt);
-
- /**
- * Adds a Sound to the Sonictron9001
- * you should NOT call this in the preInit-Phase!
- * @param aItemStack = The Item you want to display for this Sound
- * @param aSoundName = The Name of the Sound in the resources/newsound-folder like Vanillasounds
- * @return true if the Sound got added, otherwise false.
- */
- public boolean addSonictronSound(ItemStack aItemStack, String aSoundName);
-}
diff --git a/main/java/gregtech/api/interfaces/internal/IIC2TileEntity.java b/main/java/gregtech/api/interfaces/internal/IIC2TileEntity.java
deleted file mode 100644
index 736cbf67d7..0000000000
--- a/main/java/gregtech/api/interfaces/internal/IIC2TileEntity.java
+++ /dev/null
@@ -1,13 +0,0 @@
-package gregtech.api.interfaces.internal;
-
-import gregtech.api.interfaces.tileentity.IHasWorldObjectAndCoords;
-import ic2.api.energy.tile.IEnergySink;
-import ic2.api.energy.tile.IEnergySource;
-import ic2.api.tile.IEnergyStorage;
-
-/**
- * A simple compound Interface for generic EnergyTileEntities. I don't want to have imports of the IC2-API in my main-code
- */
-public interface IIC2TileEntity extends IEnergyStorage, IEnergySink, IEnergySource, IHasWorldObjectAndCoords {
- //
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/interfaces/internal/IThaumcraftCompat.java b/main/java/gregtech/api/interfaces/internal/IThaumcraftCompat.java
deleted file mode 100644
index 0b48d43db9..0000000000
--- a/main/java/gregtech/api/interfaces/internal/IThaumcraftCompat.java
+++ /dev/null
@@ -1,43 +0,0 @@
-package gregtech.api.interfaces.internal;
-
-import gregtech.api.enums.TC_Aspects;
-import gregtech.api.enums.TC_Aspects.TC_AspectStack;
-
-import java.util.List;
-
-import net.minecraft.block.Block;
-import net.minecraft.item.ItemStack;
-
-public interface IThaumcraftCompat {
- public static final int RESEARCH_TYPE_NORMAL = 0, RESEARCH_TYPE_SECONDARY = 1, RESEARCH_TYPE_FREE = 2, RESEARCH_TYPE_HIDDEN = 4, RESEARCH_TYPE_VIRTUAL = 8, RESEARCH_TYPE_ROUND = 16, RESEARCH_TYPE_SPECIAL = 32, RESEARCH_TYPE_AUTOUNLOCK = 64;
-
- /** The Research Keys of GT */
- public static final String
- IRON_TO_STEEL = "GT_IRON_TO_STEEL"
- , FILL_WATER_BUCKET = "GT_FILL_WATER_BUCKET"
- , WOOD_TO_CHARCOAL = "GT_WOOD_TO_CHARCOAL"
- , TRANSZINC = "GT_TRANSZINC"
- , TRANSNICKEL = "GT_TRANSNICKEL"
- , TRANSCOBALT = "GT_TRANSCOBALT"
- , TRANSBISMUTH = "GT_TRANSBISMUTH"
- , TRANSANTIMONY = "GT_TRANSANTIMONY"
- , TRANSCUPRONICKEL = "GT_TRANSCUPRONICKEL"
- , TRANSBATTERYALLOY = "GT_TRANSBATTERYALLOY"
- , TRANSSOLDERINGALLOY = "GT_TRANSSOLDERINGALLOY"
- , TRANSBRASS = "GT_TRANSBRASS"
- , TRANSBRONZE = "GT_TRANSBRONZE"
- , TRANSINVAR = "GT_TRANSINVAR"
- , TRANSELECTRUM = "GT_TRANSELECTRUM"
- , TRANSALUMINIUM = "GT_TRANSALUMINIUM"
- , CRYSTALLISATION = "GT_CRYSTALLISATION"
- , ADVANCEDENTROPICPROCESSING = "GT_ADVANCEDENTROPICPROCESSING"
- , ADVANCEDMETALLURGY = "GT_ADVANCEDMETALLURGY"
- ;
-
- public boolean registerPortholeBlacklistedBlock(Block aBlock);
- public boolean registerThaumcraftAspectsToItem(ItemStack aStack, List<TC_AspectStack> aAspects, boolean aAdditive);
- public boolean registerThaumcraftAspectsToItem(ItemStack aStack, List<TC_AspectStack> aAspects, String aOreDict);
- public Object addCrucibleRecipe(String aResearch, Object aInput, ItemStack aOutput, List<TC_AspectStack> aAspects);
- public Object addInfusionRecipe(String aResearch, ItemStack aMainInput,ItemStack[] aSideInputs, ItemStack aOutput,int aInstability, List<TC_Aspects.TC_AspectStack> aAspects);
- public Object addResearch(String aResearch, String aName, String aText, String[] aParentResearches, String aCategory, ItemStack aIcon, int aComplexity, int aType, int aX, int aY, List<TC_AspectStack> aAspects, ItemStack[] aResearchTriggers, Object[] aPages);
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/interfaces/internal/IUETileEntity.java b/main/java/gregtech/api/interfaces/internal/IUETileEntity.java
deleted file mode 100644
index 945c6792f8..0000000000
--- a/main/java/gregtech/api/interfaces/internal/IUETileEntity.java
+++ /dev/null
@@ -1,6 +0,0 @@
-package gregtech.api.interfaces.internal;
-
-
-public interface IUETileEntity /*extends IElectrical*/ {
- //
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntity.java b/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntity.java
deleted file mode 100644
index 7b7d36ea6f..0000000000
--- a/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntity.java
+++ /dev/null
@@ -1,383 +0,0 @@
-package gregtech.api.interfaces.metatileentity;
-
-import gregtech.api.interfaces.ITexture;
-import gregtech.api.interfaces.tileentity.IGearEnergyTileEntity;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.objects.GT_ItemStack;
-import gregtech.api.util.GT_Config;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
-
-import net.minecraft.block.Block;
-import net.minecraft.client.renderer.RenderBlocks;
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.inventory.ISidedInventory;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.util.AxisAlignedBB;
-import net.minecraft.world.IBlockAccess;
-import net.minecraft.world.World;
-import net.minecraftforge.fluids.IFluidHandler;
-import net.minecraftforge.fluids.IFluidTank;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-
-/**
- * Warning, this Interface has just been made to be able to add multiple kinds of MetaTileEntities (Cables, Pipes, Transformers, but not the regular Blocks)
- *
- * Don't implement this yourself and expect it to work. Extend @MetaTileEntity itself.
- */
-public interface IMetaTileEntity extends ISidedInventory, IFluidTank, IFluidHandler, IGearEnergyTileEntity {
- /**
- * This determines the BaseMetaTileEntity belonging to this MetaTileEntity by using the Meta ID of the Block itself.
- *
- * 0 = BaseMetaTileEntity, Wrench lvl 0 to dismantle
- * 1 = BaseMetaTileEntity, Wrench lvl 1 to dismantle
- * 2 = BaseMetaTileEntity, Wrench lvl 2 to dismantle
- * 3 = BaseMetaTileEntity, Wrench lvl 3 to dismantle
- * 4 = BaseMetaPipeEntity, Wrench lvl 0 to dismantle
- * 5 = BaseMetaPipeEntity, Wrench lvl 1 to dismantle
- * 6 = BaseMetaPipeEntity, Wrench lvl 2 to dismantle
- * 7 = BaseMetaPipeEntity, Wrench lvl 3 to dismantle
- * 8 = BaseMetaPipeEntity, Cutter lvl 0 to dismantle
- * 9 = BaseMetaPipeEntity, Cutter lvl 1 to dismantle
- * 10 = BaseMetaPipeEntity, Cutter lvl 2 to dismantle
- * 11 = BaseMetaPipeEntity, Cutter lvl 3 to dismantle
- * 12 = BaseMetaPipeEntity, Axe lvl 0 to dismantle
- * 13 = BaseMetaPipeEntity, Axe lvl 1 to dismantle
- * 14 = BaseMetaPipeEntity, Axe lvl 2 to dismantle
- * 15 = BaseMetaPipeEntity, Axe lvl 3 to dismantle
- */
- public byte getTileEntityBaseType();
-
- /**
- * @param aTileEntity is just because the internal Variable "mBaseMetaTileEntity" is set after this Call.
- * @return a newly created and ready MetaTileEntity
- */
- public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity);
-
- /**
- * @return an ItemStack representing this MetaTileEntity.
- */
- public ItemStack getStackForm(long aAmount);
-
- /**
- * Sets the BaseMetaTileEntity of this
- */
- public void setBaseMetaTileEntity(IGregTechTileEntity aBaseMetaTileEntity);
-
- /**
- * new getter for the BaseMetaTileEntity, which restricts usage to certain Functions.
- */
- public IGregTechTileEntity getBaseMetaTileEntity();
-
- /**
- * when placing a Machine in World, to initialize default Modes. aNBT can be null!
- */
- public void initDefaultModes(NBTTagCompound aNBT);
-
- /**
- * ^= writeToNBT
- */
- public void saveNBTData(NBTTagCompound aNBT);
-
- /**
- * ^= readFromNBT
- */
- public void loadNBTData(NBTTagCompound aNBT);
-
- /**
- * Adds the NBT-Information to the ItemStack, when being dismanteled properly
- * Used to store Machine specific Upgrade Data.
- */
- public void setItemNBT(NBTTagCompound aNBT);
-
- /**
- * Called in the registered MetaTileEntity when the Server starts, to reset static variables
- */
- public void onServerStart();
-
- /**
- * Called in the registered MetaTileEntity when the Server ticks a World the first time, to load things from the World Save
- */
- public void onWorldLoad(File aSaveDirectory);
-
- /**
- * Called in the registered MetaTileEntity when the Server stops, to save the Game.
- */
- public void onWorldSave(File aSaveDirectory);
-
- /**
- * Called to set Configuration values for this MetaTileEntity.
- * Use aConfig.get(ConfigCategories.machineconfig, "MetaTileEntityName.Ability", DEFAULT_VALUE); to set the Values.
- */
- public void onConfigLoad(GT_Config aConfig);
-
- /**
- * If a Cover of that Type can be placed on this Side.
- * Also Called when the Facing of the Block Changes and a Cover is on said Side.
- */
- public boolean allowCoverOnSide(byte aSide, GT_ItemStack aStack);
-
- /**
- * When a Player rightclicks the Facing with a Screwdriver.
- */
- public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ);
-
- /**
- * When a Player rightclicks the Facing with a Wrench.
- */
- public boolean onWrenchRightClick(byte aSide, byte aWrenchingSide, EntityPlayer aPlayer, float aX, float aY, float aZ);
-
- /**
- * Called right before this Machine explodes
- */
- public void onExplosion();
-
- /**
- * The First processed Tick which was passed to this MetaTileEntity
- */
- public void onFirstTick(IGregTechTileEntity aBaseMetaTileEntity);
-
- /**
- * The Tick before all the generic handling happens, what gives a slightly faster reaction speed.
- * Don't use this if you really don't need to. @onPostTick is better suited for ticks.
- * This happens still after the Cover handling.
- */
- public void onPreTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick);
-
- /**
- * The Tick after all the generic handling happened.
- * Recommended to use this like updateEntity.
- */
- public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick);
-
- /**
- * Called when this MetaTileEntity gets (intentionally) disconnected from the BaseMetaTileEntity.
- * Doesn't get called when this thing is moved by Frames or similar hacks.
- */
- public void inValidate();
-
- /**
- * Called when the BaseMetaTileEntity gets invalidated, what happens right before the @inValidate above gets called
- */
- public void onRemoval();
-
- /**
- * @param aFacing
- * @return if aFacing would be a valid Facing for this Device. Used for wrenching.
- */
- public boolean isFacingValid(byte aFacing);
-
- /**
- * @return the Server Side Container
- */
- public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity);
-
- /**
- * @return the Client Side GUI Container
- */
- public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity);
-
- /**
- * From new ISidedInventory
- */
- public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack);
-
- /**
- * From new ISidedInventory
- */
- public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack);
-
- /**
- * @return if aIndex is a valid Slot. false for things like HoloSlots. Is used for determining if an Item is dropped upon Block destruction and for Inventory Access Management
- */
- public boolean isValidSlot(int aIndex);
-
- /**
- * @return if aIndex can be set to Zero stackSize, when being removed.
- */
- public boolean setStackToZeroInsteadOfNull(int aIndex);
-
- /**
- * If this Side can connect to inputting pipes
- */
- public boolean isLiquidInput(byte aSide);
-
- /**
- * If this Side can connect to outputting pipes
- */
- public boolean isLiquidOutput(byte aSide);
-
- /**
- * Just an Accessor for the Name variable.
- */
- public String getMetaName();
-
- /**
- * @return true if the Machine can be accessed
- */
- public boolean isAccessAllowed(EntityPlayer aPlayer);
-
- /**
- * When a Machine Update occurs
- */
- public void onMachineBlockUpdate();
-
- /**
- * a Player rightclicks the Machine
- * Sneaky rightclicks are not getting passed to this!
- * @return
- */
- public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer, byte aSide, float aX, float aY, float aZ);
-
- /**
- * a Player leftclicks the Machine
- * Sneaky leftclicks are getting passed to this unlike with the rightclicks.
- */
- public void onLeftclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer);
-
- /**
- * Called Clientside with the Data got from @getUpdateData
- */
- public void onValueUpdate(byte aValue);
-
- /**
- * return a small bit of Data, like a secondary Facing for example with this Function, for the Client.
- * The BaseMetaTileEntity detects changes to this Value and will then send an Update.
- * This is only for Information, which is visible as Texture to the outside.
- *
- * If you just want to have an Active/Redstone State then set the Active State inside the BaseMetaTileEntity instead.
- */
- public byte getUpdateData();
-
- /**
- * For the rare case you need this Function
- */
- public void receiveClientEvent(byte aEventID, byte aValue);
-
- /**
- * Called to actually play the Sound.
- * Do not insert Client/Server checks. That is already done for you.
- * Do not use @playSoundEffect, Minecraft doesn't like that at all. Use @playSound instead.
- */
- public void doSound(byte aIndex, double aX, double aY, double aZ);
- public void startSoundLoop(byte aIndex, double aX, double aY, double aZ);
- public void stopSoundLoop(byte aValue, double aX, double aY, double aZ);
-
- /**
- * Sends the Event for the Sound Triggers, only usable Server Side!
- */
- public void sendSound(byte aIndex);
-
- /**
- * Sends the Event for the Sound Triggers, only usable Server Side!
- */
- public void sendLoopStart(byte aIndex);
-
- /**
- * Sends the Event for the Sound Triggers, only usable Server Side!
- */
- public void sendLoopEnd(byte aIndex);
-
- /**
- * Called when the Machine explodes, override Explosion Code here.
- * @param aExplosionPower
- */
- public void doExplosion(long aExplosionPower);
-
- /**
- * If this is just a simple Machine, which can be wrenched at 100%
- */
- public boolean isSimpleMachine();
-
- /**
- * If there should be a Lag Warning if something laggy happens during this Tick.
- *
- * The Advanced Pump uses this to not cause the Lag Message, while it scans for all close Fluids.
- * The Item Pipes and Retrievers neither send this Message, when scanning for Pipes.
- */
- public boolean doTickProfilingMessageDuringThisTick();
-
- /**
- * returns the DebugLog
- */
- public ArrayList<String> getSpecialDebugInfo(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer, int aLogLevel, ArrayList<String> aList);
-
- /**
- * get a small Description
- */
- public String[] getDescription();
-
- /**
- * In case the Output Voltage varies.
- */
- public String getSpecialVoltageToolTip();
-
- /**
- * Icon of the Texture. If this returns null then it falls back to getTextureIndex.
- *
- * @param aSide is the Side of the Block
- * @param aFacing is the direction the Block is facing (or a Bitmask of all Connections in case of Pipes)
- * @param aColorIndex The Minecraft Color the Block is having
- * @param aActive if the Machine is currently active (use this instead of calling mBaseMetaTileEntity.mActive!!!). Note: In case of Pipes this means if this Side is connected to something or not.
- * @param aRedstone if the Machine is currently outputting a RedstoneSignal (use this instead of calling mBaseMetaTileEntity.mRedstone!!!)
- */
- public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone);
-
- /**
- * The Textures used for the Item rendering. Return null if you want the regular 3D Block Rendering.
- */
- //public ITexture[] getItemTexture(ItemStack aStack);
-
- /**
- * Register Icons here. This gets called when the Icons get initialized by the Base Block
- * Best is you put your Icons in a static Array for quick and easy access without relying on the MetaTileList.
- * @param aBlockIconRegister The Block Icon Register
- */
- @SideOnly(Side.CLIENT)
- public void registerIcons(IIconRegister aBlockIconRegister);
-
- /**
- * @return true if you override the Rendering.
- */
- @SideOnly(Side.CLIENT)
- public boolean renderInInventory(Block aBlock, int aMeta, RenderBlocks aRenderer);
-
- /**
- * @return true if you override the Rendering.
- */
- @SideOnly(Side.CLIENT)
- public boolean renderInWorld(IBlockAccess aWorld, int aX, int aY, int aZ, Block aBlock, RenderBlocks aRenderer);
-
- /**
- * Gets the Output for the comparator on the given Side
- */
- public byte getComparatorValue(byte aSide);
-
- public float getExplosionResistance(byte aSide);
-
- public String[] getInfoData();
- public boolean isGivingInformation();
-
- public ItemStack[] getRealInventory();
-
- public boolean connectsToItemPipe(byte aSide);
-
- public void onColorChangeServer(byte aColor);
- public void onColorChangeClient(byte aColor);
-
- public int getLightOpacity();
-
- public void addCollisionBoxesToList(World aWorld, int aX, int aY, int aZ, AxisAlignedBB inputAABB, List<AxisAlignedBB> outputAABB, Entity collider);
- public AxisAlignedBB getCollisionBoundingBoxFromPool(World aWorld, int aX, int aY, int aZ);
- public void onEntityCollidedWithBlock(World aWorld, int aX, int aY, int aZ, Entity collider);
-
- /** The onCreated Function of the Item Class redirects here */
- public void onCreated(ItemStack aStack, World aWorld, EntityPlayer aPlayer);
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntityCable.java b/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntityCable.java
deleted file mode 100644
index 6cdb15cfea..0000000000
--- a/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntityCable.java
+++ /dev/null
@@ -1,9 +0,0 @@
-package gregtech.api.interfaces.metatileentity;
-
-import java.util.ArrayList;
-
-import net.minecraft.tileentity.TileEntity;
-
-public interface IMetaTileEntityCable extends IMetaTileEntity {
- public long transferElectricity(byte aSide, long aVoltage, long aAmperage, ArrayList<TileEntity> aAlreadyPassedTileEntityList);
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntityItemPipe.java b/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntityItemPipe.java
deleted file mode 100644
index 0e6d3c6f09..0000000000
--- a/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntityItemPipe.java
+++ /dev/null
@@ -1,96 +0,0 @@
-package gregtech.api.interfaces.metatileentity;
-
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.metatileentity.BaseMetaPipeEntity;
-import gregtech.api.util.GT_Utility;
-
-import java.util.Map;
-
-public interface IMetaTileEntityItemPipe extends IMetaTileEntity {
- /**
- * @return if this Pipe can still be used.
- */
- public boolean pipeCapacityCheck();
-
- /**
- * @return if this Pipe can still be used.
- */
- public boolean incrementTransferCounter(int aIncrement);
-
- /**
- * Sends an ItemStack from aSender to the adjacent Blocks.
- * @param aSender the BaseMetaTileEntity sending the Stack.
- * @return if it was able to send something
- */
- public boolean sendItemStack(Object aSender);
-
- /**
- * Executes the Sending Code for inserting Stacks into the TileEntities.
- * @param aSender the BaseMetaTileEntity sending the Stack.
- * @param aSide the Side of the PIPE facing the TileEntity.
- * @return if this Side was allowed to Output into the Block.
- */
- public boolean insertItemStackIntoTileEntity(Object aSender, byte aSide);
-
- /**
- * Can be used to make flow control Pipes, like Redpowers Restriction Tubes.
- * Every normal Pipe returns a Value of 32768, so you can easily insert lower Numbers to set Routing priorities.
- * Negative Numbers to "suck" Items into a certain direction are also possible.
- */
- public int getStepSize();
-
- /**
- * Utility for the Item Network
- */
- public static class Util {
- /**
- * @return a List of connected Item Pipes
- */
- public static Map<IMetaTileEntityItemPipe, Long> scanPipes(IMetaTileEntityItemPipe aMetaTileEntity, Map<IMetaTileEntityItemPipe, Long> aMap, long aStep, boolean aSuckItems, boolean aIgnoreCapacity) {
- aStep+=aMetaTileEntity.getStepSize();
- if (aIgnoreCapacity || aMetaTileEntity.pipeCapacityCheck()) if (aMap.get(aMetaTileEntity) == null || aMap.get(aMetaTileEntity) > aStep) {
- IGregTechTileEntity aBaseMetaTileEntity = aMetaTileEntity.getBaseMetaTileEntity();
- aMap.put(aMetaTileEntity, aStep);
- for (byte i = 0, j = 0; i < 6; i++) {
- j = GT_Utility.getOppositeSide(i);
- if (aSuckItems) {
- if (aBaseMetaTileEntity.getCoverBehaviorAtSide(i).letsItemsIn(i, aBaseMetaTileEntity.getCoverIDAtSide(i), aBaseMetaTileEntity.getCoverDataAtSide(i), -2, aBaseMetaTileEntity)) {
- IGregTechTileEntity tItemPipe = aBaseMetaTileEntity.getIGregTechTileEntityAtSide(i);
- if (aBaseMetaTileEntity.getColorization() >= 0) {
- byte tColor = tItemPipe.getColorization();
- if (tColor >= 0 && tColor != aBaseMetaTileEntity.getColorization()) {
- continue;
- }
- }
- if (tItemPipe != null && tItemPipe instanceof BaseMetaPipeEntity) {
- IMetaTileEntity tMetaTileEntity = tItemPipe.getMetaTileEntity();
- if (tMetaTileEntity != null && tMetaTileEntity instanceof IMetaTileEntityItemPipe && tItemPipe.getCoverBehaviorAtSide(j).letsItemsOut(j, tItemPipe.getCoverIDAtSide(j), tItemPipe.getCoverDataAtSide(j), -2, tItemPipe)) {
- scanPipes((IMetaTileEntityItemPipe)tMetaTileEntity, aMap, aStep, aSuckItems, aIgnoreCapacity);
- }
- }
- }
- } else {
- if (aBaseMetaTileEntity.getCoverBehaviorAtSide(i).letsItemsOut(i, aBaseMetaTileEntity.getCoverIDAtSide(i), aBaseMetaTileEntity.getCoverDataAtSide(i), -2, aBaseMetaTileEntity)) {
- IGregTechTileEntity tItemPipe = aBaseMetaTileEntity.getIGregTechTileEntityAtSide(i);
- if (tItemPipe != null) {
- if (aBaseMetaTileEntity.getColorization() >= 0) {
- byte tColor = tItemPipe.getColorization();
- if (tColor >= 0 && tColor != aBaseMetaTileEntity.getColorization()) {
- continue;
- }
- }
- if (tItemPipe instanceof BaseMetaPipeEntity) {
- IMetaTileEntity tMetaTileEntity = tItemPipe.getMetaTileEntity();
- if (tMetaTileEntity != null && tMetaTileEntity instanceof IMetaTileEntityItemPipe && tItemPipe.getCoverBehaviorAtSide(j).letsItemsIn(j, tItemPipe.getCoverIDAtSide(j), tItemPipe.getCoverDataAtSide(j), -2, tItemPipe)) {
- scanPipes((IMetaTileEntityItemPipe)tMetaTileEntity, aMap, aStep, aSuckItems, aIgnoreCapacity);
- }
- }
- }
- }
- }
- }
- }
- return aMap;
- }
- }
-}
diff --git a/main/java/gregtech/api/interfaces/tileentity/IBasicEnergyContainer.java b/main/java/gregtech/api/interfaces/tileentity/IBasicEnergyContainer.java
deleted file mode 100644
index 6b39391d46..0000000000
--- a/main/java/gregtech/api/interfaces/tileentity/IBasicEnergyContainer.java
+++ /dev/null
@@ -1,99 +0,0 @@
-package gregtech.api.interfaces.tileentity;
-
-/**
- * Interface for internal Code, which is mainly used for independent Energy conversion.
- */
-public interface IBasicEnergyContainer extends IEnergyConnected {
- /**
- * Gets if that Amount of Energy is stored inside the Machine.
- * It is used for checking the contained Energy before consuming it.
- * If this returns false, it will also give a Message inside the Scanner, that this Machine doesn't have enough Energy.
- */
- public boolean isUniversalEnergyStored(long aEnergyAmount);
-
- /**
- * Gets the stored electric, kinetic or steam Energy (with EU as reference Value)
- * Always returns the largest one.
- */
- public long getUniversalEnergyStored();
-
- /**
- * Gets the largest electric, kinetic or steam Energy Capacity (with EU as reference Value)
- */
- public long getUniversalEnergyCapacity();
-
- /**
- * Gets the amount of Energy Packets per tick.
- */
- public long getOutputAmperage();
-
- /**
- * Gets the Output in EU/p.
- */
- public long getOutputVoltage();
-
- /**
- * Gets the amount of Energy Packets per tick.
- */
- public long getInputAmperage();
-
- /**
- * Gets the maximum Input in EU/p.
- */
- public long getInputVoltage();
-
- /**
- * Decreases the Amount of stored universal Energy. If ignoring too less Energy, then it just sets the Energy to 0 and returns false.
- */
- public boolean decreaseStoredEnergyUnits(long aEnergy, boolean aIgnoreTooLessEnergy);
-
- /**
- * Increases the Amount of stored electric Energy. If ignoring too much Energy, then the Energy Limit is just being ignored.
- */
- public boolean increaseStoredEnergyUnits(long aEnergy, boolean aIgnoreTooMuchEnergy);
-
- /**
- * Drain Energy Call for Electricity.
- */
- public boolean drainEnergyUnits(byte aSide, long aVoltage, long aAmperage);
-
- /**
- * returns the amount of Electricity, accepted by this Block the last 5 ticks as Average.
- */
- public long getAverageElectricInput();
-
- /**
- * returns the amount of Electricity, outputted by this Block the last 5 ticks as Average.
- */
- public long getAverageElectricOutput();
-
- /**
- * returns the amount of electricity contained in this Block, in EU units!
- */
- public long getStoredEU();
-
- /**
- * returns the amount of electricity containable in this Block, in EU units!
- */
- public long getEUCapacity();
-
- /**
- * returns the amount of Steam contained in this Block, in EU units!
- */
- public long getStoredSteam();
-
- /**
- * returns the amount of Steam containable in this Block, in EU units!
- */
- public long getSteamCapacity();
-
- /**
- * Increases stored Energy. Energy Base Value is in EU, even though it's Steam!
- * @param aEnergy The Energy to add to the Machine.
- * @param aIgnoreTooMuchEnergy if it shall ignore if it has too much Energy.
- * @return if it was successful
- *
- * And yes, you can't directly decrease the Steam of a Machine. That is done by decreaseStoredEnergyUnits
- */
- public boolean increaseStoredSteam(long aEnergy, boolean aIgnoreTooMuchEnergy);
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/interfaces/tileentity/IColoredTileEntity.java b/main/java/gregtech/api/interfaces/tileentity/IColoredTileEntity.java
deleted file mode 100644
index dc511f3050..0000000000
--- a/main/java/gregtech/api/interfaces/tileentity/IColoredTileEntity.java
+++ /dev/null
@@ -1,14 +0,0 @@
-package gregtech.api.interfaces.tileentity;
-
-public interface IColoredTileEntity {
- /**
- * @return 0 - 15 are Colors, while -1 means uncolored
- */
- public byte getColorization();
-
- /**
- * Sets the Color Modulation of the Block
- * @param aColor the Color you want to set it to. -1 for reset.
- */
- public byte setColorization(byte aColor);
-}
diff --git a/main/java/gregtech/api/interfaces/tileentity/ICoverable.java b/main/java/gregtech/api/interfaces/tileentity/ICoverable.java
deleted file mode 100644
index 546b8d81c6..0000000000
--- a/main/java/gregtech/api/interfaces/tileentity/ICoverable.java
+++ /dev/null
@@ -1,35 +0,0 @@
-package gregtech.api.interfaces.tileentity;
-
-import gregtech.api.util.GT_CoverBehavior;
-import net.minecraft.item.ItemStack;
-
-public interface ICoverable extends IRedstoneTileEntity, IHasInventory, IBasicEnergyContainer {
- public boolean canPlaceCoverIDAtSide (byte aSide, int aID);
- public boolean canPlaceCoverItemAtSide (byte aSide, ItemStack aCover);
- public boolean dropCover (byte aSide, byte aDroppedSide, boolean aForced);
- public void setCoverDataAtSide (byte aSide, int aData);
- public void setCoverIDAtSide (byte aSide, int aID);
- public void setCoverItemAtSide (byte aSide, ItemStack aCover);
- public int getCoverDataAtSide (byte aSide);
- public int getCoverIDAtSide (byte aSide);
- public ItemStack getCoverItemAtSide (byte aSide);
- public GT_CoverBehavior getCoverBehaviorAtSide (byte aSide);
-
- /**
- * For use by the regular MetaTileEntities. Returns the Cover Manipulated input Redstone.
- * Don't use this if you are a Cover Behavior. Only for MetaTileEntities.
- */
- public byte getInternalInputRedstoneSignal(byte aSide);
-
- /**
- * For use by the regular MetaTileEntities. This makes it not conflict with Cover based Redstone Signals.
- * Don't use this if you are a Cover Behavior. Only for MetaTileEntities.
- */
- public void setInternalOutputRedstoneSignal(byte aSide, byte aStrength);
-
- /**
- * Causes a general Cover Texture update.
- * Sends 6 Integers to Client + causes @issueTextureUpdate()
- */
- public void issueCoverUpdate(byte aSide);
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/interfaces/tileentity/IDigitalChest.java b/main/java/gregtech/api/interfaces/tileentity/IDigitalChest.java
deleted file mode 100644
index d017a1d7c4..0000000000
--- a/main/java/gregtech/api/interfaces/tileentity/IDigitalChest.java
+++ /dev/null
@@ -1,29 +0,0 @@
-package gregtech.api.interfaces.tileentity;
-
-import net.minecraft.item.ItemStack;
-
-/**
- * You are allowed to include this File in your Download, as i will not change it.
- */
-public interface IDigitalChest extends IHasWorldObjectAndCoords {
- /**
- * Is this even a TileEntity of a Digital Chest?
- * I need things like this Function for MetaTileEntities, you MUST check this!!!
- * Do not assume that it's a Digital Chest or similar Device, when it just implements this Interface.
- */
- public boolean isDigitalChest();
- /**
- * Gives an Array of Stacks with Size (of all the Data-stored Items) of the correspondent Item kinds (regular QChests have only one)
- * Does NOT include the 64 "ready" Items inside the Slots, and neither the 128 Items in the overflow Buffer.
- */
- public ItemStack[] getStoredItemData();
- /**
- * A generic Interface for just setting the amount of contained Items
- */
- public void setItemCount(int aCount);
-
- /**
- * Gets the maximum Item count for this QChest alike Storage. This applies to the Data-Storage, not for the up to 192 buffered Items!
- */
- public int getMaxItemCount();
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/interfaces/tileentity/IEnergyConductor.java b/main/java/gregtech/api/interfaces/tileentity/IEnergyConductor.java
deleted file mode 100644
index 96684de6e3..0000000000
--- a/main/java/gregtech/api/interfaces/tileentity/IEnergyConductor.java
+++ /dev/null
@@ -1,40 +0,0 @@
-package gregtech.api.interfaces.tileentity;
-
-import gregtech.api.enums.Materials;
-
-/**
- * Informative Class for Cables. Not used for now.
- *
- * Not all Data might be reliable. This is just for Information sake.
- */
-public interface IEnergyConductor extends IEnergyConnected {
- /**
- * @return if this is actually a Cable. (you must check this)
- */
- public boolean isConductor();
-
- /**
- * @return the maximum Voltage of the Cable.
- */
- public long getMaxVoltage();
-
- /**
- * @return the maximum Amperage of the Cable, per Wire.
- */
- public long getMaxAmperage();
-
- /**
- * @return the Loss of the Cable, per Meter.
- */
- public long getLossPerMeter();
-
- /**
- * @return the Material the Cable consists of. (may return Materials._NULL)
- */
- public Materials getCableMaterial();
-
- /**
- * @return the Material the Cable Insulation consists of. (may return Materials._NULL)
- */
- public Materials getInsulationMaterial();
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/interfaces/tileentity/IEnergyConnected.java b/main/java/gregtech/api/interfaces/tileentity/IEnergyConnected.java
deleted file mode 100644
index 097493807d..0000000000
--- a/main/java/gregtech/api/interfaces/tileentity/IEnergyConnected.java
+++ /dev/null
@@ -1,89 +0,0 @@
-package gregtech.api.interfaces.tileentity;
-
-import static gregtech.api.enums.GT_Values.V;
-import cofh.api.energy.IEnergyReceiver;
-import gregtech.api.GregTech_API;
-import gregtech.api.util.GT_Utility;
-import ic2.api.energy.tile.IEnergySink;
-import net.minecraft.init.Blocks;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.world.World;
-import net.minecraftforge.common.util.ForgeDirection;
-
-/**
- * Interface for getting Connected to the GregTech Energy Network.
- *
- * This is all you need to connect to the GT Network.
- * IColoredTileEntity is needed for not connecting differently coloured Blocks to each other.
- * IHasWorldObjectAndCoords is needed for the InWorld related Stuff. @BaseTileEntity does implement most of that Interface.
- */
-public interface IEnergyConnected extends IColoredTileEntity, IHasWorldObjectAndCoords {
- /**
- * Inject Energy Call for Electricity. Gets called by EnergyEmitters to inject Energy into your Block
- *
- * Note: you have to check for @inputEnergyFrom because the Network won't check for that by itself.
- *
- * @param aSide 0 - 5 = Vanilla Directions of YOUR Block the Energy gets inserted to. 6 = No specific Side (don't do Side checks for this Side)
- * @return amount of used Amperes. 0 if not accepted anything.
- */
- public long injectEnergyUnits(byte aSide, long aVoltage, long aAmperage);
-
- /**
- * Sided Energy Input
- */
- public boolean inputEnergyFrom(byte aSide);
-
- /**
- * Sided Energy Output
- */
- public boolean outputsEnergyTo(byte aSide);
-
- /**
- * Utility for the Network
- */
- public static class Util {
- /**
- * Emits Energy to the E-net. Also compatible with adjacent IC2 TileEntities.
- * @return the used Amperage.
- */
- public static final long emitEnergyToNetwork(long aVoltage, long aAmperage, IEnergyConnected aEmitter) {
- long rUsedAmperes = 0;
- for (byte i = 0, j = 0; i < 6 && aAmperage > rUsedAmperes; i++) if (aEmitter.outputsEnergyTo(i)) {
- j = GT_Utility.getOppositeSide(i);
- TileEntity tTileEntity = aEmitter.getTileEntityAtSide(i);
- if (tTileEntity instanceof IEnergyConnected) {
- if (aEmitter.getColorization() >= 0) {
- byte tColor = ((IEnergyConnected)tTileEntity).getColorization();
- if (tColor >= 0 && tColor != aEmitter.getColorization()) continue;
- }
- rUsedAmperes+=((IEnergyConnected)tTileEntity).injectEnergyUnits(j, aVoltage, aAmperage-rUsedAmperes);
-// } else if (tTileEntity instanceof IEnergySink) {
-// if (((IEnergySink)tTileEntity).acceptsEnergyFrom((TileEntity)aEmitter, ForgeDirection.getOrientation(j))) {
-// while (aAmperage > rUsedAmperes && ((IEnergySink)tTileEntity).demandedEnergyUnits() > 0 && ((IEnergySink)tTileEntity).injectEnergyUnits(ForgeDirection.getOrientation(j), aVoltage) < aVoltage) rUsedAmperes++;
-// }
- } else if (tTileEntity instanceof IEnergySink) {
- if (((IEnergySink)tTileEntity).acceptsEnergyFrom((TileEntity)aEmitter, ForgeDirection.getOrientation(j))) {
- while (aAmperage > rUsedAmperes && ((IEnergySink)tTileEntity).getDemandedEnergy() > 0 && ((IEnergySink)tTileEntity).injectEnergy(ForgeDirection.getOrientation(j), aVoltage, aVoltage) < aVoltage) rUsedAmperes++;
- }
- } else if(GregTech_API.mOutputRF && tTileEntity instanceof IEnergyReceiver){
- ForgeDirection tDirection = ForgeDirection.getOrientation(i).getOpposite();
- int rfOut = (int) (aVoltage * GregTech_API.mEUtoRF / 100);
- if(((IEnergyReceiver)tTileEntity).receiveEnergy(tDirection, rfOut, true)==rfOut){
- ((IEnergyReceiver)tTileEntity).receiveEnergy(tDirection, rfOut, false); rUsedAmperes++;
- }
- if(GregTech_API.mRFExplosions && GregTech_API.sMachineExplosions && ((IEnergyReceiver)tTileEntity).getMaxEnergyStored(tDirection) < rfOut * 600){
- if(rfOut > 32 * GregTech_API.mEUtoRF / 100) {
- int aExplosionPower = rfOut;
- float tStrength = aExplosionPower<V[0]?1.0F:aExplosionPower<V[1]?2.0F:aExplosionPower<V[2]?3.0F:aExplosionPower<V[3]?4.0F:aExplosionPower<V[4]?5.0F:aExplosionPower<V[4]*2?6.0F:aExplosionPower<V[5]?7.0F:aExplosionPower<V[6]?8.0F:aExplosionPower<V[7]?9.0F:10.0F;
- int tX=tTileEntity.xCoord, tY=tTileEntity.yCoord, tZ=tTileEntity.zCoord;
- World tWorld = tTileEntity.getWorldObj();
- GT_Utility.sendSoundToPlayers(tWorld, GregTech_API.sSoundList.get(209), 1.0F, -1, tX, tY, tZ);
- tWorld.setBlock(tX, tY, tZ, Blocks.air);
- if (GregTech_API.sMachineExplosions) tWorld.createExplosion(null, tX+0.5, tY+0.5, tZ+0.5, tStrength, true);}
- }
- }
- }
- return rUsedAmperes;
- }
- }
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/interfaces/tileentity/IExperimentalEnergyTileEntity.java b/main/java/gregtech/api/interfaces/tileentity/IExperimentalEnergyTileEntity.java
deleted file mode 100644
index 9bb3fec13e..0000000000
--- a/main/java/gregtech/api/interfaces/tileentity/IExperimentalEnergyTileEntity.java
+++ /dev/null
@@ -1,86 +0,0 @@
-package gregtech.api.interfaces.tileentity;
-
-import static gregtech.api.enums.GT_Values.F;
-import static gregtech.api.enums.GT_Values.T;
-import gregtech.api.enums.SubTag;
-import gregtech.api.util.GT_Utility;
-import ic2.api.energy.tile.IEnergySink;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraftforge.common.util.ForgeDirection;
-import cofh.api.energy.IEnergyReceiver;
-
-/**
- * THIS IS GOING TO BE USED IN 1.8
- *
- * Interface for getting Connected to the GregTech Energy Network.
- *
- * This is all you need to connect to the GT Network.
- * IColoredTileEntity is needed for not connecting differently coloured Blocks to each other.
- * IHasWorldObjectAndCoords is needed for the InWorld related Stuff. @BaseTileEntity does implement most of that Interface.
- */
-public interface IExperimentalEnergyTileEntity extends IColoredTileEntity, IHasWorldObjectAndCoords {
- /**
- * Inject Energy Call for Electricity. Gets called by EnergyEmitters to inject Energy into your Block
- *
- * Note: you have to check for @inputEnergyFrom because the Network won't check for that by itself.
- *
- * @param aSide 0 - 5 = Vanilla Directions of YOUR Block the Energy gets inserted to. 6 = No specific Side (don't do Side checks for this Side)
- * @return amount of used Amperes. 0 if not accepted anything.
- */
- public long injectEnergy(SubTag aEnergyType, byte aSide, long aPrimary, long aSecondary);
-
- /** Sided Energy Input */
- public boolean inputEnergyFrom(SubTag aEnergyType, byte aSide);
-
- /** Sided Energy Output */
- public boolean outputsEnergyTo(SubTag aEnergyType, byte aSide);
-
- /** Utility for the Network */
- public static class Util {
- private static boolean RF_ENERGY = F, IC_ENERGY = F, CHECK_ALL = T;
- public static int RF_PER_EU = 4;
-
- private static void checkAvailabilities() {
- if (CHECK_ALL) {
- try {
- Class tClass = cofh.api.energy.IEnergyReceiver.class;
- tClass.getCanonicalName();
- RF_ENERGY = T;
- } catch(Throwable e) {/**/}
- try {
- Class tClass = ic2.api.energy.tile.IEnergySink.class;
- tClass.getCanonicalName();
- IC_ENERGY = T;
- } catch(Throwable e) {/**/}
- CHECK_ALL = F;
- }
- }
-
- /**
- * Emits Energy to the adjacent Blocks. Also compatible with adjacent IC2 TileEntities when electric and RF TileEntities when RedstoneFlux.
- * @return the amount of used secondary value.
- */
- public static final long emitEnergyToNetwork(SubTag aEnergyType, long aPrimary, long aSecondary, IExperimentalEnergyTileEntity aEmitter) {
- long rUsedSecondary = 0;
- checkAvailabilities();
- for (byte i = 0, j = 0; i < 6 && aSecondary > rUsedSecondary; i++) if (aEmitter.outputsEnergyTo(aEnergyType, i)) {
- j = GT_Utility.getOppositeSide(i);
- TileEntity tTileEntity = aEmitter.getTileEntityAtSide(i);
- if (tTileEntity instanceof IExperimentalEnergyTileEntity) {
- if (aEmitter.getColorization() >= 0) {
- byte tColor = ((IExperimentalEnergyTileEntity)tTileEntity).getColorization();
- if (tColor >= 0 && tColor != aEmitter.getColorization()) continue;
- }
- rUsedSecondary+=((IExperimentalEnergyTileEntity)tTileEntity).injectEnergy(aEnergyType, j, aPrimary, aSecondary-rUsedSecondary);
- } else if (IC_ENERGY && aEnergyType == SubTag.ENERGY_ELECTRICITY && tTileEntity instanceof IEnergySink) {
- if (((IEnergySink)tTileEntity).acceptsEnergyFrom((TileEntity)aEmitter, ForgeDirection.getOrientation(j))) {
- while (aSecondary > rUsedSecondary && ((IEnergySink)tTileEntity).getDemandedEnergy() > 0 && ((IEnergySink)tTileEntity).injectEnergy(ForgeDirection.getOrientation(j), aPrimary, aPrimary) < aPrimary) rUsedSecondary++;
- }
- } else if (RF_ENERGY && aEnergyType == SubTag.ENERGY_REDSTONE_FLUX && tTileEntity instanceof IEnergyReceiver && ((IEnergyReceiver)tTileEntity).canConnectEnergy(ForgeDirection.getOrientation(j))) {
- rUsedSecondary+=((IEnergyReceiver)tTileEntity).receiveEnergy(ForgeDirection.getOrientation(j), (int)aSecondary, F);
- }
- }
- return rUsedSecondary;
- }
- }
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/interfaces/tileentity/IFibreConnected.java b/main/java/gregtech/api/interfaces/tileentity/IFibreConnected.java
deleted file mode 100644
index 7694b3d1c3..0000000000
--- a/main/java/gregtech/api/interfaces/tileentity/IFibreConnected.java
+++ /dev/null
@@ -1,31 +0,0 @@
-package gregtech.api.interfaces.tileentity;
-
-/**
- * This File has just internal Information about the Fibre Redstone State of a TileEntity
- */
-public interface IFibreConnected extends IColoredTileEntity, IHasWorldObjectAndCoords {
- /**
- * If this Blocks accepts Fibre from this Side
- */
- public void inputFibreFrom(byte aSide);
-
- /**
- * If this Blocks emits Fibre to this Side
- */
- public void outputsFibreTo(byte aSide);
-
- /**
- * Sets the Signal this Blocks outputs to this Fibre Color
- */
- public void setFibreOutput(byte aSide, byte aColor, byte aRedstoneStrength);
-
- /**
- * Gets the Signal this Blocks outputs to this Fibre Color
- */
- public byte getFibreOutput(byte aSide, byte aColor);
-
- /**
- * Gets the Signal this Blocks receives from this Fibre Color
- */
- public byte getFibreInput(byte aSide, byte aColor);
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/interfaces/tileentity/IGearEnergyTileEntity.java b/main/java/gregtech/api/interfaces/tileentity/IGearEnergyTileEntity.java
deleted file mode 100644
index 6ae032b874..0000000000
--- a/main/java/gregtech/api/interfaces/tileentity/IGearEnergyTileEntity.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package gregtech.api.interfaces.tileentity;
-
-public interface IGearEnergyTileEntity {
- /**
- * If Rotation Energy can be accepted on this Side.
- * This means that the Gear/Axle will connect to this Side, and can cause the Gear/Axle to stop if the Energy isn't accepted.
- */
- public boolean acceptsRotationalEnergy(byte aSide);
-
- /**
- * Inject Energy Call for Rotational Energy.
- * Rotation Energy can't be stored, this is just for things like internal Dynamos, which convert it into Energy, or into Progress.
- * @param aSpeed Positive = Clockwise, Negative = Counterclockwise
- */
- public boolean injectRotationalEnergy(byte aSide, long aSpeed, long aEnergy);
-}
diff --git a/main/java/gregtech/api/interfaces/tileentity/IGregTechDeviceInformation.java b/main/java/gregtech/api/interfaces/tileentity/IGregTechDeviceInformation.java
deleted file mode 100644
index f6393f5d10..0000000000
--- a/main/java/gregtech/api/interfaces/tileentity/IGregTechDeviceInformation.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package gregtech.api.interfaces.tileentity;
-
-/**
- * You are allowed to include this File in your Download, as i will not change it.
- */
-public interface IGregTechDeviceInformation {
- /**
- * Is this even a TileEntity which allows GregTech Sensor Kits?
- * I need things like this Function for MetaTileEntities, you MUST check this!!!
- * Do not assume that it's a Information returning Device, when it just implements this Interface.
- */
- public boolean isGivingInformation();
-
- /**
- * Up to 8 Strings can be returned.
- * Note: If you insert "\\\\" in the String it tries to translate seperate Parts of the String instead of the String as a whole.
- * @return an Array of Information Strings. Don't return null!
- */
- public String[] getInfoData();
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/interfaces/tileentity/IGregTechTileEntity.java b/main/java/gregtech/api/interfaces/tileentity/IGregTechTileEntity.java
deleted file mode 100644
index 7419214dcb..0000000000
--- a/main/java/gregtech/api/interfaces/tileentity/IGregTechTileEntity.java
+++ /dev/null
@@ -1,124 +0,0 @@
-package gregtech.api.interfaces.tileentity;
-
-import gregtech.api.interfaces.IDescribable;
-import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.util.AxisAlignedBB;
-import net.minecraft.world.World;
-import net.minecraftforge.fluids.IFluidHandler;
-
-/**
- * A simple compound Interface for all my TileEntities.
- *
- * Also delivers most of the Informations about my TileEntities.
- *
- * It can cause Problems to include this Interface!
- */
-public interface IGregTechTileEntity extends ITexturedTileEntity, IGearEnergyTileEntity, ICoverable, IFluidHandler, ITurnable, IGregTechDeviceInformation, IUpgradableMachine, IDigitalChest, IDescribable, IMachineBlockUpdateable {
- /**
- * gets the Error displayed on the GUI
- */
- public int getErrorDisplayID();
-
- /**
- * sets the Error displayed on the GUI
- */
- public void setErrorDisplayID(int aErrorID);
-
- /**
- * @return the MetaID of the Block or the MetaTileEntity ID.
- */
- public int getMetaTileID();
-
- /**
- * Internal Usage only!
- */
- public int setMetaTileID(short aID);
-
- /**
- * @return the MetaTileEntity which is belonging to this, or null if it doesnt has one.
- */
- public IMetaTileEntity getMetaTileEntity();
-
- /**
- * Sets the MetaTileEntity.
- * Even though this uses the Universal Interface, certain BaseMetaTileEntities only accept one kind of MetaTileEntity
- * so only use this if you are sure its the correct one or you will get a Class cast Error.
- * @param aMetaTileEntity
- */
- public void setMetaTileEntity(IMetaTileEntity aMetaTileEntity);
-
- /**
- * Causes a general Texture update.
- *
- * Only used Client Side to mark Blocks dirty.
- */
- public void issueTextureUpdate();
-
- /**
- * Causes the Machine to send its initial Data, like Covers and its ID.
- */
- public void issueClientUpdate();
-
- /**
- * causes Explosion. Strength in Overload-EU
- */
- public void doExplosion(long aExplosionEU);
-
- /**
- * Sets the Block on Fire in all 6 Directions
- */
- public void setOnFire();
-
- /**
- * Sets the Block to Fire
- */
- public void setToFire();
-
- /**
- * Sets the Owner of the Machine. Returns the set Name.
- */
- public String setOwnerName(String aName);
-
- /**
- * gets the Name of the Machines Owner or "Player" if not set.
- */
- public String getOwnerName();
-
- /**
- * Sets initial Values from NBT
- * @param tNBT is the NBTTag of readFromNBT
- * @param aID is the MetaTileEntityID
- */
- public void setInitialValuesAsNBT(NBTTagCompound aNBT, short aID);
-
- /**
- * Called when leftclicking the TileEntity
- */
- public void onLeftclick(EntityPlayer aPlayer);
-
- /**
- * Called when rightclicking the TileEntity
- */
- public boolean onRightclick(EntityPlayer aPlayer, byte aSide, float par1, float par2, float par3);
-
- public float getBlastResistance(byte aSide);
-
- public ArrayList<ItemStack> getDrops();
-
- /**
- * 255 = 100%
- */
- public int getLightOpacity();
-
- public void addCollisionBoxesToList(World aWorld, int aX, int aY, int aZ, AxisAlignedBB inputAABB, List<AxisAlignedBB> outputAABB, Entity collider);
- public AxisAlignedBB getCollisionBoundingBoxFromPool(World aWorld, int aX, int aY, int aZ);
- public void onEntityCollidedWithBlock(World aWorld, int aX, int aY, int aZ, Entity collider);
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/interfaces/tileentity/IHasInventory.java b/main/java/gregtech/api/interfaces/tileentity/IHasInventory.java
deleted file mode 100644
index 3b3d4ee75d..0000000000
--- a/main/java/gregtech/api/interfaces/tileentity/IHasInventory.java
+++ /dev/null
@@ -1,33 +0,0 @@
-package gregtech.api.interfaces.tileentity;
-
-import net.minecraft.inventory.ISidedInventory;
-import net.minecraft.item.ItemStack;
-
-public interface IHasInventory extends ISidedInventory, IHasWorldObjectAndCoords {
-
- /**
- * if the Inventory of this TileEntity got modified this tick
- */
- public boolean hasInventoryBeenModified();
-
- /**
- * if this is just a Holoslot
- */
- public boolean isValidSlot(int aIndex);
-
- /**
- * Tries to add a Stack to the Slot.
- * It doesn't matter if the Slot is valid or invalid as described at the Function above.
- *
- * @return true if aStack == null, then false if aIndex is out of bounds, then false if aStack cannot be added, and then true if aStack has been added
- */
- public boolean addStackToSlot(int aIndex, ItemStack aStack);
-
- /**
- * Tries to add X Items of a Stack to the Slot.
- * It doesn't matter if the Slot is valid or invalid as described at the Function above.
- *
- * @return true if aStack == null, then false if aIndex is out of bounds, then false if aStack cannot be added, and then true if aStack has been added
- */
- public boolean addStackToSlot(int aIndex, ItemStack aStack, int aAmount);
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/interfaces/tileentity/IHasWorldObjectAndCoords.java b/main/java/gregtech/api/interfaces/tileentity/IHasWorldObjectAndCoords.java
deleted file mode 100644
index c6ebb56e40..0000000000
--- a/main/java/gregtech/api/interfaces/tileentity/IHasWorldObjectAndCoords.java
+++ /dev/null
@@ -1,132 +0,0 @@
-package gregtech.api.interfaces.tileentity;
-
-import net.minecraft.block.Block;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.inventory.IInventory;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.world.World;
-import net.minecraft.world.biome.BiomeGenBase;
-import net.minecraftforge.fluids.IFluidHandler;
-
-/**
- * This is a bunch of Functions my TileEntities provide, to make life much easier, and to get rid of internal TileEntity stuff.
- *
- * This also makes access to adjacent TileEntities more Efficient.
- *
- * Note: It doesn't have to be a TileEntity in certain cases! And only certain cases, such as the Recipe checking of the findRecipe Function.
- */
-public interface IHasWorldObjectAndCoords {
- public World getWorld();
- public int getXCoord();
- public short getYCoord();
- public int getZCoord();
-
- public boolean isServerSide();
- public boolean isClientSide();
-
- public int getRandomNumber(int aRange);
-
- public TileEntity getTileEntity(int aX, int aY, int aZ);
- public TileEntity getTileEntityOffset(int aX, int aY, int aZ);
- public TileEntity getTileEntityAtSide(byte aSide);
- public TileEntity getTileEntityAtSideAndDistance(byte aSide, int aDistance);
-
- public IInventory getIInventory(int aX, int aY, int aZ);
- public IInventory getIInventoryOffset(int aX, int aY, int aZ);
- public IInventory getIInventoryAtSide(byte aSide);
- public IInventory getIInventoryAtSideAndDistance(byte aSide, int aDistance);
-
- public IFluidHandler getITankContainer(int aX, int aY, int aZ);
- public IFluidHandler getITankContainerOffset(int aX, int aY, int aZ);
- public IFluidHandler getITankContainerAtSide(byte aSide);
- public IFluidHandler getITankContainerAtSideAndDistance(byte aSide, int aDistance);
-
- public IGregTechTileEntity getIGregTechTileEntity(int aX, int aY, int aZ);
- public IGregTechTileEntity getIGregTechTileEntityOffset(int aX, int aY, int aZ);
- public IGregTechTileEntity getIGregTechTileEntityAtSide(byte aSide);
- public IGregTechTileEntity getIGregTechTileEntityAtSideAndDistance(byte aSide, int aDistance);
-
- public Block getBlock(int aX, int aY, int aZ);
- public Block getBlockOffset(int aX, int aY, int aZ);
- public Block getBlockAtSide(byte aSide);
- public Block getBlockAtSideAndDistance(byte aSide, int aDistance);
-
- public byte getMetaID(int aX, int aY, int aZ);
- public byte getMetaIDOffset(int aX, int aY, int aZ);
- public byte getMetaIDAtSide(byte aSide);
- public byte getMetaIDAtSideAndDistance(byte aSide, int aDistance);
-
- public byte getLightLevel(int aX, int aY, int aZ);
- public byte getLightLevelOffset(int aX, int aY, int aZ);
- public byte getLightLevelAtSide(byte aSide);
- public byte getLightLevelAtSideAndDistance(byte aSide, int aDistance);
-
- public boolean getOpacity(int aX, int aY, int aZ);
- public boolean getOpacityOffset(int aX, int aY, int aZ);
- public boolean getOpacityAtSide(byte aSide);
- public boolean getOpacityAtSideAndDistance(byte aSide, int aDistance);
-
- public boolean getSky(int aX, int aY, int aZ);
- public boolean getSkyOffset(int aX, int aY, int aZ);
- public boolean getSkyAtSide(byte aSide);
- public boolean getSkyAtSideAndDistance(byte aSide, int aDistance);
-
- public boolean getAir(int aX, int aY, int aZ);
- public boolean getAirOffset(int aX, int aY, int aZ);
- public boolean getAirAtSide(byte aSide);
- public boolean getAirAtSideAndDistance(byte aSide, int aDistance);
-
- public BiomeGenBase getBiome();
- public BiomeGenBase getBiome(int aX, int aZ);
-
- public int getOffsetX(byte aSide, int aMultiplier);
- public short getOffsetY(byte aSide, int aMultiplier);
- public int getOffsetZ(byte aSide, int aMultiplier);
-
- /**
- * Checks if the TileEntity is Invalid or Unloaded. Stupid Minecraft cannot do that btw.
- */
- public boolean isDead();
-
- /**
- * Sends a Block Event to the Client TileEntity, the byte Parameters are only for validation as Minecraft doesn't properly write Packet Data.
- */
- public void sendBlockEvent(byte aID, byte aValue);
-
- /**
- * @return the Time this TileEntity has been loaded.
- */
- public long getTimer();
-
- /**
- * Sets the Light Level of this Block on a Scale of 0 - 15
- * It could be that it doesn't work. This is just for convenience.
- */
- public void setLightValue(byte aLightValue);
-
- /**
- * Function of the regular TileEntity
- */
- public void writeToNBT(NBTTagCompound aNBT);
-
- /**
- * Function of the regular TileEntity
- */
- public void readFromNBT(NBTTagCompound aNBT);
-
- /**
- * Function of the regular TileEntity
- */
- public boolean isInvalidTileEntity();
-
- /**
- * Opens the GUI with this ID of this MetaTileEntity
- */
- public boolean openGUI(EntityPlayer aPlayer, int aID);
-
- /**
- * Opens the GUI with the ID = 0 of this TileEntity
- */
- public boolean openGUI(EntityPlayer aPlayer);
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/interfaces/tileentity/IMachineBlockUpdateable.java b/main/java/gregtech/api/interfaces/tileentity/IMachineBlockUpdateable.java
deleted file mode 100644
index ba8650f245..0000000000
--- a/main/java/gregtech/api/interfaces/tileentity/IMachineBlockUpdateable.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package gregtech.api.interfaces.tileentity;
-
-/**
- * You are allowed to include this File in your Download, as i will not change it.
- * Simple Interface for Machines, which need my Machine Blocks for MultiBlockStructures.
- *
- * Every Machine implementing this Interface will conduct Machine updates.
- */
-public interface IMachineBlockUpdateable {
- /**
- * The Machine Update, which is called when the Machine needs an Update of its Parts.
- * I suggest to wait 1-5 seconds before actually checking the Machine Parts.
- * RP-Frames could for example cause Problems when you instacheck the Machine Parts.
- */
- public void onMachineBlockUpdate();
-}
diff --git a/main/java/gregtech/api/interfaces/tileentity/IMachineProgress.java b/main/java/gregtech/api/interfaces/tileentity/IMachineProgress.java
deleted file mode 100644
index 78f238aa3e..0000000000
--- a/main/java/gregtech/api/interfaces/tileentity/IMachineProgress.java
+++ /dev/null
@@ -1,69 +0,0 @@
-package gregtech.api.interfaces.tileentity;
-
-/**
- * For Machines which have Progress
- */
-public interface IMachineProgress extends IHasWorldObjectAndCoords {
- /**
- * returns the Progress this Machine has made. Warning, this can also be negative!
- */
- public int getProgress();
-
- /**
- * returns the Progress the Machine needs to complete its task.
- */
- public int getMaxProgress();
-
- /**
- * increases the Progress of the Machine
- */
- public boolean increaseProgress(int aProgressAmountInTicks);
-
- /**
- * returns if the Machine currently does something.
- */
- public boolean hasThingsToDo();
-
- /**
- * returns if the Machine just got enableWorking called after being disabled.
- * Used for Translocators, which need to check if they need to transfer immediately.
- */
- public boolean hasWorkJustBeenEnabled();
-
- /**
- * allows Machine to work
- */
- public void enableWorking();
-
- /**
- * disallows Machine to work
- */
- public void disableWorking();
-
- /**
- * if the Machine is allowed to Work
- */
- public boolean isAllowedToWork();
-
- /**
- * used to control Machines via Redstone Signal Strength by special Covers
- * only Values between 0 and 15!
- */
- public void setWorkDataValue(byte aValue);
-
- /**
- * used to control Machines via Redstone Signal Strength by special Covers
- * In case of 0 the Machine is very likely doing nothing, or is just not being controlled at all.
- */
- public byte getWorkDataValue();
-
- /**
- * gives you the Active Status of the Machine
- */
- public boolean isActive();
-
- /**
- * sets the visible Active Status of the Machine
- */
- public void setActive(boolean aActive);
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/interfaces/tileentity/IPipeRenderedTileEntity.java b/main/java/gregtech/api/interfaces/tileentity/IPipeRenderedTileEntity.java
deleted file mode 100644
index 0ddc76a6d6..0000000000
--- a/main/java/gregtech/api/interfaces/tileentity/IPipeRenderedTileEntity.java
+++ /dev/null
@@ -1,9 +0,0 @@
-package gregtech.api.interfaces.tileentity;
-
-import gregtech.api.interfaces.ITexture;
-
-public interface IPipeRenderedTileEntity extends ICoverable, ITexturedTileEntity {
- public float getThickNess();
- public byte getConnections();
- public ITexture[] getTextureUncovered(byte aSide);
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/interfaces/tileentity/IRedstoneEmitter.java b/main/java/gregtech/api/interfaces/tileentity/IRedstoneEmitter.java
deleted file mode 100644
index 720f7e9bc5..0000000000
--- a/main/java/gregtech/api/interfaces/tileentity/IRedstoneEmitter.java
+++ /dev/null
@@ -1,37 +0,0 @@
-package gregtech.api.interfaces.tileentity;
-
-/**
- * This File has just internal Information about the Redstone State of a TileEntity
- */
-public interface IRedstoneEmitter extends IHasWorldObjectAndCoords {
- /**
- * gets the Redstone Level the TileEntity should emit to the given Output Side
- */
- byte getOutputRedstoneSignal(byte aSide);
-
- /**
- * sets the Redstone Level the TileEntity should emit to the given Output Side
- *
- * Do not use this if ICoverable is implemented. ICoverable has @getInternalOutputRedstoneSignal for Machine internal Output Redstone, so that it doesnt conflict with Cover Redstone.
- * This sets the true Redstone Output Signal. Only Cover Behaviors should use it, not MetaTileEntities.
- */
- void setOutputRedstoneSignal(byte aSide, byte aStrength);
-
- /**
- * gets the Redstone Level the TileEntity should emit to the given Output Side
- */
- byte getStrongOutputRedstoneSignal(byte aSide);
-
- /**
- * sets the Redstone Level the TileEntity should emit to the given Output Side
- *
- * Do not use this if ICoverable is implemented. ICoverable has @getInternalOutputRedstoneSignal for Machine internal Output Redstone, so that it doesnt conflict with Cover Redstone.
- * This sets the true Redstone Output Signal. Only Cover Behaviors should use it, not MetaTileEntities.
- */
- void setStrongOutputRedstoneSignal(byte aSide, byte aStrength);
-
- /**
- * Gets the Output for the comparator on the given Side
- */
- byte getComparatorValue(byte aSide);
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/interfaces/tileentity/IRedstoneReceiver.java b/main/java/gregtech/api/interfaces/tileentity/IRedstoneReceiver.java
deleted file mode 100644
index f4c63c803e..0000000000
--- a/main/java/gregtech/api/interfaces/tileentity/IRedstoneReceiver.java
+++ /dev/null
@@ -1,29 +0,0 @@
-package gregtech.api.interfaces.tileentity;
-
-/**
- * This File has just internal Information about the Redstone State of a TileEntity
- */
-public interface IRedstoneReceiver extends IHasWorldObjectAndCoords {
- /**
- * gets the Redstone Level of the TileEntity to the given Input Side
- *
- * Do not use this if ICoverable is implemented. ICoverable has @getInternalInputRedstoneSignal for Machine internal Input Redstone
- * This returns the true incoming Redstone Signal. Only Cover Behaviors should check it, not MetaTileEntities.
- */
- public byte getInputRedstoneSignal(byte aSide);
-
- /**
- * gets the strongest Redstone Level the TileEntity receives
- */
- public byte getStrongestRedstone();
-
- /**
- * gets if the TileEntity receives Redstone
- */
- public boolean getRedstone();
-
- /**
- * gets if the TileEntity receives Redstone at this Side
- */
- public boolean getRedstone(byte aSide);
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/interfaces/tileentity/IRedstoneTileEntity.java b/main/java/gregtech/api/interfaces/tileentity/IRedstoneTileEntity.java
deleted file mode 100644
index a1d2b533cb..0000000000
--- a/main/java/gregtech/api/interfaces/tileentity/IRedstoneTileEntity.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package gregtech.api.interfaces.tileentity;
-
-/**
- * This File has just internal Information about the Redstone State of a TileEntity
- */
-public interface IRedstoneTileEntity extends IRedstoneEmitter, IRedstoneReceiver {
- /**
- * enables/disables Redstone Output in general.
- */
- void setGenericRedstoneOutput(boolean aOnOff);
-
- /**
- * Causes a general Block update.
- * Sends nothing to Client, just causes a Block Update.
- */
- public void issueBlockUpdate();
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/interfaces/tileentity/ITexturedTileEntity.java b/main/java/gregtech/api/interfaces/tileentity/ITexturedTileEntity.java
deleted file mode 100644
index 3c0782ba2e..0000000000
--- a/main/java/gregtech/api/interfaces/tileentity/ITexturedTileEntity.java
+++ /dev/null
@@ -1,10 +0,0 @@
-package gregtech.api.interfaces.tileentity;
-
-import gregtech.api.interfaces.ITexture;
-
-public interface ITexturedTileEntity {
- /**
- * @return the Textures rendered by the GT Rendering
- */
- public ITexture[] getTexture(byte aSide);
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/interfaces/tileentity/ITurnable.java b/main/java/gregtech/api/interfaces/tileentity/ITurnable.java
deleted file mode 100644
index 1605bd677e..0000000000
--- a/main/java/gregtech/api/interfaces/tileentity/ITurnable.java
+++ /dev/null
@@ -1,33 +0,0 @@
-package gregtech.api.interfaces.tileentity;
-
-
-/**
- * Implemented by all my Machines. However without any security checks, if the Players are even allowed to rotate it.
- */
-public interface ITurnable {
- /**
- * Get the block's facing.
- *
- * @return front Block facing
- */
- byte getFrontFacing();
-
- /**
- * Get the block's back facing.
- *
- * @return opposite Block facing
- */
- byte getBackFacing();
-
- /**
- * Determine if the wrench can be used to set the block's facing.
- */
- boolean isValidFacing(byte aSide);
-
- /**
- * Set the block's facing
- *
- * @param facing facing to set the block to
- */
- void setFrontFacing(byte aSide);
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/interfaces/tileentity/IUpgradableMachine.java b/main/java/gregtech/api/interfaces/tileentity/IUpgradableMachine.java
deleted file mode 100644
index 97360fd514..0000000000
--- a/main/java/gregtech/api/interfaces/tileentity/IUpgradableMachine.java
+++ /dev/null
@@ -1,42 +0,0 @@
-package gregtech.api.interfaces.tileentity;
-
-
-/**
- * To access my Machines a bit easier
- */
-public interface IUpgradableMachine extends IMachineProgress {
- /**
- * Accepts Upgrades. Some Machines have an Upgrade Limit.
- */
- boolean isUpgradable();
-
- /**
- * Accepts Muffler Upgrades
- */
- boolean isMufflerUpgradable();
-
- /**
- * Accepts Steam-Converter Upgrades
- */
- boolean isSteamEngineUpgradable();
-
- /**
- * Adds Muffler Upgrade
- */
- boolean addMufflerUpgrade();
-
- /**
- * Adds MJ-Converter Upgrade
- */
- boolean addSteamEngineUpgrade();
-
- /**
- * Does this Machine have an Muffler
- */
- boolean hasMufflerUpgrade();
-
- /**
- * Does this Machine have a Steam-Converter
- */
- boolean hasSteamEngineUpgrade();
-}
diff --git a/main/java/gregtech/api/items/GT_CoolantCellIC_Item.java b/main/java/gregtech/api/items/GT_CoolantCellIC_Item.java
deleted file mode 100644
index c24e3947f2..0000000000
--- a/main/java/gregtech/api/items/GT_CoolantCellIC_Item.java
+++ /dev/null
@@ -1,78 +0,0 @@
-package gregtech.api.items;
-
-
-import ic2.api.reactor.IReactor;
-import ic2.api.reactor.IReactorComponent;
-import net.minecraft.item.ItemStack;
-
-public class GT_CoolantCellIC_Item
- extends GT_CoolantCell_Item
- implements IReactorComponent
-{
- public GT_CoolantCellIC_Item(String aUnlocalized, String aEnglish, int aMaxStore)
- {
- super(aUnlocalized, aEnglish, aMaxStore);
- }
-
- public void processChamber(IReactor aReactor, ItemStack aStack, int x, int y, boolean aHeatRun) {}
-
- public boolean acceptUraniumPulse(IReactor aReactor, ItemStack aStack, ItemStack pulsingStack, int youX, int youY, int pulseX, int pulseY, boolean aHeatRun)
- {
- return false;
- }
-
- public boolean canStoreHeat(IReactor aReactor, ItemStack aStack, int x, int y)
- {
- if(aReactor.isFluidCooled()&&(getControlTagOfStack(aStack))!=0){
- return false;
- }
- return true;
- }
-
- public int getMaxHeat(IReactor aReactor, ItemStack aStack, int x, int y)
- {
- return this.heatStorage;
- }
-
- public int getCurrentHeat(IReactor aReactor, ItemStack aStack, int x, int y)
- {
- return getHeatOfStack(aStack);
- }
-
- public float influenceExplosion(IReactor aReactor, ItemStack aStack)
- {
- return 1.0F + this.heatStorage / 30000.0F;
- }
-
- public int alterHeat(IReactor aReactor, ItemStack aStack, int x, int y, int aHeat)
- {
-
- int tHeat = getHeatOfStack(aStack);
- if ((tHeat == 0) && (getControlTagOfStack(aStack) != 0)) {
- setControlTagOfStack(aStack, 0);
- }
- tHeat += aHeat;
- if (tHeat > this.heatStorage)
- {
- aReactor.setItemAt(x, y, (ItemStack)null);
- aHeat = this.heatStorage - tHeat + 1;
- }
- else
- {
- if (tHeat < 0)
- {
- aHeat = tHeat;
- tHeat = 0;
- }
- else
- {
- aHeat = 0;
- }
- if ((tHeat > 0) && (getControlTagOfStack(aStack) == 0) && (!aReactor.isFluidCooled())) {
- setControlTagOfStack(aStack, 1);
- }
- setHeatForStack(aStack, tHeat);
- }
- return aHeat;
- }
-}
diff --git a/main/java/gregtech/api/items/GT_CoolantCell_Item.java b/main/java/gregtech/api/items/GT_CoolantCell_Item.java
deleted file mode 100644
index fe56ffc310..0000000000
--- a/main/java/gregtech/api/items/GT_CoolantCell_Item.java
+++ /dev/null
@@ -1,82 +0,0 @@
-package gregtech.api.items;
-
-import gregtech.api.GregTech_API;
-import ic2.core.util.StackUtil;
-
-import java.util.List;
-
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.util.StatCollector;
-
-public class GT_CoolantCell_Item
- extends GT_Generic_Item
-{
- protected int heatStorage;
-
- public GT_CoolantCell_Item(String aUnlocalized, String aEnglish, int aMaxStore)
- {
- super(aUnlocalized, aEnglish, null);
- this.setMaxStackSize(1);
- this.setMaxDamage(100);
- setNoRepair();
- this.heatStorage = aMaxStore;
- this.setCreativeTab(GregTech_API.TAB_GREGTECH);
- }
-
- protected void setHeatForStack(ItemStack aStack, int aHeat)
- {
- NBTTagCompound tNBT = aStack.getTagCompound();
- if (tNBT == null)
- {
- tNBT = new NBTTagCompound();
- aStack.setTagCompound(tNBT);
- }
- tNBT.setInteger("heat", aHeat);
- if (this.heatStorage > 0)
- {
- double var4 = (double)aHeat / (double)this.heatStorage;
- int var6 = (int)(aStack.getMaxDamage() * var4);
- if (var6 >= aStack.getMaxDamage()) {
- var6 = aStack.getMaxDamage() - 1;
- }
- aStack.setItemDamage(var6);
- }
- }
-
- public void addAdditionalToolTips(List aList, ItemStack aStack)
- {
- super.addAdditionalToolTips(aList, aStack);
- aList.add("Stored Heat: " + getHeatOfStack(aStack));
- switch (getControlTagOfStack(aStack))
- {
- case 1:
- aList.add(StatCollector.translateToLocal("ic2.reactoritem.heatwarning.line1"));
- aList.add(StatCollector.translateToLocal("ic2.reactoritem.heatwarning.line2"));
- }
- }
-
- protected static int getHeatOfStack(ItemStack aStack)
- {
- NBTTagCompound tNBT = aStack.getTagCompound();
- if (tNBT == null)
- {
- tNBT = new NBTTagCompound();
- aStack.setTagCompound(tNBT);
- }
- return tNBT.getInteger("heat");
- }
-
- public int getControlTagOfStack(ItemStack stack)
- {
- NBTTagCompound nbtData = StackUtil.getOrCreateNbtData(stack);
- return nbtData.getInteger("tag");
- }
-
- public void setControlTagOfStack(ItemStack stack, int tag)
- {
- NBTTagCompound nbtData = StackUtil.getOrCreateNbtData(stack);
- nbtData.setInteger("tag", tag);
- }
-
-}
diff --git a/main/java/gregtech/api/items/GT_EnergyArmor_Item.java b/main/java/gregtech/api/items/GT_EnergyArmor_Item.java
deleted file mode 100644
index 4cbfd5445d..0000000000
--- a/main/java/gregtech/api/items/GT_EnergyArmor_Item.java
+++ /dev/null
@@ -1,327 +0,0 @@
-package gregtech.api.items;
-
-import static gregtech.api.enums.GT_Values.RES_PATH_ITEM;
-import gregtech.api.GregTech_API;
-import gregtech.api.util.GT_LanguageManager;
-import gregtech.api.util.GT_ModHandler;
-import gregtech.api.util.GT_Utility;
-
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.creativetab.CreativeTabs;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemArmor;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.potion.Potion;
-import net.minecraft.potion.PotionEffect;
-import net.minecraft.util.DamageSource;
-import net.minecraft.util.MathHelper;
-import net.minecraft.world.World;
-import net.minecraftforge.common.ISpecialArmor;
-import net.minecraftforge.common.MinecraftForge;
-import net.minecraftforge.event.entity.living.LivingFallEvent;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-
-public class GT_EnergyArmor_Item extends ItemArmor implements ISpecialArmor {
- public int mCharge, mTransfer, mTier, mDamageEnergyCost, mSpecials;
- public boolean mChargeProvider;
- public double mArmorAbsorbtionPercentage;
-
- public static Map jumpChargeMap = new HashMap();
-
- public GT_EnergyArmor_Item(int aID, String aUnlocalized, String aEnglish, int aCharge, int aTransfer, int aTier, int aDamageEnergyCost, int aSpecials, double aArmorAbsorbtionPercentage, boolean aChargeProvider, int aType, int aArmorIndex) {
- super(ArmorMaterial.DIAMOND, aArmorIndex, aType);
- setMaxStackSize(1);
- setMaxDamage(100);
- setNoRepair();
- setUnlocalizedName(aUnlocalized);
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".name", aEnglish);
- mCharge = Math.max(1, aCharge);
- mTransfer = Math.max(1, aTransfer);
- mTier = Math.max(1, aTier);
- mSpecials = aSpecials;
- mChargeProvider = aChargeProvider;
- mDamageEnergyCost = Math.max(0, aDamageEnergyCost);
- mArmorAbsorbtionPercentage = aArmorAbsorbtionPercentage;
-
- setCreativeTab(GregTech_API.TAB_GREGTECH);
-
- MinecraftForge.EVENT_BUS.register(this);
- }
-
- @Override
- public ItemStack onItemRightClick(ItemStack aStack, World aWorld, EntityPlayer aPlayer) {
- ItemStack tStack = aPlayer.inventory.armorInventory[3-armorType];
- if (tStack != null) {
- for (int i = 0; i < 9; i++) {
- if (aPlayer.inventory.mainInventory[i] == aStack) {
- aPlayer.inventory.armorInventory[3-armorType] = aPlayer.inventory.mainInventory[i];
- aPlayer.inventory.mainInventory[i] = tStack;
- return tStack;
- }
- }
- }
- return super.onItemRightClick(aStack, aWorld, aPlayer);
- }
-
- @Override
- @SideOnly(Side.CLIENT)
- public void registerIcons(IIconRegister aIconRegister) {
- this.itemIcon = aIconRegister.registerIcon(RES_PATH_ITEM + getUnlocalizedName());
- }
-
- @Override
- public void addInformation(ItemStack aStack, EntityPlayer aPlayer, List aList, boolean aF3_H) {
- aList.add("Tier: " + mTier);
- if ((mSpecials & 1) != 0) aList.add("Rebreather");
- if ((mSpecials & 2) != 0) aList.add("Inertia Damper");
- if ((mSpecials & 4) != 0) aList.add("Food Replicator");
- if ((mSpecials & 8) != 0) aList.add("Medicine Module");
- if ((mSpecials & 16) != 0) aList.add("Lamp");
- if ((mSpecials & 32) != 0) aList.add("Solarpanel");
- if ((mSpecials & 64) != 0) aList.add("Extinguisher Module");
- if ((mSpecials & 128) != 0) aList.add("Jump Booster");
- if ((mSpecials & 256) != 0) aList.add("Speed Booster");
- if ((mSpecials & 512) != 0) aList.add("Invisibility Field");
- if ((mSpecials & 1024) != 0) aList.add("Infinite Charge");
- }
-
- private static void setCharge(ItemStack aStack) {
- NBTTagCompound tNBT = aStack.getTagCompound();
- if (tNBT == null) tNBT = new NBTTagCompound();
- tNBT.setInteger("charge", 1000000000);
- aStack.setTagCompound(tNBT);
- }
-
- @Override
- public void onArmorTick(World aWorld, EntityPlayer aPlayer, ItemStack aStack) {
- if (mSpecials == 0) return;
-
- if (!aPlayer.worldObj.isRemote && (mSpecials & 1) != 0) {
- int var4 = aPlayer.getAir();
- if (GT_ModHandler.canUseElectricItem(aStack, 1000) && var4 < 50) {
- aPlayer.setAir(var4 + 250);
- GT_ModHandler.useElectricItem(aStack, 1000, aPlayer);
- }
- }
-
- if (!aPlayer.worldObj.isRemote && (mSpecials & 4) != 0) {
- if (GT_ModHandler.canUseElectricItem(aStack, 50000) && aPlayer.getFoodStats().needFood()) {
- aPlayer.getFoodStats().addStats(1, 0.0F);
- GT_ModHandler.useElectricItem(aStack, 50000, aPlayer);
- }
- }
-
- if ((mSpecials & 8) != 0) {
- if (GT_ModHandler.canUseElectricItem(aStack, 10000) && aPlayer.isPotionActive(Potion.poison)) {
- GT_Utility.removePotion(aPlayer, Potion.poison.id);
- GT_ModHandler.useElectricItem(aStack, 10000, aPlayer);
- }
- if (GT_ModHandler.canUseElectricItem(aStack, 100000) && aPlayer.isPotionActive(Potion.wither)) {
- GT_Utility.removePotion(aPlayer, Potion.wither.id);
- GT_ModHandler.useElectricItem(aStack, 100000, aPlayer);
- }
- }
-
- if ((mSpecials & 64) != 0) {
- aPlayer.setFire(0);
- }
-
- if (!aPlayer.worldObj.isRemote && (mSpecials & 128) != 0) {
- float var6 = jumpChargeMap.containsKey(aPlayer) ? ((Float)jumpChargeMap.get(aPlayer)).floatValue() : 1.0F;
-
- if (GT_ModHandler.canUseElectricItem(aStack, 1000) && aPlayer.onGround && var6 < 1.0F) {
- var6 = 1.0F;
- GT_ModHandler.useElectricItem(aStack, 1000, aPlayer);
- }
-
- if (aPlayer.motionY >= 0.0D && var6 > 0.0F && !aPlayer.isInWater()) {
- if (GT_ModHandler.getJumpKeyDown(aPlayer) && GT_ModHandler.getBoostKeyDown(aPlayer)) {
- if (var6 == 1.0F) {
- aPlayer.motionX *= 3.5D;
- aPlayer.motionZ *= 3.5D;
- }
-
- aPlayer.motionY += (var6 * 0.3F);
- var6 = (float)(var6 * 0.75D);
- } else if (var6 < 1.0F) {
- var6 = 0.0F;
- }
- }
-
- jumpChargeMap.put(aPlayer, Float.valueOf(var6));
- }
-
- if ((mSpecials & 256) != 0) {
- if (GT_ModHandler.canUseElectricItem(aStack, 100) && aPlayer.isSprinting() && (aPlayer.onGround && Math.abs(aPlayer.motionX) + Math.abs(aPlayer.motionZ) > 0.10000000149011612D || aPlayer.isInWater())) {
- GT_ModHandler.useElectricItem(aStack, 100, aPlayer);
- float var7 = 0.22F;
-
- if (aPlayer.isInWater()) {
- GT_ModHandler.useElectricItem(aStack, 100, aPlayer);
- var7 = 0.1F;
-
-
- if (aPlayer.motionY > 0) {
- aPlayer.motionY += 0.10000000149011612D;
- }
- }
-
- if (var7 > 0.0F) {
- aPlayer.moveFlying(0.0F, 1.0F, var7);
- }
- }
- }
-
- if ((mSpecials & 512) != 0) {
- if (GT_ModHandler.canUseElectricItem(aStack, 10000)) {
- GT_ModHandler.useElectricItem(aStack, 10000, aPlayer);
- aPlayer.addPotionEffect(new PotionEffect(Potion.invisibility.getId(), 25, 1, true));
- }
- }
-
- if (!aPlayer.worldObj.isRemote && (mSpecials & (16|32)) != 0) {
- //if (GregTech_API.sWorldTickCounter%20==0) {
- ItemStack tTargetChargeItem = aStack, tTargetDechargeItem = aStack;
-
- if (GT_ModHandler.chargeElectricItem(tTargetChargeItem, 1, Integer.MAX_VALUE, true, true) < 1) {
- tTargetChargeItem = aPlayer.inventory.armorInventory[2];
- }
- if (GT_ModHandler.dischargeElectricItem(tTargetDechargeItem, 10, Integer.MAX_VALUE, true, true, true) < 10) {
- tTargetDechargeItem = aPlayer.inventory.armorInventory[2];
- }
-
- if (tTargetChargeItem == null || !GT_ModHandler.isElectricItem(tTargetChargeItem)) {
- tTargetChargeItem = null;
- }
- if (tTargetDechargeItem == null || !GT_ModHandler.isElectricItem(tTargetChargeItem) || !(aStack == tTargetDechargeItem || GT_ModHandler.isChargerItem(tTargetDechargeItem))) {
- tTargetDechargeItem = null;
- }
-
- if (aPlayer.worldObj.isDaytime() && aPlayer.worldObj.canBlockSeeTheSky(MathHelper.floor_double(aPlayer.posX), MathHelper.floor_double(aPlayer.posY+1), MathHelper.floor_double(aPlayer.posZ))) {
- if ((mSpecials & 32) != 0 && tTargetChargeItem != null) {
- GT_ModHandler.chargeElectricItem(tTargetChargeItem, 20, Integer.MAX_VALUE, true, false);
- }
- } else {
- /* TODO:
- if ((mSpecials & 16) != 0 && tTargetDechargeItem != null && GT_ModHandler.canUseElectricItem(tTargetDechargeItem, 10)) {
- if (aPlayer.worldObj.getBlock ((int)aPlayer.posX, (int)aPlayer.posY+1, (int)aPlayer.posZ) == Blocks.air)
- aPlayer.worldObj.setBlock ((int)aPlayer.posX, (int)aPlayer.posY+1, (int)aPlayer.posZ, GregTech_API.sBlockList[3]);
- GT_ModHandler.useElectricItem(tTargetDechargeItem, 10, aPlayer);
- }*/
- //}
- }
- }
- }
-
- @Override
- public boolean getShareTag() {
- return true;
- }
-
- @Override
- @SideOnly(Side.CLIENT)
- public void getSubItems(Item aItem, CreativeTabs var2, List var3) {
- ItemStack tCharged = new ItemStack(this, 1), tUncharged = new ItemStack(this, 1, getMaxDamage());
- GT_ModHandler.chargeElectricItem(tCharged, Integer.MAX_VALUE, Integer.MAX_VALUE, true, false);
- var3.add(tCharged);
- var3.add(tUncharged);
- }
-
- public boolean canProvideEnergy(ItemStack aStack) {
- if ((mSpecials & 1024) != 0) setCharge(aStack);
- return mChargeProvider;
- }
-
- public Item getChargedItem(ItemStack aStack) {
- if ((mSpecials & 1024) != 0) setCharge(aStack);
- return this;
- }
-
- public Item getEmptyItem(ItemStack aStack) {
- if ((mSpecials & 1024) != 0) setCharge(aStack);
- return this;
- }
-
- public int getMaxCharge(ItemStack aStack) {
- if ((mSpecials & 1024) != 0) setCharge(aStack);
- return mCharge;
- }
-
- public int getTier(ItemStack aStack) {
- if ((mSpecials & 1024) != 0) setCharge(aStack);
- return mTier;
- }
-
- public int getTransferLimit(ItemStack aStack) {
- if ((mSpecials & 1024) != 0) setCharge(aStack);
- return mTransfer;
- }
-
- @Override
- public int getItemEnchantability() {
- return 0;
- }
-
- @Override
- public boolean isBookEnchantable(ItemStack itemstack1, ItemStack itemstack2) {
- return false;
- }
-
- @Override
- public boolean getIsRepairable(ItemStack par1ItemStack, ItemStack par2ItemStack) {
- return false;
- }
-
- // TODO: @ForgeSubscribe
- public void onEntityLivingFallEvent(LivingFallEvent var1) {
- if (!var1.entity.worldObj.isRemote && var1.entity instanceof EntityPlayer) {
- EntityPlayer var2 = (EntityPlayer)var1.entity;
- for (int i = 0; i < 4; i++) {
- ItemStack var3 = var2.inventory.armorInventory[i];
- if (var3 != null && var3.getItem() == this && (mSpecials & 2) != 0) {
- int var4 = (int)var1.distance - 3;
- int var5 = (this.mDamageEnergyCost * var4) / 4;
- if (var5 <= GT_ModHandler.dischargeElectricItem(var3, Integer.MAX_VALUE, Integer.MAX_VALUE, true, true, true)) {
- GT_ModHandler.dischargeElectricItem(var3, var5, Integer.MAX_VALUE, true, false, true);
- var1.setCanceled(true);
- break;
- }
- }
- }
- }
- }
-
- @Override
- public ISpecialArmor.ArmorProperties getProperties(EntityLivingBase var1, ItemStack var2, DamageSource var3, double var4, int var6) {
- return new ISpecialArmor.ArmorProperties((var3 == DamageSource.fall && (mSpecials & 2) != 0)?10:0, getBaseAbsorptionRatio() * mArmorAbsorbtionPercentage, mDamageEnergyCost > 0 ? 25 * GT_ModHandler.dischargeElectricItem(var2, Integer.MAX_VALUE, Integer.MAX_VALUE, true, true, true) / mDamageEnergyCost : 0);
- }
-
- @Override
- public int getArmorDisplay(EntityPlayer var1, ItemStack var2, int var3) {
- return (int)Math.round(20.0D * getBaseAbsorptionRatio() * mArmorAbsorbtionPercentage);
- }
-
- @Override
- public void damageArmor(EntityLivingBase var1, ItemStack var2, DamageSource var3, int var4, int var5) {
- GT_ModHandler.dischargeElectricItem(var2, var4 * mDamageEnergyCost, Integer.MAX_VALUE, true, false, true);
- }
-
- private double getBaseAbsorptionRatio() {
- if (mArmorAbsorbtionPercentage <= 0) return 0.00;
- switch (this.armorType) {
- case 0: return 0.15;
- case 1: return 0.40;
- case 2: return 0.30;
- case 3: return 0.15;
- default: return 0.00;
- }
- }
-}
diff --git a/main/java/gregtech/api/items/GT_Generic_Block.java b/main/java/gregtech/api/items/GT_Generic_Block.java
deleted file mode 100644
index a4fd8b61a4..0000000000
--- a/main/java/gregtech/api/items/GT_Generic_Block.java
+++ /dev/null
@@ -1,19 +0,0 @@
-package gregtech.api.items;
-
-import static gregtech.api.enums.GT_Values.W;
-import gregtech.api.util.GT_LanguageManager;
-import net.minecraft.block.Block;
-import net.minecraft.block.material.Material;
-import net.minecraft.item.ItemBlock;
-import cpw.mods.fml.common.registry.GameRegistry;
-
-public class GT_Generic_Block extends Block {
- protected final String mUnlocalizedName;
-
- protected GT_Generic_Block(Class<? extends ItemBlock> aItemClass, String aName, Material aMaterial) {
- super(aMaterial);
- setBlockName(mUnlocalizedName = aName);
- GameRegistry.registerBlock(this, aItemClass, getUnlocalizedName());
- GT_LanguageManager.addStringLocalization(getUnlocalizedName()+"." + W + ".name", "Any Sub Block of this one");
- }
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/items/GT_Generic_Item.java b/main/java/gregtech/api/items/GT_Generic_Item.java
deleted file mode 100644
index a90c13a204..0000000000
--- a/main/java/gregtech/api/items/GT_Generic_Item.java
+++ /dev/null
@@ -1,144 +0,0 @@
-package gregtech.api.items;
-
-import static gregtech.api.enums.GT_Values.MOD_ID;
-import static gregtech.api.enums.GT_Values.RES_PATH_ITEM;
-import gregtech.api.GregTech_API;
-import gregtech.api.enums.SubTag;
-import gregtech.api.interfaces.IProjectileItem;
-import gregtech.api.util.GT_Config;
-import gregtech.api.util.GT_LanguageManager;
-import gregtech.api.util.GT_ModHandler;
-import gregtech.api.util.GT_Utility;
-
-import java.util.List;
-
-import net.minecraft.block.BlockDispenser;
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.dispenser.BehaviorDefaultDispenseItem;
-import net.minecraft.dispenser.BehaviorProjectileDispense;
-import net.minecraft.dispenser.IBlockSource;
-import net.minecraft.dispenser.IPosition;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.entity.IProjectile;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.entity.projectile.EntityArrow;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.EnumFacing;
-import net.minecraft.util.IIcon;
-import net.minecraft.world.World;
-import cpw.mods.fml.common.registry.GameRegistry;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-
-/**
- * Extended by most Items, also used as a fallback Item, to prevent the accidental deletion when Errors occur.
- */
-public class GT_Generic_Item extends Item implements IProjectileItem {
- protected IIcon mIcon;
- private final String mName, mTooltip;
-
- public GT_Generic_Item(String aUnlocalized, String aEnglish, String aEnglishTooltip) {
- this(aUnlocalized, aEnglish, aEnglishTooltip, true);
- }
-
- public GT_Generic_Item(String aUnlocalized, String aEnglish, String aEnglishTooltip, boolean aWriteToolTipIntoLangFile) {
- super();
- mName = "gt." + aUnlocalized;
- GT_LanguageManager.addStringLocalization(mName + ".name", aEnglish);
- if (GT_Utility.isStringValid(aEnglishTooltip)) GT_LanguageManager.addStringLocalization(mTooltip = mName + ".tooltip_main", aEnglishTooltip, aWriteToolTipIntoLangFile); else mTooltip = null;
- setCreativeTab(GregTech_API.TAB_GREGTECH);
- GameRegistry.registerItem(this, mName, MOD_ID);
- BlockDispenser.dispenseBehaviorRegistry.putObject(this, new GT_Item_Dispense());
- }
-
- @Override public final Item setUnlocalizedName(String aName) {return this;}
- @Override public final String getUnlocalizedName() {return mName;}
- @Override public String getUnlocalizedName(ItemStack aStack) {return getHasSubtypes()?mName+"."+getDamage(aStack):mName;}
-
- @Override
- @SideOnly(Side.CLIENT)
- public void registerIcons(IIconRegister aIconRegister) {
- mIcon = aIconRegister.registerIcon(RES_PATH_ITEM + (GT_Config.troll?"troll":mName));
- }
-
- @Override
- public boolean doesSneakBypassUse(World aWorld, int aX, int aY, int aZ, EntityPlayer aPlayer) {
- return true;
- }
-
- @Override
- public IIcon getIconFromDamage(int par1) {
- return mIcon;
- }
-
- public int getTier(ItemStack aStack) {
- return 0;
- }
-
- @Override
- public void addInformation(ItemStack aStack, EntityPlayer aPlayer, List aList, boolean aF3_H) {
- if (getMaxDamage() > 0 && !getHasSubtypes()) aList.add((aStack.getMaxDamage() - getDamage(aStack)) + " / " + aStack.getMaxDamage());
- if (mTooltip != null) aList.add(GT_LanguageManager.getTranslation(mTooltip));
- if (GT_ModHandler.isElectricItem(aStack)) aList.add("Tier: " + getTier(aStack));
- addAdditionalToolTips(aList, aStack);
- }
-
- protected void addAdditionalToolTips(List aList, ItemStack aStack) {
- //
- }
-
- @Override
- public void onCreated(ItemStack aStack, World aWorld, EntityPlayer aPlayer) {
- isItemStackUsable(aStack);
- }
-
- public boolean isItemStackUsable(ItemStack aStack) {
- return true;
- }
-
- public ItemStack onDispense(IBlockSource aSource, ItemStack aStack) {
- EnumFacing enumfacing = BlockDispenser.func_149937_b(aSource.getBlockMetadata());
- IPosition iposition = BlockDispenser.func_149939_a(aSource);
- ItemStack itemstack1 = aStack.splitStack(1);
- BehaviorDefaultDispenseItem.doDispense(aSource.getWorld(), itemstack1, 6, enumfacing, iposition);
- return aStack;
- }
-
- public static class GT_Item_Dispense extends BehaviorProjectileDispense {
- @Override
- public ItemStack dispenseStack(IBlockSource aSource, ItemStack aStack) {
- return ((GT_Generic_Item)aStack.getItem()).onDispense(aSource, aStack);
- }
-
- @Override
- protected IProjectile getProjectileEntity(World aWorld, IPosition aPosition) {
- return null;
- }
- }
-
- @Override
- public EntityArrow getProjectile(SubTag aProjectileType, ItemStack aStack, World aWorld, double aX, double aY, double aZ) {
- return null;
- }
-
- @Override
- public EntityArrow getProjectile(SubTag aProjectileType, ItemStack aStack, World aWorld, EntityLivingBase aEntity, float aSpeed) {
- return null;
- }
-
- @Override
- public boolean hasProjectile(SubTag aProjectileType, ItemStack aStack) {
- return false;
- }
-
- @Override
- public ItemStack getContainerItem(ItemStack aStack) {
- return null;
- }
-
- @Override
- public boolean hasContainerItem(ItemStack aStack) {
- return getContainerItem(aStack) != null;
- }
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/items/GT_MetaBase_Item.java b/main/java/gregtech/api/items/GT_MetaBase_Item.java
deleted file mode 100644
index 4a0cd6f655..0000000000
--- a/main/java/gregtech/api/items/GT_MetaBase_Item.java
+++ /dev/null
@@ -1,555 +0,0 @@
-package gregtech.api.items;
-
-import static gregtech.api.enums.GT_Values.D1;
-import static gregtech.api.enums.GT_Values.V;
-import gregtech.api.enums.SubTag;
-import gregtech.api.interfaces.IItemBehaviour;
-import gregtech.api.util.GT_LanguageManager;
-import gregtech.api.util.GT_Log;
-import gregtech.api.util.GT_ModHandler;
-import gregtech.api.util.GT_Utility;
-import ic2.api.item.ElectricItem;
-import ic2.api.item.IElectricItem;
-import ic2.api.item.IElectricItemManager;
-import ic2.api.item.ISpecialElectricItem;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-
-import net.minecraft.dispenser.IBlockSource;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.entity.projectile.EntityArrow;
-import net.minecraft.inventory.Container;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.world.World;
-import net.minecraftforge.fluids.FluidStack;
-import net.minecraftforge.fluids.IFluidContainerItem;
-
-public abstract class GT_MetaBase_Item extends GT_Generic_Item implements ISpecialElectricItem, IElectricItemManager, IFluidContainerItem {
- /* ---------- CONSTRUCTOR AND MEMBER VARIABLES ---------- */
- private final HashMap<Short, ArrayList<IItemBehaviour<GT_MetaBase_Item>>> mItemBehaviors = new HashMap<Short, ArrayList<IItemBehaviour<GT_MetaBase_Item>>>();
-
- /**
- * Creates the Item using these Parameters.
- * @param aUnlocalized The Unlocalized Name of this Item.
- * @param aGeneratedPrefixList The OreDict Prefixes you want to have generated.
- */
- public GT_MetaBase_Item(String aUnlocalized) {
- super(aUnlocalized, "Generated Item", null, false);
- setHasSubtypes(true);
- setMaxDamage(0);
- }
-
- /**
- * Adds a special Item Behaviour to the Item.
- *
- * Note: the boolean Behaviours sometimes won't be executed if another boolean Behaviour returned true before.
- *
- * @param aMetaValue the Meta Value of the Item you want to add it to. [0 - 32765]
- * @param aBehavior the Click Behavior you want to add.
- * @return the Item itself for convenience in constructing.
- */
- public final GT_MetaBase_Item addItemBehavior(int aMetaValue, IItemBehaviour<GT_MetaBase_Item> aBehavior) {
- if (aMetaValue < 0 || aMetaValue >= 32766 || aBehavior == null) return this;
- ArrayList<IItemBehaviour<GT_MetaBase_Item>> tList = mItemBehaviors.get((short)aMetaValue);
- if (tList == null) {
- tList = new ArrayList<IItemBehaviour<GT_MetaBase_Item>>(1);
- mItemBehaviors.put((short)aMetaValue, tList);
- }
- tList.add(aBehavior);
- return this;
- }
-
- public abstract Long[] getElectricStats(ItemStack aStack);
- public abstract Long[] getFluidContainerStats(ItemStack aStack);
-
- @Override
- public boolean hasProjectile(SubTag aProjectileType, ItemStack aStack) {
- ArrayList<IItemBehaviour<GT_MetaBase_Item>> tList = mItemBehaviors.get((short)getDamage(aStack));
- if (tList != null) for (IItemBehaviour<GT_MetaBase_Item> tBehavior : tList) if (tBehavior.hasProjectile(this, aProjectileType, aStack)) return true;
- return super.hasProjectile(aProjectileType, aStack);
- }
-
- @Override
- public EntityArrow getProjectile(SubTag aProjectileType, ItemStack aStack, World aWorld, double aX, double aY, double aZ) {
- ArrayList<IItemBehaviour<GT_MetaBase_Item>> tList = mItemBehaviors.get((short)getDamage(aStack));
- if (tList != null) for (IItemBehaviour<GT_MetaBase_Item> tBehavior : tList) {
- EntityArrow rArrow = tBehavior.getProjectile(this, aProjectileType, aStack, aWorld, aX, aY, aZ);
- if (rArrow != null) return rArrow;
- }
- return super.getProjectile(aProjectileType, aStack, aWorld, aX, aY, aZ);
- }
-
- @Override
- public EntityArrow getProjectile(SubTag aProjectileType, ItemStack aStack, World aWorld, EntityLivingBase aEntity, float aSpeed) {
- ArrayList<IItemBehaviour<GT_MetaBase_Item>> tList = mItemBehaviors.get((short)getDamage(aStack));
- if (tList != null) for (IItemBehaviour<GT_MetaBase_Item> tBehavior : tList) {
- EntityArrow rArrow = tBehavior.getProjectile(this, aProjectileType, aStack, aWorld, aEntity, aSpeed);
- if (rArrow != null) return rArrow;
- }
- return super.getProjectile(aProjectileType, aStack, aWorld, aEntity, aSpeed);
- }
-
- @Override
- public ItemStack onDispense(IBlockSource aSource, ItemStack aStack) {
- ArrayList<IItemBehaviour<GT_MetaBase_Item>> tList = mItemBehaviors.get((short)getDamage(aStack));
- if (tList != null) for (IItemBehaviour<GT_MetaBase_Item> tBehavior : tList) if (tBehavior.canDispense(this, aSource, aStack)) return tBehavior.onDispense(this, aSource, aStack);
- return super.onDispense(aSource, aStack);
- }
-
- @Override
- public boolean isItemStackUsable(ItemStack aStack) {
- ArrayList<IItemBehaviour<GT_MetaBase_Item>> tList = mItemBehaviors.get((short)getDamage(aStack));
- if (tList != null) for (IItemBehaviour<GT_MetaBase_Item> tBehavior : tList) if (!tBehavior.isItemStackUsable(this, aStack)) return false;
- return super.isItemStackUsable(aStack);
- }
-
- @Override
- public boolean onLeftClickEntity(ItemStack aStack, EntityPlayer aPlayer, Entity aEntity) {
- use(aStack, 0, aPlayer);
- isItemStackUsable(aStack);
- ArrayList<IItemBehaviour<GT_MetaBase_Item>> tList = mItemBehaviors.get((short)getDamage(aStack));
- if (tList != null) for (IItemBehaviour<GT_MetaBase_Item> tBehavior : tList) try {
- if (tBehavior.onLeftClickEntity(this, aStack, aPlayer, aEntity)) {
- if (aStack.stackSize <= 0) aPlayer.destroyCurrentEquippedItem();
- return true;
- }
- if (aStack.stackSize <= 0) {
- aPlayer.destroyCurrentEquippedItem();
- return false;
- }
- } catch(Throwable e) {
- if (D1) e.printStackTrace(GT_Log.err);
- }
- return false;
- }
-
- @Override
- public boolean onItemUse(ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) {
- use(aStack, 0, aPlayer);
- isItemStackUsable(aStack);
- ArrayList<IItemBehaviour<GT_MetaBase_Item>> tList = mItemBehaviors.get((short)getDamage(aStack));
- if (tList != null) for (IItemBehaviour<GT_MetaBase_Item> tBehavior : tList) try {
- if (tBehavior.onItemUse(this, aStack, aPlayer, aWorld, aX, aY, aZ, aSide, hitX, hitY, hitZ)) {
- if (aStack.stackSize <= 0) aPlayer.destroyCurrentEquippedItem();
- return true;
- }
- if (aStack.stackSize <= 0) {
- aPlayer.destroyCurrentEquippedItem();
- return false;
- }
- } catch(Throwable e) {
- if (D1) e.printStackTrace(GT_Log.err);
- }
- return false;
- }
-
- @Override
- public boolean onItemUseFirst(ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) {
- use(aStack, 0, aPlayer);
- isItemStackUsable(aStack);
- ArrayList<IItemBehaviour<GT_MetaBase_Item>> tList = mItemBehaviors.get((short)getDamage(aStack));
- if (tList != null) for (IItemBehaviour<GT_MetaBase_Item> tBehavior : tList) try {
- if (tBehavior.onItemUseFirst(this, aStack, aPlayer, aWorld, aX, aY, aZ, aSide, hitX, hitY, hitZ)) {
- if (aStack.stackSize <= 0) aPlayer.destroyCurrentEquippedItem();
- return true;
- }
- if (aStack.stackSize <= 0) {
- aPlayer.destroyCurrentEquippedItem();
- return false;
- }
- } catch(Throwable e) {
- if (D1) e.printStackTrace(GT_Log.err);
- }
- return false;
- }
-
- @Override
- public ItemStack onItemRightClick(ItemStack aStack, World aWorld, EntityPlayer aPlayer) {
- use(aStack, 0, aPlayer);
- isItemStackUsable(aStack);
- ArrayList<IItemBehaviour<GT_MetaBase_Item>> tList = mItemBehaviors.get((short)getDamage(aStack));
- if (tList != null) for (IItemBehaviour<GT_MetaBase_Item> tBehavior : tList) try {
- aStack = tBehavior.onItemRightClick(this, aStack, aWorld, aPlayer);
- } catch(Throwable e) {
- if (D1) e.printStackTrace(GT_Log.err);
- }
- return aStack;
- }
-
- @Override
- public final void addInformation(ItemStack aStack, EntityPlayer aPlayer, List aList, boolean aF3_H) {
- String tKey = getUnlocalizedName(aStack) + ".tooltip", tString = GT_LanguageManager.getTranslation(tKey);
- if (GT_Utility.isStringValid(tString) && !tKey.equals(tString)) aList.add(tString);
-
- Long[]
- tStats = getElectricStats(aStack);
- if (tStats != null) {
- if (tStats[3] > 0) {
- aList.add(EnumChatFormatting.AQUA + "Contains " + GT_Utility.formatNumbers(tStats[3]) + " EU Tier: " + (tStats[2]>=0?tStats[2]:0) + EnumChatFormatting.GRAY);
- } else {
- long tCharge = getRealCharge(aStack);
- if (tStats[3] == -2 && tCharge <= 0) {
- aList.add(EnumChatFormatting.AQUA + "Empty. You should recycle it properly." + EnumChatFormatting.GRAY);
- } else {
- aList.add(EnumChatFormatting.AQUA + "" + GT_Utility.formatNumbers(tCharge) + " / " + GT_Utility.formatNumbers(Math.abs(tStats[0])) + " EU - Voltage: " + V[(int)(tStats[2]>=0?tStats[2]<V.length?tStats[2]:V.length-1:1)] + EnumChatFormatting.GRAY);
- }
- }
- }
-
- tStats = getFluidContainerStats(aStack);
- if (tStats != null && tStats[0] > 0) {
- FluidStack tFluid = getFluidContent(aStack);
- aList.add(EnumChatFormatting.BLUE + ((tFluid==null?"No Fluids Contained":GT_Utility.getFluidName(tFluid, true))) + EnumChatFormatting.GRAY);
- aList.add(EnumChatFormatting.BLUE + ((tFluid==null?0:tFluid.amount) + "L / " + tStats[0] + "L") + EnumChatFormatting.GRAY);
- }
-
- ArrayList<IItemBehaviour<GT_MetaBase_Item>> tList = mItemBehaviors.get((short)getDamage(aStack));
- if (tList != null) for (IItemBehaviour<GT_MetaBase_Item> tBehavior : tList) aList = tBehavior.getAdditionalToolTips(this, aList, aStack);
-
- addAdditionalToolTips(aList, aStack);
- }
-
- @Override
- public void onUpdate(ItemStack aStack, World aWorld, Entity aPlayer, int aTimer, boolean aIsInHand) {
- ArrayList<IItemBehaviour<GT_MetaBase_Item>> tList = mItemBehaviors.get((short)getDamage(aStack));
- if (tList != null) for (IItemBehaviour<GT_MetaBase_Item> tBehavior : tList) tBehavior.onUpdate(this, aStack, aWorld, aPlayer, aTimer, aIsInHand);
- }
-
- @Override
- public final boolean canProvideEnergy(ItemStack aStack) {
- Long[] tStats = getElectricStats(aStack);
- if (tStats == null) return false;
- return tStats[3] > 0 || (aStack.stackSize == 1 && (tStats[3] == -2 || tStats[3] == -3));
- }
-
- @Override
- public final double getMaxCharge(ItemStack aStack) {
- Long[] tStats = getElectricStats(aStack);
- if (tStats == null) return 0;
- return Math.abs(tStats[0]);
- }
-
- @Override
- public final double getTransferLimit(ItemStack aStack) {
- Long[] tStats = getElectricStats(aStack);
- if (tStats == null) return 0;
- return Math.max(tStats[1], tStats[3]);
- }
-
- @Override
- public final double charge(ItemStack aStack, double aCharge, int aTier, boolean aIgnoreTransferLimit, boolean aSimulate) {
- Long[] tStats = getElectricStats(aStack);
- if (tStats == null || tStats[2] > aTier || !(tStats[3] == -1 || tStats[3] == -3 || (tStats[3] < 0 && aCharge == Integer.MAX_VALUE)) || aStack.stackSize != 1) return 0;
- long tChargeBefore = getRealCharge(aStack), tNewCharge = aCharge==Integer.MAX_VALUE?Long.MAX_VALUE:Math.min(Math.abs(tStats[0]), tChargeBefore + (aIgnoreTransferLimit?(long)aCharge:Math.min(tStats[1], (long)aCharge)));
- if (!aSimulate) setCharge(aStack, tNewCharge);
- return tNewCharge-tChargeBefore;
- }
-
- @Override
- public final double discharge(ItemStack aStack, double aCharge, int aTier, boolean aIgnoreTransferLimit, boolean aBatteryAlike, boolean aSimulate) {
- Long[] tStats = getElectricStats(aStack);
- if (tStats == null || tStats[2] > aTier) return 0;
- if (aBatteryAlike && !canProvideEnergy(aStack)) return 0;
- if (tStats[3] > 0) {
- if (aCharge < tStats[3] || aStack.stackSize < 1) return 0;
- if (!aSimulate) aStack.stackSize--;
- return tStats[3];
- }
- long tChargeBefore = getRealCharge(aStack), tNewCharge = Math.max(0, tChargeBefore - (aIgnoreTransferLimit?(long)aCharge:Math.min(tStats[1], (long)aCharge)));
- if (!aSimulate) setCharge(aStack, tNewCharge);
- return tChargeBefore-tNewCharge;
- }
-
- @Override
- public final double getCharge(ItemStack aStack) {
- return getRealCharge(aStack);
- }
-
- @Override
- public final boolean canUse(ItemStack aStack, double aAmount) {
- return getRealCharge(aStack) >= aAmount;
- }
-
- @Override
- public final boolean use(ItemStack aStack, double aAmount, EntityLivingBase aPlayer) {
- chargeFromArmor(aStack, aPlayer);
- if (aPlayer instanceof EntityPlayer && ((EntityPlayer)aPlayer).capabilities.isCreativeMode) return true;
- double tTransfer = discharge(aStack, aAmount, Integer.MAX_VALUE, true, false, true);
- if (tTransfer == aAmount) {
- discharge(aStack, aAmount, Integer.MAX_VALUE, true, false, false);
- chargeFromArmor(aStack, aPlayer);
- return true;
- }
- discharge(aStack, aAmount, Integer.MAX_VALUE, true, false, false);
- chargeFromArmor(aStack, aPlayer);
- return false;
- }
-
- @Override
- public final void chargeFromArmor(ItemStack aStack, EntityLivingBase aPlayer) {
- if (aPlayer == null || aPlayer.worldObj.isRemote) return;
- for (int i = 1; i < 5; i++) {
- ItemStack tArmor = aPlayer.getEquipmentInSlot(i);
- if (GT_ModHandler.isElectricItem(tArmor)) {
- IElectricItem tArmorItem = (IElectricItem)tArmor.getItem();
- if (tArmorItem.canProvideEnergy(tArmor) && tArmorItem.getTier(tArmor) >= getTier(aStack)) {
- double tCharge = ElectricItem.manager.discharge(tArmor, charge(aStack, Integer.MAX_VALUE-1, Integer.MAX_VALUE, true, true), Integer.MAX_VALUE, true, true, false);
- if (tCharge > 0) {
- charge(aStack, tCharge, Integer.MAX_VALUE, true, false);
- if (aPlayer instanceof EntityPlayer) {
- Container tContainer = ((EntityPlayer)aPlayer).openContainer;
- if (tContainer != null) tContainer.detectAndSendChanges();
- }
- }
- }
- }
- }
- }
- /*
-
- @Override
- public final int getMaxCharge(ItemStack aStack) {
- Long[] tStats = getElectricStats(aStack);
- if (tStats == null) return 0;
- return (int)Math.abs(tStats[0]);
- }
-
- @Override
- public final int getTransferLimit(ItemStack aStack) {
- Long[] tStats = getElectricStats(aStack);
- if (tStats == null) return 0;
- return (int)Math.max(tStats[1], tStats[3]);
- }
-
- @Override
- public final int charge(ItemStack aStack, int aCharge, int aTier, boolean aIgnoreTransferLimit, boolean aSimulate) {
- Long[] tStats = getElectricStats(aStack);
- if (tStats == null || tStats[2] > aTier || !(tStats[3] == -1 || tStats[3] == -3 || (tStats[3] < 0 && aCharge == Integer.MAX_VALUE)) || aStack.stackSize != 1) return 0;
- long tChargeBefore = getRealCharge(aStack), tNewCharge = aCharge==Integer.MAX_VALUE?Long.MAX_VALUE:Math.min(Math.abs(tStats[0]), tChargeBefore + (aIgnoreTransferLimit?aCharge:Math.min(tStats[1], aCharge)));
- if (!aSimulate) setCharge(aStack, tNewCharge);
- return (int)(tNewCharge-tChargeBefore);
- }
-
- @Override
- public final int discharge(ItemStack aStack, int aCharge, int aTier, boolean aIgnoreTransferLimit, boolean aSimulate) {
- Long[] tStats = getElectricStats(aStack);
- if (tStats == null || tStats[2] > aTier) return 0;
- if (tStats[3] > 0) {
- if (aCharge < tStats[3] || aStack.stackSize < 1) return 0;
- if (!aSimulate) aStack.stackSize--;
- return (int)(long)tStats[3];
- }
- long tChargeBefore = getRealCharge(aStack), tNewCharge = Math.max(0, tChargeBefore - (aIgnoreTransferLimit?aCharge:Math.min(tStats[1], aCharge)));
- if (!aSimulate) setCharge(aStack, tNewCharge);
- return (int)(tChargeBefore-tNewCharge);
- }
-
- @Override
- public final int getCharge(ItemStack aStack) {
- return (int)Math.min(Integer.MAX_VALUE, getRealCharge(aStack));
- }
-
- @Override
- public final boolean canUse(ItemStack aStack, int aAmount) {
- return getRealCharge(aStack) >= aAmount;
- }
-
- @Override
- public final boolean use(ItemStack aStack, int aAmount, EntityLivingBase aPlayer) {
- chargeFromArmor(aStack, aPlayer);
- if (aPlayer instanceof EntityPlayer && ((EntityPlayer)aPlayer).capabilities.isCreativeMode) return true;
- int tTransfer = discharge(aStack, aAmount, Integer.MAX_VALUE, true, true);
- if (tTransfer == aAmount) {
- discharge(aStack, aAmount, Integer.MAX_VALUE, true, false);
- chargeFromArmor(aStack, aPlayer);
- return true;
- }
- discharge(aStack, aAmount, Integer.MAX_VALUE, true, false);
- chargeFromArmor(aStack, aPlayer);
- return false;
- }
-
- @Override
- public final void chargeFromArmor(ItemStack aStack, EntityLivingBase aPlayer) {
- if (aPlayer == null || aPlayer.worldObj.isRemote) return;
- for (int i = 1; i < 5; i++) {
- ItemStack tArmor = aPlayer.getEquipmentInSlot(i);
- if (GT_ModHandler.isElectricItem(tArmor)) {
- IElectricItem tArmorItem = (IElectricItem)tArmor.getItem();
- if (tArmorItem.canProvideEnergy(tArmor) && tArmorItem.getTier(tArmor) >= getTier(aStack)) {
- int tCharge = ElectricItem.manager.discharge(tArmor, charge(aStack, Integer.MAX_VALUE-1, Integer.MAX_VALUE, true, true), Integer.MAX_VALUE, true, false);
- if (tCharge > 0) {
- charge(aStack, tCharge, Integer.MAX_VALUE, true, false);
- if (aPlayer instanceof EntityPlayer) {
- Container tContainer = ((EntityPlayer)aPlayer).openContainer;
- if (tContainer != null) tContainer.detectAndSendChanges();
- }
- }
- }
- }
- }
- }
- */
- public final long getRealCharge(ItemStack aStack) {
- Long[] tStats = getElectricStats(aStack);
- if (tStats == null) return 0;
- if (tStats[3] > 0) return (int)(long)tStats[3];
- NBTTagCompound tNBT = aStack.getTagCompound();
- return tNBT==null?0:tNBT.getLong("GT.ItemCharge");
- }
-
- public final boolean setCharge(ItemStack aStack, long aCharge) {
- Long[] tStats = getElectricStats(aStack);
- if (tStats == null || tStats[3] > 0) return false;
- NBTTagCompound tNBT = aStack.getTagCompound();
- if (tNBT == null) tNBT = new NBTTagCompound();
- tNBT.removeTag("GT.ItemCharge");
- aCharge = Math.min(tStats[0]<0?Math.abs(tStats[0] / 2):aCharge, Math.abs(tStats[0]));
- if (aCharge > 0) {
- aStack.setItemDamage(getChargedMetaData(aStack));
- tNBT.setLong("GT.ItemCharge", aCharge);
- } else {
- aStack.setItemDamage(getEmptyMetaData(aStack));
- }
- if (tNBT.hasNoTags()) aStack.setTagCompound(null); else aStack.setTagCompound(tNBT);
- isItemStackUsable(aStack);
- return true;
- }
-
- public short getChargedMetaData(ItemStack aStack) {return (short)aStack.getItemDamage();}
- public short getEmptyMetaData(ItemStack aStack) {return (short)aStack.getItemDamage();}
-
- @Override
- public FluidStack getFluid(ItemStack aStack) {
- return getFluidContent(aStack);
- }
-
- @Override
- public int getCapacity(ItemStack aStack) {
- Long[] tStats = getFluidContainerStats(aStack);
- return tStats==null?0:(int)Math.max(0, tStats[0]);
- }
-
- @Override
- public int fill(ItemStack aStack, FluidStack aFluid, boolean doFill) {
- if (aStack == null || aStack.stackSize != 1) return 0;
-
- ItemStack tStack = GT_Utility.fillFluidContainer(aFluid, aStack, false, false);
- if (tStack != null) {
- aStack.setItemDamage(tStack.getItemDamage());
- aStack.func_150996_a(tStack.getItem());
- return GT_Utility.getFluidForFilledItem(tStack, false).amount;
- }
-
- Long[] tStats = getFluidContainerStats(aStack);
- if (tStats == null || tStats[0] <= 0 || aFluid == null || aFluid.getFluid().getID() <= 0 || aFluid.amount <= 0) return 0;
-
- FluidStack tFluid = getFluidContent(aStack);
-
- if (tFluid == null || tFluid.getFluid().getID() <= 0) {
- if (aFluid.amount <= tStats[0]) {
- if (doFill) {
- setFluidContent(aStack, aFluid);
- }
- return aFluid.amount;
- }
- if (doFill) {
- tFluid = aFluid.copy();
- tFluid.amount = (int)(long)tStats[0];
- setFluidContent(aStack, tFluid);
- }
- return (int)(long)tStats[0];
- }
-
- if (!tFluid.isFluidEqual(aFluid)) return 0;
-
- int space = (int)(long)tStats[0] - tFluid.amount;
- if (aFluid.amount <= space) {
- if (doFill) {
- tFluid.amount += aFluid.amount;
- setFluidContent(aStack, tFluid);
- }
- return aFluid.amount;
- }
- if (doFill) {
- tFluid.amount = (int)(long)tStats[0];
- setFluidContent(aStack, tFluid);
- }
- return space;
- }
-
- @Override
- public FluidStack drain(ItemStack aStack, int maxDrain, boolean doDrain) {
- if (aStack == null || aStack.stackSize != 1) return null;
-
- FluidStack tFluid = GT_Utility.getFluidForFilledItem(aStack, false);
- if (tFluid != null && maxDrain >= tFluid.amount) {
- ItemStack tStack = GT_Utility.getContainerItem(aStack, false);
- if (tStack == null) {
- aStack.stackSize = 0;
- return tFluid;
- }
- aStack.setItemDamage(tStack.getItemDamage());
- aStack.func_150996_a(tStack.getItem());
- return tFluid;
- }
-
- Long[] tStats = getFluidContainerStats(aStack);
- if (tStats == null || tStats[0] <= 0) return null;
-
- tFluid = getFluidContent(aStack);
- if (tFluid == null) return null;
-
- int used = maxDrain;
- if (tFluid.amount < used) used = tFluid.amount;
- if (doDrain) {
- tFluid.amount -= used;
- setFluidContent(aStack, tFluid);
- }
-
- FluidStack drained = tFluid.copy();
- drained.amount = used;
- return drained;
- }
-
- public FluidStack getFluidContent(ItemStack aStack) {
- Long[] tStats = getFluidContainerStats(aStack);
- if (tStats == null || tStats[0] <= 0) return GT_Utility.getFluidForFilledItem(aStack, false);
- NBTTagCompound tNBT = aStack.getTagCompound();
- return tNBT==null?null:FluidStack.loadFluidStackFromNBT(tNBT.getCompoundTag("GT.FluidContent"));
- }
-
- public void setFluidContent(ItemStack aStack, FluidStack aFluid) {
- NBTTagCompound tNBT = aStack.getTagCompound();
- if (tNBT == null) tNBT = new NBTTagCompound(); else tNBT.removeTag("GT.FluidContent");
- if (aFluid != null && aFluid.amount > 0) tNBT.setTag("GT.FluidContent", aFluid.writeToNBT(new NBTTagCompound()));
- if (tNBT.hasNoTags()) aStack.setTagCompound(null); else aStack.setTagCompound(tNBT);
- isItemStackUsable(aStack);
- }
-
- @Override
- public int getItemStackLimit(ItemStack aStack) {
- Long[] tStats = getElectricStats(aStack);
- if (tStats != null && (tStats[3] == -1 || tStats[3] == -3) && getRealCharge(aStack) > 0) return 1;
- tStats = getFluidContainerStats(aStack);
- if (tStats != null) return (int)(long)tStats[1];
- return 64;
- }
-
- @Override public final Item getChargedItem(ItemStack itemStack) {return this;}
- @Override public final Item getEmptyItem(ItemStack itemStack) {return this;}
- @Override public final int getTier(ItemStack aStack) {Long[] tStats = getElectricStats(aStack); return (int)(tStats==null?Integer.MAX_VALUE:tStats[2]);}
- @Override public final String getToolTip(ItemStack aStack) {return null;} // This has its own ToolTip Handler, no need to let the IC2 Handler screw us up at this Point
- @Override public final IElectricItemManager getManager(ItemStack aStack) {return this;} // We are our own Manager
- @Override public final boolean getShareTag() {return true;} // just to be sure.
- @Override public int getItemEnchantability() {return 0;}
- @Override public boolean isBookEnchantable(ItemStack aStack, ItemStack aBook) {return false;}
- @Override public boolean getIsRepairable(ItemStack aStack, ItemStack aMaterial) {return false;}
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/items/GT_MetaGenerated_Item.java b/main/java/gregtech/api/items/GT_MetaGenerated_Item.java
deleted file mode 100644
index d8ef7f8a32..0000000000
--- a/main/java/gregtech/api/items/GT_MetaGenerated_Item.java
+++ /dev/null
@@ -1,331 +0,0 @@
-package gregtech.api.items;
-
-import static gregtech.api.enums.GT_Values.D1;
-import static gregtech.api.enums.GT_Values.MOD_ID_APC;
-import static gregtech.api.enums.GT_Values.RA;
-import static gregtech.api.enums.GT_Values.RES_PATH_ITEM;
-import gregtech.api.GregTech_API;
-import gregtech.api.enums.ItemList;
-import gregtech.api.enums.Materials;
-import gregtech.api.enums.SubTag;
-import gregtech.api.enums.TC_Aspects.TC_AspectStack;
-import gregtech.api.interfaces.IFoodStat;
-import gregtech.api.interfaces.IIconContainer;
-import gregtech.api.interfaces.IItemBehaviour;
-import gregtech.api.interfaces.IItemContainer;
-import gregtech.api.objects.ItemData;
-import gregtech.api.util.GT_Config;
-import gregtech.api.util.GT_LanguageManager;
-import gregtech.api.util.GT_OreDictUnificator;
-import gregtech.api.util.GT_Utility;
-
-import java.util.*;
-
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.creativetab.CreativeTabs;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.EnumAction;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemFood;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.IIcon;
-import net.minecraft.world.World;
-import squeek.applecore.api.food.FoodValues;
-import squeek.applecore.api.food.IEdible;
-import cpw.mods.fml.common.Loader;
-import cpw.mods.fml.common.Optional;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-
-/**
- * @author Gregorius Techneticies
- *
- * One Item for everything!
- *
- * This brilliant Item Class is used for automatically generating all possible variations of Material Items, like Dusts, Ingots, Gems, Plates and similar.
- * It saves me a ton of work, when adding Items, because I always have to make a new Item SubType for each OreDict Prefix, when adding a new Material.
- *
- * As you can see, up to 32766 Items can be generated using this Class. And the last 766 Items can be custom defined, just to save space and MetaData.
- *
- * These Items can also have special RightClick abilities, electric Charge or even be set to become a Food alike Item.
- */
-@Optional.Interface(iface = "squeek.applecore.api.food.IEdible", modid = MOD_ID_APC)
-public abstract class GT_MetaGenerated_Item extends GT_MetaBase_Item implements IEdible {
- /**
- * All instances of this Item Class are listed here.
- * This gets used to register the Renderer to all Items of this Type, if useStandardMetaItemRenderer() returns true.
- *
- * You can also use the unlocalized Name gotten from getUnlocalizedName() as Key if you want to get a specific Item.
- */
- public static final HashMap<String, GT_MetaGenerated_Item> sInstances = new HashMap<String, GT_MetaGenerated_Item>();
-
- /* ---------- CONSTRUCTOR AND MEMBER VARIABLES ---------- */
-
- public final short mOffset, mItemAmount;
- public final BitSet mEnabledItems;
- public final BitSet mVisibleItems;
- public final IIcon[][] mIconList;
-
- public final HashMap<Short, IFoodStat> mFoodStats = new HashMap<Short, IFoodStat>();
- public final HashMap<Short, Long[]> mElectricStats = new HashMap<Short, Long[]>();
- public final HashMap<Short, Long[]> mFluidContainerStats = new HashMap<Short, Long[]>();
- public final HashMap<Short, Short> mBurnValues = new HashMap<Short, Short>();
-
- /**
- * Creates the Item using these Parameters.
- * @param aUnlocalized The Unlocalized Name of this Item.
- */
- public GT_MetaGenerated_Item(String aUnlocalized, short aOffset, short aItemAmount) {
- super(aUnlocalized);
- setCreativeTab(GregTech_API.TAB_GREGTECH_MATERIALS);
- setHasSubtypes(true);
- setMaxDamage(0);
- mEnabledItems = new BitSet(aItemAmount);
- mVisibleItems = new BitSet(aItemAmount);
-
- mOffset = (short)Math.min(32766, aOffset);
- mItemAmount = (short)Math.min(aItemAmount, 32766-mOffset);
- mIconList = new IIcon[aItemAmount][1];
-
- sInstances.put(getUnlocalizedName(), this);
- }
-
- /**
- * This adds a Custom Item to the ending Range.
- * @param aID The Id of the assigned Item [0 - mItemAmount] (The MetaData gets auto-shifted by +mOffset)
- * @param aEnglish The Default Localized Name of the created Item
- * @param aToolTip The Default ToolTip of the created Item, you can also insert null for having no ToolTip
- * @param aFoodBehavior The Food Value of this Item. Can be null aswell. Just a convenience thing.
- * @param aRandomData The OreDict Names you want to give the Item. Also used for TC Aspects and some other things.
- * @return An ItemStack containing the newly created Item.
- */
- public final ItemStack addItem(int aID, String aEnglish, String aToolTip, Object... aRandomData) {
- if (aToolTip == null) aToolTip = "";
- if (aID >= 0 && aID < mItemAmount) {
- ItemStack rStack = new ItemStack(this, 1, mOffset+aID);
- mEnabledItems.set(aID);
- mVisibleItems.set(aID);
- GT_LanguageManager.addStringLocalization(getUnlocalizedName(rStack) + ".name", aEnglish);
- GT_LanguageManager.addStringLocalization(getUnlocalizedName(rStack) + ".tooltip", aToolTip);
- List<TC_AspectStack> tAspects = new ArrayList<TC_AspectStack>();
- // Important Stuff to do first
- for (Object tRandomData : aRandomData) if (tRandomData instanceof SubTag) {
- if (tRandomData == SubTag.INVISIBLE) {
- mVisibleItems.set(aID, false);
- continue;
- }
- if (tRandomData == SubTag.NO_UNIFICATION) {
- GT_OreDictUnificator.addToBlacklist(rStack);
- continue;
- }
- }
- // now check for the rest
- for (Object tRandomData : aRandomData) if (tRandomData != null) {
- boolean tUseOreDict = true;
- if (tRandomData instanceof IFoodStat) {
- setFoodBehavior(mOffset+aID, (IFoodStat)tRandomData);
- if (((IFoodStat)tRandomData).getFoodAction(this, rStack) == EnumAction.eat) {
- int tFoodValue = ((IFoodStat)tRandomData).getFoodLevel(this, rStack, null);
- if (tFoodValue > 0) RA.addCannerRecipe(rStack, ItemList.IC2_Food_Can_Empty.get(tFoodValue), ((IFoodStat)tRandomData).isRotten(this, rStack, null)?ItemList.IC2_Food_Can_Spoiled.get(tFoodValue):ItemList.IC2_Food_Can_Filled.get(tFoodValue), null, tFoodValue*100, 1);
- }
- tUseOreDict = false;
- }
- if (tRandomData instanceof IItemBehaviour) {
- addItemBehavior(mOffset+aID, (IItemBehaviour<GT_MetaBase_Item>)tRandomData);
- tUseOreDict = false;
- }
- if (tRandomData instanceof IItemContainer) {
- ((IItemContainer)tRandomData).set(rStack);
- tUseOreDict = false;
- }
- if (tRandomData instanceof SubTag) {
- continue;
- }
- if (tRandomData instanceof TC_AspectStack) {
- ((TC_AspectStack)tRandomData).addToAspectList(tAspects);
- continue;
- }
- if (tRandomData instanceof ItemData) {
- if (GT_Utility.isStringValid(tRandomData)) GT_OreDictUnificator.registerOre(tRandomData, rStack); else GT_OreDictUnificator.addItemData(rStack, (ItemData)tRandomData);
- continue;
- }
- if (tUseOreDict) {
- GT_OreDictUnificator.registerOre(tRandomData, rStack);
- continue;
- }
- }
- if (GregTech_API.sThaumcraftCompat != null) GregTech_API.sThaumcraftCompat.registerThaumcraftAspectsToItem(rStack, tAspects, false);
- return rStack;
- }
- return null;
- }
-
- /**
- * Sets a Food Behavior for the Item.
- *
- * @param aMetaValue the Meta Value of the Item you want to set it to. [0 - 32765]
- * @param aFoodBehavior the Food Behavior you want to add.
- * @return the Item itself for convenience in constructing.
- */
- public final GT_MetaGenerated_Item setFoodBehavior(int aMetaValue, IFoodStat aFoodBehavior) {
- if (aMetaValue < 0 || aMetaValue >= mOffset + mEnabledItems.length()) return this;
- if (aFoodBehavior == null) mFoodStats.remove((short)aMetaValue); else mFoodStats.put((short)aMetaValue, aFoodBehavior);
- return this;
- }
-
- /**
- * Sets the Furnace Burn Value for the Item.
- *
- * @param aMetaValue the Meta Value of the Item you want to set it to. [0 - 32765]
- * @param aValue 200 = 1 Burn Process = 500 EU, max = 32767 (that is 81917.5 EU)
- * @return the Item itself for convenience in constructing.
- */
- public final GT_MetaGenerated_Item setBurnValue(int aMetaValue, int aValue) {
- if (aMetaValue < 0 || aMetaValue >= mOffset + mEnabledItems.length() || aValue < 0) return this;
- if (aValue == 0) mBurnValues.remove((short)aMetaValue); else mBurnValues.put((short)aMetaValue, aValue>Short.MAX_VALUE?Short.MAX_VALUE:(short)aValue);
- return this;
- }
-
- /**
- * @param aMetaValue the Meta Value of the Item you want to set it to. [0 - 32765]
- * @param aMaxCharge Maximum Charge. (if this is == 0 it will remove the Electric Behavior)
- * @param aTransferLimit Transfer Limit.
- * @param aTier The electric Tier.
- * @param aSpecialData If this Item has a Fixed Charge, like a SingleUse Battery (if > 0).
- * Use -1 if you want to make this Battery chargeable (the use and canUse Functions will still discharge if you just use this)
- * Use -2 if you want to make this Battery dischargeable.
- * Use -3 if you want to make this Battery charge/discharge-able.
- * @return the Item itself for convenience in constructing.
- */
- public final GT_MetaGenerated_Item setElectricStats(int aMetaValue, long aMaxCharge, long aTransferLimit, long aTier, long aSpecialData, boolean aUseAnimations) {
- if (aMetaValue < 0 || aMetaValue >= mOffset + mEnabledItems.length()) return this;
- if (aMaxCharge == 0) mElectricStats.remove((short)aMetaValue); else {
- mElectricStats.put((short)aMetaValue, new Long[] {aMaxCharge, Math.max(0, aTransferLimit), Math.max(-1, aTier), aSpecialData});
- if (aMetaValue >= mOffset && aUseAnimations) mIconList[aMetaValue-mOffset] = Arrays.copyOf(mIconList[aMetaValue-mOffset], Math.max(9, mIconList[aMetaValue-mOffset].length));
- }
- return this;
- }
-
- /**
- * @param aMetaValue the Meta Value of the Item you want to set it to. [0 - 32765]
- * @param aMaxCharge Maximum Charge. (if this is == 0 it will remove the Electric Behavior)
- * @param aTransferLimit Transfer Limit.
- * @param aTier The electric Tier.
- * @param aSpecialData If this Item has a Fixed Charge, like a SingleUse Battery (if > 0).
- * Use -1 if you want to make this Battery chargeable (the use and canUse Functions will still discharge if you just use this)
- * Use -2 if you want to make this Battery dischargeable.
- * Use -3 if you want to make this Battery charge/discharge-able.
- * @return the Item itself for convenience in constructing.
- */
- public final GT_MetaGenerated_Item setFluidContainerStats(int aMetaValue, long aCapacity, long aStacksize) {
- if (aMetaValue < 0 || aMetaValue >= mOffset + mEnabledItems.length()) return this;
- if (aCapacity < 0) mElectricStats.remove((short)aMetaValue); else mFluidContainerStats.put((short)aMetaValue, new Long[] {aCapacity, Math.max(1, aStacksize)});
- return this;
- }
-
- /**
- * @return if this MetaGenerated Item should use my Default Renderer System.
- */
- public boolean useStandardMetaItemRenderer() {
- return true;
- }
-
- /**
- * @return the Color Modulation the Material is going to be rendered with.
- */
- public short[] getRGBa(ItemStack aStack) {
- return Materials._NULL.getRGBA();
- }
-
- /**
- * @return the Icon the Material is going to be rendered with.
- */
- public IIconContainer getIconContainer(int aMetaData) {
- return null;
- }
-
- /* ---------- INTERNAL OVERRIDES ---------- */
-
- @Override
- public ItemStack onItemRightClick(ItemStack aStack, World aWorld, EntityPlayer aPlayer) {
- IFoodStat tStat = mFoodStats.get((short)getDamage(aStack));
- if (tStat != null && aPlayer.canEat(tStat.alwaysEdible(this, aStack, aPlayer))) aPlayer.setItemInUse(aStack, 32);
- return super.onItemRightClick(aStack, aWorld, aPlayer);
- }
-
- @Override
- public int getMaxItemUseDuration(ItemStack aStack) {
- return mFoodStats.get((short)getDamage(aStack)) == null ? 0 : 32;
- }
-
- @Override
- public EnumAction getItemUseAction(ItemStack aStack) {
- IFoodStat tStat = mFoodStats.get((short)getDamage(aStack));
- return tStat == null ? EnumAction.none : tStat.getFoodAction(this, aStack);
- }
-
- @Override
- public final ItemStack onEaten(ItemStack aStack, World aWorld, EntityPlayer aPlayer) {
- IFoodStat tStat = mFoodStats.get((short)getDamage(aStack));
- if (tStat != null) {
- if (Loader.isModLoaded(MOD_ID_APC)) {
- aPlayer.getFoodStats().func_151686_a((ItemFood)GT_Utility.callConstructor("squeek.applecore.api.food.ItemFoodProxy.ItemFoodProxy", 0, null, true, this), aStack);
- } else {
- aPlayer.getFoodStats().addStats(tStat.getFoodLevel(this, aStack, aPlayer), tStat.getSaturation(this, aStack, aPlayer));
- }
- tStat.onEaten(this, aStack, aPlayer);
- }
- return aStack;
- }
-
- @Override
- @Optional.Method(modid = MOD_ID_APC)
- public FoodValues getFoodValues(ItemStack aStack) {
- IFoodStat tStat = mFoodStats.get((short)getDamage(aStack));
- return tStat==null?null:new FoodValues(tStat.getFoodLevel(this, aStack, null), tStat.getSaturation(this, aStack, null));
- }
-
- @Override
- @SideOnly(Side.CLIENT)
- public void getSubItems(Item var1, CreativeTabs aCreativeTab, List aList) {
- for (int i = 0, j = mEnabledItems.length(); i < j; i++) if (mVisibleItems.get(i) || (D1 && mEnabledItems.get(i))) {
- Long[] tStats = mElectricStats.get((short)(mOffset+i));
- if (tStats != null && tStats[3] < 0) {
- ItemStack tStack = new ItemStack(this, 1, mOffset+i);
- setCharge(tStack, Math.abs(tStats[0]));
- isItemStackUsable(tStack);
- aList.add(tStack);
- }
- if (tStats == null || tStats[3] != -2) {
- ItemStack tStack = new ItemStack(this, 1, mOffset+i);
- isItemStackUsable(tStack);
- aList.add(tStack);
- }
- }
- }
-
- @Override
- @SideOnly(Side.CLIENT)
- public final void registerIcons(IIconRegister aIconRegister) {
- for (short i = 0, j = (short)mEnabledItems.length(); i < j; i++) if (mEnabledItems.get(i)) {
- for (byte k = 1; k < mIconList[i].length; k++) {
- mIconList[i][k] = aIconRegister.registerIcon(RES_PATH_ITEM + (GT_Config.troll?"troll":getUnlocalizedName() + "/" + i + "/" + k));
- }
- mIconList[i][0] = aIconRegister.registerIcon(RES_PATH_ITEM + (GT_Config.troll?"troll":getUnlocalizedName() + "/" + i));
- }
- }
-
- @Override
- public final Long[] getElectricStats(ItemStack aStack) {
- return mElectricStats.get((short)aStack.getItemDamage());
- }
-
- @Override
- public final Long[] getFluidContainerStats(ItemStack aStack) {
- return mFluidContainerStats.get((short)aStack.getItemDamage());
- }
-
- @Override public int getItemEnchantability() {return 0;}
- @Override public boolean isBookEnchantable(ItemStack aStack, ItemStack aBook) {return false;}
- @Override public boolean getIsRepairable(ItemStack aStack, ItemStack aMaterial) {return false;}
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/items/GT_MetaGenerated_Item_X01.java b/main/java/gregtech/api/items/GT_MetaGenerated_Item_X01.java
deleted file mode 100644
index 76743abd74..0000000000
--- a/main/java/gregtech/api/items/GT_MetaGenerated_Item_X01.java
+++ /dev/null
@@ -1,159 +0,0 @@
-package gregtech.api.items;
-
-import static gregtech.api.enums.GT_Values.M;
-import gregtech.api.GregTech_API;
-import gregtech.api.enums.Materials;
-import gregtech.api.enums.OrePrefixes;
-import gregtech.api.interfaces.IIconContainer;
-import gregtech.api.util.GT_LanguageManager;
-import gregtech.api.util.GT_OreDictUnificator;
-import gregtech.api.util.GT_Utility;
-
-import java.util.List;
-
-import net.minecraft.creativetab.CreativeTabs;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.IIcon;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-
-/**
- * @author Gregorius Techneticies
- *
- * One Item for everything!
- *
- * This brilliant Item Class is used for automatically generating all possible variations of Material Items, like Dusts, Ingots, Gems, Plates and similar.
- * It saves me a ton of work, when adding Items, because I always have to make a new Item SubType for each OreDict Prefix, when adding a new Material.
- *
- * As you can see, up to 32766 Items can be generated using this Class. And the last 766 Items can be custom defined, just to save space and MetaData.
- *
- * These Items can also have special RightClick abilities, electric Charge or even be set to become a Food alike Item.
- */
-public abstract class GT_MetaGenerated_Item_X01 extends GT_MetaGenerated_Item {
-
- protected final OrePrefixes mPrefix;
- protected final int mIconSetIndex;
-
- /**
- * Creates the Item using these Parameters. This is for the new 1 Item = 1 Prefix System.
- * @param aUnlocalized The Unlocalized Name of this Item.
- * @param aGeneratedPrefix The OreDict Prefix you want to have generated.
- * @param aIconSetIndex The TextureSet Index to be used. -1 for Defaulting to the Data contained in the Prefix. (this is only to be used for selecting the Icon in getIconContainer, nothing else)
- */
- public GT_MetaGenerated_Item_X01(String aUnlocalized, OrePrefixes aGeneratedPrefix, int aIconSetIndex) {
- super(aUnlocalized, (short)32000, (short)766);
- mPrefix = aGeneratedPrefix;
- mIconSetIndex = aIconSetIndex>=0?aIconSetIndex:aGeneratedPrefix.mTextureIndex>=0?aGeneratedPrefix.mTextureIndex:0;
-
- for (int i = 0; i < GregTech_API.sGeneratedMaterials.length; i++) {
- OrePrefixes tPrefix = mPrefix;
- if (tPrefix == null) continue;
- Materials tMaterial = GregTech_API.sGeneratedMaterials[i];
- if (tMaterial == null) continue;
- if (mPrefix.doGenerateItem(tMaterial)) {
- ItemStack tStack = new ItemStack(this, 1, i);
- GT_LanguageManager.addStringLocalization(getUnlocalizedName(tStack) + ".name", getDefaultLocalization(tPrefix, tMaterial, i));
- GT_LanguageManager.addStringLocalization(getUnlocalizedName(tStack) + ".tooltip", tMaterial.getToolTip(tPrefix.mMaterialAmount / M));
- String tOreName = getOreDictString(tPrefix, tMaterial);
- tPrefix = OrePrefixes.getOrePrefix(tOreName);
- if (tPrefix != null && tPrefix.mIsUnificatable) {
- GT_OreDictUnificator.set(tPrefix, OrePrefixes.getMaterial(tOreName, tPrefix), tStack);
- } else {
- GT_OreDictUnificator.registerOre(tOreName, tStack);
- }
- }
- }
- }
-
- /* ---------- OVERRIDEABLE FUNCTIONS ---------- */
-
- /**
- * @param aPrefix the OreDict Prefix
- * @param aMaterial the Material
- * @param aMetaData a Index from [0 - 31999]
- * @return the Localized Name when default LangFiles are used.
- */
- public String getDefaultLocalization(OrePrefixes aPrefix, Materials aMaterial, int aMetaData) {
- return aPrefix.getDefaultLocalNameForItem(aMaterial);
- }
-
- /**
- * @param aPrefix always != null
- * @param aMaterial always != null
- * @param aDoShowAllItems this is the Configuration Setting of the User, if he wants to see all the Stuff like Tiny Dusts or Crushed Ores as well.
- * @return if this Item should be visible in NEI or Creative
- */
- public boolean doesShowInCreative(OrePrefixes aPrefix, Materials aMaterial, boolean aDoShowAllItems) {
- return true;
- }
-
- /**
- * @return the name of the Item to be registered at the OreDict.
- */
- public String getOreDictString(OrePrefixes aPrefix, Materials aMaterial) {
- return aPrefix.get(aMaterial).toString();
- }
-
- public IIconContainer getIconContainer(int aMetaData, Materials aMaterial) {
- return aMaterial.mIconSet.mTextures[mIconSetIndex];
- }
-
- /* ---------- INTERNAL OVERRIDES ---------- */
-
- @Override
- public ItemStack getContainerItem(ItemStack aStack) {
- int aMetaData = aStack.getItemDamage();
- if (aMetaData < GregTech_API.sGeneratedMaterials.length && aMetaData >= 0) {
- Materials aMaterial = GregTech_API.sGeneratedMaterials[aMetaData];
- if (aMaterial != null && aMaterial != Materials.Empty && aMaterial != Materials._NULL) {
- return GT_Utility.copyAmount(1, mPrefix.mContainerItem);
- }
- }
- return null;
- }
-
- @Override
- public short[] getRGBa(ItemStack aStack) {
- int aMetaData = getDamage(aStack);
- return aMetaData < GregTech_API.sGeneratedMaterials.length && GregTech_API.sGeneratedMaterials[aMetaData] != null ? GregTech_API.sGeneratedMaterials[aMetaData].mRGBa : Materials._NULL.mRGBa;
- }
-
- @Override
- public final IIconContainer getIconContainer(int aMetaData) {
- return aMetaData < GregTech_API.sGeneratedMaterials.length && GregTech_API.sGeneratedMaterials[aMetaData] != null ? getIconContainer(aMetaData, GregTech_API.sGeneratedMaterials[aMetaData]) : null;
- }
-
- @Override
- @SideOnly(Side.CLIENT)
- public final void getSubItems(Item var1, CreativeTabs aCreativeTab, List aList) {
- for (int i = 0; i < GregTech_API.sGeneratedMaterials.length; i++) if (mPrefix.doGenerateItem(GregTech_API.sGeneratedMaterials[i]) && doesShowInCreative(mPrefix, GregTech_API.sGeneratedMaterials[i], GregTech_API.sDoShowAllItemsInCreative)) {
- ItemStack tStack = new ItemStack(this, 1, i);
- isItemStackUsable(tStack);
- aList.add(tStack);
- }
- super.getSubItems(var1, aCreativeTab, aList);
- }
-
- @Override
- public final IIcon getIconFromDamage(int aMetaData) {
- if (aMetaData < 0) return null;
- if (aMetaData < GregTech_API.sGeneratedMaterials.length) {
- Materials tMaterial = GregTech_API.sGeneratedMaterials[aMetaData];
- if (tMaterial == null) return null;
- IIconContainer tIcon = getIconContainer(aMetaData, tMaterial);
- if (tIcon != null) return tIcon.getIcon();
- return null;
- }
- return aMetaData>=mOffset&&aMetaData-mOffset<mIconList.length?mIconList[aMetaData-mOffset][0]:null;
- }
-
- @Override
- public int getItemStackLimit(ItemStack aStack) {
- return getDamage(aStack) < mOffset ? Math.min(super.getItemStackLimit(aStack), mPrefix.mDefaultStackSize) : super.getItemStackLimit(aStack);
- }
-
- @Override public int getItemEnchantability() {return 0;}
- @Override public boolean isBookEnchantable(ItemStack aStack, ItemStack aBook) {return false;}
- @Override public boolean getIsRepairable(ItemStack aStack, ItemStack aMaterial) {return false;}
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/items/GT_MetaGenerated_Item_X32.java b/main/java/gregtech/api/items/GT_MetaGenerated_Item_X32.java
deleted file mode 100644
index 181e5bddf6..0000000000
--- a/main/java/gregtech/api/items/GT_MetaGenerated_Item_X32.java
+++ /dev/null
@@ -1,169 +0,0 @@
-package gregtech.api.items;
-
-import static gregtech.api.enums.GT_Values.M;
-import gregtech.api.GregTech_API;
-import gregtech.api.enums.Materials;
-import gregtech.api.enums.OrePrefixes;
-import gregtech.api.interfaces.IIconContainer;
-import gregtech.api.util.GT_LanguageManager;
-import gregtech.api.util.GT_OreDictUnificator;
-import gregtech.api.util.GT_Utility;
-
-import java.util.Arrays;
-import java.util.List;
-
-import net.minecraft.creativetab.CreativeTabs;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.IIcon;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-
-/**
- * @author Gregorius Techneticies
- *
- * One Item for everything!
- *
- * This brilliant Item Class is used for automatically generating all possible variations of Material Items, like Dusts, Ingots, Gems, Plates and similar.
- * It saves me a ton of work, when adding Items, because I always have to make a new Item SubType for each OreDict Prefix, when adding a new Material.
- *
- * As you can see, up to 32766 Items can be generated using this Class. And the last 766 Items can be custom defined, just to save space and MetaData.
- *
- * These Items can also have special RightClick abilities, electric Charge or even be set to become a Food alike Item.
- */
-public abstract class GT_MetaGenerated_Item_X32 extends GT_MetaGenerated_Item {
-
- protected final OrePrefixes[] mGeneratedPrefixList;
-
- /**
- * Creates the Item using these Parameters.
- * @param aUnlocalized The Unlocalized Name of this Item.
- * @param aGeneratedPrefixList The OreDict Prefixes you want to have generated.
- */
- public GT_MetaGenerated_Item_X32(String aUnlocalized, OrePrefixes... aGeneratedPrefixList) {
- super(aUnlocalized, (short)32000, (short)766);
- mGeneratedPrefixList = Arrays.copyOf(aGeneratedPrefixList, 32);
-
- for (int i = 0; i < 32000; i++) {
- OrePrefixes tPrefix = mGeneratedPrefixList[i / 1000];
- if (tPrefix == null) continue;
- Materials tMaterial = GregTech_API.sGeneratedMaterials[i % 1000];
- if (tMaterial == null) continue;
- if (doesMaterialAllowGeneration(tPrefix, tMaterial)) {
- ItemStack tStack = new ItemStack(this, 1, i);
- GT_LanguageManager.addStringLocalization(getUnlocalizedName(tStack) + ".name", getDefaultLocalization(tPrefix, tMaterial, i));
- GT_LanguageManager.addStringLocalization(getUnlocalizedName(tStack) + ".tooltip", tMaterial.getToolTip(tPrefix.mMaterialAmount / M));
- if (tPrefix.mIsUnificatable) {
- GT_OreDictUnificator.set(tPrefix, tMaterial, tStack);
- } else {
- GT_OreDictUnificator.registerOre(tPrefix.get(tMaterial), tStack);
- }
- if((tPrefix==OrePrefixes.stick||tPrefix==OrePrefixes.wireFine)&&(tMaterial==Materials.Lead||tMaterial==Materials.Tin||tMaterial==Materials.SolderingAlloy)){GregTech_API.sSolderingMetalList.add(tStack);}
- }
- }
- }
-
- /* ---------- OVERRIDEABLE FUNCTIONS ---------- */
-
- /**
- * @return the Color Modulation the Material is going to be rendered with.
- */
- @Override
- public short[] getRGBa(ItemStack aStack) {
- Materials tMaterial = GregTech_API.sGeneratedMaterials[getDamage(aStack) % 1000];
- return tMaterial == null ? Materials._NULL.mRGBa : tMaterial.mRGBa;
- }
-
- /**
- * @param aPrefix this can be null, you have to return false in that case
- * @param aMaterial this can be null, you have to return false in that case
- * @return if this Item should be generated and visible.
- */
- public boolean doesMaterialAllowGeneration(OrePrefixes aPrefix, Materials aMaterial) {
- // You have to check for at least these Conditions in every Case! So add a super Call like the following for this before executing your Code:
- // if (!super.doesMaterialAllowGeneration(aPrefix, aMaterial)) return false;
- return aPrefix != null && aMaterial != null && aPrefix.doGenerateItem(aMaterial);
- }
-
- /* ---------- OVERRIDEABLE FUNCTIONS ---------- */
-
- /**
- * @param aPrefix the OreDict Prefix
- * @param aMaterial the Material
- * @param aMetaData a Index from [0 - 31999]
- * @return the Localized Name when default LangFiles are used.
- */
- public String getDefaultLocalization(OrePrefixes aPrefix, Materials aMaterial, int aMetaData) {
- return aPrefix.getDefaultLocalNameForItem(aMaterial);
- }
-
- /**
- * @param aMetaData a Index from [0 - 31999]
- * @param aMaterial the Material
- * @return an Icon Container for the Item Display.
- */
- public final IIconContainer getIconContainer(int aMetaData, Materials aMaterial) {
- return mGeneratedPrefixList[aMetaData / 1000] != null && mGeneratedPrefixList[aMetaData / 1000].mTextureIndex >= 0 ? aMaterial.mIconSet.mTextures[mGeneratedPrefixList[aMetaData / 1000].mTextureIndex] : null;
- }
-
- /**
- * @param aPrefix always != null
- * @param aMaterial always != null
- * @param aDoShowAllItems this is the Configuration Setting of the User, if he wants to see all the Stuff like Tiny Dusts or Crushed Ores as well.
- * @return if this Item should be visible in NEI or Creative
- */
- public boolean doesShowInCreative(OrePrefixes aPrefix, Materials aMaterial, boolean aDoShowAllItems) {
- return true;
- }
-
- /* ---------- INTERNAL OVERRIDES ---------- */
-
- @Override
- public ItemStack getContainerItem(ItemStack aStack) {
- int aDamage = aStack.getItemDamage();
- if (aDamage < 32000 && aDamage >= 0) {
- Materials aMaterial = GregTech_API.sGeneratedMaterials[aDamage % 1000];
- if (aMaterial != null && aMaterial != Materials.Empty && aMaterial != Materials._NULL) {
- OrePrefixes aPrefix = mGeneratedPrefixList[aDamage / 1000];
- if (aPrefix != null) return GT_Utility.copyAmount(1, aPrefix.mContainerItem);
- }
- }
- return null;
- }
-
- @Override
- public final IIconContainer getIconContainer(int aMetaData) {
- return GregTech_API.sGeneratedMaterials[aMetaData % 1000] == null ? null : getIconContainer(aMetaData, GregTech_API.sGeneratedMaterials[aMetaData % 1000]);
- }
-
- @Override
- @SideOnly(Side.CLIENT)
- public final void getSubItems(Item var1, CreativeTabs aCreativeTab, List aList) {
- for (int i = 0; i < 32000; i++) if (doesMaterialAllowGeneration(mGeneratedPrefixList[i / 1000], GregTech_API.sGeneratedMaterials[i % 1000]) && doesShowInCreative(mGeneratedPrefixList[i / 1000], GregTech_API.sGeneratedMaterials[i % 1000], GregTech_API.sDoShowAllItemsInCreative)) {
- ItemStack tStack = new ItemStack(this, 1, i);
- isItemStackUsable(tStack);
- aList.add(tStack);
- }
- super.getSubItems(var1, aCreativeTab, aList);
- }
-
- @Override
- public final IIcon getIconFromDamage(int aMetaData) {
- if (aMetaData < 0) return null;
- if (aMetaData < 32000) {
- Materials tMaterial = GregTech_API.sGeneratedMaterials[aMetaData % 1000];
- if (tMaterial == null) return null;
- IIconContainer tIcon = getIconContainer(aMetaData, tMaterial);
- if (tIcon != null) return tIcon.getIcon();
- return null;
- }
- return aMetaData-32000<mIconList.length?mIconList[aMetaData-32000][0]:null;
- }
-
- @Override
- public int getItemStackLimit(ItemStack aStack) {
- int tDamage = getDamage(aStack);
- if (tDamage < 32000 && mGeneratedPrefixList[tDamage / 1000] != null) return Math.min(super.getItemStackLimit(aStack), mGeneratedPrefixList[tDamage / 1000].mDefaultStackSize);
- return super.getItemStackLimit(aStack);
- }
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/items/GT_MetaGenerated_Tool.java b/main/java/gregtech/api/items/GT_MetaGenerated_Tool.java
deleted file mode 100644
index ff3cdfdfc0..0000000000
--- a/main/java/gregtech/api/items/GT_MetaGenerated_Tool.java
+++ /dev/null
@@ -1,562 +0,0 @@
-package gregtech.api.items;
-
-import static gregtech.api.enums.GT_Values.MOD_ID_FR;
-import static gregtech.api.enums.GT_Values.MOD_ID_RC;
-import forestry.api.arboriculture.IToolGrafter;
-import gregtech.api.GregTech_API;
-import gregtech.api.enchants.Enchantment_Radioactivity;
-import gregtech.api.enums.Materials;
-import gregtech.api.enums.TC_Aspects.TC_AspectStack;
-import gregtech.api.interfaces.IDamagableItem;
-import gregtech.api.interfaces.IToolStats;
-import gregtech.api.util.GT_LanguageManager;
-import gregtech.api.util.GT_ModHandler;
-import gregtech.api.util.GT_OreDictUnificator;
-import gregtech.api.util.GT_Utility;
-import gregtech.common.tools.GT_Tool_Turbine;
-
-import java.util.*;
-import java.util.Map.Entry;
-
-import mods.railcraft.api.core.items.IToolCrowbar;
-import net.minecraft.block.Block;
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.creativetab.CreativeTabs;
-import net.minecraft.enchantment.Enchantment;
-import net.minecraft.enchantment.EnchantmentHelper;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.entity.SharedMonsterAttributes;
-import net.minecraft.entity.item.EntityMinecart;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.EnumAction;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.potion.Potion;
-import net.minecraft.stats.AchievementList;
-import net.minecraft.stats.StatList;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.IIcon;
-import net.minecraft.util.MathHelper;
-import net.minecraft.world.World;
-import net.minecraftforge.event.world.BlockEvent;
-import cpw.mods.fml.common.Optional;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-
-/**
- * This is an example on how you can create a Tool ItemStack, in this case a Bismuth Wrench:
- * GT_MetaGenerated_Tool.sInstances.get("gt.metatool.01").getToolWithStats(16, 1, Materials.Bismuth, Materials.Bismuth, null);
- */
-@Optional.InterfaceList(value = {@Optional.Interface(iface = "forestry.api.arboriculture.IToolGrafter", modid = MOD_ID_FR), @Optional.Interface(iface = "mods.railcraft.api.core.items.IToolCrowbar", modid = MOD_ID_RC)})
-public abstract class GT_MetaGenerated_Tool extends GT_MetaBase_Item implements IDamagableItem, IToolGrafter , IToolCrowbar{
- /**
- * All instances of this Item Class are listed here.
- * This gets used to register the Renderer to all Items of this Type, if useStandardMetaItemRenderer() returns true.
- *
- * You can also use the unlocalized Name gotten from getUnlocalizedName() as Key if you want to get a specific Item.
- */
- public static final HashMap<String, GT_MetaGenerated_Tool> sInstances = new HashMap<String, GT_MetaGenerated_Tool>();
-
- /* ---------- CONSTRUCTOR AND MEMBER VARIABLES ---------- */
-
- public final HashMap<Short, IToolStats> mToolStats = new HashMap<Short, IToolStats>();
-
- /**
- * Creates the Item using these Parameters.
- * @param aUnlocalized The Unlocalized Name of this Item.
- */
- public GT_MetaGenerated_Tool(String aUnlocalized) {
- super(aUnlocalized);
- GT_ModHandler.registerBoxableItemToToolBox(this);
- setCreativeTab(GregTech_API.TAB_GREGTECH);
- setMaxStackSize(1);
- sInstances.put(getUnlocalizedName(), this);
- }
-
- /* ---------- FOR ADDING CUSTOM ITEMS INTO THE REMAINING 766 RANGE ---------- */
-
- /**
- * This adds a Custom Item to the ending Range.
- * @param aID The Id of the assigned Tool Class [0 - 32765] (only even Numbers allowed! Uneven ID's are empty electric Items)
- * @param aEnglish The Default Localized Name of the created Item
- * @param aToolTip The Default ToolTip of the created Item, you can also insert null for having no ToolTip
- * @param aToolStats The Food Value of this Item. Can be null as well.
- * @param aOreDictNamesAndAspects The OreDict Names you want to give the Item. Also used to assign Thaumcraft Aspects.
- * @return An ItemStack containing the newly created Item, but without specific Stats.
- */
- public final ItemStack addTool(int aID, String aEnglish, String aToolTip, IToolStats aToolStats, Object... aOreDictNamesAndAspects) {
- if (aToolTip == null) aToolTip = "";
- if (aID >= 0 && aID < 32766 && aID % 2 == 0) {
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + "." + aID + ".name" , aEnglish);
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + "." + aID + ".tooltip" , aToolTip);
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + "." + (aID+1) + ".name" , aEnglish + " (Empty)");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + "." + (aID+1) + ".tooltip" , "You need to recharge it");
- mToolStats.put((short) aID , aToolStats);
- mToolStats.put((short)(aID+1), aToolStats);
- aToolStats.onStatsAddedToTool(this, aID);
- ItemStack rStack = new ItemStack(this, 1, aID);
- List<TC_AspectStack> tAspects = new ArrayList<TC_AspectStack>();
- for (Object tOreDictNameOrAspect : aOreDictNamesAndAspects) {
- if (tOreDictNameOrAspect instanceof TC_AspectStack)
- ((TC_AspectStack)tOreDictNameOrAspect).addToAspectList(tAspects);
- else
- GT_OreDictUnificator.registerOre(tOreDictNameOrAspect, rStack);
- }
- if (GregTech_API.sThaumcraftCompat != null) GregTech_API.sThaumcraftCompat.registerThaumcraftAspectsToItem(rStack, tAspects, false);
- return rStack;
- }
- return null;
- }
-
- /**
- * This Function gets an ItemStack Version of this Tool
- * @param aToolID the ID of the Tool Class
- * @param aAmount Amount of Items (well normally you only need 1)
- * @param aPrimaryMaterial Primary Material of this Tool
- * @param aSecondaryMaterial Secondary (Rod/Handle) Material of this Tool
- * @param aElectricArray The Electric Stats of this Tool (or null if not electric)
- */
- public final ItemStack getToolWithStats(int aToolID, int aAmount, Materials aPrimaryMaterial, Materials aSecondaryMaterial, long[] aElectricArray) {
- ItemStack rStack = new ItemStack(this, aAmount, aToolID);
- IToolStats tToolStats = getToolStats(rStack);
- if (tToolStats != null) {
- NBTTagCompound tMainNBT = new NBTTagCompound(), tToolNBT = new NBTTagCompound();
- if (aPrimaryMaterial != null) {
- tToolNBT.setString("PrimaryMaterial", aPrimaryMaterial.toString());
- tToolNBT.setLong("MaxDamage", 100L*(long)(aPrimaryMaterial.mDurability * tToolStats.getMaxDurabilityMultiplier()));
- }
- if (aSecondaryMaterial != null) tToolNBT.setString("SecondaryMaterial", aSecondaryMaterial.toString());
-
- if (aElectricArray != null) {
- tToolNBT.setBoolean("Electric", true);
- tToolNBT.setLong("MaxCharge", aElectricArray[0]);
- tToolNBT.setLong("Voltage", aElectricArray[1]);
- tToolNBT.setLong("Tier", aElectricArray[2]);
- tToolNBT.setLong("SpecialData", aElectricArray[3]);
- }
-
- tMainNBT.setTag("GT.ToolStats", tToolNBT);
- rStack.setTagCompound(tMainNBT);
- }
- isItemStackUsable(rStack);
- return rStack;
- }
-
- /* ---------- INTERNAL OVERRIDES ---------- */
-
- /**
- * Called by the Block Harvesting Event within the GT_Proxy
- */
- public void onHarvestBlockEvent(ArrayList<ItemStack> aDrops, ItemStack aStack, EntityPlayer aPlayer, Block aBlock, int aX, int aY, int aZ, byte aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent) {
- IToolStats tStats = getToolStats(aStack);
- if (isItemStackUsable(aStack) && getDigSpeed(aStack, aBlock, aMetaData) > 0.0F) doDamage(aStack, tStats.convertBlockDrops(aDrops, aStack, aPlayer, aBlock, aX, aY, aZ, aMetaData, aFortune, aSilkTouch, aEvent) * tStats.getToolDamagePerDropConversion());
- }
-
- @Override
- public boolean onLeftClickEntity(ItemStack aStack, EntityPlayer aPlayer, Entity aEntity) {
- IToolStats tStats = getToolStats(aStack);
- if (tStats == null || !isItemStackUsable(aStack)) return true;
- GT_Utility.doSoundAtClient(tStats.getEntityHitSound(), 1, 1.0F);
- if (super.onLeftClickEntity(aStack, aPlayer, aEntity)) return true;
- if (aEntity.canAttackWithItem() && !aEntity.hitByEntity(aPlayer)) {
- float tMagicDamage = tStats.getMagicDamageAgainstEntity(aEntity instanceof EntityLivingBase?EnchantmentHelper.getEnchantmentModifierLiving(aPlayer, (EntityLivingBase)aEntity):0.0F, aEntity, aStack, aPlayer), tDamage = tStats.getNormalDamageAgainstEntity((float)aPlayer.getEntityAttribute(SharedMonsterAttributes.attackDamage).getAttributeValue() + getToolCombatDamage(aStack), aEntity, aStack, aPlayer);
- if (tDamage + tMagicDamage > 0.0F) {
- boolean tCriticalHit = aPlayer.fallDistance > 0.0F && !aPlayer.onGround && !aPlayer.isOnLadder() && !aPlayer.isInWater() && !aPlayer.isPotionActive(Potion.blindness) && aPlayer.ridingEntity == null && aEntity instanceof EntityLivingBase;
- if (tCriticalHit && tDamage > 0.0F) tDamage *= 1.5F;
- tDamage += tMagicDamage;
- if (aEntity.attackEntityFrom(tStats.getDamageSource(aPlayer, aEntity), tDamage)) {
- if (aEntity instanceof EntityLivingBase) aEntity.setFire(EnchantmentHelper.getFireAspectModifier(aPlayer) * 4);
- int tKnockcack = (aPlayer.isSprinting()?1:0) + (aEntity instanceof EntityLivingBase?EnchantmentHelper.getKnockbackModifier(aPlayer, (EntityLivingBase)aEntity):0);
- if (tKnockcack > 0) {
- aEntity.addVelocity(-MathHelper.sin(aPlayer.rotationYaw * (float)Math.PI / 180.0F) * tKnockcack * 0.5F, 0.1D, MathHelper.cos(aPlayer.rotationYaw * (float)Math.PI / 180.0F) * tKnockcack * 0.5F);
- aPlayer.motionX *= 0.6D;
- aPlayer.motionZ *= 0.6D;
- aPlayer.setSprinting(false);
- }
- if (tCriticalHit) aPlayer.onCriticalHit(aEntity);
- if (tMagicDamage > 0.0F) aPlayer.onEnchantmentCritical(aEntity);
- if (tDamage >= 18.0F) aPlayer.triggerAchievement(AchievementList.overkill);
- aPlayer.setLastAttacker(aEntity);
- if (aEntity instanceof EntityLivingBase) EnchantmentHelper.func_151384_a((EntityLivingBase)aEntity, aPlayer);
- EnchantmentHelper.func_151385_b(aPlayer, aEntity);
- if (aEntity instanceof EntityLivingBase) aPlayer.addStat(StatList.damageDealtStat, Math.round(tDamage * 10.0F));
- aEntity.hurtResistantTime = Math.max(1, tStats.getHurtResistanceTime(aEntity.hurtResistantTime, aEntity));
- aPlayer.addExhaustion(0.3F);
- doDamage(aStack, tStats.getToolDamagePerEntityAttack());
- }
- }
- }
- if (aStack.stackSize <= 0) aPlayer.destroyCurrentEquippedItem();
- return true;
- }
-
- @Override
- public ItemStack onItemRightClick(ItemStack aStack, World aWorld, EntityPlayer aPlayer) {
- IToolStats tStats = getToolStats(aStack);
- if (tStats != null && tStats.canBlock()) aPlayer.setItemInUse(aStack, 72000);
- return super.onItemRightClick(aStack, aWorld, aPlayer);
- }
-
- @Override
- public final int getMaxItemUseDuration(ItemStack aStack) {
- return 72000;
- }
-
- @Override
- public final EnumAction getItemUseAction(ItemStack aStack) {
- IToolStats tStats = getToolStats(aStack);
- if (tStats != null && tStats.canBlock()) return EnumAction.block;
- return EnumAction.none;
- }
-
- @Override
- @SideOnly(Side.CLIENT)
- public final void getSubItems(Item var1, CreativeTabs aCreativeTab, List aList) {
- for (int i = 0; i < 32766; i+=2) if (getToolStats(new ItemStack(this, 1, i)) != null) {
- ItemStack tStack = new ItemStack(this, 1, i);
- isItemStackUsable(tStack);
- aList.add(tStack);
- }
- }
-
- @Override
- @SideOnly(Side.CLIENT)
- public final void registerIcons(IIconRegister aIconRegister) {
- //
- }
-
- @Override
- public final IIcon getIconFromDamage(int aMetaData) {
- return null;
- }
-
- @Override
- public void addAdditionalToolTips(List aList, ItemStack aStack) {
- long tMaxDamage = getToolMaxDamage(aStack);
- Materials tMaterial = getPrimaryMaterial(aStack);
- IToolStats tStats = getToolStats(aStack);
- int tOffset = getElectricStats(aStack) != null ? 2 : 1;
- if (tStats != null) {
- String name = aStack.getUnlocalizedName();
- if(name.equals("gt.metatool.01.170")||name.equals("gt.metatool.01.172")||name.equals("gt.metatool.01.174")||name.equals("gt.metatool.01.176")){
- aList.add(tOffset + 0, EnumChatFormatting.WHITE + "Durability: " + EnumChatFormatting.GREEN + (tMaxDamage - getToolDamage(aStack)) + " / " + tMaxDamage + EnumChatFormatting.GRAY);
- aList.add(tOffset + 1, EnumChatFormatting.WHITE + tMaterial.mDefaultLocalName + EnumChatFormatting.YELLOW + " lvl " + getHarvestLevel(aStack, "") + EnumChatFormatting.GRAY);
- aList.add(tOffset + 2, EnumChatFormatting.WHITE + "Turbine Efficency: " + EnumChatFormatting.BLUE + (50.0F+(10.0F*getToolCombatDamage(aStack))) + EnumChatFormatting.GRAY);
- aList.add(tOffset + 3, EnumChatFormatting.WHITE + "Optimal Steam flow: " + EnumChatFormatting.LIGHT_PURPLE + Math.max(Float.MIN_NORMAL, tStats.getSpeedMultiplier() * getPrimaryMaterial(aStack).mToolSpeed*1000) + EnumChatFormatting.GRAY+ "L/sec");
- aList.add(tOffset + 3, EnumChatFormatting.WHITE + "Optimal Gas flow(EU burnvalue per tick): " + EnumChatFormatting.LIGHT_PURPLE + Math.max(Float.MIN_NORMAL, tStats.getSpeedMultiplier() * getPrimaryMaterial(aStack).mToolSpeed*25) + EnumChatFormatting.GRAY+ "EU/t");
- aList.add(tOffset + 3, EnumChatFormatting.WHITE + "Optimal Plasma flow(Plasma energyvalue per tick): " + EnumChatFormatting.LIGHT_PURPLE + Math.max(Float.MIN_NORMAL, tStats.getSpeedMultiplier() * getPrimaryMaterial(aStack).mToolSpeed*1000) + EnumChatFormatting.GRAY+ "EU/t");
-
- }else{
- aList.add(tOffset + 0, EnumChatFormatting.WHITE + "Durability: " + EnumChatFormatting.GREEN + (tMaxDamage - getToolDamage(aStack)) + " / " + tMaxDamage + EnumChatFormatting.GRAY);
- aList.add(tOffset + 1, EnumChatFormatting.WHITE + tMaterial.mDefaultLocalName + EnumChatFormatting.YELLOW + " lvl " + getHarvestLevel(aStack, "") + EnumChatFormatting.GRAY);
- aList.add(tOffset + 2, EnumChatFormatting.WHITE + "Attack Damage: " + EnumChatFormatting.BLUE + getToolCombatDamage(aStack) + EnumChatFormatting.GRAY);
- aList.add(tOffset + 3, EnumChatFormatting.WHITE + "Mining Speed: " + EnumChatFormatting.LIGHT_PURPLE + Math.max(Float.MIN_NORMAL, tStats.getSpeedMultiplier() * getPrimaryMaterial(aStack).mToolSpeed) + EnumChatFormatting.GRAY);
- }}
- }
-
- public static final Materials getPrimaryMaterial(ItemStack aStack) {
- NBTTagCompound aNBT = aStack.getTagCompound();
- if (aNBT != null) {
- aNBT = aNBT.getCompoundTag("GT.ToolStats");
- if (aNBT != null) return Materials.getRealMaterial(aNBT.getString("PrimaryMaterial"));
- }
- return Materials._NULL;
- }
-
- public static final Materials getSecondaryMaterial(ItemStack aStack) {
- NBTTagCompound aNBT = aStack.getTagCompound();
- if (aNBT != null) {
- aNBT = aNBT.getCompoundTag("GT.ToolStats");
- if (aNBT != null) return Materials.getRealMaterial(aNBT.getString("SecondaryMaterial"));
- }
- return Materials._NULL;
- }
-
- @Override
- public Long[] getFluidContainerStats(ItemStack aStack) {
- return null;
- }
-
- @Override
- public Long[] getElectricStats(ItemStack aStack) {
- NBTTagCompound aNBT = aStack.getTagCompound();
- if (aNBT != null) {
- aNBT = aNBT.getCompoundTag("GT.ToolStats");
- if (aNBT != null && aNBT.getBoolean("Electric")) return new Long[] {aNBT.getLong("MaxCharge"), aNBT.getLong("Voltage"), aNBT.getLong("Tier"), aNBT.getLong("SpecialData")};
- }
- return null;
- }
-
- public float getToolCombatDamage(ItemStack aStack) {
- IToolStats tStats = getToolStats(aStack);
- if (tStats == null) return 0;
- return tStats.getBaseDamage() + getPrimaryMaterial(aStack).mToolQuality;
- }
-
- public static final long getToolMaxDamage(ItemStack aStack) {
- NBTTagCompound aNBT = aStack.getTagCompound();
- if (aNBT != null) {
- aNBT = aNBT.getCompoundTag("GT.ToolStats");
- if (aNBT != null) return aNBT.getLong("MaxDamage");
- }
- return 0;
- }
-
- public static final long getToolDamage(ItemStack aStack) {
- NBTTagCompound aNBT = aStack.getTagCompound();
- if (aNBT != null) {
- aNBT = aNBT.getCompoundTag("GT.ToolStats");
- if (aNBT != null) return aNBT.getLong("Damage");
- }
- return 0;
- }
-
- public static final boolean setToolDamage(ItemStack aStack, long aDamage) {
- NBTTagCompound aNBT = aStack.getTagCompound();
- if (aNBT != null) {
- aNBT = aNBT.getCompoundTag("GT.ToolStats");
- if (aNBT != null) {
- aNBT.setLong("Damage", aDamage);
- return true;
- }
- }
- return false;
- }
-
- @Override
- public final boolean doDamageToItem(ItemStack aStack, int aVanillaDamage) {
- return doDamage(aStack, aVanillaDamage * 100);
- }
-
- public final boolean doDamage(ItemStack aStack, long aAmount) {
- if (!isItemStackUsable(aStack)) return false;
- Long[] tElectric = getElectricStats(aStack);
- if (tElectric == null) {
- long tNewDamage = getToolDamage(aStack) + aAmount;
- setToolDamage(aStack, tNewDamage);
- if (tNewDamage >= getToolMaxDamage(aStack)) {
- IToolStats tStats = getToolStats(aStack);
- if (tStats == null || GT_Utility.setStack(aStack, tStats.getBrokenItem(aStack)) == null) {
- if (tStats != null) GT_Utility.doSoundAtClient(tStats.getBreakingSound(), 1, 1.0F);
- if (aStack.stackSize > 0) aStack.stackSize--;
-
- }
- }
- return true;
- }
- if (use(aStack, (int)aAmount, null)) {
- if (new Random().nextInt(25) == 0) {
- long tNewDamage = getToolDamage(aStack) + aAmount;
- setToolDamage(aStack, tNewDamage);
- if (tNewDamage >= getToolMaxDamage(aStack)) {
- IToolStats tStats = getToolStats(aStack);
- if (tStats == null || GT_Utility.setStack(aStack, tStats.getBrokenItem(aStack)) == null) {
- if (tStats != null) GT_Utility.doSoundAtClient(tStats.getBreakingSound(), 1, 1.0F);
- if (aStack.stackSize > 0) aStack.stackSize--;
- }
- }
- }
- return true;
- }
- return false;
- }
-
- @Override
- public float getDigSpeed(ItemStack aStack, Block aBlock, int aMetaData) {
- if (!isItemStackUsable(aStack)) return 0.0F;
- IToolStats tStats = getToolStats(aStack);
- if (tStats == null || Math.max(0, getHarvestLevel(aStack, "")) < aBlock.getHarvestLevel(aMetaData)) return 0.0F;
- return tStats.isMinableBlock(aBlock, (byte)aMetaData)?Math.max(Float.MIN_NORMAL, tStats.getSpeedMultiplier() * getPrimaryMaterial(aStack).mToolSpeed):0.0F;
- }
-
- @Override
- public final boolean canHarvestBlock(Block aBlock, ItemStack aStack) {
- return getDigSpeed(aStack, aBlock, (byte)0) > 0.0F;
- }
-
- @Override
- public final int getHarvestLevel(ItemStack aStack, String aToolClass) {
- IToolStats tStats = getToolStats(aStack);
- return tStats == null ? -1 : tStats.getBaseQuality() + getPrimaryMaterial(aStack).mToolQuality;
- }
-
- @Override
- public boolean onBlockDestroyed(ItemStack aStack, World aWorld, Block aBlock, int aX, int aY, int aZ, EntityLivingBase aPlayer) {
- if (!isItemStackUsable(aStack)) return false;
- IToolStats tStats = getToolStats(aStack);
- if (tStats == null) return false;
- GT_Utility.doSoundAtClient(tStats.getMiningSound(), 1, 1.0F);
- doDamage(aStack, (int)Math.max(1, aBlock.getBlockHardness(aWorld, aX, aY, aZ) * tStats.getToolDamagePerBlockBreak()));
- return getDigSpeed(aStack, aBlock, aWorld.getBlockMetadata(aX, aY, aZ)) > 0.0F;
- }
-
- @Override
- public final ItemStack getContainerItem(ItemStack aStack) {
- return getContainerItem(aStack, true);
- }
-
- @Override
- public final boolean hasContainerItem(ItemStack aStack) {
- return getContainerItem(aStack, false) != null;
- }
-
- private ItemStack getContainerItem(ItemStack aStack, boolean playSound) {
- if (!isItemStackUsable(aStack)) return null;
- aStack = GT_Utility.copyAmount(1, aStack);
- IToolStats tStats = getToolStats(aStack);
- if (tStats == null) return null;
- doDamage(aStack, tStats.getToolDamagePerContainerCraft());
- aStack = aStack.stackSize > 0 ? aStack : null;
- if (playSound) {
- String sound = (aStack == null) ? tStats.getBreakingSound() : tStats.getCraftingSound();
- GT_Utility.doSoundAtClient(sound, 1, 1.0F);
- }
- return aStack;
- }
-
- public IToolStats getToolStats(ItemStack aStack) {
- isItemStackUsable(aStack);
- return getToolStatsInternal(aStack);
- }
-
- private IToolStats getToolStatsInternal(ItemStack aStack) {
- return aStack == null ? null : mToolStats.get((short)aStack.getItemDamage());
- }
-
- @Override
- public float getSaplingModifier(ItemStack aStack, World aWorld, EntityPlayer aPlayer, int aX, int aY, int aZ) {
- IToolStats tStats = getToolStats(aStack);
- return tStats != null && tStats.isGrafter() ? Math.min(100.0F, (1+getHarvestLevel(aStack, "")) * 20.0F) : 0.0F;
- }
-
- @Override
- public boolean canWhack(EntityPlayer aPlayer, ItemStack aStack, int aX, int aY, int aZ) {
- if (!isItemStackUsable(aStack)) return false;
- IToolStats tStats = getToolStats(aStack);
- return tStats != null && tStats.isCrowbar();
- }
-
- @Override
- public void onWhack(EntityPlayer aPlayer, ItemStack aStack, int aX, int aY, int aZ) {
- IToolStats tStats = getToolStats(aStack);
- if (tStats != null) doDamage(aStack, tStats.getToolDamagePerEntityAttack());
- }
-
- @Override
- public boolean canLink(EntityPlayer aPlayer, ItemStack aStack, EntityMinecart cart) {
- if (!isItemStackUsable(aStack)) return false;
- IToolStats tStats = getToolStats(aStack);
- return tStats != null && tStats.isCrowbar();
- }
-
- @Override
- public void onLink(EntityPlayer aPlayer, ItemStack aStack, EntityMinecart cart) {
- IToolStats tStats = getToolStats(aStack);
- if (tStats != null) doDamage(aStack, tStats.getToolDamagePerEntityAttack());
- }
-
- @Override
- public boolean canBoost(EntityPlayer aPlayer, ItemStack aStack, EntityMinecart cart) {
- if (!isItemStackUsable(aStack)) return false;
- IToolStats tStats = getToolStats(aStack);
- return tStats != null && tStats.isCrowbar();
- }
-
- @Override
- public void onBoost(EntityPlayer aPlayer, ItemStack aStack, EntityMinecart cart) {
- IToolStats tStats = getToolStats(aStack);
- if (tStats != null) doDamage(aStack, tStats.getToolDamagePerEntityAttack());
- }
-
- @Override
- public void onCreated(ItemStack aStack, World aWorld, EntityPlayer aPlayer) {
- IToolStats tStats = getToolStats(aStack);
- if (tStats != null && aPlayer != null) tStats.onToolCrafted(aStack, aPlayer);
- super.onCreated(aStack, aWorld, aPlayer);
- }
-
- @Override
- public final boolean doesContainerItemLeaveCraftingGrid(ItemStack aStack) {
- return false;
- }
-
- @Override
- public final int getItemStackLimit(ItemStack aStack) {
- return 1;
- }
-
- @Override
- public boolean isFull3D() {
- return true;
- }
-
- @Override
- public boolean isItemStackUsable(ItemStack aStack) {
- IToolStats tStats = getToolStatsInternal(aStack);
- if (aStack.getItemDamage() % 2 == 1 || tStats == null) {
- NBTTagCompound aNBT = aStack.getTagCompound();
- if (aNBT != null) aNBT.removeTag("ench");
- return false;
- }
- Materials aMaterial = getPrimaryMaterial(aStack);
- HashMap<Integer, Integer> tMap = new HashMap<Integer, Integer>(), tResult = new HashMap<Integer, Integer>();
- if (aMaterial.mEnchantmentTools != null) {
- tMap.put(aMaterial.mEnchantmentTools.effectId, (int)aMaterial.mEnchantmentToolsLevel);
- if (aMaterial.mEnchantmentTools == Enchantment.fortune)
- tMap.put(Enchantment.looting.effectId, (int)aMaterial.mEnchantmentToolsLevel);
- if (aMaterial.mEnchantmentTools == Enchantment.knockback)
- tMap.put(Enchantment.power.effectId, (int)aMaterial.mEnchantmentToolsLevel);
- if (aMaterial.mEnchantmentTools == Enchantment.fireAspect)
- tMap.put(Enchantment.flame.effectId, (int)aMaterial.mEnchantmentToolsLevel);
- }
- Enchantment[] tEnchants = tStats.getEnchantments(aStack);
- int[] tLevels = tStats.getEnchantmentLevels(aStack);
- for (int i = 0; i < tEnchants.length; i++) if (tLevels[i] > 0) {
- Integer tLevel = tMap.get(tEnchants[i].effectId);
- tMap.put(tEnchants[i].effectId, tLevel == null ? tLevels[i] : tLevel == tLevels[i] ? tLevel+1 : Math.max(tLevel, tLevels[i]));
- }
- for (Entry<Integer, Integer> tEntry : tMap.entrySet()) {
- if (tEntry.getKey() == 33 || (tEntry.getKey() == 20 && tEntry.getValue() > 2) || tEntry.getKey() == Enchantment_Radioactivity.INSTANCE.effectId) tResult.put(tEntry.getKey(), tEntry.getValue()); else
- switch(Enchantment.enchantmentsList[tEntry.getKey()].type) {
- case weapon:
- if (tStats.isWeapon()) tResult.put(tEntry.getKey(), tEntry.getValue());
- break;
- case all:
- tResult.put(tEntry.getKey(), tEntry.getValue());
- break;
- case armor: case armor_feet: case armor_head: case armor_legs: case armor_torso:
- break;
- case bow:
- if (tStats.isRangedWeapon()) tResult.put(tEntry.getKey(), tEntry.getValue());
- break;
- case breakable:
- break;
- case fishing_rod:
- break;
- case digger:
- if (tStats.isMiningTool()) tResult.put(tEntry.getKey(), tEntry.getValue());
- break;
- }
- }
- EnchantmentHelper.setEnchantments(tResult, aStack);
- return true;
- }
-
- @Override
- public short getChargedMetaData(ItemStack aStack) {
- return (short)(aStack.getItemDamage() - (aStack.getItemDamage() % 2));
- }
-
- @Override
- public short getEmptyMetaData(ItemStack aStack) {
- NBTTagCompound aNBT = aStack.getTagCompound();
- if (aNBT != null) aNBT.removeTag("ench");
- return (short)(aStack.getItemDamage()+1-(aStack.getItemDamage() % 2));
- }
-
- @Override public int getItemEnchantability() {return 0;}
- @Override public boolean isBookEnchantable(ItemStack aStack, ItemStack aBook) {return false;}
- @Override public boolean getIsRepairable(ItemStack aStack, ItemStack aMaterial) {return false;}
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/items/GT_RadioactiveCellIC_Item.java b/main/java/gregtech/api/items/GT_RadioactiveCellIC_Item.java
deleted file mode 100644
index 2d9d8e0c4f..0000000000
--- a/main/java/gregtech/api/items/GT_RadioactiveCellIC_Item.java
+++ /dev/null
@@ -1,176 +0,0 @@
-package gregtech.api.items;
-
-
- import gregtech.api.enums.ItemList;
-import ic2.api.reactor.IReactor;
-import ic2.api.reactor.IReactorComponent;
-import ic2.core.IC2Potion;
-import ic2.core.Ic2Items;
-import ic2.core.init.InternalName;
-import ic2.core.item.ItemGradualInt;
-import ic2.core.item.armor.ItemArmorHazmat;
-
-import java.util.ArrayList;
-
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.item.ItemStack;
-import net.minecraft.world.World;
-
-
- public class GT_RadioactiveCellIC_Item extends GT_RadioactiveCell_Item implements IReactorComponent
- {
- public final int numberOfCells;
- public final float sEnergy;
- public final int sRadiation;
- public final float sHeat;
-
- public GT_RadioactiveCellIC_Item( String aUnlocalized, String aEnglish, int aCellcount, int maxDamage, float aEnergy, int aRadiation, float aHeat)
- {
- super(aUnlocalized, aEnglish, aCellcount);
- setMaxStackSize(64);
- this.maxDmg=maxDamage;
- this.numberOfCells = aCellcount;
- this.sEnergy = aEnergy;
- this.sRadiation = aRadiation;
- this.sHeat = aHeat;
-
- }
-
-
- private class ItemStackCoord
- {
- public ItemStack stack;
- public int x;
- public int y;
-
- public ItemStackCoord(ItemStack stack1, int x1, int y1)
- {
- this.stack = stack1;
- this.x = x1;
- this.y = y1;
- }
- }
-
- public void processChamber(IReactor reactor, ItemStack yourStack, int x, int y, boolean heatrun)
- {
- if (!reactor.produceEnergy()) {
- return;
- }
- for (int iteration = 0; iteration < this.numberOfCells; iteration++)
- {
- int pulses = 1 + this.numberOfCells / 2;
- if (!heatrun)
- {
- for (int i = 0; i < pulses; i++) {
- acceptUraniumPulse(reactor, yourStack, yourStack, x, y, x, y, heatrun);
- }
- pulses += checkPulseable(reactor, x - 1, y, yourStack, x, y, heatrun) + checkPulseable(reactor, x + 1, y, yourStack, x, y, heatrun) + checkPulseable(reactor, x, y - 1, yourStack, x, y, heatrun) + checkPulseable(reactor, x, y + 1, yourStack, x, y, heatrun);
- }
- else
- {
- pulses += checkPulseable(reactor, x - 1, y, yourStack, x, y, heatrun) + checkPulseable(reactor, x + 1, y, yourStack, x, y, heatrun) + checkPulseable(reactor, x, y - 1, yourStack, x, y, heatrun) + checkPulseable(reactor, x, y + 1, yourStack, x, y, heatrun);
-
- int heat = sumUp(pulses) * 4;
-
- ArrayList<ItemStackCoord> heatAcceptors = new ArrayList();
- checkHeatAcceptor(reactor, x - 1, y, heatAcceptors);
- checkHeatAcceptor(reactor, x + 1, y, heatAcceptors);
- checkHeatAcceptor(reactor, x, y - 1, heatAcceptors);
- checkHeatAcceptor(reactor, x, y + 1, heatAcceptors);
- heat = Math.round(heat * sHeat);
- while ((heatAcceptors.size() > 0) && (heat > 0))
- {
-
- int dheat = heat / heatAcceptors.size();
- heat -= dheat;
- dheat = ((IReactorComponent)((ItemStackCoord)heatAcceptors.get(0)).stack.getItem()).alterHeat(reactor, ((ItemStackCoord)heatAcceptors.get(0)).stack, ((ItemStackCoord)heatAcceptors.get(0)).x, ((ItemStackCoord)heatAcceptors.get(0)).y, dheat);
- heat += dheat;
- heatAcceptors.remove(0);
- }
- if (heat > 0) {
- reactor.addHeat(heat);
- }
- }
- }
- if (getDamageOfStack(yourStack) >= getMaxDamageEx() - 1) {
- switch (this.numberOfCells)
- {
- case 1:
- reactor.setItemAt(x, y, ItemList.Depleted_Thorium_1.get(1, new Object[0]));
- break;
- case 2:
- reactor.setItemAt(x, y, ItemList.Depleted_Thorium_2.get(1, new Object[0]));
- break;
- case 4:
- reactor.setItemAt(x, y, ItemList.Depleted_Thorium_4.get(1, new Object[0]));
- }
- } else if (heatrun) {
- damageItemStack(yourStack, 1);
- }
- }
-
-
- private static int checkPulseable(IReactor reactor, int x, int y, ItemStack me, int mex, int mey, boolean heatrun)
- {
- ItemStack other = reactor.getItemAt(x, y);
- if ((other != null) && ((other.getItem() instanceof IReactorComponent)) &&
- (((IReactorComponent)other.getItem()).acceptUraniumPulse(reactor, other, me, x, y, mex, mey, heatrun))) {
- return 1;
- }
- return 0;
- }
-
- private void checkHeatAcceptor(IReactor reactor, int x, int y, ArrayList<ItemStackCoord> heatAcceptors)
- {
- ItemStack thing = reactor.getItemAt(x, y);
- if ((thing != null) && ((thing.getItem() instanceof IReactorComponent)) &&
- (((IReactorComponent)thing.getItem()).canStoreHeat(reactor, thing, x, y))) {
- heatAcceptors.add(new ItemStackCoord(thing, x, y));
- }
- }
-
- public boolean acceptUraniumPulse(IReactor reactor, ItemStack yourStack, ItemStack pulsingStack, int youX, int youY, int pulseX, int pulseY, boolean heatrun)
- {
- if (!heatrun) {
- reactor.addOutput((float) (1.0F*this.sEnergy));
- }
- return true;
- }
-
- public boolean canStoreHeat(IReactor reactor, ItemStack yourStack, int x, int y)
- {
- return false;
- }
-
- public int getMaxHeat(IReactor reactor, ItemStack yourStack, int x, int y)
- {
- return 0;
- }
-
- public int getCurrentHeat(IReactor reactor, ItemStack yourStack, int x, int y)
- {
- return 0;
- }
-
- public int alterHeat(IReactor reactor, ItemStack yourStack, int x, int y, int heat)
- {
- return heat;
- }
-
- public float influenceExplosion(IReactor reactor, ItemStack yourStack)
- {
- return 2 * this.numberOfCells;
- }
-
- public void onUpdate(ItemStack stack, World world, Entity entity, int slotIndex, boolean isCurrentItem)
- {
- if (this.sRadiation>0&&(entity instanceof EntityLivingBase))
- {
- EntityLivingBase entityLiving = (EntityLivingBase)entity;
- if (!ItemArmorHazmat.hasCompleteHazmat(entityLiving)) {
- IC2Potion.radiation.applyTo(entityLiving, sRadiation*20, sRadiation*10);
- }
- }
- }
- }
diff --git a/main/java/gregtech/api/items/GT_RadioactiveCell_Item.java b/main/java/gregtech/api/items/GT_RadioactiveCell_Item.java
deleted file mode 100644
index a8cc213072..0000000000
--- a/main/java/gregtech/api/items/GT_RadioactiveCell_Item.java
+++ /dev/null
@@ -1,161 +0,0 @@
-package gregtech.api.items;
-
-import ic2.core.util.StackUtil;
-
-import java.util.List;
-
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-
-public class GT_RadioactiveCell_Item
- extends GT_Generic_Item
-{
- protected int cellCount;
- protected int maxDmg;
- protected int dura;
-
- public GT_RadioactiveCell_Item(String aUnlocalized, String aEnglish, int aCellcount)
- {
- super(aUnlocalized, aEnglish, null);
- this.setMaxStackSize(64);
- this.setMaxDamage(100);
- setNoRepair();
- this.cellCount = Math.max(1, aCellcount);
- }
-
- protected boolean outputPulseForStack(ItemStack aStack)
- {
- NBTTagCompound tNBT = aStack.getTagCompound();
- if (tNBT == null)
- {
- tNBT = new NBTTagCompound();
- aStack.setTagCompound(tNBT);
- }
- tNBT.setInteger("output", tNBT.getInteger("output") + 1);
- return false;//(this.pulserate > 0) || (tNBT.getInteger("output") % -this.pulserate == 0);
- }
-
- protected boolean incrementPulseForStack(ItemStack aStack)
- {
- NBTTagCompound tNBT = aStack.getTagCompound();
- if (tNBT == null)
- {
- tNBT = new NBTTagCompound();
- aStack.setTagCompound(tNBT);
- }
- tNBT.setInteger("pulse", tNBT.getInteger("pulse") + 1);
- return false;//(this.pulserate > 0) || (tNBT.getInteger("pulse") % -this.pulserate == 0);
- }
-
- protected void setDurabilityForStack(ItemStack aStack, int aDurability)
- {
- NBTTagCompound tNBT = aStack.getTagCompound();
- if (tNBT == null)
- {
- tNBT = new NBTTagCompound();
- aStack.setTagCompound(tNBT);
- }
- tNBT.setInteger("durability", aDurability);
-// if (this.maxDelay > 0)
-// {
-// double var4 = (this.maxDelay - aDurability) / this.maxDelay;
-// int var6 = (int)(aStack.getMaxDamage() * var4);
-// if (var6 >= aStack.getMaxDamage()) {
-// var6 = aStack.getMaxDamage() - 1;
-// }
-// aStack.setItemDamage(aStack.getMaxDamage() - var6);
-// }
- }
-
- public static int getDurabilityOfStack(ItemStack aStack)
- {
- NBTTagCompound tNBT = aStack.getTagCompound();
- if (tNBT == null)
- {
- tNBT = new NBTTagCompound();
- aStack.setTagCompound(tNBT);
- }
- return tNBT.getInteger("advDmg");
- }
-
- public int getMaxNuclearDurability()
- {
- return 0;//return this.maxDelay;
- }
-
- public int func_77619_b()
- {
- return 0;
- }
-
- public boolean isBookEnchantable(ItemStack itemstack1, ItemStack itemstack2)
- {
- return false;
- }
-
- public boolean func_82789_a(ItemStack par1ItemStack, ItemStack par2ItemStack)
- {
- return false;
- }
-
- protected static int sumUp(int a)
- {
- int b = 0;
- for (int c = 1; c <= a; c++) {
- b += c;
- }
- return b;
- }
-
- public void setDamageForStack(ItemStack stack, int advDmg)
- {
- NBTTagCompound nbtData = StackUtil.getOrCreateNbtData(stack);
- nbtData.setInteger("advDmg", advDmg);
- if (this.maxDmg > 0)
- {
- double p = (double)advDmg / (double)this.maxDmg;
- int newDmg = (int)(stack.getMaxDamage() * p);
- if (newDmg >= stack.getMaxDamage()) {
- newDmg = stack.getMaxDamage() - 1;
- }
- stack.setItemDamage(newDmg);
- this.dura = newDmg;
- }
- }
-
- public int getDamageOfStack(ItemStack stack)
- {
- NBTTagCompound nbtData = StackUtil.getOrCreateNbtData(stack);
- this.dura = nbtData.getInteger("advDmg");
- return this.dura;
- }
-
- public int getControlTagOfStack(ItemStack stack)
- {
- NBTTagCompound nbtData = StackUtil.getOrCreateNbtData(stack);
- return nbtData.getInteger("tag");
- }
-
- public void setControlTagOfStack(ItemStack stack, int tag)
- {
- NBTTagCompound nbtData = StackUtil.getOrCreateNbtData(stack);
- nbtData.setInteger("tag", tag);
- }
-
- public int getMaxDamageEx()
- {
- return this.maxDmg;
- }
-
- public void damageItemStack(ItemStack stack, int Dmg)
- {
- setDamageForStack(stack, getDamageOfStack(stack) + Dmg);
- }
-
- public void addAdditionalToolTips(List aList, ItemStack aStack)
- {
- super.addAdditionalToolTips(aList, aStack);
- //aList.add("Time left: " + (this.maxDelay - getDurabilityOfStack(aStack)) + " secs");
- aList.add("Durability: "+(this.maxDmg - getDurabilityOfStack(aStack))+"/"+this.maxDmg);
- }
-}
diff --git a/main/java/gregtech/api/items/GT_SolderingTool_Item.java b/main/java/gregtech/api/items/GT_SolderingTool_Item.java
deleted file mode 100644
index 0c8e3a8e2b..0000000000
--- a/main/java/gregtech/api/items/GT_SolderingTool_Item.java
+++ /dev/null
@@ -1,40 +0,0 @@
-package gregtech.api.items;
-
-import static gregtech.api.enums.GT_Values.W;
-import gregtech.api.GregTech_API;
-import gregtech.api.enums.ToolDictNames;
-import gregtech.api.util.GT_LanguageManager;
-import gregtech.api.util.GT_OreDictUnificator;
-
-import java.util.List;
-
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.world.World;
-
-public class GT_SolderingTool_Item extends GT_Tool_Item {
- public GT_SolderingTool_Item(String aUnlocalized, String aEnglish, int aMaxDamage, int aEntityDamage, int aDischargedGTID) {
- super(aUnlocalized, aEnglish, "To repair and construct Circuitry", aMaxDamage, aEntityDamage, true, -1, aDischargedGTID);
- GT_OreDictUnificator.registerOre(ToolDictNames.craftingToolSolderingIron, new ItemStack(this, 1, W));
- GregTech_API.registerSolderingTool(new ItemStack(this, 1, W));
-// setCraftingSound(GregTech_API.sSoundList.get(103));
-// setBreakingSound(GregTech_API.sSoundList.get(103));
-// setEntityHitSound(GregTech_API.sSoundList.get(103));
-// setUsageAmounts(1, 1, 1);
- }
-
- @Override
- public void addAdditionalToolTips(List aList, ItemStack aStack) {
- aList.add(GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".tooltip_1", "Sets the Strength of outputted Redstone"));
- aList.add(GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".tooltip_2", "Needs Soldering Metal in Inventory!"));
- }
-
- @Override
- public boolean onItemUseFirst(ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) {
- super.onItemUseFirst(aStack, aPlayer, aWorld, aX, aY, aZ, aSide, hitX, hitY, hitZ);
- if (aWorld.isRemote) {
- return false;
- }
- return false;
- }
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/items/GT_Spray_Bug_Item.java b/main/java/gregtech/api/items/GT_Spray_Bug_Item.java
deleted file mode 100644
index d39d3d67a1..0000000000
--- a/main/java/gregtech/api/items/GT_Spray_Bug_Item.java
+++ /dev/null
@@ -1,66 +0,0 @@
-package gregtech.api.items;
-
-import gregtech.api.GregTech_API;
-import gregtech.api.util.GT_ModHandler;
-import gregtech.api.util.GT_Utility;
-import net.minecraft.block.Block;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.world.World;
-
-public class GT_Spray_Bug_Item extends GT_Tool_Item {
- public GT_Spray_Bug_Item(String aUnlocalized, String aEnglish, int aMaxDamage, int aEntityDamage) {
- super(aUnlocalized, aEnglish, "A very 'buggy' Spray", aMaxDamage, aEntityDamage, true);/*
- addToEffectiveList(EntityCaveSpider.class.getName());
- addToEffectiveList(EntitySpider.class.getName());
- addToEffectiveList("EntityTFHedgeSpider");
- addToEffectiveList("EntityTFKingSpider");
- addToEffectiveList("EntityTFSwarmSpider");
- addToEffectiveList("EntityTFTowerBroodling");
- addToEffectiveList("EntityTFFireBeetle");
- addToEffectiveList("EntityTFSlimeBeetle");
- setCraftingSound(GregTech_API.sSoundList.get(102));
- setBreakingSound(GregTech_API.sSoundList.get(102));
- setEntityHitSound(GregTech_API.sSoundList.get(102));
- setUsageAmounts(8, 4, 1);*/
- }
- /*
- @Override
- public void onHitEntity(Entity aEntity) {
- if (aEntity instanceof EntityLiving) {
- ((EntityLiving)aEntity).addPotionEffect(new PotionEffect(Potion.poison.getId(), 60, 1, false));
- ((EntityLiving)aEntity).addPotionEffect(new PotionEffect(Potion.confusion.getId(), 600, 1, false));
- }
- }
-
- @Override
- public ItemStack getEmptiedItem(ItemStack aStack) {
- return ItemList.Spray_Empty.get(1);
- }
- */
- @Override
- public boolean onItemUseFirst(ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) {
- super.onItemUseFirst(aStack, aPlayer, aWorld, aX, aY, aZ, aSide, hitX, hitY, hitZ);
- if (aWorld.isRemote) {
- return false;
- }
- Block aBlock = aWorld.getBlock(aX, aY, aZ);
- if (aBlock == null) return false;
-// byte aMeta = (byte)aWorld.getBlockMetadata(aX, aY, aZ);
- TileEntity aTileEntity = aWorld.getTileEntity(aX, aY, aZ);
-
- try {
- if (aTileEntity instanceof ic2.api.crops.ICropTile) {
- int tCropBefore = ((ic2.api.crops.ICropTile)aTileEntity).getWeedExStorage();
- if (tCropBefore <= 100 && GT_ModHandler.damageOrDechargeItem(aStack, 1, 1000, aPlayer)) {
- ((ic2.api.crops.ICropTile)aTileEntity).setWeedExStorage(tCropBefore+100);
- GT_Utility.sendSoundToPlayers(aWorld, GregTech_API.sSoundList.get(102), 1.0F, -1, aX, aY, aZ);
- return true;
- }
- }
- } catch (Throwable e) {/*Do nothing*/}
-
- return false;
- }
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/items/GT_Spray_Foam_Item.java b/main/java/gregtech/api/items/GT_Spray_Foam_Item.java
deleted file mode 100644
index 20f2971e87..0000000000
--- a/main/java/gregtech/api/items/GT_Spray_Foam_Item.java
+++ /dev/null
@@ -1,160 +0,0 @@
-package gregtech.api.items;
-
-import static gregtech.api.enums.GT_Values.D1;
-import gregtech.api.GregTech_API;
-import gregtech.api.metatileentity.BaseMetaPipeEntity;
-import gregtech.api.util.GT_Log;
-import gregtech.api.util.GT_ModHandler;
-import gregtech.api.util.GT_Utility;
-import net.minecraft.block.Block;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemBlock;
-import net.minecraft.item.ItemStack;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.util.MathHelper;
-import net.minecraft.world.World;
-import net.minecraftforge.common.util.ForgeDirection;
-
-public class GT_Spray_Foam_Item extends GT_Tool_Item {
- public GT_Spray_Foam_Item(String aUnlocalized, String aEnglish, int aMaxDamage, int aEntityDamage) {
- super(aUnlocalized, aEnglish, "Precision Spray", aMaxDamage, aEntityDamage, true);/*
- setCraftingSound(GregTech_API.sSoundList.get(102));
- setBreakingSound(GregTech_API.sSoundList.get(102));
- setEntityHitSound(GregTech_API.sSoundList.get(102));
- setUsageAmounts(25, 3, 1);*/
- }
- /*
- @Override
- public ItemStack getEmptiedItem(ItemStack aStack) {
- return ItemList.Spray_Empty.get(1);
- }
-
- public void switchMode(ItemStack aStack, EntityPlayer aPlayer) {
- setMode(aStack, (getMode(aStack) + 1) % 3);
- switch (getMode(aStack)) {
- case 0: GT_Utility.sendChatToPlayer(aPlayer, "Single Block Mode"); break;
- case 1: GT_Utility.sendChatToPlayer(aPlayer, "4m Line Mode"); break;
- case 2: GT_Utility.sendChatToPlayer(aPlayer, "3mx3m Area Mode"); break;
- }
- }
-
- @Override
- public void addAdditionalToolTips(List aList, ItemStack aStack) {
- super.addAdditionalToolTips(aList, aStack);
- switch (getMode(aStack)) {
- case 0: aList.add("Single Block Mode"); break;
- case 1: aList.add("4m Line Mode"); break;
- case 2: aList.add("3mx3m Area Mode"); break;
- }
- }
-
- @Override
- public ItemStack onItemRightClick(ItemStack aStack, World aWorld, EntityPlayer aPlayer) {
- if (aPlayer.isSneaking()) switchMode(aStack, aPlayer);
- return super.onItemRightClick(aStack, aWorld, aPlayer);
- }
- */
- @Override
- public boolean onItemUseFirst(ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) {
- super.onItemUseFirst(aStack, aPlayer, aWorld, aX, aY, aZ, aSide, hitX, hitY, hitZ);
- if (aPlayer.isSneaking()) return false;
- if (aWorld.isRemote) {
- return false;
- }
- Block aBlock = aWorld.getBlock(aX, aY, aZ);
- if (aBlock == null) return false;
-// byte aMeta = (byte)aWorld.getBlockMetadata(aX, aY, aZ);
- TileEntity aTileEntity = aWorld.getTileEntity(aX, aY, aZ);
-
- try {
- if (GT_Utility.getClassName(aTileEntity).startsWith("TileEntityCable")) {
- if (GT_Utility.getPublicField(aTileEntity, "foamed").getByte(aTileEntity) == 0) {
- if (GT_ModHandler.damageOrDechargeItem(aStack, 1, 1000, aPlayer)) {
- GT_Utility.sendSoundToPlayers(aWorld, GregTech_API.sSoundList.get(102), 1.0F, -1, aX, aY, aZ);
- GT_Utility.callPublicMethod(aTileEntity, "changeFoam", (byte)1);
- return true;
- }
- }
- return false;
- }
- } catch(Throwable e) {
- if (D1) e.printStackTrace(GT_Log.err);
- }
-
- if (aTileEntity instanceof BaseMetaPipeEntity && (((BaseMetaPipeEntity)aTileEntity).mConnections & -64) == 0) {
- if (GT_ModHandler.damageOrDechargeItem(aStack, 1, 1000, aPlayer)) {
- GT_Utility.sendSoundToPlayers(aWorld, GregTech_API.sSoundList.get(102), 1.0F, -1, aX, aY, aZ);
- ((BaseMetaPipeEntity)aTileEntity).mConnections |= 64;
- }
- return true;
- }
-
- aX += ForgeDirection.getOrientation(aSide).offsetX;
- aY += ForgeDirection.getOrientation(aSide).offsetY;
- aZ += ForgeDirection.getOrientation(aSide).offsetZ;
-
- ItemStack tStack = GT_ModHandler.getIC2Item("constructionFoam", 1);
- if (tStack != null && tStack.getItem() instanceof ItemBlock) {
- int tRotationPitch = Math.round(aPlayer.rotationPitch);
- byte tSide = 0;
- if (tRotationPitch >= 65) {
- tSide = 1;
- } else if (tRotationPitch <= -65) {
- tSide = 0;
- } else {
- switch (MathHelper.floor_double((aPlayer.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3) {
- case 0: tSide = 2; break;
- case 1: tSide = 5; break;
- case 2: tSide = 3; break;
- case 3: tSide = 4; break;
- }
- }
- switch (0) {
- case 0:
- if (GT_Utility.isBlockAir(aWorld, aX, aY, aZ) && GT_ModHandler.damageOrDechargeItem(aStack, 1, 1000, aPlayer)) {
- GT_Utility.sendSoundToPlayers(aWorld, GregTech_API.sSoundList.get(102), 1.0F, -1, aX, aY, aZ);
- aWorld.setBlock(aX, aY, aZ, GT_Utility.getBlockFromStack(tStack), tStack.getItemDamage(), 3);
- return true;
- }
- break;
- case 1:
- for (byte i = 0; i < 4; i++) {
- if (GT_Utility.isBlockAir(aWorld, aX, aY, aZ) && GT_ModHandler.damageOrDechargeItem(aStack, 1, 1000, aPlayer)) {
- GT_Utility.sendSoundToPlayers(aWorld, GregTech_API.sSoundList.get(102), 1.0F, -1, aX, aY, aZ);
- aWorld.setBlock(aX, aY, aZ, GT_Utility.getBlockFromStack(tStack), tStack.getItemDamage(), 3);
- } else {
- if (i == 0) return false;
- break;
- }
- aX -= ForgeDirection.getOrientation(tSide).offsetX;
- aY -= ForgeDirection.getOrientation(tSide).offsetY;
- aZ -= ForgeDirection.getOrientation(tSide).offsetZ;
- }
- return true;
- case 2:
- boolean temp = false,
- tXFactor = (ForgeDirection.getOrientation(tSide).offsetX == 0),
- tYFactor = (ForgeDirection.getOrientation(tSide).offsetY == 0),
- tZFactor = (ForgeDirection.getOrientation(tSide).offsetZ == 0);
-
- aX -= (tXFactor ? 1 : 0);
- aY -= (tYFactor ? 1 : 0);
- aZ -= (tZFactor ? 1 : 0);
-
- for (byte i = 0; i < 3; i++) for (byte j = 0; j < 3; j++) {
- if (GT_Utility.isBlockAir(aWorld, aX + (tXFactor?i:0), aY + (!tXFactor&&tYFactor?i:0) + (!tZFactor&&tYFactor?j:0), aZ + (tZFactor?j:0))) {
- if (GT_ModHandler.damageOrDechargeItem(aStack, 1, 1000, aPlayer)) {
- GT_Utility.sendSoundToPlayers(aWorld, GregTech_API.sSoundList.get(102), 1.0F, -1, aX, aY, aZ);
- aWorld.setBlock(aX + (tXFactor?i:0), aY + (!tXFactor&&tYFactor?i:0) + (!tZFactor&&tYFactor?j:0), aZ + (tZFactor?j:0), GT_Utility.getBlockFromStack(tStack), tStack.getItemDamage(), 3);
- temp = true;
- } else {
- break;
- }
- }
- }
- return temp;
- }
- }
- return false;
- }
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/items/GT_Spray_Hardener_Item.java b/main/java/gregtech/api/items/GT_Spray_Hardener_Item.java
deleted file mode 100644
index bd90c295ec..0000000000
--- a/main/java/gregtech/api/items/GT_Spray_Hardener_Item.java
+++ /dev/null
@@ -1,70 +0,0 @@
-package gregtech.api.items;
-
-import static gregtech.api.enums.GT_Values.D1;
-import gregtech.api.GregTech_API;
-import gregtech.api.metatileentity.BaseMetaPipeEntity;
-import gregtech.api.util.GT_Log;
-import gregtech.api.util.GT_ModHandler;
-import gregtech.api.util.GT_Utility;
-import net.minecraft.block.Block;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemBlock;
-import net.minecraft.item.ItemStack;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.world.World;
-
-public class GT_Spray_Hardener_Item extends GT_Tool_Item {
- public GT_Spray_Hardener_Item(String aUnlocalized, String aEnglish, int aMaxDamage, int aEntityDamage) {
- super(aUnlocalized, aEnglish, "Construction Foam Hardener", aMaxDamage, aEntityDamage, true);/*
- setCraftingSound(GregTech_API.sSoundList.get(102));
- setBreakingSound(GregTech_API.sSoundList.get(102));
- setEntityHitSound(GregTech_API.sSoundList.get(102));
- setUsageAmounts(16, 3, 1);*/
- }
-
- @Override
- public boolean onItemUseFirst(ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) {
- super.onItemUseFirst(aStack, aPlayer, aWorld, aX, aY, aZ, aSide, hitX, hitY, hitZ);
- if (aWorld.isRemote) {
- return false;
- }
- Block aBlock = aWorld.getBlock(aX, aY, aZ);
- if (aBlock == null) return false;
-// byte aMeta = (byte)aWorld.getBlockMetadata(aX, aY, aZ);
- TileEntity aTileEntity = aWorld.getTileEntity(aX, aY, aZ);
-
- try {
- if (GT_Utility.getClassName(aTileEntity).startsWith("TileEntityCable")) {
- if (GT_Utility.getPublicField(aTileEntity, "foamed").getByte(aTileEntity) == 1) {
- if (GT_ModHandler.damageOrDechargeItem(aStack, 1, 1000, aPlayer)) {
- GT_Utility.sendSoundToPlayers(aWorld, GregTech_API.sSoundList.get(102), 1.0F, -1, aX, aY, aZ);
- GT_Utility.callPublicMethod(aTileEntity, "changeFoam", (byte)2);
- return true;
- }
- }
- return false;
- }
- } catch(Throwable e) {
- if (D1) e.printStackTrace(GT_Log.err);
- }
-
- ItemStack tStack1 = GT_ModHandler.getIC2Item("constructionFoam", 1), tStack2 = GT_ModHandler.getIC2Item("constructionFoamWall", 1);
- if (tStack1 != null && tStack1.isItemEqual(new ItemStack(aBlock)) && tStack2 != null && tStack2.getItem() != null && tStack2.getItem() instanceof ItemBlock) {
- if (GT_ModHandler.damageOrDechargeItem(aStack, 1, 1000, aPlayer)) {
- GT_Utility.sendSoundToPlayers(aWorld, GregTech_API.sSoundList.get(102), 1.0F, -1, aX, aY, aZ);
- aWorld.setBlock(aX, aY, aZ, GT_Utility.getBlockFromStack(tStack2), 7, 3);
- }
- return true;
- }
-
- if (aTileEntity instanceof BaseMetaPipeEntity && (((BaseMetaPipeEntity)aTileEntity).mConnections & -64) == 64) {
- if (GT_ModHandler.damageOrDechargeItem(aStack, 1, 1000, aPlayer)) {
- GT_Utility.sendSoundToPlayers(aWorld, GregTech_API.sSoundList.get(102), 1.0F, -1, aX, aY, aZ);
- ((BaseMetaPipeEntity)aTileEntity).mConnections = (byte)((((BaseMetaPipeEntity)aTileEntity).mConnections & ~64) | -128);
- }
- return true;
- }
-
- return false;
- }
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/items/GT_Spray_Hydration_Item.java b/main/java/gregtech/api/items/GT_Spray_Hydration_Item.java
deleted file mode 100644
index 2fbc1f38f9..0000000000
--- a/main/java/gregtech/api/items/GT_Spray_Hydration_Item.java
+++ /dev/null
@@ -1,53 +0,0 @@
-package gregtech.api.items;
-
-import gregtech.api.GregTech_API;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.util.GT_ModHandler;
-import gregtech.api.util.GT_Utility;
-import net.minecraft.block.Block;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.world.World;
-
-public class GT_Spray_Hydration_Item extends GT_Tool_Item {
- public GT_Spray_Hydration_Item(String aUnlocalized, String aEnglish, int aMaxDamage, int aEntityDamage) {
- super(aUnlocalized, aEnglish, "To hydrate Crops and similar", aMaxDamage, aEntityDamage, true);/*
- setCraftingSound(GregTech_API.sSoundList.get(102));
- setBreakingSound(GregTech_API.sSoundList.get(102));
- setEntityHitSound(GregTech_API.sSoundList.get(102));
- setUsageAmounts(20, 3, 1);*/
- }
-
- @Override
- public boolean onItemUseFirst(ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) {
- super.onItemUseFirst(aStack, aPlayer, aWorld, aX, aY, aZ, aSide, hitX, hitY, hitZ);
- if (aWorld.isRemote) {
- return false;
- }
- Block aBlock = aWorld.getBlock(aX, aY, aZ);
- if (aBlock == null) return false;
-// byte aMeta = (byte)aWorld.getBlockMetadata(aX, aY, aZ);
- TileEntity aTileEntity = aWorld.getTileEntity(aX, aY, aZ);
-
- try {
- if (aTileEntity instanceof ic2.api.crops.ICropTile) {
- int tCropBefore = ((ic2.api.crops.ICropTile)aTileEntity).getHydrationStorage();
- if (tCropBefore <= 100 && GT_ModHandler.damageOrDechargeItem(aStack, 1, 1000, aPlayer)) {
- ((ic2.api.crops.ICropTile)aTileEntity).setHydrationStorage(tCropBefore+100);
- GT_Utility.sendSoundToPlayers(aWorld, GregTech_API.sSoundList.get(102), 1.0F, -1, aX, aY, aZ);
- }
- return true;
- }
- } catch (Throwable e) {/*Do nothing*/}
-
- if (aTileEntity instanceof IGregTechTileEntity) {
- if (((IGregTechTileEntity)aTileEntity).getColorization() >= 0 && GT_ModHandler.damageOrDechargeItem(aStack, 1, 1000, aPlayer)) {
- ((IGregTechTileEntity)aTileEntity).setColorization((byte)-1);
- GT_Utility.sendSoundToPlayers(aWorld, GregTech_API.sSoundList.get(102), 1.0F, -1, aX, aY, aZ);
- }
- }
-
- return false;
- }
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/items/GT_Spray_Ice_Item.java b/main/java/gregtech/api/items/GT_Spray_Ice_Item.java
deleted file mode 100644
index 2e8c4ed0a8..0000000000
--- a/main/java/gregtech/api/items/GT_Spray_Ice_Item.java
+++ /dev/null
@@ -1,81 +0,0 @@
-package gregtech.api.items;
-
-import static gregtech.api.enums.GT_Values.W;
-import gregtech.api.GregTech_API;
-import gregtech.api.enums.Materials;
-import gregtech.api.enums.OrePrefixes;
-import gregtech.api.util.GT_ModHandler;
-import gregtech.api.util.GT_Utility;
-
-import java.util.Arrays;
-
-import net.minecraft.block.Block;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Blocks;
-import net.minecraft.item.ItemStack;
-import net.minecraft.world.World;
-import net.minecraftforge.common.util.ForgeDirection;
-
-public class GT_Spray_Ice_Item extends GT_Tool_Item {
- public GT_Spray_Ice_Item(String aUnlocalized, String aEnglish, int aMaxDamage, int aEntityDamage) {
- super(aUnlocalized, aEnglish, "Very effective against Slimes", aMaxDamage, aEntityDamage, true);/*
- addToEffectiveList(EntitySlime.class.getName());
- addToEffectiveList("BlueSlime");
- addToEffectiveList("SlimeClone");
- addToEffectiveList("MetalSlime");
- addToEffectiveList("EntityTFFireBeetle");
- addToEffectiveList("EntityTFMazeSlime");
- addToEffectiveList("EntityTFSlimeBeetle");
- setCraftingSound(GregTech_API.sSoundList.get(102));
- setBreakingSound(GregTech_API.sSoundList.get(102));
- setEntityHitSound(GregTech_API.sSoundList.get(102));
- setUsageAmounts(4, 16, 1);*/
-
- for (Object tName : Arrays.asList(OrePrefixes.bucket.get(Materials.Water), OrePrefixes.cell.get(Materials.Water), OrePrefixes.capsule.get(Materials.Water))) {
- GT_ModHandler.addShapelessCraftingRecipe(new ItemStack(Blocks.ice, 1, 0), new Object[] {new ItemStack(this, 1, W), tName});
- }
- }
- /*
- @Override
- public void onHitEntity(Entity aEntity) {
- if (aEntity instanceof EntityLiving) {
- ((EntityLiving)aEntity).addPotionEffect(new PotionEffect(Potion.weakness.getId(), 400, 2, false));
- ((EntityLiving)aEntity).addPotionEffect(new PotionEffect(Potion.moveSlowdown.getId(), 400, 2, false));
- }
- }
- */
-
- @Override
- public boolean onItemUseFirst(ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) {
- super.onItemUseFirst(aStack, aPlayer, aWorld, aX, aY, aZ, aSide, hitX, hitY, hitZ);
- if (aWorld.isRemote) {
- return false;
- }
- aX += ForgeDirection.getOrientation(aSide).offsetX;
- aY += ForgeDirection.getOrientation(aSide).offsetY;
- aZ += ForgeDirection.getOrientation(aSide).offsetZ;
- Block aBlock = aWorld.getBlock(aX, aY, aZ);
- if (aBlock == null) return false;
- byte aMeta = (byte)aWorld.getBlockMetadata(aX, aY, aZ);
-// TileEntity aTileEntity = aWorld.getTileEntity(aX, aY, aZ);
-
- if (aBlock == Blocks.water || aBlock == Blocks.flowing_water) {
- if (aMeta == 0 && GT_ModHandler.damageOrDechargeItem(aStack, 1, 1000, aPlayer)) {
- GT_Utility.sendSoundToPlayers(aWorld, GregTech_API.sSoundList.get(102), 1.0F, -1, aX, aY, aZ);
- aWorld.setBlock(aX, aY, aZ, Blocks.ice, 0, 3);
- return true;
- }
- return false;
- }
-
- if (aBlock == Blocks.lava || aBlock == Blocks.flowing_lava) {
- if (aMeta == 0 && GT_ModHandler.damageOrDechargeItem(aStack, 1, 1000, aPlayer)) {
- GT_Utility.sendSoundToPlayers(aWorld, GregTech_API.sSoundList.get(102), 1.0F, -1, aX, aY, aZ);
- aWorld.setBlock(aX, aY, aZ, Blocks.obsidian, 0, 3);
- return true;
- }
- return false;
- }
- return false;
- }
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/items/GT_Spray_Pepper_Item.java b/main/java/gregtech/api/items/GT_Spray_Pepper_Item.java
deleted file mode 100644
index 65f7469126..0000000000
--- a/main/java/gregtech/api/items/GT_Spray_Pepper_Item.java
+++ /dev/null
@@ -1,52 +0,0 @@
-package gregtech.api.items;
-
-import gregtech.api.util.GT_LanguageManager;
-
-import java.util.List;
-
-import net.minecraft.block.Block;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.world.World;
-
-public class GT_Spray_Pepper_Item extends GT_Tool_Item {
- public GT_Spray_Pepper_Item(String aUnlocalized, String aEnglish, int aMaxDamage, int aEntityDamage) {
- super(aUnlocalized, aEnglish, "To defend yourself against Bears", aMaxDamage, aEntityDamage, true);/*
- setCraftingSound(GregTech_API.sSoundList.get(102));
- setBreakingSound(GregTech_API.sSoundList.get(102));
- setEntityHitSound(GregTech_API.sSoundList.get(102));
- setUsageAmounts(1, 8, 1);*/
- }
-
- @Override
- public void addAdditionalToolTips(List aList, ItemStack aStack) {
- aList.add(GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".tooltip_1", "especially Pedobears, Care Bears,"));
- aList.add(GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".tooltip_2", "Confession Bears, Bear Grylls"));
- aList.add(GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".tooltip_3", "And ofcourse Man-Bear-Pig"));
- }
- /*
- @Override
- public void onHitEntity(Entity aEntity) {
- if (aEntity instanceof EntityLiving) {
- ((EntityLiving)aEntity).addPotionEffect(new PotionEffect(Potion.blindness.getId(), 1200, 2, false));
- ((EntityLiving)aEntity).addPotionEffect(new PotionEffect(Potion.poison.getId(), 120, 2, false));
- ((EntityLiving)aEntity).addPotionEffect(new PotionEffect(Potion.weakness.getId(), 200, 2, false));
- ((EntityLiving)aEntity).addPotionEffect(new PotionEffect(Potion.confusion.getId(), 600, 2, false));
- }
- }
- */
-
- @Override
- public boolean onItemUseFirst(ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) {
- super.onItemUseFirst(aStack, aPlayer, aWorld, aX, aY, aZ, aSide, hitX, hitY, hitZ);
- if (aWorld.isRemote) {
- return false;
- }
- Block aBlock = aWorld.getBlock(aX, aY, aZ);
- if (aBlock == null) return false;
-// byte aMeta = (byte)aWorld.getBlockMetadata(aX, aY, aZ);
-// TileEntity aTileEntity = aWorld.getTileEntity(aX, aY, aZ);
-
- return false;
- }
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/items/GT_Tool_Item.java b/main/java/gregtech/api/items/GT_Tool_Item.java
deleted file mode 100644
index 6c61d596f3..0000000000
--- a/main/java/gregtech/api/items/GT_Tool_Item.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package gregtech.api.items;
-
-import gregtech.api.util.GT_ModHandler;
-
-/**
- * This is just a basic Tool, which has normal durability and could break Blocks.
- */
-public class GT_Tool_Item extends GT_Generic_Item {
- public GT_Tool_Item(String aUnlocalized, String aEnglish, String aTooltip, int aMaxDamage, int aEntityDamage, boolean aSwingIfUsed) {
- this(aUnlocalized, aEnglish, aTooltip, aMaxDamage, aEntityDamage, aSwingIfUsed, -1, -1);
- }
-
- public GT_Tool_Item(String aUnlocalized, String aEnglish, String aTooltip, int aMaxDamage, int aEntityDamage, boolean aSwingIfUsed, int aChargedGTID, int aDisChargedGTID) {
- this(aUnlocalized, aEnglish, aTooltip, aMaxDamage, aEntityDamage, aSwingIfUsed, aChargedGTID, aDisChargedGTID, 0, 0.0F);
- }
-
- public GT_Tool_Item(String aUnlocalized, String aEnglish, String aTooltip, int aMaxDamage, int aEntityDamage, boolean aSwingIfUsed, int aChargedGTID, int aDisChargedGTID, int aToolQuality, float aToolStrength) {
- super(aUnlocalized, aEnglish, aTooltip, aTooltip != null && !aTooltip.equals("Doesn't work as intended, this is a Bug"));
- setMaxDamage(aMaxDamage);
- setMaxStackSize(1);
- setNoRepair();
- setFull3D();
- GT_ModHandler.registerBoxableItemToToolBox(this);
- }
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/metatileentity/BaseMetaPipeEntity.java b/main/java/gregtech/api/metatileentity/BaseMetaPipeEntity.java
deleted file mode 100644
index 4244753ba7..0000000000
--- a/main/java/gregtech/api/metatileentity/BaseMetaPipeEntity.java
+++ /dev/null
@@ -1,1016 +0,0 @@
-package gregtech.api.metatileentity;
-
-import static gregtech.api.enums.GT_Values.NW;
-import gregtech.api.GregTech_API;
-import gregtech.api.enums.Textures;
-import gregtech.api.interfaces.ITexture;
-import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.interfaces.tileentity.IPipeRenderedTileEntity;
-import gregtech.api.net.GT_Packet_TileEntity;
-import gregtech.api.objects.GT_ItemStack;
-import gregtech.api.util.*;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.item.EntityItem;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Items;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.nbt.NBTTagList;
-import net.minecraft.network.Packet;
-import net.minecraft.util.AxisAlignedBB;
-import net.minecraft.world.World;
-import net.minecraftforge.common.util.ForgeDirection;
-import net.minecraftforge.fluids.Fluid;
-import net.minecraftforge.fluids.FluidStack;
-import net.minecraftforge.fluids.FluidTankInfo;
-
-/**
- * NEVER INCLUDE THIS FILE IN YOUR MOD!!!
- *
- * This is the main TileEntity for EVERYTHING.
- */
-public class BaseMetaPipeEntity extends BaseTileEntity implements IGregTechTileEntity, IPipeRenderedTileEntity {
- public byte mConnections = 0;
-
- protected MetaPipeEntity mMetaTileEntity;
-
- private byte[] mSidedRedstone = new byte[] {0,0,0,0,0,0};
- private int[] mCoverSides = new int[] {0,0,0,0,0,0}, mCoverData = new int[] {0,0,0,0,0,0}, mTimeStatistics = new int[GregTech_API.TICKS_FOR_LAG_AVERAGING];
- private boolean mInventoryChanged = false, mWorkUpdate = false, mWorks = true, mNeedsUpdate = true, mNeedsBlockUpdate = true, mSendClientData = false;
- private byte mColor = 0, oColor = 0, mStrongRedstone = 0, oRedstoneData = 63, oTextureData = 0, oUpdateData = 0, mLagWarningCount = 0;
- private int oX = 0, oY = 0, oZ = 0, mTimeStatisticsIndex = 0;
- private short mID = 0;
- private long mTickTimer = 0;
-
- public BaseMetaPipeEntity() {}
-
- @Override
- public void writeToNBT(NBTTagCompound aNBT) {
- try {
- super.writeToNBT(aNBT);
- } catch(Throwable e) {
- GT_Log.err.println("Encountered CRITICAL ERROR while saving MetaTileEntity, the Chunk whould've been corrupted by now, but I prevented that. Please report immidietly to GregTech Intergalactical!!!");
- e.printStackTrace(GT_Log.err);
- }
- try {
- aNBT.setInteger ("mID" , mID);
- aNBT.setIntArray ("mCoverData" , mCoverData);
- aNBT.setIntArray ("mCoverSides" , mCoverSides);
- aNBT.setByteArray ("mRedstoneSided" , mSidedRedstone);
- aNBT.setByte ("mConnections" , mConnections);
- aNBT.setByte ("mColor" , mColor);
- aNBT.setByte ("mStrongRedstone" , mStrongRedstone);
- aNBT.setBoolean ("mWorks" , !mWorks);
- } catch(Throwable e) {
- GT_Log.err.println("Encountered CRITICAL ERROR while saving MetaTileEntity, the Chunk whould've been corrupted by now, but I prevented that. Please report immidietly to GregTech Intergalactical!!!");
- e.printStackTrace(GT_Log.err);
- }
- try {
- if (hasValidMetaTileEntity()) {
- NBTTagList tItemList = new NBTTagList();
- for (int i = 0; i < mMetaTileEntity.getRealInventory().length; i++) {
- ItemStack tStack = mMetaTileEntity.getRealInventory()[i];
- if (tStack != null) {
- NBTTagCompound tTag = new NBTTagCompound();
- tTag.setInteger("IntSlot", i);
- tStack.writeToNBT(tTag);
- tItemList.appendTag(tTag);
- }
- }
- aNBT.setTag("Inventory", tItemList);
-
- try {
- mMetaTileEntity.saveNBTData(aNBT);
- } catch(Throwable e) {
- GT_Log.err.println("Encountered CRITICAL ERROR while saving MetaTileEntity, the Chunk whould've been corrupted by now, but I prevented that. Please report immidietly to GregTech Intergalactical!!!");
- e.printStackTrace(GT_Log.err);
- }
- }
- } catch(Throwable e) {
- GT_Log.err.println("Encountered CRITICAL ERROR while saving MetaTileEntity, the Chunk whould've been corrupted by now, but I prevented that. Please report immidietly to GregTech Intergalactical!!!");
- e.printStackTrace(GT_Log.err);
- }
- }
-
- @Override
- public void readFromNBT(NBTTagCompound aNBT) {
- super.readFromNBT(aNBT);
- setInitialValuesAsNBT(aNBT, (short)0);
- }
-
- @Override
- public void setInitialValuesAsNBT(NBTTagCompound aNBT, short aID) {
- if (aNBT == null) {
- if (aID>0) mID=aID; else mID=mID>0?mID:0;
- if (mID!=0) createNewMetatileEntity(mID);
- } else {
- if (aID<=0) mID = (short)aNBT.getInteger ("mID"); else mID = aID;
- mCoverSides = aNBT.getIntArray ("mCoverSides");
- mCoverData = aNBT.getIntArray ("mCoverData");
- mSidedRedstone = aNBT.getByteArray ("mRedstoneSided");
- mConnections = aNBT.getByte ("mConnections");
- mColor = aNBT.getByte ("mColor");
- mStrongRedstone = aNBT.getByte ("mStrongRedstone");
- mWorks =!aNBT.getBoolean ("mWorks");
-
- if (mCoverData.length != 6) mCoverData = new int[] { 0, 0, 0, 0, 0, 0};
- if (mCoverSides.length != 6) mCoverSides = new int[] { 0, 0, 0, 0, 0, 0};
- if (mSidedRedstone.length != 6) mSidedRedstone = new byte[] { 0, 0, 0, 0, 0, 0};
-
- for (byte i = 0; i < 6; i++) mCoverBehaviors[i] = GregTech_API.getCoverBehavior(mCoverSides[i]);
-
- if (mID!=0 && createNewMetatileEntity(mID)) {
- NBTTagList tItemList = aNBT.getTagList("Inventory", 10);
- for (int i = 0; i < tItemList.tagCount(); i++) {
- NBTTagCompound tTag = tItemList.getCompoundTagAt(i);
- int tSlot = tTag.getInteger("IntSlot");
- if (tSlot >= 0 && tSlot < mMetaTileEntity.getRealInventory().length) {
- mMetaTileEntity.getRealInventory()[tSlot] = GT_Utility.loadItem(tTag);
- }
- }
-
- try {
- mMetaTileEntity.loadNBTData(aNBT);
- } catch(Throwable e) {
- GT_Log.err.println("Encountered Exception while loading MetaTileEntity, the Server should've crashed now, but I prevented that. Please report immidietly to GregTech Intergalactical!!!");
- e.printStackTrace(GT_Log.err);
- }
- }
- }
-
- if (mCoverData.length != 6) mCoverData = new int[] { 0, 0, 0, 0, 0, 0};
- if (mCoverSides.length != 6) mCoverSides = new int[] { 0, 0, 0, 0, 0, 0};
- if (mSidedRedstone.length != 6) mSidedRedstone = new byte[] { 0, 0, 0, 0, 0, 0};
-
- for (byte i = 0; i < 6; i++) mCoverBehaviors[i] = GregTech_API.getCoverBehavior(mCoverSides[i]);
- }
-
- private boolean createNewMetatileEntity(short aID) {
- if (aID <= 0 || aID >= GregTech_API.METATILEENTITIES.length || GregTech_API.METATILEENTITIES[aID] == null) {
- GT_Log.err.println("MetaID " + aID + " not loadable => locking TileEntity!");
- } else {
- if (aID != 0) {
- if (hasValidMetaTileEntity()) mMetaTileEntity.setBaseMetaTileEntity(null);
- GregTech_API.METATILEENTITIES[aID].newMetaEntity(this).setBaseMetaTileEntity(this);
- mTickTimer = 0;
- mID = aID;
- return true;
- }
- }
- return false;
- }
-
- @Override
- public void updateEntity() {
- super.updateEntity();
-
- if (!hasValidMetaTileEntity()) {
- if (mMetaTileEntity == null) return;
- mMetaTileEntity.setBaseMetaTileEntity(this);
- }
-
- long tTime = System.currentTimeMillis();
-
- for (int tCode = 0; hasValidMetaTileEntity() && tCode >= 0;) {try {switch (tCode) {
- case 0:
- tCode++;
- if (mTickTimer++==0) {
- oX = xCoord;
- oY = yCoord;
- oZ = zCoord;
- if (isServerSide()) for (byte i = 0; i < 6; i++) if (getCoverIDAtSide(i)!=0) if (!mMetaTileEntity.allowCoverOnSide(i, new GT_ItemStack(getCoverIDAtSide(i)))) dropCover(i, i, true);
- worldObj.markTileEntityChunkModified(xCoord, yCoord, zCoord, this);
- mMetaTileEntity.onFirstTick(this);
- if (!hasValidMetaTileEntity()) return;
- }
- case 1:
- tCode++;
- if (isClientSide()) {
- if (mColor != oColor) {
- mMetaTileEntity.onColorChangeClient(oColor = mColor);
- issueTextureUpdate();
- }
-
- if (mNeedsUpdate) {
- worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
- //worldObj.func_147479_m(xCoord, yCoord, zCoord);
- mNeedsUpdate = false;
- }
- }
- case 2: case 3: case 4: case 5: case 6: case 7:
- if (isServerSide() && mTickTimer > 10) {
- for (byte i = (byte)(tCode-2); i < 6; i++) if (getCoverIDAtSide(i) != 0) {
- tCode++;
- GT_CoverBehavior tCover = getCoverBehaviorAtSide(i);
- int tCoverTickRate = tCover.getTickRate(i, getCoverIDAtSide(i), mCoverData[i], this);
- if (tCoverTickRate > 0 && mTickTimer % tCoverTickRate == 0) {
- mCoverData[i] = tCover.doCoverThings(i, getInputRedstoneSignal(i), getCoverIDAtSide(i), mCoverData[i], this, mTickTimer);
- if (!hasValidMetaTileEntity()) return;
- }
- }
- mConnections = (byte)(mMetaTileEntity.mConnections | (mConnections & ~63));
- if ((mConnections & -64) == 64 && getRandomNumber(1000) == 0) {
- mConnections = (byte)((mConnections & ~64) | -128);
- }
- }
- case 8:
- tCode=9;
- mMetaTileEntity.onPreTick(this, mTickTimer);
- if (!hasValidMetaTileEntity()) return;
- case 9:
- tCode++;
- if (isServerSide()) {
- if (mTickTimer == 10) {
- for (byte i = 0; i < 6; i++) mCoverBehaviors[i] = GregTech_API.getCoverBehavior(mCoverSides[i]);
- issueBlockUpdate();
- }
-
- if (xCoord != oX || yCoord != oY || zCoord != oZ) {
- oX = xCoord;
- oY = yCoord;
- oZ = zCoord;
- issueClientUpdate();
- clearTileEntityBuffer();
- }
- }
- case 10:
- tCode++;
- mMetaTileEntity.onPostTick(this, mTickTimer);
- if (!hasValidMetaTileEntity()) return;
- case 11:
- tCode++;
- if (isServerSide()) {
- if (mTickTimer % 10 == 0) {
- if (mSendClientData) {
- NW.sendPacketToAllPlayersInRange(worldObj, new GT_Packet_TileEntity(xCoord, (short)yCoord, zCoord, mID, mCoverSides[0], mCoverSides[1], mCoverSides[2], mCoverSides[3], mCoverSides[4], mCoverSides[5], oTextureData = mConnections, oUpdateData = hasValidMetaTileEntity()?mMetaTileEntity.getUpdateData():0, oRedstoneData = (byte)(((mSidedRedstone[0]>0)?1:0)|((mSidedRedstone[1]>0)?2:0)|((mSidedRedstone[2]>0)?4:0)|((mSidedRedstone[3]>0)?8:0)|((mSidedRedstone[4]>0)?16:0)|((mSidedRedstone[5]>0)?32:0)), oColor = mColor), xCoord, zCoord);
- mSendClientData = false;
- }
- }
-
- if (mTickTimer > 10) {
- if (mConnections != oTextureData) sendBlockEvent((byte)0, oTextureData = mConnections);
- byte tData = mMetaTileEntity.getUpdateData();
- if (tData != oUpdateData) sendBlockEvent((byte)1, oUpdateData = tData);
- if (mColor != oColor) sendBlockEvent((byte)2, oColor = mColor);
- tData = (byte)(((mSidedRedstone[0]>0)?1:0)|((mSidedRedstone[1]>0)?2:0)|((mSidedRedstone[2]>0)?4:0)|((mSidedRedstone[3]>0)?8:0)|((mSidedRedstone[4]>0)?16:0)|((mSidedRedstone[5]>0)?32:0));
- if (tData != oRedstoneData) sendBlockEvent((byte)3, oRedstoneData = tData);
- }
-
- if (mNeedsBlockUpdate) {
- worldObj.notifyBlocksOfNeighborChange(xCoord, yCoord, zCoord, getBlockOffset(0, 0, 0));
- mNeedsBlockUpdate = false;
- }
- }
- default:
- tCode = -1;
- break;
- }} catch (Throwable e) {
- GT_Log.err.println("Encountered Exception while ticking MetaTileEntity in Step "+(tCode-1)+". The Game should've crashed now, but I prevented that. Please report immidietly to GregTech Intergalactical!!!");
- e.printStackTrace(GT_Log.err);
- }}
-
- if (isServerSide() && hasValidMetaTileEntity()) {
- tTime = System.currentTimeMillis() - tTime;
- if (mTimeStatistics.length > 0) mTimeStatistics[mTimeStatisticsIndex = (mTimeStatisticsIndex + 1) % mTimeStatistics.length] = (int)tTime;
- if (tTime > 0 && tTime > GregTech_API.MILLISECOND_THRESHOLD_UNTIL_LAG_WARNING && mTickTimer > 1000 && getMetaTileEntity().doTickProfilingMessageDuringThisTick() && mLagWarningCount++<10) System.out.println("WARNING: Possible Lag Source at [" + xCoord + ", " + yCoord + ", " + zCoord + "] in Dimension " + worldObj.provider.dimensionId + " with " + tTime + "ms caused by an instance of " + getMetaTileEntity().getClass());
- }
-
- mWorkUpdate = mInventoryChanged = false;
- }
-
- @Override
- public Packet getDescriptionPacket() {
- issueClientUpdate();
- return null;
- }
-
- public final void receiveMetaTileEntityData(short aID, int aCover0, int aCover1, int aCover2, int aCover3, int aCover4, int aCover5, byte aTextureData, byte aUpdateData, byte aRedstoneData, byte aColorData) {
- issueTextureUpdate();
- if (mID != aID && aID > 0) {
- mID = aID;
- createNewMetatileEntity(mID);
- }
-
- mCoverSides[0] = aCover0;
- mCoverSides[1] = aCover1;
- mCoverSides[2] = aCover2;
- mCoverSides[3] = aCover3;
- mCoverSides[4] = aCover4;
- mCoverSides[5] = aCover5;
-
- for (byte i = 0; i < 6; i++) mCoverBehaviors[i] = GregTech_API.getCoverBehavior(mCoverSides[i]);
-
- receiveClientEvent(0, aTextureData);
- receiveClientEvent(1, aUpdateData);
- receiveClientEvent(2, aColorData);
- receiveClientEvent(3, aRedstoneData);
- }
-
- @Override
- public boolean receiveClientEvent(int aEventID, int aValue) {
- super.receiveClientEvent(aEventID, aValue);
-
- if (hasValidMetaTileEntity()) {
- try {
- mMetaTileEntity.receiveClientEvent((byte)aEventID, (byte)aValue);
- } catch(Throwable e) {
- GT_Log.err.println("Encountered Exception while receiving Data from the Server, the Client should've been crashed by now, but I prevented that. Please report immidietly to GregTech Intergalactical!!!");
- e.printStackTrace(GT_Log.err);
- }
- }
-
- if (isClientSide()) {
- issueTextureUpdate();
- switch(aEventID) {
- case 0:
- mConnections = (byte)aValue;
- break;
- case 1:
- if (hasValidMetaTileEntity()) mMetaTileEntity.onValueUpdate((byte)aValue);
- break;
- case 2:
- if (aValue > 16 || aValue < 0) aValue = 0;
- mColor = (byte)aValue;
- break;
- case 3:
- mSidedRedstone[0] = (byte)((aValue& 1)>0?15:0);
- mSidedRedstone[1] = (byte)((aValue& 2)>0?15:0);
- mSidedRedstone[2] = (byte)((aValue& 4)>0?15:0);
- mSidedRedstone[3] = (byte)((aValue& 8)>0?15:0);
- mSidedRedstone[4] = (byte)((aValue&16)>0?15:0);
- mSidedRedstone[5] = (byte)((aValue&32)>0?15:0);
- break;
- case 4:
- if (hasValidMetaTileEntity() && mTickTimer > 20) mMetaTileEntity.doSound((byte)aValue, xCoord+0.5, yCoord+0.5, zCoord+0.5);
- break;
- case 5:
- if (hasValidMetaTileEntity() && mTickTimer > 20) mMetaTileEntity.startSoundLoop((byte)aValue, xCoord+0.5, yCoord+0.5, zCoord+0.5);
- break;
- case 6:
- if (hasValidMetaTileEntity() && mTickTimer > 20) mMetaTileEntity.stopSoundLoop((byte)aValue, xCoord+0.5, yCoord+0.5, zCoord+0.5);
- break;
- }
- }
- return true;
- }
-
- public ArrayList<String> getDebugInfo(EntityPlayer aPlayer, int aLogLevel) {
- ArrayList<String> tList = new ArrayList<String>();
- if (aLogLevel > 2) {
- tList.add("Meta-ID: " + mID + (hasValidMetaTileEntity()?" valid":" invalid") + (mMetaTileEntity==null?" MetaTileEntity == null!":" "));
- }
- if (aLogLevel > 1) {
- if (mTimeStatistics.length > 0) {
- double tAverageTime = 0; for (int tTime : mTimeStatistics) tAverageTime += tTime;
- tList.add("This particular TileEntity has caused an average CPU-load of ~" + (tAverageTime/mTimeStatistics.length) + "ms over the last " + mTimeStatistics.length + " ticks.");
- }
- if (mLagWarningCount > 0) {
- tList.add("This TileEntity has also caused " + (mLagWarningCount>=10?"more than 10":mLagWarningCount) + " Lag Spike Warnings (anything taking longer than " + GregTech_API.MILLISECOND_THRESHOLD_UNTIL_LAG_WARNING + "ms) on the Server.");
- }
- tList.add("Is" + (mMetaTileEntity.isAccessAllowed(aPlayer)?" ":" not ") + "accessible for you");
- }
- return mMetaTileEntity.getSpecialDebugInfo(this, aPlayer, aLogLevel, tList);
- }
-
- @Override public void issueTextureUpdate() {mNeedsUpdate = true;}
- @Override public void issueBlockUpdate() {mNeedsBlockUpdate = true;}
- @Override public void issueClientUpdate() {mSendClientData = true;}
- @Override public void issueCoverUpdate(byte aSide) {issueClientUpdate();}
-
- @Override public byte getStrongestRedstone() {return (byte)Math.max(getInternalInputRedstoneSignal((byte)0), Math.max(getInternalInputRedstoneSignal((byte)1), Math.max(getInternalInputRedstoneSignal((byte)2), Math.max(getInternalInputRedstoneSignal((byte)3), Math.max(getInternalInputRedstoneSignal((byte)4), getInternalInputRedstoneSignal((byte)5))))));}
-
- @Override public boolean getRedstone() {return getRedstone((byte)0)||getRedstone((byte)1)||getRedstone((byte)2)||getRedstone((byte)3)||getRedstone((byte)4)||getRedstone((byte)5);}
- @Override public boolean getRedstone(byte aSide) {return getInternalInputRedstoneSignal(aSide) > 0;}
-
- public ITexture getCoverTexture(byte aSide) {return GregTech_API.sCovers.get(new GT_ItemStack(getCoverIDAtSide(aSide)));}
-
- @Override public boolean isGivingInformation() {if (canAccessData()) return mMetaTileEntity.isGivingInformation(); return false;}
- @Override public boolean isValidFacing(byte aSide) {if (canAccessData()) return mMetaTileEntity.isFacingValid(aSide); return false;}
- @Override public byte getBackFacing() {return GT_Utility.getOppositeSide(getFrontFacing());}
- @Override public byte getFrontFacing() {return 6;}
- @Override public void setFrontFacing(byte aFacing) {/*Do nothing*/}
- @Override public int getSizeInventory() {if (canAccessData()) return mMetaTileEntity.getSizeInventory(); return 0;}
- @Override public ItemStack getStackInSlot(int aIndex) {if (canAccessData()) return mMetaTileEntity.getStackInSlot(aIndex); return null;}
- @Override public void setInventorySlotContents(int aIndex, ItemStack aStack) {mInventoryChanged = true; if (canAccessData()) mMetaTileEntity.setInventorySlotContents(aIndex, worldObj.isRemote?aStack:GT_OreDictUnificator.setStack(true, aStack));}
- @Override public String getInventoryName() {if (canAccessData()) return mMetaTileEntity.getInventoryName(); if (GregTech_API.METATILEENTITIES[mID] != null) return GregTech_API.METATILEENTITIES[mID].getInventoryName(); return "";}
- @Override public int getInventoryStackLimit() {if (canAccessData()) return mMetaTileEntity.getInventoryStackLimit(); return 64;}
- @Override public void openInventory() {/*Do nothing*/}
- @Override public void closeInventory() {/*Do nothing*/}
- @Override public boolean isUseableByPlayer(EntityPlayer aPlayer) {return hasValidMetaTileEntity() && mTickTimer>40 && getTileEntityOffset(0, 0, 0) == this && aPlayer.getDistanceSq(xCoord + 0.5, yCoord + 0.5, zCoord + 0.5) < 64 && mMetaTileEntity.isAccessAllowed(aPlayer);}
- @Override public void validate() {super.validate(); mTickTimer = 0;}
- @Override public void invalidate() {tileEntityInvalid = false; if (hasValidMetaTileEntity()) {mMetaTileEntity.onRemoval(); mMetaTileEntity.setBaseMetaTileEntity(null);} super.invalidate();}
- @Override public void onChunkUnload() {super.onChunkUnload();}
- @Override public boolean hasCustomInventoryName() {return false;}
- @Override public ItemStack getStackInSlotOnClosing(int slot) {ItemStack stack = getStackInSlot(slot); if (stack != null) setInventorySlotContents(slot, null); return stack;}
- @Override public void onMachineBlockUpdate() {if (canAccessData()) mMetaTileEntity.onMachineBlockUpdate();}
- @Override public int getProgress() {return canAccessData()?mMetaTileEntity.getProgresstime():0;}
- @Override public int getMaxProgress() {return canAccessData()?mMetaTileEntity.maxProgresstime():0;}
- @Override public boolean increaseProgress(int aProgressAmountInTicks) {return canAccessData()?mMetaTileEntity.increaseProgress(aProgressAmountInTicks)!=aProgressAmountInTicks:false;}
- @Override public boolean hasThingsToDo() {return getMaxProgress()>0;}
- @Override public void enableWorking() {if (!mWorks) mWorkUpdate = true; mWorks = true;}
- @Override public void disableWorking() {mWorks = false;}
- @Override public boolean isAllowedToWork() {return mWorks;}
- @Override public boolean hasWorkJustBeenEnabled() {return mWorkUpdate;}
- @Override public void setWorkDataValue(byte aValue) {/*Do nothing*/}
- @Override public byte getWorkDataValue() {return 0;}
- @Override public int getMetaTileID() {return mID;}
- @Override public int setMetaTileID(short aID) {return mID = aID;}
- @Override public boolean isActive() {return false;}
- @Override public void setActive(boolean aActive) {/*Do nothing*/}
- @Override public long getTimer() {return mTickTimer;}
- @Override public boolean decreaseStoredEnergyUnits(long aEnergy, boolean aIgnoreTooLessEnergy) {return false;}
- @Override public boolean increaseStoredEnergyUnits(long aEnergy, boolean aIgnoreTooMuchEnergy) {return false;}
- @Override public boolean inputEnergyFrom(byte aSide) {return false;}
- @Override public boolean outputsEnergyTo(byte aSide) {return false;}
- @Override public long getOutputAmperage() {return 0;}
- @Override public long getOutputVoltage() {return 0;}
- @Override public long getInputAmperage() {return 0;}
- @Override public long getInputVoltage() {return 0;}
- @Override public boolean increaseStoredSteam(long aEnergy, boolean aIgnoreTooMuchEnergy) {return false;}
- @Override public String[] getDescription() {if (canAccessData()) return mMetaTileEntity.getDescription(); return new String[0];}
- @Override public boolean isValidSlot(int aIndex) {if (canAccessData()) return mMetaTileEntity.isValidSlot(aIndex); return false;}
- @Override public long getUniversalEnergyStored() {return Math.max(getStoredEU(), getStoredSteam());}
- @Override public long getUniversalEnergyCapacity() {return Math.max(getEUCapacity(), getSteamCapacity());}
- @Override public long getStoredEU() {return 0;}
- @Override public long getEUCapacity() {return 0;}
- @Override public long getStoredSteam() {return 0;}
- @Override public long getSteamCapacity() {return 0;}
- @Override public ITexture[] getTexture(byte aSide) {ITexture rIcon = getCoverTexture(aSide); if (rIcon != null) return new ITexture[] {rIcon}; return getTextureUncovered(aSide);}
- @Override public ITexture[] getTextureUncovered(byte aSide) {if ((mConnections & 64) != 0) return Textures.BlockIcons.FRESHFOAM; if ((mConnections & -128) != 0) return Textures.BlockIcons.HARDENEDFOAMS[mColor]; if ((mConnections & -64) != 0) return Textures.BlockIcons.ERROR_RENDERING; byte tConnections = mConnections; if (tConnections == 1 || tConnections == 2) tConnections = 3; else if (tConnections == 4 || tConnections == 8) tConnections = 12; else if (tConnections == 16 || tConnections == 32) tConnections = 48; if (hasValidMetaTileEntity()) return mMetaTileEntity.getTexture(this, aSide, tConnections, (byte)(mColor-1), tConnections == 0 || (tConnections & (1<<aSide)) != 0, getOutputRedstoneSignal(aSide)>0); return Textures.BlockIcons.ERROR_RENDERING;}
-
- protected boolean hasValidMetaTileEntity() {return mMetaTileEntity != null && mMetaTileEntity.getBaseMetaTileEntity() == this;}
- protected boolean canAccessData() {return !isDead && hasValidMetaTileEntity();}
-
- @Override
- public void doExplosion(long aAmount) {
- if (canAccessData()) {
- mMetaTileEntity.onExplosion();
- mMetaTileEntity.doExplosion(aAmount);
- }
- }
-
- @Override
- public ArrayList<ItemStack> getDrops() {
- ItemStack rStack = new ItemStack(GregTech_API.sBlockMachines, 1, mID);
- NBTTagCompound tNBT = new NBTTagCompound();
- if (mStrongRedstone > 0) tNBT.setByte ("mStrongRedstone" , mStrongRedstone);
- for (byte i = 0; i < mCoverSides.length; i++) {
- if (mCoverSides[i] != 0) {
- tNBT.setIntArray("mCoverData" , mCoverData);
- tNBT.setIntArray("mCoverSides" , mCoverSides);
- break;
- }
- }
- if (hasValidMetaTileEntity()) mMetaTileEntity.setItemNBT(tNBT);
- if (!tNBT.hasNoTags()) rStack.setTagCompound(tNBT);
- return new ArrayList<ItemStack>(Arrays.asList(rStack));
- }
-
- @Override
- public boolean onRightclick(EntityPlayer aPlayer, byte aSide, float aX, float aY, float aZ) {
- if (isClientSide()) {
- if (getCoverBehaviorAtSide(aSide).onCoverRightclickClient(aSide, this, aPlayer, aX, aY, aZ)) return true;
- }
- if (isServerSide()) {
- ItemStack tCurrentItem = aPlayer.inventory.getCurrentItem();
- if (tCurrentItem != null) {
- if (getColorization() >= 0 && GT_Utility.areStacksEqual(new ItemStack(Items.water_bucket, 1), tCurrentItem)) {
- tCurrentItem.func_150996_a(Items.bucket);
- setColorization((byte)-1);
- return true;
- }
- byte tSide = GT_Utility.determineWrenchingSide(aSide, aX, aY, aZ);
- if (GT_Utility.isStackInList(tCurrentItem, GregTech_API.sWrenchList)) {
- if (mMetaTileEntity.onWrenchRightClick(aSide, tSide, aPlayer, aX, aY, aZ)) {
- GT_ModHandler.damageOrDechargeItem(tCurrentItem, 1, 1000, aPlayer);
- GT_Utility.sendSoundToPlayers(worldObj, GregTech_API.sSoundList.get(100), 1.0F, -1, xCoord, yCoord, zCoord);
- }
- return true;
- }
- if (GT_Utility.isStackInList(tCurrentItem, GregTech_API.sScrewdriverList)) {
- if (getCoverIDAtSide(aSide) == 0 && getCoverIDAtSide(tSide) != 0) {
- if (GT_ModHandler.damageOrDechargeItem(tCurrentItem, 1, 200, aPlayer)) {
- setCoverDataAtSide(tSide, getCoverBehaviorAtSide(tSide).onCoverScrewdriverclick(tSide, getCoverIDAtSide(tSide), getCoverDataAtSide(tSide), this, aPlayer, 0.5F, 0.5F, 0.5F));
- mMetaTileEntity.onScrewdriverRightClick(tSide, aPlayer, aX, aY, aZ);
- GT_Utility.sendSoundToPlayers(worldObj, GregTech_API.sSoundList.get(100), 1.0F, -1, xCoord, yCoord, zCoord);
- }
- } else {
- if (GT_ModHandler.damageOrDechargeItem(tCurrentItem, 1, 1000, aPlayer)) {
- setCoverDataAtSide(aSide, getCoverBehaviorAtSide(aSide).onCoverScrewdriverclick(aSide, getCoverIDAtSide(aSide), getCoverDataAtSide(aSide), this, aPlayer, aX, aY, aZ));
- mMetaTileEntity.onScrewdriverRightClick(aSide, aPlayer, aX, aY, aZ);
- GT_Utility.sendSoundToPlayers(worldObj, GregTech_API.sSoundList.get(100), 1.0F, -1, xCoord, yCoord, zCoord);
- }
- }
- return true;
- }
-
- if (GT_Utility.isStackInList(tCurrentItem, GregTech_API.sHardHammerList)) {
- //if (GT_ModHandler.damageOrDechargeItem(tCurrentItem, 1, 1000, aPlayer)) {
- // GT_Utility.sendSoundToPlayers(worldObj, GregTech_API.sSoundList.get(1), 1.0F, -1, xCoord, yCoord, zCoord);
- //}
- return true;
- }
-
- if (GT_Utility.isStackInList(tCurrentItem, GregTech_API.sSoftHammerList)) {
- if (GT_ModHandler.damageOrDechargeItem(tCurrentItem, 1, 1000, aPlayer)) {
- if (mWorks) disableWorking(); else enableWorking();
- GT_Utility.sendChatToPlayer(aPlayer, "Machine Processing: " + (isAllowedToWork()?"Enabled":"Disabled"));
- GT_Utility.sendSoundToPlayers(worldObj, GregTech_API.sSoundList.get(101), 1.0F, -1, xCoord, yCoord, zCoord);
- }
- return true;
- }
-
- if (GT_Utility.isStackInList(tCurrentItem, GregTech_API.sSolderingToolList)) {
- if (GT_ModHandler.useSolderingIron(tCurrentItem, aPlayer)) {
- mStrongRedstone ^= (1 << tSide);
- GT_Utility.sendChatToPlayer(aPlayer, "Redstone Output at Side " + tSide + " set to: " + ((mStrongRedstone & (1 << tSide))!=0?"Strong":"Weak"));
- GT_Utility.sendSoundToPlayers(worldObj, GregTech_API.sSoundList.get(103), 3.0F, -1, xCoord, yCoord, zCoord);
- }
- return true;
- }
-
- byte cSide = tSide;
- if (getCoverIDAtSide(aSide) != 0) cSide = aSide;
-
- if (getCoverIDAtSide(cSide) == 0) {
- if (GregTech_API.sCovers.containsKey(new GT_ItemStack(tCurrentItem))) {
- if (GregTech_API.getCoverBehavior(tCurrentItem).isCoverPlaceable(cSide, new GT_ItemStack(tCurrentItem), this) && mMetaTileEntity.allowCoverOnSide(cSide, new GT_ItemStack(tCurrentItem))) {
- setCoverItemAtSide(cSide, tCurrentItem);
- if (!aPlayer.capabilities.isCreativeMode) tCurrentItem.stackSize--;
- GT_Utility.sendSoundToPlayers(worldObj, GregTech_API.sSoundList.get(100), 1.0F, -1, xCoord, yCoord, zCoord);
- }
- return true;
- }
- } else {
- if (GT_Utility.isStackInList(tCurrentItem, GregTech_API.sCrowbarList)) {
- if (GT_ModHandler.damageOrDechargeItem(tCurrentItem, 1, 1000, aPlayer)) {
- GT_Utility.sendSoundToPlayers(worldObj, GregTech_API.sSoundList.get(0), 1.0F, -1, xCoord, yCoord, zCoord);
- dropCover(cSide, aSide, false);
- }
- return true;
- }
- }
- }
-
- if (getCoverBehaviorAtSide(aSide).onCoverRightclick(aSide, getCoverIDAtSide(aSide), getCoverDataAtSide(aSide), this, aPlayer, aX, aY, aZ)) return true;
- }
-
- if (!getCoverBehaviorAtSide(aSide).isGUIClickable(aSide, getCoverIDAtSide(aSide), getCoverDataAtSide(aSide), this)) return false;
-
- try {
- if (hasValidMetaTileEntity()) return mMetaTileEntity.onRightclick(this, aPlayer, aSide, aX, aY, aZ);
- } catch(Throwable e) {
- GT_Log.err.println("Encountered Exception while rightclicking TileEntity, the Game should've crashed now, but I prevented that. Please report immidietly to GregTech Intergalactical!!!");
- e.printStackTrace(GT_Log.err);
- }
-
- return false;
- }
-
- @Override
- public void onLeftclick(EntityPlayer aPlayer) {
- try {
- if (aPlayer != null && hasValidMetaTileEntity()) mMetaTileEntity.onLeftclick(this, aPlayer);
- } catch(Throwable e) {
- GT_Log.err.println("Encountered Exception while leftclicking TileEntity, the Game should've crashed now, but I prevented that. Please report immidietly to GregTech Intergalactical!!!");
- e.printStackTrace(GT_Log.err);
- }
- }
-
- @Override
- public boolean isDigitalChest() {
- return false;
- }
-
- @Override
- public ItemStack[] getStoredItemData() {
- return null;
- }
-
- @Override
- public void setItemCount(int aCount) {
- //
- }
-
- @Override
- public int getMaxItemCount() {
- return 0;
- }
-
- /**
- * Can put aStack into Slot
- */
- @Override
- public boolean isItemValidForSlot(int aIndex, ItemStack aStack) {
- return canAccessData() && mMetaTileEntity.isItemValidForSlot(aIndex, aStack);
- }
-
- /**
- * returns all valid Inventory Slots, no matter which Side (Unless it's covered).
- * The Side Stuff is done in the following two Functions.
- */
- @Override
- public int[] getAccessibleSlotsFromSide(int aSide) {
- if (canAccessData() && (getCoverBehaviorAtSide((byte)aSide).letsItemsOut((byte)aSide, getCoverIDAtSide((byte)aSide), getCoverDataAtSide((byte)aSide), -1, this) || getCoverBehaviorAtSide((byte)aSide).letsItemsIn((byte)aSide, getCoverIDAtSide((byte)aSide), getCoverDataAtSide((byte)aSide), -1, this))) return mMetaTileEntity.getAccessibleSlotsFromSide(aSide);
- return new int[0];
- }
-
- /**
- * Can put aStack into Slot at Side
- */
- @Override
- public boolean canInsertItem(int aIndex, ItemStack aStack, int aSide) {
- return canAccessData() && getCoverBehaviorAtSide((byte)aSide).letsItemsIn ((byte)aSide, getCoverIDAtSide((byte)aSide), getCoverDataAtSide((byte)aSide), aIndex, this) && mMetaTileEntity.canInsertItem(aIndex, aStack, aSide);
- }
-
- /**
- * Can pull aStack out of Slot from Side
- */
- @Override
- public boolean canExtractItem(int aIndex, ItemStack aStack, int aSide) {
- return canAccessData() && getCoverBehaviorAtSide((byte)aSide).letsItemsOut((byte)aSide, getCoverIDAtSide((byte)aSide), getCoverDataAtSide((byte)aSide), aIndex, this) && mMetaTileEntity.canExtractItem(aIndex, aStack, aSide);
- }
-
- @Override
- public boolean isUpgradable() {
- return false;
- }
-
- @Override
- public byte getInternalInputRedstoneSignal(byte aSide) {
- return (byte)(getCoverBehaviorAtSide(aSide).getRedstoneInput(aSide, getInputRedstoneSignal(aSide), getCoverIDAtSide(aSide), getCoverDataAtSide(aSide), this)&15);
- }
-
- @Override
- public byte getInputRedstoneSignal(byte aSide) {
- return (byte)(worldObj.getIndirectPowerLevelTo(getOffsetX(aSide, 1), getOffsetY(aSide, 1), getOffsetZ(aSide, 1), aSide)&15);
- }
-
- @Override
- public byte getOutputRedstoneSignal(byte aSide) {
- return (byte)(getCoverBehaviorAtSide(aSide).manipulatesSidedRedstoneOutput(aSide, getCoverIDAtSide(aSide), getCoverDataAtSide(aSide), this) || (getCoverBehaviorAtSide(aSide).letsRedstoneGoOut(aSide, getCoverIDAtSide(aSide), getCoverDataAtSide(aSide), this))?mSidedRedstone[aSide]&15:0);
- }
-
- @Override
- public void setInternalOutputRedstoneSignal(byte aSide, byte aStrength) {
- if (!getCoverBehaviorAtSide(aSide).manipulatesSidedRedstoneOutput(aSide, getCoverIDAtSide(aSide), getCoverDataAtSide(aSide), this)) setOutputRedstoneSignal(aSide, aStrength);
- }
-
- @Override
- public void setOutputRedstoneSignal(byte aSide, byte aStrength) {
- aStrength = (byte)Math.min(Math.max(0, aStrength), 15);
- if (aSide >= 0 && aSide < 6 && mSidedRedstone[aSide] != aStrength) {
- mSidedRedstone[aSide] = aStrength;
- issueBlockUpdate();
- }
- }
-
- @Override
- public boolean isSteamEngineUpgradable() {
- return isUpgradable()&&!hasSteamEngineUpgrade()&&getSteamCapacity()>0;
- }
-
- @Override
- public boolean addSteamEngineUpgrade() {
- if (isSteamEngineUpgradable()) {
- issueBlockUpdate();
- return true;
- }
- return false;
- }
-
- @Override
- public boolean hasSteamEngineUpgrade() {
- return false;
- }
-
- @Override
- public boolean hasInventoryBeenModified() {
- return mInventoryChanged;
- }
-
- @Override
- public void setGenericRedstoneOutput(boolean aOnOff) {
- //
- }
-
- @Override
- public int getErrorDisplayID() {
- return 0;
- }
-
- @Override
- public void setErrorDisplayID(int aErrorID) {
- //
- }
-
- @Override
- public IMetaTileEntity getMetaTileEntity() {
- return hasValidMetaTileEntity()?mMetaTileEntity:null;
- }
-
- private final GT_CoverBehavior[] mCoverBehaviors = new GT_CoverBehavior[] {GregTech_API.sNoBehavior, GregTech_API.sNoBehavior, GregTech_API.sNoBehavior, GregTech_API.sNoBehavior, GregTech_API.sNoBehavior, GregTech_API.sNoBehavior};
-
- @Override
- public GT_CoverBehavior getCoverBehaviorAtSide(byte aSide) {
- return aSide >= 0 && aSide < mCoverBehaviors.length ? mCoverBehaviors[aSide] : GregTech_API.sNoBehavior;
- }
-
- @Override
- public void setCoverIDAtSide(byte aSide, int aID) {
- if (aSide >= 0 && aSide < 6) {
- mCoverSides[aSide] = aID;
- mCoverData[aSide] = 0;
- mCoverBehaviors[aSide] = GregTech_API.getCoverBehavior(aID);
- issueCoverUpdate(aSide);
- issueBlockUpdate();
- }
- }
-
- @Override
- public void setCoverItemAtSide(byte aSide, ItemStack aCover) {
- GregTech_API.getCoverBehavior(aCover).placeCover(aSide, aCover, this);
- }
-
- @Override
- public int getCoverIDAtSide(byte aSide) {
- if (aSide >= 0 && aSide < 6) return mCoverSides[aSide]; return 0;
- }
-
- @Override
- public ItemStack getCoverItemAtSide(byte aSide) {
- return GT_Utility.intToStack(getCoverIDAtSide(aSide));
- }
-
- @Override
- public boolean canPlaceCoverIDAtSide(byte aSide, int aID) {
- return getCoverIDAtSide(aSide) == 0;
- }
-
- @Override
- public boolean canPlaceCoverItemAtSide(byte aSide, ItemStack aCover) {
- return getCoverIDAtSide(aSide) == 0;
- }
-
- @Override
- public void setCoverDataAtSide(byte aSide, int aData) {
- if (aSide >= 0 && aSide < 6) mCoverData[aSide] = aData;
- }
-
- @Override
- public int getCoverDataAtSide(byte aSide) {
- if (aSide >= 0 && aSide < 6) return mCoverData[aSide];
- return 0;
- }
-
- @Override
- public void setLightValue(byte aLightValue) {
- //
- }
-
- @Override
- public long getAverageElectricInput() {
- return 0;
- }
-
- @Override
- public long getAverageElectricOutput() {
- return 0;
- }
-
- @Override
- public boolean dropCover(byte aSide, byte aDroppedSide, boolean aForced) {
- if (getCoverBehaviorAtSide(aSide).onCoverRemoval(aSide, getCoverIDAtSide(aSide), mCoverData[aSide], this, aForced) || aForced) {
- ItemStack tStack = getCoverBehaviorAtSide(aSide).getDrop(aSide, getCoverIDAtSide(aSide), getCoverDataAtSide(aSide), this);
- if (tStack != null) {
- tStack.setTagCompound(null);
- EntityItem tEntity = new EntityItem(worldObj, getOffsetX(aDroppedSide, 1) + 0.5, getOffsetY(aDroppedSide, 1) + 0.5, getOffsetZ(aDroppedSide, 1) + 0.5, tStack);
- tEntity.motionX = 0;
- tEntity.motionY = 0;
- tEntity.motionZ = 0;
- worldObj.spawnEntityInWorld(tEntity);
- }
-
- setCoverIDAtSide(aSide, 0);
- setOutputRedstoneSignal(aSide, (byte) 0);
- return true;
- }
- return false;
- }
-
- @Override
- public String getOwnerName() {
- return "Player";
- }
-
- @Override
- public String setOwnerName(String aName) {
- return "Player";
- }
-
- @Override
- public byte getComparatorValue(byte aSide) {
- return canAccessData()?mMetaTileEntity.getComparatorValue(aSide):0;
- }
-
- @Override
- public byte getStrongOutputRedstoneSignal(byte aSide) {
- return aSide>=0&&aSide<6&&(mStrongRedstone & (1 << aSide))!=0?(byte)(mSidedRedstone[aSide]&15):0;
- }
-
- @Override
- public void setStrongOutputRedstoneSignal(byte aSide, byte aStrength) {
- mStrongRedstone |= (1 << aSide);
- setOutputRedstoneSignal(aSide, aStrength);
- }
-
- @Override
- public ItemStack decrStackSize(int aIndex, int aAmount) {
- if (canAccessData()) {
- mInventoryChanged = true;
- return mMetaTileEntity.decrStackSize(aIndex, aAmount);
- }
- return null;
- }
-
- @Override
- public long injectEnergyUnits(byte aSide, long aVoltage, long aAmperage) {
- if (canAccessData()) return mMetaTileEntity.injectEnergyUnits(aSide, aVoltage, aAmperage);
- return 0;
- }
-
- @Override
- public boolean drainEnergyUnits(byte aSide, long aVoltage, long aAmperage) {
- return false;
- }
-
- @Override
- public boolean acceptsRotationalEnergy(byte aSide) {
- if (!canAccessData() || getCoverIDAtSide(aSide) != 0) return false;
- return mMetaTileEntity.acceptsRotationalEnergy(aSide);
- }
-
- @Override
- public boolean injectRotationalEnergy(byte aSide, long aSpeed, long aEnergy) {
- if (!canAccessData() || getCoverIDAtSide(aSide) != 0) return false;
- return mMetaTileEntity.injectRotationalEnergy(aSide, aSpeed, aEnergy);
- }
-
- @Override
- public int fill(ForgeDirection aSide, FluidStack aFluid, boolean doFill) {
- if (mTickTimer > 5 && canAccessData() && (aSide == ForgeDirection.UNKNOWN || (mMetaTileEntity.isLiquidInput ((byte)aSide.ordinal()) && getCoverBehaviorAtSide((byte)aSide.ordinal()).letsFluidIn ((byte)aSide.ordinal(), getCoverIDAtSide((byte)aSide.ordinal()), getCoverDataAtSide((byte)aSide.ordinal()), aFluid==null?null:aFluid.getFluid(), this)))) return mMetaTileEntity.fill(aSide, aFluid, doFill);
- return 0;
- }
-
- @Override
- public FluidStack drain(ForgeDirection aSide, int maxDrain, boolean doDrain) {
- if (mTickTimer > 5 && canAccessData() && (aSide == ForgeDirection.UNKNOWN || (mMetaTileEntity.isLiquidOutput((byte)aSide.ordinal()) && getCoverBehaviorAtSide((byte)aSide.ordinal()).letsFluidOut((byte)aSide.ordinal(), getCoverIDAtSide((byte)aSide.ordinal()), getCoverDataAtSide((byte)aSide.ordinal()), mMetaTileEntity.getFluid()==null?null:mMetaTileEntity.getFluid().getFluid(), this)))) return mMetaTileEntity.drain(aSide, maxDrain, doDrain);
- return null;
- }
-
- @Override
- public FluidStack drain(ForgeDirection aSide, FluidStack aFluid, boolean doDrain) {
- if (mTickTimer > 5 && canAccessData() && (aSide == ForgeDirection.UNKNOWN || (mMetaTileEntity.isLiquidOutput((byte)aSide.ordinal()) && getCoverBehaviorAtSide((byte)aSide.ordinal()).letsFluidOut((byte)aSide.ordinal(), getCoverIDAtSide((byte)aSide.ordinal()), getCoverDataAtSide((byte)aSide.ordinal()), aFluid==null?null:aFluid.getFluid(), this)))) return mMetaTileEntity.drain(aSide, aFluid, doDrain);
- return null;
- }
-
- @Override
- public boolean canFill(ForgeDirection aSide, Fluid aFluid) {
- if (mTickTimer > 5 && canAccessData() && (aSide == ForgeDirection.UNKNOWN || (mMetaTileEntity.isLiquidInput ((byte)aSide.ordinal()) && getCoverBehaviorAtSide((byte)aSide.ordinal()).letsFluidIn ((byte)aSide.ordinal(), getCoverIDAtSide((byte)aSide.ordinal()), getCoverDataAtSide((byte)aSide.ordinal()), aFluid, this)))) return mMetaTileEntity.canFill(aSide, aFluid);
- return false;
- }
-
- @Override
- public boolean canDrain(ForgeDirection aSide, Fluid aFluid) {
- if (mTickTimer > 5 && canAccessData() && (aSide == ForgeDirection.UNKNOWN || (mMetaTileEntity.isLiquidOutput((byte)aSide.ordinal()) && getCoverBehaviorAtSide((byte)aSide.ordinal()).letsFluidOut((byte)aSide.ordinal(), getCoverIDAtSide((byte)aSide.ordinal()), getCoverDataAtSide((byte)aSide.ordinal()), aFluid, this)))) return mMetaTileEntity.canDrain(aSide, aFluid);
- return false;
- }
-
- @Override
- public FluidTankInfo[] getTankInfo(ForgeDirection aSide) {
- if (canAccessData() && (aSide == ForgeDirection.UNKNOWN || (mMetaTileEntity.isLiquidInput((byte)aSide.ordinal()) && getCoverBehaviorAtSide((byte)aSide.ordinal()).letsFluidIn ((byte)aSide.ordinal(), getCoverIDAtSide((byte)aSide.ordinal()), getCoverDataAtSide((byte)aSide.ordinal()), null, this)) || (mMetaTileEntity.isLiquidOutput((byte)aSide.ordinal()) && getCoverBehaviorAtSide((byte)aSide.ordinal()).letsFluidOut((byte)aSide.ordinal(), getCoverIDAtSide((byte)aSide.ordinal()), getCoverDataAtSide((byte)aSide.ordinal()), null, this)))) return mMetaTileEntity.getTankInfo(aSide);
- return new FluidTankInfo[] {};
- }
-
- @Override
- public boolean isInvalidTileEntity() {
- return isInvalid();
- }
-
- @Override
- public boolean addStackToSlot(int aIndex, ItemStack aStack) {
- if (GT_Utility.isStackInvalid(aStack)) return true;
- if (aIndex < 0 || aIndex >= getSizeInventory()) return false;
- ItemStack tStack = getStackInSlot(aIndex);
- if (GT_Utility.isStackInvalid(tStack)) {
- setInventorySlotContents(aIndex, aStack);
- return true;
- }
- aStack = GT_OreDictUnificator.get(aStack);
- if (GT_Utility.areStacksEqual(tStack, aStack) && tStack.stackSize + aStack.stackSize <= Math.min(aStack.getMaxStackSize(), getInventoryStackLimit())) {
- tStack.stackSize+=aStack.stackSize;
- return true;
- }
- return false;
- }
-
- @Override
- public boolean addStackToSlot(int aIndex, ItemStack aStack, int aAmount) {
- return addStackToSlot(aIndex, GT_Utility.copyAmount(aAmount, aStack));
- }
-
- @Override
- public void setMetaTileEntity(IMetaTileEntity aMetaTileEntity) {
- mMetaTileEntity = (MetaPipeEntity)aMetaTileEntity;
- }
-
- @Override
- public byte getColorization() {
- return (byte)(mColor-1);
- }
-
- @Override
- public byte setColorization(byte aColor) {
- if (aColor > 15 || aColor < -1) aColor = -1;
- if (canAccessData()) mMetaTileEntity.onColorChangeServer(aColor);
- return mColor = (byte)(aColor+1);
- }
-
- @Override
- public float getThickNess() {
- if (canAccessData()) return mMetaTileEntity.getThickNess();
- return 1.0F;
- }
-
- public boolean renderInside(byte aSide) {
- if (canAccessData()) return mMetaTileEntity.renderInside(aSide);
- return false;
- }
-
- @Override
- public float getBlastResistance(byte aSide) {
- return (mConnections & 192) != 0 ? 50.0F : 5.0F;
- }
-
- @Override
- public boolean isMufflerUpgradable() {
- return false;
- }
-
- @Override
- public boolean addMufflerUpgrade() {
- return false;
- }
-
- @Override
- public boolean hasMufflerUpgrade() {
- return false;
- }
-
- @Override
- public boolean isUniversalEnergyStored(long aEnergyAmount) {
- return getUniversalEnergyStored() >= aEnergyAmount;
- }
-
- @Override
- public String[] getInfoData() {
- {if (canAccessData()) return getMetaTileEntity().getInfoData(); return new String[]{};}
- }
-
- @Override
- public byte getConnections() {
- return mConnections;
- }
-
- @Override
- public void markDirty() {
- super.markDirty();
- mInventoryChanged = true;
- }
-
- @Override
- public int getLightOpacity() {
- return mMetaTileEntity == null ? 0 : mMetaTileEntity.getLightOpacity();
- }
-
- @Override
- public void addCollisionBoxesToList(World aWorld, int aX, int aY, int aZ, AxisAlignedBB inputAABB, List<AxisAlignedBB> outputAABB, Entity collider) {
- mMetaTileEntity.addCollisionBoxesToList(aWorld, aX, aY, aZ, inputAABB, outputAABB, collider);
- }
-
- @Override
- public AxisAlignedBB getCollisionBoundingBoxFromPool(World aWorld, int aX, int aY, int aZ) {
- return mMetaTileEntity.getCollisionBoundingBoxFromPool(aWorld, aX, aY, aZ);
- }
-
- @Override
- public void onEntityCollidedWithBlock(World aWorld, int aX, int aY, int aZ, Entity collider) {
- mMetaTileEntity.onEntityCollidedWithBlock(aWorld, aX, aY, aZ, collider);
- }
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java b/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java
deleted file mode 100644
index 9870ba9bec..0000000000
--- a/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java
+++ /dev/null
@@ -1,1353 +0,0 @@
-package gregtech.api.metatileentity;
-
-import static gregtech.api.enums.GT_Values.NW;
-import static gregtech.api.enums.GT_Values.V;
-import gregtech.GT_Mod;
-import gregtech.api.GregTech_API;
-import gregtech.api.enums.ItemList;
-import gregtech.api.enums.Textures;
-import gregtech.api.interfaces.ITexture;
-import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
-import gregtech.api.interfaces.tileentity.IEnergyConnected;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.net.GT_Packet_TileEntity;
-import gregtech.api.objects.GT_ItemStack;
-import gregtech.api.util.*;
-import ic2.api.Direction;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import net.minecraft.block.Block;
-import net.minecraft.block.BlockFire;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.item.EntityItem;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Items;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.nbt.NBTTagList;
-import net.minecraft.network.Packet;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.util.AxisAlignedBB;
-import net.minecraft.world.EnumSkyBlock;
-import net.minecraft.world.World;
-import net.minecraftforge.common.util.ForgeDirection;
-import net.minecraftforge.fluids.Fluid;
-import net.minecraftforge.fluids.FluidStack;
-import net.minecraftforge.fluids.FluidTankInfo;
-
-/**
- * NEVER INCLUDE THIS FILE IN YOUR MOD!!!
- *
- * This is the main TileEntity for EVERYTHING.
- */
-public class BaseMetaTileEntity extends BaseTileEntity implements IGregTechTileEntity {
- protected MetaTileEntity mMetaTileEntity;
- protected long mStoredEnergy = 0, mStoredSteam = 0;
- protected int mAverageEUInputIndex = 0, mAverageEUOutputIndex = 0;
- protected boolean mReleaseEnergy = false;
- protected int[] mAverageEUInput = new int[] {0,0,0,0,0}, mAverageEUOutput = new int[] {0,0,0,0,0};
-
- private boolean[] mActiveEUInputs = new boolean[] {false, false, false, false, false, false}, mActiveEUOutputs = new boolean[] {false, false, false, false, false, false};
- private byte[] mSidedRedstone = new byte[] {15,15,15,15,15,15};
- private int[] mCoverSides = new int[] {0,0,0,0,0,0}, mCoverData = new int[] {0,0,0,0,0,0}, mTimeStatistics = new int[GregTech_API.TICKS_FOR_LAG_AVERAGING];
- private boolean mHasEnoughEnergy = true, mRunningThroughTick = false, mInputDisabled = false, mOutputDisabled = false, mMuffler = false, mLockUpgrade = false, mActive = false, mRedstone = false, mWorkUpdate = false, mSteamConverter = false, mInventoryChanged = false, mWorks = true, mNeedsUpdate = true, mNeedsBlockUpdate = true, mSendClientData = false, oRedstone = false;
- private byte mColor = 0, oColor = 0, mStrongRedstone = 0, oRedstoneData = 63, oTextureData = 0, oUpdateData = 0, oLightValueClient = -1, oLightValue = -1, mLightValue = 0, mOtherUpgrades = 0, mFacing = 0, oFacing = 0, mWorkData = 0;
- private int mDisplayErrorCode = 0, oX = 0, oY = 0, oZ = 0, mTimeStatisticsIndex = 0, mLagWarningCount = 0;
- private short mID = 0;
- private long mTickTimer = 0, oOutput = 0, mAcceptedAmperes = Long.MAX_VALUE;
- private String mOwnerName = "";
- private NBTTagCompound mRecipeStuff = new NBTTagCompound();
-
- public BaseMetaTileEntity() {}
-
- @Override
- public void writeToNBT(NBTTagCompound aNBT) {
- try {
- super.writeToNBT(aNBT);
- } catch(Throwable e) {
- GT_Log.err.println("Encountered CRITICAL ERROR while saving MetaTileEntity, the Chunk whould've been corrupted by now, but I prevented that. Please report immidietly to GregTech Intergalactical!!!");
- e.printStackTrace(GT_Log.err);
- }
- try {
- aNBT.setInteger ("mID" , mID);
- aNBT.setLong ("mStoredSteam" , mStoredSteam);
- aNBT.setLong ("mStoredEnergy" , mStoredEnergy);
- aNBT.setIntArray ("mCoverData" , mCoverData);
- aNBT.setIntArray ("mCoverSides" , mCoverSides);
- aNBT.setByteArray ("mRedstoneSided" , mSidedRedstone);
- aNBT.setByte ("mColor" , mColor);
- aNBT.setByte ("mLightValue" , mLightValue);
- aNBT.setByte ("mOtherUpgrades" , mOtherUpgrades);
- aNBT.setByte ("mWorkData" , mWorkData);
- aNBT.setByte ("mStrongRedstone" , mStrongRedstone);
- aNBT.setShort ("mFacing" , mFacing);
- aNBT.setString ("mOwnerName" , mOwnerName);
- aNBT.setBoolean ("mLockUpgrade" , mLockUpgrade);
- aNBT.setBoolean ("mMuffler" , mMuffler);
- aNBT.setBoolean ("mSteamConverter" , mSteamConverter);
- aNBT.setBoolean ("mActive" , mActive);
- aNBT.setBoolean ("mRedstone" , mRedstone);
- aNBT.setBoolean ("mWorks" , !mWorks);
- aNBT.setBoolean ("mInputDisabled" , mInputDisabled);
- aNBT.setBoolean ("mOutputDisabled" , mOutputDisabled);
- aNBT.setTag ("GT.CraftingComponents", mRecipeStuff);
- } catch(Throwable e) {
- GT_Log.err.println("Encountered CRITICAL ERROR while saving MetaTileEntity, the Chunk whould've been corrupted by now, but I prevented that. Please report immidietly to GregTech Intergalactical!!!");
- e.printStackTrace(GT_Log.err);
- }
- try {
- if (hasValidMetaTileEntity()) {
- NBTTagList tItemList = new NBTTagList();
- for (int i = 0; i < mMetaTileEntity.getRealInventory().length; i++) {
- ItemStack tStack = mMetaTileEntity.getRealInventory()[i];
- if (tStack != null) {
- NBTTagCompound tTag = new NBTTagCompound();
- tTag.setInteger("IntSlot", i);
- tStack.writeToNBT(tTag);
- tItemList.appendTag(tTag);
- }
- }
- aNBT.setTag("Inventory", tItemList);
-
- try {
- mMetaTileEntity.saveNBTData(aNBT);
- } catch(Throwable e) {
- GT_Log.err.println("Encountered CRITICAL ERROR while saving MetaTileEntity, the Chunk whould've been corrupted by now, but I prevented that. Please report immidietly to GregTech Intergalactical!!!");
- e.printStackTrace(GT_Log.err);
- }
- }
- } catch(Throwable e) {
- GT_Log.err.println("Encountered CRITICAL ERROR while saving MetaTileEntity, the Chunk whould've been corrupted by now, but I prevented that. Please report immidietly to GregTech Intergalactical!!!");
- e.printStackTrace(GT_Log.err);
- }
- }
-
- @Override
- public void readFromNBT(NBTTagCompound aNBT) {
- super.readFromNBT(aNBT);
- setInitialValuesAsNBT(aNBT, (short)0);
- }
-
- @Override
- public void setInitialValuesAsNBT(NBTTagCompound aNBT, short aID) {
- if (aNBT == null) {
- if (aID>0) mID=aID; else mID=mID>0?mID:0;
- if (mID!=0) createNewMetatileEntity(mID);
- mSidedRedstone = (hasValidMetaTileEntity()&&mMetaTileEntity.hasSidedRedstoneOutputBehavior()?new byte[] {0,0,0,0,0,0}:new byte[] {15,15,15,15,15,15});
- } else {
- if (aID<=0) mID = (short)aNBT.getInteger ("mID"); else mID = aID;
- mStoredSteam = aNBT.getInteger ("mStoredSteam");
- mStoredEnergy = aNBT.getInteger ("mStoredEnergy");
- mColor = aNBT.getByte ("mColor");
- mLightValue = aNBT.getByte ("mLightValue");
- mWorkData = aNBT.getByte ("mWorkData");
- mStrongRedstone = aNBT.getByte ("mStrongRedstone");
- mFacing = oFacing = (byte)aNBT.getShort("mFacing");
- mOwnerName = aNBT.getString ("mOwnerName");
- mLockUpgrade = aNBT.getBoolean ("mLockUpgrade");
- mMuffler = aNBT.getBoolean ("mMuffler");
- mSteamConverter = aNBT.getBoolean ("mSteamConverter");
- mActive = aNBT.getBoolean ("mActive");
- mRedstone = aNBT.getBoolean ("mRedstone");
- mWorks =!aNBT.getBoolean ("mWorks");
- mInputDisabled = aNBT.getBoolean ("mInputDisabled");
- mOutputDisabled = aNBT.getBoolean ("mOutputDisabled");
- mOtherUpgrades = (byte)(aNBT.getByte("mOtherUpgrades")+aNBT.getByte("mBatteries")+aNBT.getByte("mLiBatteries"));
- mCoverSides = aNBT.getIntArray ("mCoverSides");
- mCoverData = aNBT.getIntArray ("mCoverData");
- mSidedRedstone = aNBT.getByteArray ("mRedstoneSided");
- mRecipeStuff = aNBT.getCompoundTag("GT.CraftingComponents");
-
- if (mCoverData.length != 6) mCoverData = new int[] { 0, 0, 0, 0, 0, 0};
- if (mCoverSides.length != 6) mCoverSides = new int[] { 0, 0, 0, 0, 0, 0};
- if (mSidedRedstone.length != 6) if (hasValidMetaTileEntity() && mMetaTileEntity.hasSidedRedstoneOutputBehavior()) mSidedRedstone = new byte[] {0,0,0,0,0,0}; else mSidedRedstone = new byte[] {15,15,15,15,15,15};
-
- for (byte i = 0; i < 6; i++) mCoverBehaviors[i] = GregTech_API.getCoverBehavior(mCoverSides[i]);
-
- if (mID!=0 && createNewMetatileEntity(mID)) {
- NBTTagList tItemList = aNBT.getTagList("Inventory", 10);
- for (int i = 0; i < tItemList.tagCount(); i++) {
- NBTTagCompound tTag = tItemList.getCompoundTagAt(i);
- int tSlot = tTag.getInteger("IntSlot");
- if (tSlot >= 0 && tSlot < mMetaTileEntity.getRealInventory().length) {
- mMetaTileEntity.getRealInventory()[tSlot] = GT_Utility.loadItem(tTag);
- }
- }
-
- try {
- mMetaTileEntity.loadNBTData(aNBT);
- } catch(Throwable e) {
- GT_Log.err.println("Encountered Exception while loading MetaTileEntity, the Server should've crashed now, but I prevented that. Please report immidietly to GregTech Intergalactical!!!");
- e.printStackTrace(GT_Log.err);
- }
- }
- }
-
- if (mCoverData.length != 6) mCoverData = new int[] { 0, 0, 0, 0, 0, 0};
- if (mCoverSides.length != 6) mCoverSides = new int[] { 0, 0, 0, 0, 0, 0};
- if (mSidedRedstone.length != 6) if (hasValidMetaTileEntity() && mMetaTileEntity.hasSidedRedstoneOutputBehavior()) mSidedRedstone = new byte[] {0,0,0,0,0,0}; else mSidedRedstone = new byte[] {15,15,15,15,15,15};
-
- for (byte i = 0; i < 6; i++) mCoverBehaviors[i] = GregTech_API.getCoverBehavior(mCoverSides[i]);
- }
-
- private boolean createNewMetatileEntity(short aID) {
- if (aID <= 0 || aID >= GregTech_API.METATILEENTITIES.length || GregTech_API.METATILEENTITIES[aID] == null) {
- GT_Log.err.println("MetaID " + aID + " not loadable => locking TileEntity!");
- } else {
- if (aID != 0) {
- if (hasValidMetaTileEntity()) mMetaTileEntity.setBaseMetaTileEntity(null);
- GregTech_API.METATILEENTITIES[aID].newMetaEntity(this).setBaseMetaTileEntity(this);
- mTickTimer = 0;
- mID = aID;
- return true;
- }
- }
- return false;
- }
-
- /**
- * Used for ticking special BaseMetaTileEntities, which need that for Energy Conversion
- * It's called right before onPostTick()
- */
- public void updateStatus() {
- //
- }
-
- /**
- * Called when trying to charge Items
- */
- public void chargeItem(ItemStack aStack) {
- decreaseStoredEU(GT_ModHandler.chargeElectricItem(aStack, (int)Math.min(Integer.MAX_VALUE, getStoredEU()), (int)Math.min(Integer.MAX_VALUE, mMetaTileEntity.getOutputTier()), false, false), true);
- }
-
- /**
- * Called when trying to discharge Items
- */
- public void dischargeItem(ItemStack aStack) {
- increaseStoredEnergyUnits(GT_ModHandler.dischargeElectricItem(aStack, (int)Math.min(Integer.MAX_VALUE, getEUCapacity() - getStoredEU()), (int)Math.min(Integer.MAX_VALUE, mMetaTileEntity.getInputTier()), false, false, false), true);
- }
-
- @Override
- public void updateEntity() {
- super.updateEntity();
-
- if (!hasValidMetaTileEntity()) {
- if (mMetaTileEntity == null) return;
- mMetaTileEntity.setBaseMetaTileEntity(this);
- }
-
- mRunningThroughTick = true;
- long tTime = System.currentTimeMillis();
-
- for (int tCode = 0; hasValidMetaTileEntity() && tCode >= 0;) {try {switch (tCode) {
- case 0:
- tCode++;
- if (mTickTimer++==0) {
- oX = xCoord;
- oY = yCoord;
- oZ = zCoord;
- if (isServerSide()) for (byte i = 0; i < 6; i++) if (getCoverIDAtSide(i)!=0) if (!mMetaTileEntity.allowCoverOnSide(i, new GT_ItemStack(getCoverIDAtSide(i)))) dropCover(i, i, true);
-
- worldObj.markTileEntityChunkModified(xCoord, yCoord, zCoord, this);
-
- mMetaTileEntity.onFirstTick(this);
- if (!hasValidMetaTileEntity()) {
- mRunningThroughTick = false;
- return;
- }
- }
- case 1:
- tCode++;
- if (isClientSide()) {
- if (mColor != oColor) {
- mMetaTileEntity.onColorChangeClient(oColor = mColor);
- issueTextureUpdate();
- }
-
- if (mLightValue != oLightValueClient) {
- worldObj.setLightValue (EnumSkyBlock.Block, xCoord , yCoord , zCoord , mLightValue);
- worldObj.updateLightByType(EnumSkyBlock.Block, xCoord , yCoord , zCoord );
- worldObj.updateLightByType(EnumSkyBlock.Block, xCoord+1, yCoord , zCoord );
- worldObj.updateLightByType(EnumSkyBlock.Block, xCoord-1, yCoord , zCoord );
- worldObj.updateLightByType(EnumSkyBlock.Block, xCoord , yCoord+1, zCoord );
- worldObj.updateLightByType(EnumSkyBlock.Block, xCoord , yCoord-1, zCoord );
- worldObj.updateLightByType(EnumSkyBlock.Block, xCoord , yCoord , zCoord+1);
- worldObj.updateLightByType(EnumSkyBlock.Block, xCoord , yCoord , zCoord-1);
- oLightValueClient = mLightValue;
- issueTextureUpdate();
- }
-
- if (mNeedsUpdate) {
- worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
- //worldObj.func_147479_m(xCoord, yCoord, zCoord);
- mNeedsUpdate = false;
- }
- }
- case 2: case 3: case 4: case 5: case 6: case 7:
- if (isServerSide() && mTickTimer > 10) {
- for (byte i = (byte)(tCode-2); i < 6; i++) if (getCoverIDAtSide(i) != 0) {
- tCode++;
- GT_CoverBehavior tCover = getCoverBehaviorAtSide(i);
- int tCoverTickRate = tCover.getTickRate(i, getCoverIDAtSide(i), mCoverData[i], this);
- if (tCoverTickRate > 0 && mTickTimer % tCoverTickRate == 0) {
- mCoverData[i] = tCover.doCoverThings(i, getInputRedstoneSignal(i), getCoverIDAtSide(i), mCoverData[i], this, mTickTimer);
- if (!hasValidMetaTileEntity()) {
- mRunningThroughTick = false;
- return;
- }
- }
- }
-
- }
- case 8:
- tCode=9;
- if (isServerSide()) {
- if (++mAverageEUInputIndex >= mAverageEUInput.length ) mAverageEUInputIndex = 0;
- if (++mAverageEUOutputIndex >= mAverageEUOutput.length) mAverageEUOutputIndex = 0;
-
- mAverageEUInput [mAverageEUInputIndex ] = 0;
- mAverageEUOutput[mAverageEUOutputIndex] = 0;
- }
- case 9:
- tCode++;
- mMetaTileEntity.onPreTick(this, mTickTimer);
- if (!hasValidMetaTileEntity()) {
- mRunningThroughTick = false;
- return;
- }
- case 10:
- tCode++;
- if (isServerSide()) {
- if (mRedstone != oRedstone || mTickTimer == 10) {
- for (byte i = 0; i < 6; i++) mCoverBehaviors[i] = GregTech_API.getCoverBehavior(mCoverSides[i]);
- oRedstone = mRedstone;
- issueBlockUpdate();
- }
-
- if (xCoord != oX || yCoord != oY || zCoord != oZ) {
- oX = xCoord;
- oY = yCoord;
- oZ = zCoord;
- issueClientUpdate();
- clearTileEntityBuffer();
- }
-
- if (mFacing != oFacing) {
- oFacing = mFacing;
- for (byte i = 0; i < 6; i++) if (getCoverIDAtSide(i)!=0) if (!mMetaTileEntity.allowCoverOnSide(i, new GT_ItemStack(getCoverIDAtSide(i)))) dropCover(i, i, true);
- issueBlockUpdate();
- }
-
- if (mTickTimer > 20 && mMetaTileEntity.isElectric()) {
- mAcceptedAmperes = 0;
-
- if (getOutputVoltage() != oOutput) {
- oOutput = getOutputVoltage();
- }
-
- if (mMetaTileEntity.isEnetOutput() || mMetaTileEntity.isEnetInput()) {
- for (byte i = 0; i < 6; i++) {
- boolean
- temp = isEnergyInputSide(i);
- if (temp != mActiveEUInputs[i]) {
- mActiveEUInputs[i] = temp;
- }
- temp = isEnergyOutputSide(i);
- if (temp != mActiveEUOutputs[i]) {
- mActiveEUOutputs[i] = temp;
- }
- }
- }
-
- if (mMetaTileEntity.isEnetOutput() && oOutput > 0) {
- long tOutputVoltage = Math.max(oOutput, oOutput + (1 << GT_Utility.getTier(oOutput))), tUsableAmperage = Math.min(getOutputAmperage(), (getStoredEU() - mMetaTileEntity.getMinimumStoredEU()) / tOutputVoltage);
- if (tUsableAmperage > 0) {
- long tEU = tOutputVoltage * IEnergyConnected.Util.emitEnergyToNetwork(oOutput, tUsableAmperage, this);
- mAverageEUOutput[mAverageEUOutputIndex] += tEU;
- decreaseStoredEU(tEU, true);
- }
- }
- if (getEUCapacity() > 0) {
- if (GregTech_API.sMachineFireExplosions && getRandomNumber(1000) == 0) {
- Block tBlock = getBlockAtSide((byte)getRandomNumber(6));
- if (tBlock != null && tBlock instanceof BlockFire) doEnergyExplosion();
- }
-
- if (!hasValidMetaTileEntity()) {
- mRunningThroughTick = false;
- return;
- }
-
- if (getRandomNumber(1000) == 0) {
- if((getCoverIDAtSide((byte)1) == 0 && worldObj.getPrecipitationHeight(xCoord , zCoord ) - 2 < yCoord)
- || (getCoverIDAtSide((byte)2) == 0 && worldObj.getPrecipitationHeight(xCoord , zCoord-1) - 1 < yCoord)
- || (getCoverIDAtSide((byte)3) == 0 && worldObj.getPrecipitationHeight(xCoord , zCoord+1) - 1 < yCoord)
- || (getCoverIDAtSide((byte)4) == 0 && worldObj.getPrecipitationHeight(xCoord-1, zCoord ) - 1 < yCoord)
- || (getCoverIDAtSide((byte)5) == 0 && worldObj.getPrecipitationHeight(xCoord+1, zCoord ) - 1 < yCoord)) {
- if (GregTech_API.sMachineRainExplosions && worldObj.isRaining() && getBiome().rainfall > 0) {
- if (getRandomNumber(10)==0) {
- try{GT_Mod.instance.achievements.issueAchievement(this.getWorldObj().getPlayerEntityByName(mOwnerName), "badweather");}catch(Exception e){}
- doEnergyExplosion();
- }else setOnFire();
- }
- if (!hasValidMetaTileEntity()) {
- mRunningThroughTick = false;
- return;
- }
- if (GregTech_API.sMachineThunderExplosions && worldObj.isThundering() && getBiome().rainfall > 0 && getRandomNumber(3) == 0) {
- try{GT_Mod.instance.achievements.issueAchievement(this.getWorldObj().getPlayerEntityByName(mOwnerName), "badweather");}catch(Exception e){}
- doEnergyExplosion();
- }
- }
- }
- }
- }
-
- if (!hasValidMetaTileEntity()) {
- mRunningThroughTick = false;
- return;
- }
- }
- case 11:
- tCode++;
- if (isServerSide()) {
- if (mMetaTileEntity.dechargerSlotCount() > 0 && getStoredEU() < getEUCapacity()) {
- for (int i = mMetaTileEntity.dechargerSlotStartIndex(), k = mMetaTileEntity.dechargerSlotCount()+i; i < k; i++) {
- if (mMetaTileEntity.mInventory[i] != null && getStoredEU() < getEUCapacity()) {
- dischargeItem(mMetaTileEntity.mInventory[i]);
- if (mMetaTileEntity.mInventory[i].stackSize <= 0) mMetaTileEntity.mInventory[i] = null;
- mInventoryChanged = true;
- }
- }
- }
- }
- case 12:
- tCode++;
- if (isServerSide()) {
- if (mMetaTileEntity.rechargerSlotCount() > 0 && getStoredEU() > 0) {
- for (int i = mMetaTileEntity.rechargerSlotStartIndex(), k = mMetaTileEntity.rechargerSlotCount()+i; i < k; i++) {
- if (getStoredEU() > 0 && mMetaTileEntity.mInventory[i] != null) {
- chargeItem(mMetaTileEntity.mInventory[i]);
- if (mMetaTileEntity.mInventory[i].stackSize <= 0) mMetaTileEntity.mInventory[i] = null;
- mInventoryChanged = true;
- }
- }
- }
- }
- case 13:
- tCode++;
- updateStatus();
- if (!hasValidMetaTileEntity()) {
- mRunningThroughTick = false;
- return;
- }
- case 14:
- tCode++;
- mMetaTileEntity.onPostTick(this, mTickTimer);
- if (!hasValidMetaTileEntity()) {
- mRunningThroughTick = false;
- return;
- }
- case 15:
- tCode++;
- if (isServerSide()) {
- if (mTickTimer % 10 == 0) {
- if (mSendClientData) {
- NW.sendPacketToAllPlayersInRange(worldObj, new GT_Packet_TileEntity(xCoord, (short)yCoord, zCoord, mID, mCoverSides[0], mCoverSides[1], mCoverSides[2], mCoverSides[3], mCoverSides[4], mCoverSides[5], oTextureData = (byte)((mFacing&7) | (mActive?8:0) | (mRedstone?16:0) | (mLockUpgrade?32:0)), oUpdateData = hasValidMetaTileEntity()?mMetaTileEntity.getUpdateData():0, oRedstoneData = (byte)(((mSidedRedstone[0]>0)?1:0)|((mSidedRedstone[1]>0)?2:0)|((mSidedRedstone[2]>0)?4:0)|((mSidedRedstone[3]>0)?8:0)|((mSidedRedstone[4]>0)?16:0)|((mSidedRedstone[5]>0)?32:0)), oColor = mColor), xCoord, zCoord);
- mSendClientData = false;
- }
- }
-
- if (mTickTimer > 10) {
- byte tData = (byte)((mFacing&7)|(mActive?8:0)|(mRedstone?16:0)|(mLockUpgrade?32:0));
- if (tData != oTextureData) sendBlockEvent((byte)0, oTextureData = tData);
- tData = mMetaTileEntity.getUpdateData();
- if (tData != oUpdateData) sendBlockEvent((byte)1, oUpdateData = tData);
- if (mColor != oColor) sendBlockEvent((byte)2, oColor = mColor);
- tData = (byte)(((mSidedRedstone[0]>0)?1:0)|((mSidedRedstone[1]>0)?2:0)|((mSidedRedstone[2]>0)?4:0)|((mSidedRedstone[3]>0)?8:0)|((mSidedRedstone[4]>0)?16:0)|((mSidedRedstone[5]>0)?32:0));
- if (tData != oRedstoneData) sendBlockEvent((byte)3, oRedstoneData = tData);
- if (mLightValue != oLightValue) {
- worldObj.setLightValue (EnumSkyBlock.Block, xCoord , yCoord , zCoord , mLightValue);
- worldObj.updateLightByType(EnumSkyBlock.Block, xCoord , yCoord , zCoord );
- worldObj.updateLightByType(EnumSkyBlock.Block, xCoord+1, yCoord , zCoord );
- worldObj.updateLightByType(EnumSkyBlock.Block, xCoord-1, yCoord , zCoord );
- worldObj.updateLightByType(EnumSkyBlock.Block, xCoord , yCoord+1, zCoord );
- worldObj.updateLightByType(EnumSkyBlock.Block, xCoord , yCoord-1, zCoord );
- worldObj.updateLightByType(EnumSkyBlock.Block, xCoord , yCoord , zCoord+1);
- worldObj.updateLightByType(EnumSkyBlock.Block, xCoord , yCoord , zCoord-1);
- issueTextureUpdate();
- sendBlockEvent((byte)7, oLightValue = mLightValue);
- }
- }
-
- if (mNeedsBlockUpdate) {
- worldObj.notifyBlocksOfNeighborChange(xCoord, yCoord, zCoord, getBlockOffset(0, 0, 0));
- mNeedsBlockUpdate = false;
- }
- }
- default:
- tCode = -1;
- break;
- }} catch (Throwable e) {
- GT_Log.err.println("Encountered Exception while ticking MetaTileEntity in Step "+(tCode-1)+". The Game should've crashed now, but I prevented that. Please report immidietly to GregTech Intergalactical!!!");
- e.printStackTrace(GT_Log.err);
- }}
-
- if (isServerSide() && hasValidMetaTileEntity()) {
- tTime = System.currentTimeMillis() - tTime;
- if (mTimeStatistics.length > 0) mTimeStatistics[mTimeStatisticsIndex = (mTimeStatisticsIndex + 1) % mTimeStatistics.length] = (int)tTime;
- if (tTime > 0 && tTime > GregTech_API.MILLISECOND_THRESHOLD_UNTIL_LAG_WARNING && mTickTimer > 1000 && getMetaTileEntity().doTickProfilingMessageDuringThisTick() && mLagWarningCount++<10) System.out.println("WARNING: Possible Lag Source at [" + xCoord + ", " + yCoord + ", " + zCoord + "] in Dimension " + worldObj.provider.dimensionId + " with " + tTime + "ms caused by an instance of " + getMetaTileEntity().getClass());
- }
-
- mWorkUpdate = mInventoryChanged = mRunningThroughTick = false;
- }
-
- @Override
- public Packet getDescriptionPacket() {
- issueClientUpdate();
- return null;
- }
-
- public final void receiveMetaTileEntityData(short aID, int aCover0, int aCover1, int aCover2, int aCover3, int aCover4, int aCover5, byte aTextureData, byte aUpdateData, byte aRedstoneData, byte aColorData) {
- issueTextureUpdate();
- if (mID != aID && aID > 0) {
- mID = aID;
- createNewMetatileEntity(mID);
- }
-
- mCoverSides[0] = aCover0;
- mCoverSides[1] = aCover1;
- mCoverSides[2] = aCover2;
- mCoverSides[3] = aCover3;
- mCoverSides[4] = aCover4;
- mCoverSides[5] = aCover5;
-
- for (byte i = 0; i < 6; i++) mCoverBehaviors[i] = GregTech_API.getCoverBehavior(mCoverSides[i]);
-
- receiveClientEvent(0, aTextureData);
- receiveClientEvent(1, aUpdateData);
- receiveClientEvent(2, aColorData);
- receiveClientEvent(3, aRedstoneData);
- }
-
- @Override
- public boolean receiveClientEvent(int aEventID, int aValue) {
- super.receiveClientEvent(aEventID, aValue);
-
- if (hasValidMetaTileEntity()) {
- try {
- mMetaTileEntity.receiveClientEvent((byte)aEventID, (byte)aValue);
- } catch(Throwable e) {
- GT_Log.err.println("Encountered Exception while receiving Data from the Server, the Client should've been crashed by now, but I prevented that. Please report immidietly to GregTech Intergalactical!!!");
- e.printStackTrace(GT_Log.err);
- }
- }
-
- if (isClientSide()) {
- issueTextureUpdate();
- switch(aEventID) {
- case 0:
- mFacing = (byte)(aValue& 7);
- mActive = ((aValue& 8) != 0);
- mRedstone = ((aValue&16) != 0);
- //mLockUpgrade = ((aValue&32) != 0);
- break;
- case 1:
- if (hasValidMetaTileEntity()) mMetaTileEntity.onValueUpdate((byte)aValue);
- break;
- case 2:
- if (aValue > 16 || aValue < 0) aValue = 0;
- mColor = (byte)aValue;
- break;
- case 3:
- mSidedRedstone[0] = (byte)((aValue& 1)>0?15:0);
- mSidedRedstone[1] = (byte)((aValue& 2)>0?15:0);
- mSidedRedstone[2] = (byte)((aValue& 4)>0?15:0);
- mSidedRedstone[3] = (byte)((aValue& 8)>0?15:0);
- mSidedRedstone[4] = (byte)((aValue&16)>0?15:0);
- mSidedRedstone[5] = (byte)((aValue&32)>0?15:0);
- break;
- case 4:
- if (hasValidMetaTileEntity() && mTickTimer > 20) mMetaTileEntity.doSound((byte)aValue, xCoord+0.5, yCoord+0.5, zCoord+0.5);
- break;
- case 5:
- if (hasValidMetaTileEntity() && mTickTimer > 20) mMetaTileEntity.startSoundLoop((byte)aValue, xCoord+0.5, yCoord+0.5, zCoord+0.5);
- break;
- case 6:
- if (hasValidMetaTileEntity() && mTickTimer > 20) mMetaTileEntity.stopSoundLoop((byte)aValue, xCoord+0.5, yCoord+0.5, zCoord+0.5);
- break;
- case 7:
- mLightValue = (byte)aValue;
- break;
- }
- }
- return true;
- }
-
- public ArrayList<String> getDebugInfo(EntityPlayer aPlayer, int aLogLevel) {
- ArrayList<String> tList = new ArrayList<String>();
- if (aLogLevel > 2) {
- tList.add("Meta-ID: " + mID + (canAccessData()?" valid":" invalid") + (mMetaTileEntity==null?" MetaTileEntity == null!":" "));
- }
- if (aLogLevel > 1) {
- if (mTimeStatistics.length > 0) {
- double tAverageTime = 0; for (int tTime : mTimeStatistics) tAverageTime += tTime;
- tList.add("This particular TileEntity has caused an average CPU-load of ~" + (tAverageTime/mTimeStatistics.length) + "ms over the last " + mTimeStatistics.length + " ticks.");
- }
- if (mLagWarningCount > 0) {
- tList.add("This TileEntity has also caused " + (mLagWarningCount>=10?"more than 10":mLagWarningCount) + " Lag Spike Warnings (anything taking longer than " + GregTech_API.MILLISECOND_THRESHOLD_UNTIL_LAG_WARNING + "ms) on the Server.");
- }
- tList.add("Is" + (mMetaTileEntity.isAccessAllowed(aPlayer)?" ":" not ") + "accessible for you");
- }
- if (aLogLevel > 0) {
- if (getSteamCapacity() > 0 && hasSteamEngineUpgrade()) tList.add(getStoredSteam() + " of " + getSteamCapacity() + " Steam");
- tList.add("Machine is " + (mActive?"active":"inactive"));
- if (!mHasEnoughEnergy) tList.add("ATTENTION: This Device consumes Energy at a higher Rate than you input. You could insert more to speed up the process.");
- }
- return mMetaTileEntity.getSpecialDebugInfo(this, aPlayer, aLogLevel, tList);
- }
-
- @Override public void issueTextureUpdate() {mNeedsUpdate = true;}
- @Override public void issueBlockUpdate() {mNeedsBlockUpdate = true;}
- @Override public void issueClientUpdate() {mSendClientData = true;}
- @Override public void issueCoverUpdate(byte aSide) {issueClientUpdate();}
-
- @Override public byte getStrongestRedstone() {return (byte)Math.max(getInternalInputRedstoneSignal((byte)0), Math.max(getInternalInputRedstoneSignal((byte)1), Math.max(getInternalInputRedstoneSignal((byte)2), Math.max(getInternalInputRedstoneSignal((byte)3), Math.max(getInternalInputRedstoneSignal((byte)4), getInternalInputRedstoneSignal((byte)5))))));}
-
- @Override public boolean getRedstone() {return getRedstone((byte)0)||getRedstone((byte)1)||getRedstone((byte)2)||getRedstone((byte)3)||getRedstone((byte)4)||getRedstone((byte)5);}
- @Override public boolean getRedstone(byte aSide) {return getInternalInputRedstoneSignal(aSide) > 0;}
-
- public ITexture getCoverTexture(byte aSide) {return GregTech_API.sCovers.get(new GT_ItemStack(getCoverIDAtSide(aSide)));}
-
- @Override public boolean isGivingInformation() {if (canAccessData()) return mMetaTileEntity.isGivingInformation(); return false;}
- @Override public boolean isValidFacing(byte aSide) {if (canAccessData()) return mMetaTileEntity.isFacingValid(aSide); return false;}
- @Override public byte getBackFacing() {return GT_Utility.getOppositeSide(mFacing);}
- @Override public byte getFrontFacing() {return mFacing;}
- @Override public void setFrontFacing(byte aFacing) {if (isValidFacing(aFacing)) {mFacing = aFacing; mMetaTileEntity.onFacingChange(); onMachineBlockUpdate();}}
- @Override public int getSizeInventory() {if (canAccessData()) return mMetaTileEntity.getSizeInventory(); return 0;}
- @Override public ItemStack getStackInSlot(int aIndex) {if (canAccessData()) return mMetaTileEntity.getStackInSlot(aIndex); return null;}
- @Override public void setInventorySlotContents(int aIndex, ItemStack aStack) {mInventoryChanged = true; if (canAccessData()) mMetaTileEntity.setInventorySlotContents(aIndex, worldObj.isRemote?aStack:GT_OreDictUnificator.setStack(true, aStack));}
- @Override public String getInventoryName() {if (canAccessData()) return mMetaTileEntity.getInventoryName(); if (GregTech_API.METATILEENTITIES[mID] != null) return GregTech_API.METATILEENTITIES[mID].getInventoryName(); return "";}
- @Override public int getInventoryStackLimit() {if (canAccessData()) return mMetaTileEntity.getInventoryStackLimit(); return 64;}
- @Override public void openInventory() {if (canAccessData()) mMetaTileEntity.onOpenGUI();}
- @Override public void closeInventory() {if (canAccessData()) mMetaTileEntity.onCloseGUI();}
- @Override public boolean isUseableByPlayer(EntityPlayer aPlayer) {return canAccessData() && playerOwnsThis(aPlayer, false) && mTickTimer>40 && getTileEntityOffset(0, 0, 0) == this && aPlayer.getDistanceSq(xCoord + 0.5, yCoord + 0.5, zCoord + 0.5) < 64 && mMetaTileEntity.isAccessAllowed(aPlayer);}
- @Override public void validate() {super.validate(); mTickTimer = 0;}
- @Override public void invalidate() {tileEntityInvalid = false; if (canAccessData()) {mMetaTileEntity.onRemoval(); mMetaTileEntity.setBaseMetaTileEntity(null);} super.invalidate();}
- @Override public void onChunkUnload() {super.onChunkUnload();}
- @Override public boolean hasCustomInventoryName() {return false;}
- @Override public ItemStack getStackInSlotOnClosing(int slot) {ItemStack stack = getStackInSlot(slot); if (stack != null) setInventorySlotContents(slot, null); return stack;}
- @Override public void onMachineBlockUpdate() {if (canAccessData()) mMetaTileEntity.onMachineBlockUpdate();}
- @Override public int getProgress() {return canAccessData()?mMetaTileEntity.getProgresstime():0;}
- @Override public int getMaxProgress() {return canAccessData()?mMetaTileEntity.maxProgresstime():0;}
- @Override public boolean increaseProgress(int aProgressAmountInTicks) {return canAccessData()?mMetaTileEntity.increaseProgress(aProgressAmountInTicks)!=aProgressAmountInTicks:false;}
- @Override public boolean hasThingsToDo() {return getMaxProgress()>0;}
- @Override public void enableWorking() {if (!mWorks) mWorkUpdate = true; mWorks = true;}
- @Override public void disableWorking() {mWorks = false;}
- @Override public boolean isAllowedToWork() {return mWorks;}
- @Override public boolean hasWorkJustBeenEnabled() {return mWorkUpdate;}
- @Override public void setWorkDataValue(byte aValue) {mWorkData = aValue;}
- @Override public byte getWorkDataValue() {return mWorkData;}
- @Override public int getMetaTileID() {return mID;}
- @Override public int setMetaTileID(short aID) {return mID = aID;}
- @Override public boolean isActive() {return mActive;}
- @Override public void setActive(boolean aActive) {mActive = aActive;}
- @Override public long getTimer() {return mTickTimer;}
- @Override public boolean decreaseStoredEnergyUnits(long aEnergy, boolean aIgnoreTooLessEnergy) {if (!canAccessData()) return false; return mHasEnoughEnergy = decreaseStoredEU(aEnergy, aIgnoreTooLessEnergy) || decreaseStoredSteam(aEnergy, false) || (aIgnoreTooLessEnergy && (decreaseStoredSteam(aEnergy, true)));}
- @Override public boolean increaseStoredEnergyUnits(long aEnergy, boolean aIgnoreTooMuchEnergy) {if (!canAccessData()) return false; if (getStoredEU() < getEUCapacity() || aIgnoreTooMuchEnergy) {setStoredEU(mMetaTileEntity.getEUVar() + aEnergy); return true;} return false;}
- @Override public boolean inputEnergyFrom(byte aSide) {if (aSide == 6) return true; if (isServerSide()) return (aSide>=0&&aSide<6?mActiveEUInputs [aSide]:false)&&!mReleaseEnergy; return isEnergyInputSide (aSide);}
- @Override public boolean outputsEnergyTo(byte aSide) {if (aSide == 6) return true; if (isServerSide()) return (aSide>=0&&aSide<6?mActiveEUOutputs[aSide]:false)|| mReleaseEnergy; return isEnergyOutputSide(aSide);}
- @Override public long getOutputAmperage() {if (canAccessData() && mMetaTileEntity.isElectric()) return mMetaTileEntity.maxAmperesOut(); return 0;}
- @Override public long getOutputVoltage() {if (canAccessData() && mMetaTileEntity.isElectric() && mMetaTileEntity.isEnetOutput()) return mMetaTileEntity.maxEUOutput(); return 0;}
- @Override public long getInputAmperage() {if (canAccessData() && mMetaTileEntity.isElectric()) return mMetaTileEntity.maxAmperesIn(); return 0;}
- @Override public long getInputVoltage() {if (canAccessData() && mMetaTileEntity.isElectric()) return mMetaTileEntity.maxEUInput(); return Integer.MAX_VALUE;}
- @Override public boolean increaseStoredSteam(long aEnergy, boolean aIgnoreTooMuchEnergy) {if (!canAccessData()) return false; if (mMetaTileEntity.getSteamVar() < getSteamCapacity() || aIgnoreTooMuchEnergy) {setStoredSteam(mMetaTileEntity.getSteamVar() + aEnergy); return true;} return false;}
- @Override public String[] getDescription() {if (canAccessData()) return mMetaTileEntity.getDescription(); return new String[0];}
- @Override public boolean isValidSlot(int aIndex) {if (canAccessData()) return mMetaTileEntity.isValidSlot(aIndex); return false;}
- @Override public long getUniversalEnergyStored() {return Math.max(getStoredEU(), getStoredSteam());}
- @Override public long getUniversalEnergyCapacity() {return Math.max(getEUCapacity(), getSteamCapacity());}
- @Override public long getStoredEU() {if (canAccessData()) return Math.min(mMetaTileEntity.getEUVar(), getEUCapacity()); return 0;}
- @Override public long getEUCapacity() {if (canAccessData()) return mMetaTileEntity.maxEUStore(); return 0;}
- @Override public long getStoredSteam() {if (canAccessData()) return Math.min(mMetaTileEntity.getSteamVar(), getSteamCapacity()); return 0;}
- @Override public long getSteamCapacity() {if (canAccessData()) return mMetaTileEntity.maxSteamStore(); return 0;}
- @Override public ITexture[] getTexture(byte aSide) {ITexture rIcon = getCoverTexture(aSide); if (rIcon != null) return new ITexture[] {rIcon}; if (hasValidMetaTileEntity()) return mMetaTileEntity.getTexture(this, aSide, mFacing, (byte)(mColor-1), mActive, getOutputRedstoneSignal(aSide)>0); return Textures.BlockIcons.ERROR_RENDERING;}
-
- private boolean isEnergyInputSide(byte aSide) {if (aSide >= 0 && aSide < 6) {if (!getCoverBehaviorAtSide(aSide).letsEnergyIn (aSide, getCoverIDAtSide(aSide), getCoverDataAtSide(aSide), this)) return false; if (isInvalid()||mReleaseEnergy) return false; if (canAccessData() && mMetaTileEntity.isElectric() && mMetaTileEntity.isEnetInput ()) return mMetaTileEntity.isInputFacing (aSide);} return false;}
- private boolean isEnergyOutputSide(byte aSide) {if (aSide >= 0 && aSide < 6) {if (!getCoverBehaviorAtSide(aSide).letsEnergyOut(aSide, getCoverIDAtSide(aSide), getCoverDataAtSide(aSide), this)) return false; if (isInvalid()||mReleaseEnergy) return mReleaseEnergy; if (canAccessData() && mMetaTileEntity.isElectric() && mMetaTileEntity.isEnetOutput()) return mMetaTileEntity.isOutputFacing(aSide);} return false;}
-
- protected boolean hasValidMetaTileEntity() {return mMetaTileEntity != null && mMetaTileEntity.getBaseMetaTileEntity() == this;}
- protected boolean canAccessData() {return !isDead && hasValidMetaTileEntity();}
-
- public boolean setStoredEU (long aEnergy) {if (!canAccessData()) return false; if (aEnergy < 0) aEnergy = 0; mMetaTileEntity.setEUVar (aEnergy); return true;}
- public boolean setStoredSteam (long aEnergy) {if (!canAccessData()) return false; if (aEnergy < 0) aEnergy = 0; mMetaTileEntity.setSteamVar (aEnergy); return true;}
- public boolean decreaseStoredEU (long aEnergy, boolean aIgnoreTooLessEnergy) {if (!canAccessData()) {return false;} if (mMetaTileEntity.getEUVar() - aEnergy >= 0 || aIgnoreTooLessEnergy) {setStoredEU(mMetaTileEntity.getEUVar() - aEnergy); if (mMetaTileEntity.getEUVar() < 0) {setStoredEU (0); return false;} return true;} return false;}
- public boolean decreaseStoredSteam (long aEnergy, boolean aIgnoreTooLessEnergy) {if (!canAccessData()) return false; if (mMetaTileEntity.getSteamVar() - aEnergy >= 0 || aIgnoreTooLessEnergy) {setStoredSteam(mMetaTileEntity.getSteamVar() - aEnergy); if (mMetaTileEntity.getSteamVar() < 0) {setStoredSteam(0); return false;} return true;} return false;}
-
- public boolean playerOwnsThis(EntityPlayer aPlayer, boolean aCheckPrecicely) {if (!canAccessData()) return false; if (aCheckPrecicely || privateAccess() || mOwnerName.equals("")) if (mOwnerName.equals("")&&isServerSide()) setOwnerName(aPlayer.getDisplayName()); else if (privateAccess() && !aPlayer.getDisplayName().equals("Player") && !mOwnerName.equals("Player") && !mOwnerName.equals(aPlayer.getDisplayName())) return false; return true;}
- public boolean privateAccess() {if (!canAccessData()) return mLockUpgrade; return mLockUpgrade || mMetaTileEntity.ownerControl();}
- public void doEnergyExplosion() {if (getUniversalEnergyCapacity() > 0 && getUniversalEnergyStored() >= getUniversalEnergyCapacity()/5) {doExplosion(oOutput*(getUniversalEnergyStored() >= getUniversalEnergyCapacity()?4:getUniversalEnergyStored() >= getUniversalEnergyCapacity()/2?2:1)); GT_Mod.instance.achievements.issueAchievement(this.getWorldObj().getPlayerEntityByName(mOwnerName), "electricproblems");}}
-
- @Override
- public void doExplosion(long aAmount) {
- if (canAccessData()) {
- // This is only for Electric Machines
- if (GregTech_API.sMachineWireFire && mMetaTileEntity.isElectric()) {
- try {
- mReleaseEnergy = true;
- IEnergyConnected.Util.emitEnergyToNetwork(V[5], Math.max(1, getStoredEU() / V[5]), this);
- } catch(Exception e) {/* Fun Fact: all these "do nothing" Comments you see in my Code, are just there to let Eclipse shut up about the intended empty Brackets, but I need eclipse to yell at me in some of the regular Cases where I forget to add Code */}
- }
- mReleaseEnergy = false;
- // Normal Explosion Code
- mMetaTileEntity.onExplosion();
- mMetaTileEntity.doExplosion(aAmount);
- }
- }
-
- @Override
- public ArrayList<ItemStack> getDrops() {
- ItemStack rStack = new ItemStack(GregTech_API.sBlockMachines, 1, mID);
- NBTTagCompound tNBT = new NBTTagCompound();
- if (mRecipeStuff != null && !mRecipeStuff.hasNoTags()) tNBT.setTag("GT.CraftingComponents", mRecipeStuff);
- if (mMuffler ) tNBT.setBoolean ("mMuffler" , mMuffler);
- if (mLockUpgrade ) tNBT.setBoolean ("mLockUpgrade" , mLockUpgrade);
- if (mSteamConverter ) tNBT.setBoolean ("mSteamConverter" , mSteamConverter);
- if (mColor > 0) tNBT.setByte ("mColor" , mColor);
- if (mOtherUpgrades > 0) tNBT.setByte ("mOtherUpgrades" , mOtherUpgrades);
- if (mStrongRedstone > 0) tNBT.setByte ("mStrongRedstone" , mStrongRedstone);
- for (byte i = 0; i < mCoverSides.length; i++) {
- if (mCoverSides[i] != 0) {
- tNBT.setIntArray("mCoverData" , mCoverData);
- tNBT.setIntArray("mCoverSides" , mCoverSides);
- break;
- }
- }
- if (hasValidMetaTileEntity()) mMetaTileEntity.setItemNBT(tNBT);
- if (!tNBT.hasNoTags()) rStack.setTagCompound(tNBT);
- return new ArrayList<ItemStack>(Arrays.asList(rStack));
- }
-
- public int getUpgradeCount() {
- return (mMuffler?1:0)+(mLockUpgrade?1:0)+(mSteamConverter?1:0)+mOtherUpgrades;
- }
-
- @Override
- public boolean onRightclick(EntityPlayer aPlayer, byte aSide, float aX, float aY, float aZ) {
- if (isClientSide()) {
- if (getCoverBehaviorAtSide(aSide).onCoverRightclickClient(aSide, this, aPlayer, aX, aY, aZ)) return true;
- if (!getCoverBehaviorAtSide(aSide).isGUIClickable(aSide, getCoverIDAtSide(aSide), getCoverDataAtSide(aSide), this)) return false;
- }
- if (isServerSide()) {
- if (!privateAccess() || aPlayer.getDisplayName().equalsIgnoreCase(getOwnerName())) {
- ItemStack tCurrentItem = aPlayer.inventory.getCurrentItem();
- if (tCurrentItem != null) {
- if (getColorization() >= 0 && GT_Utility.areStacksEqual(new ItemStack(Items.water_bucket, 1), tCurrentItem)) {
- tCurrentItem.func_150996_a(Items.bucket);
- setColorization((byte)(getColorization() >= 16 ? -2 : -1));
- return true;
- }
- if (GT_Utility.isStackInList(tCurrentItem, GregTech_API.sWrenchList)) {
- if (mMetaTileEntity.onWrenchRightClick(aSide, GT_Utility.determineWrenchingSide(aSide, aX, aY, aZ), aPlayer, aX, aY, aZ)) {
- GT_ModHandler.damageOrDechargeItem(tCurrentItem, 1, 1000, aPlayer);
- GT_Utility.sendSoundToPlayers(worldObj, GregTech_API.sSoundList.get(100), 1.0F, -1, xCoord, yCoord, zCoord);
- }
- return true;
- }
-
- if (GT_Utility.isStackInList(tCurrentItem, GregTech_API.sScrewdriverList)) {
- if (GT_ModHandler.damageOrDechargeItem(tCurrentItem, 1, 200, aPlayer)) {
- setCoverDataAtSide(aSide, getCoverBehaviorAtSide(aSide).onCoverScrewdriverclick(aSide, getCoverIDAtSide(aSide), getCoverDataAtSide(aSide), this, aPlayer, aX, aY, aZ));
- mMetaTileEntity.onScrewdriverRightClick(aSide, aPlayer, aX, aY, aZ);
- GT_Utility.sendSoundToPlayers(worldObj, GregTech_API.sSoundList.get(100), 1.0F, -1, xCoord, yCoord, zCoord);
- }
- return true;
- }
-
- if (GT_Utility.isStackInList(tCurrentItem, GregTech_API.sHardHammerList)) {
- if (GT_ModHandler.damageOrDechargeItem(tCurrentItem, 1, 1000, aPlayer)) {
- mInputDisabled = !mInputDisabled;
- if (mInputDisabled) mOutputDisabled = !mOutputDisabled;
- GT_Utility.sendChatToPlayer(aPlayer, "Auto-Input: " + (mInputDisabled?"Disabled":"Enabled") + " Auto-Output: " + (mOutputDisabled?"Disabled":"Enabled"));
- GT_Utility.sendSoundToPlayers(worldObj, GregTech_API.sSoundList.get(1), 1.0F, -1, xCoord, yCoord, zCoord);
- }
- return true;
- }
-
- if (GT_Utility.isStackInList(tCurrentItem, GregTech_API.sSoftHammerList)) {
- if (GT_ModHandler.damageOrDechargeItem(tCurrentItem, 1, 1000, aPlayer)) {
- if (mWorks) disableWorking(); else enableWorking();
- GT_Utility.sendChatToPlayer(aPlayer, "Machine Processing: " + (isAllowedToWork()?"Enabled":"Disabled"));
- GT_Utility.sendSoundToPlayers(worldObj, GregTech_API.sSoundList.get(101), 1.0F, -1, xCoord, yCoord, zCoord);
- }
- return true;
- }
-
- if (GT_Utility.isStackInList(tCurrentItem, GregTech_API.sSolderingToolList)) {
- byte tSide = GT_Utility.determineWrenchingSide(aSide, aX, aY, aZ);
- if (GT_ModHandler.useSolderingIron(tCurrentItem, aPlayer)) {
- mStrongRedstone ^= (1 << tSide);
- GT_Utility.sendChatToPlayer(aPlayer, "Redstone Output at Side " + tSide + " set to: " + ((mStrongRedstone & (1 << tSide))!=0?"Strong":"Weak"));
- GT_Utility.sendSoundToPlayers(worldObj, GregTech_API.sSoundList.get(103), 3.0F, -1, xCoord, yCoord, zCoord);
- }
- return true;
- }
-
- if (getCoverIDAtSide(aSide) == 0) {
- if (GregTech_API.sCovers.containsKey(new GT_ItemStack(tCurrentItem))) {
- if (GregTech_API.getCoverBehavior(tCurrentItem).isCoverPlaceable(aSide, new GT_ItemStack(tCurrentItem), this) && mMetaTileEntity.allowCoverOnSide(aSide, new GT_ItemStack(tCurrentItem))) {
- setCoverItemAtSide(aSide, tCurrentItem);
- if (!aPlayer.capabilities.isCreativeMode) tCurrentItem.stackSize--;
- GT_Utility.sendSoundToPlayers(worldObj, GregTech_API.sSoundList.get(100), 1.0F, -1, xCoord, yCoord, zCoord);
- }
- return true;
- }
- } else {
- if (GT_Utility.isStackInList(tCurrentItem, GregTech_API.sCrowbarList)) {
- if (GT_ModHandler.damageOrDechargeItem(tCurrentItem, 1, 1000, aPlayer)) {
- GT_Utility.sendSoundToPlayers(worldObj, GregTech_API.sSoundList.get(0), 1.0F, -1, xCoord, yCoord, zCoord);
- dropCover(aSide, aSide, false);
- }
- return true;
- }
- }
- }
-
- if (getCoverBehaviorAtSide(aSide).onCoverRightclick(aSide, getCoverIDAtSide(aSide), getCoverDataAtSide(aSide), this, aPlayer, aX, aY, aZ)) return true;
-
- if (!getCoverBehaviorAtSide(aSide).isGUIClickable(aSide, getCoverIDAtSide(aSide), getCoverDataAtSide(aSide), this)) return false;
-
- if (isUpgradable() && aPlayer.inventory.getCurrentItem() != null) {/*
- if (ItemList.Upgrade_SteamEngine.isStackEqual(aPlayer.inventory.getCurrentItem())) {
- if (addSteamEngineUpgrade()) {
- GT_Utility.sendSoundToPlayers(worldObj, GregTech_API.sSoundList.get(3), 1.0F, -1, xCoord, yCoord, zCoord);
- if (!aPlayer.capabilities.isCreativeMode) aPlayer.inventory.getCurrentItem().stackSize--;
- }
- return true;
- }*/
- if (ItemList.Upgrade_Muffler.isStackEqual(aPlayer.inventory.getCurrentItem())) {
- if (addMufflerUpgrade()) {
- GT_Utility.sendSoundToPlayers(worldObj, GregTech_API.sSoundList.get(3), 1.0F, -1, xCoord, yCoord, zCoord);
- if (!aPlayer.capabilities.isCreativeMode) aPlayer.inventory.getCurrentItem().stackSize--;
- }
- return true;
- }
- if (ItemList.Upgrade_Lock.isStackEqual(aPlayer.inventory.getCurrentItem())) {
- if (isUpgradable() && !mLockUpgrade) {
- mLockUpgrade = true;
- setOwnerName(aPlayer.getDisplayName());
- GT_Utility.sendSoundToPlayers(worldObj, GregTech_API.sSoundList.get(3), 1.0F, -1, xCoord, yCoord, zCoord);
- if (!aPlayer.capabilities.isCreativeMode) aPlayer.inventory.getCurrentItem().stackSize--;
- }
- return true;
- }
- }
- }
- }
-
- try {
- if (hasValidMetaTileEntity()) return mMetaTileEntity.onRightclick(this, aPlayer, aSide, aX, aY, aZ);
- } catch(Throwable e) {
- GT_Log.err.println("Encountered Exception while rightclicking TileEntity, the Game should've crashed now, but I prevented that. Please report immidietly to GregTech Intergalactical!!!");
- e.printStackTrace(GT_Log.err);
- }
-
- return true;
- }
-
- @Override
- public void onLeftclick(EntityPlayer aPlayer) {
- try {
- if (aPlayer != null && hasValidMetaTileEntity()) mMetaTileEntity.onLeftclick(this, aPlayer);
- } catch(Throwable e) {
- GT_Log.err.println("Encountered Exception while leftclicking TileEntity, the Game should've crashed now, but I prevented that. Please report immidietly to GregTech Intergalactical!!!");
- e.printStackTrace(GT_Log.err);
- }
- }
-
- @Override
- public boolean isDigitalChest() {
- if (canAccessData()) return mMetaTileEntity.isDigitalChest();
- return false;
- }
-
- @Override
- public ItemStack[] getStoredItemData() {
- if (canAccessData()) return mMetaTileEntity.getStoredItemData();
- return null;
- }
-
- @Override
- public void setItemCount(int aCount) {
- if (canAccessData()) mMetaTileEntity.setItemCount(aCount);
- }
-
- @Override
- public int getMaxItemCount() {
- if (canAccessData()) return mMetaTileEntity.getMaxItemCount();
- return 0;
- }
-
- /**
- * Can put aStack into Slot
- */
- @Override
- public boolean isItemValidForSlot(int aIndex, ItemStack aStack) {
- return canAccessData() && mMetaTileEntity.isItemValidForSlot(aIndex, aStack);
- }
-
- /**
- * returns all valid Inventory Slots, no matter which Side (Unless it's covered).
- * The Side Stuff is done in the following two Functions.
- */
- @Override
- public int[] getAccessibleSlotsFromSide(int aSide) {
- if (canAccessData() && (getCoverBehaviorAtSide((byte)aSide).letsItemsOut((byte)aSide, getCoverIDAtSide((byte)aSide), getCoverDataAtSide((byte)aSide), -1, this) || getCoverBehaviorAtSide((byte)aSide).letsItemsIn((byte)aSide, getCoverIDAtSide((byte)aSide), getCoverDataAtSide((byte)aSide), -1, this))) return mMetaTileEntity.getAccessibleSlotsFromSide(aSide);
- return new int[0];
- }
-
- /**
- * Can put aStack into Slot at Side
- */
- @Override
- public boolean canInsertItem(int aIndex, ItemStack aStack, int aSide) {
- return canAccessData() && (mRunningThroughTick || !mInputDisabled ) && getCoverBehaviorAtSide((byte)aSide).letsItemsIn ((byte)aSide, getCoverIDAtSide((byte)aSide), getCoverDataAtSide((byte)aSide), aIndex, this) && mMetaTileEntity.canInsertItem(aIndex, aStack, aSide);
- }
-
- /**
- * Can pull aStack out of Slot from Side
- */
- @Override
- public boolean canExtractItem(int aIndex, ItemStack aStack, int aSide) {
- return canAccessData() && (mRunningThroughTick || !mOutputDisabled) && getCoverBehaviorAtSide((byte)aSide).letsItemsOut((byte)aSide, getCoverIDAtSide((byte)aSide), getCoverDataAtSide((byte)aSide), aIndex, this) && mMetaTileEntity.canExtractItem(aIndex, aStack, aSide);
- }
-
- @Override
- public boolean isUpgradable() {
- return canAccessData() && getUpgradeCount() < 8;
- }
-
- @Override
- public byte getInternalInputRedstoneSignal(byte aSide) {
- return (byte)(getCoverBehaviorAtSide(aSide).getRedstoneInput(aSide, getInputRedstoneSignal(aSide), getCoverIDAtSide(aSide), getCoverDataAtSide(aSide), this)&15);
- }
-
- @Override
- public byte getInputRedstoneSignal(byte aSide) {
- return (byte)(worldObj.getIndirectPowerLevelTo(getOffsetX(aSide, 1), getOffsetY(aSide, 1), getOffsetZ(aSide, 1), aSide)&15);
- }
-
- @Override
- public byte getOutputRedstoneSignal(byte aSide) {
- return getCoverBehaviorAtSide(aSide).manipulatesSidedRedstoneOutput(aSide, getCoverIDAtSide(aSide), getCoverDataAtSide(aSide), this) ? mSidedRedstone[aSide]: 0;
-// return (byte)(getCoverBehaviorAtSide(aSide).manipulatesSidedRedstoneOutput(aSide, getCoverIDAtSide(aSide), getCoverDataAtSide(aSide), this) || (mRedstone && getCoverBehaviorAtSide(aSide).letsRedstoneGoOut(aSide, getCoverIDAtSide(aSide), getCoverDataAtSide(aSide), this))?mSidedRedstone[aSide]&15:0);
- }
-
- @Override
- public void setInternalOutputRedstoneSignal(byte aSide, byte aStrength) {
- if (!getCoverBehaviorAtSide(aSide).manipulatesSidedRedstoneOutput(aSide, getCoverIDAtSide(aSide), getCoverDataAtSide(aSide), this)) setOutputRedstoneSignal(aSide, aStrength);
- }
-
- @Override
- public void setOutputRedstoneSignal(byte aSide, byte aStrength) {
- aStrength = (byte)Math.min(Math.max(0, aStrength), 15);
- if (aSide >= 0 && aSide < 6 && mSidedRedstone[aSide] != aStrength) {
- mSidedRedstone[aSide] = aStrength;
- issueBlockUpdate();
- }
- }
-
- @Override
- public boolean isSteamEngineUpgradable() {
- return isUpgradable()&&!hasSteamEngineUpgrade()&&getSteamCapacity()>0;
- }
-
- @Override
- public boolean addSteamEngineUpgrade() {
- if (isSteamEngineUpgradable()) {
- issueBlockUpdate();
- mSteamConverter = true;
- return true;
- }
- return false;
- }
-
- @Override
- public boolean hasSteamEngineUpgrade() {
- if (canAccessData() && mMetaTileEntity.isSteampowered()) return true;
- return mSteamConverter;
- }
-
- @Override
- public boolean hasMufflerUpgrade() {
- return mMuffler;
- }
-
- @Override
- public boolean isMufflerUpgradable() {
- return isUpgradable()&&!hasMufflerUpgrade();
- }
-
- @Override
- public boolean addMufflerUpgrade() {
- if (isMufflerUpgradable()) return mMuffler = true;
- return false;
- }
-
- @Override
- public boolean hasInventoryBeenModified() {
- return mInventoryChanged;
- }
-
- @Override
- public void setGenericRedstoneOutput(boolean aOnOff) {
- mRedstone = aOnOff;
- }
-
- @Override
- public int getErrorDisplayID() {
- return mDisplayErrorCode;
- }
-
- @Override
- public void setErrorDisplayID(int aErrorID) {
- mDisplayErrorCode = aErrorID;
- }
-
- @Override
- public IMetaTileEntity getMetaTileEntity() {
- return hasValidMetaTileEntity()?mMetaTileEntity:null;
- }
-
- private final GT_CoverBehavior[] mCoverBehaviors = new GT_CoverBehavior[] {GregTech_API.sNoBehavior, GregTech_API.sNoBehavior, GregTech_API.sNoBehavior, GregTech_API.sNoBehavior, GregTech_API.sNoBehavior, GregTech_API.sNoBehavior};
-
- @Override
- public GT_CoverBehavior getCoverBehaviorAtSide(byte aSide) {
- return aSide >= 0 && aSide < mCoverBehaviors.length ? mCoverBehaviors[aSide] : GregTech_API.sNoBehavior;
- }
-
- @Override
- public void setCoverIDAtSide(byte aSide, int aID) {
- if (aSide >= 0 && aSide < 6) {
- mCoverSides[aSide] = aID;
- mCoverData[aSide] = 0;
- mCoverBehaviors[aSide] = GregTech_API.getCoverBehavior(aID);
- issueCoverUpdate(aSide);
- issueBlockUpdate();
- }
- }
-
- @Override
- public void setCoverItemAtSide(byte aSide, ItemStack aCover) {
- GregTech_API.getCoverBehavior(aCover).placeCover(aSide, aCover, this);
- }
-
- @Override
- public int getCoverIDAtSide(byte aSide) {
- if (aSide >= 0 && aSide < 6) return mCoverSides[aSide]; return 0;
- }
-
- @Override
- public ItemStack getCoverItemAtSide(byte aSide) {
- return GT_Utility.intToStack(getCoverIDAtSide(aSide));
- }
-
- @Override
- public boolean canPlaceCoverIDAtSide(byte aSide, int aID) {
- return getCoverIDAtSide(aSide) == 0;
- }
-
- @Override
- public boolean canPlaceCoverItemAtSide(byte aSide, ItemStack aCover) {
- return getCoverIDAtSide(aSide) == 0;
- }
-
- @Override
- public void setCoverDataAtSide(byte aSide, int aData) {
- if (aSide >= 0 && aSide < 6) mCoverData[aSide] = aData;
- }
-
- @Override
- public int getCoverDataAtSide(byte aSide) {
- if (aSide >= 0 && aSide < 6) return mCoverData[aSide];
- return 0;
- }
-
- @Override
- public void setLightValue(byte aLightValue) {
- mLightValue = (byte)(aLightValue & 15);
- }
-
- public byte getLightValue() {
- return mLightValue;
- }
-
-
- @Override
- public long getAverageElectricInput() {
- int rEU = 0;
- for (int tEU : mAverageEUInput) rEU += tEU;
- return rEU / mAverageEUInput.length;
- }
-
- @Override
- public long getAverageElectricOutput() {
- int rEU = 0;
- for (int tEU : mAverageEUOutput) rEU += tEU;
- return rEU / mAverageEUOutput.length;
- }
-
- @Override
- public boolean dropCover(byte aSide, byte aDroppedSide, boolean aForced) {
- if (getCoverBehaviorAtSide(aSide).onCoverRemoval(aSide, getCoverIDAtSide(aSide), mCoverData[aSide], this, aForced) || aForced) {
- ItemStack tStack = getCoverBehaviorAtSide(aSide).getDrop(aSide, getCoverIDAtSide(aSide), getCoverDataAtSide(aSide), this);
- if (tStack != null) {
- tStack.setTagCompound(null);
- EntityItem tEntity = new EntityItem(worldObj, getOffsetX(aDroppedSide, 1) + 0.5, getOffsetY(aDroppedSide, 1) + 0.5, getOffsetZ(aDroppedSide, 1) + 0.5, tStack);
- tEntity.motionX = 0;
- tEntity.motionY = 0;
- tEntity.motionZ = 0;
- worldObj.spawnEntityInWorld(tEntity);
- }
- setCoverIDAtSide(aSide, 0);
- if (mMetaTileEntity.hasSidedRedstoneOutputBehavior()) {
- setOutputRedstoneSignal(aSide, (byte) 0);
- } else {
- setOutputRedstoneSignal(aSide, (byte)15);
- }
- return true;
- }
- return false;
- }
-
- @Override
- public String getOwnerName() {
- if (GT_Utility.isStringInvalid(mOwnerName)) return "Player";
- return mOwnerName;
- }
-
- @Override
- public String setOwnerName(String aName) {
- if (GT_Utility.isStringInvalid(aName)) return mOwnerName = "Player";
- return mOwnerName = aName;
- }
-
- @Override
- public byte getComparatorValue(byte aSide) {
- return canAccessData()?mMetaTileEntity.getComparatorValue(aSide):0;
- }
-
- @Override
- public byte getStrongOutputRedstoneSignal(byte aSide) {
- return aSide>=0&&aSide<6&&(mStrongRedstone & (1 << aSide))!=0?(byte)(mSidedRedstone[aSide]&15):0;
- }
-
- @Override
- public void setStrongOutputRedstoneSignal(byte aSide, byte aStrength) {
- mStrongRedstone |= (1 << aSide);
- setOutputRedstoneSignal(aSide, aStrength);
- }
-
- @Override
- public ItemStack decrStackSize(int aIndex, int aAmount) {
- if (canAccessData()) {
- mInventoryChanged = true;
- return mMetaTileEntity.decrStackSize(aIndex, aAmount);
- }
- return null;
- }
-
- @Override
- public long injectEnergyUnits(byte aSide, long aVoltage, long aAmperage) {
- if (!canAccessData() || !mMetaTileEntity.isElectric() || !inputEnergyFrom(aSide) || aAmperage <= 0 || aVoltage <= 0 || getStoredEU() >= getEUCapacity() || mMetaTileEntity.maxAmperesIn() <= mAcceptedAmperes) return 0;
- if (aVoltage > getInputVoltage()) {
- doExplosion(aVoltage);
- return 0;
- }
- if (increaseStoredEnergyUnits(aVoltage*(aAmperage=Math.min(aAmperage, Math.min(mMetaTileEntity.maxAmperesIn()-mAcceptedAmperes, 1+((getEUCapacity()-getStoredEU()) / aVoltage)))), true)) {
- mAverageEUInput[mAverageEUInputIndex] += aVoltage*aAmperage;
- mAcceptedAmperes += aAmperage;
- return aAmperage;
- }
- return 0;
- }
-
- @Override
- public boolean drainEnergyUnits(byte aSide, long aVoltage, long aAmperage) {
- if (!canAccessData() || !mMetaTileEntity.isElectric() || !outputsEnergyTo(aSide) || getStoredEU() - (aVoltage*aAmperage) < mMetaTileEntity.getMinimumStoredEU()) return false;
- if (decreaseStoredEU(aVoltage*aAmperage, false)) {
- mAverageEUOutput[mAverageEUOutputIndex] += aVoltage*aAmperage;
- return true;
- }
- return false;
- }
-
- @Override
- public boolean acceptsRotationalEnergy(byte aSide) {
- if (!canAccessData() || getCoverIDAtSide(aSide) != 0) return false;
- return mMetaTileEntity.acceptsRotationalEnergy(aSide);
- }
-
- @Override
- public boolean injectRotationalEnergy(byte aSide, long aSpeed, long aEnergy) {
- if (!canAccessData() || getCoverIDAtSide(aSide) != 0) return false;
- return mMetaTileEntity.injectRotationalEnergy(aSide, aSpeed, aEnergy);
- }
-
- @Override
- public int fill(ForgeDirection aSide, FluidStack aFluid, boolean doFill) {
- if (mTickTimer > 5 && canAccessData() && (mRunningThroughTick || !mInputDisabled ) && (aSide == ForgeDirection.UNKNOWN || (mMetaTileEntity.isLiquidInput ((byte)aSide.ordinal()) && getCoverBehaviorAtSide((byte)aSide.ordinal()).letsFluidIn ((byte)aSide.ordinal(), getCoverIDAtSide((byte)aSide.ordinal()), getCoverDataAtSide((byte)aSide.ordinal()), aFluid==null?null:aFluid.getFluid(), this)))) return mMetaTileEntity.fill(aSide, aFluid, doFill);
- return 0;
- }
-
- @Override
- public FluidStack drain(ForgeDirection aSide, int maxDrain, boolean doDrain) {
- if (mTickTimer > 5 && canAccessData() && (mRunningThroughTick || !mOutputDisabled) && (aSide == ForgeDirection.UNKNOWN || (mMetaTileEntity.isLiquidOutput((byte)aSide.ordinal()) && getCoverBehaviorAtSide((byte)aSide.ordinal()).letsFluidOut((byte)aSide.ordinal(), getCoverIDAtSide((byte)aSide.ordinal()), getCoverDataAtSide((byte)aSide.ordinal()), mMetaTileEntity.getFluid()==null?null:mMetaTileEntity.getFluid().getFluid(), this)))) return mMetaTileEntity.drain(aSide, maxDrain, doDrain);
- return null;
- }
-
- @Override
- public FluidStack drain(ForgeDirection aSide, FluidStack aFluid, boolean doDrain) {
- if (mTickTimer > 5 && canAccessData() && (mRunningThroughTick || !mOutputDisabled) && (aSide == ForgeDirection.UNKNOWN || (mMetaTileEntity.isLiquidOutput((byte)aSide.ordinal()) && getCoverBehaviorAtSide((byte)aSide.ordinal()).letsFluidOut((byte)aSide.ordinal(), getCoverIDAtSide((byte)aSide.ordinal()), getCoverDataAtSide((byte)aSide.ordinal()), aFluid==null?null:aFluid.getFluid(), this)))) return mMetaTileEntity.drain(aSide, aFluid, doDrain);
- return null;
- }
-
- @Override
- public boolean canFill(ForgeDirection aSide, Fluid aFluid) {
- if (mTickTimer > 5 && canAccessData() && (mRunningThroughTick || !mInputDisabled ) && (aSide == ForgeDirection.UNKNOWN || (mMetaTileEntity.isLiquidInput ((byte)aSide.ordinal()) && getCoverBehaviorAtSide((byte)aSide.ordinal()).letsFluidIn ((byte)aSide.ordinal(), getCoverIDAtSide((byte)aSide.ordinal()), getCoverDataAtSide((byte)aSide.ordinal()), aFluid, this)))) return mMetaTileEntity.canFill(aSide, aFluid);
- return false;
- }
-
- @Override
- public boolean canDrain(ForgeDirection aSide, Fluid aFluid) {
- if (mTickTimer > 5 && canAccessData() && (mRunningThroughTick || !mOutputDisabled) && (aSide == ForgeDirection.UNKNOWN || (mMetaTileEntity.isLiquidOutput((byte)aSide.ordinal()) && getCoverBehaviorAtSide((byte)aSide.ordinal()).letsFluidOut((byte)aSide.ordinal(), getCoverIDAtSide((byte)aSide.ordinal()), getCoverDataAtSide((byte)aSide.ordinal()), aFluid, this)))) return mMetaTileEntity.canDrain(aSide, aFluid);
- return false;
- }
-
- @Override
- public FluidTankInfo[] getTankInfo(ForgeDirection aSide) {
- if (canAccessData() && (aSide == ForgeDirection.UNKNOWN || (mMetaTileEntity.isLiquidInput((byte)aSide.ordinal()) && getCoverBehaviorAtSide((byte)aSide.ordinal()).letsFluidIn ((byte)aSide.ordinal(), getCoverIDAtSide((byte)aSide.ordinal()), getCoverDataAtSide((byte)aSide.ordinal()), null, this)) || (mMetaTileEntity.isLiquidOutput((byte)aSide.ordinal()) && getCoverBehaviorAtSide((byte)aSide.ordinal()).letsFluidOut((byte)aSide.ordinal(), getCoverIDAtSide((byte)aSide.ordinal()), getCoverDataAtSide((byte)aSide.ordinal()), null, this)))) return mMetaTileEntity.getTankInfo(aSide);
- return new FluidTankInfo[] {};
- }
-
- public double getOutputEnergyUnitsPerTick() { return oOutput;}
- public boolean isTeleporterCompatible(ForgeDirection aSide) {return canAccessData() && mMetaTileEntity.isTeleporterCompatible();}
- public double demandedEnergyUnits() {if (mReleaseEnergy || !canAccessData() || !mMetaTileEntity.isEnetInput()) return 0; return getEUCapacity() - getStoredEU();}
- public double injectEnergyUnits(ForgeDirection aDirection, double aAmount) {return injectEnergyUnits((byte)aDirection.ordinal(), (int)aAmount, 1)>0?0:aAmount;}
- public boolean acceptsEnergyFrom(TileEntity aEmitter, ForgeDirection aDirection) {return inputEnergyFrom((byte)aDirection.ordinal());}
- public boolean emitsEnergyTo(TileEntity aReceiver, ForgeDirection aDirection) {return outputsEnergyTo((byte)aDirection.ordinal());}
- public double getOfferedEnergy() {return (canAccessData() && getStoredEU() - mMetaTileEntity.getMinimumStoredEU() >= oOutput)?Math.max(0, oOutput):0;}
- public void drawEnergy(double amount) {mAverageEUOutput[mAverageEUOutputIndex] += amount; decreaseStoredEU((int)amount, true);}
- public int injectEnergy(ForgeDirection aForgeDirection, int aAmount) {return injectEnergyUnits((byte)aForgeDirection.ordinal(), aAmount, 1)>0?0:aAmount;}
-
- public int addEnergy(int aEnergy) {
- if (!canAccessData()) return 0;
- if (aEnergy > 0)
- increaseStoredEnergyUnits( aEnergy, true);
- else
- decreaseStoredEU(-aEnergy, true);
- return (int)Math.min(Integer.MAX_VALUE, mMetaTileEntity.getEUVar());
- }
-
- public boolean isAddedToEnergyNet() {return false;}
- public void setStored(int aEU) {if (canAccessData()) setStoredEU(aEU);}
- public int demandsEnergy() {if (mReleaseEnergy || !canAccessData() || !mMetaTileEntity.isEnetInput()) return 0; return getCapacity() - getStored();}
- public int getCapacity() {return (int)Math.min(Integer.MAX_VALUE, getEUCapacity());}
- public int getStored() {return (int)Math.min(Integer.MAX_VALUE, Math.min(getStoredEU(), getCapacity()));}
- public int getMaxSafeInput() {return (int)Math.min(Integer.MAX_VALUE, getInputVoltage());}
- public int getMaxEnergyOutput() {if (mReleaseEnergy) return Integer.MAX_VALUE; return getOutput();}
- public int getOutput() {return (int)Math.min(Integer.MAX_VALUE, oOutput);}
- public int injectEnergy(Direction aDirection, int aAmount) {return injectEnergyUnits((byte)aDirection.toSideValue(), aAmount, 1)>0?0:aAmount;}
- public boolean isTeleporterCompatible(Direction aSide) {return canAccessData() && mMetaTileEntity.isTeleporterCompatible();}
- public boolean acceptsEnergyFrom(TileEntity aReceiver, Direction aDirection) {return inputEnergyFrom((byte)aDirection.toSideValue());}
- public boolean emitsEnergyTo(TileEntity aReceiver, Direction aDirection) {return outputsEnergyTo((byte)aDirection.toSideValue());}
-
- @Override
- public boolean isInvalidTileEntity() {
- return isInvalid();
- }
-
- @Override
- public boolean addStackToSlot(int aIndex, ItemStack aStack) {
- if (GT_Utility.isStackInvalid(aStack)) return true;
- if (aIndex < 0 || aIndex >= getSizeInventory()) return false;
- ItemStack tStack = getStackInSlot(aIndex);
- if (GT_Utility.isStackInvalid(tStack)) {
- setInventorySlotContents(aIndex, aStack);
- return true;
- }
- aStack = GT_OreDictUnificator.get(aStack);
- if (GT_Utility.areStacksEqual(tStack, aStack) && tStack.stackSize + aStack.stackSize <= Math.min(aStack.getMaxStackSize(), getInventoryStackLimit())) {
- tStack.stackSize+=aStack.stackSize;
- return true;
- }
- return false;
- }
-
- @Override
- public boolean addStackToSlot(int aIndex, ItemStack aStack, int aAmount) {
- return addStackToSlot(aIndex, GT_Utility.copyAmount(aAmount, aStack));
- }
-
- @Override
- public void setMetaTileEntity(IMetaTileEntity aMetaTileEntity) {
- mMetaTileEntity = (MetaTileEntity)aMetaTileEntity;
- }
-
- @Override
- public byte getColorization() {
- return (byte)(mColor-1);
- }
-
- @Override
- public byte setColorization(byte aColor) {
- if (aColor > 15 || aColor < -1) aColor = -1;
- if (canAccessData()) mMetaTileEntity.onColorChangeServer(aColor);
- return mColor = (byte)(aColor+1);
- }
-
- @Override
- public float getBlastResistance(byte aSide) {
- return canAccessData()?Math.max(0, getMetaTileEntity().getExplosionResistance(aSide)):10.0F;
- }
-
- @Override
- public boolean isUniversalEnergyStored(long aEnergyAmount) {
- if (getUniversalEnergyStored() >= aEnergyAmount) return true;
- mHasEnoughEnergy = false;
- return false;
- }
-
- @Override
- public String[] getInfoData() {
- {if (canAccessData()) return getMetaTileEntity().getInfoData(); return new String[]{};}
- }
-
- @Override
- public void markDirty() {
- super.markDirty();
- mInventoryChanged = true;
- }
-
- @Override
- public int getLightOpacity() {
- return mMetaTileEntity == null ? getLightValue() > 0 ? 0 : 255 : mMetaTileEntity.getLightOpacity();
- }
-
- @Override
- public void addCollisionBoxesToList(World aWorld, int aX, int aY, int aZ, AxisAlignedBB inputAABB, List<AxisAlignedBB> outputAABB, Entity collider) {
- mMetaTileEntity.addCollisionBoxesToList(aWorld, aX, aY, aZ, inputAABB, outputAABB, collider);
- }
-
- @Override
- public AxisAlignedBB getCollisionBoundingBoxFromPool(World aWorld, int aX, int aY, int aZ) {
- return mMetaTileEntity.getCollisionBoundingBoxFromPool(aWorld, aX, aY, aZ);
- }
-
- @Override
- public void onEntityCollidedWithBlock(World aWorld, int aX, int aY, int aZ, Entity collider) {
- mMetaTileEntity.onEntityCollidedWithBlock(aWorld, aX, aY, aZ, collider);
- }
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/metatileentity/BaseMetaTileEntityUE.java b/main/java/gregtech/api/metatileentity/BaseMetaTileEntityUE.java
deleted file mode 100644
index d18ddeb204..0000000000
--- a/main/java/gregtech/api/metatileentity/BaseMetaTileEntityUE.java
+++ /dev/null
@@ -1,98 +0,0 @@
-package gregtech.api.metatileentity;
-
-
-/**
- * NEVER INCLUDE THIS FILE IN YOUR MOD!!!
- *
- * This file contains all the needed 'implements' of the Interfaces for the Universal Electricity Stuff.
- *
- * I am using the BC3 Ratio, since that is a constant in comparison to IC² Energy (1 MJ is always 2,5 EU).
- */
-public class BaseMetaTileEntityUE extends BaseMetaTileEntity /*implements IUETileEntity*/ {
- public BaseMetaTileEntityUE() {
- super();
- }
- /*
- @Override
- public void updateStatus() {
- super.updateStatus();
- }
-
- @Override
- public void chargeItem(ItemStack aStack) {
- super.chargeItem(aStack);
- float tEnergy = ElectricItemHelper.chargeItem(aStack, (float)(getOfferedEnergy() * (Compatibility.BC3_RATIO * 0.4F)));
- if (tEnergy > 0) decreaseStoredEU((int)(tEnergy / (Compatibility.BC3_RATIO * 0.4F)) + 1, true);
- }
-
- @Override
- public void dischargeItem(ItemStack aStack) {
- super.dischargeItem(aStack);
- float tEnergy = ElectricItemHelper.dischargeItem(aStack, (float)(demandedEnergyUnits() * (Compatibility.BC3_RATIO * 0.4F)));
- if (tEnergy > 0) increaseStoredEnergyUnits((int)(tEnergy / (Compatibility.BC3_RATIO * 0.4F)), true);
- }
-
- @Override
- public float receiveElectricity(ForgeDirection aSide, ElectricityPack aPacket, boolean doReceive) {
- if (!getUEConsumingSides().contains(aSide)) return 0;
- int aInserted = (int)(aPacket.getWatts()/(Compatibility.BC3_RATIO * 0.4F));
- if (doReceive) return injectEnergyUnits((byte)aSide.ordinal(), aInserted, 1) ? aInserted : 0;
- return getEUCapacity() - getStoredEU() >= aInserted ? aInserted : 0;
- }
-
- @Override
- public ElectricityPack provideElectricity(ForgeDirection aSide, ElectricityPack aRequested, boolean doProvide) {
- if (!getUEProducingSides().contains(aSide)) return null;
- int aExtracted = (int)getOfferedEnergy();
- if (doProvide) return aRequested.getWatts()/(Compatibility.BC3_RATIO * 0.4F) >= getOfferedEnergy() ? decreaseStoredEU(aExtracted, false) ? new ElectricityPack(aExtracted * (Compatibility.BC3_RATIO * 0.4F), 1) : null : decreaseStoredEU((int)(aRequested.getWatts()/(Compatibility.BC3_RATIO * 0.4F)), false) ? new ElectricityPack((int)(aRequested.getWatts()/(Compatibility.BC3_RATIO * 0.4F)) * (Compatibility.BC3_RATIO * 0.4F), 1) : null;
- return aRequested.getWatts()/(Compatibility.BC3_RATIO * 0.4F) >= getOfferedEnergy() ? new ElectricityPack(aExtracted * (Compatibility.BC3_RATIO * 0.4F), 1) : new ElectricityPack((int)(aRequested.getWatts()/(Compatibility.BC3_RATIO * 0.4F)) * (Compatibility.BC3_RATIO * 0.4F), 1);
- }
-
- @Override
- public float getRequest(ForgeDirection aSide) {
- if (!getUEConsumingSides().contains(aSide)) return 0;
- return (float)(demandedEnergyUnits() * (Compatibility.BC3_RATIO * 0.4F));
- }
-
- @Override
- public float getProvide(ForgeDirection aSide) {
- if (!getUEProducingSides().contains(aSide)) return 0;
- return (float)(getOfferedEnergy() * (Compatibility.BC3_RATIO * 0.4F));
- }
-
- @Override
- public float getVoltage() {
- return (float)(getOfferedEnergy() * (Compatibility.BC3_RATIO * 0.4F));
- }
-
- @Override
- public boolean canConnect(ForgeDirection aSide) {
- return getUEProducingSides().contains(aSide) || getUEConsumingSides().contains(aSide);
- }
-
- private EnumSet<ForgeDirection> getUEConsumingSides() {
- EnumSet<ForgeDirection> rSides = EnumSet.noneOf(ForgeDirection.class);
- for (byte i = 0; i < 6; i++) {
- if (inputEnergyFrom(i)) {
- Object tTileEntity = getTileEntityAtSide(i);
- if (tTileEntity != null && tTileEntity instanceof IConductor) {
- rSides.add(ForgeDirection.getOrientation(i));
- }
- }
- }
- return rSides;
- }
-
- private EnumSet<ForgeDirection> getUEProducingSides() {
- EnumSet<ForgeDirection> rSides = EnumSet.noneOf(ForgeDirection.class);
- for (byte i = 0; i < 6; i++) {
- if (outputsEnergyTo(i)) {
- Object tTileEntity = getTileEntityAtSide(i);
- if (tTileEntity != null && tTileEntity instanceof IConductor) {
- rSides.add(ForgeDirection.getOrientation(i));
- }
- }
- }
- return rSides;
- }*/
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/metatileentity/BaseTileEntity.java b/main/java/gregtech/api/metatileentity/BaseTileEntity.java
deleted file mode 100644
index d8a798d19e..0000000000
--- a/main/java/gregtech/api/metatileentity/BaseTileEntity.java
+++ /dev/null
@@ -1,227 +0,0 @@
-package gregtech.api.metatileentity;
-
-import static gregtech.api.enums.GT_Values.GT;
-import static gregtech.api.enums.GT_Values.NW;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.interfaces.tileentity.IHasWorldObjectAndCoords;
-import gregtech.api.net.GT_Packet_Block_Event;
-import gregtech.api.util.GT_Utility;
-import net.minecraft.block.Block;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Blocks;
-import net.minecraft.inventory.IInventory;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.world.World;
-import net.minecraft.world.biome.BiomeGenBase;
-import net.minecraftforge.common.util.ForgeDirection;
-import net.minecraftforge.fluids.IFluidHandler;
-
-/**
- * The Functions my old TileEntities and my BaseMetaTileEntities have in common.
- *
- * Basically everything a TileEntity should have.
- */
-public abstract class BaseTileEntity extends TileEntity implements IHasWorldObjectAndCoords {
- /**
- * If this TileEntity checks for the Chunk to be loaded before returning World based values.
- * The AdvPump hacks this to false to ensure everything runs properly even when far Chunks are not actively loaded.
- * But anything else should not cause worfin' Chunks, uhh I mean orphan Chunks.
- */
- public boolean ignoreUnloadedChunks = true;
-
- /**
- * This Variable checks if this TileEntity is dead, because Minecraft is too stupid to have proper TileEntity unloading.
- */
- public boolean isDead = false;
-
- /**
- * Buffers adjacent TileEntities for faster access
- *
- * "this" means that there is no TileEntity, while "null" means that it doesn't know if there is even a TileEntity and still needs to check that if needed.
- */
- private final TileEntity[] mBufferedTileEntities = new TileEntity[6];
-
- private final void clearNullMarkersFromTileEntityBuffer() {
- for (int i = 0; i < mBufferedTileEntities.length; i++) if (mBufferedTileEntities[i] == this) mBufferedTileEntities[i] = null;
- }
-
- /**
- * Called automatically when the Coordinates of this TileEntity have been changed
- */
- protected final void clearTileEntityBuffer() {
- for (int i = 0; i < mBufferedTileEntities.length; i++) mBufferedTileEntities[i] = null;
- }
-
- @Override public final World getWorld () {return worldObj;}
- @Override public final int getXCoord() {return xCoord;}
- @Override public final short getYCoord() {return (short)yCoord;}
- @Override public final int getZCoord() {return zCoord;}
- @Override public final int getOffsetX(byte aSide, int aMultiplier) {return xCoord + ForgeDirection.getOrientation(aSide).offsetX * aMultiplier ;}
- @Override public final short getOffsetY(byte aSide, int aMultiplier) {return (short)(yCoord + ForgeDirection.getOrientation(aSide).offsetY * aMultiplier);}
- @Override public final int getOffsetZ(byte aSide, int aMultiplier) {return zCoord + ForgeDirection.getOrientation(aSide).offsetZ * aMultiplier ;}
- @Override public final boolean isServerSide() {return !worldObj.isRemote;}
- @Override public final boolean isClientSide() {return worldObj.isRemote;}
- @Override public final boolean openGUI(EntityPlayer aPlayer) {return openGUI(aPlayer, 0);}
- @Override public final boolean openGUI(EntityPlayer aPlayer, int aID) {if (aPlayer == null) return false; aPlayer.openGui(GT, aID, worldObj, xCoord, yCoord, zCoord); return true;}
- @Override public final int getRandomNumber(int aRange) {return worldObj.rand.nextInt(aRange);}
- @Override public final BiomeGenBase getBiome(int aX, int aZ) {return worldObj.getBiomeGenForCoords(aX, aZ);}
- @Override public final BiomeGenBase getBiome() {return getBiome(xCoord, zCoord);}
- @Override public final Block getBlockOffset(int aX, int aY, int aZ) {return getBlock(xCoord+aX, yCoord+aY, zCoord+aZ);}
- @Override public final Block getBlockAtSide(byte aSide) {return getBlockAtSideAndDistance(aSide, 1);}
- @Override public final Block getBlockAtSideAndDistance(byte aSide, int aDistance) {return getBlock(getOffsetX(aSide, aDistance), getOffsetY(aSide, aDistance), getOffsetZ(aSide, aDistance));}
- @Override public final byte getMetaIDOffset(int aX, int aY, int aZ) {return getMetaID(xCoord+aX, yCoord+aY, zCoord+aZ);}
- @Override public final byte getMetaIDAtSide(byte aSide) {return getMetaIDAtSideAndDistance(aSide, 1);}
- @Override public final byte getMetaIDAtSideAndDistance(byte aSide, int aDistance) {return getMetaID(getOffsetX(aSide, aDistance), getOffsetY(aSide, aDistance), getOffsetZ(aSide, aDistance));}
- @Override public final byte getLightLevelOffset(int aX, int aY, int aZ) {return getLightLevel(xCoord+aX, yCoord+aY, zCoord+aZ);}
- @Override public final byte getLightLevelAtSide(byte aSide) {return getLightLevelAtSideAndDistance(aSide, 1);}
- @Override public final byte getLightLevelAtSideAndDistance(byte aSide, int aDistance) {return getLightLevel(getOffsetX(aSide, aDistance), getOffsetY(aSide, aDistance), getOffsetZ(aSide, aDistance));}
- @Override public final boolean getOpacityOffset(int aX, int aY, int aZ) {return getOpacity(xCoord+aX, yCoord+aY, zCoord+aZ);}
- @Override public final boolean getOpacityAtSide(byte aSide) {return getOpacityAtSideAndDistance(aSide, 1);}
- @Override public final boolean getOpacityAtSideAndDistance(byte aSide, int aDistance) {return getOpacity(getOffsetX(aSide, aDistance), getOffsetY(aSide, aDistance), getOffsetZ(aSide, aDistance));}
- @Override public final boolean getSkyOffset(int aX, int aY, int aZ) {return getSky(xCoord+aX, yCoord+aY, zCoord+aZ);}
- @Override public final boolean getSkyAtSide(byte aSide) {return getSkyAtSideAndDistance(aSide, 1);}
- @Override public final boolean getSkyAtSideAndDistance(byte aSide, int aDistance) {return getSky(getOffsetX(aSide, aDistance), getOffsetY(aSide, aDistance), getOffsetZ(aSide, aDistance));}
- @Override public final boolean getAirOffset(int aX, int aY, int aZ) {return getAir(xCoord+aX, yCoord+aY, zCoord+aZ);}
- @Override public final boolean getAirAtSide(byte aSide) {return getAirAtSideAndDistance(aSide, 1);}
- @Override public final boolean getAirAtSideAndDistance(byte aSide, int aDistance) {return getAir(getOffsetX(aSide, aDistance), getOffsetY(aSide, aDistance), getOffsetZ(aSide, aDistance));}
- @Override public final TileEntity getTileEntityOffset(int aX, int aY, int aZ) {return getTileEntity(xCoord+aX, yCoord+aY, zCoord+aZ);}
- @Override public final TileEntity getTileEntityAtSideAndDistance(byte aSide, int aDistance) {if (aDistance == 1) return getTileEntityAtSide(aSide); return getTileEntity(getOffsetX(aSide, aDistance), getOffsetY(aSide, aDistance), getOffsetZ(aSide, aDistance));}
- @Override public final IInventory getIInventory(int aX, int aY, int aZ) {TileEntity tTileEntity = getTileEntity(aX, aY, aZ); if (tTileEntity instanceof IInventory) return (IInventory)tTileEntity; return null;}
- @Override public final IInventory getIInventoryOffset(int aX, int aY, int aZ) {TileEntity tTileEntity = getTileEntityOffset(aX, aY, aZ); if (tTileEntity instanceof IInventory) return (IInventory)tTileEntity; return null;}
- @Override public final IInventory getIInventoryAtSide(byte aSide) {TileEntity tTileEntity = getTileEntityAtSide(aSide); if (tTileEntity instanceof IInventory) return (IInventory)tTileEntity; return null;}
- @Override public final IInventory getIInventoryAtSideAndDistance(byte aSide, int aDistance) {TileEntity tTileEntity = getTileEntityAtSideAndDistance(aSide, aDistance); if (tTileEntity instanceof IInventory) return (IInventory)tTileEntity; return null;}
- @Override public final IFluidHandler getITankContainer(int aX, int aY, int aZ) {TileEntity tTileEntity = getTileEntity(aX, aY, aZ); if (tTileEntity instanceof IFluidHandler) return (IFluidHandler)tTileEntity; return null;}
- @Override public final IFluidHandler getITankContainerOffset(int aX, int aY, int aZ) {TileEntity tTileEntity = getTileEntityOffset(aX, aY, aZ); if (tTileEntity instanceof IFluidHandler) return (IFluidHandler)tTileEntity; return null;}
- @Override public final IFluidHandler getITankContainerAtSide(byte aSide) {TileEntity tTileEntity = getTileEntityAtSide(aSide); if (tTileEntity instanceof IFluidHandler) return (IFluidHandler)tTileEntity; return null;}
- @Override public final IFluidHandler getITankContainerAtSideAndDistance(byte aSide, int aDistance) {TileEntity tTileEntity = getTileEntityAtSideAndDistance(aSide, aDistance); if (tTileEntity instanceof IFluidHandler) return (IFluidHandler)tTileEntity; return null;}
- @Override public final IGregTechTileEntity getIGregTechTileEntity(int aX, int aY, int aZ) {TileEntity tTileEntity = getTileEntity(aX, aY, aZ); if (tTileEntity instanceof IGregTechTileEntity) return (IGregTechTileEntity)tTileEntity; return null;}
- @Override public final IGregTechTileEntity getIGregTechTileEntityOffset(int aX, int aY, int aZ) {TileEntity tTileEntity = getTileEntityOffset(aX, aY, aZ); if (tTileEntity instanceof IGregTechTileEntity) return (IGregTechTileEntity)tTileEntity; return null;}
- @Override public final IGregTechTileEntity getIGregTechTileEntityAtSide(byte aSide) {TileEntity tTileEntity = getTileEntityAtSide(aSide); if (tTileEntity instanceof IGregTechTileEntity) return (IGregTechTileEntity)tTileEntity; return null;}
- @Override public final IGregTechTileEntity getIGregTechTileEntityAtSideAndDistance(byte aSide, int aDistance) {TileEntity tTileEntity = getTileEntityAtSideAndDistance(aSide, aDistance); if (tTileEntity instanceof IGregTechTileEntity) return (IGregTechTileEntity)tTileEntity; return null;}
-
- @Override
- public final Block getBlock(int aX, int aY, int aZ) {
- if (ignoreUnloadedChunks && crossedChunkBorder(aX, aZ) && !worldObj.blockExists(aX, aY, aZ)) return Blocks.air;
- return worldObj.getBlock(aX, aY, aZ);
- }
-
- @Override
- public final byte getMetaID(int aX, int aY, int aZ) {
- if (ignoreUnloadedChunks && crossedChunkBorder(aX, aZ) && !worldObj.blockExists(aX, aY, aZ)) return 0;
- return (byte)worldObj.getBlockMetadata(aX, aY, aZ);
- }
-
- @Override
- public final byte getLightLevel(int aX, int aY, int aZ) {
- if (ignoreUnloadedChunks && crossedChunkBorder(aX, aZ) && !worldObj.blockExists(aX, aY, aZ)) return 0;
- return (byte)(worldObj.getLightBrightness(aX, aY, aZ)*15);
- }
-
- @Override
- public final boolean getSky(int aX, int aY, int aZ) {
- if (ignoreUnloadedChunks && crossedChunkBorder(aX, aZ) && !worldObj.blockExists(aX, aY, aZ)) return true;
- return worldObj.canBlockSeeTheSky(aX, aY, aZ);
- }
-
- @Override
- public final boolean getOpacity(int aX, int aY, int aZ) {
- if (ignoreUnloadedChunks && crossedChunkBorder(aX, aZ) && !worldObj.blockExists(aX, aY, aZ)) return false;
- return GT_Utility.isOpaqueBlock(worldObj, aX, aY, aZ);
- }
-
- @Override
- public final boolean getAir(int aX, int aY, int aZ) {
- if (ignoreUnloadedChunks && crossedChunkBorder(aX, aZ) && !worldObj.blockExists(aX, aY, aZ)) return true;
- return GT_Utility.isBlockAir(worldObj, aX, aY, aZ);
- }
-
- @Override
- public final TileEntity getTileEntity(int aX, int aY, int aZ) {
- if (ignoreUnloadedChunks && crossedChunkBorder(aX, aZ) && !worldObj.blockExists(aX, aY, aZ)) return null;
- return worldObj.getTileEntity(aX, aY, aZ);
- }
-
- @Override
- public final TileEntity getTileEntityAtSide(byte aSide) {
- if (aSide < 0 || aSide >= 6 || mBufferedTileEntities[aSide] == this) return null;
- int tX = getOffsetX(aSide, 1), tY = getOffsetY(aSide, 1), tZ = getOffsetZ(aSide, 1);
- if (crossedChunkBorder(tX, tZ)) {
- mBufferedTileEntities[aSide] = null;
- if (ignoreUnloadedChunks && !worldObj.blockExists(tX, tY, tZ)) return null;
- }
- if (mBufferedTileEntities[aSide] == null) {
- mBufferedTileEntities[aSide] = worldObj.getTileEntity(tX, tY, tZ);
- if (mBufferedTileEntities[aSide] == null) {
- mBufferedTileEntities[aSide] = this;
- return null;
- }
- return mBufferedTileEntities[aSide];
- }
- if (mBufferedTileEntities[aSide].isInvalid()) {
- mBufferedTileEntities[aSide] = null;
- return getTileEntityAtSide(aSide);
- }
- if (mBufferedTileEntities[aSide].xCoord == tX && mBufferedTileEntities[aSide].yCoord == tY && mBufferedTileEntities[aSide].zCoord == tZ) {
- return mBufferedTileEntities[aSide];
- }
- return null;
- }
-
- @Override
- public void writeToNBT(NBTTagCompound aNBT) {
- super.writeToNBT(aNBT);
- //isDead = true;
- }
-
- @Override
- public boolean isDead() {
- return isDead || isInvalidTileEntity();
- }
-
- @Override
- public void validate() {
- clearNullMarkersFromTileEntityBuffer();
- super.validate();
- }
-
- @Override
- public void invalidate() {
- clearNullMarkersFromTileEntityBuffer();
- super.invalidate();
- }
-
- @Override
- public void onChunkUnload() {
- clearNullMarkersFromTileEntityBuffer();
- super.onChunkUnload();
- isDead = true;
- }
-
- @Override
- public void updateEntity() {
- // Well if the TileEntity gets ticked it is alive.
- isDead = false;
- }
-
- public final void onAdjacentBlockChange(int aX, int aY, int aZ) {
- clearNullMarkersFromTileEntityBuffer();
- }
-
- @Override
- public final void sendBlockEvent(byte aID, byte aValue) {
- NW.sendPacketToAllPlayersInRange(worldObj, new GT_Packet_Block_Event(xCoord, (short)yCoord, zCoord, aID, aValue), xCoord, zCoord);
- }
-
- private boolean crossedChunkBorder(int aX, int aZ) {
- return aX >> 4 != xCoord >> 4 || aZ >> 4 != zCoord >> 4;
- }
-
- public final void setOnFire() {
- GT_Utility.setCoordsOnFire(worldObj, xCoord, yCoord, zCoord, false);
- }
-
- public final void setToFire() {
- worldObj.setBlock(xCoord, yCoord, zCoord, Blocks.fire);
- }
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/metatileentity/MetaPipeEntity.java b/main/java/gregtech/api/metatileentity/MetaPipeEntity.java
deleted file mode 100644
index d82a23b6d7..0000000000
--- a/main/java/gregtech/api/metatileentity/MetaPipeEntity.java
+++ /dev/null
@@ -1,534 +0,0 @@
-package gregtech.api.metatileentity;
-
-import static gregtech.api.enums.GT_Values.GT;
-import static gregtech.api.enums.GT_Values.V;
-import gregtech.api.GregTech_API;
-import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.objects.GT_ItemStack;
-import gregtech.api.util.GT_Config;
-import gregtech.api.util.GT_LanguageManager;
-import gregtech.api.util.GT_Utility;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
-
-import net.minecraft.block.Block;
-import net.minecraft.client.renderer.RenderBlocks;
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.init.Blocks;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.util.AxisAlignedBB;
-import net.minecraft.world.IBlockAccess;
-import net.minecraft.world.World;
-import net.minecraftforge.common.util.ForgeDirection;
-import net.minecraftforge.fluids.Fluid;
-import net.minecraftforge.fluids.FluidStack;
-import net.minecraftforge.fluids.FluidTankInfo;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-
-/**
- * NEVER INCLUDE THIS FILE IN YOUR MOD!!!
- *
- * Extend this Class to add a new MetaPipe
- * Call the Constructor with the desired ID at the load-phase (not preload and also not postload!)
- * Implement the newMetaEntity-Method to return a new ready instance of your MetaTileEntity
- *
- * Call the Constructor like the following example inside the Load Phase, to register it.
- * "new GT_MetaTileEntity_E_Furnace(54, "GT_E_Furnace", "Automatic E-Furnace");"
- */
-public abstract class MetaPipeEntity implements IMetaTileEntity {
- /**
- * This variable tells, which directions the Block is connected to. It is a Bitmask.
- */
- public byte mConnections = 0;
-
- /**
- * For Pipe Rendering
- */
- public abstract float getThickNess();
-
- /**
- * For Pipe Rendering
- */
- public abstract boolean renderInside(byte aSide);
-
- /**
- * Only assigned for the MetaTileEntity in the List! Also only used to get the localized Name for the ItemStack and for getInvName.
- */
- public String mName;
-
- public boolean doTickProfilingInThisTick = true;
-
- /**
- * accessibility to this Field is no longer given, see below
- */
- private IGregTechTileEntity mBaseMetaTileEntity;
-
- @Override
- public IGregTechTileEntity getBaseMetaTileEntity() {
- return mBaseMetaTileEntity;
- }
-
- @Override
- public ItemStack getStackForm(long aAmount) {
- return new ItemStack(GregTech_API.sBlockMachines, (int)aAmount, getBaseMetaTileEntity().getMetaTileID());
- }
-
- /**
- * The Inventory of the MetaTileEntity. Amount of Slots can be larger than 256. HAYO!
- */
- public final ItemStack[] mInventory;
-
- /**
- * This registers your Machine at the List.
- * Use only ID's larger than 2048, because i reserved these ones.
- * See also the List in the API, as it has a Description containing all the reservations.
- * @param aID the ID
- * @example for Constructor overload.
- *
- * public GT_MetaTileEntity_EBench(int aID, String mName, String mNameRegional) {
- * super(aID, mName, mNameRegional);
- * }
- */
- public MetaPipeEntity(int aID, String aBasicName, String aRegionalName, int aInvSlotCount) {
- if (GregTech_API.sPostloadStarted || !GregTech_API.sPreloadStarted) throw new IllegalAccessError("This Constructor has to be called in the load Phase");
- if (GregTech_API.METATILEENTITIES[aID] == null) {
- GregTech_API.METATILEENTITIES[aID] = this;
- } else {
- throw new IllegalArgumentException("MetaMachine-Slot Nr. " + aID + " is already occupied!");
- }
- mName = aBasicName.replaceAll(" ", "_").toLowerCase();
- setBaseMetaTileEntity(new BaseMetaPipeEntity());
- getBaseMetaTileEntity().setMetaTileID((short)aID);
- GT_LanguageManager.addStringLocalization("gt.blockmachines." + mName + ".name", aRegionalName);
- mInventory = new ItemStack[aInvSlotCount];
-
- if (GT.isClientSide()) {
- ItemStack tStack = new ItemStack(GregTech_API.sBlockMachines, 1, aID);
- tStack.getItem().addInformation(tStack, null, new ArrayList<String>(), true);
- }
- }
-
- @Override
- public void setBaseMetaTileEntity(IGregTechTileEntity aBaseMetaTileEntity) {
- if (mBaseMetaTileEntity != null && aBaseMetaTileEntity == null) {
- mBaseMetaTileEntity.getMetaTileEntity().inValidate();
- mBaseMetaTileEntity.setMetaTileEntity(null);
- }
- mBaseMetaTileEntity = aBaseMetaTileEntity;
- if (mBaseMetaTileEntity != null) {
- mBaseMetaTileEntity.setMetaTileEntity(this);
- }
- }
-
- /**
- * This is the normal Constructor.
- */
- public MetaPipeEntity(String aName, int aInvSlotCount) {
- mInventory = new ItemStack[aInvSlotCount];
- mName = aName;
- }
-
- @Override
- public void onServerStart() {/*Do nothing*/}
- @Override
- public void onWorldSave(File aSaveDirectory) {/*Do nothing*/}
- @Override
- public void onWorldLoad(File aSaveDirectory) {/*Do nothing*/}
- @Override
- public void onConfigLoad(GT_Config aConfig) {/*Do nothing*/}
- @Override
- public void setItemNBT(NBTTagCompound aNBT) {/*Do nothing*/}
-
- @Override
- @SideOnly(Side.CLIENT)
- public void registerIcons(IIconRegister aBlockIconRegister) {/*Do nothing*/}
-
- @Override
- public boolean allowCoverOnSide(byte aSide, GT_ItemStack aCoverID) {return true;}
- @Override
- public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) {/*Do nothing*/}
- @Override
- public boolean onWrenchRightClick(byte aSide, byte aWrenchingSide, EntityPlayer aPlayer, float aX, float aY, float aZ) {return false;}
- @Override
- public void onExplosion() {/*Do nothing*/}
- @Override
- public void onFirstTick(IGregTechTileEntity aBaseMetaTileEntity) {/*Do nothing*/}
- @Override
- public void onPreTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {/*Do nothing*/}
- @Override
- public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {/*Do nothing*/}
- @Override
- public void inValidate() {/*Do nothing*/}
- @Override
- public void onRemoval() {/*Do nothing*/}
- @Override
- public void initDefaultModes(NBTTagCompound aNBT) {/*Do nothing*/}
-
- /**
- * When a GUI is opened
- */
- public void onOpenGUI() {/*Do nothing*/}
-
- /**
- * When a GUI is closed
- */
- public void onCloseGUI() {/*Do nothing*/}
-
- /**
- * a Player rightclicks the Machine
- * Sneaky rightclicks are not getting passed to this!
- */
- @Override
- public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer, byte aSide, float aX, float aY, float aZ) {return false;}
- @Override
- public void onLeftclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) {/*Do nothing*/}
- @Override
- public void onValueUpdate(byte aValue) {/*Do nothing*/}
- @Override
- public byte getUpdateData() {return 0;}
-
- @Override
- public void doSound(byte aIndex, double aX, double aY, double aZ) {/*Do nothing*/}
- @Override
- public void startSoundLoop(byte aIndex, double aX, double aY, double aZ) {/*Do nothing*/}
- @Override
- public void stopSoundLoop(byte aValue, double aX, double aY, double aZ) {/*Do nothing*/}
-
- @Override
- public final void sendSound(byte aIndex) {if (!getBaseMetaTileEntity().hasMufflerUpgrade()) getBaseMetaTileEntity().sendBlockEvent((byte)4, aIndex);}
- @Override
- public final void sendLoopStart(byte aIndex) {if (!getBaseMetaTileEntity().hasMufflerUpgrade()) getBaseMetaTileEntity().sendBlockEvent((byte)5, aIndex);}
- @Override
- public final void sendLoopEnd(byte aIndex) {if (!getBaseMetaTileEntity().hasMufflerUpgrade()) getBaseMetaTileEntity().sendBlockEvent((byte)6, aIndex);}
-
- @Override
- public boolean isFacingValid(byte aFacing) {return false;}
- @Override
- public boolean isAccessAllowed(EntityPlayer aPlayer) {return true;}
- @Override
- public boolean isValidSlot(int aIndex) {return true;}
- @Override
- public boolean setStackToZeroInsteadOfNull(int aIndex) {return false;}
-
- @Override
- public ArrayList<String> getSpecialDebugInfo(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer, int aLogLevel, ArrayList<String> aList) {
- return aList;
- }
-
- @Override
- public boolean isLiquidInput(byte aSide) {
- return true;
- }
-
- @Override
- public boolean isLiquidOutput(byte aSide) {
- return true;
- }
-
- /**
- * gets the contained Liquid
- */
- @Override
- public FluidStack getFluid() {return null;}
-
- /**
- * tries to fill this Tank
- */
- @Override
- public int fill(FluidStack resource, boolean doFill) {return 0;}
-
- /**
- * tries to empty this Tank
- */
- @Override
- public FluidStack drain(int maxDrain, boolean doDrain) {return null;}
-
- /**
- * Tank pressure
- */
- public int getTankPressure() {return 0;}
-
- /**
- * Liquid Capacity
- */
- @Override
- public int getCapacity() {return 0;}
-
- /**
- * Progress this machine has already made
- */
- public int getProgresstime() {return 0;}
-
- /**
- * Progress this Machine has to do to produce something
- */
- public int maxProgresstime() {return 0;}
-
- /**
- * Increases the Progress, returns the overflown Progress.
- */
- public int increaseProgress(int aProgress) {return 0;}
-
- @Override
- public void onMachineBlockUpdate() {/*Do nothing*/}
- @Override
- public void receiveClientEvent(byte aEventID, byte aValue) {/*Do nothing*/}
- @Override
- public boolean isSimpleMachine() {return false;}
-
- @Override
- public byte getComparatorValue(byte aSide) {
- return 0;
- }
-
- @Override
- public boolean acceptsRotationalEnergy(byte aSide) {
- return false;
- }
-
- @Override
- public boolean injectRotationalEnergy(byte aSide, long aSpeed, long aEnergy) {
- return false;
- }
-
- @Override
- public String getSpecialVoltageToolTip() {return null;}
-
- @Override
- public boolean isGivingInformation() {return false;}
- @Override
- public String[] getInfoData() {return new String[]{};}
-
- public boolean isDigitalChest() {return false;}
- public ItemStack[] getStoredItemData() {return null;}
- public void setItemCount(int aCount) {/*Do nothing*/}
- public int getMaxItemCount() {return 0;}
-
- @Override
- public int getSizeInventory() {return mInventory.length;}
- @Override
- public ItemStack getStackInSlot(int aIndex) {if (aIndex >= 0 && aIndex < mInventory.length) return mInventory[aIndex]; return null;}
- @Override
- public void setInventorySlotContents(int aIndex, ItemStack aStack) {if (aIndex >= 0 && aIndex < mInventory.length) mInventory[aIndex] = aStack;}
- @Override
- public String getInventoryName() {if (GregTech_API.METATILEENTITIES[getBaseMetaTileEntity().getMetaTileID()] != null) return GregTech_API.METATILEENTITIES[getBaseMetaTileEntity().getMetaTileID()].getMetaName(); return "";}
- @Override
- public int getInventoryStackLimit() {return 64;}
- @Override
- public boolean isItemValidForSlot(int aIndex, ItemStack aStack) {return getBaseMetaTileEntity().isValidSlot(aIndex);}
-
- @Override
- public ItemStack decrStackSize(int aIndex, int aAmount) {
- ItemStack tStack = getStackInSlot(aIndex), rStack = GT_Utility.copy(tStack);
- if (tStack != null) {
- if (tStack.stackSize <= aAmount) {
- if (setStackToZeroInsteadOfNull(aIndex)) tStack.stackSize = 0; else setInventorySlotContents(aIndex, null);
- } else {
- rStack = tStack.splitStack(aAmount);
- if (tStack.stackSize == 0 && !setStackToZeroInsteadOfNull(aIndex)) setInventorySlotContents(aIndex, null);
- }
- }
- return rStack;
- }
-
- @Override
- public int[] getAccessibleSlotsFromSide(int aSide) {
- ArrayList<Integer> tList = new ArrayList<Integer>();
- IGregTechTileEntity tTileEntity = getBaseMetaTileEntity();
- boolean tSkip = tTileEntity.getCoverBehaviorAtSide((byte)aSide).letsItemsIn((byte)aSide, tTileEntity.getCoverIDAtSide((byte)aSide), tTileEntity.getCoverDataAtSide((byte)aSide), -2, tTileEntity) || tTileEntity.getCoverBehaviorAtSide((byte)aSide).letsItemsOut((byte)aSide, tTileEntity.getCoverIDAtSide((byte)aSide), tTileEntity.getCoverDataAtSide((byte)aSide), -2, tTileEntity);
- for (int i = 0; i < getSizeInventory(); i++) if (isValidSlot(i) && (tSkip || tTileEntity.getCoverBehaviorAtSide((byte)aSide).letsItemsOut((byte)aSide, tTileEntity.getCoverIDAtSide((byte)aSide), tTileEntity.getCoverDataAtSide((byte)aSide), i, tTileEntity) || tTileEntity.getCoverBehaviorAtSide((byte)aSide).letsItemsIn((byte)aSide, tTileEntity.getCoverIDAtSide((byte)aSide), tTileEntity.getCoverDataAtSide((byte)aSide), i, tTileEntity))) tList.add(i);
- int[] rArray = new int[tList.size()];
- for (int i = 0; i < rArray.length; i++) rArray[i] = tList.get(i);
- return rArray;
- }
-
- @Override
- public boolean canInsertItem(int aIndex, ItemStack aStack, int aSide) {
- return isValidSlot(aIndex) && aStack != null && aIndex < mInventory.length && (mInventory[aIndex] == null || GT_Utility.areStacksEqual(aStack, mInventory[aIndex])) && allowPutStack(getBaseMetaTileEntity(), aIndex, (byte)aSide, aStack);
- }
-
- @Override
- public boolean canExtractItem(int aIndex, ItemStack aStack, int aSide) {
- return isValidSlot(aIndex) && aStack != null && aIndex < mInventory.length && allowPullStack(getBaseMetaTileEntity(), aIndex, (byte)aSide, aStack);
- }
-
- @Override
- public boolean canFill(ForgeDirection aSide, Fluid aFluid) {
- return fill(aSide, new FluidStack(aFluid, 1), false) == 1;
- }
-
- @Override
- public boolean canDrain(ForgeDirection aSide, Fluid aFluid) {
- return drain(aSide, new FluidStack(aFluid, 1), false) != null;
- }
-
- @Override
- public FluidTankInfo[] getTankInfo(ForgeDirection aSide) {
- if (getCapacity() <= 0 && !getBaseMetaTileEntity().hasSteamEngineUpgrade()) return new FluidTankInfo[] {};
- return new FluidTankInfo[] {getInfo()};
- }
-
- public int fill_default(ForgeDirection aSide, FluidStack aFluid, boolean doFill) {
- return fill(aFluid, doFill);
- }
-
- @Override
- public int fill(ForgeDirection aSide, FluidStack aFluid, boolean doFill) {
- return fill_default(aSide, aFluid, doFill);
- }
-
- @Override
- public FluidStack drain(ForgeDirection aSide, FluidStack aFluid, boolean doDrain) {
- if (getFluid() != null && aFluid != null && getFluid().isFluidEqual(aFluid)) return drain(aFluid.amount, doDrain);
- return null;
- }
-
- @Override
- public FluidStack drain(ForgeDirection aSide, int maxDrain, boolean doDrain) {
- return drain(maxDrain, doDrain);
- }
-
- @Override
- public int getFluidAmount() {
- return 0;
- }
-
- @Override
- public FluidTankInfo getInfo() {
- return new FluidTankInfo(this);
- }
-
- @Override
- public String getMetaName() {
- return mName;
- }
-
- @Override
- public ItemStack getStackInSlotOnClosing(int i) {
- return null;
- }
-
- @Override
- public boolean doTickProfilingMessageDuringThisTick() {
- return doTickProfilingInThisTick;
- }
-
- @Override
- public boolean isUseableByPlayer(EntityPlayer entityplayer) {
- return false;
- }
-
- @Override
- public boolean connectsToItemPipe(byte aSide) {
- return false;
- }
-
- @Override
- public void openInventory() {
- //
- }
-
- @Override
- public void closeInventory() {
- //
- }
-
- @Override
- public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- return null;
- }
-
- @Override
- public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- return null;
- }
-
- @Override
- public float getExplosionResistance(byte aSide) {
- return 10.0F;
- }
-
- @Override
- public ItemStack[] getRealInventory() {
- return mInventory;
- }
-
- @Override
- public boolean hasCustomInventoryName() {
- return false;
- }
-
- @Override
- public void markDirty() {
- //
- }
-
- @Override
- public void onColorChangeServer(byte aColor) {
- //
- }
-
- @Override
- public void onColorChangeClient(byte aColor) {
- //
- }
-
- public long injectEnergyUnits(byte aSide, long aVoltage, long aAmperage) {
- return 0;
- }
-
- @Override
- @SideOnly(Side.CLIENT)
- public boolean renderInInventory(Block aBlock, int aMeta, RenderBlocks aRenderer) {
- return false;
- }
-
- @Override
- @SideOnly(Side.CLIENT)
- public boolean renderInWorld(IBlockAccess aWorld, int aX, int aY, int aZ, Block aBlock, RenderBlocks aRenderer) {
- return false;
- }
-
- @Override
- public void doExplosion(long aExplosionPower) {
- float tStrength = aExplosionPower<V[0]?1.0F:aExplosionPower<V[1]?2.0F:aExplosionPower<V[2]?3.0F:aExplosionPower<V[3]?4.0F:aExplosionPower<V[4]?5.0F:aExplosionPower<V[4]*2?6.0F:aExplosionPower<V[5]?7.0F:aExplosionPower<V[6]?8.0F:aExplosionPower<V[7]?9.0F:10.0F;
- int tX=getBaseMetaTileEntity().getXCoord(), tY=getBaseMetaTileEntity().getYCoord(), tZ=getBaseMetaTileEntity().getZCoord();
- World tWorld = getBaseMetaTileEntity().getWorld();
- tWorld.setBlock(tX, tY, tZ, Blocks.air);
- if (GregTech_API.sMachineExplosions) tWorld.createExplosion(null, tX+0.5, tY+0.5, tZ+0.5, tStrength, true);
- }
-
- @Override
- public int getLightOpacity() {
- return 0;
- }
-
- @Override
- public void addCollisionBoxesToList(World aWorld, int aX, int aY, int aZ, AxisAlignedBB inputAABB, List<AxisAlignedBB> outputAABB, Entity collider) {
- AxisAlignedBB axisalignedbb1 = getCollisionBoundingBoxFromPool(aWorld, aX, aY, aZ);
- if (axisalignedbb1 != null && inputAABB.intersectsWith(axisalignedbb1)) outputAABB.add(axisalignedbb1);
- }
-
- @Override
- public AxisAlignedBB getCollisionBoundingBoxFromPool(World aWorld, int aX, int aY, int aZ) {
- return AxisAlignedBB.getBoundingBox(aX, aY, aZ, aX+1, aY+1, aZ+1);
- }
-
- @Override
- public void onEntityCollidedWithBlock(World aWorld, int aX, int aY, int aZ, Entity collider) {
- //
- }
-
- @Override
- public void onCreated(ItemStack aStack, World aWorld, EntityPlayer aPlayer) {
- //
- }
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/metatileentity/MetaTileEntity.java b/main/java/gregtech/api/metatileentity/MetaTileEntity.java
deleted file mode 100644
index ab2c3930f5..0000000000
--- a/main/java/gregtech/api/metatileentity/MetaTileEntity.java
+++ /dev/null
@@ -1,721 +0,0 @@
-package gregtech.api.metatileentity;
-
-import static gregtech.api.enums.GT_Values.GT;
-import static gregtech.api.enums.GT_Values.V;
-import gregtech.api.GregTech_API;
-import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.objects.GT_ItemStack;
-import gregtech.api.util.GT_Config;
-import gregtech.api.util.GT_LanguageManager;
-import gregtech.api.util.GT_ModHandler;
-import gregtech.api.util.GT_Utility;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
-
-import net.minecraft.block.Block;
-import net.minecraft.client.renderer.RenderBlocks;
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.init.Blocks;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.util.AxisAlignedBB;
-import net.minecraft.world.IBlockAccess;
-import net.minecraft.world.World;
-import net.minecraftforge.common.util.ForgeDirection;
-import net.minecraftforge.fluids.Fluid;
-import net.minecraftforge.fluids.FluidStack;
-import net.minecraftforge.fluids.FluidTankInfo;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-
-/**
- * NEVER INCLUDE THIS FILE IN YOUR MOD!!!
- *
- * Extend this Class to add a new MetaMachine
- * Call the Constructor with the desired ID at the load-phase (not preload and also not postload!)
- * Implement the newMetaEntity-Method to return a new ready instance of your MetaTileEntity
- *
- * Call the Constructor like the following example inside the Load Phase, to register it.
- * "new GT_MetaTileEntity_E_Furnace(54, "GT_E_Furnace", "Automatic E-Furnace");"
- */
-public abstract class MetaTileEntity implements IMetaTileEntity {
- /**
- * Only assigned for the MetaTileEntity in the List! Also only used to get the localized Name for the ItemStack and for getInvName.
- */
- public final String mName;
-
- public boolean doTickProfilingInThisTick = true;
-
- /**
- * accessibility to this Field is no longer given, see below
- */
- private IGregTechTileEntity mBaseMetaTileEntity;
-
- @Override
- public IGregTechTileEntity getBaseMetaTileEntity() {
- return mBaseMetaTileEntity;
- }
-
- @Override
- public ItemStack getStackForm(long aAmount) {
- return new ItemStack(GregTech_API.sBlockMachines, (int)aAmount, getBaseMetaTileEntity().getMetaTileID());
- }
-
- public String getLocalName() {
- return GT_LanguageManager.getTranslation("gt.blockmachines." + mName + ".name");
- }
-
- /**
- * The Inventory of the MetaTileEntity. Amount of Slots can be larger than 256. HAYO!
- */
- public final ItemStack[] mInventory;
-
- /**
- * This registers your Machine at the List.
- * Use only ID's larger than 2048, because i reserved these ones.
- * See also the List in the API, as it has a Description containing all the reservations.
- * @param aID the ID
- * @example for Constructor overload.
- *
- * public GT_MetaTileEntity_EBench(int aID, String mName, String mNameRegional) {
- * super(aID, mName, mNameRegional);
- * }
- */
- public MetaTileEntity(int aID, String aBasicName, String aRegionalName, int aInvSlotCount) {
- if (GregTech_API.sPostloadStarted || !GregTech_API.sPreloadStarted) throw new IllegalAccessError("This Constructor has to be called in the load Phase");
- if (GregTech_API.METATILEENTITIES[aID] == null) {
- GregTech_API.METATILEENTITIES[aID] = this;
- } else {
- throw new IllegalArgumentException("MetaMachine-Slot Nr. " + aID + " is already occupied!");
- }
- mName = aBasicName.replaceAll(" ", "_").toLowerCase();
- setBaseMetaTileEntity(GregTech_API.constructBaseMetaTileEntity());
- getBaseMetaTileEntity().setMetaTileID((short)aID);
- GT_LanguageManager.addStringLocalization("gt.blockmachines." + mName + ".name", aRegionalName);
- mInventory = new ItemStack[aInvSlotCount];
-
- if (GT.isClientSide()) {
- ItemStack tStack = new ItemStack(GregTech_API.sBlockMachines, 1, aID);
- tStack.getItem().addInformation(tStack, null, new ArrayList<String>(), true);
- }
- }
-
- @Override
- public void setBaseMetaTileEntity(IGregTechTileEntity aBaseMetaTileEntity) {
- if (mBaseMetaTileEntity != null && aBaseMetaTileEntity == null) {
- mBaseMetaTileEntity.getMetaTileEntity().inValidate();
- mBaseMetaTileEntity.setMetaTileEntity(null);
- }
- mBaseMetaTileEntity = aBaseMetaTileEntity;
- if (mBaseMetaTileEntity != null) {
- mBaseMetaTileEntity.setMetaTileEntity(this);
- }
- }
-
- /**
- * This is the normal Constructor.
- */
- public MetaTileEntity(String aName, int aInvSlotCount) {
- mInventory = new ItemStack[aInvSlotCount];
- mName = aName;
- }
-
- @Override
- public void onServerStart() {/*Do nothing*/}
- @Override
- public void onWorldSave(File aSaveDirectory) {/*Do nothing*/}
- @Override
- public void onWorldLoad(File aSaveDirectory) {/*Do nothing*/}
- @Override
- public void onConfigLoad(GT_Config aConfig) {/*Do nothing*/}
- @Override
- public void setItemNBT(NBTTagCompound aNBT) {/*Do nothing*/}
-
- @Override
- @SideOnly(Side.CLIENT)
- public void registerIcons(IIconRegister aBlockIconRegister) {/*Do nothing*/}
-
- @Override
- public boolean allowCoverOnSide(byte aSide, GT_ItemStack aStack) {return true;}
- @Override
- public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) {/*Do nothing*/}
- @Override
- public boolean onWrenchRightClick(byte aSide, byte aWrenchingSide, EntityPlayer aPlayer, float aX, float aY, float aZ) {if (getBaseMetaTileEntity().isValidFacing(aWrenchingSide)) {getBaseMetaTileEntity().setFrontFacing(aWrenchingSide); return true;} return false;}
- @Override
- public void onExplosion() {/*Do nothing*/}
- @Override
- public void onFirstTick(IGregTechTileEntity aBaseMetaTileEntity) {/*Do nothing*/}
- @Override
- public void onPreTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {/*Do nothing*/}
- @Override
- public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {/*Do nothing*/}
- @Override
- public void inValidate() {/*Do nothing*/}
- @Override
- public void onRemoval() {/*Do nothing*/}
- @Override
- public void initDefaultModes(NBTTagCompound aNBT) {/*Do nothing*/}
-
- /**
- * When a GUI is opened
- */
- public void onOpenGUI() {/*Do nothing*/}
-
- /**
- * When a GUI is closed
- */
- public void onCloseGUI() {/*Do nothing*/}
-
- /**
- * a Player rightclicks the Machine
- * Sneaky rightclicks are not getting passed to this!
- */
- public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) {return false;}
-
- @Override
- public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer, byte aSide, float aX, float aY, float aZ) {return onRightclick(aBaseMetaTileEntity, aPlayer);}
- @Override
- public void onLeftclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) {/*Do nothing*/}
- @Override
- public void onValueUpdate(byte aValue) {/*Do nothing*/}
- @Override
- public byte getUpdateData() {return 0;}
-
- @Override
- public void doSound(byte aIndex, double aX, double aY, double aZ) {/*Do nothing*/}
- @Override
- public void startSoundLoop(byte aIndex, double aX, double aY, double aZ) {/*Do nothing*/}
- @Override
- public void stopSoundLoop(byte aValue, double aX, double aY, double aZ) {/*Do nothing*/}
-
- @Override
- public final void sendSound(byte aIndex) {if (!getBaseMetaTileEntity().hasMufflerUpgrade()) getBaseMetaTileEntity().sendBlockEvent((byte)4, aIndex);}
- @Override
- public final void sendLoopStart(byte aIndex) {if (!getBaseMetaTileEntity().hasMufflerUpgrade()) getBaseMetaTileEntity().sendBlockEvent((byte)5, aIndex);}
- @Override
- public final void sendLoopEnd(byte aIndex) {if (!getBaseMetaTileEntity().hasMufflerUpgrade()) getBaseMetaTileEntity().sendBlockEvent((byte)6, aIndex);}
-
- /**
- * @return true if this Device emits Energy at all
- */
- public boolean isElectric() {return true;}
-
- /**
- * @return true if this Device emits Energy at all
- */
- public boolean isPneumatic() {return false;}
-
- /**
- * @return true if this Device emits Energy at all
- */
- public boolean isSteampowered() {return false;}
-
- /**
- * @return true if this Device emits Energy at all
- */
- public boolean isEnetOutput() {return false;}
-
- /**
- * @return true if this Device consumes Energy at all
- */
- public boolean isEnetInput() {return false;}
-
- /**
- * @return the amount of EU, which can be stored in this Device. Default is 0 EU.
- */
- public long maxEUStore() {return 0;}
-
- /**
- * @return the amount of EU/t, which can be accepted by this Device before it explodes.
- */
- public long maxEUInput() {return 0;}
-
- /**
- * @return the amount of EU/t, which can be outputted by this Device.
- */
- public long maxEUOutput() {return 0;}
-
- /**
- * @return the amount of E-net Impulses of the maxEUOutput size, which can be outputted by this Device.
- * Default is 1 Pulse, this shouldn't be set to smaller Values than 1, as it won't output anything in that Case!
- */
- public long maxAmperesOut() {return 1;}
-
- /**
- * How many Amperes this Block can suck at max. Surpassing this value won't blow it up.
- */
- public long maxAmperesIn() {return 1;}
-
- /**
- * @return true if that Side is an Output.
- */
- public boolean isOutputFacing(byte aSide) {return false;}
-
- /**
- * @return true if that Side is an Input.
- */
- public boolean isInputFacing(byte aSide) {return false;}
-
- /**
- * @return true if Transformer Upgrades increase Packet Amount.
- */
- public boolean isTransformingLowEnergy() {return true;}
-
- @Override
- public boolean isFacingValid(byte aFacing) {return false;}
- @Override
- public boolean isAccessAllowed(EntityPlayer aPlayer) {return false;}
- @Override
- public boolean isValidSlot(int aIndex) {return true;}
- @Override
- public boolean setStackToZeroInsteadOfNull(int aIndex) {return false;}
-
- /**
- * This is used to set the internal Energy to the given Parameter. I use this for the IDSU.
- */
- public void setEUVar(long aEnergy) {
- ((BaseMetaTileEntity)mBaseMetaTileEntity).mStoredEnergy = aEnergy;
- }
-
- /**
- * This is used to get the internal Energy. I use this for the IDSU.
- */
- public long getEUVar() {
- return ((BaseMetaTileEntity)mBaseMetaTileEntity).mStoredEnergy;
- }
-
- /**
- * This is used to set the internal Steam Energy to the given Parameter.
- */
- public void setSteamVar(long aSteam) {
- ((BaseMetaTileEntity)mBaseMetaTileEntity).mStoredSteam = aSteam;
- }
-
- /**
- * This is used to get the internal Steam Energy.
- */
- public long getSteamVar() {
- return ((BaseMetaTileEntity)mBaseMetaTileEntity).mStoredSteam;
- }
-
- /**
- * @return the amount of Steam, which can be stored in this Device. Default is 0 EU.
- */
- public long maxSteamStore() {return 0;}
-
- /**
- * @return the amount of EU, which this Device stores before starting to emit Energy.
- * useful if you don't want to emit stored Energy until a certain Level is reached.
- */
- public long getMinimumStoredEU() {
- return 512;
- }
-
- /**
- * Determines the Tier of the Machine, used for de-charging Tools.
- */
- public long getInputTier() {
- return GT_Utility.getTier(getBaseMetaTileEntity().getInputVoltage());
- }
-
- /**
- * Determines the Tier of the Machine, used for charging Tools.
- */
- public long getOutputTier() {
- return GT_Utility.getTier(getBaseMetaTileEntity().getOutputVoltage());
- }
-
- /**
- * gets the first RechargerSlot
- */
- public int rechargerSlotStartIndex() {
- return 0;
- }
-
- /**
- * gets the amount of RechargerSlots
- */
- public int rechargerSlotCount() {
- return 0;
- }
-
- /**
- * gets the first DechargerSlot
- */
- public int dechargerSlotStartIndex() {
- return 0;
- }
-
- /**
- * gets the amount of DechargerSlots
- */
- public int dechargerSlotCount() {
- return 0;
- }
-
- /**
- * gets if this is protected from other Players per default or not
- */
- public boolean ownerControl() {
- return false;
- }
-
- @Override
- public ArrayList<String> getSpecialDebugInfo(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer, int aLogLevel, ArrayList<String> aList) {
- return aList;
- }
-
- @Override
- public boolean isLiquidInput(byte aSide) {
- return true;
- }
-
- @Override
- public boolean isLiquidOutput(byte aSide) {
- return true;
- }
-
- /**
- * gets the contained Liquid
- */
- @Override
- public FluidStack getFluid() {return null;}
-
- /**
- * tries to fill this Tank
- */
- @Override
- public int fill(FluidStack resource, boolean doFill) {return 0;}
-
- /**
- * tries to empty this Tank
- */
- @Override
- public FluidStack drain(int maxDrain, boolean doDrain) {return null;}
-
- /**
- * Tank pressure
- */
- public int getTankPressure() {return 0;}
-
- /**
- * Liquid Capacity
- */
- @Override
- public int getCapacity() {return 0;}
-
- @Override
- public void onMachineBlockUpdate() {/*Do nothing*/}
- @Override
- public void receiveClientEvent(byte aEventID, byte aValue) {/*Do nothing*/}
- @Override
- public boolean isSimpleMachine() {return false;}
-
- /**
- * If this accepts up to 4 Overclockers
- */
- public boolean isOverclockerUpgradable() {return false;}
-
- /**
- * If this accepts Transformer Upgrades
- */
- public boolean isTransformerUpgradable() {return false;}
-
- /**
- * Progress this machine has already made
- */
- public int getProgresstime() {return 0;}
-
- /**
- * Progress this Machine has to do to produce something
- */
- public int maxProgresstime() {return 0;}
-
- /**
- * Increases the Progress, returns the overflown Progress.
- */
- public int increaseProgress(int aProgress) {return 0;}
-
- /**
- * If this TileEntity makes use of Sided Redstone behaviors.
- * Determines only, if the Output Redstone Array is getting filled with 0 for true, or 15 for false.
- */
- public boolean hasSidedRedstoneOutputBehavior() {
- return false;
- }
-
- /**
- * When the Facing gets changed.
- */
- public void onFacingChange() {/*Do nothing*/}
-
- /**
- * if the IC2 Teleporter can drain from this.
- */
- public boolean isTeleporterCompatible() {
- return isEnetOutput() && getBaseMetaTileEntity().getOutputVoltage() >= 128 && getBaseMetaTileEntity().getUniversalEnergyCapacity() >= 500000;
- }
-
- /**
- * Gets the Output for the comparator on the given Side
- */
- @Override
- public byte getComparatorValue(byte aSide) {
- return 0;
- }
-
- @Override
- public boolean acceptsRotationalEnergy(byte aSide) {
- return false;
- }
-
- @Override
- public boolean injectRotationalEnergy(byte aSide, long aSpeed, long aEnergy) {
- return false;
- }
-
- @Override
- public String getSpecialVoltageToolTip() {return null;}
-
- @Override
- public boolean isGivingInformation() {return false;}
- @Override
- public String[] getInfoData() {return new String[]{};}
-
- public boolean isDigitalChest() {return false;}
- public ItemStack[] getStoredItemData() {return null;}
- public void setItemCount(int aCount) {/*Do nothing*/}
- public int getMaxItemCount() {return 0;}
-
- @Override
- public int getSizeInventory() {return mInventory.length;}
- @Override
- public ItemStack getStackInSlot(int aIndex) {if (aIndex >= 0 && aIndex < mInventory.length) return mInventory[aIndex]; return null;}
- @Override
- public void setInventorySlotContents(int aIndex, ItemStack aStack) {if (aIndex >= 0 && aIndex < mInventory.length) mInventory[aIndex] = aStack;}
- @Override
- public String getInventoryName() {if (GregTech_API.METATILEENTITIES[getBaseMetaTileEntity().getMetaTileID()] != null) return GregTech_API.METATILEENTITIES[getBaseMetaTileEntity().getMetaTileID()].getMetaName(); return "";}
- @Override
- public int getInventoryStackLimit() {return 64;}
- @Override
- public boolean isItemValidForSlot(int aIndex, ItemStack aStack) {return getBaseMetaTileEntity().isValidSlot(aIndex);}
-
- @Override
- public ItemStack decrStackSize(int aIndex, int aAmount) {
- ItemStack tStack = getStackInSlot(aIndex), rStack = GT_Utility.copy(tStack);
- if (tStack != null) {
- if (tStack.stackSize <= aAmount) {
- if (setStackToZeroInsteadOfNull(aIndex)) tStack.stackSize = 0; else setInventorySlotContents(aIndex, null);
- } else {
- rStack = tStack.splitStack(aAmount);
- if (tStack.stackSize == 0 && !setStackToZeroInsteadOfNull(aIndex)) setInventorySlotContents(aIndex, null);
- }
- }
- return rStack;
- }
-
- @Override
- public int[] getAccessibleSlotsFromSide(int aSide) {
- ArrayList<Integer> tList = new ArrayList<Integer>();
- IGregTechTileEntity tTileEntity = getBaseMetaTileEntity();
- boolean tSkip = tTileEntity.getCoverBehaviorAtSide((byte)aSide).letsItemsIn((byte)aSide, tTileEntity.getCoverIDAtSide((byte)aSide), tTileEntity.getCoverDataAtSide((byte)aSide), -2, tTileEntity) || tTileEntity.getCoverBehaviorAtSide((byte)aSide).letsItemsOut((byte)aSide, tTileEntity.getCoverIDAtSide((byte)aSide), tTileEntity.getCoverDataAtSide((byte)aSide), -2, tTileEntity);
- for (int i = 0; i < getSizeInventory(); i++) if (isValidSlot(i) && (tSkip || tTileEntity.getCoverBehaviorAtSide((byte)aSide).letsItemsOut((byte)aSide, tTileEntity.getCoverIDAtSide((byte)aSide), tTileEntity.getCoverDataAtSide((byte)aSide), i, tTileEntity) || tTileEntity.getCoverBehaviorAtSide((byte)aSide).letsItemsIn((byte)aSide, tTileEntity.getCoverIDAtSide((byte)aSide), tTileEntity.getCoverDataAtSide((byte)aSide), i, tTileEntity))) tList.add(i);
- int[] rArray = new int[tList.size()];
- for (int i = 0; i < rArray.length; i++) rArray[i] = tList.get(i);
- return rArray;
- }
-
- @Override
- public boolean canInsertItem(int aIndex, ItemStack aStack, int aSide) {
- return isValidSlot(aIndex) && aStack != null && aIndex < mInventory.length && (mInventory[aIndex] == null || GT_Utility.areStacksEqual(aStack, mInventory[aIndex])) && allowPutStack(getBaseMetaTileEntity(), aIndex, (byte)aSide, aStack);
- }
-
- @Override
- public boolean canExtractItem(int aIndex, ItemStack aStack, int aSide) {
- return isValidSlot(aIndex) && aStack != null && aIndex < mInventory.length && allowPullStack(getBaseMetaTileEntity(), aIndex, (byte)aSide, aStack);
- }
-
- @Override
- public boolean canFill(ForgeDirection aSide, Fluid aFluid) {
- return fill(aSide, new FluidStack(aFluid, 1), false) == 1;
- }
-
- @Override
- public boolean canDrain(ForgeDirection aSide, Fluid aFluid) {
- return drain(aSide, new FluidStack(aFluid, 1), false) != null;
- }
-
- @Override
- public FluidTankInfo[] getTankInfo(ForgeDirection aSide) {
- if (getCapacity() <= 0 && !getBaseMetaTileEntity().hasSteamEngineUpgrade()) return new FluidTankInfo[] {};
- return new FluidTankInfo[] {getInfo()};
- }
-
- public int fill_default(ForgeDirection aSide, FluidStack aFluid, boolean doFill) {
- return fill(aFluid, doFill);
- }
-
- @Override
- public int fill(ForgeDirection aSide, FluidStack aFluid, boolean doFill) {
- if (getBaseMetaTileEntity().hasSteamEngineUpgrade() && GT_ModHandler.isSteam(aFluid) && aFluid.amount > 1) {
- int tSteam = (int)Math.min(Integer.MAX_VALUE, Math.min(aFluid.amount/2, getBaseMetaTileEntity().getSteamCapacity() - getBaseMetaTileEntity().getStoredSteam()));
- if (tSteam > 0) {
- if (doFill) getBaseMetaTileEntity().increaseStoredSteam(tSteam, true);
- return tSteam*2;
- }
- } else {
- return fill_default(aSide, aFluid, doFill);
- }
- return 0;
- }
-
- @Override
- public FluidStack drain(ForgeDirection aSide, FluidStack aFluid, boolean doDrain) {
- if (getFluid() != null && aFluid != null && getFluid().isFluidEqual(aFluid)) return drain(aFluid.amount, doDrain);
- return null;
- }
-
- @Override
- public FluidStack drain(ForgeDirection aSide, int maxDrain, boolean doDrain) {
- return drain(maxDrain, doDrain);
- }
-
- @Override
- public int getFluidAmount() {
- return 0;
- }
-
- @Override
- public FluidTankInfo getInfo() {
- return new FluidTankInfo(this);
- }
-
- @Override
- public String getMetaName() {
- return mName;
- }
-
- @Override
- public ItemStack getStackInSlotOnClosing(int i) {
- return null;
- }
-
- @Override
- public boolean hasCustomInventoryName() {
- return false;
- }
-
- @Override
- public boolean doTickProfilingMessageDuringThisTick() {
- return doTickProfilingInThisTick;
- }
-
- @Override
- public void markDirty() {
- //
- }
-
- @Override
- public boolean isUseableByPlayer(EntityPlayer entityplayer) {
- return false;
- }
-
- @Override
- public void openInventory() {
- //
- }
-
- @Override
- public void closeInventory() {
- //
- }
-
- @Override
- public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- return null;
- }
-
- @Override
- public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- return null;
- }
-
- @Override
- public boolean connectsToItemPipe(byte aSide) {
- return false;
- }
-
- @Override
- public float getExplosionResistance(byte aSide) {
- return 10.0F;
- }
-
- @Override
- public ItemStack[] getRealInventory() {
- return mInventory;
- }
-
- @Override
- public void onColorChangeServer(byte aColor) {
- //
- }
-
- @Override
- public void onColorChangeClient(byte aColor) {
- //
- }
-
- @Override
- @SideOnly(Side.CLIENT)
- public boolean renderInInventory(Block aBlock, int aMeta, RenderBlocks aRenderer) {
- return false;
- }
-
- @Override
- @SideOnly(Side.CLIENT)
- public boolean renderInWorld(IBlockAccess aWorld, int aX, int aY, int aZ, Block aBlock, RenderBlocks aRenderer) {
- return false;
- }
-
- @Override
- public void doExplosion(long aExplosionPower) {
- float tStrength = aExplosionPower<V[0]?1.0F:aExplosionPower<V[1]?2.0F:aExplosionPower<V[2]?3.0F:aExplosionPower<V[3]?4.0F:aExplosionPower<V[4]?5.0F:aExplosionPower<V[4]*2?6.0F:aExplosionPower<V[5]?7.0F:aExplosionPower<V[6]?8.0F:aExplosionPower<V[7]?9.0F:10.0F;
- int tX=getBaseMetaTileEntity().getXCoord(), tY=getBaseMetaTileEntity().getYCoord(), tZ=getBaseMetaTileEntity().getZCoord();
- World tWorld = getBaseMetaTileEntity().getWorld();
- GT_Utility.sendSoundToPlayers(tWorld, GregTech_API.sSoundList.get(209), 1.0F, -1, tX, tY, tZ);
- tWorld.setBlock(tX, tY, tZ, Blocks.air);
- if (GregTech_API.sMachineExplosions) tWorld.createExplosion(null, tX+0.5, tY+0.5, tZ+0.5, tStrength, true);
- }
-
- @Override
- public int getLightOpacity() {
- return ((BaseMetaTileEntity)getBaseMetaTileEntity()).getLightValue() > 0 ? 0 : 255;
- }
-
- @Override
- public void addCollisionBoxesToList(World aWorld, int aX, int aY, int aZ, AxisAlignedBB inputAABB, List<AxisAlignedBB> outputAABB, Entity collider) {
- AxisAlignedBB axisalignedbb1 = getCollisionBoundingBoxFromPool(aWorld, aX, aY, aZ);
- if (axisalignedbb1 != null && inputAABB.intersectsWith(axisalignedbb1)) outputAABB.add(axisalignedbb1);
- }
-
- @Override
- public AxisAlignedBB getCollisionBoundingBoxFromPool(World aWorld, int aX, int aY, int aZ) {
- return AxisAlignedBB.getBoundingBox(aX, aY, aZ, aX+1, aY+1, aZ+1);
- }
-
- @Override
- public void onEntityCollidedWithBlock(World aWorld, int aX, int aY, int aZ, Entity collider) {
- //
- }
-
- @Override
- public void onCreated(ItemStack aStack, World aWorld, EntityPlayer aPlayer) {
- //
- }
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/metatileentity/examples/GT_MetaTileEntity_E_Furnace.java b/main/java/gregtech/api/metatileentity/examples/GT_MetaTileEntity_E_Furnace.java
deleted file mode 100644
index a393ae5d20..0000000000
--- a/main/java/gregtech/api/metatileentity/examples/GT_MetaTileEntity_E_Furnace.java
+++ /dev/null
@@ -1,56 +0,0 @@
-package gregtech.api.metatileentity.examples;
-
-import gregtech.api.GregTech_API;
-import gregtech.api.enums.Textures;
-import gregtech.api.interfaces.ITexture;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.metatileentity.MetaTileEntity;
-import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine;
-import gregtech.api.objects.GT_RenderedTexture;
-import gregtech.api.util.GT_ModHandler;
-import gregtech.api.util.GT_Utility;
-import net.minecraft.item.ItemStack;
-
-/**
- * This Example Implementation still works, however I use something completely different in my own Code.
- */
-public class GT_MetaTileEntity_E_Furnace extends GT_MetaTileEntity_BasicMachine {
- public GT_MetaTileEntity_E_Furnace(int aID, String aName, String aNameRegional, int aTier) {
- super(aID, aName, aNameRegional, aTier, 1, "Not like using a Commodore 64", 1, 1, "E_Furnace.png", "smelting", new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_STEAM_FURNACE_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_STEAM_FURNACE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_STEAM_FURNACE_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_STEAM_FURNACE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_STEAM_FURNACE_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_STEAM_FURNACE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_FURNACE_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_FURNACE));
- }
-
- public GT_MetaTileEntity_E_Furnace(String aName, int aTier, String aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) {
- super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName);
- }
-
- @Override
- public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
- return new GT_MetaTileEntity_E_Furnace(mName, mTier, mDescription, mTextures, mGUIName, mNEIName);
- }
-
- @Override
- public int checkRecipe() {
- if (null != (mOutputItems[0] = GT_ModHandler.getSmeltingOutput(getInputAt(0), true, getOutputAt(0)))) {
- mEUt = 4 * (1 << (mTier-1)) * (1 << (mTier-1));
- mMaxProgresstime = 128 / (1 << (mTier-1));
- return 2;
- }
- return 0;
- }
-
- @Override
- public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
- return super.allowPutStack(aBaseMetaTileEntity, aIndex, aSide, aStack) && GT_ModHandler.getSmeltingOutput(GT_Utility.copyAmount(64, aStack), false, null) != null;
- }
-
- @Override
- public void startSoundLoop(byte aIndex, double aX, double aY, double aZ) {
- super.startSoundLoop(aIndex, aX, aY, aZ);
- if (aIndex == 1) GT_Utility.doSoundAtClient(GregTech_API.sSoundList.get(207), 10, 1.0F, aX, aY, aZ);
- }
-
- @Override
- public void startProcess() {
- sendLoopStart((byte)1);
- }
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Cable.java b/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Cable.java
deleted file mode 100644
index 85104f4584..0000000000
--- a/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Cable.java
+++ /dev/null
@@ -1,253 +0,0 @@
-package gregtech.api.metatileentity.implementations;
-
-import static gregtech.api.enums.GT_Values.VN;
-import gregtech.api.GregTech_API;
-import gregtech.api.enums.Dyes;
-import gregtech.api.enums.Materials;
-import gregtech.api.enums.TextureSet;
-import gregtech.api.enums.Textures;
-import gregtech.api.interfaces.ITexture;
-import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
-import gregtech.api.interfaces.metatileentity.IMetaTileEntityCable;
-import gregtech.api.interfaces.tileentity.IColoredTileEntity;
-import gregtech.api.interfaces.tileentity.IEnergyConnected;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.metatileentity.BaseMetaPipeEntity;
-import gregtech.api.metatileentity.MetaPipeEntity;
-import gregtech.api.objects.GT_RenderedTexture;
-import gregtech.api.util.GT_Utility;
-import ic2.api.energy.tile.IEnergySink;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-
-import cofh.api.energy.IEnergyReceiver;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.util.AxisAlignedBB;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.world.World;
-import net.minecraftforge.common.util.ForgeDirection;
-
-public class GT_MetaPipeEntity_Cable extends MetaPipeEntity implements IMetaTileEntityCable {
- public long mTransferredAmperage = 0, mTransferredAmperageLast20 = 0, mTransferredVoltageLast20 = 0;
-
- public final float mThickNess;
- public final Materials mMaterial;
- public final long mCableLossPerMeter, mAmperage, mVoltage;
- public final boolean mInsulated, mCanShock;
- public long mRestRF;
-
- public GT_MetaPipeEntity_Cable(int aID, String aName, String aNameRegional, float aThickNess, Materials aMaterial, long aCableLossPerMeter, long aAmperage, long aVoltage, boolean aInsulated, boolean aCanShock) {
- super(aID, aName, aNameRegional, 0);
- mThickNess = aThickNess;
- mMaterial = aMaterial;
- mAmperage = aAmperage;
- mVoltage = aVoltage;
- mInsulated = aInsulated;
- mCanShock = aCanShock;
- mCableLossPerMeter = aCableLossPerMeter;
- }
-
- public GT_MetaPipeEntity_Cable(String aName, float aThickNess, Materials aMaterial, long aCableLossPerMeter, long aAmperage, long aVoltage, boolean aInsulated, boolean aCanShock) {
- super(aName, 0);
- mThickNess = aThickNess;
- mMaterial = aMaterial;
- mAmperage = aAmperage;
- mVoltage = aVoltage;
- mInsulated = aInsulated;
- mCanShock = aCanShock;
- mCableLossPerMeter = aCableLossPerMeter;
- }
-
- @Override
- public byte getTileEntityBaseType() {
- return (byte)(mInsulated?9:8);
- }
-
- @Override
- public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
- return new GT_MetaPipeEntity_Cable(mName, mThickNess, mMaterial, mCableLossPerMeter, mAmperage, mVoltage, mInsulated, mCanShock);
- }
-
- @Override
- public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aConnections, byte aColorIndex, boolean aConnected, boolean aRedstone) {
- if (!mInsulated) return new ITexture[] {new GT_RenderedTexture(mMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], mMaterial.mRGBa)};
- if (aConnected) {
- float tThickNess = getThickNess();
- if (tThickNess < 0.37F) return new ITexture[] {new GT_RenderedTexture(mMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], mMaterial.mRGBa), new GT_RenderedTexture(Textures.BlockIcons.INSULATION_TINY , Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa))};
- if (tThickNess < 0.49F) return new ITexture[] {new GT_RenderedTexture(mMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], mMaterial.mRGBa), new GT_RenderedTexture(Textures.BlockIcons.INSULATION_SMALL , Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa))};
- if (tThickNess < 0.74F) return new ITexture[] {new GT_RenderedTexture(mMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], mMaterial.mRGBa), new GT_RenderedTexture(Textures.BlockIcons.INSULATION_MEDIUM , Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa))};
- if (tThickNess < 0.99F) return new ITexture[] {new GT_RenderedTexture(mMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], mMaterial.mRGBa), new GT_RenderedTexture(Textures.BlockIcons.INSULATION_LARGE , Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa))};
- return new ITexture[] {new GT_RenderedTexture(mMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], mMaterial.mRGBa), new GT_RenderedTexture(Textures.BlockIcons.INSULATION_HUGE , Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa))};
- }
- return new ITexture[] {new GT_RenderedTexture(Textures.BlockIcons.INSULATION_FULL, Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa))};
- }
-
- @Override
- public void onEntityCollidedWithBlock(World aWorld, int aX, int aY, int aZ, Entity aEntity) {
- if (mCanShock && (((BaseMetaPipeEntity)getBaseMetaTileEntity()).mConnections & -128) == 0 && aEntity instanceof EntityLivingBase) GT_Utility.applyElectricityDamage((EntityLivingBase)aEntity, mTransferredVoltageLast20, mTransferredAmperageLast20);
- }
-
- @Override
- public AxisAlignedBB getCollisionBoundingBoxFromPool(World aWorld, int aX, int aY, int aZ) {
- if (!mCanShock) return super.getCollisionBoundingBoxFromPool(aWorld, aX, aY, aZ);
- return AxisAlignedBB.getBoundingBox(aX+0.125D, aY+0.125D, aZ+0.125D, aX+0.875D, aY+0.875D, aZ+0.875D);
- }
-
- @Override public boolean isSimpleMachine() {return true;}
- @Override public boolean isFacingValid(byte aFacing) {return false;}
- @Override public boolean isValidSlot(int aIndex) {return true;}
- @Override public final boolean renderInside(byte aSide) {return false;}
- @Override public int getProgresstime() {return (int)mTransferredAmperage*64;}
- @Override public int maxProgresstime() {return (int)mAmperage*64;}
-
- @Override
- public long injectEnergyUnits(byte aSide, long aVoltage, long aAmperage) {
- if (!getBaseMetaTileEntity().getCoverBehaviorAtSide(aSide).letsEnergyIn(aSide, getBaseMetaTileEntity().getCoverIDAtSide(aSide), getBaseMetaTileEntity().getCoverDataAtSide(aSide), getBaseMetaTileEntity())) return 0;
- return transferElectricity(aSide, aVoltage, aAmperage, new ArrayList<TileEntity>(Arrays.asList((TileEntity)getBaseMetaTileEntity())));
- }
-
- @Override
- public long transferElectricity(byte aSide, long aVoltage, long aAmperage, ArrayList<TileEntity> aAlreadyPassedTileEntityList) {
- long rUsedAmperes = 0;
- aVoltage -= mCableLossPerMeter;
- if (aVoltage > 0) for (byte i = 0; i < 6 && aAmperage > rUsedAmperes; i++) if (i != aSide && (mConnections & (1<<i)) != 0 && getBaseMetaTileEntity().getCoverBehaviorAtSide(i).letsEnergyOut(i, getBaseMetaTileEntity().getCoverIDAtSide(i), getBaseMetaTileEntity().getCoverDataAtSide(i), getBaseMetaTileEntity())) {
- TileEntity tTileEntity = getBaseMetaTileEntity().getTileEntityAtSide(i);
- if (!aAlreadyPassedTileEntityList.contains(tTileEntity)) {
- aAlreadyPassedTileEntityList.add(tTileEntity);
- if (tTileEntity instanceof IEnergyConnected) {
- if (getBaseMetaTileEntity().getColorization() >= 0) {
- byte tColor = ((IEnergyConnected)tTileEntity).getColorization();
- if (tColor >= 0 && tColor != getBaseMetaTileEntity().getColorization()) continue;
- }
- if (tTileEntity instanceof IGregTechTileEntity && ((IGregTechTileEntity)tTileEntity).getMetaTileEntity() instanceof IMetaTileEntityCable && ((IGregTechTileEntity)tTileEntity).getCoverBehaviorAtSide(GT_Utility.getOppositeSide(i)).letsEnergyIn(GT_Utility.getOppositeSide(i), ((IGregTechTileEntity)tTileEntity).getCoverIDAtSide(GT_Utility.getOppositeSide(i)), ((IGregTechTileEntity)tTileEntity).getCoverDataAtSide(GT_Utility.getOppositeSide(i)), ((IGregTechTileEntity)tTileEntity))) {
- if (((IGregTechTileEntity)tTileEntity).getTimer() > 50) rUsedAmperes += ((IMetaTileEntityCable)((IGregTechTileEntity)tTileEntity).getMetaTileEntity()).transferElectricity(GT_Utility.getOppositeSide(i), aVoltage, aAmperage-rUsedAmperes, aAlreadyPassedTileEntityList);
- } else {
- rUsedAmperes += ((IEnergyConnected)tTileEntity).injectEnergyUnits(GT_Utility.getOppositeSide(i), aVoltage, aAmperage-rUsedAmperes);
- }
-// } else if (tTileEntity instanceof IEnergySink) {
-// ForgeDirection tDirection = ForgeDirection.getOrientation(i).getOpposite();
-// if (((IEnergySink)tTileEntity).acceptsEnergyFrom((TileEntity)getBaseMetaTileEntity(), tDirection)) {
-// if (((IEnergySink)tTileEntity).demandedEnergyUnits() > 0 && ((IEnergySink)tTileEntity).injectEnergyUnits(tDirection, aVoltage) < aVoltage) rUsedAmperes++;
-// }
- } else if (tTileEntity instanceof IEnergySink) {
- ForgeDirection tDirection = ForgeDirection.getOrientation(i).getOpposite();
- if (((IEnergySink)tTileEntity).acceptsEnergyFrom((TileEntity)getBaseMetaTileEntity(), tDirection)) {
- if (((IEnergySink)tTileEntity).getDemandedEnergy() > 0 && ((IEnergySink)tTileEntity).injectEnergy(tDirection, aVoltage, aVoltage) < aVoltage) rUsedAmperes++;
- }
- } else if(GregTech_API.mOutputRF && tTileEntity instanceof IEnergyReceiver){
- ForgeDirection tDirection = ForgeDirection.getOrientation(i).getOpposite();
- int rfOut = (int) (aVoltage * GregTech_API.mEUtoRF / 100);
- if(((IEnergyReceiver)tTileEntity).receiveEnergy(tDirection, rfOut, true)==rfOut){
- ((IEnergyReceiver)tTileEntity).receiveEnergy(tDirection, rfOut, false); rUsedAmperes++;
- }else if(((IEnergyReceiver)tTileEntity).receiveEnergy(tDirection, rfOut, true)>0){
- if(mRestRF==0){
- int RFtrans = ((IEnergyReceiver)tTileEntity).receiveEnergy(tDirection, (int) rfOut, false);rUsedAmperes++;
- mRestRF = rfOut - RFtrans;
- }else{
- int RFtrans = ((IEnergyReceiver)tTileEntity).receiveEnergy(tDirection, (int) mRestRF, false);
- mRestRF = mRestRF - RFtrans;
- }
- }
- if(GregTech_API.mRFExplosions && ((IEnergyReceiver)tTileEntity).getMaxEnergyStored(tDirection) < rfOut * 600){
- if(rfOut > 32 * GregTech_API.mEUtoRF / 100) this.doExplosion(rfOut);
- }
- }
- }
- }
- mTransferredAmperage += rUsedAmperes;
- mTransferredVoltageLast20 = Math.max(mTransferredVoltageLast20, aVoltage);
- mTransferredAmperageLast20 = Math.max(mTransferredAmperageLast20, mTransferredAmperage);
- if (aVoltage > mVoltage || mTransferredAmperage > mAmperage) {
- getBaseMetaTileEntity().setToFire();
- return aAmperage;
- }
- return rUsedAmperes;
- }
-
- @Override
- public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
- if (aBaseMetaTileEntity.isServerSide()) {
- mTransferredAmperage = 0;
-
- if (aTick % 20 == 0) {
- mTransferredVoltageLast20 = 0;
- mTransferredAmperageLast20 = 0;
- mConnections = 0;
- for (byte i = 0, j = 0; i < 6; i++) {
- j = GT_Utility.getOppositeSide(i);
- if (aBaseMetaTileEntity.getCoverBehaviorAtSide(i).alwaysLookConnected(i, aBaseMetaTileEntity.getCoverIDAtSide(i), aBaseMetaTileEntity.getCoverDataAtSide(i), aBaseMetaTileEntity) || aBaseMetaTileEntity.getCoverBehaviorAtSide(i).letsEnergyIn(i, aBaseMetaTileEntity.getCoverIDAtSide(i), aBaseMetaTileEntity.getCoverDataAtSide(i), aBaseMetaTileEntity) || aBaseMetaTileEntity.getCoverBehaviorAtSide(i).letsEnergyOut(i, aBaseMetaTileEntity.getCoverIDAtSide(i), aBaseMetaTileEntity.getCoverDataAtSide(i), aBaseMetaTileEntity)) {
- TileEntity tTileEntity = aBaseMetaTileEntity.getTileEntityAtSide(i);
- if (tTileEntity instanceof IColoredTileEntity) {
- if (aBaseMetaTileEntity.getColorization() >= 0) {
- byte tColor = ((IColoredTileEntity)tTileEntity).getColorization();
- if (tColor >= 0 && tColor != aBaseMetaTileEntity.getColorization()) continue;
- }
- }
- if (tTileEntity instanceof IEnergyConnected && (((IEnergyConnected)tTileEntity).inputEnergyFrom(j) || ((IEnergyConnected)tTileEntity).outputsEnergyTo(j))) {
- mConnections |= (1<<i);
- continue;
- }
- if (tTileEntity instanceof IGregTechTileEntity && ((IGregTechTileEntity)tTileEntity).getMetaTileEntity() instanceof IMetaTileEntityCable) {
- if (((IGregTechTileEntity)tTileEntity).getCoverBehaviorAtSide(j).alwaysLookConnected(j, ((IGregTechTileEntity)tTileEntity).getCoverIDAtSide(j), ((IGregTechTileEntity)tTileEntity).getCoverDataAtSide(j), ((IGregTechTileEntity)tTileEntity)) || ((IGregTechTileEntity)tTileEntity).getCoverBehaviorAtSide(j).letsEnergyIn(j, ((IGregTechTileEntity)tTileEntity).getCoverIDAtSide(j), ((IGregTechTileEntity)tTileEntity).getCoverDataAtSide(j), ((IGregTechTileEntity)tTileEntity)) || ((IGregTechTileEntity)tTileEntity).getCoverBehaviorAtSide(j).letsEnergyOut(j, ((IGregTechTileEntity)tTileEntity).getCoverIDAtSide(j), ((IGregTechTileEntity)tTileEntity).getCoverDataAtSide(j), ((IGregTechTileEntity)tTileEntity))) {
- mConnections |= (1<<i);
- continue;
- }
- }
- if (tTileEntity instanceof IEnergySink && ((IEnergySink)tTileEntity).acceptsEnergyFrom((TileEntity)aBaseMetaTileEntity, ForgeDirection.getOrientation(j))) {
- mConnections |= (1<<i);
- continue;
- }
- if(GregTech_API.mOutputRF && tTileEntity instanceof IEnergyReceiver && ((IEnergyReceiver)tTileEntity).canConnectEnergy(ForgeDirection.getOrientation(j))){
- mConnections |= (1<<i);
- continue;
- }
- /*
- if (tTileEntity instanceof IEnergyEmitter && ((IEnergyEmitter)tTileEntity).emitsEnergyTo((TileEntity)aBaseMetaTileEntity, ForgeDirection.getOrientation(j))) {
- mConnections |= (1<<i);
- continue;
- }*/
- }
- }
- }
- }
- }
-
- @Override
- public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
- return false;
- }
-
- @Override
- public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
- return false;
- }
-
- @Override
- public String[] getDescription() {
- return new String[] {
- "Max Voltage: " + EnumChatFormatting.GREEN + mVoltage + " (" + VN[GT_Utility.getTier(mVoltage)] + ")" + EnumChatFormatting.GRAY,
- "Max Amperage: " + EnumChatFormatting.YELLOW + mAmperage + EnumChatFormatting.GRAY,
- "Loss/Meter/Ampere: " + EnumChatFormatting.RED + mCableLossPerMeter + EnumChatFormatting.GRAY + " EU-Volt"
- };
- }
-
- @Override
- public float getThickNess() {
- return mThickNess;
- }
-
- @Override
- public void saveNBTData(NBTTagCompound aNBT) {
- //
- }
-
- @Override
- public void loadNBTData(NBTTagCompound aNBT) {
- //
- }
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Fluid.java b/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Fluid.java
deleted file mode 100644
index cb5c1b2f46..0000000000
--- a/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Fluid.java
+++ /dev/null
@@ -1,343 +0,0 @@
-package gregtech.api.metatileentity.implementations;
-
-import static gregtech.api.enums.GT_Values.D1;
-import gregtech.api.GregTech_API;
-import gregtech.api.enums.Dyes;
-import gregtech.api.enums.Materials;
-import gregtech.api.enums.OrePrefixes;
-import gregtech.api.enums.SubTag;
-import gregtech.api.interfaces.ITexture;
-import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
-import gregtech.api.interfaces.tileentity.ICoverable;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.metatileentity.BaseMetaPipeEntity;
-import gregtech.api.metatileentity.MetaPipeEntity;
-import gregtech.api.objects.GT_RenderedTexture;
-import gregtech.api.util.GT_Log;
-import gregtech.api.util.GT_Utility;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Map.Entry;
-
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.util.AxisAlignedBB;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.world.World;
-import net.minecraftforge.common.util.ForgeDirection;
-import net.minecraftforge.fluids.FluidStack;
-import net.minecraftforge.fluids.FluidTankInfo;
-import net.minecraftforge.fluids.IFluidHandler;
-
-public class GT_MetaPipeEntity_Fluid extends MetaPipeEntity {
- public FluidStack mFluid;
- public byte mLastReceivedFrom = 0, oLastReceivedFrom = 0;
-
- public final float mThickNess;
- public final Materials mMaterial;
- public final int mCapacity, mHeatResistance;
- public final boolean mGasProof;
-
- public GT_MetaPipeEntity_Fluid(int aID, String aName, String aNameRegional, float aThickNess, Materials aMaterial, int aCapacity, int aHeatResistance, boolean aGasProof) {
- super(aID, aName, aNameRegional, 0);
- mThickNess = aThickNess;
- mMaterial = aMaterial;
- mCapacity = aCapacity;
- mGasProof = aGasProof;
- mHeatResistance = aHeatResistance;
- }
-
- public GT_MetaPipeEntity_Fluid(String aName, float aThickNess, Materials aMaterial, int aCapacity, int aHeatResistance, boolean aGasProof) {
- super(aName, 0);
- mThickNess = aThickNess;
- mMaterial = aMaterial;
- mCapacity = aCapacity;
- mGasProof = aGasProof;
- mHeatResistance = aHeatResistance;
- }
-
- @Override
- public byte getTileEntityBaseType() {
- return mMaterial==null?4:(byte)((mMaterial.contains(SubTag.WOOD) ? 12 : 4) + Math.max(0, Math.min(3, mMaterial.mToolQuality)));
- }
-
- @Override
- public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
- return new GT_MetaPipeEntity_Fluid(mName, mThickNess, mMaterial, mCapacity, mHeatResistance, mGasProof);
- }
-
- @Override
- public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aConnections, byte aColorIndex, boolean aConnected, boolean aRedstone) {
- if (aConnected) {
- float tThickNess = getThickNess();
- if (tThickNess < 0.37F) return new ITexture[] {new GT_RenderedTexture(mMaterial.mIconSet.mTextures[OrePrefixes.pipeTiny.mTextureIndex ], Dyes.getModulation(aColorIndex, mMaterial.mRGBa))};
- if (tThickNess < 0.49F) return new ITexture[] {new GT_RenderedTexture(mMaterial.mIconSet.mTextures[OrePrefixes.pipeSmall.mTextureIndex ], Dyes.getModulation(aColorIndex, mMaterial.mRGBa))};
- if (tThickNess < 0.74F) return new ITexture[] {new GT_RenderedTexture(mMaterial.mIconSet.mTextures[OrePrefixes.pipeMedium.mTextureIndex ], Dyes.getModulation(aColorIndex, mMaterial.mRGBa))};
- if (tThickNess < 0.99F) return new ITexture[] {new GT_RenderedTexture(mMaterial.mIconSet.mTextures[OrePrefixes.pipeLarge.mTextureIndex ], Dyes.getModulation(aColorIndex, mMaterial.mRGBa))};
- return new ITexture[] {new GT_RenderedTexture(mMaterial.mIconSet.mTextures[OrePrefixes.pipeHuge.mTextureIndex ], Dyes.getModulation(aColorIndex, mMaterial.mRGBa))};
- }
- return new ITexture[] {new GT_RenderedTexture(mMaterial.mIconSet.mTextures[OrePrefixes.pipe.mTextureIndex ], Dyes.getModulation(aColorIndex, mMaterial.mRGBa))};
- }
-
- @Override public boolean isSimpleMachine() {return true;}
- @Override public boolean isFacingValid(byte aFacing) {return false;}
- @Override public boolean isValidSlot(int aIndex) {return false;}
- @Override public final boolean renderInside(byte aSide) {return false;}
- @Override public int getProgresstime() {return getFluidAmount();}
- @Override public int maxProgresstime() {return getCapacity();}
-
- @Override
- public void saveNBTData(NBTTagCompound aNBT) {
- if (mFluid != null) aNBT.setTag("mFluid", mFluid.writeToNBT(new NBTTagCompound()));
- aNBT.setByte("mLastReceivedFrom", mLastReceivedFrom);
- }
-
- @Override
- public void loadNBTData(NBTTagCompound aNBT) {
- mFluid = FluidStack.loadFluidStackFromNBT(aNBT.getCompoundTag("mFluid"));
- mLastReceivedFrom = aNBT.getByte("mLastReceivedFrom");
- }
-
- @Override
- public void onEntityCollidedWithBlock(World aWorld, int aX, int aY, int aZ, Entity aEntity) {
- if (mFluid != null && (((BaseMetaPipeEntity)getBaseMetaTileEntity()).mConnections & -128) == 0 && aEntity instanceof EntityLivingBase) {
- int tTemperature = mFluid.getFluid().getTemperature(mFluid);
- if (tTemperature > 320) {
- GT_Utility.applyHeatDamage((EntityLivingBase)aEntity, (tTemperature - 300) / 50.0F);
- } else if (tTemperature < 260) {
- GT_Utility.applyFrostDamage((EntityLivingBase)aEntity, (270 - tTemperature) / 25.0F);
- }
- }
- }
-
- @Override
- public AxisAlignedBB getCollisionBoundingBoxFromPool(World aWorld, int aX, int aY, int aZ) {
- return AxisAlignedBB.getBoundingBox(aX+0.125D, aY+0.125D, aZ+0.125D, aX+0.875D, aY+0.875D, aZ+0.875D);
- }
-
- @Override
- public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
- if (aBaseMetaTileEntity.isServerSide() && aTick % 5 == 0) {
- mLastReceivedFrom &= 63;
- if (mLastReceivedFrom == 63) {
- mLastReceivedFrom = 0;
- }
-
- if (mFluid != null && mFluid.amount > 0) {
- int tTemperature = mFluid.getFluid().getTemperature(mFluid);
- if (tTemperature > mHeatResistance) {
- if (aBaseMetaTileEntity.getRandomNumber(100) == 0) {
- aBaseMetaTileEntity.setToFire();
- return;
- }
- aBaseMetaTileEntity.setOnFire();
- }
- if (!mGasProof && mFluid.getFluid().isGaseous(mFluid)) {
- mFluid.amount -= 5;
- sendSound((byte)9);
- if (tTemperature > 320) {
- try {
- for (EntityLivingBase tLiving : (ArrayList<EntityLivingBase>)getBaseMetaTileEntity().getWorld().getEntitiesWithinAABB(EntityLivingBase.class, AxisAlignedBB.getBoundingBox(getBaseMetaTileEntity().getXCoord()-2, getBaseMetaTileEntity().getYCoord()-2, getBaseMetaTileEntity().getZCoord()-2, getBaseMetaTileEntity().getXCoord()+3, getBaseMetaTileEntity().getYCoord()+3, getBaseMetaTileEntity().getZCoord()+3))) {
- GT_Utility.applyHeatDamage(tLiving, (tTemperature - 300) / 25.0F);
- }
- } catch(Throwable e) {
- if (D1) e.printStackTrace(GT_Log.err);
- }
- } else if (tTemperature < 260) {
- try {
- for (EntityLivingBase tLiving : (ArrayList<EntityLivingBase>)getBaseMetaTileEntity().getWorld().getEntitiesWithinAABB(EntityLivingBase.class, AxisAlignedBB.getBoundingBox(getBaseMetaTileEntity().getXCoord()-2, getBaseMetaTileEntity().getYCoord()-2, getBaseMetaTileEntity().getZCoord()-2, getBaseMetaTileEntity().getXCoord()+3, getBaseMetaTileEntity().getYCoord()+3, getBaseMetaTileEntity().getZCoord()+3))) {
- GT_Utility.applyFrostDamage(tLiving, (270 - tTemperature) / 12.5F);
- }
- } catch(Throwable e) {
- if (D1) e.printStackTrace(GT_Log.err);
- }
- }
- if (mFluid.amount <= 0) mFluid = null;
- }
- }
-
- if (mLastReceivedFrom == oLastReceivedFrom) {
- HashMap<IFluidHandler, ForgeDirection> tTanks = new HashMap<IFluidHandler, ForgeDirection>();
-
- mConnections = 0;
-
- for (byte tSide = 0, i = 0, j = (byte)aBaseMetaTileEntity.getRandomNumber(6); i < 6; i++) {
- tSide = (byte)((j + i) % 6);
-
- IFluidHandler tTileEntity = aBaseMetaTileEntity.getITankContainerAtSide(tSide);
- if (tTileEntity != null) {
- if (tTileEntity instanceof IGregTechTileEntity) {
- if (aBaseMetaTileEntity.getColorization() >= 0) {
- byte tColor = ((IGregTechTileEntity)tTileEntity).getColorization();
- if (tColor >= 0 && (tColor & 15) != (aBaseMetaTileEntity.getColorization() & 15)) {
- continue;
- }
- }
- }
- FluidTankInfo[] tInfo = tTileEntity.getTankInfo(ForgeDirection.getOrientation(tSide).getOpposite());
- if (tInfo != null && tInfo.length > 0) {
- if (tTileEntity instanceof ICoverable && ((ICoverable)tTileEntity).getCoverBehaviorAtSide(GT_Utility.getOppositeSide(tSide)).alwaysLookConnected(GT_Utility.getOppositeSide(tSide), ((ICoverable)tTileEntity).getCoverIDAtSide(GT_Utility.getOppositeSide(tSide)), ((ICoverable)tTileEntity).getCoverDataAtSide(GT_Utility.getOppositeSide(tSide)), ((ICoverable)tTileEntity))) {
- mConnections |= (1<<tSide);
- }
- if (aBaseMetaTileEntity.getCoverBehaviorAtSide(tSide).letsFluidIn(tSide, aBaseMetaTileEntity.getCoverIDAtSide(tSide), aBaseMetaTileEntity.getCoverDataAtSide(tSide), null, aBaseMetaTileEntity)) {
- mConnections |= (1<<tSide);
- }
- if (aBaseMetaTileEntity.getCoverBehaviorAtSide(tSide).letsFluidOut(tSide, aBaseMetaTileEntity.getCoverIDAtSide(tSide), aBaseMetaTileEntity.getCoverDataAtSide(tSide), null, aBaseMetaTileEntity)) {
- mConnections |= (1<<tSide);
- if (((1<<tSide) & mLastReceivedFrom) == 0) tTanks.put(tTileEntity, ForgeDirection.getOrientation(tSide).getOpposite());
- }
- if (aBaseMetaTileEntity.getCoverBehaviorAtSide(tSide).alwaysLookConnected(tSide, aBaseMetaTileEntity.getCoverIDAtSide(tSide), aBaseMetaTileEntity.getCoverDataAtSide(tSide), aBaseMetaTileEntity)) {
- mConnections |= (1<<tSide);
- }
- }
- }
- }
-
- if (mFluid != null && mFluid.amount > 0) {
- int tAmount = Math.max(1, Math.min(mCapacity*10, mFluid.amount / 2)), tSuccessfulTankAmount = 0;
-
- for (Entry<IFluidHandler, ForgeDirection> tEntry : tTanks.entrySet()) if (tEntry.getKey().fill(tEntry.getValue(), drain(tAmount, false), false) > 0) tSuccessfulTankAmount++;
-
- if (tSuccessfulTankAmount > 0) {
- if (tAmount >= tSuccessfulTankAmount) {
- tAmount /= tSuccessfulTankAmount;
- for (Entry<IFluidHandler, ForgeDirection> tTileEntity : tTanks.entrySet()) {
- if (mFluid == null || mFluid.amount <= 0) break;
- int tFilledAmount = tTileEntity.getKey().fill(tTileEntity.getValue(), drain(tAmount, false), false);
- if (tFilledAmount > 0) tTileEntity.getKey().fill(tTileEntity.getValue(), drain(tFilledAmount, true), true);
- }
- } else {
- for (Entry<IFluidHandler, ForgeDirection> tTileEntity : tTanks.entrySet()) {
- if (mFluid == null || mFluid.amount <= 0) break;
- int tFilledAmount = tTileEntity.getKey().fill(tTileEntity.getValue(), drain(mFluid.amount, false), false);
- if (tFilledAmount > 0) tTileEntity.getKey().fill(tTileEntity.getValue(), drain(tFilledAmount, true), true);
- }
- }
- }
- }
-
- mLastReceivedFrom = 0;
- }
-
- oLastReceivedFrom = mLastReceivedFrom;
- }
- }
-
- @Override
- public void doSound(byte aIndex, double aX, double aY, double aZ) {
- super.doSound(aIndex, aX, aY, aZ);
- if (aIndex == 9) {
- GT_Utility.doSoundAtClient(GregTech_API.sSoundList.get(4), 5, 1.0F, aX, aY, aZ);
- for (byte i = 0; i < 6; i++) for (int l = 0; l < 2; ++l) getBaseMetaTileEntity().getWorld().spawnParticle("largesmoke", aX - 0.5 + Math.random(), aY - 0.5 + Math.random(), aZ - 0.5 + Math.random(), ForgeDirection.getOrientation(i).offsetX / 5.0, ForgeDirection.getOrientation(i).offsetY / 5.0, ForgeDirection.getOrientation(i).offsetZ / 5.0);
- }
- }
-
- @Override
- public final int getCapacity() {
- return mCapacity * 20;
- }
-
- @Override
- public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
- return false;
- }
-
- @Override
- public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
- return false;
- }
-
- @Override
- public final FluidStack getFluid() {
- return mFluid;
- }
-
- @Override
- public final int getFluidAmount() {
- return mFluid != null ? mFluid.amount : 0;
- }
-
- @Override
- public final int fill_default(ForgeDirection aSide, FluidStack aFluid, boolean doFill) {
- if (aFluid == null || aFluid.getFluid().getID() <= 0) return 0;
-
- if (mFluid == null || mFluid.getFluid().getID() <= 0) {
- if(aFluid.amount <= getCapacity()) {
- if (doFill) {
- mFluid = aFluid.copy();
- mLastReceivedFrom |= (1<<aSide.ordinal());
- }
- return aFluid.amount;
- }
- if (doFill) {
- mFluid = aFluid.copy();
- mLastReceivedFrom |= (1<<aSide.ordinal());
- mFluid.amount = getCapacity();
- }
- return getCapacity();
- }
-
- if (!mFluid.isFluidEqual(aFluid)) return 0;
-
- int space = getCapacity() - mFluid.amount;
- if (aFluid.amount <= space) {
- if (doFill) {
- mFluid.amount += aFluid.amount;
- mLastReceivedFrom |= (1<<aSide.ordinal());
- }
- return aFluid.amount;
- }
- if (doFill) {
- mFluid.amount = getCapacity();
- mLastReceivedFrom |= (1<<aSide.ordinal());
- }
- return space;
- }
-
- @Override
- public final FluidStack drain(int maxDrain, boolean doDrain) {
- if (mFluid == null) return null;
- if (mFluid.amount <= 0) {
- mFluid = null;
- return null;
- }
-
- int used = maxDrain;
- if (mFluid.amount < used)
- used = mFluid.amount;
-
- if (doDrain) {
- mFluid.amount -= used;
- }
-
- FluidStack drained = mFluid.copy();
- drained.amount = used;
-
- if (mFluid.amount <= 0) {
- mFluid = null;
- }
-
- return drained;
- }
-
- @Override
- public int getTankPressure() {
- return (mFluid==null?0:mFluid.amount) - (getCapacity()/2);
- }
-
- @Override
- public String[] getDescription() {
- return new String[] {
- EnumChatFormatting.BLUE + "Fluid Capacity: " + (mCapacity*20) + "L/sec" + EnumChatFormatting.GRAY,
- EnumChatFormatting.RED + "Heat Limit: " + mHeatResistance + " K" + EnumChatFormatting.GRAY
- };
- }
-
- @Override
- public float getThickNess() {
- return mThickNess;
- }
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Frame.java b/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Frame.java
deleted file mode 100644
index a1ec9af85e..0000000000
--- a/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Frame.java
+++ /dev/null
@@ -1,59 +0,0 @@
-package gregtech.api.metatileentity.implementations;
-
-import static gregtech.api.enums.GT_Values.RA;
-import gregtech.api.enums.*;
-import gregtech.api.interfaces.ITexture;
-import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.metatileentity.MetaPipeEntity;
-import gregtech.api.objects.GT_RenderedTexture;
-import gregtech.api.util.GT_ModHandler;
-import gregtech.api.util.GT_ModHandler.RecipeBits;
-import gregtech.api.util.GT_OreDictUnificator;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-
-public class GT_MetaPipeEntity_Frame extends MetaPipeEntity {
- public final Materials mMaterial;
-
- public GT_MetaPipeEntity_Frame(int aID, String aName, String aNameRegional, Materials aMaterial) {
- super(aID, aName, aNameRegional, 0);
- mMaterial = aMaterial;
-
- GT_OreDictUnificator.registerOre(OrePrefixes.frameGt, aMaterial, getStackForm(1));
- GT_ModHandler.addCraftingRecipe(getStackForm(2), RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.BUFFERED, new Object[] {"SSS", "SwS", "SSS", 'S', OrePrefixes.stick.get(mMaterial)});
- RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.stick, aMaterial, 4), ItemList.Circuit_Integrated.getWithDamage(0, 4), getStackForm(1), 64, 8);
- }
-
- public GT_MetaPipeEntity_Frame(String aName, Materials aMaterial) {
- super(aName, 0);
- mMaterial = aMaterial;
- }
-
- @Override
- public byte getTileEntityBaseType() {
- return mMaterial==null?4:(byte)((mMaterial.contains(SubTag.WOOD) ? 12 : 4) + Math.max(0, Math.min(3, mMaterial.mToolQuality)));
- }
-
- @Override
- public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
- return new GT_MetaPipeEntity_Frame(mName, mMaterial);
- }
-
- @Override
- public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aConnections, byte aColorIndex, boolean aConnected, boolean aRedstone) {
- return new ITexture[] {new GT_RenderedTexture(mMaterial.mIconSet.mTextures[OrePrefixes.frameGt.mTextureIndex], Dyes.getModulation(aColorIndex, mMaterial.mRGBa))};
- }
-
- @Override public String[] getDescription() {return new String[] {"Just something you can put a Cover or CFoam on."};}
-
- @Override public final boolean isSimpleMachine() {return true;}
- @Override public final boolean isFacingValid(byte aFacing) {return false;}
- @Override public final boolean isValidSlot(int aIndex) {return false;}
- @Override public final boolean renderInside(byte aSide) {return true;}
- @Override public final float getThickNess() {return 1.0F;}
- @Override public final void saveNBTData(NBTTagCompound aNBT) {/*Do nothing*/}
- @Override public final void loadNBTData(NBTTagCompound aNBT) {/*Do nothing*/}
- @Override public final boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {return false;}
- @Override public final boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {return false;}
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Item.java b/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Item.java
deleted file mode 100644
index 59ff78e372..0000000000
--- a/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Item.java
+++ /dev/null
@@ -1,269 +0,0 @@
-package gregtech.api.metatileentity.implementations;
-
-import gregtech.api.GregTech_API;
-import gregtech.api.enums.*;
-import gregtech.api.interfaces.ITexture;
-import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
-import gregtech.api.interfaces.metatileentity.IMetaTileEntityItemPipe;
-import gregtech.api.interfaces.tileentity.ICoverable;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.metatileentity.BaseMetaPipeEntity;
-import gregtech.api.metatileentity.MetaPipeEntity;
-import gregtech.api.objects.GT_RenderedTexture;
-import gregtech.api.util.GT_Utility;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-
-import net.minecraft.inventory.IInventory;
-import net.minecraft.inventory.ISidedInventory;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.tileentity.TileEntityDispenser;
-import net.minecraft.tileentity.TileEntityHopper;
-
-public class GT_MetaPipeEntity_Item extends MetaPipeEntity implements IMetaTileEntityItemPipe {
- public int mTransferredItems = 0;
- public byte mLastReceivedFrom = 0, oLastReceivedFrom = 0;
- public boolean mIsRestrictive = false;
-
- public final float mThickNess;
- public final Materials mMaterial;
- public final int mStepSize;
-
- public GT_MetaPipeEntity_Item(int aID, String aName, String aNameRegional, float aThickNess, Materials aMaterial, int aInvSlotCount, int aStepSize, boolean aIsRestrictive) {
- super(aID, aName, aNameRegional, aInvSlotCount);
- mIsRestrictive = aIsRestrictive;
- mThickNess = aThickNess;
- mMaterial = aMaterial;
- mStepSize = aStepSize;
- }
-
- public GT_MetaPipeEntity_Item(String aName, float aThickNess, Materials aMaterial, int aInvSlotCount, int aStepSize, boolean aIsRestrictive) {
- super(aName, aInvSlotCount);
- mIsRestrictive = aIsRestrictive;
- mThickNess = aThickNess;
- mMaterial = aMaterial;
- mStepSize = aStepSize;
- }
-
- @Override
- public byte getTileEntityBaseType() {
- return mMaterial==null?4:(byte)((mMaterial.contains(SubTag.WOOD) ? 12 : 4) + Math.max(0, Math.min(3, mMaterial.mToolQuality)));
- }
-
- @Override
- public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
- return new GT_MetaPipeEntity_Item(mName, mThickNess, mMaterial, mInventory.length, mStepSize, mIsRestrictive);
- }
-
- @Override
- public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aConnections, byte aColorIndex, boolean aConnected, boolean aRedstone) {
- if (mIsRestrictive) {
- if (aConnected) {
- float tThickNess = getThickNess();
- if (tThickNess < 0.37F) return new ITexture[] {new GT_RenderedTexture(mMaterial.mIconSet.mTextures[OrePrefixes.pipeTiny.mTextureIndex ], Dyes.getModulation(aColorIndex, mMaterial.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.PIPE_RESTRICTOR)};
- if (tThickNess < 0.49F) return new ITexture[] {new GT_RenderedTexture(mMaterial.mIconSet.mTextures[OrePrefixes.pipeSmall.mTextureIndex ], Dyes.getModulation(aColorIndex, mMaterial.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.PIPE_RESTRICTOR)};
- if (tThickNess < 0.74F) return new ITexture[] {new GT_RenderedTexture(mMaterial.mIconSet.mTextures[OrePrefixes.pipeMedium.mTextureIndex ], Dyes.getModulation(aColorIndex, mMaterial.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.PIPE_RESTRICTOR)};
- if (tThickNess < 0.99F) return new ITexture[] {new GT_RenderedTexture(mMaterial.mIconSet.mTextures[OrePrefixes.pipeLarge.mTextureIndex ], Dyes.getModulation(aColorIndex, mMaterial.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.PIPE_RESTRICTOR)};
- return new ITexture[] {new GT_RenderedTexture(mMaterial.mIconSet.mTextures[OrePrefixes.pipeHuge.mTextureIndex ], Dyes.getModulation(aColorIndex, mMaterial.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.PIPE_RESTRICTOR)};
- }
- return new ITexture[] {new GT_RenderedTexture(mMaterial.mIconSet.mTextures[OrePrefixes.pipe.mTextureIndex ], Dyes.getModulation(aColorIndex, mMaterial.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.PIPE_RESTRICTOR)};
- }
- if (aConnected) {
- float tThickNess = getThickNess();
- if (tThickNess < 0.37F) return new ITexture[] {new GT_RenderedTexture(mMaterial.mIconSet.mTextures[OrePrefixes.pipeTiny.mTextureIndex ], Dyes.getModulation(aColorIndex, mMaterial.mRGBa))};
- if (tThickNess < 0.49F) return new ITexture[] {new GT_RenderedTexture(mMaterial.mIconSet.mTextures[OrePrefixes.pipeSmall.mTextureIndex ], Dyes.getModulation(aColorIndex, mMaterial.mRGBa))};
- if (tThickNess < 0.74F) return new ITexture[] {new GT_RenderedTexture(mMaterial.mIconSet.mTextures[OrePrefixes.pipeMedium.mTextureIndex ], Dyes.getModulation(aColorIndex, mMaterial.mRGBa))};
- if (tThickNess < 0.99F) return new ITexture[] {new GT_RenderedTexture(mMaterial.mIconSet.mTextures[OrePrefixes.pipeLarge.mTextureIndex ], Dyes.getModulation(aColorIndex, mMaterial.mRGBa))};
- return new ITexture[] {new GT_RenderedTexture(mMaterial.mIconSet.mTextures[OrePrefixes.pipeHuge.mTextureIndex ], Dyes.getModulation(aColorIndex, mMaterial.mRGBa))};
- }
- return new ITexture[] {new GT_RenderedTexture(mMaterial.mIconSet.mTextures[OrePrefixes.pipe.mTextureIndex ], Dyes.getModulation(aColorIndex, mMaterial.mRGBa))};
- }
-
- @Override public boolean isSimpleMachine() {return true;}
- @Override public boolean isFacingValid(byte aFacing) {return false;}
- @Override public boolean isValidSlot(int aIndex) {return true;}
- @Override public final boolean renderInside(byte aSide) {return false;}
- @Override public int getProgresstime() {return getPipeContent()*64;}
- @Override public int maxProgresstime() {return getMaxPipeCapacity()*64;}
-
- @Override
- public void saveNBTData(NBTTagCompound aNBT) {
- aNBT.setByte("mLastReceivedFrom", mLastReceivedFrom);
- }
-
- @Override
- public void loadNBTData(NBTTagCompound aNBT) {
- mLastReceivedFrom = aNBT.getByte("mLastReceivedFrom");
- }
-
- @Override
- public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
- if (aBaseMetaTileEntity.isServerSide() && aTick % 10 == 0) {
- mConnections = 0;
- if (aTick % 20 == 0) mTransferredItems = 0;
-
- for (byte i = 0; i < 6; i++) {
- TileEntity tTileEntity = aBaseMetaTileEntity.getTileEntityAtSide(i);
- if (tTileEntity != null) {
- boolean temp = GT_Utility.isConnectableNonInventoryPipe(tTileEntity, GT_Utility.getOppositeSide(i));
- if (tTileEntity instanceof IGregTechTileEntity) {
- temp = true;
- if (((IGregTechTileEntity)tTileEntity).getMetaTileEntity() == null) continue;
- if (aBaseMetaTileEntity.getColorization() >= 0) {
- byte tColor = ((IGregTechTileEntity)tTileEntity).getColorization();
- if (tColor >= 0 && tColor != aBaseMetaTileEntity.getColorization()) {
- continue;
- }
- }
- if (((IGregTechTileEntity)tTileEntity).getMetaTileEntity().connectsToItemPipe(GT_Utility.getOppositeSide(i))) {
- mConnections |= (1<<i);
- continue;
- }
- }
- if (tTileEntity instanceof IInventory) {
- temp = true;
- if (((IInventory)tTileEntity).getSizeInventory() <= 0) {
- continue;
- }
- }
- if (tTileEntity instanceof ISidedInventory) {
- temp = true;
- int[] tSlots = ((ISidedInventory)tTileEntity).getAccessibleSlotsFromSide(GT_Utility.getOppositeSide(i));
- if (tSlots == null || tSlots.length <= 0) {
- continue;
- }
- }
- if (temp) {
- if (tTileEntity instanceof ICoverable && ((ICoverable)tTileEntity).getCoverBehaviorAtSide(GT_Utility.getOppositeSide(i)).alwaysLookConnected(GT_Utility.getOppositeSide(i), ((ICoverable)tTileEntity).getCoverIDAtSide(GT_Utility.getOppositeSide(i)), ((ICoverable)tTileEntity).getCoverDataAtSide(GT_Utility.getOppositeSide(i)), ((ICoverable)tTileEntity))) {
- mConnections |= (1<<i);
- continue;
- }
- if (aBaseMetaTileEntity.getCoverBehaviorAtSide(i).alwaysLookConnected(i, aBaseMetaTileEntity.getCoverIDAtSide(i), aBaseMetaTileEntity.getCoverDataAtSide(i), aBaseMetaTileEntity)) {
- mConnections |= (1<<i);
- continue;
- }
- if (aBaseMetaTileEntity.getCoverBehaviorAtSide(i).letsItemsIn(i, aBaseMetaTileEntity.getCoverIDAtSide(i), aBaseMetaTileEntity.getCoverDataAtSide(i), -1, aBaseMetaTileEntity)) {
- mConnections |= (1<<i);
- continue;
- }
- if (aBaseMetaTileEntity.getCoverBehaviorAtSide(i).letsItemsOut(i, aBaseMetaTileEntity.getCoverIDAtSide(i), aBaseMetaTileEntity.getCoverDataAtSide(i), -1, aBaseMetaTileEntity)) {
- mConnections |= (1<<i);
- continue;
- }
- }
- }
- }
-
- if (oLastReceivedFrom == mLastReceivedFrom) {
- doTickProfilingInThisTick = false;
-
- ArrayList<IMetaTileEntityItemPipe> tPipeList = new ArrayList<IMetaTileEntityItemPipe>();
-
- for (boolean temp = true; temp && !isInventoryEmpty() && pipeCapacityCheck();) {
- temp = false;
- tPipeList.clear();
- for (IMetaTileEntityItemPipe tTileEntity : GT_Utility.sortMapByValuesAcending(IMetaTileEntityItemPipe.Util.scanPipes(this, new HashMap<IMetaTileEntityItemPipe, Long>(), 0, false, false)).keySet()) {
- if (temp) break;
- tPipeList.add(tTileEntity);
- while (!temp && !isInventoryEmpty() && tTileEntity.sendItemStack(aBaseMetaTileEntity)) for (IMetaTileEntityItemPipe tPipe : tPipeList) if (!tPipe.incrementTransferCounter(1)) temp = true;
- }
- }
- }
-
- if (isInventoryEmpty()) mLastReceivedFrom = 6;
- oLastReceivedFrom = mLastReceivedFrom;
- }
- }
-
- @Override
- public boolean incrementTransferCounter(int aIncrement) {
- mTransferredItems += aIncrement;
- return pipeCapacityCheck();
- }
-
- @Override
- public boolean sendItemStack(Object aSender) {
- if (pipeCapacityCheck()) {
- byte tOffset = (byte)getBaseMetaTileEntity().getRandomNumber(6), tSide = 0;
- for (byte i = 0; i < 6; i++) {
- tSide = (byte)((i+tOffset)%6);
- if (isInventoryEmpty() || (tSide != mLastReceivedFrom || aSender != getBaseMetaTileEntity())) {
- if (insertItemStackIntoTileEntity(aSender, tSide)) return true;
- }
- }
- }
- return false;
- }
-
- @Override
- public boolean insertItemStackIntoTileEntity(Object aSender, byte aSide) {
- if (getBaseMetaTileEntity().getCoverBehaviorAtSide(aSide).letsItemsOut(aSide, getBaseMetaTileEntity().getCoverIDAtSide(aSide), getBaseMetaTileEntity().getCoverDataAtSide(aSide), -1, getBaseMetaTileEntity())) {
- TileEntity tInventory = getBaseMetaTileEntity().getTileEntityAtSide(aSide);
- if (tInventory != null && !(tInventory instanceof BaseMetaPipeEntity)) {
- if ((!(tInventory instanceof TileEntityHopper) && !(tInventory instanceof TileEntityDispenser)) || getBaseMetaTileEntity().getMetaIDAtSide(aSide) != GT_Utility.getOppositeSide(aSide)) {
- return GT_Utility.moveOneItemStack(aSender, tInventory, (byte)6, GT_Utility.getOppositeSide(aSide), null, false, (byte)64, (byte)1, (byte)64, (byte)1) > 0;
- }
- }
- }
- return false;
- }
-
- @Override
- public boolean pipeCapacityCheck() {
- return mTransferredItems <= 0 || getPipeContent() < getMaxPipeCapacity();
- }
-
- private int getPipeContent() {
- return mTransferredItems;
- }
-
- private int getMaxPipeCapacity() {
- return Math.max(1, getPipeCapacity());
- }
-
- /**
- * Amount of ItemStacks this Pipe can conduct per Second.
- */
- public int getPipeCapacity() {
- return mInventory.length;
- }
-
- @Override
- public int getStepSize() {
- return mStepSize;
- }
-
- @Override
- public boolean canExtractItem(int aIndex, ItemStack aStack, int aSide) {
- return true;
- }
-
- @Override
- public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
- return true;
- }
-
- @Override
- public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
- if (isInventoryEmpty()) mLastReceivedFrom = aSide;
- return mLastReceivedFrom == aSide && mInventory[aIndex] == null;
- }
-
- @Override
- public String[] getDescription() {
- return new String[] {"Item Capacity: "+getMaxPipeCapacity()+" Stacks/sec", "Routing Value: " + mStepSize};
- }
-
- private boolean isInventoryEmpty() {
- for (ItemStack tStack : mInventory) if (tStack != null) return false;
- return true;
- }
-
- @Override
- public float getThickNess() {
- return mThickNess;
- }
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicBatteryBuffer.java b/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicBatteryBuffer.java
deleted file mode 100644
index 72df4d7cdb..0000000000
--- a/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicBatteryBuffer.java
+++ /dev/null
@@ -1,213 +0,0 @@
-package gregtech.api.metatileentity.implementations;
-
-import static gregtech.api.enums.GT_Values.V;
-import ic2.api.item.IElectricItem;
-import gregtech.api.enums.ItemList;
-import gregtech.api.enums.Textures;
-import gregtech.api.gui.*;
-import gregtech.api.interfaces.ITexture;
-import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.items.GT_MetaBase_Item;
-import gregtech.api.util.GT_LanguageManager;
-import gregtech.api.util.GT_ModHandler;
-import gregtech.api.util.GT_Utility;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-
-/**
- * NEVER INCLUDE THIS FILE IN YOUR MOD!!!
- *
- * This is the main construct for my Basic Machines such as the Automatic Extractor
- * Extend this class to make a simple Machine
- */
-public class GT_MetaTileEntity_BasicBatteryBuffer extends GT_MetaTileEntity_TieredMachineBlock {
- public boolean mCharge = false, mDecharge = false;
- public int mBatteryCount = 0, mChargeableCount = 0;
-
- public GT_MetaTileEntity_BasicBatteryBuffer(int aID, String aName, String aNameRegional, int aTier, String aDescription, int aSlotCount) {
- super(aID, aName, aNameRegional, aTier, aSlotCount, aDescription);
- }
-
- public GT_MetaTileEntity_BasicBatteryBuffer(String aName, int aTier, String aDescription, ITexture[][][] aTextures, int aSlotCount) {
- super(aName, aTier, aSlotCount, aDescription, aTextures);
- }
-
- @Override
- public String[] getDescription() {
- return new String[] {mDescription, mInventory.length + " Slots"};
- }
-
- @Override
- public ITexture[][][] getTextureSet(ITexture[] aTextures) {
- ITexture[][][] rTextures = new ITexture[2][17][];
- for (byte i = -1; i < 16; i++) {
- rTextures[ 0][i+1] = new ITexture[] {Textures.BlockIcons.MACHINE_CASINGS[mTier][i+1]};
- rTextures[ 1][i+1] = new ITexture[] {Textures.BlockIcons.MACHINE_CASINGS[mTier][i+1], mInventory.length > 4 ? Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[mTier] : Textures.BlockIcons.OVERLAYS_ENERGY_OUT[mTier]};
- }
- return rTextures;
- }
-
- @Override
- public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
- return mTextures[aSide == aFacing ? 1 : 0][aColorIndex+1];
- }
-
- @Override
- public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
- return new GT_MetaTileEntity_BasicBatteryBuffer(mName, mTier, mDescription, mTextures, mInventory.length);
- }
-
- @Override public boolean isSimpleMachine() {return false;}
- @Override public boolean isElectric() {return true;}
- @Override public boolean isValidSlot(int aIndex) {return true;}
- @Override public boolean isFacingValid(byte aFacing) {return true;}
- @Override public boolean isEnetInput() {return true;}
- @Override public boolean isEnetOutput() {return true;}
- @Override public boolean isInputFacing(byte aSide) {return aSide!=getBaseMetaTileEntity().getFrontFacing();}
- @Override public boolean isOutputFacing(byte aSide) {return aSide==getBaseMetaTileEntity().getFrontFacing();}
- @Override public boolean isTeleporterCompatible() {return false;}
- @Override public long getMinimumStoredEU() {return V[mTier]*16*mInventory.length;}
- @Override public long maxEUStore() {return V[mTier]*64*mInventory.length;}
- @Override public long maxEUInput() {return V[mTier];}
- @Override public long maxEUOutput() {return V[mTier];}
- @Override public long maxAmperesIn() {return mChargeableCount * 2;}
- @Override public long maxAmperesOut() {return mBatteryCount;}
- @Override public int rechargerSlotStartIndex() {return 0;}
- @Override public int dechargerSlotStartIndex() {return 0;}
- @Override public int rechargerSlotCount() {return mCharge?mInventory.length:0;}
- @Override public int dechargerSlotCount() {return mDecharge?mInventory.length:0;}
- @Override public int getProgresstime() {return (int)getBaseMetaTileEntity().getUniversalEnergyStored();}
- @Override public int maxProgresstime() {return (int)getBaseMetaTileEntity().getUniversalEnergyCapacity();}
- @Override public boolean isAccessAllowed(EntityPlayer aPlayer) {return true;}
-
- @Override
- public void saveNBTData(NBTTagCompound aNBT) {
- //
- }
-
- @Override
- public void loadNBTData(NBTTagCompound aNBT) {
- //
- }
-
- @Override
- public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) {
- if (aBaseMetaTileEntity.isClientSide()) return true;
- aBaseMetaTileEntity.openGUI(aPlayer);
- return true;
- }
-
- @Override
- public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- switch (mInventory.length) {
- case 1: return new GT_Container_1by1(aPlayerInventory, aBaseMetaTileEntity);
- case 4: return new GT_Container_2by2(aPlayerInventory, aBaseMetaTileEntity);
- case 9: return new GT_Container_3by3(aPlayerInventory, aBaseMetaTileEntity);
- case 16: return new GT_Container_4by4(aPlayerInventory, aBaseMetaTileEntity);
- }
- return new GT_Container_1by1(aPlayerInventory, aBaseMetaTileEntity);
- }
-
- @Override
- public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- switch (mInventory.length) {
- case 1: return new GT_GUIContainer_1by1(aPlayerInventory, aBaseMetaTileEntity, getLocalName());
- case 4: return new GT_GUIContainer_2by2(aPlayerInventory, aBaseMetaTileEntity, getLocalName());
- case 9: return new GT_GUIContainer_3by3(aPlayerInventory, aBaseMetaTileEntity, getLocalName());
- case 16: return new GT_GUIContainer_4by4(aPlayerInventory, aBaseMetaTileEntity, getLocalName());
- }
- return new GT_GUIContainer_1by1(aPlayerInventory, aBaseMetaTileEntity, getLocalName());
- }
-
- @Override
- public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
- if (aBaseMetaTileEntity.isServerSide()) {
- mCharge = aBaseMetaTileEntity.getStoredEU() / 2 > aBaseMetaTileEntity.getEUCapacity() / 3;
- mDecharge = aBaseMetaTileEntity.getStoredEU() < aBaseMetaTileEntity.getEUCapacity() / 3;
- mBatteryCount = 0;
- mChargeableCount = 0;
- for (ItemStack tStack : mInventory) if (GT_ModHandler.isElectricItem(tStack, mTier)) {
- if (GT_ModHandler.isChargerItem(tStack)) mBatteryCount++;
- mChargeableCount++;
- }
- }
- }
-
- @Override
- public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
- if(GT_ModHandler.isElectricItem(aStack)&&aStack.getUnlocalizedName().startsWith("gt.metaitem.01.")){
- String name = aStack.getUnlocalizedName();
- if(name.equals("gt.metaitem.01.32510")||
- name.equals("gt.metaitem.01.32511")||
- name.equals("gt.metaitem.01.32520")||
- name.equals("gt.metaitem.01.32521")||
- name.equals("gt.metaitem.01.32530")||
- name.equals("gt.metaitem.01.32531")){
- return true;}
- }
- return false;
- }
-
- @Override
- public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
- if(!GT_Utility.isStackValid(aStack)){
- return false;
- }
- if(GT_ModHandler.isElectricItem(aStack, this.mTier)){
- return true;
- }
- return false;
- }
-
- public long[] getStoredEnergy(){
- long tScale = getBaseMetaTileEntity().getEUCapacity();
- long tStored = getBaseMetaTileEntity().getStoredEU();
- if(mInventory!=null){
- for(ItemStack aStack : mInventory){
- if (GT_ModHandler.isElectricItem(aStack)) {
-
- if(aStack.getItem() instanceof GT_MetaBase_Item){
- Long[] stats = ((GT_MetaBase_Item)aStack.getItem()).getElectricStats(aStack);
- if(stats!=null){
- tScale = tScale + stats[0];
- tStored = tStored + ((GT_MetaBase_Item)aStack.getItem()).getRealCharge(aStack);
- }
- }else if(aStack.getItem() instanceof IElectricItem){
- tStored = tStored + (long)ic2.api.item.ElectricItem.manager.getCharge(aStack);
- tScale = tScale + (long)((IElectricItem)aStack.getItem()).getMaxCharge(aStack);
- }
- }
- }
-
- }
- return new long[] {tStored,tScale};
- }
-
- private long count=0;
- private long mStored=0;
- private long mMax=0;
-
- @Override
- public String[] getInfoData() {
- count++;
- if(mMax==0||count%20==0){
- long[] tmp = getStoredEnergy();
- mStored=tmp[0];
- mMax=tmp[1];
- }
-
- return new String[] {
- getLocalName(),
- "Stored Items:",
- GT_Utility.formatNumbers(mStored)+" EU /",
- GT_Utility.formatNumbers(mMax)+" EU"};
- }
-
- @Override
- public boolean isGivingInformation() {
- return true;
- }
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicGenerator.java b/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicGenerator.java
deleted file mode 100644
index 97d189170e..0000000000
--- a/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicGenerator.java
+++ /dev/null
@@ -1,167 +0,0 @@
-package gregtech.api.metatileentity.implementations;
-
-import static gregtech.api.enums.GT_Values.V;
-import gregtech.api.enums.Textures;
-import gregtech.api.interfaces.ITexture;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.util.GT_Recipe;
-import gregtech.api.util.GT_Recipe.GT_Recipe_Map;
-import gregtech.api.util.GT_Utility;
-
-import java.util.Collection;
-
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Blocks;
-import net.minecraft.item.ItemStack;
-import net.minecraftforge.fluids.FluidStack;
-
-public abstract class GT_MetaTileEntity_BasicGenerator extends GT_MetaTileEntity_BasicTank {
- public GT_MetaTileEntity_BasicGenerator(int aID, String aName, String aNameRegional, int aTier, String aDescription, ITexture... aTextures) {
- super(aID, aName, aNameRegional, aTier, 3, aDescription, aTextures);
- }
-
- public GT_MetaTileEntity_BasicGenerator(String aName, int aTier, String aDescription, ITexture[][][] aTextures) {
- super(aName, aTier, 3, aDescription, aTextures);
- }
-
- @Override
- public ITexture[][][] getTextureSet(ITexture[] aTextures) {
- ITexture[][][] rTextures = new ITexture[10][17][];
- for (byte i = -1; i < 16; i++) {
- rTextures[ 0][i+1] = getFront(i);
- rTextures[ 1][i+1] = getBack(i);
- rTextures[ 2][i+1] = getBottom(i);
- rTextures[ 3][i+1] = getTop(i);
- rTextures[ 4][i+1] = getSides(i);
- rTextures[ 5][i+1] = getFrontActive(i);
- rTextures[ 6][i+1] = getBackActive(i);
- rTextures[ 7][i+1] = getBottomActive(i);
- rTextures[ 8][i+1] = getTopActive(i);
- rTextures[ 9][i+1] = getSidesActive(i);
- }
- return rTextures;
- }
-
- @Override
- public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
- return mTextures[(aActive?5:0)+(aSide==aFacing?0:aSide==GT_Utility.getOppositeSide(aFacing)?1:aSide==0?2:aSide==1?3:4)][aColorIndex+1];
- }
-
- @Override
- public String[] getDescription() {
- return new String[] {mDescription, "Fuel Efficiency: " + getEfficiency() + "%"};
- }
-
- @Override
- public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) {
- if (aBaseMetaTileEntity.isClientSide()) return true;
- aBaseMetaTileEntity.openGUI(aPlayer);
- return true;
- }
-
- public ITexture[] getFront(byte aColor) {return new ITexture[] {Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor+1]};}
- public ITexture[] getBack(byte aColor) {return new ITexture[] {Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor+1]};}
- public ITexture[] getBottom(byte aColor) {return new ITexture[] {Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor+1]};}
- public ITexture[] getTop(byte aColor) {return new ITexture[] {Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor+1]};}
- public ITexture[] getSides(byte aColor) {return new ITexture[] {Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor+1]};}
-
- public ITexture[] getFrontActive(byte aColor) {return getFront(aColor);}
- public ITexture[] getBackActive(byte aColor) {return getBack(aColor);}
- public ITexture[] getBottomActive(byte aColor) {return getBottom(aColor);}
- public ITexture[] getTopActive(byte aColor) {return getTop(aColor);}
- public ITexture[] getSidesActive(byte aColor) {return getSides(aColor);}
-
- @Override public boolean isFacingValid(byte aSide) {return aSide > 1;}
- @Override public boolean isSimpleMachine() {return false;}
- @Override public boolean isValidSlot(int aIndex) {return aIndex < 2;}
- @Override public boolean isEnetOutput() {return true;}
- @Override public boolean isOutputFacing(byte aSide) {return true;}
- @Override public boolean isAccessAllowed(EntityPlayer aPlayer) {return true;}
- @Override public long maxEUOutput() {return getBaseMetaTileEntity().isAllowedToWork()?V[mTier]:0;}
- @Override public long maxEUStore() {return Math.max(getEUVar(), V[mTier] * 20 + getMinimumStoredEU());}
-
- @Override public boolean doesFillContainers() {return getBaseMetaTileEntity().isAllowedToWork();}
- @Override public boolean doesEmptyContainers() {return getBaseMetaTileEntity().isAllowedToWork();}
- @Override public boolean canTankBeFilled() {return getBaseMetaTileEntity().isAllowedToWork();}
- @Override public boolean canTankBeEmptied() {return getBaseMetaTileEntity().isAllowedToWork();}
- @Override public boolean displaysItemStack() {return true;}
- @Override public boolean displaysStackSize() {return false;}
- @Override public boolean isFluidInputAllowed(FluidStack aFluid) {return getFuelValue(aFluid) > 0;}
-
- @Override
- public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
- if (aBaseMetaTileEntity.isServerSide() && aBaseMetaTileEntity.isAllowedToWork() && aTick%10==0) {
- if (mFluid == null) {
- if (aBaseMetaTileEntity.getUniversalEnergyStored() < maxEUOutput() + getMinimumStoredEU()) {
- mInventory[getStackDisplaySlot()] = null;
- } else {
- if (mInventory[getStackDisplaySlot()] == null) mInventory[getStackDisplaySlot()] = new ItemStack(Blocks.fire, 1);
- mInventory[getStackDisplaySlot()].setStackDisplayName("Generating: " + (aBaseMetaTileEntity.getUniversalEnergyStored() - getMinimumStoredEU()) + " EU");
- }
- } else {
- int tFuelValue = getFuelValue(mFluid), tConsumed = consumedFluidPerOperation(mFluid);
- if (tFuelValue > 0 && tConsumed > 0 && mFluid.amount > tConsumed) {
- long tFluidAmountToUse = Math.min(mFluid.amount / tConsumed, (maxEUOutput() * 20 + getMinimumStoredEU() - aBaseMetaTileEntity.getUniversalEnergyStored()) / tFuelValue);
- if (tFluidAmountToUse > 0 && aBaseMetaTileEntity.increaseStoredEnergyUnits(tFluidAmountToUse * tFuelValue, true)) mFluid.amount -= tFluidAmountToUse * tConsumed;
- }
- }
- if (mInventory[getInputSlot()] != null && aBaseMetaTileEntity.getUniversalEnergyStored() < (maxEUOutput() * 20 + getMinimumStoredEU()) && GT_Utility.getFluidForFilledItem(mInventory[getInputSlot()], true) == null) {
- int tFuelValue = getFuelValue(mInventory[getInputSlot()]);
- if (tFuelValue > 0) {
- ItemStack tEmptyContainer = getEmptyContainer(mInventory[getInputSlot()]);
- if (aBaseMetaTileEntity.addStackToSlot(getOutputSlot(), tEmptyContainer)) {
- aBaseMetaTileEntity.increaseStoredEnergyUnits(tFuelValue, true);
- aBaseMetaTileEntity.decrStackSize(getInputSlot(), 1);
- }
- }
- }
- }
-
- if (aBaseMetaTileEntity.isServerSide()) aBaseMetaTileEntity.setActive(aBaseMetaTileEntity.isAllowedToWork() && aBaseMetaTileEntity.getUniversalEnergyStored() >= maxEUOutput() + getMinimumStoredEU());
- }
-
- public abstract GT_Recipe_Map getRecipes();
-
- public abstract int getEfficiency();
-
- public int consumedFluidPerOperation(FluidStack aLiquid) {
- return 1;
- }
-
- public int getFuelValue(FluidStack aLiquid) {
- if (aLiquid == null || getRecipes() == null) return 0;
- FluidStack tLiquid;
- Collection<GT_Recipe> tRecipeList = getRecipes().mRecipeList;
- if (tRecipeList != null) for (GT_Recipe tFuel : tRecipeList) if ((tLiquid = GT_Utility.getFluidForFilledItem(tFuel.getRepresentativeInput(0), true)) != null) if (aLiquid.isFluidEqual(tLiquid)) return (int)(((long)tFuel.mSpecialValue * getEfficiency() * consumedFluidPerOperation(tLiquid)) / 100);
- return 0;
- }
-
- public int getFuelValue(ItemStack aStack) {
- if (GT_Utility.isStackInvalid(aStack) || getRecipes() == null) return 0;
- GT_Recipe tFuel = getRecipes().findRecipe(getBaseMetaTileEntity(), false, Long.MAX_VALUE, null, aStack);
- if (tFuel != null) return (int)((tFuel.mSpecialValue * 1000L * getEfficiency()) / 100);
- return 0;
- }
-
- public ItemStack getEmptyContainer(ItemStack aStack) {
- if (GT_Utility.isStackInvalid(aStack) || getRecipes() == null) return null;
- GT_Recipe tFuel = getRecipes().findRecipe(getBaseMetaTileEntity(), false, Long.MAX_VALUE, null, aStack);
- if (tFuel != null) return GT_Utility.copy(tFuel.getOutput(0));
- return GT_Utility.getContainerItem(aStack, true);
- }
-
- @Override
- public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
- return super.allowPutStack(aBaseMetaTileEntity, aIndex, aSide, aStack) && (getFuelValue(aStack) > 0 || getFuelValue(GT_Utility.getFluidForFilledItem(aStack, true)) > 0);
- }
-
- @Override
- public int getCapacity() {
- return 16000;
- }
-
- @Override
- public int getTankPressure() {
- return -100;
- }
-}
diff --git a/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicHull.java b/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicHull.java
deleted file mode 100644
index b74310f8d8..0000000000
--- a/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicHull.java
+++ /dev/null
@@ -1,99 +0,0 @@
-package gregtech.api.metatileentity.implementations;
-
-import static gregtech.api.enums.GT_Values.V;
-import gregtech.api.enums.Textures;
-import gregtech.api.interfaces.ITexture;
-import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-
-public class GT_MetaTileEntity_BasicHull extends GT_MetaTileEntity_BasicTank {
- public GT_MetaTileEntity_BasicHull(int aID, String aName, String aNameRegional, int aTier, String aDescription, ITexture... aTextures) {
- super(aID, aName, aNameRegional, aTier, 1, aDescription, aTextures);
- }
-
- public GT_MetaTileEntity_BasicHull(int aID, String aName, String aNameRegional, int aTier, int aInvSlotCount, String aDescription, ITexture... aTextures) {
- super(aID, aName, aNameRegional, aTier, aInvSlotCount, aDescription, aTextures);
- }
-
- public GT_MetaTileEntity_BasicHull(String aName, int aTier, int aInvSlotCount, String aDescription, ITexture[][][] aTextures) {
- super(aName, aTier, aInvSlotCount, aDescription, aTextures);
- }
-
- @Override
- public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
- return new GT_MetaTileEntity_BasicHull(mName, mTier, mInventory.length, mDescription, mTextures);
- }
-
- @Override public boolean isElectric() {return true;}
- @Override public boolean isEnetInput() {return true;}
- @Override public boolean isEnetOutput() {return true;}
- @Override public boolean isAccessAllowed(EntityPlayer aPlayer) {return true;}
- @Override public boolean isInputFacing(byte aSide) {return !isOutputFacing(aSide);}
- @Override public boolean isOutputFacing(byte aSide) {return aSide == getBaseMetaTileEntity().getFrontFacing();}
- @Override public long getMinimumStoredEU() {return 512;}
- @Override public long maxEUStore() {return 512+V[mTier]*50;}
- @Override public long maxEUInput() {return V[mTier];}
- @Override public long maxEUOutput() {return V[mTier];}
-
- @Override public boolean isSimpleMachine() {return true;}
- @Override public boolean isFacingValid(byte aFacing) {return true;}
- @Override public boolean isValidSlot(int aIndex) {return true;}
- @Override public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {return true;}
- @Override public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {return true;}
-
- @Override
- public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aConnected, boolean aRedstone) {
- return mTextures[Math.min(2, aSide) + (aSide==aFacing?3:0)][aColorIndex+1];
- }
-
- @Override
- public ITexture[][][] getTextureSet(ITexture[] aTextures) {
- ITexture[][][] rTextures = new ITexture[6][17][];
- for (byte i = -1; i < 16; i++) {
- rTextures[ 0][i+1] = new ITexture[] {Textures.BlockIcons.MACHINE_CASINGS[mTier][i+1]};
- rTextures[ 1][i+1] = new ITexture[] {Textures.BlockIcons.MACHINE_CASINGS[mTier][i+1]};
- rTextures[ 2][i+1] = new ITexture[] {Textures.BlockIcons.MACHINE_CASINGS[mTier][i+1]};
- rTextures[ 3][i+1] = new ITexture[] {Textures.BlockIcons.MACHINE_CASINGS[mTier][i+1], Textures.BlockIcons.OVERLAYS_ENERGY_OUT[mTier]};
- rTextures[ 4][i+1] = new ITexture[] {Textures.BlockIcons.MACHINE_CASINGS[mTier][i+1], Textures.BlockIcons.OVERLAYS_ENERGY_OUT[mTier]};
- rTextures[ 5][i+1] = new ITexture[] {Textures.BlockIcons.MACHINE_CASINGS[mTier][i+1], Textures.BlockIcons.OVERLAYS_ENERGY_OUT[mTier]};
- }
- return rTextures;
- }
-
- @Override
- public boolean doesFillContainers() {
- return false;
- }
-
- @Override
- public boolean doesEmptyContainers() {
- return false;
- }
-
- @Override
- public boolean canTankBeFilled() {
- return true;
- }
-
- @Override
- public boolean canTankBeEmptied() {
- return true;
- }
-
- @Override
- public boolean displaysItemStack() {
- return false;
- }
-
- @Override
- public boolean displaysStackSize() {
- return false;
- }
-
- @Override
- public int getCapacity() {
- return (mTier + 1) * 1000;
- }
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicHull_NonElectric.java b/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicHull_NonElectric.java
deleted file mode 100644
index 948e63124f..0000000000
--- a/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicHull_NonElectric.java
+++ /dev/null
@@ -1,32 +0,0 @@
-package gregtech.api.metatileentity.implementations;
-
-import gregtech.api.interfaces.ITexture;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-
-public abstract class GT_MetaTileEntity_BasicHull_NonElectric extends GT_MetaTileEntity_BasicHull {
- public GT_MetaTileEntity_BasicHull_NonElectric(int aID, String aName, String aNameRegional, int aTier, String aDescription) {
- super(aID, aName, aNameRegional, aTier, aDescription);
- }
-
- public GT_MetaTileEntity_BasicHull_NonElectric(String aName, int aTier, String aDescription, ITexture[][][] aTextures) {
- super(aName, aTier, 1, aDescription, aTextures);
- }
-
- @Override
- public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aConnections, byte aColorIndex, boolean aConnected, boolean aRedstone) {
- return mTextures[Math.min(2, aSide)][aColorIndex+1];
- }
-
- @Override public boolean isElectric() {return false;}
- @Override public boolean isEnetInput() {return false;}
- @Override public boolean isEnetOutput() {return false;}
- @Override public boolean isInputFacing(byte aSide) {return false;}
- @Override public boolean isOutputFacing(byte aSide) {return false;}
- @Override public long getMinimumStoredEU() {return 0;}
- @Override public long maxEUStore() {return 0;}
- @Override public long maxEUInput() {return 0;}
- @Override public long maxEUOutput() {return 0;}
-
- @Override
- public abstract ITexture[][][] getTextureSet(ITexture[] aTextures);
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine.java b/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine.java
deleted file mode 100644
index b0cba5024c..0000000000
--- a/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine.java
+++ /dev/null
@@ -1,602 +0,0 @@
-package gregtech.api.metatileentity.implementations;
-
-import static gregtech.api.enums.GT_Values.V;
-import gregtech.api.GregTech_API;
-import gregtech.api.enums.ItemList;
-import gregtech.api.enums.Textures;
-import gregtech.api.gui.GT_Container_BasicMachine;
-import gregtech.api.gui.GT_GUIContainer_BasicMachine;
-import gregtech.api.interfaces.ITexture;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.objects.GT_ItemStack;
-import gregtech.api.objects.GT_RenderedTexture;
-import gregtech.api.util.GT_OreDictUnificator;
-import gregtech.api.util.GT_Recipe;
-import gregtech.api.util.GT_Recipe.GT_Recipe_Map;
-import gregtech.api.util.GT_Utility;
-
-import java.util.Arrays;
-
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraftforge.common.util.ForgeDirection;
-import net.minecraftforge.fluids.FluidStack;
-import net.minecraftforge.fluids.IFluidHandler;
-
-/**
- * NEVER INCLUDE THIS FILE IN YOUR MOD!!!
- *
- * This is the main construct for my Basic Machines such as the Automatic Extractor
- * Extend this class to make a simple Machine
- */
-public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_BasicTank {
- public boolean mAllowInputFromOutputSide = false, mFluidTransfer = false, mItemTransfer = false, mHasBeenUpdated = false, mStuttering = false, mCharge = false, mDecharge = false;
- public int mMainFacing = -1, mProgresstime = 0, mMaxProgresstime = 0, mEUt = 0, mOutputBlocked = 0;
- public FluidStack mOutputFluid;
- private FluidStack mFluidOut;
- public String mGUIName = "", mNEIName = "";
-
- public final ItemStack[] mOutputItems;
- public final int mInputSlotCount, mAmperage;
-
- private static final int OTHER_SLOT_COUNT = 4;
-
- /**
- * @param aOverlays
- * 0 = SideFacingActive
- * 1 = SideFacingInactive
- * 2 = FrontFacingActive
- * 3 = FrontFacingInactive
- * 4 = TopFacingActive
- * 5 = TopFacingInactive
- * 6 = BottomFacingActive
- * 7 = BottomFacingInactive
- * ----- Not all Array Elements have to be initialised, you can also just use 8 Parameters for the Default Pipe Texture Overlays -----
- * 8 = BottomFacingPipeActive
- * 9 = BottomFacingPipeInactive
- * 10 = TopFacingPipeActive
- * 11 = TopFacingPipeInactive
- * 12 = SideFacingPipeActive
- * 13 = SideFacingPipeInactive
- */
- public GT_MetaTileEntity_BasicMachine(int aID, String aName, String aNameRegional, int aTier, int aAmperage, String aDescription, int aInputSlotCount, int aOutputSlotCount, String aGUIName, String aNEIName, ITexture... aOverlays) {
- super(aID, aName, aNameRegional, aTier, OTHER_SLOT_COUNT+aInputSlotCount+aOutputSlotCount+1, aDescription, aOverlays);
- mInputSlotCount = Math.max(0, aInputSlotCount);
- mOutputItems = new ItemStack[Math.max(0, aOutputSlotCount)];
- mAmperage = aAmperage;
- mGUIName = aGUIName;
- mNEIName = aNEIName;
- }
-
- public GT_MetaTileEntity_BasicMachine(String aName, int aTier, int aAmperage, String aDescription, ITexture[][][] aTextures, int aInputSlotCount, int aOutputSlotCount, String aGUIName, String aNEIName) {
- super(aName, aTier, OTHER_SLOT_COUNT+aInputSlotCount+aOutputSlotCount+1, aDescription, aTextures);
- mInputSlotCount = Math.max(0, aInputSlotCount);
- mOutputItems = new ItemStack[Math.max(0, aOutputSlotCount)];
- mAmperage = aAmperage;
- mGUIName = aGUIName;
- mNEIName = aNEIName;
- }
-
- @Override
- public ITexture[][][] getTextureSet(ITexture[] aTextures) {
- ITexture[][][] rTextures = new ITexture[14][17][];
- aTextures = Arrays.copyOf(aTextures, 14);
-
- for (int i = 0; i < aTextures.length; i++) if (aTextures[i] != null) for (byte c = -1; c < 16; c++) {
- if (rTextures[ i][c+1] == null) rTextures[ i][c+1] = new ITexture[] {Textures.BlockIcons.MACHINE_CASINGS[mTier][c+1], aTextures[i]};
- }
-
- for (byte c = -1; c < 16; c++) {
- if (rTextures[ 0][c+1] == null) rTextures[ 0][c+1] = getSideFacingActive(c);
- if (rTextures[ 1][c+1] == null) rTextures[ 1][c+1] = getSideFacingInactive(c);
- if (rTextures[ 2][c+1] == null) rTextures[ 2][c+1] = getFrontFacingActive(c);
- if (rTextures[ 3][c+1] == null) rTextures[ 3][c+1] = getFrontFacingInactive(c);
- if (rTextures[ 4][c+1] == null) rTextures[ 4][c+1] = getTopFacingActive(c);
- if (rTextures[ 5][c+1] == null) rTextures[ 5][c+1] = getTopFacingInactive(c);
- if (rTextures[ 6][c+1] == null) rTextures[ 6][c+1] = getBottomFacingActive(c);
- if (rTextures[ 7][c+1] == null) rTextures[ 7][c+1] = getBottomFacingInactive(c);
- if (rTextures[ 8][c+1] == null) rTextures[ 8][c+1] = getBottomFacingPipeActive(c);
- if (rTextures[ 9][c+1] == null) rTextures[ 9][c+1] = getBottomFacingPipeInactive(c);
- if (rTextures[10][c+1] == null) rTextures[10][c+1] = getTopFacingPipeActive(c);
- if (rTextures[11][c+1] == null) rTextures[11][c+1] = getTopFacingPipeInactive(c);
- if (rTextures[12][c+1] == null) rTextures[12][c+1] = getSideFacingPipeActive(c);
- if (rTextures[13][c+1] == null) rTextures[13][c+1] = getSideFacingPipeInactive(c);
- }
- return rTextures;
- }
-
- @Override
- public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
- return mTextures[mMainFacing<2?aSide==aFacing?aActive?2:3:aSide==0?aActive?6:7:aSide==1?aActive?4:5:aActive?0:1:aSide==mMainFacing?aActive?2:3:(showPipeFacing()&&aSide==aFacing)?aSide==0?aActive?8:9:aSide==1?aActive?10:11:aActive?12:13:aSide==0?aActive?6:7:aSide==1?aActive?4:5:aActive?0:1][aColorIndex+1];
- }
-
- @Override public boolean isSimpleMachine() {return false;}
- @Override public boolean isOverclockerUpgradable() {return false;}
- @Override public boolean isTransformerUpgradable() {return false;}
- @Override public boolean isElectric() {return true;}
- @Override public boolean isValidSlot(int aIndex) {return aIndex > 0 && super.isValidSlot(aIndex) && aIndex != OTHER_SLOT_COUNT+mInputSlotCount+mOutputItems.length;}
- @Override public boolean isFacingValid(byte aFacing) {return mMainFacing > 1 || aFacing > 1;}
- @Override public boolean isEnetInput() {return true;}
- @Override public boolean isInputFacing(byte aSide) {return aSide!=mMainFacing;}
- @Override public boolean isOutputFacing(byte aSide) {return false;}
- @Override public boolean isTeleporterCompatible() {return false;}
- @Override public boolean isLiquidInput(byte aSide) {return aSide!=mMainFacing && (mAllowInputFromOutputSide || aSide != getBaseMetaTileEntity().getFrontFacing());}
- @Override public boolean isLiquidOutput(byte aSide) {return aSide!=mMainFacing;}
- @Override public long getMinimumStoredEU() {return V[mTier]*16;}
- @Override public long maxEUStore() {return V[mTier]*64;}
- @Override public long maxEUInput() {return V[mTier];}
- @Override public long maxSteamStore() {return maxEUStore();}
- @Override public long maxAmperesIn() {return (mEUt * 2) / V[mTier] + 1;}
- @Override public int getInputSlot() {return OTHER_SLOT_COUNT;}
- @Override public int getOutputSlot() {return OTHER_SLOT_COUNT+mInputSlotCount;}
- @Override public int getStackDisplaySlot() {return 2;}
- @Override public int rechargerSlotStartIndex() {return 1;}
- @Override public int dechargerSlotStartIndex() {return 1;}
- @Override public int rechargerSlotCount() {return mCharge?1:0;}
- @Override public int dechargerSlotCount() {return mDecharge?1:0;}
- @Override public boolean isAccessAllowed(EntityPlayer aPlayer) {return true;}
- @Override public int getProgresstime() {return mProgresstime;}
- @Override public int maxProgresstime() {return mMaxProgresstime;}
- @Override public int increaseProgress(int aProgress) {mProgresstime += aProgress; return mMaxProgresstime-mProgresstime;}
- @Override public boolean isFluidInputAllowed(FluidStack aFluid) {return getFillableStack() != null || (getRecipeList() != null && getRecipeList().containsInput(aFluid));}
- @Override public boolean isFluidChangingAllowed() {return true;}
- @Override public boolean doesFillContainers() {return false;}
- @Override public boolean doesEmptyContainers() {return false;}
- @Override public boolean canTankBeFilled() {return true;}
- @Override public boolean canTankBeEmptied() {return true;}
- @Override public boolean displaysItemStack() {return true;}
- @Override public boolean displaysStackSize() {return true;}
- @Override public FluidStack getDisplayedFluid() {return displaysOutputFluid()?getDrainableStack():null;}
- @Override public FluidStack getDrainableStack() {return mFluidOut;}
- @Override public FluidStack setDrainableStack(FluidStack aFluid){mFluidOut = aFluid; return mFluidOut;}
-
- @Override
- public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) {
- if (aBaseMetaTileEntity.isClientSide()) return true;
- aBaseMetaTileEntity.openGUI(aPlayer);
- return true;
- }
-
- @Override
- public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- return new GT_Container_BasicMachine(aPlayerInventory, aBaseMetaTileEntity);
- }
-
- @Override
- public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- return new GT_GUIContainer_BasicMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), mGUIName, GT_Utility.isStringValid(mNEIName) ? mNEIName : getRecipeList() != null ? getRecipeList().mUnlocalizedName : "");
- }
-
- @Override
- public void initDefaultModes(NBTTagCompound aNBT) {
- mMainFacing = -1;
- }
-
- @Override
- public void saveNBTData(NBTTagCompound aNBT) {
- super.saveNBTData(aNBT);
- aNBT.setBoolean("mFluidTransfer", mFluidTransfer);
- aNBT.setBoolean("mItemTransfer", mItemTransfer);
- aNBT.setBoolean("mHasBeenUpdated", mHasBeenUpdated);
- aNBT.setBoolean("mAllowInputFromOutputSide", mAllowInputFromOutputSide);
- aNBT.setInteger("mEUt", mEUt);
- aNBT.setInteger("mMainFacing", mMainFacing);
- aNBT.setInteger("mProgresstime", mProgresstime);
- aNBT.setInteger("mMaxProgresstime", mMaxProgresstime);
- if (mOutputFluid != null) aNBT.setTag("mOutputFluid", mOutputFluid.writeToNBT(new NBTTagCompound()));
- if (mFluidOut != null) aNBT.setTag("mFluidOut", mFluidOut.writeToNBT(new NBTTagCompound()));
-
- for (int i = 0; i < mOutputItems.length; i++) if (mOutputItems[i] != null) aNBT.setTag("mOutputItem"+i, mOutputItems[i].writeToNBT(new NBTTagCompound()));
- }
-
- @Override
- public void loadNBTData(NBTTagCompound aNBT) {
- super.loadNBTData(aNBT);
- mFluidTransfer = aNBT.getBoolean("mFluidTransfer");
- mItemTransfer = aNBT.getBoolean("mItemTransfer");
- mHasBeenUpdated = aNBT.getBoolean("mHasBeenUpdated");
- mAllowInputFromOutputSide = aNBT.getBoolean("mAllowInputFromOutputSide");
- mEUt = aNBT.getInteger("mEUt");
- mMainFacing = aNBT.getInteger("mMainFacing");
- mProgresstime = aNBT.getInteger("mProgresstime");
- mMaxProgresstime = aNBT.getInteger("mMaxProgresstime");
- mOutputFluid = FluidStack.loadFluidStackFromNBT(aNBT.getCompoundTag("mOutputFluid"));
- mFluidOut = FluidStack.loadFluidStackFromNBT(aNBT.getCompoundTag("mFluidOut"));
-
- for (int i = 0; i < mOutputItems.length; i++) mOutputItems[i] = GT_Utility.loadItem(aNBT, "mOutputItem"+i);
- }
-
- @Override
- public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
- super.onPostTick(aBaseMetaTileEntity, aTick);
-
- if (aBaseMetaTileEntity.isServerSide()) {
- mCharge = aBaseMetaTileEntity.getStoredEU() / 2 > aBaseMetaTileEntity.getEUCapacity() / 3;
- mDecharge = aBaseMetaTileEntity.getStoredEU() < aBaseMetaTileEntity.getEUCapacity() / 3;
-
- doDisplayThings();
-
- boolean tSucceeded = false;
-
- if (mMaxProgresstime > 0 && (mProgresstime >= 0 || aBaseMetaTileEntity.isAllowedToWork())) {
- aBaseMetaTileEntity.setActive(true);
- if (mProgresstime < 0 || drainEnergyForProcess(mEUt)) {
- if (++mProgresstime>=mMaxProgresstime) {
- for (int i = 0; i < mOutputItems.length; i++) for (int j = 0; j < mOutputItems.length; j++) if (aBaseMetaTileEntity.addStackToSlot(getOutputSlot()+((j+i)%mOutputItems.length), mOutputItems[i])) break;
- if (mOutputFluid != null) if (getDrainableStack() == null) setDrainableStack(mOutputFluid.copy()); else if (mOutputFluid.isFluidEqual(getDrainableStack())) getDrainableStack().amount += mOutputFluid.amount;
- for (int i = 0; i < mOutputItems.length; i++) mOutputItems[i] = null;
- mOutputFluid = null;
- mEUt = 0;
- mProgresstime = 0;
- mMaxProgresstime = 0;
- mStuttering = false;
- tSucceeded = true;
- endProcess();
- }
- if (mProgresstime > 5) mStuttering = false;
- } else {
- if (!mStuttering) {
- stutterProcess();
- if (canHaveInsufficientEnergy()) mProgresstime = -100;
- mStuttering = true;
- }
- }
- } else {
- aBaseMetaTileEntity.setActive(false);
- }
-
- boolean tRemovedOutputFluid = false;
-
- if (doesAutoOutputFluids() && getDrainableStack() != null && aBaseMetaTileEntity.getFrontFacing() != mMainFacing && (tSucceeded || aTick%20 == 0)) {
- IFluidHandler tTank = aBaseMetaTileEntity.getITankContainerAtSide(aBaseMetaTileEntity.getFrontFacing());
- if (tTank != null) {
- FluidStack tDrained = drain(1000, false);
- if (tDrained != null) {
- int tFilledAmount = tTank.fill(ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()), tDrained, false);
- if (tFilledAmount > 0) tTank.fill(ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()), drain(tFilledAmount, true), true);
- }
- }
- if (getDrainableStack() == null) tRemovedOutputFluid = true;
- }
-
- if (doesAutoOutput() && !isOutputEmpty() && aBaseMetaTileEntity.getFrontFacing() != mMainFacing && (tSucceeded || mOutputBlocked%300 == 1 || aBaseMetaTileEntity.hasInventoryBeenModified() || aTick%600 == 0)) {
- TileEntity tTileEntity2 = aBaseMetaTileEntity.getTileEntityAtSide(aBaseMetaTileEntity.getFrontFacing());
- for (int i = 0, tCosts = 1; i < mOutputItems.length && tCosts > 0 && aBaseMetaTileEntity.isUniversalEnergyStored(128); i++) {
- tCosts = GT_Utility.moveOneItemStack(aBaseMetaTileEntity, tTileEntity2, aBaseMetaTileEntity.getFrontFacing(), aBaseMetaTileEntity.getBackFacing(), null, false, (byte)64, (byte)1, (byte)64, (byte)1);
- if (tCosts > 0) aBaseMetaTileEntity.decreaseStoredEnergyUnits(tCosts, true);
- }
- }
-
- if (mOutputBlocked != 0) if (isOutputEmpty()) mOutputBlocked = 0; else mOutputBlocked++;
-
- if (allowToCheckRecipe()) {
- if (mMaxProgresstime <= 0 && aBaseMetaTileEntity.isAllowedToWork() && (tRemovedOutputFluid || tSucceeded || aBaseMetaTileEntity.hasInventoryBeenModified() || aTick%600 == 0 || aBaseMetaTileEntity.hasWorkJustBeenEnabled()) && hasEnoughEnergyToCheckRecipe()) {
- if (checkRecipe() == 2) {
- if (mInventory[3] != null && mInventory[3].stackSize <= 0) mInventory[3] = null;
- for (int i=getInputSlot() , j=i+mInputSlotCount ; i<j; i++) if (mInventory[i]!=null&&mInventory[i].stackSize<=0) mInventory[i]=null;
- for (int i=0; i<mOutputItems.length; i++) {
- mOutputItems[i] = GT_Utility.copy(mOutputItems[i]);
- if (mOutputItems[i]!=null&&mOutputItems[i].stackSize>64) mOutputItems[i].stackSize=64;
- mOutputItems[i] = GT_OreDictUnificator.get(true, mOutputItems[i]);
- }
- if (mFluid != null && mFluid.amount <= 0) mFluid = null;
- mMaxProgresstime = Math.max(1, mMaxProgresstime);
- if (GT_Utility.isDebugItem(mInventory[dechargerSlotStartIndex()])) {
- mEUt = mMaxProgresstime = 1;
- }
- startProcess();
- } else {
- mMaxProgresstime = 0;
- for (int i = 0; i < mOutputItems.length; i++) mOutputItems[i] = null;
- mOutputFluid = null;
- }
- }
- } else {
- if (!mStuttering) {
- stutterProcess();
- mStuttering = true;
- }
- }
- }
- }
-
- protected void doDisplayThings() {
- if (mMainFacing < 2 && getBaseMetaTileEntity().getFrontFacing() > 1) {
- mMainFacing = getBaseMetaTileEntity().getFrontFacing();
- }
- if (mMainFacing >= 2 && !mHasBeenUpdated) {
- mHasBeenUpdated = true;
- getBaseMetaTileEntity().setFrontFacing(getBaseMetaTileEntity().getBackFacing());
- }
-
- if (displaysInputFluid()) {
- int tDisplayStackSlot = OTHER_SLOT_COUNT+mInputSlotCount+mOutputItems.length;
- if (getFillableStack() == null) {
- if (ItemList.Display_Fluid.isStackEqual(mInventory[tDisplayStackSlot], true, true)) mInventory[tDisplayStackSlot] = null;
- } else {
- mInventory[tDisplayStackSlot] = GT_Utility.getFluidDisplayStack(getFillableStack(), displaysStackSize());
- }
- }
- }
-
- protected boolean hasEnoughEnergyToCheckRecipe() {
- return getBaseMetaTileEntity().isUniversalEnergyStored(getMinimumStoredEU() / 2);
- }
-
- protected boolean drainEnergyForProcess(long aEUt) {
- return getBaseMetaTileEntity().decreaseStoredEnergyUnits(aEUt, false);
- }
-
- protected void calculateOverclockedNess(GT_Recipe aRecipe) {
- calculateOverclockedNess(aRecipe.mEUt, aRecipe.mDuration);
- }
-
- protected void calculateOverclockedNess(int aEUt, int aDuration) {
- if (aEUt <= 16) {
- mEUt = aEUt * (1 << (mTier-1)) * (1 << (mTier-1));
- mMaxProgresstime = aDuration / (1 << (mTier-1));
- } else {
- mEUt = aEUt;
- mMaxProgresstime = aDuration;
- while (mEUt <= V[mTier-1] * mAmperage) {
- mEUt *= 4;
- mMaxProgresstime /= 2;
- }
- }
- }
-
- protected ItemStack getSpecialSlot() {
- return mInventory[3];
- }
-
- protected ItemStack getOutputAt(int aIndex) {
- return mInventory[getOutputSlot()+aIndex];
- }
-
- protected ItemStack[] getAllOutputs() {
- ItemStack[] rOutputs = new ItemStack[mOutputItems.length];
- for (int i = 0; i < mOutputItems.length; i++) rOutputs[i] = getOutputAt(i);
- return rOutputs;
- }
-
- protected boolean canOutput(GT_Recipe aRecipe) {
- return aRecipe != null && (aRecipe.mNeedsEmptyOutput ? isOutputEmpty() && getDrainableStack() == null : canOutput(aRecipe.getFluidOutput(0)) && canOutput(aRecipe.mOutputs));
- }
-
- protected boolean canOutput(ItemStack... aOutputs) {
- if (aOutputs == null) return true;
- ItemStack[] tOutputSlots = getAllOutputs();
- for (int i = 0; i < tOutputSlots.length && i < aOutputs.length; i++) if (tOutputSlots[i] != null && aOutputs[i] != null && (!GT_Utility.areStacksEqual(tOutputSlots[i], aOutputs[i], false) || tOutputSlots[i].stackSize + aOutputs[i].stackSize > tOutputSlots[i].getMaxStackSize())) {
- mOutputBlocked++;
- return false;
- }
- return true;
- }
-
- protected boolean canOutput(FluidStack aOutput) {
- return getDrainableStack() == null || aOutput == null || (getDrainableStack().isFluidEqual(aOutput) && (getDrainableStack().amount <= 0 || getDrainableStack().amount + aOutput.amount <= getCapacity()));
- }
-
- protected ItemStack getInputAt(int aIndex) {
- return mInventory[getInputSlot()+aIndex];
- }
-
- protected ItemStack[] getAllInputs() {
- ItemStack[] rInputs = new ItemStack[mInputSlotCount];
- for (int i = 0; i < mInputSlotCount; i++) rInputs[i] = getInputAt(i);
- return rInputs;
- }
-
- protected boolean isOutputEmpty() {
- boolean rIsEmpty = true;
- for (ItemStack tOutputSlotContent : getAllOutputs()) if (tOutputSlotContent != null) rIsEmpty = false;
- return rIsEmpty;
- }
-
- protected boolean displaysInputFluid() {
- return true;
- }
-
- protected boolean displaysOutputFluid() {
- return true;
- }
-
- @Override
- public void onValueUpdate(byte aValue) {
- mMainFacing = aValue;
- }
-
- @Override
- public byte getUpdateData() {
- return (byte)mMainFacing;
- }
-
- @Override
- public void doSound(byte aIndex, double aX, double aY, double aZ) {
- super.doSound(aIndex, aX, aY, aZ);
- if (aIndex == 8) GT_Utility.doSoundAtClient(GregTech_API.sSoundList.get(210), 100, 1.0F, aX, aY, aZ);
- }
-
- public boolean doesAutoOutput() {
- return mItemTransfer;
- }
-
- public boolean doesAutoOutputFluids() {
- return mFluidTransfer;
- }
-
- public boolean allowToCheckRecipe() {
- return true;
- }
-
- public boolean showPipeFacing() {
- return true;
- }
-
- /** Called whenever the Machine successfully started a Process, useful for Sound Effects */
- public void startProcess() {
- //
- }
-
- /** Called whenever the Machine successfully finished a Process, useful for Sound Effects */
- public void endProcess() {
- //
- }
-
- /** Called whenever the Machine aborted a Process, useful for Sound Effects */
- public void abortProcess() {
- //
- }
-
- /** Called whenever the Machine aborted a Process but still works on it, useful for Sound Effects */
- public void stutterProcess() {
- if (useStandardStutterSound()) sendSound((byte)8);
- }
-
- /** If this Machine can have the Insufficient Energy Line Problem */
- public boolean canHaveInsufficientEnergy() {
- return true;
- }
-
- public boolean useStandardStutterSound() {
- return true;
- }
-
- @Override
- public String[] getInfoData() {
- return new String[] {
- mNEIName,
- "Progress:", (mProgresstime/20)+" secs",
- (mMaxProgresstime/20)+" secs",
- "Stored Energy:",
- getBaseMetaTileEntity().getStoredEU()+"EU",
- getBaseMetaTileEntity().getEUCapacity()+"EU"};
- }
-
- @Override
- public boolean isGivingInformation() {
- return true;
- }
-
- @Override
- public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) {
- if (aSide == getBaseMetaTileEntity().getFrontFacing() || aSide == mMainFacing) {
- mAllowInputFromOutputSide = !mAllowInputFromOutputSide;
- GT_Utility.sendChatToPlayer(aPlayer, mAllowInputFromOutputSide?"Input from Output Side allowed":"Input from Output Side forbidden");
- }
- }
-
- @Override
- public boolean allowCoverOnSide(byte aSide, GT_ItemStack aCoverID) {
- return (aSide!=mMainFacing||GregTech_API.getCoverBehavior(aCoverID.toStack()).isGUIClickable(aSide, GT_Utility.stackToInt(aCoverID.toStack()), 0, getBaseMetaTileEntity()));
- }
-
- @Override
- public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
- return aSide!=mMainFacing&&aIndex>=getOutputSlot()&&aIndex<getOutputSlot()+mOutputItems.length;
- }
-
- @Override
- public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
- if (aSide==mMainFacing||aIndex<getInputSlot()||aIndex>=getInputSlot()+mInputSlotCount||(!mAllowInputFromOutputSide&&aSide==aBaseMetaTileEntity.getFrontFacing())) return false;
- for (int i=getInputSlot(), j=i+mInputSlotCount; i<j; i++) if (GT_Utility.areStacksEqual(GT_OreDictUnificator.get(aStack), mInventory[i])) return i==aIndex;
- return true;
- }
-
- /** @return the Recipe List which is used for this Machine, this is a useful Default Handler */
- public GT_Recipe_Map getRecipeList() {
- return null;
- }
-
- /** return values for checkRecipe() */
- protected static final int
- DID_NOT_FIND_RECIPE = 0,
- FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS = 1,
- FOUND_AND_SUCCESSFULLY_USED_RECIPE = 2;
-
- /** Contains the Recipe which has been previously used, or null if there was no previous Recipe, which could have been buffered */
- protected GT_Recipe mLastRecipe = null;
-
- /**
- * Override this to check the Recipes yourself, super calls to this could be useful if you just want to add a special case
- *
- * I thought about Enum too, but Enum doesn't add support for people adding other return Systems.
- *
- * Funny how Eclipse marks the word Enum as not correctly spelled.
- *
- * @return see constants above
- */
- public int checkRecipe() {
- GT_Recipe_Map tMap = getRecipeList();
- if (tMap == null) return DID_NOT_FIND_RECIPE;
- GT_Recipe tRecipe = tMap.findRecipe(getBaseMetaTileEntity(), mLastRecipe, false, V[mTier], new FluidStack[] {getFillableStack()}, getSpecialSlot(), getAllInputs());
- if (tRecipe == null) return DID_NOT_FIND_RECIPE;
- if (tRecipe.mCanBeBuffered) mLastRecipe = tRecipe;
- if (!canOutput(tRecipe)) {mOutputBlocked++; return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS;}
- if (!tRecipe.isRecipeInputEqual(true, new FluidStack[] {getFillableStack()}, getAllInputs())) return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS;
-
- for (int i = 0; i < mOutputItems.length; i++) if (getBaseMetaTileEntity().getRandomNumber(10000) < tRecipe.getOutputChance(i)) mOutputItems[i] = tRecipe.getOutput(i);
- mOutputFluid = tRecipe.getFluidOutput(0);
- calculateOverclockedNess(tRecipe);
- return FOUND_AND_SUCCESSFULLY_USED_RECIPE;
- }
-
- public ITexture[] getSideFacingActive(byte aColor) {
- return new ITexture[] {Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor+1]};
- }
-
- public ITexture[] getSideFacingInactive(byte aColor) {
- return new ITexture[] {Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor+1]};
- }
-
- public ITexture[] getFrontFacingActive(byte aColor) {
- return new ITexture[] {Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor+1]};
- }
-
- public ITexture[] getFrontFacingInactive(byte aColor) {
- return new ITexture[] {Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor+1]};
- }
-
- public ITexture[] getTopFacingActive(byte aColor) {
- return new ITexture[] {Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor+1]};
- }
-
- public ITexture[] getTopFacingInactive(byte aColor) {
- return new ITexture[] {Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor+1]};
- }
-
- public ITexture[] getBottomFacingActive(byte aColor) {
- return new ITexture[] {Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor+1]};
- }
-
- public ITexture[] getBottomFacingInactive(byte aColor) {
- return new ITexture[] {Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor+1]};
- }
-
- public ITexture[] getBottomFacingPipeActive(byte aColor) {
- return new ITexture[] {Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor+1], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT)};
- }
-
- public ITexture[] getBottomFacingPipeInactive(byte aColor) {
- return new ITexture[] {Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor+1], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT)};
- }
-
- public ITexture[] getTopFacingPipeActive(byte aColor) {
- return new ITexture[] {Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor+1], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT)};
- }
-
- public ITexture[] getTopFacingPipeInactive(byte aColor) {
- return new ITexture[] {Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor+1], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT)};
- }
-
- public ITexture[] getSideFacingPipeActive(byte aColor) {
- return new ITexture[] {Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor+1], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT)};
- }
-
- public ITexture[] getSideFacingPipeInactive(byte aColor) {
- return new ITexture[] {Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor+1], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT)};
- }
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine_Bronze.java b/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine_Bronze.java
deleted file mode 100644
index 3d923db52c..0000000000
--- a/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine_Bronze.java
+++ /dev/null
@@ -1,187 +0,0 @@
-package gregtech.api.metatileentity.implementations;
-
-import static gregtech.api.enums.GT_Values.D1;
-import gregtech.api.GregTech_API;
-import gregtech.api.enums.Dyes;
-import gregtech.api.enums.Textures;
-import gregtech.api.interfaces.ITexture;
-import gregtech.api.objects.GT_ItemStack;
-import gregtech.api.objects.GT_RenderedTexture;
-import gregtech.api.util.GT_Log;
-import gregtech.api.util.GT_Utility;
-
-import java.util.ArrayList;
-
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.util.AxisAlignedBB;
-import net.minecraftforge.common.util.ForgeDirection;
-
-/**
- * NEVER INCLUDE THIS FILE IN YOUR MOD!!!
- *
- * This is the main construct for my Basic Machines such as the Automatic Extractor
- * Extend this class to make a simple Machine
- */
-public abstract class GT_MetaTileEntity_BasicMachine_Bronze extends GT_MetaTileEntity_BasicMachine {
- public GT_MetaTileEntity_BasicMachine_Bronze(int aID, String aName, String aNameRegional, String aDescription, int aInputSlotCount, int aOutputSlotCount, boolean aBricked) {
- super(aID, aName, aNameRegional, aBricked?1:0, 0, aDescription, aInputSlotCount, aOutputSlotCount, "", "");
- }
-
- public GT_MetaTileEntity_BasicMachine_Bronze(String aName, String aDescription, ITexture[][][] aTextures, int aInputSlotCount, int aOutputSlotCount, boolean aBricked) {
- super(aName, aBricked?1:0, 0, aDescription, aTextures, aInputSlotCount, aOutputSlotCount, "", "");
- }
- /*
- @Override
- public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
- return new GT_MetaTileEntity_BasicMachine_Bronze(mTier, mDescription, mTextures);
- }
- */
- public boolean mNeedsSteamVenting = false;
-
- @Override
- public void saveNBTData(NBTTagCompound aNBT) {
- super.saveNBTData(aNBT);
- aNBT.setBoolean("mNeedsSteamVenting", mNeedsSteamVenting);
- }
-
- @Override
- public void loadNBTData(NBTTagCompound aNBT) {
- super.loadNBTData(aNBT);
- mNeedsSteamVenting = aNBT.getBoolean("mNeedsSteamVenting");
- }
-
- @Override public boolean isElectric() {return false;}
- @Override public boolean isEnetInput() {return false;}
- @Override public boolean isInputFacing(byte aSide) {return false;}
- @Override public long maxEUStore() {return 0;}
- @Override public long maxEUInput() {return 0;}
- @Override public int rechargerSlotCount() {return 0;}
- @Override public int dechargerSlotCount() {return 0;}
-
- @Override public boolean isSteampowered() {return true;}
- @Override public boolean isFacingValid(byte aFacing) {return super.isFacingValid(aFacing) && aFacing != mMainFacing;}
- @Override public long getMinimumStoredEU() {return 1000;}
- @Override public long maxSteamStore() {return 16000;}
- @Override public boolean isLiquidInput (byte aSide) {return aSide != mMainFacing;}
- @Override public boolean isLiquidOutput(byte aSide) {return aSide != mMainFacing;}
-
- @Override
- public boolean doesAutoOutput() {
- return false;
- }
-
- @Override
- public boolean allowToCheckRecipe() {
- if (mNeedsSteamVenting && getBaseMetaTileEntity().getCoverIDAtSide(getBaseMetaTileEntity().getFrontFacing()) == 0 && !GT_Utility.hasBlockHitBox(getBaseMetaTileEntity().getWorld(), getBaseMetaTileEntity().getOffsetX(getBaseMetaTileEntity().getFrontFacing(), 1), getBaseMetaTileEntity().getOffsetY(getBaseMetaTileEntity().getFrontFacing(), 1), getBaseMetaTileEntity().getOffsetZ(getBaseMetaTileEntity().getFrontFacing(), 1))) {
- sendSound((byte)9);
- mNeedsSteamVenting = false;
- try {
- for (EntityLivingBase tLiving : (ArrayList<EntityLivingBase>)getBaseMetaTileEntity().getWorld().getEntitiesWithinAABB(EntityLivingBase.class, AxisAlignedBB.getBoundingBox(getBaseMetaTileEntity().getOffsetX(getBaseMetaTileEntity().getFrontFacing(), 1), getBaseMetaTileEntity().getOffsetY(getBaseMetaTileEntity().getFrontFacing(), 1), getBaseMetaTileEntity().getOffsetZ(getBaseMetaTileEntity().getFrontFacing(), 1), getBaseMetaTileEntity().getOffsetX(getBaseMetaTileEntity().getFrontFacing(), 1)+1, getBaseMetaTileEntity().getOffsetY(getBaseMetaTileEntity().getFrontFacing(), 1)+1, getBaseMetaTileEntity().getOffsetZ(getBaseMetaTileEntity().getFrontFacing(), 1)+1))) {
- GT_Utility.applyHeatDamage(tLiving, getSteamDamage());
- }
- } catch(Throwable e) {
- if (D1) e.printStackTrace(GT_Log.err);
- }
- }
- return !mNeedsSteamVenting;
- }
-
- @Override
- public void endProcess() {
- if (isSteampowered()) mNeedsSteamVenting = true;
- }
-
- @Override
- public void doSound(byte aIndex, double aX, double aY, double aZ) {
- super.doSound(aIndex, aX, aY, aZ);
- if (aIndex == 9) {
- GT_Utility.doSoundAtClient(GregTech_API.sSoundList.get(4), 5, 1.0F, aX, aY, aZ);
- for (int l = 0; l < 8; ++l) getBaseMetaTileEntity().getWorld().spawnParticle("largesmoke", aX - 0.5 + Math.random(), aY - 0.5 + Math.random(), aZ - 0.5 + Math.random(), ForgeDirection.getOrientation(getBaseMetaTileEntity().getFrontFacing()).offsetX / 5.0, ForgeDirection.getOrientation(getBaseMetaTileEntity().getFrontFacing()).offsetY / 5.0, ForgeDirection.getOrientation(getBaseMetaTileEntity().getFrontFacing()).offsetZ / 5.0);
- }
- }
-
- @Override
- public boolean isGivingInformation() {
- return false;
- }
-
- @Override
- public boolean allowCoverOnSide(byte aSide, GT_ItemStack aCoverID) {
- return GregTech_API.getCoverBehavior(aCoverID.toStack()).isSimpleCover() && super.allowCoverOnSide(aSide, aCoverID);
- }
-
- public float getSteamDamage() {
- return 6.0F;
- }
-
- @Override
- public ITexture[] getSideFacingActive(byte aColor) {
- return new ITexture[] {new GT_RenderedTexture(mTier==1?Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE:Textures.BlockIcons.MACHINE_BRONZE_SIDE, Dyes.getModulation(aColor, Dyes._NULL.mRGBa))};
- }
-
- @Override
- public ITexture[] getSideFacingInactive(byte aColor) {
- return new ITexture[] {new GT_RenderedTexture(mTier==1?Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE:Textures.BlockIcons.MACHINE_BRONZE_SIDE, Dyes.getModulation(aColor, Dyes._NULL.mRGBa))};
- }
-
- @Override
- public ITexture[] getFrontFacingActive(byte aColor) {
- return new ITexture[] {new GT_RenderedTexture(mTier==1?Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE:Textures.BlockIcons.MACHINE_BRONZE_SIDE, Dyes.getModulation(aColor, Dyes._NULL.mRGBa))};
- }
-
- @Override
- public ITexture[] getFrontFacingInactive(byte aColor) {
- return new ITexture[] {new GT_RenderedTexture(mTier==1?Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE:Textures.BlockIcons.MACHINE_BRONZE_SIDE, Dyes.getModulation(aColor, Dyes._NULL.mRGBa))};
- }
-
- @Override
- public ITexture[] getTopFacingActive(byte aColor) {
- return new ITexture[] {new GT_RenderedTexture(mTier==1?Textures.BlockIcons.MACHINE_BRONZEBRICKS_TOP:Textures.BlockIcons.MACHINE_BRONZE_TOP, Dyes.getModulation(aColor, Dyes._NULL.mRGBa))};
- }
-
- @Override
- public ITexture[] getTopFacingInactive(byte aColor) {
- return new ITexture[] {new GT_RenderedTexture(mTier==1?Textures.BlockIcons.MACHINE_BRONZEBRICKS_TOP:Textures.BlockIcons.MACHINE_BRONZE_TOP, Dyes.getModulation(aColor, Dyes._NULL.mRGBa))};
- }
-
- @Override
- public ITexture[] getBottomFacingActive(byte aColor) {
- return new ITexture[] {new GT_RenderedTexture(mTier==1?Textures.BlockIcons.MACHINE_BRONZEBRICKS_BOTTOM:Textures.BlockIcons.MACHINE_BRONZE_BOTTOM, Dyes.getModulation(aColor, Dyes._NULL.mRGBa))};
- }
-
- @Override
- public ITexture[] getBottomFacingInactive(byte aColor) {
- return new ITexture[] {new GT_RenderedTexture(mTier==1?Textures.BlockIcons.MACHINE_BRONZEBRICKS_BOTTOM:Textures.BlockIcons.MACHINE_BRONZE_BOTTOM, Dyes.getModulation(aColor, Dyes._NULL.mRGBa))};
- }
-
- @Override
- public ITexture[] getBottomFacingPipeActive(byte aColor) {
- return new ITexture[] {new GT_RenderedTexture(mTier==1?Textures.BlockIcons.MACHINE_BRONZEBRICKS_BOTTOM:Textures.BlockIcons.MACHINE_BRONZE_BOTTOM, Dyes.getModulation(aColor, Dyes._NULL.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT)};
- }
-
- @Override
- public ITexture[] getBottomFacingPipeInactive(byte aColor) {
- return new ITexture[] {new GT_RenderedTexture(mTier==1?Textures.BlockIcons.MACHINE_BRONZEBRICKS_BOTTOM:Textures.BlockIcons.MACHINE_BRONZE_BOTTOM, Dyes.getModulation(aColor, Dyes._NULL.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT)};
- }
-
- @Override
- public ITexture[] getTopFacingPipeActive(byte aColor) {
- return new ITexture[] {new GT_RenderedTexture(mTier==1?Textures.BlockIcons.MACHINE_BRONZEBRICKS_TOP:Textures.BlockIcons.MACHINE_BRONZE_TOP, Dyes.getModulation(aColor, Dyes._NULL.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT)};
- }
-
- @Override
- public ITexture[] getTopFacingPipeInactive(byte aColor) {
- return new ITexture[] {new GT_RenderedTexture(mTier==1?Textures.BlockIcons.MACHINE_BRONZEBRICKS_TOP:Textures.BlockIcons.MACHINE_BRONZE_TOP, Dyes.getModulation(aColor, Dyes._NULL.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT)};
- }
-
- @Override
- public ITexture[] getSideFacingPipeActive(byte aColor) {
- return new ITexture[] {new GT_RenderedTexture(mTier==1?Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE:Textures.BlockIcons.MACHINE_BRONZE_SIDE, Dyes.getModulation(aColor, Dyes._NULL.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT)};
- }
-
- @Override
- public ITexture[] getSideFacingPipeInactive(byte aColor) {
- return new ITexture[] {new GT_RenderedTexture(mTier==1?Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE:Textures.BlockIcons.MACHINE_BRONZE_SIDE, Dyes.getModulation(aColor, Dyes._NULL.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT)};
- }
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine_GT_Recipe.java b/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine_GT_Recipe.java
deleted file mode 100644
index 30272cee80..0000000000
--- a/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine_GT_Recipe.java
+++ /dev/null
@@ -1,319 +0,0 @@
-package gregtech.api.metatileentity.implementations;
-
-import static gregtech.api.enums.GT_Values.V;
-import static gregtech.api.enums.GT_Values.W;
-import gregtech.api.enums.*;
-import gregtech.api.gui.GT_Container_BasicMachine;
-import gregtech.api.gui.GT_GUIContainer_BasicMachine;
-import gregtech.api.interfaces.ITexture;
-import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.objects.GT_RenderedTexture;
-import gregtech.api.util.GT_ModHandler;
-import gregtech.api.util.GT_ModHandler.RecipeBits;
-import gregtech.api.util.GT_Recipe.GT_Recipe_Map;
-import gregtech.api.util.GT_Utility;
-
-import java.util.Random;
-
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.init.Blocks;
-import net.minecraft.item.ItemStack;
-import net.minecraftforge.fluids.FluidStack;
-
-/**
- * NEVER INCLUDE THIS FILE IN YOUR MOD!!!
- *
- * This is the main construct for my Basic Machines such as the Automatic Extractor
- * Extend this class to make a simple Machine
- */
-public class GT_MetaTileEntity_BasicMachine_GT_Recipe extends GT_MetaTileEntity_BasicMachine {
- public static enum X {PUMP, WIRE, WIRE4, HULL, PIPE, GLASS, PLATE, MOTOR, ROTOR, SENSOR, PISTON, CIRCUIT, EMITTER, CONVEYOR, ROBOT_ARM, COIL_HEATING, COIL_ELECTRIC, STICK_MAGNETIC, STICK_DISTILLATION, BETTER_CIRCUIT, FIELD_GENERATOR, COIL_HEATING_DOUBLE, STICK_ELECTROMAGNETIC;}
-
- private final GT_Recipe_Map mRecipes;
- private final int mTankCapacity, mSpecialEffect;
- private final String mSound;
- private final boolean mSharedTank, mRequiresFluidForFiltering;
- private final byte mGUIParameterA, mGUIParameterB;
-
- public GT_MetaTileEntity_BasicMachine_GT_Recipe(int aID, String aName, String aNameRegional, int aTier, String aDescription, GT_Recipe_Map aRecipes, int aInputSlots, int aOutputSlots, int aTankCapacity, int aGUIParameterA, int aGUIParameterB, String aGUIName, String aSound, boolean aSharedTank, boolean aRequiresFluidForFiltering, int aSpecialEffect, String aOverlays, Object[] aRecipe) {
- super(aID, aName, aNameRegional, aTier, aRecipes.mAmperage, aDescription, aInputSlots, aOutputSlots, aGUIName, aRecipes.mNEIName, new ITexture[] {new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/" + aOverlays.toLowerCase() + "/OVERLAY_SIDE_ACTIVE")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/" + aOverlays.toLowerCase() + "/OVERLAY_SIDE")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/" + aOverlays.toLowerCase() + "/OVERLAY_FRONT_ACTIVE")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/" + aOverlays.toLowerCase() + "/OVERLAY_FRONT")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/" + aOverlays.toLowerCase() + "/OVERLAY_TOP_ACTIVE")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/" + aOverlays.toLowerCase() + "/OVERLAY_TOP")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/" + aOverlays.toLowerCase() + "/OVERLAY_BOTTOM_ACTIVE")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/" + aOverlays.toLowerCase() + "/OVERLAY_BOTTOM"))});
- mSharedTank = aSharedTank;
- mTankCapacity = aTankCapacity;
- mSpecialEffect = aSpecialEffect;
- mRequiresFluidForFiltering = aRequiresFluidForFiltering;
- mRecipes = aRecipes;
- mSound = aSound;
- mGUIParameterA = (byte)aGUIParameterA;
- mGUIParameterB = (byte)aGUIParameterB;
-
- if (aRecipe != null) {
- for (int i = 3; i < aRecipe.length; i++) {
- if (aRecipe[i] == X.CIRCUIT) {aRecipe[i] = Tier.ELECTRIC[mTier].mManagingObject; continue;}
- if (aRecipe[i] == X.BETTER_CIRCUIT) {aRecipe[i] = Tier.ELECTRIC[mTier].mBetterManagingObject; continue;}
- if (aRecipe[i] == X.HULL) {aRecipe[i] = Tier.ELECTRIC[mTier].mHullObject; continue;}
- if (aRecipe[i] == X.WIRE) {aRecipe[i] = Tier.ELECTRIC[mTier].mConductingObject; continue;}
- if (aRecipe[i] == X.WIRE4) {aRecipe[i] = Tier.ELECTRIC[mTier].mLargerConductingObject; continue;}
-
- if (aRecipe[i] == X.GLASS) {switch(mTier) {
- default: aRecipe[i] = new ItemStack(Blocks.glass, 1, W); break;
- }continue;}
-
- if (aRecipe[i] == X.PLATE) {switch(mTier) {
- case 0: case 1: aRecipe[i] = OrePrefixes.plate.get(Materials.Steel); break;
- case 2: aRecipe[i] = OrePrefixes.plate.get(Materials.Aluminium); break;
- case 3: aRecipe[i] = OrePrefixes.plate.get(Materials.StainlessSteel); break;
- case 4: aRecipe[i] = OrePrefixes.plate.get(Materials.Titanium); break;
- default: aRecipe[i] = OrePrefixes.plate.get(Materials.TungstenSteel); break;
- }continue;}
-
- if (aRecipe[i] == X.PIPE) {switch(mTier) {
- case 0: case 1: aRecipe[i] = OrePrefixes.pipeMedium.get(Materials.Bronze); break;
- case 2: aRecipe[i] = OrePrefixes.pipeMedium.get(Materials.Steel); break;
- case 3: aRecipe[i] = OrePrefixes.pipeMedium.get(Materials.StainlessSteel); break;
- case 4: aRecipe[i] = OrePrefixes.pipeMedium.get(Materials.Titanium); break;
- default: aRecipe[i] = OrePrefixes.pipeMedium.get(Materials.TungstenSteel); break;
- }continue;}
-
- if (aRecipe[i] == X.COIL_HEATING) {switch(mTier) {
- case 0: case 1: aRecipe[i] = OrePrefixes.wireGt02.get(Materials.AnyCopper); break;
- case 2: aRecipe[i] = OrePrefixes.wireGt02.get(Materials.Cupronickel); break;
- case 3: aRecipe[i] = OrePrefixes.wireGt02.get(Materials.Kanthal); break;
- case 4: aRecipe[i] = OrePrefixes.wireGt02.get(Materials.Nichrome); break;
- default: aRecipe[i] = OrePrefixes.wireGt08.get(Materials.Nichrome); break;
- }continue;}
-
- if (aRecipe[i] == X.COIL_HEATING_DOUBLE) {switch(mTier) {
- case 0: case 1: aRecipe[i] = OrePrefixes.wireGt04.get(Materials.AnyCopper); break;
- case 2: aRecipe[i] = OrePrefixes.wireGt04.get(Materials.Cupronickel); break;
- case 3: aRecipe[i] = OrePrefixes.wireGt04.get(Materials.Kanthal); break;
- case 4: aRecipe[i] = OrePrefixes.wireGt04.get(Materials.Nichrome); break;
- default: aRecipe[i] = OrePrefixes.wireGt16.get(Materials.Nichrome); break;
- }continue;}
-
- if (aRecipe[i] == X.STICK_DISTILLATION) {switch(mTier) {
- default: aRecipe[i] = OrePrefixes.stick.get(Materials.Blaze); break;
- }continue;}
-
- if (aRecipe[i] == X.STICK_MAGNETIC) {switch(mTier) {
- case 0: case 1: aRecipe[i] = OrePrefixes.stick.get(Materials.IronMagnetic); break;
- case 2: case 3: aRecipe[i] = OrePrefixes.stick.get(Materials.SteelMagnetic); break;
- default: aRecipe[i] = OrePrefixes.stick.get(Materials.NeodymiumMagnetic); break;
- }continue;}
-
- if (aRecipe[i] == X.STICK_ELECTROMAGNETIC) {switch(mTier) {
- case 0: case 1: aRecipe[i] = OrePrefixes.stick.get(Materials.AnyIron); break;
- case 2: case 3: aRecipe[i] = OrePrefixes.stick.get(Materials.Steel); break;
- case 4: aRecipe[i] = OrePrefixes.stick.get(Materials.Neodymium); break;
- default: aRecipe[i] = OrePrefixes.stick.get(Materials.VanadiumGallium); break;
- }continue;}
-
- if (aRecipe[i] == X.COIL_ELECTRIC) {switch(mTier) {
- case 0: aRecipe[i] = OrePrefixes.wireGt01.get(Materials.Tin); break;
- case 1: aRecipe[i] = OrePrefixes.wireGt02.get(Materials.Tin); break;
- case 2: aRecipe[i] = OrePrefixes.wireGt02.get(Materials.AnyCopper); break;
- case 3: aRecipe[i] = OrePrefixes.wireGt04.get(Materials.AnyCopper); break;
- case 4: aRecipe[i] = OrePrefixes.wireGt08.get(Materials.AnnealedCopper); break;
- default: aRecipe[i] = OrePrefixes.wireGt16.get(Materials.AnnealedCopper); break;
- }continue;}
-
- if (aRecipe[i] == X.ROBOT_ARM) {switch(mTier) {
- case 0: case 1: aRecipe[i] = ItemList.Robot_Arm_LV; break;
- case 2: aRecipe[i] = ItemList.Robot_Arm_MV; break;
- case 3: aRecipe[i] = ItemList.Robot_Arm_HV; break;
- case 4: aRecipe[i] = ItemList.Robot_Arm_EV; break;
- case 5: aRecipe[i] = ItemList.Robot_Arm_IV; break;
- case 6: aRecipe[i] = ItemList.Robot_Arm_LuV; break;
- case 7: aRecipe[i] = ItemList.Robot_Arm_ZPM; break;
- default: aRecipe[i] = ItemList.Robot_Arm_UV; break;
- }continue;}
-
- if (aRecipe[i] == X.PUMP) {switch(mTier) {
- case 0: case 1: aRecipe[i] = ItemList.Electric_Pump_LV; break;
- case 2: aRecipe[i] = ItemList.Electric_Pump_MV; break;
- case 3: aRecipe[i] = ItemList.Electric_Pump_HV; break;
- case 4: aRecipe[i] = ItemList.Electric_Pump_EV; break;
- case 5: aRecipe[i] = ItemList.Electric_Pump_IV; break;
- case 6: aRecipe[i] = ItemList.Electric_Pump_LuV; break;
- case 7: aRecipe[i] = ItemList.Electric_Pump_ZPM; break;
- default: aRecipe[i] = ItemList.Electric_Pump_UV; break;
- }continue;}
-
- if (aRecipe[i] == X.ROTOR) {switch(mTier) {
- case 0: case 1: aRecipe[i] = OrePrefixes.rotor.get(Materials.Tin); break;
- case 2: aRecipe[i] = OrePrefixes.rotor.get(Materials.Bronze); break;
- case 3: aRecipe[i] = OrePrefixes.rotor.get(Materials.Steel); break;
- case 4: aRecipe[i] = OrePrefixes.rotor.get(Materials.StainlessSteel); break;
- case 5: aRecipe[i] = OrePrefixes.rotor.get(Materials.TungstenSteel); break;
- case 6: aRecipe[i] = OrePrefixes.rotor.get(Materials.TungstenSteel); break;
- case 7: aRecipe[i] = OrePrefixes.rotor.get(Materials.TungstenSteel); break;
- default: aRecipe[i] = OrePrefixes.rotor.get(Materials.TungstenSteel); break;
- }continue;}
-
- if (aRecipe[i] == X.MOTOR) {switch(mTier) {
- case 0: case 1: aRecipe[i] = ItemList.Electric_Motor_LV; break;
- case 2: aRecipe[i] = ItemList.Electric_Motor_MV; break;
- case 3: aRecipe[i] = ItemList.Electric_Motor_HV; break;
- case 4: aRecipe[i] = ItemList.Electric_Motor_EV; break;
- case 5: aRecipe[i] = ItemList.Electric_Motor_IV; break;
- case 6: aRecipe[i] = ItemList.Electric_Motor_LuV; break;
- case 7: aRecipe[i] = ItemList.Electric_Motor_ZPM; break;
- default: aRecipe[i] = ItemList.Electric_Motor_UV; break;
- }continue;}
-
- if (aRecipe[i] == X.PISTON) {switch(mTier) {
- case 0: case 1: aRecipe[i] = ItemList.Electric_Piston_LV; break;
- case 2: aRecipe[i] = ItemList.Electric_Piston_MV; break;
- case 3: aRecipe[i] = ItemList.Electric_Piston_HV; break;
- case 4: aRecipe[i] = ItemList.Electric_Piston_EV; break;
- case 5: aRecipe[i] = ItemList.Electric_Piston_IV; break;
- case 6: aRecipe[i] = ItemList.Electric_Piston_LuV; break;
- case 7: aRecipe[i] = ItemList.Electric_Piston_ZPM; break;
- default: aRecipe[i] = ItemList.Electric_Piston_UV; break;
- }continue;}
-
- if (aRecipe[i] == X.CONVEYOR) {switch(mTier) {
- case 0: case 1: aRecipe[i] = ItemList.Conveyor_Module_LV; break;
- case 2: aRecipe[i] = ItemList.Conveyor_Module_MV; break;
- case 3: aRecipe[i] = ItemList.Conveyor_Module_HV; break;
- case 4: aRecipe[i] = ItemList.Conveyor_Module_EV; break;
- case 5: aRecipe[i] = ItemList.Conveyor_Module_IV; break;
- case 6: aRecipe[i] = ItemList.Conveyor_Module_LuV; break;
- case 7: aRecipe[i] = ItemList.Conveyor_Module_ZPM; break;
- default: aRecipe[i] = ItemList.Conveyor_Module_UV; break;
- }continue;}
-
- if (aRecipe[i] == X.EMITTER) {switch(mTier) {
- case 0: case 1: aRecipe[i] = ItemList.Emitter_LV; break;
- case 2: aRecipe[i] = ItemList.Emitter_MV; break;
- case 3: aRecipe[i] = ItemList.Emitter_HV; break;
- case 4: aRecipe[i] = ItemList.Emitter_EV; break;
- case 5: aRecipe[i] = ItemList.Emitter_IV; break;
- case 6: aRecipe[i] = ItemList.Emitter_LuV; break;
- case 7: aRecipe[i] = ItemList.Emitter_ZPM; break;
- default: aRecipe[i] = ItemList.Emitter_UV; break;
- }continue;}
-
- if (aRecipe[i] == X.SENSOR) {switch(mTier) {
- case 0: case 1: aRecipe[i] = ItemList.Sensor_LV; break;
- case 2: aRecipe[i] = ItemList.Sensor_MV; break;
- case 3: aRecipe[i] = ItemList.Sensor_HV; break;
- case 4: aRecipe[i] = ItemList.Sensor_EV; break;
- case 5: aRecipe[i] = ItemList.Sensor_IV; break;
- case 6: aRecipe[i] = ItemList.Sensor_LuV; break;
- case 7: aRecipe[i] = ItemList.Sensor_ZPM; break;
- default: aRecipe[i] = ItemList.Sensor_UV; break;
- }continue;}
-
- if (aRecipe[i] == X.FIELD_GENERATOR) {switch(mTier) {
- case 0: case 1: aRecipe[i] = ItemList.Field_Generator_LV; break;
- case 2: aRecipe[i] = ItemList.Field_Generator_MV; break;
- case 3: aRecipe[i] = ItemList.Field_Generator_HV; break;
- case 4: aRecipe[i] = ItemList.Field_Generator_EV; break;
- case 5: aRecipe[i] = ItemList.Field_Generator_IV; break;
- case 6: aRecipe[i] = ItemList.Field_Generator_LuV; break;
- case 7: aRecipe[i] = ItemList.Field_Generator_ZPM; break;
- default: aRecipe[i] = ItemList.Field_Generator_UV; break;
- }continue;}
-
- if (aRecipe[i] instanceof X) throw new IllegalArgumentException("MISSING TIER MAPPING FOR: " + aRecipe[i] + " AT TIER " + mTier);
- }
-
- if (!GT_ModHandler.addCraftingRecipe(getStackForm(1), RecipeBits.DISMANTLEABLE | RecipeBits.BUFFERED | RecipeBits.NOT_REMOVABLE | RecipeBits.REVERSIBLE, aRecipe)) {
- throw new IllegalArgumentException("INVALID CRAFTING RECIPE FOR: " + getStackForm(1).getDisplayName());
- }
- }
- }
-
- public GT_MetaTileEntity_BasicMachine_GT_Recipe(String aName, int aTier, String aDescription, GT_Recipe_Map aRecipes, int aInputSlots, int aOutputSlots, int aTankCapacity, int aAmperage, int aGUIParameterA, int aGUIParameterB, ITexture[][][] aTextures, String aGUIName, String aNEIName, String aSound, boolean aSharedTank, boolean aRequiresFluidForFiltering, int aSpecialEffect) {
- super(aName, aTier, aAmperage, aDescription, aTextures, aInputSlots, aOutputSlots, aGUIName, aNEIName);
- mSharedTank = aSharedTank;
- mTankCapacity = aTankCapacity;
- mSpecialEffect = aSpecialEffect;
- mRequiresFluidForFiltering = aRequiresFluidForFiltering;
- mRecipes = aRecipes;
- mSound = aSound;
- mGUIParameterA = (byte)aGUIParameterA;
- mGUIParameterB = (byte)aGUIParameterB;
- }
-
- @Override
- public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
- return new GT_MetaTileEntity_BasicMachine_GT_Recipe(mName, mTier, mDescription, mRecipes, mInputSlotCount, mOutputItems==null?0:mOutputItems.length, mTankCapacity, mAmperage, mGUIParameterA, mGUIParameterB, mTextures, mGUIName, mNEIName, mSound, mSharedTank, mRequiresFluidForFiltering, mSpecialEffect);
- }
-
- @Override
- public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- return new GT_Container_BasicMachine(aPlayerInventory, aBaseMetaTileEntity);
- }
-
- @Override
- public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- return new GT_GUIContainer_BasicMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), mGUIName, GT_Utility.isStringValid(mNEIName) ? mNEIName : getRecipeList() != null ? getRecipeList().mUnlocalizedName : "", mGUIParameterA, mGUIParameterB);
- }
-
- @Override
- public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
- if (!super.allowPutStack(aBaseMetaTileEntity, aIndex, aSide, aStack)) return false;
- if (mInventory[aIndex] != null) return true;
- switch (mInputSlotCount) {
- case 0: return false;
- case 1: return getFillableStack() == null ? !mRequiresFluidForFiltering && getRecipeList().containsInput(aStack) : null!=getRecipeList().findRecipe(getBaseMetaTileEntity(), mLastRecipe, true, V[mTier], new FluidStack[] {getFillableStack()}, getSpecialSlot(), new ItemStack[] {aStack});
- case 2: return (!mRequiresFluidForFiltering || getFillableStack() != null) && (((getInputAt(0)!=null&&getInputAt(1)!=null) || (getInputAt(0)==null&&getInputAt(1)==null?getRecipeList().containsInput(aStack):null!=getRecipeList().findRecipe(getBaseMetaTileEntity(), mLastRecipe, true, V[mTier], new FluidStack[] {getFillableStack()}, getSpecialSlot(), aIndex == getInputSlot() ? new ItemStack[] {aStack, getInputAt(1)} : new ItemStack[] {getInputAt(0), aStack}))));
- default: return getRecipeList().containsInput(aStack);
- }
- }
-
- @Override
- public void onPreTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
- super.onPreTick(aBaseMetaTileEntity, aTick);
- if (aBaseMetaTileEntity.isClientSide() && aBaseMetaTileEntity.isActive()) {
- switch (mSpecialEffect) {
- case 0:
- break;
- case 1:
- if (aBaseMetaTileEntity.getFrontFacing() != 1 && aBaseMetaTileEntity.getCoverIDAtSide((byte)1) == 0 && !aBaseMetaTileEntity.getOpacityAtSide((byte)1)) {
- Random tRandom = aBaseMetaTileEntity.getWorld().rand;
- aBaseMetaTileEntity.getWorld().spawnParticle("smoke", aBaseMetaTileEntity.getXCoord() + 0.8F -tRandom.nextFloat()*0.6F, aBaseMetaTileEntity.getYCoord() + 0.9F + tRandom.nextFloat()*0.2F, aBaseMetaTileEntity.getZCoord() + 0.8F -tRandom.nextFloat()*0.6F, 0.0D, 0.0D, 0.0D);
- }
- break;
- }
- }
- }
-
- @Override
- public GT_Recipe_Map getRecipeList() {
- return mRecipes;
- }
-
- @Override
- public int getCapacity() {
- return mTankCapacity;
- }
-
- @Override
- public void startSoundLoop(byte aIndex, double aX, double aY, double aZ) {
- super.startSoundLoop(aIndex, aX, aY, aZ);
- if (aIndex == 1 && GT_Utility.isStringValid(mSound)) GT_Utility.doSoundAtClient(mSound, 100, 1.0F, aX, aY, aZ);
- }
-
- @Override
- public void startProcess() {
- if (GT_Utility.isStringValid(mSound)) sendLoopStart((byte)1);
- }
-
- @Override
- public FluidStack getFillableStack() {
- return mSharedTank ? getDrainableStack() : super.getFillableStack();
- }
-
- @Override
- public FluidStack setFillableStack(FluidStack aFluid) {
- return mSharedTank ? setDrainableStack(aFluid) : super.setFillableStack(aFluid);
- }
-
- @Override
- protected boolean displaysOutputFluid() {
- return !mSharedTank;
- }
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine_Steel.java b/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine_Steel.java
deleted file mode 100644
index a9a172bb17..0000000000
--- a/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine_Steel.java
+++ /dev/null
@@ -1,103 +0,0 @@
-package gregtech.api.metatileentity.implementations;
-
-import gregtech.api.enums.Dyes;
-import gregtech.api.enums.Textures;
-import gregtech.api.interfaces.ITexture;
-import gregtech.api.objects.GT_RenderedTexture;
-
-
-/**
- * NEVER INCLUDE THIS FILE IN YOUR MOD!!!
- *
- * This is the main construct for my Basic Machines such as the Automatic Extractor
- * Extend this class to make a simple Machine
- */
-public abstract class GT_MetaTileEntity_BasicMachine_Steel extends GT_MetaTileEntity_BasicMachine_Bronze {
- public GT_MetaTileEntity_BasicMachine_Steel(int aID, String aName, String aNameRegional, String aDescription, int aInputSlotCount, int aOutputSlotCount, boolean aBricked) {
- super(aID, aName, aNameRegional, aDescription, aInputSlotCount, aOutputSlotCount, aBricked);
- }
-
- public GT_MetaTileEntity_BasicMachine_Steel(String aName, String aDescription, ITexture[][][] aTextures, int aInputSlotCount, int aOutputSlotCount, boolean aBricked) {
- super(aName, aDescription, aTextures, aInputSlotCount, aOutputSlotCount, aBricked);
- }
- /*
- @Override
- public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
- return new GT_MetaTileEntity_BasicMachine_Steel(mTier, mDescription, mTextures);
- }
- */
- @Override
- public float getSteamDamage() {
- return 12.0F;
- }
-
- @Override
- public ITexture[] getSideFacingActive(byte aColor) {
- return new ITexture[] {new GT_RenderedTexture(mTier==1?Textures.BlockIcons.MACHINE_STEELBRICKS_SIDE:Textures.BlockIcons.MACHINE_STEEL_SIDE, Dyes.getModulation(aColor, Dyes._NULL.mRGBa))};
- }
-
- @Override
- public ITexture[] getSideFacingInactive(byte aColor) {
- return new ITexture[] {new GT_RenderedTexture(mTier==1?Textures.BlockIcons.MACHINE_STEELBRICKS_SIDE:Textures.BlockIcons.MACHINE_STEEL_SIDE, Dyes.getModulation(aColor, Dyes._NULL.mRGBa))};
- }
-
- @Override
- public ITexture[] getFrontFacingActive(byte aColor) {
- return new ITexture[] {new GT_RenderedTexture(mTier==1?Textures.BlockIcons.MACHINE_STEELBRICKS_SIDE:Textures.BlockIcons.MACHINE_STEEL_SIDE, Dyes.getModulation(aColor, Dyes._NULL.mRGBa))};
- }
-
- @Override
- public ITexture[] getFrontFacingInactive(byte aColor) {
- return new ITexture[] {new GT_RenderedTexture(mTier==1?Textures.BlockIcons.MACHINE_STEELBRICKS_SIDE:Textures.BlockIcons.MACHINE_STEEL_SIDE, Dyes.getModulation(aColor, Dyes._NULL.mRGBa))};
- }
-
- @Override
- public ITexture[] getTopFacingActive(byte aColor) {
- return new ITexture[] {new GT_RenderedTexture(mTier==1?Textures.BlockIcons.MACHINE_STEELBRICKS_TOP:Textures.BlockIcons.MACHINE_STEEL_TOP, Dyes.getModulation(aColor, Dyes._NULL.mRGBa))};
- }
-
- @Override
- public ITexture[] getTopFacingInactive(byte aColor) {
- return new ITexture[] {new GT_RenderedTexture(mTier==1?Textures.BlockIcons.MACHINE_STEELBRICKS_TOP:Textures.BlockIcons.MACHINE_STEEL_TOP, Dyes.getModulation(aColor, Dyes._NULL.mRGBa))};
- }
-
- @Override
- public ITexture[] getBottomFacingActive(byte aColor) {
- return new ITexture[] {new GT_RenderedTexture(mTier==1?Textures.BlockIcons.MACHINE_STEELBRICKS_BOTTOM:Textures.BlockIcons.MACHINE_STEEL_BOTTOM, Dyes.getModulation(aColor, Dyes._NULL.mRGBa))};
- }
-
- @Override
- public ITexture[] getBottomFacingInactive(byte aColor) {
- return new ITexture[] {new GT_RenderedTexture(mTier==1?Textures.BlockIcons.MACHINE_STEELBRICKS_BOTTOM:Textures.BlockIcons.MACHINE_STEEL_BOTTOM, Dyes.getModulation(aColor, Dyes._NULL.mRGBa))};
- }
-
- @Override
- public ITexture[] getBottomFacingPipeActive(byte aColor) {
- return new ITexture[] {new GT_RenderedTexture(mTier==1?Textures.BlockIcons.MACHINE_STEELBRICKS_BOTTOM:Textures.BlockIcons.MACHINE_STEEL_BOTTOM, Dyes.getModulation(aColor, Dyes._NULL.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT)};
- }
-
- @Override
- public ITexture[] getBottomFacingPipeInactive(byte aColor) {
- return new ITexture[] {new GT_RenderedTexture(mTier==1?Textures.BlockIcons.MACHINE_STEELBRICKS_BOTTOM:Textures.BlockIcons.MACHINE_STEEL_BOTTOM, Dyes.getModulation(aColor, Dyes._NULL.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT)};
- }
-
- @Override
- public ITexture[] getTopFacingPipeActive(byte aColor) {
- return new ITexture[] {new GT_RenderedTexture(mTier==1?Textures.BlockIcons.MACHINE_STEELBRICKS_TOP:Textures.BlockIcons.MACHINE_STEEL_TOP, Dyes.getModulation(aColor, Dyes._NULL.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT)};
- }
-
- @Override
- public ITexture[] getTopFacingPipeInactive(byte aColor) {
- return new ITexture[] {new GT_RenderedTexture(mTier==1?Textures.BlockIcons.MACHINE_STEELBRICKS_TOP:Textures.BlockIcons.MACHINE_STEEL_TOP, Dyes.getModulation(aColor, Dyes._NULL.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT)};
- }
-
- @Override
- public ITexture[] getSideFacingPipeActive(byte aColor) {
- return new ITexture[] {new GT_RenderedTexture(mTier==1?Textures.BlockIcons.MACHINE_STEELBRICKS_SIDE:Textures.BlockIcons.MACHINE_STEEL_SIDE, Dyes.getModulation(aColor, Dyes._NULL.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT)};
- }
-
- @Override
- public ITexture[] getSideFacingPipeInactive(byte aColor) {
- return new ITexture[] {new GT_RenderedTexture(mTier==1?Textures.BlockIcons.MACHINE_STEELBRICKS_SIDE:Textures.BlockIcons.MACHINE_STEEL_SIDE, Dyes.getModulation(aColor, Dyes._NULL.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT)};
- }
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicTank.java b/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicTank.java
deleted file mode 100644
index 594411c3dd..0000000000
--- a/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicTank.java
+++ /dev/null
@@ -1,206 +0,0 @@
-package gregtech.api.metatileentity.implementations;
-
-import gregtech.api.enums.ItemList;
-import gregtech.api.gui.GT_Container_BasicTank;
-import gregtech.api.gui.GT_GUIContainer_BasicTank;
-import gregtech.api.interfaces.ITexture;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.util.GT_Utility;
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraftforge.fluids.FluidStack;
-
-/**
- * NEVER INCLUDE THIS FILE IN YOUR MOD!!!
- *
- * This is the main construct for my generic Tanks. Filling and emptying behavior have to be implemented manually
- */
-public abstract class GT_MetaTileEntity_BasicTank extends GT_MetaTileEntity_TieredMachineBlock {
-
- public FluidStack mFluid;
-
- /**
- * @param aInvSlotCount should be 3
- */
- public GT_MetaTileEntity_BasicTank(int aID, String aName, String aNameRegional, int aTier, int aInvSlotCount, String aDescription, ITexture... aTextures) {
- super(aID, aName, aNameRegional, aTier, aInvSlotCount, aDescription, aTextures);
- }
-
- public GT_MetaTileEntity_BasicTank(String aName, int aTier, int aInvSlotCount, String aDescription, ITexture[][][] aTextures) {
- super(aName, aTier, aInvSlotCount, aDescription, aTextures);
- }
-
- @Override public boolean isSimpleMachine() {return false;}
- @Override public boolean isValidSlot(int aIndex) {return aIndex != getStackDisplaySlot();}
-
- @Override
- public void saveNBTData(NBTTagCompound aNBT) {
- if (mFluid != null) aNBT.setTag("mFluid", mFluid.writeToNBT(new NBTTagCompound()));
- }
-
- @Override
- public void loadNBTData(NBTTagCompound aNBT) {
- mFluid = FluidStack.loadFluidStackFromNBT(aNBT.getCompoundTag("mFluid"));
- }
-
- public abstract boolean doesFillContainers();
- public abstract boolean doesEmptyContainers();
- public abstract boolean canTankBeFilled();
- public abstract boolean canTankBeEmptied();
- public abstract boolean displaysItemStack();
- public abstract boolean displaysStackSize();
- public int getInputSlot() {return 0;}
- public int getOutputSlot() {return 1;}
- public int getStackDisplaySlot() {return 2;}
-
- public boolean isFluidInputAllowed(FluidStack aFluid) {return true;}
- public boolean isFluidChangingAllowed() {return true;}
-
- public FluidStack getFillableStack() {return mFluid;}
- public FluidStack setFillableStack(FluidStack aFluid) {mFluid = aFluid; return mFluid;}
- public FluidStack getDrainableStack() {return mFluid;}
- public FluidStack setDrainableStack(FluidStack aFluid) {mFluid = aFluid; return mFluid;}
- public FluidStack getDisplayedFluid() {return getDrainableStack();}
-
- @Override
- public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- return new GT_Container_BasicTank(aPlayerInventory, aBaseMetaTileEntity);
- }
-
- @Override
- public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- return new GT_GUIContainer_BasicTank(aPlayerInventory, aBaseMetaTileEntity, getLocalName());
- }
-
- @Override
- public void onPreTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
- if (aBaseMetaTileEntity.isServerSide()) {
- if (isFluidChangingAllowed() && getFillableStack() != null && getFillableStack().amount <= 0) setFillableStack(null);
-
- if (displaysItemStack() && getStackDisplaySlot() >= 0 && getStackDisplaySlot() < mInventory.length) {
- if (getDisplayedFluid() == null) {
- if (ItemList.Display_Fluid.isStackEqual(mInventory[getStackDisplaySlot()], true, true)) mInventory[getStackDisplaySlot()] = null;
- } else {
- mInventory[getStackDisplaySlot()] = GT_Utility.getFluidDisplayStack(getDisplayedFluid(), displaysStackSize());
- }
- }
-
- if (doesEmptyContainers()) {
- FluidStack tFluid = GT_Utility.getFluidForFilledItem(mInventory[getInputSlot()], true);
- if (tFluid != null && isFluidInputAllowed(tFluid)) {
- if (getFillableStack() == null) {
- if (isFluidInputAllowed(tFluid) && tFluid.amount <= getCapacity()) {
- if (aBaseMetaTileEntity.addStackToSlot(getOutputSlot(), GT_Utility.getContainerItem(mInventory[getInputSlot()], true), 1)) {
- setFillableStack(tFluid.copy());
- aBaseMetaTileEntity.decrStackSize(getInputSlot(), 1);
- }
- }
- } else {
- if (tFluid.isFluidEqual(getFillableStack()) && tFluid.amount + getFillableStack().amount <= getCapacity()) {
- if (aBaseMetaTileEntity.addStackToSlot(getOutputSlot(), GT_Utility.getContainerItem(mInventory[getInputSlot()], true), 1)) {
- getFillableStack().amount+=tFluid.amount;
- aBaseMetaTileEntity.decrStackSize(getInputSlot(), 1);
- }
- }
- }
- }
- }
-
- if (doesFillContainers()) {
- ItemStack tOutput = GT_Utility.fillFluidContainer(getDrainableStack(), mInventory[getInputSlot()], false, true);
- if (tOutput != null && aBaseMetaTileEntity.addStackToSlot(getOutputSlot(), tOutput, 1)) {
- FluidStack tFluid = GT_Utility.getFluidForFilledItem(tOutput, true);
- aBaseMetaTileEntity.decrStackSize(getInputSlot(), 1);
- if (tFluid != null) getDrainableStack().amount -= tFluid.amount;
- if (getDrainableStack().amount <= 0 && isFluidChangingAllowed()) setDrainableStack(null);
- }
- }
- }
- }
-
- @Override
- public FluidStack getFluid() {
- return getDrainableStack();
- }
-
- @Override
- public int getFluidAmount() {
- return getDrainableStack() != null ? getDrainableStack().amount : 0;
- }
-
- @Override
- public int fill(FluidStack aFluid, boolean doFill) {
- if (aFluid == null || aFluid.getFluid().getID() <= 0 || aFluid.amount <= 0 || !canTankBeFilled() || !isFluidInputAllowed(aFluid)) return 0;
-
- if (getFillableStack() == null || getFillableStack().getFluid().getID() <= 0) {
- if(aFluid.amount <= getCapacity()) {
- if (doFill) {
- setFillableStack(aFluid.copy());
- getBaseMetaTileEntity().markDirty();
- }
- return aFluid.amount;
- }
- if (doFill) {
- setFillableStack(aFluid.copy());
- getFillableStack().amount = getCapacity();
- getBaseMetaTileEntity().markDirty();
- }
- return getCapacity();
- }
-
- if (!getFillableStack().isFluidEqual(aFluid))
- return 0;
-
- int space = getCapacity() - getFillableStack().amount;
- if (aFluid.amount <= space) {
- if (doFill) {
- getFillableStack().amount += aFluid.amount;
- getBaseMetaTileEntity().markDirty();
- }
- return aFluid.amount;
- }
- if (doFill)
- getFillableStack().amount = getCapacity();
- return space;
- }
-
- @Override
- public FluidStack drain(int maxDrain, boolean doDrain) {
- if (getDrainableStack() == null || !canTankBeEmptied()) return null;
- if (getDrainableStack().amount <= 0 && isFluidChangingAllowed()) {
- setDrainableStack(null);
- getBaseMetaTileEntity().markDirty();
- return null;
- }
-
- int used = maxDrain;
- if (getDrainableStack().amount < used)
- used = getDrainableStack().amount;
-
- if (doDrain) {
- getDrainableStack().amount -= used;
- getBaseMetaTileEntity().markDirty();
- }
-
- FluidStack drained = getDrainableStack().copy();
- drained.amount = used;
-
- if (getDrainableStack().amount <= 0 && isFluidChangingAllowed()) {
- setDrainableStack(null);
- getBaseMetaTileEntity().markDirty();
- }
-
- return drained;
- }
-
- @Override
- public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
- return aIndex==getOutputSlot();
- }
-
- @Override
- public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
- return aIndex==getInputSlot();
- }
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Buffer.java b/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Buffer.java
deleted file mode 100644
index e6d5fe7386..0000000000
--- a/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Buffer.java
+++ /dev/null
@@ -1,172 +0,0 @@
-package gregtech.api.metatileentity.implementations;
-
-import static gregtech.api.enums.GT_Values.V;
-import gregtech.api.enums.Textures;
-import gregtech.api.interfaces.ITexture;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.objects.GT_RenderedTexture;
-import gregtech.api.util.GT_Utility;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-
-public abstract class GT_MetaTileEntity_Buffer extends GT_MetaTileEntity_TieredMachineBlock {
- public boolean bOutput = false, bRedstoneIfFull = false, bInvert = false;
- public int mSuccess = 0, mTargetStackSize = 0;
-
- public GT_MetaTileEntity_Buffer(int aID, String aName, String aNameRegional, int aTier, int aInvSlotCount, String aDescription) {
- super(aID, aName, aNameRegional, aTier, aInvSlotCount, aDescription);
- }
-
- public GT_MetaTileEntity_Buffer(String aName, int aTier, int aInvSlotCount, String aDescription, ITexture[][][] aTextures) {
- super(aName, aTier, aInvSlotCount, aDescription, aTextures);
- }
-
- @Override
- public ITexture[][][] getTextureSet(ITexture[] aTextures) {
- ITexture[][][] rTextures = new ITexture[6][17][];
- ITexture tIcon = getOverlayIcon(), tOut = new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT), tUp = new GT_RenderedTexture(Textures.BlockIcons.ARROW_UP), tDown = new GT_RenderedTexture(Textures.BlockIcons.ARROW_DOWN), tLeft = new GT_RenderedTexture(Textures.BlockIcons.ARROW_LEFT), tRight = new GT_RenderedTexture(Textures.BlockIcons.ARROW_RIGHT);
- for (byte i = -1; i < 16; i++) {
- rTextures[ 0][i+1] = new ITexture[] {Textures.BlockIcons.MACHINE_CASINGS[mTier][i+1], tOut };
- rTextures[ 1][i+1] = new ITexture[] {Textures.BlockIcons.MACHINE_CASINGS[mTier][i+1], tRight , tIcon };
- rTextures[ 2][i+1] = new ITexture[] {Textures.BlockIcons.MACHINE_CASINGS[mTier][i+1], tDown , tIcon };
- rTextures[ 3][i+1] = new ITexture[] {Textures.BlockIcons.MACHINE_CASINGS[mTier][i+1], tLeft , tIcon };
- rTextures[ 4][i+1] = new ITexture[] {Textures.BlockIcons.MACHINE_CASINGS[mTier][i+1], tUp , tIcon };
- rTextures[ 5][i+1] = new ITexture[] {Textures.BlockIcons.MACHINE_CASINGS[mTier][i+1] , tIcon };
- }
- return rTextures;
- }
-
- @Override
- public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
- if (aSide == aFacing) return mTextures[5][aColorIndex+1];
- if (GT_Utility.getOppositeSide(aSide) == aFacing) return mTextures[0][aColorIndex+1];
- switch (aFacing) {
- case 0:
- return mTextures[4][aColorIndex+1];
- case 1:
- return mTextures[2][aColorIndex+1];
- case 2: switch (aSide) {
- case 0: return mTextures[2][aColorIndex+1];
- case 1: return mTextures[2][aColorIndex+1];
- case 4: return mTextures[1][aColorIndex+1];
- case 5: return mTextures[3][aColorIndex+1];
- }
- case 3: switch (aSide) {
- case 0: return mTextures[4][aColorIndex+1];
- case 1: return mTextures[4][aColorIndex+1];
- case 4: return mTextures[3][aColorIndex+1];
- case 5: return mTextures[1][aColorIndex+1];
- }
- case 4: switch (aSide) {
- case 0: return mTextures[3][aColorIndex+1];
- case 1: return mTextures[1][aColorIndex+1];
- case 2: return mTextures[3][aColorIndex+1];
- case 3: return mTextures[1][aColorIndex+1];
- }
- case 5: switch (aSide) {
- case 0: return mTextures[1][aColorIndex+1];
- case 1: return mTextures[3][aColorIndex+1];
- case 2: return mTextures[1][aColorIndex+1];
- case 3: return mTextures[3][aColorIndex+1];
- }
- }
- return mTextures[5][aColorIndex+1];
- }
-
- @Override public boolean isSimpleMachine() {return false;}
- @Override public boolean isValidSlot(int aIndex) {return aIndex<mInventory.length-1;}
- @Override public boolean isFacingValid(byte aFacing) {return true;}
- @Override public boolean isEnetInput() {return true;}
- @Override public boolean isEnetOutput() {return true;}
- @Override public boolean isInputFacing(byte aSide) {return !isOutputFacing(aSide);}
- @Override public boolean isOutputFacing(byte aSide) {return getBaseMetaTileEntity().getBackFacing() == aSide;}
- @Override public boolean isTeleporterCompatible() {return false;}
- @Override public long getMinimumStoredEU() {return 512;}
- @Override public long maxEUStore() {return 512+V[mTier]*50;}
- @Override public long maxEUInput() {return V[mTier];}
- @Override public long maxEUOutput() {return bOutput?V[mTier]:0;}
- @Override public long maxAmperesIn() {return 2;}
- @Override public long maxAmperesOut() {return 2;}
- @Override public boolean isAccessAllowed(EntityPlayer aPlayer) {return true;}
-
- public abstract ITexture getOverlayIcon();
-
- @Override
- public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) {
- if (aBaseMetaTileEntity.isClientSide()) return true;
- aBaseMetaTileEntity.openGUI(aPlayer);
- return true;
- }
-
- @Override
- public void saveNBTData(NBTTagCompound aNBT) {
- aNBT.setBoolean("bInvert", bInvert);
- aNBT.setBoolean("bOutput", bOutput);
- aNBT.setBoolean("bRedstoneIfFull", bRedstoneIfFull);
- aNBT.setInteger("mTargetStackSize", mTargetStackSize);
- }
-
- @Override
- public void loadNBTData(NBTTagCompound aNBT) {
- bInvert = aNBT.getBoolean("bInvert");
- bOutput = aNBT.getBoolean("bOutput");
- bRedstoneIfFull = aNBT.getBoolean("bRedstoneIfFull");
- mTargetStackSize = aNBT.getInteger("mTargetStackSize");
- }
-
- @Override
- public void setItemNBT(NBTTagCompound aNBT) {
- super.setItemNBT(aNBT);
- if (mTargetStackSize > 0) aNBT.setInteger("mTargetStackSize", mTargetStackSize);
- }
-
- @Override
- public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) {
- if (aSide == getBaseMetaTileEntity().getBackFacing()) {
- mTargetStackSize=(byte)((mTargetStackSize+1)%65);
- if (mTargetStackSize == 0) {
- GT_Utility.sendChatToPlayer(aPlayer, "Do not regulate Item Stack Size");
- } else {
- GT_Utility.sendChatToPlayer(aPlayer, "Regulate Item Stack Size to: " + mTargetStackSize);
- }
- }
- }
-
- @Override
- public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTimer) {
- if (aBaseMetaTileEntity.isAllowedToWork() && aBaseMetaTileEntity.isServerSide() && aBaseMetaTileEntity.isUniversalEnergyStored(getMinimumStoredEU()) && (aBaseMetaTileEntity.hasWorkJustBeenEnabled() || aBaseMetaTileEntity.hasInventoryBeenModified() || aTimer%200 == 0 || mSuccess > 0)) {
- mSuccess--;
- moveItems(aBaseMetaTileEntity, aTimer);
- aBaseMetaTileEntity.setGenericRedstoneOutput(bInvert);
- if (bRedstoneIfFull) {
- aBaseMetaTileEntity.setGenericRedstoneOutput(!bInvert);
- for (int i = 0; i < mInventory.length; i++) if (isValidSlot(i)) {
- if (mInventory[i] == null) {
- aBaseMetaTileEntity.setGenericRedstoneOutput(bInvert);
- aBaseMetaTileEntity.decreaseStoredEnergyUnits(1, true);
- break;
- }
- }
- }
- }
- }
-
- protected void moveItems(IGregTechTileEntity aBaseMetaTileEntity, long aTimer) {
- int tCost = GT_Utility.moveOneItemStack(aBaseMetaTileEntity, aBaseMetaTileEntity.getTileEntityAtSide(aBaseMetaTileEntity.getBackFacing()), aBaseMetaTileEntity.getBackFacing(), aBaseMetaTileEntity.getFrontFacing(), null, false, mTargetStackSize==0?64:(byte)mTargetStackSize, mTargetStackSize==0?1:(byte)mTargetStackSize, (byte)64, (byte)1);
- if (tCost > 0 || aBaseMetaTileEntity.hasInventoryBeenModified()) {
- mSuccess = 50;
- aBaseMetaTileEntity.decreaseStoredEnergyUnits(Math.abs(tCost), true);
- }
- }
-
- @Override
- public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
- return true;
- }
-
- @Override
- public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
- return aSide != aBaseMetaTileEntity.getBackFacing();
- }
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch.java b/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch.java
deleted file mode 100644
index 709f3d4f7a..0000000000
--- a/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch.java
+++ /dev/null
@@ -1,89 +0,0 @@
-package gregtech.api.metatileentity.implementations;
-
-import gregtech.api.enums.Textures;
-import gregtech.api.interfaces.ITexture;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import net.minecraft.nbt.NBTTagCompound;
-
-public abstract class GT_MetaTileEntity_Hatch extends GT_MetaTileEntity_BasicTank {
-
- public byte mMachineBlock = 0;
-
- public static int getSlots(int aTier)
- {
- return aTier < 1 ? 1 : aTier == 1 ? 4 : aTier == 2 ? 9 : 16;
- }
-
- public GT_MetaTileEntity_Hatch(int aID, String aName, String aNameRegional, int aTier, int aInvSlotCount, String aDescription, ITexture... aTextures) {
- super(aID, aName, aNameRegional, aTier, aInvSlotCount, aDescription, aTextures);
- }
-
- public GT_MetaTileEntity_Hatch(String aName, int aTier, int aInvSlotCount, String aDescription, ITexture[][][] aTextures) {
- super(aName, aTier, aInvSlotCount, aDescription, aTextures);
- }
-
- @Override
- public ITexture[][][] getTextureSet(ITexture[] aTextures) {
- return new ITexture[0][0][0];
- }
-
- public abstract ITexture[] getTexturesActive(ITexture aBaseTexture);
- public abstract ITexture[] getTexturesInactive(ITexture aBaseTexture);
-
- @Override
- public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
- return aSide != aFacing ? mMachineBlock != 0 ? new ITexture[] {Textures.BlockIcons.CASING_BLOCKS[mMachineBlock]} : new ITexture[] {Textures.BlockIcons.MACHINE_CASINGS[mTier][aColorIndex+1]} : mMachineBlock != 0 ? aActive ? getTexturesActive(Textures.BlockIcons.CASING_BLOCKS[mMachineBlock]) : getTexturesInactive(Textures.BlockIcons.CASING_BLOCKS[mMachineBlock]) : aActive ? getTexturesActive(Textures.BlockIcons.MACHINE_CASINGS[mTier][aColorIndex+1]) : getTexturesInactive(Textures.BlockIcons.MACHINE_CASINGS[mTier][aColorIndex+1]);
- }
-
- @Override
- public void saveNBTData(NBTTagCompound aNBT) {
- super.saveNBTData(aNBT);
- aNBT.setByte("mMachineBlock", mMachineBlock);
- }
-
- @Override
- public void loadNBTData(NBTTagCompound aNBT) {
- super.loadNBTData(aNBT);
- mMachineBlock = aNBT.getByte("mMachineBlock");
- }
-
- @Override
- public final void onValueUpdate(byte aValue) {
- mMachineBlock = (byte)(aValue & 127);
- }
-
- @Override
- public final byte getUpdateData() {
- return (byte)(mMachineBlock & 127);
- }
-
- @Override
- public boolean doesFillContainers() {
- return false;
- }
-
- @Override
- public boolean doesEmptyContainers() {
- return false;
- }
-
- @Override
- public boolean canTankBeFilled() {
- return false;
- }
-
- @Override
- public boolean canTankBeEmptied() {
- return false;
- }
-
- @Override
- public boolean displaysItemStack() {
- return false;
- }
-
- @Override
- public boolean displaysStackSize() {
- return false;
- }
-}
diff --git a/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Dynamo.java b/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Dynamo.java
deleted file mode 100644
index caeec17bb1..0000000000
--- a/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Dynamo.java
+++ /dev/null
@@ -1,54 +0,0 @@
-package gregtech.api.metatileentity.implementations;
-
-import static gregtech.api.enums.GT_Values.V;
-import gregtech.api.enums.Textures;
-import gregtech.api.interfaces.ITexture;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.metatileentity.MetaTileEntity;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-
-public class GT_MetaTileEntity_Hatch_Dynamo extends GT_MetaTileEntity_Hatch {
- public GT_MetaTileEntity_Hatch_Dynamo(int aID, String aName, String aNameRegional, int aTier) {
- super(aID, aName, aNameRegional, aTier, 0, "Generating electric Energy from Multiblocks");
- }
-
- public GT_MetaTileEntity_Hatch_Dynamo(String aName, int aTier, String aDescription, ITexture[][][] aTextures) {
- super(aName, aTier, 0, aDescription, aTextures);
- }
-
- @Override
- public ITexture[] getTexturesActive(ITexture aBaseTexture) {
- return new ITexture[] {aBaseTexture, Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[mTier]};
- }
-
- @Override
- public ITexture[] getTexturesInactive(ITexture aBaseTexture) {
- return new ITexture[] {aBaseTexture, Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[mTier]};
- }
-
- @Override public boolean isSimpleMachine() {return true;}
- @Override public boolean isFacingValid(byte aFacing) {return true;}
- @Override public boolean isAccessAllowed(EntityPlayer aPlayer) {return true;}
- @Override public boolean isEnetOutput() {return true;}
- @Override public boolean isOutputFacing(byte aSide) {return aSide==getBaseMetaTileEntity().getFrontFacing();}
- @Override public boolean isValidSlot(int aIndex) {return false;}
- @Override public long getMinimumStoredEU() {return 512;}
- @Override public long maxEUOutput() {return V[mTier];}
- @Override public long maxEUStore() {return 512+V[mTier+1]*2;}
-
- @Override
- public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
- return new GT_MetaTileEntity_Hatch_Dynamo(mName, mTier, mDescription, mTextures);
- }
-
- @Override
- public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
- return false;
- }
-
- @Override
- public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
- return false;
- }
-}
diff --git a/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Energy.java b/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Energy.java
deleted file mode 100644
index 571fbe0135..0000000000
--- a/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Energy.java
+++ /dev/null
@@ -1,55 +0,0 @@
-package gregtech.api.metatileentity.implementations;
-
-import static gregtech.api.enums.GT_Values.V;
-import gregtech.api.enums.Textures;
-import gregtech.api.interfaces.ITexture;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.metatileentity.MetaTileEntity;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-
-public class GT_MetaTileEntity_Hatch_Energy extends GT_MetaTileEntity_Hatch {
- public GT_MetaTileEntity_Hatch_Energy(int aID, String aName, String aNameRegional, int aTier) {
- super(aID, aName, aNameRegional, aTier, 0, "Energy Injector for Multiblocks");
- }
-
- public GT_MetaTileEntity_Hatch_Energy(String aName, int aTier, String aDescription, ITexture[][][] aTextures) {
- super(aName, aTier, 0, aDescription, aTextures);
- }
-
- @Override
- public ITexture[] getTexturesActive(ITexture aBaseTexture) {
- return new ITexture[] {aBaseTexture, Textures.BlockIcons.OVERLAYS_ENERGY_IN_MULTI[mTier]};
- }
-
- @Override
- public ITexture[] getTexturesInactive(ITexture aBaseTexture) {
- return new ITexture[] {aBaseTexture, Textures.BlockIcons.OVERLAYS_ENERGY_IN_MULTI[mTier]};
- }
-
- @Override public boolean isSimpleMachine() {return true;}
- @Override public boolean isFacingValid(byte aFacing) {return true;}
- @Override public boolean isAccessAllowed(EntityPlayer aPlayer) {return true;}
- @Override public boolean isEnetInput() {return true;}
- @Override public boolean isInputFacing(byte aSide) {return aSide==getBaseMetaTileEntity().getFrontFacing();}
- @Override public boolean isValidSlot(int aIndex) {return false;}
- @Override public long getMinimumStoredEU() {return 512;}
- @Override public long maxEUInput() {return V[mTier];}
- @Override public long maxEUStore() {return 512+V[mTier]*8;}
- @Override public long maxAmperesIn() {return 2;}
-
- @Override
- public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
- return new GT_MetaTileEntity_Hatch_Energy(mName, mTier, mDescription, mTextures);
- }
-
- @Override
- public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
- return false;
- }
-
- @Override
- public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
- return false;
- }
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Input.java b/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Input.java
deleted file mode 100644
index 64f2aaad99..0000000000
--- a/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Input.java
+++ /dev/null
@@ -1,86 +0,0 @@
-package gregtech.api.metatileentity.implementations;
-
-import gregtech.api.enums.Textures;
-import gregtech.api.interfaces.ITexture;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.metatileentity.MetaTileEntity;
-import gregtech.api.objects.GT_RenderedTexture;
-import gregtech.api.util.GT_Recipe.GT_Recipe_Map;
-import gregtech.api.util.GT_Utility;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraftforge.fluids.FluidStack;
-
-public class GT_MetaTileEntity_Hatch_Input extends GT_MetaTileEntity_Hatch {
- public GT_Recipe_Map mRecipeMap = null;
-
- public GT_MetaTileEntity_Hatch_Input(int aID, String aName, String aNameRegional, int aTier) {
- super(aID, aName, aNameRegional, aTier, 3, "Fluid Input for Multiblocks (" + 8000 * (aTier + 1) + "L)");
- }
-
- public GT_MetaTileEntity_Hatch_Input(String aName, int aTier, String aDescription, ITexture[][][] aTextures) {
- super(aName, aTier, 3, aDescription, aTextures);
- }
-
- @Override
- public ITexture[] getTexturesActive(ITexture aBaseTexture) {
- return new ITexture[] {aBaseTexture, new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_IN)};
- }
-
- @Override
- public ITexture[] getTexturesInactive(ITexture aBaseTexture) {
- return new ITexture[] {aBaseTexture, new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_IN)};
- }
-
- @Override public boolean isSimpleMachine() {return true;}
- @Override public boolean isFacingValid(byte aFacing) {return true;}
- @Override public boolean isAccessAllowed(EntityPlayer aPlayer) {return true;}
-
- @Override
- public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
- return new GT_MetaTileEntity_Hatch_Input(mName, mTier, mDescription, mTextures);
- }
-
- @Override
- public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) {
- if (aBaseMetaTileEntity.isClientSide()) return true;
- aBaseMetaTileEntity.openGUI(aPlayer);
- return true;
- }
-
- @Override public boolean doesFillContainers() {return true;}
- @Override public boolean doesEmptyContainers() {return true;}
- @Override public boolean canTankBeFilled() {return true;}
- @Override public boolean canTankBeEmptied() {return true;}
- @Override public boolean displaysItemStack() {return true;}
- @Override public boolean displaysStackSize() {return false;}
-
- public void updateSlots() {
- if (mInventory[getInputSlot()] != null && mInventory[getInputSlot()].stackSize <= 0) mInventory[getInputSlot()] = null;
- }
-
- @Override
- public boolean isFluidInputAllowed(FluidStack aFluid) {
- return mRecipeMap == null || mRecipeMap.containsInput(aFluid);
- }
-
- @Override
- public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
- return aSide == aBaseMetaTileEntity.getFrontFacing() && aIndex == 1;
- }
-
- @Override
- public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
- return aSide == aBaseMetaTileEntity.getFrontFacing() && aIndex == 0 && (mRecipeMap == null || mRecipeMap.containsInput(aStack) || mRecipeMap.containsInput(GT_Utility.getFluidForFilledItem(aStack, true)));
- }
-
- @Override
- public int getCapacity() {
- return 8000 * (mTier + 1);
- }
-
- @Override
- public int getTankPressure() {
- return -100;
- }
-}
diff --git a/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_InputBus.java b/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_InputBus.java
deleted file mode 100644
index ac66ea6ce0..0000000000
--- a/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_InputBus.java
+++ /dev/null
@@ -1,101 +0,0 @@
-package gregtech.api.metatileentity.implementations;
-
-import gregtech.api.enums.Textures;
-import gregtech.api.gui.*;
-import gregtech.api.interfaces.ITexture;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.metatileentity.MetaTileEntity;
-import gregtech.api.objects.GT_RenderedTexture;
-import gregtech.api.util.GT_Recipe.GT_Recipe_Map;
-import gregtech.api.util.GT_Utility;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.item.ItemStack;
-
-public class GT_MetaTileEntity_Hatch_InputBus extends GT_MetaTileEntity_Hatch {
- public GT_Recipe_Map mRecipeMap = null;
-
- public GT_MetaTileEntity_Hatch_InputBus(int aID, String aName, String aNameRegional, int aTier) {
- super(aID, aName, aNameRegional, aTier, getSlots(aTier), "Item Input for Multiblocks (" + getSlots(aTier) + " slot" + (getSlots(aTier) >= 2 ? "s" : "") + ")");
- }
-
- public GT_MetaTileEntity_Hatch_InputBus(String aName, int aTier, String aDescription, ITexture[][][] aTextures) {
- super(aName, aTier, aTier<1?1:aTier==1?4:aTier==2?9:16, aDescription, aTextures);
- }
-
- @Override
- public ITexture[] getTexturesActive(ITexture aBaseTexture) {
- return new ITexture[] {aBaseTexture, new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_IN)};
- }
-
- @Override
- public ITexture[] getTexturesInactive(ITexture aBaseTexture) {
- return new ITexture[] {aBaseTexture, new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_IN)};
- }
-
- @Override public boolean isSimpleMachine() {return true;}
- @Override public boolean isFacingValid(byte aFacing) {return true;}
- @Override public boolean isAccessAllowed(EntityPlayer aPlayer) {return true;}
- @Override public boolean isValidSlot(int aIndex) {return true;}
-
- @Override
- public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
- return new GT_MetaTileEntity_Hatch_InputBus(mName, mTier, mDescription, mTextures);
- }
-
- @Override
- public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) {
- if (aBaseMetaTileEntity.isClientSide()) return true;
- aBaseMetaTileEntity.openGUI(aPlayer);
- return true;
- }
-
- @Override
- public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- switch (mTier) {
- case 0: return new GT_Container_1by1(aPlayerInventory, aBaseMetaTileEntity);
- case 1: return new GT_Container_2by2(aPlayerInventory, aBaseMetaTileEntity);
- case 2: return new GT_Container_3by3(aPlayerInventory, aBaseMetaTileEntity);
- default: return new GT_Container_4by4(aPlayerInventory, aBaseMetaTileEntity);
- }
- }
-
- @Override
- public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- switch (mInventory.length) {
- case 1: return new GT_GUIContainer_1by1(aPlayerInventory, aBaseMetaTileEntity, "Input Bus");
- case 4: return new GT_GUIContainer_2by2(aPlayerInventory, aBaseMetaTileEntity, "Input Bus");
- case 9: return new GT_GUIContainer_3by3(aPlayerInventory, aBaseMetaTileEntity, "Input Bus");
- case 16: return new GT_GUIContainer_4by4(aPlayerInventory, aBaseMetaTileEntity, "Input Bus");
- default: return new GT_GUIContainer_4by4(aPlayerInventory, aBaseMetaTileEntity, "Input Bus");
- }
- }
-
- @Override
- public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTimer) {
- if (aBaseMetaTileEntity.isServerSide() && aBaseMetaTileEntity.hasInventoryBeenModified()) {
- fillStacksIntoFirstSlots();
- }
- }
-
- public void updateSlots() {
- for (int i = 0; i < mInventory.length; i++) if (mInventory[i] != null && mInventory[i].stackSize <= 0) mInventory[i] = null;
- fillStacksIntoFirstSlots();
- }
-
- protected void fillStacksIntoFirstSlots() {
- for (int i = 0; i < mInventory.length; i++) for (int j = i + 1; j < mInventory.length; j++) if (mInventory[j] != null && (mInventory[i] == null || GT_Utility.areStacksEqual(mInventory[i], mInventory[j]))) {
- GT_Utility.moveStackFromSlotAToSlotB(getBaseMetaTileEntity(), getBaseMetaTileEntity(), j, i, (byte)64, (byte)1, (byte)64, (byte)1);
- }
- }
-
- @Override
- public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
- return false;
- }
-
- @Override
- public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
- return aSide == getBaseMetaTileEntity().getFrontFacing() && (mRecipeMap == null || mRecipeMap.containsInput(aStack));
- }
-}
diff --git a/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Maintenance.java b/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Maintenance.java
deleted file mode 100644
index cd04a07d41..0000000000
--- a/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Maintenance.java
+++ /dev/null
@@ -1,108 +0,0 @@
-package gregtech.api.metatileentity.implementations;
-
-import gregtech.GT_Mod;
-import gregtech.api.GregTech_API;
-import gregtech.api.enums.Textures;
-import gregtech.api.gui.GT_Container_MaintenanceHatch;
-import gregtech.api.gui.GT_GUIContainer_MaintenanceHatch;
-import gregtech.api.interfaces.ITexture;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.metatileentity.MetaTileEntity;
-import gregtech.api.objects.GT_RenderedTexture;
-import gregtech.api.util.GT_ModHandler;
-import gregtech.api.util.GT_OreDictUnificator;
-import gregtech.api.util.GT_Utility;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.entity.player.EntityPlayerMP;
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-
-public class GT_MetaTileEntity_Hatch_Maintenance extends GT_MetaTileEntity_Hatch {
- public boolean mWrench = false, mScrewdriver = false, mSoftHammer = false, mHardHammer = false, mSolderingTool = false, mCrowbar = false;
-
- public GT_MetaTileEntity_Hatch_Maintenance(int aID, String aName, String aNameRegional, int aTier) {
- super(aID, aName, aNameRegional, aTier, 1, "For maintaining Multiblocks");
- }
-
- public GT_MetaTileEntity_Hatch_Maintenance(String aName, int aTier, String aDescription, ITexture[][][] aTextures) {
- super(aName, aTier, 1, aDescription, aTextures);
- }
-
- @Override
- public String[] getDescription() {
- return new String[] {mDescription, "Cannot be shared between Multiblocks!"};
- }
-
- @Override
- public ITexture[] getTexturesActive(ITexture aBaseTexture) {
- return new ITexture[] {aBaseTexture, new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_MAINTENANCE)};
- }
-
- @Override
- public ITexture[] getTexturesInactive(ITexture aBaseTexture) {
- return new ITexture[] {aBaseTexture, new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_MAINTENANCE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_DUCTTAPE)};
- }
-
- @Override
- public void initDefaultModes(NBTTagCompound aNBT) {
- getBaseMetaTileEntity().setActive(true);
- }
-
- @Override public boolean isSimpleMachine() {return true;}
- @Override public boolean isFacingValid(byte aFacing) {return true;}
- @Override public boolean isAccessAllowed(EntityPlayer aPlayer) {return true;}
- @Override public boolean isValidSlot(int aIndex) {return false;}
-
- @Override
- public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
- return new GT_MetaTileEntity_Hatch_Maintenance(mName, mTier, mDescription, mTextures);
- }
-
- @Override
- public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer, byte aSide, float aX, float aY, float aZ) {
- if (aBaseMetaTileEntity.isClientSide()) return true;
- if (aSide == aBaseMetaTileEntity.getFrontFacing()) aBaseMetaTileEntity.openGUI(aPlayer);
- return true;
- }
-
- @Override
- public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- return new GT_Container_MaintenanceHatch(aPlayerInventory, aBaseMetaTileEntity);
- }
-
- @Override
- public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- return new GT_GUIContainer_MaintenanceHatch(aPlayerInventory, aBaseMetaTileEntity);
- }
-
- public void onToolClick(ItemStack aStack, EntityLivingBase aPlayer) {
- if (aStack == null || aPlayer == null) return;
- if (GT_Utility.isStackInList(aStack, GregTech_API.sWrenchList ) && GT_ModHandler.damageOrDechargeItem(aStack, 1, 1000, aPlayer)) mWrench = true;
- if (GT_Utility.isStackInList(aStack, GregTech_API.sScrewdriverList ) && GT_ModHandler.damageOrDechargeItem(aStack, 1, 1000, aPlayer)) mScrewdriver = true;
- if (GT_Utility.isStackInList(aStack, GregTech_API.sSoftHammerList ) && GT_ModHandler.damageOrDechargeItem(aStack, 1, 1000, aPlayer)) mSoftHammer = true;
- if (GT_Utility.isStackInList(aStack, GregTech_API.sHardHammerList ) && GT_ModHandler.damageOrDechargeItem(aStack, 1, 1000, aPlayer)) mHardHammer = true;
- if (GT_Utility.isStackInList(aStack, GregTech_API.sCrowbarList ) && GT_ModHandler.damageOrDechargeItem(aStack, 1, 1000, aPlayer)) mCrowbar = true;
- if (GT_ModHandler.useSolderingIron(aStack, aPlayer)) mSolderingTool = true;
- if (GT_OreDictUnificator.isItemStackInstanceOf(aStack, "craftingDuctTape")) {
- mWrench = mScrewdriver = mSoftHammer = mHardHammer = mCrowbar = mSolderingTool = true;
- getBaseMetaTileEntity().setActive(false);
- aStack.stackSize--;
- }
- if(mSolderingTool&&aPlayer instanceof EntityPlayerMP){
- EntityPlayerMP tPlayer = (EntityPlayerMP) aPlayer;
- try{GT_Mod.instance.achievements.issueAchievement( tPlayer, "maintainance");}catch(Exception e){}
- }
- }
-
- @Override
- public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
- return false;
- }
-
- @Override
- public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
- return false;
- }
-}
diff --git a/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler.java b/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler.java
deleted file mode 100644
index de3b9968ac..0000000000
--- a/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler.java
+++ /dev/null
@@ -1,58 +0,0 @@
-package gregtech.api.metatileentity.implementations;
-
-import gregtech.api.enums.Textures;
-import gregtech.api.interfaces.ITexture;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.metatileentity.MetaTileEntity;
-import gregtech.api.objects.GT_RenderedTexture;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-
-public class GT_MetaTileEntity_Hatch_Muffler extends GT_MetaTileEntity_Hatch {
- public GT_MetaTileEntity_Hatch_Muffler(int aID, String aName, String aNameRegional, int aTier) {
- super(aID, aName, aNameRegional, aTier, 0, "Outputs the Pollution (Pollution might come later)");
- }
-
- public GT_MetaTileEntity_Hatch_Muffler(String aName, int aTier, String aDescription, ITexture[][][] aTextures) {
- super(aName, aTier, 0, aDescription, aTextures);
- }
-
- @Override
- public String[] getDescription() {
- return new String[] {mDescription, "DO NOT OBSTRUCT THE OUTPUT!"};
- }
-
- @Override
- public ITexture[] getTexturesActive(ITexture aBaseTexture) {
- return new ITexture[] {aBaseTexture, new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_MUFFLER)};
- }
-
- @Override
- public ITexture[] getTexturesInactive(ITexture aBaseTexture) {
- return new ITexture[] {aBaseTexture, new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_MUFFLER)};
- }
-
- @Override public boolean isSimpleMachine() {return true;}
- @Override public boolean isFacingValid(byte aFacing) {return true;}
- @Override public boolean isAccessAllowed(EntityPlayer aPlayer) {return true;}
- @Override public boolean isValidSlot(int aIndex) {return false;}
-
- @Override
- public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
- return new GT_MetaTileEntity_Hatch_Muffler(mName, mTier, mDescription, mTextures);
- }
-
- public boolean polluteEnvironment() {
- return (mTier > 1 && getBaseMetaTileEntity().getRandomNumber(mTier) != 0) || getBaseMetaTileEntity().getAirAtSide(getBaseMetaTileEntity().getFrontFacing());
- }
-
- @Override
- public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
- return false;
- }
-
- @Override
- public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
- return false;
- }
-}
diff --git a/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Output.java b/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Output.java
deleted file mode 100644
index ecf6627a09..0000000000
--- a/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Output.java
+++ /dev/null
@@ -1,141 +0,0 @@
-package gregtech.api.metatileentity.implementations;
-
-import gregtech.api.enums.Textures;
-import gregtech.api.interfaces.ITexture;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.metatileentity.MetaTileEntity;
-import gregtech.api.objects.GT_RenderedTexture;
-import gregtech.api.util.GT_Utility;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraftforge.common.util.ForgeDirection;
-import net.minecraftforge.fluids.FluidStack;
-import net.minecraftforge.fluids.IFluidHandler;
-
-public class GT_MetaTileEntity_Hatch_Output extends GT_MetaTileEntity_Hatch {
- public byte mMode = 0;
-
- public GT_MetaTileEntity_Hatch_Output(int aID, String aName, String aNameRegional, int aTier) {
- super(aID, aName, aNameRegional, aTier, 3, "Fluid Output for Multiblocks (" + 8000 * (aTier + 1) + "L) (Screwdriver for output type)");
- }
-
- public GT_MetaTileEntity_Hatch_Output(String aName, int aTier, String aDescription, ITexture[][][] aTextures) {
- super(aName, aTier, 3, aDescription, aTextures);
- }
-
- @Override
- public ITexture[] getTexturesActive(ITexture aBaseTexture) {
- return new ITexture[] {aBaseTexture, new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT)};
- }
-
- @Override
- public ITexture[] getTexturesInactive(ITexture aBaseTexture) {
- return new ITexture[] {aBaseTexture, new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT)};
- }
-
- @Override public boolean isSimpleMachine() {return true;}
- @Override public boolean isFacingValid(byte aFacing) {return true;}
- @Override public boolean isAccessAllowed(EntityPlayer aPlayer) {return true;}
- @Override public boolean isLiquidInput(byte aSide) {return false;}
-
- @Override
- public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
- return new GT_MetaTileEntity_Hatch_Output(mName, mTier, mDescription, mTextures);
- }
-
- @Override
- public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) {
- if (aBaseMetaTileEntity.isClientSide()) return true;
- aBaseMetaTileEntity.openGUI(aPlayer);
- return true;
- }
-
- @Override
- public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
- super.onPostTick(aBaseMetaTileEntity, aTick);
- if (aBaseMetaTileEntity.isServerSide() && aBaseMetaTileEntity.isAllowedToWork()) {
- IFluidHandler tTileEntity = aBaseMetaTileEntity.getITankContainerAtSide(aBaseMetaTileEntity.getFrontFacing());
- if (tTileEntity != null) {
- for (boolean temp = true; temp && mFluid != null;) {
- temp = false;
- FluidStack tDrained = aBaseMetaTileEntity.drain(ForgeDirection.getOrientation(aBaseMetaTileEntity.getFrontFacing()), Math.max(1, mFluid.amount), false);
- if (tDrained != null) {
- int tFilledAmount = tTileEntity.fill(ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()), tDrained, false);
- if (tFilledAmount > 0) {
- temp = true;
- tTileEntity.fill(ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()), aBaseMetaTileEntity.drain(ForgeDirection.getOrientation(aBaseMetaTileEntity.getFrontFacing()), tFilledAmount, true), true);
- }
- }
- }
- }
- }
- }
-
- @Override
- public void saveNBTData(NBTTagCompound aNBT) {
- super.saveNBTData(aNBT);
- aNBT.setByte("mMode", mMode);
- }
-
- @Override
- public void loadNBTData(NBTTagCompound aNBT) {
- super.loadNBTData(aNBT);
- mMode = aNBT.getByte("mMode");
- }
-
- @Override public boolean doesFillContainers() {return true;}
- @Override public boolean doesEmptyContainers() {return true;}
- @Override public boolean canTankBeFilled() {return true;}
- @Override public boolean canTankBeEmptied() {return true;}
- @Override public boolean displaysItemStack() {return true;}
- @Override public boolean displaysStackSize() {return false;}
-
- @Override
- public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
- return aSide == aBaseMetaTileEntity.getFrontFacing() && aIndex == 1;
- }
-
- @Override
- public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
- return aSide == aBaseMetaTileEntity.getFrontFacing() && aIndex == 0;
- }
-
- @Override
- public int getCapacity() {
- return 8000 * (mTier + 1);
- }
-
- @Override
- public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) {
- if (!getBaseMetaTileEntity().getCoverBehaviorAtSide(aSide).isGUIClickable(aSide, getBaseMetaTileEntity().getCoverIDAtSide(aSide), getBaseMetaTileEntity().getCoverDataAtSide(aSide), getBaseMetaTileEntity())) return;
- mMode = (byte)((mMode + 1) % 8);
- switch (mMode) {
- case 0: GT_Utility.sendChatToPlayer(aPlayer, "Outputs Liquids, Steam and Items"); break;
- case 1: GT_Utility.sendChatToPlayer(aPlayer, "Outputs Steam and Items"); break;
- case 2: GT_Utility.sendChatToPlayer(aPlayer, "Outputs Steam and Liquids"); break;
- case 3: GT_Utility.sendChatToPlayer(aPlayer, "Outputs Steam"); break;
- case 4: GT_Utility.sendChatToPlayer(aPlayer, "Outputs Liquids and Items"); break;
- case 5: GT_Utility.sendChatToPlayer(aPlayer, "Outputs only Items"); break;
- case 6: GT_Utility.sendChatToPlayer(aPlayer, "Outputs only Liquids"); break;
- case 7: GT_Utility.sendChatToPlayer(aPlayer, "Outputs nothing"); break;
- }
- }
-
- public boolean outputsSteam() {
- return mMode < 4;
- }
-
- public boolean outputsLiquids() {
- return mMode % 2 == 0;
- }
-
- public boolean outputsItems() {
- return mMode % 4 < 2;
- }
-
- @Override
- public int getTankPressure() {
- return +100;
- }
-}
diff --git a/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_OutputBus.java b/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_OutputBus.java
deleted file mode 100644
index 8baff8d4f4..0000000000
--- a/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_OutputBus.java
+++ /dev/null
@@ -1,79 +0,0 @@
-package gregtech.api.metatileentity.implementations;
-
-import gregtech.api.enums.Textures;
-import gregtech.api.gui.*;
-import gregtech.api.interfaces.ITexture;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.metatileentity.MetaTileEntity;
-import gregtech.api.objects.GT_RenderedTexture;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.item.ItemStack;
-
-public class GT_MetaTileEntity_Hatch_OutputBus extends GT_MetaTileEntity_Hatch {
- public GT_MetaTileEntity_Hatch_OutputBus(int aID, String aName, String aNameRegional, int aTier) {
- super(aID, aName, aNameRegional, aTier, getSlots(aTier), "Item Output for Multiblocks (" + getSlots(aTier) + " slot" + (getSlots(aTier) >= 2 ? "s" : "") + ")");
- }
-
- public GT_MetaTileEntity_Hatch_OutputBus(String aName, int aTier, String aDescription, ITexture[][][] aTextures) {
- super(aName, aTier, aTier<1?1:aTier==1?4:aTier==2?9:16, aDescription, aTextures);
- }
-
- @Override
- public ITexture[] getTexturesActive(ITexture aBaseTexture) {
- return new ITexture[] {aBaseTexture, new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT)};
- }
-
- @Override
- public ITexture[] getTexturesInactive(ITexture aBaseTexture) {
- return new ITexture[] {aBaseTexture, new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT)};
- }
-
- @Override public boolean isSimpleMachine() {return true;}
- @Override public boolean isFacingValid(byte aFacing) {return true;}
- @Override public boolean isAccessAllowed(EntityPlayer aPlayer) {return true;}
- @Override public boolean isValidSlot(int aIndex) {return true;}
-
- @Override
- public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
- return new GT_MetaTileEntity_Hatch_OutputBus(mName, mTier, mDescription, mTextures);
- }
-
- @Override
- public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) {
- if (aBaseMetaTileEntity.isClientSide()) return true;
- aBaseMetaTileEntity.openGUI(aPlayer);
- return true;
- }
-
- @Override
- public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- switch (mTier) {
- case 0: return new GT_Container_1by1(aPlayerInventory, aBaseMetaTileEntity);
- case 1: return new GT_Container_2by2(aPlayerInventory, aBaseMetaTileEntity);
- case 2: return new GT_Container_3by3(aPlayerInventory, aBaseMetaTileEntity);
- default: return new GT_Container_4by4(aPlayerInventory, aBaseMetaTileEntity);
- }
- }
-
- @Override
- public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- switch (mTier) {
- case 0: return new GT_GUIContainer_1by1(aPlayerInventory, aBaseMetaTileEntity, "Output Bus");
- case 1: return new GT_GUIContainer_2by2(aPlayerInventory, aBaseMetaTileEntity, "Output Bus");
- case 2: return new GT_GUIContainer_3by3(aPlayerInventory, aBaseMetaTileEntity, "Output Bus");
- case 3: return new GT_GUIContainer_4by4(aPlayerInventory, aBaseMetaTileEntity, "Output Bus");
- default: return new GT_GUIContainer_4by4(aPlayerInventory, aBaseMetaTileEntity, "Output Bus");
- }
- }
-
- @Override
- public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
- return aSide == aBaseMetaTileEntity.getFrontFacing();
- }
-
- @Override
- public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
- return false;
- }
-}
diff --git a/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java b/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java
deleted file mode 100644
index 1cb3c89a84..0000000000
--- a/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java
+++ /dev/null
@@ -1,729 +0,0 @@
-package gregtech.api.metatileentity.implementations;
-
-import static gregtech.api.enums.GT_Values.V;
-import gregtech.GT_Mod;
-import gregtech.api.GregTech_API;
-import gregtech.api.enums.ConfigCategories;
-import gregtech.api.enums.Materials;
-import gregtech.api.enums.OrePrefixes;
-import gregtech.api.gui.GT_Container_MultiMachine;
-import gregtech.api.gui.GT_GUIContainer_MultiMachine;
-import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.items.GT_MetaGenerated_Tool;
-import gregtech.api.metatileentity.MetaTileEntity;
-import gregtech.api.objects.GT_ItemStack;
-import gregtech.api.util.GT_ModHandler;
-import gregtech.api.util.GT_OreDictUnificator;
-import gregtech.api.util.GT_Recipe.GT_Recipe_Map;
-import gregtech.api.util.GT_Utility;
-import gregtech.common.items.GT_MetaGenerated_Tool_01;
-import gregtech.common.tools.GT_Tool_Turbine;
-
-import java.util.ArrayList;
-
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraftforge.fluids.FluidStack;
-
-public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity {
-
- public boolean mMachine = false, mWrench = false, mScrewdriver = false, mSoftHammer = false, mHardHammer = false, mSolderingTool = false, mCrowbar = false, mRunningOnLoad = false;
- public int mPollution = 0, mProgresstime = 0, mMaxProgresstime = 0, mEUt = 0, mEfficiencyIncrease = 0, mUpdate = 0, mStartUpCheck = 100, mRuntime = 0, mEfficiency = 0;
- public ItemStack[] mOutputItems = null;
- public FluidStack[] mOutputFluids = null;
- public static boolean disableMaintenance;
-
- public ArrayList<GT_MetaTileEntity_Hatch_Input> mInputHatches = new ArrayList<GT_MetaTileEntity_Hatch_Input>();
- public ArrayList<GT_MetaTileEntity_Hatch_Output> mOutputHatches = new ArrayList<GT_MetaTileEntity_Hatch_Output>();
- public ArrayList<GT_MetaTileEntity_Hatch_InputBus> mInputBusses = new ArrayList<GT_MetaTileEntity_Hatch_InputBus>();
- public ArrayList<GT_MetaTileEntity_Hatch_OutputBus> mOutputBusses = new ArrayList<GT_MetaTileEntity_Hatch_OutputBus>();
- public ArrayList<GT_MetaTileEntity_Hatch_Dynamo> mDynamoHatches = new ArrayList<GT_MetaTileEntity_Hatch_Dynamo>();
- public ArrayList<GT_MetaTileEntity_Hatch_Muffler> mMufflerHatches = new ArrayList<GT_MetaTileEntity_Hatch_Muffler>();
- public ArrayList<GT_MetaTileEntity_Hatch_Energy> mEnergyHatches = new ArrayList<GT_MetaTileEntity_Hatch_Energy>();
- public ArrayList<GT_MetaTileEntity_Hatch_Maintenance> mMaintenanceHatches = new ArrayList<GT_MetaTileEntity_Hatch_Maintenance>();
-
- public GT_MetaTileEntity_MultiBlockBase(int aID, String aName, String aNameRegional) {
- super(aID, aName, aNameRegional, 2);
- this.disableMaintenance = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "MultiBlockMachines.disableMaintenance", false);
- }
-
- public GT_MetaTileEntity_MultiBlockBase(String aName) {
- super(aName, 2);
- this.disableMaintenance = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "MultiBlockMachines.disableMaintenance", false);
- }
-
- @Override
- public boolean allowCoverOnSide(byte aSide, GT_ItemStack aCoverID) {
- return aSide != getBaseMetaTileEntity().getFrontFacing();
- }
-
- @Override public boolean isSimpleMachine() {return false;}
- @Override public boolean isFacingValid(byte aFacing) {return true;}
- @Override public boolean isAccessAllowed(EntityPlayer aPlayer) {return true;}
- @Override public boolean isValidSlot(int aIndex) {return aIndex > 0;}
- @Override public int getProgresstime() {return mProgresstime;}
- @Override public int maxProgresstime() {return mMaxProgresstime;}
- @Override public int increaseProgress(int aProgress) {return aProgress;}
-
- @Override
- public void saveNBTData(NBTTagCompound aNBT) {
- aNBT.setInteger("mEUt", mEUt);
- aNBT.setInteger("mProgresstime", mProgresstime);
- aNBT.setInteger("mMaxProgresstime", mMaxProgresstime);
- aNBT.setInteger("mEfficiencyIncrease", mEfficiencyIncrease);
- aNBT.setInteger("mEfficiency", mEfficiency);
- aNBT.setInteger("mPollution", mPollution);
- aNBT.setInteger("mRuntime", mRuntime);
-
- if (mOutputItems != null) for (int i = 0; i < mOutputItems.length; i++) if (mOutputItems[i] != null) {
- NBTTagCompound tNBT = new NBTTagCompound();
- mOutputItems[i].writeToNBT(tNBT);
- aNBT.setTag("mOutputItem"+i, tNBT);
- }
- if (mOutputFluids != null) for (int i = 0; i < mOutputFluids.length; i++) if (mOutputFluids[i] != null) {
- NBTTagCompound tNBT = new NBTTagCompound();
- mOutputFluids[i].writeToNBT(tNBT);
- aNBT.setTag("mOutputFluids"+i, tNBT);
- }
-
- aNBT.setBoolean("mWrench", mWrench);
- aNBT.setBoolean("mScrewdriver", mScrewdriver);
- aNBT.setBoolean("mSoftHammer", mSoftHammer);
- aNBT.setBoolean("mHardHammer", mHardHammer);
- aNBT.setBoolean("mSolderingTool", mSolderingTool);
- aNBT.setBoolean("mCrowbar", mCrowbar);
- }
-
- @Override
- public void loadNBTData(NBTTagCompound aNBT) {
- mEUt = aNBT.getInteger("mEUt");
- mProgresstime = aNBT.getInteger("mProgresstime");
- mMaxProgresstime = aNBT.getInteger("mMaxProgresstime");
- if(mMaxProgresstime>0)mRunningOnLoad=true;
- mEfficiencyIncrease = aNBT.getInteger("mEfficiencyIncrease");
- mEfficiency = aNBT.getInteger("mEfficiency");
- mPollution = aNBT.getInteger("mPollution");
- mRuntime = aNBT.getInteger("mRuntime");
- mOutputItems = new ItemStack[getAmountOfOutputs()];
- for (int i = 0; i < mOutputItems.length; i++) mOutputItems[i] = GT_Utility.loadItem(aNBT, "mOutputItem" + i);
- mOutputFluids = new FluidStack[getAmountOfOutputs()];
- for (int i = 0; i < mOutputFluids.length; i++) mOutputFluids[i] = GT_Utility.loadFluid(aNBT, "mOutputFluids" + i);
- mWrench = aNBT.getBoolean("mWrench");
- mScrewdriver = aNBT.getBoolean("mScrewdriver");
- mSoftHammer = aNBT.getBoolean("mSoftHammer");
- mHardHammer = aNBT.getBoolean("mHardHammer");
- mSolderingTool = aNBT.getBoolean("mSolderingTool");
- mCrowbar = aNBT.getBoolean("mCrowbar");
- }
-
- @Override
- public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) {
- if (aBaseMetaTileEntity.isClientSide()) return true;
- aBaseMetaTileEntity.openGUI(aPlayer);
- return true;
- }
-
- @Override
- public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- return new GT_Container_MultiMachine(aPlayerInventory, aBaseMetaTileEntity);
- }
-
- @Override
- public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "MultiblockDisplay.png");
- }
-
- @Override
- public byte getTileEntityBaseType() {
- return 2;
- }
-
- @Override
- public void onMachineBlockUpdate() {
- mUpdate = 50;
- }
-
- @Override
- public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
- if (aBaseMetaTileEntity.isServerSide()) {
- if (mEfficiency < 0) mEfficiency = 0;
- if (--mUpdate==0 || --mStartUpCheck==0) {
- mInputHatches.clear();
- mInputBusses.clear();
- mOutputHatches.clear();
- mOutputBusses.clear();
- mDynamoHatches.clear();
- mEnergyHatches.clear();
- mMufflerHatches.clear();
- mMaintenanceHatches.clear();
- mMachine = checkMachine(aBaseMetaTileEntity, mInventory[1]);
- }
- if (mStartUpCheck < 0) {
- if (mMachine) {
- for (GT_MetaTileEntity_Hatch_Maintenance tHatch : mMaintenanceHatches) {
- if (isValidMetaTileEntity(tHatch)) {
- if(!this.disableMaintenance){
- if (tHatch.mWrench) mWrench = true;
- if (tHatch.mScrewdriver) mScrewdriver = true;
- if (tHatch.mSoftHammer) mSoftHammer = true;
- if (tHatch.mHardHammer) mHardHammer = true;
- if (tHatch.mSolderingTool) mSolderingTool = true;
- if (tHatch.mCrowbar) mCrowbar = true;}else{
- mWrench = true;
- mScrewdriver = true;
- mSoftHammer = true;
- mHardHammer = true;
- mSolderingTool = true;
- mCrowbar = true;
- }
-
- tHatch.mWrench = false;
- tHatch.mScrewdriver = false;
- tHatch.mSoftHammer = false;
- tHatch.mHardHammer = false;
- tHatch.mSolderingTool = false;
- tHatch.mCrowbar = false;
- }
- }
- if (getRepairStatus() > 0) {
- if (mMaxProgresstime > 0 && doRandomMaintenanceDamage()) {
- if (onRunningTick(mInventory[1])) {
- if (!polluteEnvironment(getPollutionPerTick(mInventory[1]))) {
- stopMachine();
- }
- if (mMaxProgresstime > 0 && ++mProgresstime>=mMaxProgresstime) {
- if (mOutputItems != null) for (ItemStack tStack : mOutputItems) if (tStack != null) {
- try{GT_Mod.instance.achievements.issueAchivementHatch(aBaseMetaTileEntity.getWorld().getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()), tStack);}catch(Exception e){}
- addOutput(tStack);}
- if (mOutputFluids != null&&mOutputFluids.length==1) {for (FluidStack tStack : mOutputFluids) if (tStack != null) {addOutput(tStack);}}
- else if(mOutputFluids!=null&&mOutputFluids.length>1){
- addFluidOutputs(mOutputFluids);}
- mEfficiency = Math.max(0, Math.min(mEfficiency + mEfficiencyIncrease, getMaxEfficiency(mInventory[1]) - ((getIdealStatus() - getRepairStatus()) * 1000)));
- mOutputItems = null;
- mProgresstime = 0;
- mMaxProgresstime = 0;
- mEfficiencyIncrease = 0;
- if (aBaseMetaTileEntity.isAllowedToWork()) checkRecipe(mInventory[1]);
- if(mOutputFluids!=null&&mOutputFluids.length>0){
- if(mOutputFluids.length>1){GT_Mod.instance.achievements.issueAchievement(aBaseMetaTileEntity.getWorld().getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()), "oilplant");}
- }
- }
- }
- } else {
- if (aTick % 100 == 0 || aBaseMetaTileEntity.hasWorkJustBeenEnabled() || aBaseMetaTileEntity.hasInventoryBeenModified()) {
-
- if (aBaseMetaTileEntity.isAllowedToWork()) {
- checkRecipe(mInventory[1]);}
- if (mMaxProgresstime <= 0) mEfficiency = Math.max(0, mEfficiency - 1000);
- }
- }
- } else {
- stopMachine();
- }
- } else {
- stopMachine();
- }
- }
- aBaseMetaTileEntity.setErrorDisplayID((aBaseMetaTileEntity.getErrorDisplayID()&~127)|(mWrench?0:1)|(mScrewdriver?0:2)|(mSoftHammer?0:4)|(mHardHammer?0:8)|(mSolderingTool?0:16)|(mCrowbar?0:32)|(mMachine?0:64));
- aBaseMetaTileEntity.setActive(mMaxProgresstime>0);
- }
- }
-
- public boolean polluteEnvironment(int aPollutionLevel) {
- mPollution += aPollutionLevel;
- for (GT_MetaTileEntity_Hatch_Muffler tHatch : mMufflerHatches) {
- if (isValidMetaTileEntity(tHatch)) {
- if (mPollution >= 10000) {
- if (tHatch.polluteEnvironment()) {
- mPollution -= 10000;
- }
- } else {
- break;
- }
- }
- }
- return mPollution < 10000;
- }
-
- /**
- * Called every tick the Machine runs
- */
- public boolean onRunningTick(ItemStack aStack) {
- if (mEUt > 0) {
- addEnergyOutput(((long)mEUt * mEfficiency) / 10000);
- return true;
- }
- if (mEUt < 0) {
- if (!drainEnergyInput(((long)-mEUt * 10000) / Math.max(1000, mEfficiency))) {
- stopMachine();
- return false;
- }
- }
- return true;
- }
-
- /**
- * Checks if this is a Correct Machine Part for this kind of Machine (Turbine Rotor for example)
- */
- public abstract boolean isCorrectMachinePart(ItemStack aStack);
-
- /**
- * Checks the Recipe
- */
- public abstract boolean checkRecipe(ItemStack aStack);
-
- /**
- * Checks the Machine. You have to assign the MetaTileEntities for the Hatches here.
- */
- public abstract boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack);
-
- /**
- * Gets the maximum Efficiency that spare Part can get (0 - 10000)
- */
- public abstract int getMaxEfficiency(ItemStack aStack);
-
- /**
- * Gets the pollution this Device outputs to a Muffler per tick (10000 = one Pullution Block)
- */
- public abstract int getPollutionPerTick(ItemStack aStack);
-
- /**
- * Gets the damage to the ItemStack, usually 0 or 1.
- */
- public abstract int getDamageToComponent(ItemStack aStack);
-
- /**
- * Gets the Amount of possibly outputted Items for loading the Output Stack Array from NBT.
- * This should be the largest Amount that can ever happen legitimately.
- */
- public abstract int getAmountOfOutputs();
-
- /**
- * If it explodes when the Component has to be replaced.
- */
- public abstract boolean explodesOnComponentBreak(ItemStack aStack);
-
- public void stopMachine() {
- mOutputItems = null;
- mEUt = 0;
- mEfficiency = 0;
- mProgresstime = 0;
- mMaxProgresstime = 0;
- mEfficiencyIncrease = 0;
- getBaseMetaTileEntity().disableWorking();
- }
-
- public int getRepairStatus() {
- return (mWrench?1:0) + (mScrewdriver?1:0) + (mSoftHammer?1:0) + (mHardHammer?1:0) + (mSolderingTool?1:0) + (mCrowbar?1:0);
- }
-
- public int getIdealStatus() {
- return 6;
- }
-
- public static boolean isValidMetaTileEntity(MetaTileEntity aMetaTileEntity) {
- return aMetaTileEntity.getBaseMetaTileEntity() != null && aMetaTileEntity.getBaseMetaTileEntity().getMetaTileEntity() == aMetaTileEntity && !aMetaTileEntity.getBaseMetaTileEntity().isDead();
- }
-
- public boolean doRandomMaintenanceDamage() {
- if (!isCorrectMachinePart(mInventory[1]) || getRepairStatus() == 0) {
- stopMachine();
- return false;
- }
- if (mRuntime++>1000) {
- mRuntime = 0;
- if (getBaseMetaTileEntity().getRandomNumber(6000) == 0) {
- switch (getBaseMetaTileEntity().getRandomNumber(6)) {
- case 0: mWrench = false; break;
- case 1: mScrewdriver = false; break;
- case 2: mSoftHammer = false; break;
- case 3: mHardHammer = false; break;
- case 4: mSolderingTool = false; break;
- case 5: mCrowbar = false; break;
- }
- }
- if (mInventory[1] != null && getBaseMetaTileEntity().getRandomNumber(2) == 0 &&!mInventory[1].getUnlocalizedName().startsWith("gt.blockmachines.basicmachine.")) {
- if(mInventory[1].getItem() instanceof GT_MetaGenerated_Tool_01){
- NBTTagCompound tNBT = mInventory[1].getTagCompound();
- if (tNBT != null)
- {
- NBTTagCompound tNBT2 = tNBT.getCompoundTag("GT.CraftingComponents");
- if (!tNBT.getBoolean("mDis"))
- {
- tNBT2 = new NBTTagCompound();
- Materials tMaterial = GT_MetaGenerated_Tool.getPrimaryMaterial(mInventory[1]);
- ItemStack tTurbine = GT_OreDictUnificator.get(OrePrefixes.turbineBlade, tMaterial, 1);
- int i = mInventory[1].getItemDamage();
- if(i == 170){
- ItemStack tStack = GT_Utility.copyAmount(1, tTurbine);
- tNBT2.setTag("Ingredient.0", tStack.writeToNBT(new NBTTagCompound()));
- tNBT2.setTag("Ingredient.1", tStack.writeToNBT(new NBTTagCompound()));
- tNBT2.setTag("Ingredient.2", tStack.writeToNBT(new NBTTagCompound()));
- tNBT2.setTag("Ingredient.3", tStack.writeToNBT(new NBTTagCompound()));
- tStack = GT_OreDictUnificator.get(OrePrefixes.stickLong,Materials.Magnalium,1);
- tNBT2.setTag("Ingredient.4", tStack.writeToNBT(new NBTTagCompound()));
- }else if(i == 172){
- ItemStack tStack = GT_Utility.copyAmount(1, tTurbine);
- tNBT2.setTag("Ingredient.0", tStack.writeToNBT(new NBTTagCompound()));
- tNBT2.setTag("Ingredient.1", tStack.writeToNBT(new NBTTagCompound()));
- tNBT2.setTag("Ingredient.2", tStack.writeToNBT(new NBTTagCompound()));
- tNBT2.setTag("Ingredient.3", tStack.writeToNBT(new NBTTagCompound()));
- tNBT2.setTag("Ingredient.5", tStack.writeToNBT(new NBTTagCompound()));
- tNBT2.setTag("Ingredient.6", tStack.writeToNBT(new NBTTagCompound()));
- tNBT2.setTag("Ingredient.7", tStack.writeToNBT(new NBTTagCompound()));
- tNBT2.setTag("Ingredient.8", tStack.writeToNBT(new NBTTagCompound()));
- tStack = GT_OreDictUnificator.get(OrePrefixes.stickLong,Materials.Titanium,1);
- tNBT2.setTag("Ingredient.4", tStack.writeToNBT(new NBTTagCompound()));
- }else if(i == 174){
- ItemStack tStack = GT_Utility.copyAmount(2, tTurbine);
- tNBT2.setTag("Ingredient.0", tStack.writeToNBT(new NBTTagCompound()));
- tNBT2.setTag("Ingredient.1", tStack.writeToNBT(new NBTTagCompound()));
- tNBT2.setTag("Ingredient.2", tStack.writeToNBT(new NBTTagCompound()));
- tNBT2.setTag("Ingredient.3", tStack.writeToNBT(new NBTTagCompound()));
- tNBT2.setTag("Ingredient.5", tStack.writeToNBT(new NBTTagCompound()));
- tNBT2.setTag("Ingredient.6", tStack.writeToNBT(new NBTTagCompound()));
- tStack = GT_OreDictUnificator.get(OrePrefixes.stickLong,Materials.TungstenSteel,1);
- tNBT2.setTag("Ingredient.4", tStack.writeToNBT(new NBTTagCompound()));
- }else if(i == 176){
- ItemStack tStack = GT_Utility.copyAmount(2, tTurbine);
- tNBT2.setTag("Ingredient.0", tStack.writeToNBT(new NBTTagCompound()));
- tNBT2.setTag("Ingredient.1", tStack.writeToNBT(new NBTTagCompound()));
- tNBT2.setTag("Ingredient.2", tStack.writeToNBT(new NBTTagCompound()));
- tNBT2.setTag("Ingredient.3", tStack.writeToNBT(new NBTTagCompound()));
- tNBT2.setTag("Ingredient.5", tStack.writeToNBT(new NBTTagCompound()));
- tNBT2.setTag("Ingredient.6", tStack.writeToNBT(new NBTTagCompound()));
- tNBT2.setTag("Ingredient.7", tStack.writeToNBT(new NBTTagCompound()));
- tNBT2.setTag("Ingredient.8", tStack.writeToNBT(new NBTTagCompound()));
- tStack = GT_OreDictUnificator.get(OrePrefixes.stickLong,Materials.Americium,1);
- tNBT2.setTag("Ingredient.4", tStack.writeToNBT(new NBTTagCompound()));
- }
- tNBT.setTag("GT.CraftingComponents", tNBT2);
- tNBT.setBoolean("mDis", true);
- mInventory[1].setTagCompound(tNBT);
-
- }
- }
-
- ((GT_MetaGenerated_Tool)mInventory[1].getItem()).doDamage(mInventory[1], (long) Math.min(mEUt/5, Math.pow(mEUt, 0.7)));
- if(mInventory[1].stackSize==0)mInventory[1]=null;
- }
- }
- }
- return true;
- }
-
- public void explodeMultiblock() {
- mInventory[1] = null;
- for (MetaTileEntity tTileEntity : mInputBusses) tTileEntity.getBaseMetaTileEntity().doExplosion(V[8]);
- for (MetaTileEntity tTileEntity : mOutputBusses) tTileEntity.getBaseMetaTileEntity().doExplosion(V[8]);
- for (MetaTileEntity tTileEntity : mInputHatches) tTileEntity.getBaseMetaTileEntity().doExplosion(V[8]);
- for (MetaTileEntity tTileEntity : mOutputHatches) tTileEntity.getBaseMetaTileEntity().doExplosion(V[8]);
- for (MetaTileEntity tTileEntity : mDynamoHatches) tTileEntity.getBaseMetaTileEntity().doExplosion(V[8]);
- for (MetaTileEntity tTileEntity : mMufflerHatches) tTileEntity.getBaseMetaTileEntity().doExplosion(V[8]);
- for (MetaTileEntity tTileEntity : mEnergyHatches) tTileEntity.getBaseMetaTileEntity().doExplosion(V[8]);
- for (MetaTileEntity tTileEntity : mMaintenanceHatches) tTileEntity.getBaseMetaTileEntity().doExplosion(V[8]);
- getBaseMetaTileEntity().doExplosion(V[8]);
- }
-
- public boolean addEnergyOutput(long aEU) {
- if (aEU <= 0) return true;
- for (GT_MetaTileEntity_Hatch_Dynamo tHatch : mDynamoHatches) {
- if (isValidMetaTileEntity(tHatch)) {
- if (tHatch.getBaseMetaTileEntity().increaseStoredEnergyUnits(aEU, false)) {
- return true;
- }
- }
- }
- return false;
- }
-
- public long getMaxInputVoltage() {
- long rVoltage = 0;
- for (GT_MetaTileEntity_Hatch_Energy tHatch : mEnergyHatches) if (isValidMetaTileEntity(tHatch)) rVoltage += tHatch.getBaseMetaTileEntity().getInputVoltage();
- return rVoltage;
- }
-
- public boolean drainEnergyInput(long aEU) {
- if (aEU <= 0) return true;
- for (GT_MetaTileEntity_Hatch_Energy tHatch : mEnergyHatches) if (isValidMetaTileEntity(tHatch)) {
- if (tHatch.getBaseMetaTileEntity().decreaseStoredEnergyUnits(aEU, false)) return true;
- }
- return false;
- }
-
- public boolean addOutput(FluidStack aLiquid) {
- if (aLiquid == null) return false;
- FluidStack tLiquid = aLiquid.copy();
- for (GT_MetaTileEntity_Hatch_Output tHatch : mOutputHatches) {
- if (isValidMetaTileEntity(tHatch) && GT_ModHandler.isSteam(aLiquid)?tHatch.outputsSteam():tHatch.outputsLiquids()) {
- int tAmount = tHatch.fill(tLiquid, false);
- if (tAmount >= tLiquid.amount) {
- return tHatch.fill(tLiquid, true) >= tLiquid.amount;
- }else if(tAmount>0){
- tLiquid.amount = tLiquid.amount - tHatch.fill(tLiquid, true);
- }
- }
- }
- return false;
- }
-
- private void addFluidOutputs(FluidStack[] mOutputFluids2) {
- for(int i=0;i<mOutputFluids2.length;i++){
- if(mOutputHatches.size()>i&&mOutputHatches.get(i)!=null&&mOutputFluids2[i]!=null&&isValidMetaTileEntity(mOutputHatches.get(i))){
- mOutputHatches.get(i).fill(mOutputFluids2[i], true);
- }
- }
-
- }
-
- public boolean depleteInput(FluidStack aLiquid) {
- if (aLiquid == null) return false;
- for (GT_MetaTileEntity_Hatch_Input tHatch : mInputHatches) {
- tHatch.mRecipeMap = getRecipeMap();
- if (isValidMetaTileEntity(tHatch)) {
- FluidStack tLiquid = tHatch.getFluid();
- if (tLiquid != null && tLiquid.isFluidEqual(aLiquid)) {
- tLiquid = tHatch.drain(aLiquid.amount, false);
- if (tLiquid != null && tLiquid.amount >= aLiquid.amount) {
- tLiquid = tHatch.drain(aLiquid.amount, true);
- return tLiquid != null && tLiquid.amount >= aLiquid.amount;
- }
- }
- }
- }
- return false;
- }
-
- public boolean addOutput(ItemStack aStack) {
- if (GT_Utility.isStackInvalid(aStack)) return false;
- aStack = GT_Utility.copy(aStack);
-// FluidStack aLiquid = GT_Utility.getFluidForFilledItem(aStack, true);
-// if (aLiquid == null) {
- for (GT_MetaTileEntity_Hatch_OutputBus tHatch : mOutputBusses) {
- if (isValidMetaTileEntity(tHatch)) {
- for (int i = tHatch.getSizeInventory() - 1; i >= 0; i--) {
- if (tHatch.getBaseMetaTileEntity().addStackToSlot(i, aStack)) return true;
- }
- }
- }
- for (GT_MetaTileEntity_Hatch_Output tHatch : mOutputHatches) {
- if (isValidMetaTileEntity(tHatch) && tHatch.outputsItems()) {
- if (tHatch.getBaseMetaTileEntity().addStackToSlot(1, aStack)) return true;
- }
- }
-// }else {
-// for (GT_MetaTileEntity_Hatch_Output tHatch : mOutputHatches) {
-// if (isValidMetaTileEntity(tHatch) && GT_ModHandler.isSteam(aLiquid)?tHatch.outputsSteam():tHatch.outputsLiquids()) {
-// int tAmount = tHatch.fill(aLiquid, false);
-// if (tAmount >= aLiquid.amount) {
-// return tHatch.fill(aLiquid, true) >= aLiquid.amount;
-// }
-// }
-// }
-// }
- return false;
- }
-
- public boolean depleteInput(ItemStack aStack) {
- if (GT_Utility.isStackInvalid(aStack)) return false;
- FluidStack aLiquid = GT_Utility.getFluidForFilledItem(aStack, true);
- if (aLiquid != null) return depleteInput(aLiquid);
- for (GT_MetaTileEntity_Hatch_Input tHatch : mInputHatches) {
- tHatch.mRecipeMap = getRecipeMap();
- if (isValidMetaTileEntity(tHatch)) {
- if (GT_Utility.areStacksEqual(aStack, tHatch.getBaseMetaTileEntity().getStackInSlot(0))) {
- if (tHatch.getBaseMetaTileEntity().getStackInSlot(0).stackSize >= aStack.stackSize) {
- tHatch.getBaseMetaTileEntity().decrStackSize(0, aStack.stackSize);
- return true;
- }
- }
- }
- }
- for (GT_MetaTileEntity_Hatch_InputBus tHatch : mInputBusses) {
- tHatch.mRecipeMap = getRecipeMap();
- if (isValidMetaTileEntity(tHatch)) {
- for (int i = tHatch.getBaseMetaTileEntity().getSizeInventory() - 1; i >= 0; i--) {
- if (GT_Utility.areStacksEqual(aStack, tHatch.getBaseMetaTileEntity().getStackInSlot(i))) {
- if (tHatch.getBaseMetaTileEntity().getStackInSlot(0).stackSize >= aStack.stackSize) {
- tHatch.getBaseMetaTileEntity().decrStackSize(0, aStack.stackSize);
- return true;
- }
- }
- }
- }
- }
- return false;
- }
-
- public ArrayList<ItemStack> getStoredOutputs() {
- ArrayList<ItemStack> rList = new ArrayList<ItemStack>();
- for (GT_MetaTileEntity_Hatch_Output tHatch : mOutputHatches) {
- if (isValidMetaTileEntity(tHatch)) {
- rList.add(tHatch.getBaseMetaTileEntity().getStackInSlot(1));
- }
- }
- for (GT_MetaTileEntity_Hatch_OutputBus tHatch : mOutputBusses) {
- if (isValidMetaTileEntity(tHatch)) {
- for (int i = tHatch.getBaseMetaTileEntity().getSizeInventory() - 1; i >= 0; i--) {
- rList.add(tHatch.getBaseMetaTileEntity().getStackInSlot(i));
- }
- }
- }
- return rList;
- }
-
- public ArrayList<FluidStack> getStoredFluids() {
- ArrayList<FluidStack> rList = new ArrayList<FluidStack>();
- for (GT_MetaTileEntity_Hatch_Input tHatch : mInputHatches) {
- tHatch.mRecipeMap = getRecipeMap();
- if (isValidMetaTileEntity(tHatch) && tHatch.getFillableStack() != null) {
- rList.add(tHatch.getFillableStack());
- }
- }
- return rList;
- }
-
- public ArrayList<ItemStack> getStoredInputs() {
- ArrayList<ItemStack> rList = new ArrayList<ItemStack>();
- for (GT_MetaTileEntity_Hatch_Input tHatch : mInputHatches) {
- tHatch.mRecipeMap = getRecipeMap();
- if (isValidMetaTileEntity(tHatch) && tHatch.getBaseMetaTileEntity().getStackInSlot(0) != null) {
- rList.add(tHatch.getBaseMetaTileEntity().getStackInSlot(0));
- }
- }
- for (GT_MetaTileEntity_Hatch_InputBus tHatch : mInputBusses) {
- tHatch.mRecipeMap = getRecipeMap();
- if (isValidMetaTileEntity(tHatch)) {
- for (int i = tHatch.getBaseMetaTileEntity().getSizeInventory() - 1; i >= 0; i--) {
- if (tHatch.getBaseMetaTileEntity().getStackInSlot(i) != null) rList.add(tHatch.getBaseMetaTileEntity().getStackInSlot(i));
- }
- }
- }
- return rList;
- }
-
- public GT_Recipe_Map getRecipeMap() {
- return null;
- }
-
- public void updateSlots() {
- for (GT_MetaTileEntity_Hatch_Input tHatch : mInputHatches) if (isValidMetaTileEntity(tHatch)) tHatch.updateSlots();
- for (GT_MetaTileEntity_Hatch_InputBus tHatch : mInputBusses) if (isValidMetaTileEntity(tHatch)) tHatch.updateSlots();
- }
-
- public boolean addToMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) {
- if (aTileEntity == null) return false;
- IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
- if (aMetaTileEntity == null) return false;
- if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch) ((GT_MetaTileEntity_Hatch)aMetaTileEntity).mMachineBlock = (byte)aBaseCasingIndex;
- if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) return mInputHatches.add((GT_MetaTileEntity_Hatch_Input)aMetaTileEntity);
- if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus) return mInputBusses.add((GT_MetaTileEntity_Hatch_InputBus)aMetaTileEntity);
- if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Output) return mOutputHatches.add((GT_MetaTileEntity_Hatch_Output)aMetaTileEntity);
- if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) return mOutputBusses.add((GT_MetaTileEntity_Hatch_OutputBus)aMetaTileEntity);
- if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy) return mEnergyHatches.add((GT_MetaTileEntity_Hatch_Energy)aMetaTileEntity);
- if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Dynamo) return mDynamoHatches.add((GT_MetaTileEntity_Hatch_Dynamo)aMetaTileEntity);
- if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance) return mMaintenanceHatches.add((GT_MetaTileEntity_Hatch_Maintenance)aMetaTileEntity);
- if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler) return mMufflerHatches.add((GT_MetaTileEntity_Hatch_Muffler)aMetaTileEntity);
- return false;
- }
-
- public boolean addMaintenanceToMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) {
- if (aTileEntity == null) return false;
- IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
- if (aMetaTileEntity == null) return false;
- if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance) {
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).mMachineBlock = (byte)aBaseCasingIndex;
- return mMaintenanceHatches.add((GT_MetaTileEntity_Hatch_Maintenance)aMetaTileEntity);
- }
- return false;
- }
-
- public boolean addEnergyInputToMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) {
- if (aTileEntity == null) {
- return false;}
- IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
- if (aMetaTileEntity == null) return false;
- if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy) {
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).mMachineBlock = (byte)aBaseCasingIndex;
- return mEnergyHatches.add((GT_MetaTileEntity_Hatch_Energy)aMetaTileEntity);
- }
- return false;
- }
-
- public boolean addDynamoToMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) {
- if (aTileEntity == null) return false;
- IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
- if (aMetaTileEntity == null) return false;
- if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Dynamo) {
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).mMachineBlock = (byte)aBaseCasingIndex;
- return mDynamoHatches.add((GT_MetaTileEntity_Hatch_Dynamo)aMetaTileEntity);
- }
- return false;
- }
-
- public boolean addMufflerToMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) {
- if (aTileEntity == null) return false;
- IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
- if (aMetaTileEntity == null) return false;
- if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler) {
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).mMachineBlock = (byte)aBaseCasingIndex;
- return mMufflerHatches.add((GT_MetaTileEntity_Hatch_Muffler)aMetaTileEntity);
- }
- return false;
- }
-
- public boolean addInputToMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) {
- if (aTileEntity == null) return false;
- IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
- if (aMetaTileEntity == null) return false;
- if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) {
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).mMachineBlock = (byte)aBaseCasingIndex;
- ((GT_MetaTileEntity_Hatch_Input)aMetaTileEntity).mRecipeMap = getRecipeMap();
- return mInputHatches.add((GT_MetaTileEntity_Hatch_Input)aMetaTileEntity);
- }
- if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus) {
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).mMachineBlock = (byte)aBaseCasingIndex;
- ((GT_MetaTileEntity_Hatch_InputBus)aMetaTileEntity).mRecipeMap = getRecipeMap();
- return mInputBusses.add((GT_MetaTileEntity_Hatch_InputBus)aMetaTileEntity);
- }
- return false;
- }
-
- public boolean addOutputToMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) {
- if (aTileEntity == null) return false;
- IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
- if (aMetaTileEntity == null) return false;
- if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Output) {
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).mMachineBlock = (byte)aBaseCasingIndex;
- return mOutputHatches.add((GT_MetaTileEntity_Hatch_Output)aMetaTileEntity);
- }
- if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) {
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).mMachineBlock = (byte)aBaseCasingIndex;
- return mOutputBusses.add((GT_MetaTileEntity_Hatch_OutputBus)aMetaTileEntity);
- }
- return false;
- }
-
- @Override
- public String[] getInfoData() {
- return new String[] {"Progress:", (mProgresstime/20)+"secs", (mMaxProgresstime/20)+"secs", "Efficiency:", (mEfficiency/100.0F)+"%", "Problems:", ""+(getIdealStatus() - getRepairStatus())};
- }
-
- @Override
- public boolean isGivingInformation() {
- return true;
- }
-
- @Override
- public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
- return false;
- }
-
- @Override
- public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
- return false;
- }
-}
diff --git a/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_TieredMachineBlock.java b/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_TieredMachineBlock.java
deleted file mode 100644
index daffadecfe..0000000000
--- a/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_TieredMachineBlock.java
+++ /dev/null
@@ -1,65 +0,0 @@
-package gregtech.api.metatileentity.implementations;
-
-import static gregtech.api.enums.GT_Values.GT;
-import gregtech.api.interfaces.ITexture;
-import gregtech.api.metatileentity.MetaTileEntity;
-
-public abstract class GT_MetaTileEntity_TieredMachineBlock extends MetaTileEntity {
- /**
- * Value between [0 - 9] to describe the Tier of this Machine.
- */
- public final byte mTier;
-
- /**
- * A simple Description.
- */
- public final String mDescription;
-
- /**
- * Contains all Textures used by this Block.
- */
- public final ITexture[][][] mTextures;
-
- public GT_MetaTileEntity_TieredMachineBlock(int aID, String aName, String aNameRegional, int aTier, int aInvSlotCount, String aDescription, ITexture... aTextures) {
- super(aID, aName, aNameRegional, aInvSlotCount);
- mTier = (byte)Math.max(0, Math.min(aTier, 9));
- mDescription = aDescription;
-
- // must always be the last call!
- if (GT.isClientSide()) mTextures = getTextureSet(aTextures); else mTextures = null;
- }
-
- public GT_MetaTileEntity_TieredMachineBlock(String aName, int aTier, int aInvSlotCount, String aDescription, ITexture[][][] aTextures) {
- super(aName, aInvSlotCount);
- mTier = (byte)aTier;
- mDescription = aDescription;
- mTextures = aTextures;
- }
-
- @Override
- public byte getTileEntityBaseType() {
- return (byte)(Math.min(3, mTier<=0?0:1+((mTier-1) / 4)));
- }
-
- @Override
- public long getInputTier() {
- return mTier;
- }
-
- @Override
- public long getOutputTier() {
- return mTier;
- }
-
- @Override
- public String[] getDescription() {
- return new String[] {mDescription};
- }
-
- /**
- * Used Client Side to get a Texture Set for this Block.
- * Called after setting the Tier and the Description so that those two are accessible.
- * @param aTextures is the optional Array you can give to the Constructor.
- */
- public abstract ITexture[][][] getTextureSet(ITexture[] aTextures);
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Transformer.java b/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Transformer.java
deleted file mode 100644
index c0d8a4bade..0000000000
--- a/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Transformer.java
+++ /dev/null
@@ -1,144 +0,0 @@
-package gregtech.api.metatileentity.implementations;
-
-import static gregtech.api.enums.GT_Values.V;
-import cofh.api.energy.IEnergyProvider;
-import cofh.api.energy.IEnergyStorage;
-import crazypants.enderio.machine.capbank.TileCapBank;
-import crazypants.enderio.machine.capbank.network.ICapBankNetwork;
-import crazypants.enderio.power.IPowerContainer;
-import gregtech.api.GregTech_API;
-import gregtech.api.enums.Textures;
-import gregtech.api.interfaces.ITexture;
-import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.util.GT_Utility;
-import ic2.api.energy.tile.IEnergySource;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraftforge.common.util.ForgeDirection;
-
-/**
- * NEVER INCLUDE THIS FILE IN YOUR MOD!!!
- *
- * This is the main construct for my Basic Machines such as the Automatic Extractor
- * Extend this class to make a simple Machine
- */
-public class GT_MetaTileEntity_Transformer extends GT_MetaTileEntity_TieredMachineBlock {
- public GT_MetaTileEntity_Transformer(int aID, String aName, String aNameRegional, int aTier, String aDescription) {
- super(aID, aName, aNameRegional, aTier, 0, aDescription);
- }
-
- public GT_MetaTileEntity_Transformer(String aName, int aTier, String aDescription, ITexture[][][] aTextures) {
- super(aName, aTier, 0, aDescription, aTextures);
- }
-
- @Override
- public ITexture[][][] getTextureSet(ITexture[] aTextures) {
- ITexture[][][] rTextures = new ITexture[12][17][];
- for (byte i = -1; i < 16; i++) {
- rTextures[ 0][i+1] = new ITexture[] {Textures.BlockIcons.MACHINE_CASINGS[mTier][i+1], Textures.BlockIcons.OVERLAYS_ENERGY_OUT[mTier]};
- rTextures[ 1][i+1] = new ITexture[] {Textures.BlockIcons.MACHINE_CASINGS[mTier][i+1], Textures.BlockIcons.OVERLAYS_ENERGY_OUT[mTier]};
- rTextures[ 2][i+1] = new ITexture[] {Textures.BlockIcons.MACHINE_CASINGS[mTier][i+1], Textures.BlockIcons.OVERLAYS_ENERGY_OUT[mTier]};
- rTextures[ 3][i+1] = new ITexture[] {Textures.BlockIcons.MACHINE_CASINGS[mTier][i+1], Textures.BlockIcons.OVERLAYS_ENERGY_IN_MULTI[mTier]};
- rTextures[ 4][i+1] = new ITexture[] {Textures.BlockIcons.MACHINE_CASINGS[mTier][i+1], Textures.BlockIcons.OVERLAYS_ENERGY_IN_MULTI[mTier]};
- rTextures[ 5][i+1] = new ITexture[] {Textures.BlockIcons.MACHINE_CASINGS[mTier][i+1], Textures.BlockIcons.OVERLAYS_ENERGY_IN_MULTI[mTier]};
- rTextures[ 6][i+1] = new ITexture[] {Textures.BlockIcons.MACHINE_CASINGS[mTier][i+1], Textures.BlockIcons.OVERLAYS_ENERGY_IN[mTier]};
- rTextures[ 7][i+1] = new ITexture[] {Textures.BlockIcons.MACHINE_CASINGS[mTier][i+1], Textures.BlockIcons.OVERLAYS_ENERGY_IN[mTier]};
- rTextures[ 8][i+1] = new ITexture[] {Textures.BlockIcons.MACHINE_CASINGS[mTier][i+1], Textures.BlockIcons.OVERLAYS_ENERGY_IN[mTier]};
- rTextures[ 9][i+1] = new ITexture[] {Textures.BlockIcons.MACHINE_CASINGS[mTier][i+1], Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[mTier]};
- rTextures[10][i+1] = new ITexture[] {Textures.BlockIcons.MACHINE_CASINGS[mTier][i+1], Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[mTier]};
- rTextures[11][i+1] = new ITexture[] {Textures.BlockIcons.MACHINE_CASINGS[mTier][i+1], Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[mTier]};
- }
- return rTextures;
- }
-
- @Override
- public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
- return mTextures[Math.min(2,aSide)+(aSide==aFacing?3:0)+(aActive?0:6)][aColorIndex+1];
- }
-
- @Override
- public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
- return new GT_MetaTileEntity_Transformer(mName, mTier, mDescription, mTextures);
- }
-
- @Override public boolean isAccessAllowed(EntityPlayer aPlayer) {return true;}
- @Override public boolean isSimpleMachine() {return true;}
- @Override public boolean isFacingValid(byte aFacing) {return true;}
- @Override public boolean isEnetInput() {return true;}
- @Override public boolean isEnetOutput() {return true;}
- @Override public boolean isInputFacing(byte aSide) {return getBaseMetaTileEntity().isAllowedToWork()?aSide==getBaseMetaTileEntity().getFrontFacing():aSide!=getBaseMetaTileEntity().getFrontFacing();}
- @Override public boolean isOutputFacing(byte aSide) {return !isInputFacing(aSide);}
- @Override public boolean isTeleporterCompatible() {return false;}
- @Override public long getMinimumStoredEU() {return 512;}
- @Override public long maxEUStore() {return 512+V[mTier+1]*2;}
- @Override public long maxEUInput() {return V[getBaseMetaTileEntity().isAllowedToWork()?mTier+1:mTier];}
- @Override public long maxEUOutput() {return V[getBaseMetaTileEntity().isAllowedToWork()?mTier:mTier+1];}
- @Override public long maxAmperesOut() {return getBaseMetaTileEntity().isAllowedToWork()?V[mTier+1]/V[mTier]:1;}
- @Override public long maxAmperesIn() {return getBaseMetaTileEntity().isAllowedToWork()?1:V[mTier+1]/V[mTier];}
-
- @Override
- public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
- if (aBaseMetaTileEntity.isServerSide()) {
- aBaseMetaTileEntity.setActive(aBaseMetaTileEntity.isAllowedToWork());
- for (byte i = 0; i < 6 && aBaseMetaTileEntity.getStoredEU() < aBaseMetaTileEntity.getEUCapacity(); i++) if (aBaseMetaTileEntity.inputEnergyFrom(i)) {
- TileEntity tTileEntity = aBaseMetaTileEntity.getTileEntityAtSide(i);
- if (tTileEntity instanceof IEnergySource && ((IEnergySource)tTileEntity).emitsEnergyTo((TileEntity)aBaseMetaTileEntity, ForgeDirection.getOrientation(GT_Utility.getOppositeSide(i)))) {
- long tEU = Math.min(maxEUInput(), (long)((IEnergySource)tTileEntity).getOfferedEnergy());
- ((IEnergySource)tTileEntity).drawEnergy(tEU);
- aBaseMetaTileEntity.injectEnergyUnits((byte)6, tEU, 1);
- }else if (GregTech_API.mInputRF && tTileEntity instanceof IEnergyProvider&& ((IEnergyProvider)tTileEntity).extractEnergy(ForgeDirection.getOrientation(GT_Utility.getOppositeSide(i)),1,true)==1) {
- long tEU = (long)((IEnergyProvider)tTileEntity).extractEnergy(ForgeDirection.getOrientation(GT_Utility.getOppositeSide(i)),(int) maxEUInput()* 100 / GregTech_API.mRFtoEU ,false);
- tEU = tEU * GregTech_API.mRFtoEU / 100;
- aBaseMetaTileEntity.injectEnergyUnits((byte)6, Math.min(tEU,maxEUInput()), 1);
- }else if (GregTech_API.mInputRF && tTileEntity instanceof IEnergyStorage&& ((IEnergyStorage)tTileEntity).extractEnergy(1,true)==1) {
- long tEU = (long)((IEnergyStorage)tTileEntity).extractEnergy((int) maxEUInput()* 100 / GregTech_API.mRFtoEU ,false);
- tEU = tEU * GregTech_API.mRFtoEU / 100;
- aBaseMetaTileEntity.injectEnergyUnits((byte)6, Math.min(tEU,maxEUInput()), 1);
- }else if (GregTech_API.mInputRF && GregTech_API.meIOLoaded && tTileEntity instanceof IPowerContainer && ((IPowerContainer)tTileEntity).getEnergyStored()>0) {
- int storedRF = ((IPowerContainer)tTileEntity).getEnergyStored();
- int extractRF = (int) maxEUInput()* 100 / GregTech_API.mRFtoEU;
- long tEU =0;
- if(tTileEntity instanceof TileCapBank){
- ICapBankNetwork network = ((TileCapBank)tTileEntity).getNetwork();
- if(network!=null&&network.getEnergyStoredL()>0){
- tEU = Math.min((Math.min(Math.min(network.getEnergyStoredL(), storedRF-extractRF),network.getMaxOutput())) * GregTech_API.mRFtoEU / 100,maxEUInput());
- network.addEnergy((int) -(tEU * 100 / GregTech_API.mRFtoEU));
- }
- }else{
- if(storedRF>extractRF){
- ((IPowerContainer)tTileEntity).setEnergyStored(storedRF-extractRF);
- tEU = maxEUInput();
- }else{
- ((IPowerContainer)tTileEntity).setEnergyStored(0);
- tEU = storedRF * GregTech_API.mRFtoEU / 100 ;
- }
- }
- aBaseMetaTileEntity.injectEnergyUnits((byte)6, Math.min(tEU,maxEUInput()), 1);
- }
- }
- }
- }
-
- @Override
- public void saveNBTData(NBTTagCompound aNBT) {
- //
- }
-
- @Override
- public void loadNBTData(NBTTagCompound aNBT) {
- //
- }
-
- @Override
- public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
- return false;
- }
-
- @Override
- public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
- return false;
- }
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/net/GT_Packet.java b/main/java/gregtech/api/net/GT_Packet.java
deleted file mode 100644
index 79e2e98695..0000000000
--- a/main/java/gregtech/api/net/GT_Packet.java
+++ /dev/null
@@ -1,29 +0,0 @@
-package gregtech.api.net;
-
-import net.minecraft.world.IBlockAccess;
-
-import com.google.common.io.ByteArrayDataInput;
-
-public abstract class GT_Packet {
- public GT_Packet(boolean aIsReference) {
- //
- }
-
- /**
- * I use constant IDs instead of Dynamic ones, since that is much more fail safe
- * @return a Packet ID for this Class
- */
- public abstract byte getPacketID();
-
- /**
- * @return encoded byte Stream
- */
- public abstract byte[] encode();
-
- /**
- * @return encoded byte Stream
- */
- public abstract GT_Packet decode(ByteArrayDataInput aData);
-
- public abstract void process(IBlockAccess aWorld);
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/net/GT_Packet_Block_Event.java b/main/java/gregtech/api/net/GT_Packet_Block_Event.java
deleted file mode 100644
index 95932d581c..0000000000
--- a/main/java/gregtech/api/net/GT_Packet_Block_Event.java
+++ /dev/null
@@ -1,59 +0,0 @@
-package gregtech.api.net;
-
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.world.IBlockAccess;
-
-import com.google.common.io.ByteArrayDataInput;
-import com.google.common.io.ByteArrayDataOutput;
-import com.google.common.io.ByteStreams;
-
-/**
- * Used to transfer Block Events in a much better fashion
- */
-public class GT_Packet_Block_Event extends GT_Packet {
- private int mX, mZ;
- private short mY;
- private byte mID, mValue;
-
- public GT_Packet_Block_Event() {
- super(true);
- }
-
- public GT_Packet_Block_Event(int aX, short aY, int aZ, byte aID, byte aValue) {
- super(false);
- mX = aX;
- mY = aY;
- mZ = aZ;
- mID = aID;
- mValue = aValue;
- }
-
- @Override
- public byte[] encode() {
- ByteArrayDataOutput tOut = ByteStreams.newDataOutput(10);
- tOut.writeInt(mX);
- tOut.writeShort(mY);
- tOut.writeInt(mZ);
- tOut.writeByte(mID);
- tOut.writeByte(mValue);
- return tOut.toByteArray();
- }
-
- @Override
- public GT_Packet decode(ByteArrayDataInput aData) {
- return new GT_Packet_Block_Event(aData.readInt(), aData.readShort(), aData.readInt(), aData.readByte(), aData.readByte());
- }
-
- @Override
- public void process(IBlockAccess aWorld) {
- if (aWorld != null) {
- TileEntity tTileEntity = aWorld.getTileEntity(mX, mY, mZ);
- if (tTileEntity != null) tTileEntity.receiveClientEvent(mID, mValue);
- }
- }
-
- @Override
- public byte getPacketID() {
- return 2;
- }
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/net/GT_Packet_Sound.java b/main/java/gregtech/api/net/GT_Packet_Sound.java
deleted file mode 100644
index 74e48bb38e..0000000000
--- a/main/java/gregtech/api/net/GT_Packet_Sound.java
+++ /dev/null
@@ -1,56 +0,0 @@
-package gregtech.api.net;
-
-import gregtech.api.util.GT_Utility;
-import net.minecraft.world.IBlockAccess;
-
-import com.google.common.io.ByteArrayDataInput;
-import com.google.common.io.ByteArrayDataOutput;
-import com.google.common.io.ByteStreams;
-
-public class GT_Packet_Sound extends GT_Packet {
- private int mX, mZ;
- private short mY;
- private String mSoundName;
- private float mSoundStrength, mSoundPitch;
-
- public GT_Packet_Sound() {
- super(true);
- }
-
- public GT_Packet_Sound(String aSoundName, float aSoundStrength, float aSoundPitch, int aX, short aY, int aZ) {
- super(false);
- mX = aX;
- mY = aY;
- mZ = aZ;
- mSoundName = aSoundName;
- mSoundStrength = aSoundStrength;
- mSoundPitch = aSoundPitch;
- }
-
- @Override
- public byte[] encode() {
- ByteArrayDataOutput tOut = ByteStreams.newDataOutput(10);
- tOut.writeUTF(mSoundName);
- tOut.writeFloat(mSoundStrength);
- tOut.writeFloat(mSoundPitch);
- tOut.writeInt(mX);
- tOut.writeShort(mY);
- tOut.writeInt(mZ);
- return tOut.toByteArray();
- }
-
- @Override
- public GT_Packet decode(ByteArrayDataInput aData) {
- return new GT_Packet_Sound(aData.readUTF(), aData.readFloat(), aData.readFloat(), aData.readInt(), aData.readShort(), aData.readInt());
- }
-
- @Override
- public void process(IBlockAccess aWorld) {
- GT_Utility.doSoundAtClient(mSoundName, 1, mSoundStrength, mSoundPitch, mX, mY, mZ);
- }
-
- @Override
- public byte getPacketID() {
- return 1;
- }
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/net/GT_Packet_TileEntity.java b/main/java/gregtech/api/net/GT_Packet_TileEntity.java
deleted file mode 100644
index a5d8424414..0000000000
--- a/main/java/gregtech/api/net/GT_Packet_TileEntity.java
+++ /dev/null
@@ -1,83 +0,0 @@
-package gregtech.api.net;
-
-import gregtech.api.metatileentity.BaseMetaPipeEntity;
-import gregtech.api.metatileentity.BaseMetaTileEntity;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.world.IBlockAccess;
-
-import com.google.common.io.ByteArrayDataInput;
-import com.google.common.io.ByteArrayDataOutput;
-import com.google.common.io.ByteStreams;
-
-public class GT_Packet_TileEntity extends GT_Packet {
- private int mX, mZ, mC0, mC1, mC2, mC3, mC4, mC5;
- private short mY, mID;
- private byte mTexture, mUpdate, mRedstone, mColor;
-
- public GT_Packet_TileEntity() {
- super(true);
- }
-
- public GT_Packet_TileEntity(int aX, short aY, int aZ, short aID, int aC0, int aC1, int aC2, int aC3, int aC4, int aC5, byte aTexture, byte aUpdate, byte aRedstone, byte aColor) {
- super(false);
- mX = aX;
- mY = aY;
- mZ = aZ;
- mC0 = aC0;
- mC1 = aC1;
- mC2 = aC2;
- mC3 = aC3;
- mC4 = aC4;
- mC5 = aC5;
- mID = aID;
- mTexture = aTexture;
- mUpdate = aUpdate;
- mRedstone = aRedstone;
- mColor = aColor;
- }
-
- @Override
- public byte[] encode() {
- ByteArrayDataOutput tOut = ByteStreams.newDataOutput(40);
-
- tOut.writeInt(mX);
- tOut.writeShort(mY);
- tOut.writeInt(mZ);
- tOut.writeShort(mID);
-
- tOut.writeInt(mC0);
- tOut.writeInt(mC1);
- tOut.writeInt(mC2);
- tOut.writeInt(mC3);
- tOut.writeInt(mC4);
- tOut.writeInt(mC5);
-
- tOut.writeByte(mTexture);
- tOut.writeByte(mUpdate);
- tOut.writeByte(mRedstone);
- tOut.writeByte(mColor);
-
- return tOut.toByteArray();
- }
-
- @Override
- public GT_Packet decode(ByteArrayDataInput aData) {
- return new GT_Packet_TileEntity(aData.readInt(), aData.readShort(), aData.readInt(), aData.readShort(), aData.readInt(), aData.readInt(), aData.readInt(), aData.readInt(), aData.readInt(), aData.readInt(), aData.readByte(), aData.readByte(), aData.readByte(), aData.readByte());
- }
-
- @Override
- public void process(IBlockAccess aWorld) {
- if (aWorld != null) {
- TileEntity tTileEntity = aWorld.getTileEntity(mX, mY, mZ);
- if (tTileEntity != null) {
- if (tTileEntity instanceof BaseMetaTileEntity) ((BaseMetaTileEntity)tTileEntity).receiveMetaTileEntityData(mID, mC0, mC1, mC2, mC3, mC4, mC5, mTexture, mUpdate, mRedstone, mColor);
- else if (tTileEntity instanceof BaseMetaPipeEntity) ((BaseMetaPipeEntity)tTileEntity).receiveMetaTileEntityData(mID, mC0, mC1, mC2, mC3, mC4, mC5, mTexture, mUpdate, mRedstone, mColor);
- }
- }
- }
-
- @Override
- public byte getPacketID() {
- return 0;
- }
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/net/IGT_NetworkHandler.java b/main/java/gregtech/api/net/IGT_NetworkHandler.java
deleted file mode 100644
index db27888229..0000000000
--- a/main/java/gregtech/api/net/IGT_NetworkHandler.java
+++ /dev/null
@@ -1,12 +0,0 @@
-package gregtech.api.net;
-
-import net.minecraft.entity.player.EntityPlayerMP;
-import net.minecraft.world.World;
-import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
-
-public interface IGT_NetworkHandler {
- public void sendToPlayer(GT_Packet aPacket, EntityPlayerMP aPlayer);
- public void sendToAllAround(GT_Packet aPacket, TargetPoint aPosition);
- public void sendToServer(GT_Packet aPacket);
- public void sendPacketToAllPlayersInRange(World aWorld, GT_Packet aPacket, int aX, int aZ);
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/objects/ElementStack.java b/main/java/gregtech/api/objects/ElementStack.java
deleted file mode 100644
index 38443dffaf..0000000000
--- a/main/java/gregtech/api/objects/ElementStack.java
+++ /dev/null
@@ -1,41 +0,0 @@
-package gregtech.api.objects;
-
-import gregtech.api.enums.Element;
-
-public class ElementStack implements Cloneable {
- public int mAmount;
- public Element mElement;
-
- public ElementStack(Element aElement, int aAmount) {
- mElement = aElement==null?Element._NULL:aElement;
- mAmount = aAmount;
- }
-
- public ElementStack copy(int aAmount) {
- return new ElementStack(mElement, aAmount);
- }
-
- @Override
- public ElementStack clone() {
- return new ElementStack(mElement, mAmount);
- }
-
- @Override
- public boolean equals(Object aObject) {
- if (aObject == this) return true;
- if (aObject == null) return false;
- if (aObject instanceof Element) return aObject == mElement;
- if (aObject instanceof ElementStack) return ((ElementStack)aObject).mElement == mElement && (mAmount < 0 || ((ElementStack)aObject).mAmount < 0 || ((ElementStack)aObject).mAmount == mAmount);
- return false;
- }
-
- @Override
- public String toString() {
- return mElement.toString()+mAmount;
- }
-
- @Override
- public int hashCode() {
- return mElement.hashCode();
- }
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/objects/GT_ArrayList.java b/main/java/gregtech/api/objects/GT_ArrayList.java
deleted file mode 100644
index a6c0750217..0000000000
--- a/main/java/gregtech/api/objects/GT_ArrayList.java
+++ /dev/null
@@ -1,59 +0,0 @@
-package gregtech.api.objects;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-
-public class GT_ArrayList<E> extends ArrayList<E> {
- private static final long serialVersionUID = 1L;
-
- private final boolean mAllowNulls;
-
- public GT_ArrayList(boolean aAllowNulls, int aCapacity) {
- super(aCapacity);
- mAllowNulls = aAllowNulls;
- }
-
- public GT_ArrayList(boolean aAllowNulls, E... aArray) {
- super(Arrays.asList(aArray));
- mAllowNulls = aAllowNulls;
- if (!mAllowNulls) for (int i = 0; i < size(); i++) if (get(i) == null) remove(i--);
- }
-
- public GT_ArrayList(boolean aAllowNulls, Collection<? extends E> aList) {
- super(aList);
- mAllowNulls = aAllowNulls;
- if (!mAllowNulls) for (int i = 0; i < size(); i++) if (get(i) == null) remove(i--);
- }
-
- @Override
- public E set(int aIndex, E aElement) {
- if (mAllowNulls || aElement != null) return super.set(aIndex, aElement);
- return null;
- }
-
- @Override
- public boolean add(E aElement) {
- if (mAllowNulls || aElement != null) return super.add(aElement);
- return false;
- }
-
- @Override
- public void add(int aIndex, E aElement) {
- if (mAllowNulls || aElement != null) super.add(aIndex, aElement);
- }
-
- @Override
- public boolean addAll(Collection<? extends E> aList) {
- boolean rReturn = super.addAll(aList);
- if (!mAllowNulls) for (int i = 0; i < size(); i++) if (get(i) == null) remove(i--);
- return rReturn;
- }
-
- @Override
- public boolean addAll(int aIndex, Collection<? extends E> aList) {
- boolean rReturn = super.addAll(aIndex, aList);
- if (!mAllowNulls) for (int i = 0; i < size(); i++) if (get(i) == null) remove(i--);
- return rReturn;
- }
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/objects/GT_CopiedBlockTexture.java b/main/java/gregtech/api/objects/GT_CopiedBlockTexture.java
deleted file mode 100644
index ffbbe09ec6..0000000000
--- a/main/java/gregtech/api/objects/GT_CopiedBlockTexture.java
+++ /dev/null
@@ -1,96 +0,0 @@
-package gregtech.api.objects;
-
-import gregtech.api.enums.Dyes;
-import gregtech.api.interfaces.ITexture;
-import net.minecraft.block.Block;
-import net.minecraft.client.renderer.RenderBlocks;
-import net.minecraft.client.renderer.Tessellator;
-import net.minecraft.util.IIcon;
-
-public class GT_CopiedBlockTexture implements ITexture {
- private final Block mBlock;
- private final byte mSide, mMeta;
-
- /**
- * DO NOT MANIPULATE THE VALUES INSIDE THIS ARRAY!!!
- *
- * Just set this variable to another different Array instead.
- * Otherwise some colored things will get Problems.
- */
- public short[] mRGBa;
-
- private final boolean mAllowAlpha;
-
- public GT_CopiedBlockTexture(Block aBlock, int aSide, int aMeta, short[] aRGBa, boolean aAllowAlpha) {
- if (aRGBa.length != 4) throw new IllegalArgumentException("RGBa doesn't have 4 Values @ GT_CopiedBlockTexture");
- mBlock = aBlock;
- mRGBa = aRGBa;
- mSide = (byte)aSide;
- mMeta = (byte)aMeta;
- mAllowAlpha = aAllowAlpha;
- }
-
- public GT_CopiedBlockTexture(Block aBlock, int aSide, int aMeta, short[] aRGBa) {
- this(aBlock, aSide, aMeta, aRGBa, true);
- }
-
- public GT_CopiedBlockTexture(Block aBlock, int aSide, int aMeta) {
- this(aBlock, aSide, aMeta, Dyes._NULL.mRGBa);
- }
-
- private IIcon getIcon(int aSide) {
- if (mSide == 6) return mBlock.getIcon(aSide, mMeta);
- return mBlock.getIcon(mSide, mMeta);
- }
-
- @Override
- public void renderXPos(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) {
- IIcon aIcon = getIcon(5);
- Tessellator.instance.setColorRGBA((int)(mRGBa[0] * 0.6F), (int)(mRGBa[1] * 0.6F), (int)(mRGBa[2] * 0.6F), mAllowAlpha?255-mRGBa[3]:255);
-// aRenderer.flipTexture = !aRenderer.flipTexture;
- aRenderer.renderFaceXPos(aBlock, aX, aY, aZ, aIcon);
-// aRenderer.flipTexture = !aRenderer.flipTexture;
- }
-
- @Override
- public void renderXNeg(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) {
- IIcon aIcon = getIcon(4);
- Tessellator.instance.setColorRGBA((int)(mRGBa[0] * 0.6F), (int)(mRGBa[1] * 0.6F), (int)(mRGBa[2] * 0.6F), mAllowAlpha?255-mRGBa[3]:255);
- aRenderer.renderFaceXNeg(aBlock, aX, aY, aZ, aIcon);
- }
-
- @Override
- public void renderYPos(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) {
- IIcon aIcon = getIcon(1);
- Tessellator.instance.setColorRGBA((int)(mRGBa[0] * 1.0F), (int)(mRGBa[1] * 1.0F), (int)(mRGBa[2] * 1.0F), mAllowAlpha?255-mRGBa[3]:255);
- aRenderer.renderFaceYPos(aBlock, aX, aY, aZ, aIcon);
- }
-
- @Override
- public void renderYNeg(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) {
- IIcon aIcon = getIcon(0);
- Tessellator.instance.setColorRGBA((int)(mRGBa[0] * 0.5F), (int)(mRGBa[1] * 0.5F), (int)(mRGBa[2] * 0.5F), mAllowAlpha?255-mRGBa[3]:255);
- aRenderer.renderFaceYNeg(aBlock, aX, aY, aZ, aIcon);
- }
-
- @Override
- public void renderZPos(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) {
- IIcon aIcon = getIcon(3);
- Tessellator.instance.setColorRGBA((int)(mRGBa[0] * 0.8F), (int)(mRGBa[1] * 0.8F), (int)(mRGBa[2] * 0.8F), mAllowAlpha?255-mRGBa[3]:255);
- aRenderer.renderFaceZPos(aBlock, aX, aY, aZ, aIcon);
- }
-
- @Override
- public void renderZNeg(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) {
- IIcon aIcon = getIcon(2);
- Tessellator.instance.setColorRGBA((int)(mRGBa[0] * 0.8F), (int)(mRGBa[1] * 0.8F), (int)(mRGBa[2] * 0.8F), mAllowAlpha?255-mRGBa[3]:255);
-// aRenderer.flipTexture = !aRenderer.flipTexture;
- aRenderer.renderFaceZNeg(aBlock, aX, aY, aZ, aIcon);
-// aRenderer.flipTexture = !aRenderer.flipTexture;
- }
-
- @Override
- public boolean isValidTexture() {
- return mBlock != null;
- }
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/objects/GT_Cover_Default.java b/main/java/gregtech/api/objects/GT_Cover_Default.java
deleted file mode 100644
index b317e0e523..0000000000
--- a/main/java/gregtech/api/objects/GT_Cover_Default.java
+++ /dev/null
@@ -1,68 +0,0 @@
-package gregtech.api.objects;
-
-import gregtech.api.interfaces.tileentity.ICoverable;
-import gregtech.api.util.GT_CoverBehavior;
-import gregtech.api.util.GT_Utility;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraftforge.fluids.Fluid;
-
-public class GT_Cover_Default extends GT_CoverBehavior {
- /**
- * This is the Dummy, if there is a generic Cover without behavior
- */
- public GT_Cover_Default() {
- super();
- }
-
- @Override
- public boolean isSimpleCover() {
- return true;
- }
-
- @Override
- public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) {
- aCoverVariable=((aCoverVariable+1)&15);
- GT_Utility.sendChatToPlayer(aPlayer, ((aCoverVariable & 1) != 0?"Redstone ":"") + ((aCoverVariable & 2) != 0?"Energy ":"") + ((aCoverVariable & 4) != 0?"Fluids ":"") + ((aCoverVariable & 8) != 0?"Items ":""));
- return aCoverVariable;
- }
-
- @Override
- public boolean letsRedstoneGoIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return (aCoverVariable & 1) != 0;
- }
-
- @Override
- public boolean letsRedstoneGoOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return (aCoverVariable & 1) != 0;
- }
-
- @Override
- public boolean letsEnergyIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return (aCoverVariable & 2) != 0;
- }
-
- @Override
- public boolean letsEnergyOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return (aCoverVariable & 2) != 0;
- }
-
- @Override
- public boolean letsFluidIn(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) {
- return (aCoverVariable & 4) != 0;
- }
-
- @Override
- public boolean letsFluidOut(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) {
- return (aCoverVariable & 4) != 0;
- }
-
- @Override
- public boolean letsItemsIn(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) {
- return (aCoverVariable & 8) != 0;
- }
-
- @Override
- public boolean letsItemsOut(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) {
- return (aCoverVariable & 8) != 0;
- }
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/objects/GT_Cover_None.java b/main/java/gregtech/api/objects/GT_Cover_None.java
deleted file mode 100644
index 89a0e17ded..0000000000
--- a/main/java/gregtech/api/objects/GT_Cover_None.java
+++ /dev/null
@@ -1,89 +0,0 @@
-package gregtech.api.objects;
-
-import gregtech.api.interfaces.tileentity.ICoverable;
-import gregtech.api.util.GT_CoverBehavior;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraftforge.fluids.Fluid;
-
-public class GT_Cover_None extends GT_CoverBehavior {
-
- /**
- * This is the Dummy, if there is no Cover
- */
- public GT_Cover_None() {}
-
- @Override
- public float getBlastProofLevel(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return 10.0F;
- }
-
- @Override
- public boolean letsRedstoneGoIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return true;
- }
-
- @Override
- public boolean letsRedstoneGoOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return true;
- }
-
- @Override
- public boolean letsEnergyIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return true;
- }
-
- @Override
- public boolean letsEnergyOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return true;
- }
-
- @Override
- public boolean letsFluidIn(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) {
- return true;
- }
-
- @Override
- public boolean letsFluidOut(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) {
- return true;
- }
-
- @Override
- public boolean letsItemsIn(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) {
- return true;
- }
-
- @Override
- public boolean letsItemsOut(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) {
- return true;
- }
-
- @Override
- public boolean isGUIClickable(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return true;
- }
-
- @Override
- public boolean manipulatesSidedRedstoneOutput(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return false;
- }
-
- @Override
- public boolean onCoverRightclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) {
- return false;
- }
-
- @Override
- public boolean onCoverRemoval(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, boolean aForced) {
- return true;
- }
-
- @Override
- public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) {
- return 0;
- }
-
- @Override
- public boolean isSimpleCover() {
- return true;
- }
-}
diff --git a/main/java/gregtech/api/objects/GT_Fluid.java b/main/java/gregtech/api/objects/GT_Fluid.java
deleted file mode 100644
index 8e7a71c972..0000000000
--- a/main/java/gregtech/api/objects/GT_Fluid.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package gregtech.api.objects;
-
-import static gregtech.api.enums.GT_Values.RES_PATH_BLOCK;
-import gregtech.api.GregTech_API;
-import net.minecraftforge.fluids.Fluid;
-
-public class GT_Fluid extends Fluid implements Runnable {
- private final short[] mRGBa;
-
- public final String mTextureName;
-
- public GT_Fluid(String aName, String aTextureName, short[] aRGBa) {
- super(aName);
- mRGBa = aRGBa;
- mTextureName = aTextureName;
- GregTech_API.sGTBlockIconload.add(this);
- }
-
- @Override
- public int getColor() {
- return (Math.max(0, Math.min(255, mRGBa[0])) << 16) | (Math.max(0, Math.min(255, mRGBa[1])) << 8) | Math.max(0, Math.min(255, mRGBa[2]));
- }
-
- @Override
- public void run() {
- setIcons(GregTech_API.sBlockIcons.registerIcon(RES_PATH_BLOCK + "fluids/fluid." + mTextureName));
- }
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/objects/GT_FluidStack.java b/main/java/gregtech/api/objects/GT_FluidStack.java
deleted file mode 100644
index ac54003d35..0000000000
--- a/main/java/gregtech/api/objects/GT_FluidStack.java
+++ /dev/null
@@ -1,55 +0,0 @@
-package gregtech.api.objects;
-
-import gregtech.api.GregTech_API;
-import gregtech.api.util.GT_Log;
-import gregtech.api.util.GT_Utility;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Map;
-
-import net.minecraftforge.common.ForgeVersion;
-import net.minecraftforge.fluids.Fluid;
-import net.minecraftforge.fluids.FluidStack;
-
-/**
- * Because Forge fucked this one up royally.
- */
-public class GT_FluidStack extends FluidStack {
- private static final Collection<GT_FluidStack> sAllFluidStacks = new ArrayList<GT_FluidStack>(5000);
- private Fluid mFluid;
- private static boolean lock=false;
-
- public GT_FluidStack(Fluid aFluid, int aAmount) {
- super(aFluid, aAmount);
- mFluid = aFluid;
- sAllFluidStacks.add(this);
- }
-
- public GT_FluidStack(FluidStack aFluid) {
- this(aFluid.getFluid(), aFluid.amount);
- }
-
- public static void fixAllThoseFuckingFluidIDs() {
- if(ForgeVersion.getBuildVersion()<1355){
- while(lock){try {Thread.sleep(1);} catch (InterruptedException e) {}}
- lock=true;
- for (GT_FluidStack tFluid : sAllFluidStacks) tFluid.fixFluidIDForFucksSake();
- for (Map<Fluid, ?> tMap : GregTech_API.sFluidMappings) try {GT_Utility.reMap(tMap);} catch(Throwable e) {e.printStackTrace(GT_Log.err);}
- lock=false;}
- }
-
- public void fixFluidIDForFucksSake() {
- if(ForgeVersion.getBuildVersion()<1355){
- int fluidID;
- try {fluidID = this.getFluid().getID();} catch(Throwable e){System.err.println(e);}
- try {fluidID = mFluid.getID();} catch(Throwable e) {fluidID = -1;}}
- }
-
- @Override
- public FluidStack copy() {
- if(ForgeVersion.getBuildVersion()<1355){
- fixFluidIDForFucksSake();}
- return new GT_FluidStack(this);
- }
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/objects/GT_HashSet.java b/main/java/gregtech/api/objects/GT_HashSet.java
deleted file mode 100644
index 5a88307639..0000000000
--- a/main/java/gregtech/api/objects/GT_HashSet.java
+++ /dev/null
@@ -1,81 +0,0 @@
-package gregtech.api.objects;
-
-import gregtech.api.GregTech_API;
-import gregtech.api.util.GT_Utility;
-
-import java.util.*;
-
-import net.minecraft.item.ItemStack;
-
-public class GT_HashSet<E extends GT_ItemStack> extends AbstractSet<E> {
- private transient HashMap<GT_ItemStack, Object> map;
- private static final Object OBJECT = new Object();
-
- public GT_HashSet() {
- map = new HashMap<GT_ItemStack, Object>();
- GregTech_API.sItemStackMappings.add(map);
- }
-
- public GT_HashSet(Collection<? extends E> c) {
- map = new HashMap<GT_ItemStack, Object>(Math.max((int) (c.size()/.75f) + 1, 16));
- addAll(c);
- GregTech_API.sItemStackMappings.add(map);
- }
-
- public GT_HashSet(int initialCapacity, float loadFactor) {
- map = new HashMap<GT_ItemStack, Object>(initialCapacity, loadFactor);
- GregTech_API.sItemStackMappings.add(map);
- }
-
- public GT_HashSet(int initialCapacity) {
- map = new HashMap<GT_ItemStack, Object>(initialCapacity);
- GregTech_API.sItemStackMappings.add(map);
- }
-
- GT_HashSet(int initialCapacity, float loadFactor, boolean dummy) {
- map = new LinkedHashMap<GT_ItemStack, Object>(initialCapacity, loadFactor);
- GregTech_API.sItemStackMappings.add(map);
- }
-
- public HashMap getMap(){return map;}
-
- @Override
- public Iterator<E> iterator() {
- return (Iterator<E>)map.keySet().iterator();
- }
-
- @Override
- public int size() {
- return map.size();
- }
-
- @Override
- public boolean isEmpty() {
- return map.isEmpty();
- }
-
- @Override
- public boolean contains(Object o) {
- return map.containsKey(o);
- }
-
- public boolean add(ItemStack aStack) {
- if (GT_Utility.isStackInvalid(aStack)) return false;
- return map.put(new GT_ItemStack(aStack), OBJECT)==null;
- }
-
- @Override
- public boolean add(E e) {
- return map.put(e, OBJECT)==null;
- }
-
- @Override
- public boolean remove(Object o) {
- return map.remove(o)==OBJECT;
- }
-
- @Override
- public void clear() {
- map.clear();
- }
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/objects/GT_ItemStack.java b/main/java/gregtech/api/objects/GT_ItemStack.java
deleted file mode 100644
index 8881d276c8..0000000000
--- a/main/java/gregtech/api/objects/GT_ItemStack.java
+++ /dev/null
@@ -1,52 +0,0 @@
-package gregtech.api.objects;
-
-import gregtech.api.util.GT_Utility;
-import net.minecraft.init.Items;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-
-public class GT_ItemStack {
- public final Item mItem;
- public final byte mStackSize;
- public final short mMetaData;
-
- public GT_ItemStack(Item aItem, long aStackSize, long aMetaData) {
- mItem = aItem;
- mStackSize = (byte)aStackSize;
- mMetaData = (short)aMetaData;
- }
-
- public GT_ItemStack(ItemStack aStack) {
- this(aStack==null?null:aStack.getItem(), aStack==null?0:aStack.stackSize, aStack==null?0:Items.feather.getDamage(aStack));
- }
-
- public GT_ItemStack(int aHashCode) {
- this(GT_Utility.intToStack(aHashCode));
- }
-
- public ItemStack toStack() {
- if (mItem == null) return null;
- return new ItemStack(mItem, 1, mMetaData);
- }
-
- public boolean isStackEqual(ItemStack aStack) {
- return GT_Utility.areStacksEqual(toStack(), aStack);
- }
-
- public boolean isStackEqual(GT_ItemStack aStack) {
- return GT_Utility.areStacksEqual(toStack(), aStack.toStack());
- }
-
- @Override
- public boolean equals(Object aStack) {
- if (aStack == this) return true;
- if (aStack instanceof GT_ItemStack) {
- return ((GT_ItemStack)aStack).mItem == mItem && ((GT_ItemStack)aStack).mMetaData == mMetaData;}
- return false;
- }
-
- @Override
- public int hashCode() {
- return GT_Utility.stackToInt(toStack());
- }
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/objects/GT_MultiTexture.java b/main/java/gregtech/api/objects/GT_MultiTexture.java
deleted file mode 100644
index 295e51112c..0000000000
--- a/main/java/gregtech/api/objects/GT_MultiTexture.java
+++ /dev/null
@@ -1,53 +0,0 @@
-package gregtech.api.objects;
-
-import gregtech.api.interfaces.ITexture;
-import net.minecraft.block.Block;
-import net.minecraft.client.renderer.RenderBlocks;
-
-/**
- * Lets Multiple ITextures Render overlay over each other.
- *
- * I should have done this much earlier...
- */
-public class GT_MultiTexture implements ITexture {
- private final ITexture[] mTextures;
-
- public GT_MultiTexture(ITexture... aTextures) {
- mTextures = aTextures;
- }
-
- @Override
- public void renderXPos(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) {
- for (ITexture tTexture : mTextures) if (tTexture != null && tTexture.isValidTexture()) tTexture.renderXPos(aRenderer, aBlock, aX, aY, aZ);
- }
-
- @Override
- public void renderXNeg(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) {
- for (ITexture tTexture : mTextures) if (tTexture != null && tTexture.isValidTexture()) tTexture.renderXNeg(aRenderer, aBlock, aX, aY, aZ);
- }
-
- @Override
- public void renderYPos(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) {
- for (ITexture tTexture : mTextures) if (tTexture != null && tTexture.isValidTexture()) tTexture.renderYPos(aRenderer, aBlock, aX, aY, aZ);
- }
-
- @Override
- public void renderYNeg(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) {
- for (ITexture tTexture : mTextures) if (tTexture != null && tTexture.isValidTexture()) tTexture.renderYNeg(aRenderer, aBlock, aX, aY, aZ);
- }
-
- @Override
- public void renderZPos(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) {
- for (ITexture tTexture : mTextures) if (tTexture != null && tTexture.isValidTexture()) tTexture.renderZPos(aRenderer, aBlock, aX, aY, aZ);
- }
-
- @Override
- public void renderZNeg(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) {
- for (ITexture tTexture : mTextures) if (tTexture != null && tTexture.isValidTexture()) tTexture.renderZNeg(aRenderer, aBlock, aX, aY, aZ);
- }
-
- @Override
- public boolean isValidTexture() {
- return true;
- }
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/objects/GT_RenderedTexture.java b/main/java/gregtech/api/objects/GT_RenderedTexture.java
deleted file mode 100644
index 356d68793c..0000000000
--- a/main/java/gregtech/api/objects/GT_RenderedTexture.java
+++ /dev/null
@@ -1,140 +0,0 @@
-package gregtech.api.objects;
-
-import gregtech.api.enums.Dyes;
-import gregtech.api.interfaces.IColorModulationContainer;
-import gregtech.api.interfaces.IIconContainer;
-import gregtech.api.interfaces.ITexture;
-import net.minecraft.block.Block;
-import net.minecraft.client.renderer.RenderBlocks;
-import net.minecraft.client.renderer.Tessellator;
-import net.minecraft.util.IIcon;
-
-public class GT_RenderedTexture implements ITexture, IColorModulationContainer {
- private final IIconContainer mIconContainer;
-
- /**
- * DO NOT MANIPULATE THE VALUES INSIDE THIS ARRAY!!!
- *
- * Just set this variable to another different Array instead.
- * Otherwise some colored things will get Problems.
- */
- public short[] mRGBa;
-
- private final boolean mAllowAlpha;
-
- public GT_RenderedTexture(IIconContainer aIcon, short[] aRGBa, boolean aAllowAlpha) {
- if (aRGBa.length != 4) throw new IllegalArgumentException("RGBa doesn't have 4 Values @ GT_RenderedTexture");
- mIconContainer = aIcon;
- mAllowAlpha = aAllowAlpha;
- mRGBa = aRGBa;
- }
-
- public GT_RenderedTexture(IIconContainer aIcon, short[] aRGBa) {
- this(aIcon, aRGBa, true);
- }
-
- public GT_RenderedTexture(IIconContainer aIcon) {
- this(aIcon, Dyes._NULL.mRGBa);
- }
-
- @Override
- public void renderXPos(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) {
- Tessellator.instance.setColorRGBA((int)(mRGBa[0] * 0.6F), (int)(mRGBa[1] * 0.6F), (int)(mRGBa[2] * 0.6F), mAllowAlpha?255-mRGBa[3]:255);
- aRenderer.renderFaceXPos(aBlock, aX, aY, aZ, mIconContainer.getIcon());
- if (mIconContainer.getOverlayIcon() != null) {
- Tessellator.instance.setColorRGBA(153, 153, 153, 255);
- aRenderer.renderFaceXPos(aBlock, aX, aY, aZ, mIconContainer.getOverlayIcon());
- }
- }
-
- @Override
- public void renderXNeg(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) {
- Tessellator.instance.setColorRGBA((int)(mRGBa[0] * 0.6F), (int)(mRGBa[1] * 0.6F), (int)(mRGBa[2] * 0.6F), mAllowAlpha?255-mRGBa[3]:255);
- aRenderer.renderFaceXNeg(aBlock, aX, aY, aZ, mIconContainer.getIcon());
- if (mIconContainer.getOverlayIcon() != null) {
- Tessellator.instance.setColorRGBA(153, 153, 153, 255);
- aRenderer.renderFaceXNeg(aBlock, aX, aY, aZ, mIconContainer.getOverlayIcon());
- }
- }
-
- @Override
- public void renderYPos(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) {
- Tessellator.instance.setColorRGBA((int)(mRGBa[0] * 1.0F), (int)(mRGBa[1] * 1.0F), (int)(mRGBa[2] * 1.0F), mAllowAlpha?255-mRGBa[3]:255);
- aRenderer.renderFaceYPos(aBlock, aX, aY, aZ, mIconContainer.getIcon());
- if (mIconContainer.getOverlayIcon() != null) {
- Tessellator.instance.setColorRGBA(255, 255, 255, 255);
- aRenderer.renderFaceYPos(aBlock, aX, aY, aZ, mIconContainer.getOverlayIcon());
- }
- }
-
- @Override
- public void renderYNeg(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) {
- Tessellator.instance.setColorRGBA((int)(mRGBa[0] * 0.5F), (int)(mRGBa[1] * 0.5F), (int)(mRGBa[2] * 0.5F), mAllowAlpha?255-mRGBa[3]:255);
- IIcon aIcon = mIconContainer.getIcon();
-
- double d3 = aIcon.getInterpolatedU(aRenderer.renderMaxX * 16.0D);
- double d4 = aIcon.getInterpolatedU(aRenderer.renderMinX * 16.0D);
- double d5 = aIcon.getInterpolatedV(aRenderer.renderMinZ * 16.0D);
- double d6 = aIcon.getInterpolatedV(aRenderer.renderMaxZ * 16.0D);
-
- if (aRenderer.renderMinX < 0.0D || aRenderer.renderMaxX > 1.0D) {
- d3 = aIcon.getMaxU();
- d4 = aIcon.getMinU();
- }
-
- if (aRenderer.renderMinZ < 0.0D || aRenderer.renderMaxZ > 1.0D) {
- d5 = aIcon.getMinV();
- d6 = aIcon.getMaxV();
- }
-
- double d11 = aX + aRenderer.renderMinX;
- double d12 = aX + aRenderer.renderMaxX;
- double d13 = aY + aRenderer.renderMinY;
- double d14 = aZ + aRenderer.renderMinZ;
- double d15 = aZ + aRenderer.renderMaxZ;
-
- Tessellator.instance.addVertexWithUV(d11, d13, d15, d3, d6);
- Tessellator.instance.addVertexWithUV(d11, d13, d14, d3, d5);
- Tessellator.instance.addVertexWithUV(d12, d13, d14, d4, d5);
- Tessellator.instance.addVertexWithUV(d12, d13, d15, d4, d6);
-
- if ((aIcon = mIconContainer.getOverlayIcon()) != null) {
- Tessellator.instance.setColorRGBA(128, 128, 128, 255);
-
- Tessellator.instance.addVertexWithUV(d11, d13, d15, d3, d6);
- Tessellator.instance.addVertexWithUV(d11, d13, d14, d3, d5);
- Tessellator.instance.addVertexWithUV(d12, d13, d14, d4, d5);
- Tessellator.instance.addVertexWithUV(d12, d13, d15, d4, d6);
- }
- }
-
- @Override
- public void renderZPos(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) {
- Tessellator.instance.setColorRGBA((int)(mRGBa[0] * 0.8F), (int)(mRGBa[1] * 0.8F), (int)(mRGBa[2] * 0.8F), mAllowAlpha?255-mRGBa[3]:255);
- aRenderer.renderFaceZPos(aBlock, aX, aY, aZ, mIconContainer.getIcon());
- if (mIconContainer.getOverlayIcon() != null) {
- Tessellator.instance.setColorRGBA(204, 204, 204, 255);
- aRenderer.renderFaceZPos(aBlock, aX, aY, aZ, mIconContainer.getOverlayIcon());
- }
- }
-
- @Override
- public void renderZNeg(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) {
- Tessellator.instance.setColorRGBA((int)(mRGBa[0] * 0.8F), (int)(mRGBa[1] * 0.8F), (int)(mRGBa[2] * 0.8F), mAllowAlpha?255-mRGBa[3]:255);
- aRenderer.renderFaceZNeg(aBlock, aX, aY, aZ, mIconContainer.getIcon());
- if (mIconContainer.getOverlayIcon() != null) {
- Tessellator.instance.setColorRGBA(204, 204, 204, 255);
- aRenderer.renderFaceZNeg(aBlock, aX, aY, aZ, mIconContainer.getOverlayIcon());
- }
- }
-
- @Override
- public short[] getRGBA() {
- return mRGBa;
- }
-
- @Override
- public boolean isValidTexture() {
- return mIconContainer != null;
- }
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/objects/GT_SidedTexture.java b/main/java/gregtech/api/objects/GT_SidedTexture.java
deleted file mode 100644
index 183d5b8415..0000000000
--- a/main/java/gregtech/api/objects/GT_SidedTexture.java
+++ /dev/null
@@ -1,169 +0,0 @@
-package gregtech.api.objects;
-
-import gregtech.api.enums.Dyes;
-import gregtech.api.interfaces.IColorModulationContainer;
-import gregtech.api.interfaces.IIconContainer;
-import gregtech.api.interfaces.ITexture;
-import net.minecraft.block.Block;
-import net.minecraft.client.renderer.RenderBlocks;
-import net.minecraft.client.renderer.Tessellator;
-import net.minecraft.util.IIcon;
-
-public class GT_SidedTexture implements ITexture, IColorModulationContainer {
- private final IIconContainer[] mIconContainer;
-
- /**
- * DO NOT MANIPULATE THE VALUES INSIDE THIS ARRAY!!!
- *
- * Just set this variable to another different Array instead.
- * Otherwise some colored things will get Problems.
- */
- public short[] mRGBa;
-
- private final boolean mAllowAlpha;
-
- public GT_SidedTexture(IIconContainer aIcon0, IIconContainer aIcon1, IIconContainer aIcon2, IIconContainer aIcon3, IIconContainer aIcon4, IIconContainer aIcon5, short[] aRGBa, boolean aAllowAlpha) {
- if (aRGBa.length != 4) throw new IllegalArgumentException("RGBa doesn't have 4 Values @ GT_RenderedTexture");
- mIconContainer = new IIconContainer[] {aIcon0, aIcon1, aIcon2, aIcon3, aIcon4, aIcon5};
- mAllowAlpha = aAllowAlpha;
- mRGBa = aRGBa;
- }
-
- public GT_SidedTexture(IIconContainer aIcon0, IIconContainer aIcon1, IIconContainer aIcon2, IIconContainer aIcon3, IIconContainer aIcon4, IIconContainer aIcon5, short[] aRGBa) {
- this(aIcon0, aIcon1, aIcon2, aIcon3, aIcon4, aIcon5, aRGBa, true);
- }
-
- public GT_SidedTexture(IIconContainer aIcon0, IIconContainer aIcon1, IIconContainer aIcon2, IIconContainer aIcon3, IIconContainer aIcon4, IIconContainer aIcon5) {
- this(aIcon0, aIcon1, aIcon2, aIcon3, aIcon4, aIcon5, Dyes._NULL.mRGBa);
- }
-
- public GT_SidedTexture(IIconContainer aBottom, IIconContainer aTop, IIconContainer aSides, short[] aRGBa) {
- this(aBottom, aTop, aSides, aSides, aSides, aSides, aRGBa);
- }
-
- public GT_SidedTexture(IIconContainer aBottom, IIconContainer aTop, IIconContainer aSides) {
- this(aBottom, aTop, aSides, Dyes._NULL.mRGBa);
- }
-
- @Override
- public void renderXPos(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) {
- Tessellator.instance.setColorRGBA((int)(mRGBa[0] * 0.6F), (int)(mRGBa[1] * 0.6F), (int)(mRGBa[2] * 0.6F), mAllowAlpha?255-mRGBa[3]:255);
- aRenderer.renderFaceXPos(aBlock, aX, aY, aZ, mIconContainer[5].getIcon());
- if (mIconContainer[5].getOverlayIcon() != null) {
- Tessellator.instance.setColorRGBA(153, 153, 153, 255);
- aRenderer.renderFaceXPos(aBlock, aX, aY, aZ, mIconContainer[5].getOverlayIcon());
- }
- }
-
- @Override
- public void renderXNeg(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) {
- Tessellator.instance.setColorRGBA((int)(mRGBa[0] * 0.6F), (int)(mRGBa[1] * 0.6F), (int)(mRGBa[2] * 0.6F), mAllowAlpha?255-mRGBa[3]:255);
- aRenderer.renderFaceXNeg(aBlock, aX, aY, aZ, mIconContainer[4].getIcon());
- if (mIconContainer[4].getOverlayIcon() != null) {
- Tessellator.instance.setColorRGBA(153, 153, 153, 255);
- aRenderer.renderFaceXNeg(aBlock, aX, aY, aZ, mIconContainer[4].getOverlayIcon());
- }
- }
-
- @Override
- public void renderYPos(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) {
- Tessellator.instance.setColorRGBA((int)(mRGBa[0] * 1.0F), (int)(mRGBa[1] * 1.0F), (int)(mRGBa[2] * 1.0F), mAllowAlpha?255-mRGBa[3]:255);
- aRenderer.renderFaceYPos(aBlock, aX, aY, aZ, mIconContainer[1].getIcon());
- if (mIconContainer[1].getOverlayIcon() != null) {
- Tessellator.instance.setColorRGBA(255, 255, 255, 255);
- aRenderer.renderFaceYPos(aBlock, aX, aY, aZ, mIconContainer[1].getOverlayIcon());
- }
- }
-
- @Override
- public void renderYNeg(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) {
- Tessellator.instance.setColorRGBA((int)(mRGBa[0] * 0.5F), (int)(mRGBa[1] * 0.5F), (int)(mRGBa[2] * 0.5F), mAllowAlpha?255-mRGBa[3]:255);
- IIcon aIcon = mIconContainer[0].getIcon();
-
- double d3 = aIcon.getInterpolatedU(aRenderer.renderMaxX * 16.0D);
- double d4 = aIcon.getInterpolatedU(aRenderer.renderMinX * 16.0D);
- double d5 = aIcon.getInterpolatedV(aRenderer.renderMinZ * 16.0D);
- double d6 = aIcon.getInterpolatedV(aRenderer.renderMaxZ * 16.0D);
-
- if (aRenderer.renderMinX < 0.0D || aRenderer.renderMaxX > 1.0D) {
- d3 = aIcon.getMaxU();
- d4 = aIcon.getMinU();
- }
-
- if (aRenderer.renderMinZ < 0.0D || aRenderer.renderMaxZ > 1.0D) {
- d5 = aIcon.getMinV();
- d6 = aIcon.getMaxV();
- }
-
- double d11 = aX + aRenderer.renderMinX;
- double d12 = aX + aRenderer.renderMaxX;
- double d13 = aY + aRenderer.renderMinY;
- double d14 = aZ + aRenderer.renderMinZ;
- double d15 = aZ + aRenderer.renderMaxZ;
-
- Tessellator.instance.addVertexWithUV(d11, d13, d15, d3, d6);
- Tessellator.instance.addVertexWithUV(d11, d13, d14, d3, d5);
- Tessellator.instance.addVertexWithUV(d12, d13, d14, d4, d5);
- Tessellator.instance.addVertexWithUV(d12, d13, d15, d4, d6);
-
- if ((aIcon = mIconContainer[0].getOverlayIcon()) != null) {
- Tessellator.instance.setColorRGBA(128, 128, 128, 255);
-
- d3 = aIcon.getInterpolatedU(aRenderer.renderMaxX * 16.0D);
- d4 = aIcon.getInterpolatedU(aRenderer.renderMinX * 16.0D);
- d5 = aIcon.getInterpolatedV(aRenderer.renderMinZ * 16.0D);
- d6 = aIcon.getInterpolatedV(aRenderer.renderMaxZ * 16.0D);
-
- if (aRenderer.renderMinX < 0.0D || aRenderer.renderMaxX > 1.0D) {
- d3 = aIcon.getMaxU();
- d4 = aIcon.getMinU();
- }
-
- if (aRenderer.renderMinZ < 0.0D || aRenderer.renderMaxZ > 1.0D) {
- d5 = aIcon.getMinV();
- d6 = aIcon.getMaxV();
- }
-
- d11 = aX + aRenderer.renderMinX;
- d12 = aX + aRenderer.renderMaxX;
- d13 = aY + aRenderer.renderMinY;
- d14 = aZ + aRenderer.renderMinZ;
- d15 = aZ + aRenderer.renderMaxZ;
-
- Tessellator.instance.addVertexWithUV(d11, d13, d15, d3, d6);
- Tessellator.instance.addVertexWithUV(d11, d13, d14, d3, d5);
- Tessellator.instance.addVertexWithUV(d12, d13, d14, d4, d5);
- Tessellator.instance.addVertexWithUV(d12, d13, d15, d4, d6);
- }
- }
-
- @Override
- public void renderZPos(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) {
- Tessellator.instance.setColorRGBA((int)(mRGBa[0] * 0.8F), (int)(mRGBa[1] * 0.8F), (int)(mRGBa[2] * 0.8F), mAllowAlpha?255-mRGBa[3]:255);
- aRenderer.renderFaceZPos(aBlock, aX, aY, aZ, mIconContainer[3].getIcon());
- if (mIconContainer[3].getOverlayIcon() != null) {
- Tessellator.instance.setColorRGBA(204, 204, 204, 255);
- aRenderer.renderFaceZPos(aBlock, aX, aY, aZ, mIconContainer[3].getOverlayIcon());
- }
- }
-
- @Override
- public void renderZNeg(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) {
- Tessellator.instance.setColorRGBA((int)(mRGBa[0] * 0.8F), (int)(mRGBa[1] * 0.8F), (int)(mRGBa[2] * 0.8F), mAllowAlpha?255-mRGBa[3]:255);
- aRenderer.renderFaceZNeg(aBlock, aX, aY, aZ, mIconContainer[2].getIcon());
- if (mIconContainer[2].getOverlayIcon() != null) {
- Tessellator.instance.setColorRGBA(204, 204, 204, 255);
- aRenderer.renderFaceZNeg(aBlock, aX, aY, aZ, mIconContainer[2].getOverlayIcon());
- }
- }
-
- @Override
- public short[] getRGBA() {
- return mRGBa;
- }
-
- @Override
- public boolean isValidTexture() {
- return mIconContainer != null && mIconContainer[0] != null && mIconContainer[1] != null && mIconContainer[2] != null && mIconContainer[3] != null && mIconContainer[4] != null && mIconContainer[5] != null;
- }
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/objects/ItemData.java b/main/java/gregtech/api/objects/ItemData.java
deleted file mode 100644
index e0f1f32fd8..0000000000
--- a/main/java/gregtech/api/objects/ItemData.java
+++ /dev/null
@@ -1,116 +0,0 @@
-package gregtech.api.objects;
-
-import gregtech.api.enums.Materials;
-import gregtech.api.enums.OrePrefixes;
-
-import java.util.*;
-
-import net.minecraft.item.ItemStack;
-
-public class ItemData {
- private static final MaterialStack[] EMPTY_MATERIALSTACK_ARRAY = new MaterialStack[0];
-
- public final List<Object> mExtraData = new GT_ArrayList<Object>(false, 1);
-
- public boolean mBlackListed = false;
- public ItemStack mUnificationTarget = null;
-
- public final OrePrefixes mPrefix;
- public final MaterialStack mMaterial;
- public final MaterialStack[] mByProducts;
-
- public ItemData(OrePrefixes aPrefix, Materials aMaterial, boolean aBlackListed) {
- mPrefix = aPrefix;
- mMaterial = aMaterial==null?null:new MaterialStack(aMaterial, aPrefix.mMaterialAmount);
- mBlackListed = aBlackListed;
- mByProducts = aPrefix.mSecondaryMaterial==null||aPrefix.mSecondaryMaterial.mMaterial==null?EMPTY_MATERIALSTACK_ARRAY:new MaterialStack[] {aPrefix.mSecondaryMaterial.clone()};
- }
-
- public ItemData(OrePrefixes aPrefix, Materials aMaterial) {
- this(aPrefix, aMaterial, false);
- }
-
- public ItemData(MaterialStack aMaterial, MaterialStack... aByProducts) {
- mPrefix = null;
- mMaterial = aMaterial.mMaterial==null?null:aMaterial.clone();
- mBlackListed = true;
- if (aByProducts == null) {
- mByProducts = EMPTY_MATERIALSTACK_ARRAY;
- } else {
- MaterialStack[] tByProducts = aByProducts.length<1?EMPTY_MATERIALSTACK_ARRAY:new MaterialStack[aByProducts.length];
- int j = 0;
- for (int i = 0; i < aByProducts.length; i++) if (aByProducts[i] != null && aByProducts[i].mMaterial != null) tByProducts[j++] = aByProducts[i].clone();
- mByProducts = j>0?new MaterialStack[j]:EMPTY_MATERIALSTACK_ARRAY;
- for (int i = 0; i < mByProducts.length; i++) mByProducts[i] = tByProducts[i];
- }
- }
-
- public ItemData(Materials aMaterial, long aAmount, MaterialStack... aByProducts) {
- this(new MaterialStack(aMaterial, aAmount), aByProducts);
- }
-
- public ItemData(Materials aMaterial, long aAmount, Materials aByProduct, long aByProductAmount) {
- this(new MaterialStack(aMaterial, aAmount), new MaterialStack(aByProduct, aByProductAmount));
- }
-
- public ItemData(ItemData... aData) {
- mPrefix = null;
- mBlackListed = true;
-
- ArrayList<MaterialStack> aList = new ArrayList<MaterialStack>(), rList = new ArrayList<MaterialStack>();
-
- for (ItemData tData : aData) if (tData != null) {
- if (tData.hasValidMaterialData() && tData.mMaterial.mAmount > 0) aList.add(tData.mMaterial.clone());
- for (MaterialStack tMaterial : tData.mByProducts) if (tMaterial.mAmount > 0) aList.add(tMaterial.clone());
- }
-
- for (MaterialStack aMaterial : aList) {
- boolean temp = true;
- for (MaterialStack tMaterial : rList) if (aMaterial.mMaterial == tMaterial.mMaterial) {
- tMaterial.mAmount += aMaterial.mAmount;
- temp = false; break;
- }
- if (temp) rList.add(aMaterial.clone());
- }
-
- Collections.sort(rList, new Comparator<MaterialStack>() {@Override public int compare(MaterialStack a, MaterialStack b) {return a.mAmount == b.mAmount ? 0 : a.mAmount > b.mAmount ? -1 : +1;}});
-
- if (rList.isEmpty()) {
- mMaterial = null;
- } else {
- mMaterial = rList.get(0);
- rList.remove(0);
- }
-
- mByProducts = rList.toArray(new MaterialStack[rList.size()]);
- }
-
- public boolean hasValidPrefixMaterialData() {
- return mPrefix != null && mMaterial != null && mMaterial.mMaterial != null;
- }
-
- public boolean hasValidPrefixData() {
- return mPrefix != null;
- }
-
- public boolean hasValidMaterialData() {
- return mMaterial != null && mMaterial.mMaterial != null;
- }
-
- public ArrayList<MaterialStack> getAllMaterialStacks() {
- ArrayList<MaterialStack> rList = new ArrayList();
- if (hasValidMaterialData()) rList.add(mMaterial);
- rList.addAll(Arrays.asList(mByProducts));
- return rList;
- }
-
- public MaterialStack getByProduct(int aIndex) {
- return aIndex>=0&&aIndex<mByProducts.length?mByProducts[aIndex]:null;
- }
-
- @Override
- public String toString() {
- if (mPrefix == null || mMaterial == null || mMaterial.mMaterial == null) return "";
- return mPrefix.name() + mMaterial.mMaterial.name();
- }
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/objects/MaterialStack.java b/main/java/gregtech/api/objects/MaterialStack.java
deleted file mode 100644
index 3d9479eb0b..0000000000
--- a/main/java/gregtech/api/objects/MaterialStack.java
+++ /dev/null
@@ -1,41 +0,0 @@
-package gregtech.api.objects;
-
-import gregtech.api.enums.Materials;
-
-public class MaterialStack implements Cloneable {
- public long mAmount;
- public Materials mMaterial;
-
- public MaterialStack(Materials aMaterial, long aAmount) {
- mMaterial = aMaterial==null?Materials._NULL:aMaterial;
- mAmount = aAmount;
- }
-
- public MaterialStack copy(long aAmount) {
- return new MaterialStack(mMaterial, aAmount);
- }
-
- @Override
- public MaterialStack clone() {
- return new MaterialStack(mMaterial, mAmount);
- }
-
- @Override
- public boolean equals(Object aObject) {
- if (aObject == this) return true;
- if (aObject == null) return false;
- if (aObject instanceof Materials) return aObject == mMaterial;
- if (aObject instanceof MaterialStack) return ((MaterialStack)aObject).mMaterial == mMaterial && (mAmount < 0 || ((MaterialStack)aObject).mAmount < 0 || ((MaterialStack)aObject).mAmount == mAmount);
- return false;
- }
-
- @Override
- public String toString() {
- return (mMaterial.mMaterialList.size() > 1 && mAmount > 1 ? "(" : "") + mMaterial.getToolTip(true) + (mMaterial.mMaterialList.size() > 1 && mAmount > 1 ? ")" : "") + (mAmount > 1 ? mAmount : "");
- }
-
- @Override
- public int hashCode() {
- return mMaterial.hashCode();
- }
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/threads/GT_Runnable_MachineBlockUpdate.java b/main/java/gregtech/api/threads/GT_Runnable_MachineBlockUpdate.java
deleted file mode 100644
index deed269adf..0000000000
--- a/main/java/gregtech/api/threads/GT_Runnable_MachineBlockUpdate.java
+++ /dev/null
@@ -1,38 +0,0 @@
-package gregtech.api.threads;
-
-import gregtech.api.GregTech_API;
-import gregtech.api.interfaces.tileentity.IMachineBlockUpdateable;
-
-import java.util.ArrayList;
-
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.world.ChunkPosition;
-import net.minecraft.world.World;
-
-public class GT_Runnable_MachineBlockUpdate implements Runnable {
- private final int mX, mY, mZ;
- private final World mWorld;
-
- public GT_Runnable_MachineBlockUpdate(World aWorld, int aX, int aY, int aZ) {
- mWorld = aWorld; mX = aX; mY = aY; mZ = aZ;
- }
-
- @Override
- public void run() {
- try {stepToUpdateMachine(mWorld, mX, mY, mZ, new ArrayList<ChunkPosition>());} catch(Throwable e) {/**/}
- }
-
- private static void stepToUpdateMachine(World aWorld, int aX, int aY, int aZ, ArrayList<ChunkPosition> aList) {
- aList.add(new ChunkPosition(aX, aY, aZ));
- TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ);
- if (tTileEntity != null && tTileEntity instanceof IMachineBlockUpdateable) ((IMachineBlockUpdateable)tTileEntity).onMachineBlockUpdate();
- if (aList.size() < 5 || (tTileEntity != null && tTileEntity instanceof IMachineBlockUpdateable) || GregTech_API.isMachineBlock(aWorld.getBlock(aX, aY, aZ), aWorld.getBlockMetadata(aX, aY, aZ))) {
- if (!aList.contains(new ChunkPosition(aX + 1, aY, aZ))) stepToUpdateMachine(aWorld, aX + 1, aY, aZ, aList);
- if (!aList.contains(new ChunkPosition(aX - 1, aY, aZ))) stepToUpdateMachine(aWorld, aX - 1, aY, aZ, aList);
- if (!aList.contains(new ChunkPosition(aX, aY + 1, aZ))) stepToUpdateMachine(aWorld, aX, aY + 1, aZ, aList);
- if (!aList.contains(new ChunkPosition(aX, aY - 1, aZ))) stepToUpdateMachine(aWorld, aX, aY - 1, aZ, aList);
- if (!aList.contains(new ChunkPosition(aX, aY, aZ + 1))) stepToUpdateMachine(aWorld, aX, aY, aZ + 1, aList);
- if (!aList.contains(new ChunkPosition(aX, aY, aZ - 1))) stepToUpdateMachine(aWorld, aX, aY, aZ - 1, aList);
- }
- }
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/threads/GT_Runnable_Sound.java b/main/java/gregtech/api/threads/GT_Runnable_Sound.java
deleted file mode 100644
index aaa8b84028..0000000000
--- a/main/java/gregtech/api/threads/GT_Runnable_Sound.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package gregtech.api.threads;
-
-import gregtech.api.util.GT_PlayedSound;
-import gregtech.api.util.GT_Utility;
-import net.minecraft.world.World;
-
-public class GT_Runnable_Sound implements Runnable {
- private final int mX, mY, mZ, mTimeUntilNextSound;
- private final World mWorld;
- private final String mSoundName;
- private final float mSoundStrength, mSoundModulation;
-
- public GT_Runnable_Sound(World aWorld, int aX, int aY, int aZ, int aTimeUntilNextSound, String aSoundName, float aSoundStrength, float aSoundModulation) {
- mWorld = aWorld; mX = aX; mY = aY; mZ = aZ; mTimeUntilNextSound = aTimeUntilNextSound; mSoundName = aSoundName; mSoundStrength = aSoundStrength; mSoundModulation = aSoundModulation;
- }
-
- @Override
- public void run() {
- try {
- GT_PlayedSound tSound;
- if (GT_Utility.sPlayedSoundMap.keySet().contains(tSound = new GT_PlayedSound(mSoundName, mX, mY, mZ))) return;
- mWorld.playSound(mX, mY, mZ, mSoundName, mSoundStrength, mSoundModulation, false);
- GT_Utility.sPlayedSoundMap.put(tSound, mTimeUntilNextSound);
- } catch(Throwable e) {/**/}
- }
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/util/GT_BaseCrop.java b/main/java/gregtech/api/util/GT_BaseCrop.java
deleted file mode 100644
index e7cef2c598..0000000000
--- a/main/java/gregtech/api/util/GT_BaseCrop.java
+++ /dev/null
@@ -1,129 +0,0 @@
-package gregtech.api.util;
-
-import static gregtech.api.enums.GT_Values.E;
-import gregtech.api.enums.ConfigCategories;
-import ic2.api.crops.CropCard;
-import ic2.api.crops.Crops;
-import ic2.api.crops.ICropTile;
-
-import java.util.ArrayList;
-import java.util.Random;
-
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.entity.player.EntityPlayerMP;
-import net.minecraft.item.ItemStack;
-
-public class GT_BaseCrop extends CropCard {
- private String mName = E, mDiscoveredBy = "Gregorius Techneticies", mAttributes[];
- private int mTier = 0, mMaxSize = 0, mAfterHarvestSize = 0, mHarvestSize = 0, mStats[] = new int[5];
- private ItemStack mDrop = null, mSpecialDrops[] = null;
-
- public static ArrayList<GT_BaseCrop> sCropList = new ArrayList<GT_BaseCrop>();
-
- /**
- * To create new Crops
- * @param aID Default ID
- * @param aCropName Name of the Crop
- * @param aDiscoveredBy The one who discovered the Crop
- * @param aDrop The Item which is dropped by the Crop. must be != null
- * @param aBaseSeed Baseseed to plant this Crop. null == crossbreed only
- * @param aTier tier of the Crop. forced to be >= 1
- * @param aMaxSize maximum Size of the Crop. forced to be >= 3
- * @param aGrowthSpeed how fast the Crop grows. if < 0 then its set to Tier*300
- * @param aHarvestSize the size the Crop needs to be harvested. forced to be between 2 and max size
- */
- public GT_BaseCrop(int aID, String aCropName, String aDiscoveredBy, ItemStack aDrop, ItemStack[] aSpecialDrops, ItemStack aBaseSeed, int aTier, int aMaxSize, int aGrowthSpeed, int aAfterHarvestSize, int aHarvestSize, int aStatChemical, int aStatFood, int aStatDefensive, int aStatColor, int aStatWeed, String[] aAttributes) {
- mName = aCropName;
- aID = GT_Config.addIDConfig(ConfigCategories.IDs.crops, mName.replaceAll(" ", "_"), aID);
- if (aDiscoveredBy != null && !aDiscoveredBy.equals(E)) mDiscoveredBy = aDiscoveredBy;
- if (aDrop != null && aID > 0 && aID < 256) {
- mDrop = GT_Utility.copy(aDrop);
- mSpecialDrops = aSpecialDrops;
- mTier = Math.max(1, aTier);
- mMaxSize = Math.max(3, aMaxSize);
-// mGrowthSpeed = aGrowthSpeed>0?aGrowthSpeed:mTier*300;
- mHarvestSize = Math.min(Math.max(aHarvestSize, 2), mMaxSize);
- mAfterHarvestSize = Math.min(Math.max(aAfterHarvestSize, 1), mMaxSize-1);
- mStats[0] = aStatChemical;
- mStats[1] = aStatFood;
- mStats[2] = aStatDefensive;
- mStats[3] = aStatColor;
- mStats[4] = aStatWeed;
- mAttributes = aAttributes;
- if (!Crops.instance.registerCrop(this, aID)) throw new GT_ItsNotMyFaultException("Make sure the Crop ID is valid!");
- if (aBaseSeed != null) Crops.instance.registerBaseSeed(aBaseSeed, aID, 1, 1, 1, 1);
- sCropList.add(this);
- }
- }
-
- @Override
- public byte getSizeAfterHarvest(ICropTile crop) {
- return (byte)mAfterHarvestSize;
- }
-
- @Override
- public String[] attributes() {
- return mAttributes;
- }
-
- @Override
- public String discoveredBy() {
- return mDiscoveredBy;
- }
-
- @Override
- public final boolean canGrow(ICropTile aCrop) {
- return aCrop.getSize() < maxSize();
- }
-
- @Override
- public final boolean canBeHarvested(ICropTile aCrop) {
- return aCrop.getSize() >= mHarvestSize;
- }
-
- @Override
- public boolean canCross(ICropTile aCrop) {
- return aCrop.getSize() + 2 > maxSize();
- }
-
- @Override
- public int stat(int n) {
- if (n < 0 || n >= mStats.length) return 0;
- return mStats[n];
- }
-
- @Override
- public String name() {
- return mName;
- }
-
- @Override
- public int tier() {
- return mTier;
- }
-
- @Override
- public int maxSize() {
- return mMaxSize;
- }
-
- @Override
- public ItemStack getGain(ICropTile aCrop) {
- int tDrop = 0;
- if (mSpecialDrops != null && (tDrop = new Random().nextInt(mSpecialDrops.length+4)) < mSpecialDrops.length && mSpecialDrops[tDrop] != null) {
- return GT_Utility.copy(mSpecialDrops[tDrop]);
- }
- return GT_Utility.copy(mDrop);
- }
-
- @Override
- public boolean rightclick(ICropTile aCrop, EntityPlayer aPlayer) {
- if (!canBeHarvested(aCrop)) return false;
- return aCrop.harvest(aPlayer==null?false:aPlayer instanceof EntityPlayerMP);
- }
-
- @Override
- public int getOptimalHavestSize(ICropTile crop) {
- return maxSize();
- }
-}
diff --git a/main/java/gregtech/api/util/GT_CircuitryBehavior.java b/main/java/gregtech/api/util/GT_CircuitryBehavior.java
deleted file mode 100644
index 6cda3c202f..0000000000
--- a/main/java/gregtech/api/util/GT_CircuitryBehavior.java
+++ /dev/null
@@ -1,178 +0,0 @@
-package gregtech.api.util;
-
-import gregtech.api.GregTech_API;
-import gregtech.api.interfaces.IRedstoneCircuitBlock;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-
-/**
- * Redstone Circuit Control Code
- *
- * This should make everything possible what a Redstone Computer or BuildCraft Gate could do.
- * It is intended to use this similar to BC-Gates (for acquiring Data) and RP Logic Gates.
- * You could write an extremely specified and complex Logic Gate, which works only for you Setup, like
- * with ComputerCraft, but you would have to write an extra Mod to add that, as it doesn't work Ingame.
- *
- * One can make use of the fact, that ItemStacks can be stored as Integer, so that you can scan
- * Inventories for specific Items using that. Luckily the Buttons in the GUI enable Copy/Paste of
- * ItemID+MetaData to Integer, including the WildCard Damage Value when you use rightclick to place it.
- * You just need to use @GT_Utility.stackToInt(ItemStack aStack) to get it.
- *
- * All Functions run usually in a seperate try/catch Block, so that failed Logic won't crash the TileEntity.
- */
-public abstract class GT_CircuitryBehavior {
- /**
- * @param aIndex 0 - 1023 are my own Indices, so use other Numbers!
- */
- public GT_CircuitryBehavior(int aIndex) {
- GregTech_API.sCircuitryBehaviors.put(aIndex, this);
- }
-
- /**
- * Initializes the Parameters of this Circuit, all Parameters have been set to 0 right before calling this
- * @param aCircuitData, The Data Storage you can use (8 Slots)
- * @param aRedstoneCircuitBlock, The Circuit Block MetaTileEntity itself
- */
- public abstract void initParameters(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock);
-
- /**
- * Validates the Parameters of this Circuit when a value has been changed by the GUI
- * Also called right after @initParameters and when the Chunk reloads
- * @param aCircuitData, The Data Storage you can use (8 Slots and only the first 4 are User definable)
- * @param aRedstoneCircuitBlock, The Circuit Block MetaTileEntity itself
- */
- public abstract void validateParameters(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock);
-
- /**
- * Called every tick if the Block has enough Energy and if the Block is Active
- * @param aCircuitData, The Data Storage you can use (8 Slots)
- * @param aRedstoneCircuitBlock, The Circuit Block MetaTileEntity itself
- */
- public abstract void onTick(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock);
-
- /**
- * If the ItemStack should be displayed. Parameters are between 0 and 3.
- */
- public abstract boolean displayItemStack(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock, int aIndex);
-
- /*****************
- * GUI Functions *
- *****************/
-
- /**
- * The Name of the Gate for the GUI
- */
- @SideOnly(Side.CLIENT)
- public abstract String getName();
-
- /**
- * The Description of the Gate for the GUI
- */
- @SideOnly(Side.CLIENT)
- public abstract String getDescription();
-
- /**
- * The Description of the Data Field for the GUI
- */
- @SideOnly(Side.CLIENT)
- public abstract String getDataDescription(int[] aCircuitData, int aCircuitDataIndex);
-
- /**
- * How the Integer should be displayed in the GUI.
- * null means, that it just displays as regular Number.
- */
- @SideOnly(Side.CLIENT)
- public String getDataDisplay(int[] aCircuitData, int aCircuitDataIndex) {
- return null;
- }
-
-
- /****************************
- * Useful Utility Functions *
- ****************************/
-
- /**
- * returns if there is Redstone applied to any of the valid Inputs (OR)
- */
- public static final boolean getAnyRedstone(IRedstoneCircuitBlock aRedstoneCircuitBlock) {
- for (byte i = 0; i < 6; i++) {
- if (i != aRedstoneCircuitBlock.getOutputFacing() && aRedstoneCircuitBlock.getCover(i).letsRedstoneGoIn(i, aRedstoneCircuitBlock.getCoverID(i), aRedstoneCircuitBlock.getCoverVariable(i), aRedstoneCircuitBlock.getOwnTileEntity())) {
- if (aRedstoneCircuitBlock.getInputRedstone(i) > 0) {
- return true;
- }
- }
- }
- return false;
- }
-
- /**
- * returns if there is Redstone applied to all the valid Inputs (AND)
- */
- public static final boolean getAllRedstone(IRedstoneCircuitBlock aRedstoneCircuitBlock) {
- for (byte i = 0; i < 6; i++) {
- if (i != aRedstoneCircuitBlock.getOutputFacing() && aRedstoneCircuitBlock.getCover(i).letsRedstoneGoIn(i, aRedstoneCircuitBlock.getCoverID(i), aRedstoneCircuitBlock.getCoverVariable(i), aRedstoneCircuitBlock.getOwnTileEntity())) {
- if (aRedstoneCircuitBlock.getInputRedstone(i) == 0) {
- return false;
- }
- }
- }
- return true;
- }
-
- /**
- * returns if there is Redstone applied to exactly one of the valid Inputs (XOR)
- */
- public static final boolean getOneRedstone(IRedstoneCircuitBlock aRedstoneCircuitBlock) {
- int tRedstoneAmount = 0;
- for (byte i = 0; i < 6; i++) {
- if (i != aRedstoneCircuitBlock.getOutputFacing() && aRedstoneCircuitBlock.getCover(i).letsRedstoneGoIn(i, aRedstoneCircuitBlock.getCoverID(i), aRedstoneCircuitBlock.getCoverVariable(i), aRedstoneCircuitBlock.getOwnTileEntity())) {
- if (aRedstoneCircuitBlock.getInputRedstone(i) > 0) {
- tRedstoneAmount++;
- }
- }
- }
- return tRedstoneAmount == 1;
- }
-
- /**
- * returns the strongest incoming RS-Power
- */
- public static final byte getStrongestRedstone(IRedstoneCircuitBlock aRedstoneCircuitBlock) {
- byte tRedstoneAmount = 0;
- for (byte i = 0; i < 6; i++) {
- if (i != aRedstoneCircuitBlock.getOutputFacing() && aRedstoneCircuitBlock.getCover(i).letsRedstoneGoIn(i, aRedstoneCircuitBlock.getCoverID(i), aRedstoneCircuitBlock.getCoverVariable(i), aRedstoneCircuitBlock.getOwnTileEntity())) {
- tRedstoneAmount = (byte)Math.max(tRedstoneAmount, aRedstoneCircuitBlock.getInputRedstone(i));
- }
- }
- return tRedstoneAmount;
- }
-
- /**
- * returns the weakest incoming non-zero RS-Power
- */
- public static final byte getWeakestNonZeroRedstone(IRedstoneCircuitBlock aRedstoneCircuitBlock) {
- if (!getAnyRedstone(aRedstoneCircuitBlock)) return 0;
- byte tRedstoneAmount = 15;
- for (byte i = 0; i < 6; i++) {
- if (i != aRedstoneCircuitBlock.getOutputFacing() && aRedstoneCircuitBlock.getCover(i).letsRedstoneGoIn(i, aRedstoneCircuitBlock.getCoverID(i), aRedstoneCircuitBlock.getCoverVariable(i), aRedstoneCircuitBlock.getOwnTileEntity())) {
- if (aRedstoneCircuitBlock.getInputRedstone(i) > 0)
- tRedstoneAmount = (byte)Math.min(tRedstoneAmount, aRedstoneCircuitBlock.getInputRedstone(i));
- }
- }
- return tRedstoneAmount;
- }
-
- /**
- * returns the weakest incoming RS-Power
- */
- public static final byte getWeakestRedstone(IRedstoneCircuitBlock aRedstoneCircuitBlock) {
- if (!getAnyRedstone(aRedstoneCircuitBlock)) return 0;
- byte tRedstoneAmount = 15;
- for (byte i = 0; i < 6; i++) {
- if (i != aRedstoneCircuitBlock.getOutputFacing() && aRedstoneCircuitBlock.getCover(i).letsRedstoneGoIn(i, aRedstoneCircuitBlock.getCoverID(i), aRedstoneCircuitBlock.getCoverVariable(i), aRedstoneCircuitBlock.getOwnTileEntity())) {
- tRedstoneAmount = (byte)Math.min(tRedstoneAmount, aRedstoneCircuitBlock.getInputRedstone(i));
- }
- }
- return tRedstoneAmount;
- }
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/util/GT_Config.java b/main/java/gregtech/api/util/GT_Config.java
deleted file mode 100644
index 9ad2ebab50..0000000000
--- a/main/java/gregtech/api/util/GT_Config.java
+++ /dev/null
@@ -1,86 +0,0 @@
-package gregtech.api.util;
-
-import static gregtech.api.enums.GT_Values.E;
-import static gregtech.api.enums.GT_Values.F;
-import gregtech.api.GregTech_API;
-import net.minecraft.item.ItemStack;
-import net.minecraftforge.common.config.Configuration;
-import net.minecraftforge.common.config.Property;
-
-public class GT_Config implements Runnable {
- public static boolean troll = F;
-
- public static Configuration sConfigFileIDs;
-
- public static int addIDConfig(Object aCategory, String aName, int aDefault) {
- if (GT_Utility.isStringInvalid(aName)) return aDefault;
- Property tProperty = sConfigFileIDs.get(aCategory.toString().replaceAll("\\|", "."), aName.replaceAll("\\|", "."), aDefault);
- int rResult = tProperty.getInt(aDefault);
- if (!tProperty.wasRead() && GregTech_API.sPostloadFinished) sConfigFileIDs.save();
- return rResult;
- }
-
- public final Configuration mConfig;
-
- public GT_Config(Configuration aConfig) {
- mConfig = aConfig;
- mConfig.load();
- mConfig.save();
- GregTech_API.sAfterGTPreload.add(this); // in case of crash on startup
- GregTech_API.sAfterGTLoad.add(this); // in case of crash on startup
- GregTech_API.sAfterGTPostload.add(this);
- }
-
- public static String getStackConfigName(ItemStack aStack) {
- if (GT_Utility.isStackInvalid(aStack)) return E;
- Object rName = GT_OreDictUnificator.getAssociation(aStack);
- if (rName != null) return rName.toString();
- try {if (GT_Utility.isStringValid(rName = aStack.getUnlocalizedName())) return rName.toString();} catch (Throwable e) {/*Do nothing*/}
- String sName = aStack.getItem().toString();
- String[] tmp = sName.split("@");
- if(tmp.length>0)sName=tmp[0];
- return sName + "." + aStack.getItemDamage();
- }
-
- public boolean get(Object aCategory, ItemStack aStack, boolean aDefault) {
- String aName = getStackConfigName(aStack);
- return get(aCategory, aName , aDefault);
- }
-
- public boolean get(Object aCategory, String aName, boolean aDefault) {
- if (GT_Utility.isStringInvalid(aName)) return aDefault;
- Property tProperty = mConfig.get(aCategory.toString().replaceAll("\\|", "_"), (aName+"_"+aDefault).replaceAll("\\|", "_"), aDefault);
- boolean rResult = tProperty.getBoolean(aDefault);
- if (!tProperty.wasRead() && GregTech_API.sPostloadFinished) mConfig.save();
- return rResult;
- }
-
- public int get(Object aCategory, ItemStack aStack, int aDefault) {
- return get(aCategory, getStackConfigName(aStack), aDefault);
- }
-
- public int get(Object aCategory, String aName, int aDefault) {
- if (GT_Utility.isStringInvalid(aName)) return aDefault;
- Property tProperty = mConfig.get(aCategory.toString().replaceAll("\\|", "_"), (aName+"_"+aDefault).replaceAll("\\|", "_"), aDefault);
- int rResult = tProperty.getInt(aDefault);
- if (!tProperty.wasRead() && GregTech_API.sPostloadFinished) mConfig.save();
- return rResult;
- }
-
- public double get(Object aCategory, ItemStack aStack, double aDefault) {
- return get(aCategory, getStackConfigName(aStack), aDefault);
- }
-
- public double get(Object aCategory, String aName, double aDefault) {
- if (GT_Utility.isStringInvalid(aName)) return aDefault;
- Property tProperty = mConfig.get(aCategory.toString().replaceAll("\\|", "_"), (aName+"_"+aDefault).replaceAll("\\|", "_"), aDefault);
- double rResult = tProperty.getDouble(aDefault);
- if (!tProperty.wasRead() && GregTech_API.sPostloadFinished) mConfig.save();
- return rResult;
- }
-
- @Override
- public void run() {
- mConfig.save();
- }
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/util/GT_CoverBehavior.java b/main/java/gregtech/api/util/GT_CoverBehavior.java
deleted file mode 100644
index cfc75f36b8..0000000000
--- a/main/java/gregtech/api/util/GT_CoverBehavior.java
+++ /dev/null
@@ -1,217 +0,0 @@
-package gregtech.api.util;
-
-import static gregtech.api.enums.GT_Values.E;
-import gregtech.api.interfaces.tileentity.ICoverable;
-import gregtech.api.objects.GT_ItemStack;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraftforge.fluids.Fluid;
-
-/**
- * For Covers with a special behavior.
- */
-public abstract class GT_CoverBehavior {
- /**
- * Called by updateEntity inside the covered TileEntity. aCoverVariable is the Value you returned last time.
- */
- public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) {
- return aCoverVariable;
- }
-
- /**
- * Called when someone rightclicks this Cover.
- *
- * return true, if something actually happens.
- */
- public boolean onCoverRightclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) {
- return false;
- }
-
- /**
- * Called when someone rightclicks this Cover Client Side
- *
- * return true, if something actually happens.
- */
- public boolean onCoverRightclickClient(byte aSide, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) {
- return false;
- }
-
- /**
- * Called when someone rightclicks this Cover with a Screwdriver. Doesn't call @onCoverRightclick in this Case.
- *
- * return the new Value of the Cover Variable
- */
- public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) {
- return aCoverVariable;
- }
-
- /**
- * Checks if the Cover can be placed on this.
- */
- public boolean isCoverPlaceable(byte aSide, GT_ItemStack aStack, ICoverable aTileEntity) {
- return true;
- }
-
- /**
- * Removes the Cover if this returns true, or if aForced is true.
- * Doesn't get called when the Machine Block is getting broken, only if you break the Cover away from the Machine.
- */
- public boolean onCoverRemoval(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, boolean aForced) {
- return true;
- }
-
- /**
- * Gives a small Text for the status of the Cover.
- */
- public String getDescription(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return E;
- }
-
- /**
- * How Blast Proof the Cover is. 30 is normal.
- */
- public float getBlastProofLevel(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return 10.0F;
- }
-
- /**
- * If it lets RS-Signals into the Block
- *
- * This is just Informative so that Machines know if their Redstone Input is blocked or not
- */
- public boolean letsRedstoneGoIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return false;
- }
-
- /**
- * If it lets RS-Signals out of the Block
- */
- public boolean letsRedstoneGoOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return false;
- }
-
- /**
- * If it lets Fibre-Signals into the Block
- *
- * This is just Informative so that Machines know if their Redstone Input is blocked or not
- */
- public boolean letsFibreGoIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return false;
- }
-
- /**
- * If it lets Fibre-Signals out of the Block
- */
- public boolean letsFibreGoOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return false;
- }
-
- /**
- * If it lets Energy into the Block
- */
- public boolean letsEnergyIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return false;
- }
-
- /**
- * If it lets Energy out of the Block
- */
- public boolean letsEnergyOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return false;
- }
-
- /**
- * If it lets Liquids into the Block, aFluid can be null meaning if this is generally allowing Fluids or not.
- */
- public boolean letsFluidIn(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) {
- return false;
- }
-
- /**
- * If it lets Liquids out of the Block, aFluid can be null meaning if this is generally allowing Fluids or not.
- */
- public boolean letsFluidOut(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) {
- return false;
- }
-
- /**
- * If it lets Items into the Block, aSlot = -1 means if it is generally accepting Items (return false for no Interaction at all), aSlot = -2 means if it would accept for all Slots (return true to skip the Checks for each Slot).
- */
- public boolean letsItemsIn(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) {
- return false;
- }
-
- /**
- * If it lets Items out of the Block, aSlot = -1 means if it is generally accepting Items (return false for no Interaction at all), aSlot = -2 means if it would accept for all Slots (return true to skip the Checks for each Slot).
- */
- public boolean letsItemsOut(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) {
- return false;
- }
-
- /**
- * If it lets you rightclick the Machine normally
- */
- public boolean isGUIClickable(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return false;
- }
-
- /**
- * Needs to return true for Covers, which have a Redstone Output on their Facing.
- */
- public boolean manipulatesSidedRedstoneOutput(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return false;
- }
-
- /**
- * if this Cover should let Pipe Connections look connected even if it is not the case.
- */
- public boolean alwaysLookConnected(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return false;
- }
-
- /**
- * Called to determine the incoming Redstone Signal of a Machine.
- * Returns the original Redstone per default.
- * The Cover should @letsRedstoneGoIn or the aInputRedstone Parameter is always 0.
- */
- public byte getRedstoneInput(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return letsRedstoneGoIn(aSide, aCoverID, aCoverVariable, aTileEntity)?aInputRedstone:0;
- }
-
- /**
- * Gets the Tick Rate for doCoverThings of the Cover
- *
- * 0 = No Ticks! Yes, 0 is Default, you have to override this
- */
- public int getTickRate(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return 0;
- }
-
- /**
- * If this is a simple Cover, which can also be used on Bronze Machines and similar.
- */
- public boolean isSimpleCover() {
- return false;
- }
-
- /**
- * The MC Color of this Lens. -1 for no Color (meaning this isn't a Lens then).
- */
- public byte getLensColor(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return -1;
- }
-
- /**
- * @return the ItemStack dropped by this Cover
- */
- public ItemStack getDrop(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return GT_OreDictUnificator.get(true, aTileEntity.getCoverItemAtSide(aSide));
- }
-
- /**
- * @return sets the Cover upon placement.
- */
- public void placeCover(byte aSide, ItemStack aCover, ICoverable aTileEntity) {
- aTileEntity.setCoverIDAtSide(aSide, GT_Utility.stackToInt(aCover));
- }
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/util/GT_CreativeTab.java b/main/java/gregtech/api/util/GT_CreativeTab.java
deleted file mode 100644
index d789fdc8a5..0000000000
--- a/main/java/gregtech/api/util/GT_CreativeTab.java
+++ /dev/null
@@ -1,24 +0,0 @@
-package gregtech.api.util;
-
-import gregtech.api.enums.ItemList;
-import net.minecraft.creativetab.CreativeTabs;
-import net.minecraft.init.Blocks;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-
-public class GT_CreativeTab extends CreativeTabs {
- public GT_CreativeTab(String aName, String aLocalName) {
- super("GregTech." + aName);
- GT_LanguageManager.addStringLocalization("itemGroup.GregTech." + aName, aLocalName);
- }
-
- @Override
- public ItemStack getIconItemStack() {
- return ItemList.Tool_Cheat.get(1, new ItemStack(Blocks.iron_block, 1));
- }
-
- @Override
- public Item getTabIconItem() {
- return ItemList.Circuit_Integrated.getItem();
- }
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/util/GT_FoodStat.java b/main/java/gregtech/api/util/GT_FoodStat.java
deleted file mode 100644
index a2134290cf..0000000000
--- a/main/java/gregtech/api/util/GT_FoodStat.java
+++ /dev/null
@@ -1,102 +0,0 @@
-package gregtech.api.util;
-
-import static gregtech.api.enums.GT_Values.F;
-import gregtech.api.damagesources.GT_DamageSources;
-import gregtech.api.interfaces.IFoodStat;
-import gregtech.api.items.GT_MetaBase_Item;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Items;
-import net.minecraft.item.EnumAction;
-import net.minecraft.item.ItemStack;
-import net.minecraft.potion.PotionEffect;
-
-public class GT_FoodStat implements IFoodStat {
- private final int mFoodLevel;
- private final int[] mPotionEffects;
- private final float mSaturation;
- private final EnumAction mAction;
- private final ItemStack mEmptyContainer;
- private final boolean mAlwaysEdible, mInvisibleParticles, mIsRotten;
- private boolean mExplosive = F, mMilk = F;
-
- /**
- * @param aFoodLevel Amount of Food in Half Bacon [0 - 20]
- * @param aSaturation Amount of Saturation [0.0F - 1.0F]
- * @param aAction The Action to be used. If this is null, it uses the Eating Action
- * @param aEmptyContainer An empty Container (Optional)
- * @param aAlwaysEdible If this Item is always edible, like Golden Apples or Potions
- * @param aInvisibleParticles If the Particles of the Potion Effects are invisible
- * @param aPotionEffects An Array of Potion Effects with %4==0 Elements as follows
- * ID of a Potion Effect. 0 for none
- * Duration of the Potion in Ticks
- * Level of the Effect. [0, 1, 2] are for [I, II, III]
- * The likelihood that this Potion Effect takes place upon being eaten [1 - 100]
- */
- public GT_FoodStat(int aFoodLevel, float aSaturation, EnumAction aAction, ItemStack aEmptyContainer, boolean aAlwaysEdible, boolean aInvisibleParticles, boolean aIsRotten, int... aPotionEffects) {
- mFoodLevel = aFoodLevel;
- mSaturation = aSaturation;
- mAction = aAction==null?EnumAction.eat:aAction;
- mPotionEffects = aPotionEffects;
- mEmptyContainer = GT_Utility.copy(aEmptyContainer);
- mInvisibleParticles = aInvisibleParticles;
- mAlwaysEdible = aAlwaysEdible;
- mIsRotten = aIsRotten;
- }
-
- public GT_FoodStat setExplosive() {
- mExplosive = true;
- return this;
- }
-
- public GT_FoodStat setMilk() {
- mMilk = true;
- return this;
- }
-
- @Override
- public int getFoodLevel(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer) {
- return mFoodLevel;
- }
-
- @Override
- public float getSaturation(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer) {
- return mSaturation;
- }
-
- @Override
- public void onEaten(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer) {
- aStack.stackSize--;
- ItemStack tStack = GT_OreDictUnificator.get(GT_Utility.copy(mEmptyContainer));
- if (tStack != null && !aPlayer.inventory.addItemStackToInventory(tStack)) aPlayer.dropPlayerItemWithRandomChoice(tStack, true);
- aPlayer.worldObj.playSoundAtEntity(aPlayer, "random.burp", 0.5F, aPlayer.worldObj.rand.nextFloat() * 0.1F + 0.9F);
- if (!aPlayer.worldObj.isRemote) {
- if (mMilk) {
- aPlayer.curePotionEffects(new ItemStack(Items.milk_bucket, 1, 0));
- }
- for (int i = 3; i < mPotionEffects.length; i+=4) {
- if (aPlayer.worldObj.rand.nextInt(100) < mPotionEffects[i]) {
- aPlayer.addPotionEffect(new PotionEffect(mPotionEffects[i-3], mPotionEffects[i-2], mPotionEffects[i-1], mInvisibleParticles));
- }
- }
- if (mExplosive) {
- aPlayer.worldObj.newExplosion(aPlayer, aPlayer.posX, aPlayer.posY, aPlayer.posZ, 4, true, true);
- aPlayer.attackEntityFrom(GT_DamageSources.getExplodingDamage(), Float.MAX_VALUE);
- }
- }
- }
-
- @Override
- public EnumAction getFoodAction(GT_MetaBase_Item aItem, ItemStack aStack) {
- return mAction;
- }
-
- @Override
- public boolean alwaysEdible(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer) {
- return mAlwaysEdible;
- }
-
- @Override
- public boolean isRotten(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer) {
- return mIsRotten;
- }
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/util/GT_IBoxableWrapper.java b/main/java/gregtech/api/util/GT_IBoxableWrapper.java
deleted file mode 100644
index 8511f76c49..0000000000
--- a/main/java/gregtech/api/util/GT_IBoxableWrapper.java
+++ /dev/null
@@ -1,12 +0,0 @@
-package gregtech.api.util;
-
-import static gregtech.api.enums.GT_Values.T;
-import ic2.api.item.IBoxable;
-import net.minecraft.item.ItemStack;
-
-public class GT_IBoxableWrapper implements IBoxable {
- @Override
- public boolean canBeStoredInToolbox(ItemStack itemstack) {
- return T;
- }
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/util/GT_ItsNotMyFaultException.java b/main/java/gregtech/api/util/GT_ItsNotMyFaultException.java
deleted file mode 100644
index 0c15970429..0000000000
--- a/main/java/gregtech/api/util/GT_ItsNotMyFaultException.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package gregtech.api.util;
-
-public class GT_ItsNotMyFaultException extends RuntimeException {
- private static final long serialVersionUID = -8752778866486460495L;
-
- private String mError;
-
- public GT_ItsNotMyFaultException(String aError) {
- mError = aError;
- }
-
- @Override
- public String toString() {
- return "The GregTech-Addon has a Problem.\nIT'S NOT MY FAULT!!! Below is how to fix it.\n" + mError + "\nDO NOT COME TO ME WITH THIS CRASH. YOU CAUSED IT YOURSELF, AND I TOLD YOU HOW TO FIX IT!!!";
- }
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/util/GT_LanguageManager.java b/main/java/gregtech/api/util/GT_LanguageManager.java
deleted file mode 100644
index b419b7100f..0000000000
--- a/main/java/gregtech/api/util/GT_LanguageManager.java
+++ /dev/null
@@ -1,95 +0,0 @@
-package gregtech.api.util;
-
-import static gregtech.api.enums.GT_Values.E;
-import gregtech.api.GregTech_API;
-
-import java.util.HashMap;
-import java.util.Map.Entry;
-
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.util.StatCollector;
-import net.minecraftforge.common.config.Configuration;
-import net.minecraftforge.common.config.Property;
-import cpw.mods.fml.common.registry.LanguageRegistry;
-
-public class GT_LanguageManager {
- public static Configuration sEnglishFile;
-
- public static final HashMap<String, String> TEMPMAP = new HashMap<String, String>(), BUFFERMAP = new HashMap<String, String>();
-
- public static String addStringLocalization(String aKey, String aEnglish) {
- return addStringLocalization(aKey, aEnglish, true);
- }
-
- public static String addStringLocalization(String aKey, String aEnglish, boolean aWriteIntoLangFile) {
- if (aKey == null) return E;
- if (aWriteIntoLangFile) aEnglish = writeToLangFile(aKey, aEnglish);
- TEMPMAP.put(aKey.trim(), aEnglish);
- LanguageRegistry.instance().injectLanguage("en_US", TEMPMAP);
- TEMPMAP.clear();
- return aEnglish;
- }
-
- private static synchronized String writeToLangFile(String aKey, String aEnglish) {
- if (aKey == null) return E;
- if (sEnglishFile == null) {
- BUFFERMAP.put(aKey.trim(), aEnglish);
- } else {
- if (!BUFFERMAP.isEmpty()) {
- for (Entry<String, String> tEntry : BUFFERMAP.entrySet()) {
- Property tProperty = sEnglishFile.get("LanguageFile", tEntry.getKey(), tEntry.getValue());
- if (!tProperty.wasRead() && GregTech_API.sPostloadFinished) sEnglishFile.save();
- }
- BUFFERMAP.clear();
- }
- Property tProperty = sEnglishFile.get("LanguageFile", aKey.trim(), aEnglish);
- if (!tProperty.wasRead() && GregTech_API.sPostloadFinished) sEnglishFile.save();
- if (sEnglishFile.get("EnableLangFile", "UseThisFileAsLanguageFile", false).getBoolean(false)) aEnglish = tProperty.getString();
- }
- return aEnglish;
- }
-
- public static String getTranslation(String aKey) {
- if (aKey == null) return E;
- String tTrimmedKey = aKey.trim(), rTranslation = LanguageRegistry.instance().getStringLocalization(tTrimmedKey);
- if (GT_Utility.isStringInvalid(rTranslation)) {
- rTranslation = StatCollector.translateToLocal(tTrimmedKey);
- if (GT_Utility.isStringInvalid(rTranslation) || tTrimmedKey.equals(rTranslation)) {
- if (aKey.endsWith(".name")) {
- rTranslation = StatCollector.translateToLocal(tTrimmedKey.substring(0, tTrimmedKey.length() - 5));
- if (GT_Utility.isStringInvalid(rTranslation) || tTrimmedKey.substring(0, tTrimmedKey.length() - 5).equals(rTranslation)) {
- return aKey;
- }
- } else {
- rTranslation = StatCollector.translateToLocal(tTrimmedKey + ".name");
- if (GT_Utility.isStringInvalid(rTranslation) || (tTrimmedKey + ".name").equals(rTranslation)) {
- return aKey;
- }
- }
- }
- }
- return rTranslation;
- }
-
- public static String getTranslation(String aKey, String aSeperator) {
- if (aKey == null) return E;
- String rTranslation = E;
- for (String tString : aKey.split(aSeperator)) {
- rTranslation += getTranslation(tString);
- }
- return rTranslation;
- }
-
- public static String getTranslateableItemStackName(ItemStack aStack) {
- if (GT_Utility.isStackInvalid(aStack)) return "null";
- NBTTagCompound tNBT = aStack.getTagCompound();
- if (tNBT != null && tNBT.hasKey("display")) {
- String tName = tNBT.getCompoundTag("display").getString("Name");
- if (GT_Utility.isStringValid(tName)) {
- return tName;
- }
- }
- return aStack.getUnlocalizedName() + ".name";
- }
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/util/GT_Log.java b/main/java/gregtech/api/util/GT_Log.java
deleted file mode 100644
index 06a009175c..0000000000
--- a/main/java/gregtech/api/util/GT_Log.java
+++ /dev/null
@@ -1,35 +0,0 @@
-package gregtech.api.util;
-
-import java.io.File;
-import java.io.OutputStream;
-import java.io.PrintStream;
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * NEVER INCLUDE THIS FILE IN YOUR MOD!!!
- *
- * Just a simple Logging Function. If on Server, then this will point to System.out and System.err
- */
-public class GT_Log {
- public static PrintStream out = System.out;
- public static PrintStream err = System.err;
- public static PrintStream ore = new LogBuffer();
- public static PrintStream pal = null;
- public static File mLogFile;
- public static File mOreDictLogFile;
- public static File mPlayerActivityLogFile;
-
- public static class LogBuffer extends PrintStream {
- public final List<String> mBufferedOreDictLog = new ArrayList<String>();
-
- public LogBuffer() {
- super(new OutputStream() {@Override public void write(int arg0) {/*Do nothing*/}});
- }
-
- @Override
- public void println(String aString) {
- mBufferedOreDictLog.add(aString);
- }
- }
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/util/GT_ModHandler.java b/main/java/gregtech/api/util/GT_ModHandler.java
deleted file mode 100644
index b657c8ee3f..0000000000
--- a/main/java/gregtech/api/util/GT_ModHandler.java
+++ /dev/null
@@ -1,1730 +0,0 @@
-package gregtech.api.util;
-
-import static gregtech.api.enums.GT_Values.*;
-import gregtech.api.GregTech_API;
-import gregtech.api.enums.*;
-import gregtech.api.interfaces.IDamagableItem;
-import gregtech.api.interfaces.IItemContainer;
-import gregtech.api.interfaces.internal.IGT_CraftingRecipe;
-import gregtech.api.objects.GT_HashSet;
-import gregtech.api.objects.GT_ItemStack;
-import gregtech.api.objects.ItemData;
-import ic2.api.item.IBoxable;
-import ic2.api.item.IC2Items;
-import ic2.api.item.IElectricItem;
-import ic2.api.reactor.IReactorComponent;
-import ic2.api.recipe.IRecipeInput;
-import ic2.api.recipe.RecipeInputItemStack;
-import ic2.api.recipe.RecipeOutput;
-import ic2.core.AdvRecipe;
-
-import java.util.*;
-import java.util.Map.Entry;
-
-import net.minecraft.block.Block;
-import net.minecraft.enchantment.Enchantment;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Blocks;
-import net.minecraft.init.Items;
-import net.minecraft.inventory.Container;
-import net.minecraft.inventory.InventoryCrafting;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemBlock;
-import net.minecraft.item.ItemStack;
-import net.minecraft.item.crafting.*;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.tileentity.TileEntityFurnace;
-import net.minecraft.world.World;
-import net.minecraftforge.fluids.FluidRegistry;
-import net.minecraftforge.fluids.FluidStack;
-import net.minecraftforge.oredict.OreDictionary;
-import net.minecraftforge.oredict.ShapedOreRecipe;
-import net.minecraftforge.oredict.ShapelessOreRecipe;
-import cpw.mods.fml.common.event.FMLInterModComms;
-import cpw.mods.fml.common.registry.GameRegistry;
-
-/**
- * NEVER INCLUDE THIS FILE IN YOUR MOD!!!
- *
- * This is the Interface I use for interacting with other Mods.
- *
- * Due to the many imports, this File can cause compile Problems if not all the APIs are installed
- */
-public class GT_ModHandler {
- public static volatile int VERSION = 508;
-
- /**
- * Returns if that Liquid is Water or Distilled Water
- */
- public static boolean isWater(FluidStack aFluid) {
- if (aFluid == null) return F;
- return aFluid.isFluidEqual(getWater(1)) || aFluid.isFluidEqual(getDistilledWater(1));
- }
-
- /**
- * Returns a Liquid Stack with given amount of Water.
- */
- public static FluidStack getWater(long aAmount) {
- return FluidRegistry.getFluidStack("water", (int)aAmount);
- }
-
- /**
- * Returns a Liquid Stack with given amount of distilled Water.
- */
- public static FluidStack getDistilledWater(long aAmount) {
- return FluidRegistry.getFluidStack("ic2distilledwater", (int)aAmount);
- }
-
- /**
- * Returns if that Liquid is Lava
- */
- public static boolean isLava(FluidStack aFluid) {
- if (aFluid == null) return F;
- return aFluid.isFluidEqual(getLava(1));
- }
-
- /**
- * Returns a Liquid Stack with given amount of Lava.
- */
- public static FluidStack getLava(long aAmount) {
- return FluidRegistry.getFluidStack("lava", (int)aAmount);
- }
-
- /**
- * Returns if that Liquid is Steam
- */
- public static boolean isSteam(FluidStack aFluid) {
- if (aFluid == null) return F;
- return aFluid.isFluidEqual(getSteam(1));
- }
-
- /**
- * Returns a Liquid Stack with given amount of Steam.
- */
- public static FluidStack getSteam(long aAmount) {
- return FluidRegistry.getFluidStack("steam", (int)aAmount);
- }
-
- /**
- * Returns if that Liquid is Milk
- */
- public static boolean isMilk(FluidStack aFluid) {
- if (aFluid == null) return F;
- return aFluid.isFluidEqual(getMilk(1));
- }
-
- /**
- * Returns a Liquid Stack with given amount of Milk.
- */
- public static FluidStack getMilk(long aAmount) {
- return FluidRegistry.getFluidStack("milk", (int)aAmount);
- }
-
- public static ItemStack getEmptyFuelCan(long aAmount) {
- return ItemList.IC2_Fuel_Can_Empty.get(aAmount);
- }
-
- public static ItemStack getEmptyCell(long aAmount) {
- return ItemList.Cell_Empty.get(aAmount);
- }
-
- public static ItemStack getAirCell(long aAmount) {
- return ItemList.Cell_Air.get(aAmount);
- }
-
- public static ItemStack getWaterCell(long aAmount) {
- return ItemList.Cell_Water.get(aAmount);
- }
-
- public static ItemStack getLavaCell(long aAmount) {
- return ItemList.Cell_Lava.get(aAmount);
- }
-
- /**
- * @param aValue the Value of this Stack, when burning inside a Furnace (200 = 1 Burn Process = 500 EU, max = 32767 (that is 81917.5 EU)), limited to Short because the vanilla Furnace otherwise can't handle it properly, stupid Mojang...
- */
- public static ItemStack setFuelValue(ItemStack aStack, short aValue) {
- aStack.setTagCompound(GT_Utility.getNBTContainingShort(aStack.getTagCompound(), "GT.ItemFuelValue", aValue));
- return aStack;
- }
-
- /**
- * @return the Value of this Stack, when burning inside a Furnace (200 = 1 Burn Process = 500 EU, max = 32767 (that is 81917.5 EU)), limited to Short because the vanilla Furnace otherwise can't handle it properly, stupid Mojang...
- */
- public static short getFuelValue(ItemStack aStack) {
- return (short)TileEntityFurnace.getItemBurnTime(aStack);
- }
-
- /**
- * @param aValue Fuel value in EU
- */
- public static ItemStack getFuelCan(int aValue) {
- if (aValue < 5) return ItemList.IC2_Fuel_Can_Empty.get(1);
- ItemStack rFuelCanStack = ItemList.IC2_Fuel_Can_Filled.get(1);
- if (rFuelCanStack == null) return null;
- NBTTagCompound tNBT = new NBTTagCompound();
- tNBT.setInteger("value", aValue/5);
- rFuelCanStack.setTagCompound(tNBT);
- return rFuelCanStack;
- }
-
- /**
- * @param aFuelCan the Item you want to check
- * @return the exact Value in EU the Fuel Can is worth if its even a Fuel Can.
- */
- public static int getFuelCanValue(ItemStack aFuelCan) {
- if (GT_Utility.isStackInvalid(aFuelCan) || !ItemList.IC2_Fuel_Can_Filled.isStackEqual(aFuelCan, F, T)) return 0;
- NBTTagCompound tNBT = aFuelCan.getTagCompound();
- return tNBT==null?0:tNBT.getInteger("value")*5;
- }
-
- private static final Map<String, ItemStack> sIC2ItemMap = new HashMap<String, ItemStack>();
-
- /**
- * Gets an Item from IndustrialCraft, and returns a Replacement Item if not possible
- */
- public static ItemStack getIC2Item(String aItem, long aAmount, ItemStack aReplacement) {
- if (GT_Utility.isStringInvalid(aItem) || !GregTech_API.sPreloadStarted) return null;
- //if (D1) GT_Log.out.println("Requested the Item '" + aItem + "' from the IC2-API");
- if (!sIC2ItemMap.containsKey(aItem)) try {ItemStack tStack = IC2Items.getItem(aItem); sIC2ItemMap.put(aItem, tStack); if (tStack == null && D1) GT_Log.err.println(aItem + " is not found in the IC2 Items!");} catch (Throwable e) {/*Do nothing*/}
- return GT_Utility.copyAmount(aAmount, sIC2ItemMap.get(aItem), aReplacement);
- }
-
- /**
- * Gets an Item from IndustrialCraft, but the Damage Value can be specified, and returns a Replacement Item with the same Damage if not possible
- */
- public static ItemStack getIC2Item(String aItem, long aAmount, int aMeta, ItemStack aReplacement) {
- ItemStack rStack = getIC2Item(aItem, aAmount, aReplacement);
- if (rStack == null) return null;
- Items.feather.setDamage(rStack, aMeta);
- return rStack;
- }
-
- /**
- * Gets an Item from IndustrialCraft, but the Damage Value can be specified
- */
- public static ItemStack getIC2Item(String aItem, long aAmount, int aMeta) {
- return getIC2Item(aItem, aAmount, aMeta, null);
- }
-
- /**
- * Gets an Item from IndustrialCraft
- */
- public static ItemStack getIC2Item(String aItem, long aAmount) {
- return getIC2Item(aItem, aAmount, null);
- }
-
- /**
- * Gets an Item from RailCraft
- */
- public static ItemStack getModItem(String aModID, String aItem, long aAmount) {
- return getModItem(aModID, aItem, aAmount, null);
- }
-
- /**
- * Gets an Item from RailCraft, and returns a Replacement Item if not possible
- */
- public static ItemStack getModItem(String aModID, String aItem, long aAmount, ItemStack aReplacement) {
- if (GT_Utility.isStringInvalid(aItem) || !GregTech_API.sPreloadStarted) return null;
- return GT_Utility.copyAmount(aAmount, GameRegistry.findItemStack(aModID, aItem, (int)aAmount), aReplacement);
- }
-
- /**
- * Gets an Item from RailCraft, but the Damage Value can be specified
- */
- public static ItemStack getModItem(String aModID, String aItem, long aAmount, int aMeta) {
- ItemStack rStack = getModItem(aModID, aItem, aAmount);
- if (rStack == null) return null;
- Items.feather.setDamage(rStack, aMeta);
- return rStack;
- }
-
- /**
- * Gets an Item from RailCraft, but the Damage Value can be specified, and returns a Replacement Item with the same Damage if not possible
- */
- public static ItemStack getModItem(String aModID, String aItem, long aAmount, int aMeta, ItemStack aReplacement) {
- ItemStack rStack = getModItem(aModID, aItem, aAmount, aReplacement);
- if (rStack == null) return null;
- Items.feather.setDamage(rStack, aMeta);
- return rStack;
- }
-
- /**
- * OUT OF ORDER
- */
- public static boolean getModeKeyDown(EntityPlayer aPlayer) {
- return F;
- }
-
- /**
- * OUT OF ORDER
- */
- public static boolean getBoostKeyDown(EntityPlayer aPlayer) {
- return F;
- }
-
- /**
- * OUT OF ORDER
- */
- public static boolean getJumpKeyDown(EntityPlayer aPlayer) {
- return F;
- }
-
- /**
- * Adds a Valuable Ore to the Miner
- */
- public static boolean addValuableOre(Block aBlock, int aMeta, int aValue) {
- if (aValue <= 0) return F;
- try {
- Class.forName("ic2.core.IC2").getMethod("addValuableOre", IRecipeInput.class, int.class).invoke(null, new RecipeInputItemStack(new ItemStack(aBlock, 1, aMeta)), aValue);
- } catch (Throwable e) {/*Do nothing*/}
- return T;
- }
-
- /**
- * Adds a Scrapbox Drop. Fails at April first for the "suddenly Hoes"-Feature of IC2
- */
- public static boolean addScrapboxDrop(float aChance, ItemStack aOutput) {
- aOutput = GT_OreDictUnificator.get(T, aOutput);
- if (aOutput == null || aChance <= 0) return F;
- aOutput.stackSize = 1;
- if (GT_Config.troll && !GT_Utility.areStacksEqual(aOutput, new ItemStack(Items.wooden_hoe, 1, 0))) return F;
- aChance = (float)GregTech_API.sRecipeFile.get(ConfigCategories.Machines.scrapboxdrops, aOutput, aChance);
- if (aChance <= 0) return F;
- try {
- GT_Utility.callMethod(GT_Utility.getFieldContent("ic2.api.recipe.Recipes", "scrapboxDrops", T, T), "addDrop", T, F, T, GT_Utility.copy(aOutput), aChance);
- GT_Utility.callMethod(GT_Utility.getFieldContent("ic2.api.recipe.Recipes", "scrapboxDrops", T, T), "addRecipe", T, T, F, GT_Utility.copy(aOutput), aChance);
- } catch (Throwable e) {/*Do nothing*/}
- return T;
- }
-
- /**
- * Adds an Item to the Recycler Blacklist
- */
- public static boolean addToRecyclerBlackList(ItemStack aRecycledStack) {
- if (aRecycledStack == null) return F;
- try {
- ic2.api.recipe.Recipes.recyclerBlacklist.add(new RecipeInputItemStack(aRecycledStack));
- } catch (Throwable e) {/*Do nothing*/}
- return T;
- }
-
- /**
- * Just simple Furnace smelting. Unbelievable how Minecraft fails at making a simple ItemStack->ItemStack mapping...
- */
- public static boolean addSmeltingRecipe(ItemStack aInput, ItemStack aOutput) {
- aOutput = GT_OreDictUnificator.get(T, aOutput);
- if (aInput == null || aOutput == null || GT_Utility.getContainerItem(aInput, F) != null) return F;
- if (!GregTech_API.sRecipeFile.get(ConfigCategories.Machines.smelting, aInput, T)) return F;
- FurnaceRecipes.smelting().func_151394_a(aInput, GT_Utility.copy(aOutput), 0.0F);
- return T;
- }
-
- /**
- * Adds to Furnace AND Alloysmelter AND Induction Smelter
- */
- public static boolean addSmeltingAndAlloySmeltingRecipe(ItemStack aInput, ItemStack aOutput) {
- if (aInput == null || aOutput == null) return F;
- boolean temp = F;
- if (aInput.stackSize == 1 && addSmeltingRecipe(aInput, aOutput)) temp = T;
- if (RA.addAlloySmelterRecipe(aInput, OrePrefixes.ingot.contains(aOutput)?ItemList.Shape_Mold_Ingot.get(0):OrePrefixes.block.contains(aOutput)?ItemList.Shape_Mold_Block.get(0):OrePrefixes.nugget.contains(aOutput)?ItemList.Shape_Mold_Nugget.get(0):null, aOutput, 130, 3)) temp = T;
- if (addInductionSmelterRecipe(aInput, null, aOutput, null, aOutput.stackSize*1600, 0)) temp = T;
- return temp;
- }
-
- /**
- * LiquidTransposer Recipe for both directions
- */
- public static boolean addLiquidTransposerRecipe(ItemStack aEmptyContainer, FluidStack aLiquid, ItemStack aFullContainer, int aMJ) {
- aFullContainer = GT_OreDictUnificator.get(T, aFullContainer);
- if (aEmptyContainer == null || aFullContainer == null || aLiquid == null) return F;
- if (!GregTech_API.sRecipeFile.get(ConfigCategories.Machines.liquidtransposer, aFullContainer, T)) return F;
- try {
- ThermalExpansion.addTransposerFill(aMJ*10, aEmptyContainer, aFullContainer, aLiquid, T);
- } catch(Throwable e) {/*Do nothing*/}
- return T;
- }
-
- /**
- * LiquidTransposer Recipe for filling Containers
- */
- public static boolean addLiquidTransposerFillRecipe(ItemStack aEmptyContainer, FluidStack aLiquid, ItemStack aFullContainer, int aMJ) {
- aFullContainer = GT_OreDictUnificator.get(T, aFullContainer);
- if (aEmptyContainer == null || aFullContainer == null || aLiquid == null) return F;
- if (!GregTech_API.sRecipeFile.get(ConfigCategories.Machines.liquidtransposerfilling, aFullContainer, T)) return F;
- try {
- ThermalExpansion.addTransposerFill(aMJ*10, aEmptyContainer, aFullContainer, aLiquid, F);
- } catch(Throwable e) {/*Do nothing*/}
- return T;
- }
-
- /**
- * LiquidTransposer Recipe for emptying Containers
- */
- public static boolean addLiquidTransposerEmptyRecipe(ItemStack aFullContainer, FluidStack aLiquid, ItemStack aEmptyContainer, int aMJ) {
- aEmptyContainer = GT_OreDictUnificator.get(T, aEmptyContainer);
- if (aFullContainer == null || aEmptyContainer == null || aLiquid == null) return F;
- if (!GregTech_API.sRecipeFile.get(ConfigCategories.Machines.liquidtransposeremptying, aFullContainer, T)) return F;
- try {
- ThermalExpansion.addTransposerExtract(aMJ*10, aFullContainer, aEmptyContainer, aLiquid, 100, F);
- } catch(Throwable e) {/*Do nothing*/}
- return T;
- }
-
- /**
- * IC2-Extractor Recipe. Overloads old Recipes automatically
- */
- public static boolean addExtractionRecipe(ItemStack aInput, ItemStack aOutput) {
- aOutput = GT_OreDictUnificator.get(T, aOutput);
- if (aInput == null || aOutput == null) return F;
- GT_Utility.removeSimpleIC2MachineRecipe(aInput, getExtractorRecipeList(), null);
- if (!GregTech_API.sRecipeFile.get(ConfigCategories.Machines.extractor, aInput, T)) return F;
- GT_Utility.addSimpleIC2MachineRecipe(aInput, getExtractorRecipeList(), null, aOutput);
- return T;
- }
-
- /**
- * RC-BlastFurnace Recipes
- */
- public static boolean addRCBlastFurnaceRecipe(ItemStack aInput, ItemStack aOutput, int aTime) {
- aOutput = GT_OreDictUnificator.get(T, aOutput);
- if (aInput == null || aOutput == null || aTime <= 0) return F;
- if (!GregTech_API.sRecipeFile.get(ConfigCategories.Machines.rcblastfurnace, aInput, T)) return F;
- aInput = GT_Utility.copy(aInput);
- aOutput = GT_Utility.copy(aOutput);
- try {
- mods.railcraft.api.crafting.RailcraftCraftingManager.blastFurnace.addRecipe(aInput, T, F, aTime, aOutput);
- } catch (Throwable e) {
- return F;
- }
- return T;
- }
-
- public static boolean addPulverisationRecipe(ItemStack aInput, ItemStack aOutput1) {
- return addPulverisationRecipe(aInput, aOutput1, null, 0, F);
- }
-
- public static boolean addPulverisationRecipe(ItemStack aInput, ItemStack aOutput1, ItemStack aOutput2) {
- return addPulverisationRecipe(aInput, aOutput1, aOutput2, 100, F);
- }
-
- public static boolean addPulverisationRecipe(ItemStack aInput, ItemStack aOutput1, ItemStack aOutput2, int aChance) {
- return addPulverisationRecipe(aInput, aOutput1, aOutput2, aChance, F);
- }
-
- public static boolean addPulverisationRecipe(ItemStack aInput, ItemStack aOutput1, boolean aOverwrite) {
- return addPulverisationRecipe(aInput, aOutput1, null, 0, aOverwrite);
- }
-
- public static boolean addPulverisationRecipe(ItemStack aInput, ItemStack aOutput1, ItemStack aOutput2, boolean aOverwrite) {
- return addPulverisationRecipe(aInput, aOutput1, aOutput2, 100, aOverwrite);
- }
-
- public static boolean addPulverisationRecipe(ItemStack aInput, ItemStack aOutput1, ItemStack aOutput2, int aChance, boolean aOverwrite) {
- return addPulverisationRecipe(aInput, aOutput1, aOutput2, aChance, null, 0, aOverwrite);
- }
-
- /**
- * Adds Several Pulverizer-Type Recipes.
- */
- public static boolean addPulverisationRecipe(ItemStack aInput, ItemStack aOutput1, ItemStack aOutput2, int aChance2, ItemStack aOutput3, int aChance3, boolean aOverwrite) {
- aOutput1 = GT_OreDictUnificator.get(T, aOutput1);
- aOutput2 = GT_OreDictUnificator.get(T, aOutput2);
- if (GT_Utility.isStackInvalid(aInput) || GT_Utility.isStackInvalid(aOutput1)) return F;
- GT_Utility.removeSimpleIC2MachineRecipe(aInput, getMaceratorRecipeList(), null);
-
- if (GT_Utility.getContainerItem(aInput, F) == null) {
- if (GregTech_API.sRecipeFile.get(ConfigCategories.Machines.maceration, aInput, T)) {
- GT_Utility.addSimpleIC2MachineRecipe(aInput, getMaceratorRecipeList(), null, aOutput1);
- }
-
- RA.addPulveriserRecipe(aInput, new ItemStack[] {aOutput1, aOutput2, aOutput3}, new int[] {10000, aChance2<=0?1000:100*aChance2, aChance3<=0?1000:100*aChance3}, 400, 2);
-
- if (!OrePrefixes.log.contains(aInput)) {
- if (Materials.Wood.contains(aOutput1)) {
- if (GregTech_API.sRecipeFile.get(ConfigCategories.Machines.pulverization, aInput, T)) {
- if (aOutput2 == null)
- ThermalExpansion.addSawmillRecipe(32000, GT_Utility.copy(aInput), GT_Utility.copy(aOutput1));
- else
- ThermalExpansion.addSawmillRecipe(32000, GT_Utility.copy(aInput), GT_Utility.copy(aOutput1), GT_Utility.copy(aOutput2), aChance2<=0?10:aChance2);
- }
- } else {
- if (GregTech_API.sRecipeFile.get(ConfigCategories.Machines.rockcrushing, aInput, T)) {
- try {
- if (GT_Utility.getBlockFromStack(aInput) != Blocks.obsidian && GT_Utility.getBlockFromStack(aInput) != Blocks.gravel) {
- mods.railcraft.api.crafting.IRockCrusherRecipe tRecipe = mods.railcraft.api.crafting.RailcraftCraftingManager.rockCrusher.createNewRecipe(GT_Utility.copyAmount(1, aInput), aInput.getItemDamage() != W, F);
- tRecipe.addOutput(GT_Utility.copy(aOutput1), 1.0F/aInput.stackSize);
- if (aOutput2 != null) tRecipe.addOutput(GT_Utility.copy(aOutput2), (0.01F*(aChance2<=0?10:aChance2))/aInput.stackSize);
- if (aOutput3 != null) tRecipe.addOutput(GT_Utility.copy(aOutput3), (0.01F*(aChance3<=0?10:aChance3))/aInput.stackSize);
- }
- } catch(Throwable e) {/*Do nothing*/}
- }
- if (GregTech_API.sRecipeFile.get(ConfigCategories.Machines.pulverization, aInput, T)) {
- if (aOutput2 == null)
- ThermalExpansion.addPulverizerRecipe(32000, GT_Utility.copy(aInput), GT_Utility.copy(aOutput1));
- else
- ThermalExpansion.addPulverizerRecipe(32000, GT_Utility.copy(aInput), GT_Utility.copy(aOutput1), GT_Utility.copy(aOutput2), aChance2<=0?10:aChance2);
- }
- }
- }
- }
- return T;
- }
-
- /**
- * Adds a Recipe to the Sawmills of GregTech and ThermalCraft
- */
- public static boolean addSawmillRecipe(ItemStack aInput1, ItemStack aOutput1, ItemStack aOutput2) {
- aOutput1 = GT_OreDictUnificator.get(T, aOutput1);
- aOutput2 = GT_OreDictUnificator.get(T, aOutput2);
- if (aInput1 == null || aOutput1 == null) return F;
- if (!GregTech_API.sRecipeFile.get(ConfigCategories.Machines.sawmill, aInput1, T)) return F;
- try {
- ThermalExpansion.addSawmillRecipe(1600, aInput1, aOutput1, aOutput2, 100);
- } catch(Throwable e) {/*Do nothing*/}
- return T;
- }
-
- /**
- * Induction Smelter Recipes and Alloy Smelter Recipes
- */
- public static boolean addAlloySmelterRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput1, int aDuration, int aEUt, boolean aAllowSecondaryInputEmpty) {
- if (aInput1 == null || (aInput2 == null && !aAllowSecondaryInputEmpty) || aOutput1 == null) return F;
- aOutput1 = GT_OreDictUnificator.get(T, aOutput1);
- boolean temp = F;
- if (RA.addAlloySmelterRecipe(aInput1, aInput2, aOutput1, aDuration, aEUt)) temp = T;
- if (addInductionSmelterRecipe(aInput1, aInput2, aOutput1, null, aDuration * aEUt * 2, 0)) temp = T;
- return temp;
- }
-
- /**
- * Induction Smelter Recipes for TE
- */
- public static boolean addInductionSmelterRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput1, ItemStack aOutput2, int aEnergy, int aChance) {
- aOutput1 = GT_OreDictUnificator.get(T, aOutput1);
- aOutput2 = GT_OreDictUnificator.get(T, aOutput2);
- if (aInput1 == null || aOutput1 == null || GT_Utility.getContainerItem(aInput1, F) != null) return F;
- if (!GregTech_API.sRecipeFile.get(ConfigCategories.Machines.inductionsmelter, aInput2==null?aInput1:aOutput1, T)) return F;
- try {
- ThermalExpansion.addSmelterRecipe(aEnergy*10, GT_Utility.copy(aInput1), aInput2==null?new ItemStack(Blocks.sand, 1, 0):aInput2, aOutput1, aOutput2, aChance);
- } catch(Throwable e) {/*Do nothing*/}
- return T;
- }
-
- /**
- * Smelts Ores to Ingots
- */
- public static boolean addOreToIngotSmeltingRecipe(ItemStack aInput, ItemStack aOutput) {
- aOutput = GT_OreDictUnificator.get(T, aOutput);
- if (aInput == null || aOutput == null) return F;
- FurnaceRecipes.smelting().func_151394_a(aInput, GT_Utility.copy(aOutput), 0.0F);
- return T;
- }
-
- private static Map<IRecipeInput, RecipeOutput> sExtractorRecipes = new HashMap<IRecipeInput, RecipeOutput>();
- private static Map<IRecipeInput, RecipeOutput> sMaceratorRecipes = new HashMap<IRecipeInput, RecipeOutput>();
- private static Map<IRecipeInput, RecipeOutput> sCompressorRecipes = new HashMap<IRecipeInput, RecipeOutput>();
- private static Map<IRecipeInput, RecipeOutput> sOreWashingRecipes = new HashMap<IRecipeInput, RecipeOutput>();
- private static Map<IRecipeInput, RecipeOutput> sThermalCentrifugeRecipes = new HashMap<IRecipeInput, RecipeOutput>();
- private static Map<IRecipeInput, RecipeOutput> sMassfabRecipes = new HashMap<IRecipeInput, RecipeOutput>();
-
- public static Map<IRecipeInput, RecipeOutput> getExtractorRecipeList() {
- try {
- return ic2.api.recipe.Recipes.extractor.getRecipes();
- } catch(Throwable e) {/*Do nothing*/}
- return sExtractorRecipes;
- }
-
- public static Map<IRecipeInput, RecipeOutput> getCompressorRecipeList() {
- try {
- return ic2.api.recipe.Recipes.compressor.getRecipes();
- } catch(Throwable e) {/*Do nothing*/}
- return sCompressorRecipes;
- }
-
- public static Map<IRecipeInput, RecipeOutput> getMaceratorRecipeList() {
- try {
- return ic2.api.recipe.Recipes.macerator.getRecipes();
- } catch(Throwable e) {/*Do nothing*/}
- return sMaceratorRecipes;
- }
-
- public static Map<IRecipeInput, RecipeOutput> getThermalCentrifugeRecipeList() {
- try {
- return ic2.api.recipe.Recipes.centrifuge.getRecipes();
- } catch(Throwable e) {/*Do nothing*/}
- return sThermalCentrifugeRecipes;
- }
-
- public static Map<IRecipeInput, RecipeOutput> getOreWashingRecipeList() {
- try {
- return ic2.api.recipe.Recipes.oreWashing.getRecipes();
- } catch(Throwable e) {/*Do nothing*/}
- return sOreWashingRecipes;
- }
-
- public static Map<IRecipeInput, RecipeOutput> getMassFabricatorList() {
- try {
- return ic2.api.recipe.Recipes.matterAmplifier.getRecipes();
- } catch(Throwable e) {/*Do nothing*/}
- return sMassfabRecipes;
- }
-
- /**
- * IC2-ThermalCentrifuge Recipe. Overloads old Recipes automatically
- */
- public static boolean addThermalCentrifugeRecipe(ItemStack aInput, int aHeat, Object... aOutput) {
- if (aInput == null || aOutput == null || aOutput.length <= 0 || aOutput[0] == null) return F;
- GT_Utility.removeSimpleIC2MachineRecipe(aInput, getThermalCentrifugeRecipeList(), null);
- if (!GregTech_API.sRecipeFile.get(ConfigCategories.Machines.thermalcentrifuge, aInput, T)) return F;
- NBTTagCompound tNBT = new NBTTagCompound();
- tNBT.setInteger("minHeat", aHeat);
- GT_Utility.addSimpleIC2MachineRecipe(aInput, getThermalCentrifugeRecipeList(), tNBT, aOutput);
- return T;
- }
-
- /**
- * IC2-OreWasher Recipe. Overloads old Recipes automatically
- */
- public static boolean addOreWasherRecipe(ItemStack aInput, int aWaterAmount, Object... aOutput) {
- if (aInput == null || aOutput == null || aOutput.length <= 0 || aOutput[0] == null) return F;
- GT_Utility.removeSimpleIC2MachineRecipe(aInput, getOreWashingRecipeList(), null);
- if (!GregTech_API.sRecipeFile.get(ConfigCategories.Machines.orewashing, aInput, T)) return F;
- NBTTagCompound tNBT = new NBTTagCompound();
- tNBT.setInteger("amount", aWaterAmount);
- GT_Utility.addSimpleIC2MachineRecipe(aInput, getOreWashingRecipeList(), tNBT, aOutput);
- return T;
- }
-
- /**
- * IC2-Compressor Recipe. Overloads old Recipes automatically
- */
- public static boolean addCompressionRecipe(ItemStack aInput, ItemStack aOutput) {
- aOutput = GT_OreDictUnificator.get(T, aOutput);
- if (aInput == null || aOutput == null) return F;
- GT_Utility.removeSimpleIC2MachineRecipe(aInput, getCompressorRecipeList(), null);
- if (!GregTech_API.sRecipeFile.get(ConfigCategories.Machines.compression, aInput, T)) return F;
- GT_Utility.addSimpleIC2MachineRecipe(aInput, getCompressorRecipeList(), null, aOutput);
- return T;
- }
-
- /**
- * @param aValue Scrap = 5000, Scrapbox = 45000, Diamond Dust 125000
- */
- public static boolean addIC2MatterAmplifier(ItemStack aAmplifier, int aValue) {
- if (aAmplifier == null || aValue <= 0) return F;
- if (!GregTech_API.sRecipeFile.get(ConfigCategories.Machines.massfabamplifier, aAmplifier, T)) return F;
- try {
- NBTTagCompound tNBT = new NBTTagCompound();
- tNBT.setInteger("amplification", aValue);
- GT_Utility.callMethod(ic2.api.recipe.Recipes.matterAmplifier, "addRecipe", F, F, F, aAmplifier, tNBT);
- } catch(Throwable e) {/*Do nothing*/}
- return T;
- }
-
- /**
- * Rolling Machine Crafting Recipe
- */
- public static boolean addRollingMachineRecipe(ItemStack aResult, Object[] aRecipe) {
- aResult = GT_OreDictUnificator.get(T, aResult);
- if (aResult == null || aRecipe == null || aResult.stackSize <= 0) return F;
- try {
- mods.railcraft.api.crafting.RailcraftCraftingManager.rollingMachine.getRecipeList().add(new ShapedOreRecipe(GT_Utility.copy(aResult), aRecipe));
- } catch(Throwable e) {
- return addCraftingRecipe(GT_Utility.copy(aResult), aRecipe);
- }
- return T;
- }
-
- private static boolean sBufferCraftingRecipes = T;
- private static final List<IRecipe> sAllRecipeList = Collections.synchronizedList(new ArrayList<IRecipe>(5000)), sBufferRecipeList = new ArrayList<IRecipe>(1000);
- public static final List<IRecipe> sSingleNonBlockDamagableRecipeList = new ArrayList<IRecipe>(1000);
-
- public static void stopBufferingCraftingRecipes() {
- sBufferCraftingRecipes = F;
- for (IRecipe tRecipe : sBufferRecipeList) GameRegistry.addRecipe(tRecipe);
- sBufferRecipeList.clear();
- }
-
- public static class RecipeBits {
- /** Mirrors the Recipe */
- public static long MIRRORED = B[0];
- /** Buffers the Recipe for later addition. This makes things more efficient. */
- public static long BUFFERED = B[1];
- /** This is a special Tag I used for crafting Coins up and down. */
- public static long KEEPNBT = B[2];
- /** Makes the Recipe Reverse Craftable in the Disassembler. */
- public static long DISMANTLEABLE = B[3];
- /** Prevents the Recipe from accidentally getting removed by my own Handlers. */
- public static long NOT_REMOVABLE = B[4];
- /** Reverses the Output of the Recipe for smelting and pulverising. */
- public static long REVERSIBLE = B[5];
- /** Removes all Recipes with the same Output Item regardless of NBT, unless another Recipe Deletion Bit is added too. */
- public static long DELETE_ALL_OTHER_RECIPES = B[6];
- /** Removes all Recipes with the same Output Item limited to the same NBT. */
- public static long DELETE_ALL_OTHER_RECIPES_IF_SAME_NBT = B[7];
- /** Removes all Recipes with the same Output Item limited to Shaped Recipes. */
- public static long DELETE_ALL_OTHER_SHAPED_RECIPES = B[8];
- /** Removes all Recipes with the same Output Item limited to native Recipe Handlers. */
- public static long DELETE_ALL_OTHER_NATIVE_RECIPES = B[9];
- /** Disables the check for colliding Recipes. */
- public static long DO_NOT_CHECK_FOR_COLLISIONS = B[10];
- /** Only adds the Recipe if there is another Recipe having that Output */
- public static long ONLY_ADD_IF_THERE_IS_ANOTHER_RECIPE_FOR_IT = B[11];
- /** Only adds the Recipe if it has an Output */
- public static long ONLY_ADD_IF_RESULT_IS_NOT_NULL = B[12];
- }
-
- /**
- * Shapeless Crafting Recipes. Deletes conflicting Recipes too.
- */
- public static boolean addCraftingRecipe(ItemStack aResult, Enchantment[] aEnchantmentsAdded, int[] aEnchantmentLevelsAdded, Object[] aRecipe) {
- return addCraftingRecipe(aResult, aEnchantmentsAdded, aEnchantmentLevelsAdded, F, T, F, F, F, F, F, F, F, F, F, F, T, aRecipe);
- }
-
- /**
- * Regular Crafting Recipes. Deletes conflicting Recipes too.
- *
- * You can insert instances of IItemContainer into the Recipe Input Array directly without having to call "get(1)" on them.
- *
- * Enums are automatically getting their "name()"-Method called in order to deliver an OreDict String.
- *
- * Lowercase Letters are reserved for Tools. They are as follows:
- *
- * 'b' ToolDictNames.craftingToolBlade
- * 'c' ToolDictNames.craftingToolCrowbar,
- * 'd' ToolDictNames.craftingToolScrewdriver,
- * 'f' ToolDictNames.craftingToolFile,
- * 'h' ToolDictNames.craftingToolHardHammer,
- * 'i' ToolDictNames.craftingToolSolderingIron,
- * 'j' ToolDictNames.craftingToolSolderingMetal,
- * 'k' ToolDictNames.craftingToolKnive
- * 'm' ToolDictNames.craftingToolMortar,
- * 'p' ToolDictNames.craftingToolDrawplate,
- * 'r' ToolDictNames.craftingToolSoftHammer,
- * 's' ToolDictNames.craftingToolSaw,
- * 'w' ToolDictNames.craftingToolWrench,
- * 'x' ToolDictNames.craftingToolWireCutter,
- */
- public static boolean addCraftingRecipe(ItemStack aResult, Object[] aRecipe) {
- return addCraftingRecipe(aResult, 0, aRecipe);
- }
-
- /**
- * Regular Crafting Recipes. Deletes conflicting Recipes too.
- *
- * You can insert instances of IItemContainer into the Recipe Input Array directly without having to call "get(1)" on them.
- *
- * Enums are automatically getting their "name()"-Method called in order to deliver an OreDict String.
- *
- * Lowercase Letters are reserved for Tools. They are as follows:
- *
- * 'b' ToolDictNames.craftingToolBlade
- * 'c' ToolDictNames.craftingToolCrowbar,
- * 'd' ToolDictNames.craftingToolScrewdriver,
- * 'f' ToolDictNames.craftingToolFile,
- * 'h' ToolDictNames.craftingToolHardHammer,
- * 'i' ToolDictNames.craftingToolSolderingIron,
- * 'j' ToolDictNames.craftingToolSolderingMetal,
- * 'k' ToolDictNames.craftingToolKnive
- * 'm' ToolDictNames.craftingToolMortar,
- * 'p' ToolDictNames.craftingToolDrawplate,
- * 'r' ToolDictNames.craftingToolSoftHammer,
- * 's' ToolDictNames.craftingToolSaw,
- * 'w' ToolDictNames.craftingToolWrench,
- * 'x' ToolDictNames.craftingToolWireCutter,
- */
- public static boolean addCraftingRecipe(ItemStack aResult, long aBitMask, Object[] aRecipe) {
- return addCraftingRecipe(aResult, new Enchantment[0], new int[0], (aBitMask & RecipeBits.MIRRORED) != 0, (aBitMask & RecipeBits.BUFFERED) != 0, (aBitMask & RecipeBits.KEEPNBT) != 0, (aBitMask & RecipeBits.DISMANTLEABLE) != 0, (aBitMask & RecipeBits.NOT_REMOVABLE) == 0, (aBitMask & RecipeBits.REVERSIBLE) != 0, (aBitMask & RecipeBits.DELETE_ALL_OTHER_RECIPES) != 0, (aBitMask & RecipeBits.DELETE_ALL_OTHER_RECIPES_IF_SAME_NBT) != 0, (aBitMask & RecipeBits.DELETE_ALL_OTHER_SHAPED_RECIPES) != 0, (aBitMask & RecipeBits.DELETE_ALL_OTHER_NATIVE_RECIPES) != 0, (aBitMask & RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS) == 0, (aBitMask & RecipeBits.ONLY_ADD_IF_THERE_IS_ANOTHER_RECIPE_FOR_IT) != 0, (aBitMask & RecipeBits.ONLY_ADD_IF_RESULT_IS_NOT_NULL) != 0, aRecipe);
- }
-
- /**
- * Internal realisation of the Crafting Recipe adding Process.
- */
- private static boolean addCraftingRecipe(ItemStack aResult, Enchantment[] aEnchantmentsAdded, int[] aEnchantmentLevelsAdded, boolean aMirrored, boolean aBuffered, boolean aKeepNBT, boolean aDismantleable, boolean aRemovable, boolean aReversible, boolean aRemoveAllOthersWithSameOutput, boolean aRemoveAllOthersWithSameOutputIfTheyHaveSameNBT, boolean aRemoveAllOtherShapedsWithSameOutput, boolean aRemoveAllOtherNativeRecipes, boolean aCheckForCollisions, boolean aOnlyAddIfThereIsAnyRecipeOutputtingThis, boolean aOnlyAddIfResultIsNotNull, Object[] aRecipe) {
- aResult = GT_OreDictUnificator.get(T, aResult);
- if (aOnlyAddIfResultIsNotNull && aResult == null) return F;
- if (aResult != null && Items.feather.getDamage(aResult) == W) Items.feather.setDamage(aResult, 0);
- if (aRecipe == null || aRecipe.length <= 0) return F;
-
- boolean tThereWasARecipe = F;
-
- for (byte i = 0; i < aRecipe.length; i++) {
- if (aRecipe[i] instanceof IItemContainer)
- aRecipe[i] = ((IItemContainer)aRecipe[i]).get(1);
- else if (aRecipe[i] instanceof Enum)
- aRecipe[i] = ((Enum)aRecipe[i]).name();
- else if (!(aRecipe[i] == null || aRecipe[i] instanceof ItemStack || aRecipe[i] instanceof ItemData || aRecipe[i] instanceof String || aRecipe[i] instanceof Character))
- aRecipe[i] = aRecipe[i].toString();
- }
-
- try {
- String shape = E;
- int idx = 0;
- if (aRecipe[idx] instanceof Boolean) {
- throw new IllegalArgumentException();
- }
-
- ArrayList<Object> tRecipeList = new ArrayList<Object>(Arrays.asList(aRecipe));
-
- while (aRecipe[idx] instanceof String) {
- String s = (String)aRecipe[idx++];
- shape += s;
- while (s.length() < 3) s+=" ";
- if (s.length() > 3) throw new IllegalArgumentException();
-
- for (char c : s.toCharArray()) {
- switch(c) {
- case 'b': tRecipeList.add(c); tRecipeList.add(ToolDictNames.craftingToolBlade .name()); break;
- case 'c': tRecipeList.add(c); tRecipeList.add(ToolDictNames.craftingToolCrowbar .name()); break;
- case 'd': tRecipeList.add(c); tRecipeList.add(ToolDictNames.craftingToolScrewdriver .name()); break;
- case 'f': tRecipeList.add(c); tRecipeList.add(ToolDictNames.craftingToolFile .name()); break;
- case 'h': tRecipeList.add(c); tRecipeList.add(ToolDictNames.craftingToolHardHammer .name()); break;
- case 'i': tRecipeList.add(c); tRecipeList.add(ToolDictNames.craftingToolSolderingIron .name()); break;
- case 'j': tRecipeList.add(c); tRecipeList.add(ToolDictNames.craftingToolSolderingMetal .name()); break;
- case 'k': tRecipeList.add(c); tRecipeList.add(ToolDictNames.craftingToolKnife .name()); break;
- case 'm': tRecipeList.add(c); tRecipeList.add(ToolDictNames.craftingToolMortar .name()); break;
- case 'p': tRecipeList.add(c); tRecipeList.add(ToolDictNames.craftingToolDrawplate .name()); break;
- case 'r': tRecipeList.add(c); tRecipeList.add(ToolDictNames.craftingToolSoftHammer .name()); break;
- case 's': tRecipeList.add(c); tRecipeList.add(ToolDictNames.craftingToolSaw .name()); break;
- case 'w': tRecipeList.add(c); tRecipeList.add(ToolDictNames.craftingToolWrench .name()); break;
- case 'x': tRecipeList.add(c); tRecipeList.add(ToolDictNames.craftingToolWireCutter .name()); break;
- }
- }
- }
-
- aRecipe = tRecipeList.toArray();
-
- if (aRecipe[idx] instanceof Boolean) {
- idx++;
- }
- HashMap<Character, ItemStack> tItemStackMap = new HashMap<Character, ItemStack>();
- HashMap<Character, ItemData> tItemDataMap = new HashMap<Character, ItemData>();
- tItemStackMap.put(' ', null);
-
- boolean tRemoveRecipe = T;
-
- for (; idx < aRecipe.length; idx += 2) {
- if (aRecipe[idx] == null || aRecipe[idx + 1] == null) {
- if (D1) {
- GT_Log.err.println("WARNING: Missing Item for shaped Recipe: " + (aResult==null?"null":aResult.getDisplayName()));
- for (Object tContent : aRecipe) GT_Log.err.println(tContent);
- }
- return F;
- }
- Character chr = (Character)aRecipe[idx];
- Object in = aRecipe[idx + 1];
- if (in instanceof ItemStack) {
- tItemStackMap.put(chr, GT_Utility.copy((ItemStack)in));
- tItemDataMap.put(chr, GT_OreDictUnificator.getItemData((ItemStack)in));
- } else if (in instanceof ItemData) {
- String tString = in.toString();
- if (tString.equals("plankWood")) {
- tItemDataMap.put(chr, new ItemData(Materials.Wood, M));
- } else if (tString.equals("stoneNetherrack")) {
- tItemDataMap.put(chr, new ItemData(Materials.Netherrack, M));
- } else if (tString.equals("stoneObsidian")) {
- tItemDataMap.put(chr, new ItemData(Materials.Obsidian, M));
- } else if (tString.equals("stoneEndstone")) {
- tItemDataMap.put(chr, new ItemData(Materials.Endstone, M));
- } else {
- tItemDataMap.put(chr, (ItemData)in);
- }
- ItemStack tStack = GT_OreDictUnificator.getFirstOre(in, 1);
- if (tStack == null) tRemoveRecipe = F; else tItemStackMap.put(chr, tStack);
- in = aRecipe[idx + 1] = in.toString();
- } else if (in instanceof String) {
- if (in.equals(OreDictNames.craftingChest .toString())) tItemDataMap.put(chr, new ItemData(Materials.Wood, M * 8));
- else if (in.equals(OreDictNames.craftingBook .toString())) tItemDataMap.put(chr, new ItemData(Materials.Paper, M * 3));
- else if (in.equals(OreDictNames.craftingPiston .toString())) tItemDataMap.put(chr, new ItemData(Materials.Stone, M * 4, Materials.Wood, M * 3));
- else if (in.equals(OreDictNames.craftingFurnace .toString())) tItemDataMap.put(chr, new ItemData(Materials.Stone, M * 8));
- else if (in.equals(OreDictNames.craftingIndustrialDiamond .toString())) tItemDataMap.put(chr, new ItemData(Materials.Diamond, M));
- else if (in.equals(OreDictNames.craftingAnvil .toString())) tItemDataMap.put(chr, new ItemData(Materials.Iron, M * 10));
- ItemStack tStack = GT_OreDictUnificator.getFirstOre(in, 1);
- if (tStack == null) tRemoveRecipe = F; else tItemStackMap.put(chr, tStack);
- } else {
- throw new IllegalArgumentException();
- }
- }
-
- if (aReversible && aResult != null) {
- ItemData[] tData = new ItemData[9];
- int x = -1;
- for (char chr : shape.toCharArray()) tData[++x] = tItemDataMap.get(chr);
- if (GT_Utility.arrayContainsNonNull(tData)) GT_OreDictUnificator.addItemData(aResult, new ItemData(tData));
- }
-
- if (aCheckForCollisions && tRemoveRecipe) {
- ItemStack[] tRecipe = new ItemStack[9];
- int x = -1;
- for (char chr : shape.toCharArray()) {
- tRecipe[++x] = tItemStackMap.get(chr);
- if (tRecipe[x] != null && Items.feather.getDamage(tRecipe[x]) == W) Items.feather.setDamage(tRecipe[x], 0);
- }
- tThereWasARecipe = removeRecipe(tRecipe) != null || tThereWasARecipe;
- }
- } catch(Throwable e) {e.printStackTrace(GT_Log.err);}
-
- if (aResult == null || aResult.stackSize <= 0) return F;
-
- if (aRemoveAllOthersWithSameOutput || aRemoveAllOthersWithSameOutputIfTheyHaveSameNBT || aRemoveAllOtherShapedsWithSameOutput || aRemoveAllOtherNativeRecipes)
- tThereWasARecipe = removeRecipeByOutput(aResult, !aRemoveAllOthersWithSameOutputIfTheyHaveSameNBT, aRemoveAllOtherShapedsWithSameOutput, aRemoveAllOtherNativeRecipes) || tThereWasARecipe;
-
- if (aOnlyAddIfThereIsAnyRecipeOutputtingThis && !tThereWasARecipe) {
- ArrayList<IRecipe> tList = (ArrayList<IRecipe>)CraftingManager.getInstance().getRecipeList();
- for (int i = 0; i < tList.size() && !tThereWasARecipe; i++) {
- IRecipe tRecipe = tList.get(i);
- if (sSpecialRecipeClasses.contains(tRecipe.getClass().getName())) continue;
- if (GT_Utility.areStacksEqual(GT_OreDictUnificator.get(tRecipe.getRecipeOutput()), aResult, T)) {
- tList.remove(i--);
- tThereWasARecipe = T;
- }
- }
- }
-
- if (Items.feather.getDamage(aResult) == W || Items.feather.getDamage(aResult) < 0) Items.feather.setDamage(aResult, 0);
-
- GT_Utility.updateItemStack(aResult);
-
- if (tThereWasARecipe || !aOnlyAddIfThereIsAnyRecipeOutputtingThis) {
- if (sBufferCraftingRecipes && aBuffered)
- sBufferRecipeList.add(new GT_Shaped_Recipe(GT_Utility.copy(aResult), aDismantleable, aRemovable, aKeepNBT, aEnchantmentsAdded, aEnchantmentLevelsAdded, aRecipe).setMirrored(aMirrored));
- else
- GameRegistry.addRecipe(new GT_Shaped_Recipe(GT_Utility.copy(aResult), aDismantleable, aRemovable, aKeepNBT, aEnchantmentsAdded, aEnchantmentLevelsAdded, aRecipe).setMirrored(aMirrored));
- }
- return T;
- }
-
- /**
- * Shapeless Crafting Recipes. Deletes conflicting Recipes too.
- */
- public static boolean addShapelessEnchantingRecipe(ItemStack aResult, Enchantment[] aEnchantmentsAdded, int[] aEnchantmentLevelsAdded, Object[] aRecipe) {
- return addShapelessCraftingRecipe(aResult, aEnchantmentsAdded, aEnchantmentLevelsAdded, T, F, F, F, aRecipe);
- }
-
- /**
- * Shapeless Crafting Recipes. Deletes conflicting Recipes too.
- */
- public static boolean addShapelessCraftingRecipe(ItemStack aResult, Object[] aRecipe) {
- return addShapelessCraftingRecipe(aResult, RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | RecipeBits.BUFFERED, aRecipe);
- }
-
- /**
- * Shapeless Crafting Recipes. Deletes conflicting Recipes too.
- */
- public static boolean addShapelessCraftingRecipe(ItemStack aResult, long aBitMask, Object[] aRecipe) {
- return addShapelessCraftingRecipe(aResult, new Enchantment[0], new int[0], (aBitMask & RecipeBits.BUFFERED) != 0, (aBitMask & RecipeBits.KEEPNBT) != 0, (aBitMask & RecipeBits.DISMANTLEABLE) != 0, (aBitMask & RecipeBits.NOT_REMOVABLE) == 0, aRecipe);
- }
-
- /**
- * Shapeless Crafting Recipes. Deletes conflicting Recipes too.
- */
- private static boolean addShapelessCraftingRecipe(ItemStack aResult, Enchantment[] aEnchantmentsAdded, int[] aEnchantmentLevelsAdded, boolean aBuffered, boolean aKeepNBT, boolean aDismantleable, boolean aRemovable, Object[] aRecipe) {
- aResult = GT_OreDictUnificator.get(T, aResult);
- if (aRecipe == null || aRecipe.length <= 0) return F;
- for (byte i = 0; i < aRecipe.length; i++) {
- if (aRecipe[i] instanceof IItemContainer)
- aRecipe[i] = ((IItemContainer)aRecipe[i]).get(1);
- else if (aRecipe[i] instanceof Enum)
- aRecipe[i] = ((Enum)aRecipe[i]).name();
- else if (!(aRecipe[i] == null || aRecipe[i] instanceof ItemStack || aRecipe[i] instanceof String || aRecipe[i] instanceof Character))
- aRecipe[i] = aRecipe[i].toString();
- }
- try {
- ItemStack[] tRecipe = new ItemStack[9];
- int i = 0;
- for (Object tObject : aRecipe) {
- if (tObject == null) {
- if (D1) GT_Log.err.println("WARNING: Missing Item for shapeless Recipe: " + (aResult==null?"null":aResult.getDisplayName()));
- for (Object tContent : aRecipe) GT_Log.err.println(tContent);
- return F;
- }
- if (tObject instanceof ItemStack) {
- tRecipe[i] = (ItemStack)tObject;
- } else if (tObject instanceof String) {
- tRecipe[i] = GT_OreDictUnificator.getFirstOre(tObject, 1);
- if (tRecipe[i] == null) break;
- } else if (tObject instanceof Boolean) {
- //
- } else {
- throw new IllegalArgumentException();
- }
- i++;
- }
- removeRecipe(tRecipe);
- } catch(Throwable e) {e.printStackTrace(GT_Log.err);}
-
- if (aResult == null || aResult.stackSize <= 0) return F;
-
- if (Items.feather.getDamage(aResult) == W || Items.feather.getDamage(aResult) < 0) Items.feather.setDamage(aResult, 0);
-
- GT_Utility.updateItemStack(aResult);
-
- if (sBufferCraftingRecipes && aBuffered)
- sBufferRecipeList.add(new GT_Shapeless_Recipe(GT_Utility.copy(aResult), aDismantleable, aRemovable, aKeepNBT, aEnchantmentsAdded, aEnchantmentLevelsAdded, aRecipe));
- else
- GameRegistry.addRecipe(new GT_Shapeless_Recipe(GT_Utility.copy(aResult), aDismantleable, aRemovable, aKeepNBT, aEnchantmentsAdded, aEnchantmentLevelsAdded, aRecipe));
- return T;
- }
-
- /**
- * Removes a Smelting Recipe
- */
- public static boolean removeFurnaceSmelting(ItemStack aInput) {
- if (aInput != null) {
- for (Object tInput : FurnaceRecipes.smelting().getSmeltingList().keySet()) {
- if (GT_Utility.isStackValid(tInput) && GT_Utility.areStacksEqual(aInput, (ItemStack)tInput, T)) {
- FurnaceRecipes.smelting().getSmeltingList().remove(tInput);
- return T;
- }
- }
- }
- return F;
- }
-
- /**
- * Removes a Crafting Recipe and gives you the former output of it.
- * @param aRecipe The content of the Crafting Grid as ItemStackArray with length 9
- * @return the output of the old Recipe or null if there was nothing.
- */
- public static ItemStack removeRecipe(ItemStack... aRecipe) {
- if (aRecipe == null) return null;
- boolean temp = F;
- for (byte i = 0; i < aRecipe.length; i++) {
- if (aRecipe[i] != null) {
- temp = T;
- break;
- }
- }
- if (!temp) return null;
- ItemStack rReturn = null;
- InventoryCrafting aCrafting = new InventoryCrafting(new Container() {@Override public boolean canInteractWith(EntityPlayer var1) {return F;}}, 3, 3);
- for (int i = 0; i < aRecipe.length && i < 9; i++) aCrafting.setInventorySlotContents(i, aRecipe[i]);
- ArrayList<IRecipe> tList = (ArrayList<IRecipe>)CraftingManager.getInstance().getRecipeList();
- for (int i = 0; i < tList.size(); i++) {try {for (; i < tList.size(); i++) {
- if ((!(tList.get(i) instanceof IGT_CraftingRecipe) || ((IGT_CraftingRecipe)tList.get(i)).isRemovable()) && tList.get(i).matches(aCrafting, DW)) {
- rReturn = tList.get(i).getCraftingResult(aCrafting);
- if (rReturn != null) tList.remove(i--);
- }
- }} catch(Throwable e) {e.printStackTrace(GT_Log.err);}}
- return rReturn;
- }
-
- public static boolean removeRecipeByOutput(ItemStack aOutput) {
- return removeRecipeByOutput(aOutput, T, F, F);
- }
-
- public static Collection<String> sNativeRecipeClasses = new HashSet<String>(), sSpecialRecipeClasses = new HashSet<String>();
-
- static {
- sNativeRecipeClasses.add(ShapedRecipes.class.getName());
- sNativeRecipeClasses.add(ShapedOreRecipe.class.getName());
- sNativeRecipeClasses.add(GT_Shaped_Recipe.class.getName());
- sNativeRecipeClasses.add(ShapelessRecipes.class.getName());
- sNativeRecipeClasses.add(ShapelessOreRecipe.class.getName());
- sNativeRecipeClasses.add(GT_Shapeless_Recipe.class.getName());
- sNativeRecipeClasses.add(ic2.core.AdvRecipe.class.getName());
- sNativeRecipeClasses.add(ic2.core.AdvShapelessRecipe.class.getName());
- sNativeRecipeClasses.add("appeng.recipes.game.ShapedRecipe");
- sNativeRecipeClasses.add("appeng.recipes.game.ShapelessRecipe");
- sNativeRecipeClasses.add("forestry.core.utils.ShapedRecipeCustom");
-
- // Recipe Classes, which should never be removed.
- sSpecialRecipeClasses.add(net.minecraft.item.crafting.RecipeFireworks.class.getName());
- sSpecialRecipeClasses.add(net.minecraft.item.crafting.RecipesArmorDyes.class.getName());
- sSpecialRecipeClasses.add(net.minecraft.item.crafting.RecipeBookCloning.class.getName());
- sSpecialRecipeClasses.add(net.minecraft.item.crafting.RecipesMapCloning.class.getName());
- sSpecialRecipeClasses.add(net.minecraft.item.crafting.RecipesMapExtending.class.getName());
- sSpecialRecipeClasses.add("jds.bibliocraft.BiblioSpecialRecipes");
- sSpecialRecipeClasses.add("dan200.qcraft.shared.EntangledQBlockRecipe");
- sSpecialRecipeClasses.add("dan200.qcraft.shared.EntangledQuantumComputerRecipe");
- sSpecialRecipeClasses.add("dan200.qcraft.shared.QBlockRecipe");
- sSpecialRecipeClasses.add("appeng.recipes.game.FacadeRecipe");
- sSpecialRecipeClasses.add("appeng.recipes.game.DisassembleRecipe");
- sSpecialRecipeClasses.add("mods.railcraft.common.carts.LocomotivePaintingRecipe");
- sSpecialRecipeClasses.add("mods.railcraft.common.util.crafting.RotorRepairRecipe");
- sSpecialRecipeClasses.add("mods.railcraft.common.util.crafting.RoutingTableCopyRecipe");
- sSpecialRecipeClasses.add("mods.railcraft.common.util.crafting.RoutingTicketCopyRecipe");
- sSpecialRecipeClasses.add("mods.railcraft.common.util.crafting.TankCartFilterRecipe");
- sSpecialRecipeClasses.add("mods.railcraft.common.emblems.LocomotiveEmblemRecipe");
- sSpecialRecipeClasses.add("mods.railcraft.common.emblems.EmblemPostColorRecipe");
- sSpecialRecipeClasses.add("mods.railcraft.common.emblems.EmblemPostEmblemRecipe");
- sSpecialRecipeClasses.add("mods.immibis.redlogic.interaction.RecipeDyeLumarButton");
- sSpecialRecipeClasses.add("thaumcraft.common.items.armor.RecipesRobeArmorDyes");
- sSpecialRecipeClasses.add("thaumcraft.common.items.armor.RecipesVoidRobeArmorDyes");
- sSpecialRecipeClasses.add("thaumcraft.common.lib.crafting.ShapelessNBTOreRecipe");
- sSpecialRecipeClasses.add("twilightforest.item.TFMapCloningRecipe");
- sSpecialRecipeClasses.add("forestry.lepidopterology.MatingRecipe");
- sSpecialRecipeClasses.add("micdoodle8.mods.galacticraft.planets.asteroids.recipe.CanisterRecipes");
- sSpecialRecipeClasses.add("shedar.mods.ic2.nuclearcontrol.StorageArrayRecipe");
- }
-
- /**
- * Removes a Crafting Recipe.
- * @param aOutput The output of the Recipe.
- * @return if it has removed at least one Recipe.
- */
- public static boolean removeRecipeByOutput(ItemStack aOutput, boolean aIgnoreNBT, boolean aNotRemoveShapelessRecipes, boolean aOnlyRemoveNativeHandlers) {
- if (aOutput == null) return F;
- boolean rReturn = F;
- ArrayList<IRecipe> tList = (ArrayList<IRecipe>)CraftingManager.getInstance().getRecipeList();
- aOutput = GT_OreDictUnificator.get(aOutput);
- for (int i = 0; i < tList.size(); i++) {
- IRecipe tRecipe = tList.get(i);
- if (aNotRemoveShapelessRecipes && (tRecipe instanceof ShapelessRecipes || tRecipe instanceof ShapelessOreRecipe)) continue;
- if (aOnlyRemoveNativeHandlers) {
- if (!sNativeRecipeClasses.contains(tRecipe.getClass().getName())) continue;
- } else {
- if (sSpecialRecipeClasses.contains(tRecipe.getClass().getName())) continue;
- }
- ItemStack tStack = tRecipe.getRecipeOutput();
- if ((!(tRecipe instanceof IGT_CraftingRecipe) || ((IGT_CraftingRecipe)tRecipe).isRemovable()) && GT_Utility.areStacksEqual(GT_OreDictUnificator.get(tStack), aOutput, aIgnoreNBT)) {
- tList.remove(i--);
- rReturn = T;
- }
- }
- return rReturn;
- }
-
- /**
- * Checks all Crafting Handlers for Recipe Output
- * Used for the Autocrafting Table
- */
- public static ItemStack getAllRecipeOutput(World aWorld, ItemStack... aRecipe) {
- if (aRecipe == null || aRecipe.length == 0) return null;
-
- if (aWorld == null) aWorld = DW;
-
- boolean temp = F;
- for (byte i = 0; i < aRecipe.length; i++) {
- if (aRecipe[i] != null) {
- temp = T;
- break;
- }
- }
- if (!temp) return null;
- InventoryCrafting aCrafting = new InventoryCrafting(new Container() {@Override public boolean canInteractWith(EntityPlayer var1) {return F;}}, 3, 3);
- for (int i = 0; i < 9 && i < aRecipe.length; i++) aCrafting.setInventorySlotContents(i, aRecipe[i]);
- List<IRecipe> tList = CraftingManager.getInstance().getRecipeList();
- synchronized(sAllRecipeList) {
- if (sAllRecipeList.size() != tList.size()) {
- sAllRecipeList.clear();
- sAllRecipeList.addAll(tList);
- }
- for (int i = 0, j = sAllRecipeList.size(); i < j; i++) {
- IRecipe tRecipe = sAllRecipeList.get(i);
- if (tRecipe.matches(aCrafting, aWorld)) {
- if (i > 10) {
- sAllRecipeList.remove(i);
- sAllRecipeList.add(i-10, tRecipe);
- }
- return tRecipe.getCraftingResult(aCrafting);
- }
- }
- }
-
- int tIndex = 0;
- ItemStack tStack1 = null, tStack2 = null;
- for (int i = 0, j = aCrafting.getSizeInventory(); i < j; i++) {
- ItemStack tStack = aCrafting.getStackInSlot(i);
- if (tStack != null) {
- if (tIndex == 0) tStack1 = tStack;
- if (tIndex == 1) tStack2 = tStack;
- tIndex++;
- }
- }
-
- if (tIndex == 2) {
- assert tStack1 != null && tStack2 != null;
- if (tStack1.getItem() == tStack2.getItem() && tStack1.stackSize == 1 && tStack2.stackSize == 1 && tStack1.getItem().isRepairable()) {
- int tNewDamage = tStack1.getMaxDamage() + tStack1.getItemDamage() - tStack2.getItemDamage() + tStack1.getMaxDamage() / 20;
- return new ItemStack(tStack1.getItem(), 1, tNewDamage<0?0:tNewDamage);
- }
- }
-
- return null;
- }
-
- /**
- * Gives you a copy of the Output from a Crafting Recipe
- * Used for Recipe Detection.
- */
- public static ItemStack getRecipeOutput(ItemStack... aRecipe) {
- return getRecipeOutput(F, aRecipe);
- }
-
- /**
- * Gives you a copy of the Output from a Crafting Recipe
- * Used for Recipe Detection.
- */
- public static ItemStack getRecipeOutput(boolean aUncopiedStack, ItemStack... aRecipe) {
- if (aRecipe == null) return null;
- boolean temp = F;
- for (byte i = 0; i < aRecipe.length; i++) {
- if (aRecipe[i] != null) {
- temp = T;
- break;
- }
- }
- if (!temp) return null;
- InventoryCrafting aCrafting = new InventoryCrafting(new Container() {@Override public boolean canInteractWith(EntityPlayer var1) {return F;}}, 3, 3);
- for (int i = 0; i < 9 && i < aRecipe.length; i++) aCrafting.setInventorySlotContents(i, aRecipe[i]);
- ArrayList<IRecipe> tList = (ArrayList<IRecipe>)CraftingManager.getInstance().getRecipeList();
- for (int i = 0; i < tList.size(); i++) {temp = F;
- try {
- temp = tList.get(i).matches(aCrafting, DW);
- } catch(Throwable e) {e.printStackTrace(GT_Log.err);}
- if (temp) {
- ItemStack tOutput = aUncopiedStack?tList.get(i).getRecipeOutput():tList.get(i).getCraftingResult(aCrafting);
- if (tOutput == null || tOutput.stackSize <= 0) {
- // Seriously, who would ever do that shit?
- if (!GregTech_API.sPostloadFinished) throw new GT_ItsNotMyFaultException("Seems another Mod added a Crafting Recipe with null Output. Tell the Developer of said Mod to fix that.");
- } else {
- if (aUncopiedStack) return tOutput;
- return GT_Utility.copy(tOutput);
- }
- }
- }
- return null;
- }
-
- public static GT_HashSet<GT_ItemStack> sNonReplaceableItems = new GT_HashSet<GT_ItemStack>();
-
- /**
- * Gives you a list of the Outputs from a Crafting Recipe
- * If you have multiple Mods, which add Bronze Armor for example
- * This also removes old Recipes from the List.
- */
- public static ArrayList<ItemStack> getVanillyToolRecipeOutputs(ItemStack... aRecipe) {
- if (!GregTech_API.sPostloadStarted || GregTech_API.sPostloadFinished) sSingleNonBlockDamagableRecipeList.clear();
- if (sSingleNonBlockDamagableRecipeList.isEmpty()) {
- for (IRecipe tRecipe : (ArrayList<IRecipe>)CraftingManager.getInstance().getRecipeList()) {
- ItemStack tStack = tRecipe.getRecipeOutput();
- if (GT_Utility.isStackValid(tStack) && tStack.getMaxStackSize() == 1 && tStack.getMaxDamage() > 0 && !(tStack.getItem() instanceof ItemBlock) && !(tStack.getItem() instanceof IReactorComponent) && !isElectricItem(tStack) && !GT_Utility.isStackInList(tStack, sNonReplaceableItems)) {
- if (!(tRecipe instanceof ShapelessRecipes || tRecipe instanceof ShapelessOreRecipe)) {
- if (tRecipe instanceof ShapedOreRecipe) {
- boolean temp = T;
- for (Object tObject : ((ShapedOreRecipe)tRecipe).getInput()) if (tObject != null) {
- if (tObject instanceof ItemStack && (((ItemStack)tObject).getItem() == null || ((ItemStack)tObject).getMaxStackSize() < 2 || ((ItemStack)tObject).getMaxDamage() > 0 || ((ItemStack)tObject).getItem() instanceof ItemBlock)) {
- temp = F;
- break;
- }
- if (tObject instanceof List && ((List)tObject).isEmpty()) {
- temp = F;
- break;
- }
- }
- if (temp) sSingleNonBlockDamagableRecipeList.add(tRecipe);
- } else if (tRecipe instanceof ShapedRecipes) {
- boolean temp = T;
- for (ItemStack tObject : ((ShapedRecipes)tRecipe).recipeItems) {
- if (tObject != null && (tObject.getItem() == null || tObject.getMaxStackSize() < 2 || tObject.getMaxDamage() > 0 || tObject.getItem() instanceof ItemBlock)) {
- temp = F;
- break;
- }
- }
- if (temp) sSingleNonBlockDamagableRecipeList.add(tRecipe);
- } else {
- sSingleNonBlockDamagableRecipeList.add(tRecipe);
- }
- }
- }
- }
- GT_Log.out.println("GT_Mod: Created a List of Tool Recipes containing " + sSingleNonBlockDamagableRecipeList.size() + " Recipes for recycling." + (sSingleNonBlockDamagableRecipeList.size()>1024?" Scanning all these Recipes is the reason for the startup Lag you receive right now.":E));
- }
- ArrayList<ItemStack> rList = getRecipeOutputs(sSingleNonBlockDamagableRecipeList, T, aRecipe);
- if (!GregTech_API.sPostloadStarted || GregTech_API.sPostloadFinished) sSingleNonBlockDamagableRecipeList.clear();
- return rList;
- }
-
- /**
- * Gives you a list of the Outputs from a Crafting Recipe
- * If you have multiple Mods, which add Bronze Armor for example
- */
- public static ArrayList<ItemStack> getRecipeOutputs(ItemStack... aRecipe) {
- return getRecipeOutputs(CraftingManager.getInstance().getRecipeList(), F, aRecipe);
- }
-
- /**
- * Gives you a list of the Outputs from a Crafting Recipe
- * If you have multiple Mods, which add Bronze Armor for example
- */
- public static ArrayList<ItemStack> getRecipeOutputs(List<IRecipe> aList, boolean aDeleteFromList, ItemStack... aRecipe) {
- ArrayList<ItemStack> rList = new ArrayList<ItemStack>();
- if (aRecipe == null) return rList;
- boolean temp = F;
- for (byte i = 0; i < aRecipe.length; i++) {
- if (aRecipe[i] != null) {
- temp = T;
- break;
- }
- }
- if (!temp) return rList;
- InventoryCrafting aCrafting = new InventoryCrafting(new Container() {@Override
- public boolean canInteractWith(EntityPlayer var1) {return F;}}, 3, 3);
- for (int i = 0; i < 9 && i < aRecipe.length; i++) aCrafting.setInventorySlotContents(i, aRecipe[i]);
- for (int i = 0; i < aList.size(); i++) {
- temp = F;
- try {
- temp = aList.get(i).matches(aCrafting, DW);
- } catch(Throwable e) {e.printStackTrace(GT_Log.err);}
- if (temp) {
- ItemStack tOutput = aList.get(i).getCraftingResult(aCrafting);
- if (tOutput == null || tOutput.stackSize <= 0) {
- // Seriously, who would ever do that shit?
- if (!GregTech_API.sPostloadFinished) throw new GT_ItsNotMyFaultException("Seems another Mod added a Crafting Recipe with null Output. Tell the Developer of said Mod to fix that.");
- } else {
- rList.add(GT_Utility.copy(tOutput));
- if (aDeleteFromList) aList.remove(i--);
- }
- }
- }
- return rList;
- }
-
- /**
- * Used in my own Macerator. Decreases StackSize of the Input if wanted.
- */
- public static ItemStack getMaceratorOutput(ItemStack aInput, boolean aRemoveInput, ItemStack aOutputSlot) {
- return GT_Utility.copy(getMachineOutput(aInput, getMaceratorRecipeList(), aRemoveInput, new NBTTagCompound(), aOutputSlot)[0]);
- }
-
- /**
- * Used in my own Extractor. Decreases StackSize of the Input if wanted.
- */
- public static ItemStack getExtractorOutput(ItemStack aInput, boolean aRemoveInput, ItemStack aOutputSlot) {
- return GT_Utility.copy(getMachineOutput(aInput, getExtractorRecipeList(), aRemoveInput, new NBTTagCompound(), aOutputSlot)[0]);
- }
-
- /**
- * Used in my own Compressor. Decreases StackSize of the Input if wanted.
- */
- public static ItemStack getCompressorOutput(ItemStack aInput, boolean aRemoveInput, ItemStack aOutputSlot) {
- return GT_Utility.copy(getMachineOutput(aInput, getCompressorRecipeList(), aRemoveInput, new NBTTagCompound(), aOutputSlot)[0]);
- }
-
- /**
- * Used in my own Furnace.
- */
- public static ItemStack getSmeltingOutput(ItemStack aInput, boolean aRemoveInput, ItemStack aOutputSlot) {
- if (aInput == null || aInput.stackSize < 1) return null;
- ItemStack rStack = GT_OreDictUnificator.get(FurnaceRecipes.smelting().getSmeltingResult(aInput));
- if (rStack != null && (aOutputSlot == null || (GT_Utility.areStacksEqual(rStack, aOutputSlot) && rStack.stackSize + aOutputSlot.stackSize <= aOutputSlot.getMaxStackSize()))) {
- if (aRemoveInput) aInput.stackSize--;
- return rStack;
- }
- return null;
- }
-
- /**
- * Used in my own Machines. Decreases StackSize of the Input if wanted.
- *
- * Checks also if there is enough Space in the Output Slots.
- */
- public static ItemStack[] getMachineOutput(ItemStack aInput, Map<IRecipeInput, RecipeOutput> aRecipeList, boolean aRemoveInput, NBTTagCompound rRecipeMetaData, ItemStack... aOutputSlots) {
- if (aOutputSlots == null || aOutputSlots.length <= 0) return new ItemStack[0];
- if (aInput == null) return new ItemStack[aOutputSlots.length];
- try {
- for (Entry<IRecipeInput, RecipeOutput> tEntry : aRecipeList.entrySet()) {
- if (tEntry.getKey().matches(aInput)) {
- if (tEntry.getKey().getAmount() <= aInput.stackSize) {
- ItemStack[] tList = (ItemStack[])tEntry.getValue().items.toArray();
- if (tList.length == 0) break;
- ItemStack[] rList = new ItemStack[aOutputSlots.length];
- rRecipeMetaData.setTag("return", tEntry.getValue().metadata);
- for (byte i = 0; i < aOutputSlots.length && i < tList.length; i++) {
- if (tList[i] != null) {
- if (aOutputSlots[i] == null || (GT_Utility.areStacksEqual(tList[i], aOutputSlots[i]) && tList[i].stackSize + aOutputSlots[i].stackSize <= aOutputSlots[i].getMaxStackSize())) {
- rList[i] = GT_Utility.copy(tList[i]);
- } else {
- return new ItemStack[aOutputSlots.length];
- }
- }
- }
-
- if (aRemoveInput) aInput.stackSize-=tEntry.getKey().getAmount();
- return rList;
- }
- break;
- }
- }
- } catch(Throwable e) {
- if (D1) e.printStackTrace(GT_Log.err);
- }
- return new ItemStack[aOutputSlots.length];
- }
-
- /**
- * Used in my own Recycler.
- *
- * Only produces Scrap if aScrapChance == 0. aScrapChance is usually the random Number I give to the Function
- * If you directly insert 0 as aScrapChance then you can check if its Recycler-Blacklisted or similar
- */
- public static ItemStack getRecyclerOutput(ItemStack aInput, int aScrapChance) {
- if (aInput == null || aScrapChance != 0) return null;
- try {
- if (ic2.api.recipe.Recipes.recyclerWhitelist.isEmpty()) return ic2.api.recipe.Recipes.recyclerBlacklist.contains(aInput)?null:ItemList.IC2_Scrap.get(1);
- return ic2.api.recipe.Recipes.recyclerWhitelist.contains(aInput)?ItemList.IC2_Scrap.get(1):null;
- } catch (Throwable e) {/*Do nothing*/}
- try {
- return ic2.api.recipe.Recipes.recyclerBlacklist.contains(aInput)?null:ItemList.IC2_Scrap.get(1);
- } catch (Throwable e) {/*Do nothing*/}
- return null;
- }
-
- /**
- * For the Scrapboxinator
- */
- public static ItemStack getRandomScrapboxDrop() {
- return ic2.api.recipe.Recipes.scrapboxDrops.getDrop(ItemList.IC2_Scrapbox.get(1), F);
- }
-
- /**
- * Charges an Electric Item. Only if it's a valid Electric Item of course.
- * This forces the Usage of proper Voltages (so not the transfer limits defined by the Items) unless you ignore the Transfer Limit.
- * If aTier is Integer.MAX_VALUE it will ignore Tier based Limitations.
- * @return the actually used Energy.
- */
- public static int chargeElectricItem(ItemStack aStack, int aCharge, int aTier, boolean aIgnoreLimit, boolean aSimulate) {
- try {
- if (isElectricItem(aStack)) {
- int tTier = ((ic2.api.item.IElectricItem)aStack.getItem()).getTier(aStack);
- if (tTier < 0 || tTier == aTier || aTier == Integer.MAX_VALUE) {
- if (!aIgnoreLimit && tTier >= 0) aCharge = (int)Math.min(aCharge, V[Math.max(0, Math.min(V.length-1, tTier))]);
- if (aCharge > 0) {
- int rCharge = (int)Math.max(0.0, ic2.api.item.ElectricItem.manager.charge(aStack, aCharge, tTier, T, aSimulate));
- return rCharge + (rCharge * 4 > aTier ? aTier : 0);
- }
- }
- }
- } catch (Throwable e) {/*Do nothing*/}
- return 0;
- }
-
- /**
- * Discharges an Electric Item. Only if it's a valid Electric Item for that of course.
- * This forces the Usage of proper Voltages (so not the transfer limits defined by the Items) unless you ignore the Transfer Limit.
- * If aTier is Integer.MAX_VALUE it will ignore Tier based Limitations.
- * @return the Energy got from the Item.
- */
- public static int dischargeElectricItem(ItemStack aStack, int aCharge, int aTier, boolean aIgnoreLimit, boolean aSimulate, boolean aIgnoreDischargability) {
- try {
-// if (isElectricItem(aStack) && (aIgnoreDischargability || ((ic2.api.item.IElectricItem)aStack.getItem()).canProvideEnergy(aStack))) {
- if (isElectricItem(aStack)) {
- int tTier = ((ic2.api.item.IElectricItem)aStack.getItem()).getTier(aStack);
- if (tTier < 0 || tTier == aTier || aTier == Integer.MAX_VALUE) {
- if (!aIgnoreLimit && tTier >= 0) aCharge = (int)Math.min(aCharge, V[Math.max(0, Math.min(V.length-1, tTier))]);
- if (aCharge > 0) {
-// int rCharge = Math.max(0, ic2.api.item.ElectricItem.manager.discharge(aStack, aCharge + (aCharge * 4 > aTier ? aTier : 0), tTier, T, aSimulate));
- int rCharge = (int)Math.max(0, ic2.api.item.ElectricItem.manager.discharge(aStack, aCharge + (aCharge * 4 > aTier ? aTier : 0), tTier, T, !aIgnoreDischargability, aSimulate));
- return rCharge - (rCharge * 4 > aTier ? aTier : 0);
- }
- }
- }
- } catch (Throwable e) {/*Do nothing*/}
- return 0;
- }
-
- /**
- * Uses an Electric Item. Only if it's a valid Electric Item for that of course.
- * @return if the action was successful
- */
- public static boolean canUseElectricItem(ItemStack aStack, int aCharge) {
- try {
- if (isElectricItem(aStack)) {
- return ic2.api.item.ElectricItem.manager.canUse(aStack, aCharge);
- }
- } catch (Throwable e) {/*Do nothing*/}
- return F;
- }
-
- /**
- * Uses an Electric Item. Only if it's a valid Electric Item for that of course.
- * @return if the action was successful
- */
- public static boolean useElectricItem(ItemStack aStack, int aCharge, EntityPlayer aPlayer) {
- try {
- if (isElectricItem(aStack)) {
- ic2.api.item.ElectricItem.manager.use(aStack, 0, aPlayer);
- if (ic2.api.item.ElectricItem.manager.canUse(aStack, aCharge)) {
- return ic2.api.item.ElectricItem.manager.use(aStack, aCharge, aPlayer);
- }
- }
- } catch (Throwable e) {/*Do nothing*/}
- return F;
- }
-
- /**
- * Uses an Item. Tries to discharge in case of Electric Items
- */
- public static boolean damageOrDechargeItem(ItemStack aStack, int aDamage, int aDecharge, EntityLivingBase aPlayer) {
- if (GT_Utility.isStackInvalid(aStack) || (aStack.getMaxStackSize() <= 1 && aStack.stackSize > 1)) return F;
- if (aPlayer != null && aPlayer instanceof EntityPlayer && ((EntityPlayer)aPlayer).capabilities.isCreativeMode) return T;
- if (aStack.getItem() instanceof IDamagableItem) {
- return ((IDamagableItem)aStack.getItem()).doDamageToItem(aStack, aDamage);
- } else if (GT_ModHandler.isElectricItem(aStack)) {
- if (canUseElectricItem(aStack, aDecharge)) {
- if (aPlayer != null && aPlayer instanceof EntityPlayer) {
- return GT_ModHandler.useElectricItem(aStack, aDecharge, (EntityPlayer)aPlayer);
- }
- return GT_ModHandler.dischargeElectricItem(aStack, aDecharge, Integer.MAX_VALUE, T, F, T) >= aDecharge;
- }
- } else if (aStack.getItem().isDamageable()) {
- if (aPlayer == null) {
- aStack.setItemDamage(aStack.getItemDamage() + aDamage);
- } else {
- aStack.damageItem(aDamage, aPlayer);
- }
- if (aStack.getItemDamage() >= aStack.getMaxDamage()) {
- aStack.setItemDamage(aStack.getMaxDamage()+1);
- ItemStack tStack = GT_Utility.getContainerItem(aStack, T);
- if (tStack != null) {
- aStack.func_150996_a(tStack.getItem());
- aStack.setItemDamage(tStack.getItemDamage());
- aStack.stackSize = tStack.stackSize;
- aStack.setTagCompound(tStack.getTagCompound());
- }
- }
- return T;
- }
- return F;
- }
-
- /**
- * Uses a Soldering Iron
- */
- public static boolean useSolderingIron(ItemStack aStack, EntityLivingBase aPlayer) {
- if (aPlayer == null || aStack == null) return F;
- if (GT_Utility.isStackInList(aStack, GregTech_API.sSolderingToolList)) {
- if (aPlayer instanceof EntityPlayer) {
- EntityPlayer tPlayer = (EntityPlayer)aPlayer;
- if (tPlayer.capabilities.isCreativeMode) return T;
- if(isElectricItem(aStack)&&ic2.api.item.ElectricItem.manager.getCharge(aStack)>1000.0d){
- for (int i = 0; i < tPlayer.inventory.mainInventory.length; i++) {
- if (GT_Utility.isStackInList(tPlayer.inventory.mainInventory[i], GregTech_API.sSolderingMetalList)) {
- if(tPlayer.inventory.mainInventory[i].stackSize<1)return false;
- if(tPlayer.inventory.mainInventory[i].stackSize==1){tPlayer.inventory.mainInventory[i]=null;}else{
- tPlayer.inventory.mainInventory[i].stackSize--;}
-
- if (tPlayer.inventoryContainer != null) tPlayer.inventoryContainer.detectAndSendChanges();
- if (canUseElectricItem(aStack, 10000)) {
- return GT_ModHandler.useElectricItem(aStack, 10000, (EntityPlayer)aPlayer);
- }
- GT_ModHandler.useElectricItem(aStack, (int) ic2.api.item.ElectricItem.manager.getCharge(aStack), (EntityPlayer)aPlayer);
- return false;
- }
- }
- }
- } else {
- damageOrDechargeItem(aStack, 1, 1000, aPlayer);
- return T;
- }
- }
- return F;
- }
-
- /**
- * Is this an electric Item, which can charge other Items?
- */
- public static boolean isChargerItem(ItemStack aStack) {
- try {
- if (isElectricItem(aStack)) {
- return ((ic2.api.item.IElectricItem)aStack.getItem()).canProvideEnergy(aStack);
- }
- } catch (Throwable e) {/*Do nothing*/}
- return F;
- }
-
- /**
- * Is this an electric Item?
- */
- public static boolean isElectricItem(ItemStack aStack) {
- try {
- return aStack != null && aStack.getItem() instanceof ic2.api.item.IElectricItem && ((IElectricItem)aStack.getItem()).getTier(aStack) < Integer.MAX_VALUE;
- } catch (Throwable e) {/*Do nothing*/}
- return F;
- }
-
- public static boolean isElectricItem(ItemStack aStack, byte aTier) {
- try {
- return aStack != null && aStack.getItem() instanceof ic2.api.item.IElectricItem && ((IElectricItem)aStack.getItem()).getTier(aStack) == aTier;
- } catch (Throwable e) {/*Do nothing*/}
- return F;
- }
-
- public static Object sBoxableWrapper = GT_Utility.callConstructor("gregtechmod.api.util.GT_IBoxableWrapper", 0, null, F);
-
- public static void registerBoxableItemToToolBox(ItemStack aStack) {
- if (aStack != null) registerBoxableItemToToolBox(aStack.getItem());
- }
-
- public static void registerBoxableItemToToolBox(Item aItem) {
- if (aItem != null && sBoxableWrapper != null) {
- try {
- ic2.api.item.ItemWrapper.registerBoxable(aItem, (IBoxable)sBoxableWrapper);
- } catch(Throwable e) {/*Do nothing*/}
- }
- }
-
- public static int getCapsuleCellContainerCountMultipliedWithStackSize(ItemStack... aStacks) {
- int rAmount = 0;
- for (ItemStack tStack : aStacks) if (tStack != null) rAmount += getCapsuleCellContainerCount(tStack) * tStack.stackSize;
- return rAmount;
- }
-
- public static int getCapsuleCellContainerCount(ItemStack aStack) {
- if (aStack == null) return 0;
- return GT_Utility.areStacksEqual(GT_Utility.getContainerForFilledItem(aStack, T), ItemList.Cell_Empty.get(1)) || OrePrefixes.cell.contains(aStack) || OrePrefixes.cellPlasma.contains(aStack) || GT_Utility.areStacksEqual(aStack, getIC2Item("waterCell", 1, W)) ? 1 : 0;
- }
-
- /**
- * Copy of the original Helper Class of Thermal Expansion, just to make sure it works even when other Mods include TE-APIs
- */
- public static class ThermalExpansion {
- public static void addFurnaceRecipe(int energy, ItemStack input, ItemStack output) {
- NBTTagCompound toSend = new NBTTagCompound();
- toSend.setInteger("energy", energy);
- toSend.setTag("input", new NBTTagCompound());
- toSend.setTag("output", new NBTTagCompound());
- input.writeToNBT(toSend.getCompoundTag("input"));
- output.writeToNBT(toSend.getCompoundTag("output"));
- FMLInterModComms.sendMessage("ThermalExpansion", "FurnaceRecipe", toSend);
- }
-
- public static void addPulverizerRecipe(int energy, ItemStack input, ItemStack primaryOutput) {
- addPulverizerRecipe(energy, input, primaryOutput, null, 0);
- }
-
- public static void addPulverizerRecipe(int energy, ItemStack input, ItemStack primaryOutput, ItemStack secondaryOutput) {
- addPulverizerRecipe(energy, input, primaryOutput, secondaryOutput, 100);
- }
-
- public static void addPulverizerRecipe(int energy, ItemStack input, ItemStack primaryOutput, ItemStack secondaryOutput, int secondaryChance) {
- if (input == null || primaryOutput == null) return;
- NBTTagCompound toSend = new NBTTagCompound();
- toSend.setInteger("energy", energy);
- toSend.setTag("input", new NBTTagCompound());
- toSend.setTag("primaryOutput", new NBTTagCompound());
- toSend.setTag("secondaryOutput", new NBTTagCompound());
- input.writeToNBT(toSend.getCompoundTag("input"));
- primaryOutput.writeToNBT(toSend.getCompoundTag("primaryOutput"));
- if (secondaryOutput != null) secondaryOutput.writeToNBT(toSend.getCompoundTag("secondaryOutput"));
- toSend.setInteger("secondaryChance", secondaryChance);
- FMLInterModComms.sendMessage("ThermalExpansion", "PulverizerRecipe", toSend);
- }
-
- public static void addSawmillRecipe(int energy, ItemStack input, ItemStack primaryOutput) {
- addSawmillRecipe(energy, input, primaryOutput, null, 0);
- }
-
- public static void addSawmillRecipe(int energy, ItemStack input, ItemStack primaryOutput, ItemStack secondaryOutput) {
- addSawmillRecipe(energy, input, primaryOutput, secondaryOutput, 100);
- }
-
- public static void addSawmillRecipe(int energy, ItemStack input, ItemStack primaryOutput, ItemStack secondaryOutput, int secondaryChance) {
- if (input == null || primaryOutput == null) return;
- NBTTagCompound toSend = new NBTTagCompound();
- toSend.setInteger("energy", energy);
- toSend.setTag("input", new NBTTagCompound());
- toSend.setTag("primaryOutput", new NBTTagCompound());
- toSend.setTag("secondaryOutput", new NBTTagCompound());
- input.writeToNBT(toSend.getCompoundTag("input"));
- primaryOutput.writeToNBT(toSend.getCompoundTag("primaryOutput"));
- if (secondaryOutput != null) secondaryOutput.writeToNBT(toSend.getCompoundTag("secondaryOutput"));
- toSend.setInteger("secondaryChance", secondaryChance);
- FMLInterModComms.sendMessage("ThermalExpansion", "SawmillRecipe", toSend);
- }
-
- public static void addSmelterRecipe(int energy, ItemStack primaryInput, ItemStack secondaryInput, ItemStack primaryOutput) {
- addSmelterRecipe(energy, primaryInput, secondaryInput, primaryOutput, null, 0);
- }
-
- public static void addSmelterRecipe(int energy, ItemStack primaryInput, ItemStack secondaryInput, ItemStack primaryOutput, ItemStack secondaryOutput) {
- addSmelterRecipe(energy, primaryInput, secondaryInput, primaryOutput, secondaryOutput, 100);
- }
-
- public static void addSmelterRecipe(int energy, ItemStack primaryInput, ItemStack secondaryInput, ItemStack primaryOutput, ItemStack secondaryOutput, int secondaryChance) {
- if (primaryInput == null || secondaryInput == null || primaryOutput == null) return;
- NBTTagCompound toSend = new NBTTagCompound();
- toSend.setInteger("energy", energy);
- toSend.setTag("primaryInput", new NBTTagCompound());
- toSend.setTag("secondaryInput", new NBTTagCompound());
- toSend.setTag("primaryOutput", new NBTTagCompound());
- toSend.setTag("secondaryOutput", new NBTTagCompound());
- primaryInput.writeToNBT(toSend.getCompoundTag("primaryInput"));
- secondaryInput.writeToNBT(toSend.getCompoundTag("secondaryInput"));
- primaryOutput.writeToNBT(toSend.getCompoundTag("primaryOutput"));
- if (secondaryOutput != null) secondaryOutput.writeToNBT(toSend.getCompoundTag("secondaryOutput"));
- toSend.setInteger("secondaryChance", secondaryChance);
- FMLInterModComms.sendMessage("ThermalExpansion", "SmelterRecipe", toSend);
- }
-
- public static void addSmelterBlastOre(Materials aMaterial) {
- NBTTagCompound toSend = new NBTTagCompound();
- toSend.setString("oreType", aMaterial.toString());
- FMLInterModComms.sendMessage("ThermalExpansion", "SmelterBlastOreType", toSend);
- }
-
- public static void addCrucibleRecipe(int energy, ItemStack input, FluidStack output) {
- if (input == null || output == null) return;
- NBTTagCompound toSend = new NBTTagCompound();
- toSend.setInteger("energy", energy);
- toSend.setTag("input", new NBTTagCompound());
- toSend.setTag("output", new NBTTagCompound());
- input.writeToNBT(toSend.getCompoundTag("input"));
- output.writeToNBT(toSend.getCompoundTag("output"));
- FMLInterModComms.sendMessage("ThermalExpansion", "CrucibleRecipe", toSend);
- }
-
- public static void addTransposerFill(int energy, ItemStack input, ItemStack output, FluidStack fluid, boolean reversible) {
- if (input == null || output == null || fluid == null) return;
- NBTTagCompound toSend = new NBTTagCompound();
- toSend.setInteger("energy", energy);
- toSend.setTag("input", new NBTTagCompound());
- toSend.setTag("output", new NBTTagCompound());
- toSend.setTag("fluid", new NBTTagCompound());
- input.writeToNBT(toSend.getCompoundTag("input"));
- output.writeToNBT(toSend.getCompoundTag("output"));
- toSend.setBoolean("reversible", reversible);
- fluid.writeToNBT(toSend.getCompoundTag("fluid"));
- FMLInterModComms.sendMessage("ThermalExpansion", "TransposerFillRecipe", toSend);
- }
-
- public static void addTransposerExtract(int energy, ItemStack input, ItemStack output, FluidStack fluid, int chance, boolean reversible) {
- if (input == null || output == null || fluid == null) return;
- NBTTagCompound toSend = new NBTTagCompound();
- toSend.setInteger("energy", energy);
- toSend.setTag("input", new NBTTagCompound());
- toSend.setTag("output", new NBTTagCompound());
- toSend.setTag("fluid", new NBTTagCompound());
- input.writeToNBT(toSend.getCompoundTag("input"));
- output.writeToNBT(toSend.getCompoundTag("output"));
- toSend.setBoolean("reversible", reversible);
- toSend.setInteger("chance", chance);
- fluid.writeToNBT(toSend.getCompoundTag("fluid"));
- FMLInterModComms.sendMessage("ThermalExpansion", "TransposerExtractRecipe", toSend);
- }
-
- public static void addMagmaticFuel(String fluidName, int energy) {
- NBTTagCompound toSend = new NBTTagCompound();
- toSend.setString("fluidName", fluidName);
- toSend.setInteger("energy", energy);
- FMLInterModComms.sendMessage("ThermalExpansion", "MagmaticFuel", toSend);
- }
-
- public static void addCompressionFuel(String fluidName, int energy) {
- NBTTagCompound toSend = new NBTTagCompound();
- toSend.setString("fluidName", fluidName);
- toSend.setInteger("energy", energy);
- FMLInterModComms.sendMessage("ThermalExpansion", "CompressionFuel", toSend);
- }
-
- public static void addCoolant(String fluidName, int energy) {
- NBTTagCompound toSend = new NBTTagCompound();
- toSend.setString("fluidName", fluidName);
- toSend.setInteger("energy", energy);
- FMLInterModComms.sendMessage("ThermalExpansion", "Coolant", toSend);
- }
- }
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/util/GT_OreDictUnificator.java b/main/java/gregtech/api/util/GT_OreDictUnificator.java
deleted file mode 100644
index 6425e5b89d..0000000000
--- a/main/java/gregtech/api/util/GT_OreDictUnificator.java
+++ /dev/null
@@ -1,332 +0,0 @@
-package gregtech.api.util;
-
-import static gregtech.api.enums.GT_Values.E;
-import static gregtech.api.enums.GT_Values.M;
-import static gregtech.api.enums.GT_Values.W;
-import gregtech.api.GregTech_API;
-import gregtech.api.enums.Dyes;
-import gregtech.api.enums.Materials;
-import gregtech.api.enums.OrePrefixes;
-import gregtech.api.enums.SubTag;
-import gregtech.api.objects.GT_HashSet;
-import gregtech.api.objects.GT_ItemStack;
-import gregtech.api.objects.ItemData;
-import gregtech.api.objects.MaterialStack;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Map.Entry;
-
-import net.minecraft.init.Items;
-import net.minecraft.item.ItemStack;
-import net.minecraftforge.oredict.OreDictionary;
-
-/**
- * NEVER INCLUDE THIS FILE IN YOUR MOD!!!
- *
- * This is the Core of my OreDict Unification Code
- *
- * If you just want to use this to unificate your Items, then use the Function in the GregTech_API File
- *
- * P.S. It is intended to be named "Unificator" and not "Unifier", because that sounds more awesome.
- */
-public class GT_OreDictUnificator {
- public static volatile int VERSION = 508;
-
- private static final HashMap<String, ItemStack> sName2StackMap = new HashMap<String, ItemStack>();
- private static final HashMap<GT_ItemStack, ItemData> sItemStack2DataMap = new HashMap<GT_ItemStack, ItemData>();
- private static final GT_HashSet<GT_ItemStack> sNoUnificationList = new GT_HashSet<GT_ItemStack>();
-
- private static int isRegisteringOre = 0, isAddingOre = 0;
-
- static {
- GregTech_API.sItemStackMappings.add(sItemStack2DataMap);
- }
-
- /**
- * The Blacklist just prevents the Item from being unificated into something else.
- * Useful if you have things like the Industrial Diamond, which is better than regular Diamond, but also usable in absolutely all Diamond Recipes.
- */
- public static void addToBlacklist(ItemStack aStack) {
- if (GT_Utility.isStackValid(aStack) && !GT_Utility.isStackInList(aStack, sNoUnificationList)) sNoUnificationList.add(aStack);
- }
-
- public static boolean isBlacklisted(ItemStack aStack) {
- return GT_Utility.isStackInList(aStack, sNoUnificationList);
- }
-
- public static void add(OrePrefixes aPrefix, Materials aMaterial, ItemStack aStack) {
- set(aPrefix, aMaterial, aStack, false, false);
- }
-
- public static void set(OrePrefixes aPrefix, Materials aMaterial, ItemStack aStack) {
- set(aPrefix, aMaterial, aStack, true, false);
- }
-
- public static void set(OrePrefixes aPrefix, Materials aMaterial, ItemStack aStack, boolean aOverwrite, boolean aAlreadyRegistered) {
- if (aMaterial == null || aPrefix == null || GT_Utility.isStackInvalid(aStack) || Items.feather.getDamage(aStack) == W) return;
- isAddingOre++;
- aStack = GT_Utility.copyAmount(1, aStack);
- if (!aAlreadyRegistered) registerOre(aPrefix.get(aMaterial), aStack);
- addAssociation(aPrefix, aMaterial, aStack, isBlacklisted(aStack));
- if (aOverwrite || GT_Utility.isStackInvalid(sName2StackMap.get(aPrefix.get(aMaterial).toString()))) sName2StackMap.put(aPrefix.get(aMaterial).toString(), aStack);
- isAddingOre--;
- }
-
- public static ItemStack getFirstOre(Object aName, long aAmount) {
- if (GT_Utility.isStringInvalid(aName)) return null;
- ItemStack tStack = sName2StackMap.get(aName.toString());
- if (GT_Utility.isStackValid(tStack)) return GT_Utility.copyAmount(aAmount, tStack);
- return GT_Utility.copyAmount(aAmount, getOres(aName).toArray());
- }
-
- public static ItemStack get(Object aName, long aAmount) {
- return get(aName, null, aAmount, true, true);
- }
-
- public static ItemStack get(Object aName, ItemStack aReplacement, long aAmount) {
- return get(aName, aReplacement, aAmount, true, true);
- }
-
- public static ItemStack get(OrePrefixes aPrefix, Object aMaterial, long aAmount) {
- return get(aPrefix, aMaterial, null, aAmount);
- }
-
- public static ItemStack get(OrePrefixes aPrefix, Object aMaterial, ItemStack aReplacement, long aAmount) {
- return get(aPrefix.get(aMaterial), aReplacement, aAmount, false, true);
- }
-
- public static ItemStack get(Object aName, ItemStack aReplacement, long aAmount, boolean aMentionPossibleTypos, boolean aNoInvalidAmounts) {
- if (aNoInvalidAmounts && aAmount < 1) return null;
- if (!sName2StackMap.containsKey(aName.toString()) && aMentionPossibleTypos) GT_Log.err.println("Unknown Key for Unification, Typo? " + aName);
- return GT_Utility.copyAmount(aAmount, sName2StackMap.get(aName.toString()), getFirstOre(aName, aAmount), aReplacement);
- }
-
- public static ItemStack[] setStackArray(boolean aUseBlackList, ItemStack... aStacks) {
- for (int i = 0; i < aStacks.length; i++) aStacks[i] = get(aUseBlackList, GT_Utility.copy(aStacks[i]));
- return aStacks;
- }
-
- public static ItemStack[] getStackArray(boolean aUseBlackList, Object... aStacks) {
- ItemStack[] rStacks = new ItemStack[aStacks.length];
- for (int i = 0; i < aStacks.length; i++) rStacks[i] = get(aUseBlackList, GT_Utility.copy(aStacks[i]));
- return rStacks;
- }
-
- public static ItemStack setStack(ItemStack aStack) {
- return setStack(true, aStack);
- }
-
- public static ItemStack setStack(boolean aUseBlackList, ItemStack aStack) {
- if (GT_Utility.isStackInvalid(aStack)) return aStack;
- ItemStack tStack = get(aUseBlackList, aStack);
- if (GT_Utility.areStacksEqual(aStack, tStack)) return aStack;
- aStack.func_150996_a(tStack.getItem());
- Items.feather.setDamage(aStack, Items.feather.getDamage(tStack));
- return aStack;
- }
-
- public static ItemStack get(ItemStack aStack) {
- return get(true, aStack);
- }
-
- public static ItemStack get(boolean aUseBlackList, ItemStack aStack) {
- if (GT_Utility.isStackInvalid(aStack)) return null;
- ItemData tPrefixMaterial = getAssociation(aStack);
- ItemStack rStack = null;
- if (tPrefixMaterial == null || !tPrefixMaterial.hasValidPrefixMaterialData() || (aUseBlackList && tPrefixMaterial.mBlackListed)) return GT_Utility.copy(aStack);
- if (aUseBlackList && !GregTech_API.sUnificationEntriesRegistered && isBlacklisted(aStack)) {tPrefixMaterial.mBlackListed = true; return GT_Utility.copy(aStack);}
- if (tPrefixMaterial.mUnificationTarget == null) tPrefixMaterial.mUnificationTarget = sName2StackMap.get(tPrefixMaterial.toString());
- rStack = tPrefixMaterial.mUnificationTarget;
- if (GT_Utility.isStackInvalid(rStack)) return GT_Utility.copy(aStack);
- assert rStack != null;
- rStack.setTagCompound(aStack.getTagCompound());
- return GT_Utility.copyAmount(aStack.stackSize, rStack);
- }
-
- public static void addItemData(ItemStack aStack, ItemData aData) {
- if (GT_Utility.isStackValid(aStack) && getItemData(aStack) == null && aData != null) setItemData(aStack, aData);
- }
-
- private static boolean mRunThroughTheList = true;
-
- public static void setItemData(ItemStack aStack, ItemData aData) {
- if (GT_Utility.isStackInvalid(aStack) || aData == null) return;
- ItemData tData = getItemData(aStack);
- if (tData == null || !tData.hasValidPrefixMaterialData()) {
- if (tData != null) for (Object tObject : tData.mExtraData) if (!aData.mExtraData.contains(tObject)) aData.mExtraData.add(tObject);
- if (aStack.stackSize > 1) {
- if (aData.mMaterial != null) aData.mMaterial.mAmount /= aStack.stackSize;
- for (MaterialStack tMaterial : aData.mByProducts) tMaterial.mAmount /= aStack.stackSize;
- aStack = GT_Utility.copyAmount(1, aStack);
- }
- sItemStack2DataMap.put(new GT_ItemStack(aStack), aData);
- if (aData.hasValidMaterialData()) {
- long tValidMaterialAmount = aData.mMaterial.mMaterial.contains(SubTag.NO_RECYCLING)?0:aData.mMaterial.mAmount>=0?aData.mMaterial.mAmount:M;
- for (MaterialStack tMaterial : aData.mByProducts) tValidMaterialAmount += tMaterial.mMaterial.contains(SubTag.NO_RECYCLING)?0:tMaterial.mAmount>=0?tMaterial.mAmount:M;
- if (tValidMaterialAmount < M) GT_ModHandler.addToRecyclerBlackList(aStack);
- }
- if (mRunThroughTheList) {
- if (GregTech_API.sLoadStarted) {
- mRunThroughTheList = false;
- for (Entry<GT_ItemStack, ItemData> tEntry : sItemStack2DataMap.entrySet()) if (!tEntry.getValue().hasValidPrefixData() || tEntry.getValue().mPrefix.mAllowNormalRecycling) GT_RecipeRegistrator.registerMaterialRecycling(tEntry.getKey().toStack(), tEntry.getValue());
- }
- } else {
- if (!aData.hasValidPrefixData() || aData.mPrefix.mAllowNormalRecycling) GT_RecipeRegistrator.registerMaterialRecycling(aStack, aData);
- }
- } else {
- for (Object tObject : aData.mExtraData) if (!tData.mExtraData.contains(tObject)) tData.mExtraData.add(tObject);
- }
- }
-
- public static void addAssociation(OrePrefixes aPrefix, Materials aMaterial, ItemStack aStack, boolean aBlackListed) {
- if (aPrefix == null || aMaterial == null || GT_Utility.isStackInvalid(aStack)) return;
- if (Items.feather.getDamage(aStack) == W) for (byte i = 0; i < 16; i++) setItemData(GT_Utility.copyAmountAndMetaData(1, i, aStack), new ItemData(aPrefix, aMaterial, aBlackListed));
- setItemData(aStack, new ItemData(aPrefix, aMaterial, aBlackListed));
- }
-
- public static ItemData getItemData(ItemStack aStack) {
- if (GT_Utility.isStackInvalid(aStack)) return null;
- ItemData rData = sItemStack2DataMap.get(new GT_ItemStack(aStack));
- if (rData == null) rData = sItemStack2DataMap.get(new GT_ItemStack(GT_Utility.copyMetaData(W, aStack)));
- return rData;
- }
-
- public static ItemData getAssociation(ItemStack aStack) {
- ItemData rData = getItemData(aStack);
- return rData != null && rData.hasValidPrefixMaterialData() ? rData : null;
- }
-
- public static boolean isItemStackInstanceOf(ItemStack aStack, Object aName) {
- if (GT_Utility.isStringInvalid(aName) || GT_Utility.isStackInvalid(aStack)) return false;
- for (ItemStack tOreStack : getOres(aName.toString())) if (GT_Utility.areStacksEqual(tOreStack, aStack, true)) return true;
- return false;
- }
-
- public static boolean isItemStackDye(ItemStack aStack) {
- if (GT_Utility.isStackInvalid(aStack)) return false;
- for (Dyes tDye : Dyes.VALUES) if (isItemStackInstanceOf(aStack, tDye.toString())) return true;
- return false;
- }
-
- public static boolean registerOre(OrePrefixes aPrefix, Object aMaterial, ItemStack aStack) {
- return registerOre(aPrefix.get(aMaterial), aStack);
- }
-
- public static boolean registerOre(Object aName, ItemStack aStack) {
- if (aName == null || GT_Utility.isStackInvalid(aStack)) return false;
- String tName = aName.toString();
- if (GT_Utility.isStringInvalid(tName)) return false;
- ArrayList<ItemStack> tList = getOres(tName);
- for (int i = 0; i < tList.size(); i++) if (GT_Utility.areStacksEqual(tList.get(i), aStack, true)) return false;
- isRegisteringOre++;
- OreDictionary.registerOre(tName, GT_Utility.copyAmount(1, aStack));
- isRegisteringOre--;
- return true;
- }
-
- public static boolean isRegisteringOres() {
- return isRegisteringOre > 0;
- }
-
- public static boolean isAddingOres() {
- return isAddingOre > 0;
- }
-
- public static void resetUnificationEntries() {
- for (ItemData tPrefixMaterial : sItemStack2DataMap.values()) tPrefixMaterial.mUnificationTarget = null;
- }
-
- public static ItemStack getGem(MaterialStack aMaterial) {
- return aMaterial==null?null:getGem(aMaterial.mMaterial, aMaterial.mAmount);
- }
-
- public static ItemStack getGem(Materials aMaterial, OrePrefixes aPrefix) {
- return aMaterial==null?null:getGem(aMaterial, aPrefix.mMaterialAmount);
- }
-
- public static ItemStack getGem(Materials aMaterial, long aMaterialAmount) {
- ItemStack rStack = null;
- if ( (( aMaterialAmount >= M ) || aMaterialAmount >= M * 32)) rStack = get(OrePrefixes.gem , aMaterial, aMaterialAmount / M );
- if (rStack == null && (((aMaterialAmount * 2) % M == 0) || aMaterialAmount >= M * 16)) rStack = get(OrePrefixes.gemFlawed , aMaterial, (aMaterialAmount * 2) / M );
- if (rStack == null && (((aMaterialAmount * 4) >= M ) )) rStack = get(OrePrefixes.gemChipped , aMaterial, (aMaterialAmount * 4) / M );
- return rStack;
- }
-
- public static ItemStack getDust(MaterialStack aMaterial) {
- return aMaterial==null?null:getDust(aMaterial.mMaterial, aMaterial.mAmount);
- }
-
- public static ItemStack getDust(Materials aMaterial, OrePrefixes aPrefix) {
- return aMaterial==null?null:getDust(aMaterial, aPrefix.mMaterialAmount);
- }
-
- public static ItemStack getDust(Materials aMaterial, long aMaterialAmount) {
- if (aMaterialAmount <= 0) return null;
- ItemStack rStack = null;
- if ( (( aMaterialAmount % M == 0) || aMaterialAmount >= M * 16)) rStack = get(OrePrefixes.dust , aMaterial, aMaterialAmount / M );
- if (rStack == null && (((aMaterialAmount * 4) % M == 0) || aMaterialAmount >= M * 8)) rStack = get(OrePrefixes.dustSmall , aMaterial, (aMaterialAmount * 4) / M );
- if (rStack == null && (((aMaterialAmount * 9) >= M ) )) rStack = get(OrePrefixes.dustTiny , aMaterial, (aMaterialAmount * 9) / M );
- return rStack;
- }
-
- public static ItemStack getIngot(MaterialStack aMaterial) {
- return aMaterial==null?null:getIngot(aMaterial.mMaterial, aMaterial.mAmount);
- }
-
- public static ItemStack getIngot(Materials aMaterial, OrePrefixes aPrefix) {
- return aMaterial==null?null:getIngot(aMaterial, aPrefix.mMaterialAmount);
- }
-
- public static ItemStack getIngot(Materials aMaterial, long aMaterialAmount) {
- if (aMaterialAmount <= 0) return null;
- ItemStack rStack = null;
- if ( (( aMaterialAmount % (M *9) == 0 && aMaterialAmount / (M * 9) > 1) || aMaterialAmount >= M * 72)) rStack = get(OrePrefixes.block , aMaterial, aMaterialAmount / (M * 9));
- if (rStack == null && (( aMaterialAmount % M == 0 ) || aMaterialAmount >= M * 8)) rStack = get(OrePrefixes.ingot , aMaterial, aMaterialAmount / M );
- if (rStack == null && (((aMaterialAmount * 9) >= M ) )) rStack = get(OrePrefixes.nugget , aMaterial, (aMaterialAmount * 9) / M );
- return rStack;
- }
-
- public static ItemStack getIngotOrDust(Materials aMaterial, long aMaterialAmount) {
- if (aMaterialAmount <= 0) return null;
- ItemStack rStack = getIngot(aMaterial, aMaterialAmount);
- if (rStack == null) rStack = getDust(aMaterial, aMaterialAmount);
- return rStack;
- }
-
- public static ItemStack getIngotOrDust(MaterialStack aMaterial) {
- ItemStack rStack = getIngot(aMaterial);
- if (rStack == null) rStack = getDust(aMaterial);
- return rStack;
- }
-
- public static ItemStack getDustOrIngot(Materials aMaterial, long aMaterialAmount) {
- if (aMaterialAmount <= 0) return null;
- ItemStack rStack = getDust(aMaterial, aMaterialAmount);
- if (rStack == null) rStack = getIngot(aMaterial, aMaterialAmount);
- return rStack;
- }
-
- public static ItemStack getDustOrIngot(MaterialStack aMaterial) {
- ItemStack rStack = getDust(aMaterial);
- if (rStack == null) rStack = getIngot(aMaterial);
- return rStack;
- }
-
- /**
- * @return a Copy of the OreDictionary.getOres() List
- */
- public static ArrayList<ItemStack> getOres(OrePrefixes aPrefix, Object aMaterial) {
- return getOres(aPrefix.get(aMaterial));
- }
-
- /**
- * @return a Copy of the OreDictionary.getOres() List
- */
- public static ArrayList<ItemStack> getOres(Object aOreName) {
- String aName = aOreName==null?E:aOreName.toString();
- ArrayList<ItemStack> rList = new ArrayList<ItemStack>();
- if (GT_Utility.isStringValid(aName)) rList.addAll(OreDictionary.getOres(aName));
- return rList;
- }
-}
diff --git a/main/java/gregtech/api/util/GT_PlayedSound.java b/main/java/gregtech/api/util/GT_PlayedSound.java
deleted file mode 100644
index fa9869397b..0000000000
--- a/main/java/gregtech/api/util/GT_PlayedSound.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package gregtech.api.util;
-
-import static gregtech.api.enums.GT_Values.E;
-
-public class GT_PlayedSound {
- public final String mSoundName;
- public final int mX, mY, mZ;
-
- public GT_PlayedSound(String aSoundName, double aX, double aY, double aZ) {
- mSoundName = aSoundName==null?E:aSoundName;
- mX = (int)aX;
- mY = (int)aY;
- mZ = (int)aZ;
- }
-
- @Override
- public boolean equals(Object aObject) {
- if (aObject != null && aObject instanceof GT_PlayedSound) {
- return ((GT_PlayedSound)aObject).mX == mX && ((GT_PlayedSound)aObject).mY == mY && ((GT_PlayedSound)aObject).mZ == mZ && ((GT_PlayedSound)aObject).mSoundName.equals(mSoundName);
- }
- return false;
- }
-
- @Override
- public int hashCode() {
- return mX+mY+mZ+mSoundName.hashCode();
- }
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/util/GT_Recipe.java b/main/java/gregtech/api/util/GT_Recipe.java
deleted file mode 100644
index 130a63d7b6..0000000000
--- a/main/java/gregtech/api/util/GT_Recipe.java
+++ /dev/null
@@ -1,1046 +0,0 @@
-package gregtech.api.util;
-
-import static gregtech.api.enums.GT_Values.*;
-import gregtech.api.GregTech_API;
-import gregtech.api.enums.Dyes;
-import gregtech.api.enums.ItemList;
-import gregtech.api.enums.Materials;
-import gregtech.api.enums.SubTag;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.interfaces.tileentity.IHasWorldObjectAndCoords;
-import gregtech.api.objects.GT_FluidStack;
-import gregtech.api.objects.GT_ItemStack;
-import gregtech.api.objects.ItemData;
-import gregtech.api.objects.MaterialStack;
-
-import java.util.*;
-
-import net.minecraft.init.Blocks;
-import net.minecraft.init.Items;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.tileentity.TileEntityFurnace;
-import net.minecraftforge.fluids.Fluid;
-import net.minecraftforge.fluids.FluidStack;
-import net.minecraftforge.fluids.IFluidContainerItem;
-
-/**
- * NEVER INCLUDE THIS FILE IN YOUR MOD!!!
- *
- * This File contains the functions used for Recipes. Please do not include this File AT ALL in your Moddownload as it ruins compatibility
- * This is just the Core of my Recipe System, if you just want to GET the Recipes I add, then you can access this File.
- * Do NOT add Recipes using the Constructors inside this Class, The GregTech_API File calls the correct Functions for these Constructors.
- *
- * I know this File causes some Errors, because of missing Main Functions, but if you just need to compile Stuff, then remove said erroreous Functions.
- */
-public class GT_Recipe {
- public static volatile int VERSION = 508;
-
- public static class GT_Recipe_Map {
- /** Contains all Recipe Maps */
- public static final Collection<GT_Recipe_Map> sMappings = new ArrayList<GT_Recipe_Map>();
-
- public static final GT_Recipe_Map sOreWasherRecipes = new GT_Recipe_Map_OreWasher (new HashSet<GT_Recipe>( 0), "ic.recipe.orewasher" , "Ore Washer" , "ic2.blockOreWashingPlant" , RES_PATH_GUI+"basicmachines/OreWasher" , 1, 3, 1, 1, 1, E , 1, E , T, F);
- public static final GT_Recipe_Map sThermalCentrifugeRecipes = new GT_Recipe_Map_ThermalCentrifuge (new HashSet<GT_Recipe>( 0), "ic.recipe.thermalcentrifuge" , "Thermal Centrifuge" , "ic2.blockCentrifuge" , RES_PATH_GUI+"basicmachines/ThermalCentrifuge" , 1, 3, 1, 0, 2, E , 1, E , T, F);
- public static final GT_Recipe_Map sCompressorRecipes = new GT_Recipe_Map_Compressor (new HashSet<GT_Recipe>( 0), "ic.recipe.compressor" , "Compressor" , "ic2.compressor" , RES_PATH_GUI+"basicmachines/Compressor" , 1, 1, 1, 0, 1, E , 1, E , T, F);
- public static final GT_Recipe_Map sExtractorRecipes = new GT_Recipe_Map_Extractor (new HashSet<GT_Recipe>( 0), "ic.recipe.extractor" , "Extractor" , "ic2.extractor" , RES_PATH_GUI+"basicmachines/Extractor" , 1, 1, 1, 0, 1, E , 1, E , T, F);
- public static final GT_Recipe_Map sRecyclerRecipes = new GT_Recipe_Map_Recycler (new HashSet<GT_Recipe>( 0), "ic.recipe.recycler" , "Recycler" , "ic2.recycler" , RES_PATH_GUI+"basicmachines/Recycler" , 1, 1, 1, 0, 1, E , 1, E , T, F);
- public static final GT_Recipe_Map sFurnaceRecipes = new GT_Recipe_Map_Furnace (new HashSet<GT_Recipe>( 0), "mc.recipe.furnace" , "Furnace" , "smelting" , RES_PATH_GUI+"basicmachines/E_Furnace" , 1, 1, 1, 0, 1, E , 1, E , T, F);
- public static final GT_Recipe_Map sMicrowaveRecipes = new GT_Recipe_Map_Microwave (new HashSet<GT_Recipe>( 0), "gt.recipe.microwave" , "Microwave" , "smelting" , RES_PATH_GUI+"basicmachines/E_Furnace" , 1, 1, 1, 0, 1, E , 1, E , T, F);
-
- public static final GT_Recipe_Map sScannerFakeRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>( 3), "gt.recipe.scanner" , "Scanner" , null , RES_PATH_GUI+"basicmachines/Scanner" , 1, 1, 1, 0, 1, E , 1, E , T, T);
- public static final GT_Recipe_Map sRockBreakerFakeRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>( 3), "gt.recipe.rockbreaker" , "Rock Breaker" , null , RES_PATH_GUI+"basicmachines/RockBreaker" , 1, 1, 0, 0, 1, E , 1, E , T, T);
- public static final GT_Recipe_Map sByProductList = new GT_Recipe_Map (new HashSet<GT_Recipe>( 1000), "gt.recipe.byproductlist" , "Ore Byproduct List" , null , RES_PATH_GUI+"basicmachines/Default" , 1, 6, 1, 0, 1, E , 1, E , T, T);
- public static final GT_Recipe_Map sRepicatorFakeRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>( 100), "gt.recipe.replicator" , "Replicator" , null , RES_PATH_GUI+"basicmachines/Replicator" , 0, 1, 0, 1, 1, E , 1, E , T, T);
-
- public static final GT_Recipe_Map sPlasmaArcFurnaceRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>(10000), "gt.recipe.plasmaarcfurnace" , "Plasma Arc Furnace" , null , RES_PATH_GUI+"basicmachines/PlasmaArcFurnace" , 1, 4, 1, 1, 1, E , 1, E , T, T);
- public static final GT_Recipe_Map sArcFurnaceRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>(10000), "gt.recipe.arcfurnace" , "Arc Furnace" , null , RES_PATH_GUI+"basicmachines/ArcFurnace" , 1, 4, 1, 1, 3, E , 1, E , T, T);
- public static final GT_Recipe_Map sPrinterRecipes = new GT_Recipe_Map_Printer (new HashSet<GT_Recipe>( 100), "gt.recipe.printer" , "Printer" , null , RES_PATH_GUI+"basicmachines/Printer" , 1, 1, 1, 1, 1, E , 1, E , T, T);
- public static final GT_Recipe_Map sSifterRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>( 100), "gt.recipe.sifter" , "Sifter" , null , RES_PATH_GUI+"basicmachines/Sifter" , 1, 9, 1, 0, 1, E , 1, E , T, T);
- public static final GT_Recipe_Map sPressRecipes = new GT_Recipe_Map_FormingPress (new HashSet<GT_Recipe>( 100), "gt.recipe.press" , "Forming Press" , null , RES_PATH_GUI+"basicmachines/Press" , 2, 1, 2, 0, 1, E , 1, E , T, T);
- public static final GT_Recipe_Map sLaserEngraverRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>( 100), "gt.recipe.laserengraver" , "Precision Laser Engraver" , null , RES_PATH_GUI+"basicmachines/LaserEngraver" , 2, 1, 2, 0, 1, E , 1, E , T, T);
- public static final GT_Recipe_Map sMixerRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>( 100), "gt.recipe.mixer" , "Mixer" , null , RES_PATH_GUI+"basicmachines/Mixer" , 4, 1, 1, 0, 1, E , 1, E , T, T);
- public static final GT_Recipe_Map sAutoclaveRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>( 200), "gt.recipe.autoclave" , "Autoclave" , null , RES_PATH_GUI+"basicmachines/Autoclave" , 1, 1, 1, 1, 1, E , 1, E , T, T);
- public static final GT_Recipe_Map sElectroMagneticSeparatorRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>( 50), "gt.recipe.electromagneticseparator" , "Electromagnetic Separator" , null , RES_PATH_GUI+"basicmachines/ElectromagneticSeparator" , 1, 3, 1, 0, 1, E , 1, E , T, T);
- public static final GT_Recipe_Map sPolarizerRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>( 100), "gt.recipe.polarizer" , "Electromagnetic Polarizer" , null , RES_PATH_GUI+"basicmachines/Polarizer" , 1, 1, 1, 0, 1, E , 1, E , T, T);
- public static final GT_Recipe_Map sMaceratorRecipes = new GT_Recipe_Map_Macerator (new HashSet<GT_Recipe>(10000), "gt.recipe.macerator" , "Pulverization" , null , RES_PATH_GUI+"basicmachines/Macerator4" , 1, 4, 1, 0, 1, E , 1, E , T, T);
- public static final GT_Recipe_Map sChemicalBathRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>( 200), "gt.recipe.chemicalbath" , "Chemical Bath" , null , RES_PATH_GUI+"basicmachines/ChemicalBath" , 1, 3, 1, 1, 1, E , 1, E , T, T);
- public static final GT_Recipe_Map sFluidCannerRecipes = new GT_Recipe_Map_FluidCanner (new HashSet<GT_Recipe>( 100), "gt.recipe.fluidcanner" , "Fluid Canning Machine" , null , RES_PATH_GUI+"basicmachines/FluidCannerNEI" , 1, 1, 1, 0, 1, E , 1, E , T, T);
- public static final GT_Recipe_Map sBrewingRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>( 100), "gt.recipe.brewer" , "Brewing Machine" , null , RES_PATH_GUI+"basicmachines/PotionBrewer" , 1, 0, 1, 1, 1, E , 1, E , T, T);
- public static final GT_Recipe_Map sFluidHeaterRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>( 100), "gt.recipe.fluidheater" , "Fluid Heater" , null , RES_PATH_GUI+"basicmachines/FluidHeater" , 1, 0, 1, 1, 1, E , 1, E , T, T);
- public static final GT_Recipe_Map sDistilleryRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>( 100), "gt.recipe.distillery" , "Distillery" , null , RES_PATH_GUI+"basicmachines/Distillery" , 1, 0, 1, 1, 1, E , 1, E , T, T);
- public static final GT_Recipe_Map sFermentingRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>( 100), "gt.recipe.fermenter" , "Fermenter" , null , RES_PATH_GUI+"basicmachines/Fermenter" , 0, 0, 0, 1, 1, E , 1, E , T, T);
- public static final GT_Recipe_Map sFluidSolidficationRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>( 100), "gt.recipe.fluidsolidifier" , "Fluid Solidifier" , null , RES_PATH_GUI+"basicmachines/FluidSolidifier" , 1, 1, 1, 1, 1, E , 1, E , T, T);
- public static final GT_Recipe_Map sFluidExtractionRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>( 100), "gt.recipe.fluidextractor" , "Fluid Extractor" , null , RES_PATH_GUI+"basicmachines/FluidExtractor" , 1, 1, 1, 0, 1, E , 1, E , T, T);
- public static final GT_Recipe_Map sBoxinatorRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>( 2500), "gt.recipe.packager" , "Packager" , null , RES_PATH_GUI+"basicmachines/Packager" , 2, 1, 2, 0, 1, E , 1, E , T, T);
- public static final GT_Recipe_Map sUnboxinatorRecipes = new GT_Recipe_Map_Unboxinator (new HashSet<GT_Recipe>( 2500), "gt.recipe.unpackager" , "Unpackager" , null , RES_PATH_GUI+"basicmachines/Unpackager" , 1, 2, 1, 0, 1, E , 1, E , T, T);
- public static final GT_Recipe_Map sFusionRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>( 50), "gt.recipe.fusionreactor" , "Fusion Reactor" , null , RES_PATH_GUI+"basicmachines/Default" , 0, 0, 0, 2, 1, "Start: " , 1, " EU" , T, T);
- public static final GT_Recipe_Map sCentrifugeRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>( 1000), "gt.recipe.centrifuge" , "Centrifuge" , null , RES_PATH_GUI+"basicmachines/Centrifuge" , 2, 6, 0, 0, 1, E , 1, E , T, T);
- public static final GT_Recipe_Map sElectrolyzerRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>( 200), "gt.recipe.electrolyzer" , "Electrolyzer" , null , RES_PATH_GUI+"basicmachines/Electrolyzer" , 2, 6, 0, 0, 1, E , 1, E , T, T);
- public static final GT_Recipe_Map sBlastRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>( 500), "gt.recipe.blastfurnace" , "Blast Furnace" , null , RES_PATH_GUI+"basicmachines/Default" , 2, 2, 1, 0, 1, "Heat Capacity: " , 1, " K" , F, T);
- public static final GT_Recipe_Map sImplosionRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>( 50), "gt.recipe.implosioncompressor" , "Implosion Compressor" , null , RES_PATH_GUI+"basicmachines/Default" , 2, 2, 2, 0, 1, E , 1, E , T, T);
- public static final GT_Recipe_Map sVacuumRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>( 100), "gt.recipe.vacuumfreezer" , "Vacuum Freezer" , null , RES_PATH_GUI+"basicmachines/Default" , 1, 1, 1, 0, 1, E , 1, E , T, T);
- public static final GT_Recipe_Map sChemicalRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>( 100), "gt.recipe.chemicalreactor" , "Chemical Reactor" , null , RES_PATH_GUI+"basicmachines/ChemicalReactor" , 2, 1, 1, 0, 1, E , 1, E , T, T);
- public static final GT_Recipe_Map sDistillationRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>( 50), "gt.recipe.distillationtower" , "Distillation Tower" , null , RES_PATH_GUI+"basicmachines/Default" , 2, 4, 0, 0, 1, E , 1, E , T, T);
- public static final GT_Recipe_Map sWiremillRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>( 50), "gt.recipe.wiremill" , "Wiremill" , null , RES_PATH_GUI+"basicmachines/Wiremill" , 1, 1, 1, 0, 1, E , 1, E , T, T);
- public static final GT_Recipe_Map sBenderRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>( 400), "gt.recipe.metalbender" , "Metal Bender" , null , RES_PATH_GUI+"basicmachines/Bender" , 2, 1, 2, 0, 1, E , 1, E , T, T);
- public static final GT_Recipe_Map sAlloySmelterRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>( 3000), "gt.recipe.alloysmelter" , "Alloy Smelter" , null , RES_PATH_GUI+"basicmachines/AlloySmelter" , 2, 1, 2, 0, 1, E , 1, E , T, T);
- public static final GT_Recipe_Map sAssemblerRecipes = new GT_Recipe_Map_Assembler (new HashSet<GT_Recipe>( 300), "gt.recipe.assembler" , "Assembler" , null , RES_PATH_GUI+"basicmachines/Assembler" , 2, 1, 1, 0, 1, E , 1, E , T, T);
- public static final GT_Recipe_Map sCannerRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>( 300), "gt.recipe.canner" , "Canning Machine" , null , RES_PATH_GUI+"basicmachines/Canner" , 2, 2, 1, 0, 1, E , 1, E , T, T);
- public static final GT_Recipe_Map sCNCRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>( 100), "gt.recipe.cncmachine" , "CNC Machine" , null , RES_PATH_GUI+"basicmachines/Default" , 2, 1, 2, 1, 1, E , 1, E , T, T);
- public static final GT_Recipe_Map sLatheRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>( 400), "gt.recipe.lathe" , "Lathe" , null , RES_PATH_GUI+"basicmachines/Lathe" , 1, 2, 1, 0, 1, E , 1, E , T, T);
- public static final GT_Recipe_Map sCutterRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>( 200), "gt.recipe.cuttingsaw" , "Cutting Saw" , null , RES_PATH_GUI+"basicmachines/Cutter" , 1, 2, 1, 1, 1, E , 1, E , T, T);
- public static final GT_Recipe_Map sSlicerRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>( 200), "gt.recipe.slicer" , "Slicer" , null , RES_PATH_GUI+"basicmachines/Slicer" , 2, 1, 2, 0, 1, E , 1, E , T, T);
- public static final GT_Recipe_Map sExtruderRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>( 1000), "gt.recipe.extruder" , "Extruder" , null , RES_PATH_GUI+"basicmachines/Extruder" , 2, 1, 2, 0, 1, E , 1, E , T, T);
- public static final GT_Recipe_Map sHammerRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>( 200), "gt.recipe.hammer" , "Hammer" , null , RES_PATH_GUI+"basicmachines/Hammer" , 1, 1, 1, 0, 1, E , 1, E , T, T);
- public static final GT_Recipe_Map sAmplifiers = new GT_Recipe_Map (new HashSet<GT_Recipe>( 10), "gt.recipe.uuamplifier" , "UU Amplifier" , null , RES_PATH_GUI+"basicmachines/Amplifabricator" , 1, 0, 1, 0, 1, E , 1, E , T, T);
- public static final GT_Recipe_Map_Fuel sDieselFuels = new GT_Recipe_Map_Fuel (new HashSet<GT_Recipe>( 10), "gt.recipe.dieselgeneratorfuel" , "Diesel Generator Fuel" , null , RES_PATH_GUI+"basicmachines/Default" , 1, 1, 0, 0, 1, "Fuel Value: " , 1000, " EU" , T, T);
- public static final GT_Recipe_Map_Fuel sTurbineFuels = new GT_Recipe_Map_Fuel (new HashSet<GT_Recipe>( 10), "gt.recipe.gasturbinefuel" , "Gas Turbine Fuel" , null , RES_PATH_GUI+"basicmachines/Default" , 1, 1, 0, 0, 1, "Fuel Value: " , 1000, " EU" , T, T);
- public static final GT_Recipe_Map_Fuel sHotFuels = new GT_Recipe_Map_Fuel (new HashSet<GT_Recipe>( 10), "gt.recipe.thermalgeneratorfuel" , "Thermal Generator Fuel" , null , RES_PATH_GUI+"basicmachines/Default" , 1, 1, 0, 0, 1, "Fuel Value: " , 1000, " EU" , T, F);
- public static final GT_Recipe_Map_Fuel sDenseLiquidFuels = new GT_Recipe_Map_Fuel (new HashSet<GT_Recipe>( 10), "gt.recipe.semifluidboilerfuels" , "Semifluid Boiler Fuels" , null , RES_PATH_GUI+"basicmachines/Default" , 1, 1, 0, 0, 1, "Fuel Value: " , 1000, " EU" , T, T);
- public static final GT_Recipe_Map_Fuel sPlasmaFuels = new GT_Recipe_Map_Fuel (new HashSet<GT_Recipe>( 10), "gt.recipe.plasmageneratorfuels" , "Plasma generator Fuels" , null , RES_PATH_GUI+"basicmachines/Default" , 1, 1, 0, 0, 1, "Fuel Value: " , 1000, " EU" , T, T);
- public static final GT_Recipe_Map_Fuel sMagicFuels = new GT_Recipe_Map_Fuel (new HashSet<GT_Recipe>( 10), "gt.recipe.magicfuels" , "Magic Fuels" , null , RES_PATH_GUI+"basicmachines/Default" , 1, 1, 0, 0, 1, "Fuel Value: " , 1000, " EU" , T, T);
- public static final GT_Recipe_Map_Fuel sSmallNaquadahReactorFuels = new GT_Recipe_Map_Fuel (new HashSet<GT_Recipe>( 10), "gt.recipe.smallnaquadahreactor" , "Small Naquadah Reactor" , null , RES_PATH_GUI+"basicmachines/Default" , 1, 1, 0, 0, 1, "Fuel Value: " , 1000, " EU" , T, T);
- public static final GT_Recipe_Map_Fuel sLargeNaquadahReactorFuels = new GT_Recipe_Map_Fuel (new HashSet<GT_Recipe>( 10), "gt.recipe.largenaquadahreactor" , "Large Naquadah Reactor" , null , RES_PATH_GUI+"basicmachines/Default" , 1, 1, 0, 0, 1, "Fuel Value: " , 1000, " EU" , T, T);
- public static final GT_Recipe_Map_Fuel sFluidNaquadahReactorFuels = new GT_Recipe_Map_Fuel (new HashSet<GT_Recipe>( 10), "gt.recipe.fluidnaquadahreactor" , "Fluid Naquadah Reactor" , null , RES_PATH_GUI+"basicmachines/Default" , 1, 1, 0, 0, 1, "Fuel Value: " , 1000, " EU" , T, T);
-
- /** HashMap of Recipes based on their Items */
- public final Map<GT_ItemStack, Collection<GT_Recipe>> mRecipeItemMap = new HashMap<GT_ItemStack, Collection<GT_Recipe>>();
- /** HashMap of Recipes based on their Fluids */
- public final Map<Fluid, Collection<GT_Recipe>> mRecipeFluidMap = new HashMap<Fluid, Collection<GT_Recipe>>();
- /** The List of all Recipes */
- public final Collection<GT_Recipe> mRecipeList;
- /** String used as an unlocalised Name. */
- public final String mUnlocalizedName;
- /** String used in NEI for the Recipe Lists. If null it will use the unlocalised Name instead*/
- public final String mNEIName;
- /** GUI used for NEI Display. Usually the GUI of the Machine itself */
- public final String mNEIGUIPath;
- public final String mNEISpecialValuePre, mNEISpecialValuePost;
- public final int mUsualInputCount, mUsualOutputCount, mNEISpecialValueMultiplier, mMinimalInputItems, mMinimalInputFluids, mAmperage;
- public final boolean mNEIAllowed, mShowVoltageAmperageInNEI;
-
- /**
- * Initialises a new type of Recipe Handler.
- * @param aRecipeList a List you specify as Recipe List. Usually just an ArrayList with a pre-initialised Size.
- * @param aUnlocalizedName the unlocalised Name of this Recipe Handler, used mainly for NEI.
- * @param aLocalName the displayed Name inside the NEI Recipe GUI.
- * @param aNEIGUIPath the displayed GUI Texture, usually just a Machine GUI. Auto-Attaches ".png" if forgotten.
- * @param aUsualInputCount the usual amount of Input Slots this Recipe Class has.
- * @param aUsualOutputCount the usual amount of Output Slots this Recipe Class has.
- * @param aNEISpecialValuePre the String in front of the Special Value in NEI.
- * @param aNEISpecialValueMultiplier the Value the Special Value is getting Multiplied with before displaying
- * @param aNEISpecialValuePost the String after the Special Value. Usually for a Unit or something.
- * @param aNEIAllowed if NEI is allowed to display this Recipe Handler in general.
- */
- public GT_Recipe_Map(Collection<GT_Recipe> aRecipeList, String aUnlocalizedName, String aLocalName, String aNEIName, String aNEIGUIPath, int aUsualInputCount, int aUsualOutputCount, int aMinimalInputItems, int aMinimalInputFluids, int aAmperage, String aNEISpecialValuePre, int aNEISpecialValueMultiplier, String aNEISpecialValuePost, boolean aShowVoltageAmperageInNEI, boolean aNEIAllowed) {
- sMappings.add(this);
- mNEIAllowed = aNEIAllowed;
- mShowVoltageAmperageInNEI = aShowVoltageAmperageInNEI;
- mRecipeList = aRecipeList;
- mNEIName = aNEIName == null ? aUnlocalizedName : aNEIName;
- mNEIGUIPath = aNEIGUIPath.endsWith(".png")?aNEIGUIPath:aNEIGUIPath + ".png";
- mNEISpecialValuePre = aNEISpecialValuePre;
- mNEISpecialValueMultiplier = aNEISpecialValueMultiplier;
- mNEISpecialValuePost = aNEISpecialValuePost;
- mAmperage = aAmperage;
- mUsualInputCount = aUsualInputCount;
- mUsualOutputCount = aUsualOutputCount;
- mMinimalInputItems = aMinimalInputItems;
- mMinimalInputFluids = aMinimalInputFluids;
- GregTech_API.sFluidMappings.add(mRecipeFluidMap);
- GregTech_API.sItemStackMappings.add(mRecipeItemMap);
- GT_LanguageManager.addStringLocalization(mUnlocalizedName = aUnlocalizedName, aLocalName);
- }
-
- public GT_Recipe addRecipe(boolean aOptimize, ItemStack[] aInputs, ItemStack[] aOutputs, Object aSpecial, int[] aOutputChances, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, int aDuration, int aEUt, int aSpecialValue) {
- return addRecipe(new GT_Recipe(aOptimize, aInputs, aOutputs, aSpecial, aOutputChances, aFluidInputs, aFluidOutputs, aDuration, aEUt, aSpecialValue));
- }
-
- public GT_Recipe addRecipe(int[] aOutputChances, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, int aDuration, int aEUt, int aSpecialValue) {
- return addRecipe(new GT_Recipe(false, null, null, null, aOutputChances, aFluidInputs, aFluidOutputs, aDuration, aEUt, aSpecialValue),F,F,F);
- }
-
- public GT_Recipe addRecipe(boolean aOptimize, ItemStack[] aInputs, ItemStack[] aOutputs, Object aSpecial, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, int aDuration, int aEUt, int aSpecialValue) {
- return addRecipe(new GT_Recipe(aOptimize, aInputs, aOutputs, aSpecial, null, aFluidInputs, aFluidOutputs, aDuration, aEUt, aSpecialValue));
- }
-
- public GT_Recipe addRecipe(GT_Recipe aRecipe) {
- return addRecipe(aRecipe, T, F, F);
- }
-
- protected GT_Recipe addRecipe(GT_Recipe aRecipe, boolean aCheckForCollisions, boolean aFakeRecipe, boolean aHidden) {
- aRecipe.mHidden = aHidden;
- aRecipe.mFakeRecipe = aFakeRecipe;
- if (aRecipe.mFluidInputs.length < mMinimalInputFluids && aRecipe.mInputs.length < mMinimalInputItems) return null;
- if (aCheckForCollisions && findRecipe(null, F, Long.MAX_VALUE, aRecipe.mFluidInputs, aRecipe.mInputs) != null) return null;
- return add(aRecipe);
- }
-
- /** Only used for fake Recipe Handlers to show something in NEI, do not use this for adding actual Recipes! findRecipe wont find fake Recipes, containsInput WILL find fake Recipes */
- public GT_Recipe addFakeRecipe(boolean aCheckForCollisions, ItemStack[] aInputs, ItemStack[] aOutputs, Object aSpecial, int[] aOutputChances, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, int aDuration, int aEUt, int aSpecialValue) {
- return addFakeRecipe(aCheckForCollisions, new GT_Recipe(F, aInputs, aOutputs, aSpecial, aOutputChances, aFluidInputs, aFluidOutputs, aDuration, aEUt, aSpecialValue));
- }
-
- /** Only used for fake Recipe Handlers to show something in NEI, do not use this for adding actual Recipes! findRecipe wont find fake Recipes, containsInput WILL find fake Recipes */
- public GT_Recipe addFakeRecipe(boolean aCheckForCollisions, ItemStack[] aInputs, ItemStack[] aOutputs, Object aSpecial, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, int aDuration, int aEUt, int aSpecialValue) {
- return addFakeRecipe(aCheckForCollisions, new GT_Recipe(F, aInputs, aOutputs, aSpecial, null, aFluidInputs, aFluidOutputs, aDuration, aEUt, aSpecialValue));
- }
-
- /** Only used for fake Recipe Handlers to show something in NEI, do not use this for adding actual Recipes! findRecipe wont find fake Recipes, containsInput WILL find fake Recipes */
- public GT_Recipe addFakeRecipe(boolean aCheckForCollisions, GT_Recipe aRecipe) {
- return addRecipe(aRecipe, aCheckForCollisions, T, F);
- }
-
- public GT_Recipe add(GT_Recipe aRecipe) {
- mRecipeList.add(aRecipe);
- for (FluidStack aFluid : aRecipe.mFluidInputs) if (aFluid != null) {
- Collection<GT_Recipe> tList = mRecipeFluidMap.get(aFluid.getFluid());
- if (tList == null) mRecipeFluidMap.put(aFluid.getFluid(), tList = new HashSet<GT_Recipe>(1));
- tList.add(aRecipe);
- }
- return addToItemMap(aRecipe);
- }
-
- public void reInit() {
- Map<GT_ItemStack, Collection<GT_Recipe>> tMap = mRecipeItemMap;
- if (tMap != null) tMap.clear();
- for (GT_Recipe tRecipe : mRecipeList) {
- GT_OreDictUnificator.setStackArray(T, tRecipe.mInputs);
- GT_OreDictUnificator.setStackArray(T, tRecipe.mOutputs);
- if (tMap != null) addToItemMap(tRecipe);
- }
- }
-
- /** @return if this Item is a valid Input for any for the Recipes */
- public boolean containsInput(ItemStack aStack) {
- return aStack != null && (mRecipeItemMap.containsKey(new GT_ItemStack(aStack)) || mRecipeItemMap.containsKey(new GT_ItemStack(GT_Utility.copyMetaData(W, aStack))));
- }
-
- /** @return if this Fluid is a valid Input for any for the Recipes */
- public boolean containsInput(FluidStack aFluid) {
- return aFluid != null && containsInput(aFluid.getFluid());
- }
-
- /** @return if this Fluid is a valid Input for any for the Recipes */
- public boolean containsInput(Fluid aFluid) {
- return aFluid != null && mRecipeFluidMap.containsKey(aFluid);
- }
-
- public GT_Recipe findRecipe(IHasWorldObjectAndCoords aTileEntity, boolean aNotUnificated, long aVoltage, FluidStack[] aFluids, ItemStack... aInputs) {
- return findRecipe(aTileEntity, null, aNotUnificated, aVoltage, aFluids, null, aInputs);
- }
-
- public GT_Recipe findRecipe(IHasWorldObjectAndCoords aTileEntity, GT_Recipe aRecipe, boolean aNotUnificated, long aVoltage, FluidStack[] aFluids, ItemStack... aInputs) {
- return findRecipe(aTileEntity, aRecipe, aNotUnificated, aVoltage, aFluids, null, aInputs);
- }
-
- /**
- * finds a Recipe matching the aFluid and ItemStack Inputs.
- * @param aTileEntity an Object representing the current coordinates of the executing Block/Entity/Whatever. This may be null, especially during Startup.
- * @param aRecipe in case this is != null it will try to use this Recipe first when looking things up.
- * @param aNotUnificated if this is T the Recipe searcher will unificate the ItemStack Inputs
- * @param aVoltage Voltage of the Machine or Long.MAX_VALUE if it has no Voltage
- * @param aFluids the Fluid Inputs
- * @param aSpecialSlot the content of the Special Slot, the regular Manager doesn't do anything with this, but some custom ones do.
- * @param aInputs the Item Inputs
- * @return the Recipe it has found or null for no matching Recipe
- */
- public GT_Recipe findRecipe(IHasWorldObjectAndCoords aTileEntity, GT_Recipe aRecipe, boolean aNotUnificated, long aVoltage, FluidStack[] aFluids, ItemStack aSpecialSlot, ItemStack... aInputs) {
- // No Recipes? Well, nothing to be found then.
- if (mRecipeList.isEmpty()) return null;
-
- // Some Recipe Classes require a certain amount of Inputs of certain kinds. Like "at least 1 Fluid + 1 Stack" or "at least 2 Stacks" before they start searching for Recipes.
- // This improves Performance massively, especially if people leave things like Circuits, Molds or Shapes in their Machines to select Sub Recipes.
- if (GregTech_API.sPostloadFinished) {
- if (mMinimalInputFluids > 0) {
- if (aFluids == null) return null;
- int tAmount = 0;
- for (FluidStack aFluid : aFluids) if (aFluid != null) tAmount++;
- if (tAmount < mMinimalInputFluids) return null;
- }
- if (mMinimalInputItems > 0) {
- if (aInputs == null) return null;
- int tAmount = 0;
- for (ItemStack aInput : aInputs) if (aInput != null) tAmount++;
- if (tAmount < mMinimalInputItems) return null;
- }
- }
-
- // Unification happens here in case the Input isn't already unificated.
- if (aNotUnificated) aInputs = GT_OreDictUnificator.getStackArray(T, (Object[])aInputs);
-
- // Check the Recipe which has been used last time in order to not have to search for it again, if possible.
- if (aRecipe != null) if (!aRecipe.mFakeRecipe && aRecipe.mCanBeBuffered && aRecipe.isRecipeInputEqual(F, T, aFluids, aInputs)) return aRecipe.mEnabled&&aVoltage*mAmperage>=aRecipe.mEUt?aRecipe:null;
-
- // Now look for the Recipes inside the Item HashMaps, but only when the Recipes usually have Items.
- if (mUsualInputCount > 0 && aInputs != null) for (ItemStack tStack : aInputs) if (tStack != null) {
- Collection<GT_Recipe>
- tRecipes = mRecipeItemMap.get(new GT_ItemStack(tStack));
- if (tRecipes != null) for (GT_Recipe tRecipe : tRecipes) if (!tRecipe.mFakeRecipe && tRecipe.isRecipeInputEqual(F, T, aFluids, aInputs)) return tRecipe.mEnabled&&aVoltage*mAmperage>=tRecipe.mEUt?tRecipe:null;
- tRecipes = mRecipeItemMap.get(new GT_ItemStack(GT_Utility.copyMetaData(W, tStack)));
- if (tRecipes != null) for (GT_Recipe tRecipe : tRecipes) if (!tRecipe.mFakeRecipe && tRecipe.isRecipeInputEqual(F, T, aFluids, aInputs)) return tRecipe.mEnabled&&aVoltage*mAmperage>=tRecipe.mEUt?tRecipe:null;
- }
-
- // If the minimal Amount of Items for the Recipe is 0, then it could be a Fluid-Only Recipe, so check that Map too.
- if (mMinimalInputItems == 0 && aFluids != null) for (FluidStack aFluid : aFluids) if (aFluid != null) {
- Collection<GT_Recipe>
- tRecipes = mRecipeFluidMap.get(aFluid.getFluid());
- if (tRecipes != null) for (GT_Recipe tRecipe : tRecipes) if (!tRecipe.mFakeRecipe && tRecipe.isRecipeInputEqual(F, T, aFluids, aInputs)) return tRecipe.mEnabled&&aVoltage*mAmperage>=tRecipe.mEUt?tRecipe:null;
- }
-
- // And nothing has been found.
- return null;
- }
-
- protected GT_Recipe addToItemMap(GT_Recipe aRecipe) {
- for (ItemStack aStack : aRecipe.mInputs) if (aStack != null) {
- GT_ItemStack tStack = new GT_ItemStack(aStack);
- Collection<GT_Recipe> tList = mRecipeItemMap.get(tStack);
- if (tList == null) mRecipeItemMap.put(tStack, tList = new HashSet<GT_Recipe>(1));
- tList.add(aRecipe);
- }
- return aRecipe;
- }
- }
-
- public static void reInit() {
- GT_Log.out.println("GT_Mod: Re-Unificating Recipes.");
- for (GT_Recipe_Map tMapEntry : GT_Recipe_Map.sMappings) tMapEntry.reInit();
- }
-
- /** If you want to change the Output, feel free to modify or even replace the whole ItemStack Array, for Inputs, please add a new Recipe, because of the HashMaps. */
- public ItemStack[] mInputs, mOutputs;
- /** If you want to change the Output, feel free to modify or even replace the whole ItemStack Array, for Inputs, please add a new Recipe, because of the HashMaps. */
- public FluidStack[] mFluidInputs, mFluidOutputs;
- /** If you changed the amount of Array-Items inside the Output Array then the length of this Array must be larger or equal to the Output Array. A chance of 10000 equals 100% */
- public int[] mChances;
- /** An Item that needs to be inside the Special Slot, like for example the Copy Slot inside the Printer. This is only useful for Fake Recipes in NEI, since findRecipe() and containsInput() don't give a shit about this Field. Lists are also possible. */
- public Object mSpecialItems;
-
- public int mDuration, mEUt, mSpecialValue;
-
- /** Use this to just disable a specific Recipe, but the Configuration enables that already for every single Recipe. */
- public boolean mEnabled = T;
- /** If this Recipe is hidden from NEI */
- public boolean mHidden = F;
- /** If this Recipe is Fake and therefore doesn't get found by the findRecipe Function (It is still in the HashMaps, so that containsInput does return T on those fake Inputs) */
- public boolean mFakeRecipe = F;
- /** If this Recipe can be stored inside a Machine in order to make Recipe searching more Efficient by trying the previously used Recipe first. In case you have a Recipe Map overriding things and returning one time use Recipes, you have to set this to F. */
- public boolean mCanBeBuffered = T;
- /** If this Recipe needs the Output Slots to be completely empty. Needed in case you have randomised Outputs */
- public boolean mNeedsEmptyOutput = F;
-
- public ItemStack getRepresentativeInput(int aIndex) {if (aIndex < 0 || aIndex >= mInputs.length) return null; return GT_Utility.copy(mInputs[aIndex]);}
- public ItemStack getOutput(int aIndex) {if (aIndex < 0 || aIndex >= mOutputs.length) return null; return GT_Utility.copy(mOutputs[aIndex]);}
-
- public int getOutputChance(int aIndex) {if (aIndex < 0 || aIndex >= mChances.length) return 10000; return mChances[aIndex];}
-
- public FluidStack getRepresentativeFluidInput(int aIndex) {if (aIndex < 0 || aIndex >= mFluidInputs.length || mFluidInputs[aIndex] == null) return null; return mFluidInputs[aIndex].copy();}
- public FluidStack getFluidOutput(int aIndex) {if (aIndex < 0 || aIndex >= mFluidOutputs.length || mFluidOutputs[aIndex] == null) return null; return mFluidOutputs[aIndex].copy();}
-
- public void checkCellBalance() {
- if (!D2 || mInputs.length < 1) return;
-
- int tInputAmount = GT_ModHandler.getCapsuleCellContainerCountMultipliedWithStackSize(mInputs);
- int tOutputAmount = GT_ModHandler.getCapsuleCellContainerCountMultipliedWithStackSize(mOutputs);
-
- if (tInputAmount < tOutputAmount) {
- if (!Materials.Tin.contains(mInputs)) {
- GT_Log.err.println("You get more Cells, than you put in? There must be something wrong.");
- new Exception().printStackTrace(GT_Log.err);
- }
- } else if (tInputAmount > tOutputAmount) {
- if (!Materials.Tin.contains(mOutputs)) {
- GT_Log.err.println("You get less Cells, than you put in? GT Machines usually don't destroy Cells.");
- new Exception().printStackTrace(GT_Log.err);
- }
- }
- }
-
- public GT_Recipe copy() {
- return new GT_Recipe(this);
- }
-
- public boolean isRecipeInputEqual(boolean aDecreaseStacksizeBySuccess, FluidStack[] aFluidInputs, ItemStack... aInputs) {
- return isRecipeInputEqual(aDecreaseStacksizeBySuccess, F, aFluidInputs, aInputs);
- }
-
- public boolean isRecipeInputEqual(boolean aDecreaseStacksizeBySuccess, boolean aDontCheckStackSizes, FluidStack[] aFluidInputs, ItemStack... aInputs) {
- if (mFluidInputs.length > 0 && aFluidInputs == null) return F;
- for (FluidStack tFluid : mFluidInputs) if (tFluid != null) {
- boolean temp = T;
- for (FluidStack aFluid : aFluidInputs) if (aFluid != null && aFluid.isFluidEqual(tFluid) && (aDontCheckStackSizes || aFluid.amount >= tFluid.amount)) {temp = F; break;}
- if (temp) return F;
- }
-
- if (mInputs.length > 0 && aInputs == null) return F;
-
- for (ItemStack tStack : mInputs) if (tStack != null) {
- boolean temp = T;
- for (ItemStack aStack : aInputs) if ((GT_Utility.areUnificationsEqual(aStack, tStack, T) || GT_Utility.areUnificationsEqual(GT_OreDictUnificator.get(F, aStack), tStack, T)) && (aDontCheckStackSizes || aStack.stackSize >= tStack.stackSize)) {temp = F; break;}
- if (temp) return F;
- }
-
- if (aDecreaseStacksizeBySuccess) {
- if (aFluidInputs != null) {
- for (FluidStack tFluid : mFluidInputs) if (tFluid != null) {
- for (FluidStack aFluid : aFluidInputs) if (aFluid != null && aFluid.isFluidEqual(tFluid) && (aDontCheckStackSizes || aFluid.amount >= tFluid.amount)) {aFluid.amount -= tFluid.amount; break;}
- }
- }
-
- if (aInputs != null) {
- for (ItemStack tStack : mInputs) if (tStack != null) {
- for (ItemStack aStack : aInputs) if ((GT_Utility.areUnificationsEqual(aStack, tStack, T) || GT_Utility.areUnificationsEqual(GT_OreDictUnificator.get(F, aStack), tStack, T)) && (aDontCheckStackSizes || aStack.stackSize >= tStack.stackSize)) {aStack.stackSize -= tStack.stackSize; break;}
- }
- }
- }
-
- return T;
- }
-
- private GT_Recipe(GT_Recipe aRecipe) {
- mInputs = GT_Utility.copyStackArray((Object[])aRecipe.mInputs);
- mOutputs = GT_Utility.copyStackArray((Object[])aRecipe.mOutputs);
- mSpecialItems = aRecipe.mSpecialItems;
- mChances = aRecipe.mChances;
- mFluidInputs = GT_Utility.copyFluidArray(aRecipe.mFluidInputs);
- mFluidOutputs = GT_Utility.copyFluidArray(aRecipe.mFluidOutputs);
- mDuration = aRecipe.mDuration;
- mSpecialValue = aRecipe.mSpecialValue;
- mEUt = aRecipe.mEUt;
- mNeedsEmptyOutput = aRecipe.mNeedsEmptyOutput;
- mCanBeBuffered = aRecipe.mCanBeBuffered;
- mFakeRecipe = aRecipe.mFakeRecipe;
- mEnabled = aRecipe.mEnabled;
- mHidden = aRecipe.mHidden;
- }
-
- protected GT_Recipe(boolean aOptimize, ItemStack[] aInputs, ItemStack[] aOutputs, Object aSpecialItems, int[] aChances, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, int aDuration, int aEUt, int aSpecialValue) {
- if (aInputs == null) aInputs = new ItemStack[0];
- if (aOutputs == null) aOutputs = new ItemStack[0];
- if (aFluidInputs == null) aFluidInputs = new FluidStack[0];
- if (aFluidOutputs == null) aFluidOutputs = new FluidStack[0];
- if (aChances == null) aChances = new int[aOutputs.length];
- if (aChances.length < aOutputs.length) aChances = Arrays.copyOf(aChances, aOutputs.length);
-
- aInputs = GT_Utility.getArrayListWithoutTrailingNulls(aInputs ).toArray(new ItemStack[0]);
- aOutputs = GT_Utility.getArrayListWithoutTrailingNulls(aOutputs ).toArray(new ItemStack[0]);
- aFluidInputs = GT_Utility.getArrayListWithoutNulls(aFluidInputs ).toArray(new FluidStack[0]);
- aFluidOutputs = GT_Utility.getArrayListWithoutNulls(aFluidOutputs ).toArray(new FluidStack[0]);
-
- GT_OreDictUnificator.setStackArray(T, aInputs);
- GT_OreDictUnificator.setStackArray(T, aOutputs);
-
- for (ItemStack tStack : aOutputs) GT_Utility.updateItemStack(tStack);
-
- for (int i = 0; i < aChances .length; i++) if (aChances[i] <= 0) aChances[i] = 10000;
- for (int i = 0; i < aFluidInputs .length; i++) aFluidInputs [i] = new GT_FluidStack(aFluidInputs [i]);
- for (int i = 0; i < aFluidOutputs .length; i++) aFluidOutputs[i] = new GT_FluidStack(aFluidOutputs[i]);
-
- for (int i = 0; i < aInputs.length; i++) if (aInputs[i] != null && Items.feather.getDamage(aInputs[i]) != W) for (int j = 0; j < aOutputs.length; j++) {
- if (GT_Utility.areStacksEqual(aInputs[i], aOutputs[j])) {
- if (aInputs[i].stackSize >= aOutputs[j].stackSize) {
- aInputs[i].stackSize -= aOutputs[j].stackSize;
- aOutputs[j] = null;
- } else {
- aOutputs[j].stackSize -= aInputs[i].stackSize;
- }
- }
- }
-
- if (aOptimize && aDuration >= 32) {
- ArrayList<ItemStack> tList = new ArrayList<ItemStack>();
- tList.addAll(Arrays.asList(aInputs));
- tList.addAll(Arrays.asList(aOutputs));
- for (int i = 0; i < tList.size(); i++) if (tList.get(i) == null) tList.remove(i--);
-
- for (byte i = (byte)Math.min(64, aDuration / 16); i > 1; i--) if (aDuration / i >= 16) {
- boolean temp = T;
- for (int j = 0, k = tList.size(); temp && j < k; j++) if (tList.get(j).stackSize % i != 0) temp = F;
- for (int j = 0; temp && j < aFluidInputs .length; j++) if (aFluidInputs [j].amount % i != 0) temp = F;
- for (int j = 0; temp && j < aFluidOutputs.length; j++) if (aFluidOutputs[j].amount % i != 0) temp = F;
- if (temp) {
- for (int j = 0, k = tList.size(); j < k; j++) tList.get(j).stackSize /= i;
- for (int j = 0; j < aFluidInputs .length; j++) aFluidInputs [j].amount /= i;
- for (int j = 0; j < aFluidOutputs.length; j++) aFluidOutputs[j].amount /= i;
- aDuration /= i;
- }
- }
- }
-
- mInputs = aInputs;
- mOutputs = aOutputs;
- mSpecialItems = aSpecialItems;
- mChances = aChances;
- mFluidInputs = aFluidInputs;
- mFluidOutputs = aFluidOutputs;
- mDuration = aDuration;
- mSpecialValue = aSpecialValue;
- mEUt = aEUt;
-
-// checkCellBalance();
- }
-
- // -----
- // Old Constructors, do not use!
- // -----
-
- public GT_Recipe(ItemStack aInput1, ItemStack aOutput1, int aFuelValue, int aType) {
- this(aInput1, aOutput1, null, null, null, aFuelValue, aType);
- }
-
- // aSpecialValue = EU per Liter! If there is no Liquid for this Object, then it gets multiplied with 1000!
- public GT_Recipe(ItemStack aInput1, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, ItemStack aOutput4, int aSpecialValue, int aType) {
- this(T, new ItemStack[] {aInput1}, new ItemStack[] {aOutput1, aOutput2, aOutput3, aOutput4}, null, null, null, null, 0, 0, Math.max(1, aSpecialValue));
-
- if (mInputs.length > 0 && aSpecialValue > 0) {
- switch (aType) {
- // Diesel Generator
- case 0:
- GT_Recipe_Map.sDieselFuels.addRecipe(this);
- break;
- // Gas Turbine
- case 1:
- GT_Recipe_Map.sTurbineFuels.addRecipe(this);
- break;
- // Thermal Generator
- case 2:
- GT_Recipe_Map.sHotFuels.addRecipe(this);
- break;
- // Plasma Generator
- case 4:
- GT_Recipe_Map.sPlasmaFuels.addRecipe(this);
- break;
- // Magic Generator
- case 5:
- GT_Recipe_Map.sMagicFuels.addRecipe(this);
- break;
- // Fluid Generator. Usually 3. Every wrong Type ends up in the Semifluid Generator
- default:
- GT_Recipe_Map.sDenseLiquidFuels.addRecipe(this);
- break;
- }
- }
- }
-
- public GT_Recipe(FluidStack aInput1, FluidStack aInput2, FluidStack aOutput1, int aDuration, int aEUt, int aSpecialValue) {
- this(T, null, null, null, null,new FluidStack[] {aInput1, aInput2}, new FluidStack[] {aOutput1}, Math.max(aDuration, 1), aEUt, Math.max(Math.min(aSpecialValue, 160000000), 0));
- if (mInputs.length > 1) {
- GT_Recipe_Map.sFusionRecipes.addRecipe(this);
- }
- }
-
- public GT_Recipe(ItemStack aInput1, ItemStack aOutput1, ItemStack aOutput2, int aDuration, int aEUt) {
- this(T, new ItemStack[] {aInput1}, new ItemStack[] {aOutput1, aOutput2}, null, null, null, null, aDuration, aEUt, 0);
- if (mInputs.length > 0 && mOutputs[0] != null) {
- GT_Recipe_Map.sLatheRecipes.addRecipe(this);
- }
- }
-
- public GT_Recipe(ItemStack aInput1, int aCellAmount, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, ItemStack aOutput4, int aDuration, int aEUt) {
- this(T, new ItemStack[] {aInput1, aCellAmount>0?ItemList.Cell_Empty.get(Math.min(64, Math.max(1, aCellAmount))):null}, new ItemStack[] {aOutput1, aOutput2, aOutput3, aOutput4}, null, null, null, null, Math.max(aDuration, 1), Math.max(aEUt, 1), 0);
- if (mInputs.length > 0 && mOutputs[0] != null) {
- GT_Recipe_Map.sDistillationRecipes.addRecipe(this);
- }
- }
-
- public GT_Recipe(ItemStack aInput1, int aInput2, ItemStack aOutput1, ItemStack aOutput2) {
- this(T, new ItemStack[] {aInput1, GT_ModHandler.getIC2Item("industrialTnt", aInput2>0?aInput2<64?aInput2:64:1, new ItemStack(Blocks.tnt, aInput2>0?aInput2<64?aInput2:64:1))}, new ItemStack[] {aOutput1, aOutput2}, null, null, null, null, 20, 30, 0);
- if (mInputs.length > 0 && mOutputs[0] != null) {
- GT_Recipe_Map.sImplosionRecipes.addRecipe(this);
- }
- }
-
- public GT_Recipe(int aEUt, int aDuration, ItemStack aInput1, ItemStack aOutput1) {
- this(T, new ItemStack[] {aInput1, ItemList.Circuit_Integrated.getWithDamage(0, aInput1.stackSize)}, new ItemStack[] {aOutput1}, null, null, null, null, Math.max(aDuration, 1), Math.max(aEUt, 1), 0);
- if (mInputs.length > 0 && mOutputs[0] != null) {
- GT_Recipe_Map.sBenderRecipes.addRecipe(this);
- }
- }
-
- public GT_Recipe(ItemStack aInput1, ItemStack aInput2, int aEUt, int aDuration, ItemStack aOutput1) {
- this(T, aInput2==null ? new ItemStack[] {aInput1} : new ItemStack[] {aInput1, aInput2}, new ItemStack[] {aOutput1}, null, null, null, null, Math.max(aDuration, 1), Math.max(aEUt, 1), 0);
- if (mInputs.length > 0 && mOutputs[0] != null) {
- GT_Recipe_Map.sAlloySmelterRecipes.addRecipe(this);
- }
- }
-
- public GT_Recipe(ItemStack aInput1, int aEUt, ItemStack aInput2, int aDuration, ItemStack aOutput1, ItemStack aOutput2) {
- this(T, aInput2==null?new ItemStack[] {aInput1}:new ItemStack[] {aInput1, aInput2}, new ItemStack[] {aOutput1, aOutput2}, null, null, null, null, Math.max(aDuration, 1), Math.max(aEUt, 1), 0);
- if (mInputs.length > 0 && mOutputs[0] != null) {
- GT_Recipe_Map.sCannerRecipes.addRecipe(this);
- }
- }
-
- public GT_Recipe(ItemStack aInput1, ItemStack aOutput1, int aDuration) {
- this(T, new ItemStack[] {aInput1}, new ItemStack[] {aOutput1}, null, null, null, null, Math.max(aDuration, 1), 120, 0);
- if (mInputs.length > 0 && mOutputs[0] != null) {
- GT_Recipe_Map.sVacuumRecipes.addRecipe(this);
- }
- }
-
- // -----------------------------------------------------------------------------------------------------------------
- // Here are a few Classes I use for Special Cases in some Machines without having to write a separate Machine Class.
- // -----------------------------------------------------------------------------------------------------------------
-
- /**
- * Abstract Class for general Recipe Handling of non GT Recipes
- */
- public static abstract class GT_Recipe_Map_NonGTRecipes extends GT_Recipe_Map {
- public GT_Recipe_Map_NonGTRecipes(Collection<GT_Recipe> aRecipeList, String aUnlocalizedName, String aLocalName, String aNEIName, String aNEIGUIPath, int aUsualInputCount, int aUsualOutputCount, int aMinimalInputItems, int aMinimalInputFluids, int aAmperage, String aNEISpecialValuePre, int aNEISpecialValueMultiplier, String aNEISpecialValuePost, boolean aShowVoltageAmperageInNEI, boolean aNEIAllowed) {
- super(aRecipeList, aUnlocalizedName, aLocalName, aNEIName, aNEIGUIPath, aUsualInputCount, aUsualOutputCount, aMinimalInputItems, aMinimalInputFluids, aAmperage, aNEISpecialValuePre, aNEISpecialValueMultiplier, aNEISpecialValuePost, aShowVoltageAmperageInNEI, aNEIAllowed);
- }
-
- @Override public boolean containsInput(ItemStack aStack) {return F;}
- @Override public boolean containsInput(FluidStack aFluid) {return F;}
- @Override public boolean containsInput(Fluid aFluid) {return F;}
-
- @Override public GT_Recipe addRecipe(boolean aOptimize, ItemStack[] aInputs, ItemStack[] aOutputs, Object aSpecial, int[] aOutputChances, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, int aDuration, int aEUt, int aSpecialValue) {return null;}
- @Override public GT_Recipe addRecipe(boolean aOptimize, ItemStack[] aInputs, ItemStack[] aOutputs, Object aSpecial, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, int aDuration, int aEUt, int aSpecialValue) {return null;}
- @Override public GT_Recipe addRecipe(GT_Recipe aRecipe) {return null;}
- @Override public GT_Recipe addFakeRecipe(boolean aCheckForCollisions, ItemStack[] aInputs, ItemStack[] aOutputs, Object aSpecial, int[] aOutputChances, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, int aDuration, int aEUt, int aSpecialValue) {return null;}
- @Override public GT_Recipe addFakeRecipe(boolean aCheckForCollisions, ItemStack[] aInputs, ItemStack[] aOutputs, Object aSpecial, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, int aDuration, int aEUt, int aSpecialValue) {return null;}
- @Override public GT_Recipe addFakeRecipe(boolean aCheckForCollisions, GT_Recipe aRecipe) {return null;}
- @Override public GT_Recipe add(GT_Recipe aRecipe) {return null;}
- @Override public void reInit() {/**/}
- @Override protected GT_Recipe addToItemMap(GT_Recipe aRecipe) {return null;}
- }
-
- /**
- * Just a Recipe Map with Utility specifically for Fuels.
- */
- public static class GT_Recipe_Map_Fuel extends GT_Recipe_Map {
- public GT_Recipe_Map_Fuel(Collection<GT_Recipe> aRecipeList, String aUnlocalizedName, String aLocalName, String aNEIName, String aNEIGUIPath, int aUsualInputCount, int aUsualOutputCount, int aMinimalInputItems, int aMinimalInputFluids, int aAmperage, String aNEISpecialValuePre, int aNEISpecialValueMultiplier, String aNEISpecialValuePost, boolean aShowVoltageAmperageInNEI, boolean aNEIAllowed) {
- super(aRecipeList, aUnlocalizedName, aLocalName, aNEIName, aNEIGUIPath, aUsualInputCount, aUsualOutputCount, aMinimalInputItems, aMinimalInputFluids, aAmperage, aNEISpecialValuePre, aNEISpecialValueMultiplier, aNEISpecialValuePost, aShowVoltageAmperageInNEI, aNEIAllowed);
- }
-
- public GT_Recipe addFuel(ItemStack aInput, ItemStack aOutput, int aFuelValueInEU) {
- return addFuel(aInput, aOutput, null, null, 10000, aFuelValueInEU);
- }
-
- public GT_Recipe addFuel(ItemStack aInput, ItemStack aOutput, int aChance, int aFuelValueInEU) {
- return addFuel(aInput, aOutput, null, null, aChance, aFuelValueInEU);
- }
-
- public GT_Recipe addFuel(FluidStack aFluidInput, FluidStack aFluidOutput, int aFuelValueInEU) {
- return addFuel(null, null, aFluidInput, aFluidOutput, 10000, aFuelValueInEU);
- }
-
- public GT_Recipe addFuel(ItemStack aInput, ItemStack aOutput, FluidStack aFluidInput, FluidStack aFluidOutput, int aFuelValueInEU) {
- return addFuel(aInput, aOutput, aFluidInput, aFluidOutput, 10000, aFuelValueInEU);
- }
-
- public GT_Recipe addFuel(ItemStack aInput, ItemStack aOutput, FluidStack aFluidInput, FluidStack aFluidOutput, int aChance, int aFuelValueInEU) {
- return addRecipe(T, new ItemStack[] {aInput}, new ItemStack[] {aOutput}, null, new int[] {aChance}, new FluidStack[] {aFluidInput}, new FluidStack[] {aFluidOutput}, 0, 0, aFuelValueInEU);
- }
- }
-
- /**
- * Special Class for Furnace Recipe handling.
- */
- public static class GT_Recipe_Map_Furnace extends GT_Recipe_Map_NonGTRecipes {
- public GT_Recipe_Map_Furnace(Collection<GT_Recipe> aRecipeList, String aUnlocalizedName, String aLocalName, String aNEIName, String aNEIGUIPath, int aUsualInputCount, int aUsualOutputCount, int aMinimalInputItems, int aMinimalInputFluids, int aAmperage, String aNEISpecialValuePre, int aNEISpecialValueMultiplier, String aNEISpecialValuePost, boolean aShowVoltageAmperageInNEI, boolean aNEIAllowed) {
- super(aRecipeList, aUnlocalizedName, aLocalName, aNEIName, aNEIGUIPath, aUsualInputCount, aUsualOutputCount, aMinimalInputItems, aMinimalInputFluids, aAmperage, aNEISpecialValuePre, aNEISpecialValueMultiplier, aNEISpecialValuePost, aShowVoltageAmperageInNEI, aNEIAllowed);
- }
-
- @Override
- public GT_Recipe findRecipe(IHasWorldObjectAndCoords aTileEntity, GT_Recipe aRecipe, boolean aNotUnificated, long aVoltage, FluidStack[] aFluids, ItemStack aSpecialSlot, ItemStack... aInputs) {
- if (aInputs == null || aInputs.length <= 0 || aInputs[0] == null) return null;
- if (aRecipe != null && aRecipe.isRecipeInputEqual(F, T, aFluids, aInputs)) return aRecipe;
- ItemStack tOutput = GT_ModHandler.getSmeltingOutput(aInputs[0], F, null);
- return tOutput == null ? null : new GT_Recipe(F, new ItemStack[] {GT_Utility.copyAmount(1, aInputs[0])}, new ItemStack[] {tOutput}, null, null, null, null, 128, 4, 0);
- }
-
- @Override public boolean containsInput(ItemStack aStack) {return GT_ModHandler.getSmeltingOutput(aStack, F, null) != null;}
- }
-
- /**
- * Special Class for Microwave Recipe handling.
- */
- public static class GT_Recipe_Map_Microwave extends GT_Recipe_Map_NonGTRecipes {
- public GT_Recipe_Map_Microwave(Collection<GT_Recipe> aRecipeList, String aUnlocalizedName, String aLocalName, String aNEIName, String aNEIGUIPath, int aUsualInputCount, int aUsualOutputCount, int aMinimalInputItems, int aMinimalInputFluids, int aAmperage, String aNEISpecialValuePre, int aNEISpecialValueMultiplier, String aNEISpecialValuePost, boolean aShowVoltageAmperageInNEI, boolean aNEIAllowed) {
- super(aRecipeList, aUnlocalizedName, aLocalName, aNEIName, aNEIGUIPath, aUsualInputCount, aUsualOutputCount, aMinimalInputItems, aMinimalInputFluids, aAmperage, aNEISpecialValuePre, aNEISpecialValueMultiplier, aNEISpecialValuePost, aShowVoltageAmperageInNEI, aNEIAllowed);
- }
-
- @Override
- public GT_Recipe findRecipe(IHasWorldObjectAndCoords aTileEntity, GT_Recipe aRecipe, boolean aNotUnificated, long aVoltage, FluidStack[] aFluids, ItemStack aSpecialSlot, ItemStack... aInputs) {
- if (aInputs == null || aInputs.length <= 0 || aInputs[0] == null) return null;
- if (aRecipe != null && aRecipe.isRecipeInputEqual(F, T, aFluids, aInputs)) return aRecipe;
- ItemStack tOutput = GT_ModHandler.getSmeltingOutput(aInputs[0], F, null);
-
- if (GT_Utility.areStacksEqual(aInputs[0], new ItemStack(Items.book, 1, W))) {
- return new GT_Recipe(F, new ItemStack[] {GT_Utility.copyAmount(1, aInputs[0])}, new ItemStack[] {GT_Utility.getWrittenBook("Manual_Microwave", ItemList.Book_Written_03.get(1))}, null, null, null, null, 32, 4, 0);
- }
-
- // Check Container Item of Input since it is around the Input, then the Input itself, then Container Item of Output and last check the Output itself
- for (ItemStack tStack : new ItemStack[] {GT_Utility.getContainerItem(aInputs[0], T), aInputs[0], GT_Utility.getContainerItem(tOutput, T), tOutput}) if (tStack != null) {
- if (GT_Utility.areStacksEqual(tStack, new ItemStack(Blocks.netherrack, 1, W), T)
- || GT_Utility.areStacksEqual(tStack, new ItemStack(Blocks.tnt, 1, W), T)
- || GT_Utility.areStacksEqual(tStack, new ItemStack(Items.egg, 1, W), T)
- || GT_Utility.areStacksEqual(tStack, new ItemStack(Items.firework_charge, 1, W), T)
- || GT_Utility.areStacksEqual(tStack, new ItemStack(Items.fireworks, 1, W), T)
- || GT_Utility.areStacksEqual(tStack, new ItemStack(Items.fire_charge, 1, W), T)
- ) {
- if (aTileEntity instanceof IGregTechTileEntity) ((IGregTechTileEntity)aTileEntity).doExplosion(aVoltage * 4);
- return null;
- }
- ItemData tData = GT_OreDictUnificator.getItemData(tStack);
-
-
-
- if (tData != null) {
- if (tData.mMaterial != null && tData.mMaterial.mMaterial != null) {
- if (tData.mMaterial.mMaterial.contains(SubTag.METAL) || tData.mMaterial.mMaterial.contains(SubTag.EXPLOSIVE)) {
- if (aTileEntity instanceof IGregTechTileEntity) ((IGregTechTileEntity)aTileEntity).doExplosion(aVoltage * 4);
- return null;
- }
- if (tData.mMaterial.mMaterial.contains(SubTag.FLAMMABLE)) {
- if (aTileEntity instanceof IGregTechTileEntity) ((IGregTechTileEntity)aTileEntity).setOnFire();
- return null;
- }
- }
- for (MaterialStack tMaterial : tData.mByProducts) if (tMaterial != null) {
- if (tMaterial.mMaterial.contains(SubTag.METAL) || tMaterial.mMaterial.contains(SubTag.EXPLOSIVE)) {
- if (aTileEntity instanceof IGregTechTileEntity) ((IGregTechTileEntity)aTileEntity).doExplosion(aVoltage * 4);
- return null;
- }
- if (tMaterial.mMaterial.contains(SubTag.FLAMMABLE)) {
- if (aTileEntity instanceof IGregTechTileEntity) ((IGregTechTileEntity)aTileEntity).setOnFire();
- return null;
- }
- }
- }
- if (TileEntityFurnace.getItemBurnTime(tStack) > 0) {
- if (aTileEntity instanceof IGregTechTileEntity) ((IGregTechTileEntity)aTileEntity).setOnFire();
- return null;
- }
-
- }
-
- return tOutput == null ? null : new GT_Recipe(F, new ItemStack[] {GT_Utility.copyAmount(1, aInputs[0])}, new ItemStack[] {tOutput}, null, null, null, null, 32, 4, 0);
- }
-
- @Override public boolean containsInput(ItemStack aStack) {return GT_ModHandler.getSmeltingOutput(aStack, F, null) != null;}
- }
-
- /**
- * Special Class for Unboxinator handling.
- */
- public static class GT_Recipe_Map_Unboxinator extends GT_Recipe_Map {
- public GT_Recipe_Map_Unboxinator(Collection<GT_Recipe> aRecipeList, String aUnlocalizedName, String aLocalName, String aNEIName, String aNEIGUIPath, int aUsualInputCount, int aUsualOutputCount, int aMinimalInputItems, int aMinimalInputFluids, int aAmperage, String aNEISpecialValuePre, int aNEISpecialValueMultiplier, String aNEISpecialValuePost, boolean aShowVoltageAmperageInNEI, boolean aNEIAllowed) {
- super(aRecipeList, aUnlocalizedName, aLocalName, aNEIName, aNEIGUIPath, aUsualInputCount, aUsualOutputCount, aMinimalInputItems, aMinimalInputFluids, aAmperage, aNEISpecialValuePre, aNEISpecialValueMultiplier, aNEISpecialValuePost, aShowVoltageAmperageInNEI, aNEIAllowed);
- }
-
- @Override
- public GT_Recipe findRecipe(IHasWorldObjectAndCoords aTileEntity, GT_Recipe aRecipe, boolean aNotUnificated, long aVoltage, FluidStack[] aFluids, ItemStack aSpecialSlot, ItemStack... aInputs) {
- if (aInputs == null || aInputs.length <= 0 || !ItemList.IC2_Scrapbox.isStackEqual(aInputs[0], F, T)) return super.findRecipe(aTileEntity, aRecipe, aNotUnificated, aVoltage, aFluids, aSpecialSlot, aInputs);
- ItemStack tOutput = GT_ModHandler.getRandomScrapboxDrop();
- if (tOutput == null) return super.findRecipe(aTileEntity, aRecipe, aNotUnificated, aVoltage, aFluids, aSpecialSlot, aInputs);
- GT_Recipe rRecipe = new GT_Recipe(F, new ItemStack[] {ItemList.IC2_Scrapbox.get(1)}, new ItemStack[] {tOutput}, null, null, null, null, 16, 1, 0);
- // It is not allowed to be buffered due to the random Output
- rRecipe.mCanBeBuffered = F;
- // Due to its randomness it is not good if there are Items in the Output Slot, because those Items could manipulate the outcome.
- rRecipe.mNeedsEmptyOutput = T;
- return rRecipe;
- }
-
- @Override public boolean containsInput(ItemStack aStack) {return ItemList.IC2_Scrapbox.isStackEqual(aStack, F, T) || super.containsInput(aStack);}
- }
-
- /**
- * Special Class for Fluid Canner handling.
- */
- public static class GT_Recipe_Map_FluidCanner extends GT_Recipe_Map {
- public GT_Recipe_Map_FluidCanner(Collection<GT_Recipe> aRecipeList, String aUnlocalizedName, String aLocalName, String aNEIName, String aNEIGUIPath, int aUsualInputCount, int aUsualOutputCount, int aMinimalInputItems, int aMinimalInputFluids, int aAmperage, String aNEISpecialValuePre, int aNEISpecialValueMultiplier, String aNEISpecialValuePost, boolean aShowVoltageAmperageInNEI, boolean aNEIAllowed) {
- super(aRecipeList, aUnlocalizedName, aLocalName, aNEIName, aNEIGUIPath, aUsualInputCount, aUsualOutputCount, aMinimalInputItems, aMinimalInputFluids, aAmperage, aNEISpecialValuePre, aNEISpecialValueMultiplier, aNEISpecialValuePost, aShowVoltageAmperageInNEI, aNEIAllowed);
- }
-
- @Override
- public GT_Recipe findRecipe(IHasWorldObjectAndCoords aTileEntity, GT_Recipe aRecipe, boolean aNotUnificated, long aVoltage, FluidStack[] aFluids, ItemStack aSpecialSlot, ItemStack... aInputs) {
- GT_Recipe rRecipe = super.findRecipe(aTileEntity, aRecipe, aNotUnificated, aVoltage, aFluids, aSpecialSlot, aInputs);
- if (aInputs == null || aInputs.length <= 0 || aInputs[0] == null || rRecipe != null || !GregTech_API.sPostloadFinished) return rRecipe;
- if (aFluids != null && aFluids.length > 0 && aFluids[0] != null) {
- ItemStack tOutput = GT_Utility.fillFluidContainer(aFluids[0], aInputs[0], F, T);
- FluidStack tFluid = GT_Utility.getFluidForFilledItem(tOutput, T);
- if (tFluid != null) rRecipe = new GT_Recipe(F, new ItemStack[] {GT_Utility.copyAmount(1, aInputs[0])}, new ItemStack[] {tOutput}, null, null, new FluidStack[] {tFluid}, null, Math.max(tFluid.amount / 64, 16), 1, 0);
- }
- if (rRecipe == null) {
- FluidStack tFluid = GT_Utility.getFluidForFilledItem(aInputs[0], T);
- if (tFluid != null) rRecipe = new GT_Recipe(F, new ItemStack[] {GT_Utility.copyAmount(1, aInputs[0])}, new ItemStack[] {GT_Utility.getContainerItem(aInputs[0], T)}, null, null, null, new FluidStack[] {tFluid}, Math.max(tFluid.amount / 64, 16), 1, 0);
- }
- if (rRecipe != null) rRecipe.mCanBeBuffered = F;
- return rRecipe;
- }
-
- @Override public boolean containsInput(ItemStack aStack) {return aStack != null && (super.containsInput(aStack) || (aStack.getItem() instanceof IFluidContainerItem && ((IFluidContainerItem)aStack.getItem()).getCapacity(aStack) > 0));}
- @Override public boolean containsInput(FluidStack aFluid) {return T;}
- @Override public boolean containsInput(Fluid aFluid) {return T;}
- }
-
- /**
- * Special Class for Recycler Recipe handling.
- */
- public static class GT_Recipe_Map_Recycler extends GT_Recipe_Map_NonGTRecipes {
- public GT_Recipe_Map_Recycler(Collection<GT_Recipe> aRecipeList, String aUnlocalizedName, String aLocalName, String aNEIName, String aNEIGUIPath, int aUsualInputCount, int aUsualOutputCount, int aMinimalInputItems, int aMinimalInputFluids, int aAmperage, String aNEISpecialValuePre, int aNEISpecialValueMultiplier, String aNEISpecialValuePost, boolean aShowVoltageAmperageInNEI, boolean aNEIAllowed) {
- super(aRecipeList, aUnlocalizedName, aLocalName, aNEIName, aNEIGUIPath, aUsualInputCount, aUsualOutputCount, aMinimalInputItems, aMinimalInputFluids, aAmperage, aNEISpecialValuePre, aNEISpecialValueMultiplier, aNEISpecialValuePost, aShowVoltageAmperageInNEI, aNEIAllowed);
- }
-
- @Override
- public GT_Recipe findRecipe(IHasWorldObjectAndCoords aTileEntity, GT_Recipe aRecipe, boolean aNotUnificated, long aVoltage, FluidStack[] aFluids, ItemStack aSpecialSlot, ItemStack... aInputs) {
- if (aInputs == null || aInputs.length <= 0 || aInputs[0] == null) return null;
- if (aRecipe != null && aRecipe.isRecipeInputEqual(F, T, aFluids, aInputs)) return aRecipe;
- return new GT_Recipe(F, new ItemStack[] {GT_Utility.copyAmount(1, aInputs[0])}, GT_ModHandler.getRecyclerOutput(GT_Utility.copyAmount(64, aInputs[0]), 0) == null ? null : new ItemStack[] {ItemList.IC2_Scrap.get(1)}, null, new int[] {1250}, null, null, 45, 1, 0);
- }
-
- @Override public boolean containsInput(ItemStack aStack) {return GT_ModHandler.getRecyclerOutput(GT_Utility.copyAmount(64, aStack), 0) != null;}
- }
-
- /**
- * Special Class for Compressor Recipe handling.
- */
- public static class GT_Recipe_Map_Compressor extends GT_Recipe_Map_NonGTRecipes {
- public GT_Recipe_Map_Compressor(Collection<GT_Recipe> aRecipeList, String aUnlocalizedName, String aLocalName, String aNEIName, String aNEIGUIPath, int aUsualInputCount, int aUsualOutputCount, int aMinimalInputItems, int aMinimalInputFluids, int aAmperage, String aNEISpecialValuePre, int aNEISpecialValueMultiplier, String aNEISpecialValuePost, boolean aShowVoltageAmperageInNEI, boolean aNEIAllowed) {
- super(aRecipeList, aUnlocalizedName, aLocalName, aNEIName, aNEIGUIPath, aUsualInputCount, aUsualOutputCount, aMinimalInputItems, aMinimalInputFluids, aAmperage, aNEISpecialValuePre, aNEISpecialValueMultiplier, aNEISpecialValuePost, aShowVoltageAmperageInNEI, aNEIAllowed);
- }
-
- @Override
- public GT_Recipe findRecipe(IHasWorldObjectAndCoords aTileEntity, GT_Recipe aRecipe, boolean aNotUnificated, long aVoltage, FluidStack[] aFluids, ItemStack aSpecialSlot, ItemStack... aInputs) {
- if (aInputs == null || aInputs.length <= 0 || aInputs[0] == null) return null;
- if (aRecipe != null && aRecipe.isRecipeInputEqual(F, T, aFluids, aInputs)) return aRecipe;
- ItemStack tComparedInput = GT_Utility.copy(aInputs[0]);
- ItemStack[] tOutputItems = GT_ModHandler.getMachineOutput(tComparedInput, ic2.api.recipe.Recipes.compressor.getRecipes(), T, new NBTTagCompound(), null, null, null);
- return GT_Utility.arrayContainsNonNull(tOutputItems) ? new GT_Recipe(F, new ItemStack[] {GT_Utility.copyAmount(aInputs[0].stackSize - tComparedInput.stackSize, aInputs[0])}, tOutputItems, null, null, null, null, 400, 2, 0) : null;
- }
-
- @Override public boolean containsInput(ItemStack aStack) {return GT_Utility.arrayContainsNonNull(GT_ModHandler.getMachineOutput(GT_Utility.copyAmount(64, aStack), ic2.api.recipe.Recipes.compressor.getRecipes(), F, new NBTTagCompound(), null, null, null));}
- }
-
- /**
- * Special Class for Extractor Recipe handling.
- */
- public static class GT_Recipe_Map_Extractor extends GT_Recipe_Map_NonGTRecipes {
- public GT_Recipe_Map_Extractor(Collection<GT_Recipe> aRecipeList, String aUnlocalizedName, String aLocalName, String aNEIName, String aNEIGUIPath, int aUsualInputCount, int aUsualOutputCount, int aMinimalInputItems, int aMinimalInputFluids, int aAmperage, String aNEISpecialValuePre, int aNEISpecialValueMultiplier, String aNEISpecialValuePost, boolean aShowVoltageAmperageInNEI, boolean aNEIAllowed) {
- super(aRecipeList, aUnlocalizedName, aLocalName, aNEIName, aNEIGUIPath, aUsualInputCount, aUsualOutputCount, aMinimalInputItems, aMinimalInputFluids, aAmperage, aNEISpecialValuePre, aNEISpecialValueMultiplier, aNEISpecialValuePost, aShowVoltageAmperageInNEI, aNEIAllowed);
- }
-
- @Override
- public GT_Recipe findRecipe(IHasWorldObjectAndCoords aTileEntity, GT_Recipe aRecipe, boolean aNotUnificated, long aVoltage, FluidStack[] aFluids, ItemStack aSpecialSlot, ItemStack... aInputs) {
- if (aInputs == null || aInputs.length <= 0 || aInputs[0] == null) return null;
- if (aRecipe != null && aRecipe.isRecipeInputEqual(F, T, aFluids, aInputs)) return aRecipe;
- ItemStack tComparedInput = GT_Utility.copy(aInputs[0]);
- ItemStack[] tOutputItems = GT_ModHandler.getMachineOutput(tComparedInput, ic2.api.recipe.Recipes.extractor.getRecipes(), T, new NBTTagCompound(), null, null, null);
- return GT_Utility.arrayContainsNonNull(tOutputItems) ? new GT_Recipe(F, new ItemStack[] {GT_Utility.copyAmount(aInputs[0].stackSize - tComparedInput.stackSize, aInputs[0])}, tOutputItems, null, null, null, null, 400, 2, 0) : null;
- }
-
- @Override public boolean containsInput(ItemStack aStack) {return GT_Utility.arrayContainsNonNull(GT_ModHandler.getMachineOutput(GT_Utility.copyAmount(64, aStack), ic2.api.recipe.Recipes.extractor.getRecipes(), F, new NBTTagCompound(), null, null, null));}
- }
-
- /**
- * Special Class for Thermal Centrifuge Recipe handling.
- */
- public static class GT_Recipe_Map_ThermalCentrifuge extends GT_Recipe_Map_NonGTRecipes {
- public GT_Recipe_Map_ThermalCentrifuge(Collection<GT_Recipe> aRecipeList, String aUnlocalizedName, String aLocalName, String aNEIName, String aNEIGUIPath, int aUsualInputCount, int aUsualOutputCount, int aMinimalInputItems, int aMinimalInputFluids, int aAmperage, String aNEISpecialValuePre, int aNEISpecialValueMultiplier, String aNEISpecialValuePost, boolean aShowVoltageAmperageInNEI, boolean aNEIAllowed) {
- super(aRecipeList, aUnlocalizedName, aLocalName, aNEIName, aNEIGUIPath, aUsualInputCount, aUsualOutputCount, aMinimalInputItems, aMinimalInputFluids, aAmperage, aNEISpecialValuePre, aNEISpecialValueMultiplier, aNEISpecialValuePost, aShowVoltageAmperageInNEI, aNEIAllowed);
- }
-
- @Override
- public GT_Recipe findRecipe(IHasWorldObjectAndCoords aTileEntity, GT_Recipe aRecipe, boolean aNotUnificated, long aVoltage, FluidStack[] aFluids, ItemStack aSpecialSlot, ItemStack... aInputs) {
- if (aInputs == null || aInputs.length <= 0 || aInputs[0] == null) return null;
- if (aRecipe != null && aRecipe.isRecipeInputEqual(F, T, aFluids, aInputs)) return aRecipe;
- ItemStack tComparedInput = GT_Utility.copy(aInputs[0]);
- ItemStack[] tOutputItems = GT_ModHandler.getMachineOutput(tComparedInput, ic2.api.recipe.Recipes.centrifuge.getRecipes(), T, new NBTTagCompound(), null, null, null);
- return GT_Utility.arrayContainsNonNull(tOutputItems) ? new GT_Recipe(F, new ItemStack[] {GT_Utility.copyAmount(aInputs[0].stackSize - tComparedInput.stackSize, aInputs[0])}, tOutputItems, null, null, null, null, 400, 48, 0) : null;
- }
-
- @Override public boolean containsInput(ItemStack aStack) {return GT_Utility.arrayContainsNonNull(GT_ModHandler.getMachineOutput(GT_Utility.copyAmount(64, aStack), ic2.api.recipe.Recipes.centrifuge.getRecipes(), F, new NBTTagCompound(), null, null, null));}
- }
-
- /**
- * Special Class for Ore Washer Recipe handling.
- */
- public static class GT_Recipe_Map_OreWasher extends GT_Recipe_Map_NonGTRecipes {
- public GT_Recipe_Map_OreWasher(Collection<GT_Recipe> aRecipeList, String aUnlocalizedName, String aLocalName, String aNEIName, String aNEIGUIPath, int aUsualInputCount, int aUsualOutputCount, int aMinimalInputItems, int aMinimalInputFluids, int aAmperage, String aNEISpecialValuePre, int aNEISpecialValueMultiplier, String aNEISpecialValuePost, boolean aShowVoltageAmperageInNEI, boolean aNEIAllowed) {
- super(aRecipeList, aUnlocalizedName, aLocalName, aNEIName, aNEIGUIPath, aUsualInputCount, aUsualOutputCount, aMinimalInputItems, aMinimalInputFluids, aAmperage, aNEISpecialValuePre, aNEISpecialValueMultiplier, aNEISpecialValuePost, aShowVoltageAmperageInNEI, aNEIAllowed);
- }
-
- @Override
- public GT_Recipe findRecipe(IHasWorldObjectAndCoords aTileEntity, GT_Recipe aRecipe, boolean aNotUnificated, long aVoltage, FluidStack[] aFluids, ItemStack aSpecialSlot, ItemStack... aInputs) {
- if (aInputs == null || aInputs.length <= 0 || aInputs[0] == null || aFluids == null || aFluids.length < 1 || !GT_ModHandler.isWater(aFluids[0])) return null;
- if (aRecipe != null && aRecipe.isRecipeInputEqual(F, T, aFluids, aInputs)) return aRecipe;
- ItemStack tComparedInput = GT_Utility.copy(aInputs[0]);
- NBTTagCompound aRecipeMetaData = new NBTTagCompound();
- ItemStack[] tOutputItems = GT_ModHandler.getMachineOutput(tComparedInput, ic2.api.recipe.Recipes.oreWashing.getRecipes(), T, aRecipeMetaData, null, null, null);
- return GT_Utility.arrayContainsNonNull(tOutputItems) ? new GT_Recipe(F, new ItemStack[] {GT_Utility.copyAmount(aInputs[0].stackSize - tComparedInput.stackSize, aInputs[0])}, tOutputItems, null, null, new FluidStack[] {new FluidStack(aFluids[0].getFluid(), ((NBTTagCompound)aRecipeMetaData.getTag("return")).getInteger("amount"))}, null, 400, 16, 0) : null;
- }
-
- @Override public boolean containsInput(ItemStack aStack) {return GT_Utility.arrayContainsNonNull(GT_ModHandler.getMachineOutput(GT_Utility.copyAmount(64, aStack), ic2.api.recipe.Recipes.oreWashing.getRecipes(), F, new NBTTagCompound(), null, null, null));}
- @Override public boolean containsInput(FluidStack aFluid) {return GT_ModHandler.isWater(aFluid);}
- @Override public boolean containsInput(Fluid aFluid) {return GT_ModHandler.isWater(new FluidStack(aFluid, 0));}
- }
-
- /**
- * Special Class for Macerator/RockCrusher Recipe handling.
- */
- public static class GT_Recipe_Map_Macerator extends GT_Recipe_Map {
- public GT_Recipe_Map_Macerator(Collection<GT_Recipe> aRecipeList, String aUnlocalizedName, String aLocalName, String aNEIName, String aNEIGUIPath, int aUsualInputCount, int aUsualOutputCount, int aMinimalInputItems, int aMinimalInputFluids, int aAmperage, String aNEISpecialValuePre, int aNEISpecialValueMultiplier, String aNEISpecialValuePost, boolean aShowVoltageAmperageInNEI, boolean aNEIAllowed) {
- super(aRecipeList, aUnlocalizedName, aLocalName, aNEIName, aNEIGUIPath, aUsualInputCount, aUsualOutputCount, aMinimalInputItems, aMinimalInputFluids, aAmperage, aNEISpecialValuePre, aNEISpecialValueMultiplier, aNEISpecialValuePost, aShowVoltageAmperageInNEI, aNEIAllowed);
- }
-
- @Override
- public GT_Recipe findRecipe(IHasWorldObjectAndCoords aTileEntity, GT_Recipe aRecipe, boolean aNotUnificated, long aVoltage, FluidStack[] aFluids, ItemStack aSpecialSlot, ItemStack... aInputs) {
- if (aInputs == null || aInputs.length <= 0 || aInputs[0] == null || !GregTech_API.sPostloadFinished) return super.findRecipe(aTileEntity, aRecipe, aNotUnificated, aVoltage, aFluids, aSpecialSlot, aInputs);
- aRecipe = super.findRecipe(aTileEntity, aRecipe, aNotUnificated, aVoltage, aFluids, aSpecialSlot, aInputs);
- if (aRecipe != null) return aRecipe;
-
- try {
- List<ItemStack> tRecipeOutputs = mods.railcraft.api.crafting.RailcraftCraftingManager.rockCrusher.getRecipe(GT_Utility.copyAmount(1, aInputs[0])).getRandomizedOuputs();
- if (tRecipeOutputs != null) {
- aRecipe = new GT_Recipe(F, new ItemStack[] {GT_Utility.copyAmount(1, aInputs[0])}, tRecipeOutputs.toArray(new ItemStack[tRecipeOutputs.size()]), null, null, null, null, 800, 2, 0);
- aRecipe.mCanBeBuffered = F;
- aRecipe.mNeedsEmptyOutput = T;
- return aRecipe;
- }
- } catch(NoClassDefFoundError e) {if (D1) GT_Log.err.println("Railcraft Not loaded");} catch(NullPointerException e) {/**/}
-
- ItemStack tComparedInput = GT_Utility.copy(aInputs[0]);
- ItemStack[] tOutputItems = GT_ModHandler.getMachineOutput(tComparedInput, ic2.api.recipe.Recipes.macerator.getRecipes(), T, new NBTTagCompound(), null, null, null);
- return GT_Utility.arrayContainsNonNull(tOutputItems) ? new GT_Recipe(F, new ItemStack[] {GT_Utility.copyAmount(aInputs[0].stackSize - tComparedInput.stackSize, aInputs[0])}, tOutputItems, null, null, null, null, 400, 2, 0) : null;
- }
-
- @Override public boolean containsInput(ItemStack aStack) {return super.containsInput(aStack) || GT_Utility.arrayContainsNonNull(GT_ModHandler.getMachineOutput(GT_Utility.copyAmount(64, aStack), ic2.api.recipe.Recipes.macerator.getRecipes(), F, new NBTTagCompound(), null, null, null));}
- }
-
- /**
- * Special Class for Assembler handling.
- */
- public static class GT_Recipe_Map_Assembler extends GT_Recipe_Map {
- public GT_Recipe_Map_Assembler(Collection<GT_Recipe> aRecipeList, String aUnlocalizedName, String aLocalName, String aNEIName, String aNEIGUIPath, int aUsualInputCount, int aUsualOutputCount, int aMinimalInputItems, int aMinimalInputFluids, int aAmperage, String aNEISpecialValuePre, int aNEISpecialValueMultiplier, String aNEISpecialValuePost, boolean aShowVoltageAmperageInNEI, boolean aNEIAllowed) {
- super(aRecipeList, aUnlocalizedName, aLocalName, aNEIName, aNEIGUIPath, aUsualInputCount, aUsualOutputCount, aMinimalInputItems, aMinimalInputFluids, aAmperage, aNEISpecialValuePre, aNEISpecialValueMultiplier, aNEISpecialValuePost, aShowVoltageAmperageInNEI, aNEIAllowed);
- }
-
- @Override
- public GT_Recipe findRecipe(IHasWorldObjectAndCoords aTileEntity, GT_Recipe aRecipe, boolean aNotUnificated, long aVoltage, FluidStack[] aFluids, ItemStack aSpecialSlot, ItemStack... aInputs) {
- GT_Recipe rRecipe = super.findRecipe(aTileEntity, aRecipe, aNotUnificated, aVoltage, aFluids, aSpecialSlot, aInputs);
- if (aInputs == null || aInputs.length <= 0 || aInputs[0] == null || rRecipe == null || !GregTech_API.sPostloadFinished) return rRecipe;
- for (ItemStack aInput : aInputs) {
- if (ItemList.Paper_Printed_Pages.isStackEqual(aInput, F, T)) {
- rRecipe = rRecipe.copy();
- rRecipe.mCanBeBuffered = F;
- rRecipe.mOutputs[0].setTagCompound(aInput.getTagCompound());
- }
- }
- return rRecipe;
- }
- }
-
- /**
- * Special Class for Forming Press handling.
- */
- public static class GT_Recipe_Map_FormingPress extends GT_Recipe_Map {
- public GT_Recipe_Map_FormingPress(Collection<GT_Recipe> aRecipeList, String aUnlocalizedName, String aLocalName, String aNEIName, String aNEIGUIPath, int aUsualInputCount, int aUsualOutputCount, int aMinimalInputItems, int aMinimalInputFluids, int aAmperage, String aNEISpecialValuePre, int aNEISpecialValueMultiplier, String aNEISpecialValuePost, boolean aShowVoltageAmperageInNEI, boolean aNEIAllowed) {
- super(aRecipeList, aUnlocalizedName, aLocalName, aNEIName, aNEIGUIPath, aUsualInputCount, aUsualOutputCount, aMinimalInputItems, aMinimalInputFluids, aAmperage, aNEISpecialValuePre, aNEISpecialValueMultiplier, aNEISpecialValuePost, aShowVoltageAmperageInNEI, aNEIAllowed);
- }
-
- @Override
- public GT_Recipe findRecipe(IHasWorldObjectAndCoords aTileEntity, GT_Recipe aRecipe, boolean aNotUnificated, long aVoltage, FluidStack[] aFluids, ItemStack aSpecialSlot, ItemStack... aInputs) {
- GT_Recipe rRecipe = super.findRecipe(aTileEntity, aRecipe, aNotUnificated, aVoltage, aFluids, aSpecialSlot, aInputs);
- if (aInputs == null || aInputs.length < 2 || aInputs[0] == null || aInputs[1] == null || !GregTech_API.sPostloadFinished) return rRecipe;
- if (rRecipe == null) {
- if (ItemList.Shape_Mold_Name.isStackEqual(aInputs[0], F, T)) {
- ItemStack tOutput = GT_Utility.copyAmount(1, aInputs[1]);
- tOutput.setStackDisplayName(aInputs[0].getDisplayName());
- rRecipe = new GT_Recipe(F, new ItemStack[] {ItemList.Shape_Mold_Name.get(0), GT_Utility.copyAmount(1, aInputs[1])}, new ItemStack[] {tOutput}, null, null, null, null, 128, 8, 0);
- rRecipe.mCanBeBuffered = F;
- return rRecipe;
- }
- if (ItemList.Shape_Mold_Name.isStackEqual(aInputs[1], F, T)) {
- ItemStack tOutput = GT_Utility.copyAmount(1, aInputs[0]);
- tOutput.setStackDisplayName(aInputs[1].getDisplayName());
- rRecipe = new GT_Recipe(F, new ItemStack[] {ItemList.Shape_Mold_Name.get(0), GT_Utility.copyAmount(1, aInputs[0])}, new ItemStack[] {tOutput}, null, null, null, null, 128, 8, 0);
- rRecipe.mCanBeBuffered = F;
- return rRecipe;
- }
- return null;
- }
- for (ItemStack aMold : aInputs) {
- if (ItemList.Shape_Mold_Credit.isStackEqual(aMold, F, T)) {
- NBTTagCompound tNBT = aMold.getTagCompound();
- if (tNBT == null) tNBT = new NBTTagCompound();
- if (!tNBT.hasKey("credit_security_id")) tNBT.setLong("credit_security_id", System.nanoTime());
- aMold.setTagCompound(tNBT);
-
- rRecipe = rRecipe.copy();
- rRecipe.mCanBeBuffered = F;
- rRecipe.mOutputs[0].setTagCompound(tNBT);
- return rRecipe;
- }
- }
- return rRecipe;
- }
- }
-
- /**
- * Special Class for Printer handling.
- */
- public static class GT_Recipe_Map_Printer extends GT_Recipe_Map {
- public GT_Recipe_Map_Printer(Collection<GT_Recipe> aRecipeList, String aUnlocalizedName, String aLocalName, String aNEIName, String aNEIGUIPath, int aUsualInputCount, int aUsualOutputCount, int aMinimalInputItems, int aMinimalInputFluids, int aAmperage, String aNEISpecialValuePre, int aNEISpecialValueMultiplier, String aNEISpecialValuePost, boolean aShowVoltageAmperageInNEI, boolean aNEIAllowed) {
- super(aRecipeList, aUnlocalizedName, aLocalName, aNEIName, aNEIGUIPath, aUsualInputCount, aUsualOutputCount, aMinimalInputItems, aMinimalInputFluids, aAmperage, aNEISpecialValuePre, aNEISpecialValueMultiplier, aNEISpecialValuePost, aShowVoltageAmperageInNEI, aNEIAllowed);
- }
-
- @Override
- public GT_Recipe findRecipe(IHasWorldObjectAndCoords aTileEntity, GT_Recipe aRecipe, boolean aNotUnificated, long aVoltage, FluidStack[] aFluids, ItemStack aSpecialSlot, ItemStack... aInputs) {
- GT_Recipe rRecipe = super.findRecipe(aTileEntity, aRecipe, aNotUnificated, aVoltage, aFluids, aSpecialSlot, aInputs);
- if (aInputs == null || aInputs.length <= 0 || aInputs[0] == null || aFluids == null || aFluids.length <= 0 || aFluids[0] == null || !GregTech_API.sPostloadFinished) return rRecipe;
-
- Dyes aDye = null; for (Dyes tDye : Dyes.VALUES) if (tDye.isFluidDye(aFluids[0])) {aDye = tDye; break;}
-
- if (aDye == null) return rRecipe;
-
- if (rRecipe == null) {
- ItemStack
- tOutput = GT_ModHandler.getAllRecipeOutput(aTileEntity==null?null:aTileEntity.getWorld(), aInputs[0], aInputs[0], aInputs[0], aInputs[0], ItemList.DYE_ONLY_ITEMS[aDye.mIndex].get(1), aInputs[0], aInputs[0], aInputs[0], aInputs[0]);
- if (tOutput != null) return addRecipe(new GT_Recipe(T, new ItemStack[] {GT_Utility.copyAmount(8, aInputs[0])}, new ItemStack[] {tOutput}, null, null, new FluidStack[] {new FluidStack(aFluids[0].getFluid(), (int)L)}, null, 256, 2, 0), F, F, T);
-
- tOutput = GT_ModHandler.getAllRecipeOutput(aTileEntity==null?null:aTileEntity.getWorld(), aInputs[0], ItemList.DYE_ONLY_ITEMS[aDye.mIndex].get(1));
- if (tOutput != null) return addRecipe(new GT_Recipe(T, new ItemStack[] {GT_Utility.copyAmount(1, aInputs[0])}, new ItemStack[] {tOutput}, null, null, new FluidStack[] {new FluidStack(aFluids[0].getFluid(), (int)L)}, null, 32, 2, 0), F, F, T);
- } else {
- if (aInputs[0].getItem() == Items.paper) {
- if (!ItemList.Tool_DataStick.isStackEqual(aSpecialSlot, F, T)) return null;
- NBTTagCompound tNBT = aSpecialSlot.getTagCompound();
- if (tNBT == null || GT_Utility.isStringInvalid(tNBT.getString("title")) || GT_Utility.isStringInvalid(tNBT.getString("author"))) return null;
-
- rRecipe = rRecipe.copy();
- rRecipe.mCanBeBuffered = F;
- rRecipe.mOutputs[0].setTagCompound(tNBT);
- return rRecipe;
- }
- if (aInputs[0].getItem() == Items.map) {
- if (!ItemList.Tool_DataStick.isStackEqual(aSpecialSlot, F, T)) return null;
- NBTTagCompound tNBT = aSpecialSlot.getTagCompound();
- if (tNBT == null || !tNBT.hasKey("map_id")) return null;
-
- rRecipe = rRecipe.copy();
- rRecipe.mCanBeBuffered = F;
- rRecipe.mOutputs[0].setItemDamage(tNBT.getShort("map_id"));
- return rRecipe;
- }
- if (ItemList.Paper_Punch_Card_Empty.isStackEqual(aInputs[0], F, T)) {
- if (!ItemList.Tool_DataStick.isStackEqual(aSpecialSlot, F, T)) return null;
- NBTTagCompound tNBT = aSpecialSlot.getTagCompound();
- if (tNBT == null || !tNBT.hasKey("GT.PunchCardData")) return null;
-
- rRecipe = rRecipe.copy();
- rRecipe.mCanBeBuffered = F;
- rRecipe.mOutputs[0].setTagCompound(GT_Utility.getNBTContainingString(new NBTTagCompound(), "GT.PunchCardData", tNBT.getString("GT.PunchCardData")));
- return rRecipe;
- }
- }
- return rRecipe;
- }
-
- @Override public boolean containsInput(ItemStack aStack) {return T;}
- @Override public boolean containsInput(FluidStack aFluid) {return super.containsInput(aFluid) || Dyes.isAnyFluidDye(aFluid);}
- @Override public boolean containsInput(Fluid aFluid) {return super.containsInput(aFluid) || Dyes.isAnyFluidDye(aFluid);}
- }
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/util/GT_RecipeRegistrator.java b/main/java/gregtech/api/util/GT_RecipeRegistrator.java
deleted file mode 100644
index a11a4a1aba..0000000000
--- a/main/java/gregtech/api/util/GT_RecipeRegistrator.java
+++ /dev/null
@@ -1,313 +0,0 @@
-package gregtech.api.util;
-
-import static gregtech.api.enums.GT_Values.L;
-import static gregtech.api.enums.GT_Values.M;
-import static gregtech.api.enums.GT_Values.RA;
-import gregtech.api.GregTech_API;
-import gregtech.api.enums.*;
-import gregtech.api.enums.TC_Aspects.TC_AspectStack;
-import gregtech.api.interfaces.internal.IThaumcraftCompat;
-import gregtech.api.objects.ItemData;
-import gregtech.api.objects.MaterialStack;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import net.minecraft.init.Blocks;
-import net.minecraft.init.Items;
-import net.minecraft.item.ItemStack;
-
-/**
- * Class for Automatic Recipe registering.
- */
-public class GT_RecipeRegistrator {
- public static volatile int VERSION = 508;
-
- /** List of Materials, which are used in the Creation of Sticks. All Rod Materials are automatically added to this List. */
- public static final List<Materials> sRodMaterialList = new ArrayList<Materials>();
-
- public static void registerMaterialRecycling(ItemStack aStack, Materials aMaterial, long aMaterialAmount, MaterialStack aByproduct) {
- if (GT_Utility.isStackInvalid(aStack)) return;
- if (aByproduct != null) {aByproduct = aByproduct.clone(); aByproduct.mAmount /= aStack.stackSize;}
- GT_OreDictUnificator.addItemData(GT_Utility.copyAmount(1, aStack), new ItemData(aMaterial, aMaterialAmount / aStack.stackSize, aByproduct));
- }
-
- public static void registerMaterialRecycling(ItemStack aStack, ItemData aData) {
- if (GT_Utility.isStackInvalid(aStack) || GT_Utility.areStacksEqual(new ItemStack(Items.blaze_rod), aStack) || aData == null || !aData.hasValidMaterialData() || aData.mMaterial.mAmount <= 0 || GT_Utility.getFluidForFilledItem(aStack, false) != null) return;
- registerReverseMacerating (GT_Utility.copyAmount(1, aStack), aData, aData.mPrefix == null);
- registerReverseSmelting (GT_Utility.copyAmount(1, aStack), aData.mMaterial.mMaterial, aData.mMaterial.mAmount, true);
- registerReverseFluidSmelting (GT_Utility.copyAmount(1, aStack), aData.mMaterial.mMaterial, aData.mMaterial.mAmount, aData.getByProduct(0));
- registerReverseArcSmelting (GT_Utility.copyAmount(1, aStack), aData);
- }
-
- /**
- * @param aStack the stack to be recycled.
- * @param aMaterial the Material.
- * @param aMaterialAmount the amount of it in Material Units.
- */
- public static void registerReverseFluidSmelting(ItemStack aStack, Materials aMaterial, long aMaterialAmount, MaterialStack aByproduct) {
- if (aStack == null || aMaterial == null || aMaterial.mSmeltInto.mStandardMoltenFluid == null || !aMaterial.contains(SubTag.SMELTING_TO_FLUID) || (L * aMaterialAmount) / (M * aStack.stackSize) <= 0) return;
- RA.addFluidSmelterRecipe(GT_Utility.copyAmount(1, aStack), aByproduct==null?null:aByproduct.mMaterial.contains(SubTag.NO_SMELTING)||!aByproduct.mMaterial.contains(SubTag.METAL)?aByproduct.mMaterial.contains(SubTag.FLAMMABLE)?GT_OreDictUnificator.getDust(Materials.Ash, aByproduct.mAmount/2):aByproduct.mMaterial.contains(SubTag.UNBURNABLE)?GT_OreDictUnificator.getDustOrIngot(aByproduct.mMaterial.mSmeltInto, aByproduct.mAmount):null:GT_OreDictUnificator.getIngotOrDust(aByproduct.mMaterial.mSmeltInto, aByproduct.mAmount), aMaterial.mSmeltInto.getMolten((L * aMaterialAmount) / (M * aStack.stackSize)), 10000, (int)Math.max(1, (24 * aMaterialAmount) / M), Math.max(8, (int)Math.sqrt(2*aMaterial.mSmeltInto.mStandardMoltenFluid.getTemperature())));
- }
-
- /**
- * @param aStack the stack to be recycled.
- * @param aMaterial the Material.
- * @param aMaterialAmount the amount of it in Material Units.
- * @param aAllowAlloySmelter if it is allowed to be recycled inside the Alloy Smelter.
- */
- public static void registerReverseSmelting(ItemStack aStack, Materials aMaterial, long aMaterialAmount, boolean aAllowAlloySmelter) {
- if (aStack == null || aMaterial == null || aMaterialAmount <= 0 || aMaterial.contains(SubTag.NO_SMELTING) || (aMaterialAmount > M && aMaterial.contains(SubTag.METAL))) return;
- aMaterialAmount /= aStack.stackSize;
- if (aAllowAlloySmelter)
- GT_ModHandler.addSmeltingAndAlloySmeltingRecipe(GT_Utility.copyAmount(1, aStack), GT_OreDictUnificator.getIngot(aMaterial.mSmeltInto, aMaterialAmount));
- else
- GT_ModHandler.addSmeltingRecipe(GT_Utility.copyAmount(1, aStack), GT_OreDictUnificator.getIngot(aMaterial.mSmeltInto, aMaterialAmount));
- }
-
- public static void registerReverseArcSmelting(ItemStack aStack, Materials aMaterial, long aMaterialAmount, MaterialStack aByProduct01, MaterialStack aByProduct02, MaterialStack aByProduct03) {
- registerReverseArcSmelting(aStack, new ItemData(aMaterial==null?null:new MaterialStack(aMaterial, aMaterialAmount), aByProduct01, aByProduct02, aByProduct03));
- }
-
- public static void registerReverseArcSmelting(ItemStack aStack, ItemData aData) {
- if (aStack == null || aData == null) return;
- aData = new ItemData(aData);
-
- if (!aData.hasValidMaterialData()) return;
-
- for (MaterialStack tMaterial : aData.getAllMaterialStacks()) {
- if (tMaterial.mMaterial.contains(SubTag.UNBURNABLE)) {
- tMaterial.mMaterial = tMaterial.mMaterial.mSmeltInto.mArcSmeltInto;
- continue;
- }
- if (tMaterial.mMaterial.contains(SubTag.EXPLOSIVE)) {
- tMaterial.mMaterial = Materials.Ash;
- tMaterial.mAmount /= 4;
- continue;
- }
- if (tMaterial.mMaterial.contains(SubTag.FLAMMABLE)) {
- tMaterial.mMaterial = Materials.Ash;
- tMaterial.mAmount /= 2;
- continue;
- }
- if (tMaterial.mMaterial.contains(SubTag.NO_SMELTING)) {
- tMaterial.mAmount = 0;
- continue;
- }
- if (tMaterial.mMaterial.contains(SubTag.METAL)) {
- tMaterial.mMaterial = tMaterial.mMaterial.mSmeltInto.mArcSmeltInto;
- continue;
- }
- tMaterial.mAmount = 0;
- }
-
- aData = new ItemData(aData);
-
- if (aData.mByProducts.length > 3) for (MaterialStack tMaterial : aData.getAllMaterialStacks()) if (tMaterial.mMaterial == Materials.Ash) tMaterial.mAmount = 0;
-
- aData = new ItemData(aData);
-
- if (!aData.hasValidMaterialData()) return;
-
- long tAmount = 0; for (MaterialStack tMaterial : aData.getAllMaterialStacks()) tAmount += tMaterial.mAmount * tMaterial.mMaterial.getMass();
-
- RA.addArcFurnaceRecipe(aStack, new ItemStack[] {GT_OreDictUnificator.getIngotOrDust(aData.mMaterial), GT_OreDictUnificator.getIngotOrDust(aData.getByProduct(0)), GT_OreDictUnificator.getIngotOrDust(aData.getByProduct(1)), GT_OreDictUnificator.getIngotOrDust(aData.getByProduct(2))}, null, (int)Math.max(16, tAmount / M), 96);
- }
-
- public static void registerReverseMacerating(ItemStack aStack, Materials aMaterial, long aMaterialAmount, MaterialStack aByProduct01, MaterialStack aByProduct02, MaterialStack aByProduct03, boolean aAllowHammer) {
- registerReverseMacerating(aStack, new ItemData(aMaterial==null?null:new MaterialStack(aMaterial, aMaterialAmount), aByProduct01, aByProduct02, aByProduct03), aAllowHammer);
- }
-
- public static void registerReverseMacerating(ItemStack aStack, ItemData aData, boolean aAllowHammer) {
- if (aStack == null || aData == null) return;
- aData = new ItemData(aData);
-
- if (!aData.hasValidMaterialData()) return;
-
- for (MaterialStack tMaterial : aData.getAllMaterialStacks()) tMaterial.mMaterial = tMaterial.mMaterial.mMacerateInto;
-
- aData = new ItemData(aData);
-
- if (!aData.hasValidMaterialData()) return;
-
- long tAmount = 0; for (MaterialStack tMaterial : aData.getAllMaterialStacks()) tAmount += tMaterial.mAmount * tMaterial.mMaterial.getMass();
-
- RA.addPulveriserRecipe(aStack, new ItemStack[] {GT_OreDictUnificator.getDust(aData.mMaterial), GT_OreDictUnificator.getDust(aData.getByProduct(0)), GT_OreDictUnificator.getDust(aData.getByProduct(1)), GT_OreDictUnificator.getDust(aData.getByProduct(2))}, null, (int)Math.max(16, tAmount / M), 4);
-
- if (aAllowHammer) for (MaterialStack tMaterial : aData.getAllMaterialStacks()) if (tMaterial.mMaterial.contains(SubTag.CRYSTAL) && !tMaterial.mMaterial.contains(SubTag.METAL)) {
- if (RA.addForgeHammerRecipe(GT_Utility.copyAmount(1, aStack), GT_OreDictUnificator.getGem(aData.mMaterial), 200, 32)) break;
- }
- ItemStack tDust = GT_OreDictUnificator.getDust(aData.mMaterial);
- if (tDust != null && GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1, aStack), tDust, GT_OreDictUnificator.getDust(aData.getByProduct(0)), 100, GT_OreDictUnificator.getDust(aData.getByProduct(1)), 100, true)) {
- if (GregTech_API.sThaumcraftCompat != null) GregTech_API.sThaumcraftCompat.addCrucibleRecipe(IThaumcraftCompat.ADVANCEDENTROPICPROCESSING, aStack, tDust, Arrays.asList(new TC_AspectStack(TC_Aspects.PERDITIO, Math.max(1, (aData.mMaterial.mAmount * 2) / M))));
- }
- }
-
- /**
- * You give this Function a Material and it will scan almost everything for adding recycling Recipes
- *
- * @param aMat a Material, for example an Ingot or a Gem.
- * @param aOutput the Dust you usually get from macerating aMat
- * @param aRecipeReplacing allows to replace the Recipe with a Plate variant
- */
- public static synchronized void registerUsagesForMaterials(ItemStack aMat, String aPlate, boolean aRecipeReplacing) {
- if (aMat == null) return;
- aMat = GT_Utility.copy(aMat);
- ItemStack tStack;
- ItemData aItemData = GT_OreDictUnificator.getItemData(aMat);
- if (aItemData == null || aItemData.mPrefix != OrePrefixes.ingot) aPlate = null;
- if (aPlate != null && GT_OreDictUnificator.getFirstOre(aPlate, 1) == null) aPlate = null;
-
- sMt1.func_150996_a(aMat.getItem());
- sMt1.stackSize = 1;
- Items.feather.setDamage(sMt1, Items.feather.getDamage(aMat));
-
- sMt2.func_150996_a(new ItemStack(Blocks.dirt).getItem());
- sMt2.stackSize = 1;
- Items.feather.setDamage(sMt2, 0);
-
- for (ItemStack[] tRecipe : sShapes1) {
- int tAmount1 = 0;
- for (ItemStack tMat : tRecipe) {
- if (tMat == sMt1) tAmount1++;
- }
- if (aItemData != null && aItemData.hasValidPrefixMaterialData()) for (ItemStack tCrafted : GT_ModHandler.getRecipeOutputs(tRecipe)) {
- GT_OreDictUnificator.addItemData(tCrafted, new ItemData(aItemData.mMaterial.mMaterial, aItemData.mMaterial.mAmount * tAmount1));
- }
- }
-
- for (Materials tMaterial : sRodMaterialList) {
- ItemStack tMt2 = GT_OreDictUnificator.get(OrePrefixes.stick, tMaterial, 1);
- if (tMt2 != null) {
- sMt2.func_150996_a(tMt2.getItem());
- sMt2.stackSize = 1;
- Items.feather.setDamage(sMt2, Items.feather.getDamage(tMt2));
-
- for (int i = 0; i < sShapes1.length; i++) {
- ItemStack[] tRecipe = sShapes1[i];
-
- int tAmount1 = 0, tAmount2 = 0;
- for (ItemStack tMat : tRecipe) {
- if (tMat == sMt1) tAmount1++;
- if (tMat == sMt2) tAmount2++;
- }
- for (ItemStack tCrafted : GT_ModHandler.getVanillyToolRecipeOutputs(tRecipe)) {
- if (aItemData != null && aItemData.hasValidPrefixMaterialData()) GT_OreDictUnificator.addItemData(tCrafted, new ItemData(aItemData.mMaterial.mMaterial, aItemData.mMaterial.mAmount * tAmount1, new MaterialStack(tMaterial, OrePrefixes.stick.mMaterialAmount * tAmount2)));
-
- if (aRecipeReplacing && aPlate != null && sShapesA[i] != null && sShapesA[i].length > 1) {
- assert aItemData != null;
- if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.recipereplacements, aItemData.mMaterial.mMaterial+"."+sShapesA[i][0], true)) {
- if (null != (tStack = GT_ModHandler.removeRecipe(tRecipe))) {
- switch (sShapesA[i].length) {
- case 2: GT_ModHandler.addCraftingRecipe(tStack, GT_ModHandler.RecipeBits.BUFFERED, new Object[] {sShapesA[i][1] , s_P.charAt(0), aPlate, s_R.charAt(0), OrePrefixes.stick.get(tMaterial), s_I.charAt(0), aItemData}); break;
- case 3: GT_ModHandler.addCraftingRecipe(tStack, GT_ModHandler.RecipeBits.BUFFERED, new Object[] {sShapesA[i][1], sShapesA[i][2] , s_P.charAt(0), aPlate, s_R.charAt(0), OrePrefixes.stick.get(tMaterial), s_I.charAt(0), aItemData}); break;
- default: GT_ModHandler.addCraftingRecipe(tStack, GT_ModHandler.RecipeBits.BUFFERED, new Object[] {sShapesA[i][1], sShapesA[i][2], sShapesA[i][3] , s_P.charAt(0), aPlate, s_R.charAt(0), OrePrefixes.stick.get(tMaterial), s_I.charAt(0), aItemData}); break;
- }
- }
- }
- }
- }
- }
- }
- }
- }
-
- private static final ItemStack sMt1 = new ItemStack(Blocks.dirt, 1, 0), sMt2 = new ItemStack(Blocks.dirt, 1, 0);
- private static final String s_H = "h", s_F = "f", s_I = "I", s_P = "P", s_R = "R";
-
- private static final ItemStack[][]
- sShapes1 = new ItemStack[][] {
- {sMt1, null, sMt1, sMt1, sMt1, sMt1, null, sMt1, null},
- {sMt1, null, sMt1, sMt1, null, sMt1, sMt1, sMt1, sMt1},
- {null, sMt1, null, sMt1, sMt1, sMt1, sMt1, null, sMt1},
- {sMt1, sMt1, sMt1, sMt1, null, sMt1, null, null, null},
- {sMt1, null, sMt1, sMt1, sMt1, sMt1, sMt1, sMt1, sMt1},
- {sMt1, sMt1, sMt1, sMt1, null, sMt1, sMt1, null, sMt1},
- {null, null, null, sMt1, null, sMt1, sMt1, null, sMt1},
- {null, sMt1, null, null, sMt1, null, null, sMt2, null},
- {sMt1, sMt1, sMt1, null, sMt2, null, null, sMt2, null},
- {null, sMt1, null, null, sMt2, null, null, sMt2, null},
- {sMt1, sMt1, null, sMt1, sMt2, null, null, sMt2, null},
- {null, sMt1, sMt1, null, sMt2, sMt1, null, sMt2, null},
- {sMt1, sMt1, null, null, sMt2, null, null, sMt2, null},
- {null, sMt1, sMt1, null, sMt2, null, null, sMt2, null},
- {null, sMt1, null, sMt1, null, null, null, sMt1, sMt2},
- {null, sMt1, null, null, null, sMt1, sMt2, sMt1, null},
- {null, sMt1, null, sMt1, null, sMt1, null, null, sMt2},
- {null, sMt1, null, sMt1, null, sMt1, sMt2, null, null},
- {null, sMt2, null, null, sMt1, null, null, sMt1, null},
- {null, sMt2, null, null, sMt2, null, sMt1, sMt1, sMt1},
- {null, sMt2, null, null, sMt2, null, null, sMt1, null},
- {null, sMt2, null, sMt1, sMt2, null, sMt1, sMt1, null},
- {null, sMt2, null, null, sMt2, sMt1, null, sMt1, sMt1},
- {null, sMt2, null, null, sMt2, null, sMt1, sMt1, null},
- {sMt1, null, null, null, sMt2, null, null, null, sMt2},
- {null, null, sMt1, null, sMt2, null, sMt2, null, null},
- {sMt1, null, null, null, sMt2, null, null, null, null},
- {null, null, sMt1, null, sMt2, null, null, null, null},
- {sMt1, sMt2, null, null, null, null, null, null, null},
- {sMt2, sMt1, null, null, null, null, null, null, null},
- {sMt1, null, null, sMt2, null, null, null, null, null},
- {sMt2, null, null, sMt1, null, null, null, null, null},
- {sMt1, sMt1, sMt1, sMt1, sMt1, sMt1, null, sMt2, null},
- {sMt1, sMt1, null, sMt1, sMt1, sMt2, sMt1, sMt1, null},
- {null, sMt1, sMt1, sMt2, sMt1, sMt1, null, sMt1, sMt1},
- {null, sMt2, null, sMt1, sMt1, sMt1, sMt1, sMt1, sMt1},
- {sMt1, sMt1, sMt1, sMt1, sMt2, sMt1, null, sMt2, null},
- {sMt1, sMt1, null, sMt1, sMt2, sMt2, sMt1, sMt1, null},
- {null, sMt1, sMt1, sMt2, sMt2, sMt1, null, sMt1, sMt1},
- {null, sMt2, null, sMt1, sMt2, sMt1, sMt1, sMt1, sMt1},
- {sMt1, null, null, null, sMt1, null, null, null, null},
- {null, sMt1, null, sMt1, null, null, null, null, null},
- {sMt1, sMt1, null, sMt2, null, sMt1, sMt2, null, null},
- {null, sMt1, sMt1, sMt1, null, sMt2, null, null, sMt2}
- };
-
- private static final String[][] sShapesA = new String[][] {
- null,
- null,
- null,
- {"Helmet" , s_P+s_P+s_P, s_P+s_H+s_P},
- {"ChestPlate" , s_P+s_H+s_P, s_P+s_P+s_P, s_P+s_P+s_P},
- {"Pants" , s_P+s_P+s_P, s_P+s_H+s_P, s_P+" "+s_P},
- {"Boots" , s_P+" "+s_P, s_P+s_H+s_P},
- {"Sword" , " "+s_P+" ", s_F+s_P+s_H, " "+s_R+" "},
- {"Pickaxe" , s_P+s_I+s_I, s_F+s_R+s_H, " "+s_R+" "},
- {"Shovel" , s_F+s_P+s_H, " "+s_R+" ", " "+s_R+" "},
- {"Axe" , s_P+s_I+s_H, s_P+s_R+" ", s_F+s_R+" "},
- {"Axe" , s_P+s_I+s_H, s_P+s_R+" ", s_F+s_R+" "},
- {"Hoe" , s_P+s_I+s_H, s_F+s_R+" ", " "+s_R+" "},
- {"Hoe" , s_P+s_I+s_H, s_F+s_R+" ", " "+s_R+" "},
- {"Sickle" , " "+s_P+" ", s_P+s_F+" ", s_H+s_P+s_R},
- {"Sickle" , " "+s_P+" ", s_P+s_F+" ", s_H+s_P+s_R},
- {"Sickle" , " "+s_P+" ", s_P+s_F+" ", s_H+s_P+s_R},
- {"Sickle" , " "+s_P+" ", s_P+s_F+" ", s_H+s_P+s_R},
- {"Sword" , " "+s_R+" ", s_F+s_P+s_H, " "+s_P+" "},
- {"Pickaxe" , " "+s_R+" ", s_F+s_R+s_H, s_P+s_I+s_I},
- {"Shovel" , " "+s_R+" ", " "+s_R+" ", s_F+s_P+s_H},
- {"Axe" , s_F+s_R+" ", s_P+s_R+" ", s_P+s_I+s_H},
- {"Axe" , s_F+s_R+" ", s_P+s_R+" ", s_P+s_I+s_H},
- {"Hoe" , " "+s_R+" ", s_F+s_R+" ", s_P+s_I+s_H},
- {"Hoe" , " "+s_R+" ", s_F+s_R+" ", s_P+s_I+s_H},
- {"Spear" , s_P+s_H+" ", s_F+s_R+" ", " "+" "+s_R},
- {"Spear" , s_P+s_H+" ", s_F+s_R+" ", " "+" "+s_R},
- {"Knive" , s_H+s_P, s_R+s_F},
- {"Knive" , s_F+s_H, s_P+s_R},
- {"Knive" , s_F+s_H, s_P+s_R},
- {"Knive" , s_P+s_F, s_R+s_H},
- {"Knive" , s_P+s_F, s_R+s_H},
- null,
- null,
- null,
- null,
- {"WarAxe" , s_P+s_P+s_P, s_P+s_R+s_P, s_F+s_R+s_H},
- null,
- null,
- null,
- {"Shears" , s_H+s_P, s_P+s_F},
- {"Shears" , s_H+s_P, s_P+s_F},
- {"Scythe" , s_I+s_P+s_H, s_R+s_F+s_P, s_R+" "+" "},
- {"Scythe" , s_H+s_P+s_I, s_P+s_F+s_R, " "+" "+s_R}
- };
-}
diff --git a/main/java/gregtech/api/util/GT_Shaped_Recipe.java b/main/java/gregtech/api/util/GT_Shaped_Recipe.java
deleted file mode 100644
index dcf46598e5..0000000000
--- a/main/java/gregtech/api/util/GT_Shaped_Recipe.java
+++ /dev/null
@@ -1,95 +0,0 @@
-package gregtech.api.util;
-
-import gregtech.api.interfaces.internal.IGT_CraftingRecipe;
-import gregtech.api.items.GT_MetaGenerated_Tool;
-import net.minecraft.enchantment.Enchantment;
-import net.minecraft.enchantment.EnchantmentHelper;
-import net.minecraft.inventory.InventoryCrafting;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.world.World;
-import net.minecraftforge.oredict.ShapedOreRecipe;
-
-public class GT_Shaped_Recipe extends ShapedOreRecipe implements IGT_CraftingRecipe {
- public final boolean mDismantleable, mRemovableByGT, mKeepingNBT;
- private final Enchantment[] mEnchantmentsAdded;
- private final int[] mEnchantmentLevelsAdded;
-
- public GT_Shaped_Recipe(ItemStack aResult, boolean aDismantleAble, boolean aRemovableByGT, boolean aKeepingNBT, Enchantment[] aEnchantmentsAdded, int[] aEnchantmentLevelsAdded, Object... aRecipe) {
- super(aResult, aRecipe);
- mEnchantmentsAdded = aEnchantmentsAdded;
- mEnchantmentLevelsAdded = aEnchantmentLevelsAdded;
- mRemovableByGT = aRemovableByGT;
- mKeepingNBT = aKeepingNBT;
- mDismantleable = aDismantleAble;
- }
-
- @Override
- public boolean matches(InventoryCrafting aGrid, World aWorld) {
- if (mKeepingNBT) {
- ItemStack tStack = null;
- for (int i = 0; i < aGrid.getSizeInventory(); i++) {
- if (aGrid.getStackInSlot(i) != null) {
- if (tStack != null) {
- if ((tStack.hasTagCompound() != aGrid.getStackInSlot(i).hasTagCompound()) || (tStack.hasTagCompound() && !tStack.getTagCompound().equals(aGrid.getStackInSlot(i).getTagCompound()))) return false;
- }
- tStack = aGrid.getStackInSlot(i);
- }
- }
- }
- return super.matches(aGrid, aWorld);
- }
-
- @Override
- public ItemStack getCraftingResult(InventoryCrafting aGrid) {
- ItemStack rStack = super.getCraftingResult(aGrid);
- if (rStack != null) {
- // Update the Stack
- GT_Utility.updateItemStack(rStack);
-
- // Keeping NBT
- if (mKeepingNBT) for (int i = 0; i < aGrid.getSizeInventory(); i++) {
- if (aGrid.getStackInSlot(i) != null && aGrid.getStackInSlot(i).hasTagCompound()) {
- rStack.setTagCompound((NBTTagCompound)aGrid.getStackInSlot(i).getTagCompound().copy());
- break;
- }
- }
-
- // Charge Values
- if (GT_ModHandler.isElectricItem(rStack)) {
- GT_ModHandler.dischargeElectricItem(rStack, Integer.MAX_VALUE, Integer.MAX_VALUE, true, false, true);
- int tCharge = 0;
- for (int i = 0; i < aGrid.getSizeInventory(); i++) tCharge += GT_ModHandler.dischargeElectricItem(aGrid.getStackInSlot(i), Integer.MAX_VALUE, Integer.MAX_VALUE, true, true, true);
- if (tCharge > 0) GT_ModHandler.chargeElectricItem(rStack, tCharge, Integer.MAX_VALUE, true, false);
- }
-
- // Saving Ingredients inside the Item.
- if (mDismantleable) {
- NBTTagCompound rNBT = rStack.getTagCompound(), tNBT = new NBTTagCompound();
- if (rNBT == null) rNBT = new NBTTagCompound();
- for (int i = 0; i < 9; i++) {
- ItemStack tStack = aGrid.getStackInSlot(i);
- if (tStack != null && GT_Utility.getContainerItem(tStack, true) == null && !(tStack.getItem() instanceof GT_MetaGenerated_Tool)) {
- tStack = GT_Utility.copyAmount(1, tStack);
- GT_ModHandler.dischargeElectricItem(tStack, Integer.MAX_VALUE, Integer.MAX_VALUE, true, false, true);
- tNBT.setTag("Ingredient."+i, tStack.writeToNBT(new NBTTagCompound()));
- }
- }
- rNBT.setTag("GT.CraftingComponents", tNBT);
- rStack.setTagCompound(rNBT);
- }
-
- // Add Enchantments
- for (int i = 0; i < mEnchantmentsAdded.length; i++) GT_Utility.ItemNBT.addEnchantment(rStack, mEnchantmentsAdded[i], EnchantmentHelper.getEnchantmentLevel(mEnchantmentsAdded[i].effectId, rStack) + mEnchantmentLevelsAdded[i]);
-
- // Update the Stack again
- GT_Utility.updateItemStack(rStack);
- }
- return rStack;
- }
-
- @Override
- public boolean isRemovable() {
- return mRemovableByGT;
- }
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/util/GT_Shapeless_Recipe.java b/main/java/gregtech/api/util/GT_Shapeless_Recipe.java
deleted file mode 100644
index 1fcca0809b..0000000000
--- a/main/java/gregtech/api/util/GT_Shapeless_Recipe.java
+++ /dev/null
@@ -1,95 +0,0 @@
-package gregtech.api.util;
-
-import gregtech.api.interfaces.internal.IGT_CraftingRecipe;
-import gregtech.api.items.GT_MetaGenerated_Tool;
-import net.minecraft.enchantment.Enchantment;
-import net.minecraft.enchantment.EnchantmentHelper;
-import net.minecraft.inventory.InventoryCrafting;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.world.World;
-import net.minecraftforge.oredict.ShapelessOreRecipe;
-
-public class GT_Shapeless_Recipe extends ShapelessOreRecipe implements IGT_CraftingRecipe {
- public final boolean mDismantleable, mRemovableByGT, mKeepingNBT;
- private final Enchantment[] mEnchantmentsAdded;
- private final int[] mEnchantmentLevelsAdded;
-
- public GT_Shapeless_Recipe(ItemStack aResult, boolean aDismantleAble, boolean aRemovableByGT, boolean aKeepingNBT, Enchantment[] aEnchantmentsAdded, int[] aEnchantmentLevelsAdded, Object... aRecipe) {
- super(aResult, aRecipe);
- mEnchantmentsAdded = aEnchantmentsAdded;
- mEnchantmentLevelsAdded = aEnchantmentLevelsAdded;
- mRemovableByGT = aRemovableByGT;
- mKeepingNBT = aKeepingNBT;
- mDismantleable = aDismantleAble;
- }
-
- @Override
- public boolean matches(InventoryCrafting aGrid, World aWorld) {
- if (mKeepingNBT) {
- ItemStack tStack = null;
- for (int i = 0; i < aGrid.getSizeInventory(); i++) {
- if (aGrid.getStackInSlot(i) != null) {
- if (tStack != null) {
- if ((tStack.hasTagCompound() != aGrid.getStackInSlot(i).hasTagCompound()) || (tStack.hasTagCompound() && !tStack.getTagCompound().equals(aGrid.getStackInSlot(i).getTagCompound()))) return false;
- }
- tStack = aGrid.getStackInSlot(i);
- }
- }
- }
- return super.matches(aGrid, aWorld);
- }
-
- @Override
- public ItemStack getCraftingResult(InventoryCrafting aGrid) {
- ItemStack rStack = super.getCraftingResult(aGrid);
- if (rStack != null) {
- // Update the Stack
- GT_Utility.updateItemStack(rStack);
-
- // Keeping NBT
- if (mKeepingNBT) for (int i = 0; i < aGrid.getSizeInventory(); i++) {
- if (aGrid.getStackInSlot(i) != null && aGrid.getStackInSlot(i).hasTagCompound()) {
- rStack.setTagCompound((NBTTagCompound)aGrid.getStackInSlot(i).getTagCompound().copy());
- break;
- }
- }
-
- // Charge Values
- if (GT_ModHandler.isElectricItem(rStack)) {
- GT_ModHandler.dischargeElectricItem(rStack, Integer.MAX_VALUE, Integer.MAX_VALUE, true, false, true);
- int tCharge = 0;
- for (int i = 0; i < aGrid.getSizeInventory(); i++) tCharge += GT_ModHandler.dischargeElectricItem(aGrid.getStackInSlot(i), Integer.MAX_VALUE, Integer.MAX_VALUE, true, true, true);
- if (tCharge > 0) GT_ModHandler.chargeElectricItem(rStack, tCharge, Integer.MAX_VALUE, true, false);
- }
-
- // Saving Ingredients inside the Item.
- if (mDismantleable) {
- NBTTagCompound rNBT = rStack.getTagCompound(), tNBT = new NBTTagCompound();
- if (rNBT == null) rNBT = new NBTTagCompound();
- for (int i = 0; i < 9; i++) {
- ItemStack tStack = aGrid.getStackInSlot(i);
- if (tStack != null && GT_Utility.getContainerItem(tStack, true) == null && !(tStack.getItem() instanceof GT_MetaGenerated_Tool)) {
- tStack = GT_Utility.copyAmount(1, tStack);
- GT_ModHandler.dischargeElectricItem(tStack, Integer.MAX_VALUE, Integer.MAX_VALUE, true, false, true);
- tNBT.setTag("Ingredient."+i, tStack.writeToNBT(new NBTTagCompound()));
- }
- }
- rNBT.setTag("GT.CraftingComponents", tNBT);
- rStack.setTagCompound(rNBT);
- }
-
- // Add Enchantments
- for (int i = 0; i < mEnchantmentsAdded.length; i++) GT_Utility.ItemNBT.addEnchantment(rStack, mEnchantmentsAdded[i], EnchantmentHelper.getEnchantmentLevel(mEnchantmentsAdded[i].effectId, rStack) + mEnchantmentLevelsAdded[i]);
-
- // Update the Stack again
- GT_Utility.updateItemStack(rStack);
- }
- return rStack;
- }
-
- @Override
- public boolean isRemovable() {
- return mRemovableByGT;
- }
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/util/GT_SpawnEventHandler.java b/main/java/gregtech/api/util/GT_SpawnEventHandler.java
deleted file mode 100644
index d4d4c65d6c..0000000000
--- a/main/java/gregtech/api/util/GT_SpawnEventHandler.java
+++ /dev/null
@@ -1,46 +0,0 @@
-package gregtech.api.util;
-
-import gregtech.api.metatileentity.BaseMetaTileEntity;
-import gregtech.common.tileentities.machines.basic.GT_MetaTileEntity_MonsterRepellent;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import cpw.mods.fml.common.eventhandler.Event;
-import cpw.mods.fml.common.eventhandler.SubscribeEvent;
-import net.minecraft.entity.EnumCreatureType;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraftforge.common.MinecraftForge;
-import net.minecraftforge.event.entity.living.LivingSpawnEvent.CheckSpawn;
-
-public class GT_SpawnEventHandler {
-
- public static volatile List <int[]> mobReps = new ArrayList();
-
- public GT_SpawnEventHandler(){
- MinecraftForge.EVENT_BUS.register(this);
- }
-
- @SubscribeEvent
- public void denyMobSpawn(CheckSpawn event)
- {
- if (event.getResult() == Event.Result.ALLOW) {return;}
- if (event.entityLiving.isCreatureType(EnumCreatureType.monster, false))
- {
- for(int[] rep : mobReps){
- if(rep[3] == event.entity.worldObj.provider.dimensionId){
- TileEntity tTile = event.entity.worldObj.getTileEntity(rep[0], rep[1], rep[2]);
- if(tTile instanceof BaseMetaTileEntity && ((BaseMetaTileEntity)tTile).getMetaTileEntity() instanceof GT_MetaTileEntity_MonsterRepellent){
- int r = ((GT_MetaTileEntity_MonsterRepellent)((BaseMetaTileEntity)tTile).getMetaTileEntity()).mRange;
- double dx = rep[0] + 0.5F - event.entity.posX;
- double dy = rep[1] + 0.5F - event.entity.posY;
- double dz = rep[2] + 0.5F - event.entity.posZ;
- if ((dx * dx + dz * dz + dy * dy) <= Math.pow(r, 2)) {
- event.setResult(Event.Result.DENY);
- }
- }
- }
- }
- }
- }
-}
diff --git a/main/java/gregtech/api/util/GT_Utility.java b/main/java/gregtech/api/util/GT_Utility.java
deleted file mode 100644
index 0ae3da3909..0000000000
--- a/main/java/gregtech/api/util/GT_Utility.java
+++ /dev/null
@@ -1,1791 +0,0 @@
-package gregtech.api.util;
-
-import static gregtech.api.enums.GT_Values.*;
-import gregtech.api.GregTech_API;
-import gregtech.api.damagesources.GT_DamageSources;
-import gregtech.api.enchants.Enchantment_Radioactivity;
-import gregtech.api.enums.GT_Values;
-import gregtech.api.enums.ItemList;
-import gregtech.api.enums.SubTag;
-import gregtech.api.events.BlockScanningEvent;
-import gregtech.api.interfaces.IDebugableBlock;
-import gregtech.api.interfaces.IProjectileItem;
-import gregtech.api.interfaces.tileentity.*;
-import gregtech.api.items.GT_EnergyArmor_Item;
-import gregtech.api.items.GT_Generic_Item;
-import gregtech.api.net.GT_Packet_Sound;
-import gregtech.api.objects.GT_ItemStack;
-import gregtech.api.objects.ItemData;
-import gregtech.api.threads.GT_Runnable_Sound;
-import ic2.api.recipe.IRecipeInput;
-import ic2.api.recipe.RecipeInputItemStack;
-import ic2.api.recipe.RecipeInputOreDict;
-import ic2.api.recipe.RecipeOutput;
-
-import java.lang.reflect.Constructor;
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-import java.text.DecimalFormat;
-import java.text.DecimalFormatSymbols;
-import java.text.NumberFormat;
-import java.util.*;
-import java.util.Map.Entry;
-
-import net.minecraft.block.Block;
-import net.minecraft.enchantment.Enchantment;
-import net.minecraft.enchantment.EnchantmentHelper;
-import net.minecraft.entity.*;
-import net.minecraft.entity.item.EntityItem;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.entity.player.EntityPlayerMP;
-import net.minecraft.init.Blocks;
-import net.minecraft.init.Items;
-import net.minecraft.inventory.IInventory;
-import net.minecraft.inventory.ISidedInventory;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.*;
-import net.minecraft.nbt.NBTBase.NBTPrimitive;
-import net.minecraft.network.play.server.S07PacketRespawn;
-import net.minecraft.network.play.server.S1DPacketEntityEffect;
-import net.minecraft.potion.Potion;
-import net.minecraft.potion.PotionEffect;
-import net.minecraft.server.MinecraftServer;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.tileentity.TileEntityChest;
-import net.minecraft.util.AxisAlignedBB;
-import net.minecraft.util.ChatComponentText;
-import net.minecraft.util.MathHelper;
-import net.minecraft.world.World;
-import net.minecraft.world.WorldServer;
-import net.minecraftforge.common.DimensionManager;
-import net.minecraftforge.common.MinecraftForge;
-import net.minecraftforge.common.util.ForgeDirection;
-import net.minecraftforge.fluids.*;
-import net.minecraftforge.fluids.FluidContainerRegistry.FluidContainerData;
-import cpw.mods.fml.common.FMLCommonHandler;
-import cofh.api.transport.*;
-
-/**
- * NEVER INCLUDE THIS FILE IN YOUR MOD!!!
- *
- * Just a few Utility Functions I use.
- */
-public class GT_Utility {
- public static volatile int VERSION = 508;
-
- public static class ItemNBT {
- public static void setNBT(ItemStack aStack, NBTTagCompound aNBT) {
- if (aNBT == null) {aStack.setTagCompound(null); return;}
- ArrayList<String> tTagsToRemove = new ArrayList<String>();
- for (Object tKey : aNBT.func_150296_c()) {
- NBTBase tValue = aNBT.getTag((String)tKey);
- if (tValue == null || (tValue instanceof NBTPrimitive && ((NBTPrimitive)tValue).func_150291_c() == 0) || (tValue instanceof NBTTagString && isStringInvalid(((NBTTagString)tValue).func_150285_a_()))) tTagsToRemove.add((String)tKey);
- }
- for (Object tKey : tTagsToRemove) aNBT.removeTag((String)tKey);
- aStack.setTagCompound(aNBT.hasNoTags()?null:aNBT);
- }
-
- public static NBTTagCompound getNBT(ItemStack aStack) {
- NBTTagCompound rNBT = aStack.getTagCompound();
- return rNBT==null?new NBTTagCompound():rNBT;
- }
-
- public static void setPunchCardData(ItemStack aStack, String aPunchCardData) {
- NBTTagCompound tNBT = getNBT(aStack);
- tNBT.setString("GT.PunchCardData", aPunchCardData);
- setNBT(aStack, tNBT);
- }
- public static String getPunchCardData(ItemStack aStack) {
- NBTTagCompound tNBT = getNBT(aStack);
- return tNBT.getString("GT.PunchCardData");
- }
-
- public static void setLighterFuel(ItemStack aStack, long aFuel) {
- NBTTagCompound tNBT = getNBT(aStack);
- tNBT.setLong("GT.LighterFuel", aFuel);
- setNBT(aStack, tNBT);
- }
- public static long getLighterFuel(ItemStack aStack) {
- NBTTagCompound tNBT = getNBT(aStack);
- return tNBT.getLong("GT.LighterFuel");
- }
-
- public static void setMapID(ItemStack aStack, short aMapID) {
- NBTTagCompound tNBT = getNBT(aStack);
- tNBT.setShort("map_id", aMapID);
- setNBT(aStack, tNBT);
- }
- public static short getMapID(ItemStack aStack) {
- NBTTagCompound tNBT = getNBT(aStack);
- if (!tNBT.hasKey("map_id")) return -1;
- return tNBT.getShort("map_id");
- }
-
- public static void setBookTitle(ItemStack aStack, String aTitle) {
- NBTTagCompound tNBT = getNBT(aStack);
- tNBT.setString("title", aTitle);
- setNBT(aStack, tNBT);
- }
- public static String getBookTitle(ItemStack aStack) {
- NBTTagCompound tNBT = getNBT(aStack);
- return tNBT.getString("title");
- }
-
- public static void setBookAuthor(ItemStack aStack, String aAuthor) {
- NBTTagCompound tNBT = getNBT(aStack);
- tNBT.setString("author", aAuthor);
- setNBT(aStack, tNBT);
- }
- public static String getBookAuthor(ItemStack aStack) {
- NBTTagCompound tNBT = getNBT(aStack);
- return tNBT.getString("author");
- }
-
- public static void addEnchantment(ItemStack aStack, Enchantment aEnchantment, int aLevel) {
- NBTTagCompound tNBT = getNBT(aStack), tEnchantmentTag;
- if (!tNBT.hasKey("ench", 9)) tNBT.setTag("ench", new NBTTagList());
- NBTTagList tList = tNBT.getTagList("ench", 10);
-
- boolean temp = T;
-
- for (int i = 0; i < tList.tagCount(); i++) {
- tEnchantmentTag = tList.getCompoundTagAt(i);
- if (tEnchantmentTag.getShort("id") == aEnchantment.effectId) {
- tEnchantmentTag.setShort("id", (short)aEnchantment.effectId);
- tEnchantmentTag.setShort("lvl", (byte)aLevel);
- temp = F;
- break;
- }
- }
-
- if (temp) {
- tEnchantmentTag = new NBTTagCompound();
- tEnchantmentTag.setShort("id", (short)aEnchantment.effectId);
- tEnchantmentTag.setShort("lvl", (byte)aLevel);
- tList.appendTag(tEnchantmentTag);
- }
- aStack.setTagCompound(tNBT);
- }
- }
-
- /**
- * THIS IS BULLSHIT!!! WHY DO I HAVE TO DO THIS SHIT JUST TO HAVE ENCHANTS PROPERLY!?!
- */
- public static class GT_EnchantmentHelper {
- private static final BullshitIteratorA mBullshitIteratorA = new BullshitIteratorA();
- private static final BullshitIteratorB mBullshitIteratorB = new BullshitIteratorB();
-
- private static void applyBullshit(IBullshit aBullshitModifier, ItemStack aStack) {
- if (aStack != null) {
- NBTTagList nbttaglist = aStack.getEnchantmentTagList();
- if (nbttaglist != null) {
- for (int i = 0; i < nbttaglist.tagCount(); ++i) {
- try {
- short short1 = nbttaglist.getCompoundTagAt(i).getShort("id");
- short short2 = nbttaglist.getCompoundTagAt(i).getShort("lvl");
- if (Enchantment.enchantmentsList[short1] != null) aBullshitModifier.calculateModifier(Enchantment.enchantmentsList[short1], short2);
- } catch(Throwable e) {
- //
- }
- }
- }
- }
- }
-
- private static void applyArrayOfBullshit(IBullshit aBullshitModifier, ItemStack[] aStacks) {
- ItemStack[] aitemstack1 = aStacks;
- int i = aStacks.length;
- for (int j = 0; j < i; ++j) {
- ItemStack itemstack = aitemstack1[j];
- applyBullshit(aBullshitModifier, itemstack);
- }
- }
-
- public static void applyBullshitA(EntityLivingBase aPlayer, Entity aEntity, ItemStack aStack) {
- mBullshitIteratorA.mPlayer = aPlayer;
- mBullshitIteratorA.mEntity = aEntity;
- if (aPlayer != null) applyArrayOfBullshit(mBullshitIteratorA, aPlayer.getLastActiveItems());
- if (aStack != null) applyBullshit(mBullshitIteratorA, aStack);
- }
-
- public static void applyBullshitB(EntityLivingBase aPlayer, Entity aEntity, ItemStack aStack) {
- mBullshitIteratorB.mPlayer = aPlayer;
- mBullshitIteratorB.mEntity = aEntity;
- if (aPlayer != null) applyArrayOfBullshit(mBullshitIteratorB, aPlayer.getLastActiveItems());
- if (aStack != null) applyBullshit(mBullshitIteratorB, aStack);
- }
-
- static final class BullshitIteratorA implements IBullshit {
- public EntityLivingBase mPlayer;
- public Entity mEntity;
- BullshitIteratorA() {}
-
- @Override
- public void calculateModifier(Enchantment aEnchantment, int aLevel) {
- aEnchantment.func_151367_b(mPlayer, mEntity, aLevel);
- }
- }
-
- static final class BullshitIteratorB implements IBullshit {
- public EntityLivingBase mPlayer;
- public Entity mEntity;
- BullshitIteratorB() {}
-
- @Override
- public void calculateModifier(Enchantment aEnchantment, int aLevel) {
- aEnchantment.func_151368_a(mPlayer, mEntity, aLevel);
- }
- }
-
- interface IBullshit {
- void calculateModifier(Enchantment aEnchantment, int aLevel);
- }
- }
-
- public static Field getPublicField(Object aObject, String aField) {
- Field rField = null;
- try {
- rField = aObject.getClass().getDeclaredField(aField);
- } catch (Throwable e) {/*Do nothing*/}
- return rField;
- }
-
- public static Field getField(Object aObject, String aField) {
- Field rField = null;
- try {
- rField = aObject.getClass().getDeclaredField(aField);
- rField.setAccessible(T);
- } catch (Throwable e) {/*Do nothing*/}
- return rField;
- }
-
- public static Field getField(Class aObject, String aField) {
- Field rField = null;
- try {
- rField = aObject.getDeclaredField(aField);
- rField.setAccessible(T);
- } catch (Throwable e) {/*Do nothing*/}
- return rField;
- }
-
- public static Method getMethod(Class aObject, String aMethod, Class<?>... aParameterTypes) {
- Method rMethod = null;
- try {
- rMethod = aObject.getMethod(aMethod, aParameterTypes);
- rMethod.setAccessible(T);
- } catch (Throwable e) {/*Do nothing*/}
- return rMethod;
- }
-
- public static Method getMethod(Object aObject, String aMethod, Class<?>... aParameterTypes) {
- Method rMethod = null;
- try {
- rMethod = aObject.getClass().getMethod(aMethod, aParameterTypes);
- rMethod.setAccessible(T);
- } catch (Throwable e) {/*Do nothing*/}
- return rMethod;
- }
-
- public static Field getField(Object aObject, String aField, boolean aPrivate, boolean aLogErrors) {
- try {
- Field tField = (aObject instanceof Class)?((Class)aObject).getDeclaredField(aField):(aObject instanceof String)?Class.forName((String)aObject).getDeclaredField(aField):aObject.getClass().getDeclaredField(aField);
- if (aPrivate) tField.setAccessible(T);
- return tField;
- } catch (Throwable e) {
- if (aLogErrors) e.printStackTrace(GT_Log.err);
- }
- return null;
- }
-
- public static Object getFieldContent(Object aObject, String aField, boolean aPrivate, boolean aLogErrors) {
- try {
- Field tField = (aObject instanceof Class)?((Class)aObject).getDeclaredField(aField):(aObject instanceof String)?Class.forName((String)aObject).getDeclaredField(aField):aObject.getClass().getDeclaredField(aField);
- if (aPrivate) tField.setAccessible(T);
- return tField.get(aObject instanceof Class || aObject instanceof String ? null : aObject);
- } catch (Throwable e) {
- if (aLogErrors) e.printStackTrace(GT_Log.err);
- }
- return null;
- }
-
- public static Object callPublicMethod(Object aObject, String aMethod, Object... aParameters) {
- return callMethod(aObject, aMethod, F, F, T, aParameters);
- }
-
- public static Object callPrivateMethod(Object aObject, String aMethod, Object... aParameters) {
- return callMethod(aObject, aMethod, T, F, T, aParameters);
- }
-
- public static Object callMethod(Object aObject, String aMethod, boolean aPrivate, boolean aUseUpperCasedDataTypes, boolean aLogErrors, Object... aParameters) {
- try {
- Class<?>[] tParameterTypes = new Class<?>[aParameters.length];
- for (byte i = 0; i < aParameters.length; i++) {
- if (aParameters[i] instanceof Class) {
- tParameterTypes[i] = (Class)aParameters[i];
- aParameters[i] = null;
- } else {
- tParameterTypes[i] = aParameters[i].getClass();
- }
- if (!aUseUpperCasedDataTypes) {
- if (tParameterTypes[i] == Boolean.class ) tParameterTypes[i] = boolean.class; else
- if (tParameterTypes[i] == Byte.class ) tParameterTypes[i] = byte.class; else
- if (tParameterTypes[i] == Short.class ) tParameterTypes[i] = short.class; else
- if (tParameterTypes[i] == Integer.class ) tParameterTypes[i] = int.class; else
- if (tParameterTypes[i] == Long.class ) tParameterTypes[i] = long.class; else
- if (tParameterTypes[i] == Float.class ) tParameterTypes[i] = float.class; else
- if (tParameterTypes[i] == Double.class ) tParameterTypes[i] = double.class;
- }
- }
-
- Method tMethod = (aObject instanceof Class)?((Class)aObject).getMethod(aMethod, tParameterTypes):aObject.getClass().getMethod(aMethod, tParameterTypes);
- if (aPrivate) tMethod.setAccessible(T);
- return tMethod.invoke(aObject, aParameters);
- } catch (Throwable e) {
- if (aLogErrors) e.printStackTrace(GT_Log.err);
- }
- return null;
- }
-
- public static Object callConstructor(String aClass, int aConstructorIndex, Object aReplacementObject, boolean aLogErrors, Object... aParameters) {
- if (aConstructorIndex < 0) {
- try {
- for (Constructor tConstructor : Class.forName(aClass).getConstructors()) {
- try {
- return tConstructor.newInstance(aParameters);
- } catch (Throwable e) {/*Do nothing*/}
- }
- } catch (Throwable e) {
- if (aLogErrors) e.printStackTrace(GT_Log.err);
- }
- } else {
- try {
- return Class.forName(aClass).getConstructors()[aConstructorIndex].newInstance(aParameters);
- } catch (Throwable e) {
- if (aLogErrors) e.printStackTrace(GT_Log.err);
- }
- }
- return aReplacementObject;
- }
-
- public static String capitalizeString(String aString) {
- if (aString != null && aString.length() > 0) return aString.substring(0, 1).toUpperCase() + aString.substring(1);
- return E;
- }
-
- public static boolean getPotion(EntityLivingBase aPlayer, int aPotionIndex) {
- try {
- Field tPotionHashmap = null;
-
- Field[] var3 = EntityLiving.class.getDeclaredFields();
- int var4 = var3.length;
-
- for (int var5 = 0; var5 < var4; ++var5) {
- Field var6 = var3[var5];
- if (var6.getType() == HashMap.class) {
- tPotionHashmap = var6;
- tPotionHashmap.setAccessible(T);
- break;
- }
- }
-
- if (tPotionHashmap != null) return ((HashMap)tPotionHashmap.get(aPlayer)).get(Integer.valueOf(aPotionIndex)) != null;
- } catch (Throwable e) {
- if (D1) e.printStackTrace(GT_Log.err);
- }
- return F;
- }
-
- public static String getClassName(Object aObject) {
- if (aObject == null) return "null";
- return aObject.getClass().getName().substring(aObject.getClass().getName().lastIndexOf(".")+1);
- }
-
- public static void removePotion(EntityLivingBase aPlayer, int aPotionIndex) {
- try {
- Field tPotionHashmap = null;
-
- Field[] var3 = EntityLiving.class.getDeclaredFields();
- int var4 = var3.length;
-
- for (int var5 = 0; var5 < var4; ++var5) {
- Field var6 = var3[var5];
- if (var6.getType() == HashMap.class) {
- tPotionHashmap = var6;
- tPotionHashmap.setAccessible(T);
- break;
- }
- }
-
- if (tPotionHashmap != null) ((HashMap)tPotionHashmap.get(aPlayer)).remove(Integer.valueOf(aPotionIndex));
- } catch (Throwable e) {
- if (D1) e.printStackTrace(GT_Log.err);
- }
- }
-
- public static boolean getFullInvisibility(EntityPlayer aPlayer) {
- try {
- if (aPlayer.isInvisible()) {
- for (int i = 0; i < 4; i++) {
- if (aPlayer.inventory.armorInventory[i] != null) {
- if (aPlayer.inventory.armorInventory[i].getItem() instanceof GT_EnergyArmor_Item) {
- if ((((GT_EnergyArmor_Item)aPlayer.inventory.armorInventory[i].getItem()).mSpecials & 512) != 0) {
- if (GT_ModHandler.canUseElectricItem(aPlayer.inventory.armorInventory[i], 10000)) {
- return T;
- }
- }
- }
- }
- }
- }
- } catch(Throwable e) {if (D1) e.printStackTrace(GT_Log.err);}
- return F;
- }
-
- public static ItemStack suckOneItemStackAt(World aWorld, double aX, double aY, double aZ, double aL, double aH, double aW) {
- for (EntityItem tItem : (ArrayList<EntityItem>)aWorld.getEntitiesWithinAABB(EntityItem.class, AxisAlignedBB.getBoundingBox(aX, aY, aZ, aX+aL, aY+aH, aZ+aW))) {
- if (!tItem.isDead) {
- aWorld.removeEntity(tItem);
- tItem.setDead();
- return tItem.getEntityItem();
- }
- }
- return null;
- }
-
- public static byte getOppositeSide(int aSide) {
- return (byte)ForgeDirection.getOrientation(aSide).getOpposite().ordinal();
- }
-
- public static byte getTier(long l) {
- byte i = -1;
- while (++i < V.length) if (l <= V[i]) return i;
- return i;
- }
-
- public static void sendChatToPlayer(EntityPlayer aPlayer, String aChatMessage) {
- if (aPlayer != null && aPlayer instanceof EntityPlayerMP && aChatMessage != null) {
- aPlayer.addChatComponentMessage(new ChatComponentText(aChatMessage));
- }
- }
-
- public static boolean TE_CHECK = F, BC_CHECK = F, CHECK_ALL = T;
-
- public static void checkAvailabilities() {
- if (CHECK_ALL) {
- try {
- Class tClass = IItemDuct.class;
- tClass.getCanonicalName();
- TE_CHECK = T;
- } catch(Throwable e) {/**/}
- try {
- Class tClass = buildcraft.api.transport.IPipeTile.class;
- tClass.getCanonicalName();
- BC_CHECK = T;
- } catch(Throwable e) {/**/}
- CHECK_ALL = F;
- }
- }
-
- public static boolean isConnectableNonInventoryPipe(Object aTileEntity, int aSide) {
- if (aTileEntity == null) return F;
- checkAvailabilities();
- if (TE_CHECK) if (aTileEntity instanceof IItemDuct) return T;
- if (BC_CHECK) if (aTileEntity instanceof buildcraft.api.transport.IPipeTile) return ((buildcraft.api.transport.IPipeTile)aTileEntity).isPipeConnected(ForgeDirection.getOrientation(aSide));
- return F;
- }
-
- /**
- * Moves Stack from Inv-Slot to Inv-Slot, without checking if its even allowed.
- * @return the Amount of moved Items
- */
- public static byte moveStackIntoPipe(IInventory aTileEntity1, Object aTileEntity2, int[] aGrabSlots, int aGrabFrom, int aPutTo, List<ItemStack> aFilter, boolean aInvertFilter, byte aMaxTargetStackSize, byte aMinTargetStackSize, byte aMaxMoveAtOnce, byte aMinMoveAtOnce) {
- if (aTileEntity1 == null || aMaxTargetStackSize <= 0 || aMinTargetStackSize <= 0 || aMinTargetStackSize > aMaxTargetStackSize || aMaxMoveAtOnce <= 0 || aMinMoveAtOnce > aMaxMoveAtOnce) return 0;
- if (aTileEntity2 != null) {
- checkAvailabilities();
- if (TE_CHECK && aTileEntity2 instanceof IItemDuct) {
- for (int i = 0; i < aGrabSlots.length; i++) {
- if (listContainsItem(aFilter, aTileEntity1.getStackInSlot(aGrabSlots[i]), T, aInvertFilter)) {
- if (isAllowedToTakeFromSlot(aTileEntity1, aGrabSlots[i], (byte)aGrabFrom, aTileEntity1.getStackInSlot(aGrabSlots[i]))) {
- if (Math.max(aMinMoveAtOnce, aMinTargetStackSize) <= aTileEntity1.getStackInSlot(aGrabSlots[i]).stackSize) {
- ItemStack tStack = copyAmount(Math.min(aTileEntity1.getStackInSlot(aGrabSlots[i]).stackSize, Math.min(aMaxMoveAtOnce, aMaxTargetStackSize)), aTileEntity1.getStackInSlot(aGrabSlots[i]));
- ItemStack rStack = ((IItemDuct)aTileEntity2).insertItem(ForgeDirection.getOrientation(aPutTo), copy(tStack));
- byte tMovedItemCount = (byte)(tStack.stackSize - (rStack == null ? 0 : rStack.stackSize));
- if (tMovedItemCount >= 1/*Math.max(aMinMoveAtOnce, aMinTargetStackSize)*/) {
- //((cofh.api.transport.IItemConduit)aTileEntity2).insertItem(ForgeDirection.getOrientation(aPutTo), copyAmount(tMovedItemCount, tStack), F);
- aTileEntity1.decrStackSize(aGrabSlots[i], tMovedItemCount);
- aTileEntity1.markDirty();
- return tMovedItemCount;
- }
- }
- }
- }
- }
- return 0;
- }
- if (BC_CHECK && aTileEntity2 instanceof buildcraft.api.transport.IPipeTile) {
- for (int i = 0; i < aGrabSlots.length; i++) {
- if (listContainsItem(aFilter, aTileEntity1.getStackInSlot(aGrabSlots[i]), T, aInvertFilter)) {
- if (isAllowedToTakeFromSlot(aTileEntity1, aGrabSlots[i], (byte)aGrabFrom, aTileEntity1.getStackInSlot(aGrabSlots[i]))) {
- if (Math.max(aMinMoveAtOnce, aMinTargetStackSize) <= aTileEntity1.getStackInSlot(aGrabSlots[i]).stackSize) {
- ItemStack tStack = copyAmount(Math.min(aTileEntity1.getStackInSlot(aGrabSlots[i]).stackSize, Math.min(aMaxMoveAtOnce, aMaxTargetStackSize)), aTileEntity1.getStackInSlot(aGrabSlots[i]));
- byte tMovedItemCount = (byte)((buildcraft.api.transport.IPipeTile)aTileEntity2).injectItem(copy(tStack), F, ForgeDirection.getOrientation(aPutTo));
- if (tMovedItemCount >= Math.max(aMinMoveAtOnce, aMinTargetStackSize)) {
- tMovedItemCount = (byte)(((buildcraft.api.transport.IPipeTile)aTileEntity2).injectItem(copyAmount(tMovedItemCount, tStack), T, ForgeDirection.getOrientation(aPutTo)));
- aTileEntity1.decrStackSize(aGrabSlots[i], tMovedItemCount);
- aTileEntity1.markDirty();
- return tMovedItemCount;
- }
- }
- }
- }
- }
- return 0;
- }
- }
-
- ForgeDirection tDirection = ForgeDirection.getOrientation(aGrabFrom);
- if (aTileEntity1 instanceof TileEntity && tDirection != ForgeDirection.UNKNOWN && tDirection.getOpposite() == ForgeDirection.getOrientation(aPutTo)) {
- int tX = ((TileEntity)aTileEntity1).xCoord + tDirection.offsetX, tY = ((TileEntity)aTileEntity1).yCoord + tDirection.offsetY, tZ = ((TileEntity)aTileEntity1).zCoord + tDirection.offsetZ;
- if (!hasBlockHitBox(((TileEntity)aTileEntity1).getWorldObj(), tX, tY, tZ)) {
- for (int i = 0; i < aGrabSlots.length; i++) {
- if (listContainsItem(aFilter, aTileEntity1.getStackInSlot(aGrabSlots[i]), T, aInvertFilter)) {
- if (isAllowedToTakeFromSlot(aTileEntity1, aGrabSlots[i], (byte)aGrabFrom, aTileEntity1.getStackInSlot(aGrabSlots[i]))) {
- if (Math.max(aMinMoveAtOnce, aMinTargetStackSize) <= aTileEntity1.getStackInSlot(aGrabSlots[i]).stackSize) {
- ItemStack tStack = copyAmount(Math.min(aTileEntity1.getStackInSlot(aGrabSlots[i]).stackSize, Math.min(aMaxMoveAtOnce, aMaxTargetStackSize)), aTileEntity1.getStackInSlot(aGrabSlots[i]));
- EntityItem tEntity = new EntityItem(((TileEntity)aTileEntity1).getWorldObj(), tX+0.5, tY+0.5, tZ+0.5, tStack);
- tEntity.motionX = tEntity.motionY = tEntity.motionZ = 0;
- ((TileEntity)aTileEntity1).getWorldObj().spawnEntityInWorld(tEntity);
- aTileEntity1.decrStackSize(aGrabSlots[i], tStack.stackSize);
- aTileEntity1.markDirty();
- return (byte)tStack.stackSize;
- }
- }
- }
- }
- }
- }
- return 0;
- }
-
- /**
- * Moves Stack from Inv-Slot to Inv-Slot, without checking if its even allowed. (useful for internal Inventory Operations)
- * @return the Amount of moved Items
- */
- public static byte moveStackFromSlotAToSlotB(IInventory aTileEntity1, IInventory aTileEntity2, int aGrabFrom, int aPutTo, byte aMaxTargetStackSize, byte aMinTargetStackSize, byte aMaxMoveAtOnce, byte aMinMoveAtOnce) {
- if (aTileEntity1 == null || aTileEntity2 == null || aMaxTargetStackSize <= 0 || aMinTargetStackSize <= 0 || aMinTargetStackSize > aMaxTargetStackSize || aMaxMoveAtOnce <= 0 || aMinMoveAtOnce > aMaxMoveAtOnce) return 0;
-
- ItemStack tStack1 = aTileEntity1.getStackInSlot(aGrabFrom), tStack2 = aTileEntity2.getStackInSlot(aPutTo), tStack3 = null;
- if (tStack1 != null) {
- if (tStack2 != null && !areStacksEqual(tStack1, tStack2)) return 0;
- tStack3 = copy(tStack1);
- aMaxTargetStackSize = (byte)Math.min(aMaxTargetStackSize, Math.min(tStack3.getMaxStackSize(), Math.min(tStack2==null?Integer.MAX_VALUE:tStack2.getMaxStackSize(), aTileEntity2.getInventoryStackLimit())));
- tStack3.stackSize = Math.min(tStack3.stackSize, aMaxTargetStackSize - (tStack2 == null?0:tStack2.stackSize));
- if (tStack3.stackSize > aMaxMoveAtOnce) tStack3.stackSize = aMaxMoveAtOnce;
- if (tStack3.stackSize + (tStack2==null?0:tStack2.stackSize) >= Math.min(tStack3.getMaxStackSize(), aMinTargetStackSize) && tStack3.stackSize >= aMinMoveAtOnce) {
- tStack3 = aTileEntity1.decrStackSize(aGrabFrom, tStack3.stackSize);
- aTileEntity1.markDirty();
- if (tStack3 != null) {
- if (tStack2 == null) {
- aTileEntity2.setInventorySlotContents(aPutTo, copy(tStack3));
- aTileEntity2.markDirty();
- } else {
- tStack2.stackSize += tStack3.stackSize;
- aTileEntity2.markDirty();
- }
- return (byte)tStack3.stackSize;
- }
- }
- }
- return 0;
- }
-
- public static boolean isAllowedToTakeFromSlot(IInventory aTileEntity, int aSlot, byte aSide, ItemStack aStack) {
- if (ForgeDirection.getOrientation(aSide) == ForgeDirection.UNKNOWN) {
- return isAllowedToTakeFromSlot(aTileEntity, aSlot, (byte)0, aStack)
- || isAllowedToTakeFromSlot(aTileEntity, aSlot, (byte)1, aStack)
- || isAllowedToTakeFromSlot(aTileEntity, aSlot, (byte)2, aStack)
- || isAllowedToTakeFromSlot(aTileEntity, aSlot, (byte)3, aStack)
- || isAllowedToTakeFromSlot(aTileEntity, aSlot, (byte)4, aStack)
- || isAllowedToTakeFromSlot(aTileEntity, aSlot, (byte)5, aStack);
- }
- if (aTileEntity instanceof ISidedInventory) return ((ISidedInventory)aTileEntity).canExtractItem(aSlot, aStack, aSide);
- return T;
- }
-
- public static boolean isAllowedToPutIntoSlot(IInventory aTileEntity, int aSlot, byte aSide, ItemStack aStack, byte aMaxStackSize) {
- ItemStack tStack = aTileEntity.getStackInSlot(aSlot);
- if (tStack != null && (!areStacksEqual(tStack, aStack) || tStack.stackSize >= tStack.getMaxStackSize())) return F;
- if (ForgeDirection.getOrientation(aSide) == ForgeDirection.UNKNOWN) {
- return isAllowedToPutIntoSlot(aTileEntity, aSlot, (byte)0, aStack, aMaxStackSize)
- || isAllowedToPutIntoSlot(aTileEntity, aSlot, (byte)1, aStack, aMaxStackSize)
- || isAllowedToPutIntoSlot(aTileEntity, aSlot, (byte)2, aStack, aMaxStackSize)
- || isAllowedToPutIntoSlot(aTileEntity, aSlot, (byte)3, aStack, aMaxStackSize)
- || isAllowedToPutIntoSlot(aTileEntity, aSlot, (byte)4, aStack, aMaxStackSize)
- || isAllowedToPutIntoSlot(aTileEntity, aSlot, (byte)5, aStack, aMaxStackSize);
- }
- if (aTileEntity instanceof ISidedInventory && !((ISidedInventory)aTileEntity).canInsertItem(aSlot, aStack, aSide)) return F;
- return aTileEntity.isItemValidForSlot(aSlot, aStack);
- }
-
- /**
- * Moves Stack from Inv-Side to Inv-Side.
- * @return the Amount of moved Items
- */
- public static byte moveOneItemStack(Object aTileEntity1, Object aTileEntity2, byte aGrabFrom, byte aPutTo, List<ItemStack> aFilter, boolean aInvertFilter, byte aMaxTargetStackSize, byte aMinTargetStackSize, byte aMaxMoveAtOnce, byte aMinMoveAtOnce) {
- if (aTileEntity1 != null && aTileEntity1 instanceof IInventory) return moveOneItemStack((IInventory)aTileEntity1, aTileEntity2, aGrabFrom, aPutTo, aFilter, aInvertFilter, aMaxTargetStackSize, aMinTargetStackSize, aMaxMoveAtOnce, aMinMoveAtOnce, T);
- return 0;
- }
-
- /**
- * This is only because I needed an additional Parameter for the Double Chest Check.
- */
- private static byte moveOneItemStack(IInventory aTileEntity1, Object aTileEntity2, byte aGrabFrom, byte aPutTo, List<ItemStack> aFilter, boolean aInvertFilter, byte aMaxTargetStackSize, byte aMinTargetStackSize, byte aMaxMoveAtOnce, byte aMinMoveAtOnce, boolean aDoCheckChests) {
- if (aTileEntity1 == null || aMaxTargetStackSize <= 0 || aMinTargetStackSize <= 0 || aMaxMoveAtOnce <= 0 || aMinTargetStackSize > aMaxTargetStackSize || aMinMoveAtOnce > aMaxMoveAtOnce) return 0;
-
- int[] tGrabSlots = null;
- if (aTileEntity1 instanceof ISidedInventory) tGrabSlots = ((ISidedInventory)aTileEntity1).getAccessibleSlotsFromSide(aGrabFrom);
- if (tGrabSlots == null) {
- tGrabSlots = new int[aTileEntity1.getSizeInventory()];
- for (int i = 0; i < tGrabSlots.length; i++) tGrabSlots[i] = i;
- }
-
- if (aTileEntity2 != null && aTileEntity2 instanceof IInventory) {
- int[] tPutSlots = null;
- if (aTileEntity2 instanceof ISidedInventory) tPutSlots = ((ISidedInventory)aTileEntity2).getAccessibleSlotsFromSide(aPutTo);
-
- if (tPutSlots == null) {
- tPutSlots = new int[((IInventory)aTileEntity2).getSizeInventory()];
- for (int i = 0; i < tPutSlots.length; i++) tPutSlots[i] = i;
- }
-
- for (int i = 0; i < tGrabSlots.length; i++) {
- for (int j = 0; j < tPutSlots.length; j++) {
- if (listContainsItem(aFilter, aTileEntity1.getStackInSlot(tGrabSlots[i]), T, aInvertFilter)) {
- if (isAllowedToTakeFromSlot(aTileEntity1, tGrabSlots[i], aGrabFrom, aTileEntity1.getStackInSlot(tGrabSlots[i]))) {
- if (isAllowedToPutIntoSlot((IInventory)aTileEntity2, tPutSlots[j], aPutTo, aTileEntity1.getStackInSlot(tGrabSlots[i]), aMaxTargetStackSize)) {
- byte tMovedItemCount = moveStackFromSlotAToSlotB(aTileEntity1, (IInventory)aTileEntity2, tGrabSlots[i], tPutSlots[j], aMaxTargetStackSize, aMinTargetStackSize, aMaxMoveAtOnce, aMinMoveAtOnce);
- if (tMovedItemCount > 0) return tMovedItemCount;
- }
- }
- }
- }
- }
-
- if (aDoCheckChests && aTileEntity1 instanceof TileEntityChest) {
- TileEntityChest tTileEntity1 = (TileEntityChest)aTileEntity1;
- if (tTileEntity1.adjacentChestChecked) {
- byte tAmount = 0;
- if (tTileEntity1.adjacentChestXNeg != null) {
- tAmount = moveOneItemStack(tTileEntity1.adjacentChestXNeg, aTileEntity2, aGrabFrom, aPutTo, aFilter, aInvertFilter, aMaxTargetStackSize, aMinTargetStackSize, aMaxMoveAtOnce, aMinMoveAtOnce, F);
- } else if (tTileEntity1.adjacentChestZNeg != null) {
- tAmount = moveOneItemStack(tTileEntity1.adjacentChestZNeg, aTileEntity2, aGrabFrom, aPutTo, aFilter, aInvertFilter, aMaxTargetStackSize, aMinTargetStackSize, aMaxMoveAtOnce, aMinMoveAtOnce, F);
- } else if (tTileEntity1.adjacentChestXPos != null) {
- tAmount = moveOneItemStack(tTileEntity1.adjacentChestXPos, aTileEntity2, aGrabFrom, aPutTo, aFilter, aInvertFilter, aMaxTargetStackSize, aMinTargetStackSize, aMaxMoveAtOnce, aMinMoveAtOnce, F);
- } else if (tTileEntity1.adjacentChestZPos != null) {
- tAmount = moveOneItemStack(tTileEntity1.adjacentChestZPos, aTileEntity2, aGrabFrom, aPutTo, aFilter, aInvertFilter, aMaxTargetStackSize, aMinTargetStackSize, aMaxMoveAtOnce, aMinMoveAtOnce, F);
- }
- if (tAmount != 0) return tAmount;
- }
- }
- if (aDoCheckChests && aTileEntity2 instanceof TileEntityChest) {
- TileEntityChest tTileEntity2 = (TileEntityChest)aTileEntity2;
- if (tTileEntity2.adjacentChestChecked) {
- byte tAmount = 0;
- if (tTileEntity2.adjacentChestXNeg != null) {
- tAmount = moveOneItemStack(aTileEntity1, tTileEntity2.adjacentChestXNeg, aGrabFrom, aPutTo, aFilter, aInvertFilter, aMaxTargetStackSize, aMinTargetStackSize, aMaxMoveAtOnce, aMinMoveAtOnce, F);
- } else if (tTileEntity2.adjacentChestZNeg != null) {
- tAmount = moveOneItemStack(aTileEntity1, tTileEntity2.adjacentChestZNeg, aGrabFrom, aPutTo, aFilter, aInvertFilter, aMaxTargetStackSize, aMinTargetStackSize, aMaxMoveAtOnce, aMinMoveAtOnce, F);
- } else if (tTileEntity2.adjacentChestXPos != null) {
- tAmount = moveOneItemStack(aTileEntity1, tTileEntity2.adjacentChestXPos, aGrabFrom, aPutTo, aFilter, aInvertFilter, aMaxTargetStackSize, aMinTargetStackSize, aMaxMoveAtOnce, aMinMoveAtOnce, F);
- } else if (tTileEntity2.adjacentChestZPos != null) {
- tAmount = moveOneItemStack(aTileEntity1, tTileEntity2.adjacentChestZPos, aGrabFrom, aPutTo, aFilter, aInvertFilter, aMaxTargetStackSize, aMinTargetStackSize, aMaxMoveAtOnce, aMinMoveAtOnce, F);
- }
- if (tAmount != 0) return tAmount;
- }
- }
- }
-
- return moveStackIntoPipe(aTileEntity1, aTileEntity2, tGrabSlots, aGrabFrom, aPutTo, aFilter, aInvertFilter, aMaxTargetStackSize, aMinTargetStackSize, aMaxMoveAtOnce, aMinMoveAtOnce);
- }
-
- /**
- * Moves Stack from Inv-Side to Inv-Slot.
- * @return the Amount of moved Items
- */
- public static byte moveOneItemStackIntoSlot(Object aTileEntity1, Object aTileEntity2, byte aGrabFrom, int aPutTo, List<ItemStack> aFilter, boolean aInvertFilter, byte aMaxTargetStackSize, byte aMinTargetStackSize, byte aMaxMoveAtOnce, byte aMinMoveAtOnce) {
- if (aTileEntity1 == null || !(aTileEntity1 instanceof IInventory) || aPutTo < 0 || aMaxTargetStackSize <= 0 || aMinTargetStackSize <= 0 || aMaxMoveAtOnce <= 0 || aMinTargetStackSize > aMaxTargetStackSize || aMinMoveAtOnce > aMaxMoveAtOnce) return 0;
-
- int[] tGrabSlots = null;
- if (aTileEntity1 instanceof ISidedInventory) tGrabSlots = ((ISidedInventory)aTileEntity1).getAccessibleSlotsFromSide(aGrabFrom);
- if (tGrabSlots == null) {
- tGrabSlots = new int[((IInventory)aTileEntity1).getSizeInventory()];
- for (int i = 0; i < tGrabSlots.length; i++) tGrabSlots[i] = i;
- }
-
- if (aTileEntity2 != null && aTileEntity2 instanceof IInventory) {
- for (int i = 0; i < tGrabSlots.length; i++) {
- if (listContainsItem(aFilter, ((IInventory)aTileEntity1).getStackInSlot(tGrabSlots[i]), T, aInvertFilter)) {
- if (isAllowedToTakeFromSlot((IInventory)aTileEntity1, tGrabSlots[i], aGrabFrom, ((IInventory)aTileEntity1).getStackInSlot(tGrabSlots[i]))) {
- if (isAllowedToPutIntoSlot((IInventory)aTileEntity2, aPutTo, (byte)6, ((IInventory)aTileEntity1).getStackInSlot(tGrabSlots[i]), aMaxTargetStackSize)) {
- byte tMovedItemCount = moveStackFromSlotAToSlotB((IInventory)aTileEntity1, (IInventory)aTileEntity2, tGrabSlots[i], aPutTo, aMaxTargetStackSize, aMinTargetStackSize, aMaxMoveAtOnce, aMinMoveAtOnce);
- if (tMovedItemCount > 0) return tMovedItemCount;
- }
- }
- }
- }
- }
-
- moveStackIntoPipe(((IInventory)aTileEntity1), aTileEntity2, tGrabSlots, aGrabFrom, aPutTo, aFilter, aInvertFilter, aMaxTargetStackSize, aMinTargetStackSize, aMaxMoveAtOnce, aMinMoveAtOnce);
- return 0;
- }
-
- /**
- * Moves Stack from Inv-Slot to Inv-Slot.
- * @return the Amount of moved Items
- */
- public static byte moveFromSlotToSlot(IInventory aTileEntity1, IInventory aTileEntity2, int aGrabFrom, int aPutTo, List<ItemStack> aFilter, boolean aInvertFilter, byte aMaxTargetStackSize, byte aMinTargetStackSize, byte aMaxMoveAtOnce, byte aMinMoveAtOnce) {
- if (aTileEntity1 == null || aTileEntity2 == null || aGrabFrom < 0 || aPutTo < 0 || aMaxTargetStackSize <= 0 || aMinTargetStackSize <= 0 || aMaxMoveAtOnce <= 0 || aMinTargetStackSize > aMaxTargetStackSize || aMinMoveAtOnce > aMaxMoveAtOnce) return 0;
- if (listContainsItem(aFilter, aTileEntity1.getStackInSlot(aGrabFrom), T, aInvertFilter)) {
- if (isAllowedToTakeFromSlot(aTileEntity1, aGrabFrom, (byte)6, aTileEntity1.getStackInSlot(aGrabFrom))) {
- if (isAllowedToPutIntoSlot(aTileEntity2, aPutTo, (byte)6, aTileEntity1.getStackInSlot(aGrabFrom), aMaxTargetStackSize)) {
- byte tMovedItemCount = moveStackFromSlotAToSlotB(aTileEntity1, aTileEntity2, aGrabFrom, aPutTo, aMaxTargetStackSize, aMinTargetStackSize, aMaxMoveAtOnce, aMinMoveAtOnce);
- if (tMovedItemCount > 0) return tMovedItemCount;
- }
- }
- }
- return 0;
- }
-
- public static boolean listContainsItem(Collection<ItemStack> aList, ItemStack aStack, boolean aTIfListEmpty, boolean aInvertFilter) {
- if (aStack == null || aStack.stackSize < 1) return F;
- if (aList == null) return aTIfListEmpty;
- while (aList.contains(null)) aList.remove(null);
- if (aList.size() < 1) return aTIfListEmpty;
- Iterator<ItemStack> tIterator = aList.iterator();
- ItemStack tStack = null;
- while (tIterator.hasNext()) if ((tStack = tIterator.next())!= null && areStacksEqual(aStack, tStack)) return !aInvertFilter;
- return aInvertFilter;
- }
-
- public static boolean areStacksOrToolsEqual(ItemStack aStack1, ItemStack aStack2) {
- if (aStack1 != null && aStack2 != null && aStack1.getItem() == aStack2.getItem()) {
- if (aStack1.getItem().isDamageable()) return T;
- return ((aStack1.getTagCompound() == null) == (aStack2.getTagCompound() == null)) && (aStack1.getTagCompound() == null || aStack1.getTagCompound().equals(aStack2.getTagCompound())) && (Items.feather.getDamage(aStack1) == Items.feather.getDamage(aStack2) || Items.feather.getDamage(aStack1) == W || Items.feather.getDamage(aStack2) == W);
- }
- return F;
- }
-
- public static boolean areFluidsEqual(FluidStack aFluid1, FluidStack aFluid2) {
- return areFluidsEqual(aFluid1, aFluid2, F);
- }
-
- public static boolean areFluidsEqual(FluidStack aFluid1, FluidStack aFluid2, boolean aIgnoreNBT) {
- return aFluid1 != null && aFluid2 != null && aFluid1.getFluid() == aFluid2.getFluid() && (aIgnoreNBT || ((aFluid1.tag == null) == (aFluid2.tag == null)) && (aFluid1.tag == null || aFluid1.tag.equals(aFluid2.tag)));
- }
-
- public static boolean areStacksEqual(ItemStack aStack1, ItemStack aStack2) {
- return areStacksEqual(aStack1, aStack2, F);
- }
-
- public static boolean areStacksEqual(ItemStack aStack1, ItemStack aStack2, boolean aIgnoreNBT) {
- return aStack1 != null && aStack2 != null && aStack1.getItem() == aStack2.getItem() && (aIgnoreNBT || ((aStack1.getTagCompound() == null) == (aStack2.getTagCompound() == null)) && (aStack1.getTagCompound() == null || aStack1.getTagCompound().equals(aStack2.getTagCompound()))) && (Items.feather.getDamage(aStack1) == Items.feather.getDamage(aStack2) || Items.feather.getDamage(aStack1) == W || Items.feather.getDamage(aStack2) == W);
- }
-
- public static boolean areUnificationsEqual(ItemStack aStack1, ItemStack aStack2) {
- return areUnificationsEqual(aStack1, aStack2, F);
- }
-
- public static boolean areUnificationsEqual(ItemStack aStack1, ItemStack aStack2, boolean aIgnoreNBT) {
- return areStacksEqual(GT_OreDictUnificator.get(aStack1), GT_OreDictUnificator.get(aStack2), aIgnoreNBT);
- }
-
- public static String getFluidName(Fluid aFluid, boolean aLocalized) {
- if (aFluid == null) return E;
- String rName = aLocalized?aFluid.getLocalizedName(new FluidStack(aFluid, 0)):aFluid.getUnlocalizedName();
- if (rName.contains("fluid.") || rName.contains("tile.")) return capitalizeString(rName.replaceAll("fluid.", E).replaceAll("tile.", E));
- return rName;
- }
-
- public static String getFluidName(FluidStack aFluid, boolean aLocalized) {
- if (aFluid == null) return E;
- return getFluidName(aFluid.getFluid(), aLocalized);
- }
-
- /**
- * Forge screwed the Fluid Registry up again, so I make my own, which is also much more efficient than the stupid Stuff over there.
- */
- private static final List<FluidContainerData> sFluidContainerList = new ArrayList<FluidContainerData>();
- private static final Map<GT_ItemStack, FluidContainerData> sFilledContainerToData = new HashMap<GT_ItemStack, FluidContainerData>();
- private static final Map<GT_ItemStack, Map<Fluid, FluidContainerData>> sEmptyContainerToFluidToData = new HashMap<GT_ItemStack, Map<Fluid, FluidContainerData>>();
-
- static {
- GregTech_API.sItemStackMappings.add(sFilledContainerToData);
- GregTech_API.sItemStackMappings.add(sEmptyContainerToFluidToData);
- }
-
- public static void reInit() {
- sFilledContainerToData.clear();
- sEmptyContainerToFluidToData.clear();
- for (FluidContainerData tData : sFluidContainerList) {
- sFilledContainerToData.put(new GT_ItemStack(tData.filledContainer), tData);
- Map<Fluid, FluidContainerData> tFluidToContainer = sEmptyContainerToFluidToData.get(new GT_ItemStack(tData.emptyContainer));
- if (tFluidToContainer == null) {
- sEmptyContainerToFluidToData.put(new GT_ItemStack(tData.emptyContainer), tFluidToContainer = new HashMap<Fluid, FluidContainerData>());
- GregTech_API.sFluidMappings.add(tFluidToContainer);
- }
- tFluidToContainer.put(tData.fluid.getFluid(), tData);
- }
- }
-
- public static void addFluidContainerData(FluidContainerData aData) {
- sFluidContainerList.add(aData);
- sFilledContainerToData.put(new GT_ItemStack(aData.filledContainer), aData);
- Map<Fluid, FluidContainerData> tFluidToContainer = sEmptyContainerToFluidToData.get(new GT_ItemStack(aData.emptyContainer));
- if (tFluidToContainer == null) {
- sEmptyContainerToFluidToData.put(new GT_ItemStack(aData.emptyContainer), tFluidToContainer = new HashMap<Fluid, FluidContainerData>());
- GregTech_API.sFluidMappings.add(tFluidToContainer);
- }
- tFluidToContainer.put(aData.fluid.getFluid(), aData);
- }
-
- public static ItemStack fillFluidContainer(FluidStack aFluid, ItemStack aStack, boolean aRemoveFluidDirectly, boolean aCheckIFluidContainerItems) {
- if (isStackInvalid(aStack) || aFluid == null) return null;
- if (GT_ModHandler.isWater(aFluid) && ItemList.Bottle_Empty.isStackEqual(aStack)) {
- if (aFluid.amount >= 250) {
- if (aRemoveFluidDirectly) aFluid.amount -= 250;
- return new ItemStack(Items.potionitem, 1, 0);
- }
- return null;
- }
- if (aCheckIFluidContainerItems && aStack.getItem() instanceof IFluidContainerItem && ((IFluidContainerItem)aStack.getItem()).getFluid(aStack) == null && ((IFluidContainerItem)aStack.getItem()).getCapacity(aStack) <= aFluid.amount) {
- if (aRemoveFluidDirectly)
- aFluid.amount -= ((IFluidContainerItem)aStack.getItem()).fill(aStack = copyAmount(1, aStack), aFluid, T);
- else
- ((IFluidContainerItem)aStack.getItem()).fill(aStack = copyAmount(1, aStack), aFluid, T);
- return aStack;
- }
- Map<Fluid, FluidContainerData> tFluidToContainer = sEmptyContainerToFluidToData.get(new GT_ItemStack(aStack));
- if (tFluidToContainer == null) return null;
- FluidContainerData tData = tFluidToContainer.get(aFluid.getFluid());
- if (tData == null || tData.fluid.amount > aFluid.amount) return null;
- if (aRemoveFluidDirectly) aFluid.amount -= tData.fluid.amount;
- return copyAmount(1, tData.filledContainer);
- }
-
- public static ItemStack getFluidDisplayStack(Fluid aFluid) {
- return aFluid==null?null:getFluidDisplayStack(new FluidStack(aFluid, 0), F);
- }
-
- public static ItemStack getFluidDisplayStack(FluidStack aFluid, boolean aUseStackSize) {
- if (aFluid == null || aFluid.getFluid() == null) return null;
- int tmp = 0;
- try{
- tmp = aFluid.getFluid().getID();
- }catch(Exception e){
- System.err.println(e);
- }
- ItemStack rStack = ItemList.Display_Fluid.getWithDamage(aUseStackSize ? aFluid.amount / 1000 : 1, tmp);
- NBTTagCompound tNBT = new NBTTagCompound();
- tNBT.setLong("mFluidDisplayAmount", aFluid.amount);
- tNBT.setLong("mFluidDisplayHeat", aFluid.getFluid().getTemperature(aFluid));
- tNBT.setBoolean("mFluidState", aFluid.getFluid().isGaseous(aFluid));
- rStack.setTagCompound(tNBT);
- return rStack;
- }
-
- public static boolean containsFluid(ItemStack aStack, FluidStack aFluid, boolean aCheckIFluidContainerItems) {
- if (isStackInvalid(aStack) || aFluid == null) return F;
- if (aCheckIFluidContainerItems && aStack.getItem() instanceof IFluidContainerItem && ((IFluidContainerItem)aStack.getItem()).getCapacity(aStack) > 0) return aFluid.isFluidEqual(((IFluidContainerItem)aStack.getItem()).getFluid(aStack = copyAmount(1, aStack)));
- FluidContainerData tData = sFilledContainerToData.get(new GT_ItemStack(aStack));
- return tData==null?F:tData.fluid.isFluidEqual(aFluid);
- }
-
- public static FluidStack getFluidForFilledItem(ItemStack aStack, boolean aCheckIFluidContainerItems) {
- if (isStackInvalid(aStack)) return null;
- if (aCheckIFluidContainerItems && aStack.getItem() instanceof IFluidContainerItem && ((IFluidContainerItem)aStack.getItem()).getCapacity(aStack) > 0) return ((IFluidContainerItem)aStack.getItem()).drain(copyAmount(1, aStack), Integer.MAX_VALUE, T);
- FluidContainerData tData = sFilledContainerToData.get(new GT_ItemStack(aStack));
- return tData==null?null:tData.fluid.copy();
- }
-
- public static ItemStack getContainerForFilledItem(ItemStack aStack, boolean aCheckIFluidContainerItems) {
- if (isStackInvalid(aStack)) return null;
- FluidContainerData tData = sFilledContainerToData.get(new GT_ItemStack(aStack));
- if (tData != null) return copyAmount(1, tData.emptyContainer);
- if (aCheckIFluidContainerItems && aStack.getItem() instanceof IFluidContainerItem && ((IFluidContainerItem)aStack.getItem()).getCapacity(aStack) > 0) {
- ((IFluidContainerItem)aStack.getItem()).drain(aStack = copyAmount(1, aStack), Integer.MAX_VALUE, T);
- return aStack;
- }
- return null;
- }
-
- public static ItemStack getContainerItem(ItemStack aStack, boolean aCheckIFluidContainerItems) {
- if (isStackInvalid(aStack)) return null;
- if (aStack.getItem().hasContainerItem(aStack)) return aStack.getItem().getContainerItem(aStack);
- /** These are all special Cases, in which it is intended to have only GT Blocks outputting those Container Items */
- if (ItemList.Cell_Empty.isStackEqual(aStack, F, T)) return null;
- if (ItemList.IC2_Fuel_Can_Filled.isStackEqual(aStack, F, T)) return ItemList.IC2_Fuel_Can_Empty.get(1);
- if (aStack.getItem() == Items.potionitem || aStack.getItem() == Items.experience_bottle || ItemList.TF_Vial_FieryBlood.isStackEqual(aStack) || ItemList.TF_Vial_FieryTears.isStackEqual(aStack)) return ItemList.Bottle_Empty.get(1);
-
- if (aCheckIFluidContainerItems && aStack.getItem() instanceof IFluidContainerItem && ((IFluidContainerItem)aStack.getItem()).getCapacity(aStack) > 0) {
- ItemStack tStack = copyAmount(1, aStack);
- ((IFluidContainerItem)aStack.getItem()).drain(tStack, Integer.MAX_VALUE, T);
- if (!areStacksEqual(aStack, tStack)) return tStack;
- return null;
- }
-
- int tCapsuleCount = GT_ModHandler.getCapsuleCellContainerCount(aStack);
- if (tCapsuleCount > 0) return ItemList.Cell_Empty.get(tCapsuleCount);
-
- if (ItemList.IC2_ForgeHammer.isStackEqual(aStack) || ItemList.IC2_WireCutter.isStackEqual(aStack)) return copyMetaData(Items.feather.getDamage(aStack) + 1, aStack);
- return null;
- }
-
- public static synchronized boolean removeSimpleIC2MachineRecipe(ItemStack aInput, Map<IRecipeInput, RecipeOutput> aRecipeList, ItemStack aOutput) {
- if ((isStackInvalid(aInput) && isStackInvalid(aOutput)) || aRecipeList == null) return F;
- boolean rReturn = F;
- Iterator<Map.Entry<IRecipeInput, RecipeOutput>> tIterator = aRecipeList.entrySet().iterator();
- aOutput = GT_OreDictUnificator.get(aOutput);
- while (tIterator.hasNext()) {
- Map.Entry<IRecipeInput, RecipeOutput> tEntry = tIterator.next();
- if (aInput == null || tEntry.getKey().matches(aInput)) {
- List<ItemStack> tList = tEntry.getValue().items;
- if (tList != null) for (ItemStack tOutput : tList) if (aOutput == null || areStacksEqual(GT_OreDictUnificator.get(tOutput), aOutput)) {
- tIterator.remove();
- rReturn = T;
- break;
- }
- }
- }
- return rReturn;
- }
-
- public static boolean addSimpleIC2MachineRecipe(ItemStack aInput, Map<IRecipeInput, RecipeOutput> aRecipeList, NBTTagCompound aNBT, Object... aOutput) {
- if (isStackInvalid(aInput) || aOutput.length == 0 || aRecipeList == null) return F;
- ItemData tOreName = GT_OreDictUnificator.getAssociation(aInput);
- for(int i = 0;i<aOutput.length;i++){if(aOutput[i]==null){System.out.println("EmptyIC2Output!"+aInput.getUnlocalizedName());return F;}}
- if (tOreName != null) {
- aRecipeList.put(new RecipeInputOreDict(tOreName.toString(), aInput.stackSize), new RecipeOutput(aNBT, GT_OreDictUnificator.getStackArray(T, aOutput)));
- } else {
- aRecipeList.put(new RecipeInputItemStack(copy(aInput), aInput.stackSize), new RecipeOutput(aNBT, GT_OreDictUnificator.getStackArray(T, aOutput)));
- }
- return T;
- }
-
- private static int sBookCount = 0;
-
- public static ItemStack getWrittenBook(String aMapping, ItemStack aStackToPutNBT) {
- if (isStringInvalid(aMapping)) return null;
- ItemStack rStack = GregTech_API.sBookList.get(aMapping);
- if (rStack == null) return aStackToPutNBT;
- if (aStackToPutNBT != null) {
- aStackToPutNBT.setTagCompound(rStack.getTagCompound());
- return aStackToPutNBT;
- }
- return copyAmount(1, rStack);
- }
-
- public static ItemStack getWrittenBook(String aMapping, String aTitle, String aAuthor, String... aPages) {
- if (isStringInvalid(aMapping)) return null;
- ItemStack rStack = GregTech_API.sBookList.get(aMapping);
- if (rStack != null) return copyAmount(1, rStack);
- if (isStringInvalid(aTitle) || isStringInvalid(aAuthor) || aPages.length <= 0) return null;
- sBookCount++;
- rStack = new ItemStack(Items.written_book, 1);
- NBTTagCompound tNBT = new NBTTagCompound();
- tNBT.setString("title", GT_LanguageManager.addStringLocalization("Book." + aTitle + ".Name", aTitle));
- tNBT.setString("author", aAuthor);
- NBTTagList tNBTList = new NBTTagList();
- for (byte i = 0; i < aPages.length; i++) {
- aPages[i] = GT_LanguageManager.addStringLocalization("Book." + aTitle + ".Page" + ((i<10)?"0"+i:i), aPages[i]);
- if (i < 48) {
- if (aPages[i].length() < 256)
- tNBTList.appendTag(new NBTTagString(aPages[i]));
- else
- GT_Log.err.println("WARNING: String for written Book too long! -> " + aPages[i]);
- } else {
- GT_Log.err.println("WARNING: Too much Pages for written Book! -> " + aTitle);
- break;
- }
- }
- tNBTList.appendTag(new NBTTagString("Credits to " + aAuthor + " for writing this Book. This was Book Nr. " + sBookCount + " at its creation. Gotta get 'em all!"));
- tNBT.setTag("pages", tNBTList);
- rStack.setTagCompound(tNBT);
- GT_Log.out.println("GT_Mod: Added Book to Book List - Mapping: '"+aMapping+"' - Name: '"+aTitle+"' - Author: '"+aAuthor+"'");
- GregTech_API.sBookList.put(aMapping, rStack);
- return copy(rStack);
- }
-
- public static Map<GT_PlayedSound, Integer> sPlayedSoundMap = new HashMap<GT_PlayedSound, Integer>();
-
- public static boolean doSoundAtClient(String aSoundName, int aTimeUntilNextSound, float aSoundStrength) {
- return doSoundAtClient(aSoundName, aTimeUntilNextSound, aSoundStrength, GT.getThePlayer());
- }
-
- public static boolean doSoundAtClient(String aSoundName, int aTimeUntilNextSound, float aSoundStrength, Entity aEntity) {
- if (aEntity == null) return F;
- return doSoundAtClient(aSoundName, aTimeUntilNextSound, aSoundStrength, aEntity.posX, aEntity.posY, aEntity.posZ);
- }
-
- public static boolean doSoundAtClient(String aSoundName, int aTimeUntilNextSound, float aSoundStrength, double aX, double aY, double aZ) {
- return doSoundAtClient(aSoundName, aTimeUntilNextSound, aSoundStrength, 0.9F + new Random().nextFloat() * 0.2F, aX, aY, aZ);
- }
-
- public static boolean doSoundAtClient(String aSoundName, int aTimeUntilNextSound, float aSoundStrength, float aSoundModulation, double aX, double aY, double aZ) {
- if (isStringInvalid(aSoundName) || !FMLCommonHandler.instance().getEffectiveSide().isClient() || GT.getThePlayer() == null || !GT.getThePlayer().worldObj.isRemote) return F;
- if (GregTech_API.sMultiThreadedSounds)
- new Thread(new GT_Runnable_Sound(GT.getThePlayer().worldObj, MathHelper.floor_double(aX), MathHelper.floor_double(aY), MathHelper.floor_double(aZ), aTimeUntilNextSound, aSoundName, aSoundStrength, aSoundModulation), "Sound Effect").start();
- else
- new GT_Runnable_Sound(GT.getThePlayer().worldObj, MathHelper.floor_double(aX), MathHelper.floor_double(aY), MathHelper.floor_double(aZ), aTimeUntilNextSound, aSoundName, aSoundStrength, aSoundModulation).run();
- return T;
- }
-
- public static boolean sendSoundToPlayers(World aWorld, String aSoundName, float aSoundStrength, float aSoundModulation, int aX, int aY, int aZ) {
- if (isStringInvalid(aSoundName) || aWorld == null || aWorld.isRemote) return F;
- NW.sendPacketToAllPlayersInRange(aWorld, new GT_Packet_Sound(aSoundName, aSoundStrength, aSoundModulation, aX, (short)aY, aZ), aX, aZ);
- return T;
- }
-
- public static int stackToInt(ItemStack aStack) {
- if (isStackInvalid(aStack)) return 0;
- return Item.getIdFromItem(aStack.getItem()) | (Items.feather.getDamage(aStack)<<16);
- }
-
- public static int stackToWildcard(ItemStack aStack) {
- if (isStackInvalid(aStack)) return 0;
- return Item.getIdFromItem(aStack.getItem()) | (W<<16);
- }
-
- public static ItemStack intToStack(int aStack) {
- int tID = aStack&(~0>>>16), tMeta = aStack>>>16;
- Item tItem = Item.getItemById(tID);
- if (tItem != null) return new ItemStack(tItem, 1, tMeta);
- return null;
- }
-
- public static Integer[] stacksToIntegerArray(ItemStack... aStacks) {
- Integer[] rArray = new Integer[aStacks.length];
- for (int i = 0; i < rArray.length; i++) {
- rArray[i] = stackToInt(aStacks[i]);
- }
- return rArray;
- }
-
- public static int[] stacksToIntArray(ItemStack... aStacks) {
- int[] rArray = new int[aStacks.length];
- for (int i = 0; i < rArray.length; i++) {
- rArray[i] = stackToInt(aStacks[i]);
- }
- return rArray;
- }
-
- public static boolean arrayContains(Object aObject, Object... aObjects) {
- return listContains(aObject, Arrays.asList(aObjects));
- }
-
- public static boolean listContains(Object aObject, Collection aObjects) {
- if (aObjects == null) return F;
- return aObjects.contains(aObject);
- }
-
- public static <T> boolean arrayContainsNonNull(T... aArray) {
- if (aArray != null) for (Object tObject : aArray) if (tObject != null) return T;
- return F;
- }
-
- public static <T> ArrayList<T> getArrayListWithoutNulls(T... aArray) {
- if (aArray == null) return new ArrayList<T>();
- ArrayList<T> rList = new ArrayList<T>(Arrays.asList(aArray));
- for (int i = 0; i < rList.size(); i++) if (rList.get(i) == null) rList.remove(i--);
- return rList;
- }
-
- public static <T> ArrayList<T> getArrayListWithoutTrailingNulls(T... aArray) {
- if (aArray == null) return new ArrayList<T>();
- ArrayList<T> rList = new ArrayList<T>(Arrays.asList(aArray));
- for (int i = rList.size() - 1; i >= 0 && rList.get(i) == null;) rList.remove(i--);
- return rList;
- }
-
- public static Block getBlock(Object aBlock) {
- return (Block)aBlock;
- }
-
- public static Block getBlockFromStack(Object aStack) {
- if (isStackInvalid(aStack)) return Blocks.air;
- return Block.getBlockFromItem(((ItemStack)aStack).getItem());
- }
-
- public static boolean isBlockValid(Object aBlock) {
- return aBlock != null && (aBlock instanceof Block);
- }
-
- public static boolean isBlockInvalid(Object aBlock) {
- return aBlock == null || !(aBlock instanceof Block);
- }
-
- public static boolean isStringValid(Object aString) {
- return aString != null && !aString.toString().isEmpty();
- }
-
- public static boolean isStringInvalid(Object aString) {
- return aString == null || aString.toString().isEmpty();
- }
-
- public static boolean isStackValid(Object aStack) {
- return aStack != null && (aStack instanceof ItemStack) && ((ItemStack)aStack).getItem() != null && ((ItemStack)aStack).stackSize >= 0;
- }
-
- public static boolean isStackInvalid(Object aStack) {
- return aStack == null || !(aStack instanceof ItemStack) || ((ItemStack)aStack).getItem() == null || ((ItemStack)aStack).stackSize < 0;
- }
-
- public static boolean isDebugItem(ItemStack aStack) {
- return /*ItemList.Armor_Cheat.isStackEqual(aStack, T, T) || */areStacksEqual(GT_ModHandler.getIC2Item("debug", 1), aStack, T);
- }
-
- public static ItemStack updateItemStack(ItemStack aStack) {
- if (isStackValid(aStack) && aStack.getItem() instanceof GT_Generic_Item) ((GT_Generic_Item)aStack.getItem()).isItemStackUsable(aStack);
- return aStack;
- }
-
- public static boolean isOpaqueBlock(World aWorld, int aX, int aY, int aZ) {
- return aWorld.getBlock(aX, aY, aZ).isOpaqueCube();
- }
-
- public static boolean isBlockAir(World aWorld, int aX, int aY, int aZ) {
- return aWorld.getBlock(aX, aY, aZ).isAir(aWorld, aX, aY, aZ);
- }
-
- public static boolean hasBlockHitBox(World aWorld, int aX, int aY, int aZ) {
- return aWorld.getBlock(aX, aY, aZ).getCollisionBoundingBoxFromPool(aWorld, aX, aY, aZ) != null;
- }
-
- public static void setCoordsOnFire(World aWorld, int aX, int aY, int aZ, boolean aReplaceCenter) {
- if (aReplaceCenter)
- if (aWorld.getBlock(aX , aY , aZ ).getCollisionBoundingBoxFromPool(aWorld, aX , aY , aZ ) == null) aWorld.setBlock(aX , aY , aZ , Blocks.fire);
- if (aWorld.getBlock(aX+1, aY , aZ ).getCollisionBoundingBoxFromPool(aWorld, aX+1, aY , aZ ) == null) aWorld.setBlock(aX+1, aY , aZ , Blocks.fire);
- if (aWorld.getBlock(aX-1, aY , aZ ).getCollisionBoundingBoxFromPool(aWorld, aX-1, aY , aZ ) == null) aWorld.setBlock(aX-1, aY , aZ , Blocks.fire);
- if (aWorld.getBlock(aX , aY+1, aZ ).getCollisionBoundingBoxFromPool(aWorld, aX , aY+1, aZ ) == null) aWorld.setBlock(aX , aY+1, aZ , Blocks.fire);
- if (aWorld.getBlock(aX , aY-1, aZ ).getCollisionBoundingBoxFromPool(aWorld, aX , aY-1, aZ ) == null) aWorld.setBlock(aX , aY-1, aZ , Blocks.fire);
- if (aWorld.getBlock(aX , aY , aZ+1).getCollisionBoundingBoxFromPool(aWorld, aX , aY , aZ+1) == null) aWorld.setBlock(aX , aY , aZ+1, Blocks.fire);
- if (aWorld.getBlock(aX , aY , aZ-1).getCollisionBoundingBoxFromPool(aWorld, aX , aY , aZ-1) == null) aWorld.setBlock(aX , aY , aZ-1, Blocks.fire);
- }
-
- public static ItemStack getProjectile(SubTag aProjectileType, IInventory aInventory) {
- if (aInventory != null) for (int i = 0, j = aInventory.getSizeInventory(); i < j; i++) {
- ItemStack rStack = aInventory.getStackInSlot(i);
- if (isStackValid(rStack) && rStack.getItem() instanceof IProjectileItem && ((IProjectileItem)rStack.getItem()).hasProjectile(aProjectileType, rStack)) return updateItemStack(rStack);
- }
- return null;
- }
-
- public static void removeNullStacksFromInventory(IInventory aInventory) {
- if (aInventory != null) for (int i = 0, j = aInventory.getSizeInventory(); i < j; i++) {
- ItemStack tStack = aInventory.getStackInSlot(i);
- if (tStack != null && (tStack.stackSize == 0 || tStack.getItem() == null)) aInventory.setInventorySlotContents(i, null);
- }
- }
-
- /**
- * Converts a Number to a String
- */
- public static String parseNumberToString(int aNumber) {
- String tString = E;
- boolean temp = T, negative = F;
-
- if (aNumber<0) {
- aNumber *= -1;
- negative = T;
- }
-
- for (int i = 1000000000; i > 0; i /= 10) {
- int tDigit = (aNumber/i)%10;
- if ( temp && tDigit != 0) temp = F;
- if (!temp) {
- tString += tDigit;
- if (i != 1) for (int j = i; j > 0; j /= 1000) if (j == 1) tString += ",";
- }
- }
-
- if (tString.equals(E)) tString = "0";
-
- return negative?"-"+tString:tString;
- }
-
- public static NBTTagCompound getNBTContainingBoolean(NBTTagCompound aNBT, Object aTag, boolean aValue) {
- if (aNBT == null) aNBT = new NBTTagCompound();
- aNBT.setBoolean(aTag.toString(), aValue);
- return aNBT;
- }
-
- public static NBTTagCompound getNBTContainingByte(NBTTagCompound aNBT, Object aTag, byte aValue) {
- if (aNBT == null) aNBT = new NBTTagCompound();
- aNBT.setByte(aTag.toString(), aValue);
- return aNBT;
- }
-
- public static NBTTagCompound getNBTContainingShort(NBTTagCompound aNBT, Object aTag, short aValue) {
- if (aNBT == null) aNBT = new NBTTagCompound();
- aNBT.setShort(aTag.toString(), aValue);
- return aNBT;
- }
-
- public static NBTTagCompound getNBTContainingInteger(NBTTagCompound aNBT, Object aTag, int aValue) {
- if (aNBT == null) aNBT = new NBTTagCompound();
- aNBT.setInteger(aTag.toString(), aValue);
- return aNBT;
- }
-
- public static NBTTagCompound getNBTContainingFloat(NBTTagCompound aNBT, Object aTag, float aValue) {
- if (aNBT == null) aNBT = new NBTTagCompound();
- aNBT.setFloat(aTag.toString(), aValue);
- return aNBT;
- }
-
- public static NBTTagCompound getNBTContainingDouble(NBTTagCompound aNBT, Object aTag, double aValue) {
- if (aNBT == null) aNBT = new NBTTagCompound();
- aNBT.setDouble(aTag.toString(), aValue);
- return aNBT;
- }
-
- public static NBTTagCompound getNBTContainingString(NBTTagCompound aNBT, Object aTag, Object aValue) {
- if (aNBT == null) aNBT = new NBTTagCompound();
- if (aValue == null) return aNBT;
- aNBT.setString(aTag.toString(), aValue.toString());
- return aNBT;
- }
-
- public static boolean isWearingFullFrostHazmat(EntityLivingBase aEntity) {
- for (byte i = 1; i < 5; i++) if (!isStackInList(aEntity.getEquipmentInSlot(i), GregTech_API.sFrostHazmatList)) return F;
- return T;
- }
-
- public static boolean isWearingFullHeatHazmat(EntityLivingBase aEntity) {
- for (byte i = 1; i < 5; i++) if (!isStackInList(aEntity.getEquipmentInSlot(i), GregTech_API.sHeatHazmatList)) return F;
- return T;
- }
-
- public static boolean isWearingFullBioHazmat(EntityLivingBase aEntity) {
- for (byte i = 1; i < 5; i++) if (!isStackInList(aEntity.getEquipmentInSlot(i), GregTech_API.sBioHazmatList)) return F;
- return T;
- }
-
- public static boolean isWearingFullRadioHazmat(EntityLivingBase aEntity) {
- for (byte i = 1; i < 5; i++) if (!isStackInList(aEntity.getEquipmentInSlot(i), GregTech_API.sRadioHazmatList)) return F;
- return T;
- }
-
- public static boolean isWearingFullElectroHazmat(EntityLivingBase aEntity) {
- for (byte i = 1; i < 5; i++) if (!isStackInList(aEntity.getEquipmentInSlot(i), GregTech_API.sElectroHazmatList)) return F;
- return T;
- }
-
- public static boolean isWearingFullGasHazmat(EntityLivingBase aEntity) {
- for (byte i = 1; i < 5; i++) if (!isStackInList(aEntity.getEquipmentInSlot(i), GregTech_API.sGasHazmatList)) return F;
- return T;
- }
-
- public static float getHeatDamageFromItem(ItemStack aStack) {
- ItemData tData = GT_OreDictUnificator.getItemData(aStack);
- return tData==null?0:(tData.mPrefix==null?0:tData.mPrefix.mHeatDamage) + (tData.hasValidMaterialData()?tData.mMaterial.mMaterial.mHeatDamage:0);
- }
-
- public static int getRadioactivityLevel(ItemStack aStack) {
- ItemData tData = GT_OreDictUnificator.getItemData(aStack);
- if (tData != null && tData.hasValidMaterialData()) {
- if (tData.mMaterial.mMaterial.mEnchantmentArmors instanceof Enchantment_Radioactivity) return tData.mMaterial.mMaterial.mEnchantmentArmorsLevel;
- if (tData.mMaterial.mMaterial.mEnchantmentTools instanceof Enchantment_Radioactivity) return tData.mMaterial.mMaterial.mEnchantmentToolsLevel;
- }
- return EnchantmentHelper.getEnchantmentLevel(Enchantment_Radioactivity.INSTANCE.effectId, aStack);
- }
-
- public static boolean isImmuneToBreathingGasses(EntityLivingBase aEntity) {
- return isWearingFullGasHazmat(aEntity);
- }
-
- public static boolean applyHeatDamage(EntityLivingBase aEntity, float aDamage) {
- if (aDamage > 0 && aEntity != null && aEntity.getActivePotionEffect(Potion.fireResistance) == null && !isWearingFullHeatHazmat(aEntity)) {
- aEntity.attackEntityFrom(GT_DamageSources.getHeatDamage(), aDamage);
- return T;
- }
- return F;
- }
-
- public static boolean applyFrostDamage(EntityLivingBase aEntity, float aDamage) {
- if (aDamage > 0 && aEntity != null && !isWearingFullFrostHazmat(aEntity)) {
- aEntity.attackEntityFrom(GT_DamageSources.getFrostDamage(), aDamage);
- return T;
- }
- return F;
- }
-
- public static boolean applyElectricityDamage(EntityLivingBase aEntity, long aVoltage, long aAmperage) {
- long aDamage = getTier(aVoltage) * aAmperage * 4;
- if (aDamage > 0 && aEntity != null && !isWearingFullElectroHazmat(aEntity)) {
- aEntity.attackEntityFrom(GT_DamageSources.getElectricDamage(), aDamage);
- return T;
- }
- return F;
- }
-
- public static boolean applyRadioactivity(EntityLivingBase aEntity, int aLevel, int aAmountOfItems) {
- if (aLevel > 0 && aEntity != null && aEntity.getCreatureAttribute() != EnumCreatureAttribute.UNDEAD && aEntity.getCreatureAttribute() != EnumCreatureAttribute.ARTHROPOD && !isWearingFullRadioHazmat(aEntity)) {
- PotionEffect tEffect = null;
- aEntity.addPotionEffect(new PotionEffect(Potion.moveSlowdown.id , aLevel * 140 * aAmountOfItems + Math.max(0, ((tEffect = aEntity.getActivePotionEffect(Potion.moveSlowdown ))==null?0:tEffect.getDuration())), Math.max(0, (5*aLevel) / 7)));
- aEntity.addPotionEffect(new PotionEffect(Potion.digSlowdown.id , aLevel * 150 * aAmountOfItems + Math.max(0, ((tEffect = aEntity.getActivePotionEffect(Potion.digSlowdown ))==null?0:tEffect.getDuration())), Math.max(0, (5*aLevel) / 7)));
- aEntity.addPotionEffect(new PotionEffect(Potion.confusion.id , aLevel * 130 * aAmountOfItems + Math.max(0, ((tEffect = aEntity.getActivePotionEffect(Potion.confusion ))==null?0:tEffect.getDuration())), Math.max(0, (5*aLevel) / 7)));
- aEntity.addPotionEffect(new PotionEffect(Potion.weakness.id , aLevel * 150 * aAmountOfItems + Math.max(0, ((tEffect = aEntity.getActivePotionEffect(Potion.weakness ))==null?0:tEffect.getDuration())), Math.max(0, (5*aLevel) / 7)));
- aEntity.addPotionEffect(new PotionEffect(Potion.hunger.id , aLevel * 130 * aAmountOfItems + Math.max(0, ((tEffect = aEntity.getActivePotionEffect(Potion.hunger ))==null?0:tEffect.getDuration())), Math.max(0, (5*aLevel) / 7)));
- aEntity.addPotionEffect(new PotionEffect(24 /* IC2 Radiation */ , aLevel * 180 * aAmountOfItems + Math.max(0, ((tEffect = aEntity.getActivePotionEffect(Potion.potionTypes[24] ))==null?0:tEffect.getDuration())), Math.max(0, (5*aLevel) / 7)));
- return T;
- }
- return F;
- }
-
- public static ItemStack setStack(Object aSetStack, Object aToStack) {
- if (isStackInvalid(aSetStack) || isStackInvalid(aToStack)) return null;
- ((ItemStack)aSetStack).func_150996_a(((ItemStack)aToStack).getItem());
- ((ItemStack)aSetStack).stackSize = ((ItemStack)aToStack).stackSize;
- Items.feather.setDamage((ItemStack)aSetStack, Items.feather.getDamage((ItemStack)aToStack));
- ((ItemStack)aSetStack).setTagCompound(((ItemStack)aToStack).getTagCompound());
- return (ItemStack)aSetStack;
- }
-
- public static FluidStack[] copyFluidArray(FluidStack... aStacks) {
- FluidStack[] rStacks = new FluidStack[aStacks.length];
- for (int i = 0; i < aStacks.length; i++) if (aStacks[i] != null) rStacks[i] = aStacks[i].copy();
- return rStacks;
- }
-
- public static ItemStack[] copyStackArray(Object... aStacks) {
- ItemStack[] rStacks = new ItemStack[aStacks.length];
- for (int i = 0; i < aStacks.length; i++) rStacks[i] = copy(aStacks[i]);
- return rStacks;
- }
-
- public static ItemStack copy(Object... aStacks) {
- for (Object tStack : aStacks) if (isStackValid(tStack)) return ((ItemStack)tStack).copy();
- return null;
- }
-
- public static ItemStack copyAmount(long aAmount, Object... aStacks) {
- ItemStack rStack = copy(aStacks);
- if (isStackInvalid(rStack)) return null;
- if (aAmount > 64) aAmount = 64; else if (aAmount == -1) aAmount = 111; else if (aAmount < 0) aAmount = 0;
- rStack.stackSize = (byte)aAmount;
- return rStack;
- }
-
- public static ItemStack copyMetaData(long aMetaData, Object... aStacks) {
- ItemStack rStack = copy(aStacks);
- if (isStackInvalid(rStack)) return null;
- Items.feather.setDamage(rStack, (short)aMetaData);
- return rStack;
- }
-
- public static ItemStack copyAmountAndMetaData(long aAmount, long aMetaData, Object... aStacks) {
- ItemStack rStack = copyAmount(aAmount, aStacks);
- if (isStackInvalid(rStack)) return null;
- Items.feather.setDamage(rStack, (short)aMetaData);
- return rStack;
- }
-
- /**
- * returns a copy of an ItemStack with its Stacksize being multiplied by aMultiplier
- */
- public static ItemStack mul(long aMultiplier, Object... aStacks) {
- ItemStack rStack = copy(aStacks);
- if (rStack == null) return null;
- rStack.stackSize *= aMultiplier;
- return rStack;
- }
-
- /**
- * Loads an ItemStack properly.
- */
- public static ItemStack loadItem(NBTTagCompound aNBT, String aTagName) {
- return loadItem(aNBT.getCompoundTag(aTagName));
- }
-
- /**
- * Loads an ItemStack properly.
- */
- public static FluidStack loadFluid(NBTTagCompound aNBT, String aTagName) {
- return loadFluid(aNBT.getCompoundTag(aTagName));
- }
-
- /**
- * Loads an ItemStack properly.
- */
- public static ItemStack loadItem(NBTTagCompound aNBT) {
- if (aNBT == null) return null;
- ItemStack rStack = ItemStack.loadItemStackFromNBT(aNBT);
- try {
- if (rStack != null && (rStack.getItem().getClass().getName().startsWith("ic2.core.migration"))) {
- rStack.getItem().onUpdate(rStack, DW, null, 0, F);
- }
- } catch(Throwable e) {
- e.printStackTrace(GT_Log.err);
- }
- return GT_OreDictUnificator.get(T, rStack);
- }
-
- /**
- * Loads an ItemStack properly.
- */
- public static FluidStack loadFluid(NBTTagCompound aNBT) {
- if (aNBT == null) return null;
- return FluidStack.loadFluidStackFromNBT(aNBT);
- }
-
- public static <E> E selectItemInList(int aIndex, E aReplacement, List<E> aList) {
- if (aList == null || aList.isEmpty()) return aReplacement;
- if (aList.size() <= aIndex) return aList.get(aList.size() - 1);
- if (aIndex < 0) return aList.get(0);
- return aList.get(aIndex);
- }
-
- public static <E> E selectItemInList(int aIndex, E aReplacement, E... aList) {
- if (aList == null || aList.length == 0) return aReplacement;
- if (aList.length <= aIndex) return aList[aList.length - 1];
- if (aIndex < 0) return aList[0];
- return aList[aIndex];
- }
-
- public static boolean isStackInList(ItemStack aStack, Collection<GT_ItemStack> aList) {
- if (aStack == null) {return F;}
- return isStackInList(new GT_ItemStack(aStack), aList);
- }
-
- public static boolean isStackInList(GT_ItemStack aStack, Collection<GT_ItemStack> aList) {
- return aStack != null && (aList.contains(aStack) || aList.contains(new GT_ItemStack(aStack.mItem, aStack.mStackSize, W)));
- }
-
- /**
- * re-maps all Keys of a Map after the Keys were weakened.
- */
- public static <X, Y> Map<X, Y> reMap(Map<X, Y> aMap) {
- Map<X, Y> tMap = new HashMap<X, Y>();
- tMap.putAll(aMap);
- aMap.clear();
- aMap.putAll(tMap);
- return aMap;
- }
-
- /**
- * Why the fuck do neither Java nor Guava have a Function to do this?
- */
- public static <X, Y extends Comparable> LinkedHashMap<X,Y> sortMapByValuesAcending(Map<X,Y> aMap) {
- List<Map.Entry<X,Y>> tEntrySet = new LinkedList<Map.Entry<X,Y>>(aMap.entrySet());
- Collections.sort(tEntrySet, new Comparator<Map.Entry<X,Y>>() {@Override public int compare(Entry<X, Y> aValue1, Entry<X, Y> aValue2) {return aValue1.getValue().compareTo(aValue2.getValue());}});
- LinkedHashMap<X,Y> rMap = new LinkedHashMap<X,Y>();
- for (Map.Entry<X,Y> tEntry : tEntrySet) rMap.put(tEntry.getKey(), tEntry.getValue());
- return rMap;
- }
-
- /**
- * Why the fuck do neither Java nor Guava have a Function to do this?
- */
- public static <X, Y extends Comparable> LinkedHashMap<X,Y> sortMapByValuesDescending(Map<X,Y> aMap) {
- List<Map.Entry<X,Y>> tEntrySet = new LinkedList<Map.Entry<X,Y>>(aMap.entrySet());
- Collections.sort(tEntrySet, new Comparator<Map.Entry<X,Y>>() {@Override public int compare(Entry<X, Y> aValue1, Entry<X, Y> aValue2) {return -aValue1.getValue().compareTo(aValue2.getValue());}});
- LinkedHashMap<X,Y> rMap = new LinkedHashMap<X,Y>();
- for (Map.Entry<X,Y> tEntry : tEntrySet) rMap.put(tEntry.getKey(), tEntry.getValue());
- return rMap;
- }
-
- /**
- * Translates a Material Amount into an Amount of Fluid in Fluid Material Units.
- */
- public static long translateMaterialToFluidAmount(long aMaterialAmount, boolean aRoundUp) {
- return translateMaterialToAmount(aMaterialAmount, L, aRoundUp);
- }
-
- /**
- * Translates a Material Amount into an Amount of Fluid. Second Parameter for things like Bucket Amounts (1000) and similar
- */
- public static long translateMaterialToAmount(long aMaterialAmount, long aAmountPerUnit, boolean aRoundUp) {
- return Math.max(0, ((aMaterialAmount * aAmountPerUnit) / M) + (aRoundUp && (aMaterialAmount * aAmountPerUnit) % M > 0 ? 1 : 0));
- }
-
- /**
- * This checks if the Dimension is really a Dimension and not another Planet or something.
- * Used for my Teleporter.
- */
- public static boolean isRealDimension(int aDimensionID) {
- try {
- if (DimensionManager.getProvider(aDimensionID).getClass().getName().contains("com.xcompwiz.mystcraft")) return T;
- } catch (Throwable e) {/*Do nothing*/}
- try {
- if (DimensionManager.getProvider(aDimensionID).getClass().getName().contains("TwilightForest")) return T;
- } catch (Throwable e) {/*Do nothing*/}
- return GregTech_API.sDimensionalList.contains(aDimensionID);
- }
-
- public static boolean moveEntityToDimensionAtCoords(Entity aEntity, int aDimension, double aX, double aY, double aZ) {
- WorldServer tTargetWorld = DimensionManager.getWorld(aDimension), tOriginalWorld = DimensionManager.getWorld(aEntity.worldObj.provider.dimensionId);
- if (tTargetWorld != null && tOriginalWorld != null && tTargetWorld != tOriginalWorld) {
- if (aEntity.ridingEntity != null) aEntity.mountEntity(null);
- if (aEntity.riddenByEntity != null) aEntity.riddenByEntity.mountEntity(null);
-
- if (aEntity instanceof EntityPlayerMP) {
- EntityPlayerMP aPlayer = (EntityPlayerMP)aEntity;
- aPlayer.dimension = aDimension;
- aPlayer.playerNetServerHandler.sendPacket(new S07PacketRespawn(aPlayer.dimension, aPlayer.worldObj.difficultySetting, aPlayer.worldObj.getWorldInfo().getTerrainType(), aPlayer.theItemInWorldManager.getGameType()));
- tOriginalWorld.removePlayerEntityDangerously(aPlayer);
- aPlayer.isDead = F;
- aPlayer.setWorld(tTargetWorld);
- MinecraftServer.getServer().getConfigurationManager().func_72375_a(aPlayer, tOriginalWorld);
- aPlayer.playerNetServerHandler.setPlayerLocation(aX+0.5, aY+0.5, aZ+0.5, aPlayer.rotationYaw, aPlayer.rotationPitch);
- aPlayer.theItemInWorldManager.setWorld(tTargetWorld);
- MinecraftServer.getServer().getConfigurationManager().updateTimeAndWeatherForPlayer(aPlayer, tTargetWorld);
- MinecraftServer.getServer().getConfigurationManager().syncPlayerInventory(aPlayer);
- Iterator tIterator = aPlayer.getActivePotionEffects().iterator();
- while (tIterator.hasNext()) {
- PotionEffect potioneffect = (PotionEffect)tIterator.next();
- aPlayer.playerNetServerHandler.sendPacket(new S1DPacketEntityEffect(aPlayer.getEntityId(), potioneffect));
- }
- aPlayer.playerNetServerHandler.setPlayerLocation(aX+0.5, aY+0.5, aZ+0.5, aPlayer.rotationYaw, aPlayer.rotationPitch);
- FMLCommonHandler.instance().firePlayerChangedDimensionEvent(aPlayer, tOriginalWorld.provider.dimensionId, aDimension);
- } else {
- aEntity.setPosition(aX+0.5, aY+0.5, aZ+0.5);
- aEntity.worldObj.removeEntity(aEntity);
- aEntity.dimension = aDimension;
- aEntity.isDead = F;
- Entity tNewEntity = EntityList.createEntityByName(EntityList.getEntityString(aEntity), tTargetWorld);
- if (tNewEntity != null) {
- tNewEntity.copyDataFrom(aEntity, T);
- aEntity.setDead();
- tNewEntity.isDead = F;
- boolean temp = tNewEntity.forceSpawn;
- tNewEntity.forceSpawn = T;
- tTargetWorld.spawnEntityInWorld(tNewEntity);
- tNewEntity.forceSpawn = temp;
- tNewEntity.isDead = F;
- aEntity = tNewEntity;
- }
- }
-
- if (aEntity instanceof EntityLivingBase) {
- ((EntityLivingBase)aEntity).setPositionAndUpdate(aX, aY, aZ);
- } else {
- aEntity.setPosition(aX, aY, aZ);
- }
-
- tOriginalWorld.resetUpdateEntityTick();
- tTargetWorld.resetUpdateEntityTick();
- return T;
- }
- return F;
- }
-
- public static int getCoordinateScan(ArrayList<String> aList, EntityPlayer aPlayer, World aWorld, int aScanLevel, int aX, int aY, int aZ, int aSide, float aClickX, float aClickY, float aClickZ) {
- if (aList == null) return 0;
-
- ArrayList<String> tList = new ArrayList<String>();
- int rEUAmount = 0;
-
- TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ);
-
- Block tBlock = aWorld.getBlock(aX, aY, aZ);
-
- tList.add("----- X: " + aX + " Y: " + aY + " Z: " + aZ + " -----");
- try {
- if (tTileEntity != null && tTileEntity instanceof IInventory)
- tList.add("Name: " + ((IInventory)tTileEntity).getInventoryName() + " MetaData: " + aWorld.getBlockMetadata(aX, aY, aZ));
- else
- tList.add("Name: " + tBlock.getUnlocalizedName() + " MetaData: " + aWorld.getBlockMetadata(aX, aY, aZ));
-
- tList.add("Hardness: " + tBlock.getBlockHardness(aWorld, aX, aY, aZ) + " Blast Resistance: " + tBlock.getExplosionResistance(aPlayer, aWorld, aX, aY, aZ, aPlayer.posX, aPlayer.posY, aPlayer.posZ));
- if (tBlock.isBeaconBase(aWorld, aX, aY, aZ, aX, aY+1, aZ)) tList.add("Is valid Beacon Pyramid Material");
- } catch(Throwable e) {if (D1) e.printStackTrace(GT_Log.err);}
- if (tTileEntity != null) {
- try {if (tTileEntity instanceof IFluidHandler) {
- rEUAmount+=500;
- FluidTankInfo[] tTanks = ((IFluidHandler)tTileEntity).getTankInfo(ForgeDirection.getOrientation(aSide));
- if (tTanks != null) for (byte i = 0; i < tTanks.length; i++) {
- tList.add("Tank " + i + ": " + GT_Utility.formatNumbers((tTanks[i].fluid==null?0:tTanks[i].fluid.amount)) + " / " + GT_Utility.formatNumbers(tTanks[i].capacity) + " " + getFluidName(tTanks[i].fluid, T));
- }
- }} catch(Throwable e) {if (D1) e.printStackTrace(GT_Log.err);}
- try {if (tTileEntity instanceof ic2.api.reactor.IReactorChamber) {
- rEUAmount+=500;
- tTileEntity = (TileEntity)(((ic2.api.reactor.IReactorChamber)tTileEntity).getReactor());
- }} catch(Throwable e) {if (D1) e.printStackTrace(GT_Log.err);}
- try {if (tTileEntity instanceof ic2.api.reactor.IReactor) {
- rEUAmount+=500;
- tList.add("Heat: " + ((ic2.api.reactor.IReactor)tTileEntity).getHeat() + "/" + ((ic2.api.reactor.IReactor)tTileEntity).getMaxHeat()
- + " HEM: " + ((ic2.api.reactor.IReactor)tTileEntity).getHeatEffectModifier() + " Base EU Output: "/* + ((ic2.api.reactor.IReactor)tTileEntity).getOutput()*/);
- }} catch(Throwable e) {if (D1) e.printStackTrace(GT_Log.err);}
- try {if (tTileEntity instanceof ic2.api.tile.IWrenchable) {
- rEUAmount+=100;
- tList.add("Facing: " + ((ic2.api.tile.IWrenchable)tTileEntity).getFacing() + " / Chance: " + (((ic2.api.tile.IWrenchable)tTileEntity).getWrenchDropRate()*100) + "%");
- tList.add(((ic2.api.tile.IWrenchable)tTileEntity).wrenchCanRemove(aPlayer)?"You can remove this with a Wrench":"You can NOT remove this with a Wrench");
- }} catch(Throwable e) {if (D1) e.printStackTrace(GT_Log.err);}
- try {if (tTileEntity instanceof ic2.api.energy.tile.IEnergyTile) {
- rEUAmount+=200;
- //aList.add(((ic2.api.energy.tile.IEnergyTile)tTileEntity).isAddedToEnergyNet()?"Added to E-net":"Not added to E-net! Bug?");
- }} catch(Throwable e) {if (D1) e.printStackTrace(GT_Log.err);}
- try {if (tTileEntity instanceof ic2.api.energy.tile.IEnergySink) {
- rEUAmount+=400;
- //aList.add("Demanded Energy: " + ((ic2.api.energy.tile.IEnergySink)tTileEntity).demandsEnergy());
- //tList.add("Max Safe Input: " + getTier(((ic2.api.energy.tile.IEnergySink)tTileEntity).getSinkTier()));
- //tList.add("Max Safe Input: " + ((ic2.api.energy.tile.IEnergySink)tTileEntity).getMaxSafeInput());
- }} catch(Throwable e) {if (D1) e.printStackTrace(GT_Log.err);}
- try {if (tTileEntity instanceof ic2.api.energy.tile.IEnergySource) {
- rEUAmount+=400;
- //aList.add("Max Energy Output: " + ((ic2.api.energy.tile.IEnergySource)tTileEntity).getMaxEnergyOutput());
- }} catch(Throwable e) {if (D1) e.printStackTrace(GT_Log.err);}
- try {if (tTileEntity instanceof ic2.api.energy.tile.IEnergyConductor) {
- rEUAmount+=200;
- tList.add("Conduction Loss: " + ((ic2.api.energy.tile.IEnergyConductor)tTileEntity).getConductionLoss());
- }} catch(Throwable e) {if (D1) e.printStackTrace(GT_Log.err);}
- try {if (tTileEntity instanceof ic2.api.tile.IEnergyStorage) {
- rEUAmount+=200;
- tList.add("Contained Energy: " + ((ic2.api.tile.IEnergyStorage)tTileEntity).getStored() + " of " + ((ic2.api.tile.IEnergyStorage)tTileEntity).getCapacity());
- //aList.add(((ic2.api.tile.IEnergyStorage)tTileEntity).isTeleporterCompatible(ic2.api.Direction.YP)?"Teleporter Compatible":"Not Teleporter Compatible");
- }} catch(Throwable e) {if (D1) e.printStackTrace(GT_Log.err);}
- try {if (tTileEntity instanceof IUpgradableMachine) {
- rEUAmount+=500;
- if (((IUpgradableMachine)tTileEntity).hasMufflerUpgrade()) tList.add("Has Muffler Upgrade");
- }} catch(Throwable e) {if (D1) e.printStackTrace(GT_Log.err);}
- try {if (tTileEntity instanceof IMachineProgress) {
- rEUAmount+=400;
- int tValue = 0;
- if (0 < (tValue = ((IMachineProgress)tTileEntity).getMaxProgress())) tList.add("Progress: " + GT_Utility.formatNumbers(tValue) + " / " + GT_Utility.formatNumbers(((IMachineProgress)tTileEntity).getProgress()));
- }} catch(Throwable e) {if (D1) e.printStackTrace(GT_Log.err);}
- try {if (tTileEntity instanceof ICoverable) {
- rEUAmount+=300;
- String tString = ((ICoverable)tTileEntity).getCoverBehaviorAtSide((byte)aSide).getDescription((byte)aSide, ((ICoverable)tTileEntity).getCoverIDAtSide((byte)aSide), ((ICoverable)tTileEntity).getCoverDataAtSide((byte)aSide), (ICoverable)tTileEntity);
- if (tString != null && !tString.equals(E)) tList.add(tString);
- }} catch(Throwable e) {if (D1) e.printStackTrace(GT_Log.err);}
- try {if (tTileEntity instanceof IBasicEnergyContainer && ((IBasicEnergyContainer)tTileEntity).getEUCapacity() > 0) {
- tList.add("Max IN: " + ((IBasicEnergyContainer)tTileEntity).getInputVoltage() + " EU");
- tList.add("Max OUT: " + ((IBasicEnergyContainer)tTileEntity).getOutputVoltage() + " EU at " + ((IBasicEnergyContainer)tTileEntity).getOutputAmperage() + " Amperes");
- tList.add("Energy: " + GT_Utility.formatNumbers(((IBasicEnergyContainer)tTileEntity).getStoredEU()) + " / " + GT_Utility.formatNumbers(((IBasicEnergyContainer)tTileEntity).getEUCapacity()) + "EU");
- }} catch(Throwable e) {if (D1) e.printStackTrace(GT_Log.err);}
- try {if (tTileEntity instanceof IGregTechTileEntity) {
- tList.add("Owned by: " + ((IGregTechTileEntity)tTileEntity).getOwnerName());
- }} catch(Throwable e) {if (D1) e.printStackTrace(GT_Log.err);}
- try {if (tTileEntity instanceof IGregTechDeviceInformation && ((IGregTechDeviceInformation)tTileEntity).isGivingInformation()) {
- tList.addAll(Arrays.asList(((IGregTechDeviceInformation)tTileEntity).getInfoData()));
- }} catch(Throwable e) {if (D1) e.printStackTrace(GT_Log.err);}
- try {if (tTileEntity instanceof ic2.api.crops.ICropTile) {
- if (((ic2.api.crops.ICropTile)tTileEntity).getScanLevel() < 4) {
- rEUAmount+=10000;
- ((ic2.api.crops.ICropTile)tTileEntity).setScanLevel((byte)4);
- }
- if (((ic2.api.crops.ICropTile)tTileEntity).getID() >= 0 && ((ic2.api.crops.ICropTile)tTileEntity).getID() < ic2.api.crops.Crops.instance.getCropList().length && ic2.api.crops.Crops.instance.getCropList()[((ic2.api.crops.ICropTile)tTileEntity).getID()] != null) {
- rEUAmount+=1000;
- tList.add("Type -- Crop-Name: " + ic2.api.crops.Crops.instance.getCropList()[((ic2.api.crops.ICropTile)tTileEntity).getID()].name()
- + " Growth: " + ((ic2.api.crops.ICropTile)tTileEntity).getGrowth()
- + " Gain: " + ((ic2.api.crops.ICropTile)tTileEntity).getGain()
- + " Resistance: " + ((ic2.api.crops.ICropTile)tTileEntity).getResistance()
- );
- tList.add("Plant -- Fertilizer: " + ((ic2.api.crops.ICropTile)tTileEntity).getNutrientStorage()
- + " Water: " + ((ic2.api.crops.ICropTile)tTileEntity).getHydrationStorage()
- + " Weed-Ex: " + ((ic2.api.crops.ICropTile)tTileEntity).getWeedExStorage()
- + " Scan-Level: " + ((ic2.api.crops.ICropTile)tTileEntity).getScanLevel()
- );
- tList.add("Environment -- Nutrients: " + ((ic2.api.crops.ICropTile)tTileEntity).getNutrients()
- + " Humidity: " + ((ic2.api.crops.ICropTile)tTileEntity).getHumidity()
- + " Air-Quality: " + ((ic2.api.crops.ICropTile)tTileEntity).getAirQuality()
- );
- String tString = E;
- for (String tAttribute : ic2.api.crops.Crops.instance.getCropList()[((ic2.api.crops.ICropTile)tTileEntity).getID()].attributes()) {
- tString += ", " + tAttribute;
- }
- tList.add("Attributes:" + tString.replaceFirst(",", E));
- tList.add("Discovered by: " + ic2.api.crops.Crops.instance.getCropList()[((ic2.api.crops.ICropTile)tTileEntity).getID()].discoveredBy());
- }
- }} catch(Throwable e) {if (D1) e.printStackTrace(GT_Log.err);}
- }
- try {if (tBlock instanceof IDebugableBlock) {
- rEUAmount+=500;
- ArrayList<String> temp = ((IDebugableBlock)tBlock).getDebugInfo(aPlayer, aX, aY, aZ, 3);
- if (temp != null) tList.addAll(temp);
- }} catch(Throwable e) {if (D1) e.printStackTrace(GT_Log.err);}
-
- BlockScanningEvent tEvent = new BlockScanningEvent(aWorld, aPlayer, aX, aY, aZ, (byte)aSide, aScanLevel, tBlock, tTileEntity, tList, aClickX, aClickY, aClickZ);
- tEvent.mEUCost = rEUAmount;
- MinecraftForge.EVENT_BUS.post(tEvent);
- if (!tEvent.isCanceled()) aList.addAll(tList);
- return tEvent.mEUCost;
- }
-
- /**
- * @return an Array containing the X and the Y Coordinate of the clicked Point, with the top left Corner as Origin, like on the Texture Sheet. return values should always be between [0.0F and 0.99F].
- */
- public static float[] getClickedFacingCoords(byte aSide, float aX, float aY, float aZ) {
- switch (aSide) {
- case 0: return new float[] {Math.min(0.99F, Math.max(0,1-aX)), Math.min(0.99F, Math.max(0, aZ))};
- case 1: return new float[] {Math.min(0.99F, Math.max(0, aX)), Math.min(0.99F, Math.max(0, aZ))};
- case 2: return new float[] {Math.min(0.99F, Math.max(0,1-aX)), Math.min(0.99F, Math.max(0,1-aY))};
- case 3: return new float[] {Math.min(0.99F, Math.max(0, aX)), Math.min(0.99F, Math.max(0,1-aY))};
- case 4: return new float[] {Math.min(0.99F, Math.max(0, aZ)), Math.min(0.99F, Math.max(0,1-aY))};
- case 5: return new float[] {Math.min(0.99F, Math.max(0,1-aZ)), Math.min(0.99F, Math.max(0,1-aY))};
- default: return new float[] {0.5F, 0.5F};
- }
- }
-
- /**
- * This Function determines the direction a Block gets when being Wrenched.
- * returns -1 if invalid. Even though that could never happen.
- */
- public static byte determineWrenchingSide(byte aSide, float aX, float aY, float aZ) {
- byte tBack = getOppositeSide(aSide);
- switch (aSide) {
- case 0: case 1:
- if (aX < 0.25) {
- if (aZ < 0.25) return tBack;
- if (aZ > 0.75) return tBack;
- return 4;
- }
- if (aX > 0.75) {
- if (aZ < 0.25) return tBack;
- if (aZ > 0.75) return tBack;
- return 5;
- }
- if (aZ < 0.25) return 2;
- if (aZ > 0.75) return 3;
- return aSide;
- case 2: case 3:
- if (aX < 0.25) {
- if (aY < 0.25) return tBack;
- if (aY > 0.75) return tBack;
- return 4;
- }
- if (aX > 0.75) {
- if (aY < 0.25) return tBack;
- if (aY > 0.75) return tBack;
- return 5;
- }
- if (aY < 0.25) return 0;
- if (aY > 0.75) return 1;
- return aSide;
- case 4: case 5:
- if (aZ < 0.25) {
- if (aY < 0.25) return tBack;
- if (aY > 0.75) return tBack;
- return 2;
- }
- if (aZ > 0.75) {
- if (aY < 0.25) return tBack;
- if (aY > 0.75) return tBack;
- return 3;
- }
- if (aY < 0.25) return 0;
- if (aY > 0.75) return 1;
- return aSide;
- }
- return -1;
- }
-
- public static String formatNumbers(long aNumber){
- DecimalFormat formatter = (DecimalFormat) NumberFormat.getInstance(Locale.US);
- DecimalFormatSymbols symbols = formatter.getDecimalFormatSymbols();
- symbols.setGroupingSeparator(' ');
- return formatter.format(aNumber);
- }
-
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/world/GT_Worldgen.java b/main/java/gregtech/api/world/GT_Worldgen.java
deleted file mode 100644
index d4f520145e..0000000000
--- a/main/java/gregtech/api/world/GT_Worldgen.java
+++ /dev/null
@@ -1,61 +0,0 @@
-package gregtech.api.world;
-
-import gregtech.api.GregTech_API;
-
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Random;
-
-import net.minecraft.world.World;
-import net.minecraft.world.chunk.IChunkProvider;
-
-public abstract class GT_Worldgen {
-
- public final String mWorldGenName;
- public final boolean mEnabled;
- private final Map<String, Boolean> mDimensionMap = new HashMap<String, Boolean>();
-
- public GT_Worldgen(String aName, List aList, boolean aDefault) {
- mWorldGenName = aName;
- mEnabled = GregTech_API.sWorldgenFile.get("worldgen", mWorldGenName, aDefault);
- if (mEnabled) aList.add(this);
- }
-
- /**
- * @param aWorld The World Object
- * @param aRandom The Random Generator to use
- * @param aBiome The Name of the Biome (always != null)
- * @param aDimensionType The Type of Worldgeneration to add. -1 = Nether, 0 = Overworld, +1 = End
- * @param aChunkX xCoord of the Chunk
- * @param aChunkZ zCoord of the Chunk
- * @return if the Worldgeneration has been successfully completed
- */
- public boolean executeWorldgen(World aWorld, Random aRandom, String aBiome, int aDimensionType, int aChunkX, int aChunkZ, IChunkProvider aChunkGenerator, IChunkProvider aChunkProvider) {
- return false;
- }
-
- /**
- * @param aWorld The World Object
- * @param aRandom The Random Generator to use
- * @param aBiome The Name of the Biome (always != null)
- * @param aDimensionType The Type of Worldgeneration to add. -1 = Nether, 0 = Overworld, +1 = End
- * @param aChunkX xCoord of the Chunk
- * @param aChunkZ zCoord of the Chunk
- * @return if the Worldgeneration has been successfully completed
- */
- public boolean executeCavegen(World aWorld, Random aRandom, String aBiome, int aDimensionType, int aChunkX, int aChunkZ, IChunkProvider aChunkGenerator, IChunkProvider aChunkProvider) {
- return false;
- }
-
- public boolean isGenerationAllowed(World aWorld, int aDimensionType, int aAllowedDimensionType) {
- String aDimName = aWorld.provider.getDimensionName();
- Boolean tAllowed = mDimensionMap.get(aDimName);
- if (tAllowed == null) {
- boolean tValue = GregTech_API.sWorldgenFile.get("worldgen.dimensions."+mWorldGenName, aDimName, aDimensionType == aAllowedDimensionType);
- mDimensionMap.put(aDimName, tValue);
- return tValue;
- }
- return tAllowed;
- }
-}
diff --git a/main/java/gregtech/api/world/GT_Worldgen_Boulder.java b/main/java/gregtech/api/world/GT_Worldgen_Boulder.java
deleted file mode 100644
index 9c90639554..0000000000
--- a/main/java/gregtech/api/world/GT_Worldgen_Boulder.java
+++ /dev/null
@@ -1,70 +0,0 @@
-package gregtech.api.world;
-
-import java.util.Collection;
-import java.util.Random;
-
-import net.minecraft.block.Block;
-import net.minecraft.block.BlockContainer;
-import net.minecraft.util.MathHelper;
-import net.minecraft.world.World;
-import net.minecraft.world.chunk.IChunkProvider;
-
-public class GT_Worldgen_Boulder extends GT_Worldgen_Ore {
- public GT_Worldgen_Boulder(String aName, boolean aDefault, Block aBlock, int aBlockMeta, int aDimensionType, int aAmount, int aSize, int aProbability, int aMinY, int aMaxY, Collection<String> aBiomeList, boolean aAllowToGenerateinVoid) {
- super(aName, aDefault, aBlock, aBlockMeta, aDimensionType, aAmount, aSize, aProbability, aMinY, aMaxY, aBiomeList, aAllowToGenerateinVoid);
- }
-
- @Override
- public boolean executeWorldgen(World aWorld, Random aRandom, String aBiome, int aDimensionType, int aChunkX, int aChunkZ, IChunkProvider aChunkGenerator, IChunkProvider aChunkProvider) {
- if (isGenerationAllowed(aWorld, aDimensionType, mDimensionType) && (mBiomeList.isEmpty() || mBiomeList.contains(aBiome)) && (mProbability <= 1 || aRandom.nextInt(mProbability) == 0)) {
- for (int i = 0; i < mAmount; i++) {
- int tX = aChunkX + aRandom.nextInt(16), tY = mMinY + aRandom.nextInt(mMaxY - mMinY), tZ = aChunkZ + aRandom.nextInt(16);
- Block tBlock = aWorld.getBlock(tX, tY - 7, tZ);
- if (tBlock != null && tBlock.isOpaqueCube() && aWorld.getBlock(tX, tY-6, tZ).isAir(aWorld, tX, tY-6, tZ)) {
- float var6 = aRandom.nextFloat() * (float)Math.PI;
- double var7 = ((tX + 8) + MathHelper.sin(var6) * mSize / 8.0F);
- double var9 = ((tX + 8) - MathHelper.sin(var6) * mSize / 8.0F);
- double var11 = ((tZ + 8) + MathHelper.cos(var6) * mSize / 8.0F);
- double var13 = ((tZ + 8) - MathHelper.cos(var6) * mSize / 8.0F);
- double var15 = (tY + aRandom.nextInt(3) - 2);
- double var17 = (tY + aRandom.nextInt(3) - 2);
-
- for (int var19 = 0; var19 <= mSize; ++var19) {
- double var20 = var7 + (var9 - var7) * var19 / mSize;
- double var22 = var15 + (var17 - var15) * var19 / mSize;
- double var24 = var11 + (var13 - var11) * var19 / mSize;
- double var26 = aRandom.nextDouble() * mSize / 16.0D;
- double var28 = (MathHelper.sin(var19 * (float)Math.PI / mSize) + 1.0F) * var26 + 1.0D;
- double var30 = (MathHelper.sin(var19 * (float)Math.PI / mSize) + 1.0F) * var26 + 1.0D;
- int var32 = MathHelper.floor_double(var20 - var28 / 2.0D);
- int var33 = MathHelper.floor_double(var22 - var30 / 2.0D);
- int var34 = MathHelper.floor_double(var24 - var28 / 2.0D);
- int var35 = MathHelper.floor_double(var20 + var28 / 2.0D);
- int var36 = MathHelper.floor_double(var22 + var30 / 2.0D);
- int var37 = MathHelper.floor_double(var24 + var28 / 2.0D);
-
- for (int var38 = var32; var38 <= var35; ++var38) {
- double var39 = (var38 + 0.5D - var20) / (var28 / 2.0D);
- if (var39 * var39 < 1.0D) {
- for (int var41 = var33; var41 <= var36; ++var41) {
- double var42 = (var41 + 0.5D - var22) / (var30 / 2.0D);
- if (var39 * var39 + var42 * var42 < 1.0D) {
- for (int var44 = var34; var44 <= var37; ++var44) {
- double var45 = (var44 + 0.5D - var24) / (var28 / 2.0D);
- Block block = aWorld.getBlock(var38, var41, var44);
- if (var39 * var39 + var42 * var42 + var45 * var45 < 1.0D && ((mAllowToGenerateinVoid&&aWorld.getBlock(var38, var41, var44).isAir(aWorld, var38, var41, var44)) || (block != null && !(block instanceof BlockContainer)))) {
- aWorld.setBlock(var38, var41, var44, mBlock, mBlockMeta, 0);
- }
- }
- }
- }
- }
- }
- }
- }
- }
- return true;
- }
- return false;
- }
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/world/GT_Worldgen_Ore.java b/main/java/gregtech/api/world/GT_Worldgen_Ore.java
deleted file mode 100644
index 58e1eb2814..0000000000
--- a/main/java/gregtech/api/world/GT_Worldgen_Ore.java
+++ /dev/null
@@ -1,29 +0,0 @@
-package gregtech.api.world;
-
-import gregtech.api.GregTech_API;
-
-import java.util.ArrayList;
-import java.util.Collection;
-
-import net.minecraft.block.Block;
-
-public abstract class GT_Worldgen_Ore extends GT_Worldgen {
- public final int mBlockMeta, mAmount, mSize, mMinY, mMaxY, mProbability, mDimensionType;
- public final Block mBlock;
- public final Collection<String> mBiomeList;
- public final boolean mAllowToGenerateinVoid;
-
- public GT_Worldgen_Ore(String aName, boolean aDefault, Block aBlock, int aBlockMeta, int aDimensionType, int aAmount, int aSize, int aProbability, int aMinY, int aMaxY, Collection<String> aBiomeList, boolean aAllowToGenerateinVoid) {
- super(aName, GregTech_API.sWorldgenList, aDefault);
- mDimensionType = aDimensionType;
- mBlock = aBlock;
- mBlockMeta = Math.min(Math.max(aBlockMeta, 0), 15);
- mProbability = GregTech_API.sWorldgenFile.get("worldgen."+mWorldGenName, "Probability" , aProbability);
- mAmount = GregTech_API.sWorldgenFile.get("worldgen."+mWorldGenName, "Amount" , aAmount);
- mSize = GregTech_API.sWorldgenFile.get("worldgen."+mWorldGenName, "Size" , aSize);
- mMinY = GregTech_API.sWorldgenFile.get("worldgen."+mWorldGenName, "MinHeight" , aMinY);
- mMaxY = GregTech_API.sWorldgenFile.get("worldgen."+mWorldGenName, "MaxHeight" , aMaxY);
- if (aBiomeList == null) mBiomeList = new ArrayList<String>(); else mBiomeList = aBiomeList;
- mAllowToGenerateinVoid = aAllowToGenerateinVoid;
- }
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/world/GT_Worldgen_Ore_Normal.java b/main/java/gregtech/api/world/GT_Worldgen_Ore_Normal.java
deleted file mode 100644
index c382a6fd98..0000000000
--- a/main/java/gregtech/api/world/GT_Worldgen_Ore_Normal.java
+++ /dev/null
@@ -1,69 +0,0 @@
-package gregtech.api.world;
-
-import java.util.Collection;
-import java.util.Random;
-
-import net.minecraft.block.Block;
-import net.minecraft.init.Blocks;
-import net.minecraft.util.MathHelper;
-import net.minecraft.world.World;
-import net.minecraft.world.chunk.IChunkProvider;
-
-public class GT_Worldgen_Ore_Normal extends GT_Worldgen_Ore {
- public GT_Worldgen_Ore_Normal(String aName, boolean aDefault, Block aBlock, int aBlockMeta, int aDimensionType, int aAmount, int aSize, int aProbability, int aMinY, int aMaxY, Collection<String> aBiomeList, boolean aAllowToGenerateinVoid) {
- super(aName, aDefault, aBlock, aBlockMeta, aDimensionType, aAmount, aSize, aProbability, aMinY, aMaxY, aBiomeList, aAllowToGenerateinVoid);
- }
-
- @Override
- public boolean executeWorldgen(World aWorld, Random aRandom, String aBiome, int aDimensionType, int aChunkX, int aChunkZ, IChunkProvider aChunkGenerator, IChunkProvider aChunkProvider) {
- if (isGenerationAllowed(aWorld, aDimensionType, mDimensionType) && (mBiomeList.isEmpty() || mBiomeList.contains(aBiome)) && (mProbability <= 1 || aRandom.nextInt(mProbability) == 0)) {
- for (int i = 0; i < mAmount; i++) {
- int tX = aChunkX + aRandom.nextInt(16), tY = mMinY + aRandom.nextInt(mMaxY - mMinY), tZ = aChunkZ + aRandom.nextInt(16);
- if (mAllowToGenerateinVoid || aWorld.getBlock(tX, tY, tZ).isAir(aWorld, tX, tY, tZ)) {
- float var6 = aRandom.nextFloat() * (float)Math.PI;
- double var7 = ((tX + 8) + MathHelper.sin(var6) * mSize / 8.0F);
- double var9 = ((tX + 8) - MathHelper.sin(var6) * mSize / 8.0F);
- double var11 = ((tZ + 8) + MathHelper.cos(var6) * mSize / 8.0F);
- double var13 = ((tZ + 8) - MathHelper.cos(var6) * mSize / 8.0F);
- double var15 = (tY + aRandom.nextInt(3) - 2);
- double var17 = (tY + aRandom.nextInt(3) - 2);
-
- for (int var19 = 0; var19 <= mSize; ++var19) {
- double var20 = var7 + (var9 - var7) * var19 / mSize;
- double var22 = var15 + (var17 - var15) * var19 / mSize;
- double var24 = var11 + (var13 - var11) * var19 / mSize;
- double var26 = aRandom.nextDouble() * mSize / 16.0D;
- double var28 = (MathHelper.sin(var19 * (float)Math.PI / mSize) + 1.0F) * var26 + 1.0D;
- double var30 = (MathHelper.sin(var19 * (float)Math.PI / mSize) + 1.0F) * var26 + 1.0D;
- int var32 = MathHelper.floor_double(var20 - var28 / 2.0D);
- int var33 = MathHelper.floor_double(var22 - var30 / 2.0D);
- int var34 = MathHelper.floor_double(var24 - var28 / 2.0D);
- int var35 = MathHelper.floor_double(var20 + var28 / 2.0D);
- int var36 = MathHelper.floor_double(var22 + var30 / 2.0D);
- int var37 = MathHelper.floor_double(var24 + var28 / 2.0D);
-
- for (int var38 = var32; var38 <= var35; ++var38) {
- double var39 = (var38 + 0.5D - var20) / (var28 / 2.0D);
- if (var39 * var39 < 1.0D) {
- for (int var41 = var33; var41 <= var36; ++var41) {
- double var42 = (var41 + 0.5D - var22) / (var30 / 2.0D);
- if (var39 * var39 + var42 * var42 < 1.0D) {
- for (int var44 = var34; var44 <= var37; ++var44) {
- double var45 = (var44 + 0.5D - var24) / (var28 / 2.0D);
- Block block = aWorld.getBlock(var38, var41, var44);
- if (var39 * var39 + var42 * var42 + var45 * var45 < 1.0D && ((mAllowToGenerateinVoid&&aWorld.getBlock(var38, var41, var44).isAir(aWorld, var38, var41, var44)) || (block != null && (block.isReplaceableOreGen(aWorld, var38, var41, var44, Blocks.stone) || block.isReplaceableOreGen(aWorld, var38, var41, var44, Blocks.end_stone) || block.isReplaceableOreGen(aWorld, var38, var41, var44, Blocks.netherrack))))) {
- aWorld.setBlock(var38, var41, var44, mBlock, mBlockMeta, 0);
- }
- }
- }
- }
- }
- }
- }
- }
- }
- return true;
- }
- return false;
- }
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/world/GT_Worldgen_Ore_SingleBlock.java b/main/java/gregtech/api/world/GT_Worldgen_Ore_SingleBlock.java
deleted file mode 100644
index 62dc220b01..0000000000
--- a/main/java/gregtech/api/world/GT_Worldgen_Ore_SingleBlock.java
+++ /dev/null
@@ -1,30 +0,0 @@
-package gregtech.api.world;
-
-import java.util.Collection;
-import java.util.Random;
-
-import net.minecraft.block.Block;
-import net.minecraft.init.Blocks;
-import net.minecraft.world.World;
-import net.minecraft.world.chunk.IChunkProvider;
-
-public class GT_Worldgen_Ore_SingleBlock extends GT_Worldgen_Ore {
- public GT_Worldgen_Ore_SingleBlock(String aName, boolean aDefault, Block aBlock, int aBlockMeta, int aDimensionType, int aAmount, int aSize, int aProbability, int aMinY, int aMaxY, Collection<String> aBiomeList, boolean aAllowToGenerateinVoid) {
- super(aName, aDefault, aBlock, aBlockMeta, aDimensionType, aAmount, aSize, aProbability, aMinY, aMaxY, aBiomeList, aAllowToGenerateinVoid);
- }
-
- @Override
- public boolean executeWorldgen(World aWorld, Random aRandom, String aBiome, int aDimensionType, int aChunkX, int aChunkZ, IChunkProvider aChunkGenerator, IChunkProvider aChunkProvider) {
- if (isGenerationAllowed(aWorld, aDimensionType, mDimensionType) && (mBiomeList.isEmpty() || mBiomeList.contains(aBiome)) && (mProbability <= 1 || aRandom.nextInt(mProbability) == 0)) {
- for (int i = 0; i < mAmount; i++) {
- int tX = aChunkX + aRandom.nextInt(16), tY = mMinY + aRandom.nextInt(mMaxY - mMinY), tZ = aChunkZ + aRandom.nextInt(16);
- Block tBlock = aWorld.getBlock(tX, tY, tZ);
- if (((mAllowToGenerateinVoid&&aWorld.getBlock(tX, tY, tZ).isAir(aWorld, tX, tY, tZ)) || (tBlock != null && (tBlock.isReplaceableOreGen(aWorld, tX, tY, tZ, Blocks.stone) || tBlock.isReplaceableOreGen(aWorld, tX, tY, tZ, Blocks.end_stone) || tBlock.isReplaceableOreGen(aWorld, tX, tY, tZ, Blocks.netherrack))))) {
- aWorld.setBlock(tX, tY, tZ, mBlock, mBlockMeta, 0);
- }
- }
- return true;
- }
- return false;
- }
-} \ No newline at end of file
diff --git a/main/java/gregtech/api/world/GT_Worldgen_Ore_SingleBlock_UnderLava.java b/main/java/gregtech/api/world/GT_Worldgen_Ore_SingleBlock_UnderLava.java
deleted file mode 100644
index fc921087f1..0000000000
--- a/main/java/gregtech/api/world/GT_Worldgen_Ore_SingleBlock_UnderLava.java
+++ /dev/null
@@ -1,30 +0,0 @@
-package gregtech.api.world;
-
-import java.util.Collection;
-import java.util.Random;
-
-import net.minecraft.block.Block;
-import net.minecraft.init.Blocks;
-import net.minecraft.world.World;
-import net.minecraft.world.chunk.IChunkProvider;
-
-public class GT_Worldgen_Ore_SingleBlock_UnderLava extends GT_Worldgen_Ore {
- public GT_Worldgen_Ore_SingleBlock_UnderLava(String aName, boolean aDefault, Block aBlock, int aBlockMeta, int aDimensionType, int aAmount, int aSize, int aProbability, int aMinY, int aMaxY, Collection<String> aBiomeList, boolean aAllowToGenerateinVoid) {
- super(aName, aDefault, aBlock, aBlockMeta, aDimensionType, aAmount, aSize, aProbability, aMinY, aMaxY, aBiomeList, aAllowToGenerateinVoid);
- }
-
- @Override
- public boolean executeCavegen(World aWorld, Random aRandom, String aBiome, int aDimensionType, int aChunkX, int aChunkZ, IChunkProvider aChunkGenerator, IChunkProvider aChunkProvider) {
- if (isGenerationAllowed(aWorld, aDimensionType, mDimensionType) && (mBiomeList.isEmpty() || mBiomeList.contains(aBiome)) && (mProbability <= 1 || aRandom.nextInt(mProbability) == 0)) {
- for (int i = 0; i < mAmount; i++) {
- int tX = aChunkX + aRandom.nextInt(16), tY = mMinY + aRandom.nextInt(mMaxY - mMinY), tZ = aChunkZ + aRandom.nextInt(16);
- Block tBlock = aWorld.getBlock(tX, tY, tZ);
- if (((mAllowToGenerateinVoid&&aWorld.getBlock(tX, tY, tZ).isAir(aWorld, tX, tY, tZ)) || (tBlock != null && (tBlock.isReplaceableOreGen(aWorld, tX, tY, tZ, Blocks.stone) || tBlock.isReplaceableOreGen(aWorld, tX, tY, tZ, Blocks.end_stone) || tBlock.isReplaceableOreGen(aWorld, tX, tY, tZ, Blocks.netherrack))))) {
- if (aWorld.getBlock(tX, tY+1, tZ) == Blocks.lava || aWorld.getBlock(tX, tY, tZ) == Blocks.flowing_lava) aWorld.setBlock(tX, tY, tZ, mBlock, mBlockMeta, 0);
- }
- }
- return true;
- }
- return false;
- }
-} \ No newline at end of file