aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gtPlusPlus/core/item
diff options
context:
space:
mode:
authorConnor-Colenso <52056774+Connor-Colenso@users.noreply.github.com>2023-09-04 03:05:22 +0100
committerGitHub <noreply@github.com>2023-09-04 03:05:22 +0100
commit76719d65a90d98e228a914774d3b11ed9f01ac8e (patch)
treece0d35f954e441e9cc4aa95aa347073728e6f4ee /src/main/java/gtPlusPlus/core/item
parent0393b582eb3edcb5c575330804b6747577a55e27 (diff)
downloadGT5-Unofficial-76719d65a90d98e228a914774d3b11ed9f01ac8e.tar.gz
GT5-Unofficial-76719d65a90d98e228a914774d3b11ed9f01ac8e.tar.bz2
GT5-Unofficial-76719d65a90d98e228a914774d3b11ed9f01ac8e.zip
Clean-up v2 (#729)
* Remove test items from NEI with no texture * Add number formatting to hand pumps * Remove heavy plates (no recipes & completely unused). * Remove helium generator (no texture, no recipe) * Remove fire pit and fire starter (no use, no recipe, no textures) * Remove giant chicken and associated unused stuff, has no texture and is unobtainable. Used to be relevant but isn't anymore. * Remove villagers with silly trades like 1 motor + 1 hull = 1 hull. Why? * Remove trade bench, no recipe, missing textures. Unused. * Remove farm processors, no texture, no recipe. Unused. * Remove MAX tier components, these exist in GT now, have no recipe here and are unused. * Hide untextured light block from NEI * Update buildscript * Remove unused backpacks, no recipe and contains dupe bugs. Bad. * Remove eatotronic, universal toolbox and magic tool bag. All 3 are missing textures and uncraftable. * Remove eatotronic, universal toolbox and magic tool bag. All 3 are missing textures and uncraftable. part 2 * Remove dragon catcher (what?), no texture, no recipe, unused. * Remove empty item, does nothing, has no recipe, no idea why it is here. * Empty item v2 removal * Revert "Empty item v2 removal" This reverts commit 75bcd3ccfaf55bbfe2c12b2e4167d5c37636030d. * Revert "Remove empty item, does nothing, has no recipe, no idea why it is here." This reverts commit e41a9f484392776331c58530ab1faa5ef978ef36. * Remove debug square. No recipe, unused. * Number formatting overflow covers * Remove JVM garbage collection block. Unused, no recipe. * Remove nanotubes, no recipe for them. Unused. * Remove "git" item, doesn't seem to work. Has no recipe. * Remove uncraftable food with awful textures. * Remove "bat king" mob, unused content. Does not spawn. * Remove uncraftable doors with bad textures. Unused content. * Remove uncraftable, unlocalised redstone stuff that crashes game when placed. * Remove weird spawner item. No recipe, does not exist in world. * Remove sunnarium bit, no recipe, no usage. * Remove unused modularity table and some misc uncraftable, unused items. * Remove Interconnecting Storage Crate, no recipe, unused. * Delete worse debug power gen, this already exists as part of GT. Unneeded duplication. * Delete unused placeholder circuit * Delete uncraftable generator hatches. * Spotless * Remove XP tank thing, unused and uncraftable. * Remove null item, this fluid registry only seemed to register one null fluid. All others exist? * Remove EU -> RF battery. Unused in GTNH. * Remove some shelf nonsense, why is this in this mod? * Remove some weird random tools. These have no realistic usage in GTNH. * Remove firemaker. Useless in GTNH. * Removed helium blob. Deprecated item, not used anymore, uncraftable. * spotlessApply (#730) Co-authored-by: GitHub GTNH Actions <> * Stop modulators generating unused blocks with no textures * Remove more unused untextured casings * Remove more unused untextured casings * Remove more unused untextured casings * Remove more unused untextured casings * Remove more unused untextured casings * Remove some weird methods and uncraftable mining parts, probably part of deprecated multiblock. * spotlessApply (#732) Co-authored-by: GitHub GTNH Actions <> * Remove gem shards, unused. * Remove unused atoms * Remove unused gum * Remove unused elements/materials * Bye bye * Remove some unused reflection stuff * Remove control cores, obsolete now. * Remove mob killing thing with no texture and no recipe. * Remove uncraftable covers * Remove pizza gloves * Net and rope removal, unused * Remove force crop * Removal of some old event stuff * Remove unused nuclear chem items * Remove player safe, mostly because of the horrible event code that was intercepting every block break. I can't see any real usage of this via discord. * Remove Force material and associated other nonsense. Also remove some nuclear chem stuff. * Remove force for realsies * Skookum Chooker purge. * Remove some enderio compat, these plates/dusts are added via GT5 anyway now. This is obsolete. * spotlessApply (#733) Co-authored-by: GitHub GTNH Actions <> * Unused textures * Bump dep * Revert "Remove force for realsies" This reverts commit 0d288912a99f9dabce56d2a2623d4d3510f4804e. * Revert "Remove Force material and associated other nonsense. Also remove some nuclear chem stuff." This reverts commit 3455e6e916defe1f2aef923be6f9696a6cf3095b. * Remove nuclear items that are unused * spotlessApply (#734) Co-authored-by: GitHub GTNH Actions <> --------- Co-authored-by: GTNH-Colen <54497873+GTNH-Colen@users.noreply.github.com> Co-authored-by: Connor Colenso <colen@CONNORSPC> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Diffstat (limited to 'src/main/java/gtPlusPlus/core/item')
-rw-r--r--src/main/java/gtPlusPlus/core/item/ModItems.java500
-rw-r--r--src/main/java/gtPlusPlus/core/item/base/BaseItemBackpack.java75
-rw-r--r--src/main/java/gtPlusPlus/core/item/base/BaseItemComponent.java2
-rw-r--r--src/main/java/gtPlusPlus/core/item/base/itemblock/ItemBlockEntityBase.java42
-rw-r--r--src/main/java/gtPlusPlus/core/item/base/itemblock/ItemBlockSpawner.java39
-rw-r--r--src/main/java/gtPlusPlus/core/item/base/plates/BaseItemPlateHeavy.java47
-rw-r--r--src/main/java/gtPlusPlus/core/item/bauble/FireProtectionBauble.java137
-rw-r--r--src/main/java/gtPlusPlus/core/item/bauble/HealthBoostBauble.java40
-rw-r--r--src/main/java/gtPlusPlus/core/item/bauble/ModularBauble.java495
-rw-r--r--src/main/java/gtPlusPlus/core/item/bauble/MonsterKillerBaseBauble.java181
-rw-r--r--src/main/java/gtPlusPlus/core/item/chemistry/NuclearChem.java44
-rw-r--r--src/main/java/gtPlusPlus/core/item/chemistry/general/ItemNuclearChemBase.java145
-rw-r--r--src/main/java/gtPlusPlus/core/item/general/BaseItemGrindle.java76
-rw-r--r--src/main/java/gtPlusPlus/core/item/general/ItemAreaClear.java205
-rw-r--r--src/main/java/gtPlusPlus/core/item/general/ItemBasicFirestarter.java98
-rw-r--r--src/main/java/gtPlusPlus/core/item/general/ItemControlCore.java82
-rw-r--r--src/main/java/gtPlusPlus/core/item/general/ItemGemShards.java67
-rw-r--r--src/main/java/gtPlusPlus/core/item/general/ItemGiantEgg.java297
-rw-r--r--src/main/java/gtPlusPlus/core/item/general/ItemSunnariumBit.java27
-rw-r--r--src/main/java/gtPlusPlus/core/item/general/RF2EU_Battery.java307
-rw-r--r--src/main/java/gtPlusPlus/core/item/general/capture/ItemEntityCatcher.java250
-rw-r--r--src/main/java/gtPlusPlus/core/item/general/throwables/ItemThrowableBomb.java2
-rw-r--r--src/main/java/gtPlusPlus/core/item/init/ItemsFoods.java70
-rw-r--r--src/main/java/gtPlusPlus/core/item/tool/misc/GregtechPump.java9
-rw-r--r--src/main/java/gtPlusPlus/core/item/tool/misc/SandstoneHammer.java75
-rw-r--r--src/main/java/gtPlusPlus/core/item/tool/misc/box/AutoLunchBox.java15
-rw-r--r--src/main/java/gtPlusPlus/core/item/tool/misc/box/MagicToolBag.java14
-rw-r--r--src/main/java/gtPlusPlus/core/item/tool/misc/box/UniversalToolBox.java16
-rw-r--r--src/main/java/gtPlusPlus/core/item/tool/staballoy/MultiPickaxeBase.java287
-rw-r--r--src/main/java/gtPlusPlus/core/item/tool/staballoy/StaballoyAxe.java372
-rw-r--r--src/main/java/gtPlusPlus/core/item/tool/staballoy/StaballoyPickaxe.java458
31 files changed, 8 insertions, 4466 deletions
diff --git a/src/main/java/gtPlusPlus/core/item/ModItems.java b/src/main/java/gtPlusPlus/core/item/ModItems.java
index 558353ddb3..45dc15b3f2 100644
--- a/src/main/java/gtPlusPlus/core/item/ModItems.java
+++ b/src/main/java/gtPlusPlus/core/item/ModItems.java
@@ -1,22 +1,15 @@
package gtPlusPlus.core.item;
-import static gregtech.api.enums.Mods.Baubles;
-import static gregtech.api.enums.Mods.EnderIO;
import static gregtech.api.enums.Mods.Forestry;
import static gregtech.api.enums.Mods.GTPlusPlus;
import static gregtech.api.enums.Mods.GregTech;
import static gregtech.api.enums.Mods.Thaumcraft;
-import static gtPlusPlus.core.creative.AddToCreativeTab.tabMachines;
import static gtPlusPlus.core.creative.AddToCreativeTab.tabMisc;
-import static gtPlusPlus.core.lib.CORE.LOAD_ALL_CONTENT;
import net.minecraft.item.EnumRarity;
import net.minecraft.item.Item;
-import net.minecraft.item.Item.ToolMaterial;
-import net.minecraft.item.ItemFood;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
-import net.minecraftforge.common.util.EnumHelper;
import net.minecraftforge.fluids.Fluid;
import net.minecraftforge.fluids.FluidRegistry;
import net.minecraftforge.fluids.FluidStack;
@@ -31,55 +24,37 @@ import gtPlusPlus.core.block.base.BasicBlock.BlockTypes;
import gtPlusPlus.core.block.base.BlockBaseModular;
import gtPlusPlus.core.common.compat.COMPAT_Baubles;
import gtPlusPlus.core.creative.AddToCreativeTab;
-import gtPlusPlus.core.item.base.BaseEuItem;
-import gtPlusPlus.core.item.base.BaseItemBackpack;
import gtPlusPlus.core.item.base.BaseItemComponent.ComponentTypes;
import gtPlusPlus.core.item.base.BaseItemDamageable;
import gtPlusPlus.core.item.base.BaseItemTCShard;
import gtPlusPlus.core.item.base.CoreItem;
import gtPlusPlus.core.item.base.dusts.BaseItemDust;
import gtPlusPlus.core.item.base.foil.BaseItemFoil;
-import gtPlusPlus.core.item.base.foods.BaseItemFood;
-import gtPlusPlus.core.item.base.foods.BaseItemHotFood;
import gtPlusPlus.core.item.base.gears.BaseItemSmallGear;
import gtPlusPlus.core.item.base.ingots.BaseItemIngot;
import gtPlusPlus.core.item.base.ingots.BaseItemIngot_OLD;
-import gtPlusPlus.core.item.base.misc.BaseItemMisc;
-import gtPlusPlus.core.item.base.misc.BaseItemMisc.MiscTypes;
import gtPlusPlus.core.item.base.plates.BaseItemPlate;
import gtPlusPlus.core.item.base.plates.BaseItemPlateDouble;
import gtPlusPlus.core.item.bauble.BatteryPackBaseBauble;
-import gtPlusPlus.core.item.bauble.HealthBoostBauble;
-import gtPlusPlus.core.item.bauble.ModularBauble;
-import gtPlusPlus.core.item.bauble.MonsterKillerBaseBauble;
import gtPlusPlus.core.item.chemistry.AgriculturalChem;
import gtPlusPlus.core.item.chemistry.CoalTar;
import gtPlusPlus.core.item.chemistry.GenericChem;
import gtPlusPlus.core.item.chemistry.IonParticles;
import gtPlusPlus.core.item.chemistry.MilledOreProcessing;
-import gtPlusPlus.core.item.chemistry.NuclearChem;
import gtPlusPlus.core.item.chemistry.RocketFuels;
import gtPlusPlus.core.item.chemistry.StandardBaseParticles;
import gtPlusPlus.core.item.crafting.ItemDummyResearch;
import gtPlusPlus.core.item.food.BaseItemMetaFood;
-import gtPlusPlus.core.item.general.BaseItemGrindle;
import gtPlusPlus.core.item.general.BufferCore;
import gtPlusPlus.core.item.general.ItemAirFilter;
-import gtPlusPlus.core.item.general.ItemAreaClear;
-import gtPlusPlus.core.item.general.ItemBasicFirestarter;
import gtPlusPlus.core.item.general.ItemBasicScrubberTurbine;
import gtPlusPlus.core.item.general.ItemBlueprint;
-import gtPlusPlus.core.item.general.ItemControlCore;
import gtPlusPlus.core.item.general.ItemEmpty;
-import gtPlusPlus.core.item.general.ItemGemShards;
import gtPlusPlus.core.item.general.ItemGenericToken;
-import gtPlusPlus.core.item.general.ItemGiantEgg;
import gtPlusPlus.core.item.general.ItemHalfCompleteCasings;
import gtPlusPlus.core.item.general.ItemLavaFilter;
import gtPlusPlus.core.item.general.ItemMagicFeather;
-import gtPlusPlus.core.item.general.ItemSunnariumBit;
import gtPlusPlus.core.item.general.books.ItemBaseBook;
-import gtPlusPlus.core.item.general.capture.ItemEntityCatcher;
import gtPlusPlus.core.item.general.chassis.ItemBoilerChassis;
import gtPlusPlus.core.item.general.chassis.ItemDehydratorCoil;
import gtPlusPlus.core.item.general.chassis.ItemDehydratorCoilWire;
@@ -91,14 +66,6 @@ import gtPlusPlus.core.item.init.ItemsFoods;
import gtPlusPlus.core.item.materials.DustDecayable;
import gtPlusPlus.core.item.tool.misc.DebugScanner;
import gtPlusPlus.core.item.tool.misc.GregtechPump;
-import gtPlusPlus.core.item.tool.misc.SandstoneHammer;
-import gtPlusPlus.core.item.tool.misc.box.AutoLunchBox;
-import gtPlusPlus.core.item.tool.misc.box.MagicToolBag;
-import gtPlusPlus.core.item.tool.misc.box.UniversalToolBox;
-import gtPlusPlus.core.item.tool.staballoy.MultiPickaxeBase;
-import gtPlusPlus.core.item.tool.staballoy.MultiSpadeBase;
-import gtPlusPlus.core.item.tool.staballoy.StaballoyAxe;
-import gtPlusPlus.core.item.tool.staballoy.StaballoyPickaxe;
import gtPlusPlus.core.item.wearable.WearableLoader;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.lib.CORE.ConfigSwitches;
@@ -118,112 +85,34 @@ import gtPlusPlus.core.util.minecraft.ItemUtils;
import gtPlusPlus.core.util.minecraft.MaterialUtils;
import gtPlusPlus.core.util.reflect.ReflectionUtils;
import gtPlusPlus.everglades.GTplusplus_Everglades;
-import gtPlusPlus.xmod.cofh.HANDLER_COFH;
-import gtPlusPlus.xmod.eio.material.MaterialEIO;
import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList;
import gtPlusPlus.xmod.gregtech.common.helpers.VolumetricFlaskHelper;
import gtPlusPlus.xmod.gregtech.common.items.MetaGeneratedGregtechItems;
public final class ModItems {
- public static ToolMaterial STABALLOY = EnumHelper.addToolMaterial("Staballoy", 3, 2500, 7, 1.0F, 18);
-
public static Item ZZZ_Empty;
public static Item AAA_Broken;
public static Item itemAlkalusDisk;
- public static Item itemDebugShapeSpawner;
public static ItemCustomSpawnEgg itemCustomSpawnEgg;
- // EnderIO
- public static Item itemPlateSoularium;
- public static Item itemPlateRedstoneAlloy;
- public static Item itemPlateElectricalSteel;
- public static Item itemPlatePulsatingIron;
- public static Item itemPlateEnergeticAlloy;
- public static Item itemPlateVibrantAlloy;
- public static Item itemPlateConductiveIron;
- public static Item itemPlateDarkSteel;
- public static Item itemDustSoularium;
- public static Item itemDustRedstoneAlloy;
- public static Item itemDustElectricalSteel;
- public static Item itemDustPulsatingIron;
- public static Item itemDustEnergeticAlloy;
- public static Item itemDustVibrantAlloy;
- public static Item itemDustConductiveIron;
-
- // Staballoy
- public static Item itemStaballoyPickaxe;
- public static Item itemStaballoyAxe;
- // Tools
- public static Item itemSandstoneHammer;
- // Machine Related
- public static Item itemBufferCore0;
- // Material related
- public static Item itemStickyRubber;
public static Item itemIngotBatteryAlloy;
public static Item itemPlateBatteryAlloy;
- public static Item itemHeliumBlob;
public static Item itemHydrogenBlob;
- public static Item itemPLACEHOLDER_Circuit;
-
- public static Item FuelRod_Empty;
- public static Item FuelRod_Thorium;
- public static Item FuelRod_Uranium;
- public static Item FuelRod_Plutonium;
public static Item itemBedLocator_Base;
public static Item itemBaseItemWithCharge;
- public static Item itemIngotRaisinBread;
- public static Item itemHotIngotRaisinBread;
-
- public static ItemFood itemFoodRaisinToast;
- public static BaseItemHotFood itemHotFoodRaisinToast;
- public static BaseItemFood itemFoodCurriedSausages;
- public static BaseItemHotFood itemHotFoodCurriedSausages;
-
- public static Item RfEuBattery;
public static Item itemPersonalCloakingDevice;
- public static Item itemPersonalCloakingDeviceCharged;
public static Item itemPersonalHealingDevice;
- public static Item itemPersonalFireProofDevice;
public static Item itemSlowBuildingRing;
- public static MultiPickaxeBase MP_GTMATERIAL;
- public static MultiSpadeBase MS_GTMATERIAL;
-
- public static ItemStack FluidCell;
-
- public static BaseItemBackpack backpack_Red;
- public static BaseItemBackpack backpack_Green;
- public static BaseItemBackpack backpack_Blue;
- public static BaseItemBackpack backpack_Yellow;
- public static BaseItemBackpack backpack_Purple;
- public static BaseItemBackpack backpack_Cyan;
- public static BaseItemBackpack backpack_Maroon;
- public static BaseItemBackpack backpack_Olive;
- public static BaseItemBackpack backpack_DarkGreen;
- public static BaseItemBackpack backpack_DarkPurple;
- public static BaseItemBackpack backpack_Teal;
- public static BaseItemBackpack backpack_Navy;
- public static BaseItemBackpack backpack_Silver;
- public static BaseItemBackpack backpack_Gray;
- public static BaseItemBackpack backpack_Black;
- public static BaseItemBackpack backpack_White;
-
public static ItemBlueprint itemBlueprintBase;
public static Item dustLithiumCarbonate;
public static Item dustLithiumHydroxide;
public static Item dustLithiumPeroxide;
- public static Item dustLithiumFluoride;
-
- public static Item dustUranium232;
- public static Item dustUraniumTetraFluoride;
- public static Item dustUraniumHexaFluoride;
-
- public static Item dustBerylliumFluoride;
public static Item dustQuicklime;
public static Item dustCalciumHydroxide;
@@ -240,45 +129,20 @@ public final class ModItems {
public static Item cellHydrogenChlorideMix;
- public static BaseEuItem metaItem2;
-
public static Item shardAer;
public static Item shardIgnis;
public static Item shardTerra;
public static Item shardAqua;
- // Tc Compat for energy crystal recipes
- public static Item shardDull;
-
- // Lighter
- public static Item itemBasicFireMaker;
-
// Zirconium
public static Item itemZirconiumChlorideCinterPellet;
public static Item dustZrCl4;
public static Item dustCookedZrCl4;
- public static Item dustZrF4;
-
- public static Item dustNaBF4NaF;
- public static Item dustLiFBeF2ZrF4UF4;
- public static Item dustLiFBeF2ZrF4U235;
- public static Item dustLiFBeF2ThF4UF4;
public static Item dustCalciumSulfate;
public static Item dustFertUN18;
public static Item dustFertUN32;
-
- // public static Fluid fluidFLiBeSalt;
- // public static Fluid fluidFLiBeSaltBurnt;
-
- public static Fluid fluidLftrCore1;
- public static Fluid fluidLftrCore2;
- public static Fluid fluidLftrCore3;
- public static Fluid fluidLftrCore4;
- public static Fluid fluidLftrBlanket1;
- public static Fluid fluidLftrBlanket2;
- public static Fluid fluidLftrBlanket3;
public static Fluid fluidNuclearWaste;
// Possibly missing base items that GT may be missing.
@@ -311,38 +175,23 @@ public final class ModItems {
public static Item itemCircuitLFTR;
public static Item itemBasicTurbine;
- public static Item itemDebugAreaClear;
-
- public static Item itemGemShards;
public static Item itemHalfCompleteCasings;
public static Item itemSulfuricPotion;
public static Item itemHydrofluoricPotion;
- public static Item itemModularBauble;
public static Item itemCustomBook;
- public static Item itemGrindleTablet;
- public static Item itemRope;
- public static Item itemFiber;
- public static Item itemDragonJar;
-
// Unstable Elements & Related Content
public static Item dustNeptunium238;
public static Item dustDecayedRadium226;
public static Item dustRadium226;
public static Item dustProtactinium233;
- public static ItemGiantEgg itemBigEgg;
-
public static GregtechPump toolGregtechPump;
public static ItemGenericToken itemGenericToken;
- public static Item itemControlCore;
-
- public static Item itemSunnariumBit;
-
public static ItemStack itemHotTitaniumIngot;
public static Fluid fluidZrF4;
@@ -350,10 +199,6 @@ public final class ModItems {
public static Fluid fluidFertUN32;
public static Fluid fluidFertUN18;
- public static Item boxTools;
- public static Item boxFood;
- public static Item boxMagic;
-
public static DustDecayable dustMolybdenum99;
public static DustDecayable dustTechnetium99;
public static DustDecayable dustTechnetium99M;
@@ -380,17 +225,6 @@ public final class ModItems {
public static CoreItem itemDetCable;
public static ItemThrowableBomb itemBomb;
- public static MonsterKillerBaseBauble itemAmuletMonsterKiller_Zombie;
- public static MonsterKillerBaseBauble itemAmuletMonsterKiller_Skeleton;
- public static MonsterKillerBaseBauble itemAmuletMonsterKiller_Spider;
- public static MonsterKillerBaseBauble itemAmuletMonsterKiller_Creeper;
- public static MonsterKillerBaseBauble itemAmuletMonsterKiller_Enderman;
-
- public static MonsterKillerBaseBauble itemAmuletMonsterKiller_Nether;
- public static MonsterKillerBaseBauble itemAmuletMonsterKiller_Infernal;
-
- public static CoreItem itemExquisiteIndustrialDiamond;
-
public static BaseItemMetaFood itemMetaFood;
public static ItemMagicFeather itemMagicFeather;
@@ -407,7 +241,7 @@ public final class ModItems {
ZZZ_Empty = new ItemEmpty();
}
- public static final void init() {
+ public static void init() {
itemDebugScanner = new DebugScanner();
itemMagicFeather = new ItemMagicFeather();
@@ -422,80 +256,24 @@ public final class ModItems {
EnumChatFormatting.AQUA,
false,
null);
- itemBigEgg = new ItemGiantEgg();
+
itemGenericToken = new ItemGenericToken();
itemDummyResearch = new ItemDummyResearch();
itemCustomSpawnEgg = new ItemCustomSpawnEgg();
- itemDebugAreaClear = new ItemAreaClear();
-
// Register meta item, because we need them for everything.
MetaGeneratedGregtechItems.INSTANCE.generateMetaItems();
- // Some Simple forms of materials
- itemStickyRubber = new Item().setUnlocalizedName("itemStickyRubber").setCreativeTab(tabMachines)
- .setTextureName(GTPlusPlus.ID + ":itemStickyRubber");
- GameRegistry.registerItem(itemStickyRubber, "itemStickyRubber");
- GT_OreDictUnificator
- .registerOre("ingotRubber", ItemUtils.getItemStackFromFQRN(GTPlusPlus.ID + ":itemStickyRubber", 1));
-
// Register Hydrogen Blobs first, so we can replace old helium blobs.
itemHydrogenBlob = new CoreItem("itemHydrogenBlob", "Mysterious Hydrogen Blob", tabMisc)
.setTextureName(GTPlusPlus.ID + ":itemHeliumBlob");
// Register Old Helium Blob, this will be replaced when held by a player.
- itemHeliumBlob = new CoreItem("itemHeliumBlob", tabMisc, ItemUtils.getSimpleStack(itemHydrogenBlob))
- .setTextureName(GTPlusPlus.ID + ":itemHydrogenBlob");
-
- // Register this neato device, for making some fires.
- itemBasicFireMaker = new ItemBasicFirestarter();
-
- // Register Rope
- itemFiber = new CoreItem("itemFiber", "Plant Fiber", tabMisc);
- itemRope = new CoreItem("itemRope", "Rope", tabMisc);
// Load Wearable Items
WearableLoader.run();
- // Make some backpacks
- // Primary colours
- backpack_Red = new BaseItemBackpack("backpackRed", Utils.rgbtoHexValue(200, 0, 0));
- backpack_Green = new BaseItemBackpack("backpackGreen", Utils.rgbtoHexValue(0, 200, 0));
- backpack_Blue = new BaseItemBackpack("backpackBlue", Utils.rgbtoHexValue(0, 0, 200));
- // Secondary Colours
- backpack_Yellow = new BaseItemBackpack("backpackYellow", Utils.rgbtoHexValue(200, 200, 0));
- backpack_Purple = new BaseItemBackpack("backpackPurple", Utils.rgbtoHexValue(200, 0, 200));
- backpack_Cyan = new BaseItemBackpack("backpackCyan", Utils.rgbtoHexValue(0, 200, 200));
- // Tertiary Colours
- backpack_Maroon = new BaseItemBackpack("backpackMaroon", Utils.rgbtoHexValue(128, 0, 0));
- backpack_Olive = new BaseItemBackpack("backpackOlive", Utils.rgbtoHexValue(128, 128, 0));
- backpack_DarkGreen = new BaseItemBackpack("backpackDarkGreen", Utils.rgbtoHexValue(0, 128, 0));
- backpack_DarkPurple = new BaseItemBackpack("backpackDarkPurple", Utils.rgbtoHexValue(128, 0, 128));
- backpack_Teal = new BaseItemBackpack("backpackTeal", Utils.rgbtoHexValue(0, 128, 128));
- backpack_Navy = new BaseItemBackpack("backpackNavy", Utils.rgbtoHexValue(0, 0, 128));
- // Shades
- backpack_Silver = new BaseItemBackpack("backpackSilver", Utils.rgbtoHexValue(192, 192, 192));
- backpack_Gray = new BaseItemBackpack("backpackGray", Utils.rgbtoHexValue(128, 128, 128));
- backpack_Black = new BaseItemBackpack("backpackBlack", Utils.rgbtoHexValue(20, 20, 20));
- backpack_White = new BaseItemBackpack("backpackWhite", Utils.rgbtoHexValue(240, 240, 240));
-
- // Load Custom Box/bags
- boxTools = new UniversalToolBox("Tool Box");
- boxFood = new AutoLunchBox("Eatotron-9000");
- boxMagic = new MagicToolBag("Mystic Bag");
-
itemBlueprintBase = new ItemBlueprint("itemBlueprint");
- itemGemShards = new ItemGemShards(
- "itemGemShards",
- "Gem Shards",
- AddToCreativeTab.tabMisc,
- 32,
- 0,
- "They glitter in the light",
- EnumRarity.rare,
- EnumChatFormatting.GRAY,
- false,
- Utils.rgbtoHexValue(182, 114, 18)).setTextureName(GTPlusPlus.ID + ":itemHeliumBlob");
itemHalfCompleteCasings = new ItemHalfCompleteCasings(
"itemHalfCompleteCasings",
AddToCreativeTab.tabMisc,
@@ -540,20 +318,13 @@ public final class ModItems {
MaterialGenerator.generate(ELEMENT.getInstance().THALLIUM);
// RADIOACTIVE ELEMENTS
- MaterialGenerator.generateNuclearMaterial(ELEMENT.getInstance().TECHNETIUM, false); // LFTR byproduct
MaterialGenerator.generateNuclearMaterial(ELEMENT.getInstance().POLONIUM, false);
- MaterialGenerator.generateNuclearMaterial(ELEMENT.getInstance().ASTATINE, false);
// MaterialGenerator.generateNuclearMaterial(ELEMENT.getInstance().RADON, false);
- MaterialGenerator.generateNuclearMaterial(ELEMENT.getInstance().FRANCIUM, false);
MaterialGenerator.generateNuclearMaterial(ELEMENT.getInstance().RADIUM, false);
MaterialGenerator.generateNuclearMaterial(ELEMENT.getInstance().PROMETHIUM, false);
- MaterialGenerator.generateNuclearMaterial(ELEMENT.getInstance().ACTINIUM, false);
MaterialGenerator.generateNuclearMaterial(ELEMENT.getInstance().PROTACTINIUM, false);
- MaterialGenerator.generateNuclearMaterial(ELEMENT.getInstance().NEPTUNIUM, false); // LFTR byproduct
MaterialGenerator.generateNuclearMaterial(ELEMENT.getInstance().CURIUM, false);
- MaterialGenerator.generateNuclearMaterial(ELEMENT.getInstance().BERKELIUM, false);
MaterialGenerator.generateNuclearMaterial(ELEMENT.getInstance().CALIFORNIUM, false);
- MaterialGenerator.generateNuclearMaterial(ELEMENT.getInstance().EINSTEINIUM, false);
MaterialGenerator.generateNuclearMaterial(ELEMENT.getInstance().FERMIUM, false);
// Nuclear Isotopes
@@ -580,18 +351,12 @@ public final class ModItems {
// and radioisotope heater units - one gram of plutonium-238 generates approximately 0.5 W of thermal power.
MaterialGenerator.generateNuclearMaterial(ELEMENT.getInstance().PLUTONIUM238, false);
- // RTG Fuel Materials
- MaterialGenerator.generateNuclearMaterial(ELEMENT.getInstance().STRONTIUM90, false);
- MaterialGenerator.generateNuclearMaterial(ELEMENT.getInstance().POLONIUM210, false);
- MaterialGenerator.generateNuclearMaterial(ELEMENT.getInstance().AMERICIUM241, false);
-
// Custom Materials that will have standalone refinery processes
MaterialGenerator.generate(ELEMENT.STANDALONE.ADVANCED_NITINOL, false);
MaterialGenerator.generate(ELEMENT.STANDALONE.ASTRAL_TITANIUM);
MaterialGenerator.generate(ELEMENT.STANDALONE.CELESTIAL_TUNGSTEN);
MaterialGenerator.generate(ELEMENT.STANDALONE.HYPOGEN);
MaterialGenerator.generate(ELEMENT.STANDALONE.CHRONOMATIC_GLASS);
- MaterialGenerator.generate(ELEMENT.STANDALONE.FORCE);
// Custom Materials that are from Runescape
MaterialGenerator.generate(ELEMENT.STANDALONE.BLACK_METAL);
@@ -739,21 +504,9 @@ public final class ModItems {
} catch (final Throwable r) {
Logger.INFO("Failed to Generated a Material. " + r.getMessage());
- // Utils.LOG_INFO("Failed to Generated a Material. "+r.getCause().getMessage());
- // Utils.LOG_INFO("Failed to Generated a Material. "+r.getStackTrace()[0].getMethodName());
- // Utils.LOG_INFO("Failed to Generated a Material. "+r.getStackTrace()[1].getMethodName());
r.printStackTrace();
- // System.exit(1);
}
- // TC Style Shards, for use in making energy crystal mix.
- // A dull shard, able to be infused with an element.
- shardDull = new BaseItemTCShard(
- "Drained",
- Utils.rgbtoHexValue(75, 75, 75),
- new String[] { "Can be infused to create a magical shard.",
- "Obtained from Mining Stone/SandStone, Chopping Logs or Shovelling Dirt." });
-
// Generates four elemental shards when TC is not installed.
if (!Thaumcraft.isModLoaded()) {
shardAer = new BaseItemTCShard("Aer", Utils.rgbtoHexValue(225, 225, 5));
@@ -985,30 +738,6 @@ public final class ModItems {
true);
// Test items
- metaItem2 = new BaseEuItem();
- metaItem2.registerItem(0, EnumChatFormatting.BLACK + "Test Item 0", 0, 0, "I am 0.");
- metaItem2.registerItem(1, EnumChatFormatting.GREEN + "Test Item 1", 1006346000, 1, "I Hold EU 1.", 500);
- metaItem2.registerItem(2, EnumChatFormatting.GOLD + "Test Item 2", 1004630000, 2, "I Hold EU 2.", 8000);
- metaItem2.registerItem(3, "Test Item 3", 1000765000, 4, "I Hold EU 3.", 32000);
- metaItem2.registerItem(
- 4,
- "Whirlygig",
- 1043644000,
- (short) 5,
- "Spin me right round.",
- EnumRarity.rare,
- EnumChatFormatting.DARK_GREEN,
- true);
- metaItem2.registerItem(
- 5,
- "Whirlygig 2",
- 2124867000,
- (short) 7,
- "Spin me right round.",
- EnumRarity.uncommon,
- EnumChatFormatting.RED,
- true);
-
toolGregtechPump = new GregtechPump();
toolGregtechPump.registerPumpType(0, "Simple Hand Pump", 0, 0);
toolGregtechPump.registerPumpType(1, "Advanced Hand Pump", 32000, 1);
@@ -1023,21 +752,6 @@ public final class ModItems {
FluidUtils.generateFluidNoPrefix("xpjuice", "xpjuice", 0, new short[] { 50, 150, 50, 100 });
}
- // Industrial Diamonds
- itemExquisiteIndustrialDiamond = new CoreItem(
- "IndustrialDiamondExquisite",
- "High Quality Industrial Diamond",
- tabMisc);
- ItemStack tempStack = itemExquisiteIndustrialDiamond.getStack();
- ItemUtils.addItemToOreDictionary(tempStack, "gemDiamond");
- ItemUtils.addItemToOreDictionary(tempStack, "craftingIndustrialDiamond");
- ItemUtils.addItemToOreDictionary(tempStack, "gemExquisiteDiamond");
- ItemUtils.addItemToOreDictionary(tempStack, "craftingExquisiteIndustrialDiamond");
-
- /*
- * Decayable Materials
- */
-
dustNeptunium238 = new DustDecayable(
"dustNeptunium238",
Utils.rgbtoHexValue(175, 240, 75),
@@ -1067,22 +781,6 @@ public final class ModItems {
"Result: Uranium 233(" + StringUtils.superscript("233U") + ")" },
ELEMENT.getInstance().URANIUM233.getDust(1).getItem(),
6);
- dustTechnetium99 = new DustDecayable(
- "dustTechnetium99",
- ELEMENT.getInstance().TECHNETIUM.getRgbAsHex(),
- 164500,
- new String[] { "" + StringUtils.superscript("99Tc"),
- "Result: Ruthenium 99(" + StringUtils.superscript("99Ru") + ")" },
- ELEMENT.getInstance().RUTHENIUM.getDust(1).getItem(),
- 4);
- dustTechnetium99M = new DustDecayable(
- "dustTechnetium99M",
- ELEMENT.getInstance().TECHNETIUM.getRgbAsHex(),
- 8570,
- new String[] { "" + StringUtils.superscript("99ᵐTc"),
- "Result: Technicium 99 (" + StringUtils.superscript("99Tc") + ")" },
- dustTechnetium99,
- 4);
dustMolybdenum99 = new DustDecayable(
"dustMolybdenum99",
ELEMENT.getInstance().MOLYBDENUM.getRgbAsHex(),
@@ -1108,20 +806,10 @@ public final class ModItems {
itemAirFilter = new ItemAirFilter();
itemLavaFilter = new ItemLavaFilter();
- itemGrindleTablet = new BaseItemGrindle();
- itemDragonJar = new ItemEntityCatcher();
-
- itemControlCore = new ItemControlCore();
-
- itemSunnariumBit = new ItemSunnariumBit();
-
// Chemistry
new CoalTar();
new RocketFuels();
- // Nuclear Processing
- new NuclearChem();
-
// Farm Animal Fun
new AgriculturalChem();
@@ -1140,135 +828,6 @@ public final class ModItems {
itemDetCable.setTextureName("string");
itemBomb = new ItemThrowableBomb();
- // Misc Items
- @SuppressWarnings("unused")
- Item tI;
- tI = new BaseItemMisc("Chilly", new short[] { 0, 64, 196 }, 32, MiscTypes.POTION, new String[] { "It's Blue" });
- tI = new BaseItemMisc(
- "4000DC's",
- new short[] { 180, 100, 30 },
- 1,
- MiscTypes.BIGKEY,
- new String[] { "It opens things." });
- tI = new BaseItemMisc("Dull", new short[] { 64, 64, 64 }, 64, MiscTypes.GEM, null);
- tI = new BaseItemMisc(
- "Forest",
- new short[] { 130, 164, 96 },
- 64,
- MiscTypes.MUSHROOM,
- new String[] { "You Found this on the ground.", "Definitely not sure if it's worth eating." });
-
- // Baubles
- if (Baubles.isModLoaded()) {
- tI = new HealthBoostBauble();
- itemModularBauble = new ModularBauble();
- }
-
- // EnderIO Resources
- if ((EnderIO.isModLoaded() || LOAD_ALL_CONTENT)) {
- Logger.INFO("EnderIO Found - Loading Resources.");
- // Enderio Dusts
- itemDustSoularium = ItemUtils.generateSpecialUseDusts(
- "Soularium",
- "Soularium",
- MaterialEIO.SOULARIUM.vChemicalFormula,
- MaterialEIO.SOULARIUM.getRgbAsHex())[0];
- itemDustRedstoneAlloy = ItemUtils.generateSpecialUseDusts(
- "RedstoneAlloy",
- "Redstone Alloy",
- MaterialEIO.REDSTONE_ALLOY.vChemicalFormula,
- MaterialEIO.REDSTONE_ALLOY.getRgbAsHex())[0];
- itemDustElectricalSteel = ItemUtils.generateSpecialUseDusts(
- "ElectricalSteel",
- "Electrical Steel",
- MaterialEIO.ELECTRICAL_STEEL.vChemicalFormula,
- MaterialEIO.ELECTRICAL_STEEL.getRgbAsHex())[0];
- itemDustPulsatingIron = ItemUtils.generateSpecialUseDusts(
- "PulsatingIron",
- "Pulsating Iron",
- MaterialEIO.PULSATING_IRON.vChemicalFormula,
- MaterialEIO.PULSATING_IRON.getRgbAsHex())[0];
- itemDustEnergeticAlloy = ItemUtils.generateSpecialUseDusts(
- "EnergeticAlloy",
- "Energetic Alloy",
- MaterialEIO.ENERGETIC_ALLOY.vChemicalFormula,
- MaterialEIO.ENERGETIC_ALLOY.getRgbAsHex())[0];
- itemDustVibrantAlloy = ItemUtils.generateSpecialUseDusts(
- "VibrantAlloy",
- "Vibrant Alloy",
- MaterialEIO.VIBRANT_ALLOY.vChemicalFormula,
- MaterialEIO.VIBRANT_ALLOY.getRgbAsHex())[0];
- itemDustConductiveIron = ItemUtils.generateSpecialUseDusts(
- "ConductiveIron",
- "Conductive Iron",
- MaterialEIO.CONDUCTIVE_IRON.vChemicalFormula,
- MaterialEIO.CONDUCTIVE_IRON.getRgbAsHex())[0];
-
- // EnderIO Plates
- itemPlateSoularium = ItemUtils.generateSpecialUsePlate(
- "Soularium",
- "Soularium",
- MaterialEIO.SOULARIUM.vChemicalFormula,
- MaterialEIO.SOULARIUM.getRgbAsHex(),
- 0);
- itemPlateRedstoneAlloy = ItemUtils.generateSpecialUsePlate(
- "RedstoneAlloy",
- "Redstone Alloy",
- MaterialEIO.REDSTONE_ALLOY.vChemicalFormula,
- MaterialEIO.REDSTONE_ALLOY.getRgbAsHex(),
- 0);
- itemPlateElectricalSteel = ItemUtils.generateSpecialUsePlate(
- "ElectricalSteel",
- "Electrical Steel",
- MaterialEIO.ELECTRICAL_STEEL.vChemicalFormula,
- MaterialEIO.ELECTRICAL_STEEL.getRgbAsHex(),
- 0);
- itemPlatePulsatingIron = ItemUtils.generateSpecialUsePlate(
- "PhasedIron",
- "Phased Iron",
- MaterialEIO.PULSATING_IRON.vChemicalFormula,
- MaterialEIO.PULSATING_IRON.getRgbAsHex(),
- 0);
- itemPlateEnergeticAlloy = ItemUtils.generateSpecialUsePlate(
- "EnergeticAlloy",
- "Energetic Alloy",
- MaterialEIO.ENERGETIC_ALLOY.vChemicalFormula,
- MaterialEIO.ENERGETIC_ALLOY.getRgbAsHex(),
- 0);
- itemPlateVibrantAlloy = ItemUtils.generateSpecialUsePlate(
- "VibrantAlloy",
- "Vibrant Alloy",
- MaterialEIO.VIBRANT_ALLOY.vChemicalFormula,
- MaterialEIO.VIBRANT_ALLOY.getRgbAsHex(),
- 0);
- itemPlateConductiveIron = ItemUtils.generateSpecialUsePlate(
- "ConductiveIron",
- "Conductive Iron",
- MaterialEIO.CONDUCTIVE_IRON.vChemicalFormula,
- MaterialEIO.CONDUCTIVE_IRON.getRgbAsHex(),
- 0);
-
- // Register odd naming conventions.
- GT_OreDictUnificator.registerOre("dustPhasedGold", ItemUtils.getSimpleStack(itemDustVibrantAlloy));
- GT_OreDictUnificator.registerOre("platePhasedGold", ItemUtils.getSimpleStack(itemPlateVibrantAlloy));
- GT_OreDictUnificator.registerOre("dustPhasedIron", ItemUtils.getSimpleStack(itemDustPulsatingIron));
- GT_OreDictUnificator.registerOre("platePhasedIron", ItemUtils.getSimpleStack(itemPlatePulsatingIron));
- GT_OreDictUnificator
- .registerOre("blockVibrantAlloy", ItemUtils.getItemStackOfAmountFromOreDict("blockPhasedGold", 1));
-
- } else {
- /*
- * Logger.WARNING("EnderIO not Found - Generating our own Resources.");
- * MaterialGenerator.generate(MaterialEIO.CONDUCTIVE_IRON);
- * MaterialGenerator.generate(MaterialEIO.PULSATING_IRON);
- * MaterialGenerator.generate(MaterialEIO.REDSTONE_ALLOY);
- * MaterialGenerator.generate(MaterialEIO.SOULARIUM);
- * MaterialGenerator.generate(MaterialEIO.ELECTRICAL_STEEL);
- * MaterialGenerator.generate(MaterialEIO.ENERGETIC_ALLOY);
- * MaterialGenerator.generate(MaterialEIO.VIBRANT_ALLOY);
- */
- }
-
// IC2 Exp
Logger.INFO("IndustrialCraft2 Found - Loading Resources.");
@@ -1286,48 +845,17 @@ public final class ModItems {
// Special Item Handling Case
if (ConfigSwitches.enableAlternativeBatteryAlloy) {
- // ModItems.itemIngotBatteryAlloy = new BaseItemIngot("itemIngotBatteryAlloy", "Battery Alloy", new
- // short[]{35, 228, 141}, 0); TODO
ModItems.itemPlateBatteryAlloy = ItemUtils
.generateSpecialUsePlate("BatteryAlloy", "Battery Alloy", new short[] { 35, 228, 141 }, 0);
}
- // UtilsItems.generateSpawnEgg("ic2", "boatcarbon", Utils.generateSingularRandomHexValue(),
- // Utils.generateSingularRandomHexValue());
-
- HANDLER_COFH.initItems();
-
- /*
- * Misc Items
- */
-
- // Staballoy Equipment
- itemStaballoyPickaxe = new StaballoyPickaxe("itemStaballoyPickaxe", STABALLOY)
- .setCreativeTab(AddToCreativeTab.tabTools);
- GameRegistry.registerItem(itemStaballoyPickaxe, itemStaballoyPickaxe.getUnlocalizedName());
- itemStaballoyAxe = new StaballoyAxe("itemStaballoyAxe", STABALLOY).setCreativeTab(AddToCreativeTab.tabTools);
- GameRegistry.registerItem(itemStaballoyAxe, itemStaballoyAxe.getUnlocalizedName());
-
- // Sandstone Hammer
- itemSandstoneHammer = new SandstoneHammer("itemSandstoneHammer").setCreativeTab(AddToCreativeTab.tabTools);
- GameRegistry.registerItem(itemSandstoneHammer, itemSandstoneHammer.getUnlocalizedName());
-
// Buffer Cores!
Item itemBufferCore;
for (int i = 1; i <= 10; i++) {
- // Utils.LOG_INFO(""+i);
itemBufferCore = new BufferCore("itemBufferCore", i).setCreativeTab(AddToCreativeTab.tabMachines);
GameRegistry.registerItem(itemBufferCore, itemBufferCore.getUnlocalizedName());
- // System.out.println("Buffer Core registration count is: "+i);
}
- itemPLACEHOLDER_Circuit = new Item().setUnlocalizedName("itemPLACEHOLDER_Circuit")
- .setTextureName(GTPlusPlus.ID + ":itemPLACEHOLDER_Circuit");
- GameRegistry.registerItem(itemPLACEHOLDER_Circuit, "itemPLACEHOLDER_Circuit");
-
- // ItemBlockGtFrameBox = new ItemBlockGtFrameBox(ModBlocks.blockGtFrameSet1);
- // GameRegistry.registerItem(ItemBlockGtFrameBox, "itemGtFrameBoxSet1");
-
itemCustomBook = new ItemBaseBook();
registerCustomTokens();
}
@@ -1462,30 +990,6 @@ public final class ModItems {
MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.FOIL, ALLOY.TRINIUM_REINFORCED_STEEL);
MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.FOIL, ELEMENT.STANDALONE.CHRONOMATIC_GLASS);
- // Dense Plates
- MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ALLOY.POTIN);
- MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ALLOY.AQUATIC_STEEL);
- MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ALLOY.BRONZE);
- MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ALLOY.OSMIRIDIUM);
- MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ALLOY.QUANTUM);
- MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ALLOY.STEEL_BLACK);
- MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ALLOY.STAINLESS_STEEL);
- MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ALLOY.EGLIN_STEEL);
- MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ALLOY.MARAGING300);
- MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ALLOY.TALONITE);
- MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ELEMENT.STANDALONE.HYPOGEN);
- MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ELEMENT.STANDALONE.RHUGNOR);
- MaterialUtils
- .generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ELEMENT.STANDALONE.ADVANCED_NITINOL);
- MaterialUtils
- .generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ELEMENT.STANDALONE.ASTRAL_TITANIUM);
- MaterialUtils.generateComponentAndAssignToAMaterial(
- ComponentTypes.PLATEHEAVY,
- ELEMENT.STANDALONE.CELESTIAL_TUNGSTEN);
- MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ELEMENT.STANDALONE.WHITE_METAL);
- MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ELEMENT.STANDALONE.BLACK_METAL);
- MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ELEMENT.STANDALONE.GRANITE);
-
// Special Sillyness
if (true) {
diff --git a/src/main/java/gtPlusPlus/core/item/base/BaseItemBackpack.java b/src/main/java/gtPlusPlus/core/item/base/BaseItemBackpack.java
deleted file mode 100644
index b724687c1a..0000000000
--- a/src/main/java/gtPlusPlus/core/item/base/BaseItemBackpack.java
+++ /dev/null
@@ -1,75 +0,0 @@
-package gtPlusPlus.core.item.base;
-
-import static gregtech.api.enums.Mods.GTPlusPlus;
-
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.world.World;
-
-import cpw.mods.fml.common.registry.GameRegistry;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import gregtech.api.util.GT_OreDictUnificator;
-import gtPlusPlus.GTplusplus;
-import gtPlusPlus.core.creative.AddToCreativeTab;
-import gtPlusPlus.core.handler.GuiHandler;
-import gtPlusPlus.core.util.math.MathUtils;
-import gtPlusPlus.core.util.minecraft.ItemUtils;
-
-public class BaseItemBackpack extends Item {
-
- protected final int colourValue;
- protected final String unlocalName;
-
- public BaseItemBackpack(final String unlocalizedName, final int colour) {
- this.unlocalName = unlocalizedName;
- this.setUnlocalizedName(unlocalizedName);
- this.setTextureName(GTPlusPlus.ID + ":" + "itemBackpack");
- this.colourValue = colour;
- GameRegistry.registerItem(this, unlocalizedName);
- GT_OreDictUnificator.registerOre("storageBackpack", ItemUtils.getSimpleStack(this));
- this.setMaxStackSize(1);
- this.setCreativeTab(AddToCreativeTab.tabOther);
- }
-
- // Without this method, your inventory will NOT work!!!
- @Override
- public int getMaxItemUseDuration(final ItemStack stack) {
- return 1; // return any value greater than zero
- }
-
- @Override
- public ItemStack onItemRightClick(final ItemStack itemstack, final World world, final EntityPlayer player) {
- if (!world.isRemote) {
- // If player not sneaking, open the inventory gui
- if (!player.isSneaking()) {
- player.openGui(GTplusplus.instance, GuiHandler.GUI3, world, 0, 0, 0);
- }
-
- // Otherwise, stealthily place some diamonds in there for a nice surprise next time you open it up :)
- else {
- // Utils.LOG_INFO("Player is Sneaking, giving them sneaky diamonds.");
- // new BaseInventoryBackpack(player.getHeldItem()).setInventorySlotContents(0, new
- // ItemStack(Items.diamond,4));
- }
- }
-
- return itemstack;
- }
-
- @Override
- public int getColorFromItemStack(final ItemStack stack, final int HEX_OxFFFFFF) {
- if (this.colourValue == 0) {
- return MathUtils.generateSingularRandomHexValue();
- }
- return this.colourValue;
- }
-
- @Override
- @SideOnly(Side.CLIENT)
- public void registerIcons(final IIconRegister iconRegister) {
- this.itemIcon = iconRegister.registerIcon(GTPlusPlus.ID + ":" + "itemBackpack");
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/item/base/BaseItemComponent.java b/src/main/java/gtPlusPlus/core/item/base/BaseItemComponent.java
index dd4cd24366..7b6be7ddfe 100644
--- a/src/main/java/gtPlusPlus/core/item/base/BaseItemComponent.java
+++ b/src/main/java/gtPlusPlus/core/item/base/BaseItemComponent.java
@@ -338,7 +338,6 @@ public class BaseItemComponent extends Item {
return Utils.rgbtoHexValue(255, 255, 255);
}
}
- if (this.componentType == ComponentTypes.PLATEHEAVY) {}
try {
if (this.componentMaterial == null) {
@@ -422,7 +421,6 @@ public class BaseItemComponent extends Item {
PLASMACELL("CellPlasma", "@ Plasma Cell", "cellPlasma", OrePrefixes.cellPlasma),
CELL("Cell", "@ Cell", "cell", OrePrefixes.cell),
NUGGET("Nugget", "@ Nugget", "nugget", OrePrefixes.nugget),
- PLATEHEAVY("HeavyPlate", "Heavy @ Plate", "plateHeavy", OrePrefixes.plateQuadruple),
SPRING("Spring", "@ Spring", "spring", OrePrefixes.spring),
SMALLSPRING("SmallSpring", "Small @ Spring", "springSmall", OrePrefixes.springSmall),
FINEWIRE("FineWire", "Fine @ Wire", "wireFine", OrePrefixes.wireFine),
diff --git a/src/main/java/gtPlusPlus/core/item/base/itemblock/ItemBlockEntityBase.java b/src/main/java/gtPlusPlus/core/item/base/itemblock/ItemBlockEntityBase.java
deleted file mode 100644
index c730deb436..0000000000
--- a/src/main/java/gtPlusPlus/core/item/base/itemblock/ItemBlockEntityBase.java
+++ /dev/null
@@ -1,42 +0,0 @@
-package gtPlusPlus.core.item.base.itemblock;
-
-import java.util.List;
-
-import net.minecraft.block.Block;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemBlock;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.EnumChatFormatting;
-
-import gtPlusPlus.core.block.general.BlockTankXpConverter;
-import gtPlusPlus.core.creative.AddToCreativeTab;
-
-public class ItemBlockEntityBase extends ItemBlock {
-
- public ItemBlockEntityBase(final Block block) {
- super(block);
- this.setMaxDamage(0);
- // this.setHasSubtypes(true);
- this.setCreativeTab(AddToCreativeTab.tabMachines);
- }
-
- @Override
- public int getColorFromItemStack(final ItemStack p_82790_1_, final int p_82790_2_) {
- return super.getColorFromItemStack(p_82790_1_, p_82790_2_);
- }
-
- @SuppressWarnings({ "unchecked", "rawtypes" })
- @Override
- public final void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list,
- final boolean bool) {
- if (Block.getBlockFromItem(stack.getItem()) instanceof BlockTankXpConverter) {
- /*
- * list.add(EnumChatFormatting.GRAY+"Can convert Liquid Xp to Mob Essence and back.");
- * list.add(EnumChatFormatting.GRAY+"Right click with a Screwdriver to change mode.");
- * list.add(EnumChatFormatting.GRAY+"Shift+Right click to view tank information.");
- */
- list.add(EnumChatFormatting.GRAY + "Currently disabled, Use a GT Brewery instead. (New Recipes Added!)");
- }
- super.addInformation(stack, aPlayer, list, bool);
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/item/base/itemblock/ItemBlockSpawner.java b/src/main/java/gtPlusPlus/core/item/base/itemblock/ItemBlockSpawner.java
deleted file mode 100644
index b4c2d1c244..0000000000
--- a/src/main/java/gtPlusPlus/core/item/base/itemblock/ItemBlockSpawner.java
+++ /dev/null
@@ -1,39 +0,0 @@
-package gtPlusPlus.core.item.base.itemblock;
-
-import java.util.List;
-
-import net.minecraft.block.Block;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.EnumChatFormatting;
-
-import cpw.mods.fml.common.registry.EntityRegistry;
-import cpw.mods.fml.common.registry.EntityRegistry.EntityRegistration;
-import gtPlusPlus.plugin.villagers.tile.TileEntityGenericSpawner;
-
-public class ItemBlockSpawner extends ItemBlockMeta {
-
- private final Block mBlock;
-
- public ItemBlockSpawner(Block aBlock) {
- super(aBlock);
- mBlock = aBlock;
- }
-
- @Override
- public void addInformation(ItemStack aStack, EntityPlayer aPlayer, List aList, boolean aBool) {
- if (mBlock != null) {
- int x = this.getMetadata(aStack.getItemDamage());
- if (x >= 0) {
- try {
- EntityRegistration x1 = EntityRegistry.instance()
- .lookupModSpawn(TileEntityGenericSpawner.mSpawners.get(x), false);
- if (x1 != null) {
- aList.add(EnumChatFormatting.RED + x1.getEntityName());
- }
- } catch (Throwable t) {}
- }
- }
- super.addInformation(aStack, aPlayer, aList, aBool);
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/item/base/plates/BaseItemPlateHeavy.java b/src/main/java/gtPlusPlus/core/item/base/plates/BaseItemPlateHeavy.java
deleted file mode 100644
index a3a8eb6153..0000000000
--- a/src/main/java/gtPlusPlus/core/item/base/plates/BaseItemPlateHeavy.java
+++ /dev/null
@@ -1,47 +0,0 @@
-package gtPlusPlus.core.item.base.plates;
-
-import static gregtech.api.enums.Mods.GTPlusPlus;
-
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.util.IIcon;
-
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import gtPlusPlus.core.item.base.BaseItemComponent;
-import gtPlusPlus.core.material.Material;
-
-public class BaseItemPlateHeavy extends BaseItemComponent {
-
- static final ComponentTypes HEAVY = ComponentTypes.PLATEHEAVY;
-
- public BaseItemPlateHeavy(final Material material) {
- super(material, HEAVY);
- }
-
- @Override
- public String getCorrectTextures() {
- return GTPlusPlus.ID + ":" + "itemHeavyPlate";
- }
-
- @Override
- @SideOnly(Side.CLIENT)
- public boolean requiresMultipleRenderPasses() {
- return true;
- }
-
- @Override
- public void registerIcons(final IIconRegister i) {
- this.base = i.registerIcon(GTPlusPlus.ID + ":" + "itemHeavyPlate");
- this.overlay = i.registerIcon(GTPlusPlus.ID + ":" + "itemHeavyPlate_Overlay");
- }
-
- @Override
- public IIcon getIconFromDamageForRenderPass(final int damage, final int pass) {
-
- if (pass == 0) {
- return this.base;
- } else {
- return this.overlay;
- }
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/item/bauble/FireProtectionBauble.java b/src/main/java/gtPlusPlus/core/item/bauble/FireProtectionBauble.java
deleted file mode 100644
index b5d7b8fdbb..0000000000
--- a/src/main/java/gtPlusPlus/core/item/bauble/FireProtectionBauble.java
+++ /dev/null
@@ -1,137 +0,0 @@
-package gtPlusPlus.core.item.bauble;
-
-import static gregtech.api.enums.Mods.GTPlusPlus;
-
-import java.lang.reflect.Field;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.UUID;
-
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.potion.Potion;
-import net.minecraft.potion.PotionEffect;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.world.World;
-
-import baubles.api.BaubleType;
-import cpw.mods.fml.common.registry.GameRegistry;
-import gtPlusPlus.core.creative.AddToCreativeTab;
-import gtPlusPlus.core.util.reflect.ReflectionUtils;
-import gtPlusPlus.preloader.DevHelper;
-
-public class FireProtectionBauble extends BaseBauble {
-
- public static HashMap<UUID, Boolean> mDataMap = new HashMap<UUID, Boolean>();
- public static HashSet<UUID> mPlayerMap = new HashSet<UUID>();
-
- private static Field isImmuneToFire;
-
- static {
- isImmuneToFire = ReflectionUtils
- .getField(Entity.class, DevHelper.isObfuscatedEnvironment() ? "func_70045_F" : "isImmuneToFire");
- }
-
- public static boolean fireImmune(Entity aEntity) {
- return aEntity.isImmuneToFire();
- }
-
- public static boolean setEntityImmuneToFire(Entity aEntity, boolean aImmune) {
- try {
- return ReflectionUtils.setField(aEntity, isImmuneToFire, aImmune);
- } catch (Throwable t) {}
- return false;
- }
-
- public FireProtectionBauble() {
- super(BaubleType.RING, "GTPP.bauble.fireprotection.0" + ".name", 0);
- String aUnlocalName = "GTPP.bauble.fireprotection.0" + ".name";
- this.setUnlocalizedName(aUnlocalName);
- this.setTextureName(GTPlusPlus.ID + ":" + getTextureNameForBauble());
- this.setMaxDamage(100);
- this.setMaxStackSize(1);
- this.setNoRepair();
- this.setCreativeTab(AddToCreativeTab.tabMachines);
- if (GameRegistry.findItem(GTPlusPlus.ID, aUnlocalName) == null) {
- GameRegistry.registerItem(this, aUnlocalName);
- }
- }
-
- @Override
- public void onUpdate(final ItemStack itemStack, final World worldObj, final Entity player, final int p_77663_4_,
- final boolean p_77663_5_) {
- super.onUpdate(itemStack, worldObj, player, p_77663_4_, p_77663_5_);
- }
-
- @Override
- public String getItemStackDisplayName(final ItemStack p_77653_1_) {
- return (EnumChatFormatting.DARK_RED + super.getItemStackDisplayName(p_77653_1_) + EnumChatFormatting.GRAY);
- }
-
- @Override
- public boolean showDurabilityBar(final ItemStack stack) {
- return false;
- }
-
- @SuppressWarnings("unchecked")
- @Override
- public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) {
- super.addInformation(stack, aPlayer, list, bool);
- }
-
- @Override
- public boolean canEquip(final ItemStack arg0, final EntityLivingBase arg1) {
- return true;
- }
-
- @Override
- public boolean canUnequip(final ItemStack arg0, final EntityLivingBase arg1) {
- return true;
- }
-
- @Override
- public void onEquipped(final ItemStack arg0, final EntityLivingBase aPlayer) {
- if (!aPlayer.worldObj.isRemote) {
- if (aPlayer instanceof EntityPlayer) {
- EntityPlayer bPlayer = (EntityPlayer) aPlayer;
- mPlayerMap.add(bPlayer.getUniqueID());
- }
- }
- }
-
- @Override
- public void onUnequipped(final ItemStack arg0, final EntityLivingBase aPlayer) {
- if (!aPlayer.worldObj.isRemote) {
- if (aPlayer instanceof EntityPlayer) {
- EntityPlayer bPlayer = (EntityPlayer) aPlayer;
- if (bPlayer.isPotionActive(Potion.fireResistance)) {
- bPlayer.removePotionEffect(Potion.fireResistance.id);
- }
- mPlayerMap.remove(bPlayer.getUniqueID());
- setEntityImmuneToFire(bPlayer, false);
- }
- }
- }
-
- @Override
- public void onWornTick(final ItemStack aBaubleStack, final EntityLivingBase aPlayer) {
- if (!aPlayer.worldObj.isRemote) {
- if (aPlayer instanceof EntityPlayer) {
- EntityPlayer bPlayer = (EntityPlayer) aPlayer;
- if (!fireImmune(bPlayer)) {
- setEntityImmuneToFire(bPlayer, true);
- }
- if (!bPlayer.isPotionActive(Potion.fireResistance)) {
- bPlayer.addPotionEffect(new PotionEffect(Potion.fireResistance.id, 100, 4));
- }
- }
- }
- }
-
- public String getTextureNameForBauble() {
- return "baubles/itemFireProtectGlovesBetter";
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/item/bauble/HealthBoostBauble.java b/src/main/java/gtPlusPlus/core/item/bauble/HealthBoostBauble.java
deleted file mode 100644
index 703fb7c5bb..0000000000
--- a/src/main/java/gtPlusPlus/core/item/bauble/HealthBoostBauble.java
+++ /dev/null
@@ -1,40 +0,0 @@
-package gtPlusPlus.core.item.bauble;
-
-import static gregtech.api.enums.Mods.GTPlusPlus;
-
-import java.util.List;
-
-import net.minecraft.entity.SharedMonsterAttributes;
-import net.minecraft.entity.ai.attributes.AttributeModifier;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.DamageSource;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.StatCollector;
-
-import com.google.common.collect.Multimap;
-
-import baubles.api.BaubleType;
-
-public class HealthBoostBauble extends BaseBauble {
-
- public HealthBoostBauble() {
- super(BaubleType.AMULET, "The Key to the City");
- addDamageNegation(DamageSource.wither);
- this.setTextureName(GTPlusPlus.ID + ":" + "itemKeyGold");
- }
-
- @Override
- void fillModifiers(Multimap<String, AttributeModifier> attributes, ItemStack stack) {
- attributes.put(
- SharedMonsterAttributes.maxHealth.getAttributeUnlocalizedName(),
- new AttributeModifier(getBaubleUUID(stack), "Bauble modifier", 40, 0));
- }
-
- @Override
- public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool) {
- list.add(EnumChatFormatting.GRAY + StatCollector.translateToLocal("item.thekeytothecity.tooltip.0"));
- list.add(EnumChatFormatting.GRAY + StatCollector.translateToLocal("item.thekeytothecity.tooltip.1"));
- super.addInformation(stack, player, list, bool);
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/item/bauble/ModularBauble.java b/src/main/java/gtPlusPlus/core/item/bauble/ModularBauble.java
deleted file mode 100644
index 63a812e8ca..0000000000
--- a/src/main/java/gtPlusPlus/core/item/bauble/ModularBauble.java
+++ /dev/null
@@ -1,495 +0,0 @@
-package gtPlusPlus.core.item.bauble;
-
-import static gregtech.api.enums.Mods.GTPlusPlus;
-import static gregtech.api.enums.Mods.Thaumcraft;
-
-import java.util.List;
-
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.creativetab.CreativeTabs;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.entity.SharedMonsterAttributes;
-import net.minecraft.entity.ai.attributes.AttributeModifier;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.DamageSource;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.IIcon;
-
-import org.lwjgl.input.Keyboard;
-
-import com.google.common.collect.Multimap;
-
-import baubles.api.BaubleType;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import gtPlusPlus.core.util.minecraft.ModularArmourUtils;
-import gtPlusPlus.core.util.minecraft.ModularArmourUtils.BT;
-import gtPlusPlus.core.util.minecraft.ModularArmourUtils.Modifiers;
-import gtPlusPlus.core.util.minecraft.NBTUtils;
-import gtPlusPlus.core.util.minecraft.PlayerUtils;
-
-public class ModularBauble extends BaseBauble {
-
- @SideOnly(Side.CLIENT)
- private IIcon mTextureAmulet;
-
- @SideOnly(Side.CLIENT)
- private IIcon mTextureRing;
-
- @SideOnly(Side.CLIENT)
- private IIcon mTextureBelt;
-
- private IIcon iconArray[] = new IIcon[3];
-
- @SideOnly(Side.CLIENT)
- private IIcon mfallback;
-
- public ModularBauble() {
- super(BaubleType.AMULET, "Modular Bauble");
- }
-
- @Override
- void fillModifiers(Multimap<String, AttributeModifier> attributes, ItemStack stack) {
-
- // Get Stats
- int mStatlevel = 0;
- if ((mStatlevel = ModularArmourUtils.getModifierLevel(stack, Modifiers.BOOST_DAMAGE)) > 0) {
- if (mStatlevel > 0 && mStatlevel < 20) {
- attributes.put(
- SharedMonsterAttributes.attackDamage.getAttributeUnlocalizedName(),
- new AttributeModifier(getBaubleUUID(stack), "AD" + mStatlevel, 1, 0));
- } else if (mStatlevel > 20 && mStatlevel < 45) {
- attributes.put(
- SharedMonsterAttributes.attackDamage.getAttributeUnlocalizedName(),
- new AttributeModifier(getBaubleUUID(stack), "AD" + mStatlevel, 2, 0));
- } else if (mStatlevel >= 45 && mStatlevel < 75) {
- attributes.put(
- SharedMonsterAttributes.attackDamage.getAttributeUnlocalizedName(),
- new AttributeModifier(getBaubleUUID(stack), "AD" + mStatlevel, 4, 0));
- } else if (mStatlevel >= 75 && mStatlevel < 99) {
- attributes.put(
- SharedMonsterAttributes.attackDamage.getAttributeUnlocalizedName(),
- new AttributeModifier(getBaubleUUID(stack), "AD" + mStatlevel, 8, 0));
- } else if (mStatlevel >= 100) {
- attributes.put(
- SharedMonsterAttributes.attackDamage.getAttributeUnlocalizedName(),
- new AttributeModifier(getBaubleUUID(stack), "AD" + mStatlevel, 16, 0));
- }
- }
- if ((mStatlevel = ModularArmourUtils.getModifierLevel(stack, Modifiers.BOOST_DEF)) > 0) {
- if (mStatlevel > 0 && mStatlevel < 20) {
- attributes.put(
- SharedMonsterAttributes.knockbackResistance.getAttributeUnlocalizedName(),
- new AttributeModifier(getBaubleUUID(stack), "BD" + mStatlevel, 1, 0));
- } else if (mStatlevel > 20 && mStatlevel < 45) {
- attributes.put(
- SharedMonsterAttributes.knockbackResistance.getAttributeUnlocalizedName(),
- new AttributeModifier(getBaubleUUID(stack), "BD" + mStatlevel, 2, 0));
- } else if (mStatlevel > 45 && mStatlevel < 75) {
- attributes.put(
- SharedMonsterAttributes.knockbackResistance.getAttributeUnlocalizedName(),
- new AttributeModifier(getBaubleUUID(stack), "BD" + mStatlevel, 3, 0));
- } else if (mStatlevel > 75 && mStatlevel < 99) {
- attributes.put(
- SharedMonsterAttributes.knockbackResistance.getAttributeUnlocalizedName(),
- new AttributeModifier(getBaubleUUID(stack), "BD" + mStatlevel, 6, 0));
- } else if (mStatlevel >= 100) {
- attributes.put(
- SharedMonsterAttributes.knockbackResistance.getAttributeUnlocalizedName(),
- new AttributeModifier(getBaubleUUID(stack), "BD" + mStatlevel, 10, 0));
- }
- }
- if ((mStatlevel = ModularArmourUtils.getModifierLevel(stack, Modifiers.BOOST_HP)) > 0) {
- if (mStatlevel > 0 && mStatlevel <= 100) {
- int bonus = mStatlevel / 5;
- attributes.put(
- SharedMonsterAttributes.maxHealth.getAttributeUnlocalizedName(),
- new AttributeModifier(getBaubleUUID(stack), "HP" + mStatlevel, bonus * 2, 0));
- }
- }
- if ((mStatlevel = ModularArmourUtils.getModifierLevel(stack, Modifiers.BOOST_SPEED)) > 0) {
- if (mStatlevel > 0 && mStatlevel < 20) {
- attributes.put(
- SharedMonsterAttributes.movementSpeed.getAttributeUnlocalizedName(),
- new AttributeModifier(getBaubleUUID(stack), "SP" + mStatlevel, 1, 0));
- } else if (mStatlevel > 20 && mStatlevel < 45) {
- attributes.put(
- SharedMonsterAttributes.movementSpeed.getAttributeUnlocalizedName(),
- new AttributeModifier(getBaubleUUID(stack), "SP" + mStatlevel, 2, 0));
- } else if (mStatlevel > 45 && mStatlevel < 75) {
- attributes.put(
- SharedMonsterAttributes.movementSpeed.getAttributeUnlocalizedName(),
- new AttributeModifier(getBaubleUUID(stack), "SP" + mStatlevel, 3, 0));
- } else if (mStatlevel > 75 && mStatlevel < 99) {
- attributes.put(
- SharedMonsterAttributes.movementSpeed.getAttributeUnlocalizedName(),
- new AttributeModifier(getBaubleUUID(stack), "SP" + mStatlevel, 4, 0));
- } else if (mStatlevel >= 100) {
- attributes.put(
- SharedMonsterAttributes.movementSpeed.getAttributeUnlocalizedName(),
- new AttributeModifier(getBaubleUUID(stack), "SP" + mStatlevel, 5, 0));
- }
- }
- if ((mStatlevel = ModularArmourUtils.getModifierLevel(stack, Modifiers.BOOST_MINING)) > 0) {}
- if ((mStatlevel = ModularArmourUtils.getModifierLevel(stack, Modifiers.BOOST_HOLY)) > 0) {}
- }
-
- @SuppressWarnings({ "unchecked", "rawtypes" })
- @Override
- public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool) {
- // Bauble Type
- if (ModularArmourUtils.getBaubleType(stack) == BaubleType.AMULET) {
- list.add(
- EnumChatFormatting.GRAY + "Current Form: "
- + EnumChatFormatting.RED
- + "Amulet"
- + EnumChatFormatting.GRAY
- + ".");
- list.add(EnumChatFormatting.GRAY + "You can change this into a Ring or a Belt.");
- } else if (ModularArmourUtils.getBaubleType(stack) == BaubleType.RING) {
- list.add(
- EnumChatFormatting.GRAY + "Current Form: "
- + EnumChatFormatting.RED
- + "Ring"
- + EnumChatFormatting.GRAY
- + ".");
- list.add(EnumChatFormatting.GRAY + "You can change this into an Amulet or a Belt.");
- } else if (ModularArmourUtils.getBaubleType(stack) == BaubleType.BELT) {
- list.add(
- EnumChatFormatting.GRAY + "Current Form: "
- + EnumChatFormatting.RED
- + "Belt"
- + EnumChatFormatting.GRAY
- + ".");
- list.add(EnumChatFormatting.GRAY + "You can change this into a Ring or an Amulet.");
- }
-
- // Get Stats
- int mStatlevel = 0;
- if ((mStatlevel = ModularArmourUtils.getModifierLevel(stack, Modifiers.BOOST_DAMAGE)) > 0) {
- list.add(
- EnumChatFormatting.GRAY + "Damage Boost: "
- + EnumChatFormatting.DARK_RED
- + mStatlevel
- + EnumChatFormatting.GRAY
- + "/100.");
- }
- if ((mStatlevel = ModularArmourUtils.getModifierLevel(stack, Modifiers.BOOST_HP)) > 0) {
- list.add(
- EnumChatFormatting.GRAY + "Health Boost: "
- + EnumChatFormatting.RED
- + mStatlevel
- + EnumChatFormatting.GRAY
- + "/100. Bonus "
- + (mStatlevel / 5)
- + " hearts.");
- }
- if ((mStatlevel = ModularArmourUtils.getModifierLevel(stack, Modifiers.BOOST_SPEED)) > 0) {
- list.add(
- EnumChatFormatting.GRAY + "Speed Boost: "
- + EnumChatFormatting.WHITE
- + mStatlevel
- + EnumChatFormatting.GRAY
- + "/100.");
- }
- if ((mStatlevel = ModularArmourUtils.getModifierLevel(stack, Modifiers.BOOST_MINING)) > 0) {
- list.add(
- EnumChatFormatting.GRAY + "Mining Boost: "
- + EnumChatFormatting.DARK_GRAY
- + mStatlevel
- + EnumChatFormatting.GRAY
- + "/100.");
- }
- if ((mStatlevel = ModularArmourUtils.getModifierLevel(stack, Modifiers.BOOST_HOLY)) > 0) {
- list.add(
- EnumChatFormatting.GRAY + "Holy Boost: "
- + EnumChatFormatting.GOLD
- + mStatlevel
- + EnumChatFormatting.GRAY
- + "/100.");
- }
-
- // Defence Boost
- if ((mStatlevel = ModularArmourUtils.getModifierLevel(stack, Modifiers.BOOST_DEF)) > 0) {
- list.add(
- EnumChatFormatting.GRAY + "Defence Boost: "
- + EnumChatFormatting.BLUE
- + mStatlevel
- + EnumChatFormatting.GRAY
- + "/100.");
-
- if ((Keyboard.isKeyDown(42)) || (Keyboard.isKeyDown(54))) {
-
- if (mStatlevel >= 1) {
- list.add(
- EnumChatFormatting.GRAY + "Protected From: "
- + EnumChatFormatting.BLUE
- + "Cactus"
- + EnumChatFormatting.GRAY
- + ".");
- }
- if (mStatlevel >= 10) {
- list.add(
- EnumChatFormatting.GRAY + "Protected From: "
- + EnumChatFormatting.BLUE
- + "Falling Blocks"
- + EnumChatFormatting.GRAY
- + ".");
- }
- if (mStatlevel >= 20) {
- list.add(
- EnumChatFormatting.GRAY + "Protected From: "
- + EnumChatFormatting.BLUE
- + "Wall Suffocation"
- + EnumChatFormatting.GRAY
- + ".");
- }
- if (mStatlevel >= 35) {
- list.add(
- EnumChatFormatting.GRAY + "Protected From: "
- + EnumChatFormatting.BLUE
- + "Drowning"
- + EnumChatFormatting.GRAY
- + ".");
- }
- if (mStatlevel >= 50) {
- list.add(
- EnumChatFormatting.GRAY + "Protected From: "
- + EnumChatFormatting.BLUE
- + "Starvation"
- + EnumChatFormatting.GRAY
- + ".");
- }
- if (mStatlevel >= 60) {
- list.add(
- EnumChatFormatting.GRAY + "Protected From: "
- + EnumChatFormatting.BLUE
- + "Falling"
- + EnumChatFormatting.GRAY
- + ".");
- }
- if (mStatlevel >= 75) {
- list.add(
- EnumChatFormatting.GRAY + "Protected From: "
- + EnumChatFormatting.BLUE
- + "Lava"
- + EnumChatFormatting.GRAY
- + ".");
- }
- if (mStatlevel >= 80) {
- list.add(
- EnumChatFormatting.GRAY + "Protected From: "
- + EnumChatFormatting.BLUE
- + "Magic"
- + EnumChatFormatting.GRAY
- + ".");
- }
- if (mStatlevel >= 95) {
- list.add(
- EnumChatFormatting.GRAY + "Protected From: "
- + EnumChatFormatting.BLUE
- + "Wither"
- + EnumChatFormatting.GRAY
- + ".");
- }
- if (mStatlevel >= 100) {
- list.add(
- EnumChatFormatting.GRAY + "Protected From: "
- + EnumChatFormatting.BLUE
- + "Fire"
- + EnumChatFormatting.GRAY
- + ".");
- }
- if (mStatlevel >= 100) {
- list.add(
- EnumChatFormatting.GRAY + "Protected From: "
- + EnumChatFormatting.BLUE
- + "Void"
- + EnumChatFormatting.GRAY
- + ".");
- }
-
- } else {
- list.add(EnumChatFormatting.GRAY + "<Press Shift to view protections>");
- }
- }
-
- if (NBTUtils.getBotanicaSoulboundOwner(stack) != null) {
- if (!NBTUtils.getBotanicaSoulboundOwner(stack).equals("")) {
- list.add(
- EnumChatFormatting.GRAY + "Owner: "
- + EnumChatFormatting.GREEN
- + NBTUtils.getBotanicaSoulboundOwner(stack)
- + EnumChatFormatting.GRAY
- + ".");
- }
- }
- super.addInformation(stack, player, list, bool);
- }
-
- @Override
- public boolean addDamageNegation(DamageSource damageSource, ItemStack aStack) {
-
- this.clearDamageNegation();
- int mStatlevel = 0;
- if ((mStatlevel = ModularArmourUtils.getModifierLevel(aStack, Modifiers.BOOST_HOLY)) > 0) {
- if (mStatlevel >= 1) {
- addDamageNegation(DamageSource.cactus);
- }
- if (mStatlevel >= 10) {
- addDamageNegation(DamageSource.fallingBlock);
- }
- if (mStatlevel >= 20) {
- addDamageNegation(DamageSource.inWall);
- }
- if (mStatlevel >= 35) {
- addDamageNegation(DamageSource.drown);
- }
- if (mStatlevel >= 50) {
- addDamageNegation(DamageSource.starve);
- }
- if (mStatlevel >= 60) {
- addDamageNegation(DamageSource.fall);
- }
- if (mStatlevel >= 75) {
- addDamageNegation(DamageSource.lava);
- }
- if (mStatlevel >= 80) {
- addDamageNegation(DamageSource.magic);
- }
- if (mStatlevel >= 95) {
- addDamageNegation(DamageSource.wither);
- }
- if (mStatlevel >= 100) {
- addDamageNegation(DamageSource.inFire);
- }
- if (mStatlevel >= 100) {
- addDamageNegation(DamageSource.onFire);
- }
- if (mStatlevel >= 100) {
- addDamageNegation(DamageSource.outOfWorld);
- }
- }
- return super.addDamageNegation(damageSource, null);
- }
-
- @Override
- public boolean canEquip(ItemStack arg0, EntityLivingBase arg1) {
- if (ModularArmourUtils.getBaubleTypeID(arg0) == BT.TYPE_AMULET.getID()) {
- this.SetBaubleType(BT.TYPE_AMULET);
- } else if (ModularArmourUtils.getBaubleTypeID(arg0) == BT.TYPE_RING.getID()) {
- this.SetBaubleType(BT.TYPE_RING);
- } else if (ModularArmourUtils.getBaubleTypeID(arg0) == BT.TYPE_BELT.getID()) {
- this.SetBaubleType(BT.TYPE_BELT);
- } else {
- this.SetBaubleType(BT.TYPE_RING);
- }
- if (PlayerUtils.isPlayerOP((EntityPlayer) arg1)) {
- return true; // Let OPs wear other peoples stuff.
- }
-
- String mOwner;
- if (NBTUtils.getBotanicaSoulboundOwner(arg0) == null || NBTUtils.getBotanicaSoulboundOwner(arg0).equals("")) {
- return true;
- } else if ((mOwner = NBTUtils.getBotanicaSoulboundOwner(arg0)) != null) {
- String mPlayerName = arg1.getCommandSenderName();
- if (mOwner.toLowerCase().equals(mPlayerName.toLowerCase())) {
- return true;
- } else {
- return false;
- }
- } else {
- return false;
- }
- }
-
- @Override
- public BaubleType getBaubleType(ItemStack arg0) {
- return ModularArmourUtils.getBaubleType(arg0);
- }
-
- @Override
- public void onEquipped(ItemStack stack, EntityLivingBase entity) {
- if (entity instanceof EntityPlayer) {
- if (NBTUtils.getBotanicaSoulboundOwner(stack) == null
- || NBTUtils.getBotanicaSoulboundOwner(stack).equals("")) {
- NBTUtils.setBotanicaSoulboundOwner(stack, entity.getCommandSenderName());
- }
- }
- super.onEquipped(stack, entity);
- }
-
- /*
- * @Override
- * @SideOnly(Side.CLIENT) public IIcon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack
- * usingItem, int useRemaining) { if (usingItem == null) { return mfallback; } try { if (stack.getItemDamage() == 0)
- * { return mfallback = mTextureAmulet; } else if (stack.getItemDamage() == 1) { return mfallback = mTextureRing; }
- * else if (stack.getItemDamage() == 2) { return mfallback = mTextureBelt; } else { return mfallback = mTextureRing;
- * } } catch (Throwable t) { return mfallback = mTextureRing; } }
- */
-
- @Override
- @SideOnly(Side.CLIENT)
- public IIcon getIconFromDamage(int meta) {
- if (meta < this.iconArray.length && this.iconArray[meta] != null) {
- return this.iconArray[meta];
- }
- return this.mfallback;
- }
-
- @Override
- public void getSubItems(Item item, CreativeTabs tab, List list) {
- for (int i = 0; i < 3; i++) {
- list.add(new ItemStack(item, 1, i));
- }
- }
-
- @Override
- @SideOnly(Side.CLIENT)
- public void registerIcons(IIconRegister register) {
- this.mfallback = register.registerIcon(GTPlusPlus.ID + ":" + "itemAmulet");
- // you cannot initialize iconArray when declared nor in the constructor,
- // as it is client-side only, so do it here:
- if (Thaumcraft.isModLoaded()) {
- iconArray[0] = register.registerIcon("thaumcraft" + ":" + "bauble_amulet");
- iconArray[1] = register.registerIcon("thaumcraft" + ":" + "bauble_ring");
- iconArray[2] = register.registerIcon("thaumcraft" + ":" + "bauble_belt");
- } else {
- iconArray[0] = register.registerIcon(GTPlusPlus.ID + ":" + "itemAmulet");
- iconArray[1] = register.registerIcon(GTPlusPlus.ID + ":" + "itemRingWearable");
- iconArray[2] = register.registerIcon(GTPlusPlus.ID + ":" + "itemBelt");
- }
-
- mTextureAmulet = iconArray[0];
- mTextureRing = iconArray[1];
- mTextureBelt = iconArray[2];
- }
-
- @Override
- public void onWornTick(ItemStack stack, EntityLivingBase player) {
- super.onWornTick(stack, player);
- }
-
- @Override
- public boolean showDurabilityBar(ItemStack stack) {
- return false;
- }
-
- @Override
- public Item setFull3D() {
- // TODO Auto-generated method stub
- return super.setFull3D();
- }
-
- @Override
- public boolean isFull3D() {
- return true;
- }
-
- @Override
- public boolean isRepairable() {
- return false;
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/item/bauble/MonsterKillerBaseBauble.java b/src/main/java/gtPlusPlus/core/item/bauble/MonsterKillerBaseBauble.java
deleted file mode 100644
index f7740f73cc..0000000000
--- a/src/main/java/gtPlusPlus/core/item/bauble/MonsterKillerBaseBauble.java
+++ /dev/null
@@ -1,181 +0,0 @@
-package gtPlusPlus.core.item.bauble;
-
-import java.util.List;
-
-import net.minecraft.creativetab.CreativeTabs;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityLiving;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.StatCollector;
-import net.minecraft.world.World;
-
-import baubles.api.BaubleType;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import gregtech.api.enums.GT_Values;
-import gtPlusPlus.api.objects.data.AutoMap;
-import gtPlusPlus.api.objects.minecraft.AABB;
-import gtPlusPlus.core.util.math.MathUtils;
-import gtPlusPlus.core.util.minecraft.EntityUtils;
-import gtPlusPlus.core.util.minecraft.PlayerUtils;
-import ic2.api.item.ElectricItem;
-
-public class MonsterKillerBaseBauble extends ElectricBaseBauble {
-
- private final Class[] mTargets;
-
- public MonsterKillerBaseBauble(Class[] aMonsterBaseClassArray, String aMonsterTypeName, int aPowerTier) {
- super(
- BaubleType.AMULET,
- aPowerTier,
- GT_Values.V[aPowerTier] * 20 * 300,
- "GTPP.MonsterKiller." + aMonsterTypeName + ".name");
- mTargets = aMonsterBaseClassArray;
- }
-
- @SideOnly(Side.CLIENT)
- @Override
- public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List itemList) {
- ItemStack itemStack = new ItemStack(this, 1);
- ItemStack charged;
- if (this.getEmptyItem(itemStack) == this) {
- charged = new ItemStack(this, 1);
- ElectricItem.manager.charge(charged, 0.0D, Integer.MAX_VALUE, true, false);
- itemList.add(charged);
- }
- if (this.getChargedItem(itemStack) == this) {
- charged = new ItemStack(this, 1);
- ElectricItem.manager.charge(charged, Double.POSITIVE_INFINITY, Integer.MAX_VALUE, true, false);
- itemList.add(charged);
- }
- }
-
- @Override
- public void onUpdate(final ItemStack itemStack, final World worldObj, final Entity player, final int p_77663_4_,
- final boolean p_77663_5_) {
- super.onUpdate(itemStack, worldObj, player, p_77663_4_, p_77663_5_);
- }
-
- @Override
- public boolean canProvideEnergy(final ItemStack itemStack) {
- double aItemCharge = ElectricItem.manager.getCharge(itemStack);
- return aItemCharge > 0;
- }
-
- @Override
- public String getItemStackDisplayName(final ItemStack p_77653_1_) {
- return (EnumChatFormatting.WHITE + super.getItemStackDisplayName(p_77653_1_) + EnumChatFormatting.GRAY);
- }
-
- @Override
- public boolean showDurabilityBar(final ItemStack stack) {
- return true;
- }
-
- @SuppressWarnings("unchecked")
- @Override
- public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) {
- list.add("");
- String aString1 = StatCollector.translateToLocal("GTPP.monsterkiller.tooltip.1");
- String aString2 = StatCollector.translateToLocal("GTPP.monsterkiller.tooltip.2");
- String aString3 = StatCollector.translateToLocal("GTPP.monsterkiller.tooltip.3");
- String aString4 = StatCollector.translateToLocal("GTPP.monsterkiller.tooltip.4");
- String aEU = StatCollector.translateToLocal("GTPP.info.eu");
- String aEUT = aEU + "/t";
-
- list.add(EnumChatFormatting.GREEN + aString1 + EnumChatFormatting.GRAY);
- list.add(
- EnumChatFormatting.GREEN + aString2
- + " "
- + (int) getTransferLimit(stack)
- + aEUT
- + " "
- + aString3
- + EnumChatFormatting.GRAY);
- list.add("");
- list.add("" + EnumChatFormatting.GREEN + aString4 + " " + EnumChatFormatting.GRAY);
- for (Class cz : mTargets) {
- list.add(
- "- " + EnumChatFormatting.DARK_GREEN
- + cz.getSimpleName().replace("Entity", "")
- + EnumChatFormatting.GRAY);
- }
-
- super.addInformation(stack, aPlayer, list, bool);
- }
-
- @Override
- public boolean canEquip(final ItemStack arg0, final EntityLivingBase arg1) {
- return true;
- }
-
- @Override
- public boolean canUnequip(final ItemStack arg0, final EntityLivingBase arg1) {
- return true;
- }
-
- @Override
- public void onEquipped(final ItemStack arg0, final EntityLivingBase arg1) {}
-
- @Override
- public void onUnequipped(final ItemStack arg0, final EntityLivingBase arg1) {}
-
- @Override // TODO
- public void onWornTick(final ItemStack aBaubleStack, final EntityLivingBase aPlayerEntity) {
- if (aPlayerEntity == null) {
- return;
- }
- EntityPlayer aPlayer = (EntityPlayer) aPlayerEntity;
- if (!aPlayer.worldObj.isRemote) {
- if (this.getCharge(aBaubleStack) >= getTransferLimit(aBaubleStack)) {
- AABB aPlayerBox = new AABB(aPlayerEntity, 5, 5, 5);
- if (this.mTargets != null && this.mTargets.length > 0) {
- for (Class clazz : mTargets) {
- AutoMap<?> aEnts = EntityUtils.getEntitiesWithinBoundingBox(clazz, aPlayerBox);
- if (aEnts.isEmpty()) {
- continue;
- } else {
- EntityLiving aClosest = null;
- double aEntityDistance = Short.MIN_VALUE;
- for (Object ent : aEnts) {
- if (!EntityLiving.class.isInstance(ent)) {
- continue;
- } else {
- double aCurEntDis = EntityUtils.getDistance(aPlayerEntity, (Entity) ent);
- if (aEntityDistance == Short.MIN_VALUE || aCurEntDis < aEntityDistance) {
- aEntityDistance = aCurEntDis;
- aClosest = (EntityLiving) ent;
- }
- }
- }
- if (aClosest != null) {
- float aEntHealth = aClosest.getHealth();
- float aEntMaxHealth = aClosest.getMaxHealth();
- double aEntHealthPerc = MathUtils.findPercentage(aEntHealth, aEntMaxHealth);
- long aEuUsage = (long) (aEntHealthPerc * 50 * aEntMaxHealth);
- if (this.discharge(aBaubleStack, aEuUsage, mTier, true, false, false) > 0) {
- aClosest.setDead();
- PlayerUtils.messagePlayer(aPlayer, "Removed 1x " + aClosest.getCommandSenderName());
- break;
- }
- } else {
- continue;
- }
- }
- }
- }
- } else {
- return;
- }
- }
- }
-
- @Override
- public String getTextureNameForBauble() {
- return "baubles/itemAmulet";
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/item/chemistry/NuclearChem.java b/src/main/java/gtPlusPlus/core/item/chemistry/NuclearChem.java
index 0db5a9bba3..0096f48148 100644
--- a/src/main/java/gtPlusPlus/core/item/chemistry/NuclearChem.java
+++ b/src/main/java/gtPlusPlus/core/item/chemistry/NuclearChem.java
@@ -1,12 +1,9 @@
package gtPlusPlus.core.item.chemistry;
import net.minecraft.init.Items;
-import net.minecraft.item.ItemStack;
import net.minecraftforge.fluids.Fluid;
import gtPlusPlus.api.objects.minecraft.ItemPackage;
-import gtPlusPlus.core.item.ModItems;
-import gtPlusPlus.core.item.chemistry.general.ItemNuclearChemBase;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.recipe.common.CI;
import gtPlusPlus.core.util.minecraft.FluidUtils;
@@ -23,36 +20,8 @@ public class NuclearChem extends ItemPackage {
public static Fluid GeneticMutagen;
private static boolean generateMutagenRecipe = false;
- public static ItemNuclearChemBase mNuclearChemItem1;
-
- public static ItemStack mResidueUranium;
- public static ItemStack mResiduePlutonium;
- public static ItemStack mResidueFluorides;
- public static ItemStack mResidueNobles;
-
@Override
- public void items() {
-
- mNuclearChemItem1 = new ItemNuclearChemBase();
- registerItemStacks();
- registerOreDict();
- }
-
- public void registerItemStacks() {
-
- mResidueUranium = ItemUtils.simpleMetaStack(mNuclearChemItem1, 0, 1);
- mResidueUranium = ItemUtils.simpleMetaStack(mNuclearChemItem1, 1, 1);
- mResidueUranium = ItemUtils.simpleMetaStack(mNuclearChemItem1, 2, 1);
- mResidueUranium = ItemUtils.simpleMetaStack(mNuclearChemItem1, 3, 1);
- }
-
- public void registerOreDict() {
-
- ItemUtils.addItemToOreDictionary(mResidueUranium, "dustResidueUranium");
- ItemUtils.addItemToOreDictionary(mResiduePlutonium, "dustResiduePlutonium");
- ItemUtils.addItemToOreDictionary(mResidueFluorides, "dustResidueFluoride");
- ItemUtils.addItemToOreDictionary(mResidueNobles, "dustResidueNoble");
- }
+ public void items() {}
@Override
public void blocks() {}
@@ -112,7 +81,6 @@ public class NuclearChem extends ItemPackage {
if (generateMutagenRecipe) {
chemReator_CreateMutagen();
}
- chemReactor_MutagenWithEggs();
return true;
}
@@ -127,14 +95,4 @@ public class NuclearChem extends ItemPackage {
500);
}
- private static void chemReactor_MutagenWithEggs() {
- CORE.RA.addChemicalRecipe(
- CI.getNumberedCircuit(20),
- ItemUtils.getSimpleStack(Items.egg, 2),
- FluidUtils.getFluidStack(GeneticMutagen, 500),
- null,
- ItemUtils.getSimpleStack(ModItems.itemBigEgg, 2),
- 300 * 20,
- 500);
- }
}
diff --git a/src/main/java/gtPlusPlus/core/item/chemistry/general/ItemNuclearChemBase.java b/src/main/java/gtPlusPlus/core/item/chemistry/general/ItemNuclearChemBase.java
deleted file mode 100644
index 0f9f7d0e5c..0000000000
--- a/src/main/java/gtPlusPlus/core/item/chemistry/general/ItemNuclearChemBase.java
+++ /dev/null
@@ -1,145 +0,0 @@
-package gtPlusPlus.core.item.chemistry.general;
-
-import static gregtech.api.enums.Mods.GTPlusPlus;
-
-import java.util.List;
-
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.creativetab.CreativeTabs;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.EnumRarity;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.IIcon;
-import net.minecraft.world.World;
-
-import cpw.mods.fml.common.registry.GameRegistry;
-import gtPlusPlus.core.util.minecraft.ItemUtils;
-
-public class ItemNuclearChemBase extends Item {
-
- protected final IIcon base[];
-
- private final int aMetaSize = 4;
-
- /*
- * 0 - Uranium Residue 1 - Plutonium Residue 2 - Fluoride Reside 3 - Noble Gas Residue
- */
-
- public ItemNuclearChemBase() {
- this.setHasSubtypes(true);
- this.setNoRepair();
- this.setMaxStackSize(64);
- this.setMaxDamage(0);
- base = new IIcon[aMetaSize];
- this.setUnlocalizedName("BasicNuclearChemItem");
- GameRegistry.registerItem(this, this.getUnlocalizedName());
- }
-
- @Override
- public int getItemStackLimit(ItemStack stack) {
- return super.getItemStackLimit(stack);
- }
-
- @Override
- public boolean isDamageable() {
- return false;
- }
-
- @Override
- public boolean shouldRotateAroundWhenRendering() {
- return super.shouldRotateAroundWhenRendering();
- }
-
- @Override
- public void onUpdate(ItemStack p_77663_1_, World p_77663_2_, Entity p_77663_3_, int p_77663_4_,
- boolean p_77663_5_) {
- super.onUpdate(p_77663_1_, p_77663_2_, p_77663_3_, p_77663_4_, p_77663_5_);
- }
-
- @Override
- public String getItemStackDisplayName(ItemStack aStack) {
- return super.getItemStackDisplayName(aStack);
- }
-
- @Override
- public EnumRarity getRarity(ItemStack p_77613_1_) {
- return EnumRarity.common;
- }
-
- @Override
- public boolean requiresMultipleRenderPasses() {
- return false;
- }
-
- @Override
- public void getSubItems(Item aItem, CreativeTabs p_150895_2_, List aList) {
- for (int i = 0; i < aMetaSize; i++) {
- aList.add(ItemUtils.simpleMetaStack(aItem, i, 1));
- }
- }
-
- @Override
- public boolean getIsRepairable(ItemStack p_82789_1_, ItemStack p_82789_2_) {
- return false;
- }
-
- @Override
- public boolean isRepairable() {
- return false;
- }
-
- @Override
- public boolean isBookEnchantable(ItemStack stack, ItemStack book) {
- return false;
- }
-
- @Override
- public int getItemEnchantability() {
- return 0;
- }
-
- @Override
- public int getItemEnchantability(ItemStack stack) {
- return 0;
- }
-
- @Override
- public void registerIcons(final IIconRegister u) {
- for (int i = 0; i < this.aMetaSize; i++) {
- String aPath = GTPlusPlus.ID + ":" + "science/nuclear/MetaItem1/" + i;
- this.base[i] = u.registerIcon(aPath);
- }
- }
-
- @Override
- public IIcon getIconFromDamageForRenderPass(final int damage, final int pass) {
- return this.base[damage];
- }
-
- @Override
- public IIcon getIconFromDamage(int damage) {
- return this.base[damage];
- }
-
- @Override
- public IIcon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining) {
- return this.base[stack.getItemDamage()];
- }
-
- @Override
- public IIcon getIcon(ItemStack stack, int pass) {
- return this.base[stack.getItemDamage()];
- }
-
- @Override
- public String getUnlocalizedName(ItemStack stack) {
- return super.getUnlocalizedName() + "." + stack.getItemDamage();
- }
-
- @Override
- public void addInformation(ItemStack aStack, EntityPlayer player, List list, boolean bool) {
- super.addInformation(aStack, player, list, bool);
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/item/general/BaseItemGrindle.java b/src/main/java/gtPlusPlus/core/item/general/BaseItemGrindle.java
deleted file mode 100644
index 1ed6e1d32c..0000000000
--- a/src/main/java/gtPlusPlus/core/item/general/BaseItemGrindle.java
+++ /dev/null
@@ -1,76 +0,0 @@
-package gtPlusPlus.core.item.general;
-
-import static gregtech.api.enums.Mods.GTPlusPlus;
-
-import java.util.List;
-
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.EnumRarity;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.StatCollector;
-import net.minecraft.world.World;
-
-import cpw.mods.fml.common.registry.GameRegistry;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import gtPlusPlus.GTplusplus;
-import gtPlusPlus.core.creative.AddToCreativeTab;
-import gtPlusPlus.core.handler.GuiHandler;
-
-public class BaseItemGrindle extends Item {
-
- protected final String unlocalName;
-
- public BaseItemGrindle() {
- this.unlocalName = "itemGrindleTablet";
- this.setUnlocalizedName("itemGrindleTablet");
- this.setTextureName(GTPlusPlus.ID + ":" + "itemTablet");
- GameRegistry.registerItem(this, "itemGrindleTablet");
- this.setMaxStackSize(1);
- this.setCreativeTab(AddToCreativeTab.tabOther);
- }
-
- @Override
- public int getMaxItemUseDuration(final ItemStack stack) {
- return 1;
- }
-
- @Override
- public ItemStack onItemRightClick(final ItemStack itemstack, final World world, final EntityPlayer player) {
- if (!world.isRemote) {
- if (!player.isSneaking()) {
- player.openGui(GTplusplus.instance, GuiHandler.GUI9, world, 0, 0, 0);
- }
- }
- return itemstack;
- }
-
- @Override
- @SideOnly(Side.CLIENT)
- public void registerIcons(final IIconRegister iconRegister) {
- this.itemIcon = iconRegister.registerIcon(GTPlusPlus.ID + ":" + "itemTablet");
- }
-
- @Override
- public String getPotionEffect(ItemStack p_150896_1_) {
- return super.getPotionEffect(p_150896_1_);
- }
-
- @Override
- public void addInformation(ItemStack p_77624_1_, EntityPlayer p_77624_2_, List aList, boolean p_77624_4_) {
- super.addInformation(p_77624_1_, p_77624_2_, aList, p_77624_4_);
- aList.add(StatCollector.translateToLocal("item.itemGrindleTablet.tooltip"));
- }
-
- @Override
- public EnumRarity getRarity(ItemStack i) {
- return EnumRarity.uncommon;
- }
-
- @Override
- public boolean isRepairable() {
- return false;
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/item/general/ItemAreaClear.java b/src/main/java/gtPlusPlus/core/item/general/ItemAreaClear.java
deleted file mode 100644
index 3db9672630..0000000000
--- a/src/main/java/gtPlusPlus/core/item/general/ItemAreaClear.java
+++ /dev/null
@@ -1,205 +0,0 @@
-package gtPlusPlus.core.item.general;
-
-import static gregtech.api.enums.Mods.GTPlusPlus;
-
-import java.util.List;
-
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.creativetab.CreativeTabs;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Blocks;
-import net.minecraft.item.EnumRarity;
-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.minecraft.util.StatCollector;
-import net.minecraft.world.World;
-
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.common.blocks.GT_Block_Ores;
-import gtPlusPlus.api.objects.Logger;
-import gtPlusPlus.api.objects.minecraft.BlockPos;
-import gtPlusPlus.core.block.base.BlockBaseOre;
-import gtPlusPlus.core.creative.AddToCreativeTab;
-import gtPlusPlus.core.item.base.CoreItem;
-import gtPlusPlus.core.util.math.MathUtils;
-import gtPlusPlus.core.util.minecraft.EntityUtils;
-
-public class ItemAreaClear extends CoreItem {
-
- public IIcon[] mIcon = new IIcon[1];
-
- public ItemAreaClear() {
- super(
- "itemDebugClearing",
- AddToCreativeTab.tabMachines,
- 1,
- 100,
- new String[] { EnumChatFormatting.OBFUSCATED + "F A N C Y N A M E" },
- EnumRarity.rare,
- EnumChatFormatting.BOLD,
- false,
- null);
- }
-
- @Override
- public void registerIcons(IIconRegister reg) {
- this.mIcon[0] = reg.registerIcon(GTPlusPlus.ID + ":" + "itemLavaFilter");
- }
-
- @Override
- public IIcon getIconFromDamage(int meta) {
- return this.mIcon[0];
- }
-
- @Override
- public void getSubItems(Item item, CreativeTabs tab, List list) {
- for (int i = 0; i < 2; i++) {
- list.add(new ItemStack(item, 1, i));
- }
- }
-
- @Override
- public String getItemStackDisplayName(final ItemStack tItem) {
- return StatCollector.translateToLocalFormatted("item.itemDebugClearing.name", tItem.getItemDamage() + 1);
- }
-
- @Override
- public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool) {
- list.add(
- EnumChatFormatting.GRAY + ""
- + StatCollector
- .translateToLocal("item.itemDebugClearing." + stack.getItemDamage() + ".tooltip"));
- super.addInformation(stack, player, list, bool);
- }
-
- private static boolean createNBT(ItemStack rStack) {
- final NBTTagCompound tagMain = new NBTTagCompound();
- final NBTTagCompound tagNBT = new NBTTagCompound();
- tagNBT.setLong("Mode", 0);
- tagMain.setTag("GTPP_DEBUG", tagNBT);
- rStack.setTagCompound(tagMain);
- return true;
- }
-
- public static final long getFilterDamage(final ItemStack aStack) {
- NBTTagCompound aNBT = aStack.getTagCompound();
- if (aNBT != null) {
- aNBT = aNBT.getCompoundTag("GTPP_DEBUG");
- if (aNBT != null) {
- return aNBT.getLong("Mode");
- }
- } else {
- createNBT(aStack);
- }
- return 0L;
- }
-
- public static final boolean setFilterDamage(final ItemStack aStack, final long aDamage) {
- NBTTagCompound aNBT = aStack.getTagCompound();
- if (aNBT != null) {
- aNBT = aNBT.getCompoundTag("GTPP_DEBUG");
- if (aNBT != null) {
- aNBT.setLong("Mode", aDamage);
- return true;
- }
- }
- return false;
- }
-
- public boolean removeBlocks(World world, BlockPos pos) {
- int x1 = pos.xPos;
- int y1 = pos.yPos;
- int z1 = pos.zPos;
-
- int x2 = (x1 - 24);
- int y2 = (y1 - 10);
- int z2 = (z1 - 24);
-
- removeBlockColumn(world, new BlockPos(x2, y2, z2, world));
- return true;
- }
-
- public boolean removeBlockColumn(World world, BlockPos pos) {
- for (int i = 0; i < 50; i++) {
- removeBlockRow(world, new BlockPos(pos.xPos, pos.yPos - 10, pos.zPos + i, world));
- removeBlockRow(world, new BlockPos(pos.xPos, pos.yPos, pos.zPos + i, world));
- removeBlockRow(world, new BlockPos(pos.xPos, pos.yPos + 10, pos.zPos + i, world));
- }
- return true;
- }
-
- public boolean removeBlockRow(World world, BlockPos pos) {
- for (int j = 0; j < 20; j++) {
- for (int i = 0; i < 50; i++) {
-
- if (!(world.getBlock(pos.xPos + i, pos.yPos + j, pos.zPos) instanceof BlockBaseOre)
- && !(world.getBlock(pos.xPos + i, pos.yPos + j, pos.zPos) instanceof IGregTechTileEntity)
- && !(world.getBlock(pos.xPos + i, pos.yPos + j, pos.zPos) instanceof GT_Block_Ores)) {
- if (!world.isAirBlock(pos.xPos + i, pos.yPos + j, pos.zPos)
- && world.getBlock(pos.xPos + i, pos.yPos + j, pos.zPos) != Blocks.bedrock) {
- int chance = MathUtils.randInt(0, 500);
- if (chance <= 0) {
- if (pos.yPos + j <= 50) {
- world.setBlock(pos.xPos + i, pos.yPos + j, pos.zPos, Blocks.glowstone);
- }
- } else {
- if ((world.getBlock(pos.xPos + i, pos.yPos + j, pos.zPos) == Blocks.glowstone
- && ((pos.yPos + j) > 50))
- || world.getBlock(pos.xPos + i, pos.yPos + j, pos.zPos) != Blocks.glowstone) {
- world.setBlockToAir(pos.xPos + i, pos.yPos + j, pos.zPos);
- }
- }
- }
- }
- }
- }
- return true;
- }
-
- public boolean fillBlocks(World world, BlockPos pos) {
- int x1 = pos.xPos;
- int y1 = pos.yPos;
- int z1 = pos.zPos;
-
- int x2 = (x1 - 15);
- int y2 = (y1 - 1);
- int z2 = (z1 - 15);
-
- fillBlockColumn(world, new BlockPos(x2, y2, z2, world));
- return true;
- }
-
- public boolean fillBlockColumn(World world, BlockPos pos) {
- for (int i = 0; i < 30; i++) {
- fillBlockRow(world, new BlockPos(pos.xPos, pos.yPos, pos.zPos + i, world));
- }
- return true;
- }
-
- public boolean fillBlockRow(World world, BlockPos pos) {
- for (int j = 0; j < 2; j++) {
- for (int i = 0; i < 30; i++) {
- if (world.getBlock(pos.xPos + i, pos.yPos + j, pos.zPos) != Blocks.bedrock) {
- world.setBlock(pos.xPos + i, pos.yPos + j, pos.zPos, Blocks.dirt);
- world.setBlockMetadataWithNotify(pos.xPos + i, pos.yPos + j, pos.zPos, 2, 2);
- }
- }
- }
- return true;
- }
-
- @Override
- public ItemStack onItemRightClick(ItemStack thisItem, World world, EntityPlayer parEntity) {
- BlockPos groundBlock = EntityUtils.findBlockPosUnderEntity(parEntity);
- if (thisItem.getItemDamage() == 0) {
- removeBlocks(world, groundBlock);
- } else {
- Logger.INFO("Filling.");
- fillBlocks(world, groundBlock);
- }
- return super.onItemRightClick(thisItem, world, parEntity);
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/item/general/ItemBasicFirestarter.java b/src/main/java/gtPlusPlus/core/item/general/ItemBasicFirestarter.java
deleted file mode 100644
index d473723bf8..0000000000
--- a/src/main/java/gtPlusPlus/core/item/general/ItemBasicFirestarter.java
+++ /dev/null
@@ -1,98 +0,0 @@
-package gtPlusPlus.core.item.general;
-
-import static gregtech.api.enums.Mods.GTPlusPlus;
-
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Blocks;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.StatCollector;
-import net.minecraft.world.World;
-
-import gtPlusPlus.core.block.general.FirePit;
-import gtPlusPlus.core.creative.AddToCreativeTab;
-import gtPlusPlus.core.item.base.CoreItem;
-import gtPlusPlus.core.util.math.MathUtils;
-import gtPlusPlus.core.util.minecraft.PlayerUtils;
-
-public class ItemBasicFirestarter extends CoreItem {
-
- public ItemBasicFirestarter() {
- super("itemSimpleFiremaker", AddToCreativeTab.tabTools, 1, 5, "Can probably make you a fire");
- this.setTextureName(GTPlusPlus.ID + ":" + "itemFireStarter");
- }
-
- @Override
- public boolean onItemUse(final ItemStack thisItem, final EntityPlayer thisPlayer, final World thisWorld, int blockX,
- int blockY, int blockZ, final int p_77648_7_, final float p_77648_8_, final float p_77648_9_,
- final float p_77648_10_) {
- if (p_77648_7_ == 0) {
- --blockY;
- }
- if (p_77648_7_ == 1) {
- ++blockY;
- }
- if (p_77648_7_ == 2) {
- --blockZ;
- }
- if (p_77648_7_ == 3) {
- ++blockZ;
- }
- if (p_77648_7_ == 4) {
- --blockX;
- }
- if (p_77648_7_ == 5) {
- ++blockX;
- }
- if (!thisPlayer.canPlayerEdit(blockX, blockY, blockZ, p_77648_7_, thisItem)) {
- return false;
- }
- if (thisWorld.getBlock(blockX, blockY, blockZ) instanceof FirePit) {
- thisWorld.setBlockMetadataWithNotify(blockX, blockY, blockZ, 2, 4);
- PlayerUtils.messagePlayer(thisPlayer, StatCollector.translateToLocal("item.itemSimpleFiremaker.message.0"));
- }
- if (thisWorld.isAirBlock(blockX, blockY, blockZ)) {
- final int random = MathUtils.randInt(0, 3);
- // Explode, lol.
- if (random == 0) {
- PlayerUtils.messagePlayer(
- thisPlayer,
- StatCollector.translateToLocal("item.itemSimpleFiremaker.message.1"));
- thisWorld.playSoundEffect(
- thisPlayer.posX + 0.5D,
- thisPlayer.posY + 0.5D,
- thisPlayer.posZ + 0.5D,
- "fire.ignite",
- 1.0F,
- (itemRand.nextFloat() * 0.4F) + 0.8F);
- thisPlayer.setFire(4);
- thisItem.damageItem(thisItem.getMaxDamage(), thisPlayer);
- }
-
- // Create a fire
- else if (random == 2) {
- PlayerUtils.messagePlayer(
- thisPlayer,
- StatCollector.translateToLocal("item.itemSimpleFiremaker.message.2"));
- thisWorld.playSoundEffect(
- blockX + 0.5D,
- blockY + 0.5D,
- blockZ + 0.5D,
- "fire.ignite",
- 1.0F,
- (itemRand.nextFloat() * 0.4F) + 0.8F);
- thisWorld.setBlock(blockX, blockY, blockZ, Blocks.fire);
- }
-
- // Do nothing
- else {
- PlayerUtils.messagePlayer(
- thisPlayer,
- StatCollector.translateToLocal("item.itemSimpleFiremaker.message.3"));
- thisItem.damageItem(1, thisPlayer);
- return false;
- }
- }
- thisItem.damageItem(1, thisPlayer);
- return true;
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/item/general/ItemControlCore.java b/src/main/java/gtPlusPlus/core/item/general/ItemControlCore.java
deleted file mode 100644
index 0618d451fe..0000000000
--- a/src/main/java/gtPlusPlus/core/item/general/ItemControlCore.java
+++ /dev/null
@@ -1,82 +0,0 @@
-package gtPlusPlus.core.item.general;
-
-import static gregtech.api.enums.Mods.GTPlusPlus;
-
-import java.util.List;
-
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.creativetab.CreativeTabs;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.IIcon;
-import net.minecraft.util.StatCollector;
-
-import cpw.mods.fml.common.registry.GameRegistry;
-import gregtech.api.GregTech_API;
-import gregtech.api.enums.GT_Values;
-
-public class ItemControlCore extends Item {
-
- public static IIcon[] icons = new IIcon[10];
-
- public ItemControlCore() {
- super();
- this.setHasSubtypes(true);
- String unlocalizedName = "itemControlCore";
- this.setUnlocalizedName(unlocalizedName);
- this.setCreativeTab(GregTech_API.TAB_GREGTECH);
- // this.setCreativeTab(AddToCreativeTab.tabMisc);
- GameRegistry.registerItem(this, unlocalizedName);
- }
-
- @Override
- public void registerIcons(IIconRegister reg) {
- icons[0] = reg.registerIcon(GTPlusPlus.ID + ":" + "controlcore/Core_0");
- icons[1] = reg.registerIcon(GTPlusPlus.ID + ":" + "controlcore/Core_1");
- icons[2] = reg.registerIcon(GTPlusPlus.ID + ":" + "controlcore/Core_2");
- icons[3] = reg.registerIcon(GTPlusPlus.ID + ":" + "controlcore/Core_3");
- icons[4] = reg.registerIcon(GTPlusPlus.ID + ":" + "controlcore/Core_4");
- icons[5] = reg.registerIcon(GTPlusPlus.ID + ":" + "controlcore/Core_5");
- icons[6] = reg.registerIcon(GTPlusPlus.ID + ":" + "controlcore/Core_6");
- icons[7] = reg.registerIcon(GTPlusPlus.ID + ":" + "controlcore/Core_7");
- icons[8] = reg.registerIcon(GTPlusPlus.ID + ":" + "controlcore/Core_8");
- icons[9] = reg.registerIcon(GTPlusPlus.ID + ":" + "controlcore/Core_9");
- }
-
- @Override
- public IIcon getIconFromDamage(int meta) {
- return this.icons[meta];
- }
-
- @SuppressWarnings({ "unchecked", "rawtypes" })
- @Override
- public void getSubItems(Item item, CreativeTabs tab, List list) {
- for (int i = 0; i < 10; i++) {
- list.add(new ItemStack(item, 1, i));
- }
- }
-
- @Override
- public String getUnlocalizedName(ItemStack stack) {
- return this.getUnlocalizedName() + "_" + stack.getItemDamage();
- }
-
- @SuppressWarnings({ "unchecked", "rawtypes" })
- @Override
- public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) {
- list.add(
- EnumChatFormatting.GRAY + StatCollector.translateToLocalFormatted(
- "item.itemControlCore.tooltip.0",
- GT_Values.VN[stack.getItemDamage()]));
- list.add(EnumChatFormatting.GRAY + StatCollector.translateToLocal("item.itemControlCore.tooltip.1"));
- list.add(EnumChatFormatting.GRAY + StatCollector.translateToLocal("item.itemControlCore.tooltip.2"));
- }
-
- @Override
- public String getItemStackDisplayName(final ItemStack tItem) {
- return StatCollector
- .translateToLocalFormatted("item.itemControlCore.name", GT_Values.VN[tItem.getItemDamage()]);
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/item/general/ItemGemShards.java b/src/main/java/gtPlusPlus/core/item/general/ItemGemShards.java
deleted file mode 100644
index d88cf3328a..0000000000
--- a/src/main/java/gtPlusPlus/core/item/general/ItemGemShards.java
+++ /dev/null
@@ -1,67 +0,0 @@
-package gtPlusPlus.core.item.general;
-
-import java.util.List;
-
-import net.minecraft.creativetab.CreativeTabs;
-import net.minecraft.item.EnumRarity;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.StatCollector;
-
-import gtPlusPlus.core.item.base.BaseItemColourable;
-import gtPlusPlus.core.util.Utils;
-
-public class ItemGemShards extends BaseItemColourable {
-
- public ItemGemShards(String unlocalizedName, CreativeTabs creativeTab, int stackSize, int maxDmg,
- String description, EnumRarity regRarity, EnumChatFormatting colour, boolean Effect, int rgb) {
- super(unlocalizedName, creativeTab, stackSize, maxDmg, description, regRarity, colour, Effect, rgb);
- }
-
- public ItemGemShards(String unlocalizedName, String displayName, CreativeTabs creativeTab, int stackSize,
- int maxDmg, String description, EnumRarity regRarity, EnumChatFormatting colour, boolean Effect, int rgb) {
- super(
- unlocalizedName,
- displayName,
- creativeTab,
- stackSize,
- maxDmg,
- description,
- regRarity,
- colour,
- Effect,
- rgb);
- }
-
- @Override
- public void getSubItems(Item item, CreativeTabs tab, List list) {
- for (int i = 0; i < 4; i++) {
- list.add(new ItemStack(item, 1, i));
- }
- }
-
- // 0 - Diamond
- // 1 - Emerald
- // 2 - Ruby
- // 3 - Sapphire
-
- @Override
- public String getItemStackDisplayName(final ItemStack tItem) {
- return StatCollector
- .translateToLocal(getUnlocalizedNameInefficiently(tItem) + "." + tItem.getItemDamage() + ".name");
- }
-
- @Override
- public int getColorFromItemStack(ItemStack stack, int HEX_OxFFFFFF) {
- if (this.getDamage(stack) == 0) {
- return Utils.rgbtoHexValue(150, 150, 220);
- } else if (this.getDamage(stack) == 1) {
- return Utils.rgbtoHexValue(75, 182, 75);
- } else if (this.getDamage(stack) == 2) {
- return Utils.rgbtoHexValue(182, 77, 77);
- } else {
- return Utils.rgbtoHexValue(77, 75, 182);
- }
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/item/general/ItemGiantEgg.java b/src/main/java/gtPlusPlus/core/item/general/ItemGiantEgg.java
deleted file mode 100644
index 8cd9970625..0000000000
--- a/src/main/java/gtPlusPlus/core/item/general/ItemGiantEgg.java
+++ /dev/null
@@ -1,297 +0,0 @@
-package gtPlusPlus.core.item.general;
-
-import static gregtech.api.enums.Mods.GTPlusPlus;
-import static gtPlusPlus.core.lib.CORE.RANDOM;
-
-import java.util.List;
-
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.MathHelper;
-import net.minecraft.world.World;
-
-import gregtech.api.enums.ItemList;
-import gtPlusPlus.api.objects.Logger;
-import gtPlusPlus.api.objects.data.Pair;
-import gtPlusPlus.core.entity.item.ItemEntityGiantEgg;
-import gtPlusPlus.core.item.base.BaseItemTickable;
-import gtPlusPlus.core.item.general.spawn.ItemCustomSpawnEgg;
-import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.util.Utils;
-import gtPlusPlus.core.util.math.MathUtils;
-import gtPlusPlus.core.util.minecraft.ItemUtils;
-import gtPlusPlus.core.util.minecraft.NBTUtils;
-import gtPlusPlus.core.util.reflect.ReflectionUtils;
-
-public class ItemGiantEgg extends BaseItemTickable {
-
- private static ItemStack turnsIntoItem;
- private static ItemStack mCorrectEgg;
- private static ItemStack mCorrectStemCells;
-
- public void registerFuel(int burn) {
- CORE.burnables.add(new Pair<Integer, ItemStack>(burn, ItemUtils.getSimpleStack(this, 1)));
- }
-
- public final void registerOrdictionary(String name) {
- ItemUtils.addItemToOreDictionary(ItemUtils.getSimpleStack(this), name);
- }
-
- public ItemGiantEgg() {
- this(
- Utils.rgbtoHexValue(255, 255, 255),
- Short.MAX_VALUE * Byte.MAX_VALUE,
- new String[] { "I had best try disassemble this.. for science!" });
- }
-
- private ItemGiantEgg(int colour, int maxTicks, String[] desc1) {
- super(true, false, "itemBigEgg", colour, maxTicks, desc1);
- setTextureName(GTPlusPlus.ID + ":itemBigEgg");
- this.setMaxStackSize(1);
- registerFuel(5000);
- registerOrdictionary("fuelLargeChickenEgg");
- }
-
- public static void postInit(ItemGiantEgg aGiantEggItem) {
- ItemGiantEgg.turnsIntoItem = getSpawnEggStack();
- // new DecayableRecipe(aGiantEggItem.maxTicks, getSimpleStack(aGiantEggItem),
- // ItemUtils.getSimpleStack(ItemGiantEgg.turnsIntoItem, 1));
- }
-
- private static ItemStack getSpawnEggStack() {
- // Set the correct egg for future hatches
- if (mCorrectEgg == null) {
- /*
- * for (int g=0;g<Byte.MAX_VALUE;g++) { ItemStack mSpawn = ItemUtils.simpleMetaStack(Items.spawn_egg, g, 1);
- * if (mSpawn != null) { //String s = ("" + StatCollector.translateToLocal(mSpawn.getUnlocalizedName() +
- * ".name")).trim(); String s1 = EntityList.getStringFromID(mSpawn.getItemDamage()); if (s1 != null){ //s =
- * s + " " + StatCollector.translateToLocal("entity." + s1 + ".name"); if
- * (s1.equalsIgnoreCase("bigChickenFriendly")) { mCorrectEgg = mSpawn; return mCorrectEgg; } } } }
- */
- ItemStack aTempEgg = ItemCustomSpawnEgg.getSpawnEggForEntityname("bigChickenFriendly", 1);
- if (aTempEgg != null) {
- mCorrectEgg = aTempEgg;
- }
- }
- return mCorrectEgg;
- }
-
- private static ItemStack getStemCellStack() {
- if (mCorrectStemCells == null) {
- mCorrectStemCells = ItemList.Circuit_Chip_Stemcell.get(1);
- }
- return mCorrectStemCells;
- }
-
- @Override
- protected int getMaxTicks(ItemStack aStack) {
- if (aStack != null && aStack.hasTagCompound() && aStack.getTagCompound().hasKey("mEggAge")) {
- return NBTUtils.getInteger(aStack, "mEggAge");
- }
- return maxTicks;
- }
-
- @Override
- public void registerIcons(final IIconRegister i) {
- this.mIcon[0] = i.registerIcon(GTPlusPlus.ID + ":" + "itemBigEgg");
- }
-
- @Override
- protected boolean createNBT(World world, ItemStack aStack) {
-
- if (aStack.getTagCompound() != null && aStack.getTagCompound().hasKey("size")) {
- return false;
- }
- Logger.INFO("Egg: " + ReflectionUtils.getMethodName(1));
- Logger.INFO("Egg: " + ReflectionUtils.getMethodName(2));
- Logger.INFO("Egg: " + ReflectionUtils.getMethodName(3));
- Logger.INFO("Egg: " + ReflectionUtils.getMethodName(4));
- Logger.INFO("Egg: " + ReflectionUtils.getMethodName(5));
- Logger.INFO("Egg: " + ReflectionUtils.getMethodName(6));
- // Logger.INFO("Creating Egg NBT.");
- boolean aSuper = super.createNBT(world, aStack);
- int size = MathUtils.randInt(1, 8);
- NBTUtils.setInteger(aStack, "size", size);
- NBTUtils.setInteger(aStack, "mEggAge", ((MathUtils.randInt(8000, 16000) * size)));
- ItemStack aStemCells = getStemCellStack();
- if (aStemCells != null) {
- int mSize = NBTUtils.getInteger(aStack, "size");
- float mSizeMod = (MathUtils.randInt(-5, 5) / 5);
- mSize += mSizeMod;
- mSize = Math.max(mSize, 1);
- ItemStack eggYolks[] = new ItemStack[mSize];
- for (int u = 0; u < mSize; u++) {
- eggYolks[u] = ItemUtils.getSimpleStack(aStemCells, MathUtils.randInt(1, 4));
- }
- int mexpected = 0;
- for (ItemStack e : eggYolks) {
- if (e != null) {
- mexpected += e.stackSize;
- }
- }
- if (mexpected > 0) {
- NBTUtils.setInteger(aStack, "mExpected", mexpected);
- NBTUtils.writeItemsToGtCraftingComponents(
- aStack,
- new ItemStack[] { ItemUtils.getSimpleStack(aStemCells, mexpected) },
- true);
- }
- }
- return aSuper;
- }
-
- @Override
- public void onUpdate(final ItemStack iStack, final World world, final Entity entityHolding, final int p_77663_4_,
- final boolean p_77663_5_) {
- if (world == null || iStack == null) {
- return;
- }
- if (world.isRemote) {
- return;
- }
- if (iStack.getTagCompound() == null || !iStack.getTagCompound().hasKey("size")) {
- this.createNBT(world, iStack);
- Logger.INFO("Egg has no NBT, creating (onUpdate)");
- }
- boolean a1, a2;
- a1 = this.isTicking(world, iStack);
- a2 = a1 ? tickItemTag(world, iStack) : false;
-
- // Logger.INFO("Is Ticking? "+a1);
- // Logger.INFO("Did Tick? "+a2);
- if (!a1 && !a2) {
- if (entityHolding instanceof EntityPlayer) {
- if (MathUtils.randInt(0, 1000) >= 990) {
- if (NBTUtils.hasKey(iStack, "size")) {
- if ((NBTUtils.getInteger(iStack, "size") + 1) >= MathUtils.randInt(0, 9)) {
- ItemStack replacement = ItemUtils.getSimpleStack(getHatchResult(), 1);
- if (replacement == null) {}
-
- // Logger.INFO("Replacing "+iStack.getDisplayName()+" with
- // "+replacement.getDisplayName()+".");
- final ItemStack tempTransform = replacement.copy();
- if (iStack.stackSize > 1) {
- int u = iStack.stackSize;
- tempTransform.stackSize = u;
- ((EntityPlayer) entityHolding).inventory.addItemStackToInventory((tempTransform));
- for (int l = 0; l < u; l++) {
- ((EntityPlayer) entityHolding).inventory.consumeInventoryItem(this);
- }
- } else {
- tempTransform.stackSize = 1;
- ((EntityPlayer) entityHolding).inventory.addItemStackToInventory((tempTransform));
- ((EntityPlayer) entityHolding).inventory.consumeInventoryItem(this);
- }
- }
- }
- }
- }
- }
- }
-
- public ItemStack getHatchResult() {
- return turnsIntoItem;
- }
-
- @Override
- public String getItemStackDisplayName(ItemStack aStack) {
- String localName = super.getItemStackDisplayName(aStack);
- /*
- * if (aStack.getTagCompound() == null){ createNBT(null, aStack);
- * Logger.INFO("Egg has no NBT, creating (getDisplayName)"); }
- */
- int size = 1;
- if (NBTUtils.hasKey(aStack, "size")) {
- size = NBTUtils.getInteger(aStack, "size");
- return "" + size + " " + localName;
- }
- return "?? " + localName;
- }
-
- @Override
- public boolean hasCustomEntity(ItemStack stack) {
- return true;
- }
-
- @Override
- public Entity createEntity(World world, Entity location, ItemStack itemstack) {
- if (location instanceof EntityPlayer) {
- EntityPlayer player = (EntityPlayer) location;
- if (itemstack == null) {
- return null;
- } else if (itemstack.stackSize == 0) {
- return null;
- } else {
- ItemEntityGiantEgg entityitem = new ItemEntityGiantEgg(
- world,
- player.posX,
- player.posY - 0.30000001192092896D + (double) player.getEyeHeight(),
- player.posZ,
- itemstack);
- entityitem.delayBeforeCanPickup = 40;
- entityitem.func_145799_b(player.getCommandSenderName());
- float f = 0.1F;
- float f1;
- f = 0.3F;
- entityitem.motionX = (double) (-MathHelper.sin(player.rotationYaw / 180.0F * (float) Math.PI)
- * MathHelper.cos(player.rotationPitch / 180.0F * (float) Math.PI)
- * f);
- entityitem.motionZ = (double) (MathHelper.cos(player.rotationYaw / 180.0F * (float) Math.PI)
- * MathHelper.cos(player.rotationPitch / 180.0F * (float) Math.PI)
- * f);
- entityitem.motionY = (double) (-MathHelper.sin(player.rotationPitch / 180.0F * (float) Math.PI) * f
- + 0.1F);
- f = 0.02F;
- f1 = RANDOM.nextFloat() * (float) Math.PI * 2.0F;
- f *= RANDOM.nextFloat();
- entityitem.motionX += Math.cos((double) f1) * (double) f;
- entityitem.motionY += (double) ((RANDOM.nextFloat() - RANDOM.nextFloat()) * 0.1F);
- entityitem.motionZ += Math.sin((double) f1) * (double) f;
- return entityitem;
- }
- }
- return null;
- }
-
- @Override
- public void addInformation(ItemStack stack, EntityPlayer aPlayer, List list, boolean bool) {
- int size = 0;
- long age = 0;
- long life = 0;
- int expected = 0;
- if (this.descriptionString.length > 0) {
- list.add(EnumChatFormatting.GRAY + this.descriptionString[0]);
- }
- if (NBTUtils.hasKey(stack, "size")) {
- size = NBTUtils.getInteger(stack, "size");
- if (size > 0 && NBTUtils.hasKey(stack, "TickableItem")) {
- NBTTagCompound aNBT = stack.getTagCompound();
- if (aNBT != null) {
- aNBT = aNBT.getCompoundTag("TickableItem");
- if (aNBT != null) {
- age = aNBT.getLong("Tick");
- }
- }
- }
- if (NBTUtils.hasKey(stack, "mEggAge")) {
- life = NBTUtils.getInteger(stack, "mEggAge");
- }
- if (NBTUtils.hasKey(stack, "mExpected")) {
- expected = NBTUtils.getInteger(stack, "mExpected");
- }
- }
- String aSize = size > 0 ? "" + size : "??";
- String aExpected = expected > 0 ? "" + expected : "??";
- String aAge = age > 0 ? "" + (age / 20) : "??";
- String aLife = life > 0 ? "" + (life / 20) : "??";
- list.add("Egg Size: " + aSize + " ounces");
- list.add("Expected Stem Cells: " + aExpected);
- list.add("Age: " + aAge + "s" + " / " + aLife + "s");
- list.add("Larger eggs take longer to hatch,");
- list.add("but have a better chance of hatching.");
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/item/general/ItemSunnariumBit.java b/src/main/java/gtPlusPlus/core/item/general/ItemSunnariumBit.java
deleted file mode 100644
index 3dd1abe58f..0000000000
--- a/src/main/java/gtPlusPlus/core/item/general/ItemSunnariumBit.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package gtPlusPlus.core.item.general;
-
-import static gregtech.api.enums.Mods.GTPlusPlus;
-
-import net.minecraft.item.EnumRarity;
-import net.minecraft.util.EnumChatFormatting;
-
-import gtPlusPlus.core.creative.AddToCreativeTab;
-import gtPlusPlus.core.item.base.CoreItem;
-
-public class ItemSunnariumBit extends CoreItem {
-
- public ItemSunnariumBit() {
- super(
- "SunnariumBit",
- "Sunnarium Bit",
- AddToCreativeTab.tabMisc,
- 64,
- 0,
- new String[] {},
- EnumRarity.uncommon,
- EnumChatFormatting.GOLD,
- false,
- null);
- this.setTextureName(GTPlusPlus.ID + ":" + "itemSunnariumBit");
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/item/general/RF2EU_Battery.java b/src/main/java/gtPlusPlus/core/item/general/RF2EU_Battery.java
deleted file mode 100644
index 671a1ec344..0000000000
--- a/src/main/java/gtPlusPlus/core/item/general/RF2EU_Battery.java
+++ /dev/null
@@ -1,307 +0,0 @@
-package gtPlusPlus.core.item.general;
-
-import static gregtech.api.enums.Mods.GTPlusPlus;
-
-import java.util.List;
-
-import net.minecraft.client.Minecraft;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityLivingBase;
-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.MathHelper;
-import net.minecraft.util.StatCollector;
-import net.minecraft.world.World;
-
-import cofh.api.energy.ItemEnergyContainer;
-import cpw.mods.fml.common.IFuelHandler;
-import cpw.mods.fml.common.registry.GameRegistry;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import gtPlusPlus.core.creative.AddToCreativeTab;
-import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.util.math.MathUtils;
-import gtPlusPlus.core.util.minecraft.ItemUtils;
-import ic2.api.item.ElectricItem;
-import ic2.api.item.IElectricItem;
-import ic2.api.item.IElectricItemManager;
-
-public class RF2EU_Battery extends ItemEnergyContainer implements IElectricItem, IElectricItemManager, IFuelHandler {
-
- public static double rfPerEU = 3.4;
- private final String unlocalizedName = "rfEUBattery";
- private final ItemStack thisStack;
- private static final int maxValueEU = 100000000;
- private static final int maxValueRF = (int) (maxValueEU * rfPerEU);
- protected double chargeEU = 0;
-
- public RF2EU_Battery() {
- super(maxValueRF);
- GameRegistry.registerFuelHandler(this);
- this.setCreativeTab(AddToCreativeTab.tabMachines);
- this.setUnlocalizedName(this.unlocalizedName);
- this.setMaxStackSize(1);
- this.setTextureName(GTPlusPlus.ID + ":" + "itemIngot");
- this.thisStack = ItemUtils.getSimpleStack(this);
- GameRegistry.registerItem(this, this.unlocalizedName);
- }
-
- @Override
- public void onUpdate(final ItemStack itemStack, final World worldObj, final Entity player, final int p_77663_4_,
- final boolean p_77663_5_) {
- this.getEnergyStored(itemStack);
- if (worldObj.isRemote) {
- return;
- }
-
- if (player instanceof EntityPlayer) {
- for (final ItemStack is : ((EntityPlayer) player).inventory.mainInventory) {
- if (is == itemStack) {
- continue;
- }
- if (is != null) {
- if (is.getItem() instanceof IElectricItem) {
- final IElectricItem electricItem = (IElectricItem) is.getItem();
- this.chargeEU = ElectricItem.manager.getCharge(is);
- }
- }
- }
- }
-
- super.onUpdate(itemStack, worldObj, player, p_77663_4_, p_77663_5_);
- }
-
- @Override
- public boolean canProvideEnergy(final ItemStack itemStack) {
- return true;
- }
-
- @Override
- public Item getChargedItem(final ItemStack itemStack) {
- final ItemStack x = itemStack.copy();
- x.setItemDamage(maxValueEU);
- return x.getItem();
- }
-
- @Override
- public Item getEmptyItem(final ItemStack itemStack) {
- final ItemStack x = itemStack.copy();
- x.setItemDamage(0);
- return x.getItem();
- }
-
- @Override
- public double getMaxCharge(final ItemStack itemStack) {
- return maxValueEU;
- }
-
- @Override
- public int getTier(final ItemStack itemStack) {
- return 3;
- }
-
- @Override
- public double getTransferLimit(final ItemStack itemStack) {
- return 8196;
- }
-
- @Override
- public double getDurabilityForDisplay(final ItemStack stack) {
- // return 1.0D - getEnergyStored(stack) / this.capacity;
- return MathUtils.findPercentage(this.getEnergyStored(stack), this.getMaxEnergyStored(stack));
- }
-
- @Override
- @SideOnly(Side.CLIENT)
- public int getColorFromItemStack(final ItemStack par1ItemStack, final int par2) {
- final int i = 30;
-
- final float f13 = (((Minecraft.getSystemTime() % 6000L) / 3000.0F) * CORE.PI * 2.0F);
-
- final float t = 0.9F + (0.1F * MathHelper.cos(f13));
-
- final double v = 1.0D - this.getDurabilityForDisplay(par1ItemStack);
-
- int r = i + (int) (v * (255 - i) * t);
- if (r > 255) {
- r = 255;
- }
- final int g = i + (int) (v * (64 - i) * t);
-
- return (r << 16) | (g << 8) | i;
- }
-
- @Override
- public boolean showDurabilityBar(final ItemStack stack) {
- return false;
- }
-
- @Override
- public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) {
- list.add(StatCollector.translateToLocal("item.rfEUBattery.tooltip.0"));
- list.add(
- StatCollector.translateToLocalFormatted(
- "item.rfEUBattery.tooltip.1",
- this.getTier(this.thisStack),
- (long) this.getCharge(stack)));
- list.add(
- StatCollector.translateToLocalFormatted(
- "item.rfEUBattery.tooltip.2",
- this.getTransferLimit(this.thisStack),
- (this.getBurnTime(stack) / 20)));
- list.add("");
- list.add(StatCollector.translateToLocal("item.rfEUBattery.tooltip.3"));
- list.add(
- StatCollector
- .translateToLocalFormatted("item.rfEUBattery.tooltip.4", this.maxExtract, this.maxReceive));
- list.add(
- StatCollector.translateToLocalFormatted(
- "item.rfEUBattery.tooltip.5",
- this.getEnergyStored(stack),
- this.getMaxEnergyStored(stack),
- MathUtils.findPercentage(this.getEnergyStored(stack), this.getMaxEnergyStored(stack))));
- super.addInformation(stack, aPlayer, list, bool);
- }
-
- @Override
- public ItemStack getContainerItem(final ItemStack itemStack) {
- final ItemStack newItem = itemStack.copy();
- newItem.stackSize = 1;
- this.extractEnergy(newItem, 150000, false);
- return newItem;
- }
-
- @Override
- public boolean hasContainerItem(final ItemStack stack) {
- return true;
- }
-
- @Override
- public int getBurnTime(final ItemStack fuel) {
- if ((fuel == null) || (fuel.getItem() != this)) {
- return 0;
- }
- return this.extractEnergy(fuel, 150000, true) / 50 / 100;
- }
-
- @Override
- public double charge(final ItemStack stack, final double amount, final int tier, final boolean ignoreTransferLimit,
- final boolean simulate) {
- if (stack.stackTagCompound == null) {
- stack.stackTagCompound = new NBTTagCompound();
- }
- int energy = stack.stackTagCompound.getInteger("Energy");
- final int energyReceived = Math.min(this.capacity - energy, Math.min(this.maxReceive, this.maxReceive));
- if (!simulate) {
- energy += energyReceived;
- stack.stackTagCompound.setInteger("Energy", energy);
- ElectricItem.manager.discharge(stack, ElectricItem.manager.getCharge(stack), 3, true, true, false);
- ElectricItem.manager.charge(stack, energy / rfPerEU, 3, true, false);
- }
- return ElectricItem.manager.charge(stack, amount, tier, ignoreTransferLimit, simulate);
- }
-
- @Override
- public double discharge(final ItemStack stack, final double amount, final int tier,
- final boolean ignoreTransferLimit, final boolean externally, final boolean simulate) {
- if ((stack.stackTagCompound == null) || (!stack.stackTagCompound.hasKey("Energy"))) {
- final double euCharge = this.getCharge(ItemUtils.getSimpleStack(this));
- if ((euCharge != 0) && (euCharge >= 1)) {
- return (int) (MathUtils.decimalRoundingToWholes(euCharge * rfPerEU));
- }
- return 0;
- }
- int energy = stack.stackTagCompound.getInteger("Energy");
- final int energyExtracted = Math.min(energy, Math.min(this.maxExtract, this.maxExtract));
- if (!simulate) {
- energy -= energyExtracted;
- stack.stackTagCompound.setInteger("Energy", energy);
- ElectricItem.manager.discharge(stack, ElectricItem.manager.getCharge(stack), 3, true, true, false);
- ElectricItem.manager.charge(stack, energy / rfPerEU, 3, true, false);
- }
-
- return ElectricItem.manager.discharge(stack, amount, tier, ignoreTransferLimit, externally, simulate);
- }
-
- @Override
- public double getCharge(final ItemStack stack) {
- return ElectricItem.manager.getCharge(stack);
- }
-
- @Override
- public boolean canUse(final ItemStack stack, final double amount) {
- return ElectricItem.manager.canUse(stack, amount);
- }
-
- @Override
- public boolean use(final ItemStack stack, final double amount, final EntityLivingBase entity) {
- return ElectricItem.manager.use(stack, amount, entity);
- }
-
- @Override
- public void chargeFromArmor(final ItemStack stack, final EntityLivingBase entity) {
- ElectricItem.manager.chargeFromArmor(stack, entity);
- }
-
- @Override
- public String getToolTip(final ItemStack stack) {
- return ElectricItem.manager.getToolTip(stack);
- }
-
- @Override
- public int receiveEnergy(final ItemStack container, final int maxReceive, final boolean simulate) {
- if ((container.stackTagCompound == null) || (!container.stackTagCompound.hasKey("Energy"))) {
- final double euCharge = this.getCharge(ItemUtils.getSimpleStack(this));
- if ((euCharge != 0) && (euCharge >= 1)) {
- return (int) (MathUtils.decimalRoundingToWholes(euCharge * rfPerEU));
- }
- return 0;
- }
- int energy = container.stackTagCompound.getInteger("Energy");
- final int energyReceived = Math.min(this.capacity - energy, Math.min(this.maxReceive, maxReceive));
- if (!simulate) {
- energy += energyReceived;
- container.stackTagCompound.setInteger("Energy", energy);
- ElectricItem.manager.discharge(container, ElectricItem.manager.getCharge(container), 3, true, true, false);
- ElectricItem.manager.charge(container, energy / rfPerEU, 3, true, false);
- }
- return energyReceived;
- }
-
- @Override
- public int extractEnergy(final ItemStack container, final int maxExtract, final boolean simulate) {
- if ((container.stackTagCompound == null) || (!container.stackTagCompound.hasKey("Energy"))) {
- final double euCharge = this.getCharge(ItemUtils.getSimpleStack(this));
- if ((euCharge != 0) && (euCharge >= 1)) {
- return (int) (MathUtils.decimalRoundingToWholes(euCharge * rfPerEU));
- }
- return 0;
- }
- int energy = container.stackTagCompound.getInteger("Energy");
- final int energyExtracted = Math.min(energy, Math.min(this.maxExtract, maxExtract));
- if (!simulate) {
- energy -= energyExtracted;
- container.stackTagCompound.setInteger("Energy", energy);
- ElectricItem.manager.discharge(container, ElectricItem.manager.getCharge(container), 3, true, true, false);
- ElectricItem.manager.charge(container, energy / rfPerEU, 3, true, false);
- }
- return energyExtracted;
- }
-
- @Override
- public int getEnergyStored(final ItemStack container) {
- if ((container.stackTagCompound == null) || (!container.stackTagCompound.hasKey("Energy"))) {
- final double euCharge = this.getCharge(ItemUtils.getSimpleStack(this));
- if ((euCharge != 0) && (euCharge >= 1)) {
- return (int) (MathUtils.decimalRoundingToWholes(euCharge * rfPerEU));
- }
- return 0;
- }
- final int energy = container.stackTagCompound.getInteger("Energy");
- ElectricItem.manager.discharge(container, ElectricItem.manager.getCharge(container), 3, true, true, false);
- ElectricItem.manager.charge(container, energy / rfPerEU, 3, true, false);
- return energy;
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/item/general/capture/ItemEntityCatcher.java b/src/main/java/gtPlusPlus/core/item/general/capture/ItemEntityCatcher.java
deleted file mode 100644
index 38e34a9a01..0000000000
--- a/src/main/java/gtPlusPlus/core/item/general/capture/ItemEntityCatcher.java
+++ /dev/null
@@ -1,250 +0,0 @@
-package gtPlusPlus.core.item.general.capture;
-
-import static gregtech.api.enums.Mods.GTPlusPlus;
-
-import java.util.List;
-import java.util.UUID;
-
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityList;
-import net.minecraft.entity.EntityLiving;
-import net.minecraft.entity.EntityLivingBase;
-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.StatCollector;
-import net.minecraft.world.World;
-
-import cpw.mods.fml.common.registry.GameRegistry;
-import gtPlusPlus.api.interfaces.IEntityCatcher;
-import gtPlusPlus.api.objects.Logger;
-import gtPlusPlus.api.objects.minecraft.BlockPos;
-import gtPlusPlus.core.creative.AddToCreativeTab;
-import gtPlusPlus.core.util.Utils;
-import gtPlusPlus.core.util.minecraft.NBTUtils;
-import gtPlusPlus.core.util.minecraft.PlayerUtils;
-import gtPlusPlus.core.util.reflect.ReflectionUtils;
-
-public class ItemEntityCatcher extends Item implements IEntityCatcher {
-
- // PlayerInteractEvent.EntityInteract;
-
- public ItemEntityCatcher() {
- // Probably won't ever need this event handler.
- // Utils.registerEvent(this);
- this.setUnlocalizedName("itemDragonJar");
- this.setTextureName(GTPlusPlus.ID + ":" + getUnlocalizedName());
- this.setCreativeTab(AddToCreativeTab.tabMisc);
- this.setMaxStackSize(16);
- this.setMaxDamage(0);
- GameRegistry.registerItem(this, getUnlocalizedName());
- }
-
- @Override
- public boolean hasEntity(ItemStack aStack) {
- if (NBTUtils.hasKey(aStack, "mHasEntity")) {
- return NBTUtils.getBoolean(aStack, "mHasEntity");
- }
- return false;
- }
-
- @Override
- public Entity getStoredEntity(World aWorld, ItemStack aStack) {
- if (aStack == null || !hasEntity(aStack)) {
- Logger.INFO("Cannot get stored entity.");
- return null;
- }
-
- Entity mEntityToSpawn;
- int mEntityID;
- Logger.WARNING("getStoredEntity(1)");
-
- mEntityID = NBTUtils.getInteger(aStack, "mEntityID");
- mEntityToSpawn = EntityList.createEntityByID(mEntityID, aWorld);
- if (mEntityToSpawn != null) {
- Logger.WARNING("getStoredEntity(2)");
- return mEntityToSpawn;
- }
-
- Logger.INFO("Failed to get stored entity. - getStoredEntity()");
- return null;
- }
-
- @Override
- public boolean setStoredEntity(World aWorld, ItemStack aStack, Entity aEntity) {
- if (aEntity == null) {
- NBTUtils.setBoolean(aStack, "mHasEntity", false);
- Logger.INFO("Bad Entity being stored.");
- return false;
- }
-
- Logger.WARNING("setStoredEntity(1)");
-
- NBTTagCompound mEntityData;
- Class<? extends Entity> mEntityClass;
- String mClassName;
- String mEntityName;
- int mEntityID, mEntityHashcode;
- UUID mUuidPersistent, mUuidUnique;
- Logger.WARNING("setStoredEntity(2)");
-
- mEntityData = aEntity.getEntityData();
- mEntityClass = aEntity.getClass();
- mClassName = mEntityClass.getName();
- mEntityName = aEntity.getCommandSenderName();
- // mEntityID = aEntity.getEntityId();
- mEntityID = EntityList.getEntityID(aEntity);
- mEntityHashcode = aEntity.hashCode();
- mUuidPersistent = aEntity.getPersistentID();
- mUuidUnique = aEntity.getUniqueID();
- Logger.WARNING("setStoredEntity(3)");
-
- NBTUtils.createTagCompound(aStack, "mEntityData", mEntityData);
- NBTUtils.setString(aStack, "mEntityName", mEntityName);
- NBTUtils.setInteger(aStack, "mEntityID", mEntityID);
- NBTUtils.setString(aStack, "mClassName", mClassName);
- NBTUtils.setString(aStack, "mUuidPersistent", mUuidPersistent.toString());
- NBTUtils.setString(aStack, "mUuidUnique", mUuidUnique.toString());
- NBTUtils.setInteger(aStack, "mEntityHashcode", mEntityHashcode);
- NBTUtils.setBoolean(aStack, "mHasEntity", true);
- Logger.WARNING("setStoredEntity(4)");
- return true;
- }
-
- @SuppressWarnings("unchecked")
- @Override
- public Class<? extends Entity> getStoredEntityClass(ItemStack aStack) {
- if (aStack == null || !hasEntity(aStack)) {
- return null;
- }
- Class<? extends Entity> mEntityClass;
- String mClassName;
- mClassName = NBTUtils.getString(aStack, "mClassName");
- mEntityClass = (Class<? extends Entity>) ReflectionUtils.getClass(mClassName);
- if (mEntityClass != null) {
- return mEntityClass;
- }
- return null;
- }
-
- @Override
- public boolean spawnStoredEntity(World aWorld, ItemStack aStack, BlockPos aPos) {
- if (aStack == null || !hasEntity(aStack)) {
- Logger.INFO("Cannot release, either invalid Itemstack or no entity stored.");
- return false;
- }
-
- NBTTagCompound mEntityData = NBTUtils.getTagCompound(aStack, "mEntityData");
-
- int mEntityID = NBTUtils.getInteger(aStack, "mEntityID");
- String mClassName = NBTUtils.getString(aStack, "mClassName");
- UUID mUuidPersistent = UUID.fromString(NBTUtils.getString(aStack, "mUuidPersistent"));
- UUID mUuidUnique = UUID.fromString(NBTUtils.getString(aStack, "mUuidUnique"));
- int mEntityHashcode = NBTUtils.getInteger(aStack, "mEntityHashcode");
-
- EntityLiving mEntityToSpawn = (EntityLiving) getStoredEntity(aWorld, aStack);
- Class<? extends Entity> mEntityClass = getStoredEntityClass(aStack);
-
- Logger.WARNING("spawnStoredEntity(1)");
-
- if (mEntityToSpawn != null && mEntityClass != null) {
- Logger.WARNING("spawnStoredEntity(2)");
- if (mEntityToSpawn.getEntityData() != mEntityData) {
- Logger.WARNING("spawnStoredEntity(x)");
- NBTUtils.setEntityCustomData(mEntityToSpawn, mEntityData);
- }
-
- mEntityToSpawn
- .setLocationAndAngles(aPos.xPos, aPos.yPos, aPos.zPos, aWorld.rand.nextFloat() * 360.0F, 0.0F);
- if (mEntityToSpawn != null) {
- mEntityToSpawn.onSpawnWithEgg(null);
- aWorld.spawnEntityInWorld(mEntityToSpawn);
- Logger.WARNING("spawnStoredEntity(3)");
- }
- if (mEntityToSpawn != null) {
- mEntityToSpawn.playLivingSound();
- Logger.WARNING("spawnStoredEntity(4)");
- }
- Logger.WARNING("spawnStoredEntity(5)");
- NBTUtils.setBoolean(aStack, "mHasEntity", false);
- return true;
- }
- Logger.INFO("Failed to spawn stored entity. - spawnStoredEntity()");
- return false;
- }
-
- @Override
- public ItemStack onItemRightClick(ItemStack aStack, World aWorld, EntityPlayer aPlayer) {
- return super.onItemRightClick(aStack, aWorld, aPlayer);
- }
-
- @Override
- public void addInformation(ItemStack p_77624_1_, EntityPlayer p_77624_2_, List p_77624_3_, boolean p_77624_4_) {
- if (hasEntity(p_77624_1_)) {
- String mName = NBTUtils.getString(p_77624_1_, "mEntityName");
- if (mName != null && !mName.equals("")) {
- p_77624_3_.add(
- EnumChatFormatting.GRAY
- + StatCollector.translateToLocalFormatted("item.itemDragonJar.1.tooltip", mName));
- }
- } else {
- p_77624_3_.add(EnumChatFormatting.GRAY + StatCollector.translateToLocal("item.itemDragonJar.0.tooltip"));
- }
- }
-
- @Override
- public boolean showDurabilityBar(ItemStack stack) {
- return false;
- }
-
- @Override
- public boolean onItemUse(ItemStack itemstack, EntityPlayer player, World world, int x, int y, int z, int side,
- float xOffset, float yOffset, float zOffset) {
- if (Utils.isServer()) {
- Logger.WARNING("Trying to release (1)");
- if (NBTUtils.hasKey(itemstack, "mHasEntity") && NBTUtils.getBoolean(itemstack, "mHasEntity")) {
- Logger.WARNING("Trying to release (2)");
- boolean mDidSpawn = spawnStoredEntity(world, itemstack, new BlockPos(x, y + 1, z, world));
-
- if (!mDidSpawn) {
- PlayerUtils.messagePlayer(
- player,
- "You failed to release a " + NBTUtils.getString(itemstack, "mEntityName") + ".");
- }
-
- return mDidSpawn;
- }
- }
- return super.onItemUse(itemstack, player, world, x, y, z, side, xOffset, yOffset, zOffset);
- }
-
- @Override
- public boolean itemInteractionForEntity(ItemStack aStack, EntityPlayer aPlayer, EntityLivingBase aEntity) {
- if (Utils.isServer()) {
- Logger.WARNING("Trying to catch (1)");
- if (!hasEntity(aStack)) {
- Logger.WARNING("Trying to catch (2)");
- boolean mStored = setStoredEntity(aPlayer.worldObj, aStack, aEntity);
- if (mStored) {
- Logger.WARNING("Trying to catch (3)");
- aEntity.setDead();
- PlayerUtils.messagePlayer(
- aPlayer,
- "You have captured a " + NBTUtils.getString(aStack, "mEntityName") + " in the Jar.");
- // NBTUtils.tryIterateNBTData(aStack);
- }
- }
- }
- return super.itemInteractionForEntity(aStack, aPlayer, aEntity);
- }
-
- @Override
- public String getItemStackDisplayName(ItemStack aStack) {
- if (hasEntity(aStack)) {
- return StatCollector.translateToLocal("item.itemDragonJar.1.name");
- }
- return StatCollector.translateToLocal("item.itemDragonJar.0.name");
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/item/general/throwables/ItemThrowableBomb.java b/src/main/java/gtPlusPlus/core/item/general/throwables/ItemThrowableBomb.java
index 475707e950..31d69044cc 100644
--- a/src/main/java/gtPlusPlus/core/item/general/throwables/ItemThrowableBomb.java
+++ b/src/main/java/gtPlusPlus/core/item/general/throwables/ItemThrowableBomb.java
@@ -20,7 +20,6 @@ import gregtech.api.util.GT_Utility;
import gtPlusPlus.api.objects.data.AutoMap;
import gtPlusPlus.core.creative.AddToCreativeTab;
import gtPlusPlus.core.entity.projectile.EntityThrowableBomb;
-import gtPlusPlus.core.item.ModItems;
import gtPlusPlus.core.item.base.CoreItem;
import gtPlusPlus.core.util.minecraft.ItemUtils;
import gtPlusPlus.xmod.gregtech.common.items.MetaGeneratedGregtechTools;
@@ -54,7 +53,6 @@ public class ItemThrowableBomb extends CoreItem {
mLighters.put(ItemList.Tool_Lighter_Invar_Used.get(1));
mLighters.put(ItemList.Tool_Lighter_Platinum_Full.get(1));
mLighters.put(ItemList.Tool_Lighter_Platinum_Used.get(1));
- mLighters.put(ItemUtils.getSimpleStack(ModItems.itemBasicFireMaker));
}
// Unlit
diff --git a/src/main/java/gtPlusPlus/core/item/init/ItemsFoods.java b/src/main/java/gtPlusPlus/core/item/init/ItemsFoods.java
index aa44b467ce..acddd58a7b 100644
--- a/src/main/java/gtPlusPlus/core/item/init/ItemsFoods.java
+++ b/src/main/java/gtPlusPlus/core/item/init/ItemsFoods.java
@@ -1,20 +1,13 @@
package gtPlusPlus.core.item.init;
-import static gregtech.api.enums.Mods.GTPlusPlus;
-
import net.minecraft.entity.monster.EntityBlaze;
import net.minecraft.entity.passive.EntityHorse;
import net.minecraft.entity.passive.EntityOcelot;
import net.minecraft.entity.passive.EntityVillager;
import net.minecraft.entity.passive.EntityWolf;
import net.minecraft.item.ItemStack;
-import net.minecraft.potion.Potion;
-import net.minecraft.potion.PotionEffect;
-import gregtech.api.util.GT_OreDictUnificator;
import gtPlusPlus.core.item.ModItems;
-import gtPlusPlus.core.item.base.foods.BaseItemFood;
-import gtPlusPlus.core.item.base.foods.BaseItemHotFood;
import gtPlusPlus.core.item.food.BaseItemMetaFood;
import gtPlusPlus.core.util.minecraft.EntityUtils;
import gtPlusPlus.core.util.minecraft.ItemUtils;
@@ -28,69 +21,6 @@ public class ItemsFoods {
private static void run() {
- // Raisin Bread
- ModItems.itemIngotRaisinBread = new BaseItemFood(
- "itemIngotRaisinBread",
- "Raisin Bread",
- 3,
- 1.5f,
- false,
- new PotionEffect(Potion.weakness.id, 40, 1)).setAlwaysEdible();
- GT_OreDictUnificator.registerOre(
- "foodRaisinBread",
- ItemUtils.getItemStackFromFQRN(GTPlusPlus.ID + ":itemIngotRaisinBread", 1));
- // Hot Raisin Bread
- ModItems.itemHotIngotRaisinBread = new BaseItemHotFood(
- "itemHotIngotRaisinBread",
- 1,
- 0.5f,
- "Raisin Bread",
- 120,
- ModItems.itemIngotRaisinBread);
- GT_OreDictUnificator.registerOre(
- "foodHotRaisinBread",
- ItemUtils.getItemStackFromFQRN(GTPlusPlus.ID + ":itemHotIngotRaisinBread", 1));
-
- // Raisin Bread
- ModItems.itemFoodRaisinToast = new BaseItemFood("itemFoodRaisinToast", "Raisin Toast", 1, 0.5f, false)
- .setAlwaysEdible();
- GT_OreDictUnificator.registerOre(
- "foodRaisinToast",
- ItemUtils.getItemStackFromFQRN(GTPlusPlus.ID + ":itemFoodRaisinToast", 1));
- // Hot Raisin Bread
- ModItems.itemHotFoodRaisinToast = new BaseItemHotFood(
- "itemHotFoodRaisinToast",
- 1,
- 0.5f,
- "Raisin Toast",
- 20,
- ModItems.itemFoodRaisinToast);
- GT_OreDictUnificator.registerOre(
- "foodHotRaisinToast",
- ItemUtils.getItemStackFromFQRN(GTPlusPlus.ID + ":itemHotFoodRaisinToast", 1));
-
- // Raisin Bread
- ModItems.itemFoodCurriedSausages = new BaseItemFood(
- "itemFoodCurriedSausages",
- "Curried Sausages",
- 5,
- 2f,
- false);
- GT_OreDictUnificator.registerOre(
- "foodCurriedSausages",
- ItemUtils.getItemStackFromFQRN(GTPlusPlus.ID + ":itemFoodCurriedSausages", 1));
- // Hot Raisin Bread
- ModItems.itemHotFoodCurriedSausages = new BaseItemHotFood(
- "itemHotFoodCurriedSausages",
- 1,
- 0.5f,
- "Curried Sausages",
- 240,
- ModItems.itemFoodCurriedSausages);
- GT_OreDictUnificator.registerOre(
- "foodHotCurriedSausages",
- ItemUtils.getItemStackFromFQRN(GTPlusPlus.ID + ":itemHotFoodCurriedSausages", 1));
-
ModItems.itemMetaFood = new BaseItemMetaFood();
BaseItemMetaFood.registerFoodsToOreDict();
addCookingRecipes();
diff --git a/src/main/java/gtPlusPlus/core/item/tool/misc/GregtechPump.java b/src/main/java/gtPlusPlus/core/item/tool/misc/GregtechPump.java
index a614a2b737..2c550962c9 100644
--- a/src/main/java/gtPlusPlus/core/item/tool/misc/GregtechPump.java
+++ b/src/main/java/gtPlusPlus/core/item/tool/misc/GregtechPump.java
@@ -2,6 +2,7 @@ package gtPlusPlus.core.item.tool.misc;
import static gregtech.api.enums.GT_Values.V;
import static gregtech.api.enums.Mods.GTPlusPlus;
+import static gregtech.api.util.GT_Utility.formatNumbers;
import java.util.ArrayList;
import java.util.BitSet;
@@ -202,7 +203,7 @@ public class GregtechPump extends Item implements ISpecialElectricItem, IElectri
EnumChatFormatting.BLUE + (f != null ? "" + f.amount : "" + 0)
+ "L"
+ " / "
- + getCapacity(aStack)
+ + formatNumbers(getCapacity(aStack))
+ "L");
}
@@ -212,7 +213,7 @@ public class GregtechPump extends Item implements ISpecialElectricItem, IElectri
aList.add(
EnumChatFormatting.AQUA + StatCollector.translateToLocalFormatted(
"item.itemBaseEuItem.tooltip.1",
- GT_Utility.formatNumbers(tStats[3]),
+ formatNumbers(tStats[3]),
(tStats[2] >= 0 ? tStats[2] : 0)) + EnumChatFormatting.GRAY);
} else {
final long tCharge = this.getRealCharge(aStack);
@@ -224,8 +225,8 @@ public class GregtechPump extends Item implements ISpecialElectricItem, IElectri
aList.add(
EnumChatFormatting.AQUA + StatCollector.translateToLocalFormatted(
"item.itemBaseEuItem.tooltip.3",
- GT_Utility.formatNumbers(tCharge),
- GT_Utility.formatNumbers(Math.abs(tStats[0])) + " EU - Voltage: ",
+ formatNumbers(tCharge),
+ formatNumbers(Math.abs(tStats[0])) + " EU - Voltage: ",
V[(int) (tStats[2] >= 0 ? tStats[2] < V.length ? tStats[2] : V.length - 1 : 1)])
+ EnumChatFormatting.GRAY);
}
diff --git a/src/main/java/gtPlusPlus/core/item/tool/misc/SandstoneHammer.java b/src/main/java/gtPlusPlus/core/item/tool/misc/SandstoneHammer.java
deleted file mode 100644
index dbaee70bd0..0000000000
--- a/src/main/java/gtPlusPlus/core/item/tool/misc/SandstoneHammer.java
+++ /dev/null
@@ -1,75 +0,0 @@
-package gtPlusPlus.core.item.tool.misc;
-
-import static gregtech.api.enums.Mods.GTPlusPlus;
-
-import java.util.List;
-
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.EnumRarity;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.EnumChatFormatting;
-
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import gtPlusPlus.core.item.base.BaseItemWithDamageValue;
-
-public class SandstoneHammer extends BaseItemWithDamageValue {
-
- /*
- * (non-Javadoc)
- * @see net.minecraft.item.Item#getColorFromItemStack(net.minecraft.item.ItemStack, int)
- */
- @Override
- public int getColorFromItemStack(final ItemStack stack, final int HEX_OxFFFFFF) {
- // Figure Out Damage
-
- return super.getColorFromItemStack(stack, HEX_OxFFFFFF);
- }
-
- public SandstoneHammer(final String unlocalizedName) {
- super(unlocalizedName);
- this.setTextureName(GTPlusPlus.ID + ":" + unlocalizedName);
- this.setMaxStackSize(1);
- this.setMaxDamage(2500);
- }
-
- @SuppressWarnings({ "unchecked", "rawtypes" })
- @Override
- public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) {
- list.add(EnumChatFormatting.GRAY + "Allows you to craft sand from cobble, or sandstone from sand.");
- super.addInformation(stack, aPlayer, list, bool);
- }
-
- @Override
- public boolean doesContainerItemLeaveCraftingGrid(final ItemStack itemStack) {
- return false;
- }
-
- @Override
- public boolean getShareTag() {
- return true;
- }
-
- @Override
- public boolean hasContainerItem(final ItemStack itemStack) {
- return true;
- }
-
- @Override
- public ItemStack getContainerItem(final ItemStack itemStack) {
- itemStack.setItemDamage(itemStack.getItemDamage() + 8);
-
- return itemStack;
- }
-
- @Override
- @SideOnly(Side.CLIENT)
- public EnumRarity getRarity(final ItemStack par1ItemStack) {
- return EnumRarity.uncommon;
- }
-
- @Override
- public boolean hasEffect(final ItemStack par1ItemStack, final int pass) {
- return false;
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/item/tool/misc/box/AutoLunchBox.java b/src/main/java/gtPlusPlus/core/item/tool/misc/box/AutoLunchBox.java
deleted file mode 100644
index 492adc4e07..0000000000
--- a/src/main/java/gtPlusPlus/core/item/tool/misc/box/AutoLunchBox.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package gtPlusPlus.core.item.tool.misc.box;
-
-public class AutoLunchBox extends BaseBoxItem {
-
- public static final int SLOTS = 9;
-
- public AutoLunchBox(String displayName) {
- super(
- displayName,
- new String[] { "Stores 9 pieces of food",
- "Food will automatically be eaten from slot 1, through to "
- + gtPlusPlus.core.item.tool.misc.box.AutoLunchBox.SLOTS },
- gtPlusPlus.core.item.tool.misc.box.AutoLunchBox.SLOTS);
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/item/tool/misc/box/MagicToolBag.java b/src/main/java/gtPlusPlus/core/item/tool/misc/box/MagicToolBag.java
deleted file mode 100644
index e121bb5085..0000000000
--- a/src/main/java/gtPlusPlus/core/item/tool/misc/box/MagicToolBag.java
+++ /dev/null
@@ -1,14 +0,0 @@
-package gtPlusPlus.core.item.tool.misc.box;
-
-public class MagicToolBag extends BaseBoxItem {
-
- public static final int SLOTS = 24;
-
- public MagicToolBag(String displayName) {
- super(
- displayName,
- new String[] { "Can store magic tools from TC, BM, etc",
- "Please ask for additional mod support on Github" },
- gtPlusPlus.core.item.tool.misc.box.MagicToolBag.SLOTS);
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/item/tool/misc/box/UniversalToolBox.java b/src/main/java/gtPlusPlus/core/item/tool/misc/box/UniversalToolBox.java
deleted file mode 100644
index b39609fb02..0000000000
--- a/src/main/java/gtPlusPlus/core/item/tool/misc/box/UniversalToolBox.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package gtPlusPlus.core.item.tool.misc.box;
-
-import gtPlusPlus.core.handler.GuiHandler;
-
-public class UniversalToolBox extends BaseBoxItem {
-
- public static final int SLOTS = 16;
-
- public UniversalToolBox(String displayName) {
- super(
- displayName,
- new String[] { "Can store tools from Gregtech, IC2, BC, Forestry",
- "Please ask for additional mod support on Github" },
- GuiHandler.GUI10);
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/item/tool/staballoy/MultiPickaxeBase.java b/src/main/java/gtPlusPlus/core/item/tool/staballoy/MultiPickaxeBase.java
deleted file mode 100644
index d4caadc7f7..0000000000
--- a/src/main/java/gtPlusPlus/core/item/tool/staballoy/MultiPickaxeBase.java
+++ /dev/null
@@ -1,287 +0,0 @@
-package gtPlusPlus.core.item.tool.staballoy;
-
-import static gregtech.api.enums.Mods.GTPlusPlus;
-import static gregtech.api.enums.Mods.Minecraft;
-
-import java.util.List;
-
-import net.minecraft.block.Block;
-import net.minecraft.creativetab.CreativeTabs;
-import net.minecraft.enchantment.Enchantment;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.EnumRarity;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.world.World;
-
-import cpw.mods.fml.common.registry.GameRegistry;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import gtPlusPlus.api.objects.Logger;
-import gtPlusPlus.api.objects.data.Pair;
-import gtPlusPlus.core.creative.AddToCreativeTab;
-import gtPlusPlus.core.util.Utils;
-import gtPlusPlus.core.util.math.MathUtils;
-import gtPlusPlus.core.util.minecraft.ItemUtils;
-import gtPlusPlus.core.util.minecraft.RecipeUtils;
-
-public class MultiPickaxeBase extends StaballoyPickaxe {
-
- /*
- * (non-Javadoc)
- * @see net.minecraft.item.Item#getDurabilityForDisplay(net.minecraft.item.ItemStack)
- */
- @Override
- public double getDurabilityForDisplay(final ItemStack stack) {
- if (super.getDurabilityForDisplay(stack) > 0) {
- return super.getDurabilityForDisplay(stack);
- }
- return 0;
- }
-
- protected boolean canBreak = true;
- protected final int colour;
- protected final String materialName;
- protected final String displayName;
- public boolean isValid = true;
- private final Pair<?, ?> enchantment;
-
- public MultiPickaxeBase(final String unlocalizedName, final ToolMaterial material, final long materialDurability,
- final int colour, final Object enchant) {
- super(Utils.sanitizeString(unlocalizedName), material);
- this.setUnlocalizedName(Utils.sanitizeString(unlocalizedName));
- // this.setTextureName(GTPlusPlus.ID + ":" + "itemPickaxe");
- this.setTextureName(Minecraft.ID + ":" + "iron_pickaxe");
- this.setMaxStackSize(1);
- if ((materialDurability * 3) <= Integer.MAX_VALUE) {
- this.setMaxDamage((int) (materialDurability * 3));
- } else {
- this.setMaxDamage(Integer.MAX_VALUE);
- this.canBreak = false;
- }
- this.colour = colour;
- this.materialName = material.name();
- this.displayName = unlocalizedName;
- this.setCreativeTab(AddToCreativeTab.tabTools);
- this.miningLevel = material.getHarvestLevel();
-
- if (enchant != null) {
- if (enchant instanceof Pair) {
- this.enchantment = (Pair<?, ?>) enchant;
- } else {
- this.enchantment = null;
- }
- } else {
- this.enchantment = null;
- }
-
- try {
- this.isValid = this.addRecipe();
- } catch (final Throwable e) {}
- if ((colour != 0) && this.isValid && (materialDurability > 10000)) {
- if (GameRegistry.findItem(GTPlusPlus.ID, Utils.sanitizeString(unlocalizedName)) == null) {
- GameRegistry.registerItem(this, Utils.sanitizeString(unlocalizedName));
- }
- }
- }
-
- /*
- * Methods
- */
-
- private boolean addRecipe() {
-
- final String cleanName = Utils.sanitizeString(this.materialName);
-
- final String plateDense = "plateDense" + cleanName;
- final String plateDouble = "plateDouble" + cleanName;
- final String rodLong = "stickLong" + cleanName;
- final String toolHammer = "craftingToolHardHammer";
- final String toolWrench = "craftingToolWrench";
- final String toolFile = "craftingToolFile";
- final String toolScrewDriver = "craftingToolScrewdriver";
-
- if (null == ItemUtils.getItemStackOfAmountFromOreDictNoBroken(rodLong, 1)) {
- Logger.WARNING("stickLong of " + cleanName + " does not exist.");
- return false;
- }
- if (null == ItemUtils.getItemStackOfAmountFromOreDictNoBroken(plateDense, 1)) {
- Logger.WARNING("plateDense of " + cleanName + " does not exist.");
- if (null != ItemUtils.getItemStackOfAmountFromOreDictNoBroken(plateDouble, 1)) {
- Logger.WARNING("plateDouble of " + cleanName + " does exist. Using it instead.");
- RecipeUtils.recipeBuilder(
- plateDouble,
- plateDouble,
- plateDouble,
- toolFile,
- rodLong,
- toolHammer,
- toolWrench,
- rodLong,
- toolScrewDriver,
- ItemUtils.getSimpleStack(this));
-
- return true;
- }
- Logger.WARNING("plateDouble of " + cleanName + " does not exist.");
- return false;
- }
-
- RecipeUtils.recipeBuilder(
- plateDense,
- plateDense,
- plateDense,
- toolFile,
- rodLong,
- toolHammer,
- toolWrench,
- rodLong,
- toolScrewDriver,
- ItemUtils.getSimpleStack(this));
-
- return true;
- }
-
- public final String getMaterialName() {
- return this.materialName;
- }
-
- @Override
- public String getItemStackDisplayName(final ItemStack iStack) {
- return this.displayName;
- }
-
- @Override
- public int getColorFromItemStack(final ItemStack stack, final int HEX_OxFFFFFF) {
- if (this.colour == 0) {
- return MathUtils.generateSingularRandomHexValue();
- }
- return this.colour;
- }
-
- private float calculateDurabilityLoss(final World world, final int X, final int Y, final int Z) {
- float bDurabilityLoss = 0;
- Boolean correctTool = false;
- float bHardness = 0;
- if (!world.isRemote) {
- try {
- final Block removalist = world.getBlock(X, Y, Z);
- // Utils.LOG_WARNING(removalist.toString());
-
- bHardness = removalist.getBlockHardness(world, X, Y, Z) * 100;
- Logger.INFO("Hardness: " + bHardness);
-
- bDurabilityLoss = 100;
- // Utils.LOG_WARNING("Durability Loss: "+bDurabilityLoss);
-
- correctTool = this.canPickaxeBlock(removalist, world, new int[] { X, Y, Z });
- Logger.WARNING("" + correctTool);
-
- if (!correctTool) {
- return 0;
- }
-
- } catch (final NullPointerException e) {
-
- }
- }
- return bDurabilityLoss;
- }
-
- // Should clear up blocks quicker if I chain it.
- /*
- * @Override public void removeBlockAndDropAsItem(World world, int X, int Y, int Z, ItemStack heldItem){ localWorld
- * = world; try { Block block = world.getBlock(X, Y, Z); float dur = calculateDurabilityLoss(world, X, Y, Z);
- * Utils.LOG_WARNING(block.toString()); String removalTool = ""; removalTool = block.getHarvestTool(1); if
- * (removalTool.equals("pickaxe") || UtilsMining.getBlockType(block, world, new int[]{X,Y,Z}, miningLevel)){ if
- * (canPickaxeBlock(block, world, new int[]{X,Y,Z})){ if((block != Blocks.bedrock) && (block.getBlockHardness(world,
- * X, Y, Z) != -1) && (block.getBlockHardness(world, X, Y, Z) <= 100) && (block != Blocks.water) && (block !=
- * Blocks.lava)){ if (heldItem.getItemDamage() <= (heldItem.getMaxDamage()-dur)){ block.dropBlockAsItem(world, X, Y,
- * Z, world.getBlockMetadata(X, Y, Z), 0); world.setBlockToAir(X, Y, Z); } else { return; } } } else {
- * Utils.LOG_WARNING("Incorrect Tool for mining this block."); } } } catch (NullPointerException e){ } }
- */
-
- @Override
- public void damageItem(final ItemStack item, final int damage, final EntityPlayer localPlayer) {
- if (this.canBreak) {
- item.damageItem(damage, localPlayer);
- }
- }
-
- @Override
- public void setItemDamage(final ItemStack item, final int damage) {
- if (this.canBreak) {
- item.setItemDamage(damage - 1);
- }
- }
-
- @Override
- @SideOnly(Side.CLIENT)
- public EnumRarity getRarity(final ItemStack par1ItemStack) {
- return EnumRarity.uncommon;
- }
-
- @Override
- public boolean hasEffect(final ItemStack par1ItemStack, final int pass) {
- return false;
- }
-
- @Override
- public void onCreated(final ItemStack mThisItem, final World mWorld, final EntityPlayer mPlayer) {
- Enchantment enchant = null;
- int enchantmentLevel = 0;
- final Pair<?, ?> Y = this.enchantment;
- if (Y != null) {
- if (Y.getKey() != null) {
- enchant = (Enchantment) this.enchantment.getKey();
- }
- if (Y.getValue() != null) {
- enchantmentLevel = ((Integer) this.enchantment.getValue()).intValue();
- }
- }
- final ItemStack itemToEnchant = mThisItem;
- if ((enchant != null) && (enchantmentLevel != 0) && (enchantmentLevel >= 1)) {
- itemToEnchant.addEnchantment(enchant, enchantmentLevel);
- }
- super.onCreated(itemToEnchant, mWorld, mPlayer);
- }
-
- @Override
- public void getSubItems(final Item mItem, final CreativeTabs mCreativeTab, final List mList) {
- Enchantment enchant = null;
- int enchantmentLevel = 0;
- final Pair<?, ?> Y = this.enchantment;
- if (Y != null) {
- if (Y.getKey() != null) {
- enchant = (Enchantment) this.enchantment.getKey();
- }
- if (Y.getValue() != null) {
- enchantmentLevel = ((Integer) this.enchantment.getValue()).intValue();
- }
- }
-
- final Item thisItem = mItem;
- final ItemStack itemToEnchant = ItemUtils.getSimpleStack(thisItem);
- if ((enchant != null) && (enchantmentLevel != 0) && (enchantmentLevel >= 1)) {
- itemToEnchant.addEnchantment(enchant, enchantmentLevel);
- mList.add(itemToEnchant);
- } else {
- mList.add(new ItemStack(thisItem, 1, 0));
- }
- }
-
- /**
- *
- * Time to Override Minecraft stupid mechanics, allowing unbreakable stuff.
- *
- */
- @Override
- public boolean isDamageable() {
- if (this.getMaxDamage() > 0 && !this.hasSubtypes) {
- if (this.canBreak) {
- return true;
- }
- }
- return false;
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/item/tool/staballoy/StaballoyAxe.java b/src/main/java/gtPlusPlus/core/item/tool/staballoy/StaballoyAxe.java
deleted file mode 100644
index 660ec408c1..0000000000
--- a/src/main/java/gtPlusPlus/core/item/tool/staballoy/StaballoyAxe.java
+++ /dev/null
@@ -1,372 +0,0 @@
-package gtPlusPlus.core.item.tool.staballoy;
-
-import static gregtech.api.enums.Mods.GTPlusPlus;
-
-import java.util.List;
-
-import net.minecraft.block.Block;
-import net.minecraft.block.BlockAir;
-import net.minecraft.block.BlockCocoa;
-import net.minecraft.block.BlockDirt;
-import net.minecraft.block.BlockDoublePlant;
-import net.minecraft.block.BlockFlower;
-import net.minecraft.block.BlockGrass;
-import net.minecraft.block.BlockHugeMushroom;
-import net.minecraft.block.BlockLeavesBase;
-import net.minecraft.block.BlockLog;
-import net.minecraft.block.BlockMushroom;
-import net.minecraft.block.BlockSand;
-import net.minecraft.block.BlockSnow;
-import net.minecraft.block.BlockSnowBlock;
-import net.minecraft.block.BlockTallGrass;
-import net.minecraft.block.BlockVine;
-import net.minecraft.enchantment.EnchantmentHelper;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.entity.item.EntityItem;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.EnumRarity;
-import net.minecraft.item.ItemAxe;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.world.World;
-
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-
-public class StaballoyAxe extends ItemAxe {
-
- public String mat;
-
- public StaballoyAxe(final String unlocalizedName, final ToolMaterial material) {
- super(material);
- this.setUnlocalizedName(unlocalizedName);
- this.setTextureName(GTPlusPlus.ID + ":" + unlocalizedName);
- }
-
- // EXPLODE TREE
- byte[] tre = new byte[32000];
- byte unchecked = 0;
- byte needcheck = 1;
- byte ignore = 2;
- byte harvest = 3;
-
- private boolean setcheck(final int x, final int y, final int z) {
- if ((x < 0) || (x > 19) || (z < 0) || (z > 19) || (y < 0) || (y > 79)) {
- return false;
- }
- final int o = x + (z * 20) + (y * 400);
- if (this.tre[o] == this.unchecked) {
- this.tre[o] = this.needcheck;
- }
- return true;
- }
-
- @SuppressWarnings({ "unchecked", "rawtypes" })
- @Override
- public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) {
- list.add(EnumChatFormatting.GOLD + "Fells entire trees in a single swipe!..");
- list.add(EnumChatFormatting.GRAY + "Ask Alkalus for new trees to be supported.");
- super.addInformation(stack, aPlayer, list, bool);
- }
-
- public static boolean canIgnore(final Block bit) {
- if (bit instanceof BlockAir) {
- return true;
- }
- if (bit instanceof BlockGrass) {
- return true;
- }
- if (bit instanceof BlockSand) {
- return true;
- }
- if (bit instanceof BlockDirt) {
- return true;
- }
- if (bit instanceof BlockCocoa) {
- return true;
- }
- if (bit instanceof BlockVine) {
- return true;
- }
- if (bit instanceof BlockMushroom) {
- return true;
- }
- if (bit instanceof BlockSnow) {
- return true;
- }
- if (bit instanceof BlockSnowBlock) {
- return true;
- }
- if (bit instanceof BlockFlower) {
- return true;
- }
- if (bit instanceof BlockTallGrass) {
- return true;
- }
- if (bit instanceof BlockDoublePlant) {
- return true;
- }
-
- // LoonTools.log("Found uncuttable "+bit.getClass().getSimpleName());
- return false;
- }
-
- private int check(final World par1World, final int x, final int y, final int z, final int xo, final int yo,
- final int zo) {
- int f = 0;
- final int o = x + (z * 20) + (y * 400);
- if (this.tre[o] == this.needcheck) {
- this.tre[o] = this.ignore;
- final Block bit = par1World.getBlock(x + xo, y + yo, z + zo);
- if ((bit instanceof BlockLog) || (bit instanceof BlockLeavesBase)
- || (bit instanceof BlockHugeMushroom)
- || (bit.getUnlocalizedName().toLowerCase().contains("log"))
- || (bit.getUnlocalizedName().toLowerCase().contains("wood"))) {
- f = 1;
- this.tre[o] = this.harvest;
- // if (bit instanceof BlockLog){
- // LoonTools.log("^ Found log @ "+x+xo+" "+y+yo+" "+z+zo+" ");
- // }
- for (int xb = -1; xb < 2; xb++) {
- for (int yb = -1; yb < 2; yb++) {
- for (int zb = -1; zb < 2; zb++) {
- if (!this.setcheck(x + xb, y + yb, z + zb)) {
- return 3;
- }
- }
- }
- }
- } else {
- if (!canIgnore(bit)) {
- return 2;
- }
- }
- }
- return f;
- }
-
- public int checkTree(final World par1World, final int xo, final int yo, final int zo) {
- boolean f;
- for (f = true; f == true;) {
- f = false;
- for (int y = 0; y < 80; y++) {
- for (int z = 0; z < 20; z++) {
- for (int x = 0; x < 20; x++) {
- final int r = this.check(par1World, x, y, z, xo, yo, zo);
- if (r == 3) {
- return 3;
- }
- if (r == 2) {
- return 2;
- }
- if (r == 1) {
- f = true;
- }
- }
- }
- }
-
- for (int y = 79; y >= 0; y--) {
- for (int z = 19; z >= 0; z--) {
- for (int x = 19; x >= 0; x--) {
- final int r = this.check(par1World, x, y, z, xo, yo, zo);
- if (r == 2) {
- return 3;
- }
- // if (r==2) return 2;
- if (r == 1) {
- f = true;
- }
- }
- }
- }
- }
- return 1;
- }
-
- private int check2(final World par1World, final int x, final int y, final int z, final int xo, final int yo,
- final int zo) {
- int f = 0;
- final int o = x + (z * 20) + (y * 400);
- if (this.tre[o] == this.needcheck) {
- this.tre[o] = this.ignore;
- final Block bit = par1World.getBlock(x + xo, y + yo, z + zo);
- if (bit instanceof BlockLog) {
- f = 1;
- this.tre[o] = this.harvest;
- // if (bit instanceof BlockLog){
- // LoonTools.log("^ Found log @ "+x+xo+" "+y+yo+" "+z+zo+" ");
- // }
- for (int xb = -1; xb < 2; xb++) {
- for (int yb = -1; yb < 2; yb++) {
- for (int zb = -1; zb < 2; zb++) {
- if (!this.setcheck(x + xb, y + yb, z + zb)) {
- return 3;
- }
- }
- }
- }
- } else if (bit instanceof BlockLeavesBase) {} else {
- if (!canIgnore(bit)) {
- return 2;
- }
- }
- }
- return f;
- }
-
- public int checkTree2(final World par1World, final int xo, final int yo, final int zo) {
- boolean f;
- for (f = true; f == true;) {
- f = false;
- for (int y = 0; y < 80; y++) {
- for (int z = 0; z < 20; z++) {
- for (int x = 0; x < 20; x++) {
- final int r = this.check2(par1World, x, y, z, xo, yo, zo);
- if (r == 3) {
- return 3;
- }
- if (r == 2) {
- return 2;
- }
- if (r == 1) {
- f = true;
- }
- }
- }
- }
-
- for (int y = 79; y >= 0; y--) {
- for (int z = 19; z >= 0; z--) {
- for (int x = 19; x >= 0; x--) {
- final int r = this.check2(par1World, x, y, z, xo, yo, zo);
- if (r == 2) {
- return 3;
- }
- // if (r==2) return 2;
- if (r == 1) {
- f = true;
- }
- }
- }
- }
- }
- return 1;
- }
-
- public void exploadTree(final World par1World, final int xo, final int yo, final int zo, final EntityPlayer plr) {
- for (int y = 0; y < 80; y++) {
- for (int z = 0; z < 20; z++) {
- for (int x = 0; x < 20; x++) {
- final int o = x + (z * 20) + (y * 400);
- if (this.tre[o] == this.harvest) {
- final Block bit = par1World.getBlock(x + xo, y + yo, z + zo);
- final int met = par1World.getBlockMetadata(x + xo, y + yo, z + zo);
-
- if ((bit instanceof BlockLog) || (bit instanceof BlockLeavesBase)
- || (bit.getUnlocalizedName().toLowerCase().contains("log"))
- || (bit.getUnlocalizedName().toLowerCase().contains("wood"))) {
- bit.harvestBlock(par1World, plr, x + xo, y + yo, z + zo, met);
- par1World.setBlockToAir(x + xo, y + yo, z + zo);
- }
- }
- }
- }
- }
- }
-
- private static void breakMushroom(final World wld, final Block bit, final EntityPlayer plr, final boolean silk,
- final int x, final int y, final int z, final int met) {
- if (silk) {
- final ItemStack stk = null; // TODO
- /*
- * if (bit==Blocks.brown_mushroom_block) stk = new ItemStack(LoonToolItems.brown_mushroom_block,1,met); else
- * if (bit==Blocks.red_mushroom_block) stk = new ItemStack(LoonToolItems.red_mushroom_block,1,met); else stk
- * = new ItemStack(bit,1,met);
- */
- final EntityItem entityitem = new EntityItem(wld, x + 0.5, y + 0.5, z + 0.5, stk);
- entityitem.delayBeforeCanPickup = 10;
- wld.spawnEntityInWorld(entityitem);
- } else {
- bit.harvestBlock(wld, plr, x, y, z, met);
- }
- wld.setBlockToAir(x, y, z);
- }
-
- public void exploadMushroom(final World par1World, final int xo, final int yo, final int zo, final EntityPlayer plr,
- final boolean silk) {
- for (int y = 0; y < 80; y++) {
- for (int z = 0; z < 20; z++) {
- for (int x = 0; x < 20; x++) {
- final int o = x + (z * 20) + (y * 400);
- if (this.tre[o] == this.harvest) {
- final Block bit = par1World.getBlock(x + xo, y + yo, z + zo);
- final int met = par1World.getBlockMetadata(x + xo, y + yo, z + zo);
- if (bit instanceof BlockHugeMushroom) {
- breakMushroom(par1World, bit, plr, silk, x + xo, y + yo, z + zo, met);
- } else {
- bit.harvestBlock(par1World, plr, x + xo, y + yo, z + zo, met);
- par1World.setBlockToAir(x + xo, y + yo, z + zo);
- }
- }
- }
- }
- }
- }
-
- @Override
- public boolean onBlockDestroyed(final ItemStack itm, final World wld, final Block blk, final int x, final int y,
- final int z, final EntityLivingBase plr) {
- if (!wld.isRemote) {
- final Block bit = wld.getBlock(x, y, z);
- final boolean silk = EnchantmentHelper.getSilkTouchModifier(plr);
- if ((bit instanceof BlockHugeMushroom)) {
- for (int n = 0; n < 32000; n++) {
- this.tre[n] = this.unchecked;
- }
- final int met = wld.getBlockMetadata(x, y, z);
- breakMushroom(wld, bit, (EntityPlayer) plr, silk, x, y, z, met);
- wld.setBlockToAir(x, y, z);
- this.tre[2210] = this.needcheck;
- if (this.checkTree(wld, x - 10, y - 4, z - 10) == 1) {
- this.exploadMushroom(wld, x - 10, y - 4, z - 10, (EntityPlayer) plr, silk);
- }
- }
-
- if ((bit instanceof BlockLog) || (bit.getUnlocalizedName().toLowerCase().contains("log"))
- || (bit.getUnlocalizedName().toLowerCase().contains("wood"))) {
- // LoonTools.log("cutting tree @ "+x+" "+y+" "+z+" ");
- for (int n = 0; n < 32000; n++) {
- this.tre[n] = this.unchecked;
- }
- final int met = wld.getBlockMetadata(x, y, z);
- bit.harvestBlock(wld, (EntityPlayer) plr, x, y, z, met);
- wld.setBlockToAir(x, y, z);
- this.tre[2210] = this.needcheck;
- if (this.checkTree(wld, x - 10, y - 4, z - 10) == 1) {
- this.exploadTree(wld, x - 10, y - 4, z - 10, (EntityPlayer) plr);
- } else {
- for (int n = 0; n < 32000; n++) {
- this.tre[n] = this.unchecked;
- }
- this.tre[2210] = this.needcheck;
- if (this.checkTree2(wld, x - 10, y - 4, z - 10) == 1) {
- this.exploadTree(wld, x - 10, y - 4, z - 10, (EntityPlayer) plr);
- }
- }
- }
- }
- return super.onBlockDestroyed(itm, wld, blk, x, y, z, plr);
- }
-
- @Override
- @SideOnly(Side.CLIENT)
- public EnumRarity getRarity(final ItemStack par1ItemStack) {
- return EnumRarity.rare;
- }
-
- @Override
- public boolean hasEffect(final ItemStack par1ItemStack, final int pass) {
- return true;
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/item/tool/staballoy/StaballoyPickaxe.java b/src/main/java/gtPlusPlus/core/item/tool/staballoy/StaballoyPickaxe.java
deleted file mode 100644
index 9601662c39..0000000000
--- a/src/main/java/gtPlusPlus/core/item/tool/staballoy/StaballoyPickaxe.java
+++ /dev/null
@@ -1,458 +0,0 @@
-package gtPlusPlus.core.item.tool.staballoy;
-
-import static gregtech.api.enums.Mods.GTPlusPlus;
-
-import java.util.List;
-
-import net.minecraft.block.Block;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Blocks;
-import net.minecraft.item.EnumRarity;
-import net.minecraft.item.ItemPickaxe;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.MathHelper;
-import net.minecraft.util.MovingObjectPosition;
-import net.minecraft.world.World;
-
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import gtPlusPlus.api.objects.Logger;
-import gtPlusPlus.core.util.minecraft.MiningUtils;
-
-public class StaballoyPickaxe extends ItemPickaxe {
-
- /*
- * (non-Javadoc)
- * @see net.minecraft.item.Item#getDurabilityForDisplay(net.minecraft.item.ItemStack)
- */
- @Override
- public double getDurabilityForDisplay(final ItemStack stack) {
- return (double) stack.getItemDamageForDisplay() / (double) stack.getMaxDamage();
- }
-
- /**
- * Creates an NBT tag for this item if it doesn't have one. This also set some default values.
- *
- * @param rStack
- * @return
- */
- private static boolean createNBT(ItemStack rStack) {
- final NBTTagCompound tagMain = new NBTTagCompound();
- final NBTTagCompound tagNBT = new NBTTagCompound();
-
- tagNBT.setBoolean("FACING_HORIZONTAL", true);
- tagNBT.setString("FACING", "north");
- tagNBT.setString("lookingDirection", "");
-
- tagMain.setTag("PickStats", tagNBT);
- rStack.setTagCompound(tagMain);
- return true;
- }
-
- /*
- * Is the player facing horizontally?
- */
-
- public static final boolean isFacingHorizontal(final ItemStack aStack) {
- NBTTagCompound aNBT = aStack.getTagCompound();
- if (aNBT != null) {
- aNBT = aNBT.getCompoundTag("PickStats");
- if (aNBT != null) {
- return aNBT.getBoolean("FACING_HORIZONTAL");
- }
- } else {
- createNBT(aStack);
- }
- return true;
- }
-
- public static final boolean setFacingHorizontal(final ItemStack aStack, final boolean aFacingHorizontal) {
- NBTTagCompound aNBT = aStack.getTagCompound();
- if (aNBT != null) {
- aNBT = aNBT.getCompoundTag("PickStats");
- if (aNBT != null) {
- aNBT.setBoolean("FACING_HORIZONTAL", aFacingHorizontal);
- return true;
- }
- }
- return false;
- }
-
- /*
- * Handles the Direction the player is facing
- */
-
- public static final String getFacingDirection(final ItemStack aStack) {
- NBTTagCompound aNBT = aStack.getTagCompound();
- if (aNBT != null) {
- aNBT = aNBT.getCompoundTag("PickStats");
- if (aNBT != null) {
- return aNBT.getString("FACING");
- }
- } else {
- createNBT(aStack);
- }
- return "north";
- }
-
- public static final boolean setFacingDirection(final ItemStack aStack, final String aFacingHorizontal) {
- NBTTagCompound aNBT = aStack.getTagCompound();
- if (aNBT != null) {
- aNBT = aNBT.getCompoundTag("PickStats");
- if (aNBT != null) {
- aNBT.setString("FACING", aFacingHorizontal);
- return true;
- }
- }
- return false;
- }
-
- /*
- * The Looking Direction handlers
- */
-
- public static final String getLookingDirection(final ItemStack aStack) {
- NBTTagCompound aNBT = aStack.getTagCompound();
- if (aNBT != null) {
- aNBT = aNBT.getCompoundTag("PickStats");
- if (aNBT != null) {
- return aNBT.getString("lookingDirection");
- }
- } else {
- createNBT(aStack);
- }
- return "";
- }
-
- public static final boolean setLookingDirection(final ItemStack aStack, final String aFacingHorizontal) {
- NBTTagCompound aNBT = aStack.getTagCompound();
- if (aNBT != null) {
- aNBT = aNBT.getCompoundTag("PickStats");
- if (aNBT != null) {
- aNBT.setString("lookingDirection", aFacingHorizontal);
- return true;
- }
- }
- return false;
- }
-
- protected int miningLevel;
-
- /*
- * Methods
- */
-
- @Override
- public ItemStack onItemRightClick(final ItemStack stack, final World world, final EntityPlayer aPlayer) {
- return super.onItemRightClick(stack, world, aPlayer);
- }
-
- @Override
- public boolean onBlockDestroyed(final ItemStack stack, final World world, final Block block, final int X,
- final int Y, final int Z, final EntityLivingBase entity) {
- if (!world.isRemote) {
- if (entity instanceof EntityPlayer) {
- this.GetDestroyOrientation(
- (EntityPlayer) entity,
- block,
- getLookingDirection(stack),
- world,
- X,
- Y,
- Z,
- stack);
- }
- }
- return super.onBlockDestroyed(stack, world, block, X, Y, Z, entity);
- }
-
- private float calculateDurabilityLoss(final World world, final int X, final int Y, final int Z) {
- float bDurabilityLoss = 0;
- Boolean correctTool = false;
- float bHardness = 0;
- if (!world.isRemote) {
- try {
- final Block removalist = world.getBlock(X, Y, Z);
- // Utils.LOG_WARNING(removalist.toString());
-
- bHardness = removalist.getBlockHardness(world, X, Y, Z);
- Logger.WARNING("Hardness: " + bHardness);
-
- bDurabilityLoss = (bDurabilityLoss + bHardness);
- // Utils.LOG_WARNING("Durability Loss: "+bDurabilityLoss);
-
- correctTool = this.canPickaxeBlock(removalist, world, new int[] { X, Y, Z });
- Logger.WARNING("" + correctTool);
-
- if (!correctTool) {
- return 0;
- }
-
- } catch (final NullPointerException e) {
-
- }
- }
- return 100;
- }
-
- public Boolean canPickaxeBlock(final Block currentBlock, final World currentWorld, final int[] xyz) {
- String correctTool = "";
- if (!currentWorld.isRemote) {
- try {
- correctTool = currentBlock.getHarvestTool(0);
- if (MiningUtils.getBlockType(currentBlock, currentWorld, xyz, this.miningLevel)
- || correctTool.equals("pickaxe")
- || correctTool.equals("null")) {
- // Utils.LOG_WARNING(correctTool);
- return true;
- }
- } catch (final NullPointerException e) {
- return false;
- }
- }
- return false;
- }
-
- private void GetDestroyOrientation(EntityPlayer entity, final Block block, final String FACING, final World world,
- final int X, final int Y, final int Z, final ItemStack heldItem) {
- float DURABILITY_LOSS = 0;
- if (!world.isRemote) {
-
- Logger.WARNING("hardness:" + block.getBlockHardness(world, X, Y, Z));
- if (FACING.equals("below") || FACING.equals("above")) {
- DURABILITY_LOSS = 0;
- for (int i = -1; i < 2; i++) {
- for (int j = -1; j < 2; j++) {
- final float dur = this.calculateDurabilityLoss(world, X + i, Y, Z + j);
- DURABILITY_LOSS = (DURABILITY_LOSS + dur);
- Logger.WARNING("Added Loss: " + dur);
- this.removeBlockAndDropAsItem(world, X + i, Y, Z + j, heldItem);
- }
- }
- } else if (FACING.equals("facingEast") || FACING.equals("facingWest")) {
- DURABILITY_LOSS = 0;
- for (int i = -1; i < 2; i++) {
- for (int j = -1; j < 2; j++) {
- final float dur = this.calculateDurabilityLoss(world, X, Y + i, Z + j);
- DURABILITY_LOSS = (DURABILITY_LOSS + dur);
- Logger.WARNING("Added Loss: " + dur);
- this.removeBlockAndDropAsItem(world, X, Y + i, Z + j, heldItem);
- }
- }
- } else if (FACING.equals("facingNorth") || FACING.equals("facingSouth")) {
- DURABILITY_LOSS = 0;
- for (int i = -1; i < 2; i++) {
- for (int j = -1; j < 2; j++) {
- final float dur = this.calculateDurabilityLoss(world, X + j, Y + i, Z);
- DURABILITY_LOSS = (DURABILITY_LOSS + dur);
- Logger.WARNING("Added Loss: " + dur);
- this.removeBlockAndDropAsItem(world, X + j, Y + i, Z, heldItem);
- }
- }
- }
-
- // int heldItemDurability = heldItem.getDamage(1);
- Logger.WARNING("Total Loss: " + (int) DURABILITY_LOSS);
- // heldItem.setDamage(heldStack, DURABILITY_LOSS);
- // Utils.LOG_WARNING("|GID|Durability: "+heldItem.getItemDamage());
- // Utils.LOG_WARNING("Durability: "+heldStack.getDamage(heldStack));
- Logger.WARNING("1x: " + (heldItem.getItemDamage()));
- final int itemdmg = heldItem.getItemDamage();
- final int maxdmg = heldItem.getMaxDamage();
- final int dodmg = (int) DURABILITY_LOSS;
- final int durNow = maxdmg - itemdmg;
- final int durLeft = (int) ((maxdmg - itemdmg) - DURABILITY_LOSS);
-
- Logger.WARNING(
- "Current Damage: " + itemdmg
- + " Max Damage: "
- + maxdmg
- + " Durability to be lost: "
- + dodmg
- + " Current Durability: "
- + durNow
- + " Remaining Durability: "
- + durLeft);
-
- // Break Tool
- if (((durNow - dodmg) <= (99)) && (itemdmg != 0)) {
- // TODO break tool
- Logger.WARNING("Breaking Tool");
- heldItem.stackSize = 0;
- }
- // Do Damage
- else {
- // setItemDamage(heldItem, durLeft);
- Logger.WARNING("" + (durNow - durLeft));
- this.damageItem(heldItem, (durNow - durLeft) - 1, entity);
- }
-
- /*
- * if (heldItem.getItemDamage() <= ((heldItem.getMaxDamage()-heldItem.getItemDamage())-DURABILITY_LOSS)){
- * Utils.LOG_WARNING("2: "+DURABILITY_LOSS+" 3: "+((heldItem.getMaxDamage()-heldItem.getItemDamage())-
- * DURABILITY_LOSS)); setItemDamage(heldItem, (int)
- * (heldItem.getMaxDamage()-(heldItem.getMaxDamage()-heldItem.getItemDamage())-DURABILITY_LOSS)); } else {
- * Utils.LOG_WARNING("3: "+( heldItem.getMaxDamage()-(heldItem.getMaxDamage()-heldItem.getItemDamage())));
- * setItemDamage(heldItem, heldItem.getMaxDamage()-(heldItem.getMaxDamage()-heldItem.getItemDamage())); }
- */
- // Utils.LOG_WARNING("|GID|Durability: "+heldItem.getItemDamage());
- DURABILITY_LOSS = 0;
- }
- }
-
- public void damageItem(final ItemStack item, final int damage, final EntityPlayer localPlayer) {
- item.damageItem(damage, localPlayer);
- }
-
- public void setItemDamage(final ItemStack item, final int damage) {
- item.setItemDamage(damage - 1);
- }
-
- // Should clear up blocks quicker if I chain it.
- public final void removeBlockAndDropAsItem(final World world, final int X, final int Y, final int Z,
- final ItemStack heldItem) {
- try {
- final Block block = world.getBlock(X, Y, Z);
- final float dur = this.calculateDurabilityLoss(world, X, Y, Z);
- Logger.WARNING(block.toString());
- String removalTool = "";
- removalTool = block.getHarvestTool(1);
-
- Logger.WARNING("Removing.1 " + removalTool);
- /*
- * if ((removalTool.equalsIgnoreCase("pickaxe") || removalTool.equalsIgnoreCase("null") || removalTool ==
- * null)){ Utils.LOG_WARNING("Removing.2"); if (UtilsMining.getBlockType(block, world, new int[]{X,Y,Z},
- * miningLevel)) { Utils.LOG_WARNING("Removing.3");
- */
- if (this.canPickaxeBlock(block, world, new int[] { X, Y, Z })) {
- Logger.WARNING("Removing.4");
-
- if (block == Blocks.air) {
- return;
- }
-
- if ((block != Blocks.bedrock) && (block.getBlockHardness(world, X, Y, Z) >= 0)
- && (block.getBlockHardness(world, X, Y, Z) <= 100)
- && (block != Blocks.water)
- && (block != Blocks.lava)) {
-
- Logger.WARNING("Removing.5");
- if (heldItem.getItemDamage() <= (heldItem.getMaxDamage() - dur)) {
-
- if (X == 0 && Y == 0 && Z == 0) {
-
- } else {
- block.dropBlockAsItem(world, X, Y, Z, world.getBlockMetadata(X, Y, Z), 0);
- world.setBlockToAir(X, Y, Z);
- }
- }
- }
- /*
- * } }
- */
- } else {
- Logger.WARNING("Incorrect Tool for mining this block.");
- }
- } catch (final NullPointerException e) {
-
- }
- }
-
- public boolean checkFacing(final ItemStack aStack, final EntityPlayer aPlayer, final World world) {
- if (aPlayer != null) {
- final int direction = MathHelper.floor_double((aPlayer.rotationYaw * 4F) / 360F + 0.5D) & 3;
- // Utils.LOG_WARNING("Player - F: "+direction);
- // Utils.LOG_WARNING("Player - getLookVec(): "+localPlayer.getLookVec().yCoord);
-
- /*
- * if (localPlayer.getLookVec().yCoord > 0){ localPlayer.getLookVec().yCoord; }
- */
-
- final MovingObjectPosition movingobjectposition = this
- .getMovingObjectPositionFromPlayer(world, aPlayer, false);
- if (movingobjectposition != null) {
- final int sideHit = movingobjectposition.sideHit;
- String playerStandingPosition = "";
- if (movingobjectposition != null) {
- // System.out.println("Side Hit: "+movingobjectposition.sideHit);
- }
-
- if (sideHit == 0) {
- playerStandingPosition = "above";
- setFacingHorizontal(aStack, false);
- } else if (sideHit == 1) {
- playerStandingPosition = "below";
- setFacingHorizontal(aStack, false);
- } else if (sideHit == 2) {
- playerStandingPosition = "facingSouth";
- setFacingHorizontal(aStack, true);
- } else if (sideHit == 3) {
- playerStandingPosition = "facingNorth";
- setFacingHorizontal(aStack, true);
- } else if (sideHit == 4) {
- playerStandingPosition = "facingEast";
- setFacingHorizontal(aStack, true);
- } else if (sideHit == 5) {
- playerStandingPosition = "facingWest";
- setFacingHorizontal(aStack, true);
- }
- setLookingDirection(aStack, playerStandingPosition);
-
- if (direction == 0) {
- setFacingDirection(aStack, "south");
- } else if (direction == 1) {
- setFacingDirection(aStack, "west");
- } else if (direction == 2) {
- setFacingDirection(aStack, "north");
- } else if (direction == 3) {
- setFacingDirection(aStack, "east");
- }
- }
-
- return true;
- }
- return false;
- }
-
- @SuppressWarnings({ "unchecked", "rawtypes" })
- @Override
- public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) {
- list.add(EnumChatFormatting.GRAY + "Mines a 3x3 at 100 durability per block mined.");
- list.add(
- EnumChatFormatting.GRAY + "Durability: "
- + (stack.getMaxDamage() - stack.getItemDamage())
- + "/"
- + stack.getMaxDamage());
- // super.addInformation(stack, aPlayer, list, bool);
- }
-
- @Override
- @SideOnly(Side.CLIENT)
- public EnumRarity getRarity(final ItemStack par1ItemStack) {
- return EnumRarity.rare;
- }
-
- @Override
- public boolean hasEffect(final ItemStack par1ItemStack, final int pass) {
- return true;
- }
-
- @Override
- public boolean onBlockStartBreak(final ItemStack itemstack, final int X, final int Y, final int Z,
- final EntityPlayer aPlayer) {
- this.checkFacing(itemstack, aPlayer, aPlayer.getEntityWorld());
- return super.onBlockStartBreak(itemstack, X, Y, Z, aPlayer);
- }
-
- public StaballoyPickaxe(final String unlocalizedName, final ToolMaterial material) {
- super(material);
- this.setUnlocalizedName(unlocalizedName);
- this.setTextureName(GTPlusPlus.ID + ":" + unlocalizedName);
- this.setMaxStackSize(1);
- this.setMaxDamage(3200);
- this.miningLevel = 5;
- }
-}