aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gtPlusPlus/core
diff options
context:
space:
mode:
authorMartin Robertz <dream-master@gmx.net>2022-01-30 09:57:25 +0100
committerGitHub <noreply@github.com>2022-01-30 09:57:25 +0100
commit69834eef41c6cb12d69b1963603f7426e0736682 (patch)
tree4b3e3887be059a2e3373a89e7aa8ffa996478a05 /src/main/java/gtPlusPlus/core
parent8cc0619706f93b4e81fb930ec7fb85cdcbd5d734 (diff)
parent1d983706ef427b1d008787843ac23529e43cc659 (diff)
downloadGT5-Unofficial-69834eef41c6cb12d69b1963603f7426e0736682.tar.gz
GT5-Unofficial-69834eef41c6cb12d69b1963603f7426e0736682.tar.bz2
GT5-Unofficial-69834eef41c6cb12d69b1963603f7426e0736682.zip
Merge pull request #102 from GTNewHorizons/St00f
St00f
Diffstat (limited to 'src/main/java/gtPlusPlus/core')
-rw-r--r--src/main/java/gtPlusPlus/core/block/base/BlockBaseModular.java55
-rw-r--r--src/main/java/gtPlusPlus/core/common/CommonProxy.java4
-rw-r--r--src/main/java/gtPlusPlus/core/config/ConfigHandler.java334
-rw-r--r--src/main/java/gtPlusPlus/core/handler/MobMentality.java58
-rw-r--r--src/main/java/gtPlusPlus/core/handler/events/EnderDragonDeathHandler.java57
-rw-r--r--src/main/java/gtPlusPlus/core/handler/events/PlayerSleepEventHandler.java106
-rw-r--r--src/main/java/gtPlusPlus/core/item/ModItems.java10
-rw-r--r--src/main/java/gtPlusPlus/core/item/base/BaseItemComponent.java45
-rw-r--r--src/main/java/gtPlusPlus/core/item/base/CoreItem.java4
-rw-r--r--src/main/java/gtPlusPlus/core/item/base/itemblock/ItemBlockGtBlock.java62
-rw-r--r--src/main/java/gtPlusPlus/core/item/general/ItemMagicFeather.java269
-rw-r--r--src/main/java/gtPlusPlus/core/lib/CORE.java1
-rw-r--r--src/main/java/gtPlusPlus/core/material/ELEMENT.java1
-rw-r--r--src/main/java/gtPlusPlus/core/potion/GtPotionEffect.java11
-rw-r--r--src/main/java/gtPlusPlus/core/proxy/ClientProxy.java38
-rw-r--r--src/main/java/gtPlusPlus/core/recipe/RECIPES_General.java15
-rw-r--r--src/main/java/gtPlusPlus/core/util/math/MathUtils.java13
-rw-r--r--src/main/java/gtPlusPlus/core/util/minecraft/PlayerUtils.java5
-rw-r--r--src/main/java/gtPlusPlus/core/util/reflect/ReflectionUtils.java21
19 files changed, 814 insertions, 295 deletions
diff --git a/src/main/java/gtPlusPlus/core/block/base/BlockBaseModular.java b/src/main/java/gtPlusPlus/core/block/base/BlockBaseModular.java
index c0113e869b..035b13dfbf 100644
--- a/src/main/java/gtPlusPlus/core/block/base/BlockBaseModular.java
+++ b/src/main/java/gtPlusPlus/core/block/base/BlockBaseModular.java
@@ -6,28 +6,27 @@ import java.util.Map;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
-
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.item.ItemStack;
-import net.minecraft.world.IBlockAccess;
import gregtech.api.enums.OrePrefixes;
import gregtech.api.enums.TextureSet;
+import gregtech.api.util.GT_LanguageManager;
import gregtech.api.util.GT_OreDictUnificator;
import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.item.base.itemblock.ItemBlockGtBlock;
-import gtPlusPlus.core.item.base.itemblock.ItemBlockGtFrameBox;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.material.Material;
import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.math.MathUtils;
import gtPlusPlus.core.util.minecraft.ItemUtils;
+import net.minecraft.client.renderer.texture.IIconRegister;
+import net.minecraft.item.ItemStack;
+import net.minecraft.world.IBlockAccess;
public class BlockBaseModular extends BasicBlock {
protected Material blockMaterial;
protected int blockColour;
- protected BlockTypes thisBlock;
+ public BlockTypes thisBlock;
protected String thisBlockMaterial;
protected final String thisBlockType;
@@ -42,7 +41,7 @@ public class BlockBaseModular extends BasicBlock {
registerComponent();
}
- protected BlockBaseModular(final String unlocalizedName, final String blockMaterial,
+ protected BlockBaseModular(final String unlocalizedName, final String blockMaterialString,
final net.minecraft.block.material.Material vanillaMaterial, final BlockTypes blockType, final int colour,
final int miningLevel) {
super(blockType, unlocalizedName, vanillaMaterial, miningLevel);
@@ -50,33 +49,20 @@ public class BlockBaseModular extends BasicBlock {
this.setBlockTextureName(CORE.MODID + ":" + blockType.getTexture());
this.blockColour = colour;
this.thisBlock = blockType;
- this.thisBlockMaterial = blockMaterial;
+ this.thisBlockMaterial = blockMaterialString;
this.thisBlockType = blockType.name().toUpperCase();
this.setBlockName(this.GetProperName());
int fx = getBlockTypeMeta();
+ //ItemBlockGtBlock.sNameCache.put("block."+blockMaterial.getUnlocalizedName()+"."+this.thisBlock.name().toLowerCase(), GetProperName());
+ GameRegistry.registerBlock(this, ItemBlockGtBlock.class, Utils.sanitizeString(blockType.getTexture() + unlocalizedName));
if (fx == 0) {
- GameRegistry.registerBlock(this, ItemBlockGtBlock.class,
- Utils.sanitizeString(blockType.getTexture() + unlocalizedName));
- GT_OreDictUnificator.registerOre(
- "block" + getUnlocalizedName().replace("tile.block", "").replace("tile.", "").replace("of", "")
- .replace("Of", "").replace("Block", "").replace("-", "").replace("_", "").replace(" ", ""),
- ItemUtils.getSimpleStack(this));
+ GT_OreDictUnificator.registerOre("block" + thisBlockMaterial.replace(" ", ""), ItemUtils.getSimpleStack(this));
}
else if (fx == 1) {
- GameRegistry.registerBlock(this, ItemBlockGtBlock.class,
- Utils.sanitizeString(blockType.getTexture() + unlocalizedName));
- GT_OreDictUnificator.registerOre(
- "frameGt" + getUnlocalizedName().replace("tile.", "").replace("tile.BlockGtFrame", "")
- .replace("-", "").replace("_", "").replace(" ", "").replace("FrameBox", ""),
- ItemUtils.getSimpleStack(this));
+ GT_OreDictUnificator.registerOre("frameGt" + thisBlockMaterial.replace(" ", ""), ItemUtils.getSimpleStack(this));
}
else if (fx == 2) {
- GameRegistry.registerBlock(this, ItemBlockGtBlock.class,
- Utils.sanitizeString(blockType.getTexture() + unlocalizedName));
- GT_OreDictUnificator.registerOre(
- "block" + getUnlocalizedName().replace("tile.block", "").replace("tile.", "").replace("of", "")
- .replace("Of", "").replace("Block", "").replace("-", "").replace("_", "").replace(" ", ""),
- ItemUtils.getSimpleStack(this));
+ GT_OreDictUnificator.registerOre("frameGt" + thisBlockMaterial.replace(" ", ""), ItemUtils.getSimpleStack(this));
}
}
@@ -135,7 +121,7 @@ public class BlockBaseModular extends BasicBlock {
}
public String GetProperName() {
- String tempIngot;
+ String tempIngot = null;
if (this.thisBlock == BlockTypes.STANDARD) {
tempIngot = "Block of " + this.thisBlockMaterial;
}
@@ -145,14 +131,21 @@ public class BlockBaseModular extends BasicBlock {
else if (this.thisBlock == BlockTypes.ORE) {
tempIngot = this.thisBlockMaterial + " Ore [Old]";
}
- else {
-
- tempIngot = this.getUnlocalizedName().replace("tile.blockGt", "ingot");
- }
return tempIngot;
}
@Override
+ public String getLocalizedName() {
+ String aFormattedLangName = GetProperName();
+ return GT_LanguageManager.addStringLocalization("block."+blockMaterial.getUnlocalizedName()+"."+this.thisBlock.name().toLowerCase()+".name", aFormattedLangName);
+ }
+
+ @Override
+ public String getUnlocalizedName() {
+ return "block."+blockMaterial.getUnlocalizedName()+"."+this.thisBlock.name().toLowerCase();
+ }
+
+ @Override
public boolean isOpaqueCube() {
return false;
}
diff --git a/src/main/java/gtPlusPlus/core/common/CommonProxy.java b/src/main/java/gtPlusPlus/core/common/CommonProxy.java
index c038afce8f..2909ef3541 100644
--- a/src/main/java/gtPlusPlus/core/common/CommonProxy.java
+++ b/src/main/java/gtPlusPlus/core/common/CommonProxy.java
@@ -124,6 +124,10 @@ public class CommonProxy {
Utils.registerEvent(new HandlerTooltip_EIO());
// Handles Custom Tooltips for GC
Utils.registerEvent(new HandlerTooltip_GC());
+ // Handles Sleep Benefits
+ PlayerSleepEventHandler.init();
+ // Handles Magic Feather
+ Utils.registerEvent(ModItems.itemMagicFeather);
if (CORE.DEVENV) {
Utils.registerEvent(new StopAnnoyingFuckingAchievements());
diff --git a/src/main/java/gtPlusPlus/core/config/ConfigHandler.java b/src/main/java/gtPlusPlus/core/config/ConfigHandler.java
index 2e1d43bdda..951b10b432 100644
--- a/src/main/java/gtPlusPlus/core/config/ConfigHandler.java
+++ b/src/main/java/gtPlusPlus/core/config/ConfigHandler.java
@@ -14,234 +14,162 @@ import net.minecraftforge.common.config.Configuration;
public class ConfigHandler {
public static void handleConfigFile(final FMLPreInitializationEvent event) {
- final Configuration config = new Configuration(
- new File(event.getModConfigurationDirectory(), "GTplusplus/GTplusplus.cfg"));
+ final Configuration config = new Configuration(new File(event.getModConfigurationDirectory(), "GTplusplus/GTplusplus.cfg"));
config.load();
-
+
// Debug
/* DEBUG = config.getBoolean("debugMode", "debug", false,
"Enables all sorts of debug logging. (Don't use unless told to, breaks other things.)");*/
- disableEnderIOIntegration = config.getBoolean("disableEnderIO", "debug", false,
- "Disables EnderIO Integration.");
- disableEnderIOIngotTooltips = config.getBoolean("disableEnderIOIngotTooltips", "debug", false,
- "Disables EnderIO Ingot Tooltips. These apparently may cause issues for a very small number of users.");
- MACHINE_INFO = config.getBoolean("enableMachineInfoLogging", "debug", false,
- "Makes many machines display lots of debug logging.");
- showHiddenNEIItems = config.getBoolean("showHiddenNEIItems", "debug", false,
- "Makes all items hidden from NEI display.");
- dumpItemAndBlockData = config.getBoolean("dumpItemAndBlockData", "debug", false,
- "Dumps all GT++ and Toxic Everglade Data to en_US.lang in the config folder. This config option can be used by foreign players to generate blank .lang files, which they can populate with their language of choice.");
-
-
+ disableEnderIOIntegration = config.getBoolean("disableEnderIO", "debug", false, "Disables EnderIO Integration.");
+ disableEnderIOIngotTooltips = config.getBoolean("disableEnderIOIngotTooltips", "debug", false, "Disables EnderIO Ingot Tooltips. These apparently may cause issues for a very small number of users.");
+ MACHINE_INFO = config.getBoolean("enableMachineInfoLogging", "debug", false, "Makes many machines display lots of debug logging.");
+ showHiddenNEIItems = config.getBoolean("showHiddenNEIItems", "debug", false, "Makes all items hidden from NEI display.");
+ dumpItemAndBlockData = config.getBoolean("dumpItemAndBlockData", "debug", false, "Dumps all GT++ and Toxic Everglade Data to en_US.lang in the config folder. This config option can be used by foreign players to generate blank .lang files, which they can populate with their language of choice.");
+
// Machines
- enableThaumcraftShardUnification = config.getBoolean("enableThaumcraftShardUnification", "machines", false,
- "Allows the use of TC shards across many recipes by oreDicting them into a common group.");
- enableAlternativeBatteryAlloy = config.getBoolean("enableAlternativeBatteryAlloy", "machines", false,
- "Adds a non-Antimony using Battery Alloy. Not Balanced at all..");
- disableIC2Recipes = config.getBoolean("disableIC2Recipes", "machines", false,
- "Alkaluscraft Related - Removes IC2 Cables Except glass fibre. Few other Misc Tweaks.");
- enableAlternativeDivisionSigilRecipe = config.getBoolean("enableAlternativeDivisionSigilRecipe", "machines",
- false, "Utilizes Neutronium instead.");
+ enableThaumcraftShardUnification = config.getBoolean("enableThaumcraftShardUnification", "machines", false, "Allows the use of TC shards across many recipes by oreDicting them into a common group.");
+ enableAlternativeBatteryAlloy = config.getBoolean("enableAlternativeBatteryAlloy", "machines", false, "Adds a non-Antimony using Battery Alloy. Not Balanced at all..");
+ disableIC2Recipes = config.getBoolean("disableIC2Recipes", "machines", false, "Alkaluscraft Related - Removes IC2 Cables Except glass fibre. Few other Misc Tweaks.");
+ enableAlternativeDivisionSigilRecipe = config.getBoolean("enableAlternativeDivisionSigilRecipe", "machines", false, "Utilizes Neutronium instead.");
boilerSteamPerSecond = config.getInt("boilerSteamPerSecond", "machines", 750, 0, 10000, "Sets the steam per second value in LV,MV,HV boilers (respectively 1x,2x,3x this number for the tiers)");
-
- //requireControlCores
+
+ // requireControlCores
boolean temp = config.getBoolean("requireControlCores", "machines", true, "Multiblocks Require Control Cores");
-
-
-
- //Circuits
- enableCustomCircuits = config.getBoolean("enableCustomCircuits", "gregtech", false,
- "Adds custom circuits to expand past the Master Tier. Only really recommended to enable if enableOldGTcircuits is enabled.");
- enableOldGTcircuits = config.getBoolean("enableOldGTcircuits", "gregtech", false,
- "Restores circuits and their recipes from Pre-5.09.28 times.");
-
+
+ // Circuits
+ enableCustomCircuits = config.getBoolean("enableCustomCircuits", "gregtech", false, "Adds custom circuits to expand past the Master Tier. Only really recommended to enable if enableOldGTcircuits is enabled.");
+ enableOldGTcircuits = config.getBoolean("enableOldGTcircuits", "gregtech", false, "Restores circuits and their recipes from Pre-5.09.28 times.");
+
// Tools
- enableSkookumChoochers = config.getBoolean("enableSkookumChoochers", "gregtech", true,
- "Adds Custom GT Tools, called Skookum Choochers, functioning as a hard hammer and a wrench.");
- enableMultiSizeTools = config.getBoolean("enableMultiSizeTools", "gregtech", true,
- "Adds Custom GT Shovels and Pickaxes which mine in a 3x3 style. One of each whill be generated for each Gregtech Material which has Dense Plates and Long Rods available.");
-
+ enableSkookumChoochers = config.getBoolean("enableSkookumChoochers", "gregtech", true, "Adds Custom GT Tools, called Skookum Choochers, functioning as a hard hammer and a wrench.");
+ enableMultiSizeTools = config.getBoolean("enableMultiSizeTools", "gregtech", true, "Adds Custom GT Shovels and Pickaxes which mine in a 3x3 style. One of each whill be generated for each Gregtech Material which has Dense Plates and Long Rods available.");
+
// GT-Fixes
- enableNitroFix = config.getBoolean("enableNitroFix", "gregtech", false,
- "Restores the old Nitro-Diesel recipes.");
- enableSulfuricAcidFix = config.getBoolean("enableSulfuricAcidFix", "gregtech", false,
- "Adds GT6 recipes for Sulfuric Acid. Should remove all pre-existing recipes.");
- enableAnimatedTurbines = config.getBoolean("enableAnimatedTurbines", "gregtech", true,
- "Gives GT Gas/Steam turbines animated textures while running.");
+ enableNitroFix = config.getBoolean("enableNitroFix", "gregtech", false, "Restores the old Nitro-Diesel recipes.");
+ enableSulfuricAcidFix = config.getBoolean("enableSulfuricAcidFix", "gregtech", false, "Adds GT6 recipes for Sulfuric Acid. Should remove all pre-existing recipes.");
+ enableAnimatedTurbines = config.getBoolean("enableAnimatedTurbines", "gregtech", true, "Gives GT Gas/Steam turbines animated textures while running.");
turbineCutoffBase = config.getInt("turbineCutoffBase", "gregtech", 75000, 0, Integer.MAX_VALUE, "Rotors below this durability will be removed, prevents NEI clutter. Minimum Durability is N * x, where N is the new value set and x is the turbine size, where 1 is Tiny and 4 is Huge. Set to 0 to disable.");
-
- enableHarderRecipesForHighTierCasings = config.getBoolean("enableHarderRecipesForHighTierCasings", "gregtech", false,
- "Makes LuV+ Casings and Hulls more difficult to craft.");
-
+
+ enableHarderRecipesForHighTierCasings = config.getBoolean("enableHarderRecipesForHighTierCasings", "gregtech", false, "Makes LuV+ Casings and Hulls more difficult to craft.");
+
// Pipes & Cables
- enableCustom_Pipes = config.getBoolean("enableCustom_Pipes", "gregtech", true,
- "Adds Custom GT Fluid Pipes.");
- enableCustom_Cables = config.getBoolean("enableCustom_Cables", "gregtech", true,
- "Adds Custom GT Cables.");
-
+ enableCustom_Pipes = config.getBoolean("enableCustom_Pipes", "gregtech", true, "Adds Custom GT Fluid Pipes.");
+ enableCustom_Cables = config.getBoolean("enableCustom_Cables", "gregtech", true, "Adds Custom GT Cables.");
+
// Block Drops
- chanceToDropDrainedShard = config.getInt("chanceToDropDrainedShard", "blockdrops", 196, 0,
- 10000, "Drained shards have a 1 in X chance to drop.");
- chanceToDropFluoriteOre = config.getInt("chanceToDropFluoriteOre", "blockdrops", 32, 0,
- 10000, "Fluorite Ore has a 1 in X chance to drop from Limestone and a 1 in X*20 from Sandstone..");
-
+ chanceToDropDrainedShard = config.getInt("chanceToDropDrainedShard", "blockdrops", 196, 0, 10000, "Drained shards have a 1 in X chance to drop.");
+ chanceToDropFluoriteOre = config.getInt("chanceToDropFluoriteOre", "blockdrops", 32, 0, 10000, "Fluorite Ore has a 1 in X chance to drop from Limestone and a 1 in X*20 from Sandstone..");
+
// Single machines
- enableMachine_SolarGenerators = config.getBoolean("enableSolarGenerators", "gregtech",
- false, "These may be overpowered, Consult a local electrician.");
- enableMachine_ComponentAssemblers = config.getBoolean("enableComponentAssemblers", "gregtech",
- true, "These construct machine components.");
- enableMachine_Safes = config.getBoolean("enableMachineSafes", "gregtech", true,
- "These protect your goodies/rare stuff.");
- enableMachine_Dehydrators = config.getBoolean("enableMachineDehydrators", "gregtech", true,
- "These dehydrate stuff.");
- enableMachine_SteamConverter = config.getBoolean("enableMachineSteamConverter", "gregtech",
- true, "Converts IC2 steam -> Railcraft steam.");
- enableMachine_FluidTanks = config.getBoolean("enableMachineFluidTanks", "gregtech", true,
- "Portable fluid tanks.");
- enableMachine_RocketEngines = config.getBoolean("enableMachineRocketEngines", "gregtech",
- true, "Diesel egines with different internals, they consume less fuel overall.");
- enableMachine_GeothermalEngines = config.getBoolean("enableMachineGeothermalEngines",
- "gregtech", true, "These may be overpowered, Consult a local geologist.");
- enableMachine_WorldAccelerators = config.getBoolean("enableMachineWorldAccelerators",
- "gregtech", true, "These allow boosting Block/TileEntity Tick times [OP].");
- enableMachine_Tesseracts = config.getBoolean("enableMachineTesseracts",
- "gregtech", true, "Tesseracts for wireless item/fluid movement.");
- enableMachine_SimpleWasher = config.getBoolean("enableMachineSimpleWasher",
- "gregtech", true, "Very basic automated cauldron for dust washing.");
- enableMachine_Pollution = config.getBoolean("enableMachinePollution",
- "gregtech", true, "Pollution Detector & Scrubbers.");
- enableMachine_RF_Convetor = config.getBoolean("enableMachineRFConvetor", "gregtech",
- true, "Converts RF to GTEU. Requires COFH-Core to be installed.");
-
-
+ enableMachine_SolarGenerators = config.getBoolean("enableSolarGenerators", "gregtech", false, "These may be overpowered, Consult a local electrician.");
+ enableMachine_ComponentAssemblers = config.getBoolean("enableComponentAssemblers", "gregtech", true, "These construct machine components.");
+ enableMachine_Safes = config.getBoolean("enableMachineSafes", "gregtech", true, "These protect your goodies/rare stuff.");
+ enableMachine_Dehydrators = config.getBoolean("enableMachineDehydrators", "gregtech", true, "These dehydrate stuff.");
+ enableMachine_SteamConverter = config.getBoolean("enableMachineSteamConverter", "gregtech", true, "Converts IC2 steam -> Railcraft steam.");
+ enableMachine_FluidTanks = config.getBoolean("enableMachineFluidTanks", "gregtech", true, "Portable fluid tanks.");
+ enableMachine_RocketEngines = config.getBoolean("enableMachineRocketEngines", "gregtech", true, "Diesel egines with different internals, they consume less fuel overall.");
+ enableMachine_GeothermalEngines = config.getBoolean("enableMachineGeothermalEngines", "gregtech", true, "These may be overpowered, Consult a local geologist.");
+ enableMachine_WorldAccelerators = config.getBoolean("enableMachineWorldAccelerators", "gregtech", true, "These allow boosting Block/TileEntity Tick times [OP].");
+ enableMachine_Tesseracts = config.getBoolean("enableMachineTesseracts", "gregtech", true, "Tesseracts for wireless item/fluid movement.");
+ enableMachine_SimpleWasher = config.getBoolean("enableMachineSimpleWasher", "gregtech", true, "Very basic automated cauldron for dust washing.");
+ enableMachine_Pollution = config.getBoolean("enableMachinePollution", "gregtech", true, "Pollution Detector & Scrubbers.");
+ enableMachine_RF_Convetor = config.getBoolean("enableMachineRFConvetor", "gregtech", true, "Converts RF to GTEU. Requires COFH-Core to be installed.");
+
// Multi machines
- enableMultiblock_AlloyBlastSmelter = config.getBoolean("enableMultiblockAlloyBlastSmelter",
- "gregtech", true,
- "Required to smelt most high tier materials from GT++. Also smelts everything else to molten metal.");
- enableMultiblock_IndustrialCentrifuge = config
- .getBoolean("enableMultiblockIndustrialCentrifuge", "gregtech", true, "Spin, Spin, Spiiiin.");
- enableMultiblock_IndustrialCokeOven = config.getBoolean(
- "enableMultiblockIndustrialCokeOven", "gregtech", true,
- "Pyro Oven Alternative, older, more realistic, better.");
- enableMultiblock_IndustrialElectrolyzer = config.getBoolean(
- "enableMultiblockIndustrialElectrolyzer", "gregtech", true,
- "Electrolyzes things with extra bling factor.");
- enableMultiblock_IndustrialMacerationStack = config.getBoolean(
- "enableMultiblockIndustrialMacerationStack", "gregtech", true,
- "A hyper efficient maceration tower, nets more bonus outputs.");
- enableMultiblock_IndustrialPlatePress = config.getBoolean(
- "enableMultiblockIndustrialPlatePress", "gregtech", true, "Industrial bendering machine thingo.");
- enableMultiblock_IndustrialWireMill = config.getBoolean(
- "enableMultiblockIndustrialWireMill", "gregtech", true, "Produces fine wire and exotic cables.");
- enableMultiblock_IronBlastFurnace = config.getBoolean("enableMultiblockIronBlastFurnace",
- "gregtech", true, "Skip the Bronze age, very slowly.");
- enableMultiblock_MatterFabricator = config.getBoolean("enableMultiblockMatterFabricator",
- "gregtech", true, "?FAB?RIC?ATE MA?TT?ER.");
- enableMultiblock_MultiTank = config.getBoolean("enableMultiblockMultiTank", "gregtech",
- true, "Tall tanks, each layer adds extra fluid storage.");
- enableMultiblock_PowerSubstation = config.getBoolean("enableMultiblockPowerSubstation",
- "gregtech", true, "For managing large power grids.");
- enableMultiblock_LiquidFluorideThoriumReactor = config.getBoolean(
- "enableMultiblockLiquidFluorideThoriumReactor", "gregtech", true, "For supplying large power grids.");
- enableMultiblock_NuclearFuelRefinery = config.getBoolean(
- "enableMultiblock_NuclearFuelRefinery", "gregtech", true,
- "Refines molten chemicals into nuclear fuels.");
- enableMultiblock_IndustrialSifter = config.getBoolean("enableMultiblock_IndustrialSifter",
- "gregtech", true, "Large scale sifting.");
- enableMultiblock_LargeAutoCrafter = config.getBoolean("enableMultiblock_LargeAutoCrafter",
- "gregtech", true, "Can Assemble, Disassemble and Craft Project data from Data Sticks.");
- enableMultiblock_IndustrialThermalCentrifuge = config.getBoolean("enableMultiblock_IndustrialThermalCentrifuge",
- "gregtech", true, "Your warm spin for the ore thing.");
- enableMultiblock_IndustrialWashPlant = config.getBoolean("enableMultiblock_IndustrialWashPlant",
- "gregtech", true, "Used to wash the dirt, riiiiight offff..");
- enableMultiblock_ThermalBoiler = config.getBoolean("enableMachineThermalBoiler",
- "gregtech", true, "Thermal Boiler from GT4. Can Filter Lava for resources.");
- enableMultiblock_IndustrialCuttingMachine = config.getBoolean("enableMultiblock_IndustrialCuttingMachine",
- "gregtech", true, "Very fast and efficient Cutting Machine.");
- enableMultiblock_IndustrialFishingPort = config.getBoolean("enableMultiblock_IndustrialFishingPort",
- "gregtech", true, "Fish the seas, except on land.");
- enableMultiblock_IndustrialExtrudingMachine = config.getBoolean("enableMultiblock_IndustrialExtrudingMachine",
- "gregtech", true, "Very fast and efficient Extruding Machine.");
- enableMultiblock_IndustrialMultiMachine = config.getBoolean("enableMultiblock_IndustrialMultiMachine",
- "gregtech", true, "Can run recipes for 9 different types of machines.");
- enableMultiblock_Cyclotron = config.getBoolean("enableMultiblock_Cyclotron",
- "gregtech", true, "COMET - Scientific Cyclotron.");
-
+ enableMultiblock_AlloyBlastSmelter = config.getBoolean("enableMultiblockAlloyBlastSmelter", "gregtech", true, "Required to smelt most high tier materials from GT++. Also smelts everything else to molten metal.");
+ enableMultiblock_IndustrialCentrifuge = config.getBoolean("enableMultiblockIndustrialCentrifuge", "gregtech", true, "Spin, Spin, Spiiiin.");
+ enableMultiblock_IndustrialCokeOven = config.getBoolean("enableMultiblockIndustrialCokeOven", "gregtech", true, "Pyro Oven Alternative, older, more realistic, better.");
+ enableMultiblock_IndustrialElectrolyzer = config.getBoolean("enableMultiblockIndustrialElectrolyzer", "gregtech", true, "Electrolyzes things with extra bling factor.");
+ enableMultiblock_IndustrialMacerationStack = config.getBoolean("enableMultiblockIndustrialMacerationStack", "gregtech", true, "A hyper efficient maceration tower, nets more bonus outputs.");
+ enableMultiblock_IndustrialPlatePress = config.getBoolean("enableMultiblockIndustrialPlatePress", "gregtech", true, "Industrial bendering machine thingo.");
+ enableMultiblock_IndustrialWireMill = config.getBoolean("enableMultiblockIndustrialWireMill", "gregtech", true, "Produces fine wire and exotic cables.");
+ enableMultiblock_IronBlastFurnace = config.getBoolean("enableMultiblockIronBlastFurnace", "gregtech", true, "Skip the Bronze age, very slowly.");
+ enableMultiblock_MatterFabricator = config.getBoolean("enableMultiblockMatterFabricator", "gregtech", true, "?FAB?RIC?ATE MA?TT?ER.");
+ enableMultiblock_MultiTank = config.getBoolean("enableMultiblockMultiTank", "gregtech", true, "Tall tanks, each layer adds extra fluid storage.");
+ enableMultiblock_PowerSubstation = config.getBoolean("enableMultiblockPowerSubstation", "gregtech", true, "For managing large power grids.");
+ enableMultiblock_LiquidFluorideThoriumReactor = config.getBoolean("enableMultiblockLiquidFluorideThoriumReactor", "gregtech", true, "For supplying large power grids.");
+ enableMultiblock_NuclearFuelRefinery = config.getBoolean("enableMultiblock_NuclearFuelRefinery", "gregtech", true, "Refines molten chemicals into nuclear fuels.");
+ enableMultiblock_IndustrialSifter = config.getBoolean("enableMultiblock_IndustrialSifter", "gregtech", true, "Large scale sifting.");
+ enableMultiblock_LargeAutoCrafter = config.getBoolean("enableMultiblock_LargeAutoCrafter", "gregtech", true, "Can Assemble, Disassemble and Craft Project data from Data Sticks.");
+ enableMultiblock_IndustrialThermalCentrifuge = config.getBoolean("enableMultiblock_IndustrialThermalCentrifuge", "gregtech", true, "Your warm spin for the ore thing.");
+ enableMultiblock_IndustrialWashPlant = config.getBoolean("enableMultiblock_IndustrialWashPlant", "gregtech", true, "Used to wash the dirt, riiiiight offff..");
+ enableMultiblock_ThermalBoiler = config.getBoolean("enableMachineThermalBoiler", "gregtech", true, "Thermal Boiler from GT4. Can Filter Lava for resources.");
+ enableMultiblock_IndustrialCuttingMachine = config.getBoolean("enableMultiblock_IndustrialCuttingMachine", "gregtech", true, "Very fast and efficient Cutting Machine.");
+ enableMultiblock_IndustrialFishingPort = config.getBoolean("enableMultiblock_IndustrialFishingPort", "gregtech", true, "Fish the seas, except on land.");
+ enableMultiblock_IndustrialExtrudingMachine = config.getBoolean("enableMultiblock_IndustrialExtrudingMachine", "gregtech", true, "Very fast and efficient Extruding Machine.");
+ enableMultiblock_IndustrialMultiMachine = config.getBoolean("enableMultiblock_IndustrialMultiMachine", "gregtech", true, "Can run recipes for 9 different types of machines.");
+ enableMultiblock_Cyclotron = config.getBoolean("enableMultiblock_Cyclotron", "gregtech", true, "COMET - Scientific Cyclotron.");
+
// Options
- rfPerEU = config.getInt("rfUsedPerEUForUniversalBatteries", "configurables", 4, 1, 1000,
- "How much RF is a single unit of EU worth? (Most mods use 4:1 ratio)");
-
+ rfPerEU = config.getInt("rfUsedPerEUForUniversalBatteries", "configurables", 4, 1, 1000, "How much RF is a single unit of EU worth? (Most mods use 4:1 ratio)");
+
// Features
- enableCustomCapes = config.getBoolean("enableSupporterCape", "features", true,
- "Enables Custom GT++ Cape.");
- disableZombieReinforcement = config.getBoolean("disableZombieReinforcement", "features", false,
- "Disables Zombie Reinforcement on hard difficutly.");
+ enableCustomCapes = config.getBoolean("enableSupporterCape", "features", true, "Enables Custom GT++ Cape.");
+ disableZombieReinforcement = config.getBoolean("disableZombieReinforcement", "features", false, "Disables Zombie Reinforcement on hard difficutly.");
enableWatchdogBGM = config.getInt("enableWatchdogBGM", "features", 0, 0, Short.MAX_VALUE, "Set to a value greater than 0 to reduce the ticks taken to delay between BGM tracks. Acceptable Values are 1-32767, where 0 is disabled. Vanilla Uses 12,000 & 24,000. 200 is 10s.");
-
- //Biomes
+ hideUniversalCells = config.getBoolean("hideUniversalCells", "features", true, "Hides every filled IC2 Universal Cell from NEI.");
+
+ // Biomes
EVERGLADES_ID = config.getInt("darkworld_ID", "worldgen", 227, 1, 254, "The ID of the Dark Dimension.");
EVERGLADESBIOME_ID = config.getInt("darkbiome_ID", "worldgen", 238, 1, 254, "The biome within the Dark Dimension.");
-
- //Blacklisted Accelerator TileEntities
- BlacklistedTileEntiyClassNames = new String[] { "com.rwtema.extrautils.tileentity.enderquarry.TileEntityEnderQuarry" };
- BlacklistedTileEntiyClassNames = config.getStringList(
- "BlacklistedTileEntiyClassNames", "gregtech",
- BlacklistedTileEntiyClassNames,
- "The Canonical Class-Names of TileEntities that should be ignored by the WorldAccelerator");
-
- //Pollution
- pollutionPerSecondMultiPackager = config.get("pollution", "pollutionPerSecondMultiPackager", pollutionPerSecondMultiPackager,"pollution rate in gibbl/s for the Amazon warehousing depot").getInt(pollutionPerSecondMultiPackager);
- pollutionPerSecondMultiIndustrialAlloySmelter = config.get("pollution", "pollutionPerSecondMultiIndustrialAlloySmelter", pollutionPerSecondMultiIndustrialAlloySmelter,"pollution rate in gibbl/s for the Alloy blast smelter").getInt(pollutionPerSecondMultiIndustrialAlloySmelter);
- pollutionPerSecondMultiIndustrialArcFurnace = config.get("pollution", "pollutionPerSecondMultiIndustrialArcFurnace", pollutionPerSecondMultiIndustrialArcFurnace,"pollution rate in gibbl/s for the High current arc furnace").getInt(pollutionPerSecondMultiIndustrialArcFurnace);
- pollutionPerSecondMultiIndustrialCentrifuge = config.get("pollution", "pollutionPerSecondMultiIndustrialCentrifuge", pollutionPerSecondMultiIndustrialCentrifuge,"pollution rate in gibbl/s for the Industrial centrifuge").getInt(pollutionPerSecondMultiIndustrialCentrifuge);
- pollutionPerSecondMultiIndustrialCokeOven = config.get("pollution", "pollutionPerSecondMultiIndustrialCokeOven", pollutionPerSecondMultiIndustrialCokeOven,"pollution rate in gibbl/s for the Industrial coke oven").getInt(pollutionPerSecondMultiIndustrialCokeOven);
- pollutionPerSecondMultiIndustrialCuttingMachine = config.get("pollution", "pollutionPerSecondMultiIndustrialCuttingMachine", pollutionPerSecondMultiIndustrialCuttingMachine,"pollution rate in gibbl/s for the Cutting factory").getInt(pollutionPerSecondMultiIndustrialCuttingMachine);
- pollutionPerSecondMultiIndustrialDehydrator = config.get("pollution", "pollutionPerSecondMultiIndustrialDehydrator", pollutionPerSecondMultiIndustrialDehydrator,"pollution rate in gibbl/s for the Utupu-Tanuri").getInt(pollutionPerSecondMultiIndustrialDehydrator);
- pollutionPerSecondMultiIndustrialElectrolyzer = config.get("pollution", "pollutionPerSecondMultiIndustrialElectrolyzer", pollutionPerSecondMultiIndustrialElectrolyzer,"pollution rate in gibbl/s for the Industrial electrolyzer").getInt(pollutionPerSecondMultiIndustrialElectrolyzer);
- pollutionPerSecondMultiIndustrialExtruder = config.get("pollution", "pollutionPerSecondMultiIndustrialExtruder", pollutionPerSecondMultiIndustrialExtruder,"pollution rate in gibbl/s for the Industrial extrusion machine").getInt(pollutionPerSecondMultiIndustrialExtruder);
- pollutionPerSecondMultiIndustrialMacerator = config.get("pollution", "pollutionPerSecondMultiIndustrialMacerator", pollutionPerSecondMultiIndustrialMacerator,"pollution rate in gibbl/s for the Maceration stack").getInt(pollutionPerSecondMultiIndustrialMacerator);
- pollutionPerSecondMultiIndustrialMixer = config.get("pollution", "pollutionPerSecondMultiIndustrialMixer", pollutionPerSecondMultiIndustrialMixer,"pollution rate in gibbl/s for the Industrial mixing machine").getInt(pollutionPerSecondMultiIndustrialMixer);
- pollutionPerSecondMultiIndustrialMultiMachine_ModeMetal = config.get("pollution", "pollutionPerSecondMultiIndustrialMultiMachine_ModeMetal", pollutionPerSecondMultiIndustrialMultiMachine_ModeMetal,"pollution rate in gibbl/s for the Large processing factory in metal mode").getInt(pollutionPerSecondMultiIndustrialMultiMachine_ModeMetal);
- pollutionPerSecondMultiIndustrialMultiMachine_ModeFluid = config.get("pollution", "pollutionPerSecondMultiIndustrialMultiMachine_ModeFluid", pollutionPerSecondMultiIndustrialMultiMachine_ModeFluid,"pollution rate in gibbl/s for the Large processing factory in fluid mode").getInt(pollutionPerSecondMultiIndustrialMultiMachine_ModeFluid);
- pollutionPerSecondMultiIndustrialMultiMachine_ModeMisc = config.get("pollution", "pollutionPerSecondMultiIndustrialMultiMachine_ModeMisc", pollutionPerSecondMultiIndustrialMultiMachine_ModeMisc,"pollution rate in gibbl/s for the Large processing factory in misc mode").getInt(pollutionPerSecondMultiIndustrialMultiMachine_ModeMisc);
- pollutionPerSecondMultiIndustrialPlatePress_ModeForming = config.get("pollution", "pollutionPerSecondMultiIndustrialPlatePress_ModeForming", pollutionPerSecondMultiIndustrialPlatePress_ModeForming,"pollution rate in gibbl/s for the Industrial material press in forming mode").getInt(pollutionPerSecondMultiIndustrialPlatePress_ModeForming);
- pollutionPerSecondMultiIndustrialPlatePress_ModeBending = config.get("pollution", "pollutionPerSecondMultiIndustrialPlatePress_ModeBending", pollutionPerSecondMultiIndustrialPlatePress_ModeBending,"pollution rate in gibbl/s for the Industrial material press in bending mode").getInt(pollutionPerSecondMultiIndustrialPlatePress_ModeBending);
- pollutionPerSecondMultiIndustrialForgeHammer = config.get("pollution", "pollutionPerSecondMultiIndustrialForgeHammer", pollutionPerSecondMultiIndustrialForgeHammer,"pollution rate in gibbl/s for the Industrial Forge Hammer").getInt(pollutionPerSecondMultiIndustrialForgeHammer);
- pollutionPerSecondMultiIndustrialSifter = config.get("pollution", "pollutionPerSecondMultiIndustrialSifter", pollutionPerSecondMultiIndustrialSifter,"pollution rate in gibbl/s for the Large Sifter").getInt(pollutionPerSecondMultiIndustrialSifter);
- pollutionPerSecondMultiIndustrialThermalCentrifuge = config.get("pollution", "pollutionPerSecondMultiIndustrialThermalCentrifuge", pollutionPerSecondMultiIndustrialThermalCentrifuge,"pollution rate in gibbl/s for the Large thermal refinery").getInt(pollutionPerSecondMultiIndustrialThermalCentrifuge);
- pollutionPerSecondMultiIndustrialVacuumFreezer = config.get("pollution", "pollutionPerSecondMultiIndustrialVacuumFreezer", pollutionPerSecondMultiIndustrialVacuumFreezer,"pollution rate in gibbl/s for the Cryogenic freezer").getInt(pollutionPerSecondMultiIndustrialVacuumFreezer);
- pollutionPerSecondMultiIndustrialWashPlant_ModeChemBath = config.get("pollution", "pollutionPerSecondMultiIndustrialWashPlant_ModeChemBath", pollutionPerSecondMultiIndustrialWashPlant_ModeChemBath,"pollution rate in gibbl/s for the Ore washing plant in chemical bath mode").getInt(pollutionPerSecondMultiIndustrialWashPlant_ModeChemBath);
- pollutionPerSecondMultiIndustrialWashPlant_ModeWasher = config.get("pollution", "pollutionPerSecondMultiIndustrialWashPlant_ModeWasher", pollutionPerSecondMultiIndustrialWashPlant_ModeWasher,"pollution rate in gibbl/s for the Ore washing plant in ore washer mode").getInt(pollutionPerSecondMultiIndustrialWashPlant_ModeWasher);
- pollutionPerSecondMultiIndustrialWireMill = config.get("pollution", "pollutionPerSecondMultiIndustrialWireMill", pollutionPerSecondMultiIndustrialWireMill,"pollution rate in gibbl/s for the Wire factory").getInt(pollutionPerSecondMultiIndustrialWireMill);
- pollutionPerSecondMultiIsaMill = config.get("pollution", "pollutionPerSecondMultiIsaMill", pollutionPerSecondMultiIsaMill,"pollution rate in gibbl/s for the IsaMill grinding machine").getInt(pollutionPerSecondMultiIsaMill);
- pollutionPerSecondMultiAdvDistillationTower_ModeDistillery = config.get("pollution", "pollutionPerSecondMultiAdvDistillationTower_ModeDistillery", pollutionPerSecondMultiAdvDistillationTower_ModeDistillery,"pollution rate in gibbl/s for the Dangote distillus in distillery mode").getInt(pollutionPerSecondMultiAdvDistillationTower_ModeDistillery);
- pollutionPerSecondMultiAdvDistillationTower_ModeDT = config.get("pollution", "pollutionPerSecondMultiAdvDistillationTower_ModeDT", pollutionPerSecondMultiAdvDistillationTower_ModeDT,"pollution rate in gibbl/s for the Dangote distillus in distillation tower mode").getInt(pollutionPerSecondMultiAdvDistillationTower_ModeDT);
- pollutionPerSecondMultiAdvEBF = config.get("pollution", "pollutionPerSecondMultiAdvEBF", pollutionPerSecondMultiAdvEBF,"pollution rate in gibbl/s for the Volcanus").getInt(pollutionPerSecondMultiAdvEBF);
- pollutionPerSecondMultiAdvImplosion = config.get("pollution", "pollutionPerSecondMultiAdvImplosion", pollutionPerSecondMultiAdvImplosion,"pollution rate in gibbl/s for the Density^2").getInt(pollutionPerSecondMultiAdvImplosion);
- pollutionPerSecondMultiABS = config.get("pollution", "pollutionPerSecondMultiABS", pollutionPerSecondMultiABS,"pollution rate in gibbl/s for the Alloy blast furnace").getInt(pollutionPerSecondMultiABS);
- pollutionPerSecondMultiCyclotron = config.get("pollution", "pollutionPerSecondMultiCyclotron", pollutionPerSecondMultiCyclotron,"pollution rate in gibbl/s for the Cyclotron").getInt(pollutionPerSecondMultiCyclotron);
- pollutionPerSecondMultiIndustrialFishingPond = config.get("pollution", "pollutionPerSecondMultiIndustrialFishingPond", pollutionPerSecondMultiIndustrialFishingPond,"pollution rate in gibbl/s for the Zuhai - fishing port").getInt(pollutionPerSecondMultiIndustrialFishingPond);
- //pollutionPerSecondMultiLargeRocketEngine;
- pollutionPerSecondMultiLargeSemiFluidGenerator = config.get("pollution", "pollutionPerSecondMultiLargeSemiFluidGenerator", pollutionPerSecondMultiLargeSemiFluidGenerator,"pollution rate in gibbl/s for the Large semifluid burner").getInt(pollutionPerSecondMultiLargeSemiFluidGenerator);
- pollutionPerSecondMultiMassFabricator = config.get("pollution", "pollutionPerSecondMultiMassFabricator", pollutionPerSecondMultiMassFabricator,"pollution rate in gibbl/s for the Matter fabrication CPU").getInt(pollutionPerSecondMultiMassFabricator);
- pollutionPerSecondMultiRefinery = config.get("pollution", "pollutionPerSecondMultiRefinery", pollutionPerSecondMultiRefinery,"pollution rate in gibbl/s for the Reactor fuel processing plant").getInt(pollutionPerSecondMultiRefinery);
- //pollutionPerSecondMultiGeneratorArray;
- pollutionPerSecondMultiIndustrialRockBreaker = config.get("pollution", "pollutionPerSecondMultiIndustrialRockBreaker", pollutionPerSecondMultiIndustrialRockBreaker,"pollution rate in gibbl/s for the Industrial Rock Breaker").getInt(pollutionPerSecondMultiIndustrialRockBreaker);
- pollutionPerSecondMultiIndustrialChisel = config.get("pollution", "pollutionPerSecondMultiIndustrialChisel", pollutionPerSecondMultiIndustrialChisel,"pollution rate in gibbl/s for the Industrial Chisel").getInt(pollutionPerSecondMultiIndustrialChisel);
- pollutionPerSecondMultiTreeFarm = config.get("pollution", "pollutionPerSecondMultiTreeFarm", pollutionPerSecondMultiTreeFarm,"pollution rate in gibbl/s for the Tree growth simulator").getInt(pollutionPerSecondMultiTreeFarm);
- pollutionPerSecondMultiFrothFlotationCell = config.get("pollution", "pollutionPerSecondMultiFrothFlotationCell", pollutionPerSecondMultiFrothFlotationCell,"pollution rate in gibbl/s for the Flotation cell regulator").getInt(pollutionPerSecondMultiFrothFlotationCell);
- pollutionPerSecondMultiAutoCrafter = config.get("pollution", "pollutionPerSecondMultiAutoCrafter", pollutionPerSecondMultiAutoCrafter,"pollution rate in gibbl/s for the Large-Scale auto assembler v1.01").getInt(pollutionPerSecondMultiAutoCrafter);
- pollutionPerSecondMultiMolecularTransformer = config.get("pollution", "pollutionPerSecondMultiMolecularTransformer", pollutionPerSecondMultiMolecularTransformer,"pollution rate in gibbl/s for the Multiblock Molecular Transformer").getInt(pollutionPerSecondMultiMolecularTransformer);
- pollutionPerSecondMultiThermalBoiler = config.get("pollution", "pollutionPerSecondMultiThermalBoiler", pollutionPerSecondMultiThermalBoiler,"pollution rate in gibbl/s for the Thermal boiler").getInt(pollutionPerSecondMultiThermalBoiler);
- pollutionPerSecondMultiAlgaePond = config.get("pollution", "pollutionPerSecondMultiAlgaePond", pollutionPerSecondMultiAlgaePond,"pollution rate in gibbl/s for the Algae farm").getInt(pollutionPerSecondMultiAlgaePond);
+
+ // Blacklisted Accelerator TileEntities
+ BlacklistedTileEntiyClassNames = new String[]{"com.rwtema.extrautils.tileentity.enderquarry.TileEntityEnderQuarry"};
+ BlacklistedTileEntiyClassNames = config.getStringList("BlacklistedTileEntiyClassNames", "gregtech", BlacklistedTileEntiyClassNames, "The Canonical Class-Names of TileEntities that should be ignored by the WorldAccelerator");
+
+ // Pollution
+ pollutionPerSecondMultiPackager = config.get("pollution", "pollutionPerSecondMultiPackager", pollutionPerSecondMultiPackager, "pollution rate in gibbl/s for the Amazon warehousing depot").getInt(pollutionPerSecondMultiPackager);
+ pollutionPerSecondMultiIndustrialAlloySmelter = config.get("pollution", "pollutionPerSecondMultiIndustrialAlloySmelter", pollutionPerSecondMultiIndustrialAlloySmelter, "pollution rate in gibbl/s for the Alloy blast smelter").getInt(pollutionPerSecondMultiIndustrialAlloySmelter);
+ pollutionPerSecondMultiIndustrialArcFurnace = config.get("pollution", "pollutionPerSecondMultiIndustrialArcFurnace", pollutionPerSecondMultiIndustrialArcFurnace, "pollution rate in gibbl/s for the High current arc furnace").getInt(pollutionPerSecondMultiIndustrialArcFurnace);
+ pollutionPerSecondMultiIndustrialCentrifuge = config.get("pollution", "pollutionPerSecondMultiIndustrialCentrifuge", pollutionPerSecondMultiIndustrialCentrifuge, "pollution rate in gibbl/s for the Industrial centrifuge").getInt(pollutionPerSecondMultiIndustrialCentrifuge);
+ pollutionPerSecondMultiIndustrialCokeOven = config.get("pollution", "pollutionPerSecondMultiIndustrialCokeOven", pollutionPerSecondMultiIndustrialCokeOven, "pollution rate in gibbl/s for the Industrial coke oven").getInt(pollutionPerSecondMultiIndustrialCokeOven);
+ pollutionPerSecondMultiIndustrialCuttingMachine = config.get("pollution", "pollutionPerSecondMultiIndustrialCuttingMachine", pollutionPerSecondMultiIndustrialCuttingMachine, "pollution rate in gibbl/s for the Cutting factory").getInt(pollutionPerSecondMultiIndustrialCuttingMachine);
+ pollutionPerSecondMultiIndustrialDehydrator = config.get("pollution", "pollutionPerSecondMultiIndustrialDehydrator", pollutionPerSecondMultiIndustrialDehydrator, "pollution rate in gibbl/s for the Utupu-Tanuri").getInt(pollutionPerSecondMultiIndustrialDehydrator);
+ pollutionPerSecondMultiIndustrialElectrolyzer = config.get("pollution", "pollutionPerSecondMultiIndustrialElectrolyzer", pollutionPerSecondMultiIndustrialElectrolyzer, "pollution rate in gibbl/s for the Industrial electrolyzer").getInt(pollutionPerSecondMultiIndustrialElectrolyzer);
+ pollutionPerSecondMultiIndustrialExtruder = config.get("pollution", "pollutionPerSecondMultiIndustrialExtruder", pollutionPerSecondMultiIndustrialExtruder, "pollution rate in gibbl/s for the Industrial extrusion machine").getInt(pollutionPerSecondMultiIndustrialExtruder);
+ pollutionPerSecondMultiIndustrialMacerator = config.get("pollution", "pollutionPerSecondMultiIndustrialMacerator", pollutionPerSecondMultiIndustrialMacerator, "pollution rate in gibbl/s for the Maceration stack").getInt(pollutionPerSecondMultiIndustrialMacerator);
+ pollutionPerSecondMultiIndustrialMixer = config.get("pollution", "pollutionPerSecondMultiIndustrialMixer", pollutionPerSecondMultiIndustrialMixer, "pollution rate in gibbl/s for the Industrial mixing machine").getInt(pollutionPerSecondMultiIndustrialMixer);
+ pollutionPerSecondMultiIndustrialMultiMachine_ModeMetal = config.get("pollution", "pollutionPerSecondMultiIndustrialMultiMachine_ModeMetal", pollutionPerSecondMultiIndustrialMultiMachine_ModeMetal, "pollution rate in gibbl/s for the Large processing factory in metal mode").getInt(pollutionPerSecondMultiIndustrialMultiMachine_ModeMetal);
+ pollutionPerSecondMultiIndustrialMultiMachine_ModeFluid = config.get("pollution", "pollutionPerSecondMultiIndustrialMultiMachine_ModeFluid", pollutionPerSecondMultiIndustrialMultiMachine_ModeFluid, "pollution rate in gibbl/s for the Large processing factory in fluid mode").getInt(pollutionPerSecondMultiIndustrialMultiMachine_ModeFluid);
+ pollutionPerSecondMultiIndustrialMultiMachine_ModeMisc = config.get("pollution", "pollutionPerSecondMultiIndustrialMultiMachine_ModeMisc", pollutionPerSecondMultiIndustrialMultiMachine_ModeMisc, "pollution rate in gibbl/s for the Large processing factory in misc mode").getInt(pollutionPerSecondMultiIndustrialMultiMachine_ModeMisc);
+ pollutionPerSecondMultiIndustrialPlatePress_ModeForming = config.get("pollution", "pollutionPerSecondMultiIndustrialPlatePress_ModeForming", pollutionPerSecondMultiIndustrialPlatePress_ModeForming, "pollution rate in gibbl/s for the Industrial material press in forming mode").getInt(pollutionPerSecondMultiIndustrialPlatePress_ModeForming);
+ pollutionPerSecondMultiIndustrialPlatePress_ModeBending = config.get("pollution", "pollutionPerSecondMultiIndustrialPlatePress_ModeBending", pollutionPerSecondMultiIndustrialPlatePress_ModeBending, "pollution rate in gibbl/s for the Industrial material press in bending mode").getInt(pollutionPerSecondMultiIndustrialPlatePress_ModeBending);
+ pollutionPerSecondMultiIndustrialForgeHammer = config.get("pollution", "pollutionPerSecondMultiIndustrialForgeHammer", pollutionPerSecondMultiIndustrialForgeHammer, "pollution rate in gibbl/s for the Industrial Forge Hammer").getInt(pollutionPerSecondMultiIndustrialForgeHammer);
+ pollutionPerSecondMultiIndustrialSifter = config.get("pollution", "pollutionPerSecondMultiIndustrialSifter", pollutionPerSecondMultiIndustrialSifter, "pollution rate in gibbl/s for the Large Sifter").getInt(pollutionPerSecondMultiIndustrialSifter);
+ pollutionPerSecondMultiIndustrialThermalCentrifuge = config.get("pollution", "pollutionPerSecondMultiIndustrialThermalCentrifuge", pollutionPerSecondMultiIndustrialThermalCentrifuge, "pollution rate in gibbl/s for the Large thermal refinery").getInt(pollutionPerSecondMultiIndustrialThermalCentrifuge);
+ pollutionPerSecondMultiIndustrialVacuumFreezer = config.get("pollution", "pollutionPerSecondMultiIndustrialVacuumFreezer", pollutionPerSecondMultiIndustrialVacuumFreezer, "pollution rate in gibbl/s for the Cryogenic freezer").getInt(pollutionPerSecondMultiIndustrialVacuumFreezer);
+ pollutionPerSecondMultiIndustrialWashPlant_ModeChemBath = config.get("pollution", "pollutionPerSecondMultiIndustrialWashPlant_ModeChemBath", pollutionPerSecondMultiIndustrialWashPlant_ModeChemBath, "pollution rate in gibbl/s for the Ore washing plant in chemical bath mode").getInt(pollutionPerSecondMultiIndustrialWashPlant_ModeChemBath);
+ pollutionPerSecondMultiIndustrialWashPlant_ModeWasher = config.get("pollution", "pollutionPerSecondMultiIndustrialWashPlant_ModeWasher", pollutionPerSecondMultiIndustrialWashPlant_ModeWasher, "pollution rate in gibbl/s for the Ore washing plant in ore washer mode").getInt(pollutionPerSecondMultiIndustrialWashPlant_ModeWasher);
+ pollutionPerSecondMultiIndustrialWireMill = config.get("pollution", "pollutionPerSecondMultiIndustrialWireMill", pollutionPerSecondMultiIndustrialWireMill, "pollution rate in gibbl/s for the Wire factory").getInt(pollutionPerSecondMultiIndustrialWireMill);
+ pollutionPerSecondMultiIsaMill = config.get("pollution", "pollutionPerSecondMultiIsaMill", pollutionPerSecondMultiIsaMill, "pollution rate in gibbl/s for the IsaMill grinding machine").getInt(pollutionPerSecondMultiIsaMill);
+ pollutionPerSecondMultiAdvDistillationTower_ModeDistillery = config.get("pollution", "pollutionPerSecondMultiAdvDistillationTower_ModeDistillery", pollutionPerSecondMultiAdvDistillationTower_ModeDistillery, "pollution rate in gibbl/s for the Dangote distillus in distillery mode").getInt(pollutionPerSecondMultiAdvDistillationTower_ModeDistillery);
+ pollutionPerSecondMultiAdvDistillationTower_ModeDT = config.get("pollution", "pollutionPerSecondMultiAdvDistillationTower_ModeDT", pollutionPerSecondMultiAdvDistillationTower_ModeDT, "pollution rate in gibbl/s for the Dangote distillus in distillation tower mode").getInt(pollutionPerSecondMultiAdvDistillationTower_ModeDT);
+ pollutionPerSecondMultiAdvEBF = config.get("pollution", "pollutionPerSecondMultiAdvEBF", pollutionPerSecondMultiAdvEBF, "pollution rate in gibbl/s for the Volcanus").getInt(pollutionPerSecondMultiAdvEBF);
+ pollutionPerSecondMultiAdvImplosion = config.get("pollution", "pollutionPerSecondMultiAdvImplosion", pollutionPerSecondMultiAdvImplosion, "pollution rate in gibbl/s for the Density^2").getInt(pollutionPerSecondMultiAdvImplosion);
+ pollutionPerSecondMultiABS = config.get("pollution", "pollutionPerSecondMultiABS", pollutionPerSecondMultiABS, "pollution rate in gibbl/s for the Alloy blast furnace").getInt(pollutionPerSecondMultiABS);
+ pollutionPerSecondMultiCyclotron = config.get("pollution", "pollutionPerSecondMultiCyclotron", pollutionPerSecondMultiCyclotron, "pollution rate in gibbl/s for the Cyclotron").getInt(pollutionPerSecondMultiCyclotron);
+ pollutionPerSecondMultiIndustrialFishingPond = config.get("pollution", "pollutionPerSecondMultiIndustrialFishingPond", pollutionPerSecondMultiIndustrialFishingPond, "pollution rate in gibbl/s for the Zuhai - fishing port").getInt(pollutionPerSecondMultiIndustrialFishingPond);
+ // pollutionPerSecondMultiLargeRocketEngine;
+ pollutionPerSecondMultiLargeSemiFluidGenerator = config.get("pollution", "pollutionPerSecondMultiLargeSemiFluidGenerator", pollutionPerSecondMultiLargeSemiFluidGenerator, "pollution rate in gibbl/s for the Large semifluid burner").getInt(pollutionPerSecondMultiLargeSemiFluidGenerator);
+ pollutionPerSecondMultiMassFabricator = config.get("pollution", "pollutionPerSecondMultiMassFabricator", pollutionPerSecondMultiMassFabricator, "pollution rate in gibbl/s for the Matter fabrication CPU").getInt(pollutionPerSecondMultiMassFabricator);
+ pollutionPerSecondMultiRefinery = config.get("pollution", "pollutionPerSecondMultiRefinery", pollutionPerSecondMultiRefinery, "pollution rate in gibbl/s for the Reactor fuel processing plant").getInt(pollutionPerSecondMultiRefinery);
+ // pollutionPerSecondMultiGeneratorArray;
+ pollutionPerSecondMultiIndustrialRockBreaker = config.get("pollution", "pollutionPerSecondMultiIndustrialRockBreaker", pollutionPerSecondMultiIndustrialRockBreaker, "pollution rate in gibbl/s for the Industrial Rock Breaker").getInt(pollutionPerSecondMultiIndustrialRockBreaker);
+ pollutionPerSecondMultiIndustrialChisel = config.get("pollution", "pollutionPerSecondMultiIndustrialChisel", pollutionPerSecondMultiIndustrialChisel, "pollution rate in gibbl/s for the Industrial Chisel").getInt(pollutionPerSecondMultiIndustrialChisel);
+ pollutionPerSecondMultiTreeFarm = config.get("pollution", "pollutionPerSecondMultiTreeFarm", pollutionPerSecondMultiTreeFarm, "pollution rate in gibbl/s for the Tree growth simulator").getInt(pollutionPerSecondMultiTreeFarm);
+ pollutionPerSecondMultiFrothFlotationCell = config.get("pollution", "pollutionPerSecondMultiFrothFlotationCell", pollutionPerSecondMultiFrothFlotationCell, "pollution rate in gibbl/s for the Flotation cell regulator").getInt(pollutionPerSecondMultiFrothFlotationCell);
+ pollutionPerSecondMultiAutoCrafter = config.get("pollution", "pollutionPerSecondMultiAutoCrafter", pollutionPerSecondMultiAutoCrafter, "pollution rate in gibbl/s for the Large-Scale auto assembler v1.01").getInt(pollutionPerSecondMultiAutoCrafter);
+ pollutionPerSecondMultiMolecularTransformer = config.get("pollution", "pollutionPerSecondMultiMolecularTransformer", pollutionPerSecondMultiMolecularTransformer, "pollution rate in gibbl/s for the Multiblock Molecular Transformer").getInt(pollutionPerSecondMultiMolecularTransformer);
+ pollutionPerSecondMultiThermalBoiler = config.get("pollution", "pollutionPerSecondMultiThermalBoiler", pollutionPerSecondMultiThermalBoiler, "pollution rate in gibbl/s for the Thermal boiler").getInt(pollutionPerSecondMultiThermalBoiler);
+ pollutionPerSecondMultiAlgaePond = config.get("pollution", "pollutionPerSecondMultiAlgaePond", pollutionPerSecondMultiAlgaePond, "pollution rate in gibbl/s for the Algae farm").getInt(pollutionPerSecondMultiAlgaePond);
basePollutionPerSecondSemiFluidGenerator = config.get("pollution", "basePollutionPerSecondSemiFluidGenerator", basePollutionPerSecondSemiFluidGenerator, "base pollution rate in gibbl/s for the single block semi fluid generators").getInt(basePollutionPerSecondSemiFluidGenerator);
pollutionReleasedByTierSemiFluidGenerator = config.get("pollution", "pollutionReleasedByTierSemiFluidGenerator", pollutionReleasedByTierSemiFluidGenerator, "coefficient applied to the base rate of the single block semi fluid generators based on its tier (first is tier 0 aka ULV)").getDoubleList();
- basePollutionPerSecondBoiler = config.get("pollution", "basePollutionPerSecondBoiler", basePollutionPerSecondBoiler,"base pollution rate in gibbl/s for the single block boilers").getInt(basePollutionPerSecondBoiler);
+ basePollutionPerSecondBoiler = config.get("pollution", "basePollutionPerSecondBoiler", basePollutionPerSecondBoiler, "base pollution rate in gibbl/s for the single block boilers").getInt(basePollutionPerSecondBoiler);
pollutionReleasedByTierBoiler = config.get("pollution", "pollutionReleasedByTierBoiler", pollutionReleasedByTierBoiler, "coefficient applied to the base rate of the single block semi fluid generators based on its tier (first is tier 0 aka ULV)").getDoubleList();
baseMinPollutionPerSecondRocketFuelGenerator = config.get("pollution", "baseMinPollutionPerSecondRocketFuelGenerator", baseMinPollutionPerSecondRocketFuelGenerator, "minimum base pollution rate in gibbl/s for the single block rocket engines").getInt(baseMinPollutionPerSecondRocketFuelGenerator);
baseMaxPollutionPerSecondRocketFuelGenerator = config.get("pollution", "baseMaxPollutionPerSecondRocketFuelGenerator", baseMaxPollutionPerSecondRocketFuelGenerator, "maximum base pollution rate in gibbl/s for the single block rocket engines").getInt(baseMaxPollutionPerSecondRocketFuelGenerator);
pollutionReleasedByTierRocketFuelGenerator = config.get("pollution", "pollutionReleasedByTierRocketFuelGenerator", pollutionReleasedByTierRocketFuelGenerator, "coefficient applied to the base rate of the single block rocket engines based on its tier (first is tier 0 aka ULV)").getDoubleList();
- basePollutionPerSecondGeothermalGenerator = config.get("pollution", "basePollutionPerSecondGeothermalGenerator", basePollutionPerSecondGeothermalGenerator,"base pollution rate in gibbl/s for the geothermal engines").getInt(basePollutionPerSecondGeothermalGenerator);
+ basePollutionPerSecondGeothermalGenerator = config.get("pollution", "basePollutionPerSecondGeothermalGenerator", basePollutionPerSecondGeothermalGenerator, "base pollution rate in gibbl/s for the geothermal engines").getInt(basePollutionPerSecondGeothermalGenerator);
pollutionReleasedByTierGeothermalGenerator = config.get("pollution", "pollutionReleasedByTierGeothermalGenerator", pollutionReleasedByTierGeothermalGenerator, "coefficient applied to the base rate of the single block geothermal engines based on its tier (first is tier 0 aka ULV)").getDoubleList();
config.save();
}
diff --git a/src/main/java/gtPlusPlus/core/handler/MobMentality.java b/src/main/java/gtPlusPlus/core/handler/MobMentality.java
new file mode 100644
index 0000000000..acc289fecd
--- /dev/null
+++ b/src/main/java/gtPlusPlus/core/handler/MobMentality.java
@@ -0,0 +1,58 @@
+package gtPlusPlus.core.handler;
+
+import java.util.*;
+
+import cpw.mods.fml.common.eventhandler.SubscribeEvent;
+import gtPlusPlus.core.util.minecraft.EntityUtils;
+import gtPlusPlus.core.util.minecraft.PlayerUtils;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.EntityLivingBase;
+import net.minecraft.entity.monster.IMob;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraftforge.event.entity.living.LivingHurtEvent;
+
+public class MobMentality {
+
+ public static HashSet<Class<EntityLivingBase>> sIgnoredTypes = new HashSet<Class<EntityLivingBase>>();
+
+ @SubscribeEvent
+ public void onEntityDamaged(LivingHurtEvent event) {
+ final EntityLivingBase target = event.entityLiving;
+ for (Class<EntityLivingBase> aEntityClass : sIgnoredTypes) {
+ if (aEntityClass.isInstance(target)) {
+ return;
+ }
+ }
+ if (target instanceof EntityLivingBase) {
+ final EntityLivingBase entity = target;
+ final Entity attacker = event.source.getSourceOfDamage();
+ if (/*this.configuration.shouldIgnoreNeutralMobs() && */!(entity instanceof IMob)) {
+ return;
+ }
+ if (attacker == null) {
+ return;
+ }
+ if (attacker instanceof EntityLivingBase && !PlayerUtils.isRealPlayer((EntityLivingBase) attacker)) {
+ return;
+ }
+ if (attacker instanceof EntityPlayer && PlayerUtils.isCreative((EntityPlayer) attacker)) {
+ return;
+ }
+ if (attacker instanceof EntityLivingBase) {
+ List<Entity> aEntityList = target.worldObj.loadedEntityList;
+ List<EntityLivingBase> aRangedEntity = new ArrayList<EntityLivingBase>();
+ for (Entity aEntity : aEntityList) {
+ if (target.getClass().isInstance(aEntity)) {
+ if (EntityUtils.getDistance(target, aEntity) <= 32) {
+ aRangedEntity.add((EntityLivingBase) aEntity);
+ }
+ }
+ }
+ for (EntityLivingBase aEntity : aRangedEntity) {
+ aEntity.setRevengeTarget((EntityLivingBase) attacker);
+ }
+ }
+ }
+ }
+
+}
diff --git a/src/main/java/gtPlusPlus/core/handler/events/EnderDragonDeathHandler.java b/src/main/java/gtPlusPlus/core/handler/events/EnderDragonDeathHandler.java
index 884f14386d..967a51fad6 100644
--- a/src/main/java/gtPlusPlus/core/handler/events/EnderDragonDeathHandler.java
+++ b/src/main/java/gtPlusPlus/core/handler/events/EnderDragonDeathHandler.java
@@ -13,47 +13,48 @@ public class EnderDragonDeathHandler {
private static final String mDragonClassName = "chylex.hee.entity.boss.EntityBossDragon";
private static final boolean mHEE;
private static final Class mHardcoreDragonClass;
-
+
+ private static final String mChaosDragonClassName = "com.brandon3055.draconicevolution.common.entity.EntityCustomDragon";
+ private static final boolean mDE;
+ private static final Class mChaoseDragonClass;
+
static {
mHEE = ReflectionUtils.doesClassExist(mDragonClassName);
mHardcoreDragonClass = (mHEE ? ReflectionUtils.getClass(mDragonClassName) : null);
+ mDE = ReflectionUtils.doesClassExist(mChaosDragonClassName);
+ mChaoseDragonClass = (mDE ? ReflectionUtils.getClass(mChaosDragonClassName) : 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;
- }
- }
+
+ if (mHEE && mHardcoreDragonClass != null && 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));
+ 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;
- }
+ else if (mDE && mChaoseDragonClass != null && mChaoseDragonClass.isInstance(event.entityLiving)) {
+ for (int y = 0; y < MathUtils.randInt(100, 200); y++) {
+ int aAmount = MathUtils.randInt(1, 5);
+ event.entityLiving.entityDropItem(ELEMENT.STANDALONE.DRAGON_METAL.getIngot(aAmount), MathUtils.randFloat(0, 1));
+ aCountTotal = +aAmount;
}
}
-
- if (aDidDrop) {
- PlayerUtils.messageAllPlayers(aCountTotal+" Shards of Dragons Blood have crystalized into a metallic form.");
+ 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));
+ aCountTotal = +aAmount;
+ }
+ }
+ if (aCountTotal > 0) {
+ PlayerUtils.messageAllPlayers(aCountTotal + " Shards of Dragons Blood have crystalized into a metallic form.");
}
-
+
}
}
diff --git a/src/main/java/gtPlusPlus/core/handler/events/PlayerSleepEventHandler.java b/src/main/java/gtPlusPlus/core/handler/events/PlayerSleepEventHandler.java
new file mode 100644
index 0000000000..10677c12db
--- /dev/null
+++ b/src/main/java/gtPlusPlus/core/handler/events/PlayerSleepEventHandler.java
@@ -0,0 +1,106 @@
+package gtPlusPlus.core.handler.events;
+
+import java.lang.reflect.Field;
+import java.util.ArrayList;
+import java.util.Collection;
+
+import cpw.mods.fml.common.eventhandler.SubscribeEvent;
+import gtPlusPlus.api.objects.Logger;
+import gtPlusPlus.core.potion.GtPotionEffect;
+import gtPlusPlus.core.util.Utils;
+import gtPlusPlus.core.util.math.MathUtils;
+import gtPlusPlus.core.util.minecraft.PlayerUtils;
+import gtPlusPlus.core.util.reflect.ReflectionUtils;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.potion.Potion;
+import net.minecraft.potion.PotionEffect;
+import net.minecraft.util.ChatComponentTranslation;
+import net.minecraftforge.event.entity.player.PlayerSleepInBedEvent;
+import net.minecraftforge.event.entity.player.PlayerWakeUpEvent;
+
+public class PlayerSleepEventHandler {
+
+ private static Field sEffectDuration = ReflectionUtils.getField(PotionEffect.class, "duration");
+ private static ArrayList<Potion> sPositiveEffects = new ArrayList<Potion>();
+ private static ArrayList<Potion> sNegativeEffects = new ArrayList<Potion>();
+
+ public static void init() {
+ Utils.registerEvent(new PlayerSleepEventHandler());
+ sPositiveEffects.add(Potion.moveSpeed);
+ sPositiveEffects.add(Potion.waterBreathing);
+ sPositiveEffects.add(Potion.resistance);
+ sPositiveEffects.add(Potion.regeneration);
+ sPositiveEffects.add(Potion.damageBoost);
+ sPositiveEffects.add(Potion.digSpeed);
+ sPositiveEffects.add(Potion.fireResistance);
+ sPositiveEffects.add(Potion.field_76434_w); // Health Boost
+ sPositiveEffects.add(Potion.field_76444_x); // Absorption
+ sNegativeEffects.add(Potion.blindness);
+ sNegativeEffects.add(Potion.confusion);
+ sNegativeEffects.add(Potion.digSlowdown);
+ sNegativeEffects.add(Potion.harm);
+ sNegativeEffects.add(Potion.hunger);
+ sNegativeEffects.add(Potion.moveSlowdown);
+ sNegativeEffects.add(Potion.poison);
+ sNegativeEffects.add(Potion.weakness);
+ sNegativeEffects.add(Potion.wither);
+ }
+
+ @SubscribeEvent
+ public void sleep(PlayerSleepInBedEvent event) {
+
+ }
+
+ @SubscribeEvent
+ public void wake(PlayerWakeUpEvent event) {
+ EntityPlayer aPlayer = event.entityPlayer;
+ if (aPlayer != null && !aPlayer.worldObj.isRemote) {
+ boolean aRemovedBad = false;
+ try {
+ Collection<PotionEffect> aActive = aPlayer.getActivePotionEffects();
+ for (PotionEffect aEffect : aActive) {
+ for (Potion aBadPotion : sNegativeEffects) {
+ if (aEffect.getPotionID() == aBadPotion.getId()) {
+ ReflectionUtils.setField(aEffect, sEffectDuration, 1);
+ aRemovedBad = true;
+ Logger.INFO("Set duration of " + aEffect.getEffectName() + " to 1 tick");
+ }
+ }
+ }
+ }
+ catch (Throwable t) {
+ t.printStackTrace();
+ }
+ if (aRemovedBad) {
+ messagePlayer(aPlayer, "sleep.event.downsides");
+ }
+ else {
+ // Try Heal
+ float aCurrentHP = aPlayer.getHealth();
+ float aMaxHP = aPlayer.getMaxHealth();
+ if (aCurrentHP < aMaxHP) {
+ float aDamage = aMaxHP - aCurrentHP;
+ float aToHeal = MathUtils.randFloat(1, aDamage);
+ if (aToHeal > 0) {
+ aPlayer.heal(aToHeal);
+ messagePlayer(aPlayer, (aToHeal >= aDamage / 2 ? "sleep.event.good" : "sleep.event.okay"));
+ }
+ }
+ // Already healed, try give a buff
+ else {
+ int aRandomBuff = MathUtils.randInt(0, sPositiveEffects.size() - 1);
+ Potion aPotionToApply = sPositiveEffects.get(aRandomBuff);
+ if (aPotionToApply != null) {
+ aPlayer.addPotionEffect(new GtPotionEffect(aPotionToApply.id, MathUtils.randInt(60, 180), MathUtils.randInt(0, 2)));
+ messagePlayer(aPlayer, "sleep.event.wellrested");
+ }
+ }
+ }
+ }
+ }
+
+ private static void messagePlayer(EntityPlayer aPlayer, String aChatKey) {
+ PlayerUtils.messagePlayer(aPlayer, new ChatComponentTranslation(aChatKey, new Object[0]));
+ }
+
+}
diff --git a/src/main/java/gtPlusPlus/core/item/ModItems.java b/src/main/java/gtPlusPlus/core/item/ModItems.java
index 4004ab2724..8b72b9c7c9 100644
--- a/src/main/java/gtPlusPlus/core/item/ModItems.java
+++ b/src/main/java/gtPlusPlus/core/item/ModItems.java
@@ -76,11 +76,13 @@ import gtPlusPlus.xmod.gregtech.common.items.MetaGeneratedGregtechItems;
import net.minecraft.item.*;
import net.minecraft.item.Item.ToolMaterial;
import net.minecraft.util.EnumChatFormatting;
+import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.common.util.EnumHelper;
import net.minecraftforge.fluids.Fluid;
import net.minecraftforge.fluids.FluidRegistry;
public final class ModItems {
+
public static ToolMaterial STABALLOY = EnumHelper.addToolMaterial("Staballoy", 3, 2500, 7, 1.0F, 18);
public static Item ZZZ_Empty;
@@ -357,6 +359,8 @@ public final class ModItems {
public static CoreItem itemExquisiteIndustrialDiamond;
public static BaseItemMetaFood itemMetaFood;
+
+ public static ItemMagicFeather itemMagicFeather;
static {
Logger.INFO("Items!");
@@ -367,8 +371,9 @@ public final class ModItems {
public static final void init(){
- itemDebugScanner = new DebugScanner();
-
+ itemDebugScanner = new DebugScanner();
+ itemMagicFeather = new ItemMagicFeather();
+
itemAlkalusDisk = new BaseItemDamageable("itemAlkalusDisk", AddToCreativeTab.tabMisc, 1, 0, "Unknown Use", EnumRarity.rare, EnumChatFormatting.AQUA, false, null);
itemBigEgg = new ItemGiantEgg();
itemGenericToken = new ItemGenericToken();
@@ -519,6 +524,7 @@ public final class ModItems {
MaterialGenerator.generate(ELEMENT.STANDALONE.CELESTIAL_TUNGSTEN);
MaterialGenerator.generate(ELEMENT.STANDALONE.HYPOGEN);
MaterialGenerator.generate(ELEMENT.STANDALONE.CHRONOMATIC_GLASS);
+ MaterialGenerator.generate(ELEMENT.STANDALONE.FORCE);
//Custom Materials that are from Runescape
MaterialGenerator.generate(ELEMENT.STANDALONE.BLACK_METAL);
diff --git a/src/main/java/gtPlusPlus/core/item/base/BaseItemComponent.java b/src/main/java/gtPlusPlus/core/item/base/BaseItemComponent.java
index af03fd2b83..9590ec2848 100644
--- a/src/main/java/gtPlusPlus/core/item/base/BaseItemComponent.java
+++ b/src/main/java/gtPlusPlus/core/item/base/BaseItemComponent.java
@@ -1,15 +1,15 @@
package gtPlusPlus.core.item.base;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
+
import gregtech.api.GregTech_API;
import gregtech.api.enums.OrePrefixes;
import gregtech.api.enums.TextureSet;
+import gregtech.api.util.GT_LanguageManager;
import gregtech.api.objects.GT_RenderedTexture;
import gregtech.api.util.GT_OreDictUnificator;
import gtPlusPlus.api.objects.Logger;
@@ -17,6 +17,7 @@ import gtPlusPlus.core.creative.AddToCreativeTab;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.lib.LoadedMods;
import gtPlusPlus.core.material.Material;
+import gtPlusPlus.core.material.state.MaterialState;
import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.data.StringUtils;
import gtPlusPlus.core.util.math.MathUtils;
@@ -65,6 +66,9 @@ public class BaseItemComponent extends Item{
//if (componentType != ComponentTypes.DUST)
GT_OreDictUnificator.registerOre(componentType.getOreDictName()+material.getUnlocalizedName(), ItemUtils.getSimpleStack(this));
+ if (componentType == ComponentTypes.GEAR) {
+ GT_OreDictUnificator.registerOre("gear"+material.getUnlocalizedName(), ItemUtils.getSimpleStack(this));
+ }
if (LoadedMods.Thaumcraft) {
//ThaumcraftUtils.addAspectToItem(ItemUtils.getSimpleStack(this), TC_Aspect_Wrapper.generate(TC_Aspects.METALLUM.mAspect), 1);
if (componentMaterial.isRadioactive) {
@@ -168,6 +172,34 @@ public class BaseItemComponent extends Item{
public final String getMaterialName() {
return this.materialName;
}
+
+ @Override
+ public String getItemStackDisplayName(ItemStack stack) {
+ if (componentMaterial == null) {
+ String aFormattedLangName = componentType.getName();
+ if (!aFormattedLangName.startsWith(" ")) {
+ if (aFormattedLangName.contains("@")) {
+ String[] aSplit = aFormattedLangName.split("@");
+ aFormattedLangName = aSplit[0] + " " + getMaterialName() + " " + aSplit[1];
+ }
+ }
+ if (aFormattedLangName.equals(componentType.getName())) {
+ aFormattedLangName = getMaterialName() + aFormattedLangName;
+ }
+ return GT_LanguageManager.addStringLocalization(unlocalName, aFormattedLangName);
+ }
+ String aFormattedLangName = componentType.getName();
+ if (!aFormattedLangName.startsWith(" ")) {
+ if (aFormattedLangName.contains("@")) {
+ String[] aSplit = aFormattedLangName.split("@");
+ aFormattedLangName = aSplit[0] + " " + componentMaterial.getLocalizedName() + " " + aSplit[1];
+ }
+ }
+ if (aFormattedLangName.equals(componentType.getName())) {
+ aFormattedLangName = componentMaterial.getLocalizedName() + aFormattedLangName;
+ }
+ return GT_LanguageManager.addStringLocalization(unlocalName, aFormattedLangName);
+ }
@SuppressWarnings({ "unchecked", "rawtypes" })
@Override
@@ -345,6 +377,7 @@ public class BaseItemComponent extends Item{
((Map<Integer, Short[]>) extraData).put((int) Short.MAX_VALUE-2, new Short[] {(short) (((Map<Integer, Short[]>) extraData).size()-1)});
}
if (extraData != null) {
+
Short aCurrentFrame = ((Map<Integer, Short[]>) extraData).get((int) Short.MAX_VALUE)[0];
Short aSize = (short) (((Map<Integer, Short[]>) extraData).size() - 3);
short nextFrame = (short) ((aCurrentFrame < aSize) ? (aCurrentFrame+1) : 0);
@@ -966,10 +999,10 @@ public class BaseItemComponent extends Item{
public static enum ComponentTypes {
DUST("Dust", " Dust", "dust", OrePrefixes.dust),
- DUSTSMALL("DustSmall", " Dust", "dustSmall", OrePrefixes.dustSmall),
- DUSTTINY("DustTiny", " Dust", "dustTiny", OrePrefixes.dustTiny),
+ DUSTSMALL("DustSmall", "Small Pile of@Dust", "dustSmall", OrePrefixes.dustSmall),
+ DUSTTINY("DustTiny", "Tiny Pile of@Dust", "dustTiny", OrePrefixes.dustTiny),
INGOT("Ingot", " Ingot", "ingot", OrePrefixes.ingot),
- HOTINGOT("HotIngot", " Hot Ingot", "ingotHot", OrePrefixes.ingotHot),
+ HOTINGOT("HotIngot", "Hot@Ingot", "ingotHot", OrePrefixes.ingotHot),
PLATE("Plate", " Plate", "plate", OrePrefixes.plate),
PLATEDOUBLE("PlateDouble", " Double Plate", "plateDouble", OrePrefixes.plateDouble),
ROD("Rod", " Rod", "stick", OrePrefixes.stick),
diff --git a/src/main/java/gtPlusPlus/core/item/base/CoreItem.java b/src/main/java/gtPlusPlus/core/item/base/CoreItem.java
index 7ce96b2a88..fbd04eb30b 100644
--- a/src/main/java/gtPlusPlus/core/item/base/CoreItem.java
+++ b/src/main/java/gtPlusPlus/core/item/base/CoreItem.java
@@ -140,7 +140,7 @@ public class CoreItem extends Item
this.setMaxDamage(maxDmg);
this.rarity = regRarity;
this.itemDescription = description;
- this.descColour = colour;
+ this.descColour = colour != null ? colour : EnumChatFormatting.RESET;
this.hasEffect = Effect;
this.turnsInto = OverrideItem;
GameRegistry.registerItem(this, unlocalizedName);
@@ -160,7 +160,7 @@ public class CoreItem extends Item
this.setMaxDamage(maxDmg);
this.rarity = regRarity;
this.itemDescription = description;
- this.descColour = colour;
+ this.descColour = colour != null ? colour : EnumChatFormatting.RESET;
this.hasEffect = Effect;
this.turnsInto = OverrideItem;
GameRegistry.registerItem(this, unlocalizedName);
diff --git a/src/main/java/gtPlusPlus/core/item/base/itemblock/ItemBlockGtBlock.java b/src/main/java/gtPlusPlus/core/item/base/itemblock/ItemBlockGtBlock.java
index 396689ef63..af6f036942 100644
--- a/src/main/java/gtPlusPlus/core/item/base/itemblock/ItemBlockGtBlock.java
+++ b/src/main/java/gtPlusPlus/core/item/base/itemblock/ItemBlockGtBlock.java
@@ -1,30 +1,35 @@
package gtPlusPlus.core.item.base.itemblock;
+import java.util.HashMap;
import java.util.List;
-import net.minecraft.block.Block;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemBlock;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.world.World;
-
+import gregtech.api.util.GT_LanguageManager;
+import gtPlusPlus.core.block.base.BasicBlock.BlockTypes;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.block.base.BlockBaseModular;
import gtPlusPlus.core.block.base.BlockBaseOre;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.material.Material;
import gtPlusPlus.core.material.MaterialStack;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.minecraft.EntityUtils;
import gtPlusPlus.core.util.sys.KeyboardUtils;
+import net.minecraft.block.Block;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemBlock;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.EnumChatFormatting;
+import net.minecraft.world.World;
public class ItemBlockGtBlock extends ItemBlock {
+ public static HashMap<String, String> sNameCache = new HashMap<String, String>();
+
protected final int blockColour;
private int sRadiation;
private Material mMaterial;
+ protected BlockTypes thisBlockType;
private final Block thisBlock;
private boolean isOre = false;
@@ -50,15 +55,46 @@ public class ItemBlockGtBlock extends ItemBlock {
if (block instanceof BlockBaseModular){
BlockBaseModular g = (BlockBaseModular) block;
this.mMaterial = g.getMaterialEx();
+ this.thisBlockType = g.thisBlock;
}
else {
this.mMaterial = null;
+ this.thisBlockType = BlockTypes.STANDARD;
}
- // GT_OreDictUnificator.registerOre("block"+block.getUnlocalizedName().replace("tile.block",
- // "").replace("tile.", "").replace("of", "").replace("Of", "").replace("Block",
- // "").replace("-", "").replace("_", "").replace(" ", ""),
- // ItemUtils.getSimpleStack(this));
+ }
+
+ public int getBlockTypeMeta() {
+ if (this.thisBlockType.equals(BlockTypes.STANDARD)) {
+ return 0;
+ }
+ else if (this.thisBlockType.equals(BlockTypes.FRAME)) {
+ return 1;
+ }
+ else if (this.thisBlockType.equals(BlockTypes.ORE)) {
+ return 2;
+ }
+ return 0;
+ }
+
+ public String getUnlocalizedBlockName() {
+ return "block."+mMaterial.getUnlocalizedName()+"."+this.thisBlockType.name().toLowerCase();
+ }
+
+ public String GetProperName() {
+ String tempIngot = sNameCache.get(getUnlocalizedBlockName());
+ if (tempIngot == null) {
+ tempIngot = "BAD.UNLOCAL.NAME";
+ }
+ return tempIngot;
+ }
+
+ @Override
+ public String getItemStackDisplayName(ItemStack stack) {
+ return this.thisBlock.getLocalizedName();
+ //Logger.INFO("Unlocal Name: "+this.getUnlocalizedName());
+ //String aFormattedLangName = GetProperName();
+ //return GT_LanguageManager.addStringLocalization("block."+mMaterial.getUnlocalizedName()+"."+this.thisBlockType.name().toLowerCase()+".name", aFormattedLangName);
}
public int getRenderColor(final int aMeta) {
diff --git a/src/main/java/gtPlusPlus/core/item/general/ItemMagicFeather.java b/src/main/java/gtPlusPlus/core/item/general/ItemMagicFeather.java
new file mode 100644
index 0000000000..4d34bf84e7
--- /dev/null
+++ b/src/main/java/gtPlusPlus/core/item/general/ItemMagicFeather.java
@@ -0,0 +1,269 @@
+package gtPlusPlus.core.item.general;
+
+import java.util.*;
+
+import cpw.mods.fml.common.eventhandler.EventPriority;
+import cpw.mods.fml.common.eventhandler.SubscribeEvent;
+import cpw.mods.fml.common.gameevent.TickEvent;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import gtPlusPlus.api.objects.Logger;
+import gtPlusPlus.core.creative.AddToCreativeTab;
+import gtPlusPlus.core.item.ModItems;
+import gtPlusPlus.core.item.base.CoreItem;
+import gtPlusPlus.core.lib.CORE;
+import net.minecraft.client.Minecraft;
+import net.minecraft.entity.EntityLivingBase;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.*;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.tileentity.TileEntityBeacon;
+import net.minecraft.util.EnumChatFormatting;
+import net.minecraft.world.World;
+import net.minecraftforge.common.MinecraftForge;
+import net.minecraftforge.event.entity.living.LivingDeathEvent;
+
+public class ItemMagicFeather extends CoreItem {
+
+ public static final String NAME = "magicfeather";
+ private static final WeakHashMap<UUID, MagicFeatherData> sPlayerData = new WeakHashMap<UUID, MagicFeatherData>();
+ private static final WeakHashMap<UUID, HashSet<TileEntityBeacon>> sBeaconData = new WeakHashMap<UUID, HashSet<TileEntityBeacon>>();
+
+ public ItemMagicFeather() {
+ super("magicfeather", AddToCreativeTab.tabMisc, 1, 100, new String[]{"Lets you fly around Beacons"}, EnumRarity.uncommon, null, false, null);
+ setMaxStackSize(1);
+ setUnlocalizedName(CORE.MODID + ":" + NAME);
+ MinecraftForge.EVENT_BUS.register(this);
+ }
+
+ @Override
+ public int getEntityLifespan(ItemStack itemStack, World world) {
+ return Integer.MAX_VALUE;
+ }
+
+ @Override
+ @SideOnly(Side.CLIENT)
+ public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) {
+ list.add("Does not need to be the item held in your hand to work");
+ super.addInformation(stack, aPlayer, list, bool);
+ EntityPlayer player = Minecraft.getMinecraft().thePlayer;
+ list.add("");
+ if (player != null) {
+ if (!isInBeaconRange(player)) {
+ list.add("" + EnumChatFormatting.RED + "Needs to be within beacon range");
+ }
+ else {
+ list.add("" + EnumChatFormatting.GOLD + "Fly like an eagle");
+ }
+ HashSet<TileEntityBeacon> aBeaconData = sBeaconData.get(player.getUniqueID());
+ if (aBeaconData != null && !aBeaconData.isEmpty()) {
+ list.add("Nearby Beacons:");
+ for (TileEntityBeacon aBeacon : aBeaconData) {
+ int level = aBeacon.getLevels();
+ if (level > 0) {
+ int radius = (level * 10 + 10);
+ int x = aBeacon.xCoord;
+ int z = aBeacon.zCoord;
+ int y = aBeacon.yCoord;
+ list.add("Level: "+level+", Radius: "+radius);
+ list.add("Location: "+x+", "+y+", "+z);
+ }
+ }
+ }
+ }
+ }
+
+ public boolean hasCustomEntity(ItemStack stack) {
+ return true;
+ }
+
+ private static boolean isInBeaconRange(EntityPlayer player) {
+ World world = player.getEntityWorld();
+ if (world.isRemote) {
+ HashSet<TileEntityBeacon> aBeaconData = sBeaconData.get(player.getUniqueID());
+ if (aBeaconData != null) {
+ return !aBeaconData.isEmpty();
+ }
+ return false;
+ }
+ List<TileEntity> tileEntities = world.loadedTileEntityList;
+ HashSet<TileEntityBeacon> aBeaconData = sBeaconData.get(player.getUniqueID());
+ if (aBeaconData == null) {
+ aBeaconData = new HashSet<TileEntityBeacon>();
+ sBeaconData.put(player.getUniqueID(), aBeaconData);
+ }
+ for (TileEntity t : tileEntities) {
+ if (!(t instanceof TileEntityBeacon)) {
+ continue;
+ }
+ TileEntityBeacon beacon = (TileEntityBeacon) t;
+ int level = beacon.getLevels();
+ if (level == 0) {
+ continue;
+ }
+ int radius = (level * 10 + 10);
+ int x = beacon.xCoord;
+ int z = beacon.zCoord;
+ if (player.posX < (x - radius) || player.posX > (x + radius)) {
+ continue;
+ }
+ if (player.posZ < (z - radius) || player.posZ > (z + radius)) {
+ continue;
+ }
+ if (!aBeaconData.contains(beacon)) {
+ aBeaconData.add(beacon);
+ }
+ }
+ if (aBeaconData.size() > 0) {
+ return true;
+ }
+
+ return false;
+ }
+
+ private static void setMayFly(EntityPlayer player, boolean mayFly) {
+ if (player.capabilities.allowFlying == mayFly) {
+ return;
+ }
+ if (!mayFly) {
+ // force the player on the ground then remove ability to fly
+ // this prevent crashing the the ground and dying
+ // when you accidentally get out of the beacon range
+ player.capabilities.isFlying = false;
+ if (player.onGround && player.fallDistance < 1F) {
+ player.capabilities.allowFlying = false;
+ }
+ }
+ else {
+ player.capabilities.allowFlying = true;
+ }
+ player.sendPlayerAbilities();
+ }
+
+ @SubscribeEvent(priority=EventPriority.HIGHEST)
+ public void onPlayerTick(TickEvent.PlayerTickEvent event) {
+ if (event.side != Side.SERVER) {
+ return;
+ }
+ EntityPlayer player = event.player;
+ HashSet<TileEntityBeacon> aBeaconData = sBeaconData.get(player.getUniqueID());
+ if (aBeaconData != null && !aBeaconData.isEmpty()) {
+ HashSet<TileEntityBeacon> aRemovals = new HashSet<TileEntityBeacon>();
+ for (TileEntityBeacon aBeacon : aBeaconData) {
+ int level = aBeacon.getLevels();
+ if (level == 0) {
+ aRemovals.add(aBeacon);
+ continue;
+ }
+ int radius = (level * 10 + 10);
+ int x = aBeacon.xCoord;
+ int z = aBeacon.zCoord;
+ if (player.posX < (x - radius) || player.posX > (x + radius)) {
+ aRemovals.add(aBeacon);
+ continue;
+ }
+ if (player.posZ < (z - radius) || player.posZ > (z + radius)) {
+ aRemovals.add(aBeacon);
+ continue;
+ }
+ }
+ aBeaconData.removeAll(aRemovals);
+ }
+ boolean hasItem = hasItem(player, ModItems.itemMagicFeather);
+ if (!hasItem) {
+ ItemMagicFeather.sPlayerData.remove(player.getUniqueID());
+ }
+ MagicFeatherData data = ItemMagicFeather.sPlayerData.get(player.getUniqueID());
+ if (data == null) {
+ data = new MagicFeatherData(player);
+ ItemMagicFeather.sPlayerData.put(player.getUniqueID(), data);
+ }
+ data.onTick();
+ }
+
+ @SubscribeEvent(priority=EventPriority.LOWEST)
+ public void onPlayerDeath(LivingDeathEvent event) {
+ if (event.entityLiving != null) {
+ EntityLivingBase aEntity = event.entityLiving;
+ if (aEntity instanceof EntityPlayer && aEntity.worldObj != null) {
+ if (aEntity.worldObj.isRemote) {
+ return;
+ }
+ else {
+ EntityPlayer aPlayer = (EntityPlayer) aEntity;
+ ItemMagicFeather.sPlayerData.remove(aPlayer.getUniqueID());
+ ItemMagicFeather.sBeaconData.remove(aPlayer.getUniqueID());
+ }
+ }
+ }
+ }
+
+ private static boolean hasItem(EntityPlayer player, Item item) {
+ for (int i = 0; i < player.inventory.getSizeInventory(); i++) {
+ ItemStack stack = player.inventory.getStackInSlot(i);
+ if (stack != null && stack.getItem() != null && stack.getItem() instanceof ItemMagicFeather) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ private static class MagicFeatherData {
+
+ private final EntityPlayer player;
+ private boolean hasItem = false;
+ private int checkTick = 0;
+ private boolean beaconInRangeCache;
+
+ public MagicFeatherData(EntityPlayer player) {
+ this.player = player;
+ this.beaconInRangeCache = player.capabilities.allowFlying;
+ }
+
+ public void onTick() {
+ try {
+ boolean hasItem = hasItem(player, ModItems.itemMagicFeather);
+ if (hasItem != this.hasItem) {
+ if (hasItem) {
+ this.onAdd();
+ }
+ if (!hasItem) {
+ this.onRemove();
+ }
+ this.hasItem = hasItem;
+ Logger.INFO("Ticking feather "+hasItem);
+ return;
+ }
+ }
+ catch (Throwable t) {
+ t.printStackTrace();
+ }
+
+ boolean mayFly = player.capabilities.isCreativeMode || (hasItem && checkBeaconInRange(player));
+ setMayFly(player, mayFly);
+ }
+
+ private void onAdd() {
+ if (!ItemMagicFeather.isInBeaconRange(player)) {
+ return;
+ }
+ setMayFly(player, true);
+ }
+
+ private void onRemove() {
+ if (player.capabilities.isCreativeMode) {
+ return;
+ }
+ setMayFly(player, false);
+ }
+
+ private boolean checkBeaconInRange(EntityPlayer player) {
+ if (checkTick++ % 40 != 0) {
+ return beaconInRangeCache;
+ }
+ beaconInRangeCache = ItemMagicFeather.isInBeaconRange(player);
+ return beaconInRangeCache;
+ }
+ }
+
+}
diff --git a/src/main/java/gtPlusPlus/core/lib/CORE.java b/src/main/java/gtPlusPlus/core/lib/CORE.java
index 463a10258a..076616f569 100644
--- a/src/main/java/gtPlusPlus/core/lib/CORE.java
+++ b/src/main/java/gtPlusPlus/core/lib/CORE.java
@@ -205,6 +205,7 @@ public class CORE {
public static boolean enableOldGTcircuits = false;
public static boolean disableZombieReinforcement = false;
public static int enableWatchdogBGM = CORE_Preloader.enableWatchdogBGM;
+ public static boolean hideUniversalCells = true;
//GT Fixes
public static boolean enableNitroFix = false;
diff --git a/src/main/java/gtPlusPlus/core/material/ELEMENT.java b/src/main/java/gtPlusPlus/core/material/ELEMENT.java
index 01d3fd5330..579fba73f5 100644
--- a/src/main/java/gtPlusPlus/core/material/ELEMENT.java
+++ b/src/main/java/gtPlusPlus/core/material/ELEMENT.java
@@ -216,6 +216,7 @@ public final class ELEMENT {
public static final Material ADVANCED_NITINOL = new Material("Advanced Nitinol", MaterialState.SOLID, TextureSets.ENRICHED.get(), ALLOY.NITINOL_60.getRGB(), 8400, 14377, 40, 51, true, "⚷⚙⚷ Ni4Ti6", 0);//Not a GT Inherited Material
public static final Material HYPOGEN = new Material("Hypogen", MaterialState.SOLID, TextureSets.NUCLEAR.get(), new short[]{220, 120, 75, 2}, 12255, 19377, 240, 251, true, "Hy⚶", 0);//Not a GT Inherited Material
public static final Material RHUGNOR = new Material("Rhugnor", MaterialState.SOLID, TextureSets.ENRICHED.get(), new short[]{190, 0, 255, 0}, 8750, 14757, 184, 142, true, "Fs⚶", 0);//Not a GT Inherited Material //funeris
+ public static final Material FORCE = new Material("Force", MaterialState.SOLID, TextureSets.ENRICHED.get(), new short[]{250, 250, 20, 0}, 4550, 6830, 63, 81, true, "Fc⚙", 0);//Not a GT Inherited Material
//Runescape materials
diff --git a/src/main/java/gtPlusPlus/core/potion/GtPotionEffect.java b/src/main/java/gtPlusPlus/core/potion/GtPotionEffect.java
new file mode 100644
index 0000000000..fa31f68389
--- /dev/null
+++ b/src/main/java/gtPlusPlus/core/potion/GtPotionEffect.java
@@ -0,0 +1,11 @@
+package gtPlusPlus.core.potion;
+
+import net.minecraft.potion.PotionEffect;
+
+public class GtPotionEffect extends PotionEffect {
+
+ public GtPotionEffect(int aPotionID, int aDurationInSecs, int aLevel) {
+ super(aPotionID, aDurationInSecs * 20, aLevel, false);
+ }
+
+}
diff --git a/src/main/java/gtPlusPlus/core/proxy/ClientProxy.java b/src/main/java/gtPlusPlus/core/proxy/ClientProxy.java
index 5a0c0f4ea3..6c940adc1d 100644
--- a/src/main/java/gtPlusPlus/core/proxy/ClientProxy.java
+++ b/src/main/java/gtPlusPlus/core/proxy/ClientProxy.java
@@ -1,5 +1,7 @@
package gtPlusPlus.core.proxy;
+import java.util.ArrayList;
+
import cpw.mods.fml.client.FMLClientHandler;
import cpw.mods.fml.client.registry.ClientRegistry;
import cpw.mods.fml.client.registry.RenderingRegistry;
@@ -12,9 +14,7 @@ import cpw.mods.fml.relauncher.SideOnly;
import gtPlusPlus.GTplusplus;
import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.api.objects.data.Pair;
-import gtPlusPlus.australia.entity.model.ModelBoar;
-import gtPlusPlus.australia.entity.model.ModelDingo;
-import gtPlusPlus.australia.entity.model.ModelOctopus;
+import gtPlusPlus.australia.entity.model.*;
import gtPlusPlus.australia.entity.render.*;
import gtPlusPlus.australia.entity.type.*;
import gtPlusPlus.core.client.model.ModelGiantChicken;
@@ -27,15 +27,15 @@ import gtPlusPlus.core.entity.monster.*;
import gtPlusPlus.core.entity.projectile.*;
import gtPlusPlus.core.handler.render.FirepitRender;
import gtPlusPlus.core.item.ModItems;
+import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.lib.CORE.ConfigSwitches;
import gtPlusPlus.core.lib.LoadedMods;
import gtPlusPlus.core.tileentities.general.TileEntityDecayablesChest;
import gtPlusPlus.core.tileentities.general.TileEntityFirepit;
import gtPlusPlus.core.util.minecraft.particles.EntityParticleFXMysterious;
import gtPlusPlus.xmod.gregtech.common.Meta_GT_Proxy;
-import gtPlusPlus.xmod.gregtech.common.render.GTPP_CapeRenderer;
-import gtPlusPlus.xmod.gregtech.common.render.GTPP_FlaskRenderer;
-import gtPlusPlus.xmod.gregtech.common.render.GTPP_Render_MachineBlock;
+import gtPlusPlus.xmod.gregtech.common.render.*;
+import ic2.core.item.ItemFluidCell;
import net.minecraft.client.Minecraft;
import net.minecraft.client.particle.EntityFX;
import net.minecraft.client.renderer.entity.RenderFireball;
@@ -43,9 +43,11 @@ import net.minecraft.client.renderer.entity.RenderSnowball;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import net.minecraftforge.client.IItemRenderer;
import net.minecraftforge.client.MinecraftForgeClient;
+import net.minecraftforge.fluids.*;
public class ClientProxy extends CommonProxy implements Runnable{
@@ -97,9 +99,9 @@ public class ClientProxy extends CommonProxy implements Runnable{
new GTPP_Render_MachineBlock();
if (Meta_GT_Proxy.sDoesVolumetricFlaskExist) {
- new GTPP_FlaskRenderer();
+ new GTPP_FlaskRenderer();
}
-
+
super.init(e);
}
@@ -255,17 +257,33 @@ public class ClientProxy extends CommonProxy implements Runnable{
@Override
public void onLoadComplete(FMLLoadCompleteEvent event) {
GTplusplus.tryPatchTurbineTextures();
+ if (CORE.ConfigSwitches.hideUniversalCells) {
+ hideUniversalCells();
+ }
super.onLoadComplete(event);
}
+ public void hideUniversalCells() {
+ ArrayList<ItemStack> itemList = new ArrayList<ItemStack>();
+ for (Fluid fluid : FluidRegistry.getRegisteredFluids().values()) {
+ if (fluid == null) {
+ continue;
+ }
+ itemList.add(ItemFluidCell.getUniversalFluidCell(new FluidStack(fluid, 2147483647)));
+ }
+ for (ItemStack aCell : itemList) {
+ codechicken.nei.api.API.hideItem(aCell);
+ }
+ }
+
@Override
public World getClientWorld() {
return FMLClientHandler.instance().getClient().theWorld;
}
-
+
@Override
public EntityPlayer getPlayerEntity(MessageContext ctx) {
- return (ctx.side.isClient() ? Minecraft.getMinecraft().thePlayer : super.getPlayerEntity(ctx));
+ return (ctx.side.isClient() ? Minecraft.getMinecraft().thePlayer : super.getPlayerEntity(ctx));
}
}
diff --git a/src/main/java/gtPlusPlus/core/recipe/RECIPES_General.java b/src/main/java/gtPlusPlus/core/recipe/RECIPES_General.java
index ae4eb36a39..25c5ee5f9e 100644
--- a/src/main/java/gtPlusPlus/core/recipe/RECIPES_General.java
+++ b/src/main/java/gtPlusPlus/core/recipe/RECIPES_General.java
@@ -359,6 +359,21 @@ public class RECIPES_General {
ItemUtils.getItemStackFromFQRN("miscutils:SlowBuildingRing", 1), // Output
20 * 30, // Dur
16); // Eu
+
+ // Magic Feather
+ CORE.RA.addSixSlotAssemblingRecipe(
+ new ItemStack[] {
+ ItemUtils.getSimpleStack(Items.feather, 64),
+ ItemUtils.getSimpleStack(Blocks.emerald_block, 32),
+ ItemUtils.getSimpleStack(Blocks.diamond_block, 32),
+ Materials.Ruby.getBlocks(32),
+ Materials.Sapphire.getBlocks(32),
+ ItemUtils.getSimpleStack(Blocks.gold_block, 32),
+ },
+ Materials.Silver.getMolten(32 * 144), // Fluid
+ ItemUtils.getSimpleStack(ModItems.itemMagicFeather, 1), // Output
+ 20 * 120, // Dur
+ MaterialUtils.getVoltageForTier(4)); // Eu
// Pest Killer
CORE.RA.addSixSlotAssemblingRecipe(
diff --git a/src/main/java/gtPlusPlus/core/util/math/MathUtils.java b/src/main/java/gtPlusPlus/core/util/math/MathUtils.java
index 5c7a5bac6d..4ff929c643 100644
--- a/src/main/java/gtPlusPlus/core/util/math/MathUtils.java
+++ b/src/main/java/gtPlusPlus/core/util/math/MathUtils.java
@@ -135,6 +135,19 @@ public class MathUtils {
public static double findPercentage(final double current, final double max){
return Math.round(((current / max) * 100) * 100.00) / 100.00;
}
+
+ /**
+ * Returns a percentage.
+ * The returned number is the % of X in Y.
+ * Supports Floats.
+ *
+ * @param current Current value.
+ * @param max Maximim value. Must be greater than min.
+ * @return double between min and max, inclusive.
+ */
+ public static float findPercentage(final float current, final float max){
+ return (float) (Math.round(((current / max) * 100) * 100.00) / 100.00);
+ }
public static int findPercentageOfInt(long input, float percentage){
return (int)(input*(percentage/100.0f));
diff --git a/src/main/java/gtPlusPlus/core/util/minecraft/PlayerUtils.java b/src/main/java/gtPlusPlus/core/util/minecraft/PlayerUtils.java
index 24ffa295b7..f2be723726 100644
--- a/src/main/java/gtPlusPlus/core/util/minecraft/PlayerUtils.java
+++ b/src/main/java/gtPlusPlus/core/util/minecraft/PlayerUtils.java
@@ -14,6 +14,7 @@ import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.server.MinecraftServer;
import net.minecraft.util.ChunkCoordinates;
+import net.minecraft.util.IChatComponent;
import net.minecraft.world.World;
import net.minecraftforge.common.util.FakePlayer;
@@ -34,6 +35,10 @@ public class PlayerUtils {
public static void messagePlayer(final EntityPlayer P, final String S){
gregtech.api.util.GT_Utility.sendChatToPlayer(P, S);
}
+
+ public static void messagePlayer(final EntityPlayer P, final IChatComponent S){
+ P.addChatComponentMessage(S);
+ }
public static EntityPlayer getPlayer(final String name){
try{
diff --git a/src/main/java/gtPlusPlus/core/util/reflect/ReflectionUtils.java b/src/main/java/gtPlusPlus/core/util/reflect/ReflectionUtils.java
index 12c765d049..a5e0bea0cb 100644
--- a/src/main/java/gtPlusPlus/core/util/reflect/ReflectionUtils.java
+++ b/src/main/java/gtPlusPlus/core/util/reflect/ReflectionUtils.java
@@ -379,6 +379,15 @@ public class ReflectionUtils {
return loaded > 0;
}
+
+ public static void loadClass(String aClassName) {
+ try {
+ Class.forName(aClassName, true, ReflectionUtils.class.getClassLoader());
+ }
+ catch (ClassNotFoundException e) {
+ e.printStackTrace();
+ }
+ }
@@ -1103,5 +1112,17 @@ public class ReflectionUtils {
return null;
}
+ public static Enum getEnum(Class<Enum> sgtbees, String name) {
+ if (sgtbees.isEnum()) {
+ Object[] aValues = sgtbees.getEnumConstants();
+ for (Object o : aValues) {
+ if (o.toString().toLowerCase().equals(name.toLowerCase())) {
+ return (Enum) o;
+ }
+ }
+ }
+ return null;
+ }
+
}