Browse Source

Normalize all files line-endings

OvermindDL1 3 years ago
parent
commit
88276162a8
100 changed files with 12934 additions and 12934 deletions
  1. 13
    13
      README.md
  2. 157
    157
      build.gradle
  3. 59
    59
      src/main/java/gregapi/API_ReadMe_And_Instructions.java
  4. 719
    719
      src/main/java/gregapi/GT_API.java
  5. 426
    426
      src/main/java/gregapi/GT_API_Post.java
  6. 1080
    1080
      src/main/java/gregapi/GT_API_Proxy.java
  7. 562
    562
      src/main/java/gregapi/GT_API_Proxy_Client.java
  8. 15
    15
      src/main/java/gregapi/GT_API_Proxy_Server.java
  9. 618
    618
      src/main/java/gregapi/NEI_RecipeMap.java
  10. 275
    275
      src/main/java/gregapi/api/Abstract_Mod.java
  11. 31
    31
      src/main/java/gregapi/api/Abstract_Proxy.java
  12. 212
    212
      src/main/java/gregapi/api/example/Example_Mod.java
  13. 12
    12
      src/main/java/gregapi/api/example/Example_Proxy_Client.java
  14. 12
    12
      src/main/java/gregapi/api/example/Example_Proxy_Server.java
  15. 116
    116
      src/main/java/gregapi/block/BlockBase.java
  16. 29
    29
      src/main/java/gregapi/block/BlockBaseMeta.java
  17. 18
    18
      src/main/java/gregapi/block/BlockBaseSealable.java
  18. 10
    10
      src/main/java/gregapi/block/IBlock.java
  19. 21
    21
      src/main/java/gregapi/block/IBlockBase.java
  20. 25
    25
      src/main/java/gregapi/block/IBlockDebugable.java
  21. 10
    10
      src/main/java/gregapi/block/IBlockDecolorable.java
  22. 9
    9
      src/main/java/gregapi/block/IBlockErrorable.java
  23. 10
    10
      src/main/java/gregapi/block/IBlockExtendedMetaData.java
  24. 22
    22
      src/main/java/gregapi/block/IBlockFoamable.java
  25. 16
    16
      src/main/java/gregapi/block/IBlockMaterial.java
  26. 10
    10
      src/main/java/gregapi/block/IBlockOnWalkOver.java
  27. 13
    13
      src/main/java/gregapi/block/IBlockPlacable.java
  28. 13
    13
      src/main/java/gregapi/block/IBlockRetrievable.java
  29. 64
    64
      src/main/java/gregapi/block/IBlockSyncData.java
  30. 14
    14
      src/main/java/gregapi/block/IBlockTileEntity.java
  31. 62
    62
      src/main/java/gregapi/block/IBlockToolable.java
  32. 8
    8
      src/main/java/gregapi/block/IPrefixBlock.java
  33. 60
    60
      src/main/java/gregapi/block/ItemBlockBase.java
  34. 20
    20
      src/main/java/gregapi/block/MaterialMachines.java
  35. 20
    20
      src/main/java/gregapi/block/MaterialScoopable.java
  36. 356
    356
      src/main/java/gregapi/block/ToolCompat.java
  37. 49
    49
      src/main/java/gregapi/block/behaviors/Drops.java
  38. 23
    23
      src/main/java/gregapi/block/behaviors/Drops_None.java
  39. 87
    87
      src/main/java/gregapi/block/behaviors/Drops_SmallOre.java
  40. 162
    162
      src/main/java/gregapi/block/fluid/BlockBaseFluid.java
  41. 32
    32
      src/main/java/gregapi/block/metatype/BlockBasePlanks.java
  42. 28
    28
      src/main/java/gregapi/block/metatype/BlockBasePlanksFlammable.java
  43. 57
    57
      src/main/java/gregapi/block/metatype/BlockColored.java
  44. 141
    141
      src/main/java/gregapi/block/metatype/BlockMetaType.java
  45. 448
    448
      src/main/java/gregapi/block/metatype/BlockStones.java
  46. 28
    28
      src/main/java/gregapi/block/metatype/BlockStonesWitherProof.java
  47. 89
    89
      src/main/java/gregapi/block/metatype/ItemBlockMetaType.java
  48. 39
    39
      src/main/java/gregapi/block/misc/BlockBaseBale.java
  49. 105
    105
      src/main/java/gregapi/block/misc/BlockBaseFlower.java
  50. 97
    97
      src/main/java/gregapi/block/misc/BlockBaseLilyPad.java
  51. 26
    26
      src/main/java/gregapi/block/misc/BlockBaseMachineUpdate.java
  52. 257
    257
      src/main/java/gregapi/block/misc/BlockBaseRail.java
  53. 267
    267
      src/main/java/gregapi/block/misc/BlockBaseSpike.java
  54. 321
    321
      src/main/java/gregapi/block/multitileentity/IMultiTileEntity.java
  55. 310
    310
      src/main/java/gregapi/block/multitileentity/MultiTileEntityBlock.java
  56. 80
    80
      src/main/java/gregapi/block/multitileentity/MultiTileEntityBlockInternal.java
  57. 33
    33
      src/main/java/gregapi/block/multitileentity/MultiTileEntityClassContainer.java
  58. 17
    17
      src/main/java/gregapi/block/multitileentity/MultiTileEntityContainer.java
  59. 565
    565
      src/main/java/gregapi/block/multitileentity/MultiTileEntityItemInternal.java
  60. 233
    233
      src/main/java/gregapi/block/multitileentity/MultiTileEntityRegistry.java
  61. 58
    58
      src/main/java/gregapi/block/multitileentity/example/MultiTileEntityBunkerBlock.java
  62. 319
    319
      src/main/java/gregapi/block/multitileentity/example/MultiTileEntityChest.java
  63. 491
    491
      src/main/java/gregapi/block/multitileentity/example/MultiTileEntityMiniPortal.java
  64. 123
    123
      src/main/java/gregapi/block/multitileentity/example/MultiTileEntityMiniPortalAether.java
  65. 123
    123
      src/main/java/gregapi/block/multitileentity/example/MultiTileEntityMiniPortalAtum.java
  66. 122
    122
      src/main/java/gregapi/block/multitileentity/example/MultiTileEntityMiniPortalBetweenlands.java
  67. 122
    122
      src/main/java/gregapi/block/multitileentity/example/MultiTileEntityMiniPortalDeepDark.java
  68. 120
    120
      src/main/java/gregapi/block/multitileentity/example/MultiTileEntityMiniPortalEnd.java
  69. 122
    122
      src/main/java/gregapi/block/multitileentity/example/MultiTileEntityMiniPortalEndOfTime.java
  70. 122
    122
      src/main/java/gregapi/block/multitileentity/example/MultiTileEntityMiniPortalErebus.java
  71. 124
    124
      src/main/java/gregapi/block/multitileentity/example/MultiTileEntityMiniPortalNether.java
  72. 123
    123
      src/main/java/gregapi/block/multitileentity/example/MultiTileEntityMiniPortalTwilight.java
  73. 667
    667
      src/main/java/gregapi/block/prefixblock/PrefixBlock.java
  74. 103
    103
      src/main/java/gregapi/block/prefixblock/PrefixBlockFallingEntity.java
  75. 143
    143
      src/main/java/gregapi/block/prefixblock/PrefixBlockItem.java
  76. 76
    76
      src/main/java/gregapi/block/prefixblock/PrefixBlockTileEntity.java
  77. 37
    37
      src/main/java/gregapi/block/prefixblock/PrefixBlock_.java
  78. 42
    42
      src/main/java/gregapi/block/tree/BlockBaseBeam.java
  79. 23
    23
      src/main/java/gregapi/block/tree/BlockBaseBeamFlammable.java
  80. 141
    141
      src/main/java/gregapi/block/tree/BlockBaseLeaves.java
  81. 39
    39
      src/main/java/gregapi/block/tree/BlockBaseLog.java
  82. 23
    23
      src/main/java/gregapi/block/tree/BlockBaseLogFlammable.java
  83. 129
    129
      src/main/java/gregapi/block/tree/BlockBaseSapling.java
  84. 32
    32
      src/main/java/gregapi/block/tree/BlockBaseTree.java
  85. 67
    67
      src/main/java/gregapi/code/ArrayListNoNulls.java
  86. 75
    75
      src/main/java/gregapi/code/HashSetNoNulls.java
  87. 120
    120
      src/main/java/gregapi/code/ICondition.java
  88. 32
    32
      src/main/java/gregapi/code/IItemContainer.java
  89. 84
    84
      src/main/java/gregapi/code/IMath.java
  90. 69
    69
      src/main/java/gregapi/code/ITagDataContainer.java
  91. 75
    75
      src/main/java/gregapi/code/ItemStackContainer.java
  92. 45
    45
      src/main/java/gregapi/code/ItemStackMap.java
  93. 92
    92
      src/main/java/gregapi/code/ItemStackSet.java
  94. 42
    42
      src/main/java/gregapi/code/ModData.java
  95. 30
    30
      src/main/java/gregapi/code/ObjectStack.java
  96. 97
    97
      src/main/java/gregapi/code/TagData.java
  97. 20
    20
      src/main/java/gregapi/compat/CompatBase.java
  98. 26
    26
      src/main/java/gregapi/compat/ICompat.java
  99. 25
    25
      src/main/java/gregapi/compat/buildcraft/CompatBC.java
  100. 0
    0
      src/main/java/gregapi/compat/buildcraft/ICompatBC.java

+ 13
- 13
README.md View File

@@ -1,13 +1,13 @@
1
-This is the Git Repository for GregTech-6
2
-
3
-# License
4
-
5
-This Mod is licensed under the GNU Lesser General Public License.
6
-
7
-# Support
8
-
9
-You can use the Issue Tracker, or you can just use the Forums. Since you should need a Forum Account to log into this anyways, I would recommend you to go for the Forums if you have an Issue.
10
-
11
-# Dev Environment Setup
12
-
13
-TODO: OvermindDL1 should replace this with proper instructions. ;)
1
+This is the Git Repository for GregTech-6
2
+
3
+# License
4
+
5
+This Mod is licensed under the GNU Lesser General Public License.
6
+
7
+# Support
8
+
9
+You can use the Issue Tracker, or you can just use the Forums. Since you should need a Forum Account to log into this anyways, I would recommend you to go for the Forums if you have an Issue.
10
+
11
+# Dev Environment Setup
12
+
13
+TODO: OvermindDL1 should replace this with proper instructions. ;)

+ 157
- 157
build.gradle View File

@@ -1,157 +1,157 @@
1
-buildscript {
2
-	repositories {
3
-		mavenCentral()
4
-		maven {
5
-			name = "forge"
6
-			url = "http://files.minecraftforge.net/maven"
7
-		}
8
-		maven {
9
-			name = "sonatype"
10
-			url = "https://oss.sonatype.org/content/repositories/snapshots/"
11
-		}
12
-	}
13
-	dependencies {
14
-		classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT'
15
-	}
16
-}
17
-
18
-apply plugin: 'eclipse'
19
-eclipse {
20
-	classpath {
21
-		downloadJavadoc = true
22
-		downloadSources = true
23
-	}
24
-}
25
-
26
-apply plugin: 'idea'
27
-idea{
28
-	module {
29
-		downloadJavadoc = true
30
-		downloadSources = true
31
-	}
32
-}
33
-
34
-repositories {
35
-	maven {
36
-		name = "gt"
37
-		url = "https://gregtech.overminddl1.com/"
38
-	}
39
-	maven {
40
-		name = "forge"
41
-		url = "https://files.minecraftforge.net/maven"
42
-	}
43
-}
44
-
45
-apply plugin: 'forge'
46
-
47
-sourceCompatibility = 1.7
48
-targetCompatibility = 1.7
49
-group= "com.gregoriust.gregtech"
50
-archivesBaseName = "gregtech_1.7.10"
51
-version = "6.09.00"
52
-
53
-minecraft {
54
-	version = "1.7.10-10.13.4.1492-1.7.10"
55
-	runDir = "assets"
56
-}
57
-
58
-dependencies {
59
-	compile fileTree(dir: 'lib', include: '*.jar')
60
-	compile fileTree(dir: 'libs', include: '*.jar')
61
-	compile "net.sengir.forestry:forestry_1.7.10:4.2.16.64:dev"
62
-	compile "com.mod-buildcraft:buildcraft:7.1.23:dev"
63
-	compile "com.azanor.baubles:Baubles:1.7.10-1.0.1.10:deobf"
64
-	compile "micdoodle8.mods:MicdoodleCore:1.7-3.0.12.504:Dev"
65
-	compile "micdoodle8.mods:GalacticraftCore:1.7-3.0.12.504:Dev"
66
-	compile "micdoodle8.mods:Galacticraft-Planets:1.7-3.0.12.504:Dev"
67
-	compile "codechicken:CodeChickenLib:1.7.10-1.1.3.140:dev"
68
-	compile "codechicken:CodeChickenCore:1.7.10-1.0.7.47:dev"
69
-	compile "codechicken:NotEnoughItems:1.7.10-1.0.5.120:dev"
70
-	compile "thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev"
71
-	compile "enviromine:EnviroMine:1.3.124:deobf"
72
-	compile "vazkii.botania:Botania:r1.8-250:deobf"
73
-	compile "mods.railcraft:Railcraft_1.7.10:9.12.3.0:dev"
74
-	compile "twilightforest:twilightforest:1.7.10-2.3.8dev:dev"
75
-	compile "appeng:appliedenergistics2:rv3-beta-6:dev"
76
-	compile "cofh:CoFHLib:1.7.10R3.0.3:dev"
77
-	compile "applecore:AppleCore:1.7.10-3.1.1:deobf"
78
-	compile "li.cil.oc:OpenComputers:MC1.7.10-1.7.2.1204:dev"
79
-	// This ComputerCraft thing is *SUCH* a hack, but ComputerCraft is... not right...
80
-	// This only works because of CodeChickenCore Magic being included up above...
81
-	compile "dan200.computercraft:ComputerCraft:1.75"
82
-	compile "org.teamrtg.RTG:RTG:1.7.10-1.1.1.7:dev"
83
-	compile "openblocks:OpenBlocks:1.7.10-1.6-1.7.10:deobf"
84
-}
85
-
86
-processResources {
87
-	from(sourceSets.main.resources.srcDirs) {
88
-		include 'mcmod.info'
89
-		include 'pack.mcmeta'
90
-		include 'LICENSE'
91
-		include 'COPYING'
92
-		include 'COPYING.LESSER'
93
-		expand 'version':project.version, 'mcversion':project.minecraft.version
94
-	}
95
-	from(sourceSets.main.resources.srcDirs) {
96
-		exclude 'mcmod.info'
97
-		exclude 'pack.mcmeta'
98
-		exclude 'LICENSE'
99
-		exclude 'COPYING'
100
-		exclude 'COPYING.LESSER'
101
-	}
102
-}
103
-
104
-task wrapper(type: Wrapper) {
105
-	gradleVersion = '2.13'
106
-}
107
-
108
-task sourceJar(type: Jar) {
109
-	manifest {}
110
-	classifier = 'sources'
111
-	from sourceSets.main.allSource
112
-	include 'gregapi/**'
113
-}
114
-
115
-task devJar(type: Jar) {
116
-	manifest {}
117
-	classifier = 'dev'
118
-	from sourceSets.main.output
119
-}
120
-
121
-task coreJar(type: Jar) {
122
-	dependsOn jar
123
-	manifest {}
124
-	classifier = 'core'
125
-	from sourceSets.main.output
126
-	exclude('gregtech/**')
127
-}
128
-
129
-reobf {
130
-	reobf(coreJar) {
131
-	spec -> spec.classpath = sourceSets.main.compileClasspath
132
-	}
133
-}
134
-
135
-artifacts {
136
-	archives devJar, sourceJar, coreJar
137
-}
138
-
139
-if (!hasProperty("mavenUsername")) {
140
-	ext.mavenUsername=""
141
-}
142
-if (!hasProperty("mavenPassword")) {
143
-	ext.mavenPassword=""
144
-}
145
-
146
-uploadArchives {
147
-	repositories {
148
-		mavenDeployer {
149
-			repository(url: "http://maven.gregtech.overminddl1.com/upload") {
150
-				authentication(userName: mavenUsername, password: mavenPassword)
151
-			}
152
-			pom*.whenConfigured {
153
-				pom -> pom.dependencies.clear()
154
-			}
155
-		}
156
-	}
157
-}
1
+buildscript {
2
+	repositories {
3
+		mavenCentral()
4
+		maven {
5
+			name = "forge"
6
+			url = "http://files.minecraftforge.net/maven"
7
+		}
8
+		maven {
9
+			name = "sonatype"
10
+			url = "https://oss.sonatype.org/content/repositories/snapshots/"
11
+		}
12
+	}
13
+	dependencies {
14
+		classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT'
15
+	}
16
+}
17
+
18
+apply plugin: 'eclipse'
19
+eclipse {
20
+	classpath {
21
+		downloadJavadoc = true
22
+		downloadSources = true
23
+	}
24
+}
25
+
26
+apply plugin: 'idea'
27
+idea{
28
+	module {
29
+		downloadJavadoc = true
30
+		downloadSources = true
31
+	}
32
+}
33
+
34
+repositories {
35
+	maven {
36
+		name = "gt"
37
+		url = "https://gregtech.overminddl1.com/"
38
+	}
39
+	maven {
40
+		name = "forge"
41
+		url = "https://files.minecraftforge.net/maven"
42
+	}
43
+}
44
+
45
+apply plugin: 'forge'
46
+
47
+sourceCompatibility = 1.7
48
+targetCompatibility = 1.7
49
+group= "com.gregoriust.gregtech"
50
+archivesBaseName = "gregtech_1.7.10"
51
+version = "6.09.00"
52
+
53
+minecraft {
54
+	version = "1.7.10-10.13.4.1492-1.7.10"
55
+	runDir = "assets"
56
+}
57
+
58
+dependencies {
59
+	compile fileTree(dir: 'lib', include: '*.jar')
60
+	compile fileTree(dir: 'libs', include: '*.jar')
61
+	compile "net.sengir.forestry:forestry_1.7.10:4.2.16.64:dev"
62
+	compile "com.mod-buildcraft:buildcraft:7.1.23:dev"
63
+	compile "com.azanor.baubles:Baubles:1.7.10-1.0.1.10:deobf"
64
+	compile "micdoodle8.mods:MicdoodleCore:1.7-3.0.12.504:Dev"
65
+	compile "micdoodle8.mods:GalacticraftCore:1.7-3.0.12.504:Dev"
66
+	compile "micdoodle8.mods:Galacticraft-Planets:1.7-3.0.12.504:Dev"
67
+	compile "codechicken:CodeChickenLib:1.7.10-1.1.3.140:dev"
68
+	compile "codechicken:CodeChickenCore:1.7.10-1.0.7.47:dev"
69
+	compile "codechicken:NotEnoughItems:1.7.10-1.0.5.120:dev"
70
+	compile "thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev"
71
+	compile "enviromine:EnviroMine:1.3.124:deobf"
72
+	compile "vazkii.botania:Botania:r1.8-250:deobf"
73
+	compile "mods.railcraft:Railcraft_1.7.10:9.12.3.0:dev"
74
+	compile "twilightforest:twilightforest:1.7.10-2.3.8dev:dev"
75
+	compile "appeng:appliedenergistics2:rv3-beta-6:dev"
76
+	compile "cofh:CoFHLib:1.7.10R3.0.3:dev"
77
+	compile "applecore:AppleCore:1.7.10-3.1.1:deobf"
78
+	compile "li.cil.oc:OpenComputers:MC1.7.10-1.7.2.1204:dev"
79
+	// This ComputerCraft thing is *SUCH* a hack, but ComputerCraft is... not right...
80
+	// This only works because of CodeChickenCore Magic being included up above...
81
+	compile "dan200.computercraft:ComputerCraft:1.75"
82
+	compile "org.teamrtg.RTG:RTG:1.7.10-1.1.1.7:dev"
83
+	compile "openblocks:OpenBlocks:1.7.10-1.6-1.7.10:deobf"
84
+}
85
+
86
+processResources {
87
+	from(sourceSets.main.resources.srcDirs) {
88
+		include 'mcmod.info'
89
+		include 'pack.mcmeta'
90
+		include 'LICENSE'
91
+		include 'COPYING'
92
+		include 'COPYING.LESSER'
93
+		expand 'version':project.version, 'mcversion':project.minecraft.version
94
+	}
95
+	from(sourceSets.main.resources.srcDirs) {
96
+		exclude 'mcmod.info'
97
+		exclude 'pack.mcmeta'
98
+		exclude 'LICENSE'
99
+		exclude 'COPYING'
100
+		exclude 'COPYING.LESSER'
101
+	}
102
+}
103
+
104
+task wrapper(type: Wrapper) {
105
+	gradleVersion = '2.13'
106
+}
107
+
108
+task sourceJar(type: Jar) {
109
+	manifest {}
110
+	classifier = 'sources'
111
+	from sourceSets.main.allSource
112
+	include 'gregapi/**'
113
+}
114
+
115
+task devJar(type: Jar) {
116
+	manifest {}
117
+	classifier = 'dev'
118
+	from sourceSets.main.output
119
+}
120
+
121
+task coreJar(type: Jar) {
122
+	dependsOn jar
123
+	manifest {}
124
+	classifier = 'core'
125
+	from sourceSets.main.output
126
+	exclude('gregtech/**')
127
+}
128
+
129
+reobf {
130
+	reobf(coreJar) {
131
+	spec -> spec.classpath = sourceSets.main.compileClasspath
132
+	}
133
+}
134
+
135
+artifacts {
136
+	archives devJar, sourceJar, coreJar
137
+}
138
+
139
+if (!hasProperty("mavenUsername")) {
140
+	ext.mavenUsername=""
141
+}
142
+if (!hasProperty("mavenPassword")) {
143
+	ext.mavenPassword=""
144
+}
145
+
146
+uploadArchives {
147
+	repositories {
148
+		mavenDeployer {
149
+			repository(url: "http://maven.gregtech.overminddl1.com/upload") {
150
+				authentication(userName: mavenUsername, password: mavenPassword)
151
+			}
152
+			pom*.whenConfigured {
153
+				pom -> pom.dependencies.clear()
154
+			}
155
+		}
156
+	}
157
+}

+ 59
- 59
src/main/java/gregapi/API_ReadMe_And_Instructions.java View File

