diff options
author | Alkalus <3060479+draknyte1@users.noreply.github.com> | 2022-01-29 19:15:48 +0000 |
---|---|---|
committer | Alkalus <3060479+draknyte1@users.noreply.github.com> | 2022-01-29 19:15:48 +0000 |
commit | c0da5cc4ea19dfb2a05e64ce09d808b4efdc95b1 (patch) | |
tree | 2b549b5dfe3f80421ae2d45e041f929ea46d59aa /src/main/java/gtPlusPlus/core | |
parent | b926dfb3bc67b74b53749a3e420a8a6ce0fba6a7 (diff) | |
parent | 0de849179b344dfddc68393aaa23b3b75b307670 (diff) | |
download | GT5-Unofficial-c0da5cc4ea19dfb2a05e64ce09d808b4efdc95b1.tar.gz GT5-Unofficial-c0da5cc4ea19dfb2a05e64ce09d808b4efdc95b1.tar.bz2 GT5-Unofficial-c0da5cc4ea19dfb2a05e64ce09d808b4efdc95b1.zip |
Merge branch 'master' of https://github.com/GTNewHorizons/GTplusplus into St00f
# Conflicts:
# .gitignore
# dependencies.gradle
# src/main/java/gtPlusPlus/core/config/ConfigHandler.java
# src/main/java/gtPlusPlus/core/item/base/BaseItemComponent.java
# src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaWirelessCharger.java
# src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_MassFabricator.java
# src/main/resources/assets/miscutils/lang/en_US.lang
Diffstat (limited to 'src/main/java/gtPlusPlus/core')
37 files changed, 1886 insertions, 1958 deletions
diff --git a/src/main/java/gtPlusPlus/core/block/ModBlocks.java b/src/main/java/gtPlusPlus/core/block/ModBlocks.java index b51915bb7b..5b29d9a636 100644 --- a/src/main/java/gtPlusPlus/core/block/ModBlocks.java +++ b/src/main/java/gtPlusPlus/core/block/ModBlocks.java @@ -13,11 +13,22 @@ import gtPlusPlus.core.block.general.PlayerDoors; import gtPlusPlus.core.block.general.antigrief.BlockWitherProof; import gtPlusPlus.core.block.general.redstone.BlockGenericRedstoneDetector; import gtPlusPlus.core.block.general.redstone.BlockGenericRedstoneTest; -import gtPlusPlus.core.block.machine.*; +import gtPlusPlus.core.block.machine.CircuitProgrammer; +import gtPlusPlus.core.block.machine.DecayablesChest; +import gtPlusPlus.core.block.machine.EggBox; +import gtPlusPlus.core.block.machine.FishTrap; +import gtPlusPlus.core.block.machine.HeliumGenerator; +import gtPlusPlus.core.block.machine.Machine_ModularityTable; +import gtPlusPlus.core.block.machine.Machine_PestKiller; +import gtPlusPlus.core.block.machine.Machine_PooCollector; +import gtPlusPlus.core.block.machine.Machine_ProjectTable; +import gtPlusPlus.core.block.machine.Machine_RoundRobinator; +import gtPlusPlus.core.block.machine.Machine_SuperJukebox; +import gtPlusPlus.core.block.machine.Machine_TradeTable; +import gtPlusPlus.core.block.machine.VolumetricFlaskSetter; import gtPlusPlus.core.block.machine.bedrock.Mining_Head_Fake; import gtPlusPlus.core.block.machine.bedrock.Mining_Pipe_Fake; import gtPlusPlus.core.fluids.FluidRegistryHandler; -import gtPlusPlus.core.util.minecraft.ItemUtils; import gtPlusPlus.xmod.gregtech.common.Meta_GT_Proxy; import net.minecraft.block.Block; import net.minecraft.block.material.Material; @@ -32,8 +43,6 @@ public final class ModBlocks { public static Block blockFakeMiningHead; public static Block blockFishTrap; - public static Block blockWorkbench; - public static Block blockWorkbenchAdvanced; public static Block blockDecayablesChest; public static Block blockEggBox; @@ -50,6 +59,7 @@ public final class ModBlocks { public static Block blockCasings5Misc; public static Block blockCasingsTieredGTPP; public static Block blockSpecialMultiCasings; + public static Block blockSpecialMultiCasings2; public static Block blockCustomMachineCasings; public static Block blockMetaTileEntity; @@ -109,8 +119,6 @@ public final class ModBlocks { FluidRegistryHandler.registerFluids(); //Workbench - blockWorkbench = new Machine_Workbench().setHardness(1.5F); - blockWorkbenchAdvanced = new Machine_WorkbenchAdvanced().setHardness(2.5F); blockHeliumGenerator = new HeliumGenerator(); blockFirePit = new FirePit(); blockFishTrap = new FishTrap(); diff --git a/src/main/java/gtPlusPlus/core/block/general/BlockCompressedObsidian.java b/src/main/java/gtPlusPlus/core/block/general/BlockCompressedObsidian.java index 03ca846b7d..2cf40160a3 100644 --- a/src/main/java/gtPlusPlus/core/block/general/BlockCompressedObsidian.java +++ b/src/main/java/gtPlusPlus/core/block/general/BlockCompressedObsidian.java @@ -23,7 +23,7 @@ import gtPlusPlus.core.lib.CORE; public class BlockCompressedObsidian extends BlockObsidian { - private final IIcon textureArray[] = new IIcon[6]; + private final IIcon textureArray[] = new IIcon[11]; public BlockCompressedObsidian() { this.setBlockName("blockCompressedObsidian"); @@ -36,9 +36,12 @@ public class BlockCompressedObsidian extends BlockObsidian { @Override public MapColor getMapColor(final int meta) { - if (meta != 5) { + if (meta < 5) { return MapColor.obsidianColor; } + if (meta > 5) { + return MapColor.goldColor; + } else { return MapColor.sandColor; } @@ -53,6 +56,11 @@ public class BlockCompressedObsidian extends BlockObsidian { this.textureArray[3] = iicon.registerIcon(CORE.MODID + ":" + "compressed/" + "obsidian4"); this.textureArray[4] = iicon.registerIcon(CORE.MODID + ":" + "compressed/" + "obsidian5"); this.textureArray[5] = iicon.registerIcon(CORE.MODID + ":" + "compressed/" + "obsidian_invert"); + this.textureArray[6] = iicon.registerIcon(CORE.MODID + ":" + "compressed/" + "glowstone1"); + this.textureArray[7] = iicon.registerIcon(CORE.MODID + ":" + "compressed/" + "glowstone2"); + this.textureArray[8] = iicon.registerIcon(CORE.MODID + ":" + "compressed/" + "glowstone3"); + this.textureArray[9] = iicon.registerIcon(CORE.MODID + ":" + "compressed/" + "glowstone4"); + this.textureArray[10] = iicon.registerIcon(CORE.MODID + ":" + "compressed/" + "glowstone5"); } /** @@ -71,7 +79,7 @@ public class BlockCompressedObsidian extends BlockObsidian { @Override public void getSubBlocks(final Item item, final CreativeTabs tab, final List list) { - for (int i = 0; i < 6; i++) { + for (int i = 0; i < 11; i++) { list.add(new ItemStack(item, 1, i)); } } diff --git a/src/main/java/gtPlusPlus/core/block/machine/Machine_Workbench.java b/src/main/java/gtPlusPlus/core/block/machine/Machine_Workbench.java deleted file mode 100644 index 5c08612042..0000000000 --- a/src/main/java/gtPlusPlus/core/block/machine/Machine_Workbench.java +++ /dev/null @@ -1,152 +0,0 @@ -package gtPlusPlus.core.block.machine; - -import cpw.mods.fml.common.Optional; -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.common.registry.LanguageRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.block.BlockContainer; -import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.entity.EnumCreatureType; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.IIcon; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; - -import gtPlusPlus.GTplusplus; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.creative.AddToCreativeTab; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.lib.LoadedMods; -import gtPlusPlus.core.tileentities.machines.TileEntityWorkbench; -import gtPlusPlus.core.util.minecraft.PlayerUtils; -import gtPlusPlus.core.util.reflect.ReflectionUtils; -import ic2.core.item.tool.ItemToolWrench; - -@Optional.Interface(iface = "crazypants.enderio.api.tool.ITool", modid = "EnderIO") -public class Machine_Workbench extends BlockContainer -{ - @SideOnly(Side.CLIENT) - private IIcon textureTop; - @SideOnly(Side.CLIENT) - private IIcon textureBottom; - @SideOnly(Side.CLIENT) - private IIcon textureFront; - - @SuppressWarnings("deprecation") - public Machine_Workbench() - { - super(Material.iron); - this.setBlockName("blockWorkbenchGT"); - this.setCreativeTab(AddToCreativeTab.tabMachines); - GameRegistry.registerBlock(this, "blockWorkbenchGT"); - LanguageRegistry.addName(this, "Bronze Workbench"); - - } - - /** - * Gets the block's texture. Args: side, meta - */ - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(final int p_149691_1_, final int p_149691_2_) - { - return p_149691_1_ == 1 ? this.textureTop : (p_149691_1_ == 0 ? this.textureBottom : ((p_149691_1_ != 2) && (p_149691_1_ != 4) ? this.blockIcon : this.textureFront)); - } - - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(final IIconRegister p_149651_1_) - { - this.blockIcon = p_149651_1_.registerIcon(CORE.MODID + ":" + "TileEntities/" + "bronze_side_cabinet"); - this.textureTop = p_149651_1_.registerIcon(CORE.MODID + ":" + "TileEntities/" + "bronze_top_crafting"); - this.textureBottom = p_149651_1_.registerIcon(CORE.MODID + ":" + "TileEntities/" + "bronze_side"); - this.textureFront = p_149651_1_.registerIcon(CORE.MODID + ":" + "TileEntities/" + "bronze_side_cabinet"); - } - - /** - * Called upon block activation (right click on the block.) - */ - @Override - public boolean onBlockActivated(final World world, final int x, final int y, final int z, final EntityPlayer player, final int side, final float lx, final float ly, final float lz) - { - - ItemStack heldItem = null; - if (world.isRemote){ - heldItem = PlayerUtils.getItemStackInPlayersHand(); - } - - boolean holdingWrench = false; - - if (heldItem != null){ - holdingWrench = isWrench(heldItem); - } - - if (world.isRemote) { - return true; - } - - final TileEntity te = world.getTileEntity(x, y, z); - if ((te != null) && (te instanceof TileEntityWorkbench)) - { - if (!holdingWrench){ - player.openGui(GTplusplus.instance, 3, world, x, y, z); - return true; - } - Logger.INFO("Holding a Wrench, doing wrench things instead."); - } - return false; - } - - @Override - public TileEntity createNewTileEntity(final World world, final int p_149915_2_) { - return new TileEntityWorkbench(); - } - - public static boolean isWrench(final ItemStack item){ - if (item.getItem() instanceof ItemToolWrench){ - return true; - } - if (LoadedMods.BuildCraft){ - return checkBuildcraftWrench(item); - } - if (LoadedMods.EnderIO){ - return checkEnderIOWrench(item); - } - return false; - } - - @Optional.Method(modid = "EnderIO") - private static boolean checkEnderIOWrench(final ItemStack item) { - if (ReflectionUtils.doesClassExist("crazypants.enderio.api.tool.ITool")) { - Class<?> wrenchClass; - wrenchClass = ReflectionUtils.getClass("crazypants.enderio.api.tool.ITool"); - if (wrenchClass.isInstance(item.getItem())) { - return true; - } - } - return false; - } - - @Optional.Method(modid = "Buildcraft") - private static boolean checkBuildcraftWrench(final ItemStack item) { - if (ReflectionUtils.doesClassExist("buildcraft.api.tools.IToolWrench")) { - Class<?> wrenchClass; - wrenchClass = ReflectionUtils.getClass("buildcraft.api.tools.IToolWrench"); - if (wrenchClass.isInstance(item.getItem())) { - return true; - } - } - return false; - } - - @Override - public boolean canCreatureSpawn(final EnumCreatureType type, final IBlockAccess world, final int x, final int y, final int z) { - return false; - } - -}
\ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/block/machine/Machine_WorkbenchAdvanced.java b/src/main/java/gtPlusPlus/core/block/machine/Machine_WorkbenchAdvanced.java deleted file mode 100644 index af2f9f82e0..0000000000 --- a/src/main/java/gtPlusPlus/core/block/machine/Machine_WorkbenchAdvanced.java +++ /dev/null @@ -1,111 +0,0 @@ -package gtPlusPlus.core.block.machine; - -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.common.registry.LanguageRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.block.BlockContainer; -import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.IIcon; -import net.minecraft.world.World; - -import gtPlusPlus.core.creative.AddToCreativeTab; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.tileentities.machines.TileEntityWorkbenchAdvanced; - -public class Machine_WorkbenchAdvanced extends BlockContainer -{ - @SideOnly(Side.CLIENT) - private IIcon textureTop; - @SideOnly(Side.CLIENT) - private IIcon textureBottom; - @SideOnly(Side.CLIENT) - private IIcon textureFront; - - @SuppressWarnings("deprecation") - public Machine_WorkbenchAdvanced() - { - super(Material.iron); - this.setBlockName("blockWorkbenchGTAdvanced"); - this.setCreativeTab(AddToCreativeTab.tabMachines); - GameRegistry.registerBlock(this, "blockWorkbenchGTAdvanced"); - LanguageRegistry.addName(this, "Advanced Workbench"); - - } - - /** - * Gets the block's texture. Args: side, meta - */ - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(final int p_149691_1_, final int p_149691_2_) - { - return p_149691_1_ == 1 ? this.textureTop : (p_149691_1_ == 0 ? this.textureBottom : ((p_149691_1_ != 2) && (p_149691_1_ != 4) ? this.blockIcon : this.textureFront)); - } - - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(final IIconRegister p_149651_1_) - { - this.blockIcon = p_149651_1_.registerIcon(CORE.MODID + ":" + "TileEntities/" + "machine_top"); - this.textureTop = p_149651_1_.registerIcon(CORE.MODID + ":" + "TileEntities/" + "cover_crafting"); - this.textureBottom = p_149651_1_.registerIcon(CORE.MODID + ":" + "TileEntities/" + "machine_top"); - this.textureFront = p_149651_1_.registerIcon(CORE.MODID + ":" + "TileEntities/" + "machine_top"); - } - - /** - * Called upon block activation (right click on the block.) - */ - @Override - public boolean onBlockActivated(final World world, final int x, final int y, final int z, final EntityPlayer player, final int side, final float lx, final float ly, final float lz) - { - - /*final ItemStack heldItem = PlayerUtils.getItemStackInPlayersHand(player); - if (world.isRemote) { - return true; - } - boolean holdingWrench = false; - - if (heldItem != null){ - if (heldItem.getItem() instanceof ItemToolWrench){ - holdingWrench = true; - } - else if (heldItem.getItem() instanceof IToolWrench){ - holdingWrench = true; - } - else if (heldItem.getItem() instanceof ITool){ - holdingWrench = true; - } - else if (heldItem.getItem() instanceof GT_MetaGenerated_Tool){ - GT_MetaGenerated_Tool testTool = (GT_MetaGenerated_Tool) heldItem.getItem(); - if (testTool.canWrench(player, x, y, z)){ - holdingWrench = true; - } - } - else { - holdingWrench = false; - } - } - - - final TileEntity te = world.getTileEntity(x, y, z); - if ((te != null) && (te instanceof TileEntityWorkbenchAdvanced)) - { - if (!holdingWrench){ - player.openGui(GTplusplus.instance, 4, world, x, y, z); - return true; - } - Utils.LOG_INFO("Holding a Wrench, doing wrench things instead."); - }*/ - return false; - } - - @Override - public TileEntity createNewTileEntity(final World world, final int p_149915_2_) { - return new TileEntityWorkbenchAdvanced(128000, 2); - } -}
\ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/config/ConfigHandler.java b/src/main/java/gtPlusPlus/core/config/ConfigHandler.java index d89d320da5..951b10b432 100644 --- a/src/main/java/gtPlusPlus/core/config/ConfigHandler.java +++ b/src/main/java/gtPlusPlus/core/config/ConfigHandler.java @@ -108,7 +108,7 @@ public class ConfigHandler { disableZombieReinforcement = config.getBoolean("disableZombieReinforcement", "features", false, "Disables Zombie Reinforcement on hard difficutly."); enableWatchdogBGM = config.getInt("enableWatchdogBGM", "features", 0, 0, Short.MAX_VALUE, "Set to a value greater than 0 to reduce the ticks taken to delay between BGM tracks. Acceptable Values are 1-32767, where 0 is disabled. Vanilla Uses 12,000 & 24,000. 200 is 10s."); hideUniversalCells = config.getBoolean("hideUniversalCells", "features", true, "Hides every filled IC2 Universal Cell from NEI."); - + // Biomes EVERGLADES_ID = config.getInt("darkworld_ID", "worldgen", 227, 1, 254, "The ID of the Dark Dimension."); EVERGLADESBIOME_ID = config.getInt("darkbiome_ID", "worldgen", 238, 1, 254, "The biome within the Dark Dimension."); @@ -134,6 +134,7 @@ public class ConfigHandler { pollutionPerSecondMultiIndustrialMultiMachine_ModeMisc = config.get("pollution", "pollutionPerSecondMultiIndustrialMultiMachine_ModeMisc", pollutionPerSecondMultiIndustrialMultiMachine_ModeMisc, "pollution rate in gibbl/s for the Large processing factory in misc mode").getInt(pollutionPerSecondMultiIndustrialMultiMachine_ModeMisc); pollutionPerSecondMultiIndustrialPlatePress_ModeForming = config.get("pollution", "pollutionPerSecondMultiIndustrialPlatePress_ModeForming", pollutionPerSecondMultiIndustrialPlatePress_ModeForming, "pollution rate in gibbl/s for the Industrial material press in forming mode").getInt(pollutionPerSecondMultiIndustrialPlatePress_ModeForming); pollutionPerSecondMultiIndustrialPlatePress_ModeBending = config.get("pollution", "pollutionPerSecondMultiIndustrialPlatePress_ModeBending", pollutionPerSecondMultiIndustrialPlatePress_ModeBending, "pollution rate in gibbl/s for the Industrial material press in bending mode").getInt(pollutionPerSecondMultiIndustrialPlatePress_ModeBending); + pollutionPerSecondMultiIndustrialForgeHammer = config.get("pollution", "pollutionPerSecondMultiIndustrialForgeHammer", pollutionPerSecondMultiIndustrialForgeHammer, "pollution rate in gibbl/s for the Industrial Forge Hammer").getInt(pollutionPerSecondMultiIndustrialForgeHammer); pollutionPerSecondMultiIndustrialSifter = config.get("pollution", "pollutionPerSecondMultiIndustrialSifter", pollutionPerSecondMultiIndustrialSifter, "pollution rate in gibbl/s for the Large Sifter").getInt(pollutionPerSecondMultiIndustrialSifter); pollutionPerSecondMultiIndustrialThermalCentrifuge = config.get("pollution", "pollutionPerSecondMultiIndustrialThermalCentrifuge", pollutionPerSecondMultiIndustrialThermalCentrifuge, "pollution rate in gibbl/s for the Large thermal refinery").getInt(pollutionPerSecondMultiIndustrialThermalCentrifuge); pollutionPerSecondMultiIndustrialVacuumFreezer = config.get("pollution", "pollutionPerSecondMultiIndustrialVacuumFreezer", pollutionPerSecondMultiIndustrialVacuumFreezer, "pollution rate in gibbl/s for the Cryogenic freezer").getInt(pollutionPerSecondMultiIndustrialVacuumFreezer); @@ -158,6 +159,7 @@ public class ConfigHandler { pollutionPerSecondMultiTreeFarm = config.get("pollution", "pollutionPerSecondMultiTreeFarm", pollutionPerSecondMultiTreeFarm, "pollution rate in gibbl/s for the Tree growth simulator").getInt(pollutionPerSecondMultiTreeFarm); pollutionPerSecondMultiFrothFlotationCell = config.get("pollution", "pollutionPerSecondMultiFrothFlotationCell", pollutionPerSecondMultiFrothFlotationCell, "pollution rate in gibbl/s for the Flotation cell regulator").getInt(pollutionPerSecondMultiFrothFlotationCell); pollutionPerSecondMultiAutoCrafter = config.get("pollution", "pollutionPerSecondMultiAutoCrafter", pollutionPerSecondMultiAutoCrafter, "pollution rate in gibbl/s for the Large-Scale auto assembler v1.01").getInt(pollutionPerSecondMultiAutoCrafter); + pollutionPerSecondMultiMolecularTransformer = config.get("pollution", "pollutionPerSecondMultiMolecularTransformer", pollutionPerSecondMultiMolecularTransformer, "pollution rate in gibbl/s for the Multiblock Molecular Transformer").getInt(pollutionPerSecondMultiMolecularTransformer); pollutionPerSecondMultiThermalBoiler = config.get("pollution", "pollutionPerSecondMultiThermalBoiler", pollutionPerSecondMultiThermalBoiler, "pollution rate in gibbl/s for the Thermal boiler").getInt(pollutionPerSecondMultiThermalBoiler); pollutionPerSecondMultiAlgaePond = config.get("pollution", "pollutionPerSecondMultiAlgaePond", pollutionPerSecondMultiAlgaePond, "pollution rate in gibbl/s for the Algae farm").getInt(pollutionPerSecondMultiAlgaePond); basePollutionPerSecondSemiFluidGenerator = config.get("pollution", "basePollutionPerSecondSemiFluidGenerator", basePollutionPerSecondSemiFluidGenerator, "base pollution rate in gibbl/s for the single block semi fluid generators").getInt(basePollutionPerSecondSemiFluidGenerator); diff --git a/src/main/java/gtPlusPlus/core/container/Container_Workbench.java b/src/main/java/gtPlusPlus/core/container/Container_Workbench.java deleted file mode 100644 index 55ef1a3d0c..0000000000 --- a/src/main/java/gtPlusPlus/core/container/Container_Workbench.java +++ /dev/null @@ -1,413 +0,0 @@ -package gtPlusPlus.core.container; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.inventory.*; -import net.minecraft.item.ItemStack; -import net.minecraft.item.crafting.CraftingManager; -import net.minecraft.world.World; - -import gregtech.api.gui.GT_Slot_Holo; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.block.ModBlocks; -import gtPlusPlus.core.interfaces.IItemBlueprint; -import gtPlusPlus.core.inventories.InventoryWorkbenchChest; -import gtPlusPlus.core.inventories.InventoryWorkbenchHoloSlots; -import gtPlusPlus.core.inventories.InventoryWorkbenchTools; -import gtPlusPlus.core.item.general.ItemBlueprint; -import gtPlusPlus.core.slots.*; -import gtPlusPlus.core.tileentities.machines.TileEntityWorkbench; -import gtPlusPlus.core.util.minecraft.ItemUtils; - -public class Container_Workbench extends Container { - - protected TileEntityWorkbench tile_entity; - public InventoryCrafting craftMatrix = new InventoryCrafting(this, 3, 3); - public final InventoryWorkbenchChest inventoryChest; - public final InventoryWorkbenchTools inventoryTool; - public final InventoryWorkbenchHoloSlots inventoryHolo; - //public final InventoryWorkbenchHoloCrafting inventoryCrafting; - - private final World worldObj; - private final int posX; - private final int posY; - private final int posZ; - - public static int HoloSlotNumber = 6; - public static int InputSlotNumber = 0; //Number of Slots in the Crafting Grid - public static int StorageSlotNumber = 16; //Number of slots in storage area - public static int ToolSlotNumber = 5; // Number of slots in the tool area up top - public static int InOutputSlotNumber = InputSlotNumber + StorageSlotNumber + ToolSlotNumber + HoloSlotNumber; //Same plus Output Slot - public static int InventorySlotNumber = 36; //Inventory Slots (Inventory and Hotbar) - public static int InventoryOutSlotNumber = InventorySlotNumber + 1; //Inventory Slot Number + Output - public static int FullSlotNumber = InventorySlotNumber + InOutputSlotNumber; //All slots - - private final int slotOutput = 0; - private final int[] slotHolo = new int[5]; - private final int[] slotCrafting = new int[9]; - private final int[] slotStorage = new int[16]; - private final int[] slotTools = new int[5]; - - public void moveCraftingToChest(){ - //Check Chest Space - for (int i=0;i<9;i++){ - if (this.craftMatrix.getStackInSlot(i) != null){ - for (int r=0;r<16;r++){ - if ((this.inventoryChest.getStackInSlot(r) == null) || ((this.inventoryChest.getStackInSlot(r).getItem() == this.craftMatrix.getStackInSlot(i).getItem()) && ((64-this.craftMatrix.getStackInSlot(i).stackSize) <= (64-this.craftMatrix.getStackInSlot(i).stackSize)))){ - this.inventoryChest.setInventorySlotContents(r, this.craftMatrix.getStackInSlot(i)); - this.craftMatrix.setInventorySlotContents(i, null); - break; - } - } - } - } - //For Each Space or already existing itemstack, move one itemstack or fill current partial stack - //Remove old itemstack or partial stack from crafting grid - } - - public void moveChestToCrafting(){ - //Check Crafting items and slots - for (int i=0;i<9;i++){ - if ((this.craftMatrix.getStackInSlot(i) == null) || (this.craftMatrix.getStackInSlot(i).stackSize > 0)){ - for (int r=0;r<16;r++){ - if (this.inventoryChest.getStackInSlot(r) != null){ - this.craftMatrix.setInventorySlotContents(i, this.craftMatrix.getStackInSlot(r)); - this.inventoryChest.setInventorySlotContents(r, null); - } - } - } - } - //For Each already existing itemstack, fill current partial stack - //Remove partial stack from chest area - } - - - public Container_Workbench(final InventoryPlayer inventory, final TileEntityWorkbench tile){ - this.tile_entity = tile; - this.inventoryChest = tile.inventoryChest; - this.inventoryTool = tile.inventoryTool; - this.inventoryHolo = tile.inventoryHolo; - //this.inventoryCrafting = tile.inventoryCrafting; - - int var6; - int var7; - this.worldObj = tile.getWorldObj(); - this.posX = tile.xCoord; - this.posY = tile.yCoord; - this.posZ = tile.zCoord; - - int o=0; - - //Output slot - this.addSlotToContainer(new SlotOutput(inventory.player, this.craftMatrix, tile.inventoryCraftResult, 0, 136, 64)); - //Util Slots - this.addSlotToContainer(new SlotBlueprint(this.inventoryHolo, 1, 136, 28)); //Blueprint - this.addSlotToContainer(new SlotNoInput(this.inventoryHolo, 2, 154, 28)); //Hopper - this.addSlotToContainer(new GT_Slot_Holo(this.inventoryHolo, 3, 154, 64, false, false, 64)); //Parking - //Holo Slots - this.addSlotToContainer(new GT_Slot_Holo(this.inventoryHolo, 4, 154, 46, false, false, 1)); - this.addSlotToContainer(new GT_Slot_Holo(this.inventoryHolo, 5, 136, 46, false, false, 1)); - - for (int i=1; i<6; i++){ - this.slotHolo[o] = o+1; - o++; - } - - o=0; - - this.updateCraftingMatrix(); - - //Crafting Grid - for (var6 = 0; var6 < 3; ++var6) - { - for (var7 = 0; var7 < 3; ++var7) - { - //this.addSlotToContainer(new Slot(this.craftMatrix, var7 + (var6 * 3), 82 + (var7 * 18), 28 + (var6 * 18))); - - /*if (this.inventoryCrafting.getStackInSlot(o) != null){ - this.craftMatrix.setInventorySlotContents(o, inventoryCrafting.getStackInSlot(o)); - this.inventoryCrafting.setInventorySlotContents(o, null); - } */ - this.slotCrafting[o] = o+6; - o++; - } - } - - o=0; - - //Storage Side - for (var6 = 0; var6 < 4; ++var6) - { - for (var7 = 0; var7 < 4; ++var7) - { - //Utils.LOG_WARNING("Adding slots at var:"+(var7 + var6 * 4)+" x:"+(8 + var7 * 18)+" y:"+(7 + var6 * 18)); - this.addSlotToContainer(new Slot(this.inventoryChest, var7 + (var6 * 4), 8 + (var7 * 18), 7 + (var6 * 18))); - this.slotStorage[o] = o+15; - o++; - } - } - - o=0; - - //Tool Slots - for (var6 = 0; var6 < 1; ++var6) - { - for (var7 = 0; var7 < 5; ++var7) - { - this.addSlotToContainer(new SlotGtTool(this.inventoryTool, var7 + (var6 * 3), 82 + (var7 * 18), 8 + (var6 * 18))); - this.slotTools[o] = o+31; - o++; - } - } - - //Player Inventory - for (var6 = 0; var6 < 3; ++var6) - { - for (var7 = 0; var7 < 9; ++var7) - { - this.addSlotToContainer(new Slot(inventory, var7 + (var6 * 9) + 9, 8 + (var7 * 18), 84 + (var6 * 18))); - } - } - - //Player Hotbar - for (var6 = 0; var6 < 9; ++var6) - { - this.addSlotToContainer(new Slot(inventory, var6, 8 + (var6 * 18), 142)); - } - - this.onCraftMatrixChanged(this.craftMatrix); - - } - - @Override - public ItemStack slotClick(final int aSlotIndex, final int aMouseclick, final int aShifthold, final EntityPlayer aPlayer){ - - if (!aPlayer.worldObj.isRemote){ - if ((aSlotIndex == 999) || (aSlotIndex == -999)){ - //Utils.LOG_WARNING("??? - "+aSlotIndex); - } - - if (aSlotIndex == this.slotOutput){ - Logger.WARNING("Player Clicked on the output slot"); - //TODO - } - - for (final int x : this.slotHolo){ - if (aSlotIndex == x){ - Logger.WARNING("Player Clicked slot "+aSlotIndex+" in the Holo Grid"); - if (x == 1){ - Logger.WARNING("Player Clicked Blueprint slot in the Holo Grid"); - } - else if (x == 2){ - Logger.WARNING("Player Clicked Right Arrow slot in the Holo Grid"); - if (this.inventoryHolo.getStackInSlot(1) != null){ - Logger.WARNING("Found an ItemStack."); - if (this.inventoryHolo.getStackInSlot(1).getItem() instanceof IItemBlueprint){ - Logger.WARNING("Found a blueprint."); - final ItemStack tempBlueprint = this.inventoryHolo.getStackInSlot(1); - final ItemBlueprint tempItemBlueprint = (ItemBlueprint) tempBlueprint.getItem(); - if ((this.inventoryHolo.getStackInSlot(0) != null) && !tempItemBlueprint.hasBlueprint(tempBlueprint)){ - Logger.WARNING("Output slot was not empty."); - Logger.WARNING("Trying to manipulate NBT data on the blueprint stack, then replace it with the new one."); - tempItemBlueprint.setBlueprint(this.inventoryHolo.getStackInSlot(1), this.craftMatrix, this.inventoryHolo.getStackInSlot(0)); - final ItemStack newTempBlueprint = ItemUtils.getSimpleStack(tempItemBlueprint); - this.inventoryHolo.setInventorySlotContents(1, newTempBlueprint); - Logger.WARNING(ItemUtils.getArrayStackNames(tempItemBlueprint.getBlueprint(newTempBlueprint))); - } - else { - if (tempItemBlueprint.hasBlueprint(tempBlueprint)){ - Logger.WARNING("Blueprint already holds a recipe."); - } - else { - Logger.WARNING("Output slot was empty."); - } - } - } - else { - Logger.WARNING("ItemStack found was not a blueprint."); - } - } - else { - Logger.WARNING("No ItemStack found in Blueprint slot."); - } - } - else if (x == 3){ - Logger.WARNING("Player Clicked Big [P] slot in the Holo Grid"); - } - else if (x == 4){ - Logger.WARNING("Player Clicked Transfer to Crafting Grid slot in the Holo Grid"); - } - else if (x == 5){ - Logger.WARNING("Player Clicked Transfer to Storage Grid slot in the Holo Grid"); - } - } - } - - for (final int x : this.slotCrafting){ - if (aSlotIndex == x){ - Logger.WARNING("Player Clicked slot "+aSlotIndex+" in the crafting Grid"); - } - } - for (final int x : this.slotStorage){ - if (aSlotIndex == x){ - Logger.WARNING("Player Clicked slot "+aSlotIndex+" in the storage Grid"); - } - } - for (final int x : this.slotTools){ - if (aSlotIndex == x){ - Logger.WARNING("Player Clicked slot "+aSlotIndex+" in the tool Grid"); - } - } - } - //Utils.LOG_WARNING("Player Clicked slot "+aSlotIndex+" in the Grid"); - return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer); - } - - private void updateCraftingMatrix() { - for (int i = 0; i < this.craftMatrix.getSizeInventory(); i++) { - //this.craftMatrix.setInventorySlotContents(i, this.tile_entity.inventoryCrafting.getStackInSlot(i)); - } - } - - @Override - public void onCraftMatrixChanged(final IInventory iiventory) { - this.tile_entity.inventoryCraftResult.setInventorySlotContents(0, CraftingManager.getInstance().findMatchingRecipe(this.craftMatrix, this.worldObj)); - } - - @Override - public void onContainerClosed(final EntityPlayer par1EntityPlayer) - { - super.onContainerClosed(par1EntityPlayer); - this.saveCraftingMatrix(); - } - - private void saveCraftingMatrix() { - for (int i = 0; i < this.craftMatrix.getSizeInventory(); i++) { - //this.tile_entity.inventoryCrafting.setInventorySlotContents(i, this.craftMatrix.getStackInSlot(i)); - } - } - - - - - /*@Override - public void onCraftMatrixChanged(IInventory par1IInventory){ - //Custom Recipe Handler - //craftResult.setInventorySlotContents(0, Workbench_CraftingHandler.getInstance().findMatchingRecipe(craftMatrix, worldObj)); - - //Vanilla CraftingManager - Utils.LOG_WARNING("checking crafting grid for a valid output."); - ItemStack temp = CraftingManager.getInstance().findMatchingRecipe(craftMatrix, worldObj); - if (temp != null){ - Utils.LOG_WARNING("Output found. "+temp.getDisplayName()+" x"+temp.stackSize); - craftResult.setInventorySlotContents(slotOutput, temp); - } - else { - Utils.LOG_WARNING("No Valid output found."); - craftResult.setInventorySlotContents(slotOutput, null); - } - }*/ - - /*@Override - public void onContainerClosed(EntityPlayer par1EntityPlayer) - { - for (int o=0; o<craftMatrix.getSizeInventory(); o++){ - this.inventoryCrafting.setInventorySlotContents(o, craftMatrix.getStackInSlot(o)); - this.craftMatrix.setInventorySlotContents(o, null); - }*/ - - //super.onContainerClosed(par1EntityPlayer); - - /*if (worldObj.isRemote) - { - return; - } - - for (int i = 0; i < InputSlotNumber; i++) - { - ItemStack itemstack = craftMatrix.getStackInSlotOnClosing(i); - - if (itemstack != null) - { - par1EntityPlayer.dropPlayerItemWithRandomChoice(itemstack, false); - } - }*/ - - @Override - public boolean canInteractWith(final EntityPlayer par1EntityPlayer){ - if (this.worldObj.getBlock(this.posX, this.posY, this.posZ) != ModBlocks.blockWorkbench){ - return false; - } - - return par1EntityPlayer.getDistanceSq(this.posX + 0.5D, this.posY + 0.5D, this.posZ + 0.5D) <= 64D; - } - - - @Override - public ItemStack transferStackInSlot(final EntityPlayer par1EntityPlayer, final int par2) - { - ItemStack var3 = null; - final Slot var4 = (Slot)this.inventorySlots.get(par2); - - if ((var4 != null) && var4.getHasStack()) - { - final ItemStack var5 = var4.getStack(); - var3 = var5.copy(); - - if (par2 == 0) - { - if (!this.mergeItemStack(var5, InOutputSlotNumber, FullSlotNumber, true)) - { - return null; - } - - var4.onSlotChange(var5, var3); - } - else if ((par2 >= InOutputSlotNumber) && (par2 < InventoryOutSlotNumber)) - { - if (!this.mergeItemStack(var5, InventoryOutSlotNumber, FullSlotNumber, false)) - { - return null; - } - } - else if ((par2 >= InventoryOutSlotNumber) && (par2 < FullSlotNumber)) - { - if (!this.mergeItemStack(var5, InOutputSlotNumber, InventoryOutSlotNumber, false)) - { - return null; - } - } - else if (!this.mergeItemStack(var5, InOutputSlotNumber, FullSlotNumber, false)) - { - return null; - } - - if (var5.stackSize == 0) - { - var4.putStack((ItemStack)null); - } - else - { - var4.onSlotChanged(); - } - - if (var5.stackSize == var3.stackSize) - { - return null; - } - - var4.onPickupFromSlot(par1EntityPlayer, var5); - } - - return var3; - } - - //Can merge Slot - @Override - public boolean func_94530_a(final ItemStack p_94530_1_, final Slot p_94530_2_) { - return (p_94530_2_.inventory != this.tile_entity.inventoryCraftResult) && super.func_94530_a(p_94530_1_, p_94530_2_); - } - - -}
\ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/container/Container_WorkbenchAdvanced.java b/src/main/java/gtPlusPlus/core/container/Container_WorkbenchAdvanced.java deleted file mode 100644 index dc499c570f..0000000000 --- a/src/main/java/gtPlusPlus/core/container/Container_WorkbenchAdvanced.java +++ /dev/null @@ -1,377 +0,0 @@ -package gtPlusPlus.core.container; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.inventory.*; -import net.minecraft.item.ItemStack; -import net.minecraft.item.crafting.CraftingManager; -import net.minecraft.world.World; - -import gregtech.api.gui.GT_Slot_Holo; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.block.ModBlocks; -import gtPlusPlus.core.interfaces.IItemBlueprint; -import gtPlusPlus.core.inventories.*; -import gtPlusPlus.core.item.general.ItemBlueprint; -import gtPlusPlus.core.slots.*; -import gtPlusPlus.core.tileentities.machines.TileEntityWorkbenchAdvanced; -import gtPlusPlus.core.util.minecraft.ItemUtils; - -public class Container_WorkbenchAdvanced extends Container { - - protected TileEntityWorkbenchAdvanced tile_entity; - public InventoryCrafting craftMatrix = new InventoryCrafting(this, 3, 3); - public final InventoryWorkbenchChest inventoryChest; - public final InventoryWorkbenchToolsElectric inventoryTool; - public final InventoryWorkbenchHoloSlots inventoryHolo; - public final InventoryWorkbenchHoloCrafting inventoryCrafting; - - private final World worldObj; - private final int posX; - private final int posY; - private final int posZ; - - public static int HoloSlotNumber = 6; - public static int InputSlotNumber = 9; //Number of Slots in the Crafting Grid - public static int StorageSlotNumber = 16; //Number of slots in storage area - public static int ToolSlotNumber = 5; // Number of slots in the tool area up top - public static int InOutputSlotNumber = InputSlotNumber + StorageSlotNumber + ToolSlotNumber + HoloSlotNumber; //Same plus Output Slot - public static int InventorySlotNumber = 36; //Inventory Slots (Inventory and Hotbar) - public static int InventoryOutSlotNumber = InventorySlotNumber + 1; //Inventory Slot Number + Output - public static int FullSlotNumber = InventorySlotNumber + InOutputSlotNumber; //All slots - - private final int slotOutput = 0; - private final int[] slotHolo = new int[5]; - private final int[] slotCrafting = new int[9]; - private final int[] slotStorage = new int[16]; - private final int[] slotTools = new int[5]; - - public Container_WorkbenchAdvanced(final InventoryPlayer inventory, final TileEntityWorkbenchAdvanced tile){ - this.tile_entity = tile; - this.inventoryChest = tile.inventoryChest; - this.inventoryTool = tile.inventoryTool; - this.inventoryHolo = tile.inventoryHolo; - this.inventoryCrafting = tile.inventoryCrafting; - - int var6; - int var7; - this.worldObj = tile.getWorldObj(); - this.posX = tile.xCoord; - this.posY = tile.yCoord; - this.posZ = tile.zCoord; - - int o=0; - - //Output slot - this.addSlotToContainer(new SlotOutput(inventory.player, this.craftMatrix, tile.inventoryCraftResult, 0, 136, 64)); - //Util Slots - this.addSlotToContainer(new SlotBlueprint(this.inventoryHolo, 1, 136, 28)); //Blueprint - this.addSlotToContainer(new SlotNoInput(this.inventoryHolo, 2, 154, 28)); //Hopper - this.addSlotToContainer(new GT_Slot_Holo(this.inventoryHolo, 3, 154, 64, false, false, 64)); //Parking - //Holo Slots - this.addSlotToContainer(new GT_Slot_Holo(this.inventoryHolo, 4, 154, 46, false, false, 1)); - this.addSlotToContainer(new GT_Slot_Holo(this.inventoryHolo, 5, 136, 46, false, false, 1)); - - for (int i=1; i<6; i++){ - this.slotHolo[o] = o+1; - o++; - } - - o=0; - - this.updateCraftingMatrix(); - - //Crafting Grid - for (var6 = 0; var6 < 3; ++var6) - { - for (var7 = 0; var7 < 3; ++var7) - { - this.addSlotToContainer(new Slot(this.craftMatrix, var7 + (var6 * 3), 82 + (var7 * 18), 28 + (var6 * 18))); - - /*if (this.inventoryCrafting.getStackInSlot(o) != null){ - this.craftMatrix.setInventorySlotContents(o, inventoryCrafting.getStackInSlot(o)); - this.inventoryCrafting.setInventorySlotContents(o, null); - } */ - this.slotCrafting[o] = o+6; - o++; - } - } - - o=0; - - //Storage Side - for (var6 = 0; var6 < 4; ++var6) - { - for (var7 = 0; var7 < 4; ++var7) - { - //Utils.LOG_WARNING("Adding slots at var:"+(var7 + var6 * 4)+" x:"+(8 + var7 * 18)+" y:"+(7 + var6 * 18)); - this.addSlotToContainer(new Slot(this.inventoryChest, var7 + (var6 * 4), 8 + (var7 * 18), 7 + (var6 * 18))); - this.slotStorage[o] = o+15; - o++; - } - } - - o=0; - - //Tool Slots - for (var6 = 0; var6 < 1; ++var6) - { - for (var7 = 0; var7 < 5; ++var7) - { - this.addSlotToContainer(new SlotGtToolElectric(this.inventoryTool, var7 + (var6 * 3), 82 + (var7 * 18), 8 + (var6 * 18), 3, false)); - this.slotTools[o] = o+31; - o++; - } - } - - //Player Inventory - for (var6 = 0; var6 < 3; ++var6) - { - for (var7 = 0; var7 < 9; ++var7) - { - this.addSlotToContainer(new Slot(inventory, var7 + (var6 * 9) + 9, 8 + (var7 * 18), 84 + (var6 * 18))); - } - } - - //Player Hotbar - for (var6 = 0; var6 < 9; ++var6) - { - this.addSlotToContainer(new Slot(inventory, var6, 8 + (var6 * 18), 142)); - } - - this.onCraftMatrixChanged(this.craftMatrix); - - } - - @Override - public ItemStack slotClick(final int aSlotIndex, final int aMouseclick, final int aShifthold, final EntityPlayer aPlayer){ - - if (!aPlayer.worldObj.isRemote){ - if ((aSlotIndex == 999) || (aSlotIndex == -999)){ - //Utils.LOG_WARNING("??? - "+aSlotIndex); - } - - if (aSlotIndex == this.slotOutput){ - Logger.WARNING("Player Clicked on the output slot"); - //TODO - } - - for (final int x : this.slotHolo){ - if (aSlotIndex == x){ - Logger.WARNING("Player Clicked slot "+aSlotIndex+" in the Holo Grid"); - if (x == 1){ - Logger.WARNING("Player Clicked Blueprint slot in the Holo Grid"); - } - else if (x == 2){ - Logger.WARNING("Player Clicked Right Arrow slot in the Holo Grid"); - if (this.inventoryHolo.getStackInSlot(1) != null){ - Logger.WARNING("Found an ItemStack."); - if (this.inventoryHolo.getStackInSlot(1).getItem() instanceof IItemBlueprint){ - Logger.WARNING("Found a blueprint."); - final ItemStack tempBlueprint = this.inventoryHolo.getStackInSlot(1); - final ItemBlueprint tempItemBlueprint = (ItemBlueprint) tempBlueprint.getItem(); - if ((this.inventoryHolo.getStackInSlot(0) != null) && !tempItemBlueprint.hasBlueprint(tempBlueprint)){ - Logger.WARNING("Output slot was not empty."); - Logger.WARNING("Trying to manipulate NBT data on the blueprint stack, then replace it with the new one."); - tempItemBlueprint.setBlueprint(this.inventoryHolo.getStackInSlot(1), this.craftMatrix, this.inventoryHolo.getStackInSlot(0)); - final ItemStack newTempBlueprint = ItemUtils.getSimpleStack(tempItemBlueprint); - this.inventoryHolo.setInventorySlotContents(1, newTempBlueprint); - Logger.WARNING(ItemUtils.getArrayStackNames(tempItemBlueprint.getBlueprint(newTempBlueprint))); - } - else { - if (tempItemBlueprint.hasBlueprint(tempBlueprint)){ - Logger.WARNING("Blueprint already holds a recipe."); - } - else { - Logger.WARNING("Output slot was empty."); - } - } - } - else { - Logger.WARNING("ItemStack found was not a blueprint."); - } - } - else { - Logger.WARNING("No ItemStack found in Blueprint slot."); - } - } - else if (x == 3){ - Logger.WARNING("Player Clicked Big [P] slot in the Holo Grid"); - } - else if (x == 4){ - Logger.WARNING("Player Clicked Transfer to Crafting Grid slot in the Holo Grid"); - } - else if (x == 5){ - Logger.WARNING("Player Clicked Transfer to Storage Grid slot in the Holo Grid"); - } - } - } - - for (final int x : this.slotCrafting){ - if (aSlotIndex == x){ - Logger.WARNING("Player Clicked slot "+aSlotIndex+" in the crafting Grid"); - } - } - for (final int x : this.slotStorage){ - if (aSlotIndex == x){ - Logger.WARNING("Player Clicked slot "+aSlotIndex+" in the storage Grid"); - } - } - for (final int x : this.slotTools){ - if (aSlotIndex == x){ - Logger.WARNING("Player Clicked slot "+aSlotIndex+" in the tool Grid"); - } - } - } - //Utils.LOG_WARNING("Player Clicked slot "+aSlotIndex+" in the Grid"); - return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer); - } - - private void updateCraftingMatrix() { - for (int i = 0; i < this.craftMatrix.getSizeInventory(); i++) { - this.craftMatrix.setInventorySlotContents(i, this.tile_entity.inventoryCrafting.getStackInSlot(i)); - } - } - - @Override - public void onCraftMatrixChanged(final IInventory iiventory) { - this.tile_entity.inventoryCraftResult.setInventorySlotContents(0, CraftingManager.getInstance().findMatchingRecipe(this.craftMatrix, this.worldObj)); - } - - @Override - public void onContainerClosed(final EntityPlayer par1EntityPlayer) - { - super.onContainerClosed(par1EntityPlayer); - this.saveCraftingMatrix(); - } - - private void saveCraftingMatrix() { - for (int i = 0; i < this.craftMatrix.getSizeInventory(); i++) { - this.tile_entity.inventoryCrafting.setInventorySlotContents(i, this.craftMatrix.getStackInSlot(i)); - } - } - - - - - /*@Override - public void onCraftMatrixChanged(IInventory par1IInventory){ - //Custom Recipe Handler - //craftResult.setInventorySlotContents(0, Workbench_CraftingHandler.getInstance().findMatchingRecipe(craftMatrix, worldObj)); - - //Vanilla CraftingManager - Utils.LOG_WARNING("checking crafting grid for a valid output."); - ItemStack temp = CraftingManager.getInstance().findMatchingRecipe(craftMatrix, worldObj); - if (temp != null){ - Utils.LOG_WARNING("Output found. "+temp.getDisplayName()+" x"+temp.stackSize); - craftResult.setInventorySlotContents(slotOutput, temp); - } - else { - Utils.LOG_WARNING("No Valid output found."); - craftResult.setInventorySlotContents(slotOutput, null); - } - }*/ - - /*@Override - public void onContainerClosed(EntityPlayer par1EntityPlayer) - { - for (int o=0; o<craftMatrix.getSizeInventory(); o++){ - this.inventoryCrafting.setInventorySlotContents(o, craftMatrix.getStackInSlot(o)); - this.craftMatrix.setInventorySlotContents(o, null); - }*/ - - //super.onContainerClosed(par1EntityPlayer); - - /*if (worldObj.isRemote) - { - return; - } - - for (int i = 0; i < InputSlotNumber; i++) - { - ItemStack itemstack = craftMatrix.getStackInSlotOnClosing(i); - - if (itemstack != null) - { - par1EntityPlayer.dropPlayerItemWithRandomChoice(itemstack, false); - } - }*/ - - @Override - public boolean canInteractWith(final EntityPlayer par1EntityPlayer){ - if (this.worldObj.getBlock(this.posX, this.posY, this.posZ) != ModBlocks.blockWorkbench){ - return false; - } - - return par1EntityPlayer.getDistanceSq(this.posX + 0.5D, this.posY + 0.5D, this.posZ + 0.5D) <= 64D; - } - - - @Override - public ItemStack transferStackInSlot(final EntityPlayer par1EntityPlayer, final int par2) - { - ItemStack var3 = null; - final Slot var4 = (Slot)this.inventorySlots.get(par2); - - if ((var4 != null) && var4.getHasStack()) - { - final ItemStack var5 = var4.getStack(); - var3 = var5.copy(); - - if (par2 == 0) - { - if (!this.mergeItemStack(var5, InOutputSlotNumber, FullSlotNumber, true)) - { - return null; - } - - var4.onSlotChange(var5, var3); - } - else if ((par2 >= InOutputSlotNumber) && (par2 < InventoryOutSlotNumber)) - { - if (!this.mergeItemStack(var5, InventoryOutSlotNumber, FullSlotNumber, false)) - { - return null; - } - } - else if ((par2 >= InventoryOutSlotNumber) && (par2 < FullSlotNumber)) - { - if (!this.mergeItemStack(var5, InOutputSlotNumber, InventoryOutSlotNumber, false)) - { - return null; - } - } - else if (!this.mergeItemStack(var5, InOutputSlotNumber, FullSlotNumber, false)) - { - return null; - } - - if (var5.stackSize == 0) - { - var4.putStack((ItemStack)null); - } - else - { - var4.onSlotChanged(); - } - - if (var5.stackSize == var3.stackSize) - { - return null; - } - - var4.onPickupFromSlot(par1EntityPlayer, var5); - } - - return var3; - } - - //Can merge Slot - @Override - public boolean func_94530_a(final ItemStack p_94530_1_, final Slot p_94530_2_) { - return (p_94530_2_.inventory != this.tile_entity.inventoryCraftResult) && super.func_94530_a(p_94530_1_, p_94530_2_); - } - - -}
\ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/gui/machine/GUI_Workbench.java b/src/main/java/gtPlusPlus/core/gui/machine/GUI_Workbench.java deleted file mode 100644 index 861c2ba6b6..0000000000 --- a/src/main/java/gtPlusPlus/core/gui/machine/GUI_Workbench.java +++ /dev/null @@ -1,81 +0,0 @@ -package gtPlusPlus.core.gui.machine; - -import org.lwjgl.opengl.GL11; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.client.gui.GuiButton; -import net.minecraft.client.gui.inventory.GuiContainer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.util.ResourceLocation; - -import gtPlusPlus.core.container.Container_Workbench; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.tileentities.machines.TileEntityWorkbench; - -@SideOnly(Side.CLIENT) -public class GUI_Workbench extends GuiContainer { - - private static final ResourceLocation craftingTableGuiTextures = new ResourceLocation(CORE.MODID, "textures/gui/BronzeCraftingTable.png"); - - public boolean moveItemsToChest = false; - public boolean moveItemsToCrafting = false; - - public GUI_Workbench(final InventoryPlayer player_inventory, final TileEntityWorkbench tile){ - super(new Container_Workbench(player_inventory, tile)); - } - - - @Override - protected void drawGuiContainerForegroundLayer(final int i, final int j){ - //this.fontRendererObj.drawString(I18n.format("Workbench", new Object[0]), 28, 6, 4210752); - //this.fontRendererObj.drawString(I18n.format("container.inventory", new Object[0]), 8, this.ySize - 96 + 2, 4210752); - - } - - - @Override - protected void drawGuiContainerBackgroundLayer(final float f, final int i, final int j){ - GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f); - this.mc.renderEngine.bindTexture(craftingTableGuiTextures); - final int x = (this.width - this.xSize) / 2; - final int y = (this.height - this.ySize) / 2; - this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize); - } - - - //This method is called when the Gui is first called! - @Override - public void initGui() - { - //You have to add this line for the Gui to function properly! - super.initGui(); - - //The parameters of GuiButton are(id, x, y, width, height, text); - //this.buttonList.add(new GuiButton( 1, 367, 132, 18, 18, "X")); - //this.buttonList.add(new GuiButton( 2, 385, 132, 18, 18, "Y")); - //NOTE: the id always has to be different or else it might get called twice or never! - - //Add any other buttons here too! - } - - @Override - protected void actionPerformed(final GuiButton B) - { - //If the button id is different, or you have mrs buttons, create another if block for that too! - if(B.id == 1){ - System.out.println("Trying to empty crafting grid to the storage compartment."); - //moveItemsToChest = true; - ((Container_Workbench) this.inventorySlots).moveCraftingToChest(); - } - else if(B.id == 2){ - System.out.println("Trying to move items into the crafting grid."); - //moveItemsToCrafting = true; - ((Container_Workbench) this.inventorySlots).moveChestToCrafting(); - } - - - } - -}
\ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/gui/machine/GUI_WorkbenchAdvanced.java b/src/main/java/gtPlusPlus/core/gui/machine/GUI_WorkbenchAdvanced.java deleted file mode 100644 index 20183eb0b0..0000000000 --- a/src/main/java/gtPlusPlus/core/gui/machine/GUI_WorkbenchAdvanced.java +++ /dev/null @@ -1,42 +0,0 @@ -package gtPlusPlus.core.gui.machine; - -import org.lwjgl.opengl.GL11; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.client.gui.inventory.GuiContainer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.util.ResourceLocation; - -import gtPlusPlus.core.container.Container_WorkbenchAdvanced; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.tileentities.machines.TileEntityWorkbenchAdvanced; - -@SideOnly(Side.CLIENT) -public class GUI_WorkbenchAdvanced extends GuiContainer { - - private static final ResourceLocation craftingTableGuiTextures = new ResourceLocation(CORE.MODID, "textures/gui/AdvancedCraftingTable.png"); - - public GUI_WorkbenchAdvanced(final InventoryPlayer player_inventory, final TileEntityWorkbenchAdvanced tile){ - super(new Container_WorkbenchAdvanced(player_inventory, tile)); - } - - - @Override - protected void drawGuiContainerForegroundLayer(final int i, final int j){ - //this.fontRendererObj.drawString(I18n.format("Workbench", new Object[0]), 28, 6, 4210752); - //this.fontRendererObj.drawString(I18n.format("container.inventory", new Object[0]), 8, this.ySize - 96 + 2, 4210752); - } - - - @Override - protected void drawGuiContainerBackgroundLayer(final float f, final int i, final int j){ - GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f); - this.mc.renderEngine.bindTexture(craftingTableGuiTextures); - final int x = (this.width - this.xSize) / 2; - final int y = (this.height - this.ySize) / 2; - this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize); - } - -}
\ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/handler/COMPAT_HANDLER.java b/src/main/java/gtPlusPlus/core/handler/COMPAT_HANDLER.java index bb47bb2380..1db54a4933 100644 --- a/src/main/java/gtPlusPlus/core/handler/COMPAT_HANDLER.java +++ b/src/main/java/gtPlusPlus/core/handler/COMPAT_HANDLER.java @@ -135,7 +135,7 @@ public class COMPAT_HANDLER { GregtechIndustrialCuttingFactory.run(); //GregtechMiniRaFusion.run(); GregtechComponentAssembler.run(); - //GregtechTeslaTower.run(); + GregtechTeslaTower.run(); GregtechSuperChests.run(); GregtechIndustrialFishPond.run(); GregtechTieredChunkloaders.run(); @@ -151,7 +151,7 @@ public class COMPAT_HANDLER { GregtechCustomHatches.run(); //GregtechNaqReactor.run(); GregtechIndustrialArcFurnace.run(); - //GregtechSolarTower.run(); + GregtechSolarTower.run(); GregtechLargeTurbinesAndHeatExchanger.run(); GregtechPowerBreakers.run(); GregtechFluidReactor.run(); @@ -159,7 +159,9 @@ public class COMPAT_HANDLER { GregtechIndustrialAlloySmelter.run(); GregtechIsaMill.run(); GregtechSteamMultis.run(); - //GregtechIndustrialElementDuplicator.run(); + GregtechIndustrialForgeHammer.run(); + GregtechMolecularTransformer.run(); + GregtechIndustrialElementDuplicator.run(); GregtechIndustrialRockBreaker.run(); GregtechIndustrialChisel.run(); diff --git a/src/main/java/gtPlusPlus/core/handler/COMPAT_IntermodStaging.java b/src/main/java/gtPlusPlus/core/handler/COMPAT_IntermodStaging.java index 9a1b551d30..166c0f228b 100644 --- a/src/main/java/gtPlusPlus/core/handler/COMPAT_IntermodStaging.java +++ b/src/main/java/gtPlusPlus/core/handler/COMPAT_IntermodStaging.java @@ -4,6 +4,7 @@ import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.event.FMLLoadCompleteEvent; import cpw.mods.fml.common.event.FMLPostInitializationEvent; import cpw.mods.fml.common.event.FMLPreInitializationEvent; +import gtPlusPlus.xmod.advsolar.HANDLER_AdvSolar; import gtPlusPlus.xmod.bartcrops.HANDLER_CropsPlusPlus; import gtPlusPlus.xmod.bop.HANDLER_BiomesOPlenty; import gtPlusPlus.xmod.computronics.HANDLER_Computronics; @@ -81,6 +82,7 @@ public class COMPAT_IntermodStaging { HANDLER_Reliquary.postInit(); HANDLER_OpenBlocks.postInit(); HANDLER_SpiceOfLife.postInit(); + HANDLER_AdvSolar.postInit(); } public static void onLoadComplete(FMLLoadCompleteEvent event) { diff --git a/src/main/java/gtPlusPlus/core/handler/GuiHandler.java b/src/main/java/gtPlusPlus/core/handler/GuiHandler.java index 0567d6c5dd..1be3578ed0 100644 --- a/src/main/java/gtPlusPlus/core/handler/GuiHandler.java +++ b/src/main/java/gtPlusPlus/core/handler/GuiHandler.java @@ -5,7 +5,19 @@ import cpw.mods.fml.common.network.NetworkRegistry; import gtPlusPlus.GTplusplus; import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.block.machine.Machine_SuperJukebox.TileEntitySuperJukebox; -import gtPlusPlus.core.container.*; +import gtPlusPlus.core.container.Container_BackpackBase; +import gtPlusPlus.core.container.Container_CircuitProgrammer; +import gtPlusPlus.core.container.Container_DecayablesChest; +import gtPlusPlus.core.container.Container_EggBox; +import gtPlusPlus.core.container.Container_FishTrap; +import gtPlusPlus.core.container.Container_Grindle; +import gtPlusPlus.core.container.Container_ModularityTable; +import gtPlusPlus.core.container.Container_PestKiller; +import gtPlusPlus.core.container.Container_ProjectTable; +import gtPlusPlus.core.container.Container_RoundRobinator; +import gtPlusPlus.core.container.Container_SuperJukebox; +import gtPlusPlus.core.container.Container_TradeTable; +import gtPlusPlus.core.container.Container_VolumetricFlaskSetter; import gtPlusPlus.core.container.box.LunchBoxContainer; import gtPlusPlus.core.container.box.MagicBagContainer; import gtPlusPlus.core.container.box.ToolBoxContainer; @@ -16,7 +28,17 @@ import gtPlusPlus.core.gui.item.GuiBaseGrindle; import gtPlusPlus.core.gui.item.box.LunchBoxGui; import gtPlusPlus.core.gui.item.box.MagicBagGui; import gtPlusPlus.core.gui.item.box.ToolBoxGui; -import gtPlusPlus.core.gui.machine.*; +import gtPlusPlus.core.gui.machine.GUI_CircuitProgrammer; +import gtPlusPlus.core.gui.machine.GUI_DecayablesChest; +import gtPlusPlus.core.gui.machine.GUI_EggBox; +import gtPlusPlus.core.gui.machine.GUI_FishTrap; +import gtPlusPlus.core.gui.machine.GUI_ModularityTable; +import gtPlusPlus.core.gui.machine.GUI_PestKiller; +import gtPlusPlus.core.gui.machine.GUI_ProjectTable; +import gtPlusPlus.core.gui.machine.GUI_RoundRobinator; +import gtPlusPlus.core.gui.machine.GUI_SuperJukebox; +import gtPlusPlus.core.gui.machine.GUI_TradeTable; +import gtPlusPlus.core.gui.machine.GUI_VolumetricFlaskSetter; import gtPlusPlus.core.interfaces.IGuiManager; import gtPlusPlus.core.inventories.BaseInventoryBackpack; import gtPlusPlus.core.inventories.BaseInventoryGrindle; @@ -24,14 +46,16 @@ import gtPlusPlus.core.inventories.box.LunchBoxInventory; import gtPlusPlus.core.inventories.box.MagicBagInventory; import gtPlusPlus.core.inventories.box.ToolBoxInventory; import gtPlusPlus.core.tileentities.base.TileEntityBase; -import gtPlusPlus.core.tileentities.general.*; +import gtPlusPlus.core.tileentities.general.TileEntityCircuitProgrammer; +import gtPlusPlus.core.tileentities.general.TileEntityDecayablesChest; +import gtPlusPlus.core.tileentities.general.TileEntityEggBox; +import gtPlusPlus.core.tileentities.general.TileEntityFishTrap; +import gtPlusPlus.core.tileentities.general.TileEntityVolumetricFlaskSetter; import gtPlusPlus.core.tileentities.machines.TileEntityModularityTable; import gtPlusPlus.core.tileentities.machines.TileEntityPestKiller; import gtPlusPlus.core.tileentities.machines.TileEntityProjectTable; import gtPlusPlus.core.tileentities.machines.TileEntityRoundRobinator; import gtPlusPlus.core.tileentities.machines.TileEntityTradeTable; -import gtPlusPlus.core.tileentities.machines.TileEntityWorkbench; -import gtPlusPlus.core.tileentities.machines.TileEntityWorkbenchAdvanced; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ChunkCoordinates; @@ -88,11 +112,10 @@ public class GuiHandler implements IGuiHandler { if (te != null) { if (ID == GUI4) { - return new Container_Workbench(player.inventory, (TileEntityWorkbench) te); + //return new Container_Workbench(player.inventory, (TileEntityWorkbench) te); } else if (ID == GUI5) { Logger.INFO("sad"); - return new Container_WorkbenchAdvanced(player.inventory, (TileEntityWorkbenchAdvanced) te); - + //return new Container_WorkbenchAdvanced(player.inventory, (TileEntityWorkbenchAdvanced) te); } else if (ID == GUI6) { return new Container_FishTrap(player.inventory, (TileEntityFishTrap) te); } else if (ID == GUI7) { @@ -154,10 +177,10 @@ public class GuiHandler implements IGuiHandler { if (te != null) { if (ID == GUI4) { - return new GUI_Workbench(player.inventory, (TileEntityWorkbench) te); + //return new GUI_Workbench(player.inventory, (TileEntityWorkbench) te); } else if (ID == GUI5) { Logger.INFO("sad"); - return new GUI_WorkbenchAdvanced(player.inventory, (TileEntityWorkbenchAdvanced) te); + //return new GUI_WorkbenchAdvanced(player.inventory, (TileEntityWorkbenchAdvanced) te); } else if (ID == GUI6) { return new GUI_FishTrap(player.inventory, (TileEntityFishTrap) te); } else if (ID == GUI7) { diff --git a/src/main/java/gtPlusPlus/core/handler/events/GeneralTooltipEventHandler.java b/src/main/java/gtPlusPlus/core/handler/events/GeneralTooltipEventHandler.java index 10dea8a7bf..de3e958b2d 100644 --- a/src/main/java/gtPlusPlus/core/handler/events/GeneralTooltipEventHandler.java +++ b/src/main/java/gtPlusPlus/core/handler/events/GeneralTooltipEventHandler.java @@ -1,16 +1,22 @@ package gtPlusPlus.core.handler.events; +import static gregtech.api.enums.GT_Values.MOD_ID_APC; + +import advsolar.common.AdvancedSolarPanel; +import cpw.mods.fml.common.Optional; import cpw.mods.fml.common.eventhandler.SubscribeEvent; import gregtech.api.enums.ItemList; import gtPlusPlus.GTplusplus; import gtPlusPlus.GTplusplus.INIT_PHASE; import gtPlusPlus.core.block.ModBlocks; import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.lib.LoadedMods; import gtPlusPlus.core.util.math.MathUtils; import gtPlusPlus.core.util.minecraft.ItemUtils; import gtPlusPlus.core.util.sys.KeyboardUtils; import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; import net.minecraft.block.Block; +import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; import net.minecraftforge.event.entity.player.ItemTooltipEvent; @@ -80,6 +86,10 @@ public class GeneralTooltipEventHandler { event.toolTip.add("Max Capacity: "+MathUtils.formatNumbers(32000)+"L"); } + if (LoadedMods.AdvancedSolarPanel) { + molecularTransformer(event); + } + if (CORE.ConfigSwitches.enableAnimatedTurbines) { boolean shift = false; @@ -114,4 +124,11 @@ public class GeneralTooltipEventHandler { } + @Optional.Method(modid = "AdvancedSolarPanel") + public static void molecularTransformer(ItemTooltipEvent event) { + if (event.itemStack.getItem() == Item.getItemFromBlock(AdvancedSolarPanel.blockMolecularTransformer)) { + event.toolTip.add(""+EnumChatFormatting.RED+"Disabled, Use the multiblock"); + } + } + } diff --git a/src/main/java/gtPlusPlus/core/item/ModItems.java b/src/main/java/gtPlusPlus/core/item/ModItems.java index 7342c55939..8b72b9c7c9 100644 --- a/src/main/java/gtPlusPlus/core/item/ModItems.java +++ b/src/main/java/gtPlusPlus/core/item/ModItems.java @@ -310,6 +310,8 @@ public final class ModItems { public static ItemGenericToken itemGenericToken; public static Item itemControlCore; + + public static Item itemSunnariumBit; public static ItemStack itemHotTitaniumIngot; @@ -447,27 +449,8 @@ public final class ModItems { try{ - - /** - * Try generate dusts for missing rare earth materials if they don't exist - */ - - if (!ItemUtils.checkForInvalidItems(ItemUtils.getItemStackOfAmountFromOreDictNoBroken("dustGadolinium", 1))){ - ItemUtils.generateSpecialUseDusts("Gadolinium", "Gadolinium", Materials.Gadolinium.mElement.name(), Utils.rgbtoHexValue(226, 172, 9)); - } - if (!ItemUtils.checkForInvalidItems(ItemUtils.getItemStackOfAmountFromOreDictNoBroken("dustYtterbium", 1))){ - ItemUtils.generateSpecialUseDusts("Ytterbium", "Ytterbium", Materials.Ytterbium.mElement.name(), Utils.rgbtoHexValue(Materials.Yttrium.mRGBa[0]-60, Materials.Yttrium.mRGBa[1]-60, Materials.Yttrium.mRGBa[2]-60)); - } - if (!ItemUtils.checkForInvalidItems(ItemUtils.getItemStackOfAmountFromOreDictNoBroken("dustSamarium", 1))){ - ItemUtils.generateSpecialUseDusts("Samarium", "Samarium", Materials.Samarium.mElement.name(), Utils.rgbtoHexValue(161, 168, 114)); - } - if (!ItemUtils.checkForInvalidItems(ItemUtils.getItemStackOfAmountFromOreDictNoBroken("dustLanthanum", 1))){ - ItemUtils.generateSpecialUseDusts("Lanthanum", "Lanthanum", Materials.Lanthanum.mElement.name(), Utils.rgbtoHexValue(106, 127, 163)); - } - if (!ItemUtils.checkForInvalidItems(ItemUtils.getItemStackOfAmountFromOreDictNoBroken("dustGermanium", 1))){ - ItemUtils.generateSpecialUseDusts("Germanium", "Germanium", "Ge", ELEMENT.getInstance().GERMANIUM.getRgbAsHex()); - } - + + registerCustomMaterialComponents(); //Elements generate first so they can be used in compounds. //Missing Elements @@ -855,36 +838,6 @@ public final class ModItems { if (!FluidRegistry.isFluidRegistered("xpjuice")){ FluidUtils.generateFluidNoPrefix("xpjuice", "xpjuice", 0, new short[]{50, 150, 50, 100}); } - - //Just an unusual plate needed for some black magic. - if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("plateClay", 1) == null){ - itemPlateClay = new BaseItemPlate(NONMATERIAL.CLAY); - } - if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("plateDoubleClay", 1) == null){ - itemDoublePlateClay = new BaseItemPlateDouble(NONMATERIAL.CLAY); - } - - //Need this for Mutagenic Frames - if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("foilUranium235", 1) == null){ - itemFoilUranium235 = new BaseItemFoil(ELEMENT.getInstance().URANIUM235); - } - - //A small gear needed for wizardry. - if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("gearGtSmallWroughtIron", 1) == null){ - itemSmallWroughtIronGear = new BaseItemSmallGear(NONMATERIAL.WROUGHT_IRON); - } - //Krypton Processing - if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("ingotHotTitanium", 1) == null){ - itemHotTitaniumIngot = ItemUtils.getSimpleStack(new BaseItemIngot(ELEMENT.getInstance().TITANIUM, ComponentTypes.HOTINGOT)); - } - else { - itemHotTitaniumIngot = ItemUtils.getItemStackOfAmountFromOreDictNoBroken("ingotHotTitanium", 1); - } - - //Need this for Laurenium - if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("dustIndium", 1) == null){ - itemDustIndium = new BaseItemDust(ELEMENT.getInstance().INDIUM); - } //Industrial Diamonds itemExquisiteIndustrialDiamond = new CoreItem("IndustrialDiamondExquisite", "High Quality Industrial Diamond", tabMisc); @@ -894,97 +847,7 @@ public final class ModItems { ItemUtils.addItemToOreDictionary(tempStack, "gemExquisiteDiamond"); ItemUtils.addItemToOreDictionary(tempStack, "craftingExquisiteIndustrialDiamond"); - //Custom GT++ Crafting Components - - //Springs - MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.SPRING, ELEMENT.STANDALONE.CELESTIAL_TUNGSTEN); - MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.SPRING, ELEMENT.STANDALONE.WHITE_METAL); - MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.SPRING, ALLOY.NITINOL_60); - MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.SPRING, ALLOY.AQUATIC_STEEL); - MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.SPRING, ALLOY.EGLIN_STEEL); - - //Small Springs - MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.SMALLSPRING, ALLOY.MARAGING250); - MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.SMALLSPRING, ALLOY.NICHROME); - MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.SMALLSPRING, ALLOY.STABALLOY); - MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.SMALLSPRING, ALLOY.STEEL_BLACK); - MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.SMALLSPRING, ALLOY.BLACK_TITANIUM); - - //Fine Wire - MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.FINEWIRE, ELEMENT.STANDALONE.WHITE_METAL); - MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.FINEWIRE, ELEMENT.getInstance().PALLADIUM); - MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.FINEWIRE, ELEMENT.getInstance().ZIRCONIUM); - MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.FINEWIRE, ALLOY.LEAGRISIUM); - MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.FINEWIRE, ALLOY.BABBIT_ALLOY); - MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.FINEWIRE, ALLOY.KOBOLDITE); - MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.FINEWIRE, ALLOY.HG1223); - MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.FINEWIRE, ALLOY.QUANTUM); - - //Dense Plates - MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ALLOY.POTIN); - MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ALLOY.AQUATIC_STEEL); - MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ALLOY.BRONZE); - MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ALLOY.OSMIRIDIUM); - MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ALLOY.QUANTUM); - MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ALLOY.STEEL_BLACK); - MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ALLOY.STAINLESS_STEEL); - MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ALLOY.EGLIN_STEEL); - MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ALLOY.MARAGING300); - MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ALLOY.TALONITE); - MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ELEMENT.STANDALONE.HYPOGEN); - MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ELEMENT.STANDALONE.RHUGNOR); - MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ELEMENT.STANDALONE.ADVANCED_NITINOL); - MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ELEMENT.STANDALONE.ASTRAL_TITANIUM); - MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ELEMENT.STANDALONE.CELESTIAL_TUNGSTEN); - MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ELEMENT.STANDALONE.WHITE_METAL); - MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ELEMENT.STANDALONE.BLACK_METAL); - MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ELEMENT.STANDALONE.GRANITE); - - - - - //Special Sillyness - if (true) { - - if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("plateSodium", 1) == null){ - new BaseItemPlate(ELEMENT.getInstance().SODIUM); - } - - Material meatRaw = NONMATERIAL.MEAT; - // A plate of Meat. - if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("plateMeatRaw", 1) == null){ - itemPlateRawMeat = new BaseItemPlate(meatRaw); - ItemUtils.registerFuel(ItemUtils.getSimpleStack(itemPlateRawMeat), 100); - } - // A Block of Meat. - if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("blockMeatRaw", 1) == null){ - blockRawMeat = new BlockBaseModular(meatRaw, BlockTypes.STANDARD); - ItemUtils.registerFuel(ItemUtils.getSimpleStack(blockRawMeat), 900); - } - } - - - // A plate of Vanadium. - if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("plateVanadium", 1) == null){ - itemPlateVanadium = new BaseItemPlate(ELEMENT.getInstance().VANADIUM); - } - //A plate of Lithium. - if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("plateLithium", 1) == null){ - itemPlateLithium = new BaseItemPlate(ELEMENT.getInstance().LITHIUM); - } - - //A plate of Europium. - if ((ItemUtils.getItemStackOfAmountFromOreDictNoBroken("plateEuropium", 1) == null) && CORE.ConfigSwitches.enableCustom_Pipes){ - itemPlateEuropium = new BaseItemPlate(ELEMENT.getInstance().EUROPIUM); - } - if ((ItemUtils.getItemStackOfAmountFromOreDictNoBroken("plateDoubleEuropium", 1) == null) && CORE.ConfigSwitches.enableCustom_Pipes){ - itemDoublePlateEuropium = new BaseItemPlateDouble(ELEMENT.getInstance().EUROPIUM); - } - - //Tumbaga Mix (For Simple Crafting) - dustTumbagaMix = ItemUtils.generateSpecialUseDusts("MixTumbaga", "Tumbaga Mix", "Au2Cu", Utils.rgbtoHexValue(255, 150, 80))[0]; - /* * Decayable Materials */ @@ -1018,6 +881,8 @@ public final class ModItems { itemDragonJar = new ItemEntityCatcher(); itemControlCore = new ItemControlCore(); + + itemSunnariumBit = new ItemSunnariumBit(); //Chemistry new CoalTar(); @@ -1241,4 +1106,148 @@ public final class ModItems { itemGenericToken.register(3, "Hand Pump Trade Token III", 1, "Craft into a Tier III Hand pump"); itemGenericToken.register(4, "Hand Pump Trade Token IV", 1, "Craft into a Tier IV Hand pump"); } + + public static void registerCustomMaterialComponents() { + //Custom GT++ Crafting Components + + /** + * Try generate dusts for missing rare earth materials if they don't exist + */ + + if (!ItemUtils.checkForInvalidItems(ItemUtils.getItemStackOfAmountFromOreDictNoBroken("dustGadolinium", 1))){ + ItemUtils.generateSpecialUseDusts("Gadolinium", "Gadolinium", Materials.Gadolinium.mElement.name(), Utils.rgbtoHexValue(226, 172, 9)); + } + if (!ItemUtils.checkForInvalidItems(ItemUtils.getItemStackOfAmountFromOreDictNoBroken("dustYtterbium", 1))){ + ItemUtils.generateSpecialUseDusts("Ytterbium", "Ytterbium", Materials.Ytterbium.mElement.name(), Utils.rgbtoHexValue(Materials.Yttrium.mRGBa[0]-60, Materials.Yttrium.mRGBa[1]-60, Materials.Yttrium.mRGBa[2]-60)); + } + if (!ItemUtils.checkForInvalidItems(ItemUtils.getItemStackOfAmountFromOreDictNoBroken("dustSamarium", 1))){ + ItemUtils.generateSpecialUseDusts("Samarium", "Samarium", Materials.Samarium.mElement.name(), Utils.rgbtoHexValue(161, 168, 114)); + } + if (!ItemUtils.checkForInvalidItems(ItemUtils.getItemStackOfAmountFromOreDictNoBroken("dustLanthanum", 1))){ + ItemUtils.generateSpecialUseDusts("Lanthanum", "Lanthanum", Materials.Lanthanum.mElement.name(), Utils.rgbtoHexValue(106, 127, 163)); + } + if (!ItemUtils.checkForInvalidItems(ItemUtils.getItemStackOfAmountFromOreDictNoBroken("dustGermanium", 1))){ + ItemUtils.generateSpecialUseDusts("Germanium", "Germanium", "Ge", ELEMENT.getInstance().GERMANIUM.getRgbAsHex()); + } + + //Just an unusual plate needed for some black magic. + if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("plateClay", 1) == null){ + itemPlateClay = new BaseItemPlate(NONMATERIAL.CLAY); + } + if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("plateDoubleClay", 1) == null){ + itemDoublePlateClay = new BaseItemPlateDouble(NONMATERIAL.CLAY); + } + + //Need this for Mutagenic Frames + if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("foilUranium235", 1) == null){ + itemFoilUranium235 = new BaseItemFoil(ELEMENT.getInstance().URANIUM235); + } + + //A small gear needed for wizardry. + if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("gearGtSmallWroughtIron", 1) == null){ + itemSmallWroughtIronGear = new BaseItemSmallGear(NONMATERIAL.WROUGHT_IRON); + } + //Krypton Processing + if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("ingotHotTitanium", 1) == null){ + itemHotTitaniumIngot = ItemUtils.getSimpleStack(new BaseItemIngot(ELEMENT.getInstance().TITANIUM, ComponentTypes.HOTINGOT)); + } + else { + itemHotTitaniumIngot = ItemUtils.getItemStackOfAmountFromOreDictNoBroken("ingotHotTitanium", 1); + } + + //Need this for Laurenium + if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("dustIndium", 1) == null){ + itemDustIndium = new BaseItemDust(ELEMENT.getInstance().INDIUM); + } + + //Springs + MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.SPRING, ELEMENT.STANDALONE.CELESTIAL_TUNGSTEN); + MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.SPRING, ELEMENT.STANDALONE.WHITE_METAL); + MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.SPRING, ALLOY.NITINOL_60); + MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.SPRING, ALLOY.AQUATIC_STEEL); + MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.SPRING, ALLOY.EGLIN_STEEL); + + //Small Springs + MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.SMALLSPRING, ALLOY.MARAGING250); + MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.SMALLSPRING, ALLOY.NICHROME); + MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.SMALLSPRING, ALLOY.STABALLOY); + MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.SMALLSPRING, ALLOY.STEEL_BLACK); + MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.SMALLSPRING, ALLOY.BLACK_TITANIUM); + + //Fine Wire + MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.FINEWIRE, ELEMENT.STANDALONE.WHITE_METAL); + MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.FINEWIRE, ELEMENT.getInstance().PALLADIUM); + MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.FINEWIRE, ELEMENT.getInstance().ZIRCONIUM); + MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.FINEWIRE, ALLOY.LEAGRISIUM); + MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.FINEWIRE, ALLOY.BABBIT_ALLOY); + MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.FINEWIRE, ALLOY.KOBOLDITE); + MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.FINEWIRE, ALLOY.HG1223); + MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.FINEWIRE, ALLOY.QUANTUM); + + //Dense Plates + MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ALLOY.POTIN); + MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ALLOY.AQUATIC_STEEL); + MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ALLOY.BRONZE); + MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ALLOY.OSMIRIDIUM); + MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ALLOY.QUANTUM); + MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ALLOY.STEEL_BLACK); + MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ALLOY.STAINLESS_STEEL); + MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ALLOY.EGLIN_STEEL); + MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ALLOY.MARAGING300); + MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ALLOY.TALONITE); + MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ELEMENT.STANDALONE.HYPOGEN); + MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ELEMENT.STANDALONE.RHUGNOR); + MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ELEMENT.STANDALONE.ADVANCED_NITINOL); + MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ELEMENT.STANDALONE.ASTRAL_TITANIUM); + MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ELEMENT.STANDALONE.CELESTIAL_TUNGSTEN); + MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ELEMENT.STANDALONE.WHITE_METAL); + MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ELEMENT.STANDALONE.BLACK_METAL); + MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ELEMENT.STANDALONE.GRANITE); + + + + + //Special Sillyness + if (true) { + + if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("plateSodium", 1) == null){ + new BaseItemPlate(ELEMENT.getInstance().SODIUM); + } + + Material meatRaw = NONMATERIAL.MEAT; + // A plate of Meat. + if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("plateMeatRaw", 1) == null){ + itemPlateRawMeat = new BaseItemPlate(meatRaw); + ItemUtils.registerFuel(ItemUtils.getSimpleStack(itemPlateRawMeat), 100); + } + // A Block of Meat. + if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("blockMeatRaw", 1) == null){ + blockRawMeat = new BlockBaseModular(meatRaw, BlockTypes.STANDARD); + ItemUtils.registerFuel(ItemUtils.getSimpleStack(blockRawMeat), 900); + } + } + + + // A plate of Vanadium. + if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("plateVanadium", 1) == null){ + itemPlateVanadium = new BaseItemPlate(ELEMENT.getInstance().VANADIUM); + } + + //A plate of Lithium. + if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("plateLithium", 1) == null){ + itemPlateLithium = new BaseItemPlate(ELEMENT.getInstance().LITHIUM); + } + + //A plate of Europium. + if ((ItemUtils.getItemStackOfAmountFromOreDictNoBroken("plateEuropium", 1) == null) && CORE.ConfigSwitches.enableCustom_Pipes){ + itemPlateEuropium = new BaseItemPlate(ELEMENT.getInstance().EUROPIUM); + } + if ((ItemUtils.getItemStackOfAmountFromOreDictNoBroken("plateDoubleEuropium", 1) == null) && CORE.ConfigSwitches.enableCustom_Pipes){ + itemDoublePlateEuropium = new BaseItemPlateDouble(ELEMENT.getInstance().EUROPIUM); + } + + //Tumbaga Mix (For Simple Crafting) + dustTumbagaMix = ItemUtils.generateSpecialUseDusts("MixTumbaga", "Tumbaga Mix", "Au2Cu", Utils.rgbtoHexValue(255, 150, 80))[0]; + + } } diff --git a/src/main/java/gtPlusPlus/core/item/base/BaseItemComponent.java b/src/main/java/gtPlusPlus/core/item/base/BaseItemComponent.java index 1dc9996cde..9590ec2848 100644 --- a/src/main/java/gtPlusPlus/core/item/base/BaseItemComponent.java +++ b/src/main/java/gtPlusPlus/core/item/base/BaseItemComponent.java @@ -5,15 +5,19 @@ import java.util.*; import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; + +import gregtech.api.GregTech_API; import gregtech.api.enums.OrePrefixes; import gregtech.api.enums.TextureSet; import gregtech.api.util.GT_LanguageManager; +import gregtech.api.objects.GT_RenderedTexture; import gregtech.api.util.GT_OreDictUnificator; import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.creative.AddToCreativeTab; import gtPlusPlus.core.lib.CORE; import gtPlusPlus.core.lib.LoadedMods; import gtPlusPlus.core.material.Material; +import gtPlusPlus.core.material.state.MaterialState; import gtPlusPlus.core.util.Utils; import gtPlusPlus.core.util.data.StringUtils; import gtPlusPlus.core.util.math.MathUtils; @@ -118,6 +122,12 @@ public class BaseItemComponent extends Item{ aMap.put(aKey, ItemUtils.getSimpleStack(this)); Logger.MATERIALS("Registering a material component. Item: ["+componentMaterial.getUnlocalizedName()+"] Map: ["+aKey+"]"); Material.mComponentMap.put(componentMaterial.getUnlocalizedName(), aMap); + if (componentType == ComponentTypes.PLATE) { + GregTech_API.registerCover(componentMaterial.getPlate(1), new GT_RenderedTexture(componentMaterial.getTextureSet().mTextures[71], componentMaterial.getRGBA(), false), null); + } + else if (componentType == ComponentTypes.PLATEDOUBLE) { + GregTech_API.registerCover(componentMaterial.getPlateDouble(1), new GT_RenderedTexture(componentMaterial.getTextureSet().mTextures[72], componentMaterial.getRGBA(), false), null); + } return true; } else { @@ -341,38 +351,39 @@ public class BaseItemComponent extends Item{ ((Map<Integer, Short[]>) extraData).put((int) Short.MAX_VALUE, new Short[] {0}); ((Map<Integer, Short[]>) extraData).put((int) Short.MAX_VALUE-1, new Short[] {0}); short[] er = this.componentMaterial.getRGBA(); - short value = 1; + short value = 0; Short[] ht = new Short[] {er[0], er[1], er[2]}; - for (int y = 0; y < 40; y++) { - if (y < 20) { + int aMaxCycles = 200; + for (int y = 0; y < aMaxCycles; y++) { + if (y < (50)) { value = 1; } - else { + else if (y < (100)) { + value = 0; + } + else if (y < (150)) { value = -1; } - short r = (short) (ht[0] + value); - short g = (short) (ht[1] + value); - short b = (short) (ht[2] + value); + else { + value = 0; + } + short r = (short) Math.max(Math.min(255, (ht[0] + value)), 0); + short g = (short) Math.max(Math.min(255, (ht[1] + value)), 0); + short b = (short) Math.max(Math.min(255, (ht[2] + value)), 0); Short[] qq = new Short[] {(short) Math.min(255, r), (short) Math.min(255, g), (short) Math.min(255, b)}; ht = qq; ((Map<Integer, Short[]>) extraData).put(y, qq); } + ((Map<Integer, Short[]>) extraData).put((int) Short.MAX_VALUE-2, new Short[] {(short) (((Map<Integer, Short[]>) extraData).size()-1)}); } if (extraData != null) { Short aCurrentFrame = ((Map<Integer, Short[]>) extraData).get((int) Short.MAX_VALUE)[0]; - Short aSize = 40; + Short aSize = (short) (((Map<Integer, Short[]>) extraData).size() - 3); short nextFrame = (short) ((aCurrentFrame < aSize) ? (aCurrentFrame+1) : 0); Short[] aCurrentFrameRGB = ((Map<Integer, Short[]>) extraData).get(aCurrentFrame < aSize ? (int) aCurrentFrame : 0); - ((Map<Integer, Short[]>) extraData).put((int) Short.MAX_VALUE, new Short[] {nextFrame}); - return Utils.rgbtoHexValue(aCurrentFrameRGB[0], aCurrentFrameRGB[1], aCurrentFrameRGB[2]); - - - /*Short aCurrentFrame = ((Map<Integer, Short[]>) extraData).get((int) Short.MAX_VALUE)[0]; - Short[] aCurrentFrameRGB = ((Map<Integer, Short[]>) extraData).get((int) aCurrentFrame); - short nextFrame = aCurrentFrame < 40 ? aCurrentFrame++ : 0; - ((Map<Integer, Short[]>) extraData).put((int) Short.MAX_VALUE, new Short[] {nextFrame}); - return Utils.rgbtoHexValue(aCurrentFrameRGB[0], aCurrentFrameRGB[1], aCurrentFrameRGB[2]);*/ + ((Map<Integer, Short[]>) extraData).put((int) Short.MAX_VALUE, new Short[] {nextFrame}); + return Utils.rgbtoHexValue(aCurrentFrameRGB[0], aCurrentFrameRGB[1], aCurrentFrameRGB[2]); } } @@ -388,35 +399,200 @@ public class BaseItemComponent extends Item{ ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 0}); ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 0}); ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 0}); //Slowly start adding in some red to get to yellow: ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 51, 255, 0}); ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 51, 255, 0}); ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 51, 255, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 51, 255, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 51, 255, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 51, 255, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 51, 255, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 51, 255, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 51, 255, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 51, 255, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 51, 255, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 51, 255, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 51, 255, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 51, 255, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 51, 255, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 51, 255, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 51, 255, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 51, 255, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {102, 255, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {102, 255, 0}); ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {102, 255, 0}); ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {102, 255, 0}); ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {102, 255, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {102, 255, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {102, 255, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {102, 255, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {102, 255, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {102, 255, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {102, 255, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {102, 255, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {102, 255, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {102, 255, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {102, 255, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {102, 255, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {102, 255, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {102, 255, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {153, 255, 0}); ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {153, 255, 0}); ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {153, 255, 0}); ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {153, 255, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {153, 255, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {153, 255, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {153, 255, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {153, 255, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {153, 255, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {153, 255, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {153, 255, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {153, 255, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {153, 255, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {153, 255, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {153, 255, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {153, 255, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {153, 255, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {153, 255, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {204, 255, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {204, 255, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {204, 255, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {204, 255, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {204, 255, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {204, 255, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {204, 255, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {204, 255, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {204, 255, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {204, 255, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {204, 255, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {204, 255, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {204, 255, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {204, 255, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {204, 255, 0}); ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {204, 255, 0}); ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {204, 255, 0}); ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {204, 255, 0}); ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 255, 0}); ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 255, 0}); ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 255, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 255, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 255, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 255, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 255, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 255, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 255, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 255, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 255, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 255, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 255, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 255, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 255, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 255, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 255, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 255, 0}); //Then, take out the green to get to red: ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 204, 0}); ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 204, 0}); ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 204, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 204, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 204, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 204, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 204, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 204, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 204, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 204, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 204, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 204, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 204, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 204, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 204, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 204, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 204, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 204, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 153, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 153, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 153, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 153, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 153, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 153, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 153, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 153, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 153, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 153, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 153, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 153, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 153, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 153, 0}); ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 153, 0}); ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 153, 0}); ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 153, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 153, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 102, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 102, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 102, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 102, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 102, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 102, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 102, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 102, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 102, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 102, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 102, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 102, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 102, 0}); ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 102, 0}); ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 102, 0}); ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 102, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 102, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 102, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 51, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 51, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 51, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 51, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 51, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 51, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 51, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 51, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 51, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 51, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 51, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 51, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 51, 0}); ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 51, 0}); ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 51, 0}); ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 51, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 51, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 51, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 0}); ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 0}); ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 0}); ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 0}); @@ -424,15 +600,90 @@ public class BaseItemComponent extends Item{ ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 51}); ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 51}); ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 51}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 51}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 51}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 51}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 51}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 51}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 51}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 51}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 51}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 51}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 51}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 51}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 51}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 51}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 51}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 51}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 102}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 102}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 102}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 102}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 102}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 102}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 102}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 102}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 102}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 102}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 102}); ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 102}); ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 102}); ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 102}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 102}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 102}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 102}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 102}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 153}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 153}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 153}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 153}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 153}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 153}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 153}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 153}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 153}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 153}); ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 153}); ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 153}); ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 153}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 153}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 153}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 153}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 153}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 153}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 204}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 204}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 204}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 204}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 204}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 204}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 204}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 204}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 204}); ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 204}); ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 204}); ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 204}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 204}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 204}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 204}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 204}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 204}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 204}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 255}); ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 255}); ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 255}); ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 255}); @@ -440,15 +691,90 @@ public class BaseItemComponent extends Item{ ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {204, 0, 255}); ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {204, 0, 255}); ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {204, 0, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {204, 0, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {204, 0, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {204, 0, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {204, 0, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {204, 0, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {204, 0, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {204, 0, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {204, 0, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {204, 0, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {204, 0, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {204, 0, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {204, 0, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {204, 0, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {204, 0, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {204, 0, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {153, 0, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {153, 0, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {153, 0, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {153, 0, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {153, 0, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {153, 0, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {153, 0, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {153, 0, 255}); ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {153, 0, 255}); ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {153, 0, 255}); ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {153, 0, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {153, 0, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {153, 0, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {153, 0, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {153, 0, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {153, 0, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {153, 0, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {153, 0, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {102, 0, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {102, 0, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {102, 0, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {102, 0, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {102, 0, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {102, 0, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {102, 0, 255}); ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {102, 0, 255}); ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {102, 0, 255}); ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {102, 0, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {102, 0, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {102, 0, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {102, 0, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {102, 0, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {102, 0, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {102, 0, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {102, 0, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {102, 0, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 51, 0, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 51, 0, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 51, 0, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 51, 0, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 51, 0, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 51, 0, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 51, 0, 255}); ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 51, 0, 255}); ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 51, 0, 255}); ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 51, 0, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 51, 0, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 51, 0, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 51, 0, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 51, 0, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 51, 0, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 51, 0, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 51, 0, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 51, 0, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 0, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 0, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 0, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 0, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 0, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 0, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 0, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 0, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 0, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 0, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 0, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 0, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 0, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 0, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 0, 255}); ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 0, 255}); ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 0, 255}); ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 0, 255}); @@ -456,15 +782,90 @@ public class BaseItemComponent extends Item{ ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 51, 255}); ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 51, 255}); ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 51, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 51, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 51, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 51, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 51, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 51, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 51, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 51, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 51, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 51, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 51, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 51, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 51, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 51, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 51, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 51, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 102, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 102, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 102, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 102, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 102, 255}); ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 102, 255}); ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 102, 255}); ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 102, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 102, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 102, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 102, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 102, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 102, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 102, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 102, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 102, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 102, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 102, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 153, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 153, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 153, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 153, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 153, 255}); ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 153, 255}); ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 153, 255}); ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 153, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 153, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 153, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 153, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 153, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 153, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 153, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 153, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 153, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 153, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 153, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 204, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 204, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 204, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 204, 255}); ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 204, 255}); ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 204, 255}); ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 204, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 204, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 204, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 204, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 204, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 204, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 204, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 204, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 204, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 204, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 204, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 204, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 255}); ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 255}); ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 255}); ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 255}); @@ -472,16 +873,76 @@ public class BaseItemComponent extends Item{ ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 204}); ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 204}); ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 204}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 204}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 204}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 204}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 204}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 204}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 204}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 204}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 204}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 204}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 204}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 204}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 204}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 204}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 204}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 204}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 153}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 153}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 153}); ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 153}); ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 153}); ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 153}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 153}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 153}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 153}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 153}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 153}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 153}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 153}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 153}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 153}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 153}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 153}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 153}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 102}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 102}); ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 102}); ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 102}); ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 102}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 102}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 102}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 102}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 102}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 102}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 102}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 102}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 102}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 102}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 102}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 102}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 102}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 102}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 51}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 51}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 51}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 51}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 51}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 51}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 51}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 51}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 51}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 51}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 51}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 51}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 51}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 51}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 51}); ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 51}); ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 51}); ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 51}); - ((Map<Integer, Short[]>) extraData).put((int) Byte.MAX_VALUE, new Short[] {(short) (((Map<Integer, Short[]>) extraData).size()-1)}); + ((Map<Integer, Short[]>) extraData).put((int) Short.MAX_VALUE-2, new Short[] {(short) (((Map<Integer, Short[]>) extraData).size()-1)}); } diff --git a/src/main/java/gtPlusPlus/core/item/base/wire/BaseItemFineWire.java b/src/main/java/gtPlusPlus/core/item/base/wire/BaseItemFineWire.java new file mode 100644 index 0000000000..846c282af3 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/base/wire/BaseItemFineWire.java @@ -0,0 +1,12 @@ +package gtPlusPlus.core.item.base.wire; + +import gtPlusPlus.core.item.base.BaseItemComponent; +import gtPlusPlus.core.material.Material; + +public class BaseItemFineWire extends BaseItemComponent{ + + public BaseItemFineWire(final Material material) { + super(material, BaseItemComponent.ComponentTypes.FINEWIRE); + } + +} diff --git a/src/main/java/gtPlusPlus/core/item/crafting/ItemDummyResearch.java b/src/main/java/gtPlusPlus/core/item/crafting/ItemDummyResearch.java index d8ddb26675..b7bf8a7c8e 100644 --- a/src/main/java/gtPlusPlus/core/item/crafting/ItemDummyResearch.java +++ b/src/main/java/gtPlusPlus/core/item/crafting/ItemDummyResearch.java @@ -29,7 +29,8 @@ public class ItemDummyResearch extends ItemGenericToken { RESEARCH_7_ADV_METALLURGY("Advanced Metallurgy", "Advanced Material Sciences!"), RESEARCH_8_TURBINE_AUTOMATION("Turbine Automation", "You really don't want to share this with anyone!"), RESEARCH_9_CLOAKING("Cloaking Technologies", "Sneaking around like a mouse"), - RESEARCH_10_SPARGING("Gas Sparging", "Blowing gas for results"); + RESEARCH_10_SPARGING("Gas Sparging", "Blowing gas for results"), + RESEARCH_11_MOLECULAR_TRANSFORMER("Molecular Transformation", "Turning things into something better"); diff --git a/src/main/java/gtPlusPlus/core/item/general/ItemAreaClear.java b/src/main/java/gtPlusPlus/core/item/general/ItemAreaClear.java index 5be184b3db..16d0c0253b 100644 --- a/src/main/java/gtPlusPlus/core/item/general/ItemAreaClear.java +++ b/src/main/java/gtPlusPlus/core/item/general/ItemAreaClear.java @@ -30,7 +30,7 @@ public class ItemAreaClear extends CoreItem { public IIcon[] mIcon = new IIcon[1]; public ItemAreaClear() { - super("itemDebugClearing", AddToCreativeTab.tabMachines, 1, 100, new String[] {EnumChatFormatting.OBFUSCATED+"F A M C Y N A M E"}, EnumRarity.rare, + super("itemDebugClearing", AddToCreativeTab.tabMachines, 1, 100, new String[] {EnumChatFormatting.OBFUSCATED+"F A N C Y N A M E"}, EnumRarity.rare, EnumChatFormatting.BOLD, false, null); } @@ -160,16 +160,16 @@ public class ItemAreaClear extends CoreItem { int y1 = pos.yPos; int z1 = pos.zPos; - int x2 = (x1-10); + int x2 = (x1-15); int y2 = (y1-1); - int z2 = (z1-10); + int z2 = (z1-15); fillBlockColumn(world, new BlockPos(x2, y2, z2, world)); return true; } public boolean fillBlockColumn(World world, BlockPos pos){ - for (int i=0; i<21; i++){ + for (int i=0; i<30; i++){ fillBlockRow(world, new BlockPos(pos.xPos, pos.yPos, pos.zPos+i, world)); } return true; @@ -177,9 +177,10 @@ public class ItemAreaClear extends CoreItem { public boolean fillBlockRow(World world, BlockPos pos){ for (int j=0; j<2; j++){ - for (int i=0; i<21; i++){ + for (int i=0; i<30; i++){ if (world.getBlock(pos.xPos+i, pos.yPos+j, pos.zPos) != Blocks.bedrock){ - world.setBlock(pos.xPos+i, pos.yPos+j, pos.zPos, Blocks.grass); + world.setBlock(pos.xPos+i, pos.yPos+j, pos.zPos, Blocks.dirt); + world.setBlockMetadataWithNotify(pos.xPos+i, pos.yPos+j, pos.zPos, 2, 2); } } } diff --git a/src/main/java/gtPlusPlus/core/item/general/ItemBlueprint.java b/src/main/java/gtPlusPlus/core/item/general/ItemBlueprint.java index eded4e2585..5df17979a9 100644 --- a/src/main/java/gtPlusPlus/core/item/general/ItemBlueprint.java +++ b/src/main/java/gtPlusPlus/core/item/general/ItemBlueprint.java @@ -71,7 +71,7 @@ public class ItemBlueprint extends Item implements IItemBlueprint{ @Override public String getItemStackDisplayName(final ItemStack p_77653_1_) { - return "Blueprint [I am useless]"; + return "Blueprint"; } @Override @@ -103,7 +103,7 @@ public class ItemBlueprint extends Item implements IItemBlueprint{ ItemStack[] blueprint = new ItemStack[9]; if (itemStack.hasTagCompound()){ final NBTTagCompound nbt = itemStack.getTagCompound(); - final NBTTagList list = nbt.getTagList("Items", 10); + final NBTTagList list = nbt.getTagList("Inventory", 10); blueprint = new ItemStack[INV_SIZE]; for(int i = 0;i<list.tagCount();i++) { @@ -135,7 +135,7 @@ public class ItemBlueprint extends Item implements IItemBlueprint{ list.appendTag(data); } } - nbt.setTag("Items", list); + nbt.setTag("Inventory", list); itemStack.setTagCompound(nbt); return itemStack; } diff --git a/src/main/java/gtPlusPlus/core/item/general/ItemSunnariumBit.java b/src/main/java/gtPlusPlus/core/item/general/ItemSunnariumBit.java new file mode 100644 index 0000000000..0b61a06934 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/general/ItemSunnariumBit.java @@ -0,0 +1,16 @@ +package gtPlusPlus.core.item.general; + +import gtPlusPlus.core.creative.AddToCreativeTab; +import gtPlusPlus.core.item.base.CoreItem; +import gtPlusPlus.core.lib.CORE; +import net.minecraft.item.EnumRarity; +import net.minecraft.util.EnumChatFormatting; + +public class ItemSunnariumBit extends CoreItem { + + public ItemSunnariumBit() { + super("SunnariumBit", "Sunnarium Bit", AddToCreativeTab.tabMisc, 64, 0, new String[] {}, EnumRarity.uncommon, EnumChatFormatting.GOLD, false, null); + this.setTextureName(CORE.MODID+":"+"itemSunnariumBit"); + } + +} diff --git a/src/main/java/gtPlusPlus/core/lib/CORE.java b/src/main/java/gtPlusPlus/core/lib/CORE.java index 9ae37ff0a2..076616f569 100644 --- a/src/main/java/gtPlusPlus/core/lib/CORE.java +++ b/src/main/java/gtPlusPlus/core/lib/CORE.java @@ -277,6 +277,7 @@ public class CORE { public static int pollutionPerSecondMultiIndustrialMultiMachine_ModeMisc = 600; public static int pollutionPerSecondMultiIndustrialPlatePress_ModeForming = 240; public static int pollutionPerSecondMultiIndustrialPlatePress_ModeBending = 480; + public static int pollutionPerSecondMultiIndustrialForgeHammer = 250; public static int pollutionPerSecondMultiIndustrialSifter = 40; public static int pollutionPerSecondMultiIndustrialThermalCentrifuge = 1000; public static int pollutionPerSecondMultiIndustrialVacuumFreezer = 500; @@ -300,6 +301,7 @@ public class CORE { public static int pollutionPerSecondMultiFrothFlotationCell = 0; public static int pollutionPerSecondMultiAutoCrafter = 500; public static int pollutionPerSecondMultiThermalBoiler = 700; + public static int pollutionPerSecondMultiMolecularTransformer = 1000; public static int pollutionPerSecondMultiAlgaePond = 0; public static int pollutionPerSecondMultiIndustrialRockBreaker = 100; public static int pollutionPerSecondMultiIndustrialChisel = 50; @@ -334,28 +336,33 @@ public class CORE { } public static final void crash(String aReason) { - Logger.INFO("=========================================================="); - Logger.INFO("[GT++ CRASH]"); - Logger.INFO("=========================================================="); - Logger.INFO("Oooops..."); - Logger.INFO("This should only happy in a development environment or when something really bad happens."); - Logger.INFO("Reason: "+aReason); - Logger.INFO("=========================================================="); - Logger.INFO("Called from: "+ReflectionUtils.getMethodName(1)); - Logger.INFO(ReflectionUtils.getMethodName(2)); - Logger.INFO(ReflectionUtils.getMethodName(3)); - Logger.INFO(ReflectionUtils.getMethodName(4)); - Logger.INFO(ReflectionUtils.getMethodName(5)); - Logger.INFO(ReflectionUtils.getMethodName(6)); - Logger.INFO(ReflectionUtils.getMethodName(7)); - Logger.INFO(ReflectionUtils.getMethodName(8)); - Logger.INFO(ReflectionUtils.getMethodName(9)); - Logger.INFO(ReflectionUtils.getMethodName(10)); - Logger.INFO(ReflectionUtils.getMethodName(11)); - Logger.INFO(ReflectionUtils.getMethodName(12)); - Logger.INFO(ReflectionUtils.getMethodName(13)); - Logger.INFO(ReflectionUtils.getMethodName(14)); - Logger.INFO(ReflectionUtils.getMethodName(15)); + try { + Logger.INFO("=========================================================="); + Logger.INFO("[GT++ CRASH]"); + Logger.INFO("=========================================================="); + Logger.INFO("Oooops..."); + Logger.INFO("This should only happy in a development environment or when something really bad happens."); + Logger.INFO("Reason: "+aReason); + Logger.INFO("=========================================================="); + Logger.INFO("Called from: "+ReflectionUtils.getMethodName(1)); + Logger.INFO(ReflectionUtils.getMethodName(2)); + Logger.INFO(ReflectionUtils.getMethodName(3)); + Logger.INFO(ReflectionUtils.getMethodName(4)); + Logger.INFO(ReflectionUtils.getMethodName(5)); + Logger.INFO(ReflectionUtils.getMethodName(6)); + Logger.INFO(ReflectionUtils.getMethodName(7)); + Logger.INFO(ReflectionUtils.getMethodName(8)); + Logger.INFO(ReflectionUtils.getMethodName(9)); + Logger.INFO(ReflectionUtils.getMethodName(10)); + Logger.INFO(ReflectionUtils.getMethodName(11)); + Logger.INFO(ReflectionUtils.getMethodName(12)); + Logger.INFO(ReflectionUtils.getMethodName(13)); + Logger.INFO(ReflectionUtils.getMethodName(14)); + Logger.INFO(ReflectionUtils.getMethodName(15)); + } + catch (Throwable t) { + t.printStackTrace(); + } FMLCommonHandler.instance().exitJava(0, true); } diff --git a/src/main/java/gtPlusPlus/core/lib/LoadedMods.java b/src/main/java/gtPlusPlus/core/lib/LoadedMods.java index 4f7a10be78..9f5882c5ea 100644 --- a/src/main/java/gtPlusPlus/core/lib/LoadedMods.java +++ b/src/main/java/gtPlusPlus/core/lib/LoadedMods.java @@ -24,6 +24,7 @@ public class LoadedMods { public static boolean Simply_Jetpacks = false; public static boolean RFTools = false; public static boolean Thaumcraft = false; + public static boolean ThaumicBases = false; public static boolean Baubles = false; public static boolean Extra_Utils = false; public static boolean PneumaticCraft = false; @@ -41,6 +42,7 @@ public class LoadedMods { public static boolean MiscUtils = true; //Dummy For MetaData Lookups in MT Wrapper public static boolean ThermalFoundation = false; public static boolean IHL = false; + public static boolean AdvancedSolarPanel = false; public static boolean OpenComputers = false; //OpenComputers public static boolean OpenBlocks = false; public static boolean Computronics = false; //computronics @@ -61,8 +63,8 @@ public class LoadedMods { public static boolean Reliquary = false; public static boolean SpiceOfLife = false; public static boolean RemoteIO = false; - - + public static boolean BartWorks = false; + public static boolean GoodGenerator = false; private static int totalMods; @SuppressWarnings("deprecation") @@ -118,6 +120,21 @@ public class LoadedMods { Logger.INFO("Components enabled for: Tinkers Construct"); totalMods++; } + if (isModLoaded("AdvancedSolarPanel")){ + AdvancedSolarPanel = true; + Logger.INFO("Components enabled for: Advanced Solar Panels"); + totalMods++; + } + if (isModLoaded("GoodGenerator")) { + GoodGenerator = true; + Logger.INFO("Components enabled for: GoodGenerator"); + totalMods++; + } + if (isModLoaded("bartworks")) { + BartWorks = true; + Logger.INFO("Components enabled for: BartWorks"); + totalMods++; + } if (isModLoaded("BuildCraft")){ BuildCraft = true; Logger.INFO("Components enabled for: BuildCraft"); @@ -168,6 +185,11 @@ public class LoadedMods { Logger.INFO("Components enabled for: Thaumcraft"); totalMods++; } + if (isModLoaded("thaumicbases")){ + ThaumicBases = true; + Logger.INFO("Components enabled for: Thaumic Bases"); + totalMods++; + } if (isModLoaded("BiomesOPlenty")){ BiomesOPlenty = true; Logger.INFO("Components enabled for: BiomesOPlenty"); diff --git a/src/main/java/gtPlusPlus/core/material/ALLOY.java b/src/main/java/gtPlusPlus/core/material/ALLOY.java index fd7547970c..ba0963397c 100644 --- a/src/main/java/gtPlusPlus/core/material/ALLOY.java +++ b/src/main/java/gtPlusPlus/core/material/ALLOY.java @@ -22,10 +22,10 @@ public final class ALLOY { "Energy Crystal", //Material Name MaterialState.SOLID, //State new short[]{228, 255, 0, 0}, //Material Colour - 5660, //Melting Point in C - 7735, //Boiling Point in C - 150, //Protons - 80, //Neutrons + 4660, //Melting Point in C + 5735, //Boiling Point in C + 90, //Protons + 40, //Neutrons true, //Uses Blast furnace? "⬟ ⯂ ⬢ ⬣ ⯃ ⯄", //Material Stacks with Percentage of required elements. diff --git a/src/main/java/gtPlusPlus/core/material/MISC_MATERIALS.java b/src/main/java/gtPlusPlus/core/material/MISC_MATERIALS.java index 2740f49d71..31ad5e466b 100644 --- a/src/main/java/gtPlusPlus/core/material/MISC_MATERIALS.java +++ b/src/main/java/gtPlusPlus/core/material/MISC_MATERIALS.java @@ -15,11 +15,82 @@ public final class MISC_MATERIALS { */ public static void run() { + MaterialUtils.generateSpecialDustAndAssignToAMaterial(POTASSIUM_NITRATE, false); + MaterialUtils.generateSpecialDustAndAssignToAMaterial(SODIUM_NITRATE, false); MaterialUtils.generateSpecialDustAndAssignToAMaterial(STRONTIUM_OXIDE, false); MaterialUtils.generateSpecialDustAndAssignToAMaterial(STRONTIUM_HYDROXIDE, false); WATER.registerComponentForMaterial(FluidUtils.getWater(1000)); } + public static final Material POTASSIUM_NITRATE = new Material( + "Potassium Nitrate", + MaterialState.SOLID, //State + null, + null, + -1, + -1, + -1, + -1, + false, + "KNO3", + 0, + false, + new MaterialStack[]{ + new MaterialStack(ELEMENT.getInstance().POTASSIUM, 1), + new MaterialStack(ELEMENT.getInstance().NITROGEN, 1), + new MaterialStack(ELEMENT.getInstance().OXYGEN, 3) + }); + public static final Material SODIUM_NITRATE = new Material( + "Sodium Nitrate", + MaterialState.SOLID, //State + null, + null, + -1, + -1, + -1, + -1, + false, + "NaNO3", + 0, + false, + new MaterialStack[]{ + new MaterialStack(ELEMENT.getInstance().SODIUM, 1), + new MaterialStack(ELEMENT.getInstance().NITROGEN, 1), + new MaterialStack(ELEMENT.getInstance().OXYGEN, 3) + }); + + public static final Material SOLAR_SALT_COLD = new Material( + "Solar Salt (Cold)", + MaterialState.PURE_LIQUID, //State + null, //Material Colour + -1, //Melting Point in C + -1, //Boiling Point in C + -1, //Protons + -1, + false, //Uses Blast furnace? + //Material Stacks with Percentage of required elements. + new MaterialStack[]{ + new MaterialStack(POTASSIUM_NITRATE, 4), + new MaterialStack(SODIUM_NITRATE, 6) + }); + + public static final Material SOLAR_SALT_HOT = new Material( + "Solar Salt (Hot)", + MaterialState.PURE_LIQUID, //State + new short[] {200, 25, 25}, //Material Colour + 1200, //Melting Point in C + 3300, //Boiling Point in C + -1, //Protons + -1, + false, //Uses Blast furnace? + //Material Stacks with Percentage of required elements. + new MaterialStack[]{ + new MaterialStack(POTASSIUM_NITRATE, 4), + new MaterialStack(SODIUM_NITRATE, 6) + }); + + + public static final Material STRONTIUM_OXIDE = new Material( "Strontium Oxide", MaterialState.SOLID, diff --git a/src/main/java/gtPlusPlus/core/material/Material.java b/src/main/java/gtPlusPlus/core/material/Material.java index 0e9eb9b376..64b705629e 100644 --- a/src/main/java/gtPlusPlus/core/material/Material.java +++ b/src/main/java/gtPlusPlus/core/material/Material.java @@ -25,6 +25,7 @@ import gtPlusPlus.core.util.minecraft.FluidUtils; import gtPlusPlus.core.util.minecraft.ItemUtils; import gtPlusPlus.core.util.minecraft.MaterialUtils; import gtPlusPlus.xmod.gregtech.api.enums.CustomOrePrefix; +import gtPlusPlus.xmod.gregtech.registration.gregtech.GregtechConduits; import gtPlusPlus.xmod.thaumcraft.objects.wrapper.aspect.TC_Aspect_Wrapper; import gtPlusPlus.xmod.tinkers.material.BaseTinkersMaterial; import net.minecraft.block.Block; @@ -50,7 +51,7 @@ public class Material { private TextureSet textureSet; private Fluid mFluid; - private Fluid vPlasma; + private Fluid mPlasma; private boolean vGenerateCells; @@ -493,11 +494,14 @@ public class Material { mFluid = generateFluid(); } } - this.vPlasma = this.generatePlasma(); + // Don't generate plasma for composites + if (this.getComposites().isEmpty()) { + this.mPlasma = this.generatePlasma(); + } } else { this.mFluid = null; - this.vPlasma = null; + this.mPlasma = null; } String ratio = ""; if (this.vSmallestRatio != null) { @@ -869,6 +873,14 @@ public class Material { public final ItemStack getScrew(final int stacksize){ return getComponentByPrefix(OrePrefixes.screw, stacksize); } + + public final ItemStack getFineWire(final int stacksize){ + return getComponentByPrefix(OrePrefixes.wireFine, stacksize); + } + + public final ItemStack getFoil(final int stacksize){ + return getComponentByPrefix(OrePrefixes.foil, stacksize); + } public final ItemStack getRing(final int stacksize){ return getComponentByPrefix(OrePrefixes.ring, stacksize); @@ -893,6 +905,59 @@ public class Material { public final ItemStack getNugget(final int stacksize){ return getComponentByPrefix(OrePrefixes.nugget, stacksize); } + + public final ItemStack getWire01(final int stacksize) { + return getComponentByPrefix(OrePrefixes.wireGt01, stacksize); + } + + public final ItemStack getWire02(final int stacksize) { + return getComponentByPrefix(OrePrefixes.wireGt02, stacksize); + } + + public final ItemStack getWire04(final int stacksize) { + return getComponentByPrefix(OrePrefixes.wireGt04, stacksize); + } + + public final ItemStack getWire08(final int stacksize) { + return getComponentByPrefix(OrePrefixes.wireGt08, stacksize); + } + + public final ItemStack getWire12(final int stacksize) { + return getComponentByPrefix(OrePrefixes.wireGt12, stacksize); + } + + public final ItemStack getWire16(final int stacksize) { + return getComponentByPrefix(OrePrefixes.wireGt16, stacksize); + } + + public final ItemStack getCable01(final int stacksize) { + return getComponentByPrefix(OrePrefixes.cableGt01, stacksize); + } + + public final ItemStack getCable02(final int stacksize) { + return getComponentByPrefix(OrePrefixes.cableGt02, stacksize); + } + + public final ItemStack getCable04(final int stacksize) { + return getComponentByPrefix(OrePrefixes.cableGt04, stacksize); + } + + public final ItemStack getCable08(final int stacksize) { + return getComponentByPrefix(OrePrefixes.cableGt08, stacksize); + } + + public final ItemStack getCable12(final int stacksize) { + return getComponentByPrefix(OrePrefixes.cableGt12, stacksize); + } + + public final ItemStack getCable16(final int stacksize) { + if (GregtechConduits.cableGt16 != null) { + return getComponentByPrefix(GregtechConduits.cableGt16, stacksize); + } + else { + return ItemUtils.getErrorStack(stacksize); + } + } /** * Ore Components @@ -1281,6 +1346,10 @@ public class Material { public Fluid getFluid() { return mFluid; } + + public Fluid getPlasma() { + return mPlasma; + } final public FluidStack getFluidStack(final int fluidAmount) { if (this.mFluid == null){ diff --git a/src/main/java/gtPlusPlus/core/material/MaterialGenerator.java b/src/main/java/gtPlusPlus/core/material/MaterialGenerator.java index d1ea784b81..aac3bc3e92 100644 --- a/src/main/java/gtPlusPlus/core/material/MaterialGenerator.java +++ b/src/main/java/gtPlusPlus/core/material/MaterialGenerator.java @@ -67,26 +67,6 @@ public class MaterialGenerator { private static volatile Item temp; @SuppressWarnings("unused") private static volatile Block tempBlock; - - - public static boolean addFluidExtractionRecipe(ItemStack aEmpty, ItemStack aRemains, FluidStack aFluid) { - return addFluidExtractionRecipe(aEmpty, aRemains, aFluid, null, null); - } - - /** - * Called Reflectively from CORE.RA.addFluidExtractionRecipe - * @param aSpecial - * @return - */ - public static boolean addFluidExtractionRecipe(ItemStack aEmpty, ItemStack aRemains, FluidStack aFluid, Integer aDuration, Integer aEU) { - RecipeGen_FluidCanning g = new RecipeGen_FluidCanning(true, aEmpty, aRemains, aFluid, aDuration, aEU); - if (g != null && g.valid()) { - //Logger.INFO("[FIND] Adding Extraction recipe for "+ItemUtils.getItemName(aEmpty)+", "+ItemUtils.getItemName(aRemains)+", "+ItemUtils.getFluidName(aFluid)); - return true; - } - Logger.INFO("[ERROR] FAILED adding Extraction recipe for "+ItemUtils.getItemName(aEmpty)+", "+ItemUtils.getItemName(aRemains)+", "+ItemUtils.getFluidName(aFluid)); - return false; - } public static boolean addFluidCannerRecipe(ItemStack aEmpty, ItemStack aFullContainer, FluidStack aFluidIn, FluidStack rFluidOut) { diff --git a/src/main/java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java b/src/main/java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java index 3cc48ba345..808c977ef0 100644 --- a/src/main/java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java +++ b/src/main/java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java @@ -4,15 +4,13 @@ import static gtPlusPlus.core.lib.CORE.GTNH; import java.util.ArrayList; +import advsolar.common.AdvancedSolarPanel; import cpw.mods.fml.common.Loader; import gregtech.api.enums.GT_Values; import gregtech.api.enums.ItemList; import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; -import gregtech.api.util.GT_ModHandler; -import gregtech.api.util.GT_OreDictUnificator; -import gregtech.api.util.HotFuel; -import gregtech.api.util.ThermalFuel; +import gregtech.api.util.*; import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.block.ModBlocks; import gtPlusPlus.core.item.ModItems; @@ -94,6 +92,7 @@ public class RECIPES_GREGTECH { chemplantRecipes(); packagerRecipes(); alloySmelterRecipes(); + implosionRecipes(); /** @@ -102,14 +101,9 @@ public class RECIPES_GREGTECH { RECIPES_SeleniumProcessing.init(); RECIPES_RareEarthProcessing.init(); - - - - - addFuels(); } - + private static void alloySmelterRecipes() { //Wood's Glass Laser Lens @@ -119,12 +113,23 @@ public class RECIPES_GREGTECH { GregtechItemList.Laser_Lens_WoodsGlass.get(1), 20 * 300, MaterialUtils.getVoltageForTier(3)); - + } + private static void packagerRecipes() { - - + + + } + + private static void implosionRecipes() { + + GT_Values.RA.addImplosionRecipe( + ItemUtils.getSimpleStack(ModItems.itemSunnariumBit, 9), + 16, + ItemUtils.getSimpleStack(AdvancedSolarPanel.itemSunnariumPart, 1), + GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Glowstone, 8)); + } private static void chemplantRecipes() { @@ -479,21 +484,21 @@ public class RECIPES_GREGTECH { //Hypogen Creation GT_Values.RA.addFusionReactorRecipe( - Materials.Neutronium.getMolten(128), - ALLOY.QUANTUM.getFluidStack(256), - ELEMENT.STANDALONE.HYPOGEN.getFluidStack(4), + ELEMENT.STANDALONE.DRAGON_METAL.getFluidStack(144), + ELEMENT.STANDALONE.RHUGNOR.getFluidStack(288), + ELEMENT.STANDALONE.HYPOGEN.getFluidStack(36), 2048 * 4, - (int) MaterialUtils.getVoltageForTier(9), + MaterialUtils.getVoltageForTier(9), 600000000 * 2); //Rhugnor GT_Values.RA.addFusionReactorRecipe( - GenericChem.TEFLON.getFluidStack(64), - ALLOY.PIKYONIUM.getFluidStack(128), - ELEMENT.STANDALONE.RHUGNOR.getFluidStack(8), - 2048 * 4, - (int) MaterialUtils.getVoltageForTier(7), - 150000000 * 2); + MaterialUtils.getMaterial("Infinity", "Neutronium").getMolten(144), + ALLOY.QUANTUM.getFluidStack(288), + ELEMENT.STANDALONE.RHUGNOR.getFluidStack(144), + 512, + MaterialUtils.getVoltageForTier(8), + 2000000000); } @@ -884,7 +889,12 @@ public class RECIPES_GREGTECH { 20 * 60 * 5, MaterialUtils.getVoltageForTier(5)); - + GT_Values.RA.addLaserEngraverRecipe( + GregtechItemList.Laser_Lens_WoodsGlass.get(0), + ItemUtils.simpleMetaStack(ModBlocks.blockCompressedObsidian, 8, 1), + ItemUtils.getSimpleStack(ModItems.itemSunnariumBit, 3), + 20 * 60 * 5, + MaterialUtils.getVoltageForTier(3)); } @@ -1690,7 +1700,7 @@ public class RECIPES_GREGTECH { GT_Values.RA.addFuel(ItemUtils.simpleMetaStack("EnderIO:bucketHootch", 0, 1), null, 36, 0); } - HotFuel.addNewHotFuel(GT_ModHandler.getLava(83), GT_Values.NF, + HotFuel.addNewHotFuel(FluidUtils.getLava(83), FluidUtils.getPahoehoeLava(83), new ItemStack[] { ItemUtils.getItemStackOfAmountFromOreDict("nuggetCopper", 1), ItemUtils.getItemStackOfAmountFromOreDict("nuggetTin", 1), ItemUtils.getItemStackOfAmountFromOreDict("nuggetGold", 1), @@ -1700,7 +1710,7 @@ public class RECIPES_GREGTECH { ItemUtils.getSimpleStack(Blocks.obsidian) }, new int[] { 2000, 1000, 250, 250, 250, 250, 500 }, 0); - HotFuel.addNewHotFuel(FluidUtils.getFluidStack("ic2pahoehoelava", 83), GT_Values.NF, + HotFuel.addNewHotFuel(FluidUtils.getPahoehoeLava(83), GT_Values.NF, new ItemStack[] { ItemUtils.getItemStackOfAmountFromOreDict("nuggetBronze", 1), ItemUtils.getItemStackOfAmountFromOreDict("nuggetElectrum", 1), @@ -1709,6 +1719,12 @@ public class RECIPES_GREGTECH { ItemUtils.getSimpleStack(Blocks.obsidian) }, new int[] { 750, 250, 250, 250, 1850 }, 0); + HotFuel.addNewHotFuel( + MISC_MATERIALS.SOLAR_SALT_HOT.getFluidStack(1000), + MISC_MATERIALS.SOLAR_SALT_COLD.getFluidStack(1000), + FluidUtils.getSuperHeatedSteam(10000), + 0); + /* * HotFuel.addNewHotFuel( FluidUtils.getFluidStack("ic2hotcoolant", * 100), GT_Values.NF, new ItemStack[]{}, new int[]{}, 0); @@ -1743,7 +1759,22 @@ public class RECIPES_GREGTECH { } private static void centrifugeRecipes() { - + + GT_Values.RA.addCentrifugeRecipe( + CI.getNumberedAdvancedCircuit(2), + MISC_MATERIALS.SOLAR_SALT_COLD.getCell(10), + null, + null, + MISC_MATERIALS.SODIUM_NITRATE.getDust(6), + MISC_MATERIALS.POTASSIUM_NITRATE.getDust(4), + CI.emptyCells(10), + null, + null, + null, + null, + 20 * 30, + 120); + } private static void mixerRecipes() { @@ -1758,7 +1789,20 @@ public class RECIPES_GREGTECH { null, 600, 60); - + + GT_Values.RA.addMixerRecipe( + CI.getNumberedAdvancedCircuit(2), + CI.emptyCells(10), + MISC_MATERIALS.SODIUM_NITRATE.getDust(6), + MISC_MATERIALS.POTASSIUM_NITRATE.getDust(4), + null, + null, + MISC_MATERIALS.SOLAR_SALT_COLD.getCell(10), + 20 * 10, + 120); + + + } private static void chemicalReactorRecipes() { @@ -1786,7 +1830,26 @@ public class RECIPES_GREGTECH { FluidUtils.getFluidStack("sulfuricacid", 4000), FluidUtils.getFluidStack("sulfuricapatite", 8000), ItemUtils.getItemStackOfAmountFromOreDict("dustSmallSulfur", 8), - 20 * 20); + 20 * 20); + + GT_Values.RA.addChemicalRecipe( + Materials.Potassium.getDust(1), + CI.getNumberedAdvancedCircuit(1), + Materials.NitricAcid.getFluid(1000), + GT_Values.NF, + MISC_MATERIALS.POTASSIUM_NITRATE.getDust(1), + 100, + 30); + + GT_Values.RA.addChemicalRecipe( + ItemUtils.getSimpleStack(AgriculturalChem.mSodiumCarbonate, 1), + CI.getNumberedAdvancedCircuit(1), + Materials.NitricAcid.getFluid(1000), + GT_Values.NF, + MISC_MATERIALS.SODIUM_NITRATE.getDust(1), + 100, + 30); + } diff --git a/src/main/java/gtPlusPlus/core/recipe/RECIPES_General.java b/src/main/java/gtPlusPlus/core/recipe/RECIPES_General.java index 0482921c9a..25c5ee5f9e 100644 --- a/src/main/java/gtPlusPlus/core/recipe/RECIPES_General.java +++ b/src/main/java/gtPlusPlus/core/recipe/RECIPES_General.java @@ -17,6 +17,7 @@ import gtPlusPlus.core.lib.CORE; import gtPlusPlus.core.lib.LoadedMods; import gtPlusPlus.core.material.ALLOY; import gtPlusPlus.core.material.ELEMENT; +import gtPlusPlus.core.material.MISC_MATERIALS; import gtPlusPlus.core.recipe.common.CI; import gtPlusPlus.core.util.minecraft.*; import gtPlusPlus.core.util.minecraft.gregtech.PollutionUtils; @@ -28,6 +29,7 @@ import gtPlusPlus.xmod.gregtech.common.helpers.VolumetricFlaskHelper; import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; +import net.minecraftforge.oredict.OreDictionary; public class RECIPES_General { @@ -40,8 +42,10 @@ public class RECIPES_General { static ItemStack OUTPUT_Blueprint; static ItemStack RECIPE_CraftingTable; static String RECIPE_BronzePlate = "plateBronze"; + static String RECIPE_StainlessPlate = "plateStainlessSteel"; static ItemStack RECIPE_BasicCasingIC2; static ItemStack OUTPUT_Workbench_Bronze; + static ItemStack OUTPUT_Workbench_Advanced; static ItemStack RECIPE_HydrogenDust; public static void loadRecipes(){ @@ -53,8 +57,9 @@ public class RECIPES_General { RECIPE_CraftingTable = ItemUtils.getSimpleStack(Blocks.crafting_table); RECIPE_HydrogenDust = ItemUtils.getSimpleStack(ModItems.itemHydrogenBlob); RECIPE_BasicCasingIC2 = ItemUtils.getItemStackFromFQRN("IC2:blockMachine", 1); - OUTPUT_Workbench_Bronze = ItemUtils.getSimpleStack(ModBlocks.blockWorkbench); - OUTPUT_Blueprint = ItemUtils.getSimpleStack(ModItems.itemBlueprintBase); + OUTPUT_Workbench_Bronze = GregtechItemList.GT4_Workbench_Bronze.get(1); + OUTPUT_Workbench_Advanced = GregtechItemList.GT4_Workbench_Advanced.get(1); + OUTPUT_Blueprint = ItemUtils.getSimpleStack(ModItems.itemBlueprintBase, 2); run(); addCompressedObsidian(); migratedRecipes(); @@ -63,18 +68,24 @@ public class RECIPES_General { private static void run() { //Workbench Blueprint - /*RecipeUtils.addShapedRecipe( + RecipeUtils.addShapedRecipe( RECIPE_Paper, RECIPE_LapisDust, NULL, RECIPE_Paper, RECIPE_LapisDust, NULL, RECIPE_LapisDust, RECIPE_LapisDust, NULL, - OUTPUT_Blueprint);*/ + OUTPUT_Blueprint); //Bronze Workbench - /*RecipeUtils.addShapedRecipe( + RecipeUtils.addShapedRecipe( RECIPE_BronzePlate, RECIPE_CraftingTable, RECIPE_BronzePlate, RECIPE_BronzePlate, RECIPE_BasicCasingIC2, RECIPE_BronzePlate, - RECIPE_BronzePlate, RECIPE_BronzePlate, RECIPE_BronzePlate, - OUTPUT_Workbench_Bronze);*/ + RECIPE_BronzePlate, CI.getTieredCircuitOreDictName(0), RECIPE_BronzePlate, + OUTPUT_Workbench_Bronze); + + RecipeUtils.addShapedRecipe( + RECIPE_StainlessPlate, CI.getTieredCircuitOreDictName(3), RECIPE_StainlessPlate, + RECIPE_StainlessPlate, OUTPUT_Workbench_Bronze, RECIPE_StainlessPlate, + RECIPE_StainlessPlate, CI.getTieredCircuitOreDictName(3), RECIPE_StainlessPlate, + OUTPUT_Workbench_Advanced); //Generates recipes for the Dull shard when TC is not installed. if (!LoadedMods.Thaumcraft) { @@ -110,6 +121,25 @@ public class RECIPES_General { } + if (OreDictionary.doesOreNameExist("dustPotassiumNitrade")) { + ItemStack aDustKNO3 = ItemUtils.getItemStackOfAmountFromOreDict("dustPotassiumNitrade", 1); + ItemStack aDustGtppKNO3 = MISC_MATERIALS.POTASSIUM_NITRATE.getDust(1); + if (RecipeUtils.addShapedRecipe( + null, null, null, + null, "dustPotassiumNitrade", null, + null, null, null, + ItemUtils.getSimpleStack(aDustGtppKNO3, 1))) { + Logger.INFO("Add conversion recipe (GT Potassium Nitrade -> GT++ Potassium Nitrate)"); + } + if (RecipeUtils.addShapedRecipe( + null, null, null, + null, "dustPotassiumNitrate", null, + null, null, null, + ItemUtils.getSimpleStack(aDustKNO3, 1))) { + Logger.INFO("Add conversion recipe (GT++ Potassium Nitrate -> GT Potassium Nitrade)"); + } + } + //Rainforest oak Sapling if (RecipeUtils.addShapedRecipe( "stickWood", "stickWood", "stickWood", @@ -366,11 +396,12 @@ public class RECIPES_General { private static boolean addCompressedObsidian(){ //Invert Obsidian + ItemStack aInvertedObsidian = ItemUtils.simpleMetaStack(ModBlocks.blockCompressedObsidian, 5, 1); if (RecipeUtils.addShapedRecipe( getSimpleStack(Items.redstone), getSimpleStack(Items.glowstone_dust), getSimpleStack(Items.redstone), getSimpleStack(Items.glowstone_dust), ItemUtils.simpleMetaStack(ModBlocks.blockCompressedObsidian, 1, 1), getSimpleStack(Items.glowstone_dust), getSimpleStack(Items.redstone), getSimpleStack(Items.glowstone_dust), getSimpleStack(Items.redstone), - ItemUtils.simpleMetaStack(ModBlocks.blockCompressedObsidian, 5, 1))){ + aInvertedObsidian)){ Logger.INFO("Added a recipe for Inverted Obsidian."); } @@ -379,6 +410,12 @@ public class RECIPES_General { for (int r=0;r<5;r++){ mItems[r+1] = ItemUtils.simpleMetaStack(ModBlocks.blockCompressedObsidian, r, 1); } + + final ItemStack[] mItems2 = new ItemStack[6]; + mItems2[0] = ItemUtils.getSimpleStack(Blocks.glowstone); + for (int r=0;r<5;r++){ + mItems2[r+1] = ItemUtils.simpleMetaStack(ModBlocks.blockCompressedObsidian, 6+r, 1); + } //Compressed Obsidian 1-5 for (int r=0;r<5;r++){ @@ -399,6 +436,26 @@ public class RECIPES_General { } } + + //Compressed Glowstone 1-5 + for (int r=0;r<5;r++){ + + final ItemStack input = mItems2[r]; + final ItemStack output = mItems2[r+1]; + + if (RecipeUtils.addShapedRecipe( + input, input, input, + input, r == 2 ? aInvertedObsidian : input, input, + input, input, input, + output)){ + Logger.INFO("Added a recipe for Compressed Glowstone ["+r+"]"); + } + + if (RecipeUtils.addShapelessGregtechRecipe(new ItemStack[]{output}, ItemUtils.getSimpleStack(input, 9))){ + Logger.INFO("Added a shapeless recipe for Compressed Glowstone ["+r+"]"); + } + + } return true; } diff --git a/src/main/java/gtPlusPlus/core/recipe/RECIPES_Machines.java b/src/main/java/gtPlusPlus/core/recipe/RECIPES_Machines.java index cd8d9311c0..e2cd1daeb3 100644 --- a/src/main/java/gtPlusPlus/core/recipe/RECIPES_Machines.java +++ b/src/main/java/gtPlusPlus/core/recipe/RECIPES_Machines.java @@ -253,18 +253,628 @@ public class RECIPES_Machines { chemPlant(); zyngen(); milling(); - sparging(); + sparging(); chisels(); rockBreaker(); + + gt4FarmManager(); + gt4Redstone(); + gt4Inventory(); + + multiGeneratorArray(); + multiForgeHammer(); + multiMolecularTransformer(); + multiXlTurbines(); + multiSolarTower(); + multiElementalDuplicator(); + + computerCube(); + + resonanceChambers(); + modulators(); + + + } + + private static void computerCube() { + + CORE.RA.addSixSlotAssemblingRecipe( + new ItemStack[] { + CI.getNumberedAdvancedCircuit(20), + CI.getTieredGTPPMachineCasing(4, 1), + CI.getCircuit(4, 8), + CI.getFieldGenerator(2, 4), + CI.getDoublePlate(4, 8), + CI.getRobotArm(4, 8) + }, + Materials.Redstone.getMolten(144 * 32), + GregtechItemList.Gregtech_Computer_Cube_Machine.get(1), + 20 * 60 * 10, + MaterialUtils.getVoltageForTier(4)); + + } + + + private static void gt4FarmManager() { + + + + ItemList[] aInputHatches = new ItemList[] { + ItemList.Hatch_Input_LV, ItemList.Hatch_Input_MV, ItemList.Hatch_Input_HV, + ItemList.Hatch_Input_EV, ItemList.Hatch_Input_IV, ItemList.Hatch_Input_LuV, + ItemList.Hatch_Input_ZPM, ItemList.Hatch_Input_UV + }; + GregtechItemList[] aOutputMachines = new GregtechItemList[] { + GregtechItemList.GT4_Crop_Harvester_LV, GregtechItemList.GT4_Crop_Harvester_MV, GregtechItemList.GT4_Crop_Harvester_HV, + GregtechItemList.GT4_Crop_Harvester_EV, GregtechItemList.GT4_Crop_Harvester_IV, GregtechItemList.GT4_Crop_Harvester_LuV, + GregtechItemList.GT4_Crop_Harvester_ZPM, GregtechItemList.GT4_Crop_Harvester_UV + }; + + int aTier = 1; + for (int i=0;i<8;i++) { + RecipeUtils.addShapedRecipe( + CI.getRobotArm(aTier, 1), CI.getSensor(aTier, 1), CI.getRobotArm(aTier, 1), + ItemUtils.getOrePrefixStack(OrePrefixes.toolHeadSense, CI.tieredMaterials[aTier], 1), CI.getTieredMachineHull(aTier, 1), ItemUtils.getOrePrefixStack(OrePrefixes.toolHeadSense, CI.tieredMaterials[aTier], 1), + CI.getTieredCircuitOreDictName(aTier), aInputHatches[i].get(1), CI.getTieredCircuitOreDictName(aTier), + aOutputMachines[i].get(1)); + aTier++; + } + + } + + private static void gt4Redstone() { + + RecipeUtils.addShapedRecipe( + "plateIron", "plateGlass", "plateIron", + "plateGlass", ItemUtils.getSimpleStack(Blocks.redstone_lamp), "plateGlass", + "plateIron", "plateGlass", "plateIron", + GregtechItemList.GT4_Redstone_Lamp.get(2)); + RecipeUtils.addShapedRecipe( + "plateAluminium", "plateGlass", "plateAluminium", + "plateGlass", ItemUtils.getSimpleStack(Blocks.redstone_lamp), "plateGlass", + "plateAluminium", "plateGlass", "plateAluminium", + GregtechItemList.GT4_Redstone_Lamp.get(8)); + + RecipeUtils.addShapedRecipe( + "plateIron", "plateIron", "plateIron", + ItemUtils.getSimpleStack(Items.comparator), ItemList.Cover_Screen.get(1), ItemUtils.getSimpleStack(Items.comparator), + "plateIron", "plateIron", "plateIron", + GregtechItemList.GT4_Redstone_Display.get(2)); + RecipeUtils.addShapedRecipe( + "plateAluminium", "plateAluminium", "plateAluminium", + ItemUtils.getSimpleStack(Items.comparator), ItemList.Cover_Screen.get(1), ItemUtils.getSimpleStack(Items.comparator), + "plateAluminium", "plateAluminium", "plateAluminium", + GregtechItemList.GT4_Redstone_Display.get(8)); + + RecipeUtils.addShapedRecipe( + "plateIron", "plateIron", "plateIron", + ItemUtils.getSimpleStack(Items.comparator), ItemList.Cover_EnergyDetector.get(1), ItemUtils.getSimpleStack(Items.comparator), + "plateIron", "plateIron", "plateIron", + GregtechItemList.GT4_Redstone_Scale.get(2)); + RecipeUtils.addShapedRecipe( + "plateAluminium", "plateAluminium", "plateAluminium", + ItemUtils.getSimpleStack(Items.comparator), ItemList.Cover_EnergyDetector.get(1), ItemUtils.getSimpleStack(Items.comparator), + "plateAluminium", "plateAluminium", "plateAluminium", + GregtechItemList.GT4_Redstone_Scale.get(8)); + + CORE.RA.addSixSlotAssemblingRecipe( + new ItemStack[] { + CI.getTieredMachineHull(1), + ItemUtils.getSimpleStack(Blocks.stone_button, 16) + }, + null, + GregtechItemList.GT4_Redstone_Button_Panel.get(1), + 800, + 4); + + RecipeUtils.addShapedRecipe( + "plateIron", ItemUtils.getSimpleStack(Items.repeater), "plateIron", + ItemUtils.getSimpleStack(Items.comparator), CI.getTieredCircuitOreDictName(1), ItemUtils.getSimpleStack(Items.comparator), + "plateIron", ItemUtils.getSimpleStack(Items.repeater), "plateIron", + GregtechItemList.GT4_Redstone_Circuit.get(1)); + RecipeUtils.addShapedRecipe( + "plateAluminium", ItemUtils.getSimpleStack(Items.repeater), "plateAluminium", + ItemUtils.getSimpleStack(Items.comparator), CI.getTieredCircuitOreDictName(1), ItemUtils.getSimpleStack(Items.comparator), + "plateAluminium", ItemUtils.getSimpleStack(Items.repeater), "plateAluminium", + GregtechItemList.GT4_Redstone_Circuit.get(2)); + + } + + private static void gt4Inventory() { + + ItemList[] aEnergyHatches = new ItemList[] { + ItemList.Hatch_Energy_LV, ItemList.Hatch_Energy_MV, ItemList.Hatch_Energy_HV, + ItemList.Hatch_Energy_EV, ItemList.Hatch_Energy_IV, ItemList.Hatch_Energy_LuV, + ItemList.Hatch_Energy_ZPM, ItemList.Hatch_Energy_UV + }; + + ItemList[] aRegulators = new ItemList[] { + ItemList.Automation_Regulator_LV, ItemList.Automation_Regulator_MV, ItemList.Automation_Regulator_HV, + ItemList.Automation_Regulator_EV, ItemList.Automation_Regulator_IV, ItemList.Automation_Regulator_LuV, + ItemList.Automation_Regulator_ZPM, ItemList.Automation_Regulator_UV + }; + + GregtechItemList[] aOutputInventoryManager = new GregtechItemList[] { + GregtechItemList.GT4_Electric_Inventory_Manager_LV, GregtechItemList.GT4_Electric_Inventory_Manager_MV, GregtechItemList.GT4_Electric_Inventory_Manager_HV, + GregtechItemList.GT4_Electric_Inventory_Manager_EV, GregtechItemList.GT4_Electric_Inventory_Manager_IV, GregtechItemList.GT4_Electric_Inventory_Manager_LuV, + GregtechItemList.GT4_Electric_Inventory_Manager_ZPM, GregtechItemList.GT4_Electric_Inventory_Manager_UV + }; + + int aTier = 1; + for (int i=0;i<8;i++) { + RecipeUtils.addShapedRecipe( + CI.getTieredCircuitOreDictName(aTier), aRegulators[i].get(1), CI.getTieredCircuitOreDictName(aTier), + CI.getRobotArm(aTier, 1), CI.getTieredMachineHull(aTier), CI.getRobotArm(aTier, 1), + CI.getTieredCircuitOreDictName(aTier), aEnergyHatches[i].get(1), CI.getTieredCircuitOreDictName(aTier), + aOutputInventoryManager[i].get(1)); + aTier++; + } + + GregtechItemList[] aOutputElectricCraftingTable = new GregtechItemList[] { + GregtechItemList.GT4_Electric_Auto_Workbench_LV, GregtechItemList.GT4_Electric_Auto_Workbench_MV, GregtechItemList.GT4_Electric_Auto_Workbench_HV, + GregtechItemList.GT4_Electric_Auto_Workbench_EV, GregtechItemList.GT4_Electric_Auto_Workbench_IV, GregtechItemList.GT4_Electric_Auto_Workbench_LuV, + GregtechItemList.GT4_Electric_Auto_Workbench_ZPM, GregtechItemList.GT4_Electric_Auto_Workbench_UV + }; + + aTier = 1; + for (int i=0;i<8;i++) { + RecipeUtils.addShapedRecipe( + ItemUtils.getOrePrefixStack(OrePrefixes.plate, CI.tieredMaterials[aTier], 1), ItemUtils.getSimpleStack(Blocks.crafting_table), ItemUtils.getOrePrefixStack(OrePrefixes.plate, CI.tieredMaterials[aTier], 1), + CI.getTieredCircuitOreDictName(aTier), CI.getTieredMachineHull(aTier), CI.getTieredCircuitOreDictName(aTier), + ItemUtils.getOrePrefixStack(OrePrefixes.plate, CI.tieredMaterials[aTier], 1), CI.getRobotArm(aTier, 1), ItemUtils.getOrePrefixStack(OrePrefixes.plate, CI.tieredMaterials[aTier], 1), + aOutputElectricCraftingTable[i].get(1)); + aTier++; + } + + } + + private static void multiGeneratorArray() { + GT_ModHandler.addCraftingRecipe( + ItemList.Processing_Array.get(1L), + CI.bitsd, + new Object[]{"CTC", "FMF", "CBC", + 'M', CI.getTieredGTPPMachineCasing(4, 1), + 'B', OrePrefixes.pipeHuge.get(Materials.StainlessSteel), + 'C', OrePrefixes.circuit.get(Materials.Data), + 'F', ItemList.Electric_Pump_EV, + 'T', CI.getSensor(4, 1)}); + } + + private static void multiForgeHammer() { + + CORE.RA.addSixSlotAssemblingRecipe( + new ItemStack[] { + CI.getTieredGTPPMachineCasing(4, 1), + ItemList.Machine_IV_Hammer.get(1), + CI.getPlate(4, 8), + CI.getBolt(5, 32), + ELEMENT.getInstance().ZIRCONIUM.getFineWire(32), + ItemUtils.getItemStackOfAmountFromOreDict("circuitElite", 4) + }, + CI.getTieredFluid(4, 144 * 12), + GregtechItemList.Controller_IndustrialForgeHammer.get(1), + 20 * 30, + MaterialUtils.getVoltageForTier(5)); + + CORE.RA.addSixSlotAssemblingRecipe( + new ItemStack[] { + CI.getTieredGTPPMachineCasing(3, 1), + ItemList.Casing_HeatProof.get(1), + CI.getPlate(4, 2), + CI.getBolt(4, 8), + ALLOY.BABBIT_ALLOY.getFineWire(16), + ItemUtils.getItemStackOfAmountFromOreDict("circuitGood", 4) + }, + CI.getTieredFluid(4, 144 * 2), + GregtechItemList.Casing_IndustrialForgeHammer.get(1), + 20 * 30, + MaterialUtils.getVoltageForTier(4)); + } + private static void multiMolecularTransformer() { + + CORE.RA.addSixSlotAssemblingRecipe( + new ItemStack[] { + CI.getTieredGTPPMachineCasing(6, 1), + CI.getPlate(5, 16), + CI.getBolt(5, 32), + ALLOY.HG1223.getFineWire(64), + CI.getEmitter(4, 8), + ItemUtils.getItemStackOfAmountFromOreDict("circuitMaster", 10) + }, + CI.getTieredFluid(5, 144 * 16), + ItemDummyResearch.getResearchStack(ASSEMBLY_LINE_RESEARCH.RESEARCH_11_MOLECULAR_TRANSFORMER, 1), + 20 * 60, + MaterialUtils.getVoltageForTier(5)); + + CORE.RA.addAssemblylineRecipe( + ItemDummyResearch.getResearchStack(ASSEMBLY_LINE_RESEARCH.RESEARCH_11_MOLECULAR_TRANSFORMER, 1), + 20 * 60 * 30, + new Object[] { + ALLOY.HG1223.getFineWire(64), + ALLOY.HG1223.getFineWire(64), + ItemList.Electric_Motor_IV.get(GTNH ? 32 : 16), + ItemList.Energy_LapotronicOrb.get(GTNH ? 32 : 16), + CI.getTieredComponent(OrePrefixes.cableGt12, 6, GTNH ? 32 : 16), + CI.getTieredComponent(OrePrefixes.wireGt16, 5, GTNH ? 64 : 32), + ALLOY.ZERON_100.getFrameBox(4), + ALLOY.ZIRCONIUM_CARBIDE.getPlateDouble(32), + ALLOY.BABBIT_ALLOY.getPlate(64), + ALLOY.LEAGRISIUM.getGear(GTNH ? 16 : 8), + new Object[] {CI.getTieredCircuitOreDictName(4), 64}, + new Object[] {CI.getTieredCircuitOreDictName(5), 32}, + new Object[] {CI.getTieredCircuitOreDictName(6), 16}, + GregtechItemList.Laser_Lens_WoodsGlass.get(1), + }, + new FluidStack[] { + ALLOY.NITINOL_60.getFluidStack(144 * 9 * (GTNH ? 4 : 2)), + ALLOY.INCOLOY_MA956.getFluidStack(144 * 9 * (GTNH ? 32 : 8)), + ALLOY.KANTHAL.getFluidStack(144 * 1 * (GTNH ? 16 : 4)), + }, + GregtechItemList.Controller_MolecularTransformer.get(1), + 20 * 60 * 10 * (GTNH ? 2 : 1), + (int) MaterialUtils.getVoltageForTier(6)); + + CORE.RA.addSixSlotAssemblingRecipe( + new ItemStack[] { + CI.getNumberedAdvancedCircuit(16), + CI.getPlate(6, 4), + CI.getScrew(6, 8), + ELEMENT.getInstance().PALLADIUM.getFineWire(16), + CI.getSensor(5, 2), + ItemUtils.getItemStackOfAmountFromOreDict("circuitElite", 4) + }, + CI.getTieredFluid(5, 144 * 4), + GregtechItemList.Casing_Molecular_Transformer_1.get(1), + 20 * 20, + MaterialUtils.getVoltageForTier(5)); + + CORE.RA.addSixSlotAssemblingRecipe( + new ItemStack[] { + CI.getNumberedAdvancedCircuit(16), + CI.getPlate(5, 4), + CI.getScrew(5, 8), + ItemList.Casing_Coil_Nichrome.get(2), + CI.getFieldGenerator(3, 2), + ItemUtils.getItemStackOfAmountFromOreDict("circuitData", 8) + }, + CI.getTieredFluid(5, 144 * 4), + GregtechItemList.Casing_Molecular_Transformer_2.get(1), + 20 * 20, + MaterialUtils.getVoltageForTier(5)); + + + CORE.RA.addSixSlotAssemblingRecipe( + new ItemStack[] { + CI.getNumberedAdvancedCircuit(16), + ItemUtils.getSimpleStack(Blocks.glowstone, 16), + CI.getGear(5, 8), + ELEMENT.getInstance().TITANIUM.getWire04(4), + CI.getFieldGenerator(4, 2), + ItemUtils.getItemStackOfAmountFromOreDict("circuitData", 8) + }, + CI.getTieredFluid(5, 144 * 4), + GregtechItemList.Casing_Molecular_Transformer_3.get(1), + 20 * 60, + MaterialUtils.getVoltageForTier(5)); + + } + + private static void multiXlTurbines() { + + RecipeUtils.addShapedRecipe( + CI.getDoublePlate(4, 1), CI.getElectricMotor(3, 1), CI.getDoublePlate(4, 1), + ItemUtils.getItemStackOfAmountFromOreDict("cellLubricant", 1), ItemList.Casing_Gearbox_Titanium.get(1), ItemUtils.getItemStackOfAmountFromOreDict("cellLubricant", 1), + CI.getDoublePlate(4, 1), CI.getElectricMotor(3, 1), CI.getDoublePlate(4, 1), + GregtechItemList.Casing_Turbine_Shaft.get(1)); + + CORE.RA.addSixSlotAssemblingRecipe( + new ItemStack[] { + CI.getNumberedAdvancedCircuit(18), + ItemList.Casing_Turbine.get(1), + CI.getPlate(4, 4), + CI.getScrew(4, 8), + CI.getCircuit(4, 4), + CI.getGear(3, 8) + }, + CI.tieredMaterials[3].getMolten(144 * 8), + GregtechItemList.Hatch_Turbine_Rotor.get(1), + 20 * 60, + MaterialUtils.getVoltageForTier(4)); + + // Steam + CORE.RA.addSixSlotAssemblingRecipe( + new ItemStack[] { + CI.getNumberedAdvancedCircuit(18), + ItemList.Casing_Turbine.get(1), + CI.getPlate(3, 4), + CI.getScrew(3, 8), + }, + CI.tieredMaterials[2].getMolten(144 * 2), + GregtechItemList.Casing_Turbine_LP.get(1), + 20 * 5, + MaterialUtils.getVoltageForTier(3)); + CORE.RA.addSixSlotAssemblingRecipe( + new ItemStack[] { + CI.getNumberedAdvancedCircuit(18), + ItemList.LargeSteamTurbine.get(1), + CI.getPlate(4, 8), + CI.getScrew(4, 16), + CI.getGear(4, 4), + CI.getCircuit(4, 8) + }, + CI.tieredMaterials[4].getMolten(144 * 8), + GregtechItemList.Large_Steam_Turbine.get(1), + 20 * 60, + MaterialUtils.getVoltageForTier(4)); + + // Gas + CORE.RA.addSixSlotAssemblingRecipe( + new ItemStack[] { + CI.getNumberedAdvancedCircuit(18), + ItemList.Casing_Turbine1.get(1), + CI.getPlate(4, 4), + CI.getScrew(4, 8), + }, + CI.tieredMaterials[3].getMolten(144 * 2), + GregtechItemList.Casing_Turbine_Gas.get(1), + 20 * 5, + MaterialUtils.getVoltageForTier(4)); + CORE.RA.addSixSlotAssemblingRecipe( + new ItemStack[] { + CI.getNumberedAdvancedCircuit(18), + ItemList.LargeGasTurbine.get(1), + CI.getPlate(5, 8), + CI.getScrew(5, 16), + CI.getGear(5, 4), + CI.getCircuit(5, 8) + }, + CI.tieredMaterials[5].getMolten(144 * 8), + GregtechItemList.Large_Gas_Turbine.get(1), + 20 * 60, + MaterialUtils.getVoltageForTier(5)); + + // HP Steam + CORE.RA.addSixSlotAssemblingRecipe( + new ItemStack[] { + CI.getNumberedAdvancedCircuit(18), + ItemList.Casing_Turbine2.get(1), + CI.getPlate(5, 4), + CI.getScrew(5, 8), + }, + CI.tieredMaterials[4].getMolten(144 * 2), + GregtechItemList.Casing_Turbine_HP.get(1), + 20 * 5, + MaterialUtils.getVoltageForTier(5)); + CORE.RA.addSixSlotAssemblingRecipe( + new ItemStack[] { + CI.getNumberedAdvancedCircuit(18), + ItemList.LargeHPSteamTurbine.get(1), + CI.getPlate(6, 8), + CI.getScrew(6, 16), + CI.getGear(6, 4), + CI.getCircuit(6, 8) + }, + CI.tieredMaterials[6].getMolten(144 * 8), + GregtechItemList.Large_HPSteam_Turbine.get(1), + 20 * 60, + MaterialUtils.getVoltageForTier(6)); + + // Plasma + CORE.RA.addSixSlotAssemblingRecipe( + new ItemStack[] { + CI.getNumberedAdvancedCircuit(18), + ItemList.Casing_Turbine3.get(1), + CI.getPlate(6, 4), + CI.getScrew(6, 8), + }, + CI.tieredMaterials[5].getMolten(144 * 2), + GregtechItemList.Casing_Turbine_Plasma.get(1), + 20 * 5, + MaterialUtils.getVoltageForTier(6)); + CORE.RA.addSixSlotAssemblingRecipe( + new ItemStack[] { + CI.getNumberedAdvancedCircuit(18), + ItemList.LargePlasmaTurbine.get(1), + CI.getPlate(7, 8), + CI.getScrew(7, 16), + CI.getGear(7, 4), + CI.getCircuit(7, 8) + }, + CI.tieredMaterials[7].getMolten(144 * 8), + GregtechItemList.Large_Plasma_Turbine.get(1), + 20 * 60, + MaterialUtils.getVoltageForTier(7)); + + + } + + private static void multiSolarTower() { + + CORE.RA.addSixSlotAssemblingRecipe( + new ItemStack[] { + CI.getNumberedAdvancedCircuit(17), + CI.getTieredGTPPMachineCasing(3, 4), + ALLOY.MARAGING250.getPlate(8), + ALLOY.MARAGING250.getBolt(8), + ALLOY.MARAGING250.getScrew(8), + CI.getCircuit(5, 8) + }, + CI.getTieredFluid(3, 144 * 16), + GregtechItemList.Industrial_Solar_Tower.get(1), + 20 * 30, + MaterialUtils.getVoltageForTier(4)); + + CORE.RA.addSixSlotAssemblingRecipe( + new ItemStack[] { + CI.getNumberedAdvancedCircuit(17), + ALLOY.MARAGING350.getFrameBox(1), + ALLOY.STAINLESS_STEEL.getPlate(4), + ALLOY.MARAGING350.getScrew(8) + }, + CI.getTieredFluid(3, 144 * 4), + GregtechItemList.Casing_SolarTower_Structural.get(1), + 20 * 30, + MaterialUtils.getVoltageForTier(3)); + + CORE.RA.addSixSlotAssemblingRecipe( + new ItemStack[] { + CI.getNumberedAdvancedCircuit(17), + ALLOY.MARAGING250.getFrameBox(1), + ALLOY.STAINLESS_STEEL.getPlate(4), + ALLOY.MARAGING250.getBolt(16), + ELEMENT.getInstance().ALUMINIUM.getScrew(8) + }, + CI.getTieredFluid(3, 144 * 4), + GregtechItemList.Casing_SolarTower_SaltContainment.get(1), + 20 * 30, + MaterialUtils.getVoltageForTier(3)); + + CORE.RA.addSixSlotAssemblingRecipe( + new ItemStack[] { + CI.getNumberedAdvancedCircuit(17), + ALLOY.MARAGING250.getFrameBox(1), + ALLOY.STEEL_BLACK.getPlate(4), + ALLOY.MARAGING250.getScrew(8) + }, + CI.getAlternativeTieredFluid(3, 144 * 4), + GregtechItemList.Casing_SolarTower_HeatContainment.get(1), + 20 * 30, + MaterialUtils.getVoltageForTier(3)); + + CORE.RA.addSixSlotAssemblingRecipe( + new ItemStack[] { + CI.getNumberedAdvancedCircuit(17), + CI.getTieredGTPPMachineCasing(2, 1), + CI.getPlate(3, 2), + CI.getGear(3, 4), + CI.getElectricMotor(3, 2), + CI.getCircuit(3, 4) + + }, + CI.getTertiaryTieredFluid(3, 144 * 4), + GregtechItemList.Solar_Tower_Reflector.get(1), + 20 * 60, + MaterialUtils.getVoltageForTier(3)); + + } + + private static void multiElementalDuplicator() { + + CORE.RA.addAssemblylineRecipe( + ItemList.Machine_IV_Replicator.get(1), + 20 * 60 * 60 * 12, + new Object[] { + CI.getTieredMachineHull(7, 4), + CI.getFieldGenerator(5, GTNH ? 32 : 16), + CI.getElectricMotor(7, GTNH ? 32 : 16), + CI.getElectricPiston(7, GTNH ? 16 : 4), + CI.getEnergyCore(6, GTNH ? 8 : 2), + CI.getPlate(7, GTNH ? 32 : 16), + CI.getScrew(7, GTNH ? 64 : 32), + CI.getBolt(6, GTNH ? 64 : 32), + CI.getTieredComponent(OrePrefixes.rod, 6, GTNH ? 20 : 10), + new Object[] {CI.getTieredCircuitOreDictName(7), 20}, + ItemList.Tool_DataOrb.get(32), + GregtechItemList.Laser_Lens_Special.get(1) + }, + new FluidStack[] { + CI.getTieredFluid(7, 144 * 32), + CI.getAlternativeTieredFluid(6, 144 * 16), + CI.getTertiaryTieredFluid(6, 144 * 16), + ALLOY.BABBIT_ALLOY.getFluidStack(128 * 144), + + }, + GregtechItemList.Controller_ElementalDuplicator.get(1), + 20 * 60 * 60 * (GTNH ? 2 : 1), + (int) MaterialUtils.getVoltageForTier(7)); + + CORE.RA.addAssemblylineRecipe( + GregtechItemList.Modulator_III.get(1), + 20 * 60 * 60 * 4, + new Object[] { + CI.getTieredGTPPMachineCasing(7, 2), + CI.getFieldGenerator(4, GTNH ? 8 : 4), + CI.getEnergyCore(4, GTNH ? 8 : 2), + CI.getPlate(7, GTNH ? 16 : 8), + CI.getScrew(6, GTNH ? 32 : 16), + CI.getBolt(6, GTNH ? 32 : 16), + CI.getTieredComponent(OrePrefixes.rod, 5, GTNH ? 32 : 16), + new Object[] {CI.getTieredCircuitOreDictName(6), 32}, + ItemList.Tool_DataOrb.get(32), + }, + new FluidStack[] { + CI.getTieredFluid(6, 144 * 16), + CI.getAlternativeTieredFluid(5, 144 * 8), + CI.getTertiaryTieredFluid(5, 144 * 8), + ALLOY.BABBIT_ALLOY.getFluidStack(64 * 144), + + }, + GregtechItemList.Hatch_Input_Elemental_Duplicator.get(1), + 20 * 60 * 60 * (GTNH ? 4 : 2), + (int) MaterialUtils.getVoltageForTier(6)); + + CORE.RA.addAssemblylineRecipe( + GregtechItemList.ResonanceChamber_III.get(1), + 20 * 60 * 60 * 2, + new Object[] { + CI.getTieredMachineHull(6, 5), + CI.getFieldGenerator(3, GTNH ? 32 : 16), + CI.getEnergyCore(2, GTNH ? 8 : 2), + CI.getPlate(7, GTNH ? 8 : 4), + CI.getScrew(7, GTNH ? 8 : 4), + CI.getBolt(6, GTNH ? 16 : 8), + CI.getTieredComponent(OrePrefixes.rod, 5, GTNH ? 8 : 4), + new Object[] {CI.getTieredCircuitOreDictName(5), 4}, + ItemList.Tool_DataStick.get(4), + }, + new FluidStack[] { + CI.getTieredFluid(5, 144 * 16), + CI.getAlternativeTieredFluid(4, 144 * 8), + CI.getTertiaryTieredFluid(4, 144 * 8), + ALLOY.BABBIT_ALLOY.getFluidStack(16 * 144), + + }, + GregtechItemList.Casing_ElementalDuplicator.get(1), + 20 * 60 * (GTNH ? 20 : 10), + (int) MaterialUtils.getVoltageForTier(6)); + + } + + private static void resonanceChambers() { + int aFieldTier = 1; + int aCasingTier = 4; + for (int i = 0; i < 4; i++) { + RecipeUtils.addShapedRecipe( + CI.getDoublePlate(aCasingTier, 1), CI.getFieldGenerator(aFieldTier, 1), CI.getDoublePlate(aCasingTier, 1), + CI.getFieldGenerator(aFieldTier, 1), CI.getTieredMachineCasing(aCasingTier), CI.getFieldGenerator(aFieldTier, 1), + CI.getDoublePlate(aCasingTier, 1), CI.getFieldGenerator(aFieldTier, 1), CI.getDoublePlate(aCasingTier, 1), + ItemUtils.simpleMetaStack(ModBlocks.blockSpecialMultiCasings2, i, 1)); + aCasingTier++; + aFieldTier++; + } + } + + private static void modulators() { + int aCasingTier = 4; + for (int i = 4; i < 8; i++) { + RecipeUtils.addShapedRecipe( + CI.getTieredCircuitOreDictName(aCasingTier), CI.getPlate(aCasingTier, 1), CI.getTieredCircuitOreDictName(aCasingTier), + CI.getPlate(aCasingTier, 1), CI.getTieredMachineCasing(aCasingTier), CI.getPlate(aCasingTier, 1), + CI.getTieredCircuitOreDictName(aCasingTier), CI.getPlate(aCasingTier, 1), CI.getTieredCircuitOreDictName(aCasingTier), + ItemUtils.simpleMetaStack(ModBlocks.blockSpecialMultiCasings2, i, 1)); + aCasingTier++; + } + } + private static void zyngen() { CORE.RA.addSixSlotAssemblingRecipe( new ItemStack[] { CI.getNumberedAdvancedCircuit(6), CI.getTieredMachineHull(4), - ItemList.Machine_EV_AlloySmelter.get(1), + ItemList.Machine_IV_AlloySmelter.get(1), CI.getGear(3, 16), CI.getBolt(3, 64), CI.getPlate(4, 16) @@ -925,6 +1535,21 @@ public class RECIPES_Machines { if (CORE.ConfigSwitches.enableMachine_FluidTanks){ Logger.WARNING("Is New Horizons Loaded? "+GTNH); if (!GTNH){ + + // Allows clearing stored fluids. + GregtechItemList[] aTanks = new GregtechItemList[] { + GregtechItemList.GT_FluidTank_ULV, GregtechItemList.GT_FluidTank_LV, GregtechItemList.GT_FluidTank_MV, + GregtechItemList.GT_FluidTank_HV, GregtechItemList.GT_FluidTank_EV, GregtechItemList.GT_FluidTank_IV, + GregtechItemList.GT_FluidTank_LuV, GregtechItemList.GT_FluidTank_ZPM, GregtechItemList.GT_FluidTank_UV, + GregtechItemList.GT_FluidTank_MAX}; + for (GregtechItemList aTank : aTanks) { + RecipeUtils.addShapedGregtechRecipe( + aTank.get(1), null, null, + null, null, null, + null, null, null, + aTank.get(1)); + } + RecipeUtils.addShapedGregtechRecipe( CI.component_Plate[1], CI.component_Plate[1], CI.component_Plate[1], CI.component_Plate[1], pipeTier1, CI.component_Plate[1], @@ -993,6 +1618,16 @@ public class RECIPES_Machines { CI.component_Plate[8] = "plateDarkSteel"; ItemStack waterBucket = ItemUtils.getSimpleStack(Items.water_bucket); + // Allows clearing stored fluids. + GregtechItemList[] aTanks = new GregtechItemList[] {GregtechItemList.GT_FluidTank_ULV, GregtechItemList.GT_FluidTank_LV, GregtechItemList.GT_FluidTank_MV, GregtechItemList.GT_FluidTank_HV}; + for (GregtechItemList aTank : aTanks) { + RecipeUtils.addShapedGregtechRecipe( + aTank.get(1), null, null, + null, null, null, + null, null, null, + aTank.get(1)); + } + RecipeUtils.addShapedGregtechRecipe( CI.component_Plate[1], CI.component_Plate[5], CI.component_Plate[1], CI.component_Plate[4], pipeTier1, CI.component_Plate[4], @@ -1406,6 +2041,8 @@ public class RECIPES_Machines { } //Air Intake Hatch + ItemList FluidRegulator_IV = ItemUtils.getValueOfItemList("FluidRegulator_IV", ItemList.Pump_IV); + ItemStack aTieredFluidRegulator = CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK ? FluidRegulator_IV.get(1) : ItemList.Pump_IV.get(1); RecipeUtils.addShapedGregtechRecipe( CI.component_Plate[6], ItemList.Casing_Grate.get(1), CI.component_Plate[6], CI.component_Plate[6], CI.getFluidRegulator(5, 1), CI.component_Plate[6], @@ -1424,6 +2061,7 @@ public class RECIPES_Machines { CI.getPlate(7, 1), CI.getFluidRegulator(7, 1), CI.getPlate(7, 1), CI.getTieredCircuit(7), ItemList.Hatch_Input_ZPM.get(1), CI.getTieredCircuit(7), GregtechItemList.Hatch_Air_Intake_Extreme.get(1)); + if (CORE.ConfigSwitches.enableMultiblock_LiquidFluorideThoriumReactor){ //Thorium Reactor @@ -2796,7 +3434,8 @@ public class RECIPES_Machines { } } for (int a=0;a<5;a++) { - for (int i = 0;i<16;i++) { + for (int i = 0;i<16;i++) { + if (GTNH) continue; ItemStack aInput = aInputs[a][i]; ItemStack aOutput = aOutputs[a][i]; if (GT_Values.RA.addCutterRecipe( diff --git a/src/main/java/gtPlusPlus/core/recipe/common/CI.java b/src/main/java/gtPlusPlus/core/recipe/common/CI.java index f6af91a040..f656cfe9f0 100644 --- a/src/main/java/gtPlusPlus/core/recipe/common/CI.java +++ b/src/main/java/gtPlusPlus/core/recipe/common/CI.java @@ -190,6 +190,13 @@ public class CI { public static ItemStack explosiveTNT; public static ItemStack explosiveITNT; + public static Materials[] tieredMaterials = new Materials[] { + Materials.Iron, Materials.Steel, Materials.Aluminium, + Materials.StainlessSteel, Materials.Titanium, Materials.TungstenSteel, + Materials.Chrome, Materials.Iridium, Materials.Osmium, + Materials.Neutronium + };; + public static void preInit(){ //Tiered Components @@ -543,7 +550,7 @@ public class CI { ALLOY.TUMBAGA, ALLOY.EGLIN_STEEL, ALLOY.INCONEL_792, - ALLOY.TUNGSTEN_TITANIUM_CARBIDE, + ALLOY.INCOLOY_MA956, ALLOY.NITINOL_60, ALLOY.ZERON_100, ALLOY.PIKYONIUM, @@ -572,7 +579,7 @@ public class CI { ELEMENT.getInstance().LEAD, ELEMENT.getInstance().ALUMINIUM, ELEMENT.STANDALONE.BLACK_METAL, - ELEMENT.getInstance().TUNGSTEN, + ELEMENT.getInstance().TITANIUM, ALLOY.HASTELLOY_N, ALLOY.ENERGYCRYSTAL, ALLOY.TRINIUM_NAQUADAH_CARBON, @@ -681,6 +688,14 @@ public class CI { public static ItemStack getBolt(int aTier, int aAmount) { return getTieredComponent(OrePrefixes.bolt, aTier, aAmount); } + + public static ItemStack getScrew(int aTier, int aAmount) { + return getTieredComponent(OrePrefixes.screw, aTier, aAmount); + } + + public static ItemStack getCircuit(int aTier, int aAmount) { + return getTieredComponent(OrePrefixes.circuit, aTier, aAmount); + } public static ItemStack getTieredComponent(OrePrefixes aPrefix, int aTier, int aAmount) { aTier = Math.max(0, aTier); @@ -694,12 +709,12 @@ public class CI { } if (aPrefix == OrePrefixes.circuit) { - if (aTier == 4) { + /*if (aTier == 4) { return ItemUtils.getSimpleStack(CI.getDataStick(), aAmount); } else if (aTier == 5) { return ItemUtils.getSimpleStack(CI.getDataOrb(), aAmount); - } + }*/ return ItemUtils.getOrePrefixStack(OrePrefixes.circuit, aMaterial_Circuits[aTier], aAmount); } diff --git a/src/main/java/gtPlusPlus/core/tileentities/ModTileEntities.java b/src/main/java/gtPlusPlus/core/tileentities/ModTileEntities.java index 62b545c5c8..0fcbb6a576 100644 --- a/src/main/java/gtPlusPlus/core/tileentities/ModTileEntities.java +++ b/src/main/java/gtPlusPlus/core/tileentities/ModTileEntities.java @@ -5,7 +5,15 @@ import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.block.general.BlockSuperLight.TileEntitySuperLight; import gtPlusPlus.core.block.machine.Machine_SuperJukebox.TileEntitySuperJukebox; import gtPlusPlus.core.lib.LoadedMods; -import gtPlusPlus.core.tileentities.general.*; +import gtPlusPlus.core.tileentities.general.TileEntityCircuitProgrammer; +import gtPlusPlus.core.tileentities.general.TileEntityDecayablesChest; +import gtPlusPlus.core.tileentities.general.TileEntityEggBox; +import gtPlusPlus.core.tileentities.general.TileEntityFirepit; +import gtPlusPlus.core.tileentities.general.TileEntityFishTrap; +import gtPlusPlus.core.tileentities.general.TileEntityInfiniteFluid; +import gtPlusPlus.core.tileentities.general.TileEntityPlayerDoorBase; +import gtPlusPlus.core.tileentities.general.TileEntityVolumetricFlaskSetter; +import gtPlusPlus.core.tileentities.general.TileEntityXpConverter; import gtPlusPlus.core.tileentities.machines.TileEntityAdvPooCollector; import gtPlusPlus.core.tileentities.machines.TileEntityModularityTable; import gtPlusPlus.core.tileentities.machines.TileEntityPestKiller; @@ -13,8 +21,6 @@ import gtPlusPlus.core.tileentities.machines.TileEntityPooCollector; import gtPlusPlus.core.tileentities.machines.TileEntityProjectTable; import gtPlusPlus.core.tileentities.machines.TileEntityRoundRobinator; import gtPlusPlus.core.tileentities.machines.TileEntityTradeTable; -import gtPlusPlus.core.tileentities.machines.TileEntityWorkbench; -import gtPlusPlus.core.tileentities.machines.TileEntityWorkbenchAdvanced; import gtPlusPlus.plugin.villagers.tile.TileEntityGenericSpawner; import gtPlusPlus.xmod.gregtech.common.Meta_GT_Proxy; @@ -24,8 +30,6 @@ public class ModTileEntities { Logger.INFO("Registering Tile Entities."); GameRegistry.registerTileEntity(TileEntityPooCollector.class, "TileEntityPooCollector"); GameRegistry.registerTileEntity(TileEntityAdvPooCollector.class, "TileEntityAdvPooCollector"); - GameRegistry.registerTileEntity(TileEntityWorkbench.class, "TileWorkbench"); - GameRegistry.registerTileEntity(TileEntityWorkbenchAdvanced.class, "TileWorkbenchAdvanced"); GameRegistry.registerTileEntity(TileEntityFishTrap.class, "TileFishTrap"); GameRegistry.registerTileEntity(TileEntityFirepit.class, "TileFirePit"); GameRegistry.registerTileEntity(TileEntityInfiniteFluid.class, "TileInfiniteFluid"); diff --git a/src/main/java/gtPlusPlus/core/tileentities/machines/TileEntityWorkbench.java b/src/main/java/gtPlusPlus/core/tileentities/machines/TileEntityWorkbench.java deleted file mode 100644 index a2db2326a9..0000000000 --- a/src/main/java/gtPlusPlus/core/tileentities/machines/TileEntityWorkbench.java +++ /dev/null @@ -1,172 +0,0 @@ -package gtPlusPlus.core.tileentities.machines; - -import java.util.List; -import java.util.Vector; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.IInventory; -import net.minecraft.inventory.InventoryCraftResult; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.nbt.NBTTagList; -import net.minecraft.tileentity.TileEntity; - -import gtPlusPlus.core.inventories.InventoryWorkbenchChest; -import gtPlusPlus.core.inventories.InventoryWorkbenchHoloSlots; -import gtPlusPlus.core.inventories.InventoryWorkbenchTools; -import ic2.api.network.INetworkDataProvider; -import ic2.api.network.INetworkUpdateListener; -import ic2.api.tile.IWrenchable; -import ic2.core.IC2; - -public class TileEntityWorkbench extends TileEntity implements INetworkDataProvider, INetworkUpdateListener, IWrenchable{ - - //Credit to NovaViper in http://www.minecraftforge.net/forum/index.php?topic=26439.0 - Helped me restructure my Inventory system and now the crafting matrix works better. - - public InventoryWorkbenchChest inventoryChest; - public InventoryWorkbenchTools inventoryTool; - public InventoryWorkbenchHoloSlots inventoryHolo; - //public InventoryWorkbenchHoloCrafting inventoryCrafting; - - public IInventory inventoryCraftResult = new InventoryCraftResult(); - - public TileEntityWorkbench(){ - this.inventoryTool = new InventoryWorkbenchTools();//number of slots - without product slot - this.inventoryChest = new InventoryWorkbenchChest();//number of slots - without product slot - this.inventoryHolo = new InventoryWorkbenchHoloSlots(); - //this.inventoryCrafting = new InventoryWorkbenchHoloCrafting(); - this.canUpdate(); - } - - public NBTTagCompound getTag(final NBTTagCompound nbt, final String tag) - { - if(!nbt.hasKey(tag)) - { - nbt.setTag(tag, new NBTTagCompound()); - } - return nbt.getCompoundTag(tag); - } - - @Override - public void writeToNBT(final NBTTagCompound nbt) - { - super.writeToNBT(nbt); - - nbt.setShort("facing", this.facing); - - this.inventoryChest.writeToNBT(this.getTag(nbt, "ContentsChest")); - this.inventoryTool.writeToNBT(this.getTag(nbt, "ContentsTools")); - //inventoryCrafting.writeToNBT(getTag(nbt, "ContentsCrafting")); - this.inventoryHolo.writeToNBT(this.getTag(nbt, "ContentsHolo")); - - // Write Crafting Matrix to NBT - final NBTTagList craftingTag = new NBTTagList(); - /*for (int currentIndex = 0; currentIndex < this.inventoryCrafting.getSizeInventory(); ++currentIndex) { - if (this.inventoryCrafting.getStackInSlot(currentIndex) != null) { - final NBTTagCompound tagCompound = new NBTTagCompound(); - tagCompound.setByte("Slot", (byte) currentIndex); - this.inventoryCrafting.getStackInSlot(currentIndex).writeToNBT(tagCompound); - craftingTag.appendTag(tagCompound); - } - }*/ - - nbt.setTag("CraftingMatrix", craftingTag); - // Write craftingResult to NBT - if (this.inventoryCraftResult.getStackInSlot(0) != null) { - nbt.setTag("CraftingResult", this.inventoryCraftResult.getStackInSlot(0).writeToNBT(new NBTTagCompound())); - } - - } - - @Override - public void readFromNBT(final NBTTagCompound nbt) - { - super.readFromNBT(nbt); - - this.prevFacing = (this.facing = nbt.getShort("facing")); - - this.inventoryChest.readFromNBT(nbt.getCompoundTag("ContentsChest")); - this.inventoryTool.readFromNBT(nbt.getCompoundTag("ContentsTools")); - //inventoryCrafting.readFromNBT(nbt.getCompoundTag("ContentsCrafting")); - this.inventoryHolo.readFromNBT(nbt.getCompoundTag("ContentsHolo")); - - // Read in the Crafting Matrix from NBT - final NBTTagList craftingTag = nbt.getTagList("CraftingMatrix", 10); - /*this.inventoryCrafting = new InventoryWorkbenchHoloCrafting(); //TODO: magic number - for (int i = 0; i < craftingTag.tagCount(); ++i) { - final NBTTagCompound tagCompound = craftingTag.getCompoundTagAt(i); - final byte slot = tagCompound.getByte("Slot"); - if ((slot >= 0) && (slot < this.inventoryCrafting.getSizeInventory())) { - this.inventoryCrafting.setInventorySlotContents(slot, ItemStack.loadItemStackFromNBT(tagCompound)); - } - }*/ - - - // Read craftingResult from NBT - final NBTTagCompound tagCraftResult = nbt.getCompoundTag("CraftingResult"); - this.inventoryCraftResult.setInventorySlotContents(0, ItemStack.loadItemStackFromNBT(tagCraftResult)); - - } - - @Override - public List<String> getNetworkedFields(){ - final List<String> ret = new Vector(2); - ret.add("facing"); - return ret; - } - - - @Override - public boolean wrenchCanSetFacing(final EntityPlayer entityPlayer, final int side) - { - return false; - } - - private short facing = 0; - public short prevFacing = 0; - - @Override - public void setFacing(final short facing1) - { - this.facing = facing1; - if (this.prevFacing != facing1) { - IC2.network.get().updateTileEntityField(this, "facing"); - } - this.prevFacing = facing1; - } - - @Override - public short getFacing() - { - return this.facing; - } - - - @Override - public boolean wrenchCanRemove(final EntityPlayer entityPlayer) - { - return true; - } - - @Override - public float getWrenchDropRate() - { - return 1.0F; - } - - @Override - public ItemStack getWrenchDrop(final EntityPlayer entityPlayer) - { - return new ItemStack(this.worldObj.getBlock(this.xCoord, this.yCoord, this.zCoord), 1, this.worldObj.getBlockMetadata(this.xCoord, this.yCoord, this.zCoord)); - } - - @Override - public void onNetworkUpdate(final String field) { - - this.prevFacing = this.facing; - - } - - - -}
\ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/tileentities/machines/TileEntityWorkbenchAdvanced.java b/src/main/java/gtPlusPlus/core/tileentities/machines/TileEntityWorkbenchAdvanced.java deleted file mode 100644 index 264323388f..0000000000 --- a/src/main/java/gtPlusPlus/core/tileentities/machines/TileEntityWorkbenchAdvanced.java +++ /dev/null @@ -1,245 +0,0 @@ -package gtPlusPlus.core.tileentities.machines; - -import java.util.List; -import java.util.Vector; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.IInventory; -import net.minecraft.inventory.InventoryCraftResult; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.nbt.NBTTagList; -import net.minecraft.tileentity.TileEntity; - -import gtPlusPlus.core.inventories.*; -import ic2.api.energy.event.EnergyTileLoadEvent; -import ic2.api.energy.event.EnergyTileUnloadEvent; -import ic2.api.energy.tile.IEnergySink; -import ic2.api.network.INetworkDataProvider; -import ic2.api.network.INetworkUpdateListener; -import ic2.api.tile.IWrenchable; -import ic2.core.IC2; -import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.common.util.ForgeDirection; - -public class TileEntityWorkbenchAdvanced extends TileEntity implements IEnergySink, INetworkDataProvider, INetworkUpdateListener, IWrenchable{ - - //Credit to NovaViper in http://www.minecraftforge.net/forum/index.php?topic=26439.0 - Helped me restructure my Inventory system and now the crafting matrix works better. - - public InventoryWorkbenchChest inventoryChest; - public InventoryWorkbenchToolsElectric inventoryTool; - public InventoryWorkbenchHoloSlots inventoryHolo; - public InventoryWorkbenchHoloCrafting inventoryCrafting; - - public IInventory inventoryCraftResult = new InventoryCraftResult(); - - //Wrench Code - private short facing = 0; - public short prevFacing = 0; - - //E-Net Code - public double energy = 0.0D; - public int maxEnergy; - private boolean addedToEnergyNet = false; - private int tier; - private float guiChargeLevel; - - - public TileEntityWorkbenchAdvanced(final int maxenergy, final int tier1){ - this.inventoryTool = new InventoryWorkbenchToolsElectric();//number of slots - without product slot - this.inventoryChest = new InventoryWorkbenchChest();//number of slots - without product slot - this.inventoryHolo = new InventoryWorkbenchHoloSlots(); - this.inventoryCrafting = new InventoryWorkbenchHoloCrafting(); - this.canUpdate(); - - //Electric Stats - this.maxEnergy = maxenergy; - this.tier = tier1; - - } - - public NBTTagCompound getTag(final NBTTagCompound nbt, final String tag) - { - if(!nbt.hasKey(tag)) - { - nbt.setTag(tag, new NBTTagCompound()); - } - return nbt.getCompoundTag(tag); - } - - @Override - public void writeToNBT(final NBTTagCompound nbt) - { - super.writeToNBT(nbt); - nbt.setDouble("energy", this.energy); - nbt.setShort("facing", this.facing); - - this.inventoryChest.writeToNBT(this.getTag(nbt, "ContentsChest")); - this.inventoryTool.writeToNBT(this.getTag(nbt, "ContentsTools")); - //inventoryCrafting.writeToNBT(getTag(nbt, "ContentsCrafting")); - this.inventoryHolo.writeToNBT(this.getTag(nbt, "ContentsHolo")); - - // Write Crafting Matrix to NBT - final NBTTagList craftingTag = new NBTTagList(); - for (int currentIndex = 0; currentIndex < this.inventoryCrafting.getSizeInventory(); ++currentIndex) { - if (this.inventoryCrafting.getStackInSlot(currentIndex) != null) { - final NBTTagCompound tagCompound = new NBTTagCompound(); - tagCompound.setByte("Slot", (byte) currentIndex); - this.inventoryCrafting.getStackInSlot(currentIndex).writeToNBT(tagCompound); - craftingTag.appendTag(tagCompound); - } - } - - nbt.setTag("CraftingMatrix", craftingTag); - // Write craftingResult to NBT - if (this.inventoryCraftResult.getStackInSlot(0) != null) { - nbt.setTag("CraftingResult", this.inventoryCraftResult.getStackInSlot(0).writeToNBT(new NBTTagCompound())); - } - - } - - @Override - public void readFromNBT(final NBTTagCompound nbt) - { - super.readFromNBT(nbt); - this.energy = nbt.getDouble("energy"); - - this.prevFacing = (this.facing = nbt.getShort("facing")); - - this.inventoryChest.readFromNBT(nbt.getCompoundTag("ContentsChest")); - this.inventoryTool.readFromNBT(nbt.getCompoundTag("ContentsTools")); - //inventoryCrafting.readFromNBT(nbt.getCompoundTag("ContentsCrafting")); - this.inventoryHolo.readFromNBT(nbt.getCompoundTag("ContentsHolo")); - - // Read in the Crafting Matrix from NBT - final NBTTagList craftingTag = nbt.getTagList("CraftingMatrix", 10); - this.inventoryCrafting = new InventoryWorkbenchHoloCrafting(); //TODO: magic number - for (int i = 0; i < craftingTag.tagCount(); ++i) { - final NBTTagCompound tagCompound = craftingTag.getCompoundTagAt(i); - final byte slot = tagCompound.getByte("Slot"); - if ((slot >= 0) && (slot < this.inventoryCrafting.getSizeInventory())) { - this.inventoryCrafting.setInventorySlotContents(slot, ItemStack.loadItemStackFromNBT(tagCompound)); - } - } - - - // Read craftingResult from NBT - final NBTTagCompound tagCraftResult = nbt.getCompoundTag("CraftingResult"); - this.inventoryCraftResult.setInventorySlotContents(0, ItemStack.loadItemStackFromNBT(tagCraftResult)); - - } - - @Override - public boolean acceptsEnergyFrom(final TileEntity emitter, final ForgeDirection direction) - { - return true; - } - - @Override - public double getDemandedEnergy() - { - return this.maxEnergy - this.energy; - } - - @Override - public int getSinkTier() - { - return this.tier; - } - - @Override - public double injectEnergy(final ForgeDirection directionFrom, final double amount, final double voltage) - { - if (this.energy >= this.maxEnergy) { - return amount; - } - this.energy += amount; - return 0.0D; - } - - public final float getChargeLevel() - { - return this.guiChargeLevel; - } - - public void setTier(final int tier1) - { - if (this.tier == tier1) { - return; - } - final boolean addedToENet = this.addedToEnergyNet; - if (addedToENet) - { - MinecraftForge.EVENT_BUS.post(new EnergyTileUnloadEvent(this)); - this.addedToEnergyNet = false; - } - this.tier = tier1; - - for (int i=0; i<this.inventoryTool.getSizeInventory(); i++){ - //this.inventoryTool..setTier(tier1); TODO - } - - if (addedToENet) - { - MinecraftForge.EVENT_BUS.post(new EnergyTileLoadEvent(this)); - this.addedToEnergyNet = true; - } - } - - @Override - public List<String> getNetworkedFields(){ - final List<String> ret = new Vector(2); - ret.add("facing"); - return ret; - } - - - @Override - public boolean wrenchCanSetFacing(final EntityPlayer entityPlayer, final int side) - { - return false; - } - - @Override - public void setFacing(final short facing1) - { - this.facing = facing1; - if (this.prevFacing != facing1) { - IC2.network.get().updateTileEntityField(this, "facing"); - } - this.prevFacing = facing1; - } - - @Override - public short getFacing() - { - return this.facing; - } - - - @Override - public boolean wrenchCanRemove(final EntityPlayer entityPlayer) - { - return true; - } - - @Override - public float getWrenchDropRate() - { - return 1.0F; - } - - @Override - public ItemStack getWrenchDrop(final EntityPlayer entityPlayer) - { - return new ItemStack(this.worldObj.getBlock(this.xCoord, this.yCoord, this.zCoord), 1, this.worldObj.getBlockMetadata(this.xCoord, this.yCoord, this.zCoord)); - } - - @Override - public void onNetworkUpdate(final String field) { - - this.prevFacing = this.facing; - - } - -}
\ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/util/math/MathUtils.java b/src/main/java/gtPlusPlus/core/util/math/MathUtils.java index ef5db6e4e0..4ff929c643 100644 --- a/src/main/java/gtPlusPlus/core/util/math/MathUtils.java +++ b/src/main/java/gtPlusPlus/core/util/math/MathUtils.java @@ -16,12 +16,12 @@ public class MathUtils { final static Random rand = CORE.RANDOM; - /** Formats a number with group separator and at most 2 fraction digits. */ - private static final NumberFormat sNumberFormat = NumberFormat.getInstance(); - - static { - sNumberFormat.setMaximumFractionDigits(2); - } + /** Formats a number with group separator and at most 2 fraction digits. */ + private static final NumberFormat sNumberFormat = NumberFormat.getInstance(); + + static { + sNumberFormat.setMaximumFractionDigits(2); + } /** * Returns a psuedo-random number between min and max, inclusive. @@ -567,7 +567,7 @@ public class MathUtils { return 0; } } - + public static <V> V safeCast(Object aNumberType) { long a1; double a2; @@ -586,7 +586,7 @@ public class MathUtils { String s = ""+a1; Short s1 = Short.valueOf(s); return (V) s1; - + } } else if ((aNumberType.getClass() == int.class) || (aNumberType instanceof Integer)){ @@ -594,7 +594,7 @@ public class MathUtils { String s = ""+a1; Integer s1 = Integer.valueOf(s); return (V) s1; - + } } else if ((aNumberType.getClass() == long.class) || (aNumberType instanceof Long)){ @@ -609,7 +609,7 @@ public class MathUtils { String s = ""+a1; Float s1 = Float.valueOf(s); return (V) s1; - + } } else if ((aNumberType.getClass() == double.class) || (aNumberType instanceof Double)){ @@ -617,40 +617,40 @@ public class MathUtils { String s = ""+a1; Double s1 = Double.valueOf(s); return (V) s1; - + } } - + Integer o = 0; return (V) o; - + } - + public static byte getSafeByte(Byte b) { Byte a = safeCast(b); return a.byteValue(); } - + public static short getSafeShort(Short b) { Short a = safeCast(b); return a.shortValue(); } - + public static int getSafeInt(Integer b) { Integer a = safeCast(b); return a.intValue(); } - + public static long getSafeLong(Long b) { Long a = safeCast(b); return a.longValue(); } - + public static float getSafeFloat(Float b) { Float a = safeCast(b); return a.floatValue(); } - + public static double getSafeDouble(Double b) { Double a = safeCast(b); return a.doubleValue(); @@ -712,7 +712,7 @@ public class MathUtils { public static int balance(int aInput, int aMin, int aMax) { return Math.max(Math.min(aInput, aMax), aMin); } - + /** * Balances a number within a range. * @param aInput - The number to balance @@ -723,7 +723,7 @@ public class MathUtils { public static Number balance(Number aInput, Number aMin, Number aMax) { return max(min(aInput, aMax), aMin); } - + /** * Balances a number within a range. * @param aInput - The number to balance @@ -734,7 +734,7 @@ public class MathUtils { public static int balanceInt(Number aInput, Number aMin, Number aMax) { return MathUtils.safeCast_LongToInt((long) balance(max(min(aInput, aMax), aMin), Integer.MIN_VALUE, Integer.MAX_VALUE)); } - + /** * Balances a number within a range. * @param aInput - The number to balance @@ -750,51 +750,62 @@ public class MathUtils { int aAmount = Math.max(Math.min(i, aMax), aMin); return aAmount; } - + public static Pair<Integer, Integer> splitLongIntoIntegers(long aLong){ int aIntMaxInLong = (int) Math.min(Integer.MAX_VALUE, Math.floor(aLong/Integer.MAX_VALUE)); int aRemainder = (int) (aLong - (aIntMaxInLong * Integer.MAX_VALUE)); return new Pair<Integer, Integer>(aIntMaxInLong, aRemainder); } - - - /** - * Returns the smaller of two {@code Number}s. That is, - * the result the argument closer to the value of - * {@link Long#MIN_VALUE}. If the arguments have the same - * value, the result is that same value. - * - * @param a an argument. - * @param b another argument. - * @return the smaller of {@code a} and {@code b}. - */ - public static Number min(Number a, Number b) { - return (a.longValue() <= b.longValue()) ? a : b; - } - - /** - * Returns the greater of two {@code Number}s. That is, the - * result is the argument closer to the value of - * {@link Long#MAX_VALUE}. If the arguments have the same value, - * the result is that same value. - * - * @param a an argument. - * @param b another argument. - * @return the larger of {@code a} and {@code b}. - */ - public static Number max(Number a, Number b) { - return (a.longValue() >= b.longValue()) ? a : b; - } - - public static String formatNumbers(long aNumber) { - return sNumberFormat.format(aNumber); - } - - public static String formatNumbers(double aNumber) { - return sNumberFormat.format(aNumber); - } + + + /** + * Returns the smaller of two {@code Number}s. That is, + * the result the argument closer to the value of + * {@link Long#MIN_VALUE}. If the arguments have the same + * value, the result is that same value. + * + * @param a an argument. + * @param b another argument. + * @return the smaller of {@code a} and {@code b}. + */ + public static Number min(Number a, Number b) { + return (a.longValue() <= b.longValue()) ? a : b; + } + + /** + * Returns the greater of two {@code Number}s. That is, the + * result is the argument closer to the value of + * {@link Long#MAX_VALUE}. If the arguments have the same value, + * the result is that same value. + * + * @param a an argument. + * @param b another argument. + * @return the larger of {@code a} and {@code b}. + */ + public static Number max(Number a, Number b) { + return (a.longValue() >= b.longValue()) ? a : b; + } + + public static long combineTwoIntegersToLong(int a, int b) { + long val = (((long) a) << 32) | (b & 0xffffffffL); + return val; + } + public static int[] splitLongIntoTwoIntegers(long aNum) { + int a = (int) (aNum >> 32); + int b = (int) aNum; + return new int[] {a, b}; + } + + public static String formatNumbers(long aNumber) { + return sNumberFormat.format(aNumber); + } + + public static String formatNumbers(double aNumber) { + return sNumberFormat.format(aNumber); + } + } diff --git a/src/main/java/gtPlusPlus/core/util/minecraft/MaterialUtils.java b/src/main/java/gtPlusPlus/core/util/minecraft/MaterialUtils.java index 0323bf0161..0ccd752775 100644 --- a/src/main/java/gtPlusPlus/core/util/minecraft/MaterialUtils.java +++ b/src/main/java/gtPlusPlus/core/util/minecraft/MaterialUtils.java @@ -18,6 +18,7 @@ import gtPlusPlus.core.client.CustomTextureSet.TextureSets; import gtPlusPlus.core.item.base.BaseItemComponent; import gtPlusPlus.core.item.base.BaseItemComponent.ComponentTypes; import gtPlusPlus.core.item.base.plates.BaseItemPlateHeavy; +import gtPlusPlus.core.item.base.wire.BaseItemFineWire; import gtPlusPlus.core.lib.CORE; import gtPlusPlus.core.material.Material; import gtPlusPlus.core.material.MaterialStack; @@ -457,6 +458,9 @@ public class MaterialUtils { if (aType == ComponentTypes.PLATEHEAVY) { aGC = new BaseItemPlateHeavy(aMaterial); } + else if (aType == ComponentTypes.FINEWIRE) { + aGC = new BaseItemFineWire(aMaterial); + } else { aGC = new BaseItemComponent(aMaterial, aType); } diff --git a/src/main/java/gtPlusPlus/core/util/minecraft/RecipeUtils.java b/src/main/java/gtPlusPlus/core/util/minecraft/RecipeUtils.java index da5bc071bc..595635d411 100644 --- a/src/main/java/gtPlusPlus/core/util/minecraft/RecipeUtils.java +++ b/src/main/java/gtPlusPlus/core/util/minecraft/RecipeUtils.java @@ -703,14 +703,14 @@ public static int mInvalidID = 1; CORE.crash("Bad Shaped Recipe."); } } - Logger.INFO("Using String: "+aFullString); + Logger.RECIPE("Using String: "+aFullString); String aRow1 = aFullString.substring(0, 3); String aRow2 = aFullString.substring(3, 6); String aRow3 = aFullString.substring(6, 9); - Logger.INFO(""+aRow1); - Logger.INFO(""+aRow2); - Logger.INFO(""+aRow3); + Logger.RECIPE(""+aRow1); + Logger.RECIPE(""+aRow2); + Logger.RECIPE(""+aRow3); String[] aStringData = new String[] {aRow1, aRow2, aRow3}; Object[] aDataObject = new Object[19]; @@ -730,10 +730,10 @@ public static int mInvalidID = 1; aIndex++; } - Logger.INFO("Data Size: "+aDataObject.length); + Logger.RECIPE("Data Size: "+aDataObject.length); aDataObject = ArrayUtils.removeNulls(aDataObject); - Logger.INFO("Clean Size: "+aDataObject.length); - Logger.INFO("ArrayData: "+Arrays.toString(aDataObject)); + Logger.RECIPE("Clean Size: "+aDataObject.length); + Logger.RECIPE("ArrayData: "+Arrays.toString(aDataObject)); ShapedOreRecipe aRecipe = new ShapedOreRecipe(aOutputStack, aDataObject); diff --git a/src/main/java/gtPlusPlus/core/util/reflect/ReflectionUtils.java b/src/main/java/gtPlusPlus/core/util/reflect/ReflectionUtils.java index 48cdb18d7c..a5e0bea0cb 100644 --- a/src/main/java/gtPlusPlus/core/util/reflect/ReflectionUtils.java +++ b/src/main/java/gtPlusPlus/core/util/reflect/ReflectionUtils.java @@ -22,7 +22,6 @@ import com.google.common.reflect.ClassPath; import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.util.data.StringUtils; -import gtPlusPlus.xmod.gregtech.common.StaticFields59; public class ReflectionUtils { @@ -271,6 +270,21 @@ public class ReflectionUtils { } } + public static Field[] getAllFields(final Class<?> aClass) { + if (aClass == null) { + return null; + } + Field[] aFields = aClass.getDeclaredFields(); + for (Field f : aFields) { + CachedField y = mCachedFields.get(aClass.getName()+"."+f.getName()); + if (y == null) { + makeFieldAccessible(f); + cacheField(aClass, f); + } + } + return aFields; + } + /** * Returns a cached {@link Field} object. * @param aInstance - {@link Object} to get the field instance from. @@ -335,6 +349,9 @@ public class ReflectionUtils { public static String getMethodName(final int depth) { final StackTraceElement[] ste = new Throwable().getStackTrace(); //System. out.println(ste[ste.length-depth].getClassName()+"#"+ste[ste.length-depth].getMethodName()); + if (ste.length < depth) { + return "No valid stack."; + } return ste[depth+1].getMethodName(); } @@ -441,7 +458,7 @@ public class ReflectionUtils { t.printStackTrace(); } } - + /** * Allows to change the state of an immutable instance. Huh?!? */ @@ -529,7 +546,7 @@ public class ReflectionUtils { Logger.REFLECTION("Invoke failed or did something wrong."); return false; } - + public static boolean invokeVoid(Object objectInstance, Method method, Object[] values){ if (method == null || values == null || (!ReflectionUtils.isStaticMethod(method) && objectInstance == null)){ //Logger.REFLECTION("Null value when trying to Dynamically invoke "+methodName+" on an object of type: "+objectInstance.getClass().getName()); @@ -543,8 +560,8 @@ public class ReflectionUtils { if (mInvokingMethod != null){ Logger.REFLECTION(methodName+" was not null."); mInvokingMethod.invoke(objectInstance, values); - Logger.REFLECTION("Successfully invoked "+methodName+"."); - return true; + Logger.REFLECTION("Successfully invoked "+methodName+"."); + return true; } } catch (SecurityException | IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { @@ -589,7 +606,7 @@ public class ReflectionUtils { String classname = objectInstance != null ? objectInstance.getClass().getCanonicalName() : method.getDeclaringClass().getCanonicalName(); Logger.REFLECTION("Trying to invoke "+methodName+" on an instance of "+classname+"."); try { - return method.invoke(objectInstance, values); + return method.invoke(objectInstance, values); } catch (SecurityException | IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { Logger.REFLECTION("Failed to Dynamically invoke "+methodName+" on an object of type: "+classname); |