mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-14 09:05:17 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
adb6b330b9 | ||
|
|
8b1d213f20 | ||
|
|
92cbccae60 | ||
|
|
fdd0e61e17 | ||
|
|
95481e1cd2 | ||
|
|
2631c01109 | ||
|
|
d33dfb0602 | ||
|
|
34ca805acf | ||
|
|
0da57286ef | ||
|
|
fe1fbfda61 | ||
|
|
10f924a92d | ||
|
|
57fdcdd641 | ||
|
|
69f2b96f1d | ||
|
|
ab1d251724 | ||
|
|
4da7be2e7d | ||
|
|
5a5c9dbb8e | ||
|
|
336e28c6fe | ||
|
|
82c0731888 | ||
|
|
a0b0faf693 | ||
|
|
ed3fe86454 | ||
|
|
5bf8a30ab8 | ||
|
|
663ed58610 | ||
|
|
d1909d30ac | ||
|
|
5013991fa4 | ||
|
|
1ed1d233c7 | ||
|
|
3fb9b988d9 | ||
|
|
10f8c2c426 | ||
|
|
8d43d859c7 | ||
|
|
106b9dc4c9 | ||
|
|
8735d92ecd | ||
|
|
87ea7289cb | ||
|
|
8a08602dc3 | ||
|
|
2995f1c072 | ||
|
|
812be37f5f | ||
|
|
4928e3b059 | ||
|
|
3262b656a3 | ||
|
|
5fc1ee844d | ||
|
|
1be3e18a9d | ||
|
|
e511ba7db8 | ||
|
|
e08cec3bc0 | ||
|
|
d6a5cf2828 | ||
|
|
03c5d8aeb4 | ||
|
|
3c3654b576 | ||
|
|
fb30b67adb | ||
|
|
d08641aae5 | ||
|
|
99542f5ef5 | ||
|
|
5decee87d6 | ||
|
|
590072e636 | ||
|
|
fb1cd9be88 | ||
|
|
576ff2fadb | ||
|
|
9e28c51d23 | ||
|
|
6d5dffa458 | ||
|
|
30b1f4c2ed | ||
|
|
0e221f098c | ||
|
|
e835fd2a46 | ||
|
|
55f599e2b3 | ||
|
|
68c3a5675f | ||
|
|
a31f983e6a | ||
|
|
a2fac655b4 | ||
|
|
670180a0b6 | ||
|
|
54da114945 | ||
|
|
ebd92e094d | ||
|
|
7f67f1f13a | ||
|
|
b719f6142c | ||
|
|
18795572fe | ||
|
|
fba7f7d1ab | ||
|
|
1c253966c8 | ||
|
|
effbaa0c74 | ||
|
|
321c8196e7 | ||
|
|
024ebad54a | ||
|
|
d58587a016 | ||
|
|
249d607397 | ||
|
|
5a3585adaa | ||
|
|
8fb9ad4687 | ||
|
|
6715ccd14a | ||
|
|
cf456f9f3d | ||
|
|
a19394d48a | ||
|
|
e233005138 | ||
|
|
f579b2db69 | ||
|
|
fe62372429 | ||
|
|
12853df285 | ||
|
|
9034062c8c | ||
|
|
2a950f3e80 | ||
|
|
fb0ccd3618 | ||
|
|
a6214f2d45 | ||
|
|
3135a0650a | ||
|
|
d2c6244ca8 | ||
|
|
74e7431ab6 | ||
|
|
086b155e6b | ||
|
|
f82ee17e48 | ||
|
|
ae02a73c67 | ||
|
|
561e3c773f | ||
|
|
4127a60d3f | ||
|
|
e7c2b0506f | ||
|
|
65e1544168 | ||
|
|
e9ae3a0a82 | ||
|
|
b4fa5f58db | ||
|
|
eda99a16fb | ||
|
|
721b3015db | ||
|
|
297b35a136 | ||
|
|
29a712e0f9 | ||
|
|
81802108ca | ||
|
|
0908fdfe5c | ||
|
|
fb070104a2 | ||
|
|
e85d4af5da | ||
|
|
54bb9a6efb | ||
|
|
ca979fe391 | ||
|
|
f59a0f61aa | ||
|
|
2a1342dc75 | ||
|
|
f264295d12 | ||
|
|
fb4bbaa85b | ||
|
|
c25a08e946 | ||
|
|
a6a1bcf402 | ||
|
|
0ae9be4710 | ||
|
|
4f7c0b73f8 | ||
|
|
87a9cc96cb | ||
|
|
07dd048d50 | ||
|
|
47bf6357c3 | ||
|
|
705fc5b26c | ||
|
|
7b35ba5be4 | ||
|
|
1a04139657 | ||
|
|
6cfbc34940 | ||
|
|
8fcc2a1f9f | ||
|
|
d3323f547c | ||
|
|
ad3d08f0ee | ||
|
|
f7a3157174 | ||
|
|
7de8218e4a | ||
|
|
0aeb6f1eab | ||
|
|
08beffb945 | ||
|
|
ff6a314cf8 | ||
|
|
5a9c5b4b67 | ||
|
|
0d6fbf063b | ||
|
|
b9a56c48b1 | ||
|
|
b9d42053b2 | ||
|
|
00cd110fae | ||
|
|
36ed659b17 | ||
|
|
be3b4cc3bc | ||
|
|
da26ee2422 | ||
|
|
92d0d6f4e1 | ||
|
|
44992f9b69 | ||
|
|
c9bcb73636 | ||
|
|
cd865a256b | ||
|
|
01c34eb0be | ||
|
|
c9c2bbef1d | ||
|
|
606e0d8e80 | ||
|
|
bedcc2fc64 | ||
|
|
c7db47d528 | ||
|
|
f50d35ce3f | ||
|
|
112adbef8f | ||
|
|
0d917cfdcc | ||
|
|
8f03e6cd24 | ||
|
|
e507f90276 | ||
|
|
dae71d0b7a | ||
|
|
5b2be7903c | ||
|
|
6389b16609 | ||
|
|
902f8918a3 | ||
|
|
73d19ef0a3 | ||
|
|
80ab9a98bb | ||
|
|
7837e4d3a1 | ||
|
|
423490e1c8 | ||
|
|
deae2de0eb | ||
|
|
821cc3ec54 | ||
|
|
9cb5f47805 | ||
|
|
c51848db5b | ||
|
|
20c30d541c | ||
|
|
d9e4d13d69 | ||
|
|
1822dfd896 | ||
|
|
8df7df145b | ||
|
|
f89a1210df | ||
|
|
50c30fce23 | ||
|
|
ad56d1c879 | ||
|
|
65aa6d6b43 | ||
|
|
6aa32def11 | ||
|
|
7be20d9c4d | ||
|
|
3cf1792bec | ||
|
|
d1a79c2a66 | ||
|
|
5b06661835 | ||
|
|
a7e950e7c2 | ||
|
|
341cfc0cf7 | ||
|
|
ba6aa3368d | ||
|
|
81e5a85a36 | ||
|
|
050d0ac294 | ||
|
|
c0c4830ed4 | ||
|
|
9eed4e19f2 | ||
|
|
e8c2895042 |
No files matched your search
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,11 @@
|
||||
cd ..
|
||||
|
||||
rmdir /S /Q src
|
||||
mkdir src
|
||||
xcopy /Y /E src_work\* src\
|
||||
|
||||
xcopy /Y /E forge\forge_client\src\net\* src\minecraft\net
|
||||
xcopy /Y /E forge\forge_common\net\* src\minecraft\net
|
||||
xcopy /Y /E forge\forge_common\net\* src\minecraft_server\net
|
||||
|
||||
cmd /C recompile.bat
|
||||
@@ -10,11 +10,6 @@ cp -a forge/forge_client/src/net/* src_forge/minecraft/net/
|
||||
cp -a forge/forge_common/net/* src_forge/minecraft/net/
|
||||
cp -a forge/forge_common/net/* src_forge/minecraft_server/net/
|
||||
|
||||
cd forge
|
||||
./inject_version.sh ../src_forge/minecraft/net/minecraft/src/forge/ForgeHooks.java
|
||||
./inject_version.sh ../src_forge/minecraft_server/net/minecraft/src/forge/ForgeHooks.java
|
||||
cd ..
|
||||
|
||||
cp -a src_forge src
|
||||
|
||||
./recompile.sh
|
||||
File renamed without changes.
File renamed without changes.
+1591
File diff suppressed because it is too large.
Load diff
@@ -213,8 +213,6 @@ net/minecraft/src/Packet8UpdateHealth.func_322_a(Ljava/io/DataOutputStream;)V=ja
|
||||
net/minecraft/src/Packet8UpdateHealth.func_327_a(Ljava/io/DataInputStream;)V=java/io/IOException
|
||||
net/minecraft/src/Packet9Respawn.func_322_a(Ljava/io/DataOutputStream;)V=java/io/IOException
|
||||
net/minecraft/src/Packet9Respawn.func_327_a(Ljava/io/DataInputStream;)V=java/io/IOException
|
||||
net/minecraft/src/Packet250CustomPayload.func_322_a(Ljava/io/DataOutputStream;)V=java/io/IOException
|
||||
net/minecraft/src/Packet250CustomPayload.func_327_a(Ljava/io/DataInputStream;)V=java/io/IOException
|
||||
net/minecraft/src/RegionFile.func_22196_b()V=java/io/IOException
|
||||
net/minecraft/src/RegionFile.func_22198_a(III)V=java/io/IOException
|
||||
net/minecraft/src/RegionFile.func_22200_a(I[BI)V=java/io/IOException
|
||||
@@ -228,4 +226,3 @@ net/minecraft/src/ThreadDownloadResources.func_1212_a(Ljava/net/URL;Ljava/io/Fil
|
||||
net/minecraft/src/ThreadedChunkLoader.func_40551_a(Lnet/minecraft/src/ThreadedChunkLoaderPending;)V=java/io/IOException
|
||||
net/minecraft/src/ThreadedChunkLoader.func_813_a(Lnet/minecraft/src/World;II)Lnet/minecraft/src/Chunk;=java/io/IOException
|
||||
net/minecraft/src/ThreadedFileIOBase.func_40566_a()V=java/lang/InterruptedException
|
||||
net/minecraft/src/StringTranslate.func_44025_a(Ljava/util/Properties;Ljava/lang/String;)V=java/io/IOException
|
||||
+5999
File diff suppressed because it is too large.
Load diff
@@ -9,9 +9,6 @@ DirConf = conf
|
||||
DirRuntime = runtime
|
||||
DirLib = lib
|
||||
DirFFOut = temp/ffout
|
||||
DirBinOut = temp/bin
|
||||
DirModSrc = modsrc
|
||||
DirEclipse = eclipse
|
||||
|
||||
[CSV]
|
||||
Classes = %(DirConf)s/classes.csv
|
||||
@@ -26,8 +23,8 @@ Server = %(DirTemp)s/server_rg.srg
|
||||
DirNatives = %(DirJars)s/bin/natives
|
||||
Client = %(DirJars)s/bin/minecraft.jar
|
||||
Server = %(DirJars)s/minecraft_server.jar
|
||||
MD5Client = e92302d2acdba7c97e0d8df1e10d2006
|
||||
MD5Server = b0f4fb91f9723104adf35944bbf3d3cf
|
||||
MD5Client = 3820d222b95d0b8c520d9596a756a6e6
|
||||
MD5Server = 934b6010999daa1f1b1ccdf4cb77e052
|
||||
|
||||
[RETROGUARD]
|
||||
Location = %(DirRuntime)s/bin/retroguard.jar
|
||||
@@ -53,6 +50,8 @@ XClientLog = %(DirLogs)s/client_exc.log
|
||||
XServerLog = %(DirLogs)s/server_exc.log
|
||||
|
||||
[DECOMPILE]
|
||||
FFClientConf = -rbr=0 -dgs=1 -asc=1
|
||||
FFServerConf = -rbr=0 -dgs=1 -asc=1
|
||||
FFClientOut = %(DirFFOut)s/client
|
||||
FFServerOut = %(DirFFOut)s/server
|
||||
FFClientSrc = %(DirFFOut)s/minecraft_exc.jar
|
||||
@@ -60,12 +59,15 @@ FFServerSrc = %(DirFFOut)s/minecraft_server_exc.jar
|
||||
FFSource = net
|
||||
|
||||
[OUTPUT]
|
||||
BinClient = %(DirBinOut)s/minecraft
|
||||
BinServer = %(DirBinOut)s/minecraft_server
|
||||
BinOut = %(DirTemp)s/bin
|
||||
BinClient = %(DirTemp)s/bin/minecraft
|
||||
BinServer = %(DirTemp)s/bin/minecraft_server
|
||||
SrcClient = %(DirSrc)s/minecraft
|
||||
SrcServer = %(DirSrc)s/minecraft_server
|
||||
TestClient = net/minecraft/client/Minecraft
|
||||
TestServer = net/minecraft/server/MinecraftServer
|
||||
|
||||
[PACKAGES]
|
||||
PkgClient = net/minecraft/src,net/minecraft/client
|
||||
PkgServer = net/minecraft/src,net/minecraft/server
|
||||
|
||||
[PATCHES]
|
||||
PatchClient = %(DirConf)s/patches/minecraft.patch
|
||||
@@ -73,8 +75,6 @@ PatchServer = %(DirConf)s/patches/minecraft_server.patch
|
||||
PatchTemp = %(DirTemp)s/temp.patch
|
||||
FFPatchClient = %(DirConf)s/patches/minecraft_ff.patch
|
||||
FFPatchServer = %(DirConf)s/patches/minecraft_server_ff.patch
|
||||
PatchClient_osx = %(DirConf)s/patches/minecraft_osx.patch
|
||||
PatchServer_osx = %(DirConf)s/patches/minecraft_server_osx.patch
|
||||
|
||||
[RECOMPILE]
|
||||
BinClient = %(DirBin)s/minecraft
|
||||
@@ -84,6 +84,8 @@ ClassPathServer = %(DirLib)s/,%(DirLib)s/*,%(DirJars)s/minecraft_server.jar
|
||||
ClientFixes = %(DirConf)s/patches
|
||||
|
||||
[REOBF]
|
||||
SAFFXClient = %(DirTemp)s/minecraft.saffx
|
||||
SAFFXServer = %(DirTemp)s/minecraft_server.saffx
|
||||
MD5Client = %(DirTemp)s/client.md5
|
||||
MD5Server = %(DirTemp)s/server.md5
|
||||
MD5PreReobfClient = %(DirTemp)s/client_reobf.md5
|
||||
@@ -96,46 +98,42 @@ 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
|
||||
FixSound = ga
|
||||
FixStart = Start
|
||||
FixSound = minecraft/me.class
|
||||
FixStart = minecraft/Start.class
|
||||
NullPkg = net/minecraft/src
|
||||
IgnorePkg = paulscode,com/jcraft,isom,ibxm,de/matthiasmann/twl,org/xmlpull,javax/xml
|
||||
|
||||
[GETMODSOURCE]
|
||||
OutSRCClient = %(DirModSrc)s/minecraft
|
||||
OutSRCServer = %(DirModSrc)s/minecraft_server
|
||||
OutSRCClient = modsrc/client
|
||||
OutSRCServer = modsrc/server
|
||||
OutSRC = modsrc
|
||||
|
||||
[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
|
||||
|
||||
[COMMANDS]
|
||||
Patcher_win = %(DirRuntime)s/bin/applydiff.exe
|
||||
Patcher_linux = patch
|
||||
Patcher_osx = patch
|
||||
Jad_win = %(DirRuntime)s/bin/jad.exe
|
||||
Jad_linux = wine %(DirRuntime)s/bin/jad.exe
|
||||
Jad_osx = %(DirRuntime)s/bin/jad-osx
|
||||
AStyle_win = %(DirRuntime)s/bin/astyle.exe
|
||||
AStyle_linux = wine %(DirRuntime)s/bin/astyle.exe
|
||||
AStyle_osx = %(DirRuntime)s/bin/astyle-osx
|
||||
Patcher = %(DirRuntime)s/bin/applydiff.exe
|
||||
JadRetro = %(DirRuntime)s/bin/jadretro.jar
|
||||
Fernflower = %(DirRuntime)s/bin/fernflower.jar
|
||||
Jadwin = %(DirRuntime)s/bin/jad.exe
|
||||
Jadlinux = %(DirRuntime)s/bin/jad.exe
|
||||
Jadosx = %(DirRuntime)s/bin/jad-osx
|
||||
Exceptor = %(DirRuntime)s/bin/exceptor.jar
|
||||
CmdPatch = %s -p1 -u -i {patchfile} -d {srcdir}
|
||||
CmdJad = %s -b -d {outdir} -dead -o -r -s .java -stat -ff {classes}
|
||||
CmdAStyle = %s -A1s4CSKYm1M1pHjcnqz2 {classes}
|
||||
CmdRG = %s -cp "{classpath}" RetroGuard -searge {conffile}
|
||||
CmdRGReobf = %s -cp "{classpath}" RetroGuard -notch {conffile}
|
||||
CmdJadretro = %s -jar %s {targetdir}
|
||||
CmdFernflower = %s -jar %s -rbr=0 -dgs=1 -asc=1 -log=WARN {jarin} {jarout}
|
||||
CmdExceptor = %s -jar %s {input} {output} {conf} {log}
|
||||
CmdRecomp = %s -g -source 1.6 -target 1.6 -classpath "{classpath}" -sourcepath {sourcepath} -d {outpath} {pkgs}
|
||||
CmdRG = %s -cp {classpath} RetroGuard -searge {conffile}
|
||||
CmdRGReobf = %s -cp {classpath} RetroGuard -notch {conffile}
|
||||
CmdJadretro = %s -jar {jarjr} {targetdir}
|
||||
CmdRecompClt = %s -g -source 1.6 -target 1.6 -classpath "{classpath}" -sourcepath {sourcepath} -d {outpath} {pkgs} {fixes}/*.java
|
||||
CmdRecompSrv = %s -g -source 1.6 -target 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
|
||||
CmdJadwin = .\{binjad} -b -d {outdir} -dead -o -r -s .java -stat -v -ff {classes}
|
||||
CmdJadlinux = wine {binjad} -b -d {outdir} -dead -o -r -s .java -stat -v -ff "{classes}"
|
||||
CmdJadosx = {binjad} -b -d {outdir} -dead -o -r -s .java -stat -v -ff {classes}
|
||||
CmdPatchwin = .\%(Patcher)s --binary -p1 -u -i ..\..\{patchfile} -d {srcdir}
|
||||
CmdPatchlinux = patch --binary -p1 -u -i ../../{patchfile} -d {srcdir}
|
||||
CmdPatchosx = patch --binary -p1 -u -i ../../{patchfile} -d {srcdir}
|
||||
CmdFernflower = %s -jar {jarff} {conf} {jarin} {jarout}
|
||||
CmdExceptor = %s -jar {jarexc} {input} {output} {conf} {log}
|
||||
+4880
File diff suppressed because it is too large.
Load diff
File renamed without changes.
@@ -1,6 +1,6 @@
|
||||
// this is needed for the sound engine to work with deobfuscated sourcecode without crashing
|
||||
|
||||
public class ga
|
||||
public class me
|
||||
{
|
||||
public static int c(double d)
|
||||
{
|
||||
File diff suppressed because it is too large.
Load diff
@@ -1,7 +1,7 @@
|
||||
diff -r -U 3 minecraft\net\minecraft\client\Minecraft.java minecraft_patched\net\minecraft\client\Minecraft.java
|
||||
--- minecraft\net\minecraft\client\Minecraft.java Fri Jan 13 17:44:46 2012
|
||||
+++ minecraft_patched\net\minecraft\client\Minecraft.java Fri Jan 13 17:35:06 2012
|
||||
@@ -1609,11 +1609,13 @@
|
||||
--- minecraft\net\minecraft\client\Minecraft.java Tue Nov 22 23:21:44 2011
|
||||
+++ minecraft_patched\net\minecraft\client\Minecraft.java Wed Nov 23 00:09:14 2011
|
||||
@@ -1600,11 +1600,13 @@
|
||||
|
||||
this.field_6324_e.func_600_a(var6.field_22395_a + var10, 64, var6.field_22396_c + var8);
|
||||
if(!this.field_6327_b.func_35643_e()) {
|
||||
@@ -16,8 +16,8 @@ diff -r -U 3 minecraft\net\minecraft\client\Minecraft.java minecraft_patched\net
|
||||
}
|
||||
}
|
||||
diff -r -U 3 minecraft\net\minecraft\src\CodecMus.java minecraft_patched\net\minecraft\src\CodecMus.java
|
||||
--- minecraft\net\minecraft\src\CodecMus.java Fri Jan 13 17:44:20 2012
|
||||
+++ minecraft_patched\net\minecraft\src\CodecMus.java Fri Jan 13 17:35:06 2012
|
||||
--- minecraft\net\minecraft\src\CodecMus.java Tue Nov 22 23:21:36 2011
|
||||
+++ minecraft_patched\net\minecraft\src\CodecMus.java Wed Nov 23 00:09:14 2011
|
||||
@@ -1,5 +1,6 @@
|
||||
package net.minecraft.src;
|
||||
|
||||
@@ -39,8 +39,8 @@ diff -r -U 3 minecraft\net\minecraft\src\CodecMus.java minecraft_patched\net\min
|
||||
}
|
||||
}
|
||||
diff -r -U 3 minecraft\net\minecraft\src\ItemMap.java minecraft_patched\net\minecraft\src\ItemMap.java
|
||||
--- minecraft\net\minecraft\src\ItemMap.java Fri Jan 13 17:43:42 2012
|
||||
+++ minecraft_patched\net\minecraft\src\ItemMap.java Fri Jan 13 17:35:06 2012
|
||||
--- minecraft\net\minecraft\src\ItemMap.java Tue Nov 22 23:21:24 2011
|
||||
+++ minecraft_patched\net\minecraft\src\ItemMap.java Wed Nov 23 00:09:14 2011
|
||||
@@ -19,7 +19,6 @@
|
||||
}
|
||||
|
||||
@@ -58,8 +58,8 @@ diff -r -U 3 minecraft\net\minecraft\src\ItemMap.java minecraft_patched\net\mine
|
||||
if(var4 == null) {
|
||||
var1.func_28156_b(var2.func_28101_b("map"));
|
||||
diff -r -U 3 minecraft\net\minecraft\src\MusInputStream.java minecraft_patched\net\minecraft\src\MusInputStream.java
|
||||
--- minecraft\net\minecraft\src\MusInputStream.java Fri Jan 13 17:42:36 2012
|
||||
+++ minecraft_patched\net\minecraft\src\MusInputStream.java Fri Jan 13 17:35:06 2012
|
||||
--- minecraft\net\minecraft\src\MusInputStream.java Tue Nov 22 23:21:24 2011
|
||||
+++ minecraft_patched\net\minecraft\src\MusInputStream.java Wed Nov 23 00:09:14 2011
|
||||
@@ -1,5 +1,6 @@
|
||||
package net.minecraft.src;
|
||||
|
||||
@@ -82,8 +82,8 @@ diff -r -U 3 minecraft\net\minecraft\src\MusInputStream.java minecraft_patched\n
|
||||
for(int var4 = 0; var4 < var3; ++var4) {
|
||||
byte var5 = var1[var2 + var4] = (byte)(var1[var2 + var4] ^ this.field_1516_c >> 8);
|
||||
diff -r -U 3 minecraft\net\minecraft\src\RenderGlobal.java minecraft_patched\net\minecraft\src\RenderGlobal.java
|
||||
--- minecraft\net\minecraft\src\RenderGlobal.java Fri Jan 13 17:43:24 2012
|
||||
+++ minecraft_patched\net\minecraft\src\RenderGlobal.java Fri Jan 13 17:35:06 2012
|
||||
--- minecraft\net\minecraft\src\RenderGlobal.java Tue Nov 22 23:21:20 2011
|
||||
+++ minecraft_patched\net\minecraft\src\RenderGlobal.java Wed Nov 23 00:10:20 2011
|
||||
@@ -1466,7 +1466,7 @@
|
||||
double var15 = this.field_1439_t.field_22009_h.field_611_ak - var2;
|
||||
double var17 = this.field_1439_t.field_22009_h.field_610_al - var4;
|
||||
@@ -94,8 +94,8 @@ diff -r -U 3 minecraft\net\minecraft\src\RenderGlobal.java minecraft_patched\net
|
||||
this.field_1439_t.field_6321_h.func_1192_a(var21 = new EntityHugeExplodeFX(this.field_1448_k, var2, var4, var6, var8, var10, var12));
|
||||
} else if(var1.equals("largeexplode")) {
|
||||
diff -r -U 3 minecraft\net\minecraft\src\ThreadedFileIOBase.java minecraft_patched\net\minecraft\src\ThreadedFileIOBase.java
|
||||
--- minecraft\net\minecraft\src\ThreadedFileIOBase.java Fri Jan 13 17:43:00 2012
|
||||
+++ minecraft_patched\net\minecraft\src\ThreadedFileIOBase.java Fri Jan 13 17:35:06 2012
|
||||
--- minecraft\net\minecraft\src\ThreadedFileIOBase.java Tue Nov 22 23:21:30 2011
|
||||
+++ minecraft_patched\net\minecraft\src\ThreadedFileIOBase.java Wed Nov 23 00:09:14 2011
|
||||
@@ -21,7 +21,9 @@
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
+4
-4
@@ -1,6 +1,6 @@
|
||||
diff -r -U 3 minecraft_server\net\minecraft\src\ItemMap.java minecraft_server_patched\net\minecraft\src\ItemMap.java
|
||||
--- minecraft_server\net\minecraft\src\ItemMap.java Fri Jan 13 17:46:22 2012
|
||||
+++ minecraft_server_patched\net\minecraft\src\ItemMap.java Fri Jan 13 17:37:00 2012
|
||||
--- minecraft_server\net\minecraft\src\ItemMap.java Tue Nov 22 23:21:56 2011
|
||||
+++ minecraft_server_patched\net\minecraft\src\ItemMap.java Wed Nov 23 00:09:45 2011
|
||||
@@ -22,7 +22,6 @@
|
||||
}
|
||||
|
||||
@@ -11,8 +11,8 @@ diff -r -U 3 minecraft_server\net\minecraft\src\ItemMap.java minecraft_server_pa
|
||||
var1.func_28145_b(var2.func_28104_b("map"));
|
||||
diff -r -U 3 minecraft_server\net\minecraft\src\RConThreadClient.java minecraft_server_patched\net\minecraft\src\RConThreadClient.java
|
||||
diff -r -U 3 minecraft_server\net\minecraft\src\ThreadedFileIOBase.java minecraft_server_patched\net\minecraft\src\ThreadedFileIOBase.java
|
||||
--- minecraft_server\net\minecraft\src\ThreadedFileIOBase.java Fri Jan 13 17:45:20 2012
|
||||
+++ minecraft_server_patched\net\minecraft\src\ThreadedFileIOBase.java Fri Jan 13 17:37:00 2012
|
||||
--- minecraft_server\net\minecraft\src\ThreadedFileIOBase.java Tue Nov 22 23:22:10 2011
|
||||
+++ minecraft_server_patched\net\minecraft\src\ThreadedFileIOBase.java Wed Nov 23 00:09:45 2011
|
||||
@@ -21,7 +21,9 @@
|
||||
}
|
||||
|
||||
File renamed without changes.
@@ -182,8 +182,6 @@ net/minecraft/src/Packet8UpdateHealth.func_68_a(Ljava/io/DataOutputStream;)V=jav
|
||||
net/minecraft/src/Packet8UpdateHealth.func_70_a(Ljava/io/DataInputStream;)V=java/io/IOException
|
||||
net/minecraft/src/Packet9Respawn.func_68_a(Ljava/io/DataOutputStream;)V=java/io/IOException
|
||||
net/minecraft/src/Packet9Respawn.func_70_a(Ljava/io/DataInputStream;)V=java/io/IOException
|
||||
net/minecraft/src/Packet250CustomPayload.func_68_a(Ljava/io/DataOutputStream;)V=java/io/IOException
|
||||
net/minecraft/src/Packet250CustomPayload.func_70_a(Ljava/io/DataInputStream;)V=java/io/IOException
|
||||
net/minecraft/src/RConOutputStream.func_40393_a(I)V=java/io/IOException
|
||||
net/minecraft/src/RConOutputStream.func_40394_a(S)V=java/io/IOException
|
||||
net/minecraft/src/RConOutputStream.func_40396_a([B)V=java/io/IOException
|
||||
@@ -202,4 +200,3 @@ net/minecraft/src/RegionFile.func_22138_b(III)V=java/io/IOException
|
||||
net/minecraft/src/ThreadedChunkLoader.func_40325_a(Lnet/minecraft/src/ThreadedChunkLoaderPending;)V=java/io/IOException
|
||||
net/minecraft/src/ThreadedChunkLoader.func_659_a(Lnet/minecraft/src/World;II)Lnet/minecraft/src/Chunk;=java/io/IOException
|
||||
net/minecraft/src/ThreadedFileIOBase.func_40508_a()V=java/lang/InterruptedException
|
||||
net/minecraft/src/StringTranslate.func_44011_a(Ljava/util/Properties;Ljava/lang/String;)V=java/io/IOException
|
||||
@@ -0,0 +1,4 @@
|
||||
[VERSION]
|
||||
MCPVersion = 5.0
|
||||
ClientVersion = 1.0.0
|
||||
ServerVersion = 1.0.1
|
||||
@@ -1,15 +0,0 @@
|
||||
@cd ..
|
||||
|
||||
@rmdir /S /Q src
|
||||
@mkdir src
|
||||
xcopy /Y /E src_work\* src\
|
||||
xcopy /Y /E forge\forge_client\src\net\* src\minecraft\net
|
||||
xcopy /Y /E forge\forge_common\net\* src\minecraft\net
|
||||
xcopy /Y /E forge\forge_common\net\* src\minecraft_server\net
|
||||
|
||||
@cd forge
|
||||
@cmd /C inject_version.bat ../src/minecraft/net/minecraft/src/forge/ForgeHooks.java
|
||||
@cmd /C inject_version.bat ../src/minecraft_server/net/minecraft/src/forge/ForgeHooks.java
|
||||
@cd ..
|
||||
|
||||
@echo | call recompile.bat
|
||||
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
@@ -1,54 +0,0 @@
|
||||
diff -r -U 3 minecraft\net\minecraft\src\EntityMinecart.java minecraft_patched\net\minecraft\src\EntityMinecart.java
|
||||
--- minecraft\net\minecraft\src\EntityMinecart.java Sat Jan 14 16:05:10 2012
|
||||
+++ minecraft_patched\net\minecraft\src\EntityMinecart.java Sat Jan 14 16:07:41 2012
|
||||
@@ -811,7 +811,7 @@
|
||||
double d = entity.field_611_ak - field_611_ak;
|
||||
double d1 = entity.field_609_am - field_609_am;
|
||||
double d2 = d * d + d1 * d1;
|
||||
- if(d2 >= 9.9999997473787516E-05D)
|
||||
+ if(d2 >= 9.9999997473787516E-005D)
|
||||
{
|
||||
d2 = MathHelper.func_1109_a(d2);
|
||||
d /= d2;
|
||||
diff -r -U 3 minecraft\net\minecraft\src\RenderGlobal.java minecraft_patched\net\minecraft\src\RenderGlobal.java
|
||||
--- minecraft\net\minecraft\src\RenderGlobal.java Sat Jan 14 16:05:10 2012
|
||||
+++ minecraft_patched\net\minecraft\src\RenderGlobal.java Sat Jan 14 16:07:41 2012
|
||||
@@ -968,7 +968,7 @@
|
||||
f3 = f7;
|
||||
f4 = f8;
|
||||
}
|
||||
- float f6 = 0.0004882812F;
|
||||
+ float f6 = 0.0004882813F;
|
||||
double d = (float)field_1435_x + f;
|
||||
double d1 = field_1439_t.field_22009_h.field_9285_at + (field_1439_t.field_22009_h.field_611_ak - field_1439_t.field_22009_h.field_9285_at) * (double)f + d * 0.029999999329447746D;
|
||||
double d2 = field_1439_t.field_22009_h.field_9283_av + (field_1439_t.field_22009_h.field_609_am - field_1439_t.field_22009_h.field_9283_av) * (double)f;
|
||||
diff -r -U 3 minecraft\net\minecraft\src\Vec3D.java minecraft_patched\net\minecraft\src\Vec3D.java
|
||||
--- minecraft\net\minecraft\src\Vec3D.java Sat Jan 14 16:05:10 2012
|
||||
+++ minecraft_patched\net\minecraft\src\Vec3D.java Sat Jan 14 16:07:41 2012
|
||||
@@ -137,7 +137,7 @@
|
||||
double d1 = vec3d.field_1776_a - field_1776_a;
|
||||
double d2 = vec3d.field_1775_b - field_1775_b;
|
||||
double d3 = vec3d.field_1779_c - field_1779_c;
|
||||
- if(d1 * d1 < 1.0000000116860974E-07D)
|
||||
+ if(d1 * d1 < 1.0000000116860974E-007D)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
@@ -156,7 +156,7 @@
|
||||
double d1 = vec3d.field_1776_a - field_1776_a;
|
||||
double d2 = vec3d.field_1775_b - field_1775_b;
|
||||
double d3 = vec3d.field_1779_c - field_1779_c;
|
||||
- if(d2 * d2 < 1.0000000116860974E-07D)
|
||||
+ if(d2 * d2 < 1.0000000116860974E-007D)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
@@ -175,7 +175,7 @@
|
||||
double d1 = vec3d.field_1776_a - field_1776_a;
|
||||
double d2 = vec3d.field_1775_b - field_1775_b;
|
||||
double d3 = vec3d.field_1779_c - field_1779_c;
|
||||
- if(d3 * d3 < 1.0000000116860974E-07D)
|
||||
+ if(d3 * d3 < 1.0000000116860974E-007D)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
@@ -1,60 +0,0 @@
|
||||
diff -r -U 3 minecraft_server\net\minecraft\src\EntityMinecart.java minecraft_server_patched\net\minecraft\src\EntityMinecart.java
|
||||
--- minecraft_server\net\minecraft\src\EntityMinecart.java Sat Jan 14 16:05:25 2012
|
||||
+++ minecraft_server_patched\net\minecraft\src\EntityMinecart.java Sat Jan 14 16:07:50 2012
|
||||
@@ -751,7 +751,7 @@
|
||||
double d = entity.field_322_l - field_322_l;
|
||||
double d1 = entity.field_320_n - field_320_n;
|
||||
double d2 = d * d + d1 * d1;
|
||||
- if(d2 >= 9.9999997473787516E-05D)
|
||||
+ if(d2 >= 9.9999997473787516E-005D)
|
||||
{
|
||||
d2 = MathHelper.func_583_a(d2);
|
||||
d /= d2;
|
||||
diff -r -U 3 minecraft_server\net\minecraft\src\GuiStatsComponent.java minecraft_server_patched\net\minecraft\src\GuiStatsComponent.java
|
||||
--- minecraft_server\net\minecraft\src\GuiStatsComponent.java Sat Jan 14 16:05:25 2012
|
||||
+++ minecraft_server_patched\net\minecraft\src\GuiStatsComponent.java Sat Jan 14 16:07:50 2012
|
||||
@@ -43,12 +43,12 @@
|
||||
System.gc();
|
||||
field_768_c[0] = (new StringBuilder()).append("Memory use: ").append(l / 1024L / 1024L).append(" mb (").append((Runtime.getRuntime().freeMemory() * 100L) / Runtime.getRuntime().maxMemory()).append("% free)").toString();
|
||||
field_768_c[1] = (new StringBuilder()).append("Threads: ").append(NetworkManager.field_1052_b).append(" + ").append(NetworkManager.field_1051_c).toString();
|
||||
- field_768_c[2] = (new StringBuilder()).append("Avg tick: ").append(field_40573_a.format(func_40571_a(field_40572_e.field_40027_f) * 9.9999999999999995E-07D)).append(" ms").toString();
|
||||
+ field_768_c[2] = (new StringBuilder()).append("Avg tick: ").append(field_40573_a.format(func_40571_a(field_40572_e.field_40027_f) * 9.9999999999999995E-007D)).append(" ms").toString();
|
||||
i = 0;
|
||||
_L3:
|
||||
if(i >= field_40572_e.field_6034_e.length) goto _L2; else goto _L1
|
||||
_L1:
|
||||
- field_768_c[3 + i] = (new StringBuilder()).append("Lvl ").append(i).append(" tick: ").append(field_40573_a.format(func_40571_a(field_40572_e.field_40028_g[i]) * 9.9999999999999995E-07D)).append(" ms").toString();
|
||||
+ field_768_c[3 + i] = (new StringBuilder()).append("Lvl ").append(i).append(" tick: ").append(field_40573_a.format(func_40571_a(field_40572_e.field_40028_g[i]) * 9.9999999999999995E-007D)).append(" ms").toString();
|
||||
if(field_40572_e.field_6034_e[i] == null || field_40572_e.field_6034_e[i].field_20911_y == null)
|
||||
{
|
||||
continue; /* Loop/switch isn't completed */
|
||||
diff -r -U 3 minecraft_server\net\minecraft\src\Vec3D.java minecraft_server_patched\net\minecraft\src\Vec3D.java
|
||||
--- minecraft_server\net\minecraft\src\Vec3D.java Sat Jan 14 16:05:25 2012
|
||||
+++ minecraft_server_patched\net\minecraft\src\Vec3D.java Sat Jan 14 16:07:50 2012
|
||||
@@ -121,7 +121,7 @@
|
||||
double d1 = vec3d.field_1055_a - field_1055_a;
|
||||
double d2 = vec3d.field_1054_b - field_1054_b;
|
||||
double d3 = vec3d.field_1058_c - field_1058_c;
|
||||
- if(d1 * d1 < 1.0000000116860974E-07D)
|
||||
+ if(d1 * d1 < 1.0000000116860974E-007D)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
@@ -140,7 +140,7 @@
|
||||
double d1 = vec3d.field_1055_a - field_1055_a;
|
||||
double d2 = vec3d.field_1054_b - field_1054_b;
|
||||
double d3 = vec3d.field_1058_c - field_1058_c;
|
||||
- if(d2 * d2 < 1.0000000116860974E-07D)
|
||||
+ if(d2 * d2 < 1.0000000116860974E-007D)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
@@ -159,7 +159,7 @@
|
||||
double d1 = vec3d.field_1055_a - field_1055_a;
|
||||
double d2 = vec3d.field_1054_b - field_1054_b;
|
||||
double d3 = vec3d.field_1058_c - field_1058_c;
|
||||
- if(d3 * d3 < 1.0000000116860974E-07D)
|
||||
+ if(d3 * d3 < 1.0000000116860974E-007D)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
[VERSION]
|
||||
MCPVersion = 5.6
|
||||
ClientVersion = 1.1
|
||||
ServerVersion = 1.1
|
||||
@@ -1,123 +0,0 @@
|
||||
package net.minecraft.src.forge;
|
||||
|
||||
import org.lwjgl.input.Mouse;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.src.GameSettings;
|
||||
import net.minecraft.src.GuiControls;
|
||||
import net.minecraft.src.GuiSlot;
|
||||
import net.minecraft.src.KeyBinding;
|
||||
import net.minecraft.src.Tessellator;
|
||||
|
||||
public class GuiControlsScrollPanel extends GuiSlot
|
||||
{
|
||||
private GuiControls controls;
|
||||
private GameSettings options;
|
||||
private Minecraft mc;
|
||||
private String[] message;
|
||||
private int mouseX;
|
||||
private int mouseY;
|
||||
private int selected = -1;
|
||||
|
||||
public GuiControlsScrollPanel(GuiControls controls, GameSettings options, Minecraft mc)
|
||||
{
|
||||
super(mc, controls.width, controls.height, 16, (controls.height - 32) + 4, 25);
|
||||
this.controls = controls;
|
||||
this.options = options;
|
||||
this.mc = mc;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getSize() {
|
||||
return options.keyBindings.length;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void elementClicked(int i, boolean flag)
|
||||
{
|
||||
if (!flag)
|
||||
{
|
||||
if (selected == -1)
|
||||
{
|
||||
selected = i;
|
||||
}
|
||||
else
|
||||
{
|
||||
options.setKeyBinding(selected, -100);
|
||||
selected = -1;
|
||||
KeyBinding.resetKeyBindingArrayAndHash();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean isSelected(int i)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawBackground() {}
|
||||
|
||||
@Override
|
||||
public void drawScreen(int mX, int mY, float f)
|
||||
{
|
||||
mouseX = mX;
|
||||
mouseY = mY;
|
||||
|
||||
if (selected != -1 && !Mouse.isButtonDown(0) && Mouse.getDWheel() == 0)
|
||||
{
|
||||
if (Mouse.next() && Mouse.getEventButtonState())
|
||||
{
|
||||
System.out.println(Mouse.getEventButton());
|
||||
options.setKeyBinding(selected, -100 + Mouse.getEventButton());
|
||||
selected = -1;
|
||||
KeyBinding.resetKeyBindingArrayAndHash();
|
||||
}
|
||||
}
|
||||
|
||||
super.drawScreen(mX, mY, f);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawSlot(int index, int xPosition, int yPosition, int l, Tessellator tessellator)
|
||||
{
|
||||
int width = 70;
|
||||
int height = 20;
|
||||
xPosition -= 20;
|
||||
boolean flag = mouseX >= xPosition && mouseY >= yPosition && mouseX < xPosition + width && mouseY < yPosition + height;
|
||||
int k = (flag ? 2 : 1);
|
||||
|
||||
GL11.glBindTexture(3553 /*GL_TEXTURE_2D*/, mc.renderEngine.getTexture("/gui/gui.png"));
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
controls.drawTexturedModalRect(xPosition, yPosition, 0, 46 + k * 20, width / 2, height);
|
||||
controls.drawTexturedModalRect(xPosition + width / 2, yPosition, 200 - width / 2, 46 + k * 20, width / 2, height);
|
||||
controls.drawString(mc.fontRenderer, options.getKeyBindingDescription(index), xPosition + width + 4, yPosition + 6, 0xFFFFFFFF);
|
||||
|
||||
boolean conflict = false;
|
||||
for (int x = 0; x < options.keyBindings.length; x++)
|
||||
{
|
||||
if (x != index && options.keyBindings[x].keyCode == options.keyBindings[index].keyCode)
|
||||
{
|
||||
conflict = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
String str = (conflict ? "\247c" : "") + options.getOptionDisplayString(index);
|
||||
str = (index == selected ? "\247f> \247e??? \247f<" : str);
|
||||
controls.drawCenteredString(mc.fontRenderer, str, xPosition + (width / 2), yPosition + (height - 8) / 2, 0xFFFFFFFF);
|
||||
}
|
||||
|
||||
public boolean keyTyped(char c, int i)
|
||||
{
|
||||
if (selected != -1)
|
||||
{
|
||||
options.setKeyBinding(selected, i);
|
||||
selected = -1;
|
||||
KeyBinding.resetKeyBindingArrayAndHash();
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
@echo off
|
||||
setlocal enableextensions enabledelayedexpansion
|
||||
FOR /F "tokens=1-4" %%A IN (version.txt) DO (
|
||||
set major=%%A
|
||||
set minor=%%B
|
||||
set revision=%%C
|
||||
set build=%%D
|
||||
)
|
||||
set file=%*
|
||||
|
||||
echo Injecting Revision !major!.!minor!.!revision!.!build! %file%
|
||||
|
||||
set PATH=.\bin;%PATH%
|
||||
sed s/majorVersion=0/majorVersion=!major!/ <!file! | ^
|
||||
sed s/minorVersion=0/minorVersion=!minor!/ | ^
|
||||
sed s/revisionVersion=0/revisionVersion=!revision!/ | ^
|
||||
sed s/buildVersion=0/buildVersion=!build!/ | ^
|
||||
tr -d '\r' >!file!.tmp
|
||||
|
||||
mv "!file!.tmp" "!file!"
|
||||
@@ -1,14 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
target=$1
|
||||
read major minor rev build <version.txt
|
||||
|
||||
echo Injecting Revision $major.$minor.$rev.$build $target
|
||||
|
||||
sed s/majorVersion=0/majorVersion=$major/ <$target | \
|
||||
sed s/minorVersion=0/minorVersion=$minor/ | \
|
||||
sed s/revisionVersion=0/revisionVersion=$rev/ | \
|
||||
sed s/buildVersion=0/buildVersion=$build/ | \
|
||||
tr -d '\r' > $target.tmp
|
||||
|
||||
mv $target.tmp $target
|
||||
@@ -1,119 +0,0 @@
|
||||
--- ../src_base/minecraft/net/minecraft/src/BlockButton.java 0000-00-00 00:00:00.000000000 -0000
|
||||
+++ ../src_work/minecraft/net/minecraft/src/BlockButton.java 0000-00-00 00:00:00.000000000 -0000
|
||||
@@ -32,36 +32,36 @@
|
||||
|
||||
public boolean canPlaceBlockOnSide(World world, int i, int j, int k, int l)
|
||||
{
|
||||
- if (l == 2 && world.isBlockNormalCube(i, j, k + 1))
|
||||
+ if (l == 2 && world.isBlockSolidOnSide(i, j, k + 1, 2))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
- if (l == 3 && world.isBlockNormalCube(i, j, k - 1))
|
||||
+ if (l == 3 && world.isBlockSolidOnSide(i, j, k - 1, 3))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
- if (l == 4 && world.isBlockNormalCube(i + 1, j, k))
|
||||
+ if (l == 4 && world.isBlockSolidOnSide(i + 1, j, k, 4))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
- return l == 5 && world.isBlockNormalCube(i - 1, j, k);
|
||||
+ return l == 5 && world.isBlockSolidOnSide(i - 1, j, k, 5);
|
||||
}
|
||||
|
||||
public boolean canPlaceBlockAt(World world, int i, int j, int k)
|
||||
{
|
||||
- if (world.isBlockNormalCube(i - 1, j, k))
|
||||
+ if (world.isBlockSolidOnSide(i - 1, j, k, 5))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
- if (world.isBlockNormalCube(i + 1, j, k))
|
||||
+ if (world.isBlockSolidOnSide(i + 1, j, k, 4))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
- if (world.isBlockNormalCube(i, j, k - 1))
|
||||
+ if (world.isBlockSolidOnSide(i, j, k - 1, 3))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
- return world.isBlockNormalCube(i, j, k + 1);
|
||||
+ return world.isBlockSolidOnSide(i, j, k + 1, 2);
|
||||
}
|
||||
|
||||
public void onBlockPlaced(World world, int i, int j, int k, int l)
|
||||
@@ -69,19 +69,19 @@
|
||||
int i1 = world.getBlockMetadata(i, j, k);
|
||||
int j1 = i1 & 8;
|
||||
i1 &= 7;
|
||||
- if (l == 2 && world.isBlockNormalCube(i, j, k + 1))
|
||||
+ if (l == 2 && world.isBlockSolidOnSide(i, j, k + 1, 2))
|
||||
{
|
||||
i1 = 4;
|
||||
}
|
||||
- else if (l == 3 && world.isBlockNormalCube(i, j, k - 1))
|
||||
+ else if (l == 3 && world.isBlockSolidOnSide(i, j, k - 1, 3))
|
||||
{
|
||||
i1 = 3;
|
||||
}
|
||||
- else if (l == 4 && world.isBlockNormalCube(i + 1, j, k))
|
||||
+ else if (l == 4 && world.isBlockSolidOnSide(i + 1, j, k, 4))
|
||||
{
|
||||
i1 = 2;
|
||||
}
|
||||
- else if (l == 5 && world.isBlockNormalCube(i - 1, j, k))
|
||||
+ else if (l == 5 && world.isBlockSolidOnSide(i - 1, j, k, 5))
|
||||
{
|
||||
i1 = 1;
|
||||
}
|
||||
@@ -94,19 +94,19 @@
|
||||
|
||||
private int getOrientation(World world, int i, int j, int k)
|
||||
{
|
||||
- if (world.isBlockNormalCube(i - 1, j, k))
|
||||
+ if (world.isBlockSolidOnSide(i - 1, j, k, 5))
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
- if (world.isBlockNormalCube(i + 1, j, k))
|
||||
+ if (world.isBlockSolidOnSide(i + 1, j, k, 4))
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
- if (world.isBlockNormalCube(i, j, k - 1))
|
||||
+ if (world.isBlockSolidOnSide(i, j, k - 1, 3))
|
||||
{
|
||||
return 3;
|
||||
}
|
||||
- return !world.isBlockNormalCube(i, j, k + 1) ? 1 : 4;
|
||||
+ return !world.isBlockSolidOnSide(i, j, k + 1, 2) ? 1 : 4;
|
||||
}
|
||||
|
||||
public void onNeighborBlockChange(World world, int i, int j, int k, int l)
|
||||
@@ -115,19 +115,19 @@
|
||||
{
|
||||
int i1 = world.getBlockMetadata(i, j, k) & 7;
|
||||
boolean flag = false;
|
||||
- if (!world.isBlockNormalCube(i - 1, j, k) && i1 == 1)
|
||||
+ if (!world.isBlockSolidOnSide(i - 1, j, k, 5) && i1 == 1)
|
||||
{
|
||||
flag = true;
|
||||
}
|
||||
- if (!world.isBlockNormalCube(i + 1, j, k) && i1 == 2)
|
||||
+ if (!world.isBlockSolidOnSide(i + 1, j, k, 4) && i1 == 2)
|
||||
{
|
||||
flag = true;
|
||||
}
|
||||
- if (!world.isBlockNormalCube(i, j, k - 1) && i1 == 3)
|
||||
+ if (!world.isBlockSolidOnSide(i, j, k - 1, 3) && i1 == 3)
|
||||
{
|
||||
flag = true;
|
||||
}
|
||||
- if (!world.isBlockNormalCube(i, j, k + 1) && i1 == 4)
|
||||
+ if (!world.isBlockSolidOnSide(i, j, k + 1, 2) && i1 == 4)
|
||||
{
|
||||
flag = true;
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
--- ../src_base/minecraft/net/minecraft/src/BlockChest.java 0000-00-00 00:00:00.000000000 -0000
|
||||
+++ ../src_work/minecraft/net/minecraft/src/BlockChest.java 0000-00-00 00:00:00.000000000 -0000
|
||||
@@ -424,23 +424,23 @@
|
||||
{
|
||||
return true;
|
||||
}
|
||||
- if (world.isBlockNormalCube(i, j + 1, k))
|
||||
+ if (world.isBlockSolidOnSide(i, j + 1, k, 0))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
- if (world.getBlockId(i - 1, j, k) == blockID && world.isBlockNormalCube(i - 1, j + 1, k))
|
||||
+ if (world.getBlockId(i - 1, j, k) == blockID && world.isBlockSolidOnSide(i - 1, j + 1, k, 0))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
- if (world.getBlockId(i + 1, j, k) == blockID && world.isBlockNormalCube(i + 1, j + 1, k))
|
||||
+ if (world.getBlockId(i + 1, j, k) == blockID && world.isBlockSolidOnSide(i + 1, j + 1, k, 0))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
- if (world.getBlockId(i, j, k - 1) == blockID && world.isBlockNormalCube(i, j + 1, k - 1))
|
||||
+ if (world.getBlockId(i, j, k - 1) == blockID && world.isBlockSolidOnSide(i, j + 1, k - 1, 0))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
- if (world.getBlockId(i, j, k + 1) == blockID && world.isBlockNormalCube(i, j + 1, k + 1))
|
||||
+ if (world.getBlockId(i, j, k + 1) == blockID && world.isBlockSolidOnSide(i, j + 1, k + 1, 0))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@@ -1,93 +0,0 @@
|
||||
--- ../src_base/minecraft/net/minecraft/src/BlockLadder.java 0000-00-00 00:00:00.000000000 -0000
|
||||
+++ ../src_work/minecraft/net/minecraft/src/BlockLadder.java 0000-00-00 00:00:00.000000000 -0000
|
||||
@@ -35,7 +35,7 @@
|
||||
setBlockBounds(0.0F, 0.0F, 0.0F, f, 1.0F, 1.0F);
|
||||
}
|
||||
return super.getSelectedBoundingBoxFromPool(world, i, j, k);
|
||||
- }
|
||||
+ }
|
||||
|
||||
public boolean isOpaqueCube()
|
||||
{
|
||||
@@ -54,37 +54,37 @@
|
||||
|
||||
public boolean canPlaceBlockAt(World world, int i, int j, int k)
|
||||
{
|
||||
- if (world.isBlockNormalCube(i - 1, j, k))
|
||||
+ if (world.isBlockSolidOnSide(i - 1, j, k, 5))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
- if (world.isBlockNormalCube(i + 1, j, k))
|
||||
+ if (world.isBlockSolidOnSide(i + 1, j, k, 4))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
- if (world.isBlockNormalCube(i, j, k - 1))
|
||||
+ if (world.isBlockSolidOnSide(i, j, k - 1, 3))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
- return world.isBlockNormalCube(i, j, k + 1);
|
||||
+ return world.isBlockSolidOnSide(i, j, k + 1, 2);
|
||||
}
|
||||
|
||||
public void onBlockPlaced(World world, int i, int j, int k, int l)
|
||||
{
|
||||
int i1 = world.getBlockMetadata(i, j, k);
|
||||
- if ((i1 == 0 || l == 2) && world.isBlockNormalCube(i, j, k + 1))
|
||||
+ if ((i1 == 0 || l == 2) && world.isBlockSolidOnSide(i, j, k + 1, 2))
|
||||
{
|
||||
i1 = 2;
|
||||
}
|
||||
- if ((i1 == 0 || l == 3) && world.isBlockNormalCube(i, j, k - 1))
|
||||
+ if ((i1 == 0 || l == 3) && world.isBlockSolidOnSide(i, j, k - 1, 3))
|
||||
{
|
||||
i1 = 3;
|
||||
}
|
||||
- if ((i1 == 0 || l == 4) && world.isBlockNormalCube(i + 1, j, k))
|
||||
+ if ((i1 == 0 || l == 4) && world.isBlockSolidOnSide(i + 1, j, k, 4))
|
||||
{
|
||||
i1 = 4;
|
||||
}
|
||||
- if ((i1 == 0 || l == 5) && world.isBlockNormalCube(i - 1, j, k))
|
||||
+ if ((i1 == 0 || l == 5) && world.isBlockSolidOnSide(i - 1, j, k, 5))
|
||||
{
|
||||
i1 = 5;
|
||||
}
|
||||
@@ -95,19 +95,19 @@
|
||||
{
|
||||
int i1 = world.getBlockMetadata(i, j, k);
|
||||
boolean flag = false;
|
||||
- if (i1 == 2 && world.isBlockNormalCube(i, j, k + 1))
|
||||
+ if (i1 == 2 && world.isBlockSolidOnSide(i, j, k + 1, 2))
|
||||
{
|
||||
flag = true;
|
||||
}
|
||||
- if (i1 == 3 && world.isBlockNormalCube(i, j, k - 1))
|
||||
+ if (i1 == 3 && world.isBlockSolidOnSide(i, j, k - 1, 3))
|
||||
{
|
||||
flag = true;
|
||||
}
|
||||
- if (i1 == 4 && world.isBlockNormalCube(i + 1, j, k))
|
||||
+ if (i1 == 4 && world.isBlockSolidOnSide(i + 1, j, k, 4))
|
||||
{
|
||||
flag = true;
|
||||
}
|
||||
- if (i1 == 5 && world.isBlockNormalCube(i - 1, j, k))
|
||||
+ if (i1 == 5 && world.isBlockSolidOnSide(i - 1, j, k, 5))
|
||||
{
|
||||
flag = true;
|
||||
}
|
||||
@@ -123,4 +123,11 @@
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
+
|
||||
+ /* FORGE: Implemented base method, see Block.isLadder */
|
||||
+ @Override
|
||||
+ public boolean isLadder(World world, int X, int Y, int Z)
|
||||
+ {
|
||||
+ return true;
|
||||
+ }
|
||||
}
|
||||
@@ -1,120 +0,0 @@
|
||||
--- ../src_base/minecraft/net/minecraft/src/BlockLever.java 0000-00-00 00:00:00.000000000 -0000
|
||||
+++ ../src_work/minecraft/net/minecraft/src/BlockLever.java 0000-00-00 00:00:00.000000000 -0000
|
||||
@@ -31,44 +31,44 @@
|
||||
|
||||
public boolean canPlaceBlockOnSide(World world, int i, int j, int k, int l)
|
||||
{
|
||||
- if (l == 1 && world.isBlockNormalCube(i, j - 1, k))
|
||||
+ if (l == 1 && world.isBlockSolidOnSide(i, j - 1, k, 1))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
- if (l == 2 && world.isBlockNormalCube(i, j, k + 1))
|
||||
+ if (l == 2 && world.isBlockSolidOnSide(i, j, k + 1, 2))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
- if (l == 3 && world.isBlockNormalCube(i, j, k - 1))
|
||||
+ if (l == 3 && world.isBlockSolidOnSide(i, j, k - 1, 3))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
- if (l == 4 && world.isBlockNormalCube(i + 1, j, k))
|
||||
+ if (l == 4 && world.isBlockSolidOnSide(i + 1, j, k, 4))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
- return l == 5 && world.isBlockNormalCube(i - 1, j, k);
|
||||
+ return l == 5 && world.isBlockSolidOnSide(i - 1, j, k, 5);
|
||||
}
|
||||
|
||||
public boolean canPlaceBlockAt(World world, int i, int j, int k)
|
||||
{
|
||||
- if (world.isBlockNormalCube(i - 1, j, k))
|
||||
+ if (world.isBlockSolidOnSide(i - 1, j, k, 5))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
- if (world.isBlockNormalCube(i + 1, j, k))
|
||||
+ if (world.isBlockSolidOnSide(i + 1, j, k, 4))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
- if (world.isBlockNormalCube(i, j, k - 1))
|
||||
+ if (world.isBlockSolidOnSide(i, j, k - 1, 3))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
- if (world.isBlockNormalCube(i, j, k + 1))
|
||||
+ if (world.isBlockSolidOnSide(i, j, k + 1, 2))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
- return world.isBlockNormalCube(i, j - 1, k);
|
||||
+ return world.isBlockSolidOnSide(i, j - 1, k, 1);
|
||||
}
|
||||
|
||||
public void onBlockPlaced(World world, int i, int j, int k, int l)
|
||||
@@ -77,23 +77,23 @@
|
||||
int j1 = i1 & 8;
|
||||
i1 &= 7;
|
||||
i1 = -1;
|
||||
- if (l == 1 && world.isBlockNormalCube(i, j - 1, k))
|
||||
+ if (l == 1 && world.isBlockSolidOnSide(i, j - 1, k, 1))
|
||||
{
|
||||
i1 = 5 + world.rand.nextInt(2);
|
||||
}
|
||||
- if (l == 2 && world.isBlockNormalCube(i, j, k + 1))
|
||||
+ if (l == 2 && world.isBlockSolidOnSide(i, j, k + 1, 2))
|
||||
{
|
||||
i1 = 4;
|
||||
}
|
||||
- if (l == 3 && world.isBlockNormalCube(i, j, k - 1))
|
||||
+ if (l == 3 && world.isBlockSolidOnSide(i, j, k - 1, 3))
|
||||
{
|
||||
i1 = 3;
|
||||
}
|
||||
- if (l == 4 && world.isBlockNormalCube(i + 1, j, k))
|
||||
+ if (l == 4 && world.isBlockSolidOnSide(i + 1, j, k, 4))
|
||||
{
|
||||
i1 = 2;
|
||||
}
|
||||
- if (l == 5 && world.isBlockNormalCube(i - 1, j, k))
|
||||
+ if (l == 5 && world.isBlockSolidOnSide(i - 1, j, k, 5))
|
||||
{
|
||||
i1 = 1;
|
||||
}
|
||||
@@ -116,27 +116,27 @@
|
||||
{
|
||||
int i1 = world.getBlockMetadata(i, j, k) & 7;
|
||||
boolean flag = false;
|
||||
- if (!world.isBlockNormalCube(i - 1, j, k) && i1 == 1)
|
||||
+ if (!world.isBlockSolidOnSide(i - 1, j, k, 5) && i1 == 1)
|
||||
{
|
||||
flag = true;
|
||||
}
|
||||
- if (!world.isBlockNormalCube(i + 1, j, k) && i1 == 2)
|
||||
+ if (!world.isBlockSolidOnSide(i + 1, j, k, 4) && i1 == 2)
|
||||
{
|
||||
flag = true;
|
||||
}
|
||||
- if (!world.isBlockNormalCube(i, j, k - 1) && i1 == 3)
|
||||
+ if (!world.isBlockSolidOnSide(i, j, k - 1, 3) && i1 == 3)
|
||||
{
|
||||
flag = true;
|
||||
}
|
||||
- if (!world.isBlockNormalCube(i, j, k + 1) && i1 == 4)
|
||||
+ if (!world.isBlockSolidOnSide(i, j, k + 1, 2) && i1 == 4)
|
||||
{
|
||||
flag = true;
|
||||
}
|
||||
- if (!world.isBlockNormalCube(i, j - 1, k) && i1 == 5)
|
||||
+ if (!world.isBlockSolidOnSide(i, j - 1, k, 1) && i1 == 5)
|
||||
{
|
||||
flag = true;
|
||||
}
|
||||
- if (!world.isBlockNormalCube(i, j - 1, k) && i1 == 6)
|
||||
+ if (!world.isBlockSolidOnSide(i, j - 1, k, 1) && i1 == 6)
|
||||
{
|
||||
flag = true;
|
||||
}
|
||||
@@ -1,43 +0,0 @@
|
||||
--- ../src_base/minecraft/net/minecraft/src/BlockNetherStalk.java 0000-00-00 00:00:00.000000000 -0000
|
||||
+++ ../src_work/minecraft/net/minecraft/src/BlockNetherStalk.java 0000-00-00 00:00:00.000000000 -0000
|
||||
@@ -1,5 +1,6 @@
|
||||
package net.minecraft.src;
|
||||
|
||||
+import java.util.ArrayList;
|
||||
import java.util.Random;
|
||||
|
||||
public class BlockNetherStalk extends BlockFlower
|
||||
@@ -57,25 +58,24 @@
|
||||
return 6;
|
||||
}
|
||||
|
||||
- public void dropBlockAsItemWithChance(World world, int i, int j, int k, int l, float f, int i1)
|
||||
+ @Override
|
||||
+ public ArrayList<ItemStack> getBlockDropped(World world, int i, int j, int k, int meta, int fortune)
|
||||
{
|
||||
- if (world.isRemote)
|
||||
- {
|
||||
- return;
|
||||
- }
|
||||
+ ArrayList<ItemStack> ret = new ArrayList<ItemStack>();
|
||||
int j1 = 1;
|
||||
- if (l >= 3)
|
||||
+ if (meta >= 3)
|
||||
{
|
||||
j1 = 2 + world.rand.nextInt(3);
|
||||
- if (i1 > 0)
|
||||
+ if (fortune > 0)
|
||||
{
|
||||
- j1 += world.rand.nextInt(i1 + 1);
|
||||
+ j1 += world.rand.nextInt(fortune + 1);
|
||||
}
|
||||
}
|
||||
for (int k1 = 0; k1 < j1; k1++)
|
||||
{
|
||||
- dropBlockAsItem_do(world, i, j, k, new ItemStack(Item.netherStalkSeeds));
|
||||
+ ret.add(new ItemStack(Item.netherStalkSeeds));
|
||||
}
|
||||
+ return ret;
|
||||
}
|
||||
|
||||
public int idDropped(int i, Random random, int j)
|
||||
@@ -1,33 +0,0 @@
|
||||
--- ../src_base/minecraft/net/minecraft/src/BlockRedstoneWire.java 0000-00-00 00:00:00.000000000 -0000
|
||||
+++ ../src_work/minecraft/net/minecraft/src/BlockRedstoneWire.java 0000-00-00 00:00:00.000000000 -0000
|
||||
@@ -2,6 +2,8 @@
|
||||
|
||||
import java.util.*;
|
||||
|
||||
+import net.minecraft.src.forge.IConnectRedstone;
|
||||
+
|
||||
public class BlockRedstoneWire extends Block
|
||||
{
|
||||
private boolean wiresProvidePower;
|
||||
@@ -47,7 +49,7 @@
|
||||
|
||||
public boolean canPlaceBlockAt(World world, int i, int j, int k)
|
||||
{
|
||||
- return world.isBlockNormalCube(i, j - 1, k);
|
||||
+ return world.isBlockSolidOnSide(i, j - 1, k, 1);
|
||||
}
|
||||
|
||||
private void updateAndPropagateCurrentStrength(World world, int i, int j, int k)
|
||||
@@ -467,6 +469,12 @@
|
||||
int j1 = iblockaccess.getBlockMetadata(i, j, k);
|
||||
return l == (j1 & 3) || l == Direction.footInvisibleFaceRemap[j1 & 3];
|
||||
}
|
||||
+
|
||||
+ if (Block.blocksList[i1] instanceof IConnectRedstone)
|
||||
+ {
|
||||
+ return ((IConnectRedstone)Block.blocksList[i1]).canConnectRedstone(iblockaccess, i, j, k, l);
|
||||
+ }
|
||||
+
|
||||
return Block.blocksList[i1].canProvidePower() && l != -1;
|
||||
}
|
||||
|
||||
@@ -1,53 +0,0 @@
|
||||
--- ../src_base/minecraft/net/minecraft/src/BlockTallGrass.java 0000-00-00 00:00:00.000000000 -0000
|
||||
+++ ../src_work/minecraft/net/minecraft/src/BlockTallGrass.java 0000-00-00 00:00:00.000000000 -0000
|
||||
@@ -1,7 +1,10 @@
|
||||
package net.minecraft.src;
|
||||
|
||||
+import java.util.ArrayList;
|
||||
import java.util.Random;
|
||||
|
||||
+import net.minecraft.src.forge.ForgeHooks;
|
||||
+
|
||||
public class BlockTallGrass extends BlockFlower
|
||||
{
|
||||
protected BlockTallGrass(int i, int j)
|
||||
@@ -65,14 +68,7 @@
|
||||
|
||||
public int idDropped(int i, Random random, int j)
|
||||
{
|
||||
- if (random.nextInt(8) == 0)
|
||||
- {
|
||||
- return Item.seeds.shiftedIndex;
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- return -1;
|
||||
- }
|
||||
+ return -1;
|
||||
}
|
||||
|
||||
public int quantityDroppedWithBonus(int i, Random random)
|
||||
@@ -80,6 +76,23 @@
|
||||
return 1 + random.nextInt(i * 2 + 1);
|
||||
}
|
||||
|
||||
+ @Override
|
||||
+ public ArrayList<ItemStack> getBlockDropped(World world, int i, int j, int k, int md, int fortune)
|
||||
+ {
|
||||
+ ArrayList<ItemStack> ret = new ArrayList<ItemStack>();
|
||||
+ if (world.rand.nextInt(8) != 0)
|
||||
+ {
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ ItemStack item = ForgeHooks.getGrassSeed(world);
|
||||
+ if (item != null)
|
||||
+ {
|
||||
+ ret.add(item);
|
||||
+ }
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
public void harvestBlock(World world, EntityPlayer entityplayer, int i, int j, int k, int l)
|
||||
{
|
||||
if (!world.isRemote && entityplayer.getCurrentEquippedItem() != null && entityplayer.getCurrentEquippedItem().itemID == Item.shears.shiftedIndex)
|
||||
@@ -1,107 +0,0 @@
|
||||
--- ../src_base/minecraft/net/minecraft/src/BlockTorch.java 0000-00-00 00:00:00.000000000 -0000
|
||||
+++ ../src_work/minecraft/net/minecraft/src/BlockTorch.java 0000-00-00 00:00:00.000000000 -0000
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
private boolean canPlaceTorchOn(World world, int i, int j, int k)
|
||||
{
|
||||
- if (world.isBlockNormalCubeDefault(i, j, k, true))
|
||||
+ if (world.isBlockSolidOnSide(i, j, k, 1))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@@ -45,19 +45,19 @@
|
||||
|
||||
public boolean canPlaceBlockAt(World world, int i, int j, int k)
|
||||
{
|
||||
- if (world.isBlockNormalCubeDefault(i - 1, j, k, true))
|
||||
+ if (world.isBlockSolidOnSide(i - 1, j, k, 5))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
- if (world.isBlockNormalCubeDefault(i + 1, j, k, true))
|
||||
+ if (world.isBlockSolidOnSide(i + 1, j, k, 4))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
- if (world.isBlockNormalCubeDefault(i, j, k - 1, true))
|
||||
+ if (world.isBlockSolidOnSide(i, j, k - 1, 3))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
- if (world.isBlockNormalCubeDefault(i, j, k + 1, true))
|
||||
+ if (world.isBlockSolidOnSide(i, j, k + 1, 2))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@@ -71,19 +71,19 @@
|
||||
{
|
||||
i1 = 5;
|
||||
}
|
||||
- if (l == 2 && world.isBlockNormalCubeDefault(i, j, k + 1, true))
|
||||
+ if (l == 2 && world.isBlockSolidOnSide(i, j, k + 1, 2))
|
||||
{
|
||||
i1 = 4;
|
||||
}
|
||||
- if (l == 3 && world.isBlockNormalCubeDefault(i, j, k - 1, true))
|
||||
+ if (l == 3 && world.isBlockSolidOnSide(i, j, k - 1, 3))
|
||||
{
|
||||
i1 = 3;
|
||||
}
|
||||
- if (l == 4 && world.isBlockNormalCubeDefault(i + 1, j, k, true))
|
||||
+ if (l == 4 && world.isBlockSolidOnSide(i + 1, j, k, 4))
|
||||
{
|
||||
i1 = 2;
|
||||
}
|
||||
- if (l == 5 && world.isBlockNormalCubeDefault(i - 1, j, k, true))
|
||||
+ if (l == 5 && world.isBlockSolidOnSide(i - 1, j, k, 5))
|
||||
{
|
||||
i1 = 1;
|
||||
}
|
||||
@@ -101,19 +101,19 @@
|
||||
|
||||
public void onBlockAdded(World world, int i, int j, int k)
|
||||
{
|
||||
- if (world.isBlockNormalCubeDefault(i - 1, j, k, true))
|
||||
+ if (world.isBlockSolidOnSide(i - 1, j, k, 5))
|
||||
{
|
||||
world.setBlockMetadataWithNotify(i, j, k, 1);
|
||||
}
|
||||
- else if (world.isBlockNormalCubeDefault(i + 1, j, k, true))
|
||||
+ else if (world.isBlockSolidOnSide(i + 1, j, k, 4))
|
||||
{
|
||||
world.setBlockMetadataWithNotify(i, j, k, 2);
|
||||
}
|
||||
- else if (world.isBlockNormalCubeDefault(i, j, k - 1, true))
|
||||
+ else if (world.isBlockSolidOnSide(i, j, k - 1, 3))
|
||||
{
|
||||
world.setBlockMetadataWithNotify(i, j, k, 3);
|
||||
}
|
||||
- else if (world.isBlockNormalCubeDefault(i, j, k + 1, true))
|
||||
+ else if (world.isBlockSolidOnSide(i, j, k + 1, 2))
|
||||
{
|
||||
world.setBlockMetadataWithNotify(i, j, k, 4);
|
||||
}
|
||||
@@ -130,19 +130,19 @@
|
||||
{
|
||||
int i1 = world.getBlockMetadata(i, j, k);
|
||||
boolean flag = false;
|
||||
- if (!world.isBlockNormalCubeDefault(i - 1, j, k, true) && i1 == 1)
|
||||
+ if (!world.isBlockSolidOnSide(i - 1, j, k, 5) && i1 == 1)
|
||||
{
|
||||
flag = true;
|
||||
}
|
||||
- if (!world.isBlockNormalCubeDefault(i + 1, j, k, true) && i1 == 2)
|
||||
+ if (!world.isBlockSolidOnSide(i + 1, j, k, 4) && i1 == 2)
|
||||
{
|
||||
flag = true;
|
||||
}
|
||||
- if (!world.isBlockNormalCubeDefault(i, j, k - 1, true) && i1 == 3)
|
||||
+ if (!world.isBlockSolidOnSide(i, j, k - 1, 3) && i1 == 3)
|
||||
{
|
||||
flag = true;
|
||||
}
|
||||
- if (!world.isBlockNormalCubeDefault(i, j, k + 1, true) && i1 == 4)
|
||||
+ if (!world.isBlockSolidOnSide(i, j, k + 1, 2) && i1 == 4)
|
||||
{
|
||||
flag = true;
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
--- ../src_base/minecraft/net/minecraft/src/ContainerCreative.java 0000-00-00 00:00:00.000000000 -0000
|
||||
+++ ../src_work/minecraft/net/minecraft/src/ContainerCreative.java 0000-00-00 00:00:00.000000000 -0000
|
||||
@@ -65,17 +65,20 @@
|
||||
itemList.add(new ItemStack(ablock[l1], 1, k2));
|
||||
}
|
||||
|
||||
- for (int i2 = 256; i2 < Item.itemsList.length; i2++)
|
||||
+ for(int x = 0; x < Block.blocksList.length; x++)
|
||||
{
|
||||
- if (Item.itemsList[i2] != null && Item.itemsList[i2].shiftedIndex != Item.potion.shiftedIndex && Item.itemsList[i2].shiftedIndex != Item.monsterPlacer.shiftedIndex)
|
||||
+ if (Block.blocksList[x] != null)
|
||||
{
|
||||
- itemList.add(new ItemStack(Item.itemsList[i2]));
|
||||
+ Block.blocksList[x].addCreativeItems((ArrayList)itemList);
|
||||
}
|
||||
}
|
||||
|
||||
- for (int j2 = 1; j2 < 16; j2++)
|
||||
+ for (int i2 = Block.blocksList.length; i2 < Item.itemsList.length; i2++)
|
||||
{
|
||||
- itemList.add(new ItemStack(Item.dyePowder.shiftedIndex, 1, j2));
|
||||
+ if (Item.itemsList[i2] != null)
|
||||
+ {
|
||||
+ Item.itemsList[i2].addCreativeItems((ArrayList)itemList);
|
||||
+ }
|
||||
}
|
||||
|
||||
Integer integer;
|
||||
@@ -1,122 +0,0 @@
|
||||
--- ../src_base/minecraft/net/minecraft/src/GuiControls.java 0000-00-00 00:00:00.000000000 -0000
|
||||
+++ ../src_work/minecraft/net/minecraft/src/GuiControls.java 0000-00-00 00:00:00.000000000 -0000
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
import java.util.List;
|
||||
import net.minecraft.client.Minecraft;
|
||||
+import net.minecraft.src.forge.GuiControlsScrollPanel;
|
||||
|
||||
public class GuiControls extends GuiScreen
|
||||
{
|
||||
@@ -9,6 +10,7 @@
|
||||
protected String screenTitle;
|
||||
private GameSettings options;
|
||||
private int buttonId;
|
||||
+ private GuiControlsScrollPanel scrollPane;
|
||||
|
||||
public GuiControls(GuiScreen guiscreen, GameSettings gamesettings)
|
||||
{
|
||||
@@ -25,60 +27,30 @@
|
||||
|
||||
public void initGui()
|
||||
{
|
||||
+ scrollPane = new GuiControlsScrollPanel(this, options, mc);
|
||||
StringTranslate stringtranslate = StringTranslate.getInstance();
|
||||
int i = func_20080_j();
|
||||
- for (int j = 0; j < options.keyBindings.length; j++)
|
||||
- {
|
||||
- controlList.add(new GuiSmallButton(j, i + (j % 2) * 160, height / 6 + 24 * (j >> 1), 70, 20, options.getOptionDisplayString(j)));
|
||||
- }
|
||||
-
|
||||
- controlList.add(new GuiButton(200, width / 2 - 100, height / 6 + 168, stringtranslate.translateKey("gui.done")));
|
||||
+ controlList.add(new GuiButton(200, width / 2 - 100, height - 28, stringtranslate.translateKey("gui.done")));
|
||||
+ scrollPane.registerScrollButtons(controlList, 7, 8);
|
||||
screenTitle = stringtranslate.translateKey("controls.title");
|
||||
}
|
||||
|
||||
protected void actionPerformed(GuiButton guibutton)
|
||||
{
|
||||
- for (int i = 0; i < options.keyBindings.length; i++)
|
||||
- {
|
||||
- ((GuiButton)controlList.get(i)).displayString = options.getOptionDisplayString(i);
|
||||
- }
|
||||
-
|
||||
if (guibutton.id == 200)
|
||||
{
|
||||
mc.displayGuiScreen(parentScreen);
|
||||
}
|
||||
- else
|
||||
- {
|
||||
- buttonId = guibutton.id;
|
||||
- guibutton.displayString = (new StringBuilder()).append("> ").append(options.getOptionDisplayString(guibutton.id)).append(" <").toString();
|
||||
- }
|
||||
}
|
||||
|
||||
protected void mouseClicked(int i, int j, int k)
|
||||
{
|
||||
- if (buttonId >= 0)
|
||||
- {
|
||||
- options.setKeyBinding(buttonId, -100 + k);
|
||||
- ((GuiButton)controlList.get(buttonId)).displayString = options.getOptionDisplayString(buttonId);
|
||||
- buttonId = -1;
|
||||
- KeyBinding.resetKeyBindingArrayAndHash();
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- super.mouseClicked(i, j, k);
|
||||
- }
|
||||
+ super.mouseClicked(i, j, k);
|
||||
}
|
||||
|
||||
protected void keyTyped(char c, int i)
|
||||
{
|
||||
- if (buttonId >= 0)
|
||||
- {
|
||||
- options.setKeyBinding(buttonId, i);
|
||||
- ((GuiButton)controlList.get(buttonId)).displayString = options.getOptionDisplayString(buttonId);
|
||||
- buttonId = -1;
|
||||
- KeyBinding.resetKeyBindingArrayAndHash();
|
||||
- }
|
||||
- else
|
||||
+ if (scrollPane.keyTyped(c, i))
|
||||
{
|
||||
super.keyTyped(c, i);
|
||||
}
|
||||
@@ -87,35 +59,8 @@
|
||||
public void drawScreen(int i, int j, float f)
|
||||
{
|
||||
drawDefaultBackground();
|
||||
- drawCenteredString(fontRenderer, screenTitle, width / 2, 20, 0xffffff);
|
||||
- int k = func_20080_j();
|
||||
- for (int l = 0; l < options.keyBindings.length; l++)
|
||||
- {
|
||||
- boolean flag = false;
|
||||
- for (int i1 = 0; i1 < options.keyBindings.length; i1++)
|
||||
- {
|
||||
- if (i1 != l && options.keyBindings[l].keyCode == options.keyBindings[i1].keyCode)
|
||||
- {
|
||||
- flag = true;
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- int j1 = l;
|
||||
- if (buttonId == l)
|
||||
- {
|
||||
- ((GuiButton)controlList.get(j1)).displayString = "\247f> \247e??? \247f<";
|
||||
- }
|
||||
- else if (flag)
|
||||
- {
|
||||
- ((GuiButton)controlList.get(j1)).displayString = (new StringBuilder()).append("\247c").append(options.getOptionDisplayString(j1)).toString();
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- ((GuiButton)controlList.get(j1)).displayString = options.getOptionDisplayString(j1);
|
||||
- }
|
||||
- drawString(fontRenderer, options.getKeyBindingDescription(l), k + (l % 2) * 160 + 70 + 6, height / 6 + 24 * (l >> 1) + 7, -1);
|
||||
- }
|
||||
-
|
||||
+ scrollPane.drawScreen(i, j, f);
|
||||
+ drawCenteredString(fontRenderer, screenTitle, width / 2, 4, 0xffffff);
|
||||
super.drawScreen(i, j, f);
|
||||
}
|
||||
}
|
||||
@@ -1,139 +0,0 @@
|
||||
--- ../src_base/minecraft/net/minecraft/src/Item.java 0000-00-00 00:00:00.000000000 -0000
|
||||
+++ ../src_work/minecraft/net/minecraft/src/Item.java 0000-00-00 00:00:00.000000000 -0000
|
||||
@@ -1,6 +1,7 @@
|
||||
package net.minecraft.src;
|
||||
|
||||
import java.io.PrintStream;
|
||||
+import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
@@ -157,6 +158,9 @@
|
||||
private String potionEffect;
|
||||
private String itemName;
|
||||
|
||||
+ // FORGE: To disable repair recipes.
|
||||
+ protected boolean canRepair = true;
|
||||
+
|
||||
protected Item(int i)
|
||||
{
|
||||
maxStackSize = 64;
|
||||
@@ -449,7 +453,7 @@
|
||||
float f7 = f4 * f5;
|
||||
float f8 = f6;
|
||||
float f9 = f3 * f5;
|
||||
- double d3 = 5D;
|
||||
+ double d3 = ModLoader.getMinecraftInstance().playerController.getBlockReachDistance();
|
||||
Vec3D vec3d1 = vec3d.addVector((double)f7 * d3, (double)f8 * d3, (double)f9 * d3);
|
||||
MovingObjectPosition movingobjectposition = world.rayTraceBlocks_do_do(vec3d, vec3d1, flag, !flag);
|
||||
return movingobjectposition;
|
||||
@@ -469,6 +473,109 @@
|
||||
{
|
||||
return getIconFromDamage(i);
|
||||
}
|
||||
+
|
||||
+ /**
|
||||
+ * Called when a new CreativeContainer is opened, populate the list
|
||||
+ * with all of the items for this item you want a player in creative mode
|
||||
+ * to have access to.
|
||||
+ *
|
||||
+ * @param itemList The list of items currently in the creative inventory
|
||||
+ */
|
||||
+ public void addCreativeItems(ArrayList itemList)
|
||||
+ {
|
||||
+ if (this.shiftedIndex != Item.potion.shiftedIndex && this.shiftedIndex != Item.monsterPlacer.shiftedIndex)
|
||||
+ {
|
||||
+ itemList.add(new ItemStack(this, 1));
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Called when a player drops the item into the world,
|
||||
+ * returning false from this will prevent the item from
|
||||
+ * being removed from the players inventory and spawning
|
||||
+ * in the world
|
||||
+ *
|
||||
+ * @param player The player that dropped the item
|
||||
+ * @param item The item stack, before the item is removed.
|
||||
+ */
|
||||
+ public boolean onDroppedByPlayer(ItemStack item, EntityPlayer player)
|
||||
+ {
|
||||
+ return true;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * This is called when the item is used, before the block is activated.
|
||||
+ * @param stack The Item Stack
|
||||
+ * @param player The Player that used the item
|
||||
+ * @param world The Current World
|
||||
+ * @param X Target X Position
|
||||
+ * @param Y Target Y Position
|
||||
+ * @param Z Target Z Position
|
||||
+ * @param side The side of the target hit
|
||||
+ * @return Return true to prevent any further processing.
|
||||
+ */
|
||||
+ public boolean onItemUseFirst(ItemStack stack, EntityPlayer player, World world, int X, int Y, int Z, int side)
|
||||
+ {
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Metadata-sensitive version of getStrVsBlock
|
||||
+ * @param itemstack The Item Stack
|
||||
+ * @param block The block the item is trying to break
|
||||
+ * @param metadata The items current metadata
|
||||
+ * @return The damage strength
|
||||
+ */
|
||||
+ public float getStrVsBlock(ItemStack itemstack, Block block, int metadata)
|
||||
+ {
|
||||
+ return getStrVsBlock(itemstack, block);
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Called by CraftingManager to determine if an item is reparable.
|
||||
+ * @return True if reparable
|
||||
+ */
|
||||
+ public boolean isRepairable()
|
||||
+ {
|
||||
+ return canRepair && isDamageable();
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Call to disable repair recipes.
|
||||
+ * @return The current Item instance
|
||||
+ */
|
||||
+ public Item setNoRepair()
|
||||
+ {
|
||||
+ canRepair = false;
|
||||
+ return this;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Called before a block is broken. Return true to prevent default block harvesting.
|
||||
+ *
|
||||
+ * Note: In SMP, this is called on both client and server sides!
|
||||
+ *
|
||||
+ * @param itemstack The current ItemStack
|
||||
+ * @param X The X Position
|
||||
+ * @param Y The X Position
|
||||
+ * @param Z The X Position
|
||||
+ * @param player The Player that is wielding the item
|
||||
+ * @return True to prevent harvesting, false to continue as normal
|
||||
+ */
|
||||
+ public boolean onBlockStartBreak(ItemStack itemstack, int X, int Y, int Z, EntityPlayer player)
|
||||
+ {
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Called each tick while using an item.
|
||||
+ * @param stack The Item being used
|
||||
+ * @param player The Player using the item
|
||||
+ * @param count The amount of time in tick the item has been used for continuously
|
||||
+ */
|
||||
+ public void onUsingItemTick(ItemStack stack, EntityPlayer player, int count)
|
||||
+ {
|
||||
+ }
|
||||
|
||||
static
|
||||
{
|
||||
@@ -1,11 +0,0 @@
|
||||
--- ../src_base/minecraft/net/minecraft/src/Packet250CustomPayload.java 0000-00-00 00:00:00.000000000 -0000
|
||||
+++ ../src_work/minecraft/net/minecraft/src/Packet250CustomPayload.java 0000-00-00 00:00:00.000000000 -0000
|
||||
@@ -20,7 +20,7 @@
|
||||
if (length > 0 && length < 32767)
|
||||
{
|
||||
data = new byte[length];
|
||||
- datainputstream.read(data);
|
||||
+ datainputstream.readFully(data);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,119 +0,0 @@
|
||||
--- ../src_base/minecraft_server/net/minecraft/src/BlockButton.java 0000-00-00 00:00:00.000000000 -0000
|
||||
+++ ../src_work/minecraft_server/net/minecraft/src/BlockButton.java 0000-00-00 00:00:00.000000000 -0000
|
||||
@@ -32,36 +32,36 @@
|
||||
|
||||
public boolean canPlaceBlockOnSide(World world, int i, int j, int k, int l)
|
||||
{
|
||||
- if (l == 2 && world.isBlockNormalCube(i, j, k + 1))
|
||||
+ if (l == 2 && world.isBlockSolidOnSide(i, j, k + 1, 2))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
- if (l == 3 && world.isBlockNormalCube(i, j, k - 1))
|
||||
+ if (l == 3 && world.isBlockSolidOnSide(i, j, k - 1, 3))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
- if (l == 4 && world.isBlockNormalCube(i + 1, j, k))
|
||||
+ if (l == 4 && world.isBlockSolidOnSide(i + 1, j, k, 4))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
- return l == 5 && world.isBlockNormalCube(i - 1, j, k);
|
||||
+ return l == 5 && world.isBlockSolidOnSide(i - 1, j, k, 5);
|
||||
}
|
||||
|
||||
public boolean canPlaceBlockAt(World world, int i, int j, int k)
|
||||
{
|
||||
- if (world.isBlockNormalCube(i - 1, j, k))
|
||||
+ if (world.isBlockSolidOnSide(i - 1, j, k, 5))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
- if (world.isBlockNormalCube(i + 1, j, k))
|
||||
+ if (world.isBlockSolidOnSide(i + 1, j, k, 4))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
- if (world.isBlockNormalCube(i, j, k - 1))
|
||||
+ if (world.isBlockSolidOnSide(i, j, k - 1, 3))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
- return world.isBlockNormalCube(i, j, k + 1);
|
||||
+ return world.isBlockSolidOnSide(i, j, k + 1, 2);
|
||||
}
|
||||
|
||||
public void onBlockPlaced(World world, int i, int j, int k, int l)
|
||||
@@ -69,19 +69,19 @@
|
||||
int i1 = world.getBlockMetadata(i, j, k);
|
||||
int j1 = i1 & 8;
|
||||
i1 &= 7;
|
||||
- if (l == 2 && world.isBlockNormalCube(i, j, k + 1))
|
||||
+ if (l == 2 && world.isBlockSolidOnSide(i, j, k + 1, 2))
|
||||
{
|
||||
i1 = 4;
|
||||
}
|
||||
- else if (l == 3 && world.isBlockNormalCube(i, j, k - 1))
|
||||
+ else if (l == 3 && world.isBlockSolidOnSide(i, j, k - 1, 3))
|
||||
{
|
||||
i1 = 3;
|
||||
}
|
||||
- else if (l == 4 && world.isBlockNormalCube(i + 1, j, k))
|
||||
+ else if (l == 4 && world.isBlockSolidOnSide(i + 1, j, k, 4))
|
||||
{
|
||||
i1 = 2;
|
||||
}
|
||||
- else if (l == 5 && world.isBlockNormalCube(i - 1, j, k))
|
||||
+ else if (l == 5 && world.isBlockSolidOnSide(i - 1, j, k, 5))
|
||||
{
|
||||
i1 = 1;
|
||||
}
|
||||
@@ -94,19 +94,19 @@
|
||||
|
||||
private int getOrientation(World world, int i, int j, int k)
|
||||
{
|
||||
- if (world.isBlockNormalCube(i - 1, j, k))
|
||||
+ if (world.isBlockSolidOnSide(i - 1, j, k, 5))
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
- if (world.isBlockNormalCube(i + 1, j, k))
|
||||
+ if (world.isBlockSolidOnSide(i + 1, j, k, 4))
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
- if (world.isBlockNormalCube(i, j, k - 1))
|
||||
+ if (world.isBlockSolidOnSide(i, j, k - 1, 3))
|
||||
{
|
||||
return 3;
|
||||
}
|
||||
- return !world.isBlockNormalCube(i, j, k + 1) ? 1 : 4;
|
||||
+ return !world.isBlockSolidOnSide(i, j, k + 1, 2) ? 1 : 4;
|
||||
}
|
||||
|
||||
public void onNeighborBlockChange(World world, int i, int j, int k, int l)
|
||||
@@ -115,19 +115,19 @@
|
||||
{
|
||||
int i1 = world.getBlockMetadata(i, j, k) & 7;
|
||||
boolean flag = false;
|
||||
- if (!world.isBlockNormalCube(i - 1, j, k) && i1 == 1)
|
||||
+ if (!world.isBlockSolidOnSide(i - 1, j, k, 5) && i1 == 1)
|
||||
{
|
||||
flag = true;
|
||||
}
|
||||
- if (!world.isBlockNormalCube(i + 1, j, k) && i1 == 2)
|
||||
+ if (!world.isBlockSolidOnSide(i + 1, j, k, 4) && i1 == 2)
|
||||
{
|
||||
flag = true;
|
||||
}
|
||||
- if (!world.isBlockNormalCube(i, j, k - 1) && i1 == 3)
|
||||
+ if (!world.isBlockSolidOnSide(i, j, k - 1, 3) && i1 == 3)
|
||||
{
|
||||
flag = true;
|
||||
}
|
||||
- if (!world.isBlockNormalCube(i, j, k + 1) && i1 == 4)
|
||||
+ if (!world.isBlockSolidOnSide(i, j, k + 1, 2) && i1 == 4)
|
||||
{
|
||||
flag = true;
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
--- ../src_base/minecraft_server/net/minecraft/src/BlockChest.java 0000-00-00 00:00:00.000000000 -0000
|
||||
+++ ../src_work/minecraft_server/net/minecraft/src/BlockChest.java 0000-00-00 00:00:00.000000000 -0000
|
||||
@@ -334,23 +334,23 @@
|
||||
{
|
||||
return true;
|
||||
}
|
||||
- if (world.isBlockNormalCube(i, j + 1, k))
|
||||
+ if (world.isBlockSolidOnSide(i, j + 1, k, 0))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
- if (world.getBlockId(i - 1, j, k) == blockID && world.isBlockNormalCube(i - 1, j + 1, k))
|
||||
+ if (world.getBlockId(i - 1, j, k) == blockID && world.isBlockSolidOnSide(i - 1, j + 1, k, 0))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
- if (world.getBlockId(i + 1, j, k) == blockID && world.isBlockNormalCube(i + 1, j + 1, k))
|
||||
+ if (world.getBlockId(i + 1, j, k) == blockID && world.isBlockSolidOnSide(i + 1, j + 1, k, 0))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
- if (world.getBlockId(i, j, k - 1) == blockID && world.isBlockNormalCube(i, j + 1, k - 1))
|
||||
+ if (world.getBlockId(i, j, k - 1) == blockID && world.isBlockSolidOnSide(i, j + 1, k - 1, 0))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
- if (world.getBlockId(i, j, k + 1) == blockID && world.isBlockNormalCube(i, j + 1, k + 1))
|
||||
+ if (world.getBlockId(i, j, k + 1) == blockID && world.isBlockSolidOnSide(i, j + 1, k + 1, 0))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@@ -1,83 +0,0 @@
|
||||
--- ../src_base/minecraft_server/net/minecraft/src/BlockLadder.java 0000-00-00 00:00:00.000000000 -0000
|
||||
+++ ../src_work/minecraft_server/net/minecraft/src/BlockLadder.java 0000-00-00 00:00:00.000000000 -0000
|
||||
@@ -31,37 +31,37 @@
|
||||
|
||||
public boolean canPlaceBlockAt(World world, int i, int j, int k)
|
||||
{
|
||||
- if (world.isBlockNormalCube(i - 1, j, k))
|
||||
+ if (world.isBlockSolidOnSide(i - 1, j, k, 5))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
- if (world.isBlockNormalCube(i + 1, j, k))
|
||||
+ if (world.isBlockSolidOnSide(i + 1, j, k, 4))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
- if (world.isBlockNormalCube(i, j, k - 1))
|
||||
+ if (world.isBlockSolidOnSide(i, j, k - 1, 3))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
- return world.isBlockNormalCube(i, j, k + 1);
|
||||
+ return world.isBlockSolidOnSide(i, j, k + 1, 2);
|
||||
}
|
||||
|
||||
public void onBlockPlaced(World world, int i, int j, int k, int l)
|
||||
{
|
||||
int i1 = world.getBlockMetadata(i, j, k);
|
||||
- if ((i1 == 0 || l == 2) && world.isBlockNormalCube(i, j, k + 1))
|
||||
+ if ((i1 == 0 || l == 2) && world.isBlockSolidOnSide(i, j, k + 1, 2))
|
||||
{
|
||||
i1 = 2;
|
||||
}
|
||||
- if ((i1 == 0 || l == 3) && world.isBlockNormalCube(i, j, k - 1))
|
||||
+ if ((i1 == 0 || l == 3) && world.isBlockSolidOnSide(i, j, k - 1, 3))
|
||||
{
|
||||
i1 = 3;
|
||||
}
|
||||
- if ((i1 == 0 || l == 4) && world.isBlockNormalCube(i + 1, j, k))
|
||||
+ if ((i1 == 0 || l == 4) && world.isBlockSolidOnSide(i + 1, j, k, 4))
|
||||
{
|
||||
i1 = 4;
|
||||
}
|
||||
- if ((i1 == 0 || l == 5) && world.isBlockNormalCube(i - 1, j, k))
|
||||
+ if ((i1 == 0 || l == 5) && world.isBlockSolidOnSide(i - 1, j, k, 5))
|
||||
{
|
||||
i1 = 5;
|
||||
}
|
||||
@@ -72,19 +72,19 @@
|
||||
{
|
||||
int i1 = world.getBlockMetadata(i, j, k);
|
||||
boolean flag = false;
|
||||
- if (i1 == 2 && world.isBlockNormalCube(i, j, k + 1))
|
||||
+ if(i1 == 2 && world.isBlockSolidOnSide(i, j, k + 1, 2))
|
||||
{
|
||||
flag = true;
|
||||
}
|
||||
- if (i1 == 3 && world.isBlockNormalCube(i, j, k - 1))
|
||||
+ if(i1 == 3 && world.isBlockSolidOnSide(i, j, k - 1, 3))
|
||||
{
|
||||
flag = true;
|
||||
}
|
||||
- if (i1 == 4 && world.isBlockNormalCube(i + 1, j, k))
|
||||
+ if(i1 == 4 && world.isBlockSolidOnSide(i + 1, j, k, 4))
|
||||
{
|
||||
flag = true;
|
||||
}
|
||||
- if (i1 == 5 && world.isBlockNormalCube(i - 1, j, k))
|
||||
+ if(i1 == 5 && world.isBlockSolidOnSide(i - 1, j, k, 5))
|
||||
{
|
||||
flag = true;
|
||||
}
|
||||
@@ -100,4 +100,10 @@
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
+
|
||||
+ /* FORGE: Implemented base method, see Block.isLadder */
|
||||
+ public boolean isLadder(World world, int i, int j, int k)
|
||||
+ {
|
||||
+ return true;
|
||||
+ }
|
||||
}
|
||||
@@ -1,120 +0,0 @@
|
||||
--- ../src_base/minecraft_server/net/minecraft/src/BlockLever.java 0000-00-00 00:00:00.000000000 -0000
|
||||
+++ ../src_work/minecraft_server/net/minecraft/src/BlockLever.java 0000-00-00 00:00:00.000000000 -0000
|
||||
@@ -31,44 +31,44 @@
|
||||
|
||||
public boolean canPlaceBlockOnSide(World world, int i, int j, int k, int l)
|
||||
{
|
||||
- if (l == 1 && world.isBlockNormalCube(i, j - 1, k))
|
||||
+ if (l == 1 && world.isBlockSolidOnSide(i, j - 1, k, 1))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
- if (l == 2 && world.isBlockNormalCube(i, j, k + 1))
|
||||
+ if (l == 2 && world.isBlockSolidOnSide(i, j, k + 1, 2))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
- if (l == 3 && world.isBlockNormalCube(i, j, k - 1))
|
||||
+ if (l == 3 && world.isBlockSolidOnSide(i, j, k - 1, 3))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
- if (l == 4 && world.isBlockNormalCube(i + 1, j, k))
|
||||
+ if (l == 4 && world.isBlockSolidOnSide(i + 1, j, k, 4))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
- return l == 5 && world.isBlockNormalCube(i - 1, j, k);
|
||||
+ return l == 5 && world.isBlockSolidOnSide(i - 1, j, k, 5);
|
||||
}
|
||||
|
||||
public boolean canPlaceBlockAt(World world, int i, int j, int k)
|
||||
{
|
||||
- if (world.isBlockNormalCube(i - 1, j, k))
|
||||
+ if (world.isBlockSolidOnSide(i - 1, j, k, 5))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
- if (world.isBlockNormalCube(i + 1, j, k))
|
||||
+ if (world.isBlockSolidOnSide(i + 1, j, k, 4))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
- if (world.isBlockNormalCube(i, j, k - 1))
|
||||
+ if (world.isBlockSolidOnSide(i, j, k - 1, 3))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
- if (world.isBlockNormalCube(i, j, k + 1))
|
||||
+ if (world.isBlockSolidOnSide(i, j, k + 1, 2))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
- return world.isBlockNormalCube(i, j - 1, k);
|
||||
+ return world.isBlockSolidOnSide(i, j - 1, k, 1);
|
||||
}
|
||||
|
||||
public void onBlockPlaced(World world, int i, int j, int k, int l)
|
||||
@@ -77,23 +77,23 @@
|
||||
int j1 = i1 & 8;
|
||||
i1 &= 7;
|
||||
i1 = -1;
|
||||
- if (l == 1 && world.isBlockNormalCube(i, j - 1, k))
|
||||
+ if (l == 1 && world.isBlockSolidOnSide(i, j - 1, k, 1))
|
||||
{
|
||||
i1 = 5 + world.rand.nextInt(2);
|
||||
}
|
||||
- if (l == 2 && world.isBlockNormalCube(i, j, k + 1))
|
||||
+ if (l == 2 && world.isBlockSolidOnSide(i, j, k + 1, 2))
|
||||
{
|
||||
i1 = 4;
|
||||
}
|
||||
- if (l == 3 && world.isBlockNormalCube(i, j, k - 1))
|
||||
+ if (l == 3 && world.isBlockSolidOnSide(i, j, k - 1, 3))
|
||||
{
|
||||
i1 = 3;
|
||||
}
|
||||
- if (l == 4 && world.isBlockNormalCube(i + 1, j, k))
|
||||
+ if (l == 4 && world.isBlockSolidOnSide(i + 1, j, k, 4))
|
||||
{
|
||||
i1 = 2;
|
||||
}
|
||||
- if (l == 5 && world.isBlockNormalCube(i - 1, j, k))
|
||||
+ if (l == 5 && world.isBlockSolidOnSide(i - 1, j, k, 5))
|
||||
{
|
||||
i1 = 1;
|
||||
}
|
||||
@@ -116,27 +116,27 @@
|
||||
{
|
||||
int i1 = world.getBlockMetadata(i, j, k) & 7;
|
||||
boolean flag = false;
|
||||
- if (!world.isBlockNormalCube(i - 1, j, k) && i1 == 1)
|
||||
+ if (!world.isBlockSolidOnSide(i - 1, j, k, 5) && i1 == 1)
|
||||
{
|
||||
flag = true;
|
||||
}
|
||||
- if (!world.isBlockNormalCube(i + 1, j, k) && i1 == 2)
|
||||
+ if (!world.isBlockSolidOnSide(i + 1, j, k, 4) && i1 == 2)
|
||||
{
|
||||
flag = true;
|
||||
}
|
||||
- if (!world.isBlockNormalCube(i, j, k - 1) && i1 == 3)
|
||||
+ if (!world.isBlockSolidOnSide(i, j, k - 1, 3) && i1 == 3)
|
||||
{
|
||||
flag = true;
|
||||
}
|
||||
- if (!world.isBlockNormalCube(i, j, k + 1) && i1 == 4)
|
||||
+ if (!world.isBlockSolidOnSide(i, j, k + 1, 2) && i1 == 4)
|
||||
{
|
||||
flag = true;
|
||||
}
|
||||
- if (!world.isBlockNormalCube(i, j - 1, k) && i1 == 5)
|
||||
+ if (!world.isBlockSolidOnSide(i, j - 1, k, 1) && i1 == 5)
|
||||
{
|
||||
flag = true;
|
||||
}
|
||||
- if (!world.isBlockNormalCube(i, j - 1, k) && i1 == 6)
|
||||
+ if (!world.isBlockSolidOnSide(i, j - 1, k, 1) && i1 == 6)
|
||||
{
|
||||
flag = true;
|
||||
}
|
||||
@@ -1,43 +0,0 @@
|
||||
--- ../src_base/minecraft_server/net/minecraft/src/BlockNetherStalk.java 0000-00-00 00:00:00.000000000 -0000
|
||||
+++ ../src_work/minecraft_server/net/minecraft/src/BlockNetherStalk.java 0000-00-00 00:00:00.000000000 -0000
|
||||
@@ -1,5 +1,6 @@
|
||||
package net.minecraft.src;
|
||||
|
||||
+import java.util.ArrayList;
|
||||
import java.util.Random;
|
||||
|
||||
public class BlockNetherStalk extends BlockFlower
|
||||
@@ -57,25 +58,24 @@
|
||||
return 6;
|
||||
}
|
||||
|
||||
- public void dropBlockAsItemWithChance(World world, int i, int j, int k, int l, float f, int i1)
|
||||
+ @Override
|
||||
+ public ArrayList<ItemStack> getBlockDropped(World world, int i, int j, int k, int meta, int fortune)
|
||||
{
|
||||
- if (world.isRemote)
|
||||
- {
|
||||
- return;
|
||||
- }
|
||||
+ ArrayList<ItemStack> ret = new ArrayList<ItemStack>();
|
||||
int j1 = 1;
|
||||
- if (l >= 3)
|
||||
+ if (meta >= 3)
|
||||
{
|
||||
j1 = 2 + world.rand.nextInt(3);
|
||||
- if (i1 > 0)
|
||||
+ if (fortune > 0)
|
||||
{
|
||||
- j1 += world.rand.nextInt(i1 + 1);
|
||||
+ j1 += world.rand.nextInt(fortune + 1);
|
||||
}
|
||||
}
|
||||
for (int k1 = 0; k1 < j1; k1++)
|
||||
{
|
||||
- dropBlockAsItem_do(world, i, j, k, new ItemStack(Item.netherStalkSeeds));
|
||||
+ ret.add(new ItemStack(Item.netherStalkSeeds));
|
||||
}
|
||||
+ return ret;
|
||||
}
|
||||
|
||||
public int idDropped(int i, Random random, int j)
|
||||
@@ -1,11 +0,0 @@
|
||||
--- ../src_base/minecraft_server/net/minecraft/src/BlockPressurePlate.java 0000-00-00 00:00:00.000000000 -0000
|
||||
+++ ../src_work/minecraft_server/net/minecraft/src/BlockPressurePlate.java 0000-00-00 00:00:00.000000000 -0000
|
||||
@@ -38,7 +38,7 @@
|
||||
|
||||
public boolean canPlaceBlockAt(World world, int i, int j, int k)
|
||||
{
|
||||
- return world.isBlockNormalCube(i, j - 1, k) || world.getBlockId(i, j - 1, k) == Block.fence.blockID;
|
||||
+ return world.isBlockSolidOnSide(i, j - 1, k, 1) || world.getBlockId(i, j - 1, k) == Block.fence.blockID;
|
||||
}
|
||||
|
||||
public void onBlockAdded(World world, int i, int j, int k)
|
||||
@@ -1,44 +0,0 @@
|
||||
--- ../src_base/minecraft_server/net/minecraft/src/BlockTallGrass.java 0000-00-00 00:00:00.000000000 -0000
|
||||
+++ ../src_work/minecraft_server/net/minecraft/src/BlockTallGrass.java 0000-00-00 00:00:00.000000000 -0000
|
||||
@@ -1,7 +1,10 @@
|
||||
package net.minecraft.src;
|
||||
|
||||
+import java.util.ArrayList;
|
||||
import java.util.Random;
|
||||
|
||||
+import net.minecraft.src.forge.ForgeHooks;
|
||||
+
|
||||
public class BlockTallGrass extends BlockFlower
|
||||
{
|
||||
protected BlockTallGrass(int i, int j)
|
||||
@@ -33,15 +36,25 @@
|
||||
|
||||
public int idDropped(int i, Random random, int j)
|
||||
{
|
||||
- if (random.nextInt(8) == 0)
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public ArrayList<ItemStack> getBlockDropped(World world, int i, int j, int k, int md, int fortune)
|
||||
+ {
|
||||
+ ArrayList<ItemStack> ret = new ArrayList<ItemStack>();
|
||||
+ if (world.rand.nextInt(8) != 0)
|
||||
{
|
||||
- return Item.seeds.shiftedIndex;
|
||||
+ return ret;
|
||||
}
|
||||
- else
|
||||
+
|
||||
+ ItemStack item = ForgeHooks.getGrassSeed(world);
|
||||
+ if (item != null)
|
||||
{
|
||||
- return -1;
|
||||
+ ret.add(item);
|
||||
}
|
||||
- }
|
||||
+ return ret;
|
||||
+ }
|
||||
|
||||
public int quantityDroppedWithBonus(int i, Random random)
|
||||
{
|
||||
@@ -1,107 +0,0 @@
|
||||
--- ../src_base/minecraft_server/net/minecraft/src/BlockTorch.java 0000-00-00 00:00:00.000000000 -0000
|
||||
+++ ../src_work/minecraft_server/net/minecraft/src/BlockTorch.java 0000-00-00 00:00:00.000000000 -0000
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
private boolean canPlaceTorchOn(World world, int i, int j, int k)
|
||||
{
|
||||
- if (world.isBlockNormalCubeDefault(i, j, k, true))
|
||||
+ if (world.isBlockSolidOnSide(i, j, k, 1))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@@ -45,19 +45,19 @@
|
||||
|
||||
public boolean canPlaceBlockAt(World world, int i, int j, int k)
|
||||
{
|
||||
- if (world.isBlockNormalCubeDefault(i - 1, j, k, true))
|
||||
+ if (world.isBlockSolidOnSide(i - 1, j, k, 5))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
- if (world.isBlockNormalCubeDefault(i + 1, j, k, true))
|
||||
+ if (world.isBlockSolidOnSide(i + 1, j, k, 4))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
- if (world.isBlockNormalCubeDefault(i, j, k - 1, true))
|
||||
+ if (world.isBlockSolidOnSide(i, j, k - 1, 3))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
- if (world.isBlockNormalCubeDefault(i, j, k + 1, true))
|
||||
+ if (world.isBlockSolidOnSide(i, j, k + 1, 2))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@@ -71,19 +71,19 @@
|
||||
{
|
||||
i1 = 5;
|
||||
}
|
||||
- if (l == 2 && world.isBlockNormalCubeDefault(i, j, k + 1, true))
|
||||
+ if (l == 2 && world.isBlockSolidOnSide(i, j, k + 1, 2))
|
||||
{
|
||||
i1 = 4;
|
||||
}
|
||||
- if (l == 3 && world.isBlockNormalCubeDefault(i, j, k - 1, true))
|
||||
+ if (l == 3 && world.isBlockSolidOnSide(i, j, k - 1, 3))
|
||||
{
|
||||
i1 = 3;
|
||||
}
|
||||
- if (l == 4 && world.isBlockNormalCubeDefault(i + 1, j, k, true))
|
||||
+ if (l == 4 && world.isBlockSolidOnSide(i + 1, j, k, 4))
|
||||
{
|
||||
i1 = 2;
|
||||
}
|
||||
- if (l == 5 && world.isBlockNormalCubeDefault(i - 1, j, k, true))
|
||||
+ if (l == 5 && world.isBlockSolidOnSide(i - 1, j, k, 5))
|
||||
{
|
||||
i1 = 1;
|
||||
}
|
||||
@@ -101,19 +101,19 @@
|
||||
|
||||
public void onBlockAdded(World world, int i, int j, int k)
|
||||
{
|
||||
- if (world.isBlockNormalCubeDefault(i - 1, j, k, true))
|
||||
+ if (world.isBlockSolidOnSide(i - 1, j, k, 5))
|
||||
{
|
||||
world.setBlockMetadataWithNotify(i, j, k, 1);
|
||||
}
|
||||
- else if (world.isBlockNormalCubeDefault(i + 1, j, k, true))
|
||||
+ else if (world.isBlockSolidOnSide(i + 1, j, k, 4))
|
||||
{
|
||||
world.setBlockMetadataWithNotify(i, j, k, 2);
|
||||
}
|
||||
- else if (world.isBlockNormalCubeDefault(i, j, k - 1, true))
|
||||
+ else if (world.isBlockSolidOnSide(i, j, k - 1, 3))
|
||||
{
|
||||
world.setBlockMetadataWithNotify(i, j, k, 3);
|
||||
}
|
||||
- else if (world.isBlockNormalCubeDefault(i, j, k + 1, true))
|
||||
+ else if (world.isBlockSolidOnSide(i, j, k + 1, 2))
|
||||
{
|
||||
world.setBlockMetadataWithNotify(i, j, k, 4);
|
||||
}
|
||||
@@ -130,19 +130,19 @@
|
||||
{
|
||||
int i1 = world.getBlockMetadata(i, j, k);
|
||||
boolean flag = false;
|
||||
- if (!world.isBlockNormalCubeDefault(i - 1, j, k, true) && i1 == 1)
|
||||
+ if (!world.isBlockSolidOnSide(i - 1, j, k, 5) && i1 == 1)
|
||||
{
|
||||
flag = true;
|
||||
}
|
||||
- if (!world.isBlockNormalCubeDefault(i + 1, j, k, true) && i1 == 2)
|
||||
+ if (!world.isBlockSolidOnSide(i + 1, j, k, 4) && i1 == 2)
|
||||
{
|
||||
flag = true;
|
||||
}
|
||||
- if (!world.isBlockNormalCubeDefault(i, j, k - 1, true) && i1 == 3)
|
||||
+ if (!world.isBlockSolidOnSide(i, j, k - 1, 3) && i1 == 3)
|
||||
{
|
||||
flag = true;
|
||||
}
|
||||
- if (!world.isBlockNormalCubeDefault(i, j, k + 1, true) && i1 == 4)
|
||||
+ if (!world.isBlockSolidOnSide(i, j, k + 1, 2) && i1 == 4)
|
||||
{
|
||||
flag = true;
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
--- ../src_base/minecraft_server/net/minecraft/src/Enchantment.java 0000-00-00 00:00:00.000000000 -0000
|
||||
+++ ../src_work/minecraft_server/net/minecraft/src/Enchantment.java 0000-00-00 00:00:00.000000000 -0000
|
||||
@@ -91,6 +91,16 @@
|
||||
return this;
|
||||
}
|
||||
|
||||
+ /**
|
||||
+ * Called to determine if this enchantment can be applied to a ItemStack
|
||||
+ * @param item The ItemStack that the enchantment might be put on
|
||||
+ * @return True if the item is valid, false otherwise
|
||||
+ */
|
||||
+ public boolean canEnchantItem(ItemStack item)
|
||||
+ {
|
||||
+ return type.canEnchantItem(item.getItem());
|
||||
+ }
|
||||
+
|
||||
static
|
||||
{
|
||||
looting = new EnchantmentLootBonus(21, 2, EnumEnchantmentType.weapon);
|
||||
@@ -1,50 +0,0 @@
|
||||
--- ../src_base/minecraft_server/net/minecraft/src/EntityPlayerMP.java 0000-00-00 00:00:00.000000000 -0000
|
||||
+++ ../src_work/minecraft_server/net/minecraft/src/EntityPlayerMP.java 0000-00-00 00:00:00.000000000 -0000
|
||||
@@ -405,6 +405,7 @@
|
||||
public void displayWorkbenchGUI(int i, int j, int k)
|
||||
{
|
||||
getNextWidowId();
|
||||
+ closeCraftingGui();
|
||||
playerNetServerHandler.sendPacket(new Packet100OpenWindow(currentWindowId, 1, "Crafting", 9));
|
||||
craftingInventory = new ContainerWorkbench(inventory, worldObj, i, j, k);
|
||||
craftingInventory.windowId = currentWindowId;
|
||||
@@ -414,6 +415,7 @@
|
||||
public void displayGUIEnchantment(int i, int j, int k)
|
||||
{
|
||||
getNextWidowId();
|
||||
+ closeCraftingGui();
|
||||
playerNetServerHandler.sendPacket(new Packet100OpenWindow(currentWindowId, 4, "Enchanting", 9));
|
||||
craftingInventory = new ContainerEnchantment(inventory, worldObj, i, j, k);
|
||||
craftingInventory.windowId = currentWindowId;
|
||||
@@ -423,6 +425,7 @@
|
||||
public void displayGUIChest(IInventory iinventory)
|
||||
{
|
||||
getNextWidowId();
|
||||
+ closeCraftingGui();
|
||||
playerNetServerHandler.sendPacket(new Packet100OpenWindow(currentWindowId, 0, iinventory.getInvName(), iinventory.getSizeInventory()));
|
||||
craftingInventory = new ContainerChest(inventory, iinventory);
|
||||
craftingInventory.windowId = currentWindowId;
|
||||
@@ -432,6 +435,7 @@
|
||||
public void displayGUIFurnace(TileEntityFurnace tileentityfurnace)
|
||||
{
|
||||
getNextWidowId();
|
||||
+ closeCraftingGui();
|
||||
playerNetServerHandler.sendPacket(new Packet100OpenWindow(currentWindowId, 2, tileentityfurnace.getInvName(), tileentityfurnace.getSizeInventory()));
|
||||
craftingInventory = new ContainerFurnace(inventory, tileentityfurnace);
|
||||
craftingInventory.windowId = currentWindowId;
|
||||
@@ -441,6 +445,7 @@
|
||||
public void displayGUIDispenser(TileEntityDispenser tileentitydispenser)
|
||||
{
|
||||
getNextWidowId();
|
||||
+ closeCraftingGui();
|
||||
playerNetServerHandler.sendPacket(new Packet100OpenWindow(currentWindowId, 3, tileentitydispenser.getInvName(), tileentitydispenser.getSizeInventory()));
|
||||
craftingInventory = new ContainerDispenser(inventory, tileentitydispenser);
|
||||
craftingInventory.windowId = currentWindowId;
|
||||
@@ -450,6 +455,7 @@
|
||||
public void displayGUIBrewingStand(TileEntityBrewingStand tileentitybrewingstand)
|
||||
{
|
||||
getNextWidowId();
|
||||
+ closeCraftingGui();
|
||||
playerNetServerHandler.sendPacket(new Packet100OpenWindow(currentWindowId, 5, tileentitybrewingstand.getInvName(), tileentitybrewingstand.getSizeInventory()));
|
||||
craftingInventory = new ContainerBrewingStand(inventory, tileentitybrewingstand);
|
||||
craftingInventory.windowId = currentWindowId;
|
||||
@@ -1,138 +0,0 @@
|
||||
--- ../src_base/minecraft_server/net/minecraft/src/Item.java 0000-00-00 00:00:00.000000000 -0000
|
||||
+++ ../src_work/minecraft_server/net/minecraft/src/Item.java 0000-00-00 00:00:00.000000000 -0000
|
||||
@@ -1,6 +1,7 @@
|
||||
package net.minecraft.src;
|
||||
|
||||
import java.io.PrintStream;
|
||||
+import java.util.ArrayList;
|
||||
import java.util.Random;
|
||||
|
||||
public class Item
|
||||
@@ -156,6 +157,9 @@
|
||||
private String potionEffect;
|
||||
private String itemName;
|
||||
|
||||
+ // FORGE: To disable repair recipes.
|
||||
+ protected boolean canRepair = true;
|
||||
+
|
||||
protected Item(int i)
|
||||
{
|
||||
maxStackSize = 64;
|
||||
@@ -389,10 +393,117 @@
|
||||
float f8 = f6;
|
||||
float f9 = f3 * f5;
|
||||
double d3 = 5D;
|
||||
+ if (entityplayer instanceof EntityPlayerMP)
|
||||
+ {
|
||||
+ d3 = ((EntityPlayerMP)entityplayer).itemInWorldManager.getBlockReachDistance();
|
||||
+ }
|
||||
Vec3D vec3d1 = vec3d.addVector((double)f7 * d3, (double)f8 * d3, (double)f9 * d3);
|
||||
MovingObjectPosition movingobjectposition = world.rayTraceBlocks_do_do(vec3d, vec3d1, flag, !flag);
|
||||
return movingobjectposition;
|
||||
}
|
||||
+
|
||||
+ /**
|
||||
+ * Called when a new CreativeContainer is opened, populate the list
|
||||
+ * with all of the items for this item you want a player in creative mode
|
||||
+ * to have access to.
|
||||
+ *
|
||||
+ * @param itemList The list of items currently in the creative inventory
|
||||
+ */
|
||||
+ public void addCreativeItems(ArrayList itemList)
|
||||
+ {
|
||||
+ if (this.shiftedIndex != Item.potion.shiftedIndex && this.shiftedIndex != Item.monsterPlacer.shiftedIndex)
|
||||
+ {
|
||||
+ itemList.add(new ItemStack(this, 1));
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Called when a player drops the item into the world,
|
||||
+ * returning false from this will prevent the item from
|
||||
+ * being removed from the players inventory and spawning
|
||||
+ * in the world
|
||||
+ *
|
||||
+ * @param player The player that dropped the item
|
||||
+ * @param item The item stack, before the item is removed.
|
||||
+ */
|
||||
+ public boolean onDroppedByPlayer(ItemStack item, EntityPlayer player)
|
||||
+ {
|
||||
+ return true;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * This is called when the item is used, before the block is activated.
|
||||
+ * @param stack The Item Stack
|
||||
+ * @param player The Player that used the item
|
||||
+ * @param world The Current World
|
||||
+ * @param X Target X Position
|
||||
+ * @param Y Target Y Position
|
||||
+ * @param Z Target Z Position
|
||||
+ * @param side The side of the target hit
|
||||
+ * @return Return true to prevent any further processing.
|
||||
+ */
|
||||
+ public boolean onItemUseFirst(ItemStack stack, EntityPlayer player, World world, int X, int Y, int Z, int side)
|
||||
+ {
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Metadata-sensitive version of getStrVsBlock
|
||||
+ * @param itemstack The Item Stack
|
||||
+ * @param block The block the item is trying to break
|
||||
+ * @param metadata The items current metadata
|
||||
+ * @return The damage strength
|
||||
+ */
|
||||
+ public float getStrVsBlock(ItemStack itemstack, Block block, int metadata)
|
||||
+ {
|
||||
+ return getStrVsBlock(itemstack, block);
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Called by CraftingManager to determine if an item is reparable.
|
||||
+ * @return True if reparable
|
||||
+ */
|
||||
+ public boolean isRepairable()
|
||||
+ {
|
||||
+ return canRepair && isDamageable();
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Call to disable repair recipes.
|
||||
+ * @return The current Item instance
|
||||
+ */
|
||||
+ public Item setNoRepair()
|
||||
+ {
|
||||
+ canRepair = false;
|
||||
+ return this;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Called before a block is broken. Return true to prevent default block harvesting.
|
||||
+ *
|
||||
+ * Note: In SMP, this is called on both client and server sides!
|
||||
+ *
|
||||
+ * @param itemstack The current ItemStack
|
||||
+ * @param X The X Position
|
||||
+ * @param Y The X Position
|
||||
+ * @param Z The X Position
|
||||
+ * @param player The Player that is wielding the item
|
||||
+ * @return True to prevent harvesting, false to continue as normal
|
||||
+ */
|
||||
+ public boolean onBlockStartBreak(ItemStack itemstack, int X, int Y, int Z, EntityPlayer player)
|
||||
+ {
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Called each tick while using an item.
|
||||
+ * @param stack The Item being used
|
||||
+ * @param player The Player using the item
|
||||
+ * @param count The amount of time in tick the item has been used for continuously
|
||||
+ */
|
||||
+ public void onUsingItemTick(ItemStack stack, EntityPlayer player, int count)
|
||||
+ {
|
||||
+ }
|
||||
|
||||
public int getItemEnchantability()
|
||||
{
|
||||
@@ -1,23 +0,0 @@
|
||||
--- ../src_base/minecraft_server/net/minecraft/src/ItemBucket.java 0000-00-00 00:00:00.000000000 -0000
|
||||
+++ ../src_work/minecraft_server/net/minecraft/src/ItemBucket.java 0000-00-00 00:00:00.000000000 -0000
|
||||
@@ -2,6 +2,8 @@
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
+import net.minecraft.src.forge.MinecraftForge;
|
||||
+
|
||||
public class ItemBucket extends Item
|
||||
{
|
||||
private int isFull;
|
||||
@@ -36,6 +38,11 @@
|
||||
}
|
||||
if (isFull == 0)
|
||||
{
|
||||
+ ItemStack customBucket = MinecraftForge.fillCustomBucket(world, i, j, k);
|
||||
+ if (customBucket != null)
|
||||
+ {
|
||||
+ return customBucket;
|
||||
+ }
|
||||
if (!entityplayer.canPlayerEdit(i, j, k))
|
||||
{
|
||||
return itemstack;
|
||||
@@ -1,132 +0,0 @@
|
||||
--- ../src_base/minecraft_server/net/minecraft/src/ItemInWorldManager.java 0000-00-00 00:00:00.000000000 -0000
|
||||
+++ ../src_work/minecraft_server/net/minecraft/src/ItemInWorldManager.java 0000-00-00 00:00:00.000000000 -0000
|
||||
@@ -1,7 +1,10 @@
|
||||
package net.minecraft.src;
|
||||
|
||||
+import net.minecraft.src.forge.ForgeHooks;
|
||||
+
|
||||
public class ItemInWorldManager
|
||||
{
|
||||
+ private double blockReachDistance = 5.0d;
|
||||
public World thisWorld;
|
||||
public EntityPlayer thisPlayer;
|
||||
private int gameType;
|
||||
@@ -71,7 +74,7 @@
|
||||
if (j != 0)
|
||||
{
|
||||
Block block = Block.blocksList[j];
|
||||
- float f = block.blockStrength(thisPlayer) * (float)(i + 1);
|
||||
+ float f = block.blockStrength(thisWorld, thisPlayer, field_22049_l, field_22048_m, field_22047_n) * (float)(i + 1);
|
||||
if (f >= 1.0F)
|
||||
{
|
||||
field_22050_k = false;
|
||||
@@ -99,7 +102,7 @@
|
||||
{
|
||||
Block.blocksList[i1].onBlockClicked(thisWorld, i, j, k, thisPlayer);
|
||||
}
|
||||
- if (i1 > 0 && Block.blocksList[i1].blockStrength(thisPlayer) >= 1.0F)
|
||||
+ if (i1 > 0 && Block.blocksList[i1].blockStrength(thisWorld, thisPlayer, i, j, k) >= 1.0F)
|
||||
{
|
||||
blockHarvessted(i, j, k);
|
||||
}
|
||||
@@ -120,7 +123,7 @@
|
||||
if (i1 != 0)
|
||||
{
|
||||
Block block = Block.blocksList[i1];
|
||||
- float f = block.blockStrength(thisPlayer) * (float)(l + 1);
|
||||
+ float f = block.blockStrength(thisWorld, thisPlayer, i, j, k) * (float)(l + 1);
|
||||
if (f >= 0.7F)
|
||||
{
|
||||
blockHarvessted(i, j, k);
|
||||
@@ -142,8 +145,13 @@
|
||||
{
|
||||
Block block = Block.blocksList[thisWorld.getBlockId(i, j, k)];
|
||||
int l = thisWorld.getBlockMetadata(i, j, k);
|
||||
- boolean flag = thisWorld.setBlockWithNotify(i, j, k, 0);
|
||||
- if (block != null && flag)
|
||||
+
|
||||
+ if (block == null)
|
||||
+ {
|
||||
+ return false;
|
||||
+ }
|
||||
+ boolean flag = block.removeBlockByPlayer(thisWorld, thisPlayer, i, j, k);
|
||||
+ if (flag)
|
||||
{
|
||||
block.onBlockDestroyedByPlayer(thisWorld, i, j, k, l);
|
||||
}
|
||||
@@ -152,6 +160,11 @@
|
||||
|
||||
public boolean blockHarvessted(int i, int j, int k)
|
||||
{
|
||||
+ ItemStack itemstack = thisPlayer.getCurrentEquippedItem();
|
||||
+ if (itemstack != null && itemstack.getItem().onBlockStartBreak(itemstack, i, j, k, thisPlayer))
|
||||
+ {
|
||||
+ return false;
|
||||
+ }
|
||||
int l = thisWorld.getBlockId(i, j, k);
|
||||
int i1 = thisWorld.getBlockMetadata(i, j, k);
|
||||
thisWorld.playAuxSFXAtEntity(thisPlayer, 2001, i, j, k, l + thisWorld.getBlockMetadata(i, j, k) * 256);
|
||||
@@ -162,8 +175,7 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
- ItemStack itemstack = thisPlayer.getCurrentEquippedItem();
|
||||
- boolean flag1 = thisPlayer.canHarvestBlock(Block.blocksList[l]);
|
||||
+ boolean flag1 = Block.blocksList[l].canHarvestBlock(thisPlayer, i1);
|
||||
if (itemstack != null)
|
||||
{
|
||||
itemstack.onDestroyBlock(l, i, j, k, thisPlayer);
|
||||
@@ -197,6 +209,7 @@
|
||||
if (itemstack1.stackSize == 0)
|
||||
{
|
||||
entityplayer.inventory.mainInventory[entityplayer.inventory.currentItem] = null;
|
||||
+ ForgeHooks.onDestroyCurrentItem(entityplayer,itemstack1);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -208,6 +221,14 @@
|
||||
|
||||
public boolean activeBlockOrUseItem(EntityPlayer entityplayer, World world, ItemStack itemstack, int i, int j, int k, int l)
|
||||
{
|
||||
+ if (itemstack != null)
|
||||
+ {
|
||||
+ Item item = itemstack.getItem();
|
||||
+ if (item.onItemUseFirst(itemstack, entityplayer, world, i, j, k, l))
|
||||
+ {
|
||||
+ return true;
|
||||
+ }
|
||||
+ }
|
||||
int i1 = world.getBlockId(i, j, k);
|
||||
if (i1 > 0 && Block.blocksList[i1].blockActivated(world, i, j, k, entityplayer))
|
||||
{
|
||||
@@ -228,7 +249,15 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
- return itemstack.useItem(entityplayer, world, i, j, k, l);
|
||||
+ if (!itemstack.useItem(entityplayer, world, i, j, k, l))
|
||||
+ {
|
||||
+ return false;
|
||||
+ }
|
||||
+ if (itemstack.stackSize == 0)
|
||||
+ {
|
||||
+ ForgeHooks.onDestroyCurrentItem(entityplayer,itemstack);
|
||||
+ }
|
||||
+ return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -236,4 +265,13 @@
|
||||
{
|
||||
thisWorld = worldserver;
|
||||
}
|
||||
+
|
||||
+ public double getBlockReachDistance()
|
||||
+ {
|
||||
+ return blockReachDistance;
|
||||
+ }
|
||||
+ public void setBlockReachDistance(double distance)
|
||||
+ {
|
||||
+ blockReachDistance = distance;
|
||||
+ }
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
--- ../src_base/minecraft_server/net/minecraft/src/ModLoader.java 0000-00-00 00:00:00.000000000 -0000
|
||||
+++ ../src_work/minecraft_server/net/minecraft/src/ModLoader.java 0000-00-00 00:00:00.000000000 -0000
|
||||
@@ -1325,6 +1325,7 @@
|
||||
{
|
||||
method_getNextWindowId.invoke(entityplayermp, new Object[0]);
|
||||
int j = field_currentWindowId.getInt(entityplayermp);
|
||||
+ entityplayermp.closeCraftingGui();
|
||||
entityplayermp.playerNetServerHandler.sendPacket(new Packet100OpenWindow(j, i, iinventory.getInvName(), iinventory.getSizeInventory()));
|
||||
entityplayermp.craftingInventory = container;
|
||||
entityplayermp.craftingInventory.windowId = j;
|
||||
@@ -1,24 +0,0 @@
|
||||
--- ../src_base/minecraft_server/net/minecraft/src/NetServerHandler.java 0000-00-00 00:00:00.000000000 -0000
|
||||
+++ ../src_work/minecraft_server/net/minecraft/src/NetServerHandler.java 0000-00-00 00:00:00.000000000 -0000
|
||||
@@ -295,7 +295,9 @@
|
||||
double d1 = (playerEntity.posY - ((double)j + 0.5D)) + 1.5D;
|
||||
double d3 = playerEntity.posZ - ((double)k + 0.5D);
|
||||
double d5 = d * d + d1 * d1 + d3 * d3;
|
||||
- if (d5 > 36D)
|
||||
+ double dist = playerEntity.itemInWorldManager.getBlockReachDistance() + 1;
|
||||
+ dist *= dist;
|
||||
+ if (d5 > dist)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -366,7 +368,9 @@
|
||||
{
|
||||
j1 = i1;
|
||||
}
|
||||
- if (hasMoved && playerEntity.getDistanceSq((double)i + 0.5D, (double)j + 0.5D, (double)k + 0.5D) < 64D && (j1 > 16 || flag))
|
||||
+ double dist = playerEntity.itemInWorldManager.getBlockReachDistance() + 3;
|
||||
+ dist *= dist;
|
||||
+ if (hasMoved && playerEntity.getDistanceSq((double)i + 0.5D, (double)j + 0.5D, (double)k + 0.5D) < dist && (j1 > 16 || flag))
|
||||
{
|
||||
playerEntity.itemInWorldManager.activeBlockOrUseItem(playerEntity, worldserver, itemstack, i, j, k, l);
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
--- ../src_base/minecraft_server/net/minecraft/src/Packet250CustomPayload.java 0000-00-00 00:00:00.000000000 -0000
|
||||
+++ ../src_work/minecraft_server/net/minecraft/src/Packet250CustomPayload.java 0000-00-00 00:00:00.000000000 -0000
|
||||
@@ -20,7 +20,7 @@
|
||||
if (length > 0 && length < 32767)
|
||||
{
|
||||
data = new byte[length];
|
||||
- datainputstream.read(data);
|
||||
+ datainputstream.readFully(data);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
--- ../src_base/minecraft_server/net/minecraft/src/WorldServer.java 0000-00-00 00:00:00.000000000 -0000
|
||||
+++ ../src_work/minecraft_server/net/minecraft/src/WorldServer.java 0000-00-00 00:00:00.000000000 -0000
|
||||
@@ -54,15 +54,30 @@
|
||||
public List getTileEntityList(int i, int j, int k, int l, int i1, int j1)
|
||||
{
|
||||
ArrayList arraylist = new ArrayList();
|
||||
- for (int k1 = 0; k1 < loadedTileEntityList.size(); k1++)
|
||||
+ for(int x = (i>>4); x <= (l>>4); x++)
|
||||
{
|
||||
- TileEntity tileentity = (TileEntity)loadedTileEntityList.get(k1);
|
||||
- if (tileentity.xCoord >= i && tileentity.yCoord >= j && tileentity.zCoord >= k && tileentity.xCoord < l && tileentity.yCoord < i1 && tileentity.zCoord < j1)
|
||||
+ for(int z = (k>>4); z <= (j1>>4); z++)
|
||||
{
|
||||
- arraylist.add(tileentity);
|
||||
+ Chunk chunk = getChunkFromChunkCoords(x,z);
|
||||
+ if (chunk == null)
|
||||
+ {
|
||||
+ continue;
|
||||
+ }
|
||||
+ for(Object obj : chunk.chunkTileEntityMap.values())
|
||||
+ {
|
||||
+ TileEntity entity = (TileEntity)obj;
|
||||
+ if(entity.isInvalid())
|
||||
+ {
|
||||
+ continue;
|
||||
+ }
|
||||
+ if (entity.xCoord >= i && entity.yCoord >= j && entity.zCoord >= k &&
|
||||
+ entity.xCoord <= l && entity.yCoord <= i1 && entity.zCoord <= j1)
|
||||
+ {
|
||||
+ arraylist.add(entity);
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
}
|
||||
-
|
||||
return arraylist;
|
||||
}
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
@cmd /C build.bat
|
||||
|
||||
@cd ..
|
||||
|
||||
@echo | cmd /C reobfuscate.bat
|
||||
|
||||
@set PATH=E:\cygwin\bin;%PATH%
|
||||
|
||||
@cd forge
|
||||
|
||||
@sh package.sh
|
||||
|
||||
pause
|
||||
@@ -1 +0,0 @@
|
||||
1 3 2 0
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
+5
-6
@@ -300,13 +300,12 @@ public class ForgeHooks {
|
||||
|
||||
}
|
||||
|
||||
public static final int majorVersion=0;
|
||||
public static final int minorVersion=0;
|
||||
public static final int revisionVersion=0;
|
||||
public static final int buildVersion=0;
|
||||
public static final int majorVersion=1;
|
||||
public static final int minorVersion=2;
|
||||
public static final int revisionVersion=5;
|
||||
static {
|
||||
System.out.printf("MinecraftForge v%d.%d.%d.%d Initialized\n", majorVersion, minorVersion, revisionVersion, buildVersion);
|
||||
ModLoader.getLogger().info(String.format("MinecraftForge v%d.%d.%d.%d Initialized\n", majorVersion, minorVersion, revisionVersion, buildVersion));
|
||||
System.out.printf("MinecraftForge V%d.%d.%d Initialized\n", majorVersion, minorVersion, revisionVersion);
|
||||
ModLoader.getLogger().info(String.format("MinecraftForge V%d.%d.%d Initialized\n", majorVersion, minorVersion, revisionVersion));
|
||||
}
|
||||
|
||||
static boolean toolInit=false;
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loaded 100 of 234 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user