@@ -1,60 +1,60 @@
1
-package gregapi;
2
-
3
-/**
4
- * @author Gregorius Techneticies
5
- * 
6
- * This Text is a little bit old, but I think most of it still fits.
7
- * 
8
- * ----------------------------------------------------------------
9
- * There are hooks to load after the 2 API Mods and GT itself.
10
- * They are in the form of Lists containing "Runnable" classes.
11
- * Those Lists are to be found in "gregapi.api.Abstract_Mod".
12
- * The Mod Objects themselves are in "gregapi.data.CS".
13
- * I have put them at the top of the Class so it's unoverseeable.
14
- * ----------------------------------------------------------------
15
- * If you want your Mod dependent on this API, then instead of
16
- * adding a dependency to GregTech add a dependency to this API
17
- * 
18
- * In order to do so just insert the following at your Loading
19
- * Order: "required-after:gregapi; required-before:gregapi_post"
20
- * 
21
- * This way you can access all the Features I have without needing
22
- * the Technology, Items, Blocks, Recipes or anything else of my
23
- * Mod to be there.
24
- * 
25
- * Instead you just need either the Core-API or GregTech itself to
26
- * be installed, so that your Mod works. Of course the Core-API
27
- * might be more desirable to some of your Users since it doesn't
28
- * do anything, unlike GregTech, which changes almost everything.
29
- * ================================================================
30
- * Now for some other Informations
31
- * ================================================================
32
- * if you have to choose an unlocalised Name or similar, then NEVER
33
- * use a Name which starts with "gt."! This is MY Name Prefix and
34
- * not yours. This happens way too often especially with people
35
- * decompiling my Code to find out how they have to use Stuff.
36
- * ----------------------------------------------------------------
37
- * You may have noticed, that I try to avoid the usage of the Data
38
- * Types "Double" and "Float". This is because they fail after they
39
- * reach a few Digits too much. They cannot even display Integers
40
- * properly, resulting in imprecise Values and worse.
41
- * 
42
- * That is why I made the Parameters as Integer or Long for most
43
- * of the Functionality.
44
- * 
45
- * Trust me, there were already enough Problems due to Floats and
46
- * Doubles. They may look nice and are easy to use, but they are
47
- * the Devil. And I mean the Canadian Devil, not the regular one.
48
- * ----------------------------------------------------------------
49
- * Most of the Constants are found inside the data package.
50
- * ----------------------------------------------------------------
51
- * To use the NetworkHandler, just create an instance of it and
52
- * insert a Dummy for every single Packet you want to send/receive.
53
- * The implementation of IPacket is completely left to you.
54
- * 
55
- * If you need more than 256 different IPackets, consider making a
56
- * second NetworkHandler with a different Channel-ID.
57
- * 
58
- * The API does offer a few Packets for certain Sync stuff.
59
- * ----------------------------------------------------------------
1
+package gregapi;
2
+
3
+/**
4
+ * @author Gregorius Techneticies
5
+ * 
6
+ * This Text is a little bit old, but I think most of it still fits.
7
+ * 
8
+ * ----------------------------------------------------------------
9
+ * There are hooks to load after the 2 API Mods and GT itself.
10
+ * They are in the form of Lists containing "Runnable" classes.
11
+ * Those Lists are to be found in "gregapi.api.Abstract_Mod".
12
+ * The Mod Objects themselves are in "gregapi.data.CS".
13
+ * I have put them at the top of the Class so it's unoverseeable.
14
+ * ----------------------------------------------------------------
15
+ * If you want your Mod dependent on this API, then instead of
16
+ * adding a dependency to GregTech add a dependency to this API
17
+ * 
18
+ * In order to do so just insert the following at your Loading
19
+ * Order: "required-after:gregapi; required-before:gregapi_post"
20
+ * 
21
+ * This way you can access all the Features I have without needing
22
+ * the Technology, Items, Blocks, Recipes or anything else of my
23
+ * Mod to be there.
24
+ * 
25
+ * Instead you just need either the Core-API or GregTech itself to
26
+ * be installed, so that your Mod works. Of course the Core-API
27
+ * might be more desirable to some of your Users since it doesn't
28
+ * do anything, unlike GregTech, which changes almost everything.
29
+ * ================================================================
30
+ * Now for some other Informations
31
+ * ================================================================
32
+ * if you have to choose an unlocalised Name or similar, then NEVER
33
+ * use a Name which starts with "gt."! This is MY Name Prefix and
34
+ * not yours. This happens way too often especially with people
35
+ * decompiling my Code to find out how they have to use Stuff.
36
+ * ----------------------------------------------------------------
37
+ * You may have noticed, that I try to avoid the usage of the Data
38
+ * Types "Double" and "Float". This is because they fail after they
39
+ * reach a few Digits too much. They cannot even display Integers
40
+ * properly, resulting in imprecise Values and worse.
41
+ * 
42
+ * That is why I made the Parameters as Integer or Long for most
43
+ * of the Functionality.
44
+ * 
45
+ * Trust me, there were already enough Problems due to Floats and
46
+ * Doubles. They may look nice and are easy to use, but they are
47
+ * the Devil. And I mean the Canadian Devil, not the regular one.
48
+ * ----------------------------------------------------------------
49
+ * Most of the Constants are found inside the data package.
50
+ * ----------------------------------------------------------------
51
+ * To use the NetworkHandler, just create an instance of it and
52
+ * insert a Dummy for every single Packet you want to send/receive.
53
+ * The implementation of IPacket is completely left to you.
54
+ * 
55
+ * If you need more than 256 different IPackets, consider making a
56
+ * second NetworkHandler with a different Channel-ID.
57
+ * 
58
+ * The API does offer a few Packets for certain Sync stuff.
59
+ * ----------------------------------------------------------------
60 60
  */

+ 719
- 719
src/main/java/gregapi/GT_API.java
File diff suppressed because it is too large
View File


+ 426
- 426
src/main/java/gregapi/GT_API_Post.java View File

