aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/core/handler
diff options
context:
space:
mode:
Diffstat (limited to 'src/Java/gtPlusPlus/core/handler')
-rw-r--r--src/Java/gtPlusPlus/core/handler/AchievementHandler.java421
-rw-r--r--src/Java/gtPlusPlus/core/handler/BookHandler.java404
-rw-r--r--src/Java/gtPlusPlus/core/handler/BurnableFuelHandler.java35
-rw-r--r--src/Java/gtPlusPlus/core/handler/COMPAT_HANDLER.java316
-rw-r--r--src/Java/gtPlusPlus/core/handler/COMPAT_IntermodStaging.java91
-rw-r--r--src/Java/gtPlusPlus/core/handler/CraftingManager.java17
-rw-r--r--src/Java/gtPlusPlus/core/handler/EnumHelperHandler.java21
-rw-r--r--src/Java/gtPlusPlus/core/handler/GuiHandler.java231
-rw-r--r--src/Java/gtPlusPlus/core/handler/OldCircuitHandler.java66
-rw-r--r--src/Java/gtPlusPlus/core/handler/PacketHandler.java91
-rw-r--r--src/Java/gtPlusPlus/core/handler/Recipes/DecayableRecipe.java39
-rw-r--r--src/Java/gtPlusPlus/core/handler/Recipes/LateRegistrationHandler.java28
-rw-r--r--src/Java/gtPlusPlus/core/handler/Recipes/RegistrationHandler.java27
-rw-r--r--src/Java/gtPlusPlus/core/handler/StopAnnoyingFuckingAchievements.java49
-rw-r--r--src/Java/gtPlusPlus/core/handler/events/BlockEventHandler.java229
-rw-r--r--src/Java/gtPlusPlus/core/handler/events/CustomMovementHandler.java163
-rw-r--r--src/Java/gtPlusPlus/core/handler/events/EnderDragonDeathHandler.java59
-rw-r--r--src/Java/gtPlusPlus/core/handler/events/EntityDeathHandler.java124
-rw-r--r--src/Java/gtPlusPlus/core/handler/events/GeneralTooltipEventHandler.java107
-rw-r--r--src/Java/gtPlusPlus/core/handler/events/LoginEventHandler.java128
-rw-r--r--src/Java/gtPlusPlus/core/handler/events/MissingMappingsEvent.java56
-rw-r--r--src/Java/gtPlusPlus/core/handler/events/PickaxeBlockBreakEventHandler.java80
-rw-r--r--src/Java/gtPlusPlus/core/handler/events/PlayerTickHandler.java18
-rw-r--r--src/Java/gtPlusPlus/core/handler/events/SneakManager.java131
-rw-r--r--src/Java/gtPlusPlus/core/handler/events/UnbreakableBlockManager.java138
-rw-r--r--src/Java/gtPlusPlus/core/handler/events/ZombieBackupSpawnEventHandler.java55
-rw-r--r--src/Java/gtPlusPlus/core/handler/render/CapeHandler.java122
-rw-r--r--src/Java/gtPlusPlus/core/handler/render/FirepitModel.java121
-rw-r--r--src/Java/gtPlusPlus/core/handler/render/FirepitRender.java55
-rw-r--r--src/Java/gtPlusPlus/core/handler/workbench/Workbench_CraftingHandler.java208
-rw-r--r--src/Java/gtPlusPlus/core/handler/workbench/Workbench_RecipeSorter.java44
31 files changed, 0 insertions, 3674 deletions
diff --git a/src/Java/gtPlusPlus/core/handler/AchievementHandler.java b/src/Java/gtPlusPlus/core/handler/AchievementHandler.java
deleted file mode 100644
index fa10f4def3..0000000000
--- a/src/Java/gtPlusPlus/core/handler/AchievementHandler.java
+++ /dev/null
@@ -1,421 +0,0 @@
-package gtPlusPlus.core.handler;
-
-import java.util.concurrent.ConcurrentHashMap;
-
-import cpw.mods.fml.common.FMLCommonHandler;
-import cpw.mods.fml.common.eventhandler.SubscribeEvent;
-import cpw.mods.fml.common.gameevent.PlayerEvent.ItemCraftedEvent;
-import cpw.mods.fml.common.gameevent.PlayerEvent.ItemSmeltedEvent;
-import gregtech.api.enums.GT_Values;
-import gregtech.api.enums.Materials;
-import gregtech.api.util.GT_Log;
-import gregtech.common.items.GT_MetaGenerated_Tool_01;
-import gtPlusPlus.api.objects.Logger;
-import gtPlusPlus.core.block.ModBlocks;
-import gtPlusPlus.core.item.ModItems;
-import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.material.ALLOY;
-import gtPlusPlus.core.material.ELEMENT;
-import gtPlusPlus.core.util.minecraft.ItemUtils;
-import gtPlusPlus.core.util.minecraft.gregtech.PollutionUtils;
-import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList;
-import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase;
-import gtPlusPlus.xmod.gregtech.common.items.MetaGeneratedGregtechTools;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.stats.Achievement;
-import net.minecraft.stats.StatBase;
-import net.minecraftforge.common.AchievementPage;
-import net.minecraftforge.common.MinecraftForge;
-import net.minecraftforge.event.entity.player.EntityItemPickupEvent;
-
-public class AchievementHandler {
-
- public ConcurrentHashMap<String, Achievement> achievementList = new ConcurrentHashMap<String, Achievement>();
- public ConcurrentHashMap<String, Boolean> issuedAchievements = new ConcurrentHashMap<String, Boolean>();
-
- public int adjX = 5;
- public int adjY = 9;
-
- private static final String aBaseAchievementName = "gtpp.start";
-
- public AchievementHandler() {
-
- Logger.INFO("Initializing GT++ achievements");
- GT_Log.out.println("Initializing GT++ achievements");
-
- //register first
- this.registerAchievement(aBaseAchievementName, 0, 0, MetaGeneratedGregtechTools.INSTANCE.getToolWithStats(MetaGeneratedGregtechTools.ANGLE_GRINDER, 1, Materials.Osmium, Materials.Osmium, null), "", true);
-
- //Useful Info
- boolean cores = CORE.ConfigSwitches.requireControlCores;
- if (cores || GregtechMeta_MultiBlockBase.DEBUG_DISABLE_CORES_TEMPORARILY) {
- this.registerAchievement("hatch.control", -2, -2, GregtechItemList.Hatch_Control_Core.get(1), aBaseAchievementName, false);
- }
- this.registerAchievement("hatch.dynamo.buffered", 2, -2, GregtechItemList.Hatch_Buffer_Dynamo_IV.get(1), aBaseAchievementName, false);
- //First multi anyone really needs
- this.registerAchievement("multi.abs", -4, -2, GregtechItemList.Industrial_AlloyBlastSmelter.get(1), cores ? "hatch.control" : aBaseAchievementName, true);
-
- //Material Advancement
- this.registerAchievement("dust.potin", 0, 2, ALLOY.POTIN.getDust(1), aBaseAchievementName, false);
- this.registerAchievement("dust.eglin", 0, 4, ALLOY.EGLIN_STEEL.getDust(1), "dust.potin", false);
- this.registerAchievement("dust.staballoy", 0, 6, ALLOY.STABALLOY.getDust(1), "dust.eglin", false);
- this.registerAchievement("dust.quantum", 0, 8, ALLOY.QUANTUM.getDust(1), "dust.staballoy", true);
- this.registerAchievement("dust.hypogen", 0, 10, ELEMENT.STANDALONE.HYPOGEN.getDust(1), "dust.quantum", true);
-
-
- //Blocks
- this.registerAchievement("block.fishtrap", -2, 2, ItemUtils.getSimpleStack(ModBlocks.blockFishTrap), "dust.potin", false);
- this.registerAchievement("block.withercage", -2, 4, ItemUtils.getSimpleStack(ModBlocks.blockWitherGuard), "dust.eglin", false);
-
-
- //Machines (-10/-8/-6)
- this.registerAchievement("rtg", -16, -10, GregtechItemList.RTG.get(1), aBaseAchievementName, false);
- this.registerAchievement("dehydrate", -15, -10, GregtechItemList.GT_Dehydrator_HV.get(1), aBaseAchievementName, false);
- this.registerAchievement("semifluid", -14, -10, GregtechItemList.Generator_SemiFluid_HV.get(1), aBaseAchievementName, false);
- this.registerAchievement("earlywasher", -13, -10, GregtechItemList.SimpleDustWasher_ULV.get(1), aBaseAchievementName, false);
- this.registerAchievement("advancedsteam", -12, -10, GregtechItemList.Boiler_Advanced_MV.get(1), aBaseAchievementName, false);
- if (PollutionUtils.isPollutionEnabled()) {
- this.registerAchievement("pollutionremoval", -11, -10, GregtechItemList.Pollution_Cleaner_IV.get(1), aBaseAchievementName, false);
- }
- this.registerAchievement("hiampxform", -10, -10, GregtechItemList.Transformer_HA_HV_MV.get(1), aBaseAchievementName, false);
-
-
- //Multis (-4/-2/0)
- this.registerAchievement("multi.pss", -16, -7, GregtechItemList.PowerSubStation.get(1), "multi.abs", false);
- this.registerAchievement("multi.cyclo", -15, -7, GregtechItemList.COMET_Cyclotron.get(1), "multi.abs", false);
- this.registerAchievement("multi.sifter", -14, -7, GregtechItemList.Industrial_Sifter.get(1), "dust.eglin", false);
- this.registerAchievement("multi.cokeoven", -13, -7, GregtechItemList.Industrial_CokeOven.get(1), "multi.abs", false);
- this.registerAchievement("multi.boiler.thermal", -12, -7, GregtechItemList.GT4_Thermal_Boiler.get(1), "multi.abs", false);
- this.registerAchievement("multi.zhuhai", -11, -7, GregtechItemList.Industrial_FishingPond.get(1), aBaseAchievementName, false);
- //this.registerAchievement("rtg", -4, -4, GregtechItemList.RTG.get(1), aBaseAchievementName, false);
-
- //Casings
- this.registerAchievement("casing.abs", 2, -10, GregtechItemList.Casing_Coil_BlastSmelter.get(1), aBaseAchievementName, false);
- this.registerAchievement("casing.cyclotron.coil", 3, -10, GregtechItemList.Casing_Cyclotron_Coil.get(1), aBaseAchievementName, false);
- this.registerAchievement("casing.multiuse", 4, -10, GregtechItemList.Casing_Multi_Use.get(1), aBaseAchievementName, false);
- this.registerAchievement("casing.containment", 5, -10, GregtechItemList.Casing_Containment.get(1), aBaseAchievementName, false);
-
-
-
-
-
-
-
-
- //Radioactive
- this.registerAchievement("decay.neptunium238", 11, 8, ItemUtils.getSimpleStack(ModItems.dustNeptunium238), "multi.cyclo", false);
- this.registerAchievement("decay.radium226", 12, 8, ItemUtils.getSimpleStack(ModItems.dustRadium226), "multi.cyclo", false);
- this.registerAchievement("decay.molybdenum99", 13, 8, ItemUtils.getSimpleStack(ModItems.dustMolybdenum99), "multi.cyclo", false);
- this.registerAchievement("decay.technetium99m", 14, 8, ItemUtils.getSimpleStack(ModItems.dustTechnetium99M), "multi.cyclo", false);
- this.registerAchievement("decay.technetium99", 15, 8, ItemUtils.getSimpleStack(ModItems.dustTechnetium99), "multi.cyclo", false);
-
-
-
-
-
-
-
-
-
-
-
-
- AchievementPage.registerAchievementPage(
- new AchievementPage("GT++", (Achievement[]) ((Achievement[]) this.achievementList.values()
- .toArray(new Achievement[this.achievementList.size()]))));
- MinecraftForge.EVENT_BUS.register(this);
- FMLCommonHandler.instance().bus().register(this);
-
-
- }
-
- public Achievement registerAchievement(String textId, int x, int y, ItemStack icon, Achievement requirement,
- boolean special) {
- Achievement achievement = new Achievement(textId, textId, this.adjX + x, this.adjY + y, icon, requirement);
- if (special) {
- achievement.setSpecial();
- }
-
- achievement.registerStat();
- if (CORE.DEVENV) {
- GT_Log.out.println("achievement." + textId + "=");
- GT_Log.out.println("achievement." + textId + ".desc=");
- }
-
- this.achievementList.put(textId, achievement);
- return achievement;
- }
-
- public Achievement registerAchievement(String textId, int x, int y, ItemStack icon, String requirement,
- boolean special) {
- Achievement achievement = new Achievement(textId, textId, this.adjX + x, this.adjY + y, icon,
- this.getAchievement(requirement));
- if (special) {
- achievement.setSpecial();
- }
-
- achievement.registerStat();
- if (CORE.DEVENV) {
- GT_Log.out.println("achievement." + textId + "=");
- GT_Log.out.println("achievement." + textId + ".desc=");
- }
-
- this.achievementList.put(textId, achievement);
- return achievement;
- }
-
- public void issueAchievement(EntityPlayer entityplayer, String textId) {
- if (entityplayer != null) {
- entityplayer.triggerAchievement((StatBase) this.achievementList.get(textId));
- }
- }
-
- public Achievement getAchievement(String textId) {
- return this.achievementList.containsKey(textId) ? (Achievement) this.achievementList.get(textId) : null;
- }
-
-
- /**
- * A generic handler that will give an achievement for an item.
- * Useful to only write this once, then call it from all handlers.
- * @param aStack - The Itemstack to check for achievements.
- * @param aPlayer - The player to unlock for.
- */
- private void handleAchivement(ItemStack aStack, EntityPlayer aPlayer) {
-
- if (aPlayer != null && aStack != null) {
- /*
- * Copy this to all events because I am lazy - Alk 2019
- */
-
- //Safe name
- String aUnlocalName = ItemUtils.getUnlocalizedItemName(aStack);
-
-
- boolean isValid = false;
- //Check if valid name // mod
- String aModID = ItemUtils.getModId(aStack);
-
- if (aModID == null || aModID.length() <= 0 || aModID.isEmpty()) {
- return;
- }
-
- if (aModID != null && (ItemUtils.getModId(aStack).equals(CORE.MODID) || ItemUtils.getModId(aStack).equalsIgnoreCase("gregtech"))) {
- isValid = true;
- }
- if (!isValid) {
- return;
- }
-
- //Should unlock base achievement from *ANY* GT++ item. (Too lazy to special case GT machineBlocks though)
- if (ItemUtils.getModId(aStack).equals(CORE.MODID)) {
- this.issueAchievement(aPlayer, aBaseAchievementName);
- }
-
- if (aUnlocalName.contains("item.")) {
- aUnlocalName = aUnlocalName.substring(5);
- }
- else if (aUnlocalName.contains("tile.")) {
- aUnlocalName = aUnlocalName.substring(5);
- }
-
- //Logger.INFO("Picked up "+aUnlocalName);
-
-
- /**
- * Misc Blocks
- */
-
- if (aUnlocalName.equals("blockFishTrap")) {
- this.issueAchievement(aPlayer, "block.fishtrap");
- }
- if (aUnlocalName.equals("blockBlackGate")) {
- this.issueAchievement(aPlayer, "block.withercage");
- }
-
-
- /**
- * Decayables
- */
- if (aUnlocalName.equals("dustNeptunium238")) {
- this.issueAchievement(aPlayer, "decay.neptunium238");
- }
- else if (aUnlocalName.equals("dustRadium226")) {
- this.issueAchievement(aPlayer, "decay.radium226");
- }
- else if (aUnlocalName.equals("dustMolybdenum99")) {
- this.issueAchievement(aPlayer, "decay.molybdenum99");
- }
- else if (aUnlocalName.equals("dustTechnetium99M")) {
- this.issueAchievement(aPlayer, "decay.technetium99m");
- }
- else if (aUnlocalName.equals("dustTechnetium99")) {
- this.issueAchievement(aPlayer, "decay.technetium99");
- }
-
- /**
- * Random Materials worthy of Achievements
- */
- else if (aUnlocalName.equals("itemDustPotin")) {
- this.issueAchievement(aPlayer, "dust.potin");
- }
- else if (aUnlocalName.equals("itemDustEglinSteel")) {
- this.issueAchievement(aPlayer, "dust.eglin");
- }
- else if (aUnlocalName.equals("itemDustStaballoy")) {
- this.issueAchievement(aPlayer, "dust.staballoy");
- }
- else if (aUnlocalName.equals("itemDustQuantum")) {
- this.issueAchievement(aPlayer, "dust.quantum");
- }
- else if (aUnlocalName.equals("itemDustHypogen")) {
- this.issueAchievement(aPlayer, "dust.hypogen");
- }
-
-
-
- /**
- * Machines
- */
-
- else if (aUnlocalName.startsWith("gt.blockmachines.")) {
-
- //Readability
- String aStartsWith = "gt.blockmachines.";
-
- /**
- * Single Blocks
- */
-
- //RTG
- if (aUnlocalName.startsWith(aStartsWith + "basicgenerator.rtg")) {
- this.issueAchievement(aPlayer, "rtg");
- }
- //Dehydrator
- else if (aUnlocalName.startsWith(aStartsWith + "machine.dehydrator.tier.")) {
- this.issueAchievement(aPlayer, "dehydrate");
- }
- //SemiFluids
- else if (aUnlocalName.startsWith(aStartsWith + "basicgenerator.semifluid.tier.")) {
- this.issueAchievement(aPlayer, "semifluid");
- }
- //Simple Washer
- else if (aUnlocalName.startsWith(aStartsWith + "simplewasher.01.tier.")) {
- this.issueAchievement(aPlayer, "earlywasher");
- }
- //Advanced Boilers
- else if (aUnlocalName.startsWith(aStartsWith + "electricboiler.")) {
- this.issueAchievement(aPlayer, "advancedsteam");
- }
- //Scrubers
- else if (aUnlocalName.startsWith(aStartsWith + "pollutioncleaner.01.tier.")) {
- this.issueAchievement(aPlayer, "pollutionremoval");
- }
- //High-amp xformers
- else if (aUnlocalName.startsWith(aStartsWith + "transformer.ha.tier.")) {
- this.issueAchievement(aPlayer, "hiampxform");
- }
- //Buffered Dynamos
- else if (aUnlocalName.startsWith(aStartsWith + "hatch.dynamo.buffer.tier.")) {
- this.issueAchievement(aPlayer, "hatch.dynamo.buffered");
- }
- //Control Core Hatch
- else if (aUnlocalName.startsWith(aStartsWith + "hatch.control.adv")) {
- this.issueAchievement(aPlayer, "hatch.control");
- }
-
-
-
- /**
- * Multis
- */
-
- //ABS
- else if (aUnlocalName.equals(aStartsWith + "industrialsalloyamelter.controller.tier.single")) {
- this.issueAchievement(aPlayer, "multi.abs");
- }
- //PSS
- else if (aUnlocalName.equals(aStartsWith + "substation.01.input.single")) {
- this.issueAchievement(aPlayer, "multi.pss");
- }
- //Cyclotron
- else if (aUnlocalName.startsWith(aStartsWith + "cyclotron.tier.single")) {
- this.issueAchievement(aPlayer, "multi.cyclo");
- }
- //Sifter
- else if (aUnlocalName.equals(aStartsWith + "industrialsifter.controller.tier.single")) {
- this.issueAchievement(aPlayer, "multi.sifter");
- }
- //Coke Oven
- else if (aUnlocalName.equals(aStartsWith + "industrialcokeoven.controller.tier.single")) {
- this.issueAchievement(aPlayer, "multi.cokeoven");
- }
- //Thermal Boiler
- else if (aUnlocalName.equals(aStartsWith + "gtplusplus.thermal.boiler")) {
- this.issueAchievement(aPlayer, "multi.boiler.thermal");
- }
- //Zhuhai
- else if (aUnlocalName.equals(aStartsWith + "industrial.fishpond.controller.tier.single")) {
- this.issueAchievement(aPlayer, "multi.zhuhai");
- }
-
- }
-
- /**
- * Casings
- */
-
- else if (aUnlocalName.equals("gtplusplus.blockcasings.14")) {
- this.issueAchievement(aPlayer, "casing.abs");
- }
-
- else if (aUnlocalName.equals("gtplusplus.blockcasings.2.9")) {
- this.issueAchievement(aPlayer, "casing.cyclotron.coil");
- }
-
- else if (aUnlocalName.equals("gtplusplus.blockcasings.3.2")) {
- this.issueAchievement(aPlayer, "casing.multiuse");
- }
- else if (aUnlocalName.equals("gtplusplus.blockcasings.3.15")) {
- this.issueAchievement(aPlayer, "casing.containment");
- }
- }
- }
-
-
-
-
- /*
- * Handle achievements for all vanilla types of obtianment.
- */
-
-
-
- @SubscribeEvent
- public void onCrafting(ItemCraftedEvent event) {
- EntityPlayer player = event.player;
- ItemStack stack = event.crafting;
- if (player != null && stack != null) {
- handleAchivement(stack, player);
- }
- }
-
- @SubscribeEvent
- public void onSmelting(ItemSmeltedEvent event) {
- EntityPlayer player = event.player;
- ItemStack stack = event.smelting;
- if (player != null && stack != null) {
- handleAchivement(stack, player);
- }
- }
-
- @SubscribeEvent
- public void onItemPickup(EntityItemPickupEvent event) {
- EntityPlayer player = event.entityPlayer;
- ItemStack stack = event.item.getEntityItem();
- if (player != null && stack != null) {
- handleAchivement(stack, player);
- }
- }
-} \ No newline at end of file
diff --git a/src/Java/gtPlusPlus/core/handler/BookHandler.java b/src/Java/gtPlusPlus/core/handler/BookHandler.java
deleted file mode 100644
index 4bfd39e9a3..0000000000
--- a/src/Java/gtPlusPlus/core/handler/BookHandler.java
+++ /dev/null
@@ -1,404 +0,0 @@
-package gtPlusPlus.core.handler;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import gregtech.api.enums.GT_Values;
-import gregtech.api.util.GT_OreDictUnificator;
-import gtPlusPlus.api.objects.Logger;
-import gtPlusPlus.core.item.ModItems;
-import gtPlusPlus.core.recipe.common.CI;
-import gtPlusPlus.core.util.minecraft.ItemUtils;
-import gtPlusPlus.core.util.minecraft.RecipeUtils;
-import net.minecraft.init.Items;
-import net.minecraft.item.ItemStack;
-
-public class BookHandler {
-
- public static int mBookKeeperCount = 0;
-
- public static Map<Integer, BookTemplate> mBookMap = new HashMap<Integer, BookTemplate>();
-
- public static BookTemplate book_ThermalBoiler;
- public static BookTemplate book_MultiPowerStation;
- public static BookTemplate book_ModularBauble;
- public static BookTemplate book_MultiMachineManual;
- public static BookTemplate book_NuclearManual;
- public static BookTemplate book_MultiChemicalPlant;
-
- public static void run(){
-
- Logger.INFO("Writing books.");
-
- //Thermal Boiler
- book_ThermalBoiler = writeBookTemplate(
- "Manual_Thermal_Boiler", "Thermal Boiler Manual", "GregoriusT",
- new String[] {
- "This Book explains how to set up and run your Thermal Boiler. We are not responsible for any Damage done by this Book itself nor its content.",
- "First you need to craft the following things for a Thermal Boiler to Function: The Main Boiler Block, 20 Thermal Containment Casings, two Input Hatches, two Output Hatches, a bunch of different Tools and a Maintenance Hatch.",
- "To begin the building, lay out the first 3x3 layer of Machine Casings on the ground (with a Hatch in the Middle), then place the Boiler Block facing outward in the middle of one of the 3m wide Sides.",
- "Now grab 3 other Hatches and place them on the remaining three 3m wide Sides also facing outwards. And now the four corners of the Machine need also a Machine Casing. There should only be a Hole left in the middle of the Cube.",
- "So, now place a 3x3 of Machine Casings ontop, at the 3rd Layer with the last Hatch in the middle facing outwards as well.",
- "When accessing the Boiler Block, it should now stop telling you, that the structure is incomplete (bottom Line of that Screen). Now go with a bunch of different Tools (Metal Hammer, Rubber Hammer, Screwdriver, Wrench, Soldering Iron and Crowbar)",
- "to the Maintenance Hatch and access it. After that you grab the 6 Tools and rightclick the Slot with each of them in your Hand in the Maintenance GUI. Note that you need Soldering Tin/Lead in your Inventory to use the Soldering Iron.",
- "The Main Block should now tell you that you need to use the Rubber Hammer on it to (re)activate the Machine. The Rubber Hammer can enable and disable Machines. The Machine disables itself after something important broke.",
- "If you want to use Lava with this Device, then you should add a Lava Filter to extract additional Resources from the Lava. If the Filter breaks, the Machine won't explode like a Turbine would. If you use molten Salt, then you won't need a Filter.",
- "You will get Obsidian when processing Lava, however if a Filter is used, you will get sometimes an Ingot instead of a Block of Obsidian. When using molten Salt, you will get the Salt back.",
- "So, now for the Maintenance. After a few Hours of running nonstop, your Boiler will get small Problems, which don't prevent it from running, these Problems just decrease Efficiency. Every Problem listed on the Screen does -10% Efficiency.",
- "To fix these Problems, just go to the Maintenance Hatch and click with the problem corresponding Tool on the Slot to repair. If all six possible runtime Problems happen, the Machine will auto-shutdown no matter what. No Explosion, it's just stopping.",
- "The Thermal Boiler will produce 800 Liters of Steam per tick for about 5 or 6 Liters of Water per tick at reaching 100% Efficiency. In case of Lava it consumes 1666 Liters every Second.",
- "A Thermal Boiler is worth about 33 small Thermal Generators, and as the Boilers get much less Efficient, when not having enough Fuel, you should consider making a large Nether Pump for Lava, or a good Nuclear Reactor for molten Salt.",
- "Input and Output Slots are fully optional, you can place multiple ones of them or even none on the Machine. A Machine without Input couldn't process any Recipes, while a Machine without Output just voids all outputted Items and Liquids.",
- "It might be useful to use the Screwdriver on the Output Hatches to determine what is outputted where." });
-
-
-
- //Test Novel
- book_MultiPowerStation = writeBookTemplate(
- "Manual_Multi_PowerStation",
- "Power Storage & You [Version 0.64]",
- "Alkalus",
- new String[] {
- //Page 1
- "So, when it comes to power storage you relaly have three seperate options:\n"+
- " \n"+
- "Battery Buffers,\n"+
- "Energy Buffers,\n"+
- "The Power Sub-Station\n",
- //Page 2
- "Battery Buffer\n" +
- " \n" +
- "Is rather portable. Allowing you to throw set one up and insert batteries where ever you may need."+"\n"+
- "They output 1A for each battery stored inside, upto a maximum of 16A.",
- //Page 3
- "Energy Buffer\n" +
- " \n" +
- "Is a more optimal choice for storage in your base. Once placed down, they cannot be moved without losing all stored power."+"\n"+
- "Energy Buffers can output 4A from the output side, however accept 16A as input.",
- //Page 4
- "The Power Sub-Station"+
- " \n"+
- "Is used for storing Insane amounts of power later game."+"\n"+
- "Consumes 2% of the average voltage of all energy type hatches every tick."+"\n",
- //Page 5
- "Allows Insertation/Removal of power from the rear face of the controller, swap with a screwdriver."+"\n"+
- "Variable Height Structure, between 4-16Y. Inserted Redox Cells dictate max energy tier of structure."+"\n",
- //Page 6
- "Redox Cells cannot be placed into the Top or Bottom layer and only take up 3xhx3 internally."+"\n"+
- "Different Tier cells CANNOT be mixed together."+"\n",
- //Page 7
- "All Hatches Must be HV at a Minimum, this minimum tier is in place to stop people abusing ULV/LV hatches to lower the avg/t."+"\n"+
- "Currently the GUI will NOT display anything at all until the structure forms, this is a known bug."+"\n",
- //Page 8
- "Valid Hatches:\n"+
- "Energy Hatch,\n"+
- "Dynamo Hatch,\n"+
- "Charging Bus,\n"+
- "Discharging Bus,\n"+
- "Dynamo Buffer,\n"+
- "Multi-Amp Dynamo Hatch.\n\n\n"+
- "Structure MUST contain at least one energy input and one energy output hatch."
- });
-
- //Test Novel
- book_ModularBauble = writeBookTemplate(
- "Manual_Modular_Bauble", "How to: Modular Baubles", "Alkalus",
- new String[] {
- "Concept: This idea came from wanting flexibility. \n" +
- "First step, Build a Modularity table to begin customisation of your Bauble. \n"
- + " After this has been constructed, you can now combine the upgrades listed within this book to improve the baubles level/100.",
- "Defence:\n"
- + "Can be upgraded by combining metal plates with the bauble. \n"
- + " | +1 | Aluminium \n"
- + " | +2 | Stainless Steel \n"
- + " | +3 | Tungsten \n"
- + " | +4 | Tungsten Steel \n"
- + " | +5 | Naquadah \n",
- "There was once a sad and lonely oak tree. \n",
- "There was once a sad and lonely oak tree. \n",
- "There was once a sad and lonely oak tree. \n"});
-
- //Test Novel
- //20/21/22
- book_MultiMachineManual = writeBookTemplate(
- "Manual_Multi_Machine", "Multi-Machine Manual", "Alkalus",
- new String[] {
- "This Multiblock, depending upon the mode used, can function as a variety of different machines. The idea behind this, was that most of these machines are rather niche compared to any others, as such, not used often.",
- "To build, you need to construct a hollow 3x3x3 structure made from Multi-Use casings, With a minimum of 6. Any Casing position can be substituted out with an Input Hatch/Bus, an Output Hatch/Bus, Muffler, Maint. Hatch or Energy Injector Hatch.",
- "The Mode can be set by using a Screwdriver on the controller block. Each mode allows the use of Numbered Circuits, to allow a different machine 'type' for each input bus.",
- "[Metal Work] Mode A - Allows the multiblock to function as a Compressor, a Lathe or an Electro-Magnet. To allow a hatch to run in Compressor mode, insert a No. 20 circuit. For Lathe, use No. 21 and for Electro-Magnet use No. 22.",
- "[Fluid Work] Mode B - Allows the multiblock to function as a Fermenter, a Fluid Extractor or an Extractor. To allow a hatch to run in Fermenter mode, insert a No. 20 circuit. For Fluid Extractor, use No. 21 and for Extractor use No. 22.",
- "[Misc. Work] Mode C - Allows the multiblock to function as a Laser Engraver, an Autoclave or a Fluid Solidifier. To allow a hatch to run in Laser Engraver mode, insert a No. 20 circuit. For Autoclave, use No. 21 and for Solidifier use No. 22.",
- });
-
- book_NuclearManual = writeBookTemplate(
- "Manual_NuclearStuff_1", "Nuclear Chemistry [FFPP]", "Alkalus",
- new String[] {
- //Page 1
- "Fission Fuel Processing Plant\n"
- + "Size: 3x9x3 [LxHxW]\n"
- + "Controller: Center, Bottom\n"
- + "4x Input Hatch\n"
- + "2x Output Hatch\n"
- + "1x Output Bus\n"
- + "1x ZPM+ Muffler\n"
- + "1x Maintenance Hatch\n"
- + "1x Energy Hatch\n",
- //Page 2
- "[1] 7x Hastelloy-X or I/O\n"
- + "[2] 5x Incoloy-DS Fluid Containment\n"
- + "[3] 4x Zeron-100 Shielding\n"
- + "[4] 17x Hastelloy-N Sealant Case"
- + "\n"
- + "Multiblock Construction\n"
- + "Convention is [LxHxW]\n"
- + "\n",
- //Page 3
- "Layer 1/2:\n"
- + "[1][1][1]\n"
- + "[1][1][1]\n"
- + "[1][1][1]\n"
- + "\n"
- + "Layer 3/5/6\n"
- + "[ ][4][ ]\n"
- + "[4][2][4]\n"
- + "[ ][4][ ]\n"
- + "\n",
- //Page 4
- "Layer 4\n"
- + "[ ][3][ ]\n"
- + "[3][2][3]\n"
- + "[ ][3][ ]\n"
- + "\n"
- + "Layer 7/8/9\n"
- + "[ ][ ][ ]\n"
- + "[ ][3][ ]\n"
- + "[ ][ ][ ]\n"
- ,
- //Page 5
- "Fission Fuel\n"+
- "Processing Plant"+
- "----------------------\n"+
- "This structure is used to produce the Molten Salts required to run a Liquid Fluorine Thorium Reactor [LFTR]."
-
- });
-
-
- book_MultiChemicalPlant = writeBookTemplate(
- "book_Multi_ChemicalPlant", "Chemical Plant Manual", "Alkalus",
- new String[] {
-
- // Intro
- "This book will explain how the Chemical Plant is constructed, which blocks are valid to upgrade it and also how the upgrades work.",
-
- // Info
- "Solid Casings = Plant tier" + "\n" +
- "Machine Casings = Hatch tier" + "\n" +
- "Higher tier coils More Speed" + "\n" +
- "T1 50% , T2 100% , T3 150%, etc" + "\n",
-
- "Higher tier pipe casings boost parallel"+ "\n" +
- "and reduce catalyst consumption" + "\n" +
- "+2 parallel per tier, 20% extra chance of"+ "\n" +
- "not damaging catalyst per tier" + "\n",
-
-
- // Machine Casings
- "Valid Solid Machine Casings:" + "\n" +
- "0 - Strong Bronze" + "\n" +
- "1 - Solid Steel" + "\n" +
- "2 - Sturdy Aluminium" + "\n" +
- "3 - Clean Stainless Steel" + "\n" +
- "4 - Stable Titanium" + "\n" +
- "5 - Robust Tungstensteel" + "\n" +
- "6 - Vigorous Laurenium" + "\n" +
- "7 - Rugged Botmium",
-
- // Machine Casings
- "Valid Tiered Machine Casings:" + "\n" + "\n" +
- "1 - " + GT_Values.VN[0] + "\n" +
- "2 - " + GT_Values.VN[1] + "\n" +
- "3 - " + GT_Values.VN[2] + "\n" +
- "4 - " + GT_Values.VN[3] + "\n" +
- "5 - " + GT_Values.VN[4] + "\n" +
- "6 - " + GT_Values.VN[5] + "\n" +
- "7 - " + GT_Values.VN[6] + "\n" +
- "8 - " + GT_Values.VN[7] + "\n" +
- "9 - " + GT_Values.VN[8] + "\n" +
- "10 - " + GT_Values.VN[9],
-
- // Pipe Casings
- "Valid Pipe Casings:" + "\n" + "\n" +
- "1 - Bronze" + "\n" +
- "2 - Steel" + "\n" +
- "3 - Titanium" + "\n" +
- "4 - Tungstensteel",
-
- //Coils
- "Valid Coils:" + "\n" + "\n" +
- "1 - Cupronickel" + "\n" +
- "2 - Kanthal" + "\n" +
- "3 - Nichrome" + "\n" +
- "4 - Tungstensteel" + "\n" +
- "5 - HSS-G" + "\n" +
- "6 - Naquadah" + "\n" +
- "7 - Naquadah Alloy",
-
- // Requirements
- "Multiblock Requirements:" + "\n" + "\n" +
- "27x Coils" + "\n" +
- "18x Pipe Casings" + "\n" +
- "57x Tiered Machine Casings" + "\n" +
- "80+ Solid Casings" + "\n" +
- "1x Catalyst Housing (Catalysts cannot go inside an Input Bus)",
-
- // Construction Guide
- "Construction Guide Pt1:" + "\n" + "\n" +
- "Controller is placed on a middle casing in the bottom layer" + "\n" +
- "Hatches can only be placed on the bottom layer edges",
-
- "Construction Guide Pt2:" + "\n" + "\n" +
- "7x7x7 Hollow frame of solid casings" + "\n" +
- "5x1x5 layer of solid casings (fills in top layer)" + "\n" +
- "5x1x5 layer of machine casings (fills in bottom layer)",
-
- "Construction Guide Pt3:" + "\n" +
- "In the central 3x5x3:" + "\n" +
- "3x1x3 layer of Coils, surrounded by ring of Machine Casings" + "\n" +
- "3x1x3 layer of Pipe Casings" + "\n" +
- "3x1x3 layer of Coils" + "\n" +
- "3x1x3 layer of Pipe Casings" + "\n" +
- "3x1x3 layer of Coils, surrounded by ring of Machine Casings",
-
- // Construction Guide Info
- "Information:" + "\n" + "\n" +
- "A = Air" + "\n" +
- "X = Solid Casing" + "\n" +
- "M = Machine Casing" + "\n" +
- "P = Pipe Casing" + "\n" +
- "C = Coil Casing",
-
- "Layer 1:" + "\n" + "\n" +
- "XXXXXXX" + "\n" +
- "XMMMMMX" + "\n" +
- "XMMMMMX" + "\n" +
- "XMMMMMX" + "\n" +
- "XMMMMMX" + "\n" +
- "XMMMMMX" + "\n" +
- "XXXXXXX",
-
- "Layer 2:" + "\n" + "\n" +
- "AAAAAAA" + "\n" +
- "AMMMMMA" + "\n" +
- "AMCCCMA" + "\n" +
- "AMCCCMA" + "\n" +
- "AMCCCMA" + "\n" +
- "AMMMMMA" + "\n" +
- "AAAAAAA",
-
- "Layer 3:" + "\n" + "\n" +
- "AAAAAAA" + "\n" +
- "AAAAAAA" + "\n" +
- "AAPPPAA" + "\n" +
- "AAPPPAA" + "\n" +
- "AAPPPAA" + "\n" +
- "AAAAAAA" + "\n" +
- "AAAAAAA",
-
- "Layer 4:" + "\n" + "\n" +
- "AAAAAAA" + "\n" +
- "AAAAAAA" + "\n" +
- "AACCCAA" + "\n" +
- "AACCCAA" + "\n" +
- "AACCCAA" + "\n" +
- "AAAAAAA" + "\n" +
- "AAAAAAA",
-
- "Layer 5:" + "\n" + "\n" +
- "AAAAAAA" + "\n" +
- "AAAAAAA" + "\n" +
- "AAPPPAA" + "\n" +
- "AAPPPAA" + "\n" +
- "AAPPPAA" + "\n" +
- "AAAAAAA" + "\n" +
- "AAAAAAA",
-
- "Layer 6:" + "\n" + "\n" +
- "AAAAAAA" + "\n" +
- "AMMMMMA" + "\n" +
- "AMCCCMA" + "\n" +
- "AMCCCMA" + "\n" +
- "AMCCCMA" + "\n" +
- "AMMMMMA" + "\n" +
- "AAAAAAA",
-
- "Layer 7:" + "\n" + "\n" +
- "XXXXXXX" + "\n" +
- "XXXXXXX" + "\n" +
- "XXXXXXX" + "\n" +
- "XXXXXXX" + "\n" +
- "XXXXXXX" + "\n" +
- "XXXXXXX" + "\n" +
- "XXXXXXX",
- });
-
- }
-
-
-
-
- public static ItemStack ItemBookWritten_ThermalBoiler;
- public static ItemStack ItemBookWritten_NuclearManual;
- public static ItemStack ItemBookWritten_ModularBaubles;
- public static ItemStack ItemBookWritten_MultiPowerStorage;
- public static ItemStack ItemBookWritten_MultiMachineManual;
- public static ItemStack ItemBookWritten_MultiChemicalPlant;
-
- public static void runLater(){
- ItemBookWritten_ThermalBoiler = ItemUtils.simpleMetaStack(ModItems.itemCustomBook, 0, 1);
- ItemBookWritten_MultiPowerStorage = ItemUtils.simpleMetaStack(ModItems.itemCustomBook, 1, 1);
- ItemBookWritten_ModularBaubles = ItemUtils.simpleMetaStack(ModItems.itemCustomBook, 2, 1);
- ItemBookWritten_MultiMachineManual = ItemUtils.simpleMetaStack(ModItems.itemCustomBook, 3, 1);
- ItemBookWritten_NuclearManual = ItemUtils.simpleMetaStack(ModItems.itemCustomBook, 4, 1);
- ItemBookWritten_MultiChemicalPlant = ItemUtils.simpleMetaStack(ModItems.itemCustomBook, 5, 1);
-
- //Multiblock Manuals
- RecipeUtils.addShapelessGregtechRecipe(new ItemStack[]{ItemUtils.getSimpleStack(Items.writable_book), ItemUtils.getSimpleStack(Items.lava_bucket)}, ItemBookWritten_ThermalBoiler);
- RecipeUtils.addShapelessGregtechRecipe(new ItemStack[]{ItemUtils.getSimpleStack(Items.writable_book), ItemUtils.getItemStackOfAmountFromOreDict(CI.craftingToolWrench, 1)}, ItemBookWritten_MultiMachineManual);
- RecipeUtils.addShapelessGregtechRecipe(new ItemStack[]{ItemUtils.getSimpleStack(Items.writable_book), ItemUtils.getItemStackOfAmountFromOreDict("wireGt01Tin", 1)}, ItemBookWritten_MultiPowerStorage);
- RecipeUtils.addShapelessGregtechRecipe(new ItemStack[]{ItemUtils.getSimpleStack(Items.writable_book), ItemUtils.getItemStackOfAmountFromOreDict("dustUranium", 1)}, ItemBookWritten_NuclearManual);
- RecipeUtils.addShapelessGregtechRecipe(new ItemStack[]{ItemUtils.getSimpleStack(Items.writable_book), ItemUtils.getItemStackOfAmountFromOreDict("wireGt01Copper", 1)}, ItemBookWritten_MultiChemicalPlant);
-
- for (int i=0;i<mBookKeeperCount;i++){
- ItemStack bookstack = ItemUtils.simpleMetaStack(ModItems.itemCustomBook, i, 1);
- GT_OreDictUnificator.registerOre("bookWritten", bookstack);
- GT_OreDictUnificator.registerOre("craftingBook", bookstack);
- }
-
- }
-
- private static BookTemplate writeBookTemplate(String aMapping, String aTitle, String aAuthor, String[] aPages){
- mBookKeeperCount++;
- BookTemplate mTemp = new BookTemplate(mBookKeeperCount, aMapping, aTitle, aAuthor, aPages);
- mBookMap.put(mBookKeeperCount-1, mTemp);
- return mTemp;
- }
-
- public static class BookTemplate {
- public final int mMeta;
- public final String mMapping;
- public final String mTitle;
- public final String mAuthor;
- public final String[] mPages;
-
- BookTemplate(int aMeta, String aMapping, String aTitle, String aAuthor, String[] aPages){
- this.mMeta = aMeta;
- this.mMapping = aMapping;
- this.mTitle = aTitle;
- this.mAuthor = aAuthor;
- this.mPages = aPages;
- }
- }
-}
-
-
diff --git a/src/Java/gtPlusPlus/core/handler/BurnableFuelHandler.java b/src/Java/gtPlusPlus/core/handler/BurnableFuelHandler.java
deleted file mode 100644
index 82bcdc84e6..0000000000
--- a/src/Java/gtPlusPlus/core/handler/BurnableFuelHandler.java
+++ /dev/null
@@ -1,35 +0,0 @@
-package gtPlusPlus.core.handler;
-
-import cpw.mods.fml.common.IFuelHandler;
-
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-
-import gtPlusPlus.api.objects.data.Pair;
-import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.util.minecraft.ItemUtils;
-
-public class BurnableFuelHandler implements IFuelHandler{
-
- @Override
- public int getBurnTime(ItemStack aStack) {
- //Iterate over my burnables.
- for (Pair<Integer, ItemStack> temp : CORE.burnables) {
- int aStackID = Item.getIdFromItem(aStack.getItem());
- int burnID = Item.getIdFromItem(temp.getValue().getItem());
- if (aStackID == burnID){
- int burn = temp.getKey();
- ItemStack fuel = temp.getValue();
- ItemStack testItem = ItemUtils.getSimpleStack(fuel, aStack.stackSize);
-
- if (aStack.isItemEqual(testItem)){
- return burn;
- }
- }
- }
-
- //If it's not my fuel, return 0.
- return 0;
- }
-
-}
diff --git a/src/Java/gtPlusPlus/core/handler/COMPAT_HANDLER.java b/src/Java/gtPlusPlus/core/handler/COMPAT_HANDLER.java
deleted file mode 100644
index 4fda17ee8a..0000000000
--- a/src/Java/gtPlusPlus/core/handler/COMPAT_HANDLER.java
+++ /dev/null
@@ -1,316 +0,0 @@
-package gtPlusPlus.core.handler;
-
-import static gtPlusPlus.core.lib.LoadedMods.Gregtech;
-
-import java.util.LinkedList;
-import java.util.Queue;
-import java.util.Set;
-
-import cpw.mods.fml.common.event.FMLLoadCompleteEvent;
-import gregtech.api.enums.GT_Values;
-import gregtech.api.util.GT_OreDictUnificator;
-import gtPlusPlus.api.interfaces.RunnableWithInfo;
-import gtPlusPlus.api.objects.Logger;
-import gtPlusPlus.api.objects.data.AutoMap;
-import gtPlusPlus.api.objects.minecraft.ItemPackage;
-import gtPlusPlus.core.common.compat.COMPAT_BigReactors;
-import gtPlusPlus.core.common.compat.COMPAT_CompactWindmills;
-import gtPlusPlus.core.common.compat.COMPAT_EnderIO;
-import gtPlusPlus.core.common.compat.COMPAT_ExtraUtils;
-import gtPlusPlus.core.common.compat.COMPAT_HarvestCraft;
-import gtPlusPlus.core.common.compat.COMPAT_IC2;
-import gtPlusPlus.core.common.compat.COMPAT_MorePlanets;
-import gtPlusPlus.core.common.compat.COMPAT_OpenBlocks;
-import gtPlusPlus.core.common.compat.COMPAT_PneumaticCraft;
-import gtPlusPlus.core.common.compat.COMPAT_RFTools;
-import gtPlusPlus.core.common.compat.COMPAT_Railcraft;
-import gtPlusPlus.core.common.compat.COMPAT_SimplyJetpacks;
-import gtPlusPlus.core.common.compat.COMPAT_Thaumcraft;
-import gtPlusPlus.core.common.compat.COMPAT_Witchery;
-import gtPlusPlus.core.handler.Recipes.LateRegistrationHandler;
-import gtPlusPlus.core.handler.Recipes.RegistrationHandler;
-import gtPlusPlus.core.item.ModItems;
-import gtPlusPlus.core.lib.LoadedMods;
-import gtPlusPlus.core.material.Material;
-import gtPlusPlus.core.material.MaterialGenerator;
-import gtPlusPlus.core.recipe.RECIPES_Extruder;
-import gtPlusPlus.core.recipe.RECIPES_GREGTECH;
-import gtPlusPlus.core.recipe.RECIPES_LaserEngraver;
-import gtPlusPlus.core.recipe.ShapedRecipeObject;
-import gtPlusPlus.core.util.minecraft.ItemUtils;
-import gtPlusPlus.core.util.minecraft.RecipeUtils;
-import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList;
-import gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic.GregtechMetaGarbageCollector;
-import gtPlusPlus.xmod.gregtech.loaders.RecipeGen_FluidCanning;
-import gtPlusPlus.xmod.gregtech.loaders.RecipeGen_Recycling;
-import gtPlusPlus.xmod.gregtech.registration.gregtech.*;
-import net.minecraft.item.ItemStack;
-
-public class COMPAT_HANDLER {
-
- public static Queue<Object> RemoveRecipeQueue = new LinkedList<>();
- public static Queue<ShapedRecipeObject> AddRecipeQueue = new LinkedList<>();
- public static Boolean areInitItemsLoaded = false;
-
-
- public static void registerMyModsOreDictEntries(){
-
- Logger.INFO("Registering Materials with OreDict.");
- //In-house
-
- //tools
- GT_OreDictUnificator.registerOre("craftingToolSandHammer", new ItemStack(ModItems.itemSandstoneHammer));
-
- for(int i=1; i<=10; i++){
- GT_OreDictUnificator.registerOre("bufferCore_"+GT_Values.VN[i-1], new ItemStack(ItemUtils.getItemFromFQRN("miscutils:item.itemBufferCore"+i)));
- }
- }
-
- public static void registerGregtechMachines() {
- if (Gregtech) {
-
- //Debug
- GregtechItemList.Garbage_Collector_Debug_Machine.set(
- new GregtechMetaGarbageCollector(
- "garbagecollector.01.tier.single",
- "JVM Garbage Collector",
- "Useful for debugging or smoother performance on local servers").getStackForm(1L));
-
-
- //Free IDs
- /*
- ---
- 859
- to
- 868
- ---
- 911
- to
- 940
- */
-
- new RECIPES_LaserEngraver();
- new RECIPES_Extruder();
- GregtechGeneratorsULV.run();
- GregtechEnergyBuffer.run();
- GregtechLFTR.run();
- GregtechSteamCondenser.run();
- GregtechSafeBlock.run();
- //GregtechSuperConductionPoint.run();
- GregtechIronBlastFurnace.run();
- GregtechIndustrialCentrifuge.run();
- GregtechIndustrialCokeOven.run();
- GregtechIndustrialPlatePress.run();
- GregtechRocketFuelGenerator.run();
- GregtechIndustrialElectrolyzer.run();
- GregtechIndustrialMacerator.run();
- GregtechIndustrialWiremill.run();
- GregtechIndustrialMassFabricator.run();
- GregtechIndustrialBlastSmelter.run();
- GregtechSolarGenerators.run();
- GregtechPowerSubStation.run();
- GregtechDehydrator.run();
- GregtechAdvancedBoilers.run();
- GregtechPollutionDevices.run();
- GregtechTieredFluidTanks.run();
- //GregtechIndustrialMultiTank.run();
- GregtechGeothermalThermalGenerator.run();
- Gregtech4Content.run();
- GregtechIndustrialFuelRefinery.run();
- GregtechTreeFarmerTE.run();
- GregtechIndustrialTreeFarm.run();
- GregtechIndustrialSifter.run();
- GregtechSimpleWasher.run();
- GregtechRTG.run();
- GregtechCyclotron.run();
- GregtechHiAmpTransformer.run();
- GregtechIndustrialThermalCentrifuge.run();
- GregtechIndustrialWashPlant.run();
- GregtechSemiFluidgenerators.run();
- GregtechAdvancedMixer.run();
- GregtechWirelessChargers.run();
- GregtechIndustrialGeneratorArray.run();
- GregtechIndustrialCuttingFactory.run();
- //GregtechMiniRaFusion.run();
- GregtechComponentAssembler.run();
- //GregtechTeslaTower.run();
- GregtechSuperChests.run();
- GregtechIndustrialFishPond.run();
- GregtechTieredChunkloaders.run();
- GregtechIndustrialExtruder.run();
- GregtechIndustrialMultiMachine.run();
- //GregtechBedrockPlatforms.run();
- GregtechBufferDynamos.run();
- GregtechAmazonWarehouse.run();
- GregtechFactoryGradeReplacementMultis.run();
- GregtechThaumcraftDevices.run();
- GregtechThreadedBuffers.run();
- GregtechIndustrialMixer.run();
- GregtechCustomHatches.run();
- //GregtechNaqReactor.run();
- GregtechIndustrialArcFurnace.run();
- //GregtechSolarTower.run();
- GregtechLargeTurbinesAndHeatExchanger.run();
- GregtechPowerBreakers.run();
- GregtechFluidReactor.run();
- GregtechAlgaeContent.run();
- GregtechIndustrialAlloySmelter.run();
- GregtechIsaMill.run();
- GregtechSteamMultis.run();
- //GregtechIndustrialElementDuplicator.run();
-
- //New Horizons Content
- NewHorizonsAccelerator.run();
- }
-
- }
-
- //InterMod
- public static void intermodOreDictionarySupport(){
-
- if (LoadedMods.Big_Reactors){
- COMPAT_BigReactors.OreDict();
- }
- if (LoadedMods.EnderIO){
- COMPAT_EnderIO.OreDict();
- }
- if (LoadedMods.MorePlanets){
- COMPAT_MorePlanets.OreDict();
- }
- if (LoadedMods.OpenBlocks){
- COMPAT_OpenBlocks.OreDict();
- }
- if (LoadedMods.Railcraft){
- COMPAT_Railcraft.OreDict();
- }
- if (LoadedMods.Simply_Jetpacks){
- COMPAT_SimplyJetpacks.OreDict();
- }
- if (LoadedMods.RFTools){
- COMPAT_RFTools.OreDict();
- }
- if (LoadedMods.Thaumcraft){
- COMPAT_Thaumcraft.OreDict();
- }
- if (LoadedMods.Extra_Utils){
- COMPAT_ExtraUtils.OreDict();
- }
- if (LoadedMods.PneumaticCraft){
- COMPAT_PneumaticCraft.OreDict();
- }
- if (LoadedMods.CompactWindmills){
- COMPAT_CompactWindmills.OreDict();
- }
- if (LoadedMods.IndustrialCraft2){
- COMPAT_IC2.OreDict();
- }
- if (LoadedMods.PamsHarvestcraft){
- COMPAT_HarvestCraft.OreDict();
- }
- if (LoadedMods.Witchery) {
- COMPAT_Witchery.OreDict();
- }
- }
-
- public static void RemoveRecipesFromOtherMods(){
- //Removal of Recipes
- for(final Object item : RemoveRecipeQueue){
- RecipeUtils.removeCraftingRecipe(item);
- }
- }
-
- public static void InitialiseHandlerThenAddRecipes(){
- RegistrationHandler.run();
- }
- public static void InitialiseLateHandlerThenAddRecipes(){
- LateRegistrationHandler.run();
- }
-
- public static void startLoadingGregAPIBasedRecipes(){
- //Add hand-made recipes
- RECIPES_GREGTECH.run();
- //Add autogenerated Recipes from Item Components
- for (Set<RunnableWithInfo<Material>> m : MaterialGenerator.mRecipeMapsToGenerate) {
- for (RunnableWithInfo<Material> r : m) {
- try {
- r.run();
- Logger.INFO("[FIND] "+r.getInfoData().getLocalizedName()+" recipes generated.");
- }
- catch (Throwable t) {
- t.printStackTrace();
- Logger.INFO("[ERROR] "+r.getInfoData().getLocalizedName()+" recipes failed to generated.");
- }
- }
- }
- RecipeGen_Recycling.executeGenerators();
- runQueuedMisc();
-
- // Do Fluid Canning Last, because they're not executed on demand, but rather queued.
- RecipeGen_FluidCanning.init();
- }
-
-
-
- public static void onLoadComplete(FMLLoadCompleteEvent event) {
- runQueuedOnLoadComplete(event);
- }
-
- public static final AutoMap<RunnableWithInfo<String>> mRecipesToGenerate = new AutoMap<RunnableWithInfo<String>>();
- public static final AutoMap<RunnableWithInfo<String>> mGtRecipesToGenerate = new AutoMap<RunnableWithInfo<String>>();
-
- public static final AutoMap<RunnableWithInfo<String>> mObjectsToRunInPostInit = new AutoMap<RunnableWithInfo<String>>();
- public static final AutoMap<ItemPackage> mObjectsToRunInOnLoadComplete = new AutoMap<ItemPackage>();
-
- public static void runQueuedRecipes() {
- //Add autogenerated Recipes from Item Components
- for (RunnableWithInfo<String> m : mRecipesToGenerate) {
- try {
- m.run();
- }
- catch (Throwable t) {
- t.printStackTrace();
- Logger.INFO("[ERROR] "+m.getInfoData()+" recipe failed to generated.");
- }
-
- }
- for (RunnableWithInfo<String> m : mGtRecipesToGenerate) {
- try {
- m.run();
- }
- catch (Throwable t) {
- t.printStackTrace();
- Logger.INFO("[ERROR] "+m.getInfoData()+" recipe failed to generated.");
- }
-
- }
- }
-
- public static void runQueuedMisc() {
- for (RunnableWithInfo<String> m : mObjectsToRunInPostInit) {
- try {
- m.run();
- }
- catch (Throwable t) {
- t.printStackTrace();
- Logger.INFO("[ERROR] "+m.getInfoData());
- }
-
- }
- }
-
- /**
- * Generally used to register GT recipe map changes after they've been populated.
- */
- public static void runQueuedOnLoadComplete(FMLLoadCompleteEvent event) {
- for (ItemPackage m : mObjectsToRunInOnLoadComplete) {
- try {
- m.onLoadComplete(event);
- }
- catch (Throwable t) {
- t.printStackTrace();
- Logger.INFO("[ERROR] "+m.getInfoData());
- }
-
- }
- }
-}
diff --git a/src/Java/gtPlusPlus/core/handler/COMPAT_IntermodStaging.java b/src/Java/gtPlusPlus/core/handler/COMPAT_IntermodStaging.java
deleted file mode 100644
index 9a1b551d30..0000000000
--- a/src/Java/gtPlusPlus/core/handler/COMPAT_IntermodStaging.java
+++ /dev/null
@@ -1,91 +0,0 @@
-package gtPlusPlus.core.handler;
-
-import cpw.mods.fml.common.event.FMLInitializationEvent;
-import cpw.mods.fml.common.event.FMLLoadCompleteEvent;
-import cpw.mods.fml.common.event.FMLPostInitializationEvent;
-import cpw.mods.fml.common.event.FMLPreInitializationEvent;
-import gtPlusPlus.xmod.bartcrops.HANDLER_CropsPlusPlus;
-import gtPlusPlus.xmod.bop.HANDLER_BiomesOPlenty;
-import gtPlusPlus.xmod.computronics.HANDLER_Computronics;
-import gtPlusPlus.xmod.forestry.HANDLER_FR;
-import gtPlusPlus.xmod.galacticraft.HANDLER_GalactiCraft;
-import gtPlusPlus.xmod.gregtech.HANDLER_GT;
-import gtPlusPlus.xmod.growthcraft.HANDLER_GC;
-import gtPlusPlus.xmod.ic2.HANDLER_IC2;
-import gtPlusPlus.xmod.ob.HANDLER_OpenBlocks;
-import gtPlusPlus.xmod.railcraft.HANDLER_Railcraft;
-import gtPlusPlus.xmod.reliquary.HANDLER_Reliquary;
-import gtPlusPlus.xmod.sc2.HANDLER_SC2;
-import gtPlusPlus.xmod.sol.HANDLER_SpiceOfLife;
-import gtPlusPlus.xmod.thaumcraft.HANDLER_Thaumcraft;
-import gtPlusPlus.xmod.thermalfoundation.HANDLER_TF;
-import gtPlusPlus.xmod.tinkers.HANDLER_Tinkers;
-
-public class COMPAT_IntermodStaging {
-
- public static void preInit(FMLPreInitializationEvent preinit){
- HANDLER_GT.preInit();
- HANDLER_GC.preInit();
- HANDLER_TF.preInit();
- HANDLER_FR.preInit();
- HANDLER_IC2.preInit();
- HANDLER_Computronics.preInit();
- HANDLER_BiomesOPlenty.preInit();
- //HANDLER_Mekanism.preInit();
- HANDLER_Thaumcraft.preInit();
- HANDLER_Tinkers.preInit();
- HANDLER_SC2.preInit();
- HANDLER_GalactiCraft.preInit();
- HANDLER_CropsPlusPlus.preInit(preinit);
- HANDLER_Railcraft.preInit();
- HANDLER_Reliquary.preInit();
- HANDLER_OpenBlocks.preInit();
- HANDLER_SpiceOfLife.preInit();
- }
-
- public static void init(FMLInitializationEvent init){
- HANDLER_GT.init();
- HANDLER_GC.init();
- HANDLER_TF.init();
- HANDLER_FR.Init();
- HANDLER_IC2.init();
- HANDLER_Computronics.init();
- HANDLER_BiomesOPlenty.init();
- //HANDLER_Mekanism.init();
- HANDLER_Thaumcraft.init();
- HANDLER_Tinkers.init();
- HANDLER_SC2.init();
- HANDLER_GalactiCraft.init();
- HANDLER_CropsPlusPlus.init(init);
- HANDLER_Railcraft.init();
- HANDLER_Reliquary.init();
- HANDLER_OpenBlocks.init();
- HANDLER_SpiceOfLife.init();
- }
-
- public static void postInit(FMLPostInitializationEvent postinit){
- HANDLER_GT.postInit();
- HANDLER_GC.postInit();
- HANDLER_TF.postInit();
- HANDLER_FR.postInit();
- HANDLER_IC2.postInit();
- HANDLER_Computronics.postInit();
- HANDLER_BiomesOPlenty.postInit();
- //HANDLER_Mekanism.postInit();
- HANDLER_Thaumcraft.postInit();
- HANDLER_Tinkers.postInit();
- HANDLER_SC2.postInit();
- HANDLER_GalactiCraft.postInit();
- HANDLER_CropsPlusPlus.postInit(postinit);
- HANDLER_Railcraft.postInit();
- HANDLER_Reliquary.postInit();
- HANDLER_OpenBlocks.postInit();
- HANDLER_SpiceOfLife.postInit();
- }
-
- public static void onLoadComplete(FMLLoadCompleteEvent event) {
- HANDLER_GT.onLoadComplete(event);
- }
-
-
-}
diff --git a/src/Java/gtPlusPlus/core/handler/CraftingManager.java b/src/Java/gtPlusPlus/core/handler/CraftingManager.java
deleted file mode 100644
index 6fb580cc32..0000000000
--- a/src/Java/gtPlusPlus/core/handler/CraftingManager.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package gtPlusPlus.core.handler;
-
-public class CraftingManager {
-
- public static void mainRegistry() {
- addCraftingRecipies();
- addSmeltingRecipies();
- }
-
- public static void addCraftingRecipies() {
-
- }
-
- public static void addSmeltingRecipies() {
-
- }
-}
diff --git a/src/Java/gtPlusPlus/core/handler/EnumHelperHandler.java b/src/Java/gtPlusPlus/core/handler/EnumHelperHandler.java
deleted file mode 100644
index d164efa3d7..0000000000
--- a/src/Java/gtPlusPlus/core/handler/EnumHelperHandler.java
+++ /dev/null
@@ -1,21 +0,0 @@
-package gtPlusPlus.core.handler;
-
-import gtPlusPlus.core.lib.LoadedMods;
-import gtPlusPlus.xmod.gregtech.HANDLER_GT;
-import gtPlusPlus.xmod.ic2.CustomInternalName;
-
-public class EnumHelperHandler {
-
- public static void init() {
-
- if (LoadedMods.IndustrialCraft2) {
- CustomInternalName.init();
- }
-
- if (LoadedMods.Gregtech) {
- HANDLER_GT.addNewOrePrefixes();
- }
-
- }
-
-}
diff --git a/src/Java/gtPlusPlus/core/handler/GuiHandler.java b/src/Java/gtPlusPlus/core/handler/GuiHandler.java
deleted file mode 100644
index 0567d6c5dd..0000000000
--- a/src/Java/gtPlusPlus/core/handler/GuiHandler.java
+++ /dev/null
@@ -1,231 +0,0 @@
-package gtPlusPlus.core.handler;
-
-import cpw.mods.fml.common.network.IGuiHandler;
-import cpw.mods.fml.common.network.NetworkRegistry;
-import gtPlusPlus.GTplusplus;
-import gtPlusPlus.api.objects.Logger;
-import gtPlusPlus.core.block.machine.Machine_SuperJukebox.TileEntitySuperJukebox;
-import gtPlusPlus.core.container.*;
-import gtPlusPlus.core.container.box.LunchBoxContainer;
-import gtPlusPlus.core.container.box.MagicBagContainer;
-import gtPlusPlus.core.container.box.ToolBoxContainer;
-import gtPlusPlus.core.gui.beta.Gui_ID_Registry;
-import gtPlusPlus.core.gui.beta.MU_GuiId;
-import gtPlusPlus.core.gui.item.GuiBaseBackpack;
-import gtPlusPlus.core.gui.item.GuiBaseGrindle;
-import gtPlusPlus.core.gui.item.box.LunchBoxGui;
-import gtPlusPlus.core.gui.item.box.MagicBagGui;
-import gtPlusPlus.core.gui.item.box.ToolBoxGui;
-import gtPlusPlus.core.gui.machine.*;
-import gtPlusPlus.core.interfaces.IGuiManager;
-import gtPlusPlus.core.inventories.BaseInventoryBackpack;
-import gtPlusPlus.core.inventories.BaseInventoryGrindle;
-import gtPlusPlus.core.inventories.box.LunchBoxInventory;
-import gtPlusPlus.core.inventories.box.MagicBagInventory;
-import gtPlusPlus.core.inventories.box.ToolBoxInventory;
-import gtPlusPlus.core.tileentities.base.TileEntityBase;
-import gtPlusPlus.core.tileentities.general.*;
-import gtPlusPlus.core.tileentities.machines.TileEntityModularityTable;
-import gtPlusPlus.core.tileentities.machines.TileEntityPestKiller;
-import gtPlusPlus.core.tileentities.machines.TileEntityProjectTable;
-import gtPlusPlus.core.tileentities.machines.TileEntityRoundRobinator;
-import gtPlusPlus.core.tileentities.machines.TileEntityTradeTable;
-import gtPlusPlus.core.tileentities.machines.TileEntityWorkbench;
-import gtPlusPlus.core.tileentities.machines.TileEntityWorkbenchAdvanced;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.util.ChunkCoordinates;
-import net.minecraft.world.World;
-
-public class GuiHandler implements IGuiHandler {
-
- public static final int GUI1 = 0; // Project Table
- public static final int GUI2 = 1; // Helium Generator
- public static final int GUI3 = 2; // BackpackHandler
- public static final int GUI4 = 3; // Workbench
- public static final int GUI5 = 4; // Workbench Adv
- public static final int GUI6 = 5; // Fish trap
- public static final int GUI7 = 6; // Trade table
- public static final int GUI8 = 7; // Circuit Programmer
- public static final int GUI9 = 8; // Grindle
- public static final int GUI10 = 9; // Universal Toolbox
- public static final int GUI11 = 10; // Auto Lunchbox
- public static final int GUI12 = 11; // Bag for Magic Tools
- public static final int GUI13 = 12; // Decayables Chest
- public static final int GUI14 = 13; // Super Jukebox
- public static final int GUI15 = 14; // Pest Killer
- public static final int GUI16 = 15; // Round-Robinator
- public static final int GUI17 = 16; // Egg Box
- public static final int GUI18 = 17; // Volumetric Flask Setter
-
- public static void init() {
-
- Logger.INFO("Registering GUIs.");
- NetworkRegistry.INSTANCE.registerGuiHandler(GTplusplus.instance, new GuiHandler());
- // Register GuiHandler
- // NetworkRegistry.INSTANCE.registerGuiHandler(GTplusplus.instance, new
- // GuiHandler());
- }
-
- @Override // ContainerModTileEntity
- public Object getServerGuiElement(final int ID, final EntityPlayer player, final World world, final int x,
- final int y, final int z) {
- final TileEntity te = world.getTileEntity(x, y, z);
-
- if (te != null) {
- if (ID == GUI1) {
- return new Container_ProjectTable(player.inventory, (TileEntityProjectTable) te);
- } else if (ID == GUI2) {
- return new Container_ModularityTable(player.inventory, (TileEntityModularityTable) te);
- }
- }
-
- if (ID == GUI3) {
- // Use the player's held item to create the inventory
- return new Container_BackpackBase(player, player.inventory,
- new BaseInventoryBackpack(player.getHeldItem()));
- }
-
- if (te != null) {
- if (ID == GUI4) {
- return new Container_Workbench(player.inventory, (TileEntityWorkbench) te);
- } else if (ID == GUI5) {
- Logger.INFO("sad");
- return new Container_WorkbenchAdvanced(player.inventory, (TileEntityWorkbenchAdvanced) te);
-
- } else if (ID == GUI6) {
- return new Container_FishTrap(player.inventory, (TileEntityFishTrap) te);
- } else if (ID == GUI7) {
- return new Container_TradeTable(player.inventory, (TileEntityTradeTable) te);
- } else if (ID == GUI8) {
- return new Container_CircuitProgrammer(player.inventory, (TileEntityCircuitProgrammer) te);
- } else if (ID == GUI13) {
- return new Container_DecayablesChest(player.inventory, (TileEntityDecayablesChest) te);
- } else if (ID == GUI14) {
- return new Container_SuperJukebox(player.inventory, (TileEntitySuperJukebox) te);
- } else if (ID == GUI15) {
- return new Container_PestKiller(player.inventory, (TileEntityPestKiller) te);
- } else if (ID == GUI16) {
- return new Container_RoundRobinator(player.inventory, (TileEntityRoundRobinator) te);
- } else if (ID == GUI17) {
- return new Container_EggBox(player.inventory, (TileEntityEggBox) te);
- } else if (ID == GUI18) {
- return new Container_VolumetricFlaskSetter(player.inventory, (TileEntityVolumetricFlaskSetter) te);
- }
- }
-
- if (ID == GUI9) {
- return new Container_Grindle(player, player.inventory, new BaseInventoryGrindle(player.getHeldItem()));
- }
- // Tool, lunch, magic
- if (ID == GUI10) {
- return new ToolBoxContainer(player, player.inventory, new ToolBoxInventory(player.getHeldItem()));
- }
- if (ID == GUI11) {
- return new LunchBoxContainer(player, player.inventory, new LunchBoxInventory(player.getHeldItem()));
- }
- if (ID == GUI12) {
- return new MagicBagContainer(player, player.inventory, new MagicBagInventory(player.getHeldItem()));
- }
-
- return null;
- }
-
- @Override // GuiModTileEntity
- public Object getClientGuiElement(final int ID, final EntityPlayer player, final World world, final int x,
- final int y, final int z) {
- Logger.WARNING("getClientGuiElement Called by: " + player + ", in world: " + player.dimension + " at x:" + x
- + ", y:" + y + ", z:" + z + ".");
- final TileEntity te = world.getTileEntity(x, y, z);
- if (te != null) {
- if (ID == GUI1) {
- return new GUI_ProjectTable(player.inventory, (TileEntityProjectTable) te);
- } else if (ID == GUI2) {
- return new GUI_ModularityTable(player.inventory, (TileEntityModularityTable) te);
- }
- }
-
- if (ID == GUI3) {
- // We have to cast the new container as our custom class
- // and pass in currently held item for the inventory
- return new GuiBaseBackpack(new Container_BackpackBase(player, player.inventory,
- new BaseInventoryBackpack(player.getHeldItem())));
- }
-
- if (te != null) {
- if (ID == GUI4) {
- return new GUI_Workbench(player.inventory, (TileEntityWorkbench) te);
- } else if (ID == GUI5) {
- Logger.INFO("sad");
- return new GUI_WorkbenchAdvanced(player.inventory, (TileEntityWorkbenchAdvanced) te);
- } else if (ID == GUI6) {
- return new GUI_FishTrap(player.inventory, (TileEntityFishTrap) te);
- } else if (ID == GUI7) {
- return new GUI_TradeTable(player.inventory, (TileEntityTradeTable) te,
- ((TileEntityBase) te).getOwner());
- } else if (ID == GUI8) {
- return new GUI_CircuitProgrammer(player.inventory, (TileEntityCircuitProgrammer) te);
- } else if (ID == GUI13) {
- return new GUI_DecayablesChest(player.inventory, (TileEntityDecayablesChest) te);
- } else if (ID == GUI14) {
- return new GUI_SuperJukebox(player.inventory, (TileEntitySuperJukebox) te);
- } else if (ID == GUI15) {
- return new GUI_PestKiller(player.inventory, (TileEntityPestKiller) te);
- } else if (ID == GUI16) {
- return new GUI_RoundRobinator(player.inventory, (TileEntityRoundRobinator) te);
- } else if (ID == GUI17) {
- return new GUI_EggBox(player.inventory, (TileEntityEggBox) te);
- } else if (ID == GUI18) {
- return new GUI_VolumetricFlaskSetter(new Container_VolumetricFlaskSetter(player.inventory, (TileEntityVolumetricFlaskSetter) te));
- }
- }
-
- if (ID == GUI9) {
- return new GuiBaseGrindle(
- new Container_Grindle(player, player.inventory, new BaseInventoryGrindle(player.getHeldItem())));
- }
-
- // Tool, lunch, magic
- if (ID == GUI10) {
- return new ToolBoxGui(
- new ToolBoxContainer(player, player.inventory, new ToolBoxInventory(player.getHeldItem())));
- }
- if (ID == GUI11) {
- return new LunchBoxGui(
- new LunchBoxContainer(player, player.inventory, new LunchBoxInventory(player.getHeldItem())));
- }
- if (ID == GUI12) {
- return new MagicBagGui(
- new MagicBagContainer(player, player.inventory, new MagicBagInventory(player.getHeldItem())));
- }
-
- return null;
- }
-
- // New Methods
- public static void openGui(final EntityPlayer entityplayer, final IGuiManager guiHandler) {
- openGui(entityplayer, guiHandler, (short) 0);
- }
-
- public static void openGui(final EntityPlayer entityplayer, final IGuiManager guiHandler, final short data) {
- final int guiData = encodeGuiData(guiHandler, data);
- final ChunkCoordinates coordinates = guiHandler.getCoordinates();
- entityplayer.openGui(GTplusplus.instance, guiData, entityplayer.worldObj, coordinates.posX, coordinates.posY,
- coordinates.posZ);
- }
-
- private static int encodeGuiData(final IGuiManager guiHandler, final short data) {
- final MU_GuiId guiId = Gui_ID_Registry.getGuiIdForGuiHandler(guiHandler);
- return (data << 16) | guiId.getId();
- }
-
- private static MU_GuiId decodeGuiID(final int guiData) {
- final int guiId = guiData & 0xFF;
- return Gui_ID_Registry.getGuiId(guiId);
- }
-
- private static short decodeGuiData(final int guiId) {
- return (short) (guiId >> 16);
- }
-
-} \ No newline at end of file
diff --git a/src/Java/gtPlusPlus/core/handler/OldCircuitHandler.java b/src/Java/gtPlusPlus/core/handler/OldCircuitHandler.java
deleted file mode 100644
index e20e13a337..0000000000
--- a/src/Java/gtPlusPlus/core/handler/OldCircuitHandler.java
+++ /dev/null
@@ -1,66 +0,0 @@
-package gtPlusPlus.core.handler;
-
-import static gtPlusPlus.core.lib.CORE.ConfigSwitches.enableOldGTcircuits;
-
-import java.lang.reflect.Field;
-import java.util.HashSet;
-
-import org.apache.commons.lang3.reflect.FieldUtils;
-
-import gregtech.api.enums.GT_Values;
-import gregtech.api.util.EmptyRecipeMap;
-import gregtech.api.util.GT_Recipe;
-import gregtech.api.util.GT_Recipe.GT_Recipe_Map;
-
-import gtPlusPlus.api.objects.Logger;
-import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.recipe.RECIPES_Old_Circuits;
-import gtPlusPlus.core.util.reflect.ReflectionUtils;
-import gtPlusPlus.xmod.gregtech.common.items.MetaGeneratedGregtechItems;
-
-public class OldCircuitHandler {
-
- public static void preInit(){
- if (enableOldGTcircuits && CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK && !CORE.GTNH){
- removeCircuitRecipeMap(); //Bye shitty recipes.
- }
- }
-
- public static void init(){
-
- }
-
- public static void postInit(){
- if (enableOldGTcircuits && CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK && !CORE.GTNH){
- RECIPES_Old_Circuits.handleCircuits();
- new RECIPES_Old_Circuits();
- }
- }
-
- public static boolean addCircuitItems() {
- if (enableOldGTcircuits && CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK && !CORE.GTNH){
- return MetaGeneratedGregtechItems.INSTANCE.registerOldCircuits();
- }
- return false;
- }
-
- private static boolean removeCircuitRecipeMap(){
- if (enableOldGTcircuits && CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK && !CORE.GTNH){
- try {
- Logger.INFO("[Old Feature - Circuits] Trying to override the Circuit Assembler Recipe map, so that no recipes for new circuits get added.");
- ReflectionUtils.setFinalStatic(GT_Recipe_Map.class.getDeclaredField("sCircuitAssemblerRecipes"), new EmptyRecipeMap(new HashSet<GT_Recipe>(0), "gt.recipe.removed", "Removed", null, GT_Values.RES_PATH_GUI + "basicmachines/Default", 0, 0, 0, 0, 0, GT_Values.E, 0, GT_Values.E, true, false));
- Field jaffar = GT_Recipe_Map.class.getDeclaredField("sCircuitAssemblerRecipes");
- FieldUtils.removeFinalModifier(jaffar, true);
- jaffar.set(null, new EmptyRecipeMap(new HashSet<GT_Recipe>(0), "gt.recipe.removed", "Removed", null, GT_Values.RES_PATH_GUI + "basicmachines/Default", 0, 0, 0, 0, 0, GT_Values.E, 0, GT_Values.E, true, false));
- Logger.INFO("[Old Feature - Circuits] Successfully replaced circuit assembler recipe map with one that cannot hold recipes.");
- }
- catch (Exception e) {
- Logger.INFO("[Old Feature - Circuits] Failed removing circuit assembler recipe map.");
- return false;
- }
- return true;
- }
- return false;
- }
-
-}
diff --git a/src/Java/gtPlusPlus/core/handler/PacketHandler.java b/src/Java/gtPlusPlus/core/handler/PacketHandler.java
deleted file mode 100644
index 382b82df29..0000000000
--- a/src/Java/gtPlusPlus/core/handler/PacketHandler.java
+++ /dev/null
@@ -1,91 +0,0 @@
-package gtPlusPlus.core.handler;
-
-import cpw.mods.fml.common.network.NetworkRegistry;
-import cpw.mods.fml.common.network.simpleimpl.IMessage;
-import cpw.mods.fml.common.network.simpleimpl.SimpleNetworkWrapper;
-import cpw.mods.fml.relauncher.Side;
-import gtPlusPlus.api.objects.Logger;
-import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.network.handler.AbstractClientMessageHandler;
-import gtPlusPlus.core.network.packet.AbstractPacket;
-import gtPlusPlus.core.network.packet.Packet_VolumetricFlaskGui;
-import gtPlusPlus.core.network.packet.Packet_VolumetricFlaskGui2;
-import gtPlusPlus.core.util.reflect.ReflectionUtils;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.entity.player.EntityPlayerMP;
-
-public class PacketHandler {
-
- private static byte packetId = 0;
-
- private static final SimpleNetworkWrapper INSTANCE = NetworkRegistry.INSTANCE.newSimpleChannel(CORE.MODID);
-
- public static final void init() {
- registerMessage(Packet_VolumetricFlaskGui.class, Packet_VolumetricFlaskGui.class);
- registerMessage(Packet_VolumetricFlaskGui2.class, Packet_VolumetricFlaskGui2.class);
- }
-
- /**
- * Registers a message and message handler
- */
- private static final void registerMessage(Class handlerClass, Class messageClass) {
- Side side = AbstractClientMessageHandler.class.isAssignableFrom(handlerClass) ? Side.CLIENT : Side.SERVER;
- registerMessage(handlerClass, messageClass, side);
- }
-
- private static final void registerMessage(Class handlerClass, Class messageClass, Side side) {
- INSTANCE.registerMessage(handlerClass, messageClass, packetId++, side);
- if (AbstractPacket.class.isInstance(messageClass.getClass())) {
- AbstractPacket aPacket = ReflectionUtils.createNewInstanceFromConstructor(ReflectionUtils.getConstructor(messageClass, new Class[] {}), new Object[] {});
- if (aPacket != null) {
- Logger.INFO("Registered Packet: "+aPacket.getPacketName());
- }
- }
- }
-
- /**
- * Send this message to the specified player.
- * See {@link SimpleNetworkWrapper#sendTo(IMessage, EntityPlayerMP)}
- */
- public static final void sendTo(IMessage message, EntityPlayerMP player) {
- INSTANCE.sendTo(message, player);
- }
-
- /**
- * Send this message to everyone within a certain range of a point.
- * See {@link SimpleNetworkWrapper#sendToDimension(IMessage, NetworkRegistry.TargetPoint)}
- */
- public static final void sendToAllAround(IMessage message, NetworkRegistry.TargetPoint point) {
- INSTANCE.sendToAllAround(message, point);
- }
-
- /**
- * Sends a message to everyone within a certain range of the coordinates in the same dimension.
- */
- public static final void sendToAllAround(IMessage message, int dimension, double x, double y, double z, double range) {
- sendToAllAround(message, new NetworkRegistry.TargetPoint(dimension, x, y, z, range));
- }
-
- /**
- * Sends a message to everyone within a certain range of the player provided.
- */
- public static final void sendToAllAround(IMessage message, EntityPlayer player, double range) {
- sendToAllAround(message, player.worldObj.provider.dimensionId, player.posX, player.posY, player.posZ, range);
- }
-
- /**
- * Send this message to everyone within the supplied dimension.
- * See {@link SimpleNetworkWrapper#sendToDimension(IMessage, int)}
- */
- public static final void sendToDimension(IMessage message, int dimensionId) {
- INSTANCE.sendToDimension(message, dimensionId);
- }
-
- /**
- * Send this message to the server.
- * See {@link SimpleNetworkWrapper#sendToServer(IMessage)}
- */
- public static final void sendToServer(IMessage message) {
- INSTANCE.sendToServer(message);
- }
-}
diff --git a/src/Java/gtPlusPlus/core/handler/Recipes/DecayableRecipe.java b/src/Java/gtPlusPlus/core/handler/Recipes/DecayableRecipe.java
deleted file mode 100644
index 360b0440a2..0000000000
--- a/src/Java/gtPlusPlus/core/handler/Recipes/DecayableRecipe.java
+++ /dev/null
@@ -1,39 +0,0 @@
-package gtPlusPlus.core.handler.Recipes;
-
-import gregtech.api.util.GT_Utility;
-import gtPlusPlus.api.objects.data.AutoMap;
-import gtPlusPlus.core.util.minecraft.ItemUtils;
-import net.minecraft.item.ItemStack;
-
-public class DecayableRecipe {
-
- public static final AutoMap<DecayableRecipe> mRecipes = new AutoMap<DecayableRecipe>();
-
-
- public final int mTime;
- public final ItemStack mInput;
- public final ItemStack mOutput;
-
- public DecayableRecipe(int time, ItemStack input, ItemStack output) {
- mTime = time;
- mInput = input;
- mOutput = output;
- mRecipes.put(this);
- }
-
- @Override
- public boolean equals(Object o) {
- if (o instanceof DecayableRecipe) {
- DecayableRecipe i = (DecayableRecipe) o;
- if (i.mTime == this.mTime && GT_Utility.areStacksEqual(mInput, i.mInput) && GT_Utility.areStacksEqual(mOutput, i.mOutput)) {
- return true;
- }
- }
- return false;
- }
-
- public boolean isValid() {
- return (mTime > 0 && ItemUtils.checkForInvalidItems(mInput) && ItemUtils.checkForInvalidItems(mOutput));
- }
-
-}
diff --git a/src/Java/gtPlusPlus/core/handler/Recipes/LateRegistrationHandler.java b/src/Java/gtPlusPlus/core/handler/Recipes/LateRegistrationHandler.java
deleted file mode 100644
index 5bf6374725..0000000000
--- a/src/Java/gtPlusPlus/core/handler/Recipes/LateRegistrationHandler.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package gtPlusPlus.core.handler.Recipes;
-
-import gtPlusPlus.api.objects.Logger;
-import gtPlusPlus.core.handler.COMPAT_HANDLER;
-import gtPlusPlus.core.recipe.ShapedRecipeObject;
-
-public class LateRegistrationHandler {
-
- public static int recipesSuccess = 0;
- public static int recipesFailed = 0;
-
- public static void run(){
- init();
- }
-
- private final static void init(){
- for(final ShapedRecipeObject item : COMPAT_HANDLER.AddRecipeQueue){
- item.buildRecipe();
- }
- try {
- Thread.sleep(10);
- } catch (final InterruptedException e) {
- Logger.INFO(e.toString());
- }
- Logger.INFO("Late Recipes Loaded: "+recipesSuccess+" Failed: "+recipesFailed);
- }
-
-}
diff --git a/src/Java/gtPlusPlus/core/handler/Recipes/RegistrationHandler.java b/src/Java/gtPlusPlus/core/handler/Recipes/RegistrationHandler.java
deleted file mode 100644
index 4192e71091..0000000000
--- a/src/Java/gtPlusPlus/core/handler/Recipes/RegistrationHandler.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package gtPlusPlus.core.handler.Recipes;
-
-import gtPlusPlus.api.objects.Logger;
-import gtPlusPlus.core.handler.COMPAT_HANDLER;
-import gtPlusPlus.core.recipe.*;
-
-public class RegistrationHandler {
-
- public static int recipesSuccess = 0;
- public static int recipesFailed = 0;
-
- public static void run(){
- init();
- }
-
- private final static void init(){
- RECIPES_Tools.loadRecipes();
- RECIPES_General.loadRecipes();
- RECIPES_Machines.loadRecipes();
- RECIPES_Shapeless.loadRecipes();
- RECIPES_MachineComponents.loadRecipes();
- RECIPE_Batteries.loadRecipes();
- Logger.INFO("Loaded: "+recipesSuccess+" Failed: "+recipesFailed);
- COMPAT_HANDLER.areInitItemsLoaded = true;
- }
-
-}
diff --git a/src/Java/gtPlusPlus/core/handler/StopAnnoyingFuckingAchievements.java b/src/Java/gtPlusPlus/core/handler/StopAnnoyingFuckingAchievements.java
deleted file mode 100644
index b3b720497e..0000000000
--- a/src/Java/gtPlusPlus/core/handler/StopAnnoyingFuckingAchievements.java
+++ /dev/null
@@ -1,49 +0,0 @@
-package gtPlusPlus.core.handler;
-
-import java.lang.reflect.Field;
-
-import cpw.mods.fml.common.eventhandler.EventPriority;
-import cpw.mods.fml.common.eventhandler.SubscribeEvent;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import gtPlusPlus.core.util.Utils;
-import gtPlusPlus.core.util.reflect.ReflectionUtils;
-import net.minecraft.stats.AchievementList;
-import net.minecraftforge.event.entity.player.AchievementEvent;
-
-public class StopAnnoyingFuckingAchievements {
-
- /**
- * Stops me getting fireworks every fucking time I open my inventory upon first loading a dev client.
- * @param event
- */
- @SubscribeEvent(priority=EventPriority.HIGHEST)
- public void FUCK_OFF(AchievementEvent event) {
- if (Utils.isClient()) {
- doClientStuff();
- }
- if (event.achievement.equals(AchievementList.openInventory)) {
- event.setCanceled(true);
- }
- }
-
- @SideOnly(Side.CLIENT)
- private final void doClientStuff() {
- Class aMC = ReflectionUtils.getClass("net.minecraft.client.Minecraft");
- if (aMC != null) {
- Field aInstanceMC = ReflectionUtils.getField(aMC, "theMinecraft");
- Object aMcObj = ReflectionUtils.getFieldValue(null, aInstanceMC);
- Class aClazz2 = aMcObj.getClass();
- if (aClazz2 != null) {
- Field aGameSettings = ReflectionUtils.getField(aClazz2, "gameSettings");
- Object aGameSettingsObj = ReflectionUtils.getFieldValue(aInstanceMC, aGameSettings);
- Class aClazz3 = aGameSettingsObj.getClass();
- if (aClazz2 != null) {
- Field ainvHint = ReflectionUtils.getField(aClazz3, "showInventoryAchievementHint");
- ReflectionUtils.setField(aGameSettingsObj, ainvHint, false);
- }
- }
- }
- }
-
-}
diff --git a/src/Java/gtPlusPlus/core/handler/events/BlockEventHandler.java b/src/Java/gtPlusPlus/core/handler/events/BlockEventHandler.java
deleted file mode 100644
index 03bb99bb2a..0000000000
--- a/src/Java/gtPlusPlus/core/handler/events/BlockEventHandler.java
+++ /dev/null
@@ -1,229 +0,0 @@
-package gtPlusPlus.core.handler.events;
-
-import static gtPlusPlus.core.lib.CORE.ConfigSwitches.chanceToDropDrainedShard;
-import static gtPlusPlus.core.lib.CORE.ConfigSwitches.chanceToDropFluoriteOre;
-
-import java.util.ArrayList;
-
-import cpw.mods.fml.common.eventhandler.SubscribeEvent;
-import gtPlusPlus.api.objects.Logger;
-import gtPlusPlus.core.item.ModItems;
-import gtPlusPlus.core.lib.LoadedMods;
-import gtPlusPlus.core.material.nuclear.FLUORIDES;
-import gtPlusPlus.core.util.math.MathUtils;
-import gtPlusPlus.core.util.minecraft.ItemUtils;
-import gtPlusPlus.core.util.minecraft.PlayerUtils;
-import net.minecraft.block.Block;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Blocks;
-import net.minecraft.item.ItemStack;
-import net.minecraftforge.event.entity.living.LivingDropsEvent;
-import net.minecraftforge.event.entity.player.PlayerInteractEvent;
-import net.minecraftforge.event.world.BlockEvent;
-import net.minecraftforge.oredict.OreDictionary;
-
-public class BlockEventHandler {
- public static ArrayList<ItemStack> oreLimestone;
- public static ArrayList<ItemStack> blockLimestone;
- public static ItemStack fluoriteOre;
-
- public static void init() {
- //Set Variables for Fluorite Block handling
- Logger.INFO("Setting some Variables for the block break event handler.");
- BlockEventHandler.oreLimestone = OreDictionary.getOres("oreLimestone");
- BlockEventHandler.blockLimestone = OreDictionary.getOres("limestone");
- BlockEventHandler.fluoriteOre = FLUORIDES.FLUORITE.getOre(1);
- }
-
- @SubscribeEvent
- public void onBlockLeftClicked(final PlayerInteractEvent event) {
- /*
- * if (event.action != PlayerInteractEvent.Action.LEFT_CLICK_BLOCK) return;
- *
- * ItemStack heldItem = event.entityPlayer.getHeldItem(); Block block =
- * event.world.getBlock(event.x, event.y, event.z);
- *
- * // If the block clicked was Stone, the player was holding an Iron Pickaxe and
- * a random integer from 0 (inclusive) to 2 (exclusive) is 0 (50% chance) if
- * (block == Blocks.stone && heldItem != null && heldItem.getItem() ==
- * Items.iron_pickaxe && random.nextInt(2) == 0) { ForgeDirection direction =
- * ForgeDirection.getOrientation(event.face); // Convert the numeric face to a
- * ForgeDirection int fireX = event.x + direction.offsetX, fireY = event.y +
- * direction.offsetY, fireZ = event.z + direction.offsetZ; // Offset the block's
- * coordinates according to the direction
- *
- * if (event.world.isAirBlock(fireX, fireY, fireZ)) { // If the block at the new
- * coordinates is Air event.world.setBlock(fireX, fireY, fireZ, Blocks.fire); //
- * Replace it with Fire event.useBlock = Event.Result.DENY; // Prevent the Fire
- * from being extinguished (also prevents Block#onBlockClicked from being
- * called) } }
- */
- }
-
- @SubscribeEvent
- public void onEntityDrop(final LivingDropsEvent event) {
- /*
- * if (event.entityLiving instanceof EntityPig && event.source instanceof
- * EntityDamageSource) { // getEntity will return the Entity that caused the
- * damage,even for indirect damage sources like arrows/fireballs // (where it
- * will return the Entity that shot the projectile rather than the projectile
- * itself) Entity sourceEntity = event.source.getEntity(); ItemStack heldItem =
- * sourceEntity instanceof EntityLiving ? ((EntityLiving)
- * sourceEntity).getHeldItem() : sourceEntity instanceof EntityPlayer ?
- * ((EntityPlayer) sourceEntity).getHeldItem() : null;
- *
- * if (heldItem != null && heldItem.getItem() == Items.iron_pickaxe) {
- * System.out.println("EntityPig drops event"); event.drops.clear();
- * event.entityLiving.dropItem(Items.diamond, 64); } }
- */
- }
-
- @SubscribeEvent
- public void onBlockBreak(final BlockEvent.BreakEvent event) {
-
- }
-
-
- // Used to handle Thaumcraft Shards when TC is not installed.
- @SubscribeEvent
- public void harvestDrops(final BlockEvent.HarvestDropsEvent event) {
- try {
-
- if (event != null && event.harvester != null && event.harvester.worldObj != null) {
- if (!event.harvester.worldObj.isRemote) {
-
- EntityPlayer p = event.harvester;
-
- if (PlayerUtils.isRealPlayer(p)) {
- // Spawns Fluorite from Lime Stone
- if (chanceToDropFluoriteOre != 0) {
- if (!oreLimestone.isEmpty() || !blockLimestone.isEmpty()) {
-
- ArrayList<Block> mBlockTypes = new ArrayList<Block>();
- if (!oreLimestone.isEmpty()) {
- for (int i = 0; i < oreLimestone.size(); i++) {
- if (ItemUtils.getModId(oreLimestone.get(i)) != null
- && !ItemUtils.getModId(oreLimestone.get(i)).toLowerCase()
- .contains("biomesoplenty")) {
- if (!mBlockTypes
- .contains(Block.getBlockFromItem(oreLimestone.get(i).getItem()))) {
- mBlockTypes.add(Block.getBlockFromItem(oreLimestone.get(i).getItem()));
- }
- }
- }
- }
- if (!blockLimestone.isEmpty()) {
- for (int i = 0; i < blockLimestone.size(); i++) {
- if (ItemUtils.getModId(blockLimestone.get(i)) != null
- && !ItemUtils.getModId(blockLimestone.get(i)).toLowerCase()
- .contains("biomesoplenty")) {
- if (!mBlockTypes.contains(
- Block.getBlockFromItem(blockLimestone.get(i).getItem()))) {
- mBlockTypes
- .add(Block.getBlockFromItem(blockLimestone.get(i).getItem()));
- }
- }
- }
- }
-
- Logger.WARNING("Found Limestone in OreDict.");
- if (!mBlockTypes.isEmpty()) {
- Logger.WARNING("1a | " + event.block.getUnlocalizedName());
- for (final Block temp : mBlockTypes) {
- Logger.WARNING("2a - " + temp.getUnlocalizedName());
- if (event.block == temp) {
- Logger.WARNING("3a - found " + temp.getUnlocalizedName());
- if (MathUtils.randInt(1, chanceToDropFluoriteOre) == 1) {
- Logger.WARNING("4a");
- event.drops.clear();
- event.drops.add(fluoriteOre.copy());
- }
- }
- }
- }
- }
-
- if (event.block.getUnlocalizedName().toLowerCase().contains("limestone")) {
- Logger.WARNING("1c");
- if (MathUtils.randInt(1, chanceToDropFluoriteOre) == 1) {
- Logger.WARNING("2c");
- event.drops.clear();
- event.drops.add(fluoriteOre.copy());
- }
- }
-
- if (event.block == Blocks.sandstone) {
- if (MathUtils.randInt(1, chanceToDropFluoriteOre * 20) == 1) {
- event.drops.clear();
- event.drops.add(fluoriteOre.copy());
- }
- }
- }
- }
-
- // Do things that can occur for fake players and real players
-
- // Spawn Dull Shards (Can spawn from Tree Logs, Grass or Stone. Stone going to
- // be the most common source.)
- if (((event.block == Blocks.stone) || (event.block == Blocks.sandstone)
- || (event.block == Blocks.log) || (event.block == Blocks.log2)
- || (event.block == Blocks.grass)) && !LoadedMods.Thaumcraft
- && (chanceToDropDrainedShard != 0)) {
- // small chance for one to spawn per stone mined. 1 per 3 stacks~
- if (MathUtils.randInt(1, chanceToDropDrainedShard) == 1) {
- // Let's sort out a lucky charm for the player.
- final int FancyChance = MathUtils.randInt(1, 4);
- if (MathUtils.randInt(1, 100) < 90) {
- event.drops.add(new ItemStack(ModItems.shardDull));
- }
- // Make a Fire Shard
- else if (FancyChance == 1) {
- event.drops.add(new ItemStack(ModItems.shardIgnis));
- }
- // Make a Water Shard.
- else if (FancyChance == 2) {
- event.drops.add(new ItemStack(ModItems.shardAqua));
- }
- // Make an Earth Shard.
- else if (FancyChance == 3) {
- event.drops.add(new ItemStack(ModItems.shardTerra));
- }
- // Make an Air Shard.
- else if (FancyChance == 4) {
- event.drops.add(new ItemStack(ModItems.shardAer));
- }
- } else {
- Logger.WARNING("invalid chance");
- }
- }
-
- }
- }
- } catch (Throwable r) {
- Logger.INFO("Block Event Handler Failed. Please Report this to Alkalus.");
- r.printStackTrace();
- }
- }
-
- @SubscribeEvent
- public void logsHarvest(final BlockEvent.HarvestDropsEvent event) {
- /*
- * if (event.block instanceof BlockLog) { //
- * http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/
- * modification-development/2444501-harvestdropevent-changing-drops-of-vanilla-
- * blocks
- *
- * // Utils.sendServerMessage("Logs! Harvester: %s Drops: %s", event.harvester
- * != null ? event.harvester.getCommandSenderName() : "<none>",
- * event.drops.stream().map(ItemStack.toString()).collect(Collectors.
- * joining(", "))); if (event.harvester != null) { ItemStack heldItem =
- * event.harvester.getHeldItem(); if (heldItem == null ||
- * heldItem.getItem().getHarvestLevel(heldItem, "axe") < 1) {
- * event.drops.clear();
- * Utils.sendServerMessage("Harvester had wrong tool, clearing drops"); } else {
- * Utils.sendServerMessage("Harvester had correct tool, not clearing drops"); }
- * } else { event.drops.clear();
- * Utils.sendServerMessage("No harvester, clearing drops"); } }
- */
- }
-}
diff --git a/src/Java/gtPlusPlus/core/handler/events/CustomMovementHandler.java b/src/Java/gtPlusPlus/core/handler/events/CustomMovementHandler.java
deleted file mode 100644
index b70e58d009..0000000000
--- a/src/Java/gtPlusPlus/core/handler/events/CustomMovementHandler.java
+++ /dev/null
@@ -1,163 +0,0 @@
-package gtPlusPlus.core.handler.events;
-
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.entity.EntityPlayerSP;
-import net.minecraft.client.settings.GameSettings;
-import net.minecraft.util.MovementInputFromOptions;
-
-/*
- * Replacement for MovementInputFromOptions - Built from the source of ToggleSneak 3.0.3
- */
-
-public class CustomMovementHandler {
-
- public boolean isDisabled;
- public boolean canDoubleTap;
-
- public boolean sprint = false;
- public boolean sprintHeldAndReleased = false;
- public boolean sprintDoubleTapped = false;
-
- private long lastPressed;
- private long lastSprintPressed;
- private boolean handledSneakPress;
- private boolean handledSprintPress;
- private boolean wasRiding;
-
- /*
- * MovementInputFromOptions.updatePlayerMoveState()
- */
- public void update(final Minecraft mc, final MovementInputFromOptions options, final EntityPlayerSP thisPlayer)
- {
- options.moveStrafe = 0.0F;
- options.moveForward = 0.0F;
-
- final GameSettings settings = mc.gameSettings;
-
- if(settings.keyBindForward.getIsKeyPressed())
- {
- ++options.moveForward;
- }
-
- if(settings.keyBindBack.getIsKeyPressed())
- {
- --options.moveForward;
- }
-
- if(settings.keyBindLeft.getIsKeyPressed())
- {
- ++options.moveStrafe;
- }
-
- if(settings.keyBindRight.getIsKeyPressed())
- {
- --options.moveStrafe;
- }
-
- options.jump = settings.keyBindJump.getIsKeyPressed();
-
- //
- // Sneak Toggle - Essentially the same as old ToggleSneak
- //
-
- // Check to see if Enabled - Added 6/17/14 to provide option to disable Sneak Toggle
- final boolean isSneaking = SneakManager.get(thisPlayer).Sneaking();
- //Utils.LOG_INFO("Can sneak: "+isSneaking);
- //Utils.LOG_INFO("Can sprint: "+SneakManager.Sprinting());
- if (isSneaking)
- {
- // Key Pressed
- if (settings.keyBindSneak.getIsKeyPressed() && !this.handledSneakPress)
- {
- // Descend if we are flying, note if we were riding (so we can unsneak once dismounted)
- if(thisPlayer.isRiding() || thisPlayer.capabilities.isFlying)
- {
- options.sneak = true;
- this.wasRiding = thisPlayer.isRiding();
- }
- else
- {
- options.sneak = !options.sneak;
- }
-
- this.lastPressed = System.currentTimeMillis();
- this.handledSneakPress = true;
- }
-
- // Key Released
- if (!settings.keyBindSneak.getIsKeyPressed() && this.handledSneakPress)
- {
- // If we are flying or riding, stop sneaking after descent/dismount.
- if(thisPlayer.capabilities.isFlying || this.wasRiding)
- {
- options.sneak = false;
- this.wasRiding = false;
- }
- // If the key was held down for more than 300ms, stop sneaking upon release.
- else if((System.currentTimeMillis() - this.lastPressed) > 300L)
- {
- options.sneak = false;
- }
-
- this.handledSneakPress = false;
- }
- }
- else
- {
- options.sneak = settings.keyBindSneak.getIsKeyPressed();
- }
-
- if(options.sneak || SneakManager.get(thisPlayer).Sneaking())
- {
- options.moveStrafe = (float)(options.moveStrafe * 0.3D);
- options.moveForward = (float)(options.moveForward * 0.3D);
- }
-
- //
- // Sprint Toggle - Updated 6/18/2014
- //
-
- // Establish conditions where we don't want to start a sprint - sneaking, riding, flying, hungry
- final boolean enoughHunger = (thisPlayer.getFoodStats().getFoodLevel() > 6.0F) || thisPlayer.capabilities.isFlying;
- final boolean canSprint = !options.sneak && !thisPlayer.isRiding() && !thisPlayer.capabilities.isFlying && enoughHunger;
-
- this.isDisabled = !SneakManager.get(thisPlayer).Sprinting();
- this.canDoubleTap = SneakManager.get(thisPlayer).optionDoubleTap;
-
- // Key Pressed
- if((canSprint || this.isDisabled) && settings.keyBindSprint.getIsKeyPressed() && !this.handledSprintPress)
- {
- if(!this.isDisabled)
- {
- this.sprint = !this.sprint;
- this.lastSprintPressed = System.currentTimeMillis();
- this.handledSprintPress = true;
- this.sprintHeldAndReleased = false;
- }
- }
-
- // Key Released
- if((canSprint || this.isDisabled) && !settings.keyBindSprint.getIsKeyPressed() && this.handledSprintPress)
- {
- // Was key held for longer than 300ms? If so, mark it so we can resume vanilla behavior
- if((System.currentTimeMillis() - this.lastSprintPressed) > 300L)
- {
- this.sprintHeldAndReleased = true;
- }
- this.handledSprintPress = false;
- }
-
- }
-
- public void UpdateSprint(final boolean newValue, final boolean doubleTapped, SneakManager aSneak){
- if (!aSneak.Sprinting()){
- this.sprint = false;
- this.sprintDoubleTapped = doubleTapped;
- }
- else{
- this.sprint = newValue;
- this.sprintDoubleTapped = doubleTapped;
- }
- }
-
-} \ No newline at end of file
diff --git a/src/Java/gtPlusPlus/core/handler/events/EnderDragonDeathHandler.java b/src/Java/gtPlusPlus/core/handler/events/EnderDragonDeathHandler.java
deleted file mode 100644
index 884f14386d..0000000000
--- a/src/Java/gtPlusPlus/core/handler/events/EnderDragonDeathHandler.java
+++ /dev/null
@@ -1,59 +0,0 @@
-package gtPlusPlus.core.handler.events;
-
-import cpw.mods.fml.common.eventhandler.SubscribeEvent;
-import gtPlusPlus.core.material.ELEMENT;
-import gtPlusPlus.core.util.math.MathUtils;
-import gtPlusPlus.core.util.minecraft.PlayerUtils;
-import gtPlusPlus.core.util.reflect.ReflectionUtils;
-import net.minecraft.entity.boss.EntityDragon;
-import net.minecraftforge.event.entity.living.LivingDropsEvent;
-
-public class EnderDragonDeathHandler {
-
- private static final String mDragonClassName = "chylex.hee.entity.boss.EntityBossDragon";
- private static final boolean mHEE;
- private static final Class mHardcoreDragonClass;
-
- static {
- mHEE = ReflectionUtils.doesClassExist(mDragonClassName);
- mHardcoreDragonClass = (mHEE ? ReflectionUtils.getClass(mDragonClassName) : null);
- }
-
- @SubscribeEvent
- public void onEntityDrop(LivingDropsEvent event) {
-
- boolean aDidDrop = false;
- int aCountTotal = 0;
-
- //HEE Dragon
- if (mHEE) {
- if (mHardcoreDragonClass != null) {
- if (mHardcoreDragonClass.isInstance(event.entityLiving)) {
- for (int y = 0; y < MathUtils.randInt(100, 250); y++) {
- int aAmount = MathUtils.randInt(5, 25);
- event.entityLiving.entityDropItem(ELEMENT.STANDALONE.DRAGON_METAL.getNugget(aAmount), MathUtils.randFloat(0, 1));
- aDidDrop = true;
- aCountTotal =+ aAmount;
- }
- }
- }
- }
- //Vanilla Dragon or any other dragon that extends it
- else {
- if (event.entityLiving instanceof EntityDragon) {
- for (int y = 0; y < MathUtils.randInt(25, 50); y++) {
- int aAmount = MathUtils.randInt(1, 10);
- event.entityLiving.entityDropItem(ELEMENT.STANDALONE.DRAGON_METAL.getNugget(aAmount), MathUtils.randFloat(0, 1));
- aDidDrop = true;
- aCountTotal =+ aAmount;
- }
- }
- }
-
- if (aDidDrop) {
- PlayerUtils.messageAllPlayers(aCountTotal+" Shards of Dragons Blood have crystalized into a metallic form.");
- }
-
- }
-
-}
diff --git a/src/Java/gtPlusPlus/core/handler/events/EntityDeathHandler.java b/src/Java/gtPlusPlus/core/handler/events/EntityDeathHandler.java
deleted file mode 100644
index 391672e028..0000000000
--- a/src/Java/gtPlusPlus/core/handler/events/EntityDeathHandler.java
+++ /dev/null
@@ -1,124 +0,0 @@
-package gtPlusPlus.core.handler.events;
-
-import java.util.HashMap;
-import java.util.HashSet;
-
-import cpw.mods.fml.common.eventhandler.SubscribeEvent;
-import gtPlusPlus.api.objects.Logger;
-import gtPlusPlus.api.objects.data.AutoMap;
-import gtPlusPlus.api.objects.data.Triplet;
-import gtPlusPlus.core.item.ModItems;
-import gtPlusPlus.core.util.math.MathUtils;
-import gtPlusPlus.core.util.minecraft.ItemUtils;
-import gtPlusPlus.core.util.minecraft.PlayerUtils;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraftforge.event.entity.living.LivingDropsEvent;
-
-public class EntityDeathHandler {
-
-
- private static final HashMap<Class, AutoMap<Triplet<ItemStack, Integer, Integer>>> mMobDropMap = new HashMap<Class, AutoMap<Triplet<ItemStack, Integer, Integer>>>();
- private static final HashSet<Class> mInternalClassKeyCache = new HashSet<Class>();
-
- /**
- * Provides the ability to provide custom drops upon the death of EntityLivingBase objects.
- * @param aMobClass - The Base Class you want to drop this item.
- * @param aStack - The ItemStack, stack size is not respected.
- * @param aMaxAmount - The maximum size of the ItemStack which drops.
- * @param aChance - Chance out of 10000, where 100 is 1%. (1 = 0.01% - this is ok)
- */
- public static void registerDropsForMob(Class aMobClass, ItemStack aStack, int aMaxAmount, int aChance) {
- Triplet<ItemStack, Integer, Integer> aData = new Triplet<ItemStack, Integer, Integer>(aStack, aMaxAmount, aChance);
- AutoMap<Triplet<ItemStack, Integer, Integer>> aDataMap = mMobDropMap.get(aMobClass);
- if (aDataMap == null) {
- aDataMap = new AutoMap<Triplet<ItemStack, Integer, Integer>>();
- }
- aDataMap.put(aData);
- mMobDropMap.put(aMobClass, aDataMap);
-
- Logger.INFO("[Loot] Registered "+aStack.getDisplayName()+" (1-"+aMaxAmount+") as a valid drop for "+aMobClass.getCanonicalName());
-
- if (!mInternalClassKeyCache.contains(aMobClass)) {
- mInternalClassKeyCache.add(aMobClass);
- }
-
- }
-
- private static ItemStack processItemDropTriplet(Triplet<ItemStack, Integer, Integer> aData) {
- ItemStack aLoot = aData.getValue_1();
- int aMaxDrop = aData.getValue_2();
- int aChanceOutOf10000 = aData.getValue_3();
- if (MathUtils.randInt(0, 10000) <= aChanceOutOf10000) {
- aLoot = ItemUtils.getSimpleStack(aLoot, MathUtils.randInt(1, aMaxDrop));
- if (ItemUtils.checkForInvalidItems(aLoot)) {
- return aLoot;
- }
- }
- return null;
- }
-
- private static boolean processDropsForMob(EntityLivingBase entityLiving) {
- AutoMap<Triplet<ItemStack, Integer, Integer>> aMobData = mMobDropMap.get(entityLiving.getClass());
- boolean aDidDrop = false;
- if (aMobData != null) {
- if (!aMobData.isEmpty()) {
- ItemStack aPossibleDrop;
- for (Triplet<ItemStack, Integer, Integer> g : aMobData) {
- aPossibleDrop = processItemDropTriplet(g);
- if (aPossibleDrop != null) {
- if (entityLiving.entityDropItem(aPossibleDrop, MathUtils.randFloat(0, 1)) != null) {
- aDidDrop = true;
- }
- }
- }
- }
- }
- return aDidDrop;
- }
-
-
-
- private static void dropMeatFromPlayer(EntityPlayer aPlayer) {
-
- // always drop some meat.
- int aBigMeatStackSize1 = MathUtils.randInt(4, 8);
- aPlayer.entityDropItem(ItemUtils.simpleMetaStack(ModItems.itemMetaFood, 0, aBigMeatStackSize1), MathUtils.randInt(0, 1));
-
- // additional chances for more meat.
- if (MathUtils.randInt(0, 10) < 7) {
- int aBigMeatStackSize2 = MathUtils.randInt(4, 8);
- aPlayer.entityDropItem(ItemUtils.simpleMetaStack(ModItems.itemMetaFood, 0, aBigMeatStackSize2), MathUtils.randInt(0, 1));
- }
- if (MathUtils.randInt(0, 10) < 4) {
- int aBigMeatStackSize3 = MathUtils.randInt(4, 8);
- aPlayer.entityDropItem(ItemUtils.simpleMetaStack(ModItems.itemMetaFood, 0, aBigMeatStackSize3), MathUtils.randInt(0, 1));
- }
- if (MathUtils.randInt(0, 10) < 2) {
- int aBigMeatStackSize4 = MathUtils.randInt(4, 8);
- aPlayer.entityDropItem(ItemUtils.simpleMetaStack(ModItems.itemMetaFood, 0, aBigMeatStackSize4), MathUtils.randInt(0, 1));
- }
-
- }
-
- @SubscribeEvent
- public void onEntityDrop(LivingDropsEvent event) {
- boolean aDidDrop = false;
- if (event == null || event.entityLiving == null) {
- return;
- }
- if (PlayerUtils.isRealPlayer(event.entityLiving)) {
- EntityPlayer aPlayer = (EntityPlayer) event.entityLiving;
- dropMeatFromPlayer(aPlayer);
- }
- else {
- for (Class c : mInternalClassKeyCache) {
- if (c.isInstance(event.entityLiving)) {
- aDidDrop = processDropsForMob(event.entityLiving);
- }
- }
- }
- }
-
-}
diff --git a/src/Java/gtPlusPlus/core/handler/events/GeneralTooltipEventHandler.java b/src/Java/gtPlusPlus/core/handler/events/GeneralTooltipEventHandler.java
deleted file mode 100644
index fda7760607..0000000000
--- a/src/Java/gtPlusPlus/core/handler/events/GeneralTooltipEventHandler.java
+++ /dev/null
@@ -1,107 +0,0 @@
-package gtPlusPlus.core.handler.events;
-
-import cpw.mods.fml.common.eventhandler.SubscribeEvent;
-import gregtech.api.enums.ItemList;
-import gtPlusPlus.GTplusplus;
-import gtPlusPlus.GTplusplus.INIT_PHASE;
-import gtPlusPlus.core.block.ModBlocks;
-import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.util.minecraft.ItemUtils;
-import gtPlusPlus.core.util.sys.KeyboardUtils;
-import net.minecraft.block.Block;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraftforge.event.entity.player.ItemTooltipEvent;
-
-public class GeneralTooltipEventHandler {
-
- ItemStack[] mGregtechTurbines = new ItemStack[6];
- String mTurbine;
- String mExtra;
-
- @SubscribeEvent
- public void onItemTooltip(ItemTooltipEvent event){
-
-
- if (GTplusplus.CURRENT_LOAD_PHASE != INIT_PHASE.STARTED && GTplusplus.CURRENT_LOAD_PHASE != INIT_PHASE.SERVER_START) {
- return;
- }
- if (event.itemStack == null) {
- return;
- }
- if (CORE.ConfigSwitches.chanceToDropFluoriteOre > 0) {
- if (BlockEventHandler.blockLimestone != null && !BlockEventHandler.blockLimestone.isEmpty()) {
- for (ItemStack h : BlockEventHandler.blockLimestone) {
- if (h != null && Block.getBlockFromItem(h.getItem()) == Block.getBlockFromItem(event.itemStack.getItem())) {
- if (ItemUtils.getModId(h) != null && !ItemUtils.getModId(h).toLowerCase().contains("biomesoplenty")) {
- event.toolTip.add("May contain Fluorite Ore");
- }
- }
- }
- }
- if (BlockEventHandler.oreLimestone != null && !BlockEventHandler.oreLimestone.isEmpty()) {
- for (ItemStack h : BlockEventHandler.oreLimestone) {
- if (h != null && Block.getBlockFromItem(h.getItem()) == Block.getBlockFromItem(event.itemStack.getItem())) {
- if (ItemUtils.getModId(h) != null && !ItemUtils.getModId(h).toLowerCase().contains("biomesoplenty")) {
- event.toolTip.add("May contain Fluorite Ore");
- }
- }
- }
- }
- }
-
- //Material Collector Tooltips
- if (ModBlocks.blockPooCollector != null && Block.getBlockFromItem(event.itemStack.getItem()) == ModBlocks.blockPooCollector) {
- //Normal
- if (event.itemStack.getItemDamage() == 0) {
- event.toolTip.add("Used to collect animal waste");
- event.toolTip.add("Collects in a 5x4x5 area starting at Y+1");
- event.toolTip.add("Use Hoppers/Pipes to empty");
- event.toolTip.add(EnumChatFormatting.GOLD+"Capacity: "+EnumChatFormatting.AQUA+"8000L");
- }
- //Advanced
- else {
- event.toolTip.add("Used to collect waste (Works on more than animals)");
- event.toolTip.add("Significantly faster than the simple version");
- event.toolTip.add("Collects in a 5x4x5 area starting at Y+1");
- event.toolTip.add("Use Hoppers/Pipes to empty");
- event.toolTip.add(EnumChatFormatting.GOLD+"Capacity: "+EnumChatFormatting.AQUA+"128000L");
- }
- }
-
-
-
- if (CORE.ConfigSwitches.enableAnimatedTurbines) {
- boolean shift = false;
- try {
-
- if (KeyboardUtils.isShiftKeyDown()) {
- shift = true;
- mTurbine = "Animated Turbines can be disabled in the GT++ config";
- }
- else {
- mTurbine = EnumChatFormatting.ITALIC+"<Hold Shift>"+EnumChatFormatting.RESET;
- }
- for (int t=0;t<6;t++) {
- if (mGregtechTurbines[t] != null) {
- if (ItemStack.areItemStacksEqual(event.itemStack, mGregtechTurbines[t])){
- event.toolTip.add(mTurbine);
- if (shift) {
- if (mExtra == null) {
- mExtra = CORE.GT_Tooltip;
- }
- event.toolTip.add(mExtra);
- }
- }
- }
- else {
- mGregtechTurbines[t] = (t == 0 ? ItemList.Generator_Steam_Turbine_LV.get(1) : (t == 1 ? ItemList.Generator_Steam_Turbine_MV.get(1) : (t == 2 ? ItemList.Generator_Steam_Turbine_HV.get(1) : (t == 3 ? ItemList.Generator_Gas_Turbine_LV.get(1) : (t == 4 ? ItemList.Generator_Gas_Turbine_MV.get(1) : (ItemList.Generator_Gas_Turbine_HV.get(1)))))));
- }
- }
- }
- catch (Throwable t) {}
- }
-
- }
-
-}
diff --git a/src/Java/gtPlusPlus/core/handler/events/LoginEventHandler.java b/src/Java/gtPlusPlus/core/handler/events/LoginEventHandler.java
deleted file mode 100644
index 1a8d87882e..0000000000
--- a/src/Java/gtPlusPlus/core/handler/events/LoginEventHandler.java
+++ /dev/null
@@ -1,128 +0,0 @@
-package gtPlusPlus.core.handler.events;
-
-import java.util.Timer;
-import java.util.TimerTask;
-import java.util.UUID;
-
-import cpw.mods.fml.common.eventhandler.SubscribeEvent;
-import cpw.mods.fml.common.gameevent.PlayerEvent;
-
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.entity.player.EntityPlayerMP;
-
-import gtPlusPlus.api.objects.Logger;
-import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.proxy.ClientProxy;
-import gtPlusPlus.core.util.Utils;
-import gtPlusPlus.core.util.minecraft.PlayerUtils;
-import gtPlusPlus.core.util.player.PlayerCache;
-
-public class LoginEventHandler {
-
- public String localPlayersName;
- public UUID localPlayersUUID;
- private EntityPlayer localPlayerRef;
-
- @SubscribeEvent
- public void onPlayerLogin(final PlayerEvent.PlayerLoggedInEvent event) {
-
- this.localPlayerRef = event.player;
- this.localPlayersName = event.player.getDisplayName();
- this.localPlayersUUID = event.player.getUniqueID();
-
- //Set this for easier use elsewhere.
- if (event.player.getEntityWorld().isRemote){
- ClientProxy.playerName = this.localPlayersName;
- }
-
- try {
- //new SegmentAnalytics(event.player);
- }
- catch (Throwable t){
- //SegmentAnalytics.LOG("Failed to create Analytics submission during log in process.");
- }
-
- try {
-
-
- if (this.localPlayerRef instanceof EntityPlayerMP){
-
- //Populates player cache
- if (!this.localPlayerRef.worldObj.isRemote){
- PlayerCache.appendParamChanges(this.localPlayersName, this.localPlayersUUID.toString());
- }
-
-
- /*if (localPlayerRef.getCommandSenderName().toLowerCase().equalsIgnoreCase("ImQ009") || localPlayerRef.getCommandSenderName().toLowerCase().contains("player")){
- Utils.LOG_INFO("Spawning a new Santa Thread.");
- Thread t = new Thread() {
- UUID threadHandlerIDthing = localPlayersUUID;
- @Override
- public void run() {
- while(true && Minecraft.getMinecraft().getIntegratedServer() != null) {
- try {
- if(localPlayerRef == null){
- localPlayerRef = Utils.getPlayerOnServerFromUUID(threadHandlerIDthing);
- }
-
-
- //ImQ009 is a legend.
- if (localPlayerRef.getCommandSenderName().toLowerCase().equalsIgnoreCase("ImQ009")){
- Utils.messagePlayer(localPlayerRef, "Enjoy some complimentary Raisin Bread.");
- localPlayerRef.inventory.addItemStackToInventory(UtilsItems.getSimpleStack(ModItems.itemIngotRaisinBread, MathUtils.randInt(1, 5)));
- }
-
-
- if (localPlayerRef.getCommandSenderName().toLowerCase().contains("player")){
- Utils.messagePlayer(localPlayerRef, "Enjoy some complimentary Raisin Bread.");
- localPlayerRef.inventory.addItemStackToInventory(UtilsItems.getSimpleStack(ModItems.itemIngotRaisinBread, MathUtils.randInt(1, 5)));
- }
- Thread.sleep(1000*60*MathUtils.randInt(15, 90));
- } catch (InterruptedException ie) {
- Utils.LOG_INFO("Santa Mode Disabled.");
- }
- }
-
- Utils.LOG_INFO("Thread Stopped. Handler Closed.");
-
- }
- };
- //t.start();
-
-
- }*/
-
-
- }
- } catch (final Throwable errr){
- Logger.INFO("Login Handler encountered an error.");
-
- }
- }
-
- //Handles notifying the player about a version update.
- public Timer ShortTimer(EntityPlayer localPlayer, final int seconds) {
- Timer timer;
- timer = new Timer();
- timer.schedule(new NotifyPlayer(localPlayer), seconds * 1000);
- return timer;
- }
-
- //Timer Task for notifying the player.
- class NotifyPlayer extends TimerTask {
- final EntityPlayer toMessage;
- public NotifyPlayer(EntityPlayer localPlayer) {
- toMessage = localPlayer;
- }
-
- @Override
- public void run() {
- if (toMessage != null){
- if (toMessage instanceof EntityPlayerMP){
- PlayerUtils.messagePlayer(toMessage, "You're not using the latest recommended version of GT++, consider updating.");
- }
- }
- }
- }
-
-} \ No newline at end of file
diff --git a/src/Java/gtPlusPlus/core/handler/events/MissingMappingsEvent.java b/src/Java/gtPlusPlus/core/handler/events/MissingMappingsEvent.java
deleted file mode 100644
index 31600a36c3..0000000000
--- a/src/Java/gtPlusPlus/core/handler/events/MissingMappingsEvent.java
+++ /dev/null
@@ -1,56 +0,0 @@
-package gtPlusPlus.core.handler.events;
-
-import static gtPlusPlus.core.item.base.dusts.BaseItemDustEx.mCachedPileLinkages;
-
-import org.apache.commons.lang3.StringUtils;
-
-import cpw.mods.fml.common.Mod.EventHandler;
-import cpw.mods.fml.common.event.FMLMissingMappingsEvent;
-import cpw.mods.fml.common.event.FMLMissingMappingsEvent.MissingMapping;
-
-import net.minecraft.item.ItemStack;
-
-import gtPlusPlus.api.objects.Logger;
-import gtPlusPlus.core.lib.CORE;
-
-public class MissingMappingsEvent {
-
- @EventHandler
- public void onMissingMapping(FMLMissingMappingsEvent event){
- for(MissingMapping mapping : event.get()) {
- boolean bool1 = mapping.name.contains(CORE.MODID);
- //Missing Blocks
- if(mapping.type == cpw.mods.fml.common.registry.GameRegistry.Type.BLOCK && bool1) {
-
- //Example
- //if(mapping.name.equals("PneumaticCraft:etchingAcid")) {
- // mapping.remap(Fluids.etchingAcid.getBlock());
- //}
-
-
- }
-
- //Missing Items
- if(mapping.type == cpw.mods.fml.common.registry.GameRegistry.Type.ITEM && bool1) {
-
- //Example
- //if(mapping.name.equals("PneumaticCraft:etchingAcidBucket")) {
- // mapping.remap(Fluids.getBucket(Fluids.etchingAcid));
- //}
-
- if(mapping.name.contains("miscutils:itemDustTiny")) {
- ItemStack stack = null;
- String missingItemString = StringUtils.remove(mapping.name, "miscutils:itemDustTiny");
- missingItemString = StringUtils.prependIfMissing(missingItemString, "item.itemDust");
- if (mCachedPileLinkages.containsKey(missingItemString)) {
- //stack = ItemUtils.getSimpleStack(Item.itemRegistry.)
- Logger.REFLECTION("Mapping Event Found Missing Item in the Pile Linkage Cache.");
- }
-
- //mapping.remap(stack.getItem());
- }
-
- }
- }
- }
-}
diff --git a/src/Java/gtPlusPlus/core/handler/events/PickaxeBlockBreakEventHandler.java b/src/Java/gtPlusPlus/core/handler/events/PickaxeBlockBreakEventHandler.java
deleted file mode 100644
index 956d045b3e..0000000000
--- a/src/Java/gtPlusPlus/core/handler/events/PickaxeBlockBreakEventHandler.java
+++ /dev/null
@@ -1,80 +0,0 @@
-package gtPlusPlus.core.handler.events;
-
-import java.util.List;
-import java.util.UUID;
-
-import cpw.mods.fml.common.eventhandler.SubscribeEvent;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.world.ChunkPosition;
-import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
-import gregtech.api.metatileentity.BaseMetaTileEntity;
-import gtPlusPlus.core.util.minecraft.PlayerUtils;
-import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.machines.GregtechMetaSafeBlockBase;
-import net.minecraftforge.event.entity.player.PlayerInteractEvent;
-import net.minecraftforge.event.world.BlockEvent.BreakEvent;
-import net.minecraftforge.event.world.ExplosionEvent;
-
-public class PickaxeBlockBreakEventHandler {
- @SubscribeEvent
- public void onBreakBlock(final BreakEvent event) {
- try{
- final TileEntity entity = event.world.getTileEntity(event.x, event.y, event.z);
- if (entity != null){
- if (entity instanceof BaseMetaTileEntity) {
- final EntityPlayer playerInternal = event.getPlayer();
- final IMetaTileEntity X = ((BaseMetaTileEntity)entity).getMetaTileEntity();
- if(X instanceof GregtechMetaSafeBlockBase) {
- final UUID ownerUUID = ((GregtechMetaSafeBlockBase)X).ownerUUID;
- final UUID accessorUUID = playerInternal.getUniqueID();
- if (((GregtechMetaSafeBlockBase)X).bUnbreakable){
- if (accessorUUID == ownerUUID){
- PlayerUtils.messagePlayer(playerInternal, "Since you own this block, it has been destroyed.");
- }
- else {
- PlayerUtils.messagePlayer(playerInternal, "Since you do not own this block, it has not been destroyed.");
- event.setCanceled(true);
- }
- }
- }
- }
-
- }
- }
- catch (final NullPointerException e) {
- //System.out.print("Caught a NullPointerException involving Safe Blocks. Cause: "+e.getCause());
- }
- }
-
- @SubscribeEvent
- public void onExplode(ExplosionEvent.Detonate event) {
- try {
- @SuppressWarnings("unchecked")
- List<ChunkPosition> pos = event.explosion.affectedBlockPositions;
- for(int i = 0;i<pos.size();i++) {
- ChunkPosition blockpos = (ChunkPosition) pos.get(i);
- TileEntity entity = event.world.getTileEntity(blockpos.chunkPosX, blockpos.chunkPosY, blockpos.chunkPosZ);
- if (entity != null){
- if (entity instanceof BaseMetaTileEntity) {
- final IMetaTileEntity X = ((BaseMetaTileEntity)entity).getMetaTileEntity();
- if (X instanceof GregtechMetaSafeBlockBase) {
- pos.remove(i);
- }
- }
- }
- }
- }
- catch (final NullPointerException e) {
-
- }
-
- }
-
-
- @SubscribeEvent
- public void onPlayerInteraction(final PlayerInteractEvent aEvent) {
- if ((aEvent.entityPlayer != null) && (aEvent.entityPlayer.worldObj != null) && (aEvent.action != null) && (aEvent.world.provider != null) && !aEvent.entityPlayer.worldObj.isRemote && (aEvent.action != null) && (aEvent.action != PlayerInteractEvent.Action.RIGHT_CLICK_AIR)) {
- //Utils.LOG_ERROR("Test");
- }
- }
-}
diff --git a/src/Java/gtPlusPlus/core/handler/events/PlayerTickHandler.java b/src/Java/gtPlusPlus/core/handler/events/PlayerTickHandler.java
deleted file mode 100644
index dc7ccb3e72..0000000000
--- a/src/Java/gtPlusPlus/core/handler/events/PlayerTickHandler.java
+++ /dev/null
@@ -1,18 +0,0 @@
-package gtPlusPlus.core.handler.events;
-
-import cpw.mods.fml.common.eventhandler.SubscribeEvent;
-
-import net.minecraft.entity.player.EntityPlayer;
-
-public class PlayerTickHandler {
-
- @SubscribeEvent
- public void onPlayerTick(net.minecraftforge.event.entity.player.PlayerOpenContainerEvent e){
- if (e.entity instanceof EntityPlayer){
- if (e.entityPlayer.openContainer != null) {
-
- }
- }
- }
-
-}
diff --git a/src/Java/gtPlusPlus/core/handler/events/SneakManager.java b/src/Java/gtPlusPlus/core/handler/events/SneakManager.java
deleted file mode 100644
index 3e51c6488a..0000000000
--- a/src/Java/gtPlusPlus/core/handler/events/SneakManager.java
+++ /dev/null
@@ -1,131 +0,0 @@
-package gtPlusPlus.core.handler.events;
-
-import java.util.concurrent.ConcurrentHashMap;
-
-import gtPlusPlus.api.objects.Logger;
-import net.minecraft.entity.player.EntityPlayer;
-
-public class SneakManager {
-
- //We make this a singleton for clientside data storage.
-
- public static ConcurrentHashMap<String, SneakManager> mPlayerCache = new ConcurrentHashMap<String, SneakManager>();
-
- private static void addPlayer(EntityPlayer aPlayer) {
- String aKey = getKey(aPlayer);
- if (!mPlayerCache.containsKey(aKey)) {
- mPlayerCache.put(aKey, new SneakManager(aPlayer));
- }
- }
-
- public static SneakManager get(EntityPlayer aPlayer) {
-
- String aKey = getKey(aPlayer);
- if (!mPlayerCache.containsKey(aKey)) {
- addPlayer(aPlayer);
- }
- return mPlayerCache.get(aKey);
- }
-
- private static String getKey(EntityPlayer aPlayer) {
- return ""+aPlayer.getGameProfile().getId().toString();
- }
-
-
- public SneakManager instance;
- public EntityPlayer owner;
- public boolean canSprint = true;
- public boolean isSneaking = true;
- public boolean optionDoubleTap = true;
- public boolean wasSprintDisabled = false;
- public boolean mIsWearingRing = false;
-
- private State Sprinting = State.ON;
- private State Crouching = State.OFF;
-
- public SneakManager(EntityPlayer aPlayer) {
- owner = aPlayer;
- }
-
- public boolean Sneaking(){
- return Crouching.getState();
- }
-
- public boolean Sprinting(){
- return Sprinting.getState();
- }
-
- public State getSneakingState(){
- return Crouching;
- }
-
- public State getSprintingDisabledState(){
- return Sprinting;
- }
-
- public void toggleSneaking(){
- toggleState(Crouching);
- }
-
- public void toggleSprinting(){
- toggleState(Sprinting);
- }
-
- private State toggleState(final State state){
- Logger.INFO("State Toggle");
- if (state == State.ON) {
- return State.OFF;
- }
- return State.ON;
- }
-
- private State setCrouchingStateON(){
- return Crouching = State.ON;
- }
-
- private State setCrouchingStateOFF(){
- return Crouching = State.OFF;
- }
-
- private State setSprintingStateON(){
- return Sprinting = State.ON;
- }
-
- private State setSprintingStateOFF(){
- return Sprinting = State.OFF;
- }
-
- public void putRingOn() {
- mIsWearingRing = true;
- setSprintingStateOFF();
- setCrouchingStateON();
- }
-
- public void takeRingOff() {
- mIsWearingRing = false;
- setSprintingStateON();
- setCrouchingStateOFF();
- }
-
- public boolean isWearingRing() {
- return mIsWearingRing;
- }
-
- public static enum State {
- ON(true),
- OFF(false);
-
- private final boolean STATE;
- private State (final boolean State)
- {
- this.STATE = State;
- }
-
- public boolean getState() {
- return this.STATE;
- }
-
- }
-
-}
-
diff --git a/src/Java/gtPlusPlus/core/handler/events/UnbreakableBlockManager.java b/src/Java/gtPlusPlus/core/handler/events/UnbreakableBlockManager.java
deleted file mode 100644
index b653c6ffb6..0000000000
--- a/src/Java/gtPlusPlus/core/handler/events/UnbreakableBlockManager.java
+++ /dev/null
@@ -1,138 +0,0 @@
-package gtPlusPlus.core.handler.events;
-
-import net.minecraft.block.Block;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.world.World;
-
-import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
-import gregtech.api.metatileentity.BaseMetaPipeEntity;
-import gregtech.api.metatileentity.BaseMetaTileEntity;
-import gregtech.api.metatileentity.BaseTileEntity;
-
-import gtPlusPlus.api.objects.Logger;
-import gtPlusPlus.xmod.gregtech.common.tileentities.storage.GregtechMetaSafeBlock;
-
-public class UnbreakableBlockManager{
-
- private static boolean hasRun = false;
-
- public final BaseMetaTileEntity getmTileEntity() {
- return mTileEntity;
- }
-
-
- public final void setmTileEntity(final BaseMetaTileEntity mTileEntity/*, EntityPlayer aPlayer*/) {
- UnbreakableBlockManager.mTileEntity = mTileEntity;
- if (!hasRun){
- hasRun = true;
- this.makeIndestructible(/*aPlayer*/);
- }
- else {
- Logger.WARNING("Why do you run twice?");
- }
- }
-
-
- //BaseMetaTileEntity
- //GregtechMetaSafeBlock
- private static BaseMetaTileEntity mTileEntity = null;
-
-
- private void makeIndestructible(/*EntityPlayer aPlayer*/){
-
-
- Logger.WARNING("Initializing the code to set this TE to -1 hardness and make it indestructible.");
- final int X = mTileEntity.xCoord; //(GregtechMetaSafeBlock) this.mTileEntity.getXCoord();
- final int Y = mTileEntity.yCoord;
- final int Z = mTileEntity.zCoord;
- Logger.WARNING("Grabbing TileEntity @ [x,y,z] |"+X+"|"+Y+"|"+Z+"|");
-
- try{
- final GregtechMetaSafeBlock MetaSafeBlock = ((GregtechMetaSafeBlock) UnbreakableBlockManager.mTileEntity.getMetaTileEntity());
- final TileEntity BaseMetaTileEntity = mTileEntity.getTileEntity(X, Y, Z);
- //MetaSafeBlockBase.
- final World TE_WORLD = MetaSafeBlock.getBaseMetaTileEntity().getWorld();
- Logger.WARNING("Checking new State of Flag[nUnbreakable]. Value="+MetaSafeBlock.bUnbreakable);
- final TileEntity entity = BaseMetaTileEntity;
- innerInvincible(MetaSafeBlock, entity, TE_WORLD, /*aPlayer,*/ X, Y, Z);
- }
- catch (final NullPointerException e) {
- System.out.print("Caught a NullPointerException involving Safe Blocks. Cause: ");
- e.printStackTrace();
- }
- }
-
-
- private static void innerInvincible(final GregtechMetaSafeBlock MetaSafeBlock, final TileEntity entity, final World TE_WORLD, /*EntityPlayer aPlayer,*/ final int X, final int Y, final int Z){
- if (entity != null){
- Logger.WARNING("Checking new State of Flag[nUnbreakable]. Value="+MetaSafeBlock.bUnbreakable);
- Logger.WARNING("Grabbed TE: "+entity.toString());
-
-
-
-
- if ((entity instanceof BaseTileEntity) && !(entity instanceof BaseMetaPipeEntity)){
- final IMetaTileEntity I = ((BaseMetaTileEntity)entity).getMetaTileEntity();
- Logger.WARNING("Checking State of Flag[nUnbreakable]. Value="+MetaSafeBlock.bUnbreakable);
- Logger.WARNING("I Details: "+I.getMetaName()+" | "+I.getTileEntityBaseType()+" | "+I.toString());
-
-
-
-
-
- if (I instanceof GregtechMetaSafeBlock){
- Logger.WARNING("Checking State of Flag[nUnbreakable]. Value="+MetaSafeBlock.bUnbreakable);
-
- final Block ThisBlock = I.getBaseMetaTileEntity().getBlock(X, Y, Z);
- Logger.WARNING("Block Details: "+ThisBlock.toString());
-
-
- if (((GregtechMetaSafeBlock)I).bUnbreakable){
- ThisBlock.setHardness(Integer.MAX_VALUE);
- //ThisBlock.setResistance(18000000.0F);
- ThisBlock.setResistance(-1);
- ThisBlock.setBlockUnbreakable();
- Logger.WARNING("Changing State of Flag. Old Value="+MetaSafeBlock.bUnbreakable+" Expected Value=true");
- MetaSafeBlock.bUnbreakable = true;
- //entity.markDirty();
- Logger.WARNING("Checking new State of Flag[nUnbreakable]. Value="+MetaSafeBlock.bUnbreakable);
- Logger.ERROR("New Indestructible Flag enabled.");
- //GT_Utility.sendChatToPlayer(aPlayer, "Block is now unbreakable.");
- }
-
-
-
-
- else {
- ThisBlock.setHardness(1);
- ThisBlock.setResistance(1.0F);
- Logger.WARNING("Changing State of Flag. Old Value="+MetaSafeBlock.bUnbreakable+" Expected Value=false");
- MetaSafeBlock.bUnbreakable = false;
- //entity.markDirty();
- Logger.WARNING("Checking new State of Flag[nUnbreakable]. Value="+MetaSafeBlock.bUnbreakable);
- Logger.ERROR("New Indestructible Flag disabled.");
- //GT_Utility.sendChatToPlayer(aPlayer, "Block is now breakable.");
- }
-
- //entity.markDirty();
-
- Logger.WARNING("Block Hardness: "+ThisBlock.getBlockHardness(TE_WORLD, X, Y, Z));
- Logger.WARNING("Checking State of Flag[nUnbreakable]. Value="+MetaSafeBlock.bUnbreakable);
- hasRun = false;
-
- }
- else {
- Logger.WARNING("I is not an instanceof MetaSafeBlockBase");
- Logger.WARNING("Checking State of Flag[nUnbreakable]. Value="+MetaSafeBlock.bUnbreakable);
- }
- } else {
- Logger.WARNING("TE is not an instanceof BaseTileEntity or may be a pipe.");
- Logger.WARNING("Checking State of Flag[nUnbreakable]. Value="+MetaSafeBlock.bUnbreakable);
- }
- }else {
- Logger.WARNING("Did not grab a TE instance to make a block instance from.");
- Logger.WARNING("Checking State of Flag[nUnbreakable]. Value="+MetaSafeBlock.bUnbreakable);
- }
- }
-
-}
diff --git a/src/Java/gtPlusPlus/core/handler/events/ZombieBackupSpawnEventHandler.java b/src/Java/gtPlusPlus/core/handler/events/ZombieBackupSpawnEventHandler.java
deleted file mode 100644
index 68df68aa2a..0000000000
--- a/src/Java/gtPlusPlus/core/handler/events/ZombieBackupSpawnEventHandler.java
+++ /dev/null
@@ -1,55 +0,0 @@
-package gtPlusPlus.core.handler.events;
-
-import java.lang.reflect.Field;
-
-import org.apache.commons.lang3.reflect.FieldUtils;
-
-import cpw.mods.fml.common.eventhandler.Event.Result;
-import cpw.mods.fml.common.eventhandler.EventPriority;
-import cpw.mods.fml.common.eventhandler.SubscribeEvent;
-
-import gtPlusPlus.api.objects.Logger;
-import net.minecraftforge.event.entity.living.ZombieEvent;
-
-public class ZombieBackupSpawnEventHandler {
-
- /**
- *
- * Do we really need this pathetic mechanic to exist when it doesn't work properly at all?
- * Or , well, maybe you enjoy Zombies spawning IN YOUR FUCKING FACE?!
- *
- */
-
- @SubscribeEvent(priority = EventPriority.HIGHEST)
- public void onZombieReinforcement(final ZombieEvent.SummonAidEvent event) {
- try {
- try {
- Field mChance = FieldUtils.getDeclaredField(this.getClass(), "summonChance", true);
- FieldUtils.removeFinalModifier(mChance, true);
- mChance.set(this, 0);
- }
- catch(Throwable t){}
- if (event.attacker != null){
- //SegmentHelper.getInstance().trackUser(event.attacker.getUniqueID().toString(), "Zombie Backup");
- }
- Logger.WARNING("[Zombie] ZombieEvent.SummonAidEvent.");
- event.setResult(Result.DENY);
- }
- catch(Throwable t){}
- }
-
- @SubscribeEvent(priority = EventPriority.HIGHEST)
- public void onZombieReinforcement(final ZombieEvent event) {
- try {
- Logger.WARNING("[Zombie] ZombieEvent.");
- if (event.entity != null){
- Logger.WARNING("Event Entity: "+event.entity.getCommandSenderName());
- }
- event.setResult(Result.DENY);
- }
- catch(Throwable t){
-
- }
- }
-
-}
diff --git a/src/Java/gtPlusPlus/core/handler/render/CapeHandler.java b/src/Java/gtPlusPlus/core/handler/render/CapeHandler.java
deleted file mode 100644
index 491d9a2aba..0000000000
--- a/src/Java/gtPlusPlus/core/handler/render/CapeHandler.java
+++ /dev/null
@@ -1,122 +0,0 @@
-package gtPlusPlus.core.handler.render;
-
-import java.util.Collection;
-
-import org.lwjgl.opengl.GL11;
-
-import net.minecraft.client.entity.AbstractClientPlayer;
-import net.minecraft.client.model.ModelBiped;
-import net.minecraft.client.renderer.entity.RenderManager;
-import net.minecraft.client.renderer.entity.RenderPlayer;
-import net.minecraft.potion.Potion;
-import net.minecraft.util.MathHelper;
-import net.minecraft.util.ResourceLocation;
-
-import gregtech.api.enums.GT_Values;
-import gregtech.api.util.GT_Log;
-import gregtech.api.util.GT_Utility;
-
-import gtPlusPlus.core.lib.CORE;
-import net.minecraftforge.client.event.RenderPlayerEvent;
-
-public class CapeHandler extends RenderPlayer {
- private final ResourceLocation[] mCapes = {
- new ResourceLocation(CORE.MODID+":textures/TesterCape.png"),
- new ResourceLocation(CORE.MODID+":textures/Draknyte1.png"),
- new ResourceLocation("gregtech:textures/GregoriusCape.png") };
- private final Collection<String> mCapeList;
-
- public CapeHandler(final Collection<String> aCapeList) {
- this.mCapeList = aCapeList;
- this.setRenderManager(RenderManager.instance);
- }
-
- public void receiveRenderSpecialsEvent(final RenderPlayerEvent.Specials.Pre aEvent) {
- final AbstractClientPlayer aPlayer = (AbstractClientPlayer) aEvent.entityPlayer;
- if (GT_Utility.getFullInvisibility(aPlayer)) {
- aEvent.setCanceled(true);
- return;
- }
- final float aPartialTicks = aEvent.partialRenderTick;
- if (aPlayer.isInvisible()) {
- return;
- }
- if (GT_Utility.getPotion(aPlayer,
- Integer.valueOf(Potion.invisibility.id).intValue())) {
- return;
- }
- try {
- ResourceLocation tResource = null;
- if (aPlayer.getDisplayName().equalsIgnoreCase("XW3B")) {
- tResource = this.mCapes[0];
- }
- if (this.mCapeList.contains(aPlayer.getDisplayName().toLowerCase())) {
- tResource = this.mCapes[0];
- }
- if (aPlayer.getDisplayName().equalsIgnoreCase("Draknyte1")) {
- tResource = this.mCapes[1];
- }
- if (aPlayer.getDisplayName().equalsIgnoreCase("GregoriusT")) {
- tResource = this.mCapes[2];
- }
- if ((tResource != null) && (!(aPlayer.getHideCape()))) {
- this.bindTexture(tResource);
- GL11.glPushMatrix();
- GL11.glTranslatef(0.0F, 0.0F, 0.125F);
- final double d0 = (aPlayer.field_71091_bM
- + ((aPlayer.field_71094_bP - aPlayer.field_71091_bM)
- * aPartialTicks))
- - (aPlayer.prevPosX + ((aPlayer.posX - aPlayer.prevPosX)
- * aPartialTicks));
- final double d1 = (aPlayer.field_71096_bN
- + ((aPlayer.field_71095_bQ - aPlayer.field_71096_bN)
- * aPartialTicks))
- - (aPlayer.prevPosY + ((aPlayer.posY - aPlayer.prevPosY)
- * aPartialTicks));
- final double d2 = (aPlayer.field_71097_bO
- + ((aPlayer.field_71085_bR - aPlayer.field_71097_bO)
- * aPartialTicks))
- - (aPlayer.prevPosZ + ((aPlayer.posZ - aPlayer.prevPosZ)
- * aPartialTicks));
- final float f6 = aPlayer.prevRenderYawOffset
- + ((aPlayer.renderYawOffset - aPlayer.prevRenderYawOffset)
- * aPartialTicks);
- final double d3 = MathHelper.sin((f6 * CORE.PI) / 180.0F);
- final double d4 = -MathHelper.cos((f6 * CORE.PI) / 180.0F);
- float f7 = (float) d1 * 10.0F;
- float f8 = (float) ((d0 * d3) + (d2 * d4)) * 100.0F;
- final float f9 = (float) ((d0 * d4) - (d2 * d3)) * 100.0F;
- if (f7 < -6.0F) {
- f7 = -6.0F;
- }
- if (f7 > 32.0F) {
- f7 = 32.0F;
- }
- if (f8 < 0.0F) {
- f8 = 0.0F;
- }
- final float f10 = aPlayer.prevCameraYaw
- + ((aPlayer.cameraYaw - aPlayer.prevCameraYaw)
- * aPartialTicks);
- f7 += MathHelper
- .sin((aPlayer.prevDistanceWalkedModified + ((aPlayer.distanceWalkedModified - aPlayer.prevDistanceWalkedModified)
- * aPartialTicks)) * 6.0F)
- * 32.0F * f10;
- if (aPlayer.isSneaking()) {
- f7 += 25.0F;
- }
- GL11.glRotatef(6.0F + (f8 / 2.0F) + f7, 1.0F, 0.0F, 0.0F);
- GL11.glRotatef(f9 / 2.0F, 0.0F, 0.0F, 1.0F);
- GL11.glRotatef(-f9 / 2.0F, 0.0F, 1.0F, 0.0F);
- GL11.glRotatef(180.0F, 0.0F, 1.0F, 0.0F);
- ((ModelBiped) this.mainModel).renderCloak(0.0625F);
- GL11.glPopMatrix();
- }
- } catch (final Throwable e) {
- if (GT_Values.D1) {
- e.printStackTrace(GT_Log.err);
- }
- }
- }
-
-}
diff --git a/src/Java/gtPlusPlus/core/handler/render/FirepitModel.java b/src/Java/gtPlusPlus/core/handler/render/FirepitModel.java
deleted file mode 100644
index 029d961bff..0000000000
--- a/src/Java/gtPlusPlus/core/handler/render/FirepitModel.java
+++ /dev/null
@@ -1,121 +0,0 @@
-// Date: 20/12/2016 5:51:14 PM
-// Template version 1.1
-// Java generated by Techne
-// Keep in mind that you still need to fill in some blanks
-// - ZeuX
-
-package gtPlusPlus.core.handler.render;
-
-import net.minecraft.client.model.ModelBase;
-import net.minecraft.client.model.ModelRenderer;
-import net.minecraft.entity.Entity;
-
-import gtPlusPlus.core.lib.CORE;
-
-public class FirepitModel extends ModelBase
-{
- //fields
- ModelRenderer Side_A;
- ModelRenderer Side_B;
- ModelRenderer Side_C;
- ModelRenderer Side_D;
- ModelRenderer Log1;
- ModelRenderer Log2;
- ModelRenderer Log3;
- ModelRenderer Log4;
-
- public FirepitModel()
- {
- this.textureWidth = 16;
- this.textureHeight = 16;
-
- this.Side_A = new ModelRenderer(this, 0, 0);
- this.Side_A.addBox(0F, 0F, 0F, 12, 6, 1);
- this.Side_A.setRotationPoint(-6F, 18F, -6F);
- this.Side_A.setTextureSize(16, 16);
- this.Side_A.mirror = true;
- setRotation(this.Side_A, -0.3148822F, 0F, 0F);
- //Side_A.mirror = false;
-
- this.Side_B = new ModelRenderer(this, 0, 0);
- this.Side_B.addBox(0F, 0F, 0F, 12, 6, 1);
- this.Side_B.setRotationPoint(-6F, 18F, 6F);
- this.Side_B.setTextureSize(16, 16);
- this.Side_B.mirror = true;
- setRotation(this.Side_B, -0.3148822F, (CORE.PI/2), 0F);
-
- this.Side_C = new ModelRenderer(this, 0, 0);
- this.Side_C.addBox(0F, 0F, 0F, 12, 6, 1);
- this.Side_C.setRotationPoint(6F, 18F, 6F);
- this.Side_C.setTextureSize(16, 16);
- this.Side_C.mirror = true;
- setRotation(this.Side_C, -0.3148822F, CORE.PI, 0F);
- //Side_C.mirror = false;
-
- this.Side_D = new ModelRenderer(this, 0, 0);
- this.Side_D.addBox(0F, 0F, 0F, 12, 6, 1);
- this.Side_D.setRotationPoint(6F, 18F, -6F);
- this.Side_D.setTextureSize(16, 16);
- this.Side_D.mirror = true;
- setRotation(this.Side_D, -0.3148822F, 4.712389F, 0F);
-
- this.Log1 = new ModelRenderer(this, 0, 10);
- this.Log1.addBox(0F, 0F, 0F, 14, 2, 2);
- this.Log1.setRotationPoint(4F, 10F, -4F);
- this.Log1.setTextureSize(16, 16);
- this.Log1.mirror = true;
- setRotation(this.Log1, 0F, 0F, (CORE.PI/2));
-
- this.Log2 = new ModelRenderer(this, -2, 10);
- this.Log2.addBox(0F, 0F, 0F, 14, 2, 2);
- this.Log2.setRotationPoint(-4F, 10F, -4F);
- this.Log2.setTextureSize(16, 16);
- this.Log2.mirror = true;
- setRotation(this.Log2, (CORE.PI/2), 0F, (CORE.PI/2));
- //Log2.mirror = false;
-
- this.Log3 = new ModelRenderer(this, 0, 10);
- this.Log3.addBox(0F, 0F, 0F, 14, 2, 2);
- this.Log3.setRotationPoint(-4F, 10F, 4F);
- this.Log3.setTextureSize(16, 16);
- this.Log3.mirror = true;
- setRotation(this.Log3, CORE.PI, 0F, (CORE.PI/2));
-
- this.Log4 = new ModelRenderer(this, -2, 10);
- this.Log4.addBox(0F, 0F, 0F, 14, 2, 2);
- this.Log4.setRotationPoint(4F, 10F, 4F);
- this.Log4.setTextureSize(16, 16);
- this.Log4.mirror = true;
- setRotation(this.Log4, 4.712389F, 0F, (CORE.PI/2));
- //Log4.mirror = false;
- }
-
- @Override
- public void render(final Entity entity, final float f, final float f1, final float f2, final float f3, final float f4, final float f5)
- {
- super.render(entity, f, f1, f2, f3, f4, f5);
- this.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
- this.Side_A.render(f5);
- this.Side_B.render(f5);
- this.Side_C.render(f5);
- this.Side_D.render(f5);
- this.Log1.render(f5);
- this.Log2.render(f5);
- this.Log3.render(f5);
- this.Log4.render(f5);
- }
-
- private static void setRotation(final ModelRenderer model, final float x, final float y, final float z)
- {
- model.rotateAngleX = x;
- model.rotateAngleY = y;
- model.rotateAngleZ = z;
- }
-
- @Override
- public void setRotationAngles(final float f, final float f1, final float f2, final float f3, final float f4, final float f5, final Entity entity)
- {
- super.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
- }
-
-}
diff --git a/src/Java/gtPlusPlus/core/handler/render/FirepitRender.java b/src/Java/gtPlusPlus/core/handler/render/FirepitRender.java
deleted file mode 100644
index 7b8d23e25b..0000000000
--- a/src/Java/gtPlusPlus/core/handler/render/FirepitRender.java
+++ /dev/null
@@ -1,55 +0,0 @@
-package gtPlusPlus.core.handler.render;
-
-import org.lwjgl.opengl.GL11;
-
-import net.minecraft.block.Block;
-import net.minecraft.client.renderer.OpenGlHelper;
-import net.minecraft.client.renderer.Tessellator;
-import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
-import net.minecraft.entity.Entity;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.util.ResourceLocation;
-import net.minecraft.world.World;
-public class FirepitRender extends TileEntitySpecialRenderer{
- ResourceLocation texture = new ResourceLocation("miscutils" + ":"+ "textures/blocks/FirePit/mossyFirepit.png");
-
- private final FirepitModel model;
-
- public FirepitRender(){
- this.model = new FirepitModel();
- }
-
- private void adjustRotatePivotViaMeta(final World world, final int x, final int y, final int z) {
- final int meta = world.getBlockMetadata(x, y, z);
- GL11.glPushMatrix();
- GL11.glRotatef(meta * (-90), 0.0F, 0.0F, 1.0F);
- GL11.glPopMatrix();
- }
-
- @Override
- public void renderTileEntityAt(final TileEntity entity, final double x, final double y, final double z, final float i) {
- GL11.glPushMatrix();
- GL11.glTranslatef((float)x + 0.1F, (float)y + 1.0F, (float)z + 0.5F);
- GL11.glRotatef(180, 0F, 0F, 1F);
-
- this.bindTexture(this.texture);
- GL11.glPushMatrix();
- this.model.render((Entity)null, 0.0F, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F);
- GL11.glTranslatef(1.0f, 1.0f, 1.0f);
- GL11.glPopMatrix();
- GL11.glPopMatrix();
- }
-
- //Set the lighting stuff, so it changes it's brightness properly.
- private void adjustLightFixture(final World world, final int i, final int j, final int k, final Block block) {
- final Tessellator tess = Tessellator.instance;
- //float brightness = block.getBlockBrightness(world, i, j, k);
- //As of MC 1.7+ block.getBlockBrightness() has become block.getLightValue():
- final float brightness = block.getLightValue(world, i, j, k);
- final int skyLight = world.getLightBrightnessForSkyBlocks(i, j, k, 0);
- final int modulousModifier = skyLight % 65536;
- final int divModifier = skyLight / 65536;
- tess.setColorOpaque_F(brightness, brightness, brightness);
- OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, modulousModifier, divModifier);
- }
-}
diff --git a/src/Java/gtPlusPlus/core/handler/workbench/Workbench_CraftingHandler.java b/src/Java/gtPlusPlus/core/handler/workbench/Workbench_CraftingHandler.java
deleted file mode 100644
index d6a73512e2..0000000000
--- a/src/Java/gtPlusPlus/core/handler/workbench/Workbench_CraftingHandler.java
+++ /dev/null
@@ -1,208 +0,0 @@
-package gtPlusPlus.core.handler.workbench;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-
-import net.minecraft.block.Block;
-import net.minecraft.init.Blocks;
-import net.minecraft.init.Items;
-import net.minecraft.inventory.InventoryCrafting;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.item.crafting.IRecipe;
-import net.minecraft.item.crafting.ShapedRecipes;
-import net.minecraft.item.crafting.ShapelessRecipes;
-import net.minecraft.world.World;
-
-public class Workbench_CraftingHandler {
-
- private static final Workbench_CraftingHandler instance = new Workbench_CraftingHandler();
- private final List<IRecipe> recipes = new ArrayList<IRecipe>();
-
- public static final Workbench_CraftingHandler getInstance() {
- return instance;
- }
- public Workbench_CraftingHandler() {
-
- //just a example recipe so you know how to add them
- this.addRecipe(new ItemStack(Blocks.iron_block), new Object[]
- {
- "###",
- "###",
- "###",
- Character.valueOf('#'), Items.iron_ingot
- });
-
- //another example Recipe, but shapeless
- this.addShapelessRecipe(new ItemStack(Items.cake),new Object[]{Items.stick});
-
-
- }
-
- void addRecipe(final ItemStack par1ItemStack, final Object par2ArrayOfObj[])
- {
- String s = "";
- int i = 0;
- int j = 0;
- int k = 0;
-
- if (par2ArrayOfObj[i] instanceof String[])
- {
- final String as[] = (String[])par2ArrayOfObj[i++];
-
- for (int l = 0; l < as.length; l++)
- {
- final String s2 = as[l];
- k++;
- j = s2.length();
- s = (new StringBuilder()).append(s).append(s2).toString();
- }
- }
- else
- {
- while (par2ArrayOfObj[i] instanceof String)
- {
- final String s1 = (String)par2ArrayOfObj[i++];
- k++;
- j = s1.length();
- s = (new StringBuilder()).append(s).append(s1).toString();
- }
- }
-
- final HashMap<Character, ItemStack> hashmap = new HashMap<Character, ItemStack>();
-
- for (; i < par2ArrayOfObj.length; i += 2)
- {
- final Character character = (Character)par2ArrayOfObj[i];
- ItemStack itemstack = null;
-
- if (par2ArrayOfObj[i + 1] instanceof Item)
- {
- itemstack = new ItemStack((Item)par2ArrayOfObj[i + 1]);
- }
- else if (par2ArrayOfObj[i + 1] instanceof Block)
- {
- itemstack = new ItemStack((Block)par2ArrayOfObj[i + 1], 1, -1);
- }
- else if (par2ArrayOfObj[i + 1] instanceof ItemStack)
- {
- itemstack = (ItemStack)par2ArrayOfObj[i + 1];
- }
-
- hashmap.put(character, itemstack);
- }
-
- final ItemStack aitemstack[] = new ItemStack[j * k];
-
- for (int i1 = 0; i1 < (j * k); i1++)
- {
- final char c = s.charAt(i1);
-
- if (hashmap.containsKey(Character.valueOf(c)))
- {
- aitemstack[i1] = hashmap.get(Character.valueOf(c)).copy();
- }
- else
- {
- aitemstack[i1] = null;
- }
- }
-
- this.recipes.add(new ShapedRecipes(j, k, aitemstack, par1ItemStack));
- }
-
- public void addShapelessRecipe(final ItemStack par1ItemStack, final Object par2ArrayOfObj[])
- {
- final ArrayList<ItemStack> arraylist = new ArrayList<ItemStack>();
- final Object aobj[] = par2ArrayOfObj;
- final int i = aobj.length;
-
- for (int j = 0; j < i; j++)
- {
- final Object obj = aobj[j];
-
- if (obj instanceof ItemStack)
- {
- arraylist.add(((ItemStack)obj).copy());
- continue;
- }
-
- if (obj instanceof Item)
- {
- arraylist.add(new ItemStack((Item)obj));
- continue;
- }
-
- if (obj instanceof Block)
- {
- arraylist.add(new ItemStack((Block)obj));
- }
- else
- {
- throw new RuntimeException("Invalid shapeless recipe!");
- }
- }
-
- this.recipes.add(new ShapelessRecipes(par1ItemStack, arraylist));
- }
-
- public ItemStack findMatchingRecipe(final InventoryCrafting par1InventoryCrafting, final World par2World)
- {
- int i = 0;
- for (int j = 0; j < par1InventoryCrafting.getSizeInventory(); j++)
- {
- final ItemStack itemstack2 = par1InventoryCrafting.getStackInSlot(j);
-
- if (itemstack2 == null)
- {
- continue;
- }
-
- if (i == 0)
- {
- }
-
- if (i == 1)
- {
- }
-
- i++;
- }
-
- //TODO - Update from itemIDs
- /*if (i == 2 && itemstack.itemID == itemstack1.itemID && itemstack.stackSize == 1 && itemstack1.stackSize == 1 && Item.itemsList[itemstack.itemID].isDamageable())
- {
- Item item = Item.itemsList[itemstack.itemID];
- int l = item.getMaxDamage() - itemstack.getItemDamageForDisplay();
- int i1 = item.getMaxDamage() - itemstack1.getItemDamageForDisplay();
- int j1 = l + i1 + (item.getMaxDamage() * 10) / 100;
- int k1 = item.getMaxDamage() - j1;
-
- if (k1 < 0)
- {
- k1 = 0;
- }
-
- return new ItemStack(itemstack.itemID, 1, k1);
- }*/
-
- for (int k = 0; k < this.recipes.size(); k++)
- {
- final IRecipe irecipe = this.recipes.get(k);
-
- if (irecipe.matches(par1InventoryCrafting, par2World))
- {
- return irecipe.getCraftingResult(par1InventoryCrafting);
- }
- }
-
- return null;
- }
-
-
- public List<IRecipe> getRecipeList()
- {
- return this.recipes;
- }
-} \ No newline at end of file
diff --git a/src/Java/gtPlusPlus/core/handler/workbench/Workbench_RecipeSorter.java b/src/Java/gtPlusPlus/core/handler/workbench/Workbench_RecipeSorter.java
deleted file mode 100644
index 9d5f7d03ed..0000000000
--- a/src/Java/gtPlusPlus/core/handler/workbench/Workbench_RecipeSorter.java
+++ /dev/null
@@ -1,44 +0,0 @@
-package gtPlusPlus.core.handler.workbench;
-
-import java.util.Comparator;
-
-import net.minecraft.item.crafting.IRecipe;
-import net.minecraft.item.crafting.ShapedRecipes;
-import net.minecraft.item.crafting.ShapelessRecipes;
-
-public class Workbench_RecipeSorter implements Comparator<Object>
-{
- final Workbench_CraftingHandler CraftingManagerCrafter;
-
- Workbench_RecipeSorter(final Workbench_CraftingHandler par1CraftingManager)
- {
- this.CraftingManagerCrafter = par1CraftingManager;
- }
-
- public int compareRecipes(final IRecipe par1IRecipe, final IRecipe par2IRecipe)
- {
- if ((par1IRecipe instanceof ShapelessRecipes) && (par2IRecipe instanceof ShapedRecipes))
- {
- return 1;
- }
-
- if ((par2IRecipe instanceof ShapelessRecipes) && (par1IRecipe instanceof ShapedRecipes))
- {
- return -1;
- }
-
- if (par2IRecipe.getRecipeSize() < par1IRecipe.getRecipeSize())
- {
- return -1;
- }
-
- return par2IRecipe.getRecipeSize() <= par1IRecipe.getRecipeSize() ? 0 : 1;
- }
-
- @Override
- public int compare(final Object par1Obj, final Object par2Obj)
- {
- return this.compareRecipes((IRecipe)par1Obj, (IRecipe)par2Obj);
- }
-
-} \ No newline at end of file