mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-14 01:04:24 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
eac172d806 | ||
|
|
dbd6af437c | ||
|
|
5190e0c927 | ||
|
|
bfd0cfe506 | ||
|
|
87d4c2134c | ||
|
|
dda5880360 | ||
|
|
2309163d92 | ||
|
|
e5a16e25df | ||
|
|
ad378151cf | ||
|
|
bdda88d74e | ||
|
|
61d9b78704 | ||
|
|
f3e56e0273 | ||
|
|
e26f1ab671 | ||
|
|
dda9f474af | ||
|
|
df3449534f | ||
|
|
906cb8ee39 | ||
|
|
d541e492c4 | ||
|
|
d7d0f241ff | ||
|
|
c8fca39895 | ||
|
|
dd1eb6924d | ||
|
|
3f8d830899 | ||
|
|
a4475c9e9a | ||
|
|
90a4744130 | ||
|
|
f4eec04eba | ||
|
|
dbb5a37449 | ||
|
|
348a6fe03c | ||
|
|
6e1442e8e6 | ||
|
|
b91eb1ceac | ||
|
|
a38c8bd427 | ||
|
|
2936697302 | ||
|
|
52de732b8e | ||
|
|
c2f165f211 | ||
|
|
4c6e03e4ad | ||
|
|
c84b8740b4 | ||
|
|
8c9762fd9a | ||
|
|
d8a14ee928 | ||
|
|
8bb73671ba | ||
|
|
46a9ba178f | ||
|
|
5c60c2246c | ||
|
|
e79b5d1937 | ||
|
|
9bf4f67d9d | ||
|
|
c726e219d7 | ||
|
|
707a07511f | ||
|
|
d64c332266 | ||
|
|
800bb21bc8 | ||
|
|
1931d4fc09 | ||
|
|
17c9f9bf9b | ||
|
|
db1f438c2d | ||
|
|
d67cda76b8 | ||
|
|
b883254220 | ||
|
|
8a4636cba3 | ||
|
|
9c6f5bd8ee | ||
|
|
a2c606e98c | ||
|
|
6c578cd84d | ||
|
|
e35435abd5 | ||
|
|
5c7978d347 | ||
|
|
68cc1d315b | ||
|
|
96c05bbd25 | ||
|
|
d2cf70f8d5 | ||
|
|
f1a6f45353 | ||
|
|
8acaaa0e53 | ||
|
|
384da1b222 | ||
|
|
2be3e5845a | ||
|
|
600b2b86a6 | ||
|
|
6fb7b777ce | ||
|
|
28345bf839 | ||
|
|
56f612c186 | ||
|
|
80882bec9c | ||
|
|
f1f672b5fd | ||
|
|
bf5e706f06 | ||
|
|
c12b2c5b11 | ||
|
|
a64a47b24c | ||
|
|
8a7c087e34 | ||
|
|
756c3ce812 | ||
|
|
b8a84f2c29 | ||
|
|
ebc09a72db | ||
|
|
579f4de295 | ||
|
|
9f56b1cc03 | ||
|
|
141805d5bb | ||
|
|
d00a837635 | ||
|
|
da695e774f | ||
|
|
b3d605cd9d | ||
|
|
56438eb585 | ||
|
|
b763c73b74 | ||
|
|
ff7055fdb2 | ||
|
|
07dfc35e0e | ||
|
|
d290970b49 | ||
|
|
47749d454a | ||
|
|
ed7c343647 | ||
|
|
a386d0a8dc | ||
|
|
1a8d32f7de | ||
|
|
7a242e9562 | ||
|
|
afdbc4064b | ||
|
|
0392ecd8da | ||
|
|
cab70ce17a | ||
|
|
9fa40cb432 | ||
|
|
c9b6cdef1f | ||
|
|
5ecff4e5a1 | ||
|
|
115de819b3 | ||
|
|
bb6751cc59 | ||
|
|
0a874de91d | ||
|
|
3b61068a3c | ||
|
|
cfe5a542fc | ||
|
|
4f4a75d865 | ||
|
|
5c74f5efb9 | ||
|
|
878cac2697 | ||
|
|
8b5440b351 | ||
|
|
71c77d9e9a | ||
|
|
8ced84d8d3 | ||
|
|
3e09d92cd4 | ||
|
|
17132962c9 | ||
|
|
e7ca40009e | ||
|
|
62e7bdf805 | ||
|
|
705e5e62a0 | ||
|
|
a6ed5709ef | ||
|
|
aead41197f | ||
|
|
e9cd63abf7 | ||
|
|
d2878faa33 | ||
|
|
1c11f0eeb0 | ||
|
|
33bd0947e3 | ||
|
|
0457d8057f | ||
|
|
b0efd106bd | ||
|
|
9d22e76927 | ||
|
|
6ac2161f36 | ||
|
|
4cdb1cb3d0 | ||
|
|
651af86795 | ||
|
|
622f536f80 | ||
|
|
231c65da06 | ||
|
|
72864e4bc2 | ||
|
|
1d19069203 | ||
|
|
12b64fa287 | ||
|
|
fb5f9373c5 | ||
|
|
08b0913f04 | ||
|
|
8d9e0879d8 | ||
|
|
adf31e33fd | ||
|
|
61b8107ba4 | ||
|
|
cfda01b9ff | ||
|
|
4c259ce5d5 | ||
|
|
53dd73f2a5 | ||
|
|
691b87e876 | ||
|
|
b813f609a6 | ||
|
|
cbcdfbcfdb | ||
|
|
6c19a22244 | ||
|
|
f530d9f2b2 | ||
|
|
6accd6dfee | ||
|
|
f54eecb455 | ||
|
|
4bc2f86ea8 | ||
|
|
6d0e031989 | ||
|
|
d23812cb4c | ||
|
|
ee1f04bd58 | ||
|
|
98fbe565b3 | ||
|
|
197c847a5f | ||
|
|
73365fcbe4 | ||
|
|
e6cc73ce55 | ||
|
|
c9685426b2 | ||
|
|
c35f8e5ddb | ||
|
|
b892916d6f | ||
|
|
18f822a8d2 | ||
|
|
5717e3e979 | ||
|
|
e6dff0bfc6 | ||
|
|
0490d22992 | ||
|
|
5975944963 | ||
|
|
58f3084074 | ||
|
|
59e7645d61 | ||
|
|
7f0d588e62 | ||
|
|
8c19143961 | ||
|
|
f2a1b244e8 | ||
|
|
14b6dbe4f5 | ||
|
|
5af89543d3 | ||
|
|
b11e534f88 | ||
|
|
c9f7fc3475 | ||
|
|
f15ff6b925 | ||
|
|
1f78ce8b25 | ||
|
|
9584d7d2ad | ||
|
|
11c81cc91f | ||
|
|
5477f767b3 | ||
|
|
eba740b4ce | ||
|
|
1b7e8b6179 | ||
|
|
cd9d101e06 | ||
|
|
69a16fad9c | ||
|
|
c7fb93c4f9 | ||
|
|
955a056015 | ||
|
|
86612c1450 | ||
|
|
987ad5acd2 | ||
|
|
7385d80298 | ||
|
|
f9e5cdc9ab | ||
|
|
859a0d1dee | ||
|
|
b858205145 | ||
|
|
f0c6f089b4 | ||
|
|
999ef3817a |
No files matched your search
-1591
File diff suppressed because it is too large.
Load diff
-5999
File diff suppressed because it is too large.
Load diff
-4880
File diff suppressed because it is too large.
Load diff
@@ -1,4 +0,0 @@
|
||||
[VERSION]
|
||||
MCPVersion = 5.0
|
||||
ClientVersion = 1.0.0
|
||||
ServerVersion = 1.0.1
|
||||
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.
File diff suppressed because it is too large.
Load diff
@@ -213,6 +213,8 @@ 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
|
||||
@@ -226,3 +228,4 @@ 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
|
||||
File diff suppressed because it is too large.
Load diff
@@ -9,6 +9,9 @@ DirConf = conf
|
||||
DirRuntime = runtime
|
||||
DirLib = lib
|
||||
DirFFOut = temp/ffout
|
||||
DirBinOut = temp/bin
|
||||
DirModSrc = modsrc
|
||||
DirEclipse = eclipse
|
||||
|
||||
[CSV]
|
||||
Classes = %(DirConf)s/classes.csv
|
||||
@@ -23,8 +26,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 = 3820d222b95d0b8c520d9596a756a6e6
|
||||
MD5Server = 934b6010999daa1f1b1ccdf4cb77e052
|
||||
MD5Client = e92302d2acdba7c97e0d8df1e10d2006
|
||||
MD5Server = b0f4fb91f9723104adf35944bbf3d3cf
|
||||
|
||||
[RETROGUARD]
|
||||
Location = %(DirRuntime)s/bin/retroguard.jar
|
||||
@@ -50,8 +53,6 @@ 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
|
||||
@@ -59,15 +60,12 @@ FFServerSrc = %(DirFFOut)s/minecraft_server_exc.jar
|
||||
FFSource = net
|
||||
|
||||
[OUTPUT]
|
||||
BinOut = %(DirTemp)s/bin
|
||||
BinClient = %(DirTemp)s/bin/minecraft
|
||||
BinServer = %(DirTemp)s/bin/minecraft_server
|
||||
BinClient = %(DirBinOut)s/minecraft
|
||||
BinServer = %(DirBinOut)s/minecraft_server
|
||||
SrcClient = %(DirSrc)s/minecraft
|
||||
SrcServer = %(DirSrc)s/minecraft_server
|
||||
|
||||
[PACKAGES]
|
||||
PkgClient = net/minecraft/src,net/minecraft/client
|
||||
PkgServer = net/minecraft/src,net/minecraft/server
|
||||
TestClient = net/minecraft/client/Minecraft
|
||||
TestServer = net/minecraft/server/MinecraftServer
|
||||
|
||||
[PATCHES]
|
||||
PatchClient = %(DirConf)s/patches/minecraft.patch
|
||||
@@ -75,6 +73,8 @@ 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,8 +84,6 @@ 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
|
||||
@@ -98,42 +96,46 @@ 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 = minecraft/me.class
|
||||
FixStart = minecraft/Start.class
|
||||
FixSound = ga
|
||||
FixStart = Start
|
||||
NullPkg = net/minecraft/src
|
||||
IgnorePkg = paulscode,com/jcraft,isom,ibxm,de/matthiasmann/twl,org/xmlpull,javax/xml
|
||||
|
||||
[GETMODSOURCE]
|
||||
OutSRCClient = modsrc/client
|
||||
OutSRCServer = modsrc/server
|
||||
OutSRC = modsrc
|
||||
OutSRCClient = %(DirModSrc)s/minecraft
|
||||
OutSRCServer = %(DirModSrc)s/minecraft_server
|
||||
|
||||
[MCP]
|
||||
LogFile = %(DirLogs)s/mcp.log
|
||||
LogFileErr = %(DirLogs)s/mcperr.log
|
||||
UpdateUrl = http://mcp.ocean-labs.de/files/mcprolling_{version}/
|
||||
IgnoreUpdate = %(DirBin)s,%(DirLib)s,%(DirLogs)s,%(DirModSrc)s,%(DirReobf)s,%(DirSrc)s,%(DirTemp)s,%(DirEclipse)s/Client/bin,%(DirEclipse)s/Server/bin,%(DirJars)s/world,%(DirJars)s/saves,%(DirJars)s/resources
|
||||
|
||||
[COMMANDS]
|
||||
Patcher = %(DirRuntime)s/bin/applydiff.exe
|
||||
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
|
||||
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
|
||||
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}
|
||||
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}
|
||||
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}
|
||||
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 me
|
||||
public class ga
|
||||
{
|
||||
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 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 @@
|
||||
--- 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 @@
|
||||
|
||||
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 Tue Nov 22 23:21:36 2011
|
||||
+++ minecraft_patched\net\minecraft\src\CodecMus.java Wed Nov 23 00:09:14 2011
|
||||
--- 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
|
||||
@@ -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 Tue Nov 22 23:21:24 2011
|
||||
+++ minecraft_patched\net\minecraft\src\ItemMap.java Wed Nov 23 00:09:14 2011
|
||||
--- 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
|
||||
@@ -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 Tue Nov 22 23:21:24 2011
|
||||
+++ minecraft_patched\net\minecraft\src\MusInputStream.java Wed Nov 23 00:09:14 2011
|
||||
--- 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
|
||||
@@ -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 Tue Nov 22 23:21:20 2011
|
||||
+++ minecraft_patched\net\minecraft\src\RenderGlobal.java Wed Nov 23 00:10:20 2011
|
||||
--- 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
|
||||
@@ -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 Tue Nov 22 23:21:30 2011
|
||||
+++ minecraft_patched\net\minecraft\src\ThreadedFileIOBase.java Wed Nov 23 00:09:14 2011
|
||||
--- 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
|
||||
@@ -21,7 +21,9 @@
|
||||
}
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
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;
|
||||
}
|
||||
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 Tue Nov 22 23:21:56 2011
|
||||
+++ minecraft_server_patched\net\minecraft\src\ItemMap.java Wed Nov 23 00:09:45 2011
|
||||
--- 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
|
||||
@@ -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 Tue Nov 22 23:22:10 2011
|
||||
+++ minecraft_server_patched\net\minecraft\src\ThreadedFileIOBase.java Wed Nov 23 00:09:45 2011
|
||||
--- 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
|
||||
@@ -21,7 +21,9 @@
|
||||
}
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
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;
|
||||
}
|
||||
File renamed without changes.
@@ -182,6 +182,8 @@ 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
|
||||
@@ -200,3 +202,4 @@ 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.6
|
||||
ClientVersion = 1.1
|
||||
ServerVersion = 1.1
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
+13
@@ -106,6 +106,7 @@ public class ForgeHooksClient {
|
||||
Tessellator.instance=t;
|
||||
}
|
||||
|
||||
static IRenderContextHandler unbindContext=null;
|
||||
protected static void bindTexture(String name, int sub) {
|
||||
Integer n;
|
||||
n=textures.get(name);
|
||||
@@ -115,12 +116,20 @@ public class ForgeHooksClient {
|
||||
textures.put(name,n);
|
||||
}
|
||||
if(!inWorld) {
|
||||
if(unbindContext!=null) {
|
||||
unbindContext.afterRenderContext();
|
||||
unbindContext=null;
|
||||
}
|
||||
if(Tessellator.instance.isDrawing) {
|
||||
int mode=Tessellator.instance.drawMode;
|
||||
Tessellator.instance.draw();
|
||||
Tessellator.instance.startDrawing(mode);
|
||||
}
|
||||
GL11.glBindTexture(3553 /* GL_TEXTURE_2D */,n);
|
||||
unbindContext=renderHandlers.get(new TesKey(n,sub));
|
||||
if(unbindContext!=null) {
|
||||
unbindContext.beforeRenderContext();
|
||||
}
|
||||
return;
|
||||
}
|
||||
bindTessellator(n,sub);
|
||||
@@ -133,6 +142,10 @@ public class ForgeHooksClient {
|
||||
if(Tessellator.instance.isDrawing) {
|
||||
int mode=Tessellator.instance.drawMode;
|
||||
Tessellator.instance.draw();
|
||||
if(unbindContext!=null) {
|
||||
unbindContext.afterRenderContext();
|
||||
unbindContext=null;
|
||||
}
|
||||
Tessellator.instance.startDrawing(mode);
|
||||
}
|
||||
GL11.glBindTexture(3553 /* GL_TEXTURE_2D */, ModLoader
|
||||
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.
+1
-1
@@ -309,7 +309,7 @@ public class EnumHelper {
|
||||
else
|
||||
{
|
||||
if ((field.getModifiers() & flags) == flags &&
|
||||
field.getType().getName().equals(valueType))
|
||||
field.getType().getName().replace('.', '/').equals(valueType)) //Apparently some JVMs return .'s and some don't..
|
||||
{
|
||||
valuesField = field;
|
||||
break;
|
||||
+36
-2
@@ -6,11 +6,14 @@
|
||||
package net.minecraft.src.forge;
|
||||
|
||||
import net.minecraft.src.Block;
|
||||
import net.minecraft.src.Entity;
|
||||
import net.minecraft.src.EntityMinecart;
|
||||
import net.minecraft.src.EntityPlayer;
|
||||
import net.minecraft.src.IInventory;
|
||||
import net.minecraft.src.ItemStack;
|
||||
import net.minecraft.src.Item;
|
||||
import net.minecraft.src.EnumStatus;
|
||||
import net.minecraft.src.ModLoader;
|
||||
import net.minecraft.src.World;
|
||||
|
||||
import java.util.*;
|
||||
@@ -70,6 +73,36 @@ public class ForgeHooks {
|
||||
}
|
||||
|
||||
static LinkedList<ISleepHandler> sleepHandlers = new LinkedList<ISleepHandler>();
|
||||
|
||||
|
||||
public static void onMinecartUpdate(EntityMinecart minecart, int x, int y, int z)
|
||||
{
|
||||
for (IMinecartHandler handler : minecartHandlers)
|
||||
{
|
||||
handler.onMinecartUpdate(minecart, x, y, z);
|
||||
}
|
||||
}
|
||||
|
||||
public static void onMinecartEntityCollision(EntityMinecart minecart, Entity entity)
|
||||
{
|
||||
for (IMinecartHandler handler : minecartHandlers)
|
||||
{
|
||||
handler.onMinecartEntityCollision(minecart, entity);
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean onMinecartInteract(EntityMinecart minecart, EntityPlayer player)
|
||||
{
|
||||
boolean canceled = true;
|
||||
for (IMinecartHandler handler : minecartHandlers)
|
||||
{
|
||||
boolean tmp = handler.onMinecartInteract(minecart, player, canceled);
|
||||
canceled = canceled && tmp;
|
||||
}
|
||||
return canceled;
|
||||
}
|
||||
|
||||
static LinkedList<IMinecartHandler> minecartHandlers = new LinkedList<IMinecartHandler>();
|
||||
|
||||
// Plant Management
|
||||
// ------------------------------------------------------------
|
||||
@@ -268,10 +301,11 @@ public class ForgeHooks {
|
||||
}
|
||||
|
||||
public static final int majorVersion=1;
|
||||
public static final int minorVersion=2;
|
||||
public static final int revisionVersion=3;
|
||||
public static final int minorVersion=3;
|
||||
public static final int revisionVersion=0;
|
||||
static {
|
||||
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.
@@ -0,0 +1,50 @@
|
||||
package net.minecraft.src.forge;
|
||||
|
||||
import net.minecraft.src.AxisAlignedBB;
|
||||
import net.minecraft.src.Entity;
|
||||
import net.minecraft.src.EntityMinecart;
|
||||
|
||||
/**
|
||||
* This class defines a replacement for the default minecart collision code.
|
||||
* Only one handler can be registered at a time. It it registered with EntityMinecart.registerCollisionHandler().
|
||||
* If you use this, make it a configuration option.
|
||||
* @author CovertJaguar
|
||||
*/
|
||||
public interface IMinecartCollisionHandler
|
||||
{
|
||||
|
||||
/**
|
||||
* This basically replaces the function of the same name in EnityMinecart.
|
||||
* Code in IMinecartHooks.applyEntityCollisionHook is still run.
|
||||
* @param cart The cart that called the collision.
|
||||
* @param other The object it collided with.
|
||||
*/
|
||||
public void onEntityCollision(EntityMinecart cart, Entity other);
|
||||
|
||||
/**
|
||||
* This function replaced the function of the same name in EntityMinecart.
|
||||
* It is used to define whether minecarts collide with specific entities,
|
||||
* for example items.
|
||||
* @param cart The cart for which the collision box was requested.
|
||||
* @param other The entity requesting the collision box.
|
||||
* @return The collision box or null.
|
||||
*/
|
||||
public AxisAlignedBB getCollisionBox(EntityMinecart cart, Entity other);
|
||||
|
||||
/**
|
||||
* This function is used to define the box used for detecting minecart collisions.
|
||||
* It is generally bigger that the normal collision box.
|
||||
* @param cart The cart for which the collision box was requested.
|
||||
* @return The collision box, cannot be null.
|
||||
*/
|
||||
public AxisAlignedBB getMinecartCollisionBox(EntityMinecart cart);
|
||||
|
||||
/**
|
||||
* This function replaces the function of the same name in EntityMinecart.
|
||||
* It defines whether minecarts are solid to the player.
|
||||
* @param cart The cart for which the bounding box was requested.
|
||||
* @return The bounding box or null.
|
||||
*/
|
||||
public AxisAlignedBB getBoundingBox(EntityMinecart cart);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
package net.minecraft.src.forge;
|
||||
|
||||
import net.minecraft.src.Entity;
|
||||
import net.minecraft.src.EntityMinecart;
|
||||
import net.minecraft.src.EntityPlayer;
|
||||
|
||||
public interface IMinecartHandler {
|
||||
|
||||
/**
|
||||
* This functions is called at the end of every minecart's doUpdate loop.
|
||||
* If you override EntityMinecart.doUpdate(), is recommended that you retain the code that calls this function.
|
||||
* @param cart The cart that called the function.
|
||||
* @param i X coordinate of the rail
|
||||
* @param j Y coordinate of the rail
|
||||
* @param k Z coordinate of the rail
|
||||
*/
|
||||
public void onMinecartUpdate(EntityMinecart minecart, int x, int y, int z);
|
||||
|
||||
/**
|
||||
* This function allows several mods to add code into the collision routine at the same time regardless of the collision handler registered.
|
||||
* If you override EntityMinecart.applyEntityCollision(), is recommended that you retain the code that calls this function.
|
||||
* @param cart The cart that called the function.
|
||||
* @param other
|
||||
*/
|
||||
public void onMinecartEntityCollision(EntityMinecart minecart, Entity entity);
|
||||
|
||||
/**
|
||||
* This function is called whenever a player attempts to interact with a minecart.
|
||||
* The primary reason for this hook is to fix a few bugs and put restrictions on how a minecart can be used under certain circumstances.
|
||||
* If you override EntityMinecart.interact(), is recommended that you retain the code that calls this function.
|
||||
* @param cart The cart that called the function.
|
||||
* @param player The player that tried to interact with the minecart.
|
||||
* @param canceled Wither or not a pervious hook has canceled the interaction of a player.
|
||||
* @return Whether the player can interact with the minecart.
|
||||
*/
|
||||
public boolean onMinecartInteract(EntityMinecart minecart, EntityPlayer player, boolean canceled);
|
||||
|
||||
}
|
||||
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,49 @@
|
||||
package net.minecraft.src.forge;
|
||||
|
||||
import net.minecraft.src.EntityMinecart;
|
||||
|
||||
/**
|
||||
* Used to create hashmap values for Minecart/type pairs
|
||||
* Written by CovertJaguar
|
||||
*/
|
||||
public class MinecartKey {
|
||||
public final Class<? extends EntityMinecart> minecart;
|
||||
public final int type;
|
||||
|
||||
public MinecartKey(Class<? extends EntityMinecart> c, int t)
|
||||
{
|
||||
minecart = c;
|
||||
type = t;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj)
|
||||
{
|
||||
if(obj == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if(getClass() != obj.getClass())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
final MinecartKey other = (MinecartKey)obj;
|
||||
if(this.minecart != other.minecart && (this.minecart == null || !this.minecart.equals(other.minecart)))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return (this.type == other.type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode()
|
||||
{
|
||||
int hash = 7;
|
||||
hash = 59 * hash + (this.minecart != null ? this.minecart.hashCode() : 0);
|
||||
hash = 59 * hash + this.type;
|
||||
return hash;
|
||||
}
|
||||
}
|
||||
+157
-1
@@ -6,6 +6,7 @@
|
||||
package net.minecraft.src.forge;
|
||||
|
||||
import net.minecraft.src.Block;
|
||||
import net.minecraft.src.EntityMinecart;
|
||||
import net.minecraft.src.Item;
|
||||
import net.minecraft.src.ItemStack;
|
||||
import net.minecraft.src.World;
|
||||
@@ -56,6 +57,15 @@ public class MinecraftForge {
|
||||
public static void registerCraftingHandler(ICraftingHandler handler) {
|
||||
ForgeHooks.craftingHandlers.add(handler);
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers a new minecart handler
|
||||
* @param handler The Handler to be registered
|
||||
*/
|
||||
public static void registerMinecartHandler(IMinecartHandler handler)
|
||||
{
|
||||
ForgeHooks.minecartHandlers.add(handler);
|
||||
}
|
||||
|
||||
/**
|
||||
* This is not supposed to be called outside of Minecraft internals.
|
||||
@@ -559,7 +569,6 @@ public class MinecraftForge {
|
||||
|
||||
return rarity;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets a random item stack to place in a dungeon chest during world generation
|
||||
@@ -586,6 +595,149 @@ public class MinecraftForge {
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
//Minecart Dictionary --------------------------------------
|
||||
private static Map<MinecartKey, ItemStack> itemForMinecart = new HashMap<MinecartKey, ItemStack>();
|
||||
private static Map<ItemStack, MinecartKey> minecartForItem = new HashMap<ItemStack, MinecartKey>();
|
||||
/**
|
||||
* Registers a custom minecart and its corresponding item.
|
||||
* This should be the item used to place the minecart by the user,
|
||||
* not the item dropped by the cart.
|
||||
* @param cart The minecart.
|
||||
* @param item The item used to place the cart.
|
||||
*/
|
||||
public static void registerMinecart(Class<? extends EntityMinecart> cart, ItemStack item)
|
||||
{
|
||||
registerMinecart(cart, 0, item);
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers a minecart and its corresponding item.
|
||||
* This should be the item used to place the minecart by the user,
|
||||
* not the item dropped by the cart.
|
||||
* @param minecart The minecart.
|
||||
* @param type The minecart type, used to differentiate carts that have the same class.
|
||||
* @param item The item used to place the cart.
|
||||
*/
|
||||
public static void registerMinecart(Class<? extends EntityMinecart> minecart, int type, ItemStack item)
|
||||
{
|
||||
MinecartKey k = new MinecartKey(minecart, type);
|
||||
itemForMinecart.put(k, item);
|
||||
minecartForItem.put(item, k);
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes a previously registered Minecart. Useful for replacing the vanilla minecarts.
|
||||
* @param minecart
|
||||
* @param type
|
||||
*/
|
||||
public static void removeMinecart(Class<? extends EntityMinecart> minecart, int type)
|
||||
{
|
||||
MinecartKey k = new MinecartKey(minecart, type);
|
||||
ItemStack item = itemForMinecart.remove(k);
|
||||
if(item != null)
|
||||
{
|
||||
minecartForItem.remove(item);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This function returns an ItemStack that represents this cart.
|
||||
* The player should be able to use this item to place the minecart.
|
||||
* This is the item that was registered with the cart via the registerMinecart function,
|
||||
* but is not necessary the item the cart drops when destroyed.
|
||||
* @param minecart The cart class
|
||||
* @return An ItemStack that can be used to place the cart.
|
||||
*/
|
||||
public static ItemStack getItemForCart(Class<? extends EntityMinecart> minecart)
|
||||
{
|
||||
return getItemForCart(minecart, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* This function returns an ItemStack that represents this cart.
|
||||
* The player should be able to use this item to place the minecart.
|
||||
* This is the item that was registered with the cart via the registerMinecart function,
|
||||
* but is not necessary the item the cart drops when destroyed.
|
||||
* @param minecart The cart class
|
||||
* @param type The minecartType value
|
||||
* @return An ItemStack that can be used to place the cart.
|
||||
*/
|
||||
public static ItemStack getItemForCart(Class<? extends EntityMinecart> minecart, int type)
|
||||
{
|
||||
ItemStack item = itemForMinecart.get(new MinecartKey(minecart, type));
|
||||
if (item == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return item.copy();
|
||||
}
|
||||
|
||||
/**
|
||||
* This function returns an ItemStack that represents this cart.
|
||||
* The player should be able to use this item to place the minecart.
|
||||
* This is the item that was registered with the cart via the registerMinecart function,
|
||||
* but is not necessary the item the cart drops when destroyed.
|
||||
* @param cart The cart entity
|
||||
* @return An ItemStack that can be used to place the cart.
|
||||
*/
|
||||
public static ItemStack getItemForCart(EntityMinecart cart)
|
||||
{
|
||||
if(cart.getClass() == EntityMinecart.class)
|
||||
{
|
||||
return getItemForCart(cart.getClass(), cart.getMinecartType());
|
||||
}
|
||||
return getItemForCart(cart.getClass(), 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* The function will return the cart class for a given item.
|
||||
* If the item was not registered via the registerMinecart function it will return null.
|
||||
* @param item The item to test.
|
||||
* @return Cart if mapping exists, null if not.
|
||||
*/
|
||||
public static Class<? extends EntityMinecart> getCartClassForItem(ItemStack item)
|
||||
{
|
||||
MinecartKey k = minecartForItem.get(item);
|
||||
if(k != null)
|
||||
{
|
||||
return k.minecart;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* The function will return the cart type for a given item.
|
||||
* Will return -1 if the mapping doesn't exist.
|
||||
* If the item was not registered via the registerMinecart function it will return null.
|
||||
* @param item The item to test.
|
||||
* @return the cart minecartType value.
|
||||
*/
|
||||
public static int getCartTypeForItem(ItemStack item)
|
||||
{
|
||||
MinecartKey k = minecartForItem.get(item);
|
||||
if(k != null)
|
||||
{
|
||||
return k.type;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Will return a set of all registered minecart items.
|
||||
* @return a copy of the set of all minecart items
|
||||
*/
|
||||
public static Set<ItemStack> getAllCartItems()
|
||||
{
|
||||
Set<ItemStack> ret = new HashSet<ItemStack>();
|
||||
for(ItemStack item : minecartForItem.keySet())
|
||||
{
|
||||
ret.add(item.copy());
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
static
|
||||
{
|
||||
@@ -605,6 +757,10 @@ public class MinecraftForge {
|
||||
addDungeonLoot(new ItemStack(Item.record13), 0.05f );
|
||||
addDungeonLoot(new ItemStack(Item.recordCat), 0.05f );
|
||||
addDungeonLoot(new ItemStack(Item.dyePowder, 1, 3), 1.00f );
|
||||
|
||||
registerMinecart(EntityMinecart.class, 0, new ItemStack(Item.minecartEmpty));
|
||||
registerMinecart(EntityMinecart.class, 1, new ItemStack(Item.minecartCrate));
|
||||
registerMinecart(EntityMinecart.class, 2, new ItemStack(Item.minecartPowered));
|
||||
}
|
||||
|
||||
}
|
||||
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.
@@ -1,33 +1,18 @@
|
||||
diff -u -r --strip-trailing-cr ../src_base/minecraft_server/net/minecraft/server/MinecraftServer.java ../src_work/minecraft_server/net/minecraft/server/MinecraftServer.java
|
||||
--- ../src_base/minecraft_server/net/minecraft/server/MinecraftServer.java 2011-07-17 00:28:07.755771900 +0200
|
||||
+++ ../src_work/minecraft_server/net/minecraft/server/MinecraftServer.java 2011-07-17 00:28:09.485870900 +0200
|
||||
@@ -333,41 +333,22 @@
|
||||
}
|
||||
finally
|
||||
@@ -397,38 +397,7 @@
|
||||
{
|
||||
- System.exit(0);
|
||||
+ try
|
||||
+ {
|
||||
+ stopServer();
|
||||
+ serverStopped = true;
|
||||
+ }
|
||||
+ catch(Throwable throwable2)
|
||||
+ {
|
||||
+ throwable2.printStackTrace();
|
||||
+ }
|
||||
+ finally
|
||||
+ {
|
||||
+ System.exit(0);
|
||||
+ }
|
||||
System.exit(0);
|
||||
}
|
||||
- break MISSING_BLOCK_LABEL_350;
|
||||
- }
|
||||
}
|
||||
- try
|
||||
- {
|
||||
- stopServer();
|
||||
- serverStopped = true;
|
||||
- }
|
||||
- catch(Throwable throwable)
|
||||
- catch (Throwable throwable)
|
||||
- {
|
||||
- throwable.printStackTrace();
|
||||
- }
|
||||
@@ -43,7 +28,7 @@ diff -u -r --strip-trailing-cr ../src_base/minecraft_server/net/minecraft/server
|
||||
- stopServer();
|
||||
- serverStopped = true;
|
||||
- }
|
||||
- catch(Throwable throwable3)
|
||||
- catch (Throwable throwable3)
|
||||
- {
|
||||
- throwable3.printStackTrace();
|
||||
- }
|
||||
@@ -53,10 +38,9 @@ diff -u -r --strip-trailing-cr ../src_base/minecraft_server/net/minecraft/server
|
||||
- }
|
||||
- throw exception2;
|
||||
}
|
||||
+}
|
||||
|
||||
private void doTick()
|
||||
{
|
||||
|
||||
diff U3 ../src_base/minecraft_server/net/minecraft/src/MLProp.java ../src_work/minecraft_server/net/minecraft/src/MLProp.java
|
||||
--- ../src_base/minecraft_server/net/minecraft/src/MLProp.java Wed Nov 30 22:27:22 2011
|
||||
+++ ../src_work/minecraft_server/net/minecraft/src/MLProp.java Sun Dec 04 14:31:04 2011
|
||||
File renamed without changes.
+115
-90
@@ -1,137 +1,89 @@
|
||||
--- ../src_base/minecraft/net/minecraft/src/Block.java 0000-00-00 00:00:00.000000000 -0000
|
||||
+++ ../src_work/minecraft/net/minecraft/src/Block.java 0000-00-00 00:00:00.000000000 -0000
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package net.minecraft.src;
|
||||
|
||||
+import net.minecraft.src.forge.ForgeHooks;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Random;
|
||||
|
||||
@@ -312,12 +313,14 @@
|
||||
@@ -277,12 +278,12 @@
|
||||
|
||||
public float getBlockBrightness(IBlockAccess iblockaccess, int i, int j, int k)
|
||||
{
|
||||
- return iblockaccess.getBrightness(i, j, k, lightValue[blockID]);
|
||||
+ return iblockaccess.getBrightness(i, j, k,
|
||||
+ getLightValue(iblockaccess,i,j,k));
|
||||
+ return iblockaccess.getBrightness(i, j, k, getLightValue(iblockaccess,i,j,k));
|
||||
}
|
||||
|
||||
public int getMixedBrightnessForBlock(IBlockAccess iblockaccess, int i, int j, int k)
|
||||
{
|
||||
- return iblockaccess.getLightBrightnessForSkyBlocks(i, j, k, lightValue[blockID]);
|
||||
+ return iblockaccess.getLightBrightnessForSkyBlocks(i, j, k,
|
||||
+ getLightValue(iblockaccess,i,j,k));
|
||||
+ return iblockaccess.getLightBrightnessForSkyBlocks(i, j, k, getLightValue(iblockaccess,i,j,k));
|
||||
}
|
||||
|
||||
public boolean shouldSideBeRendered(IBlockAccess iblockaccess, int i, int j, int k, int l)
|
||||
@@ -438,25 +441,70 @@
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
-
|
||||
+
|
||||
+ /* FORGE: Metadata-sensitive version.
|
||||
+ */
|
||||
+ public int quantityDropped(int meta, int fortune, Random random)
|
||||
+ {
|
||||
+ return func_40198_a(fortune, random);
|
||||
+ }
|
||||
+
|
||||
+ /* FORGE: Metadata-sensitive version.
|
||||
+ *
|
||||
+ * This is deprecated in MC 1.0+ versions because of the new Enchantment
|
||||
+ * system requiring a new argument. Will be removed unless a valid reason
|
||||
+ * for it to remain is brought to light.
|
||||
+ *
|
||||
+ * Implementing this in your mod will not do anything!
|
||||
+ */
|
||||
+ @Deprecated
|
||||
+ public int quantityDropped(int meta, Random random)
|
||||
+ {
|
||||
+ return quantityDropped(meta, 0, random);
|
||||
+ }
|
||||
+
|
||||
public int idDropped(int i, Random random, int j)
|
||||
{
|
||||
@@ -410,20 +411,15 @@
|
||||
return blockID;
|
||||
}
|
||||
|
||||
+ /* FORGE: This function isnt called by Minecraft anymore. Use
|
||||
+ * blockStrength(EntityPlayer,int) instead.
|
||||
+ /**
|
||||
+ * Deprecated in favor of a metadata sensitive version
|
||||
+ * @param entityplayer Entity attacking the block
|
||||
+ * @return
|
||||
+ */
|
||||
+ @Deprecated
|
||||
public float blockStrength(EntityPlayer entityplayer)
|
||||
{
|
||||
- if(blockHardness < 0.0F)
|
||||
- if (blockHardness < 0.0F)
|
||||
- {
|
||||
- return 0.0F;
|
||||
- }
|
||||
- if(!entityplayer.canHarvestBlock(this))
|
||||
- if (!entityplayer.canHarvestBlock(this))
|
||||
- {
|
||||
- return 1.0F / blockHardness / 100F;
|
||||
- } else
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- return entityplayer.getCurrentPlayerStrVsBlock(this) / blockHardness / 30F;
|
||||
- }
|
||||
+ return blockStrength(entityplayer,0);
|
||||
+ }
|
||||
+
|
||||
+ /* FORGE: This function returns the complete list of drops for a block.
|
||||
+ */
|
||||
+ public ArrayList<ItemStack> getBlockDropped(World world,
|
||||
+ int i, int j, int k, int md, int fortune) {
|
||||
+
|
||||
+ ArrayList<ItemStack> tr = new ArrayList<ItemStack>();
|
||||
+
|
||||
+ int q = quantityDropped(md, fortune, world.rand);
|
||||
+ for (int n = 0; n < q; n++) {
|
||||
+ int id = idDropped(md, world.rand, 0);
|
||||
+ if(id > 0) {
|
||||
+ tr.add(new ItemStack(id, 1, damageDropped(md)));
|
||||
+ }
|
||||
+ }
|
||||
+ return tr;
|
||||
+ }
|
||||
+
|
||||
+ /* FORGE: This function returns the complete list of drops for a block.
|
||||
+ *
|
||||
+ * This is deprecated in MC 1.0+ versions because of the new Enchantment
|
||||
+ * system requiring a new argument. Will be removed unless a valid reason
|
||||
+ * for it to remain is brought to light.
|
||||
+ *
|
||||
+ * Implementing this in your mod will not do anything!
|
||||
+ */
|
||||
+ @Deprecated
|
||||
+ public ArrayList<ItemStack> getBlockDropped(World world,
|
||||
+ int i, int j, int k, int md) {
|
||||
+ return getBlockDropped (world, i, j, k, md, 0);
|
||||
+ return blockStrength(entityplayer, 0);
|
||||
}
|
||||
|
||||
public final void dropBlockAsItem(World world, int i, int j, int k, int l, int i1)
|
||||
@@ -470,18 +518,13 @@
|
||||
@@ -437,18 +433,15 @@
|
||||
{
|
||||
return;
|
||||
}
|
||||
- int j1 = func_40198_a(i1, world.rand);
|
||||
- for(int k1 = 0; k1 < j1; k1++)
|
||||
- {
|
||||
+ ArrayList<ItemStack> ar = getBlockDropped(world, i, j, k, l, i1);
|
||||
+ for (ItemStack ist : ar) {
|
||||
if(world.rand.nextFloat() > f)
|
||||
- int j1 = quantityDroppedWithBonus(i1, world.rand);
|
||||
- for (int k1 = 0; k1 < j1; k1++)
|
||||
+
|
||||
+ ArrayList<ItemStack> items = getBlockDropped(world, i, j, k, l, i1);
|
||||
+ for(ItemStack item : items)
|
||||
{
|
||||
if (world.rand.nextFloat() > f)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
- int l1 = idDropped(l, world.rand, i1);
|
||||
- if(l1 > 0)
|
||||
- if (l1 > 0)
|
||||
- {
|
||||
- dropBlockAsItem_do(world, i, j, k, new ItemStack(l1, 1, damageDropped(l)));
|
||||
- }
|
||||
+ dropBlockAsItem_do(world, i, j, k, ist);
|
||||
+ dropBlockAsItem_do(world, i, j, k, item);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -805,6 +848,200 @@
|
||||
return iblockaccess.isBlockNormalCube(i, j, k) ? 0.2F : 1.0F;
|
||||
|
||||
@@ -696,7 +689,7 @@
|
||||
{
|
||||
entityplayer.addStat(StatList.mineBlockStatArray[blockID], 1);
|
||||
entityplayer.addExhaustion(0.025F);
|
||||
- if (renderAsNormalBlock() && !isBlockContainer[blockID] && EnchantmentHelper.getSilkTouchModifier(entityplayer.inventory))
|
||||
+ if (renderAsNormalBlock() && !hasTileEntity(l) && EnchantmentHelper.getSilkTouchModifier(entityplayer.inventory))
|
||||
{
|
||||
ItemStack itemstack = createStackedBlock(l);
|
||||
if (itemstack != null)
|
||||
@@ -780,6 +773,273 @@
|
||||
{
|
||||
}
|
||||
|
||||
+ /* FORGE: Allow a block to set illumination on a coordinate basis.
|
||||
@@ -143,8 +95,8 @@
|
||||
+ /* FORGE: Implement and return true if you wish this block to behave
|
||||
+ * like a ladder when the player is inside.
|
||||
+ */
|
||||
+ public boolean isLadder() {
|
||||
+ return false;
|
||||
+ public boolean isLadder(World world, int i, int j, int k) {
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
+ /* FORGE: Return true if the block is a normal, solid cube. This
|
||||
@@ -235,8 +187,8 @@
|
||||
+ {
|
||||
+ }
|
||||
+
|
||||
+ private static int blockFireSpreadSpeed[] = new int[256];
|
||||
+ private static int blockFlammability[] = new int[256];
|
||||
+ protected static int blockFireSpreadSpeed[] = new int[256];
|
||||
+ protected static int blockFlammability[] = new int[256];
|
||||
+
|
||||
+ /**
|
||||
+ * Chance that fire will spread and consume this block.
|
||||
@@ -321,12 +273,85 @@
|
||||
+ * @param encouragement How much the block encourages fire to spread
|
||||
+ * @param flammability how easy a block is to catch fire
|
||||
+ */
|
||||
+ protected static void setBurnRate(int id, int encouragement, int flammability)
|
||||
+ public static void setBurnProperties(int id, int encouragement, int flammability)
|
||||
+ {
|
||||
+ blockFireSpreadSpeed[id] = encouragement;
|
||||
+ blockFlammability[id] = flammability;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Called throughout the code as a replacement for block instanceof BlockContainer
|
||||
+ * Moving this to the Block base class allows for mods that wish to extend vinella
|
||||
+ * blocks, and also want to have a tile entity on that block, may.
|
||||
+ *
|
||||
+ * Return true from this function to specify this block has a tile entity.
|
||||
+ *
|
||||
+ * @param metadata Metadata of the current block
|
||||
+ * @return True if block has a tile entity, false otherwise
|
||||
+ */
|
||||
+ public boolean hasTileEntity(int metadata)
|
||||
+ {
|
||||
+ return isBlockContainer[blockID];
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Called throughout the code as a replacement for BlockContainer.getBlockEntity
|
||||
+ * Return the same thing you would from that function.
|
||||
+ * This will fall back to BlockContainer.getBlockEntity if this block is a BlockContainer.
|
||||
+ *
|
||||
+ * @param metadata The Metadata of the current block
|
||||
+ * @return A instance of a class extending TileEntity
|
||||
+ */
|
||||
+ public TileEntity getTileEntity(int metadata)
|
||||
+ {
|
||||
+ if (this instanceof BlockContainer)
|
||||
+ {
|
||||
+ return ((BlockContainer)this).getBlockEntity(metadata);
|
||||
+ }
|
||||
+ return null;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Metadata and fortune sensitive version, this replaces the old (int meta, Random rand)
|
||||
+ * version in 1.1.
|
||||
+ *
|
||||
+ * @param meta Blocks Metadata
|
||||
+ * @param fortune Current item fortune level
|
||||
+ * @param random Random number generator
|
||||
+ * @return The number of items to drop
|
||||
+ */
|
||||
+ public int quantityDropped(int meta, int fortune, Random random)
|
||||
+ {
|
||||
+ return quantityDroppedWithBonus(fortune, random);
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * This returns a complete list of items dropped from this block.
|
||||
+ *
|
||||
+ * @param world The current world
|
||||
+ * @param X X Position
|
||||
+ * @param Y Y Position
|
||||
+ * @param Z Z Position
|
||||
+ * @param metadata Current metadata
|
||||
+ * @param fortune Breakers fortune level
|
||||
+ * @return A ArrayList containing all items this block drops
|
||||
+ */
|
||||
+ public ArrayList<ItemStack> getBlockDropped(World world, int X, int Y, int Z, int metadata, int fortune)
|
||||
+ {
|
||||
+ ArrayList<ItemStack> ret = new ArrayList<ItemStack>();
|
||||
+
|
||||
+ int count = quantityDropped(metadata, fortune, world.rand);
|
||||
+ for(int i = 0; i < count; i++)
|
||||
+ {
|
||||
+ int id = idDropped(metadata, world.rand, 0);
|
||||
+ if (id > 0)
|
||||
+ {
|
||||
+ ret.add(new ItemStack(id, 1, damageDropped(metadata)));
|
||||
+ }
|
||||
+ }
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+
|
||||
static Class _mthclass$(String s)
|
||||
{
|
||||
@@ -0,0 +1,119 @@
|
||||
--- ../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;
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
--- ../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;
|
||||
}
|
||||
+9
-3
@@ -1,6 +1,6 @@
|
||||
--- ../src_base/minecraft/net/minecraft/src/BlockContainer.java 0000-00-00 00:00:00.000000000 -0000
|
||||
+++ ../src_work/minecraft/net/minecraft/src/BlockContainer.java 0000-00-00 00:00:00.000000000 -0000
|
||||
@@ -26,7 +26,7 @@
|
||||
@@ -17,7 +17,7 @@
|
||||
public void onBlockAdded(World world, int i, int j, int k)
|
||||
{
|
||||
super.onBlockAdded(world, i, j, k);
|
||||
@@ -9,13 +9,19 @@
|
||||
}
|
||||
|
||||
public void onBlockRemoval(World world, int i, int j, int k)
|
||||
@@ -37,6 +37,12 @@
|
||||
@@ -28,6 +28,18 @@
|
||||
|
||||
public abstract TileEntity getBlockEntity();
|
||||
|
||||
+ /* FORGE: Metadata-sensitive version, to fix 1.8.1 regression.
|
||||
+ */
|
||||
+ public TileEntity getBlockEntity(int md) {
|
||||
+ /**
|
||||
+ * Metadata-sensitive version, to fix 1.8.1 regression.
|
||||
+ * @param metadata The current Metadata
|
||||
+ * @return And instance of the TileEntity class for this block
|
||||
+ */
|
||||
+ public TileEntity getBlockEntity(int md)
|
||||
+ {
|
||||
+ return getBlockEntity();
|
||||
+ }
|
||||
+
|
||||
+21
-21
@@ -1,36 +1,37 @@
|
||||
--- ../src_base/minecraft/net/minecraft/src/BlockCrops.java 0000-00-00 00:00:00.000000000 -0000
|
||||
+++ ../src_work/minecraft/net/minecraft/src/BlockCrops.java 0000-00-00 00:00:00.000000000 -0000
|
||||
@@ -5,6 +5,7 @@
|
||||
@@ -1,6 +1,7 @@
|
||||
package net.minecraft.src;
|
||||
|
||||
import java.util.Random;
|
||||
+import java.util.ArrayList;
|
||||
|
||||
// Referenced classes of package net.minecraft.src:
|
||||
// BlockFlower, Block, World, EntityItem,
|
||||
@@ -108,28 +109,22 @@
|
||||
public class BlockCrops extends BlockFlower
|
||||
{
|
||||
@@ -98,27 +99,23 @@
|
||||
return 6;
|
||||
}
|
||||
|
||||
- public void dropBlockAsItemWithChance(World world, int i, int j, int k, int l, float f, int i1)
|
||||
- {
|
||||
- super.dropBlockAsItemWithChance(world, i, j, k, l, f, 0);
|
||||
- if(world.multiplayerWorld)
|
||||
+ @Override
|
||||
+ public ArrayList<ItemStack> getBlockDropped(World world, int i, int j, int k, int md, int fortune) {
|
||||
+ ArrayList<ItemStack> tr = new ArrayList<ItemStack>();
|
||||
+ if (md == 7)
|
||||
{
|
||||
+ public ArrayList<ItemStack> getBlockDropped(World world, int i, int j, int k, int meta, int fortune)
|
||||
{
|
||||
- super.dropBlockAsItemWithChance(world, i, j, k, l, f, 0);
|
||||
- if (world.multiplayerWorld)
|
||||
- {
|
||||
- return;
|
||||
+ tr.add(new ItemStack(Item.wheat));
|
||||
+ ArrayList<ItemStack> ret = new ArrayList<ItemStack>();
|
||||
+ if (meta == 7)
|
||||
+ {
|
||||
+ ret.add(new ItemStack(Item.wheat));
|
||||
}
|
||||
- int j1 = 3 + i1;
|
||||
- for(int k1 = 0; k1 < j1; k1++)
|
||||
+
|
||||
+ for(int n = 0; n < 3+fortune; n++)
|
||||
- for (int k1 = 0; k1 < j1; k1++)
|
||||
+
|
||||
+ for (int n = 0; n < 3 + fortune; n++)
|
||||
{
|
||||
- if(world.rand.nextInt(15) <= l)
|
||||
+ if (world.rand.nextInt(15) <= md)
|
||||
- if (world.rand.nextInt(15) <= l)
|
||||
+ if (world.rand.nextInt(15) <= meta)
|
||||
{
|
||||
- float f1 = 0.7F;
|
||||
- float f2 = world.rand.nextFloat() * f1 + (1.0F - f1) * 0.5F;
|
||||
@@ -38,12 +39,11 @@
|
||||
- float f4 = world.rand.nextFloat() * f1 + (1.0F - f1) * 0.5F;
|
||||
- EntityItem entityitem = new EntityItem(world, (float)i + f2, (float)j + f3, (float)k + f4, new ItemStack(Item.seeds));
|
||||
- entityitem.delayBeforeCanPickup = 10;
|
||||
- world.entityJoinedWorld(entityitem);
|
||||
+ tr.add(new ItemStack(Item.seeds));
|
||||
- world.spawnEntityInWorld(entityitem);
|
||||
+ ret.add(new ItemStack(Item.seeds));
|
||||
}
|
||||
}
|
||||
-
|
||||
+ return tr;
|
||||
+ return ret;
|
||||
}
|
||||
|
||||
public int idDropped(int i, Random random, int j)
|
||||
+10
-10
@@ -1,29 +1,29 @@
|
||||
--- ../src_base/minecraft/net/minecraft/src/BlockDoor.java 0000-00-00 00:00:00.000000000 -0000
|
||||
+++ ../src_work/minecraft/net/minecraft/src/BlockDoor.java 0000-00-00 00:00:00.000000000 -0000
|
||||
@@ -111,7 +111,7 @@
|
||||
@@ -101,7 +101,7 @@
|
||||
{
|
||||
if(blockMaterial == Material.iron)
|
||||
if (blockMaterial == Material.iron)
|
||||
{
|
||||
- return true;
|
||||
+ return false;
|
||||
}
|
||||
int l = world.getBlockMetadata(i, j, k);
|
||||
if((l & 8) != 0)
|
||||
@@ -178,7 +178,7 @@
|
||||
if ((l & 8) != 0)
|
||||
@@ -169,7 +169,7 @@
|
||||
world.setBlockWithNotify(i, j, k, 0);
|
||||
flag = true;
|
||||
}
|
||||
- if(!world.isBlockNormalCube(i, j - 1, k))
|
||||
+ if(!world.isBlockSolidOnSide(i, j - 1, k,1))
|
||||
- if (!world.isBlockNormalCube(i, j - 1, k))
|
||||
+ if (!world.isBlockSolidOnSide(i, j - 1, k, 1))
|
||||
{
|
||||
world.setBlockWithNotify(i, j, k, 0);
|
||||
flag = true;
|
||||
@@ -241,7 +241,7 @@
|
||||
return false;
|
||||
} else
|
||||
@@ -238,7 +238,7 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
- return world.isBlockNormalCube(i, j - 1, k) && super.canPlaceBlockAt(world, i, j, k) && super.canPlaceBlockAt(world, i, j + 1, k);
|
||||
+ return world.isBlockSolidOnSide(i, j - 1, k,1) && super.canPlaceBlockAt(world, i, j, k) && super.canPlaceBlockAt(world, i, j + 1, k);
|
||||
+ return world.isBlockSolidOnSide(i, j - 1, k, 1) && super.canPlaceBlockAt(world, i, j, k) && super.canPlaceBlockAt(world, i, j + 1, k);
|
||||
}
|
||||
}
|
||||
|
||||
+193
-146
@@ -1,61 +1,58 @@
|
||||
--- ../src_base/minecraft/net/minecraft/src/BlockFire.java 0000-00-00 00:00:00.000000000 -0000
|
||||
+++ ../src_work/minecraft/net/minecraft/src/BlockFire.java 0000-00-00 00:00:00.000000000 -0000
|
||||
@@ -14,14 +14,9 @@
|
||||
public class BlockFire extends Block
|
||||
{
|
||||
|
||||
- private int chanceToEncourageFire[];
|
||||
- private int abilityToCatchFire[];
|
||||
-
|
||||
@@ -10,8 +10,8 @@
|
||||
protected BlockFire(int i, int j)
|
||||
{
|
||||
super(i, j, Material.fire);
|
||||
- chanceToEncourageFire = new int[256];
|
||||
- abilityToCatchFire = new int[256];
|
||||
+ chanceToEncourageFire = Block.blockFireSpreadSpeed;
|
||||
+ abilityToCatchFire = Block.blockFlammability;
|
||||
setTickOnLoad(true);
|
||||
}
|
||||
|
||||
@@ -39,12 +34,6 @@
|
||||
@@ -28,11 +28,10 @@
|
||||
setBurnRate(Block.cloth.blockID, 30, 60);
|
||||
setBurnRate(Block.vine.blockID, 15, 100);
|
||||
}
|
||||
|
||||
- private void setBurnRate(int i, int j, int k)
|
||||
- {
|
||||
-
|
||||
+
|
||||
private void setBurnRate(int i, int j, int k)
|
||||
{
|
||||
- chanceToEncourageFire[i] = j;
|
||||
- abilityToCatchFire[i] = k;
|
||||
- }
|
||||
-
|
||||
+ Block.setBurnProperties(i, j, k);
|
||||
}
|
||||
|
||||
public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int i, int j, int k)
|
||||
{
|
||||
return null;
|
||||
@@ -77,11 +66,9 @@
|
||||
@@ -67,11 +66,9 @@
|
||||
|
||||
public void updateTick(World world, int i, int j, int k, Random random)
|
||||
{
|
||||
- boolean flag = world.getBlockId(i, j - 1, k) == Block.netherrack.blockID;
|
||||
- if((world.worldProvider instanceof WorldProviderEnd) && world.getBlockId(i, j - 1, k) == Block.bedrock.blockID)
|
||||
- if ((world.worldProvider instanceof WorldProviderEnd) && world.getBlockId(i, j - 1, k) == Block.bedrock.blockID)
|
||||
- {
|
||||
- flag = true;
|
||||
- }
|
||||
+ Block base = Block.blocksList[world.getBlockId(i, j - 1, k)];
|
||||
+ Block base = Block.blocksList[world.getBlockId(i, j - 1, k)];
|
||||
+ boolean flag = (base != null && base.isFireSource(world, i, j - 1, k, world.getBlockMetadata(i, j - 1, k), 0));
|
||||
+
|
||||
if(!canPlaceBlockAt(world, i, j, k))
|
||||
if (!canPlaceBlockAt(world, i, j, k))
|
||||
{
|
||||
world.setBlockWithNotify(i, j, k, 0);
|
||||
@@ -99,23 +86,23 @@
|
||||
@@ -89,23 +86,23 @@
|
||||
world.scheduleBlockUpdate(i, j, k, blockID, tickRate());
|
||||
if(!flag && !func_263_h(world, i, j, k))
|
||||
if (!flag && !func_263_h(world, i, j, k))
|
||||
{
|
||||
- if(!world.isBlockNormalCube(i, j - 1, k) || l > 3)
|
||||
+ if(!world.isBlockSolidOnSide(i, j - 1, k, 0) || l > 3)
|
||||
- if (!world.isBlockNormalCube(i, j - 1, k) || l > 3)
|
||||
+ if (!world.isBlockSolidOnSide(i, j - 1, k, 1) || l > 3)
|
||||
{
|
||||
world.setBlockWithNotify(i, j, k, 0);
|
||||
}
|
||||
return;
|
||||
}
|
||||
- if(!flag && !canBlockCatchFire(world, i, j - 1, k) && l == 15 && random.nextInt(4) == 0)
|
||||
+ if(!flag && !canBlockCatchFire(world, i, j - 1, k, 0) && l == 15 && random.nextInt(4) == 0)
|
||||
- if (!flag && !canBlockCatchFire(world, i, j - 1, k) && l == 15 && random.nextInt(4) == 0)
|
||||
+ if (!flag && !canBlockCatchFire(world, i, j - 1, k, 1) && l == 15 && random.nextInt(4) == 0)
|
||||
{
|
||||
world.setBlockWithNotify(i, j, k, 0);
|
||||
return;
|
||||
@@ -68,56 +65,65 @@
|
||||
- tryToCatchBlockOnFire(world, i, j, k + 1, 300, random, l);
|
||||
+ tryToCatchBlockOnFire(world, i + 1, j, k, 300, random, l, 4);
|
||||
+ tryToCatchBlockOnFire(world, i - 1, j, k, 300, random, l, 5);
|
||||
+ tryToCatchBlockOnFire(world, i, j - 1, k, 250, random, l, 0);
|
||||
+ tryToCatchBlockOnFire(world, i, j + 1, k, 250, random, l, 1);
|
||||
+ tryToCatchBlockOnFire(world, i, j - 1, k, 250, random, l, 1);
|
||||
+ tryToCatchBlockOnFire(world, i, j + 1, k, 250, random, l, 0);
|
||||
+ tryToCatchBlockOnFire(world, i, j, k - 1, 300, random, l, 3);
|
||||
+ tryToCatchBlockOnFire(world, i, j, k + 1, 300, random, l, 2);
|
||||
for(int i1 = i - 1; i1 <= i + 1; i1++)
|
||||
for (int i1 = i - 1; i1 <= i + 1; i1++)
|
||||
{
|
||||
for(int j1 = k - 1; j1 <= k + 1; j1++)
|
||||
@@ -155,9 +142,14 @@
|
||||
|
||||
for (int j1 = k - 1; j1 <= k + 1; j1++)
|
||||
@@ -142,9 +139,24 @@
|
||||
}
|
||||
}
|
||||
|
||||
- private void tryToCatchBlockOnFire(World world, int i, int j, int k, int l, Random random, int i1)
|
||||
+ private void tryToCatchBlockOnFire(World world, int i, int j, int k, int l, Random random, int i1, int face)
|
||||
+ /**
|
||||
+ * Deprecated for a side-sensitive version
|
||||
+ */
|
||||
+ @Deprecated
|
||||
private void tryToCatchBlockOnFire(World world, int i, int j, int k, int l, Random random, int i1)
|
||||
{
|
||||
- int j1 = abilityToCatchFire[world.getBlockId(i, j, k)];
|
||||
+ Block block = Block.blocksList[world.getBlockId(i, j, k)];
|
||||
+ int j1 = 0;
|
||||
+ if (block != null)
|
||||
+ {
|
||||
+ j1 = block.getFlammability(world, i, j, k, world.getBlockMetadata(i, j, k), face);
|
||||
+ }
|
||||
if(random.nextInt(l) < j1)
|
||||
+ tryToCatchBlockOnFire(world, i, j, k, l, random, i1, 0);
|
||||
+ }
|
||||
+
|
||||
+ private void tryToCatchBlockOnFire(World world, int i, int j, int k, int l, Random random, int i1, int face)
|
||||
+ {
|
||||
+ int j1 = 0;
|
||||
+ Block block = Block.blocksList[world.getBlockId(i, j, k)];
|
||||
+ if (block != null)
|
||||
+ {
|
||||
+ j1 = block.getFlammability(world, i, j, k, world.getBlockMetadata(i, j, k), face);
|
||||
+ }
|
||||
+
|
||||
if (random.nextInt(l) < j1)
|
||||
{
|
||||
boolean flag = world.getBlockId(i, j, k) == Block.tnt.blockID;
|
||||
@@ -182,27 +174,27 @@
|
||||
@@ -170,27 +182,27 @@
|
||||
|
||||
private boolean func_263_h(World world, int i, int j, int k)
|
||||
{
|
||||
- if(canBlockCatchFire(world, i + 1, j, k))
|
||||
+ if(canBlockCatchFire(world, i + 1, j, k, 4))
|
||||
- if (canBlockCatchFire(world, i + 1, j, k))
|
||||
+ if (canBlockCatchFire(world, i + 1, j, k, 4))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
- if(canBlockCatchFire(world, i - 1, j, k))
|
||||
+ if(canBlockCatchFire(world, i - 1, j, k, 5))
|
||||
- if (canBlockCatchFire(world, i - 1, j, k))
|
||||
+ if (canBlockCatchFire(world, i - 1, j, k, 5))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
- if(canBlockCatchFire(world, i, j - 1, k))
|
||||
+ if(canBlockCatchFire(world, i, j - 1, k, 0))
|
||||
- if (canBlockCatchFire(world, i, j - 1, k))
|
||||
+ if (canBlockCatchFire(world, i, j - 1, k, 1))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
- if(canBlockCatchFire(world, i, j + 1, k))
|
||||
+ if(canBlockCatchFire(world, i, j + 1, k, 1))
|
||||
- if (canBlockCatchFire(world, i, j + 1, k))
|
||||
+ if (canBlockCatchFire(world, i, j + 1, k, 0))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
- if(canBlockCatchFire(world, i, j, k - 1))
|
||||
+ if(canBlockCatchFire(world, i, j, k - 1, 3))
|
||||
- if (canBlockCatchFire(world, i, j, k - 1))
|
||||
+ if (canBlockCatchFire(world, i, j, k - 1, 3))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@@ -126,9 +132,9 @@
|
||||
}
|
||||
|
||||
private int getChanceOfNeighborsEncouragingFire(World world, int i, int j, int k)
|
||||
@@ -213,12 +205,12 @@
|
||||
return 0;
|
||||
} else
|
||||
@@ -202,12 +214,12 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
- l = getChanceToEncourageFire(world, i + 1, j, k, l);
|
||||
- l = getChanceToEncourageFire(world, i - 1, j, k, l);
|
||||
@@ -136,28 +142,134 @@
|
||||
- l = getChanceToEncourageFire(world, i, j + 1, k, l);
|
||||
- l = getChanceToEncourageFire(world, i, j, k - 1, l);
|
||||
- l = getChanceToEncourageFire(world, i, j, k + 1, l);
|
||||
+ l = getChanceToEncourageFire(world, i + 1, j, k, l, 5);
|
||||
+ l = getChanceToEncourageFire(world, i - 1, j, k, l, 4);
|
||||
+ l = getChanceToEncourageFire(world, i, j - 1, k, l, 0);
|
||||
+ l = getChanceToEncourageFire(world, i, j + 1, k, l, 1);
|
||||
+ l = getChanceToEncourageFire(world, i + 1, j, k, l, 4);
|
||||
+ l = getChanceToEncourageFire(world, i - 1, j, k, l, 5);
|
||||
+ l = getChanceToEncourageFire(world, i, j - 1, k, l, 1);
|
||||
+ l = getChanceToEncourageFire(world, i, j + 1, k, l, 0);
|
||||
+ l = getChanceToEncourageFire(world, i, j, k - 1, l, 3);
|
||||
+ l = getChanceToEncourageFire(world, i, j, k + 1, l, 2);
|
||||
return l;
|
||||
}
|
||||
}
|
||||
@@ -228,14 +220,25 @@
|
||||
@@ -217,32 +229,32 @@
|
||||
return false;
|
||||
}
|
||||
|
||||
- public boolean canBlockCatchFire(IBlockAccess iblockaccess, int i, int j, int k)
|
||||
- {
|
||||
+ /**
|
||||
+ * Deprecated for a side-sensitive version
|
||||
+ */
|
||||
+ @Deprecated
|
||||
public boolean canBlockCatchFire(IBlockAccess iblockaccess, int i, int j, int k)
|
||||
{
|
||||
- return chanceToEncourageFire[iblockaccess.getBlockId(i, j, k)] > 0;
|
||||
- }
|
||||
|
||||
- public int getChanceToEncourageFire(World world, int i, int j, int k, int l)
|
||||
+ public boolean canBlockCatchFire(IBlockAccess world, int i, int j, int k, int face)
|
||||
+ return canBlockCatchFire(iblockaccess, i, j, k, 0);
|
||||
}
|
||||
-
|
||||
+
|
||||
+ /**
|
||||
+ * Deprecated for a side-sensitive version
|
||||
+ */
|
||||
+ @Deprecated
|
||||
public int getChanceToEncourageFire(World world, int i, int j, int k, int l)
|
||||
{
|
||||
- int i1 = chanceToEncourageFire[world.getBlockId(i, j, k)];
|
||||
- if (i1 > l)
|
||||
- {
|
||||
- return i1;
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- return l;
|
||||
- }
|
||||
+ return getChanceToEncourageFire(world, i, j, k, l, 0);
|
||||
}
|
||||
|
||||
public boolean canPlaceBlockAt(World world, int i, int j, int k)
|
||||
{
|
||||
- return world.isBlockNormalCube(i, j - 1, k) || func_263_h(world, i, j, k);
|
||||
+ return world.isBlockSolidOnSide(i, j - 1, k, 1) || func_263_h(world, i, j, k);
|
||||
}
|
||||
|
||||
public void onNeighborBlockChange(World world, int i, int j, int k, int l)
|
||||
{
|
||||
- if (!world.isBlockNormalCube(i, j - 1, k) && !func_263_h(world, i, j, k))
|
||||
+ if (!world.isBlockSolidOnSide(i, j - 1, k, 1) && !func_263_h(world, i, j, k))
|
||||
{
|
||||
world.setBlockWithNotify(i, j, k, 0);
|
||||
return;
|
||||
@@ -259,7 +271,7 @@
|
||||
{
|
||||
return;
|
||||
}
|
||||
- if (!world.isBlockNormalCube(i, j - 1, k) && !func_263_h(world, i, j, k))
|
||||
+ if (!world.isBlockSolidOnSide(i, j - 1, k, 1) && !func_263_h(world, i, j, k))
|
||||
{
|
||||
world.setBlockWithNotify(i, j, k, 0);
|
||||
return;
|
||||
@@ -277,7 +289,7 @@
|
||||
{
|
||||
world.playSoundEffect((float)i + 0.5F, (float)j + 0.5F, (float)k + 0.5F, "fire.fire", 1.0F + random.nextFloat(), random.nextFloat() * 0.7F + 0.3F);
|
||||
}
|
||||
- if (world.isBlockNormalCube(i, j - 1, k) || Block.fire.canBlockCatchFire(world, i, j - 1, k))
|
||||
+ if (world.isBlockSolidOnSide(i, j - 1, k, 1) || Block.fire.canBlockCatchFire(world, i, j - 1, k))
|
||||
{
|
||||
for (int l = 0; l < 3; l++)
|
||||
{
|
||||
@@ -289,7 +301,7 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
- if (Block.fire.canBlockCatchFire(world, i - 1, j, k))
|
||||
+ if (Block.fire.canBlockCatchFire(world, i - 1, j, k, 5))
|
||||
{
|
||||
for (int i1 = 0; i1 < 2; i1++)
|
||||
{
|
||||
@@ -299,7 +311,7 @@
|
||||
world.spawnParticle("largesmoke", f1, f7, f13, 0.0D, 0.0D, 0.0D);
|
||||
}
|
||||
}
|
||||
- if (Block.fire.canBlockCatchFire(world, i + 1, j, k))
|
||||
+ if (Block.fire.canBlockCatchFire(world, i + 1, j, k, 4))
|
||||
{
|
||||
for (int j1 = 0; j1 < 2; j1++)
|
||||
{
|
||||
@@ -309,7 +321,7 @@
|
||||
world.spawnParticle("largesmoke", f2, f8, f14, 0.0D, 0.0D, 0.0D);
|
||||
}
|
||||
}
|
||||
- if (Block.fire.canBlockCatchFire(world, i, j, k - 1))
|
||||
+ if (Block.fire.canBlockCatchFire(world, i, j, k - 1, 3))
|
||||
{
|
||||
for (int k1 = 0; k1 < 2; k1++)
|
||||
{
|
||||
@@ -319,7 +331,7 @@
|
||||
world.spawnParticle("largesmoke", f3, f9, f15, 0.0D, 0.0D, 0.0D);
|
||||
}
|
||||
}
|
||||
- if (Block.fire.canBlockCatchFire(world, i, j, k + 1))
|
||||
+ if (Block.fire.canBlockCatchFire(world, i, j, k + 1, 2))
|
||||
{
|
||||
for (int l1 = 0; l1 < 2; l1++)
|
||||
{
|
||||
@@ -329,7 +341,7 @@
|
||||
world.spawnParticle("largesmoke", f4, f10, f16, 0.0D, 0.0D, 0.0D);
|
||||
}
|
||||
}
|
||||
- if (Block.fire.canBlockCatchFire(world, i, j + 1, k))
|
||||
+ if (Block.fire.canBlockCatchFire(world, i, j + 1, k, 0))
|
||||
{
|
||||
for (int i2 = 0; i2 < 2; i2++)
|
||||
{
|
||||
@@ -341,4 +353,41 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
+
|
||||
+ /**
|
||||
+ * Forge: Side sensitive version
|
||||
+ */
|
||||
+ public boolean canBlockCatchFire(IBlockAccess world, int i, int j, int k, int face)
|
||||
+ {
|
||||
+ Block block = Block.blocksList[world.getBlockId(i, j, k)];
|
||||
+ if (block != null)
|
||||
+ {
|
||||
@@ -166,92 +278,27 @@
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Forge: Side sensitive version
|
||||
+ */
|
||||
+ public int getChanceToEncourageFire(World world, int i, int j, int k, int l, int face)
|
||||
+ {
|
||||
+ int i1 = 0;
|
||||
+
|
||||
+ Block block = Block.blocksList[world.getBlockId(i, j, k)];
|
||||
+ if (block != null)
|
||||
+ {
|
||||
+ i1 = block.getFireSpreadSpeed(world, i, j, k, world.getBlockMetadata(i, j, k), face);
|
||||
+ }
|
||||
if(i1 > l)
|
||||
{
|
||||
return i1;
|
||||
@@ -247,12 +250,12 @@
|
||||
|
||||
public boolean canPlaceBlockAt(World world, int i, int j, int k)
|
||||
{
|
||||
- return world.isBlockNormalCube(i, j - 1, k) || func_263_h(world, i, j, k);
|
||||
+ return world.isBlockSolidOnSide(i, j - 1, k, 0) || func_263_h(world, i, j, k);
|
||||
}
|
||||
|
||||
public void onNeighborBlockChange(World world, int i, int j, int k, int l)
|
||||
{
|
||||
- if(!world.isBlockNormalCube(i, j - 1, k) && !func_263_h(world, i, j, k))
|
||||
+ if(!world.isBlockSolidOnSide(i, j - 1, k, 0) && !func_263_h(world, i, j, k))
|
||||
{
|
||||
world.setBlockWithNotify(i, j, k, 0);
|
||||
return;
|
||||
@@ -268,7 +271,7 @@
|
||||
{
|
||||
return;
|
||||
}
|
||||
- if(!world.isBlockNormalCube(i, j - 1, k) && !func_263_h(world, i, j, k))
|
||||
+ if(!world.isBlockSolidOnSide(i, j - 1, k, 0) && !func_263_h(world, i, j, k))
|
||||
{
|
||||
world.setBlockWithNotify(i, j, k, 0);
|
||||
return;
|
||||
@@ -285,7 +288,7 @@
|
||||
{
|
||||
world.playSoundEffect((float)i + 0.5F, (float)j + 0.5F, (float)k + 0.5F, "fire.fire", 1.0F + random.nextFloat(), random.nextFloat() * 0.7F + 0.3F);
|
||||
}
|
||||
- if(world.isBlockNormalCube(i, j - 1, k) || Block.fire.canBlockCatchFire(world, i, j - 1, k))
|
||||
+ if(world.isBlockSolidOnSide(i, j - 1, k, 0) || Block.fire.canBlockCatchFire(world, i, j - 1, k, 0))
|
||||
{
|
||||
for(int l = 0; l < 3; l++)
|
||||
{
|
||||
@@ -297,7 +300,7 @@
|
||||
|
||||
} else
|
||||
{
|
||||
- if(Block.fire.canBlockCatchFire(world, i - 1, j, k))
|
||||
+ if(Block.fire.canBlockCatchFire(world, i - 1, j, k, 4))
|
||||
{
|
||||
for(int i1 = 0; i1 < 2; i1++)
|
||||
{
|
||||
@@ -308,7 +311,7 @@
|
||||
}
|
||||
|
||||
}
|
||||
- if(Block.fire.canBlockCatchFire(world, i + 1, j, k))
|
||||
+ if(Block.fire.canBlockCatchFire(world, i + 1, j, k, 5))
|
||||
{
|
||||
for(int j1 = 0; j1 < 2; j1++)
|
||||
{
|
||||
@@ -319,7 +322,7 @@
|
||||
}
|
||||
|
||||
}
|
||||
- if(Block.fire.canBlockCatchFire(world, i, j, k - 1))
|
||||
+ if(Block.fire.canBlockCatchFire(world, i, j, k - 1, 3))
|
||||
{
|
||||
for(int k1 = 0; k1 < 2; k1++)
|
||||
{
|
||||
@@ -330,7 +333,7 @@
|
||||
}
|
||||
|
||||
}
|
||||
- if(Block.fire.canBlockCatchFire(world, i, j, k + 1))
|
||||
+ if(Block.fire.canBlockCatchFire(world, i, j, k + 1, 2))
|
||||
{
|
||||
for(int l1 = 0; l1 < 2; l1++)
|
||||
{
|
||||
@@ -341,7 +344,7 @@
|
||||
}
|
||||
|
||||
}
|
||||
- if(Block.fire.canBlockCatchFire(world, i, j + 1, k))
|
||||
+ if(Block.fire.canBlockCatchFire(world, i, j + 1, k, 1))
|
||||
{
|
||||
for(int i2 = 0; i2 < 2; i2++)
|
||||
{
|
||||
+
|
||||
+ if (i1 > l)
|
||||
+ {
|
||||
+ return i1;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ return l;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
--- ../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;
|
||||
+ }
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
--- ../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;
|
||||
}
|
||||
+24
-36
@@ -1,56 +1,44 @@
|
||||
--- ../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
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package net.minecraft.src;
|
||||
|
||||
+import java.util.ArrayList;
|
||||
import java.util.Random;
|
||||
|
||||
// Referenced classes of package net.minecraft.src:
|
||||
@@ -65,26 +66,26 @@
|
||||
public class BlockNetherStalk extends BlockFlower
|
||||
@@ -57,25 +58,25 @@
|
||||
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 md, int fortune)
|
||||
+ public ArrayList<ItemStack> getBlockDropped(World world, int i, int j, int k, int meta, int fortune)
|
||||
{
|
||||
- if(world.multiplayerWorld)
|
||||
- if (world.multiplayerWorld)
|
||||
- {
|
||||
- return;
|
||||
- }
|
||||
- int j1 = 1;
|
||||
- if(l >= 3)
|
||||
- {
|
||||
- j1 = 2 + world.rand.nextInt(3);
|
||||
- if(i1 > 0)
|
||||
- {
|
||||
- j1 += world.rand.nextInt(i1 + 1);
|
||||
- }
|
||||
- }
|
||||
- for(int k1 = 0; k1 < j1; k1++)
|
||||
- {
|
||||
- dropBlockAsItem_do(world, i, j, k, new ItemStack(Item.netherStalkSeeds));
|
||||
- }
|
||||
-
|
||||
+ ArrayList<ItemStack> ret = new ArrayList<ItemStack>();
|
||||
+
|
||||
+ int count = 1;
|
||||
+ if (md >= 3)
|
||||
+ {
|
||||
+ count = 2 + world.rand.nextInt(3);
|
||||
+ if (fortune > 0)
|
||||
+ {
|
||||
+ count += world.rand.nextInt(fortune + 1);
|
||||
+ }
|
||||
+ }
|
||||
+ for (int n = 0; n < count; n++)
|
||||
+ {
|
||||
+ ret.add(new ItemStack(Item.netherStalkSeeds));
|
||||
+ }
|
||||
+ return ret;
|
||||
+
|
||||
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)
|
||||
@@ -0,0 +1,11 @@
|
||||
--- ../src_base/minecraft/net/minecraft/src/BlockPistonBase.java 0000-00-00 00:00:00.000000000 -0000
|
||||
+++ ../src_work/minecraft/net/minecraft/src/BlockPistonBase.java 0000-00-00 00:00:00.000000000 -0000
|
||||
@@ -355,7 +355,7 @@
|
||||
return false;
|
||||
}
|
||||
}
|
||||
- return !(Block.blocksList[i] instanceof BlockContainer);
|
||||
+ return !(Block.blocksList[i] != null && Block.blocksList[i].hasTileEntity(world.getBlockMetadata(j, k, l)));
|
||||
}
|
||||
|
||||
private static boolean canExtend(World world, int i, int j, int k, int l)
|
||||
+5
-7
@@ -1,22 +1,20 @@
|
||||
--- ../src_base/minecraft/net/minecraft/src/BlockPressurePlate.java 0000-00-00 00:00:00.000000000 -0000
|
||||
+++ ../src_work/minecraft/net/minecraft/src/BlockPressurePlate.java 0000-00-00 00:00:00.000000000 -0000
|
||||
@@ -48,7 +48,8 @@
|
||||
@@ -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;
|
||||
+ 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)
|
||||
@@ -58,7 +59,8 @@
|
||||
@@ -48,7 +48,7 @@
|
||||
public void onNeighborBlockChange(World world, int i, int j, int k, int l)
|
||||
{
|
||||
boolean flag = false;
|
||||
- if(!world.isBlockNormalCube(i, j - 1, k) && world.getBlockId(i, j - 1, k) != Block.fence.blockID)
|
||||
+ if(!world.isBlockSolidOnSide(i, j - 1, k,1)
|
||||
+ && world.getBlockId(i, j - 1, k) != Block.fence.blockID)
|
||||
- if (!world.isBlockNormalCube(i, j - 1, k) && world.getBlockId(i, j - 1, k) != Block.fence.blockID)
|
||||
+ if (!world.isBlockSolidOnSide(i, j - 1, k, 1) && world.getBlockId(i, j - 1, k) != Block.fence.blockID)
|
||||
{
|
||||
flag = true;
|
||||
}
|
||||
@@ -0,0 +1,201 @@
|
||||
--- ../src_base/minecraft/net/minecraft/src/BlockRail.java 0000-00-00 00:00:00.000000000 -0000
|
||||
+++ ../src_work/minecraft/net/minecraft/src/BlockRail.java 0000-00-00 00:00:00.000000000 -0000
|
||||
@@ -5,16 +5,29 @@
|
||||
public class BlockRail extends Block
|
||||
{
|
||||
private final boolean isPowered;
|
||||
+
|
||||
+ /**
|
||||
+ * Forge: Moved render type to a field and a setter.
|
||||
+ * This allows for a mod to change the render type
|
||||
+ * for vanilla rails, and any mod rails that extend
|
||||
+ * this class.
|
||||
+ */
|
||||
+ private int renderType = 9;
|
||||
+
|
||||
+ public void setRenderType(int value)
|
||||
+ {
|
||||
+ renderType = value;
|
||||
+ }
|
||||
|
||||
public static final boolean isRailBlockAt(World world, int i, int j, int k)
|
||||
{
|
||||
int l = world.getBlockId(i, j, k);
|
||||
- return l == Block.rail.blockID || l == Block.railPowered.blockID || l == Block.railDetector.blockID;
|
||||
+ return Block.blocksList[l] instanceof BlockRail;
|
||||
}
|
||||
|
||||
public static final boolean isRailBlock(int i)
|
||||
{
|
||||
- return i == Block.rail.blockID || i == Block.railPowered.blockID || i == Block.railDetector.blockID;
|
||||
+ return Block.blocksList[i] instanceof BlockRail;
|
||||
}
|
||||
|
||||
protected BlockRail(int i, int j, boolean flag)
|
||||
@@ -81,7 +94,7 @@
|
||||
|
||||
public int getRenderType()
|
||||
{
|
||||
- return 9;
|
||||
+ return renderType;
|
||||
}
|
||||
|
||||
public int quantityDropped(Random random)
|
||||
@@ -91,7 +104,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);
|
||||
}
|
||||
|
||||
public void onBlockAdded(World world, int i, int j, int k)
|
||||
@@ -119,23 +132,23 @@
|
||||
j1 &= 7;
|
||||
}
|
||||
boolean flag = false;
|
||||
- if (!world.isBlockNormalCube(i, j - 1, k))
|
||||
+ if (!world.isBlockSolidOnSide(i, j - 1, k, 1))
|
||||
{
|
||||
flag = true;
|
||||
}
|
||||
- if (j1 == 2 && !world.isBlockNormalCube(i + 1, j, k))
|
||||
+ if (j1 == 2 && !world.isBlockSolidOnSide(i + 1, j, k, 1))
|
||||
{
|
||||
flag = true;
|
||||
}
|
||||
- if (j1 == 3 && !world.isBlockNormalCube(i - 1, j, k))
|
||||
+ if (j1 == 3 && !world.isBlockSolidOnSide(i - 1, j, k, 1))
|
||||
{
|
||||
flag = true;
|
||||
}
|
||||
- if (j1 == 4 && !world.isBlockNormalCube(i, j, k - 1))
|
||||
+ if (j1 == 4 && !world.isBlockSolidOnSide(i, j, k - 1, 1))
|
||||
{
|
||||
flag = true;
|
||||
}
|
||||
- if (j1 == 5 && !world.isBlockNormalCube(i, j, k + 1))
|
||||
+ if (j1 == 5 && !world.isBlockSolidOnSide(i, j, k + 1, 1))
|
||||
{
|
||||
flag = true;
|
||||
}
|
||||
@@ -317,8 +330,119 @@
|
||||
return 0;
|
||||
}
|
||||
|
||||
+ /**
|
||||
+ * This function is no longer called by Minecraft
|
||||
+ */
|
||||
+ @Deprecated
|
||||
static boolean isPoweredBlockRail(BlockRail blockrail)
|
||||
{
|
||||
return blockrail.isPowered;
|
||||
}
|
||||
+
|
||||
+ /**
|
||||
+ * Return true if the rail can make corners.
|
||||
+ * Used by placement logic.
|
||||
+ * @param world The world.
|
||||
+ * @param i The rail X coordinate.
|
||||
+ * @param j The rail Y coordinate.
|
||||
+ * @param k The rail Z coordinate.
|
||||
+ * @return True if the rail can make corners.
|
||||
+ */
|
||||
+ public boolean isFlexibleRail(World world, int i, int j, int k)
|
||||
+ {
|
||||
+ return !isPowered;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Returns true if the rail can make up and down slopes.
|
||||
+ * Used by placement logic.
|
||||
+ * @param world The world.
|
||||
+ * @param i The rail X coordinate.
|
||||
+ * @param j The rail Y coordinate.
|
||||
+ * @param k The rail Z coordinate.
|
||||
+ * @return True if the rail can make slopes.
|
||||
+ */
|
||||
+ public boolean canMakeSlopes(World world, int i, int j, int k)
|
||||
+ {
|
||||
+ return true;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Return the rails metadata (without the power bit if the rail uses one).
|
||||
+ * Can be used to make the cart think the rail something other than it is,
|
||||
+ * for example when making diamond junctions or switches.
|
||||
+ * The cart parameter will often be null unless it it called from EntityMinecart.
|
||||
+ *
|
||||
+ * Valid rail metadata is defined as follows:
|
||||
+ * 0x0: flat track going North-South
|
||||
+ * 0x1: flat track going West-East
|
||||
+ * 0x2: track ascending to the East
|
||||
+ * 0x3: track ascending to the West
|
||||
+ * 0x4: track ascending to the North
|
||||
+ * 0x5: track ascending to the South
|
||||
+ * 0x6: WestNorth corner (connecting East and South)
|
||||
+ * 0x7: EastNorth corner (connecting West and South)
|
||||
+ * 0x8: EastSouth corner (connecting West and North)
|
||||
+ * 0x9: WestSouth corner (connecting East and North)
|
||||
+ *
|
||||
+ * All directions are Notch defined.
|
||||
+ * In MC Beta 1.8.3 the Sun rises in the North.
|
||||
+ * In MC 1.0.0 the Sun rises in the East.
|
||||
+ * @param world The world.
|
||||
+ * @param cart The cart asking for the metadata, null if it is not called by EntityMinecart.
|
||||
+ * @param i The rail X coordinate.
|
||||
+ * @param j The rail Y coordinate.
|
||||
+ * @param k The rail Z coordinate.
|
||||
+ * @return The metadata.
|
||||
+ */
|
||||
+ public int getBasicRailMetadata(IBlockAccess world, EntityMinecart cart, int i, int j, int k)
|
||||
+ {
|
||||
+ int meta = world.getBlockMetadata(i, j, k);
|
||||
+ if(isPowered) {
|
||||
+ meta = meta & 7;
|
||||
+ }
|
||||
+ return meta;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Returns the max speed of the rail at [i, j, k].
|
||||
+ * @param world The world.
|
||||
+ * @param cart The cart on the rail, may be null.
|
||||
+ * @param i The rail X coordinate.
|
||||
+ * @param j The rail Y coordinate.
|
||||
+ * @param k The rail Z coordinate.
|
||||
+ * @return The max speed of the current rail.
|
||||
+ */
|
||||
+ public float getRailMaxSpeed(World world, EntityMinecart cart, int i, int j, int k)
|
||||
+ {
|
||||
+ return 0.4f;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * This function is called by any minecart that passes over this rail.
|
||||
+ * It is called once per update tick that the minecart is on the rail.
|
||||
+ * @param world The world.
|
||||
+ * @param cart The cart on the rail.
|
||||
+ * @param i The rail X coordinate.
|
||||
+ * @param j The rail Y coordinate.
|
||||
+ * @param k The rail Z coordinate.
|
||||
+ */
|
||||
+ public void onMinecartPass(World world, EntityMinecart cart, int i, int j, int k)
|
||||
+ {
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Return true if this rail uses the 4th bit as a power bit.
|
||||
+ * Avoid using this function when getBasicRailMetadata() can be used instead.
|
||||
+ * The only reason to use this function is if you wish to change the rails metadata.
|
||||
+ * @param world The world.
|
||||
+ * @param i The rail X coordinate.
|
||||
+ * @param j The rail Y coordinate.
|
||||
+ * @param k The rail Z coordinate.
|
||||
+ * @return True if the 4th bit is a power bit.
|
||||
+ */
|
||||
+ public boolean hasPowerBit(World world, int i, int j, int k)
|
||||
+ {
|
||||
+ return isPowered;
|
||||
+ }
|
||||
}
|
||||
+8
-8
@@ -1,20 +1,20 @@
|
||||
--- ../src_base/minecraft/net/minecraft/src/BlockRedstoneRepeater.java 0000-00-00 00:00:00.000000000 -0000
|
||||
+++ ../src_work/minecraft/net/minecraft/src/BlockRedstoneRepeater.java 0000-00-00 00:00:00.000000000 -0000
|
||||
@@ -35,7 +35,7 @@
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
public boolean canPlaceBlockAt(World world, int i, int j, int k)
|
||||
{
|
||||
- if(!world.isBlockNormalCube(i, j - 1, k))
|
||||
+ if(!world.isBlockSolidOnSide(i, j - 1, k,1))
|
||||
- if (!world.isBlockNormalCube(i, j - 1, k))
|
||||
+ if (!world.isBlockSolidOnSide(i, j - 1, k, 1))
|
||||
{
|
||||
return false;
|
||||
} else
|
||||
@@ -46,7 +46,7 @@
|
||||
}
|
||||
@@ -40,7 +40,7 @@
|
||||
|
||||
public boolean canBlockStay(World world, int i, int j, int k)
|
||||
{
|
||||
- if(!world.isBlockNormalCube(i, j - 1, k))
|
||||
+ if(!world.isBlockSolidOnSide(i, j - 1, k,1))
|
||||
- if (!world.isBlockNormalCube(i, j - 1, k))
|
||||
+ if (!world.isBlockSolidOnSide(i, j - 1, k, 1))
|
||||
{
|
||||
return false;
|
||||
} else
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
--- ../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;
|
||||
}
|
||||
|
||||
+4
-5
@@ -1,6 +1,6 @@
|
||||
--- ../src_base/minecraft/net/minecraft/src/BlockSnow.java 0000-00-00 00:00:00.000000000 -0000
|
||||
+++ ../src_work/minecraft/net/minecraft/src/BlockSnow.java 0000-00-00 00:00:00.000000000 -0000
|
||||
@@ -82,15 +82,8 @@
|
||||
@@ -75,15 +75,7 @@
|
||||
|
||||
public void harvestBlock(World world, EntityPlayer entityplayer, int i, int j, int k, int l)
|
||||
{
|
||||
@@ -11,14 +11,13 @@
|
||||
- double d2 = (double)(world.rand.nextFloat() * f) + (double)(1.0F - f) * 0.5D;
|
||||
- EntityItem entityitem = new EntityItem(world, (double)i + d, (double)j + d1, (double)k + d2, new ItemStack(i1, 1, 0));
|
||||
- entityitem.delayBeforeCanPickup = 10;
|
||||
- world.entityJoinedWorld(entityitem);
|
||||
- world.spawnEntityInWorld(entityitem);
|
||||
- world.setBlockWithNotify(i, j, k, 0);
|
||||
+
|
||||
+ dropBlockAsItem(world,i,j,k,l,0);
|
||||
+ dropBlockAsItem(world, i, j, k, l, 0);
|
||||
entityplayer.addStat(StatList.mineBlockStatArray[blockID], 1);
|
||||
}
|
||||
|
||||
@@ -101,7 +94,7 @@
|
||||
@@ -94,7 +86,7 @@
|
||||
|
||||
public int quantityDropped(Random random)
|
||||
{
|
||||
@@ -0,0 +1,53 @@
|
||||
--- ../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.multiplayerWorld && entityplayer.getCurrentEquippedItem() != null && entityplayer.getCurrentEquippedItem().itemID == Item.shears.shiftedIndex)
|
||||
Loaded 100 of 222 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user