aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/gregtech/GT_Mod.java297
-rw-r--r--src/main/java/gregtech/api/GregTech_API.java17
-rw-r--r--src/main/java/gregtech/api/enums/Dyes.java2
-rw-r--r--src/main/java/gregtech/api/enums/Materials.java9
-rw-r--r--src/main/java/gregtech/api/enums/OrePrefixes.java2
-rw-r--r--src/main/java/gregtech/api/enums/TextureSet.java258
-rw-r--r--src/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntityItemPipe.java6
-rw-r--r--src/main/java/gregtech/api/items/GT_EnergyArmor_Item.java4
-rw-r--r--src/main/java/gregtech/api/items/GT_MetaBase_Item.java86
-rw-r--r--src/main/java/gregtech/api/items/GT_MetaGenerated_Item.java17
-rw-r--r--src/main/java/gregtech/api/items/GT_MetaGenerated_Tool.java11
-rw-r--r--src/main/java/gregtech/api/items/GT_Spray_Hardener_Item.java2
-rw-r--r--src/main/java/gregtech/api/metatileentity/BaseMetaPipeEntity.java196
-rw-r--r--src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java476
-rw-r--r--src/main/java/gregtech/api/metatileentity/BaseMetaTileEntityUE.java4
-rw-r--r--src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Fluid.java7
-rw-r--r--src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Item.java4
-rw-r--r--src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine_Bronze.java3
-rw-r--r--src/main/java/gregtech/api/objects/GT_ArrayList.java9
-rw-r--r--src/main/java/gregtech/api/objects/GT_CopiedBlockTexture.java2
-rw-r--r--src/main/java/gregtech/api/objects/GT_FluidStack.java26
-rw-r--r--src/main/java/gregtech/api/objects/GT_ItemStack.java6
-rw-r--r--src/main/java/gregtech/api/objects/ItemData.java10
-rw-r--r--src/main/java/gregtech/api/objects/XSTR.java255
-rw-r--r--src/main/java/gregtech/api/threads/GT_Runnable_MachineBlockUpdate.java4
-rw-r--r--src/main/java/gregtech/api/util/GT_BaseCrop.java2
-rw-r--r--src/main/java/gregtech/api/util/GT_ModHandler.java243
-rw-r--r--src/main/java/gregtech/api/util/GT_OreDictUnificator.java5
-rw-r--r--src/main/java/gregtech/api/util/GT_PlayedSound.java2
-rw-r--r--src/main/java/gregtech/api/util/GT_Recipe.java4
-rw-r--r--src/main/java/gregtech/api/util/GT_RecipeRegistrator.java63
-rw-r--r--src/main/java/gregtech/api/util/GT_Utility.java41
-rw-r--r--src/main/java/gregtech/api/world/GT_Worldgen.java4
-rw-r--r--src/main/java/gregtech/api/world/GT_Worldgen_Boulder.java56
-rw-r--r--src/main/java/gregtech/api/world/GT_Worldgen_Ore.java11
-rw-r--r--src/main/java/gregtech/api/world/GT_Worldgen_Ore_Normal.java55
-rw-r--r--src/main/java/gregtech/common/GT_Client.java10
-rw-r--r--src/main/java/gregtech/common/GT_MinableOreGenerator.java59
-rw-r--r--src/main/java/gregtech/common/GT_Proxy.java267
-rw-r--r--src/main/java/gregtech/common/GT_RecipeAdder.java4
-rw-r--r--src/main/java/gregtech/common/GT_ThaumcraftCompat.java43
-rw-r--r--src/main/java/gregtech/common/GT_Worldgen_GT_Ore_Layer.java38
-rw-r--r--src/main/java/gregtech/common/GT_Worldgen_GT_Ore_SmallPieces.java18
-rw-r--r--src/main/java/gregtech/common/GT_Worldgen_Stone.java57
-rw-r--r--src/main/java/gregtech/common/GT_Worldgenerator.java16
-rw-r--r--src/main/java/gregtech/common/blocks/GT_Block_Machines.java30
-rw-r--r--src/main/java/gregtech/common/blocks/GT_Block_Ores_Abstract.java88
-rw-r--r--src/main/java/gregtech/common/blocks/GT_Item_Machines.java16
-rw-r--r--src/main/java/gregtech/common/blocks/GT_TileEntity_Ores.java7
-rw-r--r--src/main/java/gregtech/common/entities/GT_Entity_Arrow.java2
-rw-r--r--src/main/java/gregtech/common/gui/GT_GUIContainer_Regulator.java18
-rw-r--r--src/main/java/gregtech/common/items/GT_IntegratedCircuit_Item.java60
-rw-r--r--src/main/java/gregtech/common/items/GT_MetaGenerated_Item_01.java141
-rw-r--r--src/main/java/gregtech/common/items/GT_MetaGenerated_Item_02.java164
-rw-r--r--src/main/java/gregtech/common/items/GT_SensorCard_Item.java4
-rw-r--r--src/main/java/gregtech/common/items/behaviors/Behaviour_DataOrb.java2
-rw-r--r--src/main/java/gregtech/common/items/behaviors/Behaviour_DataStick.java4
-rw-r--r--src/main/java/gregtech/common/items/behaviors/Behaviour_Plunger_Item.java4
-rw-r--r--src/main/java/gregtech/common/items/behaviors/Behaviour_Prospecting.java3
-rw-r--r--src/main/java/gregtech/common/items/behaviors/Behaviour_Scanner.java3
-rw-r--r--src/main/java/gregtech/common/items/behaviors/Behaviour_Wrench.java2
-rw-r--r--src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler.java3
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Pump.java2
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AssemblyLine.java110
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BronzeBlastFurnace.java3
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DistillationTower.java3
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ElectricBlastFurnace.java24
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer.java21
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ImplosionCompressor.java9
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Gas.java3
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Plasma.java3
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ProcessingArray.java15
-rw-r--r--src/main/java/gregtech/common/tools/GT_Tool_HardHammer.java2
-rw-r--r--src/main/java/gregtech/common/tools/GT_Tool_Screwdriver.java2
-rw-r--r--src/main/java/gregtech/common/tools/GT_Tool_Soldering_Iron.java2
-rw-r--r--src/main/java/gregtech/common/tools/GT_Tool_Wrench.java2
-rw-r--r--src/main/java/gregtech/loaders/load/GT_ItemIterator.java340
-rw-r--r--src/main/java/gregtech/loaders/misc/GT_Achievements.java22
-rw-r--r--src/main/java/gregtech/loaders/oreprocessing/ProcessingDust.java3
-rw-r--r--src/main/java/gregtech/loaders/oreprocessing/ProcessingGem.java39
-rw-r--r--src/main/java/gregtech/loaders/oreprocessing/ProcessingIngot1.java47
-rw-r--r--src/main/java/gregtech/loaders/postload/GT_CraftingRecipeLoader.java133
-rw-r--r--src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java408
-rw-r--r--src/main/java/gregtech/loaders/preload/GT_Loader_MetaTileEntities.java1215
84 files changed, 3114 insertions, 2556 deletions
diff --git a/src/main/java/gregtech/GT_Mod.java b/src/main/java/gregtech/GT_Mod.java
index c64460f911..bca9719839 100644
--- a/src/main/java/gregtech/GT_Mod.java
+++ b/src/main/java/gregtech/GT_Mod.java
@@ -13,6 +13,7 @@ import gregtech.api.enums.*;
import gregtech.api.interfaces.internal.IGT_Mod;
import gregtech.api.objects.ItemData;
import gregtech.api.objects.MaterialStack;
+import gregtech.api.objects.XSTR;
import gregtech.api.util.*;
import gregtech.common.GT_DummyWorld;
import gregtech.common.GT_Network;
@@ -56,14 +57,8 @@ import java.io.PrintStream;
import java.util.*;
import java.util.Map.Entry;
-//import forestry.factory.recipes.ISqueezerRecipe;
-//import forestry.factory.tiles.TileCentrifuge;
-//import forestry.factory.tiles.TileSqueezer;
-
-
@Mod(modid = "gregtech", name = "GregTech", version = "MC1710", useMetadata = false, dependencies = "required-after:IC2; after:Forestry; after:PFAAGeologica; after:Thaumcraft; after:Railcraft; after:appliedenergistics2; after:ThermalExpansion; after:TwilightForest; after:harvestcraft; after:magicalcrops; after:BuildCraft|Transport; after:BuildCraft|Silicon; after:BuildCraft|Factory; after:BuildCraft|Energy; after:BuildCraft|Core; after:BuildCraft|Builders; after:GalacticraftCore; after:GalacticraftMars; after:GalacticraftPlanets; after:ThermalExpansion|Transport; after:ThermalExpansion|Energy; after:ThermalExpansion|Factory; after:RedPowerCore; after:RedPowerBase; after:RedPowerMachine; after:RedPowerCompat; after:RedPowerWiring; after:RedPowerLogic; after:RedPowerLighting; after:RedPowerWorld; after:RedPowerControl; after:UndergroundBiomes;")
-public class GT_Mod
- implements IGT_Mod {
+public class GT_Mod implements IGT_Mod {
public static final int VERSION = 509;
public static final int REQUIRED_IC2 = 624;
@Mod.Instance("gregtech")
@@ -72,6 +67,8 @@ public class GT_Mod
public static GT_Proxy gregtechproxy;
public static int MAX_IC2 = 2147483647;
public static GT_Achievements achievements;
+ private final String aTextGeneral = "general";
+ private final String aTextIC2 = "ic2_";
static {
if ((509 != GregTech_API.VERSION) || (509 != GT_ModHandler.VERSION) || (509 != GT_OreDictUnificator.VERSION) || (509 != GT_Recipe.VERSION) || (509 != GT_Utility.VERSION) || (509 != GT_RecipeRegistrator.VERSION) || (509 != Element.VERSION) || (509 != Materials.VERSION) || (509 != OrePrefixes.VERSION)) {
@@ -106,13 +103,11 @@ public class GT_Mod
if (GregTech_API.sPreloadStarted) {
return;
}
- for (Runnable tRunnable : GregTech_API.sBeforeGTPreload) {
- try {
+ try {
+ for (Runnable tRunnable : GregTech_API.sBeforeGTPreload) {
tRunnable.run();
- } catch (Throwable e) {
- e.printStackTrace(GT_Log.err);
}
- }
+ } catch (Throwable e) {e.printStackTrace(GT_Log.err);}
File tFile = new File(new File(aEvent.getModConfigurationDirectory(), "GregTech"), "GregTech.cfg");
Configuration tMainConfig = new Configuration(tFile);
tMainConfig.load();
@@ -148,7 +143,7 @@ public class GT_Mod
} catch (Throwable e) {
}
}
- if (tMainConfig.get("general", "LoggingPlayerActivity", true).getBoolean(true)) {
+ if (tMainConfig.get(aTextGeneral, "LoggingPlayerActivity", true).getBoolean(true)) {
GT_Log.mPlayerActivityLogFile = new File(aEvent.getModConfigurationDirectory().getParentFile(), "logs/PlayerActivity.log");
if (!GT_Log.mPlayerActivityLogFile.exists()) {
try {
@@ -178,15 +173,15 @@ public class GT_Mod
gregtechproxy.onPreLoad();
GT_Log.out.println("GT_Mod: Setting Configs");
- GT_Values.D1 = tMainConfig.get("general", "Debug", false).getBoolean(false);
- GT_Values.D2 = tMainConfig.get("general", "Debug2", false).getBoolean(false);
+ GT_Values.D1 = tMainConfig.get(aTextGeneral, "Debug", false).getBoolean(false);
+ GT_Values.D2 = tMainConfig.get(aTextGeneral, "Debug2", false).getBoolean(false);
- GregTech_API.TICKS_FOR_LAG_AVERAGING = tMainConfig.get("general", "TicksForLagAveragingWithScanner", 25).getInt(25);
- GregTech_API.MILLISECOND_THRESHOLD_UNTIL_LAG_WARNING = tMainConfig.get("general", "MillisecondsPassedInGTTileEntityUntilLagWarning", 100).getInt(100);
- if (tMainConfig.get("general", "disable_STDOUT", false).getBoolean(false)) {
+ GregTech_API.TICKS_FOR_LAG_AVERAGING = tMainConfig.get(aTextGeneral, "TicksForLagAveragingWithScanner", 25).getInt(25);
+ GregTech_API.MILLISECOND_THRESHOLD_UNTIL_LAG_WARNING = tMainConfig.get(aTextGeneral, "MillisecondsPassedInGTTileEntityUntilLagWarning", 100).getInt(100);
+ if (tMainConfig.get(aTextGeneral, "disable_STDOUT", false).getBoolean(false)) {
System.out.close();
}
- if (tMainConfig.get("general", "disable_STDERR", false).getBoolean(false)) {
+ if (tMainConfig.get(aTextGeneral, "disable_STDERR", false).getBoolean(false)) {
System.err.close();
}
GregTech_API.sMachineExplosions = tMainConfig.get("machines", "machines_explosion_damage", true).getBoolean(false);
@@ -199,41 +194,43 @@ public class GT_Mod
GregTech_API.sConstantEnergy = tMainConfig.get("machines", "constant_need_of_energy", true).getBoolean(false);
GregTech_API.sColoredGUI = tMainConfig.get("machines", "colored_guis_when_painted", true).getBoolean(false);
- GregTech_API.sTimber = tMainConfig.get("general", "timber_axe", false).getBoolean(false);
- GregTech_API.sDrinksAlwaysDrinkable = tMainConfig.get("general", "drinks_always_drinkable", false).getBoolean(false);
- GregTech_API.sDoShowAllItemsInCreative = tMainConfig.get("general", "show_all_metaitems_in_creative_and_NEI", false).getBoolean(false);
- GregTech_API.sMultiThreadedSounds = tMainConfig.get("general", "sound_multi_threading", false).getBoolean(false);
+ GregTech_API.sTimber = tMainConfig.get(aTextGeneral, "timber_axe", false).getBoolean(false);
+ GregTech_API.sDrinksAlwaysDrinkable = tMainConfig.get(aTextGeneral, "drinks_always_drinkable", false).getBoolean(false);
+ GregTech_API.sDoShowAllItemsInCreative = tMainConfig.get(aTextGeneral, "show_all_metaitems_in_creative_and_NEI", false).getBoolean(false);
+ GregTech_API.sMultiThreadedSounds = tMainConfig.get(aTextGeneral, "sound_multi_threading", false).getBoolean(false);
+ String SBdye0 = "ColorModulation.";
for (Dyes tDye : Dyes.values()) {
if ((tDye != Dyes._NULL) && (tDye.mIndex < 0)) {
- tDye.mRGBa[0] = ((short) Math.min(255, Math.max(0, GregTech_API.sClientDataFile.get("ColorModulation." + tDye, "R", tDye.mRGBa[0]))));
- tDye.mRGBa[1] = ((short) Math.min(255, Math.max(0, GregTech_API.sClientDataFile.get("ColorModulation." + tDye, "G", tDye.mRGBa[1]))));
- tDye.mRGBa[2] = ((short) Math.min(255, Math.max(0, GregTech_API.sClientDataFile.get("ColorModulation." + tDye, "B", tDye.mRGBa[2]))));
- }
- }
- gregtechproxy.mMaxEqualEntitiesAtOneSpot = tMainConfig.get("general", "MaxEqualEntitiesAtOneSpot", 3).getInt(3);
- gregtechproxy.mSkeletonsShootGTArrows = tMainConfig.get("general", "SkeletonsShootGTArrows", 16).getInt(16);
- gregtechproxy.mFlintChance = tMainConfig.get("general", "FlintAndSteelChance", 30).getInt(30);
- gregtechproxy.mItemDespawnTime = tMainConfig.get("general", "ItemDespawnTime", 6000).getInt(6000);
- gregtechproxy.mDisableVanillaOres = tMainConfig.get("general", "DisableVanillaOres", true).getBoolean(true);
- gregtechproxy.mNerfDustCrafting = tMainConfig.get("general", "NerfDustCrafting", true).getBoolean(true);
- gregtechproxy.mIncreaseDungeonLoot = tMainConfig.get("general", "IncreaseDungeonLoot", true).getBoolean(true);
- gregtechproxy.mAxeWhenAdventure = tMainConfig.get("general", "AdventureModeStartingAxe", true).getBoolean(true);
- gregtechproxy.mHardcoreCables = tMainConfig.get("general", "HardCoreCableLoss", false).getBoolean(false);
- gregtechproxy.mSurvivalIntoAdventure = tMainConfig.get("general", "forceAdventureMode", false).getBoolean(false);
- gregtechproxy.mHungerEffect = tMainConfig.get("general", "AFK_Hunger", false).getBoolean(false);
- gregtechproxy.mHardRock = tMainConfig.get("general", "harderstone", false).getBoolean(false);
- gregtechproxy.mInventoryUnification = tMainConfig.get("general", "InventoryUnification", true).getBoolean(true);
- gregtechproxy.mGTBees = tMainConfig.get("general", "GTBees", true).getBoolean(true);
- gregtechproxy.mCraftingUnification = tMainConfig.get("general", "CraftingUnification", true).getBoolean(true);
- gregtechproxy.mNerfedWoodPlank = tMainConfig.get("general", "WoodNeedsSawForCrafting", true).getBoolean(true);
- gregtechproxy.mNerfedVanillaTools = tMainConfig.get("general", "smallerVanillaToolDurability", true).getBoolean(true);
- gregtechproxy.mSortToTheEnd = tMainConfig.get("general", "EnsureToBeLoadedLast", true).getBoolean(true);
- gregtechproxy.mDisableIC2Cables = tMainConfig.get("general", "DisableIC2Cables", true).getBoolean(true);
- gregtechproxy.mAchievements = tMainConfig.get("general", "EnableAchievements", true).getBoolean(true);
+ String SBdye1 = new StringBuilder(18).append(SBdye0).append(tDye).toString();
+ tDye.mRGBa[0] = ((short) Math.min(255, Math.max(0, GregTech_API.sClientDataFile.get(SBdye1, "R", tDye.mRGBa[0]))));
+ tDye.mRGBa[1] = ((short) Math.min(255, Math.max(0, GregTech_API.sClientDataFile.get(SBdye1, "G", tDye.mRGBa[1]))));
+ tDye.mRGBa[2] = ((short) Math.min(255, Math.max(0, GregTech_API.sClientDataFile.get(SBdye1, "B", tDye.mRGBa[2]))));
+ }
+ }
+ gregtechproxy.mMaxEqualEntitiesAtOneSpot = tMainConfig.get(aTextGeneral, "MaxEqualEntitiesAtOneSpot", 3).getInt(3);
+ gregtechproxy.mSkeletonsShootGTArrows = tMainConfig.get(aTextGeneral, "SkeletonsShootGTArrows", 16).getInt(16);
+ gregtechproxy.mFlintChance = tMainConfig.get(aTextGeneral, "FlintAndSteelChance", 30).getInt(30);