mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-14 09:05:17 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c3eed2f0da | ||
|
|
ad40f24fb1 | ||
|
|
509cc79112 | ||
|
|
cce0f7a2ed | ||
|
|
7f52bc6547 | ||
|
|
7298b21cb5 | ||
|
|
af1e769895 | ||
|
|
d2248c3774 | ||
|
|
1cd0bf9ee4 | ||
|
|
097c0c6130 | ||
|
|
a54b939ea3 | ||
|
|
95825e5de0 | ||
|
|
54e9a36b67 | ||
|
|
53227982e3 | ||
|
|
bcecf59a87 | ||
|
|
5562c14c45 | ||
|
|
d8ca68b280 | ||
|
|
6a8a9b3097 | ||
|
|
cb609dbab3 | ||
|
|
c7790f7b35 | ||
|
|
4f6784b733 | ||
|
|
56f35f4401 | ||
|
|
f8473adf6f | ||
|
|
b665026378 | ||
|
|
1dcc9abab2 | ||
|
|
80ba13be89 | ||
|
|
d67c57827a | ||
|
|
f0ae51bb34 | ||
|
|
7c4d643de2 | ||
|
|
86c09722a0 | ||
|
|
d6ee373e87 | ||
|
|
9032f7e37e | ||
|
|
82537e5763 | ||
|
|
bf779e6803 | ||
|
|
a319adba53 | ||
|
|
94eadab9fd | ||
|
|
8db720151d | ||
|
|
2ed4f39a13 | ||
|
|
0632f2aadf | ||
|
|
bf6c31c879 | ||
|
|
c6d64cd94a | ||
|
|
cef50616d8 | ||
|
|
3631955641 | ||
|
|
46840fb71a | ||
|
|
5fd04595f2 | ||
|
|
ea75a3be69 | ||
|
|
c356105e6d | ||
|
|
dcda451a0a | ||
|
|
2302963a9f | ||
|
|
b9d1d92654 | ||
|
|
3f163fd41e | ||
|
|
4c4223a817 | ||
|
|
724405d6d8 | ||
|
|
3254e2acc6 | ||
|
|
12cd28715a | ||
|
|
01f4a627be | ||
|
|
2324c2fd20 | ||
|
|
bb3596b31e | ||
|
|
30bc2653c5 | ||
|
|
ee61baee73 | ||
|
|
f8447264e6 | ||
|
|
4416537776 | ||
|
|
606b402c2d | ||
|
|
31faf63e94 | ||
|
|
e6681ada93 | ||
|
|
7a960edb35 | ||
|
|
a703367553 | ||
|
|
8e9feb21fa | ||
|
|
d967c6d5d4 | ||
|
|
5087f30ca5 | ||
|
|
413f380781 | ||
|
|
8187f48ddc | ||
|
|
a2e06d968e | ||
|
|
ff42107b92 | ||
|
|
cf4c0ca001 | ||
|
|
321665efff | ||
|
|
55e707cc07 | ||
|
|
0af45cbf25 | ||
|
|
d58ad8db68 | ||
|
|
57d1a657a0 | ||
|
|
a13ed35031 | ||
|
|
21173c3b65 | ||
|
|
02e9b9d99c | ||
|
|
97ef6a5d1f | ||
|
|
5549b06f96 | ||
|
|
e2818a2803 | ||
|
|
d878a2ae26 | ||
|
|
81f9f3f20d | ||
|
|
eb26b3ca0f | ||
|
|
7e5a2cb5ca | ||
|
|
2ecc92c4b3 | ||
|
|
cb2d5992d2 | ||
|
|
cde6be7742 | ||
|
|
4f2feee931 | ||
|
|
1351215182 | ||
|
|
91fe229bf0 | ||
|
|
85d7b69d19 | ||
|
|
c5a980f8a4 | ||
|
|
8c5038c301 | ||
|
|
f227f4ff72 | ||
|
|
aa40a8edd7 | ||
|
|
44c4011575 | ||
|
|
1280462ec7 | ||
|
|
c713309769 | ||
|
|
b4dc15a9cb | ||
|
|
22e99a2cff | ||
|
|
68dfcccd57 | ||
|
|
84c3ef0f5c | ||
|
|
231ec7eaea | ||
|
|
9815d729b5 | ||
|
|
11d237f5f2 | ||
|
|
0d06ea6758 | ||
|
|
b5af11a89d | ||
|
|
f6ab01843c | ||
|
|
f9024d2eb3 | ||
|
|
918d59d6a6 | ||
|
|
4320a0f1ed | ||
|
|
2abca14a05 | ||
|
|
e70fb50b51 | ||
|
|
82d83feab1 | ||
|
|
b5815a3b8d | ||
|
|
aeff5272f3 | ||
|
|
059ba15b5a | ||
|
|
e24c38bbb0 | ||
|
|
c4742aadbc | ||
|
|
62d0f01236 | ||
|
|
1246f1a791 | ||
|
|
8b70d770d5 | ||
|
|
6e68d8fe74 | ||
|
|
48b82567d2 | ||
|
|
07ccf667e4 | ||
|
|
7689ea4f28 | ||
|
|
767d733948 | ||
|
|
904a30123d | ||
|
|
a3a16d6593 | ||
|
|
13d7530e43 | ||
|
|
eb73c30b28 | ||
|
|
06a2af3386 | ||
|
|
41e971ecc9 | ||
|
|
39e77bf468 | ||
|
|
f4c59a3a5d | ||
|
|
deb26f5c80 | ||
|
|
41c3846c51 | ||
|
|
02e6d581d3 | ||
|
|
c5ee4e6451 | ||
|
|
fe7f713b67 | ||
|
|
da03639bd7 | ||
|
|
a26c4017b1 | ||
|
|
ce40f91fb0 | ||
|
|
8f94ff14ff | ||
|
|
df56bea102 | ||
|
|
7258d577cd | ||
|
|
b77b036459 | ||
|
|
3a5b7427a1 | ||
|
|
e80f66778b | ||
|
|
bf63855292 | ||
|
|
a8a69775a1 | ||
|
|
c976ec494e | ||
|
|
8000e22830 | ||
|
|
9deb54b75f | ||
|
|
632c190e6f | ||
|
|
b6f91817f0 | ||
|
|
426340fed5 | ||
|
|
13c7d038eb | ||
|
|
5147742049 | ||
|
|
41bd8a41fa | ||
|
|
49d4005805 | ||
|
|
dee0b2084b | ||
|
|
5670868c5e | ||
|
|
1f20abde59 | ||
|
|
112c41a707 | ||
|
|
aa8eaf2b28 | ||
|
|
d08cf58d80 | ||
|
|
d31ca0dbd8 | ||
|
|
df05edaa11 | ||
|
|
adddfab850 | ||
|
|
4c4d1096a7 | ||
|
|
f20b40fb80 | ||
|
|
e833ee81fb | ||
|
|
c474da04b3 | ||
|
|
98125a97c9 | ||
|
|
1a6c816bac | ||
|
|
bc05bfda4f | ||
|
|
ffbad6633d | ||
|
|
b1aa31215f | ||
|
|
ff19efe146 | ||
|
|
95b30f5153 | ||
|
|
e6d8fde415 | ||
|
|
b6664c76c5 | ||
|
|
cbe2766c0a | ||
|
|
8a11ad7a7a | ||
|
|
3d03461a52 | ||
|
|
f466a0c387 | ||
|
|
729fca7722 | ||
|
|
d790008353 | ||
|
|
479c7f8b54 | ||
|
|
d0a33c4d9d | ||
|
|
c3141b6ed6 | ||
|
|
cf8972262a | ||
|
|
bdbcf31fc2 | ||
|
|
6dc50ace6b | ||
|
|
51653fb9b7 | ||
|
|
12e6fe9db7 | ||
|
|
c3b15e3f6c | ||
|
|
a92f2a263b | ||
|
|
945d3887d2 | ||
|
|
887f3bf31d | ||
|
|
a9d5d0097d | ||
|
|
3d972a11a8 | ||
|
|
7a20543d5f | ||
|
|
4c1e3ac7db | ||
|
|
d6a6316771 | ||
|
|
459e20df3f | ||
|
|
7d5b860ff3 | ||
|
|
6fc96ef94e | ||
|
|
5214ed29b7 | ||
|
|
6b10b41b02 | ||
|
|
ef2bcb056d | ||
|
|
da19eda51e | ||
|
|
b75593b0c6 | ||
|
|
a96ba1b7f7 | ||
|
|
7c7547227c | ||
|
|
cf568ae85f | ||
|
|
8c82b0296a | ||
|
|
33e2e0b028 | ||
|
|
d1b220f6a3 | ||
|
|
d5a658b5ea | ||
|
|
dd365d7220 | ||
|
|
336eaa336b | ||
|
|
ebdcc11c80 | ||
|
|
ebe9b6d4cb | ||
|
|
7cc7ce3ba2 | ||
|
|
b9f5e152de | ||
|
|
76753c06df | ||
|
|
e280f72cfb | ||
|
|
d71384bc33 | ||
|
|
605457deec | ||
|
|
90829a3164 | ||
|
|
05f6ede2ea | ||
|
|
1e7fbb7018 | ||
|
|
385159c25e | ||
|
|
fb9ffa40fd | ||
|
|
eacffb2b6e | ||
|
|
fb7b47adb4 | ||
|
|
d70ca1a357 | ||
|
|
31a3a18ec7 | ||
|
|
5074f26ccd | ||
|
|
4315637f75 | ||
|
|
b7e8dcff7b | ||
|
|
5a9129f802 | ||
|
|
b175d265b9 | ||
|
|
e5ee9377fd | ||
|
|
edcb45640f | ||
|
|
d61a55b661 | ||
|
|
b312584ca4 | ||
|
|
ac5c7124de | ||
|
|
57d575f941 | ||
|
|
d41e51f47b | ||
|
|
90a88efd8a | ||
|
|
4b299529b7 | ||
|
|
589465bb81 | ||
|
|
0d320e2e31 | ||
|
|
4903febd96 | ||
|
|
bbe96a3577 | ||
|
|
b211aca5ce | ||
|
|
58ab3de7c1 | ||
|
|
ba8ae53867 | ||
|
|
7e600c0dd8 | ||
|
|
9a0a00c7a4 | ||
|
|
91927e6bc7 | ||
|
|
fc045f210d | ||
|
|
eecc691cdf | ||
|
|
7a6557a9e2 | ||
|
|
b45fd787f3 | ||
|
|
c2523c685a | ||
|
|
dfd62a3bd8 | ||
|
|
614bbcb0da | ||
|
|
9a859f8d5c | ||
|
|
5045d8df68 | ||
|
|
9908310384 | ||
|
|
7b18eab02d | ||
|
|
bd4b3debc3 | ||
|
|
5623634f56 | ||
|
|
87bbbfafcc | ||
|
|
2a85ab0eab | ||
|
|
65123c66a0 | ||
|
|
d72caa5005 | ||
|
|
e580d3b6b6 | ||
|
|
5eea9cebae | ||
|
|
b8fe3913e9 | ||
|
|
04d4b2cf76 | ||
|
|
81bb69b6c9 | ||
|
|
0cf1f0d51c | ||
|
|
c308a47124 | ||
|
|
cd313c195b | ||
|
|
9f571ff15d | ||
|
|
e2ee54a27d | ||
|
|
0f456b4684 | ||
|
|
8636eb1883 | ||
|
|
50677ad87a | ||
|
|
81eb6a8bb4 | ||
|
|
97f8c246b8 | ||
|
|
20bf76464a | ||
|
|
c4f370a7e6 | ||
|
|
9ebc77ef22 | ||
|
|
2fce67c8b7 | ||
|
|
a55536c0dc | ||
|
|
1ae0498534 | ||
|
|
c02c379bed | ||
|
|
c5ac5b0264 | ||
|
|
0fb705f8f5 | ||
|
|
bbfae84ee8 | ||
|
|
cab151ec44 | ||
|
|
7a733d635e | ||
|
|
44077774be | ||
|
|
37b4936e9d | ||
|
|
637e2c6f56 | ||
|
|
2bfa1ffc05 | ||
|
|
e55ee43fd5 | ||
|
|
204cb16bc4 | ||
|
|
ebef4553f3 | ||
|
|
fe2c4c569d | ||
|
|
b2033d642c | ||
|
|
74501f509f | ||
|
|
8f65678b99 | ||
|
|
510b5523d5 | ||
|
|
d7c4a06ce8 | ||
|
|
1582e401ed | ||
|
|
bae83e6724 | ||
|
|
16ff1be093 | ||
|
|
8bb34107f1 | ||
|
|
2c24c7618a | ||
|
|
240ed53a88 | ||
|
|
2cb971c38f | ||
|
|
7041fbc27e | ||
|
|
e519278888 | ||
|
|
4235ca36ea | ||
|
|
6527792d06 | ||
|
|
716dfdae47 | ||
|
|
c158af902f | ||
|
|
ed09a25c65 | ||
|
|
94dc49e522 | ||
|
|
40bc035d74 | ||
|
|
01aac69514 | ||
|
|
953ddae475 | ||
|
|
ab548afbfb | ||
|
|
f2eec981ff | ||
|
|
07038f8342 | ||
|
|
f59b0a2932 | ||
|
|
030084f2b3 | ||
|
|
bf63879a92 | ||
|
|
ed8b8bcf8f | ||
|
|
1dc7a80d4f | ||
|
|
87b55860af | ||
|
|
453ec39496 | ||
|
|
6ec1ec2575 | ||
|
|
e7724c13cc | ||
|
|
38a85280de | ||
|
|
20ea3bc0ce | ||
|
|
b45c90ceb8 | ||
|
|
e94288bbb1 | ||
|
|
d0902c096e | ||
|
|
c50adf2433 | ||
|
|
64263a9f8e | ||
|
|
114ac38910 | ||
|
|
1f6086c175 | ||
|
|
c84f7a740f | ||
|
|
16be913abc | ||
|
|
b3a1548cfa | ||
|
|
b94c2799ab | ||
|
|
d4f6e9e419 | ||
|
|
847c0246cd | ||
|
|
b985384fab | ||
|
|
851f9c1da6 | ||
|
|
acbb330214 | ||
|
|
db7d82a889 | ||
|
|
9ef7b13442 | ||
|
|
db42d1f532 | ||
|
|
7406e3df9f | ||
|
|
8b50f9ab36 | ||
|
|
fef959d1e9 | ||
|
|
f62ee5c4f5 | ||
|
|
486c0955cf | ||
|
|
0373920f99 | ||
|
|
1ad05f7f22 | ||
|
|
15a1d4cf0d | ||
|
|
1b689802a4 | ||
|
|
b35aec4347 | ||
|
|
ee1e229b66 | ||
|
|
e007f7cf39 | ||
|
|
5cd4564a32 | ||
|
|
26bc23602a | ||
|
|
d6bc936ffa | ||
|
|
581363fddd | ||
|
|
685a97fd93 | ||
|
|
897d41fa77 | ||
|
|
5064d33519 | ||
|
|
107e760aa3 | ||
|
|
9b53b7e111 | ||
|
|
63f2300794 | ||
|
|
61f9c5a201 | ||
|
|
267e1ee62f | ||
|
|
950da28d54 | ||
|
|
e2dc863086 | ||
|
|
f8cb411df1 | ||
|
|
41cae458a4 | ||
|
|
885d7602f9 | ||
|
|
e6eeb03108 | ||
|
|
f088b1b460 | ||
|
|
3c640fa32d | ||
|
|
d02636213a | ||
|
|
bd6630810f | ||
|
|
3331d2a496 | ||
|
|
f9b1e4e23b | ||
|
|
2bb090bf2b | ||
|
|
76f8843017 | ||
|
|
9fa51447a2 | ||
|
|
c608e7c04e | ||
|
|
19d7e16fa6 | ||
|
|
e3211eec04 | ||
|
|
89994bda39 | ||
|
|
df5e594e95 | ||
|
|
8d7b999506 | ||
|
|
2798fc4e49 | ||
|
|
61b2929ae6 | ||
|
|
1501f467cf | ||
|
|
306af4feee | ||
|
|
d3ab6d36a4 | ||
|
|
6a299a483a | ||
|
|
8944983d0f | ||
|
|
06398fa259 | ||
|
|
3bbf5c04a6 | ||
|
|
fe327fbd76 | ||
|
|
686db5e5eb | ||
|
|
5fe653cf82 | ||
|
|
58fdfb6fa1 | ||
|
|
dca8a4a550 | ||
|
|
4270f0fb4a | ||
|
|
dd49a0cd84 | ||
|
|
88a7c0b233 | ||
|
|
1b1fbbb70d | ||
|
|
815b97bf7c | ||
|
|
37075d0437 | ||
|
|
63e71af229 | ||
|
|
66a4db5fa0 | ||
|
|
55cbba0764 | ||
|
|
a297a615b9 | ||
|
|
c12bb689fb | ||
|
|
50215307f2 | ||
|
|
96cbadb874 | ||
|
|
50608986fe | ||
|
|
7bbe8df2b8 | ||
|
|
0543828603 | ||
|
|
7e9d2fb509 | ||
|
|
dcb2f2588c | ||
|
|
178acfbb20 | ||
|
|
57408af2a3 | ||
|
|
54af750717 | ||
|
|
1effc27790 | ||
|
|
61984561cd | ||
|
|
cd3bbfb02c | ||
|
|
81ab4cbc5f | ||
|
|
475d7fc02d | ||
|
|
b30b551197 | ||
|
|
3cd7f6bd87 | ||
|
|
277495c8e4 | ||
|
|
5c88164211 | ||
|
|
230d757a89 | ||
|
|
9671179453 | ||
|
|
eb12936a52 | ||
|
|
345d905438 | ||
|
|
6049d371f3 | ||
|
|
6d3494a853 | ||
|
|
37d63b3fe9 | ||
|
|
291c57b624 | ||
|
|
186f92479d | ||
|
|
7e9dfb1a11 | ||
|
|
806b4a3bdf | ||
|
|
433b7ca589 | ||
|
|
78db5732ca | ||
|
|
dfd42ab573 | ||
|
|
24802143eb | ||
|
|
a42cf1ae37 | ||
|
|
02ebc9ca21 | ||
|
|
1fd39578b0 | ||
|
|
1eb535f14f | ||
|
|
4f0e2fb9c4 | ||
|
|
f7395f517b | ||
|
|
defaddecec | ||
|
|
7506a5b7ad | ||
|
|
3fc40b955a | ||
|
|
38b9febfe5 | ||
|
|
e837b2e2cd | ||
|
|
75c7862e78 |
No files matched your search
+5
-1
@@ -3,6 +3,9 @@
|
||||
/.settings
|
||||
/.classpath
|
||||
|
||||
#In case people make their workspace in the repo
|
||||
/eclipse/
|
||||
|
||||
#idea
|
||||
/.idea
|
||||
*.iml
|
||||
@@ -12,13 +15,14 @@
|
||||
/.gradle
|
||||
|
||||
#occupational hazards
|
||||
/eclipse/
|
||||
/projects/
|
||||
/repo/
|
||||
/buildSrc
|
||||
|
||||
#Patch rejects
|
||||
*.rej
|
||||
/patches-/
|
||||
|
||||
# FML changelog
|
||||
changelog.txt
|
||||
/patches_old/
|
||||
|
||||
File renamed without changes.
File renamed without changes.
+319
-81
@@ -1,11 +1,6 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
maven {
|
||||
name = "central_mirrior"
|
||||
url = "http://uk.maven.org/maven2"
|
||||
}
|
||||
mavenCentral()
|
||||
mavenLocal()
|
||||
maven {
|
||||
name = "forge"
|
||||
url = "http://files.minecraftforge.net/maven"
|
||||
@@ -16,71 +11,238 @@ buildscript {
|
||||
}
|
||||
}
|
||||
dependencies {
|
||||
classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT'
|
||||
classpath 'net.minecraftforge.gradle:ForgeGradle:2.1-SNAPSHOT'
|
||||
}
|
||||
}
|
||||
|
||||
configurations {
|
||||
deployJars
|
||||
}
|
||||
|
||||
import static net.minecraftforge.gradle.dev.ForgeDevPlugin.*
|
||||
|
||||
apply plugin: 'maven'
|
||||
apply plugin: 'forgedev'
|
||||
|
||||
repositories {
|
||||
maven {
|
||||
name = "central_mirrior"
|
||||
url = "http://uk.maven.org/maven2"
|
||||
}
|
||||
mavenLocal()
|
||||
flatDir {
|
||||
name "fileRepo"
|
||||
dirs "repo"
|
||||
}
|
||||
maven {
|
||||
name = "local"
|
||||
url = "file:///home/cpw/projects/repo"
|
||||
}
|
||||
}
|
||||
apply plugin: "maven"
|
||||
apply plugin: "net.minecraftforge.gradle.patcher"
|
||||
apply plugin: "net.minecraftforge.gradle.launch4j"
|
||||
|
||||
minecraft {
|
||||
version = '1.8'
|
||||
mcpVersion = '9.10'
|
||||
mappings = 'snapshot_nodoc_20141130'
|
||||
fmlDir = projectDir.getAbsolutePath() + "/fml";
|
||||
mainClass = 'net.minecraftforge.fml.relauncher.ServerLaunchWrapper'
|
||||
tweakClass = 'net.minecraftforge.fml.common.launcher.FMLTweaker'
|
||||
version = "1.8.8"
|
||||
//mappings = 'stable_16'
|
||||
mappings = "snapshot_nodoc_20151122"
|
||||
workspaceDir = "projects"
|
||||
versionJson = "jsons/1.8.8-dev.json"
|
||||
buildUserdev = true
|
||||
buildInstaller = true
|
||||
installerVersion = "1.4"
|
||||
|
||||
def common = {
|
||||
patchPrefixOriginal "../src-base/minecraft"
|
||||
patchPrefixChanged "../src-work/minecraft"
|
||||
mainClassClient "net.minecraft.launchwrapper.Launch"
|
||||
tweakClassClient "net.minecraftforge.fml.common.launcher.FMLTweaker"
|
||||
mainClassServer "net.minecraft.launchwrapper.Launch"
|
||||
tweakClassServer "net.minecraftforge.fml.common.launcher.FMLServerTweaker"
|
||||
}
|
||||
|
||||
projects {
|
||||
forge {
|
||||
rootDir "."
|
||||
patchDir "patches/minecraft"
|
||||
patchAfter "clean"
|
||||
genPatchesFrom "clean"
|
||||
genMcpPatches = false
|
||||
applyMcpPatches = false
|
||||
with common
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
group = 'net.minecraftforge'
|
||||
version = getVersionFromJava(getProject(), 'src/main/java/net/minecraftforge/common/ForgeVersion.java')
|
||||
version = getVersionFromJava(file("src/main/java/net/minecraftforge/common/ForgeVersion.java"))
|
||||
|
||||
jenkins {
|
||||
job = 'minecraftforge'
|
||||
extractForgeSources { exclude "**/SideOnly.java", "**/Side.java" }
|
||||
|
||||
genGradleProjects { addTestCompileDep "junit:junit:4.12" }
|
||||
|
||||
processJson {
|
||||
releaseJson = "jsons/1.8.8-rel.json"
|
||||
addReplacements([
|
||||
"@minecraft_version@": project.minecraft.version,
|
||||
"@version@": project.version,
|
||||
"@project@": "forge",
|
||||
"@artifact@": "net.minecraftforge:forge:${project.version}",
|
||||
"@universal_jar@": { outputJar.archiveName },
|
||||
"@timestamp@": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"),
|
||||
])
|
||||
}
|
||||
|
||||
// crowdin stuff
|
||||
if (project.hasProperty("crowdinKey"))
|
||||
tasks.getLocalizations.apiKey = project.crowdinKey
|
||||
task changelog(type: JenkinsChangelog) {
|
||||
|
||||
// skip if there is no forge jenkins pass
|
||||
onlyIf {
|
||||
project.hasProperty('forgeJenkinsPass')
|
||||
// Not sure what abrar was trying to do here...
|
||||
//project.file("build/distributions/${project.name}-${project.version}-changelog.txt").text = ""
|
||||
}
|
||||
|
||||
outputs.upToDateWhen { false } // never up to date
|
||||
serverRoot = "http://ci.jenkins.minecraftforge.net/"
|
||||
jobName = "minecraftforge"
|
||||
targetBuild = System.env['BUILD_NUMBER'] ?: 0;
|
||||
authName = "console_script"
|
||||
authPassword = project.hasProperty('forgeJenkinsPass') ? project.getProperty('forgeJenkinsPass') : "";
|
||||
output = "build/distributions/${project.name}-${project.version}-changelog.txt"
|
||||
}
|
||||
|
||||
task crowdin(type: CrowdinDownload) {
|
||||
output = "build/crowdin.zip"
|
||||
projectId = 'minecraft-forge'
|
||||
extract = false // we wanna keep it as a zip. not extract it to a folder named "crowdin.zip"
|
||||
|
||||
// task auomatically skips if this is null
|
||||
if (project.hasProperty('crowdinKey'))
|
||||
apiKey = project.crowdinKey
|
||||
}
|
||||
|
||||
def extraTxts = [
|
||||
changelog, // yeah we can do thi, because gradle and groovy are awesome
|
||||
"LICENSE-fml.txt",
|
||||
"CREDITS-fml.txt",
|
||||
"MinecraftForge-Credits.txt",
|
||||
"MinecraftForge-License.txt",
|
||||
"Paulscode SoundSystem CodecIBXM License.txt",
|
||||
"Paulscode IBXM Library License.txt"
|
||||
]
|
||||
|
||||
outputJar {
|
||||
classifier = 'universal'
|
||||
from extraTxts
|
||||
|
||||
// add crowdin locales
|
||||
from { crowdin.getDidWork() ? zipTree(crowdin.output) : null}
|
||||
dependsOn 'crowdin'
|
||||
|
||||
manifest.attributes([
|
||||
"Main-Class": "net.minecraftforge.fml.relauncher.ServerLaunchWrapper",
|
||||
"TweakClass": "net.minecraftforge.fml.common.launcher.FMLTweaker",
|
||||
"Class-Path": getServerClasspath(file("jsons/${minecraft.version}-rel.json"))
|
||||
])
|
||||
}
|
||||
|
||||
installer {
|
||||
classifier = 'installer'
|
||||
from extraTxts
|
||||
from "src/main/resources/forge_logo.png"
|
||||
rename "forge_logo\\.png", "big_logo.png"
|
||||
}
|
||||
|
||||
task signUniversal(type: SignJar, dependsOn: 'outputJar') {
|
||||
onlyIf {
|
||||
project.hasProperty('jarsigner')
|
||||
}
|
||||
|
||||
def jarsigner = [:];
|
||||
|
||||
if (project.hasProperty('jarsigner'))
|
||||
jarsigner = project.jarsigner;
|
||||
|
||||
alias = 'forge'
|
||||
exclude "paulscode/**"
|
||||
storePass = jarsigner.storepass
|
||||
keyPass = jarsigner.keypass
|
||||
keyStore = jarsigner.keystore
|
||||
inputFile = outputJar.archivePath
|
||||
outputFile = outputJar.archivePath
|
||||
}
|
||||
uploadArchives.dependsOn signUniversal
|
||||
build.dependsOn signUniversal
|
||||
|
||||
// MDK package
|
||||
|
||||
import org.apache.tools.ant.filters.ReplaceTokens
|
||||
task makeMdk(type: Zip) {
|
||||
baseName = project.name
|
||||
classifier = "mdk"
|
||||
version = project.version
|
||||
destinationDir = file('build/distributions')
|
||||
|
||||
from 'gradlew'
|
||||
from 'gradlew.bat'
|
||||
into ('gradle') {
|
||||
from 'gradle'
|
||||
}
|
||||
into ('eclipse') {
|
||||
from 'mdk/eclipse'
|
||||
}
|
||||
from changelog.output
|
||||
from ('mdk') {
|
||||
filter(ReplaceTokens, tokens: [
|
||||
VERSION: project.version,
|
||||
MAPPINGS: minecraft.mappings.replace('nodoc_', '')
|
||||
])
|
||||
exclude 'eclipse'
|
||||
rename 'gitignore\\.txt', '.gitignore'
|
||||
from 'MinecraftForge-Credits.txt'
|
||||
from 'MinecraftForge-License.txt'
|
||||
from 'Paulscode IBXM Library License.txt'
|
||||
from 'Paulscode SoundSystem CodecIBXM License.txt'
|
||||
from 'CREDITS-fml.txt'
|
||||
from 'LICENSE-fml.txt'
|
||||
}
|
||||
}
|
||||
tasks.build.dependsOn makeMdk
|
||||
|
||||
// launch4j
|
||||
|
||||
launch4j {
|
||||
jar = installer.archivePath.canonicalPath
|
||||
outfile = file("build/distributions/${project.name}-${project.version}-installer-win.exe").canonicalPath
|
||||
icon = file('icon.ico').canonicalPath
|
||||
manifest = file('l4jManifest.xml').canonicalPath
|
||||
jreMinVersion = '1.6.0'
|
||||
initialHeapPercent = 5;
|
||||
maxHeapPercent = 100;
|
||||
}
|
||||
tasks.generateXmlConfig.dependsOn installer
|
||||
tasks.build.dependsOn 'launch4j'
|
||||
|
||||
// MAVEN
|
||||
|
||||
artifacts {
|
||||
archives changelog.output
|
||||
archives file("build/distributions/${project.name}-${project.version}-installer-win.exe")
|
||||
archives makeMdk
|
||||
}
|
||||
|
||||
task ciWriteBuildNumber << {
|
||||
def file = file("src/main/java/net/minecraftforge/common/ForgeVersion.java");
|
||||
def bn = System.getenv("BUILD_NUMBER")?:0;
|
||||
def outfile = "";
|
||||
def ln = System.getProperty('line.separator')
|
||||
|
||||
file.eachLine{ String s ->
|
||||
if (s.contains("buildVersion") && s.contains("= 0;")) {
|
||||
s = " public static final int buildVersion = ${bn};";
|
||||
}
|
||||
outfile += (s+ln);
|
||||
}
|
||||
file.write(outfile);
|
||||
}
|
||||
|
||||
uploadArchives {
|
||||
repositories {
|
||||
add getProject().repositories.mavenLocal()
|
||||
}
|
||||
repositories.mavenDeployer {
|
||||
configuration = configurations.deployJars
|
||||
|
||||
if (project.hasProperty("filesmaven")) {
|
||||
logger.info('Publishing to files server')
|
||||
repository(url: project.filesmaven.url) {
|
||||
authentication(userName: project.filesmaven.username, privateKey: project.filesmaven.key)
|
||||
dependsOn 'build'
|
||||
|
||||
if (project.hasProperty('forgeMavenPass'))
|
||||
{
|
||||
repository(url: "http://files.minecraftforge.net/maven/manage/upload") {
|
||||
authentication(userName: "forge", password: project.getProperty('forgeMavenPass')) // the elvis operator. look it up.
|
||||
}
|
||||
} else {
|
||||
logger.info('Publishing to repo folder')
|
||||
}
|
||||
else
|
||||
{
|
||||
// local repo folder. Might wanna juset use gradle install if you wanans end it to maven-local
|
||||
repository(url: 'file://localhost/' + project.file('repo').getAbsolutePath())
|
||||
}
|
||||
|
||||
@@ -88,49 +250,125 @@ uploadArchives {
|
||||
groupId = project.group
|
||||
version = project.version
|
||||
artifactId = project.archivesBaseName
|
||||
}
|
||||
pom.project {
|
||||
name project.archivesBaseName
|
||||
packaging 'jar'
|
||||
description 'Minecraft Forge API'
|
||||
url 'https://github.com/MinecraftForge/MinecraftForge'
|
||||
|
||||
scm {
|
||||
project {
|
||||
name project.archivesBaseName
|
||||
packaging 'jar'
|
||||
description 'Minecraft Forge API'
|
||||
url 'https://github.com/MinecraftForge/MinecraftForge'
|
||||
connection 'scm:git:git://github.com/MinecraftForge/MinecraftForge.git'
|
||||
developerConnection 'scm:git:[email protected]:MinecraftForge/MinecraftForge.git'
|
||||
}
|
||||
|
||||
issueManagement {
|
||||
system 'github'
|
||||
url 'https://github.com/MinecraftForge/MinecraftForge/issues'
|
||||
}
|
||||
scm {
|
||||
url 'https://github.com/MinecraftForge/MinecraftForge'
|
||||
connection 'scm:git:git://github.com/MinecraftForge/MinecraftForge.git'
|
||||
developerConnection 'scm:git:[email protected]:MinecraftForge/MinecraftForge.git'
|
||||
}
|
||||
|
||||
licenses {
|
||||
license {
|
||||
name 'Forge Public License'
|
||||
url 'https://raw.github.com/MinecraftForge/MinecraftForge/master/MinecraftForge-License.txt'
|
||||
distribution 'repo'
|
||||
issueManagement {
|
||||
system 'github'
|
||||
url 'https://github.com/MinecraftForge/MinecraftForge/issues'
|
||||
}
|
||||
}
|
||||
|
||||
developers {
|
||||
developer {
|
||||
id 'cpw'
|
||||
name 'cpw'
|
||||
roles { role 'developer' }
|
||||
licenses {
|
||||
license {
|
||||
name 'Forge Public License'
|
||||
url 'https://raw.github.com/MinecraftForge/MinecraftForge/master/MinecraftForge-License.txt'
|
||||
distribution 'repo'
|
||||
}
|
||||
}
|
||||
developer {
|
||||
id 'LexManos'
|
||||
name 'Lex Manos'
|
||||
roles { role 'developer' }
|
||||
}
|
||||
developer {
|
||||
id 'AbrarSyed'
|
||||
name 'Abrar Syed'
|
||||
roles { role 'contributor' }
|
||||
|
||||
developers {
|
||||
developer {
|
||||
id 'cpw'
|
||||
name 'cpw'
|
||||
roles { role 'developer' }
|
||||
}
|
||||
developer {
|
||||
id 'LexManos'
|
||||
name 'Lex Manos'
|
||||
roles { role 'developer' }
|
||||
}
|
||||
developer {
|
||||
id 'AbrarSyed'
|
||||
name 'Abrar Syed'
|
||||
roles { role 'contributor' }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// HELPER METHODS
|
||||
|
||||
import groovy.json.JsonSlurper;
|
||||
|
||||
String getServerClasspath(File file)
|
||||
{
|
||||
def node = new JsonSlurper().parse(file);
|
||||
def out = new StringBuilder()
|
||||
node.versionInfo.libraries.each { lib ->
|
||||
if (lib.serverreq)
|
||||
{
|
||||
// group : artifact : version
|
||||
def split = lib.name.split(':')
|
||||
def group = split[0].replace('.', '/')
|
||||
def artifact = split[1]
|
||||
def version = split[2]
|
||||
out += "libraries/$group/$artifact/$version/$artifact-${version}.jar "
|
||||
}
|
||||
}
|
||||
out += "minecraft_server.${minecraft.version}.jar"
|
||||
|
||||
return out.toString();
|
||||
}
|
||||
|
||||
String getVersionFromJava(File file)
|
||||
{
|
||||
String major = "0";
|
||||
String minor = "0";
|
||||
String revision = "0";
|
||||
String build = "0";
|
||||
|
||||
String prefix = "public static final int";
|
||||
file.eachLine{ String s ->
|
||||
s = s.trim();
|
||||
if (s.startsWith(prefix))
|
||||
{
|
||||
s = s.substring(prefix.length(), s.length() - 1);
|
||||
s = s.replace('=', ' ').replace("Version", "").replaceAll(" +", " ").trim();
|
||||
String[] pts = s.split(" ");
|
||||
|
||||
if (pts[0].equals("major")) major = pts[pts.length - 1];
|
||||
else if (pts[0] == "minor") minor = pts[pts.length - 1];
|
||||
else if (pts[0] == "revision") revision = pts[pts.length - 1];
|
||||
}
|
||||
}
|
||||
|
||||
if (System.getenv().containsKey("BUILD_NUMBER"))
|
||||
{
|
||||
build = System.getenv("BUILD_NUMBER");
|
||||
}
|
||||
|
||||
String branch = null;
|
||||
if (!System.getenv().containsKey("GIT_BRANCH"))
|
||||
{
|
||||
// TODO: use grgit
|
||||
branch = "git rev-parse --abbrev-ref HEAD".execute().text.trim()
|
||||
}
|
||||
else
|
||||
{
|
||||
branch = System.getenv("GIT_BRANCH");
|
||||
branch = branch.substring(branch.lastIndexOf('/') + 1);
|
||||
}
|
||||
|
||||
def out = "${minecraft.version.replace('-', '_')}-$major.$minor.$revision.$build"
|
||||
|
||||
if (branch && branch != 'master' && branch != 'HEAD')
|
||||
out += "-$branch"
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
// re-add old tasks for jenkins compat
|
||||
// should be remvoed, and the jenkisn fixed when no longer building with FG 1.2
|
||||
task setupForge { dependsOn 'setup' }
|
||||
task buildPackages { dependsOn 'build' }
|
||||
Binary file not shown.
@@ -1,14 +0,0 @@
|
||||
* text eol=lf
|
||||
*.bat text eol=crlf
|
||||
*.patch text eol=lf
|
||||
*.java text eol=lf
|
||||
*.gradle text eol=crlf
|
||||
*.png binary
|
||||
*.exe binary
|
||||
*.dll binary
|
||||
*.jar binary
|
||||
*.lzma binary
|
||||
*.zip binary
|
||||
*.pyd binary
|
||||
*.cfg text eol=lf
|
||||
*.py text eol=lf
|
||||
@@ -1,21 +0,0 @@
|
||||
#eclipse
|
||||
/bin
|
||||
/.settings
|
||||
/.classpath
|
||||
|
||||
#idea
|
||||
/.idea
|
||||
*.iml
|
||||
|
||||
#gradle
|
||||
/build
|
||||
/buildSrc
|
||||
/.gradle
|
||||
|
||||
#occupational hazards
|
||||
/eclipse/
|
||||
/repo/
|
||||
|
||||
|
||||
#Patch reject
|
||||
*.rej
|
||||
@@ -1,94 +0,0 @@
|
||||
This is Forge Mod Loader, or FML for short, by cpw.
|
||||
|
||||
More information can be found at https://github.com/MinecraftForge/FML/wiki
|
||||
|
||||
It is a clean reimplementation of a mod loading system for client and server.
|
||||
|
||||
It can be installed on its own, or as part of Minecraft Forge.
|
||||
|
||||
----------------------
|
||||
About Forge Mod Loader
|
||||
----------------------
|
||||
|
||||
Environments and compatibility
|
||||
==============================
|
||||
FML covers two main environments: client and server. All environments share
|
||||
the main mod loading code base, with additional varying hooks based on the
|
||||
specific environment.
|
||||
|
||||
There are some very visible changes to the client when FML is installed.
|
||||
|
||||
There are some bukkit compatibility hooks available, consult MCPC+, now known as Cauldron
|
||||
for more information.
|
||||
|
||||
Minecraft Forge in all cases bundles FML as it's modloading technology of choice
|
||||
because FML is open source, freely distributable, and can be easily updated by
|
||||
contributors through github.
|
||||
|
||||
Notable integrations
|
||||
====================
|
||||
Optifine has FML compatibility. It varies from Optifine release to release, however
|
||||
in general it will work well alongside an FML or
|
||||
Minecraft Forge installation. FML will detect and ensure the good operation of
|
||||
Optifine (you can see it in your client as an additional data line on the
|
||||
bottom left).
|
||||
|
||||
Mod information
|
||||
===============
|
||||
FML exposes the mod information through a mod list visible on the main screen as
|
||||
well as some small branding enhancements. For full data mods need to provide an
|
||||
information file. This file is a standard format so hopefully tools providing
|
||||
launch capabilities can also leverage this content.
|
||||
|
||||
-------------------------------
|
||||
Binary installation information
|
||||
-------------------------------
|
||||
If you have downloaded a binary zip file you can install it as follows (client
|
||||
or server):
|
||||
|
||||
Installation
|
||||
============
|
||||
To install on a server, simply execute the FML or Forge jar file, with a copy of
|
||||
minecraft_server-@[email protected] placed in the same directory. FML will launch
|
||||
it's patched copy.
|
||||
|
||||
To install on a client, run the installer by executing java -jar <installer>.jar.
|
||||
It will identify the location of you minecraft installation (this can be customized)
|
||||
and create a new profile "FML" there.
|
||||
|
||||
Forge Installation
|
||||
==================
|
||||
This code also ships as a part of Minecraft Forge. You do not need to install it
|
||||
separately from your Minecraft Forge installation. Minecraft Forge contains the
|
||||
exact same code as this. You should not install FML if you are also installing
|
||||
Minecraft Forge.
|
||||
|
||||
-------------------------------------------
|
||||
Source installation information for modders
|
||||
-------------------------------------------
|
||||
This code follows the Minecraft Forge installation methodology. It will apply
|
||||
some small patches to the vanilla MCP source code, giving you and it access
|
||||
to some of the data and functions you need to build a successful mod.
|
||||
|
||||
Note also that the patches are built against "unrenamed" MCP source code (aka
|
||||
srgnames) - this means that you will not be able to read them directly against
|
||||
normal code.
|
||||
|
||||
Source pack installation information:
|
||||
|
||||
Standalone source installation
|
||||
==============================
|
||||
|
||||
To install this source code for development purposes, extract this zip file.
|
||||
It ships with a demonstration mod. Run "gradle setupDevWorkspace" to create
|
||||
a gradle environment primed with FML. Run gradle eclipse or gradle idea to
|
||||
create an IDE workspace of your choice.
|
||||
Refer to ForgeGradle for more information about the gradle environment
|
||||
|
||||
Forge source installation
|
||||
=========================
|
||||
MinecraftForge ships with this code and installs it as part of the forge
|
||||
installation process, no further action is required on your part.
|
||||
|
||||
For reference this is version @MAJOR@.@MINOR@.@REV@.@BUILD@ of FML
|
||||
for Minecraft version @MCVERSION@.
|
||||
@@ -1,112 +0,0 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
mavenCentral()
|
||||
mavenLocal()
|
||||
maven {
|
||||
name = "forge"
|
||||
url = "http://files.minecraftforge.net/maven"
|
||||
}
|
||||
maven {
|
||||
name = "sonatype"
|
||||
url = "https://oss.sonatype.org/content/repositories/snapshots/"
|
||||
}
|
||||
}
|
||||
dependencies {
|
||||
classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT'
|
||||
}
|
||||
}
|
||||
|
||||
import static net.minecraftforge.gradle.dev.FmlDevPlugin.*
|
||||
|
||||
apply plugin: 'maven'
|
||||
apply plugin: 'fmldev'
|
||||
|
||||
repositories {
|
||||
flatDir {
|
||||
name "fileRepo"
|
||||
dirs "repo"
|
||||
}
|
||||
}
|
||||
|
||||
minecraft {
|
||||
version = '1.8'
|
||||
mcpVersion = '9.10'
|
||||
mappings = 'snapshot_nodoc_20141130'
|
||||
fmlDir = projectDir.getAbsolutePath();
|
||||
mainClass = 'net.minecraftforge.fml.relauncher.ServerLaunchWrapper'
|
||||
tweakClass = 'net.minecraftforge.fml.common.launcher.FMLTweaker'
|
||||
installerVersion = "1.4"
|
||||
}
|
||||
|
||||
group = 'net.minecraftforge'
|
||||
version = getVersionFromGit(getProject())
|
||||
|
||||
jenkins {
|
||||
job = 'fml'
|
||||
}
|
||||
|
||||
uploadArchives {
|
||||
repositories {
|
||||
if (project.hasProperty("filesmaven")) {
|
||||
logger.info('Publishing to files server')
|
||||
|
||||
mavenDeployer {
|
||||
configuration = configurations.deployJars
|
||||
|
||||
repository(url: project.filesmaven.url) {
|
||||
authentication(userName: project.filesmaven.username, privateKey: project.filesmaven.key)
|
||||
}
|
||||
|
||||
pom {
|
||||
groupId = project.group
|
||||
version = project.version
|
||||
artifactId = project.archivesBaseName
|
||||
project {
|
||||
name project.archivesBaseName
|
||||
packaging 'jar'
|
||||
description 'ForgeModLoader'
|
||||
url 'https://github.com/MinecraftForge/FML'
|
||||
|
||||
scm {
|
||||
url 'https://github.com/MinecraftForge/FML'
|
||||
connection 'scm:git:git://github.com/MinecraftForge/FML.git'
|
||||
developerConnection 'scm:git:[email protected]:MinecraftForge/FML.git'
|
||||
}
|
||||
|
||||
issueManagement {
|
||||
system 'github'
|
||||
url 'https://github.com/MinecraftForge/FML/issues'
|
||||
}
|
||||
|
||||
licenses {
|
||||
license {
|
||||
name 'GNU Lesser Public License (LGPL), Version 2.1'
|
||||
url 'http://www.gnu.org/licenses/lgpl-2.1.txt'
|
||||
distribution 'repo'
|
||||
}
|
||||
}
|
||||
|
||||
developers {
|
||||
developer {
|
||||
id 'cpw'
|
||||
name 'cpw'
|
||||
roles { role 'developer' }
|
||||
}
|
||||
developer {
|
||||
id 'LexManos'
|
||||
name 'Lex Manos'
|
||||
roles { role 'developer' }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
logger.info('Publishing to repo folder')
|
||||
|
||||
mavenDeployer {
|
||||
repository(url: 'file://localhost/' + project.file('repo').getAbsolutePath())
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
# Artistic Style format configuration
|
||||
# see http://astyle.sourceforge.net/astyle.html
|
||||
|
||||
style=allman
|
||||
|
||||
add-brackets
|
||||
break-closing-brackets
|
||||
|
||||
indent-switches
|
||||
|
||||
max-instatement-indent=40
|
||||
|
||||
pad-oper
|
||||
pad-header
|
||||
unpad-paren
|
||||
|
||||
break-blocks
|
||||
|
||||
delete-empty-lines
|
||||
-18447
File diff suppressed because it is too large.
Load diff
-5012
File diff suppressed because it is too large.
Load diff
-27537
File diff suppressed because it is too large.
Load diff
@@ -1,172 +0,0 @@
|
||||
[DEFAULT]
|
||||
DirTemp = temp
|
||||
DirSrc = src
|
||||
DirLogs = logs
|
||||
DirBin = bin
|
||||
DirJars = jars
|
||||
DirReobf = reobf
|
||||
DirConf = conf
|
||||
DirRuntime = runtime
|
||||
DirLib = lib
|
||||
DirTempSrc = temp/src
|
||||
DirTempCls = temp/cls
|
||||
DirTempBin = temp/bin
|
||||
DirModSrc = modsrc
|
||||
DirEclipse = eclipse
|
||||
|
||||
[CSV]
|
||||
Classes = %(DirConf)s/classes.csv
|
||||
Methods = %(DirConf)s/methods.csv
|
||||
Fields = %(DirConf)s/fields.csv
|
||||
Params = %(DirConf)s/params.csv
|
||||
NewIds = %(DirConf)s/newids.csv
|
||||
|
||||
[SRGS]
|
||||
ConfClient = %(DirConf)s/joined.srg
|
||||
ConfServer = %(DirConf)s/joined.srg
|
||||
Client = %(DirTemp)s/client_rg.srg
|
||||
Server = %(DirTemp)s/server_rg.srg
|
||||
DeobfClient = %(DirTemp)s/client_deobf.srg
|
||||
DeobfServer = %(DirTemp)s/server_deobf.srg
|
||||
ReobfClient = %(DirTemp)s/client_ro.srg
|
||||
ReobfServer = %(DirTemp)s/server_ro.srg
|
||||
ReobfClientSrg = %(DirTemp)s/client_ro_srg.srg
|
||||
ReobfServerSrg = %(DirTemp)s/server_ro_srg.srg
|
||||
ReobfClientCls = %(DirTemp)s/client_ro_cls.srg
|
||||
ReobfServerCls = %(DirTemp)s/server_ro_cls.srg
|
||||
|
||||
[JAR]
|
||||
DirNatives = %(DirJars)s/bin/natives
|
||||
Client = %(DirJars)s/bin/minecraft.jar
|
||||
Server = %(DirJars)s/minecraft_server.jar
|
||||
LWJGL = %(DirJars)s/bin/jinput.jar,%(DirJars)s/bin/lwjgl.jar,%(DirJars)s/bin/lwjgl_util.jar
|
||||
MD5Client = 8663a10cecc10eaa683a927ef5371852
|
||||
MD5Server = 5b19d1a562a8a7c5f9a787ad96c8148b
|
||||
|
||||
[RETROGUARD]
|
||||
Location = %(DirRuntime)s/bin/retroguard.jar
|
||||
RetroConf = %(DirTemp)s/retroguard.cfg
|
||||
RetroReobConf = %(DirTemp)s/retroguard_ro.cfg
|
||||
ClientConf = %(DirTemp)s/client_rg.cfg
|
||||
ServerConf = %(DirTemp)s/server_rg.cfg
|
||||
ClientReobConf = %(DirTemp)s/client_ro.cfg
|
||||
ServerReobConf = %(DirTemp)s/server_ro.cfg
|
||||
ClientOut = %(DirTemp)s/minecraft_rg.jar
|
||||
ServerOut = %(DirTemp)s/minecraft_server_rg.jar
|
||||
ClientLog = %(DirLogs)s/client_rg.log
|
||||
ServerLog = %(DirLogs)s/server_rg.log
|
||||
ClientDeobLog = %(DirLogs)s/client_deob.log
|
||||
ServerDeobLog = %(DirLogs)s/server_deob.log
|
||||
NullPkg = net/minecraft/src
|
||||
|
||||
[EXCEPTOR]
|
||||
XClientJson = %(DirConf)s/exceptor.json
|
||||
XServerJson = %(DirConf)s/exceptor.json
|
||||
XClientCfg = %(DirConf)s/joined.exc
|
||||
XServerCfg = %(DirConf)s/joined.exc
|
||||
XClientOut = %(DirTemp)s/minecraft_exc.jar
|
||||
XServerOut = %(DirTemp)s/minecraft_server_exc.jar
|
||||
XClientLog = %(DirLogs)s/client_exc.log
|
||||
XServerLog = %(DirLogs)s/server_exc.log
|
||||
XClientLogReobf = %(DirLogs)s/client_reobf_exc.log
|
||||
XServerLogReobf = %(DirLogs)s/server_reobf_exc.log
|
||||
XClientMeta = %(DirTemp)s/client_meta.log
|
||||
XServerMeta = %(DirTemp)s/server_meta.log
|
||||
|
||||
|
||||
[DECOMPILE]
|
||||
ClsClientTemp = %(DirTempCls)s/minecraft
|
||||
ClsServerTemp = %(DirTempCls)s/minecraft_server
|
||||
SrcClientTemp = %(DirTempSrc)s/minecraft
|
||||
SrcServerTemp = %(DirTempSrc)s/minecraft_server
|
||||
FFSource = net
|
||||
FFClientIn = %(DirTemp)s/minecraft_ff_in.jar
|
||||
FFServerIn = %(DirTemp)s/minecraft_server_ff_in.jar
|
||||
|
||||
[OUTPUT]
|
||||
BinClientTemp = %(DirTempBin)s/minecraft
|
||||
BinServerTemp = %(DirTempBin)s/minecraft_server
|
||||
SrcClient = %(DirSrc)s/minecraft
|
||||
SrcServer = %(DirSrc)s/minecraft_server
|
||||
TestClient = net/minecraft/client/main/Main
|
||||
TestServer = net/minecraft/server/MinecraftServer
|
||||
|
||||
[PATCHES]
|
||||
PatchClient = %(DirConf)s/patches/minecraft.patch
|
||||
PatchServer = %(DirConf)s/patches/minecraft_server.patch
|
||||
PatchTemp = %(DirTemp)s/temp.patch
|
||||
FFPatchClient = %(DirConf)s/patches/minecraft_ff
|
||||
FFPatchServer = %(DirConf)s/patches/minecraft_server_ff
|
||||
PatchClient_osx = %(DirConf)s/patches/minecraft_osx.patch
|
||||
PatchServer_osx = %(DirConf)s/patches/minecraft_server_osx.patch
|
||||
|
||||
[RECOMPILE]
|
||||
BinClient = %(DirBin)s/minecraft
|
||||
BinServer = %(DirBin)s/minecraft_server
|
||||
LogClient = %(DirLogs)s/client_compile.log
|
||||
LogServer = %(DirLogs)s/server_compile.log
|
||||
ClassPathClient = %(DirLib)s/,%(DirLib)s/*,%(DirJars)s/bin/minecraft.jar,%(DirJars)s/bin/jinput.jar,%(DirJars)s/bin/lwjgl.jar,%(DirJars)s/bin/lwjgl_util.jar
|
||||
ClassPathServer = %(DirLib)s/,%(DirLib)s/*,%(DirJars)s/minecraft_server.jar
|
||||
ClientFixes = %(DirConf)s/patches
|
||||
FixStart = Start
|
||||
IgnorePkg = paulscode,com,isom,ibxm,de/matthiasmann/twl,org,javax,argo,gnu,io/netty
|
||||
|
||||
[REOBF]
|
||||
MD5Client = %(DirTemp)s/client.md5
|
||||
MD5Server = %(DirTemp)s/server.md5
|
||||
MD5PreReobfClient = %(DirTemp)s/client_reobf.md5
|
||||
MD5PreReobfServer = %(DirTemp)s/server_reobf.md5
|
||||
RecompJarClient = %(DirTemp)s/client_recomp.jar
|
||||
RecompJarServer = %(DirTemp)s/server_recomp.jar
|
||||
ObfJarClient = %(DirTemp)s/client_reobf.jar
|
||||
ObfJarServer = %(DirTemp)s/server_reobf.jar
|
||||
ReobfDirClient = %(DirReobf)s/minecraft
|
||||
ReobfDirServer = %(DirReobf)s/minecraft_server
|
||||
ClientRoLog = %(DirLogs)s/client_ro.log
|
||||
ServerRoLog = %(DirLogs)s/server_ro.log
|
||||
ReobfClientLog = %(DirLogs)s/client_reob.log
|
||||
ReobfServerLog = %(DirLogs)s/server_reob.log
|
||||
|
||||
[GETMODSOURCE]
|
||||
OutSRCClient = %(DirModSrc)s/minecraft
|
||||
OutSRCServer = %(DirModSrc)s/minecraft_server
|
||||
|
||||
[MCP]
|
||||
LogFile = %(DirLogs)s/mcp.log
|
||||
LogFileErr = %(DirLogs)s/mcperr.log
|
||||
UpdateUrl = http://mcp.ocean-labs.de/files/mcprolling_{version}/
|
||||
IgnoreUpdate = %(DirBin)s,%(DirLib)s,%(DirLogs)s,%(DirModSrc)s,%(DirReobf)s,%(DirSrc)s,%(DirTemp)s,%(DirEclipse)s/Client/bin,%(DirEclipse)s/Server/bin,%(DirJars)s/world,%(DirJars)s/saves,%(DirJars)s/resources
|
||||
RGIndex = 180425
|
||||
|
||||
[ASTYLE]
|
||||
AstyleConfig = %(DirConf)s/astyle.cfg
|
||||
|
||||
[COMMANDS]
|
||||
Wine = wine
|
||||
Patcher_win = %(DirRuntime)s/bin/applydiff.exe
|
||||
Patcher_linux = patch
|
||||
Patcher_osx = patch
|
||||
Jad_win = %(DirRuntime)s/bin/jad.exe
|
||||
Jad_osx = %(DirRuntime)s/bin/jad-osx
|
||||
AStyle_win = %(DirRuntime)s/bin/astyle.exe
|
||||
AStyle_linux = astyle
|
||||
AStyle_osx = %(DirRuntime)s/bin/astyle-osx
|
||||
JadRetro = %(DirRuntime)s/bin/jadretro.jar
|
||||
Fernflower = %(DirRuntime)s/bin/fernflower.jar
|
||||
Exceptor = %(DirRuntime)s/bin/mcinjector.jar
|
||||
SpecialSource = %(DirRuntime)s/bin/specialsource.jar
|
||||
CmdPatch = %s -p1 -u -i {patchfile} -d {srcdir}
|
||||
CmdJad = %s -b -d {outdir} -dead -o -r -s .java -stat -ff {classes}
|
||||
CmdAStyle = %s --suffix=none --quiet --options={conffile} {classes}
|
||||
CmdRG = %s -cp "{classpath}" RetroGuard -searge {conffile}
|
||||
CmdRGReobf = %s -cp "{classpath}" RetroGuard -notch {conffile}
|
||||
CmdSS = %s -cp "{classpath}" -jar %s -i {injar} -o {outjar} -m {mapfile} --kill-source
|
||||
CmdSSReobf = %s -cp "{classpath}" -jar %s -i {injar} -o {outjar} -r -m {mapfile} -d {identifier} -e %s
|
||||
CmdJadretro = %s -jar %s {targetdir}
|
||||
CmdFernflower = %s -jar %s -din=1 -rbr=0 -dgs=1 -asc=1 -log=WARN {indir} {outdir}
|
||||
CmdExceptor = %s -jar %s --jarIn {input} --jarOut {output} --mapIn {conf} --log {log} --jsonIn {json} --applyMarkers --generateParams
|
||||
CmdExceptorDry = %s -jar %s --jarIn {input} --mapIn {conf} --log {log} --jsonIn {json} --applyMarkers
|
||||
CmdRecomp = %s -Xlint:-options -deprecation -g -source 1.6 -target 1.6 -classpath "{classpath}" -sourcepath {sourcepath} -d {outpath} {pkgs}
|
||||
CmdRecompScala = %s -encoding UTF-8 -deprecation -target:jvm-1.6 -classpath "{classpath}" -sourcepath {sourcepath} -d {outpath} {pkgs}
|
||||
CmdStartSrv = %s -Xincgc -Xms1024M -Xmx1024M -cp "{classpath}" net.minecraft.server.MinecraftServer
|
||||
CmdStartClt = %s -Xincgc -Xms1024M -Xmx1024M -cp "{classpath}" -Djava.library.path={natives} Start
|
||||
@@ -1,114 +0,0 @@
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.lang.reflect.Field;
|
||||
import java.net.URL;
|
||||
import java.net.URLConnection;
|
||||
import java.net.URLEncoder;
|
||||
import java.util.Arrays;
|
||||
|
||||
import joptsimple.ArgumentAcceptingOptionSpec;
|
||||
import joptsimple.OptionParser;
|
||||
import joptsimple.OptionSet;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.main.Main;
|
||||
|
||||
public class Start
|
||||
{
|
||||
public static void main(String[] args) throws Exception
|
||||
{
|
||||
int userIndex = -1;
|
||||
int passIndex = -1;
|
||||
int sessIndex = -1;
|
||||
int versIndex = -1;
|
||||
|
||||
for( int x = 0; x < args.length; x++)
|
||||
{
|
||||
if (args[x].equals("--username")) userIndex = x + 1;
|
||||
else if (args[x].equals("--password")) passIndex = x + 1;
|
||||
else if (args[x].equals("--session")) sessIndex = x + 1;
|
||||
else if (args[x].equals("--version")) versIndex = x + 1;
|
||||
}
|
||||
|
||||
if (userIndex != 0-1 && passIndex != -1 && sessIndex == -1)
|
||||
{
|
||||
String[] session = getSession(args[userIndex], args[passIndex]);
|
||||
if (session != null)
|
||||
{
|
||||
args[userIndex] = session[0];
|
||||
args = concat(args, new String[]{"--session", session[1]});
|
||||
}
|
||||
}
|
||||
|
||||
//Kill the password if its there so it isn't printed to the console.
|
||||
if (passIndex != -1)
|
||||
{
|
||||
args[passIndex-1] = "no_password_for_joo";
|
||||
args[passIndex] = "no_password_for_joo";
|
||||
}
|
||||
|
||||
if (versIndex == -1)
|
||||
{
|
||||
args = concat(args, new String[]{ "--version", "fml_mcp" });
|
||||
}
|
||||
|
||||
Main.main(args);
|
||||
}
|
||||
|
||||
private static String[] getSession(String username, String password) throws UnsupportedEncodingException
|
||||
{
|
||||
String parameters = "http://login.minecraft.net/?user=" + URLEncoder.encode(username, "UTF-8") +
|
||||
"&password=" + URLEncoder.encode(password, "UTF-8") +
|
||||
"&version=" + 13;
|
||||
String result = openUrl(parameters);
|
||||
|
||||
if (result == null)
|
||||
{
|
||||
System.out.println("Can't connect to minecraft.net");
|
||||
return null;
|
||||
}
|
||||
|
||||
if (!result.contains(":"))
|
||||
{
|
||||
System.out.println("Login Failed: " + result);
|
||||
return null;
|
||||
}
|
||||
String[] values = result.split(":");
|
||||
return new String[]{ values[2].trim(), values[3].trim() };
|
||||
}
|
||||
|
||||
private static String openUrl(String addr)
|
||||
{
|
||||
try
|
||||
{
|
||||
URL url = new URL(addr);
|
||||
java.io.InputStream is;
|
||||
is = url.openConnection().getInputStream();
|
||||
java.io.BufferedReader reader = new java.io.BufferedReader(new java.io.InputStreamReader(is));
|
||||
String buf = "";
|
||||
String line = null;
|
||||
|
||||
while ((line = reader.readLine()) != null)
|
||||
{
|
||||
buf += "\n" + line;
|
||||
}
|
||||
|
||||
reader.close();
|
||||
return buf;
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
private static <T> T[] concat(T[] first, T[] second)
|
||||
{
|
||||
T[] result = Arrays.copyOf(first, first.length + second.length);
|
||||
System.arraycopy(second, 0, result, first.length, second.length);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
diff -r -U 3 minecraft\net\minecraft\client\Minecraft.java minecraft_patched\net\minecraft\client\Minecraft.java
|
||||
--- minecraft\net\minecraft\client\Minecraft.java
|
||||
+++ minecraft_patched\net\minecraft\client\Minecraft.java
|
||||
@@ -695,9 +695,7 @@
|
||||
|
||||
while(true) {
|
||||
try {
|
||||
- if(!this.field_71425_J) {
|
||||
- break;
|
||||
- }
|
||||
+ while(this.field_71425_J) {
|
||||
|
||||
if(!this.field_71434_R || this.field_71433_S == null) {
|
||||
try {
|
||||
@@ -711,6 +709,7 @@
|
||||
}
|
||||
|
||||
this.func_71377_b(this.field_71433_S);
|
||||
+ }
|
||||
} catch (MinecraftError var12) {
|
||||
break;
|
||||
} catch (ReportedException var13) {
|
||||
@@ -1,12 +0,0 @@
|
||||
diff -r -U 3 minecraft\net\minecraft\client\Minecraft.java minecraft_patched\net\minecraft\client\Minecraft.java
|
||||
--- minecraft\net\minecraft\client\Minecraft.java
|
||||
+++ minecraft_patched\net\minecraft\client\Minecraft.java
|
||||
@@ -326,7 +326,7 @@
|
||||
|
||||
while(true) {
|
||||
try {
|
||||
- if(this.field_71425_J) {
|
||||
+ while(this.field_71425_J) {
|
||||
if(!this.field_71434_R || this.field_71433_S == null) {
|
||||
try {
|
||||
this.func_71411_J();
|
||||
@@ -1,21 +0,0 @@
|
||||
diff -r -U 3 minecraft\net\minecraft\client\gui\FontRenderer.java minecraft_patched\net\minecraft\client\gui\FontRenderer.java
|
||||
--- minecraft\net\minecraft\client\gui\FontRenderer.java
|
||||
+++ minecraft_patched\net\minecraft\client\gui\FontRenderer.java
|
||||
@@ -592,8 +592,6 @@
|
||||
case 10:
|
||||
--var5;
|
||||
break;
|
||||
- case 32:
|
||||
- var6 = var5;
|
||||
case 167:
|
||||
if(var5 < var3 - 1) {
|
||||
++var5;
|
||||
@@ -607,6 +605,8 @@
|
||||
}
|
||||
}
|
||||
break;
|
||||
+ case 32:
|
||||
+ var6 = var5;
|
||||
default:
|
||||
var4 += this.func_78263_a(var8);
|
||||
if(var7) {
|
||||
-37
@@ -1,37 +0,0 @@
|
||||
diff -r -U 3 minecraft\net\minecraft\client\network\NetHandlerPlayClient.java minecraft_patched\net\minecraft\client\network\NetHandlerPlayClient.java
|
||||
--- minecraft\net\minecraft\client\network\NetHandlerPlayClient.java
|
||||
+++ minecraft_patched\net\minecraft\client\network\NetHandlerPlayClient.java
|
||||
@@ -1275,14 +1275,14 @@
|
||||
private static final String __OBFID = "CL_00002622";
|
||||
|
||||
public void func_73878_a(boolean p_73878_1_, int p_73878_2_) {
|
||||
- NetHandlerPlayClient.thisxxx.field_147299_f = Minecraft.func_71410_x();
|
||||
+ NetHandlerPlayClient.this.field_147299_f = Minecraft.func_71410_x();
|
||||
if(p_73878_1_) {
|
||||
- if(NetHandlerPlayClient.thisxx.field_147299_f.func_147104_D() != null) {
|
||||
- NetHandlerPlayClient.thisxxxxxxx.field_147299_f.func_147104_D().func_152584_a(ServerData.ServerResourceMode.ENABLED);
|
||||
+ if(NetHandlerPlayClient.this.field_147299_f.func_147104_D() != null) {
|
||||
+ NetHandlerPlayClient.this.field_147299_f.func_147104_D().func_152584_a(ServerData.ServerResourceMode.ENABLED);
|
||||
}
|
||||
|
||||
NetHandlerPlayClient.this.field_147302_e.func_179290_a(new C19PacketResourcePackStatus(var3, C19PacketResourcePackStatus.Action.ACCEPTED));
|
||||
- Futures.addCallback(NetHandlerPlayClient.thisx.field_147299_f.func_110438_M().func_180601_a(var2, var3), new FutureCallback() {
|
||||
+ Futures.addCallback(NetHandlerPlayClient.this.field_147299_f.func_110438_M().func_180601_a(var2, var3), new FutureCallback() {
|
||||
|
||||
private static final String __OBFID = "CL_00002621";
|
||||
|
||||
@@ -1294,11 +1294,11 @@
|
||||
}
|
||||
});
|
||||
} else {
|
||||
- if(NetHandlerPlayClient.thisxxxx.field_147299_f.func_147104_D() != null) {
|
||||
- NetHandlerPlayClient.thisxxxxx.field_147299_f.func_147104_D().func_152584_a(ServerData.ServerResourceMode.DISABLED);
|
||||
+ if(NetHandlerPlayClient.this.field_147299_f.func_147104_D() != null) {
|
||||
+ NetHandlerPlayClient.this.field_147299_f.func_147104_D().func_152584_a(ServerData.ServerResourceMode.DISABLED);
|
||||
}
|
||||
|
||||
- NetHandlerPlayClient.thisxxxxxx.field_147302_e.func_179290_a(new C19PacketResourcePackStatus(var3x, C19PacketResourcePackStatus.Action.DECLINED));
|
||||
+ NetHandlerPlayClient.this.field_147302_e.func_179290_a(new C19PacketResourcePackStatus(var3, C19PacketResourcePackStatus.Action.DECLINED));
|
||||
}
|
||||
|
||||
ServerList.func_147414_b(NetHandlerPlayClient.this.field_147299_f.func_147104_D());
|
||||
@@ -1,13 +0,0 @@
|
||||
diff -r -U 3 minecraft\net\minecraft\client\particle\EffectRenderer.java minecraft_patched\net\minecraft\client\particle\EffectRenderer.java
|
||||
--- minecraft\net\minecraft\client\particle\EffectRenderer.java
|
||||
+++ minecraft_patched\net\minecraft\client\particle\EffectRenderer.java
|
||||
@@ -242,7 +242,8 @@
|
||||
GlStateManager.func_179112_b(770, 771);
|
||||
GlStateManager.func_179092_a(516, 0.003921569F);
|
||||
|
||||
- for(final int var8 = 0; var8 < 3; ++var8) {
|
||||
+ for(int var8_nf = 0; var8_nf < 3; ++var8_nf) {
|
||||
+ final int var8 = var8_nf;
|
||||
for(int var9 = 0; var9 < 2; ++var9) {
|
||||
if(!this.field_78876_b[var8][var9].isEmpty()) {
|
||||
switch(var9) {
|
||||
-12
@@ -1,12 +0,0 @@
|
||||
diff -r -U 3 minecraft\net\minecraft\client\renderer\block\model\ModelBlockDefinition.java minecraft_patched\net\minecraft\client\renderer\block\model\ModelBlockDefinition.java
|
||||
--- minecraft\net\minecraft\client\renderer\block\model\ModelBlockDefinition.java
|
||||
+++ minecraft_patched\net\minecraft\client\renderer\block\model\ModelBlockDefinition.java
|
||||
@@ -82,7 +82,7 @@
|
||||
public ModelBlockDefinition func_178336_a(JsonElement p_178336_1_, Type p_178336_2_, JsonDeserializationContext p_178336_3_) {
|
||||
JsonObject var4 = p_178336_1_.getAsJsonObject();
|
||||
List var5 = this.func_178334_a(p_178336_3_, var4);
|
||||
- return new ModelBlockDefinition(var5);
|
||||
+ return new ModelBlockDefinition((Collection)var5);
|
||||
}
|
||||
|
||||
protected List func_178334_a(JsonDeserializationContext p_178334_1_, JsonObject p_178334_2_) {
|
||||
-30
@@ -1,30 +0,0 @@
|
||||
diff -r -U 3 minecraft\net\minecraft\client\renderer\texture\TextureManager.java minecraft_patched\net\minecraft\client\renderer\texture\TextureManager.java
|
||||
--- minecraft\net\minecraft\client\renderer\texture\TextureManager.java
|
||||
+++ minecraft_patched\net\minecraft\client\renderer\texture\TextureManager.java
|
||||
@@ -57,13 +57,14 @@
|
||||
|
||||
public boolean func_110579_a(ResourceLocation p_110579_1_, final ITextureObject p_110579_2_) {
|
||||
boolean var3 = true;
|
||||
-
|
||||
+ ITextureObject p_110579_2_2 = p_110579_2_;
|
||||
+
|
||||
try {
|
||||
((ITextureObject)p_110579_2_).func_110551_a(this.field_110582_d);
|
||||
} catch (IOException var8) {
|
||||
field_147646_a.warn("Failed to load texture: " + p_110579_1_, var8);
|
||||
- p_110579_2_ = TextureUtil.field_111001_a;
|
||||
- this.field_110585_a.put(p_110579_1_, p_110579_2_);
|
||||
+ p_110579_2_2 = TextureUtil.field_111001_a;
|
||||
+ this.field_110585_a.put(p_110579_1_, p_110579_2_2);
|
||||
var3 = false;
|
||||
} catch (Throwable var9) {
|
||||
CrashReport var5 = CrashReport.func_85055_a(var9, "Registering texture");
|
||||
@@ -80,7 +81,7 @@
|
||||
throw new ReportedException(var5);
|
||||
}
|
||||
|
||||
- this.field_110585_a.put(p_110579_1_, p_110579_2_);
|
||||
+ this.field_110585_a.put(p_110579_1_, p_110579_2_2);
|
||||
return var3;
|
||||
}
|
||||
|
||||
-12
@@ -1,12 +0,0 @@
|
||||
diff -r -U 3 minecraft\net\minecraft\client\resources\FolderResourcePack.java minecraft_patched\net\minecraft\client\resources\FolderResourcePack.java
|
||||
--- minecraft\net\minecraft\client\resources\FolderResourcePack.java
|
||||
+++ minecraft_patched\net\minecraft\client\resources\FolderResourcePack.java
|
||||
@@ -31,7 +31,7 @@
|
||||
HashSet var1 = Sets.newHashSet();
|
||||
File var2 = new File(this.field_110597_b, "assets/");
|
||||
if(var2.isDirectory()) {
|
||||
- File[] var3 = var2.listFiles(DirectoryFileFilter.DIRECTORY);
|
||||
+ File[] var3 = var2.listFiles((java.io.FileFilter)DirectoryFileFilter.DIRECTORY);
|
||||
int var4 = var3.length;
|
||||
|
||||
for(int var5 = 0; var5 < var4; ++var5) {
|
||||
@@ -1,100 +0,0 @@
|
||||
diff -r -U 3 minecraft\net\minecraft\command\PlayerSelector.java minecraft_patched\net\minecraft\command\PlayerSelector.java
|
||||
--- minecraft\net\minecraft\command\PlayerSelector.java
|
||||
+++ minecraft_patched\net\minecraft\command\PlayerSelector.java
|
||||
@@ -135,7 +135,7 @@
|
||||
|
||||
private static List func_179663_a(Map p_179663_0_, String p_179663_1_) {
|
||||
ArrayList var2 = Lists.newArrayList();
|
||||
- final String var3 = func_179651_b(p_179663_0_, "type");
|
||||
+ String var3 = func_179651_b(p_179663_0_, "type");
|
||||
final boolean var4 = var3 != null && var3.startsWith("!");
|
||||
if(var4) {
|
||||
var3 = var3.substring(1);
|
||||
@@ -159,12 +159,13 @@
|
||||
});
|
||||
}
|
||||
} else {
|
||||
+ final String var3_f = var3;
|
||||
var2.add(new Predicate() {
|
||||
|
||||
private static final String __OBFID = "CL_00002362";
|
||||
|
||||
public boolean func_179613_a(Entity p_179613_1_) {
|
||||
- return EntityList.func_180123_a(p_179613_1_, var3) != var4;
|
||||
+ return EntityList.func_180123_a(p_179613_1_, var3_f) != var4;
|
||||
}
|
||||
// $FF: synthetic method
|
||||
public boolean apply(Object p_apply_1_) {
|
||||
@@ -231,13 +232,14 @@
|
||||
|
||||
private static List func_179659_d(Map p_179659_0_) {
|
||||
ArrayList var1 = Lists.newArrayList();
|
||||
- final String var2 = func_179651_b(p_179659_0_, "team");
|
||||
+ String var2 = func_179651_b(p_179659_0_, "team");
|
||||
final boolean var3 = var2 != null && var2.startsWith("!");
|
||||
if(var3) {
|
||||
var2 = var2.substring(1);
|
||||
}
|
||||
|
||||
if(var2 != null) {
|
||||
+ final String var2_f = var2;
|
||||
var1.add(new Predicate() {
|
||||
|
||||
private static final String __OBFID = "CL_00002355";
|
||||
@@ -249,7 +251,7 @@
|
||||
EntityLivingBase var2x = (EntityLivingBase)p_179621_1_;
|
||||
Team var3x = var2x.func_96124_cp();
|
||||
String var4 = var3x == null?"":var3x.func_96661_b();
|
||||
- return var4.equals(var2) != var3;
|
||||
+ return var4.equals(var2_f) != var3;
|
||||
}
|
||||
}
|
||||
// $FF: synthetic method
|
||||
@@ -321,19 +323,20 @@
|
||||
|
||||
private static List func_179647_f(Map p_179647_0_) {
|
||||
ArrayList var1 = Lists.newArrayList();
|
||||
- final String var2 = func_179651_b(p_179647_0_, "name");
|
||||
+ String var2 = func_179651_b(p_179647_0_, "name");
|
||||
final boolean var3 = var2 != null && var2.startsWith("!");
|
||||
if(var3) {
|
||||
var2 = var2.substring(1);
|
||||
}
|
||||
|
||||
if(var2 != null) {
|
||||
+ final String var2_f = var2;
|
||||
var1.add(new Predicate() {
|
||||
|
||||
private static final String __OBFID = "CL_00002353";
|
||||
|
||||
public boolean func_179600_a(Entity p_179600_1_) {
|
||||
- return p_179600_1_.func_70005_c_().equals(var2) != var3;
|
||||
+ return p_179600_1_.func_70005_c_().equals(var2_f) != var3;
|
||||
}
|
||||
// $FF: synthetic method
|
||||
public boolean apply(Object p_apply_1_) {
|
||||
@@ -372,11 +375,9 @@
|
||||
|
||||
private static List func_179662_g(Map p_179662_0_) {
|
||||
ArrayList var1 = Lists.newArrayList();
|
||||
- final int var2;
|
||||
- final int var3;
|
||||
if(p_179662_0_.containsKey("rym") || p_179662_0_.containsKey("ry")) {
|
||||
- var2 = func_179650_a(func_179653_a(p_179662_0_, "rym", 0));
|
||||
- var3 = func_179650_a(func_179653_a(p_179662_0_, "ry", 359));
|
||||
+ final int var2 = func_179650_a(func_179653_a(p_179662_0_, "rym", 0));
|
||||
+ final int var3 = func_179650_a(func_179653_a(p_179662_0_, "ry", 359));
|
||||
var1.add(new Predicate() {
|
||||
|
||||
private static final String __OBFID = "CL_00002351";
|
||||
@@ -393,8 +394,8 @@
|
||||
}
|
||||
|
||||
if(p_179662_0_.containsKey("rxm") || p_179662_0_.containsKey("rx")) {
|
||||
- var2 = func_179650_a(func_179653_a(p_179662_0_, "rxm", 0));
|
||||
- var3 = func_179650_a(func_179653_a(p_179662_0_, "rx", 359));
|
||||
+ final int var2 = func_179650_a(func_179653_a(p_179662_0_, "rxm", 0));
|
||||
+ final int var3 = func_179650_a(func_179653_a(p_179662_0_, "rx", 359));
|
||||
var1.add(new Predicate() {
|
||||
|
||||
private static final String __OBFID = "CL_00002361";
|
||||
@@ -1,34 +0,0 @@
|
||||
diff -r -U 3 minecraft\net\minecraft\inventory\ContainerPlayer.java minecraft_patched\net\minecraft\inventory\ContainerPlayer.java
|
||||
--- minecraft\net\minecraft\inventory\ContainerPlayer.java
|
||||
+++ minecraft_patched\net\minecraft\inventory\ContainerPlayer.java
|
||||
@@ -28,7 +28,7 @@
|
||||
this.field_82862_h = p_i1819_3_;
|
||||
this.func_75146_a(new SlotCrafting(p_i1819_1_.field_70458_d, this.field_75181_e, this.field_75179_f, 0, 144, 36));
|
||||
|
||||
- final int var4;
|
||||
+ int var4;
|
||||
int var5;
|
||||
for(var4 = 0; var4 < 2; ++var4) {
|
||||
for(var5 = 0; var5 < 2; ++var5) {
|
||||
@@ -37,6 +37,7 @@
|
||||
}
|
||||
|
||||
for(var4 = 0; var4 < 4; ++var4) {
|
||||
+ final int var44 = var4;
|
||||
this.func_75146_a(new Slot(p_i1819_1_, p_i1819_1_.func_70302_i_() - 1 - var4, 8, 8 + var4 * 18) {
|
||||
|
||||
private static final String __OBFID = "CL_00001755";
|
||||
@@ -45,11 +46,11 @@
|
||||
return 1;
|
||||
}
|
||||
public boolean func_75214_a(ItemStack p_75214_1_) {
|
||||
- return p_75214_1_ == null?false:(p_75214_1_.func_77973_b() instanceof ItemArmor?((ItemArmor)p_75214_1_.func_77973_b()).field_77881_a == var4:(p_75214_1_.func_77973_b() != Item.func_150898_a(Blocks.field_150423_aK) && p_75214_1_.func_77973_b() != Items.field_151144_bL?false:var4 == 0));
|
||||
+ return p_75214_1_ == null?false:(p_75214_1_.func_77973_b() instanceof ItemArmor?((ItemArmor)p_75214_1_.func_77973_b()).field_77881_a == var44:(p_75214_1_.func_77973_b() != Item.func_150898_a(Blocks.field_150423_aK) && p_75214_1_.func_77973_b() != Items.field_151144_bL?false:var44 == 0));
|
||||
}
|
||||
@SideOnly(Side.CLIENT)
|
||||
public String func_178171_c() {
|
||||
- return ItemArmor.field_94603_a[var4];
|
||||
+ return ItemArmor.field_94603_a[var44];
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
diff -r -U 3 minecraft\net\minecraft\network\PacketBuffer.java minecraft_patched\net\minecraft\network\PacketBuffer.java
|
||||
--- minecraft\net\minecraft\network\PacketBuffer.java
|
||||
+++ minecraft_patched\net\minecraft\network\PacketBuffer.java
|
||||
@@ -799,10 +799,4 @@
|
||||
public boolean release(int p_release_1_) {
|
||||
return this.field_150794_a.release(p_release_1_);
|
||||
}
|
||||
-
|
||||
- // $FF: synthetic method
|
||||
- // $FF: bridge method
|
||||
- public int compareTo(Object p_compareTo_1_) {
|
||||
- return this.compareTo((ByteBuf)p_compareTo_1_);
|
||||
- }
|
||||
}
|
||||
-14
@@ -1,14 +0,0 @@
|
||||
diff -r -U 3 minecraft\net\minecraft\server\network\NetHandlerLoginServer.java minecraft_patched\net\minecraft\server\network\NetHandlerLoginServer.java
|
||||
--- minecraft\net\minecraft\server\network\NetHandlerLoginServer.java
|
||||
+++ minecraft_patched\net\minecraft\server\network\NetHandlerLoginServer.java
|
||||
@@ -95,10 +95,6 @@
|
||||
public void operationComplete(ChannelFuture p_operationComplete_1_) {
|
||||
NetHandlerLoginServer.this.field_147333_a.func_179289_a(NetHandlerLoginServer.this.field_147327_f.func_175577_aI());
|
||||
}
|
||||
- // $FF: synthetic method
|
||||
- public void operationComplete(Future p_operationComplete_1_) {
|
||||
- this.operationComplete((ChannelFuture)p_operationComplete_1_);
|
||||
- }
|
||||
}, new GenericFutureListener[0]);
|
||||
}
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
diff -r -U 3 minecraft\net\minecraft\util\BlockPos.java minecraft_patched\net\minecraft\util\BlockPos.java
|
||||
--- minecraft\net\minecraft\util\BlockPos.java
|
||||
+++ minecraft_patched\net\minecraft\util\BlockPos.java
|
||||
@@ -194,7 +194,7 @@
|
||||
|
||||
protected BlockPos.MutableBlockPos func_179313_a() {
|
||||
if(this.field_179314_b == null) {
|
||||
- this.field_179314_b = new BlockPos.MutableBlockPos(var2xxx.func_177958_n(), var2.func_177956_o(), var2x.func_177952_p(), null);
|
||||
+ this.field_179314_b = new BlockPos.MutableBlockPos(var2.func_177958_n(), var2.func_177956_o(), var2.func_177952_p(), null);
|
||||
return this.field_179314_b;
|
||||
} else if(this.field_179314_b.equals(var3)) {
|
||||
return (BlockPos.MutableBlockPos)this.endOfData();
|
||||
-11
@@ -1,11 +0,0 @@
|
||||
diff -r -U 3 minecraft\net\minecraft\world\storage\ThreadedFileIOBase.java minecraft_patched\net\minecraft\world\storage\ThreadedFileIOBase.java
|
||||
--- minecraft\net\minecraft\world\storage\ThreadedFileIOBase.java
|
||||
+++ minecraft_patched\net\minecraft\world\storage\ThreadedFileIOBase.java
|
||||
@@ -25,6 +25,7 @@
|
||||
}
|
||||
|
||||
public void run() {
|
||||
+ while(true)
|
||||
this.func_75736_b();
|
||||
}
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
[VERSION]
|
||||
MCPVersion = 9.10
|
||||
ClientVersion = 1.8
|
||||
ServerVersion = 1.8
|
||||
Binary file not shown.
BIN
Binary file not shown.
Vendored
-164
@@ -1,164 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
##############################################################################
|
||||
##
|
||||
## Gradle start up script for UN*X
|
||||
##
|
||||
##############################################################################
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS=""
|
||||
|
||||
APP_NAME="Gradle"
|
||||
APP_BASE_NAME=`basename "$0"`
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD="maximum"
|
||||
|
||||
warn ( ) {
|
||||
echo "$*"
|
||||
}
|
||||
|
||||
die ( ) {
|
||||
echo
|
||||
echo "$*"
|
||||
echo
|
||||
exit 1
|
||||
}
|
||||
|
||||
# OS specific support (must be 'true' or 'false').
|
||||
cygwin=false
|
||||
msys=false
|
||||
darwin=false
|
||||
case "`uname`" in
|
||||
CYGWIN* )
|
||||
cygwin=true
|
||||
;;
|
||||
Darwin* )
|
||||
darwin=true
|
||||
;;
|
||||
MINGW* )
|
||||
msys=true
|
||||
;;
|
||||
esac
|
||||
|
||||
# For Cygwin, ensure paths are in UNIX format before anything is touched.
|
||||
if $cygwin ; then
|
||||
[ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
|
||||
fi
|
||||
|
||||
# Attempt to set APP_HOME
|
||||
# Resolve links: $0 may be a link
|
||||
PRG="$0"
|
||||
# Need this for relative symlinks.
|
||||
while [ -h "$PRG" ] ; do
|
||||
ls=`ls -ld "$PRG"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
PRG="$link"
|
||||
else
|
||||
PRG=`dirname "$PRG"`"/$link"
|
||||
fi
|
||||
done
|
||||
SAVED="`pwd`"
|
||||
cd "`dirname \"$PRG\"`/" >&-
|
||||
APP_HOME="`pwd -P`"
|
||||
cd "$SAVED" >&-
|
||||
|
||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
|
||||
# Determine the Java command to use to start the JVM.
|
||||
if [ -n "$JAVA_HOME" ] ; then
|
||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||
# IBM's JDK on AIX uses strange locations for the executables
|
||||
JAVACMD="$JAVA_HOME/jre/sh/java"
|
||||
else
|
||||
JAVACMD="$JAVA_HOME/bin/java"
|
||||
fi
|
||||
if [ ! -x "$JAVACMD" ] ; then
|
||||
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
else
|
||||
JAVACMD="java"
|
||||
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
|
||||
# Increase the maximum file descriptors if we can.
|
||||
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
|
||||
MAX_FD_LIMIT=`ulimit -H -n`
|
||||
if [ $? -eq 0 ] ; then
|
||||
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
|
||||
MAX_FD="$MAX_FD_LIMIT"
|
||||
fi
|
||||
ulimit -n $MAX_FD
|
||||
if [ $? -ne 0 ] ; then
|
||||
warn "Could not set maximum file descriptor limit: $MAX_FD"
|
||||
fi
|
||||
else
|
||||
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
|
||||
fi
|
||||
fi
|
||||
|
||||
# For Darwin, add options to specify how the application appears in the dock
|
||||
if $darwin; then
|
||||
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
|
||||
fi
|
||||
|
||||
# For Cygwin, switch paths to Windows format before running java
|
||||
if $cygwin ; then
|
||||
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
||||
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
||||
|
||||
# We build the pattern for arguments to be converted via cygpath
|
||||
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
|
||||
SEP=""
|
||||
for dir in $ROOTDIRSRAW ; do
|
||||
ROOTDIRS="$ROOTDIRS$SEP$dir"
|
||||
SEP="|"
|
||||
done
|
||||
OURCYGPATTERN="(^($ROOTDIRS))"
|
||||
# Add a user-defined pattern to the cygpath arguments
|
||||
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
|
||||
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
|
||||
fi
|
||||
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||
i=0
|
||||
for arg in "$@" ; do
|
||||
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
|
||||
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
|
||||
|
||||
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
|
||||
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
|
||||
else
|
||||
eval `echo args$i`="\"$arg\""
|
||||
fi
|
||||
i=$((i+1))
|
||||
done
|
||||
case $i in
|
||||
(0) set -- ;;
|
||||
(1) set -- "$args0" ;;
|
||||
(2) set -- "$args0" "$args1" ;;
|
||||
(3) set -- "$args0" "$args1" "$args2" ;;
|
||||
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
|
||||
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
|
||||
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
|
||||
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
|
||||
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
|
||||
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
|
||||
function splitJvmOpts() {
|
||||
JVM_OPTS=("$@")
|
||||
}
|
||||
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
|
||||
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
|
||||
|
||||
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
|
||||
Vendored
-90
@@ -1,90 +0,0 @@
|
||||
@if "%DEBUG%" == "" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem Gradle startup script for Windows
|
||||
@rem
|
||||
@rem ##########################################################################
|
||||
|
||||
@rem Set local scope for the variables with windows NT shell
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
|
||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
set DEFAULT_JVM_OPTS=
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%" == "" set DIRNAME=.
|
||||
set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
@rem Find java.exe
|
||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if "%ERRORLEVEL%" == "0" goto init
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:findJavaFromJavaHome
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto init
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:init
|
||||
@rem Get command-line arguments, handling Windowz variants
|
||||
|
||||
if not "%OS%" == "Windows_NT" goto win9xME_args
|
||||
if "%@eval[2+2]" == "4" goto 4NT_args
|
||||
|
||||
:win9xME_args
|
||||
@rem Slurp the command line arguments.
|
||||
set CMD_LINE_ARGS=
|
||||
set _SKIP=2
|
||||
|
||||
:win9xME_args_slurp
|
||||
if "x%~1" == "x" goto execute
|
||||
|
||||
set CMD_LINE_ARGS=%*
|
||||
goto execute
|
||||
|
||||
:4NT_args
|
||||
@rem Get arguments from the 4NT Shell from JP Software
|
||||
set CMD_LINE_ARGS=%$
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if "%ERRORLEVEL%"=="0" goto mainEnd
|
||||
|
||||
:fail
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd.exe /c_ return code!
|
||||
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
||||
exit /b 1
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
||||
:omega
|
||||
@@ -1,37 +0,0 @@
|
||||
-------------------------------------------
|
||||
Source installation information for modders
|
||||
-------------------------------------------
|
||||
This code follows the Minecraft Forge installation methodology. It will apply
|
||||
some small patches to the vanilla MCP source code, giving you and it access
|
||||
to some of the data and functions you need to build a successful mod.
|
||||
|
||||
Note also that the patches are built against "unrenamed" MCP source code (aka
|
||||
srgnames) - this means that you will not be able to read them directly against
|
||||
normal code.
|
||||
|
||||
Source pack installation information:
|
||||
|
||||
Standalone source installation
|
||||
==============================
|
||||
|
||||
To install this source code for development purposes, extract this zip file.
|
||||
It ships with a demonstration mod. Run 'gradlew setupDevWorkspace' to create
|
||||
a gradle environment primed with FML. Run 'gradlew eclipse' or 'gradlew idea' to
|
||||
create an IDE workspace of your choice.
|
||||
Refer to ForgeGradle for more information about the gradle environment
|
||||
Note: On macs or linux you run the './gradlew.sh' instead of 'gradlew'
|
||||
|
||||
Forge source installation
|
||||
=========================
|
||||
MinecraftForge ships with this code and installs it as part of the forge
|
||||
installation process, no further action is required on your part.
|
||||
|
||||
For reference this is version @MAJOR@.@MINOR@.@REV@.@BUILD@ of FML
|
||||
for Minecraft version @MCVERSION@.
|
||||
|
||||
LexManos' Install Video
|
||||
=======================
|
||||
https://www.youtube.com/watch?v=8VEdtQLuLO0&feature=youtu.be
|
||||
|
||||
For more details update more often refer to the Forge Forums:
|
||||
http://www.minecraftforge.net/forum/index.php/topic,14048.0.html
|
||||
Binary file not shown.
@@ -1,9 +0,0 @@
|
||||
^org/bouncycastle
|
||||
^org/apache
|
||||
^com/google
|
||||
^com/mojang/authlib
|
||||
^com/mojang/util
|
||||
^gnu/trove
|
||||
^io/netty
|
||||
^javax/annotation
|
||||
^argo
|
||||
@@ -1,24 +0,0 @@
|
||||
--- ../src-base/minecraft/net/minecraft/block/Block.java
|
||||
+++ ../src-work/minecraft/net/minecraft/block/Block.java
|
||||
@@ -39,8 +39,9 @@
|
||||
public class Block
|
||||
{
|
||||
private static final ResourceLocation field_176230_a = new ResourceLocation("air");
|
||||
- public static final RegistryNamespacedDefaultedByKey field_149771_c = new RegistryNamespacedDefaultedByKey(field_176230_a);
|
||||
- public static final ObjectIntIdentityMap field_176229_d = new ObjectIntIdentityMap();
|
||||
+ public static final RegistryNamespacedDefaultedByKey field_149771_c = net.minecraftforge.fml.common.registry.GameData.getBlockRegistry();
|
||||
+ @Deprecated //Modders: DO NOT use this! Use GameRegistry
|
||||
+ public static final ObjectIntIdentityMap field_176229_d = net.minecraftforge.fml.common.registry.GameData.getBlockStateIDMap();
|
||||
private CreativeTabs field_149772_a;
|
||||
public static final Block.SoundType field_149769_e = new Block.SoundType("stone", 1.0F, 1.0F);
|
||||
public static final Block.SoundType field_149766_f = new Block.SoundType("wood", 1.0F, 1.0F);
|
||||
@@ -124,6 +125,9 @@
|
||||
private String field_149770_b;
|
||||
private static final String __OBFID = "CL_00000199";
|
||||
|
||||
+ public final net.minecraftforge.fml.common.registry.RegistryDelegate<Block> delegate =
|
||||
+ ((net.minecraftforge.fml.common.registry.FMLControlledNamespacedRegistry)field_149771_c).getDelegate(this, Block.class);
|
||||
+
|
||||
public static int func_149682_b(Block p_149682_0_)
|
||||
{
|
||||
return field_149771_c.func_148757_b(p_149682_0_);
|
||||
@@ -1,197 +0,0 @@
|
||||
--- ../src-base/minecraft/net/minecraft/client/Minecraft.java
|
||||
+++ ../src-work/minecraft/net/minecraft/client/Minecraft.java
|
||||
@@ -410,10 +410,10 @@
|
||||
this.field_110451_am = new SimpleReloadableResourceManager(this.field_110452_an);
|
||||
this.field_135017_as = new LanguageManager(this.field_110452_an, this.field_71474_y.field_74363_ab);
|
||||
this.field_110451_am.func_110542_a(this.field_135017_as);
|
||||
- this.func_110436_a();
|
||||
+ net.minecraftforge.fml.client.FMLClientHandler.instance().beginMinecraftLoading(this, this.field_110449_ao, this.field_110451_am);
|
||||
this.field_71446_o = new TextureManager(this.field_110451_am);
|
||||
this.field_110451_am.func_110542_a(this.field_71446_o);
|
||||
- this.func_180510_a(this.field_71446_o);
|
||||
+ net.minecraftforge.fml.client.SplashProgress.drawVanillaScreen(this.field_71446_o);
|
||||
this.func_175595_al();
|
||||
this.field_152350_aA = new SkinManager(this.field_71446_o, new File(this.field_110446_Y, "skins"), this.field_152355_az);
|
||||
this.field_71469_aa = new AnvilSaveConverter(new File(this.field_71412_D, "saves"));
|
||||
@@ -449,6 +449,8 @@
|
||||
}
|
||||
});
|
||||
this.field_71417_B = new MouseHelper();
|
||||
+ net.minecraftforge.fml.common.ProgressManager.ProgressBar bar= net.minecraftforge.fml.common.ProgressManager.push("Rendering Setup", 9);
|
||||
+ bar.step("GL Setup");
|
||||
this.func_71361_d("Pre startup");
|
||||
GlStateManager.func_179098_w();
|
||||
GlStateManager.func_179103_j(7425);
|
||||
@@ -462,17 +464,21 @@
|
||||
GlStateManager.func_179096_D();
|
||||
GlStateManager.func_179128_n(5888);
|
||||
this.func_71361_d("Startup");
|
||||
+ bar.step("Loading Texture Map");
|
||||
this.field_147128_au = new TextureMap("textures");
|
||||
this.field_147128_au.func_147633_a(this.field_71474_y.field_151442_I);
|
||||
this.field_71446_o.func_110580_a(TextureMap.field_110575_b, this.field_147128_au);
|
||||
this.field_71446_o.func_110577_a(TextureMap.field_110575_b);
|
||||
this.field_147128_au.func_174937_a(false, this.field_71474_y.field_151442_I > 0);
|
||||
+ bar.step("Loading Model Manager");
|
||||
this.field_175617_aL = new ModelManager(this.field_147128_au);
|
||||
this.field_110451_am.func_110542_a(this.field_175617_aL);
|
||||
+ bar.step("Loading Item Renderer");
|
||||
this.field_175621_X = new RenderItem(this.field_71446_o, this.field_175617_aL);
|
||||
this.field_175616_W = new RenderManager(this.field_71446_o, this.field_175621_X);
|
||||
this.field_175620_Y = new ItemRenderer(this);
|
||||
this.field_110451_am.func_110542_a(this.field_175621_X);
|
||||
+ bar.step("Loading Entity Renderer");
|
||||
this.field_71460_t = new EntityRenderer(this, this.field_110451_am);
|
||||
this.field_110451_am.func_110542_a(this.field_71460_t);
|
||||
this.field_175618_aM = new BlockRendererDispatcher(this.field_175617_aL.func_174954_c(), this.field_71474_y);
|
||||
@@ -482,19 +488,21 @@
|
||||
this.field_71458_u = new GuiAchievement(this);
|
||||
GlStateManager.func_179083_b(0, 0, this.field_71443_c, this.field_71440_d);
|
||||
this.field_71452_i = new EffectRenderer(this.field_71441_e, this.field_71446_o);
|
||||
+ net.minecraftforge.fml.common.ProgressManager.pop(bar);
|
||||
+ net.minecraftforge.fml.client.FMLClientHandler.instance().finishMinecraftLoading();
|
||||
this.func_71361_d("Post startup");
|
||||
this.field_71456_v = new GuiIngame(this);
|
||||
|
||||
if (this.field_71475_ae != null)
|
||||
{
|
||||
- this.func_147108_a(new GuiConnecting(new GuiMainMenu(), this, this.field_71475_ae, this.field_71477_af));
|
||||
+ net.minecraftforge.fml.client.FMLClientHandler.instance().connectToServerAtStartup(this.field_71475_ae, this.field_71477_af);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.func_147108_a(new GuiMainMenu());
|
||||
}
|
||||
|
||||
- this.field_71446_o.func_147645_c(this.field_152354_ay);
|
||||
+ net.minecraftforge.fml.client.SplashProgress.clearVanillaResources(field_71446_o, field_152354_ay);
|
||||
this.field_152354_ay = null;
|
||||
this.field_71461_s = new LoadingScreenRenderer(this);
|
||||
|
||||
@@ -503,6 +511,7 @@
|
||||
this.func_71352_k();
|
||||
}
|
||||
|
||||
+ net.minecraftforge.fml.client.FMLClientHandler.instance().onInitializationComplete();
|
||||
try
|
||||
{
|
||||
Display.setVSyncEnabled(this.field_71474_y.field_74352_v);
|
||||
@@ -681,21 +690,23 @@
|
||||
File file2 = new File(file1, "crash-" + (new SimpleDateFormat("yyyy-MM-dd_HH.mm.ss")).format(new Date()) + "-client.txt");
|
||||
Bootstrap.func_179870_a(p_71377_1_.func_71502_e());
|
||||
|
||||
+ int retVal;
|
||||
if (p_71377_1_.func_71497_f() != null)
|
||||
{
|
||||
Bootstrap.func_179870_a("#@!@# Game crashed! Crash report saved to: #@!@# " + p_71377_1_.func_71497_f());
|
||||
- System.exit(-1);
|
||||
+ retVal = -1;
|
||||
}
|
||||
else if (p_71377_1_.func_147149_a(file2))
|
||||
{
|
||||
Bootstrap.func_179870_a("#@!@# Game crashed! Crash report saved to: #@!@# " + file2.getAbsolutePath());
|
||||
- System.exit(-1);
|
||||
+ retVal = -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
Bootstrap.func_179870_a("#@?@# Game crashed! Crash report could not be saved. #@?@#");
|
||||
- System.exit(-2);
|
||||
+ retVal = -2;
|
||||
}
|
||||
+ net.minecraftforge.fml.common.FMLCommonHandler.instance().handleExit(retVal);
|
||||
}
|
||||
|
||||
public boolean func_152349_b()
|
||||
@@ -999,7 +1010,7 @@
|
||||
{
|
||||
while (!this.field_152351_aB.isEmpty())
|
||||
{
|
||||
- ((FutureTask)this.field_152351_aB.poll()).run();
|
||||
+ net.minecraftforge.fml.common.FMLCommonHandler.callFuture(((FutureTask)this.field_152351_aB.poll()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1034,9 +1045,11 @@
|
||||
|
||||
if (!this.field_71454_w)
|
||||
{
|
||||
+ net.minecraftforge.fml.common.FMLCommonHandler.instance().onRenderTickStart(this.field_71428_T.field_74281_c);
|
||||
this.field_71424_I.func_76318_c("gameRenderer");
|
||||
this.field_71460_t.func_78480_b(this.field_71428_T.field_74281_c);
|
||||
this.field_71424_I.func_76319_b();
|
||||
+ net.minecraftforge.fml.common.FMLCommonHandler.instance().onRenderTickEnd(this.field_71428_T.field_74281_c);
|
||||
}
|
||||
|
||||
this.field_71424_I.func_76319_b();
|
||||
@@ -1591,6 +1604,8 @@
|
||||
--this.field_71467_ac;
|
||||
}
|
||||
|
||||
+ net.minecraftforge.fml.common.FMLCommonHandler.instance().onPreClientTick();
|
||||
+
|
||||
this.field_71424_I.func_76320_a("gui");
|
||||
|
||||
if (!this.field_71445_n)
|
||||
@@ -1744,6 +1759,7 @@
|
||||
this.field_71462_r.func_146274_d();
|
||||
}
|
||||
}
|
||||
+ net.minecraftforge.fml.common.FMLCommonHandler.instance().fireMouseInput();
|
||||
}
|
||||
|
||||
if (this.field_71429_W > 0)
|
||||
@@ -1920,6 +1936,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
+ net.minecraftforge.fml.common.FMLCommonHandler.instance().fireKeyInput();
|
||||
}
|
||||
|
||||
for (i = 0; i < 9; ++i)
|
||||
@@ -2120,12 +2137,15 @@
|
||||
this.field_71453_ak.func_74428_b();
|
||||
}
|
||||
|
||||
+ net.minecraftforge.fml.common.FMLCommonHandler.instance().onPostClientTick();
|
||||
+
|
||||
this.field_71424_I.func_76319_b();
|
||||
this.field_71423_H = func_71386_F();
|
||||
}
|
||||
|
||||
public void func_71371_a(String p_71371_1_, String p_71371_2_, WorldSettings p_71371_3_)
|
||||
{
|
||||
+ net.minecraftforge.fml.client.FMLClientHandler.instance().startIntegratedServer(p_71371_1_, p_71371_2_, p_71371_3_);
|
||||
this.func_71403_a((WorldClient)null);
|
||||
System.gc();
|
||||
ISaveHandler isavehandler = this.field_71469_aa.func_75804_a(p_71371_1_, false);
|
||||
@@ -2161,6 +2181,12 @@
|
||||
|
||||
while (!this.field_71437_Z.func_71200_ad())
|
||||
{
|
||||
+ if (!net.minecraftforge.fml.common.StartupQuery.check())
|
||||
+ {
|
||||
+ func_71403_a(null);
|
||||
+ func_147108_a(null);
|
||||
+ return;
|
||||
+ }
|
||||
String s2 = this.field_71437_Z.func_71195_b_();
|
||||
|
||||
if (s2 != null)
|
||||
@@ -2186,7 +2212,7 @@
|
||||
SocketAddress socketaddress = this.field_71437_Z.func_147137_ag().func_151270_a();
|
||||
NetworkManager networkmanager = NetworkManager.func_150722_a(socketaddress);
|
||||
networkmanager.func_150719_a(new NetHandlerLoginClient(networkmanager, this, (GuiScreen)null));
|
||||
- networkmanager.func_179290_a(new C00Handshake(47, socketaddress.toString(), 0, EnumConnectionState.LOGIN));
|
||||
+ networkmanager.func_179290_a(new C00Handshake(47, socketaddress.toString(), 0, EnumConnectionState.LOGIN, true));
|
||||
networkmanager.func_179290_a(new C00PacketLoginStart(this.func_110432_I().func_148256_e()));
|
||||
this.field_71453_ak = networkmanager;
|
||||
}
|
||||
@@ -2237,6 +2263,7 @@
|
||||
|
||||
this.func_71351_a((ServerData)null);
|
||||
this.field_71455_al = false;
|
||||
+ net.minecraftforge.fml.client.FMLClientHandler.instance().handleClientWorldClosing(this.field_71441_e);
|
||||
}
|
||||
|
||||
this.field_147127_av.func_147690_c();
|
||||
@@ -1,11 +0,0 @@
|
||||
--- ../src-base/minecraft/net/minecraft/client/gui/GuiCreateWorld.java
|
||||
+++ ../src-work/minecraft/net/minecraft/client/gui/GuiCreateWorld.java
|
||||
@@ -213,6 +213,8 @@
|
||||
}
|
||||
}
|
||||
|
||||
+ WorldType.field_77139_a[this.field_146331_K].onGUICreateWorldPress();
|
||||
+
|
||||
WorldSettings.GameType gametype = WorldSettings.GameType.func_77142_a(this.field_146342_r);
|
||||
WorldSettings worldsettings = new WorldSettings(i, gametype, this.field_146341_s, this.field_146337_w, WorldType.field_77139_a[this.field_146331_K]);
|
||||
worldsettings.func_82750_a(this.field_146334_a);
|
||||
@@ -1,24 +0,0 @@
|
||||
--- ../src-base/minecraft/net/minecraft/client/gui/GuiIngameMenu.java
|
||||
+++ ../src-work/minecraft/net/minecraft/client/gui/GuiIngameMenu.java
|
||||
@@ -30,8 +30,9 @@
|
||||
|
||||
this.field_146292_n.add(new GuiButton(4, this.field_146294_l / 2 - 100, this.field_146295_m / 4 + 24 + b0, I18n.func_135052_a("menu.returnToGame", new Object[0])));
|
||||
this.field_146292_n.add(new GuiButton(0, this.field_146294_l / 2 - 100, this.field_146295_m / 4 + 96 + b0, 98, 20, I18n.func_135052_a("menu.options", new Object[0])));
|
||||
+ this.field_146292_n.add(new GuiButton(12, this.field_146294_l / 2 + 2, this.field_146295_m / 4 + 96 + b0, 98, 20, I18n.func_135052_a("fml.menu.modoptions")));
|
||||
GuiButton guibutton;
|
||||
- this.field_146292_n.add(guibutton = new GuiButton(7, this.field_146294_l / 2 + 2, this.field_146295_m / 4 + 96 + b0, 98, 20, I18n.func_135052_a("menu.shareToLan", new Object[0])));
|
||||
+ this.field_146292_n.add(guibutton = new GuiButton(7, this.field_146294_l / 2 - 100, this.field_146295_m / 4 + 72 + b0, 200, 20, I18n.func_135052_a("menu.shareToLan", new Object[0])));
|
||||
this.field_146292_n.add(new GuiButton(5, this.field_146294_l / 2 - 100, this.field_146295_m / 4 + 48 + b0, 98, 20, I18n.func_135052_a("gui.achievements", new Object[0])));
|
||||
this.field_146292_n.add(new GuiButton(6, this.field_146294_l / 2 + 2, this.field_146295_m / 4 + 48 + b0, 98, 20, I18n.func_135052_a("gui.stats", new Object[0])));
|
||||
guibutton.field_146124_l = this.field_146297_k.func_71356_B() && !this.field_146297_k.func_71401_C().func_71344_c();
|
||||
@@ -65,6 +66,10 @@
|
||||
break;
|
||||
case 7:
|
||||
this.field_146297_k.func_147108_a(new GuiShareToLan(this));
|
||||
+ break;
|
||||
+ case 12:
|
||||
+ net.minecraftforge.fml.client.FMLClientHandler.instance().showInGameModOptions(this);
|
||||
+ break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,43 +0,0 @@
|
||||
--- ../src-base/minecraft/net/minecraft/client/gui/GuiMainMenu.java
|
||||
+++ ../src-work/minecraft/net/minecraft/client/gui/GuiMainMenu.java
|
||||
@@ -198,6 +198,11 @@
|
||||
this.field_146292_n.add(new GuiButton(1, this.field_146294_l / 2 - 100, p_73969_1_, I18n.func_135052_a("menu.singleplayer", new Object[0])));
|
||||
this.field_146292_n.add(new GuiButton(2, this.field_146294_l / 2 - 100, p_73969_1_ + p_73969_2_ * 1, I18n.func_135052_a("menu.multiplayer", new Object[0])));
|
||||
this.field_146292_n.add(this.field_175372_K = new GuiButton(14, this.field_146294_l / 2 - 100, p_73969_1_ + p_73969_2_ * 2, I18n.func_135052_a("menu.online", new Object[0])));
|
||||
+ GuiButton fmlModButton = new GuiButton(6, this.field_146294_l / 2 - 100, p_73969_1_ + p_73969_2_ * 2, I18n.func_135052_a("fml.menu.mods"));
|
||||
+ fmlModButton.field_146128_h = this.field_146294_l / 2 + 2;
|
||||
+ field_175372_K.field_146120_f = 98;
|
||||
+ fmlModButton.field_146120_f = 98;
|
||||
+ this.field_146292_n.add(fmlModButton);
|
||||
}
|
||||
|
||||
private void func_73972_b(int p_73972_1_, int p_73972_2_)
|
||||
@@ -245,6 +250,11 @@
|
||||
this.field_146297_k.func_71400_g();
|
||||
}
|
||||
|
||||
+ if (p_146284_1_.field_146127_k == 6)
|
||||
+ {
|
||||
+ this.field_146297_k.func_147108_a(new net.minecraftforge.fml.client.GuiModList(this));
|
||||
+ }
|
||||
+
|
||||
if (p_146284_1_.field_146127_k == 11)
|
||||
{
|
||||
this.field_146297_k.func_71371_a("Demo_World", "Demo_World", DemoWorldServer.field_73071_a);
|
||||
@@ -492,7 +502,15 @@
|
||||
s = s + " Demo";
|
||||
}
|
||||
|
||||
- this.func_73731_b(this.field_146289_q, s, 2, this.field_146295_m - 10, -1);
|
||||
+ java.util.List<String> brandings = com.google.common.collect.Lists.reverse(net.minecraftforge.fml.common.FMLCommonHandler.instance().getBrandings(true));
|
||||
+ for (int i = 0; i < brandings.size(); i++)
|
||||
+ {
|
||||
+ String brd = brandings.get(i);
|
||||
+ if (!com.google.common.base.Strings.isNullOrEmpty(brd))
|
||||
+ {
|
||||
+ this.func_73731_b(this.field_146289_q, brd, 2, this.field_146295_m - ( 10 + i * (this.field_146289_q.field_78288_b + 1)), 16777215);
|
||||
+ }
|
||||
+ }
|
||||
String s1 = "Copyright Mojang AB. Do not distribute!";
|
||||
this.func_73731_b(this.field_146289_q, s1, this.field_146294_l - this.field_146289_q.func_78256_a(s1) - 2, this.field_146295_m - 10, -1);
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
--- ../src-base/minecraft/net/minecraft/client/gui/GuiOverlayDebug.java
|
||||
+++ ../src-work/minecraft/net/minecraft/client/gui/GuiOverlayDebug.java
|
||||
@@ -170,6 +170,9 @@
|
||||
long l = j - k;
|
||||
ArrayList arraylist = Lists.newArrayList(new String[] {String.format("Java: %s %dbit", new Object[]{System.getProperty("java.version"), Integer.valueOf(this.field_175242_a.func_147111_S() ? 64 : 32)}), String.format("Mem: % 2d%% %03d/%03dMB", new Object[]{Long.valueOf(l * 100L / i), Long.valueOf(func_175240_a(l)), Long.valueOf(func_175240_a(i))}), String.format("Allocated: % 2d%% %03dMB", new Object[]{Long.valueOf(j * 100L / i), Long.valueOf(func_175240_a(j))}), "", String.format("Display: %dx%d (%s)", new Object[]{Integer.valueOf(Display.getWidth()), Integer.valueOf(Display.getHeight()), GL11.glGetString(GL11.GL_VENDOR)}), GL11.glGetString(GL11.GL_RENDERER), GL11.glGetString(GL11.GL_VERSION)});
|
||||
|
||||
+ arraylist.add("");
|
||||
+ arraylist.addAll(net.minecraftforge.fml.common.FMLCommonHandler.instance().getBrandings(false));
|
||||
+
|
||||
if (this.func_175236_d())
|
||||
{
|
||||
return arraylist;
|
||||
@@ -1,23 +0,0 @@
|
||||
--- ../src-base/minecraft/net/minecraft/client/gui/ServerListEntryNormal.java
|
||||
+++ ../src-work/minecraft/net/minecraft/client/gui/ServerListEntryNormal.java
|
||||
@@ -84,7 +84,7 @@
|
||||
boolean flag2 = this.field_148301_e.field_82821_f < 47;
|
||||
boolean flag3 = flag1 || flag2;
|
||||
this.field_148300_d.field_71466_p.func_78276_b(this.field_148301_e.field_78847_a, p_180790_2_ + 32 + 3, p_180790_3_ + 1, 16777215);
|
||||
- List list = this.field_148300_d.field_71466_p.func_78271_c(this.field_148301_e.field_78843_d, p_180790_4_ - 32 - 2);
|
||||
+ List list = this.field_148300_d.field_71466_p.func_78271_c(net.minecraftforge.fml.client.FMLClientHandler.instance().fixDescription(this.field_148301_e.field_78843_d), p_180790_4_ - 48 - 2);
|
||||
|
||||
for (int l1 = 0; l1 < Math.min(list.size(), 2); ++l1)
|
||||
{
|
||||
@@ -178,6 +178,11 @@
|
||||
int k2 = p_180790_6_ - p_180790_2_;
|
||||
int l2 = p_180790_7_ - p_180790_3_;
|
||||
|
||||
+ String tooltip = net.minecraftforge.fml.client.FMLClientHandler.instance().enhanceServerListEntry(this, this.field_148301_e, p_180790_2_, p_180790_4_, p_180790_3_, k2, l2);
|
||||
+ if (tooltip != null)
|
||||
+ {
|
||||
+ this.field_148303_c.func_146793_a(tooltip);
|
||||
+ } else
|
||||
if (k2 >= p_180790_4_ - 15 && k2 <= p_180790_4_ - 5 && l2 >= 0 && l2 <= 8)
|
||||
{
|
||||
this.field_148303_c.func_146793_a(s1);
|
||||
@@ -1,11 +0,0 @@
|
||||
--- ../src-base/minecraft/net/minecraft/client/network/NetHandlerPlayClient.java
|
||||
+++ ../src-work/minecraft/net/minecraft/client/network/NetHandlerPlayClient.java
|
||||
@@ -247,7 +247,7 @@
|
||||
{
|
||||
PacketThreadUtil.func_180031_a(p_147282_1_, this, this.field_147299_f);
|
||||
this.field_147299_f.field_71442_b = new PlayerControllerMP(this.field_147299_f, this);
|
||||
- this.field_147300_g = new WorldClient(this, new WorldSettings(0L, p_147282_1_.func_149198_e(), false, p_147282_1_.func_149195_d(), p_147282_1_.func_149196_i()), p_147282_1_.func_149194_f(), p_147282_1_.func_149192_g(), this.field_147299_f.field_71424_I);
|
||||
+ this.field_147300_g = new WorldClient(this, new WorldSettings(0L, p_147282_1_.func_149198_e(), false, p_147282_1_.func_149195_d(), p_147282_1_.func_149196_i()), net.minecraftforge.fml.common.network.handshake.NetworkDispatcher.get(func_147298_b()).getOverrideDimension(p_147282_1_), p_147282_1_.func_149192_g(), this.field_147299_f.field_71424_I);
|
||||
this.field_147299_f.field_71474_y.field_74318_M = p_147282_1_.func_149192_g();
|
||||
this.field_147299_f.func_71403_a(this.field_147300_g);
|
||||
this.field_147299_f.field_71439_g.field_71093_bK = p_147282_1_.func_149194_f();
|
||||
@@ -1,10 +0,0 @@
|
||||
--- ../src-base/minecraft/net/minecraft/client/network/OldServerPinger.java
|
||||
+++ ../src-work/minecraft/net/minecraft/client/network/OldServerPinger.java
|
||||
@@ -148,6 +148,7 @@
|
||||
p_147224_1_.func_147407_a((String)null);
|
||||
}
|
||||
|
||||
+ net.minecraftforge.fml.client.FMLClientHandler.instance().bindServerListData(p_147224_1_, serverstatusresponse);
|
||||
this.field_175092_e = Minecraft.func_71386_F();
|
||||
networkmanager.func_179290_a(new C01PacketPing(this.field_175092_e));
|
||||
this.field_147403_d = true;
|
||||
@@ -1,91 +0,0 @@
|
||||
--- ../src-base/minecraft/net/minecraft/client/renderer/texture/TextureMap.java
|
||||
+++ ../src-work/minecraft/net/minecraft/client/renderer/texture/TextureMap.java
|
||||
@@ -91,6 +91,7 @@
|
||||
this.field_94258_i.clear();
|
||||
int j = Integer.MAX_VALUE;
|
||||
int k = 1 << this.field_147636_j;
|
||||
+ net.minecraftforge.fml.common.ProgressManager.ProgressBar bar = net.minecraftforge.fml.common.ProgressManager.push("Texture stitching", this.field_110574_e.size());
|
||||
Iterator iterator = this.field_110574_e.entrySet().iterator();
|
||||
|
||||
while (iterator.hasNext())
|
||||
@@ -99,6 +100,7 @@
|
||||
TextureAtlasSprite textureatlassprite = (TextureAtlasSprite)entry.getValue();
|
||||
ResourceLocation resourcelocation = new ResourceLocation(textureatlassprite.func_94215_i());
|
||||
ResourceLocation resourcelocation1 = this.func_147634_a(resourcelocation, 0);
|
||||
+ bar.step(resourcelocation1.func_110623_a());
|
||||
|
||||
try
|
||||
{
|
||||
@@ -150,12 +152,14 @@
|
||||
}
|
||||
catch (RuntimeException runtimeexception)
|
||||
{
|
||||
- field_147635_d.error("Unable to parse metadata from " + resourcelocation1, runtimeexception);
|
||||
+ //logger.error("Unable to parse metadata from " + resourcelocation1, runtimeexception);
|
||||
+ net.minecraftforge.fml.client.FMLClientHandler.instance().trackBrokenTexture(resourcelocation1, runtimeexception.getMessage());
|
||||
continue;
|
||||
}
|
||||
catch (IOException ioexception1)
|
||||
{
|
||||
- field_147635_d.error("Using missing texture, unable to load " + resourcelocation1, ioexception1);
|
||||
+ //logger.error("Using missing texture, unable to load " + resourcelocation1, ioexception1);
|
||||
+ net.minecraftforge.fml.client.FMLClientHandler.instance().trackMissingTexture(resourcelocation1);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -171,6 +175,7 @@
|
||||
stitcher.func_110934_a(textureatlassprite);
|
||||
}
|
||||
|
||||
+ net.minecraftforge.fml.common.ProgressManager.pop(bar);
|
||||
int j1 = Math.min(j, k);
|
||||
int k1 = MathHelper.func_151239_c(j1);
|
||||
|
||||
@@ -181,10 +186,12 @@
|
||||
}
|
||||
|
||||
Iterator iterator1 = this.field_110574_e.values().iterator();
|
||||
+ bar = net.minecraftforge.fml.common.ProgressManager.push("Mipmap generation", this.field_110574_e.size());
|
||||
|
||||
while (iterator1.hasNext())
|
||||
{
|
||||
final TextureAtlasSprite textureatlassprite1 = (TextureAtlasSprite)iterator1.next();
|
||||
+ bar.step(textureatlassprite1.func_94215_i());
|
||||
|
||||
try
|
||||
{
|
||||
@@ -225,9 +232,12 @@
|
||||
|
||||
this.field_94249_f.func_147963_d(this.field_147636_j);
|
||||
stitcher.func_110934_a(this.field_94249_f);
|
||||
+ net.minecraftforge.fml.common.ProgressManager.pop(bar);
|
||||
+ bar = net.minecraftforge.fml.common.ProgressManager.push("Texture creation", 3);
|
||||
|
||||
try
|
||||
{
|
||||
+ bar.step("Stitching");
|
||||
stitcher.func_94305_f();
|
||||
}
|
||||
catch (StitcherException stitcherexception)
|
||||
@@ -236,11 +246,13 @@
|
||||
}
|
||||
|
||||
field_147635_d.info("Created: {}x{} {}-atlas", new Object[] {Integer.valueOf(stitcher.func_110935_a()), Integer.valueOf(stitcher.func_110936_b()), this.field_94254_c});
|
||||
+ bar.step("Allocating GL texture");
|
||||
TextureUtil.func_180600_a(this.func_110552_b(), this.field_147636_j, stitcher.func_110935_a(), stitcher.func_110936_b());
|
||||
HashMap hashmap = Maps.newHashMap(this.field_110574_e);
|
||||
Iterator iterator2 = stitcher.func_94309_g().iterator();
|
||||
TextureAtlasSprite textureatlassprite2;
|
||||
|
||||
+ bar.step("Uploading GL texture");
|
||||
while (iterator2.hasNext())
|
||||
{
|
||||
textureatlassprite2 = (TextureAtlasSprite)iterator2.next();
|
||||
@@ -276,6 +288,7 @@
|
||||
}
|
||||
|
||||
TextureUtil.func_177055_a(this.field_94254_c.replaceAll("/", "_"), this.func_110552_b(), this.field_147636_j, stitcher.func_110935_a(), stitcher.func_110936_b());
|
||||
+ net.minecraftforge.fml.common.ProgressManager.pop(bar);
|
||||
}
|
||||
|
||||
private ResourceLocation func_147634_a(ResourceLocation p_147634_1_, int p_147634_2_)
|
||||
@@ -1,41 +0,0 @@
|
||||
--- ../src-base/minecraft/net/minecraft/client/resources/model/ModelBakery.java
|
||||
+++ ../src-work/minecraft/net/minecraft/client/resources/model/ModelBakery.java
|
||||
@@ -318,6 +318,7 @@
|
||||
|
||||
private void func_177592_e()
|
||||
{
|
||||
+ this.field_177613_u.clear(); //FML clear this to prevent double ups.
|
||||
this.field_177613_u.put(Item.func_150898_a(Blocks.field_150348_b), Lists.newArrayList(new String[] {"stone", "granite", "granite_smooth", "diorite", "diorite_smooth", "andesite", "andesite_smooth"}));
|
||||
this.field_177613_u.put(Item.func_150898_a(Blocks.field_150346_d), Lists.newArrayList(new String[] {"dirt", "coarse_dirt", "podzol"}));
|
||||
this.field_177613_u.put(Item.func_150898_a(Blocks.field_150344_f), Lists.newArrayList(new String[] {"oak_planks", "spruce_planks", "birch_planks", "jungle_planks", "acacia_planks", "dark_oak_planks"}));
|
||||
@@ -360,6 +361,10 @@
|
||||
this.field_177613_u.put(Item.func_150898_a(Blocks.field_180390_bo), Lists.newArrayList(new String[] {"oak_fence_gate"}));
|
||||
this.field_177613_u.put(Item.func_150898_a(Blocks.field_180407_aO), Lists.newArrayList(new String[] {"oak_fence"}));
|
||||
this.field_177613_u.put(Items.field_179570_aq, Lists.newArrayList(new String[] {"oak_door"}));
|
||||
+ for (Entry<net.minecraftforge.fml.common.registry.RegistryDelegate<Item>, Set<String>> e : customVariantNames.entrySet())
|
||||
+ {
|
||||
+ this.field_177613_u.put(e.getKey().get(), Lists.newArrayList(e.getValue().iterator()));
|
||||
+ }
|
||||
}
|
||||
|
||||
private List func_177596_a(Item p_177596_1_)
|
||||
@@ -809,4 +814,19 @@
|
||||
field_177617_q.field_178317_b = "class generation marker";
|
||||
field_177616_r.field_178317_b = "block entity marker";
|
||||
}
|
||||
+
|
||||
+ /***********************************************************
|
||||
+ * FML Start
|
||||
+ ***********************************************************/
|
||||
+ private static Map<net.minecraftforge.fml.common.registry.RegistryDelegate<Item>, Set<String>> customVariantNames = Maps.newHashMap();
|
||||
+ public static void addVariantName(Item item, String... names)
|
||||
+ {
|
||||
+ if (customVariantNames.containsKey(item.delegate))
|
||||
+ customVariantNames.get(item.delegate).addAll(Lists.newArrayList(names));
|
||||
+ else
|
||||
+ customVariantNames.put(item.delegate, Sets.newHashSet(names));
|
||||
+ }
|
||||
+ /***********************************************************
|
||||
+ * FML End
|
||||
+ ***********************************************************/
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
--- ../src-base/minecraft/net/minecraft/entity/EntityList.java
|
||||
+++ ../src-work/minecraft/net/minecraft/entity/EntityList.java
|
||||
@@ -153,9 +153,10 @@
|
||||
p_75615_0_.func_82580_o("Type");
|
||||
}
|
||||
|
||||
+ Class oclass = null;
|
||||
try
|
||||
{
|
||||
- Class oclass = (Class)field_75625_b.get(p_75615_0_.func_74779_i("id"));
|
||||
+ oclass = (Class)field_75625_b.get(p_75615_0_.func_74779_i("id"));
|
||||
|
||||
if (oclass != null)
|
||||
{
|
||||
@@ -169,7 +170,17 @@
|
||||
|
||||
if (entity != null)
|
||||
{
|
||||
+ try
|
||||
+ {
|
||||
entity.func_70020_e(p_75615_0_);
|
||||
+ }
|
||||
+ catch (Exception e)
|
||||
+ {
|
||||
+ net.minecraftforge.fml.common.FMLLog.log(org.apache.logging.log4j.Level.ERROR, e,
|
||||
+ "An Entity %s(%s) has thrown an exception during loading, its state cannot be restored. Report this to the mod author",
|
||||
+ p_75615_0_.func_74779_i("id"), oclass.getName());
|
||||
+ entity = null;
|
||||
+ }
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1,11 +0,0 @@
|
||||
--- ../src-base/minecraft/net/minecraft/entity/EntityTracker.java
|
||||
+++ ../src-work/minecraft/net/minecraft/entity/EntityTracker.java
|
||||
@@ -58,6 +58,8 @@
|
||||
|
||||
public void func_72786_a(Entity p_72786_1_)
|
||||
{
|
||||
+ if (net.minecraftforge.fml.common.registry.EntityRegistry.instance().tryTrackingEntity(this, p_72786_1_)) return;
|
||||
+
|
||||
if (p_72786_1_ instanceof EntityPlayerMP)
|
||||
{
|
||||
this.func_72791_a(p_72786_1_, 512, 2);
|
||||
@@ -1,27 +0,0 @@
|
||||
--- ../src-base/minecraft/net/minecraft/entity/EntityTrackerEntry.java
|
||||
+++ ../src-work/minecraft/net/minecraft/entity/EntityTrackerEntry.java
|
||||
@@ -388,6 +388,14 @@
|
||||
this.field_73138_k = this.field_73132_a.field_70181_x;
|
||||
this.field_73135_l = this.field_73132_a.field_70179_y;
|
||||
|
||||
+ int posX = MathHelper.func_76128_c(this.field_73132_a.field_70165_t * 32.0D);
|
||||
+ int posY = MathHelper.func_76128_c(this.field_73132_a.field_70163_u * 32.0D);
|
||||
+ int posZ = MathHelper.func_76128_c(this.field_73132_a.field_70161_v * 32.0D);
|
||||
+ if (posX != this.field_73128_d || posY != this.field_73129_e || posZ != this.field_73126_f)
|
||||
+ {
|
||||
+ net.minecraftforge.fml.common.network.internal.FMLNetworkHandler.makeEntitySpawnAdjustment(this.field_73132_a, p_73117_1_, this.field_73128_d, this.field_73129_e, this.field_73126_f);
|
||||
+ }
|
||||
+
|
||||
if (this.field_73143_t && !(packet instanceof S0FPacketSpawnMob))
|
||||
{
|
||||
p_73117_1_.field_71135_a.func_147359_a(new S12PacketEntityVelocity(this.field_73132_a.func_145782_y(), this.field_73132_a.field_70159_w, this.field_73132_a.field_70181_x, this.field_73132_a.field_70179_y));
|
||||
@@ -474,6 +482,9 @@
|
||||
field_151262_p.warn("Fetching addPacket for removed entity");
|
||||
}
|
||||
|
||||
+ Packet pkt = net.minecraftforge.fml.common.network.internal.FMLNetworkHandler.getEntitySpawningPacket(this.field_73132_a);
|
||||
+ if (pkt != null) return pkt;
|
||||
+
|
||||
if (this.field_73132_a instanceof EntityItem)
|
||||
{
|
||||
return new S0EPacketSpawnObject(this.field_73132_a, 2, 1);
|
||||
@@ -1,10 +0,0 @@
|
||||
--- ../src-base/minecraft/net/minecraft/entity/item/EntityItem.java
|
||||
+++ ../src-work/minecraft/net/minecraft/entity/item/EntityItem.java
|
||||
@@ -366,6 +366,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
+ net.minecraftforge.fml.common.FMLCommonHandler.instance().firePlayerItemPickupEvent(p_70100_1_, this);
|
||||
if (!this.func_174814_R())
|
||||
{
|
||||
this.field_70170_p.func_72956_a(p_70100_1_, "random.pop", 0.2F, ((this.field_70146_Z.nextFloat() - this.field_70146_Z.nextFloat()) * 0.7F + 1.0F) * 2.0F);
|
||||
@@ -1,11 +0,0 @@
|
||||
--- ../src-base/minecraft/net/minecraft/entity/monster/EntitySlime.java
|
||||
+++ ../src-work/minecraft/net/minecraft/entity/monster/EntitySlime.java
|
||||
@@ -271,7 +271,7 @@
|
||||
{
|
||||
Chunk chunk = this.field_70170_p.func_175726_f(new BlockPos(MathHelper.func_76128_c(this.field_70165_t), 0, MathHelper.func_76128_c(this.field_70161_v)));
|
||||
|
||||
- if (this.field_70170_p.func_72912_H().func_76067_t() == WorldType.field_77138_c && this.field_70146_Z.nextInt(4) != 1)
|
||||
+ if (this.field_70170_p.func_72912_H().func_76067_t().handleSlimeSpawnReduction(field_70146_Z, field_70170_p))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
--- ../src-base/minecraft/net/minecraft/entity/passive/EntityVillager.java
|
||||
+++ ../src-work/minecraft/net/minecraft/entity/passive/EntityVillager.java
|
||||
@@ -83,6 +83,7 @@
|
||||
private boolean field_82190_bM;
|
||||
private boolean field_175564_by;
|
||||
private InventoryBasic field_175560_bz;
|
||||
+ @Deprecated //Use VillagerRegistry
|
||||
private static final EntityVillager.ITradeList[][][][] field_175561_bA = new EntityVillager.ITradeList[][][][] {{{{new EntityVillager.EmeraldForItems(Items.field_151015_O, new EntityVillager.PriceInfo(18, 22)), new EntityVillager.EmeraldForItems(Items.field_151174_bG, new EntityVillager.PriceInfo(15, 19)), new EntityVillager.EmeraldForItems(Items.field_151172_bF, new EntityVillager.PriceInfo(15, 19)), new EntityVillager.ListItemForEmeralds(Items.field_151025_P, new EntityVillager.PriceInfo(-4, -2))}, {new EntityVillager.EmeraldForItems(Item.func_150898_a(Blocks.field_150423_aK), new EntityVillager.PriceInfo(8, 13)), new EntityVillager.ListItemForEmeralds(Items.field_151158_bO, new EntityVillager.PriceInfo(-3, -2))}, {new EntityVillager.EmeraldForItems(Item.func_150898_a(Blocks.field_150440_ba), new EntityVillager.PriceInfo(7, 12)), new EntityVillager.ListItemForEmeralds(Items.field_151034_e, new EntityVillager.PriceInfo(-5, -7))}, {new EntityVillager.ListItemForEmeralds(Items.field_151106_aX, new EntityVillager.PriceInfo(-6, -10)), new EntityVillager.ListItemForEmeralds(Items.field_151105_aU, new EntityVillager.PriceInfo(1, 1))}}, {{new EntityVillager.EmeraldForItems(Items.field_151007_F, new EntityVillager.PriceInfo(15, 20)), new EntityVillager.EmeraldForItems(Items.field_151044_h, new EntityVillager.PriceInfo(16, 24)), new EntityVillager.ItemAndEmeraldToItem(Items.field_151115_aP, new EntityVillager.PriceInfo(6, 6), Items.field_179566_aV, new EntityVillager.PriceInfo(6, 6))}, {new EntityVillager.ListEnchantedItemForEmeralds(Items.field_151112_aM, new EntityVillager.PriceInfo(7, 8))}}, {{new EntityVillager.EmeraldForItems(Item.func_150898_a(Blocks.field_150325_L), new EntityVillager.PriceInfo(16, 22)), new EntityVillager.ListItemForEmeralds(Items.field_151097_aZ, new EntityVillager.PriceInfo(3, 4))}, {new EntityVillager.ListItemForEmeralds(new ItemStack(Item.func_150898_a(Blocks.field_150325_L), 1, 0), new EntityVillager.PriceInfo(1, 2)), new EntityVillager.ListItemForEmeralds(new ItemStack(Item.func_150898_a(Blocks.field_150325_L), 1, 1), new EntityVillager.PriceInfo(1, 2)), new EntityVillager.ListItemForEmeralds(new ItemStack(Item.func_150898_a(Blocks.field_150325_L), 1, 2), new EntityVillager.PriceInfo(1, 2)), new EntityVillager.ListItemForEmeralds(new ItemStack(Item.func_150898_a(Blocks.field_150325_L), 1, 3), new EntityVillager.PriceInfo(1, 2)), new EntityVillager.ListItemForEmeralds(new ItemStack(Item.func_150898_a(Blocks.field_150325_L), 1, 4), new EntityVillager.PriceInfo(1, 2)), new EntityVillager.ListItemForEmeralds(new ItemStack(Item.func_150898_a(Blocks.field_150325_L), 1, 5), new EntityVillager.PriceInfo(1, 2)), new EntityVillager.ListItemForEmeralds(new ItemStack(Item.func_150898_a(Blocks.field_150325_L), 1, 6), new EntityVillager.PriceInfo(1, 2)), new EntityVillager.ListItemForEmeralds(new ItemStack(Item.func_150898_a(Blocks.field_150325_L), 1, 7), new EntityVillager.PriceInfo(1, 2)), new EntityVillager.ListItemForEmeralds(new ItemStack(Item.func_150898_a(Blocks.field_150325_L), 1, 8), new EntityVillager.PriceInfo(1, 2)), new EntityVillager.ListItemForEmeralds(new ItemStack(Item.func_150898_a(Blocks.field_150325_L), 1, 9), new EntityVillager.PriceInfo(1, 2)), new EntityVillager.ListItemForEmeralds(new ItemStack(Item.func_150898_a(Blocks.field_150325_L), 1, 10), new EntityVillager.PriceInfo(1, 2)), new EntityVillager.ListItemForEmeralds(new ItemStack(Item.func_150898_a(Blocks.field_150325_L), 1, 11), new EntityVillager.PriceInfo(1, 2)), new EntityVillager.ListItemForEmeralds(new ItemStack(Item.func_150898_a(Blocks.field_150325_L), 1, 12), new EntityVillager.PriceInfo(1, 2)), new EntityVillager.ListItemForEmeralds(new ItemStack(Item.func_150898_a(Blocks.field_150325_L), 1, 13), new EntityVillager.PriceInfo(1, 2)), new EntityVillager.ListItemForEmeralds(new ItemStack(Item.func_150898_a(Blocks.field_150325_L), 1, 14), new EntityVillager.PriceInfo(1, 2)), new EntityVillager.ListItemForEmeralds(new ItemStack(Item.func_150898_a(Blocks.field_150325_L), 1, 15), new EntityVillager.PriceInfo(1, 2))}}, {{new EntityVillager.EmeraldForItems(Items.field_151007_F, new EntityVillager.PriceInfo(15, 20)), new EntityVillager.ListItemForEmeralds(Items.field_151032_g, new EntityVillager.PriceInfo(-12, -8))}, {new EntityVillager.ListItemForEmeralds(Items.field_151031_f, new EntityVillager.PriceInfo(2, 3)), new EntityVillager.ItemAndEmeraldToItem(Item.func_150898_a(Blocks.field_150351_n), new EntityVillager.PriceInfo(10, 10), Items.field_151145_ak, new EntityVillager.PriceInfo(6, 10))}}}, {{{new EntityVillager.EmeraldForItems(Items.field_151121_aF, new EntityVillager.PriceInfo(24, 36)), new EntityVillager.ListEnchantedBookForEmeralds()}, {new EntityVillager.EmeraldForItems(Items.field_151122_aG, new EntityVillager.PriceInfo(8, 10)), new EntityVillager.ListItemForEmeralds(Items.field_151111_aL, new EntityVillager.PriceInfo(10, 12)), new EntityVillager.ListItemForEmeralds(Item.func_150898_a(Blocks.field_150342_
Line truncated
|
||||
private static final String __OBFID = "CL_00001707";
|
||||
|
||||
@@ -540,6 +541,7 @@
|
||||
|
||||
private void func_175554_cu()
|
||||
{
|
||||
+ //TODO: Hook into VillagerRegistry
|
||||
EntityVillager.ITradeList[][][] aitradelist = field_175561_bA[this.func_70946_n()];
|
||||
|
||||
if (this.field_175563_bv != 0 && this.field_175562_bw != 0)
|
||||
@@ -648,6 +650,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
+ //TODO: Hook into VillagerRegistry to get name
|
||||
if (s1 != null)
|
||||
{
|
||||
ChatComponentTranslation chatcomponenttranslation = new ChatComponentTranslation("entity.Villager." + s1, new Object[0]);
|
||||
@@ -710,7 +713,7 @@
|
||||
public IEntityLivingData func_180482_a(DifficultyInstance p_180482_1_, IEntityLivingData p_180482_2_)
|
||||
{
|
||||
p_180482_2_ = super.func_180482_a(p_180482_1_, p_180482_2_);
|
||||
- this.func_70938_b(this.field_70170_p.field_73012_v.nextInt(5));
|
||||
+ net.minecraftforge.fml.common.registry.VillagerRegistry.setRandomProfession(this, this.field_70170_p.field_73012_v);
|
||||
this.func_175552_ct();
|
||||
return p_180482_2_;
|
||||
}
|
||||
@@ -1,41 +0,0 @@
|
||||
--- ../src-base/minecraft/net/minecraft/entity/player/EntityPlayer.java
|
||||
+++ ../src-work/minecraft/net/minecraft/entity/player/EntityPlayer.java
|
||||
@@ -200,6 +200,7 @@
|
||||
|
||||
public void func_70071_h_()
|
||||
{
|
||||
+ net.minecraftforge.fml.common.FMLCommonHandler.instance().onPlayerPreTick(this);
|
||||
this.field_70145_X = this.func_175149_v();
|
||||
|
||||
if (this.func_175149_v())
|
||||
@@ -344,6 +345,7 @@
|
||||
{
|
||||
this.func_70107_b(d3, this.field_70163_u, d4);
|
||||
}
|
||||
+ net.minecraftforge.fml.common.FMLCommonHandler.instance().onPlayerPostTick(this);
|
||||
}
|
||||
|
||||
public int func_82145_z()
|
||||
@@ -2139,6 +2141,22 @@
|
||||
this.field_175153_bG = p_175150_1_;
|
||||
}
|
||||
|
||||
+ /**
|
||||
+ * Opens a GUI with this player, uses FML's IGuiHandler system.
|
||||
+ * Allows for extension by modders.
|
||||
+ *
|
||||
+ * @param mod The mod trying to open a GUI
|
||||
+ * @param modGuiId GUI ID
|
||||
+ * @param world Current World
|
||||
+ * @param x Passed directly to IGuiHandler, data meaningless Typically world X position
|
||||
+ * @param y Passed directly to IGuiHandler, data meaningless Typically world Y position
|
||||
+ * @param z Passed directly to IGuiHandler, data meaningless Typically world Z position
|
||||
+ */
|
||||
+ public void openGui(Object mod, int modGuiId, World world, int x, int y, int z)
|
||||
+ {
|
||||
+ net.minecraftforge.fml.common.network.internal.FMLNetworkHandler.openGui(this, mod, modGuiId, world, x, y, z);
|
||||
+ }
|
||||
+
|
||||
public static enum EnumChatVisibility
|
||||
{
|
||||
FULL(0, "options.chat.visibility.full"),
|
||||
@@ -1,10 +0,0 @@
|
||||
--- ../src-base/minecraft/net/minecraft/inventory/SlotCrafting.java
|
||||
+++ ../src-work/minecraft/net/minecraft/inventory/SlotCrafting.java
|
||||
@@ -113,6 +113,7 @@
|
||||
|
||||
public void func_82870_a(EntityPlayer p_82870_1_, ItemStack p_82870_2_)
|
||||
{
|
||||
+ net.minecraftforge.fml.common.FMLCommonHandler.instance().firePlayerCraftingEvent(p_82870_1_, p_82870_2_, field_75239_a);
|
||||
this.func_75208_c(p_82870_2_);
|
||||
ItemStack[] aitemstack = CraftingManager.func_77594_a().func_180303_b(this.field_75239_a, p_82870_1_.field_70170_p);
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
--- ../src-base/minecraft/net/minecraft/item/Item.java
|
||||
+++ ../src-work/minecraft/net/minecraft/item/Item.java
|
||||
@@ -47,8 +47,8 @@
|
||||
|
||||
public class Item
|
||||
{
|
||||
- public static final RegistryNamespaced field_150901_e = new RegistryNamespaced();
|
||||
- private static final Map field_179220_a = Maps.newHashMap();
|
||||
+ public static final RegistryNamespaced field_150901_e = net.minecraftforge.fml.common.registry.GameData.getItemRegistry();
|
||||
+ private static final Map field_179220_a = net.minecraftforge.fml.common.registry.GameData.getBlockItemMap();
|
||||
protected static final UUID field_111210_e = UUID.fromString("CB3F55D3-645C-4F38-A497-9C13A33DB5CF");
|
||||
private CreativeTabs field_77701_a;
|
||||
protected static Random field_77697_d = new Random();
|
||||
@@ -61,6 +61,9 @@
|
||||
private String field_77774_bZ;
|
||||
private static final String __OBFID = "CL_00000041";
|
||||
|
||||
+ public final net.minecraftforge.fml.common.registry.RegistryDelegate<Item> delegate =
|
||||
+ ((net.minecraftforge.fml.common.registry.FMLControlledNamespacedRegistry)field_150901_e).getDelegate(this, Item.class);
|
||||
+
|
||||
public static int func_150891_b(Item p_150891_0_)
|
||||
{
|
||||
return p_150891_0_ == null ? 0 : field_150901_e.func_148757_b(p_150891_0_);
|
||||
@@ -1,50 +0,0 @@
|
||||
--- ../src-base/minecraft/net/minecraft/item/ItemStack.java
|
||||
+++ ../src-work/minecraft/net/minecraft/item/ItemStack.java
|
||||
@@ -52,6 +52,7 @@
|
||||
private boolean field_179551_k;
|
||||
private static final String __OBFID = "CL_00000043";
|
||||
|
||||
+ private net.minecraftforge.fml.common.registry.RegistryDelegate<Item> delegate;
|
||||
public ItemStack(Block p_i1876_1_)
|
||||
{
|
||||
this(p_i1876_1_, 1);
|
||||
@@ -83,7 +84,7 @@
|
||||
this.field_179553_i = false;
|
||||
this.field_179550_j = null;
|
||||
this.field_179551_k = false;
|
||||
- this.field_151002_e = p_i1881_1_;
|
||||
+ this.func_150996_a(p_i1881_1_);
|
||||
this.field_77994_a = p_i1881_2_;
|
||||
this.field_77991_e = p_i1881_3_;
|
||||
|
||||
@@ -123,7 +124,7 @@
|
||||
|
||||
public Item func_77973_b()
|
||||
{
|
||||
- return this.field_151002_e;
|
||||
+ return this.delegate != null ? this.delegate.get() : null;
|
||||
}
|
||||
|
||||
public boolean func_179546_a(EntityPlayer p_179546_1_, World p_179546_2_, BlockPos p_179546_3_, EnumFacing p_179546_4_, float p_179546_5_, float p_179546_6_, float p_179546_7_)
|
||||
@@ -172,11 +173,11 @@
|
||||
{
|
||||
if (p_77963_1_.func_150297_b("id", 8))
|
||||
{
|
||||
- this.field_151002_e = Item.func_111206_d(p_77963_1_.func_74779_i("id"));
|
||||
+ this.func_150996_a(Item.func_111206_d(p_77963_1_.func_74779_i("id")));
|
||||
}
|
||||
else
|
||||
{
|
||||
- this.field_151002_e = Item.func_150899_d(p_77963_1_.func_74765_d("id"));
|
||||
+ this.func_150996_a(Item.func_150899_d(p_77963_1_.func_74765_d("id")));
|
||||
}
|
||||
|
||||
this.field_77994_a = p_77963_1_.func_74771_c("Count");
|
||||
@@ -870,6 +871,7 @@
|
||||
|
||||
public void func_150996_a(Item p_150996_1_)
|
||||
{
|
||||
+ this.delegate = p_150996_1_ != null ? p_150996_1_.delegate : null;
|
||||
this.field_151002_e = p_150996_1_;
|
||||
}
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
--- ../src-base/minecraft/net/minecraft/network/NetworkSystem.java
|
||||
+++ ../src-work/minecraft/net/minecraft/network/NetworkSystem.java
|
||||
@@ -110,7 +110,7 @@
|
||||
;
|
||||
}
|
||||
|
||||
- p_initChannel_1_.pipeline().addLast("timeout", new ReadTimeoutHandler(30)).addLast("legacy_query", new PingResponseHandler(NetworkSystem.this)).addLast("splitter", new MessageDeserializer2()).addLast("decoder", new MessageDeserializer(EnumPacketDirection.SERVERBOUND)).addLast("prepender", new MessageSerializer2()).addLast("encoder", new MessageSerializer(EnumPacketDirection.CLIENTBOUND));
|
||||
+ p_initChannel_1_.pipeline().addLast("timeout", new ReadTimeoutHandler(net.minecraftforge.fml.common.network.internal.FMLNetworkHandler.READ_TIMEOUT)).addLast("legacy_query", new PingResponseHandler(NetworkSystem.this)).addLast("splitter", new MessageDeserializer2()).addLast("decoder", new MessageDeserializer(EnumPacketDirection.SERVERBOUND)).addLast("prepender", new MessageSerializer2()).addLast("encoder", new MessageSerializer(EnumPacketDirection.CLIENTBOUND));
|
||||
NetworkManager networkmanager = new NetworkManager(EnumPacketDirection.SERVERBOUND);
|
||||
NetworkSystem.this.field_151272_f.add(networkmanager);
|
||||
p_initChannel_1_.pipeline().addLast("packet_handler", networkmanager);
|
||||
@@ -1,18 +0,0 @@
|
||||
--- ../src-base/minecraft/net/minecraft/network/ServerStatusResponse.java
|
||||
+++ ../src-work/minecraft/net/minecraft/network/ServerStatusResponse.java
|
||||
@@ -233,6 +233,7 @@
|
||||
serverstatusresponse.func_151320_a(JsonUtils.func_151200_h(jsonobject, "favicon"));
|
||||
}
|
||||
|
||||
+ net.minecraftforge.fml.client.FMLClientHandler.instance().captureAdditionalData(serverstatusresponse, jsonobject);
|
||||
return serverstatusresponse;
|
||||
}
|
||||
|
||||
@@ -260,6 +261,7 @@
|
||||
jsonobject.addProperty("favicon", p_serialize_1_.func_151316_d());
|
||||
}
|
||||
|
||||
+ net.minecraftforge.fml.common.network.internal.FMLNetworkHandler.enhanceStatusQuery(jsonobject);
|
||||
return jsonobject;
|
||||
}
|
||||
|
||||
@@ -1,115 +0,0 @@
|
||||
--- ../src-base/minecraft/net/minecraft/server/MinecraftServer.java
|
||||
+++ ../src-work/minecraft/net/minecraft/server/MinecraftServer.java
|
||||
@@ -399,7 +399,7 @@
|
||||
|
||||
public void func_71260_j()
|
||||
{
|
||||
- if (!this.field_71290_O)
|
||||
+ if (!this.field_71290_O && net.minecraftforge.fml.common.Loader.instance().hasReachedState(net.minecraftforge.fml.common.LoaderState.SERVER_STARTED) && !field_71316_v) // make sure the save is valid and we don't save twice
|
||||
{
|
||||
field_147145_h.info("Stopping server");
|
||||
|
||||
@@ -456,6 +456,7 @@
|
||||
{
|
||||
if (this.func_71197_b())
|
||||
{
|
||||
+ net.minecraftforge.fml.common.FMLCommonHandler.instance().handleServerStarted();
|
||||
this.field_175591_ab = func_130071_aq();
|
||||
long i = 0L;
|
||||
this.field_147147_p.func_151315_a(new ChatComponentText(this.field_71286_C));
|
||||
@@ -500,12 +501,20 @@
|
||||
Thread.sleep(Math.max(1L, 50L - i));
|
||||
this.field_71296_Q = true;
|
||||
}
|
||||
+ net.minecraftforge.fml.common.FMLCommonHandler.instance().handleServerStopping();
|
||||
+ net.minecraftforge.fml.common.FMLCommonHandler.instance().expectServerStopped(); // has to come before finalTick to avoid race conditions
|
||||
}
|
||||
else
|
||||
{
|
||||
+ net.minecraftforge.fml.common.FMLCommonHandler.instance().expectServerStopped(); // has to come before finalTick to avoid race conditions
|
||||
this.func_71228_a((CrashReport)null);
|
||||
}
|
||||
}
|
||||
+ catch (net.minecraftforge.fml.common.StartupQuery.AbortedException e)
|
||||
+ {
|
||||
+ // ignore silently
|
||||
+ net.minecraftforge.fml.common.FMLCommonHandler.instance().expectServerStopped(); // has to come before finalTick to avoid race conditions
|
||||
+ }
|
||||
catch (Throwable throwable1)
|
||||
{
|
||||
field_147145_h.error("Encountered an unexpected exception", throwable1);
|
||||
@@ -531,6 +540,7 @@
|
||||
field_147145_h.error("We were unable to save this crash report to disk.");
|
||||
}
|
||||
|
||||
+ net.minecraftforge.fml.common.FMLCommonHandler.instance().expectServerStopped(); // has to come before finalTick to avoid race conditions
|
||||
this.func_71228_a(crashreport);
|
||||
}
|
||||
finally
|
||||
@@ -546,6 +556,8 @@
|
||||
}
|
||||
finally
|
||||
{
|
||||
+ net.minecraftforge.fml.common.FMLCommonHandler.instance().handleServerStopped();
|
||||
+ this.field_71316_v = true;
|
||||
this.func_71240_o();
|
||||
}
|
||||
}
|
||||
@@ -591,6 +603,7 @@
|
||||
public void func_71217_p()
|
||||
{
|
||||
long i = System.nanoTime();
|
||||
+ net.minecraftforge.fml.common.FMLCommonHandler.instance().onPreServerTick();
|
||||
++this.field_71315_w;
|
||||
|
||||
if (this.field_71295_T)
|
||||
@@ -644,6 +657,7 @@
|
||||
|
||||
this.field_71304_b.func_76319_b();
|
||||
this.field_71304_b.func_76319_b();
|
||||
+ net.minecraftforge.fml.common.FMLCommonHandler.instance().onPostServerTick();
|
||||
}
|
||||
|
||||
public void func_71190_q()
|
||||
@@ -657,7 +671,7 @@
|
||||
{
|
||||
try
|
||||
{
|
||||
- ((FutureTask)this.field_175589_i.poll()).run();
|
||||
+ net.minecraftforge.fml.common.FMLCommonHandler.callFuture(((FutureTask)this.field_175589_i.poll()));
|
||||
}
|
||||
catch (Throwable throwable2)
|
||||
{
|
||||
@@ -686,6 +700,7 @@
|
||||
}
|
||||
|
||||
this.field_71304_b.func_76320_a("tick");
|
||||
+ net.minecraftforge.fml.common.FMLCommonHandler.instance().onPreWorldTick(worldserver);
|
||||
CrashReport crashreport;
|
||||
|
||||
try
|
||||
@@ -710,6 +725,7 @@
|
||||
throw new ReportedException(crashreport);
|
||||
}
|
||||
|
||||
+ net.minecraftforge.fml.common.FMLCommonHandler.instance().onPostWorldTick(worldserver);
|
||||
this.field_71304_b.func_76319_b();
|
||||
this.field_71304_b.func_76320_a("tracker");
|
||||
worldserver.func_73039_n().func_72788_a();
|
||||
@@ -741,6 +757,7 @@
|
||||
|
||||
public void func_71256_s()
|
||||
{
|
||||
+ net.minecraftforge.fml.common.StartupQuery.reset();
|
||||
this.field_175590_aa = new Thread(this, "Server thread");
|
||||
this.field_175590_aa.start();
|
||||
}
|
||||
@@ -787,7 +804,7 @@
|
||||
|
||||
public String getServerModName()
|
||||
{
|
||||
- return "vanilla";
|
||||
+ return net.minecraftforge.fml.common.FMLCommonHandler.instance().getModName();
|
||||
}
|
||||
|
||||
public CrashReport func_71230_b(CrashReport p_71230_1_)
|
||||
@@ -1,23 +0,0 @@
|
||||
--- ../src-base/minecraft/net/minecraft/server/integrated/IntegratedServer.java
|
||||
+++ ../src-work/minecraft/net/minecraft/server/integrated/IntegratedServer.java
|
||||
@@ -144,9 +144,10 @@
|
||||
this.func_71245_h(true);
|
||||
field_147148_h.info("Generating keypair");
|
||||
this.func_71253_a(CryptManager.func_75891_b());
|
||||
+ if (!net.minecraftforge.fml.common.FMLCommonHandler.instance().handleServerAboutToStart(this)) return false;
|
||||
this.func_71247_a(this.func_71270_I(), this.func_71221_J(), this.field_71350_m.func_77160_d(), this.field_71350_m.func_77165_h(), this.field_71350_m.func_82749_j());
|
||||
this.func_71205_p(this.func_71214_G() + " - " + this.field_71305_c[0].func_72912_H().func_76065_j());
|
||||
- return true;
|
||||
+ return net.minecraftforge.fml.common.FMLCommonHandler.instance().handleServerStarting(this);
|
||||
}
|
||||
|
||||
public void func_71217_p()
|
||||
@@ -171,7 +172,7 @@
|
||||
{
|
||||
try
|
||||
{
|
||||
- ((FutureTask)this.field_175589_i.poll()).run();
|
||||
+ net.minecraftforge.fml.common.FMLCommonHandler.callFuture(((FutureTask)this.field_175589_i.poll()));
|
||||
}
|
||||
catch (Throwable throwable)
|
||||
{
|
||||
@@ -1,50 +0,0 @@
|
||||
--- ../src-base/minecraft/net/minecraft/server/management/PlayerProfileCache.java
|
||||
+++ ../src-work/minecraft/net/minecraft/server/management/PlayerProfileCache.java
|
||||
@@ -204,26 +204,12 @@
|
||||
{
|
||||
List list = null;
|
||||
BufferedReader bufferedreader = null;
|
||||
- label64:
|
||||
{
|
||||
try
|
||||
{
|
||||
bufferedreader = Files.newReader(this.field_152665_g, Charsets.UTF_8);
|
||||
list = (List)this.field_152660_b.fromJson(bufferedreader, field_152666_h);
|
||||
- break label64;
|
||||
- }
|
||||
- catch (FileNotFoundException filenotfoundexception)
|
||||
- {
|
||||
- ;
|
||||
- }
|
||||
- finally
|
||||
- {
|
||||
- IOUtils.closeQuietly(bufferedreader);
|
||||
- }
|
||||
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
if (list != null)
|
||||
{
|
||||
this.field_152661_c.clear();
|
||||
@@ -242,6 +228,20 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
+ }
|
||||
+ catch (FileNotFoundException filenotfoundexception)
|
||||
+ {
|
||||
+ ;
|
||||
+ }
|
||||
+ catch (com.google.gson.JsonParseException parsefail)
|
||||
+ {
|
||||
+ // No op - the cache can quietly rebuild if it's junk
|
||||
+ }
|
||||
+ finally
|
||||
+ {
|
||||
+ IOUtils.closeQuietly(bufferedreader);
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
|
||||
public void func_152658_c()
|
||||
-76
@@ -1,76 +0,0 @@
|
||||
--- ../src-base/minecraft/net/minecraft/server/management/ServerConfigurationManager.java
|
||||
+++ ../src-work/minecraft/net/minecraft/server/management/ServerConfigurationManager.java
|
||||
@@ -103,7 +103,7 @@
|
||||
this.field_72405_c = 8;
|
||||
}
|
||||
|
||||
- public void func_72355_a(NetworkManager p_72355_1_, EntityPlayerMP p_72355_2_)
|
||||
+ public void func_72355_a(NetworkManager p_72355_1_, EntityPlayerMP p_72355_2_, NetHandlerPlayServer nethandlerplayserver)
|
||||
{
|
||||
GameProfile gameprofile = p_72355_2_.func_146103_bH();
|
||||
PlayerProfileCache playerprofilecache = this.field_72400_f.func_152358_ax();
|
||||
@@ -125,7 +125,7 @@
|
||||
WorldInfo worldinfo = worldserver.func_72912_H();
|
||||
BlockPos blockpos = worldserver.func_175694_M();
|
||||
this.func_72381_a(p_72355_2_, (EntityPlayerMP)null, worldserver);
|
||||
- NetHandlerPlayServer nethandlerplayserver = new NetHandlerPlayServer(this.field_72400_f, p_72355_1_, p_72355_2_);
|
||||
+ p_72355_2_.field_71135_a = nethandlerplayserver;
|
||||
nethandlerplayserver.func_147359_a(new S01PacketJoinGame(p_72355_2_.func_145782_y(), p_72355_2_.field_71134_c.func_73081_b(), worldinfo.func_76093_s(), worldserver.field_73011_w.func_177502_q(), worldserver.func_175659_aa(), this.func_72352_l(), worldinfo.func_76067_t(), worldserver.func_82736_K().func_82766_b("reducedDebugInfo")));
|
||||
nethandlerplayserver.func_147359_a(new S3FPacketCustomPayload("MC|Brand", (new PacketBuffer(Unpooled.buffer())).func_180714_a(this.func_72365_p().getServerModName())));
|
||||
nethandlerplayserver.func_147359_a(new S41PacketServerDifficulty(worldinfo.func_176130_y(), worldinfo.func_176123_z()));
|
||||
@@ -168,6 +168,7 @@
|
||||
|
||||
p_72355_2_.func_71116_b();
|
||||
|
||||
+ net.minecraftforge.fml.common.FMLCommonHandler.instance().firePlayerLoggedIn(p_72355_2_);
|
||||
if (nbttagcompound != null && nbttagcompound.func_150297_b("Riding", 10))
|
||||
{
|
||||
Entity entity = EntityList.func_75615_a(nbttagcompound.func_74775_l("Riding"), worldserver);
|
||||
@@ -281,8 +282,23 @@
|
||||
return nbttagcompound1;
|
||||
}
|
||||
|
||||
+ public NBTTagCompound getPlayerNBT(EntityPlayerMP player)
|
||||
+ {
|
||||
+ // Hacky method to allow loading the NBT for a player prior to login
|
||||
+ NBTTagCompound nbttagcompound = this.field_72400_f.field_71305_c[0].func_72912_H().func_76072_h();
|
||||
+ if (player.func_70005_c_().equals(this.field_72400_f.func_71214_G()) && nbttagcompound != null)
|
||||
+ {
|
||||
+ return nbttagcompound;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ return ((net.minecraft.world.storage.SaveHandler)this.field_72412_k).getPlayerNBT(player);
|
||||
+ }
|
||||
+ }
|
||||
protected void func_72391_b(EntityPlayerMP p_72391_1_)
|
||||
{
|
||||
+ if (p_72391_1_.field_71135_a == null) return;
|
||||
+
|
||||
this.field_72412_k.func_75753_a(p_72391_1_);
|
||||
StatisticsFile statisticsfile = (StatisticsFile)this.field_148547_k.get(p_72391_1_.func_110124_au());
|
||||
|
||||
@@ -315,6 +331,7 @@
|
||||
|
||||
public void func_72367_e(EntityPlayerMP p_72367_1_)
|
||||
{
|
||||
+ net.minecraftforge.fml.common.FMLCommonHandler.instance().firePlayerLoggedOut(p_72367_1_);
|
||||
p_72367_1_.func_71029_a(StatList.field_75947_j);
|
||||
this.func_72391_b(p_72367_1_);
|
||||
WorldServer worldserver = p_72367_1_.func_71121_q();
|
||||
@@ -473,6 +490,7 @@
|
||||
this.field_177454_f.put(entityplayermp1.func_110124_au(), entityplayermp1);
|
||||
entityplayermp1.func_71116_b();
|
||||
entityplayermp1.func_70606_j(entityplayermp1.func_110143_aJ());
|
||||
+ net.minecraftforge.fml.common.FMLCommonHandler.instance().firePlayerRespawnEvent(entityplayermp1);
|
||||
return entityplayermp1;
|
||||
}
|
||||
|
||||
@@ -498,6 +516,7 @@
|
||||
PotionEffect potioneffect = (PotionEffect)iterator.next();
|
||||
p_72356_1_.field_71135_a.func_147359_a(new S1DPacketEntityEffect(p_72356_1_.func_145782_y(), potioneffect));
|
||||
}
|
||||
+ net.minecraftforge.fml.common.FMLCommonHandler.instance().firePlayerChangedDimensionEvent(p_72356_1_, j, p_72356_2_);
|
||||
}
|
||||
|
||||
public void func_82448_a(Entity p_82448_1_, int p_82448_2_, WorldServer p_82448_3_, WorldServer p_82448_4_)
|
||||
@@ -1,20 +0,0 @@
|
||||
--- ../src-base/minecraft/net/minecraft/server/network/NetHandlerLoginServer.java
|
||||
+++ ../src-work/minecraft/net/minecraft/server/network/NetHandlerLoginServer.java
|
||||
@@ -62,7 +62,7 @@
|
||||
this.func_147326_c();
|
||||
}
|
||||
|
||||
- if (this.field_147336_h++ == 600)
|
||||
+ if (this.field_147336_h++ == net.minecraftforge.fml.common.network.internal.FMLNetworkHandler.LOGIN_TIMEOUT)
|
||||
{
|
||||
this.func_147322_a("Took too long to log in");
|
||||
}
|
||||
@@ -113,7 +113,7 @@
|
||||
}
|
||||
|
||||
this.field_147333_a.func_179290_a(new S02PacketLoginSuccess(this.field_147337_i));
|
||||
- this.field_147327_f.func_71203_ab().func_72355_a(this.field_147333_a, this.field_147327_f.func_71203_ab().func_148545_a(this.field_147337_i));
|
||||
+ net.minecraftforge.fml.common.network.internal.FMLNetworkHandler.fmlServerHandshake(this.field_147327_f.func_71203_ab(), this.field_147333_a, this.field_147327_f.func_71203_ab().func_148545_a(this.field_147337_i));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,40 +0,0 @@
|
||||
--- ../src-base/minecraft/net/minecraft/tileentity/TileEntity.java
|
||||
+++ ../src-work/minecraft/net/minecraft/tileentity/TileEntity.java
|
||||
@@ -89,9 +89,10 @@
|
||||
{
|
||||
TileEntity tileentity = null;
|
||||
|
||||
+ Class oclass = null;
|
||||
try
|
||||
{
|
||||
- Class oclass = (Class)field_145855_i.get(p_145827_0_.func_74779_i("id"));
|
||||
+ oclass = (Class)field_145855_i.get(p_145827_0_.func_74779_i("id"));
|
||||
|
||||
if (oclass != null)
|
||||
{
|
||||
@@ -109,7 +110,17 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
+ try
|
||||
+ {
|
||||
field_145852_a.warn("Skipping BlockEntity with id " + p_145827_0_.func_74779_i("id"));
|
||||
+ }
|
||||
+ catch (Exception ex)
|
||||
+ {
|
||||
+ net.minecraftforge.fml.common.FMLLog.log(org.apache.logging.log4j.Level.ERROR, ex,
|
||||
+ "A TileEntity %s(%s) has thrown an exception during loading, its state cannot be restored. Report this to the mod author",
|
||||
+ p_145827_0_.func_74779_i("id"), oclass.getName());
|
||||
+ tileentity = null;
|
||||
+ }
|
||||
}
|
||||
|
||||
return tileentity;
|
||||
@@ -141,7 +152,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
- @SideOnly(Side.CLIENT)
|
||||
public double func_145835_a(double p_145835_1_, double p_145835_3_, double p_145835_5_)
|
||||
{
|
||||
double d3 = (double)this.field_174879_c.func_177958_n() + 0.5D - p_145835_1_;
|
||||
@@ -1,19 +0,0 @@
|
||||
--- ../src-base/minecraft/net/minecraft/tileentity/TileEntityFurnace.java
|
||||
+++ ../src-work/minecraft/net/minecraft/tileentity/TileEntityFurnace.java
|
||||
@@ -348,7 +348,15 @@
|
||||
}
|
||||
}
|
||||
|
||||
- return item instanceof ItemTool && ((ItemTool)item).func_77861_e().equals("WOOD") ? 200 : (item instanceof ItemSword && ((ItemSword)item).func_150932_j().equals("WOOD") ? 200 : (item instanceof ItemHoe && ((ItemHoe)item).func_77842_f().equals("WOOD") ? 200 : (item == Items.field_151055_y ? 100 : (item == Items.field_151044_h ? 1600 : (item == Items.field_151129_at ? 20000 : (item == Item.func_150898_a(Blocks.field_150345_g) ? 100 : (item == Items.field_151072_bj ? 2400 : 0)))))));
|
||||
+ if (item instanceof ItemTool && ((ItemTool)item).func_77861_e().equals("WOOD")) return 200;
|
||||
+ if (item instanceof ItemSword && ((ItemSword)item).func_150932_j().equals("WOOD")) return 200;
|
||||
+ if (item instanceof ItemHoe && ((ItemHoe)item).func_77842_f().equals("WOOD")) return 200;
|
||||
+ if (item == Items.field_151055_y) return 100;
|
||||
+ if (item == Items.field_151044_h) return 1600;
|
||||
+ if (item == Items.field_151129_at) return 20000;
|
||||
+ if (item == Item.func_150898_a(Blocks.field_150345_g)) return 100;
|
||||
+ if (item == Items.field_151072_bj) return 2400;
|
||||
+ return net.minecraftforge.fml.common.registry.GameRegistry.getFuelValue(p_145952_0_);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
--- ../src-base/minecraft/net/minecraft/util/MessageSerializer.java
|
||||
+++ ../src-work/minecraft/net/minecraft/util/MessageSerializer.java
|
||||
@@ -49,7 +49,7 @@
|
||||
{
|
||||
if (p_encode_2_ instanceof S0CPacketSpawnPlayer)
|
||||
{
|
||||
- p_encode_2_ = p_encode_2_;
|
||||
+ //p_encode_2_ = p_encode_2_; FML: Kill warning
|
||||
}
|
||||
|
||||
p_encode_2_.func_148840_b(packetbuffer);
|
||||
@@ -1,29 +0,0 @@
|
||||
--- ../src-base/minecraft/net/minecraft/world/World.java
|
||||
+++ ../src-work/minecraft/net/minecraft/world/World.java
|
||||
@@ -1626,8 +1626,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
- this.field_147481_N = false;
|
||||
-
|
||||
if (!this.field_147483_b.isEmpty())
|
||||
{
|
||||
this.field_175730_i.removeAll(this.field_147483_b);
|
||||
@@ -1635,6 +1633,8 @@
|
||||
this.field_147483_b.clear();
|
||||
}
|
||||
|
||||
+ this.field_147481_N = false; //FML Move below remove to prevent CMEs
|
||||
+
|
||||
this.field_72984_F.func_76318_c("pendingBlockEntities");
|
||||
|
||||
if (!this.field_147484_a.isEmpty())
|
||||
@@ -3429,7 +3429,7 @@
|
||||
@SideOnly(Side.CLIENT)
|
||||
public double func_72919_O()
|
||||
{
|
||||
- return this.field_72986_A.func_76067_t() == WorldType.field_77138_c ? 0.0D : 63.0D;
|
||||
+ return this.field_72986_A.func_76067_t().getHorizon(this);
|
||||
}
|
||||
|
||||
public void func_175715_c(int p_175715_1_, BlockPos p_175715_2_, int p_175715_3_)
|
||||
@@ -1,47 +0,0 @@
|
||||
--- ../src-base/minecraft/net/minecraft/world/WorldProvider.java
|
||||
+++ ../src-work/minecraft/net/minecraft/world/WorldProvider.java
|
||||
@@ -52,26 +52,12 @@
|
||||
|
||||
protected void func_76572_b()
|
||||
{
|
||||
- WorldType worldtype = this.field_76579_a.func_72912_H().func_76067_t();
|
||||
-
|
||||
- if (worldtype == WorldType.field_77138_c)
|
||||
- {
|
||||
- FlatGeneratorInfo flatgeneratorinfo = FlatGeneratorInfo.func_82651_a(this.field_76579_a.func_72912_H().func_82571_y());
|
||||
- this.field_76578_c = new WorldChunkManagerHell(BiomeGenBase.func_180276_a(flatgeneratorinfo.func_82648_a(), BiomeGenBase.field_180279_ad), 0.5F);
|
||||
- }
|
||||
- else if (worldtype == WorldType.field_180272_g)
|
||||
- {
|
||||
- this.field_76578_c = new WorldChunkManagerHell(BiomeGenBase.field_76772_c, 0.0F);
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- this.field_76578_c = new WorldChunkManager(this.field_76579_a);
|
||||
- }
|
||||
+ this.field_76578_c = field_76577_b.getChunkManager(field_76579_a);
|
||||
}
|
||||
|
||||
public IChunkProvider func_76555_c()
|
||||
{
|
||||
- return (IChunkProvider)(this.field_76577_b == WorldType.field_77138_c ? new ChunkProviderFlat(this.field_76579_a, this.field_76579_a.func_72905_C(), this.field_76579_a.func_72912_H().func_76089_r(), this.field_82913_c) : (this.field_76577_b == WorldType.field_180272_g ? new ChunkProviderDebug(this.field_76579_a) : (this.field_76577_b == WorldType.field_180271_f ? new ChunkProviderGenerate(this.field_76579_a, this.field_76579_a.func_72905_C(), this.field_76579_a.func_72912_H().func_76089_r(), this.field_82913_c) : new ChunkProviderGenerate(this.field_76579_a, this.field_76579_a.func_72905_C(), this.field_76579_a.func_72912_H().func_76089_r(), this.field_82913_c))));
|
||||
+ return field_76577_b.getChunkGenerator(field_76579_a, field_82913_c);
|
||||
}
|
||||
|
||||
public boolean func_76566_a(int p_76566_1_, int p_76566_2_)
|
||||
@@ -177,13 +163,13 @@
|
||||
|
||||
public int func_76557_i()
|
||||
{
|
||||
- return this.field_76577_b == WorldType.field_77138_c ? 4 : 64;
|
||||
+ return this.field_76577_b.getMinimumSpawnHeight(this.field_76579_a);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public double func_76565_k()
|
||||
{
|
||||
- return this.field_76577_b == WorldType.field_77138_c ? 1.0D : 0.03125D;
|
||||
+ return this.field_76577_b.voidFadeMagnitude();
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@@ -1,56 +0,0 @@
|
||||
--- ../src-base/minecraft/net/minecraft/world/WorldType.java
|
||||
+++ ../src-work/minecraft/net/minecraft/world/WorldType.java
|
||||
@@ -114,4 +114,53 @@
|
||||
this.field_151361_l = true;
|
||||
return this;
|
||||
}
|
||||
+
|
||||
+ public net.minecraft.world.biome.WorldChunkManager getChunkManager(World world)
|
||||
+ {
|
||||
+ if (this == field_77138_c)
|
||||
+ {
|
||||
+ net.minecraft.world.gen.FlatGeneratorInfo flatgeneratorinfo = net.minecraft.world.gen.FlatGeneratorInfo.func_82651_a(world.func_72912_H().func_82571_y());
|
||||
+ return new net.minecraft.world.biome.WorldChunkManagerHell(net.minecraft.world.biome.BiomeGenBase.func_180276_a(flatgeneratorinfo.func_82648_a(), net.minecraft.world.biome.BiomeGenBase.field_180279_ad), 0.5F);
|
||||
+ }
|
||||
+ else if (this == field_180272_g)
|
||||
+ {
|
||||
+ return new net.minecraft.world.biome.WorldChunkManagerHell(net.minecraft.world.biome.BiomeGenBase.field_76772_c, 0.0F);
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ return new net.minecraft.world.biome.WorldChunkManager(world);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ public net.minecraft.world.chunk.IChunkProvider getChunkGenerator(World world, String generatorOptions)
|
||||
+ {
|
||||
+ if (this == field_77138_c) return new net.minecraft.world.gen.ChunkProviderFlat(world, world.func_72905_C(), world.func_72912_H().func_76089_r(), generatorOptions);
|
||||
+ if (this == field_180272_g) return new net.minecraft.world.gen.ChunkProviderDebug(world);
|
||||
+ return new net.minecraft.world.gen.ChunkProviderGenerate(world, world.func_72905_C(), world.func_72912_H().func_76089_r(), generatorOptions);
|
||||
+ }
|
||||
+
|
||||
+ public int getMinimumSpawnHeight(World world)
|
||||
+ {
|
||||
+ return this == field_77138_c ? 4 : 64;
|
||||
+ }
|
||||
+
|
||||
+ public double getHorizon(World world)
|
||||
+ {
|
||||
+ return this == field_77138_c ? 0.0D : 63.0D;
|
||||
+ }
|
||||
+
|
||||
+ public double voidFadeMagnitude()
|
||||
+ {
|
||||
+ return this == field_77138_c ? 1.0D : 0.03125D;
|
||||
+ }
|
||||
+
|
||||
+ public boolean handleSlimeSpawnReduction(java.util.Random random, World world)
|
||||
+ {
|
||||
+ return this == field_77138_c ? random.nextInt(4) != 1 : false;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Called when 'Create New World' button is pressed before starting game
|
||||
+ */
|
||||
+ public void onGUICreateWorldPress() { }
|
||||
}
|
||||
@@ -1,41 +0,0 @@
|
||||
--- ../src-base/minecraft/net/minecraft/world/chunk/storage/AnvilChunkLoader.java
|
||||
+++ ../src-work/minecraft/net/minecraft/world/chunk/storage/AnvilChunkLoader.java
|
||||
@@ -287,11 +287,20 @@
|
||||
Entity entity = (Entity)iterator.next();
|
||||
nbttagcompound1 = new NBTTagCompound();
|
||||
|
||||
+ try
|
||||
+ {
|
||||
if (entity.func_70039_c(nbttagcompound1))
|
||||
{
|
||||
p_75820_1_.func_177409_g(true);
|
||||
nbttaglist1.func_74742_a(nbttagcompound1);
|
||||
}
|
||||
+ }
|
||||
+ catch (Exception e)
|
||||
+ {
|
||||
+ net.minecraftforge.fml.common.FMLLog.log(org.apache.logging.log4j.Level.ERROR, e,
|
||||
+ "An Entity type %s has thrown an exception trying to write state. It will not persist. Report this to the mod author",
|
||||
+ entity.getClass().getName());
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -303,8 +312,17 @@
|
||||
{
|
||||
TileEntity tileentity = (TileEntity)iterator.next();
|
||||
nbttagcompound1 = new NBTTagCompound();
|
||||
+ try
|
||||
+ {
|
||||
tileentity.func_145841_b(nbttagcompound1);
|
||||
nbttaglist2.func_74742_a(nbttagcompound1);
|
||||
+ }
|
||||
+ catch (Exception e)
|
||||
+ {
|
||||
+ net.minecraftforge.fml.common.FMLLog.log(org.apache.logging.log4j.Level.ERROR, e,
|
||||
+ "A TileEntity type %s has throw an exception trying to write state. It will not persist. Report this to the mod author",
|
||||
+ tileentity.getClass().getName());
|
||||
+ }
|
||||
}
|
||||
|
||||
p_75820_3_.func_74782_a("TileEntities", nbttaglist2);
|
||||
@@ -1,10 +0,0 @@
|
||||
--- ../src-base/minecraft/net/minecraft/world/gen/ChunkProviderServer.java
|
||||
+++ ../src-work/minecraft/net/minecraft/world/gen/ChunkProviderServer.java
|
||||
@@ -209,6 +209,7 @@
|
||||
if (this.field_73246_d != null)
|
||||
{
|
||||
this.field_73246_d.func_73153_a(p_73153_1_, p_73153_2_, p_73153_3_);
|
||||
+ net.minecraftforge.fml.common.registry.GameRegistry.generateWorld(p_73153_2_, p_73153_3_, field_73251_h, field_73246_d, p_73153_1_);
|
||||
chunk.func_76630_e();
|
||||
}
|
||||
}
|
||||
-22
@@ -1,22 +0,0 @@
|
||||
--- ../src-base/minecraft/net/minecraft/world/gen/structure/StructureVillagePieces.java
|
||||
+++ ../src-work/minecraft/net/minecraft/world/gen/structure/StructureVillagePieces.java
|
||||
@@ -59,6 +59,8 @@
|
||||
arraylist.add(new StructureVillagePieces.PieceWeight(StructureVillagePieces.Field2.class, 3, MathHelper.func_76136_a(p_75084_0_, 2 + p_75084_1_, 4 + p_75084_1_ * 2)));
|
||||
arraylist.add(new StructureVillagePieces.PieceWeight(StructureVillagePieces.House2.class, 15, MathHelper.func_76136_a(p_75084_0_, 0, 1 + p_75084_1_)));
|
||||
arraylist.add(new StructureVillagePieces.PieceWeight(StructureVillagePieces.House3.class, 8, MathHelper.func_76136_a(p_75084_0_, 0 + p_75084_1_, 3 + p_75084_1_ * 2)));
|
||||
+ net.minecraftforge.fml.common.registry.VillagerRegistry.addExtraVillageComponents(arraylist, p_75084_0_, p_75084_1_);
|
||||
+
|
||||
Iterator iterator = arraylist.iterator();
|
||||
|
||||
while (iterator.hasNext())
|
||||
@@ -132,6 +134,10 @@
|
||||
{
|
||||
object = StructureVillagePieces.House3.func_175849_a(p_176065_0_, p_176065_2_, p_176065_3_, p_176065_4_, p_176065_5_, p_176065_6_, p_176065_7_, p_176065_8_);
|
||||
}
|
||||
+ else
|
||||
+ {
|
||||
+ object = net.minecraftforge.fml.common.registry.VillagerRegistry.getVillageComponent(p_176065_1_, p_176065_0_ , p_176065_2_, p_176065_3_, p_176065_4_, p_176065_5_, p_176065_6_, p_176065_7_, p_176065_8_);
|
||||
+ }
|
||||
|
||||
return (StructureVillagePieces.Village)object;
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
--- ../src-base/minecraft/net/minecraft/world/storage/MapData.java
|
||||
+++ ../src-work/minecraft/net/minecraft/world/storage/MapData.java
|
||||
@@ -22,7 +22,7 @@
|
||||
{
|
||||
public int field_76201_a;
|
||||
public int field_76199_b;
|
||||
- public byte field_76200_c;
|
||||
+ public int field_76200_c; //FML byte -> int
|
||||
public byte field_76197_d;
|
||||
public byte[] field_76198_e = new byte[16384];
|
||||
public List field_76196_g = Lists.newArrayList();
|
||||
@@ -46,7 +46,17 @@
|
||||
|
||||
public void func_76184_a(NBTTagCompound p_76184_1_)
|
||||
{
|
||||
- this.field_76200_c = p_76184_1_.func_74771_c("dimension");
|
||||
+ net.minecraft.nbt.NBTBase dimension = p_76184_1_.func_74781_a("dimension");
|
||||
+
|
||||
+ if (dimension instanceof net.minecraft.nbt.NBTTagByte)
|
||||
+ {
|
||||
+ this.field_76200_c = ((net.minecraft.nbt.NBTTagByte)dimension).func_150290_f();
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ this.field_76200_c = ((net.minecraft.nbt.NBTTagInt)dimension).func_150287_d();
|
||||
+ }
|
||||
+
|
||||
this.field_76201_a = p_76184_1_.func_74762_e("xCenter");
|
||||
this.field_76199_b = p_76184_1_.func_74762_e("zCenter");
|
||||
this.field_76197_d = p_76184_1_.func_74771_c("scale");
|
||||
@@ -87,7 +97,7 @@
|
||||
|
||||
public void func_76187_b(NBTTagCompound p_76187_1_)
|
||||
{
|
||||
- p_76187_1_.func_74774_a("dimension", this.field_76200_c);
|
||||
+ p_76187_1_.func_74768_a("dimension", this.field_76200_c);
|
||||
p_76187_1_.func_74768_a("xCenter", this.field_76201_a);
|
||||
p_76187_1_.func_74768_a("zCenter", this.field_76199_b);
|
||||
p_76187_1_.func_74774_a("scale", this.field_76197_d);
|
||||
@@ -1,89 +0,0 @@
|
||||
--- ../src-base/minecraft/net/minecraft/world/storage/SaveHandler.java
|
||||
+++ ../src-work/minecraft/net/minecraft/world/storage/SaveHandler.java
|
||||
@@ -107,20 +107,29 @@
|
||||
NBTTagCompound nbttagcompound;
|
||||
NBTTagCompound nbttagcompound1;
|
||||
|
||||
+ WorldInfo worldInfo = null;
|
||||
+
|
||||
if (file1.exists())
|
||||
{
|
||||
try
|
||||
{
|
||||
nbttagcompound = CompressedStreamTools.func_74796_a(new FileInputStream(file1));
|
||||
nbttagcompound1 = nbttagcompound.func_74775_l("Data");
|
||||
- return new WorldInfo(nbttagcompound1);
|
||||
+ worldInfo = new WorldInfo(nbttagcompound1);
|
||||
+ net.minecraftforge.fml.common.FMLCommonHandler.instance().handleWorldDataLoad(this, worldInfo, nbttagcompound);
|
||||
+ return worldInfo;
|
||||
}
|
||||
+ catch (net.minecraftforge.fml.common.StartupQuery.AbortedException e)
|
||||
+ {
|
||||
+ throw e;
|
||||
+ }
|
||||
catch (Exception exception1)
|
||||
{
|
||||
exception1.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
+ net.minecraftforge.fml.common.FMLCommonHandler.instance().confirmBackupLevelDatUse(this);
|
||||
file1 = new File(this.field_75770_b, "level.dat_old");
|
||||
|
||||
if (file1.exists())
|
||||
@@ -129,7 +138,13 @@
|
||||
{
|
||||
nbttagcompound = CompressedStreamTools.func_74796_a(new FileInputStream(file1));
|
||||
nbttagcompound1 = nbttagcompound.func_74775_l("Data");
|
||||
- return new WorldInfo(nbttagcompound1);
|
||||
+ worldInfo = new WorldInfo(nbttagcompound1);
|
||||
+ net.minecraftforge.fml.common.FMLCommonHandler.instance().handleWorldDataLoad(this, worldInfo, nbttagcompound);
|
||||
+ return worldInfo;
|
||||
+ }
|
||||
+ catch (net.minecraftforge.fml.common.StartupQuery.AbortedException e)
|
||||
+ {
|
||||
+ throw e;
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
@@ -146,6 +161,8 @@
|
||||
NBTTagCompound nbttagcompound2 = new NBTTagCompound();
|
||||
nbttagcompound2.func_74782_a("Data", nbttagcompound1);
|
||||
|
||||
+ net.minecraftforge.fml.common.FMLCommonHandler.instance().handleWorldDataSave(this, p_75755_1_, nbttagcompound2);
|
||||
+
|
||||
try
|
||||
{
|
||||
File file1 = new File(this.field_75770_b, "level.dat_new");
|
||||
@@ -184,6 +201,8 @@
|
||||
NBTTagCompound nbttagcompound1 = new NBTTagCompound();
|
||||
nbttagcompound1.func_74782_a("Data", nbttagcompound);
|
||||
|
||||
+ net.minecraftforge.fml.common.FMLCommonHandler.instance().handleWorldDataSave(this, p_75761_1_, nbttagcompound1);
|
||||
+
|
||||
try
|
||||
{
|
||||
File file1 = new File(this.field_75770_b, "level.dat_new");
|
||||
@@ -301,4 +320,22 @@
|
||||
{
|
||||
return this.field_75767_f;
|
||||
}
|
||||
+
|
||||
+ public NBTTagCompound getPlayerNBT(net.minecraft.entity.player.EntityPlayerMP player)
|
||||
+ {
|
||||
+ try
|
||||
+ {
|
||||
+ File file1 = new File(this.field_75771_c, player.func_110124_au().toString() + ".dat");
|
||||
+
|
||||
+ if (file1.exists() && file1.isFile())
|
||||
+ {
|
||||
+ return CompressedStreamTools.func_74796_a(new FileInputStream(file1));
|
||||
+ }
|
||||
+ }
|
||||
+ catch (Exception exception)
|
||||
+ {
|
||||
+ field_151478_a.warn("Failed to load player data for " + player.func_70005_c_());
|
||||
+ }
|
||||
+ return null;
|
||||
+ }
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
rootProject.name = 'fml'
|
||||
@@ -1,55 +0,0 @@
|
||||
package net.minecraftforge.fml.client;
|
||||
|
||||
import net.minecraft.client.gui.FontRenderer;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
|
||||
public class GuiIngameModOptions extends GuiScreen
|
||||
{
|
||||
private final GuiScreen parentScreen;
|
||||
protected String title = "Mod Options";
|
||||
private GuiModOptionList optionList;
|
||||
|
||||
public GuiIngameModOptions(GuiScreen parentScreen)
|
||||
{
|
||||
this.parentScreen = parentScreen;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void initGui()
|
||||
{
|
||||
this.optionList=new GuiModOptionList(this);
|
||||
this.optionList.registerScrollButtons(this.buttonList, 7, 8);
|
||||
this.buttonList.add(new GuiButton(200, this.width / 2 - 100, this.height / 6 + 168, I18n.format("gui.done", new Object[0])));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void actionPerformed(GuiButton button)
|
||||
{
|
||||
if (button.enabled)
|
||||
{
|
||||
if (button.id == 200)
|
||||
{
|
||||
this.mc.gameSettings.saveOptions();
|
||||
this.mc.displayGuiScreen(this.parentScreen);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawScreen(int mouseX, int mouseY, float partialTicks)
|
||||
{
|
||||
// force a non-transparent background
|
||||
this.drawDefaultBackground();
|
||||
this.optionList.drawScreen(mouseX, mouseY, partialTicks);
|
||||
this.drawCenteredString(this.fontRendererObj, this.title, this.width / 2, 15, 0xFFFFFF);
|
||||
super.drawScreen(mouseX, mouseY, partialTicks);
|
||||
}
|
||||
|
||||
FontRenderer getFontRenderer() {
|
||||
return fontRendererObj;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
package net.minecraftforge.fml.client;
|
||||
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
|
||||
public class GuiModOptionList extends GuiScrollingList {
|
||||
|
||||
private GuiIngameModOptions parent;
|
||||
|
||||
public GuiModOptionList(GuiIngameModOptions parent)
|
||||
{
|
||||
super(parent.mc, 150, parent.height, 32, parent.height - 65 + 4, 10, 35);
|
||||
this.parent = parent;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getSize()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void elementClicked(int index, boolean doubleClick)
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean isSelected(int index)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawBackground()
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawSlot(int var1, int var2, int var3, int var4, Tessellator var5)
|
||||
{
|
||||
this.parent.getFontRenderer().drawString(this.parent.getFontRenderer().trimStringToWidth("Test 1", listWidth - 10), this.left + 3 , var3 + 2, 0xFF2222);
|
||||
this.parent.getFontRenderer().drawString(this.parent.getFontRenderer().trimStringToWidth("TEST 2", listWidth - 10), this.left + 3 , var3 + 12, 0xFF2222);
|
||||
this.parent.getFontRenderer().drawString(this.parent.getFontRenderer().trimStringToWidth("DISABLED", listWidth - 10), this.left + 3 , var3 + 22, 0xFF2222);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,458 +0,0 @@
|
||||
/*
|
||||
* Forge Mod Loader
|
||||
* Copyright (c) 2012-2013 cpw.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the GNU Lesser Public License v2.1
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
||||
*
|
||||
* Contributors:
|
||||
* cpw - implementation
|
||||
*/
|
||||
|
||||
package net.minecraftforge.fml.client;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.Gui;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.renderer.OpenGlHelper;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.WorldRenderer;
|
||||
|
||||
import org.lwjgl.input.Mouse;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
public abstract class GuiScrollingList
|
||||
{
|
||||
private final Minecraft client;
|
||||
protected final int listWidth;
|
||||
protected final int listHeight;
|
||||
protected final int top;
|
||||
protected final int bottom;
|
||||
protected final int right;
|
||||
protected final int left;
|
||||
protected final int slotHeight;
|
||||
private int scrollUpActionId;
|
||||
private int scrollDownActionId;
|
||||
protected int mouseX;
|
||||
protected int mouseY;
|
||||
private float initialMouseClickY = -2.0F;
|
||||
private float scrollFactor;
|
||||
private float scrollDistance;
|
||||
protected int selectedIndex = -1;
|
||||
private long lastClickTime = 0L;
|
||||
private boolean field_25123_p = true;
|
||||
private boolean field_27262_q;
|
||||
private int field_27261_r;
|
||||
|
||||
public GuiScrollingList(Minecraft client, int width, int height, int top, int bottom, int left, int entryHeight)
|
||||
{
|
||||
this.client = client;
|
||||
this.listWidth = width;
|
||||
this.listHeight = height;
|
||||
this.top = top;
|
||||
this.bottom = bottom;
|
||||
this.slotHeight = entryHeight;
|
||||
this.left = left;
|
||||
this.right = width + this.left;
|
||||
}
|
||||
|
||||
public void func_27258_a(boolean p_27258_1_)
|
||||
{
|
||||
this.field_25123_p = p_27258_1_;
|
||||
}
|
||||
|
||||
protected void func_27259_a(boolean p_27259_1_, int p_27259_2_)
|
||||
{
|
||||
this.field_27262_q = p_27259_1_;
|
||||
this.field_27261_r = p_27259_2_;
|
||||
|
||||
if (!p_27259_1_)
|
||||
{
|
||||
this.field_27261_r = 0;
|
||||
}
|
||||
}
|
||||
|
||||
protected abstract int getSize();
|
||||
|
||||
protected abstract void elementClicked(int index, boolean doubleClick);
|
||||
|
||||
protected abstract boolean isSelected(int index);
|
||||
|
||||
protected int getContentHeight()
|
||||
{
|
||||
return this.getSize() * this.slotHeight + this.field_27261_r;
|
||||
}
|
||||
|
||||
protected abstract void drawBackground();
|
||||
|
||||
protected abstract void drawSlot(int var1, int var2, int var3, int var4, Tessellator var5);
|
||||
|
||||
protected void func_27260_a(int p_27260_1_, int p_27260_2_, Tessellator p_27260_3_) {}
|
||||
|
||||
protected void func_27255_a(int p_27255_1_, int p_27255_2_) {}
|
||||
|
||||
protected void func_27257_b(int p_27257_1_, int p_27257_2_) {}
|
||||
|
||||
public int func_27256_c(int p_27256_1_, int p_27256_2_)
|
||||
|
||||
{
|
||||
int var3 = this.left + 1;
|
||||
int var4 = this.left + this.listWidth - 7;
|
||||
int var5 = p_27256_2_ - this.top - this.field_27261_r + (int)this.scrollDistance - 4;
|
||||
int var6 = var5 / this.slotHeight;
|
||||
return p_27256_1_ >= var3 && p_27256_1_ <= var4 && var6 >= 0 && var5 >= 0 && var6 < this.getSize() ? var6 : -1;
|
||||
}
|
||||
|
||||
public void registerScrollButtons(@SuppressWarnings("rawtypes") List p_22240_1_, int p_22240_2_, int p_22240_3_)
|
||||
{
|
||||
this.scrollUpActionId = p_22240_2_;
|
||||
this.scrollDownActionId = p_22240_3_;
|
||||
}
|
||||
|
||||
private void applyScrollLimits()
|
||||
{
|
||||
int var1 = this.getContentHeight() - (this.bottom - this.top - 4);
|
||||
|
||||
if (var1 < 0)
|
||||
{
|
||||
var1 /= 2;
|
||||
}
|
||||
|
||||
if (this.scrollDistance < 0.0F)
|
||||
{
|
||||
this.scrollDistance = 0.0F;
|
||||
}
|
||||
|
||||
if (this.scrollDistance > (float)var1)
|
||||
{
|
||||
this.scrollDistance = (float)var1;
|
||||
}
|
||||
}
|
||||
|
||||
public void actionPerformed(GuiButton button)
|
||||
{
|
||||
if (button.enabled)
|
||||
{
|
||||
if (button.id == this.scrollUpActionId)
|
||||
{
|
||||
this.scrollDistance -= (float)(this.slotHeight * 2 / 3);
|
||||
this.initialMouseClickY = -2.0F;
|
||||
this.applyScrollLimits();
|
||||
}
|
||||
else if (button.id == this.scrollDownActionId)
|
||||
{
|
||||
this.scrollDistance += (float)(this.slotHeight * 2 / 3);
|
||||
this.initialMouseClickY = -2.0F;
|
||||
this.applyScrollLimits();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void drawScreen(int mouseX, int mouseY, float p_22243_3_)
|
||||
{
|
||||
this.mouseX = mouseX;
|
||||
this.mouseY = mouseY;
|
||||
this.drawBackground();
|
||||
int listLength = this.getSize();
|
||||
int scrollBarXStart = this.left + this.listWidth - 6;
|
||||
int scrollBarXEnd = scrollBarXStart + 6;
|
||||
int boxLeft = this.left;
|
||||
int boxRight = scrollBarXStart-1;
|
||||
int var10;
|
||||
int var11;
|
||||
int var13;
|
||||
int var19;
|
||||
|
||||
if (Mouse.isButtonDown(0))
|
||||
{
|
||||
if (this.initialMouseClickY == -1.0F)
|
||||
{
|
||||
boolean var7 = true;
|
||||
|
||||
if (mouseY >= this.top && mouseY <= this.bottom)
|
||||
{
|
||||
var10 = mouseY - this.top - this.field_27261_r + (int)this.scrollDistance - 4;
|
||||
var11 = var10 / this.slotHeight;
|
||||
|
||||
if (mouseX >= boxLeft && mouseX <= boxRight && var11 >= 0 && var10 >= 0 && var11 < listLength)
|
||||
{
|
||||
boolean var12 = var11 == this.selectedIndex && System.currentTimeMillis() - this.lastClickTime < 250L;
|
||||
this.elementClicked(var11, var12);
|
||||
this.selectedIndex = var11;
|
||||
this.lastClickTime = System.currentTimeMillis();
|
||||
}
|
||||
else if (mouseX >= boxLeft && mouseX <= boxRight && var10 < 0)
|
||||
{
|
||||
this.func_27255_a(mouseX - boxLeft, mouseY - this.top + (int)this.scrollDistance - 4);
|
||||
var7 = false;
|
||||
}
|
||||
|
||||
if (mouseX >= scrollBarXStart && mouseX <= scrollBarXEnd)
|
||||
{
|
||||
this.scrollFactor = -1.0F;
|
||||
var19 = this.getContentHeight() - (this.bottom - this.top - 4);
|
||||
|
||||
if (var19 < 1)
|
||||
{
|
||||
var19 = 1;
|
||||
}
|
||||
|
||||
var13 = (int)((float)((this.bottom - this.top) * (this.bottom - this.top)) / (float)this.getContentHeight());
|
||||
|
||||
if (var13 < 32)
|
||||
{
|
||||
var13 = 32;
|
||||
}
|
||||
|
||||
if (var13 > this.bottom - this.top - 8)
|
||||
{
|
||||
var13 = this.bottom - this.top - 8;
|
||||
}
|
||||
|
||||
this.scrollFactor /= (float)(this.bottom - this.top - var13) / (float)var19;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.scrollFactor = 1.0F;
|
||||
}
|
||||
|
||||
if (var7)
|
||||
{
|
||||
this.initialMouseClickY = (float)mouseY;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.initialMouseClickY = -2.0F;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this.initialMouseClickY = -2.0F;
|
||||
}
|
||||
}
|
||||
else if (this.initialMouseClickY >= 0.0F)
|
||||
{
|
||||
this.scrollDistance -= ((float)mouseY - this.initialMouseClickY) * this.scrollFactor;
|
||||
this.initialMouseClickY = (float)mouseY;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
while (Mouse.next())
|
||||
{
|
||||
int var16 = Mouse.getEventDWheel();
|
||||
|
||||
if (var16 != 0)
|
||||
{
|
||||
if (var16 > 0)
|
||||
{
|
||||
var16 = -1;
|
||||
}
|
||||
else if (var16 < 0)
|
||||
{
|
||||
var16 = 1;
|
||||
}
|
||||
|
||||
this.scrollDistance += (float)(var16 * this.slotHeight / 2);
|
||||
}
|
||||
}
|
||||
|
||||
this.initialMouseClickY = -1.0F;
|
||||
}
|
||||
|
||||
this.applyScrollLimits();
|
||||
Tessellator tess = Tessellator.getInstance();
|
||||
WorldRenderer worldr = tess.getWorldRenderer();
|
||||
if (this.client.theWorld != null)
|
||||
{
|
||||
this.drawGradientRect(this.left, this.top, this.right, this.bottom, -1072689136, -804253680);
|
||||
}
|
||||
else
|
||||
{
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glDisable(GL11.GL_FOG);
|
||||
this.client.renderEngine.bindTexture(Gui.optionsBackground);
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
float var17 = 32.0F;
|
||||
worldr.startDrawingQuads();
|
||||
worldr.setColorOpaque_I(2105376);
|
||||
worldr.addVertexWithUV((double)this.left, (double)this.bottom, 0.0D, (double)((float)this.left / var17), (double)((float)(this.bottom + (int)this.scrollDistance) / var17));
|
||||
worldr.addVertexWithUV((double)this.right, (double)this.bottom, 0.0D, (double)((float)this.right / var17), (double)((float)(this.bottom + (int)this.scrollDistance) / var17));
|
||||
worldr.addVertexWithUV((double)this.right, (double)this.top, 0.0D, (double)((float)this.right / var17), (double)((float)(this.top + (int)this.scrollDistance) / var17));
|
||||
worldr.addVertexWithUV((double)this.left, (double)this.top, 0.0D, (double)((float)this.left / var17), (double)((float)(this.top + (int)this.scrollDistance) / var17));
|
||||
tess.draw();
|
||||
}
|
||||
// boxRight = this.listWidth / 2 - 92 - 16;
|
||||
var10 = this.top + 4 - (int)this.scrollDistance;
|
||||
|
||||
if (this.field_27262_q)
|
||||
{
|
||||
this.func_27260_a(boxRight, var10, tess);
|
||||
}
|
||||
|
||||
int var14;
|
||||
|
||||
for (var11 = 0; var11 < listLength; ++var11)
|
||||
{
|
||||
var19 = var10 + var11 * this.slotHeight + this.field_27261_r;
|
||||
var13 = this.slotHeight - 4;
|
||||
|
||||
if (var19 <= this.bottom && var19 + var13 >= this.top)
|
||||
{
|
||||
if (this.field_25123_p && this.isSelected(var11))
|
||||
{
|
||||
var14 = boxLeft;
|
||||
int var15 = boxRight;
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
GL11.glDisable(GL11.GL_TEXTURE_2D);
|
||||
worldr.startDrawingQuads();
|
||||
worldr.setColorOpaque_I(8421504);
|
||||
worldr.addVertexWithUV((double)var14, (double)(var19 + var13 + 2), 0.0D, 0.0D, 1.0D);
|
||||
worldr.addVertexWithUV((double)var15, (double)(var19 + var13 + 2), 0.0D, 1.0D, 1.0D);
|
||||
worldr.addVertexWithUV((double)var15, (double)(var19 - 2), 0.0D, 1.0D, 0.0D);
|
||||
worldr.addVertexWithUV((double)var14, (double)(var19 - 2), 0.0D, 0.0D, 0.0D);
|
||||
worldr.setColorOpaque_I(0);
|
||||
worldr.addVertexWithUV((double)(var14 + 1), (double)(var19 + var13 + 1), 0.0D, 0.0D, 1.0D);
|
||||
worldr.addVertexWithUV((double)(var15 - 1), (double)(var19 + var13 + 1), 0.0D, 1.0D, 1.0D);
|
||||
worldr.addVertexWithUV((double)(var15 - 1), (double)(var19 - 1), 0.0D, 1.0D, 0.0D);
|
||||
worldr.addVertexWithUV((double)(var14 + 1), (double)(var19 - 1), 0.0D, 0.0D, 0.0D);
|
||||
tess.draw();
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
}
|
||||
|
||||
this.drawSlot(var11, boxRight, var19, var13, tess);
|
||||
}
|
||||
}
|
||||
|
||||
GL11.glDisable(GL11.GL_DEPTH_TEST);
|
||||
byte var20 = 4;
|
||||
if (this.client.theWorld == null)
|
||||
{
|
||||
this.overlayBackground(0, this.top, 255, 255);
|
||||
this.overlayBackground(this.bottom, this.listHeight, 255, 255);
|
||||
}
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
GL11.glDisable(GL11.GL_ALPHA_TEST);
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
GL11.glDisable(GL11.GL_TEXTURE_2D);
|
||||
worldr.startDrawingQuads();
|
||||
worldr.setColorRGBA_I(0, 0);
|
||||
worldr.addVertexWithUV((double)this.left, (double)(this.top + var20), 0.0D, 0.0D, 1.0D);
|
||||
worldr.addVertexWithUV((double)this.right, (double)(this.top + var20), 0.0D, 1.0D, 1.0D);
|
||||
worldr.setColorRGBA_I(0, 255);
|
||||
worldr.addVertexWithUV((double)this.right, (double)this.top, 0.0D, 1.0D, 0.0D);
|
||||
worldr.addVertexWithUV((double)this.left, (double)this.top, 0.0D, 0.0D, 0.0D);
|
||||
tess.draw();
|
||||
worldr.startDrawingQuads();
|
||||
worldr.setColorRGBA_I(0, 255);
|
||||
worldr.addVertexWithUV((double)this.left, (double)this.bottom, 0.0D, 0.0D, 1.0D);
|
||||
worldr.addVertexWithUV((double)this.right, (double)this.bottom, 0.0D, 1.0D, 1.0D);
|
||||
worldr.setColorRGBA_I(0, 0);
|
||||
worldr.addVertexWithUV((double)this.right, (double)(this.bottom - var20), 0.0D, 1.0D, 0.0D);
|
||||
worldr.addVertexWithUV((double)this.left, (double)(this.bottom - var20), 0.0D, 0.0D, 0.0D);
|
||||
tess.draw();
|
||||
var19 = this.getContentHeight() - (this.bottom - this.top - 4);
|
||||
|
||||
if (var19 > 0)
|
||||
{
|
||||
var13 = (this.bottom - this.top) * (this.bottom - this.top) / this.getContentHeight();
|
||||
|
||||
if (var13 < 32)
|
||||
{
|
||||
var13 = 32;
|
||||
}
|
||||
|
||||
if (var13 > this.bottom - this.top - 8)
|
||||
{
|
||||
var13 = this.bottom - this.top - 8;
|
||||
}
|
||||
|
||||
var14 = (int)this.scrollDistance * (this.bottom - this.top - var13) / var19 + this.top;
|
||||
|
||||
if (var14 < this.top)
|
||||
{
|
||||
var14 = this.top;
|
||||
}
|
||||
|
||||
worldr.startDrawingQuads();
|
||||
worldr.setColorRGBA_I(0, 255);
|
||||
worldr.addVertexWithUV((double)scrollBarXStart, (double)this.bottom, 0.0D, 0.0D, 1.0D);
|
||||
worldr.addVertexWithUV((double)scrollBarXEnd, (double)this.bottom, 0.0D, 1.0D, 1.0D);
|
||||
worldr.addVertexWithUV((double)scrollBarXEnd, (double)this.top, 0.0D, 1.0D, 0.0D);
|
||||
worldr.addVertexWithUV((double)scrollBarXStart, (double)this.top, 0.0D, 0.0D, 0.0D);
|
||||
tess.draw();
|
||||
worldr.startDrawingQuads();
|
||||
worldr.setColorRGBA_I(8421504, 255);
|
||||
worldr.addVertexWithUV((double)scrollBarXStart, (double)(var14 + var13), 0.0D, 0.0D, 1.0D);
|
||||
worldr.addVertexWithUV((double)scrollBarXEnd, (double)(var14 + var13), 0.0D, 1.0D, 1.0D);
|
||||
worldr.addVertexWithUV((double)scrollBarXEnd, (double)var14, 0.0D, 1.0D, 0.0D);
|
||||
worldr.addVertexWithUV((double)scrollBarXStart, (double)var14, 0.0D, 0.0D, 0.0D);
|
||||
tess.draw();
|
||||
worldr.startDrawingQuads();
|
||||
worldr.setColorRGBA_I(12632256, 255);
|
||||
worldr.addVertexWithUV((double)scrollBarXStart, (double)(var14 + var13 - 1), 0.0D, 0.0D, 1.0D);
|
||||
worldr.addVertexWithUV((double)(scrollBarXEnd - 1), (double)(var14 + var13 - 1), 0.0D, 1.0D, 1.0D);
|
||||
worldr.addVertexWithUV((double)(scrollBarXEnd - 1), (double)var14, 0.0D, 1.0D, 0.0D);
|
||||
worldr.addVertexWithUV((double)scrollBarXStart, (double)var14, 0.0D, 0.0D, 0.0D);
|
||||
tess.draw();
|
||||
}
|
||||
|
||||
this.func_27257_b(mouseX, mouseY);
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
GL11.glEnable(GL11.GL_ALPHA_TEST);
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
}
|
||||
|
||||
private void overlayBackground(int p_22239_1_, int p_22239_2_, int p_22239_3_, int p_22239_4_)
|
||||
{
|
||||
Tessellator var5 = Tessellator.getInstance();
|
||||
WorldRenderer worldr = var5.getWorldRenderer();
|
||||
this.client.renderEngine.bindTexture(Gui.optionsBackground);
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
float var6 = 32.0F;
|
||||
worldr.startDrawingQuads();
|
||||
worldr.setColorRGBA_I(4210752, p_22239_4_);
|
||||
worldr.addVertexWithUV(0.0D, (double)p_22239_2_, 0.0D, 0.0D, (double)((float)p_22239_2_ / var6));
|
||||
worldr.addVertexWithUV((double)this.listWidth + 30, (double)p_22239_2_, 0.0D, (double)((float)(this.listWidth + 30) / var6), (double)((float)p_22239_2_ / var6));
|
||||
worldr.setColorRGBA_I(4210752, p_22239_3_);
|
||||
worldr.addVertexWithUV((double)this.listWidth + 30, (double)p_22239_1_, 0.0D, (double)((float)(this.listWidth + 30) / var6), (double)((float)p_22239_1_ / var6));
|
||||
worldr.addVertexWithUV(0.0D, (double)p_22239_1_, 0.0D, 0.0D, (double)((float)p_22239_1_ / var6));
|
||||
var5.draw();
|
||||
}
|
||||
|
||||
protected void drawGradientRect(int par1, int par2, int par3, int par4, int par5, int par6)
|
||||
{
|
||||
float f = (float)(par5 >> 24 & 255) / 255.0F;
|
||||
float f1 = (float)(par5 >> 16 & 255) / 255.0F;
|
||||
float f2 = (float)(par5 >> 8 & 255) / 255.0F;
|
||||
float f3 = (float)(par5 & 255) / 255.0F;
|
||||
float f4 = (float)(par6 >> 24 & 255) / 255.0F;
|
||||
float f5 = (float)(par6 >> 16 & 255) / 255.0F;
|
||||
float f6 = (float)(par6 >> 8 & 255) / 255.0F;
|
||||
float f7 = (float)(par6 & 255) / 255.0F;
|
||||
GL11.glDisable(GL11.GL_TEXTURE_2D);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glDisable(GL11.GL_ALPHA_TEST);
|
||||
OpenGlHelper.glBlendFunc(770, 771, 1, 0);
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
Tessellator tessellator = Tessellator.getInstance();
|
||||
WorldRenderer worldrenderer = tessellator.getWorldRenderer();
|
||||
worldrenderer.startDrawingQuads();
|
||||
worldrenderer.setColorRGBA_F(f1, f2, f3, f);
|
||||
worldrenderer.addVertex((double)par3, (double)par2, 0.0D);
|
||||
worldrenderer.addVertex((double)par1, (double)par2, 0.0D);
|
||||
worldrenderer.setColorRGBA_F(f5, f6, f7, f4);
|
||||
worldrenderer.addVertex((double)par1, (double)par4, 0.0D);
|
||||
worldrenderer.addVertex((double)par3, (double)par4, 0.0D);
|
||||
tessellator.draw();
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
GL11.glEnable(GL11.GL_ALPHA_TEST);
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
}
|
||||
}
|
||||
@@ -1,94 +0,0 @@
|
||||
/*
|
||||
* Forge Mod Loader
|
||||
* Copyright (c) 2012-2013 cpw.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the GNU Lesser Public License v2.1
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
||||
*
|
||||
* Contributors:
|
||||
* cpw - implementation
|
||||
*/
|
||||
|
||||
package net.minecraftforge.fml.client;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.util.StringUtils;
|
||||
import net.minecraftforge.fml.common.Loader;
|
||||
import net.minecraftforge.fml.common.LoaderState.ModState;
|
||||
import net.minecraftforge.fml.common.ModContainer;
|
||||
|
||||
/**
|
||||
* @author cpw
|
||||
*
|
||||
*/
|
||||
public class GuiSlotModList extends GuiScrollingList
|
||||
{
|
||||
private GuiModList parent;
|
||||
private ArrayList<ModContainer> mods;
|
||||
|
||||
public GuiSlotModList(GuiModList parent, ArrayList<ModContainer> mods, int listWidth)
|
||||
{
|
||||
super(parent.getMinecraftInstance(), listWidth, parent.height, 32, parent.height - 88 + 4, 10, 35);
|
||||
this.parent=parent;
|
||||
this.mods=mods;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getSize()
|
||||
{
|
||||
return mods.size();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void elementClicked(int var1, boolean var2)
|
||||
{
|
||||
this.parent.selectModIndex(var1);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean isSelected(int var1)
|
||||
{
|
||||
return this.parent.modIndexSelected(var1);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawBackground()
|
||||
{
|
||||
this.parent.drawDefaultBackground();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getContentHeight()
|
||||
{
|
||||
return (this.getSize()) * 35 + 1;
|
||||
}
|
||||
|
||||
ArrayList<ModContainer> getMods()
|
||||
{
|
||||
return mods;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawSlot(int listIndex, int var2, int var3, int var4, Tessellator var5)
|
||||
{
|
||||
ModContainer mc=mods.get(listIndex);
|
||||
String name = StringUtils.stripControlCodes(mc.getName());
|
||||
String version = StringUtils.stripControlCodes(mc.getDisplayVersion());
|
||||
if (Loader.instance().getModState(mc)==ModState.DISABLED)
|
||||
{
|
||||
this.parent.getFontRenderer().drawString(this.parent.getFontRenderer().trimStringToWidth(name, listWidth - 10), this.left + 3 , var3 + 2, 0xFF2222);
|
||||
this.parent.getFontRenderer().drawString(this.parent.getFontRenderer().trimStringToWidth(version, listWidth - 10), this.left + 3 , var3 + 12, 0xFF2222);
|
||||
this.parent.getFontRenderer().drawString(this.parent.getFontRenderer().trimStringToWidth("DISABLED", listWidth - 10), this.left + 3 , var3 + 22, 0xFF2222);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.parent.getFontRenderer().drawString(this.parent.getFontRenderer().trimStringToWidth(name, listWidth - 10), this.left + 3 , var3 + 2, 0xFFFFFF);
|
||||
this.parent.getFontRenderer().drawString(this.parent.getFontRenderer().trimStringToWidth(version, listWidth - 10), this.left + 3 , var3 + 12, 0xCCCCCC);
|
||||
this.parent.getFontRenderer().drawString(this.parent.getFontRenderer().trimStringToWidth(mc.getMetadata() !=null ? mc.getMetadata().getChildModCountString() : "Metadata not found", listWidth - 10), this.left + 3 , var3 + 22, 0xCCCCCC);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,41 +0,0 @@
|
||||
/*
|
||||
* Forge Mod Loader
|
||||
* Copyright (c) 2012-2013 cpw.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the GNU Lesser Public License v2.1
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
||||
*
|
||||
* Contributors:
|
||||
* cpw - implementation
|
||||
*/
|
||||
|
||||
package net.minecraftforge.fml.common;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* Declare a variable to be populated by a Bukkit Plugin proxy instance if the bukkit coremod
|
||||
* is available. It can only be applied to field typed as {@link BukkitProxy}
|
||||
* Generally it should be used in conjunction with {@link Mod#bukkitPlugin()} specifying the
|
||||
* plugin to load.
|
||||
*
|
||||
* @author cpw
|
||||
*
|
||||
*/
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target(ElementType.FIELD)
|
||||
public @interface BukkitPluginRef
|
||||
{
|
||||
/**
|
||||
* A reference (possibly version specific) to a Bukkit Plugin by name, using the name@versionbound
|
||||
* specification. If this is a bukkit enabled environment the field annotated by this
|
||||
* will be populated with a {@link BukkitProxy} instance if possible. This proxy will be gotten by
|
||||
* reflectively calling the "getModProxy" method on the bukkit plugin instance.
|
||||
* @return The name of the plugin which we will inject into this field
|
||||
*/
|
||||
String value();
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
/*
|
||||
* Forge Mod Loader
|
||||
* Copyright (c) 2012-2013 cpw.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the GNU Lesser Public License v2.1
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
||||
*
|
||||
* Contributors:
|
||||
* cpw - implementation
|
||||
*/
|
||||
|
||||
package net.minecraftforge.fml.common;
|
||||
|
||||
/**
|
||||
* A marker interface for retrieving a proxy to a bukkit plugin.
|
||||
* Fields associated with {@link BukkitPluginRef} annotations should
|
||||
* declare this type and cast down if the target is available (not null)
|
||||
* @author cpw
|
||||
*
|
||||
*/
|
||||
public interface BukkitProxy
|
||||
{
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
/*
|
||||
* Forge Mod Loader
|
||||
* Copyright (c) 2012-2013 cpw.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the GNU Lesser Public License v2.1
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
||||
*
|
||||
* Contributors:
|
||||
* cpw - implementation
|
||||
*/
|
||||
|
||||
package net.minecraftforge.fml.common;
|
||||
|
||||
import org.objectweb.asm.tree.ClassNode;
|
||||
|
||||
public interface IASMHook {
|
||||
/**
|
||||
* Inject the {@link Mod} class node into this instance. This allows retrieval from custom
|
||||
* attributes or other artifacts in your mod class
|
||||
*
|
||||
* @param modClassNode The mod class
|
||||
* @return optionally some code generated classes that will be injected into the classloader
|
||||
*/
|
||||
ClassNode[] inject(ClassNode modClassNode);
|
||||
/**
|
||||
* Allow mods to manipulate classes loaded from this {@link Mod}'s jar file. The {@link Mod}
|
||||
* class is always guaranteed to be called first.
|
||||
* The node state should be changed in place.
|
||||
*
|
||||
* @param node The class being loaded
|
||||
*/
|
||||
void modifyClass(String className, ClassNode node);
|
||||
}
|
||||
@@ -1,50 +0,0 @@
|
||||
/*
|
||||
* Forge Mod Loader
|
||||
* Copyright (c) 2012-2013 cpw.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the GNU Lesser Public License v2.1
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
||||
*
|
||||
* Contributors:
|
||||
* cpw - implementation
|
||||
*/
|
||||
|
||||
package net.minecraftforge.fml.common.event;
|
||||
|
||||
import net.minecraftforge.fml.common.Loader;
|
||||
import net.minecraftforge.fml.common.LoaderState.ModState;
|
||||
|
||||
import com.google.common.base.Throwables;
|
||||
|
||||
public class FMLPostInitializationEvent extends FMLStateEvent
|
||||
{
|
||||
public FMLPostInitializationEvent(Object... data)
|
||||
{
|
||||
super(data);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ModState getModState()
|
||||
{
|
||||
return ModState.POSTINITIALIZED;
|
||||
}
|
||||
|
||||
public Object buildSoftDependProxy(String modId, String className)
|
||||
{
|
||||
if (Loader.isModLoaded(modId))
|
||||
{
|
||||
try
|
||||
{
|
||||
Class<?> clz = Class.forName(className,true,Loader.instance().getModClassLoader());
|
||||
return clz.newInstance();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Throwables.propagateIfPossible(e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
package net.minecraftforge.fml.common.launcher;
|
||||
|
||||
import net.minecraft.launchwrapper.LaunchClassLoader;
|
||||
import net.minecraftforge.fml.relauncher.FMLLaunchHandler;
|
||||
|
||||
public class FMLServerTweaker extends FMLTweaker {
|
||||
@Override
|
||||
public String getLaunchTarget()
|
||||
{
|
||||
return "net.minecraft.server.MinecraftServer";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void injectIntoClassLoader(LaunchClassLoader classLoader)
|
||||
{
|
||||
// The log4j2 queue is excluded so it is correctly visible from the obfuscated
|
||||
// and deobfuscated parts of the code. Without, the UI won't show anything
|
||||
classLoader.addClassLoaderExclusion("com.mojang.util.QueueLogAppender");
|
||||
classLoader.addClassLoaderExclusion("org.objectweb.asm.");
|
||||
classLoader.addTransformerExclusion("net.minecraftforge.fml.repackage.");
|
||||
classLoader.addTransformerExclusion("net.minecraftforge.fml.relauncher.");
|
||||
classLoader.addTransformerExclusion("net.minecraftforge.fml.common.asm.transformers.");
|
||||
classLoader.addClassLoaderExclusion("LZMA.");
|
||||
FMLLaunchHandler.configureForServerLaunch(classLoader, this);
|
||||
FMLLaunchHandler.appendCoreMods();
|
||||
}
|
||||
}
|
||||
-557
@@ -1,557 +0,0 @@
|
||||
package net.minecraftforge.fml.common.registry;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.BitSet;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.apache.commons.lang3.Validate;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemBanner;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.util.ObjectIntIdentityMap;
|
||||
import net.minecraft.util.RegistryNamespaced;
|
||||
import net.minecraft.util.RegistryNamespacedDefaultedByKey;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.fml.common.FMLLog;
|
||||
import net.minecraftforge.fml.common.functions.GenericIterableFactory;
|
||||
|
||||
import com.google.common.collect.BiMap;
|
||||
import com.google.common.collect.HashBiMap;
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.google.common.collect.Iterators;
|
||||
|
||||
public class FMLControlledNamespacedRegistry<I> extends RegistryNamespacedDefaultedByKey {
|
||||
private final Class<I> superType;
|
||||
private Object optionalDefaultKey;
|
||||
private I optionalDefaultObject;
|
||||
private int maxId;
|
||||
private int minId;
|
||||
// aliases redirecting legacy names to the actual name, may need recursive application to find the final name.
|
||||
// these need to be registry specific, it's possible to only have a loosely linked item for a block which may get renamed by itself.
|
||||
private final Map<String, String> aliases = new HashMap<String, String>();
|
||||
private BiMap<String, I> persistentSubstitutions;
|
||||
private BiMap<String, I> activeSubstitutions = HashBiMap.create();
|
||||
|
||||
FMLControlledNamespacedRegistry(Object defaultKey, int maxIdValue, int minIdValue, Class<I> type)
|
||||
{
|
||||
super(defaultKey);
|
||||
this.superType = type;
|
||||
this.optionalDefaultKey = defaultKey;
|
||||
this.maxId = maxIdValue;
|
||||
this.minId = minIdValue;
|
||||
}
|
||||
|
||||
void validateContent(int maxId, String type, BitSet availabilityMap, Set<Integer> blockedIds, FMLControlledNamespacedRegistry<Block> iBlockRegistry)
|
||||
{
|
||||
for (I obj : typeSafeIterable())
|
||||
{
|
||||
int id = getId(obj);
|
||||
Object name = getNameForObject(obj);
|
||||
|
||||
// name lookup failed -> obj is not in the obj<->name map
|
||||
if (name == null) throw new IllegalStateException(String.format("Registry entry for %s %s, id %d, doesn't yield a name.", type, obj, id));
|
||||
|
||||
ResourceLocation loc = (name instanceof ResourceLocation) ? (ResourceLocation)name : null;
|
||||
String nameS = (name instanceof String) ? (String)name : (loc != null ? name.toString() : null);
|
||||
if (loc == null && nameS == null) throw new IllegalStateException(String.format("Registry entry for %s %s name is invalid, must be a String or ResourceLocation %s", type, obj, name));
|
||||
|
||||
// id lookup failed -> obj is not in the obj<->id map
|
||||
if (id < 0) throw new IllegalStateException(String.format("Registry entry for %s %s, name %s, doesn't yield an id.", type, obj, name));
|
||||
// id is too high
|
||||
if (id > maxId) throw new IllegalStateException(String.format("Registry entry for %s %s, name %s uses the too large id %d.", type, obj, name));
|
||||
// empty name
|
||||
if (name.toString().isEmpty()) throw new IllegalStateException(String.format("Registry entry for %s %s, id %d, yields an empty name.", type, obj, id));
|
||||
// non-prefixed name
|
||||
if (name.toString().indexOf(':') == -1) throw new IllegalStateException(String.format("Registry entry for %s %s, id %d, has the non-prefixed name %s.", type, obj, id, name));
|
||||
// id -> obj lookup is inconsistent
|
||||
if (getRaw(id) != obj) throw new IllegalStateException(String.format("Registry entry for id %d, name %s, doesn't yield the expected %s %s.", id, name, type, obj));
|
||||
// name -> obj lookup is inconsistent
|
||||
if (!(activeSubstitutions.containsKey(name) || activeSubstitutions.containsValue(name)) && getRaw(nameS) != obj ) throw new IllegalStateException(String.format("Registry entry for name %s, id %d, doesn't yield the expected %s %s.", name, id, type, obj));
|
||||
// name -> id lookup is inconsistent
|
||||
if (!(activeSubstitutions.containsKey(name) || activeSubstitutions.containsValue(name)) && getId(nameS) != id) throw new IllegalStateException(String.format("Registry entry for name %s doesn't yield the expected id %d.", name, id));
|
||||
// id isn't marked as unavailable
|
||||
if (!availabilityMap.get(id)) throw new IllegalStateException(String.format("Registry entry for %s %s, id %d, name %s, marked as empty.", type, obj, id, name));
|
||||
// entry is blocked, thus should be empty
|
||||
if (blockedIds.contains(id)) throw new IllegalStateException(String.format("Registry entry for %s %s, id %d, name %s, marked as dangling.", type, obj, id, name));
|
||||
|
||||
if (obj instanceof ItemBlock && !(obj instanceof ItemBanner)) //Dammet Mojang not linking Banners
|
||||
{
|
||||
Block block = ((ItemBlock) obj).block;
|
||||
|
||||
// verify matching block entry
|
||||
if (iBlockRegistry.getId(block) != id)
|
||||
{
|
||||
throw new IllegalStateException(String.format("Registry entry for ItemBlock %s, id %d, is missing or uses the non-matching id %d.", obj, id, iBlockRegistry.getId(block)));
|
||||
}
|
||||
// verify id range
|
||||
if (id > GameData.MAX_BLOCK_ID) throw new IllegalStateException(String.format("ItemBlock %s uses the id %d outside the block id range", name, id));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
void setFrom(FMLControlledNamespacedRegistry<?> registry) {
|
||||
set((FMLControlledNamespacedRegistry<I>) registry);
|
||||
}
|
||||
void set(FMLControlledNamespacedRegistry<I> registry)
|
||||
{
|
||||
if (this.superType != registry.superType) throw new IllegalArgumentException("incompatible registry");
|
||||
|
||||
this.optionalDefaultKey = registry.optionalDefaultKey;
|
||||
this.maxId = registry.maxId;
|
||||
this.minId = registry.minId;
|
||||
this.aliases.clear();
|
||||
this.aliases.putAll(registry.aliases);
|
||||
this.activeSubstitutions.clear();
|
||||
|
||||
underlyingIntegerMap = new ObjectIntIdentityMap();
|
||||
registryObjects.clear();
|
||||
|
||||
for (I thing : registry.typeSafeIterable())
|
||||
{
|
||||
addObjectRaw(registry.getId(thing), registry.getNameForObject(thing), thing);
|
||||
}
|
||||
this.activeSubstitutions.putAll(registry.activeSubstitutions);
|
||||
}
|
||||
|
||||
// public api
|
||||
|
||||
/**
|
||||
* Add an object to the registry, trying to use the specified id.
|
||||
*
|
||||
* @deprecated register through {@link GameRegistry} instead.
|
||||
*/
|
||||
@Override
|
||||
@Deprecated
|
||||
public void register(int id, Object name, Object thing)
|
||||
{
|
||||
Validate.isInstanceOf(ResourceLocation.class, name);
|
||||
GameData.getMain().register(thing, name.toString(), id);
|
||||
}
|
||||
|
||||
/**
|
||||
* DANGEROUS! EVIL! DO NOT USE!
|
||||
*
|
||||
* @deprecated register through {@link GameRegistry} instead.
|
||||
*/
|
||||
@Override
|
||||
@Deprecated
|
||||
public void putObject(Object objName, Object obj)
|
||||
{
|
||||
String name = objName.toString();
|
||||
I thing = superType.cast(obj);
|
||||
|
||||
if (name == null) throw new NullPointerException("Can't use a null-name for the registry.");
|
||||
if (name.isEmpty()) throw new IllegalArgumentException("Can't use an empty name for the registry.");
|
||||
if (thing == null) throw new NullPointerException("Can't add null-object to the registry.");
|
||||
|
||||
name = new ResourceLocation(name).toString();
|
||||
Object existingName = getNameForObject(thing);
|
||||
|
||||
if (existingName == null)
|
||||
{
|
||||
FMLLog.bigWarning("Ignoring putObject(%s, %s), not resolvable", name, thing);
|
||||
}
|
||||
else if (existingName.equals(name))
|
||||
{
|
||||
FMLLog.bigWarning("Ignoring putObject(%s, %s), already added", name, thing);
|
||||
}
|
||||
else
|
||||
{
|
||||
FMLLog.bigWarning("Ignoring putObject(%s, %s), adding alias to %s instead", name, thing, existingName);
|
||||
addAlias(name, existingName.toString());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetch the object identified by the specified name or the default object.
|
||||
*
|
||||
* For blocks the default object is the air block, for items it's null.
|
||||
*
|
||||
* @param name Unique name identifying the object.
|
||||
* @return Registered object of the default object if it wasn't found-
|
||||
*/
|
||||
@Override
|
||||
public I getObject(Object name)
|
||||
{
|
||||
I object = null;
|
||||
if (name instanceof ResourceLocation) object = getRaw((ResourceLocation)name);
|
||||
if (name instanceof String) object = getRaw((String)name);
|
||||
return object == null ? this.optionalDefaultObject : object;
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetch the object identified by the specified id or the default object.
|
||||
*
|
||||
* For blocks the default object is the air block, for items it's null.
|
||||
*
|
||||
* @param id ID identifying the object.
|
||||
* @return Registered object of the default object if it wasn't found-
|
||||
*/
|
||||
@Override
|
||||
public I getObjectById(int id)
|
||||
{
|
||||
I object = getRaw(id);
|
||||
return object == null ? this.optionalDefaultObject : object;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated use getObjectById instead
|
||||
*/
|
||||
@Deprecated
|
||||
public I get(int id)
|
||||
{
|
||||
return getObjectById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated use getObject instead
|
||||
*/
|
||||
@Deprecated
|
||||
public I get(String name)
|
||||
{
|
||||
return getObject(name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the id for the specified object.
|
||||
*
|
||||
* Don't hold onto the id across the world, it's being dynamically re-mapped as needed.
|
||||
*
|
||||
* Usually the name should be used instead of the id, if using the Block/Item object itself is
|
||||
* not suitable for the task.
|
||||
*
|
||||
* @param thing Block/Item object.
|
||||
* @return Block/Item id or -1 if it wasn't found.
|
||||
*/
|
||||
public int getId(I thing)
|
||||
{
|
||||
return getIDForObject(thing);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the object identified by the specified id.
|
||||
*
|
||||
* @param id Block/Item id.
|
||||
* @return Block/Item object or null if it wasn't found.
|
||||
*/
|
||||
public I getRaw(int id)
|
||||
{
|
||||
return cast(super.getObjectById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* superType.cast appears to be expensive. Skip it for speed?
|
||||
* @param obj
|
||||
* @return
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
private I cast(Object obj)
|
||||
{
|
||||
return (I)(obj);
|
||||
}
|
||||
/**
|
||||
* Get the object identified by the specified name.
|
||||
*
|
||||
* @param name Block/Item name.
|
||||
* @return Block/Item object or null if it wasn't found.
|
||||
*/
|
||||
public I getRaw(String name)
|
||||
{
|
||||
return getRaw(new ResourceLocation(name));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the object identified by the specified name.
|
||||
*
|
||||
* @param name Block/Item name.
|
||||
* @return Block/Item object or null if it wasn't found.
|
||||
*/
|
||||
private I getRaw(ResourceLocation loc)
|
||||
{
|
||||
I ret = superType.cast(super.getObject(loc));
|
||||
|
||||
if (ret == null) // no match, try aliases recursively
|
||||
{
|
||||
String name = aliases.get(loc.toString());
|
||||
|
||||
if (name != null) return getRaw(name);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if the registry has an entry for the specified name.
|
||||
*
|
||||
* Aliased names will be resolved as well.
|
||||
*
|
||||
* @param name Object name to check.
|
||||
* @return true if a matching entry was found.
|
||||
*/
|
||||
@Override
|
||||
public boolean containsKey(Object name)
|
||||
{
|
||||
boolean ret = super.containsKey(name);
|
||||
|
||||
if (!ret) // no match, try aliases recursively
|
||||
{
|
||||
name = aliases.get(name);
|
||||
|
||||
if (name != null) return containsKey(name);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the id for the specified object.
|
||||
*
|
||||
* Don't hold onto the id across the world, it's being dynamically re-mapped as needed.
|
||||
*
|
||||
* Usually the name should be used instead of the id, if using the Block/Item object itself is
|
||||
* not suitable for the task.
|
||||
*
|
||||
* @param itemName Block/Item registry name.
|
||||
* @return Block/Item id or -1 if it wasn't found.
|
||||
*/
|
||||
public int getId(String itemName)
|
||||
{
|
||||
I obj = getRaw(itemName);
|
||||
if (obj == null) return -1;
|
||||
|
||||
return getId(obj);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated use containsKey instead
|
||||
*/
|
||||
@Deprecated
|
||||
public boolean contains(String itemName)
|
||||
{
|
||||
return containsKey(itemName);
|
||||
}
|
||||
|
||||
/*
|
||||
* This iterator is used by FML to visit the actual block sets, it should use the super.iterator method instead
|
||||
* Compare #iterator()
|
||||
*/
|
||||
public Iterable<I> typeSafeIterable()
|
||||
{
|
||||
return GenericIterableFactory.newCastingIterable(super.iterator(), superType);
|
||||
}
|
||||
|
||||
// internal
|
||||
|
||||
public void serializeInto(Map<String, Integer> idMapping) // for saving
|
||||
{
|
||||
for (I thing : this.typeSafeIterable())
|
||||
{
|
||||
idMapping.put(getNameForObject(thing).toString(), getId(thing));
|
||||
}
|
||||
}
|
||||
public void serializeAliases(Map<String, String> map)
|
||||
{
|
||||
map.putAll(this.aliases);
|
||||
}
|
||||
public void serializeSubstitutions(Set<String> set)
|
||||
{
|
||||
set.addAll(activeSubstitutions.keySet());
|
||||
}
|
||||
|
||||
private BitSet internalAvailabilityMap = new BitSet();
|
||||
|
||||
int add(int id, String name, Object thing) {
|
||||
return add(id, name, superType.cast(thing), internalAvailabilityMap);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the specified object to the registry.
|
||||
*
|
||||
* @param id ID to use if available, auto-assigned otherwise.
|
||||
* @param name Name to use, prefixed by the mod id.
|
||||
* @param thing Object to add.
|
||||
* @param availabilityMap Map marking available IDs for auto assignment.
|
||||
* @return ID eventually allocated.
|
||||
*/
|
||||
int add(int id, String name, I thing, BitSet availabilityMap)
|
||||
{
|
||||
if (name == null) throw new NullPointerException(String.format("Can't use a null-name for the registry, object %s.", thing));
|
||||
if (name.isEmpty()) throw new IllegalArgumentException(String.format("Can't use an empty name for the registry, object %s.", thing));
|
||||
if (name.indexOf(':') == -1) throw new IllegalArgumentException(String.format("Can't add the name (%s) without a prefix, object %s", name, thing));
|
||||
if (thing == null) throw new NullPointerException(String.format("Can't add null-object to the registry, name %s.", name));
|
||||
if (optionalDefaultKey != null && optionalDefaultKey.toString().equals(name) && this.optionalDefaultObject == null)
|
||||
{
|
||||
this.optionalDefaultObject = thing;
|
||||
}
|
||||
if (getPersistentSubstitutions().containsValue(thing))
|
||||
{
|
||||
throw new IllegalArgumentException(String.format("The object %s (%s) cannot be added to the registry. It is already being used as a substitute for %s", thing.getClass(), name, getPersistentSubstitutions().inverse().get(thing)));
|
||||
}
|
||||
int idToUse = id;
|
||||
if (idToUse < 0 || availabilityMap.get(idToUse))
|
||||
{
|
||||
idToUse = availabilityMap.nextClearBit(minId);
|
||||
}
|
||||
if (idToUse > maxId)
|
||||
{
|
||||
throw new RuntimeException(String.format("Invalid id %d - maximum id range exceeded.", idToUse));
|
||||
}
|
||||
|
||||
if (getRaw(name) == thing) // already registered, return prev registration's id
|
||||
{
|
||||
FMLLog.bigWarning("The object %s has been registered twice for the same name %s.", thing, name);
|
||||
return getId(thing);
|
||||
}
|
||||
if (getRaw(name) != null) // duplicate name
|
||||
{
|
||||
throw new IllegalArgumentException(String.format("The name %s has been registered twice, for %s and %s.", name, getRaw(name), thing));
|
||||
}
|
||||
if (getId(thing) >= 0) // duplicate object - but only if it's not being substituted
|
||||
{
|
||||
int foundId = getId(thing);
|
||||
Object otherThing = getRaw(foundId);
|
||||
throw new IllegalArgumentException(String.format("The object %s{%x} has been registered twice, using the names %s and %s. (Other object at this id is %s{%x})", thing, System.identityHashCode(thing), getNameForObject(thing), name, otherThing, System.identityHashCode(otherThing)));
|
||||
}
|
||||
if (GameData.isFrozen(this))
|
||||
{
|
||||
FMLLog.bigWarning("The object %s (name %s) is being added too late.", thing, name);
|
||||
}
|
||||
|
||||
if (activeSubstitutions.containsKey(name))
|
||||
{
|
||||
thing = activeSubstitutions.get(name);
|
||||
}
|
||||
addObjectRaw(idToUse, new ResourceLocation(name), thing);
|
||||
|
||||
FMLLog.finer("Registry add: %s %d %s (req. id %d)", name, idToUse, thing, id);
|
||||
return idToUse;
|
||||
}
|
||||
|
||||
void addAlias(String from, String to)
|
||||
{
|
||||
aliases.put(from, to);
|
||||
FMLLog.finer("Registry alias: %s -> %s", from, to);
|
||||
}
|
||||
|
||||
Map<String,Integer> getEntriesNotIn(FMLControlledNamespacedRegistry<I> registry)
|
||||
{
|
||||
Map<String,Integer> ret = new HashMap<String, Integer>();
|
||||
|
||||
for (I thing : this.typeSafeIterable())
|
||||
{
|
||||
if (!registry.field_148758_b.containsKey(thing))
|
||||
{
|
||||
if (!registry.activeSubstitutions.containsKey(getNameForObject(thing).toString()))
|
||||
{
|
||||
ret.put(getNameForObject(thing).toString(), getId(thing));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
void dump()
|
||||
{
|
||||
List<Integer> ids = new ArrayList<Integer>();
|
||||
|
||||
for (I thing : this.typeSafeIterable())
|
||||
{
|
||||
ids.add(getId(thing));
|
||||
}
|
||||
|
||||
// sort by id
|
||||
Collections.sort(ids);
|
||||
|
||||
for (int id : ids)
|
||||
{
|
||||
I thing = getRaw(id);
|
||||
FMLLog.finer("Registry: %s %d %s", getNameForObject(thing), id, thing);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Version of addObject not using the API restricting overrides.
|
||||
*/
|
||||
private void addObjectRaw(int id, Object name, I thing)
|
||||
{
|
||||
if (name == null) throw new NullPointerException("The name to be added to the registry is null. This can only happen with a corrupted registry state. Reflection/ASM hackery? Registry bug?");
|
||||
if (thing == null) throw new NullPointerException("The object to be added to the registry is null. This can only happen with a corrupted registry state. Reflection/ASM hackery? Registry bug?");
|
||||
if (!superType.isInstance(thing)) throw new IllegalArgumentException("The object to be added to the registry is not of the right type. Reflection/ASM hackery? Registry bug?");
|
||||
|
||||
underlyingIntegerMap.put(thing, id); // obj <-> id
|
||||
super.putObject(name, thing); // name <-> obj
|
||||
}
|
||||
|
||||
public I getDefaultValue()
|
||||
{
|
||||
return optionalDefaultObject;
|
||||
}
|
||||
|
||||
public RegistryDelegate<I> getDelegate(I thing, Class<I> clazz) {
|
||||
return GameData.buildDelegate(thing, clazz);
|
||||
}
|
||||
|
||||
void activateSubstitution(String nameToReplace)
|
||||
{
|
||||
if (getPersistentSubstitutions().containsKey(nameToReplace))
|
||||
{
|
||||
activeSubstitutions.put(nameToReplace, getPersistentSubstitutions().get(nameToReplace));
|
||||
}
|
||||
}
|
||||
|
||||
void addSubstitutionAlias(String modId, String nameToReplace, Object toReplace) throws ExistingSubstitutionException {
|
||||
if (getPersistentSubstitutions().containsKey(nameToReplace) || getPersistentSubstitutions().containsValue(toReplace))
|
||||
{
|
||||
FMLLog.severe("The substitution of %s has already occured. You cannot duplicate substitutions", nameToReplace);
|
||||
throw new ExistingSubstitutionException(nameToReplace, toReplace);
|
||||
}
|
||||
I replacement = cast(toReplace);
|
||||
I original = getRaw(nameToReplace);
|
||||
if (original == null)
|
||||
{
|
||||
throw new NullPointerException("The replacement target is not present. This won't work");
|
||||
}
|
||||
if (!original.getClass().isAssignableFrom(replacement.getClass()))
|
||||
{
|
||||
FMLLog.severe("The substitute %s for %s (type %s) is type incompatible. This won't work", replacement.getClass().getName(), nameToReplace, original.getClass().getName());
|
||||
throw new IncompatibleSubstitutionException(nameToReplace, replacement, original);
|
||||
}
|
||||
int existingId = getId(replacement);
|
||||
if (existingId != -1)
|
||||
{
|
||||
FMLLog.severe("The substitute %s for %s is registered into the game independently. This won't work", replacement.getClass().getName(), nameToReplace);
|
||||
throw new IllegalArgumentException("The object substitution is already registered. This won't work");
|
||||
}
|
||||
getPersistentSubstitutions().put(nameToReplace, replacement);
|
||||
}
|
||||
|
||||
private BiMap<String, I> getPersistentSubstitutions()
|
||||
{
|
||||
if (persistentSubstitutions == null)
|
||||
{
|
||||
persistentSubstitutions = GameData.getMain().getPersistentSubstitutionMap(superType);
|
||||
}
|
||||
return persistentSubstitutions;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void validateKey()
|
||||
{
|
||||
if (this.optionalDefaultKey != null)
|
||||
Validate.notNull(this.optionalDefaultObject);
|
||||
}
|
||||
|
||||
|
||||
FMLControlledNamespacedRegistry<I> makeShallowCopy() {
|
||||
return new FMLControlledNamespacedRegistry<I>(optionalDefaultKey, maxId, minId, superType);
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large.
Load diff
@@ -1,515 +0,0 @@
|
||||
/*
|
||||
* Forge Mod Loader
|
||||
* Copyright (c) 2012-2013 cpw.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the GNU Lesser Public License v2.1
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
||||
*
|
||||
* Contributors:
|
||||
* cpw - implementation
|
||||
*/
|
||||
|
||||
package net.minecraftforge.fml.common.registry;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Modifier;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Random;
|
||||
import java.util.Set;
|
||||
|
||||
import org.apache.commons.lang3.Validate;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.passive.EntityVillager;
|
||||
import net.minecraft.entity.passive.EntityVillager.*;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.EnumDyeColor;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.ObjectIntIdentityMap;
|
||||
import net.minecraft.util.RegistryNamespacedDefaultedByKey;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.Tuple;
|
||||
import net.minecraft.village.MerchantRecipeList;
|
||||
import net.minecraft.world.gen.structure.StructureVillagePieces;
|
||||
import net.minecraftforge.fml.common.FMLLog;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import com.google.common.collect.ArrayListMultimap;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Maps;
|
||||
import com.google.common.collect.Multimap;
|
||||
|
||||
/**
|
||||
* Registry for villager trading control
|
||||
*
|
||||
* @author cpw
|
||||
*
|
||||
*/
|
||||
public class VillagerRegistry
|
||||
{
|
||||
private static final VillagerRegistry INSTANCE = new VillagerRegistry();
|
||||
|
||||
private Map<Class<?>, IVillageCreationHandler> villageCreationHandlers = Maps.newHashMap();
|
||||
private List<Integer> newVillagerIds = Lists.newArrayList();
|
||||
@SideOnly(Side.CLIENT)
|
||||
private Map<Integer, ResourceLocation> newVillagers;
|
||||
|
||||
private VillagerRegistry()
|
||||
{
|
||||
init();
|
||||
}
|
||||
|
||||
/**
|
||||
* Allow access to the {@link net.minecraft.world.gen.structure.StructureVillagePieces} array controlling new village
|
||||
* creation so you can insert your own new village pieces
|
||||
*
|
||||
* @author cpw
|
||||
*
|
||||
*/
|
||||
public interface IVillageCreationHandler
|
||||
{
|
||||
/**
|
||||
* Called when {@link net.minecraft.world.gen.structure.MapGenVillage} is creating a new village
|
||||
*
|
||||
* @param random
|
||||
* @param i
|
||||
*/
|
||||
StructureVillagePieces.PieceWeight getVillagePieceWeight(Random random, int i);
|
||||
|
||||
/**
|
||||
* The class of the root structure component to add to the village
|
||||
*/
|
||||
Class<?> getComponentClass();
|
||||
|
||||
|
||||
/**
|
||||
* Build an instance of the village component {@link net.minecraft.world.gen.structure.StructureVillagePieces}
|
||||
* @param villagePiece
|
||||
* @param startPiece
|
||||
* @param pieces
|
||||
* @param random
|
||||
* @param p1
|
||||
* @param p2
|
||||
* @param p3
|
||||
* @param facing
|
||||
* @param p5
|
||||
*/
|
||||
Object buildComponent(StructureVillagePieces.PieceWeight villagePiece, StructureVillagePieces.Start startPiece, @SuppressWarnings("rawtypes") List pieces, Random random, int p1,
|
||||
int p2, int p3, EnumFacing facing, int p5);
|
||||
}
|
||||
|
||||
public static VillagerRegistry instance()
|
||||
{
|
||||
return INSTANCE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Register your villager id
|
||||
* @param id
|
||||
*/
|
||||
@Deprecated // Doesn't work at all.
|
||||
public void registerVillagerId(int id)
|
||||
{
|
||||
if (newVillagerIds.contains(id))
|
||||
{
|
||||
FMLLog.severe("Attempt to register duplicate villager id %d", id);
|
||||
throw new RuntimeException();
|
||||
}
|
||||
newVillagerIds.add(id);
|
||||
}
|
||||
/**
|
||||
* Register a new skin for a villager type
|
||||
*
|
||||
* @param villagerId
|
||||
* @param villagerSkin
|
||||
*/
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Deprecated // Doesn't work at all.
|
||||
public void registerVillagerSkin(int villagerId, ResourceLocation villagerSkin)
|
||||
{
|
||||
if (newVillagers == null)
|
||||
{
|
||||
newVillagers = Maps.newHashMap();
|
||||
}
|
||||
newVillagers.put(villagerId, villagerSkin);
|
||||
}
|
||||
|
||||
/**
|
||||
* Register a new village creation handler
|
||||
*
|
||||
* @param handler
|
||||
*/
|
||||
public void registerVillageCreationHandler(IVillageCreationHandler handler)
|
||||
{
|
||||
villageCreationHandlers.put(handler.getComponentClass(), handler);
|
||||
}
|
||||
|
||||
/**
|
||||
* Callback to setup new villager types
|
||||
*
|
||||
* @param villagerType
|
||||
* @param defaultSkin
|
||||
*/
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Deprecated // Doesn't work at all.
|
||||
public static ResourceLocation getVillagerSkin(int villagerType, ResourceLocation defaultSkin)
|
||||
{
|
||||
if (instance().newVillagers != null && instance().newVillagers.containsKey(villagerType))
|
||||
{
|
||||
return instance().newVillagers.get(villagerType);
|
||||
}
|
||||
return defaultSkin;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a list of all added villager types
|
||||
*
|
||||
* @return newVillagerIds
|
||||
*/
|
||||
@Deprecated // Doesn't work at all.
|
||||
public static Collection<Integer> getRegisteredVillagers()
|
||||
{
|
||||
return Collections.unmodifiableCollection(instance().newVillagerIds);
|
||||
}
|
||||
|
||||
public static void addExtraVillageComponents(@SuppressWarnings("rawtypes") ArrayList components, Random random, int i)
|
||||
{
|
||||
@SuppressWarnings("unchecked")
|
||||
List<StructureVillagePieces.PieceWeight> parts = components;
|
||||
for (IVillageCreationHandler handler : instance().villageCreationHandlers.values())
|
||||
{
|
||||
parts.add(handler.getVillagePieceWeight(random, i));
|
||||
}
|
||||
}
|
||||
|
||||
public static Object getVillageComponent(StructureVillagePieces.PieceWeight villagePiece, StructureVillagePieces.Start startPiece, @SuppressWarnings("rawtypes") List pieces, Random random,
|
||||
int p1, int p2, int p3, EnumFacing facing, int p5)
|
||||
{
|
||||
return instance().villageCreationHandlers.get(villagePiece.villagePieceClass).buildComponent(villagePiece, startPiece, pieces, random, p1, p2, p3, facing, p5);
|
||||
}
|
||||
|
||||
public void register(VillagerProfession prof)
|
||||
{
|
||||
register(prof, -1);
|
||||
}
|
||||
private void register(VillagerProfession prof, int id)
|
||||
{
|
||||
professions.register(id, prof.name, prof);
|
||||
}
|
||||
|
||||
private boolean hasInit = false;
|
||||
private FMLControlledNamespacedRegistry<VillagerProfession> professions = GameData.createRegistry("villagerprofessions", VillagerProfession.class, 0, 1024);
|
||||
|
||||
|
||||
private void init()
|
||||
{
|
||||
if (hasInit)
|
||||
return;
|
||||
|
||||
VillagerProfession prof = new VillagerProfession("minecraft:farmer", "minecraft:textures/entity/villager/farmer.png");
|
||||
{
|
||||
register(prof, 0);
|
||||
(new VillagerCareer(prof, "farmer" )).init(VanillaTrades.trades[0][0]);
|
||||
(new VillagerCareer(prof, "fisherman" )).init(VanillaTrades.trades[0][1]);
|
||||
(new VillagerCareer(prof, "shepherd" )).init(VanillaTrades.trades[0][2]);
|
||||
(new VillagerCareer(prof, "fletcher" )).init(VanillaTrades.trades[0][3]);
|
||||
}
|
||||
prof = new VillagerProfession("minecraft:librarian", "minecraft:textures/entity/villager/librarian.png");
|
||||
{
|
||||
register(prof, 1);
|
||||
(new VillagerCareer(prof, "librarian")).init(VanillaTrades.trades[1][0]);
|
||||
}
|
||||
prof = new VillagerProfession("minecraft:priest", "minecraft:textures/entity/villager/priest.png");
|
||||
{
|
||||
register(prof, 2);
|
||||
(new VillagerCareer(prof, "cleric")).init(VanillaTrades.trades[2][0]);
|
||||
}
|
||||
prof = new VillagerProfession("minecraft:smith", "minecraft:textures/entity/villager/smith.png");
|
||||
{
|
||||
register(prof, 3);
|
||||
(new VillagerCareer(prof, "armor" )).init(VanillaTrades.trades[3][0]);
|
||||
(new VillagerCareer(prof, "weapon")).init(VanillaTrades.trades[3][1]);
|
||||
(new VillagerCareer(prof, "tool" )).init(VanillaTrades.trades[3][2]);
|
||||
}
|
||||
prof = new VillagerProfession("minecraft:butcher", "minecraft:textures/entity/villager/butcher.png");
|
||||
{
|
||||
register(prof, 4);
|
||||
(new VillagerCareer(prof, "butcher")).init(VanillaTrades.trades[4][0]);
|
||||
(new VillagerCareer(prof, "leather")).init(VanillaTrades.trades[4][1]);
|
||||
}
|
||||
}
|
||||
|
||||
public static class VillagerProfession
|
||||
{
|
||||
private ResourceLocation name;
|
||||
private ResourceLocation texture;
|
||||
private List<VillagerCareer> careers = Lists.newArrayList();
|
||||
private RegistryDelegate<VillagerProfession> delegate = GameData.getRegistry("villagerprofessions", VillagerProfession.class).getDelegate(this, VillagerProfession.class);
|
||||
|
||||
public VillagerProfession(String name, String texture)
|
||||
{
|
||||
this.name = new ResourceLocation(name);
|
||||
this.texture = new ResourceLocation(texture);
|
||||
((RegistryDelegate.Delegate<VillagerProfession>)delegate).setName(name);
|
||||
}
|
||||
|
||||
private void register(VillagerCareer career)
|
||||
{
|
||||
Validate.isTrue(!careers.contains(career), "Attempted to register career that is already registered.");
|
||||
Validate.isTrue(career.profession == this, "Attempted to register career for the wrong profession.");
|
||||
career.id = careers.size();
|
||||
careers.add(career);
|
||||
}
|
||||
}
|
||||
|
||||
public static class VillagerCareer
|
||||
{
|
||||
private VillagerProfession profession;
|
||||
private String name;
|
||||
private int id;
|
||||
public VillagerCareer(VillagerProfession parent, String name)
|
||||
{
|
||||
this.profession = parent;
|
||||
this.name = name;
|
||||
parent.register(this);
|
||||
}
|
||||
|
||||
private VillagerCareer init(EntityVillager.ITradeList[][] traids)
|
||||
{
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o)
|
||||
{
|
||||
if (o == this) return true;
|
||||
if (!(o instanceof VillagerCareer)) return false;
|
||||
VillagerCareer oc = (VillagerCareer)o;
|
||||
return name.equals(oc.name) && profession == oc.profession;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Hook called when spawning a Villager, sets it's profession to a random registered profession.
|
||||
*
|
||||
* @param entity The new entity
|
||||
* @param rand The world's RNG
|
||||
*/
|
||||
public static void setRandomProfession(EntityVillager entity, Random rand)
|
||||
{
|
||||
Set<String> entries = INSTANCE.professions.getKeys();
|
||||
int prof = rand.nextInt(entries.size());
|
||||
//TODO: Grab id range from internal registry
|
||||
entity.setProfession(rand.nextInt(5));
|
||||
}
|
||||
|
||||
//TODO: Figure out a good generic system for this. Put on hold for Patches.
|
||||
|
||||
private static class VanillaTrades
|
||||
{
|
||||
//This field is moved from EntityVillager over to here.
|
||||
//Moved to inner class to stop static initializer issues.
|
||||
//It is nasty I know but it's vanilla.
|
||||
private static final ITradeList[][][][] trades =
|
||||
{
|
||||
{
|
||||
{
|
||||
{
|
||||
new EmeraldForItems(Items.wheat, new PriceInfo(18, 22)),
|
||||
new EmeraldForItems(Items.potato, new PriceInfo(15, 19)),
|
||||
new EmeraldForItems(Items.carrot, new PriceInfo(15, 19)),
|
||||
new ListItemForEmeralds(Items.bread, new PriceInfo(-4, -2))
|
||||
},
|
||||
{
|
||||
new EmeraldForItems(Item.getItemFromBlock(Blocks.pumpkin), new PriceInfo(8, 13)),
|
||||
new ListItemForEmeralds(Items.pumpkin_pie, new PriceInfo(-3, -2))
|
||||
},
|
||||
{
|
||||
new EmeraldForItems(Item.getItemFromBlock(Blocks.melon_block), new PriceInfo(7, 12)),
|
||||
new ListItemForEmeralds(Items.apple, new PriceInfo(-5, -7))
|
||||
},
|
||||
{
|
||||
new ListItemForEmeralds(Items.cookie, new PriceInfo(-6, -10)),
|
||||
new ListItemForEmeralds(Items.cake, new PriceInfo(1, 1))
|
||||
}
|
||||
},
|
||||
{
|
||||
{
|
||||
new EmeraldForItems(Items.string, new PriceInfo(15, 20)),
|
||||
new EmeraldForItems(Items.coal, new PriceInfo(16, 24)),
|
||||
new ItemAndEmeraldToItem(Items.fish, new PriceInfo(6, 6), Items.cooked_fish, new PriceInfo(6, 6))
|
||||
},
|
||||
{
|
||||
new ListEnchantedItemForEmeralds(Items.fishing_rod, new PriceInfo(7, 8))
|
||||
}
|
||||
},
|
||||
{
|
||||
{
|
||||
new EmeraldForItems(Item.getItemFromBlock(Blocks.wool), new PriceInfo(16, 22)),
|
||||
new ListItemForEmeralds(Items.shears, new PriceInfo(3, 4))
|
||||
},
|
||||
{
|
||||
new ListItemForEmeralds(new ItemStack(Blocks.wool, 1, 0), new PriceInfo(1, 2)),
|
||||
new ListItemForEmeralds(new ItemStack(Blocks.wool, 1, 1), new PriceInfo(1, 2)),
|
||||
new ListItemForEmeralds(new ItemStack(Blocks.wool, 1, 2), new PriceInfo(1, 2)),
|
||||
new ListItemForEmeralds(new ItemStack(Blocks.wool, 1, 3), new PriceInfo(1, 2)),
|
||||
new ListItemForEmeralds(new ItemStack(Blocks.wool, 1, 4), new PriceInfo(1, 2)),
|
||||
new ListItemForEmeralds(new ItemStack(Blocks.wool, 1, 5), new PriceInfo(1, 2)),
|
||||
new ListItemForEmeralds(new ItemStack(Blocks.wool, 1, 6), new PriceInfo(1, 2)),
|
||||
new ListItemForEmeralds(new ItemStack(Blocks.wool, 1, 7), new PriceInfo(1, 2)),
|
||||
new ListItemForEmeralds(new ItemStack(Blocks.wool, 1, 8), new PriceInfo(1, 2)),
|
||||
new ListItemForEmeralds(new ItemStack(Blocks.wool, 1, 9), new PriceInfo(1, 2)),
|
||||
new ListItemForEmeralds(new ItemStack(Blocks.wool, 1, 10), new PriceInfo(1, 2)),
|
||||
new ListItemForEmeralds(new ItemStack(Blocks.wool, 1, 11), new PriceInfo(1, 2)),
|
||||
new ListItemForEmeralds(new ItemStack(Blocks.wool, 1, 12), new PriceInfo(1, 2)),
|
||||
new ListItemForEmeralds(new ItemStack(Blocks.wool, 1, 13), new PriceInfo(1, 2)),
|
||||
new ListItemForEmeralds(new ItemStack(Blocks.wool, 1, 14), new PriceInfo(1, 2)),
|
||||
new ListItemForEmeralds(new ItemStack(Blocks.wool, 1, 15), new PriceInfo(1, 2))
|
||||
}
|
||||
},
|
||||
{
|
||||
{
|
||||
new EmeraldForItems(Items.string, new PriceInfo(15, 20)),
|
||||
new ListItemForEmeralds(Items.arrow, new PriceInfo(-12, -8))
|
||||
},
|
||||
{
|
||||
new ListItemForEmeralds(Items.bow, new PriceInfo(2, 3)),
|
||||
new ItemAndEmeraldToItem(Item.getItemFromBlock(Blocks.gravel), new PriceInfo(10, 10), Items.flint, new PriceInfo(6, 10))
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
{
|
||||
{
|
||||
new EmeraldForItems(Items.paper, new PriceInfo(24, 36)),
|
||||
new ListEnchantedBookForEmeralds()
|
||||
},
|
||||
{
|
||||
new EmeraldForItems(Items.book, new PriceInfo(8, 10)),
|
||||
new ListItemForEmeralds(Items.compass, new PriceInfo(10, 12)),
|
||||
new ListItemForEmeralds(Item.getItemFromBlock(Blocks.bookshelf), new PriceInfo(3, 4))
|
||||
},
|
||||
{
|
||||
new EmeraldForItems(Items.written_book, new PriceInfo(2, 2)),
|
||||
new ListItemForEmeralds(Items.clock, new PriceInfo(10, 12)),
|
||||
new ListItemForEmeralds(Item.getItemFromBlock(Blocks.glass), new PriceInfo(-5, -3))
|
||||
},
|
||||
{
|
||||
new ListEnchantedBookForEmeralds()
|
||||
},
|
||||
{
|
||||
new ListEnchantedBookForEmeralds()
|
||||
},
|
||||
{
|
||||
new ListItemForEmeralds(Items.name_tag, new PriceInfo(20, 22))
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
{
|
||||
{
|
||||
new EmeraldForItems(Items.rotten_flesh, new PriceInfo(36, 40)),
|
||||
new EmeraldForItems(Items.gold_ingot, new PriceInfo(8, 10))
|
||||
},
|
||||
{
|
||||
new ListItemForEmeralds(Items.redstone, new PriceInfo(-4, -1)),
|
||||
new ListItemForEmeralds(new ItemStack(Items.dye, 1, EnumDyeColor.BLUE.getDyeDamage()),
|
||||
new PriceInfo(-2, -1))
|
||||
},
|
||||
{
|
||||
new ListItemForEmeralds(Items.ender_eye, new PriceInfo(7, 11)),
|
||||
new ListItemForEmeralds(Item.getItemFromBlock(Blocks.glowstone), new PriceInfo(-3, -1))
|
||||
},
|
||||
{
|
||||
new ListItemForEmeralds(Items.experience_bottle, new PriceInfo(3, 11))
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
{
|
||||
{
|
||||
new EmeraldForItems(Items.coal, new PriceInfo(16, 24)),
|
||||
new ListItemForEmeralds(Items.iron_helmet, new PriceInfo(4, 6))
|
||||
},
|
||||
{
|
||||
new EmeraldForItems(Items.iron_ingot, new PriceInfo(7, 9)),
|
||||
new ListItemForEmeralds(Items.iron_chestplate, new PriceInfo(10, 14))
|
||||
},
|
||||
{
|
||||
new EmeraldForItems(Items.diamond, new PriceInfo(3, 4)),
|
||||
new ListEnchantedItemForEmeralds(Items.diamond_chestplate, new PriceInfo(16, 19))
|
||||
},
|
||||
{
|
||||
new ListItemForEmeralds(Items.chainmail_boots, new PriceInfo(5, 7)),
|
||||
new ListItemForEmeralds(Items.chainmail_leggings, new PriceInfo(9, 11)),
|
||||
new ListItemForEmeralds(Items.chainmail_helmet, new PriceInfo(5, 7)),
|
||||
new ListItemForEmeralds(Items.chainmail_chestplate, new PriceInfo(11, 15))
|
||||
}
|
||||
},
|
||||
{
|
||||
{
|
||||
new EmeraldForItems(Items.coal, new PriceInfo(16, 24)),
|
||||
new ListItemForEmeralds(Items.iron_axe, new PriceInfo(6, 8))
|
||||
},
|
||||
{
|
||||
new EmeraldForItems(Items.iron_ingot, new PriceInfo(7, 9)),
|
||||
new ListEnchantedItemForEmeralds(Items.iron_sword, new PriceInfo(9, 10))
|
||||
},
|
||||
{
|
||||
new EmeraldForItems(Items.diamond, new PriceInfo(3, 4)),
|
||||
new ListEnchantedItemForEmeralds(Items.diamond_sword, new PriceInfo(12, 15)),
|
||||
new ListEnchantedItemForEmeralds(Items.diamond_axe, new PriceInfo(9, 12))
|
||||
}
|
||||
},
|
||||
{
|
||||
{
|
||||
new EmeraldForItems(Items.coal, new PriceInfo(16, 24)),
|
||||
new ListEnchantedItemForEmeralds(Items.iron_shovel, new PriceInfo(5, 7))
|
||||
},
|
||||
{
|
||||
new EmeraldForItems(Items.iron_ingot, new PriceInfo(7, 9)),
|
||||
new ListEnchantedItemForEmeralds(Items.iron_pickaxe, new PriceInfo(9, 11))
|
||||
},
|
||||
{
|
||||
new EmeraldForItems(Items.diamond, new PriceInfo(3, 4)),
|
||||
new ListEnchantedItemForEmeralds(Items.diamond_pickaxe, new PriceInfo(12, 15))
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
{
|
||||
{
|
||||
new EmeraldForItems(Items.porkchop, new PriceInfo(14, 18)),
|
||||
new EmeraldForItems(Items.chicken, new PriceInfo(14, 18))
|
||||
},
|
||||
{
|
||||
new EmeraldForItems(Items.coal, new PriceInfo(16, 24)),
|
||||
new ListItemForEmeralds(Items.cooked_porkchop, new PriceInfo(-7, -5)),
|
||||
new ListItemForEmeralds(Items.cooked_chicken, new PriceInfo(-8, -6))
|
||||
}
|
||||
},
|
||||
{
|
||||
{
|
||||
new EmeraldForItems(Items.leather, new PriceInfo(9, 12)),
|
||||
new ListItemForEmeralds(Items.leather_leggings, new PriceInfo(2, 4))
|
||||
},
|
||||
{
|
||||
new ListEnchantedItemForEmeralds(Items.leather_chestplate, new PriceInfo(7, 12))
|
||||
},
|
||||
{
|
||||
new ListItemForEmeralds(Items.saddle, new PriceInfo(8, 10))
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -1,87 +0,0 @@
|
||||
fml.config.sample.basicDouble.tooltip=A double property with no defined bounds.
|
||||
fml.config.sample.basicDouble=Unbounded Double
|
||||
fml.config.sample.basicInteger.tooltip=An integer property with no defined bounds.
|
||||
fml.config.sample.basicInteger=Unbounded Integer
|
||||
fml.config.sample.basicString.tooltip=A basic string property. The user can enter anything in this textbox.
|
||||
fml.config.sample.basicString=Basic String
|
||||
fml.config.sample.booleanList.tooltip=A boolean list with no max length and can be lengthened or shortened.
|
||||
fml.config.sample.booleanList=Basic Boolean List
|
||||
fml.config.sample.booleanListFixed.tooltip=A boolean list that has a fixed length of 8.
|
||||
fml.config.sample.booleanListFixed=Fixed Length Boolean List
|
||||
fml.config.sample.booleanListMax.tooltip=A boolean list that has a max length of 10.
|
||||
fml.config.sample.booleanListMax=Max Length Boolean List
|
||||
fml.config.sample.boundedDouble.tooltip=A double property with defined bounds.
|
||||
fml.config.sample.boundedDouble=Bounded Double
|
||||
fml.config.sample.boundedInteger.tooltip=An integer property with defined bounds.
|
||||
fml.config.sample.boundedInteger=Bounded Integer
|
||||
fml.config.sample.chatColorPicker.tooltip=A special property that allows the user to select a font color code.
|
||||
fml.config.sample.chatColorPicker=Chat Color Picker
|
||||
fml.config.sample.ctgy.lists.tooltip=Provides a variety of array-property controls to play with.
|
||||
fml.config.sample.ctgy.lists=Sample Array Controls
|
||||
fml.config.sample.ctgy.numbers.tooltip=Provides a listing of the numeric controls for toying with.
|
||||
fml.config.sample.ctgy.numbers=Sample Numeric Controls
|
||||
fml.config.sample.ctgy.strings.tooltip=Provides a listing of the different String-type controls to play with.
|
||||
fml.config.sample.ctgy.strings=Sample String Controls
|
||||
fml.config.sample.cycleString.tooltip=A string property that has a defined list of valid values that can be cycled through.
|
||||
fml.config.sample.cycleString=Cycle Value String
|
||||
fml.config.sample.doubleList.tooltip=A double list with no max length and can be lengthened or shortened.
|
||||
fml.config.sample.doubleList=Basic Double List
|
||||
fml.config.sample.doubleListBounded.tooltip=A double list with specific value bounds.
|
||||
fml.config.sample.doubleListBounded=Double List with Value Bounds
|
||||
fml.config.sample.doubleListFixed.tooltip=A double list that has a fixed length of 10.
|
||||
fml.config.sample.doubleListFixed=Fixed Length Double List
|
||||
fml.config.sample.doubleListMax.tooltip=A double list that has a max length of 15.
|
||||
fml.config.sample.doubleListMax=Max Length Double List
|
||||
fml.config.sample.imABoolean.tooltip=Yep, that's pretty much it... I'm a Boolean control.
|
||||
fml.config.sample.imABoolean=I'm a Boolean
|
||||
fml.config.sample.imADouble.tooltip=There are two of me. Or maybe I work for both the CIA and the KGB. Not sure.
|
||||
fml.config.sample.imADouble=I'm a Double
|
||||
fml.config.sample.imAString.tooltip=Aah. Now, I understand you want us to advertise your washing powder. \n<*String.*> \nString, washing powder, what's the difference? We can sell anything. \n<*Good. Well I have this large quantity of string, 122,000 miles of it to be exact, which I inherited, and I thought if I advertised it...*> \nOf course! A national campaign. Useful stuff, string, no trouble there. \n<*Ah, but there's a snag, you see. Due to bad planning, the 122,000 miles is in three inch lengths. So it's not very useful.*> \nWell, that's our selling point! SIMPSON'S INDIVIDUAL STRINGETTES! THE NOW STRING! READY CUT, EASY TO HANDLE, SIMPSON'S INDIVIDUAL EMPEROR STRINGETTES - JUST THE RIGHT LENGTH!
|
||||
fml.config.sample.imAString=I'm a String
|
||||
fml.config.sample.imAnInteger.tooltip=Did I say that I'm an Integer? Oh, I see.
|
||||
fml.config.sample.imAnInteger=I'm an Integer
|
||||
fml.config.sample.integerList.tooltip=An integer list with no max length and can be lengthened or shortened.
|
||||
fml.config.sample.integerList=Basic Integer List
|
||||
fml.config.sample.integerListBounded.tooltip=An integer list with specific value bounds.
|
||||
fml.config.sample.integerListBounded=Integer List with Value Bounds
|
||||
fml.config.sample.integerListFixed.tooltip=An integer list that has a fixed length of 10.
|
||||
fml.config.sample.integerListFixed=Fixed Length Integer List
|
||||
fml.config.sample.integerListMax.tooltip=An integer list that has a max length of 15.
|
||||
fml.config.sample.integerListMax=Max Length Integer List
|
||||
fml.config.sample.modIDSelector.tooltip=A special property that allows the user to select a mod ID from a list of all installed mods. There are many possibilities for how this could be used with a little custom code: selecting biomes, selecting entities, selecting items, selecting blocks, etc.
|
||||
fml.config.sample.modIDSelector=Mod ID Selector
|
||||
fml.config.sample.patternString.tooltip=A string property that is validated using a Pattern object.
|
||||
fml.config.sample.patternString=Pattern Validated String
|
||||
fml.config.sample.sliderDouble.tooltip=A double property with defined bounds using a slider control.
|
||||
fml.config.sample.sliderDouble=Slider Double
|
||||
fml.config.sample.sliderInteger.tooltip=An integer property with defined bounds using a slider control.
|
||||
fml.config.sample.sliderInteger=Slider Integer
|
||||
fml.config.sample.stringList.tooltip=A basic string list with no validation.
|
||||
fml.config.sample.stringList=Basic String List
|
||||
fml.config.sample.stringListFixed.tooltip=A string list that has a fixed length of 7.
|
||||
fml.config.sample.stringListFixed=Fixed Length String List
|
||||
fml.config.sample.stringListMax.tooltip=A string list that has a max length of 15.
|
||||
fml.config.sample.stringListMax=Max Length String List
|
||||
fml.config.sample.stringListPattern.tooltip=A string list that validates each value using a Pattern object.
|
||||
fml.config.sample.stringListPattern=Pattern Validated String List
|
||||
fml.config.sample.title=This is for playing with the Config GUI behavior. Changes are not saved.
|
||||
|
||||
fml.configgui.applyGlobally=Apply globally
|
||||
fml.configgui.confirmRestartMessage=I Understand
|
||||
fml.configgui.gameRestartRequired=One or more changed settings requires that Minecraft be restarted before taking effect.
|
||||
fml.configgui.gameRestartTitle=Minecraft Restart Required
|
||||
fml.configgui.sampletext=Sample Text
|
||||
fml.configgui.tooltip.addNewEntryAbove=Add New Entry Above
|
||||
fml.configgui.tooltip.applyGlobally=Apply Undo Changes or Reset to Default globally.
|
||||
fml.configgui.tooltip.removeEntry=Remove Entry
|
||||
fml.configgui.tooltip.resetAll=Reset All to Default. If the Apply globally checkbox is checked values on child screens will also be reset.
|
||||
fml.configgui.tooltip.resetToDefault=Reset to Default
|
||||
fml.configgui.tooltip.undoAll=Undo All Changes. If the Apply globally checkbox is checked changes to child screens will also be undone.
|
||||
fml.configgui.tooltip.undoChanges=Undo Changes
|
||||
fml.configgui.tooltip.default=[default: %s]
|
||||
fml.configgui.tooltip.defaultNumeric=[range: %s ~ %s, default: %s]
|
||||
|
||||
fml.menu.mods=Mods
|
||||
fml.menu.mods.normal=Normal
|
||||
fml.menu.mods.search=Search:
|
||||
fml.menu.modoptions=Mod Options...
|
||||
@@ -1 +0,0 @@
|
||||
net/minecraft/server/management/ServerConfigurationManager.initializeConnectionToPlayer(Lnet/minecraft/network/NetworkManager;Lnet/minecraft/entity/player/EntityPlayerMP;Lnet/minecraft/network/NetHandlerPlayServer;)V=|p_72355_1_,p_72355_2_,nethandlerplayserver
|
||||
@@ -1,85 +0,0 @@
|
||||
#Main FML Access Transformer configuration file
|
||||
# TileEntity addMapping
|
||||
public net.minecraft.tileentity.TileEntity func_145826_a(Ljava/lang/Class;Ljava/lang/String;)V
|
||||
# EntityList addMappings
|
||||
public net.minecraft.entity.EntityList func_75618_a(Ljava/lang/Class;Ljava/lang/String;I)V
|
||||
public net.minecraft.entity.EntityList func_75614_a(Ljava/lang/Class;Ljava/lang/String;III)V
|
||||
public net.minecraft.entity.EntityList field_75625_b #nameToClassMap
|
||||
public net.minecraft.entity.EntityList field_75626_c #classToNameMap
|
||||
public net.minecraft.entity.EntityList field_75623_d #idToClassMap
|
||||
## RenderManager
|
||||
public net.minecraft.client.renderer.entity.RenderManager field_78729_o #renderers
|
||||
## TileEntityRendererDispatcher
|
||||
public net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher field_147559_m
|
||||
## CraftingManager - make the add recipe methods public
|
||||
public net.minecraft.item.crafting.CraftingManager func_92103_a(Lnet.minecraft.item.ItemStack;[Ljava/lang/Object;)Lnet.minecraft.item.crafting.ShapedRecipes;
|
||||
public net.minecraft.item.crafting.CraftingManager func_77596_b(Lnet.minecraft.item.ItemStack;[Ljava/lang/Object;)V
|
||||
## WeightedRandomItem
|
||||
public net.minecraft.util.WeightedRandom$Item field_76292_a #probability
|
||||
## EntityPlayerMP getNextWindowId
|
||||
public net.minecraft.entity.player.EntityPlayerMP func_71117_bO()V
|
||||
public net.minecraft.entity.player.EntityPlayerMP field_71139_cq
|
||||
## EntityAITaskEntry
|
||||
public net.minecraft.entity.ai.EntityAITasks$EntityAITaskEntry
|
||||
## EntityLiving
|
||||
public net.minecraft.entity.EntityLiving field_70714_bg #tasks
|
||||
public net.minecraft.entity.EntityLiving field_70715_bh #targetTasks
|
||||
## EntityVillager - minmax lists
|
||||
public net.minecraft.entity.passive.EntityVillager func_146091_a(Lnet/minecraft/village/MerchantRecipeList;Lnet/minecraft/item/Item;Ljava/util/Random;F)V # buy
|
||||
public net.minecraft.entity.passive.EntityVillager func_146089_b(Lnet/minecraft/village/MerchantRecipeList;Lnet/minecraft/item/Item;Ljava/util/Random;F)V # sell
|
||||
public net.minecraft.entity.passive.EntityVillager field_70958_bB
|
||||
public net.minecraft.entity.passive.EntityVillager field_70960_bC
|
||||
# GuiScreen
|
||||
public net.minecraft.client.gui.GuiScreen field_146297_k # minecraft instance - public because gui's outside access it
|
||||
# Minecraft
|
||||
public net.minecraft.client.Minecraft field_71446_o # textureManager
|
||||
public net.minecraft.client.Minecraft field_110450_ap # mcDefaultResourcePack
|
||||
public net.minecraft.client.Minecraft func_71370_a(II)V # resize
|
||||
public net.minecraft.client.Minecraft func_180510_a(Lnet/minecraft/client/renderer/texture/TextureManager;)V # drawSplashScreen
|
||||
## ItemBlock
|
||||
public net.minecraft.item.ItemBlock field_150939_a
|
||||
## DedicatedServer
|
||||
public net.minecraft.server.dedicated.DedicatedServer field_71341_l # pendingCommandList
|
||||
## SaveFormatOld
|
||||
public net.minecraft.world.storage.SaveFormatOld field_75808_a # savesDirectory
|
||||
|
||||
protected net.minecraft.util.ObjectIntIdentityMap field_148749_a # internal map
|
||||
protected net.minecraft.util.ObjectIntIdentityMap field_148748_b # internal index list
|
||||
protected-f net.minecraft.util.RegistryNamespaced field_148759_a # identitymap
|
||||
|
||||
# GuiButton
|
||||
public net.minecraft.client.gui.GuiButton field_146120_f # width - needed for config GUI stuff
|
||||
public net.minecraft.client.gui.GuiButton field_146121_g # height - needed for config GUI stuff
|
||||
# GuiTextField
|
||||
public-f net.minecraft.client.gui.GuiTextField field_146209_f # xPosition - needed for config GUI stuff
|
||||
public-f net.minecraft.client.gui.GuiTextField field_146210_g # yPosition - needed for config GUI stuff
|
||||
public-f net.minecraft.client.gui.GuiTextField field_146218_h # width - needed for config GUI stuff
|
||||
public-f net.minecraft.client.gui.GuiTextField field_146219_i # height - needed for config GUI stuff
|
||||
# GuiSlot
|
||||
public net.minecraft.client.gui.GuiSlot field_148149_f # slotHeight - needed for config GUI stuff
|
||||
public net.minecraft.client.gui.GuiSlot field_148151_d # right - needed for config GUI stuff
|
||||
public net.minecraft.client.gui.GuiSlot field_148152_e # left - needed for config GUI stuff
|
||||
public net.minecraft.client.gui.GuiSlot field_148153_b # top - needed for config GUI stuff
|
||||
public net.minecraft.client.gui.GuiSlot field_148154_c # bottom - needed for config GUI stuff
|
||||
public net.minecraft.client.gui.GuiSlot field_148155_a # width - needed for config GUI stuff
|
||||
public net.minecraft.client.gui.GuiSlot field_148158_l # height - needed for config GUI stuff
|
||||
public net.minecraft.client.gui.GuiSlot field_148160_j # headerPadding - needed for config GUI stuff
|
||||
|
||||
# Villager Traid Classes
|
||||
public net.minecraft.entity.passive.EntityVillager$EmeraldForItems
|
||||
public net.minecraft.entity.passive.EntityVillager$ITradeList
|
||||
public net.minecraft.entity.passive.EntityVillager$ItemAndEmeraldToItem
|
||||
public net.minecraft.entity.passive.EntityVillager$ListEnchantedBookForEmeralds
|
||||
public net.minecraft.entity.passive.EntityVillager$ListEnchantedItemForEmeralds
|
||||
public net.minecraft.entity.passive.EntityVillager$ListItemForEmeralds
|
||||
public net.minecraft.entity.passive.EntityVillager$PriceInfo
|
||||
|
||||
# Font renderer
|
||||
protected net.minecraft.client.gui.FontRenderer field_78288_b # FONT_HEIGHT
|
||||
protected net.minecraft.client.gui.FontRenderer field_78286_d # charWidth
|
||||
protected net.minecraft.client.gui.FontRenderer field_78287_e # glyphWidth
|
||||
protected net.minecraft.client.gui.FontRenderer field_111273_g # locationFontTexture
|
||||
protected net.minecraft.client.gui.FontRenderer field_78295_j # posX
|
||||
protected net.minecraft.client.gui.FontRenderer field_78296_k # posY
|
||||
protected net.minecraft.client.gui.FontRenderer func_78266_a(IZ)F # renderDefaultChar
|
||||
protected net.minecraft.client.gui.FontRenderer func_78277_a(CZ)F # renderUnicodeChar
|
||||
@@ -1,3 +0,0 @@
|
||||
# Marker interfaces to add to minecraft - helps in bukkit and client/server unification
|
||||
# Only runs at runtime because it's not necessary at compile time
|
||||
# has deobf and obf mappings so it runs OK in mcp
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 6.8 KiB |
Vendored
BIN
Binary file not shown.
+2
-2
@@ -1,6 +1,6 @@
|
||||
#Wed Jul 02 15:54:47 CDT 2014
|
||||
#Mon Sep 14 12:28:28 PDT 2015
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-2.0-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-2.7-bin.zip
|
||||
@@ -65,7 +65,7 @@ cd "`dirname \"$PRG\"`/" >&-
|
||||
APP_HOME="`pwd -P`"
|
||||
cd "$SAVED" >&-
|
||||
|
||||
CLASSPATH=$APP_HOME/fml/gradle/wrapper/gradle-wrapper.jar
|
||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
|
||||
# Determine the Java command to use to start the JVM.
|
||||
if [ -n "$JAVA_HOME" ] ; then
|
||||
|
||||
Vendored
+1
-1
@@ -69,7 +69,7 @@ set CMD_LINE_ARGS=%$
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=%APP_HOME%\fml\gradle\wrapper\gradle-wrapper.jar
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
|
||||
|
||||
File renamed without changes.
Loaded 100 of 936 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user