diff options
author | Technus <daniel112092@gmail.com> | 2017-04-27 17:06:22 +0200 |
---|---|---|
committer | Technus <daniel112092@gmail.com> | 2017-04-27 17:06:22 +0200 |
commit | 929073a7aea2ff925aa04403be746398b1fc57e7 (patch) | |
tree | 8f162d84344aeadbef04b3e313fdd8e5438130c0 /src/main/java/gregtech/common | |
parent | 2ee3b7e712413604549af3097fda93cbb22a262e (diff) | |
parent | f5e078aa1eb2da76585d620afa91903f0dbdd031 (diff) | |
download | GT5-Unofficial-929073a7aea2ff925aa04403be746398b1fc57e7.tar.gz GT5-Unofficial-929073a7aea2ff925aa04403be746398b1fc57e7.tar.bz2 GT5-Unofficial-929073a7aea2ff925aa04403be746398b1fc57e7.zip |
Merge branch 'experimental' from GTNH into mergeGTNH (based on BLOODASP)
# Conflicts:
# build.properties
# src/main/java/gregtech/GT_Mod.java
# src/main/java/gregtech/api/enums/ItemList.java
# src/main/java/gregtech/api/enums/Materials.java
# src/main/java/gregtech/api/enums/Textures.java
# src/main/java/gregtech/api/enums/Tier.java
# src/main/java/gregtech/api/items/GT_MetaGenerated_Tool.java
# src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java
# src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Fluid.java
# src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicGenerator.java
# src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine.java
# src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Maintenance.java
# src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler.java
# src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java
# src/main/java/gregtech/api/util/GT_ModHandler.java
# src/main/java/gregtech/api/util/GT_Recipe.java
# src/main/java/gregtech/api/util/GT_RecipeRegistrator.java
# src/main/java/gregtech/api/util/GT_Utility.java
# src/main/java/gregtech/common/GT_Client.java
# src/main/java/gregtech/common/GT_Pollution.java
# src/main/java/gregtech/common/GT_Proxy.java
# src/main/java/gregtech/common/GT_RecipeAdder.java
# src/main/java/gregtech/common/GT_Worldgen_GT_Ore_Layer.java
# src/main/java/gregtech/common/GT_Worldgenerator.java
# src/main/java/gregtech/common/blocks/GT_Block_Casings3.java
# src/main/java/gregtech/common/blocks/GT_Block_Casings_Abstract.java
# src/main/java/gregtech/common/blocks/GT_Block_Machines.java
# src/main/java/gregtech/common/blocks/GT_Block_Stones_Abstract.java
# src/main/java/gregtech/common/blocks/GT_Item_Machines.java
# src/main/java/gregtech/common/blocks/GT_Item_Ores.java
# src/main/java/gregtech/common/blocks/GT_TileEntity_Ores.java
# src/main/java/gregtech/common/covers/GT_Cover_FluidRegulator.java
# src/main/java/gregtech/common/covers/GT_Cover_Fluidfilter.java
# src/main/java/gregtech/common/covers/GT_Cover_ItemMeter.java
# src/main/java/gregtech/common/gui/GT_Container_Regulator.java
# src/main/java/gregtech/common/items/GT_IntegratedCircuit_Item.java
# src/main/java/gregtech/common/items/GT_MetaGenerated_Item_01.java
# src/main/java/gregtech/common/items/GT_MetaGenerated_Item_02.java
# src/main/java/gregtech/common/items/GT_MetaGenerated_Item_03.java
# src/main/java/gregtech/common/items/GT_MetaGenerated_Tool_01.java
# src/main/java/gregtech/common/items/armor/ArmorData.java
# src/main/java/gregtech/common/items/armor/GuiElectricArmor1.java
# src/main/java/gregtech/common/items/armor/ModularArmor_Item.java
# src/main/java/gregtech/common/items/armor/Values.java
# src/main/java/gregtech/common/items/armor/gui/GuiModularArmor.java
# src/main/java/gregtech/common/items/armor/gui/InventoryArmor.java
# src/main/java/gregtech/common/items/behaviors/Behaviour_Plunger_Fluid.java
# src/main/java/gregtech/common/items/behaviors/Behaviour_Sense.java
# src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_Regulator.java
# src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_TypeFilter.java
# src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Bronze.java
# src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Lava.java
# src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Steel.java
# src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_DieselGenerator.java
# src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_FluidNaquadahReactor.java
# src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_SolidNaquadahReactor.java
# src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_SteamTurbine.java
# src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_AdvSeismicProspector.java
# src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Disassembler.java
# src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Massfabricator.java
# src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Replicator.java
# src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Scanner.java
# src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Teleporter.java
# src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AdvMiner2.java
# src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AssemblyLine.java
# src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BronzeBlastFurnace.java
# src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Charcoal_Pit.java
# src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DieselEngine.java
# src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ElectricBlastFurnace.java
# src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ImplosionCompressor.java
# src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler.java
# src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine.java
# src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Gas.java
# src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Plasma.java
# src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Steam.java
# src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_MultiFurnace.java
# src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilCracker.java
# src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrill.java
# src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ProcessingArray.java
# src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_VacuumFreezer.java
# src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Compressor_Bronze.java
# src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Compressor_Steel.java
# src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Extractor_Bronze.java
# src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Extractor_Steel.java
# src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Macerator_Steel.java
# src/main/java/gregtech/common/tools/GT_Tool_Scoop.java
# src/main/java/gregtech/loaders/load/GT_FuelLoader.java
# src/main/java/gregtech/loaders/misc/GT_Achievements.java
# src/main/java/gregtech/loaders/oreprocessing/ProcessingBlock.java
# src/main/java/gregtech/loaders/oreprocessing/ProcessingCircuit.java
# src/main/java/gregtech/loaders/oreprocessing/ProcessingDust.java
# src/main/java/gregtech/loaders/oreprocessing/ProcessingDustSmall.java
# src/main/java/gregtech/loaders/oreprocessing/ProcessingDustTiny.java
# src/main/java/gregtech/loaders/oreprocessing/ProcessingGemExquisite.java
# src/main/java/gregtech/loaders/oreprocessing/ProcessingGemFlawless.java
# src/main/java/gregtech/loaders/oreprocessing/ProcessingNugget.java
# src/main/java/gregtech/loaders/oreprocessing/ProcessingOre.java
# src/main/java/gregtech/loaders/oreprocessing/ProcessingPipeLarge.java
# src/main/java/gregtech/loaders/oreprocessing/ProcessingPipeMedium.java
# src/main/java/gregtech/loaders/oreprocessing/ProcessingPipeSmall.java
# src/main/java/gregtech/loaders/oreprocessing/ProcessingPlate1.java
# src/main/java/gregtech/loaders/oreprocessing/ProcessingPlate2.java
# src/main/java/gregtech/loaders/oreprocessing/ProcessingPlate3.java
# src/main/java/gregtech/loaders/oreprocessing/ProcessingPlate4.java
# src/main/java/gregtech/loaders/oreprocessing/ProcessingPlate5.java
# src/main/java/gregtech/loaders/oreprocessing/ProcessingStickLong.java
# src/main/java/gregtech/loaders/oreprocessing/ProcessingToolHeadBuzzSaw.java
# src/main/java/gregtech/loaders/oreprocessing/ProcessingToolHeadChainsaw.java
# src/main/java/gregtech/loaders/oreprocessing/ProcessingToolHeadDrill.java
# src/main/java/gregtech/loaders/oreprocessing/ProcessingToolHeadFile.java
# src/main/java/gregtech/loaders/oreprocessing/ProcessingToolHeadHammer.java
# src/main/java/gregtech/loaders/oreprocessing/ProcessingToolHeadWrench.java
# src/main/java/gregtech/loaders/oreprocessing/ProcessingWire01.java
# src/main/java/gregtech/loaders/oreprocessing/ProcessingWire02.java
# src/main/java/gregtech/loaders/oreprocessing/ProcessingWire04.java
# src/main/java/gregtech/loaders/oreprocessing/ProcessingWire08.java
# src/main/java/gregtech/loaders/oreprocessing/ProcessingWire12.java
# src/main/java/gregtech/loaders/oreprocessing/ProcessingWire16.java
# src/main/java/gregtech/loaders/postload/GT_CraftingRecipeLoader.java
# src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java
# src/main/java/gregtech/loaders/postload/GT_Worldgenloader.java
# src/main/java/gregtech/loaders/preload/GT_Loader_ItemData.java
# src/main/java/gregtech/loaders/preload/GT_Loader_Item_Block_And_Fluid.java
# src/main/java/gregtech/loaders/preload/GT_Loader_MetaTileEntities.java
# src/main/java/gregtech/loaders/preload/GT_Loader_OreProcessing.java
# src/main/java/gregtech/nei/GT_NEI_DefaultHandler.java
# src/main/resources/assets/gregtech/textures/items/gt.Double_Naquadahcell.png
# src/main/resources/assets/gregtech/textures/items/gt.Double_NaquadahcellDep.png
# src/main/resources/assets/gregtech/textures/items/gt.Naquadahcell.png
# src/main/resources/assets/gregtech/textures/items/gt.NaquadahcellDep.png
# src/main/resources/assets/gregtech/textures/items/gt.Quad_Naquadahcell.png
# src/main/resources/assets/gregtech/textures/items/gt.Quad_NaquadahcellDep.png
Diffstat (limited to 'src/main/java/gregtech/common')
237 files changed, 15436 insertions, 13256 deletions
diff --git a/src/main/java/gregtech/common/GT_Client.java b/src/main/java/gregtech/common/GT_Client.java index ff4968cd16..1a3ed25e6c 100644 --- a/src/main/java/gregtech/common/GT_Client.java +++ b/src/main/java/gregtech/common/GT_Client.java @@ -9,14 +9,18 @@ import codechicken.lib.vec.Rotation; import cpw.mods.fml.client.registry.RenderingRegistry; import cpw.mods.fml.common.eventhandler.SubscribeEvent; import cpw.mods.fml.common.gameevent.TickEvent; +import gregtech.GT_Mod; import gregtech.api.GregTech_API; +import gregtech.api.enums.ConfigCategories; import gregtech.api.enums.GT_Values; import gregtech.api.enums.Materials; import gregtech.api.interfaces.tileentity.ICoverable; import gregtech.api.interfaces.tileentity.ITurnable; import gregtech.api.metatileentity.BaseMetaPipeEntity; +import gregtech.api.objects.GT_FluidStack; import gregtech.api.util.GT_Log; import gregtech.api.util.GT_PlayedSound; +import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Utility; import gregtech.common.entities.GT_Entity_Arrow; import gregtech.common.entities.GT_Entity_Arrow_Potion; @@ -27,9 +31,12 @@ import net.minecraft.client.Minecraft; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; +import net.minecraft.stats.StatFileWriter; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.ChatComponentText; import net.minecraft.world.World; import net.minecraftforge.client.event.DrawBlockHighlightEvent; +import net.minecraftforge.oredict.OreDictionary; import org.lwjgl.opengl.GL11; import java.net.URL; @@ -69,12 +76,17 @@ public class GT_Client extends GT_Proxy private final List mMoltenNegB; private final List mMoltenNegA = Arrays.asList(new Object[0]); private long mAnimationTick; + /**This is the place to def the value used below**/ + private long afterSomeTime; private boolean mAnimationDirection; - + private boolean isFirstClientPlayerTick; + private String mMessage; public GT_Client() { - mCapeRenderer = new GT_CapeRenderer(mCapeList); + mCapeRenderer = new GT_CapeRenderer(mCapeList); mAnimationTick = 0L; mAnimationDirection = false; + isFirstClientPlayerTick = true; + mMessage = ""; mPosR = Arrays.asList(new Materials[]{ /**Materials.ChargedCertusQuartz, **/Materials.Enderium, Materials.Vinteum, Materials.Uranium235, Materials.InfusedGold, Materials.Plutonium241, Materials.NaquadahEnriched, Materials.Naquadria, Materials.InfusedOrder, Materials.Force, Materials.Pyrotheum, Materials.Sunnarium, Materials.Glowstone, Materials.Thaumium, Materials.InfusedVis, Materials.InfusedAir, Materials.InfusedFire, Materials.FierySteel, Materials.Firestone @@ -182,6 +194,7 @@ public class GT_Client extends GT_Proxy String tName = arr$[i$]; mCapeList.add(tName.toLowerCase()); } + (new Thread(this)).start(); } @@ -206,7 +219,9 @@ public class GT_Client extends GT_Proxy GregTech_API.METATILEENTITIES[i].getStackForm(1L).getTooltip(null, true); i++; } while (true); - } catch (Throwable e) {e.printStackTrace(GT_Log.err);} + } catch (Throwable e) { + e.printStackTrace(GT_Log.err); + } // super.onPostLoad(); @@ -222,7 +237,7 @@ public class GT_Client extends GT_Proxy public void run() { try { - GT_Log.out.println("Skip: GT_Mod: Downloading Cape List."); + GT_Log.out.println("GT_Mod: Downloading Cape List."); @SuppressWarnings("resource") Scanner tScanner = new Scanner(new URL("http://gregtech.overminddl1.com/com/gregoriust/gregtech/supporterlist.txt").openStream()); while (tScanner.hasNextLine()) { @@ -233,15 +248,35 @@ public class GT_Client extends GT_Proxy } } catch (Throwable e) { } - /**try { - GT_Log.out.println("Skip: GT_Mod: Downloading News."); + try { + GT_Log.out.println("GT New Horizons: Downloading Cape List."); + @SuppressWarnings("resource") + Scanner tScanner = new Scanner(new URL("https://raw.githubusercontent.com/GTNewHorizons/CustomGTCapeHook-Cape-List/master/capes.txt").openStream()); + while (tScanner.hasNextLine()) { + String tName = tScanner.nextLine(); + if (tName.contains(":")) { + int splitLocation = tName.indexOf(":"); + String username = tName.substring(0, splitLocation); + if (!this.mCapeList.contains(username.toLowerCase()) && !this.mCapeList.contains(tName.toLowerCase())) { + this.mCapeList.add(tName.toLowerCase()); + } + } else { + if (!this.mCapeList.contains(tName.toLowerCase())) { + this.mCapeList.add(tName.toLowerCase()); + } + } + } + } catch (Throwable e) { + } + try { + GT_Log.out.println("GT_Mod: Downloading News."); @SuppressWarnings("resource") Scanner tScanner = new Scanner(new URL("http://files.minecraftforge.net/maven/com/gregoriust/gregtech/message.txt").openStream()); while (tScanner.hasNextLine()) { this.mMessage = (this.mMessage + tScanner.nextLine() + " "); } } catch (Throwable e) { - }**/ + } } @SubscribeEvent @@ -252,6 +287,16 @@ public class GT_Client extends GT_Proxy @SubscribeEvent public void onPlayerTickEventClient(TickEvent.PlayerTickEvent aEvent) { if ((aEvent.side.isClient()) && (aEvent.phase == TickEvent.Phase.END) && (!aEvent.player.isDead)) { + afterSomeTime++; + if(afterSomeTime>=100L){ + afterSomeTime=0; + StatFileWriter sfw= Minecraft.getMinecraft().thePlayer.getStatFileWriter(); + try { + for(GT_Recipe recipe:GT_Recipe.GT_Recipe_Map.sAssemblylineFakeRecipes.mRecipeList){ + recipe.mHidden=!sfw.hasAchievementUnlocked(GT_Mod.achievements.getAchievement(recipe.getOutput(0).getUnlocalizedName())); + } + }catch (Exception e){} + } ArrayList<GT_PlayedSound> tList = new ArrayList(); for (Map.Entry<GT_PlayedSound, Integer> tEntry : GT_Utility.sPlayedSoundMap.entrySet()) { if (tEntry.getValue().intValue() < 0) {//Integer -> Integer -> int? >_<, fix @@ -327,6 +372,12 @@ public class GT_Client extends GT_Proxy @SubscribeEvent public void onClientTickEvent(cpw.mods.fml.common.gameevent.TickEvent.ClientTickEvent aEvent) { if (aEvent.phase == cpw.mods.fml.common.gameevent.TickEvent.Phase.END) { + if(changeDetected>0)changeDetected--; + int newHideValue=shouldHeldItemHideThings(); + if(newHideValue!=hideValue){ + hideValue=newHideValue; + changeDetected=5; + } mAnimationTick++; if (mAnimationTick % 50L == 0L) {mAnimationDirection = !mAnimationDirection;} @@ -493,4 +544,27 @@ public class GT_Client extends GT_Proxy else aWorld.playSound(aX, aY, aZ, tString, 3F, tString.startsWith("note.") ? (float) Math.pow(2D, (double) (aStack.stackSize - 13) / 12D) : 1.0F, false); } -}
\ No newline at end of file + + public static int hideValue=0; + public static int changeDetected=0; + + private static int shouldHeldItemHideThings() { + try { + EntityPlayer player = Minecraft.getMinecraft().thePlayer; + if (player == null) return 0; + ItemStack held = player.getCurrentEquippedItem(); + if (held == null) return 0; + int[] ids = OreDictionary.getOreIDs(held); + int hide = 0; + for (int i : ids) { + if (OreDictionary.getOreName(i).equals("craftingToolSolderingIron")) { + hide |= 0x1; + break; + } + } + return hide; + }catch(Exception e){ + return 0; + } + } +} diff --git a/src/main/java/gregtech/common/GT_DummyWorld.java b/src/main/java/gregtech/common/GT_DummyWorld.java index f542730b3e..b2c15c6a0d 100644 --- a/src/main/java/gregtech/common/GT_DummyWorld.java +++ b/src/main/java/gregtech/common/GT_DummyWorld.java @@ -1,132 +1,132 @@ -package gregtech.common;
-
-import net.minecraft.block.Block;
-import net.minecraft.entity.Entity;
-import net.minecraft.init.Blocks;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.profiler.Profiler;
-import net.minecraft.world.World;
-import net.minecraft.world.WorldProvider;
-import net.minecraft.world.WorldSettings;
-import net.minecraft.world.biome.BiomeGenBase;
-import net.minecraft.world.chunk.IChunkProvider;
-import net.minecraft.world.chunk.storage.IChunkLoader;
-import net.minecraft.world.storage.IPlayerFileData;
-import net.minecraft.world.storage.ISaveHandler;
-import net.minecraft.world.storage.WorldInfo;
-
-import java.io.File;
-
-public class GT_DummyWorld
- extends World {
- public GT_IteratorRandom mRandom = new GT_IteratorRandom();
- public ItemStack mLastSetBlock = null;
-
- public GT_DummyWorld(ISaveHandler par1iSaveHandler, String par2Str, WorldProvider par3WorldProvider, WorldSettings par4WorldSettings, Profiler par5Profiler) {
- super(par1iSaveHandler, par2Str, par4WorldSettings, par3WorldProvider, par5Profiler);
- this.rand = this.mRandom;
- }
-
- public GT_DummyWorld() {
- this(new ISaveHandler() {
- public void saveWorldInfoWithPlayer(WorldInfo var1, NBTTagCompound var2) {
- }
-
- public void saveWorldInfo(WorldInfo var1) {
- }
-
- public WorldInfo loadWorldInfo() {
- return null;
- }
-
- public IPlayerFileData getSaveHandler() {
- return null;
- }
-
- public File getMapFileFromName(String var1) {
- return null;
- }
-
- public IChunkLoader getChunkLoader(WorldProvider var1) {
- return null;
- }
-
- public void flush() {
- }
-
- public void checkSessionLock() {
- }
-
- public String getWorldDirectoryName() {
- return null;
- }
-
- public File getWorldDirectory() {
- return null;
- }
- }, "DUMMY_DIMENSION", null,
-// new WorldProvider(),
-//
-//
-//
-// new WorldSettings(new WorldInfo(new NBTTagCompound()))
-// {
-// public String getDimensionName()
-// {
-// return "DUMMY_DIMENSION";
-// }
-// }
- new WorldSettings(new WorldInfo(new NBTTagCompound())), new Profiler());
- }
-
- protected IChunkProvider createChunkProvider() {
- return null;
- }
-
- public Entity getEntityByID(int aEntityID) {
- return null;
- }
-
- public boolean setBlock(int aX, int aY, int aZ, Block aBlock, int aMeta, int aFlags) {
- this.mLastSetBlock = new ItemStack(aBlock, 1, aMeta);
- return true;
- }
-
- public float getSunBrightnessFactor(float p_72967_1_) {
- return 1.0F;
- }
-
- public BiomeGenBase getBiomeGenForCoords(int aX, int aZ) {
- if ((aX >= 16) && (aZ >= 16) && (aX < 32) && (aZ < 32)) {
- return BiomeGenBase.plains;
- }
- return BiomeGenBase.ocean;
- }
-
- public int getFullBlockLightValue(int aX, int aY, int aZ) {
- return 10;
- }
-
- public Block getBlock(int aX, int aY, int aZ) {
- if ((aX >= 16) && (aZ >= 16) && (aX < 32) && (aZ < 32)) {
- return aY == 64 ? Blocks.grass : Blocks.air;
- }
- return Blocks.air;
- }
-
- public int getBlockMetadata(int aX, int aY, int aZ) {
- return 0;
- }
-
- public boolean canBlockSeeTheSky(int aX, int aY, int aZ) {
- if ((aX >= 16) && (aZ >= 16) && (aX < 32) && (aZ < 32)) {
- return aY > 64;
- }
- return true;
- }
-
- protected int func_152379_p() {
- return 0;
- }
-}
+package gregtech.common; + +import net.minecraft.block.Block; +import net.minecraft.entity.Entity; +import net.minecraft.init.Blocks; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.profiler.Profiler; +import net.minecraft.world.World; +import net.minecraft.world.WorldProvider; +import net.minecraft.world.WorldSettings; +import net.minecraft.world.biome.BiomeGenBase; +import net.minecraft.world.chunk.IChunkProvider; +import net.minecraft.world.chunk.storage.IChunkLoader; +import net.minecraft.world.storage.IPlayerFileData; +import net.minecraft.world.storage.ISaveHandler; +import net.minecraft.world.storage.WorldInfo; + +import java.io.File; + +public class GT_DummyWorld + extends World { + public GT_IteratorRandom mRandom = new GT_IteratorRandom(); + public ItemStack mLastSetBlock = null; + + public GT_DummyWorld(ISaveHandler par1iSaveHandler, String par2Str, WorldProvider par3WorldProvider, WorldSettings par4WorldSettings, Profiler par5Profiler) { + super(par1iSaveHandler, par2Str, par4WorldSettings, par3WorldProvider, par5Profiler); + this.rand = this.mRandom; + } + + public GT_DummyWorld() { + this(new ISaveHandler() { + public void saveWorldInfoWithPlayer(WorldInfo var1, NBTTagCompound var2) { + } + + public void saveWorldInfo(WorldInfo var1) { + } + + public WorldInfo loadWorldInfo() { + return null; + } + + public IPlayerFileData getSaveHandler() { + return null; + } + + public File getMapFileFromName(String var1) { + return null; + } + + public IChunkLoader getChunkLoader(WorldProvider var1) { + return null; + } + + public void flush() { + } + + public void checkSessionLock() { + } + + public String getWorldDirectoryName() { + return null; + } + + public File getWorldDirectory() { + return null; + } + }, "DUMMY_DIMENSION", null, +// new WorldProvider(), +// +// +// +// new WorldSettings(new WorldInfo(new NBTTagCompound())) +// { +// public String getDimensionName() +// { +// return "DUMMY_DIMENSION"; +// } +// } + new WorldSettings(new WorldInfo(new NBTTagCompound())), new Profiler()); + } + + protected IChunkProvider createChunkProvider() { + return null; + } + + public Entity getEntityByID(int aEntityID) { + return null; + } + + public boolean setBlock(int aX, int aY, int aZ, Block aBlock, int aMeta, int aFlags) { + this.mLastSetBlock = new ItemStack(aBlock, 1, aMeta); + return true; + } + + public float getSunBrightnessFactor(float p_72967_1_) { + return 1.0F; + } + + public BiomeGenBase getBiomeGenForCoords(int aX, int aZ) { + if ((aX >= 16) && (aZ >= 16) && (aX < 32) && (aZ < 32)) { + return BiomeGenBase.plains; + } + return BiomeGenBase.ocean; + } + + public int getFullBlockLightValue(int aX, int aY, int aZ) { + return 10; + } + + public Block getBlock(int aX, int aY, int aZ) { + if ((aX >= 16) && (aZ >= 16) && (aX < 32) && (aZ < 32)) { + return aY == 64 ? Blocks.grass : Blocks.air; + } + return Blocks.air; + } + + public int getBlockMetadata(int aX, int aY, int aZ) { + return 0; + } + + public boolean canBlockSeeTheSky(int aX, int aY, int aZ) { + if ((aX >= 16) && (aZ >= 16) && (aX < 32) && (aZ < 32)) { + return aY > 64; + } + return true; + } + + protected int func_152379_p() { + return 0; + } +} diff --git a/src/main/java/gregtech/common/GT_IteratorRandom.java b/src/main/java/gregtech/common/GT_IteratorRandom.java index 31d2a3d07c..79b8c2ae37 100644 --- a/src/main/java/gregtech/common/GT_IteratorRandom.java +++ b/src/main/java/gregtech/common/GT_IteratorRandom.java @@ -1,16 +1,16 @@ -package gregtech.common;
-
-import java.util.Random;
-
-public class GT_IteratorRandom
- extends Random {
- private static final long serialVersionUID = 1L;
- public int mIterationStep = 2147483647;
-
- public int nextInt(int aParameter) {
- if ((this.mIterationStep == 0) || (this.mIterationStep > aParameter)) {
- this.mIterationStep = aParameter;
- }
- return --this.mIterationStep;
- }
-}
+package gregtech.common; + +import java.util.Random; + +public class GT_IteratorRandom + extends Random { + private static final long serialVersionUID = 1L; + public int mIterationStep = 2147483647; + + public int nextInt(int aParameter) { + if ((this.mIterationStep == 0) || (this.mIterationStep > aParameter)) { + this.mIterationStep = aParameter; + } + return --this.mIterationStep; + } +} diff --git a/src/main/java/gregtech/common/GT_MinableOreGenerator.java b/src/main/java/gregtech/common/GT_MinableOreGenerator.java index caf9c04c17..c5249f1f25 100644 --- a/src/main/java/gregtech/common/GT_MinableOreGenerator.java +++ b/src/main/java/gregtech/common/GT_MinableOreGenerator.java @@ -1,81 +1,81 @@ -package gregtech.common;
-
-import net.minecraft.block.Block;
-import net.minecraft.init.Blocks;
-import net.minecraft.util.MathHelper;
-import net.minecraft.world.World;
-import net.minecraft.world.gen.feature.WorldGenerator;
-
-import java.util.Random;
-
-public class GT_MinableOreGenerator
- extends WorldGenerator {
- private Block minableBlockId;
- private Block mBlock;
- private int minableBlockMeta = 0;
- private int numberOfBlocks;
- private boolean allowVoid = false;
-
- public GT_MinableOreGenerator(Block par1, int par2) {
- this.minableBlockId = par1;
- this.numberOfBlocks = par2;
- }
-
- public GT_MinableOreGenerator(Block id, int meta, int number, boolean aAllowVoid, Block aBlock) {
- this(id, number);
- this.minableBlockMeta = meta;
- this.allowVoid = aAllowVoid;
- this.mBlock = aBlock;
- }
-
- public boolean generate(World par1World, Random par2Random, int par3, int par4, int par5) {
- float math_pi = 3.141593F;//FB: CNT - CNT_ROUGH_CONSTANT_VALUE
- float var6 = par2Random.nextFloat() * math_pi;
- float var1s = this.numberOfBlocks / 8.0F;
- int var4s = par4 - 2;int var5s = par3 + 8;int var6s = par5 + 8;
- float var7s = this.numberOfBlocks / 16.0F;
- float var8s = math_pi / this.numberOfBlocks;
- float mh_s_0 = MathHelper.sin(var6) * var1s;float mh_c_0 = MathHelper.cos(var6) * var1s;
- float var7 = var5s + mh_s_0;
- float var11 = var6s + mh_c_0;
- int var15r = par2Random.nextInt(3);int var17r = par2Random.nextInt(3);
- int mh_n_4=var17r - var15r;
- int var15 = var4s + var15r;
- float mh_n_0 = -2*mh_s_0;float mh_n_1 = -2*mh_c_0;
- for (int var19 = 0; var19 <= this.numberOfBlocks; var19++) {
- float mh_n_2 = var19 / this.numberOfBlocks;
- float var20 = var7 + mh_n_0 * mh_n_2;
- float var22 = var15 + mh_n_4 * mh_n_2;
- float var24 = var11 + mh_n_1 * mh_n_2;
- float var26 = par2Random.nextFloat() * var7s;
- float var1c = var19 * var8s;
- float var28 = ((MathHelper.sin(var1c) + 1.0F) * var26 + 1.0F) / 2.0F;
- int var32 = MathHelper.floor_float(var20 - var28);
- int var33 = MathHelper.floor_float(var22 - var28);
- int var34 = MathHelper.floor_float(var24 - var28);
- int var35 = MathHelper.floor_float(var20 + var28);
- int var36 = MathHelper.floor_float(var22 + var28);
- int var37 = MathHelper.floor_float(var24 + var28);
- for (int var38 = var32; var38 <= var35; var38++) {
- float var39 = (var38 + 0.5F - var20) / (var28);
- float var5c = var39 * var39;
- if (var5c < 1.0F) {
- for (int var41 = var33; var41 <= var36; var41++) {
- float var42 = (var41 + 0.5F - var22) / (var28);
- float var7c = var5c + var42 * var42;
- if (var7c < 1.0F) {
- for (int var44 = var34; var44 <= var37; var44++) {
- float var45 = (var44 + 0.5F - var24) / (var28);
- Block block = par1World.getBlock(var38, var41, var44);
- if ((var7c + var45 * var45 < 1.0F) && (((this.allowVoid) && (par1World.getBlock(var38, var41, var44) == Blocks.air)) || ((block != null) && (block.isReplaceableOreGen(par1World, var38, var41, var44, this.mBlock))))) {
- par1World.setBlock(var38, var41, var44, this.minableBlockId, this.minableBlockMeta, 0);
- }
- }
- }
- }
- }
- }
- }
- return true;
- }
-}
\ No newline at end of file +package gregtech.common; + +import net.minecraft.block.Block; +import net.minecraft.init.Blocks; +import net.minecraft.util.MathHelper; +import net.minecraft.world.World; +import net.minecraft.world.gen.feature.WorldGenerator; + +import java.util.Random; + +public class GT_MinableOreGenerator + extends WorldGenerator { + private Block minableBlockId; + private Block mBlock; + private int minableBlockMeta = 0; + private int numberOfBlocks; + private boolean allowVoid = false; + + public GT_MinableOreGenerator(Block par1, int par2) { + this.minableBlockId = par1; + this.numberOfBlocks = par2; + } + + public GT_MinableOreGenerator(Block id, int meta, int number, boolean aAllowVoid, Block aBlock) { + this(id, number); + this.minableBlockMeta = meta; + this.allowVoid = aAllowVoid; + this.mBlock = aBlock; + } + + public boolean generate(World par1World, Random par2Random, int par3, int par4, int par5) { + float math_pi = 3.141593F;//FB: CNT - CNT_ROUGH_CONSTANT_VALUE + float var6 = par2Random.nextFloat() * math_pi; + float var1s = this.numberOfBlocks / 8.0F; + int var4s = par4 - 2;int var5s = par3 + 8;int var6s = par5 + 8; + float var7s = this.numberOfBlocks / 16.0F; + float var8s = math_pi / this.numberOfBlocks; + float mh_s_0 = MathHelper.sin(var6) * var1s;float mh_c_0 = MathHelper.cos(var6) * var1s; + float var7 = var5s + mh_s_0; + float var11 = var6s + mh_c_0; + int var15r = par2Random.nextInt(3);int var17r = par2Random.nextInt(3); + int mh_n_4=var17r - var15r; + int var15 = var4s + var15r; + float mh_n_0 = -2*mh_s_0;float mh_n_1 = -2*mh_c_0; + for (int var19 = 0; var19 <= this.numberOfBlocks; var19++) { + float mh_n_2 = var19 / this.numberOfBlocks; + float var20 = var7 + mh_n_0 * mh_n_2; + float var22 = var15 + mh_n_4 * mh_n_2; + float var24 = var11 + mh_n_1 * mh_n_2; + float var26 = par2Random.nextFloat() * var7s; + float var1c = var19 * var8s; + float var28 = ((MathHelper.sin(var1c) + 1.0F) * var26 + 1.0F) / 2.0F; + int var32 = MathHelper.floor_float(var20 - var28); + int var33 = MathHelper.floor_float(var22 - var28); + int var34 = MathHelper.floor_float(var24 - var28); + int var35 = MathHelper.floor_float(var20 + var28); + int var36 = MathHelper.floor_float(var22 + var28); + int var37 = MathHelper.floor_float(var24 + var28); + for (int var38 = var32; var38 <= var35; var38++) { + float var39 = (var38 + 0.5F - var20) / (var28); + float var5c = var39 * var39; + if (var5c < 1.0F) { + for (int var41 = var33; var41 <= var36; var41++) { + float var42 = (var41 + 0.5F - var22) / (var28); + float var7c = var5c + var42 * var42; + if (var7c < 1.0F) { + for (int var44 = var34; var44 <= var37; var44++) { + float var45 = (var44 + 0.5F - var24) / (var28); + Block block = par1World.getBlock(var38, var41, var44); + if ((var7c + var45 * var45 < 1.0F) && (((this.allowVoid) && (par1World.getBlock(var38, var41, var44) == Blocks.air)) || ((block != null) && (block.isReplaceableOreGen(par1World, var38, var41, var44, this.mBlock))))) { + par1World.setBlock(var38, var41, var44, this.minableBlockId, this.minableBlockMeta, 0); + } + } + } + } + } + } + } + return true; + } +} diff --git a/src/main/java/gregtech/common/GT_Network.java b/src/main/java/gregtech/common/GT_Network.java index 2b19b98dff..af7adee591 100644 --- a/src/main/java/gregtech/common/GT_Network.java +++ b/src/main/java/gregtech/common/GT_Network.java @@ -1,90 +1,90 @@ -package gregtech.common;
-
-import com.google.common.io.ByteArrayDataInput;
-import com.google.common.io.ByteStreams;
-import cpw.mods.fml.common.network.FMLEmbeddedChannel;
-import cpw.mods.fml.common.network.FMLOutboundHandler;
-import cpw.mods.fml.common.network.NetworkRegistry;
-import cpw.mods.fml.common.network.internal.FMLProxyPacket;
-import cpw.mods.fml.relauncher.Side;
-import gregtech.api.enums.GT_Values;
-import gregtech.api.net.*;
-import gregtech.common.blocks.GT_Packet_Ores;
-import io.netty.buffer.Unpooled;
-import io.netty.channel.ChannelHandler;
-import io.netty.channel.ChannelHandlerContext;
-import io.netty.channel.SimpleChannelInboundHandler;
-import io.netty.handler.codec.MessageToMessageCodec;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.entity.player.EntityPlayerMP;
-import net.minecraft.world.World;
-import net.minecraft.world.chunk.Chunk;
-
-import java.util.EnumMap;
-import java.util.List;
-
-@ChannelHandler.Sharable
-public class GT_Network
- extends MessageToMessageCodec<FMLProxyPacket, GT_Packet>
- implements IGT_NetworkHandler {
- private final EnumMap<Side, FMLEmbeddedChannel> mChannel;
- private final GT_Packet[] mSubChannels;
-
- public GT_Network() {
- this.mChannel = NetworkRegistry.INSTANCE.newChannel("GregTech", new ChannelHandler[]{this, new HandlerShared()});
- this.mSubChannels = new GT_Packet[]{new GT_Packet_TileEntity(), new GT_Packet_Sound(), new GT_Packet_Block_Event(), new GT_Packet_Ores()};
- }
-
- protected void encode(ChannelHandlerContext aContext, GT_Packet aPacket, List<Object> aOutput)
- throws Exception {
- aOutput.add(new FMLProxyPacket(Unpooled.buffer().writeByte(aPacket.getPacketID()).writeBytes(aPacket.encode()).copy(), (String) aContext.channel().attr(NetworkRegistry.FML_CHANNEL).get()));
- }
-
- protected void decode(ChannelHandlerContext aContext, FMLProxyPacket aPacket, List<Object> aOutput)
- throws Exception {
- ByteArrayDataInput aData = ByteStreams.newDataInput(aPacket.payload().array());
- aOutput.add(this.mSubChannels[aData.readByte()].decode(aData));
- }
-
- public void sendToPlayer(GT_Packet aPacket, EntityPlayerMP aPlayer) {
- ((FMLEmbeddedChannel) this.mChannel.get(Side.SERVER)).attr(FMLOutboundHandler.FML_MESSAGETARGET).set(FMLOutboundHandler.OutboundTarget.PLAYER);
- ((FMLEmbeddedChannel) this.mChannel.get(Side.SERVER)).attr(FMLOutboundHandler.FML_MESSAGETARGETARGS).set(aPlayer);
- ((FMLEmbeddedChannel) this.mChannel.get(Side.SERVER)).writeAndFlush(aPacket);
- }
-
- public void sendToAllAround(GT_Packet aPacket, NetworkRegistry.TargetPoint aPosition) {
- ((FMLEmbeddedChannel) this.mChannel.get(Side.SERVER)).attr(FMLOutboundHandler.FML_MESSAGETARGET).set(FMLOutboundHandler.OutboundTarget.ALLAROUNDPOINT);
- ((FMLEmbeddedChannel) this.mChannel.get(Side.SERVER)).attr(FMLOutboundHandler.FML_MESSAGETARGETARGS).set(aPosition);
- ((FMLEmbeddedChannel) this.mChannel.get(Side.SERVER)).writeAndFlush(aPacket);
- }
-
- public void sendToServer(GT_Packet aPacket) {
- ((FMLEmbeddedChannel) this.mChannel.get(Side.CLIENT)).attr(FMLOutboundHandler.FML_MESSAGETARGET).set(FMLOutboundHandler.OutboundTarget.TOSERVER);
- ((FMLEmbeddedChannel) this.mChannel.get(Side.CLIENT)).writeAndFlush(aPacket);
- }
-
- public void sendPacketToAllPlayersInRange(World aWorld, GT_Packet aPacket, int aX, int aZ) {
- if (!aWorld.isRemote) {
- for (Object tObject : aWorld.playerEntities) {
- if (!(tObject instanceof EntityPlayerMP)) {
- break;
- }
- EntityPlayerMP tPlayer = (EntityPlayerMP) tObject;
- Chunk tChunk = aWorld.getChunkFromBlockCoords(aX, aZ);
- if (tPlayer.getServerForPlayer().getPlayerManager().isPlayerWatchingChunk(tPlayer, tChunk.xPosition, tChunk.zPosition)) {
- sendToPlayer(aPacket, tPlayer);
- }
- }
- }
- }
-
- @ChannelHandler.Sharable
- static final class HandlerShared
- extends SimpleChannelInboundHandler<GT_Packet> {
- protected void channelRead0(ChannelHandlerContext ctx, GT_Packet aPacket)
- throws Exception {
- EntityPlayer aPlayer = GT_Values.GT.getThePlayer();
- aPacket.process(aPlayer == null ? null : GT_Values.GT.getThePlayer().worldObj);
- }
- }
-}
+package gregtech.common; + +import com.google.common.io.ByteArrayDataInput; +import com.google.common.io.ByteStreams; +import cpw.mods.fml.common.network.FMLEmbeddedChannel; +import cpw.mods.fml.common.network.FMLOutboundHandler; +import cpw.mods.fml.common.network.NetworkRegistry; +import cpw.mods.fml.common.network.internal.FMLProxyPacket; +import cpw.mods.fml.relauncher.Side; +import gregtech.api.enums.GT_Values; +import gregtech.api.net.*; +import gregtech.common.blocks.GT_Packet_Ores; +import io.netty.buffer.Unpooled; +import io.netty.channel.ChannelHandler; +import io.netty.channel.ChannelHandlerContext; +import io.netty.channel.SimpleChannelInboundHandler; +import io.netty.handler.codec.MessageToMessageCodec; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.world.World; +import net.minecraft.world.chunk.Chunk; + +import java.util.EnumMap; +import java.util.List; + +@ChannelHandler.Sharable +public class GT_Network + extends MessageToMessageCodec<FMLProxyPacket, GT_Packet> + implements IGT_NetworkHandler { + private final EnumMap<Side, FMLEmbeddedChannel> mChannel; + private final GT_Packet[] mSubChannels; + + public GT_Network() { + this.mChannel = NetworkRegistry.INSTANCE.newChannel("GregTech", new ChannelHandler[]{this, new HandlerShared()}); + this.mSubChannels = new GT_Packet[]{new GT_Packet_TileEntity(), new GT_Packet_Sound(), new GT_Packet_Block_Event(), new GT_Packet_Ores()}; + } + + protected void encode(ChannelHandlerContext aContext, GT_Packet aPacket, List<Object> aOutput) + throws Exception { + aOutput.add(new FMLProxyPacket(Unpooled.buffer().writeByte(aPacket.getPacketID()).writeBytes(aPacket.encode()).copy(), (String) aContext.channel().attr(NetworkRegistry.FML_CHANNEL).get())); + } + + protected void decode(ChannelHandlerContext aContext, FMLProxyPacket aPacket, List<Object> aOutput) + throws Exception { + ByteArrayDataInput aData = ByteStreams.newDataInput(aPacket.payload().array()); + aOutput.add(this.mSubChannels[aData.readByte()].decode(aData)); + } + + public void sendToPlayer(GT_Packet aPacket, EntityPlayerMP aPlayer) { + ((FMLEmbeddedChannel) this.mChannel.get(Side.SERVER)).attr(FMLOutboundHandler.FML_MESSAGETARGET).set(FMLOutboundHandler.OutboundTarget.PLAYER); + ((FMLEmbeddedChannel) this.mChannel.get(Side.SERVER)).attr(FMLOutboundHandler.FML_MESSAGETARGETARGS).set(aPlayer); + ((FMLEmbeddedChannel) this.mChannel.get(Side.SERVER)).writeAndFlush(aPacket); + } + + public void sendToAllAround(GT_Packet aPacket, NetworkRegistry.TargetPoint aPosition) { + ((FMLEmbeddedChannel) this.mChannel.get(Side.SERVER)).attr(FMLOutboundHandler.FML_MESSAGETARGET).set(FMLOutboundHandler.OutboundTarget.ALLAROUNDPOINT); + ((FMLEmbeddedChannel) this.mChannel.get(Side.SERVER)).attr(FMLOutboundHandler.FML_MESSAGETARGETARGS).set(aPosition); + ((FMLEmbeddedChannel) this.mChannel.get(Side.SERVER)).writeAndFlush(aPacket); + } + + public void sendToServer(GT_Packet aPacket) { + ((FMLEmbeddedChannel) this.mChannel.get(Side.CLIENT)).attr(FMLOutboundHandler.FML_MESSAGETARGET).set(FMLOutboundHandler.OutboundTarget.TOSERVER); + ((FMLEmbeddedChannel) this.mChannel.get(Side.CLIENT)).writeAndFlush(aPacket); + } + + public void sendPacketToAllPlayersInRange(World aWorld, GT_Packet aPacket, int aX, int aZ) { + if (!aWorld.isRemote) { + for (Object tObject : aWorld.playerEntities) { + if (!(tObject instanceof EntityPlayerMP)) { + break; + } + EntityPlayerMP tPlayer = (EntityPlayerMP) tObject; + Chunk tChunk = aWorld.getChunkFromBlockCoords(aX, aZ); + if (tPlayer.getServerForPlayer().getPlayerManager().isPlayerWatchingChunk(tPlayer, tChunk.xPosition, tChunk.zPosition)) { + sendToPlayer(aPacket, tPlayer); + } + } + } + } + + @ChannelHandler.Sharable + static final class HandlerShared + extends SimpleChannelInboundHandler<GT_Packet> { + protected void channelRead0(ChannelHandlerContext ctx, GT_Packet aPacket) + throws Exception { + EntityPlayer aPlayer = GT_Values.GT.getThePlayer(); + aPacket.process(aPlayer == null ? null : GT_Values.GT.getThePlayer().worldObj); + } + } +} diff --git a/src/main/java/gregtech/common/GT_PlayerActivityLogger.java b/src/main/java/gregtech/common/GT_PlayerActivityLogger.java index a3134f417f..7c275e76df 100644 --- a/src/main/java/gregtech/common/GT_PlayerActivityLogger.java +++ b/src/main/java/gregtech/common/GT_PlayerActivityLogger.java @@ -1,31 +1,31 @@ -package gregtech.common;
-
-import gregtech.GT_Mod;
-import gregtech.api.util.GT_Log;
-
-import java.util.ArrayList;
-
-public class GT_PlayerActivityLogger
- implements Runnable {
- public void run() {
- try {
- for (; ; ) {
- if (GT_Log.pal == null) {
- return;
- }
- ArrayList<String> tList = GT_Mod.gregtechproxy.mBufferedPlayerActivity;
- GT_Mod.gregtechproxy.mBufferedPlayerActivity = new ArrayList();
- String tLastOutput = "";
- int i = 0;
- for (int j = tList.size(); i < j; i++) {
- if (!tLastOutput.equals(tList.get(i))) {
- GT_Log.pal.println((String) tList.get(i));
- }
- tLastOutput = (String) tList.get(i);
- }
- Thread.sleep(10000L);
- }
- } catch (Throwable e) {
- }
- }
-}
+package gregtech.common; + +import gregtech.GT_Mod; +import gregtech.api.util.GT_Log; + +import java.util.ArrayList; + +public class GT_PlayerActivityLogger + implements Runnable { + public void run() { + try { + for (; ; ) { + if (GT_Log.pal == null) { + return; + } + ArrayList<String> tList = GT_Mod.gregtechproxy.mBufferedPlayerActivity; + GT_Mod.gregtechproxy.mBufferedPlayerActivity = new ArrayList(); + String tLastOutput = ""; + int i = 0; + for (int j = tList.size(); i < j; i++) { + if (!tLastOutput.equals(tList.get(i))) { + GT_Log.pal.println((String) tList.get(i)); + } + tLastOutput = (String) tList.get(i); + } + Thread.sleep(10000L); + } + } catch (Throwable e) { + } + } +} diff --git a/src/main/java/gregtech/common/GT_Pollution.java b/src/main/java/gregtech/common/GT_Pollution.java index 2a2673379e..39dc0c3b8f 100644 --- a/src/main/java/gregtech/common/GT_Pollution.java +++ b/src/main/java/gregtech/common/GT_Pollution.java @@ -17,7 +17,9 @@ import net.minecraftforge.common.DimensionManager; import java.util.ArrayList; import java.util.List; -public class GT_Pollution { +//import net.minecraft.entity.EntityLiving; + +public class GT_Pollution {//TODO REWORK /** * Pollution dispersion until effects start: * Calculation: ((Limit * 0.01) + 2000) * (4 <- spreading rate) @@ -50,94 +52,108 @@ public class GT_Pollution { * LV (0%), MV (30%), HV (52%), EV (66%), IV (76%), LuV (84%), ZPM (89%), UV (92%), MAX (95%) */ - static List<ChunkPosition> tList = null; + static TreeMap<Integer,List<ChunkPosition>> tList = null; static int loops = 1; static XSTR tRan = new XSTR(); public static void onWorldTick(World aWorld, int aTick){ - if(!GT_Mod.gregtechproxy.mPollution)return; + if(!GT_Mod.gregtechproxy.mPollution) return; + int aWorldID=aWorld.provider.dimensionId; if(aTick == 0 || (tList==null && GT_Proxy.chunkData!=null)){ - tList = new ArrayList<ChunkPosition>(GT_Proxy.chunkData.keySet()); + tList = new TreeMap<>(); + tList.put(aWorld,new ArrayList<ChunkPosition>(GT_Proxy.chunkData.keySet())); loops = (tList.size()/1200) + 1; -// System.out.println("new Pollution loop"+aTick); + //System.out.println("new Pollution loop"+aTick); } - if(tList!=null && tList.size() > 0){ - int i = 0; - for(; i < loops ; i++){ - if(tList.size()>0){ - ChunkPosition tPos = tList.get(0); - tList.remove(0); - if(tPos!=null && GT_Proxy.chunkData.containsKey(tPos)){ + if(tList!=null && tList.size() > 0) for(int i = 0; i < loops ; i++) if(tList.size()>0){ + ChunkPosition tPos = tList.get(0); + tList.remove(0); + if(tPos!=null && GT_Proxy.chunkData.containsKey(tPos)){ int tPollution = GT_Proxy.chunkData.get(tPos)[1]; -// System.out.println("process: "+tPos.chunkPosY+" "+tPos.chunkPosX+" "+tPos.chunkPosZ+" "+tPollution); + //System.out.println("process: "+tPos.chunkPosX+" "+tPos.chunkPosZ+" "+tPollution); //Reduce pollution in chunk - tPollution = (int)(0.99f*tPollution); - tPollution -= 2000; - if(tPollution<=0){tPollution = 0;} - //Spread Pollution - if(tPollution>50000){ - List<ChunkPosition> tNeighbor = new ArrayList(); - tNeighbor.add(new ChunkPosition(tPos.chunkPosX+1, tPos.chunkPosY, tPos.chunkPosZ)); - tNeighbor.add(new ChunkPosition(tPos.chunkPosX-1, tPos.chunkPosY, tPos.chunkPosZ)); - tNeighbor.add(new ChunkPosition(tPos.chunkPosX, tPos.chunkPosY, tPos.chunkPosZ+1)); - tNeighbor.add(new ChunkPosition(tPos.chunkPosX, tPos.chunkPosY, tPos.chunkPosZ-1)); - for(ChunkPosition tNPos : tNeighbor){ - if(GT_Proxy.chunkData.containsKey(tNPos)){ - int tNPol = GT_Proxy.chunkData.get(tNPos)[1]; - if(tNPol<tPollution && tNPol*12 < tPollution*10){ - int tDiff = tPollution - tNPol; - tDiff = tDiff/10; - tNPol += tDiff; - tPollution -= tDiff; - GT_Proxy.chunkData.get(tNPos)[1] = tNPol; + tPollution = (int)(0.9945f*tPollution); + //tPollution -= 2000; + if(tPollution<=0) tPollution = 0; + //Spread Pollution + else if(tPollution>400000){ + List<ChunkPosition> tNeighbor = new ArrayList(); + tNeighbor.add(new ChunkPosition(tPos.chunkPosX+1, tPos.chunkPosY, tPos.chunkPosZ)); + tNeighbor.add(new ChunkPosition(tPos.chunkPosX-1, tPos.chunkPosY, tPos.chunkPosZ)); + tNeighbor.add(new ChunkPosition(tPos.chunkPosX, tPos.chunkPosY, tPos.chunkPosZ+1)); + tNeighbor.add(new ChunkPosition(tPos.chunkPosX, tPos.chunkPosY, tPos.chunkPosZ-1)); + for(ChunkPosition tNPos : tNeighbor){ + if(!GT_Proxy.chunkData.containsKey(tNPos)) + GT_Utility.undergroundOil(aWorld,tNPos.chunkPosX,tNPos.chunkPosZ,false,0); + + //if(GT_Proxy.chunkData.containsKey(tNPos)){ + int tNPol = GT_Proxy.chunkData.get(tNPos)[1]; + if(tNPol*6 < tPollution*5){ + int tDiff = tPollution - tNPol; + tDiff = tDiff/20; + tNPol = GT_Utility.safeInt((long)tNPol+tDiff);//tNPol += tDiff; + tPollution -= tDiff; + GT_Proxy.chunkData.get(tNPos)[1] = tNPol; } - }else{ - GT_Utility.getUndergroundOil(aWorld,tNPos.chunkPosX<<4,tNPos.chunkPosZ<<4); + //} } - }} + } int[] tArray = GT_Proxy.chunkData.get(tPos); tArray[1] = tPollution; GT_Proxy.chunkData.remove(tPos); GT_Proxy.chunkData.put(tPos, tArray); //Create Pollution effects -// Smog filter TODO - if(tPollution > GT_Mod.gregtechproxy.mPollutionSmogLimit){ - AxisAlignedBB chunk = AxisAlignedBB.getBoundingBox(tPos.chunkPosX<<4, 0, tPos.chunkPosZ<<4, (tPos.chunkPosX<<4)+16, 256, (tPos.chunkPosZ<<4)+16); - List<EntityLivingBase> tEntitys = aWorld.getEntitiesWithinAABB(EntityLivingBase.class, chunk); - for(EntityLivingBase tEnt : tEntitys){ - if(!GT_Utility.isWearingFullGasHazmat(tEnt) && tRan.nextInt(tPollution/2000) > 40){ - int ran = tRan.nextInt(3); - if(ran==0)tEnt.addPotionEffect(new PotionEffect(Potion.weakness.id, Math.min(tPollution/2500,1000), tPollution/400000)); - if(ran==1)tEnt.addPotionEffect(new PotionEffect(Potion.digSlowdown.id, Math.min(tPollution/2500,1000), tPollution/400000)); - if(ran==2)tEnt.addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, Math.min(tPollution/2500,1000), tPollution/400000)); + //Smog filter TODO + if(tPollution > GT_Mod.gregtechproxy.mPollutionSmogLimit) { + AxisAlignedBB chunk = AxisAlignedBB.getBoundingBox(tPos.chunkPosX << 4, 0, tPos.chunkPosZ << 4, (tPos.chunkPosX << 4) + 16, 256, (tPos.chunkPosZ << 4) + 16); + List<EntityLivingBase> tEntitys = aWorld.getEntitiesWithinAABB(EntityLivingBase.class, chunk); + for (EntityLivingBase tEnt : tEntitys) { + if (!GT_Utility.isWearingFullGasHazmat(tEnt)) { + switch (tRan.nextInt(3)) { + default: + tEnt.addPotionEffect(new PotionEffect(Potion.digSlowdown.id, Math.min(tPollution / 1000, 1000), tPollution / 400000)); + case 1: + tEnt.addPotionEffect(new PotionEffect(Potion.weakness.id, Math.min(tPollution / 1000, 1000), tPollution / 400000)); + case 2: + tEnt.addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, Math.min(tPollution / 1000, 1000), tPollution / 400000)); + } } -} -// Poison effects - if(tPollution > GT_Mod.gregtechproxy.mPollutionPoisonLimit){ - for(EntityLivingBase tEnt : tEntitys){ - if(!GT_Utility.isWearingFullGasHazmat(tEnt) && tRan.nextInt(tPollution/2000) > 20){ - int ran = tRan.nextInt(3); - if(ran==0)tEnt.addPotionEffect(new PotionEffect(Potion.poison.id, Math.min(tPollution/2500,1000), tPollution/500000)); - if(ran==1)tEnt.addPotionEffect(new PotionEffect(Potion.confusion.id, Math.min(tPollution/2500,1000), 1)); - if(ran==2)tEnt.addPotionEffect(new PotionEffect(Potion.blindness.id, Math.min(tPollution/2500,1000), 1)); -} - } -// killing plants - if(tPollution > GT_Mod.gregtechproxy.mPollutionVegetationLimit){ - int f = 20; - for(;f<(tPollution/25000);f++){ - int x =tPos.chunkPosX<<4+(tRan.nextInt(16));; - int y =60 +(-f+tRan.nextInt(f*2+1)); - int z =tPos.chunkPosZ<<4+(tRan.nextInt(16)); - damageBlock(x, y, z, tPollution > GT_Mod.gregtechproxy.mPollutionSourRainLimit); - }}}} + } + // Poison effects + if (tPollution > GT_Mod.gregtechproxy.mPollutionPoisonLimit) { + //AxisAlignedBB chunk = AxisAlignedBB.getBoundingBox(tPos.chunkPosX*16, 0, tPos.chunkPosZ*16, tPos.chunkPosX*16+16, 256, tPos.chunkPosZ*16+16); + //List<EntityLiving> tEntitys = aWorld.getEntitiesWithinAABB(EntityLiving.class, chunk); + for (EntityLivingBase tEnt : tEntitys) { + if (!GT_Utility.isWearingFullGasHazmat(tEnt)) { + switch (tRan.nextInt(4)) { + default: + tEnt.addPotionEffect(new PotionEffect(Potion.hunger.id, tPollution / 500000)); + case 1: + tEnt.addPotionEffect(new PotionEffect(Potion.confusion.id, Math.min(tPollution / 2000, 1000), 1)); + case 2: + tEnt.addPotionEffect(new PotionEffect(Potion.poison.id, Math.min(tPollution / 4000, 1000), tPollution / 500000)); + case 3: + tEnt.addPotionEffect(new PotionEffect(Potion.blindness.id, Math.min(tPollution / 2000, 1000), 1)); + } + } + } + // killing plants + if (tPollution > GT_Mod.gregtechproxy.mPollutionVegetationLimit) { + int f = 20; + for (; f < (tPollution / 25000); f++) { + int x = (tPos.chunkPosX << 4) + tRan.nextInt(16); + int y = 60 + (-f + tRan.nextInt(f * 2 + 1)); + int z = (tPos.chunkPosZ << 4) + tRan.nextInt(16); + damageBlock(aWorld, x, y, z, tPollution > GT_Mod.gregtechproxy.mPollutionSourRainLimit); + } + } + } } } - }} + } } - public static void damageBlock(int x, int y, int z, boolean sourRain){ - World world = DimensionManager.getWorld(0); + public static void damageBlock(World world, int x, int y, int z, boolean sourRain){ if (world.isRemote) return; Block tBlock = world.getBlock(x, y, z); int tMeta = world.getBlockMetadata(x, y, z); @@ -207,4 +223,17 @@ public class GT_Pollution { } } + + public static int getPollutionAtCoords(World aWorld, int aX, int aZ){//TODO FIX + ChunkPosition tPos = new ChunkPosition(aX>>4, aWorld.provider.dimensionId, aZ>>4); + if(GT_Proxy.chunkData.containsKey(tPos)){ + int[] tPollution = GT_Proxy.chunkData.get(tPos); + if(tPollution.length>1 && tPollution[1]>0){ + return tPollution[1]; + }else{ + return 0; + } + } + return 0; + } } diff --git a/src/main/java/gregtech/common/GT_Proxy.java b/src/main/java/gregtech/common/GT_Proxy.java index 91033a1f34..2a71740231 100644 --- a/src/main/java/gregtech/common/GT_Proxy.java +++ b/src/main/java/gregtech/common/GT_Proxy.java @@ -176,7 +176,7 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler { public int mGraniteHavestLevel=3; public int mMaxHarvestLevel=7; public int mWireHeatingTicks = 4; - public int mPollutionSmogLimit = 500000; + public int mPollutionSmogLimit = 550000; public int mPollutionPoisonLimit = 750000; public int mPollutionVegetationLimit = 1000000; public int mPollutionSourRainLimit = 2000000; @@ -527,6 +527,172 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler { GT_Log.out.println("GT_Mod: Adding Tool Usage Crafting Recipes for OreDict Items."); for (Materials aMaterial : Materials.values()) { if ((aMaterial.mUnificatable) && (aMaterial.mMaterialInto == aMaterial)) { + if (!aMaterial.contains(SubTag.NO_SMASHING)) {//TODO CHECK + if (GregTech_API.sRecipeFile.get(ConfigCategories.Tools.hammerplating, aMaterial.toString(), true)) { + GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 1L), tBits, new Object[]{"h", "X", "X", + 'X', OrePrefixes.ingot.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 1L), tBits, + new Object[]{"h", "X", 'X', OrePrefixes.gem.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 1L), tBits, + new Object[]{"H", "X", 'H', ToolDictNames.craftingToolForgeHammer, 'X', + OrePrefixes.ingot.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 1L), + tBits, + new Object[]{"H", "X", 'H', ToolDictNames.craftingToolForgeHammer, 'X', + OrePrefixes.gem.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 1L), tBits, + new Object[]{"h", "X", 'X', OrePrefixes.ingotDouble.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 2L), tBits, + new Object[]{"H", "X", 'H', ToolDictNames.craftingToolForgeHammer, 'X', + OrePrefixes.ingotDouble.get(aMaterial)}); + } + if (GregTech_API.sRecipeFile.get(ConfigCategories.Tools.hammermultiingot, aMaterial.toString(), true)) { + GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.ingotDouble, aMaterial, 1L), tBits, new Object[]{"I", "I", "h", + 'I', OrePrefixes.ingot.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.ingotTriple, aMaterial, 1L), tBits, new Object[]{"I", "B", "h", + 'I', OrePrefixes.ingotDouble.get(aMaterial), 'B', OrePrefixes.ingot.get(aMaterial)}); + GT_ModHandler + .addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.ingotQuadruple, aMaterial, 1L), tBits, + new Object[]{"I", "B", "h", 'I', OrePrefixes.ingotTriple.get(aMaterial), 'B', + OrePrefixes.ingot.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.ingotQuintuple, aMaterial, 1L), tBits, + new Object[]{"I", "B", "h", 'I', OrePrefixes.ingotQuadruple.get(aMaterial), 'B', + OrePrefixes.ingot.get(aMaterial)}); + } + GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadAxe, aMaterial, 1L), tBits, new Object[]{"PIh", "P ", + "f ", 'P', OrePrefixes.plate.get(aMaterial), 'I', OrePrefixes.ingot.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadHammer, aMaterial, 1L), tBits, new Object[]{"II ", "IIh", + "II ", 'P', OrePrefixes.plate.get(aMaterial), 'I', OrePrefixes.ingot.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadHoe, aMaterial, 1L), tBits, new Object[]{"PIh", "f ", + 'P', OrePrefixes.plate.get(aMaterial), 'I', OrePrefixes.ingot.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadPickaxe, aMaterial, 1L), tBits, new Object[]{"PII", "f h", + 'P', OrePrefixes.plate.get(aMaterial), 'I', OrePrefixes.ingot.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadPlow, aMaterial, 1L), tBits, new Object[]{"PP", "PP", "hf", + 'P', OrePrefixes.plate.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadSaw, aMaterial, 1L), tBits, new Object[]{"PP ", "fh ", + 'P', OrePrefixes.plate.get(aMaterial), 'I', OrePrefixes.ingot.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadSense, aMaterial, 1L), tBits, new Object[]{"PPI", "hf ", + 'P', OrePrefixes.plate.get(aMaterial), 'I', OrePrefixes.ingot.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.toolHeadShovel, aMaterial, 1L), + tBits, + new Object[]{"fPh", 'P', OrePrefixes.plate.get(aMaterial), 'I', + OrePrefixes.ingot.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadSword, aMaterial, 1L), tBits, new Object[]{" P ", "fPh", + 'P', OrePrefixes.plate.get(aMaterial), 'I', OrePrefixes.ingot.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.ring, aMaterial, 1L), tBits, + new Object[]{"h ", "fX", 'X', OrePrefixes.stick.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.stickLong, aMaterial, 1L), tBits, + new Object[]{"ShS", 'S', OrePrefixes.stick.get(aMaterial)}); + } + if (!aMaterial.contains(SubTag.NO_WORKING)) { + GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.stick, aMaterial, 2L), tBits, + new Object[]{"s", "X", 'X', OrePrefixes.stickLong.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.stick, aMaterial, 1L), tBits, + new Object[]{"f ", " X", 'X', OrePrefixes.ingot.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.bolt, aMaterial, 2L), tBits, + new Object[]{"s ", " X", 'X', OrePrefixes.stick.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.screw, aMaterial, 1L), tBits, + new Object[]{"fX", "X ", 'X', OrePrefixes.bolt.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.round, aMaterial, 4L), tBits, + new Object[]{"fX", 'X', OrePrefixes.ingot.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.rotor, aMaterial, 1L), tBits, new Object[]{"PhP", "SRf", "PdP", + 'P', aMaterial == Materials.Wood ? OrePrefixes.plank.get(aMaterial) : OrePrefixes.plate.get(aMaterial), + 'R', OrePrefixes.ring.get(aMaterial), 'S', OrePrefixes.screw.get(aMaterial)}); + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 4L), GT_OreDictUnificator.get(OrePrefixes.ring, aMaterial, 1L), Materials.Tin.getMolten(32), GT_OreDictUnificator.get(OrePrefixes.rotor, aMaterial, 1L), 240, 24); + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 4L), GT_OreDictUnificator.get(OrePrefixes.ring, aMaterial, 1L), Materials.Lead.getMolten(48), GT_OreDictUnificator.get(OrePrefixes.rotor, aMaterial, 1L), 240, 24); + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 4L), GT_OreDictUnificator.get(OrePrefixes.ring, aMaterial, 1L), Materials.SolderingAlloy.getMolten(16), GT_OreDictUnificator.get(OrePrefixes.rotor, aMaterial, 1L), 240, 24); + GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.stickLong, aMaterial, 1L), tBits, + new Object[]{"sf", "G ", 'G', OrePrefixes.gemFlawless.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.stickLong, aMaterial, 2L), tBits, + new Object[]{"sf", "G ", 'G', OrePrefixes.gemExquisite.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.wireGt01, aMaterial, 1L), tBits, + new Object[]{"Xx", 'X', OrePrefixes.plate.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.wireFine, aMaterial, 1L), tBits, + new Object[]{"Xx", 'X', OrePrefixes.foil.get(aMaterial)}); + + GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.turbineBlade, aMaterial, 1L), tBits, new Object[]{"fPd", "SPS", " P ", + 'P', aMaterial == Materials.Wood ? OrePrefixes.plank.get(aMaterial) : OrePrefixes.plateDouble.get(aMaterial), + 'R', OrePrefixes.ring.get(aMaterial), 'S', OrePrefixes.screw.get(aMaterial)}); + + + GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.arrowGtWood, aMaterial, 1L), tBits, new Object[]{" A", " S ", + "F ", 'S', OrePrefixes.stick.get(Materials.Wood), 'F', OreDictNames.craftingFeather, + 'A', OrePrefixes.toolHeadArrow.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.arrowGtPlastic, aMaterial, 1L), tBits, new Object[]{" A", " S ", + "F ", 'S', OrePrefixes.stick.get(Materials.Plastic), 'F', OreDictNames.craftingFeather, + 'A', OrePrefixes.toolHeadArrow.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadArrow, aMaterial, 1L), tBits, + new Object[]{"Xf", 'X', OrePrefixes.gemChipped.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadArrow, aMaterial, 3L), tBits, + new Object[]{(aMaterial.contains(SubTag.WOOD) ? 115 : 'x') + "Pf", 'P', OrePrefixes.plate.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadAxe, aMaterial, 1L), tBits, new Object[]{"GG ", "G ", + "f ", 'G', OrePrefixes.gem.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadHoe, aMaterial, 1L), tBits, new Object[]{"GG ", "f ", + " ", 'G', OrePrefixes.gem.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadPickaxe, aMaterial, 1L), tBits, new Object[]{"GGG", "f ", + 'G', OrePrefixes.gem.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadPlow, aMaterial, 1L), tBits, new Object[]{"GG", "GG", " f", + 'G', OrePrefixes.gem.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadSaw, aMaterial, 1L), tBits, + new Object[]{"GGf", 'G', OrePrefixes.gem.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadSense, aMaterial, 1L), tBits, new Object[]{"GGG", " f ", + " ", 'G', OrePrefixes.gem.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadShovel, aMaterial, 1L), tBits, + new Object[]{"fG", 'G', OrePrefixes.gem.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadSword, aMaterial, 1L), tBits, new Object[]{" G", "fG", + 'G', OrePrefixes.gem.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadUniversalSpade, aMaterial, 1L), tBits, new Object[]{"fX", + 'X', OrePrefixes.toolHeadShovel.get(aMaterial)}); + + GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadBuzzSaw, aMaterial, 1L), tBits, new Object[]{"wXh", "X X", + "fXx", 'X', OrePrefixes.plate.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadWrench, aMaterial, 1L), tBits, new Object[]{"hXW", "XRX", + "WXd", 'X', OrePrefixes.plate.get(aMaterial), 'S', OrePrefixes.plate.get(Materials.Steel), + 'R', OrePrefixes.ring.get(Materials.Steel), 'W', OrePrefixes.screw.get(Materials.Steel)}); + GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadChainsaw, aMaterial, 1L), tBits, new Object[]{"SRS", "XhX", + "SRS", 'X', OrePrefixes.plate.get(aMaterial), 'S', OrePrefixes.plate.get(Materials.Steel), + 'R', OrePrefixes.ring.get(Materials.Steel)}); + GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadDrill, aMaterial, 1L), tBits, new Object[]{"XSX", "XSX", + "ShS", 'X', OrePrefixes.plate.get(aMaterial), 'S', OrePrefixes.plate.get(Materials.Steel)}); + switch (aMaterial) { + case Wood: + GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, aMaterial, 1L), tBits, new Object[]{"P ", " s", + 'P', OrePrefixes.plank.get(aMaterial)}); + break; + case Stone: + GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, aMaterial, 1L), tBits, new Object[]{"P ", " f", + 'P', OrePrefixes.stoneSmooth}); + break; + default: + GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, aMaterial, 1L), tBits, + new Object[]{" S ", "hPx"," S ", 'S', OrePrefixes.stick.get(aMaterial), 'P', OrePrefixes.plate.get(aMaterial)}); + //new Object[]{"P ", aMaterial.contains(SubTag.WOOD) ? " s" : " h", 'P', OrePrefixes.plate.get(aMaterial)}); + //TODO CHECK + + } + switch (aMaterial) { + case Wood: + GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.gearGt, aMaterial, 1L), tBits, new Object[]{"SPS", "PsP", "SPS", + 'P', OrePrefixes.plank.get(aMaterial), 'S', OrePrefixes.stick.get(aMaterial)}); + break; + case Stone: + GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.gearGt, aMaterial, 1L), tBits, new Object[]{"SPS", "PfP", "SPS", + 'P', OrePrefixes.stoneSmooth, 'S', new ItemStack(Blocks.stone_button, 1, 32767)}); + break; + default: + GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.gearGt, aMaterial, 1L), tBits, new Object[]{"SPS", "PwP", "SPS", + 'P', OrePrefixes.plate.get(aMaterial), 'S', OrePrefixes.stick.get(aMaterial)}); + } + } + if (aMaterial.contains(SubTag.SMELTING_TO_GEM)) { + GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 1L), tBits, new Object[]{"XXX", "XXX", "XXX", + 'X', OrePrefixes.nugget.get(aMaterial)}); + } else { + // GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial, 1L), tBits, new Object[]{"XXX", "XXX", "XXX", + // 'X', OrePrefixes.nugget.get(aMaterial)}); + }//TODO CHECK END GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial.mMacerateInto, 1L), tBits, new Object[]{"h", "X", 'X', OrePrefixes.crushedCentrifuged.get(aMaterial)}); GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial.mMacerateInto, 1L), tBits, new Object[]{"h", "X", @@ -555,6 +721,40 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler { new Object[]{"XX", "XX", 'X', OrePrefixes.dustSmall.get(aMaterial)}); GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1L), tBits, new Object[]{"XXX", "XXX", "XXX", 'X', OrePrefixes.dustTiny.get(aMaterial)}); + //TODO CHECK + GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 16L), tBits, new Object[]{"Xc", 'X', + OrePrefixes.crateGtDust.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 16L), tBits, new Object[]{"Xc", 'X', + OrePrefixes.crateGtGem.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial, 16L), tBits, new Object[]{"Xc", + 'X', OrePrefixes.crateGtIngot.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 16L), tBits, new Object[]{"Xc", + 'X', OrePrefixes.crateGtPlate.get(aMaterial)}); + + GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.gemChipped, aMaterial, 2L), tBits, + new Object[]{"h", "X", 'X', OrePrefixes.gemFlawed.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.gemFlawed, aMaterial, 2L), tBits, + new Object[]{"h", "X", 'X', OrePrefixes.gem.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 2L), tBits, + new Object[]{"h", "X", 'X', OrePrefixes.gemFlawless.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.gemFlawless, aMaterial, 2L), tBits, + new Object[]{"h", "X", 'X', OrePrefixes.gemExquisite.get(aMaterial)}); + if ((aMaterial.contains(SubTag.MORTAR_GRINDABLE)) && (GregTech_API.sRecipeFile.get(ConfigCategories.Tools.mortar, aMaterial.name(), true))) { + GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dustSmall, aMaterial, 1L), tBits, + new Object[]{"X", "m", 'X', OrePrefixes.gemChipped.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dustSmall, aMaterial, 2L), tBits, + new Object[]{"X", "m", 'X', OrePrefixes.gemFlawed.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1L), tBits, + new Object[]{"X", "m", 'X', OrePrefixes.gem.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 2L), tBits, + new Object[]{"X", "m", 'X', OrePrefixes.gemFlawless.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 4L), tBits, + new Object[]{"X", "m", 'X', OrePrefixes.gemExquisite.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1L), tBits, + new Object[]{"X", "m", 'X', OrePrefixes.ingot.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1L), tBits, + new Object[]{"X", "m", 'X', OrePrefixes.plate.get(aMaterial)}); + }//TODO CHECK END } } } @@ -849,7 +1049,7 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler { GT_OreDictUnificator.registerOre(OreDictNames.craftingWireCopper, aEvent.Ore); } else if (aEvent.Name.equals("oreHeeEndrium")) { - GT_OreDictUnificator.registerOre(OrePrefixes.ore, Materials.Endium, aEvent.Ore); + GT_OreDictUnificator.registerOre(OrePrefixes.ore, Materials.HeeEndium, aEvent.Ore); } else if (aEvent.Name.equals("sheetPlastic")) { GT_OreDictUnificator.registerOre(OrePrefixes.plate, Materials.Plastic, aEvent.Ore); @@ -1406,9 +1606,9 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler { return null; } - public Object getRightItemGui(EntityPlayer player, int ID){ - ItemStack mStack = player.getEquipmentInSlot(ID/100); - if(mStack==null||!(mStack.getItem() instanceof ModularArmor_Item))return null; + public Object getRightItemGui(EntityPlayer player, int ID){ + ItemStack mStack = player.getEquipmentInSlot(ID/100); + if(mStack==null||!(mStack.getItem() instanceof ModularArmor_Item))return null; switch(ID % 100){ case 0: @@ -1420,7 +1620,7 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler { } return null; - } + } public int getBurnTime(ItemStack aFuel) { if ((aFuel == null) || (aFuel.getItem() == null)) { @@ -1531,7 +1731,8 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler { rFuelValue = Math.max(rFuelValue, 600); } else if (GT_Utility.areStacksEqual(aFuel, ItemList.Block_MSSFUEL.get(1, new Object[0]))) { rFuelValue = Math.max(rFuelValue, 150000); - }if (GT_Utility.areStacksEqual(aFuel, ItemList.Block_SSFUEL.get(1, new Object[0]))) { + } + if (GT_Utility.areStacksEqual(aFuel, ItemList.Block_SSFUEL.get(1, new Object[0]))) { rFuelValue = Math.max(rFuelValue, 100000); } @@ -1543,6 +1744,11 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler { aMaterial.mMoltenRGBa, 4, aMaterial.mMeltingPoint <= 0 ? 1000 : aMaterial.mMeltingPoint, null, null, 0); } + public Fluid addAutogeneratedWetFluid(Materials aMaterial) { + return addFluid("wet." + aMaterial.mName.toLowerCase(Locale.ENGLISH), "wet.autogenerated", "Wet " + aMaterial.mDefaultLocalName, aMaterial, + aMaterial.mMoltenRGBa, 4, aMaterial.mMeltingPoint <= 0 ? 1000 : aMaterial.mMeltingPoint, GT_OreDictUnificator.get(OrePrefixes.cell, aMaterial, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000); + } + public Fluid addAutogeneratedPlasmaFluid(Materials aMaterial) { return addFluid("plasma." + aMaterial.mName.toLowerCase(Locale.ENGLISH), "plasma.autogenerated", aMaterial.mDefaultLocalName + " Plasma", aMaterial, aMaterial.mMoltenRGBa, 3, 10000, GT_OreDictUnificator.get(OrePrefixes.cellPlasma, aMaterial, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000); @@ -1701,8 +1907,10 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler { public static final HashMap<ChunkPosition, int[]> chunkData = new HashMap<ChunkPosition, int[]>(5000); + private static final byte oilVer=(byte)0x20; + @SubscribeEvent - public void handleChunkSaveEvent(ChunkDataEvent.Save event) + public void handleChunkSaveEvent(ChunkDataEvent.Save event)//TODO FIX +RETROGEN { ChunkPosition tPos = new ChunkPosition(event.getChunk().xPosition,event.getChunk().worldObj.provider.dimensionId,event.getChunk().zPosition); if(chunkData.containsKey(tPos)){ @@ -1714,7 +1922,7 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler { } @SubscribeEvent - public void handleChunkLoadEvent(ChunkDataEvent.Load event) + public void handleChunkLoadEvent(ChunkDataEvent.Load event)//TODO FIX +RETROGEN { int tOil = 0; int tOilFluid = 0; @@ -1756,4 +1964,4 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler { this.mModID = ((aModID == null) || (aModID.equals("UNKNOWN")) ? null : aModID); } } -}
\ No newline at end of file +} diff --git a/src/main/java/gregtech/common/GT_RecipeAdder.java b/src/main/java/gregtech/common/GT_RecipeAdder.java index a0519ebbe3..090f64c1c4 100644 --- a/src/main/java/gregtech/common/GT_RecipeAdder.java +++ b/src/main/java/gregtech/common/GT_RecipeAdder.java @@ -16,14 +16,13 @@ import net.minecraft.item.ItemStack; import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidStack; -public class GT_RecipeAdder - implements IGT_RecipeAdder { +public class GT_RecipeAdder implements IGT_RecipeAdder { @Deprecated public boolean addFusionReactorRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput1, int aDuration, int aEUt, int aStartEU) { return false; } - @Override + @Override //Really? public boolean addFusionReactorRecipe(FluidStack aInput1, FluidStack aInput2, FluidStack aOutput1, int aDuration, int aEUt, int aStartEU) { if (aInput1 == null || aInput2 == null || aOutput1 == null || aDuration < 1 || aEUt < 1 || aStartEU < 1) { return false; @@ -39,6 +38,10 @@ public class GT_RecipeAdder return addCentrifugeRecipe(aInput1, aInput2 < 0 ? ItemList.IC2_Fuel_Can_Empty.get(-aInput2, new Object[0]) : aInput2 > 0 ? ItemList.Cell_Empty.get(aInput2, new Object[0]) : null, null, null, aOutput1, aOutput2, aOutput3, aOutput4, aOutput5, aOutput6, null, aDuration, 5); } + public boolean addCentrifugeRecipe(ItemStack aInput1, int aInput2, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, ItemStack aOutput4, ItemStack aOutput5, ItemStack aOutput6, int aDuration, int aEUt) { + return addCentrifugeRecipe(aInput1, aInput2 < 0 ? ItemList.IC2_Fuel_Can_Empty.get(-aInput2, new Object[0]) : aInput2 > 0 ? ItemList.Cell_Empty.get(aInput2, new Object[0]) : null, null, null, aOutput1, aOutput2, aOutput3, aOutput4, aOutput5, aOutput6, null, aDuration, aEUt); + } + public boolean addCentrifugeRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, ItemStack aOutput4, ItemStack aOutput5, ItemStack aOutput6, int[] aChances, int aDuration, int aEUt) { if (((aInput1 == null) && (aFluidInput == null)) || ((aOutput1 == null) && (aFluidOutput == null))) { return false; @@ -86,6 +89,10 @@ public class GT_RecipeAdder return addChemicalRecipe(aInput1, aInput2, null, null, aOutput, aDuration); } + public boolean addChemicalRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput, int aDuration, int aEUt) { + return addChemicalRecipe(aInput1, aInput2, null, null, aOutput, aDuration, aEUt); + } + public boolean addChemicalRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput, int aDuration) { return addChemicalRecipe(aInput1, aInput2, aFluidInput, aFluidOutput, aOutput, aDuration, 30); } @@ -155,11 +162,12 @@ public class GT_RecipeAdder return true; } + @Deprecated public boolean addCNCRecipe(ItemStack aInput1, ItemStack aOutput1, int aDuration, int aEUt) { if ((aInput1 == null) || (aOutput1 == null)) { return false; } - if ((GregTech_API.sRecipeFile.get("cnc", aOutput1, aDuration)) <= 0) { + if ((aDuration = GregTech_API.sRecipeFile.get("cnc", aOutput1, aDuration)) <= 0) { return false; } return true; @@ -370,6 +378,17 @@ public class GT_RecipeAdder return false; } + public boolean addVacuumFreezerRecipe(ItemStack aInput1, ItemStack aOutput1, int aDuration, int aEUt) { + if ((aInput1 == null) || (aOutput1 == null)) { + return false; + } + if ((aDuration = GregTech_API.sRecipeFile.get("vacuumfreezer", aInput1, aDuration)) <= 0) { + return false; + } + new GT_Recipe(aInput1, aOutput1, aDuration, aEUt, 0);//Since all other methods are taken + return true; + } + public boolean addVacuumFreezerRecipe(ItemStack aInput1, ItemStack aOutput1, int aDuration) { if ((aInput1 == null) || (aOutput1 == null)) { return false; @@ -381,6 +400,7 @@ public class GT_RecipeAdder return true; } + @Deprecated public boolean addGrinderRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, ItemStack aOutput4) { return false; } @@ -462,34 +482,42 @@ public class GT_RecipeAdder return true; } - public boolean addBrewingRecipe(ItemStack aIngredient, Fluid aInput, Fluid aOutput, boolean aHidden) { + public boolean addBrewingRecipe(ItemStack aIngredient, Fluid aInput, Fluid aOutput, int aDuration, int aEUt, boolean aHidden) { if ((aIngredient == null) || (aInput == null) || (aOutput == null)) { return false; } if (!GregTech_API.sRecipeFile.get("brewing", aOutput.getUnlocalizedName(), true)) { return false; } - GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sBrewingRecipes.addRecipe(false, new ItemStack[]{aIngredient}, null, null, new FluidStack[]{new FluidStack(aInput, 750)}, new FluidStack[]{new FluidStack(aOutput, 750)}, 128, 4, 0); + GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sBrewingRecipes.addRecipe(false, new ItemStack[]{aIngredient}, null, null, new FluidStack[]{new FluidStack(aInput, 750)}, new FluidStack[]{new FluidStack(aOutput, 750)}, aDuration, aEUt, 0); if ((aHidden) && (tRecipe != null)) { tRecipe.mHidden = true; } return true; } - public boolean addFermentingRecipe(FluidStack aInput, FluidStack aOutput, int aDuration, boolean aHidden) { + public boolean addBrewingRecipe(ItemStack aIngredient, Fluid aInput, Fluid aOutput, boolean aHidden) { + return addBrewingRecipe(aIngredient, aInput, aOutput, 128, 4, aHidden); + } + + public boolean addFermentingRecipe(FluidStack aInput, FluidStack aOutput, int aDuration, int aEUt, boolean aHidden) { if ((aInput == null) || (aOutput == null)) { return false; } if ((aDuration = GregTech_API.sRecipeFile.get("fermenting", aOutput.getFluid().getUnlocalizedName(), aDuration)) <= 0) { return false; } - GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sFermentingRecipes.addRecipe(false, null, null, null, new FluidStack[]{aInput}, new FluidStack[]{aOutput}, aDuration, 2, 0); + GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sFermentingRecipes.addRecipe(false, null, null, null, new FluidStack[]{aInput}, new FluidStack[]{aOutput}, aDuration, aEUt, 0); if ((aHidden) && (tRecipe != null)) { tRecipe.mHidden = true; } return true; } + public boolean addFermentingRecipe(FluidStack aInput, FluidStack aOutput, int aDuration, boolean aHidden) { + return addFermentingRecipe(aInput, aOutput, aDuration, 2, aHidden); + } + public boolean addDistilleryRecipe(ItemStack aCircuit, FluidStack aInput, FluidStack aOutput, int aDuration, int aEUt, boolean aHidden) { if ((aInput == null) || (aOutput == null)) { return false; @@ -564,6 +592,8 @@ public class GT_RecipeAdder } public boolean addFluidCannerRecipe(ItemStack aInput, ItemStack aOutput, FluidStack aFluidInput, FluidStack aFluidOutput) { + int aDuration= aFluidOutput == null ? aFluidInput.amount / 62 : aFluidOutput.amount / 62; + if ((aInput != null) && (aOutput != null)) { if ((aFluidInput == null ? 1 : 0) != (aFluidOutput == null ? 1 : 0)) { } @@ -573,7 +603,27 @@ public class GT_RecipeAdder if (!GregTech_API.sRecipeFile.get("fluidcanner", aOutput, true)) { return false; } - GT_Recipe.GT_Recipe_Map.sFluidCannerRecipes.addRecipe(true, new ItemStack[]{aInput}, new ItemStack[]{aOutput}, null, new FluidStack[]{aFluidInput == null ? null : aFluidInput}, new FluidStack[]{aFluidOutput == null ? null : aFluidOutput}, aFluidOutput == null ? aFluidInput.amount / 62 : aFluidOutput.amount / 62, 1, 0); + if ((aDuration = GregTech_API.sRecipeFile.get("fluidcanner", aInput, aDuration)) <= 0) { + return false; + } + GT_Recipe.GT_Recipe_Map.sFluidCannerRecipes.addRecipe(true, new ItemStack[]{aInput}, new ItemStack[]{aOutput}, null, new FluidStack[]{aFluidInput == null ? null : aFluidInput}, new FluidStack[]{aFluidOutput == null ? null : aFluidOutput}, aDuration, 1, 0); + return true; + } + + public boolean addFluidCannerRecipe(ItemStack aInput, ItemStack aOutput, FluidStack aFluidInput, FluidStack aFluidOutput, int aDuration, int aEUt) { + if ((aInput != null) && (aOutput != null)) { + if ((aFluidInput == null ? 1 : 0) != (aFluidOutput == null ? 1 : 0)) { + } + } else { + return false; + } + if (!GregTech_API.sRecipeFile.get("fluidcanner", aOutput, true)) { + return false; + } + if ((aDuration = GregTech_API.sRecipeFile.get("fluidcanner", aInput, aDuration)) <= 0) { + return false; + } + GT_Recipe.GT_Recipe_Map.sFluidCannerRecipes.addRecipe(true, new ItemStack[]{aInput}, new ItemStack[]{aOutput}, null, new FluidStack[]{aFluidInput == null ? null : aFluidInput}, new FluidStack[]{aFluidOutput == null ? null : aFluidOutput}, aDuration, aEUt, 0); return true; } @@ -843,10 +893,10 @@ public class GT_RecipeAdder return false; } for(ItemStack tItem : aInputs){ - if(tItem==null)System.out.println("addAssemblylineRecipe"+aResearchItem.getDisplayName()); + if(tItem==null)System.out.println("addAssemblinglineRecipe"+aResearchItem.getDisplayName()); } - GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(false, new ItemStack[]{aResearchItem}, new ItemStack[]{aOutput}, new ItemStack[]{ItemList.Tool_DataStick.getWithName(1L, "Research result", new Object[0])}, null, null, aResearchTime, 30, 0); - + GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(false, new ItemStack[]{aResearchItem}, new ItemStack[]{aOutput}, new ItemStack[]{ItemList.Tool_DataStick.getWithName(1L, "Writes Research result", new Object[0])}, null, null, aResearchTime, 30, 0); + GT_Recipe.GT_Recipe_Map.sAssemblylineFakeRecipes.addFakeRecipe(false, aInputs, new ItemStack[]{aOutput}, new ItemStack[]{ItemList.Tool_DataStick.getWithName(1L, "Reads Research result", new Object[0])}, aFluidInputs, null, aDuration, aEUt, 0,true); GT_Recipe.GT_Recipe_AssemblyLine.sAssemblylineRecipes.add(new GT_Recipe_AssemblyLine( aResearchItem, aResearchTime, aInputs, aFluidInputs, aOutput, aDuration, aEUt)); return true; } diff --git a/src/main/java/gregtech/common/GT_Server.java b/src/main/java/gregtech/common/GT_Server.java index f5137f0f49..831ec4666a 100644 --- a/src/main/java/gregtech/common/GT_Server.java +++ b/src/main/java/gregtech/common/GT_Server.java @@ -1,31 +1,31 @@ -package gregtech.common;
-
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.world.World;
-
-public class GT_Server
- extends GT_Proxy {
- public boolean isServerSide() {
- return true;
- }
-
- public boolean isClientSide() {
- return false;
- }
-
- public boolean isBukkitSide() {
- return false;
- }
-
- public void doSonictronSound(ItemStack aStack, World aWorld, double aX, double aY, double aZ) {
- }
-
- public int addArmor(String aPrefix) {
- return 0;
- }
-
- public EntityPlayer getThePlayer() {
- return null;
- }
-}
+package gregtech.common; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; + +public class GT_Server + extends GT_Proxy { + public boolean isServerSide() { + return true; + } + + public boolean isClientSide() { + return false; + } + + public boolean isBukkitSide() { + return false; + } + + public void doSonictronSound(ItemStack aStack, World aWorld, double aX, double aY, double aZ) { + } + + public int addArmor(String aPrefix) { + return 0; + } + + public EntityPlayer getThePlayer() { + return null; + } +} diff --git a/src/main/java/gregtech/common/GT_Worldgen_GT_Ore_Layer.java b/src/main/java/gregtech/common/GT_Worldgen_GT_Ore_Layer.java index 542846feed..6d2df102f8 100644 --- a/src/main/java/gregtech/common/GT_Worldgen_GT_Ore_Layer.java +++ b/src/main/java/gregtech/common/GT_Worldgen_GT_Ore_Layer.java @@ -4,9 +4,11 @@ import gregtech.GT_Mod; import gregtech.api.GregTech_API;
import gregtech.api.enums.GT_Values;
import gregtech.api.enums.Materials;
+import gregtech.api.util.GT_Log;
import gregtech.api.world.GT_Worldgen;
import gregtech.common.blocks.GT_TileEntity_Ores;
import gregtech.loaders.misc.GT_Achievements;
+import net.minecraft.item.ItemStack;
import net.minecraft.util.MathHelper;
import net.minecraft.world.World;
import net.minecraft.world.chunk.IChunkProvider;
@@ -14,6 +16,8 @@ import net.minecraft.world.chunk.IChunkProvider; import java.util.ArrayList;
import java.util.Random;
+import static gregtech.api.enums.GT_Values.D1;
+
public class GT_Worldgen_GT_Ore_Layer
extends GT_Worldgen {
public static ArrayList<GT_Worldgen_GT_Ore_Layer> sList = new ArrayList();
@@ -27,25 +31,26 @@ public class GT_Worldgen_GT_Ore_Layer public final short mSecondaryMeta;
public final short mBetweenMeta;
public final short mSporadicMeta;
+ //public final String mBiome;
public final String mRestrictBiome;
public final boolean mOverworld;
public final boolean mNether;
public final boolean mEnd;
public final boolean mEndAsteroid;
- public final boolean mMoon;
- public final boolean mMars;
- public final boolean mAsteroid;
+ //public final boolean mMoon;
+ //public final boolean mMars;
+ //public final boolean mAsteroid;
public final String aTextWorldgen = "worldgen.";
- public GT_Worldgen_GT_Ore_Layer(String aName, boolean aDefault, int aMinY, int aMaxY, int aWeight, int aDensity, int aSize, boolean aOverworld, boolean aNether, boolean aEnd, boolean aMoon, boolean aMars, boolean aAsteroid, Materials aPrimary, Materials aSecondary, Materials aBetween, Materials aSporadic) {
+ public GT_Worldgen_GT_Ore_Layer(String aName, boolean aDefault, int aMinY, int aMaxY, int aWeight, int aDensity, int aSize, boolean aOverworld, boolean aNether, boolean aEnd, Materials aPrimary, Materials aSecondary, Materials aBetween, Materials aSporadic) {
super(aName, sList, aDefault);
this.mOverworld = GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Overworld", aOverworld);
this.mNether = GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Nether", aNether);
this.mEnd = GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "TheEnd", aEnd);
this.mEndAsteroid = GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "EndAsteroid", aEnd);
- this.mMoon = GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Moon", aMoon);
- this.mMars = GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Mars", aMars);
- this.mAsteroid = GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Asteroid", aAsteroid);
+ //this.mMoon = GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Moon", aMoon);
+ //this.mMars = GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Mars", aMars);
+ //this.mAsteroid = GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Asteroid", aAsteroid);
this.mMinY = ((short) GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "MinHeight", aMinY));
this.mMaxY = ((short) Math.max(this.mMinY + 5, GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "MaxHeight", aMaxY)));
this.mWeight = ((short) GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "RandomWeight", aWeight));
@@ -79,13 +84,16 @@ public class GT_Worldgen_GT_Ore_Layer if (!this.mRestrictBiome.equals("None") && !(this.mRestrictBiome.equals(aBiome))) {
return false; //Not the correct biome for ore mix
}
- if (!isGenerationAllowed(aWorld, aDimensionType, ((aDimensionType == -1) && (this.mNether)) || ((aDimensionType == 0) && (this.mOverworld)) || ((aDimensionType == 1) && (this.mEnd)) || ((aWorld.provider.getDimensionName().equals("Moon")) && (this.mMoon)) || ((aWorld.provider.getDimensionName().equals("Mars")) && (this.mMars)) ? aDimensionType : aDimensionType ^ 0xFFFFFFFF)) {
+ //if (!isGenerationAllowed(aWorld, aDimensionType, ((aDimensionType == -1) && (this.mNether)) || ((aDimensionType == 0) && (this.mOverworld)) || ((aDimensionType == 1) && (this.mEnd)) || ((aWorld.provider.getDimensionName().equals("Moon")) && (this.mMoon)) || ((aWorld.provider.getDimensionName().equals("Mars")) && (this.mMars)) ? aDimensionType : aDimensionType ^ 0xFFFFFFFF)) {
+ if (!isGenerationAllowed(aWorld, aDimensionType, ((aDimensionType == -1) && (this.mNether)) || ((aDimensionType == 0) && (this.mOverworld)) || ((aDimensionType == 1) && (this.mEnd)) ? aDimensionType : aDimensionType ^ 0xFFFFFFFF)) {
return false;
}
int tMinY = this.mMinY + aRandom.nextInt(this.mMaxY - this.mMinY - 5);
int cX = aChunkX - aRandom.nextInt(this.mSize);
int eX = aChunkX + 16 + aRandom.nextInt(this.mSize);
+
+ int[] execCount=new int[4];
for (int tX = cX; tX <= eX; tX++) {
int cZ = aChunkZ - aRandom.nextInt(this.mSize);
int eZ = aChunkZ + 16 + aRandom.nextInt(this.mSize);
@@ -94,27 +102,40 @@ public class GT_Worldgen_GT_Ore_Layer for (int i = tMinY - 1; i < tMinY + 2; i++) {
if ((aRandom.nextInt(Math.max(1, Math.max(MathHelper.abs_int(cZ - tZ), MathHelper.abs_int(eZ - tZ)) / this.mDensity)) == 0) || (aRandom.nextInt(Math.max(1, Math.max(MathHelper.abs_int(cX - tX), MathHelper.abs_int(eX - tX)) / this.mDensity)) == 0)) {
GT_TileEntity_Ores.setOreBlock(aWorld, tX, i, tZ, this.mSecondaryMeta, false);
+ execCount[1]++;
}
}
}
if ((this.mBetweenMeta > 0) && ((aRandom.nextInt(Math.max(1, Math.max(MathHelper.abs_int(cZ - tZ), MathHelper.abs_int(eZ - tZ)) / this.mDensity)) == 0) || (aRandom.nextInt(Math.max(1, Math.max(MathHelper.abs_int(cX - tX), MathHelper.abs_int(eX - tX)) / this.mDensity)) == 0))) {
GT_TileEntity_Ores.setOreBlock(aWorld, tX, tMinY + 2 + aRandom.nextInt(2), tZ, this.mBetweenMeta, false);
+ execCount[2]++;
}
if (this.mPrimaryMeta > 0) {
for (int i = tMinY + 3; i < tMinY + 6; i++) {
if ((aRandom.nextInt(Math.max(1, Math.max(MathHelper.abs_int(cZ - tZ), MathHelper.abs_int(eZ - tZ)) / this.mDensity)) == 0) || (aRandom.nextInt(Math.max(1, Math.max(MathHelper.abs_int(cX - tX), MathHelper.abs_int(eX - tX)) / this.mDensity)) == 0)) {
GT_TileEntity_Ores.setOreBlock(aWorld, tX, i, tZ, this.mPrimaryMeta, false);
+ execCount[0]++;
}
}
}
if ((this.mSporadicMeta > 0) && ((aRandom.nextInt(Math.max(1, Math.max(MathHelper.abs_int(cZ - tZ), MathHelper.abs_int(eZ - tZ)) / this.mDensity)) == 0) || (aRandom.nextInt(Math.max(1, Math.max(MathHelper.abs_int(cX - tX), MathHelper.abs_int(eX - tX)) / this.mDensity)) == 0))) {
GT_TileEntity_Ores.setOreBlock(aWorld, tX, tMinY - 1 + aRandom.nextInt(7), tZ, this.mSporadicMeta, false);
+ execCount[3]++;
}
}
}
- if (GT_Values.D1) {
- System.out.println("Generated Orevein: " + this.mWorldGenName+" "+aChunkX +" "+ aChunkZ);
+ if (D1) {
+ GT_Log.out.println(
+ "Generated Orevein:" + this.mWorldGenName +
+ " @ dim="+aDimensionType+
+ " chunkX="+aChunkX+
+ " chunkZ="+aChunkZ+
+ " Secondary="+execCount[1]+" "+new ItemStack(GregTech_API.sBlockOres1,1,mPrimaryMeta).getDisplayName()+
+ " Between="+execCount[2]+" "+new ItemStack(GregTech_API.sBlockOres1,1,mPrimaryMeta).getDisplayName()+
+ " Primary="+execCount[0]+" "+new ItemStack(GregTech_API.sBlockOres1,1,mPrimaryMeta).getDisplayName()+
+ " Sporadic="+execCount[3]+" "+new ItemStack(GregTech_API.sBlockOres1,1,mPrimaryMeta).getDisplayName()
+ );
}
return true;
}
-}
\ No newline at end of file +}
diff --git a/src/main/java/gregtech/common/GT_Worldgen_GT_Ore_SmallPieces.java b/src/main/java/gregtech/common/GT_Worldgen_GT_Ore_SmallPieces.java index 7023ebdf2c..5b0d4d61f5 100644 --- a/src/main/java/gregtech/common/GT_Worldgen_GT_Ore_SmallPieces.java +++ b/src/main/java/gregtech/common/GT_Worldgen_GT_Ore_SmallPieces.java @@ -1,57 +1,67 @@ -package gregtech.common;
-
-import gregtech.api.GregTech_API;
-import gregtech.api.enums.Materials;
-import gregtech.api.world.GT_Worldgen;
-import gregtech.common.blocks.GT_TileEntity_Ores;
-import net.minecraft.world.World;
-import net.minecraft.world.chunk.IChunkProvider;
-
-import java.util.Random;
-
-public class GT_Worldgen_GT_Ore_SmallPieces
- extends GT_Worldgen {
- public final short mMinY;
- public final short mMaxY;
- public final short mAmount;
- public final short mMeta;
- public final boolean mOverworld;
- public final boolean mNether;
- public final boolean mEnd;
- public final boolean mMoon;
- public final boolean mMars;
- public final boolean mAsteroid;
- public final String mRestrictBiome;
- public final String aTextWorldgen = "worldgen.";
-
- public GT_Worldgen_GT_Ore_SmallPieces(String aName, boolean aDefault, int aMinY, int aMaxY, int aAmount, boolean aOverworld, boolean aNether, boolean aEnd, boolean aMoon, boolean aMars, boolean aAsteroid, Materials aPrimary) {
- super(aName, GregTech_API.sWorldgenList, aDefault);
- this.mOverworld = GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Overworld", aOverworld);
- this.mNether = GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Nether", aNether);
- this.mEnd = GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "TheEnd", aEnd);
- this.mMoon = GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Moon", aMoon);
- this.mMars = GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Mars", aMars);
- this.mAsteroid = GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Asteroid", aAsteroid);
- this.mMinY = ((short) GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "MinHeight", aMinY));
- this.mMaxY = ((short) Math.max(this.mMinY + 1, GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "MaxHeight", aMaxY)));
- this.mAmount = ((short) Math.max(1, GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Amount", aAmount)));
- this.mMeta = ((short) GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Ore", aPrimary.mMetaItemSubID));
- this.mRestrictBiome = GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "RestrictToBiomeName", "None");
- }
-
- public boolean executeWorldgen(World aWorld, Random aRandom, String aBiome, int aDimensionType, int aChunkX, int aChunkZ, IChunkProvider aChunkGenerator, IChunkProvider aChunkProvider) {
- if (!this.mRestrictBiome.equals("None") && !(this.mRestrictBiome.equals(aBiome))) {
- return false; //Not the correct biome for small ore
- }
- if (!isGenerationAllowed(aWorld, aDimensionType, ((aDimensionType == -1) && (this.mNether)) || ((aDimensionType == 0) && (this.mOverworld)) || ((aDimensionType == 1) && (this.mEnd)) || ((aWorld.provider.getDimensionName().equals("Moon")) && (this.mMoon)) || ((aWorld.provider.getDimensionName().equals("Mars")) && (this.mMars)) ? aDimensionType : aDimensionType ^ 0xFFFFFFFF)) {
- return false;
- }
- if (this.mMeta > 0) {
- int i = 0;
- for (int j = Math.max(1, this.mAmount / 2 + aRandom.nextInt(this.mAmount) / 2); i < j; i++) {
- GT_TileEntity_Ores.setOreBlock(aWorld, aChunkX + aRandom.nextInt(16), this.mMinY + aRandom.nextInt(Math.max(1, this.mMaxY - this.mMinY)), aChunkZ + aRandom.nextInt(16), this.mMeta, true);
- }
- }
- return true;
- }
-}
+package gregtech.common; + +import gregtech.api.GregTech_API; +import gregtech.api.enums.Materials; +import gregtech.api.util.GT_Log; +import gregtech.api.world.GT_Worldgen; +import gregtech.common.blocks.GT_TileEntity_Ores; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; +import net.minecraft.world.chunk.IChunkProvider; + +import java.util.Random; + +import static gregtech.api.enums.GT_Values.D1; + +public class GT_Worldgen_GT_Ore_SmallPieces + extends GT_Worldgen { + public final short mMinY; + public final short mMaxY; + public final short mAmount; + public final short mMeta; + public final boolean mOverworld; + public final boolean mNether; + public final boolean mEnd; + + public final String mBiome; + public final String aTextWorldgen = "worldgen."; + + public GT_Worldgen_GT_Ore_SmallPieces(String aName, boolean aDefault, int aMinY, int aMaxY, int aAmount, boolean aOverworld, boolean aNether, boolean aEnd, Materials aPrimary) { + super(aName, GregTech_API.sWorldgenList, aDefault); + this.mOverworld = GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Overworld", aOverworld); + this.mNether = GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Nether", aNether); + this.mEnd = GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "TheEnd", aEnd); + this.mMinY = ((short) GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "MinHeight", aMinY)); + this.mMaxY = ((short) Math.max(this.mMinY + 1, GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "MaxHeight", aMaxY))); + this.mAmount = ((short) Math.max(1, GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Amount", aAmount))); + this.mMeta = ((short) GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Ore", aPrimary.mMetaItemSubID)); + this.mBiome = GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "BiomeName", "None"); + } + + public boolean executeWorldgen(World aWorld, Random aRandom, String aBiome, int aDimensionType, int aChunkX, int aChunkZ, IChunkProvider aChunkGenerator, IChunkProvider aChunkProvider) { + if (!this.mBiome.equals("None") && !(this.mBiome.equals(aBiome))) { + return false; //Not the correct biome for ore mix + } + if (!isGenerationAllowed(aWorld, aDimensionType, ((aDimensionType == -1) && (this.mNether)) || ((aDimensionType == 0) && (this.mOverworld)) || ((aDimensionType == 1) && (this.mEnd)) ? aDimensionType : aDimensionType ^ 0xFFFFFFFF)) { + return false; + } + int count=0; + if (this.mMeta > 0) { + int i = 0; + for (int j = Math.max(1, this.mAmount / 2 + aRandom.nextInt(this.mAmount) / 2); i < j; i++) { + GT_TileEntity_Ores.setOreBlock(aWorld, aChunkX + aRandom.nextInt(16), this.mMinY + aRandom.nextInt(Math.max(1, this.mMaxY - this.mMinY)), aChunkZ + aRandom.nextInt(16), this.mMeta, true); + count++; + } + } + if(D1){ + GT_Log.out.println( + "Small Ore:" + this.mWorldGenName + + " @ dim="+aDimensionType+ + " chunkX="+aChunkX+ + " chunkZ="+aChunkZ+ + " ore="+count+" "+new ItemStack(GregTech_API.sBlockOres1,1,mMeta).getDisplayName() + ); + } + return true; + } +} diff --git a/src/main/java/gregtech/common/GT_Worldgen_Stone.java b/src/main/java/gregtech/common/GT_Worldgen_Stone.java index cf89abe900..c22585d26a 100644 --- a/src/main/java/gregtech/common/GT_Worldgen_Stone.java +++ b/src/main/java/gregtech/common/GT_Worldgen_Stone.java @@ -1,90 +1,90 @@ -package gregtech.common;
-
-import gregtech.api.GregTech_API;
-import gregtech.api.world.GT_Worldgen_Ore;
-import gregtech.common.blocks.GT_Block_Ores_Abstract;
-import gregtech.common.blocks.GT_TileEntity_Ores;
-import net.minecraft.block.Block;
-import net.minecraft.init.Blocks;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.util.MathHelper;
-import net.minecraft.world.World;
-import net.minecraft.world.chunk.IChunkProvider;
-
-import java.util.Collection;
-import java.util.Random;
-
-public class GT_Worldgen_Stone
- extends GT_Worldgen_Ore {
- public GT_Worldgen_Stone(String aName, boolean aDefault, Block aBlock, int aBlockMeta, int aDimensionType, int aAmount, int aSize, int aProbability, int aMinY, int aMaxY, Collection<String> aBiomeList, boolean aAllowToGenerateinVoid) {
- super(aName, aDefault, aBlock, aBlockMeta, aDimensionType, aAmount, aSize, aProbability, aMinY, aMaxY, aBiomeList, aAllowToGenerateinVoid);
- }
-
- public boolean executeWorldgen(World aWorld, Random aRandom, String aBiome, int aDimensionType, int aChunkX, int aChunkZ, IChunkProvider aChunkGenerator, IChunkProvider aChunkProvider) {
- if ((isGenerationAllowed(aWorld, aDimensionType, this.mDimensionType)) && ((this.mBiomeList.isEmpty()) || (this.mBiomeList.contains(aBiome))) && ((this.mProbability <= 1) || (aRandom.nextInt(this.mProbability) == 0))) {
- for (int i = 0; i < this.mAmount; i++) {
- int tX = aChunkX + aRandom.nextInt(16);
- int tY = this.mMinY + aRandom.nextInt(this.mMaxY - this.mMinY);
- int tZ = aChunkZ + aRandom.nextInt(16);
- if ((this.mAllowToGenerateinVoid) || (!aWorld.getBlock(tX, tY, tZ).isAir(aWorld, tX, tY, tZ))) {
- float math_pi = 3.141593F;//FB: CNT - CNT_ROUGH_CONSTANT_VALUE
- float var6 = aRandom.nextFloat() * math_pi;
- float var1d = this.mSize / 8.0F;int var2d = tX + 8;int var3d = tZ + 8;int var4d = tY - 2;
- float mh_s_0 = MathHelper.sin(var6) * var1d;float mh_c_0 = MathHelper.cos(var6) * var1d;
- float var7 = var2d + mh_s_0;
- float var11 = var3d + mh_c_0;
- int var15r = aRandom.nextInt(3);int var17r = aRandom.nextInt(3);
- int var15 = var4d + var15r;
- int mh_n_4=var17r - var15r;
- float mh_n_0 = -2*mh_s_0;float mh_n_1 = -2*mh_c_0;
- for (int var19 = 0; var19 <= this.mSize; var19++) {
- float var5d = var19 / this.mSize;
- float var20 = var7 + mh_n_0 * var5d;
- float var22 = var15 + mh_n_4 * var5d;
- float var24 = var11 + mh_n_1 * var5d;
- float var6d = var19 * math_pi / this.mSize;
- float var26 = aRandom.nextFloat() * this.mSize / 16.0F;
- float var28 = ((MathHelper.sin(var6d) + 1.0F) * var26 + 1.0F) / 2.0F;
- int tMinX = MathHelper.floor_float(var20 - var28);
- int tMinY = MathHelper.floor_float(var22 - var28);
- int tMinZ = MathHelper.floor_float(var24 - var28);
- int tMaxX = MathHelper.floor_float(var20 + var28);
- int tMaxY = MathHelper.floor_float(var22 + var28);
- int tMaxZ = MathHelper.floor_float(var24 + var28);
- for (int eX = tMinX; eX <= tMaxX; eX++) {
- float var39 = (eX + 0.5F - var20) / (var28);
- float var10d = var39 * var39;
- if (var10d < 1.0F) {
- for (int eY = tMinY; eY <= tMaxY; eY++) {
- float var42 = (eY + 0.5F - var22) / (var28);
- float var12d = var10d + var42 * var42;
- if (var12d < 1.0F) {
- for (int eZ = tMinZ; eZ <= tMaxZ; eZ++) {
- float var45 = (eZ + 0.5F - var24) / (var28);
- if (var12d + var45 * var45 < 1.0F) {
- Block tTargetedBlock = aWorld.getBlock(eX, eY, eZ);
- if (tTargetedBlock instanceof GT_Block_Ores_Abstract) {
- TileEntity tTileEntity = aWorld.getTileEntity(eX, eY, eZ);
- if ((tTileEntity instanceof GT_TileEntity_Ores)) {
- if (tTargetedBlock != GregTech_API.sBlockOres1) {
- ((GT_TileEntity_Ores) tTileEntity).convertOreBlock(aWorld, eX, eY, eZ);
- }
- ((GT_TileEntity_Ores)tTileEntity).overrideOreBlockMaterial(this.mBlock, (byte) this.mBlockMeta);
- }
- } else if (((this.mAllowToGenerateinVoid) && (aWorld.getBlock(eX, eY, eZ).isAir(aWorld, eX, eY, eZ))) || ((tTargetedBlock != null) && ((tTargetedBlock.isReplaceableOreGen(aWorld, eX, eY, eZ, Blocks.stone)) || (tTargetedBlock.isReplaceableOreGen(aWorld, eX, eY, eZ, Blocks.end_stone)) || (tTargetedBlock.isReplaceableOreGen(aWorld, eX, eY, eZ, Blocks.netherrack)) || (tTargetedBlock.isReplaceableOreGen(aWorld, eX, eY, eZ, GregTech_API.sBlockGranites)) || (tTargetedBlock.isReplaceableOreGen(aWorld, eX, eY, eZ, GregTech_API.sBlockStones))))) {
- aWorld.setBlock(eX, eY, eZ, this.mBlock, this.mBlockMeta, 0);
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- return true;
- }
- return false;
- }
-}
\ No newline at end of file +package gregtech.common; + +import gregtech.api.GregTech_API; +import gregtech.api.world.GT_Worldgen_Ore; +import gregtech.common.blocks.GT_Block_Ores_Abstract; +import gregtech.common.blocks.GT_TileEntity_Ores; +import net.minecraft.block.Block; +import net.minecraft.init.Blocks; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.MathHelper; +import net.minecraft.world.World; +import net.minecraft.world.chunk.IChunkProvider; + +import java.util.Collection; +import java.util.Random; + +public class GT_Worldgen_Stone + extends GT_Worldgen_Ore { + public GT_Worldgen_Stone(String aName, boolean aDefault, Block aBlock, int aBlockMeta, int aDimensionType, int aAmount, int aSize, int aProbability, int aMinY, int aMaxY, Collection<String> aBiomeList, boolean aAllowToGenerateinVoid) { + super(aName, aDefault, aBlock, aBlockMeta, aDimensionType, aAmount, aSize, aProbability, aMinY, aMaxY, aBiomeList, aAllowToGenerateinVoid); + } + + public boolean executeWorldgen(World aWorld, Random aRandom, String aBiome, int aDimensionType, int aChunkX, int aChunkZ, IChunkProvider aChunkGenerator, IChunkProvider aChunkProvider) { + if ((isGenerationAllowed(aWorld, aDimensionType, this.mDimensionType)) && ((this.mBiomeList.isEmpty()) || (this.mBiomeList.contains(aBiome))) && ((this.mProbability <= 1) || (aRandom.nextInt(this.mProbability) == 0))) { + for (int i = 0; i < this.mAmount; i++) { + int tX = aChunkX + aRandom.nextInt(16); + int tY = this.mMinY + aRandom.nextInt(this.mMaxY - this.mMinY); + int tZ = aChunkZ + aRandom.nextInt(16); + if ((this.mAllowToGenerateinVoid) || (!aWorld.getBlock(tX, tY, tZ).isAir(aWorld, tX, tY, tZ))) { + float math_pi = 3.141593F;//FB: CNT - CNT_ROUGH_CONSTANT_VALUE + float var6 = aRandom.nextFloat() * math_pi; + float var1d = this.mSize / 8.0F;int var2d = tX + 8;int var3d = tZ + 8;int var4d = tY - 2; + float mh_s_0 = MathHelper.sin(var6) * var1d;float mh_c_0 = MathHelper.cos(var6) * var1d; + float var7 = var2d + mh_s_0; + float var11 = var3d + mh_c_0; + int var15r = aRandom.nextInt(3);int var17r = aRandom.nextInt(3); + int var15 = var4d + var15r; + int mh_n_4=var17r - var15r; + float mh_n_0 = -2*mh_s_0;float mh_n_1 = -2*mh_c_0; + for (int var19 = 0; var19 <= this.mSize; var19++) { + float var5d = var19 / this.mSize; + float var20 = var7 + mh_n_0 * var5d; + float var22 = var15 + mh_n_4 * var5d; + float var24 = var11 + mh_n_1 * var5d; + float var6d = var19 * math_pi / this.mSize; + float var26 = aRandom.nextFloat() * this.mSize / 16.0F; + float var28 = ((MathHelper.sin(var6d) + 1.0F) * var26 + 1.0F) / 2.0F; + int tMinX = MathHelper.floor_float(var20 - var28); + int tMinY = MathHelper.floor_float(var22 - var28); + int tMinZ = MathHelper.floor_float(var24 - var28); + int tMaxX = MathHelper.floor_float(var20 + var28); + int tMaxY = MathHelper.floor_float(var22 + var28); + int tMaxZ = MathHelper.floor_float(var24 + var28); + for (int eX = tMinX; eX <= tMaxX; eX++) { + float var39 = (eX + 0.5F - var20) / (var28); + float var10d = var39 * var39; + if (var10d < 1.0F) { + for (int eY = tMinY; eY <= tMaxY; eY++) { + float var42 = (eY + 0.5F - var22) / (var28); + float var12d = var10d + var42 * var42; + if (var12d < 1.0F) { + for (int eZ = tMinZ; eZ <= tMaxZ; eZ++) { + float var45 = (eZ + 0.5F - var24) / (var28); + if (var12d + var45 * var45 < 1.0F) { + Block tTargetedBlock = aWorld.getBlock(eX, eY, eZ); + if (tTargetedBlock instanceof GT_Block_Ores_Abstract) { + TileEntity tTileEntity = aWorld.getTileEntity(eX, eY, eZ); + if ((tTileEntity instanceof GT_TileEntity_Ores)) { + if (tTargetedBlock != GregTech_API.sBlockOres1) { + ((GT_TileEntity_Ores) tTileEntity).convertOreBlock(aWorld, eX, eY, eZ); + } + ((GT_TileEntity_Ores)tTileEntity).overrideOreBlockMaterial(this.mBlock, (byte) this.mBlockMeta); + } + } else if (((this.mAllowToGenerateinVoid) && (aWorld.getBlock(eX, eY, eZ).isAir(aWorld, eX, eY, eZ))) || ((tTargetedBlock != null) && ((tTargetedBlock.isReplaceableOreGen(aWorld, eX, eY, eZ, Blocks.stone)) || (tTargetedBlock.isReplaceableOreGen(aWorld, eX, eY, eZ, Blocks.end_stone)) || (tTargetedBlock.isReplaceableOreGen(aWorld, eX, eY, eZ, Blocks.netherrack)) || (tTargetedBlock.isReplaceableOreGen(aWorld, eX, eY, eZ, GregTech_API.sBlockGranites)) || (tTargetedBlock.isReplaceableOreGen(aWorld, eX, eY, eZ, GregTech_API.sBlockStones))))) { + aWorld.setBlock(eX, eY, eZ, this.mBlock, this.mBlockMeta, 0); + } + } + } + } + } + } + } + } + } + } + return true; + } + return false; + } +} diff --git a/src/main/java/gregtech/common/GT_Worldgenerator.java b/src/main/java/gregtech/common/GT_Worldgenerator.java index 73b720ca21..539ec1c746 100644 --- a/src/main/java/gregtech/common/GT_Worldgenerator.java +++ b/src/main/java/gregtech/common/GT_Worldgenerator.java @@ -17,19 +17,24 @@ import net.minecraft.world.chunk.IChunkProvider; import net.minecraft.world.gen.ChunkProviderEnd;
import net.minecraft.world.gen.ChunkProviderHell;
+import java.util.ArrayList;
+import java.util.List;
import java.util.Random;
public class GT_Worldgenerator
implements IWorldGenerator {
+ //public static boolean sAsteroids = true;
private static int mEndAsteroidProbability = 300;
- private static int mGCAsteroidProbability = 50;
+ //private static int mGCAsteroidProbability = 50;
private static int mSize = 100;
private static int endMinSize = 50;
private static int endMaxSize = 200;
- private static int gcMinSize = 100;
- private static int gcMaxSize = 400;
+ //private static int gcMinSize = 100;
+ //private static int gcMaxSize = 400;
private static boolean endAsteroids = true;
- private static boolean gcAsteroids = true;
+ public List<Runnable> mList = new ArrayList();
+ public boolean mIsGenerating = false;
+ //private static boolean gcAsteroids = true;
public GT_Worldgenerator() {
@@ -37,21 +42,34 @@ public class GT_Worldgenerator endMinSize = GregTech_API.sWorldgenFile.get("endasteroids", "AsteroidMinSize", 50);
endMaxSize = GregTech_API.sWorldgenFile.get("endasteroids", "AsteroidMaxSize", 200);
mEndAsteroidProbability = GregTech_API.sWorldgenFile.get("endasteroids", "AsteroidProbability", 300);
- gcAsteroids = GregTech_API.sWorldgenFile.get("gcasteroids", "GenerateGCAsteroids", true);
- gcMinSize = GregTech_API.sWorldgenFile.get("gcasteroids", "GCAsteroidMinSize", 100);
- gcMaxSize = GregTech_API.sWorldgenFile.get("gcasteroids", "GCAsteroidMaxSize", 400);
- mGCAsteroidProbability = GregTech_API.sWorldgenFile.get("gcasteroids", "GCAsteroidProbability", 300);
+ //gcAsteroids = GregTech_API.sWorldgenFile.get("gcasteroids", "GenerateGCAsteroids", true);
+ //gcMinSize = GregTech_API.sWorldgenFile.get("gcasteroids", "GCAsteroidMinSize", 100);
+ //gcMaxSize = GregTech_API.sWorldgenFile.get("gcasteroids", "GCAsteroidMaxSize", 400);
+ //mGCAsteroidProbability = GregTech_API.sWorldgenFile.get("gcasteroids", "GCAsteroidProbability", 300);
GameRegistry.registerWorldGenerator(this, 1073741823);
}
- public synchronized void generate(Random aRandom, int aX, int aZ, World aWorld, IChunkProvider aChunkGenerator, IChunkProvider aChunkProvider) {
- int tempDimensionId = aWorld.provider.dimensionId;
- if (tempDimensionId != -1 && tempDimensionId != 1 && !aChunkGenerator.getClass().getName().contains("galacticraft")) {
- tempDimensionId = 0;
+ public void generate(Random aRandom, int aX, int aZ, World aWorld, IChunkProvider aChunkGenerator, IChunkProvider aChunkProvider) {
+ this.mList.add(new WorldGenContainer(new XSTR(aRandom.nextInt()), aX * 16, aZ * 16, ((aChunkGenerator instanceof ChunkProviderEnd)) || (aWorld.getBiomeGenForCoords(aX * 16 + 8, aZ * 16 + 8) == BiomeGenBase.sky) ? 1 : ((aChunkGenerator instanceof ChunkProviderHell)) || (aWorld.getBiomeGenForCoords(aX * 16 + 8, aZ * 16 + 8) == BiomeGenBase.hell) ? -1 : 0, aWorld, aChunkGenerator, aChunkProvider, aWorld.getBiomeGenForCoords(aX * 16 + 8, aZ * 16 + 8).biomeName));
+ if (!this.mIsGenerating) {
+ this.mIsGenerating = true;
+ int mList_sS=this.mList.size();
+ for (int i = 0; i < mList_sS; i++) {
+ ((Runnable) this.mList.get(i)).run();
+ }
+ this.mList.clear();
+ this.mIsGenerating = false;
}
- new WorldGenContainer(new XSTR(aRandom.nextInt()), aX * 16, aZ * 16, tempDimensionId, aWorld, aChunkGenerator, aChunkProvider, aWorld.getBiomeGenForCoords(aX * 16 + 8, aZ * 16 + 8).biomeName).run();
}
+ //public synchronized void generate(Random aRandom, int aX, int aZ, World aWorld, IChunkProvider aChunkGenerator, IChunkProvider aChunkProvider) {//TODO CHECK???
+ // int tempDimensionId = aWorld.provider.dimensionId;
+ // if (tempDimensionId != -1 && tempDimensionId != 1 && !aChunkGenerator.getClass().getName().contains("galacticraft")) {
+ // tempDimensionId = 0;
+ // }
+ // new WorldGenContainer(new XSTR(aRandom.nextInt()), aX * 16, aZ * 16, tempDimensionId, aWorld, aChunkGenerator, aChunkProvider, aWorld.getBiomeGenForCoords(aX * 16 + 8, aZ * 16 + 8).biomeName).run();
+ //}
+
public static class WorldGenContainer
implements Runnable {
public final Random mRandom;
@@ -101,6 +119,9 @@ public class GT_Worldgenerator int j = 0;
for (int tZ = this.mZ - 16; j < 3; tZ += 16) {
String tBiome = this.mWorld.getBiomeGenForCoords(tX + 8, tZ + 8).biomeName;
+ //if (tBiome == null) {//TODO NEEDED?
+ // tBiome = BiomeGenBase.plains.biomeName;
+ //}
try {
for (GT_Worldgen tWorldGen : GregTech_API.sWorldgenList) {
tWorldGen.executeWorldgen(this.mWorld, this.mRandom, this.mBiome, this.mDimensionType, tX, tZ, this.mChunkGenerator, this.mChunkProvider);
@@ -115,10 +136,11 @@ public class GT_Worldgenerator }
//Asteroid Worldgen
int tDimensionType = this.mWorld.provider.dimensionId;
- String tDimensionName = this.mWorld.provider.getDimensionName();
+ //String tDimensionName = this.mWorld.provider.getDimensionName();
Random aRandom = new Random();
- if (((tDimensionType == 1) && endAsteroids && ((mEndAsteroidProbability <= 1) || (aRandom.nextInt(mEndAsteroidProbability) == 0))) || ((tDimensionName.equals("Asteroids")) && gcAsteroids && ((mGCAsteroidProbability <= 1) || (aRandom.nextInt(mGCAsteroidProbability) == 0)))) {
- short primaryMeta = 0;
+ //if (((tDimensionType == 1) && endAsteroids && ((mEndAsteroidProbability <= 1) || (aRandom.nextInt(mEndAsteroidProbability) == 0))) || ((tDimensionName.equals("Asteroids")) && gcAsteroids && ((mGCAsteroidProbability <= 1) || (aRandom.nextInt(mGCAsteroidProbability) == 0)))) {
+ if (((tDimensionType == 1) && endAsteroids && ((mEndAsteroidProbability <= 1) || (aRandom.nextInt(mEndAsteroidProbability) == 0)))) {
+ short primaryMeta = 0;
short secondaryMeta = 0;
short betweenMeta = 0;
short sporadicMeta = 0;
@@ -131,7 +153,8 @@ public class GT_Worldgenerator tRandomWeight -= ((GT_Worldgen_GT_Ore_Layer) tWorldGen).mWeight;
if (tRandomWeight <= 0) {
try {
- if ((tWorldGen.mEndAsteroid && tDimensionType == 1) || (tWorldGen.mAsteroid && tDimensionType == -30)) {
+ //if ((tWorldGen.mEndAsteroid && tDimensionType == 1) || (tWorldGen.mAsteroid && tDimensionType == -30)) {
+ if (tWorldGen.mEndAsteroid && tDimensionType == 1) {
primaryMeta = tWorldGen.mPrimaryMeta;
secondaryMeta = tWorldGen.mSecondaryMeta;
betweenMeta = tWorldGen.mBetweenMeta;
@@ -146,14 +169,14 @@ public class GT_Worldgenerator }
}
}
- if(GT_Values.D1)System.out.println("do asteroid gen: "+this.mX+" "+this.mZ);
+ //if(GT_Values.D1)System.out.println("do asteroid gen: "+this.mX+" "+this.mZ);
int tX = mX + aRandom.nextInt(16);
int tY = 50 + aRandom.nextInt(200 - 50);
int tZ = mZ + aRandom.nextInt(16);
if (tDimensionType == 1) {
mSize = aRandom.nextInt((int) (endMaxSize - endMinSize));
- } else if (tDimensionName.equals("Asteroids")) {
- mSize = aRandom.nextInt((int) (gcMaxSize - gcMinSize));
+ //} else if (tDimensionName.equals("Asteroids")) {
+ // mSize = aRandom.nextInt((int) (gcMaxSize - gcMinSize));
}
if ((mWorld.getBlock(tX, tY, tZ).isAir(mWorld, tX, tY, tZ))) {
float var6 = aRandom.nextFloat() * 3.141593F;
@@ -195,16 +218,16 @@ public class GT_Worldgenerator } else if (ranOre < 10) {
GT_TileEntity_Ores.setOreBlock(mWorld, eX, eY, eZ, sporadicMeta, false, true);
} else {
- if (tDimensionType == 1) {
- mWorld.setBlock(eX, eY, eZ, Blocks.end_stone, 0, 2);
- } else if (tDimensionName.equals("Asteroids")) {
- //int asteroidType = aRandom.nextInt(20);
- //if (asteroidType == 19) { //Rare Asteroid?
+ //if (tDimensionType == 1) {//TODO CHECK
+ mWorld.setBlock(eX, eY, eZ, Blocks.end_stone, 0, 0);
+ //} else if (tDimensionName.equals("Asteroids")) {
+ ////int asteroidType = aRandom.nextInt(20);
+ ////if (asteroidType == 19) { //Rare Asteroid?
+ ////mWorld.setBlock(eX, eY, eZ, GregTech_API.sBlockGranites, 8, 3);
+ ////} else {
//mWorld.setBlock(eX, eY, eZ, GregTech_API.sBlockGranites, 8, 3);
- //} else {
- mWorld.setBlock(eX, eY, eZ, GregTech_API.sBlockGranites, 8, 3);
- //}
- }
+ ////}
+ //}
}
}
}
@@ -224,4 +247,4 @@ public class GT_Worldgenerator }
}
}
-}
\ No newline at end of file +}
diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Casings1.java b/src/main/java/gregtech/common/blocks/GT_Block_Casings1.java index 7eb7cb4189..7b54619980 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Casings1.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Casings1.java @@ -1,83 +1,83 @@ -package gregtech.common.blocks;
-
-import gregtech.api.enums.ItemList;
-import gregtech.api.enums.Textures;
-import gregtech.api.objects.GT_CopiedBlockTexture;
-import gregtech.api.util.GT_LanguageManager;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.IIcon;
-import net.minecraft.world.IBlockAccess;
-
-public class GT_Block_Casings1
- extends GT_Block_Casings_Abstract {
- public GT_Block_Casings1() {
- super(GT_Item_Casings1.class, "gt.blockcasings", GT_Material_Casings.INSTANCE);
- for (byte i = 0; i < 16; i = (byte) (i + 1)) {
- Textures.BlockIcons.CASING_BLOCKS[i] = new GT_CopiedBlockTexture(this, 6, i);
- }
- Textures.BlockIcons.CASING_BLOCKS[120] = new GT_CopiedBlockTexture(this, 6, 0);
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".0.name", "ULV Machine Casing");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".1.name", "LV Machine Casing");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".2.name", "MV Machine Casing");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".3.name", "HV Machine Casing");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".4.name", "EV Machine Casing");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".5.name", "IV Machine Casing");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".6.name", "LuV Machine Casing");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".7.name", "ZPM Machine Casing");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".8.name", "UV Machine Casing");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".9.name", "MAX Machine Casing");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".10.name", "Bronze Plated Bricks");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".11.name", "Heat Proof Machine Casing");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".12.name", "Cupronickel Coil Block (Deprecated)");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".13.name", "Kanthal Coil Block (Deprecated)");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".14.name", "Nichrome Coil Block (Deprecated)");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".15.name", "Superconducting Coil Block");
- ItemList.Casing_ULV.set(new ItemStack(this, 1, 0));
- ItemList.Casing_LV.set(new ItemStack(this, 1, 1));
- ItemList.Casing_MV.set(new ItemStack(this, 1, 2));
- ItemList.Casing_HV.set(new ItemStack(this, 1, 3));
- ItemList.Casing_EV.set(new ItemStack(this, 1, 4));
- ItemList.Casing_IV.set(new ItemStack(this, 1, 5));
- ItemList.Casing_LuV.set(new ItemStack(this, 1, 6));
- ItemList.Casing_ZPM.set(new ItemStack(this, 1, 7));
- ItemList.Casing_UV.set(new ItemStack(this, 1, 8));
- ItemList.Casing_MAX.set(new ItemStack(this, 1, 9));
- ItemList.Casing_BronzePlatedBricks.set(new ItemStack(this, 1, 10));
- ItemList.Casing_HeatProof.set(new ItemStack(this, 1, 11));
- ItemList.Casing_Coil_Cupronickel_Deprecated.set(new ItemStack(this, 1, 12));
- ItemList.Casing_Coil_Kanthal_Deprecated.set(new ItemStack(this, 1, 13));
- ItemList.Casing_Coil_Nichrome_Deprecated.set(new ItemStack(this, 1, 14));
- ItemList.Casing_Coil_Superconductor.set(new ItemStack(this, 1, 15));
- }
-
- public IIcon getIcon(int aSide, int aMeta) {
- if ((aMeta >= 0) && (aMeta < 16)) {
- switch (aMeta) {
- case 10:
- return Textures.BlockIcons.MACHINE_BRONZEPLATEDBRICKS.getIcon();
- case 11:
- return Textures.BlockIcons.MACHINE_HEATPROOFCASING.getIcon();
- case 12:
- return Textures.BlockIcons.RENDERING_ERROR.getIcon();
- case 13:
- return Textures.BlockIcons.RENDERING_ERROR.getIcon();
- case 14:
- return Textures.BlockIcons.RENDERING_ERROR.getIcon();
- case 15:
- return Textures.BlockIcons.MACHINE_COIL_SUPERCONDUCTOR.getIcon();
- }
- if (aSide == 0) {
- return Textures.BlockIcons.MACHINECASINGS_BOTTOM[aMeta].getIcon();
- }
- if (aSide == 1) {
- return Textures.BlockIcons.MACHINECASINGS_TOP[aMeta].getIcon();
- }
- return Textures.BlockIcons.MACHINECASINGS_SIDE[aMeta].getIcon();
- }
- return Textures.BlockIcons.MACHINE_CASING_SOLID_STEEL.getIcon();
- }
-
- public int colorMultiplier(IBlockAccess aWorld, int aX, int aY, int aZ) {
- return aWorld.getBlockMetadata(aX, aY, aZ) > 9 ? super.colorMultiplier(aWorld, aX, aY, aZ) : gregtech.api.enums.Dyes.MACHINE_METAL.mRGBa[0] << 16 | gregtech.api.enums.Dyes.MACHINE_METAL.mRGBa[1] << 8 | gregtech.api.enums.Dyes.MACHINE_METAL.mRGBa[2];
- }
-}
+package gregtech.common.blocks; + +import gregtech.api.enums.ItemList; +import gregtech.api.enums.Textures; +import gregtech.api.objects.GT_CopiedBlockTexture; +import gregtech.api.util.GT_LanguageManager; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; +import net.minecraft.world.IBlockAccess; + +public class GT_Block_Casings1 + extends GT_Block_Casings_Abstract { + public GT_Block_Casings1() { + super(GT_Item_Casings1.class, "gt.blockcasings", GT_Material_Casings.INSTANCE); + for (byte i = 0; i < 16; i = (byte) (i + 1)) { + Textures.BlockIcons.CASING_BLOCKS[i] = new GT_CopiedBlockTexture(this, 6, i); + } + Textures.BlockIcons.CASING_BLOCKS[120] = new GT_CopiedBlockTexture(this, 6, 0); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".0.name", "ULV Machine Casing"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".1.name", "LV Machine Casing"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".2.name", "MV Machine Casing"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".3.name", "HV Machine Casing"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".4.name", "EV Machine Casing"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".5.name", "IV Machine Casing"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".6.name", "LuV Machine Casing"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".7.name", "ZPM Machine Casing"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".8.name", "UV Machine Casing"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".9.name", "UHV Machine Casing"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".10.name", "Bronze Plated Bricks"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".11.name", "Heat Proof Machine Casing"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".12.name", "Cupronickel Coil Block (Deprecated)"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".13.name", "Kanthal Coil Block (Deprecated)"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".14.name", "Nichrome Coil Block (Deprecated)"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".15.name", "Superconducting Coil Block"); + ItemList.Casing_ULV.set(new ItemStack(this, 1, 0)); + ItemList.Casing_LV.set(new ItemStack(this, 1, 1)); + ItemList.Casing_MV.set(new ItemStack(this, 1, 2)); + ItemList.Casing_HV.set(new ItemStack(this, 1, 3)); + ItemList.Casing_EV.set(new ItemStack(this, 1, 4)); + ItemList.Casing_IV.set(new ItemStack(this, 1, 5)); + ItemList.Casing_LuV.set(new ItemStack(this, 1, 6)); + ItemList.Casing_ZPM.set(new ItemStack(this, 1, 7)); + ItemList.Casing_UV.set(new ItemStack(this, 1, 8)); + ItemList.Casing_MAX.set(new ItemStack(this, 1, 9)); + ItemList.Casing_BronzePlatedBricks.set(new ItemStack(this, 1, 10)); + ItemList.Casing_HeatProof.set(new ItemStack(this, 1, 11)); + ItemList.Casing_Coil_Cupronickel_Deprecated.set(new ItemStack(this, 1, 12)); + ItemList.Casing_Coil_Kanthal_Deprecated.set(new ItemStack(this, 1, 13)); + ItemList.Casing_Coil_Nichrome_Deprecated.set(new ItemStack(this, 1, 14)); + ItemList.Casing_Coil_Superconductor.set(new ItemStack(this, 1, 15)); + } + + public IIcon getIcon(int aSide, int aMeta) { + if ((aMeta >= 0) && (aMeta < 16)) { + switch (aMeta) { + case 10: + return Textures.BlockIcons.MACHINE_BRONZEPLATEDBRICKS.getIcon(); + case 11: + return Textures.BlockIcons.MACHINE_HEATPROOFCASING.getIcon(); + case 12: + return Textures.BlockIcons.RENDERING_ERROR.getIcon(); + case 13: + return Textures.BlockIcons.RENDERING_ERROR.getIcon(); + case 14: + return Textures.BlockIcons.RENDERING_ERROR.getIcon(); + case 15: + return Textures.BlockIcons.MACHINE_COIL_SUPERCONDUCTOR.getIcon(); + } + if (aSide == 0) { + return Textures.BlockIcons.MACHINECASINGS_BOTTOM[aMeta].getIcon(); + } + if (aSide == 1) { + return Textures.BlockIcons.MACHINECASINGS_TOP[aMeta].getIcon(); + } + return Textures.BlockIcons.MACHINECASINGS_SIDE[aMeta].getIcon(); + } + return Textures.BlockIcons.MACHINE_CASING_SOLID_STEEL.getIcon(); + } + + public int colorMultiplier(IBlockAccess aWorld, int aX, int aY, int aZ) { + return aWorld.getBlockMetadata(aX, aY, aZ) > 9 ? super.colorMultiplier(aWorld, aX, aY, aZ) : gregtech.api.enums.Dyes.MACHINE_METAL.mRGBa[0] << 16 | gregtech.api.enums.Dyes.MACHINE_METAL.mRGBa[1] << 8 | gregtech.api.enums.Dyes.MACHINE_METAL.mRGBa[2]; + } +} diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Casings2.java b/src/main/java/gregtech/common/blocks/GT_Block_Casings2.java index 0a01488f68..6cb65158c6 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Casings2.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Casings2.java @@ -1,95 +1,95 @@ -package gregtech.common.blocks;
-
-import gregtech.api.enums.ItemList;
-import gregtech.api.enums.Textures;
-import gregtech.api.objects.GT_CopiedBlockTexture;
-import gregtech.api.util.GT_LanguageManager;
-import net.minecraft.entity.Entity;
-import net.minecraft.init.Blocks;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.IIcon;
-import net.minecraft.world.World;
-
-public class GT_Block_Casings2
- extends GT_Block_Casings_Abstract {
- public GT_Block_Casings2() {
- super(GT_Item_Casings2.class, "gt.blockcasings2", GT_Material_Casings.INSTANCE);
- for (byte i = 0; i < 16; i = (byte) (i + 1)) {
- Textures.BlockIcons.CASING_BLOCKS[(i + 16)] = new GT_CopiedBlockTexture(this, 6, i);
- }
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".0.name", "Solid Steel Machine Casing");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".1.name", "Frost Proof Machine Casing");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".2.name", "Bronze Gear Box Casing");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".3.name", "Steel Gear Box Casing");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".4.name", "Titanium Gear Box Casing");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".5.name", "Assembling Line Casing");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".6.name", "Processor Machine Casing");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".7.name", "Data Drive Machine Casing");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".8.name", "Containment Field Machine Casing");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".9.name", "Assembler Machine Casing");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".10.name", "Pump Machine Casing");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".11.name", "Motor Machine Casing");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".12.name", "Bronze Pipe Machine Casing");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".13.name", "Steel Pipe Machine Casing");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".14.name", "Titanium Pipe Machine Casing");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".15.name", "Tungstensteel Pipe Machine Casing");
- ItemList.Casing_SolidSteel.set(new ItemStack(this, 1, 0));
- ItemList.Casing_FrostProof.set(new ItemStack(this, 1, 1));
- ItemList.Casing_Gearbox_Bronze.set(new ItemStack(this, 1, 2));
- ItemList.Casing_Gearbox_Steel.set(new ItemStack(this, 1, 3));
- ItemList.Casing_Gearbox_Titanium.set(new ItemStack(this, 1, 4));
- ItemList.Casing_Gearbox_TungstenSteel.set(new ItemStack(this, 1, 5));
- ItemList.Casing_Processor.set(new ItemStack(this, 1, 6));
- ItemList.Casing_DataDrive.set(new ItemStack(this, 1, 7));
- ItemList.Casing_ContainmentField.set(new ItemStack(this, 1, 8));
- ItemList.Casing_Assembler.set(new ItemStack(this, 1, 9));
- ItemList.Casing_Pump.set(new ItemStack(this, 1, 10));
- ItemList.Casing_Motor.set(new ItemStack(this, 1, 11));
- ItemList.Casing_Pipe_Bronze.set(new ItemStack(this, 1, 12));
- ItemList.Casing_Pipe_Steel.set(new ItemStack(this, 1, 13));
- ItemList.Casing_Pipe_Titanium.set(new ItemStack(this, 1, 14));
- ItemList.Casing_Pipe_TungstenSteel.set(new ItemStack(this, 1, 15));
- }
-
- public IIcon getIcon(int aSide, int aMeta) {
- switch (aMeta) {
- case 0:
- return Textures.BlockIcons.MACHINE_CASING_SOLID_STEEL.getIcon();
- case 1:
- return Textures.BlockIcons.MACHINE_CASING_FROST_PROOF.getIcon();
- case 2:
- return Textures.BlockIcons.MACHINE_CASING_GEARBOX_BRONZE.getIcon();
- case 3:
- return Textures.BlockIcons.MACHINE_CASING_GEARBOX_STEEL.getIcon();
- case 4:
- return Textures.BlockIcons.MACHINE_CASING_GEARBOX_TITANIUM.getIcon();
- case 5:
- return Textures.BlockIcons.MACHINE_CASING_GEARBOX_TUNGSTENSTEEL.getIcon();
- case 6:
- return Textures.BlockIcons.MACHINE_CASING_PROCESSOR.getIcon();
- case 7:
- return Textures.BlockIcons.MACHINE_CASING_DATA_DRIVE.getIcon();
- case 8:
- return Textures.BlockIcons.MACHINE_CASING_CONTAINMENT_FIELD.getIcon();
- case 9:
- return Textures.BlockIcons.MACHINE_CASING_ASSEMBLER.getIcon();
- case 10:
- return Textures.BlockIcons.MACHINE_CASING_PUMP.getIcon();
- case 11:
- return Textures.BlockIcons.MACHINE_CASING_MOTOR.getIcon();
- case 12:
- return Textures.BlockIcons.MACHINE_CASING_PIPE_BRONZE.getIcon();
- case 13:
- return Textures.BlockIcons.MACHINE_CASING_PIPE_STEEL.getIcon();
- case 14:
- return Textures.BlockIcons.MACHINE_CASING_PIPE_TITANIUM.getIcon();
- case 15:
- return Textures.BlockIcons.MACHINE_CASING_PIPE_TUNGSTENSTEEL.getIcon();
- }
- return Textures.BlockIcons.MACHINE_CASING_SOLID_STEEL.getIcon();
- }
-
- public float getExplosionResistance(Entity aTNT, World aWorld, int aX, int aY, int aZ, double eX, double eY, double eZ) {
- return aWorld.getBlockMetadata(aX, aY, aZ) == 8 ? Blocks.bedrock.getExplosionResistance(aTNT) : super.getExplosionResistance(aTNT, aWorld, aX, aY, aZ, eX, eY, eZ);
- }
-}
+package gregtech.common.blocks; + +import gregtech.api.enums.ItemList; +import gregtech.api.enums.Textures; +import gregtech.api.objects.GT_CopiedBlockTexture; +import gregtech.api.util.GT_LanguageManager; +import net.minecraft.entity.Entity; +import net.minecraft.init.Blocks; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; +import net.minecraft.world.World; + +public class GT_Block_Casings2 + extends GT_Block_Casings_Abstract { + public GT_Block_Casings2() { + super(GT_Item_Casings2.class, "gt.blockcasings2", GT_Material_Casings.INSTANCE); + for (byte i = 0; i < 16; i = (byte) (i + 1)) { + Textures.BlockIcons.CASING_BLOCKS[(i + 16)] = new GT_CopiedBlockTexture(this, 6, i); + } + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".0.name", "Solid Steel Machine Casing"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".1.name", "Frost Proof Machine Casing"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".2.name", "Bronze Gear Box Casing"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".3.name", "Steel Gear Box Casing"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".4.name", "Titanium Gear Box Casing"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".5.name", "Assembling Line Casing"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".6.name", "Processor Machine Casing"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".7.name", "Data Drive Machine Casing"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".8.name", "Containment Field Machine Casing"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".9.name", "Assembler Machine Casing"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".10.name", "Pump Machine Casing"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".11.name", "Motor Machine Casing"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".12.name", "Bronze Pipe Machine Casing"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".13.name", "Steel Pipe Machine Casing"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".14.name", "Titanium Pipe Machine Casing"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".15.name", "Tungstensteel Pipe Machine Casing"); + ItemList.Casing_SolidSteel.set(new ItemStack(this, 1, 0)); + ItemList.Casing_FrostProof.set(new ItemStack(this, 1, 1)); + ItemList.Casing_Gearbox_Bronze.set(new ItemStack(this, 1, 2)); + ItemList.Casing_Gearbox_Steel.set(new ItemStack(this, 1, 3)); + ItemList.Casing_Gearbox_Titanium.set(new ItemStack(this, 1, 4)); + ItemList.Casing_Gearbox_TungstenSteel.set(new ItemStack(this, 1, 5)); + ItemList.Casing_Processor.set(new ItemStack(this, 1, 6)); + ItemList.Casing_DataDrive.set(new ItemStack(this, 1, 7)); + ItemList.Casing_ContainmentField.set(new ItemStack(this, 1, 8)); + ItemList.Casing_Assembler.set(new ItemStack(this, 1, 9)); + ItemList.Casing_Pump.set(new ItemStack(this, 1, 10)); + ItemList.Casing_Motor.set(new ItemStack(this, 1, 11)); + ItemList.Casing_Pipe_Bronze.set(new ItemStack(this, 1, 12)); + ItemList.Casing_Pipe_Steel.set(new ItemStack(this, 1, 13)); + ItemList.Casing_Pipe_Titanium.set(new ItemStack(this, 1, 14)); + ItemList.Casing_Pipe_TungstenSteel.set(new ItemStack(this, 1, 15)); + } + + public IIcon getIcon(int aSide, int aMeta) { + switch (aMeta) { + case 0: + return Textures.BlockIcons.MACHINE_CASING_SOLID_STEEL.getIcon(); + case 1: + return Textures.BlockIcons.MACHINE_CASING_FROST_PROOF.getIcon(); + case 2: + return Textures.BlockIcons.MACHINE_CASING_GEARBOX_BRONZE.getIcon(); + case 3: + return Textures.BlockIcons.MACHINE_CASING_GEARBOX_STEEL.getIcon(); + case 4: + return Textures.BlockIcons.MACHINE_CASING_GEARBOX_TITANIUM.getIcon(); + case 5: + return Textures.BlockIcons.MACHINE_CASING_GEARBOX_TUNGSTENSTEEL.getIcon(); + case 6: + return Textures.BlockIcons.MACHINE_CASING_PROCESSOR.getIcon(); + case 7: + return Textures.BlockIcons.MACHINE_CASING_DATA_DRIVE.getIcon(); + case 8: + return Textures.BlockIcons.MACHINE_CASING_CONTAINMENT_FIELD.getIcon(); + case 9: + return Textures.BlockIcons.MACHINE_CASING_ASSEMBLER.getIcon(); + case 10: + return Textures.BlockIcons.MACHINE_CASING_PUMP.getIcon(); + case 11: + return Textures.BlockIcons.MACHINE_CASING_MOTOR.getIcon(); + case 12: + return Textures.BlockIcons.MACHINE_CASING_PIPE_BRONZE.getIcon(); + case 13: + return Textures.BlockIcons.MACHINE_CASING_PIPE_STEEL.getIcon(); + case 14: + return Textures.BlockIcons.MACHINE_CASING_PIPE_TITANIUM.getIcon(); + case 15: + return Textures.BlockIcons.MACHINE_CASING_PIPE_TUNGSTENSTEEL.getIcon(); + } + return Textures.BlockIcons.MACHINE_CASING_SOLID_STEEL.getIcon(); + } + + public float getExplosionResistance(Entity aTNT, World aWorld, int aX, int aY, int aZ, double eX, double eY, double eZ) { + return aWorld.getBlockMetadata(aX, aY, aZ) == 8 ? Blocks.bedrock.getExplosionResistance(aTNT) : super.getExplosionResistance(aTNT, aWorld, aX, aY, aZ, eX, eY, eZ); + } +} diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Casings6.java b/src/main/java/gregtech/common/blocks/GT_Block_Casings6.java new file mode 100644 index 0000000000..090855cf39 --- /dev/null +++ b/src/main/java/gregtech/common/blocks/GT_Block_Casings6.java @@ -0,0 +1,99 @@ +package gregtech.common.blocks; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gregtech.api.enums.ItemList; +import gregtech.api.enums.Textures; +import gregtech.api.util.GT_LanguageManager; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; +import net.minecraft.world.IBlockAccess; + +public class GT_Block_Casings6 + extends GT_Block_Casings_Abstract { + public GT_Block_Casings6() { + super(GT_Item_Casings6.class, "gt.blockcasings6", GT_Material_Casings.INSTANCE); + + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".0.name", "Hermetic Casing"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".1.name", "Hermetic Casing I"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".2.name", "Hermetic Casing II"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".3.name", "Hermetic Casing III"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".4.name", "Hermetic Casing IV"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".5.name", "Hermetic Casing V"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".6.name", "Hermetic Casing VI"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".7.name", "Hermetic Casing VII"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".8.name", "Hermetic Casing VII"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".9.name", "Hermetic Casing IX"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".10.name", "Hermetic Casing X"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".11.name", "Hermetic Casing XI"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".12.name", "Hermetic Casing XII"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".13.name", "Hermetic Casing XIII"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".14.name", "Hermetic Casing XIV"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".15.name", "Hermetic Casing XV"); + + ItemList.Casing_Tank_0.set(new ItemStack(this, 1, 0)); + ItemList.Casing_Tank_1.set(new ItemStack(this, 1, 1)); + ItemList.Casing_Tank_2.set(new ItemStack(this, 1, 2)); + ItemList.Casing_Tank_3.set(new ItemStack(this, 1, 3)); + ItemList.Casing_Tank_4.set(new ItemStack(this, 1, 4)); + ItemList.Casing_Tank_5.set(new ItemStack(this, 1, 5)); + ItemList.Casing_Tank_6.set(new ItemStack(this, 1, 6)); + ItemList.Casing_Tank_7.set(new ItemStack(this, 1, 7)); + ItemList.Casing_Tank_8.set(new ItemStack(this, 1, 8)); + ItemList.Casing_Tank_9.set(new ItemStack(this, 1, 9)); + ItemList.Casing_Tank_10.set(new ItemStack(this, 1, 10)); + ItemList.Casing_Tank_11.set(new ItemStack(this, 1, 11)); + ItemList.Casing_Tank_12.set(new ItemStack(this, 1, 12)); + ItemList.Casing_Tank_13.set(new ItemStack(this, 1, 13)); + ItemList.Casing_Tank_14.set(new ItemStack(this, 1, 14)); + ItemList.Casing_Tank_15.set(new ItemStack(this, 1, 15)); + } + @Override + @SideOnly(Side.CLIENT) + public IIcon getIcon(int aSide, int aMeta) { + if (aSide == 0) { + return Textures.BlockIcons.MACHINECASINGS_BOTTOM[aMeta].getIcon(); + } + if (aSide == 1) { + return Textures.BlockIcons.MACHINECASINGS_TOP[aMeta].getIcon(); + } + switch (aMeta) { + case 1: + return Textures.BlockIcons.MACHINE_CASING_TANK_1.getIcon(); + case 2: + return Textures.BlockIcons.MACHINE_CASING_TANK_2.getIcon(); + case 3: + return Textures.BlockIcons.MACHINE_CASING_TANK_3.getIcon(); + case 4: + return Textures.BlockIcons.MACHINE_CASING_TANK_4.getIcon(); + case 5: + return Textures.BlockIcons.MACHINE_CASING_TANK_5.getIcon(); + case 6: + return Textures.BlockIcons.MACHINE_CASING_TANK_6.getIcon(); + case 7: + return Textures.BlockIcons.MACHINE_CASING_TANK_7.getIcon(); + case 8: + return Textures.BlockIcons.MACHINE_CASING_TANK_8.getIcon(); + case 9: + return Textures.BlockIcons.MACHINE_CASING_TANK_9.getIcon(); + case 10: + return Textures.BlockIcons.MACHINE_CASING_TANK_10.getIcon(); + case 11: + return Textures.BlockIcons.MACHINE_CASING_TANK_11.getIcon(); + case 12: + return Textures.BlockIcons.MACHINE_CASING_TANK_12.getIcon(); + case 13: + return Textures.BlockIcons.MACHINE_CASING_TANK_13.getIcon(); + case 14: + return Textures.BlockIcons.MACHINE_CASING_TANK_14.getIcon(); + case 15: + return Textures.BlockIcons.MACHINE_CASING_TANK_15.getIcon(); + default: + return Textures.BlockIcons.MACHINE_CASING_TANK_0.getIcon(); + } + } + + public int colorMultiplier(IBlockAccess aWorld, int aX, int aY, int aZ) { + return gregtech.api.enums.Dyes.MACHINE_METAL.mRGBa[0] << 16 | gregtech.api.enums.Dyes.MACHINE_METAL.mRGBa[1] << 8 | gregtech.api.enums.Dyes.MACHINE_METAL.mRGBa[2]; + } +} diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Concretes.java b/src/main/java/gregtech/common/blocks/GT_Block_Concretes.java index 06f7feaa93..6f3f80c7df 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Concretes.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Concretes.java @@ -1,95 +1,95 @@ -package gregtech.common.blocks;
-
-import gregtech.api.enums.Materials;
-import gregtech.api.enums.OrePrefixes;
-import gregtech.api.util.GT_LanguageManager;
-import gregtech.api.util.GT_OreDictUnificator;
-import net.minecraft.block.Block;
-import net.minecraft.block.BlockLiquid;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.init.Blocks;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.AxisAlignedBB;
-import net.minecraft.util.IIcon;
-import net.minecraft.world.World;
-import net.minecraftforge.fluids.IFluidBlock;
-
-public class GT_Block_Concretes
- extends GT_Block_Stones_Abstract {
- public GT_Block_Concretes() {
- super(GT_Item_Concretes.class, "gt.blockconcretes");
- setResistance(20.0F);
- this.slipperiness = 0.9F;
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".0.name", "Dark Concrete");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".1.name", "Dark Concrete Cobblestone");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".2.name", "Mossy Dark Concrete Cobblestone");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".3.name", "Dark Concrete Bricks");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".4.name", "Cracked Dark Concrete Bricks");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".5.name", "Mossy Dark Concrete Bricks");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".6.name", "Chiseled Dark Concrete");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".7.name", "Smooth Dark Concrete");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".8.name", "Light Concrete");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".9.name", "Light Concrete Cobblestone");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".10.name", "Mossy Light Concrete Cobblestone");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".11.name", "Light Concrete Bricks");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".12.name", "Cracked Light Concrete Bricks");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".13.name", "Mossy Light Concrete Bricks");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".14.name", "Chiseled Light Concrete");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".15.name", "Smooth Light Concrete");
- GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Concrete, new ItemStack(this, 1, 0));
- GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Concrete, new ItemStack(this, 1, 1));
- GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Concrete, new ItemStack(this, 1, 2));
- GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Concrete, new ItemStack(this, 1, 3));
- GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Concrete, new ItemStack(this, 1, 4));
- GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Concrete, new ItemStack(this, 1, 5));
- GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Concrete, new ItemStack(this, 1, 6));
- GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Concrete, new ItemStack(this, 1, 7));
- GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Concrete, new ItemStack(this, 1, 8));
- GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Concrete, new ItemStack(this, 1, 9));
- GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Concrete, new ItemStack(this, 1, 10));
- GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Concrete, new ItemStack(this, 1, 11));
- GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Concrete, new ItemStack(this, 1, 12));
- GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Concrete, new ItemStack(this, 1, 13));
- GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Concrete, new ItemStack(this, 1, 14));
- GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Concrete, new ItemStack(this, 1, 15));
- }
-
- public int getHarvestLevel(int aMeta) {
- return 1;
- }
-
- public float getBlockHardness(World aWorld, int aX, int aY, int aZ) {
- return this.blockHardness = Blocks.stone.getBlockHardness(aWorld, aX, aY, aZ);
- }
-
- public IIcon getIcon(int aSide, int aMeta) {
- if ((aMeta >= 0) && (aMeta < 16)) {
- return gregtech.api.enums.Textures.BlockIcons.CONCRETES[aMeta].getIcon();
- }
- return gregtech.api.enums.Textures.BlockIcons.CONCRETES[0].getIcon();
- }
-
- public void onEntityCollidedWithBlock(World aWorld, int aX, int aY, int aZ, Entity aEntity) {
- Block tBlock = aWorld.getBlock(aX, aY + 1, aZ);
- if (((aEntity instanceof EntityLivingBase)) && (!(tBlock instanceof IFluidBlock)) && (!(tBlock instanceof BlockLiquid)) && (aEntity.onGround) && (!aEntity.isInWater()) && (!aEntity.isWet())) {
- if (aEntity.isSneaking()) {
- aEntity.motionX *= 0.8999999761581421D;
- aEntity.motionZ *= 0.8999999761581421D;
- } else {
- if (aEntity.motionX < 6.0 && aEntity.motionZ < 6.0) {
- aEntity.motionX *= 1.100000023841858D;
- aEntity.motionZ *= 1.100000023841858D;
- }
- }
- }
- }
-
- public AxisAlignedBB getCollisionBoundingBoxFromPool(World aWorld, int aX, int aY, int aZ) {
- Block tBlock = aWorld.getBlock(aX, aY + 1, aZ);
- if (((tBlock instanceof IFluidBlock)) || ((tBlock instanceof BlockLiquid))) {
- return super.getCollisionBoundingBoxFromPool(aWorld, aX, aY, aZ);
- }
- return AxisAlignedBB.getBoundingBox(aX, aY, aZ, aX + 1, aY + 0.875D, aZ + 1);
- }
-}
+package gregtech.common.blocks; + +import gregtech.api.enums.Materials; +import gregtech.api.enums.OrePrefixes; +import gregtech.api.util.GT_LanguageManager; +import gregtech.api.util.GT_OreDictUnificator; +import net.minecraft.block.Block; +import net.minecraft.block.BlockLiquid; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.init.Blocks; +import net.minecraft.item.ItemStack; +import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.IIcon; +import net.minecraft.world.World; +import net.minecraftforge.fluids.IFluidBlock; + +public class GT_Block_Concretes + extends GT_Block_Stones_Abstract { + public GT_Block_Concretes() { + super(GT_Item_Concretes.class, "gt.blockconcretes"); + setResistance(20.0F); + this.slipperiness = 0.9F; + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".0.name", "Dark Concrete"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".1.name", "Dark Concrete Cobblestone"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".2.name", "Mossy Dark Concrete Cobblestone"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".3.name", "Dark Concrete Bricks"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".4.name", "Cracked Dark Concrete Bricks"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".5.name", "Mossy Dark Concrete Bricks"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".6.name", "Chiseled Dark Concrete"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".7.name", "Smooth Dark Concrete"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".8.name", "Light Concrete"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".9.name", "Light Concrete Cobblestone"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".10.name", "Mossy Light Concrete Cobblestone"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".11.name", "Light Concrete Bricks"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".12.name", "Cracked Light Concrete Bricks"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".13.name", "Mossy Light Concrete Bricks"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".14.name", "Chiseled Light Concrete"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".15.name", "Smooth Light Concrete"); + GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Concrete, new ItemStack(this, 1, 0)); + GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Concrete, new ItemStack(this, 1, 1)); + GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Concrete, new ItemStack(this, 1, 2)); + GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Concrete, new ItemStack(this, 1, 3)); + GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Concrete, new ItemStack(this, 1, 4)); + GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Concrete, new ItemStack(this, 1, 5)); + GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Concrete, new ItemStack(this, 1, 6)); + GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Concrete, new ItemStack(this, 1, 7)); + GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Concrete, new ItemStack(this, 1, 8)); + GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Concrete, new ItemStack(this, 1, 9)); + GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Concrete, new ItemStack(this, 1, 10)); + GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Concrete, new ItemStack(this, 1, 11)); + GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Concrete, new ItemStack(this, 1, 12)); + GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Concrete, new ItemStack(this, 1, 13)); + GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Concrete, new ItemStack(this, 1, 14)); + GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Concrete, new ItemStack(this, 1, 15)); + } + + public int getHarvestLevel(int aMeta) { + return 1; + } + + public float getBlockHardness(World aWorld, int aX, int aY, int aZ) { + return this.blockHardness = Blocks.stone.getBlockHardness(aWorld, aX, aY, aZ); + } + + public IIcon getIcon(int aSide, int aMeta) { + if ((aMeta >= 0) && (aMeta < 16)) { + return gregtech.api.enums.Textures.BlockIcons.CONCRETES[aMeta].getIcon(); + } + return gregtech.api.enums.Textures.BlockIcons.CONCRETES[0].getIcon(); + } + + public void onEntityCollidedWithBlock(World aWorld, int aX, int aY, int aZ, Entity aEntity) { + Block tBlock = aWorld.getBlock(aX, aY + 1, aZ); + if (((aEntity instanceof EntityLivingBase)) && (!(tBlock instanceof IFluidBlock)) && (!(tBlock instanceof BlockLiquid)) && (aEntity.onGround) && (!aEntity.isInWater()) && (!aEntity.isWet())) { + if (aEntity.isSneaking()) { + aEntity.motionX *= 0.8999999761581421D; + aEntity.motionZ *= 0.8999999761581421D; + } else { + if (aEntity.motionX < 6.0 && aEntity.motionZ < 6.0) { + aEntity.motionX *= 1.100000023841858D; + aEntity.motionZ *= 1.100000023841858D; + } + } + } + } + + public AxisAlignedBB getCollisionBoundingBoxFromPool(World aWorld, int aX, int aY, int aZ) { + Block tBlock = aWorld.getBlock(aX, aY + 1, aZ); + if (((tBlock instanceof IFluidBlock)) || ((tBlock instanceof BlockLiquid))) { + return super.getCollisionBoundingBoxFromPool(aWorld, aX, aY, aZ); + } + return AxisAlignedBB.getBoundingBox(aX, aY, aZ, aX + 1, aY + 0.875D, aZ + 1); + } +} diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Granites.java b/src/main/java/gregtech/common/blocks/GT_Block_Granites.java index 2732845258..39d68ce933 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Granites.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Granites.java @@ -1,72 +1,72 @@ -package gregtech.common.blocks;
-
-import gregtech.api.enums.Materials;
-import gregtech.api.enums.OrePrefixes;
-import gregtech.api.util.GT_LanguageManager;
-import gregtech.api.util.GT_OreDictUnificator;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.boss.EntityWither;
-import net.minecraft.init.Blocks;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.IIcon;
-import net.minecraft.world.IBlockAccess;
-import net.minecraft.world.World;
-
-public class GT_Block_Granites
- extends GT_Block_Stones_Abstract {
- public GT_Block_Granites() {
- super(GT_Item_Granites.class, "gt.blockgranites");
- setResistance(60.0F);
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".0.name", "Black Granite");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".1.name", "Black Granite Cobblestone");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".2.name", "Mossy Black Granite Cobblestone");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".3.name", "Black Granite Bricks");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".4.name", "Cracked Black Granite Bricks");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".5.name", "Mossy Black Granite Bricks");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".6.name", "Chiseled Black Granite");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".7.name", "Smooth Black Granite");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".8.name", "Red Granite");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".9.name", "Red Granite Cobblestone");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".10.name", "Mossy Red Granite Cobblestone");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".11.name", "Red Granite Bricks");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".12.name", "Cracked Red Granite Bricks");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".13.name", "Mossy Red Granite Bricks");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".14.name", "Chiseled Red Granite");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".15.name", "Smooth Red Granite");
- GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.GraniteBlack, new ItemStack(this, 1, 0));
- GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.GraniteBlack, new ItemStack(this, 1, 1));
- GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.GraniteBlack, new ItemStack(this, 1, 2));
- GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.GraniteBlack, new ItemStack(this, 1, 3));
- GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.GraniteBlack, new ItemStack(this, 1, 4));
- GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.GraniteBlack, new ItemStack(this, 1, 5));
- GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.GraniteBlack, new ItemStack(this, 1, 6));
- GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.GraniteBlack, new ItemStack(this, 1, 7));
- GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.GraniteRed, new ItemStack(this, 1, 8));
- GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.GraniteRed, new ItemStack(this, 1, 9));
- GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.GraniteRed, new ItemStack(this, 1, 10));
- GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.GraniteRed, new ItemStack(this, 1, 11));
- GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.GraniteRed, new ItemStack(this, 1, 12));
- GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.GraniteRed, new ItemStack(this, 1, 13));
- GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.GraniteRed, new ItemStack(this, 1, 14));
- GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.GraniteRed, new ItemStack(this, 1, 15));
- }
-
- public int getHarvestLevel(int aMeta) {
- return 3;
- }
-
- public float getBlockHardness(World aWorld, int aX, int aY, int aZ) {
- return this.blockHardness = Blocks.stone.getBlockHardness(aWorld, aX, aY, aZ) * 3.0F;
- }
-
- public IIcon getIcon(int aSide, int aMeta) {
- if ((aMeta >= 0) && (aMeta < 16)) {
- return gregtech.api.enums.Textures.BlockIcons.GRANITES[aMeta].getIcon();
- }
- return gregtech.api.enums.Textures.BlockIcons.GRANITES[0].getIcon();
- }
-
- public boolean canEntityDestroy(IBlockAccess world, int x, int y, int z, Entity entity) {
- return !(entity instanceof EntityWither);
- }
-}
+package gregtech.common.blocks; + +import gregtech.api.enums.Materials; +import gregtech.api.enums.OrePrefixes; +import gregtech.api.util.GT_LanguageManager; +import gregtech.api.util.GT_OreDictUnificator; +import net.minecraft.entity.Entity; +import net.minecraft.entity.boss.EntityWither; +import net.minecraft.init.Blocks; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; + +public class GT_Block_Granites + extends GT_Block_Stones_Abstract { + public GT_Block_Granites() { + super(GT_Item_Granites.class, "gt.blockgranites"); + setResistance(60.0F); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".0.name", "Black Granite"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".1.name", "Black Granite Cobblestone"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".2.name", "Mossy Black Granite Cobblestone"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".3.name", "Black Granite Bricks"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".4.name", "Cracked Black Granite Bricks"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".5.name", "Mossy Black Granite Bricks"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".6.name", "Chiseled Black Granite"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".7.name", "Smooth Black Granite"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".8.name", "Red Granite"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".9.name", "Red Granite Cobblestone"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".10.name", "Mossy Red Granite Cobblestone"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".11.name", "Red Granite Bricks"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".12.name", "Cracked Red Granite Bricks"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".13.name", "Mossy Red Granite Bricks"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".14.name", "Chiseled Red Granite"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".15.name", "Smooth Red Granite"); + GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.GraniteBlack, new ItemStack(this, 1, 0)); + GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.GraniteBlack, new ItemStack(this, 1, 1)); + GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.GraniteBlack, new ItemStack(this, 1, 2)); + GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.GraniteBlack, new ItemStack(this, 1, 3)); + GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.GraniteBlack, new ItemStack(this, 1, 4)); + GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.GraniteBlack, new ItemStack(this, 1, 5)); + GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.GraniteBlack, new ItemStack(this, 1, 6)); + GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.GraniteBlack, new ItemStack(this, 1, 7)); + GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.GraniteRed, new ItemStack(this, 1, 8)); + GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.GraniteRed, new ItemStack(this, 1, 9)); + GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.GraniteRed, new ItemStack(this, 1, 10)); + GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.GraniteRed, new ItemStack(this, 1, 11)); + GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.GraniteRed, new ItemStack(this, 1, 12)); + GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.GraniteRed, new ItemStack(this, 1, 13)); + GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.GraniteRed, new ItemStack(this, 1, 14)); + GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.GraniteRed, new ItemStack(this, 1, 15)); + } + + public int getHarvestLevel(int aMeta) { + return 3; + } + + public float getBlockHardness(World aWorld, int aX, int aY, int aZ) { + return this.blockHardness = Blocks.stone.getBlockHardness(aWorld, aX, aY, aZ) * 3.0F; + } + + public IIcon getIcon(int aSide, int aMeta) { + if ((aMeta >= 0) && (aMeta < 16)) { + return gregtech.api.enums.Textures.BlockIcons.GRANITES[aMeta].getIcon(); + } + return gregtech.api.enums.Textures.BlockIcons.GRANITES[0].getIcon(); + } + + public boolean canEntityDestroy(IBlockAccess world, int x, int y, int z, Entity entity) { + return !(entity instanceof EntityWither); + } +} diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Machines.java b/src/main/java/gregtech/common/blocks/GT_Block_Machines.java index 3d8a814260..9472374a7c 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Machines.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Machines.java @@ -196,6 +196,38 @@ public class GT_Block_Machines return super.getCollisionBoundingBoxFromPool(aWorld, aX, aY, aZ);
}
+ @Override
+ @SideOnly(Side.CLIENT)
+ public AxisAlignedBB getSelectedBoundingBoxFromPool(World aWorld, int aX, int aY, int aZ)
+ {
+ TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ);
+ if (((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getMetaTileEntity() != null)) {
+ return ((IGregTechTileEntity) tTileEntity).getCollisionBoundingBoxFromPool(aWorld, aX, aY, aZ);
+ }
+ return super.getSelectedBoundingBoxFromPool(aWorld, aX, aY, aZ);
+ }
+
+ @Override //THIS
+ public void setBlockBoundsBasedOnState(IBlockAccess blockAccess, int aX, int aY, int aZ) {
+ TileEntity tTileEntity = blockAccess.getTileEntity(aX,aY,aZ);
+ if (((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getMetaTileEntity() != null)) {
+ AxisAlignedBB bbb=((IGregTechTileEntity)tTileEntity).getCollisionBoundingBoxFromPool(((IGregTechTileEntity)tTileEntity).getWorld(), 0, 0, 0);
+ minX=bbb.minX;
+ minY=bbb.minY;
+ minZ=bbb.minZ;
+ maxX=bbb.maxX;
+ maxY=bbb.maxY;
+ maxZ=bbb.maxZ;
+ return;
+ }
+ super.setBlockBoundsBasedOnState(blockAccess,aX,aY,aZ);
+ }
+
+ @Override
+ public void setBlockBoundsForItemRender() {
+ super.setBlockBounds(0,0,0,1,1,1);
+ }
+
public void onEntityCollidedWithBlock(World aWorld, int aX, int aY, int aZ, Entity collider) {
TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ);
if (((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getMetaTileEntity() != null)) {
diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Ores.java b/src/main/java/gregtech/common/blocks/GT_Block_Ores.java index c754e79bd8..70200e5199 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Ores.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Ores.java @@ -47,11 +47,27 @@ public class GT_Block_Ores extends GT_Block_Ores_Abstract { @Override public Materials[] getDroppedDusts() { //Must have 8 entries; can be null. - return new Materials[]{Materials.Stone, Materials.Netherrack, Materials.Endstone, Materials.GraniteBlack, Materials.GraniteRed, Materials.Marble, Materials.Basalt, Materials.Stone}; + return new Materials[]{Materials.Stone, Materials.Netherrack, Materials.Endstone, Materials.GraniteBlack, Materials.GraniteRed, Materials.Marble, Materials.Basalt, null}; } @Override public ITexture[] getTextureSet() { //Must have 16 entries. - return new ITexture[]{new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.netherrack, 0, 0), new GT_CopiedBlockTexture(Blocks.end_stone, 0, 0), new GT_RenderedTexture(Textures.BlockIcons.GRANITE_BLACK_STONE), new GT_RenderedTexture(Textures.BlockIcons.GRANITE_RED_STONE), new GT_RenderedTexture(Textures.BlockIcons.MARBLE_STONE), new GT_RenderedTexture(Textures.BlockIcons.BASALT_STONE), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0)}; + return new ITexture[]{ + new GT_CopiedBlockTexture(Blocks.stone, 0, 0), + new GT_CopiedBlockTexture(Blocks.netherrack, 0, 0), + new GT_CopiedBlockTexture(Blocks.end_stone, 0, 0), + new GT_RenderedTexture(Textures.BlockIcons.GRANITE_BLACK_STONE), + new GT_RenderedTexture(Textures.BlockIcons.GRANITE_RED_STONE), + new GT_RenderedTexture(Textures.BlockIcons.MARBLE_STONE), + new GT_RenderedTexture(Textures.BlockIcons.BASALT_STONE), + new GT_CopiedBlockTexture(Blocks.stone, 0, 0), + new GT_CopiedBlockTexture(Blocks.stone, 0, 0), + new GT_CopiedBlockTexture(Blocks.netherrack, 0, 0), + new GT_CopiedBlockTexture(Blocks.end_stone, 0, 0), + new GT_RenderedTexture(Textures.BlockIcons.GRANITE_BLACK_STONE), + new GT_RenderedTexture(Textures.BlockIcons.GRANITE_RED_STONE), + new GT_RenderedTexture(Textures.BlockIcons.MARBLE_STONE), + new GT_RenderedTexture(Textures.BlockIcons.BASALT_STONE), + new GT_CopiedBlockTexture(Blocks.stone, 0, 0)}; } -}
\ No newline at end of file +} diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Ores_GC.java b/src/main/java/gregtech/common/blocks/GT_Block_Ores_GC.java deleted file mode 100644 index 23061baada..0000000000 --- a/src/main/java/gregtech/common/blocks/GT_Block_Ores_GC.java +++ /dev/null @@ -1,47 +0,0 @@ -package gregtech.common.blocks; - -import cpw.mods.fml.common.registry.GameRegistry; -import gregtech.api.GregTech_API; -import gregtech.api.enums.Materials; -import gregtech.api.enums.OrePrefixes; -import gregtech.api.interfaces.ITexture; -import gregtech.api.objects.GT_CopiedBlockTexture; -import net.minecraft.block.Block; -import net.minecraft.block.material.Material; -import net.minecraft.init.Blocks; - -public class GT_Block_Ores_GC extends GT_Block_Ores_Abstract { - Block aMoonBlock = GameRegistry.findBlock("GalacticraftCore", "tile.moonBlock"); - Block aMarsBlock = GameRegistry.findBlock("GalacticraftMars", "tile.mars"); - - public GT_Block_Ores_GC() { - super("gt.blockores.gc", 4, true, Material.rock); - if (aMoonBlock == null) aMoonBlock = Blocks.stone; - if (aMarsBlock == null) aMarsBlock = Blocks.stone; - } - - @Override - public String getUnlocalizedName() { - return "gt.blockores.gc"; - } - - @Override - public OrePrefixes[] getProcessingPrefix() { //Must have 8 entries. - return new OrePrefixes[]{OrePrefixes.ore, OrePrefixes.ore, OrePrefixes.ore, OrePrefixes.ore, OrePrefixes.ore, OrePrefixes.ore, OrePrefixes.ore, OrePrefixes.ore}; - } - - @Override - public Block getDroppedBlock() { - return GregTech_API.sBlockOresGC; - } - - @Override - public Materials[] getDroppedDusts() { //Must have 8 entries; can be null. - return new Materials[]{Materials.Stone, Materials.Stone, Materials.Stone, Materials.Stone, Materials.Stone, Materials.Stone, Materials.Stone, Materials.Stone}; - } - - @Override - public ITexture[] getTextureSet() { //Must have 16 entries. - return new ITexture[]{new GT_CopiedBlockTexture(aMoonBlock, 0, 3), new GT_CopiedBlockTexture(aMoonBlock, 0, 4), new GT_CopiedBlockTexture(aMoonBlock, 0, 6), new GT_CopiedBlockTexture(aMarsBlock, 0, 9), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0),new GT_CopiedBlockTexture(aMoonBlock, 0, 3), new GT_CopiedBlockTexture(aMoonBlock, 0, 4), new GT_CopiedBlockTexture(aMoonBlock, 0, 6), new GT_CopiedBlockTexture(aMarsBlock, 0, 9), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0)}; - } -} diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Ores_UB3.java b/src/main/java/gregtech/common/blocks/GT_Block_Ores_UB3.java index 7866264738..dc5e07a115 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Ores_UB3.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Ores_UB3.java @@ -47,4 +47,4 @@ public class GT_Block_Ores_UB3 extends GT_Block_Ores_Abstract { public ITexture[] getTextureSet() { //Must have 16 entries. return new ITexture[]{new GT_CopiedBlockTexture(aUBBlock, 0, 0), new GT_CopiedBlockTexture(aUBBlock, 0, 1), new GT_CopiedBlockTexture(aUBBlock, 0, 2), new GT_CopiedBlockTexture(aUBBlock, 0, 3), new GT_CopiedBlockTexture(aUBBlock, 0, 4), new GT_CopiedBlockTexture(aUBBlock, 0, 5), new GT_CopiedBlockTexture(aUBBlock, 0, 6), new GT_CopiedBlockTexture(aUBBlock, 0, 7), new GT_CopiedBlockTexture(aUBBlock, 0, 0), new GT_CopiedBlockTexture(aUBBlock, 0, 1), new GT_CopiedBlockTexture(aUBBlock, 0, 2), new GT_CopiedBlockTexture(aUBBlock, 0, 3), new GT_CopiedBlockTexture(aUBBlock, 0, 4), new GT_CopiedBlockTexture(aUBBlock, 0, 5), new GT_CopiedBlockTexture(aUBBlock, 0, 6), new GT_CopiedBlockTexture(aUBBlock, 0, 7)}; } -}
\ No newline at end of file +} diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Stones.java b/src/main/java/gregtech/common/blocks/GT_Block_Stones.java index 05c294f0ee..8da05da7b2 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Stones.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Stones.java @@ -48,7 +48,7 @@ public class GT_Block_Stones extends GT_Block_Stones_Abstract { } public int getHarvestLevel(int aMeta) { - return 1; + return 2; } public float getBlockHardness(World aWorld, int aX, int aY, int aZ) { diff --git a/src/main/java/gregtech/common/blocks/GT_Item_Casings1.java b/src/main/java/gregtech/common/blocks/GT_Item_Casings1.java index 81b865d4fe..680942d9fd 100644 --- a/src/main/java/gregtech/common/blocks/GT_Item_Casings1.java +++ b/src/main/java/gregtech/common/blocks/GT_Item_Casings1.java @@ -1,27 +1,27 @@ -package gregtech.common.blocks;
-
-import java.util.List;
-
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import net.minecraft.block.Block;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.EnumChatFormatting;
-
-public class GT_Item_Casings1
- extends GT_Item_Casings_Abstract {
- public GT_Item_Casings1(Block par1) {
- super(par1);
- }
- @Override
- @SideOnly(Side.CLIENT)
- public void addInformation(ItemStack aStack, EntityPlayer aPlayer, List aList, boolean aF3_H) {
- super.addInformation(aStack, aPlayer, aList, aF3_H);
- int tMeta = getDamage(aStack);
- if (tMeta >= 12 && tMeta <= 14) {
- aList.add(EnumChatFormatting.ITALIC + this.mCoilOverheated1Tooltip);
- aList.add(EnumChatFormatting.ITALIC + this.mCoilOverheated2Tooltip);
- }
- }
-}
+package gregtech.common.blocks; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumChatFormatting; + +import java.util.List; + +public class GT_Item_Casings1 + extends GT_Item_Casings_Abstract { + public GT_Item_Casings1(Block par1) { + super(par1); + } + @Override + @SideOnly(Side.CLIENT) + public void addInformation(ItemStack aStack, EntityPlayer aPlayer, List aList, boolean aF3_H) { + super.addInformation(aStack, aPlayer, aList, aF3_H); + int tMeta = getDamage(aStack); + if (tMeta >= 12 && tMeta <= 14) { + aList.add(EnumChatFormatting.ITALIC + this.mCoilOverheated1Tooltip); + aList.add(EnumChatFormatting.ITALIC + this.mCoilOverheated2Tooltip); + } + } +} diff --git a/src/main/java/gregtech/common/blocks/GT_Item_Casings2.java b/src/main/java/gregtech/common/blocks/GT_Item_Casings2.java index 3fc89b7d30..1d069d94f7 100644 --- a/src/main/java/gregtech/common/blocks/GT_Item_Casings2.java +++ b/src/main/java/gregtech/common/blocks/GT_Item_Casings2.java @@ -1,22 +1,22 @@ -package gregtech.common.blocks;
-
-import net.minecraft.block.Block;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-
-import java.util.List;
-
-public class GT_Item_Casings2
- extends GT_Item_Casings_Abstract {
- public GT_Item_Casings2(Block par1) {
- super(par1);
- }
-
- public void addInformation(ItemStack aStack, EntityPlayer aPlayer, List aList, boolean aF3_H) {
- super.addInformation(aStack, aPlayer, aList, aF3_H);
- switch (getDamage(aStack)) {
- case 8:
- aList.add(this.mBlastProofTooltip);
- }
- }
-}
+package gregtech.common.blocks; + +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; + +import java.util.List; + +public class GT_Item_Casings2 + extends GT_Item_Casings_Abstract { + public GT_Item_Casings2(Block par1) { + super(par1); + } + + public void addInformation(ItemStack aStack, EntityPlayer aPlayer, List aList, boolean aF3_H) { + super.addInformation(aStack, aPlayer, aList, aF3_H); + switch (getDamage(aStack)) { + case 8: + aList.add(this.mBlastProofTooltip); + } + } +} diff --git a/src/main/java/gregtech/common/blocks/GT_Item_Casings3.java b/src/main/java/gregtech/common/blocks/GT_Item_Casings3.java index 71faf83fc3..5ecf0a9da6 100644 --- a/src/main/java/gregtech/common/blocks/GT_Item_Casings3.java +++ b/src/main/java/gregtech/common/blocks/GT_Item_Casings3.java @@ -1,10 +1,10 @@ -package gregtech.common.blocks;
-
-import net.minecraft.block.Block;
-
-public class GT_Item_Casings3
- extends GT_Item_Casings_Abstract {
- public GT_Item_Casings3(Block par1) {
- super(par1);
- }
-}
+package gregtech.common.blocks; + +import net.minecraft.block.Block; + +public class GT_Item_Casings3 + extends GT_Item_Casings_Abstract { + public GT_Item_Casings3(Block par1) { + super(par1); + } +} diff --git a/src/main/java/gregtech/common/blocks/GT_Item_Casings4.java b/src/main/java/gregtech/common/blocks/GT_Item_Casings4.java index 33447673cb..05da650a51 100644 --- a/src/main/java/gregtech/common/blocks/GT_Item_Casings4.java +++ b/src/main/java/gregtech/common/blocks/GT_Item_Casings4.java @@ -1,10 +1,10 @@ -package gregtech.common.blocks;
-
-import net.minecraft.block.Block;
-
-public class GT_Item_Casings4
- extends GT_Item_Casings_Abstract {
- public GT_Item_Casings4(Block par1) {
- super(par1);
- }
-}
+package gregtech.common.blocks; + +import net.minecraft.block.Block; + +public class GT_Item_Casings4 + extends GT_Item_Casings_Abstract { + public GT_Item_Casings4(Block par1) { + super(par1); + } +} diff --git a/src/main/java/gregtech/common/blocks/GT_Item_Casings5.java b/src/main/java/gregtech/common/blocks/GT_Item_Casings5.java index 36e7fea047..09d79b75dc 100644 --- a/src/main/java/gregtech/common/blocks/GT_Item_Casings5.java +++ b/src/main/java/gregtech/common/blocks/GT_Item_Casings5.java @@ -1,13 +1,13 @@ package gregtech.common.blocks; -import java.util.List; - import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; +import java.util.List; + public class GT_Item_Casings5 extends GT_Item_Casings_Abstract { public GT_Item_Casings5(Block par1) { diff --git a/src/main/java/gregtech/common/blocks/GT_Item_Casings6.java b/src/main/java/gregtech/common/blocks/GT_Item_Casings6.java new file mode 100644 index 0000000000..f29e907827 --- /dev/null +++ b/src/main/java/gregtech/common/blocks/GT_Item_Casings6.java @@ -0,0 +1,10 @@ +package gregtech.common.blocks; + +import net.minecraft.block.Block; + +public class GT_Item_Casings6 + extends GT_Item_Casings_Abstract { + public GT_Item_Casings6(Block par1) { + super(par1); + } +}
\ No newline at end of file diff --git a/src/main/java/gregtech/common/blocks/GT_Item_Casings_Abstract.java b/src/main/java/gregtech/common/blocks/GT_Item_Casings_Abstract.java index e7298154dc..62e64f2680 100644 --- a/src/main/java/gregtech/common/blocks/GT_Item_Casings_Abstract.java +++ b/src/main/java/gregtech/common/blocks/GT_Item_Casings_Abstract.java @@ -1,46 +1,46 @@ -package gregtech.common.blocks;
-
-import java.util.List;
-
-import gregtech.api.GregTech_API;
-import gregtech.api.util.GT_LanguageManager;
-import net.minecraft.block.Block;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemBlock;
-import net.minecraft.item.ItemStack;
-
-public abstract class GT_Item_Casings_Abstract
- extends ItemBlock {
- protected final String mNoMobsToolTip = GT_LanguageManager.addStringLocalization("gt.nomobspawnsonthisblock", "Mobs cannot Spawn on this Block");
- protected final String mNoTileEntityToolTip = GT_LanguageManager.addStringLocalization("gt.notileentityinthisblock", "This is NOT a TileEntity!");
- protected final String mCoil01Tooltip = GT_LanguageManager.addStringLocalization("gt.coil01tooltip", "Base Heating Capacity = 1800 Kelvin");
- protected final String mCoil02Tooltip = GT_LanguageManager.addStringLocalization("gt.coil02tooltip", "Base Heating Capacity = 2700 Kelvin");
- protected final String mCoil03Tooltip = GT_LanguageManager.addStringLocalization("gt.coil03tooltip", "Base Heating Capacity = 3600 Kelvin");
- protected final String mCoil04Tooltip = GT_LanguageManager.addStringLocalization("gt.coil04tooltip", "Base Heating Capacity = 4500 Kelvin");
- protected final String mCoil05Tooltip = GT_LanguageManager.addStringLocalization("gt.coil05tooltip", "Base Heating Capacity = 5400 Kelvin");
- protected final String mCoil06Tooltip = GT_LanguageManager.addStringLocalization("gt.coil06tooltip", "Base Heating Capacity = 7200 Kelvin");
- protected final String mCoil07Tooltip = GT_LanguageManager.addStringLocalization("gt.coil07tooltip", "Base Heating Capacity = 9001 Kelvin");
- protected final String mCoilOverheated1Tooltip = GT_LanguageManager.addStringLocalization("gt.coil.overheated1.tooltip", "These coils are deprecated");
- protected final String mCoilOverheated2Tooltip = GT_LanguageManager.addStringLocalization("gt.coil.overheated2.tooltip", "Place in crafting grid to get regular coils");
- protected final String mBlastProofTooltip = GT_LanguageManager.addStringLocalization("gt.blastprooftooltip", "This Block is Blast Proof");
- public GT_Item_Casings_Abstract(Block par1) {
- super(par1);
- setMaxDamage(0);
- setHasSubtypes(true);
- setCreativeTab(GregTech_API.TAB_GREGTECH_MATERIALS);
- }
-
- public int getMetadata(int aMeta) {
- return aMeta;
- }
-
- public String getUnlocalizedName(ItemStack aStack) {
- return this.field_150939_a.getUnlocalizedName() + "." + getDamage(aStack);
- }
-
- public void addInformation(ItemStack aStack, EntityPlayer aPlayer, List aList, boolean aF3_H) {
- super.addInformation(aStack, aPlayer, aList, aF3_H);
- aList.add(this.mNoMobsToolTip);
- aList.add(this.mNoTileEntityToolTip);
- }
-}
+package gregtech.common.blocks; + +import gregtech.api.GregTech_API; +import gregtech.api.util.GT_LanguageManager; +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemBlock; +import net.minecraft.item.ItemStack; + +import java.util.List; + +public abstract class GT_Item_Casings_Abstract + extends ItemBlock { + protected final String mNoMobsToolTip = GT_LanguageManager.addStringLocalization("gt.nomobspawnsonthisblock", "Mobs cannot Spawn on this Block"); + protected final String mNoTileEntityToolTip = GT_LanguageManager.addStringLocalization("gt.notileentityinthisblock", "This is NOT a TileEntity!"); + protected final String mCoil01Tooltip = GT_LanguageManager.addStringLocalization("gt.coil01tooltip", "Base Heating Capacity = 1800 Kelvin"); + protected final String mCoil02Tooltip = GT_LanguageManager.addStringLocalization("gt.coil02tooltip", "Base Heating Capacity = 2700 Kelvin"); + protected final String mCoil03Tooltip = GT_LanguageManager.addStringLocalization("gt.coil03tooltip", "Base Heating Capacity = 3600 Kelvin"); + protected final String mCoil04Tooltip = GT_LanguageManager.addStringLocalization("gt.coil04tooltip", "Base Heating Capacity = 4500 Kelvin"); + protected final String mCoil05Tooltip = GT_LanguageManager.addStringLocalization("gt.coil05tooltip", "Base Heating Capacity = 5400 Kelvin"); + protected final String mCoil06Tooltip = GT_LanguageManager.addStringLocalization("gt.coil06tooltip", "Base Heating Capacity = 7200 Kelvin"); + protected final String mCoil07Tooltip = GT_LanguageManager.addStringLocalization("gt.coil07tooltip", "Base Heating Capacity = 9001 Kelvin"); + protected final String mCoilOverheated1Tooltip = GT_LanguageManager.addStringLocalization("gt.coil.overheated1.tooltip", "These coils are deprecated"); + protected final String mCoilOverheated2Tooltip = GT_LanguageManager.addStringLocalization("gt.coil.overheated2.tooltip", "Place in crafting grid to get regular coils"); + protected final String mBlastProofTooltip = GT_LanguageManager.addStringLocalization("gt.blastprooftooltip", "This Block is Blast Proof"); + public GT_Item_Casings_Abstract(Block par1) { + super(par1); + setMaxDamage(0); + setHasSubtypes(true); + setCreativeTab(GregTech_API.TAB_GREGTECH_MATERIALS); + } + + public int getMetadata(int aMeta) { + return aMeta; + } + + public String getUnlocalizedName(ItemStack aStack) { + return this.field_150939_a.getUnlocalizedName() + "." + getDamage(aStack); + } + + public void addInformation(ItemStack aStack, EntityPlayer aPlayer, List aList, boolean aF3_H) { + super.addInformation(aStack, aPlayer, aList, aF3_H); + aList.add(this.mNoMobsToolTip); + aList.add(this.mNoTileEntityToolTip); + } +} diff --git a/src/main/java/gregtech/common/blocks/GT_Item_Concretes.java b/src/main/java/gregtech/common/blocks/GT_Item_Concretes.java index 1c447cebc1..22a732a507 100644 --- a/src/main/java/gregtech/common/blocks/GT_Item_Concretes.java +++ b/src/main/java/gregtech/common/blocks/GT_Item_Concretes.java @@ -1,22 +1,22 @@ -package gregtech.common.blocks;
-
-import gregtech.api.util.GT_LanguageManager;
-import net.minecraft.block.Block;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-
-import java.util.List;
-
-public class GT_Item_Concretes
- extends GT_Item_Stones_Abstract {
- private final String mRunFasterToolTip = GT_LanguageManager.addStringLocalization("gt.runfastertooltip", "You can walk faster on this Block");
-
- public GT_Item_Concretes(Block par1) {
- super(par1);
- }
-
- public void addInformation(ItemStack aStack, EntityPlayer aPlayer, List aList, boolean aF3_H) {
- super.addInformation(aStack, aPlayer, aList, aF3_H);
- aList.add(this.mRunFasterToolTip);
- }
-}
+package gregtech.common.blocks; + +import gregtech.api.util.GT_LanguageManager; +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; + +import java.util.List; + +public class GT_Item_Concretes + extends GT_Item_Stones_Abstract { + private final String mRunFasterToolTip = GT_LanguageManager.addStringLocalization("gt.runfastertooltip", "You can walk faster on this Block"); + + public GT_Item_Concretes(Block par1) { + super(par1); + } + + public void addInformation(ItemStack aStack, EntityPlayer aPlayer, List aList, boolean aF3_H) { + super.addInformation(aStack, aPlayer, aList, aF3_H); + aList.add(this.mRunFasterToolTip); + } +} diff --git a/src/main/java/gregtech/common/blocks/GT_Item_Granites.java b/src/main/java/gregtech/common/blocks/GT_Item_Granites.java index 246e58f7ff..71faf3b759 100644 --- a/src/main/java/gregtech/common/blocks/GT_Item_Granites.java +++ b/src/main/java/gregtech/common/blocks/GT_Item_Granites.java @@ -1,10 +1,10 @@ -package gregtech.common.blocks;
-
-import net.minecraft.block.Block;
-
-public class GT_Item_Granites
- extends GT_Item_Stones_Abstract {
- public GT_Item_Granites(Block par1) {
- super(par1);
- }
-}
+package gregtech.common.blocks; + +import net.minecraft.block.Block; + +public class GT_Item_Granites + extends GT_Item_Stones_Abstract { + public GT_Item_Granites(Block par1) { + super(par1); + } +} diff --git a/src/main/java/gregtech/common/blocks/GT_Item_Machines.java b/src/main/java/gregtech/common/blocks/GT_Item_Machines.java index 4014b01f39..97cd810ec1 100644 --- a/src/main/java/gregtech/common/blocks/GT_Item_Machines.java +++ b/src/main/java/gregtech/common/blocks/GT_Item_Machines.java @@ -33,16 +33,21 @@ public class GT_Item_Machines if ((tDamage <= 0) || (tDamage >= GregTech_API.METATILEENTITIES.length)) {
return;
}
- TileEntity temp = GregTech_API.sBlockMachines.createTileEntity(aPlayer == null ? GT_Values.DW : aPlayer.worldObj, GregTech_API.METATILEENTITIES[tDamage] == null ? 0 : GregTech_API.METATILEENTITIES[tDamage].getTileEntityBaseType());
- temp.setWorldObj(aPlayer == null ? GT_Values.DW : aPlayer.worldObj);
- temp.xCoord = 0;
- temp.yCoord = 0;
- temp.zCoord = 0;
- if ((temp instanceof IGregTechTileEntity)) {
- IGregTechTileEntity tTileEntity = (IGregTechTileEntity) temp;
- tTileEntity.setInitialValuesAsNBT(new NBTTagCompound(), (short) tDamage);
- if (tTileEntity.getDescription() != null) {
- int i = 0;
+ if (tDamage == 0) {
+ aList.add("WARNING, THE EXISTENCE OF THIS ITEM IS A BUG");
+ aList.add("IF YOU GOT IT IN SURVIVAL THEN PLEASE REPORT IT");
+ } else {
+ TileEntity temp = GregTech_API.sBlockMachines.createTileEntity(aPlayer == null ? GT_Values.DW : aPlayer.worldObj, GregTech_API.METATILEENTITIES[tDamage] == null ? 0 : GregTech_API.METATILEENTITIES[tDamage].getTileEntityBaseType());
+ if (temp != null) {
+ temp.setWorldObj(aPlayer == null ? GT_Values.DW : aPlayer.worldObj);
+ temp.xCoord = 0;
+ temp.yCoord = 0;
+ temp.zCoord = 0;
+ if ((temp instanceof IGregTechTileEntity)) {
+ IGregTechTileEntity tTileEntity = (IGregTechTileEntity) temp;
+ tTileEntity.setInitialValuesAsNBT(new NBTTagCompound(), (short) tDamage);
+ if (tTileEntity.getDescription() != null) {
+ int i = 0;
for (String tDescription : tTileEntity.getDescription()) {
if (GT_Utility.isStringValid(tDescription)) {
if(tDescription.contains("%%%")){
@@ -54,18 +59,20 @@ public class GT_Item_Machines aList.add(tTranslated.equals("") ? tDescription : tTranslated);}
}else i++;
}
- }
- if (tTileEntity.getEUCapacity() > 0L) {
- if (tTileEntity.getInputVoltage() > 0L) {
- aList.add(GT_LanguageManager.addStringLocalization("TileEntity_EUp_IN", "Voltage IN: ", !GregTech_API.sPostloadFinished ) + EnumChatFormatting.GREEN + tTileEntity.getInputVoltage() + " (" + GT_Values.VN[GT_Utility.getTier(tTileEntity.getInputVoltage())] + ")" + EnumChatFormatting.GRAY);
- }
- if (tTileEntity.getOutputVoltage() > 0L) {
- aList.add(GT_LanguageManager.addStringLocalization("TileEntity_EUp_OUT", "Voltage OUT: ", !GregTech_API.sPostloadFinished ) + EnumChatFormatting.GREEN + tTileEntity.getOutputVoltage() + " (" + GT_Values.VN[GT_Utility.getTier(tTileEntity.getOutputVoltage())] + ")" + EnumChatFormatting.GRAY);
- }
- if (tTileEntity.getOutputAmperage() > 1L) {
- aList.add(GT_LanguageManager.addStringLocalization("TileEntity_EUp_AMOUNT", "Amperage: ", !GregTech_API.sPostloadFinished ) + EnumChatFormatting.YELLOW + tTileEntity.getOutputAmperage() + EnumChatFormatting.GRAY);
+ }
+ if (tTileEntity.getEUCapacity() > 0L) {
+ if (tTileEntity.getInputVoltage() > 0L) {
+ aList.add(GT_LanguageManager.addStringLocalization("TileEntity_EUp_IN", "Voltage IN: ", !GregTech_API.sPostloadFinished ) + EnumChatFormatting.GREEN + tTileEntity.getInputVoltage() + " (" + GT_Values.VN[GT_Utility.getTier(tTileEntity.getInputVoltage())] + ")" + EnumChatFormatting.GRAY);
+ }
+ if (tTileEntity.getOutputVoltage() > 0L) {
+ aList.add(GT_LanguageManager.addStringLocalization("TileEntity_EUp_OUT", "Voltage OUT: ", !GregTech_API.sPostloadFinished ) + EnumChatFormatting.GREEN + tTileEntity.getOutputVoltage() + " (" + GT_Values.VN[GT_Utility.getTier(tTileEntity.getOutputVoltage())] + ")" + EnumChatFormatting.GRAY);
+ }
+ if (tTileEntity.getOutputAmperage() > 1L) {
+ aList.add(GT_LanguageManager.addStringLocalization("TileEntity_EUp_AMOUNT", "Amperage: ", !GregTech_API.sPostloadFinished ) + EnumChatFormatting.YELLOW + tTileEntity.getOutputAmperage() + EnumChatFormatting.GRAY);
+ }
+ aList.add(GT_LanguageManager.addStringLocalization("TileEntity_EUp_STORE", "EU Capacity: ", !GregTech_API.sPostloadFinished ) + EnumChatFormatting.BLUE + tTileEntity.getEUCapacity() + EnumChatFormatting.GRAY);
+ }
}
- aList.add(GT_LanguageManager.addStringLocalization("TileEntity_EUp_STORE", "Capacity: ", !GregTech_API.sPostloadFinished ) + EnumChatFormatting.BLUE + tTileEntity.getEUCapacity() + EnumChatFormatting.GRAY);
}
}
NBTTagCompound aNBT = aStack.getTagCompound();
@@ -142,4 +149,4 @@ public class GT_Item_Machines }
return true;
}
-}
\ No newline at end of file +}
diff --git a/src/main/java/gregtech/common/blocks/GT_Item_Stones_Abstract.java b/src/main/java/gregtech/common/blocks/GT_Item_Stones_Abstract.java index 6ca1a3bf31..6e42569e6f 100644 --- a/src/main/java/gregtech/common/blocks/GT_Item_Stones_Abstract.java +++ b/src/main/java/gregtech/common/blocks/GT_Item_Stones_Abstract.java @@ -1,37 +1,37 @@ -package gregtech.common.blocks;
-
-import gregtech.api.GregTech_API;
-import gregtech.api.util.GT_LanguageManager;
-import net.minecraft.block.Block;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemBlock;
-import net.minecraft.item.ItemStack;
-
-import java.util.List;
-
-public class GT_Item_Stones_Abstract
- extends ItemBlock {
- private final String mNoMobsToolTip = GT_LanguageManager.addStringLocalization("gt.nomobspawnsonthisblock", "Mobs cannot Spawn on this Block");
-
- public GT_Item_Stones_Abstract(Block par1) {
- super(par1);
- setMaxDamage(0);
- setHasSubtypes(true);
- setCreativeTab(GregTech_API.TAB_GREGTECH_MATERIALS);
- }
-
- public String getUnlocalizedName(ItemStack aStack) {
- return this.field_150939_a.getUnlocalizedName() + "." + getDamage(aStack);
- }
-
- public int getMetadata(int aMeta) {
- return aMeta;
- }
-
- public void addInformation(ItemStack aStack, EntityPlayer aPlayer, List aList, boolean aF3_H) {
- super.addInformation(aStack, aPlayer, aList, aF3_H);
- if (aStack.getItemDamage() % 8 >= 3) {
- aList.add(this.mNoMobsToolTip);
- }
- }
-}
+package gregtech.common.blocks; + +import gregtech.api.GregTech_API; +import gregtech.api.util.GT_LanguageManager; +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemBlock; +import net.minecraft.item.ItemStack; + +import java.util.List; + +public class GT_Item_Stones_Abstract + extends ItemBlock { + private final String mNoMobsToolTip = GT_LanguageManager.addStringLocalization("gt.nomobspawnsonthisblock", "Mobs cannot Spawn on this Block"); + + public GT_Item_Stones_Abstract(Block par1) { + super(par1); + setMaxDamage(0); + setHasSubtypes(true); + setCreativeTab(GregTech_API.TAB_GREGTECH_MATERIALS); + } + + public String getUnlocalizedName(ItemStack aStack) { + return this.field_150939_a.getUnlocalizedName() + "." + getDamage(aStack); + } + + public int getMetadata(int aMeta) { + return aMeta; + } + + public void addInformation(ItemStack aStack, EntityPlayer aPlayer, List aList, boolean aF3_H) { + super.addInformation(aStack, aPlayer, aList, aF3_H); + if (aStack.getItemDamage() % 8 >= 3) { + aList.add(this.mNoMobsToolTip); + } + } +} diff --git a/src/main/java/gregtech/common/blocks/GT_Material_Casings.java b/src/main/java/gregtech/common/blocks/GT_Material_Casings.java index 211fbdd65f..c81f382f5d 100644 --- a/src/main/java/gregtech/common/blocks/GT_Material_Casings.java +++ b/src/main/java/gregtech/common/blocks/GT_Material_Casings.java @@ -1,18 +1,18 @@ -package gregtech.common.blocks;
-
-import net.minecraft.block.material.MapColor;
-import net.minecraft.block.material.Material;
-
-public class GT_Material_Casings
- extends Material {
- public static final Material INSTANCE = new GT_Material_Casings();
-
- private GT_Material_Casings() {
- super(MapColor.ironColor);
- setRequiresTool();
- }
-
- public boolean isOpaque() {
- return false;
- }
-}
+package gregtech.common.blocks; + +import net.minecraft.block.material.MapColor; +import net.minecraft.block.material.Material; + +public class GT_Material_Casings + extends Material { + public static final Material INSTANCE = new GT_Material_Casings(); + + private GT_Material_Casings() { + super(MapColor.ironColor); + setRequiresTool(); + } + + public boolean isOpaque() { + return true; + } +} diff --git a/src/main/java/gregtech/common/blocks/GT_Material_Machines.java b/src/main/java/gregtech/common/blocks/GT_Material_Machines.java index ed47f4f98c..e55720f9fa 100644 --- a/src/main/java/gregtech/common/blocks/GT_Material_Machines.java +++ b/src/main/java/gregtech/common/blocks/GT_Material_Machines.java @@ -1,18 +1,18 @@ -package gregtech.common.blocks;
-
-import net.minecraft.block.material.MapColor;
-import net.minecraft.block.material.Material;
-
-public class GT_Material_Machines
- extends Material {
- public GT_Material_Machines() {
- super(MapColor.ironColor);
- setRequiresTool();
- setImmovableMobility();
- setAdventureModeExempt();
- }
-
- public boolean isOpaque() {
- return false;
- }
-}
+package gregtech.common.blocks; + +import net.minecraft.block.material.MapColor; +import net.minecraft.block.material.Material; + +public class GT_Material_Machines + extends Material { + public GT_Material_Machines() { + super(MapColor.ironColor); + setRequiresTool(); + setImmovableMobility(); + setAdventureModeExempt(); + } + + public boolean isOpaque() { + return false; + } +} diff --git a/src/main/java/gregtech/common/blocks/GT_Packet_Ores.java b/src/main/java/gregtech/common/blocks/GT_Packet_Ores.java index 04ed5b0fd4..b026e60dac 100644 --- a/src/main/java/gregtech/common/blocks/GT_Packet_Ores.java +++ b/src/main/java/gregtech/common/blocks/GT_Packet_Ores.java @@ -1,60 +1,60 @@ -package gregtech.common.blocks;
-
-import com.google.common.io.ByteArrayDataInput;
-import com.google.common.io.ByteArrayDataOutput;
-import com.google.common.io.ByteStreams;
-import gregtech.api.net.GT_Packet;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.world.IBlockAccess;
-import net.minecraft.world.World;
-
-public class GT_Packet_Ores
- extends GT_Packet {
- private int mX;
- private int mZ;
- private short mY;
- private short mMetaData;
-
- public GT_Packet_Ores() {
- super(true);
- }
-
- public GT_Packet_Ores(int aX, short aY, int aZ, short aMetaData) {
- super(false);
- this.mX = aX;
- this.mY = aY;
- this.mZ = aZ;
- this.mMetaData = aMetaData;
- }
-
- public byte[] encode() {
- ByteArrayDataOutput tOut = ByteStreams.newDataOutput(12);
-
- tOut.writeInt(this.mX);
- tOut.writeShort(this.mY);
- tOut.writeInt(this.mZ);
- tOut.writeShort(this.mMetaData);
-
- return tOut.toByteArray();
- }
-
- public GT_Packet decode(ByteArrayDataInput aData) {
- return new GT_Packet_Ores(aData.readInt(), aData.readShort(), aData.readInt(), aData.readShort());
- }
-
- public void process(IBlockAccess aWorld) {
- if (aWorld != null) {
- TileEntity tTileEntity = aWorld.getTileEntity(this.mX, this.mY, this.mZ);
- if ((tTileEntity instanceof GT_TileEntity_Ores)) {
- ((GT_TileEntity_Ores) tTileEntity).mMetaData = this.mMetaData;
- }
- if (((aWorld instanceof World)) && (((World) aWorld).isRemote)) {
- ((World) aWorld).markBlockForUpdate(this.mX, this.mY, this.mZ);
- }
- }
- }
-
- public byte getPacketID() {
- return 3;
- }
-}
+package gregtech.common.blocks; + +import com.google.common.io.ByteArrayDataInput; +import com.google.common.io.ByteArrayDataOutput; +import com.google.common.io.ByteStreams; +import gregtech.api.net.GT_Packet; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; + +public class GT_Packet_Ores + extends GT_Packet { + private int mX; + private int mZ; + private short mY; + private short mMetaData; + + public GT_Packet_Ores() { + super(true); + } + + public GT_Packet_Ores(int aX, short aY, int aZ, short aMetaData) { + super(false); + this.mX = aX; + this.mY = aY; + this.mZ = aZ; + this.mMetaData = aMetaData; + } + + public byte[] encode() { + ByteArrayDataOutput tOut = ByteStreams.newDataOutput(12); + + tOut.writeInt(this.mX); + tOut.writeShort(this.mY); + tOut.writeInt(this.mZ); + tOut.writeShort(this.mMetaData); + + return tOut.toByteArray(); + } + + public GT_Packet decode(ByteArrayDataInput aData) { + return new GT_Packet_Ores(aData.readInt(), aData.readShort(), aData.readInt(), aData.readShort()); + } + + public void process(IBlockAccess aWorld) { + if (aWorld != null) { + TileEntity tTileEntity = aWorld.getTileEntity(this.mX, this.mY, this.mZ); + if ((tTileEntity instanceof GT_TileEntity_Ores)) { + ((GT_TileEntity_Ores) tTileEntity).mMetaData = this.mMetaData; + } + if (((aWorld instanceof World)) && (((World) aWorld).isRemote)) { + ((World) aWorld).markBlockForUpdate(this.mX, this.mY, this.mZ); + } + } + } + + public byte getPacketID() { + return 3; + } +} diff --git a/src/main/java/gregtech/common/blocks/GT_TileEntity_Ores.java b/src/main/java/gregtech/common/blocks/GT_TileEntity_Ores.java index cd133100db..9310e832d8 100644 --- a/src/main/java/gregtech/common/blocks/GT_TileEntity_Ores.java +++ b/src/main/java/gregtech/common/blocks/GT_TileEntity_Ores.java @@ -55,31 +55,34 @@ public class GT_TileEntity_Ores extends TileEntity implements ITexturedTileEntit if (GregTech_API.sBlockOresUb1 != null) { tOreBlock = GregTech_API.sBlockOresUb1; aMetaData += (BlockMeta * 1000); + //System.out.println("Block changed to UB1"); } } else if (BlockName.equals("tile.metamorphicStone")) { if (GregTech_API.sBlockOresUb2 != null) { tOreBlock = GregTech_API.sBlockOresUb2; aMetaData += (BlockMeta * 1000); + //System.out.println("Block changed to UB2"); } } else if (BlockName.equals("tile.sedimentaryStone")) { if (GregTech_API.sBlockOresUb3 != null) { tOreBlock = GregTech_API.sBlockOresUb3; aMetaData += (BlockMeta * 1000); + //System.out.println("Block changed to UB3"); } - } else if (BlockName.equals("tile.moonBlock") && (BlockMeta == 3 || BlockMeta == 4)) { - if (GregTech_API.sBlockOresGC != null) { - switch (BlockMeta) { - case 3: tOreBlock = GregTech_API.sBlockOresGC; break; - case 4: aMetaData += 1000; tOreBlock = GregTech_API.sBlockOresGC; break; - } - } - } else if (BlockName.equals("tile.mars") && (BlockMeta == 6 || BlockMeta == 9)) { - if (GregTech_API.sBlockOresGC != null) { - switch (BlockMeta) { - case 6: aMetaData += 2000; tOreBlock = GregTech_API.sBlockOresGC; break; - case 9: aMetaData += 3000; tOreBlock = GregTech_API.sBlockOresGC; break; - } - } + //} else if (BlockName.equals("tile.moonBlock") && (BlockMeta == 3 || BlockMeta == 4)) { + // if (GregTech_API.sBlockOresGC != null) { + // switch (BlockMeta) { + // case 3: tOreBlock = GregTech_API.sBlockOresGC; break; + // case 4: aMetaData += 1000; tOreBlock = GregTech_API.sBlockOresGC; break; + // } + // } + //} else if (BlockName.equals("tile.mars") && (BlockMeta == 6 || BlockMeta == 9)) { + // if (GregTech_API.sBlockOresGC != null) { + // switch (BlockMeta) { + // case 6: aMetaData += 2000; tOreBlock = GregTech_API.sBlockOresGC; break; + // case 9: aMetaData += 3000; tOreBlock = GregTech_API.sBlockOresGC; break; + // } + // } } else if (tBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.netherrack)) { aMetaData += 1000; } else if (tBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.end_stone)) { @@ -107,6 +110,7 @@ public class GT_TileEntity_Ores extends TileEntity implements ITexturedTileEntit } else if (!tBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.stone)) { return false; } + //System.out.println(tOreBlock); aWorld.setBlock(aX, aY, aZ, tOreBlock, getHarvestData((short) aMetaData, ((GT_Block_Ores_Abstract) tOreBlock).getBaseBlockHarvestLevel(aMetaData % 16000 / 1000)), 0); TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); if ((tTileEntity instanceof GT_TileEntity_Ores)) { diff --git a/src/main/java/gregtech/common/covers/GT_Cover_Arm.java b/src/main/java/gregtech/common/covers/GT_Cover_Arm.java index d0c2ae3cc0..7206bedccc 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_Arm.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_Arm.java @@ -1,95 +1,95 @@ -package gregtech.common.covers;
-
-import gregtech.api.interfaces.tileentity.ICoverable;
-import gregtech.api.interfaces.tileentity.IMachineProgress;
-import gregtech.api.util.GT_CoverBehavior;
-import gregtech.api.util.GT_Utility;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraftforge.fluids.Fluid;
-
-public class GT_Cover_Arm
- extends GT_CoverBehavior {
- public final int mTickRate;
-
- public GT_Cover_Arm(int aTickRate) {
- this.mTickRate = aTickRate;
- }
-
- public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) {
- if ((aCoverVariable == 0) || (((aTileEntity instanceof IMachineProgress)) && (!((IMachineProgress) aTileEntity).isAllowedToWork()))) {
- return aCoverVariable;
- }
- TileEntity tTileEntity = aTileEntity.getTileEntityAtSide(aSide);
- //aTileEntity.decreaseStoredEnergyUnits(1L, true);
- if (aTileEntity.getUniversalEnergyCapacity() >= 128L) {
- if (aTileEntity.isUniversalEnergyStored(256L)) {
- aTileEntity.decreaseStoredEnergyUnits(4 * GT_Utility.moveOneItemStackIntoSlot(aCoverVariable > 0 ? aTileEntity : tTileEntity, aCoverVariable > 0 ? tTileEntity : aTileEntity, aCoverVariable > 0 ? aSide : GT_Utility.getOppositeSide(aSide), Math.abs(aCoverVariable) - 1, null, false, (byte) 64, (byte) 1, (byte) 64, (byte) 1), true);
- }
- } else {
- GT_Utility.moveOneItemStackIntoSlot(aCoverVariable > 0 ? aTileEntity : tTileEntity, aCoverVariable > 0 ? tTileEntity : aTileEntity, aCoverVariable > 0 ? aSide : GT_Utility.getOppositeSide(aSide), Math.abs(aCoverVariable) - 1, null, false, (byte) 64, (byte) 1, (byte) 64, (byte) 1);
- }
- return aCoverVariable;
- }
-
- public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) {
- if (GT_Utility.getClickedFacingCoords(aSide, aX, aY, aZ)[0] >= 0.5F) {
- aCoverVariable += 16;
- } else {
- aCoverVariable -= 16;
- }
- GT_Utility.sendChatToPlayer(aPlayer, (aCoverVariable > 0 ? "Puts out into adjacent Slot #" : "Grabs in for own Slot #") + (Math.abs(aCoverVariable) - 1));
- return aCoverVariable;
- }
-
- public boolean onCoverRightclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) {
- if (GT_Utility.getClickedFacingCoords(aSide, aX, aY, aZ)[0] >= 0.5F) {
- aCoverVariable++;
- } else {
- aCoverVariable--;
- }
- GT_Utility.sendChatToPlayer(aPlayer, (aCoverVariable > 0 ? "Puts out into adjacent Slot #" : "Grabs in for own Slot #") + (Math.abs(aCoverVariable) - 1));
- aTileEntity.setCoverDataAtSide(aSide, aCoverVariable);
- return true;
- }
-
- public boolean letsRedstoneGoIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return true;
- }
-
- public boolean letsRedstoneGoOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return true;
- }
-
- public boolean letsEnergyIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return true;
- }
-
- public boolean letsEnergyOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return true;
- }
-
- public boolean letsFluidIn(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) {
- return true;
- }
-
- public boolean letsFluidOut(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) {
- return true;
- }
-
- public boolean letsItemsIn(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) {
- return true;
- }
-
- public boolean letsItemsOut(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) {
- return true;
- }
-
- public boolean alwaysLookConnected(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return true;
- }
-
- public int getTickRate(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return this.mTickRate;
- }
-}
+package gregtech.common.covers; + +import gregtech.api.interfaces.tileentity.ICoverable; +import gregtech.api.interfaces.tileentity.IMachineProgress; +import gregtech.api.util.GT_CoverBehavior; +import gregtech.api.util.GT_Utility; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.tileentity.TileEntity; +import net.minecraftforge.fluids.Fluid; + +public class GT_Cover_Arm + extends GT_CoverBehavior { + public final int mTickRate; + + public GT_Cover_Arm(int aTickRate) { + this.mTickRate = aTickRate; + } + + public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { + if ((aCoverVariable == 0) || (((aTileEntity instanceof IMachineProgress)) && (!((IMachineProgress) aTileEntity).isAllowedToWork()))) { + return aCoverVariable; + } + TileEntity tTileEntity = aTileEntity.getTileEntityAtSide(aSide); + //aTileEntity.decreaseStoredEnergyUnits(1L, true); + if (aTileEntity.getUniversalEnergyCapacity() >= 128L) { + if (aTileEntity.isUniversalEnergyStored(256L)) { + aTileEntity.decreaseStoredEnergyUnits(4 * GT_Utility.moveOneItemStackIntoSlot(aCoverVariable > 0 ? aTileEntity : tTileEntity, aCoverVariable > 0 ? tTileEntity : aTileEntity, aCoverVariable > 0 ? aSide : GT_Utility.getOppositeSide(aSide), Math.abs(aCoverVariable) - 1, null, false, (byte) 64, (byte) 1, (byte) 64, (byte) 1), true); + } + } else { + GT_Utility.moveOneItemStackIntoSlot(aCoverVariable > 0 ? aTileEntity : tTileEntity, aCoverVariable > 0 ? tTileEntity : aTileEntity, aCoverVariable > 0 ? aSide : GT_Utility.getOppositeSide(aSide), Math.abs(aCoverVariable) - 1, null, false, (byte) 64, (byte) 1, (byte) 64, (byte) 1); + } + return aCoverVariable; + } + + public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) { + if (GT_Utility.getClickedFacingCoords(aSide, aX, aY, aZ)[0] >= 0.5F) { + aCoverVariable += 16; + } else { + aCoverVariable -= 16; + } + GT_Utility.sendChatToPlayer(aPlayer, (aCoverVariable > 0 ? "Puts out into adjacent Slot #" : "Grabs in for own Slot #") + (Math.abs(aCoverVariable) - 1)); + return aCoverVariable; + } + + public boolean onCoverRightclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) { + if (GT_Utility.getClickedFacingCoords(aSide, aX, aY, aZ)[0] >= 0.5F) { + aCoverVariable++; + } else { + aCoverVariable--; + } + GT_Utility.sendChatToPlayer(aPlayer, (aCoverVariable > 0 ? "Puts out into adjacent Slot #" : "Grabs in for own Slot #") + (Math.abs(aCoverVariable) - 1)); + aTileEntity.setCoverDataAtSide(aSide, aCoverVariable); + return true; + } + + public boolean letsRedstoneGoIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return true; + } + + public boolean letsRedstoneGoOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return true; + } + + public boolean letsEnergyIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return true; + } + + public boolean letsEnergyOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return true; + } + + public boolean letsFluidIn(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { + return true; + } + + public boolean letsFluidOut(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { + return true; + } + + public boolean letsItemsIn(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) { + return true; + } + + public boolean letsItemsOut(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) { + return true; + } + + public boolean alwaysLookConnected(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return true; + } + + public int getTickRate(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return this.mTickRate; + } +} diff --git a/src/main/java/gregtech/common/covers/GT_Cover_Blastproof.java b/src/main/java/gregtech/common/covers/GT_Cover_Blastproof.java index 684ce9f3c0..77647a43d8 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_Blastproof.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_Blastproof.java @@ -1,21 +1,21 @@ -package gregtech.common.covers;
-
-import gregtech.api.interfaces.tileentity.ICoverable;
-import gregtech.api.util.GT_CoverBehavior;
-
-public class GT_Cover_Blastproof
- extends GT_CoverBehavior {
- private final float mLevel;
-
- public GT_Cover_Blastproof(float aLevel) {
- this.mLevel = aLevel;
- }
-
- public float getBlastProofLevel(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return this.mLevel;
- }
-
- public boolean isSimpleCover() {
- return true;
- }
-}
+package gregtech.common.covers; + +import gregtech.api.interfaces.tileentity.ICoverable; +import gregtech.api.util.GT_CoverBehavior; + +public class GT_Cover_Blastproof + extends GT_CoverBehavior { + private final float mLevel; + + public GT_Cover_Blastproof(float aLevel) { + this.mLevel = aLevel; + } + + public float getBlastProofLevel(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return this.mLevel; + } + + public boolean isSimpleCover() { + return true; + } +} diff --git a/src/main/java/gregtech/common/covers/GT_Cover_ControlsWork.java b/src/main/java/gregtech/common/covers/GT_Cover_ControlsWork.java index abb6d0a3ad..65ba326625 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_ControlsWork.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_ControlsWork.java @@ -1,73 +1,73 @@ -package gregtech.common.covers;
-
-import gregtech.api.interfaces.tileentity.ICoverable;
-import gregtech.api.interfaces.tileentity.IMachineProgress;
-import gregtech.api.util.GT_CoverBehavior;
-import gregtech.api.util.GT_Utility;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraftforge.fluids.Fluid;
-
-public class GT_Cover_ControlsWork
- extends GT_CoverBehavior {
- public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) {
- if (aTileEntity instanceof IMachineProgress) {
- if ((aInputRedstone > 0) == (aCoverVariable == 0) && aCoverVariable != 2)
- ((IMachineProgress) aTileEntity).enableWorking();
- else
- ((IMachineProgress) aTileEntity).disableWorking();
- ((IMachineProgress) aTileEntity).setWorkDataValue(aInputRedstone);
- }
- return aCoverVariable;
- }
-
- public boolean letsEnergyIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return true;
- }
-
- public boolean letsEnergyOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return true;
- }
-
- public boolean letsFluidIn(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) {
- return true;
- }
-
- public boolean letsFluidOut(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) {
- return true;
- }
-
- public boolean letsItemsIn(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) {
- return true;
- }
-
- public boolean letsItemsOut(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) {
- return true;
- }
-
- public boolean onCoverRemoval(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, boolean aForced) {
- if ((aTileEntity instanceof IMachineProgress)) {
- ((IMachineProgress) aTileEntity).enableWorking();
- ((IMachineProgress) aTileEntity).setWorkDataValue((byte) 0);
- }
- return true;
- }
-
- public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) {
- aCoverVariable = (aCoverVariable + (aPlayer.isSneaking()? -1 : 1)) % 3;
- if(aCoverVariable <0){aCoverVariable = 2;}
- if (aCoverVariable == 0) {
- GT_Utility.sendChatToPlayer(aPlayer, "Normal");
- }
- if (aCoverVariable == 1) {
- GT_Utility.sendChatToPlayer(aPlayer, "Inverted");
- }
- if (aCoverVariable == 2) {
- GT_Utility.sendChatToPlayer(aPlayer, "No Work at all");
- }
- return aCoverVariable;
- }
-
- public int getTickRate(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return 1;
- }
-}
+package gregtech.common.covers; + +import gregtech.api.interfaces.tileentity.ICoverable; +import gregtech.api.interfaces.tileentity.IMachineProgress; +import gregtech.api.util.GT_CoverBehavior; +import gregtech.api.util.GT_Utility; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraftforge.fluids.Fluid; + +public class GT_Cover_ControlsWork + extends GT_CoverBehavior { + public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { + if (aTileEntity instanceof IMachineProgress) { + if ((aInputRedstone > 0) == (aCoverVariable == 0) && aCoverVariable != 2) + ((IMachineProgress) aTileEntity).enableWorking(); + else + ((IMachineProgress) aTileEntity).disableWorking(); + ((IMachineProgress) aTileEntity).setWorkDataValue(aInputRedstone); + } + return aCoverVariable; + } + + public boolean letsEnergyIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return true; + } + + public boolean letsEnergyOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return true; + } + + public boolean letsFluidIn(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { + return true; + } + + public boolean letsFluidOut(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { + return true; + } + + public boolean letsItemsIn(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) { + return true; + } + + public boolean letsItemsOut(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) { + return true; + } + + public boolean onCoverRemoval(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, boolean aForced) { + if ((aTileEntity instanceof IMachineProgress)) { + ((IMachineProgress) aTileEntity).enableWorking(); + ((IMachineProgress) aTileEntity).setWorkDataValue((byte) 0); + } + return true; + } + + public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) { + aCoverVariable = (aCoverVariable + (aPlayer.isSneaking()? -1 : 1)) % 3; + if(aCoverVariable <0){aCoverVariable = 2;} + if (aCoverVariable == 0) { + GT_Utility.sendChatToPlayer(aPlayer, "Normal"); + } + if (aCoverVariable == 1) { + GT_Utility.sendChatToPlayer(aPlayer, "Inverted"); + } + if (aCoverVariable == 2) { + GT_Utility.sendChatToPlayer(aPlayer, "No Work at all"); + } + return aCoverVariable; + } + + public int getTickRate(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return 1; + } +} diff --git a/src/main/java/gregtech/common/covers/GT_Cover_Conveyor.java b/src/main/java/gregtech/common/covers/GT_Cover_Conveyor.java index 0168228bc5..a62d08e7fb 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_Conveyor.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_Conveyor.java @@ -1,96 +1,96 @@ -package gregtech.common.covers;
-
-import gregtech.api.interfaces.tileentity.ICoverable;
-import gregtech.api.interfaces.tileentity.IMachineProgress;
-import gregtech.api.util.GT_CoverBehavior;
-import gregtech.api.util.GT_Utility;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraftforge.fluids.Fluid;
-
-public class GT_Cover_Conveyor
- extends GT_CoverBehavior {
- public final int mTickRate;
-
- public GT_Cover_Conveyor(int aTickRate) {
- this.mTickRate = aTickRate;
- }
-
- public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) {
- if ((aCoverVariable % 6 > 1) && ((aTileEntity instanceof IMachineProgress))) {
- if (((IMachineProgress) aTileEntity).isAllowedToWork() != aCoverVariable % 6 < 4) {
- return aCoverVariable;
- }
- }
- TileEntity tTileEntity = aTileEntity.getTileEntityAtSide(aSide);
- //aTileEntity.decreaseStoredEnergyUnits(1L, true);
- if (((aCoverVariable % 2 == 0) || (aSide != 1)) && ((aCoverVariable % 2 != 0) || (aSide != 0)) && (aTileEntity.getUniversalEnergyCapacity() >= 128L)) {
- if (aTileEntity.isUniversalEnergyStored(256L)) {
- aTileEntity.decreaseStoredEnergyUnits(4 * GT_Utility.moveOneItemStack(aCoverVariable % 2 == 0 ? aTileEntity : tTileEntity, aCoverVariable % 2 != 0 ? aTileEntity : tTileEntity, aCoverVariable % 2 != 0 ? GT_Utility.getOppositeSide(aSide) : aSide, aCoverVariable % 2 == 0 ? GT_Utility.getOppositeSide(aSide) : aSide, null, false, (byte) 64, (byte) 1, (byte) 64, (byte) 1), true);
- }
- } else {
- GT_Utility.moveOneItemStack(aCoverVariable % 2 == 0 ? aTileEntity : tTileEntity, aCoverVariable % 2 != 0 ? aTileEntity : tTileEntity, aCoverVariable % 2 != 0 ? GT_Utility.getOppositeSide(aSide) : aSide, aCoverVariable % 2 == 0 ? GT_Utility.getOppositeSide(aSide) : aSide, null, false, (byte) 64, (byte) 1, (byte) 64, (byte) 1);
- }
- return aCoverVariable;
- }
-
- public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) {
- aCoverVariable = (aCoverVariable + (aPlayer.isSneaking()? -1 : 1)) % 12;
- if(aCoverVariable <0){aCoverVariable = 11;}
- switch(aCoverVariable) {
- case 0: GT_Utility.sendChatToPlayer(aPlayer, "Export"); break;
- case 1: GT_Utility.sendChatToPlayer(aPlayer, "Import"); break;
- case 2: GT_Utility.sendChatToPlayer(aPlayer, "Export (conditional)"); break;
- case 3: GT_Utility.sendChatToPlayer(aPlayer, "Import (conditional)"); break;
- case 4: GT_Utility.sendChatToPlayer(aPlayer, "Export (invert cond)"); break;
- case 5: GT_Utility.sendChatToPlayer(aPlayer, "Import (invert cond)"); break;
- case 6: GT_Utility.sendChatToPlayer(aPlayer, "Export allow Input"); break;
- case 7: GT_Utility.sendChatToPlayer(aPlayer, "Import allow Output"); break;
- case 8: GT_Utility.sendChatToPlayer(aPlayer, "Export allow Input (conditional)"); break;
- case 9: GT_Utility.sendChatToPlayer(aPlayer, "Import allow Output (conditional)"); break;
- case 10: GT_Utility.sendChatToPlayer(aPlayer, "Export allow Input (invert cond)"); break;
- case 11: GT_Utility.sendChatToPlayer(aPlayer, "Import allow Output (invert cond)"); break;
- }
- return aCoverVariable;
- }
-
- public boolean letsRedstoneGoIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return true;
- }
-
- public boolean letsRedstoneGoOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return true;
- }
-
- public boolean letsEnergyIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return true;
- }
-
- public boolean letsEnergyOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return true;
- }
-
- public boolean letsFluidIn(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) {
- return true;
- }
-
- public boolean letsFluidOut(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) {
- return true;
- }
-
- public boolean letsItemsIn(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) {
- return (aCoverVariable >= 6) || (aCoverVariable % 2 != 0);
- }
-
- public boolean letsItemsOut(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) {
- return (aCoverVariable >= 6) || (aCoverVariable % 2 == 0);
- }
-
- public boolean alwaysLookConnected(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return true;
- }
-
- public int getTickRate(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return this.mTickRate;
- }
-}
+package gregtech.common.covers; + +import gregtech.api.interfaces.tileentity.ICoverable; +import gregtech.api.interfaces.tileentity.IMachineProgress; +import gregtech.api.util.GT_CoverBehavior; +import gregtech.api.util.GT_Utility; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.tileentity.TileEntity; +import net.minecraftforge.fluids.Fluid; + +public class GT_Cover_Conveyor + extends GT_CoverBehavior { + public final int mTickRate; + + public GT_Cover_Conveyor(int aTickRate) { + this.mTickRate = aTickRate; + } + + public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { + if ((aCoverVariable % 6 > 1) && ((aTileEntity instanceof IMachineProgress))) { + if (((IMachineProgress) aTileEntity).isAllowedToWork() != aCoverVariable % 6 < 4) { + return aCoverVariable; + } + } + TileEntity tTileEntity = aTileEntity.getTileEntityAtSide(aSide); + //aTileEntity.decreaseStoredEnergyUnits(1L, true); + if (((aCoverVariable % 2 == 0) || (aSide != 1)) && ((aCoverVariable % 2 != 0) || (aSide != 0)) && (aTileEntity.getUniversalEnergyCapacity() >= 128L)) { + if (aTileEntity.isUniversalEnergyStored(256L)) { + aTileEntity.decreaseStoredEnergyUnits(4 * GT_Utility.moveOneItemStack(aCoverVariable % 2 == 0 ? aTileEntity : tTileEntity, aCoverVariable % 2 != 0 ? aTileEntity : tTileEntity, aCoverVariable % 2 != 0 ? GT_Utility.getOppositeSide(aSide) : aSide, aCoverVariable % 2 == 0 ? GT_Utility.getOppositeSide(aSide) : aSide, null, false, (byte) 64, (byte) 1, (byte) 64, (byte) 1), true); + } + } else { + GT_Utility.moveOneItemStack(aCoverVariable % 2 == 0 ? aTileEntity : tTileEntity, aCoverVariable % 2 != 0 ? aTileEntity : tTileEntity, aCoverVariable % 2 != 0 ? GT_Utility.getOppositeSide(aSide) : aSide, aCoverVariable % 2 == 0 ? GT_Utility.getOppositeSide(aSide) : aSide, null, false, (byte) 64, (byte) 1, (byte) 64, (byte) 1); + } + return aCoverVariable; + } + + public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) { + aCoverVariable = (aCoverVariable + (aPlayer.isSneaking()? -1 : 1)) % 12; + if(aCoverVariable <0){aCoverVariable = 11;} + switch(aCoverVariable) { + case 0: GT_Utility.sendChatToPlayer(aPlayer, "Export"); break; + case 1: GT_Utility.sendChatToPlayer(aPlayer, "Import"); break; + case 2: GT_Utility.sendChatToPlayer(aPlayer, "Export (conditional)"); break; + case 3: GT_Utility.sendChatToPlayer(aPlayer, "Import (conditional)"); break; + case 4: GT_Utility.sendChatToPlayer(aPlayer, "Export (invert cond)"); break; + case 5: GT_Utility.sendChatToPlayer(aPlayer, "Import (invert cond)"); break; + case 6: GT_Utility.sendChatToPlayer(aPlayer, "Export allow Input"); break; + case 7: GT_Utility.sendChatToPlayer(aPlayer, "Import allow Output"); break; + case 8: GT_Utility.sendChatToPlayer(aPlayer, "Export allow Input (conditional)"); break; + case 9: GT_Utility.sendChatToPlayer(aPlayer, "Import allow Output (conditional)"); break; + case 10: GT_Utility.sendChatToPlayer(aPlayer, "Export allow Input (invert cond)"); break; + case 11: GT_Utility.sendChatToPlayer(aPlayer, "Import allow Output (invert cond)"); break; + } + return aCoverVariable; + } + + public boolean letsRedstoneGoIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return true; + } + + public boolean letsRedstoneGoOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return true; + } + + public boolean letsEnergyIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return true; + } + + public boolean letsEnergyOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return true; + } + + public boolean letsFluidIn(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { + return true; + } + + public boolean letsFluidOut(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { + return true; + } + + public boolean letsItemsIn(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) { + return (aCoverVariable >= 6) || (aCoverVariable % 2 != 0); + } + + public boolean letsItemsOut(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) { + return (aCoverVariable >= 6) || (aCoverVariable % 2 == 0); + } + + public boolean alwaysLookConnected(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return true; + } + + public int getTickRate(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return this.mTickRate; + } +} diff --git a/src/main/java/gregtech/common/covers/GT_Cover_Crafting.java b/src/main/java/gregtech/common/covers/GT_Cover_Crafting.java index d7d78833bb..adc84a0e94 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_Crafting.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_Crafting.java @@ -1,26 +1,26 @@ -package gregtech.common.covers;
-
-import gregtech.api.interfaces.tileentity.ICoverable;
-import gregtech.api.util.GT_CoverBehavior;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.entity.player.EntityPlayerMP;
-import net.minecraft.inventory.ContainerWorkbench;
-import net.minecraft.network.play.server.S2DPacketOpenWindow;
-
-public class GT_Cover_Crafting
- extends GT_CoverBehavior {
- public boolean onCoverRightclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) {
- if ((aPlayer instanceof EntityPlayerMP)) {
- ((EntityPlayerMP) aPlayer).getNextWindowId();
- ((EntityPlayerMP) aPlayer).playerNetServerHandler.sendPacket(new S2DPacketOpenWindow(((EntityPlayerMP) aPlayer).currentWindowId, 1, "Crafting", 9, true));
- ((EntityPlayerMP) aPlayer).openContainer = new ContainerWorkbench(((EntityPlayerMP) aPlayer).inventory, ((EntityPlayerMP) aPlayer).worldObj, aTileEntity.getXCoord(), aTileEntity.getYCoord(), aTileEntity.getZCoord()) {
- public boolean canInteractWith(EntityPlayer par1EntityPlayer) {
- return true;
- }
- };
- ((EntityPlayerMP) aPlayer).openContainer.windowId = ((EntityPlayerMP) aPlayer).currentWindowId;
- ((EntityPlayerMP) aPlayer).openContainer.addCraftingToCrafters((EntityPlayerMP) aPlayer);
- }
- return true;
- }
-}
+package gregtech.common.covers; + +import gregtech.api.interfaces.tileentity.ICoverable; +import gregtech.api.util.GT_CoverBehavior; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.inventory.ContainerWorkbench; +import net.minecraft.network.play.server.S2DPacketOpenWindow; + +public class GT_Cover_Crafting + extends GT_CoverBehavior { + public boolean onCoverRightclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) { + if ((aPlayer instanceof EntityPlayerMP)) { + ((EntityPlayerMP) aPlayer).getNextWindowId(); + ((EntityPlayerMP) aPlayer).playerNetServerHandler.sendPacket(new S2DPacketOpenWindow(((EntityPlayerMP) aPlayer).currentWindowId, 1, "Crafting", 9, true)); + ((EntityPlayerMP) aPlayer).openContainer = new ContainerWorkbench(((EntityPlayerMP) aPlayer).inventory, ((EntityPlayerMP) aPlayer).worldObj, aTileEntity.getXCoord(), aTileEntity.getYCoord(), aTileEntity.getZCoord()) { + public boolean canInteractWith(EntityPlayer par1EntityPlayer) { + return true; + } + }; + ((EntityPlayerMP) aPlayer).openContainer.windowId = ((EntityPlayerMP) aPlayer).currentWindowId; + ((EntityPlayerMP) aPlayer).openContainer.addCraftingToCrafters((EntityPlayerMP) aPlayer); + } + return true; + } +} diff --git a/src/main/java/gregtech/common/covers/GT_Cover_DoesWork.java b/src/main/java/gregtech/common/covers/GT_Cover_DoesWork.java index 0a440c5ae4..08acc6faa1 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_DoesWork.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_DoesWork.java @@ -1,73 +1,73 @@ -package gregtech.common.covers;
-
-import gregtech.api.interfaces.tileentity.ICoverable;
-import gregtech.api.interfaces.tileentity.IMachineProgress;
-import gregtech.api.util.GT_CoverBehavior;
-import gregtech.api.util.GT_Utility;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraftforge.fluids.Fluid;
-
-public class GT_Cover_DoesWork
- extends GT_CoverBehavior {
- public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) {
- if ((aTileEntity instanceof IMachineProgress)) {
- if (aCoverVariable < 2) {
- int tScale = ((IMachineProgress) aTileEntity).getMaxProgress() / 15;
- if ((tScale > 0) && (((IMachineProgress) aTileEntity).hasThingsToDo())) {
- aTileEntity.setOutputRedstoneSignal(aSide, aCoverVariable % 2 == 0 ? (byte) (((IMachineProgress) aTileEntity).getProgress() / tScale) : (byte) (15 - ((IMachineProgress) aTileEntity).getProgress() / tScale));
- } else {
- aTileEntity.setOutputRedstoneSignal(aSide, (byte) (aCoverVariable % 2 == 0 ? 0 : 15));
- }
- } else {
- aTileEntity.setOutputRedstoneSignal(aSide, (byte) ((aCoverVariable % 2 == 0 ? 1 : 0) != (((IMachineProgress) aTileEntity).getMaxProgress() == 0 ? 1 : 0) ? 0 : 15));
- }
- } else {
- aTileEntity.setOutputRedstoneSignal(aSide, (byte) 0);
- }
- return aCoverVariable;
- }
-
- public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) {
- aCoverVariable = (aCoverVariable + (aPlayer.isSneaking()? -1 : 1)) % 4;
- if(aCoverVariable <0){aCoverVariable = 3;}
- switch(aCoverVariable) {
- case 0: GT_Utility.sendChatToPlayer(aPlayer, "Normal"); break;
- case 1: GT_Utility.sendChatToPlayer(aPlayer, "Inverted"); break;
- case 2: GT_Utility.sendChatToPlayer(aPlayer, "Ready to work"); break;
- case 3: GT_Utility.sendChatToPlayer(aPlayer, "Not ready to work"); break;
- }
- return aCoverVariable;
- }
-
- public boolean letsEnergyIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return true;
- }
-
- public boolean letsEnergyOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return true;
- }
-
- public boolean letsFluidIn(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) {
- return true;
- }
-
- public boolean letsFluidOut(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) {
- return true;
- }
-
- public boolean letsItemsIn(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) {
- return true;
- }
-
- public boolean letsItemsOut(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) {
- return true;
- }
-
- public boolean manipulatesSidedRedstoneOutput(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return true;
- }
-
- public int getTickRate(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return 5;
- }
-}
+package gregtech.common.covers; + +import gregtech.api.interfaces.tileentity.ICoverable; +import gregtech.api.interfaces.tileentity.IMachineProgress; +import gregtech.api.util.GT_CoverBehavior; +import gregtech.api.util.GT_Utility; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraftforge.fluids.Fluid; + +public class GT_Cover_DoesWork + extends GT_CoverBehavior { + public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { + if ((aTileEntity instanceof IMachineProgress)) { + if (aCoverVariable < 2) { + int tScale = ((IMachineProgress) aTileEntity).getMaxProgress() / 15; + if ((tScale > 0) && (((IMachineProgress) aTileEntity).hasThingsToDo())) { + aTileEntity.setOutputRedstoneSignal(aSide, aCoverVariable % 2 == 0 ? (byte) (((IMachineProgress) aTileEntity).getProgress() / tScale) : (byte) (15 - ((IMachineProgress) aTileEntity).getProgress() / tScale)); + } else { + aTileEntity.setOutputRedstoneSignal(aSide, (byte) (aCoverVariable % 2 == 0 ? 0 : 15)); + } + } else { + aTileEntity.setOutputRedstoneSignal(aSide, (byte) ((aCoverVariable % 2 == 0 ? 1 : 0) != (((IMachineProgress) aTileEntity).getMaxProgress() == 0 ? 1 : 0) ? 0 : 15)); + } + } else { + aTileEntity.setOutputRedstoneSignal(aSide, (byte) 0); + } + return aCoverVariable; + } + + public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) { + aCoverVariable = (aCoverVariable + (aPlayer.isSneaking()? -1 : 1)) % 4; + if(aCoverVariable <0){aCoverVariable = 3;} + switch(aCoverVariable) { + case 0: GT_Utility.sendChatToPlayer(aPlayer, "Normal"); break; + case 1: GT_Utility.sendChatToPlayer(aPlayer, "Inverted"); break; + case 2: GT_Utility.sendChatToPlayer(aPlayer, "Ready to work"); break; + case 3: GT_Utility.sendChatToPlayer(aPlayer, "Not ready to work"); break; + } + return aCoverVariable; + } + + public boolean letsEnergyIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return true; + } + + public boolean letsEnergyOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return true; + } + + public boolean letsFluidIn(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { + return true; + } + + public boolean letsFluidOut(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { + return true; + } + + public boolean letsItemsIn(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) { + return true; + } + + public boolean letsItemsOut(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) { + return true; + } + + public boolean manipulatesSidedRedstoneOutput(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return true; + } + + public int getTickRate(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return 5; + } +} diff --git a/src/main/java/gregtech/common/covers/GT_Cover_Drain.java b/src/main/java/gregtech/common/covers/GT_Cover_Drain.java index 09a7a9a36b..b20d24104e 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_Drain.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_Drain.java @@ -1,85 +1,85 @@ -package gregtech.common.covers;
-
-import gregtech.api.enums.Materials;
-import gregtech.api.interfaces.tileentity.ICoverable;
-import gregtech.api.interfaces.tileentity.IMachineProgress;
-import gregtech.api.util.GT_CoverBehavior;
-import gregtech.api.util.GT_Utility;
-import net.minecraft.block.Block;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Blocks;
-import net.minecraftforge.common.util.ForgeDirection;
-import net.minecraftforge.fluids.Fluid;
-import net.minecraftforge.fluids.FluidStack;
-import net.minecraftforge.fluids.IFluidBlock;
-import net.minecraftforge.fluids.IFluidHandler;
-
-public class GT_Cover_Drain
- extends GT_CoverBehavior {
- public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) {
- if ((aCoverVariable % 3 > 1) && ((aTileEntity instanceof IMachineProgress))) {
- if (((IMachineProgress) aTileEntity).isAllowedToWork() != aCoverVariable % 3 < 2) {
- return aCoverVariable;
- }
- }
- if (aSide != 6) {
- Block tBlock = aTileEntity.getBlockAtSide(aSide);
- if ((aCoverVariable < 3) && ((aTileEntity instanceof IFluidHandler))) {
- if ((aSide == 1) &&
- (aTileEntity.getWorld().isRaining()) &&
- (aTileEntity.getWorld().getPrecipitationHeight(aTileEntity.getXCoord(), aTileEntity.getZCoord()) - 2 < aTileEntity.getYCoord())) {
- int tAmount = (int) (aTileEntity.getBiome().rainfall * 10.0F);
- if (tAmount > 0) {
- ((IFluidHandler) aTileEntity).fill(ForgeDirection.getOrientation(aSide), Materials.Water.getFluid(aTileEntity.getWorld().isThundering() ? tAmount * 2 : tAmount), true);
- }
- }
- FluidStack tLiquid = null;
- if (tBlock != null) {
- if (((tBlock == Blocks.water) || (tBlock == Blocks.flowing_water)) && (aTileEntity.getMetaIDAtSide(aSide) == 0)) {
- tLiquid = Materials.Water.getFluid(1000L);
- } else if (((tBlock == Blocks.lava) || (tBlock == Blocks.flowing_lava)) && (aTileEntity.getMetaIDAtSide(aSide) == 0)) {
- tLiquid = Materials.Lava.getFluid(1000L);
- } else if ((tBlock instanceof IFluidBlock)) {
- tLiquid = ((IFluidBlock) tBlock).drain(aTileEntity.getWorld(), aTileEntity.getOffsetX(aSide, 1), aTileEntity.getOffsetY(aSide, 1), aTileEntity.getOffsetZ(aSide, 1), false);
- }
- if ((tLiquid != null) && (tLiquid.getFluid() != null) && ((aSide > 1) || ((aSide == 0) && (tLiquid.getFluid().getDensity() <= 0)) || ((aSide == 1) && (tLiquid.getFluid().getDensity() >= 0))) &&
- (((IFluidHandler) aTileEntity).fill(ForgeDirection.getOrientation(aSide), tLiquid, false) == tLiquid.amount)) {
- ((IFluidHandler) aTileEntity).fill(ForgeDirection.getOrientation(aSide), tLiquid, true);
- aTileEntity.getWorld().setBlockToAir(aTileEntity.getXCoord() + ForgeDirection.getOrientation(aSide).offsetX, aTileEntity.getYCoord() + ForgeDirection.getOrientation(aSide).offsetY, aTileEntity.getZCoord() + ForgeDirection.getOrientation(aSide).offsetZ);
- }
- }
- }
- if ((aCoverVariable >= 3) && (tBlock != null) && (
- (tBlock == Blocks.lava) || (tBlock == Blocks.flowing_lava) || (tBlock == Blocks.water) || (tBlock == Blocks.flowing_water) || ((tBlock instanceof IFluidBlock)))) {
- aTileEntity.getWorld().setBlock(aTileEntity.getOffsetX(aSide, 1), aTileEntity.getOffsetY(aSide, 1), aTileEntity.getOffsetZ(aSide, 1), Blocks.air, 0, 0);
- }
- }
- return aCoverVariable;
- }
-
- public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) {
- aCoverVariable = (aCoverVariable + (aPlayer.isSneaking()? -1 : 1)) % 6;
- if(aCoverVariable <0){aCoverVariable = 5;}
- switch(aCoverVariable) {
- case 0: GT_Utility.sendChatToPlayer(aPlayer, "Import"); break;
- case 1: GT_Utility.sendChatToPlayer(aPlayer, "Import (conditional)"); break;
- case 2: GT_Utility.sendChatToPlayer(aPlayer, "Import (invert cond)"); break;
- case 3: GT_Utility.sendChatToPlayer(aPlayer, "Keep Liquids Away"); break;
- case 4: GT_Utility.sendChatToPlayer(aPlayer, "Keep Liquids Away (conditional)"); break;
- case 5: GT_Utility.sendChatToPlayer(aPlayer, "Keep Liquids Away (invert cond)"); break;
- }
- return aCoverVariable;
- }
-
- public boolean letsFluidIn(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) {
- return ((IMachineProgress) aTileEntity).isAllowedToWork() == aCoverVariable < 2;
- }
-
- public boolean alwaysLookConnected(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return true;
- }
-
- public int getTickRate(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return aCoverVariable < 3 ? 50 : 1;
- }
-}
+package gregtech.common.covers; + +import gregtech.api.enums.Materials; +import gregtech.api.interfaces.tileentity.ICoverable; +import gregtech.api.interfaces.tileentity.IMachineProgress; +import gregtech.api.util.GT_CoverBehavior; +import gregtech.api.util.GT_Utility; +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.IFluidBlock; +import net.minecraftforge.fluids.IFluidHandler; + +public class GT_Cover_Drain + extends GT_CoverBehavior { + public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { + if ((aCoverVariable % 3 > 1) && ((aTileEntity instanceof IMachineProgress))) { + if (((IMachineProgress) aTileEntity).isAllowedToWork() != aCoverVariable % 3 < 2) { + return aCoverVariable; + } + } + if (aSide != 6) { + Block tBlock = aTileEntity.getBlockAtSide(aSide); + if ((aCoverVariable < 3) && ((aTileEntity instanceof IFluidHandler))) { + if ((aSide == 1) && + (aTileEntity.getWorld().isRaining()) && + (aTileEntity.getWorld().getPrecipitationHeight(aTileEntity.getXCoord(), aTileEntity.getZCoord()) - 2 < aTileEntity.getYCoord())) { + int tAmount = (int) (aTileEntity.getBiome().rainfall * 10.0F); + if (tAmount > 0) { + ((IFluidHandler) aTileEntity).fill(ForgeDirection.getOrientation(aSide), Materials.Water.getFluid(aTileEntity.getWorld().isThundering() ? tAmount * 2 : tAmount), true); + } + } + FluidStack tLiquid = null; + if (tBlock != null) { + if (((tBlock == Blocks.water) || (tBlock == Blocks.flowing_water)) && (aTileEntity.getMetaIDAtSide(aSide) == 0)) { + tLiquid = Materials.Water.getFluid(1000L); + } else if (((tBlock == Blocks.lava) || (tBlock == Blocks.flowing_lava)) && (aTileEntity.getMetaIDAtSide(aSide) == 0)) { + tLiquid = Materials.Lava.getFluid(1000L); + } else if ((tBlock instanceof IFluidBlock)) { + tLiquid = ((IFluidBlock) tBlock).drain(aTileEntity.getWorld(), aTileEntity.getOffsetX(aSide, 1), aTileEntity.getOffsetY(aSide, 1), aTileEntity.getOffsetZ(aSide, 1), false); + } + if ((tLiquid != null) && (tLiquid.getFluid() != null) && ((aSide > 1) || ((aSide == 0) && (tLiquid.getFluid().getDensity() <= 0)) || ((aSide == 1) && (tLiquid.getFluid().getDensity() >= 0))) && + (((IFluidHandler) aTileEntity).fill(ForgeDirection.getOrientation(aSide), tLiquid, false) == tLiquid.amount)) { + ((IFluidHandler) aTileEntity).fill(ForgeDirection.getOrientation(aSide), tLiquid, true); + aTileEntity.getWorld().setBlockToAir(aTileEntity.getXCoord() + ForgeDirection.getOrientation(aSide).offsetX, aTileEntity.getYCoord() + ForgeDirection.getOrientation(aSide).offsetY, aTileEntity.getZCoord() + ForgeDirection.getOrientation(aSide).offsetZ); + } + } + } + if ((aCoverVariable >= 3) && (tBlock != null) && ( + (tBlock == Blocks.lava) || (tBlock == Blocks.flowing_lava) || (tBlock == Blocks.water) || (tBlock == Blocks.flowing_water) || ((tBlock instanceof IFluidBlock)))) { + aTileEntity.getWorld().setBlock(aTileEntity.getOffsetX(aSide, 1), aTileEntity.getOffsetY(aSide, 1), aTileEntity.getOffsetZ(aSide, 1), Blocks.air, 0, 0); + } + } + return aCoverVariable; + } + + public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) { + aCoverVariable = (aCoverVariable + (aPlayer.isSneaking()? -1 : 1)) % 6; + if(aCoverVariable <0){aCoverVariable = 5;} + switch(aCoverVariable) { + case 0: GT_Utility.sendChatToPlayer(aPlayer, "Import"); break; + case 1: GT_Utility.sendChatToPlayer(aPlayer, "Import (conditional)"); break; + case 2: GT_Utility.sendChatToPlayer(aPlayer, "Import (invert cond)"); break; + case 3: GT_Utility.sendChatToPlayer(aPlayer, "Keep Liquids Away"); break; + case 4: GT_Utility.sendChatToPlayer(aPlayer, "Keep Liquids Away (conditional)"); break; + case 5: GT_Utility.sendChatToPlayer(aPlayer, "Keep Liquids Away (invert cond)"); break; + } + return aCoverVariable; + } + + public boolean letsFluidIn(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { + return ((IMachineProgress) aTileEntity).isAllowedToWork() == aCoverVariable < 2; + } + + public boolean alwaysLookConnected(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return true; + } + + public int getTickRate(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return aCoverVariable < 3 ? 50 : 1; + } +} diff --git a/src/main/java/gregtech/common/covers/GT_Cover_EUMeter.java b/src/main/java/gregtech/common/covers/GT_Cover_EUMeter.java index 8a59326236..41a24767a7 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_EUMeter.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_EUMeter.java @@ -1,144 +1,144 @@ -package gregtech.common.covers;
-
-import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
-import gregtech.api.interfaces.tileentity.ICoverable;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.items.GT_MetaBase_Item;
-import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicBatteryBuffer;
-import gregtech.api.util.GT_CoverBehavior;
-import gregtech.api.util.GT_ModHandler;
-import gregtech.api.util.GT_Utility;
-import ic2.api.item.IElectricItem;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraftforge.fluids.Fluid;
-
-public class GT_Cover_EUMeter
- extends GT_CoverBehavior {
- public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) {
- long tScale = 0L;
- if (aCoverVariable < 2) {
- tScale = aTileEntity.getUniversalEnergyCapacity() / 15L;
- if (tScale > 0L) {
- aTileEntity.setOutputRedstoneSignal(aSide, aCoverVariable % 2 == 0 ? (byte) (int) (aTileEntity.getUniversalEnergyStored() / tScale) : (byte) (int) (15L - aTileEntity.getUniversalEnergyStored() / tScale));
- } else {
- aTileEntity.setOutputRedstoneSignal(aSide, (byte) (aCoverVariable % 2 == 0 ? 0 : 15));
- }
- } else if (aCoverVariable < 4) {
- tScale = aTileEntity.getEUCapacity() / 15L;
- if (tScale > 0L) {
- aTileEntity.setOutputRedstoneSignal(aSide, aCoverVariable % 2 == 0 ? (byte) (int) (aTileEntity.getStoredEU() / tScale) : (byte) (int) (15L - aTileEntity.getStoredEU() / tScale));
- } else {
- aTileEntity.setOutputRedstoneSignal(aSide, (byte) (aCoverVariable % 2 == 0 ? 0 : 15));
- }
- } else if (aCoverVariable < 6) {
- tScale = aTileEntity.getSteamCapacity() / 15L;
- if (tScale > 0L) {
- aTileEntity.setOutputRedstoneSignal(aSide, aCoverVariable % 2 == 0 ? (byte) (int) (aTileEntity.getStoredSteam() / tScale) : (byte) (int) (15L - aTileEntity.getStoredSteam() / tScale));
- } else {
- aTileEntity.setOutputRedstoneSignal(aSide, (byte) (aCoverVariable % 2 == 0 ? 0 : 15));
- }
- } else if (aCoverVariable < 8) {
- tScale = aTileEntity.getInputVoltage() * aTileEntity.getInputAmperage() / 15L;
- if (tScale > 0L) {
- aTileEntity.setOutputRedstoneSignal(aSide, aCoverVariable % 2 == 0 ? (byte) (int) (aTileEntity.getAverageElectricInput() / tScale) : (byte) (int) (15L - aTileEntity.getAverageElectricInput() / tScale));
- } else {
- aTileEntity.setOutputRedstoneSignal(aSide, (byte) (aCoverVariable % 2 == 0 ? 0 : 15));
- }
- } else if (aCoverVariable < 10) {
- tScale = aTileEntity.getOutputVoltage() * aTileEntity.getOutputAmperage() / 15L;
- if (tScale > 0L) {
- aTileEntity.setOutputRedstoneSignal(aSide, aCoverVariable % 2 == 0 ? (byte) (int) (aTileEntity.getAverageElectricOutput() / tScale) : (byte) (int) (15L - aTileEntity.getAverageElectricOutput() / tScale));
- } else {
- aTileEntity.setOutputRedstoneSignal(aSide, (byte) (aCoverVariable % 2 == 0 ? 0 : 15));
- }
- } else if (aCoverVariable < 12) {
- tScale = aTileEntity.getEUCapacity();
- long tStored = aTileEntity.getStoredEU();
- if (aTileEntity instanceof IGregTechTileEntity) {
- IGregTechTileEntity tTileEntity = (IGregTechTileEntity) aTileEntity;
- IMetaTileEntity mTileEntity = tTileEntity.getMetaTileEntity();
- if (mTileEntity instanceof GT_MetaTileEntity_BasicBatteryBuffer) {
- GT_MetaTileEntity_BasicBatteryBuffer buffer = (GT_MetaTileEntity_BasicBatteryBuffer) mTileEntity;
- if (buffer.mInventory != null) {
- for (ItemStack aStack : buffer.mInventory) {
- if (GT_ModHandler.isElectricItem(aStack)) {
-
- if (aStack.getItem() instanceof GT_MetaBase_Item) {
- Long[] stats = ((GT_MetaBase_Item) aStack.getItem()).getElectricStats(aStack);
- if (stats != null) {
- tScale = tScale + stats[0];
- tStored = tStored + ((GT_MetaBase_Item) aStack.getItem()).getRealCharge(aStack);
- }
- } else if (aStack.getItem() instanceof IElectricItem) {
- tStored = tStored + (long) ic2.api.item.ElectricItem.manager.getCharge(aStack);
- tScale = tScale + (long) ((IElectricItem) aStack.getItem()).getMaxCharge(aStack);
- }
- }
- }
-
- }
- }
- }
- tScale = tScale / 15L;
- if (tScale > 0L) {
- aTileEntity.setOutputRedstoneSignal(aSide, aCoverVariable % 2 == 0 ? (byte) (int) (tStored / tScale) : (byte) (int) (15L - tStored / tScale));
- } else {
- aTileEntity.setOutputRedstoneSignal(aSide, (byte) (aCoverVariable % 2 == 0 ? 0 : 15));
- }
- }
- return aCoverVariable;
- }
-
- public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) {
- aCoverVariable = (aCoverVariable + (aPlayer.isSneaking()? -1 : 1)) % 12;
- if(aCoverVariable <0){aCoverVariable = 11;}
- switch(aCoverVariable) {
- case 0: GT_Utility.sendChatToPlayer(aPlayer, "Normal Universal Storage"); break;
- case 1: GT_Utility.sendChatToPlayer(aPlayer, "Inverted Universal Storage"); break;
- case 2: GT_Utility.sendChatToPlayer(aPlayer, "Normal Electricity Storage"); break;
- case 3: GT_Utility.sendChatToPlayer(aPlayer, "Inverted Electricity Storage"); break;
- case 4: GT_Utility.sendChatToPlayer(aPlayer, "Normal Steam Storage"); break;
- case 5: GT_Utility.sendChatToPlayer(aPlayer, "Inverted Steam Storage"); break;
- case 6: GT_Utility.sendChatToPlayer(aPlayer, "Normal Average Electric Input"); break;
- case 7: GT_Utility.sendChatToPlayer(aPlayer, "Inverted Average Electric Input"); break;
- case 8: GT_Utility.sendChatToPlayer(aPlayer, "Normal Average Electric Output"); break;
- case 9: GT_Utility.sendChatToPlayer(aPlayer, "Inverted Average Electric Output"); break;
- case 10: GT_Utility.sendChatToPlayer(aPlayer, "Normal Electricity Storage(Including Batteries)"); break;
- case 11: GT_Utility.sendChatToPlayer(aPlayer, "Inverted Electricity Storage(Including Batteries)"); break;
- }
- return aCoverVariable;
- }
-
- public boolean letsEnergyIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return true;
- }
-
- public boolean letsEnergyOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return true;
- }
-
- public boolean letsFluidIn(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) {
- return true;
- }
-
- public boolean letsFluidOut(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) {
- return true;
- }
-
- public boolean letsItemsIn(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) {
- return true;
- }
-
- public boolean letsItemsOut(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) {
- return true;
- }
-
- public boolean manipulatesSidedRedstoneOutput(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return true;
- }
-
- public int getTickRate(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return 20;
- }
-}
+package gregtech.common.covers; + +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.ICoverable; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.items.GT_MetaBase_Item; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicBatteryBuffer; +import gregtech.api.util.GT_CoverBehavior; +import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_Utility; +import ic2.api.item.IElectricItem; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.Fluid; + +public class GT_Cover_EUMeter + extends GT_CoverBehavior { + public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { + long tScale = 0L; + if (aCoverVariable < 2) { + tScale = aTileEntity.getUniversalEnergyCapacity() / 15L; + if (tScale > 0L) { + aTileEntity.setOutputRedstoneSignal(aSide, aCoverVariable % 2 == 0 ? (byte) (int) (aTileEntity.getUniversalEnergyStored() / tScale) : (byte) (int) (15L - aTileEntity.getUniversalEnergyStored() / tScale)); + } else { + aTileEntity.setOutputRedstoneSignal(aSide, (byte) (aCoverVariable % 2 == 0 ? 0 : 15)); + } + } else if (aCoverVariable < 4) { + tScale = aTileEntity.getEUCapacity() / 15L; + if (tScale > 0L) { + aTileEntity.setOutputRedstoneSignal(aSide, aCoverVariable % 2 == 0 ? (byte) (int) (aTileEntity.getStoredEU() / tScale) : (byte) (int) (15L - aTileEntity.getStoredEU() / tScale)); + } else { + aTileEntity.setOutputRedstoneSignal(aSide, (byte) (aCoverVariable % 2 == 0 ? 0 : 15)); + } + } else if (aCoverVariable < 6) { + tScale = aTileEntity.getSteamCapacity() / 15L; + if (tScale > 0L) { + aTileEntity.setOutputRedstoneSignal(aSide, aCoverVariable % 2 == 0 ? (byte) (int) (aTileEntity.getStoredSteam() / tScale) : (byte) (int) (15L - aTileEntity.getStoredSteam() / tScale)); + } else { + aTileEntity.setOutputRedstoneSignal(aSide, (byte) (aCoverVariable % 2 == 0 ? 0 : 15)); + } + } else if (aCoverVariable < 8) { + tScale = aTileEntity.getInputVoltage() * aTileEntity.getInputAmperage() / 15L; + if (tScale > 0L) { + aTileEntity.setOutputRedstoneSignal(aSide, aCoverVariable % 2 == 0 ? (byte) (int) (aTileEntity.getAverageElectricInput() / tScale) : (byte) (int) (15L - aTileEntity.getAverageElectricInput() / tScale)); + } else { + aTileEntity.setOutputRedstoneSignal(aSide, (byte) (aCoverVariable % 2 == 0 ? 0 : 15)); + } + } else if (aCoverVariable < 10) { + tScale = aTileEntity.getOutputVoltage() * aTileEntity.getOutputAmperage() / 15L; + if (tScale > 0L) { + aTileEntity.setOutputRedstoneSignal(aSide, aCoverVariable % 2 == 0 ? (byte) (int) (aTileEntity.getAverageElectricOutput() / tScale) : (byte) (int) (15L - aTileEntity.getAverageElectricOutput() / tScale)); + } else { + aTileEntity.setOutputRedstoneSignal(aSide, (byte) (aCoverVariable % 2 == 0 ? 0 : 15)); + } + } else if (aCoverVariable < 12) { + tScale = aTileEntity.getEUCapacity(); + long tStored = aTileEntity.getStoredEU(); + if (aTileEntity instanceof IGregTechTileEntity) { + IGregTechTileEntity tTileEntity = (IGregTechTileEntity) aTileEntity; + IMetaTileEntity mTileEntity = tTileEntity.getMetaTileEntity(); + if (mTileEntity instanceof GT_MetaTileEntity_BasicBatteryBuffer) { + GT_MetaTileEntity_BasicBatteryBuffer buffer = (GT_MetaTileEntity_BasicBatteryBuffer) mTileEntity; + if (buffer.mInventory != null) { + for (ItemStack aStack : buffer.mInventory) { + if (GT_ModHandler.isElectricItem(aStack)) { + + if (aStack.getItem() instanceof GT_MetaBase_Item) { + Long[] stats = ((GT_MetaBase_Item) aStack.getItem()).getElectricStats(aStack); + if (stats != null) { + tScale = tScale + stats[0]; + tStored = tStored + ((GT_MetaBase_Item) aStack.getItem()).getRealCharge(aStack); + } + } else if (aStack.getItem() instanceof IElectricItem) { + tStored = tStored + (long) ic2.api.item.ElectricItem.manager.getCharge(aStack); + tScale = tScale + (long) ((IElectricItem) aStack.getItem()).getMaxCharge(aStack); + } + } + } + + } + } + } + tScale = tScale / 15L; + if (tScale > 0L) { + aTileEntity.setOutputRedstoneSignal(aSide, aCoverVariable % 2 == 0 ? (byte) (int) (tStored / tScale) : (byte) (int) (15L - tStored / tScale)); + } else { + aTileEntity.setOutputRedstoneSignal(aSide, (byte) (aCoverVariable % 2 == 0 ? 0 : 15)); + } + } + return aCoverVariable; + } + + public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) { + aCoverVariable = (aCoverVariable + (aPlayer.isSneaking()? -1 : 1)) % 12; + if(aCoverVariable <0){aCoverVariable = 11;} + switch(aCoverVariable) { + case 0: GT_Utility.sendChatToPlayer(aPlayer, "Normal Universal Storage"); break; + case 1: GT_Utility.sendChatToPlayer(aPlayer, "Inverted Universal Storage"); break; + case 2: GT_Utility.sendChatToPlayer(aPlayer, "Normal Electricity Storage"); break; + case 3: GT_Utility.sendChatToPlayer(aPlayer, "Inverted Electricity Storage"); break; + case 4: GT_Utility.sendChatToPlayer(aPlayer, "Normal Steam Storage"); break; + case 5: GT_Utility.sendChatToPlayer(aPlayer, "Inverted Steam Storage"); break; + case 6: GT_Utility.sendChatToPlayer(aPlayer, "Normal Average Electric Input"); break; + case 7: GT_Utility.sendChatToPlayer(aPlayer, "Inverted Average Electric Input"); break; + case 8: GT_Utility.sendChatToPlayer(aPlayer, "Normal Average Electric Output"); break; + case 9: GT_Utility.sendChatToPlayer(aPlayer, "Inverted Average Electric Output"); break; + case 10: GT_Utility.sendChatToPlayer(aPlayer, "Normal Electricity Storage(Including Batteries)"); break; + case 11: GT_Utility.sendChatToPlayer(aPlayer, "Inverted Electricity Storage(Including Batteries)"); break; + } + return aCoverVariable; + } + + public boolean letsEnergyIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return true; + } + + public boolean letsEnergyOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return true; + } + + public boolean letsFluidIn(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { + return true; + } + + public boolean letsFluidOut(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { + return true; + } + + public boolean letsItemsIn(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) { + return true; + } + + public boolean letsItemsOut(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) { + return true; + } + + public boolean manipulatesSidedRedstoneOutput(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return true; + } + + public int getTickRate(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return 20; + } +} diff --git a/src/main/java/gregtech/common/covers/GT_Cover_EnergyOnly.java b/src/main/java/gregtech/common/covers/GT_Cover_EnergyOnly.java index 2ab40531f3..b8a6a70cfd 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_EnergyOnly.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_EnergyOnly.java @@ -1,83 +1,83 @@ -package gregtech.common.covers;
-
-import gregtech.api.interfaces.tileentity.ICoverable;
-import gregtech.api.interfaces.tileentity.IMachineProgress;
-import gregtech.api.util.GT_CoverBehavior;
-import gregtech.api.util.GT_Utility;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraftforge.fluids.Fluid;
-
-public class GT_Cover_EnergyOnly
- extends GT_CoverBehavior {
- public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) {
- aCoverVariable = (aCoverVariable + 1) % 3;
- switch(aCoverVariable) {
- case 0: GT_Utility.sendChatToPlayer(aPlayer, "Allow"); break;
- case 1: GT_Utility.sendChatToPlayer(aPlayer, "Allow (conditional)"); break;
- case 2: GT_Utility.sendChatToPlayer(aPlayer, "Disallow (conditional)"); break;
- }
- return aCoverVariable;
- }
-
- public float getBlastProofLevel(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return 20.0F;
- }
-
- public boolean letsRedstoneGoIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return false;
- }
-
- public boolean letsRedstoneGoOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return false;
- }
-
- public boolean letsEnergyIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- if ((aCoverVariable > 1) && ((aTileEntity instanceof IMachineProgress))) {
- if (((IMachineProgress) aTileEntity).isAllowedToWork()) {
- return false;
- }
- }
- return true;
- }
-
- public boolean letsEnergyOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- if ((aCoverVariable > 1) && ((aTileEntity instanceof IMachineProgress))) {
- if (((IMachineProgress) aTileEntity).isAllowedToWork()) {
- return false;
- }
- }
- return true;
- }
-
- public boolean letsFluidIn(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) {
- return false;
- }
-
- public boolean letsFluidOut(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) {
- return false;
- }
-
- public boolean letsItemsIn(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) {
- return false;
- }
-
- public boolean letsItemsOut(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) {
- return false;
- }
-
- public boolean isGUIClickable(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return false;
- }
-
- public boolean manipulatesSidedRedstoneOutput(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return false;
- }
-
- public boolean onCoverRightclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) {
- return false;
- }
-
- public boolean onCoverRemoval(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, boolean aForced) {
- return true;
- }
-}
+package gregtech.common.covers; + +import gregtech.api.interfaces.tileentity.ICoverable; +import gregtech.api.interfaces.tileentity.IMachineProgress; +import gregtech.api.util.GT_CoverBehavior; +import gregtech.api.util.GT_Utility; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraftforge.fluids.Fluid; + +public class GT_Cover_EnergyOnly + extends GT_CoverBehavior { + public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) { + aCoverVariable = (aCoverVariable + 1) % 3; + switch(aCoverVariable) { + case 0: GT_Utility.sendChatToPlayer(aPlayer, "Allow"); break; + case 1: GT_Utility.sendChatToPlayer(aPlayer, "Allow (conditional)"); break; + case 2: GT_Utility.sendChatToPlayer(aPlayer, "Disallow (conditional)"); break; + } + return aCoverVariable; + } + + public float getBlastProofLevel(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return 20.0F; + } + + public boolean letsRedstoneGoIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return false; + } + + public boolean letsRedstoneGoOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return false; + } + + public boolean letsEnergyIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + if ((aCoverVariable > 1) && ((aTileEntity instanceof IMachineProgress))) { + if (((IMachineProgress) aTileEntity).isAllowedToWork()) { + return false; + } + } + return true; + } + + public boolean letsEnergyOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + if ((aCoverVariable > 1) && ((aTileEntity instanceof IMachineProgress))) { + if (((IMachineProgress) aTileEntity).isAllowedToWork()) { + return false; + } + } + return true; + } + + public boolean letsFluidIn(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { + return false; + } + + public boolean letsFluidOut(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { + return false; + } + + public boolean letsItemsIn(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) { + return false; + } + + public boolean letsItemsOut(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) { + return false; + } + + public boolean isGUIClickable(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return false; + } + + public boolean manipulatesSidedRedstoneOutput(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return false; + } + + public boolean onCoverRightclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) { + return false; + } + + public boolean onCoverRemoval(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, boolean aForced) { + return true; + } +} diff --git a/src/main/java/gregtech/common/covers/GT_Cover_FluidRegulator.java b/src/main/java/gregtech/common/covers/GT_Cover_FluidRegulator.java index a8361a78dc..9e63242279 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_FluidRegulator.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_FluidRegulator.java @@ -95,43 +95,43 @@ public class GT_Cover_FluidRegulator extends GT_CoverBehavior { return true; } - public boolean letsRedstoneGoIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { - return true; - } + public boolean letsRedstoneGoIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return true; + } - public boolean letsRedstoneGoOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { - return true; - } + public boolean letsRedstoneGoOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return true; + } - public boolean letsEnergyIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { - return true; - } + public boolean letsEnergyIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return true; + } - public boolean letsEnergyOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { - return true; - } + public boolean letsEnergyOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return true; + } - public boolean letsItemsIn(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) { - return true; - } + public boolean letsItemsIn(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) { + return true; + } - public boolean letsItemsOut(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) { - return true; - } + public boolean letsItemsOut(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) { + return true; + } - public boolean letsFluidIn(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { - return false; - } + public boolean letsFluidIn(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { + return false; + } - public boolean letsFluidOut(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { - return false; - } + public boolean letsFluidOut(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { + return false; + } - public boolean alwaysLookConnected(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { - return true; - } + public boolean alwaysLookConnected(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return true; + } - public int getTickRate(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { - return 1; - } + public int getTickRate(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return 1; + } } diff --git a/src/main/java/gregtech/common/covers/GT_Cover_ItemMeter.java b/src/main/java/gregtech/common/covers/GT_Cover_ItemMeter.java index d353b715dc..e723654b0e 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_ItemMeter.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_ItemMeter.java @@ -16,27 +16,27 @@ public class GT_Cover_ItemMeter } else {
tSlots = new int[]{aCoverVariable - 2};
}
- int tAll = 0;
- int tFull = 0;
+ int tMax = 0;
+ int tUsed = 0;
for (int i : tSlots) {
- if ((i >= 0) && (i < aTileEntity.getSizeInventory())) {
- tAll += 64;
+ if (i >= 0 && i < aTileEntity.getSizeInventory()) {
+ tMax+=64;
ItemStack tStack = aTileEntity.getStackInSlot(i);
- if (tStack != null) {
- tFull += tStack.stackSize * 64 / tStack.getMaxStackSize();
- }
+ if (tStack != null)
+ tUsed += (tStack.stackSize<<6)/tStack.getMaxStackSize();
}
}
- tAll /= 14;
- if(tAll > 0)
- aTileEntity.setOutputRedstoneSignal(aSide, aCoverVariable == 1 ? (byte)(15 - (tFull <= 0 ? 0 : tFull / tAll + 1)) : tFull <= 0 ? 0 : (byte)(tFull / tAll + 1));
- else
- aTileEntity.setOutputRedstoneSignal(aSide, ((byte)(aCoverVariable == 1 ? 15 : 0)));
+ if(tUsed==0)//nothing
+ aTileEntity.setOutputRedstoneSignal(aSide, (byte)(aCoverVariable == 1 ? 15 : 0));
+ else if(tUsed >= tMax)//full
+ aTileEntity.setOutputRedstoneSignal(aSide, (byte)(aCoverVariable == 1 ? 0 : 15));
+ else//1-14 range
+ aTileEntity.setOutputRedstoneSignal(aSide, (byte)(aCoverVariable == 1 ? 14-((14*tUsed)/tMax) : 1+((14*tUsed)/tMax)) );
return aCoverVariable;
}
public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) {
- aCoverVariable = (aCoverVariable + (aPlayer.isSneaking()? -1 : 1)) % (1 + aTileEntity.getSizeInventory());
+ aCoverVariable = (aCoverVariable + (aPlayer.isSneaking()? -1 : 1)) % (2 + aTileEntity.getSizeInventory());
switch(aCoverVariable) {
case 0: GT_Utility.sendChatToPlayer(aPlayer, "Normal"); break;
case 1: GT_Utility.sendChatToPlayer(aPlayer, "Inverted"); break;
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_Lens.java b/src/main/java/gregtech/common/covers/GT_Cover_Lens.java index 5f7c9903aa..85f61e8b74 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_Lens.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_Lens.java @@ -1,17 +1,17 @@ -package gregtech.common.covers;
-
-import gregtech.api.interfaces.tileentity.ICoverable;
-import gregtech.api.util.GT_CoverBehavior;
-
-public class GT_Cover_Lens
- extends GT_CoverBehavior {
- private final byte mColor;
-
- public GT_Cover_Lens(byte aColor) {
- this.mColor = aColor;
- }
-
- public byte getLensColor(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return this.mColor;
- }
-}
+package gregtech.common.covers; + +import gregtech.api.interfaces.tileentity.ICoverable; +import gregtech.api.util.GT_CoverBehavior; + +public class GT_Cover_Lens + extends GT_CoverBehavior { + private final byte mColor; + + public GT_Cover_Lens(byte aColor) { + this.mColor = aColor; + } + + public byte getLensColor(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return this.mColor; + } +} diff --git a/src/main/java/gregtech/common/covers/GT_Cover_LiquidMeter.java b/src/main/java/gregtech/common/covers/GT_Cover_LiquidMeter.java index 882c32e244..34e0180e91 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_LiquidMeter.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_LiquidMeter.java @@ -15,27 +15,27 @@ public class GT_Cover_LiquidMeter public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { if ((aTileEntity instanceof IFluidHandler)) { FluidTankInfo[] tTanks = ((IFluidHandler) aTileEntity).getTankInfo(ForgeDirection.UNKNOWN); - long tAll = 0L; - long tFull = 0L; + long tMax = 0; + long tUsed = 0; if (tTanks != null) { for (FluidTankInfo tTank : tTanks) { if (tTank != null) { - tAll += tTank.capacity; + tMax += tTank.capacity; FluidStack tLiquid = tTank.fluid; if (tLiquid != null) { - tFull += tLiquid.amount; + tUsed += tLiquid.amount; } } } } - tAll /= 14L; - if (tAll > 0L) { - aTileEntity.setOutputRedstoneSignal(aSide, aCoverVariable != 0 ? (byte) (int) (15L - (tFull <= 0L ? 0L : tFull / tAll + 1L)) : tFull <= 0L ? 0 : (byte) (int) (tFull / tAll + 1L)); - } else { - aTileEntity.setOutputRedstoneSignal(aSide, ((byte) (aCoverVariable != 0 ? 15 : 0))); - } + if(tUsed==0L)//nothing + aTileEntity.setOutputRedstoneSignal(aSide, (byte)(aCoverVariable == 0 ? 15 : 0)); + else if(tUsed >= tMax)//full + aTileEntity.setOutputRedstoneSignal(aSide, (byte)(aCoverVariable == 0 ? 0 : 15)); + else//1-14 range + aTileEntity.setOutputRedstoneSignal(aSide, (byte)(aCoverVariable == 0 ? 14-((14*tUsed)/tMax) : 1+((14*tUsed)/tMax)) ); } else { - aTileEntity.setOutputRedstoneSignal(aSide, (byte) 0); + aTileEntity.setOutputRedstoneSignal(aSide, (byte)0); } return aCoverVariable; } diff --git a/src/main/java/gregtech/common/covers/GT_Cover_Pump.java b/src/main/java/gregtech/common/covers/GT_Cover_Pump.java index 2bae554b76..60a2e17dcd 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_Pump.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_Pump.java @@ -1,139 +1,139 @@ -package gregtech.common.covers;
-
-import gregtech.api.interfaces.tileentity.ICoverable;
-import gregtech.api.interfaces.tileentity.IMachineProgress;
-import gregtech.api.util.GT_CoverBehavior;
-import gregtech.api.util.GT_Utility;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraftforge.common.util.ForgeDirection;
-import net.minecraftforge.fluids.Fluid;
-import net.minecraftforge.fluids.FluidStack;
-import net.minecraftforge.fluids.IFluidHandler;
-
-public class GT_Cover_Pump
- extends GT_CoverBehavior {
- public final int mTransferRate;
-
- public GT_Cover_Pump(int aTransferRate) {
- this.mTransferRate = aTransferRate;
- }
-
- public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) {
- if ((aCoverVariable % 6 > 1) && ((aTileEntity instanceof IMachineProgress))) {
- if (((IMachineProgress) aTileEntity).isAllowedToWork() != aCoverVariable % 6 < 4) {
- return aCoverVariable;
- }
- }
- if ((aTileEntity instanceof IFluidHandler)) {
- IFluidHandler tTank2 = aTileEntity.getITankContainerAtSide(aSide);
- if (tTank2 != null) {
- //aTileEntity.decreaseStoredEnergyUnits(GT_Utility.getTier(this.mTransferRate), true);
- IFluidHandler tTank1 = (IFluidHandler) aTileEntity;
- if (aCoverVariable % 2 == 0) {
- FluidStack tLiquid = tTank1.drain(ForgeDirection.getOrientation(aSide), this.mTransferRate, false);
- if (tLiquid != null) {
- tLiquid = tLiquid.copy();
- tLiquid.amount = tTank2.fill(ForgeDirection.getOrientation(aSide).getOpposite(), tLiquid, false);
- if (tLiquid.amount > 0) {
- if (((aCoverVariable % 2 == 0) || (aSide != 1)) && ((aCoverVariable % 2 != 0) || (aSide != 0)) && (aTileEntity.getUniversalEnergyCapacity() >= Math.min(1, tLiquid.amount / 10))) {
- if (aTileEntity.isUniversalEnergyStored(Math.min(1, tLiquid.amount / 10))) {
- aTileEntity.decreaseStoredEnergyUnits(Math.min(1, tLiquid.amount / 10), true);
- tTank2.fill(ForgeDirection.getOrientation(aSide).getOpposite(), tTank1.drain(ForgeDirection.getOrientation(aSide), tLiquid.amount, true), true);
- }
- } else {
- tTank2.fill(ForgeDirection.getOrientation(aSide).getOpposite(), tTank1.drain(ForgeDirection.getOrientation(aSide), tLiquid.amount, true), true);
- }
- }
- }
- } else {
- FluidStack tLiquid = tTank2.drain(ForgeDirection.getOrientation(aSide).getOpposite(), this.mTransferRate, false);
- if (tLiquid != null) {
- tLiquid = tLiquid.copy();
- tLiquid.amount = tTank1.fill(ForgeDirection.getOrientation(aSide), tLiquid, false);
- if (tLiquid.amount > 0) {
- if (((aCoverVariable % 2 == 0) || (aSide != 1)) && ((aCoverVariable % 2 != 0) || (aSide != 0)) && (aTileEntity.getUniversalEnergyCapacity() >= Math.min(1, tLiquid.amount / 10))) {
- if (aTileEntity.isUniversalEnergyStored(Math.min(1, tLiquid.amount / 10))) {
- aTileEntity.decreaseStoredEnergyUnits(Math.min(1, tLiquid.amount / 10), true);
- tTank1.fill(ForgeDirection.getOrientation(aSide), tTank2.drain(ForgeDirection.getOrientation(aSide).getOpposite(), tLiquid.amount, true), true);
- }
- } else {
- tTank1.fill(ForgeDirection.getOrientation(aSide), tTank2.drain(ForgeDirection.getOrientation(aSide).getOpposite(), tLiquid.amount, true), true);
- }
- }
- }
- }
- }
- }
- return aCoverVariable;
- }
-
- public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) {
- aCoverVariable = (aCoverVariable + (aPlayer.isSneaking()? -1 : 1)) % 12;
- if(aCoverVariable <0){aCoverVariable = 11;}
- switch(aCoverVariable) {
- case 0: GT_Utility.sendChatToPlayer(aPlayer, "Export"); break;
- case 1: GT_Utility.sendChatToPlayer(aPlayer, "Import"); break;
- case 2: GT_Utility.sendChatToPlayer(aPlayer, "Export (conditional)"); break;
- case 3: GT_Utility.sendChatToPlayer(aPlayer, "Import (conditional)"); break;
- case 4: GT_Utility.sendChatToPlayer(aPlayer, "Export (invert cond)"); break;
- case 5: GT_Utility.sendChatToPlayer(aPlayer, "Import (invert cond)"); break;
- case 6: GT_Utility.sendChatToPlayer(aPlayer, "Export allow Input"); break;
- case 7: GT_Utility.sendChatToPlayer(aPlayer, "Import allow Output"); break;
- case 8: GT_Utility.sendChatToPlayer(aPlayer, "Export allow Input (conditional)"); break;
- case 9: GT_Utility.sendChatToPlayer(aPlayer, "Import allow Output (conditional)"); break;
- case 10: GT_Utility.sendChatToPlayer(aPlayer, "Export allow Input (invert cond)"); break;
- case 11: GT_Utility.sendChatToPlayer(aPlayer, "Import allow Output (invert cond)"); break;
- }
- return aCoverVariable;
- }
-
- public boolean letsRedstoneGoIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return true;
- }
-
- public boolean letsRedstoneGoOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return true;
- }
-
- public boolean letsEnergyIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return true;
- }
-
- public boolean letsEnergyOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return true;
- }
-
- public boolean letsItemsIn(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) {
- return true;
- }
-
- public boolean letsItemsOut(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) {
- return true;
- }
-
- public boolean letsFluidIn(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) {
- if ((aCoverVariable > 1) && ((aTileEntity instanceof IMachineProgress))) {
- if (((IMachineProgress) aTileEntity).isAllowedToWork() != aCoverVariable % 6 < 4) {
- return false;
- }
- }
- return (aCoverVariable >= 6) || (aCoverVariable % 2 != 0);
- }
-
- public boolean letsFluidOut(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) {
- if ((aCoverVariable > 1) && ((aTileEntity instanceof IMachineProgress))) {
- if (((IMachineProgress) aTileEntity).isAllowedToWork() != aCoverVariable % 6 < 4) {
- return false;
- }
- }
- return (aCoverVariable >= 6) || (aCoverVariable % 2 == 0);
- }
-
- public boolean alwaysLookConnected(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return true;
- }
-
- public int getTickRate(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return 1;
- }
-}
+package gregtech.common.covers; + +import gregtech.api.interfaces.tileentity.ICoverable; +import gregtech.api.interfaces.tileentity.IMachineProgress; +import gregtech.api.util.GT_CoverBehavior; +import gregtech.api.util.GT_Utility; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.IFluidHandler; + +public class GT_Cover_Pump + extends GT_CoverBehavior { + public final int mTransferRate; + + public GT_Cover_Pump(int aTransferRate) { + this.mTransferRate = aTransferRate; + } + + public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { + if ((aCoverVariable % 6 > 1) && ((aTileEntity instanceof IMachineProgress))) { + if (((IMachineProgress) aTileEntity).isAllowedToWork() != aCoverVariable % 6 < 4) { + return aCoverVariable; + } + } + if ((aTileEntity instanceof IFluidHandler)) { + IFluidHandler tTank2 = aTileEntity.getITankContainerAtSide(aSide); + if (tTank2 != null) { + //aTileEntity.decreaseStoredEnergyUnits(GT_Utility.getTier(this.mTransferRate), true); + IFluidHandler tTank1 = (IFluidHandler) aTileEntity; + if (aCoverVariable % 2 == 0) { + FluidStack tLiquid = tTank1.drain(ForgeDirection.getOrientation(aSide), this.mTransferRate, false); + if (tLiquid != null) { + tLiquid = tLiquid.copy(); + tLiquid.amount = tTank2.fill(ForgeDirection.getOrientation(aSide).getOpposite(), tLiquid, false); + if (tLiquid.amount > 0) { + if (((aCoverVariable % 2 == 0) || (aSide != 1)) && ((aCoverVariable % 2 != 0) || (aSide != 0)) && (aTileEntity.getUniversalEnergyCapacity() >= Math.min(1, tLiquid.amount / 10))) { + if (aTileEntity.isUniversalEnergyStored(Math.min(1, tLiquid.amount / 10))) { + aTileEntity.decreaseStoredEnergyUnits(Math.min(1, tLiquid.amount / 10), true); + tTank2.fill(ForgeDirection.getOrientation(aSide).getOpposite(), tTank1.drain(ForgeDirection.getOrientation(aSide), tLiquid.amount, true), true); + } + } else { + tTank2.fill(ForgeDirection.getOrientation(aSide).getOpposite(), tTank1.drain(ForgeDirection.getOrientation(aSide), tLiquid.amount, true), true); + } + } + } + } else { + FluidStack tLiquid = tTank2.drain(ForgeDirection.getOrientation(aSide).getOpposite(), this.mTransferRate, false); + if (tLiquid != null) { + tLiquid = tLiquid.copy(); + tLiquid.amount = tTank1.fill(ForgeDirection.getOrientation(aSide), tLiquid, false); + if (tLiquid.amount > 0) { + if (((aCoverVariable % 2 == 0) || (aSide != 1)) && ((aCoverVariable % 2 != 0) || (aSide != 0)) && (aTileEntity.getUniversalEnergyCapacity() >= Math.min(1, tLiquid.amount / 10))) { + if (aTileEntity.isUniversalEnergyStored(Math.min(1, tLiquid.amount / 10))) { + aTileEntity.decreaseStoredEnergyUnits(Math.min(1, tLiquid.amount / 10), true); + tTank1.fill(ForgeDirection.getOrientation(aSide), tTank2.drain(ForgeDirection.getOrientation(aSide).getOpposite(), tLiquid.amount, true), true); + } + } else { + tTank1.fill(ForgeDirection.getOrientation(aSide), tTank2.drain(ForgeDirection.getOrientation(aSide).getOpposite(), tLiquid.amount, true), true); + } + } + } + } + } + } + return aCoverVariable; + } + + public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) { + aCoverVariable = (aCoverVariable + (aPlayer.isSneaking()? -1 : 1)) % 12; + if(aCoverVariable <0){aCoverVariable = 11;} + switch(aCoverVariable) { + case 0: GT_Utility.sendChatToPlayer(aPlayer, "Export"); break; + case 1: GT_Utility.sendChatToPlayer(aPlayer, "Import"); break; + case 2: GT_Utility.sendChatToPlayer(aPlayer, "Export (conditional)"); break; + case 3: GT_Utility.sendChatToPlayer(aPlayer, "Import (conditional)"); break; + case 4: GT_Utility.sendChatToPlayer(aPlayer, "Export (invert cond)"); break; + case 5: GT_Utility.sendChatToPlayer(aPlayer, "Import (invert cond)"); break; + case 6: GT_Utility.sendChatToPlayer(aPlayer, "Export allow Input"); break; + case 7: GT_Utility.sendChatToPlayer(aPlayer, "Import allow Output"); break; + case 8: GT_Utility.sendChatToPlayer(aPlayer, "Export allow Input (conditional)"); break; + case 9: GT_Utility.sendChatToPlayer(aPlayer, "Import allow Output (conditional)"); break; + case 10: GT_Utility.sendChatToPlayer(aPlayer, "Export allow Input (invert cond)"); break; + case 11: GT_Utility.sendChatToPlayer(aPlayer, "Import allow Output (invert cond)"); break; + } + return aCoverVariable; + } + + public boolean letsRedstoneGoIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return true; + } + + public boolean letsRedstoneGoOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return true; + } + + public boolean letsEnergyIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return true; + } + + public boolean letsEnergyOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return true; + } + + public boolean letsItemsIn(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) { + return true; + } + + public boolean letsItemsOut(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) { + return true; + } + + public boolean letsFluidIn(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { + if ((aCoverVariable > 1) && ((aTileEntity instanceof IMachineProgress))) { + if (((IMachineProgress) aTileEntity).isAllowedToWork() != aCoverVariable % 6 < 4) { + return false; + } + } + return (aCoverVariable >= 6) || (aCoverVariable % 2 != 0); + } + + public boolean letsFluidOut(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { + if ((aCoverVariable > 1) && ((aTileEntity instanceof IMachineProgress))) { + if (((IMachineProgress) aTileEntity).isAllowedToWork() != aCoverVariable % 6 < 4) { + return false; + } + } + return (aCoverVariable >= 6) || (aCoverVariable % 2 == 0); + } + + public boolean alwaysLookConnected(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return true; + } + + public int getTickRate(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return 1; + } +} diff --git a/src/main/java/gregtech/common/covers/GT_Cover_RedstoneConductor.java b/src/main/java/gregtech/common/covers/GT_Cover_RedstoneConductor.java index 9675ef6c99..5e5a5579a6 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_RedstoneConductor.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_RedstoneConductor.java @@ -1,66 +1,66 @@ -package gregtech.common.covers;
-
-import gregtech.api.interfaces.tileentity.ICoverable;
-import gregtech.api.util.GT_CoverBehavior;
-import gregtech.api.util.GT_Utility;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraftforge.fluids.Fluid;
-
-public class GT_Cover_RedstoneConductor
- extends GT_CoverBehavior {
- public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) {
- if (aCoverVariable == 0) {
- aTileEntity.setOutputRedstoneSignal(aSide, aTileEntity.getStrongestRedstone());
- } else if (aCoverVariable < 7) {
- aTileEntity.setOutputRedstoneSignal(aSide, aTileEntity.getInternalInputRedstoneSignal((byte) (aCoverVariable - 1)));
- }
- return aCoverVariable;
- }
-
- public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) {
- aCoverVariable = (aCoverVariable + (aPlayer.isSneaking()? -1 : 1)) % 7;
- if(aCoverVariable <0){aCoverVariable = 6;}
- switch (aCoverVariable) {
- case 0: GT_Utility.sendChatToPlayer(aPlayer, "Conducts strongest Input"); break;
- case 1: GT_Utility.sendChatToPlayer(aPlayer, "Conducts from bottom Input"); break;
- case 2: GT_Utility.sendChatToPlayer(aPlayer, "Conducts from top Input"); break;
- case 3: GT_Utility.sendChatToPlayer(aPlayer, "Conducts from north Input"); break;
- case 4: GT_Utility.sendChatToPlayer(aPlayer, "Conducts from south Input"); break;
- case 5: GT_Utility.sendChatToPlayer(aPlayer, "Conducts from west Input"); break;
- case 6: GT_Utility.sendChatToPlayer(aPlayer, "Conducts from east Input"); break;
- }
- return aCoverVariable;
- }
-
- public boolean letsEnergyIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return true;
- }
-
- public boolean letsEnergyOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return true;
- }
-
- public boolean letsFluidIn(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) {
- return true;
- }
-
- public boolean letsFluidOut(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) {
- return true;
- }
-
- public boolean letsItemsIn(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) {
- return true;
- }
-
- public boolean letsItemsOut(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) {
- return true;
- }
-
- public boolean manipulatesSidedRedstoneOutput(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return true;
- }
-
- public int getTickRate(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return 1;
- }
-}
+package gregtech.common.covers; + +import gregtech.api.interfaces.tileentity.ICoverable; +import gregtech.api.util.GT_CoverBehavior; +import gregtech.api.util.GT_Utility; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraftforge.fluids.Fluid; + +public class GT_Cover_RedstoneConductor + extends GT_CoverBehavior { + public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { + if (aCoverVariable == 0) { + aTileEntity.setOutputRedstoneSignal(aSide, aTileEntity.getStrongestRedstone()); + } else if (aCoverVariable < 7) { + aTileEntity.setOutputRedstoneSignal(aSide, aTileEntity.getInternalInputRedstoneSignal((byte) (aCoverVariable - 1))); + } + return aCoverVariable; + } + + public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) { + aCoverVariable = (aCoverVariable + (aPlayer.isSneaking()? -1 : 1)) % 7; + if(aCoverVariable <0){aCoverVariable = 6;} + switch (aCoverVariable) { + case 0: GT_Utility.sendChatToPlayer(aPlayer, "Conducts strongest Input"); break; + case 1: GT_Utility.sendChatToPlayer(aPlayer, "Conducts from bottom Input"); break; + case 2: GT_Utility.sendChatToPlayer(aPlayer, "Conducts from top Input"); break; + case 3: GT_Utility.sendChatToPlayer(aPlayer, "Conducts from north Input"); break; + case 4: GT_Utility.sendChatToPlayer(aPlayer, "Conducts from south Input"); break; + case 5: GT_Utility.sendChatToPlayer(aPlayer, "Conducts from west Input"); break; + case 6: GT_Utility.sendChatToPlayer(aPlayer, "Conducts from east Input"); break; + } + return aCoverVariable; + } + + public boolean letsEnergyIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return true; + } + + public boolean letsEnergyOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return true; + } + + public boolean letsFluidIn(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { + return true; + } + + public boolean letsFluidOut(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { + return true; + } + + public boolean letsItemsIn(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) { + return true; + } + + public boolean letsItemsOut(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) { + return true; + } + + public boolean manipulatesSidedRedstoneOutput(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return true; + } + + public int getTickRate(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return 1; + } +} diff --git a/src/main/java/gregtech/common/covers/GT_Cover_RedstoneReceiverExternal.java b/src/main/java/gregtech/common/covers/GT_Cover_RedstoneReceiverExternal.java index f6793a6c94..d76cda3ede 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_RedstoneReceiverExternal.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_RedstoneReceiverExternal.java @@ -1,20 +1,20 @@ -package gregtech.common.covers;
-
-import gregtech.api.GregTech_API;
-import gregtech.api.interfaces.tileentity.ICoverable;
-
-public class GT_Cover_RedstoneReceiverExternal
- extends GT_Cover_RedstoneWirelessBase {
- public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) {
- aTileEntity.setOutputRedstoneSignal(aSide, GregTech_API.sWirelessRedstone.get(Integer.valueOf(aCoverVariable)) == null ? 0 : ((Byte) GregTech_API.sWirelessRedstone.get(Integer.valueOf(aCoverVariable))).byteValue());
- return aCoverVariable;
- }
-
- public boolean manipulatesSidedRedstoneOutput(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return true;
- }
-
- public int getTickRate(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return 1;
- }
-}
+package gregtech.common.covers; + +import gregtech.api.GregTech_API; +import gregtech.api.interfaces.tileentity.ICoverable; + +public class GT_Cover_RedstoneReceiverExternal + extends GT_Cover_RedstoneWirelessBase { + public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { + aTileEntity.setOutputRedstoneSignal(aSide, GregTech_API.sWirelessRedstone.get(Integer.valueOf(aCoverVariable)) == null ? 0 : ((Byte) GregTech_API.sWirelessRedstone.get(Integer.valueOf(aCoverVariable))).byteValue()); + return aCoverVariable; + } + + public boolean manipulatesSidedRedstoneOutput(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return true; + } + + public int getTickRate(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return 1; + } +} diff --git a/src/main/java/gregtech/common/covers/GT_Cover_RedstoneReceiverInternal.java b/src/main/java/gregtech/common/covers/GT_Cover_RedstoneReceiverInternal.java index 3af0a7de99..98307d2ca0 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_RedstoneReceiverInternal.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_RedstoneReceiverInternal.java @@ -1,19 +1,19 @@ -package gregtech.common.covers;
-
-import gregtech.api.GregTech_API;
-import gregtech.api.interfaces.tileentity.ICoverable;
-
-public class GT_Cover_RedstoneReceiverInternal
- extends GT_Cover_RedstoneWirelessBase {
- public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) {
- return aCoverVariable;
- }
-
- public byte getRedstoneInput(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return GregTech_API.sWirelessRedstone.get(Integer.valueOf(aCoverVariable)) == null ? 0 : ((Byte) GregTech_API.sWirelessRedstone.get(Integer.valueOf(aCoverVariable))).byteValue();
- }
-
- public int getTickRate(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return 1;
- }
-}
+package gregtech.common.covers; + +import gregtech.api.GregTech_API; +import gregtech.api.interfaces.tileentity.ICoverable; + +public class GT_Cover_RedstoneReceiverInternal + extends GT_Cover_RedstoneWirelessBase { + public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { + return aCoverVariable; + } + + public byte getRedstoneInput(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return GregTech_API.sWirelessRedstone.get(Integer.valueOf(aCoverVariable)) == null ? 0 : ((Byte) GregTech_API.sWirelessRedstone.get(Integer.valueOf(aCoverVariable))).byteValue(); + } + + public int getTickRate(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return 1; + } +} diff --git a/src/main/java/gregtech/common/covers/GT_Cover_RedstoneSignalizer.java b/src/main/java/gregtech/common/covers/GT_Cover_RedstoneSignalizer.java index fa1af824b3..e87043ac23 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_RedstoneSignalizer.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_RedstoneSignalizer.java @@ -1,66 +1,66 @@ -package gregtech.common.covers;
-
-import gregtech.api.interfaces.tileentity.ICoverable;
-import gregtech.api.interfaces.tileentity.IMachineProgress;
-import gregtech.api.util.GT_CoverBehavior;
-import gregtech.api.util.GT_Utility;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraftforge.fluids.Fluid;
-
-public class GT_Cover_RedstoneSignalizer
- extends GT_CoverBehavior {
- public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) {
- aCoverVariable = (aCoverVariable + 1) % 48;
- switch(aCoverVariable / 16) {
- case 0: GT_Utility.sendChatToPlayer(aPlayer, "Signal = " + (aCoverVariable & 0xF)); break;
- case 1: GT_Utility.sendChatToPlayer(aPlayer, "Conditional Signal = " + (aCoverVariable & 0xF)); break;
- case 2: GT_Utility.sendChatToPlayer(aPlayer, "Inverted Conditional Signal = " + (aCoverVariable & 0xF)); break;
- }
- return aCoverVariable;
- }
-
- public boolean letsRedstoneGoIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return true;
- }
-
- public boolean letsEnergyIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return true;
- }
-
- public boolean letsEnergyOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return true;
- }
-
- public boolean letsFluidIn(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) {
- return true;
- }
-
- public boolean letsFluidOut(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) {
- return true;
- }
-
- public boolean letsItemsIn(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) {
- return true;
- }
-
- public boolean letsItemsOut(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) {
- return true;
- }
-
- public byte getRedstoneInput(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- if (aCoverVariable < 16) {
- return (byte) (aCoverVariable & 0xF);
- }
- if ((aTileEntity instanceof IMachineProgress)) {
- if (((IMachineProgress) aTileEntity).isAllowedToWork()) {
- if (aCoverVariable / 16 == 1) {
- return (byte) (aCoverVariable & 0xF);
- }
- } else if (aCoverVariable / 16 == 2) {
- return (byte) (aCoverVariable & 0xF);
- }
- return 0;
- }
- return (byte) (aCoverVariable & 0xF);
- }
-}
+package gregtech.common.covers; + +import gregtech.api.interfaces.tileentity.ICoverable; +import gregtech.api.interfaces.tileentity.IMachineProgress; +import gregtech.api.util.GT_CoverBehavior; +import gregtech.api.util.GT_Utility; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraftforge.fluids.Fluid; + +public class GT_Cover_RedstoneSignalizer + extends GT_CoverBehavior { + public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) { + aCoverVariable = (aCoverVariable + 1) % 48; + switch(aCoverVariable / 16) { + case 0: GT_Utility.sendChatToPlayer(aPlayer, "Signal = " + (aCoverVariable & 0xF)); break; + case 1: GT_Utility.sendChatToPlayer(aPlayer, "Conditional Signal = " + (aCoverVariable & 0xF)); break; + case 2: GT_Utility.sendChatToPlayer(aPlayer, "Inverted Conditional Signal = " + (aCoverVariable & 0xF)); break; + } + return aCoverVariable; + } + + public boolean letsRedstoneGoIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return true; + } + + public boolean letsEnergyIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return true; + } + + public boolean letsEnergyOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return true; + } + + public boolean letsFluidIn(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { + return true; + } + + public boolean letsFluidOut(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { + return true; + } + + public boolean letsItemsIn(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) { + return true; + } + + public boolean letsItemsOut(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) { + return true; + } + + public byte getRedstoneInput(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + if (aCoverVariable < 16) { + return (byte) (aCoverVariable & 0xF); + } + if ((aTileEntity instanceof IMachineProgress)) { + if (((IMachineProgress) aTileEntity).isAllowedToWork()) { + if (aCoverVariable / 16 == 1) { + return (byte) (aCoverVariable & 0xF); + } + } else if (aCoverVariable / 16 == 2) { + return (byte) (aCoverVariable & 0xF); + } + return 0; + } + return (byte) (aCoverVariable & 0xF); + } +} diff --git a/src/main/java/gregtech/common/covers/GT_Cover_RedstoneTransmitterExternal.java b/src/main/java/gregtech/common/covers/GT_Cover_RedstoneTransmitterExternal.java index 6e08110f36..d4a334e18e 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_RedstoneTransmitterExternal.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_RedstoneTransmitterExternal.java @@ -1,20 +1,20 @@ -package gregtech.common.covers;
-
-import gregtech.api.GregTech_API;
-import gregtech.api.interfaces.tileentity.ICoverable;
-
-public class GT_Cover_RedstoneTransmitterExternal
- extends GT_Cover_RedstoneWirelessBase {
- public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) {
- GregTech_API.sWirelessRedstone.put(Integer.valueOf(aCoverVariable), Byte.valueOf(aInputRedstone));
- return aCoverVariable;
- }
-
- public boolean letsRedstoneGoIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return true;
- }
-
- public int getTickRate(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return 1;
- }
-}
+package gregtech.common.covers; + +import gregtech.api.GregTech_API; +import gregtech.api.interfaces.tileentity.ICoverable; + +public class GT_Cover_RedstoneTransmitterExternal + extends GT_Cover_RedstoneWirelessBase { + public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { + GregTech_API.sWirelessRedstone.put(Integer.valueOf(aCoverVariable), Byte.valueOf(aInputRedstone)); + return aCoverVariable; + } + + public boolean letsRedstoneGoIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return true; + } + + public int getTickRate(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return 1; + } +} diff --git a/src/main/java/gregtech/common/covers/GT_Cover_RedstoneTransmitterInternal.java b/src/main/java/gregtech/common/covers/GT_Cover_RedstoneTransmitterInternal.java index 7924dbe2f3..f632561994 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_RedstoneTransmitterInternal.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_RedstoneTransmitterInternal.java @@ -1,24 +1,24 @@ -package gregtech.common.covers;
-
-import gregtech.api.GregTech_API;
-import gregtech.api.interfaces.tileentity.ICoverable;
-
-public class GT_Cover_RedstoneTransmitterInternal
- extends GT_Cover_RedstoneWirelessBase {
- public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) {
- GregTech_API.sWirelessRedstone.put(Integer.valueOf(aCoverVariable), Byte.valueOf(aTileEntity.getOutputRedstoneSignal(aSide)));
- return aCoverVariable;
- }
-
- public boolean letsRedstoneGoOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return true;
- }
-
- public int getTickRate(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return 1;
- }
-
- public boolean manipulatesSidedRedstoneOutput(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return true;
- }
-}
+package gregtech.common.covers; + +import gregtech.api.GregTech_API; +import gregtech.api.interfaces.tileentity.ICoverable; + +public class GT_Cover_RedstoneTransmitterInternal + extends GT_Cover_RedstoneWirelessBase { + public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { + GregTech_API.sWirelessRedstone.put(Integer.valueOf(aCoverVariable), Byte.valueOf(aTileEntity.getOutputRedstoneSignal(aSide))); + return aCoverVariable; + } + + public boolean letsRedstoneGoOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return true; + } + + public int getTickRate(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return 1; + } + + public boolean manipulatesSidedRedstoneOutput(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return true; + } +} diff --git a/src/main/java/gregtech/common/covers/GT_Cover_RedstoneWirelessBase.java b/src/main/java/gregtech/common/covers/GT_Cover_RedstoneWirelessBase.java index 490cfe05a2..7b11138f03 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_RedstoneWirelessBase.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_RedstoneWirelessBase.java @@ -1,81 +1,81 @@ -package gregtech.common.covers;
-
-import gregtech.api.GregTech_API;
-import gregtech.api.interfaces.tileentity.ICoverable;
-import gregtech.api.util.GT_CoverBehavior;
-import gregtech.api.util.GT_Utility;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraftforge.fluids.Fluid;
-
-public abstract class GT_Cover_RedstoneWirelessBase
- extends GT_CoverBehavior {
- public boolean onCoverRemoval(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, boolean aForced) {
- GregTech_API.sWirelessRedstone.put(Integer.valueOf(aCoverVariable), Byte.valueOf((byte) 0));
- return true;
- }
-
- public boolean onCoverRightclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) {
- if (((aX > 0.375D) && (aX < 0.625D)) || ((aSide > 3) && ((aY > 0.375D) && (aY < 0.625D)))) {
- GregTech_API.sWirelessRedstone.put(Integer.valueOf(aCoverVariable), Byte.valueOf((byte) 0));
- aCoverVariable = GT_Utility.stackToInt(aPlayer.inventory.getCurrentItem());
- aTileEntity.setCoverDataAtSide(aSide, aCoverVariable);
- GT_Utility.sendChatToPlayer(aPlayer, "Frequency: " + aCoverVariable);
- return true;
- }
- return false;
- }
-
- public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) {
- if (((aX > 0.375D) && (aX < 0.625D)) || ((aSide <= 3) || (((aY > 0.375D) && (aY < 0.625D)) || ((((aZ <= 0.375D) || (aZ >= 0.625D))))))) {
- GregTech_API.sWirelessRedstone.put(Integer.valueOf(aCoverVariable), Byte.valueOf((byte) 0));
- float[] tCoords = GT_Utility.getClickedFacingCoords(aSide, aX, aY, aZ);
- switch ((byte) ((byte) (int) (tCoords[0] * 2.0F) + 2 * (byte) (int) (tCoords[1] * 2.0F))) {
- case 0:
- aCoverVariable -= 32;
- break;
- case 1:
- aCoverVariable += 32;
- break;
- case 2:
- aCoverVariable -= 1024;
- break;
- case 3:
- aCoverVariable += 1024;
- }
- }
- GT_Utility.sendChatToPlayer(aPlayer, "Frequency: " + aCoverVariable);
- return aCoverVariable;
- }
-
- public boolean letsEnergyIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return true;
- }
-
- public boolean letsEnergyOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return true;
- }
-
- public boolean letsFluidIn(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) {
- return true;
- }
-
- public boolean letsFluidOut(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) {
- return true;
- }
-
- public boolean letsItemsIn(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) {
- return true;
- }
-
- public boolean letsItemsOut(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) {
- return true;
- }
-
- public String getDescription(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return "Frequency: " + aCoverVariable;
- }
-
- public int getTickRate(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return 1;
- }
-}
+package gregtech.common.covers; + +import gregtech.api.GregTech_API; +import gregtech.api.interfaces.tileentity.ICoverable; +import gregtech.api.util.GT_CoverBehavior; +import gregtech.api.util.GT_Utility; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraftforge.fluids.Fluid; + +public abstract class GT_Cover_RedstoneWirelessBase + extends GT_CoverBehavior { + public boolean onCoverRemoval(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, boolean aForced) { + GregTech_API.sWirelessRedstone.put(Integer.valueOf(aCoverVariable), Byte.valueOf((byte) 0)); + return true; + } + + public boolean onCoverRightclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) { + if (((aX > 0.375D) && (aX < 0.625D)) || ((aSide > 3) && ((aY > 0.375D) && (aY < 0.625D)))) { + GregTech_API.sWirelessRedstone.put(Integer.valueOf(aCoverVariable), Byte.valueOf((byte) 0)); + aCoverVariable = GT_Utility.stackToInt(aPlayer.inventory.getCurrentItem()); + aTileEntity.setCoverDataAtSide(aSide, aCoverVariable); + GT_Utility.sendChatToPlayer(aPlayer, "Frequency: " + aCoverVariable); + return true; + } + return false; + } + + public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) { + if (((aX > 0.375D) && (aX < 0.625D)) || ((aSide <= 3) || (((aY > 0.375D) && (aY < 0.625D)) || ((((aZ <= 0.375D) || (aZ >= 0.625D))))))) { + GregTech_API.sWirelessRedstone.put(Integer.valueOf(aCoverVariable), Byte.valueOf((byte) 0)); + float[] tCoords = GT_Utility.getClickedFacingCoords(aSide, aX, aY, aZ); + switch ((byte) ((byte) (int) (tCoords[0] * 2.0F) + 2 * (byte) (int) (tCoords[1] * 2.0F))) { + case 0: + aCoverVariable -= 32; + break; + case 1: + aCoverVariable += 32; + break; + case 2: + aCoverVariable -= 1024; + break; + case 3: + aCoverVariable += 1024; + } + } + GT_Utility.sendChatToPlayer(aPlayer, "Frequency: " + aCoverVariable); + return aCoverVariable; + } + + public boolean letsEnergyIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return true; + } + + public boolean letsEnergyOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return true; + } + + public boolean letsFluidIn(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { + return true; + } + + public boolean letsFluidOut(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { + return true; + } + + public boolean letsItemsIn(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) { + return true; + } + + public boolean letsItemsOut(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) { + return true; + } + + public String getDescription(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return "Frequency: " + aCoverVariable; + } + + public int getTickRate(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return 1; + } +} diff --git a/src/main/java/gregtech/common/covers/GT_Cover_Screen.java b/src/main/java/gregtech/common/covers/GT_Cover_Screen.java index 6d8a17aa46..866102212c 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_Screen.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_Screen.java @@ -1,65 +1,65 @@ -package gregtech.common.covers;
-
-import gregtech.api.interfaces.tileentity.ICoverable;
-import gregtech.api.util.GT_CoverBehavior;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraftforge.fluids.Fluid;
-
-public class GT_Cover_Screen
- extends GT_CoverBehavior {
- public float getBlastProofLevel(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return 20.0F;
- }
-
- public boolean letsRedstoneGoIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return false;
- }
-
- public boolean letsRedstoneGoOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return false;
- }
-
- public boolean letsEnergyIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return false;
- }
-
- public boolean letsEnergyOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return false;
- }
-
- public boolean letsFluidIn(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) {
- return false;
- }
-
- public boolean letsFluidOut(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) {
- return false;
- }
-
- public boolean letsItemsIn(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) {
- return false;
- }
-
- public boolean letsItemsOut(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) {
- return false;
- }
-
- public boolean isGUIClickable(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return true;
- }
-
- public boolean manipulatesSidedRedstoneOutput(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return false;
- }
-
- public boolean onCoverRightclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) {
- return false;
- }
-
- public boolean onCoverRemoval(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, boolean aForced) {
- return true;
- }
-
- public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) {
- return 0;
- }
-}
+package gregtech.common.covers; + +import gregtech.api.interfaces.tileentity.ICoverable; +import gregtech.api.util.GT_CoverBehavior; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraftforge.fluids.Fluid; + +public class GT_Cover_Screen + extends GT_CoverBehavior { + public float getBlastProofLevel(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return 20.0F; + } + + public boolean letsRedstoneGoIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return false; + } + + public boolean letsRedstoneGoOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return false; + } + + public boolean letsEnergyIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return false; + } + + public boolean letsEnergyOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return false; + } + + public boolean letsFluidIn(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { + return false; + } + + public boolean letsFluidOut(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { + return false; + } + + public boolean letsItemsIn(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) { + return false; + } + + public boolean letsItemsOut(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) { + return false; + } + + public boolean isGUIClickable(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return true; + } + + public boolean manipulatesSidedRedstoneOutput(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return false; + } + + public boolean onCoverRightclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) { + return false; + } + + public boolean onCoverRemoval(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, boolean aForced) { + return true; + } + + public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { + return 0; + } +} diff --git a/src/main/java/gregtech/common/covers/GT_Cover_Shutter.java b/src/main/java/gregtech/common/covers/GT_Cover_Shutter.java index a936d8db2a..d4fa9ba1d5 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_Shutter.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_Shutter.java @@ -1,67 +1,67 @@ -package gregtech.common.covers;
-
-import gregtech.api.interfaces.tileentity.ICoverable;
-import gregtech.api.interfaces.tileentity.IMachineProgress;
-import gregtech.api.util.GT_CoverBehavior;
-import gregtech.api.util.GT_Utility;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraftforge.fluids.Fluid;
-
-public class GT_Cover_Shutter
- extends GT_CoverBehavior {
- public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) {
- return aCoverVariable;
- }
-
- public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) {
- aCoverVariable = (aCoverVariable + (aPlayer.isSneaking()? -1 : 1)) % 4;
- if(aCoverVariable <0){aCoverVariable = 3;}
- switch(aCoverVariable) {
- case 0: GT_Utility.sendChatToPlayer(aPlayer, "Open if work enabled"); break;
- case 1: GT_Utility.sendChatToPlayer(aPlayer, "Open if work disabled"); break;
- case 2: GT_Utility.sendChatToPlayer(aPlayer, "Only Output allowed"); break;
- case 3: GT_Utility.sendChatToPlayer(aPlayer, "Only Input allowed"); break;
- }
- return aCoverVariable;
- }
-
- public boolean letsRedstoneGoIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return aCoverVariable >= 2 ? aCoverVariable == 3 : (aTileEntity instanceof IMachineProgress) ? ((IMachineProgress) aTileEntity).isAllowedToWork() ? aCoverVariable % 2 == 0 : aCoverVariable % 2 != 0 : true;
- }
-
- public boolean letsRedstoneGoOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return aCoverVariable >= 2 ? aCoverVariable == 2 : (aTileEntity instanceof IMachineProgress) ? ((IMachineProgress) aTileEntity).isAllowedToWork() ? aCoverVariable % 2 == 0 : aCoverVariable % 2 != 0 : true;
- }
-
- public boolean letsEnergyIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return aCoverVariable >= 2 ? aCoverVariable == 3 : (aTileEntity instanceof IMachineProgress) ? ((IMachineProgress) aTileEntity).isAllowedToWork() ? aCoverVariable % 2 == 0 : aCoverVariable % 2 != 0 : true;
- }
-
- public boolean letsEnergyOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return aCoverVariable >= 2 ? aCoverVariable == 2 : (aTileEntity instanceof IMachineProgress) ? ((IMachineProgress) aTileEntity).isAllowedToWork() ? aCoverVariable % 2 == 0 : aCoverVariable % 2 != 0 : true;
- }
-
- public boolean letsFluidIn(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) {
- return aCoverVariable >= 2 ? aCoverVariable == 3 : (aTileEntity instanceof IMachineProgress) ? ((IMachineProgress) aTileEntity).isAllowedToWork() ? aCoverVariable % 2 == 0 : aCoverVariable % 2 != 0 : true;
- }
-
- public boolean letsFluidOut(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) {
- return aCoverVariable >= 2 ? aCoverVariable == 2 : (aTileEntity instanceof IMachineProgress) ? ((IMachineProgress) aTileEntity).isAllowedToWork() ? aCoverVariable % 2 == 0 : aCoverVariable % 2 != 0 : true;
- }
-
- public boolean letsItemsIn(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) {
- return aCoverVariable >= 2 ? aCoverVariable == 3 : (aTileEntity instanceof IMachineProgress) ? ((IMachineProgress) aTileEntity).isAllowedToWork() ? aCoverVariable % 2 == 0 : aCoverVariable % 2 != 0 : true;
- }
-
- public boolean letsItemsOut(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) {
- return aCoverVariable >= 2 ? aCoverVariable == 2 : (aTileEntity instanceof IMachineProgress) ? ((IMachineProgress) aTileEntity).isAllowedToWork() ? aCoverVariable % 2 == 0 : aCoverVariable % 2 != 0 : true;
- }
-
- public boolean alwaysLookConnected(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return true;
- }
-
- public int getTickRate(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return 0;
- }
-}
+package gregtech.common.covers; + +import gregtech.api.interfaces.tileentity.ICoverable; +import gregtech.api.interfaces.tileentity.IMachineProgress; +import gregtech.api.util.GT_CoverBehavior; +import gregtech.api.util.GT_Utility; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraftforge.fluids.Fluid; + +public class GT_Cover_Shutter + extends GT_CoverBehavior { + public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { + return aCoverVariable; + } + + public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) { + aCoverVariable = (aCoverVariable + (aPlayer.isSneaking()? -1 : 1)) % 4; + if(aCoverVariable <0){aCoverVariable = 3;} + switch(aCoverVariable) { + case 0: GT_Utility.sendChatToPlayer(aPlayer, "Open if work enabled"); break; + case 1: GT_Utility.sendChatToPlayer(aPlayer, "Open if work disabled"); break; + case 2: GT_Utility.sendChatToPlayer(aPlayer, "Only Output allowed"); break; + case 3: GT_Utility.sendChatToPlayer(aPlayer, "Only Input allowed"); break; + } + return aCoverVariable; + } + + public boolean letsRedstoneGoIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return aCoverVariable >= 2 ? aCoverVariable == 3 : (aTileEntity instanceof IMachineProgress) ? ((IMachineProgress) aTileEntity).isAllowedToWork() ? aCoverVariable % 2 == 0 : aCoverVariable % 2 != 0 : true; + } + + public boolean letsRedstoneGoOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return aCoverVariable >= 2 ? aCoverVariable == 2 : (aTileEntity instanceof IMachineProgress) ? ((IMachineProgress) aTileEntity).isAllowedToWork() ? aCoverVariable % 2 == 0 : aCoverVariable % 2 != 0 : true; + } + + public boolean letsEnergyIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return aCoverVariable >= 2 ? aCoverVariable == 3 : (aTileEntity instanceof IMachineProgress) ? ((IMachineProgress) aTileEntity).isAllowedToWork() ? aCoverVariable % 2 == 0 : aCoverVariable % 2 != 0 : true; + } + + public boolean letsEnergyOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return aCoverVariable >= 2 ? aCoverVariable == 2 : (aTileEntity instanceof IMachineProgress) ? ((IMachineProgress) aTileEntity).isAllowedToWork() ? aCoverVariable % 2 == 0 : aCoverVariable % 2 != 0 : true; + } + + public boolean letsFluidIn(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { + return aCoverVariable >= 2 ? aCoverVariable == 3 : (aTileEntity instanceof IMachineProgress) ? ((IMachineProgress) aTileEntity).isAllowedToWork() ? aCoverVariable % 2 == 0 : aCoverVariable % 2 != 0 : true; + } + + public boolean letsFluidOut(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { + return aCoverVariable >= 2 ? aCoverVariable == 2 : (aTileEntity instanceof IMachineProgress) ? ((IMachineProgress) aTileEntity).isAllowedToWork() ? aCoverVariable % 2 == 0 : aCoverVariable % 2 != 0 : true; + } + + public boolean letsItemsIn(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) { + return aCoverVariable >= 2 ? aCoverVariable == 3 : (aTileEntity instanceof IMachineProgress) ? ((IMachineProgress) aTileEntity).isAllowedToWork() ? aCoverVariable % 2 == 0 : aCoverVariable % 2 != 0 : true; + } + + public boolean letsItemsOut(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) { + return aCoverVariable >= 2 ? aCoverVariable == 2 : (aTileEntity instanceof IMachineProgress) ? ((IMachineProgress) aTileEntity).isAllowedToWork() ? aCoverVariable % 2 == 0 : aCoverVariable % 2 != 0 : true; + } + + public boolean alwaysLookConnected(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return true; + } + + public int getTickRate(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return 0; + } +} diff --git a/src/main/java/gregtech/common/covers/GT_Cover_SolarPanel.java b/src/main/java/gregtech/common/covers/GT_Cover_SolarPanel.java index ca25a0a12d..73cfd7dae9 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_SolarPanel.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_SolarPanel.java @@ -1,7 +1,12 @@ package gregtech.common.covers; import gregtech.api.interfaces.tileentity.ICoverable; +import gregtech.api.objects.XSTR; import gregtech.api.util.GT_CoverBehavior; +import gregtech.api.util.GT_Utility; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; public class GT_Cover_SolarPanel extends GT_CoverBehavior { @@ -12,18 +17,58 @@ public class GT_Cover_SolarPanel } public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { + if(aSide != 1)return 0; + int coverState=aCoverVariable&0x3; + int coverNum=aCoverVariable>>2; if (aTimer % 100L == 0L) { - if ((aSide != 1) || (aTileEntity.getWorld().isThundering())) { - aCoverVariable = 0; + if (aTileEntity.getWorld().isThundering()) { + return aTileEntity.getBiome().rainfall > 0.0F && aTileEntity.getSkyAtSide(aSide) ? Math.min(20,coverNum)<<2 : coverNum<<2; } else { - boolean bRain = (aTileEntity.getWorld().isRaining()) && (aTileEntity.getBiome().rainfall > 0.0F); - aCoverVariable = bRain && aTileEntity.getWorld().skylightSubtracted >= 4 || !aTileEntity.getSkyAtSide(aSide) ? 0 : ((int) (!bRain && aTileEntity.getWorld().isDaytime() ? 1 : 2)); + if(aTileEntity.getWorld().isRaining() && aTileEntity.getBiome().rainfall > 0.0F){//really rains + if(aTileEntity.getSkyAtSide(aSide)) coverNum=Math.min(30,coverNum); + if(aTileEntity.getWorld().skylightSubtracted >= 4){ + if(aTileEntity.getWorld().isDaytime()){ + coverState=2; + }else{ + return coverNum<<2; + } + } + }else{//not rains + if(aTileEntity.getWorld().isDaytime()){ + coverState=1; + }else{ + coverState=2; + } + } } } - if ((aCoverVariable == 1) || ((aCoverVariable == 2) && (aTimer % 8L == 0L))) { - aTileEntity.injectEnergyUnits((byte) 6, this.mVoltage, 1L); + if (coverState == 1 || (coverState == 2 && aTimer % 8L == 0L)) + aTileEntity.injectEnergyUnits((byte) 6, ((100L-(long)coverNum)*((long)this.mVoltage))/100L, 1L); + if(aTimer % 28800L == 0L && coverNum<100 && (coverNum>10 || (new XSTR()).nextInt(3)==2)) + coverNum++; + return coverState+(coverNum<<2); + } + + @Override + public boolean onCoverRightclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) { + if(aPlayer.capabilities.isCreativeMode){ + GT_Utility.sendChatToPlayer(aPlayer,"Cleaned solar panel from "+(aCoverVariable>>2)+"% dirt"); + aTileEntity.setCoverDataAtSide(aSide, (aCoverVariable & 0x3)); + return true; + } + for(int i=0;i<aPlayer.inventory.mainInventory.length;i++){ + ItemStack is=aPlayer.inventory.mainInventory[i]; + if(is==null) continue; + if(is.getUnlocalizedName().equals(new ItemStack(Items.water_bucket).getUnlocalizedName())){ + aPlayer.inventory.mainInventory[i]=new ItemStack(Items.bucket); + if (aPlayer.inventoryContainer != null) aPlayer.inventoryContainer.detectAndSendChanges(); + GT_Utility.sendChatToPlayer(aPlayer,"Cleaned solar panel from "+(aCoverVariable>>2)+"% dirt"); + aTileEntity.setCoverDataAtSide(aSide, (aCoverVariable & 0x3)); + return true; + } } - return aCoverVariable; + GT_Utility.sendChatToPlayer(aPlayer,"You need water bucket in inventory to clean the panel."); + return false; } public int getTickRate(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { diff --git a/src/main/java/gregtech/common/covers/GT_Cover_Vent.java b/src/main/java/gregtech/common/covers/GT_Cover_Vent.java index e22c2945b9..39754b98f2 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_Vent.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_Vent.java @@ -1,34 +1,34 @@ -package gregtech.common.covers;
-
-import gregtech.api.interfaces.tileentity.ICoverable;
-import gregtech.api.interfaces.tileentity.IMachineProgress;
-import gregtech.api.util.GT_CoverBehavior;
-import gregtech.api.util.GT_Utility;
-
-public class GT_Cover_Vent
- extends GT_CoverBehavior {
- private final int mEfficiency;
-
- public GT_Cover_Vent(int aEfficiency) {
- this.mEfficiency = aEfficiency;
- }
-
- public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) {
- if ((aTileEntity instanceof IMachineProgress)) {
- if ((((IMachineProgress) aTileEntity).hasThingsToDo()) && (aCoverVariable != ((IMachineProgress) aTileEntity).getProgress()) &&
- (!GT_Utility.hasBlockHitBox(aTileEntity.getWorld(), aTileEntity.getOffsetX(aSide, 1), aTileEntity.getOffsetY(aSide, 1), aTileEntity.getOffsetZ(aSide, 1)))) {
- ((IMachineProgress) aTileEntity).increaseProgress(this.mEfficiency);
- }
- return ((IMachineProgress) aTileEntity).getProgress();
- }
- return 0;
- }
-
- public boolean alwaysLookConnected(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return true;
- }
-
- public int getTickRate(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return 60;
- }
-}
+package gregtech.common.covers; + +import gregtech.api.interfaces.tileentity.ICoverable; +import gregtech.api.interfaces.tileentity.IMachineProgress; +import gregtech.api.util.GT_CoverBehavior; +import gregtech.api.util.GT_Utility; + +public class GT_Cover_Vent + extends GT_CoverBehavior { + private final int mEfficiency; + + public GT_Cover_Vent(int aEfficiency) { + this.mEfficiency = aEfficiency; + } + + public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { + if ((aTileEntity instanceof IMachineProgress)) { + if ((((IMachineProgress) aTileEntity).hasThingsToDo()) && (aCoverVariable != ((IMachineProgress) aTileEntity).getProgress()) && + (!GT_Utility.hasBlockHitBox(aTileEntity.getWorld(), aTileEntity.getOffsetX(aSide, 1), aTileEntity.getOffsetY(aSide, 1), aTileEntity.getOffsetZ(aSide, 1)))) { + ((IMachineProgress) aTileEntity).increaseProgress(this.mEfficiency); + } + return ((IMachineProgress) aTileEntity).getProgress(); + } + return 0; + } + + public boolean alwaysLookConnected(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return true; + } + + public int getTickRate(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return 60; + } +} diff --git a/src/main/java/gregtech/common/entities/GT_Entity_Arrow.java b/src/main/java/gregtech/common/entities/GT_Entity_Arrow.java index a95720134b..814ab3f8fa 100644 --- a/src/main/java/gregtech/common/entities/GT_Entity_Arrow.java +++ b/src/main/java/gregtech/common/entities/GT_Entity_Arrow.java @@ -1,344 +1,344 @@ -package gregtech.common.entities;
-
-import com.mojang.authlib.GameProfile;
-import gregtech.api.objects.ItemData;
-import gregtech.api.util.GT_OreDictUnificator;
-import gregtech.api.util.GT_Utility;
-import net.minecraft.block.Block;
-import net.minecraft.block.material.Material;
-import net.minecraft.enchantment.Enchantment;
-import net.minecraft.enchantment.EnchantmentHelper;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.entity.monster.EntityCreeper;
-import net.minecraft.entity.monster.EntityEnderman;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.entity.player.EntityPlayerMP;
-import net.minecraft.entity.projectile.EntityArrow;
-import net.minecraft.init.Blocks;
-import net.minecraft.init.Items;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.network.play.server.S2BPacketChangeGameState;
-import net.minecraft.potion.Potion;
-import net.minecraft.util.*;
-import net.minecraft.world.World;
-import net.minecraft.world.WorldServer;
-import net.minecraftforge.common.util.FakePlayerFactory;
-
-import java.util.List;
-import java.util.UUID;
-
-public class GT_Entity_Arrow
- extends EntityArrow {
- private int mHitBlockX = -1;
- private int mHitBlockY = -1;
- private int mHitBlockZ = -1;
- private Block mHitBlock = Blocks.air;
- private int mHitBlockMeta = 0;
- private boolean inGround = false;
- private int mTicksAlive = 0;
- private int ticksInAir = 0;
- private int mKnockback = 0;
- private ItemStack mArrow = null;
-
- public GT_Entity_Arrow(World aWorld) {
- super(aWorld);
- }
-
- public GT_Entity_Arrow(World aWorld, double aX, double aY, double aZ) {
- super(aWorld, aX, aY, aZ);
- }
-
- public GT_Entity_Arrow(World aWorld, EntityLivingBase aEntity, float aSpeed) {
- super(aWorld, aEntity, aSpeed);
- }
-
- public GT_Entity_Arrow(EntityArrow aArrow, ItemStack aStack) {
- super(aArrow.worldObj);
- NBTTagCompound tNBT = new NBTTagCompound();
- aArrow.writeToNBT(tNBT);
- readFromNBT(tNBT);
- setArrowItem(aStack);
- }
-
- public void onUpdate() {
- onEntityUpdate();
- if ((this.mArrow == null) && (!this.worldObj.isRemote)) {
- setDead();
- return;
- }
- Entity tShootingEntity = this.shootingEntity;
- if ((this.prevRotationPitch == 0.0F) && (this.prevRotationYaw == 0.0F)) {
- float f = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ);
- this.prevRotationYaw = (this.rotationYaw = (float) (Math.atan2(this.motionX, this.motionZ) * 180.0D / 3.141592653589793D));
- this.prevRotationPitch = (this.rotationPitch = (float) (Math.atan2(this.motionY, f) * 180.0D / 3.141592653589793D));
- }
- if (this.mTicksAlive++ == 3000) {
- setDead();
- }
- Block tBlock = this.worldObj.getBlock(this.mHitBlockX, this.mHitBlockY, this.mHitBlockZ);
- if (tBlock.getMaterial() != Material.air) {
- tBlock.setBlockBoundsBasedOnState(this.worldObj, this.mHitBlockX, this.mHitBlockY, this.mHitBlockZ);
- AxisAlignedBB axisalignedbb = tBlock.getCollisionBoundingBoxFromPool(this.worldObj, this.mHitBlockX, this.mHitBlockY, this.mHitBlockZ);
- if ((axisalignedbb != null) && (axisalignedbb.isVecInside(Vec3.createVectorHelper(this.posX, this.posY, this.posZ)))) {
- this.inGround = true;
- }
- }
- if (this.arrowShake > 0) {
- this.arrowShake -= 1;
- }
- if (this.inGround) {
- int j = this.worldObj.getBlockMetadata(this.mHitBlockX, this.mHitBlockY, this.mHitBlockZ);
- if ((tBlock != this.mHitBlock) || (j != this.mHitBlockMeta)) {
- this.inGround = false;
- this.motionX *= this.rand.nextFloat() * 0.2F;
- this.motionY *= this.rand.nextFloat() * 0.2F;
- this.motionZ *= this.rand.nextFloat() * 0.2F;
- this.mTicksAlive = 0;
- this.ticksInAir = 0;
- }
- } else {
- this.ticksInAir += 1;
- Vec3 vec31 = Vec3.createVectorHelper(this.posX, this.posY, this.posZ);
- Vec3 vec3 = Vec3.createVectorHelper(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ);
- MovingObjectPosition tVector = this.worldObj.func_147447_a(vec31, vec3, false, true, false);
- vec31 = Vec3.createVectorHelper(this.posX, this.posY, this.posZ);
- vec3 = Vec3.createVectorHelper(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ);
- if (tVector != null) {
- vec3 = Vec3.createVectorHelper(tVector.hitVec.xCoord, tVector.hitVec.yCoord, tVector.hitVec.zCoord);
- }
- Entity tHitEntity = null;
- List tAllPotentiallyHitEntities = this.worldObj.getEntitiesWithinAABBExcludingEntity(this, this.boundingBox.addCoord(this.motionX, this.motionY, this.motionZ).expand(1.0D, 1.0D, 1.0D));
- double tLargestDistance = 1.7976931348623157E+308D;
- for (int i = 0; i < tAllPotentiallyHitEntities.size(); i++) {
- Entity entity1 = (Entity) tAllPotentiallyHitEntities.get(i);
- if ((entity1.canBeCollidedWith()) && ((entity1 != tShootingEntity) || (this.ticksInAir >= 5))) {
- AxisAlignedBB axisalignedbb1 = entity1.boundingBox.expand(0.3D, 0.3D, 0.3D);
- MovingObjectPosition movingobjectposition1 = axisalignedbb1.calculateIntercept(vec31, vec3);
- if (movingobjectposition1 != null) {
- double tDistance = vec31.distanceTo(movingobjectposition1.hitVec);
- if (tDistance < tLargestDistance) {
- tHitEntity = entity1;
- tLargestDistance = tDistance;
- }
- }
- }
- }
- if (tHitEntity != null) {
- tVector = new MovingObjectPosition(tHitEntity);
- }
- if ((tVector != null) && ((tVector.entityHit instanceof EntityPlayer))) {
- EntityPlayer entityplayer = (EntityPlayer) tVector.entityHit;
- if ((entityplayer.capabilities.disableDamage) || (((tShootingEntity instanceof EntityPlayer)) && (!((EntityPlayer) tShootingEntity).canAttackPlayer(entityplayer)))) {
- tVector = null;
- }
- }
- if (tVector != null) {
- if (tVector.entityHit != null) {
- ItemData tData = GT_OreDictUnificator.getItemData(this.mArrow);
-
-
- float tMagicDamage = (tVector.entityHit instanceof EntityLivingBase) ? EnchantmentHelper.func_152377_a(this.mArrow, ((EntityLivingBase) tVector.entityHit).getCreatureAttribute()) : 0.0F;
- float tDamage = MathHelper.ceiling_double_int(MathHelper.sqrt_double(this.motionX * this.motionX + this.motionY * this.motionY + this.motionZ * this.motionZ) * (getDamage() + ((tData != null) && (tData.mMaterial != null) && (tData.mMaterial.mMaterial != null) ? tData.mMaterial.mMaterial.mToolQuality / 2.0F - 1.0F : 0.0F)));
- if (getIsCritical()) {
- tDamage += this.rand.nextInt((int) (tDamage / 2.0D + 2.0D));
- }
- int tFireDamage = (isBurning() ? 5 : 0) + 4 * EnchantmentHelper.getEnchantmentLevel(Enchantment.fireAspect.effectId, this.mArrow);
- int tKnockback = this.mKnockback + EnchantmentHelper.getEnchantmentLevel(Enchantment.knockback.effectId, this.mArrow);
- int tHitTimer = -1;
-
- int[] tDamages = onHitEntity(tVector.entityHit, tShootingEntity == null ? this : tShootingEntity, this.mArrow == null ? new ItemStack(Items.arrow, 1) : this.mArrow, (int) (tDamage * 2.0F), (int) (tMagicDamage * 2.0F), tKnockback, tFireDamage, tHitTimer);
- if (tDamages != null) {
- tDamage = tDamages[0] / 2.0F;
- tMagicDamage = tDamages[1] / 2.0F;
- tKnockback = tDamages[2];
- tFireDamage = tDamages[3];
- tHitTimer = tDamages[4];
- if ((tFireDamage > 0) && (!(tVector.entityHit instanceof EntityEnderman))) {
- tVector.entityHit.setFire(tFireDamage);
- }
- if ((!(tHitEntity instanceof EntityPlayer)) && (EnchantmentHelper.getEnchantmentLevel(Enchantment.looting.effectId, this.mArrow) > 0)) {
- EntityPlayer tPlayer = null;
- if ((this.worldObj instanceof WorldServer)) {
- tPlayer = FakePlayerFactory.get((WorldServer) this.worldObj, new GameProfile(new UUID(0L, 0L), (tShootingEntity instanceof EntityLivingBase) ? ((EntityLivingBase) tShootingEntity).getCommandSenderName() : "Arrow"));
- }
- if (tPlayer != null) {
- tPlayer.inventory.currentItem = 0;
- tPlayer.inventory.setInventorySlotContents(0, getArrowItem());
- tShootingEntity = tPlayer;
- tPlayer.setDead();
- }
- }
- DamageSource tDamageSource = DamageSource.causeArrowDamage(this, tShootingEntity == null ? this : tShootingEntity);
- if ((tDamage + tMagicDamage > 0.0F) && (tVector.entityHit.attackEntityFrom(tDamageSource, tDamage + tMagicDamage))) {
- if ((tVector.entityHit instanceof EntityLivingBase)) {
- if (tHitTimer >= 0) {
- tVector.entityHit.hurtResistantTime = tHitTimer;
- }
- if (((tVector.entityHit instanceof EntityCreeper)) && (EnchantmentHelper.getEnchantmentLevel(Enchantment.fireAspect.effectId, this.mArrow) > 0)) {
- ((EntityCreeper) tVector.entityHit).func_146079_cb();
- }
- EntityLivingBase tHitLivingEntity = (EntityLivingBase) tVector.entityHit;
- if (!this.worldObj.isRemote) {
- tHitLivingEntity.setArrowCountInEntity(tHitLivingEntity.getArrowCountInEntity() + 1);
- }
- if (tKnockback > 0) {
- float tKnockbackDivider = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ);
- if (tKnockbackDivider > 0.0F) {
- tHitLivingEntity.addVelocity(this.motionX * tKnockback * 0.6000000238418579D / tKnockbackDivider, 0.1D, this.motionZ * tKnockback * 0.6000000238418579D / tKnockbackDivider);
- }
- }
- GT_Utility.GT_EnchantmentHelper.applyBullshitA(tHitLivingEntity, tShootingEntity == null ? this : tShootingEntity, this.mArrow);
- GT_Utility.GT_EnchantmentHelper.applyBullshitB((tShootingEntity instanceof EntityLivingBase) ? (EntityLivingBase) tShootingEntity : null, tHitLivingEntity, this.mArrow);
- if ((tShootingEntity != null) && (tHitLivingEntity != tShootingEntity) && ((tHitLivingEntity instanceof EntityPlayer)) && ((tShootingEntity instanceof EntityPlayerMP))) {
- ((EntityPlayerMP) tShootingEntity).playerNetServerHandler.sendPacket(new S2BPacketChangeGameState(6, 0.0F));
- }
- }
- if (((tShootingEntity instanceof EntityPlayer)) && (tMagicDamage > 0.0F)) {
- ((EntityPlayer) tShootingEntity).onEnchantmentCritical(tVector.entityHit);
- }
- if ((!(tVector.entityHit instanceof EntityEnderman)) || (((EntityEnderman) tVector.entityHit).getActivePotionEffect(Potion.weakness) != null)) {
- if (tFireDamage > 0) {
- tVector.entityHit.setFire(tFireDamage);
- }
- playSound("random.bowhit", 1.0F, 1.2F / (this.rand.nextFloat() * 0.2F + 0.9F));
- setDead();
- }
- } else {
- this.motionX *= -0.1000000014901161D;
- this.motionY *= -0.1000000014901161D;
- this.motionZ *= -0.1000000014901161D;
- this.rotationYaw += 180.0F;
- this.prevRotationYaw += 180.0F;
- this.ticksInAir = 0;
- }
- }
- } else {
- this.mHitBlockX = tVector.blockX;
- this.mHitBlockY = tVector.blockY;
- this.mHitBlockZ = tVector.blockZ;
- this.mHitBlock = this.worldObj.getBlock(this.mHitBlockX, this.mHitBlockY, this.mHitBlockZ);
- this.mHitBlockMeta = this.worldObj.getBlockMetadata(this.mHitBlockX, this.mHitBlockY, this.mHitBlockZ);
- this.motionX = ((float) (tVector.hitVec.xCoord - this.posX));
- this.motionY = ((float) (tVector.hitVec.yCoord - this.posY));
- this.motionZ = ((float) (tVector.hitVec.zCoord - this.posZ));
- float f2 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionY * this.motionY + this.motionZ * this.motionZ);
- this.posX -= this.motionX / f2 * 0.0500000007450581D;
- this.posY -= this.motionY / f2 * 0.0500000007450581D;
- this.posZ -= this.motionZ / f2 * 0.0500000007450581D;
- playSound("random.bowhit", 1.0F, 1.2F / (this.rand.nextFloat() * 0.2F + 0.9F));
- this.inGround = true;
- this.arrowShake = 7;
- setIsCritical(false);
- if (this.mHitBlock.getMaterial() != Material.air) {
- this.mHitBlock.onEntityCollidedWithBlock(this.worldObj, this.mHitBlockX, this.mHitBlockY, this.mHitBlockZ, this);
- }
- if ((!this.worldObj.isRemote) && (EnchantmentHelper.getEnchantmentLevel(Enchantment.fireAspect.effectId, this.mArrow) > 2)) {
- GT_Utility.setCoordsOnFire(this.worldObj, this.mHitBlockX, this.mHitBlockY, this.mHitBlockZ, true);
- }
- if (breaksOnImpact()) {
- setDead();
- }
- }
- }
- if (getIsCritical()) {
- for (int i = 0; i < 4; i++) {
- this.worldObj.spawnParticle("crit", this.posX + this.motionX * i / 4.0D, this.posY + this.motionY * i / 4.0D, this.posZ + this.motionZ * i / 4.0D, -this.motionX, -this.motionY + 0.2D, -this.motionZ);
- }
- }
- this.posX += this.motionX;
- this.posY += this.motionY;
- this.posZ += this.motionZ;
-
- this.rotationYaw = ((float) (Math.atan2(this.motionX, this.motionZ) * 180.0D / 3.141592653589793D));
- for (this.rotationPitch = ((float) (Math.atan2(this.motionY, MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ)) * 180.0D / 3.141592653589793D)); this.rotationPitch - this.prevRotationPitch < -180.0F; this.prevRotationPitch -= 360.0F) {
- }
- while (this.rotationPitch - this.prevRotationPitch >= 180.0F) {
- this.prevRotationPitch += 360.0F;
- }
- while (this.rotationYaw - this.prevRotationYaw < -180.0F) {
- this.prevRotationYaw -= 360.0F;
- }
- while (this.rotationYaw - this.prevRotationYaw >= 180.0F) {
- this.prevRotationYaw += 360.0F;
- }
- this.rotationPitch = (this.prevRotationPitch + (this.rotationPitch - this.prevRotationPitch) * 0.2F);
- this.rotationYaw = (this.prevRotationYaw + (this.rotationYaw - this.prevRotationYaw) * 0.2F);
- float tFrictionMultiplier = 0.99F;
- if (isInWater()) {
- for (int l = 0; l < 4; l++) {
- this.worldObj.spawnParticle("bubble", this.posX - this.motionX * 0.25D, this.posY - this.motionY * 0.25D, this.posZ - this.motionZ * 0.25D, this.motionX, this.motionY, this.motionZ);
- }
- tFrictionMultiplier = 0.8F;
- }
- if (isWet()) {
- extinguish();
- }
- this.motionX *= tFrictionMultiplier;
- this.motionY *= tFrictionMultiplier;
- this.motionZ *= tFrictionMultiplier;
- this.motionY -= 0.0500000007450581D;
- setPosition(this.posX, this.posY, this.posZ);
- func_145775_I();
- }
- }
-
- public void writeEntityToNBT(NBTTagCompound aNBT) {
- super.writeEntityToNBT(aNBT);
- aNBT.setShort("xTile", (short) this.mHitBlockX);
- aNBT.setShort("yTile", (short) this.mHitBlockY);
- aNBT.setShort("zTile", (short) this.mHitBlockZ);
- aNBT.setShort("life", (short) this.mTicksAlive);
- aNBT.setByte("inTile", (byte) Block.getIdFromBlock(this.mHitBlock));
- aNBT.setByte("inData", (byte) this.mHitBlockMeta);
- aNBT.setByte("shake", (byte) this.arrowShake);
- aNBT.setByte("inGround", (byte) (this.inGround ? 1 : 0));
- aNBT.setByte("pickup", (byte) this.canBePickedUp);
- aNBT.setDouble("damage", getDamage());
- aNBT.setTag("mArrow", this.mArrow == null ? null : this.mArrow.writeToNBT(new NBTTagCompound()));
- }
-
- public void readEntityFromNBT(NBTTagCompound aNBT) {
- super.readEntityFromNBT(aNBT);
- this.mHitBlockX = aNBT.getShort("xTile");
- this.mHitBlockY = aNBT.getShort("yTile");
- this.mHitBlockZ = aNBT.getShort("zTile");
- this.mTicksAlive = aNBT.getShort("life");
- this.mHitBlock = Block.getBlockById(aNBT.getByte("inTile") & 0xFF);
- this.mHitBlockMeta = (aNBT.getByte("inData") & 0xFF);
- this.arrowShake = (aNBT.getByte("shake") & 0xFF);
- this.inGround = (aNBT.getByte("inGround") == 1);
- setDamage(aNBT.getDouble("damage"));
- this.canBePickedUp = aNBT.getByte("pickup");
- this.mArrow = GT_Utility.loadItem(aNBT, "mArrow");
- }
-
- public void onCollideWithPlayer(EntityPlayer aPlayer) {
- if ((!this.worldObj.isRemote) && (this.inGround) && (this.arrowShake <= 0) && (this.canBePickedUp == 1) && (aPlayer.inventory.addItemStackToInventory(getArrowItem()))) {
- playSound("random.pop", 0.2F, ((this.rand.nextFloat() - this.rand.nextFloat()) * 0.7F + 1.0F) * 2.0F);
- aPlayer.onItemPickup(this, 1);
- setDead();
- }
- }
-
- public int[] onHitEntity(Entity aHitEntity, Entity aShootingEntity, ItemStack aArrow, int aRegularDamage, int aMagicDamage, int aKnockback, int aFireDamage, int aHitTimer) {
- return new int[]{aRegularDamage, aMagicDamage, aKnockback, aFireDamage, aHitTimer};
- }
-
- public ItemStack getArrowItem() {
- return GT_Utility.copy(new Object[]{this.mArrow});
- }
-
- public void setArrowItem(ItemStack aStack) {
- this.mArrow = GT_Utility.updateItemStack(GT_Utility.copyAmount(1L, new Object[]{aStack}));
- }
-
- public boolean breaksOnImpact() {
- return false;
- }
-
- public void setKnockbackStrength(int aKnockback) {
- this.mKnockback = aKnockback;
- }
-}
+package gregtech.common.entities; + +import com.mojang.authlib.GameProfile; +import gregtech.api.objects.ItemData; +import gregtech.api.util.GT_OreDictUnificator; +import gregtech.api.util.GT_Utility; +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.enchantment.Enchantment; +import net.minecraft.enchantment.EnchantmentHelper; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.monster.EntityCreeper; +import net.minecraft.entity.monster.EntityEnderman; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.entity.projectile.EntityArrow; +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.network.play.server.S2BPacketChangeGameState; +import net.minecraft.potion.Potion; +import net.minecraft.util.*; +import net.minecraft.world.World; +import net.minecraft.world.WorldServer; +import net.minecraftforge.common.util.FakePlayerFactory; + +import java.util.List; +import java.util.UUID; + +public class GT_Entity_Arrow + extends EntityArrow { + private int mHitBlockX = -1; + private int mHitBlockY = -1; + private int mHitBlockZ = -1; + private Block mHitBlock = Blocks.air; + private int mHitBlockMeta = 0; + private boolean inGround = false; + private int mTicksAlive = 0; + private int ticksInAir = 0; + private int mKnockback = 0; + private ItemStack mArrow = null; + + public GT_Entity_Arrow(World aWorld) { + super(aWorld); + } + + public GT_Entity_Arrow(World aWorld, double aX, double aY, double aZ) { + super(aWorld, aX, aY, aZ); + } + + public GT_Entity_Arrow(World aWorld, EntityLivingBase aEntity, float aSpeed) { + super(aWorld, aEntity, aSpeed); + } + + public GT_Entity_Arrow(EntityArrow aArrow, ItemStack aStack) { + super(aArrow.worldObj); + NBTTagCompound tNBT = new NBTTagCompound(); + aArrow.writeToNBT(tNBT); + readFromNBT(tNBT); + setArrowItem(aStack); + } + + public void onUpdate() { + onEntityUpdate(); + if ((this.mArrow == null) && (!this.worldObj.isRemote)) { + setDead(); + return; + } + Entity tShootingEntity = this.shootingEntity; + if ((this.prevRotationPitch == 0.0F) && (this.prevRotationYaw == 0.0F)) { + float f = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ); + this.prevRotationYaw = (this.rotationYaw = (float) (Math.atan2(this.motionX, this.motionZ) * 180.0D / 3.141592653589793D)); + this.prevRotationPitch = (this.rotationPitch = (float) (Math.atan2(this.motionY, f) * 180.0D / 3.141592653589793D)); + } + if (this.mTicksAlive++ == 3000) { + setDead(); + } + Block tBlock = this.worldObj.getBlock(this.mHitBlockX, this.mHitBlockY, this.mHitBlockZ); + if (tBlock.getMaterial() != Material.air) { + tBlock.setBlockBoundsBasedOnState(this.worldObj, this.mHitBlockX, this.mHitBlockY, this.mHitBlockZ); + AxisAlignedBB axisalignedbb = tBlock.getCollisionBoundingBoxFromPool(this.worldObj, this.mHitBlockX, this.mHitBlockY, this.mHitBlockZ); + if ((axisalignedbb != null) && (axisalignedbb.isVecInside(Vec3.createVectorHelper(this.posX, this.posY, this.posZ)))) { + this.inGround = true; + } + } + if (this.arrowShake > 0) { + this.arrowShake -= 1; + } + if (this.inGround) { + int j = this.worldObj.getBlockMetadata(this.mHitBlockX, this.mHitBlockY, this.mHitBlockZ); + if ((tBlock != this.mHitBlock) || (j != this.mHitBlockMeta)) { + this.inGround = false; + this.motionX *= this.rand.nextFloat() * 0.2F; + this.motionY *= this.rand.nextFloat() * 0.2F; + this.motionZ *= this.rand.nextFloat() * 0.2F; + this.mTicksAlive = 0; + this.ticksInAir = 0; + } + } else { + this.ticksInAir += 1; + Vec3 vec31 = Vec3.createVectorHelper(this.posX, this.posY, this.posZ); + Vec3 vec3 = Vec3.createVectorHelper(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ); + MovingObjectPosition tVector = this.worldObj.func_147447_a(vec31, vec3, false, true, false); + vec31 = Vec3.createVectorHelper(this.posX, this.posY, this.posZ); + vec3 = Vec3.createVectorHelper(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ); + if (tVector != null) { + vec3 = Vec3.createVectorHelper(tVector.hitVec.xCoord, tVector.hitVec.yCoord, tVector.hitVec.zCoord); + } + Entity tHitEntity = null; + List tAllPotentiallyHitEntities = this.worldObj.getEntitiesWithinAABBExcludingEntity(this, this.boundingBox.addCoord(this.motionX, this.motionY, this.motionZ).expand(1.0D, 1.0D, 1.0D)); + double tLargestDistance = 1.7976931348623157E+308D; + for (int i = 0; i < tAllPotentiallyHitEntities.size(); i++) { + Entity entity1 = (Entity) tAllPotentiallyHitEntities.get(i); + if ((entity1.canBeCollidedWith()) && ((entity1 != tShootingEntity) || (this.ticksInAir >= 5))) { + AxisAlignedBB axisalignedbb1 = entity1.boundingBox.expand(0.3D, 0.3D, 0.3D); + MovingObjectPosition movingobjectposition1 = axisalignedbb1.calculateIntercept(vec31, vec3); + if (movingobjectposition1 != null) { + double tDistance = vec31.distanceTo(movingobjectposition1.hitVec); + if (tDistance < tLargestDistance) { + tHitEntity = entity1; + tLargestDistance = tDistance; + } + } + } + } + if (tHitEntity != null) { + tVector = new MovingObjectPosition(tHitEntity); + } + if ((tVector != null) && ((tVector.entityHit instanceof EntityPlayer))) { + EntityPlayer entityplayer = (EntityPlayer) tVector.entityHit; + if ((entityplayer.capabilities.disableDamage) || (((tShootingEntity instanceof EntityPlayer)) && (!((EntityPlayer) tShootingEntity).canAttackPlayer(entityplayer)))) { + tVector = null; + } + } + if (tVector != null) { + if (tVector.entityHit != null) { + ItemData tData = GT_OreDictUnificator.getItemData(this.mArrow); + + + float tMagicDamage = (tVector.entityHit instanceof EntityLivingBase) ? EnchantmentHelper.func_152377_a(this.mArrow, ((EntityLivingBase) tVector.entityHit).getCreatureAttribute()) : 0.0F; + float tDamage = MathHelper.ceiling_double_int(MathHelper.sqrt_double(this.motionX * this.motionX + this.motionY * this.motionY + this.motionZ * this.motionZ) * (getDamage() + ((tData != null) && (tData.mMaterial != null) && (tData.mMaterial.mMaterial != null) ? tData.mMaterial.mMaterial.mToolQuality / 2.0F - 1.0F : 0.0F))); + if (getIsCritical()) { + tDamage += this.rand.nextInt((int) (tDamage / 2.0D + 2.0D)); + } + int tFireDamage = (isBurning() ? 5 : 0) + 4 * EnchantmentHelper.getEnchantmentLevel(Enchantment.fireAspect.effectId, this.mArrow); + int tKnockback = this.mKnockback + EnchantmentHelper.getEnchantmentLevel(Enchantment.knockback.effectId, this.mArrow); + int tHitTimer = -1; + + int[] tDamages = onHitEntity(tVector.entityHit, tShootingEntity == null ? this : tShootingEntity, this.mArrow == null ? new ItemStack(Items.arrow, 1) : this.mArrow, (int) (tDamage * 2.0F), (int) (tMagicDamage * 2.0F), tKnockback, tFireDamage, tHitTimer); + if (tDamages != null) { + tDamage = tDamages[0] / 2.0F; + tMagicDamage = tDamages[1] / 2.0F; + tKnockback = tDamages[2]; + tFireDamage = tDamages[3]; + tHitTimer = tDamages[4]; + if ((tFireDamage > 0) && (!(tVector.entityHit instanceof EntityEnderman))) { + tVector.entityHit.setFire(tFireDamage); + } + if ((!(tHitEntity instanceof EntityPlayer)) && (EnchantmentHelper.getEnchantmentLevel(Enchantment.looting.effectId, this.mArrow) > 0)) { + EntityPlayer tPlayer = null; + if ((this.worldObj instanceof WorldServer)) { + tPlayer = FakePlayerFactory.get((WorldServer) this.worldObj, new GameProfile(new UUID(0L, 0L), (tShootingEntity instanceof EntityLivingBase) ? ((EntityLivingBase) tShootingEntity).getCommandSenderName() : "Arrow")); + } + if (tPlayer != null) { + tPlayer.inventory.currentItem = 0; + tPlayer.inventory.setInventorySlotContents(0, getArrowItem()); + tShootingEntity = tPlayer; + tPlayer.setDead(); + } + } + DamageSource tDamageSource = DamageSource.causeArrowDamage(this, tShootingEntity == null ? this : tShootingEntity); + if ((tDamage + tMagicDamage > 0.0F) && (tVector.entityHit.attackEntityFrom(tDamageSource, tDamage + tMagicDamage))) { + if ((tVector.entityHit instanceof EntityLivingBase)) { + if (tHitTimer >= 0) { + tVector.entityHit.hurtResistantTime = tHitTimer; + } + if (((tVector.entityHit instanceof EntityCreeper)) && (EnchantmentHelper.getEnchantmentLevel(Enchantment.fireAspect.effectId, this.mArrow) > 0)) { + ((EntityCreeper) tVector.entityHit).func_146079_cb(); + } + EntityLivingBase tHitLivingEntity = (EntityLivingBase) tVector.entityHit; + if (!this.worldObj.isRemote) { + tHitLivingEntity.setArrowCountInEntity(tHitLivingEntity.getArrowCountInEntity() + 1); + } + if (tKnockback > 0) { + float tKnockbackDivider = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ); + if (tKnockbackDivider > 0.0F) { + tHitLivingEntity.addVelocity(this.motionX * tKnockback * 0.6000000238418579D / tKnockbackDivider, 0.1D, this.motionZ * tKnockback * 0.6000000238418579D / tKnockbackDivider); + } + } + GT_Utility.GT_EnchantmentHelper.applyBullshitA(tHitLivingEntity, tShootingEntity == null ? this : tShootingEntity, this.mArrow); + GT_Utility.GT_EnchantmentHelper.applyBullshitB((tShootingEntity instanceof EntityLivingBase) ? (EntityLivingBase) tShootingEntity : null, tHitLivingEntity, this.mArrow); + if ((tShootingEntity != null) && (tHitLivingEntity != tShootingEntity) && ((tHitLivingEntity instanceof EntityPlayer)) && ((tShootingEntity instanceof EntityPlayerMP))) { + ((EntityPlayerMP) tShootingEntity).playerNetServerHandler.sendPacket(new S2BPacketChangeGameState(6, 0.0F)); + } + } + if (((tShootingEntity instanceof EntityPlayer)) && (tMagicDamage > 0.0F)) { + ((EntityPlayer) tShootingEntity).onEnchantmentCritical(tVector.entityHit); + } + if ((!(tVector.entityHit instanceof EntityEnderman)) || (((EntityEnderman) tVector.entityHit).getActivePotionEffect(Potion.weakness) != null)) { + if (tFireDamage > 0) { + tVector.entityHit.setFire(tFireDamage); + } + playSound("random.bowhit", 1.0F, 1.2F / (this.rand.nextFloat() * 0.2F + 0.9F)); + setDead(); + } + } else { + this.motionX *= -0.1000000014901161D; + this.motionY *= -0.1000000014901161D; + this.motionZ *= -0.1000000014901161D; + this.rotationYaw += 180.0F; + this.prevRotationYaw += 180.0F; + this.ticksInAir = 0; + } + } + } else { + this.mHitBlockX = tVector.blockX; + this.mHitBlockY = tVector.blockY; + this.mHitBlockZ = tVector.blockZ; + this.mHitBlock = this.worldObj.getBlock(this.mHitBlockX, this.mHitBlockY, this.mHitBlockZ); + this.mHitBlockMeta = this.worldObj.getBlockMetadata(this.mHitBlockX, this.mHitBlockY, this.mHitBlockZ); + this.motionX = ((float) (tVector.hitVec.xCoord - this.posX)); + this.motionY = ((float) (tVector.hitVec.yCoord - this.posY)); + this.motionZ = ((float) (tVector.hitVec.zCoord - this.posZ)); + float f2 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionY * this.motionY + this.motionZ * this.motionZ); + this.posX -= this.motionX / f2 * 0.0500000007450581D; + this.posY -= this.motionY / f2 * 0.0500000007450581D; + this.posZ -= this.motionZ / f2 * 0.0500000007450581D; + playSound("random.bowhit", 1.0F, 1.2F / (this.rand.nextFloat() * 0.2F + 0.9F)); + this.inGround = true; + this.arrowShake = 7; + setIsCritical(false); + if (this.mHitBlock.getMaterial() != Material.air) { + this.mHitBlock.onEntityCollidedWithBlock(this.worldObj, this.mHitBlockX, this.mHitBlockY, this.mHitBlockZ, this); + } + if ((!this.worldObj.isRemote) && (EnchantmentHelper.getEnchantmentLevel(Enchantment.fireAspect.effectId, this.mArrow) > 2)) { + GT_Utility.setCoordsOnFire(this.worldObj, this.mHitBlockX, this.mHitBlockY, this.mHitBlockZ, true); + } + if (breaksOnImpact()) { + setDead(); + } + } + } + if (getIsCritical()) { + for (int i = 0; i < 4; i++) { + this.worldObj.spawnParticle("crit", this.posX + this.motionX * i / 4.0D, this.posY + this.motionY * i / 4.0D, this.posZ + this.motionZ * i / 4.0D, -this.motionX, -this.motionY + 0.2D, -this.motionZ); + } + } + this.posX += this.motionX; + this.posY += this.motionY; + this.posZ += this.motionZ; + + this.rotationYaw = ((float) (Math.atan2(this.motionX, this.motionZ) * 180.0D / 3.141592653589793D)); + for (this.rotationPitch = ((float) (Math.atan2(this.motionY, MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ)) * 180.0D / 3.141592653589793D)); this.rotationPitch - this.prevRotationPitch < -180.0F; this.prevRotationPitch -= 360.0F) { + } + while (this.rotationPitch - this.prevRotationPitch >= 180.0F) { + this.prevRotationPitch += 360.0F; + } + while (this.rotationYaw - this.prevRotationYaw < -180.0F) { + this.prevRotationYaw -= 360.0F; + } + while (this.rotationYaw - this.prevRotationYaw >= 180.0F) { + this.prevRotationYaw += 360.0F; + } + this.rotationPitch = (this.prevRotationPitch + (this.rotationPitch - this.prevRotationPitch) * 0.2F); + this.rotationYaw = (this.prevRotationYaw + (this.rotationYaw - this.prevRotationYaw) * 0.2F); + float tFrictionMultiplier = 0.99F; + if (isInWater()) { + for (int l = 0; l < 4; l++) { + this.worldObj.spawnParticle("bubble", this.posX - this.motionX * 0.25D, this.posY - this.motionY * 0.25D, this.posZ - this.motionZ * 0.25D, this.motionX, this.motionY, this.motionZ); + } + tFrictionMultiplier = 0.8F; + } + if (isWet()) { + extinguish(); + } + this.motionX *= tFrictionMultiplier; + this.motionY *= tFrictionMultiplier; + this.motionZ *= tFrictionMultiplier; + this.motionY -= 0.0500000007450581D; + setPosition(this.posX, this.posY, this.posZ); + func_145775_I(); + } + } + + public void writeEntityToNBT(NBTTagCompound aNBT) { + super.writeEntityToNBT(aNBT); + aNBT.setShort("xTile", (short) this.mHitBlockX); + aNBT.setShort("yTile", (short) this.mHitBlockY); + aNBT.setShort("zTile", (short) this.mHitBlockZ); + aNBT.setShort("life", (short) this.mTicksAlive); + aNBT.setByte("inTile", (byte) Block.getIdFromBlock(this.mHitBlock)); + aNBT.setByte("inData", (byte) this.mHitBlockMeta); + aNBT.setByte("shake", (byte) this.arrowShake); + aNBT.setByte("inGround", (byte) (this.inGround ? 1 : 0)); + aNBT.setByte("pickup", (byte) this.canBePickedUp); + aNBT.setDouble("damage", getDamage()); + aNBT.setTag("mArrow", this.mArrow == null ? null : this.mArrow.writeToNBT(new NBTTagCompound())); + } + + public void readEntityFromNBT(NBTTagCompound aNBT) { + super.readEntityFromNBT(aNBT); + this.mHitBlockX = aNBT.getShort("xTile"); + this.mHitBlockY = aNBT.getShort("yTile"); + this.mHitBlockZ = aNBT.getShort("zTile"); + this.mTicksAlive = aNBT.getShort("life"); + this.mHitBlock = Block.getBlockById(aNBT.getByte("inTile") & 0xFF); + this.mHitBlockMeta = (aNBT.getByte("inData") & 0xFF); + this.arrowShake = (aNBT.getByte("shake") & 0xFF); + this.inGround = (aNBT.getByte("inGround") == 1); + setDamage(aNBT.getDouble("damage")); + this.canBePickedUp = aNBT.getByte("pickup"); + this.mArrow = GT_Utility.loadItem(aNBT, "mArrow"); + } + + public void onCollideWithPlayer(EntityPlayer aPlayer) { + if ((!this.worldObj.isRemote) && (this.inGround) && (this.arrowShake <= 0) && (this.canBePickedUp == 1) && (aPlayer.inventory.addItemStackToInventory(getArrowItem()))) { + playSound("random.pop", 0.2F, ((this.rand.nextFloat() - this.rand.nextFloat()) * 0.7F + 1.0F) * 2.0F); + aPlayer.onItemPickup(this, 1); + setDead(); + } + } + + public int[] onHitEntity(Entity aHitEntity, Entity aShootingEntity, ItemStack aArrow, int aRegularDamage, int aMagicDamage, int aKnockback, int aFireDamage, int aHitTimer) { + return new int[]{aRegularDamage, aMagicDamage, aKnockback, aFireDamage, aHitTimer}; + } + + public ItemStack getArrowItem() { + return GT_Utility.copy(new Object[]{this.mArrow}); + } + + public void setArrowItem(ItemStack aStack) { + this.mArrow = GT_Utility.updateItemStack(GT_Utility.copyAmount(1L, new Object[]{aStack})); + } + + public boolean breaksOnImpact() { + return false; + } + + public void setKnockbackStrength(int aKnockback) { + this.mKnockback = aKnockback; + } +} diff --git a/src/main/java/gregtech/common/entities/GT_Entity_Arrow_Potion.java b/src/main/java/gregtech/common/entities/GT_Entity_Arrow_Potion.java index 72950e8712..d026f8184b 100644 --- a/src/main/java/gregtech/common/entities/GT_Entity_Arrow_Potion.java +++ b/src/main/java/gregtech/common/entities/GT_Entity_Arrow_Potion.java @@ -1,60 +1,60 @@ -package gregtech.common.entities;
-
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.potion.PotionEffect;
-import net.minecraft.world.World;
-
-public class GT_Entity_Arrow_Potion
- extends GT_Entity_Arrow {
- private int[] mPotions = new int[0];
-
- public GT_Entity_Arrow_Potion(World aWorld) {
- super(aWorld);
- }
-
- public GT_Entity_Arrow_Potion(World aWorld, double aX, double aY, double aZ) {
- super(aWorld, aX, aY, aZ);
- }
-
- public GT_Entity_Arrow_Potion(World aWorld, EntityLivingBase aEntity, float aSpeed) {
- super(aWorld, aEntity, aSpeed);
- }
-
- public void writeEntityToNBT(NBTTagCompound aNBT) {
- super.writeEntityToNBT(aNBT);
- aNBT.setIntArray("mPotions", this.mPotions);
- }
-
- public void readEntityFromNBT(NBTTagCompound aNBT) {
- super.readEntityFromNBT(aNBT);
- setPotions(aNBT.getIntArray("mPotions"));
- }
-
- public boolean breaksOnImpact() {
- return true;
- }
-
- public int[] getPotions() {
- return this.mPotions;
- }
-
- public void setPotions(int... aPotions) {
- if (aPotions != null) {
- this.mPotions = aPotions;
- }
- }
-
- public int[] onHitEntity(Entity aHitEntity, Entity aShootingEntity, ItemStack aArrow, int aRegularDamage, int aMagicDamage, int aKnockback, int aFireDamage, int aHitTimer) {
- if ((aHitEntity instanceof EntityLivingBase)) {
- for (int i = 3; i < this.mPotions.length; i += 4) {
- if (aHitEntity.worldObj.rand.nextInt(100) < this.mPotions[i]) {
- ((EntityLivingBase) aHitEntity).addPotionEffect(new PotionEffect(this.mPotions[(i - 3)], this.mPotions[(i - 2)], this.mPotions[(i - 1)], false));
- }
- }
- }
- return super.onHitEntity(aHitEntity, aShootingEntity, aArrow, 1, aMagicDamage, aKnockback, aFireDamage, aHitTimer);
- }
-}
+package gregtech.common.entities; + +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.potion.PotionEffect; +import net.minecraft.world.World; + +public class GT_Entity_Arrow_Potion + extends GT_Entity_Arrow { + private int[] mPotions = new int[0]; + + public GT_Entity_Arrow_Potion(World aWorld) { + super(aWorld); + } + + public GT_Entity_Arrow_Potion(World aWorld, double aX, double aY, double aZ) { + super(aWorld, aX, aY, aZ); + } + + public GT_Entity_Arrow_Potion(World aWorld, EntityLivingBase aEntity, float aSpeed) { + super(aWorld, aEntity, aSpeed); + } + + public void writeEntityToNBT(NBTTagCompound aNBT) { + super.writeEntityToNBT(aNBT); + aNBT.setIntArray("mPotions", this.mPotions); + } + + public void readEntityFromNBT(NBTTagCompound aNBT) { + super.readEntityFromNBT(aNBT); + setPotions(aNBT.getIntArray("mPotions")); + } + + public boolean breaksOnImpact() { + return true; + } + + public int[] getPotions() { + return this.mPotions; + } + + public void setPotions(int... aPotions) { + if (aPotions != null) { + this.mPotions = aPotions; + } + } + + public int[] onHitEntity(Entity aHitEntity, Entity aShootingEntity, ItemStack aArrow, int aRegularDamage, int aMagicDamage, int aKnockback, int aFireDamage, int aHitTimer) { + if ((aHitEntity instanceof EntityLivingBase)) { + for (int i = 3; i < this.mPotions.length; i += 4) { + if (aHitEntity.worldObj.rand.nextInt(100) < this.mPotions[i]) { + ((EntityLivingBase) aHitEntity).addPotionEffect(new PotionEffect(this.mPotions[(i - 3)], this.mPotions[(i - 2)], this.mPotions[(i - 1)], false)); + } + } + } + return super.onHitEntity(aHitEntity, aShootingEntity, aArrow, 1, aMagicDamage, aKnockback, aFireDamage, aHitTimer); + } +} diff --git a/src/main/java/gregtech/common/gui/GT_Container_Boiler.java b/src/main/java/gregtech/common/gui/GT_Container_Boiler.java index 758ccd8d83..70c4fc7b5b 100644 --- a/src/main/java/gregtech/common/gui/GT_Container_Boiler.java +++ b/src/main/java/gregtech/common/gui/GT_Container_Boiler.java @@ -1,83 +1,83 @@ -package gregtech.common.gui;
-
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import gregtech.api.gui.GT_ContainerMetaTile_Machine;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.common.tileentities.boilers.GT_MetaTileEntity_Boiler;
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.inventory.ICrafting;
-import net.minecraft.inventory.Slot;
-
-import java.util.Iterator;
-
-public class GT_Container_Boiler
- extends GT_ContainerMetaTile_Machine {
- private int mSteamCapacity = 0;//FB: UR - UR_UNINIT_READ_CALLED_FROM_SUPER_CONSTRUCTOR
- public int mWaterAmount = 0;
- public int mSteamAmount = 0;
- public int mProcessingEnergy = 0;
- public int mTemperature = 2;
- public GT_Container_Boiler(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, int aSteamCapacity) {
- super(aInventoryPlayer, aTileEntity);
- this.mSteamCapacity = aSteamCapacity;
- }
-
- public void addSlots(InventoryPlayer aInventoryPlayer) {
- addSlotToContainer(new Slot(this.mTileEntity, 2, 116, 62));
- addSlotToContainer(new Slot(this.mTileEntity, 0, 44, 26));
- addSlotToContainer(new Slot(this.mTileEntity, 1, 44, 62));
- addSlotToContainer(new Slot(this.mTileEntity, 3, 116, 26));
- }
-
- public int getSlotCount() {
- return 4;
- }
-
- public int getShiftClickSlotCount() {
- return 1;
- }
-
- public void detectAndSendChanges() {
- super.detectAndSendChanges();
- if ((this.mTileEntity.isClientSide()) || (this.mTileEntity.getMetaTileEntity() == null)) {
- return;
- }
- this.mTemperature = ((GT_MetaTileEntity_Boiler) this.mTileEntity.getMetaTileEntity()).mTemperature;
- this.mProcessingEnergy = ((GT_MetaTileEntity_Boiler) this.mTileEntity.getMetaTileEntity()).mProcessingEnergy;
- this.mSteamAmount = (((GT_MetaTileEntity_Boiler) this.mTileEntity.getMetaTileEntity()).mSteam == null ? 0 : ((GT_MetaTileEntity_Boiler) this.mTileEntity.getMetaTileEntity()).mSteam.amount);
- this.mWaterAmount = (((GT_MetaTileEntity_Boiler) this.mTileEntity.getMetaTileEntity()).mFluid == null ? 0 : ((GT_MetaTileEntity_Boiler) this.mTileEntity.getMetaTileEntity()).mFluid.amount);
-
- this.mTemperature = Math.min(54, Math.max(0, this.mTemperature * 54 / (((GT_MetaTileEntity_Boiler) this.mTileEntity.getMetaTileEntity()).maxProgresstime() - 10)));
- this.mSteamAmount = Math.min(54, Math.max(0, this.mSteamAmount * 54 / (this.mSteamCapacity - 100)));
- this.mWaterAmount = Math.min(54, Math.max(0, this.mWaterAmount * 54 / 15900));
- this.mProcessingEnergy = Math.min(14, Math.max(this.mProcessingEnergy > 0 ? 1 : 0, this.mProcessingEnergy * 14 / 1000));
-
- Iterator var2 = this.crafters.iterator();
- while (var2.hasNext()) {
- ICrafting var1 = (ICrafting) var2.next();
- var1.sendProgressBarUpdate(this, 100, this.mTemperature);
- var1.sendProgressBarUpdate(this, 101, this.mProcessingEnergy);
- var1.sendProgressBarUpdate(this, 102, this.mSteamAmount);
- var1.sendProgressBarUpdate(this, 103, this.mWaterAmount);
- }
- }
-
- @SideOnly(Side.CLIENT)
- public void updateProgressBar(int par1, int par2) {
- super.updateProgressBar(par1, par2);
- switch (par1) {
- case 100:
- this.mTemperature = par2;
- break;
- case 101:
- this.mProcessingEnergy = par2;
- break;
- case 102:
- this.mSteamAmount = par2;
- break;
- case 103:
- this.mWaterAmount = par2;
- }
- }
-}
+package gregtech.common.gui; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gregtech.api.gui.GT_ContainerMetaTile_Machine; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.common.tileentities.boilers.GT_MetaTileEntity_Boiler; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.ICrafting; +import net.minecraft.inventory.Slot; + +import java.util.Iterator; + +public class GT_Container_Boiler + extends GT_ContainerMetaTile_Machine { + private int mSteamCapacity = 0;//FB: UR - UR_UNINIT_READ_CALLED_FROM_SUPER_CONSTRUCTOR + public int mWaterAmount = 0; + public int mSteamAmount = 0; + public int mProcessingEnergy = 0; + public int mTemperature = 2; + public GT_Container_Boiler(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, int aSteamCapacity) { + super(aInventoryPlayer, aTileEntity); + this.mSteamCapacity = aSteamCapacity; + } + + public void addSlots(InventoryPlayer aInventoryPlayer) { + addSlotToContainer(new Slot(this.mTileEntity, 2, 116, 62)); + addSlotToContainer(new Slot(this.mTileEntity, 0, 44, 26)); + addSlotToContainer(new Slot(this.mTileEntity, 1, 44, 62)); + addSlotToContainer(new Slot(this.mTileEntity, 3, 116, 26)); + } + + public int getSlotCount() { + return 4; + } + + public int getShiftClickSlotCount() { + return 1; + } + + public void detectAndSendChanges() { + super.detectAndSendChanges(); + if ((this.mTileEntity.isClientSide()) || (this.mTileEntity.getMetaTileEntity() == null)) { + return; + } + this.mTemperature = ((GT_MetaTileEntity_Boiler) this.mTileEntity.getMetaTileEntity()).mTemperature; + this.mProcessingEnergy = ((GT_MetaTileEntity_Boiler) this.mTileEntity.getMetaTileEntity()).mProcessingEnergy; + this.mSteamAmount = (((GT_MetaTileEntity_Boiler) this.mTileEntity.getMetaTileEntity()).mSteam == null ? 0 : ((GT_MetaTileEntity_Boiler) this.mTileEntity.getMetaTileEntity()).mSteam.amount); + this.mWaterAmount = (((GT_MetaTileEntity_Boiler) this.mTileEntity.getMetaTileEntity()).mFluid == null ? 0 : ((GT_MetaTileEntity_Boiler) this.mTileEntity.getMetaTileEntity()).mFluid.amount); + + this.mTemperature = Math.min(54, Math.max(0, this.mTemperature * 54 / (((GT_MetaTileEntity_Boiler) this.mTileEntity.getMetaTileEntity()).maxProgresstime() - 10))); + this.mSteamAmount = Math.min(54, Math.max(0, this.mSteamAmount * 54 / (this.mSteamCapacity - 100))); + this.mWaterAmount = Math.min(54, Math.max(0, this.mWaterAmount * 54 / 15900)); + this.mProcessingEnergy = Math.min(14, Math.max(this.mProcessingEnergy > 0 ? 1 : 0, this.mProcessingEnergy * 14 / 1000)); + + Iterator var2 = this.crafters.iterator(); + while (var2.hasNext()) { + ICrafting var1 = (ICrafting) var2.next(); + var1.sendProgressBarUpdate(this, 100, this.mTemperature); + var1.sendProgressBarUpdate(this, 101, this.mProcessingEnergy); + var1.sendProgressBarUpdate(this, 102, this.mSteamAmount); + var1.sendProgressBarUpdate(this, 103, this.mWaterAmount); + } + } + + @SideOnly(Side.CLIENT) + public void updateProgressBar(int par1, int par2) { + super.updateProgressBar(par1, par2); + switch (par1) { + case 100: + this.mTemperature = par2; + break; + case 101: + this.mProcessingEnergy = par2; + break; + case 102: + this.mSteamAmount = par2; + break; + case 103: + this.mWaterAmount = par2; + } + } +} diff --git a/src/main/java/gregtech/common/gui/GT_Container_BronzeBlastFurnace.java b/src/main/java/gregtech/common/gui/GT_Container_BronzeBlastFurnace.java index 8050755b87..41e63a78ec 100644 --- a/src/main/java/gregtech/common/gui/GT_Container_BronzeBlastFurnace.java +++ b/src/main/java/gregtech/common/gui/GT_Container_BronzeBlastFurnace.java @@ -1,29 +1,29 @@ -package gregtech.common.gui;
-
-import gregtech.api.gui.GT_ContainerMetaTile_Machine;
-import gregtech.api.gui.GT_Slot_Output;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.inventory.Slot;
-
-public class GT_Container_BronzeBlastFurnace
- extends GT_ContainerMetaTile_Machine {
- public GT_Container_BronzeBlastFurnace(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) {
- super(aInventoryPlayer, aTileEntity);
- }
-
- public void addSlots(InventoryPlayer aInventoryPlayer) {
- addSlotToContainer(new Slot(this.mTileEntity, 0, 34, 16));
- addSlotToContainer(new Slot(this.mTileEntity, 1, 34, 34));
- addSlotToContainer(new GT_Slot_Output(this.mTileEntity, 2, 86, 25));
- addSlotToContainer(new GT_Slot_Output(this.mTileEntity, 3, 104, 25));
- }
-
- public int getSlotCount() {
- return 4;
- }
-
- public int getShiftClickSlotCount() {
- return 2;
- }
-}
+package gregtech.common.gui; + +import gregtech.api.gui.GT_ContainerMetaTile_Machine; +import gregtech.api.gui.GT_Slot_Output; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.Slot; + +public class GT_Container_BronzeBlastFurnace + extends GT_ContainerMetaTile_Machine { + public GT_Container_BronzeBlastFurnace(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) { + super(aInventoryPlayer, aTileEntity); + } + + public void addSlots(InventoryPlayer aInventoryPlayer) { + addSlotToContainer(new Slot(this.mTileEntity, 0, 34, 16)); + addSlotToContainer(new Slot(this.mTileEntity, 1, 34, 34)); + addSlotToContainer(new GT_Slot_Output(this.mTileEntity, 2, 86, 25)); + addSlotToContainer(new GT_Slot_Output(this.mTileEntity, 3, 104, 25)); + } + + public int getSlotCount() { + return 4; + } + + public int getShiftClickSlotCount() { + return 2; + } +} diff --git a/src/main/java/gregtech/common/gui/GT_Container_ChestBuffer.java b/src/main/java/gregtech/common/gui/GT_Container_ChestBuffer.java index 8cd6e9db54..12ee893de4 100644 --- a/src/main/java/gregtech/common/gui/GT_Container_ChestBuffer.java +++ b/src/main/java/gregtech/common/gui/GT_Container_ChestBuffer.java @@ -1,77 +1,77 @@ -package gregtech.common.gui;
-
-import gregtech.api.gui.GT_ContainerMetaTile_Machine;
-import gregtech.api.gui.GT_Slot_Holo;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.util.GT_Utility;
-import gregtech.common.tileentities.automation.GT_MetaTileEntity_ChestBuffer;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.inventory.Slot;
-import net.minecraft.item.ItemStack;
-
-public class GT_Container_ChestBuffer
- extends GT_ContainerMetaTile_Machine {
- public GT_Container_ChestBuffer(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) {
- super(aInventoryPlayer, aTileEntity);
- }
-
- public void addSlots(InventoryPlayer aInventoryPlayer) {
- for (int y = 0; y < 3; y++) {
- for (int x = 0; x < 9; x++) {
- addSlotToContainer(new Slot(this.mTileEntity, x + y * 9, 8 + x * 18, 5 + y * 18));
- }
- }
- addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 27, 8, 63, false, true, 1));
- addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 27, 26, 63, false, true, 1));
- addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 27, 44, 63, false, true, 1));
- }
-
- public ItemStack slotClick(int aSlotIndex, int aMouseclick, int aShifthold, EntityPlayer aPlayer) {
- if (aSlotIndex < 27) {
- return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer);
- }
- Slot tSlot = (Slot) this.inventorySlots.get(aSlotIndex);
- if (tSlot != null) {
- if (this.mTileEntity.getMetaTileEntity() == null) {
- return null;
- }
- if (aSlotIndex == 27) {
- ((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bOutput = (!((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bOutput);
- if (((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bOutput) {
- GT_Utility.sendChatToPlayer(aPlayer, "Emit Energy to Outputside");
- } else {
- GT_Utility.sendChatToPlayer(aPlayer, "Don't emit Energy");
- }
- return null;
- }
- if (aSlotIndex == 28) {
- ((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bRedstoneIfFull = (!((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bRedstoneIfFull);
- if (((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bRedstoneIfFull) {
- GT_Utility.sendChatToPlayer(aPlayer, "Emit Redstone if no Slot is free");
- } else {
- GT_Utility.sendChatToPlayer(aPlayer, "Don't emit Redstone");
- }
- return null;
- }
- if (aSlotIndex == 29) {
- ((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bInvert = (!((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bInvert);
- if (((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bInvert) {
- GT_Utility.sendChatToPlayer(aPlayer, "Invert Redstone");
- } else {
- GT_Utility.sendChatToPlayer(aPlayer, "Don't invert Redstone");
- }
- return null;
- }
- }
- return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer);
- }
-
- public int getSlotCount() {
- return 27;
- }
-
- public int getShiftClickSlotCount() {
- return 27;
- }
-}
+package gregtech.common.gui; + +import gregtech.api.gui.GT_ContainerMetaTile_Machine; +import gregtech.api.gui.GT_Slot_Holo; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.util.GT_Utility; +import gregtech.common.tileentities.automation.GT_MetaTileEntity_ChestBuffer; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.Slot; +import net.minecraft.item.ItemStack; + +public class GT_Container_ChestBuffer + extends GT_ContainerMetaTile_Machine { + public GT_Container_ChestBuffer(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) { + super(aInventoryPlayer, aTileEntity); + } + + public void addSlots(InventoryPlayer aInventoryPlayer) { + for (int y = 0; y < 3; y++) { + for (int x = 0; x < 9; x++) { + addSlotToContainer(new Slot(this.mTileEntity, x + y * 9, 8 + x * 18, 5 + y * 18)); + } + } + addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 27, 8, 63, false, true, 1)); + addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 27, 26, 63, false, true, 1)); + addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 27, 44, 63, false, true, 1)); + } + + public ItemStack slotClick(int aSlotIndex, int aMouseclick, int aShifthold, EntityPlayer aPlayer) { + if (aSlotIndex < 27) { + return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer); + } + Slot tSlot = (Slot) this.inventorySlots.get(aSlotIndex); + if (tSlot != null) { + if (this.mTileEntity.getMetaTileEntity() == null) { + return null; + } + if (aSlotIndex == 27) { + ((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bOutput = (!((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bOutput); + if (((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bOutput) { + GT_Utility.sendChatToPlayer(aPlayer, "Emit Energy to Outputside"); + } else { + GT_Utility.sendChatToPlayer(aPlayer, "Don't emit Energy"); + } + return null; + } + if (aSlotIndex == 28) { + ((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bRedstoneIfFull = (!((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bRedstoneIfFull); + if (((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bRedstoneIfFull) { + GT_Utility.sendChatToPlayer(aPlayer, "Emit Redstone if no Slot is free"); + } else { + GT_Utility.sendChatToPlayer(aPlayer, "Don't emit Redstone"); + } + return null; + } + if (aSlotIndex == 29) { + ((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bInvert = (!((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bInvert); + if (((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bInvert) { + GT_Utility.sendChatToPlayer(aPlayer, "Invert Redstone"); + } else { + GT_Utility.sendChatToPlayer(aPlayer, "Don't invert Redstone"); + } + return null; + } + } + return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer); + } + + public int getSlotCount() { + return 27; + } + + public int getShiftClickSlotCount() { + return 27; + } +} diff --git a/src/main/java/gregtech/common/gui/GT_Container_Filter.java b/src/main/java/gregtech/common/gui/GT_Container_Filter.java index 2c2e4e8c13..0355aa1753 100644 --- a/src/main/java/gregtech/common/gui/GT_Container_Filter.java +++ b/src/main/java/gregtech/common/gui/GT_Container_Filter.java @@ -1,128 +1,127 @@ -package gregtech.common.gui;
-
-import gregtech.api.gui.GT_ContainerMetaTile_Machine;
-import gregtech.api.gui.GT_Slot_Holo;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.util.GT_ModHandler;
-import gregtech.api.util.GT_Utility;
-import gregtech.common.tileentities.automation.GT_MetaTileEntity_Filter;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.inventory.Slot;
-import net.minecraft.item.ItemStack;
-
-public class GT_Container_Filter
- extends GT_ContainerMetaTile_Machine {
- public GT_Container_Filter(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) {
- super(aInventoryPlayer, aTileEntity);
- }
-
- public void addSlots(InventoryPlayer aInventoryPlayer) {
- addSlotToContainer(new Slot(this.mTileEntity, 0, 98, 5));
- addSlotToContainer(new Slot(this.mTileEntity, 1, 116, 5));
- addSlotToContainer(new Slot(this.mTileEntity, 2, 134, 5));
- addSlotToContainer(new Slot(this.mTileEntity, 3, 98, 23));
- addSlotToContainer(new Slot(this.mTileEntity, 4, 116, 23));
- addSlotToContainer(new Slot(this.mTileEntity, 5, 134, 23));
- addSlotToContainer(new Slot(this.mTileEntity, 6, 98, 41));
- addSlotToContainer(new Slot(this.mTileEntity, 7, 116, 41));
- addSlotToContainer(new Slot(this.mTileEntity, 8, 134, 41));
-
- addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 9, 18, 6, false, true, 1));
- addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 10, 35, 6, false, true, 1));
- addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 11, 52, 6, false, true, 1));
- addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 12, 18, 23, false, true, 1));
- addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 13, 35, 23, false, true, 1));
- addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 14, 52, 23, false, true, 1));
- addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 15, 18, 40, false, true, 1));
- addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 16, 35, 40, false, true, 1));
- addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 17, 52, 40, false, true, 1));
-
- addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 18, 8, 63, false, true, 1));
- addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 18, 26, 63, false, true, 1));
- addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 18, 44, 63, false, true, 1));
- addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 18, 62, 63, false, true, 1));
- addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 18, 80, 63, false, true, 1));
- }
-
- public ItemStack slotClick(int aSlotIndex, int aMouseclick, int aShifthold, EntityPlayer aPlayer) {
- if (aSlotIndex < 9) {
- return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer);
- }
- Slot tSlot = (Slot) this.inventorySlots.get(aSlotIndex);
- if (tSlot != null) {
- if (this.mTileEntity.getMetaTileEntity() == null) {
- return null;
- }
- if (aSlotIndex < 18) {
- ItemStack tStack = aPlayer.inventory.getItemStack();
- if (tStack == null) {
- tStack = tSlot.getStack();
- if (aMouseclick == 0) {
- tSlot.putStack(null);
- } else if (tStack != null) {
- tStack = GT_Utility.copyAmountAndMetaData(tStack.stackSize, 32767, tStack);
- if(GT_Utility.isStackInvalid(tStack)){tStack=null;}
- }
- } else {
- tSlot.putStack(GT_Utility.copyAmount(1L, new Object[]{tStack}));
- }
- return null;
- }
- if (aSlotIndex == 18) {
- ((GT_MetaTileEntity_Filter) this.mTileEntity.getMetaTileEntity()).bOutput = (!((GT_MetaTileEntity_Filter) this.mTileEntity.getMetaTileEntity()).bOutput);
- if (((GT_MetaTileEntity_Filter) this.mTileEntity.getMetaTileEntity()).bOutput) {
- GT_Utility.sendChatToPlayer(aPlayer, "Emit Energy to Outputside");
- } else {
- GT_Utility.sendChatToPlayer(aPlayer, "Don't emit Energy");
- }
- return null;
- }
- if (aSlotIndex == 19) {
- ((GT_MetaTileEntity_Filter) this.mTileEntity.getMetaTileEntity()).bRedstoneIfFull = (!((GT_MetaTileEntity_Filter) this.mTileEntity.getMetaTileEntity()).bRedstoneIfFull);
- if (((GT_MetaTileEntity_Filter) this.mTileEntity.getMetaTileEntity()).bRedstoneIfFull) {
- GT_Utility.sendChatToPlayer(aPlayer, "Emit Redstone if slots contain something");
- } else {
- GT_Utility.sendChatToPlayer(aPlayer, "Don't emit Redstone");
- }
- return null;
- }
- if (aSlotIndex == 20) {
- ((GT_MetaTileEntity_Filter) this.mTileEntity.getMetaTileEntity()).bInvert = (!((GT_MetaTileEntity_Filter) this.mTileEntity.getMetaTileEntity()).bInvert);
- if (((GT_MetaTileEntity_Filter) this.mTileEntity.getMetaTileEntity()).bInvert) {
- GT_Utility.sendChatToPlayer(aPlayer, "Invert Redstone");
- } else {
- GT_Utility.sendChatToPlayer(aPlayer, "Don't invert Redstone");
- }
- return null;
- }
- if (aSlotIndex == 21) {
- ((GT_MetaTileEntity_Filter) this.mTileEntity.getMetaTileEntity()).bInvertFilter = (!((GT_MetaTileEntity_Filter) this.mTileEntity.getMetaTileEntity()).bInvertFilter);
- if (((GT_MetaTileEntity_Filter) this.mTileEntity.getMetaTileEntity()).bInvertFilter) {
- GT_Utility.sendChatToPlayer(aPlayer, "Invert Filter");
- } else {
- GT_Utility.sendChatToPlayer(aPlayer, "Don't invert Filter");
- }
- return null;
- }
- if (aSlotIndex == 22) {
- ((GT_MetaTileEntity_Filter) this.mTileEntity.getMetaTileEntity()).bIgnoreNBT = (!((GT_MetaTileEntity_Filter) this.mTileEntity.getMetaTileEntity()).bIgnoreNBT);
- if (((GT_MetaTileEntity_Filter) this.mTileEntity.getMetaTileEntity()).bIgnoreNBT) {
- GT_Utility.sendChatToPlayer(aPlayer, "Ignore NBT");
- } else {
- GT_Utility.sendChatToPlayer(aPlayer, "NBT has to match");
- }
- return null;
- }
- }
- return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer);
- }
-
- public int getSlotCount() {
- return 9;
- }
-
- public int getShiftClickSlotCount() {
- return 9;
- }
-}
+package gregtech.common.gui; + +import gregtech.api.gui.GT_ContainerMetaTile_Machine; +import gregtech.api.gui.GT_Slot_Holo; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.util.GT_Utility; +import gregtech.common.tileentities.automation.GT_MetaTileEntity_Filter; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.Slot; +import net.minecraft.item.ItemStack; + +public class GT_Container_Filter + extends GT_ContainerMetaTile_Machine { + public GT_Container_Filter(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) { + super(aInventoryPlayer, aTileEntity); + } + + public void addSlots(InventoryPlayer aInventoryPlayer) { + addSlotToContainer(new Slot(this.mTileEntity, 0, 98, 5)); + addSlotToContainer(new Slot(this.mTileEntity, 1, 116, 5)); + addSlotToContainer(new Slot(this.mTileEntity, 2, 134, 5)); + addSlotToContainer(new Slot(this.mTileEntity, 3, 98, 23)); + addSlotToContainer(new Slot(this.mTileEntity, 4, 116, 23)); + addSlotToContainer(new Slot(this.mTileEntity, 5, 134, 23)); + addSlotToContainer(new Slot(this.mTileEntity, 6, 98, 41)); + addSlotToContainer(new Slot(this.mTileEntity, 7, 116, 41)); + addSlotToContainer(new Slot(this.mTileEntity, 8, 134, 41)); + + addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 9, 18, 6, false, true, 1)); + addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 10, 35, 6, false, true, 1)); + addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 11, 52, 6, false, true, 1)); + addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 12, 18, 23, false, true, 1)); + addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 13, 35, 23, false, true, 1)); + addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 14, 52, 23, false, true, 1)); + addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 15, 18, 40, false, true, 1)); + addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 16, 35, 40, false, true, 1)); + addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 17, 52, 40, false, true, 1)); + + addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 18, 8, 63, false, true, 1)); + addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 18, 26, 63, false, true, 1)); + addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 18, 44, 63, false, true, 1)); + addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 18, 62, 63, false, true, 1)); + addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 18, 80, 63, false, true, 1)); + } + + public ItemStack slotClick(int aSlotIndex, int aMouseclick, int aShifthold, EntityPlayer aPlayer) { + if (aSlotIndex < 9) { + return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer); + } + Slot tSlot = (Slot) this.inventorySlots.get(aSlotIndex); + if (tSlot != null) { + if (this.mTileEntity.getMetaTileEntity() == null) { + return null; + } + if (aSlotIndex < 18) { + ItemStack tStack = aPlayer.inventory.getItemStack(); + if (tStack == null) { + tStack = tSlot.getStack(); + if (aMouseclick == 0) { + tSlot.putStack(null); + } else if (tStack != null) { + tStack = GT_Utility.copyAmountAndMetaData(tStack.stackSize, 32767, tStack); + if(GT_Utility.isStackInvalid(tStack)){tStack=null;} + } + } else { + tSlot.putStack(GT_Utility.copyAmount(1L, new Object[]{tStack})); + } + return null; + } + if (aSlotIndex == 18) { + ((GT_MetaTileEntity_Filter) this.mTileEntity.getMetaTileEntity()).bOutput = (!((GT_MetaTileEntity_Filter) this.mTileEntity.getMetaTileEntity()).bOutput); + if (((GT_MetaTileEntity_Filter) this.mTileEntity.getMetaTileEntity()).bOutput) { + GT_Utility.sendChatToPlayer(aPlayer, "Emit Energy to Outputside"); + } else { + GT_Utility.sendChatToPlayer(aPlayer, "Don't emit Energy"); + } + return null; + } + if (aSlotIndex == 19) { + ((GT_MetaTileEntity_Filter) this.mTileEntity.getMetaTileEntity()).bRedstoneIfFull = (!((GT_MetaTileEntity_Filter) this.mTileEntity.getMetaTileEntity()).bRedstoneIfFull); + if (((GT_MetaTileEntity_Filter) this.mTileEntity.getMetaTileEntity()).bRedstoneIfFull) { + GT_Utility.sendChatToPlayer(aPlayer, "Emit Redstone if slots contain something"); + } else { + GT_Utility.sendChatToPlayer(aPlayer, "Don't emit Redstone"); + } + return null; + } + if (aSlotIndex == 20) { + ((GT_MetaTileEntity_Filter) this.mTileEntity.getMetaTileEntity()).bInvert = (!((GT_MetaTileEntity_Filter) this.mTileEntity.getMetaTileEntity()).bInvert); + if (((GT_MetaTileEntity_Filter) this.mTileEntity.getMetaTileEntity()).bInvert) { + GT_Utility.sendChatToPlayer(aPlayer, "Invert Redstone"); + } else { + GT_Utility.sendChatToPlayer(aPlayer, "Don't invert Redstone"); + } + return null; + } + if (aSlotIndex == 21) { + ((GT_MetaTileEntity_Filter) this.mTileEntity.getMetaTileEntity()).bInvertFilter = (!((GT_MetaTileEntity_Filter) this.mTileEntity.getMetaTileEntity()).bInvertFilter); + if (((GT_MetaTileEntity_Filter) this.mTileEntity.getMetaTileEntity()).bInvertFilter) { + GT_Utility.sendChatToPlayer(aPlayer, "Invert Filter"); + } else { + GT_Utility.sendChatToPlayer(aPlayer, "Don't invert Filter"); + } + return null; + } + if (aSlotIndex == 22) { + ((GT_MetaTileEntity_Filter) this.mTileEntity.getMetaTileEntity()).bIgnoreNBT = (!((GT_MetaTileEntity_Filter) this.mTileEntity.getMetaTileEntity()).bIgnoreNBT); + if (((GT_MetaTileEntity_Filter) this.mTileEntity.getMetaTileEntity()).bIgnoreNBT) { + GT_Utility.sendChatToPlayer(aPlayer, "Ignore NBT"); + } else { + GT_Utility.sendChatToPlayer(aPlayer, "NBT has to match"); + } + return null; + } + } + return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer); + } + + public int getSlotCount() { + return 9; + } + + public int getShiftClickSlotCount() { + return 9; + } +} diff --git a/src/main/java/gregtech/common/gui/GT_Container_SuperBuffer.java b/src/main/java/gregtech/common/gui/GT_Container_SuperBuffer.java index 46d011dcb6..8380baacf0 100644 --- a/src/main/java/gregtech/common/gui/GT_Container_SuperBuffer.java +++ b/src/main/java/gregtech/common/gui/GT_Container_SuperBuffer.java @@ -1,72 +1,72 @@ -package gregtech.common.gui;
-
-import gregtech.api.gui.GT_ContainerMetaTile_Machine;
-import gregtech.api.gui.GT_Slot_Holo;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.util.GT_Utility;
-import gregtech.common.tileentities.automation.GT_MetaTileEntity_ChestBuffer;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.inventory.Slot;
-import net.minecraft.item.ItemStack;
-
-public class GT_Container_SuperBuffer
- extends GT_ContainerMetaTile_Machine {
- public GT_Container_SuperBuffer(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) {
- super(aInventoryPlayer, aTileEntity);
- }
-
- public void addSlots(InventoryPlayer aInventoryPlayer) {
- addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 256, 8, 63, false, true, 1));
- addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 256, 26, 63, false, true, 1));
- addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 256, 44, 63, false, true, 1));
- }
-
- public ItemStack slotClick(int aSlotIndex, int aMouseclick, int aShifthold, EntityPlayer aPlayer) {
- if (aSlotIndex < 0) {
- return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer);
- }
- Slot tSlot = (Slot) this.inventorySlots.get(aSlotIndex);
- if (tSlot != null) {
- if (this.mTileEntity.getMetaTileEntity() == null) {
- return null;
- }
- if (aSlotIndex == 0) {
- ((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bOutput = (!((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bOutput);
- if (((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bOutput) {
- GT_Utility.sendChatToPlayer(aPlayer, "Emit Energy to Outputside");
- } else {
- GT_Utility.sendChatToPlayer(aPlayer, "Don't emit Energy");
- }
- return null;
- }
- if (aSlotIndex == 1) {
- ((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bRedstoneIfFull = (!((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bRedstoneIfFull);
- if (((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bRedstoneIfFull) {
- GT_Utility.sendChatToPlayer(aPlayer, "Emit Redstone if no Slot is free");
- } else {
- GT_Utility.sendChatToPlayer(aPlayer, "Don't emit Redstone");
- }
- return null;
- }
- if (aSlotIndex == 2) {
- ((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bInvert = (!((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bInvert);
- if (((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bInvert) {
- GT_Utility.sendChatToPlayer(aPlayer, "Invert Redstone");
- } else {
- GT_Utility.sendChatToPlayer(aPlayer, "Don't invert Redstone");
- }
- return null;
- }
- }
- return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer);
- }
-
- public int getSlotCount() {
- return 0;
- }
-
- public int getShiftClickSlotCount() {
- return 0;
- }
-}
+package gregtech.common.gui; + +import gregtech.api.gui.GT_ContainerMetaTile_Machine; +import gregtech.api.gui.GT_Slot_Holo; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.util.GT_Utility; +import gregtech.common.tileentities.automation.GT_MetaTileEntity_ChestBuffer; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.Slot; +import net.minecraft.item.ItemStack; + +public class GT_Container_SuperBuffer + extends GT_ContainerMetaTile_Machine { + public GT_Container_SuperBuffer(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) { + super(aInventoryPlayer, aTileEntity); + } + + public void addSlots(InventoryPlayer aInventoryPlayer) { + addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 256, 8, 63, false, true, 1)); + addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 256, 26, 63, false, true, 1)); + addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 256, 44, 63, false, true, 1)); + } + + public ItemStack slotClick(int aSlotIndex, int aMouseclick, int aShifthold, EntityPlayer aPlayer) { + if (aSlotIndex < 0) { + return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer); + } + Slot tSlot = (Slot) this.inventorySlots.get(aSlotIndex); + if (tSlot != null) { + if (this.mTileEntity.getMetaTileEntity() == null) { + return null; + } + if (aSlotIndex == 0) { + ((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bOutput = (!((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bOutput); + if (((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bOutput) { + GT_Utility.sendChatToPlayer(aPlayer, "Emit Energy to Outputside"); + } else { + GT_Utility.sendChatToPlayer(aPlayer, "Don't emit Energy"); + } + return null; + } + if (aSlotIndex == 1) { + ((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bRedstoneIfFull = (!((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bRedstoneIfFull); + if (((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bRedstoneIfFull) { + GT_Utility.sendChatToPlayer(aPlayer, "Emit Redstone if no Slot is free"); + } else { + GT_Utility.sendChatToPlayer(aPlayer, "Don't emit Redstone"); + } + return null; + } + if (aSlotIndex == 2) { + ((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bInvert = (!((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bInvert); + if (((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bInvert) { + GT_Utility.sendChatToPlayer(aPlayer, "Invert Redstone"); + } else { + GT_Utility.sendChatToPlayer(aPlayer, "Don't invert Redstone"); + } + return null; + } + } + return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer); + } + + public int getSlotCount() { + return 0; + } + + public int getShiftClickSlotCount() { + return 0; + } +} diff --git a/src/main/java/gregtech/common/gui/GT_Container_TypeFilter.java b/src/main/java/gregtech/common/gui/GT_Container_TypeFilter.java index d492ee2336..2f21b7b98a 100644 --- a/src/main/java/gregtech/common/gui/GT_Container_TypeFilter.java +++ b/src/main/java/gregtech/common/gui/GT_Container_TypeFilter.java @@ -1,109 +1,109 @@ -package gregtech.common.gui;
-
-import gregtech.api.gui.GT_ContainerMetaTile_Machine;
-import gregtech.api.gui.GT_Slot_Holo;
-import gregtech.api.gui.GT_Slot_Render;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.util.GT_Utility;
-import gregtech.common.tileentities.automation.GT_MetaTileEntity_TypeFilter;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.inventory.Slot;
-import net.minecraft.item.ItemStack;
-
-public class GT_Container_TypeFilter
- extends GT_ContainerMetaTile_Machine {
- public GT_Container_TypeFilter(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) {
- super(aInventoryPlayer, aTileEntity);
- }
-
- public void addSlots(InventoryPlayer aInventoryPlayer) {
- addSlotToContainer(new Slot(this.mTileEntity, 0, 98, 5));
- addSlotToContainer(new Slot(this.mTileEntity, 1, 116, 5));
- addSlotToContainer(new Slot(this.mTileEntity, 2, 134, 5));
- addSlotToContainer(new Slot(this.mTileEntity, 3, 98, 23));
- addSlotToContainer(new Slot(this.mTileEntity, 4, 116, 23));
- addSlotToContainer(new Slot(this.mTileEntity, 5, 134, 23));
- addSlotToContainer(new Slot(this.mTileEntity, 6, 98, 41));
- addSlotToContainer(new Slot(this.mTileEntity, 7, 116, 41));
- addSlotToContainer(new Slot(this.mTileEntity, 8, 134, 41));
-
- addSlotToContainer(new GT_Slot_Render(this.mTileEntity, 9, 35, 23));
-
- addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 10, 8, 63, false, true, 1));
- addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 10, 26, 63, false, true, 1));
- addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 10, 44, 63, false, true, 1));
- addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 10, 62, 63, false, true, 1));
- addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 10, 80, 63, false, true, 1));
- }
-
- public ItemStack slotClick(int aSlotIndex, int aMouseclick, int aShifthold, EntityPlayer aPlayer) {
- if (aSlotIndex < 9) {
- return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer);
- }
- Slot tSlot = (Slot) this.inventorySlots.get(aSlotIndex);
- if (tSlot != null) {
- if (this.mTileEntity.getMetaTileEntity() == null) {
- return null;
- }
- if (aSlotIndex == 9) {
- ((GT_MetaTileEntity_TypeFilter) this.mTileEntity.getMetaTileEntity()).clickTypeIcon(aMouseclick != 0);
- return null;
- }
- if (aSlotIndex == 10) {
- ((GT_MetaTileEntity_TypeFilter) this.mTileEntity.getMetaTileEntity()).bOutput = (!((GT_MetaTileEntity_TypeFilter) this.mTileEntity.getMetaTileEntity()).bOutput);
- if (((GT_MetaTileEntity_TypeFilter) this.mTileEntity.getMetaTileEntity()).bOutput) {
- GT_Utility.sendChatToPlayer(aPlayer, "Emit Energy to Outputside");
- } else {
- GT_Utility.sendChatToPlayer(aPlayer, "Don't emit Energy");
- }
- return null;
- }
- if (aSlotIndex == 11) {
- ((GT_MetaTileEntity_TypeFilter) this.mTileEntity.getMetaTileEntity()).bRedstoneIfFull = (!((GT_MetaTileEntity_TypeFilter) this.mTileEntity.getMetaTileEntity()).bRedstoneIfFull);
- if (((GT_MetaTileEntity_TypeFilter) this.mTileEntity.getMetaTileEntity()).bRedstoneIfFull) {
- GT_Utility.sendChatToPlayer(aPlayer, "Emit Redstone if slots contain something");
- } else {
- GT_Utility.sendChatToPlayer(aPlayer, "Don't emit Redstone");
- }
- return null;
- }
- if (aSlotIndex == 12) {
- ((GT_MetaTileEntity_TypeFilter) this.mTileEntity.getMetaTileEntity()).bInvert = (!((GT_MetaTileEntity_TypeFilter) this.mTileEntity.getMetaTileEntity()).bInvert);
- if (((GT_MetaTileEntity_TypeFilter) this.mTileEntity.getMetaTileEntity()).bInvert) {
- GT_Utility.sendChatToPlayer(aPlayer, "Invert Redstone");
- } else {
- GT_Utility.sendChatToPlayer(aPlayer, "Don't invert Redstone");
- }
- return null;
- }
- if (aSlotIndex == 13) {
- ((GT_MetaTileEntity_TypeFilter) this.mTileEntity.getMetaTileEntity()).bInvertFilter = (!((GT_MetaTileEntity_TypeFilter) this.mTileEntity.getMetaTileEntity()).bInvertFilter);
- if (((GT_MetaTileEntity_TypeFilter) this.mTileEntity.getMetaTileEntity()).bInvertFilter) {
- GT_Utility.sendChatToPlayer(aPlayer, "Invert Filter");
- } else {
- GT_Utility.sendChatToPlayer(aPlayer, "Don't invert Filter");
- }
- return null;
- }
- if (aSlotIndex == 14) {
- ((GT_MetaTileEntity_TypeFilter) this.mTileEntity.getMetaTileEntity()).bNBTAllowed = (!((GT_MetaTileEntity_TypeFilter) this.mTileEntity.getMetaTileEntity()).bNBTAllowed);
- if (((GT_MetaTileEntity_TypeFilter) this.mTileEntity.getMetaTileEntity()).bNBTAllowed) {
- GT_Utility.sendChatToPlayer(aPlayer, "Allow Items with NBT");
- } else {
- GT_Utility.sendChatToPlayer(aPlayer, "Don't allow Items with NBT");
- }
- return null;
- }
- }
- return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer);
- }
-
- public int getSlotCount() {
- return 9;
- }
-
- public int getShiftClickSlotCount() {
- return 9;
- }
-}
+package gregtech.common.gui; + +import gregtech.api.gui.GT_ContainerMetaTile_Machine; +import gregtech.api.gui.GT_Slot_Holo; +import gregtech.api.gui.GT_Slot_Render; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.util.GT_Utility; +import gregtech.common.tileentities.automation.GT_MetaTileEntity_TypeFilter; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.Slot; +import net.minecraft.item.ItemStack; + +public class GT_Container_TypeFilter + extends GT_ContainerMetaTile_Machine { + public GT_Container_TypeFilter(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) { + super(aInventoryPlayer, aTileEntity); + } + + public void addSlots(InventoryPlayer aInventoryPlayer) { + addSlotToContainer(new Slot(this.mTileEntity, 0, 98, 5)); + addSlotToContainer(new Slot(this.mTileEntity, 1, 116, 5)); + addSlotToContainer(new Slot(this.mTileEntity, 2, 134, 5)); + addSlotToContainer(new Slot(this.mTileEntity, 3, 98, 23)); + addSlotToContainer(new Slot(this.mTileEntity, 4, 116, 23)); + addSlotToContainer(new Slot(this.mTileEntity, 5, 134, 23)); + addSlotToContainer(new Slot(this.mTileEntity, 6, 98, 41)); + addSlotToContainer(new Slot(this.mTileEntity, 7, 116, 41)); + addSlotToContainer(new Slot(this.mTileEntity, 8, 134, 41)); + + addSlotToContainer(new GT_Slot_Render(this.mTileEntity, 9, 35, 23)); + + addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 10, 8, 63, false, true, 1)); + addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 10, 26, 63, false, true, 1)); + addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 10, 44, 63, false, true, 1)); + addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 10, 62, 63, false, true, 1)); + addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 10, 80, 63, false, true, 1)); + } + + public ItemStack slotClick(int aSlotIndex, int aMouseclick, int aShifthold, EntityPlayer aPlayer) { + if (aSlotIndex < 9) { + return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer); + } + Slot tSlot = (Slot) this.inventorySlots.get(aSlotIndex); + if (tSlot != null) { + if (this.mTileEntity.getMetaTileEntity() == null) { + return null; + } + if (aSlotIndex == 9) { + ((GT_MetaTileEntity_TypeFilter) this.mTileEntity.getMetaTileEntity()).clickTypeIcon(aMouseclick != 0); + return null; + } + if (aSlotIndex == 10) { + ((GT_MetaTileEntity_TypeFilter) this.mTileEntity.getMetaTileEntity()).bOutput = (!((GT_MetaTileEntity_TypeFilter) this.mTileEntity.getMetaTileEntity()).bOutput); + if (((GT_MetaTileEntity_TypeFilter) this.mTileEntity.getMetaTileEntity()).bOutput) { + GT_Utility.sendChatToPlayer(aPlayer, "Emit Energy to Outputside"); + } else { + GT_Utility.sendChatToPlayer(aPlayer, "Don't emit Energy"); + } + return null; + } + if (aSlotIndex == 11) { + ((GT_MetaTileEntity_TypeFilter) this.mTileEntity.getMetaTileEntity()).bRedstoneIfFull = (!((GT_MetaTileEntity_TypeFilter) this.mTileEntity.getMetaTileEntity()).bRedstoneIfFull); + if (((GT_MetaTileEntity_TypeFilter) this.mTileEntity.getMetaTileEntity()).bRedstoneIfFull) { + GT_Utility.sendChatToPlayer(aPlayer, "Emit Redstone if slots contain something"); + } else { + GT_Utility.sendChatToPlayer(aPlayer, "Don't emit Redstone"); + } + return null; + } + if (aSlotIndex == 12) { + ((GT_MetaTileEntity_TypeFilter) this.mTileEntity.getMetaTileEntity()).bInvert = (!((GT_MetaTileEntity_TypeFilter) this.mTileEntity.getMetaTileEntity()).bInvert); + if (((GT_MetaTileEntity_TypeFilter) this.mTileEntity.getMetaTileEntity()).bInvert) { + GT_Utility.sendChatToPlayer(aPlayer, "Invert Redstone"); + } else { + GT_Utility.sendChatToPlayer(aPlayer, "Don't invert Redstone"); + } + return null; + } + if (aSlotIndex == 13) { + ((GT_MetaTileEntity_TypeFilter) this.mTileEntity.getMetaTileEntity()).bInvertFilter = (!((GT_MetaTileEntity_TypeFilter) this.mTileEntity.getMetaTileEntity()).bInvertFilter); + if (((GT_MetaTileEntity_TypeFilter) this.mTileEntity.getMetaTileEntity()).bInvertFilter) { + GT_Utility.sendChatToPlayer(aPlayer, "Invert Filter"); + } else { + GT_Utility.sendChatToPlayer(aPlayer, "Don't invert Filter"); + } + return null; + } + if (aSlotIndex == 14) { + ((GT_MetaTileEntity_TypeFilter) this.mTileEntity.getMetaTileEntity()).bNBTAllowed = (!((GT_MetaTileEntity_TypeFilter) this.mTileEntity.getMetaTileEntity()).bNBTAllowed); + if (((GT_MetaTileEntity_TypeFilter) this.mTileEntity.getMetaTileEntity()).bNBTAllowed) { + GT_Utility.sendChatToPlayer(aPlayer, "Allow Items with NBT"); + } else { + GT_Utility.sendChatToPlayer(aPlayer, "Don't allow Items with NBT"); + } + return null; + } + } + return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer); + } + + public int getSlotCount() { + return 9; + } + + public int getShiftClickSlotCount() { + return 9; + } +} diff --git a/src/main/java/gregtech/common/gui/GT_GUIContainer_Boiler.java b/src/main/java/gregtech/common/gui/GT_GUIContainer_Boiler.java index 18ad938d81..459fc32388 100644 --- a/src/main/java/gregtech/common/gui/GT_GUIContainer_Boiler.java +++ b/src/main/java/gregtech/common/gui/GT_GUIContainer_Boiler.java @@ -1,41 +1,41 @@ -package gregtech.common.gui;
-
-import gregtech.api.gui.GT_GUIContainerMetaTile_Machine;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import net.minecraft.entity.player.InventoryPlayer;
-
-public class GT_GUIContainer_Boiler
- extends GT_GUIContainerMetaTile_Machine {
- public GT_GUIContainer_Boiler(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aTextureName, int aSteamCapacity) {
- super(new GT_Container_Boiler(aInventoryPlayer, aTileEntity, aSteamCapacity), "gregtech:textures/gui/" + aTextureName);
- }
-
- protected void drawGuiContainerForegroundLayer(int par1, int par2) {
- this.fontRendererObj.drawString("Boiler", 8, 4, 4210752);
- }
-
- protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) {
- super.drawGuiContainerBackgroundLayer(par1, par2, par3);
- int x = (this.width - this.xSize) / 2;
- int y = (this.height - this.ySize) / 2;
- drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize);
- if (this.mContainer != null) {
- int tScale = ((GT_Container_Boiler) this.mContainer).mSteamAmount;
- if (tScale > 0) {
- drawTexturedModalRect(x + 70, y + 25 + 54 - tScale, 194, 54 - tScale, 10, tScale);
- }
- tScale = ((GT_Container_Boiler) this.mContainer).mWaterAmount;
- if (tScale > 0) {
- drawTexturedModalRect(x + 83, y + 25 + 54 - tScale, 204, 54 - tScale, 10, tScale);
- }
- tScale = ((GT_Container_Boiler) this.mContainer).mTemperature;
- if (tScale > 0) {
- drawTexturedModalRect(x + 96, y + 25 + 54 - tScale, 214, 54 - tScale, 10, tScale);
- }
- tScale = ((GT_Container_Boiler) this.mContainer).mProcessingEnergy;
- if (tScale > 0) {
- drawTexturedModalRect(x + 117, y + 44 + 14 - tScale, 177, 14 - tScale, 15, tScale + 1);
- }
- }
- }
-}
+package gregtech.common.gui; + +import gregtech.api.gui.GT_GUIContainerMetaTile_Machine; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import net.minecraft.entity.player.InventoryPlayer; + +public class GT_GUIContainer_Boiler + extends GT_GUIContainerMetaTile_Machine { + public GT_GUIContainer_Boiler(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aTextureName, int aSteamCapacity) { + super(new GT_Container_Boiler(aInventoryPlayer, aTileEntity, aSteamCapacity), "gregtech:textures/gui/" + aTextureName); + } + + protected void drawGuiContainerForegroundLayer(int par1, int par2) { + this.fontRendererObj.drawString("Boiler", 8, 4, 4210752); + } + + protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) { + super.drawGuiContainerBackgroundLayer(par1, par2, par3); + int x = (this.width - this.xSize) / 2; + int y = (this.height - this.ySize) / 2; + drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize); + if (this.mContainer != null) { + int tScale = ((GT_Container_Boiler) this.mContainer).mSteamAmount; + if (tScale > 0) { + drawTexturedModalRect(x + 70, y + 25 + 54 - tScale, 194, 54 - tScale, 10, tScale); + } + tScale = ((GT_Container_Boiler) this.mContainer).mWaterAmount; + if (tScale > 0) { + drawTexturedModalRect(x + 83, y + 25 + 54 - tScale, 204, 54 - tScale, 10, tScale); + } + tScale = ((GT_Container_Boiler) this.mContainer).mTemperature; + if (tScale > 0) { + drawTexturedModalRect(x + 96, y + 25 + 54 - tScale, 214, 54 - tScale, 10, tScale); + } + tScale = ((GT_Container_Boiler) this.mContainer).mProcessingEnergy; + if (tScale > 0) { + drawTexturedModalRect(x + 117, y + 44 + 14 - tScale, 177, 14 - tScale, 15, tScale + 1); + } + } + } +} diff --git a/src/main/java/gregtech/common/gui/GT_GUIContainer_BronzeBlastFurnace.java b/src/main/java/gregtech/common/gui/GT_GUIContainer_BronzeBlastFurnace.java index 805a7a8f2a..187ca93de0 100644 --- a/src/main/java/gregtech/common/gui/GT_GUIContainer_BronzeBlastFurnace.java +++ b/src/main/java/gregtech/common/gui/GT_GUIContainer_BronzeBlastFurnace.java @@ -1,27 +1,27 @@ -package gregtech.common.gui;
-
-import gregtech.api.gui.GT_GUIContainerMetaTile_Machine;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import net.minecraft.entity.player.InventoryPlayer;
-
-public class GT_GUIContainer_BronzeBlastFurnace
- extends GT_GUIContainerMetaTile_Machine {
- public GT_GUIContainer_BronzeBlastFurnace(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) {
- super(new GT_Container_BronzeBlastFurnace(aInventoryPlayer, aTileEntity), "gregtech:textures/gui/BronzeBlastFurnace.png");
- }
-
- protected void drawGuiContainerForegroundLayer(int par1, int par2) {
- this.fontRendererObj.drawString("Bronze Blast Furnace", 8, 4, 4210752);
- }
-
- protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) {
- super.drawGuiContainerBackgroundLayer(par1, par2, par3);
- int x = (this.width - this.xSize) / 2;
- int y = (this.height - this.ySize) / 2;
- drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize);
- if ((this.mContainer != null) &&
- (this.mContainer.mProgressTime > 0)) {
- drawTexturedModalRect(x + 58, y + 28, 176, 0, Math.max(0, Math.min(20, (1) + this.mContainer.mProgressTime * 20 / (this.mContainer.mMaxProgressTime < 1 ? 1 : this.mContainer.mMaxProgressTime))), 11);
- }
- }
-}
+package gregtech.common.gui; + +import gregtech.api.gui.GT_GUIContainerMetaTile_Machine; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import net.minecraft.entity.player.InventoryPlayer; + +public class GT_GUIContainer_BronzeBlastFurnace + extends GT_GUIContainerMetaTile_Machine { + public GT_GUIContainer_BronzeBlastFurnace(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) { + super(new GT_Container_BronzeBlastFurnace(aInventoryPlayer, aTileEntity), "gregtech:textures/gui/BronzeBlastFurnace.png"); + } + + protected void drawGuiContainerForegroundLayer(int par1, int par2) { + this.fontRendererObj.drawString("Bronze Blast Furnace", 8, 4, 4210752); + } + + protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) { + super.drawGuiContainerBackgroundLayer(par1, par2, par3); + int x = (this.width - this.xSize) / 2; + int y = (this.height - this.ySize) / 2; + drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize); + if ((this.mContainer != null) && + (this.mContainer.mProgressTime > 0)) { + drawTexturedModalRect(x + 58, y + 28, 176, 0, Math.max(0, Math.min(20, (this.mContainer.mProgressTime > 0 ? 1 : 0) + this.mContainer.mProgressTime * 20 / (this.mContainer.mMaxProgressTime < 1 ? 1 : this.mContainer.mMaxProgressTime))), 11); + } + } +} diff --git a/src/main/java/gregtech/common/gui/GT_GUIContainer_ChestBuffer.java b/src/main/java/gregtech/common/gui/GT_GUIContainer_ChestBuffer.java index bfae3f8fd0..1081badc51 100644 --- a/src/main/java/gregtech/common/gui/GT_GUIContainer_ChestBuffer.java +++ b/src/main/java/gregtech/common/gui/GT_GUIContainer_ChestBuffer.java @@ -1,19 +1,19 @@ -package gregtech.common.gui;
-
-import gregtech.api.gui.GT_GUIContainerMetaTile_Machine;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import net.minecraft.entity.player.InventoryPlayer;
-
-public class GT_GUIContainer_ChestBuffer
- extends GT_GUIContainerMetaTile_Machine {
- public GT_GUIContainer_ChestBuffer(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) {
- super(new GT_Container_ChestBuffer(aInventoryPlayer, aTileEntity), "gregtech:textures/gui/ChestBuffer.png");
- }
-
- protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) {
- super.drawGuiContainerBackgroundLayer(par1, par2, par3);
- int x = (this.width - this.xSize) / 2;
- int y = (this.height - this.ySize) / 2;
- drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize);
- }
-}
+package gregtech.common.gui; + +import gregtech.api.gui.GT_GUIContainerMetaTile_Machine; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import net.minecraft.entity.player.InventoryPlayer; + +public class GT_GUIContainer_ChestBuffer + extends GT_GUIContainerMetaTile_Machine { + public GT_GUIContainer_ChestBuffer(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) { + super(new GT_Container_ChestBuffer(aInventoryPlayer, aTileEntity), "gregtech:textures/gui/ChestBuffer.png"); + } + + protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) { + super.drawGuiContainerBackgroundLayer(par1, par2, par3); + int x = (this.width - this.xSize) / 2; + int y = (this.height - this.ySize) / 2; + drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize); + } +} diff --git a/src/main/java/gregtech/common/gui/GT_GUIContainer_Filter.java b/src/main/java/gregtech/common/gui/GT_GUIContainer_Filter.java index 31d93432bd..9ca7cc413b 100644 --- a/src/main/java/gregtech/common/gui/GT_GUIContainer_Filter.java +++ b/src/main/java/gregtech/common/gui/GT_GUIContainer_Filter.java @@ -1,19 +1,19 @@ -package gregtech.common.gui;
-
-import gregtech.api.gui.GT_GUIContainerMetaTile_Machine;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import net.minecraft.entity.player.InventoryPlayer;
-
-public class GT_GUIContainer_Filter
- extends GT_GUIContainerMetaTile_Machine {
- public GT_GUIContainer_Filter(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) {
- super(new GT_Container_Filter(aInventoryPlayer, aTileEntity), "gregtech:textures/gui/Filter.png");
- }
-
- protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) {
- super.drawGuiContainerBackgroundLayer(par1, par2, par3);
- int x = (this.width - this.xSize) / 2;
- int y = (this.height - this.ySize) / 2;
- drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize);
- }
-}
+package gregtech.common.gui; + +import gregtech.api.gui.GT_GUIContainerMetaTile_Machine; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import net.minecraft.entity.player.InventoryPlayer; + +public class GT_GUIContainer_Filter + extends GT_GUIContainerMetaTile_Machine { + public GT_GUIContainer_Filter(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) { + super(new GT_Container_Filter(aInventoryPlayer, aTileEntity), "gregtech:textures/gui/Filter.png"); + } + + protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) { + super.drawGuiContainerBackgroundLayer(par1, par2, par3); + int x = (this.width - this.xSize) / 2; + int y = (this.height - this.ySize) / 2; + drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize); + } +} diff --git a/src/main/java/gregtech/common/gui/GT_GUIContainer_FusionReactor.java b/src/main/java/gregtech/common/gui/GT_GUIContainer_FusionReactor.java index bfdaa2e962..8ee028b53d 100644 --- a/src/main/java/gregtech/common/gui/GT_GUIContainer_FusionReactor.java +++ b/src/main/java/gregtech/common/gui/GT_GUIContainer_FusionReactor.java @@ -29,7 +29,7 @@ public class GT_GUIContainer_FusionReactor extends GT_GUIContainerMetaTile_Machi if (((GT_Container_MultiMachine) mContainer).mDisplayErrorCode == 0) { if (((GT_Container_MultiMachine) mContainer).mActive == 0) { - fontRendererObj.drawString("Hit with Soft Hammer to (re-)start the Machine if it doesn't start.", -70, 170, 16448255); + fontRendererObj.drawString("Hit with Soft Mallet to (re-)start the Machine if it doesn't start.", -70, 170, 16448255); } else { fontRendererObj.drawString("Running perfectly.", 10, 170, 16448255); } diff --git a/src/main/java/gregtech/common/gui/GT_GUIContainer_MicrowaveEnergyTransmitter.java b/src/main/java/gregtech/common/gui/GT_GUIContainer_MicrowaveEnergyTransmitter.java index 0d03b12aa1..7e5e43dbc7 100644 --- a/src/main/java/gregtech/common/gui/GT_GUIContainer_MicrowaveEnergyTransmitter.java +++ b/src/main/java/gregtech/common/gui/GT_GUIContainer_MicrowaveEnergyTransmitter.java @@ -21,6 +21,7 @@ public class GT_GUIContainer_MicrowaveEnergyTransmitter this.fontRendererObj.drawString("Z: " + GT_Utility.parseNumberToString(((GT_Container_MicrowaveEnergyTransmitter) this.mContainer).mTargetZ), 46, 32, 16448255); if (((GT_Container_MicrowaveEnergyTransmitter) this.mContainer).mEgg > 0) { this.fontRendererObj.drawString("Dim: " + GT_Utility.parseNumberToString(((GT_Container_MicrowaveEnergyTransmitter) this.mContainer).mTargetD), 46, 40, 16448255); + this.fontRendererObj.drawString("Dim Valid: " + (GT_Utility.isRealDimension(((GT_Container_MicrowaveEnergyTransmitter) this.mContainer).mTargetD) ? "Yes":"No"), 46, 48, 16448255); } } } diff --git a/src/main/java/gregtech/common/gui/GT_GUIContainer_Regulator.java b/src/main/java/gregtech/common/gui/GT_GUIContainer_Regulator.java index 7a2c21d87c..8adee5fbe0 100644 --- a/src/main/java/gregtech/common/gui/GT_GUIContainer_Regulator.java +++ b/src/main/java/gregtech/common/gui/GT_GUIContainer_Regulator.java @@ -1,31 +1,31 @@ -package gregtech.common.gui;
-
-import gregtech.api.gui.GT_GUIContainerMetaTile_Machine;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import net.minecraft.entity.player.InventoryPlayer;
-
-public class GT_GUIContainer_Regulator
- extends GT_GUIContainerMetaTile_Machine {
- public GT_GUIContainer_Regulator(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) {
- super(new GT_Container_Regulator(aInventoryPlayer, aTileEntity), "gregtech:textures/gui/Regulator.png");
- }
-
- protected void drawGuiContainerForegroundLayer(int par1, int par2) {
- this.fontRendererObj.drawString(String.valueOf(((GT_Container_Regulator) this.mContainer).mTargetSlots[0]), 120, 9, 16448255);
- this.fontRendererObj.drawString(String.valueOf(((GT_Container_Regulator) this.mContainer).mTargetSlots[1]), 137, 9, 16448255);
- this.fontRendererObj.drawString(String.valueOf(((GT_Container_Regulator) this.mContainer).mTargetSlots[2]), 155, 9, 16448255);
- this.fontRendererObj.drawString(String.valueOf(((GT_Container_Regulator) this.mContainer).mTargetSlots[3]), 120, 26, 16448255);
- this.fontRendererObj.drawString(String.valueOf(((GT_Container_Regulator) this.mContainer).mTargetSlots[4]), 137, 26, 16448255);
- this.fontRendererObj.drawString(String.valueOf(((GT_Container_Regulator) this.mContainer).mTargetSlots[5]), 155, 26, 16448255);
- this.fontRendererObj.drawString(String.valueOf(((GT_Container_Regulator) this.mContainer).mTargetSlots[6]), 120, 43, 16448255);
- this.fontRendererObj.drawString(String.valueOf(((GT_Container_Regulator) this.mContainer).mTargetSlots[7]), 137, 43, 16448255);
- this.fontRendererObj.drawString(String.valueOf(((GT_Container_Regulator) this.mContainer).mTargetSlots[8]), 155, 43, 16448255);
- }
-
- protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) {
- super.drawGuiContainerBackgroundLayer(par1, par2, par3);
- int x = (this.width - this.xSize) / 2;
- int y = (this.height - this.ySize) / 2;
- drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize);
- }
-}
+package gregtech.common.gui; + +import gregtech.api.gui.GT_GUIContainerMetaTile_Machine; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import net.minecraft.entity.player.InventoryPlayer; + +public class GT_GUIContainer_Regulator + extends GT_GUIContainerMetaTile_Machine { + public GT_GUIContainer_Regulator(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) { + super(new GT_Container_Regulator(aInventoryPlayer, aTileEntity), "gregtech:textures/gui/Regulator.png"); + } + + protected void drawGuiContainerForegroundLayer(int par1, int par2) { + this.fontRendererObj.drawString(String.valueOf(((GT_Container_Regulator) this.mContainer).mTargetSlots[0]), 120, 9, 16448255); + this.fontRendererObj.drawString(String.valueOf(((GT_Container_Regulator) this.mContainer).mTargetSlots[1]), 137, 9, 16448255); + this.fontRendererObj.drawString(String.valueOf(((GT_Container_Regulator) this.mContainer).mTargetSlots[2]), 155, 9, 16448255); + this.fontRendererObj.drawString(String.valueOf(((GT_Container_Regulator) this.mContainer).mTargetSlots[3]), 120, 26, 16448255); + this.fontRendererObj.drawString(String.valueOf(((GT_Container_Regulator) this.mContainer).mTargetSlots[4]), 137, 26, 16448255); + this.fontRendererObj.drawString(String.valueOf(((GT_Container_Regulator) this.mContainer).mTargetSlots[5]), 155, 26, 16448255); + this.fontRendererObj.drawString(String.valueOf(((GT_Container_Regulator) this.mContainer).mTargetSlots[6]), 120, 43, 16448255); + this.fontRendererObj.drawString(String.valueOf(((GT_Container_Regulator) this.mContainer).mTargetSlots[7]), 137, 43, 16448255); + this.fontRendererObj.drawString(String.valueOf(((GT_Container_Regulator) this.mContainer).mTargetSlots[8]), 155, 43, 16448255); + } + + protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) { + super.drawGuiContainerBackgroundLayer(par1, par2, par3); + int x = (this.width - this.xSize) / 2; + int y = (this.height - this.ySize) / 2; + drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize); + } +} diff --git a/src/main/java/gregtech/common/gui/GT_GUIContainer_SuperBuffer.java b/src/main/java/gregtech/common/gui/GT_GUIContainer_SuperBuffer.java index 4fe7793c37..43d279ca0e 100644 --- a/src/main/java/gregtech/common/gui/GT_GUIContainer_SuperBuffer.java +++ b/src/main/java/gregtech/common/gui/GT_GUIContainer_SuperBuffer.java @@ -1,19 +1,19 @@ -package gregtech.common.gui;
-
-import gregtech.api.gui.GT_GUIContainerMetaTile_Machine;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import net.minecraft.entity.player.InventoryPlayer;
-
-public class GT_GUIContainer_SuperBuffer
- extends GT_GUIContainerMetaTile_Machine {
- public GT_GUIContainer_SuperBuffer(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) {
- super(new GT_Container_SuperBuffer(aInventoryPlayer, aTileEntity), "gregtech:textures/gui/SuperBuffer.png");
- }
-
- protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) {
- super.drawGuiContainerBackgroundLayer(par1, par2, par3);
- int x = (this.width - this.xSize) / 2;
- int y = (this.height - this.ySize) / 2;
- drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize);
- }
-}
+package gregtech.common.gui; + +import gregtech.api.gui.GT_GUIContainerMetaTile_Machine; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import net.minecraft.entity.player.InventoryPlayer; + +public class GT_GUIContainer_SuperBuffer + extends GT_GUIContainerMetaTile_Machine { + public GT_GUIContainer_SuperBuffer(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) { + super(new GT_Container_SuperBuffer(aInventoryPlayer, aTileEntity), "gregtech:textures/gui/SuperBuffer.png"); + } + + protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) { + super.drawGuiContainerBackgroundLayer(par1, par2, par3); + int x = (this.width - this.xSize) / 2; + int y = (this.height - this.ySize) / 2; + drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize); + } +} diff --git a/src/main/java/gregtech/common/gui/GT_GUIContainer_Teleporter.java b/src/main/java/gregtech/common/gui/GT_GUIContainer_Teleporter.java index 6f7e2808de..5f89f60e49 100644 --- a/src/main/java/gregtech/common/gui/GT_GUIContainer_Teleporter.java +++ b/src/main/java/gregtech/common/gui/GT_GUIContainer_Teleporter.java @@ -21,6 +21,7 @@ public class GT_GUIContainer_Teleporter this.fontRendererObj.drawString("Z: " + GT_Utility.parseNumberToString(((GT_Container_Teleporter) this.mContainer).mTargetZ), 46, 32, 16448255); if (((GT_Container_Teleporter) this.mContainer).mEgg > 0) { this.fontRendererObj.drawString("Dim: " + GT_Utility.parseNumberToString(((GT_Container_Teleporter) this.mContainer).mTargetD), 46, 40, 16448255); + this.fontRendererObj.drawString("Dim Valid: " + (GT_Utility.isRealDimension(((GT_Container_Teleporter) this.mContainer).mTargetD) ? "Yes":"No"), 46, 48, 16448255); } } } diff --git a/src/main/java/gregtech/common/gui/GT_GUIContainer_TypeFilter.java b/src/main/java/gregtech/common/gui/GT_GUIContainer_TypeFilter.java index 6459a57dd7..b2fb51c242 100644 --- a/src/main/java/gregtech/common/gui/GT_GUIContainer_TypeFilter.java +++ b/src/main/java/gregtech/common/gui/GT_GUIContainer_TypeFilter.java @@ -1,19 +1,19 @@ -package gregtech.common.gui;
-
-import gregtech.api.gui.GT_GUIContainerMetaTile_Machine;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import net.minecraft.entity.player.InventoryPlayer;
-
-public class GT_GUIContainer_TypeFilter
- extends GT_GUIContainerMetaTile_Machine {
- public GT_GUIContainer_TypeFilter(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) {
- super(new GT_Container_TypeFilter(aInventoryPlayer, aTileEntity), "gregtech:textures/gui/TypeFilter.png");
- }
-
- protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) {
- super.drawGuiContainerBackgroundLayer(par1, par2, par3);
- int x = (this.width - this.xSize) / 2;
- int y = (this.height - this.ySize) / 2;
- drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize);
- }
-}
+package gregtech.common.gui; + +import gregtech.api.gui.GT_GUIContainerMetaTile_Machine; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import net.minecraft.entity.player.InventoryPlayer; + +public class GT_GUIContainer_TypeFilter + extends GT_GUIContainerMetaTile_Machine { + public GT_GUIContainer_TypeFilter(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) { + super(new GT_Container_TypeFilter(aInventoryPlayer, aTileEntity), "gregtech:textures/gui/TypeFilter.png"); + } + + protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) { + super.drawGuiContainerBackgroundLayer(par1, par2, par3); + int x = (this.width - this.xSize) / 2; + int y = (this.height - this.ySize) / 2; + drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize); + } +} diff --git a/src/main/java/gregtech/common/items/GT_FluidDisplayItem.java b/src/main/java/gregtech/common/items/GT_FluidDisplayItem.java index 2ceeca88ce..2ccabd8dc6 100644 --- a/src/main/java/gregtech/common/items/GT_FluidDisplayItem.java +++ b/src/main/java/gregtech/common/items/GT_FluidDisplayItem.java @@ -1,92 +1,92 @@ -package gregtech.common.items;
-
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import gregtech.api.enums.GT_Values;
-import gregtech.api.enums.ItemList;
-import gregtech.api.items.GT_Generic_Item;
-import gregtech.api.util.GT_Utility;
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.creativetab.CreativeTabs;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.IIcon;
-import net.minecraftforge.fluids.Fluid;
-import net.minecraftforge.fluids.FluidRegistry;
-
-import java.util.List;
-
-public class GT_FluidDisplayItem
- extends GT_Generic_Item {
- public GT_FluidDisplayItem() {
- super("GregTech_FluidDisplay", "Fluid Display", null);
- ItemList.Display_Fluid.set(this);
- }
-
- protected void addAdditionalToolTips(List aList, ItemStack aStack, EntityPlayer aPlayer) {
- NBTTagCompound aNBT = aStack.getTagCompound();
- if (GT_Values.D1) {
- Fluid tFluid = FluidRegistry.getFluid(aStack.getItemDamage());
- if (tFluid != null) {
- aList.add("Registry: " + tFluid.getName());
- }
- }
- if (aNBT != null) {
- long tToolTipAmount = aNBT.getLong("mFluidDisplayAmount");
- if (tToolTipAmount > 0L) {
- aList.add(EnumChatFormatting.BLUE + "Amount: " + tToolTipAmount + EnumChatFormatting.GRAY);
- }
- aList.add(EnumChatFormatting.RED + "Temperature: " + aNBT.getLong("mFluidDisplayHeat") + " K" + EnumChatFormatting.GRAY);
- aList.add(EnumChatFormatting.GREEN + "State: " + (aNBT.getBoolean("mFluidState") ? "Gas" : "Liquid") + EnumChatFormatting.GRAY);
- }
- }
-
- @SideOnly(Side.CLIENT)
- public void registerIcons(IIconRegister aIconRegister) {
- }
-
- public IIcon getIconFromDamage(int aMeta) {
- Fluid tFluid = FluidRegistry.getFluid(aMeta);
- return tFluid == null ? FluidRegistry.WATER.getStillIcon() : tFluid.getStillIcon();
- }
-
- @SideOnly(Side.CLIENT)
- public int getColorFromItemStack(ItemStack aStack, int aRenderPass) {
- Fluid tFluid = FluidRegistry.getFluid(aStack.getItemDamage());
- return tFluid == null ? 16777215 : tFluid.getColor();
- }
-
- public int getSpriteNumber() {
- return 0;
- }
-
- public String getUnlocalizedName(ItemStack aStack) {
- if (aStack != null) {
- return GT_Utility.getFluidName(FluidRegistry.getFluid(aStack.getItemDamage()), false);
- }
- return "";
- }
-
- public String getItemStackDisplayName(ItemStack aStack) {
- if (aStack != null) {
- return GT_Utility.getFluidName(FluidRegistry.getFluid(aStack.getItemDamage()), true);
- }
- return "";
- }
-
- @SideOnly(Side.CLIENT)
- public void getSubItems(Item aItem, CreativeTabs aTab, List aList) {
- if (GT_Values.D1) {
- int i = 0;
- for (int j = FluidRegistry.getMaxID(); i < j; i++) {
- ItemStack tStack = GT_Utility.getFluidDisplayStack(FluidRegistry.getFluid(i));
- if (tStack != null) {
- aList.add(tStack);
- }
- }
- }
- }
-}
+package gregtech.common.items; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gregtech.api.enums.GT_Values; +import gregtech.api.enums.ItemList; +import gregtech.api.items.GT_Generic_Item; +import gregtech.api.util.GT_Utility; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.IIcon; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidRegistry; + +import java.util.List; + +public class GT_FluidDisplayItem + extends GT_Generic_Item { + public GT_FluidDisplayItem() { + super("GregTech_FluidDisplay", "Fluid Display", null); + ItemList.Display_Fluid.set(this); + } + + protected void addAdditionalToolTips(List aList, ItemStack aStack, EntityPlayer aPlayer) { + NBTTagCompound aNBT = aStack.getTagCompound(); + if (GT_Values.D1) { + Fluid tFluid = FluidRegistry.getFluid(aStack.getItemDamage()); + if (tFluid != null) { + aList.add("Registry: " + tFluid.getName()); + } + } + if (aNBT != null) { + long tToolTipAmount = aNBT.getLong("mFluidDisplayAmount"); + if (tToolTipAmount > 0L) { + aList.add(EnumChatFormatting.BLUE + "Amount: " + tToolTipAmount + EnumChatFormatting.GRAY); + } + aList.add(EnumChatFormatting.RED + "Temperature: " + aNBT.getLong("mFluidDisplayHeat") + " K" + EnumChatFormatting.GRAY); + aList.add(EnumChatFormatting.GREEN + "State: " + (aNBT.getBoolean("mFluidState") ? "Gas" : "Liquid") + EnumChatFormatting.GRAY); + } + } + + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister aIconRegister) { + } + + public IIcon getIconFromDamage(int aMeta) { + Fluid tFluid = FluidRegistry.getFluid(aMeta); + return tFluid == null ? FluidRegistry.WATER.getStillIcon() : tFluid.getStillIcon(); + } + + @SideOnly(Side.CLIENT) + public int getColorFromItemStack(ItemStack aStack, int aRenderPass) { + Fluid tFluid = FluidRegistry.getFluid(aStack.getItemDamage()); + return tFluid == null ? 16777215 : tFluid.getColor(); + } + + public int getSpriteNumber() { + return 0; + } + + public String getUnlocalizedName(ItemStack aStack) { + if (aStack != null) { + return GT_Utility.getFluidName(FluidRegistry.getFluid(aStack.getItemDamage()), false); + } + return ""; + } + + public String getItemStackDisplayName(ItemStack aStack) { + if (aStack != null) { + return GT_Utility.getFluidName(FluidRegistry.getFluid(aStack.getItemDamage()), true); + } + return ""; + } + + @SideOnly(Side.CLIENT) + public void getSubItems(Item aItem, CreativeTabs aTab, List aList) { + if (GT_Values.D1) { + int i = 0; + for (int j = FluidRegistry.getMaxID(); i < j; i++) { + ItemStack tStack = GT_Utility.getFluidDisplayStack(FluidRegistry.getFluid(i)); + if (tStack != null) { + aList.add(tStack); + } + } + } + } +} diff --git a/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_01.java b/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_01.java index 27e2356f0e..d09f8b8b50 100644 --- a/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_01.java +++ b/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_01.java @@ -1,860 +1,909 @@ -package gregtech.common.items;
-
-import cpw.mods.fml.common.Loader;
-import gregtech.api.GregTech_API;
-import gregtech.api.enums.*;
-import gregtech.api.interfaces.IItemBehaviour;
-import gregtech.api.interfaces.ITexture;
-import gregtech.api.items.GT_MetaBase_Item;
-import gregtech.api.items.GT_MetaGenerated_Item_X32;
-import gregtech.api.objects.GT_MultiTexture;
-import gregtech.api.objects.GT_RenderedTexture;
-import gregtech.api.objects.ItemData;
-import gregtech.api.objects.MaterialStack;
-import gregtech.api.util.*;
-import gregtech.common.covers.*;
-import gregtech.common.items.behaviors.*;
-import net.minecraft.block.Block;
-import net.minecraft.enchantment.Enchantment;
-import net.minecraft.entity.item.EntityItem;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Blocks;
-import net.minecraft.init.Items;
-import net.minecraft.item.EnumAction;
-import net.minecraft.item.ItemStack;
-import net.minecraft.potion.Potion;
-import net.minecraft.util.MathHelper;
-
-import java.util.Collection;
-import java.util.List;
-
-public class GT_MetaGenerated_Item_01 extends GT_MetaGenerated_Item_X32 {
- public static GT_MetaGenerated_Item_01 INSTANCE;
- private final String mToolTipPurify = GT_LanguageManager.addStringLocalization("metaitem.01.tooltip.purify", "Throw into Cauldron to get clean Dust");
- private final static String aTextArrow = " A";private final static String aTextStick = " S ";private final static String aTextFeather = "F ";
- private final static String aTextEmptyRow = " "; private final static String aTextShape = " P ";
-
- public GT_MetaGenerated_Item_01() {
- super("metaitem.01", new OrePrefixes[]{OrePrefixes.dustTiny, OrePrefixes.dustSmall, OrePrefixes.dust, OrePrefixes.dustImpure, OrePrefixes.dustPure, OrePrefixes.crushed, OrePrefixes.crushedPurified, OrePrefixes.crushedCentrifuged, OrePrefixes.gem, OrePrefixes.nugget, null, OrePrefixes.ingot, OrePrefixes.ingotHot, OrePrefixes.ingotDouble, OrePrefixes.ingotTriple, OrePrefixes.ingotQuadruple, OrePrefixes.ingotQuintuple, OrePrefixes.plate, OrePrefixes.plateDouble, OrePrefixes.plateTriple, OrePrefixes.plateQuadruple, OrePrefixes.plateQuintuple, OrePrefixes.plateDense, OrePrefixes.stick, OrePrefixes.lens, OrePrefixes.round, OrePrefixes.bolt, OrePrefixes.screw, OrePrefixes.ring, OrePrefixes.foil, OrePrefixes.cell, OrePrefixes.cellPlasma});
- INSTANCE = this;
-
- int tLastID = 0;
-
- setBurnValue(17000 + Materials.Wood.mMetaItemSubID, 1600);
- GT_OreDictUnificator.addToBlacklist(new ItemStack(this, 1, 17000 + Materials.Wood.mMetaItemSubID));
- GT_ModHandler.addCompressionRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 8L), new ItemStack(this, 1, 17000 + Materials.Wood.mMetaItemSubID));
- GregTech_API.registerCover(new ItemStack(this, 1, 17000 + Materials.Wood.mMetaItemSubID), new GT_RenderedTexture(Textures.BlockIcons.COVER_WOOD_PLATE), null);
-
- ItemStack tStack = new ItemStack(this, 1, 17000 + Materials.Wood.mMetaItemSubID);
- tStack.setStackDisplayName("The holy Planks of Sengir");
- GT_Utility.ItemNBT.addEnchantment(tStack, Enchantment.smite, 10);
- GT_ModHandler.addCraftingRecipe(tStack, GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"XXX", "XDX", "XXX", 'X', OrePrefixes.gem.get(Materials.NetherStar), 'D', new ItemStack(Blocks.dragon_egg, 1, 32767)});
-
- ItemList.Credit_Greg_Copper.set(addItem(tLastID = 0, "Copper GT Credit", "0.125 Credits", new Object[0]));
- ItemList.Credit_Greg_Cupronickel.set(addItem(tLastID = 1, "Cupronickel GT Credit", "1 Credit", new Object[]{new ItemData(Materials.Cupronickel, 907200L, new MaterialStack[0])}));
- ItemList.Credit_Greg_Silver.set(addItem(tLastID = 2, "Silver GT Credit", "8 Credits", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.LUCRUM, 1L)}));
- ItemList.Credit_Greg_Gold.set(addItem(tLastID = 3, "Gold GT Credit", "64 Credits", new Object[0]));
- ItemList.Credit_Greg_Platinum.set(addItem(tLastID = 4, "Platinum GT Credit", "512 Credits", new Object[0]));
- ItemList.Credit_Greg_Osmium.set(addItem(tLastID = 5, "Osmium GT Credit", "4096 Credits", new Object[0]));
- ItemList.Credit_Greg_Naquadah.set(addItem(tLastID = 6, "Naquadah GT Credit", "32768 Credits", new Object[0]));
- ItemList.Credit_Greg_Neutronium.set(addItem(tLastID = 7, "Neutronium GT Credit", "262144 Credits", new Object[0]));
- ItemList.Coin_Gold_Ancient.set(addItem(tLastID = 8, "Ancient Gold Coin", "Found in ancient Ruins", new Object[]{new ItemData(Materials.Gold, 907200L, new MaterialStack[0]), new TC_Aspects.TC_AspectStack(TC_Aspects.LUCRUM, 8L)}));
- ItemList.Coin_Doge.set(addItem(tLastID = 9, "Doge Coin", "wow much coin how money so crypto plz mine v rich very currency wow", new Object[]{new ItemData(Materials.Brass, 907200L, new MaterialStack[0]), new TC_Aspects.TC_AspectStack(TC_Aspects.LUCRUM, 1L)}));
- ItemList.Coin_Chocolate.set(addItem(tLastID = 10, "Chocolate Coin", "Wrapped in Gold", new Object[]{new ItemData(Materials.Gold, OrePrefixes.foil.mMaterialAmount, new MaterialStack[0]), new GT_FoodStat(1, 0.1F, EnumAction.eat, GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Gold, 1L), true, false, false, new int[]{Potion.moveSpeed.id, 200, 1, 100})}));
- ItemList.Credit_Copper.set(addItem(tLastID = 11, "Industrial Copper Credit", "0.125 Credits", new Object[0]));
-
- ItemList.Credit_Silver.set(addItem(tLastID = 13, "Industrial Silver Credit", "8 Credits", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.LUCRUM, 1L)}));
- ItemList.Credit_Gold.set(addItem(tLastID = 14, "Industrial Gold Credit", "64 Credits", new Object[0]));
- ItemList.Credit_Platinum.set(addItem(tLastID = 15, "Industrial Platinum Credit", "512 Credits", new Object[0]));
- ItemList.Credit_Osmium.set(addItem(tLastID = 16, "Industrial Osmium Credit", "4096 Credits", new Object[0]));
-
- GT_ModHandler.addShapelessCraftingRecipe(ItemList.Coin_Chocolate.get(1L, new Object[0]), new Object[]{OrePrefixes.dust.get(Materials.Cocoa), OrePrefixes.dust.get(Materials.Milk), OrePrefixes.dust.get(Materials.Sugar), OrePrefixes.foil.get(Materials.Gold)});
-
- GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Copper.get(8L, new Object[0]), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Iron});
- GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Iron.get(8L, new Object[0]), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Silver});
- GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Silver.get(8L, new Object[0]), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Gold});
- GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Gold.get(8L, new Object[0]), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Platinum});
- GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Platinum.get(8L, new Object[0]), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Osmium});
-
- GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Iron.get(1L, new Object[0]), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Copper, ItemList.Credit_Copper, ItemList.Credit_Copper, ItemList.Credit_Copper, ItemList.Credit_Copper, ItemList.Credit_Copper, ItemList.Credit_Copper, ItemList.Credit_Copper});
- GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Silver.get(1L, new Object[0]), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Iron, ItemList.Credit_Iron, ItemList.Credit_Iron, ItemList.Credit_Iron, ItemList.Credit_Iron, ItemList.Credit_Iron, ItemList.Credit_Iron, ItemList.Credit_Iron});
- GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Gold.get(1L, new Object[0]), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Silver, ItemList.Credit_Silver, ItemList.Credit_Silver, ItemList.Credit_Silver, ItemList.Credit_Silver, ItemList.Credit_Silver, ItemList.Credit_Silver, ItemList.Credit_Silver});
- GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Platinum.get(1L, new Object[0]), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Gold, ItemList.Credit_Gold, ItemList.Credit_Gold, ItemList.Credit_Gold, ItemList.Credit_Gold, ItemList.Credit_Gold, ItemList.Credit_Gold, ItemList.Credit_Gold});
- GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Osmium.get(1L, new Object[0]), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Platinum, ItemList.Credit_Platinum, ItemList.Credit_Platinum, ItemList.Credit_Platinum, ItemList.Credit_Platinum, ItemList.Credit_Platinum, ItemList.Credit_Platinum, ItemList.Credit_Platinum});
-
- GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Greg_Copper.get(8L, new Object[0]), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Greg_Cupronickel});
- GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Greg_Cupronickel.get(8L, new Object[0]), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Greg_Silver});
- GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Greg_Silver.get(8L, new Object[0]), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Greg_Gold});
- GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Greg_Gold.get(8L, new Object[0]), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Greg_Platinum});
- GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Greg_Platinum.get(8L, new Object[0]), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Greg_Osmium});
- GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Greg_Osmium.get(8L, new Object[0]), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Greg_Naquadah});
- GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Greg_Naquadah.get(8L, new Object[0]), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Greg_Neutronium});
-
- GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Greg_Cupronickel.get(1L, new Object[0]), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Greg_Copper, ItemList.Credit_Greg_Copper, ItemList.Credit_Greg_Copper, ItemList.Credit_Greg_Copper, ItemList.Credit_Greg_Copper, ItemList.Credit_Greg_Copper, ItemList.Credit_Greg_Copper, ItemList.Credit_Greg_Copper});
- GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Greg_Silver.get(1L, new Object[0]), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Greg_Cupronickel, ItemList.Credit_Greg_Cupronickel, ItemList.Credit_Greg_Cupronickel, ItemList.Credit_Greg_Cupronickel, ItemList.Credit_Greg_Cupronickel, ItemList.Credit_Greg_Cupronickel, ItemList.Credit_Greg_Cupronickel, ItemList.Credit_Greg_Cupronickel});
- GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Greg_Gold.get(1L, new Object[0]), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Greg_Silver, ItemList.Credit_Greg_Silver, ItemList.Credit_Greg_Silver, ItemList.Credit_Greg_Silver, ItemList.Credit_Greg_Silver, ItemList.Credit_Greg_Silver, ItemList.Credit_Greg_Silver, ItemList.Credit_Greg_Silver});
- GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Greg_Platinum.get(1L, new Object[0]), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Greg_Gold, ItemList.Credit_Greg_Gold, ItemList.Credit_Greg_Gold, ItemList.Credit_Greg_Gold, ItemList.Credit_Greg_Gold, ItemList.Credit_Greg_Gold, ItemList.Credit_Greg_Gold, ItemList.Credit_Greg_Gold});
- GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Greg_Osmium.get(1L, new Object[0]), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Greg_Platinum, ItemList.Credit_Greg_Platinum, ItemList.Credit_Greg_Platinum, ItemList.Credit_Greg_Platinum, ItemList.Credit_Greg_Platinum, ItemList.Credit_Greg_Platinum, ItemList.Credit_Greg_Platinum, ItemList.Credit_Greg_Platinum});
- GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Greg_Naquadah.get(1L, new Object[0]), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Greg_Osmium, ItemList.Credit_Greg_Osmium, ItemList.Credit_Greg_Osmium, ItemList.Credit_Greg_Osmium, ItemList.Credit_Greg_Osmium, ItemList.Credit_Greg_Osmium, ItemList.Credit_Greg_Osmium, ItemList.Credit_Greg_Osmium});
- GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Greg_Neutronium.get(1L, new Object[0]), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Greg_Naquadah, ItemList.Credit_Greg_Naquadah, ItemList.Credit_Greg_Naquadah, ItemList.Credit_Greg_Naquadah, ItemList.Credit_Greg_Naquadah, ItemList.Credit_Greg_Naquadah, ItemList.Credit_Greg_Naquadah, ItemList.Credit_Greg_Naquadah});
-
- ItemList.Component_Minecart_Wheels_Iron.set(addItem(tLastID = 100, "Iron Minecart Wheels", "To get things rolling", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2L)}));
- ItemList.Component_Minecart_Wheels_Steel.set(addItem(tLastID = 101, "Steel Minecart Wheels", "To get things rolling", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2L)}));
-
- GT_ModHandler.addCraftingRecipe(ItemList.Component_Minecart_Wheels_Iron.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{" h ", "RSR", " w ", 'R', OrePrefixes.ring.get(Materials.AnyIron), 'S', OrePrefixes.stick.get(Materials.AnyIron)});
- GT_ModHandler.addCraftingRecipe(ItemList.Component_Minecart_Wheels_Steel.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{" h ", "RSR", " w ", 'R', OrePrefixes.ring.get(Materials.Steel), 'S', OrePrefixes.stick.get(Materials.Steel)});
-
- ItemList.Arrow_Head_Glass_Emtpy.set(addItem(tLastID = 200, "Empty Glass Arrow Head", "Fill with Potions before use", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 1L)}));
- ItemList.Arrow_Head_Glass_Poison.set(addItem(tLastID = 201, "Poison Glass Arrow Head", "Glass Arrow filled with Poison", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L)}));
- ItemList.Arrow_Head_Glass_Poison_Long.set(addItem(tLastID = 202, "Poison Glass Arrow Head", "Glass Arrow filled with stretched Poison", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L)}));
- ItemList.Arrow_Head_Glass_Poison_Strong.set(addItem(tLastID = 203, "Poison Glass Arrow Head", "Glass Arrow filled with strong Poison", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L)}));
- ItemList.Arrow_Head_Glass_Slowness.set(addItem(tLastID = 204, "Slowness Glass Arrow Head", "Glass Arrow filled with Laming Brew", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L)}));
- ItemList.Arrow_Head_Glass_Slowness_Long.set(addItem(tLastID = 205, "Slowness Glass Arrow Head", "Glass Arrow filled with stretched Laming Brew", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L)}));
- ItemList.Arrow_Head_Glass_Weakness.set(addItem(tLastID = 206, "Weakness Glass Arrow Head", "Glass Arrow filled with Weakening Brew", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L)}));
- ItemList.Arrow_Head_Glass_Weakness_Long.set(addItem(tLastID = 207, "Weakness Glass Arrow Head", "Glass Arrow filled with stretched Weakening Brew", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L)}));
- ItemList.Arrow_Head_Glass_Holy_Water.set(addItem(tLastID = 208, "Holy Water Glass Arrow Head", "Glass Arrow filled with Holy Water", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.AURAM, 1L)}));
-
- ItemList.Arrow_Wooden_Glass_Emtpy.set(addItem(tLastID = 225, "Regular Glass Vial Arrow", "Empty Glass Arrow", new Object[]{new Behaviour_Arrow_Potion(1.0F, 6.0F, new int[0]), new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 1L)}));
- ItemList.Arrow_Wooden_Glass_Poison.set(addItem(tLastID = 226, "Regular Poison Arrow", "Glass Arrow filled with Poison", new Object[]{new Behaviour_Arrow_Potion(1.0F, 6.0F, new int[]{Potion.poison.id, 450, 0, 100}), new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L)}));
- ItemList.Arrow_Wooden_Glass_Poison_Long.set(addItem(tLastID = 227, "Regular Poison Arrow", "Glass Arrow filled with stretched Poison", new Object[]{new Behaviour_Arrow_Potion(1.0F, 6.0F, new int[]{Potion.poison.id, 900, 0, 100}), new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L)}));
- ItemList.Arrow_Wooden_Glass_Poison_Strong.set(addItem(tLastID = 228, "Regular Poison Arrow", "Glass Arrow filled with strong Poison", new Object[]{new Behaviour_Arrow_Potion(1.0F, 6.0F, new int[]{Potion.poison.id, 450, 1, 100}), new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L)}));
- ItemList.Arrow_Wooden_Glass_Slowness.set(addItem(tLastID = 229, "Regular Slowness Arrow", "Glass Arrow filled with Laming Brew", new Object[]{new Behaviour_Arrow_Potion(1.0F, 6.0F, new int[]{Potion.moveSlowdown.id, 900, 0, 100}), new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L)}));
- ItemList.Arrow_Wooden_Glass_Slowness_Long.set(addItem(tLastID = 230, "Regular Slowness Arrow", "Glass Arrow filled with stretched Laming Brew", new Object[]{new Behaviour_Arrow_Potion(1.0F, 6.0F, new int[]{Potion.moveSlowdown.id, 1800, 0, 100}), new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L)}));
- ItemList.Arrow_Wooden_Glass_Weakness.set(addItem(tLastID = 231, "Regular Weakness Arrow", "Glass Arrow filled with Weakening Brew", new Object[]{new Behaviour_Arrow_Potion(1.0F, 6.0F, new int[]{Potion.weakness.id, 900, 0, 100}), new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L)}));
- ItemList.Arrow_Wooden_Glass_Weakness_Long.set(addItem(tLastID = 232, "Regular Weakness Arrow", "Glass Arrow filled with stretched Weakening Brew", new Object[]{new Behaviour_Arrow_Potion(1.0F, 6.0F, new int[]{Potion.weakness.id, 1800, 0, 100}), new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L)}));
- ItemList.Arrow_Wooden_Glass_Holy_Water.set(addItem(tLastID = 233, "Regular Holy Water Arrow", "Glass Arrow filled with Holy Water", new Object[]{new Behaviour_Arrow_Potion(1.0F, 6.0F, Enchantment.smite, 10, new int[0]), new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.AURAM, 1L)}));
-
- ItemList.Arrow_Plastic_Glass_Emtpy.set(addItem(tLastID = 250, "Light Glass Vial Arrow", "Empty Glass Arrow", new Object[]{new Behaviour_Arrow_Potion(1.5F, 6.0F, new int[0]), new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 1L)}));
- ItemList.Arrow_Plastic_Glass_Poison.set(addItem(tLastID = 251, "Light Poison Arrow", "Glass Arrow filled with Poison", new Object[]{new Behaviour_Arrow_Potion(1.5F, 6.0F, new int[]{Potion.poison.id, 450, 0, 100}), new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L)}));
- ItemList.Arrow_Plastic_Glass_Poison_Long.set(addItem(tLastID = 252, "Light Poison Arrow", "Glass Arrow filled with stretched Poison", new Object[]{new Behaviour_Arrow_Potion(1.5F, 6.0F, new int[]{Potion.poison.id, 900, 0, 100}), new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L)}));
- ItemList.Arrow_Plastic_Glass_Poison_Strong.set(addItem(tLastID = 253, "Light Poison Arrow", "Glass Arrow filled with strong Poison", new Object[]{new Behaviour_Arrow_Potion(1.5F, 6.0F, new int[]{Potion.poison.id, 450, 1, 100}), new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L)}));
- ItemList.Arrow_Plastic_Glass_Slowness.set(addItem(tLastID = 254, "Light Slowness Arrow", "Glass Arrow filled with Laming Brew", new Object[]{new Behaviour_Arrow_Potion(1.5F, 6.0F, new int[]{Potion.moveSlowdown.id, 900, 0, 100}), new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L)}));
- ItemList.Arrow_Plastic_Glass_Slowness_Long.set(addItem(tLastID = 255, "Light Slowness Arrow", "Glass Arrow filled with stretched Laming Brew", new Object[]{new Behaviour_Arrow_Potion(1.5F, 6.0F, new int[]{Potion.moveSlowdown.id, 1800, 0, 100}), new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L)}));
- ItemList.Arrow_Plastic_Glass_Weakness.set(addItem(tLastID = 256, "Light Weakness Arrow", "Glass Arrow filled with Weakening Brew", new Object[]{new Behaviour_Arrow_Potion(1.5F, 6.0F, new int[]{Potion.weakness.id, 900, 0, 100}), new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L)}));
- ItemList.Arrow_Plastic_Glass_Weakness_Long.set(addItem(tLastID = 257, "Light Weakness Arrow", "Glass Arrow filled with stretched Weakening Brew", new Object[]{new Behaviour_Arrow_Potion(1.5F, 6.0F, new int[]{Potion.weakness.id, 1800, 0, 100}), new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L)}));
- ItemList.Arrow_Plastic_Glass_Holy_Water.set(addItem(tLastID = 258, "Light Holy Water Arrow", "Glass Arrow filled with Holy Water", new Object[]{new Behaviour_Arrow_Potion(1.5F, 6.0F, Enchantment.smite, 10, new int[0]), new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.AURAM, 1L)}));
-
- GT_ModHandler.addCraftingRecipe(ItemList.Arrow_Wooden_Glass_Emtpy.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Emtpy, 'F', OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Wood)});
- GT_ModHandler.addCraftingRecipe(ItemList.Arrow_Wooden_Glass_Poison.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Poison, 'F', OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Wood)});
- GT_ModHandler.addCraftingRecipe(ItemList.Arrow_Wooden_Glass_Poison_Long.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Poison_Long, 'F', OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Wood)});
- GT_ModHandler.addCraftingRecipe(ItemList.Arrow_Wooden_Glass_Poison_Strong.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Poison_Strong, 'F', OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Wood)});
- GT_ModHandler.addCraftingRecipe(ItemList.Arrow_Wooden_Glass_Slowness.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Slowness, 'F', OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Wood)});
- GT_ModHandler.addCraftingRecipe(ItemList.Arrow_Wooden_Glass_Slowness_Long.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Slowness_Long, 'F', OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Wood)});
- GT_ModHandler.addCraftingRecipe(ItemList.Arrow_Wooden_Glass_Weakness.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Weakness, 'F', OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Wood)});
- GT_ModHandler.addCraftingRecipe(ItemList.Arrow_Wooden_Glass_Weakness_Long.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Weakness_Long, 'F', OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Wood)});
- GT_ModHandler.addCraftingRecipe(ItemList.Arrow_Wooden_Glass_Holy_Water.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Holy_Water, 'F', OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Wood)});
-
- GT_ModHandler.addCraftingRecipe(ItemList.Arrow_Plastic_Glass_Emtpy.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Emtpy, 'F', OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Plastic)});
- GT_ModHandler.addCraftingRecipe(ItemList.Arrow_Plastic_Glass_Poison.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Poison, 'F', OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Plastic)});
- GT_ModHandler.addCraftingRecipe(ItemList.Arrow_Plastic_Glass_Poison_Long.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Poison_Long, 'F', OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Plastic)});
- GT_ModHandler.addCraftingRecipe(ItemList.Arrow_Plastic_Glass_Poison_Strong.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Poison_Strong, 'F', OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Plastic)});
- GT_ModHandler.addCraftingRecipe(ItemList.Arrow_Plastic_Glass_Slowness.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Slowness, 'F', OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Plastic)});
- GT_ModHandler.addCraftingRecipe(ItemList.Arrow_Plastic_Glass_Slowness_Long.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Slowness_Long, 'F', OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Plastic)});
- GT_ModHandler.addCraftingRecipe(ItemList.Arrow_Plastic_Glass_Weakness.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Weakness, 'F', OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Plastic)});
- GT_ModHandler.addCraftingRecipe(ItemList.Arrow_Plastic_Glass_Weakness_Long.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Weakness_Long, 'F', OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Plastic)});
- GT_ModHandler.addCraftingRecipe(ItemList.Arrow_Plastic_Glass_Holy_Water.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Holy_Water, 'F', OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Plastic)});
-
- ItemList.Shape_Empty.set(addItem(tLastID = 300, "Empty Shape Plate", "Raw Plate to make Molds and Extruder Shapes", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 4L)}));
-
- GT_ModHandler.addCraftingRecipe(ItemList.Shape_Empty.get(1L, new Object[0]), GT_ModHandler.RecipeBits.MIRRORED | GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"hf", "PP", "PP", 'P', OrePrefixes.plate.get(Materials.Steel)});
-
- ItemList.Shape_Mold_Plate.set(addItem(tLastID = 301, "Mold (Plate)", "Mold for making Plates", new Object[0]));
- ItemList.Shape_Mold_Casing.set(addItem(tLastID = 302, "Mold (Casing)", "Mold for making Item Casings", new Object[0]));
- ItemList.Shape_Mold_Gear.set(addItem(tLastID = 303, "Mold (Gear)", "Mold for making Gears", new Object[0]));
- ItemList.Shape_Mold_Credit.set(addItem(tLastID = 304, "Mold (Coinage)", "Secure Mold for making Coins (Don't lose it!)", new Object[0]));
- ItemList.Shape_Mold_Bottle.set(addItem(tLastID = 305, "Mold (Bottle)", "Mold for making Bottles", new Object[0]));
- ItemList.Shape_Mold_Ingot.set(addItem(tLastID = 306, "Mold (Ingot)", "Mold for making Ingots", new Object[0]));
- ItemList.Shape_Mold_Ball.set(addItem(tLastID = 307, "Mold (Ball)", "Mold for making Balls", new Object[0]));
- ItemList.Shape_Mold_Block.set(addItem(tLastID = 308, "Mold (Block)", "Mold for making Blocks", new Object[0]));
- ItemList.Shape_Mold_Nugget.set(addItem(tLastID = 309, "Mold (Nuggets)", "Mold for making Nuggets", new Object[0]));
- ItemList.Shape_Mold_Bun.set(addItem(tLastID = 310, "Mold (Buns)", "Mold for shaping Buns", new Object[0]));
- ItemList.Shape_Mold_Bread.set(addItem(tLastID = 311, "Mold (Bread)", "Mold for shaping Breads", new Object[0]));
- ItemList.Shape_Mold_Baguette.set(addItem(tLastID = 312, "Mold (Baguette)", "Mold for shaping Baguettes", new Object[0]));
- ItemList.Shape_Mold_Cylinder.set(addItem(tLastID = 313, "Mold (Cylinder)", "Mold for shaping Cylinders", new Object[0]));
- ItemList.Shape_Mold_Anvil.set(addItem(tLastID = 314, "Mold (Anvil)", "Mold for shaping Anvils", new Object[0]));
- ItemList.Shape_Mold_Name.set(addItem(tLastID = 315, "Mold (Name)", "Mold for naming Items (rename Mold with Anvil)", new Object[0]));
- ItemList.Shape_Mold_Arrow.set(addItem(tLastID = 316, "Mold (Arrow Head)", "Mold for making Arrow Heads", new Object[0]));
- ItemList.Shape_Mold_Gear_Small.set(addItem(tLastID = 317, "Mold (Small Gear)", "Mold for making small Gears", new Object[0]));
-
- GT_ModHandler.removeRecipe(new ItemStack[]{new ItemStack(Blocks.glass), null, new ItemStack(Blocks.glass), null, new ItemStack(Blocks.glass)});
-
- GT_ModHandler.addCraftingRecipe(ItemList.Shape_Mold_Credit.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"h ", aTextShape, aTextEmptyRow, 'P', ItemList.Shape_Empty});
- GT_ModHandler.addCraftingRecipe(ItemList.Shape_Mold_Plate.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{" h ", aTextShape, aTextEmptyRow, 'P', ItemList.Shape_Empty});
- GT_ModHandler.addCraftingRecipe(ItemList.Shape_Mold_Casing.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{" h", aTextShape, aTextEmptyRow, 'P', ItemList.Shape_Empty});
- GT_ModHandler.addCraftingRecipe(ItemList.Shape_Mold_Gear.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextEmptyRow, " Ph", aTextEmptyRow, 'P', ItemList.Shape_Empty});
- GT_ModHandler.addCraftingRecipe(ItemList.Shape_Mold_Bottle.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextEmptyRow, aTextShape, " h", 'P', ItemList.Shape_Empty});
- GT_ModHandler.addCraftingRecipe(ItemList.Shape_Mold_Ingot.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextEmptyRow, aTextShape, " h ", 'P', ItemList.Shape_Empty});
- GT_ModHandler.addCraftingRecipe(ItemList.Shape_Mold_Ball.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextEmptyRow, aTextShape, "h ", 'P', ItemList.Shape_Empty});
- GT_ModHandler.addCraftingRecipe(ItemList.Shape_Mold_Block.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextEmptyRow, "hP ", aTextEmptyRow, 'P', ItemList.Shape_Empty});
-
- GT_ModHandler.addCraftingRecipe(ItemList.Shape_Mold_Nugget.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"P h", aTextEmptyRow, aTextEmptyRow, 'P', ItemList.Shape_Empty});
- GT_ModHandler.addCraftingRecipe(ItemList.Shape_Mold_Bun.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"P ", " h", aTextEmptyRow, 'P', ItemList.Shape_Empty});
- GT_ModHandler.addCraftingRecipe(ItemList.Shape_Mold_Bread.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"P ", aTextEmptyRow, " h", 'P', ItemList.Shape_Empty});
- GT_ModHandler.addCraftingRecipe(ItemList.Shape_Mold_Baguette.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"P ", aTextEmptyRow, " h ", 'P', ItemList.Shape_Empty});
- GT_ModHandler.addCraftingRecipe(ItemList.Shape_Mold_Cylinder.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{" P", aTextEmptyRow, " h", 'P', ItemList.Shape_Empty});
- GT_ModHandler.addCraftingRecipe(ItemList.Shape_Mold_Anvil.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{" P", aTextEmptyRow, " h ", 'P', ItemList.Shape_Empty});
- GT_ModHandler.addCraftingRecipe(ItemList.Shape_Mold_Name.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{" P", aTextEmptyRow, "h ", 'P', ItemList.Shape_Empty});
- GT_ModHandler.addCraftingRecipe(ItemList.Shape_Mold_Arrow.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{" P", "h ", aTextEmptyRow, 'P', ItemList.Shape_Empty});
- GT_ModHandler.addCraftingRecipe(ItemList.Shape_Mold_Gear_Small.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextEmptyRow, aTextEmptyRow, "h P", 'P', ItemList.Shape_Empty});
-
- ItemList.Shape_Extruder_Plate.set(addItem(tLastID = 350, "Extruder Shape (Plate)", "Extruder Shape for making Plates", new Object[0]));
- ItemList.Shape_Extruder_Rod.set(addItem(tLastID = 351, "Extruder Shape (Rod)", "Extruder Shape for making Rods", new Object[0]));
- ItemList.Shape_Extruder_Bolt.set(addItem(tLastID = 352, "Extruder Shape (Bolt)", "Extruder Shape for making Bolts", new Object[0]));
- ItemList.Shape_Extruder_Ring.set(addItem(tLastID = 353, "Extruder Shape (Ring)", "Extruder Shape for making Rings", new Object[0]));
- ItemList.Shape_Extruder_Cell.set(addItem(tLastID = 354, "Extruder Shape (Cell)", "Extruder Shape for making Cells", new Object[0]));
- ItemList.Shape_Extruder_Ingot.set(addItem(tLastID = 355, "Extruder Shape (Ingot)", "Extruder Shape for, wait, can't we just use a Furnace?", new Object[0]));
- ItemList.Shape_Extruder_Wire.set(addItem(tLastID = 356, "Extruder Shape (Wire)", "Extruder Shape for making Wires", new Object[0]));
- ItemList.Shape_Extruder_Casing.set(addItem(tLastID = 357, "Extruder Shape (Casing)", "Extruder Shape for making Item Casings", new Object[0]));
- ItemList.Shape_Extruder_Pipe_Tiny.set(addItem(tLastID = 358, "Extruder Shape (Tiny Pipe)", "Extruder Shape for making tiny Pipes", new Object[0]));
- ItemList.Shape_Extruder_Pipe_Small.set(addItem(tLastID = 359, "Extruder Shape (Small Pipe)", "Extruder Shape for making small Pipes", new Object[0]));
- ItemList.Shape_Extruder_Pipe_Medium.set(addItem(tLastID = 360, "Extruder Shape (Normal Pipe)", "Extruder Shape for making Pipes", new Object[0]));
- ItemList.Shape_Extruder_Pipe_Large.set(addItem(tLastID = 361, "Extruder Shape (Large Pipe)", "Extruder Shape for making large Pipes", new Object[0]));
- ItemList.Shape_Extruder_Pipe_Huge.set(addItem(tLastID = 362, "Extruder Shape (Huge Pipe)", "Extruder Shape for making full Block Pipes", new Object[0]));
- ItemList.Shape_Extruder_Block.set(addItem(tLastID = 363, "Extruder Shape (Block)", "Extruder Shape for making Blocks", new Object[0]));
- ItemList.Shape_Extruder_Sword.set(addItem(tLastID = 364, "Extruder Shape (Sword Blade)", "Extruder Shape for making Swords", new Object[0]));
- ItemList.Shape_Extruder_Pickaxe.set(addItem(tLastID = 365, "Extruder Shape (Pickaxe Head)", "Extruder Shape for making Pickaxes", new Object[0]));
- ItemList.Shape_Extruder_Shovel.set(addItem(tLastID = 366, "Extruder Shape (Shovel Head)", "Extruder Shape for making Shovels", new Object[0]));
- ItemList.Shape_Extruder_Axe.set(addItem(tLastID = 367, "Extruder Shape (Axe Head)", "Extruder Shape for making Axes", new Object[0]));
- ItemList.Shape_Extruder_Hoe.set(addItem(tLastID = 368, "Extruder Shape (Hoe Head)", "Extruder Shape for making Hoes", new Object[0]));
- ItemList.Shape_Extruder_Hammer.set(addItem(tLastID = 369, "Extruder Shape (Hammer Head)", "Extruder Shape for making Hammers", new Object[0]));
- ItemList.Shape_Extruder_File.set(addItem(tLastID = 370, "Extruder Shape (File Head)", "Extruder Shape for making Files", new Object[0]));
- ItemList.Shape_Extruder_Saw.set(addItem(tLastID = 371, "Extruder Shape (Saw Blade)", "Extruder Shape for making Saws", new Object[0]));
- ItemList.Shape_Extruder_Gear.set(addItem(tLastID = 372, "Extruder Shape (Gear)", "Extruder Shape for making Gears", new Object[0]));
- ItemList.Shape_Extruder_Bottle.set(addItem(tLastID = 373, "Extruder Shape (Bottle)", "Extruder Shape for making Bottles", new Object[0]));
-
- GT_ModHandler.addCraftingRecipe(ItemList.Shape_Extruder_Bolt.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"x ", aTextShape, aTextEmptyRow, 'P', ItemList.Shape_Empty});
- GT_ModHandler.addCraftingRecipe(ItemList.Shape_Extruder_Cell.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{" x ", aTextShape, aTextEmptyRow, 'P', ItemList.Shape_Empty});
- GT_ModHandler.addCraftingRecipe(ItemList.Shape_Extruder_Ingot.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{" x", aTextShape, aTextEmptyRow, 'P', ItemList.Shape_Empty});
- GT_ModHandler.addCraftingRecipe(ItemList.Shape_Extruder_Ring.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextEmptyRow, " Px", aTextEmptyRow, 'P', ItemList.Shape_Empty});
- GT_ModHandler.addCraftingRecipe(ItemList.Shape_Extruder_Rod.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextEmptyRow, aTextShape, " x", 'P', ItemList.Shape_Empty});
- GT_ModHandler.addCraftingRecipe(ItemList.Shape_Extruder_Wire.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextEmptyRow, aTextShape, " x ", 'P', ItemList.Shape_Empty});
- GT_ModHandler.addCraftingRecipe(ItemList.Shape_Extruder_Casing.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextEmptyRow, aTextShape, "x ", 'P', ItemList.Shape_Empty});
- GT_ModHandler.addCraftingRecipe(ItemList.Shape_Extruder_Plate.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextEmptyRow, "xP ", aTextEmptyRow, 'P', ItemList.Shape_Empty});
-
- GT_ModHandler.addCraftingRecipe(ItemList.Shape_Extruder_Block.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"P x", aTextEmptyRow, aTextEmptyRow, 'P', ItemList.Shape_Empty});
- GT_ModHandler.addCraftingRecipe(ItemList.Shape_Extruder_Pipe_Small.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"P ", " x", aTextEmptyRow, 'P', ItemList.Shape_Empty});
- GT_ModHandler.addCraftingRecipe(ItemList.Shape_Extruder_Pipe_Large.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"P ", aTextEmptyRow, " x", 'P', ItemList.Shape_Empty});
- GT_ModHandler.addCraftingRecipe(ItemList.Shape_Extruder_Pipe_Medium.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"P ", aTextEmptyRow, " x ", 'P', ItemList.Shape_Empty});
- GT_ModHandler.addCraftingRecipe(ItemList.Shape_Extruder_Sword.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{" P", aTextEmptyRow, " x", 'P', ItemList.Shape_Empty});
- GT_ModHandler.addCraftingRecipe(ItemList.Shape_Extruder_Pickaxe.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{" P", aTextEmptyRow, " x ", 'P', ItemList.Shape_Empty});
- GT_ModHandler.addCraftingRecipe(ItemList.Shape_Extruder_Shovel.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{" P", aTextEmptyRow, "x ", 'P', ItemList.Shape_Empty});
- GT_ModHandler.addCraftingRecipe(ItemList.Shape_Extruder_Axe.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{" P", "x ", aTextEmptyRow, 'P', ItemList.Shape_Empty});
- GT_ModHandler.addCraftingRecipe(ItemList.Shape_Extruder_Hoe.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextEmptyRow, aTextEmptyRow, "x P", 'P', ItemList.Shape_Empty});
- GT_ModHandler.addCraftingRecipe(ItemList.Shape_Extruder_Hammer.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextEmptyRow, "x ", " P", 'P', ItemList.Shape_Empty});
- GT_ModHandler.addCraftingRecipe(ItemList.Shape_Extruder_File.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"x ", aTextEmptyRow, " P", 'P', ItemList.Shape_Empty});
- GT_ModHandler.addCraftingRecipe(ItemList.Shape_Extruder_Saw.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{" x ", aTextEmptyRow, " P", 'P', ItemList.Shape_Empty});
- GT_ModHandler.addCraftingRecipe(ItemList.Shape_Extruder_Gear.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"x ", aTextEmptyRow, "P ", 'P', ItemList.Shape_Empty});
- GT_ModHandler.addCraftingRecipe(ItemList.Shape_Extruder_Pipe_Tiny.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{" x ", aTextEmptyRow, "P ", 'P', ItemList.Shape_Empty});
- GT_ModHandler.addCraftingRecipe(ItemList.Shape_Extruder_Pipe_Huge.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{" x", aTextEmptyRow, "P ", 'P', ItemList.Shape_Empty});
- GT_ModHandler.addCraftingRecipe(ItemList.Shape_Extruder_Bottle.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextEmptyRow, " x", "P ", 'P', ItemList.Shape_Empty});
-
- ItemList.Shape_Slicer_Flat.set(addItem(tLastID = 398, "Slicer Blade (Flat)", "Slicer Blade for cutting Flat", new Object[0]));
- ItemList.Shape_Slicer_Stripes.set(addItem(tLastID = 399, "Slicer Blade (Stripes)", "Slicer Blade for cutting Stripes", new Object[0]));
-
- GT_ModHandler.addCraftingRecipe(ItemList.Shape_Slicer_Flat.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"hXS", aTextShape, "fXd", 'P', ItemList.Shape_Extruder_Block, 'X', OrePrefixes.plate.get(Materials.StainlessSteel), 'S', OrePrefixes.screw.get(Materials.StainlessSteel)});
- GT_ModHandler.addCraftingRecipe(ItemList.Shape_Slicer_Stripes.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"hXS", "XPX", "fXd", 'P', ItemList.Shape_Extruder_Block, 'X', OrePrefixes.plate.get(Materials.StainlessSteel), 'S', OrePrefixes.screw.get(Materials.StainlessSteel)});
-
- ItemList.Fuel_Can_Plastic_Empty.set(addItem(tLastID = 400, "Empty Plastic Fuel Can", "Used to store Fuels", new Object[]{new ItemData(Materials.Plastic, OrePrefixes.plate.mMaterialAmount * 1L, new MaterialStack[0]), new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 1L)}));
- ItemList.Fuel_Can_Plastic_Filled.set(addItem(tLastID = 401, "Plastic Fuel Can", "Burns well in Diesel Generators", new Object[]{new ItemData(Materials.Plastic, OrePrefixes.plate.mMaterialAmount * 1L, new MaterialStack[0]), new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 1L)}));
-
- GT_ModHandler.addCraftingRecipe(ItemList.Fuel_Can_Plastic_Empty.get(7L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{" PP", "P P", "PPP", 'P', OrePrefixes.plate.get(Materials.Plastic)});
-
- ItemList.Spray_Empty.set(addItem(tLastID = 402, "Empty Spray Can", "Used for making Sprays", new Object[]{new ItemData(Materials.Tin, OrePrefixes.plate.mMaterialAmount * 2L, Materials.Redstone, OrePrefixes.dust.mMaterialAmount), new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 1L)}));
-
- GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 1L), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Empty, 1L), ItemList.Spray_Empty.get(1L, new Object[0]), 800, 1);
-
- ItemList.Crate_Empty.set(addItem(tLastID = 403, "Empty Crate", "To Package lots of Material", new Object[]{new ItemData(Materials.Wood, 3628800L, Materials.Iron, OrePrefixes.screw.mMaterialAmount), new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 2L)}));
-
- GT_ModHandler.addCraftingRecipe(ItemList.Crate_Empty.get(4L, new Object[0]), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"SWS", "WdW", "SWS", 'W', OrePrefixes.plank.get(Materials.Wood), 'S', OrePrefixes.screw.get(Materials.AnyIron)});
- GT_ModHandler.addCraftingRecipe(ItemList.Crate_Empty.get(4L, new Object[0]), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"SWS", "WdW", "SWS", 'W', OrePrefixes.plank.get(Materials.Wood), 'S', OrePrefixes.screw.get(Materials.Steel)});
-
- ItemList.ThermosCan_Empty.set(addItem(tLastID = 404, "Empty Thermos Can", "Keeping hot things hot and cold things cold", new Object[]{new ItemData(Materials.Aluminium, OrePrefixes.plate.mMaterialAmount * 1L + 2L * OrePrefixes.ring.mMaterialAmount, new MaterialStack[0]), new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.GELUM, 1L)}));
-
- GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Aluminium, 1L), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Aluminium, 2L), ItemList.ThermosCan_Empty.get(1L, new Object[0]), 800, 1);
-
- ItemList.Large_Fluid_Cell_Steel.set(addItem(tLastID = 405, "Large Steel Fluid Cell", "", new Object[]{new ItemData(Materials.Steel, OrePrefixes.plate.mMaterialAmount * 2L + 2L * OrePrefixes.ring.mMaterialAmount, new MaterialStack[0]), new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 2L)}));
- setFluidContainerStats(32000 + tLastID, 16000L, 16L);
-
- GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Steel, 1L), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Steel, 2L), ItemList.Large_Fluid_Cell_Steel.get(1L, new Object[0]), 100, 64);
-
- ItemList.Large_Fluid_Cell_TungstenSteel.set(addItem(tLastID = 406, "Large Tungstensteel Fluid Cell", "", new Object[]{new ItemData(Materials.TungstenSteel, OrePrefixes.plate.mMaterialAmount * 2L + 2L * OrePrefixes.ring.mMaterialAmount, new MaterialStack[0]), new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 6L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 3L)}));
- setFluidContainerStats(32000 + tLastID, 64000L, 16L);
-
- GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.TungstenSteel, 1L), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.TungstenSteel, 2L), ItemList.Large_Fluid_Cell_TungstenSteel.get(1L, new Object[0]), 200, 256);
- for (byte i = 0; i < 16; i = (byte) (i + 1)) {
- ItemList.SPRAY_CAN_DYES[i].set(addItem(tLastID = 430 + 2 * i, "Spray Can (" + Dyes.get(i).mName + ")", "Full", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 4L)}));
- ItemList.SPRAY_CAN_DYES_USED[i].set(addItem(tLastID + 1, "Spray Can (" + Dyes.get(i).mName + ")", "Used", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 3L), SubTag.INVISIBLE}));
- IItemBehaviour<GT_MetaBase_Item> tBehaviour = new Behaviour_Spray_Color(ItemList.Spray_Empty.get(1L, new Object[0]), ItemList.SPRAY_CAN_DYES_USED[i].get(1L, new Object[0]), ItemList.SPRAY_CAN_DYES[i].get(1L, new Object[0]), 512L, i);
- addItemBehavior(32000 + tLastID, tBehaviour);
- addItemBehavior(32001 + tLastID, tBehaviour);
- }
- ItemList.Tool_Matches.set(addItem(tLastID = 471, "Match", "", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 1L)}));
- ItemList.Tool_MatchBox_Used.set(addItem(tLastID = 472, "Match Box", "This is not a Car", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 1L), SubTag.INVISIBLE}));
- ItemList.Tool_MatchBox_Full.set(addItem(tLastID = 473, "Match Box (Full)", "This is not a Car", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 2L)}));
-
- IItemBehaviour<GT_MetaBase_Item> tBehaviour = new Behaviour_Lighter(null, ItemList.Tool_Matches.get(1L, new Object[0]), ItemList.Tool_Matches.get(1L, new Object[0]), 1L);
- addItemBehavior(32471, tBehaviour);
- tBehaviour = new Behaviour_Lighter(null, ItemList.Tool_MatchBox_Used.get(1L, new Object[0]), ItemList.Tool_MatchBox_Full.get(1L, new Object[0]), 16L);
- addItemBehavior(32472, tBehaviour);
- addItemBehavior(32473, tBehaviour);
-
- GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.bolt, Materials.Wood, 1L), GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Phosphor, 1L), ItemList.Tool_Matches.get(1L, new Object[0]), 16, 16);
- GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.bolt, Materials.Wood, 1L), GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Phosphorus, 1L), ItemList.Tool_Matches.get(1L, new Object[0]), 16, 16);
- GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.bolt, Materials.Wood, 4L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Phosphor, 1L), ItemList.Tool_Matches.get(4L, new Object[0]), 64, 16);
- GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.bolt, Materials.Wood, 4L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Phosphorus, 1L), ItemList.Tool_Matches.get(4L, new Object[0]), 64, 16);
- GT_Values.RA.addBoxingRecipe(ItemList.Tool_Matches.get(16L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Paper, 1L), ItemList.Tool_MatchBox_Full.get(1L, new Object[0]), 64, 16);
- GT_Values.RA.addUnboxingRecipe(ItemList.Tool_MatchBox_Full.get(1L, new Object[0]), ItemList.Tool_Matches.get(16L, new Object[0]), null, 32, 16);
-
- ItemList.Tool_Lighter_Invar_Empty.set(addItem(tLastID = 474, "Lighter (Empty)", "", new Object[]{new ItemData(Materials.Invar, OrePrefixes.plate.mMaterialAmount * 2L, new MaterialStack[0]), new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 1L)}));
- ItemList.Tool_Lighter_Invar_Used.set(addItem(tLastID = 475, "Lighter", "", new Object[]{new ItemData(Materials.Invar, OrePrefixes.plate.mMaterialAmount * 2L, new MaterialStack[0]), new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 1L), SubTag.INVISIBLE}));
- ItemList.Tool_Lighter_Invar_Full.set(addItem(tLastID = 476, "Lighter (Full)", "", new Object[]{new ItemData(Materials.Invar, OrePrefixes.plate.mMaterialAmount * 2L, new MaterialStack[0]), new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 2L)}));
-
- tBehaviour = new Behaviour_Lighter(ItemList.Tool_Lighter_Invar_Empty.get(1L, new Object[0]), ItemList.Tool_Lighter_Invar_Used.get(1L, new Object[0]), ItemList.Tool_Lighter_Invar_Full.get(1L, new Object[0]), 100L);
- addItemBehavior(32475, tBehaviour);
- addItemBehavior(32476, tBehaviour);
-
- GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Invar, 2L), new ItemStack(Items.flint, 1), ItemList.Tool_Lighter_Invar_Empty.get(1L, new Object[0]), 256, 16);
-
- ItemList.Tool_Lighter_Platinum_Empty.set(addItem(tLastID = 477, "Platinum Lighter (Empty)", "A known Prank Master is engraved on it", new Object[]{new ItemData(Materials.Platinum, OrePrefixes.plate.mMaterialAmount * 2L, new MaterialStack[0]), new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.NEBRISUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 1L)}));
- ItemList.Tool_Lighter_Platinum_Used.set(addItem(tLastID = 478, "Platinum Lighter", "A known Prank Master is engraved on it", new Object[]{new ItemData(Materials.Platinum, OrePrefixes.plate.mMaterialAmount * 2L, new MaterialStack[0]), new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.NEBRISUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 1L), SubTag.INVISIBLE}));
- ItemList.Tool_Lighter_Platinum_Full.set(addItem(tLastID = 479, "Platinum Lighter (Full)", "A known Prank Master is engraved on it", new Object[]{new ItemData(Materials.Platinum, OrePrefixes.plate.mMaterialAmount * 2L, new MaterialStack[0]), new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.NEBRISUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 2L)}));
-
- tBehaviour = new Behaviour_Lighter(ItemList.Tool_Lighter_Platinum_Empty.get(1L, new Object[0]), ItemList.Tool_Lighter_Platinum_Used.get(1L, new Object[0]), ItemList.Tool_Lighter_Platinum_Full.get(1L, new Object[0]), 1000L);
- addItemBehavior(32478, tBehaviour);
- addItemBehavior(32479, tBehaviour);
-
- GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Platinum, 2L), new ItemStack(Items.flint, 1), ItemList.Tool_Lighter_Platinum_Empty.get(1L, new Object[0]), 256, 256);
-
- if (Loader.isModLoaded("GalacticraftMars")) {
- ItemList.Ingot_Heavy1.set(addItem(tLastID = 462, "Heavy Duty Alloy Ingot", "Used to make Heavy Duty Plates", new Object[0]));
- ItemList.Ingot_Heavy2.set(addItem(tLastID = 463, "Heavy Duty Alloy Ingot T2", "Used to make Heavy Duty Plates T2", new Object[0]));
- ItemList.Ingot_Heavy3.set(addItem(tLastID = 464, "Heavy Duty Alloy Ingot T3", "Used to make Heavy Duty Plates T3", new Object[0]));
- }
- ItemList.Ingot_IridiumAlloy.set(addItem(tLastID = 480, "Iridium Alloy Ingot", "Used to make Iridium Plates", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 4L)}));
-
- GT_ModHandler.addRollingMachineRecipe(ItemList.Ingot_IridiumAlloy.get(1L, new Object[0]), new Object[]{"IAI", "ADA", "IAI", 'D', GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.harderrecipes, "iridiumplate", true) ? OreDictNames.craftingIndustrialDiamond : OrePrefixes.dust.get(Materials.Diamond), 'A', OrePrefixes.plateAlloy.get("Advanced"), 'I', OrePrefixes.plate.get(Materials.Iridium)});
- GT_ModHandler.addCraftingRecipe(ItemList.Ingot_IridiumAlloy.get(1L, new Object[0]), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"IAI", "ADA", "IAI", 'D', GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.harderrecipes, "iridiumplate", true) ? OreDictNames.craftingIndustrialDiamond : OrePrefixes.dust.get(Materials.Diamond), 'A', OrePrefixes.plateAlloy.get("Advanced"), 'I', OrePrefixes.plate.get(Materials.Iridium)});
-
- ItemList.Paper_Printed_Pages.set(addItem(tLastID = 481, "Printed Pages", "Used to make written Books", new Object[]{new ItemData(Materials.Paper, 10886400L, new MaterialStack[0]), new Behaviour_PrintedPages(), new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 2L)}));
- ItemList.Paper_Magic_Empty.set(addItem(tLastID = 482, "Magic Paper", "", new Object[]{SubTag.INVISIBLE, new ItemData(Materials.Paper, 3628800L, new MaterialStack[0]), new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.PRAECANTATIO, 1L)}));
- ItemList.Paper_Magic_Page.set(addItem(tLastID = 483, "Enchanted Page", "", new Object[]{SubTag.INVISIBLE, new ItemData(Materials.Paper, 3628800L, new MaterialStack[0]), new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.PRAECANTATIO, 2L)}));
- ItemList.Paper_Magic_Pages.set(addItem(tLastID = 484, "Enchanted Pages", "", new Object[]{SubTag.INVISIBLE, new ItemData(Materials.Paper, 10886400L, new MaterialStack[0]), new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.PRAECANTATIO, 4L)}));
- ItemList.Paper_Punch_Card_Empty.set(addItem(tLastID = 485, "Punch Card", "", new Object[]{SubTag.INVISIBLE, new ItemData(Materials.Paper, 7257600L, new MaterialStack[0]), new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 1L)}));
- ItemList.Paper_Punch_Card_Encoded.set(addItem(tLastID = 486, "Punched Card", "", new Object[]{SubTag.INVISIBLE, new ItemData(Materials.Paper, 7257600L, new MaterialStack[0]), new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 2L)}));
- ItemList.Book_Written_01.set(addItem(tLastID = 487, "Book", "", new Object[]{new ItemData(Materials.Paper, 10886400L, new MaterialStack[0]), "bookWritten", OreDictNames.craftingBook, new Behaviour_WrittenBook(), new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 2L)}));
- ItemList.Book_Written_02.set(addItem(tLastID = 488, "Book", "", new Object[]{new ItemData(Materials.Paper, 10886400L, new MaterialStack[0]), "bookWritten", OreDictNames.craftingBook, new Behaviour_WrittenBook(), new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 2L)}));
- ItemList.Book_Written_03.set(addItem(tLastID = 489, "Book", "", new Object[]{new ItemData(Materials.Paper, 10886400L, new MaterialStack[0]), "bookWritten", OreDictNames.craftingBook, new Behaviour_WrittenBook(), new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 2L)}));
-
- ItemList.Schematic.set(addItem(tLastID = 490, "Schematic", "EMPTY", new Object[]{new ItemData(Materials.StainlessSteel, 7257600L, new MaterialStack[0]), new TC_Aspects.TC_AspectStack(TC_Aspects.STRONTIO, 1L)}));
- ItemList.Schematic_Crafting.set(addItem(tLastID = 491, "Schematic (Crafting)", "Crafts the Programmed Recipe", new Object[]{new ItemData(Materials.StainlessSteel, 7257600L, new MaterialStack[0]), new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 1L)}));
- ItemList.Schematic_1by1.set(addItem(tLastID = 495, "Schematic (1x1)", "Crafts 1 Items as 1x1 (use in Packager)", new Object[]{new ItemData(Materials.StainlessSteel, 7257600L, new MaterialStack[0]), new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 1L)}));
- ItemList.Schematic_2by2.set(addItem(tLastID = 496, "Schematic (2x2)", "Crafts 4 Items as 2x2 (use in Packager)", new Object[]{new ItemData(Materials.StainlessSteel, 7257600L, new MaterialStack[0]), new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 1L)}));
- ItemList.Schematic_3by3.set(addItem(tLastID = 497, "Schematic (3x3)", "Crafts 9 Items as 3x3 (use in Packager)", new Object[]{new ItemData(Materials.StainlessSteel, 7257600L, new MaterialStack[0]), new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 1L)}));
- ItemList.Schematic_Dust.set(addItem(tLastID = 498, "Schematic (Dusts)", "Combines Dusts (use in Packager)", new Object[]{new ItemData(Materials.StainlessSteel, 7257600L, new MaterialStack[0]), new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 1L)}));
-
- GT_ModHandler.addCraftingRecipe(ItemList.Schematic_1by1.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"d ", aTextShape, aTextEmptyRow, 'P', ItemList.Schematic});
- GT_ModHandler.addCraftingRecipe(ItemList.Schematic_2by2.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{" d ", aTextShape, aTextEmptyRow, 'P', ItemList.Schematic});
- GT_ModHandler.addCraftingRecipe(ItemList.Schematic_3by3.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{" d", aTextShape, aTextEmptyRow, 'P', ItemList.Schematic});
- GT_ModHandler.addCraftingRecipe(ItemList.Schematic_Dust.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{aTextEmptyRow, aTextShape, " d", 'P', ItemList.Schematic});
-
- GT_ModHandler.addShapelessCraftingRecipe(ItemList.Schematic.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Schematic_Crafting});
- GT_ModHandler.addShapelessCraftingRecipe(ItemList.Schematic.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Schematic_1by1});
- GT_ModHandler.addShapelessCraftingRecipe(ItemList.Schematic.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Schematic_2by2});
- GT_ModHandler.addShapelessCraftingRecipe(ItemList.Schematic.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Schematic_3by3});
- GT_ModHandler.addShapelessCraftingRecipe(ItemList.Schematic.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Schematic_Dust});
-
- ItemList.Battery_Hull_LV.set(addItem(tLastID = 500, "Small Battery Hull", "An empty LV Battery Hull", new Object[]{new ItemData(Materials.BatteryAlloy, OrePrefixes.plate.mMaterialAmount * 1L, new MaterialStack[0]), new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 1L)}));
- ItemList.Battery_Hull_MV.set(addItem(tLastID = 501, "Medium Battery Hull", "An empty MV Battery Hull", new Object[]{new ItemData(Materials.BatteryAlloy, OrePrefixes.plate.mMaterialAmount * 3L, new MaterialStack[0]), new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 1L)}));
- ItemList.Battery_Hull_HV.set(addItem(tLastID = 502, "Large Battery Hull", "An empty HV Battery Hull", new Object[]{new ItemData(Materials.BatteryAlloy, OrePrefixes.plate.mMaterialAmount * 9L, new MaterialStack[0]), new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 1L)}));
-
- GT_ModHandler.addCraftingRecipe(ItemList.Battery_Hull_LV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"C", "P", "P", 'P', OrePrefixes.plate.get(Materials.BatteryAlloy), 'C', OreDictNames.craftingWireTin});
- GT_ModHandler.addCraftingRecipe(ItemList.Battery_Hull_MV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"C C", "PPP", "PPP", 'P', OrePrefixes.plate.get(Materials.BatteryAlloy), 'C', OreDictNames.craftingWireCopper});
-
- ItemList.Battery_RE_ULV_Tantalum.set(addItem(tLastID = 499, "Tantalum Capacitor", "Reusable", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 1L)}));
- setElectricStats(32000 + tLastID, 1000L, GT_Values.V[0], 0L, -3L, false);
-
- ItemList.Battery_SU_LV_SulfuricAcid.set(addItem(tLastID = 510, "Small Acid Battery", "Single Use", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 2L)}));
- setElectricStats(32000 + tLastID, 18000L, GT_Values.V[1], 1L, -2L, true);
- ItemList.Battery_SU_LV_Mercury.set(addItem(tLastID = 511, "Small Mercury Battery", "Single Use", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 2L)}));
- setElectricStats(32000 + tLastID, 32000L, GT_Values.V[1], 1L, -2L, true);
-
- ItemList.Battery_RE_LV_Cadmium.set(addItem(tLastID = 517, "Small Cadmium Battery", "Reusable", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 1L), "calclavia:ADVANCED_BATTERY"}));
- setElectricStats(32000 + tLastID, 75000L, GT_Values.V[1], 1L, -3L, true);
- ItemList.Battery_RE_LV_Lithium.set(addItem(tLastID = 518, "Small Lithium Battery", "Reusable", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 1L), "calclavia:ADVANCED_BATTERY"}));
- setElectricStats(32000 + tLastID, 100000L, GT_Values.V[1], 1L, -3L, true);
- ItemList.Battery_RE_LV_Sodium.set(addItem(tLastID = 519, "Small Sodium Battery", "Reusable", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 1L), "calclavia:ADVANCED_BATTERY"}));
- setElectricStats(32000 + tLastID, 50000L, GT_Values.V[1], 1L, -3L, true);
-
- ItemList.Battery_SU_MV_SulfuricAcid.set(addItem(tLastID = 520, "Medium Acid Battery", "Single Use", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 4L)}));
- setElectricStats(32000 + tLastID, 72000L, GT_Values.V[2], 2L, -2L, true);
- ItemList.Battery_SU_MV_Mercury.set(addItem(tLastID = 521, "Medium Mercury Battery", "Single Use", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 4L)}));
- setElectricStats(32000 + tLastID, 128000L, GT_Values.V[2], 2L, -2L, true);
-
- ItemList.Battery_RE_MV_Cadmium.set(addItem(tLastID = 527, "Medium Cadmium Battery", "Reusable", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 2L)}));
- setElectricStats(32000 + tLastID, 300000L, GT_Values.V[2], 2L, -3L, true);
- ItemList.Battery_RE_MV_Lithium.set(addItem(tLastID = 528, "Medium Lithium Battery", "Reusable", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 2L)}));
- setElectricStats(32000 + tLastID, 400000L, GT_Values.V[2], 2L, -3L, true);
- ItemList.Battery_RE_MV_Sodium.set(addItem(tLastID = 529, "Medium Sodium Battery", "Reusable", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 2L)}));
- setElectricStats(32000 + tLastID, 200000L, GT_Values.V[2], 2L, -3L, true);
-
- ItemList.Battery_SU_HV_SulfuricAcid.set(addItem(tLastID = 530, "Large Acid Battery", "Single Use", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 8L)}));
- setElectricStats(32000 + tLastID, 288000L, GT_Values.V[3], 3L, -2L, true);
- ItemList.Battery_SU_HV_Mercury.set(addItem(tLastID = 531, "Large Mercury Battery", "Single Use", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 8L)}));
- setElectricStats(32000 + tLastID, 512000L, GT_Values.V[3], 3L, -2L, true);
-
- ItemList.Battery_RE_HV_Cadmium.set(addItem(tLastID = 537, "Large Cadmium Battery", "Reusable", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 4L)}));
- setElectricStats(32000 + tLastID, 1200000L, GT_Values.V[3], 3L, -3L, true);
- ItemList.Battery_RE_HV_Lithium.set(addItem(tLastID = 538, "Large Lithium Battery", "Reusable", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 4L)}));
- setElectricStats(32000 + tLastID, 1600000L, GT_Values.V[3], 3L, -3L, true);
- ItemList.Battery_RE_HV_Sodium.set(addItem(tLastID = 539, "Large Sodium Battery", "Reusable", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 4L)}));
- setElectricStats(32000 + tLastID, 800000L, GT_Values.V[3], 3L, -3L, true);
-
- GT_ModHandler.addExtractionRecipe(ItemList.Battery_SU_LV_SulfuricAcid.get(1L, new Object[0]), ItemList.Battery_Hull_LV.get(1L, new Object[0]));
- GT_ModHandler.addExtractionRecipe(ItemList.Battery_SU_LV_Mercury.get(1L, new Object[0]), ItemList.Battery_Hull_LV.get(1L, new Object[0]));
- GT_ModHandler.addExtractionRecipe(ItemList.Battery_SU_MV_SulfuricAcid.get(1L, new Object[0]), ItemList.Battery_Hull_MV.get(1L, new Object[0]));
- GT_ModHandler.addExtractionRecipe(ItemList.Battery_SU_MV_Mercury.get(1L, new Object[0]), ItemList.Battery_Hull_MV.get(1L, new Object[0]));
- GT_ModHandler.addExtractionRecipe(ItemList.Battery_SU_HV_SulfuricAcid.get(1L, new Object[0]), ItemList.Battery_Hull_HV.get(1L, new Object[0]));
- GT_ModHandler.addExtractionRecipe(ItemList.Battery_SU_HV_Mercury.get(1L, new Object[0]), ItemList.Battery_Hull_HV.get(1L, new Object[0]));
- GT_ModHandler.addExtractionRecipe(ItemList.Battery_RE_LV_Cadmium.get(1L, new Object[0]), ItemList.Battery_Hull_LV.get(1L, new Object[0]));
- GT_ModHandler.addExtractionRecipe(ItemList.Battery_RE_LV_Lithium.get(1L, new Object[0]), ItemList.Battery_Hull_LV.get(1L, new Object[0]));
- GT_ModHandler.addExtractionRecipe(ItemList.Battery_RE_LV_Sodium.get(1L, new Object[0]), ItemList.Battery_Hull_LV.get(1L, new Object[0]));
- GT_ModHandler.addExtractionRecipe(ItemList.Battery_RE_MV_Cadmium.get(1L, new Object[0]), ItemList.Battery_Hull_MV.get(1L, new Object[0]));
- GT_ModHandler.addExtractionRecipe(ItemList.Battery_RE_MV_Lithium.get(1L, new Object[0]), ItemList.Battery_Hull_MV.get(1L, new Object[0]));
- GT_ModHandler.addExtractionRecipe(ItemList.Battery_RE_MV_Sodium.get(1L, new Object[0]), ItemList.Battery_Hull_MV.get(1L, new Object[0]));
- GT_ModHandler.addExtractionRecipe(ItemList.Battery_RE_HV_Cadmium.get(1L, new Object[0]), ItemList.Battery_Hull_HV.get(1L, new Object[0]));
- GT_ModHandler.addExtractionRecipe(ItemList.Battery_RE_HV_Lithium.get(1L, new Object[0]), ItemList.Battery_Hull_HV.get(1L, new Object[0]));
- GT_ModHandler.addExtractionRecipe(ItemList.Battery_RE_HV_Sodium.get(1L, new Object[0]), ItemList.Battery_Hull_HV.get(1L, new Object[0]));
-
- GT_Values.RA.addCannerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Cadmium, 2L), ItemList.Battery_Hull_LV.get(1L, new Object[0]), ItemList.Battery_RE_LV_Cadmium.get(1L, new Object[0]), null, 100, 2);
- GT_Values.RA.addCannerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Lithium, 2L), ItemList.Battery_Hull_LV.get(1L, new Object[0]), ItemList.Battery_RE_LV_Lithium.get(1L, new Object[0]), null, 100, 2);
- GT_Values.RA.addCannerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sodium, 2L), ItemList.Battery_Hull_LV.get(1L, new Object[0]), ItemList.Battery_RE_LV_Sodium.get(1L, new Object[0]), null, 100, 2);
- GT_Values.RA.addCannerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Cadmium, 8L), ItemList.Battery_Hull_MV.get(1L, new Object[0]), ItemList.Battery_RE_MV_Cadmium.get(1L, new Object[0]), null, 400, 2);
- GT_Values.RA.addCannerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Lithium, 8L), ItemList.Battery_Hull_MV.get(1L, new Object[0]), ItemList.Battery_RE_MV_Lithium.get(1L, new Object[0]), null, 400, 2);
- GT_Values.RA.addCannerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sodium, 8L), ItemList.Battery_Hull_MV.get(1L, new Object[0]), ItemList.Battery_RE_MV_Sodium.get(1L, new Object[0]), null, 400, 2);
- GT_Values.RA.addCannerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Cadmium, 32L), ItemList.Battery_Hull_HV.get(1L, new Object[0]), ItemList.Battery_RE_HV_Cadmium.get(1L, new Object[0]), null, 1600, 2);
- GT_Values.RA.addCannerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Lithium, 32L), ItemList.Battery_Hull_HV.get(1L, new Object[0]), ItemList.Battery_RE_HV_Lithium.get(1L, new Object[0]), null, 1600, 2);
- GT_Values.RA.addCannerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sodium, 32L), ItemList.Battery_Hull_HV.get(1L, new Object[0]), ItemList.Battery_RE_HV_Sodium.get(1L, new Object[0]), null, 1600, 2);
-
- ItemList.Energy_LapotronicOrb.set(addItem(tLastID = 597, "Lapotronic Energy Orb", "", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 16L), OrePrefixes.battery.get(Materials.Ultimate)}));
- setElectricStats(32000 + tLastID, 100000000L, GT_Values.V[5], 5L, -3L, true);
-
- ItemList.ZPM.set(addItem(tLastID = 598, "Zero Point Module", "", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 64L), new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 64L)}));
- setElectricStats(32000 + tLastID, 2000000000000L, GT_Values.V[7], 7L, -2L, true);
-
- ItemList.Energy_LapotronicOrb2.set(addItem(tLastID = 599, "Lapotronic Energy Orb Cluster", "", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 16L), OrePrefixes.battery.get(Materials.Ultimate)}));
- setElectricStats(32000 + tLastID, 1000000000L, GT_Values.V[6], 6L, -3L, true);
-
- ItemList.ZPM2.set(addItem(tLastID = 605, "Ultimate Battery", "Fill this to win minecraft", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 64L), new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 64L)}));
- setElectricStats(32000 + tLastID, Long.MAX_VALUE, GT_Values.V[8], 8L, -3L, true);
-
- ItemList.Electric_Motor_LV.set(addItem(tLastID = 600, "Electric Motor (LV)", "", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 1L)}));
- ItemList.Electric_Motor_MV.set(addItem(tLastID = 601, "Electric Motor (MV)", "", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 2L)}));
- ItemList.Electric_Motor_HV.set(addItem(tLastID = 602, "Electric Motor (HV)", "", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 4L)}));
- ItemList.Electric_Motor_EV.set(addItem(tLastID = 603, "Electric Motor (EV)", "", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 8L)}));
- ItemList.Electric_Motor_IV.set(addItem(tLastID = 604, "Electric Motor (IV)", "", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 16L)}));
- ItemList.Electric_Motor_LuV.set(addItem(tLastID = 606, "Electric Motor (LuV)", "", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 24L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 24L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 24L)}));
- ItemList.Electric_Motor_ZPM.set(addItem(tLastID = 607, "Electric Motor (ZPM)", "", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 32L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 32L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 32L)}));
- ItemList.Electric_Motor_UV.set(addItem(tLastID = 608, "Electric Motor (UV)", "", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 48L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 48L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 48L)}));
-
- GT_ModHandler.addCraftingRecipe(ItemList.Electric_Motor_LV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"CWR", "WIW", "RWC", 'I', OrePrefixes.stick.get(Materials.IronMagnetic), 'R', OrePrefixes.stick.get(Materials.AnyIron), 'W', OrePrefixes.wireGt01.get(Materials.AnyCopper), 'C', OrePrefixes.cableGt01.get(Materials.Tin)});
- GT_ModHandler.addCraftingRecipe(ItemList.Electric_Motor_LV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"CWR", "WIW", "RWC", 'I', OrePrefixes.stick.get(Materials.SteelMagnetic), 'R', OrePrefixes.stick.get(Materials.Steel), 'W', OrePrefixes.wireGt01.get(Materials.AnyCopper), 'C', OrePrefixes.cableGt01.get(Materials.Tin)});
- GT_ModHandler.addCraftingRecipe(ItemList.Electric_Motor_MV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"CWR", "WIW", "RWC", 'I', OrePrefixes.stick.get(Materials.SteelMagnetic), 'R', OrePrefixes.stick.get(Materials.Aluminium), 'W', OrePrefixes.wireGt02.get(Materials.AnyCopper), 'C', OrePrefixes.cableGt01.get(Materials.AnyCopper)});
- GT_ModHandler.addCraftingRecipe(ItemList.Electric_Motor_HV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"CWR", "WIW", "RWC", 'I', OrePrefixes.stick.get(Materials.SteelMagnetic), 'R', OrePrefixes.stick.get(Materials.StainlessSteel), 'W', OrePrefixes.wireGt04.get(Materials.AnyCopper), 'C', OrePrefixes.cableGt01.get(Materials.Gold)});
- GT_ModHandler.addCraftingRecipe(ItemList.Electric_Motor_EV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"CWR", "WIW", "RWC", 'I', OrePrefixes.stick.get(Materials.NeodymiumMagnetic), 'R', OrePrefixes.stick.get(Materials.Titanium), 'W', OrePrefixes.wireGt08.get(Materials.AnnealedCopper), 'C', OrePrefixes.cableGt01.get(Materials.Aluminium)});
- GT_ModHandler.addCraftingRecipe(ItemList.Electric_Motor_IV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"CWR", "WIW", "RWC", 'I', OrePrefixes.stick.get(Materials.NeodymiumMagnetic), 'R', OrePrefixes.stick.get(Materials.TungstenSteel), 'W', OrePrefixes.wireGt16.get(Materials.AnnealedCopper), 'C', OrePrefixes.cableGt01.get(Materials.Tungsten)});
-
- ItemList.Electric_Pump_LV.set(addItem(tLastID = 610, "Electric Pump (LV)", "640 L/sec (as Cover)", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L)}));
- ItemList.Electric_Pump_MV.set(addItem(tLastID = 611, "Electric Pump (MV)", "2560 L/sec (as Cover)", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 2L)}));
- ItemList.Electric_Pump_HV.set(addItem(tLastID = 612, "Electric Pump (HV)", "10240 L/sec (as Cover)", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 4L)}));
- ItemList.Electric_Pump_EV.set(addItem(tLastID = 613, "Electric Pump (EV)", "40.960 L/sec (as Cover)", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 8L)}));
- ItemList.Electric_Pump_IV.set(addItem(tLastID = 614, "Electric Pump (IV)", "163.840 L/sec (as Cover)", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 16L)}));
- ItemList.Electric_Pump_LuV.set(addItem(tLastID = 620, "Electric Pump (LuV)", "655.360 L/sec (as Cover)", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 16L)}));
- ItemList.Electric_Pump_ZPM.set(addItem(tLastID = 621, "Electric Pump (ZPM)", "2.621.440 L/sec (as Cover)", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 16L)}));
- ItemList.Electric_Pump_UV.set(addItem(tLastID = 622, "Electric Pump (UV)", "10.485.760 L/sec (as Cover)", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 16L)}));
-
- GregTech_API.registerCover(ItemList.Electric_Pump_LV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[1][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP)}), new GT_Cover_Pump(32));
- GregTech_API.registerCover(ItemList.Electric_Pump_MV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[2][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP)}), new GT_Cover_Pump(128));
- GregTech_API.registerCover(ItemList.Electric_Pump_HV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[3][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP)}), new GT_Cover_Pump(512));
- GregTech_API.registerCover(ItemList.Electric_Pump_EV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[4][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP)}), new GT_Cover_Pump(2048));
- GregTech_API.registerCover(ItemList.Electric_Pump_IV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[5][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP)}), new GT_Cover_Pump(8192));
- GregTech_API.registerCover(ItemList.Electric_Pump_LuV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[6][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP)}), new GT_Cover_Pump(32768));
- GregTech_API.registerCover(ItemList.Electric_Pump_ZPM.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[7][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP)}), new GT_Cover_Pump(131072));
- GregTech_API.registerCover(ItemList.Electric_Pump_UV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[8][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP)}), new GT_Cover_Pump(524288));
-
- ItemList.FluidRegulator_LV.set(addItem(tLastID = 615, "Fluid Regulator (LV)", "Configuable up to 640 L/sec (as Cover)", new Object[]{}));
- ItemList.FluidRegulator_MV.set(addItem(tLastID = 616, "Fluid Regulator (MV)", "Configuable up to 2560 L/sec (as Cover)", new Object[]{}));
- ItemList.FluidRegulator_HV.set(addItem(tLastID = 617, "Fluid Regulator (HV)", "Configuable up to 10240 L/sec (as Cover)", new Object[]{}));
- ItemList.FluidRegulator_EV.set(addItem(tLastID = 618, "Fluid Regulator (EV)", "Configuable up to 40960 L/sec (as Cover)", new Object[]{}));
- ItemList.FluidRegulator_IV.set(addItem(tLastID = 619, "Fluid Regulator (IV)", "Configuable up to 163840 L/sec (as Cover)", new Object[]{}));
-
- GregTech_API.registerCover(ItemList.FluidRegulator_LV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[1][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP)}), new GT_Cover_FluidRegulator(32));
- GregTech_API.registerCover(ItemList.FluidRegulator_MV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[2][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP)}), new GT_Cover_FluidRegulator(128));
- GregTech_API.registerCover(ItemList.FluidRegulator_HV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[3][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP)}), new GT_Cover_FluidRegulator(512));
- GregTech_API.registerCover(ItemList.FluidRegulator_EV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[4][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP)}), new GT_Cover_FluidRegulator(2048));
- GregTech_API.registerCover(ItemList.FluidRegulator_IV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[5][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP)}), new GT_Cover_FluidRegulator(8192));
-
- ItemList.FluidFilter.set(addItem(tLastID = 635, "Fluid Filter", "Set with Fluid Container to only accept one Fluid Type", new Object[]{}));
- GregTech_API.registerCover(ItemList.FluidFilter.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[1][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SHUTTER)}), new GT_Cover_Fluidfilter());
-
- /**ItemList.Rotor_LV.set(addItem(tLastID = 620, "Tin Rotor", "", new Object[] { OrePrefixes.rotor.get(Materials.Tin), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 1L) }));
- ItemList.Rotor_MV.set(addItem(tLastID = 621, "Bronze Rotor", "", new Object[] { OrePrefixes.rotor.get(Materials.Bronze), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 2L) }));
- ItemList.Rotor_HV.set(addItem(tLastID = 622, "Steel Rotor", "", new Object[] { OrePrefixes.rotor.get(Materials.Steel), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 4L) }));
- ItemList.Rotor_EV.set(addItem(tLastID = 623, "Stainless Steel Rotor", "", new Object[] { OrePrefixes.rotor.get(Materials.StainlessSteel), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 8L) }));
- ItemList.Rotor_IV.set(addItem(tLastID = 624, "Tungstensteel Rotor", "", new Object[] { OrePrefixes.rotor.get(Materials.TungstenSteel), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 16L) }));
- ItemList.Rotor_LuV.set(ItemList.Rotor_IV.get(1L, new Object[0]));
- ItemList.Rotor_ZPM.set(ItemList.Rotor_LuV.get(1L, new Object[0]));
- ItemList.Rotor_UV.set(ItemList.Rotor_ZPM.get(1L, new Object[0]));**/
-
- GT_ModHandler.addCraftingRecipe(ItemList.Electric_Pump_LV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SXO", "dPw", "OMW", 'M', ItemList.Electric_Motor_LV, 'O', OrePrefixes.ring.get(Materials.Paper ), 'X', OrePrefixes.rotor.get(Materials.Tin), 'S', OrePrefixes.screw.get(Materials.Tin), 'W', OrePrefixes.cableGt01.get(Materials.Tin), 'P', OrePrefixes.pipeMedium.get(Materials.Bronze)});
- GT_ModHandler.addCraftingRecipe(ItemList.Electric_Pump_LV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SXO", "dPw", "OMW", 'M', ItemList.Electric_Motor_LV, 'O', OrePrefixes.ring.get(Materials.Rubber), 'X', OrePrefixes.rotor.get(Materials.Tin), 'S', OrePrefixes.screw.get(Materials.Tin), 'W', OrePrefixes.cableGt01.get(Materials.Tin), 'P', OrePrefixes.pipeMedium.get(Materials.Bronze)});
- GT_ModHandler.addCraftingRecipe(ItemList.Electric_Pump_MV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SXO", "dPw", "OMW", 'M', ItemList.Electric_Motor_MV, 'O', OrePrefixes.ring.get(Materials.Rubber), 'X', OrePrefixes.rotor.get(Materials.Bronze), 'S', OrePrefixes.screw.get(Materials.Bronze), 'W', OrePrefixes.cableGt01.get(Materials.AnyCopper), 'P', OrePrefixes.pipeMedium.get(Materials.Steel)});
- GT_ModHandler.addCraftingRecipe(ItemList.Electric_Pump_HV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SXO", "dPw", "OMW", 'M', ItemList.Electric_Motor_HV, 'O', OrePrefixes.ring.get(Materials.Rubber), 'X', OrePrefixes.rotor.get(Materials.Steel), 'S', OrePrefixes.screw.get(Materials.Steel), 'W', OrePrefixes.cableGt01.get(Materials.Gold), 'P', OrePrefixes.pipeMedium.get(Materials.StainlessSteel)});
- GT_ModHandler.addCraftingRecipe(ItemList.Electric_Pump_EV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SXO", "dPw", "OMW", 'M', ItemList.Electric_Motor_EV, 'O', OrePrefixes.ring.get(Materials.Silicone), 'X', OrePrefixes.rotor.get(Materials.StainlessSteel), 'S', OrePrefixes.screw.get(Materials.StainlessSteel), 'W', OrePrefixes.cableGt01.get(Materials.Aluminium), 'P', OrePrefixes.pipeMedium.get(Materials.Titanium)});
- GT_ModHandler.addCraftingRecipe(ItemList.Electric_Pump_IV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SXO", "dPw", "OMW", 'M', ItemList.Electric_Motor_IV, 'O', OrePrefixes.ring.get(Materials.Silicone), 'X', OrePrefixes.rotor.get(Materials.TungstenSteel), 'S', OrePrefixes.screw.get(Materials.TungstenSteel), 'W', OrePrefixes.cableGt01.get(Materials.Tungsten), 'P', OrePrefixes.pipeMedium.get(Materials.TungstenSteel)});
-
- ItemList.Conveyor_Module_LV.set(addItem(tLastID = 630, "Conveyor Module (LV)", "1 Stack every 20 secs (as Cover)", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 1L)}));
- ItemList.Conveyor_Module_MV.set(addItem(tLastID = 631, "Conveyor Module (MV)", "1 Stack every 5 secs (as Cover)", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 2L)}));
- ItemList.Conveyor_Module_HV.set(addItem(tLastID = 632, "Conveyor Module (HV)", "1 Stack every 1 sec (as Cover)", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 4L)}));
- ItemList.Conveyor_Module_EV.set(addItem(tLastID = 633, "Conveyor Module (EV)", "1 Stack every 1/5 sec (as Cover)", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 8L)}));
- ItemList.Conveyor_Module_IV.set(addItem(tLastID = 634, "Conveyor Module (IV)", "1 Stack every 1/20 sec (as Cover)", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 16L)}));
- ItemList.Conveyor_Module_LuV.set(addItem(tLastID = 636, "Conveyor Module (LuV)", "1 Stack every 1/20 sec (as Cover)", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 16L)}));
- ItemList.Conveyor_Module_ZPM.set(addItem(tLastID = 637, "Conveyor Module (ZPM)", "1 Stack every 1/20 sec (as Cover)", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 16L)}));
- ItemList.Conveyor_Module_UV.set(addItem(tLastID = 638, "Conveyor Module (UV)", "1 Stack every 1/20 sec (as Cover)", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 16L)}));
-
- GT_ModHandler.addCraftingRecipe(ItemList.Conveyor_Module_LV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"RRR", "MCM", "RRR", 'M', ItemList.Electric_Motor_LV, 'C', OrePrefixes.cableGt01.get(Materials.Tin), 'R', OrePrefixes.plate.get(Materials.Rubber)});
- GT_ModHandler.addCraftingRecipe(ItemList.Conveyor_Module_MV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"RRR", "MCM", "RRR", 'M', ItemList.Electric_Motor_MV, 'C', OrePrefixes.cableGt01.get(Materials.AnyCopper), 'R', OrePrefixes.plate.get(Materials.Rubber)});
- GT_ModHandler.addCraftingRecipe(ItemList.Conveyor_Module_HV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"RRR", "MCM", "RRR", 'M', ItemList.Electric_Motor_HV, 'C', OrePrefixes.cableGt01.get(Materials.Gold), 'R', OrePrefixes.plate.get(Materials.Rubber)});
- GT_ModHandler.addCraftingRecipe(ItemList.Conveyor_Module_EV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"RRR", "MCM", "RRR", 'M', ItemList.Electric_Motor_EV, 'C', OrePrefixes.cableGt01.get(Materials.Aluminium), 'R', OrePrefixes.plate.get(Materials.Rubber)});
- GT_ModHandler.addCraftingRecipe(ItemList.Conveyor_Module_IV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"RRR", "MCM", "RRR", 'M', ItemList.Electric_Motor_IV, 'C', OrePrefixes.cableGt01.get(Materials.Tungsten), 'R', OrePrefixes.plate.get(Materials.Rubber)});
-
- GregTech_API.registerCover(ItemList.Conveyor_Module_LV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[1][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_CONVEYOR)}), new GT_Cover_Conveyor(400));
- GregTech_API.registerCover(ItemList.Conveyor_Module_MV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[2][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_CONVEYOR)}), new GT_Cover_Conveyor(100));
- GregTech_API.registerCover(ItemList.Conveyor_Module_HV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[3][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_CONVEYOR)}), new GT_Cover_Conveyor(20));
- GregTech_API.registerCover(ItemList.Conveyor_Module_EV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[4][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_CONVEYOR)}), new GT_Cover_Conveyor(4));
- GregTech_API.registerCover(ItemList.Conveyor_Module_IV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[5][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_CONVEYOR)}), new GT_Cover_Conveyor(1));
- GregTech_API.registerCover(ItemList.Conveyor_Module_LuV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[6][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_CONVEYOR)}), new GT_Cover_Conveyor(1));
- GregTech_API.registerCover(ItemList.Conveyor_Module_ZPM.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[7][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_CONVEYOR)}), new GT_Cover_Conveyor(1));
- GregTech_API.registerCover(ItemList.Conveyor_Module_UV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[8][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_CONVEYOR)}), new GT_Cover_Conveyor(1));
-
- ItemList.Electric_Piston_LV.set(addItem(tLastID = 640, "Electric Piston (LV)", "", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 1L)}));
- ItemList.Electric_Piston_MV.set(addItem(tLastID = 641, "Electric Piston (MV)", "", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 2L)}));
- ItemList.Electric_Piston_HV.set(addItem(tLastID = 642, "Electric Piston (HV)", "", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 4L)}));
- ItemList.Electric_Piston_EV.set(addItem(tLastID = 643, "Electric Piston (EV)", "", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 8L)}));
- ItemList.Electric_Piston_IV.set(addItem(tLastID = 644, "Electric Piston (IV)", "", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 32L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 16L)}));
- ItemList.Electric_Piston_LuV.set(addItem(tLastID = 645, "Electric Piston (LuV)", "", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 32L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 16L)}));
- ItemList.Electric_Piston_ZPM.set(addItem(tLastID = 646, "Electric Piston (ZPM)", "", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 32L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 16L)}));
- ItemList.Electric_Piston_UV.set(addItem(tLastID = 647, "Electric Piston (UV)", "", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 32L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 16L)}));
-
- GT_ModHandler.addCraftingRecipe(ItemList.Electric_Piston_LV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"PPP", "CSS", "CMG", 'P', OrePrefixes.plate.get(Materials.Steel), 'S', OrePrefixes.stick.get(Materials.Steel), 'G', OrePrefixes.gearGtSmall.get(Materials.Steel), 'M', ItemList.Electric_Motor_LV, 'C', OrePrefixes.cableGt01.get(Materials.Tin)});
- GT_ModHandler.addCraftingRecipe(ItemList.Electric_Piston_MV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"PPP", "CSS", "CMG", 'P', OrePrefixes.plate.get(Materials.Aluminium), 'S', OrePrefixes.stick.get(Materials.Aluminium), 'G', OrePrefixes.gearGtSmall.get(Materials.Aluminium), 'M', ItemList.Electric_Motor_MV, 'C', OrePrefixes.cableGt01.get(Materials.AnyCopper)});
- GT_ModHandler.addCraftingRecipe(ItemList.Electric_Piston_HV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"PPP", "CSS", "CMG", 'P', OrePrefixes.plate.get(Materials.StainlessSteel), 'S', OrePrefixes.stick.get(Materials.StainlessSteel), 'G', OrePrefixes.gearGtSmall.get(Materials.StainlessSteel), 'M', ItemList.Electric_Motor_HV, 'C', OrePrefixes.cableGt01.get(Materials.Gold)});
- GT_ModHandler.addCraftingRecipe(ItemList.Electric_Piston_EV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"PPP", "CSS", "CMG", 'P', OrePrefixes.plate.get(Materials.Titanium), 'S', OrePrefixes.stick.get(Materials.Titanium), 'G', OrePrefixes.gearGtSmall.get(Materials.Titanium), 'M', ItemList.Electric_Motor_EV, 'C', OrePrefixes.cableGt01.get(Materials.Aluminium)});
- GT_ModHandler.addCraftingRecipe(ItemList.Electric_Piston_IV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"PPP", "CSS", "CMG", 'P', OrePrefixes.plate.get(Materials.TungstenSteel), 'S', OrePrefixes.stick.get(Materials.TungstenSteel), 'G', OrePrefixes.gearGtSmall.get(Materials.TungstenSteel), 'M', ItemList.Electric_Motor_IV, 'C', OrePrefixes.cableGt01.get(Materials.Tungsten)});
-
- ItemList.Robot_Arm_LV.set(addItem(tLastID = 650, "Robot Arm (LV)", "Inserts into specific Slots (as Cover)", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 1L)}));
- ItemList.Robot_Arm_MV.set(addItem(tLastID = 651, "Robot Arm (MV)", "Inserts into specific Slots (as Cover)", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 2L)}));
- ItemList.Robot_Arm_HV.set(addItem(tLastID = 652, "Robot Arm (HV)", "Inserts into specific Slots (as Cover)", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 4L)}));
- ItemList.Robot_Arm_EV.set(addItem(tLastID = 653, "Robot Arm (EV)", "Inserts into specific Slots (as Cover)", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 8L)}));
- ItemList.Robot_Arm_IV.set(addItem(tLastID = 654, "Robot Arm (IV)", "Inserts into specific Slots (as Cover)", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 32L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 16L)}));
- ItemList.Robot_Arm_LuV.set(addItem(tLastID = 655, "Robot Arm (LuV)", "Inserts into specific Slots (as Cover)", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 32L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 16L)}));
- ItemList.Robot_Arm_ZPM.set(addItem(tLastID = 656, "Robot Arm (ZPM)", "Inserts into specific Slots (as Cover)", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 32L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 16L)}));
- ItemList.Robot_Arm_UV.set(addItem(tLastID = 657, "Robot Arm (UV)", "Inserts into specific Slots (as Cover)", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 32L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 16L)}));
-
- GT_ModHandler.addCraftingRecipe(ItemList.Robot_Arm_LV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"CCC", "MSM", "PES", 'S', OrePrefixes.stick.get(Materials.Steel), 'M', ItemList.Electric_Motor_LV, 'P', ItemList.Electric_Piston_LV, 'E', OrePrefixes.circuit.get(Materials.Basic), 'C', OrePrefixes.cableGt01.get(Materials.Tin)});
- GT_ModHandler.addCraftingRecipe(ItemList.Robot_Arm_MV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"CCC", "MSM", "PES", 'S', OrePrefixes.stick.get(Materials.Aluminium), 'M', ItemList.Electric_Motor_MV, 'P', ItemList.Electric_Piston_MV, 'E', OrePrefixes.circuit.get(Materials.Good), 'C', OrePrefixes.cableGt01.get(Materials.AnyCopper)});
- GT_ModHandler.addCraftingRecipe(ItemList.Robot_Arm_HV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"CCC", "MSM", "PES", 'S', OrePrefixes.stick.get(Materials.StainlessSteel), 'M', ItemList.Electric_Motor_HV, 'P', ItemList.Electric_Piston_HV, 'E', OrePrefixes.circuit.get(Materials.Advanced), 'C', OrePrefixes.cableGt01.get(Materials.Gold)});
- GT_ModHandler.addCraftingRecipe(ItemList.Robot_Arm_EV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"CCC", "MSM", "PES", 'S', OrePrefixes.stick.get(Materials.Titanium), 'M', ItemList.Electric_Motor_EV, 'P', ItemList.Electric_Piston_EV, 'E', OrePrefixes.circuit.get(Materials.Data), 'C', OrePrefixes.cableGt01.get(Materials.Aluminium)});
- GT_ModHandler.addCraftingRecipe(ItemList.Robot_Arm_IV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"CCC", "MSM", "PES", 'S', OrePrefixes.stick.get(Materials.TungstenSteel), 'M', ItemList.Electric_Motor_IV, 'P', ItemList.Electric_Piston_IV, 'E', OrePrefixes.circuit.get(Materials.Elite), 'C', OrePrefixes.cableGt01.get(Materials.Tungsten)});
-
- GregTech_API.registerCover(ItemList.Robot_Arm_LV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[1][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ARM)}), new GT_Cover_Arm(400));
- GregTech_API.registerCover(ItemList.Robot_Arm_MV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[2][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ARM)}), new GT_Cover_Arm(100));
- GregTech_API.registerCover(ItemList.Robot_Arm_HV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[3][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ARM)}), new GT_Cover_Arm(20));
- GregTech_API.registerCover(ItemList.Robot_Arm_EV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[4][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ARM)}), new GT_Cover_Arm(4));
- GregTech_API.registerCover(ItemList.Robot_Arm_IV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[5][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ARM)}), new GT_Cover_Arm(1));
- GregTech_API.registerCover(ItemList.Robot_Arm_LuV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[6][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ARM)}), new GT_Cover_Arm(1));
- GregTech_API.registerCover(ItemList.Robot_Arm_ZPM.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[7][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ARM)}), new GT_Cover_Arm(1));
- GregTech_API.registerCover(ItemList.Robot_Arm_UV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[8][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ARM)}), new GT_Cover_Arm(1));
-
- ItemList.Field_Generator_LV.set(addItem(tLastID = 670, "Field Generator (LV)", "", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 1L)}));
- ItemList.Field_Generator_MV.set(addItem(tLastID = 671, "Field Generator (MV)", "", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 2L)}));
- ItemList.Field_Generator_HV.set(addItem(tLastID = 672, "Field Generator (HV)", "", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 4L)}));
- ItemList.Field_Generator_EV.set(addItem(tLastID = 673, "Field Generator (EV)", "", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 8L)}));
- ItemList.Field_Generator_IV.set(addItem(tLastID = 674, "Field Generator (IV)", "", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 32L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 16L)}));
- ItemList.Field_Generator_LuV.set(addItem(tLastID = 675, "Field Generator (LuV)", "", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 32L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 16L)}));
- ItemList.Field_Generator_ZPM.set(addItem(tLastID = 676, "Field Generator (ZPM)", "", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 32L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 16L)}));
- ItemList.Field_Generator_UV.set(addItem(tLastID = 677, "Field Generator (UV)", "", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 32L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 16L)}));
-
- GT_ModHandler.addCraftingRecipe(ItemList.Field_Generator_LV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"WCW", "CGC", "WCW", 'G', OrePrefixes.gem.get(Materials.EnderPearl), 'C', OrePrefixes.circuit.get(Materials.Basic), 'W', OrePrefixes.wireGt01.get(Materials.Osmium)});
- GT_ModHandler.addCraftingRecipe(ItemList.Field_Generator_MV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"WCW", "CGC", "WCW", 'G', OrePrefixes.gem.get(Materials.EnderEye), 'C', OrePrefixes.circuit.get(Materials.Good), 'W', OrePrefixes.wireGt02.get(Materials.Osmium)});
-
- ItemList.Emitter_LV.set(addItem(tLastID = 680, "Emitter (LV)", "", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.LUX, 1L)}));
- ItemList.Emitter_MV.set(addItem(tLastID = 681, "Emitter (MV)", "", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.LUX, 2L)}));
- ItemList.Emitter_HV.set(addItem(tLastID = 682, "Emitter (HV)", "", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.LUX, 4L)}));
- ItemList.Emitter_EV.set(addItem(tLastID = 683, "Emitter (EV)", "", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.LUX, 8L)}));
- ItemList.Emitter_IV.set(addItem(tLastID = 684, "Emitter (IV)", "", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.LUX, 16L)}));
- ItemList.Emitter_LuV.set(addItem(tLastID = 685, "Emitter (LuV)", "", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.LUX, 16L)}));
- ItemList.Emitter_ZPM.set(addItem(tLastID = 686, "Emitter (ZPM)", "", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.LUX, 16L)}));
- ItemList.Emitter_UV.set(addItem(tLastID = 687, "Emitter (UV)", "", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.LUX, 16L)}));
-
- GT_ModHandler.addCraftingRecipe(ItemList.Emitter_LV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SSC", "WQS", "CWS", 'Q', OrePrefixes.gem.get(Materials.Quartzite), 'S', OrePrefixes.stick.get(Materials.Brass), 'C', OrePrefixes.circuit.get(Materials.Basic), 'W', OrePrefixes.cableGt01.get(Materials.Tin)});
- GT_ModHandler.addCraftingRecipe(ItemList.Emitter_MV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SSC", "WQS", "CWS", 'Q', OrePrefixes.gem.get(Materials.NetherQuartz), 'S', OrePrefixes.stick.get(Materials.Electrum), 'C', OrePrefixes.circuit.get(Materials.Good), 'W', OrePrefixes.cableGt01.get(Materials.AnyCopper)});
- GT_ModHandler.addCraftingRecipe(ItemList.Emitter_HV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SSC", "WQS", "CWS", 'Q', OrePrefixes.gem.get(Materials.Emerald), 'S', OrePrefixes.stick.get(Materials.Chrome), 'C', OrePrefixes.circuit.get(Materials.Advanced), 'W', OrePrefixes.cableGt01.get(Materials.Gold)});
- GT_ModHandler.addCraftingRecipe(ItemList.Emitter_EV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SSC", "WQS", "CWS", 'Q', OrePrefixes.gem.get(Materials.EnderPearl), 'S', OrePrefixes.stick.get(Materials.Platinum), 'C', OrePrefixes.circuit.get(Materials.Data), 'W', OrePrefixes.cableGt01.get(Materials.Aluminium)});
- GT_ModHandler.addCraftingRecipe(ItemList.Emitter_IV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SSC", "WQS", "CWS", 'Q', OrePrefixes.gem.get(Materials.EnderEye), 'S', OrePrefixes.stick.get(Materials.Osmium), 'C', OrePrefixes.circuit.get(Materials.Elite), 'W', OrePrefixes.cableGt01.get(Materials.Tungsten)});
-
- ItemList.Sensor_LV.set(addItem(tLastID = 690, "Sensor (LV)", "", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 1L)}));
- ItemList.Sensor_MV.set(addItem(tLastID = 691, "Sensor (MV)", "", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 2L)}));
- ItemList.Sensor_HV.set(addItem(tLastID = 692, "Sensor (HV)", "", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 4L)}));
- ItemList.Sensor_EV.set(addItem(tLastID = 693, "Sensor (EV)", "", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 8L)}));
- ItemList.Sensor_IV.set(addItem(tLastID = 694, "Sensor (IV)", "", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 16L)}));
- ItemList.Sensor_LuV.set(addItem(tLastID = 695, "Sensor (LuV)", "", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 16L)}));
- ItemList.Sensor_ZPM.set(addItem(tLastID = 696, "Sensor (ZPM)", "", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 16L)}));
- ItemList.Sensor_UV.set(addItem(tLastID = 697, "Sensor (UV)", "", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 16L)}));
-
- GT_ModHandler.addCraftingRecipe(ItemList.Sensor_LV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"P Q", "PS ", "CPP", 'Q', OrePrefixes.gem.get(Materials.Quartzite), 'S', OrePrefixes.stick.get(Materials.Brass), 'P', OrePrefixes.plate.get(Materials.Steel), 'C', OrePrefixes.circuit.get(Materials.Basic)});
- GT_ModHandler.addCraftingRecipe(ItemList.Sensor_MV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"P Q", "PS ", "CPP", 'Q', OrePrefixes.gem.get(Materials.NetherQuartz), 'S', OrePrefixes.stick.get(Materials.Electrum), 'P', OrePrefixes.plate.get(Materials.Aluminium), 'C', OrePrefixes.circuit.get(Materials.Good)});
- GT_ModHandler.addCraftingRecipe(ItemList.Sensor_HV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"P Q", "PS ", "CPP", 'Q', OrePrefixes.gem.get(Materials.Emerald), 'S', OrePrefixes.stick.get(Materials.Chrome), 'P', OrePrefixes.plate.get(Materials.StainlessSteel), 'C', OrePrefixes.circuit.get(Materials.Advanced)});
- GT_ModHandler.addCraftingRecipe(ItemList.Sensor_EV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"P Q", "PS ", "CPP", 'Q', OrePrefixes.gem.get(Materials.EnderPearl), 'S', OrePrefixes.stick.get(Materials.Platinum), 'P', OrePrefixes.plate.get(Materials.Titanium), 'C', OrePrefixes.circuit.get(Materials.Data)});
- GT_ModHandler.addCraftingRecipe(ItemList.Sensor_IV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"P Q", "PS ", "CPP", 'Q', OrePrefixes.gem.get(Materials.EnderEye), 'S', OrePrefixes.stick.get(Materials.Osmium), 'P', OrePrefixes.plate.get(Materials.TungstenSteel), 'C', OrePrefixes.circuit.get(Materials.Elite)});
-
- ItemList.Circuit_Primitive.set(addItem(tLastID = 700, "Vacuum Tube", "A very simple Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Primitive), SubTag.NO_UNIFICATION}));
- ItemList.Circuit_Parts_Vacuum_Tube.set(ItemList.Circuit_Primitive.get(1,new Object[0]));
- ItemList.Circuit_Basic.set(addItem(tLastID = 701, "Integrated Logic Circuit", "A basic Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Basic), SubTag.NO_UNIFICATION}));
- ItemList.Circuit_Good.set(addItem(tLastID = 702, "Good Electronic Circuit", "A good Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Good), SubTag.NO_UNIFICATION}));
- ItemList.Circuit_Advanced.set(addItem(tLastID = 703, "Processor Assembly", "An advanced Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Advanced), SubTag.NO_UNIFICATION}));
- ItemList.Circuit_Computer.set(ItemList.Circuit_Advanced.get(1,new Object[0]));
- ItemList.Circuit_Data.set(addItem(tLastID = 704, "Workstation", "A extreme Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Data), SubTag.NO_UNIFICATION}));
- ItemList.Circuit_Elite.set(addItem(tLastID = 705, "Mainframe", "A elite Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Elite), SubTag.NO_UNIFICATION}));
- ItemList.Circuit_Master.set(addItem(tLastID = 706, "Nanoprocessor Mainframe", "A master Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Master), SubTag.NO_UNIFICATION}));
- ItemList.Tool_DataOrb.set(addItem(tLastID = 707, "Data Orb", "A High Capacity Data Storage and Master Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Master), SubTag.NO_UNIFICATION, new Behaviour_DataOrb()}));
- GT_ModHandler.addShapelessCraftingRecipe(ItemList.Tool_DataOrb.get(1L, new Object[0]), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Tool_DataOrb.get(1L, new Object[0])});
- ItemList.Tool_DataStick.set(addItem(tLastID = 708, "Data Stick", "A Low Capacity Data Storage and Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Data), SubTag.NO_UNIFICATION, new Behaviour_DataStick()}));
- GT_ModHandler.addShapelessCraftingRecipe(ItemList.Tool_DataStick.get(1L, new Object[0]), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Tool_DataStick.get(1L, new Object[0])});
-
- ItemList.Circuit_Board_Basic.set(addItem(tLastID = 710, "Coated Circuit Board", "A basic Board", new Object[0])); ItemList.Circuit_Board_Coated.set(ItemList.Circuit_Board_Basic.get(1,new Object[0]));
- ItemList.Circuit_Board_Advanced.set(addItem(tLastID = 711, "Epoxy Circuit Board", "An advanced Board", new Object[0])); ItemList.Circuit_Board_Epoxy.set(ItemList.Circuit_Board_Advanced.get(1,new Object[0]));
- ItemList.Circuit_Board_Elite.set(addItem(tLastID = 712, "Multilayer Fiberglass Circuit Board", "A elite Board", new Object[0])); ItemList.Circuit_Board_Multifiberglass.set(ItemList.Circuit_Board_Elite.get(1,new Object[0]));
- ItemList.Circuit_Parts_Crystal_Chip_Elite.set(addItem(tLastID = 713, "Engraved Crystal Chip", "Needed for Circuits", new Object[0]));
- ItemList.Circuit_Parts_Crystal_Chip_Master.set(addItem(tLastID = 714, "Engraved Lapotron Chip", "Needed for Circuits", new Object[0]));
- ItemList.Circuit_Parts_Advanced.set(addItem(tLastID = 715, "Diode", "Basic Electronic Component", new Object[0])); ItemList.Circuit_Parts_Diode.set(ItemList.Circuit_Parts_Advanced.get(1,new Object[0]));
- ItemList.Circuit_Parts_Wiring_Basic.set(addItem(tLastID = 716, "Resistor", "Basic Electronic Component", new Object[0])); ItemList.Circuit_Parts_Resistor.set(ItemList.Circuit_Parts_Wiring_Basic.get(1,new Object[0]));
- ItemList.Circuit_Parts_Wiring_Advanced.set(addItem(tLastID = 717, "Transistor", "Basic Electronic Component", new Object[0])); ItemList.Circuit_Parts_Transistor.set(ItemList.Circuit_Parts_Wiring_Advanced.get(1,new Object[0]));
- ItemList.Circuit_Parts_Wiring_Elite.set(addItem(tLastID = 718, "Capacitor", "Electronic Component", new Object[0])); ItemList.Circuit_Parts_Capacitor.set(ItemList.Circuit_Parts_Wiring_Elite.get(1,new Object[0]));
- ItemList.Empty_Board_Basic.set(addItem(tLastID = 719, "Phenolic Circuit Board", "A good Board", new Object[0])); ItemList.Circuit_Board_Phenolic.set(ItemList.Empty_Board_Basic.get(1,new Object[0]));
- ItemList.Empty_Board_Elite.set(addItem(tLastID = 720, "Fiberglass Circuit Board", "An advanced Board", new Object[0])); ItemList.Circuit_Board_Fiberglass.set(ItemList.Empty_Board_Elite.get(1,new Object[0]));
-
-
- ItemList.Component_Sawblade_Diamond.set(addItem(tLastID = 721, "Diamond Sawblade", "", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.PERDITIO, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 4L), OreDictNames.craftingDiamondBlade}));
- ItemList.Component_Grinder_Diamond.set(addItem(tLastID = 722, "Diamond Grinding Head", "", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.PERDITIO, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 6L), OreDictNames.craftingGrinder}));
- ItemList.Component_Grinder_Tungsten.set(addItem(tLastID = 723, "Tungsten Grinding Head", "", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.PERDITIO, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 6L), OreDictNames.craftingGrinder}));
-
- ItemList.QuantumEye.set(addItem(tLastID = 724, "Quantum Eye", "Improved Ender Eye", new Object[0]));
- ItemList.QuantumStar.set(addItem(tLastID = 725, "Quantum Star", "Improved Nether Star", new Object[0]));
- ItemList.Gravistar.set(addItem(tLastID = 726, "Gravi Star", "Ultimate Nether Star", new Object[0]));
-
- GT_ModHandler.addCraftingRecipe(ItemList.Field_Generator_HV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"WCW", "CGC", "WCW", 'G', ItemList.QuantumEye.get(1L, new Object[0]), 'C', OrePrefixes.circuit.get(Materials.Advanced), 'W', OrePrefixes.wireGt04.get(Materials.Osmium)});
- GT_ModHandler.addCraftingRecipe(ItemList.Field_Generator_EV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"WCW", "CGC", "WCW", 'G', OrePrefixes.gem.get(Materials.NetherStar), 'C', OrePrefixes.circuit.get(Materials.Data), 'W', OrePrefixes.wireGt08.get(Materials.Osmium)});
- GT_ModHandler.addCraftingRecipe(ItemList.Field_Generator_IV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"WCW", "CGC", "WCW", 'G', ItemList.QuantumStar.get(1L, new Object[0]), 'C', OrePrefixes.circuit.get(Materials.Elite), 'W', OrePrefixes.wireGt16.get(Materials.Osmium)});
-
- GT_ModHandler.addCraftingRecipe(ItemList.Component_Sawblade_Diamond.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{" D ", "DGD", " D ", 'D', OrePrefixes.dustSmall.get(Materials.Diamond), 'G', OrePrefixes.gearGt.get(Materials.CobaltBrass)});
- GT_ModHandler.addCraftingRecipe(ItemList.Component_Grinder_Diamond.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"DSD", "SIS", "DSD", 'I', OreDictNames.craftingIndustrialDiamond, 'D', OrePrefixes.dust.get(Materials.Diamond), 'S', OrePrefixes.plate.get(Materials.Steel)});
- GT_ModHandler.addCraftingRecipe(ItemList.Component_Grinder_Tungsten.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"TST", "SIS", "TST", 'I', OreDictNames.craftingIndustrialDiamond, 'T', OrePrefixes.plate.get(Materials.Tungsten), 'S', OrePrefixes.plate.get(Materials.Steel)});
-
- ItemList.Upgrade_Muffler.set(addItem(tLastID = 727, "Muffler Upgrade", "Makes Machines silent", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 2L)}));
- ItemList.Upgrade_Lock.set(addItem(tLastID = 728, "Lock Upgrade", "Protects your Machines", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 4L)}));
-
- GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Aluminium, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Plastic, 2L), ItemList.Upgrade_Muffler.get(1L, new Object[0]), 1600, 2);
- GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Aluminium, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 2L), ItemList.Upgrade_Muffler.get(1L, new Object[0]), 1600, 2);
- GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iron, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Plastic, 2L), ItemList.Upgrade_Muffler.get(1L, new Object[0]), 1600, 2);
- GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iron, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 2L), ItemList.Upgrade_Muffler.get(1L, new Object[0]), 1600, 2);
- GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.WroughtIron, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Plastic, 2L), ItemList.Upgrade_Muffler.get(1L, new Object[0]), 1600, 2);
- GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.WroughtIron, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 2L), ItemList.Upgrade_Muffler.get(1L, new Object[0]), 1600, 2);
- GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Aluminium, 1L), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iridium, 1L), ItemList.Upgrade_Lock.get(1L, new Object[0]), 6400, 16);
- GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iron, 1L), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iridium, 1L), ItemList.Upgrade_Lock.get(1L, new Object[0]), 6400, 16);
- GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.WroughtIron, 1L), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iridium, 1L), ItemList.Upgrade_Lock.get(1L, new Object[0]), 6400, 16);
-
- ItemList.Component_Filter.set(addItem(tLastID = 729, "Item Filter", "", new Object[]{new ItemData(Materials.Zinc, OrePrefixes.foil.mMaterialAmount * 16L, new MaterialStack[0]), new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 1L), OreDictNames.craftingFilter}));
-
- GT_Values.RA.addAssemblerRecipe(GT_ModHandler.getIC2Item("carbonMesh", 4L), GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Zinc, 16L), Materials.Plastic.getMolten(144), ItemList.Component_Filter.get(1L, new Object[0]), 1600, 32);
-
- ItemList.Cover_Controller.set(addItem(tLastID = 730, "Machine Controller", "Turns Machines ON/OFF", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L)}));
- ItemList.Cover_ActivityDetector.set(addItem(tLastID = 731, "Activity Detector", "Gives out Activity as Redstone", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L)}));
- ItemList.Cover_FluidDetector.set(addItem(tLastID = 732, "Fluid Detector", "Gives out Fluid Amount as Redstone", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L)}));
- ItemList.Cover_ItemDetector.set(addItem(tLastID = 733, "Item Detector", "Gives out Item Amount as Redstone", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.TERRA, 1L)}));
- ItemList.Cover_EnergyDetector.set(addItem(tLastID = 734, "Energy Detector", "Gives out Energy Amount as Redstone", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 1L)}));
- ItemList.Cover_PlayerDetector.set(addItem(tLastID = 735, "Player Detector", "Gives out close Players as Redstone", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L)}));
- GT_Values.RA.addAssemblerRecipe(ItemList.Sensor_EV.get(1L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Titanium, 1L), ItemList.Cover_PlayerDetector.get(1L, new Object[0]), 3200, 128);
-
- GregTech_API.registerCover(ItemList.Cover_Controller.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[2][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_CONTROLLER)}), new GT_Cover_ControlsWork());
- GregTech_API.registerCover(ItemList.Cover_ActivityDetector.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[2][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ACTIVITYDETECTOR)}), new GT_Cover_DoesWork());
- GregTech_API.registerCover(ItemList.Cover_FluidDetector.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[2][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FLUIDDETECTOR)}), new GT_Cover_LiquidMeter());
- GregTech_API.registerCover(ItemList.Cover_ItemDetector.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[2][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ITEMDETECTOR)}), new GT_Cover_ItemMeter());
- GregTech_API.registerCover(ItemList.Cover_EnergyDetector.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[2][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ENERGYDETECTOR)}), new GT_Cover_EUMeter());
- GregTech_API.registerCover(ItemList.Cover_PlayerDetector.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[2][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ACTIVITYDETECTOR)}), new GT_Cover_PlayerDetector());
-
- ItemList.Cover_Screen.set(addItem(tLastID = 740, "Computer Monitor", "Displays Data", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.LUX, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L)}));
- ItemList.Cover_Crafting.set(addItem(tLastID = 744, "Crafting Table Cover", "Better than a wooden Workbench", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 4L)}));
- ItemList.Cover_Drain.set(addItem(tLastID = 745, "Drain", "Absorbs Fluids and collects Rain", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 2L)}));
-
- ItemList.Cover_Shutter.set(addItem(tLastID = 749, "Shutter Module", "Blocks Inventory/Tank Side. Usage together with Machine Controller.", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 1L)}));
-
- GT_ModHandler.addCraftingRecipe(ItemList.Cover_Screen.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"AGA", "RPB", "ALA", 'A', OrePrefixes.plate.get(Materials.Aluminium), 'L', OrePrefixes.dust.get(Materials.Glowstone), 'R', Dyes.dyeRed, 'G', Dyes.dyeLime, 'B', Dyes.dyeBlue, 'P', OrePrefixes.plate.get(Materials.Glass)});
-
- GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Aluminium, 2L), new ItemStack(Blocks.iron_bars, 2), ItemList.Cover_Drain.get(1L, new Object[0]), 800, 16);
- GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iron, 2L), new ItemStack(Blocks.iron_bars, 2), ItemList.Cover_Drain.get(1L, new Object[0]), 800, 16);
- GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.WroughtIron, 2L), new ItemStack(Blocks.iron_bars, 2), ItemList.Cover_Drain.get(1L, new Object[0]), 800, 16);
- GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Aluminium, 1L), new ItemStack(Blocks.crafting_table, 1), ItemList.Cover_Crafting.get(1L, new Object[0]), 800, 16);
- GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iron, 1L), new ItemStack(Blocks.crafting_table, 1), ItemList.Cover_Crafting.get(1L, new Object[0]), 800, 16);
- GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.WroughtIron, 1L), new ItemStack(Blocks.crafting_table, 1), ItemList.Cover_Crafting.get(1L, new Object[0]), 800, 16);
-
- GregTech_API.registerCover(ItemList.Cover_Screen.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[2][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SCREEN)}), new GT_Cover_Screen());
- GregTech_API.registerCover(ItemList.Cover_Crafting.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[1][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_CRAFTING)}), new GT_Cover_Crafting());
- GregTech_API.registerCover(ItemList.Cover_Drain.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[0][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_DRAIN)}), new GT_Cover_Drain());
- GregTech_API.registerCover(ItemList.Cover_Shutter.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[1][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SHUTTER)}), new GT_Cover_Shutter());
-
- ItemList.Cover_SolarPanel.set(addItem(tLastID = 750, "Solar Panel", "May the Sun be with you", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.TENEBRAE, 1L)}));
- ItemList.Cover_SolarPanel_8V.set(addItem(tLastID = 751, "Solar Panel (8V)", "8 Volt Solar Panel", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.TENEBRAE, 2L)}));
- ItemList.Cover_SolarPanel_LV.set(addItem(tLastID = 752, "Solar Panel (LV)", "Low Voltage Solar Panel", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.TENEBRAE, 4L)}));
- ItemList.Cover_SolarPanel_MV.set(addItem(tLastID = 753, "Solar Panel (MV)", "Medium Voltage Solar Panel", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.TENEBRAE, 8L)}));
- ItemList.Cover_SolarPanel_HV.set(addItem(tLastID = 754, "Solar Panel (HV)", "High Voltage Solar Panel", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.TENEBRAE, 16L)}));
- ItemList.Cover_SolarPanel_EV.set(addItem(tLastID = 755, "Solar Panel (EV)", "Extreme Solar Panel", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 32L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 32L), new TC_Aspects.TC_AspectStack(TC_Aspects.TENEBRAE, 32L)}));
- ItemList.Cover_SolarPanel_IV.set(addItem(tLastID = 756, "Solar Panel (IV)", "Insane Solar Panel", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 64L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 64L), new TC_Aspects.TC_AspectStack(TC_Aspects.TENEBRAE, 64L)}));
- ItemList.Cover_SolarPanel_LuV.set(addItem(tLastID = 757, "Solar Panel (LuV)", "Ludicrous Solar Panel", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 64L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 64L), new TC_Aspects.TC_AspectStack(TC_Aspects.TENEBRAE, 64L)}));
- ItemList.Cover_SolarPanel_ZPM.set(addItem(tLastID = 758, "Solar Panel (ZPM)", "ZPM Voltage Solar Panel", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 64L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 64L), new TC_Aspects.TC_AspectStack(TC_Aspects.TENEBRAE, 64L)}));
- ItemList.Cover_SolarPanel_UV.set(addItem(tLastID = 759, "Solar Panel (UV)", "Ultimate Solar Panel", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 64L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 64L), new TC_Aspects.TC_AspectStack(TC_Aspects.TENEBRAE, 64L)}));
-
- GregTech_API.registerCover(ItemList.Cover_SolarPanel.get(1L, new Object[0]), new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL), new GT_Cover_SolarPanel(1));
- GregTech_API.registerCover(ItemList.Cover_SolarPanel_8V.get(1L, new Object[0]), new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_8V), new GT_Cover_SolarPanel(8));
- GregTech_API.registerCover(ItemList.Cover_SolarPanel_LV.get(1L, new Object[0]), new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_LV), new GT_Cover_SolarPanel(32));
- GregTech_API.registerCover(ItemList.Cover_SolarPanel_MV.get(1L, new Object[0]), new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_MV), new GT_Cover_SolarPanel(128));
- GregTech_API.registerCover(ItemList.Cover_SolarPanel_HV.get(1L, new Object[0]), new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_HV), new GT_Cover_SolarPanel(512));
- GregTech_API.registerCover(ItemList.Cover_SolarPanel_EV.get(1L, new Object[0]), new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_EV), new GT_Cover_SolarPanel(2048));
- GregTech_API.registerCover(ItemList.Cover_SolarPanel_IV.get(1L, new Object[0]), new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_IV), new GT_Cover_SolarPanel(8192));
- GregTech_API.registerCover(ItemList.Cover_SolarPanel_LuV.get(1L, new Object[0]), new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_LuV), new GT_Cover_SolarPanel(32768));
- GregTech_API.registerCover(ItemList.Cover_SolarPanel_ZPM.get(1L, new Object[0]), new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_ZPM), new GT_Cover_SolarPanel(131072));
- GregTech_API.registerCover(ItemList.Cover_SolarPanel_UV.get(1L, new Object[0]), new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_UV), new GT_Cover_SolarPanel(524288));
-
- ItemList.Tool_Sonictron.set(addItem(tLastID = 760, "Sonictron", "Bring your Music with you", new Object[]{Behaviour_Sonictron.INSTANCE, new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 4L)}));
- ItemList.Tool_Cheat.set(addItem(tLastID = 761, "Debug Scanner", "Also an Infinite Energy Source", new Object[]{Behaviour_Scanner.INSTANCE, new TC_Aspects.TC_AspectStack(TC_Aspects.NEBRISUM, 64L)}));
- setElectricStats(32000 + tLastID, -2000000000L, 1000000000L, -1L, -3L, false);
- ItemList.Tool_Scanner.set(addItem(tLastID = 762, "Portable Scanner", "Tricorder", new Object[]{Behaviour_Scanner.INSTANCE, new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 6L), new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 6L)}));
- setElectricStats(32000 + tLastID, 400000L, GT_Values.V[2], 2L, -1L, false);
- GT_ModHandler.addCraftingRecipe(ItemList.Tool_Scanner.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"EPR", "CSC", "PBP", 'C', OrePrefixes.circuit.get(Materials.Advanced), 'P', OrePrefixes.plate.get(Materials.Aluminium), 'E', ItemList.Emitter_MV, 'R', ItemList.Sensor_MV, 'S', ItemList.Cover_Screen, 'B', ItemList.Battery_RE_MV_Lithium});
- ItemList.NC_SensorKit.set(addItem(tLastID = 763, "GregTech Sensor Kit", "", new Object[]{new Behaviour_SensorKit()}));
- ItemList.Duct_Tape.set(addItem(tLastID = 764, "BrainTech Aerospace Advanced Reinforced Duct Tape FAL-84", "If you can't fix it with this, use more of it!", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), OreDictNames.craftingDuctTape}));
- ItemList.McGuffium_239.set(addItem(tLastID = 765, "Mc Guffium 239", "42% better than Phlebotnium", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ALIENIS, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.PERMUTATIO, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.SPIRITUS, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.AURAM, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.VITIUM, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.RADIO, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.MAGNETO, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.NEBRISUM, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.STRONTIO, 8L)}));
-
- GT_Values.RA.addAssemblerRecipe(ItemList.Sensor_LV.get(1L, new Object[0]), ItemList.Emitter_LV.get(1L, new Object[0]), ItemList.NC_SensorKit.get(1L, new Object[0]), 1600, 2);
-
- ItemList.Cover_RedstoneTransmitterExternal.set(addItem(tLastID = 741, "Redstone Transmitter (Out)", "Transfers Redstonesignals wireless", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L)}));
- ItemList.Cover_RedstoneTransmitterInternal.set(addItem(tLastID = 742, "Redstone Transmitter (In)", "Transfers Redstonesignals wireless", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L)}));
- ItemList.Cover_RedstoneReceiverExternal.set(addItem(tLastID = 746, "Redstone Receiver (Out)", "Transfers Redstonesignals wireless", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L)}));
- ItemList.Cover_RedstoneReceiverInternal.set(addItem(tLastID = 747, "Redstone Receiver (In)", "Transfers Redstonesignals wireless", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L)}));
-
- GregTech_API.registerCover(ItemList.Cover_RedstoneTransmitterExternal.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[2][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ACTIVITYDETECTOR)}), new GT_Cover_RedstoneTransmitterExternal());
- GregTech_API.registerCover(ItemList.Cover_RedstoneTransmitterInternal.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[2][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ACTIVITYDETECTOR)}), new GT_Cover_RedstoneTransmitterInternal());
- GregTech_API.registerCover(ItemList.Cover_RedstoneReceiverExternal.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[2][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FLUIDDETECTOR)}), new GT_Cover_RedstoneReceiverExternal());
- GregTech_API.registerCover(ItemList.Cover_RedstoneReceiverInternal.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[2][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FLUIDDETECTOR)}), new GT_Cover_RedstoneReceiverInternal());
-
- GT_Values.RA.addAssemblerRecipe(ItemList.Emitter_EV.get(1L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.StainlessSteel, 1L), ItemList.Cover_RedstoneTransmitterExternal.get(1L, new Object[0]), 3200, 128);
- GT_Values.RA.addAssemblerRecipe(ItemList.Sensor_EV.get(1L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.StainlessSteel, 1L), ItemList.Cover_RedstoneReceiverExternal.get(1L, new Object[0]), 3200, 128);
- GT_ModHandler.addShapelessCraftingRecipe(ItemList.Cover_RedstoneTransmitterInternal.get(1L, new Object[0]), new Object[]{ItemList.Cover_RedstoneTransmitterExternal.get(1L, new Object[0])});
- GT_ModHandler.addShapelessCraftingRecipe(ItemList.Cover_RedstoneReceiverInternal.get(1L, new Object[0]), new Object[]{ItemList.Cover_RedstoneReceiverExternal.get(1L, new Object[0])});
- GT_ModHandler.addShapelessCraftingRecipe(ItemList.Cover_RedstoneTransmitterExternal.get(1L, new Object[0]), new Object[]{ItemList.Cover_RedstoneTransmitterInternal.get(1L, new Object[0])});
- GT_ModHandler.addShapelessCraftingRecipe(ItemList.Cover_RedstoneReceiverExternal.get(1L, new Object[0]), new Object[]{ItemList.Cover_RedstoneReceiverInternal.get(1L, new Object[0])});
-
- ItemList.Cover_NeedsMaintainance.set(addItem(tLastID = 748, "Needs Maintainance Cover", "Attach to Multiblock Controller. Emits Redstone Signal if needs Maintainance", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L)}));
- GregTech_API.registerCover(ItemList.Cover_NeedsMaintainance.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[2][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ACTIVITYDETECTOR)}), new GT_Cover_NeedMaintainance());
- GT_Values.RA.addAssemblerRecipe(ItemList.Emitter_MV.get(1L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Aluminium, 1L), ItemList.Cover_NeedsMaintainance.get(1L, new Object[0]), 600, 24);
-
-
- }
-
- public boolean onEntityItemUpdate(EntityItem aItemEntity) {
- int aDamage = aItemEntity.getEntityItem().getItemDamage();
- if ((aDamage < 32000) && (aDamage >= 0) && (!aItemEntity.worldObj.isRemote)) {
- Materials aMaterial = GregTech_API.sGeneratedMaterials[(aDamage % 1000)];
- if ((aMaterial != null) && (aMaterial != Materials.Empty) && (aMaterial != Materials._NULL)) {
- int tX = MathHelper.floor_double(aItemEntity.posX);
- int tY = MathHelper.floor_double(aItemEntity.posY);
- int tZ = MathHelper.floor_double(aItemEntity.posZ);
- OrePrefixes aPrefix = this.mGeneratedPrefixList[(aDamage / 1000)];
- if ((aPrefix == OrePrefixes.dustImpure) || (aPrefix == OrePrefixes.dustPure)) {
- Block tBlock = aItemEntity.worldObj.getBlock(tX, tY, tZ);
- byte tMetaData = (byte) aItemEntity.worldObj.getBlockMetadata(tX, tY, tZ);
- if ((tBlock == Blocks.cauldron) && (tMetaData > 0)) {
- aItemEntity.setEntityItemStack(GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, aItemEntity.getEntityItem().stackSize));
- aItemEntity.worldObj.setBlockMetadataWithNotify(tX, tY, tZ, tMetaData - 1, 3);
- return true;
- }
- }else if (aPrefix == OrePrefixes.crushed) {
- Block tBlock = aItemEntity.worldObj.getBlock(tX, tY, tZ);
- byte tMetaData = (byte) aItemEntity.worldObj.getBlockMetadata(tX, tY, tZ);
- if ((tBlock == Blocks.cauldron) && (tMetaData > 0)) {
- aItemEntity.setEntityItemStack(GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aMaterial, aItemEntity.getEntityItem().stackSize));
- aItemEntity.worldObj.setBlockMetadataWithNotify(tX, tY, tZ, tMetaData - 1, 3);
- return true;
- }
- }else if(aPrefix == OrePrefixes.dust && aMaterial == Materials.Wheat){
- Block tBlock = aItemEntity.worldObj.getBlock(tX, tY, tZ);
- byte tMetaData = (byte) aItemEntity.worldObj.getBlockMetadata(tX, tY, tZ);
- if ((tBlock == Blocks.cauldron) && (tMetaData > 0)) {
- aItemEntity.setEntityItemStack(ItemList.Food_Dough.get(aItemEntity.getEntityItem().stackSize, new Object[]{}));
- aItemEntity.worldObj.setBlockMetadataWithNotify(tX, tY, tZ, tMetaData - 1, 3);
- return true;
- }
- }
- }
- }
- return false;
- }
-
- protected void addAdditionalToolTips(List aList, ItemStack aStack, EntityPlayer aPlayer) {
- super.addAdditionalToolTips(aList, aStack, aPlayer);
- int aDamage = aStack.getItemDamage();
- if ((aDamage < 32000) && (aDamage >= 0)) {
- Materials aMaterial = GregTech_API.sGeneratedMaterials[(aDamage % 1000)];
- if ((aMaterial != null) && (aMaterial != Materials.Empty) && (aMaterial != Materials._NULL)) {
- OrePrefixes aPrefix = this.mGeneratedPrefixList[(aDamage / 1000)];
- if ((aPrefix == OrePrefixes.dustImpure) || (aPrefix == OrePrefixes.dustPure)) {
- aList.add(this.mToolTipPurify);
- }
- }
- }
- }
-
- public boolean isPlasmaCellUsed(OrePrefixes aPrefix, Materials aMaterial) {
- Collection<GT_Recipe> fusionRecipes = GT_Recipe.GT_Recipe_Map.sFusionRecipes.mRecipeList;
- if(aPrefix == OrePrefixes.cellPlasma && aMaterial.getPlasma(1L) != null) { //Materials has a plasma fluid
- for(GT_Recipe recipe : fusionRecipes) { //Loop through fusion recipes
- if(recipe.getFluidOutput(0) != null) { //Make sure fluid output can't be null (not sure if possible)
- if (recipe.getFluidOutput(0).isFluidEqual(aMaterial.getPlasma(1L)))
- return true; //Fusion recipe output matches current plasma cell fluid
- }
- }
- }
- return false;
- }
-
- public boolean doesShowInCreative(OrePrefixes aPrefix, Materials aMaterial, boolean aDoShowAllItems) {
- return (aDoShowAllItems) || (((aPrefix != OrePrefixes.gem) || (!aMaterial.mName.startsWith("Infused"))) && (aPrefix != OrePrefixes.dustTiny) && (aPrefix != OrePrefixes.dustSmall) && (aPrefix != OrePrefixes.dustImpure) && (aPrefix != OrePrefixes.dustPure) && (aPrefix != OrePrefixes.crushed) && (aPrefix != OrePrefixes.crushedPurified) && (aPrefix != OrePrefixes.crushedCentrifuged) && (aPrefix != OrePrefixes.ingotHot) && !(aPrefix == OrePrefixes.cellPlasma && !isPlasmaCellUsed(aPrefix, aMaterial)));
- }
-
- public ItemStack getContainerItem(ItemStack aStack) {
- int aDamage = aStack.getItemDamage();
- if ((aDamage >= 32430) && (aDamage <= 32461)) {
- return ItemList.Spray_Empty.get(1L, new Object[0]);
- }
- if ((aDamage == 32479) || (aDamage == 32476)) {
- return new ItemStack(this, 1, aDamage - 2);
- }
- if (aDamage == 32401) {
- return new ItemStack(this, 1, aDamage - 1);
- }
- return super.getContainerItem(aStack);
- }
-
- public boolean doesMaterialAllowGeneration(OrePrefixes aPrefix, Materials aMaterial) {
- return (super.doesMaterialAllowGeneration(aPrefix, aMaterial));
- }
-}
+package gregtech.common.items; + +import cpw.mods.fml.common.Loader; +import gregtech.api.GregTech_API; +import gregtech.api.enums.*; +import gregtech.api.interfaces.IItemBehaviour; +import gregtech.api.interfaces.ITexture; +import gregtech.api.items.GT_MetaBase_Item; +import gregtech.api.items.GT_MetaGenerated_Item_X32; +import gregtech.api.objects.GT_MultiTexture; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.objects.ItemData; +import gregtech.api.objects.MaterialStack; +import gregtech.api.util.*; +import gregtech.common.covers.*; +import gregtech.common.items.behaviors.*; +import net.minecraft.block.Block; +import net.minecraft.enchantment.Enchantment; +import net.minecraft.entity.item.EntityItem; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; +import net.minecraft.item.EnumAction; +import net.minecraft.item.ItemStack; +import net.minecraft.potion.Potion; +import net.minecraft.util.MathHelper; + +import java.util.Collection; +import java.util.List; + +public class GT_MetaGenerated_Item_01 extends GT_MetaGenerated_Item_X32 { + public static GT_MetaGenerated_Item_01 INSTANCE; + private final String mToolTipPurify = GT_LanguageManager.addStringLocalization("metaitem.01.tooltip.purify", "Throw into Cauldron to get clean Dust"); + private final static String aTextArrow = " A";private final static String aTextStick = " S ";private final static String aTextFeather = "F "; + private final static String aTextEmptyRow = " "; private final static String aTextShape = " P "; + + public GT_MetaGenerated_Item_01() { + super("metaitem.01", new OrePrefixes[]{OrePrefixes.dustTiny, OrePrefixes.dustSmall, OrePrefixes.dust, OrePrefixes.dustImpure, OrePrefixes.dustPure, OrePrefixes.crushed, OrePrefixes.crushedPurified, OrePrefixes.crushedCentrifuged, OrePrefixes.gem, OrePrefixes.nugget, null, OrePrefixes.ingot, OrePrefixes.ingotHot, OrePrefixes.ingotDouble, OrePrefixes.ingotTriple, OrePrefixes.ingotQuadruple, OrePrefixes.ingotQuintuple, OrePrefixes.plate, OrePrefixes.plateDouble, OrePrefixes.plateTriple, OrePrefixes.plateQuadruple, OrePrefixes.plateQuintuple, OrePrefixes.plateDense, OrePrefixes.stick, OrePrefixes.lens, OrePrefixes.round, OrePrefixes.bolt, OrePrefixes.screw, OrePrefixes.ring, OrePrefixes.foil, OrePrefixes.cell, OrePrefixes.cellPlasma}); + INSTANCE = this; + + int tLastID = 0; + + setBurnValue(17000 + Materials.Wood.mMetaItemSubID, 1600); + GT_OreDictUnificator.addToBlacklist(new ItemStack(this, 1, 17000 + Materials.Wood.mMetaItemSubID)); + GT_ModHandler.addCompressionRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 8L), new ItemStack(this, 1, 17000 + Materials.Wood.mMetaItemSubID)); + GregTech_API.registerCover(new ItemStack(this, 1, 17000 + Materials.Wood.mMetaItemSubID), new GT_RenderedTexture(Textures.BlockIcons.COVER_WOOD_PLATE), null); + + ItemStack tStack = new ItemStack(this, 1, 17000 + Materials.Wood.mMetaItemSubID); + tStack.setStackDisplayName("The holy Planks of Sengir"); + GT_Utility.ItemNBT.addEnchantment(tStack, Enchantment.smite, 10); + GT_ModHandler.addCraftingRecipe(tStack, GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"XXX", "XDX", "XXX", 'X', OrePrefixes.gem.get(Materials.NetherStar), 'D', new ItemStack(Blocks.dragon_egg, 1, 32767)}); + + ItemList.Credit_Greg_Copper.set(addItem(tLastID = 0, "Copper GT Credit", "0.125 Credits", new Object[0])); + ItemList.Credit_Greg_Cupronickel.set(addItem(tLastID = 1, "Cupronickel GT Credit", "1 Credit", new Object[]{new ItemData(Materials.Cupronickel, 907200L, new MaterialStack[0])})); + ItemList.Credit_Greg_Silver.set(addItem(tLastID = 2, "Silver GT Credit", "8 Credits", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.LUCRUM, 1L)})); + ItemList.Credit_Greg_Gold.set(addItem(tLastID = 3, "Gold GT Credit", "64 Credits", new Object[0])); + ItemList.Credit_Greg_Platinum.set(addItem(tLastID = 4, "Platinum GT Credit", "512 Credits", new Object[0])); + ItemList.Credit_Greg_Osmium.set(addItem(tLastID = 5, "Osmium GT Credit", "4096 Credits", new Object[0])); + ItemList.Credit_Greg_Naquadah.set(addItem(tLastID = 6, "Naquadah GT Credit", "32768 Credits", new Object[0])); + ItemList.Credit_Greg_Neutronium.set(addItem(tLastID = 7, "Neutronium GT Credit", "262144 Credits", new Object[0])); + ItemList.Coin_Gold_Ancient.set(addItem(tLastID = 8, "Ancient Gold Coin", "Found in ancient Ruins", new Object[]{new ItemData(Materials.Gold, 907200L, new MaterialStack[0]), new TC_Aspects.TC_AspectStack(TC_Aspects.LUCRUM, 8L)})); + ItemList.Coin_Doge.set(addItem(tLastID = 9, "Doge Coin", "wow much coin how money so crypto plz mine v rich very currency wow", new Object[]{new ItemData(Materials.Brass, 907200L, new MaterialStack[0]), new TC_Aspects.TC_AspectStack(TC_Aspects.LUCRUM, 1L)})); + ItemList.Coin_Chocolate.set(addItem(tLastID = 10, "Chocolate Coin", "Wrapped in Gold", new Object[]{new ItemData(Materials.Gold, OrePrefixes.foil.mMaterialAmount, new MaterialStack[0]), new GT_FoodStat(1, 0.1F, EnumAction.eat, GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Gold, 1L), true, false, false, new int[]{Potion.moveSpeed.id, 200, 1, 100})})); + ItemList.Credit_Copper.set(addItem(tLastID = 11, "Industrial Copper Credit", "0.125 Credits", new Object[0])); + + ItemList.Credit_Silver.set(addItem(tLastID = 13, "Industrial Silver Credit", "8 Credits", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.LUCRUM, 1L)})); + ItemList.Credit_Gold.set(addItem(tLastID = 14, "Industrial Gold Credit", "64 Credits", new Object[0])); + ItemList.Credit_Platinum.set(addItem(tLastID = 15, "Industrial Platinum Credit", "512 Credits", new Object[0])); + ItemList.Credit_Osmium.set(addItem(tLastID = 16, "Industrial Osmium Credit", "4096 Credits", new Object[0])); + + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Coin_Chocolate.get(1L, new Object[0]), new Object[]{OrePrefixes.dust.get(Materials.Cocoa), OrePrefixes.dust.get(Materials.Milk), OrePrefixes.dust.get(Materials.Sugar), OrePrefixes.foil.get(Materials.Gold)}); + + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Copper.get(8L, new Object[0]), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Iron}); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Iron.get(8L, new Object[0]), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Silver}); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Silver.get(8L, new Object[0]), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Gold}); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Gold.get(8L, new Object[0]), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Platinum}); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Platinum.get(8L, new Object[0]), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Osmium}); + + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Iron.get(1L, new Object[0]), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Copper, ItemList.Credit_Copper, ItemList.Credit_Copper, ItemList.Credit_Copper, ItemList.Credit_Copper, ItemList.Credit_Copper, ItemList.Credit_Copper, ItemList.Credit_Copper}); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Silver.get(1L, new Object[0]), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Iron, ItemList.Credit_Iron, ItemList.Credit_Iron, ItemList.Credit_Iron, ItemList.Credit_Iron, ItemList.Credit_Iron, ItemList.Credit_Iron, ItemList.Credit_Iron}); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Gold.get(1L, new Object[0]), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Silver, ItemList.Credit_Silver, ItemList.Credit_Silver, ItemList.Credit_Silver, ItemList.Credit_Silver, ItemList.Credit_Silver, ItemList.Credit_Silver, ItemList.Credit_Silver}); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Platinum.get(1L, new Object[0]), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Gold, ItemList.Credit_Gold, ItemList.Credit_Gold, ItemList.Credit_Gold, ItemList.Credit_Gold, ItemList.Credit_Gold, ItemList.Credit_Gold, ItemList.Credit_Gold}); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Osmium.get(1L, new Object[0]), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Platinum, ItemList.Credit_Platinum, ItemList.Credit_Platinum, ItemList.Credit_Platinum, ItemList.Credit_Platinum, ItemList.Credit_Platinum, ItemList.Credit_Platinum, ItemList.Credit_Platinum}); + + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Greg_Copper.get(8L, new Object[0]), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Greg_Cupronickel}); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Greg_Cupronickel.get(8L, new Object[0]), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Greg_Silver}); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Greg_Silver.get(8L, new Object[0]), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Greg_Gold}); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Greg_Gold.get(8L, new Object[0]), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Greg_Platinum}); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Greg_Platinum.get(8L, new Object[0]), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Greg_Osmium}); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Greg_Osmium.get(8L, new Object[0]), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Greg_Naquadah}); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Greg_Naquadah.get(8L, new Object[0]), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Greg_Neutronium}); + + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Greg_Cupronickel.get(1L, new Object[0]), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Greg_Copper, ItemList.Credit_Greg_Copper, ItemList.Credit_Greg_Copper, ItemList.Credit_Greg_Copper, ItemList.Credit_Greg_Copper, ItemList.Credit_Greg_Copper, ItemList.Credit_Greg_Copper, ItemList.Credit_Greg_Copper}); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Greg_Silver.get(1L, new Object[0]), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Greg_Cupronickel, ItemList.Credit_Greg_Cupronickel, ItemList.Credit_Greg_Cupronickel, ItemList.Credit_Greg_Cupronickel, ItemList.Credit_Greg_Cupronickel, ItemList.Credit_Greg_Cupronickel, ItemList.Credit_Greg_Cupronickel, ItemList.Credit_Greg_Cupronickel}); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Greg_Gold.get(1L, new Object[0]), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Greg_Silver, ItemList.Credit_Greg_Silver, ItemList.Credit_Greg_Silver, ItemList.Credit_Greg_Silver, ItemList.Credit_Greg_Silver, ItemList.Credit_Greg_Silver, ItemList.Credit_Greg_Silver, ItemList.Credit_Greg_Silver}); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Greg_Platinum.get(1L, new Object[0]), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Greg_Gold, ItemList.Credit_Greg_Gold, ItemList.Credit_Greg_Gold, ItemList.Credit_Greg_Gold, ItemList.Credit_Greg_Gold, ItemList.Credit_Greg_Gold, ItemList.Credit_Greg_Gold, ItemList.Credit_Greg_Gold}); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Greg_Osmium.get(1L, new Object[0]), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Greg_Platinum, ItemList.Credit_Greg_Platinum, ItemList.Credit_Greg_Platinum, ItemList.Credit_Greg_Platinum, ItemList.Credit_Greg_Platinum, ItemList.Credit_Greg_Platinum, ItemList.Credit_Greg_Platinum, ItemList.Credit_Greg_Platinum}); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Greg_Naquadah.get(1L, new Object[0]), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Greg_Osmium, ItemList.Credit_Greg_Osmium, ItemList.Credit_Greg_Osmium, ItemList.Credit_Greg_Osmium, ItemList.Credit_Greg_Osmium, ItemList.Credit_Greg_Osmium, ItemList.Credit_Greg_Osmium, ItemList.Credit_Greg_Osmium}); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Greg_Neutronium.get(1L, new Object[0]), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Greg_Naquadah, ItemList.Credit_Greg_Naquadah, ItemList.Credit_Greg_Naquadah, ItemList.Credit_Greg_Naquadah, ItemList.Credit_Greg_Naquadah, ItemList.Credit_Greg_Naquadah, ItemList.Credit_Greg_Naquadah, ItemList.Credit_Greg_Naquadah}); + + ItemList.Component_Minecart_Wheels_Iron.set(addItem(tLastID = 100, "Iron Minecart Wheels", "To get things rolling", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2L)})); + ItemList.Component_Minecart_Wheels_Steel.set(addItem(tLastID = 101, "Steel Minecart Wheels", "To get things rolling", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2L)})); + + GT_ModHandler.addCraftingRecipe(ItemList.Component_Minecart_Wheels_Iron.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{" h ", "RSR", " w ", 'R', OrePrefixes.ring.get(Materials.AnyIron), 'S', OrePrefixes.stick.get(Materials.AnyIron)}); + GT_ModHandler.addCraftingRecipe(ItemList.Component_Minecart_Wheels_Steel.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{" h ", "RSR", " w ", 'R', OrePrefixes.ring.get(Materials.Steel), 'S', OrePrefixes.stick.get(Materials.Steel)}); + + ItemList.Arrow_Head_Glass_Emtpy.set(addItem(tLastID = 200, "Empty Glass Arrow Head", "Fill with Potions before use", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 1L)})); + ItemList.Arrow_Head_Glass_Poison.set(addItem(tLastID = 201, "Poison Glass Arrow Head", "Glass Arrow filled with Poison", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L)})); + ItemList.Arrow_Head_Glass_Poison_Long.set(addItem(tLastID = 202, "Poison Glass Arrow Head", "Glass Arrow filled with stretched Poison", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L)})); + ItemList.Arrow_Head_Glass_Poison_Strong.set(addItem(tLastID = 203, "Poison Glass Arrow Head", "Glass Arrow filled with strong Poison", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L)})); + ItemList.Arrow_Head_Glass_Slowness.set(addItem(tLastID = 204, "Slowness Glass Arrow Head", "Glass Arrow filled with Laming Brew", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L)})); + ItemList.Arrow_Head_Glass_Slowness_Long.set(addItem(tLastID = 205, "Slowness Glass Arrow Head", "Glass Arrow filled with stretched Laming Brew", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L)})); + ItemList.Arrow_Head_Glass_Weakness.set(addItem(tLastID = 206, "Weakness Glass Arrow Head", "Glass Arrow filled with Weakening Brew", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L)})); + ItemList.Arrow_Head_Glass_Weakness_Long.set(addItem(tLastID = 207, "Weakness Glass Arrow Head", "Glass Arrow filled with stretched Weakening Brew", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L)})); + ItemList.Arrow_Head_Glass_Holy_Water.set(addItem(tLastID = 208, "Holy Water Glass Arrow Head", "Glass Arrow filled with Holy Water", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.AURAM, 1L)})); + + ItemList.Arrow_Wooden_Glass_Emtpy.set(addItem(tLastID = 225, "Regular Glass Vial Arrow", "Empty Glass Arrow", new Object[]{new Behaviour_Arrow_Potion(1.0F, 6.0F, new int[0]), new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 1L)})); + ItemList.Arrow_Wooden_Glass_Poison.set(addItem(tLastID = 226, "Regular Poison Arrow", "Glass Arrow filled with Poison", new Object[]{new Behaviour_Arrow_Potion(1.0F, 6.0F, new int[]{Potion.poison.id, 450, 0, 100}), new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L)})); + ItemList.Arrow_Wooden_Glass_Poison_Long.set(addItem(tLastID = 227, "Regular Poison Arrow", "Glass Arrow filled with stretched Poison", new Object[]{new Behaviour_Arrow_Potion(1.0F, 6.0F, new int[]{Potion.poison.id, 900, 0, 100}), new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L)})); + ItemList.Arrow_Wooden_Glass_Poison_Strong.set(addItem(tLastID = 228, "Regular Poison Arrow", "Glass Arrow filled with strong Poison", new Object[]{new Behaviour_Arrow_Potion(1.0F, 6.0F, new int[]{Potion.poison.id, 450, 1, 100}), new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L)})); + ItemList.Arrow_Wooden_Glass_Slowness.set(addItem(tLastID = 229, "Regular Slowness Arrow", "Glass Arrow filled with Laming Brew", new Object[]{new Behaviour_Arrow_Potion(1.0F, 6.0F, new int[]{Potion.moveSlowdown.id, 900, 0, 100}), new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L)})); + ItemList.Arrow_Wooden_Glass_Slowness_Long.set(addItem(tLastID = 230, "Regular Slowness Arrow", "Glass Arrow filled with stretched Laming Brew", new Object[]{new Behaviour_Arrow_Potion(1.0F, 6.0F, new int[]{Potion.moveSlowdown.id, 1800, 0, 100}), new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L)})); + ItemList.Arrow_Wooden_Glass_Weakness.set(addItem(tLastID = 231, "Regular Weakness Arrow", "Glass Arrow filled with Weakening Brew", new Object[]{new Behaviour_Arrow_Potion(1.0F, 6.0F, new int[]{Potion.weakness.id, 900, 0, 100}), new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L)})); + ItemList.Arrow_Wooden_Glass_Weakness_Long.set(addItem(tLastID = 232, "Regular Weakness Arrow", "Glass Arrow filled with stretched Weakening Brew", new Object[]{new Behaviour_Arrow_Potion(1.0F, 6.0F, new int[]{Potion.weakness.id, 1800, 0, 100}), new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L)})); + ItemList.Arrow_Wooden_Glass_Holy_Water.set(addItem(tLastID = 233, "Regular Holy Water Arrow", "Glass Arrow filled with Holy Water", new Object[]{new Behaviour_Arrow_Potion(1.0F, 6.0F, Enchantment.smite, 10, new int[0]), new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.AURAM, 1L)})); + + ItemList.Arrow_Plastic_Glass_Emtpy.set(addItem(tLastID = 250, "Light Glass Vial Arrow", "Empty Glass Arrow", new Object[]{new Behaviour_Arrow_Potion(1.5F, 6.0F, new int[0]), new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 1L)})); + ItemList.Arrow_Plastic_Glass_Poison.set(addItem(tLastID = 251, "Light Poison Arrow", "Glass Arrow filled with Poison", new Object[]{new Behaviour_Arrow_Potion(1.5F, 6.0F, new int[]{Potion.poison.id, 450, 0, 100}), new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L)})); + ItemList.Arrow_Plastic_Glass_Poison_Long.set(addItem(tLastID = 252, "Light Poison Arrow", "Glass Arrow filled with stretched Poison", new Object[]{new Behaviour_Arrow_Potion(1.5F, 6.0F, new int[]{Potion.poison.id, 900, 0, 100}), new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L)})); + ItemList.Arrow_Plastic_Glass_Poison_Strong.set(addItem(tLastID = 253, "Light Poison Arrow", "Glass Arrow filled with strong Poison", new Object[]{new Behaviour_Arrow_Potion(1.5F, 6.0F, new int[]{Potion.poison.id, 450, 1, 100}), new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L)})); + ItemList.Arrow_Plastic_Glass_Slowness.set(addItem(tLastID = 254, "Light Slowness Arrow", "Glass Arrow filled with Laming Brew", new Object[]{new Behaviour_Arrow_Potion(1.5F, 6.0F, new int[]{Potion.moveSlowdown.id, 900, 0, 100}), new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L)})); + ItemList.Arrow_Plastic_Glass_Slowness_Long.set(addItem(tLastID = 255, "Light Slowness Arrow", "Glass Arrow filled with stretched Laming Brew", new Object[]{new Behaviour_Arrow_Potion(1.5F, 6.0F, new int[]{Potion.moveSlowdown.id, 1800, 0, 100}), new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L)})); + ItemList.Arrow_Plastic_Glass_Weakness.set(addItem(tLastID = 256, "Light Weakness Arrow", "Glass Arrow filled with Weakening Brew", new Object[]{new Behaviour_Arrow_Potion(1.5F, 6.0F, new int[]{Potion.weakness.id, 900, 0, 100}), new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L)})); + ItemList.Arrow_Plastic_Glass_Weakness_Long.set(addItem(tLastID = 257, "Light Weakness Arrow", "Glass Arrow filled with stretched Weakening Brew", new Object[]{new Behaviour_Arrow_Potion(1.5F, 6.0F, new int[]{Potion.weakness.id, 1800, 0, 100}), new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L)})); + ItemList.Arrow_Plastic_Glass_Holy_Water.set(addItem(tLastID = 258, "Light Holy Water Arrow", "Glass Arrow filled with Holy Water", new Object[]{new Behaviour_Arrow_Potion(1.5F, 6.0F, Enchantment.smite, 10, new int[0]), new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.AURAM, 1L)})); + + GT_ModHandler.addCraftingRecipe(ItemList.Arrow_Wooden_Glass_Emtpy.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Emtpy, 'F', OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Wood)}); + GT_ModHandler.addCraftingRecipe(ItemList.Arrow_Wooden_Glass_Poison.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Poison, 'F', OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Wood)}); + GT_ModHandler.addCraftingRecipe(ItemList.Arrow_Wooden_Glass_Poison_Long.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Poison_Long, 'F', OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Wood)}); + GT_ModHandler.addCraftingRecipe(ItemList.Arrow_Wooden_Glass_Poison_Strong.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Poison_Strong, 'F', OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Wood)}); + GT_ModHandler.addCraftingRecipe(ItemList.Arrow_Wooden_Glass_Slowness.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Slowness, 'F', OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Wood)}); + GT_ModHandler.addCraftingRecipe(ItemList.Arrow_Wooden_Glass_Slowness_Long.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Slowness_Long, 'F', OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Wood)}); + GT_ModHandler.addCraftingRecipe(ItemList.Arrow_Wooden_Glass_Weakness.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Weakness, 'F', OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Wood)}); + GT_ModHandler.addCraftingRecipe(ItemList.Arrow_Wooden_Glass_Weakness_Long.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Weakness_Long, 'F', OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Wood)}); + GT_ModHandler.addCraftingRecipe(ItemList.Arrow_Wooden_Glass_Holy_Water.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Holy_Water, 'F', OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Wood)}); + + GT_ModHandler.addCraftingRecipe(ItemList.Arrow_Plastic_Glass_Emtpy.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Emtpy, 'F', OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Plastic)}); + GT_ModHandler.addCraftingRecipe(ItemList.Arrow_Plastic_Glass_Poison.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Poison, 'F', OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Plastic)}); + GT_ModHandler.addCraftingRecipe(ItemList.Arrow_Plastic_Glass_Poison_Long.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Poison_Long, 'F', OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Plastic)}); + GT_ModHandler.addCraftingRecipe(ItemList.Arrow_Plastic_Glass_Poison_Strong.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Poison_Strong, 'F', OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Plastic)}); + GT_ModHandler.addCraftingRecipe(ItemList.Arrow_Plastic_Glass_Slowness.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Slowness, 'F', OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Plastic)}); + GT_ModHandler.addCraftingRecipe(ItemList.Arrow_Plastic_Glass_Slowness_Long.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Slowness_Long, 'F', OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Plastic)}); + GT_ModHandler.addCraftingRecipe(ItemList.Arrow_Plastic_Glass_Weakness.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Weakness, 'F', OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Plastic)}); + GT_ModHandler.addCraftingRecipe(ItemList.Arrow_Plastic_Glass_Weakness_Long.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Weakness_Long, 'F', OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Plastic)}); + GT_ModHandler.addCraftingRecipe(ItemList.Arrow_Plastic_Glass_Holy_Water.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Holy_Water, 'F', OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Plastic)}); + + ItemList.Shape_Empty.set(addItem(tLastID = 300, "Empty Shape Plate", "Raw Plate to make Molds and Extruder Shapes", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 4L)})); + + GT_ModHandler.addCraftingRecipe(ItemList.Shape_Empty.get(1L, new Object[0]), GT_ModHandler.RecipeBits.MIRRORED | GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"hf", "PP", "PP", 'P', OrePrefixes.plate.get(Materials.Steel)}); + + ItemList.Shape_Mold_Plate.set(addItem(tLastID = 301, "Mold (Plate)", "Mold for making Plates", new Object[0])); + ItemList.Shape_Mold_Casing.set(addItem(tLastID = 302, "Mold (Casing)", "Mold for making Item Casings", new Object[0])); + ItemList.Shape_Mold_Gear.set(addItem(tLastID = 303, "Mold (Gear)", "Mold for making Gears", new Object[0])); + ItemList.Shape_Mold_Credit.set(addItem(tLastID = 304, "Mold (Coinage)", "Secure Mold for making Coins (Don't lose it!)", new Object[0])); + ItemList.Shape_Mold_Bottle.set(addItem(tLastID = 305, "Mold (Bottle)", "Mold for making Bottles", new Object[0])); + ItemList.Shape_Mold_Ingot.set(addItem(tLastID = 306, "Mold (Ingot)", "Mold for making Ingots", new Object[0])); + ItemList.Shape_Mold_Ball.set(addItem(tLastID = 307, "Mold (Ball)", "Mold for making Balls", new Object[0])); + ItemList.Shape_Mold_Block.set(addItem(tLastID = 308, "Mold (Block)", "Mold for making Blocks", new Object[0])); + ItemList.Shape_Mold_Nugget.set(addItem(tLastID = 309, "Mold (Nuggets)", "Mold for making Nuggets", new Object[0])); + ItemList.Shape_Mold_Bun.set(addItem(tLastID = 310, "Mold (Buns)", "Mold for shaping Buns", new Object[0])); + ItemList.Shape_Mold_Bread.set(addItem(tLastID = 311, "Mold (Bread)", "Mold for shaping Breads", new Object[0])); + ItemList.Shape_Mold_Baguette.set(addItem(tLastID = 312, "Mold (Baguette)", "Mold for shaping Baguettes", new Object[0])); + ItemList.Shape_Mold_Cylinder.set(addItem(tLastID = 313, "Mold (Cylinder)", "Mold for shaping Cylinders", new Object[0])); + ItemList.Shape_Mold_Anvil.set(addItem(tLastID = 314, "Mold (Anvil)", "Mold for shaping Anvils", new Object[0])); + ItemList.Shape_Mold_Name.set(addItem(tLastID = 315, "Mold (Name)", "Mold for naming Items (rename Mold with Anvil)", new Object[0])); + ItemList.Shape_Mold_Arrow.set(addItem(tLastID = 316, "Mold (Arrow Head)", "Mold for making Arrow Heads", new Object[0])); + ItemList.Shape_Mold_Gear_Small.set(addItem(tLastID = 317, "Mold (Small Gear)", "Mold for making small Gears", new Object[0])); + + GT_ModHandler.removeRecipe(new ItemStack[]{new ItemStack(Blocks.glass), null, new ItemStack(Blocks.glass), null, new ItemStack(Blocks.glass)}); + + GT_ModHandler.addCraftingRecipe(ItemList.Shape_Mold_Credit.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"h ", aTextShape, aTextEmptyRow, 'P', ItemList.Shape_Empty}); + GT_ModHandler.addCraftingRecipe(ItemList.Shape_Mold_Plate.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{" h ", aTextShape, aTextEmptyRow, 'P', ItemList.Shape_Empty}); + GT_ModHandler.addCraftingRecipe(ItemList.Shape_Mold_Casing.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{" h", aTextShape, aTextEmptyRow, 'P', ItemList.Shape_Empty}); + GT_ModHandler.addCraftingRecipe(ItemList.Shape_Mold_Gear.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextEmptyRow, " Ph", aTextEmptyRow, 'P', ItemList.Shape_Empty}); + GT_ModHandler.addCraftingRecipe(ItemList.Shape_Mold_Bottle.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextEmptyRow, aTextShape, " h", 'P', ItemList.Shape_Empty}); + GT_ModHandler.addCraftingRecipe(ItemList.Shape_Mold_Ingot.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextEmptyRow, aTextShape, " h ", 'P', ItemList.Shape_Empty}); + GT_ModHandler.addCraftingRecipe(ItemList.Shape_Mold_Ball.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextEmptyRow, aTextShape, "h ", 'P', ItemList.Shape_Empty}); + GT_ModHandler.addCraftingRecipe(ItemList.Shape_Mold_Block.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextEmptyRow, "hP ", aTextEmptyRow, 'P', ItemList.Shape_Empty}); + + GT_ModHandler.addCraftingRecipe(ItemList.Shape_Mold_Nugget.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"P h", aTextEmptyRow, aTextEmptyRow, 'P', ItemList.Shape_Empty}); + GT_ModHandler.addCraftingRecipe(ItemList.Shape_Mold_Bun.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"P ", " h", aTextEmptyRow, 'P', ItemList.Shape_Empty}); + GT_ModHandler.addCraftingRecipe(ItemList.Shape_Mold_Bread.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"P ", aTextEmptyRow, " h", 'P', ItemList.Shape_Empty}); + GT_ModHandler.addCraftingRecipe(ItemList.Shape_Mold_Baguette.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"P ", aTextEmptyRow, " h ", 'P', ItemList.Shape_Empty}); + GT_ModHandler.addCraftingRecipe(ItemList.Shape_Mold_Cylinder.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{" P", aTextEmptyRow, " h", 'P', ItemList.Shape_Empty}); + GT_ModHandler.addCraftingRecipe(ItemList.Shape_Mold_Anvil.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{" P", aTextEmptyRow, " h ", 'P', ItemList.Shape_Empty}); + GT_ModHandler.addCraftingRecipe(ItemList.Shape_Mold_Name.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{" P", aTextEmptyRow, "h ", 'P', ItemList.Shape_Empty}); + GT_ModHandler.addCraftingRecipe(ItemList.Shape_Mold_Arrow.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{" P", "h ", aTextEmptyRow, 'P', ItemList.Shape_Empty}); + GT_ModHandler.addCraftingRecipe(ItemList.Shape_Mold_Gear_Small.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextEmptyRow, aTextEmptyRow, "h P", 'P', ItemList.Shape_Empty}); + + ItemList.Shape_Extruder_Plate.set(addItem(tLastID = 350, "Extruder Shape (Plate)", "Extruder Shape for making Plates", new Object[0])); + ItemList.Shape_Extruder_Rod.set(addItem(tLastID = 351, "Extruder Shape (Rod)", "Extruder Shape for making Rods", new Object[0])); + ItemList.Shape_Extruder_Bolt.set(addItem(tLastID = 352, "Extruder Shape (Bolt)", "Extruder Shape for making Bolts", new Object[0])); + ItemList.Shape_Extruder_Ring.set(addItem(tLastID = 353, "Extruder Shape (Ring)", "Extruder Shape for making Rings", new Object[0])); + ItemList.Shape_Extruder_Cell.set(addItem(tLastID = 354, "Extruder Shape (Cell)", "Extruder Shape for making Cells", new Object[0])); + ItemList.Shape_Extruder_Ingot.set(addItem(tLastID = 355, "Extruder Shape (Ingot)", "Extruder Shape for, wait, can't we just use a Furnace?", new Object[0])); + ItemList.Shape_Extruder_Wire.set(addItem(tLastID = 356, "Extruder Shape (Wire)", "Extruder Shape for making Wires", new Object[0])); + ItemList.Shape_Extruder_Casing.set(addItem(tLastID = 357, "Extruder Shape (Casing)", "Extruder Shape for making Item Casings", new Object[0])); + ItemList.Shape_Extruder_Pipe_Tiny.set(addItem(tLastID = 358, "Extruder Shape (Tiny Pipe)", "Extruder Shape for making tiny Pipes", new Object[0])); + ItemList.Shape_Extruder_Pipe_Small.set(addItem(tLastID = 359, "Extruder Shape (Small Pipe)", "Extruder Shape for making small Pipes", new Object[0])); + ItemList.Shape_Extruder_Pipe_Medium.set(addItem(tLastID = 360, "Extruder Shape (Normal Pipe)", "Extruder Shape for making Pipes", new Object[0])); + ItemList.Shape_Extruder_Pipe_Large.set(addItem(tLastID = 361, "Extruder Shape (Large Pipe)", "Extruder Shape for making large Pipes", new Object[0])); + ItemList.Shape_Extruder_Pipe_Huge.set(addItem(tLastID = 362, "Extruder Shape (Huge Pipe)", "Extruder Shape for making full Block Pipes", new Object[0])); + ItemList.Shape_Extruder_Block.set(addItem(tLastID = 363, "Extruder Shape (Block)", "Extruder Shape for making Blocks", new Object[0])); + ItemList.Shape_Extruder_Sword.set(addItem(tLastID = 364, "Extruder Shape (Sword Blade)", "Extruder Shape for making Swords", new Object[0])); + ItemList.Shape_Extruder_Pickaxe.set(addItem(tLastID = 365, "Extruder Shape (Pickaxe Head)", "Extruder Shape for making Pickaxes", new Object[0])); + ItemList.Shape_Extruder_Shovel.set(addItem(tLastID = 366, "Extruder Shape (Shovel Head)", "Extruder Shape for making Shovels", new Object[0])); + ItemList.Shape_Extruder_Axe.set(addItem(tLastID = 367, "Extruder Shape (Axe Head)", "Extruder Shape for making Axes", new Object[0])); + ItemList.Shape_Extruder_Hoe.set(addItem(tLastID = 368, "Extruder Shape (Hoe Head)", "Extruder Shape for making Hoes", new Object[0])); + ItemList.Shape_Extruder_Hammer.set(addItem(tLastID = 369, "Extruder Shape (Hammer Head)", "Extruder Shape for making Hammers", new Object[0])); + ItemList.Shape_Extruder_File.set(addItem(tLastID = 370, "Extruder Shape (File Head)", "Extruder Shape for making Files", new Object[0])); + ItemList.Shape_Extruder_Saw.set(addItem(tLastID = 371, "Extruder Shape (Saw Blade)", "Extruder Shape for making Saws", new Object[0])); + ItemList.Shape_Extruder_Gear.set(addItem(tLastID = 372, "Extruder Shape (Gear)", "Extruder Shape for making Gears", new Object[0])); + ItemList.Shape_Extruder_Bottle.set(addItem(tLastID = 373, "Extruder Shape (Bottle)", "Extruder Shape for making Bottles", new Object[0])); + + GT_ModHandler.addCraftingRecipe(ItemList.Shape_Extruder_Bolt.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"x ", aTextShape, aTextEmptyRow, 'P', ItemList.Shape_Empty}); + GT_ModHandler.addCraftingRecipe(ItemList.Shape_Extruder_Cell.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{" x ", aTextShape, aTextEmptyRow, 'P', ItemList.Shape_Empty}); + GT_ModHandler.addCraftingRecipe(ItemList.Shape_Extruder_Ingot.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{" x", aTextShape, aTextEmptyRow, 'P', ItemList.Shape_Empty}); + GT_ModHandler.addCraftingRecipe(ItemList.Shape_Extruder_Ring.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextEmptyRow, " Px", aTextEmptyRow, 'P', ItemList.Shape_Empty}); + GT_ModHandler.addCraftingRecipe(ItemList.Shape_Extruder_Rod.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextEmptyRow, aTextShape, " x", 'P', ItemList.Shape_Empty}); + GT_ModHandler.addCraftingRecipe(ItemList.Shape_Extruder_Wire.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextEmptyRow, aTextShape, " x ", 'P', ItemList.Shape_Empty}); + GT_ModHandler.addCraftingRecipe(ItemList.Shape_Extruder_Casing.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextEmptyRow, aTextShape, "x ", 'P', ItemList.Shape_Empty}); + GT_ModHandler.addCraftingRecipe(ItemList.Shape_Extruder_Plate.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextEmptyRow, "xP ", aTextEmptyRow, 'P', ItemList.Shape_Empty}); + + GT_ModHandler.addCraftingRecipe(ItemList.Shape_Extruder_Block.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"P x", aTextEmptyRow, aTextEmptyRow, 'P', ItemList.Shape_Empty}); + GT_ModHandler.addCraftingRecipe(ItemList.Shape_Extruder_Pipe_Small.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"P ", " x", aTextEmptyRow, 'P', ItemList.Shape_Empty}); + GT_ModHandler.addCraftingRecipe(ItemList.Shape_Extruder_Pipe_Large.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"P ", aTextEmptyRow, " x", 'P', ItemList.Shape_Empty}); + GT_ModHandler.addCraftingRecipe(ItemList.Shape_Extruder_Pipe_Medium.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"P ", aTextEmptyRow, " x ", 'P', ItemList.Shape_Empty}); + GT_ModHandler.addCraftingRecipe(ItemList.Shape_Extruder_Sword.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{" P", aTextEmptyRow, " x", 'P', ItemList.Shape_Empty}); + GT_ModHandler.addCraftingRecipe(ItemList.Shape_Extruder_Pickaxe.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{" P", aTextEmptyRow, " x ", 'P', ItemList.Shape_Empty}); + GT_ModHandler.addCraftingRecipe(ItemList.Shape_Extruder_Shovel.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{" P", aTextEmptyRow, "x ", 'P', ItemList.Shape_Empty}); + GT_ModHandler.addCraftingRecipe(ItemList.Shape_Extruder_Axe.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{" P", "x ", aTextEmptyRow, 'P', ItemList.Shape_Empty}); + GT_ModHandler.addCraftingRecipe(ItemList.Shape_Extruder_Hoe.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextEmptyRow, aTextEmptyRow, "x P", 'P', ItemList.Shape_Empty}); + GT_ModHandler.addCraftingRecipe(ItemList.Shape_Extruder_Hammer.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextEmptyRow, "x ", " P", 'P', ItemList.Shape_Empty}); + GT_ModHandler.addCraftingRecipe(ItemList.Shape_Extruder_File.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"x ", aTextEmptyRow, " P", 'P', ItemList.Shape_Empty}); + GT_ModHandler.addCraftingRecipe(ItemList.Shape_Extruder_Saw.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{" x ", aTextEmptyRow, " P", 'P', ItemList.Shape_Empty}); + GT_ModHandler.addCraftingRecipe(ItemList.Shape_Extruder_Gear.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"x ", aTextEmptyRow, "P ", 'P', ItemList.Shape_Empty}); + GT_ModHandler.addCraftingRecipe(ItemList.Shape_Extruder_Pipe_Tiny.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{" x ", aTextEmptyRow, "P ", 'P', ItemList.Shape_Empty}); + GT_ModHandler.addCraftingRecipe(ItemList.Shape_Extruder_Pipe_Huge.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{" x", aTextEmptyRow, "P ", 'P', ItemList.Shape_Empty}); + GT_ModHandler.addCraftingRecipe(ItemList.Shape_Extruder_Bottle.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextEmptyRow, " x", "P ", 'P', ItemList.Shape_Empty}); + + ItemList.Shape_Slicer_Flat.set(addItem(tLastID = 398, "Slicer Blade (Flat)", "Slicer Blade for cutting Flat", new Object[0])); + ItemList.Shape_Slicer_Stripes.set(addItem(tLastID = 399, "Slicer Blade (Stripes)", "Slicer Blade for cutting Stripes", new Object[0])); + + GT_ModHandler.addCraftingRecipe(ItemList.Shape_Slicer_Flat.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"hXS", aTextShape, "fXd", 'P', ItemList.Shape_Extruder_Block, 'X', OrePrefixes.plate.get(Materials.StainlessSteel), 'S', OrePrefixes.screw.get(Materials.StainlessSteel)}); + GT_ModHandler.addCraftingRecipe(ItemList.Shape_Slicer_Stripes.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"hXS", "XPX", "fXd", 'P', ItemList.Shape_Extruder_Block, 'X', OrePrefixes.plate.get(Materials.StainlessSteel), 'S', OrePrefixes.screw.get(Materials.StainlessSteel)}); + + ItemList.Fuel_Can_Plastic_Empty.set(addItem(tLastID = 400, "Empty Plastic Fuel Can", "Used to store Fuels", new Object[]{new ItemData(Materials.Plastic, OrePrefixes.plate.mMaterialAmount * 1L, new MaterialStack[0]), new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 1L)})); + ItemList.Fuel_Can_Plastic_Filled.set(addItem(tLastID = 401, "Plastic Fuel Can", "Burns well in Diesel Generators", new Object[]{new ItemData(Materials.Plastic, OrePrefixes.plate.mMaterialAmount * 1L, new MaterialStack[0]), new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 1L)})); + + GT_ModHandler.addCraftingRecipe(ItemList.Fuel_Can_Plastic_Empty.get(7L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{" PP", "P P", "PPP", 'P', OrePrefixes.plate.get(Materials.Plastic)}); + + ItemList.Spray_Empty.set(addItem(tLastID = 402, "Empty Spray Can", "Used for making Sprays", new Object[]{new ItemData(Materials.Tin, OrePrefixes.plate.mMaterialAmount * 2L, Materials.Redstone, OrePrefixes.dust.mMaterialAmount), new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 1L)})); + + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 1L), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Empty, 1L), ItemList.Spray_Empty.get(1L, new Object[0]), 800, 1); + + ItemList.Crate_Empty.set(addItem(tLastID = 403, "Empty Crate", "To Package lots of Material", new Object[]{new ItemData(Materials.Wood, 3628800L, Materials.Iron, OrePrefixes.screw.mMaterialAmount), new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 2L)})); + + GT_ModHandler.addCraftingRecipe(ItemList.Crate_Empty.get(4L, new Object[0]), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"SWS", "WdW", "SWS", 'W', OrePrefixes.plank.get(Materials.Wood), 'S', OrePrefixes.screw.get(Materials.AnyIron)}); + GT_ModHandler.addCraftingRecipe(ItemList.Crate_Empty.get(4L, new Object[0]), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"SWS", "WdW", "SWS", 'W', OrePrefixes.plank.get(Materials.Wood), 'S', OrePrefixes.screw.get(Materials.Steel)}); + + ItemList.ThermosCan_Empty.set(addItem(tLastID = 404, "Empty Thermos Can", "Keeping hot things hot and cold things cold", new Object[]{new ItemData(Materials.Aluminium, OrePrefixes.plateDouble.mMaterialAmount * 1L + 2L * OrePrefixes.ring.mMaterialAmount, new MaterialStack[0]), new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.GELUM, 1L)})); + + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Aluminium, 1L), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Aluminium, 2L), ItemList.ThermosCan_Empty.get(1L, new Object[0]), 800, 1); + + ItemList.Large_Fluid_Cell_Steel.set(addItem(tLastID = 405, "Large Steel Fluid Cell", "", new Object[]{new ItemData(Materials.Steel, OrePrefixes.plateDouble.mMaterialAmount * 4L, new MaterialStack(Materials.Bronze, OrePrefixes.ring.mMaterialAmount * 4L)), new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 2L)})); + setFluidContainerStats(32000 + tLastID, 8000L, 64L); + + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Steel, 4L), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.AnyBronze, 4L), ItemList.Large_Fluid_Cell_Steel.get(1L, new Object[0]), 200, 30); + + ItemList.Large_Fluid_Cell_TungstenSteel.set(addItem(tLastID = 406, "Large Tungstensteel Fluid Cell", "", new Object[]{new ItemData(Materials.TungstenSteel, OrePrefixes.plateDouble.mMaterialAmount * 4L, new MaterialStack(Materials.Platinum, OrePrefixes.ring.mMaterialAmount * 4L)), new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 9L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 7L)})); + setFluidContainerStats(32000 + tLastID, 512000L, 32L); + + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.TungstenSteel, 4L), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Platinum, 4L), ItemList.Large_Fluid_Cell_TungstenSteel.get(1L, new Object[0]), 200, 480); + + ItemList.Large_Fluid_Cell_Aluminium.set(addItem(tLastID = 407, "Large Aluminium Fluid Cell", "", new Object[]{new ItemData(Materials.Aluminium, OrePrefixes.plateDouble.mMaterialAmount * 4L, new MaterialStack(Materials.Silver, OrePrefixes.ring.mMaterialAmount * 4L)), new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 5L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 3L)})); + setFluidContainerStats(32000 + tLastID, 32000L, 64L); + + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Aluminium, 4L), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Silver, 4L), ItemList.Large_Fluid_Cell_Aluminium.get(1L, new Object[0]), 200, 64); + + ItemList.Large_Fluid_Cell_StainlessSteel.set(addItem(tLastID = 408, "Large StainlessSteel Fluid Cell", "", new Object[]{new ItemData(Materials.StainlessSteel, OrePrefixes.plateDouble.mMaterialAmount * 4L, new MaterialStack(Materials.Electrum, OrePrefixes.ring.mMaterialAmount * 4L)), new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 6L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 4L)})); + setFluidContainerStats(32000 + tLastID, 64000L, 64L); + + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.StainlessSteel, 4L), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Electrum, 4L), ItemList.Large_Fluid_Cell_StainlessSteel.get(1L, new Object[0]), 200, 120); + + ItemList.Large_Fluid_Cell_Titanium.set(addItem(tLastID = 409, "Large Titanium Fluid Cell", "", new Object[]{new ItemData(Materials.Titanium, OrePrefixes.plateDouble.mMaterialAmount * 4L, new MaterialStack(Materials.RoseGold, OrePrefixes.ring.mMaterialAmount * 4L)), new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 7L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 5L)})); + setFluidContainerStats(32000 + tLastID, 128000L, 64L); + + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Titanium, 4L), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.RoseGold, 4L), ItemList.Large_Fluid_Cell_Titanium.get(1L, new Object[0]), 200, 256); + + ItemList.Large_Fluid_Cell_Chrome.set(addItem(tLastID = 410, "Large Chrome Fluid Cell", "", new Object[]{new ItemData(Materials.Chrome, OrePrefixes.plateDouble.mMaterialAmount * 4L, new MaterialStack(Materials.Palladium, OrePrefixes.ring.mMaterialAmount * 4L)), new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 6L)})); + setFluidContainerStats(32000 + tLastID, 2048000L, 8L); + + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Chrome, 4L), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Palladium, 4L), ItemList.Large_Fluid_Cell_Chrome.get(1L, new Object[0]), 200, 1024); + + ItemList.Large_Fluid_Cell_Iridium.set(addItem(tLastID = 411, "Large Iridium Fluid Cell", "", new Object[]{new ItemData(Materials.Iridium, OrePrefixes.plateDouble.mMaterialAmount * 4L, new MaterialStack(Materials.Naquadah, OrePrefixes.ring.mMaterialAmount * 4L)), new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 10L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 8L)})); + setFluidContainerStats(32000 + tLastID, 8192000L, 2L); + + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Iridium, 4L), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Naquadah, 4L), ItemList.Large_Fluid_Cell_Iridium.get(1L, new Object[0]), 200, 1920); + + ItemList.Large_Fluid_Cell_Osmium.set(addItem(tLastID = 412, "Large Osmium Fluid Cell", "", new Object[]{new ItemData(Materials.Osmium, OrePrefixes.plateDouble.mMaterialAmount * 4L, new MaterialStack(Materials.ElectrumFlux, OrePrefixes.ring.mMaterialAmount * 4L)), new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 11L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 9L)})); + setFluidContainerStats(32000 + tLastID, 32768000L, 1L); + + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Osmium, 4L), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.ElectrumFlux, 4L), ItemList.Large_Fluid_Cell_Osmium.get(1L, new Object[0]), 200, 4096); + + ItemList.Large_Fluid_Cell_Neutronium.set(addItem(tLastID = 413, "Large Neutronium Fluid Cell", "", new Object[]{new ItemData(Materials.Neutronium, OrePrefixes.plateDouble.mMaterialAmount * 4L, new MaterialStack(Materials.Draconium, OrePrefixes.ring.mMaterialAmount * 4L)), new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 12L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 10L)})); + setFluidContainerStats(32000 + tLastID, 131072000L, 1L); + + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Neutronium, 4L), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Draconium, 4L), ItemList.Large_Fluid_Cell_Neutronium.get(1L, new Object[0]), 200, 7680); + for (byte i = 0; i < 16; i = (byte) (i + 1)) { + ItemList.SPRAY_CAN_DYES[i].set(addItem(tLastID = 430 + 2 * i, "Spray Can (" + Dyes.get(i).mName + ")", "Full", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 4L)})); + ItemList.SPRAY_CAN_DYES_USED[i].set(addItem(tLastID + 1, "Spray Can (" + Dyes.get(i).mName + ")", "Used", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 3L), SubTag.INVISIBLE})); + IItemBehaviour<GT_MetaBase_Item> tBehaviour = new Behaviour_Spray_Color(ItemList.Spray_Empty.get(1L, new Object[0]), ItemList.SPRAY_CAN_DYES_USED[i].get(1L, new Object[0]), ItemList.SPRAY_CAN_DYES[i].get(1L, new Object[0]), 512L, i); + addItemBehavior(32000 + tLastID, tBehaviour); + addItemBehavior(32001 + tLastID, tBehaviour); + } + ItemList.Tool_Matches.set(addItem(tLastID = 471, "Match", "", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 1L)})); + ItemList.Tool_MatchBox_Used.set(addItem(tLastID = 472, "Match Box", "This is not a Car", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 1L), SubTag.INVISIBLE})); + ItemList.Tool_MatchBox_Full.set(addItem(tLastID = 473, "Match Box (Full)", "This is not a Car", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 2L)})); + + IItemBehaviour<GT_MetaBase_Item> tBehaviour = new Behaviour_Lighter(null, ItemList.Tool_Matches.get(1L, new Object[0]), ItemList.Tool_Matches.get(1L, new Object[0]), 1L); + addItemBehavior(32471, tBehaviour); + tBehaviour = new Behaviour_Lighter(null, ItemList.Tool_MatchBox_Used.get(1L, new Object[0]), ItemList.Tool_MatchBox_Full.get(1L, new Object[0]), 16L); + addItemBehavior(32472, tBehaviour); + addItemBehavior(32473, tBehaviour); + + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.bolt, Materials.Wood, 1L), GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Phosphor, 1L), ItemList.Tool_Matches.get(1L, new Object[0]), 16, 16); + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.bolt, Materials.Wood, 1L), GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Phosphorus, 1L), ItemList.Tool_Matches.get(1L, new Object[0]), 16, 16); + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.bolt, Materials.Wood, 4L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Phosphor, 1L), ItemList.Tool_Matches.get(4L, new Object[0]), 64, 16); + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.bolt, Materials.Wood, 4L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Phosphorus, 1L), ItemList.Tool_Matches.get(4L, new Object[0]), 64, 16); + GT_Values.RA.addBoxingRecipe(ItemList.Tool_Matches.get(16L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Paper, 1L), ItemList.Tool_MatchBox_Full.get(1L, new Object[0]), 64, 16); + GT_Values.RA.addUnboxingRecipe(ItemList.Tool_MatchBox_Full.get(1L, new Object[0]), ItemList.Tool_Matches.get(16L, new Object[0]), null, 32, 16); + + ItemList.Tool_Lighter_Invar_Empty.set(addItem(tLastID = 474, "Lighter (Empty)", "", new Object[]{new ItemData(Materials.Invar, OrePrefixes.plate.mMaterialAmount * 2L, new MaterialStack[0]), new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 1L)})); + ItemList.Tool_Lighter_Invar_Used.set(addItem(tLastID = 475, "Lighter", "", new Object[]{new ItemData(Materials.Invar, OrePrefixes.plate.mMaterialAmount * 2L, new MaterialStack[0]), new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 1L), SubTag.INVISIBLE})); + ItemList.Tool_Lighter_Invar_Full.set(addItem(tLastID = 476, "Lighter (Full)", "", new Object[]{new ItemData(Materials.Invar, OrePrefixes.plate.mMaterialAmount * 2L, new MaterialStack[0]), new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 2L)})); + + tBehaviour = new Behaviour_Lighter(ItemList.Tool_Lighter_Invar_Empty.get(1L, new Object[0]), ItemList.Tool_Lighter_Invar_Used.get(1L, new Object[0]), ItemList.Tool_Lighter_Invar_Full.get(1L, new Object[0]), 100L); + addItemBehavior(32475, tBehaviour); + addItemBehavior(32476, tBehaviour); + + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Invar, 2L), new ItemStack(Items.flint, 1), ItemList.Tool_Lighter_Invar_Empty.get(1L, new Object[0]), 256, 16); + + ItemList.Tool_Lighter_Platinum_Empty.set(addItem(tLastID = 477, "Platinum Lighter (Empty)", "A known Prank Master is engraved on it", new Object[]{new ItemData(Materials.Platinum, OrePrefixes.plate.mMaterialAmount * 2L, new MaterialStack[0]), new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.NEBRISUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 1L)})); + ItemList.Tool_Lighter_Platinum_Used.set(addItem(tLastID = 478, "Platinum Lighter", "A known Prank Master is engraved on it", new Object[]{new ItemData(Materials.Platinum, OrePrefixes.plate.mMaterialAmount * 2L, new MaterialStack[0]), new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.NEBRISUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 1L), SubTag.INVISIBLE})); + ItemList.Tool_Lighter_Platinum_Full.set(addItem(tLastID = 479, "Platinum Lighter (Full)", "A known Prank Master is engraved on it", new Object[]{new ItemData(Materials.Platinum, OrePrefixes.plate.mMaterialAmount * 2L, new MaterialStack[0]), new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.NEBRISUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 2L)})); + + tBehaviour = new Behaviour_Lighter(ItemList.Tool_Lighter_Platinum_Empty.get(1L, new Object[0]), ItemList.Tool_Lighter_Platinum_Used.get(1L, new Object[0]), ItemList.Tool_Lighter_Platinum_Full.get(1L, new Object[0]), 1000L); + addItemBehavior(32478, tBehaviour); + addItemBehavior(32479, tBehaviour); + + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Platinum, 2L), new ItemStack(Items.flint, 1), ItemList.Tool_Lighter_Platinum_Empty.get(1L, new Object[0]), 256, 256); + + if (Loader.isModLoaded("GalacticraftMars")) { + ItemList.Ingot_Heavy1.set(addItem(tLastID = 462, "Heavy Duty Alloy Ingot T1", "Used to make Heavy Duty Plates T1", new Object[0])); + ItemList.Ingot_Heavy2.set(addItem(tLastID = 463, "Heavy Duty Alloy Ingot T2", "Used to make Heavy Duty Plates T2", new Object[0])); + ItemList.Ingot_Heavy3.set(addItem(tLastID = 464, "Heavy Duty Alloy Ingot T3", "Used to make Heavy Duty Plates T3", new Object[0])); + + GT_ModHandler.addCraftingRecipe(ItemList.Ingot_Heavy1.get(1L, new Object[0]), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"BhB", "CAS", "B B", 'B', OrePrefixes.bolt.get(Materials.StainlessSteel), 'C', OrePrefixes.compressed.get(Materials.Bronze), 'A', OrePrefixes.compressed.get(Materials.Aluminium), 'S', OrePrefixes.compressed.get(Materials.Steel)}); + } + ItemList.Ingot_IridiumAlloy.set(addItem(tLastID = 480, "Iridium Alloy Ingot", "Used to make Iridium Plates", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 4L)})); + + GT_ModHandler.addRollingMachineRecipe(ItemList.Ingot_IridiumAlloy.get(1L, new Object[0]), new Object[]{"IAI", "ADA", "IAI", 'D', GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.harderrecipes, "iridiumplate", true) ? OreDictNames.craftingIndustrialDiamond : OrePrefixes.dust.get(Materials.Diamond), 'A', OrePrefixes.plateAlloy.get("Advanced"), 'I', OrePrefixes.plate.get(Materials.Iridium)}); + GT_ModHandler.addCraftingRecipe(ItemList.Ingot_IridiumAlloy.get(1L, new Object[0]), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"IAI", "ADA", "IAI", 'D', GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.harderrecipes, "iridiumplate", true) ? OreDictNames.craftingIndustrialDiamond : OrePrefixes.dust.get(Materials.Diamond), 'A', OrePrefixes.plateAlloy.get("Advanced"), 'I', OrePrefixes.plate.get(Materials.Iridium)}); + + ItemList.Paper_Printed_Pages.set(addItem(tLastID = 481, "Printed Pages", "Used to make written Books", new Object[]{new ItemData(Materials.Paper, 10886400L, new MaterialStack[0]), new Behaviour_PrintedPages(), new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 2L)})); + ItemList.Paper_Magic_Empty.set(addItem(tLastID = 482, "Magic Paper", "", new Object[]{SubTag.INVISIBLE, new ItemData(Materials.Paper, 3628800L, new MaterialStack[0]), new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.PRAECANTATIO, 1L)})); + ItemList.Paper_Magic_Page.set(addItem(tLastID = 483, "Enchanted Page", "", new Object[]{SubTag.INVISIBLE, new ItemData(Materials.Paper, 3628800L, new MaterialStack[0]), new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.PRAECANTATIO, 2L)})); + ItemList.Paper_Magic_Pages.set(addItem(tLastID = 484, "Enchanted Pages", "", new Object[]{SubTag.INVISIBLE, new ItemData(Materials.Paper, 10886400L, new MaterialStack[0]), new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.PRAECANTATIO, 4L)})); + ItemList.Paper_Punch_Card_Empty.set(addItem(tLastID = 485, "Punch Card", "", new Object[]{SubTag.INVISIBLE, new ItemData(Materials.Paper, 7257600L, new MaterialStack[0]), new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 1L)})); + ItemList.Paper_Punch_Card_Encoded.set(addItem(tLastID = 486, "Punched Card", "", new Object[]{SubTag.INVISIBLE, new ItemData(Materials.Paper, 7257600L, new MaterialStack[0]), new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 2L)})); + ItemList.Book_Written_01.set(addItem(tLastID = 487, "Book", "", new Object[]{new ItemData(Materials.Paper, 10886400L, new MaterialStack[0]), "bookWritten", OreDictNames.craftingBook, new Behaviour_WrittenBook(), new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 2L)})); + ItemList.Book_Written_02.set(addItem(tLastID = 488, "Book", "", new Object[]{new ItemData(Materials.Paper, 10886400L, new MaterialStack[0]), "bookWritten", OreDictNames.craftingBook, new Behaviour_WrittenBook(), new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 2L)})); + ItemList.Book_Written_03.set(addItem(tLastID = 489, "Book", "", new Object[]{new ItemData(Materials.Paper, 10886400L, new MaterialStack[0]), "bookWritten", OreDictNames.craftingBook, new Behaviour_WrittenBook(), new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 2L)})); + + ItemList.Schematic.set(addItem(tLastID = 490, "Schematic", "EMPTY", new Object[]{new ItemData(Materials.StainlessSteel, 7257600L, new MaterialStack[0]), new TC_Aspects.TC_AspectStack(TC_Aspects.STRONTIO, 1L)})); + ItemList.Schematic_Crafting.set(addItem(tLastID = 491, "Schematic (Crafting)", "Crafts the Programmed Recipe", new Object[]{new ItemData(Materials.StainlessSteel, 7257600L, new MaterialStack[0]), new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 1L)})); + ItemList.Schematic_1by1.set(addItem(tLastID = 495, "Schematic (1x1)", "Crafts 1 Items as 1x1 (use in Packager)", new Object[]{new ItemData(Materials.StainlessSteel, 7257600L, new MaterialStack[0]), new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 1L)})); + ItemList.Schematic_2by2.set(addItem(tLastID = 496, "Schematic (2x2)", "Crafts 4 Items as 2x2 (use in Packager)", new Object[]{new ItemData(Materials.StainlessSteel, 7257600L, new MaterialStack[0]), new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 1L)})); + ItemList.Schematic_3by3.set(addItem(tLastID = 497, "Schematic (3x3)", "Crafts 9 Items as 3x3 (use in Packager)", new Object[]{new ItemData(Materials.StainlessSteel, 7257600L, new MaterialStack[0]), new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 1L)})); + ItemList.Schematic_Dust.set(addItem(tLastID = 498, "Schematic (Dusts)", "Combines Dusts (use in Packager)", new Object[]{new ItemData(Materials.StainlessSteel, 7257600L, new MaterialStack[0]), new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 1L)})); + + GT_ModHandler.addCraftingRecipe(ItemList.Schematic_1by1.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"d ", aTextShape, aTextEmptyRow, 'P', ItemList.Schematic}); + GT_ModHandler.addCraftingRecipe(ItemList.Schematic_2by2.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{" d ", aTextShape, aTextEmptyRow, 'P', ItemList.Schematic}); + GT_ModHandler.addCraftingRecipe(ItemList.Schematic_3by3.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{" d", aTextShape, aTextEmptyRow, 'P', ItemList.Schematic}); + GT_ModHandler.addCraftingRecipe(ItemList.Schematic_Dust.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{aTextEmptyRow, aTextShape, " d", 'P', ItemList.Schematic}); + + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Schematic.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Schematic_Crafting}); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Schematic.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Schematic_1by1}); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Schematic.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Schematic_2by2}); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Schematic.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Schematic_3by3}); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Schematic.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Schematic_Dust}); + + ItemList.Battery_Hull_LV.set(addItem(500, "Small Battery Hull", "An empty LV Battery Hull", new Object[]{new ItemData(Materials.BatteryAlloy, OrePrefixes.plate.mMaterialAmount * 1L, new MaterialStack[0]), new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 1L)})); + ItemList.Battery_Hull_MV.set(addItem(501, "Medium Battery Hull", "An empty MV Battery Hull", new Object[]{new ItemData(Materials.BatteryAlloy, OrePrefixes.plate.mMaterialAmount * 3L, new MaterialStack[0]), new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 1L)})); + ItemList.Battery_Hull_HV.set(addItem(502, "Large Battery Hull", "An empty HV Battery Hull", new Object[]{new ItemData(Materials.BatteryAlloy, OrePrefixes.plate.mMaterialAmount * 9L, new MaterialStack[0]), new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 1L)})); + + GT_ModHandler.addCraftingRecipe(ItemList.Battery_Hull_LV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"C", "P", "P", 'P', OrePrefixes.plate.get(Materials.BatteryAlloy), 'C', OreDictNames.craftingWireTin}); + GT_ModHandler.addCraftingRecipe(ItemList.Battery_Hull_MV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"C C", "PPP", "PPP", 'P', OrePrefixes.plate.get(Materials.BatteryAlloy), 'C', OreDictNames.craftingWireCopper}); + + ItemList.Battery_RE_ULV_Tantalum.set(addItem(tLastID = 499, "Tantalum Capacitor", "Reusable", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 1L)})); + setElectricStats(32000 + tLastID, 1000L, GT_Values.V[0], 0L, -3L, false); + + ItemList.Battery_SU_LV_SulfuricAcid.set(addItem(tLastID = 510, "Small Acid Battery", "Single Use", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 2L)})); + setElectricStats(32000 + tLastID, 18000L, GT_Values.V[1], 1L, -2L, true); + ItemList.Battery_SU_LV_Mercury.set(addItem(tLastID = 511, "Small Mercury Battery", "Single Use", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 2L)})); + setElectricStats(32000 + tLastID, 32000L, GT_Values.V[1], 1L, -2L, true); + + ItemList.Battery_RE_LV_Cadmium.set(addItem(tLastID = 517, "Small Cadmium Battery", "Reusable", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 1L), "calclavia:ADVANCED_BATTERY"})); + setElectricStats(32000 + tLastID, 75000L, GT_Values.V[1], 1L, -3L, true); + ItemList.Battery_RE_LV_Lithium.set(addItem(tLastID = 518, "Small Lithium Battery", "Reusable", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 1L), "calclavia:ADVANCED_BATTERY"})); + setElectricStats(32000 + tLastID, 100000L, GT_Values.V[1], 1L, -3L, true); + ItemList.Battery_RE_LV_Sodium.set(addItem(tLastID = 519, "Small Sodium Battery", "Reusable", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 1L), "calclavia:ADVANCED_BATTERY"})); + setElectricStats(32000 + tLastID, 50000L, GT_Values.V[1], 1L, -3L, true); + + ItemList.Battery_SU_MV_SulfuricAcid.set(addItem(tLastID = 520, "Medium Acid Battery", "Single Use", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 4L)})); + setElectricStats(32000 + tLastID, 72000L, GT_Values.V[2], 2L, -2L, true); + ItemList.Battery_SU_MV_Mercury.set(addItem(tLastID = 521, "Medium Mercury Battery", "Single Use", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 4L)})); + setElectricStats(32000 + tLastID, 128000L, GT_Values.V[2], 2L, -2L, true); + + ItemList.Battery_RE_MV_Cadmium.set(addItem(tLastID = 527, "Medium Cadmium Battery", "Reusable", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 2L)})); + setElectricStats(32000 + tLastID, 300000L, GT_Values.V[2], 2L, -3L, true); + ItemList.Battery_RE_MV_Lithium.set(addItem(tLastID = 528, "Medium Lithium Battery", "Reusable", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 2L)})); + setElectricStats(32000 + tLastID, 400000L, GT_Values.V[2], 2L, -3L, true); + ItemList.Battery_RE_MV_Sodium.set(addItem(tLastID = 529, "Medium Sodium Battery", "Reusable", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 2L)})); + setElectricStats(32000 + tLastID, 200000L, GT_Values.V[2], 2L, -3L, true); + + ItemList.Battery_SU_HV_SulfuricAcid.set(addItem(tLastID = 530, "Large Acid Battery", "Single Use", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 8L)})); + setElectricStats(32000 + tLastID, 288000L, GT_Values.V[3], 3L, -2L, true); + ItemList.Battery_SU_HV_Mercury.set(addItem(tLastID = 531, "Large Mercury Battery", "Single Use", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 8L)})); + setElectricStats(32000 + tLastID, 512000L, GT_Values.V[3], 3L, -2L, true); + + ItemList.Battery_RE_HV_Cadmium.set(addItem(tLastID = 537, "Large Cadmium Battery", "Reusable", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 4L)})); + setElectricStats(32000 + tLastID, 1200000L, GT_Values.V[3], 3L, -3L, true); + ItemList.Battery_RE_HV_Lithium.set(addItem(tLastID = 538, "Large Lithium Battery", "Reusable", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 4L)})); + setElectricStats(32000 + tLastID, 1600000L, GT_Values.V[3], 3L, -3L, true); + ItemList.Battery_RE_HV_Sodium.set(addItem(tLastID = 539, "Large Sodium Battery", "Reusable", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 4L)})); + setElectricStats(32000 + tLastID, 800000L, GT_Values.V[3], 3L, -3L, true); + + GT_ModHandler.addExtractionRecipe(ItemList.Battery_SU_LV_SulfuricAcid.get(1L, new Object[0]), ItemList.Battery_Hull_LV.get(1L, new Object[0])); + GT_ModHandler.addExtractionRecipe(ItemList.Battery_SU_LV_Mercury.get(1L, new Object[0]), ItemList.Battery_Hull_LV.get(1L, new Object[0])); + GT_ModHandler.addExtractionRecipe(ItemList.Battery_SU_MV_SulfuricAcid.get(1L, new Object[0]), ItemList.Battery_Hull_MV.get(1L, new Object[0])); + GT_ModHandler.addExtractionRecipe(ItemList.Battery_SU_MV_Mercury.get(1L, new Object[0]), ItemList.Battery_Hull_MV.get(1L, new Object[0])); + GT_ModHandler.addExtractionRecipe(ItemList.Battery_SU_HV_SulfuricAcid.get(1L, new Object[0]), ItemList.Battery_Hull_HV.get(1L, new Object[0])); + GT_ModHandler.addExtractionRecipe(ItemList.Battery_SU_HV_Mercury.get(1L, new Object[0]), ItemList.Battery_Hull_HV.get(1L, new Object[0])); + GT_ModHandler.addExtractionRecipe(ItemList.Battery_RE_LV_Cadmium.get(1L, new Object[0]), ItemList.Battery_Hull_LV.get(1L, new Object[0])); + GT_ModHandler.addExtractionRecipe(ItemList.Battery_RE_LV_Lithium.get(1L, new Object[0]), ItemList.Battery_Hull_LV.get(1L, new Object[0])); + GT_ModHandler.addExtractionRecipe(ItemList.Battery_RE_LV_Sodium.get(1L, new Object[0]), ItemList.Battery_Hull_LV.get(1L, new Object[0])); + GT_ModHandler.addExtractionRecipe(ItemList.Battery_RE_MV_Cadmium.get(1L, new Object[0]), ItemList.Battery_Hull_MV.get(1L, new Object[0])); + GT_ModHandler.addExtractionRecipe(ItemList.Battery_RE_MV_Lithium.get(1L, new Object[0]), ItemList.Battery_Hull_MV.get(1L, new Object[0])); + GT_ModHandler.addExtractionRecipe(ItemList.Battery_RE_MV_Sodium.get(1L, new Object[0]), ItemList.Battery_Hull_MV.get(1L, new Object[0])); + GT_ModHandler.addExtractionRecipe(ItemList.Battery_RE_HV_Cadmium.get(1L, new Object[0]), ItemList.Battery_Hull_HV.get(1L, new Object[0])); + GT_ModHandler.addExtractionRecipe(ItemList.Battery_RE_HV_Lithium.get(1L, new Object[0]), ItemList.Battery_Hull_HV.get(1L, new Object[0])); + GT_ModHandler.addExtractionRecipe(ItemList.Battery_RE_HV_Sodium.get(1L, new Object[0]), ItemList.Battery_Hull_HV.get(1L, new Object[0])); + + GT_Values.RA.addCannerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Cadmium, 2L), ItemList.Battery_Hull_LV.get(1L, new Object[0]), ItemList.Battery_RE_LV_Cadmium.get(1L, new Object[0]), null, 100, 2); + GT_Values.RA.addCannerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Lithium, 2L), ItemList.Battery_Hull_LV.get(1L, new Object[0]), ItemList.Battery_RE_LV_Lithium.get(1L, new Object[0]), null, 100, 2); + GT_Values.RA.addCannerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sodium, 2L), ItemList.Battery_Hull_LV.get(1L, new Object[0]), ItemList.Battery_RE_LV_Sodium.get(1L, new Object[0]), null, 100, 2); + GT_Values.RA.addCannerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Cadmium, 8L), ItemList.Battery_Hull_MV.get(1L, new Object[0]), ItemList.Battery_RE_MV_Cadmium.get(1L, new Object[0]), null, 400, 2); + GT_Values.RA.addCannerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Lithium, 8L), ItemList.Battery_Hull_MV.get(1L, new Object[0]), ItemList.Battery_RE_MV_Lithium.get(1L, new Object[0]), null, 400, 2); + GT_Values.RA.addCannerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sodium, 8L), ItemList.Battery_Hull_MV.get(1L, new Object[0]), ItemList.Battery_RE_MV_Sodium.get(1L, new Object[0]), null, 400, 2); + GT_Values.RA.addCannerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Cadmium, 32L), ItemList.Battery_Hull_HV.get(1L, new Object[0]), ItemList.Battery_RE_HV_Cadmium.get(1L, new Object[0]), null, 1600, 2); + GT_Values.RA.addCannerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Lithium, 32L), ItemList.Battery_Hull_HV.get(1L, new Object[0]), ItemList.Battery_RE_HV_Lithium.get(1L, new Object[0]), null, 1600, 2); + GT_Values.RA.addCannerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sodium, 32L), ItemList.Battery_Hull_HV.get(1L, new Object[0]), ItemList.Battery_RE_HV_Sodium.get(1L, new Object[0]), null, 1600, 2); + + ItemList.Energy_LapotronicOrb.set(addItem(tLastID = 597, "Lapotronic Energy Orb", "", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 16L), OrePrefixes.battery.get(Materials.Ultimate)})); + setElectricStats(32000 + tLastID, 100000000L, GT_Values.V[5], 5L, -3L, true); + + ItemList.ZPM.set(addItem(tLastID = 598, "Zero Point Module", "", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 64L), new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 64L)})); + setElectricStats(32000 + tLastID, 2000000000000L, GT_Values.V[7], 7L, -2L, true); + + ItemList.Energy_LapotronicOrb2.set(addItem(tLastID = 599, "Lapotronic Energy Orb Cluster", "", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 16L), OrePrefixes.battery.get(Materials.Ultimate)})); + setElectricStats(32000 + tLastID, 1000000000L, GT_Values.V[6], 6L, -3L, true); + + ItemList.ZPM2.set(addItem(tLastID = 605, "Ultimate Battery", "Fill this to win minecraft", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 64L), new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 64L)})); + setElectricStats(32000 + tLastID, Long.MAX_VALUE, GT_Values.V[8], 8L, -3L, true); + + ItemList.ZPM3.set(addItem(tLastID = 609, "Really Ultimate Battery", "Fill this to be way older", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 64L), new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 64L)})); + setElectricStats(32000 + tLastID, Long.MAX_VALUE, GT_Values.V[12], 12L, -3L, true); + + ItemList.Electric_Motor_LV.set(addItem(600, "Electric Motor (LV)", "", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 1L)})); + ItemList.Electric_Motor_MV.set(addItem(601, "Electric Motor (MV)", "", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 2L)})); + ItemList.Electric_Motor_HV.set(addItem(602, "Electric Motor (HV)", "", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 4L)})); + ItemList.Electric_Motor_EV.set(addItem(603, "Electric Motor (EV)", "", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 8L)})); + ItemList.Electric_Motor_IV.set(addItem(604, "Electric Motor (IV)", "", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 16L)})); + ItemList.Electric_Motor_LuV.set(addItem(606, "Electric Motor (LuV)", "", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 32L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 32L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 32L)})); + ItemList.Electric_Motor_ZPM.set(addItem(607, "Electric Motor (ZPM)", "", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 64L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 64L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 64L)})); + ItemList.Electric_Motor_UV.set(addItem(608, "Electric Motor (UV)", "", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 128L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 128L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 128L)})); + + GT_ModHandler.addCraftingRecipe(ItemList.Electric_Motor_LV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"CWR", "WIW", "RWC", 'I', OrePrefixes.stick.get(Materials.IronMagnetic), 'R', OrePrefixes.stick.get(Materials.AnyIron), 'W', OrePrefixes.wireGt01.get(Materials.AnyCopper), 'C', OrePrefixes.cableGt01.get(Materials.Tin)}); + GT_ModHandler.addCraftingRecipe(ItemList.Electric_Motor_LV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"CWR", "WIW", "RWC", 'I', OrePrefixes.stick.get(Materials.SteelMagnetic), 'R', OrePrefixes.stick.get(Materials.Steel), 'W', OrePrefixes.wireGt01.get(Materials.AnyCopper), 'C', OrePrefixes.cableGt01.get(Materials.Tin)}); + GT_ModHandler.addCraftingRecipe(ItemList.Electric_Motor_MV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"CWR", "WIW", "RWC", 'I', OrePrefixes.stick.get(Materials.SteelMagnetic), 'R', OrePrefixes.stick.get(Materials.Aluminium), 'W', OrePrefixes.wireGt02.get(Materials.Cupronickel), 'C', OrePrefixes.cableGt01.get(Materials.AnyCopper)}); + GT_ModHandler.addCraftingRecipe(ItemList.Electric_Motor_HV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"CWR", "WIW", "RWC", 'I', OrePrefixes.stick.get(Materials.SteelMagnetic), 'R', OrePrefixes.stick.get(Materials.StainlessSteel), 'W', OrePrefixes.wireGt04.get(Materials.Electrum), 'C', OrePrefixes.cableGt02.get(Materials.Silver)}); + GT_ModHandler.addCraftingRecipe(ItemList.Electric_Motor_EV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"CWR", "WIW", "RWC", 'I', OrePrefixes.stick.get(Materials.NeodymiumMagnetic), 'R', OrePrefixes.stick.get(Materials.Titanium), 'W', OrePrefixes.wireGt04.get(Materials.AnnealedCopper), 'C', OrePrefixes.cableGt02.get(Materials.Aluminium)}); + GT_ModHandler.addCraftingRecipe(ItemList.Electric_Motor_IV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"CWR", "WIW", "RWC", 'I', OrePrefixes.stick.get(Materials.NeodymiumMagnetic), 'R', OrePrefixes.stick.get(Materials.TungstenSteel), 'W', OrePrefixes.wireGt04.get(Materials.Graphene), 'C', OrePrefixes.cableGt02.get(Materials.Tungsten)}); + + ItemList.Electric_Pump_LV.set(addItem(610, "Electric Pump (LV)", "640 L/sec (as Cover)", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L)})); + ItemList.Electric_Pump_MV.set(addItem(611, "Electric Pump (MV)", "2560 L/sec (as Cover)", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 2L)})); + ItemList.Electric_Pump_HV.set(addItem(612, "Electric Pump (HV)", "10240 L/sec (as Cover)", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 4L)})); + ItemList.Electric_Pump_EV.set(addItem(613, "Electric Pump (EV)", "40.960 L/sec (as Cover)", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 8L)})); + ItemList.Electric_Pump_IV.set(addItem(614, "Electric Pump (IV)", "163.840 L/sec (as Cover)", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 16L)})); + ItemList.Electric_Pump_LuV.set(addItem(615, "Electric Pump (LuV)", "655.360 L/sec (as Cover)", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 32L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 32L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 32L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 32L)})); + ItemList.Electric_Pump_ZPM.set(addItem(616, "Electric Pump (ZPM)", "2.621.440 L/sec (as Cover)", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 64L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 64L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 64L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 64L)})); + ItemList.Electric_Pump_UV.set(addItem(617, "Electric Pump (UV)", "10.485.760 L/sec (as Cover)", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 128L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 128L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 128L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 128L)})); + + GregTech_API.registerCover(ItemList.Electric_Pump_LV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[1][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP)}), new GT_Cover_Pump(32)); + GregTech_API.registerCover(ItemList.Electric_Pump_MV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[2][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP)}), new GT_Cover_Pump(128)); + GregTech_API.registerCover(ItemList.Electric_Pump_HV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[3][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP)}), new GT_Cover_Pump(512)); + GregTech_API.registerCover(ItemList.Electric_Pump_EV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[4][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP)}), new GT_Cover_Pump(2048)); + GregTech_API.registerCover(ItemList.Electric_Pump_IV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[5][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP)}), new GT_Cover_Pump(8192)); + GregTech_API.registerCover(ItemList.Electric_Pump_LuV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[6][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP)}), new GT_Cover_Pump(32768)); + GregTech_API.registerCover(ItemList.Electric_Pump_ZPM.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[7][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP)}), new GT_Cover_Pump(131072)); + GregTech_API.registerCover(ItemList.Electric_Pump_UV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[8][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP)}), new GT_Cover_Pump(524288)); + + ItemList.FluidRegulator_LV.set(addItem(660, "Fluid Regulator (LV)", "Configuable up to 640 L/sec (as Cover)", new Object[]{})); + ItemList.FluidRegulator_MV.set(addItem(661, "Fluid Regulator (MV)", "Configuable up to 2560 L/sec (as Cover)", new Object[]{})); + ItemList.FluidRegulator_HV.set(addItem(662, "Fluid Regulator (HV)", "Configuable up to 10240 L/sec (as Cover)", new Object[]{})); + ItemList.FluidRegulator_EV.set(addItem(663, "Fluid Regulator (EV)", "Configuable up to 40960 L/sec (as Cover)", new Object[]{})); + ItemList.FluidRegulator_IV.set(addItem(664, "Fluid Regulator (IV)", "Configuable up to 163840 L/sec (as Cover)", new Object[]{})); + + GregTech_API.registerCover(ItemList.FluidRegulator_LV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[1][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP)}), new GT_Cover_FluidRegulator(32)); + GregTech_API.registerCover(ItemList.FluidRegulator_MV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[2][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP)}), new GT_Cover_FluidRegulator(128)); + GregTech_API.registerCover(ItemList.FluidRegulator_HV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[3][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP)}), new GT_Cover_FluidRegulator(512)); + GregTech_API.registerCover(ItemList.FluidRegulator_EV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[4][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP)}), new GT_Cover_FluidRegulator(2048)); + GregTech_API.registerCover(ItemList.FluidRegulator_IV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[5][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP)}), new GT_Cover_FluidRegulator(8192)); + + ItemList.FluidFilter.set(addItem(669, "Fluid Filter", "Set with Fluid Container to only accept one Fluid Type", new Object[]{})); + GregTech_API.registerCover(ItemList.FluidFilter.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[1][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SHUTTER)}), new GT_Cover_Fluidfilter()); + + /**ItemList.Rotor_LV.set(addItem(tLastID = 620, "Tin Rotor", "", new Object[] { OrePrefixes.rotor.get(Materials.Tin), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 1L) })); + ItemList.Rotor_MV.set(addItem(tLastID = 621, "Bronze Rotor", "", new Object[] { OrePrefixes.rotor.get(Materials.Bronze), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 2L) })); + ItemList.Rotor_HV.set(addItem(tLastID = 622, "Steel Rotor", "", new Object[] { OrePrefixes.rotor.get(Materials.Steel), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 4L) })); + ItemList.Rotor_EV.set(addItem(tLastID = 623, "Stainless Steel Rotor", "", new Object[] { OrePrefixes.rotor.get(Materials.StainlessSteel), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 8L) })); + ItemList.Rotor_IV.set(addItem(tLastID = 624, "Tungstensteel Rotor", "", new Object[] { OrePrefixes.rotor.get(Materials.TungstenSteel), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 16L) })); + ItemList.Rotor_LuV.set(ItemList.Rotor_IV.get(1L, new Object[0])); + ItemList.Rotor_ZPM.set(ItemList.Rotor_LuV.get(1L, new Object[0])); + ItemList.Rotor_UV.set(ItemList.Rotor_ZPM.get(1L, new Object[0]));**/ + + GT_ModHandler.addCraftingRecipe(ItemList.Electric_Pump_LV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SXO", "dPw", "OMW", 'M', ItemList.Electric_Motor_LV, 'O', OrePrefixes.ring.get(Materials.Paper ), 'X', OrePrefixes.rotor.get(Materials.Tin), 'S', OrePrefixes.screw.get(Materials.Tin), 'W', OrePrefixes.cableGt01.get(Materials.Tin), 'P', OrePrefixes.pipeMedium.get(Materials.Bronze)}); + GT_ModHandler.addCraftingRecipe(ItemList.Electric_Pump_LV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SXO", "dPw", "OMW", 'M', ItemList.Electric_Motor_LV, 'O', OrePrefixes.ring.get(Materials.Rubber), 'X', OrePrefixes.rotor.get(Materials.Tin), 'S', OrePrefixes.screw.get(Materials.Tin), 'W', OrePrefixes.cableGt01.get(Materials.Tin), 'P', OrePrefixes.pipeMedium.get(Materials.Bronze)}); + GT_ModHandler.addCraftingRecipe(ItemList.Electric_Pump_MV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SXO", "dPw", "OMW", 'M', ItemList.Electric_Motor_MV, 'O', OrePrefixes.ring.get(Materials.Rubber), 'X', OrePrefixes.rotor.get(Materials.Bronze), 'S', OrePrefixes.screw.get(Materials.Bronze), 'W', OrePrefixes.cableGt01.get(Materials.AnyCopper), 'P', OrePrefixes.pipeMedium.get(Materials.Steel)}); + GT_ModHandler.addCraftingRecipe(ItemList.Electric_Pump_HV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SXO", "dPw", "OMW", 'M', ItemList.Electric_Motor_HV, 'O', OrePrefixes.ring.get(Materials.Rubber), 'X', OrePrefixes.rotor.get(Materials.Steel), 'S', OrePrefixes.screw.get(Materials.Steel), 'W', OrePrefixes.cableGt01.get(Materials.Gold), 'P', OrePrefixes.pipeMedium.get(Materials.StainlessSteel)}); + GT_ModHandler.addCraftingRecipe(ItemList.Electric_Pump_EV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SXO", "dPw", "OMW", 'M', ItemList.Electric_Motor_EV, 'O', OrePrefixes.ring.get(Materials.Silicone), 'X', OrePrefixes.rotor.get(Materials.StainlessSteel), 'S', OrePrefixes.screw.get(Materials.StainlessSteel), 'W', OrePrefixes.cableGt01.get(Materials.Aluminium), 'P', OrePrefixes.pipeMedium.get(Materials.Titanium)}); + GT_ModHandler.addCraftingRecipe(ItemList.Electric_Pump_IV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SXO", "dPw", "OMW", 'M', ItemList.Electric_Motor_IV, 'O', OrePrefixes.ring.get(Materials.Silicone), 'X', OrePrefixes.rotor.get(Materials.TungstenSteel), 'S', OrePrefixes.screw.get(Materials.TungstenSteel), 'W', OrePrefixes.cableGt01.get(Materials.Tungsten), 'P', OrePrefixes.pipeMedium.get(Materials.TungstenSteel)}); + + ItemList.Conveyor_Module_LV.set(addItem(630, "Conveyor Module (LV)", "1 Stack every 20 secs (as Cover)", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 1L)})); + ItemList.Conveyor_Module_MV.set(addItem(631, "Conveyor Module (MV)", "1 Stack every 5 secs (as Cover)", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 2L)})); + ItemList.Conveyor_Module_HV.set(addItem(632, "Conveyor Module (HV)", "1 Stack every 1 sec (as Cover)", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 4L)})); + ItemList.Conveyor_Module_EV.set(addItem(633, "Conveyor Module (EV)", "1 Stack every 1/5 sec (as Cover)", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 8L)})); + ItemList.Conveyor_Module_IV.set(addItem(634, "Conveyor Module (IV)", "1 Stack every 1/20 sec (as Cover)", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 16L)})); + ItemList.Conveyor_Module_LuV.set(addItem(635, "Conveyor Module (LuV)", "1 Stack every 1/20 sec (as Cover)", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 32L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 32L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 32L)})); + ItemList.Conveyor_Module_ZPM.set(addItem(636, "Conveyor Module (ZPM)", "1 Stack every 1/20 sec (as Cover)", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 64L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 64L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 64L)})); + ItemList.Conveyor_Module_UV.set(addItem(637, "Conveyor Module (UV)", "1 Stack every 1/20 sec (as Cover)", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 128L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 128L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 128L)})); + + GT_ModHandler.addCraftingRecipe(ItemList.Conveyor_Module_LV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"RRR", "MCM", "RRR", 'M', ItemList.Electric_Motor_LV, 'C', OrePrefixes.cableGt01.get(Materials.Tin), 'R', OrePrefixes.plate.get(Materials.Rubber)}); + GT_ModHandler.addCraftingRecipe(ItemList.Conveyor_Module_MV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"RRR", "MCM", "RRR", 'M', ItemList.Electric_Motor_MV, 'C', OrePrefixes.cableGt01.get(Materials.AnyCopper), 'R', OrePrefixes.plate.get(Materials.Rubber)}); + GT_ModHandler.addCraftingRecipe(ItemList.Conveyor_Module_HV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"RRR", "MCM", "RRR", 'M', ItemList.Electric_Motor_HV, 'C', OrePrefixes.cableGt01.get(Materials.Gold), 'R', OrePrefixes.plate.get(Materials.Rubber)}); + GT_ModHandler.addCraftingRecipe(ItemList.Conveyor_Module_EV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"RRR", "MCM", "RRR", 'M', ItemList.Electric_Motor_EV, 'C', OrePrefixes.cableGt01.get(Materials.Aluminium), 'R', OrePrefixes.plate.get(Materials.Rubber)}); + GT_ModHandler.addCraftingRecipe(ItemList.Conveyor_Module_IV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"RRR", "MCM", "RRR", 'M', ItemList.Electric_Motor_IV, 'C', OrePrefixes.cableGt01.get(Materials.Tungsten), 'R', OrePrefixes.plate.get(Materials.Rubber)}); + + GregTech_API.registerCover(ItemList.Conveyor_Module_LV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[1][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_CONVEYOR)}), new GT_Cover_Conveyor(400)); + GregTech_API.registerCover(ItemList.Conveyor_Module_MV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[2][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_CONVEYOR)}), new GT_Cover_Conveyor(100)); + GregTech_API.registerCover(ItemList.Conveyor_Module_HV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[3][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_CONVEYOR)}), new GT_Cover_Conveyor(20)); + GregTech_API.registerCover(ItemList.Conveyor_Module_EV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[4][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_CONVEYOR)}), new GT_Cover_Conveyor(4)); + GregTech_API.registerCover(ItemList.Conveyor_Module_IV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[5][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_CONVEYOR)}), new GT_Cover_Conveyor(1)); + GregTech_API.registerCover(ItemList.Conveyor_Module_LuV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[6][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_CONVEYOR)}), new GT_Cover_Conveyor(1)); + GregTech_API.registerCover(ItemList.Conveyor_Module_ZPM.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[7][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_CONVEYOR)}), new GT_Cover_Conveyor(1)); + GregTech_API.registerCover(ItemList.Conveyor_Module_UV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[8][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_CONVEYOR)}), new GT_Cover_Conveyor(1)); + + ItemList.Electric_Piston_LV.set(addItem(640, "Electric Piston (LV)", "", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 1L)})); + ItemList.Electric_Piston_MV.set(addItem(641, "Electric Piston (MV)", "", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 2L)})); + ItemList.Electric_Piston_HV.set(addItem(642, "Electric Piston (HV)", "", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 4L)})); + ItemList.Electric_Piston_EV.set(addItem(643, "Electric Piston (EV)", "", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 8L)})); + ItemList.Electric_Piston_IV.set(addItem(644, "Electric Piston (IV)", "", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 32L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 16L)})); + ItemList.Electric_Piston_LuV.set(addItem(645,"Electric Piston (LuV)","", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 32L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 64L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 32L)})); + ItemList.Electric_Piston_ZPM.set(addItem(646, "Electric Piston (ZPM)", "", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 32L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 64L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 32L)})); + ItemList.Electric_Piston_UV.set(addItem(647, "Electric Piston (UV)", "", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 64L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 128L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 64L)})); + + GT_ModHandler.addCraftingRecipe(ItemList.Electric_Piston_LV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"PPP", "CSS", "CMG", 'P', OrePrefixes.plate.get(Materials.Steel), 'S', OrePrefixes.stick.get(Materials.Steel), 'G', OrePrefixes.gearGtSmall.get(Materials.Steel), 'M', ItemList.Electric_Motor_LV, 'C', OrePrefixes.cableGt01.get(Materials.Tin)}); + GT_ModHandler.addCraftingRecipe(ItemList.Electric_Piston_MV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"PPP", "CSS", "CMG", 'P', OrePrefixes.plate.get(Materials.Aluminium), 'S', OrePrefixes.stick.get(Materials.Aluminium), 'G', OrePrefixes.gearGtSmall.get(Materials.Aluminium), 'M', ItemList.Electric_Motor_MV, 'C', OrePrefixes.cableGt01.get(Materials.AnyCopper)}); + GT_ModHandler.addCraftingRecipe(ItemList.Electric_Piston_HV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"PPP", "CSS", "CMG", 'P', OrePrefixes.plate.get(Materials.StainlessSteel), 'S', OrePrefixes.stick.get(Materials.StainlessSteel), 'G', OrePrefixes.gearGtSmall.get(Materials.StainlessSteel), 'M', ItemList.Electric_Motor_HV, 'C', OrePrefixes.cableGt01.get(Materials.Gold)}); + GT_ModHandler.addCraftingRecipe(ItemList.Electric_Piston_EV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"PPP", "CSS", "CMG", 'P', OrePrefixes.plate.get(Materials.Titanium), 'S', OrePrefixes.stick.get(Materials.Titanium), 'G', OrePrefixes.gearGtSmall.get(Materials.Titanium), 'M', ItemList.Electric_Motor_EV, 'C', OrePrefixes.cableGt01.get(Materials.Aluminium)}); + GT_ModHandler.addCraftingRecipe(ItemList.Electric_Piston_IV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"PPP", "CSS", "CMG", 'P', OrePrefixes.plate.get(Materials.TungstenSteel), 'S', OrePrefixes.stick.get(Materials.TungstenSteel), 'G', OrePrefixes.gearGtSmall.get(Materials.TungstenSteel), 'M', ItemList.Electric_Motor_IV, 'C', OrePrefixes.cableGt01.get(Materials.Tungsten)}); + + ItemList.Robot_Arm_LV.set(addItem(650, "Robot Arm (LV)", "Inserts into specific Slots (as Cover)", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 1L)})); + ItemList.Robot_Arm_MV.set(addItem(651, "Robot Arm (MV)", "Inserts into specific Slots (as Cover)", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 2L)})); + ItemList.Robot_Arm_HV.set(addItem(652, "Robot Arm (HV)", "Inserts into specific Slots (as Cover)", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 4L)})); + ItemList.Robot_Arm_EV.set(addItem(653, "Robot Arm (EV)", "Inserts into specific Slots (as Cover)", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 8L)})); + ItemList.Robot_Arm_IV.set(addItem(654, "Robot Arm (IV)", "Inserts into specific Slots (as Cover)", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 32L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 16L)})); + ItemList.Robot_Arm_LuV.set(addItem(655, "Robot Arm (LuV)", "Inserts into specific Slots (as Cover)", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 32L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 64L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 32L), new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 32L)})); + ItemList.Robot_Arm_ZPM.set(addItem(656, "Robot Arm (ZPM)", "Inserts into specific Slots (as Cover)", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 64L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 128L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 64L), new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 64L)})); + ItemList.Robot_Arm_UV.set(addItem(657, "Robot Arm (UV)", "Inserts into specific Slots (as Cover)", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 128L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 256L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 128L), new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 128L)})); + + GT_ModHandler.addCraftingRecipe(ItemList.Robot_Arm_LV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"CCC", "MSM", "PES", 'S', OrePrefixes.stick.get(Materials.Steel), 'M', ItemList.Electric_Motor_LV, 'P', ItemList.Electric_Piston_LV, 'E', OrePrefixes.circuit.get(Materials.Basic), 'C', OrePrefixes.cableGt01.get(Materials.Tin)}); + GT_ModHandler.addCraftingRecipe(ItemList.Robot_Arm_MV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"CCC", "MSM", "PES", 'S', OrePrefixes.stick.get(Materials.Aluminium), 'M', ItemList.Electric_Motor_MV, 'P', ItemList.Electric_Piston_MV, 'E', OrePrefixes.circuit.get(Materials.Good), 'C', OrePrefixes.cableGt01.get(Materials.AnyCopper)}); + GT_ModHandler.addCraftingRecipe(ItemList.Robot_Arm_HV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"CCC", "MSM", "PES", 'S', OrePrefixes.stick.get(Materials.StainlessSteel), 'M', ItemList.Electric_Motor_HV, 'P', ItemList.Electric_Piston_HV, 'E', OrePrefixes.circuit.get(Materials.Advanced), 'C', OrePrefixes.cableGt01.get(Materials.Gold)}); + GT_ModHandler.addCraftingRecipe(ItemList.Robot_Arm_EV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"CCC", "MSM", "PES", 'S', OrePrefixes.stick.get(Materials.Titanium), 'M', ItemList.Electric_Motor_EV, 'P', ItemList.Electric_Piston_EV, 'E', OrePrefixes.circuit.get(Materials.Elite), 'C', OrePrefixes.cableGt01.get(Materials.Aluminium)}); + GT_ModHandler.addCraftingRecipe(ItemList.Robot_Arm_IV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"CCC", "MSM", "PES", 'S', OrePrefixes.stick.get(Materials.TungstenSteel), 'M', ItemList.Electric_Motor_IV, 'P', ItemList.Electric_Piston_IV, 'E', OrePrefixes.circuit.get(Materials.Master), 'C', OrePrefixes.cableGt01.get(Materials.Tungsten)}); + + GregTech_API.registerCover(ItemList.Robot_Arm_LV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[1][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ARM)}), new GT_Cover_Arm(400)); + GregTech_API.registerCover(ItemList.Robot_Arm_MV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[2][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ARM)}), new GT_Cover_Arm(100)); + GregTech_API.registerCover(ItemList.Robot_Arm_HV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[3][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ARM)}), new GT_Cover_Arm(20)); + GregTech_API.registerCover(ItemList.Robot_Arm_EV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[4][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ARM)}), new GT_Cover_Arm(4)); + GregTech_API.registerCover(ItemList.Robot_Arm_IV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[5][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ARM)}), new GT_Cover_Arm(1)); + GregTech_API.registerCover(ItemList.Robot_Arm_LuV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[6][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ARM)}), new GT_Cover_Arm(1)); + GregTech_API.registerCover(ItemList.Robot_Arm_ZPM.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[7][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ARM)}), new GT_Cover_Arm(1)); + GregTech_API.registerCover(ItemList.Robot_Arm_UV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[8][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ARM)}), new GT_Cover_Arm(1)); + + ItemList.QuantumEye.set(addItem(tLastID = 724, "Quantum Eye", "Improved Ender Eye", new Object[0])); + ItemList.QuantumStar.set(addItem(tLastID = 725, "Quantum Star", "Improved Nether Star", new Object[0])); + ItemList.Gravistar.set(addItem(tLastID = 726, "Gravi Star", "Ultimate Nether Star", new Object[0])); + + ItemList.Field_Generator_LV.set(addItem(670, "Field Generator (Tier I)", "", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 1L)})); + ItemList.Field_Generator_MV.set(addItem(671, "Field Generator (Tier II)", "", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 2L)})); + ItemList.Field_Generator_HV.set(addItem(672, "Field Generator (Tier III)", "", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 4L)})); + ItemList.Field_Generator_EV.set(addItem(673, "Field Generator (Tier IV)", "", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 8L)})); + ItemList.Field_Generator_IV.set(addItem(674, "Field Generator (Tier V)", "", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 32L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 16L)})); + ItemList.Field_Generator_LuV.set(addItem(675, "Field Generator (Tier VI)", "", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 64L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 32L), new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 32L)})); + ItemList.Field_Generator_ZPM.set(addItem(676, "Field Generator (Tier VII)", "", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 128L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 64L), new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 64L)})); + ItemList.Field_Generator_UV.set(addItem(677, "Field Generator (Tier VIII)", "", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 256L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 128L), new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 128L)})); + + ItemList.Emitter_LV.set(addItem(680, "Emitter (LV)", "", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.LUX, 1L)})); + ItemList.Emitter_MV.set(addItem(681, "Emitter (MV)", "", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.LUX, 2L)})); + ItemList.Emitter_HV.set(addItem(682, "Emitter (HV)", "", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.LUX, 4L)})); + ItemList.Emitter_EV.set(addItem(683, "Emitter (EV)", "", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.LUX, 8L)})); + ItemList.Emitter_IV.set(addItem(684, "Emitter (IV)", "", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.LUX, 16L)})); + ItemList.Emitter_LuV.set(addItem(685, "Emitter (LuV)", "", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 32L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 32L), new TC_Aspects.TC_AspectStack(TC_Aspects.LUX, 32L)})); + ItemList.Emitter_ZPM.set(addItem(686, "Emitter (ZPM)", "", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 64L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 64L), new TC_Aspects.TC_AspectStack(TC_Aspects.LUX, 64L)})); + ItemList.Emitter_UV.set(addItem(687, "Emitter (UV)", "", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 128L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 128L), new TC_Aspects.TC_AspectStack(TC_Aspects.LUX, 128L)})); + + GT_ModHandler.addCraftingRecipe(ItemList.Emitter_LV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SSC", "WQS", "CWS", 'Q', OrePrefixes.gem.get(Materials.CertusQuartz), 'S', OrePrefixes.stick.get(Materials.Brass), 'C', OrePrefixes.circuit.get(Materials.Basic), 'W', OrePrefixes.cableGt01.get(Materials.Tin)}); + GT_ModHandler.addCraftingRecipe(ItemList.Emitter_MV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SSC", "WQS", "CWS", 'Q', OrePrefixes.gem.get(Materials.EnderPearl), 'S', OrePrefixes.stick.get(Materials.Electrum), 'C', OrePrefixes.circuit.get(Materials.Good), 'W', OrePrefixes.cableGt01.get(Materials.AnyCopper)}); + GT_ModHandler.addCraftingRecipe(ItemList.Emitter_HV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SSC", "WQS", "CWS", 'Q', OrePrefixes.gem.get(Materials.EnderEye), 'S', OrePrefixes.stick.get(Materials.Chrome), 'C', OrePrefixes.circuit.get(Materials.Advanced), 'W', OrePrefixes.cableGt01.get(Materials.Gold)}); + GT_ModHandler.addCraftingRecipe(ItemList.Emitter_EV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SSC", "WQS", "CWS", 'Q', ItemList.QuantumEye, 'S', OrePrefixes.stick.get(Materials.Platinum), 'C', OrePrefixes.circuit.get(Materials.Elite), 'W', OrePrefixes.cableGt01.get(Materials.Aluminium)}); + GT_ModHandler.addCraftingRecipe(ItemList.Emitter_IV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SSC", "WQS", "CWS", 'Q', ItemList.QuantumStar, 'S', OrePrefixes.stick.get(Materials.Iridium), 'C', OrePrefixes.circuit.get(Materials.Master), 'W', OrePrefixes.cableGt01.get(Materials.Tungsten)}); + + ItemList.Sensor_LV.set(addItem(690, "Sensor (LV)", "", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 1L)})); + ItemList.Sensor_MV.set(addItem(691, "Sensor (MV)", "", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 2L)})); + ItemList.Sensor_HV.set(addItem(692, "Sensor (HV)", "", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 4L)})); + ItemList.Sensor_EV.set(addItem(693, "Sensor (EV)", "", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 8L)})); + ItemList.Sensor_IV.set(addItem(694, "Sensor (IV)", "", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 16L)})); + ItemList.Sensor_LuV.set(addItem(695, "Sensor (LuV)", "", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 32L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 32L), new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 32L)})); + ItemList.Sensor_ZPM.set(addItem(696, "Sensor (ZPM)", "", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 64L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 64L), new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 64L)})); + ItemList.Sensor_UV.set(addItem(697, "Sensor (UV)", "", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 128L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 128L), new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 128L)})); + + GT_ModHandler.addCraftingRecipe(ItemList.Sensor_LV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"P Q", "PS ", "CPP", 'Q', OrePrefixes.gem.get(Materials.CertusQuartz), 'S', OrePrefixes.stick.get(Materials.Brass), 'P', OrePrefixes.plate.get(Materials.Steel), 'C', OrePrefixes.circuit.get(Materials.Basic)}); + GT_ModHandler.addCraftingRecipe(ItemList.Sensor_MV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"P Q", "PS ", "CPP", 'Q', OrePrefixes.gemFlawless.get(Materials.Emerald), 'S', OrePrefixes.stick.get(Materials.Electrum), 'P', OrePrefixes.plate.get(Materials.Aluminium), 'C', OrePrefixes.circuit.get(Materials.Good)}); + GT_ModHandler.addCraftingRecipe(ItemList.Sensor_HV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"P Q", "PS ", "CPP", 'Q', OrePrefixes.gem.get(Materials.EnderEye), 'S', OrePrefixes.stick.get(Materials.Chrome), 'P', OrePrefixes.plate.get(Materials.StainlessSteel), 'C', OrePrefixes.circuit.get(Materials.Advanced)}); + GT_ModHandler.addCraftingRecipe(ItemList.Sensor_EV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"P Q", "PS ", "CPP", 'Q', ItemList.QuantumEye, 'S', OrePrefixes.stick.get(Materials.Platinum), 'P', OrePrefixes.plate.get(Materials.Titanium), 'C', OrePrefixes.circuit.get(Materials.Elite)}); + GT_ModHandler.addCraftingRecipe(ItemList.Sensor_IV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"P Q", "PS ", "CPP", 'Q', ItemList.QuantumStar, 'S', OrePrefixes.stick.get(Materials.Iridium), 'P', OrePrefixes.plate.get(Materials.TungstenSteel), 'C', OrePrefixes.circuit.get(Materials.Master)}); + + ItemList.Circuit_Primitive.set(addItem(tLastID = 700, "Vacuum Tube", "A very simple Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Primitive), SubTag.NO_UNIFICATION})); + ItemList.Circuit_Parts_Vacuum_Tube.set(ItemList.Circuit_Primitive.get(1,new Object[0])); + ItemList.Circuit_Basic.set(addItem(tLastID = 701, "Integrated Logic Circuit", "A basic Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Basic), SubTag.NO_UNIFICATION})); + ItemList.Circuit_Good.set(addItem(tLastID = 702, "Good Electronic Circuit", "A good Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Good), SubTag.NO_UNIFICATION})); + ItemList.Circuit_Advanced.set(addItem(tLastID = 703, "Processor Assembly", "An advanced Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Advanced), SubTag.NO_UNIFICATION})); + ItemList.Circuit_Computer.set(ItemList.Circuit_Advanced.get(1,new Object[0])); + ItemList.Circuit_Data.set(addItem(tLastID = 704, "Workstation", "A extreme Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Data), SubTag.NO_UNIFICATION})); + ItemList.Circuit_Elite.set(addItem(tLastID = 705, "Mainframe", "A elite Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Elite), SubTag.NO_UNIFICATION})); + ItemList.Circuit_Master.set(addItem(tLastID = 706, "Nanoprocessor Mainframe", "A master Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Master), SubTag.NO_UNIFICATION})); + ItemList.Tool_DataOrb.set(addItem(tLastID = 707, "Data Orb", "A High Capacity Data Storage and Master Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Master), SubTag.NO_UNIFICATION, new Behaviour_DataOrb()})); + //ItemList.Circuit_Ultimate.set(ItemList.Tool_DataOrb.get(1L, new Object[0])); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Tool_DataOrb.get(1L, new Object[0]), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Tool_DataOrb.get(1L, new Object[0])}); + ItemList.Tool_DataStick.set(addItem(tLastID = 708, "Data Stick", "A Low Capacity Data Storage and Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Data), SubTag.NO_UNIFICATION, new Behaviour_DataStick()})); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Tool_DataStick.get(1L, new Object[0]), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Tool_DataStick.get(1L, new Object[0])}); + + ItemList.Circuit_Board_Basic.set(addItem(tLastID = 710, "Coated Circuit Board", "A basic Board", new Object[0])); ItemList.Circuit_Board_Coated.set(ItemList.Circuit_Board_Basic.get(1,new Object[0])); + ItemList.Circuit_Board_Advanced.set(addItem(tLastID = 711, "Epoxy Circuit Board", "An advanced Board", new Object[0])); ItemList.Circuit_Board_Epoxy.set(ItemList.Circuit_Board_Advanced.get(1,new Object[0])); + ItemList.Circuit_Board_Elite.set(addItem(tLastID = 712, "Multilayer Fiberglass Circuit Board", "A elite Board", new Object[0])); ItemList.Circuit_Board_Multifiberglass.set(ItemList.Circuit_Board_Elite.get(1,new Object[0])); + ItemList.Circuit_Parts_Crystal_Chip_Elite.set(addItem(tLastID = 713, "Engraved Crystal Chip", "Needed for Circuits", new Object[0])); + ItemList.Circuit_Parts_Crystal_Chip_Master.set(addItem(tLastID = 714, "Engraved Lapotron Chip", "Needed for Circuits", new Object[0])); + ItemList.Circuit_Parts_Advanced.set(addItem(tLastID = 715, "Diode", "Basic Electronic Component", new Object[0])); ItemList.Circuit_Parts_Diode.set(ItemList.Circuit_Parts_Advanced.get(1,new Object[0])); + ItemList.Circuit_Parts_Wiring_Basic.set(addItem(tLastID = 716, "Resistor", "Basic Electronic Component", new Object[0])); ItemList.Circuit_Parts_Resistor.set(ItemList.Circuit_Parts_Wiring_Basic.get(1,new Object[0])); + ItemList.Circuit_Parts_Wiring_Advanced.set(addItem(tLastID = 717, "Transistor", "Basic Electronic Component", new Object[0])); ItemList.Circuit_Parts_Transistor.set(ItemList.Circuit_Parts_Wiring_Advanced.get(1,new Object[0])); + ItemList.Circuit_Parts_Wiring_Elite.set(addItem(tLastID = 718, "Capacitor", "Electronic Component", new Object[0])); ItemList.Circuit_Parts_Capacitor.set(ItemList.Circuit_Parts_Wiring_Elite.get(1,new Object[0])); + ItemList.Empty_Board_Basic.set(addItem(tLastID = 719, "Phenolic Circuit Board", "A good Board", new Object[0])); ItemList.Circuit_Board_Phenolic.set(ItemList.Empty_Board_Basic.get(1,new Object[0])); + ItemList.Empty_Board_Elite.set(addItem(tLastID = 720, "Fiberglass Circuit Board", "An advanced Board", new Object[0])); ItemList.Circuit_Board_Fiberglass.set(ItemList.Empty_Board_Elite.get(1,new Object[0])); + + ItemList.Component_Sawblade_Diamond.set(addItem(tLastID = 721, "Diamond Sawblade", "", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.PERDITIO, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 4L), OreDictNames.craftingDiamondBlade})); + ItemList.Component_Grinder_Diamond.set(addItem(tLastID = 722, "Diamond Grinding Head", "", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.PERDITIO, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 6L), OreDictNames.craftingGrinder})); + ItemList.Component_Grinder_Tungsten.set(addItem(tLastID = 723, "Tungsten Grinding Head", "", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.PERDITIO, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 6L), OreDictNames.craftingGrinder})); + + //GT_ModHandler.addCraftingRecipe(ItemList.Field_Generator_LV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"WCW", "CGC", "WCW", 'G', OrePrefixes.gem.get(Materials.EnderPearl), 'C', OrePrefixes.circuit.get(Materials.Basic), 'W', OrePrefixes.wireGt01.get(Materials.Osmium)}); + //GT_ModHandler.addCraftingRecipe(ItemList.Field_Generator_MV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"WCW", "CGC", "WCW", 'G', OrePrefixes.gem.get(Materials.EnderEye), 'C', OrePrefixes.circuit.get(Materials.Good), 'W', OrePrefixes.wireGt02.get(Materials.Osmium)}); + //GT_ModHandler.addCraftingRecipe(ItemList.Field_Generator_HV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"WCW", "CGC", "WCW", 'G', ItemList.QuantumEye.get(1L, new Object[0]), 'C', OrePrefixes.circuit.get(Materials.Advanced), 'W', OrePrefixes.wireGt04.get(Materials.Osmium)}); + //GT_ModHandler.addCraftingRecipe(ItemList.Field_Generator_EV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"WCW", "CGC", "WCW", 'G', OrePrefixes.gem.get(Materials.NetherStar), 'C', OrePrefixes.circuit.get(Materials.Data), 'W', OrePrefixes.wireGt08.get(Materials.Osmium)}); + //GT_ModHandler.addCraftingRecipe(ItemList.Field_Generator_IV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"WCW", "CGC", "WCW", 'G', ItemList.QuantumStar.get(1L, new Object[0]), 'C', OrePrefixes.circuit.get(Materials.Elite), 'W', OrePrefixes.wireGt16.get(Materials.Osmium)}); + + GT_ModHandler.addCraftingRecipe(ItemList.Component_Sawblade_Diamond.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{" D ", "DGD", " D ", 'D', OrePrefixes.dustSmall.get(Materials.Diamond), 'G', OrePrefixes.gearGt.get(Materials.CobaltBrass)}); + GT_ModHandler.addCraftingRecipe(ItemList.Component_Grinder_Diamond.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"DSD", "SIS", "DSD", 'I', OreDictNames.craftingIndustrialDiamond, 'D', OrePrefixes.dust.get(Materials.Diamond), 'S', OrePrefixes.plate.get(Materials.Steel)}); + GT_ModHandler.addCraftingRecipe(ItemList.Component_Grinder_Tungsten.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"TST", "SIS", "TST", 'I', OreDictNames.craftingIndustrialDiamond, 'T', OrePrefixes.plate.get(Materials.Tungsten), 'S', OrePrefixes.plate.get(Materials.Steel)}); + + ItemList.Upgrade_Muffler.set(addItem(tLastID = 727, "Muffler Upgrade", "Makes Machines silent", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 2L)})); + ItemList.Upgrade_Lock.set(addItem(tLastID = 728, "Lock Upgrade", "Protects your Machines", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 4L)})); + + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Aluminium, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Plastic, 2L), ItemList.Upgrade_Muffler.get(1L, new Object[0]), 1600, 2); + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Aluminium, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 2L), ItemList.Upgrade_Muffler.get(1L, new Object[0]), 1600, 2); + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iron, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Plastic, 2L), ItemList.Upgrade_Muffler.get(1L, new Object[0]), 1600, 2); + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iron, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 2L), ItemList.Upgrade_Muffler.get(1L, new Object[0]), 1600, 2); + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.WroughtIron, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Plastic, 2L), ItemList.Upgrade_Muffler.get(1L, new Object[0]), 1600, 2); + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.WroughtIron, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 2L), ItemList.Upgrade_Muffler.get(1L, new Object[0]), 1600, 2); + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Aluminium, 1L), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iridium, 1L), ItemList.Upgrade_Lock.get(1L, new Object[0]), 6400, 16); + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iron, 1L), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iridium, 1L), ItemList.Upgrade_Lock.get(1L, new Object[0]), 6400, 16); + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.WroughtIron, 1L), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iridium, 1L), ItemList.Upgrade_Lock.get(1L, new Object[0]), 6400, 16); + + ItemList.Component_Filter.set(addItem(tLastID = 729, "Item Filter", "", new Object[]{new ItemData(Materials.Zinc, OrePrefixes.foil.mMaterialAmount * 16L, new MaterialStack[0]), new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 1L), OreDictNames.craftingFilter})); + + GT_Values.RA.addAssemblerRecipe(GT_ModHandler.getIC2Item("carbonMesh", 4L), GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Zinc, 16L), Materials.Plastic.getMolten(144), ItemList.Component_Filter.get(1L, new Object[0]), 1600, 30); + + ItemList.Cover_Controller.set(addItem(tLastID = 730, "Machine Controller Cover", "Turns Machines ON/OFF", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L)})); + ItemList.Cover_ActivityDetector.set(addItem(tLastID = 731, "Activity Detector Cover", "Gives out Activity as Redstone", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L)})); + ItemList.Cover_FluidDetector.set(addItem(tLastID = 732, "Fluid Detector Cover", "Gives out Fluid Amount as Redstone", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L)})); + ItemList.Cover_ItemDetector.set(addItem(tLastID = 733, "Item Detector Cover", "Gives out Item Amount as Redstone", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.TERRA, 1L)})); + ItemList.Cover_EnergyDetector.set(addItem(tLastID = 734, "Energy Detector Cover", "Gives out Energy Amount as Redstone", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 1L)})); + ItemList.Cover_PlayerDetector.set(addItem(tLastID = 735, "Player Detector Cover", "Gives out close Players as Redstone", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L)})); + GT_Values.RA.addAssemblerRecipe(ItemList.Sensor_EV.get(1L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Titanium, 1L), ItemList.Cover_PlayerDetector.get(1L, new Object[0]), 3200, 128); + + GregTech_API.registerCover(ItemList.Cover_Controller.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[2][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_CONTROLLER)}), new GT_Cover_ControlsWork()); + GregTech_API.registerCover(ItemList.Cover_ActivityDetector.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[2][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ACTIVITYDETECTOR)}), new GT_Cover_DoesWork()); + GregTech_API.registerCover(ItemList.Cover_FluidDetector.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[2][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FLUIDDETECTOR)}), new GT_Cover_LiquidMeter()); + GregTech_API.registerCover(ItemList.Cover_ItemDetector.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[2][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ITEMDETECTOR)}), new GT_Cover_ItemMeter()); + GregTech_API.registerCover(ItemList.Cover_EnergyDetector.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[2][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ENERGYDETECTOR)}), new GT_Cover_EUMeter()); + GregTech_API.registerCover(ItemList.Cover_PlayerDetector.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[2][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ACTIVITYDETECTOR)}), new GT_Cover_PlayerDetector()); + + ItemList.Cover_Screen.set(addItem(tLastID = 740, "Computer Monitor Cover", "Displays Data and GUI", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.LUX, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L)})); + ItemList.Cover_Crafting.set(addItem(tLastID = 744, "Crafting Table Cover", "Better than a wooden Workbench", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 4L)})); + ItemList.Cover_Drain.set(addItem(tLastID = 745, "Drain Module Cover", "Absorbs Fluids and collects Rain", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 2L)})); + + ItemList.Cover_Shutter.set(addItem(tLastID = 749, "Shutter Module Cover", "Blocks Inventory/Tank Side. Use together with Machine Controller.", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 1L)})); + + GT_ModHandler.addCraftingRecipe(ItemList.Cover_Screen.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"AGA", "RPB", "ALA", 'A', OrePrefixes.plate.get(Materials.Aluminium), 'L', OrePrefixes.dust.get(Materials.Glowstone), 'R', Dyes.dyeRed, 'G', Dyes.dyeLime, 'B', Dyes.dyeBlue, 'P', OrePrefixes.plate.get(Materials.Glass)}); + + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Aluminium, 1L), ItemList.Cover_Drain.get(1L, new Object[0]), ItemList.Cover_Shutter.get(1L, new Object[0]), 200, 64); + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iron, 1L), ItemList.Cover_Drain.get(1L, new Object[0]), ItemList.Cover_Shutter.get(1L, new Object[0]), 800, 16); + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.WroughtIron, 1L), ItemList.Cover_Drain.get(1L, new Object[0]), ItemList.Cover_Shutter.get(1L, new Object[0]), 400, 30); + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Aluminium, 2L), new ItemStack(Blocks.iron_bars, 2), ItemList.Cover_Drain.get(1L, new Object[0]), 200, 64); + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iron, 2L), new ItemStack(Blocks.iron_bars, 2), ItemList.Cover_Drain.get(1L, new Object[0]), 800, 16); + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.WroughtIron, 2L), new ItemStack(Blocks.iron_bars, 2), ItemList.Cover_Drain.get(1L, new Object[0]), 400, 30); + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Aluminium, 1L), new ItemStack(Blocks.crafting_table, 1), ItemList.Cover_Crafting.get(1L, new Object[0]), 200, 64); + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iron, 1L), new ItemStack(Blocks.crafting_table, 1), ItemList.Cover_Crafting.get(1L, new Object[0]), 800, 16); + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.WroughtIron, 1L), new ItemStack(Blocks.crafting_table, 1), ItemList.Cover_Crafting.get(1L, new Object[0]), 800, 16); + GT_Values.RA.addAssemblerRecipe(ItemList.Cover_Shutter.get(1L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Advanced, 2), ItemList.FluidFilter.get(1L, new Object[0]), 800, 4); + + GregTech_API.registerCover(ItemList.Cover_Screen.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[2][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SCREEN)}), new GT_Cover_Screen()); + GregTech_API.registerCover(ItemList.Cover_Crafting.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[1][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_CRAFTING)}), new GT_Cover_Crafting()); + GregTech_API.registerCover(ItemList.Cover_Drain.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[0][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_DRAIN)}), new GT_Cover_Drain()); + GregTech_API.registerCover(ItemList.Cover_Shutter.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[1][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SHUTTER)}), new GT_Cover_Shutter()); + + ItemList.Cover_SolarPanel.set(addItem(tLastID = 750, "Solar Panel", "May the Sun be with you (Needs cleaning with right click)", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.TENEBRAE, 1L)})); + ItemList.Cover_SolarPanel_8V.set(addItem(tLastID = 751, "Solar Panel (8V)", "8 Volt Solar Panel (Needs cleaning with right click)", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.TENEBRAE, 2L)})); + ItemList.Cover_SolarPanel_LV.set(addItem(tLastID = 752, "Solar Panel (LV)", "Low Voltage Solar Panel (Needs cleaning with right click)", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.TENEBRAE, 4L)})); + ItemList.Cover_SolarPanel_MV.set(addItem(tLastID = 753, "Solar Panel (MV)", "Medium Voltage Solar Panel (Needs cleaning with right click)", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.TENEBRAE, 8L)})); + ItemList.Cover_SolarPanel_HV.set(addItem(tLastID = 754, "Solar Panel (HV)", "High Voltage Solar Panel (Needs cleaning with right click)", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.TENEBRAE, 16L)})); + ItemList.Cover_SolarPanel_EV.set(addItem(tLastID = 755, "Solar Panel (EV)", "Extreme Solar Panel (Needs cleaning with right click)", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 32L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 32L), new TC_Aspects.TC_AspectStack(TC_Aspects.TENEBRAE, 32L)})); + ItemList.Cover_SolarPanel_IV.set(addItem(tLastID = 756, "Solar Panel (IV)", "Insane Solar Panel (Needs cleaning with right click)", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 64L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 64L), new TC_Aspects.TC_AspectStack(TC_Aspects.TENEBRAE, 64L)})); + ItemList.Cover_SolarPanel_LuV.set(addItem(tLastID = 757, "Solar Panel (LuV)", "Ludicrous Solar Panel (Needs cleaning with right click)", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 64L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 64L), new TC_Aspects.TC_AspectStack(TC_Aspects.TENEBRAE, 64L)})); + ItemList.Cover_SolarPanel_ZPM.set(addItem(tLastID = 758, "Solar Panel (ZPM)", "ZPM Voltage Solar Panel (Needs cleaning with right click)", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 64L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 64L), new TC_Aspects.TC_AspectStack(TC_Aspects.TENEBRAE, 64L)})); + ItemList.Cover_SolarPanel_UV.set(addItem(tLastID = 759, "Solar Panel (UV)", "Ultimate Solar Panel (Needs cleaning with right click)", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 64L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 64L), new TC_Aspects.TC_AspectStack(TC_Aspects.TENEBRAE, 64L)})); + + GregTech_API.registerCover(ItemList.Cover_SolarPanel.get(1L, new Object[0]), new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL), new GT_Cover_SolarPanel(1)); + GregTech_API.registerCover(ItemList.Cover_SolarPanel_8V.get(1L, new Object[0]), new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_8V), new GT_Cover_SolarPanel(8)); + GregTech_API.registerCover(ItemList.Cover_SolarPanel_LV.get(1L, new Object[0]), new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_LV), new GT_Cover_SolarPanel(32)); + GregTech_API.registerCover(ItemList.Cover_SolarPanel_MV.get(1L, new Object[0]), new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_MV), new GT_Cover_SolarPanel(128)); + GregTech_API.registerCover(ItemList.Cover_SolarPanel_HV.get(1L, new Object[0]), new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_HV), new GT_Cover_SolarPanel(512)); + GregTech_API.registerCover(ItemList.Cover_SolarPanel_EV.get(1L, new Object[0]), new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_EV), new GT_Cover_SolarPanel(2048)); + GregTech_API.registerCover(ItemList.Cover_SolarPanel_IV.get(1L, new Object[0]), new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_IV), new GT_Cover_SolarPanel(8192)); + GregTech_API.registerCover(ItemList.Cover_SolarPanel_LuV.get(1L, new Object[0]), new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_LuV), new GT_Cover_SolarPanel(32768)); + GregTech_API.registerCover(ItemList.Cover_SolarPanel_ZPM.get(1L, new Object[0]), new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_ZPM), new GT_Cover_SolarPanel(131072)); + GregTech_API.registerCover(ItemList.Cover_SolarPanel_UV.get(1L, new Object[0]), new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_UV), new GT_Cover_SolarPanel(524288)); + + ItemList.Tool_Sonictron.set(addItem(tLastID = 760, "Sonictron", "Bring your Music with you", new Object[]{Behaviour_Sonictron.INSTANCE, new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 4L)})); + ItemList.Tool_Cheat.set(addItem(tLastID = 761, "Debug Scanner", "Also an Infinite Energy Source", new Object[]{Behaviour_Scanner.INSTANCE, new TC_Aspects.TC_AspectStack(TC_Aspects.NEBRISUM, 64L)})); + setElectricStats(32000 + tLastID, -2000000000L, 1000000000L, -1L, -3L, false); + ItemList.Tool_Scanner.set(addItem(tLastID = 762, "Portable Scanner", "Tricorder", new Object[]{Behaviour_Scanner.INSTANCE, new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 6L), new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 6L)})); + setElectricStats(32000 + tLastID, 400000L, GT_Values.V[2], 2L, -1L, false); + GT_ModHandler.addCraftingRecipe(ItemList.Tool_Scanner.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"EPR", "CSC", "PBP", 'C', OrePrefixes.circuit.get(Materials.Advanced), 'P', OrePrefixes.plate.get(Materials.Aluminium), 'E', ItemList.Emitter_MV, 'R', ItemList.Sensor_MV, 'S', ItemList.Cover_Screen, 'B', ItemList.Battery_RE_MV_Lithium}); + ItemList.NC_SensorKit.set(addItem(tLastID = 763, "GregTech Sensor Kit", "", new Object[]{new Behaviour_SensorKit()})); + ItemList.Duct_Tape.set(addItem(tLastID = 764, "BrainTech Aerospace Advanced Reinforced Duct Tape FAL-84", "If you can't fix it with this, use more of it!", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), OreDictNames.craftingDuctTape})); + ItemList.McGuffium_239.set(addItem(tLastID = 765, "Mc Guffium 239", "42% better than Phlebotnium", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ALIENIS, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.PERMUTATIO, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.SPIRITUS, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.AURAM, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.VITIUM, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.RADIO, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.MAGNETO, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.NEBRISUM, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.STRONTIO, 8L)})); + + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Good, 4L), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.StainlessSteel, 2L), ItemList.Schematic.get(1L, new Object[0]), 3200, 4); + GT_Values.RA.addAssemblerRecipe(ItemList.Sensor_LV.get(1L, new Object[0]), ItemList.Emitter_LV.get(1L, new Object[0]), ItemList.NC_SensorKit.get(1L, new Object[0]), 1600, 2); + + ItemList.Cover_RedstoneTransmitterExternal.set(addItem(tLastID = 741, "Redstone Transmitter (Out)", "Transfers Redstonesignals wireless", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L)})); + ItemList.Cover_RedstoneTransmitterInternal.set(addItem(tLastID = 742, "Redstone Transmitter (In)", "Transfers Redstonesignals wireless", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L)})); + ItemList.Cover_RedstoneReceiverExternal.set(addItem(tLastID = 746, "Redstone Receiver (Out)", "Transfers Redstonesignals wireless", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L)})); + ItemList.Cover_RedstoneReceiverInternal.set(addItem(tLastID = 747, "Redstone Receiver (In)", "Transfers Redstonesignals wireless", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L)})); + + GregTech_API.registerCover(ItemList.Cover_RedstoneTransmitterExternal.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[2][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ACTIVITYDETECTOR)}), new GT_Cover_RedstoneTransmitterExternal()); + GregTech_API.registerCover(ItemList.Cover_RedstoneTransmitterInternal.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[2][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ACTIVITYDETECTOR)}), new GT_Cover_RedstoneTransmitterInternal()); + GregTech_API.registerCover(ItemList.Cover_RedstoneReceiverExternal.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[2][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FLUIDDETECTOR)}), new GT_Cover_RedstoneReceiverExternal()); + GregTech_API.registerCover(ItemList.Cover_RedstoneReceiverInternal.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[2][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FLUIDDETECTOR)}), new GT_Cover_RedstoneReceiverInternal()); + + GT_Values.RA.addAssemblerRecipe(ItemList.Emitter_EV.get(1L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.StainlessSteel, 1L), ItemList.Cover_RedstoneTransmitterExternal.get(1L, new Object[0]), 3200, 128); + GT_Values.RA.addAssemblerRecipe(ItemList.Sensor_EV.get(1L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.StainlessSteel, 1L), ItemList.Cover_RedstoneReceiverExternal.get(1L, new Object[0]), 3200, 128); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Cover_RedstoneTransmitterInternal.get(1L, new Object[0]), new Object[]{ItemList.Cover_RedstoneTransmitterExternal.get(1L, new Object[0])}); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Cover_RedstoneReceiverInternal.get(1L, new Object[0]), new Object[]{ItemList.Cover_RedstoneReceiverExternal.get(1L, new Object[0])}); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Cover_RedstoneTransmitterExternal.get(1L, new Object[0]), new Object[]{ItemList.Cover_RedstoneTransmitterInternal.get(1L, new Object[0])}); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Cover_RedstoneReceiverExternal.get(1L, new Object[0]), new Object[]{ItemList.Cover_RedstoneReceiverInternal.get(1L, new Object[0])}); + + ItemList.Cover_NeedsMaintainance.set(addItem(tLastID = 748, "Needs Maintainance Cover", "Attach to Multiblock Controller. Emits Redstone Signal if needs Maintainance", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L)})); + GregTech_API.registerCover(ItemList.Cover_NeedsMaintainance.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[2][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ACTIVITYDETECTOR)}), new GT_Cover_NeedMaintainance()); + GT_Values.RA.addAssemblerRecipe(ItemList.Emitter_MV.get(1L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Aluminium, 1L), ItemList.Cover_NeedsMaintainance.get(1L, new Object[0]), 600, 24); + + GT_Values.RA.addAssemblerRecipe(ItemList.Electric_Pump_LV.get(1L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Basic, 2), ItemList.FluidRegulator_LV.get(1L, new Object[0]), 800, 4); + GT_Values.RA.addAssemblerRecipe(ItemList.Electric_Pump_MV.get(1L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Good, 2), ItemList.FluidRegulator_MV.get(1L, new Object[0]), 800, 8); + GT_Values.RA.addAssemblerRecipe(ItemList.Electric_Pump_HV.get(1L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Advanced, 2), ItemList.FluidRegulator_HV.get(1L, new Object[0]), 800, 16); + GT_Values.RA.addAssemblerRecipe(ItemList.Electric_Pump_EV.get(1L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Elite, 2), ItemList.FluidRegulator_EV.get(1L, new Object[0]), 800, 32); + GT_Values.RA.addAssemblerRecipe(ItemList.Electric_Pump_IV.get(1L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Master, 2), ItemList.FluidRegulator_IV.get(1L, new Object[0]), 800, 64); + + } + + public boolean onEntityItemUpdate(EntityItem aItemEntity) { + int aDamage = aItemEntity.getEntityItem().getItemDamage(); + if ((aDamage < 32000) && (aDamage >= 0) && (!aItemEntity.worldObj.isRemote)) { + Materials aMaterial = GregTech_API.sGeneratedMaterials[(aDamage % 1000)]; + if ((aMaterial != null) && (aMaterial != Materials.Empty) && (aMaterial != Materials._NULL)) { + int tX = MathHelper.floor_double(aItemEntity.posX); + int tY = MathHelper.floor_double(aItemEntity.posY); + int tZ = MathHelper.floor_double(aItemEntity.posZ); + OrePrefixes aPrefix = this.mGeneratedPrefixList[(aDamage / 1000)]; + if ((aPrefix == OrePrefixes.dustImpure) || (aPrefix == OrePrefixes.dustPure)) { + Block tBlock = aItemEntity.worldObj.getBlock(tX, tY, tZ); + byte tMetaData = (byte) aItemEntity.worldObj.getBlockMetadata(tX, tY, tZ); + if ((tBlock == Blocks.cauldron) && (tMetaData > 0)) { + aItemEntity.setEntityItemStack(GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, aItemEntity.getEntityItem().stackSize)); + aItemEntity.worldObj.setBlockMetadataWithNotify(tX, tY, tZ, tMetaData - 1, 3); + return true; + } + }else if (aPrefix == OrePrefixes.crushed) { + Block tBlock = aItemEntity.worldObj.getBlock(tX, tY, tZ); + byte tMetaData = (byte) aItemEntity.worldObj.getBlockMetadata(tX, tY, tZ); + if ((tBlock == Blocks.cauldron) && (tMetaData > 0)) { + aItemEntity.setEntityItemStack(GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aMaterial, aItemEntity.getEntityItem().stackSize)); + aItemEntity.worldObj.setBlockMetadataWithNotify(tX, tY, tZ, tMetaData - 1, 3); + return true; + } + }else if(aPrefix == OrePrefixes.dust && aMaterial == Materials.Wheat){ + Block tBlock = aItemEntity.worldObj.getBlock(tX, tY, tZ); + byte tMetaData = (byte) aItemEntity.worldObj.getBlockMetadata(tX, tY, tZ); + if ((tBlock == Blocks.cauldron) && (tMetaData > 0)) { + aItemEntity.setEntityItemStack(ItemList.Food_Dough.get(aItemEntity.getEntityItem().stackSize, new Object[]{})); + aItemEntity.worldObj.setBlockMetadataWithNotify(tX, tY, tZ, tMetaData - 1, 3); + return true; + } + } + } + } + return false; + } + + protected void addAdditionalToolTips(List aList, ItemStack aStack, EntityPlayer aPlayer) { + super.addAdditionalToolTips(aList, aStack, aPlayer); + int aDamage = aStack.getItemDamage(); + if ((aDamage < 32000) && (aDamage >= 0)) { + Materials aMaterial = GregTech_API.sGeneratedMaterials[(aDamage % 1000)]; + if ((aMaterial != null) && (aMaterial != Materials.Empty) && (aMaterial != Materials._NULL)) { + OrePrefixes aPrefix = this.mGeneratedPrefixList[(aDamage / 1000)]; + if ((aPrefix == OrePrefixes.dustImpure) || (aPrefix == OrePrefixes.dustPure)) { + aList.add(this.mToolTipPurify); + } + } + } + } + + public boolean isPlasmaCellUsed(OrePrefixes aPrefix, Materials aMaterial) { + Collection<GT_Recipe> fusionRecipes = GT_Recipe.GT_Recipe_Map.sFusionRecipes.mRecipeList; + if(aPrefix == OrePrefixes.cellPlasma && aMaterial.getPlasma(1L) != null) { //Materials has a plasma fluid + for(GT_Recipe recipe : fusionRecipes) { //Loop through fusion recipes + if(recipe.getFluidOutput(0) != null) { //Make sure fluid output can't be null (not sure if possible) + if (recipe.getFluidOutput(0).isFluidEqual(aMaterial.getPlasma(1L))) + return true; //Fusion recipe output matches current plasma cell fluid + } + } + } + return false; + } + + public boolean doesShowInCreative(OrePrefixes aPrefix, Materials aMaterial, boolean aDoShowAllItems) { + return (aDoShowAllItems) || (((aPrefix != OrePrefixes.gem) || (!aMaterial.mName.startsWith("Infused"))) && (aPrefix != OrePrefixes.dustTiny) && (aPrefix != OrePrefixes.dustSmall) && (aPrefix != OrePrefixes.dustImpure) && (aPrefix != OrePrefixes.dustPure) && (aPrefix != OrePrefixes.crushed) && (aPrefix != OrePrefixes.crushedPurified) && (aPrefix != OrePrefixes.crushedCentrifuged) && (aPrefix != OrePrefixes.ingotHot) && !(aPrefix == OrePrefixes.cellPlasma && !isPlasmaCellUsed(aPrefix, aMaterial))); + } + + public ItemStack getContainerItem(ItemStack aStack) { + int aDamage = aStack.getItemDamage(); + if ((aDamage >= 32430) && (aDamage <= 32461)) { + return ItemList.Spray_Empty.get(1L, new Object[0]); + } + if ((aDamage == 32479) || (aDamage == 32476)) { + return new ItemStack(this, 1, aDamage - 2); + } + if (aDamage == 32401) { + return new ItemStack(this, 1, aDamage - 1); + } + return super.getContainerItem(aStack); + } + + public boolean doesMaterialAllowGeneration(OrePrefixes aPrefix, Materials aMaterial) { + return (super.doesMaterialAllowGeneration(aPrefix, aMaterial)); + } +} diff --git a/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_02.java b/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_02.java index 8b0f8d9af1..aa13396d54 100644 --- a/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_02.java +++ b/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_02.java @@ -217,6 +217,30 @@ public class GT_MetaGenerated_Item_02 extends GT_MetaGenerated_Item_X32 { GT_ModHandler.addCraftingRecipe(ItemList.Plank_Jungle.get(2L, new Object[0]), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"s ", " P", 'P', new ItemStack(Blocks.wooden_slab, 1, 3)});
GT_ModHandler.addCraftingRecipe(ItemList.Plank_Acacia.get(2L, new Object[0]), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"s ", " P", 'P', new ItemStack(Blocks.wooden_slab, 1, 4)});
GT_ModHandler.addCraftingRecipe(ItemList.Plank_DarkOak.get(2L, new Object[0]), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"s ", " P", 'P', new ItemStack(Blocks.wooden_slab, 1, 5)});
+ GT_ModHandler.addCraftingRecipe(ItemList.Plank_Larch.get(2L, new Object[0]), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"s ", " P", 'P', GT_ModHandler.getModItem(aTextForestry, "slabs1", 1L, 0)});
+ GT_ModHandler.addCraftingRecipe(ItemList.Plank_Teak.get(2L, new Object[0]), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"s ", " P", 'P', GT_ModHandler.getModItem(aTextForestry, "slabs1", 1L, 1)});
+ GT_ModHandler.addCraftingRecipe(ItemList.Plank_Acacia_Green.get(2L, new Object[0]), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"s ", " P", 'P', GT_ModHandler.getModItem(aTextForestry, "slabs1", 1L, 2)});
+ GT_ModHandler.addCraftingRecipe(ItemList.Plank_Lime.get(2L, new Object[0]), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"s ", " P", 'P', GT_ModHandler.getModItem(aTextForestry, "slabs1", 1L, 3)});
+ GT_ModHandler.addCraftingRecipe(ItemList.Plank_Chestnut.get(2L, new Object[0]), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"s ", " P", 'P', GT_ModHandler.getModItem(aTextForestry, "slabs1", 1L, 4)});
+ GT_ModHandler.addCraftingRecipe(ItemList.Plank_Wenge.get(2L, new Object[0]), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"s ", " P", 'P', GT_ModHandler.getModItem(aTextForestry, "slabs1", 1L, 5)});
+ GT_ModHandler.addCraftingRecipe(ItemList.Plank_Baobab.get(2L, new Object[0]), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"s ", " P", 'P', GT_ModHandler.getModItem(aTextForestry, "slabs1", 1L, 6)});
+ GT_ModHandler.addCraftingRecipe(ItemList.Plank_Sequoia.get(2L, new Object[0]), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"s ", " P", 'P', GT_ModHandler.getModItem(aTextForestry, "slabs1", 1L, 7)});
+ GT_ModHandler.addCraftingRecipe(ItemList.Plank_Kapok.get(2L, new Object[0]), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"s ", " P", 'P', GT_ModHandler.getModItem(aTextForestry, "slabs2", 1L, 0)});
+ GT_ModHandler.addCraftingRecipe(ItemList.Plank_Ebony.get(2L, new Object[0]), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"s ", " P", 'P', GT_ModHandler.getModItem(aTextForestry, "slabs2", 1L, 1)});
+ GT_ModHandler.addCraftingRecipe(ItemList.Plank_Mahagony.get(2L, new Object[0]), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"s ", " P", 'P', GT_ModHandler.getModItem(aTextForestry, "slabs2", 1L, 2)});
+ GT_ModHandler.addCraftingRecipe(ItemList.Plank_Balsa.get(2L, new Object[0]), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"s ", " P", 'P', GT_ModHandler.getModItem(aTextForestry, "slabs2", 1L, 3)});
+ GT_ModHandler.addCraftingRecipe(ItemList.Plank_Willow.get(2L, new Object[0]), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"s ", " P", 'P', GT_ModHandler.getModItem(aTextForestry, "slabs2", 1L, 4)});
+ GT_ModHandler.addCraftingRecipe(ItemList.Plank_Walnut.get(2L, new Object[0]), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"s ", " P", 'P', GT_ModHandler.getModItem(aTextForestry, "slabs2", 1L, 5)});
+ GT_ModHandler.addCraftingRecipe(ItemList.Plank_Greenheart.get(2L, new Object[0]), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"s ", " P", 'P', GT_ModHandler.getModItem(aTextForestry, "slabs2", 1L, 6)});
+ GT_ModHandler.addCraftingRecipe(ItemList.Plank_Cherry.get(2L, new Object[0]), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"s ", " P", 'P', GT_ModHandler.getModItem(aTextForestry, "slabs2", 1L, 7)});
+ GT_ModHandler.addCraftingRecipe(ItemList.Plank_Mahoe.get(2L, new Object[0]), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"s ", " P", 'P', GT_ModHandler.getModItem(aTextForestry, "slabs3", 1L, 0)});
+ GT_ModHandler.addCraftingRecipe(ItemList.Plank_Poplar.get(2L, new Object[0]), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"s ", " P", 'P', GT_ModHandler.getModItem(aTextForestry, "slabs3", 1L, 1)});
+ GT_ModHandler.addCraftingRecipe(ItemList.Plank_Palm.get(2L, new Object[0]), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"s ", " P", 'P', GT_ModHandler.getModItem(aTextForestry, "slabs3", 1L, 2)});
+ GT_ModHandler.addCraftingRecipe(ItemList.Plank_Papaya.get(2L, new Object[0]), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"s ", " P", 'P', GT_ModHandler.getModItem(aTextForestry, "slabs3", 1L, 3)});
+ GT_ModHandler.addCraftingRecipe(ItemList.Plank_Pine.get(2L, new Object[0]), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"s ", " P", 'P', GT_ModHandler.getModItem(aTextForestry, "slabs3", 1L, 4)});
+ GT_ModHandler.addCraftingRecipe(ItemList.Plank_Plum.get(2L, new Object[0]), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"s ", " P", 'P', GT_ModHandler.getModItem(aTextForestry, "slabs3", 1L, 5)});
+ GT_ModHandler.addCraftingRecipe(ItemList.Plank_Maple.get(2L, new Object[0]), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"s ", " P", 'P', GT_ModHandler.getModItem(aTextForestry, "slabs3", 1L, 6)});
+ GT_ModHandler.addCraftingRecipe(ItemList.Plank_Citrus.get(2L, new Object[0]), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"s ", " P", 'P', GT_ModHandler.getModItem(aTextForestry, "slabs3", 1L, 7)});
GregTech_API.registerCover(ItemList.Plank_Oak.get(1L, new Object[0]), new GT_CopiedBlockTexture(Blocks.planks, 0, 0), null);
GregTech_API.registerCover(ItemList.Plank_Spruce.get(1L, new Object[0]), new GT_CopiedBlockTexture(Blocks.planks, 0, 1), null);
diff --git a/src/main/java/gregtech/common/items/GT_MetaGenerated_Tool_01.java b/src/main/java/gregtech/common/items/GT_MetaGenerated_Tool_01.java index ec5c20ff06..fa45a51ebc 100644 --- a/src/main/java/gregtech/common/items/GT_MetaGenerated_Tool_01.java +++ b/src/main/java/gregtech/common/items/GT_MetaGenerated_Tool_01.java @@ -10,7 +10,7 @@ import net.minecraft.init.Blocks; import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
-public class GT_MetaGenerated_Tool_01 extends GT_MetaGenerated_Tool {
+public class GT_MetaGenerated_Tool_01 extends GT_MetaGenerated_Tool {
public static final short SWORD = 0;
public static final short PICKAXE = 2;
public static final short SHOVEL = 4;
@@ -113,36 +113,62 @@ public class GT_MetaGenerated_Tool_01 extends GT_MetaGenerated_Tool { GT_ModHandler.addCraftingRecipe(INSTANCE.getToolWithStats(MORTAR, 1, Materials.DamascusSteel, Materials.Stone, null), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{" I ", "SIS", "SSS", 'I', OrePrefixes.ingot.get(Materials.DamascusSteel), 'S', OrePrefixes.stone});
GT_ModHandler.addCraftingRecipe(INSTANCE.getToolWithStats(MORTAR, 1, Materials.Thaumium, Materials.Stone, null), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{" I ", "SIS", "SSS", 'I', OrePrefixes.ingot.get(Materials.Thaumium), 'S', OrePrefixes.stone});
- GT_ModHandler.addCraftingRecipe(INSTANCE.getToolWithStats(SCOOP, 1, Materials.Wood, Materials.Wood, null), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"SWS", "SPS", " S ", 'P', OrePrefixes.plank.get(Materials.Wood), 'S', OrePrefixes.stick.get(Materials.Wood), 'W', new ItemStack(Blocks.wool, 1, 32767)});
-
- GT_ModHandler.addCraftingRecipe(INSTANCE.getToolWithStats(ROLLING_PIN, 1, Materials.Wood, Materials.Wood, null), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{" S", " I ", "S f", 'I', OrePrefixes.plank.get(Materials.Wood), 'S', OrePrefixes.stick.get(Materials.Wood)});
- GT_ModHandler.addCraftingRecipe(INSTANCE.getToolWithStats(ROLLING_PIN, 1, Materials.Plastic, Materials.Plastic, null), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{" S", " I ", "S f", 'I', OrePrefixes.ingot.get(Materials.Plastic), 'S', OrePrefixes.stick.get(Materials.Plastic)});
- GT_ModHandler.addCraftingRecipe(INSTANCE.getToolWithStats(ROLLING_PIN, 1, Materials.Aluminium, Materials.Aluminium, null), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{" S", " I ", "S f", 'I', OrePrefixes.ingot.get(Materials.Aluminium), 'S', OrePrefixes.stick.get(Materials.Aluminium)});
- GT_ModHandler.addCraftingRecipe(INSTANCE.getToolWithStats(ROLLING_PIN, 1, Materials.StainlessSteel, Materials.StainlessSteel, null), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{" S", " I ", "S f", 'I', OrePrefixes.ingot.get(Materials.StainlessSteel), 'S', OrePrefixes.stick.get(Materials.StainlessSteel)});
+ GT_ModHandler.addCraftingRecipe(INSTANCE.getToolWithStats(46, 1, Materials.Wood, Materials.Wood, null), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{" S", " I ", "S f", 'I', OrePrefixes.plank.get(Materials.Wood), 'S', OrePrefixes.stick.get(Materials.Wood)});
+ GT_ModHandler.addCraftingRecipe(INSTANCE.getToolWithStats(46, 1, Materials.Plastic, Materials.Plastic, null), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{" S", " I ", "S f", 'I', OrePrefixes.ingot.get(Materials.Plastic), 'S', OrePrefixes.stick.get(Materials.Plastic)});
+ GT_ModHandler.addCraftingRecipe(INSTANCE.getToolWithStats(46, 1, Materials.Aluminium, Materials.Aluminium, null), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{" S", " I ", "S f", 'I', OrePrefixes.ingot.get(Materials.Aluminium), 'S', OrePrefixes.stick.get(Materials.Aluminium)});
+ GT_ModHandler.addCraftingRecipe(INSTANCE.getToolWithStats(46, 1, Materials.StainlessSteel, Materials.StainlessSteel, null), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{" S", " I ", "S f", 'I', OrePrefixes.ingot.get(Materials.StainlessSteel), 'S', OrePrefixes.stick.get(Materials.StainlessSteel)});
if (!GregTech_API.sSpecialFile.get(ConfigCategories.general, "DisableFlintTools", false)) {
- GT_ModHandler.addCraftingRecipe(INSTANCE.getToolWithStats(SWORD, 1, Materials.Flint, Materials.Wood, null), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"F", "F", "S", 'S', OrePrefixes.stick.get(Materials.Wood), 'F', new ItemStack(Items.flint, 1)});
- GT_ModHandler.addCraftingRecipe(INSTANCE.getToolWithStats(PICKAXE, 1, Materials.Flint, Materials.Wood, null), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"FFF", " S ", " S ", 'S', OrePrefixes.stick.get(Materials.Wood), 'F', new ItemStack(Items.flint, 1)});
- GT_ModHandler.addCraftingRecipe(INSTANCE.getToolWithStats(SHOVEL, 1, Materials.Flint, Materials.Wood, null), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"F", "S", "S", 'S', OrePrefixes.stick.get(Materials.Wood), 'F', new ItemStack(Items.flint, 1)});
- GT_ModHandler.addCraftingRecipe(INSTANCE.getToolWithStats(AXE, 1, Materials.Flint, Materials.Wood, null), GT_ModHandler.RecipeBits.MIRRORED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"FF", "FS", " S", 'S', OrePrefixes.stick.get(Materials.Wood), 'F', new ItemStack(Items.flint, 1)});
- GT_ModHandler.addCraftingRecipe(INSTANCE.getToolWithStats(HOE, 1, Materials.Flint, Materials.Wood, null), GT_ModHandler.RecipeBits.MIRRORED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"FF", " S", " S", 'S', OrePrefixes.stick.get(Materials.Wood), 'F', new ItemStack(Items.flint, 1)});
- GT_ModHandler.addCraftingRecipe(INSTANCE.getToolWithStats(KNIFE, 1, Materials.Flint, Materials.Wood, null), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"F", "S", 'S', OrePrefixes.stick.get(Materials.Wood), 'F', new ItemStack(Items.flint, 1)});
- }
- if (GregTech_API.sRecipeFile.get(ConfigCategories.Tools.mortar, "Coal", true)) {
- GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Coal, 1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ToolDictNames.craftingToolMortar, new ItemStack(Items.coal, 1)});
- }
- if (GregTech_API.sRecipeFile.get(ConfigCategories.Tools.mortar, "Clay", true)) {
- GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Clay, 1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ToolDictNames.craftingToolMortar, new ItemStack(Blocks.clay, 1)});
- }
- if (GregTech_API.sRecipeFile.get(ConfigCategories.Tools.mortar, "Wheat", true)) {
- GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wheat, 1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ToolDictNames.craftingToolMortar, new ItemStack(Items.wheat, 1)});
- }
- if (GregTech_API.sRecipeFile.get(ConfigCategories.Tools.scoop, "Flint", true)) {
- GT_ModHandler.addShapelessCraftingRecipe(new ItemStack(Items.flint, 1), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ToolDictNames.craftingToolScoop, new ItemStack(Blocks.gravel, 1)});
- }
- if (GregTech_API.sRecipeFile.get(ConfigCategories.Tools.mortar, "Blaze", true)) {
- GT_ModHandler.addShapelessCraftingRecipe(new ItemStack(Items.blaze_powder, 2), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ToolDictNames.craftingToolMortar, new ItemStack(Items.blaze_rod, 1)});
+ GT_ModHandler.addCraftingRecipe(INSTANCE.getToolWithStats(0, 1, Materials.Flint, Materials.Wood, null), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"F", "F", "S", 'S', OrePrefixes.stick.get(Materials.Wood), 'F', new ItemStack(Items.flint, 1)});
+ GT_ModHandler.addCraftingRecipe(INSTANCE.getToolWithStats(2, 1, Materials.Flint, Materials.Wood, null), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"FFF", " S ", " S ", 'S', OrePrefixes.stick.get(Materials.Wood), 'F', new ItemStack(Items.flint, 1)});
+ GT_ModHandler.addCraftingRecipe(INSTANCE.getToolWithStats(4, 1, Materials.Flint, Materials.Wood, null), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"F", "S", "S", 'S', OrePrefixes.stick.get(Materials.Wood), 'F', new ItemStack(Items.flint, 1)});
+ GT_ModHandler.addCraftingRecipe(INSTANCE.getToolWithStats(6, 1, Materials.Flint, Materials.Wood, null), GT_ModHandler.RecipeBits.MIRRORED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"FF", "FS", " S", 'S', OrePrefixes.stick.get(Materials.Wood), 'F', new ItemStack(Items.flint, 1)});
+ GT_ModHandler.addCraftingRecipe(INSTANCE.getToolWithStats(8, 1, Materials.Flint, Materials.Wood, null), GT_ModHandler.RecipeBits.MIRRORED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"FF", " S", " S", 'S', OrePrefixes.stick.get(Materials.Wood), 'F', new ItemStack(Items.flint, 1)});
+ GT_ModHandler.addCraftingRecipe(INSTANCE.getToolWithStats(34, 1, Materials.Flint, Materials.Wood, null), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"F", "S", 'S', OrePrefixes.stick.get(Materials.Wood), 'F', new ItemStack(Items.flint, 1)});
+
+ GT_ModHandler.addCraftingRecipe(INSTANCE.getToolWithStats(MORTAR, 1, Materials.Flint, Materials.Stone, null), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{" I ", "SIS", "SSS", Character.valueOf('I'), new ItemStack(Items.flint, 1), Character.valueOf('S'), OrePrefixes.stone});
+ GT_ModHandler.addCraftingRecipe(INSTANCE.getToolWithStats(MORTAR, 1, Materials.Bronze, Materials.Stone, null), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{" I ", "SIS", "SSS", Character.valueOf('I'), OrePrefixes.ingot.get(Materials.Bronze), Character.valueOf('S'), OrePrefixes.stone});
+ GT_ModHandler.addCraftingRecipe(INSTANCE.getToolWithStats(MORTAR, 1, Materials.Iron, Materials.Stone, null), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{" I ", "SIS", "SSS", Character.valueOf('I'), OrePrefixes.ingot.get(Materials.Iron), Character.valueOf('S'), OrePrefixes.stone});
+ GT_ModHandler.addCraftingRecipe(INSTANCE.getToolWithStats(MORTAR, 1, Materials.Steel, Materials.Stone, null), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{" I ", "SIS", "SSS", Character.valueOf('I'), OrePrefixes.ingot.get(Materials.Steel), Character.valueOf('S'), OrePrefixes.stone});
+ GT_ModHandler.addCraftingRecipe(INSTANCE.getToolWithStats(MORTAR, 1, Materials.WroughtIron, Materials.Stone, null), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{" I ", "SIS", "SSS", Character.valueOf('I'), OrePrefixes.ingot.get(Materials.WroughtIron), Character.valueOf('S'), OrePrefixes.stone});
+ GT_ModHandler.addCraftingRecipe(INSTANCE.getToolWithStats(MORTAR, 1, Materials.RedSteel, Materials.Stone, null), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{" I ", "SIS", "SSS", Character.valueOf('I'), OrePrefixes.ingot.get(Materials.RedSteel), Character.valueOf('S'), OrePrefixes.stone});
+ GT_ModHandler.addCraftingRecipe(INSTANCE.getToolWithStats(MORTAR, 1, Materials.BlueSteel, Materials.Stone, null), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{" I ", "SIS", "SSS", Character.valueOf('I'), OrePrefixes.ingot.get(Materials.BlueSteel), Character.valueOf('S'), OrePrefixes.stone});
+ GT_ModHandler.addCraftingRecipe(INSTANCE.getToolWithStats(MORTAR, 1, Materials.BlackSteel, Materials.Stone, null), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{" I ", "SIS", "SSS", Character.valueOf('I'), OrePrefixes.ingot.get(Materials.BlackSteel), Character.valueOf('S'), OrePrefixes.stone});
+ GT_ModHandler.addCraftingRecipe(INSTANCE.getToolWithStats(MORTAR, 1, Materials.DamascusSteel, Materials.Stone, null), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{" I ", "SIS", "SSS", Character.valueOf('I'), OrePrefixes.ingot.get(Materials.DamascusSteel), Character.valueOf('S'), OrePrefixes.stone});
+ GT_ModHandler.addCraftingRecipe(INSTANCE.getToolWithStats(MORTAR, 1, Materials.Thaumium, Materials.Stone, null), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{" I ", "SIS", "SSS", Character.valueOf('I'), OrePrefixes.ingot.get(Materials.Thaumium), Character.valueOf('S'), OrePrefixes.stone});
+
+ GT_ModHandler.addCraftingRecipe(INSTANCE.getToolWithStats(ROLLING_PIN, 1, Materials.Wood, Materials.Wood, null), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{" S", " I ", "S f", Character.valueOf('I'), OrePrefixes.plank.get(Materials.Wood), Character.valueOf('S'), OrePrefixes.stick.get(Materials.Wood)});
+ GT_ModHandler.addCraftingRecipe(INSTANCE.getToolWithStats(ROLLING_PIN, 1, Materials.Plastic, Materials.Plastic, null), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{" S", " I ", "S f", Character.valueOf('I'), OrePrefixes.ingot.get(Materials.Plastic), Character.valueOf('S'), OrePrefixes.stick.get(Materials.Plastic)});
+ GT_ModHandler.addCraftingRecipe(INSTANCE.getToolWithStats(ROLLING_PIN, 1, Materials.Aluminium, Materials.Aluminium, null), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{" S", " I ", "S f", Character.valueOf('I'), OrePrefixes.ingot.get(Materials.Aluminium), Character.valueOf('S'), OrePrefixes.stick.get(Materials.Aluminium)});
+ GT_ModHandler.addCraftingRecipe(INSTANCE.getToolWithStats(ROLLING_PIN, 1, Materials.StainlessSteel, Materials.StainlessSteel, null), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{" S", " I ", "S f", Character.valueOf('I'), OrePrefixes.ingot.get(Materials.StainlessSteel), Character.valueOf('S'), OrePrefixes.stick.get(Materials.StainlessSteel)});
+ GT_ModHandler.addCraftingRecipe(INSTANCE.getToolWithStats(ROLLING_PIN, 1, Materials.IronWood, Materials.IronWood, null), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{" S", " I ", "S f", Character.valueOf('I'), OrePrefixes.ingot.get(Materials.IronWood), Character.valueOf('S'), OrePrefixes.stick.get(Materials.IronWood)});
+
+
+ if (!GregTech_API.sSpecialFile.get(ConfigCategories.general, "DisableFlintTools", false)) {
+ GT_ModHandler.addCraftingRecipe(INSTANCE.getToolWithStats(SWORD, 1, Materials.Flint, Materials.Wood, null), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"F", "F", "S", Character.valueOf('S'), OrePrefixes.stick.get(Materials.Wood), Character.valueOf('F'), new ItemStack(Items.flint, 1)});
+ GT_ModHandler.addCraftingRecipe(INSTANCE.getToolWithStats(PICKAXE, 1, Materials.Flint, Materials.Wood, null), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"FFF", " S ", " S ", Character.valueOf('S'), OrePrefixes.stick.get(Materials.Wood), Character.valueOf('F'), new ItemStack(Items.flint, 1)});
+ GT_ModHandler.addCraftingRecipe(INSTANCE.getToolWithStats(SHOVEL, 1, Materials.Flint, Materials.Wood, null), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"F", "S", "S", Character.valueOf('S'), OrePrefixes.stick.get(Materials.Wood), Character.valueOf('F'), new ItemStack(Items.flint, 1)});
+ GT_ModHandler.addCraftingRecipe(INSTANCE.getToolWithStats(AXE, 1, Materials.Flint, Materials.Wood, null), GT_ModHandler.RecipeBits.MIRRORED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"FF", "FS", " S", Character.valueOf('S'), OrePrefixes.stick.get(Materials.Wood), Character.valueOf('F'), new ItemStack(Items.flint, 1)});
+ GT_ModHandler.addCraftingRecipe(INSTANCE.getToolWithStats(HOE, 1, Materials.Flint, Materials.Wood, null), GT_ModHandler.RecipeBits.MIRRORED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"FF", " S", " S", Character.valueOf('S'), OrePrefixes.stick.get(Materials.Wood), Character.valueOf('F'), new ItemStack(Items.flint, 1)});
+ GT_ModHandler.addCraftingRecipe(INSTANCE.getToolWithStats(KNIFE, 1, Materials.Flint, Materials.Wood, null), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"F", "S", Character.valueOf('S'), OrePrefixes.stick.get(Materials.Wood), Character.valueOf('F'), new ItemStack(Items.flint, 1)});
+
+ }
+ if (GregTech_API.sRecipeFile.get(ConfigCategories.Tools.mortar, "Coal", true)) {
+ GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Coal, 1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ToolDictNames.craftingToolMortar, new ItemStack(Items.coal, 1)});
+ }
+ if (GregTech_API.sRecipeFile.get(ConfigCategories.Tools.mortar, "Clay", true)) {
+ GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Clay, 1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ToolDictNames.craftingToolMortar, new ItemStack(Blocks.clay, 1)});
+ }
+ if (GregTech_API.sRecipeFile.get(ConfigCategories.Tools.mortar, "Wheat", true)) {
+ GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wheat, 1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ToolDictNames.craftingToolMortar, new ItemStack(Items.wheat, 1)});
+ }
+ if (GregTech_API.sRecipeFile.get(ConfigCategories.Tools.mortar, "Flint", true)) {
+ GT_ModHandler.addShapelessCraftingRecipe(new ItemStack(Items.flint, 1), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ToolDictNames.craftingToolMortar, new ItemStack(Blocks.gravel, 1)});
+ }
+ if (GregTech_API.sRecipeFile.get(ConfigCategories.Tools.mortar, "Blaze", true)) {
+ GT_ModHandler.addShapelessCraftingRecipe(new ItemStack(Items.blaze_powder, 2), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ToolDictNames.craftingToolMortar, new ItemStack(Items.blaze_rod, 1)});
+ }
}
}
}
diff --git a/src/main/java/gregtech/common/items/GT_SensorCard_Item.java b/src/main/java/gregtech/common/items/GT_SensorCard_Item.java index b6202be15f..01a6b105f8 100644 --- a/src/main/java/gregtech/common/items/GT_SensorCard_Item.java +++ b/src/main/java/gregtech/common/items/GT_SensorCard_Item.java @@ -1,93 +1,93 @@ -package gregtech.common.items;
-
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import gregtech.api.interfaces.tileentity.IGregTechDeviceInformation;
-import gregtech.api.items.GT_Generic_Item;
-import gregtech.api.util.GT_LanguageManager;
-import net.minecraft.creativetab.CreativeTabs;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.util.ChunkCoordinates;
-import net.minecraft.world.World;
-import shedar.mods.ic2.nuclearcontrol.api.*;
-
-import java.util.ArrayList;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.UUID;
-
-public class GT_SensorCard_Item
- extends GT_Generic_Item
- implements IRemoteSensor, IPanelDataSource {
- private static final UUID CARD_TYPE = new UUID(0L, 41L);
-
- public GT_SensorCard_Item(String aUnlocalized, String aEnglish) {
- super(aUnlocalized, aEnglish, "Insert into Display Panel");
- setMaxStackSize(1);
- }
-
- public void addAdditionalToolTips(List aList, ItemStack aStack, EntityPlayer aPlayer) {
- super.addAdditionalToolTips(aList, aStack, aPlayer);
- if (aStack != null) {
- NBTTagCompound tNBT = aStack.getTagCompound();
- if (tNBT == null) {
- aList.add("Missing Coodinates!");
- } else {
- aList.add("Device at:");
- aList.add(String.format("x: %d, y: %d, z: %d", new Object[]{Integer.valueOf(tNBT.getInteger("x")), Integer.valueOf(tNBT.getInteger("y")), Integer.valueOf(tNBT.getInteger("z"))}));
- }
- }
- }
-
- @Override
- public CardState update(TileEntity aPanel, ICardWrapper aCard, int aMaxRange) {
- return update(aPanel.getWorldObj(), aCard, aMaxRange);
- }
-
- @Override
- public CardState update(World world, ICardWrapper aCard, int aMaxRange) {
- ChunkCoordinates target = aCard.getTarget();
-
- TileEntity tTileEntity = world.getTileEntity(target.posX, target.posY, target.posZ);
- if (((tTileEntity instanceof IGregTechDeviceInformation)) && (((IGregTechDeviceInformation) tTileEntity).isGivingInformation())) {
- String[] tInfoData = ((IGregTechDeviceInformation) tTileEntity).getInfoData();
- for (int i = 0; i < tInfoData.length; i++) {
- aCard.setString("mString" + i, tInfoData[i]);
- }
- return CardState.OK;
- }
- return CardState.NO_TARGET;
- }
-
- public List<PanelString> getStringData(int aSettings, ICardWrapper aCard, boolean aLabels) {
- List<PanelString> rList = new LinkedList();
- for (int i = 0; i < 8; i++) {
- if ((aSettings & 1 << i) != 0) {
- PanelString line = new PanelString();
- line.textLeft = GT_LanguageManager.getTranslation(aCard.getString("mString" + i), "\\\\");
- rList.add(line);
- }
- }
- return rList;
- }
-
- public List<PanelSetting> getSettingsList() {
- List<PanelSetting> rList = new ArrayList(30);
- for (int i = 0; i < 8; i++) {
- rList.add(new PanelSetting(String.valueOf((i + 1)), 1 << i, getCardType()));
- }
- return rList;
- }
-
- public UUID getCardType() {
- return CARD_TYPE;
- }
-
- @SideOnly(Side.CLIENT)
- public void getSubItems(Item var1, CreativeTabs aTab, List aList) {
- }
-}
+package gregtech.common.items; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gregtech.api.interfaces.tileentity.IGregTechDeviceInformation; +import gregtech.api.items.GT_Generic_Item; +import gregtech.api.util.GT_LanguageManager; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.ChunkCoordinates; +import net.minecraft.world.World; +import shedar.mods.ic2.nuclearcontrol.api.*; + +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.UUID; + +public class GT_SensorCard_Item + extends GT_Generic_Item + implements IRemoteSensor, IPanelDataSource { + private static final UUID CARD_TYPE = new UUID(0L, 41L); + + public GT_SensorCard_Item(String aUnlocalized, String aEnglish) { + super(aUnlocalized, aEnglish, "Insert into Display Panel"); + setMaxStackSize(1); + } + + public void addAdditionalToolTips(List aList, ItemStack aStack, EntityPlayer aPlayer) { + super.addAdditionalToolTips(aList, aStack, aPlayer); + if (aStack != null) { + NBTTagCompound tNBT = aStack.getTagCompound(); + if (tNBT == null) { + aList.add("Missing Coodinates!"); + } else { + aList.add("Device at:"); + aList.add(String.format("x: %d, y: %d, z: %d", new Object[]{Integer.valueOf(tNBT.getInteger("x")), Integer.valueOf(tNBT.getInteger("y")), Integer.valueOf(tNBT.getInteger("z"))})); + } + } + } + + @Override + public CardState update(TileEntity aPanel, ICardWrapper aCard, int aMaxRange) { + return update(aPanel.getWorldObj(), aCard, aMaxRange); + } + + @Override + public CardState update(World world, ICardWrapper aCard, int aMaxRange) { + ChunkCoordinates target = aCard.getTarget(); + + TileEntity tTileEntity = world.getTileEntity(target.posX, target.posY, target.posZ); + if (((tTileEntity instanceof IGregTechDeviceInformation)) && (((IGregTechDeviceInformation) tTileEntity).isGivingInformation())) { + String[] tInfoData = ((IGregTechDeviceInformation) tTileEntity).getInfoData(); + for (int i = 0; i < tInfoData.length; i++) { + aCard.setString("mString" + i, tInfoData[i]); + } + return CardState.OK; + } + return CardState.NO_TARGET; + } + + public List<PanelString> getStringData(int aSettings, ICardWrapper aCard, boolean aLabels) { + List<PanelString> rList = new LinkedList(); + for (int i = 0; i < 8; i++) { + if ((aSettings & 1 << i) != 0) { + PanelString line = new PanelString(); + line.textLeft = GT_LanguageManager.getTranslation(aCard.getString("mString" + i), "\\\\"); + rList.add(line); + } + } + return rList; + } + + public List<PanelSetting> getSettingsList() { + List<PanelSetting> rList = new ArrayList(30); + for (int i = 0; i < 8; i++) { + rList.add(new PanelSetting(String.valueOf((i + 1)), 1 << i, getCardType())); + } + return rList; + } + + public UUID getCardType() { + return CARD_TYPE; + } + + @SideOnly(Side.CLIENT) + public void getSubItems(Item var1, CreativeTabs aTab, List aList) { + } +} diff --git a/src/main/java/gregtech/common/items/ItemComb.java b/src/main/java/gregtech/common/items/ItemComb.java index ee314c8e31..de8eb8b0ff 100644 --- a/src/main/java/gregtech/common/items/ItemComb.java +++ b/src/main/java/gregtech/common/items/ItemComb.java @@ -299,4 +299,4 @@ public class ItemComb extends Item { } } -}
\ No newline at end of file +} diff --git a/src/main/java/gregtech/common/items/armor/ArmorData.java b/src/main/java/gregtech/common/items/armor/ArmorData.java index 00ec76aeea..9a2b161a0f 100644 --- a/src/main/java/gregtech/common/items/armor/ArmorData.java +++ b/src/main/java/gregtech/common/items/armor/ArmorData.java @@ -1,426 +1,344 @@ -package gregtech.common.items.armor; +package gregtech.common.items.armor.gui; + +import gregtech.api.enums.GT_Values; +import gregtech.api.util.GT_LanguageManager; +import gregtech.api.util.GT_Utility; +import gregtech.common.GT_Network; +import gregtech.common.items.armor.ArmorData; +import gregtech.common.items.armor.components.StatType; import java.text.DecimalFormat; import java.text.DecimalFormatSymbols; import java.text.NumberFormat; import java.util.ArrayList; -import java.util.HashMap; import java.util.List; import java.util.Locale; -import java.util.Map; -import java.util.Random; -import gregtech.api.damagesources.GT_DamageSources; -import gregtech.api.util.GT_LanguageManager; -import gregtech.api.util.GT_Utility; -import gregtech.common.items.armor.components.ArmorComponent; -import gregtech.common.items.armor.components.StatType; -import gregtech.common.items.armor.gui.ContainerBasicArmor; -import gregtech.common.items.armor.gui.ContainerModularArmor; -import gregtech.common.items.armor.gui.InventoryArmor; +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.EntityPlayer; +import net.minecraft.init.Items; +import net.minecraft.inventory.Container; +import net.minecraft.inventory.Slot; +import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.nbt.NBTTagList; -import net.minecraft.util.DamageSource; +import net.minecraft.util.ResourceLocation; import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.IFluidContainerItem; -public class ArmorData { - - public int type; // 0 = helmet; 1 = chestplate; 2 = leggings; 3 = boots; - public int armorTier; // 0 = Basic Modular Armor; 1 = Modular Exoskeleton; 2= Modular Nanosuit; 3 = Heavy Power Armor - public List info; // needs Localization - public boolean isTopItem; - public int tooltipUpdate; - public boolean openGui; - - public ArmorData helmet; - public ArmorData chestplate; - public ArmorData leggings; - public ArmorData boots; - - public Map<StatType,Float> mStat = new HashMap<StatType,Float>(); - public Map<StatType,Boolean> mBStat = new HashMap<StatType,Boolean>(); - static ArrayList<StatType> updateArmorStatTypeList; -// public boolean fullArmor; -// public boolean fullRadiationDef; -// public boolean fullElectricDef; -// -// public float fallDef; -// public float physicalDef; -// public float projectileDef; -// public float fireDef; -// public float magicDef; -// public float explosionDef; -// public float radiationDef; -// public float electricDef; -// public float witherDef; -// -// public float thorns; -// public float thornsSingle; -// public int magnet; -// public int magnetSingle; -// -// public int partsCharge; - public int maxCharge; - public int charge; -// public boolean thaumicGoggles; -// public boolean nightVision; -// public boolean potionInjector; -// public boolean autoFeeder; +@SideOnly(Side.CLIENT) +public class GuiElectricArmor1 extends GuiContainer { + ContainerModularArmor cont; + EntityPlayer player; + private int tab; + + public GuiElectricArmor1(ContainerModularArmor containerModularArmor, EntityPlayer aPlayer) { + super(containerModularArmor); + player = aPlayer; + cont = containerModularArmor; + tab = 0; + } + @Override + public void onGuiClosed() + { + cont.saveInventory(player); + super.onGuiClosed(); + }; + public String seperateNumber(long number){ + DecimalFormat formatter = (DecimalFormat) NumberFormat.getInstance(Locale.US); + DecimalFormatSymbols symbols = formatter.getDecimalFormatSymbols(); + symbols.setGroupingSeparator(' '); + return formatter.format(number); + } - public FluidStack fluid; -// public int tankCap; -// -// public int weight; - public float maxWeight; -// public int processingPower; -// public int processingPowerUsed; -// public int partProcessing; -// public int partProcessingUsed; -// -// public int motorPower; -// public int motorEUusage; -// public int pistonJumpboost; -// public int pistonEUusage; -// public int electrolyzerProd; -// public int electrolyzerEUusage; -// public int fieldGenCap; -// public int fieldGenEUusage; -// -// public int jetpackMaxWeight; -// public int antiGravMaxWeight; + @Override + protected void drawGuiContainerForegroundLayer(int x, int y) { + int xStart = (width - xSize) / 2; + int yStart = (height - ySize) / 2; + int x2 = x - xStart; + int y2 = y - yStart; + drawTooltip(x2, y2 + 5); + } - public ArmorData(EntityPlayer player, ItemStack stack, int type, int tier) { - if(updateArmorStatTypeList == null) - { - updateArmorStatTypeList = new ArrayList<StatType>(); - updateArmorStatTypeList.add(StatType.MAGNET); - updateArmorStatTypeList.add(StatType.THORNS); - updateArmorStatTypeList.add(StatType.PROCESSINGPOWER); - updateArmorStatTypeList.add(StatType.PROCESSINGPOWERUSED); - } - this.type = type; - this.armorTier = tier; - ContainerModularArmor tmp = new ContainerBasicArmor((EntityPlayer) player, new InventoryArmor(ModularArmor_Item.class, stack)); - calculateArmor(tmp.mInvArmor.parts); - switch (tier) { + @Override + protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) { + GL11.glColor4f(1F, 1F, 1F, 1F); + this.mc.getTextureManager().bindTexture(new ResourceLocation("gregtech", "textures/gui/armorgui3x4.png")); + int xStart = (width - xSize) / 2; + int yStart = (height - ySize) / 2; + //Draw background + drawTexturedModalRect(xStart, yStart, 0, 0, xSize, ySize); + //Draw active arrows + drawTexturedModalRect(xStart + 10, yStart + 70, 219, 11, 14, 5); + //Draw active armor symbol + switch (cont.mInvArmor.data.type) { case 0: - maxCharge = 0; + drawTexturedModalRect(xStart + 73, yStart + 68, 177, 10, 10, 9); break; case 1: - maxCharge = 250000; + drawTexturedModalRect(xStart + 83, yStart + 68, 187, 10, 10, 9); break; case 2: - maxCharge = 1000000; - } - readNBT(stack.getTagCompound()); - } - - private void readNBT(NBTTagCompound nbt) { - if (nbt == null) { - return; + drawTexturedModalRect(xStart + 93, yStart + 68, 197, 10, 10, 9); + break; + case 3: + drawTexturedModalRect(xStart + 103, yStart + 68, 207, 10, 10, 9); + break; + default: + break; } - if (nbt.hasKey("Charge")) { - this.charge = nbt.getInteger("Charge"); + //Draw active tab + switch(tab){ + case 0: + break; + case 1: + drawTexturedModalRect(xStart + 7, yStart + 14, 2, 167, 104, 54); + break; + case 2: + drawTexturedModalRect(xStart + 7, yStart + 14, 107, 167, 104, 54); + break; + default: + break; } - } - - public void writeToNBT(NBTTagCompound nbt) { - if (nbt == null) { - return; + float tankCap = cont.mInvArmor.data.mStat.containsKey(StatType.TANKCAP) ? cont.mInvArmor.data.mStat.get(StatType.TANKCAP) :0.0f; + if(tankCap>0){ + drawTexturedModalRect(xStart + 94, yStart + 32, 231, 69, 16, 34); } - nbt.setInteger("Charge", this.charge); - } - - public ArmorData calculateArmor(ItemStack[] parts) { - mStat.clear(); - mBStat.clear(); - for(ItemStack tPart : parts){ - if(tPart!=null && ArmorComponent.mStacks.containsKey(tPart.getUnlocalizedName())) - ArmorComponent.mStacks.get(tPart.getUnlocalizedName()).calculateArmor(this); + float weight = cont.mInvArmor.data.mStat.containsKey(StatType.WEIGHT) ? cont.mInvArmor.data.mStat.get(StatType.WEIGHT) : 0.0f; + int bar = (int) Math.floor(18 * (weight)/(float)1000); + drawTexturedModalRect(xStart + 15, yStart + 7, 217, 26, bar, 5); + drawTexturedModalRect(xStart + bar + 15, yStart + 7, 197+bar, 26, 18-bar, 5); + + if(tab==0){ + //processing power bar + bar = Math.min((int) Math.floor(52 * ((float)cont.mInvArmor.data.mStat.get(StatType.PROCESSINGPOWERUSED)/(float)cont.mInvArmor.data.mStat.get(StatType.PROCESSINGPOWER))),52); + drawTexturedModalRect(xStart + 17, yStart + 17, 177, 146, bar, 5); + drawTexturedModalRect(xStart + bar + 17, yStart + 17, 177+bar, 139, 52-bar, 5); + }else if(tab==1){ + + }else{ + //Def tab values + if(cont.mInvArmor.data.mStat.get(StatType.PHYSICALDEFENCE)>0)drawTexturedModalRect(xStart + 30, yStart + 20, 186, 33, 7, 7); + drawBars(31, 20, cont.mInvArmor.data.mStat.get(StatType.PHYSICALDEFENCE)); + if(cont.mInvArmor.data.mStat.get(StatType.PROJECTILEDEFENCE)>0)drawTexturedModalRect(xStart + 30, yStart + 29, 186, 42, 7, 7); + drawBars(31, 29, cont.mInvArmor.data.mStat.get(StatType.PROJECTILEDEFENCE)); + if(cont.mInvArmor.data.mStat.get(StatType.FIREDEFENCE)>0)drawTexturedModalRect(xStart + 30, yStart + 38, 186, 51, 7, 7); + drawBars(31, 38, cont.mInvArmor.data.mStat.get(StatType.FIREDEFENCE)); + if(cont.mInvArmor.data.mStat.get(StatType.MAGICDEFENCE)>0)drawTexturedModalRect(xStart + 30, yStart + 47, 186, 60, 7, 7); + drawBars(31, 47, cont.mInvArmor.data.mStat.get(StatType.MAGICDEFENCE)); + if(cont.mInvArmor.data.mStat.get(StatType.EXPLOSIONDEFENCE)>0)drawTexturedModalRect(xStart + 30, yStart + 56, 186, 69, 7, 7); + drawBars(31, 56, cont.mInvArmor.data.mStat.get(StatType.EXPLOSIONDEFENCE)); + if(cont.mInvArmor.data.mStat.get(StatType.RADIATIONDEFENCE)>0)drawTexturedModalRect(xStart + 61, yStart + 20, 186, 87, 7, 7); + drawBars(62, 20, cont.mInvArmor.data.mStat.get(StatType.RADIATIONDEFENCE)); + if(cont.mInvArmor.data.mStat.get(StatType.ELECTRICALDEFENCE)>0)drawTexturedModalRect(xStart + 61, yStart + 29, 186, 96, 7, 7); + drawBars(62, 29, cont.mInvArmor.data.mStat.get(StatType.ELECTRICALDEFENCE)); + if(cont.mInvArmor.data.mStat.get(StatType.WITHERDEFENCE)>0)drawTexturedModalRect(xStart + 61, yStart + 38, 186, 105, 7, 7); + drawBars(62, 38, cont.mInvArmor.data.mStat.get(StatType.WITHERDEFENCE)); + if(cont.mInvArmor.data.mStat.get(StatType.FALLDEFENCE)>0)drawTexturedModalRect(xStart + 61, yStart + 47, 186, 114, 7, 7); + if(cont.mInvArmor.data.mStat.get(StatType.THORNS)>0)drawTexturedModalRect(xStart + 61, yStart + 56, 186, 123, 7, 7); + if(cont.mInvArmor.data.mStat.get(StatType.MAGNET)>0)drawTexturedModalRect(xStart + 70, yStart + 56, 186, 78, 7, 7); } - for(StatType tType : StatType.values())if(!mStat.containsKey(tType))mStat.put(tType, .0f); - for(StatType tType : StatType.values())if(!mBStat.containsKey(tType))mBStat.put(tType, false); - updateTooltip(); - return this; + + } - public void updateTooltip() { - List<String> tagList = new ArrayList<String>(); - String tmp2 = ""; - if (maxWeight > 4000) { - tmp2 = " " + GT_LanguageManager.getTranslation("Too Heavy"); - } - if (maxCharge != 0) { - DecimalFormat formatter = (DecimalFormat) NumberFormat.getInstance(Locale.US); - DecimalFormatSymbols symbols = formatter.getDecimalFormatSymbols(); - symbols.setGroupingSeparator(' '); - if (type == 0) { - if (mBStat.get(StatType.THAUMICGOGGLES)) { - tagList.add(GT_LanguageManager.getTranslation("Thaumic Goggles installed")); - } - if (mBStat.get(StatType.NIGHTVISION)) { - tagList.add(GT_LanguageManager.getTranslation("Nightvision installed")); - } - } - tagList.add("EU: " + formatter.format(charge + mStat.get(StatType.PARTSCHARGE))); - if (type == 2) { - tagList.add(GT_LanguageManager.getTranslation("Jumpboost") + ": " + mStat.get(StatType.PISTONJUMPBOOST) / 3 + "m"); - } - if (type == 2 && mStat.get(StatType.PISTONJUMPBOOST) > 0) { - tagList.add(GT_LanguageManager.getTranslation("Uphill step assist active")); - } - if (type == 2 && mStat.get(StatType.MOTPRPOWER) > 0) { - tagList.add(GT_LanguageManager.getTranslation("Speedup") + ": " + mStat.get(StatType.MOTPRPOWER)); - tagList.add(GT_LanguageManager.getTranslation("Motor energy usage") + ": " + mStat.get(StatType.MOTOREUUSAGE) + " EU"); - if (maxWeight > 4000) { - tagList.add(GT_LanguageManager.getTranslation("Too Heavy!!!")); - } + protected void mouseClicked(int mouseX, int mouseY, int mouseBtn) { + int xStart = mouseX-((width - xSize) / 2); + int yStart = mouseY-((height - ySize) / 2); + if(yStart>68&&yStart<77){ + if(xStart>18&&xStart<26){ + tab++; + }else if(xStart>8&&xStart<17){ + tab--; } - tagList.add(GT_LanguageManager.getTranslation("Processing power ") + " " + mStat.get(StatType.PARTPROCESSING) + " " + GT_LanguageManager.getTranslation("")); - tagList.add(GT_LanguageManager.getTranslation("Processing power used") + ": " + mStat.get(StatType.PARTPROCESSINGUSED) + " " + GT_LanguageManager.getTranslation("")); - if (type == 0 && mStat.get(StatType.ELECTROLYZERPROD) > 0) { - tagList.add(GT_LanguageManager.getTranslation("Electrolyzer produces ") + " " + mStat.get(StatType.ELECTROLYZERPROD) / 2 + GT_LanguageManager.getTranslation("per second")); + if(tab>2){tab=0;} + if(tab<0){tab=2;} + if(xStart>72&&xStart<112){ + if(xStart>72&&xStart<81&&cont.mInvArmor.data.helmet!=null){cont.mInvArmor.data.helmet.openGui=true;} + if(xStart>82&&xStart<91&&cont.mInvArmor.data.chestplate!=null){cont.mInvArmor.data.chestplate.openGui=true;} + if(xStart>92&&xStart<101&&cont.mInvArmor.data.leggings!=null){cont.mInvArmor.data.leggings.openGui=true;} + if(xStart>102&&xStart<112&&cont.mInvArmor.data.boots!=null){cont.mInvArmor.data.boots.openGui=true;} + +// if(xStart>72&&xStart<81&&cont.mInvArmor.data.helmet!=null){cont.mInvArmor.data.helmet.openGui=true;player.closeScreen();} +// if(xStart>82&&xStart<91&&cont.mInvArmor.data.chestplate!=null){cont.mInvArmor.data.chestplate.openGui=true;player.closeScreen();} +// if(xStart>92&&xStart<101&&cont.mInvArmor.data.leggings!=null){cont.mInvArmor.data.leggings.openGui=true;player.closeScreen();} +// if(xStart>102&&xStart<112&&cont.mInvArmor.data.boots!=null){cont.mInvArmor.data.boots.openGui=true;player.closeScreen();} } - if (mStat.get(StatType.TANKCAP) > 0) { - if (fluid != null) { - tagList.add(GT_LanguageManager.getTranslation("Tank Capacity") + ": " + fluid.getLocalizedName() + " " + fluid.amount + "L (" + mStat.get(StatType.TANKCAP) + ")"); - } else { - tagList.add(GT_LanguageManager.getTranslation("tankcap") + ": " + mStat.get(StatType.TANKCAP)); - } - } - } - tagList.add(GT_LanguageManager.getTranslation("Weight") + ": " + mStat.get(StatType.WEIGHT) + tmp2); - tagList.add(GT_LanguageManager.getTranslation("Physical Defence") + ": " + (Math.round(mStat.get(StatType.PHYSICALDEFENCE) * 1000) / 10.0) + "%"); - tagList.add(GT_LanguageManager.getTranslation("Projectile Defence") + ": " + (Math.round(mStat.get(StatType.PROJECTILEDEFENCE) * 1000) / 10.0) + "%"); - tagList.add(GT_LanguageManager.getTranslation("Fire Defence") + ": " + (Math.round(mStat.get(StatType.FIREDEFENCE) * 1000) / 10.0) + "%"); - tagList.add(GT_LanguageManager.getTranslation("Magic Defence") + ": " + (Math.round(mStat.get(StatType.MAGICDEFENCE) * 1000) / 10.0) + "%"); - tagList.add(GT_LanguageManager.getTranslation("Explosive Defence") + ": " + (Math.round(mStat.get(StatType.EXPLOSIONDEFENCE) * 1000) / 10.0) + "%"); - if (mStat.get(StatType.FALLDEFENCE) > 0 && type == 3) { - tagList.add(GT_LanguageManager.getTranslation("Absorbs") + " " + mStat.get(StatType.FALLDEFENCE) + GT_LanguageManager.getTranslation(" m of Fall Defence")); } - if (mStat.get(StatType.THORNS) > 0) { - tagList.add(GT_LanguageManager.getTranslation("Thorns") + ": " + mStat.get(StatType.THORNS)); - } - if (mStat.get(StatType.MAGNET) > 0) { - tagList.add(GT_LanguageManager.getTranslation("Magnet") + ": " + mStat.get(StatType.MAGNET) + "m"); +// Slot slot = getSlotAtPosition(mouseX, mouseY); +// if (slot != null && slot instanceof SlotFluid && player != null && cont.mInvArmor.data.helmet!=null) { +// ItemStack tmp = player.inventory.getItemStack(); +// //GT_Network gtn = new GT_Network(); +// if (tmp == null) { +// //GT_Values.NW.sendToServer(new FluidSync(player.getCommandSenderName(), 0, "null")); +// } +// //ArmorData armorData = new ArmorData(player,); +// if (tmp != null && tmp.getItem() instanceof IFluidContainerItem) { +// FluidStack tmp2 = ((IFluidContainerItem) tmp.getItem()).getFluid(tmp); +// if (!slot.getHasStack() && tmp2 != null) { +// slot.putStack(GT_Utility.getFluidDisplayStack(tmp2, true)); +// +// if(cont.mInvArmor.data.helmet.fluid == null) +// { +// cont.mInvArmor.data.helmet.fluid = new FluidStack(tmp2.getFluid(), tmp2.amount); +// } +// else +// { +// cont.mInvArmor.data.helmet.fluid.amount += tmp2.amount; +// } +// +// //GT_Values.NW.sendToServer(new FluidSync(player.getCommandSenderName(), tmp2.amount, GT_Utility.getFluidName(tmp2, false))); +// ItemStack tmp4 = GT_Utility.getContainerForFilledItem(tmp, true); +// tmp4.stackSize = 1; +// if (tmp.stackSize > 1) { +// player.inventory.addItemStackToInventory(tmp4); +// tmp.stackSize--; +// player.inventory.setItemStack(tmp); +// //GT_Values.NW.sendToServer(new FluidSync2(player.getCommandSenderName())); +// } else { +// player.inventory.setItemStack(null); +// player.inventory.addItemStackToInventory(tmp4); +// //GT_Values.NW.sendToServer(new FluidSync2(player.getCommandSenderName())); +// } +// +// } else if (slot.getHasStack() && tmp2 != null) { +// Item fluidSlot = slot.getStack().getItem(); +// if (fluidSlot.getDamage(slot.getStack()) == tmp2.getFluidID()) { +// NBTTagCompound nbt = slot.getStack().getTagCompound(); +// if (nbt != null) { +// tmp2.amount += nbt.getLong("mFluidDisplayAmount"); +// ItemStack tmp3 = player.inventory.getItemStack(); +// if (tmp3.stackSize <= 1) { +// tmp3 = null; +// } else { +// tmp3.stackSize--; +// } +// player.inventory.setItemStack(tmp3); +// //GT_Values.NW.sendToServer(new FluidSync2(player.getCommandSenderName())); +// slot.putStack(GT_Utility.getFluidDisplayStack(tmp2, true)); +// if(cont.mInvArmor.data.helmet.fluid == null) +// { +// cont.mInvArmor.data.helmet.fluid = new FluidStack(tmp2.getFluid(), tmp2.amount); +// } +// else +// { +// cont.mInvArmor.data.helmet.fluid.amount += tmp2.amount; +// } +// //GT_Values.NW.sendToServer(new FluidSync(player.getCommandSenderName(), tmp2.amount, GT_Utility.getFluidName(tmp2, false))); +// } +// } +// } +// } +// } + super.mouseClicked(mouseX, mouseY, mouseBtn); + } + + protected void drawTooltip(int x, int y) { + List<String> list = new ArrayList<String>(); + //General tooltips + if(x>=7&&y>=11&&x<=33&&y<=17){ + list.add(GT_LanguageManager.getTranslation("Weight") + ": " + cont.mInvArmor.data.mStat.get(StatType.WEIGHT)); + list.add("Total Weight: "+cont.mInvArmor.data.maxWeight); + if (cont.mInvArmor.data.mStat.get(StatType.WEIGHT) > 1000) + list.add("Too Heavy!"); } - if (mBStat.get(StatType.FULLRADIATIONARMOR)) { - tagList.add(GT_LanguageManager.getTranslation("Is Full Radiation Defence")); - } else { - if (mStat.get(StatType.RADIATIONDEFENCE) > 0.01d) { - tagList.add(GT_LanguageManager.getTranslation("Radiation Defence") + ": " + (Math.round(mStat.get(StatType.RADIATIONDEFENCE) * 1000) / 10.0) + "%"); - } + if(x>=56&&y>=11&&x<=112&&y<=17){ + list.add("Stored Energy: "+seperateNumber(cont.mInvArmor.data.charge)+" EU"); } - info = tagList; - } - - public void armorPartsEquipped(EntityPlayer aPlayer) { - helmet = null; - chestplate = null; - leggings = null; - boots = null; - for (int i = 1; i < 5; i++) { - ItemStack stack = aPlayer.getEquipmentInSlot(i); - if (stack != null && stack.getItem() instanceof ModularArmor_Item) { - ModularArmor_Item tmp = (ModularArmor_Item) stack.getItem(); - ContainerModularArmor tmp2 = new ContainerBasicArmor(aPlayer, new InventoryArmor(ModularArmor_Item.class, stack)); - if ((this.type + i) == 4) { - fluid = ArmorCalculation.getFluid(tmp2.mInvArmor.parts, Math.round(mStat.get(StatType.TANKCAP))); - } - if (maxCharge > 0 && charge < maxCharge) { - int loaded = ArmorCalculation.deChargeBatterys(tmp2.mInvArmor.parts, maxCharge - charge); - charge = charge + loaded; - change(mStat, StatType.PARTSCHARGE, -loaded); - - } - switch (tmp.armorType) { - case 0: - helmet = tmp.data; - break; - case 1: - chestplate = tmp.data; - break; - case 2: - leggings = tmp.data; - break; - case 3: - boots = tmp.data; - break; - default: - break; - } - writeToNBT(stack.getTagCompound()); + if(y>74&&y<83){ + if(x>8&&x<17){ + list.add("Previous Page"); + }else if(x>18&&x<27){ + list.add("Next Page"); + }else if(x>72&&x<80){ + list.add("Helmet"); + }else if(x>81&&x<90){ + list.add("Chestplate"); + }else if(x>91&&x<100){ + list.add("Leggings"); + }else if(x>101&&x<110){ + list.add("Boots"); } } - if (helmet != null && chestplate != null && leggings != null && boots != null) { - set(mBStat, StatType.FULLARMOR, true); - boolean helmHasFullRadiationDefence=false; - boolean chestplateHasFullRadiationDefence=false; - boolean leggingsHasFullRadiationDefence=false; - boolean bootsHasFullRadiationDefence=false; - - boolean helmHasFullElectricalDefenceDefence=false; - boolean chestplateHasFullElectricalDefenceDefence=false; - boolean leggingsHasFullElectricalDefenceDefence=false; - boolean bootsHasFullElectricalDefenceDefence=false; - //Check each armor pieces for valid mStat value and verify that the Hash contains the StatType key - if(helmet.mStat!= null) - { - if(helmet.mStat.containsKey(StatType.RADIATIONDEFENCE)) - { - helmHasFullRadiationDefence = helmet.mStat.get(StatType.RADIATIONDEFENCE)> 0.9f; - } - if(helmet.mStat.containsKey(StatType.ELECTRICALDEFENCE)) - { - helmHasFullElectricalDefenceDefence = helmet.mStat.get(StatType.RADIATIONDEFENCE)> 0.9f; - } + if(tab==0){ + if(x>=93&&y>=36&&x<=110&&y<=71){list.add("Tank Capacity: "+cont.mInvArmor.data.mStat.get(StatType.TANKCAP)+"L"); } - if(chestplate.mStat!= null) - { - if(chestplate.mStat.containsKey(StatType.RADIATIONDEFENCE)) - { - chestplateHasFullRadiationDefence = chestplate.mStat.get(StatType.RADIATIONDEFENCE)> 0.9f; - } - if(chestplate.mStat.containsKey(StatType.ELECTRICALDEFENCE)) - { - chestplateHasFullElectricalDefenceDefence = chestplate.mStat.get(StatType.RADIATIONDEFENCE)> 0.9f; - } + if(x>=7&&y>=22&&x<=70&&y<=28){list.add("Processing Power Provided: "+cont.mInvArmor.data.mStat.get(StatType.PROCESSINGPOWER)); + list.add("Processing Power Used: "+cont.mInvArmor.data.mStat.get(StatType.PROCESSINGPOWERUSED)); } - if(leggings.mStat!= null) - { - if(leggings.mStat.containsKey(StatType.RADIATIONDEFENCE)) - { - leggingsHasFullRadiationDefence = leggings.mStat.get(StatType.RADIATIONDEFENCE)> 0.9f; - } - if(leggings.mStat.containsKey(StatType.ELECTRICALDEFENCE)) - { - leggingsHasFullElectricalDefenceDefence = leggings.mStat.get(StatType.RADIATIONDEFENCE)> 0.9f; - } + }else if(tab==1){ + + }else{ + if (x >= 28 && x <= 58) { + if (y >= 25 && y <= 32) { + list.add(GT_LanguageManager.getTranslation("Physical Defence") + ": " + (Math.round(cont.mInvArmor.data.mStat.get(StatType.PHYSICALDEFENCE) * 1000) / 10.0) + "%"); + } else if (y >= 33 && y <= 41) { + list.add(GT_LanguageManager.getTranslation("Projectile Defence") + ": " + (Math.round(cont.mInvArmor.data.mStat.get(StatType.PROJECTILEDEFENCE) * 1000) / 10.0) + "%"); + } else if (y >= 42 && y <= 50) { + list.add(GT_LanguageManager.getTranslation("Fire Defence") + ": " + (Math.round(cont.mInvArmor.data.mStat.get(StatType.FIREDEFENCE) * 1000) / 10.0) + "%"); + } else if (y >= 51 && y <= 59) { + list.add(GT_LanguageManager.getTranslation("Magical Defence") + ": " + (Math.round(cont.mInvArmor.data.mStat.get(StatType.MAGICDEFENCE) * 1000) / 10.0) + "%"); + } else if (y >= 60 && y <= 68) { + list.add(GT_LanguageManager.getTranslation("Explosion Defence") + ": " + (Math.round(cont.mInvArmor.data.mStat.get(StatType.EXPLOSIONDEFENCE) * 1000) / 10.0) + "%"); } - if(boots.mStat!= null) - { - if(boots.mStat.containsKey(StatType.RADIATIONDEFENCE)) - { - bootsHasFullRadiationDefence = boots.mStat.get(StatType.RADIATIONDEFENCE)> 0.9f; - } - if(boots.mStat.containsKey(StatType.ELECTRICALDEFENCE)) - { - bootsHasFullElectricalDefenceDefence = boots.mStat.get(StatType.RADIATIONDEFENCE)> 0.9f; - } + } else if (x >= 59 && x <= 90) { + if (y >= 25 && y <= 32) { + list.add(GT_LanguageManager.getTranslation("Radiation Defence") + ": " + (Math.round(cont.mInvArmor.data.mStat.get(StatType.RADIATIONDEFENCE) * 1000) / 10.0) + "%"); + if(cont.mInvArmor.data.mBStat.get(StatType.FULLRADIATIONARMOR)){ + list.add(GT_LanguageManager.getTranslation("Radiation Immunity"));} + } else if (y >= 33 && y <= 41) { + list.add(GT_LanguageManager.getTranslation("Electrical Defence") + ": " + (Math.round(cont.mInvArmor.data.mStat.get(StatType.ELECTRICALDEFENCE) * 1000) / 10.0) + "%"); + if(cont.mInvArmor.data.mBStat.get(StatType.FULLELECTRICARMOR)){ + list.add(GT_LanguageManager.getTranslation("Electric Immunity"));} + } else if (y >= 42 && y <= 50) { + list.add(GT_LanguageManager.getTranslation("Wither Defence") + ": " + (Math.round(cont.mInvArmor.data.mStat.get(StatType.WITHERDEFENCE) * 1000) / 10.0) + "%"); + } else if (y >= 51 && y <= 59) { + if(cont.mInvArmor.data.type!=3){ + list.add(GT_LanguageManager.getTranslation("Fall Damage absorbtion")); + list.add(GT_LanguageManager.getTranslation("Only for Boots")); + }else{ + list.add(GT_LanguageManager.getTranslation("Absorbs") + " " + (int) Math.round(cont.mInvArmor.data.mStat.get(StatType.FALLDEFENCE)) + GT_LanguageManager.getTranslation("m of Fall Damage"));} + } else if (y >= 60 && y <= 68) { + if(x<69){ + list.add(GT_LanguageManager.getTranslation("Thorns") + ": " + (int) Math.round(cont.mInvArmor.data.mStat.get(StatType.THORNSSINGLE)) + " Dmg"); + list.add(GT_LanguageManager.getTranslation("Total Thorns") + ": " + (int) Math.round(cont.mInvArmor.data.mStat.get(StatType.THORNS)) + " Dmg"); + }else{ + list.add(GT_LanguageManager.getTranslation("Magnet") + ": " + cont.mInvArmor.data.mStat.get(StatType.MAGNETSINGLE) + " m"); + list.add(GT_LanguageManager.getTranslation("Total Magnet") + ": " + cont.mInvArmor.data.mStat.get(StatType.MAGNET) + " m");} } - //Set Status of Full Armor types - set(mBStat, StatType.FULLRADIATIONARMOR, helmHasFullRadiationDefence&&chestplateHasFullRadiationDefence&&leggingsHasFullRadiationDefence &&bootsHasFullRadiationDefence); - set(mBStat, StatType.FULLELECTRICARMOR, helmHasFullElectricalDefenceDefence&&chestplateHasFullElectricalDefenceDefence&&leggingsHasFullElectricalDefenceDefence &&bootsHasFullElectricalDefenceDefence); - } else { - //Reset Full armor type status to false for all types if StatType.FULLARMOR is false - set(mBStat, StatType.FULLARMOR, false); - set(mBStat, StatType.FULLRADIATIONARMOR, false); - set(mBStat, StatType.FULLELECTRICARMOR, false); - } - - - set(mBStat, StatType.MAGNET, 0); - set(mBStat, StatType.THORNS, 0); - set(mBStat, StatType.PROCESSINGPOWER, 0); - set(mBStat, StatType.PROCESSINGPOWERUSED, 0); - - if (helmet != null) { - updateArmorStats(helmet,updateArmorStatTypeList ); - } - if (chestplate != null) { - updateArmorStats(chestplate,updateArmorStatTypeList ); - - } - if (leggings != null) { - updateArmorStats(leggings,updateArmorStatTypeList ); - - } - if (boots != null) { - updateArmorStats(boots,updateArmorStatTypeList ); - - } - isTopItem = false; - if (type == 0) { - isTopItem = true; - } else if (helmet == null && type == 1) { - isTopItem = true; - } else if (helmet == null && chestplate == null && type == 2) { - isTopItem = true; - } else if (helmet == null && chestplate == null && leggings == null && type == 3) { - isTopItem = true; } - if (helmet != null) { - maxWeight = helmet.mStat.get(StatType.WEIGHT); } - if (chestplate != null) { - maxWeight += chestplate.mStat.get(StatType.WEIGHT); - } - if (leggings != null) { - maxWeight += leggings.mStat.get(StatType.WEIGHT); - } - if (boots != null) { - maxWeight += boots.mStat.get(StatType.WEIGHT); - } - } - - private void updateArmorStats(ArmorData armorData, ArrayList<StatType> statTypes) { - for (StatType statType : statTypes) { - if(armorData == null || armorData.mStat == null || !armorData.mStat.containsKey(statType)) - continue; -// if(armorData != null && armorData.mStat != null && armorData.mStat.containsKey(statType)) -// { - set(mStat, statType, armorData.mStat.get(statType)); -// } - /*change(mStat, StatType.MAGNET, armorData.mStat.get(StatType.MAGNET)); - change(mStat, StatType.THORNS, armorData.mStat.get(StatType.THORNS)); - change(mStat, StatType.PROCESSINGPOWER, armorData.mStat.get(StatType.PROCESSINGPOWER)); - change(mStat, StatType.PROCESSINGPOWERUSED, armorData.mStat.get(StatType.PROCESSINGPOWERUSED));*/ - } - - + if (!list.isEmpty()) + drawHoveringText(list, x, y, fontRendererObj); } - public void set(Map aMap, StatType aType, boolean aSet){ - if(aMap.containsKey(aType))aMap.remove(aType); - aMap.put(aType, aSet); - } - - public void set(Map aMap, StatType aType, float aSet){ - if(aMap.containsKey(aType))aMap.remove(aType); - aMap.put(aType, aSet); + public void drawBars(int x, int y, float value) { + + int bar = (int) Math.floor(18 * value); + int xStart = (width - xSize) / 2; + int yStart = (height - ySize) / 2; + xStart += 8; + yStart += 1; + drawTexturedModalRect(xStart + x, yStart + y, 217, 26, bar, 5); + drawTexturedModalRect(xStart+ bar + x, yStart + y, 197+bar, 26, 18-bar, 5); } - - public void change(Map aMap, StatType aType, float aChange){ - float tChange = 0; - if(aMap==null)System.out.println("changeMapnull"); - if(aMap.containsKey(aType)){ - Object value = aMap.get(aType); - tChange = value != null ? (float) aMap.get(aType) : 0.0f; - aMap.remove(aType); + + protected Slot getSlotAtPosition(int p_146975_1_, int p_146975_2_) { + for (int k = 0; k < cont.inventorySlots.size(); ++k) { + Slot slot = (Slot) cont.inventorySlots.get(k); + if (this.isMouseOverSlot(slot, p_146975_1_, p_146975_2_)) { + return slot; + } } - aMap.put(aType, (tChange + aChange)); - } - - public void dechargeComponents(int aCharge){ - + return null; } - public double getBaseAbsorptionRatio() { - switch (this.type) { - case 0: - return 0.15; - case 1: - return 0.40; - case 2: - return 0.30; - case 3: - return 0.15; - default: - return 0.00; - } + private boolean isMouseOverSlot(Slot p_146981_1_, int p_146981_2_, int p_146981_3_) { + return this.func_146978_c(p_146981_1_.xDisplayPosition, p_146981_1_.yDisplayPosition, 16, 16, p_146981_2_, p_146981_3_); } -} +}
\ No newline at end of file diff --git a/src/main/java/gregtech/common/items/armor/GuiElectricArmor1.java b/src/main/java/gregtech/common/items/armor/GuiElectricArmor1.java new file mode 100644 index 0000000000..6857535d65 --- /dev/null +++ b/src/main/java/gregtech/common/items/armor/GuiElectricArmor1.java @@ -0,0 +1,299 @@ +package gregtech.common.items.armor; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gregtech.api.util.GT_LanguageManager; +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.Slot; +import net.minecraft.util.ResourceLocation; +import org.lwjgl.opengl.GL11; + +import java.text.DecimalFormat; +import java.text.DecimalFormatSymbols; +import java.text.NumberFormat; +import java.util.ArrayList; +import java.util.List; +import java.util.Locale; + +@SideOnly(Side.CLIENT) +public class GuiElectricArmor1 extends GuiContainer { + ContainerModularArmor cont; + EntityPlayer player; + private int tab; + + public GuiElectricArmor1(ContainerModularArmor containerModularArmor, EntityPlayer aPlayer) { + super(containerModularArmor); + player = aPlayer; + cont = containerModularArmor; + tab = 0; + } + + public String seperateNumber(long number){ + DecimalFormat formatter = (DecimalFormat) NumberFormat.getInstance(Locale.US); + DecimalFormatSymbols symbols = formatter.getDecimalFormatSymbols(); + symbols.setGroupingSeparator(' '); + return formatter.format(number); + } + + @Override + protected void drawGuiContainerForegroundLayer(int x, int y) { + int xStart = (width - xSize) / 2; + int yStart = (height - ySize) / 2; + int x2 = x - xStart; + int y2 = y - yStart; + drawTooltip(x2, y2 + 5); + } + + @Override + protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) { + GL11.glColor4f(1F, 1F, 1F, 1F); + this.mc.getTextureManager().bindTexture(new ResourceLocation("gregtech", "textures/gui/armorgui3x4.png")); + int xStart = (width - xSize) / 2; + int yStart = (height - ySize) / 2; + //Draw background + drawTexturedModalRect(xStart, yStart, 0, 0, xSize, ySize); + //Draw active arrows + drawTexturedModalRect(xStart + 10, yStart + 70, 219, 11, 14, 5); + //Draw active armor symbol + switch (cont.mInvArmor.data.type) { + case 0: + drawTexturedModalRect(xStart + 73, yStart + 68, 177, 10, 10, 9); + break; + case 1: + drawTexturedModalRect(xStart + 83, yStart + 68, 187, 10, 10, 9); + break; + case 2: + drawTexturedModalRect(xStart + 93, yStart + 68, 197, 10, 10, 9); + break; + case 3: + drawTexturedModalRect(xStart + 103, yStart + 68, 207, 10, 10, 9); + break; + default: + break; + } + //Draw active tab + switch(tab){ + case 0: + break; + case 1: + drawTexturedModalRect(xStart + 7, yStart + 14, 2, 167, 104, 54); + break; + case 2: + drawTexturedModalRect(xStart + 7, yStart + 14, 107, 167, 104, 54); + break; + default: + break; + } + + if(cont.mInvArmor.data.tankCap>0){ + drawTexturedModalRect(xStart + 94, yStart + 32, 231, 69, 16, 34); + } + + int bar = (int) Math.floor(18 * (cont.mInvArmor.data.weight/(float)1000)); + drawTexturedModalRect(xStart + 15, yStart + 7, 217, 26, bar, 5); + drawTexturedModalRect(xStart + bar + 15, yStart + 7, 197+bar, 26, 18-bar, 5); + + if(tab==0){ + //processing power bar + bar = Math.min((int) Math.floor(52 * ((float)cont.mInvArmor.data.processingPowerUsed/(float)cont.mInvArmor.data.processingPower)),52); + drawTexturedModalRect(xStart + 17, yStart + 17, 177, 146, bar, 5); + drawTexturedModalRect(xStart + bar + 17, yStart + 17, 177+bar, 139, 52-bar, 5); + }else if(tab==1){ + + }else{ + //Def tab values + if(cont.mInvArmor.data.physicalDef>0)drawTexturedModalRect(xStart + 30, yStart + 20, 186, 33, 7, 7); + drawBars(31, 20, cont.mInvArmor.data.physicalDef); + if(cont.mInvArmor.data.projectileDef>0)drawTexturedModalRect(xStart + 30, yStart + 29, 186, 42, 7, 7); + drawBars(31, 29, cont.mInvArmor.data.projectileDef); + if(cont.mInvArmor.data.fireDef>0)drawTexturedModalRect(xStart + 30, yStart + 38, 186, 51, 7, 7); + drawBars(31, 38, cont.mInvArmor.data.fireDef); + if(cont.mInvArmor.data.magicDef>0)drawTexturedModalRect(xStart + 30, yStart + 47, 186, 60, 7, 7); + drawBars(31, 47, cont.mInvArmor.data.magicDef); + if(cont.mInvArmor.data.explosionDef>0)drawTexturedModalRect(xStart + 30, yStart + 56, 186, 69, 7, 7); + drawBars(31, 56, cont.mInvArmor.data.explosionDef); + if(cont.mInvArmor.data.radiationDef>0)drawTexturedModalRect(xStart + 61, yStart + 20, 186, 87, 7, 7); + drawBars(62, 20, cont.mInvArmor.data.radiationDef); + if(cont.mInvArmor.data.electricDef>0)drawTexturedModalRect(xStart + 61, yStart + 29, 186, 96, 7, 7); + drawBars(62, 29, cont.mInvArmor.data.electricDef); + if(cont.mInvArmor.data.witherDef>0)drawTexturedModalRect(xStart + 61, yStart + 38, 186, 105, 7, 7); + drawBars(62, 38, cont.mInvArmor.data.witherDef); + if(cont.mInvArmor.data.fallDef>0)drawTexturedModalRect(xStart + 61, yStart + 47, 186, 114, 7, 7); + if(cont.mInvArmor.data.thorns>0)drawTexturedModalRect(xStart + 61, yStart + 56, 186, 123, 7, 7); + if(cont.mInvArmor.data.magnet>0)drawTexturedModalRect(xStart + 70, yStart + 56, 186, 78, 7, 7); + } + + + } + + protected void mouseClicked(int mouseX, int mouseY, int mouseBtn) { + int xStart = mouseX-((width - xSize) / 2); + int yStart = mouseY-((height - ySize) / 2); + if(yStart>68&&yStart<77){ + if(xStart>18&&xStart<26){ + tab++; + }else if(xStart>8&&xStart<17){ + tab--; + } + if(tab>2){tab=0;} + if(tab<0){tab=2;} + if(xStart>72&&xStart<112){ + if(xStart>72&&xStart<81&&cont.mInvArmor.data.helmet!=null){cont.mInvArmor.data.helmet.openGui=true;player.closeScreen();} + if(xStart>82&&xStart<91&&cont.mInvArmor.data.chestplate!=null){cont.mInvArmor.data.chestplate.openGui=true;player.closeScreen();} + if(xStart>92&&xStart<101&&cont.mInvArmor.data.leggings!=null){cont.mInvArmor.data.leggings.openGui=true;player.closeScreen();} + if(xStart>102&&xStart<112&&cont.mInvArmor.data.boots!=null){cont.mInvArmor.data.boots.openGui=true;player.closeScreen();} + } + } +// Slot slot = getSlotAtPosition(mouseX, mouseY); +// if (slot != null && slot instanceof SlotFluid && player != null) { +// ItemStack tmp = player.inventory.getItemStack(); +// if (tmp == null) { +// GTExtras.NET.sendToServer(new FluidSync(player.getCommandSenderName(), 0, "null")); +// } +// if (tmp != null && tmp.getItem() instanceof IFluidContainerItem) { +// FluidStack tmp2 = ((IFluidContainerItem) tmp.getItem()).getFluid(tmp); +// if (!slot.getHasStack() && tmp2 != null) { +// slot.putStack(UT.Fluids.display(tmp2, true)); +// GTExtras.NET.sendToServer(new FluidSync(player.getCommandSenderName(), tmp2.amount, UT.Fluids.name(tmp2, false))); +// ItemStack tmp4 = UT.Fluids.getContainerForFilledItem(tmp, true); +// tmp4.stackSize = 1; +// if (tmp.stackSize > 1) { +// player.inventory.addItemStackToInventory(tmp4); +// tmp.stackSize--; +// player.inventory.setItemStack(tmp); +// GTExtras.NET.sendToServer(new FluidSync2(player.getCommandSenderName())); +// } else { +// player.inventory.setItemStack(null); +// player.inventory.addItemStackToInventory(tmp4); +// GTExtras.NET.sendToServer(new FluidSync2(player.getCommandSenderName())); +// } +// +// } else if (slot.getHasStack() && tmp2 != null) { +// Item fluidSlot = slot.getStack().getItem(); +// if (fluidSlot.getDamage(slot.getStack()) == tmp2.getFluidID()) { +// NBTTagCompound nbt = slot.getStack().getTagCompound(); +// if (nbt != null) { +// tmp2.amount += nbt.getLong("mFluidDisplayAmount"); +// ItemStack tmp3 = player.inventory.getItemStack(); +// if (tmp3.stackSize <= 1) { +// tmp3 = null; +// } else { +// tmp3.stackSize--; +// } +// player.inventory.setItemStack(tmp3); +// GTExtras.NET.sendToServer(new FluidSync2(player.getCommandSenderName())); +// slot.putStack(UT.Fluids.display(tmp2, true)); +// GTExtras.NET.sendToServer(new FluidSync(player.getCommandSenderName(), tmp2.amount, UT.Fluids.name(tmp2, false))); +// } +// } +// } +// } +// } + super.mouseClicked(mouseX, mouseY, mouseBtn); + } + + protected void drawTooltip(int x, int y) { + List<String> list = new ArrayList<String>(); + //General tooltips + if(x>=7&&y>=11&&x<=33&&y<=17){ + list.add(GT_LanguageManager.getTranslation("weight") + ": " + cont.mInvArmor.data.weight); + list.add("Total Weight: "+cont.mInvArmor.data.maxWeight); + if (cont.mInvArmor.data.weight > 1000) + list.add("Too Heavy!"); + } + if(x>=56&&y>=11&&x<=112&&y<=17){ + list.add("Stored Energy: "+seperateNumber(cont.mInvArmor.data.charge)+" EU"); + } + if(y>74&&y<83){ + if(x>8&&x<17){ + list.add("Previous Page"); + }else if(x>18&&x<27){ + list.add("Next Page"); + }else if(x>72&&x<80){ + list.add("Helmet"); + }else if(x>81&&x<90){ + list.add("Chestplate"); + }else if(x>91&&x<100){ + list.add("Leggings"); + }else if(x>101&&x<110){ + list.add("Boots"); + } + } + if(tab==0){ + if(x>=93&&y>=36&&x<=110&&y<=71){list.add("Tank Capacity: "+cont.mInvArmor.data.tankCap+"L"); + } + if(x>=7&&y>=22&&x<=70&&y<=28){list.add("Processing Power Provided: "+cont.mInvArmor.data.processingPower); + list.add("Processing Power Used: "+cont.mInvArmor.data.processingPowerUsed); + } + }else if(tab==1){ + + }else{ + if (x >= 28 && x <= 58) { + if (y >= 25 && y <= 32) { + list.add(GT_LanguageManager.getTranslation("phydef") + ": " + (Math.round(cont.mInvArmor.data.physicalDef * 1000) / 10.0) + "%"); + } else if (y >= 33 && y <= 41) { + list.add(GT_LanguageManager.getTranslation("prodef") + ": " + (Math.round(cont.mInvArmor.data.projectileDef * 1000) / 10.0) + "%"); + } else if (y >= 42 && y <= 50) { + list.add(GT_LanguageManager.getTranslation("firedef") + ": " + (Math.round(cont.mInvArmor.data.fireDef * 1000) / 10.0) + "%"); + } else if (y >= 51 && y <= 59) { + list.add(GT_LanguageManager.getTranslation("magdef") + ": " + (Math.round(cont.mInvArmor.data.magicDef * 1000) / 10.0) + "%"); + } else if (y >= 60 && y <= 68) { + list.add(GT_LanguageManager.getTranslation("expdef") + ": " + (Math.round(cont.mInvArmor.data.explosionDef * 1000) / 10.0) + "%"); + } + } else if (x >= 59 && x <= 90) { + if (y >= 25 && y <= 32) { + list.add(GT_LanguageManager.getTranslation("raddef") + ": " + (Math.round(cont.mInvArmor.data.radiationDef * 1000) / 10.0) + "%"); + if(cont.mInvArmor.data.fullRadiationDef){ + list.add("Radiation Immunity");} + } else if (y >= 33 && y <= 41) { + list.add(GT_LanguageManager.getTranslation("eledef") + ": " + (Math.round(cont.mInvArmor.data.electricDef * 1000) / 10.0) + "%"); + if(cont.mInvArmor.data.fullElectricDef){ + list.add("Electric Immunity");} + } else if (y >= 42 && y <= 50) { + list.add(GT_LanguageManager.getTranslation("whidef") + ": " + (Math.round(cont.mInvArmor.data.witherDef * 1000) / 10.0) + "%"); + } else if (y >= 51 && y <= 59) { + if(cont.mInvArmor.data.type!=3){ + list.add("Fall Damage absorbtion"); + list.add("Only for Boots"); + }else{ + list.add(GT_LanguageManager.getTranslation("abs1") + " " + (int) Math.round(cont.mInvArmor.data.fallDef) + GT_LanguageManager.getTranslation("abs2"));} + } else if (y >= 60 && y <= 68) { + if(x<69){ + list.add(GT_LanguageManager.getTranslation("thorns") + ": " + (int) Math.round(cont.mInvArmor.data.thornsSingle) + " Dmg"); + list.add("Total "+GT_LanguageManager.getTranslation("thorns") + ": " + (int) Math.round(cont.mInvArmor.data.thorns) + " Dmg"); + }else{ + list.add(GT_LanguageManager.getTranslation("magnet") + ": " + cont.mInvArmor.data.magnetSingle + " m"); + list.add("Total "+GT_LanguageManager.getTranslation("magnet") + ": " + cont.mInvArmor.data.magnet + " m");} + } + } + } + if (!list.isEmpty()) + drawHoveringText(list, x, y, fontRendererObj); + } + + public void drawBars(int x, int y, float value) { + + int bar = (int) Math.floor(18 * value); + int xStart = (width - xSize) / 2; + int yStart = (height - ySize) / 2; + xStart += 8; + yStart += 1; + drawTexturedModalRect(xStart + x, yStart + y, 217, 26, bar, 5); + drawTexturedModalRect(xStart+ bar + x, yStart + y, 197+bar, 26, 18-bar, 5); + } + + protected Slot getSlotAtPosition(int p_146975_1_, int p_146975_2_) { + for (int k = 0; k < cont.inventorySlots.size(); ++k) { + Slot slot = (Slot) cont.inventorySlots.get(k); + if (this.isMouseOverSlot(slot, p_146975_1_, p_146975_2_)) { + return slot; + } + } + return null; + } + + private boolean isMouseOverSlot(Slot p_146981_1_, int p_146981_2_, int p_146981_3_) { + return this.func_146978_c(p_146981_1_.xDisplayPosition, p_146981_1_.yDisplayPosition, 16, 16, p_146981_2_, p_146981_3_); + } +} diff --git a/src/main/java/gregtech/common/items/armor/Vector3.java b/src/main/java/gregtech/common/items/armor/Vector3.java index 590f544546..2f79ff4c69 100644 --- a/src/main/java/gregtech/common/items/armor/Vector3.java +++ b/src/main/java/gregtech/common/items/armor/Vector3.java @@ -1,8 +1,7 @@ package gregtech.common.items.armor; -import java.math.BigDecimal; -import java.math.MathContext; -import java.math.RoundingMode; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.entity.Entity; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.AxisAlignedBB; @@ -10,8 +9,10 @@ import net.minecraft.util.Vec3; import org.lwjgl.opengl.GL11; import org.lwjgl.util.vector.Vector3f; import org.lwjgl.util.vector.Vector4f; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; + +import java.math.BigDecimal; +import java.math.MathContext; +import java.math.RoundingMode; public class Vector3 { public static Vector3 zero = new Vector3(); diff --git a/src/main/java/gregtech/common/items/armor/gui/ContainerModularArmor.java b/src/main/java/gregtech/common/items/armor/gui/ContainerModularArmor.java index 0258a3eb3c..1f63afac5e 100644 --- a/src/main/java/gregtech/common/items/armor/gui/ContainerModularArmor.java +++ b/src/main/java/gregtech/common/items/armor/gui/ContainerModularArmor.java @@ -4,9 +4,7 @@ import gregtech.common.items.armor.ArmorData; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.inventory.Container; -import net.minecraft.inventory.IInventory; import net.minecraft.inventory.Slot; -import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraftforge.oredict.OreDictionary; diff --git a/src/main/java/gregtech/common/items/armor/gui/FluidSync.java b/src/main/java/gregtech/common/items/armor/gui/FluidSync.java index 8f1aef56d1..0e17a82ee8 100644 --- a/src/main/java/gregtech/common/items/armor/gui/FluidSync.java +++ b/src/main/java/gregtech/common/items/armor/gui/FluidSync.java @@ -1,14 +1,5 @@ package gregtech.common.items.armor.gui; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.WorldServer; -import net.minecraftforge.common.DimensionManager; -import net.minecraftforge.fluids.FluidRegistry; -import net.minecraftforge.fluids.FluidStack; - -import com.google.common.base.Charsets; -import com.google.common.io.ByteArrayDataInput; import com.google.common.io.ByteArrayDataOutput; import com.google.common.io.ByteStreams; diff --git a/src/main/java/gregtech/common/items/armor/gui/FluidSync2.java b/src/main/java/gregtech/common/items/armor/gui/FluidSync2.java index 75c3c6d363..6882e67268 100644 --- a/src/main/java/gregtech/common/items/armor/gui/FluidSync2.java +++ b/src/main/java/gregtech/common/items/armor/gui/FluidSync2.java @@ -1,15 +1,5 @@ package gregtech.common.items.armor.gui; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.WorldServer; -import net.minecraftforge.common.DimensionManager; -import net.minecraftforge.fluids.FluidRegistry; -import net.minecraftforge.fluids.FluidStack; - -import com.google.common.base.Charsets; -import com.google.common.io.ByteArrayDataInput; import com.google.common.io.ByteArrayDataOutput; import com.google.common.io.ByteStreams; diff --git a/src/main/java/gregtech/common/items/armor/gui/SlotFluid.java b/src/main/java/gregtech/common/items/armor/gui/SlotFluid.java index a3d2bdaf09..63e8873df9 100644 --- a/src/main/java/gregtech/common/items/armor/gui/SlotFluid.java +++ b/src/main/java/gregtech/common/items/armor/gui/SlotFluid.java @@ -1,16 +1,9 @@ package gregtech.common.items.armor.gui; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import scala.reflect.internal.Trees.This; -import net.minecraft.client.renderer.texture.TextureMap; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.fluids.FluidRegistry; public class SlotFluid extends Slot{ diff --git a/src/main/java/gregtech/common/items/behaviors/Behaviour_Arrow.java b/src/main/java/gregtech/common/items/behaviors/Behaviour_Arrow.java index acb6986ec6..1ebd3c0d16 100644 --- a/src/main/java/gregtech/common/items/behaviors/Behaviour_Arrow.java +++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_Arrow.java @@ -1,112 +1,112 @@ -package gregtech.common.items.behaviors;
-
-import gregtech.api.enums.SubTag;
-import gregtech.api.items.GT_MetaBase_Item;
-import gregtech.api.util.GT_Utility;
-import gregtech.common.entities.GT_Entity_Arrow;
-import net.minecraft.block.BlockDispenser;
-import net.minecraft.dispenser.IBlockSource;
-import net.minecraft.dispenser.IPosition;
-import net.minecraft.enchantment.Enchantment;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.entity.projectile.EntityArrow;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.util.EnumFacing;
-import net.minecraft.world.World;
-
-public class Behaviour_Arrow
- extends Behaviour_None {
- public static Behaviour_Arrow DEFAULT_WOODEN = new Behaviour_Arrow(GT_Entity_Arrow.class, 1.0F, 6.0F);
- public static Behaviour_Arrow DEFAULT_PLASTIC = new Behaviour_Arrow(GT_Entity_Arrow.class, 1.5F, 6.0F);
- private final int mLevel;
- private final Enchantment mEnchantment;
- private final float mSpeedMultiplier;
- private final float mPrecision;
- private final Class<? extends GT_Entity_Arrow> mArrow;
-
- public Behaviour_Arrow(Class<? extends GT_Entity_Arrow> aArrow, float aSpeed, float aPrecision) {
- this(aArrow, aSpeed, aPrecision, null, 0);
- }
-
- public Behaviour_Arrow(Class<? extends GT_Entity_Arrow> aArrow, float aSpeed, float aPrecision, Enchantment aEnchantment, int aLevel) {
- this.mArrow = aArrow;
- this.mSpeedMultiplier = aSpeed;
- this.mPrecision = aPrecision;
- this.mEnchantment = aEnchantment;
- this.mLevel = aLevel;
- }
-
- public boolean onLeftClickEntity(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, Entity aEntity) {
- if ((aEntity instanceof EntityLivingBase)) {
- GT_Utility.GT_EnchantmentHelper.applyBullshitA((EntityLivingBase) aEntity, aPlayer, aStack);
- GT_Utility.GT_EnchantmentHelper.applyBullshitB(aPlayer, aEntity, aStack);
- if (!aPlayer.capabilities.isCreativeMode) {
- aStack.stackSize -= 1;
- }
- if (aStack.stackSize <= 0) {
- aPlayer.destroyCurrentEquippedItem();
- }
- return false;
- }
- return false;
- }
-
- public boolean isItemStackUsable(GT_MetaBase_Item aItem, ItemStack aStack) {
- if ((this.mEnchantment != null) && (this.mLevel > 0)) {
- NBTTagCompound tNBT = GT_Utility.ItemNBT.getNBT(aStack);
- if (!tNBT.getBoolean("GT.HasBeenUpdated")) {
- tNBT.setBoolean("GT.HasBeenUpdated", true);
- GT_Utility.ItemNBT.setNBT(aStack, tNBT);
- GT_Utility.ItemNBT.addEnchantment(aStack, this.mEnchantment, this.mLevel);
- }
- }
- return true;
- }
-
- public boolean canDispense(GT_MetaBase_Item aItem, IBlockSource aSource, ItemStack aStack) {
- return true;
- }
-
- public ItemStack onDispense(GT_MetaBase_Item aItem, IBlockSource aSource, ItemStack aStack) {
- World aWorld = aSource.getWorld();
- IPosition tPosition = BlockDispenser.func_149939_a(aSource);
- EnumFacing tFacing = BlockDispenser.func_149937_b(aSource.getBlockMetadata());
- GT_Entity_Arrow tEntityArrow = (GT_Entity_Arrow) getProjectile(aItem, SubTag.PROJECTILE_ARROW, aStack, aWorld, tPosition.getX(), tPosition.getY(), tPosition.getZ());
- if (tEntityArrow != null) {
- tEntityArrow.setThrowableHeading(tFacing.getFrontOffsetX(), tFacing.getFrontOffsetY() + 0.1F, tFacing.getFrontOffsetZ(), this.mSpeedMultiplier * 1.1F, this.mPrecision);
- tEntityArrow.setArrowItem(aStack);
- tEntityArrow.canBePickedUp = 1;
- aWorld.spawnEntityInWorld(tEntityArrow);
- if (aStack.stackSize < 100) {
- aStack.stackSize -= 1;
- }
- return aStack;
- }
- return super.onDispense(aItem, aSource, aStack);
- }
-
- public boolean hasProjectile(GT_MetaBase_Item aItem, SubTag aProjectileType, ItemStack aStack) {
- return aProjectileType == SubTag.PROJECTILE_ARROW;
- }
-
- public EntityArrow getProjectile(GT_MetaBase_Item aItem, SubTag aProjectileType, ItemStack aStack, World aWorld, double aX, double aY, double aZ) {
- if (!hasProjectile(aItem, aProjectileType, aStack)) {
- return null;
- }
- GT_Entity_Arrow rArrow = (GT_Entity_Arrow) GT_Utility.callConstructor(this.mArrow.getName(), -1, null, true, new Object[]{aWorld, Double.valueOf(aX), Double.valueOf(aY), Double.valueOf(aZ)});
- rArrow.setArrowItem(aStack);
- return rArrow;
- }
-
- public EntityArrow getProjectile(GT_MetaBase_Item aItem, SubTag aProjectileType, ItemStack aStack, World aWorld, EntityLivingBase aEntity, float aSpeed) {
- if (!hasProjectile(aItem, aProjectileType, aStack)) {
- return null;
- }
- GT_Entity_Arrow rArrow = (GT_Entity_Arrow) GT_Utility.callConstructor(this.mArrow.getName(), -1, null, true, new Object[]{aWorld, aEntity, Float.valueOf(this.mSpeedMultiplier * aSpeed)});
- rArrow.setArrowItem(aStack);
- return rArrow;
- }
-}
+package gregtech.common.items.behaviors; + +import gregtech.api.enums.SubTag; +import gregtech.api.items.GT_MetaBase_Item; +import gregtech.api.util.GT_Utility; +import gregtech.common.entities.GT_Entity_Arrow; +import net.minecraft.block.BlockDispenser; +import net.minecraft.dispenser.IBlockSource; +import net.minecraft.dispenser.IPosition; +import net.minecraft.enchantment.Enchantment; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.projectile.EntityArrow; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.EnumFacing; +import net.minecraft.world.World; + +public class Behaviour_Arrow + extends Behaviour_None { + public static Behaviour_Arrow DEFAULT_WOODEN = new Behaviour_Arrow(GT_Entity_Arrow.class, 1.0F, 6.0F); + public static Behaviour_Arrow DEFAULT_PLASTIC = new Behaviour_Arrow(GT_Entity_Arrow.class, 1.5F, 6.0F); + private final int mLevel; + private final Enchantment mEnchantment; + private final float mSpeedMultiplier; + private final float mPrecision; + private final Class<? extends GT_Entity_Arrow> mArrow; + + public Behaviour_Arrow(Class<? extends GT_Entity_Arrow> aArrow, float aSpeed, float aPrecision) { + this(aArrow, aSpeed, aPrecision, null, 0); + } + + public Behaviour_Arrow(Class<? extends GT_Entity_Arrow> aArrow, float aSpeed, float aPrecision, Enchantment aEnchantment, int aLevel) { + this.mArrow = aArrow; + this.mSpeedMultiplier = aSpeed; + this.mPrecision = aPrecision; + this.mEnchantment = aEnchantment; + this.mLevel = aLevel; + } + + public boolean onLeftClickEntity(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, Entity aEntity) { + if ((aEntity instanceof EntityLivingBase)) { + GT_Utility.GT_EnchantmentHelper.applyBullshitA((EntityLivingBase) aEntity, aPlayer, aStack); + GT_Utility.GT_EnchantmentHelper.applyBullshitB(aPlayer, aEntity, aStack); + if (!aPlayer.capabilities.isCreativeMode) { + aStack.stackSize -= 1; + } + if (aStack.stackSize <= 0) { + aPlayer.destroyCurrentEquippedItem(); + } + return false; + } + return false; + } + + public boolean isItemStackUsable(GT_MetaBase_Item aItem, ItemStack aStack) { + if ((this.mEnchantment != null) && (this.mLevel > 0)) { + NBTTagCompound tNBT = GT_Utility.ItemNBT.getNBT(aStack); + if (!tNBT.getBoolean("GT.HasBeenUpdated")) { + tNBT.setBoolean("GT.HasBeenUpdated", true); + GT_Utility.ItemNBT.setNBT(aStack, tNBT); + GT_Utility.ItemNBT.addEnchantment(aStack, this.mEnchantment, this.mLevel); + } + } + return true; + } + + public boolean canDispense(GT_MetaBase_Item aItem, IBlockSource aSource, ItemStack aStack) { + return true; + } + + public ItemStack onDispense(GT_MetaBase_Item aItem, IBlockSource aSource, ItemStack aStack) { + World aWorld = aSource.getWorld(); + IPosition tPosition = BlockDispenser.func_149939_a(aSource); + EnumFacing tFacing = BlockDispenser.func_149937_b(aSource.getBlockMetadata()); + GT_Entity_Arrow tEntityArrow = (GT_Entity_Arrow) getProjectile(aItem, SubTag.PROJECTILE_ARROW, aStack, aWorld, tPosition.getX(), tPosition.getY(), tPosition.getZ()); + if (tEntityArrow != null) { + tEntityArrow.setThrowableHeading(tFacing.getFrontOffsetX(), tFacing.getFrontOffsetY() + 0.1F, tFacing.getFrontOffsetZ(), this.mSpeedMultiplier * 1.1F, this.mPrecision); + tEntityArrow.setArrowItem(aStack); + tEntityArrow.canBePickedUp = 1; + aWorld.spawnEntityInWorld(tEntityArrow); + if (aStack.stackSize < 100) { + aStack.stackSize -= 1; + } + return aStack; + } + return super.onDispense(aItem, aSource, aStack); + } + + public boolean hasProjectile(GT_MetaBase_Item aItem, SubTag aProjectileType, ItemStack aStack) { + return aProjectileType == SubTag.PROJECTILE_ARROW; + } + + public EntityArrow getProjectile(GT_MetaBase_Item aItem, SubTag aProjectileType, ItemStack aStack, World aWorld, double aX, double aY, double aZ) { + if (!hasProjectile(aItem, aProjectileType, aStack)) { + return null; + } + GT_Entity_Arrow rArrow = (GT_Entity_Arrow) GT_Utility.callConstructor(this.mArrow.getName(), -1, null, true, new Object[]{aWorld, Double.valueOf(aX), Double.valueOf(aY), Double.valueOf(aZ)}); + rArrow.setArrowItem(aStack); + return rArrow; + } + + public EntityArrow getProjectile(GT_MetaBase_Item aItem, SubTag aProjectileType, ItemStack aStack, World aWorld, EntityLivingBase aEntity, float aSpeed) { + if (!hasProjectile(aItem, aProjectileType, aStack)) { + return null; + } + GT_Entity_Arrow rArrow = (GT_Entity_Arrow) GT_Utility.callConstructor(this.mArrow.getName(), -1, null, true, new Object[]{aWorld, aEntity, Float.valueOf(this.mSpeedMultiplier * aSpeed)}); + rArrow.setArrowItem(aStack); + return rArrow; + } +} diff --git a/src/main/java/gregtech/common/items/behaviors/Behaviour_Arrow_Potion.java b/src/main/java/gregtech/common/items/behaviors/Behaviour_Arrow_Potion.java index 80a646bde4..000937b4de 100644 --- a/src/main/java/gregtech/common/items/behaviors/Behaviour_Arrow_Potion.java +++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_Arrow_Potion.java @@ -1,59 +1,59 @@ -package gregtech.common.items.behaviors;
-
-import gregtech.api.enums.SubTag;
-import gregtech.api.items.GT_MetaBase_Item;
-import gregtech.common.entities.GT_Entity_Arrow_Potion;
-import net.minecraft.enchantment.Enchantment;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.entity.projectile.EntityArrow;
-import net.minecraft.item.ItemStack;
-import net.minecraft.potion.PotionEffect;
-import net.minecraft.world.World;
-
-public class Behaviour_Arrow_Potion
- extends Behaviour_Arrow {
- private final int[] mPotions;
-
- public Behaviour_Arrow_Potion(float aSpeed, float aPrecision, int... aPotions) {
- super(GT_Entity_Arrow_Potion.class, aSpeed, aPrecision);
- this.mPotions = aPotions;
- }
-
- public Behaviour_Arrow_Potion(float aSpeed, float aPrecision, Enchantment aEnchantment, int aLevel, int... aPotions) {
- super(GT_Entity_Arrow_Potion.class, aSpeed, aPrecision, aEnchantment, aLevel);
- this.mPotions = aPotions;
- }
-
- public boolean onLeftClickEntity(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, Entity aEntity) {
- if ((aEntity instanceof EntityLivingBase)) {
- for (int i = 3; i < this.mPotions.length; i += 4) {
- if (aEntity.worldObj.rand.nextInt(100) < this.mPotions[i]) {
- ((EntityLivingBase) aEntity).addPotionEffect(new PotionEffect(this.mPotions[(i - 3)], this.mPotions[(i - 2)], this.mPotions[(i - 1)], false));
- }
- }
- }
- return super.onLeftClickEntity(aItem, aStack, aPlayer, aEntity);
- }
-
- public EntityArrow getProjectile(GT_MetaBase_Item aItem, SubTag aProjectileType, ItemStack aStack, World aWorld, double aX, double aY, double aZ) {
- if (!hasProjectile(aItem, aProjectileType, aStack)) {
- return null;
- }
- GT_Entity_Arrow_Potion rArrow = new GT_Entity_Arrow_Potion(aWorld, aX, aY, aZ);
- rArrow.setArrowItem(aStack);
- rArrow.setPotions(this.mPotions);
- return rArrow;
- }
-
- public EntityArrow getProjectile(GT_MetaBase_Item aItem, SubTag aProjectileType, ItemStack aStack, World aWorld, EntityLivingBase aEntity, float aSpeed) {
- if (!hasProjectile(aItem, aProjectileType, aStack)) {
- return null;
- }
- GT_Entity_Arrow_Potion rArrow = new GT_Entity_Arrow_Potion(aWorld, aEntity, aSpeed);
- rArrow.setArrowItem(aStack);
- rArrow.setPotions(this.mPotions);
- return rArrow;
- }
-}
+package gregtech.common.items.behaviors; + +import gregtech.api.enums.SubTag; +import gregtech.api.items.GT_MetaBase_Item; +import gregtech.common.entities.GT_Entity_Arrow_Potion; +import net.minecraft.enchantment.Enchantment; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.projectile.EntityArrow; +import net.minecraft.item.ItemStack; +import net.minecraft.potion.PotionEffect; +import net.minecraft.world.World; + +public class Behaviour_Arrow_Potion + extends Behaviour_Arrow { + private final int[] mPotions; + + public Behaviour_Arrow_Potion(float aSpeed, float aPrecision, int... aPotions) { + super(GT_Entity_Arrow_Potion.class, aSpeed, aPrecision); + this.mPotions = aPotions; + } + + public Behaviour_Arrow_Potion(float aSpeed, float aPrecision, Enchantment aEnchantment, int aLevel, int... aPotions) { + super(GT_Entity_Arrow_Potion.class, aSpeed, aPrecision, aEnchantment, aLevel); + this.mPotions = aPotions; + } + + public boolean onLeftClickEntity(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, Entity aEntity) { + if ((aEntity instanceof EntityLivingBase)) { + for (int i = 3; i < this.mPotions.length; i += 4) { + if (aEntity.worldObj.rand.nextInt(100) < this.mPotions[i]) { + ((EntityLivingBase) aEntity).addPotionEffect(new PotionEffect(this.mPotions[(i - 3)], this.mPotions[(i - 2)], this.mPotions[(i - 1)], false)); + } + } + } + return super.onLeftClickEntity(aItem, aStack, aPlayer, aEntity); + } + + public EntityArrow getProjectile(GT_MetaBase_Item aItem, SubTag aProjectileType, ItemStack aStack, World aWorld, double aX, double aY, double aZ) { + if (!hasProjectile(aItem, aProjectileType, aStack)) { + return null; + } + GT_Entity_Arrow_Potion rArrow = new GT_Entity_Arrow_Potion(aWorld, aX, aY, aZ); + rArrow.setArrowItem(aStack); + rArrow.setPotions(this.mPotions); + return rArrow; + } + + public EntityArrow getProjectile(GT_MetaBase_Item aItem, SubTag aProjectileType, ItemStack aStack, World aWorld, EntityLivingBase aEntity, float aSpeed) { + if (!hasProjectile(aItem, aProjectileType, aStack)) { + return null; + } + GT_Entity_Arrow_Potion rArrow = new GT_Entity_Arrow_Potion(aWorld, aEntity, aSpeed); + rArrow.setArrowItem(aStack); + rArrow.setPotions(this.mPotions); + return rArrow; + } +} diff --git a/src/main/java/gregtech/common/items/behaviors/Behaviour_Crowbar.java b/src/main/java/gregtech/common/items/behaviors/Behaviour_Crowbar.java index 8524f7ca17..1fe66cb723 100644 --- a/src/main/java/gregtech/common/items/behaviors/Behaviour_Crowbar.java +++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_Crowbar.java @@ -1,55 +1,55 @@ -package gregtech.common.items.behaviors;
-
-import gregtech.api.GregTech_API;
-import gregtech.api.items.GT_MetaBase_Item;
-import gregtech.api.util.GT_ModHandler;
-import gregtech.api.util.GT_Utility;
-import net.minecraft.block.Block;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Blocks;
-import net.minecraft.item.ItemStack;
-import net.minecraft.world.World;
-
-public class Behaviour_Crowbar
- extends Behaviour_None {
- private final int mVanillaCosts;
- private final int mEUCosts;
-
- public Behaviour_Crowbar(int aVanillaCosts, int aEUCosts) {
- this.mVanillaCosts = aVanillaCosts;
- this.mEUCosts = aEUCosts;
- }
-
- public boolean onItemUseFirst(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) {
- if (aWorld.isRemote) {
- return false;
- }
- if (GT_ModHandler.getModItem("Railcraft", "fluid.creosote.bucket", 1L) != null) {
- return false;
- }
- Block aBlock = aWorld.getBlock(aX, aY, aZ);
- if (aBlock == null) {
- return false;
- }
- byte aMeta = (byte) aWorld.getBlockMetadata(aX, aY, aZ);
- if (aBlock == Blocks.rail) {
- if (GT_ModHandler.damageOrDechargeItem(aStack, this.mVanillaCosts, this.mEUCosts, aPlayer)) {
- aWorld.isRemote = true;
- aWorld.setBlock(aX, aY, aZ, aBlock, (aMeta + 1) % 10, 0);
- aWorld.isRemote = false;
- GT_Utility.sendSoundToPlayers(aWorld, (String) GregTech_API.sSoundList.get(Integer.valueOf(0)), 1.0F, -1.0F, aX, aY, aZ);
- }
- return true;
- }
- if ((aBlock == Blocks.detector_rail) || (aBlock == Blocks.activator_rail) || (aBlock == Blocks.golden_rail)) {
- if (GT_ModHandler.damageOrDechargeItem(aStack, this.mVanillaCosts, this.mEUCosts, aPlayer)) {
- aWorld.isRemote = true;
- aWorld.setBlock(aX, aY, aZ, aBlock, aMeta / 8 * 8 + (aMeta % 8 + 1) % 6, 0);
- aWorld.isRemote = false;
- GT_Utility.sendSoundToPlayers(aWorld, (String) GregTech_API.sSoundList.get(Integer.valueOf(0)), 1.0F, -1.0F, aX, aY, aZ);
- }
- return true;
- }
- return false;
- }
-}
+package gregtech.common.items.behaviors; + +import gregtech.api.GregTech_API; +import gregtech.api.items.GT_MetaBase_Item; +import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_Utility; +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; + +public class Behaviour_Crowbar + extends Behaviour_None { + private final int mVanillaCosts; + private final int mEUCosts; + + public Behaviour_Crowbar(int aVanillaCosts, int aEUCosts) { + this.mVanillaCosts = aVanillaCosts; + this.mEUCosts = aEUCosts; + } + + public boolean onItemUseFirst(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) { + if (aWorld.isRemote) { + return false; + } + if (GT_ModHandler.getModItem("Railcraft", "fluid.creosote.bucket", 1L) != null) { + return false; + } + Block aBlock = aWorld.getBlock(aX, aY, aZ); + if (aBlock == null) { + return false; + } + byte aMeta = (byte) aWorld.getBlockMetadata(aX, aY, aZ); + if (aBlock == Blocks.rail) { + if (GT_ModHandler.damageOrDechargeItem(aStack, this.mVanillaCosts, this.mEUCosts, aPlayer)) { + aWorld.isRemote = true; + aWorld.setBlock(aX, aY, aZ, aBlock, (aMeta + 1) % 10, 0); + aWorld.isRemote = false; + GT_Utility.sendSoundToPlayers(aWorld, (String) GregTech_API.sSoundList.get(Integer.valueOf(0)), 1.0F, -1.0F, aX, aY, aZ); + } + return true; + } + if ((aBlock == Blocks.detector_rail) || (aBlock == Blocks.activator_rail) || (aBlock == Blocks.golden_rail)) { + if (GT_ModHandler.damageOrDechargeItem(aStack, this.mVanillaCosts, this.mEUCosts, aPlayer)) { + aWorld.isRemote = true; + aWorld.setBlock(aX, aY, aZ, aBlock, aMeta / 8 * 8 + (aMeta % 8 + 1) % 6, 0); + aWorld.isRemote = false; + GT_Utility.sendSoundToPlayers(aWorld, (String) GregTech_API.sSoundList.get(Integer.valueOf(0)), 1.0F, -1.0F, aX, aY, aZ); + } + return true; + } + return false; + } +} diff --git a/src/main/java/gregtech/common/items/behaviors/Behaviour_DataOrb.java b/src/main/java/gregtech/common/items/behaviors/Behaviour_DataOrb.java index a339c5f35b..0943a9b9e2 100644 --- a/src/main/java/gregtech/common/items/behaviors/Behaviour_DataOrb.java +++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_DataOrb.java @@ -1,103 +1,103 @@ -package gregtech.common.items.behaviors;
-
-import gregtech.api.items.GT_MetaBase_Item;
-import gregtech.api.util.GT_Utility;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.nbt.NBTTagList;
-
-import java.util.List;
-
-public class Behaviour_DataOrb
- extends Behaviour_None {
- public static void copyInventory(ItemStack[] aInventory, ItemStack[] aNewContent, int aIndexlength) {
- for (int i = 0; i < aIndexlength; i++) {
- if (aNewContent[i] == null) {
- aInventory[i] = null;
- } else {
- aInventory[i] = GT_Utility.copy(new Object[]{aNewContent[i]});
- }
- }
- }
-
- public static String getDataName(ItemStack aStack) {
- NBTTagCompound tNBT = aStack.getTagCompound();
- if (tNBT == null) {
- return "";
- }
- return tNBT.getString("mDataName");
- }
-
- public static String getDataTitle(ItemStack aStack) {
- NBTTagCompound tNBT = aStack.getTagCompound();
- if (tNBT == null) {
- return "";
- }
- return tNBT.getString("mDataTitle");
- }
-
- public static NBTTagCompound setDataName(ItemStack aStack, String aDataName) {
- NBTTagCompound tNBT = aStack.getTagCompound();
- if (tNBT == null) {
- tNBT = new NBTTagCompound();
- }
- tNBT.setString("mDataName", aDataName);
- aStack.setTagCompound(tNBT);
- return tNBT;
- }
-
- public static NBTTagCompound setDataTitle(ItemStack aStack, String aDataTitle) {
- NBTTagCompound tNBT = aStack.getTagCompound();
- if (tNBT == null) {
- tNBT = new NBTTagCompound();
- }
- tNBT.setString("mDataTitle", aDataTitle);
- aStack.setTagCompound(tNBT);
- return tNBT;
- }
-
- public static ItemStack[] getNBTInventory(ItemStack aStack) {
- ItemStack[] tInventory = new ItemStack[256];
- NBTTagCompound tNBT = aStack.getTagCompound();
- if (tNBT == null) {
- return tInventory;
- }
- NBTTagList tNBT_ItemList = tNBT.getTagList("Inventory", 10);
- for (int i = 0; i < tNBT_ItemList.tagCount(); i++) {
- NBTTagCompound tag = tNBT_ItemList.getCompoundTagAt(i);
- byte slot = tag.getByte("Slot");
- if ((slot >= 0) && (slot < tInventory.length)) {
- tInventory[slot] = GT_Utility.loadItem(tag);
- }
- }
- return tInventory;
- }
-
- public static NBTTagCompound setNBTInventory(ItemStack aStack, ItemStack[] aInventory) {
- NBTTagCompound tNBT = aStack.getTagCompound();
- if (tNBT == null) {
- tNBT = new NBTTagCompound();
- }
- NBTTagList tNBT_ItemList = new NBTTagList();
- for (int i = 0; i < aInventory.length; i++) {
- ItemStack stack = aInventory[i];
- if (stack != null) {
- NBTTagCompound tag = new NBTTagCompound();
- tag.setByte("Slot", (byte) i);
- stack.writeToNBT(tag);
- tNBT_ItemList.appendTag(tag);
- }
- }
- tNBT.setTag("Inventory", tNBT_ItemList);
- aStack.setTagCompound(tNBT);
- return tNBT;
- }
-
- public List<String> getAdditionalToolTips(GT_MetaBase_Item aItem, List<String> aList, ItemStack aStack) {
- if (!(getDataTitle(aStack).length() == 0)) {
- aList.add(getDataTitle(aStack));
- aList.add(getDataName(aStack));
- }
- return aList;
- }
-}
+package gregtech.common.items.behaviors; + +import gregtech.api.items.GT_MetaBase_Item; +import gregtech.api.util.GT_Utility; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagList; + +import java.util.List; + +public class Behaviour_DataOrb + extends Behaviour_None { + public static void copyInventory(ItemStack[] aInventory, ItemStack[] aNewContent, int aIndexlength) { + for (int i = 0; i < aIndexlength; i++) { + if (aNewContent[i] == null) { + aInventory[i] = null; + } else { + aInventory[i] = GT_Utility.copy(new Object[]{aNewContent[i]}); + } + } + } + + public static String getDataName(ItemStack aStack) { + NBTTagCompound tNBT = aStack.getTagCompound(); + if (tNBT == null) { + return ""; + } + return tNBT.getString("mDataName"); + } + + public static String getDataTitle(ItemStack aStack) { + NBTTagCompound tNBT = aStack.getTagCompound(); + if (tNBT == null) { + return ""; + } + return tNBT.getString("mDataTitle"); + } + + public static NBTTagCompound setDataName(ItemStack aStack, String aDataName) { + NBTTagCompound tNBT = aStack.getTagCompound(); + if (tNBT == null) { + tNBT = new NBTTagCompound(); + } + tNBT.setString("mDataName", aDataName); + aStack.setTagCompound(tNBT); + return tNBT; + } + + public static NBTTagCompound setDataTitle(ItemStack aStack, String aDataTitle) { + NBTTagCompound tNBT = aStack.getTagCompound(); + if (tNBT == null) { + tNBT = new NBTTagCompound(); + } + tNBT.setString("mDataTitle", aDataTitle); + aStack.setTagCompound(tNBT); + return tNBT; + } + + public static ItemStack[] getNBTInventory(ItemStack aStack) { + ItemStack[] tInventory = new ItemStack[256]; + NBTTagCompound tNBT = aStack.getTagCompound(); + if (tNBT == null) { + return tInventory; + } + NBTTagList tNBT_ItemList = tNBT.getTagList("Inventory", 10); + for (int i = 0; i < tNBT_ItemList.tagCount(); i++) { + NBTTagCompound tag = tNBT_ItemList.getCompoundTagAt(i); + byte slot = tag.getByte("Slot"); + if ((slot >= 0) && (slot < tInventory.length)) { + tInventory[slot] = GT_Utility.loadItem(tag); + } + } + return tInventory; + } + + public static NBTTagCompound setNBTInventory(ItemStack aStack, ItemStack[] aInventory) { + NBTTagCompound tNBT = aStack.getTagCompound(); + if (tNBT == null) { + tNBT = new NBTTagCompound(); + } + NBTTagList tNBT_ItemList = new NBTTagList(); + for (int i = 0; i < aInventory.length; i++) { + ItemStack stack = aInventory[i]; + if (stack != null) { + NBTTagCompound tag = new NBTTagCompound(); + tag.setByte("Slot", (byte) i); + stack.writeToNBT(tag); + tNBT_ItemList.appendTag(tag); + } + } + tNBT.setTag("Inventory", tNBT_ItemList); + aStack.setTagCompound(tNBT); + return tNBT; + } + + public List<String> getAdditionalToolTips(GT_MetaBase_Item aItem, List<String> aList, ItemStack aStack) { + if (!(getDataTitle(aStack).length() == 0)) { + aList.add(getDataTitle(aStack)); + aList.add(getDataName(aStack)); + } + return aList; + } +} diff --git a/src/main/java/gregtech/common/items/behaviors/Behaviour_DataStick.java b/src/main/java/gregtech/common/items/behaviors/Behaviour_DataStick.java index 38a9f6facd..809d7f806c 100644 --- a/src/main/java/gregtech/common/items/behaviors/Behaviour_DataStick.java +++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_DataStick.java @@ -1,34 +1,34 @@ -package gregtech.common.items.behaviors;
-
-import gregtech.api.items.GT_MetaBase_Item;
-import gregtech.api.util.GT_Utility;
-import net.minecraft.item.ItemStack;
-
-import java.util.List;
-
-public class Behaviour_DataStick
- extends Behaviour_None {
- public List<String> getAdditionalToolTips(GT_MetaBase_Item aItem, List<String> aList, ItemStack aStack) {
- String tString = GT_Utility.ItemNBT.getBookTitle(aStack);
- if (GT_Utility.isStringValid(tString)) {
- aList.add(tString);
- }
- tString = GT_Utility.ItemNBT.getBookAuthor(aStack);
- if (GT_Utility.isStringValid(tString)) {
- aList.add("by " + tString);
- }
- short tMapID = GT_Utility.ItemNBT.getMapID(aStack);
- if (tMapID >= 0) {
- aList.add("Map ID: " + tMapID);
- }
- tString = GT_Utility.ItemNBT.getPunchCardData(aStack);
- if (GT_Utility.isStringValid(tString)) {
- aList.add("Punch Card Data");
- int i = 0;int j = tString.length();
- for (; i < j; i += 64) {
- aList.add(tString.substring(i, Math.min(i + 64, j)));
- }
- }
- return aList;
- }
-}
+package gregtech.common.items.behaviors; + +import gregtech.api.items.GT_MetaBase_Item; +import gregtech.api.util.GT_Utility; +import net.minecraft.item.ItemStack; + +import java.util.List; + +public class Behaviour_DataStick + extends Behaviour_None { + public List<String> getAdditionalToolTips(GT_MetaBase_Item aItem, List<String> aList, ItemStack aStack) { + String tString = GT_Utility.ItemNBT.getBookTitle(aStack); + if (GT_Utility.isStringValid(tString)) { + aList.add(tString); + } + tString = GT_Utility.ItemNBT.getBookAuthor(aStack); + if (GT_Utility.isStringValid(tString)) { + aList.add("by " + tString); + } + short tMapID = GT_Utility.ItemNBT.getMapID(aStack); + if (tMapID >= 0) { + aList.add("Map ID: " + tMapID); + } + tString = GT_Utility.ItemNBT.getPunchCardData(aStack); + if (GT_Utility.isStringValid(tString)) { + aList.add("Punch Card Data"); + int i = 0;int j = tString.length(); + for (; i < j; i += 64) { + aList.add(tString.substring(i, Math.min(i + 64, j))); + } + } + return aList; + } +} diff --git a/src/main/java/gregtech/common/items/behaviors/Behaviour_Hoe.java b/src/main/java/gregtech/common/items/behaviors/Behaviour_Hoe.java index 2f9d31c3f5..a03332057d 100644 --- a/src/main/java/gregtech/common/items/behaviors/Behaviour_Hoe.java +++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_Hoe.java @@ -1,60 +1,60 @@ -package gregtech.common.items.behaviors;
-
-import cpw.mods.fml.common.eventhandler.Event;
-import gregtech.api.items.GT_MetaBase_Item;
-import gregtech.api.items.GT_MetaGenerated_Tool;
-import gregtech.api.util.GT_LanguageManager;
-import gregtech.api.util.GT_Utility;
-import net.minecraft.block.Block;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Blocks;
-import net.minecraft.item.ItemStack;
-import net.minecraft.world.World;
-import net.minecraftforge.common.MinecraftForge;
-import net.minecraftforge.event.entity.player.UseHoeEvent;
-
-import java.util.List;
-
-public class Behaviour_Hoe
- extends Behaviour_None {
- private final int mCosts;
- private final String mTooltip = GT_LanguageManager.addStringLocalization("gt.behaviour.hoe", "Can till Dirt");
-
- public Behaviour_Hoe(int aCosts) {
- this.mCosts = aCosts;
- }
-
- public boolean onItemUse(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) {
- if (!aPlayer.canPlayerEdit(aX, aY, aZ, aSide, aStack)) {
- return false;
- }
- UseHoeEvent event = new UseHoeEvent(aPlayer, aStack, aWorld, aX, aY, aZ);
- if (MinecraftForge.EVENT_BUS.post(event)) {
- return false;
- }
- if (event.getResult() == Event.Result.ALLOW) {
- if (!aPlayer.capabilities.isCreativeMode) {
- ((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts);
- }
- return true;
- }
- Block aBlock = aWorld.getBlock(aX, aY, aZ);
- if ((aSide != 0) && (GT_Utility.isBlockAir(aWorld, aX, aY + 1, aZ)) && ((aBlock == Blocks.grass) || (aBlock == Blocks.dirt))) {
- aWorld.playSoundEffect(aX + 0.5F, aY + 0.5F, aZ + 0.5F, Blocks.farmland.stepSound.getStepResourcePath(), (Blocks.farmland.stepSound.getVolume() + 1.0F) / 2.0F, Blocks.farmland.stepSound.getPitch() * 0.8F);
- if (aWorld.isRemote) {
- return true;
- }
- aWorld.setBlock(aX, aY, aZ, Blocks.farmland);
- if (!aPlayer.capabilities.isCreativeMode) {
- ((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts);
- }
- return true;
- }
- return false;
- }
-
- public List<String> getAdditionalToolTips(GT_MetaBase_Item aItem, List<String> aList, ItemStack aStack) {
- aList.add(this.mTooltip);
- return aList;
- }
-}
+package gregtech.common.items.behaviors; + +import cpw.mods.fml.common.eventhandler.Event; +import gregtech.api.items.GT_MetaBase_Item; +import gregtech.api.items.GT_MetaGenerated_Tool; +import gregtech.api.util.GT_LanguageManager; +import gregtech.api.util.GT_Utility; +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; +import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.event.entity.player.UseHoeEvent; + +import java.util.List; + +public class Behaviour_Hoe + extends Behaviour_None { + private final int mCosts; + private final String mTooltip = GT_LanguageManager.addStringLocalization("gt.behaviour.hoe", "Can till Dirt"); + + public Behaviour_Hoe(int aCosts) { + this.mCosts = aCosts; + } + + public boolean onItemUse(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) { + if (!aPlayer.canPlayerEdit(aX, aY, aZ, aSide, aStack)) { + return false; + } + UseHoeEvent event = new UseHoeEvent(aPlayer, aStack, aWorld, aX, aY, aZ); + if (MinecraftForge.EVENT_BUS.post(event)) { + return false; + } + if (event.getResult() == Event.Result.ALLOW) { + if (!aPlayer.capabilities.isCreativeMode) { + ((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts); + } + return true; + } + Block aBlock = aWorld.getBlock(aX, aY, aZ); + if ((aSide != 0) && (GT_Utility.isBlockAir(aWorld, aX, aY + 1, aZ)) && ((aBlock == Blocks.grass) || (aBlock == Blocks.dirt))) { + aWorld.playSoundEffect(aX + 0.5F, aY + 0.5F, aZ + 0.5F, Blocks.farmland.stepSound.getStepResourcePath(), (Blocks.farmland.stepSound.getVolume() + 1.0F) / 2.0F, Blocks.farmland.stepSound.getPitch() * 0.8F); + if (aWorld.isRemote) { + return true; + } + aWorld.setBlock(aX, aY, aZ, Blocks.farmland); + if (!aPlayer.capabilities.isCreativeMode) { + ((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts); + } + return true; + } + return false; + } + + public List<String> getAdditionalToolTips(GT_MetaBase_Item aItem, List<String> aList, ItemStack aStack) { + aList.add(this.mTooltip); + return aList; + } +} diff --git a/src/main/java/gregtech/common/items/behaviors/Behaviour_Lighter.java b/src/main/java/gregtech/common/items/behaviors/Behaviour_Lighter.java index a3d192ddd2..e0559ae324 100644 --- a/src/main/java/gregtech/common/items/behaviors/Behaviour_Lighter.java +++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_Lighter.java @@ -1,120 +1,120 @@ -package gregtech.common.items.behaviors;
-
-import codechicken.lib.math.MathHelper;
-import gregtech.api.GregTech_API;
-import gregtech.api.items.GT_MetaBase_Item;
-import gregtech.api.util.GT_LanguageManager;
-import gregtech.api.util.GT_Utility;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.monster.EntityCreeper;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Blocks;
-import net.minecraft.init.Items;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.world.World;
-import net.minecraftforge.common.util.ForgeDirection;
-
-import java.util.List;
-
-public class Behaviour_Lighter
- extends Behaviour_None {
- private final ItemStack mEmptyLighter;
- private final ItemStack mUsedLighter;
- private final ItemStack mFullLighter;
- private final long mFuelAmount;
- private final String mTooltip = GT_LanguageManager.addStringLocalization("gt.behaviour.lighter.tooltip", "Can light things on Fire");
- private final String mTooltipUses = GT_LanguageManager.addStringLocalization("gt.behaviour.lighter.uses", "Remaining Uses:");
- private final String mTooltipUnstackable = GT_LanguageManager.addStringLocalization("gt.behaviour.unstackable", "Not usable when stacked!");
-
- public Behaviour_Lighter(ItemStack aEmptyLighter, ItemStack aUsedLighter, ItemStack aFullLighter, long aFuelAmount) {
- this.mFullLighter = aFullLighter;
- this.mUsedLighter = aUsedLighter;
- this.mEmptyLighter = aEmptyLighter;
- this.mFuelAmount = aFuelAmount;
- }
-
- public boolean onLeftClickEntity(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, Entity aEntity) {
- if ((aPlayer.worldObj.isRemote) || (aStack.stackSize != 1)) {
- return false;
- }
- boolean rOutput = false;
- if ((aEntity instanceof EntityCreeper)) {
- prepare(aStack);
- long tFuelAmount = GT_Utility.ItemNBT.getLighterFuel(aStack);
- if (GT_Utility.areStacksEqual(aStack, this.mUsedLighter, true)) {
- GT_Utility.sendSoundToPlayers(aPlayer.worldObj, (String) GregTech_API.sSoundList.get(Integer.valueOf(6)), 1.0F, 1.0F, MathHelper.floor_double(aEntity.posX), MathHelper.floor_double(aEntity.posY), MathHelper.floor_double(aEntity.posZ));
- ((EntityCreeper) aEntity).func_146079_cb();
- if (!aPlayer.capabilities.isCreativeMode) {
- tFuelAmount -= 1L;
- }
- rOutput = true;
- }
- GT_Utility.ItemNBT.setLighterFuel(aStack, tFuelAmount);
- if (tFuelAmount <= 0L) {
- useUp(aStack);
- }
- }
- return rOutput;
- }
-
- public boolean onItemUse(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) {
- return false;
- }
-
- public boolean onItemUseFirst(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) {
- if ((aWorld.isRemote) || (aStack.stackSize != 1)) {
- return false;
- }
- boolean rOutput = false;
-
- ForgeDirection tDirection = ForgeDirection.getOrientation(aSide);
- aX += tDirection.offsetX;
- aY += tDirection.offsetY;
- aZ += tDirection.offsetZ;
- if ((!GT_Utility.isBlockAir(aWorld, aX, aY, aZ)) || (!aPlayer.canPlayerEdit(aX, aY, aZ, aSide, aStack))) {
- return false;
- }
- prepare(aStack);
- long tFuelAmount = GT_Utility.ItemNBT.getLighterFuel(aStack);
- if (GT_Utility.areStacksEqual(aStack, this.mUsedLighter, true)) {
- GT_Utility.sendSoundToPlayers(aWorld, (String) GregTech_API.sSoundList.get(Integer.valueOf(6)), 1.0F, 1.0F, aX, aY, aZ);
- aWorld.setBlock(aX, aY, aZ, Blocks.fire);
- if (!aPlayer.capabilities.isCreativeMode) {
- tFuelAmount -= 1L;
- }
- rOutput = true;
- }
- GT_Utility.ItemNBT.setLighterFuel(aStack, tFuelAmount);
- if (tFuelAmount <= 0L) {
- useUp(aStack);
- }
- return rOutput;
- }
-
- private void prepare(ItemStack aStack) {
- if (GT_Utility.areStacksEqual(aStack, this.mFullLighter, true)) {
- aStack.func_150996_a(this.mUsedLighter.getItem());
- Items.feather.setDamage(aStack, Items.feather.getDamage(this.mUsedLighter));
- GT_Utility.ItemNBT.setLighterFuel(aStack, this.mFuelAmount);
- }
- }
-
- private void useUp(ItemStack aStack) {
- if (this.mEmptyLighter == null) {
- aStack.stackSize -= 1;
- } else {
- aStack.func_150996_a(this.mEmptyLighter.getItem());
- Items.feather.setDamage(aStack, Items.feather.getDamage(this.mEmptyLighter));
- }
- }
-
- public List<String> getAdditionalToolTips(GT_MetaBase_Item aItem, List<String> aList, ItemStack aStack) {
- aList.add(this.mTooltip);
- NBTTagCompound tNBT = aStack.getTagCompound();
- long tFuelAmount = tNBT == null ? 0L : GT_Utility.areStacksEqual(aStack, this.mFullLighter, true) ? this.mFuelAmount : tNBT.getLong("GT.LighterFuel");
- aList.add(this.mTooltipUses + " " + tFuelAmount);
- aList.add(this.mTooltipUnstackable);
- return aList;
- }
-}
+package gregtech.common.items.behaviors; + +import codechicken.lib.math.MathHelper; +import gregtech.api.GregTech_API; +import gregtech.api.items.GT_MetaBase_Item; +import gregtech.api.util.GT_LanguageManager; +import gregtech.api.util.GT_Utility; +import net.minecraft.entity.Entity; +import net.minecraft.entity.monster.EntityCreeper; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; + +import java.util.List; + +public class Behaviour_Lighter + extends Behaviour_None { + private final ItemStack mEmptyLighter; + private final ItemStack mUsedLighter; + private final ItemStack mFullLighter; + private final long mFuelAmount; + private final String mTooltip = GT_LanguageManager.addStringLocalization("gt.behaviour.lighter.tooltip", "Can light things on Fire"); + private final String mTooltipUses = GT_LanguageManager.addStringLocalization("gt.behaviour.lighter.uses", "Remaining Uses:"); + private final String mTooltipUnstackable = GT_LanguageManager.addStringLocalization("gt.behaviour.unstackable", "Not usable when stacked!"); + + public Behaviour_Lighter(ItemStack aEmptyLighter, ItemStack aUsedLighter, ItemStack aFullLighter, long aFuelAmount) { + this.mFullLighter = aFullLighter; + this.mUsedLighter = aUsedLighter; + this.mEmptyLighter = aEmptyLighter; + this.mFuelAmount = aFuelAmount; + } + + public boolean onLeftClickEntity(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, Entity aEntity) { + if ((aPlayer.worldObj.isRemote) || (aStack.stackSize != 1)) { + return false; + } + boolean rOutput = false; + if ((aEntity instanceof EntityCreeper)) { + prepare(aStack); + long tFuelAmount = GT_Utility.ItemNBT.getLighterFuel(aStack); + if (GT_Utility.areStacksEqual(aStack, this.mUsedLighter, true)) { + GT_Utility.sendSoundToPlayers(aPlayer.worldObj, (String) GregTech_API.sSoundList.get(Integer.valueOf(6)), 1.0F, 1.0F, MathHelper.floor_double(aEntity.posX), MathHelper.floor_double(aEntity.posY), MathHelper.floor_double(aEntity.posZ)); + ((EntityCreeper) aEntity).func_146079_cb(); + if (!aPlayer.capabilities.isCreativeMode) { + tFuelAmount -= 1L; + } + rOutput = true; + } + GT_Utility.ItemNBT.setLighterFuel(aStack, tFuelAmount); + if (tFuelAmount <= 0L) { + useUp(aStack); + } + } + return rOutput; + } + + public boolean onItemUse(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) { + return false; + } + + public boolean onItemUseFirst(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) { + if ((aWorld.isRemote) || (aStack.stackSize != 1)) { + return false; + } + boolean rOutput = false; + + ForgeDirection tDirection = ForgeDirection.getOrientation(aSide); + aX += tDirection.offsetX; + aY += tDirection.offsetY; + aZ += tDirection.offsetZ; + if ((!GT_Utility.isBlockAir(aWorld, aX, aY, aZ)) || (!aPlayer.canPlayerEdit(aX, aY, aZ, aSide, aStack))) { + return false; + } + prepare(aStack); + long tFuelAmount = GT_Utility.ItemNBT.getLighterFuel(aStack); + if (GT_Utility.areStacksEqual(aStack, this.mUsedLighter, true)) { + GT_Utility.sendSoundToPlayers(aWorld, (String) GregTech_API.sSoundList.get(Integer.valueOf(6)), 1.0F, 1.0F, aX, aY, aZ); + aWorld.setBlock(aX, aY, aZ, Blocks.fire); + if (!aPlayer.capabilities.isCreativeMode) { + tFuelAmount -= 1L; + } + rOutput = true; + } + GT_Utility.ItemNBT.setLighterFuel(aStack, tFuelAmount); + if (tFuelAmount <= 0L) { + useUp(aStack); + } + return rOutput; + } + + private void prepare(ItemStack aStack) { + if (GT_Utility.areStacksEqual(aStack, this.mFullLighter, true)) { + aStack.func_150996_a(this.mUsedLighter.getItem()); + Items.feather.setDamage(aStack, Items.feather.getDamage(this.mUsedLighter)); + GT_Utility.ItemNBT.setLighterFuel(aStack, this.mFuelAmount); + } + } + + private void useUp(ItemStack aStack) { + if (this.mEmptyLighter == null) { + aStack.stackSize -= 1; + } else { + aStack.func_150996_a(this.mEmptyLighter.getItem()); + Items.feather.setDamage(aStack, Items.feather.getDamage(this.mEmptyLighter)); + } + } + + public List<String> getAdditionalToolTips(GT_MetaBase_Item aItem, List<String> aList, ItemStack aStack) { + aList.add(this.mTooltip); + NBTTagCompound tNBT = aStack.getTagCompound(); + long tFuelAmount = tNBT == null ? 0L : GT_Utility.areStacksEqual(aStack, this.mFullLighter, true) ? this.mFuelAmount : tNBT.getLong("GT.LighterFuel"); + aList.add(this.mTooltipUses + " " + tFuelAmount); + aList.add(this.mTooltipUnstackable); + return aList; + } +} diff --git a/src/main/java/gregtech/common/items/behaviors/Behaviour_None.java b/src/main/java/gregtech/common/items/behaviors/Behaviour_None.java index 66ed8bb672..6e046217b0 100644 --- a/src/main/java/gregtech/common/items/behaviors/Behaviour_None.java +++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_None.java @@ -1,72 +1,72 @@ -package gregtech.common.items.behaviors;
-
-import gregtech.api.enums.SubTag;
-import gregtech.api.interfaces.IItemBehaviour;
-import gregtech.api.items.GT_MetaBase_Item;
-import net.minecraft.block.BlockDispenser;
-import net.minecraft.dispenser.BehaviorDefaultDispenseItem;
-import net.minecraft.dispenser.IBlockSource;
-import net.minecraft.dispenser.IPosition;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.entity.projectile.EntityArrow;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.EnumFacing;
-import net.minecraft.world.World;
-
-import java.util.List;
-
-public class Behaviour_None
- implements IItemBehaviour<GT_MetaBase_Item> {
- public boolean onLeftClickEntity(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, Entity aEntity) {
- return false;
- }
-
- public boolean onItemUse(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) {
- return false;
- }
-
- public boolean onItemUseFirst(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) {
- return false;
- }
-
- public ItemStack onItemRightClick(GT_MetaBase_Item aItem, ItemStack aStack, World aWorld, EntityPlayer aPlayer) {
- return aStack;
- }
-
- public List<String> getAdditionalToolTips(GT_MetaBase_Item aItem, List<String> aList, ItemStack aStack) {
- return aList;
- }
-
- public void onUpdate(GT_MetaBase_Item aItem, ItemStack aStack, World aWorld, Entity aPlayer, int aTimer, boolean aIsInHand) {
- }
-
- public boolean isItemStackUsable(GT_MetaBase_Item aItem, ItemStack aStack) {
- return true;
- }
-
- public boolean canDispense(GT_MetaBase_Item aItem, IBlockSource aSource, ItemStack aStack) {
- return false;
- }
-
- public ItemStack onDispense(GT_MetaBase_Item aItem, IBlockSource aSource, ItemStack aStack) {
- EnumFacing enumfacing = BlockDispenser.func_149937_b(aSource.getBlockMetadata());
- IPosition iposition = BlockDispenser.func_149939_a(aSource);
- ItemStack itemstack1 = aStack.splitStack(1);
- BehaviorDefaultDispenseItem.doDispense(aSource.getWorld(), itemstack1, 6, enumfacing, iposition);
- return aStack;
- }
-
- public boolean hasProjectile(GT_MetaBase_Item aItem, SubTag aProjectileType, ItemStack aStack) {
- return false;
- }
-
- public EntityArrow getProjectile(GT_MetaBase_Item aItem, SubTag aProjectileType, ItemStack aStack, World aWorld, double aX, double aY, double aZ) {
- return null;
- }
-
- public EntityArrow getProjectile(GT_MetaBase_Item aItem, SubTag aProjectileType, ItemStack aStack, World aWorld, EntityLivingBase aEntity, float aSpeed) {
- return null;
- }
-}
+package gregtech.common.items.behaviors; + +import gregtech.api.enums.SubTag; +import gregtech.api.interfaces.IItemBehaviour; +import gregtech.api.items.GT_MetaBase_Item; +import net.minecraft.block.BlockDispenser; +import net.minecraft.dispenser.BehaviorDefaultDispenseItem; +import net.minecraft.dispenser.IBlockSource; +import net.minecraft.dispenser.IPosition; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.projectile.EntityArrow; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumFacing; +import net.minecraft.world.World; + +import java.util.List; + +public class Behaviour_None + implements IItemBehaviour<GT_MetaBase_Item> { + public boolean onLeftClickEntity(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, Entity aEntity) { + return false; + } + + public boolean onItemUse(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) { + return false; + } + + public boolean onItemUseFirst(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) { + return false; + } + + public ItemStack onItemRightClick(GT_MetaBase_Item aItem, ItemStack aStack, World aWorld, EntityPlayer aPlayer) { + return aStack; + } + + public List<String> getAdditionalToolTips(GT_MetaBase_Item aItem, List<String> aList, ItemStack aStack) { + return aList; + } + + public void onUpdate(GT_MetaBase_Item aItem, ItemStack aStack, World aWorld, Entity aPlayer, int aTimer, boolean aIsInHand) { + } + + public boolean isItemStackUsable(GT_MetaBase_Item aItem, ItemStack aStack) { + return true; + } + + public boolean canDispense(GT_MetaBase_Item aItem, IBlockSource aSource, ItemStack aStack) { + return false; + } + + public ItemStack onDispense(GT_MetaBase_Item aItem, IBlockSource aSource, ItemStack aStack) { + EnumFacing enumfacing = BlockDispenser.func_149937_b(aSource.getBlockMetadata()); + IPosition iposition = BlockDispenser.func_149939_a(aSource); + ItemStack itemstack1 = aStack.splitStack(1); + BehaviorDefaultDispenseItem.doDispense(aSource.getWorld(), itemstack1, 6, enumfacing, iposition); + return aStack; + } + + public boolean hasProjectile(GT_MetaBase_Item aItem, SubTag aProjectileType, ItemStack aStack) { + return false; + } + + public EntityArrow getProjectile(GT_MetaBase_Item aItem, SubTag aProjectileType, ItemStack aStack, World aWorld, double aX, double aY, double aZ) { + return null; + } + + public EntityArrow getProjectile(GT_MetaBase_Item aItem, SubTag aProjectileType, ItemStack aStack, World aWorld, EntityLivingBase aEntity, float aSpeed) { + return null; + } +} diff --git a/src/main/java/gregtech/common/items/behaviors/Behaviour_Plunger_Essentia.java b/src/main/java/gregtech/common/items/behaviors/Behaviour_Plunger_Essentia.java index f546a82379..ef364b4cdc 100644 --- a/src/main/java/gregtech/common/items/behaviors/Behaviour_Plunger_Essentia.java +++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_Plunger_Essentia.java @@ -1,46 +1,46 @@ -package gregtech.common.items.behaviors;
-
-import gregtech.api.GregTech_API;
-import gregtech.api.items.GT_MetaBase_Item;
-import gregtech.api.items.GT_MetaGenerated_Tool;
-import gregtech.api.util.GT_LanguageManager;
-import gregtech.api.util.GT_Utility;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.world.World;
-import net.minecraftforge.common.util.ForgeDirection;
-import thaumcraft.api.aspects.IEssentiaTransport;
-
-import java.util.List;
-
-public class Behaviour_Plunger_Essentia
- extends Behaviour_None {
- private final int mCosts;
- private final String mTooltip = GT_LanguageManager.addStringLocalization("gt.behaviour.plunger.essentia", "Clears Essentia from Containers and Tubes");
-
- public Behaviour_Plunger_Essentia(int aCosts) {
- this.mCosts = aCosts;
- }
-
- public boolean onItemUseFirst(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) {
- if (aWorld.isRemote) {
- return false;
- }
- TileEntity aTileEntity = aWorld.getTileEntity(aX, aY, aZ);
- if (((aTileEntity instanceof IEssentiaTransport)) && (
- (aPlayer.capabilities.isCreativeMode) || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts)))) {
- GT_Utility.sendSoundToPlayers(aWorld, (String) GregTech_API.sSoundList.get(Integer.valueOf(101)), 1.0F, -1.0F, aX, aY, aZ);
- for (ForgeDirection tDirection : ForgeDirection.VALID_DIRECTIONS) {
- ((IEssentiaTransport) aTileEntity).takeEssentia(((IEssentiaTransport) aTileEntity).getEssentiaType(tDirection), ((IEssentiaTransport) aTileEntity).getEssentiaAmount(tDirection), tDirection);
- }
- return true;
- }
- return false;
- }
-
- public List<String> getAdditionalToolTips(GT_MetaBase_Item aItem, List<String> aList, ItemStack aStack) {
- aList.add(this.mTooltip);
- return aList;
- }
-}
+package gregtech.common.items.behaviors; + +import gregtech.api.GregTech_API; +import gregtech.api.items.GT_MetaBase_Item; +import gregtech.api.items.GT_MetaGenerated_Tool; +import gregtech.api.util.GT_LanguageManager; +import gregtech.api.util.GT_Utility; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; +import thaumcraft.api.aspects.IEssentiaTransport; + +import java.util.List; + +public class Behaviour_Plunger_Essentia + extends Behaviour_None { + private final int mCosts; + private final String mTooltip = GT_LanguageManager.addStringLocalization("gt.behaviour.plunger.essentia", "Clears Essentia from Containers and Tubes"); + + public Behaviour_Plunger_Essentia(int aCosts) { + this.mCosts = aCosts; + } + + public boolean onItemUseFirst(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) { + if (aWorld.isRemote) { + return false; + } + TileEntity aTileEntity = aWorld.getTileEntity(aX, aY, aZ); + if (((aTileEntity instanceof IEssentiaTransport)) && ( + (aPlayer.capabilities.isCreativeMode) || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts)))) { + GT_Utility.sendSoundToPlayers(aWorld, (String) GregTech_API.sSoundList.get(Integer.valueOf(101)), 1.0F, -1.0F, aX, aY, aZ); + for (ForgeDirection tDirection : ForgeDirection.VALID_DIRECTIONS) { + ((IEssentiaTransport) aTileEntity).takeEssentia(((IEssentiaTransport) aTileEntity).getEssentiaType(tDirection), ((IEssentiaTransport) aTileEntity).getEssentiaAmount(tDirection), tDirection); + } + return true; + } + return false; + } + + public List<String> getAdditionalToolTips(GT_MetaBase_Item aItem, List<String> aList, ItemStack aStack) { + aList.add(this.mTooltip); + return aList; + } +} diff --git a/src/main/java/gregtech/common/items/behaviors/Behaviour_PrintedPages.java b/src/main/java/gregtech/common/items/behaviors/Behaviour_PrintedPages.java index e6f6fec484..287ebedd33 100644 --- a/src/main/java/gregtech/common/items/behaviors/Behaviour_PrintedPages.java +++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_PrintedPages.java @@ -1,37 +1,37 @@ -package gregtech.common.items.behaviors;
-
-import gregtech.api.items.GT_MetaBase_Item;
-import gregtech.api.util.GT_Utility;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-
-import java.util.List;
-
-public class Behaviour_PrintedPages
- extends Behaviour_None {
- public static String getTitle(ItemStack aStack) {
- NBTTagCompound tNBT = aStack.getTagCompound();
- if (tNBT == null) {
- return "";
- }
- return tNBT.getString("title");
- }
-
- public static String getAuthor(ItemStack aStack) {
- NBTTagCompound tNBT = aStack.getTagCompound();
- if (tNBT == null) {
- return "";
- }
- return tNBT.getString("author");
- }
-
- public List<String> getAdditionalToolTips(GT_MetaBase_Item aItem, List<String> aList, ItemStack aStack) {
- if (GT_Utility.isStringValid(getTitle(aStack))) {
- aList.add(getTitle(aStack));
- }
- if (GT_Utility.isStringValid(getAuthor(aStack))) {
- aList.add("by " + getAuthor(aStack));
- }
- return aList;
- }
-}
+package gregtech.common.items.behaviors; + +import gregtech.api.items.GT_MetaBase_Item; +import gregtech.api.util.GT_Utility; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; + +import java.util.List; + +public class Behaviour_PrintedPages + extends Behaviour_None { + public static String getTitle(ItemStack aStack) { + NBTTagCompound tNBT = aStack.getTagCompound(); + if (tNBT == null) { + return ""; + } + return tNBT.getString("title"); + } + + public static String getAuthor(ItemStack aStack) { + NBTTagCompound tNBT = aStack.getTagCompound(); + if (tNBT == null) { + return ""; + } + return tNBT.getString("author"); + } + + public List<String> getAdditionalToolTips(GT_MetaBase_Item aItem, List<String> aList, ItemStack aStack) { + if (GT_Utility.isStringValid(getTitle(aStack))) { + aList.add(getTitle(aStack)); + } + if (GT_Utility.isStringValid(getAuthor(aStack))) { + aList.add("by " + getAuthor(aStack)); + } + return aList; + } +} diff --git a/src/main/java/gregtech/common/items/behaviors/Behaviour_Prospecting.java b/src/main/java/gregtech/common/items/behaviors/Behaviour_Prospecting.java index c950cc8fe1..4dcdf2696b 100644 --- a/src/main/java/gregtech/common/items/behaviors/Behaviour_Prospecting.java +++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_Prospecting.java @@ -1,127 +1,127 @@ -package gregtech.common.items.behaviors;
-
-import gregtech.api.GregTech_API;
-import gregtech.api.enums.Materials;
-import gregtech.api.items.GT_MetaBase_Item;
-import gregtech.api.items.GT_MetaGenerated_Tool;
-import gregtech.api.objects.ItemData;
-import gregtech.api.objects.XSTR;
-import gregtech.api.util.GT_LanguageManager;
-import gregtech.api.util.GT_ModHandler;
-import gregtech.api.util.GT_OreDictUnificator;
-import gregtech.api.util.GT_Utility;
-import gregtech.common.blocks.GT_Block_Ores_Abstract;
-import gregtech.common.blocks.GT_TileEntity_Ores;
-import net.minecraft.block.Block;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Blocks;
-import net.minecraft.item.ItemStack;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.world.World;
-import net.minecraftforge.common.util.ForgeDirection;
-import net.minecraftforge.fluids.IFluidBlock;
-
-import java.util.List;
-import java.util.Random;
-
-public class Behaviour_Prospecting
- extends Behaviour_None {
- private final int mVanillaCosts;
- private final int mEUCosts;
- private final String mTooltip = GT_LanguageManager.addStringLocalization("gt.behaviour.prospecting", "Usable for Prospecting");
-
- public Behaviour_Prospecting(int aVanillaCosts, int aEUCosts) {
- this.mVanillaCosts = aVanillaCosts;
- this.mEUCosts = aEUCosts;
- }
-
- public boolean onItemUseFirst(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) {
- if (aWorld.isRemote) {
- return false;
- }
- Block aBlock = aWorld.getBlock(aX, aY, aZ);
- if (aBlock == null) {
- return false;
- }
- byte aMeta = (byte) aWorld.getBlockMetadata(aX, aY, aZ);
-
-
- ItemData tAssotiation = GT_OreDictUnificator.getAssociation(new ItemStack(aBlock, 1, aMeta));
- if ((tAssotiation != null) && (tAssotiation.mPrefix.toString().startsWith("ore"))) {
- GT_Utility.sendChatToPlayer(aPlayer, "This is " + tAssotiation.mMaterial.mMaterial.mDefaultLocalName + " Ore.");
- GT_Utility.sendSoundToPlayers(aWorld, (String) GregTech_API.sSoundList.get(Integer.valueOf(1)), 1.0F, -1.0F, aX, aY, aZ);
- return true;
- }
- if ((aBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.stone)) || (aBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, GregTech_API.sBlockGranites)) || (aBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.netherrack)) || (aBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.end_stone))) {
- if (GT_ModHandler.damageOrDechargeItem(aStack, this.mVanillaCosts, this.mEUCosts, aPlayer)) {
- GT_Utility.sendSoundToPlayers(aWorld, (String) GregTech_API.sSoundList.get(Integer.valueOf(1)), 1.0F, -1.0F, aX, aY, aZ);
- int tX = aX;
- int tY = aY;
- int tZ = aZ;
- int tMetaID = 0;
- int tQuality = (aItem instanceof GT_MetaGenerated_Tool) ? ((GT_MetaGenerated_Tool) aItem).getHarvestLevel(aStack, "") : 0;
-
- int i = 0;
- for (int j = 6 + tQuality; i < j; i++) {
- tX -= ForgeDirection.getOrientation(aSide).offsetX;
- tY -= ForgeDirection.getOrientation(aSide).offsetY;
- tZ -= ForgeDirection.getOrientation(aSide).offsetZ;
-
- Block tBlock = aWorld.getBlock(tX, tY, tZ);
- if ((tBlock == Blocks.lava) || (tBlock == Blocks.flowing_lava)) {
- GT_Utility.sendChatToPlayer(aPlayer, "There is Lava behind this Rock.");
- break;
- }
- if ((tBlock == Blocks.water) || (tBlock == Blocks.flowing_water) || ((tBlock instanceof IFluidBlock))) {
- GT_Utility.sendChatToPlayer(aPlayer, "There is a Liquid behind this Rock.");
- break;
- }
- if ((tBlock == Blocks.monster_egg) || (!GT_Utility.hasBlockHitBox(aWorld, tX, tY, tZ))) {
- GT_Utility.sendChatToPlayer(aPlayer, "There is an Air Pocket behind this Rock.");
- break;
- }
- if (tBlock != aBlock) {
- if (i >= 4) {
- break;
- }
- GT_Utility.sendChatToPlayer(aPlayer, "Material is changing behind this Rock.");
- break;
- }
- }
- Random tRandom = new XSTR(aX ^ aY ^ aZ ^ aSide);
- i = 0;
- for (int j = 9 + 2 * tQuality; i < j; i++) {
- tX = aX - 4 - tQuality + tRandom.nextInt(j);
- tY = aY - 4 - tQuality + tRandom.nextInt(j);
- tZ = aZ - 4 - tQuality + tRandom.nextInt(j);
- Block tBlock = aWorld.getBlock(tX, tY, tZ);
- if ((tBlock instanceof GT_Block_Ores_Abstract)) {
- TileEntity tTileEntity = aWorld.getTileEntity(tX, tY, tZ);
- if ((tTileEntity instanceof GT_TileEntity_Ores)) {
- Materials tMaterial = GregTech_API.sGeneratedMaterials[(((GT_TileEntity_Ores) tTileEntity).mMetaData % 1000)];
- if ((tMaterial != null) && (tMaterial != Materials._NULL)) {
- GT_Utility.sendChatToPlayer(aPlayer, "Found traces of " + tMaterial.mDefaultLocalName + " Ore.");
- return true;
- }
- }
- } else {
- tMetaID = aWorld.getBlockMetadata(tX, tY, tZ);
- tAssotiation = GT_OreDictUnificator.getAssociation(new ItemStack(tBlock, 1, tMetaID));
- if ((tAssotiation != null) && (tAssotiation.mPrefix.toString().startsWith("ore"))) {
- GT_Utility.sendChatToPlayer(aPlayer, "Found traces of " + tAssotiation.mMaterial.mMaterial.mDefaultLocalName + " Ore.");
- return true;
- }
- }
- }
- GT_Utility.sendChatToPlayer(aPlayer, "No Ores found.");
- }
- return true;
- }
- return false;
- }
-
- public List<String> getAdditionalToolTips(GT_MetaBase_Item aItem, List<String> aList, ItemStack aStack) {
- aList.add(this.mTooltip);
- return aList;
- }
-}
+package gregtech.common.items.behaviors; + +import gregtech.api.GregTech_API; +import gregtech.api.enums.Materials; +import gregtech.api.items.GT_MetaBase_Item; +import gregtech.api.items.GT_MetaGenerated_Tool; +import gregtech.api.objects.ItemData; +import gregtech.api.objects.XSTR; +import gregtech.api.util.GT_LanguageManager; +import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_OreDictUnificator; +import gregtech.api.util.GT_Utility; +import gregtech.common.blocks.GT_Block_Ores_Abstract; +import gregtech.common.blocks.GT_TileEntity_Ores; +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.IFluidBlock; + +import java.util.List; +import java.util.Random; + +public class Behaviour_Prospecting + extends Behaviour_None { + private final int mVanillaCosts; + private final int mEUCosts; + private final String mTooltip = GT_LanguageManager.addStringLocalization("gt.behaviour.prospecting", "Usable for Prospecting"); + + public Behaviour_Prospecting(int aVanillaCosts, int aEUCosts) { + this.mVanillaCosts = aVanillaCosts; + this.mEUCosts = aEUCosts; + } + + public boolean onItemUseFirst(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) { + if (aWorld.isRemote) { + return false; + } + Block aBlock = aWorld.getBlock(aX, aY, aZ); + if (aBlock == null) { + return false; + } + byte aMeta = (byte) aWorld.getBlockMetadata(aX, aY, aZ); + + + ItemData tAssotiation = GT_OreDictUnificator.getAssociation(new ItemStack(aBlock, 1, aMeta)); + if ((tAssotiation != null) && (tAssotiation.mPrefix.toString().startsWith("ore"))) { + GT_Utility.sendChatToPlayer(aPlayer, "This is " + tAssotiation.mMaterial.mMaterial.mDefaultLocalName + " Ore."); + GT_Utility.sendSoundToPlayers(aWorld, (String) GregTech_API.sSoundList.get(Integer.valueOf(1)), 1.0F, -1.0F, aX, aY, aZ); + return true; + } + if ((aBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.stone)) || (aBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, GregTech_API.sBlockGranites)) || (aBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.netherrack)) || (aBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.end_stone))) { + if (GT_ModHandler.damageOrDechargeItem(aStack, this.mVanillaCosts, this.mEUCosts, aPlayer)) { + GT_Utility.sendSoundToPlayers(aWorld, (String) GregTech_API.sSoundList.get(Integer.valueOf(1)), 1.0F, -1.0F, aX, aY, aZ); + int tX = aX; + int tY = aY; + int tZ = aZ; + int tMetaID = 0; + int tQuality = (aItem instanceof GT_MetaGenerated_Tool) ? ((GT_MetaGenerated_Tool) aItem).getHarvestLevel(aStack, "") : 0; + + int i = 0; + for (int j = 6 + tQuality; i < j; i++) { + tX -= ForgeDirection.getOrientation(aSide).offsetX; + tY -= ForgeDirection.getOrientation(aSide).offsetY; + tZ -= ForgeDirection.getOrientation(aSide).offsetZ; + + Block tBlock = aWorld.getBlock(tX, tY, tZ); + if ((tBlock == Blocks.lava) || (tBlock == Blocks.flowing_lava)) { + GT_Utility.sendChatToPlayer(aPlayer, "There is Lava behind this Rock."); + break; + } + if ((tBlock == Blocks.water) || (tBlock == Blocks.flowing_water) || ((tBlock instanceof IFluidBlock))) { + GT_Utility.sendChatToPlayer(aPlayer, "There is a Liquid behind this Rock."); + break; + } + if ((tBlock == Blocks.monster_egg) || (!GT_Utility.hasBlockHitBox(aWorld, tX, tY, tZ))) { + GT_Utility.sendChatToPlayer(aPlayer, "There is an Air Pocket behind this Rock."); + break; + } + if (tBlock != aBlock) { + if (i >= 4) { + break; + } + GT_Utility.sendChatToPlayer(aPlayer, "Material is changing behind this Rock."); + break; + } + } + Random tRandom = new XSTR(aX ^ aY ^ aZ ^ aSide); + i = 0; + for (int j = 9 + 2 * tQuality; i < j; i++) { + tX = aX - 4 - tQuality + tRandom.nextInt(j); + tY = aY - 4 - tQuality + tRandom.nextInt(j); + tZ = aZ - 4 - tQuality + tRandom.nextInt(j); + Block tBlock = aWorld.getBlock(tX, tY, tZ); + if ((tBlock instanceof GT_Block_Ores_Abstract)) { + TileEntity tTileEntity = aWorld.getTileEntity(tX, tY, tZ); + if ((tTileEntity instanceof GT_TileEntity_Ores)) { + Materials tMaterial = GregTech_API.sGeneratedMaterials[(((GT_TileEntity_Ores) tTileEntity).mMetaData % 1000)]; + if ((tMaterial != null) && (tMaterial != Materials._NULL)) { + GT_Utility.sendChatToPlayer(aPlayer, "Found traces of " + tMaterial.mDefaultLocalName + " Ore."); + return true; + } + } + } else { + tMetaID = aWorld.getBlockMetadata(tX, tY, tZ); + tAssotiation = GT_OreDictUnificator.getAssociation(new ItemStack(tBlock, 1, tMetaID)); + if ((tAssotiation != null) && (tAssotiation.mPrefix.toString().startsWith("ore"))) { + GT_Utility.sendChatToPlayer(aPlayer, "Found traces of " + tAssotiation.mMaterial.mMaterial.mDefaultLocalName + " Ore."); + return true; + } + } + } + GT_Utility.sendChatToPlayer(aPlayer, "No Ores found."); + } + return true; + } + return false; + } + + public List<String> getAdditionalToolTips(GT_MetaBase_Item aItem, List<String> aList, ItemStack aStack) { + aList.add(this.mTooltip); + return aList; + } +} diff --git a/src/main/java/gregtech/common/items/behaviors/Behaviour_Scanner.java b/src/main/java/gregtech/common/items/behaviors/Behaviour_Scanner.java index 187027a563..02dafe640e 100644 --- a/src/main/java/gregtech/common/items/behaviors/Behaviour_Scanner.java +++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_Scanner.java @@ -1,40 +1,63 @@ -package gregtech.common.items.behaviors;
-
-import gregtech.api.GregTech_API;
-import gregtech.api.interfaces.IItemBehaviour;
-import gregtech.api.items.GT_MetaBase_Item;
-import gregtech.api.util.GT_LanguageManager;
-import gregtech.api.util.GT_Utility;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.entity.player.EntityPlayerMP;
-import net.minecraft.item.ItemStack;
-import net.minecraft.world.World;
-
-import java.util.ArrayList;
-import java.util.List;
-
-public class Behaviour_Scanner
- extends Behaviour_None {
- public static final IItemBehaviour<GT_MetaBase_Item> INSTANCE = new Behaviour_Scanner();
- private final String mTooltip = GT_LanguageManager.addStringLocalization("gt.behaviour.scanning", "Can scan Blocks in World");
-
- public boolean onItemUseFirst(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) {
- if (((aPlayer instanceof EntityPlayerMP)) && (aItem.canUse(aStack, 20000.0D))) {
- ArrayList<String> tList = new ArrayList();
- if (aItem.use(aStack, GT_Utility.getCoordinateScan(tList, aPlayer, aWorld, 1, aX, aY, aZ, aSide, hitX, hitY, hitZ), aPlayer)) {
- int tList_sS=tList.size();
- for (int i = 0; i < tList_sS; i++) {
- GT_Utility.sendChatToPlayer(aPlayer, (String) tList.get(i));
- }
- }
- return true;
- }
- GT_Utility.doSoundAtClient((String) GregTech_API.sSoundList.get(Integer.valueOf(108)), 1, 1.0F, aX, aY, aZ);
- return aPlayer instanceof EntityPlayerMP;
- }
-
- public List<String> getAdditionalToolTips(GT_MetaBase_Item aItem, List<String> aList, ItemStack aStack) {
- aList.add(this.mTooltip);
- return aList;
- }
-}
+package gregtech.common.items.behaviors; + +import gregtech.api.GregTech_API; +import gregtech.api.interfaces.IItemBehaviour; +import gregtech.api.items.GT_MetaBase_Item; +import gregtech.api.util.GT_LanguageManager; +import gregtech.api.util.GT_Utility; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.world.World; + +import java.util.ArrayList; +import java.util.List; + +public class Behaviour_Scanner + extends Behaviour_None { + public static final IItemBehaviour<GT_MetaBase_Item> INSTANCE = new Behaviour_Scanner(); + private final String mTooltip = GT_LanguageManager.addStringLocalization("gt.behaviour.scanning", "Can scan Blocks in World"); + + public boolean onItemUseFirst(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) { + NBTTagCompound tNBT = aStack.getTagCompound(); + if (((aPlayer instanceof EntityPlayerMP)) && (aItem.canUse(aStack, 20000.0D))) { + ArrayList<String> tList = new ArrayList(); + if (aItem.use(aStack, GT_Utility.getCoordinateScan(tList, aPlayer, aWorld, 1, aX, aY, aZ, aSide, hitX, hitY, hitZ), aPlayer)) { + int tList_sS=tList.size(); + tNBT.setInteger("dataLinesCount",tList_sS); + for (int i = 0; i < tList_sS; i++) { + tNBT.setString("dataLines"+Integer.toString(i),(String) tList.get(i)); + GT_Utility.sendChatToPlayer(aPlayer, (String) tList.get(i)); + } + } + return true; + } + GT_Utility.doSoundAtClient((String) GregTech_API.sSoundList.get(Integer.valueOf(108)), 1, 1.0F, aX, aY, aZ); + //doGuiAtClient() + return aPlayer instanceof EntityPlayerMP; + } + + public List<String> getAdditionalToolTips(GT_MetaBase_Item aItem, List<String> aList, ItemStack aStack) { + try { + NBTTagCompound tNBT = aStack.getTagCompound(); + int lines = tNBT.getInteger("dataLinesCount"); + if(lines<1) throw new Exception(); + aList.add(EnumChatFormatting.BLUE+"Block scan data result:"); + for (int i = 0; i < lines; i++) { + aList.add(EnumChatFormatting.RESET+tNBT.getString("dataLines" + Integer.toString(i))); + } + }catch(Exception e){ + aList.add(this.mTooltip); + } + return aList; + } + + //public static boolean doGuiAtClient() { + // if (!FMLCommonHandler.instance().getEffectiveSide().isClient() || GT.getThePlayer() == null || !GT.getThePlayer().worldObj.isRemote) + // return false; + // //GUI render start HERE + // return true; + //} +} diff --git a/src/main/java/gregtech/common/items/behaviors/Behaviour_Scoop.java b/src/main/java/gregtech/common/items/behaviors/Behaviour_Scoop.java index 926703cbc9..8d36168374 100644 --- a/src/main/java/gregtech/common/items/behaviors/Behaviour_Scoop.java +++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_Scoop.java @@ -1,45 +1,45 @@ -package gregtech.common.items.behaviors;
-
-import forestry.api.lepidopterology.EnumFlutterType;
-import forestry.api.lepidopterology.IButterfly;
-import forestry.api.lepidopterology.IEntityButterfly;
-import gregtech.api.items.GT_MetaBase_Item;
-import gregtech.api.items.GT_MetaGenerated_Tool;
-import gregtech.api.util.GT_LanguageManager;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.item.EntityItem;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-
-import java.util.List;
-
-public class Behaviour_Scoop
- extends Behaviour_None {
- private final int mCosts;
- private final String mTooltip = GT_LanguageManager.addStringLocalization("gt.behaviour.scoop", "Catches Butterflies on Leftclick");
-
- public Behaviour_Scoop(int aCosts) {
- this.mCosts = aCosts;
- }
-
- public boolean onLeftClickEntity(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, Entity aEntity) {
- if ((aEntity instanceof IEntityButterfly)) {
- if (aPlayer.worldObj.isRemote) {
- return true;
- }
- if ((aPlayer.capabilities.isCreativeMode) || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) {
- Object tButterfly = ((IEntityButterfly) aEntity).getButterfly();
- ((IButterfly) tButterfly).getGenome().getPrimary().getRoot().getBreedingTracker(aEntity.worldObj, aPlayer.getGameProfile()).registerCatch((IButterfly) tButterfly);
- aPlayer.worldObj.spawnEntityInWorld(new EntityItem(aPlayer.worldObj, aEntity.posX, aEntity.posY, aEntity.posZ, ((IButterfly) tButterfly).getGenome().getPrimary().getRoot().getMemberStack(((IButterfly) tButterfly).copy(), EnumFlutterType.BUTTERFLY.ordinal())));
- aEntity.setDead();
- }
- return true;
- }
- return false;
- }
-
- public List<String> getAdditionalToolTips(GT_MetaBase_Item aItem, List<String> aList, ItemStack aStack) {
- aList.add(this.mTooltip);
- return aList;
- }
-}
+package gregtech.common.items.behaviors; + +import forestry.api.lepidopterology.EnumFlutterType; +import forestry.api.lepidopterology.IButterfly; +import forestry.api.lepidopterology.IEntityButterfly; +import gregtech.api.items.GT_MetaBase_Item; +import gregtech.api.items.GT_MetaGenerated_Tool; +import gregtech.api.util.GT_LanguageManager; +import net.minecraft.entity.Entity; +import net.minecraft.entity.item.EntityItem; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; + +import java.util.List; + +public class Behaviour_Scoop + extends Behaviour_None { + private final int mCosts; + private final String mTooltip = GT_LanguageManager.addStringLocalization("gt.behaviour.scoop", "Catches Butterflies on Leftclick"); + + public Behaviour_Scoop(int aCosts) { + this.mCosts = aCosts; + } + + public boolean onLeftClickEntity(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, Entity aEntity) { + if ((aEntity instanceof IEntityButterfly)) { + if (aPlayer.worldObj.isRemote) { + return true; + } + if ((aPlayer.capabilities.isCreativeMode) || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) { + Object tButterfly = ((IEntityButterfly) aEntity).getButterfly(); + ((IButterfly) tButterfly).getGenome().getPrimary().getRoot().getBreedingTracker(aEntity.worldObj, aPlayer.getGameProfile()).registerCatch((IButterfly) tButterfly); + aPlayer.worldObj.spawnEntityInWorld(new EntityItem(aPlayer.worldObj, aEntity.posX, aEntity.posY, aEntity.posZ, ((IButterfly) tButterfly).getGenome().getPrimary().getRoot().getMemberStack(((IButterfly) tButterfly).copy(), EnumFlutterType.BUTTERFLY.ordinal()))); + aEntity.setDead(); + } + return true; + } + return false; + } + + public List<String> getAdditionalToolTips(GT_MetaBase_Item aItem, List<String> aList, ItemStack aStack) { + aList.add(this.mTooltip); + return aList; + } +} diff --git a/src/main/java/gregtech/common/items/behaviors/Behaviour_Screwdriver.java b/src/main/java/gregtech/common/items/behaviors/Behaviour_Screwdriver.java index 59bf68aa77..ea548f2106 100644 --- a/src/main/java/gregtech/common/items/behaviors/Behaviour_Screwdriver.java +++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_Screwdriver.java @@ -1,48 +1,48 @@ -package gregtech.common.items.behaviors;
-
-import gregtech.api.GregTech_API;
-import gregtech.api.items.GT_MetaBase_Item;
-import gregtech.api.util.GT_ModHandler;
-import gregtech.api.util.GT_Utility;
-import net.minecraft.block.Block;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Blocks;
-import net.minecraft.item.ItemStack;
-import net.minecraft.world.World;
-
-public class Behaviour_Screwdriver
- extends Behaviour_None {
- private final int mVanillaCosts;
- private final int mEUCosts;
-
- public Behaviour_Screwdriver(int aVanillaCosts, int aEUCosts) {
- this.mVanillaCosts = aVanillaCosts;
- this.mEUCosts = aEUCosts;
- }
-
- public boolean onItemUseFirst(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) {
- if (aWorld.isRemote) {
- return false;
- }
- Block aBlock = aWorld.getBlock(aX, aY, aZ);
- if (aBlock == null) {
- return false;
- }
- byte aMeta = (byte) aWorld.getBlockMetadata(aX, aY, aZ);
- if ((aBlock == Blocks.unpowered_repeater) || (aBlock == Blocks.powered_repeater)) {
- if (GT_ModHandler.damageOrDechargeItem(aStack, this.mVanillaCosts, this.mEUCosts, aPlayer)) {
- aWorld.setBlockMetadataWithNotify(aX, aY, aZ, aMeta / 4 * 4 + (aMeta % 4 + 1) % 4, 3);
- GT_Utility.sendSoundToPlayers(aWorld, (String) GregTech_API.sSoundList.get(Integer.valueOf(100)), 1.0F, -1.0F, aX, aY, aZ);
- }
- return true;
- }
- if ((aBlock == Blocks.unpowered_comparator) || (aBlock == Blocks.powered_comparator)) {
- if (GT_ModHandler.damageOrDechargeItem(aStack, this.mVanillaCosts, this.mEUCosts, aPlayer)) {
- aWorld.setBlockMetadataWithNotify(aX, aY, aZ, aMeta / 4 * 4 + (aMeta % 4 + 1) % 4, 3);
- GT_Utility.sendSoundToPlayers(aWorld, (String) GregTech_API.sSoundList.get(Integer.valueOf(100)), 1.0F, -1.0F, aX, aY, aZ);
- }
- return true;
- }
- return false;
- }
-}
+package gregtech.common.items.behaviors; + +import gregtech.api.GregTech_API; +import gregtech.api.items.GT_MetaBase_Item; +import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_Utility; +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; + +public class Behaviour_Screwdriver + extends Behaviour_None { + private final int mVanillaCosts; + private final int mEUCosts; + + public Behaviour_Screwdriver(int aVanillaCosts, int aEUCosts) { + this.mVanillaCosts = aVanillaCosts; + this.mEUCosts = aEUCosts; + } + + public boolean onItemUseFirst(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) { + if (aWorld.isRemote) { + return false; + } + Block aBlock = aWorld.getBlock(aX, aY, aZ); + if (aBlock == null) { + return false; + } + byte aMeta = (byte) aWorld.getBlockMetadata(aX, aY, aZ); + if ((aBlock == Blocks.unpowered_repeater) || (aBlock == Blocks.powered_repeater)) { + if (GT_ModHandler.damageOrDechargeItem(aStack, this.mVanillaCosts, this.mEUCosts, aPlayer)) { + aWorld.setBlockMetadataWithNotify(aX, aY, aZ, aMeta / 4 * 4 + (aMeta % 4 + 1) % 4, 3); + GT_Utility.sendSoundToPlayers(aWorld, (String) GregTech_API.sSoundList.get(Integer.valueOf(100)), 1.0F, -1.0F, aX, aY, aZ); + } + return true; + } + if ((aBlock == Blocks.unpowered_comparator) || (aBlock == Blocks.powered_comparator)) { + if (GT_ModHandler.damageOrDechargeItem(aStack, this.mVanillaCosts, this.mEUCosts, aPlayer)) { + aWorld.setBlockMetadataWithNotify(aX, aY, aZ, aMeta / 4 * 4 + (aMeta % 4 + 1) % 4, 3); + GT_Utility.sendSoundToPlayers(aWorld, (String) GregTech_API.sSoundList.get(Integer.valueOf(100)), 1.0F, -1.0F, aX, aY, aZ); + } + return true; + } + return false; + } +} diff --git a/src/main/java/gregtech/common/items/behaviors/Behaviour_SensorKit.java b/src/main/java/gregtech/common/items/behaviors/Behaviour_SensorKit.java index 525d023a35..bcbe985cdb 100644 --- a/src/main/java/gregtech/common/items/behaviors/Behaviour_SensorKit.java +++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_SensorKit.java @@ -1,48 +1,48 @@ -package gregtech.common.items.behaviors;
-
-import gregtech.api.enums.ItemList;
-import gregtech.api.interfaces.tileentity.IGregTechDeviceInformation;
-import gregtech.api.items.GT_MetaBase_Item;
-import gregtech.api.util.GT_LanguageManager;
-import gregtech.api.util.GT_Utility;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.entity.player.EntityPlayerMP;
-import net.minecraft.inventory.IInventory;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.world.World;
-
-import java.util.List;
-
-public class Behaviour_SensorKit
- extends Behaviour_None {
- private final String mTooltip = GT_LanguageManager.addStringLocalization("gt.behaviour.sensorkit.tooltip", "Used to display Information using the Mod Nuclear Control");
-
- public boolean onItemUseFirst(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) {
- if ((aPlayer instanceof EntityPlayerMP)) {
- TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ);
- if (((tTileEntity instanceof IInventory)) && (!((IInventory) tTileEntity).isUseableByPlayer(aPlayer))) {
- return false;
- }
- if (((tTileEntity instanceof IGregTechDeviceInformation)) && (((IGregTechDeviceInformation) tTileEntity).isGivingInformation())) {
- GT_Utility.setStack(aStack, ItemList.NC_SensorCard.get(aStack.stackSize, new Object[0]));
- NBTTagCompound tNBT = aStack.getTagCompound();
- if (tNBT == null) {
- tNBT = new NBTTagCompound();
- }
- tNBT.setInteger("x", aX);
- tNBT.setInteger("y", aY);
- tNBT.setInteger("z", aZ);
- aStack.setTagCompound(tNBT);
- }
- return true;
- }
- return false;
- }
-
- public List<String> getAdditionalToolTips(GT_MetaBase_Item aItem, List<String> aList, ItemStack aStack) {
- aList.add(this.mTooltip);
- return aList;
- }
-}
+package gregtech.common.items.behaviors; + +import gregtech.api.enums.ItemList; +import gregtech.api.interfaces.tileentity.IGregTechDeviceInformation; +import gregtech.api.items.GT_MetaBase_Item; +import gregtech.api.util.GT_LanguageManager; +import gregtech.api.util.GT_Utility; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.inventory.IInventory; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; + +import java.util.List; + +public class Behaviour_SensorKit + extends Behaviour_None { + private final String mTooltip = GT_LanguageManager.addStringLocalization("gt.behaviour.sensorkit.tooltip", "Used to display Information using the Mod Nuclear Control"); + + public boolean onItemUseFirst(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) { + if ((aPlayer instanceof EntityPlayerMP)) { + TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); + if (((tTileEntity instanceof IInventory)) && (!((IInventory) tTileEntity).isUseableByPlayer(aPlayer))) { + return false; + } + if (((tTileEntity instanceof IGregTechDeviceInformation)) && (((IGregTechDeviceInformation) tTileEntity).isGivingInformation())) { + GT_Utility.setStack(aStack, ItemList.NC_SensorCard.get(aStack.stackSize, new Object[0])); + NBTTagCompound tNBT = aStack.getTagCompound(); + if (tNBT == null) { + tNBT = new NBTTagCompound(); + } + tNBT.setInteger("x", aX); + tNBT.setInteger("y", aY); + tNBT.setInteger("z", aZ); + aStack.setTagCompound(tNBT); + } + return true; + } + return false; + } + + public List<String> getAdditionalToolTips(GT_MetaBase_Item aItem, List<String> aList, ItemStack aStack) { + aList.add(this.mTooltip); + return aList; + } +} diff --git a/src/main/java/gregtech/common/items/behaviors/Behaviour_SoftHammer.java b/src/main/java/gregtech/common/items/behaviors/Behaviour_SoftHammer.java index 87b3f3c24c..058cf98b52 100644 --- a/src/main/java/gregtech/common/items/behaviors/Behaviour_SoftHammer.java +++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_SoftHammer.java @@ -1,104 +1,104 @@ -package gregtech.common.items.behaviors;
-
-import gregtech.api.GregTech_API;
-import gregtech.api.items.GT_MetaBase_Item;
-import gregtech.api.items.GT_MetaGenerated_Tool;
-import gregtech.api.util.GT_LanguageManager;
-import gregtech.api.util.GT_Utility;
-import net.minecraft.block.Block;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Blocks;
-import net.minecraft.item.ItemStack;
-import net.minecraft.world.World;
-
-import java.util.List;
-
-public class Behaviour_SoftHammer
- extends Behaviour_None {
- private final int mCosts;
- private final String mTooltip = GT_LanguageManager.addStringLocalization("gt.behaviour.softhammer", "Activates and Deactivates Machines");
-
- public Behaviour_SoftHammer(int aCosts) {
- this.mCosts = aCosts;
- }
-
- public boolean onItemUseFirst(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) {
- if (aWorld.isRemote) {
- return false;
- }
- Block aBlock = aWorld.getBlock(aX, aY, aZ);
- if (aBlock == null) {
- return false;
- }
- byte aMeta = (byte) aWorld.getBlockMetadata(aX, aY, aZ);
- if (aBlock == Blocks.lit_redstone_lamp) {
- if ((aPlayer.capabilities.isCreativeMode) || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) {
- aWorld.isRemote = true;
- aWorld.setBlock(aX, aY, aZ, Blocks.redstone_lamp, 0, 0);
- aWorld.isRemote = false;
- GT_Utility.sendSoundToPlayers(aWorld, (String) GregTech_API.sSoundList.get(Integer.valueOf(101)), 1.0F, -1.0F, aX, aY, aZ);
- }
- return true;
- }
- if (aBlock == Blocks.redstone_lamp) {
- if ((aPlayer.capabilities.isCreativeMode) || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) {
- aWorld.isRemote = true;
- aWorld.setBlock(aX, aY, aZ, Blocks.lit_redstone_lamp, 0, 0);
- aWorld.isRemote = false;
- GT_Utility.sendSoundToPlayers(aWorld, (String) GregTech_API.sSoundList.get(Integer.valueOf(101)), 1.0F, -1.0F, aX, aY, aZ);
- }
- return true;
- }
- if (aBlock == Blocks.golden_rail) {
- if ((aPlayer.capabilities.isCreativeMode) || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) {
- aWorld.isRemote = true;
- aWorld.setBlock(aX, aY, aZ, aBlock, (aMeta + 8) % 16, 0);
- aWorld.isRemote = false;
- GT_Utility.sendSoundToPlayers(aWorld, (String) GregTech_API.sSoundList.get(Integer.valueOf(101)), 1.0F, -1.0F, aX, aY, aZ);
- }
- return true;
- }
- if (aBlock == Blocks.activator_rail) {
- if ((aPlayer.capabilities.isCreativeMode) || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) {
- aWorld.isRemote = true;
- aWorld.setBlock(aX, aY, aZ, aBlock, (aMeta + 8) % 16, 0);
- aWorld.isRemote = false;
- GT_Utility.sendSoundToPlayers(aWorld, (String) GregTech_API.sSoundList.get(Integer.valueOf(101)), 1.0F, -1.0F, aX, aY, aZ);
- }
- return true;
- }
- if ((aBlock == Blocks.log) || (aBlock == Blocks.log2) || (aBlock == Blocks.hay_block)) {
- if ((aPlayer.capabilities.isCreativeMode) || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) {
- aWorld.setBlockMetadataWithNotify(aX, aY, aZ, (aMeta + 4) % 12, 3);
- }
- return true;
- }
- if ((aBlock == Blocks.piston) || (aBlock == Blocks.sticky_piston) || (aBlock == Blocks.dispenser) || (aBlock == Blocks.dropper)) {
- if ((aPlayer.capabilities.isCreativeMode) || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) {
- aWorld.setBlockMetadataWithNotify(aX, aY, aZ, (aMeta + 1) % 6, 3);
- GT_Utility.sendSoundToPlayers(aWorld, (String) GregTech_API.sSoundList.get(Integer.valueOf(101)), 1.0F, -1.0F, aX, aY, aZ);
- }
- return true;
- }
- if ((aBlock == Blocks.pumpkin) || (aBlock == Blocks.lit_pumpkin) || (aBlock == Blocks.furnace) || (aBlock == Blocks.lit_furnace) || (aBlock == Blocks.chest) || (aBlock == Blocks.trapped_chest)) {
- if ((aPlayer.capabilities.isCreativeMode) || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) {
- aWorld.setBlockMetadataWithNotify(aX, aY, aZ, (aMeta - 1) % 4 + 2, 3);
- GT_Utility.sendSoundToPlayers(aWorld, (String) GregTech_API.sSoundList.get(Integer.valueOf(101)), 1.0F, -1.0F, aX, aY, aZ);
- }
- return true;
- }
- if (aBlock == Blocks.hopper) {
- if ((aPlayer.capabilities.isCreativeMode) || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) {
- aWorld.setBlockMetadataWithNotify(aX, aY, aZ, (aMeta + 1) % 6 == 1 ? (aMeta + 1) % 6 : 2, 3);
- GT_Utility.sendSoundToPlayers(aWorld, (String) GregTech_API.sSoundList.get(Integer.valueOf(101)), 1.0F, -1.0F, aX, aY, aZ);
- }
- return true;
- }
- return false;
- }
-
- public List<String> getAdditionalToolTips(GT_MetaBase_Item aItem, List<String> aList, ItemStack aStack) {
- aList.add(this.mTooltip);
- return aList;
- }
-}
+package gregtech.common.items.behaviors; + +import gregtech.api.GregTech_API; +import gregtech.api.items.GT_MetaBase_Item; +import gregtech.api.items.GT_MetaGenerated_Tool; +import gregtech.api.util.GT_LanguageManager; +import gregtech.api.util.GT_Utility; +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; + +import java.util.List; + +public class Behaviour_SoftHammer + extends Behaviour_None { + private final int mCosts; + private final String mTooltip = GT_LanguageManager.addStringLocalization("gt.behaviour.softhammer", "Activates and Deactivates Machines"); + + public Behaviour_SoftHammer(int aCosts) { + this.mCosts = aCosts; + } + + public boolean onItemUseFirst(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) { + if (aWorld.isRemote) { + return false; + } + Block aBlock = aWorld.getBlock(aX, aY, aZ); + if (aBlock == null) { + return false; + } + byte aMeta = (byte) aWorld.getBlockMetadata(aX, aY, aZ); + if (aBlock == Blocks.lit_redstone_lamp) { + if ((aPlayer.capabilities.isCreativeMode) || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) { + aWorld.isRemote = true; + aWorld.setBlock(aX, aY, aZ, Blocks.redstone_lamp, 0, 0); + aWorld.isRemote = false; + GT_Utility.sendSoundToPlayers(aWorld, (String) GregTech_API.sSoundList.get(Integer.valueOf(101)), 1.0F, -1.0F, aX, aY, aZ); + } + return true; + } + if (aBlock == Blocks.redstone_lamp) { + if ((aPlayer.capabilities.isCreativeMode) || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) { + aWorld.isRemote = true; + aWorld.setBlock(aX, aY, aZ, Blocks.lit_redstone_lamp, 0, 0); + aWorld.isRemote = false; + GT_Utility.sendSoundToPlayers(aWorld, (String) GregTech_API.sSoundList.get(Integer.valueOf(101)), 1.0F, -1.0F, aX, aY, aZ); + } + return true; + } + if (aBlock == Blocks.golden_rail) { + if ((aPlayer.capabilities.isCreativeMode) || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) { + aWorld.isRemote = true; + aWorld.setBlock(aX, aY, aZ, aBlock, (aMeta + 8) % 16, 0); + aWorld.isRemote = false; + GT_Utility.sendSoundToPlayers(aWorld, (String) GregTech_API.sSoundList.get(Integer.valueOf(101)), 1.0F, -1.0F, aX, aY, aZ); + } + return true; + } + if (aBlock == Blocks.activator_rail) { + if ((aPlayer.capabilities.isCreativeMode) || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) { + aWorld.isRemote = true; + aWorld.setBlock(aX, aY, aZ, aBlock, (aMeta + 8) % 16, 0); + aWorld.isRemote = false; + GT_Utility.sendSoundToPlayers(aWorld, (String) GregTech_API.sSoundList.get(Integer.valueOf(101)), 1.0F, -1.0F, aX, aY, aZ); + } + return true; + } + if ((aBlock == Blocks.log) || (aBlock == Blocks.log2) || (aBlock == Blocks.hay_block)) { + if ((aPlayer.capabilities.isCreativeMode) || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) { + aWorld.setBlockMetadataWithNotify(aX, aY, aZ, (aMeta + 4) % 12, 3); + } + return true; + } + if ((aBlock == Blocks.piston) || (aBlock == Blocks.sticky_piston) || (aBlock == Blocks.dispenser) || (aBlock == Blocks.dropper)) { + if ((aPlayer.capabilities.isCreativeMode) || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) { + aWorld.setBlockMetadataWithNotify(aX, aY, aZ, (aMeta + 1) % 6, 3); + GT_Utility.sendSoundToPlayers(aWorld, (String) GregTech_API.sSoundList.get(Integer.valueOf(101)), 1.0F, -1.0F, aX, aY, aZ); + } + return true; + } + if ((aBlock == Blocks.pumpkin) || (aBlock == Blocks.lit_pumpkin) || (aBlock == Blocks.furnace) || (aBlock == Blocks.lit_furnace) || (aBlock == Blocks.chest) || (aBlock == Blocks.trapped_chest)) { + if ((aPlayer.capabilities.isCreativeMode) || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) { + aWorld.setBlockMetadataWithNotify(aX, aY, aZ, (aMeta - 1) % 4 + 2, 3); + GT_Utility.sendSoundToPlayers(aWorld, (String) GregTech_API.sSoundList.get(Integer.valueOf(101)), 1.0F, -1.0F, aX, aY, aZ); + } + return true; + } + if (aBlock == Blocks.hopper) { + if ((aPlayer.capabilities.isCreativeMode) || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) { + aWorld.setBlockMetadataWithNotify(aX, aY, aZ, (aMeta + 1) % 6 == 1 ? (aMeta + 1) % 6 : 2, 3); + GT_Utility.sendSoundToPlayers(aWorld, (String) GregTech_API.sSoundList.get(Integer.valueOf(101)), 1.0F, -1.0F, aX, aY, aZ); + } + return true; + } + return false; + } + + public List<String> getAdditionalToolTips(GT_MetaBase_Item aItem, List<String> aList, ItemStack aStack) { + aList.add(this.mTooltip); + return aList; + } +} diff --git a/src/main/java/gregtech/common/items/behaviors/Behaviour_Sonictron.java b/src/main/java/gregtech/common/items/behaviors/Behaviour_Sonictron.java index f256f036ca..aa4c954ba1 100644 --- a/src/main/java/gregtech/common/items/behaviors/Behaviour_Sonictron.java +++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_Sonictron.java @@ -1,123 +1,123 @@ -package gregtech.common.items.behaviors;
-
-import gregtech.api.enums.GT_Values;
-import gregtech.api.interfaces.IItemBehaviour;
-import gregtech.api.items.GT_MetaBase_Item;
-import gregtech.api.util.GT_Utility;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.nbt.NBTTagList;
-import net.minecraft.world.World;
-
-public class Behaviour_Sonictron
- extends Behaviour_None {
- public static final IItemBehaviour<GT_MetaBase_Item> INSTANCE = new Behaviour_Sonictron();
-
- public static int getCurrentIndex(ItemStack aStack) {
- NBTTagCompound tNBTTagCompound = aStack.getTagCompound();
- if (tNBTTagCompound == null) {
- tNBTTagCompound = new NBTTagCompound();
- }
- return tNBTTagCompound.getInteger("mCurrentIndex");
- }
-
- public static int getTickTimer(ItemStack aStack) {
- NBTTagCompound tNBTTagCompound = aStack.getTagCompound();
- if (tNBTTagCompound == null) {
- tNBTTagCompound = new NBTTagCompound();
- }
- return tNBTTagCompound.getInteger("mTickTimer");
- }
-
- public static NBTTagCompound setCurrentIndex(ItemStack aStack, int aIndex) {
- NBTTagCompound tNBTTagCompound = aStack.getTagCompound();
- if (tNBTTagCompound == null) {
- tNBTTagCompound = new NBTTagCompound();
- }
- tNBTTagCompound.setInteger("mCurrentIndex", aIndex);
- return tNBTTagCompound;
- }
-
- public static NBTTagCompound setTickTimer(ItemStack aStack, int aTime) {
- NBTTagCompound tNBTTagCompound = aStack.getTagCompound();
- if (tNBTTagCompound == null) {
- tNBTTagCompound = new NBTTagCompound();
- }
- tNBTTagCompound.setInteger("mTickTimer", aTime);
- return tNBTTagCompound;
- }
-
- public static ItemStack[] getNBTInventory(ItemStack aStack) {
- ItemStack[] tInventory = new ItemStack[64];
- NBTTagCompound tNBT = aStack.getTagCompound();
- if (tNBT == null) {
- return tInventory;
- }
- NBTTagList tNBT_ItemList = tNBT.getTagList("Inventory", 10);
- for (int i = 0; i < tNBT_ItemList.tagCount(); i++) {
- NBTTagCompound tag = tNBT_ItemList.getCompoundTagAt(i);
- byte slot = tag.getByte("Slot");
- if ((slot >= 0) && (slot < tInventory.length)) {
- tInventory[slot] = GT_Utility.loadItem(tag);
- }
- }
- return tInventory;
- }
-
- public static NBTTagCompound setNBTInventory(ItemStack aStack, ItemStack[] aInventory) {
- NBTTagCompound tNBT = aStack.getTagCompound();
- if (tNBT == null) {
- tNBT = new NBTTagCompound();
- }
- NBTTagList tNBT_ItemList = new NBTTagList();
- for (int i = 0; i < aInventory.length; i++) {
- ItemStack stack = aInventory[i];
- if (stack != null) {
- NBTTagCompound tag = new NBTTagCompound();
- tag.setByte("Slot", (byte) i);
- stack.writeToNBT(tag);
- tNBT_ItemList.appendTag(tag);
- }
- }
- tNBT.setTag("Inventory", tNBT_ItemList);
- aStack.setTagCompound(tNBT);
- return tNBT;
- }
-
- public static void copyInventory(ItemStack[] aInventory, ItemStack[] aNewContent, int aIndexlength) {
- for (int i = 0; i < aIndexlength; i++) {
- if (aNewContent[i] == null) {
- aInventory[i] = null;
- } else {
- aInventory[i] = GT_Utility.copy(new Object[]{aNewContent[i]});
- }
- }
- }
-
- public boolean onItemUseFirst(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) {
- setCurrentIndex(aStack, -1);
- return false;
- }
-
- public ItemStack onItemRightClick(GT_MetaBase_Item aItem, ItemStack aStack, World aWorld, EntityPlayer aPlayer) {
- setCurrentIndex(aStack, 0);
- return aStack;
- }
-
- public void onUpdate(GT_MetaBase_Item aItem, ItemStack aStack, World aWorld, Entity aPlayer, int aTimer, boolean aIsInHand) {
- int tTickTimer = getTickTimer(aStack);
- int tCurrentIndex = getCurrentIndex(aStack);
- if ((tTickTimer++ % 2 == 0) && (tCurrentIndex > -1)) {
- ItemStack[] tInventory = getNBTInventory(aStack);
- GT_Values.GT.doSonictronSound(tInventory[tCurrentIndex], aPlayer.worldObj, aPlayer.posX, aPlayer.posY, aPlayer.posZ);
- tCurrentIndex++;
- if (tCurrentIndex > 63) {
- tCurrentIndex = -1;
- }
- }
- setTickTimer(aStack, tTickTimer);
- setCurrentIndex(aStack, tCurrentIndex);
- }
-}
+package gregtech.common.items.behaviors; + +import gregtech.api.enums.GT_Values; +import gregtech.api.interfaces.IItemBehaviour; +import gregtech.api.items.GT_MetaBase_Item; +import gregtech.api.util.GT_Utility; +import net.minecraft.entity.Entity; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagList; +import net.minecraft.world.World; + +public class Behaviour_Sonictron + extends Behaviour_None { + public static final IItemBehaviour<GT_MetaBase_Item> INSTANCE = new Behaviour_Sonictron(); + + public static int getCurrentIndex(ItemStack aStack) { + NBTTagCompound tNBTTagCompound = aStack.getTagCompound(); + if (tNBTTagCompound == null) { + tNBTTagCompound = new NBTTagCompound(); + } + return tNBTTagCompound.getInteger("mCurrentIndex"); + } + + public static int getTickTimer(ItemStack aStack) { + NBTTagCompound tNBTTagCompound = aStack.getTagCompound(); + if (tNBTTagCompound == null) { + tNBTTagCompound = new NBTTagCompound(); + } + return tNBTTagCompound.getInteger("mTickTimer"); + } + + public static NBTTagCompound setCurrentIndex(ItemStack aStack, int aIndex) { + NBTTagCompound tNBTTagCompound = aStack.getTagCompound(); + if (tNBTTagCompound == null) { + tNBTTagCompound = new NBTTagCompound(); + } + tNBTTagCompound.setInteger("mCurrentIndex", aIndex); + return tNBTTagCompound; + } + + public static NBTTagCompound setTickTimer(ItemStack aStack, int aTime) { + NBTTagCompound tNBTTagCompound = aStack.getTagCompound(); + if (tNBTTagCompound == null) { + tNBTTagCompound = new NBTTagCompound(); + } + tNBTTagCompound.setInteger("mTickTimer", aTime); + return tNBTTagCompound; + } + + public static ItemStack[] getNBTInventory(ItemStack aStack) { + ItemStack[] tInventory = new ItemStack[64]; + NBTTagCompound tNBT = aStack.getTagCompound(); + if (tNBT == null) { + return tInventory; + } + NBTTagList tNBT_ItemList = tNBT.getTagList("Inventory", 10); + for (int i = 0; i < tNBT_ItemList.tagCount(); i++) { + NBTTagCompound tag = tNBT_ItemList.getCompoundTagAt(i); + byte slot = tag.getByte("Slot"); + if ((slot >= 0) && (slot < tInventory.length)) { + tInventory[slot] = GT_Utility.loadItem(tag); + } + } + return tInventory; + } + + public static NBTTagCompound setNBTInventory(ItemStack aStack, ItemStack[] aInventory) { + NBTTagCompound tNBT = aStack.getTagCompound(); + if (tNBT == null) { + tNBT = new NBTTagCompound(); + } + NBTTagList tNBT_ItemList = new NBTTagList(); + for (int i = 0; i < aInventory.length; i++) { + ItemStack stack = aInventory[i]; + if (stack != null) { + NBTTagCompound tag = new NBTTagCompound(); + tag.setByte("Slot", (byte) i); + stack.writeToNBT(tag); + tNBT_ItemList.appendTag(tag); + } + } + tNBT.setTag("Inventory", tNBT_ItemList); + aStack.setTagCompound(tNBT); + return tNBT; + } + + public static void copyInventory(ItemStack[] aInventory, ItemStack[] aNewContent, int aIndexlength) { + for (int i = 0; i < aIndexlength; i++) { + if (aNewContent[i] == null) { + aInventory[i] = null; + } else { + aInventory[i] = GT_Utility.copy(new Object[]{aNewContent[i]}); + } + } + } + + public boolean onItemUseFirst(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) { + setCurrentIndex(aStack, -1); + return false; + } + + public ItemStack onItemRightClick(GT_MetaBase_Item aItem, ItemStack aStack, World aWorld, EntityPlayer aPlayer) { + setCurrentIndex(aStack, 0); + return aStack; + } + + public void onUpdate(GT_MetaBase_Item aItem, ItemStack aStack, World aWorld, Entity aPlayer, int aTimer, boolean aIsInHand) { + int tTickTimer = getTickTimer(aStack); + int tCurrentIndex = getCurrentIndex(aStack); + if ((tTickTimer++ % 2 == 0) && (tCurrentIndex > -1)) { + ItemStack[] tInventory = getNBTInventory(aStack); + GT_Values.GT.doSonictronSound(tInventory[tCurrentIndex], aPlayer.worldObj, aPlayer.posX, aPlayer.posY, aPlayer.posZ); + tCurrentIndex++; + if (tCurrentIndex > 63) { + tCurrentIndex = -1; + } + } + setTickTimer(aStack, tTickTimer); + setCurrentIndex(aStack, tCurrentIndex); + } +} diff --git a/src/main/java/gregtech/common/items/behaviors/Behaviour_Spray_Color.java b/src/main/java/gregtech/common/items/behaviors/Behaviour_Spray_Color.java index 46487156a0..748a660c15 100644 --- a/src/main/java/gregtech/common/items/behaviors/Behaviour_Spray_Color.java +++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_Spray_Color.java @@ -1,121 +1,121 @@ -package gregtech.common.items.behaviors;
-
-import gregtech.api.GregTech_API;
-import gregtech.api.enums.Dyes;
-import gregtech.api.enums.ItemList;
-import gregtech.api.items.GT_MetaBase_Item;
-import gregtech.api.util.GT_LanguageManager;
-import gregtech.api.util.GT_Utility;
-import net.minecraft.block.Block;
-import net.minecraft.block.BlockColored;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Blocks;
-import net.minecraft.init.Items;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.world.World;
-import net.minecraftforge.common.util.ForgeDirection;
-
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.List;
-
-public class Behaviour_Spray_Color
- extends Behaviour_None {
- private final ItemStack mEmpty;
- private final ItemStack mUsed;
- private final ItemStack mFull;
- private final long mUses;
- private final byte mColor;
- private final Collection<Block> mAllowedVanillaBlocks = Arrays.asList(new Block[]{Blocks.glass, Blocks.glass_pane, Blocks.stained_glass, Blocks.stained_glass_pane, Blocks.carpet, Blocks.hardened_clay, ItemList.TE_Rockwool.getBlock()});
- private final String mTooltip;
- private final String mTooltipUses = GT_LanguageManager.addStringLocalization("gt.behaviour.paintspray.uses", "Remaining Uses:");
- private final String mTooltipUnstackable = GT_LanguageManager.addStringLocalization("gt.behaviour.unstackable", "Not usable when stacked!");
-
- public Behaviour_Spray_Color(ItemStack aEmpty, ItemStack aUsed, ItemStack aFull, long aUses, int aColor) {
- this.mEmpty = aEmpty;
- this.mUsed = aUsed;
- this.mFull = aFull;
- this.mUses = aUses;
- this.mColor = ((byte) aColor);
- this.mTooltip = GT_LanguageManager.addStringLocalization("gt.behaviour.paintspray." + this.mColor + ".tooltip", "Can Color things in " + Dyes.get(this.mColor).mName);
- }
-
- public boolean onItemUseFirst(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) {
- if ((aWorld.isRemote) || (aStack.stackSize != 1)) {
- return false;
- }
- boolean rOutput = false;
- if (!aPlayer.canPlayerEdit(aX, aY, aZ, aSide, aStack)) {
- return false;
- }
- NBTTagCompound tNBT = aStack.getTagCompound();
- if (tNBT == null) {
- tNBT = new NBTTagCompound();
- }
- long tUses = tNBT.getLong("GT.RemainingPaint");
- if (GT_Utility.areStacksEqual(aStack, this.mFull, true)) {
- aStack.func_150996_a(this.mUsed.getItem());
- Items.feather.setDamage(aStack, Items.feather.getDamage(this.mUsed));
- tUses = this.mUses;
- }
- if ((GT_Utility.areStacksEqual(aStack, this.mUsed, true)) && (colorize(aWorld, aX, aY, aZ, aSide))) {
- GT_Utility.sendSoundToPlayers(aWorld, (String) GregTech_API.sSoundList.get(Integer.valueOf(102)), 1.0F, 1.0F, aX, aY, aZ);
- if (!aPlayer.capabilities.isCreativeMode) {
- tUses -= 1L;
- }
- rOutput = true;
- }
- tNBT.removeTag("GT.RemainingPaint");
- if (tUses > 0L) {
- tNBT.setLong("GT.RemainingPaint", tUses);
- }
- if (tNBT.hasNoTags()) {
- aStack.setTagCompound(null);
- } else {
- aStack.setTagCompound(tNBT);
- }
- if (tUses <= 0L) {
- if (this.mEmpty == null) {
- aStack.stackSize -= 1;
- } else {
- aStack.func_150996_a(this.mEmpty.getItem());
- Items.feather.setDamage(aStack, Items.feather.getDamage(this.mEmpty));
- }
- }
- return rOutput;
- }
-
- private boolean colorize(World aWorld, int aX, int aY, int aZ, int aSide) {
- Block aBlock = aWorld.getBlock(aX, aY, aZ);
- if ((aBlock != Blocks.air) && ((this.mAllowedVanillaBlocks.contains(aBlock)) || ((aBlock instanceof BlockColored)))) {
- if (aBlock == Blocks.hardened_clay) {
- aWorld.setBlock(aX, aY, aZ, Blocks.stained_hardened_clay, (this.mColor ^ 0xFFFFFFFF) & 0xF, 3);
- return true;
- }
- if (aBlock == Blocks.glass_pane) {
- aWorld.setBlock(aX, aY, aZ, Blocks.stained_glass_pane, (this.mColor ^ 0xFFFFFFFF) & 0xF, 3);
- return true;
- }
- if (aBlock == Blocks.glass) {
- aWorld.setBlock(aX, aY, aZ, Blocks.stained_glass, (this.mColor ^ 0xFFFFFFFF) & 0xF, 3);
- return true;
- }
- if (aWorld.getBlockMetadata(aX, aY, aZ) == ((this.mColor ^ 0xFFFFFFFF) & 0xF)) {
- return false;
- }
- aWorld.setBlockMetadataWithNotify(aX, aY, aZ, (this.mColor ^ 0xFFFFFFFF) & 0xF, 3);
- return true;
- }
- return aBlock.recolourBlock(aWorld, aX, aY, aZ, ForgeDirection.getOrientation(aSide), (this.mColor ^ 0xFFFFFFFF) & 0xF);
- }
-
- public List<String> getAdditionalToolTips(GT_MetaBase_Item aItem, List<String> aList, ItemStack aStack) {
- aList.add(this.mTooltip);
- NBTTagCompound tNBT = aStack.getTagCompound();
- long tRemainingPaint = tNBT == null ? 0L : GT_Utility.areStacksEqual(aStack, this.mFull, true) ? this.mUses : tNBT.getLong("GT.RemainingPaint");
- aList.add(this.mTooltipUses + " " + tRemainingPaint);
- aList.add(this.mTooltipUnstackable);
- return aList;
- }
-}
+package gregtech.common.items.behaviors; + +import gregtech.api.GregTech_API; +import gregtech.api.enums.Dyes; +import gregtech.api.enums.ItemList; +import gregtech.api.items.GT_MetaBase_Item; +import gregtech.api.util.GT_LanguageManager; +import gregtech.api.util.GT_Utility; +import net.minecraft.block.Block; +import net.minecraft.block.BlockColored; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; + +import java.util.Arrays; +import java.util.Collection; +import java.util.List; + +public class Behaviour_Spray_Color + extends Behaviour_None { + private final ItemStack mEmpty; + private final ItemStack mUsed; + private final ItemStack mFull; + private final long mUses; + private final byte mColor; + private final Collection<Block> mAllowedVanillaBlocks = Arrays.asList(new Block[]{Blocks.glass, Blocks.glass_pane, Blocks.stained_glass, Blocks.stained_glass_pane, Blocks.carpet, Blocks.hardened_clay, ItemList.TE_Rockwool.getBlock()}); + private final String mTooltip; + private final String mTooltipUses = GT_LanguageManager.addStringLocalization("gt.behaviour.paintspray.uses", "Remaining Uses:"); + private final String mTooltipUnstackable = GT_LanguageManager.addStringLocalization("gt.behaviour.unstackable", "Not usable when stacked!"); + + public Behaviour_Spray_Color(ItemStack aEmpty, ItemStack aUsed, ItemStack aFull, long aUses, int aColor) { + this.mEmpty = aEmpty; + this.mUsed = aUsed; + this.mFull = aFull; + this.mUses = aUses; + this.mColor = ((byte) aColor); + this.mTooltip = GT_LanguageManager.addStringLocalization("gt.behaviour.paintspray." + this.mColor + ".tooltip", "Can Color things in " + Dyes.get(this.mColor).mName); + } + + public boolean onItemUseFirst(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) { + if ((aWorld.isRemote) || (aStack.stackSize != 1)) { + return false; + } + boolean rOutput = false; + if (!aPlayer.canPlayerEdit(aX, aY, aZ, aSide, aStack)) { + return false; + } + NBTTagCompound tNBT = aStack.getTagCompound(); + if (tNBT == null) { + tNBT = new NBTTagCompound(); + } + long tUses = tNBT.getLong("GT.RemainingPaint"); + if (GT_Utility.areStacksEqual(aStack, this.mFull, true)) { + aStack.func_150996_a(this.mUsed.getItem()); + Items.feather.setDamage(aStack, Items.feather.getDamage(this.mUsed)); + tUses = this.mUses; + } + if ((GT_Utility.areStacksEqual(aStack, this.mUsed, true)) && (colorize(aWorld, aX, aY, aZ, aSide))) { + GT_Utility.sendSoundToPlayers(aWorld, (String) GregTech_API.sSoundList.get(Integer.valueOf(102)), 1.0F, 1.0F, aX, aY, aZ); + if (!aPlayer.capabilities.isCreativeMode) { + tUses -= 1L; + } + rOutput = true; + } + tNBT.removeTag("GT.RemainingPaint"); + if (tUses > 0L) { + tNBT.setLong("GT.RemainingPaint", tUses); + } + if (tNBT.hasNoTags()) { + aStack.setTagCompound(null); + } else { + aStack.setTagCompound(tNBT); + } + if (tUses <= 0L) { + if (this.mEmpty == null) { + aStack.stackSize -= 1; + } else { + aStack.func_150996_a(this.mEmpty.getItem()); + Items.feather.setDamage(aStack, Items.feather.getDamage(this.mEmpty)); + } + } + return rOutput; + } + + private boolean colorize(World aWorld, int aX, int aY, int aZ, int aSide) { + Block aBlock = aWorld.getBlock(aX, aY, aZ); + if ((aBlock != Blocks.air) && ((this.mAllowedVanillaBlocks.contains(aBlock)) || ((aBlock instanceof BlockColored)))) { + if (aBlock == Blocks.hardened_clay) { + aWorld.setBlock(aX, aY, aZ, Blocks.stained_hardened_clay, (this.mColor ^ 0xFFFFFFFF) & 0xF, 3); + return true; + } + if (aBlock == Blocks.glass_pane) { + aWorld.setBlock(aX, aY, aZ, Blocks.stained_glass_pane, (this.mColor ^ 0xFFFFFFFF) & 0xF, 3); + return true; + } + if (aBlock == Blocks.glass) { + aWorld.setBlock(aX, aY, aZ, Blocks.stained_glass, (this.mColor ^ 0xFFFFFFFF) & 0xF, 3); + return true; + } + if (aWorld.getBlockMetadata(aX, aY, aZ) == ((this.mColor ^ 0xFFFFFFFF) & 0xF)) { + return false; + } + aWorld.setBlockMetadataWithNotify(aX, aY, aZ, (this.mColor ^ 0xFFFFFFFF) & 0xF, 3); + return true; + } + return aBlock.recolourBlock(aWorld, aX, aY, aZ, ForgeDirection.getOrientation(aSide), (this.mColor ^ 0xFFFFFFFF) & 0xF); + } + + public List<String> getAdditionalToolTips(GT_MetaBase_Item aItem, List<String> aList, ItemStack aStack) { + aList.add(this.mTooltip); + NBTTagCompound tNBT = aStack.getTagCompound(); + long tRemainingPaint = tNBT == null ? 0L : GT_Utility.areStacksEqual(aStack, this.mFull, true) ? this.mUses : tNBT.getLong("GT.RemainingPaint"); + aList.add(this.mTooltipUses + " " + tRemainingPaint); + aList.add(this.mTooltipUnstackable); + return aList; + } +} diff --git a/src/main/java/gregtech/common/items/behaviors/Behaviour_WrittenBook.java b/src/main/java/gregtech/common/items/behaviors/Behaviour_WrittenBook.java index 89e47d51df..3d1ee73d43 100644 --- a/src/main/java/gregtech/common/items/behaviors/Behaviour_WrittenBook.java +++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_WrittenBook.java @@ -1,34 +1,34 @@ -package gregtech.common.items.behaviors;
-
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import gregtech.api.items.GT_MetaBase_Item;
-import gregtech.api.util.GT_Utility;
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.entity.EntityPlayerSP;
-import net.minecraft.client.gui.GuiScreenBook;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.world.World;
-
-import java.util.List;
-
-public class Behaviour_WrittenBook
- extends Behaviour_None {
- @SideOnly(Side.CLIENT)
- public boolean onItemUse(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) {
- if ((GT_Utility.isStringValid(GT_Utility.ItemNBT.getBookTitle(aStack))) && ((aPlayer instanceof EntityPlayerSP))) {
- Minecraft.getMinecraft().displayGuiScreen(new GuiScreenBook(aPlayer, aStack, false));
- }
- return true;
- }
-
- public List<String> getAdditionalToolTips(GT_MetaBase_Item aItem, List<String> aList, ItemStack aStack) {
- String tTitle = GT_Utility.ItemNBT.getBookTitle(aStack);
- if (GT_Utility.isStringValid(tTitle)) {
- aList.add(tTitle);
- aList.add("by " + GT_Utility.ItemNBT.getBookAuthor(aStack));
- }
- return aList;
- }
-}
+package gregtech.common.items.behaviors; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gregtech.api.items.GT_MetaBase_Item; +import gregtech.api.util.GT_Utility; +import net.minecraft.client.Minecraft; +import net.minecraft.client.entity.EntityPlayerSP; +import net.minecraft.client.gui.GuiScreenBook; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; + +import java.util.List; + +public class Behaviour_WrittenBook + extends Behaviour_None { + @SideOnly(Side.CLIENT) + public boolean onItemUse(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) { + if ((GT_Utility.isStringValid(GT_Utility.ItemNBT.getBookTitle(aStack))) && ((aPlayer instanceof EntityPlayerSP))) { + Minecraft.getMinecraft().displayGuiScreen(new GuiScreenBook(aPlayer, aStack, false)); + } + return true; + } + + public List<String> getAdditionalToolTips(GT_MetaBase_Item aItem, List<String> aList, ItemStack aStack) { + String tTitle = GT_Utility.ItemNBT.getBookTitle(aStack); + if (GT_Utility.isStringValid(tTitle)) { + aList.add(tTitle); + aList.add("by " + GT_Utility.ItemNBT.getBookAuthor(aStack)); + } + return aList; + } +} diff --git a/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_BasicLogic.java b/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_BasicLogic.java index 8651643eff..ab99c1b941 100644 --- a/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_BasicLogic.java +++ b/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_BasicLogic.java @@ -1,96 +1,96 @@ -package gregtech.common.redstonecircuits;
-
-import gregtech.api.interfaces.IRedstoneCircuitBlock;
-import gregtech.api.util.GT_CircuitryBehavior;
-
-public class GT_Circuit_BasicLogic
- extends GT_CircuitryBehavior {
- public GT_Circuit_BasicLogic(int aIndex) {
- super(aIndex);
- }
-
- public void initParameters(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock) {
- aCircuitData[0] = 0;
- }
-
- public void validateParameters(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock) {
- if (aCircuitData[0] < 0) {
- aCircuitData[0] = 0;
- }
- if (aCircuitData[0] > 13) {
- aCircuitData[0] = 13;
- }
- }
-
- public void onTick(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock) {
- if (aCircuitData[0] < 2) {
- aRedstoneCircuitBlock.setRedstone((byte) (aCircuitData[0] % 2 == (getAnyRedstone(aRedstoneCircuitBlock) ? 0 : 1) ? 15 : 0), aRedstoneCircuitBlock.getOutputFacing());
- } else if (aCircuitData[0] < 4) {
- aRedstoneCircuitBlock.setRedstone((byte) (aCircuitData[0] % 2 == (getOneRedstone(aRedstoneCircuitBlock) ? 0 : 1) ? 15 : 0), aRedstoneCircuitBlock.getOutputFacing());
- } else if (aCircuitData[0] < 6) {
- aRedstoneCircuitBlock.setRedstone((byte) (aCircuitData[0] % 2 == (getAllRedstone(aRedstoneCircuitBlock) ? 0 : 1) ? 15 : 0), aRedstoneCircuitBlock.getOutputFacing());
- } else if (aCircuitData[0] < 7) {
- aRedstoneCircuitBlock.setRedstone((byte) (15 - getStrongestRedstone(aRedstoneCircuitBlock)), aRedstoneCircuitBlock.getOutputFacing());
- } else if (aCircuitData[0] < 9) {
- aRedstoneCircuitBlock.setRedstone((byte) ((aCircuitData[0] % 2 == 0 ? 15 : 0) ^ (getStrongestRedstone(aRedstoneCircuitBlock) | getWeakestRedstone(aRedstoneCircuitBlock))), aRedstoneCircuitBlock.getOutputFacing());
- } else if (aCircuitData[0] < 11) {
- aRedstoneCircuitBlock.setRedstone((byte) ((aCircuitData[0] % 2 == 0 ? 15 : 0) ^ getStrongestRedstone(aRedstoneCircuitBlock) ^ getWeakestRedstone(aRedstoneCircuitBlock)), aRedstoneCircuitBlock.getOutputFacing());
- } else if (aCircuitData[0] < 13) {
- aRedstoneCircuitBlock.setRedstone((byte) ((aCircuitData[0] % 2 == 0 ? 15 : 0) ^ getStrongestRedstone(aRedstoneCircuitBlock) & getWeakestRedstone(aRedstoneCircuitBlock)), aRedstoneCircuitBlock.getOutputFacing());
- } else if (aCircuitData[0] < 14) {
- aRedstoneCircuitBlock.setRedstone((byte) (getStrongestRedstone(aRedstoneCircuitBlock) ^ 0xF), aRedstoneCircuitBlock.getOutputFacing());
- }
- }
-
- public String getName() {
- return "Basic Logic";
- }
-
- public String getDescription() {
- return "Regular Logic Gates";
- }
-
- public String getDataDescription(int[] aCircuitData, int aCircuitDataIndex) {
- if (aCircuitDataIndex == 0) {
- switch (aCircuitData[0]) {
- case 0:
- return "OR";
- case 1:
- return "NOR";
- case 2:
- return "XOR";
- case 3:
- return "XNOR";
- case 4:
- return "AND";
- case 5:
- return "NAND";
- case 6:
- return "INVERT";
- case 7:
- return "BIT_OR";
- case 8:
- return "BIT_NOR";
- case 9:
- return "BIT_XOR";
- case 10:
- return "BIT_XNOR";
- case 11:
- return "BIT_AND";
- case 12:
- return "BIT_NAND";
- case 13:
- return "BIT_INVERT";
- }
- }
- return "";
- }
-
- public boolean displayItemStack(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock, int aIndex) {
- return false;
- }
-
- public String getDataDisplay(int[] aCircuitData, int aCircuitDataIndex) {
- return "";
- }
-}
+package gregtech.common.redstonecircuits; + +import gregtech.api.interfaces.IRedstoneCircuitBlock; +import gregtech.api.util.GT_CircuitryBehavior; + +public class GT_Circuit_BasicLogic + extends GT_CircuitryBehavior { + public GT_Circuit_BasicLogic(int aIndex) { + super(aIndex); + } + + public void initParameters(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock) { + aCircuitData[0] = 0; + } + + public void validateParameters(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock) { + if (aCircuitData[0] < 0) { + aCircuitData[0] = 0; + } + if (aCircuitData[0] > 13) { + aCircuitData[0] = 13; + } + } + + public void onTick(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock) { + if (aCircuitData[0] < 2) { + aRedstoneCircuitBlock.setRedstone((byte) (aCircuitData[0] % 2 == (getAnyRedstone(aRedstoneCircuitBlock) ? 0 : 1) ? 15 : 0), aRedstoneCircuitBlock.getOutputFacing()); + } else if (aCircuitData[0] < 4) { + aRedstoneCircuitBlock.setRedstone((byte) (aCircuitData[0] % 2 == (getOneRedstone(aRedstoneCircuitBlock) ? 0 : 1) ? 15 : 0), aRedstoneCircuitBlock.getOutputFacing()); + } else if (aCircuitData[0] < 6) { + aRedstoneCircuitBlock.setRedstone((byte) (aCircuitData[0] % 2 == (getAllRedstone(aRedstoneCircuitBlock) ? 0 : 1) ? 15 : 0), aRedstoneCircuitBlock.getOutputFacing()); + } else if (aCircuitData[0] < 7) { + aRedstoneCircuitBlock.setRedstone((byte) (15 - getStrongestRedstone(aRedstoneCircuitBlock)), aRedstoneCircuitBlock.getOutputFacing()); + } else if (aCircuitData[0] < 9) { + aRedstoneCircuitBlock.setRedstone((byte) ((aCircuitData[0] % 2 == 0 ? 15 : 0) ^ (getStrongestRedstone(aRedstoneCircuitBlock) | getWeakestRedstone(aRedstoneCircuitBlock))), aRedstoneCircuitBlock.getOutputFacing()); + } else if (aCircuitData[0] < 11) { + aRedstoneCircuitBlock.setRedstone((byte) ((aCircuitData[0] % 2 == 0 ? 15 : 0) ^ getStrongestRedstone(aRedstoneCircuitBlock) ^ getWeakestRedstone(aRedstoneCircuitBlock)), aRedstoneCircuitBlock.getOutputFacing()); + } else if (aCircuitData[0] < 13) { + aRedstoneCircuitBlock.setRedstone((byte) ((aCircuitData[0] % 2 == 0 ? 15 : 0) ^ getStrongestRedstone(aRedstoneCircuitBlock) & getWeakestRedstone(aRedstoneCircuitBlock)), aRedstoneCircuitBlock.getOutputFacing()); + } else if (aCircuitData[0] < 14) { + aRedstoneCircuitBlock.setRedstone((byte) (getStrongestRedstone(aRedstoneCircuitBlock) ^ 0xF), aRedstoneCircuitBlock.getOutputFacing()); + } + } + + public String getName() { + return "Basic Logic"; + } + + public String getDescription() { + return "Regular Logic Gates"; + } + + public String getDataDescription(int[] aCircuitData, int aCircuitDataIndex) { + if (aCircuitDataIndex == 0) { + switch (aCircuitData[0]) { + case 0: + return "OR"; + case 1: + return "NOR"; + case 2: + return "XOR"; + case 3: + return "XNOR"; + case 4: + return "AND"; + case 5: + return "NAND"; + case 6: + return "INVERT"; + case 7: + return "BIT_OR"; + case 8: + return "BIT_NOR"; + case 9: + return "BIT_XOR"; + case 10: + return "BIT_XNOR"; + case 11: + return "BIT_AND"; + case 12: + return "BIT_NAND"; + case 13: + return "BIT_INVERT"; + } + } + return ""; + } + + public boolean displayItemStack(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock, int aIndex) { + return false; + } + + public String getDataDisplay(int[] aCircuitData, int aCircuitDataIndex) { + return ""; + } +} diff --git a/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_BitAnd.java b/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_BitAnd.java index 8832de37b6..0a38f929d1 100644 --- a/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_BitAnd.java +++ b/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_BitAnd.java @@ -1,69 +1,69 @@ -package gregtech.common.redstonecircuits;
-
-import gregtech.api.interfaces.IRedstoneCircuitBlock;
-import gregtech.api.util.GT_CircuitryBehavior;
-
-public class GT_Circuit_BitAnd
- extends GT_CircuitryBehavior {
- public GT_Circuit_BitAnd(int aIndex) {
- super(aIndex);
- }
-
- public void initParameters(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock) {
- aCircuitData[0] = 0;
- aCircuitData[1] = 0;
- aCircuitData[2] = 0;
- aCircuitData[3] = 0;
- }
-
- public void validateParameters(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock) {
- if (aCircuitData[0] < 0) {
- aCircuitData[0] = 0;
- }
- if (aCircuitData[1] < 0) {
- aCircuitData[1] = 0;
- }
- if (aCircuitData[2] < 0) {
- aCircuitData[2] = 0;
- }
- if (aCircuitData[3] < 0) {
- aCircuitData[3] = 0;
- }
- if (aCircuitData[0] > 1) {
- aCircuitData[0] = 1;
- }
- if (aCircuitData[1] > 1) {
- aCircuitData[1] = 1;
- }
- if (aCircuitData[2] > 1) {
- aCircuitData[2] = 1;
- }
- if (aCircuitData[3] > 1) {
- aCircuitData[3] = 1;
- }
- }
-
- public void onTick(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock) {
- aRedstoneCircuitBlock.setRedstone((byte) ((getStrongestRedstone(aRedstoneCircuitBlock) & (aCircuitData[0] | aCircuitData[1] << 1 | aCircuitData[2] << 2 | aCircuitData[3] << 3)) != 0 ? 15 : 0), aRedstoneCircuitBlock.getOutputFacing());
- }
-
- public String getName() {
- return "Hardcode Bit-AND";
- }
-
- public String getDescription() {
- return "( signal & this ) != 0";
- }
-
- public String getDataDescription(int[] aCircuitData, int aCircuitDataIndex) {
- return "Bit " + aCircuitDataIndex + ":";
- }
-
- public boolean displayItemStack(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock, int aIndex) {
- return false;
- }
-
- public String getDataDisplay(int[] aCircuitData, int aCircuitDataIndex) {
- return aCircuitData[aCircuitDataIndex] == 0 ? "OFF" : "ON";
- }
-}
+package gregtech.common.redstonecircuits; + +import gregtech.api.interfaces.IRedstoneCircuitBlock; +import gregtech.api.util.GT_CircuitryBehavior; + +public class GT_Circuit_BitAnd + extends GT_CircuitryBehavior { + public GT_Circuit_BitAnd(int aIndex) { + super(aIndex); + } + + public void initParameters(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock) { + aCircuitData[0] = 0; + aCircuitData[1] = 0; + aCircuitData[2] = 0; + aCircuitData[3] = 0; + } + + public void validateParameters(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock) { + if (aCircuitData[0] < 0) { + aCircuitData[0] = 0; + } + if (aCircuitData[1] < 0) { + aCircuitData[1] = 0; + } + if (aCircuitData[2] < 0) { + aCircuitData[2] = 0; + } + if (aCircuitData[3] < 0) { + aCircuitData[3] = 0; + } + if (aCircuitData[0] > 1) { + aCircuitData[0] = 1; + } + if (aCircuitData[1] > 1) { + aCircuitData[1] = 1; + } + if (aCircuitData[2] > 1) { + aCircuitData[2] = 1; + } + if (aCircuitData[3] > 1) { + aCircuitData[3] = 1; + } + } + + public void onTick(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock) { + aRedstoneCircuitBlock.setRedstone((byte) ((getStrongestRedstone(aRedstoneCircuitBlock) & (aCircuitData[0] | aCircuitData[1] << 1 | aCircuitData[2] << 2 | aCircuitData[3] << 3)) != 0 ? 15 : 0), aRedstoneCircuitBlock.getOutputFacing()); + } + + public String getName() { + return "Hardcode Bit-AND"; + } + + public String getDescription() { + return "( signal & this ) != 0"; + } + + public String getDataDescription(int[] aCircuitData, int aCircuitDataIndex) { + return "Bit " + aCircuitDataIndex + ":"; + } + + public boolean displayItemStack(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock, int aIndex) { + return false; + } + + public String getDataDisplay(int[] aCircuitData, int aCircuitDataIndex) { + return aCircuitData[aCircuitDataIndex] == 0 ? "OFF" : "ON"; + } +} diff --git a/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_CombinationLock.java b/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_CombinationLock.java index 74492173cf..1846582bf3 100644 --- a/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_CombinationLock.java +++ b/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_CombinationLock.java @@ -1,101 +1,101 @@ -package gregtech.common.redstonecircuits;
-
-import gregtech.api.interfaces.IRedstoneCircuitBlock;
-import gregtech.api.util.GT_CircuitryBehavior;
-
-public class GT_Circuit_CombinationLock
- extends GT_CircuitryBehavior {
- public GT_Circuit_CombinationLock(int aIndex) {
- super(aIndex);
- }
-
- public void initParameters(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock) {
- aCircuitData[0] = 1;
- aCircuitData[1] = 0;
- aCircuitData[2] = 0;
- aCircuitData[3] = 0;
- aCircuitData[4] = 0;
- aCircuitData[5] = 0;
- }
-
- public void validateParameters(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock) {
- if (aCircuitData[0] < 1) {
- aCircuitData[0] = 1;
- }
- if (aCircuitData[1] < 0) {
- aCircuitData[1] = 0;
- }
- if (aCircuitData[2] < 0) {
- aCircuitData[2] = 0;
- }
- if (aCircuitData[3] < 0) {
- aCircuitData[3] = 0;
- }
- if (aCircuitData[0] > 15) {
- aCircuitData[0] = 15;
- }
- if (aCircuitData[1] > 15) {
- aCircuitData[1] = 15;
- }
- if (aCircuitData[2] > 15) {
- aCircuitData[2] = 15;
- }
- if (aCircuitData[3] > 15) {
- aCircuitData[3] = 15;
- }
- if (aCircuitData[4] < 0) {
- aCircuitData[4] = 0;
- }
- if (aCircuitData[4] > 3) {
- aCircuitData[4] = 3;
- }
- if (aCircuitData[5] < 0) {
- aCircuitData[5] = 0;
- }
- }
-
- public void onTick(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock) {
- while ((aCircuitData[aCircuitData[4]] == 0) && (aCircuitData[4] < 4)) {
- aCircuitData[4] += 1;
- }
- if (aCircuitData[4] < 4) {
- int tRedstone = getStrongestRedstone(aRedstoneCircuitBlock);
- if (tRedstone > 0) {
- if (aCircuitData[5] == 0) {
- if (tRedstone == aCircuitData[aCircuitData[4]]) {
- aCircuitData[4] += 1;
- } else {
- aCircuitData[4] = 0;
- }
- }
- aCircuitData[5] = 1;
- } else {
- aCircuitData[5] = 0;
- }
- aRedstoneCircuitBlock.setRedstone((byte) 0, aRedstoneCircuitBlock.getOutputFacing());
- } else {
- aRedstoneCircuitBlock.setRedstone((byte) 15, aRedstoneCircuitBlock.getOutputFacing());
- aCircuitData[4] = 0;
- }
- }
-
- public String getName() {
- return "Combination Lock";
- }
-
- public String getDescription() {
- return "Checks Combinations";
- }
-
- public String getDataDescription(int[] aCircuitData, int aCircuitDataIndex) {
- return "Power " + aCircuitDataIndex;
- }
-
- public boolean displayItemStack(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock, int aIndex) {
- return false;
- }
-
- public String getDataDisplay(int[] aCircuitData, int aCircuitDataIndex) {
- return null;
- }
-}
+package gregtech.common.redstonecircuits; + +import gregtech.api.interfaces.IRedstoneCircuitBlock; +import gregtech.api.util.GT_CircuitryBehavior; + +public class GT_Circuit_CombinationLock + extends GT_CircuitryBehavior { + public GT_Circuit_CombinationLock(int aIndex) { + super(aIndex); + } + + public void initParameters(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock) { + aCircuitData[0] = 1; + aCircuitData[1] = 0; + aCircuitData[2] = 0; + aCircuitData[3] = 0; + aCircuitData[4] = 0; + aCircuitData[5] = 0; + } + + public void validateParameters(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock) { + if (aCircuitData[0] < 1) { + aCircuitData[0] = 1; + } + if (aCircuitData[1] < 0) { + aCircuitData[1] = 0; + } + if (aCircuitData[2] < 0) { + aCircuitData[2] = 0; + } + if (aCircuitData[3] < 0) { + aCircuitData[3] = 0; + } + if (aCircuitData[0] > 15) { + aCircuitData[0] = 15; + } + if (aCircuitData[1] > 15) { + aCircuitData[1] = 15; + } + if (aCircuitData[2] > 15) { + aCircuitData[2] = 15; + } + if (aCircuitData[3] > 15) { + aCircuitData[3] = 15; + } + if (aCircuitData[4] < 0) { + aCircuitData[4] = 0; + } + if (aCircuitData[4] > 3) { + aCircuitData[4] = 3; + } + if (aCircuitData[5] < 0) { + aCircuitData[5] = 0; + } + } + + public void onTick(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock) { + while ((aCircuitData[aCircuitData[4]] == 0) && (aCircuitData[4] < 4)) { + aCircuitData[4] += 1; + } + if (aCircuitData[4] < 4) { + int tRedstone = getStrongestRedstone(aRedstoneCircuitBlock); + if (tRedstone > 0) { + if (aCircuitData[5] == 0) { + if (tRedstone == aCircuitData[aCircuitData[4]]) { + aCircuitData[4] += 1; + } else { + aCircuitData[4] = 0; + } + } + aCircuitData[5] = 1; + } else { + aCircuitData[5] = 0; + } + aRedstoneCircuitBlock.setRedstone((byte) 0, aRedstoneCircuitBlock.getOutputFacing()); + } else { + aRedstoneCircuitBlock.setRedstone((byte) 15, aRedstoneCircuitBlock.getOutputFacing()); + aCircuitData[4] = 0; + } + } + + public String getName() { + return "Combination Lock"; + } + + public String getDescription() { + return "Checks Combinations"; + } + + public String getDataDescription(int[] aCircuitData, int aCircuitDataIndex) { + return "Power " + aCircuitDataIndex; + } + + public boolean displayItemStack(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock, int aIndex) { + return false; + } + + public String getDataDisplay(int[] aCircuitData, int aCircuitDataIndex) { + return null; + } +} diff --git a/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_Equals.java b/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_Equals.java index 16ef890b5a..f328b6adde 100644 --- a/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_Equals.java +++ b/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_Equals.java @@ -1,64 +1,64 @@ -package gregtech.common.redstonecircuits;
-
-import gregtech.api.interfaces.IRedstoneCircuitBlock;
-import gregtech.api.util.GT_CircuitryBehavior;
-
-public class GT_Circuit_Equals
- extends GT_CircuitryBehavior {
- public GT_Circuit_Equals(int aIndex) {
- super(aIndex);
- }
-
- public void initParameters(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock) {
- aCircuitData[0] = 0;
- aCircuitData[1] = 0;
- }
-
- public void validateParameters(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock) {
- if (aCircuitData[0] < 0) {
- aCircuitData[0] = 0;
- }
- if (aCircuitData[0] > 15) {
- aCircuitData[0] = 15;
- }
- if (aCircuitData[1] < 0) {
- aCircuitData[3] = 0;
- }
- if (aCircuitData[1] > 1) {
- aCircuitData[3] = 1;
- }
- }
-
- public void onTick(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock) {
- aRedstoneCircuitBlock.setRedstone(((byte) ((aCircuitData[1] != 0 ? getStrongestRedstone(aRedstoneCircuitBlock) == aCircuitData[0] : getStrongestRedstone(aRedstoneCircuitBlock) != aCircuitData[0]) ? 0 : 15)), aRedstoneCircuitBlock.getOutputFacing());
- }
-
- public String getName() {
- return "Equals";
- }
-
- public String getDescription() {
- return "signal == this";
- }
-
- public String getDataDescription(int[] aCircuitData, int aCircuitDataIndex) {
- switch (aCircuitDataIndex) {
- case 0:
- return "Signal";
- case 1:
- return aCircuitData[1] == 0 ? "Equal" : "Unequal";
- }
- return "";
- }
-
- public boolean displayItemStack(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock, int aIndex) {
- return false;
- }
-
- public String getDataDisplay(int[] aCircuitData, int aCircuitDataIndex) {
- if (aCircuitDataIndex > 0) {
- return "";
- }
- return null;
- }
-}
+package gregtech.common.redstonecircuits; + +import gregtech.api.interfaces.IRedstoneCircuitBlock; +import gregtech.api.util.GT_CircuitryBehavior; + +public class GT_Circuit_Equals + extends GT_CircuitryBehavior { + public GT_Circuit_Equals(int aIndex) { + super(aIndex); + } + + public void initParameters(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock) { + aCircuitData[0] = 0; + aCircuitData[1] = 0; + } + + public void validateParameters(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock) { + if (aCircuitData[0] < 0) { + aCircuitData[0] = 0; + } + if (aCircuitData[0] > 15) { + aCircuitData[0] = 15; + } + if (aCircuitData[1] < 0) { + aCircuitData[3] = 0; + } + if (aCircuitData[1] > 1) { + aCircuitData[3] = 1; + } + } + + public void onTick(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock) { + aRedstoneCircuitBlock.setRedstone(((byte) ((aCircuitData[1] != 0 ? getStrongestRedstone(aRedstoneCircuitBlock) == aCircuitData[0] : getStrongestRedstone(aRedstoneCircuitBlock) != aCircuitData[0]) ? 0 : 15)), aRedstoneCircuitBlock.getOutputFacing()); + } + + public String getName() { + return "Equals"; + } + + public String getDescription() { + return "signal == this"; + } + + public String getDataDescription(int[] aCircuitData, int aCircuitDataIndex) { + switch (aCircuitDataIndex) { + case 0: + return "Signal"; + case 1: + return aCircuitData[1] == 0 ? "Equal" : "Unequal"; + } + return ""; + } + + public boolean displayItemStack(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock, int aIndex) { + return false; + } + + public String getDataDisplay(int[] aCircuitData, int aCircuitDataIndex) { + if (aCircuitDataIndex > 0) { + return ""; + } + return null; + } +} diff --git a/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_Pulser.java b/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_Pulser.java index edc7b36687..815a7791cf 100644 --- a/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_Pulser.java +++ b/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_Pulser.java @@ -1,83 +1,83 @@ -package gregtech.common.redstonecircuits;
-
-import gregtech.api.interfaces.IRedstoneCircuitBlock;
-import gregtech.api.util.GT_CircuitryBehavior;
-
-public class GT_Circuit_Pulser
- extends GT_CircuitryBehavior {
- public GT_Circuit_Pulser(int aIndex) {
- super(aIndex);
- }
-
- public void initParameters(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock) {
- aCircuitData[0] = 1;
- aCircuitData[1] = 16;
- aCircuitData[4] = 0;
- }
-
- public void validateParameters(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock) {
- if (aCircuitData[0] < 1) {
- aCircuitData[0] = 1;
- }
- if (aCircuitData[1] < 0) {
- aCircuitData[1] = 0;
- }
- if (aCircuitData[1] > 16) {
- aCircuitData[1] = 16;
- }
- if (aCircuitData[4] < 0) {
- aCircuitData[4] = 0;
- }
- }
-
- public void onTick(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock) {
- byte tRedstone = aCircuitData[1] == 0 ? getWeakestNonZeroRedstone(aRedstoneCircuitBlock) : getStrongestRedstone(aRedstoneCircuitBlock);
- if (aCircuitData[4] == 0) {
- aCircuitData[5] = tRedstone;
- }
- if ((tRedstone > 0) || (aCircuitData[4] > 0)) {
- int tmp40_39 = 4;
- int[] tmp40_38 = aCircuitData;
- int tmp42_41 = tmp40_38[tmp40_39];
- tmp40_38[tmp40_39] = (tmp42_41 + 1);
- if ((tmp42_41 >= aCircuitData[0]) && (tRedstone <= 0)) {
- aCircuitData[4] = 0;
- }
- }
- aRedstoneCircuitBlock.setRedstone((byte) ((aCircuitData[4] > 0) && (aCircuitData[4] <= aCircuitData[0]) ? (byte) aCircuitData[1] : (aCircuitData[1] <= 0) || (aCircuitData[1] > 15) ? (byte) aCircuitData[5] : 0), aRedstoneCircuitBlock.getOutputFacing());
- }
-
- public String getName() {
- return "Pulser";
- }
-
- public String getDescription() {
- return "Limits&Enlengths";
- }
-
- public String getDataDescription(int[] aCircuitData, int aCircuitDataIndex) {
- switch (aCircuitDataIndex) {
- case 0:
- return "Length";
- case 1:
- return "RS Out";
- }
- return "";
- }
-
- public boolean displayItemStack(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock, int aIndex) {
- return false;
- }
-
- public String getDataDisplay(int[] aCircuitData, int aCircuitDataIndex) {
- if (aCircuitDataIndex == 1) {
- if (aCircuitData[aCircuitDataIndex] == 16) {
- return "HIGHEST";
- }
- if (aCircuitData[aCircuitDataIndex] == 0) {
- return "LOWEST";
- }
- }
- return aCircuitDataIndex > 1 ? "" : null;
- }
-}
+package gregtech.common.redstonecircuits; + +import gregtech.api.interfaces.IRedstoneCircuitBlock; +import gregtech.api.util.GT_CircuitryBehavior; + +public class GT_Circuit_Pulser + extends GT_CircuitryBehavior { + public GT_Circuit_Pulser(int aIndex) { + super(aIndex); + } + + public void initParameters(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock) { + aCircuitData[0] = 1; + aCircuitData[1] = 16; + aCircuitData[4] = 0; + } + + public void validateParameters(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock) { + if (aCircuitData[0] < 1) { + aCircuitData[0] = 1; + } + if (aCircuitData[1] < 0) { + aCircuitData[1] = 0; + } + if (aCircuitData[1] > 16) { + aCircuitData[1] = 16; + } + if (aCircuitData[4] < 0) { + aCircuitData[4] = 0; + } + } + + public void onTick(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock) { + byte tRedstone = aCircuitData[1] == 0 ? getWeakestNonZeroRedstone(aRedstoneCircuitBlock) : getStrongestRedstone(aRedstoneCircuitBlock); + if (aCircuitData[4] == 0) { + aCircuitData[5] = tRedstone; + } + if ((tRedstone > 0) || (aCircuitData[4] > 0)) { + int tmp40_39 = 4; + int[] tmp40_38 = aCircuitData; + int tmp42_41 = tmp40_38[tmp40_39]; + tmp40_38[tmp40_39] = (tmp42_41 + 1); + if ((tmp42_41 >= aCircuitData[0]) && (tRedstone <= 0)) { + aCircuitData[4] = 0; + } + } + aRedstoneCircuitBlock.setRedstone((byte) ((aCircuitData[4] > 0) && (aCircuitData[4] <= aCircuitData[0]) ? (byte) aCircuitData[1] : (aCircuitData[1] <= 0) || (aCircuitData[1] > 15) ? (byte) aCircuitData[5] : 0), aRedstoneCircuitBlock.getOutputFacing()); + } + + public String getName() { + return "Pulser"; + } + + public String getDescription() { + return "Limits&Enlengths"; + } + + public String getDataDescription(int[] aCircuitData, int aCircuitDataIndex) { + switch (aCircuitDataIndex) { + case 0: + return "Length"; + case 1: + return "RS Out"; + } + return ""; + } + + public boolean displayItemStack(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock, int aIndex) { + return false; + } + + public String getDataDisplay(int[] aCircuitData, int aCircuitDataIndex) { + if (aCircuitDataIndex == 1) { + if (aCircuitData[aCircuitDataIndex] == 16) { + return "HIGHEST"; + } + if (aCircuitData[aCircuitDataIndex] == 0) { + return "LOWEST"; + } + } + return aCircuitDataIndex > 1 ? "" : null; + } +} diff --git a/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_Randomizer.java b/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_Randomizer.java index bfa7b98f91..b86981e5f9 100644 --- a/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_Randomizer.java +++ b/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_Randomizer.java @@ -1,80 +1,80 @@ -package gregtech.common.redstonecircuits;
-
-import gregtech.api.interfaces.IRedstoneCircuitBlock;
-import gregtech.api.util.GT_CircuitryBehavior;
-
-public class GT_Circuit_Randomizer
- extends GT_CircuitryBehavior {
- public GT_Circuit_Randomizer(int aIndex) {
- super(aIndex);
- }
-
- public void initParameters(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock) {
- aCircuitData[0] = 1;
- aCircuitData[4] = 0;
- }
-
- public void validateParameters(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock) {
- if (aCircuitData[0] < 1) {
- aCircuitData[0] = 1;
- }
- if (aCircuitData[3] < 0) {
- aCircuitData[3] = 0;
- }
- if (aCircuitData[3] > 1) {
- aCircuitData[3] = 1;
- }
- if (aCircuitData[4] < 0) {
- aCircuitData[4] = 0;
- }
- }
-
- public void onTick(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock) {
- if (aCircuitData[3] == 1) {
- if (getAnyRedstone(aRedstoneCircuitBlock)) {
- aCircuitData[4] += 1;
- } else {
- aCircuitData[4] = 0;
- }
- } else if (getAnyRedstone(aRedstoneCircuitBlock)) {
- aCircuitData[4] = 0;
- } else {
- aCircuitData[4] += 1;
- }
- if (aCircuitData[4] >= aCircuitData[0]) {
- aCircuitData[4] = 0;
- aRedstoneCircuitBlock.setRedstone((byte) aRedstoneCircuitBlock.getRandom(16), aRedstoneCircuitBlock.getOutputFacing());
- }
- }
-
- public String getName() {
- return "Randomizer";
- }
-
- public String getDescription() {
- return "Randomizes Redstone";
- }
-
- public String getDataDescription(int[] aCircuitData, int aCircuitDataIndex) {
- switch (aCircuitDataIndex) {
- case 0:
- return "Delay";
- case 3:
- return aCircuitData[aCircuitDataIndex] == 1 ? "RS => ON" : "RS => OFF";
- case 4:
- return "Status";
- }
- return "";
- }
-
- public boolean displayItemStack(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock, int aIndex) {
- return false;
- }
-
- public String getDataDisplay(int[] aCircuitData, int aCircuitDataIndex) {
- if (aCircuitDataIndex != 0) {
- return "";
- }
- return null;
- }
-}
+package gregtech.common.redstonecircuits; + +import gregtech.api.interfaces.IRedstoneCircuitBlock; +import gregtech.api.util.GT_CircuitryBehavior; + +public class GT_Circuit_Randomizer + extends GT_CircuitryBehavior { + public GT_Circuit_Randomizer(int aIndex) { + super(aIndex); + } + + public void initParameters(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock) { + aCircuitData[0] = 1; + aCircuitData[4] = 0; + } + + public void validateParameters(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock) { + if (aCircuitData[0] < 1) { + aCircuitData[0] = 1; + } + if (aCircuitData[3] < 0) { + aCircuitData[3] = 0; + } + if (aCircuitData[3] > 1) { + aCircuitData[3] = 1; + } + if (aCircuitData[4] < 0) { + aCircuitData[4] = 0; + } + } + + public void onTick(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock) { + if (aCircuitData[3] == 1) { + if (getAnyRedstone(aRedstoneCircuitBlock)) { + aCircuitData[4] += 1; + } else { + aCircuitData[4] = 0; + } + } else if (getAnyRedstone(aRedstoneCircuitBlock)) { + aCircuitData[4] = 0; + } else { + aCircuitData[4] += 1; + } + if (aCircuitData[4] >= aCircuitData[0]) { + aCircuitData[4] = 0; + aRedstoneCircuitBlock.setRedstone((byte) aRedstoneCircuitBlock.getRandom(16), aRedstoneCircuitBlock.getOutputFacing()); + } + } + + public String getName() { + return "Randomizer"; + } + + public String getDescription() { + return "Randomizes Redstone"; + } + + public String getDataDescription(int[] aCircuitData, int aCircuitDataIndex) { + switch (aCircuitDataIndex) { + case 0: + return "Delay"; + case 3: + return aCircuitData[aCircuitDataIndex] == 1 ? "RS => ON" : "RS => OFF"; + case 4: + return "Status"; + } + return ""; + } + + public boolean displayItemStack(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock, int aIndex) { + return false; + } + + public String getDataDisplay(int[] aCircuitData, int aCircuitDataIndex) { + if (aCircuitDataIndex != 0) { + return ""; + } + return null; + } +} diff --git a/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_RedstoneMeter.java b/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_RedstoneMeter.java index fb38e594a8..767b9ac8d0 100644 --- a/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_RedstoneMeter.java +++ b/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_RedstoneMeter.java @@ -1,86 +1,86 @@ -package gregtech.common.redstonecircuits;
-
-import gregtech.api.interfaces.IRedstoneCircuitBlock;
-import gregtech.api.util.GT_CircuitryBehavior;
-
-public class GT_Circuit_RedstoneMeter
- extends GT_CircuitryBehavior {
- public GT_Circuit_RedstoneMeter(int aIndex) {
- super(aIndex);
- }
-
- public void initParameters(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock) {
- aCircuitData[0] = 1;
- aCircuitData[1] = 15;
- aCircuitData[2] = 0;
- aCircuitData[3] = 15;
- }
-
- public void validateParameters(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock) {
- if (aCircuitData[0] < 0) {
- aCircuitData[0] = 0;
- }
- if (aCircuitData[0] > 15) {
- aCircuitData[0] = 15;
- }
- if (aCircuitData[1] < 0) {
- aCircuitData[1] = 0;
- }
- if (aCircuitData[1] > 15) {
- aCircuitData[1] = 15;
- }
- if (aCircuitData[1] < aCircuitData[0]) {
- aCircuitData[1] = aCircuitData[0];
- }
- if (aCircuitData[2] < 0) {
- aCircuitData[2] = 0;
- }
- if (aCircuitData[2] > 1) {
- aCircuitData[2] = 1;
- }
- if (aCircuitData[3] < 0) {
- aCircuitData[3] = 0;
- }
- if (aCircuitData[3] > 15) {
- aCircuitData[3] = 15;
- }
- }
-
- public void onTick(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock) {
- byte tRedstone = getStrongestRedstone(aRedstoneCircuitBlock);
- aRedstoneCircuitBlock.setRedstone((byte) (((tRedstone >= aCircuitData[0]) && (tRedstone <= aCircuitData[1]) ? 1 : 0) != (aCircuitData[2] != 0 ? 1 : 0) ? (byte) aCircuitData[3] : 0), aRedstoneCircuitBlock.getOutputFacing());
- }
-
- public String getName() {
- return "Redstone Meter";
- }
-
- public String getDescription() {
- return "Checks Boundaries";
- }
-
- public String getDataDescription(int[] aCircuitData, int aCircuitDataIndex) {
- switch (aCircuitDataIndex) {
- case 0:
- return "Lower";
- case 1:
- return "Upper";
- case 2:
- return "Invert:";
- case 3:
- return "RS Out:";
- }
- return "";
- }
-
- public boolean displayItemStack(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock, int aIndex) {
- return false;
- }
-
- public String getDataDisplay(int[] aCircuitData, int aCircuitDataIndex) {
- if (aCircuitDataIndex == 2) {
- return aCircuitData[2] == 0 ? "OFF" : "ON";
- }
- return null;
- }
-}
+package gregtech.common.redstonecircuits; + +import gregtech.api.interfaces.IRedstoneCircuitBlock; +import gregtech.api.util.GT_CircuitryBehavior; + +public class GT_Circuit_RedstoneMeter + extends GT_CircuitryBehavior { + public GT_Circuit_RedstoneMeter(int aIndex) { + super(aIndex); + } + + public void initParameters(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock) { + aCircuitData[0] = 1; + aCircuitData[1] = 15; + aCircuitData[2] = 0; + aCircuitData[3] = 15; + } + + public void validateParameters(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock) { + if (aCircuitData[0] < 0) { + aCircuitData[0] = 0; + } + if (aCircuitData[0] > 15) { + aCircuitData[0] = 15; + } + if (aCircuitData[1] < 0) { + aCircuitData[1] = 0; + } + if (aCircuitData[1] > 15) { + aCircuitData[1] = 15; + } + if (aCircuitData[1] < aCircuitData[0]) { + aCircuitData[1] = aCircuitData[0]; + } + if (aCircuitData[2] < 0) { + aCircuitData[2] = 0; + } + if (aCircuitData[2] > 1) { + aCircuitData[2] = 1; + } + if (aCircuitData[3] < 0) { + aCircuitData[3] = 0; + } + if (aCircuitData[3] > 15) { + aCircuitData[3] = 15; + } + } + + public void onTick(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock) { + byte tRedstone = getStrongestRedstone(aRedstoneCircuitBlock); + aRedstoneCircuitBlock.setRedstone((byte) (((tRedstone >= aCircuitData[0]) && (tRedstone <= aCircuitData[1]) ? 1 : 0) != (aCircuitData[2] != 0 ? 1 : 0) ? (byte) aCircuitData[3] : 0), aRedstoneCircuitBlock.getOutputFacing()); + } + + public String getName() { + return "Redstone Meter"; + } + + public String getDescription() { + return "Checks Boundaries"; + } + + public String getDataDescription(int[] aCircuitData, int aCircuitDataIndex) { + switch (aCircuitDataIndex) { + case 0: + return "Lower"; + case 1: + return "Upper"; + case 2: + return "Invert:"; + case 3: + return "RS Out:"; + } + return ""; + } + + public boolean displayItemStack(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock, int aIndex) { + return false; + } + + public String getDataDisplay(int[] aCircuitData, int aCircuitDataIndex) { + if (aCircuitDataIndex == 2) { + return aCircuitData[2] == 0 ? "OFF" : "ON"; + } + return null; + } +} diff --git a/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_Repeater.java b/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_Repeater.java index 1f584c7477..e501bb0258 100644 --- a/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_Repeater.java +++ b/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_Repeater.java @@ -1,79 +1,79 @@ -package gregtech.common.redstonecircuits;
-
-import gregtech.api.interfaces.IRedstoneCircuitBlock;
-import gregtech.api.util.GT_CircuitryBehavior;
-
-public class GT_Circuit_Repeater
- extends GT_CircuitryBehavior {
- public GT_Circuit_Repeater(int aIndex) {
- super(aIndex);
- }
-
- public void initParameters(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock) {
- aCircuitData[0] = 1;
- aCircuitData[4] = 0;
- aCircuitData[5] = -1;
- }
-
- public void validateParameters(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock) {
- if (aCircuitData[0] < 1) {
- aCircuitData[0] = 1;
- }
- if (aCircuitData[4] < 0) {
- aCircuitData[4] = 0;
- }
- if (aCircuitData[5] < -1) {
- aCircuitData[5] = -1;
- }
- }
-
- public void onTick(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock) {
- if (getAnyRedstone(aRedstoneCircuitBlock)) {
- aCircuitData[4] += 1;
- if (aCircuitData[5] < 0) {
- aCircuitData[5] = 0;
- }
- }
- if ((aCircuitData[5] >= 0) && (aCircuitData[5] < aCircuitData[0])) {
- aCircuitData[5] += 1;
- }
- if (aCircuitData[4] > 0) {
- if (aCircuitData[5] >= aCircuitData[0]) {
- aCircuitData[4] -= 1;
- aRedstoneCircuitBlock.setRedstone((byte) 15, aRedstoneCircuitBlock.getOutputFacing());
- } else {
- aRedstoneCircuitBlock.setRedstone((byte) 0, aRedstoneCircuitBlock.getOutputFacing());
- }
- } else {
- aRedstoneCircuitBlock.setRedstone((byte) 0, aRedstoneCircuitBlock.getOutputFacing());
- aCircuitData[5] = -1;
- }
- }
-
- public String getName() {
- return "Repeater";
- }
-
- public String getDescription() {
- return "Delays RS-Signal";
- }
-
- public String getDataDescription(int[] aCircuitData, int aCircuitDataIndex) {
- switch (aCircuitDataIndex) {
- case 0:
- return "Delay";
- }
- return "";
- }
-
- public boolean displayItemStack(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock, int aIndex) {
- return false;
- }
-
- public String getDataDisplay(int[] aCircuitData, int aCircuitDataIndex) {
- if (aCircuitDataIndex > 0) {
- return "";
- }
- return null;
- }
-}
+package gregtech.common.redstonecircuits; + +import gregtech.api.interfaces.IRedstoneCircuitBlock; +import gregtech.api.util.GT_CircuitryBehavior; + +public class GT_Circuit_Repeater + extends GT_CircuitryBehavior { + public GT_Circuit_Repeater(int aIndex) { + super(aIndex); + } + + public void initParameters(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock) { + aCircuitData[0] = 1; + aCircuitData[4] = 0; + aCircuitData[5] = -1; + } + + public void validateParameters(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock) { + if (aCircuitData[0] < 1) { + aCircuitData[0] = 1; + } + if (aCircuitData[4] < 0) { + aCircuitData[4] = 0; + } + if (aCircuitData[5] < -1) { + aCircuitData[5] = -1; + } + } + + public void onTick(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock) { + if (getAnyRedstone(aRedstoneCircuitBlock)) { + aCircuitData[4] += 1; + if (aCircuitData[5] < 0) { + aCircuitData[5] = 0; + } + } + if ((aCircuitData[5] >= 0) && (aCircuitData[5] < aCircuitData[0])) { + aCircuitData[5] += 1; + } + if (aCircuitData[4] > 0) { + if (aCircuitData[5] >= aCircuitData[0]) { + aCircuitData[4] -= 1; + aRedstoneCircuitBlock.setRedstone((byte) 15, aRedstoneCircuitBlock.getOutputFacing()); + } else { + aRedstoneCircuitBlock.setRedstone((byte) 0, aRedstoneCircuitBlock.getOutputFacing()); + } + } else { + aRedstoneCircuitBlock.setRedstone((byte) 0, aRedstoneCircuitBlock.getOutputFacing()); + aCircuitData[5] = -1; + } + } + + public String getName() { + return "Repeater"; + } + + public String getDescription() { + return "Delays RS-Signal"; + } + + public String getDataDescription(int[] aCircuitData, int aCircuitDataIndex) { + switch (aCircuitDataIndex) { + case 0: + return "Delay"; + } + return ""; + } + + public boolean displayItemStack(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock, int aIndex) { + return false; + } + + public String getDataDisplay(int[] aCircuitData, int aCircuitDataIndex) { + if (aCircuitDataIndex > 0) { + return ""; + } + return null; + } +} diff --git a/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_Timer.java b/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_Timer.java index 96a6f800b8..c012ea2afb 100644 --- a/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_Timer.java +++ b/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_Timer.java @@ -1,103 +1,103 @@ -package gregtech.common.redstonecircuits;
-
-import gregtech.api.interfaces.IRedstoneCircuitBlock;
-import gregtech.api.util.GT_CircuitryBehavior;
-
-public class GT_Circuit_Timer
- extends GT_CircuitryBehavior {
- public GT_Circuit_Timer(int aIndex) {
- super(aIndex);
- }
-
- public void initParameters(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock) {
- aCircuitData[0] = 2;
- aCircuitData[1] = 1;
- aCircuitData[2] = 2;
- aCircuitData[4] = 0;
- }
-
- public void validateParameters(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock) {
- if (aCircuitData[0] < 2) {
- aCircuitData[0] = 2;
- }
- if (aCircuitData[1] < 1) {
- aCircuitData[1] = 1;
- }
- if (aCircuitData[2] < 2) {
- aCircuitData[2] = 2;
- }
- if (aCircuitData[3] < 0) {
- aCircuitData[3] = 0;
- }
- if (aCircuitData[3] > 1) {
- aCircuitData[3] = 1;
- }
- if (aCircuitData[4] < 0) {
- aCircuitData[4] = 0;
- }
- }
-
- public void onTick(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock) {
- if (aCircuitData[3] == 1) {
- if (getAnyRedstone(aRedstoneCircuitBlock)) {
- aCircuitData[4] += 1;
- } else {
- aCircuitData[4] = 0;
- }
- } else if (getAnyRedstone(aRedstoneCircuitBlock)) {
- aCircuitData[4] = 0;
- } else {
- aCircuitData[4] += 1;
- }
- if (aCircuitData[4] >= aCircuitData[0]) {
- if (aCircuitData[1] > 1) {
- if (aCircuitData[4] >= aCircuitData[0] + (aCircuitData[1] - 1) * aCircuitData[2]) {
- aRedstoneCircuitBlock.setRedstone((byte) 15, aRedstoneCircuitBlock.getOutputFacing());
- aCircuitData[4] = 0;
- } else {
- aRedstoneCircuitBlock.setRedstone((byte) ((aCircuitData[4] - aCircuitData[0]) % aCircuitData[2] == 0 ? 15 : 0), aRedstoneCircuitBlock.getOutputFacing());
- }
- } else {
- aRedstoneCircuitBlock.setRedstone((byte) 15, aRedstoneCircuitBlock.getOutputFacing());
- aCircuitData[4] = 0;
- }
- } else {
- aRedstoneCircuitBlock.setRedstone((byte) 0, aRedstoneCircuitBlock.getOutputFacing());
- }
- }
-
- public String getName() {
- return "Timer";
- }
-
- public String getDescription() {
- return "Pulses Redstone";
- }
-
- public String getDataDescription(int[] aCircuitData, int aCircuitDataIndex) {
- switch (aCircuitDataIndex) {
- case 0:
- return "Delay";
- case 1:
- return "Pulses";
- case 2:
- return "Length";
- case 3:
- return aCircuitData[aCircuitDataIndex] == 1 ? "RS => ON" : "RS => OFF";
- case 4:
- return "Time";
- }
- return "";
- }
-
- public boolean displayItemStack(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock, int aIndex) {
- return false;
- }
-
- public String getDataDisplay(int[] aCircuitData, int aCircuitDataIndex) {
- if (aCircuitDataIndex == 3) {
- return "";
- }
- return null;
- }
-}
+package gregtech.common.redstonecircuits; + +import gregtech.api.interfaces.IRedstoneCircuitBlock; +import gregtech.api.util.GT_CircuitryBehavior; + +public class GT_Circuit_Timer + extends GT_CircuitryBehavior { + public GT_Circuit_Timer(int aIndex) { + super(aIndex); + } + + public void initParameters(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock) { + aCircuitData[0] = 2; + aCircuitData[1] = 1; + aCircuitData[2] = 2; + aCircuitData[4] = 0; + } + + public void validateParameters(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock) { + if (aCircuitData[0] < 2) { + aCircuitData[0] = 2; + } + if (aCircuitData[1] < 1) { + aCircuitData[1] = 1; + } + if (aCircuitData[2] < 2) { + aCircuitData[2] = 2; + } + if (aCircuitData[3] < 0) { + aCircuitData[3] = 0; + } + if (aCircuitData[3] > 1) { + aCircuitData[3] = 1; + } + if (aCircuitData[4] < 0) { + aCircuitData[4] = 0; + } + } + + public void onTick(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock) { + if (aCircuitData[3] == 1) { + if (getAnyRedstone(aRedstoneCircuitBlock)) { + aCircuitData[4] += 1; + } else { + aCircuitData[4] = 0; + } + } else if (getAnyRedstone(aRedstoneCircuitBlock)) { + aCircuitData[4] = 0; + } else { + aCircuitData[4] += 1; + } + if (aCircuitData[4] >= aCircuitData[0]) { + if (aCircuitData[1] > 1) { + if (aCircuitData[4] >= aCircuitData[0] + (aCircuitData[1] - 1) * aCircuitData[2]) { + aRedstoneCircuitBlock.setRedstone((byte) 15, aRedstoneCircuitBlock.getOutputFacing()); + aCircuitData[4] = 0; + } else { + aRedstoneCircuitBlock.setRedstone((byte) ((aCircuitData[4] - aCircuitData[0]) % aCircuitData[2] == 0 ? 15 : 0), aRedstoneCircuitBlock.getOutputFacing()); + } + } else { + aRedstoneCircuitBlock.setRedstone((byte) 15, aRedstoneCircuitBlock.getOutputFacing()); + aCircuitData[4] = 0; + } + } else { + aRedstoneCircuitBlock.setRedstone((byte) 0, aRedstoneCircuitBlock.getOutputFacing()); + } + } + + public String getName() { + return "Timer"; + } + + public String getDescription() { + return "Pulses Redstone"; + } + + public String getDataDescription(int[] aCircuitData, int aCircuitDataIndex) { + switch (aCircuitDataIndex) { + case 0: + return "Delay"; + case 1: + return "Pulses"; + case 2: + return "Length"; + case 3: + return aCircuitData[aCircuitDataIndex] == 1 ? "RS => ON" : "RS => OFF"; + case 4: + return "Time"; + } + return ""; + } + + public boolean displayItemStack(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock, int aIndex) { + return false; + } + + public String getDataDisplay(int[] aCircuitData, int aCircuitDataIndex) { + if (aCircuitDataIndex == 3) { + return ""; + } + return null; + } +} diff --git a/src/main/java/gregtech/common/render/GT_CapeRenderer.java b/src/main/java/gregtech/common/render/GT_CapeRenderer.java index f2bdf10dda..be95d7fb04 100644 --- a/src/main/java/gregtech/common/render/GT_CapeRenderer.java +++ b/src/main/java/gregtech/common/render/GT_CapeRenderer.java @@ -1,95 +1,111 @@ -package gregtech.common.render;
-
-import gregtech.api.enums.GT_Values;
-import gregtech.api.util.GT_Log;
-import gregtech.api.util.GT_Utility;
-import net.minecraft.client.entity.AbstractClientPlayer;
-import net.minecraft.client.model.ModelBiped;
-import net.minecraft.client.renderer.entity.RenderManager;
-import net.minecraft.client.renderer.entity.RenderPlayer;
-import net.minecraft.potion.Potion;
-import net.minecraft.util.MathHelper;
-import net.minecraft.util.ResourceLocation;
-import net.minecraftforge.client.event.RenderPlayerEvent;
-import org.lwjgl.opengl.GL11;
-
-import java.util.Collection;
-
-public class GT_CapeRenderer
- extends RenderPlayer {
- private final ResourceLocation[] mCapes = {new ResourceLocation("gregtech:textures/BrainTechCape.png"), new ResourceLocation("gregtech:textures/GregTechCape.png"), new ResourceLocation("gregtech:textures/MrBrainCape.png"), new ResourceLocation("gregtech:textures/GregoriusCape.png")};
- private final Collection<String> mCapeList;
-
- public GT_CapeRenderer(Collection<String> aCapeList) {
- this.mCapeList = aCapeList;
- setRenderManager(RenderManager.instance);
- }
-
- public void receiveRenderSpecialsEvent(RenderPlayerEvent.Specials.Pre aEvent) {
- AbstractClientPlayer aPlayer = (AbstractClientPlayer) aEvent.entityPlayer;
- if (GT_Utility.getFullInvisibility(aPlayer)) {
- aEvent.setCanceled(true);
- return;
- }
- float aPartialTicks = aEvent.partialRenderTick;
- if (aPlayer.isInvisible()) {
- return;
- }
- if (GT_Utility.getPotion(aPlayer, Integer.valueOf(Potion.invisibility.id).intValue())) {
- return;
- }
- try {
- ResourceLocation tResource = null;
- if (aPlayer.getDisplayName().equalsIgnoreCase("Friedi4321")) {
- tResource = this.mCapes[0];
- }
- if (this.mCapeList.contains(aPlayer.getDisplayName().toLowerCase())) {
- tResource = this.mCapes[1];
- }
- if (aPlayer.getDisplayName().equalsIgnoreCase("Mr_Brain")) {
- tResource = this.mCapes[2];
- }
- if (aPlayer.getDisplayName().equalsIgnoreCase("GregoriusT")) {
- tResource = this.mCapes[3];
- }
- if ((tResource != null) && (!aPlayer.getHideCape())) {
- bindTexture(tResource);
- GL11.glPushMatrix();
- GL11.glTranslatef(0.0F, 0.0F, 0.125F);
- double d0 = aPlayer.field_71091_bM + (aPlayer.field_71094_bP - aPlayer.field_71091_bM) * aPartialTicks - (aPlayer.prevPosX + (aPlayer.posX - aPlayer.prevPosX) * aPartialTicks);
- double d1 = aPlayer.field_71096_bN + (aPlayer.field_71095_bQ - aPlayer.field_71096_bN) * aPartialTicks - (aPlayer.prevPosY + (aPlayer.posY - aPlayer.prevPosY) * aPartialTicks);
- double d2 = aPlayer.field_71097_bO + (aPlayer.field_71085_bR - aPlayer.field_71097_bO) * aPartialTicks - (aPlayer.prevPosZ + (aPlayer.posZ - aPlayer.prevPosZ) * aPartialTicks);
- float f6 = aPlayer.prevRenderYawOffset + (aPlayer.renderYawOffset - aPlayer.prevRenderYawOffset) * aPartialTicks;
- double d3 = MathHelper.sin(f6 * 3.141593F / 180.0F);
- double d4 = -MathHelper.cos(f6 * 3.141593F / 180.0F);
- float f7 = (float) d1 * 10.0F;
- float f8 = (float) (d0 * d3 + d2 * d4) * 100.0F;
- float f9 = (float) (d0 * d4 - d2 * d3) * 100.0F;
- if (f7 < -6.0F) {
- f7 = -6.0F;
- }
- if (f7 > 32.0F) {
- f7 = 32.0F;
- }
- if (f8 < 0.0F) {
- f8 = 0.0F;
- }
- float f10 = aPlayer.prevCameraYaw + (aPlayer.cameraYaw - aPlayer.prevCameraYaw) * aPartialTicks;
- f7 += MathHelper.sin((aPlayer.prevDistanceWalkedModified + (aPlayer.distanceWalkedModified - aPlayer.prevDistanceWalkedModified) * aPartialTicks) * 6.0F) * 32.0F * f10;
- if (aPlayer.isSneaking()) {
- f7 += 25.0F;
- }
- GL11.glRotatef(6.0F + f8 / 2.0F + f7, 1.0F, 0.0F, 0.0F);
- GL11.glRotatef(f9 / 2.0F, 0.0F, 0.0F, 1.0F);
- GL11.glRotatef(-f9 / 2.0F, 0.0F, 1.0F, 0.0F);
- GL11.glRotatef(180.0F, 0.0F, 1.0F, 0.0F);
- ((ModelBiped) this.mainModel).renderCloak(0.0625F);
- GL11.glPopMatrix();
- }
- } catch (Throwable e) {
- if (GT_Values.D1) {
- e.printStackTrace(GT_Log.err);
- }
- }
- }
-}
\ No newline at end of file +package gregtech.common.render; + +import gregtech.api.enums.GT_Values; +import gregtech.api.util.GT_Log; +import gregtech.api.util.GT_Utility; +import net.minecraft.client.entity.AbstractClientPlayer; +import net.minecraft.client.model.ModelBiped; +import net.minecraft.client.renderer.entity.RenderManager; +import net.minecraft.client.renderer.entity.RenderPlayer; +import net.minecraft.potion.Potion; +import net.minecraft.util.MathHelper; +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.client.event.RenderPlayerEvent; +import org.lwjgl.opengl.GL11; + +import java.util.Collection; + +public class GT_CapeRenderer + extends RenderPlayer { + private final ResourceLocation[] mCapes = { new ResourceLocation("gregtech:textures/BrainTechCape.png"), + new ResourceLocation("gregtech:textures/GregTechCape.png"), + new ResourceLocation("gregtech:textures/MrBrainCape.png"), + new ResourceLocation("gregtech:textures/GregoriusCape.png"), + new ResourceLocation("gregtech:textures/DonorCape.png"), + new ResourceLocation("gregtech:textures/DevCape.png"), + new ResourceLocation("gregtech:textures/TecCape.png")}; + private final Collection<String> mCapeList; + + public GT_CapeRenderer(Collection<String> aCapeList) { + this.mCapeList = aCapeList; + setRenderManager(RenderManager.instance); + } + + public void receiveRenderSpecialsEvent(RenderPlayerEvent.Specials.Pre aEvent) { + AbstractClientPlayer aPlayer = (AbstractClientPlayer) aEvent.entityPlayer; + if (GT_Utility.getFullInvisibility(aPlayer)) { + aEvent.setCanceled(true); + return; + } + float aPartialTicks = aEvent.partialRenderTick; + if (aPlayer.isInvisible()) { + return; + } + if (GT_Utility.getPotion(aPlayer, Integer.valueOf(Potion.invisibility.id).intValue())) { + return; + } + try { + ResourceLocation tResource = null; + if (aPlayer.getDisplayName().equalsIgnoreCase("Friedi4321")) { + tResource = this.mCapes[0]; + } + if (this.mCapeList.contains(aPlayer.getDisplayName().toLowerCase())) { + tResource = this.mCapes[1]; + } + if (aPlayer.getDisplayName().equalsIgnoreCase("Mr_Brain")) { + tResource = this.mCapes[2]; + } + if (aPlayer.getDisplayName().equalsIgnoreCase("GregoriusT")) { + tResource = this.mCapes[3]; + } + if (this.mCapeList.contains(aPlayer.getDisplayName().toLowerCase()+":capedonor")) { + tResource = this.mCapes[4]; + } + if (this.mCapeList.contains(aPlayer.getDisplayName().toLowerCase()+":capedev")) { + tResource = this.mCapes[5]; + } + if (this.mCapeList.contains(aPlayer.getDisplayName().toLowerCase()+":capetec")) { + tResource = this.mCapes[6]; + } + + if ((tResource != null) && (!aPlayer.getHideCape())) { + bindTexture(tResource); + GL11.glPushMatrix(); + GL11.glTranslatef(0.0F, 0.0F, 0.125F); + double d0 = aPlayer.field_71091_bM + (aPlayer.field_71094_bP - aPlayer.field_71091_bM) * aPartialTicks - (aPlayer.prevPosX + (aPlayer.posX - aPlayer.prevPosX) * aPartialTicks); + double d1 = aPlayer.field_71096_bN + (aPlayer.field_71095_bQ - aPlayer.field_71096_bN) * aPartialTicks - (aPlayer.prevPosY + (aPlayer.posY - aPlayer.prevPosY) * aPartialTicks); + double d2 = aPlayer.field_71097_bO + (aPlayer.field_71085_bR - aPlayer.field_71097_bO) * aPartialTicks - (aPlayer.prevPosZ + (aPlayer.posZ - aPlayer.prevPosZ) * aPartialTicks); + float f6 = aPlayer.prevRenderYawOffset + (aPlayer.renderYawOffset - aPlayer.prevRenderYawOffset) * aPartialTicks; + double d3 = MathHelper.sin(f6 * 3.141593F / 180.0F); + double d4 = -MathHelper.cos(f6 * 3.141593F / 180.0F); + float f7 = (float) d1 * 10.0F; + float f8 = (float) (d0 * d3 + d2 * d4) * 100.0F; + float f9 = (float) (d0 * d4 - d2 * d3) * 100.0F; + if (f7 < -6.0F) { + f7 = -6.0F; + } + if (f7 > 32.0F) { + f7 = 32.0F; + } + if (f8 < 0.0F) { + f8 = 0.0F; + } + float f10 = aPlayer.prevCameraYaw + (aPlayer.cameraYaw - aPlayer.prevCameraYaw) * aPartialTicks; + f7 += MathHelper.sin((aPlayer.prevDistanceWalkedModified + (aPlayer.distanceWalkedModified - aPlayer.prevDistanceWalkedModified) * aPartialTicks) * 6.0F) * 32.0F * f10; + if (aPlayer.isSneaking()) { + f7 += 25.0F; + } + GL11.glRotatef(6.0F + f8 / 2.0F + f7, 1.0F, 0.0F, 0.0F); + GL11.glRotatef(f9 / 2.0F, 0.0F, 0.0F, 1.0F); + GL11.glRotatef(-f9 / 2.0F, 0.0F, 1.0F, 0.0F); + GL11.glRotatef(180.0F, 0.0F, 1.0F, 0.0F); + ((ModelBiped) this.mainModel).renderCloak(0.0625F); + GL11.glPopMatrix(); + } + } catch (Throwable e) { + if (GT_Values.D1) { + e.printStackTrace(GT_Log.err); + } + } + } +} diff --git a/src/main/java/gregtech/common/render/GT_MetaGenerated_Item_Renderer.java b/src/main/java/gregtech/common/render/GT_MetaGenerated_Item_Renderer.java index 0db9e8be6d..b8b7a121f2 100644 --- a/src/main/java/gregtech/common/render/GT_MetaGenerated_Item_Renderer.java +++ b/src/main/java/gregtech/common/render/GT_MetaGenerated_Item_Renderer.java @@ -1,152 +1,152 @@ -package gregtech.common.render;
-
-import gregtech.api.interfaces.IIconContainer;
-import gregtech.api.items.GT_MetaGenerated_Item;
-import gregtech.api.util.GT_Utility;
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.renderer.ItemRenderer;
-import net.minecraft.client.renderer.Tessellator;
-import net.minecraft.client.renderer.entity.RenderItem;
-import net.minecraft.client.renderer.texture.TextureMap;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.IIcon;
-import net.minecraftforge.client.IItemRenderer;
-import net.minecraftforge.client.MinecraftForgeClient;
-import net.minecraftforge.fluids.FluidStack;
-import org.lwjgl.opengl.GL11;
-
-import java.util.Iterator;
-
-public class GT_MetaGenerated_Item_Renderer
- implements IItemRenderer {
- public GT_MetaGenerated_Item_Renderer() {
- GT_MetaGenerated_Item tItem;
- for (Iterator i$ = GT_MetaGenerated_Item.sInstances.values().iterator(); i$.hasNext(); MinecraftForgeClient.registerItemRenderer(tItem, this)) {
- tItem = (GT_MetaGenerated_Item) i$.next();
- }
- }
-
- public boolean handleRenderType(ItemStack aStack, IItemRenderer.ItemRenderType aType) {
- if ((GT_Utility.isStackInvalid(aStack)) || (aStack.getItemDamage() < 0)) {
- return false;
- }
- return (aType == IItemRenderer.ItemRenderType.EQUIPPED_FIRST_PERSON) || (aType == IItemRenderer.ItemRenderType.INVENTORY) || (aType == IItemRenderer.ItemRenderType.EQUIPPED) || (aType == IItemRenderer.ItemRenderType.ENTITY);
- }
-
- public boolean shouldUseRenderHelper(IItemRenderer.ItemRenderType aType, ItemStack aStack, IItemRenderer.ItemRendererHelper aHelper) {
- if (GT_Utility.isStackInvalid(aStack)) {
- return false;
- }
- return aType == IItemRenderer.ItemRenderType.ENTITY;
- }
-
- public void renderItem(IItemRenderer.ItemRenderType type, ItemStack aStack, Object... data) {
- if (GT_Utility.isStackInvalid(aStack)) {
- return;
- }
- short aMetaData = (short) aStack.getItemDamage();
- if (aMetaData < 0) {
- return;
- }
- GT_MetaGenerated_Item aItem = (GT_MetaGenerated_Item) aStack.getItem();
-
-
- GL11.glEnable(3042);
- if (type == IItemRenderer.ItemRenderType.ENTITY) {
- if (RenderItem.renderInFrame) {
- GL11.glScalef(0.85F, 0.85F, 0.85F);
- GL11.glRotatef(-90.0F, 0.0F, 1.0F, 0.0F);
- GL11.glTranslated(-0.5D, -0.42D, 0.0D);
- } else {
- GL11.glTranslated(-0.5D, -0.42D, 0.0D);
- }
- }
- GL11.glColor3f(1.0F, 1.0F, 1.0F);
- if (aMetaData < aItem.mOffset) {
- IIconContainer aIcon = aItem.getIconContainer(aMetaData);
- IIcon tOverlay = null;
- IIcon tFluidIcon = null;
- IIcon tIcon;
- if (aIcon == null) {
- tIcon = aStack.getIconIndex();
- } else {
- tIcon = aIcon.getIcon();
- tOverlay = aIcon.getOverlayIcon();
- }
- if (tIcon == null) {
- return;
- }
- FluidStack tFluid = GT_Utility.getFluidForFilledItem(aStack, true);
- if ((tOverlay != null) && (tFluid != null) && (tFluid.getFluid() != null)) {
- tFluidIcon = tFluid.getFluid().getIcon(tFluid);
- }
- Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.locationItemsTexture);
- GL11.glBlendFunc(770, 771);
- if (tFluidIcon == null) {
- short[] tModulation = aItem.getRGBa(aStack);
- GL11.glColor3f(tModulation[0] / 255.0F, tModulation[1] / 255.0F, tModulation[2] / 255.0F);
- }
- if (type.equals(IItemRenderer.ItemRenderType.INVENTORY)) {
- GT_RenderUtil.renderItemIcon(tIcon, 16.0D, 0.001D, 0.0F, 0.0F, -1.0F);
- } else {
- ItemRenderer.renderItemIn2D(Tessellator.instance, tIcon.getMaxU(), tIcon.getMinV(), tIcon.getMinU(), tIcon.getMaxV(), tIcon.getIconWidth(), tIcon.getIconHeight(), 0.0625F);
- }
- if (tFluidIcon != null) {
- assert (tFluid != null);
- int tColor = tFluid.getFluid().getColor(tFluid);
- GL11.glColor3f((tColor >> 16 & 0xFF) / 255.0F, (tColor >> 8 & 0xFF) / 255.0F, (tColor & 0xFF) / 255.0F);
- Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.locationBlocksTexture);
- GL11.glBlendFunc(770, 771);
- GL11.glDepthFunc(514);
- if (type.equals(IItemRenderer.ItemRenderType.INVENTORY)) {
- GT_RenderUtil.renderItemIcon(tFluidIcon, 16.0D, 0.001D, 0.0F, 0.0F, -1.0F);
- } else {
- ItemRenderer.renderItemIn2D(Tessellator.instance, tFluidIcon.getMaxU(), tFluidIcon.getMinV(), tFluidIcon.getMinU(), tFluidIcon.getMaxV(), tFluidIcon.getIconWidth(), tFluidIcon.getIconHeight(), 0.0625F);
- }
- GL11.glDepthFunc(515);
- }
- GL11.glColor3f(1.0F, 1.0F, 1.0F);
- if (tOverlay != null) {
- Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.locationItemsTexture);
- GL11.glBlendFunc(770, 771);
- if (type.equals(IItemRenderer.ItemRenderType.INVENTORY)) {
- GT_RenderUtil.renderItemIcon(tOverlay, 16.0D, 0.001D, 0.0F, 0.0F, -1.0F);
- } else {
- ItemRenderer.renderItemIn2D(Tessellator.instance, tOverlay.getMaxU(), tOverlay.getMinV(), tOverlay.getMinU(), tOverlay.getMaxV(), tOverlay.getIconWidth(), tOverlay.getIconHeight(), 0.0625F);
- }
- }
- } else {
- IIcon tIcon;
- if (aItem.mIconList[(aMetaData - aItem.mOffset)].length > 1) {
- Long[] tStats = (Long[]) aItem.mElectricStats.get(Short.valueOf(aMetaData));
-
- if ((tStats != null) && (tStats[3].longValue() < 0L)) {
- long tCharge = aItem.getRealCharge(aStack);
-
- if (tCharge <= 0L) {
- tIcon = aItem.mIconList[(aMetaData - aItem.mOffset)][1];
- } else {
-
- if (tCharge >= tStats[0].longValue()) {
- tIcon = aItem.mIconList[(aMetaData - aItem.mOffset)][8];
- } else {
- tIcon = aItem.mIconList[(aMetaData - aItem.mOffset)][(7 - (int) java.lang.Math.max(0L, java.lang.Math.min(5L, (tStats[0].longValue() - tCharge) * 6L / tStats[0].longValue())))];
- }
- }
- } else {
- tIcon = aItem.mIconList[(aMetaData - aItem.mOffset)][0];
- }
- } else {
- tIcon = aItem.mIconList[(aMetaData - aItem.mOffset)][0];
- }
- Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.locationItemsTexture);
- GL11.glBlendFunc(770, 771);
- if (type.equals(IItemRenderer.ItemRenderType.INVENTORY)) {
- GT_RenderUtil.renderItemIcon(tIcon, 16.0D, 0.001D, 0.0F, 0.0F, -1.0F);
- } else {
- ItemRenderer.renderItemIn2D(Tessellator.instance, tIcon.getMaxU(), tIcon.getMinV(), tIcon.getMinU(), tIcon.getMaxV(), tIcon.getIconWidth(), tIcon.getIconHeight(), 0.0625F);
- }
- }
- GL11.glDisable(3042);
- }
-}
+package gregtech.common.render; + +import gregtech.api.interfaces.IIconContainer; +import gregtech.api.items.GT_MetaGenerated_Item; +import gregtech.api.util.GT_Utility; +import net.minecraft.client.Minecraft; +import net.minecraft.client.renderer.ItemRenderer; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.client.renderer.entity.RenderItem; +import net.minecraft.client.renderer.texture.TextureMap; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; +import net.minecraftforge.client.IItemRenderer; +import net.minecraftforge.client.MinecraftForgeClient; +import net.minecraftforge.fluids.FluidStack; +import org.lwjgl.opengl.GL11; + +import java.util.Iterator; + +public class GT_MetaGenerated_Item_Renderer + implements IItemRenderer { + public GT_MetaGenerated_Item_Renderer() { + GT_MetaGenerated_Item tItem; + for (Iterator i$ = GT_MetaGenerated_Item.sInstances.values().iterator(); i$.hasNext(); MinecraftForgeClient.registerItemRenderer(tItem, this)) { + tItem = (GT_MetaGenerated_Item) i$.next(); + } + } + + public boolean handleRenderType(ItemStack aStack, IItemRenderer.ItemRenderType aType) { + if ((GT_Utility.isStackInvalid(aStack)) || (aStack.getItemDamage() < 0)) { + return false; + } + return (aType == IItemRenderer.ItemRenderType.EQUIPPED_FIRST_PERSON) || (aType == IItemRenderer.ItemRenderType.INVENTORY) || (aType == IItemRenderer.ItemRenderType.EQUIPPED) || (aType == IItemRenderer.ItemRenderType.ENTITY); + } + + public boolean shouldUseRenderHelper(IItemRenderer.ItemRenderType aType, ItemStack aStack, IItemRenderer.ItemRendererHelper aHelper) { + if (GT_Utility.isStackInvalid(aStack)) { + return false; + } + return aType == IItemRenderer.ItemRenderType.ENTITY; + } + + public void renderItem(IItemRenderer.ItemRenderType type, ItemStack aStack, Object... data) { + if (GT_Utility.isStackInvalid(aStack)) { + return; + } + short aMetaData = (short) aStack.getItemDamage(); + if (aMetaData < 0) { + return; + } + GT_MetaGenerated_Item aItem = (GT_MetaGenerated_Item) aStack.getItem(); + + + GL11.glEnable(3042); + if (type == IItemRenderer.ItemRenderType.ENTITY) { + if (RenderItem.renderInFrame) { + GL11.glScalef(0.85F, 0.85F, 0.85F); + GL11.glRotatef(-90.0F, 0.0F, 1.0F, 0.0F); + GL11.glTranslated(-0.5D, -0.42D, 0.0D); + } else { + GL11.glTranslated(-0.5D, -0.42D, 0.0D); + } + } + GL11.glColor3f(1.0F, 1.0F, 1.0F); + if (aMetaData < aItem.mOffset) { + IIconContainer aIcon = aItem.getIconContainer(aMetaData); + IIcon tOverlay = null; + IIcon tFluidIcon = null; + IIcon tIcon; + if (aIcon == null) { + tIcon = aStack.getIconIndex(); + } else { + tIcon = aIcon.getIcon(); + tOverlay = aIcon.getOverlayIcon(); + } + if (tIcon == null) { + return; + } + FluidStack tFluid = GT_Utility.getFluidForFilledItem(aStack, true); + if ((tOverlay != null) && (tFluid != null) && (tFluid.getFluid() != null)) { + tFluidIcon = tFluid.getFluid().getIcon(tFluid); + } + Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.locationItemsTexture); + GL11.glBlendFunc(770, 771); + if (tFluidIcon == null) { + short[] tModulation = aItem.getRGBa(aStack); + GL11.glColor3f(tModulation[0] / 255.0F, tModulation[1] / 255.0F, tModulation[2] / 255.0F); + } + if (type.equals(IItemRenderer.ItemRenderType.INVENTORY)) { + GT_RenderUtil.renderItemIcon(tIcon, 16.0D, 0.001D, 0.0F, 0.0F, -1.0F); + } else { + ItemRenderer.renderItemIn2D(Tessellator.instance, tIcon.getMaxU(), tIcon.getMinV(), tIcon.getMinU(), tIcon.getMaxV(), tIcon.getIconWidth(), tIcon.getIconHeight(), 0.0625F); + } + if (tFluidIcon != null) { + assert (tFluid != null); + int tColor = tFluid.getFluid().getColor(tFluid); + GL11.glColor3f((tColor >> 16 & 0xFF) / 255.0F, (tColor >> 8 & 0xFF) / 255.0F, (tColor & 0xFF) / 255.0F); + Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.locationBlocksTexture); + GL11.glBlendFunc(770, 771); + GL11.glDepthFunc(514); + if (type.equals(IItemRenderer.ItemRenderType.INVENTORY)) { + GT_RenderUtil.renderItemIcon(tFluidIcon, 16.0D, 0.001D, 0.0F, 0.0F, -1.0F); + } else { + ItemRenderer.renderItemIn2D(Tessellator.instance, tFluidIcon.getMaxU(), tFluidIcon.getMinV(), tFluidIcon.getMinU(), tFluidIcon.getMaxV(), tFluidIcon.getIconWidth(), tFluidIcon.getIconHeight(), 0.0625F); + } + GL11.glDepthFunc(515); + } + GL11.glColor3f(1.0F, 1.0F, 1.0F); + if (tOverlay != null) { + Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.locationItemsTexture); + GL11.glBlendFunc(770, 771); + if (type.equals(IItemRenderer.ItemRenderType.INVENTORY)) { + GT_RenderUtil.renderItemIcon(tOverlay, 16.0D, 0.001D, 0.0F, 0.0F, -1.0F); + } else { + ItemRenderer.renderItemIn2D(Tessellator.instance, tOverlay.getMaxU(), tOverlay.getMinV(), tOverlay.getMinU(), tOverlay.getMaxV(), tOverlay.getIconWidth(), tOverlay.getIconHeight(), 0.0625F); + } + } + } else { + IIcon tIcon; + if (aItem.mIconList[(aMetaData - aItem.mOffset)].length > 1) { + Long[] tStats = (Long[]) aItem.mElectricStats.get(Short.valueOf(aMetaData)); + + if ((tStats != null) && (tStats[3].longValue() < 0L)) { + long tCharge = aItem.getRealCharge(aStack); + + if (tCharge <= 0L) { + tIcon = aItem.mIconList[(aMetaData - aItem.mOffset)][1]; + } else { + + if (tCharge >= tStats[0].longValue()) { + tIcon = aItem.mIconList[(aMetaData - aItem.mOffset)][8]; + } else { + tIcon = aItem.mIconList[(aMetaData - aItem.mOffset)][(7 - (int) java.lang.Math.max(0L, java.lang.Math.min(5L, (tStats[0].longValue() - tCharge) * 6L / tStats[0].longValue())))]; + } + } + } else { + tIcon = aItem.mIconList[(aMetaData - aItem.mOffset)][0]; + } + } else { + tIcon = aItem.mIconList[(aMetaData - aItem.mOffset)][0]; + } + Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.locationItemsTexture); + GL11.glBlendFunc(770, 771); + if (type.equals(IItemRenderer.ItemRenderType.INVENTORY)) { + GT_RenderUtil.renderItemIcon(tIcon, 16.0D, 0.001D, 0.0F, 0.0F, -1.0F); + } else { + ItemRenderer.renderItemIn2D(Tessellator.instance, tIcon.getMaxU(), tIcon.getMinV(), tIcon.getMinU(), tIcon.getMaxV(), tIcon.getIconWidth(), tIcon.getIconHeight(), 0.0625F); + } + } + GL11.glDisable(3042); + } +} diff --git a/src/main/java/gregtech/common/render/GT_MetaGenerated_Tool_Renderer.java b/src/main/java/gregtech/common/render/GT_MetaGenerated_Tool_Renderer.java index 40d4acf8f8..4f869fa149 100644 --- a/src/main/java/gregtech/common/render/GT_MetaGenerated_Tool_Renderer.java +++ b/src/main/java/gregtech/common/render/GT_MetaGenerated_Tool_Renderer.java @@ -1,184 +1,184 @@ -package gregtech.common.render;
-
-import gregtech.api.enums.Materials;
-import gregtech.api.interfaces.IIconContainer;
-import gregtech.api.interfaces.IToolStats;
-import gregtech.api.items.GT_MetaGenerated_Tool;
-import gregtech.api.util.GT_Utility;
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.renderer.ItemRenderer;
-import net.minecraft.client.renderer.Tessellator;
-import net.minecraft.client.renderer.entity.RenderItem;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.IIcon;
-import net.minecraftforge.client.IItemRenderer;
-import net.minecraftforge.client.MinecraftForgeClient;
-import org.lwjgl.opengl.GL11;
-
-public class GT_MetaGenerated_Tool_Renderer
- implements IItemRenderer {
- public GT_MetaGenerated_Tool_Renderer() {
- for (GT_MetaGenerated_Tool tItem : GT_MetaGenerated_Tool.sInstances.values()) {
- if (tItem != null) {
- MinecraftForgeClient.registerItemRenderer(tItem, this);
- }
- }
- }
-
- public boolean handleRenderType(ItemStack aStack, IItemRenderer.ItemRenderType aType) {
- if ((GT_Utility.isStackInvalid(aStack)) || (aStack.getItemDamage() < 0)) {
- return false;
- }
- return (aType == IItemRenderer.ItemRenderType.EQUIPPED_FIRST_PERSON) || (aType == IItemRenderer.ItemRenderType.INVENTORY) || (aType == IItemRenderer.ItemRenderType.EQUIPPED) || (aType == IItemRenderer.ItemRenderType.ENTITY);
- }
-
- public boolean shouldUseRenderHelper(IItemRenderer.ItemRenderType aType, ItemStack aStack, IItemRenderer.ItemRendererHelper aHelper) {
- if (GT_Utility.isStackInvalid(aStack)) {
- return false;
- }
- return aType == IItemRenderer.ItemRenderType.ENTITY;
- }
-
- public void renderItem(IItemRenderer.ItemRenderType aType, ItemStack aStack, Object... data) {
- if (GT_Utility.isStackInvalid(aStack)) {
- return;
- }
- GT_MetaGenerated_Tool aItem = (GT_MetaGenerated_Tool) aStack.getItem();
- GL11.glEnable(3042);
- if (aType == IItemRenderer.ItemRenderType.ENTITY) {
- if (RenderItem.renderInFrame) {
- GL11.glScalef(0.85F, 0.85F, 0.85F);
- GL11.glRotatef(-90.0F, 0.0F, 1.0F, 0.0F);
- GL11.glTranslated(-0.5D, -0.42D, 0.0D);
- } else {
- GL11.glTranslated(-0.5D, -0.42D, 0.0D);
- }
- }
- GL11.glColor3f(1.0F, 1.0F, 1.0F);
-
- IToolStats tToolStats = aItem.getToolStats(aStack);
- if (tToolStats != null) {
- IIconContainer aIcon = tToolStats.getIcon(false, aStack);
- if (aIcon != null) {
- IIcon tIcon = aIcon.getIcon();
- IIcon tOverlay = aIcon.getOverlayIcon();
- if (tIcon != null) {
- Minecraft.getMinecraft().renderEngine.bindTexture(aIcon.getTextureFile());
- GL11.glBlendFunc(770, 771);
- short[] tModulation = tToolStats.getRGBa(false, aStack);
- GL11.glColor3f(tModulation[0] / 255.0F, tModulation[1] / 255.0F, tModulation[2] / 255.0F);
- if (aType.equals(IItemRenderer.ItemRenderType.INVENTORY)) {
- GT_RenderUtil.renderItemIcon(tIcon, 16.0D, 0.001D, 0.0F, 0.0F, -1.0F);
- } else {
- ItemRenderer.renderItemIn2D(Tessellator.instance, tIcon.getMaxU(), tIcon.getMinV(), tIcon.getMinU(), tIcon.getMaxV(), tIcon.getIconWidth(), tIcon.getIconHeight(), 0.0625F);
- }
- GL11.glColor3f(1.0F, 1.0F, 1.0F);
- }
- if (tOverlay != null) {
- Minecraft.getMinecraft().renderEngine.bindTexture(aIcon.getTextureFile());
- GL11.glBlendFunc(770, 771);
- if (aType.equals(IItemRenderer.ItemRenderType.INVENTORY)) {
- GT_RenderUtil.renderItemIcon(tOverlay, 16.0D, 0.001D, 0.0F, 0.0F, -1.0F);
- } else {
- ItemRenderer.renderItemIn2D(Tessellator.instance, tOverlay.getMaxU(), tOverlay.getMinV(), tOverlay.getMinU(), tOverlay.getMaxV(), tOverlay.getIconWidth(), tOverlay.getIconHeight(), 0.0625F);
- }
- }
- }
- aIcon = tToolStats.getIcon(true, aStack);
- if (aIcon != null) {
- IIcon tIcon = aIcon.getIcon();
- IIcon tOverlay = aIcon.getOverlayIcon();
- if (tIcon != null) {
- Minecraft.getMinecraft().renderEngine.bindTexture(aIcon.getTextureFile());
- GL11.glBlendFunc(770, 771);
- short[] tModulation = tToolStats.getRGBa(true, aStack);
- GL11.glColor3f(tModulation[0] / 255.0F, tModulation[1] / 255.0F, tModulation[2] / 255.0F);
- if (aType.equals(IItemRenderer.ItemRenderType.INVENTORY)) {
- GT_RenderUtil.renderItemIcon(tIcon, 16.0D, 0.001D, 0.0F, 0.0F, -1.0F);
- } else {
- ItemRenderer.renderItemIn2D(Tessellator.instance, tIcon.getMaxU(), tIcon.getMinV(), tIcon.getMinU(), tIcon.getMaxV(), tIcon.getIconWidth(), tIcon.getIconHeight(), 0.0625F);
- }
- GL11.glColor3f(1.0F, 1.0F, 1.0F);
- }
- if (tOverlay != null) {
- Minecraft.getMinecraft().renderEngine.bindTexture(aIcon.getTextureFile());
- GL11.glBlendFunc(770, 771);
- if (aType.equals(IItemRenderer.ItemRenderType.INVENTORY)) {
- GT_RenderUtil.renderItemIcon(tOverlay, 16.0D, 0.001D, 0.0F, 0.0F, -1.0F);
- } else {
- ItemRenderer.renderItemIn2D(Tessellator.instance, tOverlay.getMaxU(), tOverlay.getMinV(), tOverlay.getMinU(), tOverlay.getMaxV(), tOverlay.getIconWidth(), tOverlay.getIconHeight(), 0.0625F);
- }
- }
- }
- if ((aType == IItemRenderer.ItemRenderType.INVENTORY) && (GT_MetaGenerated_Tool.getPrimaryMaterial(aStack) != Materials._NULL)) {
- long tDamage = GT_MetaGenerated_Tool.getToolDamage(aStack);
- long tMaxDamage = GT_MetaGenerated_Tool.getToolMaxDamage(aStack);
- if (tDamage <= 0L) {
- aIcon = gregtech.api.enums.Textures.ItemIcons.DURABILITY_BAR[8];
- } else if (tDamage >= tMaxDamage) {
- aIcon = gregtech.api.enums.Textures.ItemIcons.DURABILITY_BAR[0];
- } else {
- aIcon = gregtech.api.enums.Textures.ItemIcons.DURABILITY_BAR[((int) java.lang.Math.max(0L, java.lang.Math.min(7L, (tMaxDamage - tDamage) * 8L / tMaxDamage)))];
- }
- if (aIcon != null) {
- IIcon tIcon = aIcon.getIcon();
- IIcon tOverlay = aIcon.getOverlayIcon();
- if (tIcon != null) {
- Minecraft.getMinecraft().renderEngine.bindTexture(aIcon.getTextureFile());
- GL11.glBlendFunc(770, 771);
- if (aType.equals(IItemRenderer.ItemRenderType.INVENTORY)) {
- GT_RenderUtil.renderItemIcon(tIcon, 16.0D, 0.001D, 0.0F, 0.0F, -1.0F);
- } else {
- ItemRenderer.renderItemIn2D(Tessellator.instance, tIcon.getMaxU(), tIcon.getMinV(), tIcon.getMinU(), tIcon.getMaxV(), tIcon.getIconWidth(), tIcon.getIconHeight(), 0.0625F);
- }
- }
- if (tOverlay != null) {
- Minecraft.getMinecraft().renderEngine.bindTexture(aIcon.getTextureFile());
- GL11.glBlendFunc(770, 771);
- if (aType.equals(IItemRenderer.ItemRenderType.INVENTORY)) {
- GT_RenderUtil.renderItemIcon(tOverlay, 16.0D, 0.001D, 0.0F, 0.0F, -1.0F);
- } else {
- ItemRenderer.renderItemIn2D(Tessellator.instance, tOverlay.getMaxU(), tOverlay.getMinV(), tOverlay.getMinU(), tOverlay.getMaxV(), tOverlay.getIconWidth(), tOverlay.getIconHeight(), 0.0625F);
- }
- }
- }
- Long[] tStats = aItem.getElectricStats(aStack);
- if ((tStats != null) && (tStats[3].longValue() < 0L)) {
- long tCharge = aItem.getRealCharge(aStack);
- if (tCharge <= 0L) {
- aIcon = gregtech.api.enums.Textures.ItemIcons.ENERGY_BAR[0];
- } else if (tCharge >= tStats[0].longValue()) {
- aIcon = gregtech.api.enums.Textures.ItemIcons.ENERGY_BAR[8];
- } else {
- aIcon = gregtech.api.enums.Textures.ItemIcons.ENERGY_BAR[(7 - (int) java.lang.Math.max(0L, java.lang.Math.min(6L, (tStats[0].longValue() - tCharge) * 7L / tStats[0].longValue())))];
- }
- } else {
- aIcon = null;
- }
- if (aIcon != null) {
- IIcon tIcon = aIcon.getIcon();
- IIcon tOverlay = aIcon.getOverlayIcon();
- if (tIcon != null) {
- Minecraft.getMinecraft().renderEngine.bindTexture(aIcon.getTextureFile());
- GL11.glBlendFunc(770, 771);
- if (aType.equals(IItemRenderer.ItemRenderType.INVENTORY)) {
- GT_RenderUtil.renderItemIcon(tIcon, 16.0D, 0.001D, 0.0F, 0.0F, -1.0F);
- } else {
- ItemRenderer.renderItemIn2D(Tessellator.instance, tIcon.getMaxU(), tIcon.getMinV(), tIcon.getMinU(), tIcon.getMaxV(), tIcon.getIconWidth(), tIcon.getIconHeight(), 0.0625F);
- }
- }
- if (tOverlay != null) {
- Minecraft.getMinecraft().renderEngine.bindTexture(aIcon.getTextureFile());
- GL11.glBlendFunc(770, 771);
- if (aType.equals(IItemRenderer.ItemRenderType.INVENTORY)) {
- GT_RenderUtil.renderItemIcon(tOverlay, 16.0D, 0.001D, 0.0F, 0.0F, -1.0F);
- } else {
- ItemRenderer.renderItemIn2D(Tessellator.instance, tOverlay.getMaxU(), tOverlay.getMinV(), tOverlay.getMinU(), tOverlay.getMaxV(), tOverlay.getIconWidth(), tOverlay.getIconHeight(), 0.0625F);
- }
- }
- }
- }
- }
- GL11.glDisable(3042);
- }
-}
+package gregtech.common.render; + +import gregtech.api.enums.Materials; +import gregtech.api.interfaces.IIconContainer; +import gregtech.api.interfaces.IToolStats; +import gregtech.api.items.GT_MetaGenerated_Tool; +import gregtech.api.util.GT_Utility; +import net.minecraft.client.Minecraft; +import net.minecraft.client.renderer.ItemRenderer; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.client.renderer.entity.RenderItem; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; +import net.minecraftforge.client.IItemRenderer; +import net.minecraftforge.client.MinecraftForgeClient; +import org.lwjgl.opengl.GL11; + +public class GT_MetaGenerated_Tool_Renderer + implements IItemRenderer { + public GT_MetaGenerated_Tool_Renderer() { + for (GT_MetaGenerated_Tool tItem : GT_MetaGenerated_Tool.sInstances.values()) { + if (tItem != null) { + MinecraftForgeClient.registerItemRenderer(tItem, this); + } + } + } + + public boolean handleRenderType(ItemStack aStack, IItemRenderer.ItemRenderType aType) { + if ((GT_Utility.isStackInvalid(aStack)) || (aStack.getItemDamage() < 0)) { + return false; + } + return (aType == IItemRenderer.ItemRenderType.EQUIPPED_FIRST_PERSON) || (aType == IItemRenderer.ItemRenderType.INVENTORY) || (aType == IItemRenderer.ItemRenderType.EQUIPPED) || (aType == IItemRenderer.ItemRenderType.ENTITY); + } + + public boolean shouldUseRenderHelper(IItemRenderer.ItemRenderType aType, ItemStack aStack, IItemRenderer.ItemRendererHelper aHelper) { + if (GT_Utility.isStackInvalid(aStack)) { + return false; + } + return aType == IItemRenderer.ItemRenderType.ENTITY; + } + + public void renderItem(IItemRenderer.ItemRenderType aType, ItemStack aStack, Object... data) { + if (GT_Utility.isStackInvalid(aStack)) { + return; + } + GT_MetaGenerated_Tool aItem = (GT_MetaGenerated_Tool) aStack.getItem(); + GL11.glEnable(3042); + if (aType == IItemRenderer.ItemRenderType.ENTITY) { + if (RenderItem.renderInFrame) { + GL11.glScalef(0.85F, 0.85F, 0.85F); + GL11.glRotatef(-90.0F, 0.0F, 1.0F, 0.0F); + GL11.glTranslated(-0.5D, -0.42D, 0.0D); + } else { + GL11.glTranslated(-0.5D, -0.42D, 0.0D); + } + } + GL11.glColor3f(1.0F, 1.0F, 1.0F); + + IToolStats tToolStats = aItem.getToolStats(aStack); + if (tToolStats != null) { + IIconContainer aIcon = tToolStats.getIcon(false, aStack); + if (aIcon != null) { + IIcon tIcon = aIcon.getIcon(); + IIcon tOverlay = aIcon.getOverlayIcon(); + if (tIcon != null) { + Minecraft.getMinecraft().renderEngine.bindTexture(aIcon.getTextureFile()); + GL11.glBlendFunc(770, 771); + short[] tModulation = tToolStats.getRGBa(false, aStack); + GL11.glColor3f(tModulation[0] / 255.0F, tModulation[1] / 255.0F, tModulation[2] / 255.0F); + if (aType.equals(IItemRenderer.ItemRenderType.INVENTORY)) { + GT_RenderUtil.renderItemIcon(tIcon, 16.0D, 0.001D, 0.0F, 0.0F, -1.0F); + } else { + ItemRenderer.renderItemIn2D(Tessellator.instance, tIcon.getMaxU(), tIcon.getMinV(), tIcon.getMinU(), tIcon.getMaxV(), tIcon.getIconWidth(), tIcon.getIconHeight(), 0.0625F); + } + GL11.glColor3f(1.0F, 1.0F, 1.0F); + } + if (tOverlay != null) { + Minecraft.getMinecraft().renderEngine.bindTexture(aIcon.getTextureFile()); + GL11.glBlendFunc(770, 771); + if (aType.equals(IItemRenderer.ItemRenderType.INVENTORY)) { + GT_RenderUtil.renderItemIcon(tOverlay, 16.0D, 0.001D, 0.0F, 0.0F, -1.0F); + } else { + ItemRenderer.renderItemIn2D(Tessellator.instance, tOverlay.getMaxU(), tOverlay.getMinV(), tOverlay.getMinU(), tOverlay.getMaxV(), tOverlay.getIconWidth(), tOverlay.getIconHeight(), 0.0625F); + } + } + } + aIcon = tToolStats.getIcon(true, aStack); + if (aIcon != null) { + IIcon tIcon = aIcon.getIcon(); + IIcon tOverlay = aIcon.getOverlayIcon(); + if (tIcon != null) { + Minecraft.getMinecraft().renderEngine.bindTexture(aIcon.getTextureFile()); + GL11.glBlendFunc(770, 771); + short[] tModulation = tToolStats.getRGBa(true, aStack); + GL11.glColor3f(tModulation[0] / 255.0F, tModulation[1] / 255.0F, tModulation[2] / 255.0F); + if (aType.equals(IItemRenderer.ItemRenderType.INVENTORY)) { + GT_RenderUtil.renderItemIcon(tIcon, 16.0D, 0.001D, 0.0F, 0.0F, -1.0F); + } else { + ItemRenderer.renderItemIn2D(Tessellator.instance, tIcon.getMaxU(), tIcon.getMinV(), tIcon.getMinU(), tIcon.getMaxV(), tIcon.getIconWidth(), tIcon.getIconHeight(), 0.0625F); + } + GL11.glColor3f(1.0F, 1.0F, 1.0F); + } + if (tOverlay != null) { + Minecraft.getMinecraft().renderEngine.bindTexture(aIcon.getTextureFile()); + GL11.glBlendFunc(770, 771); + if (aType.equals(IItemRenderer.ItemRenderType.INVENTORY)) { + GT_RenderUtil.renderItemIcon(tOverlay, 16.0D, 0.001D, 0.0F, 0.0F, -1.0F); + } else { + ItemRenderer.renderItemIn2D(Tessellator.instance, tOverlay.getMaxU(), tOverlay.getMinV(), tOverlay.getMinU(), tOverlay.getMaxV(), tOverlay.getIconWidth(), tOverlay.getIconHeight(), 0.0625F); + } + } + } + if ((aType == IItemRenderer.ItemRenderType.INVENTORY) && (GT_MetaGenerated_Tool.getPrimaryMaterial(aStack) != Materials._NULL)) { + long tDamage = GT_MetaGenerated_Tool.getToolDamage(aStack); + long tMaxDamage = GT_MetaGenerated_Tool.getToolMaxDamage(aStack); + if (tDamage <= 0L) { + aIcon = gregtech.api.enums.Textures.ItemIcons.DURABILITY_BAR[8]; + } else if (tDamage >= tMaxDamage) { + aIcon = gregtech.api.enums.Textures.ItemIcons.DURABILITY_BAR[0]; + } else { + aIcon = gregtech.api.enums.Textures.ItemIcons.DURABILITY_BAR[((int) java.lang.Math.max(0L, java.lang.Math.min(7L, (tMaxDamage - tDamage) * 8L / tMaxDamage)))]; + } + if (aIcon != null) { + IIcon tIcon = aIcon.getIcon(); + IIcon tOverlay = aIcon.getOverlayIcon(); + if (tIcon != null) { + Minecraft.getMinecraft().renderEngine.bindTexture(aIcon.getTextureFile()); + GL11.glBlendFunc(770, 771); + if (aType.equals(IItemRenderer.ItemRenderType.INVENTORY)) { + GT_RenderUtil.renderItemIcon(tIcon, 16.0D, 0.001D, 0.0F, 0.0F, -1.0F); + } else { + ItemRenderer.renderItemIn2D(Tessellator.instance, tIcon.getMaxU(), tIcon.getMinV(), tIcon.getMinU(), tIcon.getMaxV(), tIcon.getIconWidth(), tIcon.getIconHeight(), 0.0625F); + } + } + if (tOverlay != null) { + Minecraft.getMinecraft().renderEngine.bindTexture(aIcon.getTextureFile()); + GL11.glBlendFunc(770, 771); + if (aType.equals(IItemRenderer.ItemRenderType.INVENTORY)) { + GT_RenderUtil.renderItemIcon(tOverlay, 16.0D, 0.001D, 0.0F, 0.0F, -1.0F); + } else { + ItemRenderer.renderItemIn2D(Tessellator.instance, tOverlay.getMaxU(), tOverlay.getMinV(), tOverlay.getMinU(), tOverlay.getMaxV(), tOverlay.getIconWidth(), tOverlay.getIconHeight(), 0.0625F); + } + } + } + Long[] tStats = aItem.getElectricStats(aStack); + if ((tStats != null) && (tStats[3].longValue() < 0L)) { + long tCharge = aItem.getRealCharge(aStack); + if (tCharge <= 0L) { + aIcon = gregtech.api.enums.Textures.ItemIcons.ENERGY_BAR[0]; + } else if (tCharge >= tStats[0].longValue()) { + aIcon = gregtech.api.enums.Textures.ItemIcons.ENERGY_BAR[8]; + } else { + aIcon = gregtech.api.enums.Textures.ItemIcons.ENERGY_BAR[(7 - (int) java.lang.Math.max(0L, java.lang.Math.min(6L, (tStats[0].longValue() - tCharge) * 7L / tStats[0].longValue())))]; + } + } else { + aIcon = null; + } + if (aIcon != null) { + IIcon tIcon = aIcon.getIcon(); + IIcon tOverlay = aIcon.getOverlayIcon(); + if (tIcon != null) { + Minecraft.getMinecraft().renderEngine.bindTexture(aIcon.getTextureFile()); + GL11.glBlendFunc(770, 771); + if (aType.equals(IItemRenderer.ItemRenderType.INVENTORY)) { + GT_RenderUtil.renderItemIcon(tIcon, 16.0D, 0.001D, 0.0F, 0.0F, -1.0F); + } else { + ItemRenderer.renderItemIn2D(Tessellator.instance, tIcon.getMaxU(), tIcon.getMinV(), tIcon.getMinU(), tIcon.getMaxV(), tIcon.getIconWidth(), tIcon.getIconHeight(), 0.0625F); + } + } + if (tOverlay != null) { + Minecraft.getMinecraft().renderEngine.bindTexture(aIcon.getTextureFile()); + GL11.glBlendFunc(770, 771); + if (aType.equals(IItemRenderer.ItemRenderType.INVENTORY)) { + GT_RenderUtil.renderItemIcon(tOverlay, 16.0D, 0.001D, 0.0F, 0.0F, -1.0F); + } else { + ItemRenderer.renderItemIn2D(Tessellator.instance, tOverlay.getMaxU(), tOverlay.getMinV(), tOverlay.getMinU(), tOverlay.getMaxV(), tOverlay.getIconWidth(), tOverlay.getIconHeight(), 0.0625F); + } + } + } + } + } + GL11.glDisable(3042); + } +} diff --git a/src/main/java/gregtech/common/render/GT_RenderUtil.java b/src/main/java/gregtech/common/render/GT_RenderUtil.java index cba37972fe..1b674f440f 100644 --- a/src/main/java/gregtech/common/render/GT_RenderUtil.java +++ b/src/main/java/gregtech/common/render/GT_RenderUtil.java @@ -1,30 +1,30 @@ -package gregtech.common.render;
-
-import net.minecraft.client.renderer.Tessellator;
-import net.minecraft.util.IIcon;
-
-public class GT_RenderUtil {
- public static void renderItemIcon(IIcon icon, double size, double z, float nx, float ny, float nz) {
- renderItemIcon(icon, 0.0D, 0.0D, size, size, z, nx, ny, nz);
- }
-
- public static void renderItemIcon(IIcon icon, double xStart, double yStart, double xEnd, double yEnd, double z, float nx, float ny, float nz) {
- if (icon == null) {
- return;
- }
- Tessellator.instance.startDrawingQuads();
- Tessellator.instance.setNormal(nx, ny, nz);
- if (nz > 0.0F) {
- Tessellator.instance.addVertexWithUV(xStart, yStart, z, icon.getMinU(), icon.getMinV());
- Tessellator.instance.addVertexWithUV(xEnd, yStart, z, icon.getMaxU(), icon.getMinV());
- Tessellator.instance.addVertexWithUV(xEnd, yEnd, z, icon.getMaxU(), icon.getMaxV());
- Tessellator.instance.addVertexWithUV(xStart, yEnd, z, icon.getMinU(), icon.getMaxV());
- } else {
- Tessellator.instance.addVertexWithUV(xStart, yEnd, z, icon.getMinU(), icon.getMaxV());
- Tessellator.instance.addVertexWithUV(xEnd, yEnd, z, icon.getMaxU(), icon.getMaxV());
- Tessellator.instance.addVertexWithUV(xEnd, yStart, z, icon.getMaxU(), icon.getMinV());
- Tessellator.instance.addVertexWithUV(xStart, yStart, z, icon.getMinU(), icon.getMinV());
- }
- Tessellator.instance.draw();
- }
-}
+package gregtech.common.render; + +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.util.IIcon; + +public class GT_RenderUtil { + public static void renderItemIcon(IIcon icon, double size, double z, float nx, float ny, float nz) { + renderItemIcon(icon, 0.0D, 0.0D, size, size, z, nx, ny, nz); + } + + public static void renderItemIcon(IIcon icon, double xStart, double yStart, double xEnd, double yEnd, double z, float nx, float ny, float nz) { + if (icon == null) { + return; + } + Tessellator.instance.startDrawingQuads(); + Tessellator.instance.setNormal(nx, ny, nz); + if (nz > 0.0F) { + Tessellator.instance.addVertexWithUV(xStart, yStart, z, icon.getMinU(), icon.getMinV()); + Tessellator.instance.addVertexWithUV(xEnd, yStart, z, icon.getMaxU(), icon.getMinV()); + Tessellator.instance.addVertexWithUV(xEnd, yEnd, z, icon.getMaxU(), icon.getMaxV()); + Tessellator.instance.addVertexWithUV(xStart, yEnd, z, icon.getMinU(), icon.getMaxV()); + } else { + Tessellator.instance.addVertexWithUV(xStart, yEnd, z, icon.getMinU(), icon.getMaxV()); + Tessellator.instance.addVertexWithUV(xEnd, yEnd, z, icon.getMaxU(), icon.getMaxV()); + Tessellator.instance.addVertexWithUV(xEnd, yStart, z, icon.getMaxU(), icon.getMinV()); + Tessellator.instance.addVertexWithUV(xStart, yStart, z, icon.getMinU(), icon.getMinV()); + } + Tessellator.instance.draw(); + } +} diff --git a/src/main/java/gregtech/common/render/GT_Renderer_Entity_Arrow.java b/src/main/java/gregtech/common/render/GT_Renderer_Entity_Arrow.java index ad6993bcd3..bbd791ec10 100644 --- a/src/main/java/gregtech/common/render/GT_Renderer_Entity_Arrow.java +++ b/src/main/java/gregtech/common/render/GT_Renderer_Entity_Arrow.java @@ -1,20 +1,20 @@ -package gregtech.common.render;
-
-import cpw.mods.fml.client.registry.RenderingRegistry;
-import net.minecraft.client.renderer.entity.RenderArrow;
-import net.minecraft.entity.Entity;
-import net.minecraft.util.ResourceLocation;
-
-public class GT_Renderer_Entity_Arrow
- extends RenderArrow {
- private final ResourceLocation mTexture;
-
- public GT_Renderer_Entity_Arrow(Class aArrowClass, String aTextureName) {
- this.mTexture = new ResourceLocation("gregtech:textures/entity/" + aTextureName + ".png");
- RenderingRegistry.registerEntityRenderingHandler(aArrowClass, this);
- }
-
- protected ResourceLocation getEntityTexture(Entity p_110775_1_) {
- return this.mTexture;
- }
-}
+package gregtech.common.render; + +import cpw.mods.fml.client.registry.RenderingRegistry; +import net.minecraft.client.renderer.entity.RenderArrow; +import net.minecraft.entity.Entity; +import net.minecraft.util.ResourceLocation; + +public class GT_Renderer_Entity_Arrow + extends RenderArrow { + private final ResourceLocation mTexture; + + public GT_Renderer_Entity_Arrow(Class aArrowClass, String aTextureName) { + this.mTexture = new ResourceLocation("gregtech:textures/entity/" + aTextureName + ".png"); + RenderingRegistry.registerEntityRenderingHandler(aArrowClass, this); + } + + protected ResourceLocation getEntityTexture(Entity p_110775_1_) { + return this.mTexture; + } +} diff --git a/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_ChestBuffer.java b/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_ChestBuffer.java index b078f558f7..20072f7ebf 100644 --- a/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_ChestBuffer.java +++ b/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_ChestBuffer.java @@ -1,63 +1,63 @@ -package gregtech.common.tileentities.automation;
-
-import gregtech.api.enums.Textures;
-import gregtech.api.interfaces.ITexture;
-import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Buffer;
-import gregtech.api.objects.GT_RenderedTexture;
-import gregtech.api.util.GT_Utility;
-import gregtech.common.gui.GT_Container_ChestBuffer;
-import gregtech.common.gui.GT_GUIContainer_ChestBuffer;
-import net.minecraft.entity.player.InventoryPlayer;
-
-public class GT_MetaTileEntity_ChestBuffer
- extends GT_MetaTileEntity_Buffer {
- public GT_MetaTileEntity_ChestBuffer(int aID, String aName, String aNameRegional, int aTier) {
- super(aID, aName, aNameRegional, aTier, 28, "Buffering lots of incoming Items");
- }
-
- public GT_MetaTileEntity_ChestBuffer(int aID, String aName, String aNameRegional, int aTier, int aInvSlotCount, String aDescription) {
- super(aID, aName, aNameRegional, aTier, aInvSlotCount, aDescription);
- }
-
- public GT_MetaTileEntity_ChestBuffer(String aName, int aTier, int aInvSlotCount, String aDescription, ITexture[][][] aTextures) {
- super(aName, aTier, aInvSlotCount, aDescription, aTextures);
- }
-
- public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
- return new GT_MetaTileEntity_ChestBuffer(this.mName, this.mTier, this.mInventory.length, this.mDescription, this.mTextures);
- }
-
- public ITexture getOverlayIcon() {
- return new GT_RenderedTexture(Textures.BlockIcons.AUTOMATION_CHESTBUFFER);
- }
-
- public boolean isValidSlot(int aIndex) {
- return aIndex < this.mInventory.length - 1;
- }
-
- protected void moveItems(IGregTechTileEntity aBaseMetaTileEntity, long aTimer) {
- fillStacksIntoFirstSlots();
- super.moveItems(aBaseMetaTileEntity, aTimer);
- fillStacksIntoFirstSlots();
- }
-
- protected void fillStacksIntoFirstSlots() {
- for (int i = 0; i < this.mInventory.length - 1; i++) {
- for (int j = i + 1; j < this.mInventory.length - 1; j++) {
- if ((this.mInventory[j] != null) && ((this.mInventory[i] == null) || (GT_Utility.areStacksEqual(this.mInventory[i], this.mInventory[j])))) {
- GT_Utility.moveStackFromSlotAToSlotB(getBaseMetaTileEntity(), getBaseMetaTileEntity(), j, i, (byte) 64, (byte) 1, (byte) 64, (byte) 1);
- }
- }
- }
- }
-
- public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- return new GT_Container_ChestBuffer(aPlayerInventory, aBaseMetaTileEntity);
- }
-
- public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- return new GT_GUIContainer_ChestBuffer(aPlayerInventory, aBaseMetaTileEntity);
- }
-}
+package gregtech.common.tileentities.automation; + +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Buffer; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Utility; +import gregtech.common.gui.GT_Container_ChestBuffer; +import gregtech.common.gui.GT_GUIContainer_ChestBuffer; +import net.minecraft.entity.player.InventoryPlayer; + +public class GT_MetaTileEntity_ChestBuffer + extends GT_MetaTileEntity_Buffer { + public GT_MetaTileEntity_ChestBuffer(int aID, String aName, String aNameRegional, int aTier) { + super(aID, aName, aNameRegional, aTier, 28, "Buffering lots of incoming Items"); + } + + public GT_MetaTileEntity_ChestBuffer(int aID, String aName, String aNameRegional, int aTier, int aInvSlotCount, String aDescription) { + super(aID, aName, aNameRegional, aTier, aInvSlotCount, aDescription); + } + + public GT_MetaTileEntity_ChestBuffer(String aName, int aTier, int aInvSlotCount, String aDescription, ITexture[][][] aTextures) { + super(aName, aTier, aInvSlotCount, aDescription, aTextures); + } + + public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_ChestBuffer(this.mName, this.mTier, this.mInventory.length, this.mDescription, this.mTextures); + } + + public ITexture getOverlayIcon() { + return new GT_RenderedTexture(Textures.BlockIcons.AUTOMATION_CHESTBUFFER); + } + + public boolean isValidSlot(int aIndex) { + return aIndex < this.mInventory.length - 1; + } + + protected void moveItems(IGregTechTileEntity aBaseMetaTileEntity, long aTimer) { + fillStacksIntoFirstSlots(); + super.moveItems(aBaseMetaTileEntity, aTimer); + fillStacksIntoFirstSlots(); + } + + protected void fillStacksIntoFirstSlots() { + for (int i = 0; i < this.mInventory.length - 1; i++) { + for (int j = i + 1; j < this.mInventory.length - 1; j++) { + if ((this.mInventory[j] != null) && ((this.mInventory[i] == null) || (GT_Utility.areStacksEqual(this.mInventory[i], this.mInventory[j])))) { + GT_Utility.moveStackFromSlotAToSlotB(getBaseMetaTileEntity(), getBaseMetaTileEntity(), j, i, (byte) 64, (byte) 1, (byte) 64, (byte) 1); + } + } + } + } + + public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + return new GT_Container_ChestBuffer(aPlayerInventory, aBaseMetaTileEntity); + } + + public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + return new GT_GUIContainer_ChestBuffer(aPlayerInventory, aBaseMetaTileEntity); + } +} diff --git a/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_Filter.java b/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_Filter.java index 4180484ad5..0dcabee92b 100644 --- a/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_Filter.java +++ b/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_Filter.java @@ -1,75 +1,75 @@ -package gregtech.common.tileentities.automation;
-
-import gregtech.api.enums.Textures;
-import gregtech.api.interfaces.ITexture;
-import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Buffer;
-import gregtech.api.objects.GT_RenderedTexture;
-import gregtech.api.util.GT_Utility;
-import gregtech.common.gui.GT_Container_Filter;
-import gregtech.common.gui.GT_GUIContainer_Filter;
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-
-public class GT_MetaTileEntity_Filter
- extends GT_MetaTileEntity_Buffer {
- public boolean bIgnoreNBT = false;
- public boolean bInvertFilter = false;
-
- public GT_MetaTileEntity_Filter(int aID, String aName, String aNameRegional, int aTier) {
- super(aID, aName, aNameRegional, aTier, 19, "Filtering incoming Items");
- }
-
- public GT_MetaTileEntity_Filter(String aName, int aTier, int aInvSlotCount, String aDescription, ITexture[][][] aTextures) {
- super(aName, aTier, aInvSlotCount, aDescription, aTextures);
- }
-
- public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
- return new GT_MetaTileEntity_Filter(this.mName, this.mTier, this.mInventory.length, this.mDescription, this.mTextures);
- }
-
- public ITexture getOverlayIcon() {
- return new GT_RenderedTexture(Textures.BlockIcons.AUTOMATION_FILTER);
- }
-
- public boolean isValidSlot(int aIndex) {
- return aIndex < 9;
- }
-
- public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- return new GT_Container_Filter(aPlayerInventory, aBaseMetaTileEntity);
- }
-
- public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- return new GT_GUIContainer_Filter(aPlayerInventory, aBaseMetaTileEntity);
- }
-
- public void saveNBTData(NBTTagCompound aNBT) {
- super.saveNBTData(aNBT);
- aNBT.setBoolean("bInvertFilter", this.bInvertFilter);
- aNBT.setBoolean("bIgnoreNBT", this.bIgnoreNBT);
- }
-
- public void loadNBTData(NBTTagCompound aNBT) {
- super.loadNBTData(aNBT);
- this.bInvertFilter = aNBT.getBoolean("bInvertFilter");
- this.bIgnoreNBT = aNBT.getBoolean("bIgnoreNBT");
- }
-
- public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
- if (!super.allowPutStack(aBaseMetaTileEntity, aIndex, aSide, aStack)) {
- return false;
- }
- if (this.bInvertFilter) {
- for (byte i = 9; i < 18; i = (byte) (i + 1)) {
- if (GT_Utility.areStacksEqual(this.mInventory[i], aStack, this.bIgnoreNBT)) {
- return false;
- }
- }
- return true;
- }
- return GT_Utility.areStacksEqual(this.mInventory[(aIndex + 9)], aStack, this.bIgnoreNBT);
- }
-}
+package gregtech.common.tileentities.automation; + +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Buffer; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Utility; +import gregtech.common.gui.GT_Container_Filter; +import gregtech.common.gui.GT_GUIContainer_Filter; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; + +public class GT_MetaTileEntity_Filter + extends GT_MetaTileEntity_Buffer { + public boolean bIgnoreNBT = false; + public boolean bInvertFilter = false; + + public GT_MetaTileEntity_Filter(int aID, String aName, String aNameRegional, int aTier) { + super(aID, aName, aNameRegional, aTier, 19, "Filtering incoming Items"); + } + + public GT_MetaTileEntity_Filter(String aName, int aTier, int aInvSlotCount, String aDescription, ITexture[][][] aTextures) { + super(aName, aTier, aInvSlotCount, aDescription, aTextures); + } + + public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_Filter(this.mName, this.mTier, this.mInventory.length, this.mDescription, this.mTextures); + } + + public ITexture getOverlayIcon() { + return new GT_RenderedTexture(Textures.BlockIcons.AUTOMATION_FILTER); + } + + public boolean isValidSlot(int aIndex) { + return aIndex < 9; + } + + public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + return new GT_Container_Filter(aPlayerInventory, aBaseMetaTileEntity); + } + + public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + return new GT_GUIContainer_Filter(aPlayerInventory, aBaseMetaTileEntity); + } + + public void saveNBTData(NBTTagCompound aNBT) { + super.saveNBTData(aNBT); + aNBT.setBoolean("bInvertFilter", this.bInvertFilter); + aNBT.setBoolean("bIgnoreNBT", this.bIgnoreNBT); + } + + public void loadNBTData(NBTTagCompound aNBT) { + super.loadNBTData(aNBT); + this.bInvertFilter = aNBT.getBoolean("bInvertFilter"); + this.bIgnoreNBT = aNBT.getBoolean("bIgnoreNBT"); + } + + public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + if (!super.allowPutStack(aBaseMetaTileEntity, aIndex, aSide, aStack)) { + return false; + } + if (this.bInvertFilter) { + for (byte i = 9; i < 18; i = (byte) (i + 1)) { + if (GT_Utility.areStacksEqual(this.mInventory[i], aStack, this.bIgnoreNBT)) { + return false; + } + } + return true; + } + return GT_Utility.areStacksEqual(this.mInventory[(aIndex + 9)], aStack, this.bIgnoreNBT); + } +} diff --git a/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_Regulator.java b/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_Regulator.java index d5d04315f2..e82436ec2b 100644 --- a/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_Regulator.java +++ b/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_Regulator.java @@ -37,7 +37,7 @@ public class GT_MetaTileEntity_Regulator }
public boolean isValidSlot(int aIndex) {
- return aIndex < 9 ;
+ return aIndex < 9;
}
public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
diff --git a/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_SuperBuffer.java b/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_SuperBuffer.java index 212c354fba..d1694a58f1 100644 --- a/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_SuperBuffer.java +++ b/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_SuperBuffer.java @@ -1,37 +1,37 @@ -package gregtech.common.tileentities.automation;
-
-import gregtech.api.enums.Textures;
-import gregtech.api.interfaces.ITexture;
-import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.objects.GT_RenderedTexture;
-import gregtech.common.gui.GT_Container_SuperBuffer;
-import gregtech.common.gui.GT_GUIContainer_SuperBuffer;
-import net.minecraft.entity.player.InventoryPlayer;
-
-public class GT_MetaTileEntity_SuperBuffer
- extends GT_MetaTileEntity_ChestBuffer {
- public GT_MetaTileEntity_SuperBuffer(int aID, String aName, String aNameRegional, int aTier) {
- super(aID, aName, aNameRegional, aTier, 257, "Buffering up to 256 Stacks");
- }
-
- public GT_MetaTileEntity_SuperBuffer(String aName, int aTier, int aInvSlotCount, String aDescription, ITexture[][][] aTextures) {
- super(aName, aTier, aInvSlotCount, aDescription, aTextures);
- }
-
- public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
- return new GT_MetaTileEntity_SuperBuffer(this.mName, this.mTier, this.mInventory.length, this.mDescription, this.mTextures);
- }
-
- public ITexture getOverlayIcon() {
- return new GT_RenderedTexture(Textures.BlockIcons.AUTOMATION_SUPERBUFFER);
- }
-
- public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- return new GT_Container_SuperBuffer(aPlayerInventory, aBaseMetaTileEntity);
- }
-
- public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- return new GT_GUIContainer_SuperBuffer(aPlayerInventory, aBaseMetaTileEntity);
- }
-}
+package gregtech.common.tileentities.automation; + +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.common.gui.GT_Container_SuperBuffer; +import gregtech.common.gui.GT_GUIContainer_SuperBuffer; +import net.minecraft.entity.player.InventoryPlayer; + +public class GT_MetaTileEntity_SuperBuffer + extends GT_MetaTileEntity_ChestBuffer { + public GT_MetaTileEntity_SuperBuffer(int aID, String aName, String aNameRegional, int aTier) { + super(aID, aName, aNameRegional, aTier, 257, "Buffering up to 256 Stacks"); + } + + public GT_MetaTileEntity_SuperBuffer(String aName, int aTier, int aInvSlotCount, String aDescription, ITexture[][][] aTextures) { + super(aName, aTier, aInvSlotCount, aDescription, aTextures); + } + + public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_SuperBuffer(this.mName, this.mTier, this.mInventory.length, this.mDescription, this.mTextures); + } + + public ITexture getOverlayIcon() { + return new GT_RenderedTexture(Textures.BlockIcons.AUTOMATION_SUPERBUFFER); + } + + public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + return new GT_Container_SuperBuffer(aPlayerInventory, aBaseMetaTileEntity); + } + + public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + return new GT_GUIContainer_SuperBuffer(aPlayerInventory, aBaseMetaTileEntity); + } +} diff --git a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Solar.java b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Solar.java index 1fa7723a1a..4cd5047c9f 100644 --- a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Solar.java +++ b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Solar.java @@ -1,143 +1,125 @@ -package gregtech.common.tileentities.boilers;
-
-import gregtech.api.enums.Dyes;
-import gregtech.api.enums.Textures;
-import gregtech.api.interfaces.ITexture;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.metatileentity.MetaTileEntity;
-import gregtech.api.objects.GT_RenderedTexture;
-import gregtech.api.util.GT_ModHandler;
-import gregtech.common.gui.GT_Container_Boiler;
-import gregtech.common.gui.GT_GUIContainer_Boiler;
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraftforge.common.util.ForgeDirection;
-import net.minecraftforge.fluids.FluidStack;
-import net.minecraftforge.fluids.IFluidHandler;
-
-public class GT_MetaTileEntity_Boiler_Solar
- extends GT_MetaTileEntity_Boiler {
- public GT_MetaTileEntity_Boiler_Solar(int aID, String aName, String aNameRegional) {
- super(aID, aName, aNameRegional, "Steam Power by the Sun", new ITexture[0]);
- }
-
- public GT_MetaTileEntity_Boiler_Solar(String aName, int aTier, String aDescription, ITexture[][][] aTextures) {
- super(aName, aTier, aDescription, aTextures);
- }
-
- public ITexture[][][] getTextureSet(ITexture[] aTextures) {
- ITexture[][][] rTextures = new ITexture[4][17][];
- for (byte i = -1; i < 16; i = (byte) (i + 1)) {
- ITexture[] tmp0 = {new GT_RenderedTexture(Textures.BlockIcons.MACHINE_BRONZEBRICKS_BOTTOM, Dyes.getModulation(i, Dyes._NULL.mRGBa))};
- rTextures[0][(i + 1)] = tmp0;
- ITexture[] tmp1 = {new GT_RenderedTexture(Textures.BlockIcons.MACHINE_BRONZEBRICKS_TOP, Dyes.getModulation(i, Dyes._NULL.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.BOILER_SOLAR)};
- rTextures[1][(i + 1)] = tmp1;
- ITexture[] tmp2 = {new GT_RenderedTexture(Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE, Dyes.getModulation(i, Dyes._NULL.mRGBa))};
- rTextures[2][(i + 1)] = tmp2;
- ITexture[] tmp3 = {new GT_RenderedTexture(Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE, Dyes.getModulation(i, Dyes._NULL.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE)};
- rTextures[3][(i + 1)] = tmp3;
- }
- return rTextures;
- }
-
- public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
- return mTextures[aSide >= 2 ? ((byte) (aSide != aFacing ? 2 : 3)) : aSide][aColorIndex + 1];
- }
-
- public int maxProgresstime() {
- return 500;
- }
-
- public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- return new GT_Container_Boiler(aPlayerInventory, aBaseMetaTileEntity, 16000);
- }
-
- public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- return new GT_GUIContainer_Boiler(aPlayerInventory, aBaseMetaTileEntity, "SolarBoiler.png", 16000);
- }
-
- public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
- return new GT_MetaTileEntity_Boiler_Solar(this.mName, this.mTier, this.mDescription, this.mTextures);
- }
-
- private int mRunTime = 0;
-
- @Override
- public void saveNBTData(NBTTagCompound aNBT) {
- super.saveNBTData(aNBT);
- aNBT.setInteger("mRunTime", this.mRunTime);
- }
-
- @Override
- public void loadNBTData(NBTTagCompound aNBT) {
- super.loadNBTData(aNBT);
- this.mRunTime = aNBT.getInteger("mRunTime");
- }
-
- public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
- if ((aBaseMetaTileEntity.isServerSide()) && (aTick > 20L)) {
- if (this.mTemperature <= 20) {
- this.mTemperature = 20;
- this.mLossTimer = 0;
- }
- if (++this.mLossTimer > 45) {
- this.mTemperature -= 1;
- this.mLossTimer = 0;
- }
- if (this.mSteam != null) {
- byte i = aBaseMetaTileEntity.getFrontFacing();
- IFluidHandler tTileEntity = aBaseMetaTileEntity.getITankContainerAtSide(i);
- if (tTileEntity != null) {
- FluidStack tDrained = aBaseMetaTileEntity.drain(ForgeDirection.getOrientation(i), Math.max(1, this.mSteam.amount / 2), false);
- if (tDrained != null) {
- int tFilledAmount = tTileEntity.fill(ForgeDirection.getOrientation(i).getOpposite(), tDrained, false);
- if (tFilledAmount > 0) {
- tTileEntity.fill(ForgeDirection.getOrientation(i).getOpposite(), aBaseMetaTileEntity.drain(ForgeDirection.getOrientation(i), tFilledAmount, true), true);
- }
- }
- }
- }
- if (aTick % 25L == 0L) {
- if (this.mTemperature > 100) {
- if ((this.mFluid == null) || (!GT_ModHandler.isWater(this.mFluid)) || (this.mFluid.amount <= 0)) {
- this.mHadNoWater = true;
- } else {
- if (this.mHadNoWater) {
- aBaseMetaTileEntity.doExplosion(2048L);
- return;
- }
- this.mFluid.amount -= 1;
- mRunTime += 1;
- int tOutput = 150;
- if(mRunTime > 10000){
- tOutput = Math.max(50, 150 - ((mRunTime-10000)/100));
- }
- if (this.mSteam == null) {
- this.mSteam = GT_ModHandler.getSteam(tOutput);
- } else if (GT_ModHandler.isSteam(this.mSteam)) {
- this.mSteam.amount += tOutput;
- } else {
- this.mSteam = GT_ModHandler.getSteam(tOutput);
- }
- }
- } else {
- this.mHadNoWater = false;
- }
- }
- if ((this.mSteam != null) &&
- (this.mSteam.amount > 16000)) {
- sendSound((byte) 1);
- this.mSteam.amount = 12000;
- }
- if ((this.mProcessingEnergy <= 0) && (aBaseMetaTileEntity.isAllowedToWork()) && (aTick % 256L == 0L) && (!aBaseMetaTileEntity.getWorld().isThundering())) {
- boolean bRain = aBaseMetaTileEntity.getWorld().isRaining() && aBaseMetaTileEntity.getBiome().rainfall > 0.0F;
- mProcessingEnergy += bRain && aBaseMetaTileEntity.getWorld().skylightSubtracted >= 4 || !aBaseMetaTileEntity.getSkyAtSide((byte) 1) ? 0 : !bRain && aBaseMetaTileEntity.getWorld().isDaytime() ? 8 : 1;
- }
- if ((this.mTemperature < 500) && (this.mProcessingEnergy > 0) && (aTick % 12L == 0L)) {
- this.mProcessingEnergy -= 1;
- this.mTemperature += 1;
- }
- aBaseMetaTileEntity.setActive(this.mProcessingEnergy > 0);
- }
- }
-}
+package gregtech.common.tileentities.boilers; + +import gregtech.api.enums.Dyes; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_ModHandler; +import gregtech.common.gui.GT_Container_Boiler; +import gregtech.common.gui.GT_GUIContainer_Boiler; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.IFluidHandler; + +public class GT_MetaTileEntity_Boiler_Solar + extends GT_MetaTileEntity_Boiler { + public GT_MetaTileEntity_Boiler_Solar(int aID, String aName, String aNameRegional) { + super(aID, aName, aNameRegional, "Steam Power by the Sun", new ITexture[0]); + } + + public GT_MetaTileEntity_Boiler_Solar(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { + super(aName, aTier, aDescription, aTextures); + } + + public ITexture[][][] getTextureSet(ITexture[] aTextures) { + ITexture[][][] rTextures = new ITexture[4][17][]; + for (byte i = -1; i < 16; i = (byte) (i + 1)) { + ITexture[] tmp0 = {new GT_RenderedTexture(Textures.BlockIcons.MACHINE_BRONZEBRICKS_BOTTOM, Dyes.getModulation(i, Dyes._NULL.mRGBa))}; + rTextures[0][(i + 1)] = tmp0; + ITexture[] tmp1 = {new GT_RenderedTexture(Textures.BlockIcons.MACHINE_BRONZEBRICKS_TOP, Dyes.getModulation(i, Dyes._NULL.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.BOILER_SOLAR)}; + rTextures[1][(i + 1)] = tmp1; + ITexture[] tmp2 = {new GT_RenderedTexture(Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE, Dyes.getModulation(i, Dyes._NULL.mRGBa))}; + rTextures[2][(i + 1)] = tmp2; + ITexture[] tmp3 = {new GT_RenderedTexture(Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE, Dyes.getModulation(i, Dyes._NULL.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE)}; + rTextures[3][(i + 1)] = tmp3; + } + return rTextures; + } + + public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { + return mTextures[aSide >= 2 ? ((byte) (aSide != aFacing ? 2 : 3)) : aSide][aColorIndex + 1]; + } + + public int maxProgresstime() { + return 500; + } + + public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + return new GT_Container_Boiler(aPlayerInventory, aBaseMetaTileEntity, 16000); + } + + public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + return new GT_GUIContainer_Boiler(aPlayerInventory, aBaseMetaTileEntity, "SolarBoiler.png", 16000); + } + + public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_Boiler_Solar(this.mName, this.mTier, this.mDescription, this.mTextures); + } + + public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { + if ((aBaseMetaTileEntity.isServerSide()) && (aTick > 20L)) { + if (this.mTemperature <= 20) { + this.mTemperature = 20; + this.mLossTimer = 0; + } + if (++this.mLossTimer > 45) { + this.mTemperature -= 1; + this.mLossTimer = 0; + } + if (this.mSteam != null) { + byte i = aBaseMetaTileEntity.getFrontFacing(); + IFluidHandler tTileEntity = aBaseMetaTileEntity.getITankContainerAtSide(i); + if (tTileEntity != null) { + FluidStack tDrained = aBaseMetaTileEntity.drain(ForgeDirection.getOrientation(i), Math.max(1, this.mSteam.amount / 2), false); + if (tDrained != null) { + int tFilledAmount = tTileEntity.fill(ForgeDirection.getOrientation(i).getOpposite(), tDrained, false); + if (tFilledAmount > 0) { + tTileEntity.fill(ForgeDirection.getOrientation(i).getOpposite(), aBaseMetaTileEntity.drain(ForgeDirection.getOrientation(i), tFilledAmount, true), true); + } + } + } + } + if (aTick % 25L == 0L) { + if (this.mTemperature > 100) { + if ((this.mFluid == null) || (!GT_ModHandler.isWater(this.mFluid)) || (this.mFluid.amount <= 0)) { + this.mHadNoWater = true; + } else { + if (this.mHadNoWater) { + aBaseMetaTileEntity.doExplosion(2048L); + return; + } + this.mFluid.amount -= 1; + if (this.mSteam == null) { + this.mSteam = GT_ModHandler.getSteam(150L); + } else if (GT_ModHandler.isSteam(this.mSteam)) { + this.mSteam.amount += 150; + } else { + this.mSteam = GT_ModHandler.getSteam(150L); + } + } + } else { + this.mHadNoWater = false; + } + } + if ((this.mSteam != null) && + (this.mSteam.amount > 16000)) { + sendSound((byte) 1); + this.mSteam.amount = 12000; + } + if ((this.mProcessingEnergy <= 0) && (aBaseMetaTileEntity.isAllowedToWork()) && (aTick % 256L == 0L) && (!aBaseMetaTileEntity.getWorld().isThundering())) { + boolean bRain = aBaseMetaTileEntity.getWorld().isRaining() && aBaseMetaTileEntity.getBiome().rainfall > 0.0F; + mProcessingEnergy += bRain && aBaseMetaTileEntity.getWorld().skylightSubtracted >= 4 || !aBaseMetaTileEntity.getSkyAtSide((byte) 1) ? 0 : !bRain && aBaseMetaTileEntity.getWorld().isDaytime() ? 8 : 1; + } + if ((this.mTemperature < 500) && (this.mProcessingEnergy > 0) && (aTick % 12L == 0L)) { + this.mProcessingEnergy -= 1; + this.mTemperature += 1; + } + aBaseMetaTileEntity.setActive(this.mProcessingEnergy > 0); + } + } +} + + diff --git a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Steel.java b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Steel.java index c5ad432ad7..0528733e17 100644 --- a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Steel.java +++ b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Steel.java @@ -146,7 +146,7 @@ public class GT_MetaTileEntity_Boiler_Steel this.mTemperature += 1;
}
if(this.mProcessingEnergy>0 && (aTick % 20L == 0L)){
- GT_Pollution.addPollution(this.getBaseMetaTileEntity().getWorld(), new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()), 20);
+ GT_Pollution.addPollution(this.getBaseMetaTileEntity().getWorld(), new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()), 40);
}
aBaseMetaTileEntity.setActive(this.mProcessingEnergy > 0);
}
diff --git a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_DieselGenerator.java b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_DieselGenerator.java index e2103c02bf..7507fad3ff 100644 --- a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_DieselGenerator.java +++ b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_DieselGenerator.java @@ -1,5 +1,6 @@ package gregtech.common.tileentities.generators;
+import com.dreammaster.main.MainRegistry;
import cpw.mods.fml.common.registry.GameRegistry;
import gregtech.api.GregTech_API;
import gregtech.api.enums.ConfigCategories;
@@ -63,6 +64,15 @@ public class GT_MetaTileEntity_DieselGenerator return rValue;
}
+ @Override
+ public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
+ if(aTick%100==0 && mFluid!=null && mFluid.amount>this.getCapacity()){
+ MainRegistry.Logger.error("Dupe Abuse: "+aBaseMetaTileEntity.getOwnerName()+" Coords: "+aBaseMetaTileEntity.getXCoord()+" "+aBaseMetaTileEntity.getYCoord()+" "+aBaseMetaTileEntity.getZCoord(),aBaseMetaTileEntity);
+ aBaseMetaTileEntity.setToFire();
+ }
+ super.onPostTick(aBaseMetaTileEntity, aTick);
+ }
+
public ITexture[] getFront(byte aColor) {
return new ITexture[]{super.getFront(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_FRONT), Textures.BlockIcons.OVERLAYS_ENERGY_OUT[this.mTier]};
}
diff --git a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_FluidNaquadahReactor.java b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_FluidNaquadahReactor.java index 46ebb56e9a..b708573e44 100644 --- a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_FluidNaquadahReactor.java +++ b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_FluidNaquadahReactor.java @@ -16,7 +16,7 @@ public class GT_MetaTileEntity_FluidNaquadahReactor public int mEfficiency;
public GT_MetaTileEntity_FluidNaquadahReactor(int aID, String aName, String aNameRegional, int aTier) {
- super(aID, aName, aNameRegional, aTier, "Requires Enriched Naquadah Cells", new ITexture[0]);
+ super(aID, aName, aNameRegional, aTier, "Requires Long Enriched Naquadah Rods", new ITexture[0]);
onConfigLoad();
}
@@ -51,7 +51,7 @@ public class GT_MetaTileEntity_FluidNaquadahReactor }
public void onConfigLoad() {
- this.mEfficiency = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "FluidNaquadah.efficiency.tier." + this.mTier, 100);
+ this.mEfficiency = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "FluidNaquadah.efficiency.tier." + this.mTier, 125);
}
public ITexture[] getFront(byte aColor) {
diff --git a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_GasTurbine.java b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_GasTurbine.java index 777843b344..0e1509e0f4 100644 --- a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_GasTurbine.java +++ b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_GasTurbine.java @@ -1,97 +1,97 @@ -package gregtech.common.tileentities.generators;
-
-import gregtech.api.GregTech_API;
-import gregtech.api.enums.ConfigCategories;
-import gregtech.api.enums.Textures;
-import gregtech.api.interfaces.ITexture;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.metatileentity.MetaTileEntity;
-import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicGenerator;
-import gregtech.api.objects.GT_RenderedTexture;
-import gregtech.api.util.GT_Recipe;
-
-public class GT_MetaTileEntity_GasTurbine
- extends GT_MetaTileEntity_BasicGenerator {
-
- public int mEfficiency;
-
- public GT_MetaTileEntity_GasTurbine(int aID, String aName, String aNameRegional, int aTier) {
- super(aID, aName, aNameRegional, aTier, "Requires flammable Gasses", new ITexture[0]);
- onConfigLoad();
- }
-
- public GT_MetaTileEntity_GasTurbine(String aName, int aTier, String aDescription, ITexture[][][] aTextures) {
- super(aName, aTier, aDescription, aTextures);
- onConfigLoad();
- }
-
- public boolean isOutputFacing(byte aSide) {
- return aSide == getBaseMetaTileEntity().getFrontFacing();
- }
-
- public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
- return new GT_MetaTileEntity_GasTurbine(this.mName, this.mTier, this.mDescription, this.mTextures);
- }
-
- public GT_Recipe.GT_Recipe_Map getRecipes() {
- return GT_Recipe.GT_Recipe_Map.sTurbineFuels;
- }
-
- public int getCapacity() {
- return 16000;
- }
-
- public void onConfigLoad() {
- this.mEfficiency = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "GasTurbine.efficiency.tier." + this.mTier, (100 - this.mTier * 5));
- }
-
-
- public int getEfficiency() {
- return this.mEfficiency;
- }
-
- public ITexture[] getFront(byte aColor) {
- return new ITexture[]{super.getFront(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.GAS_TURBINE_FRONT), Textures.BlockIcons.OVERLAYS_ENERGY_OUT[this.mTier]};
- }
-
- public ITexture[] getBack(byte aColor) {
- return new ITexture[]{super.getBack(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.GAS_TURBINE_BACK)};
- }
-
- public ITexture[] getBottom(byte aColor) {
- return new ITexture[]{super.getBottom(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.GAS_TURBINE_BOTTOM)};
- }
-
- public ITexture[] getTop(byte aColor) {
- return new ITexture[]{super.getTop(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.GAS_TURBINE_TOP)};
- }
-
- public ITexture[] getSides(byte aColor) {
- return new ITexture[]{super.getSides(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.GAS_TURBINE_SIDE)};
- }
-
- public ITexture[] getFrontActive(byte aColor) {
- return new ITexture[]{super.getFrontActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.GAS_TURBINE_FRONT_ACTIVE), Textures.BlockIcons.OVERLAYS_ENERGY_OUT[this.mTier]};
- }
-
- public ITexture[] getBackActive(byte aColor) {
- return new ITexture[]{super.getBackActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.GAS_TURBINE_BACK_ACTIVE)};
- }
-
- public ITexture[] getBottomActive(byte aColor) {
- return new ITexture[]{super.getBottomActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.GAS_TURBINE_BOTTOM_ACTIVE)};
- }
-
- public ITexture[] getTopActive(byte aColor) {
- return new ITexture[]{super.getTopActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.GAS_TURBINE_TOP_ACTIVE)};
- }
-
- public ITexture[] getSidesActive(byte aColor) {
- return new ITexture[]{super.getSidesActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.GAS_TURBINE_SIDE_ACTIVE)};
- }
-
- @Override
- public int getPollution() {
- return 5;
- }
-}
+package gregtech.common.tileentities.generators; + +import gregtech.api.GregTech_API; +import gregtech.api.enums.ConfigCategories; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicGenerator; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Recipe; + +public class GT_MetaTileEntity_GasTurbine + extends GT_MetaTileEntity_BasicGenerator { + + public int mEfficiency; + + public GT_MetaTileEntity_GasTurbine(int aID, String aName, String aNameRegional, int aTier) { + super(aID, aName, aNameRegional, aTier, "Requires flammable Gasses", new ITexture[0]); + onConfigLoad(); + } + + public GT_MetaTileEntity_GasTurbine(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { + super(aName, aTier, aDescription, aTextures); + onConfigLoad(); + } + + public boolean isOutputFacing(byte aSide) { + return aSide == getBaseMetaTileEntity().getFrontFacing(); + } + + public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_GasTurbine(this.mName, this.mTier, this.mDescription, this.mTextures); + } + + public GT_Recipe.GT_Recipe_Map getRecipes() { + return GT_Recipe.GT_Recipe_Map.sTurbineFuels; + } + + public int getCapacity() { + return 16000; + } + + public void onConfigLoad() { + this.mEfficiency = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "GasTurbine.efficiency.tier." + this.mTier, (100 - this.mTier * 5)); + } + + + public int getEfficiency() { + return this.mEfficiency; + } + + public ITexture[] getFront(byte aColor) { + return new ITexture[]{super.getFront(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.GAS_TURBINE_FRONT), Textures.BlockIcons.OVERLAYS_ENERGY_OUT[this.mTier]}; + } + + public ITexture[] getBack(byte aColor) { + return new ITexture[]{super.getBack(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.GAS_TURBINE_BACK)}; + } + + public ITexture[] getBottom(byte aColor) { + return new ITexture[]{super.getBottom(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.GAS_TURBINE_BOTTOM)}; + } + + public ITexture[] getTop(byte aColor) { + return new ITexture[]{super.getTop(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.GAS_TURBINE_TOP)}; + } + + public ITexture[] getSides(byte aColor) { + return new ITexture[]{super.getSides(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.GAS_TURBINE_SIDE)}; + } + + public ITexture[] getFrontActive(byte aColor) { + return new ITexture[]{super.getFrontActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.GAS_TURBINE_FRONT_ACTIVE), Textures.BlockIcons.OVERLAYS_ENERGY_OUT[this.mTier]}; + } + + public ITexture[] getBackActive(byte aColor) { + return new ITexture[]{super.getBackActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.GAS_TURBINE_BACK_ACTIVE)}; + } + + public ITexture[] getBottomActive(byte aColor) { + return new ITexture[]{super.getBottomActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.GAS_TURBINE_BOTTOM_ACTIVE)}; + } + + public ITexture[] getTopActive(byte aColor) { + return new ITexture[]{super.getTopActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.GAS_TURBINE_TOP_ACTIVE)}; + } + + public ITexture[] getSidesActive(byte aColor) { + return new ITexture[]{super.getSidesActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.GAS_TURBINE_SIDE_ACTIVE)}; + } + + @Override + public int getPollution() { + return 5; + } +} diff --git a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicalEnergyAbsorber.java b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicalEnergyAbsorber.java index 8e597eaf91..7997765681 100644 --- a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicalEnergyAbsorber.java +++ b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicalEnergyAbsorber.java @@ -240,7 +240,7 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B @Override public long maxEUStore() { - return Math.max(getEUVar(), V[mTier] * 16000 + getMinimumStoredEU()); + return Math.max(getEUVar(), V[mTier] * 16000L + getMinimumStoredEU()); } public ITexture[] getFront(byte aColor) { diff --git a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_PlasmaGenerator.java b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_PlasmaGenerator.java index 28a8ddbc89..555b44f020 100644 --- a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_PlasmaGenerator.java +++ b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_PlasmaGenerator.java @@ -42,7 +42,7 @@ public class GT_MetaTileEntity_PlasmaGenerator } public void onConfigLoad() { - this.mEfficiency = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "PlasmaGenerator.efficiency.tier." + this.mTier, (10 + (this.mTier * 10))); + this.mEfficiency = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "PlasmaGenerator.efficiency.tier." + this.mTier, Math.max(10,10 + Math.min(90,this.mTier * 10))); } diff --git a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_SolidNaquadahReactor.java b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_SolidNaquadahReactor.java index c8e73bdc21..78ffbdc3b6 100644 --- a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_SolidNaquadahReactor.java +++ b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_SolidNaquadahReactor.java @@ -45,7 +45,7 @@ public class GT_MetaTileEntity_SolidNaquadahReactor }
public void onConfigLoad() {
- this.mEfficiency = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "SolidNaquadah.efficiency.tier." + this.mTier, 40 + mTier * 10);
+ this.mEfficiency = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "SolidNaquadah.efficiency.tier." + this.mTier, 80);
}
public ITexture[] getFront(byte aColor) {
diff --git a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_SolidNaquadahReactor2.java b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_SolidNaquadahReactor2.java new file mode 100644 index 0000000000..da993f059c --- /dev/null +++ b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_SolidNaquadahReactor2.java @@ -0,0 +1,95 @@ +package gregtech.common.tileentities.generators; + +import gregtech.api.GregTech_API; +import gregtech.api.enums.ConfigCategories; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicGenerator; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Recipe; + +public class GT_MetaTileEntity_SolidNaquadahReactor2 + extends GT_MetaTileEntity_BasicGenerator { + public int mEfficiency; + + public GT_MetaTileEntity_SolidNaquadahReactor2(int aID, String aName, String aNameRegional, int aTier) { + super(aID, aName, aNameRegional, aTier, "Requires Enriched Naquadah Rods", new ITexture[0]); + onConfigLoad(); + } + + public GT_MetaTileEntity_SolidNaquadahReactor2(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { + super(aName, aTier, aDescription, aTextures); + onConfigLoad(); + } + + public boolean isOutputFacing(byte aSide) { + return (aSide > 1) && (aSide != getBaseMetaTileEntity().getFrontFacing()) && (aSide != getBaseMetaTileEntity().getBackFacing()); + } + + public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_SolidNaquadahReactor2(this.mName, this.mTier, this.mDescription, this.mTextures); + } + + public GT_Recipe.GT_Recipe_Map getRecipes() { + return GT_Recipe.GT_Recipe_Map.sLargeNaquadahReactorFuels; + } + + public int getCapacity() { + return 0; + } + + public int getEfficiency() { + return mEfficiency; + } + + public void onConfigLoad() { + this.mEfficiency = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "SolidNaquadah.efficiency.tier." + this.mTier, 100); + } + + public ITexture[] getFront(byte aColor) { + return new ITexture[]{super.getFront(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_FRONT)}; + } + + public ITexture[] getBack(byte aColor) { + return new ITexture[]{super.getBack(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_BACK)}; + } + + public ITexture[] getBottom(byte aColor) { + return new ITexture[]{super.getBottom(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_BOTTOM)}; + } + + public ITexture[] getTop(byte aColor) { + return new ITexture[]{super.getTop(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_TOP)}; + } + + public ITexture[] getSides(byte aColor) { + return new ITexture[]{super.getSides(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_SIDE)}; + } + + public ITexture[] getFrontActive(byte aColor) { + return new ITexture[]{super.getFrontActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_FRONT_ACTIVE)}; + } + + public ITexture[] getBackActive(byte aColor) { + return new ITexture[]{super.getBackActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_BACK_ACTIVE)}; + } + + public ITexture[] getBottomActive(byte aColor) { + return new ITexture[]{super.getBottomActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_BOTTOM_ACTIVE)}; + } + + public ITexture[] getTopActive(byte aColor) { + return new ITexture[]{super.getTopActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_TOP_ACTIVE)}; + } + + public ITexture[] getSidesActive(byte aColor) { + return new ITexture[]{super.getSidesActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_SIDE_ACTIVE)}; + } + + @Override + public int getPollution() { + return 0; + } +} diff --git a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_SolidNaquadahReactor3.java b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_SolidNaquadahReactor3.java new file mode 100644 index 0000000000..373146937f --- /dev/null +++ b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_SolidNaquadahReactor3.java @@ -0,0 +1,95 @@ +package gregtech.common.tileentities.generators; + +import gregtech.api.GregTech_API; +import gregtech.api.enums.ConfigCategories; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicGenerator; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Recipe; + +public class GT_MetaTileEntity_SolidNaquadahReactor3 + extends GT_MetaTileEntity_BasicGenerator { + public int mEfficiency; + + public GT_MetaTileEntity_SolidNaquadahReactor3(int aID, String aName, String aNameRegional, int aTier) { + super(aID, aName, aNameRegional, aTier, "Requires Naquadria Rods", new ITexture[0]); + onConfigLoad(); + } + + public GT_MetaTileEntity_SolidNaquadahReactor3(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { + super(aName, aTier, aDescription, aTextures); + onConfigLoad(); + } + + public boolean isOutputFacing(byte aSide) { + return (aSide > 1) && (aSide != getBaseMetaTileEntity().getFrontFacing()) && (aSide != getBaseMetaTileEntity().getBackFacing()); + } + + public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_SolidNaquadahReactor3(this.mName, this.mTier, this.mDescription, this.mTextures); + } + + public GT_Recipe.GT_Recipe_Map getRecipes() { + return GT_Recipe.GT_Recipe_Map.sHugeNaquadahReactorFuels; + } + + public int getCapacity() { + return 0; + } + + public int getEfficiency() { + return mEfficiency; + } + + public void onConfigLoad() { + this.mEfficiency = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "SolidNaquadah.efficiency.tier." + this.mTier, 150); + } + + public ITexture[] getFront(byte aColor) { + return new ITexture[]{super.getFront(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_FRONT)}; + } + + public ITexture[] getBack(byte aColor) { + return new ITexture[]{super.getBack(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_BACK)}; + } + + public ITexture[] getBottom(byte aColor) { + return new ITexture[]{super.getBottom(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_BOTTOM)}; + } + + public ITexture[] getTop(byte aColor) { + return new ITexture[]{super.getTop(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_TOP)}; + } + + public ITexture[] getSides(byte aColor) { + return new ITexture[]{super.getSides(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_SIDE)}; + } + + public ITexture[] getFrontActive(byte aColor) { + return new ITexture[]{super.getFrontActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_FRONT_ACTIVE)}; + } + + public ITexture[] getBackActive(byte aColor) { + return new ITexture[]{super.getBackActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_BACK_ACTIVE)}; + } + + public ITexture[] getBottomActive(byte aColor) { + return new ITexture[]{super.getBottomActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_BOTTOM_ACTIVE)}; + } + + public ITexture[] getTopActive(byte aColor) { + return new ITexture[]{super.getTopActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_TOP_ACTIVE)}; + } + + public ITexture[] getSidesActive(byte aColor) { + return new ITexture[]{super.getSidesActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_SIDE_ACTIVE)}; + } + + @Override + public int getPollution() { + return 0; + } +} diff --git a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_SolidNaquadahReactor4.java b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_SolidNaquadahReactor4.java new file mode 100644 index 0000000000..26c7dae112 --- /dev/null +++ b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_SolidNaquadahReactor4.java @@ -0,0 +1,95 @@ +package gregtech.common.tileentities.generators; + +import gregtech.api.GregTech_API; +import gregtech.api.enums.ConfigCategories; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicGenerator; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Recipe; + +public class GT_MetaTileEntity_SolidNaquadahReactor4 + extends GT_MetaTileEntity_BasicGenerator { + public int mEfficiency; + + public GT_MetaTileEntity_SolidNaquadahReactor4(int aID, String aName, String aNameRegional, int aTier) { + super(aID, aName, aNameRegional, aTier, "Requires Long Naquadria Rods", new ITexture[0]); + onConfigLoad(); + } + + public GT_MetaTileEntity_SolidNaquadahReactor4(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { + super(aName, aTier, aDescription, aTextures); + onConfigLoad(); + } + + public boolean isOutputFacing(byte aSide) { + return (aSide > 1) && (aSide != getBaseMetaTileEntity().getFrontFacing()) && (aSide != getBaseMetaTileEntity().getBackFacing()); + } + + public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_SolidNaquadahReactor4(this.mName, this.mTier, this.mDescription, this.mTextures); + } + + public GT_Recipe.GT_Recipe_Map getRecipes() { + return GT_Recipe.GT_Recipe_Map.sExtraHugeNaquadahReactorFuels; + } + + public int getCapacity() { + return 0; + } + + public int getEfficiency() { + return mEfficiency; + } + + public void onConfigLoad() { + this.mEfficiency = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "SolidNaquadah.efficiency.tier." + this.mTier, 200); + } + + public ITexture[] getFront(byte aColor) { + return new ITexture[]{super.getFront(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_FRONT)}; + } + + public ITexture[] getBack(byte aColor) { + return new ITexture[]{super.getBack(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_BACK)}; + } + + public ITexture[] getBottom(byte aColor) { + return new ITexture[]{super.getBottom(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_BOTTOM)}; + } + + public ITexture[] getTop(byte aColor) { + return new ITexture[]{super.getTop(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_TOP)}; + } + + public ITexture[] getSides(byte aColor) { + return new ITexture[]{super.getSides(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_SIDE)}; + } + + public ITexture[] getFrontActive(byte aColor) { + return new ITexture[]{super.getFrontActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_FRONT_ACTIVE)}; + } + + public ITexture[] getBackActive(byte aColor) { + return new ITexture[]{super.getBackActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_BACK_ACTIVE)}; + } + + public ITexture[] getBottomActive(byte aColor) { + return new ITexture[]{super.getBottomActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_BOTTOM_ACTIVE)}; + } + + public ITexture[] getTopActive(byte aColor) { + return new ITexture[]{super.getTopActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_TOP_ACTIVE)}; + } + + public ITexture[] getSidesActive(byte aColor) { + return new ITexture[]{super.getSidesActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_SIDE_ACTIVE)}; + } + + @Override + public int getPollution() { + return 0; + } +} diff --git a/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_Bronze.java b/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_Bronze.java index 74f49df8a9..2853ab1a5b 100644 --- a/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_Bronze.java +++ b/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_Bronze.java @@ -1,34 +1,34 @@ -package gregtech.common.tileentities.machines;
-
-import gregtech.api.enums.Dyes;
-import gregtech.api.enums.Textures;
-import gregtech.api.interfaces.ITexture;
-import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicHull_NonElectric;
-import gregtech.api.objects.GT_RenderedTexture;
-
-public class GT_MetaTileEntity_BasicHull_Bronze
- extends GT_MetaTileEntity_BasicHull_NonElectric {
- public GT_MetaTileEntity_BasicHull_Bronze(int aID, String aName, String aNameRegional, int aTier, String aDescription) {
- super(aID, aName, aNameRegional, aTier, aDescription);
- }
-
- public GT_MetaTileEntity_BasicHull_Bronze(String aName, int aTier, String aDescription, ITexture[][][] aTextures) {
- super(aName, aTier, aDescription, aTextures);
- }
-
- public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
- return new GT_MetaTileEntity_BasicHull_Bronze(this.mName, this.mTier, this.mDescription, this.mTextures);
- }
-
- public ITexture[][][] getTextureSet(ITexture[] aTextures) {
- ITexture[][][] rTextures = new ITexture[3][17][];
- for (byte i = -1; i < 16; i = (byte) (i + 1)) {
- rTextures[0][(i + 1)] = new ITexture[]{new GT_RenderedTexture(Textures.BlockIcons.MACHINE_BRONZE_BOTTOM, Dyes.getModulation(i, Dyes._NULL.mRGBa))};
- rTextures[1][(i + 1)] = new ITexture[]{new GT_RenderedTexture(Textures.BlockIcons.MACHINE_BRONZE_TOP, Dyes.getModulation(i, Dyes._NULL.mRGBa))};
- rTextures[2][(i + 1)] = new ITexture[]{new GT_RenderedTexture(Textures.BlockIcons.MACHINE_BRONZE_SIDE, Dyes.getModulation(i, Dyes._NULL.mRGBa))};
- }
- return rTextures;
- }
-}
+package gregtech.common.tileentities.machines; + +import gregtech.api.enums.Dyes; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicHull_NonElectric; +import gregtech.api.objects.GT_RenderedTexture; + +public class GT_MetaTileEntity_BasicHull_Bronze + extends GT_MetaTileEntity_BasicHull_NonElectric { + public GT_MetaTileEntity_BasicHull_Bronze(int aID, String aName, String aNameRegional, int aTier, String aDescription) { + super(aID, aName, aNameRegional, aTier, aDescription); + } + + public GT_MetaTileEntity_BasicHull_Bronze(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { + super(aName, aTier, aDescription, aTextures); + } + + public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_BasicHull_Bronze(this.mName, this.mTier, this.mDescription, this.mTextures); + } + + public ITexture[][][] getTextureSet(ITexture[] aTextures) { + ITexture[][][] rTextures = new ITexture[3][17][]; + for (byte i = -1; i < 16; i = (byte) (i + 1)) { + rTextures[0][(i + 1)] = new ITexture[]{new GT_RenderedTexture(Textures.BlockIcons.MACHINE_BRONZE_BOTTOM, Dyes.getModulation(i, Dyes._NULL.mRGBa))}; + rTextures[1][(i + 1)] = new ITexture[]{new GT_RenderedTexture(Textures.BlockIcons.MACHINE_BRONZE_TOP, Dyes.getModulation(i, Dyes._NULL.mRGBa))}; + rTextures[2][(i + 1)] = new ITexture[]{new GT_RenderedTexture(Textures.BlockIcons.MACHINE_BRONZE_SIDE, Dyes.getModulation(i, Dyes._NULL.mRGBa))}; + } + return rTextures; + } +} diff --git a/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_BronzeBricks.java b/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_BronzeBricks.java index 2382a41ecb..20e41de638 100644 --- a/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_BronzeBricks.java +++ b/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_BronzeBricks.java @@ -1,37 +1,37 @@ -package gregtech.common.tileentities.machines;
-
-import gregtech.api.enums.Dyes;
-import gregtech.api.enums.Textures;
-import gregtech.api.interfaces.ITexture;
-import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicHull_NonElectric;
-import gregtech.api.objects.GT_RenderedTexture;
-
-public class GT_MetaTileEntity_BasicHull_BronzeBricks
- extends GT_MetaTileEntity_BasicHull_NonElectric {
- public GT_MetaTileEntity_BasicHull_BronzeBricks(int aID, String aName, String aNameRegional, int aTier, String aDescription) {
- super(aID, aName, aNameRegional, aTier, aDescription);
- }
-
- public GT_MetaTileEntity_BasicHull_BronzeBricks(String aName, int aTier, String aDescription, ITexture[][][] aTextures) {
- super(aName, aTier, aDescription, aTextures);
- }
-
- public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
- return new GT_MetaTileEntity_BasicHull_BronzeBricks(this.mName, this.mTier, this.mDescription, this.mTextures);
- }
-
- public ITexture[][][] getTextureSet(ITexture[] aTextures) {
- ITexture[][][] rTextures = new ITexture[3][17][];
- for (byte i = -1; i < 16; i = (byte) (i + 1)) {
- ITexture[] tmp0 = {new GT_RenderedTexture(Textures.BlockIcons.MACHINE_BRONZEBRICKS_BOTTOM, Dyes.getModulation(i, Dyes._NULL.mRGBa))};
- rTextures[0][(i + 1)] = tmp0;
- ITexture[] tmp1 = {new GT_RenderedTexture(Textures.BlockIcons.MACHINE_BRONZEBRICKS_TOP, Dyes.getModulation(i, Dyes._NULL.mRGBa))};
- rTextures[1][(i + 1)] = tmp1;
- ITexture[] tmp2 = {new GT_RenderedTexture(Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE, Dyes.getModulation(i, Dyes._NULL.mRGBa))};
- rTextures[2][(i + 1)] = tmp2;
- }
- return rTextures;
- }
-}
+package gregtech.common.tileentities.machines; + +import gregtech.api.enums.Dyes; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicHull_NonElectric; +import gregtech.api.objects.GT_RenderedTexture; + +public class GT_MetaTileEntity_BasicHull_BronzeBricks + extends GT_MetaTileEntity_BasicHull_NonElectric { + public GT_MetaTileEntity_BasicHull_BronzeBricks(int aID, String aName, String aNameRegional, int aTier, String aDescription) { + super(aID, aName, aNameRegional, aTier, aDescription); + } + + public GT_MetaTileEntity_BasicHull_BronzeBricks(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { + super(aName, aTier, aDescription, aTextures); + } + + public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_BasicHull_BronzeBricks(this.mName, this.mTier, this.mDescription, this.mTextures); + } + + public ITexture[][][] getTextureSet(ITexture[] aTextures) { + ITexture[][][] rTextures = new ITexture[3][17][]; + for (byte i = -1; i < 16; i = (byte) (i + 1)) { + ITexture[] tmp0 = {new GT_RenderedTexture(Textures.BlockIcons.MACHINE_BRONZEBRICKS_BOTTOM, Dyes.getModulation(i, Dyes._NULL.mRGBa))}; + rTextures[0][(i + 1)] = tmp0; + ITexture[] tmp1 = {new GT_RenderedTexture(Textures.BlockIcons.MACHINE_BRONZEBRICKS_TOP, Dyes.getModulation(i, Dyes._NULL.mRGBa))}; + rTextures[1][(i + 1)] = tmp1; + ITexture[] tmp2 = {new GT_RenderedTexture(Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE, Dyes.getModulation(i, Dyes._NULL.mRGBa))}; + rTextures[2][(i + 1)] = tmp2; + } + return rTextures; + } +} diff --git a/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_Steel.java b/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_Steel.java index e1395d59d7..3b71ae4577 100644 --- a/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_Steel.java +++ b/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_Steel.java @@ -1,37 +1,37 @@ -package gregtech.common.tileentities.machines;
-
-import gregtech.api.enums.Dyes;
-import gregtech.api.enums.Textures;
-import gregtech.api.interfaces.ITexture;
-import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicHull_NonElectric;
-import gregtech.api.objects.GT_RenderedTexture;
-
-public class GT_MetaTileEntity_BasicHull_Steel
- extends GT_MetaTileEntity_BasicHull_NonElectric {
- public GT_MetaTileEntity_BasicHull_Steel(int aID, String aName, String aNameRegional, int aTier, String aDescription) {
- super(aID, aName, aNameRegional, aTier, aDescription);
- }
-
- public GT_MetaTileEntity_BasicHull_Steel(String aName, int aTier, String aDescription, ITexture[][][] aTextures) {
- super(aName, aTier, aDescription, aTextures);
- }
-
- public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
- return new GT_MetaTileEntity_BasicHull_Steel(this.mName, this.mTier, this.mDescription, this.mTextures);
- }
-
- public ITexture[][][] getTextureSet(ITexture[] aTextures) {
- ITexture[][][] rTextures = new ITexture[3][17][];
- for (byte i = -1; i < 16; i = (byte) (i + 1)) {
- ITexture[] tmp0 = {new GT_RenderedTexture(Textures.BlockIcons.MACHINE_STEEL_BOTTOM, Dyes.getModulation(i, Dyes._NULL.mRGBa))};
- rTextures[0][(i + 1)] = tmp0;
- ITexture[] tmp1 = {new GT_RenderedTexture(Textures.BlockIcons.MACHINE_STEEL_TOP, Dyes.getModulation(i, Dyes._NULL.mRGBa))};
- rTextures[1][(i + 1)] = tmp1;
- ITexture[] tmp2 = {new GT_RenderedTexture(Textures.BlockIcons.MACHINE_STEEL_SIDE, Dyes.getModulation(i, Dyes._NULL.mRGBa))};
- rTextures[2][(i + 1)] = tmp2;
- }
- return rTextures;
- }
-}
+package gregtech.common.tileentities.machines; + +import gregtech.api.enums.Dyes; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicHull_NonElectric; +import gregtech.api.objects.GT_RenderedTexture; + +public class GT_MetaTileEntity_BasicHull_Steel + extends GT_MetaTileEntity_BasicHull_NonElectric { + public GT_MetaTileEntity_BasicHull_Steel(int aID, String aName, String aNameRegional, int aTier, String aDescription) { + super(aID, aName, aNameRegional, aTier, aDescription); + } + + public GT_MetaTileEntity_BasicHull_Steel(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { + super(aName, aTier, aDescription, aTextures); + } + + public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_BasicHull_Steel(this.mName, this.mTier, this.mDescription, this.mTextures); + } + + public ITexture[][][] getTextureSet(ITexture[] aTextures) { + ITexture[][][] rTextures = new ITexture[3][17][]; + for (byte i = -1; i < 16; i = (byte) (i + 1)) { + ITexture[] tmp0 = {new GT_RenderedTexture(Textures.BlockIcons.MACHINE_STEEL_BOTTOM, Dyes.getModulation(i, Dyes._NULL.mRGBa))}; + rTextures[0][(i + 1)] = tmp0; + ITexture[] tmp1 = {new GT_RenderedTexture(Textures.BlockIcons.MACHINE_STEEL_TOP, Dyes.getModulation(i, Dyes._NULL.mRGBa))}; + rTextures[1][(i + 1)] = tmp1; + ITexture[] tmp2 = {new GT_RenderedTexture(Textures.BlockIcons.MACHINE_STEEL_SIDE, Dyes.getModulation(i, Dyes._NULL.mRGBa))}; + rTextures[2][(i + 1)] = tmp2; + } + return rTextures; + } +} diff --git a/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_SteelBricks.java b/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_SteelBricks.java index f8e35fdc55..1463e0a473 100644 --- a/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_SteelBricks.java +++ b/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_SteelBricks.java @@ -1,37 +1,37 @@ -package gregtech.common.tileentities.machines;
-
-import gregtech.api.enums.Dyes;
-import gregtech.api.enums.Textures;
-import gregtech.api.interfaces.ITexture;
-import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicHull_NonElectric;
-import gregtech.api.objects.GT_RenderedTexture;
-
-public class GT_MetaTileEntity_BasicHull_SteelBricks
- extends GT_MetaTileEntity_BasicHull_NonElectric {
- public GT_MetaTileEntity_BasicHull_SteelBricks(int aID, String aName, String aNameRegional, int aTier, String aDescription) {
- super(aID, aName, aNameRegional, aTier, aDescription);
- }
-
- public GT_MetaTileEntity_BasicHull_SteelBricks(String aName, int aTier, String aDescription, ITexture[][][] aTextures) {
- super(aName, aTier, aDescription, aTextures);
- }
-
- public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
- return new GT_MetaTileEntity_BasicHull_SteelBricks(this.mName, this.mTier, this.mDescription, this.mTextures);
- }
-
- public ITexture[][][] getTextureSet(ITexture[] aTextures) {
- ITexture[][][] rTextures = new ITexture[3][17][];
- for (byte i = -1; i < 16; i = (byte) (i + 1)) {
- ITexture[] tmp0 = {new GT_RenderedTexture(Textures.BlockIcons.MACHINE_STEELBRICKS_BOTTOM, Dyes.getModulation(i, Dyes._NULL.mRGBa))};
- rTextures[0][(i + 1)] = tmp0;
- ITexture[] tmp1 = {new GT_RenderedTexture(Textures.BlockIcons.MACHINE_STEELBRICKS_TOP, Dyes.getModulation(i, Dyes._NULL.mRGBa))};
- rTextures[1][(i + 1)] = tmp1;
- ITexture[] tmp2 = {new GT_RenderedTexture(Textures.BlockIcons.MACHINE_STEELBRICKS_SIDE, Dyes.getModulation(i, Dyes._NULL.mRGBa))};
- rTextures[2][(i + 1)] = tmp2;
- }
- return rTextures;
- }
-}
+package gregtech.common.tileentities.machines; + +import gregtech.api.enums.Dyes; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicHull_NonElectric; +import gregtech.api.objects.GT_RenderedTexture; + +public class GT_MetaTileEntity_BasicHull_SteelBricks + extends GT_MetaTileEntity_BasicHull_NonElectric { + public GT_MetaTileEntity_BasicHull_SteelBricks(int aID, String aName, String aNameRegional, int aTier, String aDescription) { + super(aID, aName, aNameRegional, aTier, aDescription); + } + + public GT_MetaTileEntity_BasicHull_SteelBricks(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { + super(aName, aTier, aDescription, aTextures); + } + + public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_BasicHull_SteelBricks(this.mName, this.mTier, this.mDescription, this.mTextures); + } + + public ITexture[][][] getTextureSet(ITexture[] aTextures) { + ITexture[][][] rTextures = new ITexture[3][17][]; + for (byte i = -1; i < 16; i = (byte) (i + 1)) { + ITexture[] tmp0 = {new GT_RenderedTexture(Textures.BlockIcons.MACHINE_STEELBRICKS_BOTTOM, Dyes.getModulation(i, Dyes._NULL.mRGBa))}; + rTextures[0][(i + 1)] = tmp0; + ITexture[] tmp1 = {new GT_RenderedTexture(Textures.BlockIcons.MACHINE_STEELBRICKS_TOP, Dyes.getModulation(i, Dyes._NULL.mRGBa))}; + rTextures[1][(i + 1)] = tmp1; + ITexture[] tmp2 = {new GT_RenderedTexture(Textures.BlockIcons.MACHINE_STEELBRICKS_SIDE, Dyes.getModulation(i, Dyes._NULL.mRGBa))}; + rTextures[2][(i + 1)] = tmp2; + } + return rTextures; + } +} diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_AdvSeismicProspector.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_AdvSeismicProspector.java index 1379654393..d45292e9d1 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_AdvSeismicProspector.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_AdvSeismicProspector.java @@ -34,6 +34,11 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.world.ChunkPosition; import net.minecraftforge.fluids.FluidStack; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Map; + + public class GT_MetaTileEntity_AdvSeismicProspector extends GT_MetaTileEntity_BasicMachine { boolean ready = false; int radius; @@ -157,6 +162,12 @@ public class GT_MetaTileEntity_AdvSeismicProspector extends GT_MetaTileEntity_Ba } } + //private void putOil(int x, int z, HashMap<String, Integer> aOils) {//TODO Old method?? + // FluidStack tFluid = GT_Utility.undergroundOil(getBaseMetaTileEntity().getWorld(),x,z,false,0); + // if (tFluid.amount / 5000 > 0) + // aOils.put(x + "," + z + "," + (tFluid.amount / 5000) + "," + tFluid.getLocalizedName(), tFluid.amount / 5000); + //} + private void prospectOres(Map<String, Integer> aNearOres, Map<String, Integer> aMiddleOres, Map<String, Integer> aFarOres) { int tLeftXBound = this.getBaseMetaTileEntity().getXCoord() - radius; int tRightXBound = tLeftXBound + 2*radius; diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Boxinator.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Boxinator.java index a869ad8d3a..f0417ee219 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Boxinator.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Boxinator.java @@ -1,99 +1,104 @@ -package gregtech.common.tileentities.machines.basic;
-
-import gregtech.api.enums.ItemList;
-import gregtech.api.enums.Textures;
-import gregtech.api.interfaces.ITexture;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.metatileentity.MetaTileEntity;
-import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine;
-import gregtech.api.objects.GT_RenderedTexture;
-import gregtech.api.util.GT_ModHandler;
-import gregtech.api.util.GT_Recipe;
-import gregtech.api.util.GT_Utility;
-import net.minecraft.item.ItemStack;
-
-public class GT_MetaTileEntity_Boxinator
- extends GT_MetaTileEntity_BasicMachine {
- public GT_MetaTileEntity_Boxinator(int aID, String aName, String aNameRegional, int aTier) {
- super(aID, aName, aNameRegional, aTier, 1, "Puts things into Boxes", 2, 1, "Packager.png", "", new ITexture[]{new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_BOXINATOR_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_BOXINATOR), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_BOXINATOR_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_BOXINATOR), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_BOXINATOR_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_BOXINATOR), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_BOXINATOR_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_BOXINATOR)});
- }
-
- public GT_MetaTileEntity_Boxinator(String aName, int aTier, String aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) {
- super(aName, aTier, 1, aDescription, aTextures, 2, 1, aGUIName, aNEIName);
- }
-
- public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
- return new GT_MetaTileEntity_Boxinator(this.mName, this.mTier, this.mDescription, this.mTextures, this.mGUIName, this.mNEIName);
- }
-
- public GT_Recipe.GT_Recipe_Map getRecipeList() {
- return GT_Recipe.GT_Recipe_Map.sBoxinatorRecipes;
- }
-
- public int checkRecipe() {
- int tCheck = super.checkRecipe();
- if (tCheck != 0) {
- return tCheck;
- }
- if ((GT_Utility.isStackValid(getInputAt(0))) && (GT_Utility.isStackValid(getInputAt(1))) && (GT_Utility.getContainerItem(getInputAt(0), true) == null)) {
- if ((ItemList.Schematic_1by1.isStackEqual(getInputAt(1))) && (getInputAt(0).stackSize >= 1)) {
- this.mOutputItems[0] = GT_ModHandler.getRecipeOutput(new ItemStack[]{getInputAt(0)});
- if (this.mOutputItems[0] != null) {
- if (canOutput(new ItemStack[]{this.mOutputItems[0]})) {
- getInputAt(0).stackSize -= 1;
- this.mEUt = (32 * (1 << this.mTier - 1) * (1 << this.mTier - 1));
- this.mMaxProgresstime = (16 / (1 << this.mTier - 1));
- return 2;
- }
- }
- return 0;
- }
- if ((ItemList.Schematic_2by2.isStackEqual(getInputAt(1))) && (getInputAt(0).stackSize >= 4)) {
- this.mOutputItems[0] = GT_ModHandler.getRecipeOutput(new ItemStack[]{getInputAt(0), getInputAt(0), null, getInputAt(0), getInputAt(0)});
- if (this.mOutputItems[0] != null) {
- if (canOutput(new ItemStack[]{this.mOutputItems[0]})) {
- getInputAt(0).stackSize -= 4;
- this.mEUt = (32 * (1 << this.mTier - 1) * (1 << this.mTier - 1));
- this.mMaxProgresstime = (32 / (1 << this.mTier - 1));
- return 2;
- }
- }
- return 0;
- }
- if ((ItemList.Schematic_3by3.isStackEqual(getInputAt(1))) && (getInputAt(0).stackSize >= 9)) {
- this.mOutputItems[0] = GT_ModHandler.getRecipeOutput(new ItemStack[]{getInputAt(0), getInputAt(0), getInputAt(0), getInputAt(0), getInputAt(0), getInputAt(0), getInputAt(0), getInputAt(0), getInputAt(0)});
- if (this.mOutputItems[0] != null) {
- if (canOutput(new ItemStack[]{this.mOutputItems[0]})) {
- getInputAt(0).stackSize -= 9;
- this.mEUt = (32 * (1 << this.mTier - 1) * (1 << this.mTier - 1));
- this.mMaxProgresstime = (64 / (1 << this.mTier - 1));
- return 2;
- }
- }
- return 0;
- }
- }
- return 0;
- }
-
- public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
- if (super.allowPutStack(aBaseMetaTileEntity, aIndex, aSide, aStack)) {
- if ((ItemList.Schematic_1by1.isStackEqual(getInputAt(1))) || (ItemList.Schematic_2by2.isStackEqual(getInputAt(1))) || (ItemList.Schematic_3by3.isStackEqual(getInputAt(1)))) {
- if (GT_Recipe.GT_Recipe_Map.sBoxinatorRecipes.findRecipe(getBaseMetaTileEntity(), true, gregtech.api.enums.GT_Values.V[this.mTier], null, new ItemStack[]{GT_Utility.copyAmount(64L, new Object[]{aStack}), getInputAt(1)}) != null) {
- return true;
- }
- if (ItemList.Schematic_1by1.isStackEqual(getInputAt(1)) && GT_ModHandler.getRecipeOutput(new ItemStack[]{aStack}) != null)
- return true;
- if (ItemList.Schematic_2by2.isStackEqual(getInputAt(1)) && GT_ModHandler.getRecipeOutput(new ItemStack[]{aStack, aStack, null, aStack, aStack}) != null) {
- return true;
- }
- if (ItemList.Schematic_3by3.isStackEqual(getInputAt(1)) && (GT_ModHandler.getRecipeOutput(new ItemStack[]{aStack, aStack, aStack, aStack, aStack, aStack, aStack, aStack, aStack}) != null)) {
- return true;
- }
- } else {
- return GT_Recipe.GT_Recipe_Map.sBoxinatorRecipes.containsInput(aStack);
- }
- }
- return false;
- }
-}
+package gregtech.common.tileentities.machines.basic; + +import gregtech.api.enums.ItemList; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Utility; +import net.minecraft.item.ItemStack; + +public class GT_MetaTileEntity_Boxinator + extends GT_MetaTileEntity_BasicMachine { + public GT_MetaTileEntity_Boxinator(int aID, String aName, String aNameRegional, int aTier) { + super(aID, aName, aNameRegional, aTier, 1, "Puts things into Boxes", 2, 1, "Packager.png", "", new ITexture[]{new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_BOXINATOR_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_BOXINATOR), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_BOXINATOR_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_BOXINATOR), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_BOXINATOR_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_BOXINATOR), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_BOXINATOR_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_BOXINATOR)}); + } + + public GT_MetaTileEntity_Boxinator(String aName, int aTier, String aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) { + super(aName, aTier, 1, aDescription, aTextures, 2, 1, aGUIName, aNEIName); + } + + public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_Boxinator(this.mName, this.mTier, this.mDescription, this.mTextures, this.mGUIName, this.mNEIName); + } + + public GT_Recipe.GT_Recipe_Map getRecipeList() { + return GT_Recipe.GT_Recipe_Map.sBoxinatorRecipes; + } + + public int checkRecipe() { + int tCheck = super.checkRecipe(); + if (tCheck != DID_NOT_FIND_RECIPE) { + return tCheck; + } + if ((GT_Utility.isStackValid(getInputAt(0))) && (GT_Utility.isStackValid(getInputAt(1))) && (GT_Utility.getContainerItem(getInputAt(0), true) == null)) { + if ((ItemList.Schematic_1by1.isStackEqual(getInputAt(1))) && (getInputAt(0).stackSize >= 1)) { + this.mOutputItems[0] = GT_ModHandler.getRecipeOutput(new ItemStack[]{getInputAt(0)}); + if (this.mOutputItems[0] != null) { + if (canOutput(new ItemStack[]{this.mOutputItems[0]})) { + getInputAt(0).stackSize -= 1; + calculateOverclockedNess(32,16); + //In case recipe is too OP for that machine + if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1) + return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS; + return FOUND_AND_SUCCESSFULLY_USED_RECIPE; + } + } + return DID_NOT_FIND_RECIPE; + } + if ((ItemList.Schematic_2by2.isStackEqual(getInputAt(1))) && (getInputAt(0).stackSize >= 4)) { + this.mOutputItems[0] = GT_ModHandler.getRecipeOutput(new ItemStack[]{getInputAt(0), getInputAt(0), null, getInputAt(0), getInputAt(0)}); + if (this.mOutputItems[0] != null) { + if (canOutput(new ItemStack[]{this.mOutputItems[0]})) { + getInputAt(0).stackSize -= 4; + calculateOverclockedNess(32,32); + //In case recipe is too OP for that machine + if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1) + return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS; + return FOUND_AND_SUCCESSFULLY_USED_RECIPE; + } + } + return DID_NOT_FIND_RECIPE; + } + if ((ItemList.Schematic_3by3.isStackEqual(getInputAt(1))) && (getInputAt(0).stackSize >= 9)) { + this.mOutputItems[0] = GT_ModHandler.getRecipeOutput(new ItemStack[]{getInputAt(0), getInputAt(0), getInputAt(0), getInputAt(0), getInputAt(0), getInputAt(0), getInputAt(0), getInputAt(0), getInputAt(0)}); + if (this.mOutputItems[0] != null) { + if (canOutput(new ItemStack[]{this.mOutputItems[0]})) { + getInputAt(0).stackSize -= 9; + calculateOverclockedNess(32,64); + //In case recipe is too OP for that machine + if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1) + return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS; + } + } + return DID_NOT_FIND_RECIPE; + } + } + return DID_NOT_FIND_RECIPE; + } + + public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + if (super.allowPutStack(aBaseMetaTileEntity, aIndex, aSide, aStack)) { + if ((ItemList.Schematic_1by1.isStackEqual(getInputAt(1))) || (ItemList.Schematic_2by2.isStackEqual(getInputAt(1))) || (ItemList.Schematic_3by3.isStackEqual(getInputAt(1)))) { + if (GT_Recipe.GT_Recipe_Map.sBoxinatorRecipes.findRecipe(getBaseMetaTileEntity(), true, gregtech.api.enums.GT_Values.V[mTier], null, new ItemStack[]{GT_Utility.copyAmount(64L, new Object[]{aStack}), getInputAt(1)}) != null) { + return true; + } + if (ItemList.Schematic_1by1.isStackEqual(getInputAt(1)) && GT_ModHandler.getRecipeOutput(new ItemStack[]{aStack}) != null) + return true; + if (ItemList.Schematic_2by2.isStackEqual(getInputAt(1)) && GT_ModHandler.getRecipeOutput(new ItemStack[]{aStack, aStack, null, aStack, aStack}) != null) { + return true; + } + if (ItemList.Schematic_3by3.isStackEqual(getInputAt(1)) && (GT_ModHandler.getRecipeOutput(new ItemStack[]{aStack, aStack, aStack, aStack, aStack, aStack, aStack, aStack, aStack}) != null)) { + return true; + } + } else { + return GT_Recipe.GT_Recipe_Map.sBoxinatorRecipes.containsInput(aStack); + } + } + return false; + } +} diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Charger.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Charger.java index 8937dfbcf5..22fafa0b5d 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Charger.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Charger.java @@ -7,6 +7,7 @@ import gregtech.api.metatileentity.BaseMetaTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicBatteryBuffer; import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_Utility; import static gregtech.api.enums.GT_Values.V; @@ -27,22 +28,20 @@ public class GT_MetaTileEntity_Charger extends GT_MetaTileEntity_BasicBatteryBuf @Override public long getMinimumStoredEU() { - return V[mTier] * 64 * mInventory.length; + return V[mTier] * 64L * mInventory.length; } @Override - public long maxEUStore() { - return V[mTier] * 256 * mInventory.length; - } + public long maxEUStore() { return V[mTier] * 256L * mInventory.length;} @Override public long maxAmperesIn() { - return mChargeableCount * 8; + return Math.max(mChargeableCount * 8L,4L); } @Override public long maxAmperesOut() { - return mBatteryCount * 4; + return Math.max(mBatteryCount * 4L,2L); } @Override @@ -57,7 +56,7 @@ public class GT_MetaTileEntity_Charger extends GT_MetaTileEntity_BasicBatteryBuf if (mMetaTileEntity.dechargerSlotCount() > 0 && mBaseMetaTileEntity.getStoredEU() < mBaseMetaTileEntity.getEUCapacity()) { for (int i = mMetaTileEntity.dechargerSlotStartIndex(), k = mMetaTileEntity.dechargerSlotCount() + i; i < k; i++) { if (mMetaTileEntity.mInventory[i] != null && mBaseMetaTileEntity.getStoredEU() < mBaseMetaTileEntity.getEUCapacity()) { - mBaseMetaTileEntity.increaseStoredEnergyUnits(GT_ModHandler.dischargeElectricItem(mMetaTileEntity.mInventory[i], (int) Math.min(V[mTier] * 15, mBaseMetaTileEntity.getEUCapacity() - mBaseMetaTileEntity.getStoredEU()), (int) Math.min(Integer.MAX_VALUE, mMetaTileEntity.getInputTier()), true, false, false), true); + mBaseMetaTileEntity.increaseStoredEnergyUnits(GT_ModHandler.dischargeElectricItem(mMetaTileEntity.mInventory[i], GT_Utility.safeInt(Math.min(V[mTier] * 15, mBaseMetaTileEntity.getEUCapacity() - mBaseMetaTileEntity.getStoredEU())), (int) Math.min(Integer.MAX_VALUE, mMetaTileEntity.getInputTier()), true, false, false), true); if (mMetaTileEntity.mInventory[i].stackSize <= 0) mMetaTileEntity.mInventory[i] = null; } @@ -66,7 +65,7 @@ public class GT_MetaTileEntity_Charger extends GT_MetaTileEntity_BasicBatteryBuf if (mMetaTileEntity.rechargerSlotCount() > 0 && mBaseMetaTileEntity.getStoredEU() > 0) { for (int i = mMetaTileEntity.rechargerSlotStartIndex(), k = mMetaTileEntity.rechargerSlotCount() + i; i < k; i++) { if (mBaseMetaTileEntity.getStoredEU() > 0 && mMetaTileEntity.mInventory[i] != null) { - mBaseMetaTileEntity.decreaseStoredEU(GT_ModHandler.chargeElectricItem(mMetaTileEntity.mInventory[i], (int) Math.min(V[this.mTier] * 15, mBaseMetaTileEntity.getStoredEU()), (int) Math.min(Integer.MAX_VALUE, mMetaTileEntity.getOutputTier()), true, false), true); + mBaseMetaTileEntity.decreaseStoredEU(GT_ModHandler.chargeElectricItem(mMetaTileEntity.mInventory[i], GT_Utility.safeInt(Math.min(V[mTier] * 15, mBaseMetaTileEntity.getStoredEU())), (int) Math.min(Integer.MAX_VALUE, mMetaTileEntity.getOutputTier()), true, false), true); if (mMetaTileEntity.mInventory[i].stackSize <= 0) mMetaTileEntity.mInventory[i] = null; } diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_CuringOven.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_CuringOven.java index 7d0de3fcc2..a4bd99dfca 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_CuringOven.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_CuringOven.java @@ -1,8 +1,6 @@ package gregtech.common.tileentities.machines.basic; -import java.util.Iterator; - import gregtech.api.enums.ItemList; import gregtech.api.enums.Textures; import gregtech.api.gui.GT_Container_1by1; @@ -11,8 +9,8 @@ import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.items.GT_MetaGenerated_Tool; import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.objects.GT_RenderedTexture; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine; +import gregtech.api.objects.GT_RenderedTexture; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Disassembler.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Disassembler.java index a63a2498bd..b26a86a943 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Disassembler.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Disassembler.java @@ -1,6 +1,6 @@ package gregtech.common.tileentities.machines.basic;
-import gregtech.api.enums.ItemList;
+import gregtech.api.enums.GT_Values;
import gregtech.api.enums.Textures;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
@@ -8,14 +8,13 @@ import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine;
import gregtech.api.objects.GT_RenderedTexture;
import gregtech.api.util.GT_Utility;
-import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
public class GT_MetaTileEntity_Disassembler
extends GT_MetaTileEntity_BasicMachine {
public GT_MetaTileEntity_Disassembler(int aID, String aName, String aNameRegional, int aTier) {
- super(aID, aName, aNameRegional, aTier, 1, "Disassembles Machines at " + Math.min(100, (50 + 10 * aTier)) + "% Efficiency", 1, 9, "Disassembler.png", "", new ITexture[]{new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_DISASSEMBLER_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_DISASSEMBLER), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_DISASSEMBLER_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_DISASSEMBLER), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_DISASSEMBLER_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_DISASSEMBLER), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_DISASSEMBLER_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_DISASSEMBLER)});
+ super(aID, aName, aNameRegional, aTier, 1, "Disassembles Machines at " + Math.min(50 + 10 * aTier,100) + "% Efficiency", 1, 9, "Disassembler.png", "", new ITexture[]{new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_DISASSEMBLER_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_DISASSEMBLER), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_DISASSEMBLER_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_DISASSEMBLER), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_DISASSEMBLER_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_DISASSEMBLER), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_DISASSEMBLER_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_DISASSEMBLER)});
}
public GT_MetaTileEntity_Disassembler(String aName, int aTier, String aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) {
@@ -42,28 +41,59 @@ public class GT_MetaTileEntity_Disassembler if (tNBT != null) {
tNBT = tNBT.getCompoundTag("GT.CraftingComponents");
if (tNBT != null) {
- this.mEUt = (16 * (1 << this.mTier - 1) * (1 << this.mTier - 1));
+ boolean isAnyOutput=false;
+ calculateOverclockedNessDisassembler(16);
this.mMaxProgresstime = 80;
+ //In case recipe is too OP for that machine
+ if (mEUt == Integer.MAX_VALUE - 1)//&& mMaxProgresstime==Integer.MAX_VALUE-1
+ return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS;
for (int i = 0; i < this.mOutputItems.length; i++) {
if (getBaseMetaTileEntity().getRandomNumber(100) < 50 + 10 * this.mTier) {
this.mOutputItems[i] = GT_Utility.loadItem(tNBT, "Ingredient." + i);
if (this.mOutputItems[i] != null) {
- this.mMaxProgresstime *= 1.7;
+ this.mMaxProgresstime *= 1.7F;
+ isAnyOutput=true;
}
}
}
- if(this.mTier>5){
- this.mMaxProgresstime = this.mMaxProgresstime >> (mTier-5);
- }
- if(mMaxProgresstime==80){
- return 0;
+ if(!isAnyOutput)
+ return DID_NOT_FIND_RECIPE;
+ for(int i=mTier-5;i>0;i--){
+ this.mMaxProgresstime>>=1;
+ if(this.mMaxProgresstime==0)
+ this.mEUt = this.mEUt>>1;
}
+ if(this.mEUt==0)
+ mEUt = 1;
+ if(this.mMaxProgresstime==0)
+ this.mMaxProgresstime = 1;
getInputAt(0).stackSize -= 1;
- return 2;
+ return FOUND_AND_SUCCESSFULLY_USED_RECIPE;
}
}
}
- return 0;
+ return DID_NOT_FIND_RECIPE;
+ }
+
+ private void calculateOverclockedNessDisassembler(int aEUt) {
+ if(mTier==0){
+ mEUt=aEUt>>2;
+ }else{
+ //Long EUt calculation
+ long xEUt=aEUt;
+ //Isnt too low EUt check?
+ long tempEUt = xEUt<GT_Values.V[1] ? GT_Values.V[1] : xEUt;
+
+ while (tempEUt <= GT_Values.V[mTier -1] * (long)mAmperage) {
+ tempEUt<<=2;//this actually controls overclocking
+ xEUt<<=2;//this is effect of overclocking
+ }
+ if(xEUt>Integer.MAX_VALUE-1){
+ mEUt = Integer.MAX_VALUE-1;
+ }else{
+ mEUt = (int)xEUt;
+ }
+ }
}
public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Massfabricator.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Massfabricator.java index 4ea6166058..19a4e97d4b 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Massfabricator.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Massfabricator.java @@ -50,15 +50,17 @@ public class GT_MetaTileEntity_Massfabricator @Override
public long maxEUStore() {
- return V[mTier] * 512;
+ return V[mTier] * 512L;
}
public int checkRecipe() {
FluidStack tFluid = getDrainableStack();
if ((tFluid == null) || (tFluid.amount < getCapacity())) {
this.mOutputFluid = Materials.UUMatter.getFluid(1L);
- this.mEUt = (((int) gregtech.api.enums.GT_Values.V[1]) * (int)Math.pow(2, this.mTier + 2));
- this.mMaxProgresstime = (sDurationMultiplier / (1 << this.mTier - 1));
+ calculateOverclockedNessMassFabricator();
+ //In case recipe is too OP for that machine
+ if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1)
+ return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS;
if (((tFluid = getFillableStack()) != null) && (tFluid.amount >= sUUAperUUM) && (tFluid.isFluidEqual(Materials.UUAmplifier.getFluid(1L)))) {
tFluid.amount -= sUUAperUUM;
this.mMaxProgresstime /= sUUASpeedBonus;
@@ -68,12 +70,50 @@ public class GT_MetaTileEntity_Massfabricator }
return 0;
}
-
- @Override
+ @Override
public GT_Recipe.GT_Recipe_Map getRecipeList() {
return GT_Recipe.GT_Recipe_Map.sMassFabFakeRecipes;
}
+ private void calculateOverclockedNessMassFabricator() {
+ if(mTier==0){
+ //Long time calculation
+ long xMaxProgresstime = ((long)sDurationMultiplier)<<1;
+ if(xMaxProgresstime>Integer.MAX_VALUE-1){
+ //make impossible if too long
+ mEUt=Integer.MAX_VALUE-1;
+ mMaxProgresstime=Integer.MAX_VALUE-1;
+ }else{
+ mEUt= (int)(GT_Values.V[1]<<2);//2^2=4 so shift <<2
+ mMaxProgresstime=(int)xMaxProgresstime;
+ }
+ }else{
+ //Long EUt calculation
+ long xEUt=GT_Values.V[1] * (long)Math.pow(2,mTier+2);
+
+ long tempEUt = GT_Values.V[1];
+
+ mMaxProgresstime = sDurationMultiplier;
+
+ while (tempEUt <= V[mTier -1]) {
+ tempEUt<<=2;//this actually controls overclocking
+ mMaxProgresstime>>=1;//this is effect of overclocking
+ if(mMaxProgresstime==0)
+ xEUt = (long)(xEUt/1.1D);//U know, if the time is less than 1 tick make the machine use less power
+ }
+ if(xEUt>Integer.MAX_VALUE-1){
+ mEUt = Integer.MAX_VALUE-1;
+ mMaxProgresstime = Integer.MAX_VALUE-1;
+ }else{
+ mEUt = (int)xEUt;
+ if(mEUt==0)
+ mEUt = 1;
+ if(mMaxProgresstime==0)
+ mMaxProgresstime = 1;//set time to 1 tick
+ }
+ }
+ }
+
public boolean isFluidInputAllowed(FluidStack aFluid) {
return aFluid.isFluidEqual(Materials.UUAmplifier.getFluid(1L));
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_MicrowaveEnergyTransmitter.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_MicrowaveEnergyTransmitter.java index de0a468582..ef91b06794 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_MicrowaveEnergyTransmitter.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_MicrowaveEnergyTransmitter.java @@ -1,5 +1,6 @@ package gregtech.common.tileentities.machines.basic; +import gregtech.api.GregTech_API; import gregtech.api.enums.ConfigCategories; import gregtech.api.enums.Materials; import gregtech.api.enums.Textures; @@ -15,9 +16,9 @@ import gregtech.common.gui.GT_Container_MicrowaveEnergyTransmitter; import gregtech.common.gui.GT_GUIContainer_MicrowaveEnergyTransmitter; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.init.Blocks; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.EnumChatFormatting; import net.minecraft.world.World; import net.minecraftforge.common.DimensionManager; import net.minecraftforge.fluids.FluidStack; @@ -32,7 +33,7 @@ public class GT_MetaTileEntity_MicrowaveEnergyTransmitter extends GT_MetaTileEnt public int mTargetZ = 0; public int mTargetD = 0; public boolean mDebug = false; - public boolean hasEgg = false; + public boolean hasBlock = false; public int mMaxLoss = 50; public int mMaxLossDistance = 10000; public boolean mPassiveEnergyUse = true; @@ -53,7 +54,7 @@ public class GT_MetaTileEntity_MicrowaveEnergyTransmitter extends GT_MetaTileEnt @Override public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) { if (aBaseMetaTileEntity.isClientSide()) return true; - this.hasEgg = checkForEgg(); + this.hasBlock = checkForBlock(); aBaseMetaTileEntity.openGUI(aPlayer); return true; } @@ -74,7 +75,15 @@ public class GT_MetaTileEntity_MicrowaveEnergyTransmitter extends GT_MetaTileEnt } public String[] getInfoData() { - return new String[]{"Coordinates:", "X: " + this.mTargetX, "Y: " + this.mTargetY, "Z: " + this.mTargetZ, "Dimension: " + this.mTargetD}; + return new String[]{ + "Coordinates:", + "X: "+EnumChatFormatting.GREEN+ this.mTargetX+EnumChatFormatting.RESET, + "Y: "+EnumChatFormatting.GREEN+ this.mTargetY+EnumChatFormatting.RESET, + "Z: "+EnumChatFormatting.GREEN+ this.mTargetZ+EnumChatFormatting.RESET, + "Dimension: " + EnumChatFormatting.GREEN+this.mTargetD+EnumChatFormatting.RESET, + "Dimension Valid: " + (GT_Utility.isRealDimension(this.mTargetD) ? EnumChatFormatting.GREEN+"Yes"+EnumChatFormatting.RESET : EnumChatFormatting.RED+"No"+EnumChatFormatting.RESET), + "Dimension Registered: " + (DimensionManager.isDimensionRegistered(this.mTargetD) ? EnumChatFormatting.GREEN+"Yes"+EnumChatFormatting.RESET : EnumChatFormatting.RED+"No"+EnumChatFormatting.RESET) + }; } @Override @@ -107,23 +116,24 @@ public class GT_MetaTileEntity_MicrowaveEnergyTransmitter extends GT_MetaTileEnt mPassiveEnergyUse = aConfig.get(ConfigCategories.machineconfig, "MicrowaveTransmitter.PassiveEnergy", true); } - public void onFirstTick() { - if (getBaseMetaTileEntity().isServerSide()) { + @Override + public void onFirstTick(IGregTechTileEntity aBaseMetaTileEntity) { + if (aBaseMetaTileEntity.isServerSide()) { if ((this.mTargetX == 0) && (this.mTargetY == 0) && (this.mTargetZ == 0) && (this.mTargetD == 0)) { - this.mTargetX = getBaseMetaTileEntity().getXCoord(); - this.mTargetY = getBaseMetaTileEntity().getYCoord(); - this.mTargetZ = getBaseMetaTileEntity().getZCoord(); - this.mTargetD = getBaseMetaTileEntity().getWorld().provider.dimensionId; + this.mTargetX = aBaseMetaTileEntity.getXCoord(); + this.mTargetY = aBaseMetaTileEntity.getYCoord(); + this.mTargetZ = aBaseMetaTileEntity.getZCoord(); + this.mTargetD = aBaseMetaTileEntity.getWorld().provider.dimensionId; } - this.hasEgg = checkForEgg(); + this.hasBlock = checkForBlock(); } } - public boolean checkForEgg() { + public boolean checkForBlock() { for (byte i = -5; i <= 5; i = (byte) (i + 1)) { for (byte j = -5; j <= 5; j = (byte) (j + 1)) { for (byte k = -5; k <= 5; k = (byte) (k + 1)) { - if (getBaseMetaTileEntity().getBlockOffset(i, j, k) == Blocks.dragon_egg) { + if (getBaseMetaTileEntity().getBlockOffset(i, j, k) == GregTech_API.sBlockMetal5 && getBaseMetaTileEntity().getMetaIDOffset(i, j, k) == 8) {//require osmiridium block return true; } } @@ -133,7 +143,7 @@ public class GT_MetaTileEntity_MicrowaveEnergyTransmitter extends GT_MetaTileEnt } public boolean hasDimensionalTeleportCapability() { - return (this.mDebug) || (this.hasEgg) || (mFluid.isFluidEqual(Materials.Nitrogen.getPlasma(1)) && mFluid.amount >= 1000); + return (this.mDebug) || (this.hasBlock) || (mFluid.isFluidEqual(Materials.Nitrogen.getPlasma(1)) && mFluid.amount >= 1000); } public boolean isDimensionalTeleportAvailable() { @@ -148,12 +158,12 @@ public class GT_MetaTileEntity_MicrowaveEnergyTransmitter extends GT_MetaTileEnt super.onPostTick(aBaseMetaTileEntity, aTick); if (getBaseMetaTileEntity().isServerSide()) { if (getBaseMetaTileEntity().getTimer() % 100L == 50L) { - this.hasEgg = checkForEgg(); + this.hasBlock = checkForBlock(); } if ((getBaseMetaTileEntity().isAllowedToWork()) && (getBaseMetaTileEntity().getRedstone())) { if (getBaseMetaTileEntity().getStoredEU() > (V[mTier] * 16)) { if (mPassiveEnergyUse) { - getBaseMetaTileEntity().decreaseStoredEnergyUnits((long) Math.pow(2, mTier), false); + getBaseMetaTileEntity().decreaseStoredEnergyUnits(2L<<(mTier-1), false); } if (hasDimensionalTeleportCapability() && this.mTargetD != getBaseMetaTileEntity().getWorld().provider.dimensionId && mFluid.isFluidEqual(Materials.Nitrogen.getPlasma(1))) { mFluid.amount--; @@ -176,14 +186,18 @@ public class GT_MetaTileEntity_MicrowaveEnergyTransmitter extends GT_MetaTileEnt } } int tDistance = distanceCalculation(); - long tEnergyTrans = Math.min(V[mTier], getBaseMetaTileEntity().getStoredEU()); if (tTile != null && tTile instanceof IEnergyConnected) { - if (((IEnergyConnected) tTile).injectEnergyUnits((byte) 6, V[mTier], 1) > 0) { - int tLoss = 1; - if (mMaxLossDistance != 0) { - tLoss = 10 + tDistance * (mMaxLoss - 10) / mMaxLossDistance; - } - getBaseMetaTileEntity().decreaseStoredEnergyUnits(V[mTier] + ((V[mTier] * tLoss) / 100), false); + int tLoss = 1; + if (mMaxLossDistance != 0) { + tLoss = GT_Utility.safeInt(10L + (tDistance * Math.max(mMaxLoss - 10L,0) / mMaxLossDistance)); + } + if(getBaseMetaTileEntity().isUniversalEnergyStored(V[mTier] + ((V[mTier] * tLoss) / 100))){ + //TODO:check tier before sending to disable remote detonation + //if(((IEnergyConnected) tTile).) + if (((IEnergyConnected) tTile).injectEnergyUnits((byte) 6, V[mTier], 1) > 0) { + getBaseMetaTileEntity().decreaseStoredEnergyUnits(V[mTier] + ((V[mTier] * tLoss) / 100), false); + } + //} } } } diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_MonsterRepellent.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_MonsterRepellent.java index 2ba2cd140b..b32ef071a9 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_MonsterRepellent.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_MonsterRepellent.java @@ -40,7 +40,7 @@ public class GT_MetaTileEntity_MonsterRepellent extends GT_MetaTileEntity_Tiered if ((aTimer % 600 == 0) && !GT_SpawnEventHandler.mobReps.contains(tCoords)) { GT_SpawnEventHandler.mobReps.add(tCoords); } - if (aBaseMetaTileEntity.isUniversalEnergyStored(getMinimumStoredEU()) && aBaseMetaTileEntity.decreaseStoredEnergyUnits(1 << (this.mTier * 2), false)) { + if (aBaseMetaTileEntity.isUniversalEnergyStored(getMinimumStoredEU()) && aBaseMetaTileEntity.decreaseStoredEnergyUnits(1L << (this.mTier * 2), false)) { mRange = 16 + (48 * mTier); } else { mRange = 4 + (12 * mTier); @@ -87,12 +87,12 @@ public class GT_MetaTileEntity_MonsterRepellent extends GT_MetaTileEntity_Tiered @Override public long getMinimumStoredEU() { - return 512; + return 512L; } @Override public long maxEUStore() { - return 512 + V[mTier] * 50; + return 512L + V[mTier] * 50; } @Override diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_PotionBrewer.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_PotionBrewer.java index 2dcde9c082..56371be1ed 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_PotionBrewer.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_PotionBrewer.java @@ -1,139 +1,141 @@ -package gregtech.common.tileentities.machines.basic;
-
-import gregtech.api.enums.Materials;
-import gregtech.api.enums.OrePrefixes;
-import gregtech.api.enums.Textures;
-import gregtech.api.interfaces.ITexture;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.metatileentity.MetaTileEntity;
-import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine;
-import gregtech.api.objects.GT_RenderedTexture;
-import gregtech.api.util.GT_OreDictUnificator;
-import gregtech.api.util.GT_Recipe;
-import gregtech.api.util.GT_Utility;
-import net.minecraft.init.Items;
-import net.minecraft.item.ItemStack;
-import net.minecraftforge.fluids.FluidRegistry;
-import net.minecraftforge.fluids.FluidStack;
-
-public class GT_MetaTileEntity_PotionBrewer
- extends GT_MetaTileEntity_BasicMachine {
- public GT_MetaTileEntity_PotionBrewer(int aID, String aName, String aNameRegional, int aTier) {
- super(aID, aName, aNameRegional, aTier, 1, "Brewing your Drinks", 1, 0, "PotionBrewer.png", "", new ITexture[]{new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_POTIONBREWER_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_POTIONBREWER), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_POTIONBREWER_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_POTIONBREWER), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_POTIONBREWER_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_POTIONBREWER), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_POTIONBREWER_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_POTIONBREWER)});
- }
-
- public GT_MetaTileEntity_PotionBrewer(String aName, int aTier, String aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) {
- super(aName, aTier, 1, aDescription, aTextures, 1, 0, aGUIName, aNEIName);
- }
-
- public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
- return new GT_MetaTileEntity_PotionBrewer(this.mName, this.mTier, this.mDescription, this.mTextures, this.mGUIName, this.mNEIName);
- }
-
- public GT_Recipe.GT_Recipe_Map getRecipeList() {
- return GT_Recipe.GT_Recipe_Map.sBrewingRecipes;
- }
-
- public int checkRecipe() {
- int tCheck = super.checkRecipe();
- if (tCheck != 0) {
- return tCheck;
- }
- FluidStack aFluid = getFillableStack();
- if ((getDrainableStack() == null) && (aFluid != null) && (getInputAt(0) != null)) {
- String tInputName = aFluid.getFluid().getName();
- if (tInputName.startsWith("potion.")) {
- tInputName = tInputName.replaceFirst("potion.", "");
- int tFirstDot = tInputName.indexOf('.') + 1;
- String tModifier = tFirstDot <= 0 ? "" : tInputName.substring(tFirstDot);
- if (!tModifier.isEmpty()) {
- tInputName = tInputName.replaceFirst("." + tModifier, "");
- }
- if (GT_Utility.areStacksEqual(new ItemStack(Items.fermented_spider_eye, 1, 0), getInputAt(0))) {
- if (tInputName.equals("poison")) {
- return setOutput("potion.damage" + tModifier);
- }
- if (tInputName.equals("health")) {
- return setOutput("potion.damage" + tModifier);
- }
- if (tInputName.equals("waterbreathing")) {
- return setOutput("potion.damage" + tModifier);
- }
- if (tInputName.equals("nightvision")) {
- return setOutput("potion.invisibility" + tModifier);
- }
- if (tInputName.equals("fireresistance")) {
- return setOutput("potion.slowness" + tModifier);
- }
- if (tInputName.equals("speed")) {
- return setOutput("potion.slowness" + tModifier);
- }
- if (tInputName.equals("strength")) {
- return setOutput("potion.weakness" + tModifier);
- }
- if (tInputName.equals("regen")) {
- return setOutput("potion.poison" + tModifier);
- }
- return setOutput("potion.weakness");
- }
- if (GT_Utility.areStacksEqual(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Glowstone, 1L), getInputAt(0))) {
- if (!tModifier.startsWith("strong")) {
- return setOutput("potion." + tInputName + ".strong" + (tModifier.isEmpty() ? "" : new StringBuilder().append(".").append(tModifier).toString()));
- }
- if (tModifier.startsWith("long")) {
- return setOutput("potion." + tInputName + tModifier.replaceFirst("long", ""));
- }
- return setOutput("potion.thick");
- }
- if (GT_Utility.areStacksEqual(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 1L), getInputAt(0))) {
- if (!tModifier.startsWith("long")) {
- return setOutput("potion." + tInputName + ".long" + (tModifier.isEmpty() ? "" : new StringBuilder().append(".").append(tModifier).toString()));
- }
- if (tModifier.startsWith("strong")) {
- return setOutput("potion." + tInputName + tModifier.replaceFirst("strong", ""));
- }
- return setOutput("potion.mundane");
- }
- if (GT_Utility.areStacksEqual(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Gunpowder, 1L), getInputAt(0))) {
- if (!tInputName.endsWith(".splash")) {
- return setOutput("potion." + tInputName + ".splash");
- }
- return setOutput("potion.mundane");
- }
- }
- }
- return 0;
- }
-
- private final int setOutput(String aFluidName) {
- this.mOutputFluid = FluidRegistry.getFluidStack(aFluidName, 750);
- if (this.mOutputFluid == null) {
- this.mOutputFluid = FluidRegistry.getFluidStack("potion.mundane", getFillableStack().amount);
- getInputAt(0).stackSize -= 1;
- getFillableStack().amount = 0;
- this.mEUt = (4 * (1 << this.mTier - 1) * (1 << this.mTier - 1));
- this.mMaxProgresstime = (128 / (1 << this.mTier - 1));
- return 2;
- }
- if (getFillableStack().amount < 750) {
- return 0;
- }
- getInputAt(0).stackSize -= 1;
- getFillableStack().amount -= 750;
- this.mEUt = (4 * (1 << this.mTier - 1) * (1 << this.mTier - 1));
- this.mMaxProgresstime = (128 / (1 << this.mTier - 1));
- return 2;
- }
-
- public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
- return (super.allowPutStack(aBaseMetaTileEntity, aIndex, aSide, aStack)) && (getRecipeList().containsInput(aStack));
- }
-
- public boolean isFluidInputAllowed(FluidStack aFluid) {
- return (aFluid.getFluid().getName().startsWith("potion.")) || (super.isFluidInputAllowed(aFluid));
- }
-
- public int getCapacity() {
- return 750;
- }
-}
+package gregtech.common.tileentities.machines.basic; + +import gregtech.api.enums.Materials; +import gregtech.api.enums.OrePrefixes; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_OreDictUnificator; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Utility; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.FluidRegistry; +import net.minecraftforge.fluids.FluidStack; + +public class GT_MetaTileEntity_PotionBrewer + extends GT_MetaTileEntity_BasicMachine { + public GT_MetaTileEntity_PotionBrewer(int aID, String aName, String aNameRegional, int aTier) { + super(aID, aName, aNameRegional, aTier, 1, "Brewing your Drinks", 1, 0, "PotionBrewer.png", "", new ITexture[]{new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_POTIONBREWER_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_POTIONBREWER), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_POTIONBREWER_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_POTIONBREWER), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_POTIONBREWER_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_POTIONBREWER), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_POTIONBREWER_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_POTIONBREWER)}); + } + + public GT_MetaTileEntity_PotionBrewer(String aName, int aTier, String aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) { + super(aName, aTier, 1, aDescription, aTextures, 1, 0, aGUIName, aNEIName); + } + + public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_PotionBrewer(this.mName, this.mTier, this.mDescription, this.mTextures, this.mGUIName, this.mNEIName); + } + + public GT_Recipe.GT_Recipe_Map getRecipeList() { + return GT_Recipe.GT_Recipe_Map.sBrewingRecipes; + } + + public int checkRecipe() { + int tCheck = super.checkRecipe(); + if (tCheck != DID_NOT_FIND_RECIPE) { + return tCheck; + } + + calculateOverclockedNess(4,128); + //In case recipe is too OP for that machine + if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1) + return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS; + + FluidStack aFluid = getFillableStack(); + if ((getDrainableStack() == null) && (aFluid != null) && (getInputAt(0) != null)) { + String tInputName = aFluid.getFluid().getName(); + if (tInputName.startsWith("potion.")) { + tInputName = tInputName.replaceFirst("potion.", ""); + int tFirstDot = tInputName.indexOf('.') + 1; + String tModifier = tFirstDot <= 0 ? "" : tInputName.substring(tFirstDot); + if (!tModifier.isEmpty()) { + tInputName = tInputName.replaceFirst("." + tModifier, ""); + } + if (GT_Utility.areStacksEqual(new ItemStack(Items.fermented_spider_eye, 1, 0), getInputAt(0))) { + if (tInputName.equals("poison")) { + return setOutput("potion.damage" + tModifier); + } + if (tInputName.equals("health")) { + return setOutput("potion.damage" + tModifier); + } + if (tInputName.equals("waterbreathing")) { + return setOutput("potion.damage" + tModifier); + } + if (tInputName.equals("nightvision")) { + return setOutput("potion.invisibility" + tModifier); + } + if (tInputName.equals("fireresistance")) { + return setOutput("potion.slowness" + tModifier); + } + if (tInputName.equals("speed")) { + return setOutput("potion.slowness" + tModifier); + } + if (tInputName.equals("strength")) { + return setOutput("potion.weakness" + tModifier); + } + if (tInputName.equals("regen")) { + return setOutput("potion.poison" + tModifier); + } + return setOutput("potion.weakness"); + } + if (GT_Utility.areStacksEqual(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Glowstone, 1L), getInputAt(0))) { + if (!tModifier.startsWith("strong")) { + return setOutput("potion." + tInputName + ".strong" + (tModifier.isEmpty() ? "" : new StringBuilder().append(".").append(tModifier).toString())); + } + if (tModifier.startsWith("long")) { + return setOutput("potion." + tInputName + tModifier.replaceFirst("long", "")); + } + return setOutput("potion.thick"); + } + if (GT_Utility.areStacksEqual(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 1L), getInputAt(0))) { + if (!tModifier.startsWith("long")) { + return setOutput("potion." + tInputName + ".long" + (tModifier.isEmpty() ? "" : new StringBuilder().append(".").append(tModifier).toString())); + } + if (tModifier.startsWith("strong")) { + return setOutput("potion." + tInputName + tModifier.replaceFirst("strong", "")); + } + return setOutput("potion.mundane"); + } + if (GT_Utility.areStacksEqual(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Gunpowder, 1L), getInputAt(0))) { + if (!tInputName.endsWith(".splash")) { + return setOutput("potion." + tInputName + ".splash"); + } + return setOutput("potion.mundane"); + } + } + } + return 0; + } + + private final int setOutput(String aFluidName) { + this.mOutputFluid = FluidRegistry.getFluidStack(aFluidName, 750); + if (this.mOutputFluid == null) { + this.mOutputFluid = FluidRegistry.getFluidStack("potion.mundane", getFillableStack().amount); + getInputAt(0).stackSize -= 1; + getFillableStack().amount = 0; + return 2; + } + if (getFillableStack().amount < 750) { + return 0; + } + getInputAt(0).stackSize -= 1; + getFillableStack().amount -= 750; + return 2; + } + + public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + return (super.allowPutStack(aBaseMetaTileEntity, aIndex, aSide, aStack)) && (getRecipeList().containsInput(aStack)); + } + + public boolean isFluidInputAllowed(FluidStack aFluid) { + return (aFluid.getFluid().getName().startsWith("potion.")) || (super.isFluidInputAllowed(aFluid)); + } + + public int getCapacity() { + return 750; + } +} diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Printer.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Printer.java index 2f1eecdd91..44c39612c6 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Printer.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Printer.java @@ -1,53 +1,55 @@ -package gregtech.common.tileentities.machines.basic;
-
-import gregtech.api.enums.OrePrefixes;
-import gregtech.api.interfaces.ITexture;
-import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine;
-import gregtech.api.util.GT_OreDictUnificator;
-import gregtech.api.util.GT_Recipe;
-import gregtech.api.util.GT_Utility;
-import net.minecraft.item.ItemStack;
-
-import java.util.ArrayList;
-
-public class GT_MetaTileEntity_Printer
- extends GT_MetaTileEntity_BasicMachine {
- public GT_MetaTileEntity_Printer(int aID, String aName, String aNameRegional, int aTier) {
- super(aID, aName, aNameRegional, aTier, 1, "It can copy Books and paint Stuff", 1, 1, "Printer.png", GT_Recipe.GT_Recipe_Map.sPrinterRecipes.mNEIName, new ITexture[0]);
- }
-
- public GT_MetaTileEntity_Printer(String aName, int aTier, String aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) {
- super(aName, aTier, 1, aDescription, aTextures, 2, 2, aGUIName, aNEIName);
- }
-
- public int checkRecipe() {
- if (getOutputAt(0) != null) {
- this.mOutputBlocked += 1;
- } else if ((GT_Utility.isStackValid(getInputAt(0))) && (getInputAt(0).stackSize > 0) &&
- (GT_Utility.isStackInvalid(getSpecialSlot())) &&
- (OrePrefixes.block.contains(getInputAt(0)))) {
- ArrayList<ItemStack> tList = GT_OreDictUnificator.getOres(GT_OreDictUnificator.getAssociation(getInputAt(0)));
- if (tList.size() > 1) {
- tList.add(tList.get(0));
- int i = 0;
- for (int j = tList.size() - 1; i < j; i++) {
- if (GT_Utility.areStacksEqual(getInputAt(0), (ItemStack) tList.get(i))) {
- this.mOutputItems[0] = GT_Utility.copyAmount(1L, new Object[]{tList.get(i + 1)});
- this.mEUt = (1 * (1 << this.mTier - 1) * (1 << this.mTier - 1));
- this.mMaxProgresstime = (32 / (1 << this.mTier - 1));
- getInputAt(0).stackSize -= 1;
- return 2;
- }
- }
- }
- }
- this.mMaxProgresstime = 0;
- return 0;
- }
-
- public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
- return null;
- }
-}
+package gregtech.common.tileentities.machines.basic; + +import gregtech.api.enums.OrePrefixes; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine; +import gregtech.api.util.GT_OreDictUnificator; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Utility; +import net.minecraft.item.ItemStack; + +import java.util.ArrayList; + +public class GT_MetaTileEntity_Printer + extends GT_MetaTileEntity_BasicMachine { + public GT_MetaTileEntity_Printer(int aID, String aName, String aNameRegional, int aTier) { + super(aID, aName, aNameRegional, aTier, 1, "It can copy Books and paint Stuff", 1, 1, "Printer.png", GT_Recipe.GT_Recipe_Map.sPrinterRecipes.mNEIName, new ITexture[0]); + } + + public GT_MetaTileEntity_Printer(String aName, int aTier, String aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) { + super(aName, aTier, 1, aDescription, aTextures, 2, 2, aGUIName, aNEIName); + } + + public int checkRecipe() { + if (getOutputAt(0) != null) { + this.mOutputBlocked += 1; + } else if ((GT_Utility.isStackValid(getInputAt(0))) && (getInputAt(0).stackSize > 0) && + (GT_Utility.isStackInvalid(getSpecialSlot())) && + (OrePrefixes.block.contains(getInputAt(0)))) { + ArrayList<ItemStack> tList = GT_OreDictUnificator.getOres(GT_OreDictUnificator.getAssociation(getInputAt(0))); + if (tList.size() > 1) { + tList.add(tList.get(0)); + int i = 0; + for (int j = tList.size() - 1; i < j; i++) { + if (GT_Utility.areStacksEqual(getInputAt(0), (ItemStack) tList.get(i))) { + this.mOutputItems[0] = GT_Utility.copyAmount(1L, new Object[]{tList.get(i + 1)}); + calculateOverclockedNess(1,32); + //In case recipe is too OP for that machine + if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1) + return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS; + getInputAt(0).stackSize -= 1; + return 2; + } + } + } + } + this.mMaxProgresstime = 0; + return 0; + } + + public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return null; + } +} diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Pump.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Pump.java index bff1c616fd..98eacd1d84 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Pump.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Pump.java @@ -17,8 +17,10 @@ import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.init.Blocks; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.world.ChunkPosition; +import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.IFluidBlock; +import net.minecraftforge.fluids.IFluidHandler; import java.util.ArrayList; import java.util.Iterator; @@ -34,7 +36,7 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch { public Block mPumpedBlock2 = null; public GT_MetaTileEntity_Pump(int aID, String aName, String aNameRegional, int aTier) { - super(aID, aName, aNameRegional, aTier, 3, "The best way of emptying Oceans!"); + super(aID, aName, aNameRegional, aTier, 3, "The best way of emptying Oceans! Outputs on top."); } public GT_MetaTileEntity_Pump(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { @@ -121,7 +123,7 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch { ((GT_MetaTileEntity_Pump) tTileEntity.getMetaTileEntity()).mPumpTimer -= 1; } if (this.mPumpCountBelow <= 0) { - if ((getBaseMetaTileEntity().isAllowedToWork()) && (getBaseMetaTileEntity().isUniversalEnergyStored(16 * ((int) Math.pow(4, this.mTier)))) + if ((getBaseMetaTileEntity().isAllowedToWork()) && (getBaseMetaTileEntity().isUniversalEnergyStored(16 * ((long) Math.pow(4, this.mTier)))) && ((this.mFluid == null) || (this.mFluid.amount + 1000 <= getCapacity()))) { boolean tMovedOneDown = false; if ((this.mPumpList.isEmpty()) && (getBaseMetaTileEntity().getTimer() % 100L == 0L)) { @@ -146,7 +148,7 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch { this.mPumpList.clear(); int y = getBaseMetaTileEntity().getYCoord() - 1; for (int yHead = getYOfPumpHead(); (this.mPumpList.isEmpty()) && (y >= yHead); y--) { - scanForFluid(getBaseMetaTileEntity().getXCoord(), y, getBaseMetaTileEntity().getZCoord(), this.mPumpList, getBaseMetaTileEntity().getXCoord(), getBaseMetaTileEntity().getZCoord(), 10 * ((int) Math.pow(1.6, this.mTier))); + scanForFluid(getBaseMetaTileEntity().getXCoord(), y, getBaseMetaTileEntity().getZCoord(), this.mPumpList, getBaseMetaTileEntity().getXCoord(), getBaseMetaTileEntity().getZCoord(), 10 * ((int) Math.pow(1.6D, this.mTier))); } } if ((!tMovedOneDown) && (this.mPumpTimer <= 0)) { @@ -156,12 +158,26 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch { ((ChunkPosition) this.mPumpList.remove(this.mPumpList.size() - 1)).chunkPosZ))) { //Should this be empty? } - this.mPumpTimer = 160 / ((int) Math.pow(2, this.mTier)); + this.mPumpTimer = GT_Utility.safeInt(160 / (long)Math.pow(2, this.mTier) ); + this.mPumpTimer = mPumpTimer==0 ? 1 : mPumpTimer; } } } getBaseMetaTileEntity().setActive(!this.mPumpList.isEmpty()); } + + //auto outputs on top + if (this.mFluid != null && (aTick % 20 == 0)) { + IFluidHandler tTank = aBaseMetaTileEntity.getITankContainerAtSide((byte)1);//1 is up. + if (tTank != null) { + FluidStack tDrained = drain(1000, false); + if (tDrained != null) { + int tFilledAmount = tTank.fill(ForgeDirection.UP, tDrained, false); + if (tFilledAmount > 0) + tTank.fill(ForgeDirection.UP, drain(tFilledAmount, true), true); + } + } + } } } @@ -283,31 +299,31 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch { if ((aBlock == Blocks.water) || (aBlock == Blocks.flowing_water)) { if (aMeta == 0) { if (this.mFluid == null) { - getBaseMetaTileEntity().decreaseStoredEnergyUnits(16 * ((int) Math.pow(4, this.mTier)), true); + getBaseMetaTileEntity().decreaseStoredEnergyUnits(16 * ((long) Math.pow(4, this.mTier)), true); this.mFluid = GT_ModHandler.getWater(1000L); } else if (GT_ModHandler.isWater(this.mFluid)) { - getBaseMetaTileEntity().decreaseStoredEnergyUnits(16 * ((int) Math.pow(4, this.mTier)), true); + getBaseMetaTileEntity().decreaseStoredEnergyUnits(16 * ((long) Math.pow(4, this.mTier)), true); this.mFluid.amount += 1000; } else { return false; } } else { - getBaseMetaTileEntity().decreaseStoredEnergyUnits(4 * ((int) Math.pow(4, this.mTier)), true); + getBaseMetaTileEntity().decreaseStoredEnergyUnits(4 * ((long) Math.pow(4, this.mTier)), true); } } if ((aBlock == Blocks.lava) || (aBlock == Blocks.flowing_lava)) { if (aMeta == 0) { if (this.mFluid == null) { - getBaseMetaTileEntity().decreaseStoredEnergyUnits(16 * ((int) Math.pow(4, this.mTier)), true); + getBaseMetaTileEntity().decreaseStoredEnergyUnits(16 * ((long) Math.pow(4, this.mTier)), true); this.mFluid = GT_ModHandler.getLava(1000L); } else if (GT_ModHandler.isLava(this.mFluid)) { - getBaseMetaTileEntity().decreaseStoredEnergyUnits(16 * ((int) Math.pow(4, this.mTier)), true); + getBaseMetaTileEntity().decreaseStoredEnergyUnits(16 * ((long) Math.pow(4, this.mTier)), true); this.mFluid.amount += 1000; } else { return false; } } else { - getBaseMetaTileEntity().decreaseStoredEnergyUnits(4 * ((int) Math.pow(4, this.mTier)), true); + getBaseMetaTileEntity().decreaseStoredEnergyUnits(4 * ((long) Math.pow(4, this.mTier)), true); } } if ((aBlock instanceof IFluidBlock)) { @@ -317,7 +333,7 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch { } else if (this.mFluid.isFluidEqual(((IFluidBlock) aBlock).drain(getBaseMetaTileEntity().getWorld(), aX, aY, aZ, false))) { this.getBaseMetaTileEntity().getWorld().setBlockToAir(aX, aY, aZ); this.mFluid.amount += 1000; - getBaseMetaTileEntity().decreaseStoredEnergyUnits(16 * ((int) Math.pow(4, this.mTier)), true); + getBaseMetaTileEntity().decreaseStoredEnergyUnits(16 * ((long) Math.pow(4, this.mTier)), true); } else { return false; } @@ -429,7 +445,7 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch { @Override public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColorIndex + 1], (aSide == 0 || aSide == 1) ? null : new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ADV_PUMP)}; + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColorIndex + 1], (aSide == 0 || aSide == 1) ? new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT) : new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ADV_PUMP)}; } @Override diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Replicator.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Replicator.java index 2e50df6e54..bff8b8e612 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Replicator.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Replicator.java @@ -41,8 +41,13 @@ public class GT_MetaTileEntity_Replicator Materials tMaterial = (Materials) Element.get(Behaviour_DataOrb.getDataName(tDataOrb)).mLinkedMaterials.get(0);
long tMass = tMaterial.getMass();
if ((tFluid.amount >= tMass) && (tMass > 0L)) {
- this.mEUt = ((int) gregtech.api.enums.GT_Values.V[this.mTier]);
- this.mMaxProgresstime = ((int) (tMass * 512L / (1 << this.mTier - 1)));
+
+ this.mEUt = GT_Utility.safeInt(gregtech.api.enums.GT_Values.V[this.mTier],1);
+ this.mMaxProgresstime = GT_Utility.safeInt(tMass * 1024L / (1 << this.mTier),1);
+ if (mMaxProgresstime == Integer.MAX_VALUE - 1 || mEUt == Integer.MAX_VALUE - 1)
+ return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS;
+
+
if ((this.mOutputItems[0] = GT_OreDictUnificator.get(OrePrefixes.dust, tMaterial, 1L)) == null) {
if ((this.mOutputItems[0] = GT_OreDictUnificator.get(OrePrefixes.cell, tMaterial, 1L)) != null) {
if ((this.mOutputFluid = GT_Utility.getFluidForFilledItem(this.mOutputItems[0], true)) == null) {
diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_RockBreaker.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_RockBreaker.java index 171c6a847a..a3d5971de0 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_RockBreaker.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_RockBreaker.java @@ -1,68 +1,72 @@ -package gregtech.common.tileentities.machines.basic;
-
-import gregtech.api.enums.Materials;
-import gregtech.api.enums.OrePrefixes;
-import gregtech.api.enums.Textures;
-import gregtech.api.interfaces.ITexture;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.metatileentity.MetaTileEntity;
-import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine;
-import gregtech.api.objects.GT_RenderedTexture;
-import gregtech.api.util.GT_OreDictUnificator;
-import gregtech.api.util.GT_Recipe;
-import gregtech.api.util.GT_Utility;
-import net.minecraft.init.Blocks;
-import net.minecraft.item.ItemStack;
-
-public class GT_MetaTileEntity_RockBreaker
- extends GT_MetaTileEntity_BasicMachine {
- public GT_MetaTileEntity_RockBreaker(int aID, String aName, String aNameRegional, int aTier) {
- super(aID, aName, aNameRegional, aTier, 1, "Put Lava and Water adjacent", 1, 1, "RockBreaker.png", "", new ITexture[]{new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_ROCK_BREAKER_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_ROCK_BREAKER), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_ROCK_BREAKER_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_ROCK_BREAKER), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_ROCK_BREAKER_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_ROCK_BREAKER), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_ROCK_BREAKER_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_ROCK_BREAKER)});
- }
-
- public GT_MetaTileEntity_RockBreaker(String aName, int aTier, String aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) {
- super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName);
- }
-
- public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
- return new GT_MetaTileEntity_RockBreaker(this.mName, this.mTier, this.mDescription, this.mTextures, this.mGUIName, this.mNEIName);
- }
-
- public GT_Recipe.GT_Recipe_Map getRecipeList() {
- return GT_Recipe.GT_Recipe_Map.sRockBreakerFakeRecipes;
- }
-
- public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
- return (super.allowPutStack(aBaseMetaTileEntity, aIndex, aSide, aStack)) && (getRecipeList().containsInput(aStack));
- }
-
- public int checkRecipe() {
- IGregTechTileEntity aBaseMetaTileEntity = getBaseMetaTileEntity();
- if ((aBaseMetaTileEntity.getBlockOffset(0, 0, 1) == Blocks.water) || (aBaseMetaTileEntity.getBlockOffset(0, 0, -1) == Blocks.water) || (aBaseMetaTileEntity.getBlockOffset(-1, 0, 0) == Blocks.water) || (aBaseMetaTileEntity.getBlockOffset(1, 0, 0) == Blocks.water)) {
- ItemStack tOutput = null;
- if (aBaseMetaTileEntity.getBlockOffset(0, 1, 0) == Blocks.lava) {
- tOutput = new ItemStack(Blocks.stone, 1);
- } else if ((aBaseMetaTileEntity.getBlockOffset(0, 0, 1) == Blocks.lava) || (aBaseMetaTileEntity.getBlockOffset(0, 0, -1) == Blocks.lava) || (aBaseMetaTileEntity.getBlockOffset(-1, 0, 0) == Blocks.lava) || (aBaseMetaTileEntity.getBlockOffset(1, 0, 0) == Blocks.lava)) {
- tOutput = new ItemStack(Blocks.cobblestone, 1);
- }
- if (tOutput != null) {
- if (GT_Utility.areStacksEqual(getInputAt(0), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 1L))) {
- tOutput = new ItemStack(Blocks.obsidian, 1);
- if (canOutput(new ItemStack[]{tOutput})) {
- getInputAt(0).stackSize -= 1;
- this.mOutputItems[0] = tOutput;
- this.mMaxProgresstime = (128 / (1 << this.mTier - 1));
- this.mEUt = (32 * (1 << this.mTier - 1) * (1 << this.mTier - 1));
- return 2;
- }
- } else if (canOutput(new ItemStack[]{tOutput})) {
- this.mOutputItems[0] = tOutput;
- this.mMaxProgresstime = (16 / (1 << this.mTier - 1));
- this.mEUt = (32 * (1 << this.mTier - 1) * (1 << this.mTier - 1));
- return 2;
- }
- }
- }
- return 0;
- }
-}
+package gregtech.common.tileentities.machines.basic; + +import gregtech.api.enums.Materials; +import gregtech.api.enums.OrePrefixes; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_OreDictUnificator; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Utility; +import net.minecraft.init.Blocks; +import net.minecraft.item.ItemStack; + +public class GT_MetaTileEntity_RockBreaker + extends GT_MetaTileEntity_BasicMachine { + public GT_MetaTileEntity_RockBreaker(int aID, String aName, String aNameRegional, int aTier) { + super(aID, aName, aNameRegional, aTier, 1, "Put Lava and Water adjacent", 1, 1, "RockBreaker.png", "", new ITexture[]{new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_ROCK_BREAKER_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_ROCK_BREAKER), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_ROCK_BREAKER_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_ROCK_BREAKER), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_ROCK_BREAKER_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_ROCK_BREAKER), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_ROCK_BREAKER_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_ROCK_BREAKER)}); + } + + public GT_MetaTileEntity_RockBreaker(String aName, int aTier, String aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) { + super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName); + } + + public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_RockBreaker(this.mName, this.mTier, this.mDescription, this.mTextures, this.mGUIName, this.mNEIName); + } + + public GT_Recipe.GT_Recipe_Map getRecipeList() { + return GT_Recipe.GT_Recipe_Map.sRockBreakerFakeRecipes; + } + + public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + return (super.allowPutStack(aBaseMetaTileEntity, aIndex, aSide, aStack)) && (getRecipeList().containsInput(aStack)); + } + + public int checkRecipe() { + IGregTechTileEntity aBaseMetaTileEntity = getBaseMetaTileEntity(); + if ((aBaseMetaTileEntity.getBlockOffset(0, 0, 1) == Blocks.water) || (aBaseMetaTileEntity.getBlockOffset(0, 0, -1) == Blocks.water) || (aBaseMetaTileEntity.getBlockOffset(-1, 0, 0) == Blocks.water) || (aBaseMetaTileEntity.getBlockOffset(1, 0, 0) == Blocks.water)) { + ItemStack tOutput = null; + if (aBaseMetaTileEntity.getBlockOffset(0, 1, 0) == Blocks.lava) { + tOutput = new ItemStack(Blocks.stone, 1); + } else if ((aBaseMetaTileEntity.getBlockOffset(0, 0, 1) == Blocks.lava) || (aBaseMetaTileEntity.getBlockOffset(0, 0, -1) == Blocks.lava) || (aBaseMetaTileEntity.getBlockOffset(-1, 0, 0) == Blocks.lava) || (aBaseMetaTileEntity.getBlockOffset(1, 0, 0) == Blocks.lava)) { + tOutput = new ItemStack(Blocks.cobblestone, 1); + } + if (tOutput != null) { + if (GT_Utility.areStacksEqual(getInputAt(0), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 1L))) { + tOutput = new ItemStack(Blocks.obsidian, 1); + if (canOutput(new ItemStack[]{tOutput})) { + getInputAt(0).stackSize -= 1; + calculateOverclockedNess(32,128); + //In case recipe is too OP for that machine + if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1) + return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS; + this.mOutputItems[0] = tOutput; + return 2; + } + } else if (canOutput(new ItemStack[]{tOutput})) { + calculateOverclockedNess(32,16); + //In case recipe is too OP for that machine + if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1) + return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS; + this.mOutputItems[0] = tOutput; + return 2; + } + } + } + return 0; + } +} diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Scanner.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Scanner.java index b7a63046dd..d25b566320 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Scanner.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Scanner.java @@ -11,11 +11,7 @@ import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine;
import gregtech.api.objects.GT_RenderedTexture;
import gregtech.api.objects.ItemData;
-import gregtech.api.util.GT_LanguageManager;
-import gregtech.api.util.GT_Log;
-import gregtech.api.util.GT_OreDictUnificator;
-import gregtech.api.util.GT_Recipe;
-import gregtech.api.util.GT_Utility;
+import gregtech.api.util.*;
import gregtech.common.items.behaviors.Behaviour_DataOrb;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
@@ -54,8 +50,10 @@ public class GT_MetaTileEntity_Scanner NBTTagCompound tNBT = new NBTTagCompound();
((IIndividual) tIndividual).writeToNBT(tNBT);
this.mOutputItems[0].setTagCompound(tNBT);
- this.mMaxProgresstime = (500 / (1 << this.mTier - 1));
- this.mEUt = (2 * (1 << this.mTier - 1) * (1 << this.mTier - 1));
+ calculateOverclockedNess(2,500);
+ //In case recipe is too OP for that machine
+ if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1)
+ return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS;
return 2;
}
this.mOutputItems[0] = GT_Utility.copy(new Object[]{aStack});
@@ -77,8 +75,10 @@ public class GT_MetaTileEntity_Scanner }
if (tNBT.getByte("scan") < 4) {
tNBT.setByte("scan", (byte) 4);
- this.mMaxProgresstime = (160 / (1 << this.mTier - 1));
- this.mEUt = (8 * (1 << this.mTier - 1) * (1 << this.mTier - 1));
+ calculateOverclockedNess(8,160);
+ //In case recipe is too OP for that machine
+ if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1)
+ return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS;
} else {
this.mMaxProgresstime = 1;
this.mEUt = 1;
@@ -92,8 +92,10 @@ public class GT_MetaTileEntity_Scanner if (ItemList.Tool_DataOrb.isStackEqual(aStack, false, true)) {
aStack.stackSize -= 1;
this.mOutputItems[0] = GT_Utility.copyAmount(1L, new Object[]{getSpecialSlot()});
- this.mMaxProgresstime = (512 / (1 << this.mTier - 1));
- this.mEUt = (32 * (1 << this.mTier - 1) * (1 << this.mTier - 1));
+ calculateOverclockedNess(32,512);
+ //In case recipe is too OP for that machine
+ if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1)
+ return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS;
return 2;
}
ItemData tData = GT_OreDictUnificator.getAssociation(aStack);
@@ -104,8 +106,10 @@ public class GT_MetaTileEntity_Scanner this.mOutputItems[0] = ItemList.Tool_DataOrb.get(1L, new Object[0]);
Behaviour_DataOrb.setDataTitle(this.mOutputItems[0], "Elemental-Scan");
Behaviour_DataOrb.setDataName(this.mOutputItems[0], tData.mMaterial.mMaterial.mElement.name());
- this.mMaxProgresstime = ((int) (tData.mMaterial.mMaterial.getMass() * 8192L / (1 << this.mTier - 1)));
- this.mEUt = (32 * (1 << this.mTier - 1) * (1 << this.mTier - 1));
+ calculateOverclockedNess(32,GT_Utility.safeInt(tData.mMaterial.mMaterial.getMass() * 8192L));
+ //In case recipe is too OP for that machine
+ if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1)
+ return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS;
return 2;
}
}
@@ -113,8 +117,10 @@ public class GT_MetaTileEntity_Scanner if (ItemList.Tool_DataStick.isStackEqual(aStack, false, true)) {
aStack.stackSize -= 1;
this.mOutputItems[0] = GT_Utility.copyAmount(1L, new Object[]{getSpecialSlot()});
- this.mMaxProgresstime = (128 / (1 << this.mTier - 1));
- this.mEUt = (32 * (1 << this.mTier - 1) * (1 << this.mTier - 1));
+ calculateOverclockedNess(32,128);
+ //In case recipe is too OP for that machine
+ if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1)
+ return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS;
return 2;
}
if (aStack.getItem() == Items.written_book) {
@@ -123,8 +129,10 @@ public class GT_MetaTileEntity_Scanner this.mOutputItems[0] = GT_Utility.copyAmount(1L, new Object[]{getSpecialSlot()});
this.mOutputItems[0].setTagCompound(aStack.getTagCompound());
- this.mMaxProgresstime = (128 / (1 << this.mTier - 1));
- this.mEUt = (32 * (1 << this.mTier - 1) * (1 << this.mTier - 1));
+ calculateOverclockedNess(32,128);
+ //In case recipe is too OP for that machine
+ if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1)
+ return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS;
return 2;
}
if (aStack.getItem() == Items.filled_map) {
@@ -133,8 +141,10 @@ public class GT_MetaTileEntity_Scanner this.mOutputItems[0] = GT_Utility.copyAmount(1L, new Object[]{getSpecialSlot()});
this.mOutputItems[0].setTagCompound(GT_Utility.getNBTContainingShort(new NBTTagCompound(), "map_id", (short) aStack.getItemDamage()));
- this.mMaxProgresstime = (128 / (1 << this.mTier - 1));
- this.mEUt = (32 * (1 << this.mTier - 1) * (1 << this.mTier - 1));
+ calculateOverclockedNess(32,128);
+ //In case recipe is too OP for that machine
+ if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1)
+ return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS;
return 2;
}
}
@@ -145,8 +155,10 @@ public class GT_MetaTileEntity_Scanner aStack.stackSize -= 1;
this.mOutputItems[0] = GT_Utility.copyAmount(1L, new Object[]{aStack});
- this.mMaxProgresstime = (1000 / (1 << this.mTier - 1));
- this.mEUt = (32 * (1 << this.mTier - 1) * (1 << this.mTier - 1));
+ calculateOverclockedNess(32,1000);
+ //In case recipe is too OP for that machine
+ if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1)
+ return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS;
return 2;
}
@@ -154,12 +166,14 @@ public class GT_MetaTileEntity_Scanner if(ItemList.Tool_DataStick.isStackEqual(getSpecialSlot(), false, true)&& aStack !=null){
for(GT_Recipe.GT_Recipe_AssemblyLine tRecipe:GT_Recipe.GT_Recipe_AssemblyLine.sAssemblylineRecipes){
if(GT_Utility.areStacksEqual(tRecipe.mResearchItem, aStack, true)){
+
this.mOutputItems[0] = GT_Utility.copyAmount(1L, new Object[]{getSpecialSlot()});
GT_Utility.ItemNBT.setBookTitle(this.mOutputItems[0], GT_LanguageManager.getTranslation(tRecipe.mOutput.getDisplayName())+" Construction Data");
+
NBTTagCompound tNBT = this.mOutputItems[0].getTagCompound();
if (tNBT == null) {
tNBT = new NBTTagCompound();
- }
+ }
tNBT.setTag("output", tRecipe.mOutput.writeToNBT(new NBTTagCompound()));
tNBT.setInteger("time", tRecipe.mDuration);
tNBT.setInteger("eu", tRecipe.mEUt);
@@ -171,9 +185,9 @@ public class GT_MetaTileEntity_Scanner tNBT.setTag("f"+i, tRecipe.mFluidInputs[i].writeToNBT(new NBTTagCompound()));
}
- tNBT.setString("author", "Assembly Line Recipe Generator");
+ tNBT.setString("author", "Assembling Line Recipe Generator");
NBTTagList tNBTList = new NBTTagList();
- tNBTList.appendTag(new NBTTagString("Constructionplan for "+tRecipe.mOutput.stackSize+" "+GT_LanguageManager.getTranslation(tRecipe.mOutput.getDisplayName())+". Needed EU/t: "+tRecipe.mEUt+" Productiontime: "+(tRecipe.mDuration/20)));
+ tNBTList.appendTag(new NBTTagString("Construction plan for "+tRecipe.mOutput.stackSize+" "+GT_LanguageManager.getTranslation(tRecipe.mOutput.getDisplayName())+". Needed EU/t: "+tRecipe.mEUt+" Production time: "+(tRecipe.mDuration/20)));
for(int i=0;i<tRecipe.mInputs.length;i++){
if(tRecipe.mInputs[i]!=null){
tNBTList.appendTag(new NBTTagString("Input Bus "+(i+1)+": "+tRecipe.mInputs[i].stackSize+" "+GT_LanguageManager.getTranslation(tRecipe.mInputs[i].getDisplayName())));
@@ -187,9 +201,12 @@ public class GT_MetaTileEntity_Scanner tNBT.setTag("pages", tNBTList);
this.mOutputItems[0].setTagCompound(tNBT);
+
aStack.stackSize -= 1;
- this.mMaxProgresstime = (tRecipe.mResearchTime / (1 << this.mTier - 1));
- this.mEUt = (30 * (1 << this.mTier - 1) * (1 << this.mTier - 1));
+ calculateOverclockedNess(30,tRecipe.mResearchTime);
+ //In case recipe is too OP for that machine
+ if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1)
+ return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS;
getSpecialSlot().stackSize -= 1;
return 2;
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_SeismicProspector.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_SeismicProspector.java index 09a644a055..cfef1ba345 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_SeismicProspector.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_SeismicProspector.java @@ -31,7 +31,7 @@ public class GT_MetaTileEntity_SeismicProspector extends GT_MetaTileEntity_Basic boolean ready = false; public GT_MetaTileEntity_SeismicProspector(int aID, String aName, String aNameRegional, int aTier) { - super(aID, aName, aNameRegional, aTier, 1, "Place, activate with explosives(8 Dynamite, 1 Glyceryl, 4 TNT or 2 ITNT), use Data Stick", 1, 1, "Default.png", "", new ITexture[]{new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_ROCK_BREAKER_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_ROCK_BREAKER), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_ROCK_BREAKER_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_ROCK_BREAKER), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_ROCK_BREAKER_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_ROCK_BREAKER), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_ROCK_BREAKER_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_ROCK_BREAKER)}); + super(aID, aName, aNameRegional, aTier, 1, "Place, activate with explosives(8 Dynamite, 1 Glyceryl, 4 TNT or 2 ITNT), use Data Stick then Print.", 1, 1, "Default.png", "", new ITexture[]{new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_ROCK_BREAKER_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_ROCK_BREAKER), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_ROCK_BREAKER_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_ROCK_BREAKER), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_ROCK_BREAKER_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_ROCK_BREAKER), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_ROCK_BREAKER_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_ROCK_BREAKER)}); } public GT_MetaTileEntity_SeismicProspector(String aName, int aTier, String aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) { @@ -98,7 +98,7 @@ public class GT_MetaTileEntity_SeismicProspector extends GT_MetaTileEntity_Basic } } if(tStringList.size()<1){tStringList.add("No Ores found.");} - FluidStack tFluid = GT_Utility.getUndergroundOil(getBaseMetaTileEntity().getWorld(), getBaseMetaTileEntity().getXCoord(), getBaseMetaTileEntity().getZCoord()); + FluidStack tFluid = GT_Utility.undergroundOil(getBaseMetaTileEntity().getWorld(), getBaseMetaTileEntity().getXCoord()>>4, getBaseMetaTileEntity().getZCoord()>>4,false,0); String[] tStringArray = new String[tStringList.size()]; { for (int i = 0; i < tStringArray.length; i++) { diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Teleporter.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Teleporter.java index 2ca0350988..744e7229c8 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Teleporter.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Teleporter.java @@ -33,6 +33,7 @@ import net.minecraft.inventory.IInventory; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.EnumChatFormatting; import net.minecraft.world.World; import net.minecraftforge.common.DimensionManager; import net.minecraftforge.fluids.FluidStack; @@ -47,9 +48,8 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank { public int mTargetX = 0; public int mTargetY = 0; public int mTargetZ = 0; - public int mTargetD = 0; + public int mTargetD = Integer.MIN_VALUE; public boolean mDebug = false; - public boolean hasEgg = false; public GT_MetaTileEntity_Teleporter(int aID, String aName, String aNameRegional, int aTier) { super(aID, aName, aNameRegional, aTier, 3, "Teleport long distances with this little device."); @@ -141,7 +141,6 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank { @Override public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) { if (aBaseMetaTileEntity.isClientSide()) return true; - this.hasEgg = checkForEgg(); aBaseMetaTileEntity.openGUI(aPlayer); return true; } @@ -168,12 +167,20 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank { public String[] getInfoData() { - return new String[]{"Coordinates:", "X: " + this.mTargetX, "Y: " + this.mTargetY, "Z: " + this.mTargetZ, "Dimension: " + this.mTargetD}; + return new String[]{ + "Coordinates:", + "X: "+ EnumChatFormatting.GREEN+ this.mTargetX+EnumChatFormatting.RESET, + "Y: "+EnumChatFormatting.GREEN+ this.mTargetY+EnumChatFormatting.RESET, + "Z: "+EnumChatFormatting.GREEN+ this.mTargetZ+EnumChatFormatting.RESET, + "Dimension: " + EnumChatFormatting.GREEN+this.mTargetD+EnumChatFormatting.RESET, + "Dimension Valid: " + (GT_Utility.isRealDimension(this.mTargetD) ? EnumChatFormatting.GREEN+"Yes"+EnumChatFormatting.RESET : EnumChatFormatting.RED+"No"+EnumChatFormatting.RESET), + "Dimension Registered: " + (DimensionManager.isDimensionRegistered(this.mTargetD) ? EnumChatFormatting.GREEN+"Yes"+EnumChatFormatting.RESET : EnumChatFormatting.RED+"No"+EnumChatFormatting.RESET) + }; } @Override public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColorIndex + 1], (aSide != this.getBaseMetaTileEntity().getFrontFacing()) ? null : aActive ? new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TELEPORTER_ACTIVE) : new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TELEPORTER)}; + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColorIndex + 1], (aSide != this.getBaseMetaTileEntity().getFrontFacing()) ? new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TELEPORTER_SIDES) : aActive ? new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TELEPORTER_ACTIVE) : new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TELEPORTER)}; } public void saveNBTData(NBTTagCompound aNBT) { @@ -201,57 +208,29 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank { sFPowerMultiplyer = sPowerMultiplyer / 100.0; } - public void onFirstTick() { - if (getBaseMetaTileEntity().isServerSide()) { - if ((this.mTargetX == 0) && (this.mTargetY == 0) && (this.mTargetZ == 0) && (this.mTargetD == 0)) { - this.mTargetX = getBaseMetaTileEntity().getXCoord(); - this.mTargetY = getBaseMetaTileEntity().getYCoord(); - this.mTargetZ = getBaseMetaTileEntity().getZCoord(); - this.mTargetD = getBaseMetaTileEntity().getWorld().provider.dimensionId; - } - this.hasEgg = checkForEgg(); - } - } - - public boolean checkForEgg() { - for (byte i = -5; i <= 5; i = (byte) (i + 1)) { - for (byte j = -5; j <= 5; j = (byte) (j + 1)) { - for (byte k = -5; k <= 5; k = (byte) (k + 1)) { - if (getBaseMetaTileEntity().getBlockOffset(i, j, k) == Blocks.dragon_egg) { - return true; - } - } - } + @Override + public void onFirstTick(IGregTechTileEntity aBaseMetaTileEntity) { + if (aBaseMetaTileEntity.isServerSide() && (this.mTargetX == 0) && (this.mTargetY == 0) && (this.mTargetZ == 0) && (this.mTargetD == Integer.MIN_VALUE)) { + this.mTargetX = aBaseMetaTileEntity.getXCoord(); + this.mTargetY = aBaseMetaTileEntity.getYCoord(); + this.mTargetZ = aBaseMetaTileEntity.getZCoord(); + this.mTargetD = aBaseMetaTileEntity.getWorld().provider.dimensionId; } - return false; - } - - public boolean hasDimensionalTeleportCapability() { - return (this.mDebug) || (this.hasEgg) || (mFluid.isFluidEqual(Materials.Nitrogen.getPlasma(1)) && mFluid.amount >= 10); } + + public boolean hasDimensionalTeleportCapability() {return true;} public boolean isDimensionalTeleportAvailable() { - return (this.mDebug) || ((hasDimensionalTeleportCapability()) && (GT_Utility.isRealDimension(this.mTargetD)) && (GT_Utility.isRealDimension(getBaseMetaTileEntity().getWorld().provider.dimensionId))); + return (this.mDebug) || ((GT_Utility.isRealDimension(this.mTargetD)) && (GT_Utility.isRealDimension(getBaseMetaTileEntity().getWorld().provider.dimensionId))); } @Override public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { - if (mFluid == null) { - mFluid = Materials.Nitrogen.getPlasma(0); - } + if (mFluid != null) mFluid=null; super.onPostTick(aBaseMetaTileEntity, aTick); if (getBaseMetaTileEntity().isServerSide()) { - if (getBaseMetaTileEntity().getTimer() % 100L == 50L) { - this.hasEgg = checkForEgg(); - } if ((getBaseMetaTileEntity().isAllowedToWork()) && (getBaseMetaTileEntity().getRedstone())) { if (getBaseMetaTileEntity().decreaseStoredEnergyUnits(sPassiveEnergyDrain, false)) { - if (hasDimensionalTeleportCapability() && this.mTargetD != getBaseMetaTileEntity().getWorld().provider.dimensionId && (hasEgg || mFluid.isFluidEqual(Materials.Nitrogen.getPlasma(1)))&& new XSTR().nextInt(10)==0) { - mFluid.amount--; - if (mFluid.amount < 1) { - mFluid = null; - } - } int tDistance = distanceCalculation(); if (mInventory[0] != null) { TileEntity tTile = null; @@ -267,7 +246,7 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank { int tStacksize = mInventory[0].stackSize; GT_Utility.moveOneItemStack(this, tTile, (byte) 0, (byte) 0, null, false, (byte) 64, (byte) 1, (byte) 64, (byte) 1); if (mInventory[0] == null || mInventory[0].stackSize < tStacksize) { - getBaseMetaTileEntity().decreaseStoredEnergyUnits((int) (Math.pow(tDistance, 1.5) * tDistance * (tStacksize - (mInventory[0] == null ? 0 : mInventory[0].stackSize)) * sFPowerMultiplyer), false); + getBaseMetaTileEntity().decreaseStoredEnergyUnits((long) (Math.pow(tDistance, 1.5) * (tStacksize - (mInventory[0] == null ? 0 : mInventory[0].stackSize)) * sFPowerMultiplyer), false); } } @@ -275,14 +254,8 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank { for (Object tObject : getBaseMetaTileEntity().getWorld().getEntitiesWithinAABB(Entity.class, AxisAlignedBB.getBoundingBox(getBaseMetaTileEntity().getOffsetX(getBaseMetaTileEntity().getFrontFacing(), 2) - 1, getBaseMetaTileEntity().getOffsetY(getBaseMetaTileEntity().getFrontFacing(), 2) - 1, getBaseMetaTileEntity().getOffsetZ(getBaseMetaTileEntity().getFrontFacing(), 2) - 1, getBaseMetaTileEntity().getOffsetX(getBaseMetaTileEntity().getFrontFacing(), 2) + 2, getBaseMetaTileEntity().getOffsetY(getBaseMetaTileEntity().getFrontFacing(), 2) + 2, getBaseMetaTileEntity().getOffsetZ(getBaseMetaTileEntity().getFrontFacing(), 2) + 2))) { if (((tObject instanceof Entity)) && (!((Entity) tObject).isDead)) { Entity tEntity = (Entity) tObject; -// System.out.println("teleport"+(Math.pow(tDistance, 1.5))); - if (getBaseMetaTileEntity().decreaseStoredEnergyUnits((int) (Math.pow(tDistance, 1.5) * weightCalculation(tEntity) * sFPowerMultiplyer), false)) { - if (hasDimensionalTeleportCapability() && this.mTargetD != getBaseMetaTileEntity().getWorld().provider.dimensionId && (hasEgg || mFluid.isFluidEqual(Materials.Nitrogen.getPlasma(1)))) { - mFluid.amount = mFluid.amount - ((int) Math.min(10, (Math.pow(tDistance, 1.5) * weightCalculation(tEntity) / 8192))); - if (mFluid.amount < 1) { - mFluid = null; - } - } + //System.out.println("teleport"+(Math.pow(tDistance, 1.5))); + if (getBaseMetaTileEntity().decreaseStoredEnergyUnits((long) ((long)Math.pow(tDistance, 1.5) * weightCalculation(tEntity) * sFPowerMultiplyer), false)) { if (tEntity.ridingEntity != null) { tEntity.mountEntity(null); } diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AdvMiner2.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AdvMiner2.java index 08d889b7e4..7557e9af8c 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AdvMiner2.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AdvMiner2.java @@ -106,7 +106,7 @@ public class GT_MetaTileEntity_AdvMiner2 extends GT_MetaTileEntity_MultiBlockBas int tMetaID = getBaseMetaTileEntity().getMetaIDOffset(i, yLevel - getBaseMetaTileEntity().getYCoord(), f); if (tBlock instanceof GT_Block_Ores_Abstract) { TileEntity tTileEntity = getBaseMetaTileEntity().getTileEntityOffset(i, yLevel - getBaseMetaTileEntity().getYCoord(), f); - if ((tTileEntity!=null) && (tTileEntity instanceof GT_TileEntity_Ores) && ((GT_TileEntity_Ores) tTileEntity).mNatural == true && !mMineList.contains(new ChunkPosition(i, yLevel - getBaseMetaTileEntity().getYCoord(), f))) { + if ((tTileEntity!=null) && (tTileEntity instanceof GT_TileEntity_Ores) && ((GT_TileEntity_Ores) tTileEntity).mNatural && !mMineList.contains(new ChunkPosition(i, yLevel - getBaseMetaTileEntity().getYCoord(), f))) { mMineList.add(new ChunkPosition(i, yLevel - getBaseMetaTileEntity().getYCoord(), f)); } } @@ -196,27 +196,15 @@ public class GT_MetaTileEntity_AdvMiner2 extends GT_MetaTileEntity_MultiBlockBas } } - - byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage)); + calculateOverclockedNessMulti(48, 24, 1, tVoltage); + //In case recipe is too OP for that machine + if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1) + return false; this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); this.mEfficiencyIncrease = 10000; - int tEU = 48; - int tDuration = 24; - if (tEU <= 16) { - this.mEUt = (tEU * (1 << tTier - 1) * (1 << tTier - 1)); - this.mMaxProgresstime = (tDuration / (1 << tTier - 1)); - } else { - this.mEUt = tEU; - this.mMaxProgresstime = tDuration; - while (this.mEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) { - this.mEUt *= 4; - this.mMaxProgresstime /= 2; - } - } if (this.mEUt > 0) { this.mEUt = (-this.mEUt); } - this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime); return true; } diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AssemblyLine.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AssemblyLine.java index 88558b53cc..2e6a0ddad5 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AssemblyLine.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AssemblyLine.java @@ -32,14 +32,14 @@ public class GT_MetaTileEntity_AssemblyLine } public String[] getDescription() { - return new String[]{"Assembly Line", + return new String[]{"Assembling Line", "Size: 3x(5-16)x4, variable length", - "Bottom: Steel Casing(or Maintenance or Input Hatch),", + "Bottom: Solid Steel Casing(or Maintenance or Input Hatch),", "Input Bus(Last Output Bus), Steel Casing", - "Middle: Reinforced Glass, Assembly Line, Reinforced Glass", - "UpMiddle: Grate Casing, Assembling Casing,", + "Middle: Reinforced Glass, Assembling Line Casing, Reinforced Glass", + "UpMiddle: Grate Casing, Assembler Machine Casing ,", "Grate Casing(or Controller)", - "Top: Steel Casing(or Energy Hatch)", + "Top: Solid Steel Casing(or Energy Hatch)", "Up to 16 repeating slices, last is Output Bus"}; } @@ -118,19 +118,13 @@ public class GT_MetaTileEntity_AssemblyLine } } } - byte tTier = (byte) Math.max(1, GT_Utility.getTier(getMaxInputVoltage())); - this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); + this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); this.mEfficiencyIncrease = 10000; - if (mEUt <= 16) { - this.mEUt = (mEUt * (1 << tTier - 1) * (1 << tTier - 1)); - this.mMaxProgresstime = (mMaxProgresstime / (1 << tTier - 1)); - } else { - while (this.mEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) { - this.mEUt *= 4; - this.mMaxProgresstime /= 2; - } - } - this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime); + calculateOverclockedNessMulti(mEUt, mMaxProgresstime, 1, getMaxInputVoltage()); + //In case recipe is too OP for that machine + if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1) + return false; + this.mEUt = this.mEUt > 0 ? -this.mEUt : this.mEUt;//makes it use power... updateSlots(); return true; } @@ -231,4 +225,4 @@ public class GT_MetaTileEntity_AssemblyLine public boolean explodesOnComponentBreak(ItemStack aStack) { return false; } -}
\ No newline at end of file +} diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BronzeBlastFurnace.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BronzeBlastFurnace.java index 7efc667ade..cd769e31ec 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BronzeBlastFurnace.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BronzeBlastFurnace.java @@ -23,6 +23,7 @@ import net.minecraft.init.Items; import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.ChunkPosition;
+import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
public class GT_MetaTileEntity_BronzeBlastFurnace
@@ -186,10 +187,6 @@ public class GT_MetaTileEntity_BronzeBlastFurnace }
public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTimer) {
- if ((aBaseMetaTileEntity.isClientSide()) &&
- (aBaseMetaTileEntity.isActive())) {
- aBaseMetaTileEntity.getWorld().spawnParticle("largesmoke", aBaseMetaTileEntity.getOffsetX(aBaseMetaTileEntity.getBackFacing(), 1) + (new XSTR()).nextFloat(), aBaseMetaTileEntity.getOffsetY(aBaseMetaTileEntity.getBackFacing(), 1), aBaseMetaTileEntity.getOffsetZ(aBaseMetaTileEntity.getBackFacing(), 1) + (new XSTR()).nextFloat(), 0.0D, 0.3D, 0.0D);
- }
if (aBaseMetaTileEntity.isServerSide()) {
if (this.mUpdate-- == 0) {
this.mMachine = checkMachine();
@@ -209,7 +206,7 @@ public class GT_MetaTileEntity_BronzeBlastFurnace }
}
if(this.mMaxProgresstime>0 && (aTimer % 20L == 0L)){
- GT_Pollution.addPollution(this.getBaseMetaTileEntity().getWorld(), new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()), 50);
+ GT_Pollution.addPollution(this.getBaseMetaTileEntity().getWorld(), new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()), 200);
}
aBaseMetaTileEntity.setActive((this.mMaxProgresstime > 0) && (this.mMachine));
@@ -232,6 +229,18 @@ public class GT_MetaTileEntity_BronzeBlastFurnace this.mUpdate = 1;
}
}
+ }else if(aBaseMetaTileEntity.isActive()){
+ World aWorld=aBaseMetaTileEntity.getWorld();
+ double xPos=aBaseMetaTileEntity.getOffsetX(aBaseMetaTileEntity.getBackFacing(), 1);
+ double yPos=aBaseMetaTileEntity.getOffsetY(aBaseMetaTileEntity.getBackFacing(), 1)+0.05F;
+ double zPos=aBaseMetaTileEntity.getOffsetZ(aBaseMetaTileEntity.getBackFacing(), 1);
+ XSTR floatGen=new XSTR();
+ aWorld.spawnParticle("largesmoke", xPos + floatGen.nextFloat(), yPos, zPos + floatGen.nextFloat(), 0.0D, 0.3D, 0.0D);
+ //Pollution particles intensify
+ if(GT_Pollution.getPollutionAtCoords(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getZCoord())>GT_Mod.gregtechproxy.mPollutionSmogLimit){
+ aWorld.spawnParticle("largesmoke", xPos + floatGen.nextFloat(), yPos, zPos + floatGen.nextFloat(), 0.0D, 0.45D, 0.0D);
+ aWorld.spawnParticle("largesmoke", xPos + floatGen.nextFloat(), yPos, zPos + floatGen.nextFloat(), 0.0D, 0.6D, 0.0D);
+ }
}
}
@@ -344,4 +353,4 @@ public class GT_MetaTileEntity_BronzeBlastFurnace public byte getTileEntityBaseType() {
return 0;
}
-}
\ No newline at end of file +}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Charcoal_Pit.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Charcoal_Pit.java index 9c4881d18c..efffdf4528 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Charcoal_Pit.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Charcoal_Pit.java @@ -86,7 +86,7 @@ public class GT_MetaTileEntity_Charcoal_Pit extends GT_MetaTileEntity_MultiBlock this.mEfficiency = 10000; this.mEfficiencyIncrease = 10000; this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime); - GT_Pollution.addPollution(this.getBaseMetaTileEntity().getWorld(), new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()), mMaxProgresstime*5); + GT_Pollution.addPollution(this.getBaseMetaTileEntity().getWorld(), new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()), mMaxProgresstime*10); return true; } else { this.mEfficiency = 0; @@ -221,4 +221,4 @@ public class GT_MetaTileEntity_Charcoal_Pit extends GT_MetaTileEntity_MultiBlock public boolean explodesOnComponentBreak(ItemStack aStack) { return false; } -}
\ No newline at end of file +} diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DieselEngine.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DieselEngine.java index adcede79ba..f2902f3631 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DieselEngine.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DieselEngine.java @@ -9,6 +9,7 @@ import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Dynamo; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Muffler; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; import gregtech.api.objects.GT_RenderedTexture; import gregtech.api.util.GT_Recipe; @@ -17,6 +18,7 @@ import net.minecraft.block.Block; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.EnumChatFormatting; import net.minecraftforge.fluids.FluidStack; import java.util.ArrayList; @@ -89,7 +91,7 @@ public class GT_MetaTileEntity_DieselEngine extends GT_MetaTileEntity_MultiBlock fuelValue = aFuel.mSpecialValue; fuelRemaining = hatchFluid1.amount; //Record available fuel - this.mEUt = mEfficiency < 2000 ? 0 : 2048; //Output 0 if startup is less than 20% + this.mEUt = mEfficiency < 2000 ? 0 : (int) ((boostEu?6144:2048) * (((float) Math.min(mEfficiency,10000)) / 10000)); //Output 0 if startup is less than 20% this.mProgresstime = 1; this.mMaxProgresstime = 1; this.mEfficiencyIncrease = 15; @@ -225,13 +227,34 @@ public class GT_MetaTileEntity_DieselEngine extends GT_MetaTileEntity_MultiBlock @Override public String[] getInfoData() { + int mPollutionReduction=0; + for (GT_MetaTileEntity_Hatch_Muffler tHatch : mMufflerHatches) { + if (isValidMetaTileEntity(tHatch)) { + mPollutionReduction=Math.max(tHatch.calculatePollutionReduction(100),mPollutionReduction); + } + } + + long storedEnergy=0; + long maxEnergy=0; + for(GT_MetaTileEntity_Hatch_Dynamo tHatch : mDynamoHatches) { + if (isValidMetaTileEntity(tHatch)) { + storedEnergy+=tHatch.getBaseMetaTileEntity().getStoredEU(); + maxEnergy+=tHatch.getBaseMetaTileEntity().getEUCapacity(); + } + } + return new String[]{ - "Diesel Engine", - "Current Output: "+mEUt*mEfficiency/10000 +" EU/t", - "Fuel Consumption: "+fuelConsumption+"L/t", - "Fuel Value: "+fuelValue+" EU/L", - "Fuel Remaining: "+fuelRemaining+" Litres", - "Current Efficiency: "+(mEfficiency/100)+"%"}; + EnumChatFormatting.BLUE+"Diesel Engine"+EnumChatFormatting.RESET, + "Stored Energy:", + EnumChatFormatting.GREEN + Long.toString(storedEnergy) + EnumChatFormatting.RESET +" EU / "+ + EnumChatFormatting.YELLOW + Long.toString(maxEnergy) + EnumChatFormatting.RESET +" EU", + "Current Output: "+EnumChatFormatting.RED+(-mEUt)+EnumChatFormatting.RESET+" EU/t", + "Fuel Consumption: "+EnumChatFormatting.YELLOW+fuelConsumption+EnumChatFormatting.RESET+" L/t", + "Fuel Value: "+EnumChatFormatting.YELLOW+fuelValue+EnumChatFormatting.RESET+" EU/L", + "Fuel Remaining: "+EnumChatFormatting.GOLD+fuelRemaining+EnumChatFormatting.RESET+" L", + "Current Efficiency: "+EnumChatFormatting.YELLOW+(mEfficiency/100F)+EnumChatFormatting.YELLOW+" %", + "Pollution reduced to: "+ EnumChatFormatting.GREEN + mPollutionReduction+ EnumChatFormatting.RESET+" %" + }; } @Override diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DistillationTower.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DistillationTower.java index 22dd01c755..3a421b66d5 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DistillationTower.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DistillationTower.java @@ -89,7 +89,7 @@ public class GT_MetaTileEntity_DistillationTower } long tVoltage = getMaxInputVoltage(); - byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage)); + byte tTier = (byte) Math.max(0, GT_Utility.getTier(tVoltage)); FluidStack[] tFluids = (FluidStack[]) Arrays.copyOfRange(tFluidList.toArray(new FluidStack[tFluidList.size()]), 0, tFluidList.size()); if (tFluids.length > 0) { for(int i = 0;i<tFluids.length;i++){ @@ -98,17 +98,10 @@ public class GT_MetaTileEntity_DistillationTower if (tRecipe.isRecipeInputEqual(true, tFluids, new ItemStack[]{})) { this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); this.mEfficiencyIncrease = 10000; - if (tRecipe.mEUt <= 16) { - this.mEUt = (tRecipe.mEUt * (1 << tTier - 1) * (1 << tTier - 1)); - this.mMaxProgresstime = (tRecipe.mDuration / (1 << tTier - 1)); - } else { - this.mEUt = tRecipe.mEUt; - this.mMaxProgresstime = tRecipe.mDuration; - while (this.mEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) { - this.mEUt *= 4; - this.mMaxProgresstime /= 2; - } - } + calculateOverclockedNessMulti(tRecipe.mEUt, tRecipe.mDuration, 1, tVoltage); + //In case recipe is too OP for that machine + if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1) + return false; if (this.mEUt > 0) { this.mEUt = (-this.mEUt); } diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ElectricBlastFurnace.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ElectricBlastFurnace.java index 48cafa9af4..ffdee14683 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ElectricBlastFurnace.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ElectricBlastFurnace.java @@ -6,12 +6,15 @@ import gregtech.api.gui.GT_GUIContainer_MultiMachine; import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Energy;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Muffler;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase;
import gregtech.api.objects.GT_RenderedTexture;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Utility;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.item.ItemStack;
+import net.minecraft.util.EnumChatFormatting;
import net.minecraftforge.common.util.ForgeDirection;
import net.minecraftforge.fluids.FluidStack;
@@ -113,24 +116,18 @@ public class GT_MetaTileEntity_ElectricBlastFurnace if ((tRecipe != null) && (this.mHeatingCapacity >= tRecipe.mSpecialValue) && (tRecipe.isRecipeInputEqual(true, tFluids, tInputs))) {
this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000);
this.mEfficiencyIncrease = 10000;
- int tHeatCapacityDivTiers = (mHeatingCapacity - tRecipe.mSpecialValue) / 900;
- if (tRecipe.mEUt <= 16) {
- this.mEUt = (tRecipe.mEUt * (1 << tTier - 1) * (1 << tTier - 1));
- this.mMaxProgresstime = (tRecipe.mDuration / (1 << tTier - 1));
- } else {
- this.mEUt = tRecipe.mEUt;
- this.mMaxProgresstime = tRecipe.mDuration;
- int i = 2;
- while (this.mEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) {
- this.mEUt *= 4;
- this.mMaxProgresstime /= (tHeatCapacityDivTiers >= i ? 4 : 2);
- i += 2;
- }
- }
- if (tHeatCapacityDivTiers > 0) this.mEUt = (int) (this.mEUt * (Math.pow(0.95, tHeatCapacityDivTiers)));
+ int tHeatCapacityDivTiers = (mHeatingCapacity - tRecipe.mSpecialValue)/900;
+ calculateOverclockedNessMulti(tRecipe.mEUt, tRecipe.mDuration, 1, tVoltage);
+ //In case recipe is too OP for that machine
+ if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1)
+ return false;
if (this.mEUt > 0) {
this.mEUt = (-this.mEUt);
}
+ if(tHeatCapacityDivTiers>0){
+ this.mEUt = (int) (this.mEUt * (Math.pow(0.95, tHeatCapacityDivTiers)));
+ this.mMaxProgresstime >>=tHeatCapacityDivTiers/2;
+ }
this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime);
this.mOutputItems = new ItemStack[]{tRecipe.getOutput(0), tRecipe.getOutput(1)};
updateSlots();
@@ -140,7 +137,7 @@ public class GT_MetaTileEntity_ElectricBlastFurnace return false;
}
- public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) {
+ private boolean checkMachineFunction(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) {
int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX;
int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ;
@@ -220,15 +217,22 @@ public class GT_MetaTileEntity_ElectricBlastFurnace }
}
}
+ this.mHeatingCapacity += 100 * (GT_Utility.getTier(getMaxInputVoltage()) - 2);
return true;
}
+ public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack){
+ boolean result= this.checkMachineFunction(aBaseMetaTileEntity,aStack);
+ if (!result) this.mHeatingCapacity=0;
+ return result;
+ }
+
public int getMaxEfficiency(ItemStack aStack) {
return 10000;
}
public int getPollutionPerTick(ItemStack aStack) {
- return 5;
+ return 20;
}
public int getDamageToComponent(ItemStack aStack) {
@@ -260,4 +264,44 @@ public class GT_MetaTileEntity_ElectricBlastFurnace }
}
}
+
+
+ @Override
+ public String[] getInfoData() {
+ int mPollutionReduction=0;
+ for (GT_MetaTileEntity_Hatch_Muffler tHatch : mMufflerHatches) {
+ if (isValidMetaTileEntity(tHatch)) {
+ mPollutionReduction=Math.max(tHatch.calculatePollutionReduction(100),mPollutionReduction);
+ }
+ }
+
+ long storedEnergy=0;
+ long maxEnergy=0;
+ for(GT_MetaTileEntity_Hatch_Energy tHatch : mEnergyHatches) {
+ if (isValidMetaTileEntity(tHatch)) {
+ storedEnergy+=tHatch.getBaseMetaTileEntity().getStoredEU();
+ maxEnergy+=tHatch.getBaseMetaTileEntity().getEUCapacity();
+ }
+ }
+
+ return new String[]{
+ "Progress:",
+ EnumChatFormatting.GREEN + Integer.toString(mProgresstime/20) + EnumChatFormatting.RESET +" s / "+
+ EnumChatFormatting.YELLOW + Integer.toString(mMaxProgresstime/20) + EnumChatFormatting.RESET +" s",
+ "Stored Energy:",
+ EnumChatFormatting.GREEN + Long.toString(storedEnergy) + EnumChatFormatting.RESET +" EU / "+
+ EnumChatFormatting.YELLOW + Long.toString(maxEnergy) + EnumChatFormatting.RESET +" EU",
+ "Probably uses: "+
+ EnumChatFormatting.RED + Integer.toString(-mEUt) + EnumChatFormatting.RESET + " EU/t",
+ "Maximum total power (to all Energy Hatches, not single ones): ",
+ EnumChatFormatting.YELLOW+Long.toString(getMaxInputVoltage())+EnumChatFormatting.RESET+ " EU/t * 2A",
+ "Problems: "+
+ EnumChatFormatting.RED+ (getIdealStatus() - getRepairStatus())+EnumChatFormatting.RESET+
+ " Efficiency: "+
+ EnumChatFormatting.YELLOW+Float.toString(mEfficiency / 100.0F)+EnumChatFormatting.RESET + " %",
+ "Heat capacity: "+
+ EnumChatFormatting.GREEN+mHeatingCapacity+EnumChatFormatting.RESET+" K",
+ "Pollution reduced to: "+ EnumChatFormatting.GREEN + mPollutionReduction+ EnumChatFormatting.RESET+" %"
+ };
+ }
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer.java index b34b2dc85b..e6abada66c 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer.java @@ -19,6 +19,7 @@ import net.minecraft.block.Block; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.EnumChatFormatting; import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.FluidStack; @@ -129,6 +130,18 @@ public abstract class GT_MetaTileEntity_FusionComputer extends GT_MetaTileEntity return false; } + private boolean checkTier(byte tier, ArrayList<GT_MetaTileEntity_Hatch> list) { + if (list != null) { + int list_sS=list.size(); + for (int i = 0; i < list_sS; i++) { + if (list.get(i).mTier < tier) { + return false; + } + } + } + return true; + } + private boolean checkCoils(int aX, int aY, int aZ) { return (isFusionCoil(aX + 6, aY, aZ - 1)) && (isFusionCoil(aX + 6, aY, aZ)) && (isFusionCoil(aX + 6, aY, aZ + 1)) && (isFusionCoil(aX + 5, aY, aZ - 3)) && (isFusionCoil(aX + 5, aY, aZ - 2)) && (isFusionCoil(aX + 5, aY, aZ + 2)) && (isFusionCoil(aX + 5, aY, aZ + 3)) && (isFusionCoil(aX + 4, aY, aZ - 4)) && (isFusionCoil(aX + 4, aY, aZ + 4)) @@ -258,14 +271,14 @@ public abstract class GT_MetaTileEntity_FusionComputer extends GT_MetaTileEntity return false; } if (mRunningOnLoad || tRecipe.isRecipeInputEqual(true, tFluids, new ItemStack[]{})) { - this.mLastRecipe = tRecipe; - this.mEUt = (this.mLastRecipe.mEUt * overclock(this.mLastRecipe.mSpecialValue)); - this.mMaxProgresstime = this.mLastRecipe.mDuration / overclock(this.mLastRecipe.mSpecialValue); - this.mEfficiencyIncrease = 10000; - this.mOutputFluids = this.mLastRecipe.mFluidOutputs; - turnCasingActive(true); - mRunningOnLoad = false; - return true; + this.mLastRecipe = tRecipe; + this.mEUt = (this.mLastRecipe.mEUt * overclock(this.mLastRecipe.mSpecialValue)); + this.mMaxProgresstime = this.mLastRecipe.mDuration / overclock(this.mLastRecipe.mSpecialValue); + this.mEfficiencyIncrease = 10000; + this.mOutputFluids = this.mLastRecipe.mFluidOutputs; + turnCasingActive(true); + mRunningOnLoad = false; + return true; } } return false; @@ -355,11 +368,11 @@ public abstract class GT_MetaTileEntity_FusionComputer extends GT_MetaTileEntity if (aBaseMetaTileEntity.isAllowedToWork()) { this.mEUStore = (int) aBaseMetaTileEntity.getStoredEU(); if (checkRecipe(mInventory[1])) { - if (this.mEUStore < this.mLastRecipe.mSpecialValue) { + if (this.mEUStore < this.mLastRecipe.mSpecialValue - this.mEUt) { mMaxProgresstime = 0; turnCasingActive(false); } - aBaseMetaTileEntity.decreaseStoredEnergyUnits(this.mLastRecipe.mSpecialValue, true); + aBaseMetaTileEntity.decreaseStoredEnergyUnits(this.mLastRecipe.mSpecialValue - this.mEUt, true); } } if (mMaxProgresstime <= 0) @@ -424,7 +437,7 @@ public abstract class GT_MetaTileEntity_FusionComputer extends GT_MetaTileEntity @Override public String[] getInfoData() { - String tier = tier() == 6 ? "I" : tier() == 7 ? "II" : "III"; + String tier = tier() == 6 ? EnumChatFormatting.RED+"I"+EnumChatFormatting.RESET : tier() == 7 ? EnumChatFormatting.YELLOW+"II"+EnumChatFormatting.RESET : EnumChatFormatting.GRAY+"III"+EnumChatFormatting.RESET; float plasmaOut = 0; int powerRequired = 0; if (this.mLastRecipe != null) { @@ -435,14 +448,14 @@ public abstract class GT_MetaTileEntity_FusionComputer extends GT_MetaTileEntity } return new String[]{ - "Fusion Reactor MK "+tier, - "EU Required: "+powerRequired+"EU/t", - "Stored EU: "+mEUStore+" / "+maxEUStore(), - "Plasma Output: "+plasmaOut+"L/t"}; + EnumChatFormatting.BLUE+"Fusion Reactor MK "+EnumChatFormatting.RESET+tier, + "EU Required: "+EnumChatFormatting.RED+powerRequired+EnumChatFormatting.RESET+"EU/t", + "Stored EU: "+EnumChatFormatting.GREEN+mEUStore+EnumChatFormatting.RESET+" EU / "+EnumChatFormatting.YELLOW+maxEUStore()+EnumChatFormatting.RESET+" EU", + "Plasma Output: "+EnumChatFormatting.YELLOW+plasmaOut+EnumChatFormatting.RESET+"L/t"}; } @Override public boolean isGivingInformation() { return true; } -}
\ No newline at end of file +} diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ImplosionCompressor.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ImplosionCompressor.java index 5c0a028e72..d2b9d09f1a 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ImplosionCompressor.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ImplosionCompressor.java @@ -88,9 +88,14 @@ public class GT_MetaTileEntity_ImplosionCompressor if ((tRecipe != null) && (tRecipe.isRecipeInputEqual(true, null, tInputs))) {
this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000);
this.mEfficiencyIncrease = 10000;
-
- this.mEUt = (-tRecipe.mEUt);
- this.mMaxProgresstime = Math.max(1, tRecipe.mDuration);
+ //OC THAT EXPLOSIVE SHIT!!!
+ calculateOverclockedNessMulti(tRecipe.mEUt, tRecipe.mDuration, 1, getMaxInputVoltage());
+ //In case recipe is too OP for that machine
+ if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1)
+ return false;
+ if (this.mEUt > 0) {
+ this.mEUt = (-this.mEUt);
+ }
this.mOutputItems = new ItemStack[]{tRecipe.getOutput(0), tRecipe.getOutput(1)};
sendLoopStart((byte) 20);
updateSlots();
@@ -139,7 +144,7 @@ public class GT_MetaTileEntity_ImplosionCompressor }
public int getPollutionPerTick(ItemStack aStack) {
- return 100;
+ return 500;
}
public int getDamageToComponent(ItemStack aStack) {
@@ -149,4 +154,4 @@ public class GT_MetaTileEntity_ImplosionCompressor public boolean explodesOnComponentBreak(ItemStack aStack) {
return false;
}
-}
\ No newline at end of file +}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler.java index 8573de7c73..1f6514a54b 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler.java @@ -226,7 +226,7 @@ public abstract class GT_MetaTileEntity_LargeBoiler }
public int getPollutionPerTick(ItemStack aStack) {
- return 12;
+ return 20;
}
public int getDamageToComponent(ItemStack aStack) {
@@ -236,4 +236,4 @@ public abstract class GT_MetaTileEntity_LargeBoiler public boolean explodesOnComponentBreak(ItemStack aStack) {
return false;
}
-}
\ No newline at end of file +}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_Bronze.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_Bronze.java index 7c5dad3c96..5c949b6108 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_Bronze.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_Bronze.java @@ -1,66 +1,66 @@ -package gregtech.common.tileentities.machines.multi;
-
-import gregtech.api.GregTech_API;
-import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import net.minecraft.block.Block;
-
-public class GT_MetaTileEntity_LargeBoiler_Bronze
- extends GT_MetaTileEntity_LargeBoiler {
- public GT_MetaTileEntity_LargeBoiler_Bronze(int aID, String aName, String aNameRegional) {
- super(aID, aName, aNameRegional);
- }
-
- public GT_MetaTileEntity_LargeBoiler_Bronze(String aName) {
- super(aName);
- }
-
- public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
- return new GT_MetaTileEntity_LargeBoiler_Bronze(this.mName);
- }
-
- public Block getCasingBlock() {
- return GregTech_API.sBlockCasings1;
- }
-
- public byte getCasingMeta() {
- return 10;
- }
-
- public byte getCasingTextureIndex() {
- return 10;
- }
-
- public Block getPipeBlock() {
- return GregTech_API.sBlockCasings2;
- }
-
- public byte getPipeMeta() {
- return 12;
- }
-
- public Block getFireboxBlock() {
- return GregTech_API.sBlockCasings3;
- }
-
- public byte getFireboxMeta() {
- return 13;
- }
-
- public byte getFireboxTextureIndex() {
- return 45;
- }
-
- public int getEUt() {
- return 400;
- }
-
- public int getEfficiencyIncrease() {
- return 16;
- }
-
- @Override
- int runtimeBoost(int mTime) {
- return mTime * 2;
- }
-}
+package gregtech.common.tileentities.machines.multi; + +import gregtech.api.GregTech_API; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import net.minecraft.block.Block; + +public class GT_MetaTileEntity_LargeBoiler_Bronze + extends GT_MetaTileEntity_LargeBoiler { + public GT_MetaTileEntity_LargeBoiler_Bronze(int aID, String aName, String aNameRegional) { + super(aID, aName, aNameRegional); + } + + public GT_MetaTileEntity_LargeBoiler_Bronze(String aName) { + super(aName); + } + + public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_LargeBoiler_Bronze(this.mName); + } + + public Block getCasingBlock() { + return GregTech_API.sBlockCasings1; + } + + public byte getCasingMeta() { + return 10; + } + + public byte getCasingTextureIndex() { + return 10; + } + + public Block getPipeBlock() { + return GregTech_API.sBlockCasings2; + } + + public byte getPipeMeta() { + return 12; + } + + public Block getFireboxBlock() { + return GregTech_API.sBlockCasings3; + } + + public byte getFireboxMeta() { + return 13; + } + + public byte getFireboxTextureIndex() { + return 45; + } + + public int getEUt() { + return 400; + } + + public int getEfficiencyIncrease() { + return 16; + } + + @Override + int runtimeBoost(int mTime) { + return mTime * 2; + } +} diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_Steel.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_Steel.java index a68c0e6212..0f663dc9a8 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_Steel.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_Steel.java @@ -1,66 +1,66 @@ -package gregtech.common.tileentities.machines.multi;
-
-import gregtech.api.GregTech_API;
-import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import net.minecraft.block.Block;
-
-public class GT_MetaTileEntity_LargeBoiler_Steel
- extends GT_MetaTileEntity_LargeBoiler {
- public GT_MetaTileEntity_LargeBoiler_Steel(int aID, String aName, String aNameRegional) {
- super(aID, aName, aNameRegional);
- }
-
- public GT_MetaTileEntity_LargeBoiler_Steel(String aName) {
- super(aName);
- }
-
- public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
- return new GT_MetaTileEntity_LargeBoiler_Steel(this.mName);
- }
-
- public Block getCasingBlock() {
- return GregTech_API.sBlockCasings2;
- }
-
- public byte getCasingMeta() {
- return 0;
- }
-
- public byte getCasingTextureIndex() {
- return 16;
- }
-
- public Block getPipeBlock() {
- return GregTech_API.sBlockCasings2;
- }
-
- public byte getPipeMeta() {
- return 13;
- }
-
- public Block getFireboxBlock() {
- return GregTech_API.sBlockCasings3;
- }
-
- public byte getFireboxMeta() {
- return 14;
- }
-
- public byte getFireboxTextureIndex() {
- return 46;
- }
-
- public int getEUt() {
- return 600;
- }
-
- public int getEfficiencyIncrease() {
- return 12;
- }
-
- @Override
- int runtimeBoost(int mTime) {
- return mTime * 150 / 100;
- }
-}
+package gregtech.common.tileentities.machines.multi; + +import gregtech.api.GregTech_API; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import net.minecraft.block.Block; + +public class GT_MetaTileEntity_LargeBoiler_Steel + extends GT_MetaTileEntity_LargeBoiler { + public GT_MetaTileEntity_LargeBoiler_Steel(int aID, String aName, String aNameRegional) { + super(aID, aName, aNameRegional); + } + + public GT_MetaTileEntity_LargeBoiler_Steel(String aName) { + super(aName); + } + + public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_LargeBoiler_Steel(this.mName); + } + + public Block getCasingBlock() { + return GregTech_API.sBlockCasings2; + } + + public byte getCasingMeta() { + return 0; + } + + public byte getCasingTextureIndex() { + return 16; + } + + public Block getPipeBlock() { + return GregTech_API.sBlockCasings2; + } + + public byte getPipeMeta() { + return 13; + } + + public Block getFireboxBlock() { + return GregTech_API.sBlockCasings3; + } + + public byte getFireboxMeta() { + return 14; + } + + public byte getFireboxTextureIndex() { + return 46; + } + + public int getEUt() { + return 600; + } + + public int getEfficiencyIncrease() { + return 12; + } + + @Override + int runtimeBoost(int mTime) { + return mTime * 150 / 100; + } +} diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_TungstenSteel.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_TungstenSteel.java index 997a176e34..f6609307a7 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_TungstenSteel.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_TungstenSteel.java @@ -1,67 +1,67 @@ -package gregtech.common.tileentities.machines.multi;
-
-import gregtech.api.GregTech_API;
-import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import net.minecraft.block.Block;
-
-public class GT_MetaTileEntity_LargeBoiler_TungstenSteel
- extends GT_MetaTileEntity_LargeBoiler {
- public GT_MetaTileEntity_LargeBoiler_TungstenSteel(int aID, String aName, String aNameRegional) {
- super(aID, aName, aNameRegional);
- }
-
- public GT_MetaTileEntity_LargeBoiler_TungstenSteel(String aName) {
- super(aName);
- }
-
- public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
- return new GT_MetaTileEntity_LargeBoiler_TungstenSteel(this.mName);
- }
-
- public Block getCasingBlock() {
- return GregTech_API.sBlockCasings4;
- }
-
- public byte getCasingMeta() {
- return 0;
- }
-
- public byte getCasingTextureIndex() {
- return 48;
- }
-
- public Block getPipeBlock() {
- return GregTech_API.sBlockCasings2;
- }
-
- public byte getPipeMeta() {
- return 15;
- }
-
- public Block getFireboxBlock() {
- return GregTech_API.sBlockCasings3;
- }
-
- public byte getFireboxMeta() {
- return 15;
- }
-
- public byte getFireboxTextureIndex() {
- return 47;
- }
-
- public int getEUt() {
- return 1000;
- }
-
- public int getEfficiencyIncrease() {
- return 4;
- }
-
- @Override
- int runtimeBoost(int mTime) {
- return mTime * 120 / 100;
- }
-
-}
+package gregtech.common.tileentities.machines.multi; + +import gregtech.api.GregTech_API; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import net.minecraft.block.Block; + +public class GT_MetaTileEntity_LargeBoiler_TungstenSteel + extends GT_MetaTileEntity_LargeBoiler { + public GT_MetaTileEntity_LargeBoiler_TungstenSteel(int aID, String aName, String aNameRegional) { + super(aID, aName, aNameRegional); + } + + public GT_MetaTileEntity_LargeBoiler_TungstenSteel(String aName) { + super(aName); + } + + public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_LargeBoiler_TungstenSteel(this.mName); + } + + public Block getCasingBlock() { + return GregTech_API.sBlockCasings4; + } + + public byte getCasingMeta() { + return 0; + } + + public byte getCasingTextureIndex() { + return 48; + } + + public Block getPipeBlock() { + return GregTech_API.sBlockCasings2; + } + + public byte getPipeMeta() { + return 15; + } + + public Block getFireboxBlock() { + return GregTech_API.sBlockCasings3; + } + + public byte getFireboxMeta() { + return 15; + } + + public byte getFireboxTextureIndex() { + return 47; + } + + public int getEUt() { + return 1000; + } + + public int getEfficiencyIncrease() { + return 4; + } + + @Override + int runtimeBoost(int mTime) { + return mTime * 120 / 100; + } + +} diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine.java index 74daf36a32..0d1abed760 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine.java @@ -5,6 +5,7 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.items.GT_MetaGenerated_Tool; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Dynamo; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Muffler; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; import gregtech.api.util.GT_Utility; import gregtech.common.items.GT_MetaGenerated_Tool_01; @@ -12,6 +13,7 @@ import net.minecraft.block.Block; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.EnumChatFormatting; import net.minecraftforge.fluids.FluidStack; import java.util.ArrayList; @@ -126,18 +128,24 @@ public abstract class GT_MetaTileEntity_LargeTurbine extends GT_MetaTileEntity_M @Override public boolean checkRecipe(ItemStack aStack) { - if(aStack==null || !(aStack.getItem() instanceof GT_MetaGenerated_Tool) || aStack.getItemDamage() < 170 || aStack.getItemDamage() >179)return false; + if((counter&7)==0 && (aStack==null || !(aStack.getItem() instanceof GT_MetaGenerated_Tool) || aStack.getItemDamage() < 170 || aStack.getItemDamage() >179)) { + stopMachine(); + return false; + } ArrayList<FluidStack> tFluids = getStoredFluids(); if (tFluids.size() > 0) { - if (baseEff == 0 || optFlow == 0 || counter >= 1000 || this.getBaseMetaTileEntity().hasWorkJustBeenEnabled() + if (baseEff == 0 || optFlow == 0 || counter >= 512 || this.getBaseMetaTileEntity().hasWorkJustBeenEnabled() || this.getBaseMetaTileEntity().hasInventoryBeenModified()) { counter = 0; - baseEff = (int) ((50.0F - + (10.0F * ((GT_MetaGenerated_Tool) aStack.getItem()).getToolCombatDamage(aStack))) * 100); - optFlow = (int) Math.max(Float.MIN_NORMAL, + baseEff = GT_Utility.safeInt((long)((5F + ((GT_MetaGenerated_Tool) aStack.getItem()).getToolCombatDamage(aStack)) * 1000F)); + optFlow = GT_Utility.safeInt((long)Math.max(Float.MIN_NORMAL, ((GT_MetaGenerated_Tool) aStack.getItem()).getToolStats(aStack).getSpeedMultiplier() * ((GT_MetaGenerated_Tool) aStack.getItem()).getPrimaryMaterial(aStack).mToolSpeed - * 50); + * 50)); + if(optFlow<=0 || baseEff<=0){ + stopMachine();//in case the turbine got removed + return false; + } } else { counter++; } @@ -148,7 +156,7 @@ public abstract class GT_MetaTileEntity_LargeTurbine extends GT_MetaTileEntity_M // Magic numbers: can always change by at least 10 eu/t, but otherwise by at most 1 percent of the difference in power level (per tick) // This is how much the turbine can actually change during this tick - int maxChangeAllowed = Math.max(10, (int) Math.ceil(Math.abs(difference) * 0.01)); + int maxChangeAllowed = Math.max(10, GT_Utility.safeInt((long)Math.abs(difference)/100)); if (Math.abs(difference) > maxChangeAllowed) { // If this difference is too big, use the maximum allowed change int change = maxChangeAllowed * (difference > 0 ? 1 : -1); // Make the change positive or negative. @@ -156,18 +164,18 @@ public abstract class GT_MetaTileEntity_LargeTurbine extends GT_MetaTileEntity_M } else this.mEUt = newPower; - if (mEUt <= 0) { - -// this.mEfficiencyIncrease = (-10); - this.mEfficiency = 0; + if (this.mEUt <= 0) { //stopMachine(); + this.mEUt=0; + this.mEfficiency=0; return false; } else { this.mMaxProgresstime = 1; - this.mEfficiencyIncrease = (10); + this.mEfficiencyIncrease = 10; if(this.mDynamoHatches.size()>0){ - if(this.mDynamoHatches.get(0).getBaseMetaTileEntity().getOutputVoltage() < (int)((long)mEUt * (long)mEfficiency / 10000L)){ - explodeMultiblock();} + for(GT_MetaTileEntity_Hatch dynamo:mDynamoHatches) + if(isValidMetaTileEntity(dynamo) && dynamo.maxEUOutput() < mEUt) + explodeMultiblock(); } return true; } @@ -196,23 +204,48 @@ public abstract class GT_MetaTileEntity_LargeTurbine extends GT_MetaTileEntity_M @Override public String[] getInfoData() { - String tRunning = mMaxProgresstime>0 ? "Turbine running":"Turbine stopped"; - String tMaintainance = getIdealStatus() == getRepairStatus() ? "No Maintainance issues" : "Needs Maintainance" ; + int mPollutionReduction=0; + for (GT_MetaTileEntity_Hatch_Muffler tHatch : mMufflerHatches) { + if (isValidMetaTileEntity(tHatch)) { + mPollutionReduction=Math.max(tHatch.calculatePollutionReduction(100),mPollutionReduction); + } + } + + String tRunning = mMaxProgresstime>0 ? + EnumChatFormatting.GREEN+"Turbine running"+EnumChatFormatting.RESET : + EnumChatFormatting.RED+"Turbine stopped"+EnumChatFormatting.RESET; + String tMaintainance = getIdealStatus() == getRepairStatus() ? + EnumChatFormatting.GREEN+"No Maintainance issues"+EnumChatFormatting.RESET : + EnumChatFormatting.RED+"Needs Maintainance"+EnumChatFormatting.RESET ; int tDura = 0; if (mInventory[1] != null && mInventory[1].getItem() instanceof GT_MetaGenerated_Tool_01) { - tDura = (int) ((100.0f / GT_MetaGenerated_Tool.getToolMaxDamage(mInventory[1]) * (GT_MetaGenerated_Tool.getToolDamage(mInventory[1]))+1)); + tDura = GT_Utility.safeInt((long)(100.0f / GT_MetaGenerated_Tool.getToolMaxDamage(mInventory[1]) * (GT_MetaGenerated_Tool.getToolDamage(mInventory[1]))+1)); + } + + long storedEnergy=0; + long maxEnergy=0; + for(GT_MetaTileEntity_Hatch_Dynamo tHatch : mDynamoHatches) { + if (isValidMetaTileEntity(tHatch)) { + storedEnergy+=tHatch.getBaseMetaTileEntity().getStoredEU(); + maxEnergy+=tHatch.getBaseMetaTileEntity().getEUCapacity(); + } } return new String[]{ - "Large Turbine", + EnumChatFormatting.BLUE+"Large Turbine"+EnumChatFormatting.RESET, + "Stored Energy:", + EnumChatFormatting.GREEN + Long.toString(storedEnergy) + EnumChatFormatting.RESET +" EU / "+ + EnumChatFormatting.YELLOW + Long.toString(maxEnergy) + EnumChatFormatting.RESET +" EU", tRunning, - "Current Output: "+mEUt+" EU/t", - "Optimal Flow: "+(int)realOptFlow+" L/t", - "Fuel Remaining: "+storedFluid+"L", - "Current Speed: "+(mEfficiency/100)+"%", - "Turbine Damage: "+tDura+"%", - tMaintainance}; + "Current Output: "+EnumChatFormatting.RED+mEUt+EnumChatFormatting.RESET+" EU/t", + "Optimal Flow: "+EnumChatFormatting.YELLOW+GT_Utility.safeInt((long)realOptFlow)+EnumChatFormatting.RESET+" L/t", + "Fuel Remaining: "+EnumChatFormatting.GOLD+storedFluid+EnumChatFormatting.RESET+"L", + "Current Speed: "+EnumChatFormatting.YELLOW+(mEfficiency/100F)+EnumChatFormatting.RESET+"%", + "Turbine Damage: "+EnumChatFormatting.RED+Integer.toString(tDura)+EnumChatFormatting.RESET+"%", + tMaintainance, + "Pollution reduced to: "+ EnumChatFormatting.GREEN + mPollutionReduction+ EnumChatFormatting.RESET+" %" + }; } @Override diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Gas.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Gas.java index ec0173526c..0743fffe2b 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Gas.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Gas.java @@ -41,8 +41,7 @@ public class GT_MetaTileEntity_LargeTurbine_Gas extends GT_MetaTileEntity_LargeT "1x Muffler Hatch (Side centered)", "1x Dynamo Hatch (Back centered)", "Stainless Steel Turbine Casings for the rest (24 at least!)", - "Needs a Turbine Item (Inside controller GUI)", - "Output depending on Rotor: 102-6720EU/t"}; + "Needs a Turbine Item (Inside controller GUI)"}; } public int getFuelValue(FluidStack aLiquid) { @@ -77,48 +76,47 @@ public class GT_MetaTileEntity_LargeTurbine_Gas extends GT_MetaTileEntity_LargeT @Override public int getPollutionPerTick(ItemStack aStack) { - return 8; + return 15; } @Override int fluidIntoPower(ArrayList<FluidStack> aFluids, int aOptFlow, int aBaseEff) { - int tEU = 0; - - int actualOptimalFlow = 0; - if (aFluids.size() >= 1) { + int tEU = 0; + int actualOptimalFlow = 0; + FluidStack firstFuelType = new FluidStack(aFluids.get(0), 0); // Identify a SINGLE type of fluid to process. Doesn't matter which one. Ignore the rest! int fuelValue = getFuelValue(firstFuelType); - actualOptimalFlow = (int) (aOptFlow / fuelValue); + actualOptimalFlow = GT_Utility.safeInt((long)aOptFlow / fuelValue); this.realOptFlow = actualOptimalFlow; - int remainingFlow = (int) (actualOptimalFlow * 1.25f); // Allowed to use up to 125% of optimal flow. Variable required outside of loop for multi-hatch scenarios. + int remainingFlow = GT_Utility.safeInt((long)(actualOptimalFlow * 1.25f)); // Allowed to use up to 125% of optimal flow. Variable required outside of loop for multi-hatch scenarios. int flow = 0; int totalFlow = 0; + storedFluid=0; int aFluids_sS=aFluids.size(); for (int i = 0; i < aFluids_sS; i++) { if (aFluids.get(i).isFluidEqual(firstFuelType)) { - flow = aFluids.get(i).amount; // Get all (steam) in hatch - flow = Math.min(flow, Math.min(remainingFlow, (int) (actualOptimalFlow * 1.25f))); // try to use up to 125% of optimal flow w/o exceeding remainingFlow + flow = Math.min(aFluids.get(i).amount, remainingFlow); // try to use up to 125% of optimal flow w/o exceeding remainingFlow depleteInput(new FluidStack(aFluids.get(i), flow)); // deplete that amount - this.storedFluid = aFluids.get(i).amount; + this.storedFluid += aFluids.get(i).amount; remainingFlow -= flow; // track amount we're allowed to continue depleting from hatches totalFlow += flow; // track total input used } } - - tEU = (int) (Math.min((float) actualOptimalFlow, totalFlow) * fuelValue); + if(totalFlow<=0)return 0; + tEU = GT_Utility.safeInt((long)totalFlow * fuelValue); if (totalFlow != actualOptimalFlow) { - float efficiency = 1.0f - Math.abs(((totalFlow - (float) actualOptimalFlow) / actualOptimalFlow)); - if(totalFlow>actualOptimalFlow){efficiency = 1.0f;} - if (efficiency < 0) - efficiency = 0; // Can happen with really ludicrously poor inefficiency. + float efficiency = 1.0f - Math.abs((totalFlow - actualOptimalFlow) / (float)actualOptimalFlow); + //if(totalFlow>actualOptimalFlow){efficiency = 1.0f;} + //if (efficiency < 0) + // efficiency = 0; // Can happen with really ludicrously poor inefficiency. tEU *= efficiency; - tEU = Math.max(1, (int)((long)tEU * (long)aBaseEff / 10000L)); + tEU = GT_Utility.safeInt((long)tEU * (long)aBaseEff / 10000L); } else { - tEU = (int)((long)tEU * (long)aBaseEff / 10000L); + tEU = GT_Utility.safeInt((long)tEU * (long)aBaseEff / 10000L); } return tEU; diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_HPSteam.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_HPSteam.java index a4f144139f..dbf69a9bbb 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_HPSteam.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_HPSteam.java @@ -8,6 +8,7 @@ import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.objects.GT_RenderedTexture; import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_Utility; import net.minecraft.block.Block; import net.minecraft.item.ItemStack; import net.minecraftforge.fluids.FluidStack; @@ -73,36 +74,39 @@ public class GT_MetaTileEntity_LargeTurbine_HPSteam extends GT_MetaTileEntity_La int tEU = 0; int totalFlow = 0; // Byproducts are based on actual flow int flow = 0; - int remainingFlow = (int) (aOptFlow * 1.25f); // Allowed to use up to 125% of optimal flow + int remainingFlow = GT_Utility.safeInt((long)(aOptFlow * 1.25f)); // Allowed to use up to 125% of optimal flow. Variable required outside of loop for multi-hatch scenarios. this.realOptFlow = aOptFlow; + storedFluid=0; for (int i = 0; i < aFluids.size() && remainingFlow > 0; i++) { String fluidName = aFluids.get(i).getFluid().getUnlocalizedName(aFluids.get(i)); if (fluidName.equals("ic2.fluidSuperheatedSteam")) { - flow = aFluids.get(i).amount; // Get all (steam) in hatch - flow = Math.min(flow, Math.min(remainingFlow, (int) (aOptFlow * 1.25f))); // try to use up to 125% of optimal flow w/o exceeding remainingFlow + flow = Math.min(aFluids.get(i).amount, remainingFlow); // try to use up w/o exceeding remainingFlow depleteInput(new FluidStack(aFluids.get(i), flow)); // deplete that amount - this.storedFluid = aFluids.get(i).amount; - remainingFlow -= flow; // track amount we're allowed to keep depleting from hatches - totalFlow += flow; // track total used + this.storedFluid += aFluids.get(i).amount; + remainingFlow -= flow; // track amount we're allowed to continue depleting from hatches + totalFlow += flow; // track total input used if (!achievement) { - GT_Mod.instance.achievements.issueAchievement(this.getBaseMetaTileEntity().getWorld().getPlayerEntityByName(this.getBaseMetaTileEntity().getOwnerName()), "efficientsteam"); + try { + GT_Mod.instance.achievements.issueAchievement(this.getBaseMetaTileEntity().getWorld().getPlayerEntityByName(this.getBaseMetaTileEntity().getOwnerName()), "efficientsteam"); + } catch (Exception e) { + } achievement = true; } }else if(fluidName.equals("fluid.steam") || fluidName.equals("ic2.fluidSteam") || fluidName.equals("fluid.mfr.steam.still.name")){ depleteInput(new FluidStack(aFluids.get(i), aFluids.get(i).amount)); } } - - tEU = (int) (Math.min((float) aOptFlow, totalFlow)); + if(totalFlow<=0)return 0; + tEU = totalFlow; addOutput(GT_ModHandler.getSteam(totalFlow)); - if (totalFlow > 0 && totalFlow != aOptFlow) { - float efficiency = 1.0f - Math.abs(((totalFlow - (float) aOptFlow) / aOptFlow)); - if(totalFlow>aOptFlow){efficiency = 1.0f;} + if (totalFlow != aOptFlow) { + float efficiency = 1.0f - Math.abs((totalFlow - aOptFlow) / (float)aOptFlow); + //if(totalFlow>aOptFlow){efficiency = 1.0f;} tEU *= efficiency; - tEU = Math.max(1, (int)((long)tEU * (long)aBaseEff / 10000L)); + tEU = Math.max(1, GT_Utility.safeInt((long)tEU * (long)aBaseEff / 10000L)); } else { - tEU = (int)((long)tEU * (long)aBaseEff / 10000L); + tEU = GT_Utility.safeInt((long)tEU * (long)aBaseEff / 10000L); } return tEU; diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Plasma.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Plasma.java index b3af446944..2a3c6011d6 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Plasma.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Plasma.java @@ -5,12 +5,18 @@ import gregtech.api.enums.Textures; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.items.GT_MetaGenerated_Tool; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Dynamo; import gregtech.api.objects.GT_RenderedTexture; import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Recipe.GT_Recipe_Map; import gregtech.api.util.GT_Utility; +import gregtech.common.items.GT_MetaGenerated_Tool_01; import net.minecraft.block.Block; import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumChatFormatting; +import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.FluidRegistry; @@ -42,8 +48,7 @@ public class GT_MetaTileEntity_LargeTurbine_Plasma extends GT_MetaTileEntity_Lar "1x Maintenance Hatch (Side centered)", "1x Dynamo Hatch (Back centered)", "Tungstensteel Turbine Casings for the rest (24 at least!)", - "Needs a Turbine Item (Inside controller GUI)", - "Output depending on Rotor: 6553-332595EU/t"}; + "Needs a Turbine Item (Inside controller GUI)"}; } public int getFuelValue(FluidStack aLiquid) { @@ -83,29 +88,28 @@ public class GT_MetaTileEntity_LargeTurbine_Plasma extends GT_MetaTileEntity_Lar @Override int fluidIntoPower(ArrayList<FluidStack> aFluids, int aOptFlow, int aBaseEff) { - - aOptFlow *= 40; - int tEU = 0; + if (aFluids.size() >= 1) { + aOptFlow *= 800;//CHANGED THINGS HERE, check recipe runs once per 20 ticks + int tEU = 0; int actualOptimalFlow = 0; - if (aFluids.size() >= 1) { FluidStack firstFuelType = new FluidStack(aFluids.get(0), 0); // Identify a SINGLE type of fluid to process. Doesn't matter which one. Ignore the rest! int fuelValue = getFuelValue(firstFuelType); - actualOptimalFlow = (int) ((aOptFlow + fuelValue - 1) / fuelValue); + actualOptimalFlow = GT_Utility.safeInt((long)Math.ceil((double)aOptFlow / (double)fuelValue)); this.realOptFlow = actualOptimalFlow; // For scanner info - int remainingFlow = (int) (actualOptimalFlow * 1.25f); // Allowed to use up to 125% of optimal flow. Variable required outside of loop for multi-hatch scenarios. + int remainingFlow = GT_Utility.safeInt((long)(actualOptimalFlow * 1.25f)); // Allowed to use up to 125% of optimal flow. Variable required outside of loop for multi-hatch scenarios. int flow = 0; int totalFlow = 0; + storedFluid=0; int aFluids_sS=aFluids.size(); for (int i = 0; i < aFluids_sS; i++) { if (aFluids.get(i).isFluidEqual(firstFuelType)) { - flow = aFluids.get(i).amount; // Get all (steam) in hatch - flow = Math.min(flow, Math.min(remainingFlow, (int) (actualOptimalFlow * 1.25f))); // try to use up to 125% of optimal flow w/o exceeding remainingFlow + flow = Math.min(aFluids.get(i).amount, remainingFlow); // try to use up w/o exceeding remainingFlow depleteInput(new FluidStack(aFluids.get(i), flow)); // deplete that amount - this.storedFluid = aFluids.get(i).amount; + this.storedFluid += aFluids.get(i).amount; remainingFlow -= flow; // track amount we're allowed to continue depleting from hatches totalFlow += flow; // track total input used } @@ -122,18 +126,20 @@ public class GT_MetaTileEntity_LargeTurbine_Plasma extends GT_MetaTileEntity_Lar addOutput(output); } } + if(totalFlow<=0)return 0; + tEU = GT_Utility.safeInt((long)((fuelValue / 20D) * (double)totalFlow)); - tEU = (int) (Math.min((float) actualOptimalFlow, totalFlow) * fuelValue); + //System.out.println(totalFlow+" : "+fuelValue+" : "+aOptFlow+" : "+actualOptimalFlow+" : "+tEU); if (totalFlow != actualOptimalFlow) { - float efficiency = 1.0f - Math.abs(((totalFlow - (float) actualOptimalFlow) / actualOptimalFlow)); - if(totalFlow>actualOptimalFlow){efficiency = 1.0f;} - if (efficiency < 0) - efficiency = 0; // Can happen with really ludicrously poor inefficiency. - tEU *= efficiency; - tEU = Math.max(1, (int)((long)tEU * (long)aBaseEff / 10000L)); + double efficiency = 1.0D - Math.abs((totalFlow - actualOptimalFlow) / (float)actualOptimalFlow); + //if(totalFlow>actualOptimalFlow){efficiency = 1.0f;} + //if (efficiency < 0) + // efficiency = 0; // Can happen with really ludicrously poor inefficiency. + tEU = (int)(tEU * efficiency); + tEU = GT_Utility.safeInt((long)(aBaseEff/10000D*tEU)); } else { - tEU = (int)((long)tEU * (long)aBaseEff / 10000L); + tEU = GT_Utility.safeInt((long)(aBaseEff/10000D*tEU)); } return tEU; @@ -142,5 +148,98 @@ public class GT_MetaTileEntity_LargeTurbine_Plasma extends GT_MetaTileEntity_Lar return 0; } + @Override + public boolean checkRecipe(ItemStack aStack) { + if((counter&7)==0 && (aStack==null || !(aStack.getItem() instanceof GT_MetaGenerated_Tool) || aStack.getItemDamage() < 170 || aStack.getItemDamage() >179)) { + stopMachine(); + return false; + } + ArrayList<FluidStack> tFluids = getStoredFluids(); + if (tFluids.size() > 0) { + if (baseEff == 0 || optFlow == 0 || counter >= 512 || this.getBaseMetaTileEntity().hasWorkJustBeenEnabled() + || this.getBaseMetaTileEntity().hasInventoryBeenModified()) { + counter = 0; + baseEff = GT_Utility.safeInt((long)((5F + ((GT_MetaGenerated_Tool) aStack.getItem()).getToolCombatDamage(aStack)) * 1000F)); + optFlow = GT_Utility.safeInt((long)Math.max(Float.MIN_NORMAL, + ((GT_MetaGenerated_Tool) aStack.getItem()).getToolStats(aStack).getSpeedMultiplier() + * ((GT_MetaGenerated_Tool) aStack.getItem()).getPrimaryMaterial(aStack).mToolSpeed + * 50)); + } else { + counter++; + } + } + + if(optFlow<=0 || baseEff<=0){ + stopMachine();//in case the turbine got removed + return false; + } + int newPower = fluidIntoPower(tFluids, optFlow, baseEff); // How much the turbine should be producing with this flow + + int difference = newPower - this.mEUt; // difference between current output and new output + + // Magic numbers: can always change by at least 10 eu/t, but otherwise by at most 1 percent of the difference in power level (per tick) + // This is how much the turbine can actually change during this tick + int maxChangeAllowed = Math.max(200, GT_Utility.safeInt((long)Math.abs(difference)/5)); + + if (Math.abs(difference) > maxChangeAllowed) { // If this difference is too big, use the maximum allowed change + int change = maxChangeAllowed * (difference > 0 ? 1 : -1); // Make the change positive or negative. + this.mEUt += change; // Apply the change + } else + this.mEUt = newPower; + + if (this.mEUt <= 0) { + //stopMachine(); + this.mEUt=0; + this.mEfficiency=0; + return false; + } else { + this.mMaxProgresstime = 20; + this.mEfficiencyIncrease = 200; + if(this.mDynamoHatches.size()>0){ + for(GT_MetaTileEntity_Hatch dynamo:mDynamoHatches) + if(isValidMetaTileEntity(dynamo) && dynamo.maxEUOutput() < mEUt) + explodeMultiblock(); + } + return true; + } + } + + @Override + public String[] getInfoData() { + String tRunning = mMaxProgresstime>0 ? + EnumChatFormatting.GREEN+"Turbine running"+EnumChatFormatting.RESET : + EnumChatFormatting.RED+"Turbine stopped"+EnumChatFormatting.RESET; + String tMaintainance = getIdealStatus() == getRepairStatus() ? + EnumChatFormatting.GREEN+"No Maintainance issues"+EnumChatFormatting.RESET : + EnumChatFormatting.RED+"Needs Maintainance"+EnumChatFormatting.RESET ; + int tDura = 0; + + if (mInventory[1] != null && mInventory[1].getItem() instanceof GT_MetaGenerated_Tool_01) { + tDura = GT_Utility.safeInt((long)(100.0f / GT_MetaGenerated_Tool.getToolMaxDamage(mInventory[1]) * (GT_MetaGenerated_Tool.getToolDamage(mInventory[1]))+1)); + } + + long storedEnergy=0; + long maxEnergy=0; + for(GT_MetaTileEntity_Hatch_Dynamo tHatch : mDynamoHatches) { + if (isValidMetaTileEntity(tHatch)) { + storedEnergy+=tHatch.getBaseMetaTileEntity().getStoredEU(); + maxEnergy+=tHatch.getBaseMetaTileEntity().getEUCapacity(); + } + } + + return new String[]{ + EnumChatFormatting.BLUE+"Large Turbine"+EnumChatFormatting.RESET, + "Stored Energy:", + EnumChatFormatting.GREEN + Long.toString(storedEnergy) + EnumChatFormatting.RESET +" EU / "+ + EnumChatFormatting.YELLOW + Long.toString(maxEnergy) + EnumChatFormatting.RESET +" EU", + tRunning, + "Current Output: "+EnumChatFormatting.RED+mEUt+EnumChatFormatting.RESET+" EU/t", + "Optimal Flow: "+EnumChatFormatting.YELLOW+GT_Utility.safeInt((long)realOptFlow)+EnumChatFormatting.RESET+" L/s", + "Fuel Remaining: "+EnumChatFormatting.GOLD+storedFluid+EnumChatFormatting.RESET+"L", + "Current Speed: "+EnumChatFormatting.YELLOW+(mEfficiency/100F)+EnumChatFormatting.RESET+"%", + "Turbine Damage: "+EnumChatFormatting.RED+Integer.toString(tDura)+EnumChatFormatting.RESET+"%", + tMaintainance, + }; + } } diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Steam.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Steam.java index 32577368e2..acd53d652b 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Steam.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Steam.java @@ -8,6 +8,7 @@ import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.objects.GT_RenderedTexture; import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_Utility; import net.minecraft.block.Block; import net.minecraft.item.ItemStack; import net.minecraftforge.fluids.FluidStack; @@ -41,8 +42,7 @@ public class GT_MetaTileEntity_LargeTurbine_Steam extends GT_MetaTileEntity_Larg "1x Maintenance Hatch (Side centered)", "1x Dynamo Hatch (Back centered)", "Turbine Casings for the rest (24 at least!)", - "Needs a Turbine Item (Inside controller GUI)", - "Output depending on Rotor: 60-3360EU/t"}; + "Needs a Turbine Item (Inside controller GUI)"}; } @Override @@ -73,7 +73,7 @@ public class GT_MetaTileEntity_LargeTurbine_Steam extends GT_MetaTileEntity_Larg private int useWater(float input) { water = water + input; int usage = (int) water; - water = water - (int) usage; + water = water - usage; return usage; } @@ -82,16 +82,16 @@ public class GT_MetaTileEntity_LargeTurbine_Steam extends GT_MetaTileEntity_Larg int tEU = 0; int totalFlow = 0; // Byproducts are based on actual flow int flow = 0; - int remainingFlow = (int) (aOptFlow * 1.25f); // Allowed to use up to 125% of optimal flow. Variable required outside of loop for multi-hatch scenarios. - this.realOptFlow = ((aOptFlow / 2) / (0.5)); + int remainingFlow = GT_Utility.safeInt((long)(aOptFlow * 1.25f)); // Allowed to use up to 125% of optimal flow. Variable required outside of loop for multi-hatch scenarios. + this.realOptFlow = aOptFlow; + storedFluid=0; for (int i = 0; i < aFluids.size() && remainingFlow > 0; i++) { // loop through each hatch; extract inputs and track totals. String fluidName = aFluids.get(i).getFluid().getUnlocalizedName(aFluids.get(i)); if (fluidName.equals("fluid.steam") || fluidName.equals("ic2.fluidSteam") || fluidName.equals("fluid.mfr.steam.still.name")) { - flow = aFluids.get(i).amount; // Get all (steam) in hatch - flow = Math.min(flow, Math.min(remainingFlow, (int) (aOptFlow * 1.25f))); // try to use up to 125% of optimal flow w/o exceeding remainingFlow + flow = Math.min(aFluids.get(i).amount, remainingFlow); // try to use up w/o exceeding remainingFlow depleteInput(new FluidStack(aFluids.get(i), flow)); // deplete that amount - this.storedFluid = aFluids.get(i).amount; + this.storedFluid += aFluids.get(i).amount; remainingFlow -= flow; // track amount we're allowed to continue depleting from hatches totalFlow += flow; // track total input used if (!achievement) { @@ -99,20 +99,20 @@ public class GT_MetaTileEntity_LargeTurbine_Steam extends GT_MetaTileEntity_Larg achievement = true; } }else if(fluidName.equals("ic2.fluidSuperheatedSteam")){ - depleteInput(new FluidStack(aFluids.get(i), aFluids.get(i).amount)); + depleteInput(new FluidStack(aFluids.get(i), aFluids.get(i).amount)); } } - - tEU = (int) (Math.min((float) aOptFlow, totalFlow)); + if(totalFlow<=0)return 0; + tEU = totalFlow; int waterToOutput = useWater(totalFlow / 160.0f); addOutput(GT_ModHandler.getDistilledWater(waterToOutput)); - if (totalFlow > 0 && totalFlow != aOptFlow) { - float efficiency = 1.0f - Math.abs(((totalFlow - (float) aOptFlow) / aOptFlow)); - if(totalFlow>aOptFlow){efficiency = 1.0f;} + if (totalFlow != aOptFlow) { + float efficiency = 1.0f - Math.abs((totalFlow - aOptFlow) / (float)aOptFlow); + //if(totalFlow>aOptFlow){efficiency = 1.0f;} tEU *= efficiency; - tEU = Math.max(1, (int)((long)tEU * (long)aBaseEff / 20000L)); + tEU = Math.max(1, GT_Utility.safeInt((long)tEU * (long)aBaseEff / 20000L)); } else { - tEU = (int)((long)tEU * (long)aBaseEff / 20000L); + tEU = GT_Utility.safeInt((long)tEU * (long)aBaseEff / 20000L); } return tEU; diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_MultiFurnace.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_MultiFurnace.java index 1570142f44..e7fbeda316 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_MultiFurnace.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_MultiFurnace.java @@ -1,13 +1,13 @@ package gregtech.common.tileentities.machines.multi;
-import java.util.ArrayList;
-
import gregtech.api.GregTech_API;
import gregtech.api.enums.Textures;
import gregtech.api.gui.GT_GUIContainer_MultiMachine;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Energy;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Muffler;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase;
import gregtech.api.objects.GT_RenderedTexture;
import gregtech.api.util.GT_ModHandler;
@@ -15,8 +15,11 @@ import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Utility;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.item.ItemStack;
+import net.minecraft.util.EnumChatFormatting;
import net.minecraftforge.common.util.ForgeDirection;
+import java.util.ArrayList;
+
public class GT_MetaTileEntity_MultiFurnace
extends GT_MetaTileEntity_MultiBlockBase {
private int mLevel = 0;
@@ -74,7 +77,7 @@ public class GT_MetaTileEntity_MultiFurnace public boolean checkRecipe(ItemStack aStack) {
ArrayList<ItemStack> tInputList = getStoredInputs();
if (!tInputList.isEmpty()) {
- byte tTier = (byte) Math.max(1, GT_Utility.getTier(getMaxInputVoltage()));
+ int mVolatage=GT_Utility.safeInt(getMaxInputVoltage());
int j = 0;
this.mOutputItems = new ItemStack[8 * this.mLevel];
@@ -86,9 +89,17 @@ public class GT_MetaTileEntity_MultiFurnace if (j > 0) {
this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000);
this.mEfficiencyIncrease = 10000;
+ calculateOverclockedNessMulti(4, 512, 1, mVolatage);
+ //In case recipe is too OP for that machine
+ if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1)
+ return false;
- this.mEUt = (-4 * (1 << tTier - 1) * (1 << tTier - 1) * this.mLevel / this.mCostDiscount);
- this.mMaxProgresstime = Math.max(1, 512 / (1 << tTier - 1));
+ this.mEUt = GT_Utility.safeInt(((long)mEUt) * this.mLevel / (long)this.mCostDiscount,1);
+ if (mEUt == Integer.MAX_VALUE - 1)
+ return false;
+ if (this.mEUt > 0) {
+ this.mEUt = (-this.mEUt);
+ }
}
updateSlots();
return true;
@@ -96,7 +107,7 @@ public class GT_MetaTileEntity_MultiFurnace return false;
}
- public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) {
+ private boolean checkMachineFunction(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) {
int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX;
int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ;
@@ -175,13 +186,18 @@ public class GT_MetaTileEntity_MultiFurnace }
return true;
}
+ public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack){
+ boolean result= this.checkMachineFunction(aBaseMetaTileEntity,aStack);
+ if (!result) this.mLevel=0;
+ return result;
+ }
public int getMaxEfficiency(ItemStack aStack) {
return 10000;
}
public int getPollutionPerTick(ItemStack aStack) {
- return 5;
+ return 20;
}
public int getDamageToComponent(ItemStack aStack) {
@@ -211,4 +227,45 @@ public class GT_MetaTileEntity_MultiFurnace }
}
}
+
+
+ @Override
+ public String[] getInfoData() {
+ int mPollutionReduction=0;
+ for (GT_MetaTileEntity_Hatch_Muffler tHatch : mMufflerHatches) {
+ if (isValidMetaTileEntity(tHatch)) {
+ mPollutionReduction=Math.max(tHatch.calculatePollutionReduction(100),mPollutionReduction);
+ }
+ }
+
+ long storedEnergy=0;
+ long maxEnergy=0;
+ for(GT_MetaTileEntity_Hatch_Energy tHatch : mEnergyHatches) {
+ if (isValidMetaTileEntity(tHatch)) {
+ storedEnergy+=tHatch.getBaseMetaTileEntity().getStoredEU();
+ maxEnergy+=tHatch.getBaseMetaTileEntity().getEUCapacity();
+ }
+ }
+
+ return new String[]{
+ "Progress:",
+ EnumChatFormatting.GREEN + Integer.toString(mProgresstime/20) + EnumChatFormatting.RESET +" s / "+
+ EnumChatFormatting.YELLOW + Integer.toString(mMaxProgresstime/20) + EnumChatFormatting.RESET +" s",
+ "Stored Energy:",
+ EnumChatFormatting.GREEN + Long.toString(storedEnergy) + EnumChatFormatting.RESET +" EU / "+
+ EnumChatFormatting.YELLOW + Long.toString(maxEnergy) + EnumChatFormatting.RESET +" EU",
+ "Probably uses: "+
+ EnumChatFormatting.RED + Integer.toString(-mEUt) + EnumChatFormatting.RESET + " EU/t",
+ "Maximum total power (to all Energy Hatches, not single ones): ",
+ EnumChatFormatting.YELLOW+Long.toString(getMaxInputVoltage())+EnumChatFormatting.RESET+ " EU/t * 2A",
+ "Problems: "+
+ EnumChatFormatting.RED+ (getIdealStatus() - getRepairStatus())+EnumChatFormatting.RESET+
+ " Efficiency: "+
+ EnumChatFormatting.YELLOW+Float.toString(mEfficiency / 100.0F)+EnumChatFormatting.RESET + " %",
+ "Multi smelting: "+
+ EnumChatFormatting.GREEN+mLevel*8+EnumChatFormatting.RESET+" Discount: (EU/t) / "+EnumChatFormatting.GREEN+mCostDiscount+EnumChatFormatting.RESET,
+ "Pollution reduced to: "+ EnumChatFormatting.GREEN + mPollutionReduction+ EnumChatFormatting.RESET+" %"
+ };
+ }
+
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilCracker.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilCracker.java index 4aef1285df..7729e3b52d 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilCracker.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilCracker.java @@ -1,7 +1,5 @@ package gregtech.common.tileentities.machines.multi; -import java.util.ArrayList; - import gregtech.api.GregTech_API; import gregtech.api.enums.Materials; import gregtech.api.enums.Textures; @@ -19,9 +17,11 @@ import net.minecraft.item.ItemStack; import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.FluidStack; +import java.util.ArrayList; + public class GT_MetaTileEntity_OilCracker extends GT_MetaTileEntity_MultiBlockBase { - private final FluidStack fluidToDecreaseEu = GT_ModHandler.getSteam(128); - private final FluidStack fluidToIncreaseOutput = Materials.Hydrogen.getGas(64); + private static final FluidStack fluidToDecreaseEu = GT_ModHandler.getSteam(128); + private static final FluidStack fluidToIncreaseOutput = Materials.Hydrogen.getGas(64); public GT_MetaTileEntity_OilCracker(int aID, String aName, String aNameRegional) { @@ -69,29 +69,16 @@ public class GT_MetaTileEntity_OilCracker extends GT_MetaTileEntity_MultiBlockBa GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sCrakingRecipes.findRecipe(getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[tTier], new FluidStack[]{tInput}, new ItemStack[]{}); if (tRecipe != null) { if (tRecipe.isRecipeInputEqual(true, new FluidStack[]{tInput}, new ItemStack[]{})) { - boolean needDecreaseEu = depleteInput(fluidToDecreaseEu); - boolean needIncreaseOutput = !needDecreaseEu && depleteInput(fluidToIncreaseOutput); - this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); this.mEfficiencyIncrease = 10000; - if (tRecipe.mEUt <= 16) { - this.mEUt = (tRecipe.mEUt * (1 << tTier - 1) * (1 << tTier - 1)); - this.mMaxProgresstime = (tRecipe.mDuration / (1 << tTier - 1)); - } else { - this.mEUt = tRecipe.mEUt; - this.mMaxProgresstime = tRecipe.mDuration; - while (this.mEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) { - this.mEUt *= 4; - this.mMaxProgresstime /= 2; - } - } - if (needDecreaseEu) this.mEUt = this.mEUt / 2; - if (this.mEUt > 0) { - this.mEUt = (-this.mEUt); - } - this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime); + calculateOverclockedNessMulti(tRecipe.mEUt, tRecipe.mDuration, 1, getMaxInputVoltage()); + //In case recipe is too OP for that machine + if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1) + return false; + if (depleteInput(fluidToDecreaseEu)) this.mEUt = this.mEUt / 2; + if (this.mEUt > 0) this.mEUt = (-this.mEUt); this.mOutputFluids = new FluidStack[]{tRecipe.getFluidOutput(0)}; - if (needIncreaseOutput) this.mOutputFluids[0].amount = this.mOutputFluids[0].amount * 130 / 100; + if (depleteInput(fluidToIncreaseOutput)) this.mOutputFluids[0].amount = this.mOutputFluids[0].amount * 130 / 100; return true; } } diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrill.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrill.java index 60863e4c52..9cb614478d 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrill.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrill.java @@ -6,6 +6,8 @@ import gregtech.api.gui.GT_GUIContainer_MultiMachine; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Energy; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Muffler; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; import gregtech.api.objects.GT_RenderedTexture; import gregtech.api.util.GT_ModHandler; @@ -13,12 +15,13 @@ import gregtech.api.util.GT_Utility; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumChatFormatting; import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.FluidStack; import java.util.ArrayList; -public class GT_MetaTileEntity_OilDrill extends GT_MetaTileEntity_MultiBlockBase { +public class GT_MetaTileEntity_OilDrill extends GT_MetaTileEntity_MultiBlockBase {//TODO REWORK private boolean completedCycle = false; @@ -39,7 +42,8 @@ public class GT_MetaTileEntity_OilDrill extends GT_MetaTileEntity_MultiBlockBase "1x3x1 Steel Frame Boxes (Each Steel pillar side and on top)", "1x Output Hatch (One of base casings)", "1x Maintenance Hatch (One of base casings)", - "1x Energy Hatch (One of base casings)"}; + "1x Energy Hatch (One of base casings)", + "Also check the seismic prospector..."}; } public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { @@ -73,45 +77,40 @@ public class GT_MetaTileEntity_OilDrill extends GT_MetaTileEntity_MultiBlockBase } } } - FluidStack tFluid = GT_Utility.getUndergroundOil(getBaseMetaTileEntity().getWorld(), getBaseMetaTileEntity().getXCoord(), getBaseMetaTileEntity().getZCoord(), true); - if (tFluid == null) { - stopMachine(); - return false; + //Output fluid + FluidStack tFluid = GT_Utility.undergroundOil(getBaseMetaTileEntity().getWorld(), getBaseMetaTileEntity().getXCoord()>>4, getBaseMetaTileEntity().getZCoord()>>4,false,0); + if (tFluid == null){ + extractionSpeed=0; + stopMachine(); + return false;//impossible } - if (getYOfPumpHead() > 0 && getBaseMetaTileEntity().getBlockOffset(ForgeDirection.getOrientation(getBaseMetaTileEntity().getBackFacing()).offsetX, getYOfPumpHead() - 1 - getBaseMetaTileEntity().getYCoord(), ForgeDirection.getOrientation(getBaseMetaTileEntity().getBackFacing()).offsetZ) != Blocks.bedrock) { + if (getBaseMetaTileEntity().getBlockOffset(ForgeDirection.getOrientation(getBaseMetaTileEntity().getBackFacing()).offsetX, getYOfPumpHead() - 1 - getBaseMetaTileEntity().getYCoord(), ForgeDirection.getOrientation(getBaseMetaTileEntity().getBackFacing()).offsetZ) != Blocks.bedrock) { if (completedCycle) { moveOneDown(); } tFluid = null; if (mEnergyHatches.size() > 0 && mEnergyHatches.get(0).getEUVar() > (512 + getMaxInputVoltage() * 4)) completedCycle = true; - } else if (tFluid.amount < 5000) { - stopMachine(); - return false; + } else if (tFluid.amount == 0) {//no fluid remaining + extractionSpeed=0; + stopMachine(); + return false;//stops processing?? } else { - tFluid.amount = tFluid.amount / 5000; + int minExtraction= (int)Math.pow((float)GT_Utility.getTier(getMaxInputVoltage()),3F);//tier^3 + if(tFluid.amount>minExtraction) + tFluid.amount= Math.max(minExtraction,Math.min(tFluid.amount/50000,500)); + extractionSpeed=tFluid.amount; + GT_Utility.undergroundOil(getBaseMetaTileEntity().getWorld(), getBaseMetaTileEntity().getXCoord()>>4, getBaseMetaTileEntity().getZCoord()>>4,true,extractionSpeed); } - long tVoltage = getMaxInputVoltage(); - byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage)); this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); this.mEfficiencyIncrease = 10000; - int tEU = 24; - int tDuration = 160; - if (tEU <= 16) { - this.mEUt = (tEU * (1 << tTier - 1) * (1 << tTier - 1)); - this.mMaxProgresstime = (tDuration / (1 << tTier - 1)); - } else { - this.mEUt = tEU; - this.mMaxProgresstime = tDuration; - while (this.mEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) { - this.mEUt *= 4; - this.mMaxProgresstime /= 2; - } - } + calculateOverclockedNessMulti(24, 160, 1, getMaxInputVoltage()); + //In case recipe is too OP for that machine + if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1) + return false; if (this.mEUt > 0) { this.mEUt = (-this.mEUt); } - this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime); this.mOutputFluids = new FluidStack[]{tFluid}; return true; } @@ -124,7 +123,7 @@ public class GT_MetaTileEntity_OilDrill extends GT_MetaTileEntity_MultiBlockBase int xDir = ForgeDirection.getOrientation(getBaseMetaTileEntity().getBackFacing()).offsetX; int zDir = ForgeDirection.getOrientation(getBaseMetaTileEntity().getBackFacing()).offsetZ; int yHead = getYOfPumpHead(); - if (yHead < 1) { + if (yHead <= 0) { return false; } if (getBaseMetaTileEntity().getBlock(getBaseMetaTileEntity().getXCoord() + xDir, yHead - 1, getBaseMetaTileEntity().getZCoord() + zDir) == Blocks.bedrock) { @@ -231,4 +230,41 @@ public class GT_MetaTileEntity_OilDrill extends GT_MetaTileEntity_MultiBlockBase return new GT_MetaTileEntity_OilDrill(this.mName); } -}
\ No newline at end of file + @Override + public String[] getInfoData() { + int mPollutionReduction=0; + for (GT_MetaTileEntity_Hatch_Muffler tHatch : mMufflerHatches) { + if (isValidMetaTileEntity(tHatch)) { + mPollutionReduction=Math.max(tHatch.calculatePollutionReduction(100),mPollutionReduction); + } + } + + long storedEnergy=0; + long maxEnergy=0; + for(GT_MetaTileEntity_Hatch_Energy tHatch : mEnergyHatches) { + if (isValidMetaTileEntity(tHatch)) { + storedEnergy+=tHatch.getBaseMetaTileEntity().getStoredEU(); + maxEnergy+=tHatch.getBaseMetaTileEntity().getEUCapacity(); + } + } + + return new String[]{ + "Progress:", + EnumChatFormatting.GREEN + Integer.toString(mProgresstime/20) + EnumChatFormatting.RESET +" s / "+ + EnumChatFormatting.YELLOW + Integer.toString(mMaxProgresstime/20) + EnumChatFormatting.RESET +" s", + "Stored Energy:", + EnumChatFormatting.GREEN + Long.toString(storedEnergy) + EnumChatFormatting.RESET +" EU / "+ + EnumChatFormatting.YELLOW + Long.toString(maxEnergy) + EnumChatFormatting.RESET +" EU", + "Probably uses: "+ + EnumChatFormatting.RED + Integer.toString(-mEUt) + EnumChatFormatting.RESET + " EU/t", + "Maximum total power (to all Energy Hatches, not single ones): ", + EnumChatFormatting.YELLOW+Long.toString(getMaxInputVoltage())+EnumChatFormatting.RESET+ " EU/t * 2A", + "Problems: "+ + EnumChatFormatting.RED+ (getIdealStatus() - getRepairStatus())+EnumChatFormatting.RESET+ + " Efficiency: "+ + EnumChatFormatting.YELLOW+Float.toString(mEfficiency / 100.0F)+EnumChatFormatting.RESET + " %", + "Pollution reduced to: "+ EnumChatFormatting.GREEN + mPollutionReduction+ EnumChatFormatting.RESET+" %", + "Extraction this cycle: "+ EnumChatFormatting.GOLD + extractionSpeed + EnumChatFormatting.RESET+" L" + }; + } +} diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ProcessingArray.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ProcessingArray.java index db8462f76b..cd7f6e08f6 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ProcessingArray.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ProcessingArray.java @@ -1,16 +1,20 @@ package gregtech.common.tileentities.machines.multi; import gregtech.api.GregTech_API; +import gregtech.api.enums.GT_Values; import gregtech.api.enums.Textures; import gregtech.api.gui.GT_GUIContainer_MultiMachine; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Energy; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; import gregtech.api.objects.GT_RenderedTexture; import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Utility; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumChatFormatting; import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.FluidStack; import org.apache.commons.lang3.ArrayUtils; @@ -24,7 +28,9 @@ import java.util.List; public class GT_MetaTileEntity_ProcessingArray extends GT_MetaTileEntity_MultiBlockBase { - GT_Recipe mLastRecipe; + private GT_Recipe mLastRecipe; + private int tTier = 0; + private int mMult = 0; public GT_MetaTileEntity_ProcessingArray(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional); @@ -47,8 +53,9 @@ public class GT_MetaTileEntity_ProcessingArray extends GT_MetaTileEntity_MultiBl "1x Output Hatch/Bus (Any casing)", "1x Maintenance Hatch (Any casing)", "1x Energy Hatch (Any casing)", - "Robust Tungstensteel Casings for the rest (16 at least!)", - "Place up to 16 Single Block GT Machines into the GUI Inventory"}; + "Robust Tungstensteel Casings for the rest (14 at least!)", + "Place up to 64 Single Block GT Machines into the GUI Inventory", + "Maximal overclockedness of machines inside: Tier 9"}; } public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { @@ -62,6 +69,29 @@ public class GT_MetaTileEntity_ProcessingArray extends GT_MetaTileEntity_MultiBl return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "ProcessingArray.png"); } + //TODO: Expand so it also does the non recipe map recipes + /* + public void remoteRecipeCheck() { + if (mInventory[1] == null) return; + String tmp = mInventory[1].getUnlocalizedName().replaceAll("gt.blockmachines.basicmachine.", ""); + if (tmp.startsWith("replicator")) { + + } else if (tmp.startsWith("brewery")) { + + } else if (tmp.startsWith("packer")) { + + } else if (tmp.startsWith("printer")) { + + } else if (tmp.startsWith("disassembler")) { + + } else if (tmp.startsWith("massfab")) { + + } else if (tmp.startsWith("scanner")) { + + } + } + */ + public GT_Recipe.GT_Recipe_Map getRecipeMap() { if (mInventory[1] == null) return null; String tmp = mInventory[1].getUnlocalizedName().replaceAll("gt.blockmachines.basicmachine.", ""); @@ -129,8 +159,22 @@ public class GT_MetaTileEntity_ProcessingArray extends GT_MetaTileEntity_MultiBl return GT_Recipe.GT_Recipe_Map.sUnboxinatorRecipes; } else if (tmp.startsWith("polarizer")) { return GT_Recipe.GT_Recipe_Map.sPolarizerRecipes; - } else if(tmp.startsWith("press")){ - return GT_Recipe.GT_Recipe_Map.sPressRecipes; + } else if (tmp.startsWith("plasmaarcfurnace")) { + return GT_Recipe.GT_Recipe_Map.sPlasmaArcFurnaceRecipes; + } else if (tmp.startsWith("printer")) { + return GT_Recipe.GT_Recipe_Map.sPrinterRecipes; + } else if (tmp.startsWith("press")) { + return GT_Recipe.GT_Recipe_Map.sPressRecipes; + } else if (tmp.startsWith("fluidcanner")) { + return GT_Recipe.GT_Recipe_Map.sFluidCannerRecipes; + } else if (tmp.startsWith("fluidheater")) { + return GT_Recipe.GT_Recipe_Map.sFluidHeaterRecipes; + } else if (tmp.startsWith("distillery")) { + return GT_Recipe.GT_Recipe_Map.sDistilleryRecipes; + } else if (tmp.startsWith("slicer")) { + return GT_Recipe.GT_Recipe_Map.sSlicerRecipes; + } else if (tmp.startsWith("amplifier")) { + return GT_Recipe.GT_Recipe_Map.sAmplifiers; } return null; @@ -147,7 +191,7 @@ public class GT_MetaTileEntity_ProcessingArray extends GT_MetaTileEntity_MultiBl return aFacing > 1; } - public String mMachine = ""; + private String mMachine = ""; public boolean checkRecipe(ItemStack aStack) { if (!isCorrectMachinePart(mInventory[1])) { return false; @@ -157,23 +201,49 @@ public class GT_MetaTileEntity_ProcessingArray extends GT_MetaTileEntity_MultiBl return false; } ArrayList<ItemStack> tInputList = getStoredInputs(); - int tTier = 0; - if (mInventory[1].getUnlocalizedName().endsWith("1")) { + + if (mInventory[1].getUnlocalizedName().endsWith("10")) { + tTier = 9; + mMult=2;//u need 4x less machines and they will use 4x less power + }else if (mInventory[1].getUnlocalizedName().endsWith("11")) { + tTier = 9; + mMult=4;//u need 16x less machines and they will use 16x less power + }else if (mInventory[1].getUnlocalizedName().endsWith("12") || + mInventory[1].getUnlocalizedName().endsWith("13") || + mInventory[1].getUnlocalizedName().endsWith("14") || + mInventory[1].getUnlocalizedName().endsWith("15")) { + tTier = 9; + mMult=6;//u need 64x less machines and they will use 64x less power + }else if (mInventory[1].getUnlocalizedName().endsWith("1")) { tTier = 1; + mMult=0;//*1 }else if (mInventory[1].getUnlocalizedName().endsWith("2")) { tTier = 2; + mMult=0;//*1 }else if (mInventory[1].getUnlocalizedName().endsWith("3")) { tTier = 3; + mMult=0;//*1 }else if (mInventory[1].getUnlocalizedName().endsWith("4")) { tTier = 4; + mMult=0;//*1 }else if (mInventory[1].getUnlocalizedName().endsWith("5")) { tTier = 5; + mMult=0;//*1 }else if (mInventory[1].getUnlocalizedName().endsWith("6")) { tTier = 6; + mMult=0;//*1 }else if (mInventory[1].getUnlocalizedName().endsWith("7")) { tTier = 7; + mMult=0;//*1 }else if (mInventory[1].getUnlocalizedName().endsWith("8")) { tTier = 8; + mMult=0;//*1 + }else if (mInventory[1].getUnlocalizedName().endsWith("9")) { + tTier = 9; + mMult=0;//*1 + }else{ + tTier = 0; + mMult=0;//*1 } if(!mMachine.equals(mInventory[1].getUnlocalizedName()))mLastRecipe=null; @@ -190,7 +260,7 @@ public class GT_MetaTileEntity_ProcessingArray extends GT_MetaTileEntity_MultiBl this.mEUt = 0; this.mOutputItems = null; this.mOutputFluids = null; - int machines = Math.min(16, mInventory[1].stackSize); + int machines = Math.min(64, mInventory[1].stackSize<<mMult); //Upped max Cap to 64 int i = 0; for (; i < machines; i++) { if (!tRecipe.isRecipeInputEqual(true, tFluids, tInputs)) { @@ -203,26 +273,23 @@ public class GT_MetaTileEntity_ProcessingArray extends GT_MetaTileEntity_MultiBl this.mMaxProgresstime = tRecipe.mDuration; this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); this.mEfficiencyIncrease = 10000; - if (tRecipe.mEUt <= 16) { - this.mEUt = (tRecipe.mEUt * (1 << tTier - 1) * (1 << tTier - 1)); - this.mMaxProgresstime = (tRecipe.mDuration / (1 << tTier - 1)); - } else { - this.mEUt = tRecipe.mEUt; - this.mMaxProgresstime = tRecipe.mDuration; - while (this.mEUt <= V[tTier - 1] * map.mAmperage) { - this.mEUt *= 4; - this.mMaxProgresstime /= 2; - } - } - this.mEUt *= i; + calculateOverclockedNessMulti(tRecipe.mEUt, tRecipe.mDuration, map.mAmperage, GT_Values.V[tTier]); + //In case recipe is too OP for that machine + if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1) + return false; + this.mEUt = GT_Utility.safeInt(((long)this.mEUt*i)>>mMult,1); + if (mEUt == Integer.MAX_VALUE - 1) + return false; + if (this.mEUt > 0) { this.mEUt = (-this.mEUt); } ItemStack[] tOut = new ItemStack[tRecipe.mOutputs.length]; for (int h = 0; h < tRecipe.mOutputs.length; h++) { - if(tRecipe.getOutput(h)!=null){ - tOut[h] = tRecipe.getOutput(h).copy(); - tOut[h].stackSize = 0;} + if(tRecipe.getOutput(h)!=null){ + tOut[h] = tRecipe.getOutput(h).copy(); + tOut[h].stackSize = 0; + } } FluidStack tFOut = null; if (tRecipe.getFluidOutput(0) != null) tFOut = tRecipe.getFluidOutput(0).copy(); @@ -238,16 +305,18 @@ public class GT_MetaTileEntity_ProcessingArray extends GT_MetaTileEntity_MultiBl int tSize = tFOut.amount; tFOut.amount = tSize * i; } - tOut = clean(tOut); + + tOut= clean(tOut); this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime); List<ItemStack> overStacks = new ArrayList<ItemStack>(); for (int f = 0; f < tOut.length; f++) { while (tOut[f].getMaxStackSize() < tOut[f].stackSize) { - if(tOut[f]!=null){ - ItemStack tmp = tOut[f].copy(); - tmp.stackSize = tmp.getMaxStackSize(); - tOut[f].stackSize = tOut[f].stackSize - tOut[f].getMaxStackSize(); - overStacks.add(tmp);} + if(tOut[f]!=null) { + ItemStack tmp = tOut[f].copy(); + tmp.stackSize = tmp.getMaxStackSize(); + tOut[f].stackSize = tOut[f].stackSize - tOut[f].getMaxStackSize(); + overStacks.add(tmp); + } } } if (overStacks.size() > 0) { @@ -264,12 +333,14 @@ public class GT_MetaTileEntity_ProcessingArray extends GT_MetaTileEntity_MultiBl this.mOutputFluids = new FluidStack[]{tFOut}; updateSlots(); return true; - } + }/* else{ + ...remoteRecipeCheck() + }*/ } return false; } - - public static ItemStack[] clean(final ItemStack[] v) { + + public static ItemStack[] clean(final ItemStack[] v){ List<ItemStack> list = new ArrayList<ItemStack>(Arrays.asList(v)); list.removeAll(Collections.singleton(null)); return list.toArray(new ItemStack[list.size()]); @@ -300,7 +371,7 @@ public class GT_MetaTileEntity_ProcessingArray extends GT_MetaTileEntity_MultiBl } } } - return tAmount >= 16; + return tAmount >= 14; } public int getMaxEfficiency(ItemStack aStack) { @@ -318,4 +389,40 @@ public class GT_MetaTileEntity_ProcessingArray extends GT_MetaTileEntity_MultiBl public boolean explodesOnComponentBreak(ItemStack aStack) { return false; } + + + @Override + public String[] getInfoData() { + long storedEnergy=0; + long maxEnergy=0; + for(GT_MetaTileEntity_Hatch_Energy tHatch : mEnergyHatches) { + if (isValidMetaTileEntity(tHatch)) { + storedEnergy+=tHatch.getBaseMetaTileEntity().getStoredEU(); + maxEnergy+=tHatch.getBaseMetaTileEntity().getEUCapacity(); + } + } + + return new String[]{ + "Progress:", + EnumChatFormatting.GREEN + Integer.toString(mProgresstime/20) + EnumChatFormatting.RESET +" s / "+ + EnumChatFormatting.YELLOW + Integer.toString(mMaxProgresstime/20) + EnumChatFormatting.RESET +" s", + "Stored Energy:", + EnumChatFormatting.GREEN + Long.toString(storedEnergy) + EnumChatFormatting.RESET +" EU / "+ + EnumChatFormatting.YELLOW + Long.toString(maxEnergy) + EnumChatFormatting.RESET +" EU", + "Probably uses: "+ + EnumChatFormatting.RED + Integer.toString(-mEUt) + EnumChatFormatting.RESET + " EU/t", + "Maximum total power (to all Energy Hatches, not single ones): ", + EnumChatFormatting.YELLOW+Long.toString(getMaxInputVoltage())+EnumChatFormatting.RESET+ " EU/t * 2A", + "Problems: "+ + EnumChatFormatting.RED+ (getIdealStatus() - getRepairStatus())+EnumChatFormatting.RESET+ + " Efficiency: "+ + EnumChatFormatting.YELLOW+Float.toString(mEfficiency / 100.0F)+EnumChatFormatting.RESET + " %", + "Machine tier installed: "+ + EnumChatFormatting.GREEN+tTier+EnumChatFormatting.RESET+ + " Discount: "+ + EnumChatFormatting.GREEN+(1<<mMult)+EnumChatFormatting.RESET + " x", + "Parallel processing: "+EnumChatFormatting.GREEN+(mInventory[1].stackSize<<mMult)+EnumChatFormatting.RESET + }; + } + } diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PyrolyseOven.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PyrolyseOven.java index c19307c43b..51285182d5 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PyrolyseOven.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PyrolyseOven.java @@ -1,7 +1,6 @@ package gregtech.common.tileentities.machines.multi; -import java.util.ArrayList; - +import com.dreammaster.gthandler.casings.GT_Container_CasingsNH; import gregtech.api.GregTech_API; import gregtech.api.enums.Textures; import gregtech.api.gui.GT_GUIContainer_MultiMachine; @@ -17,6 +16,9 @@ import net.minecraft.item.ItemStack; import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.FluidStack; +import java.util.ArrayList; +import java.util.Arrays; + public class GT_MetaTileEntity_PyrolyseOven extends GT_MetaTileEntity_MultiBlockBase { public GT_MetaTileEntity_PyrolyseOven(int aID, String aName, String aNameRegional) { @@ -33,21 +35,20 @@ public class GT_MetaTileEntity_PyrolyseOven extends GT_MetaTileEntity_MultiBlock "Industrial Charcoal producer and Oil from Plants", "Size(WxHxD): 5x4x5, Controller (Bottom center)", "3x1x3 Kanthal Heating Coils (Inside bottom 5x1x5 layer)", - "9x Kanthal Heating Coils (Centered 3x1x3 area in Bottom layer)", "1x Input Hatch/Bus (Centered 3x1x3 area in Top layer)", "1x Output Hatch/Bus (Any bottom layer casing)", "1x Maintenance Hatch (Any bottom layer casing)", "1x Muffler Hatch (Centered 3x1x3 area in Top layer)", "1x Energy Hatch (Any bottom layer casing)", - "ULV Machine Casings for the rest (60 at least!)"}; + "Pyrolyze Oven Casings for the rest (60 at least!)"}; } public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { if (aSide == aFacing) { - return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[0], + return new ITexture[]{new GT_RenderedTexture(Textures.BlockIcons.MACHINE_8V_SIDE), new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_PYROLYSE_OVEN_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_PYROLYSE_OVEN)}; } - return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[0]}; + return new ITexture[]{new GT_RenderedTexture(Textures.BlockIcons.MACHINE_8V_SIDE)}; } public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { @@ -57,41 +58,59 @@ public class GT_MetaTileEntity_PyrolyseOven extends GT_MetaTileEntity_MultiBlock @Override public boolean checkRecipe(ItemStack aStack) { ArrayList<ItemStack> tInputList = getStoredInputs(); - ArrayList<FluidStack> tFluidInputs = getStoredFluids(); - for (ItemStack tInput : tInputList) { - long tVoltage = getMaxInputVoltage(); - byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage)); - GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sPyrolyseRecipes.findRecipe(getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[tTier], tFluidInputs.isEmpty() ? null : new FluidStack[]{tFluidInputs.get(0)}, new ItemStack[]{mInventory[1], tInput}); - if (tRecipe != null) { - if (tRecipe.isRecipeInputEqual(true, tFluidInputs.isEmpty() ? null : new FluidStack[]{tFluidInputs.get(0)}, new ItemStack[]{tInput, mInventory[1]})) { - this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); - this.mEfficiencyIncrease = 10000; - - this.mEUt = tRecipe.mEUt; - this.mMaxProgresstime = tRecipe.mDuration; - if (tRecipe.mEUt <= 16) { - this.mEUt = (tRecipe.mEUt * (1 << tTier - 1) * (1 << tTier - 1)); - this.mMaxProgresstime = (tRecipe.mDuration / (1 << tTier - 1)); + int tInputList_sS=tInputList.size(); + for (int i = 0; i < tInputList_sS - 1; i++) { + for (int j = i + 1; j < tInputList_sS; j++) { + if (GT_Utility.areStacksEqual((ItemStack) tInputList.get(i), (ItemStack) tInputList.get(j))) { + if (((ItemStack) tInputList.get(i)).stackSize >= ((ItemStack) tInputList.get(j)).stackSize) { + tInputList.remove(j--); tInputList_sS=tInputList.size(); } else { - this.mEUt = tRecipe.mEUt; - this.mMaxProgresstime = tRecipe.mDuration; - while (this.mEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) { - this.mEUt *= 4; - this.mMaxProgresstime /= 2; - } + tInputList.remove(i--); tInputList_sS=tInputList.size(); + break; } - if (this.mEUt > 0) { - this.mEUt = (-this.mEUt); + } + } + } + ItemStack[] tInputs = (ItemStack[]) Arrays.copyOfRange(tInputList.toArray(new ItemStack[tInputList.size()]), 0, 2); + + ArrayList<FluidStack> tFluidList = getStoredFluids(); + int tFluidList_sS=tFluidList.size(); + for (int i = 0; i < tFluidList_sS - 1; i++) { + for (int j = i + 1; j < tFluidList_sS; j++) { + if (GT_Utility.areFluidsEqual((FluidStack) tFluidList.get(i), (FluidStack) tFluidList.get(j))) { + if (((FluidStack) tFluidList.get(i)).amount >= ((FluidStack) tFluidList.get(j)).amount) { + tFluidList.remove(j--); tFluidList_sS=tFluidList.size(); + } else { + tFluidList.remove(i--); tFluidList_sS=tFluidList.size(); + break; } - this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime); - if (tRecipe.mOutputs.length > 0) this.mOutputItems = new ItemStack[]{tRecipe.getOutput(0)}; - if (tRecipe.mFluidOutputs.length > 0) - this.mOutputFluids = new FluidStack[]{tRecipe.getFluidOutput(0)}; - updateSlots(); - return true; } } } + FluidStack[] tFluids = (FluidStack[]) Arrays.copyOfRange(tFluidList.toArray(new FluidStack[tInputList.size()]), 0, 1); + + if (tInputList.size() > 0) { + long tVoltage = getMaxInputVoltage(); + byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage)); + GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sPyrolyseRecipes.findRecipe(getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[tTier], tFluids, tInputs); + if (tRecipe != null && tRecipe.isRecipeInputEqual(true, tFluids, tInputs)) { + this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); + this.mEfficiencyIncrease = 10000; + + calculateOverclockedNessMulti(tRecipe.mEUt, tRecipe.mDuration, 1, tVoltage); + //In case recipe is too OP for that machine + if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1) + return false; + if (this.mEUt > 0) { + this.mEUt = (-this.mEUt); + } + if (tRecipe.mOutputs.length > 0) this.mOutputItems = new ItemStack[]{tRecipe.getOutput(0)}; + if (tRecipe.mFluidOutputs.length > 0) + this.mOutputFluids = new FluidStack[]{tRecipe.getFluidOutput(0)}; + updateSlots(); + return true; + } + } return false; } @@ -114,10 +133,10 @@ public class GT_MetaTileEntity_PyrolyseOven extends GT_MetaTileEntity_MultiBlock } } else if (h == 3) {// innen decke (ulv casings + input + muffler) if ((!addInputToMachineList(tTileEntity, 120)) && (!addMufflerToMachineList(tTileEntity, 120))) { - if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) != GregTech_API.sBlockCasings1) { + if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) != GT_Container_CasingsNH.sBlockCasingsNH) { return false; } - if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j) != 0) { + if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j) != 2) { return false; } } @@ -130,19 +149,19 @@ public class GT_MetaTileEntity_PyrolyseOven extends GT_MetaTileEntity_MultiBlock if (h == 0) {// au�en boden (controller, output, energy, maintainance, rest ulv casings) if ((!addMaintenanceToMachineList(tTileEntity, 120)) && (!addOutputToMachineList(tTileEntity, 120)) && (!addEnergyInputToMachineList(tTileEntity, 120))) { if ((xDir + i != 0) || (zDir + j != 0)) {//no controller - if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) != GregTech_API.sBlockCasings1) { + if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) != GT_Container_CasingsNH.sBlockCasingsNH) { return false; } - if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j) != 0) { + if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j) != 2) { return false; } } } } else {// au�en �ber boden (ulv casings) - if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) != GregTech_API.sBlockCasings1) { + if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) != GT_Container_CasingsNH.sBlockCasingsNH) { return false; } - if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j) != 0) { + if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j) != 2) { return false; } } @@ -165,7 +184,7 @@ public class GT_MetaTileEntity_PyrolyseOven extends GT_MetaTileEntity_MultiBlock @Override public int getPollutionPerTick(ItemStack aStack) { - return 20; + return 30; } @Override diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_VacuumFreezer.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_VacuumFreezer.java index e6b3992a9c..9979446c09 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_VacuumFreezer.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_VacuumFreezer.java @@ -76,17 +76,11 @@ public class GT_MetaTileEntity_VacuumFreezer if (tRecipe.isRecipeInputEqual(true, null, new ItemStack[]{tInput})) {
this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000);
this.mEfficiencyIncrease = 10000;
- if (tRecipe.mEUt <= 16) {
- this.mEUt = (tRecipe.mEUt * (1 << tTier - 1) * (1 << tTier - 1));
- this.mMaxProgresstime = (tRecipe.mDuration / (1 << tTier - 1));
- } else {
- this.mEUt = tRecipe.mEUt;
- this.mMaxProgresstime = tRecipe.mDuration;
- while (this.mEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) {
- this.mEUt *= 4;
- this.mMaxProgresstime /= 2;
- }
- }
+
+ calculateOverclockedNessMulti(tRecipe.mEUt, tRecipe.mDuration, 1, tVoltage);
+ //In case recipe is too OP for that machine
+ if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1)
+ return false;
if (this.mEUt > 0) {
this.mEUt = (-this.mEUt);
}
@@ -143,4 +137,4 @@ public class GT_MetaTileEntity_VacuumFreezer public boolean explodesOnComponentBreak(ItemStack aStack) {
return false;
}
-}
\ No newline at end of file +}
diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_AlloySmelter_Bronze.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_AlloySmelter_Bronze.java index 0635cb4255..68cdb365ef 100644 --- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_AlloySmelter_Bronze.java +++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_AlloySmelter_Bronze.java @@ -1,86 +1,86 @@ -package gregtech.common.tileentities.machines.steam;
-
-import gregtech.api.GregTech_API;
-import gregtech.api.enums.Textures;
-import gregtech.api.gui.GT_GUIContainer_BasicMachine;
-import gregtech.api.interfaces.ITexture;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.metatileentity.MetaTileEntity;
-import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine_Bronze;
-import gregtech.api.objects.GT_RenderedTexture;
-import gregtech.api.util.GT_Recipe;
-import gregtech.api.util.GT_Utility;
-import net.minecraft.entity.player.InventoryPlayer;
-
-public class GT_MetaTileEntity_AlloySmelter_Bronze
- extends GT_MetaTileEntity_BasicMachine_Bronze {
- public GT_MetaTileEntity_AlloySmelter_Bronze(int aID, String aName, String aNameRegional) {
- super(aID, aName, aNameRegional, "Combination Smelter", 2, 1, true);
- }
-
- public GT_MetaTileEntity_AlloySmelter_Bronze(String aName, String aDescription, ITexture[][][] aTextures) {
- super(aName, aDescription, aTextures, 2, 1, true);
- }
-
- public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
- return new GT_MetaTileEntity_AlloySmelter_Bronze(this.mName, this.mDescription, this.mTextures);
- }
-
- public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- return new GT_GUIContainer_BasicMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "BronzeAlloySmelter.png", GT_Recipe.GT_Recipe_Map.sAlloySmelterRecipes.mUnlocalizedName);
- }
-
- public int checkRecipe() {
- GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sAlloySmelterRecipes.findRecipe(getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[1], null, getAllInputs());
- if ((tRecipe != null) && (canOutput(tRecipe.mOutputs)) && (tRecipe.isRecipeInputEqual(true, null, getAllInputs()))) {
- this.mOutputItems[0] = tRecipe.getOutput(0);
- this.mEUt = tRecipe.mEUt;
- this.mMaxProgresstime = (tRecipe.mDuration * 2);
- return 2;
- }
- return 0;
- }
-
- public void startSoundLoop(byte aIndex, double aX, double aY, double aZ) {
- super.startSoundLoop(aIndex, aX, aY, aZ);
- if (aIndex == 1) {
- GT_Utility.doSoundAtClient((String) GregTech_API.sSoundList.get(Integer.valueOf(208)), 10, 1.0F, aX, aY, aZ);
- }
- }
-
- public void startProcess() {
- sendLoopStart((byte) 1);
- }
-
- public ITexture[] getSideFacingActive(byte aColor) {
- return new ITexture[]{super.getSideFacingActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_STEAM_ALLOY_SMELTER_ACTIVE)};
- }
-
- public ITexture[] getSideFacingInactive(byte aColor) {
- return new ITexture[]{super.getSideFacingInactive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_STEAM_ALLOY_SMELTER)};
- }
-
- public ITexture[] getFrontFacingActive(byte aColor) {
- return new ITexture[]{super.getFrontFacingActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_STEAM_ALLOY_SMELTER_ACTIVE)};
- }
-
- public ITexture[] getFrontFacingInactive(byte aColor) {
- return new ITexture[]{super.getFrontFacingInactive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_STEAM_ALLOY_SMELTER)};
- }
-
- public ITexture[] getTopFacingActive(byte aColor) {
- return new ITexture[]{super.getTopFacingActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_STEAM_ALLOY_SMELTER_ACTIVE)};
- }
-
- public ITexture[] getTopFacingInactive(byte aColor) {
- return new ITexture[]{super.getTopFacingInactive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_STEAM_ALLOY_SMELTER)};
- }
-
- public ITexture[] getBottomFacingActive(byte aColor) {
- return new ITexture[]{super.getBottomFacingActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_ALLOY_SMELTER_ACTIVE)};
- }
-
- public ITexture[] getBottomFacingInactive(byte aColor) {
- return new ITexture[]{super.getBottomFacingInactive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_ALLOY_SMELTER)};
- }
-}
+package gregtech.common.tileentities.machines.steam; + +import gregtech.api.GregTech_API; +import gregtech.api.enums.Textures; +import gregtech.api.gui.GT_GUIContainer_BasicMachine; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine_Bronze; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Utility; +import net.minecraft.entity.player.InventoryPlayer; + +public class GT_MetaTileEntity_AlloySmelter_Bronze + extends GT_MetaTileEntity_BasicMachine_Bronze { + public GT_MetaTileEntity_AlloySmelter_Bronze(int aID, String aName, String aNameRegional) { + super(aID, aName, aNameRegional, "Combination Smelter", 2, 1, true); + } + + public GT_MetaTileEntity_AlloySmelter_Bronze(String aName, String aDescription, ITexture[][][] aTextures) { + super(aName, aDescription, aTextures, 2, 1, true); + } + + public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_AlloySmelter_Bronze(this.mName, this.mDescription, this.mTextures); + } + + public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + return new GT_GUIContainer_BasicMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "BronzeAlloySmelter.png", GT_Recipe.GT_Recipe_Map.sAlloySmelterRecipes.mUnlocalizedName); + } + + public int checkRecipe() { + GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sAlloySmelterRecipes.findRecipe(getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[1], null, getAllInputs()); + if ((tRecipe != null) && (canOutput(tRecipe.mOutputs)) && (tRecipe.isRecipeInputEqual(true, null, getAllInputs()))) { + this.mOutputItems[0] = tRecipe.getOutput(0); + this.mEUt = tRecipe.mEUt; + this.mMaxProgresstime = (tRecipe.mDuration * 2); + return 2; + } + return 0; + } + + public void startSoundLoop(byte aIndex, double aX, double aY, double aZ) { + super.startSoundLoop(aIndex, aX, aY, aZ); + if (aIndex == 1) { + GT_Utility.doSoundAtClient((String) GregTech_API.sSoundList.get(Integer.valueOf(208)), 10, 1.0F, aX, aY, aZ); + } + } + + public void startProcess() { + sendLoopStart((byte) 1); + } + + public ITexture[] getSideFacingActive(byte aColor) { + return new ITexture[]{super.getSideFacingActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_STEAM_ALLOY_SMELTER_ACTIVE)}; + } + + public ITexture[] getSideFacingInactive(byte aColor) { + return new ITexture[]{super.getSideFacingInactive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_STEAM_ALLOY_SMELTER)}; + } + + public ITexture[] getFrontFacingActive(byte aColor) { + return new ITexture[]{super.getFrontFacingActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_STEAM_ALLOY_SMELTER_ACTIVE)}; + } + + public ITexture[] getFrontFacingInactive(byte aColor) { + return new ITexture[]{super.getFrontFacingInactive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_STEAM_ALLOY_SMELTER)}; + } + + public ITexture[] getTopFacingActive(byte aColor) { + return new ITexture[]{super.getTopFacingActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_STEAM_ALLOY_SMELTER_ACTIVE)}; + } + + public ITexture[] getTopFacingInactive(byte aColor) { + return new ITexture[]{super.getTopFacingInactive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_STEAM_ALLOY_SMELTER)}; + } + + public ITexture[] getBottomFacingActive(byte aColor) { + return new ITexture[]{super.getBottomFacingActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_ALLOY_SMELTER_ACTIVE)}; + } + + public ITexture[] getBottomFacingInactive(byte aColor) { + return new ITexture[]{super.getBottomFacingInactive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_ALLOY_SMELTER)}; + } +} diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_AlloySmelter_Steel.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_AlloySmelter_Steel.java index a93d1fbf8a..03c16fa69d 100644 --- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_AlloySmelter_Steel.java +++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_AlloySmelter_Steel.java @@ -1,86 +1,86 @@ -package gregtech.common.tileentities.machines.steam;
-
-import gregtech.api.GregTech_API;
-import gregtech.api.enums.Textures;
-import gregtech.api.gui.GT_GUIContainer_BasicMachine;
-import gregtech.api.interfaces.ITexture;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.metatileentity.MetaTileEntity;
-import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine_Steel;
-import gregtech.api.objects.GT_RenderedTexture;
-import gregtech.api.util.GT_Recipe;
-import gregtech.api.util.GT_Utility;
-import net.minecraft.entity.player.InventoryPlayer;
-
-public class GT_MetaTileEntity_AlloySmelter_Steel
- extends GT_MetaTileEntity_BasicMachine_Steel {
- public GT_MetaTileEntity_AlloySmelter_Steel(int aID, String aName, String aNameRegional) {
- super(aID, aName, aNameRegional, "Combination Smelter", 2, 1, true);
- }
-
- public GT_MetaTileEntity_AlloySmelter_Steel(String aName, String aDescription, ITexture[][][] aTextures) {
- super(aName, aDescription, aTextures, 2, 1, true);
- }
-
- public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
- return new GT_MetaTileEntity_AlloySmelter_Steel(this.mName, this.mDescription, this.mTextures);
- }
-
- public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- return new GT_GUIContainer_BasicMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "SteelAlloySmelter.png", GT_Recipe.GT_Recipe_Map.sAlloySmelterRecipes.mUnlocalizedName);
- }
-
- public int checkRecipe() {
- GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sAlloySmelterRecipes.findRecipe(getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[2], null, getAllInputs());
- if ((tRecipe != null) && (canOutput(tRecipe.mOutputs)) && (tRecipe.isRecipeInputEqual(true, null, getAllInputs()))) {
- this.mOutputItems[0] = tRecipe.getOutput(0);
- this.mEUt = (tRecipe.mEUt * 3);
- this.mMaxProgresstime = tRecipe.mDuration;
- return 2;
- }
- return 0;
- }
-
- public void startSoundLoop(byte aIndex, double aX, double aY, double aZ) {
- super.startSoundLoop(aIndex, aX, aY, aZ);
- if (aIndex == 1) {
- GT_Utility.doSoundAtClient((String) GregTech_API.sSoundList.get(Integer.valueOf(208)), 10, 1.0F, aX, aY, aZ);
- }
- }
-
- public void startProcess() {
- sendLoopStart((byte) 1);
- }
-
- public ITexture[] getSideFacingActive(byte aColor) {
- return new ITexture[]{super.getSideFacingActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_STEAM_ALLOY_SMELTER_ACTIVE)};
- }
-
- public ITexture[] getSideFacingInactive(byte aColor) {
- return new ITexture[]{super.getSideFacingInactive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_STEAM_ALLOY_SMELTER)};
- }
-
- public ITexture[] getFrontFacingActive(byte aColor) {
- return new ITexture[]{super.getFrontFacingActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_STEAM_ALLOY_SMELTER_ACTIVE)};
- }
-
- public ITexture[] getFrontFacingInactive(byte aColor) {
- return new ITexture[]{super.getFrontFacingInactive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_STEAM_ALLOY_SMELTER)};
- }
-
- public ITexture[] getTopFacingActive(byte aColor) {
- return new ITexture[]{super.getTopFacingActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_STEAM_ALLOY_SMELTER_ACTIVE)};
- }
-
- public ITexture[] getTopFacingInactive(byte aColor) {
- return new ITexture[]{super.getTopFacingInactive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_STEAM_ALLOY_SMELTER)};
- }
-
- public ITexture[] getBottomFacingActive(byte aColor) {
- return new ITexture[]{super.getBottomFacingActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_ALLOY_SMELTER_ACTIVE)};
- }
-
- public ITexture[] getBottomFacingInactive(byte aColor) {
- return new ITexture[]{super.getBottomFacingInactive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_ALLOY_SMELTER)};
- }
-}
+package gregtech.common.tileentities.machines.steam; + +import gregtech.api.GregTech_API; +import gregtech.api.enums.Textures; +import gregtech.api.gui.GT_GUIContainer_BasicMachine; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine_Steel; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Utility; +import net.minecraft.entity.player.InventoryPlayer; + +public class GT_MetaTileEntity_AlloySmelter_Steel + extends GT_MetaTileEntity_BasicMachine_Steel { + public GT_MetaTileEntity_AlloySmelter_Steel(int aID, String aName, String aNameRegional) { + super(aID, aName, aNameRegional, "Combination Smelter", 2, 1, true); + } + + public GT_MetaTileEntity_AlloySmelter_Steel(String aName, String aDescription, ITexture[][][] aTextures) { + super(aName, aDescription, aTextures, 2, 1, true); + } + + public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_AlloySmelter_Steel(this.mName, this.mDescription, this.mTextures); + } + + public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + return new GT_GUIContainer_BasicMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "SteelAlloySmelter.png", GT_Recipe.GT_Recipe_Map.sAlloySmelterRecipes.mUnlocalizedName); + } + + public int checkRecipe() { + GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sAlloySmelterRecipes.findRecipe(getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[2], null, getAllInputs()); + if ((tRecipe != null) && (canOutput(tRecipe.mOutputs)) && (tRecipe.isRecipeInputEqual(true, null, getAllInputs()))) { + this.mOutputItems[0] = tRecipe.getOutput(0); + this.mEUt = (tRecipe.mEUt * 3); + this.mMaxProgresstime = tRecipe.mDuration; + return 2; + } + return 0; + } + + public void startSoundLoop(byte aIndex, double aX, double aY, double aZ) { + super.startSoundLoop(aIndex, aX, aY, aZ); + if (aIndex == 1) { + GT_Utility.doSoundAtClient((String) GregTech_API.sSoundList.get(Integer.valueOf(208)), 10, 1.0F, aX, aY, aZ); + } + } + + public void startProcess() { + sendLoopStart((byte) 1); + } + + public ITexture[] getSideFacingActive(byte aColor) { + return new ITexture[]{super.getSideFacingActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_STEAM_ALLOY_SMELTER_ACTIVE)}; + } + + public ITexture[] getSideFacingInactive(byte aColor) { + return new ITexture[]{super.getSideFacingInactive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_STEAM_ALLOY_SMELTER)}; + } + + public ITexture[] getFrontFacingActive(byte aColor) { + return new ITexture[]{super.getFrontFacingActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_STEAM_ALLOY_SMELTER_ACTIVE)}; + } + + public ITexture[] getFrontFacingInactive(byte aColor) { + return new ITexture[]{super.getFrontFacingInactive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_STEAM_ALLOY_SMELTER)}; + } + + public ITexture[] getTopFacingActive(byte aColor) { + return new ITexture[]{super.getTopFacingActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_STEAM_ALLOY_SMELTER_ACTIVE)}; + } + + public ITexture[] getTopFacingInactive(byte aColor) { + return new ITexture[]{super.getTopFacingInactive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_STEAM_ALLOY_SMELTER)}; + } + + public ITexture[] getBottomFacingActive(byte aColor) { + return new ITexture[]{super.getBottomFacingActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_ALLOY_SMELTER_ACTIVE)}; + } + + public ITexture[] getBottomFacingInactive(byte aColor) { + return new ITexture[]{super.getBottomFacingInactive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_ALLOY_SMELTER)}; + } +} diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Compressor_Bronze.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Compressor_Bronze.java index cdf47fde88..8a18d8533a 100644 --- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Compressor_Bronze.java +++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Compressor_Bronze.java @@ -43,6 +43,13 @@ public class GT_MetaTileEntity_Compressor_Bronze return 0;
}
+ //public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {//GOT DISABLED?
+ // if (!super.allowPutStack(aBaseMetaTileEntity, aIndex, aSide, aStack)) {
+ // return false;
+ // }
+ // return GT_ModHandler.getCompressorOutput(GT_Utility.copyAmount(64L, new Object[]{aStack}), false, null) != null;
+ //}
+
public void startSoundLoop(byte aIndex, double aX, double aY, double aZ) {
super.startSoundLoop(aIndex, aX, aY, aZ);
if (aIndex == 1) {
diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Compressor_Steel.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Compressor_Steel.java index 12a01d008b..2d49e2af54 100644 --- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Compressor_Steel.java +++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Compressor_Steel.java @@ -42,6 +42,13 @@ public class GT_MetaTileEntity_Compressor_Steel }
return 0;
}
+ //TODO CHECK IF CAN BE RE ENABLED
+ //public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
+ // if (!super.allowPutStack(aBaseMetaTileEntity, aIndex, aSide, aStack)) {
+ // return false;
+ // }
+ // return GT_ModHandler.getCompressorOutput(GT_Utility.copyAmount(64L, new Object[]{aStack}), false, null) != null;
+ //}
public void startSoundLoop(byte aIndex, double aX, double aY, double aZ) {
super.startSoundLoop(aIndex, aX, aY, aZ);
diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Extractor_Bronze.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Extractor_Bronze.java index 772072e497..5667fda96a 100644 --- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Extractor_Bronze.java +++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Extractor_Bronze.java @@ -42,6 +42,13 @@ public class GT_MetaTileEntity_Extractor_Bronze }
return 0;
}
+ //TODO RE ENABLE?
+ //public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
+ // if (!super.allowPutStack(aBaseMetaTileEntity, aIndex, aSide, aStack)) {
+ // return false;
+ // }
+ // return GT_ModHandler.getExtractorOutput(GT_Utility.copyAmount(64L, new Object[]{aStack}), false, null) != null;
+ //}
public void startSoundLoop(byte aIndex, double aX, double aY, double aZ) {
super.startSoundLoop(aIndex, aX, aY, aZ);
diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Extractor_Steel.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Extractor_Steel.java index f4149f45a3..1b712c2ea1 100644 --- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Extractor_Steel.java +++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Extractor_Steel.java @@ -42,6 +42,13 @@ public class GT_MetaTileEntity_Extractor_Steel }
return 0;
}
+ //TODO CHECK???
+ //public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
+ // if (!super.allowPutStack(aBaseMetaTileEntity, aIndex, aSide, aStack)) {
+ // return false;
+ // }
+ // return GT_ModHandler.getExtractorOutput(GT_Utility.copyAmount(64L, new Object[]{aStack}), false, null) != null;
+ //}
public void startSoundLoop(byte aIndex, double aX, double aY, double aZ) {
super.startSoundLoop(aIndex, aX, aY, aZ);
diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_ForgeHammer_Bronze.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_ForgeHammer_Bronze.java index 9ea2efe69d..365a0308c9 100644 --- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_ForgeHammer_Bronze.java +++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_ForgeHammer_Bronze.java @@ -1,86 +1,86 @@ -package gregtech.common.tileentities.machines.steam;
-
-import gregtech.api.GregTech_API;
-import gregtech.api.enums.Textures;
-import gregtech.api.gui.GT_GUIContainer_BasicMachine;
-import gregtech.api.interfaces.ITexture;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.metatileentity.MetaTileEntity;
-import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine_Bronze;
-import gregtech.api.objects.GT_RenderedTexture;
-import gregtech.api.util.GT_Recipe;
-import gregtech.api.util.GT_Utility;
-import net.minecraft.entity.player.InventoryPlayer;
-
-public class GT_MetaTileEntity_ForgeHammer_Bronze
- extends GT_MetaTileEntity_BasicMachine_Bronze {
- public GT_MetaTileEntity_ForgeHammer_Bronze(int aID, String aName, String aNameRegional) {
- super(aID, aName, aNameRegional, "Forge Hammer", 1, 1, false);
- }
-
- public GT_MetaTileEntity_ForgeHammer_Bronze(String aName, String aDescription, ITexture[][][] aTextures) {
- super(aName, aDescription, aTextures, 1, 1, false);
- }
-
- public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
- return new GT_MetaTileEntity_ForgeHammer_Bronze(this.mName, this.mDescription, this.mTextures);
- }
-
- public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- return new GT_GUIContainer_BasicMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "BronzeHammer.png", GT_Recipe.GT_Recipe_Map.sHammerRecipes.mUnlocalizedName, (byte) 6, (byte) 3);
- }
-
- public int checkRecipe() {
- GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sHammerRecipes.findRecipe(getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[1], null, getAllInputs());
- if ((tRecipe != null) && (canOutput(tRecipe.mOutputs)) && (tRecipe.isRecipeInputEqual(true, null, getAllInputs()))) {
- this.mOutputItems[0] = tRecipe.getOutput(0);
- this.mEUt = tRecipe.mEUt;
- this.mMaxProgresstime = (tRecipe.mDuration * 2);
- return 2;
- }
- return 0;
- }
-
- public void startSoundLoop(byte aIndex, double aX, double aY, double aZ) {
- super.startSoundLoop(aIndex, aX, aY, aZ);
- if (aIndex == 1) {
- GT_Utility.doSoundAtClient((String) GregTech_API.sSoundList.get(Integer.valueOf(1)), 10, 1.0F, aX, aY, aZ);
- }
- }
-
- public void startProcess() {
- sendLoopStart((byte) 1);
- }
-
- public ITexture[] getSideFacingActive(byte aColor) {
- return new ITexture[]{super.getSideFacingActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_STEAM_HAMMER_ACTIVE)};
- }
-
- public ITexture[] getSideFacingInactive(byte aColor) {
- return new ITexture[]{super.getSideFacingInactive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_STEAM_HAMMER)};
- }
-
- public ITexture[] getFrontFacingActive(byte aColor) {
- return new ITexture[]{super.getFrontFacingActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_STEAM_HAMMER_ACTIVE)};
- }
-
- public ITexture[] getFrontFacingInactive(byte aColor) {
- return new ITexture[]{super.getFrontFacingInactive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_STEAM_HAMMER)};
- }
-
- public ITexture[] getTopFacingActive(byte aColor) {
- return new ITexture[]{super.getTopFacingActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_STEAM_HAMMER_ACTIVE)};
- }
-
- public ITexture[] getTopFacingInactive(byte aColor) {
- return new ITexture[]{super.getTopFacingInactive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_STEAM_HAMMER)};
- }
-
- public ITexture[] getBottomFacingActive(byte aColor) {
- return new ITexture[]{super.getBottomFacingActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_HAMMER_ACTIVE)};
- }
-
- public ITexture[] getBottomFacingInactive(byte aColor) {
- return new ITexture[]{super.getBottomFacingInactive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_HAMMER)};
- }
-}
+package gregtech.common.tileentities.machines.steam; + +import gregtech.api.GregTech_API; +import gregtech.api.enums.Textures; +import gregtech.api.gui.GT_GUIContainer_BasicMachine; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine_Bronze; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Utility; +import net.minecraft.entity.player.InventoryPlayer; + +public class GT_MetaTileEntity_ForgeHammer_Bronze + extends GT_MetaTileEntity_BasicMachine_Bronze { + public GT_MetaTileEntity_ForgeHammer_Bronze(int aID, String aName, String aNameRegional) { + super(aID, aName, aNameRegional, "Forge Hammer", 1, 1, false); + } + + public GT_MetaTileEntity_ForgeHammer_Bronze(String aName, String aDescription, ITexture[][][] aTextures) { + super(aName, aDescription, aTextures, 1, 1, false); + } + + public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_ForgeHammer_Bronze(this.mName, this.mDescription, this.mTextures); + } + + public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + return new GT_GUIContainer_BasicMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "BronzeHammer.png", GT_Recipe.GT_Recipe_Map.sHammerRecipes.mUnlocalizedName, (byte) 6, (byte) 3); + } + + public int checkRecipe() { + GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sHammerRecipes.findRecipe(getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[1], null, getAllInputs()); + if ((tRecipe != null) && (canOutput(tRecipe.mOutputs)) && (tRecipe.isRecipeInputEqual(true, null, getAllInputs()))) { + this.mOutputItems[0] = tRecipe.getOutput(0); + this.mEUt = tRecipe.mEUt; + this.mMaxProgresstime = (tRecipe.mDuration * 2); + return 2; + } + return 0; + } + + public void startSoundLoop(byte aIndex, double aX, double aY, double aZ) { + super.startSoundLoop(aIndex, aX, aY, aZ); + if (aIndex == 1) { + GT_Utility.doSoundAtClient((String) GregTech_API.sSoundList.get(Integer.valueOf(1)), 10, 1.0F, aX, aY, aZ); + } + } + + public void startProcess() { + sendLoopStart((byte) 1); + } + + public ITexture[] getSideFacingActive(byte aColor) { + return new ITexture[]{super.getSideFacingActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_STEAM_HAMMER_ACTIVE)}; + } + + public ITexture[] getSideFacingInactive(byte aColor) { + return new ITexture[]{super.getSideFacingInactive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_STEAM_HAMMER)}; + } + + public ITexture[] getFrontFacingActive(byte aColor) { + return new ITexture[]{super.getFrontFacingActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_STEAM_HAMMER_ACTIVE)}; + } + + public ITexture[] getFrontFacingInactive(byte aColor) { + return new ITexture[]{super.getFrontFacingInactive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_STEAM_HAMMER)}; + } + + public ITexture[] getTopFacingActive(byte aColor) { + return new ITexture[]{super.getTopFacingActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_STEAM_HAMMER_ACTIVE)}; + } + + public ITexture[] getTopFacingInactive(byte aColor) { + return new ITexture[]{super.getTopFacingInactive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_STEAM_HAMMER)}; + } + + public ITexture[] getBottomFacingActive(byte aColor) { + return new ITexture[]{super.getBottomFacingActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_HAMMER_ACTIVE)}; + } + + public ITexture[] getBottomFacingInactive(byte aColor) { + return new ITexture[]{super.getBottomFacingInactive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_HAMMER)}; + } +} diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_ForgeHammer_Steel.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_ForgeHammer_Steel.java index 63f99c60b4..e0dcb2efd2 100644 --- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_ForgeHammer_Steel.java +++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_ForgeHammer_Steel.java @@ -1,86 +1,86 @@ -package gregtech.common.tileentities.machines.steam;
-
-import gregtech.api.GregTech_API;
-import gregtech.api.enums.Textures;
-import gregtech.api.gui.GT_GUIContainer_BasicMachine;
-import gregtech.api.interfaces.ITexture;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.metatileentity.MetaTileEntity;
-import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine_Steel;
-import gregtech.api.objects.GT_RenderedTexture;
-import gregtech.api.util.GT_Recipe;
-import gregtech.api.util.GT_Utility;
-import net.minecraft.entity.player.InventoryPlayer;
-
-public class GT_MetaTileEntity_ForgeHammer_Steel
- extends GT_MetaTileEntity_BasicMachine_Steel {
- public GT_MetaTileEntity_ForgeHammer_Steel(int aID, String aName, String aNameRegional) {
- super(aID, aName, aNameRegional, "Forge Hammer", 1, 1, false);
- }
-
- public GT_MetaTileEntity_ForgeHammer_Steel(String aName, String aDescription, ITexture[][][] aTextures) {
- super(aName, aDescription, aTextures, 1, 1, false);
- }
-
- public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
- return new GT_MetaTileEntity_ForgeHammer_Steel(this.mName, this.mDescription, this.mTextures);
- }
-
- public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- return new GT_GUIContainer_BasicMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "SteelHammer.png", GT_Recipe.GT_Recipe_Map.sHammerRecipes.mUnlocalizedName, (byte) 6, (byte) 3);
- }
-
- public int checkRecipe() {
- GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sHammerRecipes.findRecipe(getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[2], null, getAllInputs());
- if ((tRecipe != null) && (canOutput(tRecipe.mOutputs)) && (tRecipe.isRecipeInputEqual(true, null, getAllInputs()))) {
- this.mOutputItems[0] = tRecipe.getOutput(0);
- this.mEUt = (tRecipe.mEUt * 3);
- this.mMaxProgresstime = tRecipe.mDuration;
- return 2;
- }
- return 0;
- }
-
- public void startSoundLoop(byte aIndex, double aX, double aY, double aZ) {
- super.startSoundLoop(aIndex, aX, aY, aZ);
- if (aIndex == 1) {
- GT_Utility.doSoundAtClient((String) GregTech_API.sSoundList.get(Integer.valueOf(1)), 10, 1.0F, aX, aY, aZ);
- }
- }
-
- public void startProcess() {
- sendLoopStart((byte) 1);
- }
-
- public ITexture[] getSideFacingActive(byte aColor) {
- return new ITexture[]{super.getSideFacingActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_STEAM_HAMMER_ACTIVE)};
- }
-
- public ITexture[] getSideFacingInactive(byte aColor) {
- return new ITexture[]{super.getSideFacingInactive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_STEAM_HAMMER)};
- }
-
- public ITexture[] getFrontFacingActive(byte aColor) {
- return new ITexture[]{super.getFrontFacingActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_STEAM_HAMMER_ACTIVE)};
- }
-
- public ITexture[] getFrontFacingInactive(byte aColor) {
- return new ITexture[]{super.getFrontFacingInactive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_STEAM_HAMMER)};
- }
-
- public ITexture[] getTopFacingActive(byte aColor) {
- return new ITexture[]{super.getTopFacingActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_STEAM_HAMMER_ACTIVE)};
- }
-
- public ITexture[] getTopFacingInactive(byte aColor) {
- return new ITexture[]{super.getTopFacingInactive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_STEAM_HAMMER)};
- }
-
- public ITexture[] getBottomFacingActive(byte aColor) {
- return new ITexture[]{super.getBottomFacingActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_HAMMER_ACTIVE)};
- }
-
- public ITexture[] getBottomFacingInactive(byte aColor) {
- return new ITexture[]{super.getBottomFacingInactive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_HAMMER)};
- }
-}
+package gregtech.common.tileentities.machines.steam; + +import gregtech.api.GregTech_API; +import gregtech.api.enums.Textures; +import gregtech.api.gui.GT_GUIContainer_BasicMachine; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine_Steel; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Utility; +import net.minecraft.entity.player.InventoryPlayer; + +public class GT_MetaTileEntity_ForgeHammer_Steel + extends GT_MetaTileEntity_BasicMachine_Steel { + public GT_MetaTileEntity_ForgeHammer_Steel(int aID, String aName, String aNameRegional) { + super(aID, aName, aNameRegional, "Forge Hammer", 1, 1, false); + } + + public GT_MetaTileEntity_ForgeHammer_Steel(String aName, String aDescription, ITexture[][][] aTextures) { + super(aName, aDescription, aTextures, 1, 1, false); + } + + public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_ForgeHammer_Steel(this.mName, this.mDescription, this.mTextures); + } + + public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + return new GT_GUIContainer_BasicMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "SteelHammer.png", GT_Recipe.GT_Recipe_Map.sHammerRecipes.mUnlocalizedName, (byte) 6, (byte) 3); + } + + public int checkRecipe() { + GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sHammerRecipes.findRecipe(getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[2], null, getAllInputs()); + if ((tRecipe != null) && (canOutput(tRecipe.mOutputs)) && (tRecipe.isRecipeInputEqual(true, null, getAllInputs()))) { + this.mOutputItems[0] = tRecipe.getOutput(0); + this.mEUt = (tRecipe.mEUt * 3); + this.mMaxProgresstime = tRecipe.mDuration; + return 2; + } + return 0; + } + + public void startSoundLoop(byte aIndex, double aX, double aY, double aZ) { + super.startSoundLoop(aIndex, aX, aY, aZ); + if (aIndex == 1) { + GT_Utility.doSoundAtClient((String) GregTech_API.sSoundList.get(Integer.valueOf(1)), 10, 1.0F, aX, aY, aZ); + } + } + + public void startProcess() { + sendLoopStart((byte) 1); + } + + public ITexture[] getSideFacingActive(byte aColor) { + return new ITexture[]{super.getSideFacingActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_STEAM_HAMMER_ACTIVE)}; + } + + public ITexture[] getSideFacingInactive(byte aColor) { + return new ITexture[]{super.getSideFacingInactive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_STEAM_HAMMER)}; + } + + public ITexture[] getFrontFacingActive(byte aColor) { + return new ITexture[]{super.getFrontFacingActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_STEAM_HAMMER_ACTIVE)}; + } + + public ITexture[] getFrontFacingInactive(byte aColor) { + return new ITexture[]{super.getFrontFacingInactive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_STEAM_HAMMER)}; + } + + public ITexture[] getTopFacingActive(byte aColor) { + return new ITexture[]{super.getTopFacingActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_STEAM_HAMMER_ACTIVE)}; + } + + public ITexture[] getTopFacingInactive(byte aColor) { + return new ITexture[]{super.getTopFacingInactive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_STEAM_HAMMER)}; + } + + public ITexture[] getBottomFacingActive(byte aColor) { + return new ITexture[]{super.getBottomFacingActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_HAMMER_ACTIVE)}; + } + + public ITexture[] getBottomFacingInactive(byte aColor) { + return new ITexture[]{super.getBottomFacingInactive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_HAMMER)}; + } +} diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Furnace_Bronze.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Furnace_Bronze.java index 1aaeb7f624..ed3932ba5d 100644 --- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Furnace_Bronze.java +++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Furnace_Bronze.java @@ -1,92 +1,92 @@ -package gregtech.common.tileentities.machines.steam;
-
-import gregtech.api.GregTech_API;
-import gregtech.api.enums.Textures;
-import gregtech.api.gui.GT_GUIContainer_BasicMachine;
-import gregtech.api.interfaces.ITexture;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.metatileentity.MetaTileEntity;
-import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine_Bronze;
-import gregtech.api.objects.GT_RenderedTexture;
-import gregtech.api.util.GT_ModHandler;
-import gregtech.api.util.GT_Utility;
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.item.ItemStack;
-
-public class GT_MetaTileEntity_Furnace_Bronze
- extends GT_MetaTileEntity_BasicMachine_Bronze {
- public GT_MetaTileEntity_Furnace_Bronze(int aID, String aName, String aNameRegional) {
- super(aID, aName, aNameRegional, "Smelting things with compressed Steam", 1, 1, true);
- }
-
- public GT_MetaTileEntity_Furnace_Bronze(String aName, String aDescription, ITexture[][][] aTextures) {
- super(aName, aDescription, aTextures, 1, 1, true);
- }
-
- public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- return new GT_GUIContainer_BasicMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "BronzeFurnace.png", "smelting");
- }
-
- public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
- return new GT_MetaTileEntity_Furnace_Bronze(this.mName, this.mDescription, this.mTextures);
- }
-
- public int checkRecipe() {
- if (null != (this.mOutputItems[0] = GT_ModHandler.getSmeltingOutput(getInputAt(0), true, getOutputAt(0)))) {
- this.mEUt = 4;
- this.mMaxProgresstime = 256;
- return 2;
- }
- return 0;
- }
-
- public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
- if (!super.allowPutStack(aBaseMetaTileEntity, aIndex, aSide, aStack)) {
- return false;
- }
- return GT_ModHandler.getSmeltingOutput(GT_Utility.copyAmount(64L, new Object[]{aStack}), false, null) != null;
- }
-
- public void startSoundLoop(byte aIndex, double aX, double aY, double aZ) {
- super.startSoundLoop(aIndex, aX, aY, aZ);
- if (aIndex == 1) {
- GT_Utility.doSoundAtClient((String) GregTech_API.sSoundList.get(Integer.valueOf(207)), 10, 1.0F, aX, aY, aZ);
- }
- }
-
- public void startProcess() {
- sendLoopStart((byte) 1);
- }
-
- public ITexture[] getSideFacingActive(byte aColor) {
- return new ITexture[]{super.getSideFacingActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_STEAM_FURNACE_ACTIVE)};
- }
-
- public ITexture[] getSideFacingInactive(byte aColor) {
- return new ITexture[]{super.getSideFacingInactive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_STEAM_FURNACE)};
- }
-
- public ITexture[] getFrontFacingActive(byte aColor) {
- return new ITexture[]{super.getFrontFacingActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_STEAM_FURNACE_ACTIVE)};
- }
-
- public ITexture[] getFrontFacingInactive(byte aColor) {
- return new ITexture[]{super.getFrontFacingInactive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_STEAM_FURNACE)};
- }
-
- public ITexture[] getTopFacingActive(byte aColor) {
- return new ITexture[]{super.getTopFacingActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_STEAM_FURNACE_ACTIVE)};
- }
-
- public ITexture[] getTopFacingInactive(byte aColor) {
- return new ITexture[]{super.getTopFacingInactive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_STEAM_FURNACE)};
- }
-
- public ITexture[] getBottomFacingActive(byte aColor) {
- return new ITexture[]{super.getBottomFacingActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_FURNACE_ACTIVE)};
- }
-
- public ITexture[] getBottomFacingInactive(byte aColor) {
- return new ITexture[]{super.getBottomFacingInactive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_FURNACE)};
- }
-}
+package gregtech.common.tileentities.machines.steam; + +import gregtech.api.GregTech_API; +import gregtech.api.enums.Textures; +import gregtech.api.gui.GT_GUIContainer_BasicMachine; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine_Bronze; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_Utility; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.item.ItemStack; + +public class GT_MetaTileEntity_Furnace_Bronze + extends GT_MetaTileEntity_BasicMachine_Bronze { + public GT_MetaTileEntity_Furnace_Bronze(int aID, String aName, String aNameRegional) { + super(aID, aName, aNameRegional, "Smelting things with compressed Steam", 1, 1, true); + } + + public GT_MetaTileEntity_Furnace_Bronze(String aName, String aDescription, ITexture[][][] aTextures) { + super(aName, aDescription, aTextures, 1, 1, true); + } + + public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + return new GT_GUIContainer_BasicMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "BronzeFurnace.png", "smelting"); + } + + public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_Furnace_Bronze(this.mName, this.mDescription, this.mTextures); + } + + public int checkRecipe() { + if (null != (this.mOutputItems[0] = GT_ModHandler.getSmeltingOutput(getInputAt(0), true, getOutputAt(0)))) { + this.mEUt = 4; + this.mMaxProgresstime = 256; + return 2; + } + return 0; + } + + public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + if (!super.allowPutStack(aBaseMetaTileEntity, aIndex, aSide, aStack)) { + return false; + } + return GT_ModHandler.getSmeltingOutput(GT_Utility.copyAmount(64L, new Object[]{aStack}), false, null) != null; + } + + public void startSoundLoop(byte aIndex, double aX, double aY, double aZ) { + super.startSoundLoop(aIndex, aX, aY, aZ); + if (aIndex == 1) { + GT_Utility.doSoundAtClient((String) GregTech_API.sSoundList.get(Integer.valueOf(207)), 10, 1.0F, aX, aY, aZ); + } + } + + public void startProcess() { + sendLoopStart((byte) 1); + } + + public ITexture[] getSideFacingActive(byte aColor) { + return new ITexture[]{super.getSideFacingActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_STEAM_FURNACE_ACTIVE)}; + } + + public ITexture[] getSideFacingInactive(byte aColor) { + return new ITexture[]{super.getSideFacingInactive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_STEAM_FURNACE)}; + } + + public ITexture[] getFrontFacingActive(byte aColor) { + return new ITexture[]{super.getFrontFacingActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_STEAM_FURNACE_ACTIVE)}; + } + + public ITexture[] getFrontFacingInactive(byte aColor) { + return new ITexture[]{super.getFrontFacingInactive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_STEAM_FURNACE)}; + } + + public ITexture[] getTopFacingActive(byte aColor) { + return new ITexture[]{super.getTopFacingActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_STEAM_FURNACE_ACTIVE)}; + } + + public ITexture[] getTopFacingInactive(byte aColor) { + return new ITexture[]{super.getTopFacingInactive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_STEAM_FURNACE)}; + } + + public ITexture[] getBottomFacingActive(byte aColor) { + return new ITexture[]{super.getBottomFacingActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_FURNACE_ACTIVE)}; + } + + public ITexture[] getBottomFacingInactive(byte aColor) { + return new ITexture[]{super.getBottomFacingInactive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_FURNACE)}; + } +} diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Furnace_Steel.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Furnace_Steel.java index 4e79958f06..8ae00c392d 100644 --- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Furnace_Steel.java +++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Furnace_Steel.java @@ -1,92 +1,92 @@ -package gregtech.common.tileentities.machines.steam;
-
-import gregtech.api.GregTech_API;
-import gregtech.api.enums.Textures;
-import gregtech.api.gui.GT_GUIContainer_BasicMachine;
-import gregtech.api.interfaces.ITexture;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.metatileentity.MetaTileEntity;
-import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine_Steel;
-import gregtech.api.objects.GT_RenderedTexture;
-import gregtech.api.util.GT_ModHandler;
-import gregtech.api.util.GT_Utility;
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.item.ItemStack;
-
-public class GT_MetaTileEntity_Furnace_Steel
- extends GT_MetaTileEntity_BasicMachine_Steel {
- public GT_MetaTileEntity_Furnace_Steel(int aID, String aName, String aNameRegional) {
- super(aID, aName, aNameRegional, "Smelting things with compressed Steam", 1, 1, true);
- }
-
- public GT_MetaTileEntity_Furnace_Steel(String aName, String aDescription, ITexture[][][] aTextures) {
- super(aName, aDescription, aTextures, 1, 1, true);
- }
-
- public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- return new GT_GUIContainer_BasicMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "SteelFurnace.png", "smelting");
- }
-
- public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
- return new GT_MetaTileEntity_Furnace_Steel(this.mName, this.mDescription, this.mTextures);
- }
-
- public int checkRecipe() {
- if (null != (this.mOutputItems[0] = GT_ModHandler.getSmeltingOutput(getInputAt(0), true, getOutputAt(0)))) {
- this.mEUt = 12;
- this.mMaxProgresstime = 128;
- return 2;
- }
- return 0;
- }
-
- public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
- if (!super.allowPutStack(aBaseMetaTileEntity, aIndex, aSide, aStack)) {
- return false;
- }
- return GT_ModHandler.getSmeltingOutput(GT_Utility.copyAmount(64L, new Object[]{aStack}), false, null) != null;
- }
-
- public void startSoundLoop(byte aIndex, double aX, double aY, double aZ) {
- super.startSoundLoop(aIndex, aX, aY, aZ);
- if (aIndex == 1) {
- GT_Utility.doSoundAtClient((String) GregTech_API.sSoundList.get(Integer.valueOf(207)), 10, 1.0F, aX, aY, aZ);
- }
- }
-
- public void startProcess() {
- sendLoopStart((byte) 1);
- }
-
- public ITexture[] getSideFacingActive(byte aColor) {
- return new ITexture[]{super.getSideFacingActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_STEAM_FURNACE_ACTIVE)};
- }
-
- public ITexture[] getSideFacingInactive(byte aColor) {
- return new ITexture[]{super.getSideFacingInactive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_STEAM_FURNACE)};
- }
-
- public ITexture[] getFrontFacingActive(byte aColor) {
- return new ITexture[]{super.getFrontFacingActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_STEAM_FURNACE_ACTIVE)};
- }
-
- public ITexture[] getFrontFacingInactive(byte aColor) {
- return new ITexture[]{super.getFrontFacingInactive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_STEAM_FURNACE)};
- }
-
- public ITexture[] getTopFacingActive(byte aColor) {
- return new ITexture[]{super.getTopFacingActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_STEAM_FURNACE_ACTIVE)};
- }
-
- public ITexture[] getTopFacingInactive(byte aColor) {
- return new ITexture[]{super.getTopFacingInactive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_STEAM_FURNACE)};
- }
-
- public ITexture[] getBottomFacingActive(byte aColor) {
- return new ITexture[]{super.getBottomFacingActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_FURNACE_ACTIVE)};
- }
-
- public ITexture[] getBottomFacingInactive(byte aColor) {
- return new ITexture[]{super.getBottomFacingInactive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_FURNACE)};
- }
-}
+package gregtech.common.tileentities.machines.steam; + +import gregtech.api.GregTech_API; +import gregtech.api.enums.Textures; +import gregtech.api.gui.GT_GUIContainer_BasicMachine; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine_Steel; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_Utility; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.item.ItemStack; + +public class GT_MetaTileEntity_Furnace_Steel + extends GT_MetaTileEntity_BasicMachine_Steel { + public GT_MetaTileEntity_Furnace_Steel(int aID, String aName, String aNameRegional) { + super(aID, aName, aNameRegional, "Smelting things with compressed Steam", 1, 1, true); + } + + public GT_MetaTileEntity_Furnace_Steel(String aName, String aDescription, ITexture[][][] aTextures) { + super(aName, aDescription, aTextures, 1, 1, true); + } + + public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + return new GT_GUIContainer_BasicMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "SteelFurnace.png", "smelting"); + } + + public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_Furnace_Steel(this.mName, this.mDescription, this.mTextures); + } + + public int checkRecipe() { + if (null != (this.mOutputItems[0] = GT_ModHandler.getSmeltingOutput(getInputAt(0), true, getOutputAt(0)))) { + this.mEUt = 12; + this.mMaxProgresstime = 128; + return 2; + } + return 0; + } + + public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + if (!super.allowPutStack(aBaseMetaTileEntity, aIndex, aSide, aStack)) { + return false; + } + return GT_ModHandler.getSmeltingOutput(GT_Utility.copyAmount(64L, new Object[]{aStack}), false, null) != null; + } + + public void startSoundLoop(byte aIndex, double aX, double aY, double aZ) { + super.startSoundLoop(aIndex, aX, aY, aZ); + if (aIndex == 1) { + GT_Utility.doSoundAtClient((String) GregTech_API.sSoundList.get(Integer.valueOf(207)), 10, 1.0F, aX, aY, aZ); + } + } + + public void startProcess() { + sendLoopStart((byte) 1); + } + + public ITexture[] getSideFacingActive(byte aColor) { + return new ITexture[]{super.getSideFacingActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_STEAM_FURNACE_ACTIVE)}; + } + + public ITexture[] getSideFacingInactive(byte aColor) { + return new ITexture[]{super.getSideFacingInactive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_STEAM_FURNACE)}; + } + + public ITexture[] getFrontFacingActive(byte aColor) { + return new ITexture[]{super.getFrontFacingActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_STEAM_FURNACE_ACTIVE)}; + } + + public ITexture[] getFrontFacingInactive(byte aColor) { + return new ITexture[]{super.getFrontFacingInactive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_STEAM_FURNACE)}; + } + + public ITexture[] getTopFacingActive(byte aColor) { + return new ITexture[]{super.getTopFacingActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_STEAM_FURNACE_ACTIVE)}; + } + + public ITexture[] getTopFacingInactive(byte aColor) { + return new ITexture[]{super.getTopFacingInactive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_STEAM_FURNACE)}; + } + + public ITexture[] getBottomFacingActive(byte aColor) { + return new ITexture[]{super.getBottomFacingActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_FURNACE_ACTIVE)}; + } + + public ITexture[] getBottomFacingInactive(byte aColor) { + return new ITexture[]{super.getBottomFacingInactive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_FURNACE)}; + } +} diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Macerator_Steel.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Macerator_Steel.java index 2287ff42ff..8659d4e835 100644 --- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Macerator_Steel.java +++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Macerator_Steel.java @@ -20,7 +20,7 @@ import java.util.Random; import static gregtech.api.enums.GT_Values.V;
public class GT_MetaTileEntity_Macerator_Steel
- extends GT_MetaTileEntity_BasicMachine_Steel {
+ extends GT_MetaTileEntity_BasicMachine_Steel {//TODO CHECK ALL STEAM POWERED MACHINES
public GT_MetaTileEntity_Macerator_Steel(int aID, String aName, String aNameRegional) {
super(aID, aName, aNameRegional, "Macerating your Ores", 1, 1, false);
}
@@ -61,7 +61,7 @@ public class GT_MetaTileEntity_Macerator_Steel getInputAt(0).stackSize -= tRecipe.mInputs[0].stackSize;
return FOUND_AND_SUCCESSFULLY_USED_RECIPE;
}
-
+ //TODO THIS MIGHT WORK???
public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
if (!super.allowPutStack(aBaseMetaTileEntity, aIndex, aSide, aStack)) {
return false;
diff --git a/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_Locker.java b/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_Locker.java index c9b57fc728..93611904b7 100644 --- a/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_Locker.java +++ b/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_Locker.java @@ -1,160 +1,160 @@ -package gregtech.common.tileentities.storage;
-
-import gregtech.api.GregTech_API;
-import gregtech.api.enums.Textures;
-import gregtech.api.interfaces.ITexture;
-import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_TieredMachineBlock;
-import gregtech.api.objects.GT_ItemStack;
-import gregtech.api.objects.GT_RenderedTexture;
-import gregtech.api.util.GT_Utility;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-
-public class GT_MetaTileEntity_Locker
- extends GT_MetaTileEntity_TieredMachineBlock {
- public byte mType = 0;
-
- public GT_MetaTileEntity_Locker(int aID, String aName, String aNameRegional, int aTier) {
- super(aID, aName, aNameRegional, aTier, 4, "Stores and recharges Armor", new ITexture[0]);
- }
-
- public GT_MetaTileEntity_Locker(String aName, int aTier, String aDescription, ITexture[][][] aTextures) {
- super(aName, aTier, 4, aDescription, aTextures);
- }
-
- public String[] getDescription() {
- return new String[]{this.mDescription, "Click with Screwdriver to change Style"};
- }
-
- public ITexture[][][] getTextureSet(ITexture[] aTextures) {
- ITexture[][][] rTextures = new ITexture[3][17][];
- for (byte i = -1; i < 16; i = (byte) (i + 1)) {
- ITexture[] tmp0 = {Textures.BlockIcons.MACHINE_CASINGS[this.mTier][(i + 1)]};
- rTextures[0][(i + 1)] = tmp0;
- ITexture[] tmp1 = {Textures.BlockIcons.MACHINE_CASINGS[this.mTier][(i + 1)], Textures.BlockIcons.OVERLAYS_ENERGY_IN[this.mTier]};
- rTextures[1][(i + 1)] = tmp1;
- ITexture[] tmp2 = {Textures.BlockIcons.MACHINE_CASINGS[this.mTier][(i + 1)], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_LOCKER)};
- rTextures[2][(i + 1)] = tmp2;
- }
- return rTextures;
- }
-
- public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
- if (aSide == aFacing) {
- return new ITexture[]{this.mTextures[2][(aColorIndex + 1)][0], this.mTextures[2][(aColorIndex + 1)][1], Textures.BlockIcons.LOCKERS[java.lang.Math.abs(this.mType % Textures.BlockIcons.LOCKERS.length)]};
- }
- return this.mTextures[0][(aColorIndex + 1)];
- }
-
- public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
- return new GT_MetaTileEntity_Locker(this.mName, this.mTier, this.mDescription, this.mTextures);
- }
-
- public boolean isSimpleMachine() {
- return false;
- }
-
- public boolean isElectric() {
- return true;
- }
-
- public boolean isValidSlot(int aIndex) {
- return true;
- }
-
- public boolean isFacingValid(byte aFacing) {
- return aFacing > 1;
- }
-
- public boolean isEnetInput() {
- return true;
- }
-
- public boolean isInputFacing(byte aSide) {
- return aSide == getBaseMetaTileEntity().getBackFacing();
- }
-
- public boolean isTeleporterCompatible() {
- return false;
- }
-
- public long maxEUStore() {
- return gregtech.api.enums.GT_Values.V[this.mTier] * maxAmperesIn();
- }
-
- public long maxEUInput() {
- return gregtech.api.enums.GT_Values.V[this.mTier];
- }
-
- public long maxAmperesIn() {
- return this.mInventory.length * 2;
- }
-
- public int rechargerSlotStartIndex() {
- return 0;
- }
-
- public int rechargerSlotCount() {
- return getBaseMetaTileEntity().isAllowedToWork() ? this.mInventory.length : 0;
- }
-
- public boolean isAccessAllowed(EntityPlayer aPlayer) {
- return true;
- }
-
- public void saveNBTData(NBTTagCompound aNBT) {
- aNBT.setByte("mType", this.mType);
- }
-
- public void loadNBTData(NBTTagCompound aNBT) {
- this.mType = aNBT.getByte("mType");
- }
-
- public void onValueUpdate(byte aValue) {
- this.mType = aValue;
- }
-
- public byte getUpdateData() {
- return this.mType;
- }
-
- public void doSound(byte aIndex, double aX, double aY, double aZ) {
- if (aIndex == 16) {
- GT_Utility.doSoundAtClient((String) GregTech_API.sSoundList.get(Integer.valueOf(3)), 1, 1.0F);
- }
- }
-
- public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) {
- if (aSide == getBaseMetaTileEntity().getFrontFacing()) {
- this.mType = ((byte) (this.mType + 1));
- }
- }
-
- public boolean allowCoverOnSide(byte aSide, GT_ItemStack aStack) {
- return aSide != getBaseMetaTileEntity().getFrontFacing();
- }
-
- public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer, byte aSide, float aX, float aY, float aZ) {
- if ((aBaseMetaTileEntity.isServerSide()) && (aSide == aBaseMetaTileEntity.getFrontFacing())) {
- for (int i = 0; i < 4; i++) {
- ItemStack tSwapStack = this.mInventory[i];
- this.mInventory[i] = aPlayer.inventory.armorInventory[i];
- aPlayer.inventory.armorInventory[i] = tSwapStack;
- }
- aPlayer.inventoryContainer.detectAndSendChanges();
- sendSound((byte) 16);
- }
- return true;
- }
-
- public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
- return false;
- }
-
- public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
- return false;
- }
-}
+package gregtech.common.tileentities.storage; + +import gregtech.api.GregTech_API; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_TieredMachineBlock; +import gregtech.api.objects.GT_ItemStack; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Utility; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; + +public class GT_MetaTileEntity_Locker + extends GT_MetaTileEntity_TieredMachineBlock { + public byte mType = 0; + + public GT_MetaTileEntity_Locker(int aID, String aName, String aNameRegional, int aTier) { + super(aID, aName, aNameRegional, aTier, 4, "Stores and recharges Armor", new ITexture[0]); + } + + public GT_MetaTileEntity_Locker(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { + super(aName, aTier, 4, aDescription, aTextures); + } + + public String[] getDescription() { + return new String[]{this.mDescription, "Click with Screwdriver to change Style"}; + } + + public ITexture[][][] getTextureSet(ITexture[] aTextures) { + ITexture[][][] rTextures = new ITexture[3][17][]; + for (byte i = -1; i < 16; i = (byte) (i + 1)) { + ITexture[] tmp0 = {Textures.BlockIcons.MACHINE_CASINGS[this.mTier][(i + 1)]}; + rTextures[0][(i + 1)] = tmp0; + ITexture[] tmp1 = {Textures.BlockIcons.MACHINE_CASINGS[this.mTier][(i + 1)], Textures.BlockIcons.OVERLAYS_ENERGY_IN[this.mTier]}; + rTextures[1][(i + 1)] = tmp1; + ITexture[] tmp2 = {Textures.BlockIcons.MACHINE_CASINGS[this.mTier][(i + 1)], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_LOCKER)}; + rTextures[2][(i + 1)] = tmp2; + } + return rTextures; + } + + public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { + if (aSide == aFacing) { + return new ITexture[]{this.mTextures[2][(aColorIndex + 1)][0], this.mTextures[2][(aColorIndex + 1)][1], Textures.BlockIcons.LOCKERS[Math.abs(this.mType % Textures.BlockIcons.LOCKERS.length)]}; + } + return this.mTextures[0][(aColorIndex + 1)]; + } + + public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_Locker(this.mName, this.mTier, this.mDescription, this.mTextures); + } + + public boolean isSimpleMachine() { + return false; + } + + public boolean isElectric() { + return true; + } + + public boolean isValidSlot(int aIndex) { + return true; + } + + public boolean isFacingValid(byte aFacing) { + return aFacing > 1; + } + + public boolean isEnetInput() { + return true; + } + + public boolean isInputFacing(byte aSide) { + return aSide == getBaseMetaTileEntity().getBackFacing(); + } + + public boolean isTeleporterCompatible() { + return false; + } + + public long maxEUStore() { + return gregtech.api.enums.GT_Values.V[this.mTier] * maxAmperesIn(); + } + + public long maxEUInput() { + return gregtech.api.enums.GT_Values.V[this.mTier]; + } + + public long maxAmperesIn() { + return this.mInventory.length * 2; + } + + public int rechargerSlotStartIndex() { + return 0; + } + + public int rechargerSlotCount() { + return getBaseMetaTileEntity().isAllowedToWork() ? this.mInventory.length : 0; + } + + public boolean isAccessAllowed(EntityPlayer aPlayer) { + return true; + } + + public void saveNBTData(NBTTagCompound aNBT) { + aNBT.setByte("mType", this.mType); + } + + public void loadNBTData(NBTTagCompound aNBT) { + this.mType = aNBT.getByte("mType"); + } + + public void onValueUpdate(byte aValue) { + this.mType = aValue; + } + + public byte getUpdateData() { + return this.mType; + } + + public void doSound(byte aIndex, double aX, double aY, double aZ) { + if (aIndex == 16) { + GT_Utility.doSoundAtClient((String) GregTech_API.sSoundList.get(Integer.valueOf(3)), 1, 1.0F); + } + } + + public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { + if (aSide == getBaseMetaTileEntity().getFrontFacing()) { + this.mType = ((byte) (this.mType + 1)); + } + } + + public boolean allowCoverOnSide(byte aSide, GT_ItemStack aStack) { + return aSide != getBaseMetaTileEntity().getFrontFacing(); + } + + public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer, byte aSide, float aX, float aY, float aZ) { + if ((aBaseMetaTileEntity.isServerSide()) && (aSide == aBaseMetaTileEntity.getFrontFacing())) { + for (int i = 0; i < 4; i++) { + ItemStack tSwapStack = this.mInventory[i]; + this.mInventory[i] = aPlayer.inventory.armorInventory[i]; + aPlayer.inventory.armorInventory[i] = tSwapStack; + } + aPlayer.inventoryContainer.detectAndSendChanges(); + sendSound((byte) 16); + } + return true; + } + + public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + return false; + } + + public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + return false; + } +} diff --git a/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_QuantumChest.java b/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_QuantumChest.java index a5a0a11ac6..386b22efbb 100644 --- a/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_QuantumChest.java +++ b/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_QuantumChest.java @@ -13,12 +13,13 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.EnumChatFormatting; public class GT_MetaTileEntity_QuantumChest extends GT_MetaTileEntity_TieredMachineBlock { public int mItemCount = 0; public ItemStack mItemStack = null; public GT_MetaTileEntity_QuantumChest(int aID, String aName, String aNameRegional, int aTier) { - super(aID, aName, aNameRegional, aTier, 3, "This Chest stores " + ((int) ((Math.pow(6, aTier)) * 270000)) + " Blocks"); + super(aID, aName, aNameRegional, aTier, 3, "This Chest stores " + CommonSizeCompute(aTier) + " Blocks"); } public GT_MetaTileEntity_QuantumChest(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { @@ -162,8 +163,25 @@ public class GT_MetaTileEntity_QuantumChest extends GT_MetaTileEntity_TieredMach return getMaxItemCount(); } + private static int CommonSizeCompute(int tier){ + switch(tier){ + case 6: + return 128000000; + case 7: + return 256000000; + case 8: + return 512000000; + case 9: + return 1024000000; + case 10: + return 2147483640; + default: + return 0; + } + } + public int getMaxItemCount() { - return (int) (((Math.pow(6, mTier)) * 270000) - 128); + return CommonSizeCompute(mTier); } @Override @@ -181,18 +199,20 @@ public class GT_MetaTileEntity_QuantumChest extends GT_MetaTileEntity_TieredMach if (mItemStack == null) { return new String[]{ - "Quantum Chest", + EnumChatFormatting.BLUE + "Quantum Chest"+ EnumChatFormatting.RESET, "Stored Items:", - "No Items", - Integer.toString(0), - Integer.toString(getMaxItemCount())}; + EnumChatFormatting.GOLD+ "No Items"+ EnumChatFormatting.RESET, + EnumChatFormatting.GREEN + "0" + EnumChatFormatting.RESET+" "+ + EnumChatFormatting.YELLOW + Integer.toString(getMaxItemCount())+ EnumChatFormatting.RESET + }; } return new String[]{ - "Quantum Chest", + EnumChatFormatting.BLUE + "Quantum Chest"+ EnumChatFormatting.RESET, "Stored Items:", - mItemStack.getDisplayName(), - Integer.toString(mItemCount), - Integer.toString(getMaxItemCount())}; + EnumChatFormatting.GOLD + mItemStack.getDisplayName() + EnumChatFormatting.RESET, + EnumChatFormatting.GREEN + Integer.toString(mItemCount) + EnumChatFormatting.RESET+" "+ + EnumChatFormatting.YELLOW + Integer.toString(getMaxItemCount())+ EnumChatFormatting.RESET + }; } @Override @@ -227,4 +247,4 @@ public class GT_MetaTileEntity_QuantumChest extends GT_MetaTileEntity_TieredMach public ITexture[][][] getTextureSet(ITexture[] aTextures) { return new ITexture[0][0][0]; } -}
\ No newline at end of file +} diff --git a/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_QuantumTank.java b/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_QuantumTank.java index 1be8e2ff6f..339cd750c1 100644 --- a/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_QuantumTank.java +++ b/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_QuantumTank.java @@ -8,11 +8,12 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicTank; import gregtech.api.objects.GT_RenderedTexture; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.EnumChatFormatting; public class GT_MetaTileEntity_QuantumTank extends GT_MetaTileEntity_BasicTank { public GT_MetaTileEntity_QuantumTank(int aID, String aName, String aNameRegional, int aTier) { - super(aID, aName, aNameRegional, aTier, 3, "Stores " + ((int) (Math.pow(6, aTier) * 267000)) + "L of fluid"); + super(aID, aName, aNameRegional, aTier, 3, "Stores " + CommonSizeCompute(aTier) + "L of fluid"); } public GT_MetaTileEntity_QuantumTank(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { @@ -101,18 +102,20 @@ public class GT_MetaTileEntity_QuantumTank if (mFluid == null) { return new String[]{ - "Quantum Tank", + EnumChatFormatting.BLUE + "Quantum Tank"+ EnumChatFormatting.RESET, "Stored Fluid:", - "No Fluid", - Integer.toString(0) + "L", - Integer.toString(getCapacity()) + "L"}; + EnumChatFormatting.GOLD + "No Fluid"+ EnumChatFormatting.RESET, + EnumChatFormatting.GREEN + Integer.toString(0) + " L"+ EnumChatFormatting.RESET+" "+ + EnumChatFormatting.YELLOW + Integer.toString(getCapacity()) + " L"+ EnumChatFormatting.RESET + }; } return new String[]{ - "Quantum Tank", + EnumChatFormatting.BLUE + "Quantum Tank"+ EnumChatFormatting.RESET, "Stored Fluid:", - mFluid.getLocalizedName(), - Integer.toString(mFluid.amount) + "L", - Integer.toString(getCapacity()) + "L"}; + EnumChatFormatting.GOLD + mFluid.getLocalizedName()+ EnumChatFormatting.RESET, + EnumChatFormatting.GREEN + Integer.toString(mFluid.amount) + " L"+ EnumChatFormatting.RESET+" "+ + EnumChatFormatting.YELLOW+ Integer.toString(getCapacity()) + " L"+ EnumChatFormatting.RESET + }; } @Override @@ -125,9 +128,26 @@ public class GT_MetaTileEntity_QuantumTank return new GT_MetaTileEntity_QuantumTank(mName, mTier, mDescription, mTextures); } + private static int CommonSizeCompute(int tier){ + switch(tier){ + case 6: + return 128000000; + case 7: + return 256000000; + case 8: + return 512000000; + case 9: + return 1024000000; + case 10: + return 2147483640; + default: + return 0; + } + } + @Override public int getCapacity() { - return (int) (Math.pow(6, mTier) * 267000); + return CommonSizeCompute(mTier); } @Override @@ -135,4 +155,4 @@ public class GT_MetaTileEntity_QuantumTank return 100; } -}
\ No newline at end of file +} diff --git a/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_SuperChest.java b/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_SuperChest.java new file mode 100644 index 0000000000..76e10eddc1 --- /dev/null +++ b/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_SuperChest.java @@ -0,0 +1,250 @@ +package gregtech.common.tileentities.storage; + +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_TieredMachineBlock; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Utility; +import gregtech.common.gui.GT_Container_QuantumChest; +import gregtech.common.gui.GT_GUIContainer_QuantumChest; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.EnumChatFormatting; + +public class GT_MetaTileEntity_SuperChest extends GT_MetaTileEntity_TieredMachineBlock { + public int mItemCount = 0; + public ItemStack mItemStack = null; + public GT_MetaTileEntity_SuperChest(int aID, String aName, String aNameRegional, int aTier) { + super(aID, aName, aNameRegional, aTier, 3, "This Chest stores " + CommonSizeCompute(aTier) + " Blocks"); + } + + public GT_MetaTileEntity_SuperChest(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { + super(aName, aTier, 3, aDescription, aTextures); + } + + @Override + public boolean isSimpleMachine() { + return true; + } + + @Override + public boolean isFacingValid(byte aFacing) { + return true; + } + + @Override + public boolean isAccessAllowed(EntityPlayer aPlayer) { + return true; + } + + @Override + public boolean isValidSlot(int aIndex) { + return true; + } + + @Override + public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_SuperChest(mName, mTier, mDescription, mTextures); + } + + @Override + public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) { + if (aBaseMetaTileEntity.isClientSide()) return true; + aBaseMetaTileEntity.openGUI(aPlayer); + return true; + } + +// public void onRightclick(EntityPlayer aPlayer) +// { +// ItemStack tPlayerItem = aPlayer.inventory.getCurrentItem(); +// if (tPlayerItem == null) +// { +// if (this.mItemID > 0) +// { +// for (int i = 0; (this.mItemCount < getMaxItemCount()) && (i < aPlayer.field_71071_by.func_70302_i_()); i++) +// { +// if ((aPlayer.field_71071_by.func_70301_a(i) != null) && (aPlayer.field_71071_by.func_70301_a(i).field_77993_c == this.mItemID) && (aPlayer.field_71071_by.func_70301_a(i).func_77960_j() == this.mItemMeta) && (!aPlayer.field_71071_by.func_70301_a(i).func_77942_o())) +// { +// this.mItemCount += aPlayer.field_71071_by.func_70301_a(i).field_77994_a; +// if (aPlayer.field_71071_by.func_70301_a(i).field_77994_a == 111) +// { +// this.mItemCount = (getMaxItemCount() + 192 - (this.mItemCount + (this.mInventory[0] == null ? 0 : this.mInventory[0].field_77994_a) + (this.mInventory[1] == null ? 0 : this.mInventory[1].field_77994_a) + (this.mInventory[2] == null ? 0 : this.mInventory[2].field_77994_a))); +// } +// else if (this.mItemCount > getMaxItemCount()) +// { +// aPlayer.field_71071_by.func_70301_a(i).field_77994_a = (this.mItemCount - getMaxItemCount()); +// this.mItemCount = getMaxItemCount(); +// } +// else +// { +// aPlayer.field_71071_by.func_70301_a(i).field_77994_a = 0; +// } +// } +// if ((aPlayer.field_71071_by.func_70301_a(i) != null) && (aPlayer.field_71071_by.func_70301_a(i).field_77994_a <= 0)) { +// aPlayer.field_71071_by.func_70299_a(i, null); +// } +// } +// GT_Utility.sendChatToPlayer(aPlayer, this.mItemCount + (this.mInventory[0] == null ? 0 : this.mInventory[0].field_77994_a) + (this.mInventory[1] == null ? 0 : this.mInventory[1].field_77994_a) + (this.mInventory[2] == null ? 0 : this.mInventory[2].field_77994_a) + " of " + new ItemStack(this.mItemID, 1, this.mItemMeta).func_82833_r()); +// } +// } +// if (aPlayer.field_71069_bz != null) { +// aPlayer.field_71069_bz.func_75142_b(); +// } +// } + + @Override + public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + return new GT_Container_QuantumChest(aPlayerInventory, aBaseMetaTileEntity); + } + + @Override + public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + return new GT_GUIContainer_QuantumChest(aPlayerInventory, aBaseMetaTileEntity, getLocalName()); + } + + @Override + public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTimer) { + + if (getBaseMetaTileEntity().isServerSide() && getBaseMetaTileEntity().isAllowedToWork()) { +// if(mInventory[0]!=null)System.out.println("input: "+mInventory[0].stackSize); +// System.out.println("store: "+mItemCount); +// if(mInventory[0]!=null)System.out.println("output: "+mInventory[2].stackSize); + if ((getItemCount() <= 0)) { + this.mItemStack = null; + this.mItemCount = 0; + } + if (this.mItemStack == null && this.mInventory[0] != null) { + this.mItemStack = mInventory[0].copy(); + } + if ((this.mInventory[0] != null) && (this.mItemCount < getMaxItemCount()) && GT_Utility.areStacksEqual(this.mInventory[0], this.mItemStack)) { + this.mItemCount += this.mInventory[0].stackSize; + if (this.mItemCount > getMaxItemCount()) { + this.mInventory[0].stackSize = (this.mItemCount - getMaxItemCount()); + this.mItemCount = getMaxItemCount(); + } else { + this.mInventory[0] = null; + } + } + if (this.mInventory[1] == null && mItemStack != null) { + this.mInventory[1] = mItemStack.copy(); + this.mInventory[1].stackSize = Math.min(mItemStack.getMaxStackSize(), this.mItemCount); + this.mItemCount -= this.mInventory[1].stackSize; + } else if ((this.mItemCount > 0) && GT_Utility.areStacksEqual(this.mInventory[1], this.mItemStack) && this.mInventory[1].getMaxStackSize() > this.mInventory[1].stackSize) { + int tmp = Math.min(this.mItemCount, this.mInventory[1].getMaxStackSize() - this.mInventory[1].stackSize); + this.mInventory[1].stackSize += tmp; + this.mItemCount -= tmp; + } + if (this.mItemStack != null) { + this.mInventory[2] = this.mItemStack.copy(); + this.mInventory[2].stackSize = Math.min(mItemStack.getMaxStackSize(), this.mItemCount); + } else { + this.mInventory[2] = null; + } + } + } + + private int getItemCount() { + return this.mItemCount; + } + + public void setItemCount(int aCount) { + this.mItemCount = aCount; + } + + public int getProgresstime() { + return this.mItemCount + (this.mInventory[0] == null ? 0 : this.mInventory[0].stackSize) + (this.mInventory[1] == null ? 0 : this.mInventory[1].stackSize); + } + + public int maxProgresstime() { + return getMaxItemCount(); + } + + private static int CommonSizeCompute(int tier){ + switch(tier){ + case 1: + return 4000000; + case 2: + return 8000000; + case 3: + return 16000000; + case 4: + return 32000000; + case 5: + return 64000000; + default: + return 0; + } + } + + public int getMaxItemCount() { + return CommonSizeCompute(mTier); + } + + @Override + public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + return aIndex==1; + } + + @Override + public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + return aIndex==0&&(mInventory[0]==null||GT_Utility.areStacksEqual(this.mInventory[0], aStack)); + } + + @Override + public String[] getInfoData() { + + if (mItemStack == null) { + return new String[]{ + EnumChatFormatting.BLUE + "Super Chest"+ EnumChatFormatting.RESET, + "Stored Items:", + EnumChatFormatting.GOLD+ "No Items"+ EnumChatFormatting.RESET, + EnumChatFormatting.GREEN + "0" + EnumChatFormatting.RESET+" "+ + EnumChatFormatting.YELLOW + Integer.toString(getMaxItemCount())+ EnumChatFormatting.RESET + }; + } + return new String[]{ + EnumChatFormatting.BLUE + "Super Chest"+ EnumChatFormatting.RESET, + "Stored Items:", + EnumChatFormatting.GOLD + mItemStack.getDisplayName() + EnumChatFormatting.RESET, + EnumChatFormatting.GREEN + Integer.toString(mItemCount) + EnumChatFormatting.RESET+" "+ + EnumChatFormatting.YELLOW + Integer.toString(getMaxItemCount())+ EnumChatFormatting.RESET + }; + } + + @Override + public boolean isGivingInformation() { + return true; + } + + @Override + public void saveNBTData(NBTTagCompound aNBT) { + aNBT.setInteger("mItemCount", this.mItemCount); + if (this.mItemStack != null) + aNBT.setTag("mItemStack", this.mItemStack.writeToNBT(new NBTTagCompound())); + } + + @Override + public void loadNBTData(NBTTagCompound aNBT) { + if (aNBT.hasKey("mItemCount")) + this.mItemCount = aNBT.getInteger("mItemCount"); + if (aNBT.hasKey("mItemStack")) + this.mItemStack = ItemStack.loadItemStackFromNBT((NBTTagCompound) aNBT.getTag("mItemStack")); + } + + @Override + public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { + if (aBaseMetaTileEntity.getFrontFacing() == 0 && aSide == 4) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColorIndex + 1], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SCHEST)}; + } + return aSide == aBaseMetaTileEntity.getFrontFacing() ? new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColorIndex + 1], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SCHEST)} : new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColorIndex + 1]}; + } + + @Override + public ITexture[][][] getTextureSet(ITexture[] aTextures) { + return new ITexture[0][0][0]; + } +} diff --git a/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_SuperTank.java b/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_SuperTank.java new file mode 100644 index 0000000000..57068bb584 --- /dev/null +++ b/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_SuperTank.java @@ -0,0 +1,158 @@ +package gregtech.common.tileentities.storage; + +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicTank; +import gregtech.api.objects.GT_RenderedTexture; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.EnumChatFormatting; + +public class GT_MetaTileEntity_SuperTank + extends GT_MetaTileEntity_BasicTank { + public GT_MetaTileEntity_SuperTank(int aID, String aName, String aNameRegional, int aTier) { + super(aID, aName, aNameRegional, aTier, 3, "Stores " + CommonSizeCompute(aTier) + "L of fluid"); + } + + public GT_MetaTileEntity_SuperTank(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { + super(aName, aTier, 3, aDescription, aTextures); + } + + @Override + public ITexture[][][] getTextureSet(ITexture[] aTextures) { + return new ITexture[0][0][0]; + } + + @Override + public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { + return aSide == 1 ? new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColorIndex + 1], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_STANK)} : new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColorIndex + 1]}; + } + + @Override + public void saveNBTData(NBTTagCompound aNBT) { + super.saveNBTData(aNBT); + } + + @Override + public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) { + if (aBaseMetaTileEntity.isClientSide()) return true; + aBaseMetaTileEntity.openGUI(aPlayer); + return true; + } + + @Override + public boolean isSimpleMachine() { + return true; + } + + @Override + public boolean isFacingValid(byte aFacing) { + return true; + } + + @Override + public boolean isAccessAllowed(EntityPlayer aPlayer) { + return true; + } + + @Override + public void loadNBTData(NBTTagCompound aNBT) { + super.loadNBTData(aNBT); + } + + @Override + public final byte getUpdateData() { + return 0x00; + } + + @Override + public boolean doesFillContainers() { + return true; + } + + @Override + public boolean doesEmptyContainers() { + return true; + } + + @Override + public boolean canTankBeFilled() { + return true; + } + + @Override + public boolean canTankBeEmptied() { + return true; + } + + @Override + public boolean displaysItemStack() { + return true; + } + + @Override + public boolean displaysStackSize() { + return false; + } + + @Override + public String[] getInfoData() { + + if (mFluid == null) { + return new String[]{ + EnumChatFormatting.BLUE + "Super Tank"+ EnumChatFormatting.RESET, + "Stored Fluid:", + EnumChatFormatting.GOLD + "No Fluid"+ EnumChatFormatting.RESET, + EnumChatFormatting.GREEN + Integer.toString(0) + " L"+ EnumChatFormatting.RESET+" "+ + EnumChatFormatting.YELLOW + Integer.toString(getCapacity()) + " L"+ EnumChatFormatting.RESET + }; + } + return new String[]{ + EnumChatFormatting.BLUE + "Super Tank"+ EnumChatFormatting.RESET, + "Stored Fluid:", + EnumChatFormatting.GOLD + mFluid.getLocalizedName()+ EnumChatFormatting.RESET, + EnumChatFormatting.GREEN + Integer.toString(mFluid.amount) + " L"+ EnumChatFormatting.RESET+" "+ + EnumChatFormatting.YELLOW+ Integer.toString(getCapacity()) + " L"+ EnumChatFormatting.RESET + }; + } + + @Override + public boolean isGivingInformation() { + return true; + } + + @Override + public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_SuperTank(mName, mTier, mDescription, mTextures); + } + + private static int CommonSizeCompute(int tier){ + switch(tier){ + case 1: + return 4000000; + case 2: + return 8000000; + case 3: + return 16000000; + case 4: + return 32000000; + case 5: + return 64000000; + default: + return 0; + } + } + + @Override + public int getCapacity() { + return CommonSizeCompute(mTier); + } + + @Override + public int getTankPressure() { + return 100; + } + +} diff --git a/src/main/java/gregtech/common/tools/GT_Tool.java b/src/main/java/gregtech/common/tools/GT_Tool.java index a1596ba93e..8ce02c2d01 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool.java +++ b/src/main/java/gregtech/common/tools/GT_Tool.java @@ -1,148 +1,148 @@ -package gregtech.common.tools;
-
-import gregtech.api.GregTech_API;
-import gregtech.api.damagesources.GT_DamageSources;
-import gregtech.api.interfaces.IToolStats;
-import gregtech.api.items.GT_MetaGenerated_Tool;
-import net.minecraft.block.Block;
-import net.minecraft.enchantment.Enchantment;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.stats.AchievementList;
-import net.minecraft.util.DamageSource;
-import net.minecraft.util.EntityDamageSource;
-import net.minecraft.util.IChatComponent;
-import net.minecraftforge.event.world.BlockEvent;
-
-import java.util.List;
-
-public abstract class GT_Tool
- implements IToolStats {
- public static final Enchantment[] FORTUNE_ENCHANTMENT = {Enchantment.fortune};
- public static final Enchantment[] LOOTING_ENCHANTMENT = {Enchantment.looting};
- public static final Enchantment[] ZERO_ENCHANTMENTS = new Enchantment[0];
- public static final int[] ZERO_ENCHANTMENT_LEVELS = new int[0];
-
- public int getToolDamagePerBlockBreak() {
- return 100;
- }
-
- public int getToolDamagePerDropConversion() {
- return 100;
- }
-
- public int getToolDamagePerContainerCraft() {
- return 800;
- }
-
- public int getToolDamagePerEntityAttack() {
- return 200;
- }
-
- public float getSpeedMultiplier() {
- return 1.0F;
- }
-
- public float getMaxDurabilityMultiplier() {
- return 1.0F;
- }
-
- public int getHurtResistanceTime(int aOriginalHurtResistance, Entity aEntity) {
- return aOriginalHurtResistance;
- }
-
- public String getMiningSound() {
- return null;
- }
-
- public String getCraftingSound() {
- return null;
- }
-
- public String getEntityHitSound() {
- return null;
- }
-
- public String getBreakingSound() {
- return (String) GregTech_API.sSoundList.get(Integer.valueOf(0));
- }
-
- public int getBaseQuality() {
- return 0;
- }
-
- public boolean canBlock() {
- return false;
- }
-
- public boolean isCrowbar() {
- return false;
- }
-
- public boolean isGrafter() {
- return false;
- }
-
- public boolean isChainsaw(){
- return false;
- }
-
- public boolean isWrench() {
- return false;
- }
-
- public boolean isWeapon() {
- return false;
- }
-
- public boolean isRangedWeapon() {
- return false;
- }
-
- public boolean isMiningTool() {
- return true;
- }
-
- public DamageSource getDamageSource(EntityLivingBase aPlayer, Entity aEntity) {
- return GT_DamageSources.getCombatDamage((aPlayer instanceof EntityPlayer) ? "player" : "mob", aPlayer, (aEntity instanceof EntityLivingBase) ? getDeathMessage(aPlayer, (EntityLivingBase) aEntity) : null);
- }
-
- public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) {
- return new EntityDamageSource((aPlayer instanceof EntityPlayer) ? "player" : "mob", aPlayer).func_151519_b(aEntity);
- }
-
- public int convertBlockDrops(List<ItemStack> aDrops, ItemStack aStack, EntityPlayer aPlayer, Block aBlock, int aX, int aY, int aZ, byte aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent) {
- return 0;
- }
-
- public ItemStack getBrokenItem(ItemStack aStack) {
- return null;
- }
-
- public Enchantment[] getEnchantments(ItemStack aStack) {
- return ZERO_ENCHANTMENTS;
- }
-
- public int[] getEnchantmentLevels(ItemStack aStack) {
- return ZERO_ENCHANTMENT_LEVELS;
- }
-
- public void onToolCrafted(ItemStack aStack, EntityPlayer aPlayer) {
- aPlayer.triggerAchievement(AchievementList.openInventory);
- aPlayer.triggerAchievement(AchievementList.mineWood);
- aPlayer.triggerAchievement(AchievementList.buildWorkBench);
- }
-
- public void onStatsAddedToTool(GT_MetaGenerated_Tool aItem, int aID) {
- }
-
- public float getNormalDamageAgainstEntity(float aOriginalDamage, Entity aEntity, ItemStack aStack, EntityPlayer aPlayer) {
- return aOriginalDamage;
- }
-
- public float getMagicDamageAgainstEntity(float aOriginalDamage, Entity aEntity, ItemStack aStack, EntityPlayer aPlayer) {
- return aOriginalDamage;
- }
-}
+package gregtech.common.tools; + +import gregtech.api.GregTech_API; +import gregtech.api.damagesources.GT_DamageSources; +import gregtech.api.interfaces.IToolStats; +import gregtech.api.items.GT_MetaGenerated_Tool; +import net.minecraft.block.Block; +import net.minecraft.enchantment.Enchantment; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.stats.AchievementList; +import net.minecraft.util.DamageSource; +import net.minecraft.util.EntityDamageSource; +import net.minecraft.util.IChatComponent; +import net.minecraftforge.event.world.BlockEvent; + +import java.util.List; + +public abstract class GT_Tool + implements IToolStats { + public static final Enchantment[] FORTUNE_ENCHANTMENT = {Enchantment.fortune}; + public static final Enchantment[] LOOTING_ENCHANTMENT = {Enchantment.looting}; + public static final Enchantment[] ZERO_ENCHANTMENTS = new Enchantment[0]; + public static final int[] ZERO_ENCHANTMENT_LEVELS = new int[0]; + + public int getToolDamagePerBlockBreak() { + return 100; + } + + public int getToolDamagePerDropConversion() { + return 100; + } + + public int getToolDamagePerContainerCraft() { + return 800; + } + + public int getToolDamagePerEntityAttack() { + return 200; + } + + public float getSpeedMultiplier() { + return 1.0F; + } + + public float getMaxDurabilityMultiplier() { + return 1.0F; + } + + public int getHurtResistanceTime(int aOriginalHurtResistance, Entity aEntity) { + return aOriginalHurtResistance; + } + + public String getMiningSound() { + return null; + } + + public String getCraftingSound() { + return null; + } + + public String getEntityHitSound() { + return null; + } + + public String getBreakingSound() { + return (String) GregTech_API.sSoundList.get(Integer.valueOf(0)); + } + + public int getBaseQuality() { + return 0; + } + + public boolean canBlock() { + return false; + } + + public boolean isCrowbar() { + return false; + } + + public boolean isGrafter() { + return false; + } + + public boolean isChainsaw(){ + return false; + } + + public boolean isWrench() { + return false; + } + + public boolean isWeapon() { + return false; + } + + public boolean isRangedWeapon() { + return false; + } + + public boolean isMiningTool() { + return true; + } + + public DamageSource getDamageSource(EntityLivingBase aPlayer, Entity aEntity) { + return GT_DamageSources.getCombatDamage((aPlayer instanceof EntityPlayer) ? "player" : "mob", aPlayer, (aEntity instanceof EntityLivingBase) ? getDeathMessage(aPlayer, (EntityLivingBase) aEntity) : null); + } + + public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) { + return new EntityDamageSource((aPlayer instanceof EntityPlayer) ? "player" : "mob", aPlayer).func_151519_b(aEntity); + } + + public int convertBlockDrops(List<ItemStack> aDrops, ItemStack aStack, EntityPlayer aPlayer, Block aBlock, int aX, int aY, int aZ, byte aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent) { + return 0; + } + + public ItemStack getBrokenItem(ItemStack aStack) { + return null; + } + + public Enchantment[] getEnchantments(ItemStack aStack) { + return ZERO_ENCHANTMENTS; + } + + public int[] getEnchantmentLevels(ItemStack aStack) { + return ZERO_ENCHANTMENT_LEVELS; + } + + public void onToolCrafted(ItemStack aStack, EntityPlayer aPlayer) { + aPlayer.triggerAchievement(AchievementList.openInventory); + aPlayer.triggerAchievement(AchievementList.mineWood); + aPlayer.triggerAchievement(AchievementList.buildWorkBench); + } + + public void onStatsAddedToTool(GT_MetaGenerated_Tool aItem, int aID) { + } + + public float getNormalDamageAgainstEntity(float aOriginalDamage, Entity aEntity, ItemStack aStack, EntityPlayer aPlayer) { + return aOriginalDamage; + } + + public float getMagicDamageAgainstEntity(float aOriginalDamage, Entity aEntity, ItemStack aStack, EntityPlayer aPlayer) { + return aOriginalDamage; + } +} diff --git a/src/main/java/gregtech/common/tools/GT_Tool_Axe.java b/src/main/java/gregtech/common/tools/GT_Tool_Axe.java index f74aeca505..f681554ea7 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Axe.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Axe.java @@ -1,118 +1,118 @@ -package gregtech.common.tools;
-
-import gregtech.api.GregTech_API;
-import gregtech.api.enums.OrePrefixes;
-import gregtech.api.interfaces.IIconContainer;
-import gregtech.api.items.GT_MetaGenerated_Tool;
-import net.minecraft.block.Block;
-import net.minecraft.block.material.Material;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.ChatComponentText;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.IChatComponent;
-import net.minecraftforge.event.world.BlockEvent;
-
-import java.util.List;
-
-public class GT_Tool_Axe
- extends GT_Tool {
- public int getToolDamagePerBlockBreak() {
- return 50;
- }
-
- public int getToolDamagePerDropConversion() {
- return 100;
- }
-
- public int getToolDamagePerContainerCraft() {
- return 100;
- }
-
- public int getToolDamagePerEntityAttack() {
- return 200;
- }
-
- public int getBaseQuality() {
- return 0;
- }
-
- public float getBaseDamage() {
- return 3.0F;
- }
-
- public float getSpeedMultiplier() {
- return 2.0F;
- }
-
- public float getMaxDurabilityMultiplier() {
- return 1.0F;
- }
-
- public String getCraftingSound() {
- return null;
- }
-
- public String getEntityHitSound() {
- return null;
- }
-
- public String getBreakingSound() {
- return (String) GregTech_API.sSoundList.get(Integer.valueOf(0));
- }
-
- public String getMiningSound() {
- return null;
- }
-
- public boolean canBlock() {
- return false;
- }
-
- public boolean isCrowbar() {
- return false;
- }
-
- public boolean isWeapon() {
- return true;
- }
-
- public boolean isMinableBlock(Block aBlock, byte aMetaData) {
- String tTool = aBlock.getHarvestTool(aMetaData);
- return ((tTool != null) && (tTool.equals("axe"))) || (aBlock.getMaterial() == Material.wood);
- }
-
- public int convertBlockDrops(List<ItemStack> aDrops, ItemStack aStack, EntityPlayer aPlayer, Block aBlock, int aX, int aY, int aZ, byte aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent) {
- int rAmount = 0;
- if ((GregTech_API.sTimber) && (!aPlayer.isSneaking()) && (OrePrefixes.log.contains(new ItemStack(aBlock, 1, aMetaData)))) {
- int tY = aY + 1;
- for (int tH = aPlayer.worldObj.getHeight(); tY < tH; tY++) {
- if ((aPlayer.worldObj.getBlock(aX, tY, aZ) != aBlock) || (!aPlayer.worldObj.func_147480_a(aX, tY, aZ, true))) {
- break;
- }
- rAmount++;
- }
- }
- return rAmount;
- }
-
- public ItemStack getBrokenItem(ItemStack aStack) {
- return null;
- }
-
- public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) {
- return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mIconSet.mTextures[OrePrefixes.toolHeadAxe.mTextureIndex] : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mIconSet.mTextures[OrePrefixes.stick.mTextureIndex];
- }
-
- public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) {
- return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa;
- }
-
- public void onStatsAddedToTool(GT_MetaGenerated_Tool aItem, int aID) {
- }
-
- public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) {
- return new ChatComponentText(EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE + " has been chopped by " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE);
- }
-}
+package gregtech.common.tools; + +import gregtech.api.GregTech_API; +import gregtech.api.enums.OrePrefixes; +import gregtech.api.interfaces.IIconContainer; +import gregtech.api.items.GT_MetaGenerated_Tool; +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.util.ChatComponentText; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.IChatComponent; +import net.minecraftforge.event.world.BlockEvent; + +import java.util.List; + +public class GT_Tool_Axe + extends GT_Tool { + public int getToolDamagePerBlockBreak() { + return 50; + } + + public int getToolDamagePerDropConversion() { + return 100; + } + + public int getToolDamagePerContainerCraft() { + return 100; + } + + public int getToolDamagePerEntityAttack() { + return 200; + } + + public int getBaseQuality() { + return 0; + } + + public float getBaseDamage() { + return 3.0F; + } + + public float getSpeedMultiplier() { + return 2.0F; + } + + public float getMaxDurabilityMultiplier() { + return 1.0F; + } + + public String getCraftingSound() { + return null; + } + + public String getEntityHitSound() { + return null; + } + + public String getBreakingSound() { + return (String) GregTech_API.sSoundList.get(Integer.valueOf(0)); + } + + public String getMiningSound() { + return null; + } + + public boolean canBlock() { + return false; + } + + public boolean isCrowbar() { + return false; + } + + public boolean isWeapon() { + return true; + } + + public boolean isMinableBlock(Block aBlock, byte aMetaData) { + String tTool = aBlock.getHarvestTool(aMetaData); + return ((tTool != null) && (tTool.equals("axe"))) || (aBlock.getMaterial() == Material.wood); + } + + public int convertBlockDrops(List<ItemStack> aDrops, ItemStack aStack, EntityPlayer aPlayer, Block aBlock, int aX, int aY, int aZ, byte aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent) { + int rAmount = 0; + if ((GregTech_API.sTimber) && (!aPlayer.isSneaking()) && (OrePrefixes.log.contains(new ItemStack(aBlock, 1, aMetaData)))) { + int tY = aY + 1; + for (int tH = aPlayer.worldObj.getHeight(); tY < tH; tY++) { + if ((aPlayer.worldObj.getBlock(aX, tY, aZ) != aBlock) || (!aPlayer.worldObj.func_147480_a(aX, tY, aZ, true))) { + break; + } + rAmount++; + } + } + return rAmount; + } + + public ItemStack getBrokenItem(ItemStack aStack) { + return null; + } + + public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { + return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mIconSet.mTextures[OrePrefixes.toolHeadAxe.mTextureIndex] : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mIconSet.mTextures[OrePrefixes.stick.mTextureIndex]; + } + + public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { + return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; + } + + public void onStatsAddedToTool(GT_MetaGenerated_Tool aItem, int aID) { + } + + public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) { + return new ChatComponentText(EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE + " has been chopped by " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE); + } +} diff --git a/src/main/java/gregtech/common/tools/GT_Tool_BranchCutter.java b/src/main/java/gregtech/common/tools/GT_Tool_BranchCutter.java index 7cefcdfd8d..3707650b3c 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_BranchCutter.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_BranchCutter.java @@ -1,77 +1,77 @@ -package gregtech.common.tools;
-
-import gregtech.api.enums.Textures;
-import gregtech.api.interfaces.IIconContainer;
-import gregtech.api.items.GT_MetaGenerated_Tool;
-import gregtech.api.util.GT_ModHandler;
-import gregtech.api.util.GT_Utility;
-import net.minecraft.block.Block;
-import net.minecraft.block.material.Material;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Blocks;
-import net.minecraft.init.Items;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.ChatComponentText;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.IChatComponent;
-import net.minecraftforge.event.world.BlockEvent;
-
-import java.util.List;
-
-public class GT_Tool_BranchCutter
- extends GT_Tool {
- public float getBaseDamage() {
- return 2.5F;
- }
-
- public float getSpeedMultiplier() {
- return 0.25F;
- }
-
- public float getMaxDurabilityMultiplier() {
- return 0.25F;
- }
-
- public boolean isGrafter() {
- return true;
- }
-
- public int convertBlockDrops(List<ItemStack> aDrops, ItemStack aStack, EntityPlayer aPlayer, Block aBlock, int aX, int aY, int aZ, byte aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent) {
- if (aBlock.getMaterial() == Material.leaves) {
- aEvent.dropChance = Math.min(1.0F, Math.max(aEvent.dropChance, (aStack.getItem().getHarvestLevel(aStack, "") + 1) * 0.2F));
- if (aBlock == Blocks.leaves) {
- aDrops.clear();
- if (((aMetaData & 0x3) == 0) && (aPlayer.worldObj.rand.nextInt(9) <= aFortune * 2)) {
- aDrops.add(new ItemStack(Items.apple, 1, 0));
- } else {
- aDrops.add(new ItemStack(Blocks.sapling, 1, aMetaData & 0x3));
- }
- } else if (aBlock == Blocks.leaves2) {
- aDrops.clear();
- aDrops.add(new ItemStack(Blocks.sapling, 1, (aMetaData & 0x3) + 4));
- } else if (aBlock == GT_Utility.getBlockFromStack(GT_ModHandler.getIC2Item("rubberLeaves", 1L))) {
- aDrops.clear();
- aDrops.add(GT_ModHandler.getIC2Item("rubberSapling", 1L));
- }
- }
- return 0;
- }
-
- public boolean isMinableBlock(Block aBlock, byte aMetaData) {
- String tTool = aBlock.getHarvestTool(aMetaData);
- return ((tTool != null) && (tTool.equals("grafter"))) || (aBlock.getMaterial() == Material.leaves);
- }
-
- public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) {
- return aIsToolHead ? Textures.ItemIcons.GRAFTER : null;
- }
-
- public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) {
- return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa;
- }
-
- public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) {
- return new ChatComponentText(EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE + " has been trimmed by " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE);
- }
-}
+package gregtech.common.tools; + +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.IIconContainer; +import gregtech.api.items.GT_MetaGenerated_Tool; +import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_Utility; +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; +import net.minecraft.util.ChatComponentText; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.IChatComponent; +import net.minecraftforge.event.world.BlockEvent; + +import java.util.List; + +public class GT_Tool_BranchCutter + extends GT_Tool { + public float getBaseDamage() { + return 2.5F; + } + + public float getSpeedMultiplier() { + return 0.25F; + } + + public float getMaxDurabilityMultiplier() { + return 0.25F; + } + + public boolean isGrafter() { + return true; + } + + public int convertBlockDrops(List<ItemStack> aDrops, ItemStack aStack, EntityPlayer aPlayer, Block aBlock, int aX, int aY, int aZ, byte aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent) { + if (aBlock.getMaterial() == Material.leaves) { + aEvent.dropChance = Math.min(1.0F, Math.max(aEvent.dropChance, (aStack.getItem().getHarvestLevel(aStack, "") + 1) * 0.2F)); + if (aBlock == Blocks.leaves) { + aDrops.clear(); + if (((aMetaData & 0x3) == 0) && (aPlayer.worldObj.rand.nextInt(9) <= aFortune * 2)) { + aDrops.add(new ItemStack(Items.apple, 1, 0)); + } else { + aDrops.add(new ItemStack(Blocks.sapling, 1, aMetaData & 0x3)); + } + } else if (aBlock == Blocks.leaves2) { + aDrops.clear(); + aDrops.add(new ItemStack(Blocks.sapling, 1, (aMetaData & 0x3) + 4)); + } else if (aBlock == GT_Utility.getBlockFromStack(GT_ModHandler.getIC2Item("rubberLeaves", 1L))) { + aDrops.clear(); + aDrops.add(GT_ModHandler.getIC2Item("rubberSapling", 1L)); + } + } + return 0; + } + + public boolean isMinableBlock(Block aBlock, byte aMetaData) { + String tTool = aBlock.getHarvestTool(aMetaData); + return ((tTool != null) && (tTool.equals("grafter"))) || (aBlock.getMaterial() == Material.leaves); + } + + public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { + return aIsToolHead ? Textures.ItemIcons.GRAFTER : null; + } + + public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { + return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; + } + + public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) { + return new ChatComponentText(EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE + " has been trimmed by " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE); + } +} diff --git a/src/main/java/gregtech/common/tools/GT_Tool_ButcheryKnife.java b/src/main/java/gregtech/common/tools/GT_Tool_ButcheryKnife.java index 9208079520..8700c1835b 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_ButcheryKnife.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_ButcheryKnife.java @@ -1,80 +1,80 @@ -package gregtech.common.tools;
-
-import gregtech.api.enums.Textures;
-import gregtech.api.interfaces.IIconContainer;
-import gregtech.api.items.GT_MetaGenerated_Tool;
-import net.minecraft.block.Block;
-import net.minecraft.enchantment.Enchantment;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.ChatComponentText;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.IChatComponent;
-
-public class GT_Tool_ButcheryKnife
- extends GT_Tool {
- public int getToolDamagePerBlockBreak() {
- return 200;
- }
-
- public int getToolDamagePerDropConversion() {
- return 100;
- }
-
- public int getToolDamagePerContainerCraft() {
- return 100;
- }
-
- public int getToolDamagePerEntityAttack() {
- return 400;
- }
-
- public float getBaseDamage() {
- return 1.0F;
- }
-
- public int getHurtResistanceTime(int aOriginalHurtResistance, Entity aEntity) {
- return aOriginalHurtResistance * 2;
- }
-
- public float getSpeedMultiplier() {
- return 0.1F;
- }
-
- public float getMaxDurabilityMultiplier() {
- return 1.0F;
- }
-
- public boolean isWeapon() {
- return true;
- }
-
- public boolean isMiningTool() {
- return false;
- }
-
- public Enchantment[] getEnchantments(ItemStack aStack) {
- return LOOTING_ENCHANTMENT;
- }
-
- public int[] getEnchantmentLevels(ItemStack aStack) {
- return new int[]{(2 + GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mToolQuality) / 2};
- }
-
- public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) {
- return aIsToolHead ? Textures.ItemIcons.BUTCHERYKNIFE : null;
- }
-
- public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) {
- return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa;
- }
-
- public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) {
- return new ChatComponentText(EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE + " has butchered " + EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE);
- }
-
- public boolean isMinableBlock(Block aBlock, byte aMetaData) {
- return false;
- }
-}
+package gregtech.common.tools; + +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.IIconContainer; +import gregtech.api.items.GT_MetaGenerated_Tool; +import net.minecraft.block.Block; +import net.minecraft.enchantment.Enchantment; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.item.ItemStack; +import net.minecraft.util.ChatComponentText; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.IChatComponent; + +public class GT_Tool_ButcheryKnife + extends GT_Tool { + public int getToolDamagePerBlockBreak() { + return 200; + } + + public int getToolDamagePerDropConversion() { + return 100; + } + + public int getToolDamagePerContainerCraft() { + return 100; + } + + public int getToolDamagePerEntityAttack() { + return 400; + } + + public float getBaseDamage() { + return 1.0F; + } + + public int getHurtResistanceTime(int aOriginalHurtResistance, Entity aEntity) { + return aOriginalHurtResistance * 2; + } + + public float getSpeedMultiplier() { + return 0.1F; + } + + public float getMaxDurabilityMultiplier() { + return 1.0F; + } + + public boolean isWeapon() { + return true; + } + + public boolean isMiningTool() { + return false; + } + + public Enchantment[] getEnchantments(ItemStack aStack) { + return LOOTING_ENCHANTMENT; + } + + public int[] getEnchantmentLevels(ItemStack aStack) { + return new int[]{(2 + GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mToolQuality) / 2}; + } + + public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { + return aIsToolHead ? Textures.ItemIcons.BUTCHERYKNIFE : null; + } + + public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { + return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; + } + + public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) { + return new ChatComponentText(EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE + " has butchered " + EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE); + } + + public boolean isMinableBlock(Block aBlock, byte aMetaData) { + return false; + } +} diff --git a/src/main/java/gregtech/common/tools/GT_Tool_BuzzSaw.java b/src/main/java/gregtech/common/tools/GT_Tool_BuzzSaw.java index d92baa7f98..1a0a6c13e7 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_BuzzSaw.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_BuzzSaw.java @@ -1,63 +1,63 @@ -package gregtech.common.tools;
-
-import gregtech.api.GregTech_API;
-import gregtech.api.enums.Textures;
-import gregtech.api.interfaces.IIconContainer;
-import gregtech.api.items.GT_MetaGenerated_Tool;
-import net.minecraft.block.Block;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.ChatComponentText;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.IChatComponent;
-
-public class GT_Tool_BuzzSaw
- extends GT_Tool_Saw {
- public int getToolDamagePerContainerCraft() {
- return 100;
- }
-
- public int getToolDamagePerEntityAttack() {
- return 300;
- }
-
- public float getBaseDamage() {
- return 1.0F;
- }
-
- public float getMaxDurabilityMultiplier() {
- return 1.0F;
- }
-
- public String getCraftingSound() {
- return (String) GregTech_API.sSoundList.get(Integer.valueOf(104));
- }
-
- public String getEntityHitSound() {
- return (String) GregTech_API.sSoundList.get(Integer.valueOf(105));
- }
-
- public String getBreakingSound() {
- return (String) GregTech_API.sSoundList.get(Integer.valueOf(0));
- }
-
- public String getMiningSound() {
- return (String) GregTech_API.sSoundList.get(Integer.valueOf(104));
- }
-
- public boolean isMinableBlock(Block aBlock, byte aMetaData) {
- return false;
- }
-
- public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) {
- return !aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadBuzzSaw.mTextureIndex] : Textures.ItemIcons.HANDLE_BUZZSAW;
- }
-
- public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) {
- return !aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa;
- }
-
- public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) {
- return new ChatComponentText(EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE + " got buzzed by " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE);
- }
-}
+package gregtech.common.tools; + +import gregtech.api.GregTech_API; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.IIconContainer; +import gregtech.api.items.GT_MetaGenerated_Tool; +import net.minecraft.block.Block; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.item.ItemStack; +import net.minecraft.util.ChatComponentText; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.IChatComponent; + +public class GT_Tool_BuzzSaw + extends GT_Tool_Saw { + public int getToolDamagePerContainerCraft() { + return 100; + } + + public int getToolDamagePerEntityAttack() { + return 300; + } + + public float getBaseDamage() { + return 1.0F; + } + + public float getMaxDurabilityMultiplier() { + return 1.0F; + } + + public String getCraftingSound() { + return (String) GregTech_API.sSoundList.get(Integer.valueOf(104)); + } + + public String getEntityHitSound() { + return (String) GregTech_API.sSoundList.get(Integer.valueOf(105)); + } + + public String getBreakingSound() { + return (String) GregTech_API.sSoundList.get(Integer.valueOf(0)); + } + + public String getMiningSound() { + return (String) GregTech_API.sSoundList.get(Integer.valueOf(104)); + } + + public boolean isMinableBlock(Block aBlock, byte aMetaData) { + return false; + } + + public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { + return !aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadBuzzSaw.mTextureIndex] : Textures.ItemIcons.HANDLE_BUZZSAW; + } + + public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { + return !aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; + } + + public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) { + return new ChatComponentText(EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE + " got buzzed by " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE); + } +} diff --git a/src/main/java/gregtech/common/tools/GT_Tool_Chainsaw_HV.java b/src/main/java/gregtech/common/tools/GT_Tool_Chainsaw_HV.java index d5f86f4b0a..2ca6b688ff 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Chainsaw_HV.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Chainsaw_HV.java @@ -1,44 +1,44 @@ -package gregtech.common.tools;
-
-import gregtech.api.enums.Textures;
-import gregtech.api.interfaces.IIconContainer;
-import net.minecraft.item.ItemStack;
-
-public class GT_Tool_Chainsaw_HV
- extends GT_Tool_Chainsaw_LV {
- public int getToolDamagePerBlockBreak() {
- return 800;
- }
-
- public int getToolDamagePerDropConversion() {
- return 1600;
- }
-
- public int getToolDamagePerContainerCraft() {
- return 12800;
- }
-
- public int getToolDamagePerEntityAttack() {
- return 3200;
- }
-
- public int getBaseQuality() {
- return 1;
- }
-
- public float getBaseDamage() {
- return 4.0F;
- }
-
- public float getSpeedMultiplier() {
- return 4.0F;
- }
-
- public float getMaxDurabilityMultiplier() {
- return 4.0F;
- }
-
- public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) {
- return aIsToolHead ? gregtech.api.items.GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadChainsaw.mTextureIndex] : Textures.ItemIcons.POWER_UNIT_HV;
- }
-}
+package gregtech.common.tools; + +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.IIconContainer; +import net.minecraft.item.ItemStack; + +public class GT_Tool_Chainsaw_HV + extends GT_Tool_Chainsaw_LV { + public int getToolDamagePerBlockBreak() { + return 800; + } + + public int getToolDamagePerDropConversion() { + return 1600; + } + + public int getToolDamagePerContainerCraft() { + return 12800; + } + + public int getToolDamagePerEntityAttack() { + return 3200; + } + + public int getBaseQuality() { + return 1; + } + + public float getBaseDamage() { + return 4.0F; + } + + public float getSpeedMultiplier() { + return 4.0F; + } + + public float getMaxDurabilityMultiplier() { + return 4.0F; + } + + public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { + return aIsToolHead ? gregtech.api.items.GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadChainsaw.mTextureIndex] : Textures.ItemIcons.POWER_UNIT_HV; + } +} diff --git a/src/main/java/gregtech/common/tools/GT_Tool_Chainsaw_LV.java b/src/main/java/gregtech/common/tools/GT_Tool_Chainsaw_LV.java index a1acbf100b..0572218257 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Chainsaw_LV.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Chainsaw_LV.java @@ -1,150 +1,148 @@ -package gregtech.common.tools;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Random;
-
-import gregtech.GT_Mod;
-import gregtech.api.GregTech_API;
-import gregtech.api.enums.OrePrefixes;
-import gregtech.api.enums.Textures;
-import gregtech.api.interfaces.IIconContainer;
-import gregtech.api.items.GT_MetaGenerated_Tool;
-import net.minecraft.block.Block;
-import net.minecraft.block.material.Material;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.entity.item.EntityItem;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Blocks;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.ChatComponentText;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.IChatComponent;
-import net.minecraftforge.common.IShearable;
-import net.minecraftforge.event.world.BlockEvent;
-
-public class GT_Tool_Chainsaw_LV
- extends GT_Tool_Saw {
- public int getToolDamagePerBlockBreak() {
- return 50;
- }
-
- public int getToolDamagePerDropConversion() {
- return 100;
- }
-
- public int getToolDamagePerContainerCraft() {
- return 800;
- }
-
- public int getToolDamagePerEntityAttack() {
- return 200;
- }
-
- public int getBaseQuality() {
- return 0;
- }
-
- public float getBaseDamage() {
- return 3.0F;
- }
-
- public float getSpeedMultiplier() {
- return 2.0F;
- }
-
- public float getMaxDurabilityMultiplier() {
- return 1.0F;
- }
-
- public String getCraftingSound() {
- return (String) GregTech_API.sSoundList.get(Integer.valueOf(104));
- }
-
- public String getEntityHitSound() {
- return (String) GregTech_API.sSoundList.get(Integer.valueOf(105));
- }
-
- public String getBreakingSound() {
- return (String) GregTech_API.sSoundList.get(Integer.valueOf(0));
- }
-
- public String getMiningSound() {
- return (String) GregTech_API.sSoundList.get(Integer.valueOf(104));
- }
-
- public boolean canBlock() {
- return false;
- }
-
- public boolean isChainsaw(){
- return true;
- }
-
- public boolean isWeapon() {
- return true;
- }
-
- public void onToolCrafted(ItemStack aStack, EntityPlayer aPlayer) {
- super.onToolCrafted(aStack, aPlayer);
- try {
- GT_Mod.instance.achievements.issueAchievement(aPlayer, "brrrr");
- GT_Mod.instance.achievements.issueAchievement(aPlayer, "buildChainsaw");
- } catch (Exception e) {
- }
- }
- @Override
- public int convertBlockDrops(List<ItemStack> aDrops, ItemStack aStack, EntityPlayer aPlayer, Block aBlock, int aX, int aY, int aZ, byte aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent) {
- int rAmount = 0;
- if ((aBlock.getMaterial() == Material.leaves) && ((aBlock instanceof IShearable))) {
- aPlayer.worldObj.setBlock(aX, aY, aZ, aBlock, aMetaData, 0);
- if (((IShearable) aBlock).isShearable(aStack, aPlayer.worldObj, aX, aY, aZ)) {
- ArrayList<ItemStack> tDrops = ((IShearable) aBlock).onSheared(aStack, aPlayer.worldObj, aX, aY, aZ, aFortune);
- aDrops.clear();
-// aDrops.addAll(tDrops);
-// aEvent.dropChance = 1.0F;
-// for (ItemStack stack : tDrops)
-// {
-// Random itemRand = new Random();
-// float f = 0.7F;
-// double d = itemRand.nextFloat() * f + (1.0F - f) * 0.5D;
-// double d1 = itemRand.nextFloat() * f + (1.0F - f) * 0.5D;
-// double d2 = itemRand.nextFloat() * f + (1.0F - f) * 0.5D;
-// EntityItem entityitem = new EntityItem(aPlayer.worldObj, aX + d, aY + d1, aZ + d2, stack);
-// entityitem.delayBeforeCanPickup = 10;
-// aPlayer.worldObj.spawnEntityInWorld(entityitem);
-// }
-// aPlayer.addStat(net.minecraft.stats.StatList.mineBlockStatArray[Block.getIdFromBlock(aBlock)], 1);
- }
- aPlayer.worldObj.setBlock(aX, aY, aZ, Blocks.air, 0, 0);
- } else
- if (((aBlock.getMaterial() == Material.ice) || (aBlock.getMaterial() == Material.packedIce)) && (aDrops.isEmpty())) {
- aDrops.add(new ItemStack(aBlock, 1, aMetaData));
- aPlayer.worldObj.setBlockToAir(aX, aY, aZ);
- aEvent.dropChance = 1.0F;
- return 1;
- }
- if ((GregTech_API.sTimber) && (!aPlayer.isSneaking()) && (OrePrefixes.log.contains(new ItemStack(aBlock, 1, aMetaData)))) {
- int tY = aY + 1;
- for (int tH = aPlayer.worldObj.getHeight(); tY < tH; tY++) {
- if ((aPlayer.worldObj.getBlock(aX, tY, aZ) != aBlock) || (!aPlayer.worldObj.func_147480_a(aX, tY, aZ, true))) {
- break;
- }
- rAmount++;
- }
- }
- return rAmount;
- }
-
- public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) {
- return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadChainsaw.mTextureIndex] : Textures.ItemIcons.POWER_UNIT_LV;
- }
-
- public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) {
- return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa;
- }
-
- public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) {
- return new ChatComponentText(EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE + " was massacred by " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE);
- }
-}
+package gregtech.common.tools; + +import gregtech.GT_Mod; +import gregtech.api.GregTech_API; +import gregtech.api.enums.OrePrefixes; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.IIconContainer; +import gregtech.api.items.GT_MetaGenerated_Tool; +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.item.ItemStack; +import net.minecraft.util.ChatComponentText; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.IChatComponent; +import net.minecraftforge.common.IShearable; +import net.minecraftforge.event.world.BlockEvent; + +import java.util.ArrayList; +import java.util.List; + +public class GT_Tool_Chainsaw_LV + extends GT_Tool_Saw { + public int getToolDamagePerBlockBreak() { + return 50; + } + + public int getToolDamagePerDropConversion() { + return 100; + } + + public int getToolDamagePerContainerCraft() { + return 800; + } + + public int getToolDamagePerEntityAttack() { + return 200; + } + + public int getBaseQuality() { + return 0; + } + + public float getBaseDamage() { + return 3.0F; + } + + public float getSpeedMultiplier() { + return 2.0F; + } + + public float getMaxDurabilityMultiplier() { + return 1.0F; + } + + public String getCraftingSound() { + return (String) GregTech_API.sSoundList.get(Integer.valueOf(104)); + } + + public String getEntityHitSound() { + return (String) GregTech_API.sSoundList.get(Integer.valueOf(105)); + } + + public String getBreakingSound() { + return (String) GregTech_API.sSoundList.get(Integer.valueOf(0)); + } + + public String getMiningSound() { + return (String) GregTech_API.sSoundList.get(Integer.valueOf(104)); + } + + public boolean canBlock() { + return false; + } + + public boolean isChainsaw(){ + return true; + } + + public boolean isWeapon() { + return true; + } + + public void onToolCrafted(ItemStack aStack, EntityPlayer aPlayer) { + super.onToolCrafted(aStack, aPlayer); + try { + GT_Mod.instance.achievements.issueAchievement(aPlayer, "brrrr"); + GT_Mod.instance.achievements.issueAchievement(aPlayer, "buildChainsaw"); + } catch (Exception e) { + } + } + @Override + public int convertBlockDrops(List<ItemStack> aDrops, ItemStack aStack, EntityPlayer aPlayer, Block aBlock, int aX, int aY, int aZ, byte aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent) { + int rAmount = 0; + if ((aBlock.getMaterial() == Material.leaves) && ((aBlock instanceof IShearable))) { + aPlayer.worldObj.setBlock(aX, aY, aZ, aBlock, aMetaData, 0); + if (((IShearable) aBlock).isShearable(aStack, aPlayer.worldObj, aX, aY, aZ)) { + ArrayList<ItemStack> tDrops = ((IShearable) aBlock).onSheared(aStack, aPlayer.worldObj, aX, aY, aZ, aFortune); + aDrops.clear(); +// aDrops.addAll(tDrops); +// aEvent.dropChance = 1.0F; +// for (ItemStack stack : tDrops) +// { +// Random itemRand = new Random(); +// float f = 0.7F; +// double d = itemRand.nextFloat() * f + (1.0F - f) * 0.5D; +// double d1 = itemRand.nextFloat() * f + (1.0F - f) * 0.5D; +// double d2 = itemRand.nextFloat() * f + (1.0F - f) * 0.5D; +// EntityItem entityitem = new EntityItem(aPlayer.worldObj, aX + d, aY + d1, aZ + d2, stack); +// entityitem.delayBeforeCanPickup = 10; +// aPlayer.worldObj.spawnEntityInWorld(entityitem); +// } +// aPlayer.addStat(net.minecraft.stats.StatList.mineBlockStatArray[Block.getIdFromBlock(aBlock)], 1); + } + aPlayer.worldObj.setBlock(aX, aY, aZ, Blocks.air, 0, 0); + } else + if (((aBlock.getMaterial() == Material.ice) || (aBlock.getMaterial() == Material.packedIce)) && (aDrops.isEmpty())) { + aDrops.add(new ItemStack(aBlock, 1, aMetaData)); + aPlayer.worldObj.setBlockToAir(aX, aY, aZ); + aEvent.dropChance = 1.0F; + return 1; + } + if ((GregTech_API.sTimber) && (!aPlayer.isSneaking()) && (OrePrefixes.log.contains(new ItemStack(aBlock, 1, aMetaData)))) { + int tY = aY + 1; + for (int tH = aPlayer.worldObj.getHeight(); tY < tH; tY++) { + if ((aPlayer.worldObj.getBlock(aX, tY, aZ) != aBlock) || (!aPlayer.worldObj.func_147480_a(aX, tY, aZ, true))) { + break; + } + rAmount++; + } + } + return rAmount; + } + + public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { + return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadChainsaw.mTextureIndex] : Textures.ItemIcons.POWER_UNIT_LV; + } + + public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { + return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; + } + + public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) { + return new ChatComponentText(EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE + " was massacred by " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE); + } +} diff --git a/src/main/java/gregtech/common/tools/GT_Tool_Chainsaw_MV.java b/src/main/java/gregtech/common/tools/GT_Tool_Chainsaw_MV.java index 303420f0ba..0fcd74ebf7 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Chainsaw_MV.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Chainsaw_MV.java @@ -1,44 +1,44 @@ -package gregtech.common.tools;
-
-import gregtech.api.enums.Textures;
-import gregtech.api.interfaces.IIconContainer;
-import net.minecraft.item.ItemStack;
-
-public class GT_Tool_Chainsaw_MV
- extends GT_Tool_Chainsaw_LV {
- public int getToolDamagePerBlockBreak() {
- return 200;
- }
-
- public int getToolDamagePerDropConversion() {
- return 400;
- }
-
- public int getToolDamagePerContainerCraft() {
- return 3200;
- }
-
- public int getToolDamagePerEntityAttack() {
- return 800;
- }
-
- public int getBaseQuality() {
- return 1;
- }
-
- public float getBaseDamage() {
- return 3.5F;
- }
-
- public float getSpeedMultiplier() {
- return 3.0F;
- }
-
- public float getMaxDurabilityMultiplier() {
- return 2.0F;
- }
-
- public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) {
- return aIsToolHead ? gregtech.api.items.GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadChainsaw.mTextureIndex] : Textures.ItemIcons.POWER_UNIT_MV;
- }
-}
+package gregtech.common.tools; + +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.IIconContainer; +import net.minecraft.item.ItemStack; + +public class GT_Tool_Chainsaw_MV + extends GT_Tool_Chainsaw_LV { + public int getToolDamagePerBlockBreak() { + return 200; + } + + public int getToolDamagePerDropConversion() { + return 400; + } + + public int getToolDamagePerContainerCraft() { + return 3200; + } + + public int getToolDamagePerEntityAttack() { + return 800; + } + + public int getBaseQuality() { + return 1; + } + + public float getBaseDamage() { + return 3.5F; + } + + public float getSpeedMultiplier() { + return 3.0F; + } + + public float getMaxDurabilityMultiplier() { + return 2.0F; + } + + public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { + return aIsToolHead ? gregtech.api.items.GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadChainsaw.mTextureIndex] : Textures.ItemIcons.POWER_UNIT_MV; + } +} diff --git a/src/main/java/gregtech/common/tools/GT_Tool_Crowbar.java b/src/main/java/gregtech/common/tools/GT_Tool_Crowbar.java index 185f34b714..613037ea91 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Crowbar.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Crowbar.java @@ -1,117 +1,117 @@ -package gregtech.common.tools;
-
-import gregtech.api.GregTech_API;
-import gregtech.api.enums.Textures;
-import gregtech.api.interfaces.IIconContainer;
-import gregtech.api.interfaces.IToolStats;
-import gregtech.api.items.GT_MetaGenerated_Tool;
-import gregtech.common.items.GT_MetaGenerated_Tool_01;
-import gregtech.common.items.behaviors.Behaviour_Crowbar;
-import net.minecraft.block.Block;
-import net.minecraft.block.material.Material;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.ChatComponentText;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.IChatComponent;
-
-import java.util.Iterator;
-
-public class GT_Tool_Crowbar
- extends GT_Tool {
- public int getToolDamagePerBlockBreak() {
- return 50;
- }
-
- public int getToolDamagePerDropConversion() {
- return 100;
- }
-
- public int getToolDamagePerContainerCraft() {
- return 100;
- }
-
- public int getToolDamagePerEntityAttack() {
- return 200;
- }
-
- public int getBaseQuality() {
- return 0;
- }
-
- public float getBaseDamage() {
- return 2.0F;
- }
-
- public float getSpeedMultiplier() {
- return 1.0F;
- }
-
- public float getMaxDurabilityMultiplier() {
- return 1.0F;
- }
-
- public String getCraftingSound() {
- return (String) GregTech_API.sSoundList.get(Integer.valueOf(0));
- }
-
- public String getEntityHitSound() {
- return (String) GregTech_API.sSoundList.get(Integer.valueOf(0));
- }
-
- public String getBreakingSound() {
- return (String) GregTech_API.sSoundList.get(Integer.valueOf(0));
- }
-
- public String getMiningSound() {
- return (String) GregTech_API.sSoundList.get(Integer.valueOf(0));
- }
-
- public boolean canBlock() {
- return true;
- }
-
- public boolean isCrowbar() {
- return true;
- }
-
- public boolean isWeapon() {
- return true;
- }
-
- public boolean isMinableBlock(Block aBlock, byte aMetaData) {
- if (aBlock.getMaterial() == Material.circuits) {
- return true;
- }
- String tTool = aBlock.getHarvestTool(aMetaData);
- if ((tTool == null) || (tTool.equals(""))) {
- for (Iterator i$ = GT_MetaGenerated_Tool_01.INSTANCE.mToolStats.values().iterator(); i$.hasNext(); i$.next()) {
- if (((i$ instanceof GT_Tool_Crowbar)) && (!((IToolStats) i$).isMinableBlock(aBlock, aMetaData))) {
- return false;
- }
- }
- return true;
- }
- return tTool.equals("crowbar");
- }
-
- public ItemStack getBrokenItem(ItemStack aStack) {
- return null;
- }
-
- public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) {
- return aIsToolHead ? Textures.ItemIcons.CROWBAR : null;
- }
-
- public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) {
- return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : null;
- }
-
- public void onStatsAddedToTool(GT_MetaGenerated_Tool aItem, int aID) {
- aItem.addItemBehavior(aID, new Behaviour_Crowbar(1, 1000));
- }
-
- public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) {
- return new ChatComponentText(EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE + " was removed by " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE);
- }
-}
+package gregtech.common.tools; + +import gregtech.api.GregTech_API; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.IIconContainer; +import gregtech.api.interfaces.IToolStats; +import gregtech.api.items.GT_MetaGenerated_Tool; +import gregtech.common.items.GT_MetaGenerated_Tool_01; +import gregtech.common.items.behaviors.Behaviour_Crowbar; +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.item.ItemStack; +import net.minecraft.util.ChatComponentText; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.IChatComponent; + +import java.util.Iterator; + +public class GT_Tool_Crowbar + extends GT_Tool { + public int getToolDamagePerBlockBreak() { + return 50; + } + + public int getToolDamagePerDropConversion() { + return 100; + } + + public int getToolDamagePerContainerCraft() { + return 100; + } + + public int getToolDamagePerEntityAttack() { + return 200; + } + + public int getBaseQuality() { + return 0; + } + + public float getBaseDamage() { + return 2.0F; + } + + public float getSpeedMultiplier() { + return 1.0F; + } + + public float getMaxDurabilityMultiplier() { + return 1.0F; + } + + public String getCraftingSound() { + return (String) GregTech_API.sSoundList.get(Integer.valueOf(0)); + } + + public String getEntityHitSound() { + return (String) GregTech_API.sSoundList.get(Integer.valueOf(0)); + } + + public String getBreakingSound() { + return (String) GregTech_API.sSoundList.get(Integer.valueOf(0)); + } + + public String getMiningSound() { + return (String) GregTech_API.sSoundList.get(Integer.valueOf(0)); + } + + public boolean canBlock() { + return true; + } + + public boolean isCrowbar() { + return true; + } + + public boolean isWeapon() { + return true; + } + + public boolean isMinableBlock(Block aBlock, byte aMetaData) { + if (aBlock.getMaterial() == Material.circuits) { + return true; + } + String tTool = aBlock.getHarvestTool(aMetaData); + if ((tTool == null) || (tTool.equals(""))) { + for (Iterator i$ = GT_MetaGenerated_Tool_01.INSTANCE.mToolStats.values().iterator(); i$.hasNext(); i$.next()) { + if (((i$ instanceof GT_Tool_Crowbar)) && (!((IToolStats) i$).isMinableBlock(aBlock, aMetaData))) { + return false; + } + } + return true; + } + return tTool.equals("crowbar"); + } + + public ItemStack getBrokenItem(ItemStack aStack) { + return null; + } + + public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { + return aIsToolHead ? Textures.ItemIcons.CROWBAR : null; + } + + public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { + return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : null; + } + + public void onStatsAddedToTool(GT_MetaGenerated_Tool aItem, int aID) { + aItem.addItemBehavior(aID, new Behaviour_Crowbar(1, 1000)); + } + + public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) { + return new ChatComponentText(EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE + " was removed by " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE); + } +} diff --git a/src/main/java/gregtech/common/tools/GT_Tool_Drill_HV.java b/src/main/java/gregtech/common/tools/GT_Tool_Drill_HV.java index b9aaf72fa7..42968cf9e8 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Drill_HV.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Drill_HV.java @@ -1,55 +1,55 @@ -package gregtech.common.tools;
-
-import gregtech.GT_Mod;
-import gregtech.api.enums.Textures;
-import gregtech.api.interfaces.IIconContainer;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-
-public class GT_Tool_Drill_HV
- extends GT_Tool_Drill_LV {
- public int getToolDamagePerBlockBreak() {
- return GT_Mod.gregtechproxy.mHardRock ? 400 : 800;
- }
-
- public int getToolDamagePerDropConversion() {
- return 1600;
- }
-
- public int getToolDamagePerContainerCraft() {
- return 12800;
- }
-
- public int getToolDamagePerEntityAttack() {
- return 3200;
- }
-
- public int getBaseQuality() {
- return 1;
- }
-
- public float getBaseDamage() {
- return 3.0F;
- }
-
- public float getSpeedMultiplier() {
- return 9.0F;
- }
-
- public float getMaxDurabilityMultiplier() {
- return 4.0F;
- }
-
- public void onToolCrafted(ItemStack aStack, EntityPlayer aPlayer) {
- super.onToolCrafted(aStack, aPlayer);
- try {
- GT_Mod.instance.achievements.issueAchievement(aPlayer, "highpowerdrill");
- GT_Mod.instance.achievements.issueAchievement(aPlayer, "buildDDrill");
- } catch (Exception e) {
- }
- }
-
- public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) {
- return aIsToolHead ? gregtech.api.items.GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadDrill.mTextureIndex] : Textures.ItemIcons.POWER_UNIT_HV;
- }
-}
+package gregtech.common.tools; + +import gregtech.GT_Mod; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.IIconContainer; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; + +public class GT_Tool_Drill_HV + extends GT_Tool_Drill_LV { + public int getToolDamagePerBlockBreak() { + return GT_Mod.gregtechproxy.mHardRock ? 400 : 800; + } + + public int getToolDamagePerDropConversion() { + return 1600; + } + + public int getToolDamagePerContainerCraft() { + return 12800; + } + + public int getToolDamagePerEntityAttack() { + return 3200; + } + + public int getBaseQuality() { + return 1; + } + + public float getBaseDamage() { + return 3.0F; + } + + public float getSpeedMultiplier() { + return 9.0F; + } + + public float getMaxDurabilityMultiplier() { + return 4.0F; + } + + public void onToolCrafted(ItemStack aStack, EntityPlayer aPlayer) { + super.onToolCrafted(aStack, aPlayer); + try { + GT_Mod.instance.achievements.issueAchievement(aPlayer, "highpowerdrill"); + GT_Mod.instance.achievements.issueAchievement(aPlayer, "buildDDrill"); + } catch (Exception e) { + } + } + + public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { + return aIsToolHead ? gregtech.api.items.GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadDrill.mTextureIndex] : Textures.ItemIcons.POWER_UNIT_HV; + } +} diff --git a/src/main/java/gregtech/common/tools/GT_Tool_Drill_LV.java b/src/main/java/gregtech/common/tools/GT_Tool_Drill_LV.java index 8d70cf2afe..103d43f499 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Drill_LV.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Drill_LV.java @@ -1,110 +1,110 @@ -package gregtech.common.tools;
-
-import gregtech.GT_Mod;
-import gregtech.api.GregTech_API;
-import gregtech.api.enums.Textures;
-import gregtech.api.interfaces.IIconContainer;
-import gregtech.api.items.GT_MetaGenerated_Tool;
-import net.minecraft.block.Block;
-import net.minecraft.block.material.Material;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.stats.AchievementList;
-import net.minecraft.util.ChatComponentText;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.IChatComponent;
-
-public class GT_Tool_Drill_LV
- extends GT_Tool {
- public int getToolDamagePerBlockBreak() {
- return GT_Mod.gregtechproxy.mHardRock ? 25 : 50;
- }
-
- public int getToolDamagePerDropConversion() {
- return 100;
- }
-
- public int getToolDamagePerContainerCraft() {
- return 100;
- }
-
- public int getToolDamagePerEntityAttack() {
- return 200;
- }
-
- public int getBaseQuality() {
- return 0;
- }
-
- public float getBaseDamage() {
- return 2.0F;
- }
-
- public float getSpeedMultiplier() {
- return 3.0F;
- }
-
- public float getMaxDurabilityMultiplier() {
- return 1.0F;
- }
-
- public String getCraftingSound() {
- return (String) GregTech_API.sSoundList.get(Integer.valueOf(106));
- }
-
- public String getEntityHitSound() {
- return (String) GregTech_API.sSoundList.get(Integer.valueOf(106));
- }
-
- public String getBreakingSound() {
- return (String) GregTech_API.sSoundList.get(Integer.valueOf(106));
- }
-
- public String getMiningSound() {
- return (String) GregTech_API.sSoundList.get(Integer.valueOf(106));
- }
-
- public boolean canBlock() {
- return false;
- }
-
- public boolean isCrowbar() {
- return false;
- }
-
- public boolean isMinableBlock(Block aBlock, byte aMetaData) {
- String tTool = aBlock.getHarvestTool(aMetaData);
- return ((tTool != null) && ((tTool.equals("pickaxe")) || (tTool.equals("shovel")))) || (aBlock.getMaterial() == Material.rock) || (aBlock.getMaterial() == Material.iron) || (aBlock.getMaterial() == Material.anvil) || (aBlock.getMaterial() == Material.sand) || (aBlock.getMaterial() == Material.grass) || (aBlock.getMaterial() == Material.ground) || (aBlock.getMaterial() == Material.snow) || (aBlock.getMaterial() == Material.clay) || (aBlock.getMaterial() == Material.glass);
- }
-
- public ItemStack getBrokenItem(ItemStack aStack) {
- return null;
- }
-
- public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) {
- return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadDrill.mTextureIndex] : Textures.ItemIcons.POWER_UNIT_LV;
- }
-
- public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) {
- return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa;
- }
-
- public void onStatsAddedToTool(GT_MetaGenerated_Tool aItem, int aID) {
- }
-
- public void onToolCrafted(ItemStack aStack, EntityPlayer aPlayer) {
- super.onToolCrafted(aStack, aPlayer);
- aPlayer.triggerAchievement(AchievementList.buildPickaxe);
- aPlayer.triggerAchievement(AchievementList.buildBetterPickaxe);
- try {
- GT_Mod.instance.achievements.issueAchievement(aPlayer, "driltime");
- GT_Mod.instance.achievements.issueAchievement(aPlayer, "buildDrill");
- } catch (Exception e) {
- }
- }
-
- public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) {
- return new ChatComponentText(EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE + " got the Drill! (by " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE + ")");
- }
-}
+package gregtech.common.tools; + +import gregtech.GT_Mod; +import gregtech.api.GregTech_API; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.IIconContainer; +import gregtech.api.items.GT_MetaGenerated_Tool; +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.stats.AchievementList; +import net.minecraft.util.ChatComponentText; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.IChatComponent; + +public class GT_Tool_Drill_LV + extends GT_Tool { + public int getToolDamagePerBlockBreak() { + return GT_Mod.gregtechproxy.mHardRock ? 25 : 50; + } + + public int getToolDamagePerDropConversion() { + return 100; + } + + public int getToolDamagePerContainerCraft() { + return 100; + } + + public int getToolDamagePerEntityAttack() { + return 200; + } + + public int getBaseQuality() { + return 0; + } + + public float getBaseDamage() { + return 2.0F; + } + + public float getSpeedMultiplier() { + return 3.0F; + } + + public float getMaxDurabilityMultiplier() { + return 1.0F; + } + + public String getCraftingSound() { + return (String) GregTech_API.sSoundList.get(Integer.valueOf(106)); + } + + public String getEntityHitSound() { + return (String) GregTech_API.sSoundList.get(Integer.valueOf(106)); + } + + public String getBreakingSound() { + return (String) GregTech_API.sSoundList.get(Integer.valueOf(106)); + } + + public String getMiningSound() { + return (String) GregTech_API.sSoundList.get(Integer.valueOf(106)); + } + + public boolean canBlock() { + return false; + } + + public boolean isCrowbar() { + return false; + } + + public boolean isMinableBlock(Block aBlock, byte aMetaData) { + String tTool = aBlock.getHarvestTool(aMetaData); + return ((tTool != null) && ((tTool.equals("pickaxe")) || (tTool.equals("shovel")))) || (aBlock.getMaterial() == Material.rock) || (aBlock.getMaterial() == Material.iron) || (aBlock.getMaterial() == Material.anvil) || (aBlock.getMaterial() == Material.sand) || (aBlock.getMaterial() == Material.grass) || (aBlock.getMaterial() == Material.ground) || (aBlock.getMaterial() == Material.snow) || (aBlock.getMaterial() == Material.clay) || (aBlock.getMaterial() == Material.glass); + } + + public ItemStack getBrokenItem(ItemStack aStack) { + return null; + } + + public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { + return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadDrill.mTextureIndex] : Textures.ItemIcons.POWER_UNIT_LV; + } + + public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { + return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; + } + + public void onStatsAddedToTool(GT_MetaGenerated_Tool aItem, int aID) { + } + + public void onToolCrafted(ItemStack aStack, EntityPlayer aPlayer) { + super.onToolCrafted(aStack, aPlayer); + aPlayer.triggerAchievement(AchievementList.buildPickaxe); + aPlayer.triggerAchievement(AchievementList.buildBetterPickaxe); + try { + GT_Mod.instance.achievements.issueAchievement(aPlayer, "driltime"); + GT_Mod.instance.achievements.issueAchievement(aPlayer, "buildDrill"); + } catch (Exception e) { + } + } + + public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) { + return new ChatComponentText(EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE + " got the Drill! (by " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE + ")"); + } +} diff --git a/src/main/java/gregtech/common/tools/GT_Tool_Drill_MV.java b/src/main/java/gregtech/common/tools/GT_Tool_Drill_MV.java index 05c62579d0..de9c067f3c 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Drill_MV.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Drill_MV.java @@ -1,45 +1,45 @@ -package gregtech.common.tools;
-
-import gregtech.GT_Mod;
-import gregtech.api.enums.Textures;
-import gregtech.api.interfaces.IIconContainer;
-import net.minecraft.item.ItemStack;
-
-public class GT_Tool_Drill_MV
- extends GT_Tool_Drill_LV {
- public int getToolDamagePerBlockBreak() {
- return GT_Mod.gregtechproxy.mHardRock ? 100 : 200;
- }
-
- public int getToolDamagePerDropConversion() {
- return 400;
- }
-
- public int getToolDamagePerContainerCraft() {
- return 3200;
- }
-
- public int getToolDamagePerEntityAttack() {
- return 800;
- }
-
- public int getBaseQuality() {
- return 1;
- }
-
- public float getBaseDamage() {
- return 2.5F;
- }
-
- public float getSpeedMultiplier() {
- return 6.0F;
- }
-
- public float getMaxDurabilityMultiplier() {
- return 2.0F;
- }
-
- public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) {
- return aIsToolHead ? gregtech.api.items.GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadDrill.mTextureIndex] : Textures.ItemIcons.POWER_UNIT_MV;
- }
-}
+package gregtech.common.tools; + +import gregtech.GT_Mod; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.IIconContainer; +import net.minecraft.item.ItemStack; + +public class GT_Tool_Drill_MV + extends GT_Tool_Drill_LV { + public int getToolDamagePerBlockBreak() { + return GT_Mod.gregtechproxy.mHardRock ? 100 : 200; + } + + public int getToolDamagePerDropConversion() { + return 400; + } + + public int getToolDamagePerContainerCraft() { + return 3200; + } + + public int getToolDamagePerEntityAttack() { + return 800; + } + + public int getBaseQuality() { + return 1; + } + + public float getBaseDamage() { + return 2.5F; + } + + public float getSpeedMultiplier() { + return 6.0F; + } + + public float getMaxDurabilityMultiplier() { + return 2.0F; + } + + public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { + return aIsToolHead ? gregtech.api.items.GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadDrill.mTextureIndex] : Textures.ItemIcons.POWER_UNIT_MV; + } +} diff --git a/src/main/java/gregtech/common/tools/GT_Tool_File.java b/src/main/java/gregtech/common/tools/GT_Tool_File.java index d5a94e1eb9..19975f1228 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_File.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_File.java @@ -1,99 +1,99 @@ -package gregtech.common.tools;
-
-import gregtech.api.GregTech_API;
-import gregtech.api.enums.Textures;
-import gregtech.api.interfaces.IIconContainer;
-import gregtech.api.items.GT_MetaGenerated_Tool;
-import net.minecraft.block.Block;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.ChatComponentText;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.IChatComponent;
-
-public class GT_Tool_File
- extends GT_Tool {
- public int getToolDamagePerBlockBreak() {
- return 50;
- }
-
- public int getToolDamagePerDropConversion() {
- return 100;
- }
-
- public int getToolDamagePerContainerCraft() {
- return 400;
- }
-
- public int getToolDamagePerEntityAttack() {
- return 200;
- }
-
- public int getBaseQuality() {
- return 0;
- }
-
- public float getBaseDamage() {
- return 1.5F;
- }
-
- public float getSpeedMultiplier() {
- return 1.0F;
- }
-
- public float getMaxDurabilityMultiplier() {
- return 1.0F;
- }
-
- public String getCraftingSound() {
- return null;
- }
-
- public String getEntityHitSound() {
- return null;
- }
-
- public String getBreakingSound() {
- return (String) GregTech_API.sSoundList.get(Integer.valueOf(0));
- }
-
- public String getMiningSound() {
- return null;
- }
-
- public boolean canBlock() {
- return true;
- }
-
- public boolean isCrowbar() {
- return false;
- }
-
- public boolean isMiningTool() {
- return false;
- }
-
- public boolean isMinableBlock(Block aBlock, byte aMetaData) {
- String tTool = aBlock.getHarvestTool(aMetaData);
- return ((tTool != null) && tTool.equals("file"));
- }
-
- public ItemStack getBrokenItem(ItemStack aStack) {
- return null;
- }
-
- public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) {
- return !aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadFile.mTextureIndex] : Textures.ItemIcons.HANDLE_FILE;
- }
-
- public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) {
- return !aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa;
- }
-
- public void onStatsAddedToTool(GT_MetaGenerated_Tool aItem, int aID) {
- }
-
- public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) {
- return new ChatComponentText(EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE + " has been filed D for 'Dead' by " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE);
- }
-}
+package gregtech.common.tools; + +import gregtech.api.GregTech_API; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.IIconContainer; +import gregtech.api.items.GT_MetaGenerated_Tool; +import net.minecraft.block.Block; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.item.ItemStack; +import net.minecraft.util.ChatComponentText; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.IChatComponent; + +public class GT_Tool_File + extends GT_Tool { + public int getToolDamagePerBlockBreak() { + return 50; + } + + public int getToolDamagePerDropConversion() { + return 100; + } + + public int getToolDamagePerContainerCraft() { + return 400; + } + + public int getToolDamagePerEntityAttack() { + return 200; + } + + public int getBaseQuality() { + return 0; + } + + public float getBaseDamage() { + return 1.5F; + } + + public float getSpeedMultiplier() { + return 1.0F; + } + + public float getMaxDurabilityMultiplier() { + return 1.0F; + } + + public String getCraftingSound() { + return null; + } + + public String getEntityHitSound() { + return null; + } + + public String getBreakingSound() { + return (String) GregTech_API.sSoundList.get(Integer.valueOf(0)); + } + + public String getMiningSound() { + return null; + } + + public boolean canBlock() { + return true; + } + + public boolean isCrowbar() { + return false; + } + + public boolean isMiningTool() { + return false; + } + + public boolean isMinableBlock(Block aBlock, byte aMetaData) { + String tTool = aBlock.getHarvestTool(aMetaData); + return ((tTool != null) && tTool.equals("file")); + } + + public ItemStack getBrokenItem(ItemStack aStack) { + return null; + } + + public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { + return !aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadFile.mTextureIndex] : Textures.ItemIcons.HANDLE_FILE; + } + + public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { + return !aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; + } + + public void onStatsAddedToTool(GT_MetaGenerated_Tool aItem, int aID) { + } + + public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) { + return new ChatComponentText(EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE + " has been filed D for 'Dead' by " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE); + } +} diff --git a/src/main/java/gregtech/common/tools/GT_Tool_HardHammer.java b/src/main/java/gregtech/common/tools/GT_Tool_HardHammer.java index e7558fb432..9f321a5bfe 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_HardHammer.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_HardHammer.java @@ -1,155 +1,155 @@ -package gregtech.common.tools;
-
-import gregtech.GT_Mod;
-import gregtech.api.GregTech_API;
-import gregtech.api.interfaces.IIconContainer;
-import gregtech.api.items.GT_MetaGenerated_Tool;
-import gregtech.api.util.GT_Recipe;
-import gregtech.api.util.GT_Utility;
-import gregtech.common.items.behaviors.Behaviour_Prospecting;
-import net.minecraft.block.Block;
-import net.minecraft.block.material.Material;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.entity.monster.EntityIronGolem;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.ChatComponentText;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.IChatComponent;
-import net.minecraftforge.event.world.BlockEvent;
-
-import java.util.Arrays;
-import java.util.List;
-
-public class GT_Tool_HardHammer
- extends GT_Tool {
- public static final List<String> mEffectiveList = Arrays.asList(new String[]{EntityIronGolem.class.getName(), "EntityTowerGuardian"});
-
- public float getNormalDamageAgainstEntity(float aOriginalDamage, Entity aEntity, ItemStack aStack, EntityPlayer aPlayer) {
- String tName = aEntity.getClass().getName();
- tName = tName.substring(tName.lastIndexOf('.') + 1);
- return (mEffectiveList.contains(tName)) || (tName.contains("Golem")) ? aOriginalDamage * 2.0F : aOriginalDamage;
- }
-
- public int getToolDamagePerBlockBreak() {
- return 50;
- }
-
- public int getToolDamagePerDropConversion() {
- return 200;
- }
-
- public int getToolDamagePerContainerCraft() {
- return 400;
- }
-
- public int getToolDamagePerEntityAttack() {
- return 200;
- }
-
- public int getBaseQuality() {
- return 0;
- }
-
- public float getBaseDamage() {
- return 3.0F;
- }
-
- public int getHurtResistanceTime(int aOriginalHurtResistance, Entity aEntity) {
- return aOriginalHurtResistance * 2;
- }
-
- public float getSpeedMultiplier() {
- return 0.75F;
- }
-
- public float getMaxDurabilityMultiplier() {
- return 1.0F;
- }
-
- public String getCraftingSound() {
- return (String) GregTech_API.sSoundList.get(Integer.valueOf(1));
- }
-
- public String getEntityHitSound() {
- return null;
- }
-
- public String getBreakingSound() {
- return (String) GregTech_API.sSoundList.get(Integer.valueOf(2));
- }
-
- public String getMiningSound() {
- return null;
- }
-
- public boolean canBlock() {
- return true;
- }
-
- public boolean isCrowbar() {
- return false;
- }
-
- public boolean isWeapon() {
- return true;
- }
-
- public boolean isMinableBlock(Block aBlock, byte aMetaData) {
- String tTool = aBlock.getHarvestTool(aMetaData);
- return ((tTool != null) && ((tTool.equals("hammer")) || (tTool.equals("pickaxe")))) || (aBlock.getMaterial() == Material.rock) || (aBlock.getMaterial() == Material.glass) || (aBlock.getMaterial() == Material.ice) || (aBlock.getMaterial() == Material.packedIce) || (GT_Recipe.GT_Recipe_Map.sHammerRecipes.containsInput(new ItemStack(aBlock, 1, aMetaData)));
- }
-
- public int convertBlockDrops(List<ItemStack> aDrops, ItemStack aStack, EntityPlayer aPlayer, Block aBlock, int aX, int aY, int aZ, byte aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent) {
- int rConversions = 0;
- GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sHammerRecipes.findRecipe(null, true, 2147483647L, null, new ItemStack[]{new ItemStack(aBlock, 1, aMetaData)});
- if ((tRecipe == null) || (aBlock.hasTileEntity(aMetaData))) {
- for (ItemStack tDrop : aDrops) {
- tRecipe = GT_Recipe.GT_Recipe_Map.sHammerRecipes.findRecipe(null, true, 2147483647L, null, new ItemStack[]{GT_Utility.copyAmount(1L, new Object[]{tDrop})});
- if (tRecipe != null) {
- ItemStack tHammeringOutput = tRecipe.getOutput(0);
- if (tHammeringOutput != null) {
- rConversions += tDrop.stackSize;
- tDrop.stackSize *= tHammeringOutput.stackSize;
- tHammeringOutput.stackSize = tDrop.stackSize;
- GT_Utility.setStack(tDrop, tHammeringOutput);
- }
- }
- }
- } else {
- aDrops.clear();
- aDrops.add(tRecipe.getOutput(0));
- rConversions++;
- }
- return rConversions;
- }
-
- public ItemStack getBrokenItem(ItemStack aStack) {
- return null;
- }
-
- public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) {
- return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadHammer.mTextureIndex] : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.stick.mTextureIndex];
- }
-
- public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) {
- return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa;
- }
-
- public void onStatsAddedToTool(GT_MetaGenerated_Tool aItem, int aID) {
- aItem.addItemBehavior(aID, new Behaviour_Prospecting(1, 1000));
- }
-
- public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) {
- return new ChatComponentText(EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE + " was squashed by " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE);
- }
-
- public void onToolCrafted(ItemStack aStack, EntityPlayer aPlayer) {
- super.onToolCrafted(aStack, aPlayer);
- try {
- GT_Mod.instance.achievements.issueAchievement(aPlayer, "tools");
- } catch (Exception e) {
- }
- }
-}
+package gregtech.common.tools; + +import gregtech.GT_Mod; +import gregtech.api.GregTech_API; +import gregtech.api.interfaces.IIconContainer; +import gregtech.api.items.GT_MetaGenerated_Tool; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Utility; +import gregtech.common.items.behaviors.Behaviour_Prospecting; +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.monster.EntityIronGolem; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.util.ChatComponentText; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.IChatComponent; +import net.minecraftforge.event.world.BlockEvent; + +import java.util.Arrays; +import java.util.List; + +public class GT_Tool_HardHammer + extends GT_Tool { + public static final List<String> mEffectiveList = Arrays.asList(new String[]{EntityIronGolem.class.getName(), "EntityTowerGuardian"}); + + public float getNormalDamageAgainstEntity(float aOriginalDamage, Entity aEntity, ItemStack aStack, EntityPlayer aPlayer) { + String tName = aEntity.getClass().getName(); + tName = tName.substring(tName.lastIndexOf('.') + 1); + return (mEffectiveList.contains(tName)) || (tName.contains("Golem")) ? aOriginalDamage * 2.0F : aOriginalDamage; + } + + public int getToolDamagePerBlockBreak() { + return 50; + } + + public int getToolDamagePerDropConversion() { + return 200; + } + + public int getToolDamagePerContainerCraft() { + return 400; + } + + public int getToolDamagePerEntityAttack() { + return 200; + } + + public int getBaseQuality() { + return 0; + } + + public float getBaseDamage() { + return 3.0F; + } + + public int getHurtResistanceTime(int aOriginalHurtResistance, Entity aEntity) { + return aOriginalHurtResistance * 2; + } + + public float getSpeedMultiplier() { + return 0.75F; + } + + public float getMaxDurabilityMultiplier() { + return 1.0F; + } + + public String getCraftingSound() { + return (String) GregTech_API.sSoundList.get(Integer.valueOf(1)); + } + + public String getEntityHitSound() { + return null; + } + + public String getBreakingSound() { + return (String) GregTech_API.sSoundList.get(Integer.valueOf(2)); + } + + public String getMiningSound() { + return null; + } + + public boolean canBlock() { + return true; + } + + public boolean isCrowbar() { + return false; + } + + public boolean isWeapon() { + return true; + } + + public boolean isMinableBlock(Block aBlock, byte aMetaData) { + String tTool = aBlock.getHarvestTool(aMetaData); + return ((tTool != null) && ((tTool.equals("hammer")) || (tTool.equals("pickaxe")))) || (aBlock.getMaterial() == Material.rock) || (aBlock.getMaterial() == Material.glass) || (aBlock.getMaterial() == Material.ice) || (aBlock.getMaterial() == Material.packedIce) || (GT_Recipe.GT_Recipe_Map.sHammerRecipes.containsInput(new ItemStack(aBlock, 1, aMetaData))); + } + + public int convertBlockDrops(List<ItemStack> aDrops, ItemStack aStack, EntityPlayer aPlayer, Block aBlock, int aX, int aY, int aZ, byte aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent) { + int rConversions = 0; + GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sHammerRecipes.findRecipe(null, true, 2147483647L, null, new ItemStack[]{new ItemStack(aBlock, 1, aMetaData)}); + if ((tRecipe == null) || (aBlock.hasTileEntity(aMetaData))) { + for (ItemStack tDrop : aDrops) { + tRecipe = GT_Recipe.GT_Recipe_Map.sHammerRecipes.findRecipe(null, true, 2147483647L, null, new ItemStack[]{GT_Utility.copyAmount(1L, new Object[]{tDrop})}); + if (tRecipe != null) { + ItemStack tHammeringOutput = tRecipe.getOutput(0); + if (tHammeringOutput != null) { + rConversions += tDrop.stackSize; + tDrop.stackSize *= tHammeringOutput.stackSize; + tHammeringOutput.stackSize = tDrop.stackSize; + GT_Utility.setStack(tDrop, tHammeringOutput); + } + } + } + } else { + aDrops.clear(); + aDrops.add(tRecipe.getOutput(0)); + rConversions++; + } + return rConversions; + } + + public ItemStack getBrokenItem(ItemStack aStack) { + return null; + } + + public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { + return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadHammer.mTextureIndex] : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.stick.mTextureIndex]; + } + + public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { + return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; + } + + public void onStatsAddedToTool(GT_MetaGenerated_Tool aItem, int aID) { + aItem.addItemBehavior(aID, new Behaviour_Prospecting(1, 1000)); + } + + public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) { + return new ChatComponentText(EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE + " was squashed by " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE); + } + + public void onToolCrafted(ItemStack aStack, EntityPlayer aPlayer) { + super.onToolCrafted(aStack, aPlayer); + try { + GT_Mod.instance.achievements.issueAchievement(aPlayer, "tools"); + } catch (Exception e) { + } + } +} diff --git a/src/main/java/gregtech/common/tools/GT_Tool_Hoe.java b/src/main/java/gregtech/common/tools/GT_Tool_Hoe.java index 7ae5b09334..0f3c2a5965 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Hoe.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Hoe.java @@ -1,104 +1,104 @@ -package gregtech.common.tools;
-
-import gregtech.api.GregTech_API;
-import gregtech.api.interfaces.IIconContainer;
-import gregtech.api.items.GT_MetaGenerated_Tool;
-import gregtech.common.items.behaviors.Behaviour_Hoe;
-import net.minecraft.block.Block;
-import net.minecraft.block.material.Material;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.stats.AchievementList;
-import net.minecraft.util.ChatComponentText;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.IChatComponent;
-
-public class GT_Tool_Hoe
- extends GT_Tool {
- public int getToolDamagePerBlockBreak() {
- return 50;
- }
-
- public int getToolDamagePerDropConversion() {
- return 100;
- }
-
- public int getToolDamagePerContainerCraft() {
- return 100;
- }
-
- public int getToolDamagePerEntityAttack() {
- return 200;
- }
-
- public int getBaseQuality() {
- return 0;
- }
-
- public float getBaseDamage() {
- return 1.75F;
- }
-
- public float getSpeedMultiplier() {
- return 1.0F;
- }
-
- public float getMaxDurabilityMultiplier() {
- return 1.0F;
- }
-
- public String getCraftingSound() {
- return null;
- }
-
- public String getEntityHitSound() {
- return null;
- }
-
- public String getBreakingSound() {
- return (String) GregTech_API.sSoundList.get(Integer.valueOf(0));
- }
-
- public String getMiningSound() {
- return null;
- }
-
- public boolean canBlock() {
- return false;
- }
-
- public boolean isCrowbar() {
- return false;
- }
-
- public boolean isMinableBlock(Block aBlock, byte aMetaData) {
- String tTool = aBlock.getHarvestTool(aMetaData);
- return ((tTool != null) && (tTool.equals("hoe"))) || (aBlock.getMaterial() == Material.gourd);
- }
-
- public ItemStack getBrokenItem(ItemStack aStack) {
- return null;
- }
-
- public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) {
- return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadHoe.mTextureIndex] : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.stick.mTextureIndex];
- }
-
- public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) {
- return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa;
- }
-
- public void onStatsAddedToTool(GT_MetaGenerated_Tool aItem, int aID) {
- aItem.addItemBehavior(aID, new Behaviour_Hoe(100));
- }
-
- public void onToolCrafted(ItemStack aStack, EntityPlayer aPlayer) {
- super.onToolCrafted(aStack, aPlayer);
- aPlayer.triggerAchievement(AchievementList.buildHoe);
- }
-
- public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) {
- return new ChatComponentText(EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE + " has been called a stupid Hoe by " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE);
- }
-}
+package gregtech.common.tools; + +import gregtech.api.GregTech_API; +import gregtech.api.interfaces.IIconContainer; +import gregtech.api.items.GT_MetaGenerated_Tool; +import gregtech.common.items.behaviors.Behaviour_Hoe; +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.stats.AchievementList; +import net.minecraft.util.ChatComponentText; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.IChatComponent; + +public class GT_Tool_Hoe + extends GT_Tool { + public int getToolDamagePerBlockBreak() { + return 50; + } + + public int getToolDamagePerDropConversion() { + return 100; + } + + public int getToolDamagePerContainerCraft() { + return 100; + } + + public int getToolDamagePerEntityAttack() { + return 200; + } + + public int getBaseQuality() { + return 0; + } + + public float getBaseDamage() { + return 1.75F; + } + + public float getSpeedMultiplier() { + return 1.0F; + } + + public float getMaxDurabilityMultiplier() { + return 1.0F; + } + + public String getCraftingSound() { + return null; + } + + public String getEntityHitSound() { + return null; + } + + public String getBreakingSound() { + return (String) GregTech_API.sSoundList.get(Integer.valueOf(0)); + } + + public String getMiningSound() { + return null; + } + + public boolean canBlock() { + return false; + } + + public boolean isCrowbar() { + return false; + } + + public boolean isMinableBlock(Block aBlock, byte aMetaData) { + String tTool = aBlock.getHarvestTool(aMetaData); + return ((tTool != null) && (tTool.equals("hoe"))) || (aBlock.getMaterial() == Material.gourd); + } + + public ItemStack getBrokenItem(ItemStack aStack) { + return null; + } + + public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { + return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadHoe.mTextureIndex] : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.stick.mTextureIndex]; + } + + public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { + return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; + } + + public void onStatsAddedToTool(GT_MetaGenerated_Tool aItem, int aID) { + aItem.addItemBehavior(aID, new Behaviour_Hoe(100)); + } + + public void onToolCrafted(ItemStack aStack, EntityPlayer aPlayer) { + super.onToolCrafted(aStack, aPlayer); + aPlayer.triggerAchievement(AchievementList.buildHoe); + } + + public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) { + return new ChatComponentText(EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE + " has been called a stupid Hoe by " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE); + } +} diff --git a/src/main/java/gregtech/common/tools/GT_Tool_JackHammer.java b/src/main/java/gregtech/common/tools/GT_Tool_JackHammer.java index a1ad88c69f..d2799b525f 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_JackHammer.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_JackHammer.java @@ -1,99 +1,99 @@ -package gregtech.common.tools;
-
-import gregtech.GT_Mod;
-import gregtech.api.enums.Textures;
-import gregtech.api.interfaces.IIconContainer;
-import gregtech.api.util.GT_Recipe;
-import gregtech.api.util.GT_Utility;
-import net.minecraft.block.Block;
-import net.minecraft.block.material.Material;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.ChatComponentText;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.IChatComponent;
-import net.minecraftforge.event.world.BlockEvent;
-
-import java.util.List;
-
-public class GT_Tool_JackHammer
- extends GT_Tool_Drill_LV {
- public int getToolDamagePerBlockBreak() {
- return GT_Mod.gregtechproxy.mHardRock ? 200 : 400;
- }
-
- public int getToolDamagePerDropConversion() {
- return 400;
- }
-
- public int getToolDamagePerContainerCraft() {
- return 3200;
- }
-
- public int getToolDamagePerEntityAttack() {
- return 800;
- }
-
- public int getBaseQuality() {
- return 1;
- }
-
- public float getBaseDamage() {
- return 3.0F;
- }
-
- public float getSpeedMultiplier() {
- return 12.0F;
- }
-
- public float getMaxDurabilityMultiplier() {
- return 2.0F;
- }
-
- public boolean isMinableBlock(Block aBlock, byte aMetaData) {
- String tTool = aBlock.getHarvestTool(aMetaData);
- return ((tTool != null) && (tTool.equals("pickaxe"))) || (aBlock.getMaterial() == Material.rock) || (aBlock.getMaterial() == Material.glass) || (aBlock.getMaterial() == Material.ice) || (aBlock.getMaterial() == Material.packedIce);
- }
-
- public int convertBlockDrops(List<ItemStack> aDrops, ItemStack aStack, EntityPlayer aPlayer, Block aBlock, int aX, int aY, int aZ, byte aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent) {
- int rConversions = 0;
- GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sHammerRecipes.findRecipe(null, true, 2147483647L, null, new ItemStack[]{new ItemStack(aBlock, 1, aMetaData)});
- if ((tRecipe == null) || (aBlock.hasTileEntity(aMetaData))) {
- for (ItemStack tDrop : aDrops) {
- tRecipe = GT_Recipe.GT_Recipe_Map.sHammerRecipes.findRecipe(null, true, 2147483647L, null, new ItemStack[]{GT_Utility.copyAmount(1L, new Object[]{tDrop})});
- if (tRecipe != null) {
- ItemStack tHammeringOutput = tRecipe.getOutput(0);
- if (tHammeringOutput != null) {
- rConversions += tDrop.stackSize;
- tDrop.stackSize *= tHammeringOutput.stackSize;
- tHammeringOutput.stackSize = tDrop.stackSize;
- GT_Utility.setStack(tDrop, tHammeringOutput);
- }
- }
- }
- } else {
- aDrops.clear();
- aDrops.add(tRecipe.getOutput(0));
- rConversions++;
- }
- return rConversions;
- }
-
- public void onToolCrafted(ItemStack aStack, EntityPlayer aPlayer) {
- super.onToolCrafted(aStack, aPlayer);
- try {
- GT_Mod.instance.achievements.issueAchievement(aPlayer, "hammertime");
- } catch (Exception e) {
- }
- }
-
-
- public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) {
- return aIsToolHead ? Textures.ItemIcons.JACKHAMMER : null;
- }
-
- public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) {
- return new ChatComponentText(EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE + " has been jackhammered into pieces by " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE);
- }
-}
+package gregtech.common.tools; + +import gregtech.GT_Mod; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.IIconContainer; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Utility; +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.util.ChatComponentText; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.IChatComponent; +import net.minecraftforge.event.world.BlockEvent; + +import java.util.List; + +public class GT_Tool_JackHammer + extends GT_Tool_Drill_LV { + public int getToolDamagePerBlockBreak() { + return GT_Mod.gregtechproxy.mHardRock ? 200 : 400; + } + + public int getToolDamagePerDropConversion() { + return 400; + } + + public int getToolDamagePerContainerCraft() { + return 3200; + } + + public int getToolDamagePerEntityAttack() { + return 800; + } + + public int getBaseQuality() { + return 1; + } + + public float getBaseDamage() { + return 3.0F; + } + + public float getSpeedMultiplier() { + return 12.0F; + } + + public float getMaxDurabilityMultiplier() { + return 2.0F; + } + + public boolean isMinableBlock(Block aBlock, byte aMetaData) { + String tTool = aBlock.getHarvestTool(aMetaData); + return ((tTool != null) && (tTool.equals("pickaxe"))) || (aBlock.getMaterial() == Material.rock) || (aBlock.getMaterial() == Material.glass) || (aBlock.getMaterial() == Material.ice) || (aBlock.getMaterial() == Material.packedIce); + } + + public int convertBlockDrops(List<ItemStack> aDrops, ItemStack aStack, EntityPlayer aPlayer, Block aBlock, int aX, int aY, int aZ, byte aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent) { + int rConversions = 0; + GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sHammerRecipes.findRecipe(null, true, 2147483647L, null, new ItemStack[]{new ItemStack(aBlock, 1, aMetaData)}); + if ((tRecipe == null) || (aBlock.hasTileEntity(aMetaData))) { + for (ItemStack tDrop : aDrops) { + tRecipe = GT_Recipe.GT_Recipe_Map.sHammerRecipes.findRecipe(null, true, 2147483647L, null, new ItemStack[]{GT_Utility.copyAmount(1L, new Object[]{tDrop})}); + if (tRecipe != null) { + ItemStack tHammeringOutput = tRecipe.getOutput(0); + if (tHammeringOutput != null) { + rConversions += tDrop.stackSize; + tDrop.stackSize *= tHammeringOutput.stackSize; + tHammeringOutput.stackSize = tDrop.stackSize; + GT_Utility.setStack(tDrop, tHammeringOutput); + } + } + } + } else { + aDrops.clear(); + aDrops.add(tRecipe.getOutput(0)); + rConversions++; + } + return rConversions; + } + + public void onToolCrafted(ItemStack aStack, EntityPlayer aPlayer) { + super.onToolCrafted(aStack, aPlayer); + try { + GT_Mod.instance.achievements.issueAchievement(aPlayer, "hammertime"); + } catch (Exception e) { + } + } + + + public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { + return aIsToolHead ? Textures.ItemIcons.JACKHAMMER : null; + } + + public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) { + return new ChatComponentText(EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE + " has been jackhammered into pieces by " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE); + } +} diff --git a/src/main/java/gregtech/common/tools/GT_Tool_Knife.java b/src/main/java/gregtech/common/tools/GT_Tool_Knife.java index 5b46e82b50..61e5959d5f 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Knife.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Knife.java @@ -1,48 +1,48 @@ -package gregtech.common.tools;
-
-import gregtech.api.enums.Textures;
-import gregtech.api.interfaces.IIconContainer;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.ChatComponentText;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.IChatComponent;
-
-public class GT_Tool_Knife
- extends GT_Tool_Sword {
- public int getToolDamagePerBlockBreak() {
- return 100;
- }
-
- public int getToolDamagePerDropConversion() {
- return 100;
- }
-
- public int getToolDamagePerContainerCraft() {
- return 100;
- }
-
- public int getToolDamagePerEntityAttack() {
- return 200;
- }
-
- public float getBaseDamage() {
- return 2.0F;
- }
-
- public float getSpeedMultiplier() {
- return 0.5F;
- }
-
- public float getMaxDurabilityMultiplier() {
- return 1.0F;
- }
-
- public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) {
- return aIsToolHead ? Textures.ItemIcons.KNIFE : null;
- }
-
- public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) {
- return new ChatComponentText("<" + EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE + "> " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE + " what are you doing?, " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE + "?!? STAHP!!!");
- }
-}
+package gregtech.common.tools; + +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.IIconContainer; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.item.ItemStack; +import net.minecraft.util.ChatComponentText; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.IChatComponent; + +public class GT_Tool_Knife + extends GT_Tool_Sword { + public int getToolDamagePerBlockBreak() { + return 100; + } + + public int getToolDamagePerDropConversion() { + return 100; + } + + public int getToolDamagePerContainerCraft() { + return 100; + } + + public int getToolDamagePerEntityAttack() { + return 200; + } + + public float getBaseDamage() { + return 2.0F; + } + + public float getSpeedMultiplier() { + return 0.5F; + } + + public float getMaxDurabilityMultiplier() { + return 1.0F; + } + + public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { + return aIsToolHead ? Textures.ItemIcons.KNIFE : null; + } + + public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) { + return new ChatComponentText("<" + EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE + "> " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE + " what are you doing?, " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE + "?!? STAHP!!!"); + } +} diff --git a/src/main/java/gregtech/common/tools/GT_Tool_Mortar.java b/src/main/java/gregtech/common/tools/GT_Tool_Mortar.java index c569e4b551..28e122b1d9 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Mortar.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Mortar.java @@ -1,99 +1,99 @@ -package gregtech.common.tools;
-
-import gregtech.api.GregTech_API;
-import gregtech.api.enums.Dyes;
-import gregtech.api.enums.Textures;
-import gregtech.api.interfaces.IIconContainer;
-import gregtech.api.items.GT_MetaGenerated_Tool;
-import net.minecraft.block.Block;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.ChatComponentText;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.IChatComponent;
-
-public class GT_Tool_Mortar
- extends GT_Tool {
- public int getToolDamagePerBlockBreak() {
- return 50;
- }
-
- public int getToolDamagePerDropConversion() {
- return 100;
- }
-
- public int getToolDamagePerContainerCraft() {
- return 400;
- }
-
- public int getToolDamagePerEntityAttack() {
- return 200;
- }
-
- public int getBaseQuality() {
- return 0;
- }
-
- public float getBaseDamage() {
- return 2.0F;
- }
-
- public float getSpeedMultiplier() {
- return 1.0F;
- }
-
- public float getMaxDurabilityMultiplier() {
- return 1.0F;
- }
-
- public String getCraftingSound() {
- return null;
- }
-
- public String getEntityHitSound() {
- return null;
- }
-
- public String getBreakingSound() {
- return (String) GregTech_API.sSoundList.get(Integer.valueOf(0));
- }
-
- public String getMiningSound() {
- return null;
- }
-
- public boolean canBlock() {
- return false;
- }
-
- public boolean isCrowbar() {
- return false;
- }
-
- public boolean isMiningTool() {
- return false;
- }
-
- public boolean isMinableBlock(Block aBlock, byte aMetaData) {
- return false;
- }
-
- public ItemStack getBrokenItem(ItemStack aStack) {
- return null;
- }
-
- public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) {
- return aIsToolHead ? Textures.ItemIcons.MORTAR : null;
- }
-
- public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) {
- return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : Dyes._NULL.mRGBa;
- }
-
- public void onStatsAddedToTool(GT_MetaGenerated_Tool aItem, int aID) {
- }
-
- public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) {
- return new ChatComponentText(EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE + " was grounded by " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE);
- }
-}
+package gregtech.common.tools; + +import gregtech.api.GregTech_API; +import gregtech.api.enums.Dyes; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.IIconContainer; +import gregtech.api.items.GT_MetaGenerated_Tool; +import net.minecraft.block.Block; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.item.ItemStack; +import net.minecraft.util.ChatComponentText; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.IChatComponent; + +public class GT_Tool_Mortar + extends GT_Tool { + public int getToolDamagePerBlockBreak() { + return 50; + } + + public int getToolDamagePerDropConversion() { + return 100; + } + + public int getToolDamagePerContainerCraft() { + return 400; + } + + public int getToolDamagePerEntityAttack() { + return 200; + } + + public int getBaseQuality() { + return 0; + } + + public float getBaseDamage() { + return 2.0F; + } + + public float getSpeedMultiplier() { + return 1.0F; + } + + public float getMaxDurabilityMultiplier() { + return 1.0F; + } + + public String getCraftingSound() { + return null; + } + + public String getEntityHitSound() { + return null; + } + + public String getBreakingSound() { + return (String) GregTech_API.sSoundList.get(Integer.valueOf(0)); + } + + public String getMiningSound() { + return null; + } + + public boolean canBlock() { + return false; + } + + public boolean isCrowbar() { + return false; + } + + public boolean isMiningTool() { + return false; + } + + public boolean isMinableBlock(Block aBlock, byte aMetaData) { + return false; + } + + public ItemStack getBrokenItem(ItemStack aStack) { + return null; + } + + public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { + return aIsToolHead ? Textures.ItemIcons.MORTAR : null; + } + + public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { + return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : Dyes._NULL.mRGBa; + } + + public void onStatsAddedToTool(GT_MetaGenerated_Tool aItem, int aID) { + } + + public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) { + return new ChatComponentText(EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE + " was grounded by " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE); + } +} diff --git a/src/main/java/gregtech/common/tools/GT_Tool_Pickaxe.java b/src/main/java/gregtech/common/tools/GT_Tool_Pickaxe.java index 59fd09aa73..066d27318e 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Pickaxe.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Pickaxe.java @@ -1,108 +1,108 @@ -package gregtech.common.tools;
-
-import gregtech.GT_Mod;
-import gregtech.api.GregTech_API;
-import gregtech.api.interfaces.IIconContainer;
-import gregtech.api.items.GT_MetaGenerated_Tool;
-import net.minecraft.block.Block;
-import net.minecraft.block.material.Material;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.stats.AchievementList;
-import net.minecraft.util.ChatComponentText;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.IChatComponent;
-
-public class GT_Tool_Pickaxe
- extends GT_Tool {
- public int getToolDamagePerBlockBreak() {
- return GT_Mod.gregtechproxy.mHardRock ? 25 : 50;
- }
-
- public int getToolDamagePerDropConversion() {
- return 100;
- }
-
- public int getToolDamagePerContainerCraft() {
- return 100;
- }
-
- public int getToolDamagePerEntityAttack() {
- return 200;
- }
-
- public int getBaseQuality() {
- return 0;
- }
-
- public float getBaseDamage() {
- return 1.5F;
- }
-
- public float getSpeedMultiplier() {
- return 1.0F;
- }
-
- public float getMaxDurabilityMultiplier() {
- return 1.0F;
- }
-
- public String getCraftingSound() {
- return null;
- }
-
- public String getEntityHitSound() {
- return null;
- }
-
- public String getBreakingSound() {
- return (String) GregTech_API.sSoundList.get(Integer.valueOf(0));
- }
-
- public String getMiningSound() {
- return null;
- }
-
- public boolean canBlock() {
- return false;
- }
-
- public boolean isCrowbar() {
- return false;
- }
-
- public boolean isMinableBlock(Block aBlock, byte aMetaData) {
- String tTool = aBlock.getHarvestTool(aMetaData);
- return ((tTool != null) && (tTool.equals("pickaxe"))) || (aBlock.getMaterial() == Material.rock) || (aBlock.getMaterial() == Material.iron) || (aBlock.getMaterial() == Material.anvil) || (aBlock.getMaterial() == Material.glass);
- }
-
- public ItemStack getBrokenItem(ItemStack aStack) {
- return null;
- }
-
- public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) {
- return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadPickaxe.mTextureIndex] : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.stick.mTextureIndex];
- }
-
- public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) {
- return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa;
- }
-
- public void onStatsAddedToTool(GT_MetaGenerated_Tool aItem, int aID) {
- }
-
- public void onToolCrafted(ItemStack aStack, EntityPlayer aPlayer) {
- super.onToolCrafted(aStack, aPlayer);
- aPlayer.triggerAchievement(AchievementList.buildPickaxe);
- aPlayer.triggerAchievement(AchievementList.buildBetterPickaxe);
- try {
- GT_Mod.instance.achievements.issueAchievement(aPlayer, "flintpick");
- } catch (Exception e) {
- }
- }
-
- public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) {
- return new ChatComponentText(EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE + " got mined by " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE);
- }
-}
+package gregtech.common.tools; + +import gregtech.GT_Mod; +import gregtech.api.GregTech_API; +import gregtech.api.interfaces.IIconContainer; +import gregtech.api.items.GT_MetaGenerated_Tool; +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.stats.AchievementList; +import net.minecraft.util.ChatComponentText; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.IChatComponent; + +public class GT_Tool_Pickaxe + extends GT_Tool { + public int getToolDamagePerBlockBreak() { + return GT_Mod.gregtechproxy.mHardRock ? 25 : 50; + } + + public int getToolDamagePerDropConversion() { + return 100; + } + + public int getToolDamagePerContainerCraft() { + return 100; + } + + public int getToolDamagePerEntityAttack() { + return 200; + } + + public int getBaseQuality() { + return 0; + } + + public float getBaseDamage() { + return 1.5F; + } + + public float getSpeedMultiplier() { + return 1.0F; + } + + public float getMaxDurabilityMultiplier() { + return 1.0F; + } + + public String getCraftingSound() { + return null; + } + + public String getEntityHitSound() { + return null; + } + + public String getBreakingSound() { + return (String) GregTech_API.sSoundList.get(Integer.valueOf(0)); + } + + public String getMiningSound() { + return null; + } + + public boolean canBlock() { + return false; + } + + public boolean isCrowbar() { + return false; + } + + public boolean isMinableBlock(Block aBlock, byte aMetaData) { + String tTool = aBlock.getHarvestTool(aMetaData); + return ((tTool != null) && (tTool.equals("pickaxe"))) || (aBlock.getMaterial() == Material.rock) || (aBlock.getMaterial() == Material.iron) || (aBlock.getMaterial() == Material.anvil) || (aBlock.getMaterial() == Material.glass); + } + + public ItemStack getBrokenItem(ItemStack aStack) { + return null; + } + + public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { + return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadPickaxe.mTextureIndex] : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.stick.mTextureIndex]; + } + + public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { + return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; + } + + public void onStatsAddedToTool(GT_MetaGenerated_Tool aItem, int aID) { + } + + public void onToolCrafted(ItemStack aStack, EntityPlayer aPlayer) { + super.onToolCrafted(aStack, aPlayer); + aPlayer.triggerAchievement(AchievementList.buildPickaxe); + aPlayer.triggerAchievement(AchievementList.buildBetterPickaxe); + try { + GT_Mod.instance.achievements.issueAchievement(aPlayer, "flintpick"); + } catch (Exception e) { + } + } + + public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) { + return new ChatComponentText(EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE + " got mined by " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE); + } +} diff --git a/src/main/java/gregtech/common/tools/GT_Tool_Plow.java b/src/main/java/gregtech/common/tools/GT_Tool_Plow.java index a7666d34c8..994767220e 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Plow.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Plow.java @@ -1,66 +1,66 @@ -package gregtech.common.tools;
-
-import gregtech.api.interfaces.IIconContainer;
-import gregtech.api.items.GT_MetaGenerated_Tool;
-import net.minecraft.block.Block;
-import net.minecraft.block.material.Material;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.entity.monster.EntitySnowman;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.entity.player.EntityPlayerMP;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.ChatComponentText;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.IChatComponent;
-import net.minecraftforge.event.world.BlockEvent;
-
-import java.util.List;
-
-public class GT_Tool_Plow
- extends GT_Tool {
- private ThreadLocal<Object> sIsHarvestingRightNow = new ThreadLocal();
-
- public float getNormalDamageAgainstEntity(float aOriginalDamage, Entity aEntity, ItemStack aStack, EntityPlayer aPlayer) {
- return (aEntity instanceof EntitySnowman) ? aOriginalDamage * 4.0F : aOriginalDamage;
- }
-
- public float getBaseDamage() {
- return 1.0F;
- }
-
- public boolean isMinableBlock(Block aBlock, byte aMetaData) {
- String tTool = aBlock.getHarvestTool(aMetaData);
- return ((tTool != null) && (tTool.equals("plow"))) || (aBlock.getMaterial() == Material.snow) || (aBlock.getMaterial() == Material.craftedSnow);
- }
-
- public int convertBlockDrops(List<ItemStack> aDrops, ItemStack aStack, EntityPlayer aPlayer, Block aBlock, int aX, int aY, int aZ, byte aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent) {
- int rConversions = 0;
- if ((this.sIsHarvestingRightNow.get() == null) && ((aPlayer instanceof EntityPlayerMP))) {
- this.sIsHarvestingRightNow.set(this);
- for (int i = -1; i < 2; i++) {
- for (int j = -1; j < 2; j++) {
- for (int k = -1; k < 2; k++) {
- if (((i != 0) || (j != 0) || (k != 0)) && (aStack.getItem().getDigSpeed(aStack, aPlayer.worldObj.getBlock(aX + i, aY + j, aZ + k), aPlayer.worldObj.getBlockMetadata(aX + i, aY + j, aZ + k)) > 0.0F) && (((EntityPlayerMP) aPlayer).theItemInWorldManager.tryHarvestBlock(aX + i, aY + j, aZ + k))) {
- rConversions++;
- }
- }
- }
- }
- this.sIsHarvestingRightNow.set(null);
- }
- return rConversions;
- }
-
- public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) {
- return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadPlow.mTextureIndex] : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.stick.mTextureIndex];
- }
-
- public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) {
- return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa;
- }
-
- public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) {
- return new ChatComponentText(EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE + " plew through the yard of " + EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE);
- }
-}
+package gregtech.common.tools; + +import gregtech.api.interfaces.IIconContainer; +import gregtech.api.items.GT_MetaGenerated_Tool; +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.monster.EntitySnowman; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.item.ItemStack; +import net.minecraft.util.ChatComponentText; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.IChatComponent; +import net.minecraftforge.event.world.BlockEvent; + +import java.util.List; + +public class GT_Tool_Plow + extends GT_Tool { + private ThreadLocal<Object> sIsHarvestingRightNow = new ThreadLocal(); + + public float getNormalDamageAgainstEntity(float aOriginalDamage, Entity aEntity, ItemStack aStack, EntityPlayer aPlayer) { + return (aEntity instanceof EntitySnowman) ? aOriginalDamage * 4.0F : aOriginalDamage; + } + + public float getBaseDamage() { + return 1.0F; + } + + public boolean isMinableBlock(Block aBlock, byte aMetaData) { + String tTool = aBlock.getHarvestTool(aMetaData); + return ((tTool != null) && (tTool.equals("plow"))) || (aBlock.getMaterial() == Material.snow) || (aBlock.getMaterial() == Material.craftedSnow); + } + + public int convertBlockDrops(List<ItemStack> aDrops, ItemStack aStack, EntityPlayer aPlayer, Block aBlock, int aX, int aY, int aZ, byte aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent) { + int rConversions = 0; + if ((this.sIsHarvestingRightNow.get() == null) && ((aPlayer instanceof EntityPlayerMP))) { + this.sIsHarvestingRightNow.set(this); + for (int i = -1; i < 2; i++) { + for (int j = -1; j < 2; j++) { + for (int k = -1; k < 2; k++) { + if (((i != 0) || (j != 0) || (k != 0)) && (aStack.getItem().getDigSpeed(aStack, aPlayer.worldObj.getBlock(aX + i, aY + j, aZ + k), aPlayer.worldObj.getBlockMetadata(aX + i, aY + j, aZ + k)) > 0.0F) && (((EntityPlayerMP) aPlayer).theItemInWorldManager.tryHarvestBlock(aX + i, aY + j, aZ + k))) { + rConversions++; + } + } + } + } + this.sIsHarvestingRightNow.set(null); + } + return rConversions; + } + + public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { + return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadPlow.mTextureIndex] : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.stick.mTextureIndex]; + } + + public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { + return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; + } + + public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) { + return new ChatComponentText(EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE + " plew through the yard of " + EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE); + } +} diff --git a/src/main/java/gregtech/common/tools/GT_Tool_Plunger.java b/src/main/java/gregtech/common/tools/GT_Tool_Plunger.java index 4b13d15875..3fef69d7e8 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Plunger.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Plunger.java @@ -1,72 +1,72 @@ -package gregtech.common.tools;
-
-import gregtech.api.GregTech_API;
-import gregtech.api.enums.Textures;
-import gregtech.api.interfaces.IIconContainer;
-import gregtech.api.interfaces.IItemBehaviour;
-import gregtech.api.items.GT_MetaGenerated_Tool;
-import gregtech.api.util.GT_Utility;
-import gregtech.common.items.behaviors.Behaviour_Plunger_Fluid;
-import gregtech.common.items.behaviors.Behaviour_Plunger_Item;
-import net.minecraft.block.Block;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.ChatComponentText;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.IChatComponent;
-
-public class GT_Tool_Plunger
- extends GT_Tool {
- public float getBaseDamage() {
- return 1.25F;
- }
-
- public float getMaxDurabilityMultiplier() {
- return 0.25F;
- }
-
- public String getCraftingSound() {
- return (String) GregTech_API.sSoundList.get(Integer.valueOf(101));
- }
-
- public String getEntityHitSound() {
- return (String) GregTech_API.sSoundList.get(Integer.valueOf(101));
- }
-
- public String getBreakingSound() {
- return (String) GregTech_API.sSoundList.get(Integer.valueOf(0));
- }
-
- public String getMiningSound() {
- return (String) GregTech_API.sSoundList.get(Integer.valueOf(101));
- }
-
- public boolean isMinableBlock(Block aBlock, byte aMetaData) {
- String tTool = aBlock.getHarvestTool(aMetaData);
- return ((tTool != null) && tTool.equals("plunger"));
- }
-
- public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) {
- return aIsToolHead ? Textures.ItemIcons.PLUNGER : null;
- }
-
- public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) {
- return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa;
- }
-
- public void onStatsAddedToTool(GT_MetaGenerated_Tool aItem, int aID) {
- aItem.addItemBehavior(aID, new Behaviour_Plunger_Item(getToolDamagePerDropConversion()));
- aItem.addItemBehavior(aID, new Behaviour_Plunger_Fluid(getToolDamagePerDropConversion()));
- try {
- Object tObject = GT_Utility.callConstructor("gregtech.common.items.behaviors.Behaviour_Plunger_Essentia", 0, null, false, new Object[]{Integer.valueOf(getToolDamagePerDropConversion())});
- if ((tObject instanceof IItemBehaviour)) {
- aItem.addItemBehavior(aID, (IItemBehaviour) tObject);
- }
- } catch (Throwable e) {
- }
- }
-
- public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) {
- return new ChatComponentText(EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE + " got stuck trying to escape through a Pipe while fighting " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE);
- }
-}
+package gregtech.common.tools; + +import gregtech.api.GregTech_API; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.IIconContainer; +import gregtech.api.interfaces.IItemBehaviour; +import gregtech.api.items.GT_MetaGenerated_Tool; +import gregtech.api.util.GT_Utility; +import gregtech.common.items.behaviors.Behaviour_Plunger_Fluid; +import gregtech.common.items.behaviors.Behaviour_Plunger_Item; +import net.minecraft.block.Block; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.item.ItemStack; +import net.minecraft.util.ChatComponentText; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.IChatComponent; + +public class GT_Tool_Plunger + extends GT_Tool { + public float getBaseDamage() { + return 1.25F; + } + + public float getMaxDurabilityMultiplier() { + return 0.25F; + } + + public String getCraftingSound() { + return (String) GregTech_API.sSoundList.get(Integer.valueOf(101)); + } + + public String getEntityHitSound() { + return (String) GregTech_API.sSoundList.get(Integer.valueOf(101)); + } + + public String getBreakingSound() { + return (String) GregTech_API.sSoundList.get(Integer.valueOf(0)); + } + + public String getMiningSound() { + return (String) GregTech_API.sSoundList.get(Integer.valueOf(101)); + } + + public boolean isMinableBlock(Block aBlock, byte aMetaData) { + String tTool = aBlock.getHarvestTool(aMetaData); + return ((tTool != null) && tTool.equals("plunger")); + } + + public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { + return aIsToolHead ? Textures.ItemIcons.PLUNGER : null; + } + + public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { + return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; + } + + public void onStatsAddedToTool(GT_MetaGenerated_Tool aItem, int aID) { + aItem.addItemBehavior(aID, new Behaviour_Plunger_Item(getToolDamagePerDropConversion())); + aItem.addItemBehavior(aID, new Behaviour_Plunger_Fluid(getToolDamagePerDropConversion())); + try { + Object tObject = GT_Utility.callConstructor("gregtech.common.items.behaviors.Behaviour_Plunger_Essentia", 0, null, false, new Object[]{Integer.valueOf(getToolDamagePerDropConversion())}); + if ((tObject instanceof IItemBehaviour)) { + aItem.addItemBehavior(aID, (IItemBehaviour) tObject); + } + } catch (Throwable e) { + } + } + + public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) { + return new ChatComponentText(EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE + " got stuck trying to escape through a Pipe while fighting " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE); + } +} diff --git a/src/main/java/gregtech/common/tools/GT_Tool_RollingPin.java b/src/main/java/gregtech/common/tools/GT_Tool_RollingPin.java index 910b58c934..ca0d85e3d6 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_RollingPin.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_RollingPin.java @@ -1,54 +1,54 @@ -package gregtech.common.tools;
-
-import gregtech.api.enums.Dyes;
-import gregtech.api.enums.Textures;
-import gregtech.api.interfaces.IIconContainer;
-import gregtech.api.items.GT_MetaGenerated_Tool;
-import net.minecraft.block.Block;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.ChatComponentText;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.IChatComponent;
-
-public class GT_Tool_RollingPin
- extends GT_Tool {
- public int getToolDamagePerBlockBreak() {
- return 50;
- }
-
- public int getToolDamagePerDropConversion() {
- return 100;
- }
-
- public int getToolDamagePerContainerCraft() {
- return 100;
- }
-
- public int getToolDamagePerEntityAttack() {
- return 200;
- }
-
- public float getBaseDamage() {
- return 2.0F;
- }
-
- public boolean isMinableBlock(Block aBlock, byte aMetaData) {
- return false;
- }
-
- public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) {
- return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : Dyes._NULL.mRGBa;
- }
-
- public void onStatsAddedToTool(GT_MetaGenerated_Tool aItem, int aID) {
- }
-
- public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) {
- return aIsToolHead ? Textures.ItemIcons.ROLLING_PIN : null;
- }
-
- public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) {
- return new ChatComponentText(EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE + " got flattened by " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE);
- }
-}
+package gregtech.common.tools; + +import gregtech.api.enums.Dyes; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.IIconContainer; +import gregtech.api.items.GT_MetaGenerated_Tool; +import net.minecraft.block.Block; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.item.ItemStack; +import net.minecraft.util.ChatComponentText; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.IChatComponent; + +public class GT_Tool_RollingPin + extends GT_Tool { + public int getToolDamagePerBlockBreak() { + return 50; + } + + public int getToolDamagePerDropConversion() { + return 100; + } + + public int getToolDamagePerContainerCraft() { + return 100; + } + + public int getToolDamagePerEntityAttack() { + return 200; + } + + public float getBaseDamage() { + return 2.0F; + } + + public boolean isMinableBlock(Block aBlock, byte aMetaData) { + return false; + } + + public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { + return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : Dyes._NULL.mRGBa; + } + + public void onStatsAddedToTool(GT_MetaGenerated_Tool aItem, int aID) { + } + + public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { + return aIsToolHead ? Textures.ItemIcons.ROLLING_PIN : null; + } + + public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) { + return new ChatComponentText(EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE + " got flattened by " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE); + } +} diff --git a/src/main/java/gregtech/common/tools/GT_Tool_Saw.java b/src/main/java/gregtech/common/tools/GT_Tool_Saw.java index 084873eb9b..810ddaae9f 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Saw.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Saw.java @@ -1,114 +1,114 @@ -package gregtech.common.tools;
-
-import gregtech.api.GregTech_API;
-import gregtech.api.enums.Textures;
-import gregtech.api.interfaces.IIconContainer;
-import gregtech.api.items.GT_MetaGenerated_Tool;
-import net.minecraft.block.Block;
-import net.minecraft.block.material.Material;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Blocks;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.ChatComponentText;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.IChatComponent;
-import net.minecraftforge.common.IShearable;
-import net.minecraftforge.event.world.BlockEvent;
-
-import java.util.ArrayList;
-import java.util.List;
-
-public class GT_Tool_Saw
- extends GT_Tool {
- public int getToolDamagePerBlockBreak() {
- return 50;
- }
-
- public int getToolDamagePerDropConversion() {
- return 100;
- }
-
- public int getToolDamagePerContainerCraft() {
- return 200;
- }
-
- public int getToolDamagePerEntityAttack() {
- return 200;
- }
-
- public int getBaseQuality() {
- return 0;
- }
-
- public float getBaseDamage() {
- return 1.75F;
- }
-
- public float getSpeedMultiplier() {
- return 1.0F;
- }
-
- public float getMaxDurabilityMultiplier() {
- return 1.0F;
- }
-
- public String getCraftingSound() {
- return null;
- }
-
- public String getEntityHitSound() {
- return null;
- }
-
- public String getBreakingSound() {
- return (String) GregTech_API.sSoundList.get(Integer.valueOf(0));
- }
-
- public String getMiningSound() {
- return null;
- }
-
- public int convertBlockDrops(List<ItemStack> aDrops, ItemStack aStack, EntityPlayer aPlayer, Block aBlock, int aX, int aY, int aZ, byte aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent) {
- if ((aBlock.getMaterial() == Material.leaves) && ((aBlock instanceof IShearable))) {
- aPlayer.worldObj.setBlock(aX, aY, aZ, aBlock, aMetaData, 0);
- if (((IShearable) aBlock).isShearable(aStack, aPlayer.worldObj, aX, aY, aZ)) {
- ArrayList<ItemStack> tDrops = ((IShearable) aBlock).onSheared(aStack, aPlayer.worldObj, aX, aY, aZ, aFortune);
- aDrops.clear();
- aDrops.addAll(tDrops);
- aEvent.dropChance = 1.0F;
- }
- aPlayer.worldObj.setBlock(aX, aY, aZ, Blocks.air, 0, 0);
- } else if (((aBlock.getMaterial() == Material.ice) || (aBlock.getMaterial() == Material.packedIce)) && (aDrops.isEmpty())) {
- aDrops.add(new ItemStack(aBlock, 1, aMetaData));
- aPlayer.worldObj.setBlockToAir(aX, aY, aZ);
- aEvent.dropChance = 1.0F;
- return 1;
- }
- return 0;
- }
-
- public boolean isMinableBlock(Block aBlock, byte aMetaData) {
- String tTool = aBlock.getHarvestTool(aMetaData);
- return ((tTool != null) && ((tTool.equals("axe")) || (tTool.equals("saw")))) || (aBlock.getMaterial() == Material.leaves) || (aBlock.getMaterial() == Material.vine) || (aBlock.getMaterial() == Material.wood) || (aBlock.getMaterial() == Material.cactus) || (aBlock.getMaterial() == Material.ice) || (aBlock.getMaterial() == Material.packedIce);
- }
-
- public ItemStack getBrokenItem(ItemStack aStack) {
- return null;
- }
-
- public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) {
- return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadSaw.mTextureIndex] : Textures.ItemIcons.HANDLE_SAW;
- }
-
- public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) {
- return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa;
- }
-
- public void onStatsAddedToTool(GT_MetaGenerated_Tool aItem, int aID) {
- }
-
- public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) {
- return new ChatComponentText(EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE + " was getting cut down by " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE);
- }
-}
+package gregtech.common.tools; + +import gregtech.api.GregTech_API; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.IIconContainer; +import gregtech.api.items.GT_MetaGenerated_Tool; +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.item.ItemStack; +import net.minecraft.util.ChatComponentText; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.IChatComponent; +import net.minecraftforge.common.IShearable; +import net.minecraftforge.event.world.BlockEvent; + +import java.util.ArrayList; +import java.util.List; + +public class GT_Tool_Saw + extends GT_Tool { + public int getToolDamagePerBlockBreak() { + return 50; + } + + public int getToolDamagePerDropConversion() { + return 100; + } + + public int getToolDamagePerContainerCraft() { + return 200; + } + + public int getToolDamagePerEntityAttack() { + return 200; + } + + public int getBaseQuality() { + return 0; + } + + public float getBaseDamage() { + return 1.75F; + } + + public float getSpeedMultiplier() { + return 1.0F; + } + + public float getMaxDurabilityMultiplier() { + return 1.0F; + } + + public String getCraftingSound() { + return null; + } + + public String getEntityHitSound() { + return null; + } + + public String getBreakingSound() { + return (String) GregTech_API.sSoundList.get(Integer.valueOf(0)); + } + + public String getMiningSound() { + return null; + } + + public int convertBlockDrops(List<ItemStack> aDrops, ItemStack aStack, EntityPlayer aPlayer, Block aBlock, int aX, int aY, int aZ, byte aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent) { + if ((aBlock.getMaterial() == Material.leaves) && ((aBlock instanceof IShearable))) { + aPlayer.worldObj.setBlock(aX, aY, aZ, aBlock, aMetaData, 0); + if (((IShearable) aBlock).isShearable(aStack, aPlayer.worldObj, aX, aY, aZ)) { + ArrayList<ItemStack> tDrops = ((IShearable) aBlock).onSheared(aStack, aPlayer.worldObj, aX, aY, aZ, aFortune); + aDrops.clear(); + aDrops.addAll(tDrops); + aEvent.dropChance = 1.0F; + } + aPlayer.worldObj.setBlock(aX, aY, aZ, Blocks.air, 0, 0); + } else if (((aBlock.getMaterial() == Material.ice) || (aBlock.getMaterial() == Material.packedIce)) && (aDrops.isEmpty())) { + aDrops.add(new ItemStack(aBlock, 1, aMetaData)); + aPlayer.worldObj.setBlockToAir(aX, aY, aZ); + aEvent.dropChance = 1.0F; + return 1; + } + return 0; + } + + public boolean isMinableBlock(Block aBlock, byte aMetaData) { + String tTool = aBlock.getHarvestTool(aMetaData); + return ((tTool != null) && ((tTool.equals("axe")) || (tTool.equals("saw")))) || (aBlock.getMaterial() == Material.leaves) || (aBlock.getMaterial() == Material.vine) || (aBlock.getMaterial() == Material.wood) || (aBlock.getMaterial() == Material.cactus) || (aBlock.getMaterial() == Material.ice) || (aBlock.getMaterial() == Material.packedIce); + } + + public ItemStack getBrokenItem(ItemStack aStack) { + return null; + } + + public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { + return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadSaw.mTextureIndex] : Textures.ItemIcons.HANDLE_SAW; + } + + public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { + return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; + } + + public void onStatsAddedToTool(GT_MetaGenerated_Tool aItem, int aID) { + } + + public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) { + return new ChatComponentText(EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE + " was getting cut down by " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE); + } +} diff --git a/src/main/java/gregtech/common/tools/GT_Tool_Screwdriver.java b/src/main/java/gregtech/common/tools/GT_Tool_Screwdriver.java index 4d8a5c2156..372725d85c 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Screwdriver.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Screwdriver.java @@ -1,117 +1,117 @@ -package gregtech.common.tools;
-
-import gregtech.api.GregTech_API;
-import gregtech.api.enums.Textures;
-import gregtech.api.interfaces.IIconContainer;
-import gregtech.api.items.GT_MetaGenerated_Tool;
-import gregtech.common.items.behaviors.Behaviour_Screwdriver;
-import net.minecraft.block.Block;
-import net.minecraft.block.material.Material;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.entity.monster.EntityCaveSpider;
-import net.minecraft.entity.monster.EntitySpider;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.ChatComponentText;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.IChatComponent;
-
-import java.util.Arrays;
-import java.util.List;
-
-public class GT_Tool_Screwdriver
- extends GT_Tool {
- public static final List<String> mEffectiveList = Arrays.asList(new String[]{EntityCaveSpider.class.getName(), EntitySpider.class.getName(), "EntityTFHedgeSpider", "EntityTFKingSpider", "EntityTFSwarmSpider", "EntityTFTowerBroodling"});
-
- public float getNormalDamageAgainstEntity(float aOriginalDamage, Entity aEntity, ItemStack aStack, EntityPlayer aPlayer) {
- String tName = aEntity.getClass().getName();
- tName = tName.substring(tName.lastIndexOf('.') + 1);
- return mEffectiveList.contains(tName) ? aOriginalDamage * 2.0F : aOriginalDamage;
- }
-
- public int getToolDamagePerBlockBreak() {
- return 200;
- }
-
- public int getToolDamagePerDropConversion() {
- return 100;
- }
-
- public int getToolDamagePerContainerCraft() {
- return 400;
- }
-
- public int getToolDamagePerEntityAttack() {
- return 200;
- }
-
- public int getBaseQuality() {
- return 0;
- }
-
- public float getBaseDamage() {
- return 1.5F;
- }
-
- public float getSpeedMultiplier() {
- return 1.0F;
- }
-
- public float getMaxDurabilityMultiplier() {
- return 1.0F;
- }
-
- public String getCraftingSound() {
- return (String) GregTech_API.sSoundList.get(Integer.valueOf(100));
- }
-
- public String getEntityHitSound() {
- return null;
- }
-
- public String getBreakingSound() {
- return (String) GregTech_API.sSoundList.get(Integer.valueOf(0));
- }
-
- public String getMiningSound() {
- return null;
- }
-
- public boolean canBlock() {
- return true;
- }
-
- public boolean isCrowbar() {
- return false;
- }
-
- public boolean isMiningTool() {
- return false;
- }
-
- public boolean isMinableBlock(Block aBlock, byte aMetaData) {
- String tTool = aBlock.getHarvestTool(aMetaData);
- return ((tTool != null) && (tTool.equals("screwdriver"))) || (aBlock.getMaterial() == Material.circuits);
- }
-
- public ItemStack getBrokenItem(ItemStack aStack) {
- return null;
- }
-
- public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) {
- return !aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadScrewdriver.mTextureIndex] : Textures.ItemIcons.HANDLE_SCREWDRIVER;
- }
-
- public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) {
- return !aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa;
- }
-
- public void onStatsAddedToTool(GT_MetaGenerated_Tool aItem, int aID) {
- aItem.addItemBehavior(aID, new Behaviour_Screwdriver(1, 200));
- }
-
- public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) {
- return new ChatComponentText(EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE + " is screwed! (by " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE + ")");
- }
-}
+package gregtech.common.tools; + +import gregtech.api.GregTech_API; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.IIconContainer; +import gregtech.api.items.GT_MetaGenerated_Tool; +import gregtech.common.items.behaviors.Behaviour_Screwdriver; +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.monster.EntityCaveSpider; +import net.minecraft.entity.monster.EntitySpider; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.util.ChatComponentText; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.IChatComponent; + +import java.util.Arrays; +import java.util.List; + +public class GT_Tool_Screwdriver + extends GT_Tool { + public static final List<String> mEffectiveList = Arrays.asList(new String[]{EntityCaveSpider.class.getName(), EntitySpider.class.getName(), "EntityTFHedgeSpider", "EntityTFKingSpider", "EntityTFSwarmSpider", "EntityTFTowerBroodling"}); + + public float getNormalDamageAgainstEntity(float aOriginalDamage, Entity aEntity, ItemStack aStack, EntityPlayer aPlayer) { + String tName = aEntity.getClass().getName(); + tName = tName.substring(tName.lastIndexOf('.') + 1); + return mEffectiveList.contains(tName) ? aOriginalDamage * 2.0F : aOriginalDamage; + } + + public int getToolDamagePerBlockBreak() { + return 200; + } + + public int getToolDamagePerDropConversion() { + return 100; + } + + public int getToolDamagePerContainerCraft() { + return 400; + } + + public int getToolDamagePerEntityAttack() { + return 200; + } + + public int getBaseQuality() { + return 0; + } + + public float getBaseDamage() { + return 1.5F; + } + + public float getSpeedMultiplier() { + return 1.0F; + } + + public float getMaxDurabilityMultiplier() { + return 1.0F; + } + + public String getCraftingSound() { + return (String) GregTech_API.sSoundList.get(Integer.valueOf(100)); + } + + public String getEntityHitSound() { + return null; + } + + public String getBreakingSound() { + return (String) GregTech_API.sSoundList.get(Integer.valueOf(0)); + } + + public String getMiningSound() { + return null; + } + + public boolean canBlock() { + return true; + } + + public boolean isCrowbar() { + return false; + } + + public boolean isMiningTool() { + return false; + } + + public boolean isMinableBlock(Block aBlock, byte aMetaData) { + String tTool = aBlock.getHarvestTool(aMetaData); + return ((tTool != null) && (tTool.equals("screwdriver"))) || (aBlock.getMaterial() == Material.circuits); + } + + public ItemStack getBrokenItem(ItemStack aStack) { + return null; + } + + public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { + return !aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadScrewdriver.mTextureIndex] : Textures.ItemIcons.HANDLE_SCREWDRIVER; + } + + public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { + return !aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; + } + + public void onStatsAddedToTool(GT_MetaGenerated_Tool aItem, int aID) { + aItem.addItemBehavior(aID, new Behaviour_Screwdriver(1, 200)); + } + + public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) { + return new ChatComponentText(EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE + " is screwed! (by " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE + ")"); + } +} diff --git a/src/main/java/gregtech/common/tools/GT_Tool_Screwdriver_LV.java b/src/main/java/gregtech/common/tools/GT_Tool_Screwdriver_LV.java index eeb1adcbc8..93255f7f2f 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Screwdriver_LV.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Screwdriver_LV.java @@ -1,25 +1,25 @@ -package gregtech.common.tools;
-
-import gregtech.api.enums.Textures;
-import gregtech.api.interfaces.IIconContainer;
-import gregtech.api.items.GT_MetaGenerated_Tool;
-import net.minecraft.item.ItemStack;
-
-public class GT_Tool_Screwdriver_LV
- extends GT_Tool_Screwdriver {
- public float getMaxDurabilityMultiplier() {
- return 1.0F;
- }
-
- public int getToolDamagePerContainerCraft() {
- return 200;
- }
-
- public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) {
- return !aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadScrewdriver.mTextureIndex] : Textures.ItemIcons.HANDLE_ELECTRIC_SCREWDRIVER;
- }
-
- public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) {
- return !aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa;
- }
-}
+package gregtech.common.tools; + +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.IIconContainer; +import gregtech.api.items.GT_MetaGenerated_Tool; +import net.minecraft.item.ItemStack; + +public class GT_Tool_Screwdriver_LV + extends GT_Tool_Screwdriver { + public float getMaxDurabilityMultiplier() { + return 1.0F; + } + + public int getToolDamagePerContainerCraft() { + return 200; + } + + public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { + return !aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadScrewdriver.mTextureIndex] : Textures.ItemIcons.HANDLE_ELECTRIC_SCREWDRIVER; + } + + public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { + return !aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; + } +} diff --git a/src/main/java/gregtech/common/tools/GT_Tool_Sense.java b/src/main/java/gregtech/common/tools/GT_Tool_Sense.java index 55fb257c66..369c558a28 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Sense.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Sense.java @@ -1,70 +1,70 @@ -package gregtech.common.tools;
-
-import gregtech.api.interfaces.IIconContainer;
-import gregtech.api.items.GT_MetaGenerated_Tool;
-import gregtech.common.items.behaviors.Behaviour_Sense;
-import net.minecraft.block.Block;
-import net.minecraft.block.material.Material;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.entity.player.EntityPlayerMP;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.ChatComponentText;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.IChatComponent;
-import net.minecraftforge.event.world.BlockEvent;
-
-import java.util.List;
-
-public class GT_Tool_Sense
- extends GT_Tool {
- private ThreadLocal<Object> sIsHarvestingRightNow = new ThreadLocal();
-
- public float getBaseDamage() {
- return 3.0F;
- }
-
- public float getMaxDurabilityMultiplier() {
- return 4.0F;
- }
-
-
- public boolean isMinableBlock(Block aBlock, byte aMetaData) {
- String tTool = aBlock.getHarvestTool(aMetaData);
- return ((tTool != null) && ((tTool.equals("sense")) || (tTool.equals("scythe")))) || (aBlock.getMaterial() == Material.plants) || (aBlock.getMaterial() == Material.leaves);
- }
-
- public int convertBlockDrops(List<ItemStack> aDrops, ItemStack aStack, EntityPlayer aPlayer, Block aBlock, int aX, int aY, int aZ, byte aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent) {
- int rConversions = 0;
- if ((this.sIsHarvestingRightNow.get() == null) && ((aPlayer instanceof EntityPlayerMP))) {
- this.sIsHarvestingRightNow.set(this);
- for (int i = -2; i < 3; i++) {
- for (int j = -2; j < 3; j++) {
- for (int k = -2; k < 3; k++) {
- if (((i != 0) || (j != 0) || (k != 0)) && (aStack.getItem().getDigSpeed(aStack, aPlayer.worldObj.getBlock(aX + i, aY + j, aZ + k), aPlayer.worldObj.getBlockMetadata(aX + i, aY + j, aZ + k)) > 0.0F) && (((EntityPlayerMP) aPlayer).theItemInWorldManager.tryHarvestBlock(aX + i, aY + j, aZ + k))) {
- rConversions++;
- }
- }
- }
- }
- this.sIsHarvestingRightNow.set(null);
- }
- return rConversions;
- }
-
- public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) {
- return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadSense.mTextureIndex] : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.stick.mTextureIndex];
- }
-
- public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) {
- return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa;
- }
-
- public void onStatsAddedToTool(GT_MetaGenerated_Tool aItem, int aID) {
- aItem.addItemBehavior(aID, new Behaviour_Sense(getToolDamagePerBlockBreak()));
- }
-
- public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) {
- return new ChatComponentText(EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE + " has taken the Soul of " + EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE);
- }
-}
+package gregtech.common.tools; + +import gregtech.api.interfaces.IIconContainer; +import gregtech.api.items.GT_MetaGenerated_Tool; +import gregtech.common.items.behaviors.Behaviour_Sense; +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.item.ItemStack; +import net.minecraft.util.ChatComponentText; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.IChatComponent; +import net.minecraftforge.event.world.BlockEvent; + +import java.util.List; + +public class GT_Tool_Sense + extends GT_Tool { + private ThreadLocal<Object> sIsHarvestingRightNow = new ThreadLocal(); + + public float getBaseDamage() { + return 3.0F; + } + + public float getMaxDurabilityMultiplier() { + return 4.0F; + } + + + public boolean isMinableBlock(Block aBlock, byte aMetaData) { + String tTool = aBlock.getHarvestTool(aMetaData); + return ((tTool != null) && ((tTool.equals("sense")) || (tTool.equals("scythe")))) || (aBlock.getMaterial() == Material.plants) || (aBlock.getMaterial() == Material.leaves); + } + + public int convertBlockDrops(List<ItemStack> aDrops, ItemStack aStack, EntityPlayer aPlayer, Block aBlock, int aX, int aY, int aZ, byte aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent) { + int rConversions = 0; + if ((this.sIsHarvestingRightNow.get() == null) && ((aPlayer instanceof EntityPlayerMP))) { + this.sIsHarvestingRightNow.set(this); + for (int i = -2; i < 3; i++) { + for (int j = -2; j < 3; j++) { + for (int k = -2; k < 3; k++) { + if (((i != 0) || (j != 0) || (k != 0)) && (aStack.getItem().getDigSpeed(aStack, aPlayer.worldObj.getBlock(aX + i, aY + j, aZ + k), aPlayer.worldObj.getBlockMetadata(aX + i, aY + j, aZ + k)) > 0.0F) && (((EntityPlayerMP) aPlayer).theItemInWorldManager.tryHarvestBlock(aX + i, aY + j, aZ + k))) { + rConversions++; + } + } + } + } + this.sIsHarvestingRightNow.set(null); + } + return rConversions; + } + + public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { + return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadSense.mTextureIndex] : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.stick.mTextureIndex]; + } + + public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { + return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; + } + + public void onStatsAddedToTool(GT_MetaGenerated_Tool aItem, int aID) { + aItem.addItemBehavior(aID, new Behaviour_Sense(getToolDamagePerBlockBreak())); + } + + public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) { + return new ChatComponentText(EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE + " has taken the Soul of " + EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE); + } +} diff --git a/src/main/java/gregtech/common/tools/GT_Tool_Shovel.java b/src/main/java/gregtech/common/tools/GT_Tool_Shovel.java index 677777d301..4a08f91b09 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Shovel.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Shovel.java @@ -1,95 +1,95 @@ -package gregtech.common.tools;
-
-import gregtech.api.GregTech_API;
-import gregtech.api.interfaces.IIconContainer;
-import gregtech.api.items.GT_MetaGenerated_Tool;
-import net.minecraft.block.Block;
-import net.minecraft.block.material.Material;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.ChatComponentText;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.IChatComponent;
-
-public class GT_Tool_Shovel
- extends GT_Tool {
- public int getToolDamagePerBlockBreak() {
- return 50;
- }
-
- public int getToolDamagePerDropConversion() {
- return 100;
- }
-
- public int getToolDamagePerContainerCraft() {
- return 100;
- }
-
- public int getToolDamagePerEntityAttack() {
- return 200;
- }
-
- public int getBaseQuality() {
- return 0;
- }
-
- public float getBaseDamage() {
- return 1.5F;
- }
-
- public float getSpeedMultiplier() {
- return 1.0F;
- }
-
- public float getMaxDurabilityMultiplier() {
- return 1.0F;
- }
-
- public String getCraftingSound() {
- return null;
- }
-
- public String getEntityHitSound() {
- return null;
- }
-
- public String getBreakingSound() {
- return (String) GregTech_API.sSoundList.get(Integer.valueOf(0));
- }
-
- public String getMiningSound() {
- return null;
- }
-
- public boolean canBlock() {
- return false;
- }
-
- public boolean isCrowbar() {
- return false;
- }
-
- public boolean isMinableBlock(Block aBlock, byte aMetaData) {
- String tTool = aBlock.getHarvestTool(aMetaData);
- return ((tTool != null) && (tTool.equals("shovel"))) || (aBlock.getMaterial() == Material.sand) || (aBlock.getMaterial() == Material.grass) || (aBlock.getMaterial() == Material.ground) || (aBlock.getMaterial() == Material.snow) || (aBlock.getMaterial() == Material.clay);
- }
-
- public ItemStack getBrokenItem(ItemStack aStack) {
- return null;
- }
-
- public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) {
- return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadShovel.mTextureIndex] : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.stick.mTextureIndex];
- }
-
- public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) {
- return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa;
- }
-
- public void onStatsAddedToTool(GT_MetaGenerated_Tool aItem, int aID) {
- }
-
- public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) {
- return new ChatComponentText(EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE + " got dug up by " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE);
- }
-}
+package gregtech.common.tools; + +import gregtech.api.GregTech_API; +import gregtech.api.interfaces.IIconContainer; +import gregtech.api.items.GT_MetaGenerated_Tool; +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.item.ItemStack; +import net.minecraft.util.ChatComponentText; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.IChatComponent; + +public class GT_Tool_Shovel + extends GT_Tool { + public int getToolDamagePerBlockBreak() { + return 50; + } + + public int getToolDamagePerDropConversion() { + return 100; + } + + public int getToolDamagePerContainerCraft() { + return 100; + } + + public int getToolDamagePerEntityAttack() { + return 200; + } + + public int getBaseQuality() { + return 0; + } + + public float getBaseDamage() { + return 1.5F; + } + + public float getSpeedMultiplier() { + return 1.0F; + } + + public float getMaxDurabilityMultiplier() { + return 1.0F; + } + + public String getCraftingSound() { + return null; + } + + public String getEntityHitSound() { + return null; + } + + public String getBreakingSound() { + return (String) GregTech_API.sSoundList.get(Integer.valueOf(0)); + } + + public String getMiningSound() { + return null; + } + + public boolean canBlock() { + return false; + } + + public boolean isCrowbar() { + return false; + } + + public boolean isMinableBlock(Block aBlock, byte aMetaData) { + String tTool = aBlock.getHarvestTool(aMetaData); + return ((tTool != null) && (tTool.equals("shovel"))) || (aBlock.getMaterial() == Material.sand) || (aBlock.getMaterial() == Material.grass) || (aBlock.getMaterial() == Material.ground) || (aBlock.getMaterial() == Material.snow) || (aBlock.getMaterial() == Material.clay); + } + + public ItemStack getBrokenItem(ItemStack aStack) { + return null; + } + + public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { + return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadShovel.mTextureIndex] : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.stick.mTextureIndex]; + } + + public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { + return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; + } + + public void onStatsAddedToTool(GT_MetaGenerated_Tool aItem, int aID) { + } + + public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) { + return new ChatComponentText(EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE + " got dug up by " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE); + } +} diff --git a/src/main/java/gregtech/common/tools/GT_Tool_Sword.java b/src/main/java/gregtech/common/tools/GT_Tool_Sword.java index 44e524e548..23f11d3ccb 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Sword.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Sword.java @@ -1,96 +1,96 @@ -package gregtech.common.tools;
-
-import gregtech.api.GregTech_API;
-import gregtech.api.enums.Textures;
-import gregtech.api.interfaces.IIconContainer;
-import gregtech.api.items.GT_MetaGenerated_Tool;
-import net.minecraft.block.Block;
-import net.minecraft.block.material.Material;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.stats.AchievementList;
-
-public class GT_Tool_Sword
- extends GT_Tool {
- public int getToolDamagePerBlockBreak() {
- return 200;
- }
-
- public int getToolDamagePerDropConversion() {
- return 100;
- }
-
- public int getToolDamagePerContainerCraft() {
- return 100;
- }
-
- public int getToolDamagePerEntityAttack() {
- return 100;
- }
-
- public int getBaseQuality() {
- return 0;
- }
-
- public float getBaseDamage() {
- return 4.0F;
- }
-
- public float getSpeedMultiplier() {
- return 1.0F;
- }
-
- public float getMaxDurabilityMultiplier() {
- return 1.0F;
- }
-
- public String getCraftingSound() {
- return null;
- }
-
- public String getEntityHitSound() {
- return null;
- }
-
- public String getBreakingSound() {
- return (String) GregTech_API.sSoundList.get(Integer.valueOf(0));
- }
-
- public String getMiningSound() {
- return null;
- }
-
- public boolean canBlock() {
- return true;
- }
-
- public boolean isCrowbar() {
- return false;
- }
-
- public boolean isWeapon() {
- return true;
- }
-
- public boolean isMinableBlock(Block aBlock, byte aMetaData) {
- String tTool = aBlock.getHarvestTool(aMetaData);
- return ((tTool != null) && (tTool.equals("sword"))) || (aBlock.getMaterial() == Material.leaves) || (aBlock.getMaterial() == Material.gourd) || (aBlock.getMaterial() == Material.vine) || (aBlock.getMaterial() == Material.web) || (aBlock.getMaterial() == Material.cloth) || (aBlock.getMaterial() == Material.carpet) || (aBlock.getMaterial() == Material.plants) || (aBlock.getMaterial() == Material.cactus) || (aBlock.getMaterial() == Material.cake) || (aBlock.getMaterial() == Material.tnt) || (aBlock.getMaterial() == Material.sponge);
- }
-
- public ItemStack getBrokenItem(ItemStack aStack) {
- return null;
- }
-
- public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) {
- return !aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadSword.mTextureIndex] : Textures.ItemIcons.HANDLE_SWORD;
- }
-
- public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) {
- return !aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa;
- }
-
- public void onToolCrafted(ItemStack aStack, EntityPlayer aPlayer) {
- super.onToolCrafted(aStack, aPlayer);
- aPlayer.triggerAchievement(AchievementList.buildSword);
- }
-}
+package gregtech.common.tools; + +import gregtech.api.GregTech_API; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.IIconContainer; +import gregtech.api.items.GT_MetaGenerated_Tool; +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.stats.AchievementList; + +public class GT_Tool_Sword + extends GT_Tool { + public int getToolDamagePerBlockBreak() { + return 200; + } + + public int getToolDamagePerDropConversion() { + return 100; + } + + public int getToolDamagePerContainerCraft() { + return 100; + } + + public int getToolDamagePerEntityAttack() { + return 100; + } + + public int getBaseQuality() { + return 0; + } + + public float getBaseDamage() { + return 4.0F; + } + + public float getSpeedMultiplier() { + return 1.0F; + } + + public float getMaxDurabilityMultiplier() { + return 1.0F; + } + + public String getCraftingSound() { + return null; + } + + public String getEntityHitSound() { + return null; + } + + public String getBreakingSound() { + return (String) GregTech_API.sSoundList.get(Integer.valueOf(0)); + } + + public String getMiningSound() { + return null; + } + + public boolean canBlock() { + return true; + } + + public boolean isCrowbar() { + return false; + } + + public boolean isWeapon() { + return true; + } + + public boolean isMinableBlock(Block aBlock, byte aMetaData) { + String tTool = aBlock.getHarvestTool(aMetaData); + return ((tTool != null) && (tTool.equals("sword"))) || (aBlock.getMaterial() == Material.leaves) || (aBlock.getMaterial() == Material.gourd) || (aBlock.getMaterial() == Material.vine) || (aBlock.getMaterial() == Material.web) || (aBlock.getMaterial() == Material.cloth) || (aBlock.getMaterial() == Material.carpet) || (aBlock.getMaterial() == Material.plants) || (aBlock.getMaterial() == Material.cactus) || (aBlock.getMaterial() == Material.cake) || (aBlock.getMaterial() == Material.tnt) || (aBlock.getMaterial() == Material.sponge); + } + + public ItemStack getBrokenItem(ItemStack aStack) { + return null; + } + + public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { + return !aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadSword.mTextureIndex] : Textures.ItemIcons.HANDLE_SWORD; + } + + public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { + return !aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; + } + + public void onToolCrafted(ItemStack aStack, EntityPlayer aPlayer) { + super.onToolCrafted(aStack, aPlayer); + aPlayer.triggerAchievement(AchievementList.buildSword); + } +} diff --git a/src/main/java/gregtech/common/tools/GT_Tool_UniversalSpade.java b/src/main/java/gregtech/common/tools/GT_Tool_UniversalSpade.java index 03fd6a97a1..aae60b8afb 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_UniversalSpade.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_UniversalSpade.java @@ -1,113 +1,113 @@ -package gregtech.common.tools;
-
-import gregtech.GT_Mod;
-import gregtech.api.GregTech_API;
-import gregtech.api.interfaces.IIconContainer;
-import gregtech.api.items.GT_MetaGenerated_Tool;
-import gregtech.common.items.behaviors.Behaviour_Crowbar;
-import net.minecraft.block.Block;
-import net.minecraft.block.material.Material;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.stats.AchievementList;
-import net.minecraft.util.ChatComponentText;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.IChatComponent;
-
-public class GT_Tool_UniversalSpade
- extends GT_Tool {
- public int getToolDamagePerBlockBreak() {
- return 50;
- }
-
- public int getToolDamagePerDropConversion() {
- return 100;
- }
-
- public int getToolDamagePerContainerCraft() {
- return 400;
- }
-
- public int getToolDamagePerEntityAttack() {
- return 100;
- }
-
- public int getBaseQuality() {
- return 0;
- }
-
- public float getBaseDamage() {
- return 3.0F;
- }
-
- public float getSpeedMultiplier() {
- return 0.75F;
- }
-
- public float getMaxDurabilityMultiplier() {
- return 1.0F;
- }
-
- public String getCraftingSound() {
- return null;
- }
-
- public String getEntityHitSound() {
- return null;
- }
-
- public String getBreakingSound() {
- return (String) GregTech_API.sSoundList.get(Integer.valueOf(0));
- }
-
- public String getMiningSound() {
- return null;
- }
-
- public boolean canBlock() {
- return true;
- }
-
- public boolean isCrowbar() {
- return true;
- }
-
- public boolean isWeapon() {
- return true;
- }
-
- public boolean isMinableBlock(Block aBlock, byte aMetaData) {
- String tTool = aBlock.getHarvestTool(aMetaData);
- return ((tTool != null) && ((tTool.equals("shovel")) || (tTool.equals("axe")) || (tTool.equals("saw")) || (tTool.equals("sword")) || (tTool.equals("crowbar")))) || (aBlock.getMaterial() == Material.sand) || (aBlock.getMaterial() == Material.grass) || (aBlock.getMaterial() == Material.ground) || (aBlock.getMaterial() == Material.snow) || (aBlock.getMaterial() == Material.clay) || (aBlock.getMaterial() == Material.leaves) || (aBlock.getMaterial() == Material.vine) || (aBlock.getMaterial() == Material.wood) || (aBlock.getMaterial() == Material.cactus) || (aBlock.getMaterial() == Material.circuits) || (aBlock.getMaterial() == Material.gourd) || (aBlock.getMaterial() == Material.web) || (aBlock.getMaterial() == Material.cloth) || (aBlock.getMaterial() == Material.carpet) || (aBlock.getMaterial() == Material.plants) || (aBlock.getMaterial() == Material.cake) || (aBlock.getMaterial() == Material.tnt) || (aBlock.getMaterial() == Material.sponge);
- }
-
- public ItemStack getBrokenItem(ItemStack aStack) {
- return null;
- }
-
- public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) {
- return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadUniversalSpade.mTextureIndex] : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.stick.mTextureIndex];
- }
-
- public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) {
- return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa;
- }
-
- public void onStatsAddedToTool(GT_MetaGenerated_Tool aItem, int aID) {
- aItem.addItemBehavior(aID, new Behaviour_Crowbar(2, 2000));
- }
-
- public void onToolCrafted(ItemStack aStack, EntityPlayer aPlayer) {
- super.onToolCrafted(aStack, aPlayer);
- aPlayer.triggerAchievement(AchievementList.buildSword);
- try {
- GT_Mod.instance.achievements.issueAchievement(aPlayer, "unitool");
- } catch (Exception e) {
- }
- }
-
- public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) {
- return new ChatComponentText(EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE + " has been digged by " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE);
- }
-}
+package gregtech.common.tools; + +import gregtech.GT_Mod; +import gregtech.api.GregTech_API; +import gregtech.api.interfaces.IIconContainer; +import gregtech.api.items.GT_MetaGenerated_Tool; +import gregtech.common.items.behaviors.Behaviour_Crowbar; +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.stats.AchievementList; +import net.minecraft.util.ChatComponentText; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.IChatComponent; + +public class GT_Tool_UniversalSpade + extends GT_Tool { + public int getToolDamagePerBlockBreak() { + return 50; + } + + public int getToolDamagePerDropConversion() { + return 100; + } + + public int getToolDamagePerContainerCraft() { + return 400; + } + + public int getToolDamagePerEntityAttack() { + return 100; + } + + public int getBaseQuality() { + return 0; + } + + public float getBaseDamage() { + return 3.0F; + } + + public float getSpeedMultiplier() { + return 0.75F; + } + + public float getMaxDurabilityMultiplier() { + return 1.0F; + } + + public String getCraftingSound() { + return null; + } + + public String getEntityHitSound() { + return null; + } + + public String getBreakingSound() { + return (String) GregTech_API.sSoundList.get(Integer.valueOf(0)); + } + + public String getMiningSound() { + return null; + } + + public boolean canBlock() { + return true; + } + + public boolean isCrowbar() { + return true; + } + + public boolean isWeapon() { + return true; + } + + public boolean isMinableBlock(Block aBlock, byte aMetaData) { + String tTool = aBlock.getHarvestTool(aMetaData); + return ((tTool != null) && ((tTool.equals("shovel")) || (tTool.equals("axe")) || (tTool.equals("saw")) || (tTool.equals("sword")) || (tTool.equals("crowbar")))) || (aBlock.getMaterial() == Material.sand) || (aBlock.getMaterial() == Material.grass) || (aBlock.getMaterial() == Material.ground) || (aBlock.getMaterial() == Material.snow) || (aBlock.getMaterial() == Material.clay) || (aBlock.getMaterial() == Material.leaves) || (aBlock.getMaterial() == Material.vine) || (aBlock.getMaterial() == Material.wood) || (aBlock.getMaterial() == Material.cactus) || (aBlock.getMaterial() == Material.circuits) || (aBlock.getMaterial() == Material.gourd) || (aBlock.getMaterial() == Material.web) || (aBlock.getMaterial() == Material.cloth) || (aBlock.getMaterial() == Material.carpet) || (aBlock.getMaterial() == Material.plants) || (aBlock.getMaterial() == Material.cake) || (aBlock.getMaterial() == Material.tnt) || (aBlock.getMaterial() == Material.sponge); + } + + public ItemStack getBrokenItem(ItemStack aStack) { + return null; + } + + public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { + return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadUniversalSpade.mTextureIndex] : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.stick.mTextureIndex]; + } + + public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { + return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; + } + + public void onStatsAddedToTool(GT_MetaGenerated_Tool aItem, int aID) { + aItem.addItemBehavior(aID, new Behaviour_Crowbar(2, 2000)); + } + + public void onToolCrafted(ItemStack aStack, EntityPlayer aPlayer) { + super.onToolCrafted(aStack, aPlayer); + aPlayer.triggerAchievement(AchievementList.buildSword); + try { + GT_Mod.instance.achievements.issueAchievement(aPlayer, "unitool"); + } catch (Exception e) { + } + } + + public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) { + return new ChatComponentText(EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE + " has been digged by " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE); + } +} diff --git a/src/main/java/gregtech/common/tools/GT_Tool_WireCutter.java b/src/main/java/gregtech/common/tools/GT_Tool_WireCutter.java index 473abf7889..6592a2afe6 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_WireCutter.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_WireCutter.java @@ -1,95 +1,95 @@ -package gregtech.common.tools;
-
-import gregtech.api.GregTech_API;
-import gregtech.api.enums.Textures;
-import gregtech.api.interfaces.IIconContainer;
-import gregtech.api.items.GT_MetaGenerated_Tool;
-import net.minecraft.block.Block;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.ChatComponentText;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.IChatComponent;
-
-public class GT_Tool_WireCutter
- extends GT_Tool {
- public int getToolDamagePerBlockBreak() {
- return 100;
- }
-
- public int getToolDamagePerDropConversion() {
- return 100;
- }
-
- public int getToolDamagePerContainerCraft() {
- return 400;
- }
-
- public int getToolDamagePerEntityAttack() {
- return 200;
- }
-
- public int getBaseQuality() {
- return 0;
- }
-
- public float getBaseDamage() {
- return 1.25F;
- }
-
- public float getSpeedMultiplier() {
- return 1.0F;
- }
-
- public float getMaxDurabilityMultiplier() {
- return 1.0F;
- }
-
- public String getCraftingSound() {
- return null;
- }
-
- public String getEntityHitSound() {
- return null;
- }
-
- public String getBreakingSound() {
- return (String) GregTech_API.sSoundList.get(Integer.valueOf(0));
- }
-
- public String getMiningSound() {
- return null;
- }
-
- public boolean canBlock() {
- return false;
- }
-
- public boolean isCrowbar() {
- return false;
- }
-
- public boolean isMinableBlock(Block aBlock, byte aMetaData) {
- String tTool = aBlock.getHarvestTool(aMetaData);
- return (tTool != null) && (tTool.equals("cutter"));
- }
-
- public ItemStack getBrokenItem(ItemStack aStack) {
- return null;
- }
-
- public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) {
- return aIsToolHead ? Textures.ItemIcons.WIRE_CUTTER : null;
- }
-
- public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) {
- return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa;
- }
-
- public void onStatsAddedToTool(GT_MetaGenerated_Tool aItem, int aID) {
- }
-
- public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) {
- return new ChatComponentText(EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE + " has cut the Cable for the Life Support Machine of " + EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE);
- }
-}
+package gregtech.common.tools; + +import gregtech.api.GregTech_API; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.IIconContainer; +import gregtech.api.items.GT_MetaGenerated_Tool; +import net.minecraft.block.Block; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.item.ItemStack; +import net.minecraft.util.ChatComponentText; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.IChatComponent; + +public class GT_Tool_WireCutter + extends GT_Tool { + public int getToolDamagePerBlockBreak() { + return 100; + } + + public int getToolDamagePerDropConversion() { + return 100; + } + + public int getToolDamagePerContainerCraft() { + return 400; + } + + public int getToolDamagePerEntityAttack() { + return 200; + } + + public int getBaseQuality() { + return 0; + } + + public float getBaseDamage() { + return 1.25F; + } + + public float getSpeedMultiplier() { + return 1.0F; + } + + public float getMaxDurabilityMultiplier() { + return 1.0F; + } + + public String getCraftingSound() { + return null; + } + + public String getEntityHitSound() { + return null; + } + + public String getBreakingSound() { + return (String) GregTech_API.sSoundList.get(Integer.valueOf(0)); + } + + public String getMiningSound() { + return null; + } + + public boolean canBlock() { + return false; + } + + public boolean isCrowbar() { + return false; + } + + public boolean isMinableBlock(Block aBlock, byte aMetaData) { + String tTool = aBlock.getHarvestTool(aMetaData); + return (tTool != null) && (tTool.equals("cutter")); + } + + public ItemStack getBrokenItem(ItemStack aStack) { + return null; + } + + public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { + return aIsToolHead ? Textures.ItemIcons.WIRE_CUTTER : null; + } + + public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { + return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; + } + + public void onStatsAddedToTool(GT_MetaGenerated_Tool aItem, int aID) { + } + + public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) { + return new ChatComponentText(EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE + " has cut the Cable for the Life Support Machine of " + EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE); + } +} diff --git a/src/main/java/gregtech/common/tools/GT_Tool_Wrench.java b/src/main/java/gregtech/common/tools/GT_Tool_Wrench.java index 2af09fe218..a202854060 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Wrench.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Wrench.java @@ -1,131 +1,131 @@ -package gregtech.common.tools;
-
-import gregtech.api.GregTech_API;
-import gregtech.api.enums.Textures;
-import gregtech.api.interfaces.IIconContainer;
-import gregtech.api.items.GT_MetaGenerated_Tool;
-import gregtech.common.items.behaviors.Behaviour_Wrench;
-import net.minecraft.block.Block;
-import net.minecraft.block.material.Material;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.entity.monster.EntityIronGolem;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Blocks;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.ChatComponentText;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.IChatComponent;
-
-import java.util.Arrays;
-import java.util.List;
-
-public class GT_Tool_Wrench
- extends GT_Tool {
- public static final List<String> mEffectiveList = Arrays.asList(new String[]{EntityIronGolem.class.getName(), "EntityTowerGuardian"});
-
- public float getNormalDamageAgainstEntity(float aOriginalDamage, Entity aEntity, ItemStack aStack, EntityPlayer aPlayer) {
- String tName = aEntity.getClass().getName();
- tName = tName.substring(tName.lastIndexOf('.') + 1);
- return (mEffectiveList.contains(tName)) || (tName.contains("Golem")) ? aOriginalDamage * 2.0F : aOriginalDamage;
- }
-
- public int getToolDamagePerBlockBreak() {
- return 50;
- }
-
- public int getToolDamagePerDropConversion() {
- return 100;
- }
-
- public int getToolDamagePerContainerCraft() {
- return 800;
- }
-
- public int getToolDamagePerEntityAttack() {
- return 200;
- }
-
- public int getBaseQuality() {
- return 0;
- }
-
- public float getBaseDamage() {
- return 3.0F;
- }
-
- public int getHurtResistanceTime(int aOriginalHurtResistance, Entity aEntity) {
- return aOriginalHurtResistance * 2;
- }
-
- public float getSpeedMultiplier() {
- return 1.0F;
- }
-
- public float getMaxDurabilityMultiplier() {
- return 1.0F;
- }
-
- public String getCraftingSound() {
- return (String) GregTech_API.sSoundList.get(Integer.valueOf(100));
- }
-
- public String getEntityHitSound() {
- return null;
- }
-
- public String getBreakingSound() {
- return (String) GregTech_API.sSoundList.get(Integer.valueOf(0));
- }
-
- public String getMiningSound() {
- return (String) GregTech_API.sSoundList.get(Integer.valueOf(100));
- }
-
- public boolean canBlock() {
- return false;
- }
-
- public boolean isCrowbar() {
- return false;
- }
-
- public boolean isWrench() {
- return true;
- }
-
- public boolean isMinableBlock(Block aBlock, byte aMetaData) {
- String tTool = aBlock.getHarvestTool(aMetaData);
- return ((tTool != null) && (tTool.equals("wrench"))) || (aBlock.getMaterial() == Material.piston) || (aBlock == Blocks.hopper) || (aBlock == Blocks.dispenser) || (aBlock == Blocks.dropper);
- }
-
- public ItemStack getBrokenItem(ItemStack aStack) {
- return null;
- }
-
- public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) {
- return aIsToolHead ? Textures.ItemIcons.WRENCH : null;
- }
-
- public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) {
- return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : null;
- }
-
- public void onStatsAddedToTool(GT_MetaGenerated_Tool aItem, int aID) {
- aItem.addItemBehavior(aID, new Behaviour_Wrench(100));
- }
-
- public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) {
- return new ChatComponentText(EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE + " threw a Monkey Wrench into the Plans of " + EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE);
- }
-}
-
-
-
-/* Location: F:\Torrent\minecraft\jd-gui-0.3.6.windows\gregtech_1.7.10-5.07.07-dev.jar
-
- * Qualified Name: gregtech.common.tools.GT_Tool_Wrench
-
- * JD-Core Version: 0.7.0.1
-
- */
\ No newline at end of file +package gregtech.common.tools; + +import gregtech.api.GregTech_API; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.IIconContainer; +import gregtech.api.items.GT_MetaGenerated_Tool; +import gregtech.common.items.behaviors.Behaviour_Wrench; +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.monster.EntityIronGolem; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.item.ItemStack; +import net.minecraft.util.ChatComponentText; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.IChatComponent; + +import java.util.Arrays; +import java.util.List; + +public class GT_Tool_Wrench + extends GT_Tool { + public static final List<String> mEffectiveList = Arrays.asList(new String[]{EntityIronGolem.class.getName(), "EntityTowerGuardian"}); + + public float getNormalDamageAgainstEntity(float aOriginalDamage, Entity aEntity, ItemStack aStack, EntityPlayer aPlayer) { + String tName = aEntity.getClass().getName(); + tName = tName.substring(tName.lastIndexOf('.') + 1); + return (mEffectiveList.contains(tName)) || (tName.contains("Golem")) ? aOriginalDamage * 2.0F : aOriginalDamage; + } + + public int getToolDamagePerBlockBreak() { + return 50; + } + + public int getToolDamagePerDropConversion() { + return 100; + } + + public int getToolDamagePerContainerCraft() { + return 800; + } + + public int getToolDamagePerEntityAttack() { + return 200; + } + + public int getBaseQuality() { + return 0; + } + + public float getBaseDamage() { + return 3.0F; + } + + public int getHurtResistanceTime(int aOriginalHurtResistance, Entity aEntity) { + return aOriginalHurtResistance * 2; + } + + public float getSpeedMultiplier() { + return 1.0F; + } + + public float getMaxDurabilityMultiplier() { + return 1.0F; + } + + public String getCraftingSound() { + return (String) GregTech_API.sSoundList.get(Integer.valueOf(100)); + } + + public String getEntityHitSound() { + return null; + } + + public String getBreakingSound() { + return (String) GregTech_API.sSoundList.get(Integer.valueOf(0)); + } + + public String getMiningSound() { + return (String) GregTech_API.sSoundList.get(Integer.valueOf(100)); + } + + public boolean canBlock() { + return false; + } + + public boolean isCrowbar() { + return false; + } + + public boolean isWrench() { + return true; + } + + public boolean isMinableBlock(Block aBlock, byte aMetaData) { + String tTool = aBlock.getHarvestTool(aMetaData); + return ((tTool != null) && (tTool.equals("wrench"))) || (aBlock.getMaterial() == Material.piston) || (aBlock == Blocks.hopper) || (aBlock == Blocks.dispenser) || (aBlock == Blocks.dropper); + } + + public ItemStack getBrokenItem(ItemStack aStack) { + return null; + } + + public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { + return aIsToolHead ? Textures.ItemIcons.WRENCH : null; + } + + public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { + return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : null; + } + + public void onStatsAddedToTool(GT_MetaGenerated_Tool aItem, int aID) { + aItem.addItemBehavior(aID, new Behaviour_Wrench(100)); + } + + public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) { + return new ChatComponentText(EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE + " threw a Monkey Wrench into the Plans of " + EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE); + } +} + + + +/* Location: F:\Torrent\minecraft\jd-gui-0.3.6.windows\gregtech_1.7.10-5.07.07-dev.jar + + * Qualified Name: gregtech.common.tools.GT_Tool_Wrench + + * JD-Core Version: 0.7.0.1 + + */ diff --git a/src/main/java/gregtech/common/tools/GT_Tool_Wrench_HV.java b/src/main/java/gregtech/common/tools/GT_Tool_Wrench_HV.java index 3d5bf97ca0..deb7a8dbc3 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Wrench_HV.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Wrench_HV.java @@ -1,53 +1,53 @@ -package gregtech.common.tools;
-
-import gregtech.api.enums.Textures;
-import gregtech.api.interfaces.IIconContainer;
-import gregtech.api.items.GT_MetaGenerated_Tool;
-import net.minecraft.item.ItemStack;
-
-public class GT_Tool_Wrench_HV
- extends GT_Tool_Wrench_LV {
- public int getToolDamagePerBlockBreak() {
- return 800;
- }
-
- public int getToolDamagePerDropConversion() {
- return 1600;
- }
-
- public int getToolDamagePerContainerCraft() {
- return 12800;
- }
-
- public int getToolDamagePerEntityAttack() {
- return 3200;
- }
-
- public int getBaseQuality() {
- return 1;
- }
-
- public float getBaseDamage() {
- return 2.0F;
- }
-
- public float getSpeedMultiplier() {
- return 4.0F;
- }
-
- public float getMaxDurabilityMultiplier() {
- return 4.0F;
- }
-
- public boolean canBlock() {
- return false;
- }
-
- public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) {
- return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadWrench.mTextureIndex] : Textures.ItemIcons.POWER_UNIT_HV;
- }
-
- public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) {
- return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa;
- }
-}
+package gregtech.common.tools; + +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.IIconContainer; +import gregtech.api.items.GT_MetaGenerated_Tool; +import net.minecraft.item.ItemStack; + +public class GT_Tool_Wrench_HV + extends GT_Tool_Wrench_LV { + public int getToolDamagePerBlockBreak() { + return 800; + } + + public int getToolDamagePerDropConversion() { + return 1600; + } + + public int getToolDamagePerContainerCraft() { + return 12800; + } + + public int getToolDamagePerEntityAttack() { + return 3200; + } + + public int getBaseQuality() { + return 1; + } + + public float getBaseDamage() { + return 2.0F; + } + + public float getSpeedMultiplier() { + return 4.0F; + } + + public float getMaxDurabilityMultiplier() { + return 4.0F; + } + + public boolean canBlock() { + return false; + } + + public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { + return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadWrench.mTextureIndex] : Textures.ItemIcons.POWER_UNIT_HV; + } + + public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { + return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; + } +} diff --git a/src/main/java/gregtech/common/tools/GT_Tool_Wrench_LV.java b/src/main/java/gregtech/common/tools/GT_Tool_Wrench_LV.java index f9b333f1f7..034752f265 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Wrench_LV.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Wrench_LV.java @@ -1,59 +1,59 @@ -package gregtech.common.tools;
-
-import gregtech.api.enums.Textures;
-import gregtech.api.interfaces.IIconContainer;
-import gregtech.api.items.GT_MetaGenerated_Tool;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-
-public class GT_Tool_Wrench_LV
- extends GT_Tool_Wrench {
- public float getNormalDamageAgainstEntity(float aOriginalDamage, Entity aEntity, ItemStack aStack, EntityPlayer aPlayer) {
- return aOriginalDamage;
- }
-
- public int getToolDamagePerBlockBreak() {
- return 50;
- }
-
- public int getToolDamagePerDropConversion() {
- return 100;
- }
-
- public int getToolDamagePerContainerCraft() {
- return 800;
- }
-
- public int getToolDamagePerEntityAttack() {
- return 200;
- }
-
- public int getBaseQuality() {
- return 0;
- }
-
- public float getBaseDamage() {
- return 1.0F;
- }
-
- public float getSpeedMultiplier() {
- return 2.0F;
- }
-
- public float getMaxDurabilityMultiplier() {
- return 1.0F;
- }
-
- public boolean canBlock() {
- return false;
- }
-
- public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) {
- return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadWrench.mTextureIndex] : Textures.ItemIcons.POWER_UNIT_LV;
- }
-
- public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) {
- return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa;
- }
-}
+package gregtech.common.tools; + +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.IIconContainer; +import gregtech.api.items.GT_MetaGenerated_Tool; +import net.minecraft.entity.Entity; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; + +public class GT_Tool_Wrench_LV + extends GT_Tool_Wrench { + public float getNormalDamageAgainstEntity(float aOriginalDamage, Entity aEntity, ItemStack aStack, EntityPlayer aPlayer) { + return aOriginalDamage; + } + + public int getToolDamagePerBlockBreak() { + return 50; + } + + public int getToolDamagePerDropConversion() { + return 100; + } + + public int getToolDamagePerContainerCraft() { + return 800; + } + + public int getToolDamagePerEntityAttack() { + return 200; + } + + public int getBaseQuality() { + return 0; + } + + public float getBaseDamage() { + return 1.0F; + } + + public float getSpeedMultiplier() { + return 2.0F; + } + + public float getMaxDurabilityMultiplier() { + return 1.0F; + } + + public boolean canBlock() { + return false; + } + + public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { + return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadWrench.mTextureIndex] : Textures.ItemIcons.POWER_UNIT_LV; + } + + public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { + return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; + } +} diff --git a/src/main/java/gregtech/common/tools/GT_Tool_Wrench_MV.java b/src/main/java/gregtech/common/tools/GT_Tool_Wrench_MV.java index 45f87fa327..8a3fb4f968 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Wrench_MV.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Wrench_MV.java @@ -1,53 +1,53 @@ -package gregtech.common.tools;
-
-import gregtech.api.enums.Textures;
-import gregtech.api.interfaces.IIconContainer;
-import gregtech.api.items.GT_MetaGenerated_Tool;
-import net.minecraft.item.ItemStack;
-
-public class GT_Tool_Wrench_MV
- extends GT_Tool_Wrench_LV {
- public int getToolDamagePerBlockBreak() {
- return 200;
- }
-
- public int getToolDamagePerDropConversion() {
- return 400;
- }
-
- public int getToolDamagePerContainerCraft() {
- return 3200;
- }
-
- public int getToolDamagePerEntityAttack() {
- return 800;
- }
-
- public int getBaseQuality() {
- return 1;
- }
-
- public float getBaseDamage() {
- return 1.5F;
- }
-
- public float getSpeedMultiplier() {
- return 3.0F;
- }
-
- public float getMaxDurabilityMultiplier() {
- return 2.0F;
- }
-
- public boolean canBlock() {
- return false;
- }
-
- public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) {
- return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadWrench.mTextureIndex] : Textures.ItemIcons.POWER_UNIT_MV;
- }
-
- public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) {
- return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa;
- }
-}
+package gregtech.common.tools; + +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.IIconContainer; +import gregtech.api.items.GT_MetaGenerated_Tool; +import net.minecraft.item.ItemStack; + +public class GT_Tool_Wrench_MV + extends GT_Tool_Wrench_LV { + public int getToolDamagePerBlockBreak() { + return 200; + } + + public int getToolDamagePerDropConversion() { + return 400; + } + + public int getToolDamagePerContainerCraft() { + return 3200; + } + + public int getToolDamagePerEntityAttack() { + return 800; + } + + public int getBaseQuality() { + return 1; + } + + public float getBaseDamage() { + return 1.5F; + } + + public float getSpeedMultiplier() { + return 3.0F; + } + + public float getMaxDurabilityMultiplier() { + return 2.0F; + } + + public boolean canBlock() { + return false; + } + + public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { + return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadWrench.mTextureIndex] : Textures.ItemIcons.POWER_UNIT_MV; + } + + public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { + return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; + } +} |