@@ -1,427 +1,427 @@
1
-package gregapi;
2
-
3
-import static gregapi.data.CS.*;
4
-
5
-import java.util.ArrayList;
6
-import java.util.List;
7
-
8
-import cpw.mods.fml.common.LoadController;
9
-import cpw.mods.fml.common.Loader;
10
-import cpw.mods.fml.common.Mod;
11
-import cpw.mods.fml.common.ModContainer;
12
-import cpw.mods.fml.common.event.FMLInitializationEvent;
13
-import cpw.mods.fml.common.event.FMLPostInitializationEvent;
14
-import cpw.mods.fml.common.event.FMLPreInitializationEvent;
15
-import cpw.mods.fml.common.event.FMLServerStartedEvent;
16
-import cpw.mods.fml.common.event.FMLServerStartingEvent;
17
-import cpw.mods.fml.common.event.FMLServerStoppedEvent;
18
-import cpw.mods.fml.common.event.FMLServerStoppingEvent;
19
-import gregapi.api.Abstract_Mod;
20
-import gregapi.api.Abstract_Proxy;
21
-import gregapi.data.ANY;
22
-import gregapi.data.CS.BlocksGT;
23
-import gregapi.data.CS.ModIDs;
24
-import gregapi.data.IL;
25
-import gregapi.data.MD;
26
-import gregapi.data.MT;
27
-import gregapi.data.OD;
28
-import gregapi.data.OP;
29
-import gregapi.data.TD;
30
-import gregapi.load.LoaderBookList;
31
-import gregapi.load.LoaderItemData;
32
-import gregapi.load.LoaderItemList;
33
-import gregapi.load.LoaderUnificationTargets;
34
-import gregapi.load.LoaderWoodDictionary;
35
-import gregapi.oredict.OreDictItemData;
36
-import gregapi.oredict.OreDictManager;
37
-import gregapi.oredict.OreDictMaterial;
38
-import gregapi.util.OM;
39
-import gregapi.util.ST;
40
-import gregapi.util.UT;
41
-import net.minecraft.enchantment.Enchantment;
42
-import net.minecraft.item.Item;
43
-
44
-/**
45
- * @author Gregorius Techneticies
46
- * 
47
- * This loads after the compatible Mods. The regular API loads before all compatible Mods.
48
- */
49
-@Mod(modid=ModIDs.GAPI_POST, name="Greg-API-Post", version="GT6-MC1710", dependencies="required-after:"+ModIDs.GAPI+"; after:"+ModIDs.MD8+"; after:"+ModIDs.IC2+"; after:"+ModIDs.IC2C+"; after:"+ModIDs.NC+"; after:"+ModIDs.IHL+"; after:"+ModIDs.FMB+"; after:"+ModIDs.BAUBLES+"; after:"+ModIDs.GaSu+"; after:"+ModIDs.GaNe+"; after:"+ModIDs.GaEn+"; after:"+ModIDs.WdSt+"; after:"+ModIDs.CrGu+"; after:"+ModIDs.COFH_API+"; after:"+ModIDs.COFH_API_ENERGY+"; after:"+ModIDs.CC+"; after:"+ModIDs.OC+"; after:"+ModIDs.DE+"; after:"+ModIDs.FR+"; after:"+ModIDs.FRMB+"; after:"+ModIDs.BINNIE+"; after:"+ModIDs.BINNIE_BEE+"; after:"+ModIDs.BINNIE_TREE+"; after:"+ModIDs.BINNIE_GENETICS+"; after:"+ModIDs.BINNIE_BOTANY+"; after:"+ModIDs.IE+"; after:"+ModIDs.UB+"; after:"+ModIDs.COG+"; after:"+ModIDs.PFAA+"; after:"+ModIDs.ARS+"; after:"+ModIDs.TC+"; after:"+ModIDs.TCFM+"; after:"+ModIDs.BOTA+"; after:"+ModIDs.WTCH+"; after:"+ModIDs.HOWL+"; after:"+ModIDs.MoCr+"; after:"+ModIDs.GoG+"; after:"+ModIDs.LycM+"; after:"+ModIDs.LycM_Arctic+"; after:"+ModIDs.LycM_Demon+"; after:"+ModIDs.LycM_Desert+"; after:"+ModIDs.LycM_Forest+"; after:"+ModIDs.LycM_Fresh+"; after:"+ModIDs.LycM_Inferno+"; after:"+ModIDs.LycM_Jungle+"; after:"+ModIDs.LycM_Mountain+"; after:"+ModIDs.LycM_Plains+"; after:"+ModIDs.LycM_Salt+"; after:"+ModIDs.LycM_Shadow+"; after:"+ModIDs.LycM_Swamp+"; after:"+ModIDs.RC+"; after:"+ModIDs.BP+"; after:"+ModIDs.PR+"; after:"+ModIDs.PR_EXPANSION+"; after:"+ModIDs.PR_INTEGRATION+"; after:"+ModIDs.PR_TRANSMISSION+"; after:"+ModIDs.PR_TRANSPORT+"; after:"+ModIDs.PE+"; after:"+ModIDs.AE+"; after:"+ModIDs.MO+"; after:"+ModIDs.TE_FOUNDATION+"; after:"+ModIDs.TE_DYNAMICS+"; after:"+ModIDs.TE+"; after:"+ModIDs.ZTONES+"; after:"+ModIDs.CHSL+"; after:"+ModIDs.EtFu+"; after:"+ModIDs.BbLC+"; after:"+ModIDs.CARP+"; after:"+ModIDs.BETTER_RECORDS+"; after:"+ModIDs.TF+"; after:"+ModIDs.ERE+"; after:"+ModIDs.MFR+"; after:"+ModIDs.PnC+"; after:"+ModIDs.ExU+"; after:"+ModIDs.ExS+"; after:"+ModIDs.EIO+"; after:"+ModIDs.RT+"; after:"+ModIDs.AA+"; after:"+ModIDs.HaC+"; after:"+ModIDs.CookBook+"; after:"+ModIDs.APC+"; after:"+ModIDs.ENVM+"; after:"+ModIDs.MaCr+"; after:"+ModIDs.BC_TRANSPORT+"; after:"+ModIDs.BC_SILICON+"; after:"+ModIDs.BC_FACTORY+"; after:"+ModIDs.BC_ENERGY+"; after:"+ModIDs.BC_ROBOTICS+"; after:"+ModIDs.BC+"; after:"+ModIDs.BC_BUILDERS+"; after:"+ModIDs.MgC+"; after:"+ModIDs.BR+"; after:"+ModIDs.HBM+"; after:"+ModIDs.DRGN+"; after:"+ModIDs.ElC+"; after:"+ModIDs.CrC+"; after:"+ModIDs.ReC+"; after:"+ModIDs.RoC+"; after:"+ModIDs.Mek+"; after:"+ModIDs.Mek_Tools+"; after:"+ModIDs.Mek_Generators+"; after:"+ModIDs.GC+"; after:"+ModIDs.GC_PLANETS+"; after:"+ModIDs.GC_GALAXYSPACE+"; after:"+ModIDs.VULPES+"; after:"+ModIDs.GC_ADV_ROCKETRY+"; after:"+ModIDs.BTL+"; after:"+ModIDs.AETHER+"; after:"+ModIDs.ATUM+"; after:"+ModIDs.EBXL+"; after:"+ModIDs.BoP+"; after:"+ModIDs.HiL+"; after:"+ModIDs.ATG+"; after:"+ModIDs.RTG+"; after:"+ModIDs.RWG+"; after:"+ModIDs.MYST+"; after:"+ModIDs.WARPBOOK+"; after:"+ModIDs.LOSTBOOKS+"; after:"+ModIDs.EUREKA+"; after:"+ModIDs.ENCHIRIDION+"; after:"+ModIDs.ENCHIRIDION2+"; after:"+ModIDs.SmAc+"; after:"+ModIDs.HQM+"; after:"+ModIDs.JABBA+"; after:"+ModIDs.MaCu+"; after:"+ModIDs.PdC+"; after:"+ModIDs.Bamboo+"; after:"+ModIDs.GrC+"; after:"+ModIDs.GrC_Apples+"; after:"+ModIDs.GrC_Bamboo+"; after:"+ModIDs.GrC_Bees+"; after:"+ModIDs.GrC_Cellar+"; after:"+ModIDs.GrC_Fish+"; after:"+ModIDs.GrC_Grapes+"; after:"+ModIDs.GrC_Hops+"; after:"+ModIDs.GrC_Milk+"; after:"+ModIDs.GrC_Rice+"; after:"+ModIDs.BWM+"; after:"+ModIDs.OMT+"; after:"+ModIDs.TG+"; after:"+ModIDs.FM+"; after:"+ModIDs.FZ+"; after:"+ModIDs.MNTL+"; after:"+ModIDs.OB+"; after:"+ModIDs.TiC+"; after:"+ModIDs.WR_CBE_C+"; after:"+ModIDs.WR_CBE_A+"; after:"+ModIDs.WR_CBE_L+"; after:inventorytweaks; after:ironbackpacks; after:journeymap; after:LogisticsPipes; after:LunatriusCore; after:NEIAddons; after:NEIAddons|Developer; after:NEIAddons|AppEng; after:NEIAddons|Botany; after:NEIAddons|Forestry; after:NEIAddons|CraftingTables; after:NEIAddons|ExNihilo; after:neiintegration; after:openglasses; after:simplyjetpacks; after:Stackie; after:StevesCarts; after:TiCTooltips; after:worldedit; after:McMultipart")
50
-public class GT_API_Post extends Abstract_Mod {
51
-	public GT_API_Post() {GAPI_POST = this;}
52
-	
53
-	@Override public String getModID() {return MD.GAPI_POST.mID;}
54
-	@Override public String getModName() {return MD.GAPI_POST.mName;}
55
-	@Override public String getModNameForLog() {return "GT_API_POST";}
56
-	@Override public Abstract_Proxy getProxy() {return null;}
57
-	
58
-	@Mod.EventHandler public final void onPreLoad			(FMLPreInitializationEvent	aEvent) {onModPreInit(aEvent);}
59
-	@Mod.EventHandler public final void onLoad				(FMLInitializationEvent		aEvent) {onModInit(aEvent);}
60
-	@Mod.EventHandler public final void onPostLoad			(FMLPostInitializationEvent	aEvent) {onModPostInit(aEvent);}
61
-	@Mod.EventHandler public final void onServerStarting	(FMLServerStartingEvent		aEvent) {onModServerStarting(aEvent);}
62
-	@Mod.EventHandler public final void onServerStarted		(FMLServerStartedEvent		aEvent) {onModServerStarted(aEvent);}
63
-	@Mod.EventHandler public final void onServerStopping	(FMLServerStoppingEvent		aEvent) {onModServerStopping(aEvent);}
64
-	@Mod.EventHandler public final void onServerStopped		(FMLServerStoppedEvent		aEvent) {onModServerStopped(aEvent);}
65
-	
66
-	@Override
67
-	public void onModPreInit2(FMLPreInitializationEvent aEvent) {
68
-		try {
69
-			OUT.println(getModNameForLog() + ": Sorting Greg-API-Post to the end of the Mod List for further processing.");
70
-			LoadController tLoadController = ((LoadController)UT.Reflection.getFieldContent(Loader.instance(), "modController", T, T));
71
-			List<ModContainer> tModList = tLoadController.getActiveModList(), tNewModsList = new ArrayList(tModList.size());
72
-			ModContainer tGregTech = null;
73
-			for (short i = 0; i < tModList.size(); i++) {
74
-				ModContainer tMod = tModList.get(i);
75
-				if (tMod.getModId().equalsIgnoreCase(MD.GAPI_POST.mID)) tGregTech = tMod; else tNewModsList.add(tMod);
76
-			}
77
-			if (tGregTech != null) tNewModsList.add(tGregTech);
78
-			UT.Reflection.getField(tLoadController, "activeModList", T, T).set(tLoadController, tNewModsList);
79
-		} catch(Throwable e) {
80
-			if (D1) e.printStackTrace(ERR);
81
-		}
82
-		
83
-		// Fixing Items of certain Mods.
84
-		for (Item tItem : new Item[] {
85
-		  ST.item(MD.GrC_Grapes, "grc.grapes")
86
-		, ST.item(MD.FR, "letters")
87
-		, ST.item(MD.FZ, "acid")
88
-		}) if (tItem != null) tItem.setMaxDamage(0).setHasSubtypes(T);
89
-		
90
-		new LoaderItemList().run();
91
-		new LoaderItemData().run();
92
-		new LoaderUnificationTargets().run();
93
-		
94
-		if (MD.MET.mLoaded) {
95
-			MT.OREMATS.Bauxite		.addOreByProducts(MT.Alduorite		);
96
-			MT.OREMATS.Chalcopyrite	.addOreByProducts(MT.Infuscolium	);
97
-			MT.OREMATS.Scheelite	.addOreByProducts(MT.Rubracium		);
98
-			MT.OREMATS.Pentlandite	.addOreByProducts(MT.Meutoite		);
99
-			MT.OREMATS.Magnesite	.addOreByProducts(MT.Lemurite		);
100
-			MT.OREMATS.Stibnite		.addOreByProducts(MT.Ceruclase		);
101
-			MT.TiO2					.addOreByProducts(MT.Atlarus		);
102
-			MT.OREMATS.Garnierite	.addOreByProducts(MT.Oureclase		);
103
-			MT.OREMATS.Cooperite	.addOreByProducts(MT.Kalendrite		);
104
-			MT.OREMATS.Ilmenite		.addOreByProducts(MT.Orichalcum		);
105
-			MT.OREMATS.Sphalerite	.addOreByProducts(MT.Carmot			);
106
-			MT.OREMATS.Cinnabar		.addOreByProducts(MT.Sanguinite		);
107
-			MT.OREMATS.Malachite	.addOreByProducts(MT.Vyroxeres		);
108
-			MT.MnO2					.addOreByProducts(MT.Eximite		);
109
-			MT.OREMATS.Cobaltite	.addOreByProducts(MT.Prometheum		);
110
-			MT.OREMATS.Cassiterite	.addOreByProducts(MT.Ignatius		);
111
-			MT.OREMATS.Wolframite	.addOreByProducts(MT.Vulcanite		);
112
-			MT.Fe2O3				.addOreByProducts(MT.DeepIron		);
113
-			MT.OREMATS.Magnetite	.addOreByProducts(MT.ShadowIron		);
114
-		}
115
-		if (MD.Mek.mLoaded) {
116
-			MT.OREMATS.Galena.addOreByProducts(MT.FakeOsmium);
117
-			MT.OREMATS.Magnetite.addOreByProducts(MT.FakeOsmium);
118
-			MT.OREMATS.Ferrovanadium.addOreByProducts(MT.FakeOsmium);
119
-			MT.OREMATS.BasalticMineralSand.addOreByProducts(MT.FakeOsmium);
120
-			MT.OREMATS.GraniticMineralSand.addOreByProducts(MT.FakeOsmium);
121
-		}
122
-		if (MD.TiC.mLoaded) {
123
-			MT.Co.addOreByProducts(MT.Ardite);
124
-		}
125
-		if (MD.BR.mLoaded) {
126
-			MT.Th.addOreByProducts(MT.Cyanite);
127
-			MT.Monazite.addOreByProducts(MT.Cyanite);
128
-			MT.Forcicium.addOreByProducts(MT.Cyanite);
129
-			MT.Forcillium.addOreByProducts(MT.Cyanite);
130
-			MT.OREMATS.Pitchblende.addOreByProducts(MT.Yellorium);
131
-			MT.OREMATS.Uraninite.addOreByProducts(MT.Yellorium);
132
-			MT.U_238.addOreByProducts(MT.Yellorium);
133
-			MT.Pu.addOreByProducts(MT.Blutonium);
134
-			MT.Am.addOreByProducts(MT.Blutonium);
135
-		}
136
-		if (MD.AE.mLoaded) {
137
-			OP.gem  .disableItemGeneration(MT.CertusQuartz, MT.Fluix);
138
-			OP.dust .disableItemGeneration(MT.CertusQuartz, MT.Fluix);
139
-		}
140
-		if (MD.AA.mLoaded) {
141
-			MT.OREMATS.Barite.addOreByProducts(MT.BlackQuartz);
142
-		}
143
-		
144
-	}
145
-	
146
-	@Override
147
-	public void onModInit2(FMLInitializationEvent aEvent) {
148
-		new LoaderWoodDictionary().run();
149
-		
150
-		// Atum violates the "Items have to be created in preInit" Rule...
151
-		if (MD.ATUM.mLoaded) {
152
-			IL.ATUM_Scarab		.set(ST.make(MD.ATUM, "item.scarab"	, 1, 0), new OreDictItemData(MT.Au, 4*U, MT.Diamond, U));
153
-			IL.ATUM_Limestone	.set(ST.make(MD.ATUM, "tile.stone"	, 1, 0), OP.stone.dat(MT.Limestone));
154
-			IL.ATUM_Limecobble	.set(ST.make(MD.ATUM, "tile.cobble"	, 1, 0), OP.stone.dat(MT.Limestone));
155
-			
156
-			OM.reg("cropDate"				, ST.make(MD.ATUM, "item.date", 1, 0));
157
-			OM.reg("cropFlax"				, ST.make(MD.ATUM, "item.flax", 1, 0));
158
-			OM.reg("seedFlax"				, ST.make(MD.ATUM, "item.flaxSeeds", 1, 0));
159
-	    	OM.reg("itemPelt"				, ST.make(MD.ATUM, "item.wolfPelt", 1, 0));
160
-			OM.reg(OP.dust, MT.Ectoplasm	, ST.make(MD.ATUM, "item.ectoplasm", 1, 0));
161
-			OreDictManager.INSTANCE.setItemData_(ST.make(MD.ATUM, "tile.ironOre"		, 1, 0), OP.oreLimestone.dat(MT.Fe			));
162
-			OreDictManager.INSTANCE.setItemData_(ST.make(MD.ATUM, "tile.goldOre"		, 1, 0), OP.oreLimestone.dat(MT.Au			));
163
-			OreDictManager.INSTANCE.setItemData_(ST.make(MD.ATUM, "tile.redstoneOre"	, 1, 0), OP.oreLimestone.dat(MT.Redstone	));
164
-			OreDictManager.INSTANCE.setItemData_(ST.make(MD.ATUM, "tile.lapisOre"		, 1, 0), OP.oreLimestone.dat(MT.Lapis		));
165
-			OreDictManager.INSTANCE.setItemData_(ST.make(MD.ATUM, "tile.coalOre"		, 1, 0), OP.oreLimestone.dat(MT.Coal		));
166
-			OreDictManager.INSTANCE.setItemData_(ST.make(MD.ATUM, "tile.diamondOre"		, 1, 0), OP.oreLimestone.dat(MT.Diamond		));
167
-			
168
-			OM.data(MD.ATUM, "item.stoneChunk", 1, 0, MT.Limestone, U);
169
-			OM.data(MD.ATUM, "tile.sand", 1, W, MT.Sand, U);
170
-			OM.data(MD.ATUM, "tile.framedGlass", 1, W, MT.Glass, U);
171
-			OM.data(MD.ATUM, "tile.crystalGlass", 1, W, MT.Glass, U);
172
-			OM.data(MD.ATUM, "tile.framedStainedGlass", 1, W, MT.Glass, U);
173
-			OM.data(MD.ATUM, "tile.crystalStainedGlass", 1, W, MT.Glass, U);
174
-			OM.data(MD.ATUM, "tile.thinFramedGlass", 1, W, MT.Glass, 3*U8);
175
-			OM.data(MD.ATUM, "tile.thinCrystalGlass", 1, W, MT.Glass, 3*U8);
176
-			OM.data(MD.ATUM, "tile.thinFramedStainedGlass", 1, W, MT.Glass, 3*U8);
177
-			OM.data(MD.ATUM, "tile.thinCrystalStainedGlass", 1, W, MT.Glass, 3*U8);
178
-			
179
-			OM.data(MD.ATUM, "item.loot", 1,  2, MT.Ag	, 2*U);
180
-			OM.data(MD.ATUM, "item.loot", 1,  3, MT.Ag	, 2*U);
181
-			OM.data(MD.ATUM, "item.loot", 1,  4, MT.Au	, 2*U);
182
-			OM.data(MD.ATUM, "item.loot", 1,  5, MT.Au	, 2*U);
183
-			OM.data(MD.ATUM, "item.loot", 1,  6, MT.Au	, 2*U, MT.BlueSapphire	, 2*U);
184
-			OM.data(MD.ATUM, "item.loot", 1,  7, MT.Au	, 2*U, MT.BlueSapphire	, 2*U);
185
-			OM.data(MD.ATUM, "item.loot", 1,  8, MT.Au	, 2*U, MT.Ruby			, 2*U);
186
-			OM.data(MD.ATUM, "item.loot", 1,  9, MT.Au	, 2*U, MT.Ruby			, 2*U);
187
-			OM.data(MD.ATUM, "item.loot", 1, 10, MT.Au	, 2*U, MT.Emerald		, 2*U);
188
-			OM.data(MD.ATUM, "item.loot", 1, 11, MT.Au	, 2*U, MT.Emerald		, 2*U);
189
-			OM.data(MD.ATUM, "item.loot", 1, 12, MT.Au	, 2*U, MT.Diamond		, 2*U);
190
-			OM.data(MD.ATUM, "item.loot", 1, 13, MT.Au	, 2*U, MT.Diamond		, 2*U);
191
-			OM.data(MD.ATUM, "item.loot", 1, 34, MT.Ag	,   U);
192
-			OM.data(MD.ATUM, "item.loot", 1, 35, MT.Ag	,   U);
193
-			OM.data(MD.ATUM, "item.loot", 1, 36, MT.Au	,   U);
194
-			OM.data(MD.ATUM, "item.loot", 1, 37, MT.Au	,   U);
195
-			OM.data(MD.ATUM, "item.loot", 1, 38, MT.Au	,   U, MT.BlueSapphire	,   U);
196
-			OM.data(MD.ATUM, "item.loot", 1, 39, MT.Au	,   U, MT.BlueSapphire	,   U);
197
-			OM.data(MD.ATUM, "item.loot", 1, 40, MT.Au	,   U, MT.Ruby			,   U);
198
-			OM.data(MD.ATUM, "item.loot", 1, 41, MT.Au	,   U, MT.Ruby			,   U);
199
-			OM.data(MD.ATUM, "item.loot", 1, 42, MT.Au	,   U, MT.Emerald		,   U);
200
-			OM.data(MD.ATUM, "item.loot", 1, 43, MT.Au	,   U, MT.Emerald		,   U);
201
-			OM.data(MD.ATUM, "item.loot", 1, 44, MT.Au	,   U, MT.Diamond		,   U);
202
-			OM.data(MD.ATUM, "item.loot", 1, 45, MT.Au	,   U, MT.Diamond		,   U);
203
-			OM.data(MD.ATUM, "item.loot", 1, 66, MT.Ag	,   U);
204
-			OM.data(MD.ATUM, "item.loot", 1, 67, MT.Ag	,   U);
205
-			OM.data(MD.ATUM, "item.loot", 1, 68, MT.Au	,   U);
206
-			OM.data(MD.ATUM, "item.loot", 1, 69, MT.Au	,   U);
207
-			OM.data(MD.ATUM, "item.loot", 1, 70, MT.Au	,   U, MT.BlueSapphire	,   U);
208
-			OM.data(MD.ATUM, "item.loot", 1, 71, MT.Au	,   U, MT.BlueSapphire	,   U);
209
-			OM.data(MD.ATUM, "item.loot", 1, 72, MT.Au	,   U, MT.Ruby			,   U);
210
-			OM.data(MD.ATUM, "item.loot", 1, 73, MT.Au	,   U, MT.Ruby			,   U);
211
-			OM.data(MD.ATUM, "item.loot", 1, 74, MT.Au	,   U, MT.Emerald		,   U);
212
-			OM.data(MD.ATUM, "item.loot", 1, 75, MT.Au	,   U, MT.Emerald		,   U);
213
-			OM.data(MD.ATUM, "item.loot", 1, 76, MT.Au	,   U, MT.Diamond		,   U);
214
-			OM.data(MD.ATUM, "item.loot", 1, 77, MT.Au	,   U, MT.Diamond		,   U);
215
-			OM.data(MD.ATUM, "item.loot", 1, 98, MT.Ag	,   U);
216
-			OM.data(MD.ATUM, "item.loot", 1, 99, MT.Ag	,   U);
217
-			OM.data(MD.ATUM, "item.loot", 1,100, MT.Au	,   U);
218
-			OM.data(MD.ATUM, "item.loot", 1,101, MT.Au	,   U);
219
-			OM.data(MD.ATUM, "item.loot", 1,102, MT.Au	,   U, MT.BlueSapphire	,   U);
220
-			OM.data(MD.ATUM, "item.loot", 1,103, MT.Au	,   U, MT.BlueSapphire	,   U);
221
-			OM.data(MD.ATUM, "item.loot", 1,104, MT.Au	,   U, MT.Ruby			,   U);
222
-			OM.data(MD.ATUM, "item.loot", 1,105, MT.Au	,   U, MT.Ruby			,   U);
223
-			OM.data(MD.ATUM, "item.loot", 1,106, MT.Au	,   U, MT.Emerald		,   U);
224
-			OM.data(MD.ATUM, "item.loot", 1,107, MT.Au	,   U, MT.Emerald		,   U);
225
-			OM.data(MD.ATUM, "item.loot", 1,108, MT.Au	,   U, MT.Diamond		,   U);
226
-			OM.data(MD.ATUM, "item.loot", 1,109, MT.Au	,   U, MT.Diamond		,   U);
227
-			OM.data(MD.ATUM, "item.loot", 1,130, MT.Ag	, 2*U);
228
-			OM.data(MD.ATUM, "item.loot", 1,131, MT.Ag	, 2*U);
229
-			OM.data(MD.ATUM, "item.loot", 1,132, MT.Au	, 2*U);
230
-			OM.data(MD.ATUM, "item.loot", 1,133, MT.Au	, 2*U);
231
-			OM.data(MD.ATUM, "item.loot", 1,134, MT.Au	, 2*U, MT.BlueSapphire	, 2*U);
232
-			OM.data(MD.ATUM, "item.loot", 1,135, MT.Au	, 2*U, MT.BlueSapphire	, 2*U);
233
-			OM.data(MD.ATUM, "item.loot", 1,136, MT.Au	, 2*U, MT.Ruby			, 2*U);
234
-			OM.data(MD.ATUM, "item.loot", 1,137, MT.Au	, 2*U, MT.Ruby			, 2*U);
235
-			OM.data(MD.ATUM, "item.loot", 1,138, MT.Au	, 2*U, MT.Emerald		, 2*U);
236
-			OM.data(MD.ATUM, "item.loot", 1,139, MT.Au	, 2*U, MT.Emerald		, 2*U);
237
-			OM.data(MD.ATUM, "item.loot", 1,140, MT.Au	, 2*U, MT.Diamond		, 2*U);
238
-			OM.data(MD.ATUM, "item.loot", 1,141, MT.Au	, 2*U, MT.Diamond		, 2*U);
239
-		}
240
-		
241
-		// And Project Red violates that Rule aswell...
242
-		if (MD.PR.mLoaded) {
243
-			OreDictManager.INSTANCE.setTarget(OP.ingot	, MT.RedAlloy					, ST.make(MD.PR, "projectred.core.part", 1, 10));
244
-			OreDictManager.INSTANCE.setTarget(OP.ingot	, MT.ElectrotineAlloy			, ST.make(MD.PR, "projectred.core.part", 1, 55));
245
-			OreDictManager.INSTANCE.setTarget(OP.dust	, MT.Electrotine				, ST.make(MD.PR, "projectred.core.part", 1, 56));
246
-		}
247
-		
248
-		// Okay I should not have wondered about Blue Power doing the same garbage considering Project Red...
249
-		if (MD.BP.mLoaded) {
250
-			OreDictManager.INSTANCE.setTarget(OP.ingot	, MT.RedAlloy					, ST.make(MD.BP, "red_alloy_ingot", 1, 0));
251
-			OreDictManager.INSTANCE.setTarget(OP.ingot	, MT.BlueAlloy					, ST.make(MD.BP, "blue_alloy_ingot", 1, 0));
252
-			OreDictManager.INSTANCE.setTarget(OP.ingot	, MT.PurpleAlloy				, ST.make(MD.BP, "purple_alloy_ingot", 1, 0));
253
-			OreDictManager.INSTANCE.setTarget(OP.dust	, MT.Teslatite					, ST.make(MD.BP, "teslatite_dust", 1, 0));
254
-			OreDictManager.INSTANCE.setTarget(OP.dust	, MT.UNUSED.InfusedTeslatite	, ST.make(MD.BP, "infused_teslatite_dust", 1, 0));
255
-			OM.reg("seedFlax"															, ST.make(MD.BP, "flax_seeds", 1, 0));
256
-			OM.reg(DYE_OREDICTS_MIXABLE[DYE_INDEX_Purple]								, ST.make(MD.BP, "indigo_dye", 1, 0));
257
-			OM.reg("cropIndigo"															, ST.make(MD.BP, "indigo_flower", 1, 0));
258
-			OM.reg(OP.dustTiny.dat(MT.Zn)												, ST.make(MD.BP, "zinc_tiny_dust", 1, 0));
259
-			OM.reg(OP.crushed.dat(MT.Zn)												, ST.make(MD.BP, "zinc_ore_crushed", 1, 0));
260
-			OM.reg(OP.crushedPurified.dat(MT.Zn)										, ST.make(MD.BP, "zinc_ore_purified", 1, 0));
261
-			OM.reg(OP.boule.dat(MT.Si)													, ST.make(MD.BP, "silicon_boule", 1, 0));
262
-		}
263
-		
264
-		// Yay for Chickenbones doing it wrong, I guess...
265
-		if (MD.WR_CBE_C.mLoaded) {
266
-			OreDictManager.INSTANCE.setTarget(OP.stick	, MT.Obsidian					, ST.make(MD.WR_CBE_C, "obsidianStick", 1, 0));
267
-		}
268
-		
269
-		// Oh look, Matter Overdrive does this shit too...
270
-		if (MD.MO.mLoaded) {
271
-			OreDictManager.INSTANCE.setTarget(OP.gem	, MT.Dilithium					, ST.make(MD.MO, "dilithium_crystal", 1, 0));
272
-			OreDictManager.INSTANCE.setTarget(OP.dust	, MT.TritaniumAlloy				, ST.make(MD.MO, "tritanium_dust", 1, 0));
273
-			OreDictManager.INSTANCE.setTarget(OP.nugget	, MT.TritaniumAlloy				, ST.make(MD.MO, "tritanium_nugget", 1, 0));
274
-			OreDictManager.INSTANCE.setTarget(OP.ingot	, MT.TritaniumAlloy				, ST.make(MD.MO, "tritanium_ingot", 1, 0));
275
-			OreDictManager.INSTANCE.setTarget(OP.plate	, MT.TritaniumAlloy				, ST.make(MD.MO, "tritanium_plate", 1, 0));
276
-		}
277
-		
278
-		// ThermalExpansion gets on this ShitList too I guess...
279
-		if (MD.TE.mLoaded) {
280
-			OM.data(MD.TE, "Tank"	, 1,   1, ANY.Cu		,  U * 1, MT.Glass	,  U * 4);
281
-			OM.data(MD.TE, "Tank"	, 1,   2, MT.Invar		,  U * 4, ANY.Cu	,  U * 1, MT.Glass	,  U * 4);
282
-			OM.data(MD.TE, "Tank"	, 1,   3, MT.Invar		,  U * 4, ANY.Cu	,  U * 1, MT.Glass	,  U * 4);
283
-			OM.data(MD.TE, "Tank"	, 1,   4, MT.Enderium	,  U * 4, MT.Invar	,  U * 4, ANY.Cu	,  U * 1, MT.Glass	,  U * 4);
284
-		}
285
-		
286
-		// Wow, Ars Magica too is on this List, at least for its Blocks...
287
-		if (MD.ARS.mLoaded) {
288
-			IL.ARS_Cerublossom	.set(ST.make(MD.ARS, "blueOrchid", 1, 0), null, "flowerCerublossom");
289
-			IL.ARS_DesertNova	.set(ST.make(MD.ARS, "desertNova", 1, 0), null, "flowerDesertNova");
290
-		}
291
-		
292
-		// Cooking for Blockheads is here too!...
293
-		if (MD.CookBook.mLoaded) {
294
-			OM.data(MD.CookBook, "recipebook", 1, W, MT.Paper, U*3);
295
-		}
296
-		
297
-		// Grimoire of Gaia... though I did not expect them to have done a good job with that...
298
-		if (MD.GoG.mLoaded) {
299
-			OreDictManager.INSTANCE.setTarget(OP.chunkGt, MT.Fe, ST.make(MD.GoG, "item.GrimoireOfGaia.Shard", 1, 0));
300
-			OreDictManager.INSTANCE.setTarget(OP.chunkGt, MT.Au, ST.make(MD.GoG, "item.GrimoireOfGaia.Shard", 1, 1));
301
-			OM.data(MD.GoG, "item.GrimoireOfGaia.Shard"		, 1, 2, MT.Diamond		,  U4);
302
-			OM.data(MD.GoG, "item.GrimoireOfGaia.Shard"		, 1, 3, MT.Emerald		,  U4);
303
-			OM.data(MD.GoG, "item.GrimoireOfGaia.Shard"		, 1, 4, MT.NetherStar	,  U4);
304
-			OM.data(MD.GoG, "item.GrimoireOfGaia.Shard"		, 1, 5, MT.EnderPearl	,  U4);
305
-			OM.data(MD.GoG, "item.GrimoireOfGaia.Shard"		, 1, 6, MT.Blaze		,  U8);
306
-			OM.data(MD.GoG, "item.GrimoireOfGaia.Fragment"	, 1, 0, MT.Emerald		,  U8);
307
-		}
308
-		
309
-		// Seems like it isn't "better" in all aspects.
310
-		if (MD.BETTER_RECORDS.mLoaded) {
311
-			OM.reg(OD.record, ST.make(MD.BETTER_RECORDS, "urlrecord", 1, 0));
312
-			OM.reg(OD.record, ST.make(MD.BETTER_RECORDS, "urlmultirecord", 1, 0));
313
-		}
314
-	}
315
-	
316
-	@Override
317
-	public void onModPostInit2(FMLPostInitializationEvent aEvent) {
318
-		OUT.println(getModNameForLog() + ": Checking IC2 Recipe Lists.");
319
-		if (DISABLE_ALL_IC2_COMPRESSOR_RECIPES	) ic2.api.recipe.Recipes.compressor.getRecipes().clear();
320
-		if (DISABLE_ALL_IC2_EXTRACTOR_RECIPES	) ic2.api.recipe.Recipes.extractor .getRecipes().clear();
321
-		if (DISABLE_ALL_IC2_MACERATOR_RECIPES	) ic2.api.recipe.Recipes.macerator .getRecipes().clear();
322
-		if (DISABLE_ALL_IC2_OREWASHER_RECIPES	) ic2.api.recipe.Recipes.oreWashing.getRecipes().clear();
323
-		if (DISABLE_ALL_IC2_CENTRIFUGE_RECIPES	) ic2.api.recipe.Recipes.centrifuge.getRecipes().clear();
324
-		
325
-		OUT.println(getModNameForLog() + ": Registering things that are considered Flowers by Bumblebees.");
326
-		if (MD.BoP.mLoaded) {
327
-			BlocksGT.FLOWERS.add(ST.block(MD.BoP, "flowers"));
328
-			BlocksGT.FLOWERS.add(ST.block(MD.BoP, "flowers2"));
329
-		}
330
-		if (MD.EBXL.mLoaded) {
331
-			BlocksGT.FLOWERS.add(ST.block(MD.EBXL, "flower1"));
332
-			BlocksGT.FLOWERS.add(ST.block(MD.EBXL, "flower2"));
333
-			BlocksGT.FLOWERS.add(ST.block(MD.EBXL, "flower3"));
334
-		}
335
-		if (MD.TCFM.mLoaded) {
336
-			BlocksGT.FLOWERS.add(ST.block(MD.TCFM, "InkFlower"));
337
-			BlocksGT.FLOWERS.add(ST.block(MD.TCFM, "UmbralBush"));
338
-		}
339
-		if (MD.BP.mLoaded) {
340
-			BlocksGT.FLOWERS.add(ST.block(MD.BP, "indigo_flower"));
341
-		}
342
-		if (MD.ARS.mLoaded) {
343
-			BlocksGT.FLOWERS.add(ST.block(MD.ARS, "blueOrchid"));
344
-		}
345
-		
346
-		OUT.println(getModNameForLog() + ": Registering other Mods Enchantments for Materials");
347
-		for (Enchantment tEnchant : Enchantment.enchantmentsList) if (tEnchant != null) {
348
-			if ("enchantment.Magnetization".equalsIgnoreCase(tEnchant.getName())) {
349
-				for (OreDictMaterial tMaterial : MT.ALL_MATERIALS_REGISTERED_HERE) {
350
-					if (tMaterial == MT.NeodymiumMagnetic) {
351
-						tMaterial.addEnchantmentForTools(tEnchant, 3).addEnchantmentForArmors(tEnchant, 3);
352
-					} else if (tMaterial == MT.MeteoricSteel || tMaterial == MT.Meteorite) {
353
-						tMaterial.addEnchantmentForTools(tEnchant, 2).addEnchantmentForArmors(tEnchant, 2);
354
-					} else if (tMaterial.contains(TD.Properties.MAGNETIC_ACTIVE)) {
355
-						tMaterial.addEnchantmentForTools(tEnchant, 1).addEnchantmentForArmors(tEnchant, 1);
356
-					}
357
-				}
358
-			}
359
-			if ("enchantment.Cold Touch".equalsIgnoreCase(tEnchant.getName())) {
360
-				MT.Ice					.addEnchantmentForTools(tEnchant, 1);
361
-				MT.Snow					.addEnchantmentForTools(tEnchant, 1);
362
-				MT.FrozenIron			.addEnchantmentForTools(tEnchant, 2);
363
-				MT.Blizz				.addEnchantmentForTools(tEnchant, 3);
364
-				MT.Frezarite			.addEnchantmentForTools(tEnchant, 4);
365
-				MT.InfusedWater			.addEnchantmentForTools(tEnchant, 4);
366
-				MT.Cryotheum			.addEnchantmentForTools(tEnchant, 5);
367
-			}
368
-			if ("enchantment.frost_walker".equalsIgnoreCase(tEnchant.getName())) {
369
-				MT.Ice					.addEnchantmentForArmors(tEnchant, 1);
370
-				MT.Snow					.addEnchantmentForArmors(tEnchant, 1);
371
-				MT.FrozenIron			.addEnchantmentForArmors(tEnchant, 1);
372
-				MT.Blizz				.addEnchantmentForArmors(tEnchant, 1);
373
-				MT.Frezarite			.addEnchantmentForArmors(tEnchant, 1);
374
-				MT.InfusedWater			.addEnchantmentForArmors(tEnchant, 1);
375
-				MT.Cryotheum			.addEnchantmentForArmors(tEnchant, 1);
376
-			}
377
-			if ("enchantment.railcraft.crowbar.implosion".equalsIgnoreCase(tEnchant.getName())) {
378
-				for (OreDictMaterial tMat : ANY.Emerald.mToThis) tMat.addEnchantmentForTools(tEnchant, 5);
379
-				for (OreDictMaterial tMat : ANY.Sapphire.mToThis) tMat.addEnchantmentForTools(tEnchant, 3);
380
-				MT.Spinel				.addEnchantmentForTools(tEnchant, 3);
381
-				MT.BalasRuby			.addEnchantmentForTools(tEnchant, 3);
382
-				MT.Almandine			.addEnchantmentForTools(tEnchant, 2);
383
-				MT.Grossular			.addEnchantmentForTools(tEnchant, 2);
384
-				MT.Pyrope				.addEnchantmentForTools(tEnchant, 2);
385
-				MT.Spessartine			.addEnchantmentForTools(tEnchant, 2);
386
-				MT.Andradite			.addEnchantmentForTools(tEnchant, 2);
387
-				MT.Uvarovite			.addEnchantmentForTools(tEnchant, 2);
388
-				MT.Topaz				.addEnchantmentForTools(tEnchant, 5);
389
-				MT.BlueTopaz			.addEnchantmentForTools(tEnchant, 5);
390
-				MT.Tanzanite			.addEnchantmentForTools(tEnchant, 4);
391
-				MT.Alexandrite			.addEnchantmentForTools(tEnchant, 5);
392
-				MT.Opal					.addEnchantmentForTools(tEnchant, 4);
393
-				MT.Jasper				.addEnchantmentForTools(tEnchant, 2);
394
-				MT.Olivine				.addEnchantmentForTools(tEnchant, 2);
395
-				MT.Amethyst				.addEnchantmentForTools(tEnchant, 3);
396
-				MT.Dioptase				.addEnchantmentForTools(tEnchant, 3);
397
-				MT.Jade					.addEnchantmentForTools(tEnchant, 7);
398
-				MT.Craponite			.addEnchantmentForTools(tEnchant, 1);
399
-				MT.EnderAmethyst		.addEnchantmentForTools(tEnchant, 5);
400
-			}
401
-		}
402
-		
403
-		OUT.println(getModNameForLog() + ": Doing Books for Shelves.");
404
-		new LoaderBookList().run();
405
-		
406
-		OUT.println(getModNameForLog() + ": Fixing Chemical Formula Tooltips of certain Elements");
407
-		/** Diatomic Elements get a Subscript 2 appended to their ToolTip after PostInit. That way the ToolTip Calculation works properly until PostInit happens. */
408
-		for (OreDictMaterial tMaterial : OreDictMaterial.MATERIAL_MAP.values()) if (tMaterial.contains(TD.Atomic.DIATOMIC_NONMETAL)) tMaterial.mTooltipChemical += "\u2082";
409
-		
410
-		MT.P.mTooltipChemical += "\u2084";
411
-		MT.S.mTooltipChemical += "\u2088";
412
-		MT.Se.mTooltipChemical += "\u2088";
413
-	}
414
-	
415
-	@Override
416
-	public void onModServerStarting2(FMLServerStartingEvent aEvent) {
417
-		if (DISABLE_ALL_IC2_COMPRESSOR_RECIPES	) ic2.api.recipe.Recipes.compressor.getRecipes().clear();
418
-		if (DISABLE_ALL_IC2_EXTRACTOR_RECIPES	) ic2.api.recipe.Recipes.extractor .getRecipes().clear();
419
-		if (DISABLE_ALL_IC2_MACERATOR_RECIPES	) ic2.api.recipe.Recipes.macerator .getRecipes().clear();
420
-		if (DISABLE_ALL_IC2_OREWASHER_RECIPES	) ic2.api.recipe.Recipes.oreWashing.getRecipes().clear();
421
-		if (DISABLE_ALL_IC2_CENTRIFUGE_RECIPES	) ic2.api.recipe.Recipes.centrifuge.getRecipes().clear();
422
-	}
423
-	
424
-	@Override public void onModServerStarted2(FMLServerStartedEvent aEvent) {/**/}
425
-	@Override public void onModServerStopping2(FMLServerStoppingEvent aEvent) {/**/}
426
-	@Override public void onModServerStopped2(FMLServerStoppedEvent aEvent) {/**/}
1
+package gregapi;
2
+
3
+import static gregapi.data.CS.*;
4
+
5
+import java.util.ArrayList;
6
+import java.util.List;
7
+
8
+import cpw.mods.fml.common.LoadController;
9
+import cpw.mods.fml.common.Loader;
10
+import cpw.mods.fml.common.Mod;
11
+import cpw.mods.fml.common.ModContainer;
12
+import cpw.mods.fml.common.event.FMLInitializationEvent;
13
+import cpw.mods.fml.common.event.FMLPostInitializationEvent;
14
+import cpw.mods.fml.common.event.FMLPreInitializationEvent;
15
+import cpw.mods.fml.common.event.FMLServerStartedEvent;
16
+import cpw.mods.fml.common.event.FMLServerStartingEvent;
17
+import cpw.mods.fml.common.event.FMLServerStoppedEvent;
18
+import cpw.mods.fml.common.event.FMLServerStoppingEvent;
19
+import gregapi.api.Abstract_Mod;
20
+import gregapi.api.Abstract_Proxy;
21
+import gregapi.data.ANY;
22
+import gregapi.data.CS.BlocksGT;
23
+import gregapi.data.CS.ModIDs;
24
+import gregapi.data.IL;
25
+import gregapi.data.MD;
26
+import gregapi.data.MT;
27
+import gregapi.data.OD;
28
+import gregapi.data.OP;
29
+import gregapi.data.TD;
30
+import gregapi.load.LoaderBookList;
31
+import gregapi.load.LoaderItemData;
32
+import gregapi.load.LoaderItemList;
33
+import gregapi.load.LoaderUnificationTargets;
34
+import gregapi.load.LoaderWoodDictionary;
35
+import gregapi.oredict.OreDictItemData;
36
+import gregapi.oredict.OreDictManager;
37
+import gregapi.oredict.OreDictMaterial;
38
+import gregapi.util.OM;
39
+import gregapi.util.ST;
40
+import gregapi.util.UT;
41
+import net.minecraft.enchantment.Enchantment;
42
+import net.minecraft.item.Item;
43
+
44
+/**
45
+ * @author Gregorius Techneticies
46
+ * 
47
+ * This loads after the compatible Mods. The regular API loads before all compatible Mods.
48
+ */
49
+@Mod(modid=ModIDs.GAPI_POST, name="Greg-API-Post", version="GT6-MC1710", dependencies="required-after:"+ModIDs.GAPI+"; after:"+ModIDs.MD8+"; after:"+ModIDs.IC2+"; after:"+ModIDs.IC2C+"; after:"+ModIDs.NC+"; after:"+ModIDs.IHL+"; after:"+ModIDs.FMB+"; after:"+ModIDs.BAUBLES+"; after:"+ModIDs.GaSu+"; after:"+ModIDs.GaNe+"; after:"+ModIDs.GaEn+"; after:"+ModIDs.WdSt+"; after:"+ModIDs.CrGu+"; after:"+ModIDs.COFH_API+"; after:"+ModIDs.COFH_API_ENERGY+"; after:"+ModIDs.CC+"; after:"+ModIDs.OC+"; after:"+ModIDs.DE+"; after:"+ModIDs.FR+"; after:"+ModIDs.FRMB+"; after:"+ModIDs.BINNIE+"; after:"+ModIDs.BINNIE_BEE+"; after:"+ModIDs.BINNIE_TREE+"; after:"+ModIDs.BINNIE_GENETICS+"; after:"+ModIDs.BINNIE_BOTANY+"; after:"+ModIDs.IE+"; after:"+ModIDs.UB+"; after:"+ModIDs.COG+"; after:"+ModIDs.PFAA+"; after:"+ModIDs.ARS+"; after:"+ModIDs.TC+"; after:"+ModIDs.TCFM+"; after:"+ModIDs.BOTA+"; after:"+ModIDs.WTCH+"; after:"+ModIDs.HOWL+"; after:"+ModIDs.MoCr+"; after:"+ModIDs.GoG+"; after:"+ModIDs.LycM+"; after:"+ModIDs.LycM_Arctic+"; after:"+ModIDs.LycM_Demon+"; after:"+ModIDs.LycM_Desert+"; after:"+ModIDs.LycM_Forest+"; after:"+ModIDs.LycM_Fresh+"; after:"+ModIDs.LycM_Inferno+"; after:"+ModIDs.LycM_Jungle+"; after:"+ModIDs.LycM_Mountain+"; after:"+ModIDs.LycM_Plains+"; after:"+ModIDs.LycM_Salt+"; after:"+ModIDs.LycM_Shadow+"; after:"+ModIDs.LycM_Swamp+"; after:"+ModIDs.RC+"; after:"+ModIDs.BP+"; after:"+ModIDs.PR+"; after:"+ModIDs.PR_EXPANSION+"; after:"+ModIDs.PR_INTEGRATION+"; after:"+ModIDs.PR_TRANSMISSION+"; after:"+ModIDs.PR_TRANSPORT+"; after:"+ModIDs.PE+"; after:"+ModIDs.AE+"; after:"+ModIDs.MO+"; after:"+ModIDs.TE_FOUNDATION+"; after:"+ModIDs.TE_DYNAMICS+"; after:"+ModIDs.TE+"; after:"+ModIDs.ZTONES+"; after:"+ModIDs.CHSL+"; after:"+ModIDs.EtFu+"; after:"+ModIDs.BbLC+"; after:"+ModIDs.CARP+"; after:"+ModIDs.BETTER_RECORDS+"; after:"+ModIDs.TF+"; after:"+ModIDs.ERE+"; after:"+ModIDs.MFR+"; after:"+ModIDs.PnC+"; after:"+ModIDs.ExU+"; after:"+ModIDs.ExS+"; after:"+ModIDs.EIO+"; after:"+ModIDs.RT+"; after:"+ModIDs.AA+"; after:"+ModIDs.HaC+"; after:"+ModIDs.CookBook+"; after:"+ModIDs.APC+"; after:"+ModIDs.ENVM+"; after:"+ModIDs.MaCr+"; after:"+ModIDs.BC_TRANSPORT+"; after:"+ModIDs.BC_SILICON+"; after:"+ModIDs.BC_FACTORY+"; after:"+ModIDs.BC_ENERGY+"; after:"+ModIDs.BC_ROBOTICS+"; after:"+ModIDs.BC+"; after:"+ModIDs.BC_BUILDERS+"; after:"+ModIDs.MgC+"; after:"+ModIDs.BR+"; after:"+ModIDs.HBM+"; after:"+ModIDs.DRGN+"; after:"+ModIDs.ElC+"; after:"+ModIDs.CrC+"; after:"+ModIDs.ReC+"; after:"+ModIDs.RoC+"; after:"+ModIDs.Mek+"; after:"+ModIDs.Mek_Tools+"; after:"+ModIDs.Mek_Generators+"; after:"+ModIDs.GC+"; after:"+ModIDs.GC_PLANETS+"; after:"+ModIDs.GC_GALAXYSPACE+"; after:"+ModIDs.VULPES+"; after:"+ModIDs.GC_ADV_ROCKETRY+"; after:"+ModIDs.BTL+"; after:"+ModIDs.AETHER+"; after:"+ModIDs.ATUM+"; after:"+ModIDs.EBXL+"; after:"+ModIDs.BoP+"; after:"+ModIDs.HiL+"; after:"+ModIDs.ATG+"; after:"+ModIDs.RTG+"; after:"+ModIDs.RWG+"; after:"+ModIDs.MYST+"; after:"+ModIDs.WARPBOOK+"; after:"+ModIDs.LOSTBOOKS+"; after:"+ModIDs.EUREKA+"; after:"+ModIDs.ENCHIRIDION+"; after:"+ModIDs.ENCHIRIDION2+"; after:"+ModIDs.SmAc+"; after:"+ModIDs.HQM+"; after:"+ModIDs.JABBA+"; after:"+ModIDs.MaCu+"; after:"+ModIDs.PdC+"; after:"+ModIDs.Bamboo+"; after:"+ModIDs.GrC+"; after:"+ModIDs.GrC_Apples+"; after:"+ModIDs.GrC_Bamboo+"; after:"+ModIDs.GrC_Bees+"; after:"+ModIDs.GrC_Cellar+"; after:"+ModIDs.GrC_Fish+"; after:"+ModIDs.GrC_Grapes+"; after:"+ModIDs.GrC_Hops+"; after:"+ModIDs.GrC_Milk+"; after:"+ModIDs.GrC_Rice+"; after:"+ModIDs.BWM+"; after:"+ModIDs.OMT+"; after:"+ModIDs.TG+"; after:"+ModIDs.FM+"; after:"+ModIDs.FZ+"; after:"+ModIDs.MNTL+"; after:"+ModIDs.OB+"; after:"+ModIDs.TiC+"; after:"+ModIDs.WR_CBE_C+"; after:"+ModIDs.WR_CBE_A+"; after:"+ModIDs.WR_CBE_L+"; after:inventorytweaks; after:ironbackpacks; after:journeymap; after:LogisticsPipes; after:LunatriusCore; after:NEIAddons; after:NEIAddons|Developer; after:NEIAddons|AppEng; after:NEIAddons|Botany; after:NEIAddons|Forestry; after:NEIAddons|CraftingTables; after:NEIAddons|ExNihilo; after:neiintegration; after:openglasses; after:simplyjetpacks; after:Stackie; after:StevesCarts; after:TiCTooltips; after:worldedit; after:McMultipart")
50
+public class GT_API_Post extends Abstract_Mod {
51
+	public GT_API_Post() {GAPI_POST = this;}
52
+	
53
+	@Override public String getModID() {return MD.GAPI_POST.mID;}
54
+	@Override public String getModName() {return MD.GAPI_POST.mName;}
55
+	@Override public String getModNameForLog() {return "GT_API_POST";}
56
+	@Override public Abstract_Proxy getProxy() {return null;}
57
+	
58
+	@Mod.EventHandler public final void onPreLoad			(FMLPreInitializationEvent	aEvent) {onModPreInit(aEvent);}
59
+	@Mod.EventHandler public final void onLoad				(FMLInitializationEvent		aEvent) {onModInit(aEvent);}
60
+	@Mod.EventHandler public final void onPostLoad			(FMLPostInitializationEvent	aEvent) {onModPostInit(aEvent);}
61
+	@Mod.EventHandler public final void onServerStarting	(FMLServerStartingEvent		aEvent) {onModServerStarting(aEvent);}
62
+	@Mod.EventHandler public final void onServerStarted		(FMLServerStartedEvent		aEvent) {onModServerStarted(aEvent);}
63
+	@Mod.EventHandler public final void onServerStopping	(FMLServerStoppingEvent		aEvent) {onModServerStopping(aEvent);}
64
+	@Mod.EventHandler public final void onServerStopped		(FMLServerStoppedEvent		aEvent) {onModServerStopped(aEvent);}
65
+	
66
+	@Override
67
+	public void onModPreInit2(FMLPreInitializationEvent aEvent) {
68
+		try {
69
+			OUT.println(getModNameForLog() + ": Sorting Greg-API-Post to the end of the Mod List for further processing.");
70
+			LoadController tLoadController = ((LoadController)UT.Reflection.getFieldContent(Loader.instance(), "modController", T, T));
71
+			List<ModContainer> tModList = tLoadController.getActiveModList(), tNewModsList = new ArrayList(tModList.size());
72
+			ModContainer tGregTech = null;
73
+			for (short i = 0; i < tModList.size(); i++) {
74
+				ModContainer tMod = tModList.get(i);
75
+				if (tMod.getModId().equalsIgnoreCase(MD.GAPI_POST.mID)) tGregTech = tMod; else tNewModsList.add(tMod);
76
+			}
77
+			if (tGregTech != null) tNewModsList.add(tGregTech);
78
+			UT.Reflection.getField(tLoadController, "activeModList", T, T).set(tLoadController, tNewModsList);
79
+		} catch(Throwable e) {
80
+			if (D1) e.printStackTrace(ERR);
81
+		}
82
+		
83
+		// Fixing Items of certain Mods.
84
+		for (Item tItem : new Item[] {
85
+		  ST.item(MD.GrC_Grapes, "grc.grapes")
86
+		, ST.item(MD.FR, "letters")
87
+		, ST.item(MD.FZ, "acid")
88
+		}) if (tItem != null) tItem.setMaxDamage(0).setHasSubtypes(T);
89
+		
90
+		new LoaderItemList().run();
91
+		new LoaderItemData().run();
92
+		new LoaderUnificationTargets().run();
93
+		
94
+		if (MD.MET.mLoaded) {
95
+			MT.OREMATS.Bauxite		.addOreByProducts(MT.Alduorite		);
96
+			MT.OREMATS.Chalcopyrite	.addOreByProducts(MT.Infuscolium	);
97
+			MT.OREMATS.Scheelite	.addOreByProducts(MT.Rubracium		);
98
+			MT.OREMATS.Pentlandite	.addOreByProducts(MT.Meutoite		);
99
+			MT.OREMATS.Magnesite	.addOreByProducts(MT.Lemurite		);
100
+			MT.OREMATS.Stibnite		.addOreByProducts(MT.Ceruclase		);
101
+			MT.TiO2					.addOreByProducts(MT.Atlarus		);
102
+			MT.OREMATS.Garnierite	.addOreByProducts(MT.Oureclase		);
103
+			MT.OREMATS.Cooperite	.addOreByProducts(MT.Kalendrite		);
104
+			MT.OREMATS.Ilmenite		.addOreByProducts(MT.Orichalcum		);
105
+			MT.OREMATS.Sphalerite	.addOreByProducts(MT.Carmot			);
106
+			MT.OREMATS.Cinnabar		.addOreByProducts(MT.Sanguinite		);
107
+			MT.OREMATS.Malachite	.addOreByProducts(MT.Vyroxeres		);
108
+			MT.MnO2					.addOreByProducts(MT.Eximite		);
109
+			MT.OREMATS.Cobaltite	.addOreByProducts(MT.Prometheum		);
110
+			MT.OREMATS.Cassiterite	.addOreByProducts(MT.Ignatius		);
111
+			MT.OREMATS.Wolframite	.addOreByProducts(MT.Vulcanite		);
112
+			MT.Fe2O3				.addOreByProducts(MT.DeepIron		);
113
+			MT.OREMATS.Magnetite	.addOreByProducts(MT.ShadowIron		);
114
+		}
115
+		if (MD.Mek.mLoaded) {
116
+			MT.OREMATS.Galena.addOreByProducts(MT.FakeOsmium);
117
+			MT.OREMATS.Magnetite.addOreByProducts(MT.FakeOsmium);
118
+			MT.OREMATS.Ferrovanadium.addOreByProducts(MT.FakeOsmium);
119
+			MT.OREMATS.BasalticMineralSand.addOreByProducts(MT.FakeOsmium);
120
+			MT.OREMATS.GraniticMineralSand.addOreByProducts(MT.FakeOsmium);
121
+		}
122
+		if (MD.TiC.mLoaded) {
123
+			MT.Co.addOreByProducts(MT.Ardite);
124
+		}
125
+		if (MD.BR.mLoaded) {
126
+			MT.Th.addOreByProducts(MT.Cyanite);
127
+			MT.Monazite.addOreByProducts(MT.Cyanite);
128
+			MT.Forcicium.addOreByProducts(MT.Cyanite);
129
+			MT.Forcillium.addOreByProducts(MT.Cyanite);
130
+			MT.OREMATS.Pitchblende.addOreByProducts(MT.Yellorium);
131
+			MT.OREMATS.Uraninite.addOreByProducts(MT.Yellorium);
132
+			MT.U_238.addOreByProducts(MT.Yellorium);
133
+			MT.Pu.addOreByProducts(MT.Blutonium);
134
+			MT.Am.addOreByProducts(MT.Blutonium);
135
+		}
136
+		if (MD.AE.mLoaded) {
137
+			OP.gem  .disableItemGeneration(MT.CertusQuartz, MT.Fluix);
138
+			OP.dust .disableItemGeneration(MT.CertusQuartz, MT.Fluix);
139
+		}
140
+		if (MD.AA.mLoaded) {
141
+			MT.OREMATS.Barite.addOreByProducts(MT.BlackQuartz);
142
+		}
143
+		
144
+	}
145
+	
146
+	@Override
147
+	public void onModInit2(FMLInitializationEvent aEvent) {
148
+		new LoaderWoodDictionary().run();
149
+		
150
+		// Atum violates the "Items have to be created in preInit" Rule...
151
+		if (MD.ATUM.mLoaded) {
152
+			IL.ATUM_Scarab		.set(ST.make(MD.ATUM, "item.scarab"	, 1, 0), new OreDictItemData(MT.Au, 4*U, MT.Diamond, U));
153
+			IL.ATUM_Limestone	.set(ST.make(MD.ATUM, "tile.stone"	, 1, 0), OP.stone.dat(MT.Limestone));
154
+			IL.ATUM_Limecobble	.set(ST.make(MD.ATUM, "tile.cobble"	, 1, 0), OP.stone.dat(MT.Limestone));
155
+			
156
+			OM.reg("cropDate"				, ST.make(MD.ATUM, "item.date", 1, 0));
157
+			OM.reg("cropFlax"				, ST.make(MD.ATUM, "item.flax", 1, 0));
158
+			OM.reg("seedFlax"				, ST.make(MD.ATUM, "item.flaxSeeds", 1, 0));
159
+	    	OM.reg("itemPelt"				, ST.make(MD.ATUM, "item.wolfPelt", 1, 0));
160
+			OM.reg(OP.dust, MT.Ectoplasm	, ST.make(MD.ATUM, "item.ectoplasm", 1, 0));
161
+			OreDictManager.INSTANCE.setItemData_(ST.make(MD.ATUM, "tile.ironOre"		, 1, 0), OP.oreLimestone.dat(MT.Fe			));
162
+			OreDictManager.INSTANCE.setItemData_(ST.make(MD.ATUM, "tile.goldOre"		, 1, 0), OP.oreLimestone.dat(MT.Au			));
163
+			OreDictManager.INSTANCE.setItemData_(ST.make(MD.ATUM, "tile.redstoneOre"	, 1, 0), OP.oreLimestone.dat(MT.Redstone	));
164
+			OreDictManager.INSTANCE.setItemData_(ST.make(MD.ATUM, "tile.lapisOre"		, 1, 0), OP.oreLimestone.dat(MT.Lapis		));
165
+			OreDictManager.INSTANCE.setItemData_(ST.make(MD.ATUM, "tile.coalOre"		, 1, 0), OP.oreLimestone.dat(MT.Coal		));
166
+			OreDictManager.INSTANCE.setItemData_(ST.make(MD.ATUM, "tile.diamondOre"		, 1, 0), OP.oreLimestone.dat(MT.Diamond		));
167
+			
168
+			OM.data(MD.ATUM, "item.stoneChunk", 1, 0, MT.Limestone, U);
169
+			OM.data(MD.ATUM, "tile.sand", 1, W, MT.Sand, U);
170
+			OM.data(MD.ATUM, "tile.framedGlass", 1, W, MT.Glass, U);
171
+			OM.data(MD.ATUM, "tile.crystalGlass", 1, W, MT.Glass, U);
172
+			OM.data(MD.ATUM, "tile.framedStainedGlass", 1, W, MT.Glass, U);
173
+			OM.data(MD.ATUM, "tile.crystalStainedGlass", 1, W, MT.Glass, U);
174
+			OM.data(MD.ATUM, "tile.thinFramedGlass", 1, W, MT.Glass, 3*U8);
175
+			OM.data(MD.ATUM, "tile.thinCrystalGlass", 1, W, MT.Glass, 3*U8);
176
+			OM.data(MD.ATUM, "tile.thinFramedStainedGlass", 1, W, MT.Glass, 3*U8);
177
+			OM.data(MD.ATUM, "tile.thinCrystalStainedGlass", 1, W, MT.Glass, 3*U8);
178
+			
179
+			OM.data(MD.ATUM, "item.loot", 1,  2, MT.Ag	, 2*U);
180
+			OM.data(MD.ATUM, "item.loot", 1,  3, MT.Ag	, 2*U);
181
+			OM.data(MD.ATUM, "item.loot", 1,  4, MT.Au	, 2*U);
182
+			OM.data(MD.ATUM, "item.loot", 1,  5, MT.Au	, 2*U);
183
+			OM.data(MD.ATUM, "item.loot", 1,  6, MT.Au	, 2*U, MT.BlueSapphire	, 2*U);
184
+			OM.data(MD.ATUM, "item.loot", 1,  7, MT.Au	, 2*U, MT.BlueSapphire	, 2*U);
185
+			OM.data(MD.ATUM, "item.loot", 1,  8, MT.Au	, 2*U, MT.Ruby			, 2*U);
186
+			OM.data(MD.ATUM, "item.loot", 1,  9, MT.Au	, 2*U, MT.Ruby			, 2*U);
187
+			OM.data(MD.ATUM, "item.loot", 1, 10, MT.Au	, 2*U, MT.Emerald		, 2*U);
188
+			OM.data(MD.ATUM, "item.loot", 1, 11, MT.Au	, 2*U, MT.Emerald		, 2*U);
189
+			OM.data(MD.ATUM, "item.loot", 1, 12, MT.Au	, 2*U, MT.Diamond		, 2*U);
190
+			OM.data(MD.ATUM, "item.loot", 1, 13, MT.Au	, 2*U, MT.Diamond		, 2*U);
191
+			OM.data(MD.ATUM, "item.loot", 1, 34, MT.Ag	,   U);
192
+			OM.data(MD.ATUM, "item.loot", 1, 35, MT.Ag	,   U);
193
+			OM.data(MD.ATUM, "item.loot", 1, 36, MT.Au	,   U);
194
+			OM.data(MD.ATUM, "item.loot", 1, 37, MT.Au	,   U);
195
+			OM.data(MD.ATUM, "item.loot", 1, 38, MT.Au	,   U, MT.BlueSapphire	,   U);
196
+			OM.data(MD.ATUM, "item.loot", 1, 39, MT.Au	,   U, MT.BlueSapphire	,   U);
197
+			OM.data(MD.ATUM, "item.loot", 1, 40, MT.Au	,   U, MT.Ruby			,   U);
198
+			OM.data(MD.ATUM, "item.loot", 1, 41, MT.Au	,   U, MT.Ruby			,   U);
199
+			OM.data(MD.ATUM, "item.loot", 1, 42, MT.Au	,   U, MT.Emerald		,   U);
200
+			OM.data(MD.ATUM, "item.loot", 1, 43, MT.Au	,   U, MT.Emerald		,   U);
201
+			OM.data(MD.ATUM, "item.loot", 1, 44, MT.Au	,   U, MT.Diamond		,   U);
202
+			OM.data(MD.ATUM, "item.loot", 1, 45, MT.Au	,   U, MT.Diamond		,   U);
203
+			OM.data(MD.ATUM, "item.loot", 1, 66, MT.Ag	,   U);
204
+			OM.data(MD.ATUM, "item.loot", 1, 67, MT.Ag	,   U);
205
+			OM.data(MD.ATUM, "item.loot", 1, 68, MT.Au	,   U);
206
+			OM.data(MD.ATUM, "item.loot", 1, 69, MT.Au	,   U);
207
+			OM.data(MD.ATUM, "item.loot", 1, 70, MT.Au	,   U, MT.BlueSapphire	,   U);
208
+			OM.data(MD.ATUM, "item.loot", 1, 71, MT.Au	,   U, MT.BlueSapphire	,   U);
209
+			OM.data(MD.ATUM, "item.loot", 1, 72, MT.Au	,   U, MT.Ruby			,   U);
210
+			OM.data(MD.ATUM, "item.loot", 1, 73, MT.Au	,   U, MT.Ruby			,   U);
211
+			OM.data(MD.ATUM, "item.loot", 1, 74, MT.Au	,   U, MT.Emerald		,   U);
212
+			OM.data(MD.ATUM, "item.loot", 1, 75, MT.Au	,   U, MT.Emerald		,   U);
213
+			OM.data(MD.ATUM, "item.loot", 1, 76, MT.Au	,   U, MT.Diamond		,   U);
214
+			OM.data(MD.ATUM, "item.loot", 1, 77, MT.Au	,   U, MT.Diamond		,   U);
215
+			OM.data(MD.ATUM, "item.loot", 1, 98, MT.Ag	,   U);
216
+			OM.data(MD.ATUM, "item.loot", 1, 99, MT.Ag	,   U);
217
+			OM.data(MD.ATUM, "item.loot", 1,100, MT.Au	,   U);
218
+			OM.data(MD.ATUM, "item.loot", 1,101, MT.Au	,   U);
219
+			OM.data(MD.ATUM, "item.loot", 1,102, MT.Au	,   U, MT.BlueSapphire	,   U);
220
+			OM.data(MD.ATUM, "item.loot", 1,103, MT.Au	,   U, MT.BlueSapphire	,   U);
221
+			OM.data(MD.ATUM, "item.loot", 1,104, MT.Au	,   U, MT.Ruby			,   U);
222
+			OM.data(MD.ATUM, "item.loot", 1,105, MT.Au	,   U, MT.Ruby			,   U);
223
+			OM.data(MD.ATUM, "item.loot", 1,106, MT.Au	,   U, MT.Emerald		,   U);
224
+			OM.data(MD.ATUM, "item.loot", 1,107, MT.Au	,   U, MT.Emerald		,   U);
225
+			OM.data(MD.ATUM, "item.loot", 1,108, MT.Au	,   U, MT.Diamond		,   U);
226
+			OM.data(MD.ATUM, "item.loot", 1,109, MT.Au	,   U, MT.Diamond		,   U);
227
+			OM.data(MD.ATUM, "item.loot", 1,130, MT.Ag	, 2*U);
228
+			OM.data(MD.ATUM, "item.loot", 1,131, MT.Ag	, 2*U);
229
+			OM.data(MD.ATUM, "item.loot", 1,132, MT.Au	, 2*U);
230
+			OM.data(MD.ATUM, "item.loot", 1,133, MT.Au	, 2*U);
231
+			OM.data(MD.ATUM, "item.loot", 1,134, MT.Au	, 2*U, MT.BlueSapphire	, 2*U);
232
+			OM.data(MD.ATUM, "item.loot", 1,135, MT.Au	, 2*U, MT.BlueSapphire	, 2*U);
233
+			OM.data(MD.ATUM, "item.loot", 1,136, MT.Au	, 2*U, MT.Ruby			, 2*U);
234
+			OM.data(MD.ATUM, "item.loot", 1,137, MT.Au	, 2*U, MT.Ruby			, 2*U);
235
+			OM.data(MD.ATUM, "item.loot", 1,138, MT.Au	, 2*U, MT.Emerald		, 2*U);
236
+			OM.data(MD.ATUM, "item.loot", 1,139, MT.Au	, 2*U, MT.Emerald		, 2*U);
237
+			OM.data(MD.ATUM, "item.loot", 1,140, MT.Au	, 2*U, MT.Diamond		, 2*U);
238
+			OM.data(MD.ATUM, "item.loot", 1,141, MT.Au	, 2*U, MT.Diamond		, 2*U);
239
+		}
240
+		
241
+		// And Project Red violates that Rule aswell...
242
+		if (MD.PR.mLoaded) {
243
+			OreDictManager.INSTANCE.setTarget(OP.ingot	, MT.RedAlloy					, ST.make(MD.PR, "projectred.core.part", 1, 10));
244
+			OreDictManager.INSTANCE.setTarget(OP.ingot	, MT.ElectrotineAlloy			, ST.make(MD.PR, "projectred.core.part", 1, 55));
245
+			OreDictManager.INSTANCE.setTarget(OP.dust	, MT.Electrotine				, ST.make(MD.PR, "projectred.core.part", 1, 56));
246
+		}
247
+		
248
+		// Okay I should not have wondered about Blue Power doing the same garbage considering Project Red...
249
+		if (MD.BP.mLoaded) {
250
+			OreDictManager.INSTANCE.setTarget(OP.ingot	, MT.RedAlloy					, ST.make(MD.BP, "red_alloy_ingot", 1, 0));
251
+			OreDictManager.INSTANCE.setTarget(OP.ingot	, MT.BlueAlloy					, ST.make(MD.BP, "blue_alloy_ingot", 1, 0));
252
+			OreDictManager.INSTANCE.setTarget(OP.ingot	, MT.PurpleAlloy				, ST.make(MD.BP, "purple_alloy_ingot", 1, 0));
253
+			OreDictManager.INSTANCE.setTarget(OP.dust	, MT.Teslatite					, ST.make(MD.BP, "teslatite_dust", 1, 0));
254
+			OreDictManager.INSTANCE.setTarget(OP.dust	, MT.UNUSED.InfusedTeslatite	, ST.make(MD.BP, "infused_teslatite_dust", 1, 0));
255
+			OM.reg("seedFlax"															, ST.make(MD.BP, "flax_seeds", 1, 0));
256
+			OM.reg(DYE_OREDICTS_MIXABLE[DYE_INDEX_Purple]								, ST.make(MD.BP, "indigo_dye", 1, 0));
257
+			OM.reg("cropIndigo"															, ST.make(MD.BP, "indigo_flower", 1, 0));
258
+			OM.reg(OP.dustTiny.dat(MT.Zn)												, ST.make(MD.BP, "zinc_tiny_dust", 1, 0));
259
+			OM.reg(OP.crushed.dat(MT.Zn)												, ST.make(MD.BP, "zinc_ore_crushed", 1, 0));
260
+			OM.reg(OP.crushedPurified.dat(MT.Zn)										, ST.make(MD.BP, "zinc_ore_purified", 1, 0));
261
+			OM.reg(OP.boule.dat(MT.Si)													, ST.make(MD.BP, "silicon_boule", 1, 0));
262
+		}
263
+		
264
+		// Yay for Chickenbones doing it wrong, I guess...
265
+		if (MD.WR_CBE_C.mLoaded) {
266
+			OreDictManager.INSTANCE.setTarget(OP.stick	, MT.Obsidian					, ST.make(MD.WR_CBE_C, "obsidianStick", 1, 0));
267
+		}
268
+		
269
+		// Oh look, Matter Overdrive does this shit too...
270
+		if (MD.MO.mLoaded) {
271
+			OreDictManager.INSTANCE.setTarget(OP.gem	, MT.Dilithium					, ST.make(MD.MO, "dilithium_crystal", 1, 0));
272
+			OreDictManager.INSTANCE.setTarget(OP.dust	, MT.TritaniumAlloy				, ST.make(MD.MO, "tritanium_dust", 1, 0));
273
+			OreDictManager.INSTANCE.setTarget(OP.nugget	, MT.TritaniumAlloy				, ST.make(MD.MO, "tritanium_nugget", 1, 0));
274
+			OreDictManager.INSTANCE.setTarget(OP.ingot	, MT.TritaniumAlloy				, ST.make(MD.MO, "tritanium_ingot", 1, 0));
275
+			OreDictManager.INSTANCE.setTarget(OP.plate	, MT.TritaniumAlloy				, ST.make(MD.MO, "tritanium_plate", 1, 0));
276
+		}
277
+		
278
+		// ThermalExpansion gets on this ShitList too I guess...
279
+		if (MD.TE.mLoaded) {
280
+			OM.data(MD.TE, "Tank"	, 1,   1, ANY.Cu		,  U * 1, MT.Glass	,  U * 4);
281
+			OM.data(MD.TE, "Tank"	, 1,   2, MT.Invar		,  U * 4, ANY.Cu	,  U * 1, MT.Glass	,  U * 4);
282
+			OM.data(MD.TE, "Tank"	, 1,   3, MT.Invar		,  U * 4, ANY.Cu	,  U * 1, MT.Glass	,  U * 4);
283
+			OM.data(MD.TE, "Tank"	, 1,   4, MT.Enderium	,  U * 4, MT.Invar	,  U * 4, ANY.Cu	,  U * 1, MT.Glass	,  U * 4);
284
+		}
285
+		
286
+		// Wow, Ars Magica too is on this List, at least for its Blocks...
287
+		if (MD.ARS.mLoaded) {
288
+			IL.ARS_Cerublossom	.set(ST.make(MD.ARS, "blueOrchid", 1, 0), null, "flowerCerublossom");
289
+			IL.ARS_DesertNova	.set(ST.make(MD.ARS, "desertNova", 1, 0), null, "flowerDesertNova");
290
+		}
291
+		
292
+		// Cooking for Blockheads is here too!...
293
+		if (MD.CookBook.mLoaded) {
294
+			OM.data(MD.CookBook, "recipebook", 1, W, MT.Paper, U*3);
295
+		}
296
+		
297
+		// Grimoire of Gaia... though I did not expect them to have done a good job with that...
298
+		if (MD.GoG.mLoaded) {
299
+			OreDictManager.INSTANCE.setTarget(OP.chunkGt, MT.Fe, ST.make(MD.GoG, "item.GrimoireOfGaia.Shard", 1, 0));
300
+			OreDictManager.INSTANCE.setTarget(OP.chunkGt, MT.Au, ST.make(MD.GoG, "item.GrimoireOfGaia.Shard", 1, 1));
301
+			OM.data(MD.GoG, "item.GrimoireOfGaia.Shard"		, 1, 2, MT.Diamond		,  U4);
302
+			OM.data(MD.GoG, "item.GrimoireOfGaia.Shard"		, 1, 3, MT.Emerald		,  U4);
303
+			OM.data(MD.GoG, "item.GrimoireOfGaia.Shard"		, 1, 4, MT.NetherStar	,  U4);
304
+			OM.data(MD.GoG, "item.GrimoireOfGaia.Shard"		, 1, 5, MT.EnderPearl	,  U4);
305
+			OM.data(MD.GoG, "item.GrimoireOfGaia.Shard"		, 1, 6, MT.Blaze		,  U8);
306
+			OM.data(MD.GoG, "item.GrimoireOfGaia.Fragment"	, 1, 0, MT.Emerald		,  U8);
307
+		}
308
+		
309
+		// Seems like it isn't "better" in all aspects.
310
+		if (MD.BETTER_RECORDS.mLoaded) {
311
+			OM.reg(OD.record, ST.make(MD.BETTER_RECORDS, "urlrecord", 1, 0));
312
+			OM.reg(OD.record, ST.make(MD.BETTER_RECORDS, "urlmultirecord", 1, 0));
313
+		}
314
+	}
315
+	
316
+	@Override
317
+	public void onModPostInit2(FMLPostInitializationEvent aEvent) {
318
+		OUT.println(getModNameForLog() + ": Checking IC2 Recipe Lists.");
319
+		if (DISABLE_ALL_IC2_COMPRESSOR_RECIPES	) ic2.api.recipe.Recipes.compressor.getRecipes().clear();
320
+		if (DISABLE_ALL_IC2_EXTRACTOR_RECIPES	) ic2.api.recipe.Recipes.extractor .getRecipes().clear();
321
+		if (DISABLE_ALL_IC2_MACERATOR_RECIPES	) ic2.api.recipe.Recipes.macerator .getRecipes().clear();
322
+		if (DISABLE_ALL_IC2_OREWASHER_RECIPES	) ic2.api.recipe.Recipes.oreWashing.getRecipes().clear();
323
+		if (DISABLE_ALL_IC2_CENTRIFUGE_RECIPES	) ic2.api.recipe.Recipes.centrifuge.getRecipes().clear();
324
+		
325
+		OUT.println(getModNameForLog() + ": Registering things that are considered Flowers by Bumblebees.");
326
+		if (MD.BoP.mLoaded) {
327
+			BlocksGT.FLOWERS.add(ST.block(MD.BoP, "flowers"));
328
+			BlocksGT.FLOWERS.add(ST.block(MD.BoP, "flowers2"));
329
+		}
330
+		if (MD.EBXL.mLoaded) {
331
+			BlocksGT.FLOWERS.add(ST.block(MD.EBXL, "flower1"));
332
+			BlocksGT.FLOWERS.add(ST.block(MD.EBXL, "flower2"));
333
+			BlocksGT.FLOWERS.add(ST.block(MD.EBXL, "flower3"));
334
+		}
335
+		if (MD.TCFM.mLoaded) {
336
+			BlocksGT.FLOWERS.add(ST.block(MD.TCFM, "InkFlower"));
337
+			BlocksGT.FLOWERS.add(ST.block(MD.TCFM, "UmbralBush"));
338
+		}
339
+		if (MD.BP.mLoaded) {
340
+			BlocksGT.FLOWERS.add(ST.block(MD.BP, "indigo_flower"));
341
+		}
342
+		if (MD.ARS.mLoaded) {
343
+			BlocksGT.FLOWERS.add(ST.block(MD.ARS, "blueOrchid"));
344
+		}
345
+		
346
+		OUT.println(getModNameForLog() + ": Registering other Mods Enchantments for Materials");
347
+		for (Enchantment tEnchant : Enchantment.enchantmentsList) if (tEnchant != null) {
348
+			if ("enchantment.Magnetization".equalsIgnoreCase(tEnchant.getName())) {
349
+				for (OreDictMaterial tMaterial : MT.ALL_MATERIALS_REGISTERED_HERE) {
350
+					if (tMaterial == MT.NeodymiumMagnetic) {
351
+						tMaterial.addEnchantmentForTools(tEnchant, 3).addEnchantmentForArmors(tEnchant, 3);
352
+					} else if (tMaterial == MT.MeteoricSteel || tMaterial == MT.Meteorite) {
353
+						tMaterial.addEnchantmentForTools(tEnchant, 2).addEnchantmentForArmors(tEnchant, 2);
354
+					} else if (tMaterial.contains(TD.Properties.MAGNETIC_ACTIVE)) {
355
+						tMaterial.addEnchantmentForTools(tEnchant, 1).addEnchantmentForArmors(tEnchant, 1);
356
+					}
357
+				}
358
+			}
359
+			if ("enchantment.Cold Touch".equalsIgnoreCase(tEnchant.getName())) {
360
+				MT.Ice					.addEnchantmentForTools(tEnchant, 1);
361
+				MT.Snow					.addEnchantmentForTools(tEnchant, 1);
362
+				MT.FrozenIron			.addEnchantmentForTools(tEnchant, 2);
363
+				MT.Blizz				.addEnchantmentForTools(tEnchant, 3);
364
+				MT.Frezarite			.addEnchantmentForTools(tEnchant, 4);
365
+				MT.InfusedWater			.addEnchantmentForTools(tEnchant, 4);
366
+				MT.Cryotheum			.addEnchantmentForTools(tEnchant, 5);
367
+			}
368
+			if ("enchantment.frost_walker".equalsIgnoreCase(tEnchant.getName())) {
369
+				MT.Ice					.addEnchantmentForArmors(tEnchant, 1);
370
+				MT.Snow					.addEnchantmentForArmors(tEnchant, 1);
371
+				MT.FrozenIron			.addEnchantmentForArmors(tEnchant, 1);
372
+				MT.Blizz				.addEnchantmentForArmors(tEnchant, 1);
373
+				MT.Frezarite			.addEnchantmentForArmors(tEnchant, 1);
374
+				MT.InfusedWater			.addEnchantmentForArmors(tEnchant, 1);
375
+				MT.Cryotheum			.addEnchantmentForArmors(tEnchant, 1);
376
+			}
377
+			if ("enchantment.railcraft.crowbar.implosion".equalsIgnoreCase(tEnchant.getName())) {
378
+				for (OreDictMaterial tMat : ANY.Emerald.mToThis) tMat.addEnchantmentForTools(tEnchant, 5);
379
+				for (OreDictMaterial tMat : ANY.Sapphire.mToThis) tMat.addEnchantmentForTools(tEnchant, 3);
380
+				MT.Spinel				.addEnchantmentForTools(tEnchant, 3);
381
+				MT.BalasRuby			.addEnchantmentForTools(tEnchant, 3);
382
+				MT.Almandine			.addEnchantmentForTools(tEnchant, 2);
383
+				MT.Grossular			.addEnchantmentForTools(tEnchant, 2);
384
+				MT.Pyrope				.addEnchantmentForTools(tEnchant, 2);
385
+				MT.Spessartine			.addEnchantmentForTools(tEnchant, 2);
386
+				MT.Andradite			.addEnchantmentForTools(tEnchant, 2);
387
+				MT.Uvarovite			.addEnchantmentForTools(tEnchant, 2);
388
+				MT.Topaz				.addEnchantmentForTools(tEnchant, 5);
389
+				MT.BlueTopaz			.addEnchantmentForTools(tEnchant, 5);
390
+				MT.Tanzanite			.addEnchantmentForTools(tEnchant, 4);
391
+				MT.Alexandrite			.addEnchantmentForTools(tEnchant, 5);
392
+				MT.Opal					.addEnchantmentForTools(tEnchant, 4);
393
+				MT.Jasper				.addEnchantmentForTools(tEnchant, 2);
394
+				MT.Olivine				.addEnchantmentForTools(tEnchant, 2);
395
+				MT.Amethyst				.addEnchantmentForTools(tEnchant, 3);
396
+				MT.Dioptase				.addEnchantmentForTools(tEnchant, 3);
397
+				MT.Jade					.addEnchantmentForTools(tEnchant, 7);
398
+				MT.Craponite			.addEnchantmentForTools(tEnchant, 1);
399
+				MT.EnderAmethyst		.addEnchantmentForTools(tEnchant, 5);
400
+			}
401
+		}
402
+		
403
+		OUT.println(getModNameForLog() + ": Doing Books for Shelves.");
404
+		new LoaderBookList().run();
405
+		
406
+		OUT.println(getModNameForLog() + ": Fixing Chemical Formula Tooltips of certain Elements");
407
+		/** Diatomic Elements get a Subscript 2 appended to their ToolTip after PostInit. That way the ToolTip Calculation works properly until PostInit happens. */
408
+		for (OreDictMaterial tMaterial : OreDictMaterial.MATERIAL_MAP.values()) if (tMaterial.contains(TD.Atomic.DIATOMIC_NONMETAL)) tMaterial.mTooltipChemical += "\u2082";
409
+		
410
+		MT.P.mTooltipChemical += "\u2084";
411
+		MT.S.mTooltipChemical += "\u2088";
412
+		MT.Se.mTooltipChemical += "\u2088";
413
+	}
414
+	
415
+	@Override
416
+	public void onModServerStarting2(FMLServerStartingEvent aEvent) {
417
+		if (DISABLE_ALL_IC2_COMPRESSOR_RECIPES	) ic2.api.recipe.Recipes.compressor.getRecipes().clear();
418
+		if (DISABLE_ALL_IC2_EXTRACTOR_RECIPES	) ic2.api.recipe.Recipes.extractor .getRecipes().clear();
419
+		if (DISABLE_ALL_IC2_MACERATOR_RECIPES	) ic2.api.recipe.Recipes.macerator .getRecipes().clear();
420
+		if (DISABLE_ALL_IC2_OREWASHER_RECIPES	) ic2.api.recipe.Recipes.oreWashing.getRecipes().clear();
421
+		if (DISABLE_ALL_IC2_CENTRIFUGE_RECIPES	) ic2.api.recipe.Recipes.centrifuge.getRecipes().clear();
422
+	}
423
+	
424
+	@Override public void onModServerStarted2(FMLServerStartedEvent aEvent) {/**/}
425
+	@Override public void onModServerStopping2(FMLServerStoppingEvent aEvent) {/**/}
426
+	@Override public void onModServerStopped2(FMLServerStoppedEvent aEvent) {/**/}
427 427
 }

+ 1080
- 1080
src/main/java/gregapi/GT_API_Proxy.java
File diff suppressed because it is too large
View File


+ 562
- 562
src/main/java/gregapi/GT_API_Proxy_Client.java
File diff suppressed because it is too large
View File


+ 15
- 15
src/main/java/gregapi/GT_API_Proxy_Server.java View File

@@ -1,16 +1,16 @@
1
-package gregapi;
2
-
3
-import static gregapi.data.CS.*;
4
-
5
-
6
-/**
7
- * @author Gregorius Techneticies
8
- */
9
-public class GT_API_Proxy_Server extends GT_API_Proxy {
10
-	public GT_API_Proxy_Server() {
11
-		super();
12
-		CODE_SERVER = T;
13
-		CODE_CLIENT = F;
14
-		CODE_UNCHECKED = F;
15
-	}
1
+package gregapi;
2
+
3
+import static gregapi.data.CS.*;
4
+
5
+
6
+/**
7
+ * @author Gregorius Techneticies
8
+ */
9
+public class GT_API_Proxy_Server extends GT_API_Proxy {
10
+	public GT_API_Proxy_Server() {
11
+		super();
12
+		CODE_SERVER = T;
13
+		CODE_CLIENT = F;
14
+		CODE_UNCHECKED = F;
15
+	}
16 16
 }

+ 618
- 618
src/main/java/gregapi/NEI_RecipeMap.java
File diff suppressed because it is too large
View File


+ 275
- 275
src/main/java/gregapi/api/Abstract_Mod.java View File

@@ -1,276 +1,276 @@
1
-package gregapi.api;
2
-
3
-import static gregapi.data.CS.*;
4
-
5
-import java.util.List;
6
-
7
-import cpw.mods.fml.common.event.FMLInitializationEvent;
8
-import cpw.mods.fml.common.event.FMLPostInitializationEvent;
9
-import cpw.mods.fml.common.event.FMLPreInitializationEvent;
10
-import cpw.mods.fml.common.event.FMLServerStartedEvent;
11
-import cpw.mods.fml.common.event.FMLServerStartingEvent;
12
-import cpw.mods.fml.common.event.FMLServerStoppedEvent;
13
-import cpw.mods.fml.common.event.FMLServerStoppingEvent;
14
-import gregapi.code.ArrayListNoNulls;
15
-import gregapi.util.CR;
16
-import gregapi.util.UT;
17
-
18
-/**
19
- * @author Gregorius Techneticies
20
- * 
21
- * Base Class used for all my Mods.
22
- * Can also be used for GT-API based Mods such as Addons ;)
23
- */
24
-public abstract class Abstract_Mod {
25
-	public static final List<Abstract_Mod> MODS_USING_GT_API = new ArrayListNoNulls();
26
-	
27
-	/** Contains the amount of GT API Mods. Better than doing a constant List size check. */
28
-	public static int sModCountUsingGTAPI = 0;
29
-	
30
-	/** Contains the amount of Phases the GT API Mods have already ran through. */
31
-	public static int
32
-	sStartedPreInit			= 0, sFinishedPreInit			= 0,
33
-	sStartedInit			= 0, sFinishedInit				= 0,
34
-	sStartedPostInit		= 0, sFinishedPostInit			= 0,
35
-	sFinalized				= 0;
36
-	
37
-	/** List of all Configuration Files for Auto-Saving. */
38
-	public static final List<Runnable> sConfigs = new ArrayListNoNulls();
39
-	
40
-	// ------------------------------ non-static stuff ------------------------------
41
-	
42
-	/** Contains the Proxy Class of this Mod. Can be null if there is no Proxy. */
43
-	public Abstract_Proxy mProxy;
44
-	
45
-	/** Contains the Phases the Mod has already ran through. */
46
-	public boolean
47
-	mStartedPreInit			= F, mFinishedPreInit			= F,
48
-	mStartedInit			= F, mFinishedInit				= F,
49
-	mStartedPostInit		= F, mFinishedPostInit			= F,
50
-	mFinalized				= F;
51
-	
52
-	/** Contains the amount of Server Start/Stop Phases the Mod has already ran through. */
53
-	public int
54
-	mStartedServerStarting	= 0, mFinishedServerStarting	= 0,
55
-	mStartedServerStarted	= 0, mFinishedServerStarted		= 0,
56
-	mStartedServerStopping	= 0, mFinishedServerStopping	= 0,
57
-	mStartedServerStopped	= 0, mFinishedServerStopped		= 0;
58
-	
59
-	/** Event Lists where you can hook into the loading order of the Code, without having to care much about regular Mod load order. Note, that these Lists will be cleared and then set to null, right after they got executed once, in order to clean up some RAM. */
60
-	public List<Runnable>
61
-	mBeforePreInit			= new ArrayListNoNulls(), mAfterPreInit			= new ArrayListNoNulls(),
62
-	mBeforeInit				= new ArrayListNoNulls(), mAfterInit			= new ArrayListNoNulls(),
63
-	mBeforePostInit			= new ArrayListNoNulls(), mAfterPostInit		= new ArrayListNoNulls(),
64
-	mFinalize				= new ArrayListNoNulls();
65
-	
66
-	/** Event Lists where you can hook into the loading order of the Code, without having to care much about regular Mod load order. */
67
-	public final List<Runnable>
68
-	mBeforeServerStarting	= new ArrayListNoNulls(), mAfterServerStarting	= new ArrayListNoNulls(),
69
-	mBeforeServerStarted	= new ArrayListNoNulls(), mAfterServerStarted	= new ArrayListNoNulls(),
70
-	mBeforeServerStopping	= new ArrayListNoNulls(), mAfterServerStopping	= new ArrayListNoNulls(),
71
-	mBeforeServerStopped	= new ArrayListNoNulls(), mAfterServerStopped	= new ArrayListNoNulls();
72
-	
73
-	public Abstract_Mod() {
74
-		sModCountUsingGTAPI++;
75
-		MODS_USING_GT_API.add(this);
76
-	}
77
-	
78
-	/** Return the Mod ID */
79
-	public abstract String getModID();
80
-	/** Return the Mod Name */
81
-	public abstract String getModName();
82
-	/** Used for logging purposes. */
83
-	public abstract String getModNameForLog();
84
-	/** Return the actual Proxy. Note: DO NOT RETURN mProxy! */
85
-	public abstract Abstract_Proxy getProxy();
86
-	/** Called on PreInit */
87
-	public abstract void onModPreInit2(FMLPreInitializationEvent aEvent);
88
-	/** Called on Init */
89
-	public abstract void onModInit2(FMLInitializationEvent aEvent);
90
-	/** Called on PostInit */
91
-	public abstract void onModPostInit2(FMLPostInitializationEvent aEvent);
92
-	/** Called on Server Start */
93
-    public abstract void onModServerStarting2(FMLServerStartingEvent aEvent);
94
-	/** Called after Server Start */
95
-    public abstract void onModServerStarted2(FMLServerStartedEvent aEvent);
96
-	/** Called on Server Stop */
97
-    public abstract void onModServerStopping2(FMLServerStoppingEvent aEvent);
98
-	/** Called after Server Stop */
99
-    public abstract void onModServerStopped2(FMLServerStoppedEvent aEvent);
100
-    
101
-    
102
-    
103
-    @Override public String toString() {return getModID();}
104
-    
105
-    public void loadRunnables(String aName, List<Runnable> aList) {
106
-		UT.LoadingBar.start(aName, aList.size());
107
-    	for (Runnable tRunnable : aList) {
108
-			String tString = tRunnable.toString();
109
-			UT.LoadingBar.step(UT.Code.stringValid(tString)?tString:"UNNAMED");
110
-    		try {tRunnable.run();} catch(Throwable e) {e.printStackTrace(ERR);}
111
-    	}
112
-    	UT.LoadingBar.finish();
113
-    }
114
-    
115
-    public void loadRunnables(List<Runnable> aList) {
116
-    	for (Runnable tRunnable : aList) try {tRunnable.run();} catch(Throwable e) {e.printStackTrace(ERR);}
117
-    }
118
-    
119
-	// Just add Calls to these from within your Mods load phases.
120
-	
121
-	public void onModPreInit(FMLPreInitializationEvent aEvent) {
122
-        if (mStartedPreInit) return;
123
-		try {
124
-			mProxy = getProxy();
125
-	        OUT.println(getModNameForLog() + ": ======================");
126
-	        ORD.println(getModNameForLog() + ": ======================");
127
-	        
128
-	        loadRunnables("Before PreInit", mBeforePreInit); mBeforePreInit.clear(); mBeforePreInit = null;
129
-	    	
130
-	        OUT.println(getModNameForLog() + ": PreInit-Phase started!");
131
-	        ORD.println(getModNameForLog() + ": PreInit-Phase started!");
132
-	    	
133
-	        mStartedPreInit = T;
134
-	        sStartedPreInit++;
135
-	        if (mProxy != null) mProxy.onProxyBeforePreInit(this, aEvent);
136
-	    	onModPreInit2(aEvent);
137
-	    	if (mProxy != null) mProxy.onProxyAfterPreInit(this, aEvent);
138
-	    	sFinishedPreInit++;
139
-	    	mFinishedPreInit = T;
140
-	    	
141
-	        OUT.println(getModNameForLog() + ": PreInit-Phase finished!");
142
-	        ORD.println(getModNameForLog() + ": PreInit-Phase finished!");
143
-	        
144
-	        loadRunnables("After PreInit", mAfterPreInit); mAfterPreInit.clear(); mAfterPreInit = null;
145
-	        
146
-	        loadRunnables("Saving Configs", sConfigs);
147
-	    	
148
-	        OUT.println(getModNameForLog() + ": =======================");
149
-	        ORD.println(getModNameForLog() + ": =======================");
150
-		} catch(Throwable e) {
151
-	        loadRunnables("Saving Configs after Exception!", sConfigs);
152
-	        e.printStackTrace(ERR);
153
-			throw new RuntimeException(e);
154
-		}
155
-	}
156
-	
157
-	public void onModInit(FMLInitializationEvent aEvent) {
158
-		if (mStartedInit) return;
159
-		try {
160
-	        OUT.println(getModNameForLog() + ": ===================");
161
-	        ORD.println(getModNameForLog() + ": ===================");
162
-	        
163
-	        loadRunnables("Before Init", mBeforeInit); mBeforeInit.clear(); mBeforeInit = null;
164
-	    	
165
-	        OUT.println(getModNameForLog() + ": Init-Phase started!");
166
-	        ORD.println(getModNameForLog() + ": Init-Phase started!");
167
-	        
168
-	        mStartedInit = T;
169
-	        sStartedInit++;
170
-	        if (mProxy != null) mProxy.onProxyBeforeInit(this, aEvent);
171
-	        onModInit2(aEvent);
172
-	        if (mProxy != null) mProxy.onProxyAfterInit(this, aEvent);
173
-	        sFinishedInit++;
174
-	        mFinishedInit = T;
175
-	        
176
-	        OUT.println(getModNameForLog() + ": Init-Phase finished!");
177
-	        ORD.println(getModNameForLog() + ": Init-Phase finished!");
178
-	        
179
-	        loadRunnables("After Init", mAfterInit); mAfterInit.clear(); mAfterInit = null;
180
-	        
181
-	        loadRunnables("Saving Configs", sConfigs);
182
-	        
183
-	        OUT.println(getModNameForLog() + ": ====================");
184
-	        ORD.println(getModNameForLog() + ": ====================");
185
-		} catch(Throwable e) {
186
-	        loadRunnables("Saving Configs after Exception!", sConfigs);
187
-	        e.printStackTrace(ERR);
188
-			throw new RuntimeException(e);
189
-		}
190
-	}
191
-	
192
-	public void onModPostInit(FMLPostInitializationEvent aEvent) {
193
-		if (mStartedPostInit) return;
194
-		try {
195
-	        OUT.println(getModNameForLog() + ": =======================");
196
-	        ORD.println(getModNameForLog() + ": =======================");
197
-	        
198
-	        loadRunnables("Before PostInit", mBeforePostInit); mBeforePostInit.clear(); mBeforePostInit = null;
199
-	    	
200
-	        OUT.println(getModNameForLog() + ": PostInit-Phase started!");
201
-	        ORD.println(getModNameForLog() + ": PostInit-Phase started!");
202
-	        
203
-			mStartedPostInit = T;
204
-			sStartedPostInit++;
205
-			if (mProxy != null) mProxy.onProxyBeforePostInit(this, aEvent);
206
-			onModPostInit2(aEvent);
207
-			if (mProxy != null) mProxy.onProxyAfterPostInit(this, aEvent);
208
-			sFinishedPostInit++;
209
-			mFinishedPostInit = T;
210
-			
211
-	        OUT.println(getModNameForLog() + ": PostInit-Phase finished!");
212
-	        ORD.println(getModNameForLog() + ": PostInit-Phase finished!");
213
-	        
214
-	        loadRunnables("After PostInit", mAfterPostInit); mAfterPostInit.clear(); mAfterPostInit = null;
215
-	        
216
-	        loadRunnables("Finalize", mFinalize); mFinalize.clear(); mFinalize = null;
217
-	        
218
-	        sFinalized++;
219
-	        mFinalized = T;
220
-	        
221
-	        if (sFinalized >= sModCountUsingGTAPI) {
222
-		        OUT.println(getModNameForLog() + ": Adding buffered Recipes.");
223
-	        	CR.stopBufferingCraftingRecipes();
224
-	        }
225
-	        
226
-	        loadRunnables("Saving Configs", sConfigs);
227
-	    	
228
-	        OUT.println(getModNameForLog() + ": ========================");
229
-	        ORD.println(getModNameForLog() + ": ========================");
230
-		} catch(Throwable e) {
231
-	        loadRunnables("Saving Configs after Exception!", sConfigs);
232
-	        e.printStackTrace(ERR);
233
-			throw new RuntimeException(e);
234
-		}
235
-	}
236
-	
237
-    public void onModServerStarting(FMLServerStartingEvent aEvent) {
238
-    	loadRunnables(mBeforeServerStarting);
239
-    	mStartedServerStarting++;
240
-    	if (mProxy != null) mProxy.onProxyBeforeServerStarting(this, aEvent);
241
-    	onModServerStarting2(aEvent);
242
-    	if (mProxy != null) mProxy.onProxyAfterServerStarting(this, aEvent);
243
-    	mFinishedServerStarting++;
244
-    	loadRunnables(mAfterServerStarting);
245
-	}
246
-    
247
-    public void onModServerStarted(FMLServerStartedEvent aEvent) {
248
-    	loadRunnables(mBeforeServerStarted);
249
-		mStartedServerStarted++;
250
-		if (mProxy != null) mProxy.onProxyBeforeServerStarted(this, aEvent);
251
-		onModServerStarted2(aEvent);
252
-		if (mProxy != null) mProxy.onProxyAfterServerStarted(this, aEvent);
253
-		mFinishedServerStarted++;
254
-		loadRunnables(mAfterServerStarted);
255
-    }
256
-    
257
-    public void onModServerStopping(FMLServerStoppingEvent aEvent) {
258
-    	loadRunnables(mBeforeServerStopping);
259
-		mStartedServerStopping++;
260
-		if (mProxy != null) mProxy.onProxyBeforeServerStopping(this, aEvent);
261
-		onModServerStopping2(aEvent);
262
-		if (mProxy != null) mProxy.onProxyAfterServerStopping(this, aEvent);
263
-		mFinishedServerStopping++;
264
-		loadRunnables(mAfterServerStopping);
265
-    }
266
-    
267
-    public void onModServerStopped(FMLServerStoppedEvent aEvent) {
268
-    	loadRunnables(mBeforeServerStopped);
269
-		mStartedServerStopped++;
270
-		if (mProxy != null) mProxy.onProxyBeforeServerStopped(this, aEvent);
271
-		onModServerStopped2(aEvent);
272
-		if (mProxy != null) mProxy.onProxyAfterServerStopped(this, aEvent);
273
-		mFinishedServerStopped++;
274
-		loadRunnables(mAfterServerStopped);
275
-    }
1
+package gregapi.api;
2
+
3
+import static gregapi.data.CS.*;
4
+
5
+import java.util.List;
6
+
7
+import cpw.mods.fml.common.event.FMLInitializationEvent;
8
+import cpw.mods.fml.common.event.FMLPostInitializationEvent;
9
+import cpw.mods.fml.common.event.FMLPreInitializationEvent;
10
+import cpw.mods.fml.common.event.FMLServerStartedEvent;
11
+import cpw.mods.fml.common.event.FMLServerStartingEvent;
12
+import cpw.mods.fml.common.event.FMLServerStoppedEvent;
13
+import cpw.mods.fml.common.event.FMLServerStoppingEvent;
14
+import gregapi.code.ArrayListNoNulls;
15
+import gregapi.util.CR;
16
+import gregapi.util.UT;
17
+
18
+/**
19
+ * @author Gregorius Techneticies
20
+ * 
21
+ * Base Class used for all my Mods.
22
+ * Can also be used for GT-API based Mods such as Addons ;)
23
+ */
24
+public abstract class Abstract_Mod {
25
+	public static final List<Abstract_Mod> MODS_USING_GT_API = new ArrayListNoNulls();
26
+	
27
+	/** Contains the amount of GT API Mods. Better than doing a constant List size check. */
28
+	public static int sModCountUsingGTAPI = 0;
29
+	
30
+	/** Contains the amount of Phases the GT API Mods have already ran through. */
31
+	public static int
32
+	sStartedPreInit			= 0, sFinishedPreInit			= 0,
33
+	sStartedInit			= 0, sFinishedInit				= 0,
34
+	sStartedPostInit		= 0, sFinishedPostInit			= 0,
35
+	sFinalized				= 0;
36
+	
37
+	/** List of all Configuration Files for Auto-Saving. */
38
+	public static final List<Runnable> sConfigs = new ArrayListNoNulls();
39
+	
40
+	// ------------------------------ non-static stuff ------------------------------
41
+	
42
+	/** Contains the Proxy Class of this Mod. Can be null if there is no Proxy. */
43
+	public Abstract_Proxy mProxy;
44
+	
45
+	/** Contains the Phases the Mod has already ran through. */
46
+	public boolean
47
+	mStartedPreInit			= F, mFinishedPreInit			= F,
48
+	mStartedInit			= F, mFinishedInit				= F,
49
+	mStartedPostInit		= F, mFinishedPostInit			= F,
50
+	mFinalized				= F;
51
+	
52
+	/** Contains the amount of Server Start/Stop Phases the Mod has already ran through. */
53
+	public int
54
+	mStartedServerStarting	= 0, mFinishedServerStarting	= 0,
55
+	mStartedServerStarted	= 0, mFinishedServerStarted		= 0,
56
+	mStartedServerStopping	= 0, mFinishedServerStopping	= 0,
57
+	mStartedServerStopped	= 0, mFinishedServerStopped		= 0;
58
+	
59
+	/** Event Lists where you can hook into the loading order of the Code, without having to care much about regular Mod load order. Note, that these Lists will be cleared and then set to null, right after they got executed once, in order to clean up some RAM. */
60
+	public List<Runnable>
61
+	mBeforePreInit			= new ArrayListNoNulls(), mAfterPreInit			= new ArrayListNoNulls(),
62
+	mBeforeInit				= new ArrayListNoNulls(), mAfterInit			= new ArrayListNoNulls(),
63
+	mBeforePostInit			= new ArrayListNoNulls(), mAfterPostInit		= new ArrayListNoNulls(),
64
+	mFinalize				= new ArrayListNoNulls();
65
+	
66
+	/** Event Lists where you can hook into the loading order of the Code, without having to care much about regular Mod load order. */
67
+	public final List<Runnable>
68
+	mBeforeServerStarting	= new ArrayListNoNulls(), mAfterServerStarting	= new ArrayListNoNulls(),
69
+	mBeforeServerStarted	= new ArrayListNoNulls(), mAfterServerStarted	= new ArrayListNoNulls(),
70
+	mBeforeServerStopping	= new ArrayListNoNulls(), mAfterServerStopping	= new ArrayListNoNulls(),
71
+	mBeforeServerStopped	= new ArrayListNoNulls(), mAfterServerStopped	= new ArrayListNoNulls();
72
+	
73
+	public Abstract_Mod() {
74
+		sModCountUsingGTAPI++;
75
+		MODS_USING_GT_API.add(this);
76
+	}
77
+	
78
+	/** Return the Mod ID */
79
+	public abstract String getModID();
80
+	/** Return the Mod Name */
81
+	public abstract String getModName();
82
+	/** Used for logging purposes. */
83
+	public abstract String getModNameForLog();
84
+	/** Return the actual Proxy. Note: DO NOT RETURN mProxy! */
85
+	public abstract Abstract_Proxy getProxy();
86
+	/** Called on PreInit */
87
+	public abstract void onModPreInit2(FMLPreInitializationEvent aEvent);
88
+	/** Called on Init */
89
+	public abstract void onModInit2(FMLInitializationEvent aEvent);
90
+	/** Called on PostInit */
91
+	public abstract void onModPostInit2(FMLPostInitializationEvent aEvent);
92
+	/** Called on Server Start */
93
+    public abstract void onModServerStarting2(FMLServerStartingEvent aEvent);
94
+	/** Called after Server Start */
95
+    public abstract void onModServerStarted2(FMLServerStartedEvent aEvent);
96
+	/** Called on Server Stop */
97
+    public abstract void onModServerStopping2(FMLServerStoppingEvent aEvent);
98
+	/** Called after Server Stop */
99
+    public abstract void onModServerStopped2(FMLServerStoppedEvent aEvent);
100
+    
101
+    
102
+    
103
+    @Override public String toString() {return getModID();}
104
+    
105
+    public void loadRunnables(String aName, List<Runnable> aList) {
106
+		UT.LoadingBar.start(aName, aList.size());
107
+    	for (Runnable tRunnable : aList) {
108
+			String tString = tRunnable.toString();
109
+			UT.LoadingBar.step(UT.Code.stringValid(tString)?tString:"UNNAMED");
110
+    		try {tRunnable.run();} catch(Throwable e) {e.printStackTrace(ERR);}
111
+    	}
112
+    	UT.LoadingBar.finish();
113
+    }
114
+    
115
+    public void loadRunnables(List<Runnable> aList) {
116
+    	for (Runnable tRunnable : aList) try {tRunnable.run();} catch(Throwable e) {e.printStackTrace(ERR);}
117
+    }
118
+    
119
+	// Just add Calls to these from within your Mods load phases.
120
+	
121
+	public void onModPreInit(FMLPreInitializationEvent aEvent) {
122
+        if (mStartedPreInit) return;
123
+		try {
124
+			mProxy = getProxy();
125
+	        OUT.println(getModNameForLog() + ": ======================");
126
+	        ORD.println(getModNameForLog() + ": ======================");
127
+	        
128
+	        loadRunnables("Before PreInit", mBeforePreInit); mBeforePreInit.clear(); mBeforePreInit = null;
129
+	    	
130
+	        OUT.println(getModNameForLog() + ": PreInit-Phase started!");
131
+	        ORD.println(getModNameForLog() + ": PreInit-Phase started!");
132
+	    	
133
+	        mStartedPreInit = T;
134
+	        sStartedPreInit++;
135
+	        if (mProxy != null) mProxy.onProxyBeforePreInit(this, aEvent);
136
+	    	onModPreInit2(aEvent);
137
+	    	if (mProxy != null) mProxy.onProxyAfterPreInit(this, aEvent);
138
+	    	sFinishedPreInit++;
139
+	    	mFinishedPreInit = T;
140
+	    	
141
+	        OUT.println(getModNameForLog() + ": PreInit-Phase finished!");
142
+	        ORD.println(getModNameForLog() + ": PreInit-Phase finished!");
143
+	        
144
+	        loadRunnables("After PreInit", mAfterPreInit); mAfterPreInit.clear(); mAfterPreInit = null;
145
+	        
146
+	        loadRunnables("Saving Configs", sConfigs);
147
+	    	
148
+	        OUT.println(getModNameForLog() + ": =======================");
149
+	        ORD.println(getModNameForLog() + ": =======================");
150
+		} catch(Throwable e) {
151
+	        loadRunnables("Saving Configs after Exception!", sConfigs);
152
+	        e.printStackTrace(ERR);
153
+			throw new RuntimeException(e);
154
+		}
155
+	}
156
+	
157
+	public void onModInit(FMLInitializationEvent aEvent) {
158
+		if (mStartedInit) return;
159
+		try {
160
+	        OUT.println(getModNameForLog() + ": ===================");
161
+	        ORD.println(getModNameForLog() + ": ===================");
162
+	        
163
+	        loadRunnables("Before Init", mBeforeInit); mBeforeInit.clear(); mBeforeInit = null;
164
+	    	
165
+	        OUT.println(getModNameForLog() + ": Init-Phase started!");
166
+	        ORD.println(getModNameForLog() + ": Init-Phase started!");
167
+	        
168
+	        mStartedInit = T;
169
+	        sStartedInit++;
170
+	        if (mProxy != null) mProxy.onProxyBeforeInit(this, aEvent);
171
+	        onModInit2(aEvent);
172
+	        if (mProxy != null) mProxy.onProxyAfterInit(this, aEvent);
173
+	        sFinishedInit++;
174
+	        mFinishedInit = T;
175
+	        
176
+	        OUT.println(getModNameForLog() + ": Init-Phase finished!");
177
+	        ORD.println(getModNameForLog() + ": Init-Phase finished!");
178
+	        
179
+	        loadRunnables("After Init", mAfterInit); mAfterInit.clear(); mAfterInit = null;
180
+	        
181
+	        loadRunnables("Saving Configs", sConfigs);
182
+	        
183
+	        OUT.println(getModNameForLog() + ": ====================");
184
+	        ORD.println(getModNameForLog() + ": ====================");
185
+		} catch(Throwable e) {
186
+	        loadRunnables("Saving Configs after Exception!", sConfigs);
187
+	        e.printStackTrace(ERR);
188
+			throw new RuntimeException(e);
189
+		}
190
+	}
191
+	
192
+	public void onModPostInit(FMLPostInitializationEvent aEvent) {
193
+		if (mStartedPostInit) return;
194
+		try {
195
+	        OUT.println(getModNameForLog() + ": =======================");
196
+	        ORD.println(getModNameForLog() + ": =======================");
197
+	        
198
+	        loadRunnables("Before PostInit", mBeforePostInit); mBeforePostInit.clear(); mBeforePostInit = null;
199
+	    	
200
+	        OUT.println(getModNameForLog() + ": PostInit-Phase started!");
201
+	        ORD.println(getModNameForLog() + ": PostInit-Phase started!");
202
+	        
203
+			mStartedPostInit = T;
204
+			sStartedPostInit++;
205
+			if (mProxy != null) mProxy.onProxyBeforePostInit(this, aEvent);
206
+			onModPostInit2(aEvent);
207
+			if (mProxy != null) mProxy.onProxyAfterPostInit(this, aEvent);
208
+			sFinishedPostInit++;
209
+			mFinishedPostInit = T;
210
+			
211
+	        OUT.println(getModNameForLog() + ": PostInit-Phase finished!");
212
+	        ORD.println(getModNameForLog() + ": PostInit-Phase finished!");
213
+	        
214
+	        loadRunnables("After PostInit", mAfterPostInit); mAfterPostInit.clear(); mAfterPostInit = null;
215
+	        
216
+	        loadRunnables("Finalize", mFinalize); mFinalize.clear(); mFinalize = null;
217
+	        
218
+	        sFinalized++;
219
+	        mFinalized = T;
220
+	        
221
+	        if (sFinalized >= sModCountUsingGTAPI) {
222
+		        OUT.println(getModNameForLog() + ": Adding buffered Recipes.");
223
+	        	CR.stopBufferingCraftingRecipes();
224
+	        }
225
+	        
226
+	        loadRunnables("Saving Configs", sConfigs);
227
+	    	
228
+	        OUT.println(getModNameForLog() + ": ========================");
229
+	        ORD.println(getModNameForLog() + ": ========================");
230
+		} catch(Throwable e) {
231
+	        loadRunnables("Saving Configs after Exception!", sConfigs);
232
+	        e.printStackTrace(ERR);
233
+			throw new RuntimeException(e);
234
+		}
235
+	}
236
+	
237
+    public void onModServerStarting(FMLServerStartingEvent aEvent) {
238
+    	loadRunnables(mBeforeServerStarting);
239
+    	mStartedServerStarting++;
240
+    	if (mProxy != null) mProxy.onProxyBeforeServerStarting(this, aEvent);
241
+    	onModServerStarting2(aEvent);
242
+    	if (mProxy != null) mProxy.onProxyAfterServerStarting(this, aEvent);
243
+    	mFinishedServerStarting++;
244
+    	loadRunnables(mAfterServerStarting);
245
+	}
246
+    
247
+    public void onModServerStarted(FMLServerStartedEvent aEvent) {
248
+    	loadRunnables(mBeforeServerStarted);
249
+		mStartedServerStarted++;
250
+		if (mProxy != null) mProxy.onProxyBeforeServerStarted(this, aEvent);
251
+		onModServerStarted2(aEvent);
252
+		if (mProxy != null) mProxy.onProxyAfterServerStarted(this, aEvent);
253
+		mFinishedServerStarted++;
254
+		loadRunnables(mAfterServerStarted);
255
+    }
256
+    
257
+    public void onModServerStopping(FMLServerStoppingEvent aEvent) {
258
+    	loadRunnables(mBeforeServerStopping);
259
+		mStartedServerStopping++;
260
+		if (mProxy != null) mProxy.onProxyBeforeServerStopping(this, aEvent);
261
+		onModServerStopping2(aEvent);
262
+		if (mProxy != null) mProxy.onProxyAfterServerStopping(this, aEvent);
263
+		mFinishedServerStopping++;
264
+		loadRunnables(mAfterServerStopping);
265
+    }
266
+    
267
+    public void onModServerStopped(FMLServerStoppedEvent aEvent) {
268
+    	loadRunnables(mBeforeServerStopped);
269
+		mStartedServerStopped++;
270
+		if (mProxy != null) mProxy.onProxyBeforeServerStopped(this, aEvent);
271
+		onModServerStopped2(aEvent);
272
+		if (mProxy != null) mProxy.onProxyAfterServerStopped(this, aEvent);
273
+		mFinishedServerStopped++;
274
+		loadRunnables(mAfterServerStopped);
275
+    }
276 276
 }

+ 31
- 31
src/main/java/gregapi/api/Abstract_Proxy.java View File

@@ -1,32 +1,32 @@
1
-package gregapi.api;
2
-
3
-import cpw.mods.fml.common.event.FMLInitializationEvent;
4
-import cpw.mods.fml.common.event.FMLPostInitializationEvent;
5
-import cpw.mods.fml.common.event.FMLPreInitializationEvent;
6
-import cpw.mods.fml.common.event.FMLServerStartedEvent;
7
-import cpw.mods.fml.common.event.FMLServerStartingEvent;
8
-import cpw.mods.fml.common.event.FMLServerStoppedEvent;
9
-import cpw.mods.fml.common.event.FMLServerStoppingEvent;
10
-
11
-/**
12
- * @author Gregorius Techneticies
13
- * 
14
- * Base Proxy used for all my Mods.
15
- */
16
-public abstract class Abstract_Proxy {
17
-	public void onProxyBeforePreInit		(Abstract_Mod aMod, FMLPreInitializationEvent	aEvent) {/**/}
18
-	public void onProxyBeforeInit			(Abstract_Mod aMod, FMLInitializationEvent		aEvent) {/**/}
19
-	public void onProxyBeforePostInit		(Abstract_Mod aMod, FMLPostInitializationEvent	aEvent) {/**/}
20
-    public void onProxyBeforeServerStarting	(Abstract_Mod aMod, FMLServerStartingEvent		aEvent) {/**/}
21
-    public void onProxyBeforeServerStarted	(Abstract_Mod aMod, FMLServerStartedEvent		aEvent) {/**/}
22
-    public void onProxyBeforeServerStopping	(Abstract_Mod aMod, FMLServerStoppingEvent		aEvent) {/**/}
23
-    public void onProxyBeforeServerStopped	(Abstract_Mod aMod, FMLServerStoppedEvent		aEvent) {/**/}
24
-    
25
-	public void onProxyAfterPreInit			(Abstract_Mod aMod, FMLPreInitializationEvent	aEvent) {/**/}
26
-	public void onProxyAfterInit			(Abstract_Mod aMod, FMLInitializationEvent		aEvent) {/**/}
27
-	public void onProxyAfterPostInit		(Abstract_Mod aMod, FMLPostInitializationEvent	aEvent) {/**/}
28
-    public void onProxyAfterServerStarting	(Abstract_Mod aMod, FMLServerStartingEvent		aEvent) {/**/}
29
-    public void onProxyAfterServerStarted	(Abstract_Mod aMod, FMLServerStartedEvent		aEvent) {/**/}
30
-    public void onProxyAfterServerStopping	(Abstract_Mod aMod, FMLServerStoppingEvent		aEvent) {/**/}
31
-    public void onProxyAfterServerStopped	(Abstract_Mod aMod, FMLServerStoppedEvent		aEvent) {/**/}
1
+package gregapi.api;
2
+
3
+import cpw.mods.fml.common.event.FMLInitializationEvent;
4
+import cpw.mods.fml.common.event.FMLPostInitializationEvent;
5
+import cpw.mods.fml.common.event.FMLPreInitializationEvent;
6
+import cpw.mods.fml.common.event.FMLServerStartedEvent;
7
+import cpw.mods.fml.common.event.FMLServerStartingEvent;
8
+import cpw.mods.fml.common.event.FMLServerStoppedEvent;
9
+import cpw.mods.fml.common.event.FMLServerStoppingEvent;
10
+
11
+/**
12
+ * @author Gregorius Techneticies
13
+ * 
14
+ * Base Proxy used for all my Mods.
15
+ */
16
+public abstract class Abstract_Proxy {
17
+	public void onProxyBeforePreInit		(Abstract_Mod aMod, FMLPreInitializationEvent	aEvent) {/**/}
18
+	public void onProxyBeforeInit			(Abstract_Mod aMod, FMLInitializationEvent		aEvent) {/**/}
19
+	public void onProxyBeforePostInit		(Abstract_Mod aMod, FMLPostInitializationEvent	aEvent) {/**/}
20
+    public void onProxyBeforeServerStarting	(Abstract_Mod aMod, FMLServerStartingEvent		aEvent) {/**/}
21
+    public void onProxyBeforeServerStarted	(Abstract_Mod aMod, FMLServerStartedEvent		aEvent) {/**/}
22
+    public void onProxyBeforeServerStopping	(Abstract_Mod aMod, FMLServerStoppingEvent		aEvent) {/**/}
23
+    public void onProxyBeforeServerStopped	(Abstract_Mod aMod, FMLServerStoppedEvent		aEvent) {/**/}
24
+    
25
+	public void onProxyAfterPreInit			(Abstract_Mod aMod, FMLPreInitializationEvent	aEvent) {/**/}
26
+	public void onProxyAfterInit			(Abstract_Mod aMod, FMLInitializationEvent		aEvent) {/**/}
27
+	public void onProxyAfterPostInit		(Abstract_Mod aMod, FMLPostInitializationEvent	aEvent) {/**/}
28
+    public void onProxyAfterServerStarting	(Abstract_Mod aMod, FMLServerStartingEvent		aEvent) {/**/}
29
+    public void onProxyAfterServerStarted	(Abstract_Mod aMod, FMLServerStartedEvent		aEvent) {/**/}
30
+    public void onProxyAfterServerStopping	(Abstract_Mod aMod, FMLServerStoppingEvent		aEvent) {/**/}
31
+    public void onProxyAfterServerStopped	(Abstract_Mod aMod, FMLServerStoppedEvent		aEvent) {/**/}
32 32
 }

+ 212
- 212
src/main/java/gregapi/api/example/Example_Mod.java View File

@@ -1,213 +1,213 @@
1
-package gregapi.api.example;
2
-
3
-import gregapi.code.ModData;
4
-
5
-/**
6
- * @author Max Mustermann
7
- * 
8
- * An example implementation for a Mod using my System. Copy and rename this File into your source Directory.
9
- * 
10
- * If you have ANY Problems with the examples here, then you can contact me on the Forums or IRC.
11
- * 
12
- * You may ask yourself why there are no imports on this File.
13
- * I decided to do that, so Beginners cannot mess up by choosing wrong imports when they copy and paste Stuff.
14
- * Also I avoided creating Variables, because people tend to copy them over for no reason, because they don't understand what they were for, and that they could be removed easily.
15
- * 
16
- * Note: it is important to load after "gregapi_post".
17
- * 
18
- * Note: There are NO TEXTURES contained in GT that correspond to the Examples. Those you will have to do or copy them yourself.
19
- * 
20
- * uncomment the @cpw.mods.fml.common.Mod-Annotation for actual usage.
21
- */
22
-//@cpw.mods.fml.common.Mod(modid=Example_Mod.MOD_ID, name=Example_Mod.MOD_NAME, version=Example_Mod.VERSION, dependencies="required-after:gregapi_post")
23
-public final class Example_Mod extends gregapi.api.Abstract_Mod {
24
-	/** Your Mod-ID has to be LOWERCASE and without Spaces. Uppercase Chars and Spaces can create problems with Resource Packs. This is a vanilla forge "Issue". */
25
-	public static final String MOD_ID = "insert_your_modid_here"; // <-- TODO: you need to change this to the ID of your own Mod, and then remove this Comment after you did that.
26
-	/** This is your Mods Name */
27
-	public static final String MOD_NAME = "Insert_your_Mod_Name_here"; // <-- TODO: you need to change this to the Name of your own Mod, and then remove this Comment after you did that.
28
-	/** This is your Mods Version */
29
-	public static final String VERSION = "EXAMPLE-MC1710"; // <-- TODO: you need to change this to the Version of your own Mod, and then remove this Comment after you did that.
30
-	/** Contains a ModData Object for ID and Name. Doesn't have to be changed. */
31
-	public static ModData MOD_DATA = new ModData(MOD_ID, MOD_NAME);
32
-	
33
-	@cpw.mods.fml.common.SidedProxy(modId = MOD_ID, clientSide = "gregapi.api.example.Example_Proxy_Client", serverSide = "gregapi.api.example.Example_Proxy_Server")
34
-    public static gregapi.api.Abstract_Proxy PROXY;
35
-	
36
-	@Override public String getModID() {return MOD_ID;}
37
-	@Override public String getModName() {return MOD_NAME;}
38
-	@Override public String getModNameForLog() {return "Example_Mod";}
39
-	@Override public gregapi.api.Abstract_Proxy getProxy() {return PROXY;}
40
-	
41
-	// Do not change these 7 Functions. Just keep them this way.
42
-	@cpw.mods.fml.common.Mod.EventHandler public final void onPreLoad			(cpw.mods.fml.common.event.FMLPreInitializationEvent	aEvent) {onModPreInit(aEvent);}
43
-	@cpw.mods.fml.common.Mod.EventHandler public final void onLoad				(cpw.mods.fml.common.event.FMLInitializationEvent		aEvent) {onModInit(aEvent);}
44
-	@cpw.mods.fml.common.Mod.EventHandler public final void onPostLoad			(cpw.mods.fml.common.event.FMLPostInitializationEvent	aEvent) {onModPostInit(aEvent);}
45
-	@cpw.mods.fml.common.Mod.EventHandler public final void onServerStarting	(cpw.mods.fml.common.event.FMLServerStartingEvent		aEvent) {onModServerStarting(aEvent);}
46
-	@cpw.mods.fml.common.Mod.EventHandler public final void onServerStarted		(cpw.mods.fml.common.event.FMLServerStartedEvent		aEvent) {onModServerStarted(aEvent);}
47
-	@cpw.mods.fml.common.Mod.EventHandler public final void onServerStopping	(cpw.mods.fml.common.event.FMLServerStoppingEvent		aEvent) {onModServerStopping(aEvent);}
48
-	@cpw.mods.fml.common.Mod.EventHandler public final void onServerStopped		(cpw.mods.fml.common.event.FMLServerStoppedEvent		aEvent) {onModServerStopped(aEvent);}
49
-	
50
-	@Override
51
-	public void onModPreInit2(cpw.mods.fml.common.event.FMLPreInitializationEvent aEvent) {
52
-		// If you want to make yourself a new OreDict Prefix for your Component Items or similar.
53
-		final gregapi.oredict.OreDictPrefix tExamplePrefix = gregapi.oredict.OreDictPrefix.createPrefix("exampleprefix"); // This newly created OreDict Prefix is named "exampleprefix", so an Aluminium Item with this Prefix would be named "exampleprefixAluminium" in the OreDict.
54
-		tExamplePrefix.setCategoryName("Examples"); // That is what the Creative Tab of it would be named.
55
-		tExamplePrefix.setLocalItemName("Small ", " Example"); // Generic Items will follow this naming Guideline, so for example "Small Aluminium Example" for an Aluminium Item with that Prefix.
56
-		tExamplePrefix.setCondition(gregapi.code.ICondition.TRUE); // The Condition under which Items of this Prefix should generate in general. In this case TRUE to have ALL the Items.
57
-		tExamplePrefix.add(gregapi.data.TD.Prefix.UNIFICATABLE); // OreDict Unification can apply to this Prefix.
58
-		tExamplePrefix.add(gregapi.data.TD.Prefix.RECYCLABLE); // Items of this can be recycled for Resources.
59
-		tExamplePrefix.setMaterialStats(gregapi.data.CS.U); // Any Item of this example Prefix has the value of 1 Material Unit (U), this is exactly equal to one Ingot/Dust/Gem.
60
-		tExamplePrefix.aspects(gregapi.data.TC.FABRICO, 1); // Thaumcraft Aspects related to this Prefix.
61
-		tExamplePrefix.setStacksize(16, 8); // Sets the Maximum ItemStack Size of this Prefix to 16, and allows the Config to go as far down as 8 when people manually select a StackSize using it.
62
-		
63
-		// If you want to make yourself a new OreDict Material. Please look up proper IDs. So replace 32766 with a Number inside YOUR own ID Range. (you can look that up in gregapi.oredict.OreDictMaterial.java)
64
-		final gregapi.oredict.OreDictMaterial tExamplium = gregapi.oredict.OreDictMaterial.createMaterial(32766, "Examplium", "Examplium"); // Creates a Material called "Examplium".
65
-		tExamplium.setTextures(gregapi.render.TextureSet.SET_METALLIC); // gives this Material the Metallic Texture Set.
66
-		tExamplium.setRGBa(100, 100, 200,   0); // Sets the RGBa Color of the Material. In this case some random blue Color.
67
-		tExamplium.put(gregapi.data.TD.Processing.SMITHABLE); // This Material is smithable like regular Metal things.
68
-		tExamplium.put(gregapi.data.TD.Processing.MELTING); // This Material can melt.
69
-		tExamplium.put(gregapi.data.TD.Processing.FURNACE); // This Material can be molten in a regular Furnace.
70
-		tExamplium.put(gregapi.data.TD.Processing.CENTRIFUGE); // This Material can be centrifuged to recycle it.
71
-		tExamplium.put(gregapi.data.TD.Compounds.DECOMPOSABLE); // This Material can be decomposed in general.
72
-		tExamplium.put(gregapi.data.TD.ItemGenerator.G_INGOT_MACHINE_ORES); // This Material is a typical Ingot, that can be used for Machine Parts, and the Material can be found as Ore too.
73
-		tExamplium.heat(2000, 4000); // This Material melts at 2000 Kelvin and Boils at 4000 Kelvin.
74
-		tExamplium.qual(3 // Type 3 = The Material can be used for every Type of Tool 
75
-					, 6.0 // Speed is 6.0 what is as fast as Steel at mining stuff
76
-					, 512 // Durability is 512 what equals Steel too
77
-					, 3); // Quality is 3 for Diamond Tool Level
78
-		tExamplium.setMcfg(0, gregapi.data.MT.Steel, 1*gregapi.data.CS.U); // This Material consists out of one Unit of Steel.
79
-		tExamplium.setOriginalMod(MOD_DATA); // Gives your Mod the credit for creating this Material.
80
-		tExamplium.aspects(gregapi.data.TC.METALLUM, 3); // Thaumcraft Aspects related to this Material.
81
-		
82
-		// If you want to make your Prefix an Item
83
-		// Creates the generic Item for the new Prefix. Assets go into "/assets/insert_your_modid_here/textures/items/materialicons". And yes, every TextureSet for every Material Type has its own Folder.
84
-		new gregapi.item.prefixitem.PrefixItem(MOD_ID, MOD_ID, "example.meta.item.exampleprefix", tExamplePrefix, gregapi.oredict.OreDictMaterial.MATERIAL_ARRAY);
85
-		
86
-		// If you want to make your Prefix a Block
87
-		// Creates the generic Block for the new Prefix. Assets go into "/assets/insert_your_modid_here/textures/blocks/materialicons". And yes, every TextureSet for every Material Type has its own Folder.
88
-		new gregapi.block.prefixblock.PrefixBlock_(MOD_ID, MOD_ID, "example.meta.block.exampleprefix", tExamplePrefix, null, null, null, null, net.minecraft.block.material.Material.rock, net.minecraft.block.Block.soundTypeStone, gregapi.data.CS.TOOL_pickaxe, 1.5F, 4.5F,   0,   0, 999, 0, 0, 0, 1, 1, 1, false, false, false, false, true, true, true, true, true, true, false, true, true, true, gregapi.oredict.OreDictMaterial.MATERIAL_ARRAY); 
89
-		
90
-		// You may think that you don't want to add all the PrefixItems for all the Materials, since you only need certain ones yourself and don't want a clutter like the one GregTech itself causes.
91
-		// No Problem, you can add single Items too, if you just need those.
92
-		// Assets go into "/assets/insert_your_modid_here/textures/items/example.multiitem.resources/..."
93
-		// The Textures themselves are just the IDs you insert down there. So "0.png" for the Tiny Pile of Examplium Dust.
94
-		new gregapi.item.multiitem.MultiItemRandom(MOD_ID, "example.multiitem.resources") {@Override public void addItems() {
95
-		// Did you know that you can use a variable from outside this Block by just making it "final"? I didn't, but now I know more and use tExamplium, even though it wouldn't be accessible otherwise.
96
-		// And yes you can use all the 32766 possible Meta-IDs of this Item.
97
-		addItem(    0, "Tiny Pile of Examplium Dust"	, "", gregapi.data.OP.dustTiny	.dat(tExamplium));
98
-		addItem(    1, "Small Pile of Examplium Dust"	, "", gregapi.data.OP.dustSmall	.dat(tExamplium));
99
-		addItem(    2, "Examplium Dust"					, "", gregapi.data.OP.dust		.dat(tExamplium));
100
-		addItem(    3, "Examplium Nugget"				, "", gregapi.data.OP.nugget	.dat(tExamplium));
101
-		addItem(    4, "Examplium Chunk"				, "", gregapi.data.OP.chunkGt	.dat(tExamplium));
102
-		addItem(    5, "Examplium Ingot"				, "", gregapi.data.OP.ingot		.dat(tExamplium));
103
-		addItem(    6, "Examplium Plate"				, "", gregapi.data.OP.plate		.dat(tExamplium));
104
-		addItem(    7, "Examplium Rod"					, "", gregapi.data.OP.stick		.dat(tExamplium));
105
-		addItem(    8, "Examplium Ring"					, "", gregapi.data.OP.ring		.dat(tExamplium));
106
-		
107
-		// Here would be a right place to add Crafting Recipes or Machine Recipes using your new Items.
108
-		
109
-		// Crafting the Dusts together.
110
-		gregapi.util.CR.shapeless(gregapi.data.OP.dust.mat(tExamplium, 1), gregapi.util.CR.DEF, new Object[] {gregapi.data.OP.dustTiny.dat(tExamplium), gregapi.data.OP.dustTiny.dat(tExamplium), gregapi.data.OP.dustTiny.dat(tExamplium), gregapi.data.OP.dustTiny.dat(tExamplium), gregapi.data.OP.dustTiny.dat(tExamplium), gregapi.data.OP.dustTiny.dat(tExamplium), gregapi.data.OP.dustTiny.dat(tExamplium), gregapi.data.OP.dustTiny.dat(tExamplium), gregapi.data.OP.dustTiny.dat(tExamplium)});
111
-		gregapi.util.CR.shapeless(gregapi.data.OP.dust.mat(tExamplium, 1), gregapi.util.CR.DEF, new Object[] {gregapi.data.OP.dustSmall.dat(tExamplium), gregapi.data.OP.dustSmall.dat(tExamplium), gregapi.data.OP.dustSmall.dat(tExamplium), gregapi.data.OP.dustSmall.dat(tExamplium)});
112
-		
113
-		// Smelting the Dusts into Ingots/Nuggets
114
-		gregapi.data.RM.add_smelting(gregapi.util.ST.make(this, 1, 0), gregapi.util.ST.make(this, 1, 3));
115
-		gregapi.data.RM.add_smelting(gregapi.util.ST.make(this, 1, 1), gregapi.util.ST.make(this, 1, 4));
116
-		gregapi.data.RM.add_smelting(gregapi.util.ST.make(this, 1, 2), gregapi.util.ST.make(this, 1, 5));
117
-		}};
118
-		
119
-		// This gives you your very own 32767 Machine IDs.
120
-		new gregapi.block.multitileentity.MultiTileEntityRegistry("example.multitileentity");
121
-		
122
-		// Every Machine can have another Block, vanilla-material, vanilla-step-sound or Harvest Tool
123
-		gregapi.block.multitileentity.MultiTileEntityBlock.getOrCreate(MOD_ID, "iron"		, net.minecraft.block.material.Material.iron	, net.minecraft.block.Block.soundTypeMetal	, gregapi.data.CS.TOOL_pickaxe	, 0, 0, 15, false, false);
124
-		gregapi.block.multitileentity.MultiTileEntityBlock.getOrCreate(MOD_ID, "machine"	, gregapi.block.MaterialMachines.instance		, net.minecraft.block.Block.soundTypeMetal	, gregapi.data.CS.TOOL_cutter	, 0, 0, 15, false, false);
125
-		gregapi.block.multitileentity.MultiTileEntityBlock.getOrCreate(MOD_ID, "machine"	, gregapi.block.MaterialMachines.instance		, net.minecraft.block.Block.soundTypeMetal	, gregapi.data.CS.TOOL_wrench	, 0, 0, 15, false, false);
126
-	}
127
-	
128
-	@Override
129
-	public void onModInit2(cpw.mods.fml.common.event.FMLInitializationEvent aEvent) {
130
-		// Gets your initialised Registry.
131
-		gregapi.block.multitileentity.MultiTileEntityRegistry tExampleRegistry = gregapi.block.multitileentity.MultiTileEntityRegistry.getRegistry("example.multitileentity");
132
-		
133
-		// Gets your Examplium by Name if you initialised it above.
134
-		gregapi.oredict.OreDictMaterial tExamplium = gregapi.oredict.OreDictMaterial.get("Examplium");
135
-		
136
-		// YES this Registry Stuff can and should be in @Init. That way, all the OreDict Items needed for Crafting Recipes are available and registered.
137
-		
138
-		// Take the Metal Block from the Set, that you initialised above in @PreInit.
139
-		gregapi.block.multitileentity.MultiTileEntityBlock tMetalBlock = gregapi.block.multitileentity.MultiTileEntityBlock.getOrCreate(MOD_ID, "iron", net.minecraft.block.material.Material.iron, net.minecraft.block.Block.soundTypeMetal, gregapi.data.CS.TOOL_pickaxe, 0, 0, 15, false, false);
140
-		// Makes an Examplium Chest out of your Example Material.
141
-		// Note: the Crafting Recipe only works in conjunction with GT since you don't have the Stick, Ring and Plate PrefixItems.
142
-		tExampleRegistry.add(tExamplium.getLocal() + " Chest", "Chests", 0, 0, gregapi.block.multitileentity.example.MultiTileEntityChest.class, 0, 16, tMetalBlock, gregapi.util.UT.NBT.make(null, gregapi.data.CS.NBT_MATERIAL, tExamplium, gregapi.data.CS.NBT_INV_SIZE, 54, gregapi.data.CS.NBT_TEXTURE, "metalchest", gregapi.data.CS.NBT_HARDNESS, 6.0F, gregapi.data.CS.NBT_RESISTANCE, 6.0F, gregapi.data.CS.NBT_COLOR, gregapi.util.UT.Code.getRGBInt(tExamplium.fRGBaSolid)), "sPw", "RSR", "PPP", 'P', gregapi.data.OP.plate.dat(tExamplium), 'R', gregapi.data.OP.ring.dat(tExamplium), 'S', gregapi.data.OP.stick.dat(tExamplium));
143
-        
144
-		// Take the Machine Block from the Set, that you initialised above in @PreInit.
145
-		gregapi.block.multitileentity.MultiTileEntityBlock tMachineBlock = gregapi.block.multitileentity.MultiTileEntityBlock.getOrCreate(MOD_ID, "machine", gregapi.block.MaterialMachines.instance, net.minecraft.block.Block.soundTypeMetal, gregapi.data.CS.TOOL_wrench, 0, 0, 15, false, false);
146
-		// Makes a vanilla Furnace out of your Example Material.
147
-		// Note: the Crafting Recipe only works in conjunction with GT since you don't have all the PrefixItems.
148
-		// GUI has to be at: "/assets/insert_your_modid_here/textures/gui/machines/Oven.png"
149
-		// Block Textures have to be at: "/assets/gregtech/textures/blocks/machines/basicmachines/oven/..." Yes that is not a Typo, it is actually the GregTech Mod-ID in that path. I noticed that flaw way too late to fix it. And look at how GT has the Textures for its Oven for Details.
150
-		tExampleRegistry.add("Oven ("+tExamplium.getLocal()+")", "Example Mod", 1, 0, gregapi.tileentity.machines.MultiTileEntityBasicMachine.class, tExamplium.mToolQuality, 16, tMachineBlock, gregapi.util.UT.NBT.make(null, gregapi.data.CS.NBT_MATERIAL, tExamplium, gregapi.data.CS.NBT_HARDNESS, 6.0F, gregapi.data.CS.NBT_RESISTANCE, 6.0F, gregapi.data.CS.NBT_COLOR, gregapi.util.UT.Code.getRGBInt(tExamplium.fRGBaSolid), gregapi.data.CS.NBT_INPUT, 128, gregapi.data.CS.NBT_TEXTURE, "oven", gregapi.data.CS.NBT_GUI, MOD_ID+":textures/gui/machines/Oven", gregapi.data.CS.NBT_ENERGY_ACCEPTED, gregapi.data.TD.Energy.HU, gregapi.data.CS.NBT_RECIPEMAP, gregapi.data.RM.Furnace, gregapi.data.CS.NBT_EFFICIENCY, 10000, gregapi.data.CS.NBT_INV_SIDE_IN, gregapi.data.CS.SBIT_L, gregapi.data.CS.NBT_INV_SIDE_AUTO_IN, gregapi.data.CS.SIDE_LEFT, gregapi.data.CS.NBT_INV_SIDE_OUT, gregapi.data.CS.SBIT_R, gregapi.data.CS.NBT_INV_SIDE_AUTO_OUT, gregapi.data.CS.SIDE_RIGHT, gregapi.data.CS.NBT_ENERGY_ACCEPTED_SIDES, gregapi.data.CS.SBIT_D), "wMh", "BCB", 'M', gregapi.data.OP.casingMachine.dat(tExamplium), 'B', gregapi.util.ST.make(net.minecraft.init.Blocks.brick_block, 1, gregapi.data.CS.W), 'C', gregapi.data.OP.plateDouble.dat(gregapi.data.ANY.Cu));
151
-		
152
-		// The above just makes a vanilla Furnace that is made of Examplium, you cannot obtain the Examplium right now. For that you will need your own Recipe Handler.
153
-		gregapi.recipes.Recipe.RecipeMap tRecipeMap = new gregapi.recipes.Recipe.RecipeMap(null, "example.recipe.exampliumfurnace", "Examplium Furnace", null, 0, 1, MOD_ID+":textures/gui/machines/ExampliumFurnace",/*IN-OUT-MIN-ITEM=*/ 1, 1, 1,/*IN-OUT-MIN-FLUID=*/ 0, 0, 0,/*MIN*/ 0,/*AMP=*/ 1, "", 1, "", true, true, true, true);
154
-		// This Recipe will turn an Iron Ingot into an Examplium Ingot at 64 Units per Tick for 128 Ticks.
155
-		tRecipeMap.addRecipe1(true, 64, 128, gregapi.util.OM.ingot(gregapi.data.MT.Fe			), gregapi.util.OM.ingot(tExamplium));
156
-		// This Recipe will turn a Wrought Iron Ingot into an Examplium Ingot at 64 Units per Tick for 96 Ticks. So a slightly cheaper variant
157
-		tRecipeMap.addRecipe1(true, 64,  96, gregapi.util.OM.ingot(gregapi.data.MT.WroughtIron	), gregapi.util.OM.ingot(tExamplium));
158
-		// This Recipe will turn a Steel Ingot into an Examplium Ingot at 64 Units per Tick for 64 Ticks. So a cheaper variant
159
-		tRecipeMap.addRecipe1(true, 64,  64, gregapi.util.OM.ingot(gregapi.data.MT.Steel		), gregapi.util.OM.ingot(tExamplium));
160
-		
161
-		// Makes an Examplium Furnace out of Iron.
162
-		// Note: the Crafting Recipe only works in conjunction with GT since you don't have all the PrefixItems.
163
-		// GUI has to be at: "/assets/insert_your_modid_here/textures/gui/machines/Oven.png"
164
-		// Block Textures have to be at: "/assets/gregtech/textures/blocks/machines/basicmachines/exampliumfurnace/..." Yes that is not a Typo, it is actually the GregTech Mod-ID in that path. I noticed that flaw way too late to fix it. And look at how GT has the Textures for its Oven for Details.
165
-		tExampleRegistry.add("Examplium Furnace"			, "Example Mod", 2, 0, gregapi.tileentity.machines.MultiTileEntityBasicMachine			.class, gregapi.data.MT.Fe		.mToolQuality, 16, tMachineBlock, gregapi.util.UT.NBT.make(null, gregapi.data.CS.NBT_MATERIAL, gregapi.data.MT.Fe	, gregapi.data.CS.NBT_HARDNESS, 6.0F, gregapi.data.CS.NBT_RESISTANCE, 6.0F, gregapi.data.CS.NBT_COLOR, gregapi.util.UT.Code.getRGBInt(gregapi.data.MT.Fe	.fRGBaSolid), gregapi.data.CS.NBT_INPUT, 128, gregapi.data.CS.NBT_TEXTURE, "exampliumfurnace", gregapi.data.CS.NBT_GUI, MOD_ID+":textures/gui/machines/ExampliumFurnace", gregapi.data.CS.NBT_ENERGY_ACCEPTED, gregapi.data.TD.Energy.HU, gregapi.data.CS.NBT_RECIPEMAP, tRecipeMap, gregapi.data.CS.NBT_EFFICIENCY, 10000, gregapi.data.CS.NBT_INV_SIDE_IN, gregapi.data.CS.SBIT_L, gregapi.data.CS.NBT_INV_SIDE_AUTO_IN, gregapi.data.CS.SIDE_LEFT, gregapi.data.CS.NBT_INV_SIDE_OUT, gregapi.data.CS.SBIT_R, gregapi.data.CS.NBT_INV_SIDE_AUTO_OUT, gregapi.data.CS.SIDE_RIGHT, gregapi.data.CS.NBT_ENERGY_ACCEPTED_SIDES, gregapi.data.CS.SBIT_D), "wMh", "BCB", 'M', gregapi.data.OP.casingMachineDouble.dat(gregapi.data.MT.Fe		), 'B', gregapi.util.ST.make(net.minecraft.init.Blocks.brick_block, 1, gregapi.data.CS.W), 'C', gregapi.data.OP.plateDouble.dat(gregapi.data.ANY.Cu));
166
-		
167
-		// Makes an electric Examplium Furnace out of Steel.
168
-		// Note: the Crafting Recipe only works in conjunction with GT since you don't have all the PrefixItems.
169
-		tExampleRegistry.add("Electric Examplium Furnace"	, "Example Mod", 3, 0, gregapi.tileentity.machines.MultiTileEntityBasicMachineElectric	.class, gregapi.data.MT.Steel	.mToolQuality, 16, tMachineBlock, gregapi.util.UT.NBT.make(null, gregapi.data.CS.NBT_MATERIAL, gregapi.data.MT.Steel	, gregapi.data.CS.NBT_HARDNESS, 6.0F, gregapi.data.CS.NBT_RESISTANCE, 6.0F, gregapi.data.CS.NBT_COLOR, gregapi.util.UT.Code.getRGBInt(gregapi.data.MT.Steel	.fRGBaSolid), gregapi.data.CS.NBT_INPUT, 128, gregapi.data.CS.NBT_TEXTURE, "exampliumfurnace", gregapi.data.CS.NBT_GUI, MOD_ID+":textures/gui/machines/ExampliumFurnace", gregapi.data.CS.NBT_ENERGY_ACCEPTED, gregapi.data.TD.Energy.EU, gregapi.data.CS.NBT_RECIPEMAP, tRecipeMap, gregapi.data.CS.NBT_EFFICIENCY, 10000, gregapi.data.CS.NBT_INV_SIDE_IN, gregapi.data.CS.SBIT_L, gregapi.data.CS.NBT_INV_SIDE_AUTO_IN, gregapi.data.CS.SIDE_LEFT, gregapi.data.CS.NBT_INV_SIDE_OUT, gregapi.data.CS.SBIT_R, gregapi.data.CS.NBT_INV_SIDE_AUTO_OUT, gregapi.data.CS.SIDE_RIGHT, gregapi.data.CS.NBT_ENERGY_ACCEPTED_SIDES, gregapi.data.CS.SBIT_D), "wMh", "BCB", 'M', gregapi.data.OP.casingMachineDouble.dat(gregapi.data.MT.Steel	), 'B', gregapi.util.ST.make(net.minecraft.init.Blocks.brick_block, 1, gregapi.data.CS.W), 'C', gregapi.data.MT.DATA.CIRCUITS[1]);
170
-		
171
-		// Makes a Flux Examplium Furnace out of Invar.
172
-		// Note: the Crafting Recipe only works in conjunction with GT since you don't have all the PrefixItems.
173
-		// Note: Since it takes RF, the Input has to be 4 times larger.
174
-		tExampleRegistry.add("Flux Examplium Furnace"		, "Example Mod", 4, 0, gregapi.tileentity.machines.MultiTileEntityBasicMachineFlux		.class, gregapi.data.MT.Invar	.mToolQuality, 16, tMachineBlock, gregapi.util.UT.NBT.make(null, gregapi.data.CS.NBT_MATERIAL, gregapi.data.MT.Invar	, gregapi.data.CS.NBT_HARDNESS, 6.0F, gregapi.data.CS.NBT_RESISTANCE, 6.0F, gregapi.data.CS.NBT_COLOR, gregapi.util.UT.Code.getRGBInt(gregapi.data.MT.Invar	.fRGBaSolid), gregapi.data.CS.NBT_INPUT, 512, gregapi.data.CS.NBT_TEXTURE, "exampliumfurnace", gregapi.data.CS.NBT_GUI, MOD_ID+":textures/gui/machines/ExampliumFurnace", gregapi.data.CS.NBT_ENERGY_ACCEPTED, gregapi.data.TD.Energy.RF, gregapi.data.CS.NBT_RECIPEMAP, tRecipeMap, gregapi.data.CS.NBT_EFFICIENCY, 10000, gregapi.data.CS.NBT_INV_SIDE_IN, gregapi.data.CS.SBIT_L, gregapi.data.CS.NBT_INV_SIDE_AUTO_IN, gregapi.data.CS.SIDE_LEFT, gregapi.data.CS.NBT_INV_SIDE_OUT, gregapi.data.CS.SBIT_R, gregapi.data.CS.NBT_INV_SIDE_AUTO_OUT, gregapi.data.CS.SIDE_RIGHT, gregapi.data.CS.NBT_ENERGY_ACCEPTED_SIDES, gregapi.data.CS.SBIT_D), "wMh", "BCB", 'M', gregapi.data.OP.casingMachineDouble.dat(gregapi.data.MT.Invar	), 'B', gregapi.util.ST.make(net.minecraft.init.Blocks.brick_block, 1, gregapi.data.CS.W), 'C', gregapi.data.MT.DATA.CIRCUITS[3]);
175
-		
176
-		// Makes Examplium Fluid Pipes, which are as good as Stainless Steel ones of GT.
177
-		gregapi.tileentity.connectors.MultiTileEntityPipeFluid.addFluidPipes(30, 0, 250, true, true, false, true, false, true, true, tExampleRegistry, tMachineBlock, gregapi.tileentity.connectors.MultiTileEntityPipeFluid.class, (long)(tExamplium.mMeltingPoint * 1.25), tExamplium);
178
-		
179
-		// Makes Iron Item Pipes, which are as good as Brass ones. Why not Examplium? Because the Recipes would conflict with the Fluid Pipe above in that case.
180
-		gregapi.tileentity.connectors.MultiTileEntityPipeItem.addItemPipes(100, 0, 32768, 1, true, true, tExampleRegistry, tMetalBlock, gregapi.tileentity.connectors.MultiTileEntityPipeItem.class, gregapi.data.MT.Fe);
181
-		
182
-		// Take the Wire Block from the Set, that you initialised above in @PreInit.
183
-		gregapi.block.multitileentity.MultiTileEntityBlock tWireBlock = gregapi.block.multitileentity.MultiTileEntityBlock.getOrCreate(MOD_ID, "machine", gregapi.block.MaterialMachines.instance, net.minecraft.block.Block.soundTypeMetal, gregapi.data.CS.TOOL_cutter, 0, 0, 15, false, false);
184
-		
185
-		// Makes Examplium Wires, which can carry twice the Voltage of Steel and have a lower loss.
186
-		gregapi.tileentity.connectors.MultiTileEntityWireElectric.addElectricWires(50, 0, gregapi.data.CS.VMAX[4], 1, 2, 1, true, false, true, tExampleRegistry, tWireBlock, gregapi.tileentity.connectors.MultiTileEntityWireElectric.class, tExamplium);
187
-	}
188
-	
189
-	@Override
190
-	public void onModPostInit2(cpw.mods.fml.common.event.FMLPostInitializationEvent aEvent) {
191
-		// Insert your PostInit Code here and not above
192
-	}
193
-	
194
-	@Override
195
-	public void onModServerStarting2(cpw.mods.fml.common.event.FMLServerStartingEvent aEvent) {
196
-		// Insert your ServerStarting Code here and not above
197
-	}
198
-	
199
-	@Override
200
-	public void onModServerStarted2(cpw.mods.fml.common.event.FMLServerStartedEvent aEvent) {
201
-		// Insert your ServerStarted Code here and not above
202
-	}
203
-	
204
-	@Override
205
-	public void onModServerStopping2(cpw.mods.fml.common.event.FMLServerStoppingEvent aEvent) {
206
-		// Insert your ServerStopping Code here and not above
207
-	}
208
-	
209
-	@Override
210
-	public void onModServerStopped2(cpw.mods.fml.common.event.FMLServerStoppedEvent aEvent) {
211
-		// Insert your ServerStopped Code here and not above
212
-	}
1
+package gregapi.api.example;
2
+
3
+import gregapi.code.ModData;
4
+
5
+/**
6
+ * @author Max Mustermann
7
+ * 
8
+ * An example implementation for a Mod using my System. Copy and rename this File into your source Directory.
9
+ * 
10
+ * If you have ANY Problems with the examples here, then you can contact me on the Forums or IRC.
11
+ * 
12
+ * You may ask yourself why there are no imports on this File.
13
+ * I decided to do that, so Beginners cannot mess up by choosing wrong imports when they copy and paste Stuff.
14
+ * Also I avoided creating Variables, because people tend to copy them over for no reason, because they don't understand what they were for, and that they could be removed easily.
15
+ * 
16
+ * Note: it is important to load after "gregapi_post".
17
+ * 
18
+ * Note: There are NO TEXTURES contained in GT that correspond to the Examples. Those you will have to do or copy them yourself.
19
+ * 
20
+ * uncomment the @cpw.mods.fml.common.Mod-Annotation for actual usage.
21
+ */
22
+//@cpw.mods.fml.common.Mod(modid=Example_Mod.MOD_ID, name=Example_Mod.MOD_NAME, version=Example_Mod.VERSION, dependencies="required-after:gregapi_post")
23
+public final class Example_Mod extends gregapi.api.Abstract_Mod {
24
+	/** Your Mod-ID has to be LOWERCASE and without Spaces. Uppercase Chars and Spaces can create problems with Resource Packs. This is a vanilla forge "Issue". */
25
+	public static final String MOD_ID = "insert_your_modid_here"; // <-- TODO: you need to change this to the ID of your own Mod, and then remove this Comment after you did that.
26
+	/** This is your Mods Name */
27
+	public static final String MOD_NAME = "Insert_your_Mod_Name_here"; // <-- TODO: you need to change this to the Name of your own Mod, and then remove this Comment after you did that.
28
+	/** This is your Mods Version */
29
+	public static final String VERSION = "EXAMPLE-MC1710"; // <-- TODO: you need to change this to the Version of your own Mod, and then remove this Comment after you did that.
30
+	/** Contains a ModData Object for ID and Name. Doesn't have to be changed. */
31
+	public static ModData MOD_DATA = new ModData(MOD_ID, MOD_NAME);
3