diff --git a/build.gradle b/build.gradle index b2a925981..4187d7fcf 100644 --- a/build.gradle +++ b/build.gradle @@ -26,7 +26,7 @@ apply plugin: "maven" apply plugin: "net.minecraftforge.gradle.patcher" apply plugin: "net.minecraftforge.gradle.launch4j" -minecraft.version = "1.10.2" +minecraft.version = "1.11-pre1" minecraft { mappings = 'snapshot_nodoc_20161111' diff --git a/jsons/1.11-pre1-dev.json b/jsons/1.11-pre1-dev.json new file mode 100644 index 000000000..a5afe4f47 --- /dev/null +++ b/jsons/1.11-pre1-dev.json @@ -0,0 +1,92 @@ +{ + "id": "@minecraft_version@-@project@@version@", + "time": "@timestamp@", + "releaseTime": "1960-01-01T00:00:00-0700", + "type": "release", + "inheritsFrom": "1.11-pre1", + "minecraftArguments": "--version FML_DEV --tweakClass net.minecraftforge.fml.common.launcher.FMLTweaker", + "libraries": [ + { + "name": "net.minecraft:launchwrapper:1.12" + }, + { + "name": "jline:jline:2.13", + "children": ["sources"], + "url" : "http://repo.maven.apache.org/maven2" + }, + { + "name": "com.google.code.findbugs:jsr305:1.3.9", + "children": ["sources"], + "url" : "http://repo.maven.apache.org/maven2" + }, + { + "name": "org.ow2.asm:asm-debug-all:5.0.3", + "children" : ["sources"], + "url" : "http://repo.maven.apache.org/maven2" + }, + { + "name": "com.typesafe.akka:akka-actor_2.11:2.3.3", + "children" : ["sources"], + "url" : "http://repo.maven.apache.org/maven2" + }, + { + "name": "com.typesafe:config:1.2.1", + "children" : ["sources"], + "url" : "http://repo.maven.apache.org/maven2" + }, + { + "name": "org.scala-lang:scala-actors-migration_2.11:1.1.0", + "children" : ["sources"], + "url" : "http://repo.maven.apache.org/maven2" + }, + { + "name": "org.scala-lang:scala-compiler:2.11.1", + "children" : ["sources"], + "url" : "http://repo.maven.apache.org/maven2" + }, + { + "name": "org.scala-lang.plugins:scala-continuations-library_2.11:1.0.2", + "children" : ["sources"], + "url" : "http://repo.maven.apache.org/maven2" + }, + { + "name": "org.scala-lang.plugins:scala-continuations-plugin_2.11.1:1.0.2", + "children" : ["sources"], + "url" : "http://repo.maven.apache.org/maven2" + }, + { + "name": "org.scala-lang:scala-library:2.11.1", + "children" : ["sources"], + "url" : "http://repo.maven.apache.org/maven2" + }, + { + "name": "org.scala-lang.modules:scala-parser-combinators_2.11:1.0.1", + "children" : ["sources"], + "url" : "http://repo.maven.apache.org/maven2" + }, + { + "name": "org.scala-lang:scala-reflect:2.11.1", + "children" : ["sources"], + "url" : "http://repo.maven.apache.org/maven2" + }, + { + "name": "org.scala-lang.modules:scala-swing_2.11:1.0.1", + "children" : ["sources"], + "url" : "http://repo.maven.apache.org/maven2" + }, + { + "name": "org.scala-lang.modules:scala-xml_2.11:1.0.2", + "children" : ["sources"], + "url" : "http://repo.maven.apache.org/maven2" + }, + { + "name": "lzma:lzma:0.0.1" + }, + { + "name": "java3d:vecmath:1.5.2" + }, + { + "name": "net.sf.trove4j:trove4j:3.0.3" + } + ] +} diff --git a/jsons/1.11-pre1-rel.json b/jsons/1.11-pre1-rel.json new file mode 100644 index 000000000..c49340289 --- /dev/null +++ b/jsons/1.11-pre1-rel.json @@ -0,0 +1,139 @@ +{ +"install": { + "profileName": "@project@", + "target":"@minecraft_version@-@project@@version@", + "path":"@artifact@", + "version":"@project@ @version@", + "filePath":"@universal_jar@", + "welcome":"Welcome to the simple @project@ installer.", + "minecraft":"@minecraft_version@", + "mirrorList" : "http://files.minecraftforge.net/mirror-brand.list", + "logo":"/big_logo.png" +}, +"versionInfo": { + "id": "@minecraft_version@-@project@@version@", + "time": "@timestamp@", + "releaseTime": "1960-01-01T00:00:00-0700", + "type": "release", + "minecraftArguments": "--username ${auth_player_name} --version ${version_name} --gameDir ${game_directory} --assetsDir ${assets_root} --assetIndex ${assets_index_name} --uuid ${auth_uuid} --accessToken ${auth_access_token} --userType ${user_type} --tweakClass net.minecraftforge.fml.common.launcher.FMLTweaker --versionType Forge", + "mainClass": "net.minecraft.launchwrapper.Launch", + "inheritsFrom": "1.11-pre1", + "jar": "1.11-pre1", + "libraries": [ + { + "name": "@artifact@", + "url": "http://files.minecraftforge.net/maven/" + }, + { + "name": "net.minecraft:launchwrapper:1.12", + "serverreq":true + }, + { + "name": "org.ow2.asm:asm-all:5.0.3", + "serverreq":true + }, + { + "name": "jline:jline:2.13", + "url" : "http://files.minecraftforge.net/maven/", + "checksums" : [ "2d9530d0a25daffaffda7c35037b046b627bb171" ], + "serverreq":true, + "clientreq":false + }, + { + "name": "com.typesafe.akka:akka-actor_2.11:2.3.3", + "url" : "http://files.minecraftforge.net/maven/", + "checksums" : [ "ed62e9fc709ca0f2ff1a3220daa8b70a2870078e", "25a86ccfdb6f6dfe08971f4825d0a01be83a6f2e" ], + "serverreq":true, + "clientreq":true + }, + { + "name": "com.typesafe:config:1.2.1", + "url" : "http://files.minecraftforge.net/maven/", + "checksums" : [ "f771f71fdae3df231bcd54d5ca2d57f0bf93f467", "7d7bc36df0989d72f2d5d057309675777acc528b" ], + "serverreq":true, + "clientreq":true + }, + { + "name": "org.scala-lang:scala-actors-migration_2.11:1.1.0", + "url" : "http://files.minecraftforge.net/maven/", + "checksums" : [ "dfa8bc42b181d5b9f1a5dd147f8ae308b893eb6f", "8c9aaeeb68487ca519411a14068e1b4d69739207" ], + "serverreq":true, + "clientreq":true + }, + { + "name": "org.scala-lang:scala-compiler:2.11.1", + "url" : "http://files.minecraftforge.net/maven/", + "checksums" : [ "56ea2e6c025e0821f28d73ca271218b8dd04926a", "1444992390544ba3780867a13ff696a89d7d1639" ], + "serverreq":true, + "clientreq":true + }, + { + "name": "org.scala-lang.plugins:scala-continuations-library_2.11:1.0.2", + "url" : "http://files.minecraftforge.net/maven/", + "checksums" : [ "87213338cd5a153a7712cb574c0ddd2edfee0386", "0b4c1bf8d48993f138d6e10c0c144e50acfff581" ], + "serverreq":true, + "clientreq":true + }, + { + "name": "org.scala-lang.plugins:scala-continuations-plugin_2.11.1:1.0.2", + "url" : "http://files.minecraftforge.net/maven/", + "checksums" : [ "1f7371605d4ba42aa26d3443440c0083c587b4e9", "1ea655dda4504ae0a367327e2340cd3beaee6c73" ], + "serverreq":true, + "clientreq":true + }, + { + "name": "org.scala-lang:scala-library:2.11.1", + "url" : "http://files.minecraftforge.net/maven/", + "checksums" : [ "0e11da23da3eabab9f4777b9220e60d44c1aab6a", "1e4df76e835201c6eabd43adca89ab11f225f134" ], + "serverreq":true, + "clientreq":true + }, + { + "name": "org.scala-lang:scala-parser-combinators_2.11:1.0.1", + "url" : "http://files.minecraftforge.net/maven/", + "checksums" : [ "f05d7345bf5a58924f2837c6c1f4d73a938e1ff0", "a1cbbcbde1dcc614f4253ed1aa0b320bc78d8f1d" ], + "serverreq":true, + "clientreq":true + }, + { + "name": "org.scala-lang:scala-reflect:2.11.1", + "url" : "http://files.minecraftforge.net/maven/", + "checksums" : [ "6580347e61cc7f8e802941e7fde40fa83b8badeb", "91ce0f0be20f4a536321724b4b3bbc6530ddcd88" ], + "serverreq":true, + "clientreq":true + }, + { + "name": "org.scala-lang:scala-swing_2.11:1.0.1", + "url" : "http://files.minecraftforge.net/maven/", + "checksums" : [ "b1cdd92bd47b1e1837139c1c53020e86bb9112ae", "d77152691dcf5bbdb00529af37aa7d3d887b3e63" ], + "serverreq":true, + "clientreq":true + }, + { + "name": "org.scala-lang:scala-xml_2.11:1.0.2", + "url" : "http://files.minecraftforge.net/maven/", + "checksums" : [ "7a80ec00aec122fba7cd4e0d4cdd87ff7e4cb6d0", "62736b01689d56b6d09a0164b7ef9da2b0b9633d" ], + "serverreq":true, + "clientreq":true + }, + { + "name": "lzma:lzma:0.0.1", + "serverreq":true + }, + { + "name": "net.sf.jopt-simple:jopt-simple:4.6", + "serverreq":true + }, + { + "name": "java3d:vecmath:1.5.2", + "clientreq":true, + "serverreq":true + }, + { + "name": "net.sf.trove4j:trove4j:3.0.3", + "clientreq":true, + "serverreq":true + } + ] +} +} diff --git a/jsons/1.11-pre1.json b/jsons/1.11-pre1.json new file mode 100644 index 000000000..629ebab96 --- /dev/null +++ b/jsons/1.11-pre1.json @@ -0,0 +1,563 @@ +{ + "assetIndex": { + "id": "1.11", + "sha1": "a3d659674093b94bb39b9ddc7d63ed75c7a340e0", + "size": 157388, + "url": "https://launchermeta.mojang.com/mc/assets/1.11/a3d659674093b94bb39b9ddc7d63ed75c7a340e0/1.11.json", + "totalSize": 123827946 + }, + "assets": "1.11", + "downloads": { + "client": { + "sha1": "fdc07c099ad33f77c426464754841747a09ee8d7", + "size": 9183464, + "url": "https://launcher.mojang.com/mc/game/1.11-pre1/client/fdc07c099ad33f77c426464754841747a09ee8d7/client.jar" + }, + "server": { + "sha1": "7e2884f11e3fb52ed1ad82376e3cada3aa95152e", + "size": 9713399, + "url": "https://launcher.mojang.com/mc/game/1.11-pre1/server/7e2884f11e3fb52ed1ad82376e3cada3aa95152e/server.jar" + } + }, + "id": "1.11-pre1", + "libraries": [ + { + "name": "com.mojang:netty:1.6", + "downloads": { + "artifact": { + "size": 7877, + "sha1": "4b75825a06139752bd800d9e29c5fd55b8b1b1e4", + "path": "com/mojang/netty/1.6/netty-1.6.jar", + "url": "https://libraries.minecraft.net/com/mojang/netty/1.6/netty-1.6.jar" + } + } + }, + { + "name": "oshi-project:oshi-core:1.1", + "downloads": { + "artifact": { + "size": 30973, + "sha1": "9ddf7b048a8d701be231c0f4f95fd986198fd2d8", + "path": "oshi-project/oshi-core/1.1/oshi-core-1.1.jar", + "url": "https://libraries.minecraft.net/oshi-project/oshi-core/1.1/oshi-core-1.1.jar" + } + } + }, + { + "name": "net.java.dev.jna:jna:3.4.0", + "downloads": { + "artifact": { + "size": 1008730, + "sha1": "803ff252fedbd395baffd43b37341dc4a150a554", + "path": "net/java/dev/jna/jna/3.4.0/jna-3.4.0.jar", + "url": "https://libraries.minecraft.net/net/java/dev/jna/jna/3.4.0/jna-3.4.0.jar" + } + } + }, + { + "name": "net.java.dev.jna:platform:3.4.0", + "downloads": { + "artifact": { + "size": 913436, + "sha1": "e3f70017be8100d3d6923f50b3d2ee17714e9c13", + "path": "net/java/dev/jna/platform/3.4.0/platform-3.4.0.jar", + "url": "https://libraries.minecraft.net/net/java/dev/jna/platform/3.4.0/platform-3.4.0.jar" + } + } + }, + { + "name": "com.ibm.icu:icu4j-core-mojang:51.2", + "downloads": { + "artifact": { + "size": 1634692, + "sha1": "63d216a9311cca6be337c1e458e587f99d382b84", + "path": "com/ibm/icu/icu4j-core-mojang/51.2/icu4j-core-mojang-51.2.jar", + "url": "https://libraries.minecraft.net/com/ibm/icu/icu4j-core-mojang/51.2/icu4j-core-mojang-51.2.jar" + } + } + }, + { + "name": "net.sf.jopt-simple:jopt-simple:4.6", + "downloads": { + "artifact": { + "size": 62477, + "sha1": "306816fb57cf94f108a43c95731b08934dcae15c", + "path": "net/sf/jopt-simple/jopt-simple/4.6/jopt-simple-4.6.jar", + "url": "https://libraries.minecraft.net/net/sf/jopt-simple/jopt-simple/4.6/jopt-simple-4.6.jar" + } + } + }, + { + "name": "com.paulscode:codecjorbis:20101023", + "downloads": { + "artifact": { + "size": 103871, + "sha1": "c73b5636faf089d9f00e8732a829577de25237ee", + "path": "com/paulscode/codecjorbis/20101023/codecjorbis-20101023.jar", + "url": "https://libraries.minecraft.net/com/paulscode/codecjorbis/20101023/codecjorbis-20101023.jar" + } + } + }, + { + "name": "com.paulscode:codecwav:20101023", + "downloads": { + "artifact": { + "size": 5618, + "sha1": "12f031cfe88fef5c1dd36c563c0a3a69bd7261da", + "path": "com/paulscode/codecwav/20101023/codecwav-20101023.jar", + "url": "https://libraries.minecraft.net/com/paulscode/codecwav/20101023/codecwav-20101023.jar" + } + } + }, + { + "name": "com.paulscode:libraryjavasound:20101123", + "downloads": { + "artifact": { + "size": 21679, + "sha1": "5c5e304366f75f9eaa2e8cca546a1fb6109348b3", + "path": "com/paulscode/libraryjavasound/20101123/libraryjavasound-20101123.jar", + "url": "https://libraries.minecraft.net/com/paulscode/libraryjavasound/20101123/libraryjavasound-20101123.jar" + } + } + }, + { + "name": "com.paulscode:librarylwjglopenal:20100824", + "downloads": { + "artifact": { + "size": 18981, + "sha1": "73e80d0794c39665aec3f62eee88ca91676674ef", + "path": "com/paulscode/librarylwjglopenal/20100824/librarylwjglopenal-20100824.jar", + "url": "https://libraries.minecraft.net/com/paulscode/librarylwjglopenal/20100824/librarylwjglopenal-20100824.jar" + } + } + }, + { + "name": "com.paulscode:soundsystem:20120107", + "downloads": { + "artifact": { + "size": 65020, + "sha1": "419c05fe9be71f792b2d76cfc9b67f1ed0fec7f6", + "path": "com/paulscode/soundsystem/20120107/soundsystem-20120107.jar", + "url": "https://libraries.minecraft.net/com/paulscode/soundsystem/20120107/soundsystem-20120107.jar" + } + } + }, + { + "name": "io.netty:netty-all:4.0.23.Final", + "downloads": { + "artifact": { + "size": 1779991, + "sha1": "0294104aaf1781d6a56a07d561e792c5d0c95f45", + "path": "io/netty/netty-all/4.0.23.Final/netty-all-4.0.23.Final.jar", + "url": "https://libraries.minecraft.net/io/netty/netty-all/4.0.23.Final/netty-all-4.0.23.Final.jar" + } + } + }, + { + "name": "com.google.guava:guava:17.0", + "downloads": { + "artifact": { + "size": 2243036, + "sha1": "9c6ef172e8de35fd8d4d8783e4821e57cdef7445", + "path": "com/google/guava/guava/17.0/guava-17.0.jar", + "url": "https://libraries.minecraft.net/com/google/guava/guava/17.0/guava-17.0.jar" + } + } + }, + { + "name": "org.apache.commons:commons-lang3:3.3.2", + "downloads": { + "artifact": { + "size": 412739, + "sha1": "90a3822c38ec8c996e84c16a3477ef632cbc87a3", + "path": "org/apache/commons/commons-lang3/3.3.2/commons-lang3-3.3.2.jar", + "url": "https://libraries.minecraft.net/org/apache/commons/commons-lang3/3.3.2/commons-lang3-3.3.2.jar" + } + } + }, + { + "name": "commons-io:commons-io:2.4", + "downloads": { + "artifact": { + "size": 185140, + "sha1": "b1b6ea3b7e4aa4f492509a4952029cd8e48019ad", + "path": "commons-io/commons-io/2.4/commons-io-2.4.jar", + "url": "https://libraries.minecraft.net/commons-io/commons-io/2.4/commons-io-2.4.jar" + } + } + }, + { + "name": "commons-codec:commons-codec:1.9", + "downloads": { + "artifact": { + "size": 263965, + "sha1": "9ce04e34240f674bc72680f8b843b1457383161a", + "path": "commons-codec/commons-codec/1.9/commons-codec-1.9.jar", + "url": "https://libraries.minecraft.net/commons-codec/commons-codec/1.9/commons-codec-1.9.jar" + } + } + }, + { + "name": "net.java.jinput:jinput:2.0.5", + "downloads": { + "artifact": { + "size": 208338, + "sha1": "39c7796b469a600f72380316f6b1f11db6c2c7c4", + "path": "net/java/jinput/jinput/2.0.5/jinput-2.0.5.jar", + "url": "https://libraries.minecraft.net/net/java/jinput/jinput/2.0.5/jinput-2.0.5.jar" + } + } + }, + { + "name": "net.java.jutils:jutils:1.0.0", + "downloads": { + "artifact": { + "size": 7508, + "sha1": "e12fe1fda814bd348c1579329c86943d2cd3c6a6", + "path": "net/java/jutils/jutils/1.0.0/jutils-1.0.0.jar", + "url": "https://libraries.minecraft.net/net/java/jutils/jutils/1.0.0/jutils-1.0.0.jar" + } + } + }, + { + "name": "com.google.code.gson:gson:2.2.4", + "downloads": { + "artifact": { + "size": 190432, + "sha1": "a60a5e993c98c864010053cb901b7eab25306568", + "path": "com/google/code/gson/gson/2.2.4/gson-2.2.4.jar", + "url": "https://libraries.minecraft.net/com/google/code/gson/gson/2.2.4/gson-2.2.4.jar" + } + } + }, + { + "name": "com.mojang:authlib:1.5.24", + "downloads": { + "artifact": { + "size": 64353, + "sha1": "0889ff5477b844800cff734babbf42c1bbda4b10", + "path": "com/mojang/authlib/1.5.24/authlib-1.5.24.jar", + "url": "https://libraries.minecraft.net/com/mojang/authlib/1.5.24/authlib-1.5.24.jar" + } + } + }, + { + "name": "com.mojang:realms:1.10.0", + "downloads": { + "artifact": { + "size": 1493992, + "sha1": "e73c98944e2170f895357a703c3322bcd68d1699", + "path": "com/mojang/realms/1.10.0/realms-1.10.0.jar", + "url": "https://libraries.minecraft.net/com/mojang/realms/1.10.0/realms-1.10.0.jar" + } + } + }, + { + "name": "org.apache.commons:commons-compress:1.8.1", + "downloads": { + "artifact": { + "size": 365552, + "sha1": "a698750c16740fd5b3871425f4cb3bbaa87f529d", + "path": "org/apache/commons/commons-compress/1.8.1/commons-compress-1.8.1.jar", + "url": "https://libraries.minecraft.net/org/apache/commons/commons-compress/1.8.1/commons-compress-1.8.1.jar" + } + } + }, + { + "name": "org.apache.httpcomponents:httpclient:4.3.3", + "downloads": { + "artifact": { + "size": 589512, + "sha1": "18f4247ff4572a074444572cee34647c43e7c9c7", + "path": "org/apache/httpcomponents/httpclient/4.3.3/httpclient-4.3.3.jar", + "url": "https://libraries.minecraft.net/org/apache/httpcomponents/httpclient/4.3.3/httpclient-4.3.3.jar" + } + } + }, + { + "name": "commons-logging:commons-logging:1.1.3", + "downloads": { + "artifact": { + "size": 62050, + "sha1": "f6f66e966c70a83ffbdb6f17a0919eaf7c8aca7f", + "path": "commons-logging/commons-logging/1.1.3/commons-logging-1.1.3.jar", + "url": "https://libraries.minecraft.net/commons-logging/commons-logging/1.1.3/commons-logging-1.1.3.jar" + } + } + }, + { + "name": "org.apache.httpcomponents:httpcore:4.3.2", + "downloads": { + "artifact": { + "size": 282269, + "sha1": "31fbbff1ddbf98f3aa7377c94d33b0447c646b6e", + "path": "org/apache/httpcomponents/httpcore/4.3.2/httpcore-4.3.2.jar", + "url": "https://libraries.minecraft.net/org/apache/httpcomponents/httpcore/4.3.2/httpcore-4.3.2.jar" + } + } + }, + { + "name": "it.unimi.dsi:fastutil:7.0.12_mojang", + "downloads": { + "artifact": { + "size": 522306, + "sha1": "ba787e741efdc425fc5d2ea654b57c15fba27efa", + "path": "it/unimi/dsi/fastutil/7.0.12_mojang/fastutil-7.0.12_mojang.jar", + "url": "https://libraries.minecraft.net/it/unimi/dsi/fastutil/7.0.12_mojang/fastutil-7.0.12_mojang.jar" + } + } + }, + { + "name": "org.apache.logging.log4j:log4j-api:2.0-beta9", + "downloads": { + "artifact": { + "size": 108161, + "sha1": "1dd66e68cccd907880229f9e2de1314bd13ff785", + "path": "org/apache/logging/log4j/log4j-api/2.0-beta9/log4j-api-2.0-beta9.jar", + "url": "https://libraries.minecraft.net/org/apache/logging/log4j/log4j-api/2.0-beta9/log4j-api-2.0-beta9.jar" + } + } + }, + { + "name": "org.apache.logging.log4j:log4j-core:2.0-beta9", + "downloads": { + "artifact": { + "size": 681134, + "sha1": "678861ba1b2e1fccb594bb0ca03114bb05da9695", + "path": "org/apache/logging/log4j/log4j-core/2.0-beta9/log4j-core-2.0-beta9.jar", + "url": "https://libraries.minecraft.net/org/apache/logging/log4j/log4j-core/2.0-beta9/log4j-core-2.0-beta9.jar" + } + } + }, + { + "name": "org.lwjgl.lwjgl:lwjgl:2.9.4-nightly-20150209", + "rules": [ + { + "action": "allow" + }, + { + "action": "disallow", + "os": { + "name": "osx" + } + } + ], + "downloads": { + "artifact": { + "size": 1047168, + "sha1": "697517568c68e78ae0b4544145af031c81082dfe", + "path": "org/lwjgl/lwjgl/lwjgl/2.9.4-nightly-20150209/lwjgl-2.9.4-nightly-20150209.jar", + "url": "https://libraries.minecraft.net/org/lwjgl/lwjgl/lwjgl/2.9.4-nightly-20150209/lwjgl-2.9.4-nightly-20150209.jar" + } + } + }, + { + "name": "org.lwjgl.lwjgl:lwjgl_util:2.9.4-nightly-20150209", + "rules": [ + { + "action": "allow" + }, + { + "action": "disallow", + "os": { + "name": "osx" + } + } + ], + "downloads": { + "artifact": { + "size": 173887, + "sha1": "d51a7c040a721d13efdfbd34f8b257b2df882ad0", + "path": "org/lwjgl/lwjgl/lwjgl_util/2.9.4-nightly-20150209/lwjgl_util-2.9.4-nightly-20150209.jar", + "url": "https://libraries.minecraft.net/org/lwjgl/lwjgl/lwjgl_util/2.9.4-nightly-20150209/lwjgl_util-2.9.4-nightly-20150209.jar" + } + } + }, + { + "extract": { + "exclude": [ + "META-INF/" + ] + }, + "name": "org.lwjgl.lwjgl:lwjgl-platform:2.9.4-nightly-20150209", + "natives": { + "linux": "natives-linux", + "osx": "natives-osx", + "windows": "natives-windows" + }, + "rules": [ + { + "action": "allow" + }, + { + "action": "disallow", + "os": { + "name": "osx" + } + } + ], + "downloads": { + "classifiers": { + "natives-linux": { + "size": 578680, + "sha1": "931074f46c795d2f7b30ed6395df5715cfd7675b", + "path": "org/lwjgl/lwjgl/lwjgl-platform/2.9.4-nightly-20150209/lwjgl-platform-2.9.4-nightly-20150209-natives-linux.jar", + "url": "https://libraries.minecraft.net/org/lwjgl/lwjgl/lwjgl-platform/2.9.4-nightly-20150209/lwjgl-platform-2.9.4-nightly-20150209-natives-linux.jar" + }, + "natives-osx": { + "size": 426822, + "sha1": "bcab850f8f487c3f4c4dbabde778bb82bd1a40ed", + "path": "org/lwjgl/lwjgl/lwjgl-platform/2.9.4-nightly-20150209/lwjgl-platform-2.9.4-nightly-20150209-natives-osx.jar", + "url": "https://libraries.minecraft.net/org/lwjgl/lwjgl/lwjgl-platform/2.9.4-nightly-20150209/lwjgl-platform-2.9.4-nightly-20150209-natives-osx.jar" + }, + "natives-windows": { + "size": 613748, + "sha1": "b84d5102b9dbfabfeb5e43c7e2828d98a7fc80e0", + "path": "org/lwjgl/lwjgl/lwjgl-platform/2.9.4-nightly-20150209/lwjgl-platform-2.9.4-nightly-20150209-natives-windows.jar", + "url": "https://libraries.minecraft.net/org/lwjgl/lwjgl/lwjgl-platform/2.9.4-nightly-20150209/lwjgl-platform-2.9.4-nightly-20150209-natives-windows.jar" + } + }, + "artifact": { + "size": 22, + "sha1": "b04f3ee8f5e43fa3b162981b50bb72fe1acabb33", + "path": "org/lwjgl/lwjgl/lwjgl-platform/2.9.4-nightly-20150209/lwjgl-platform-2.9.4-nightly-20150209.jar", + "url": "https://libraries.minecraft.net/org/lwjgl/lwjgl/lwjgl-platform/2.9.4-nightly-20150209/lwjgl-platform-2.9.4-nightly-20150209.jar" + } + } + }, + { + "name": "org.lwjgl.lwjgl:lwjgl:2.9.2-nightly-20140822", + "rules": [ + { + "action": "allow", + "os": { + "name": "osx" + } + } + ], + "downloads": { + "artifact": { + "size": 1045632, + "sha1": "7707204c9ffa5d91662de95f0a224e2f721b22af", + "path": "org/lwjgl/lwjgl/lwjgl/2.9.2-nightly-20140822/lwjgl-2.9.2-nightly-20140822.jar", + "url": "https://libraries.minecraft.net/org/lwjgl/lwjgl/lwjgl/2.9.2-nightly-20140822/lwjgl-2.9.2-nightly-20140822.jar" + } + } + }, + { + "name": "org.lwjgl.lwjgl:lwjgl_util:2.9.2-nightly-20140822", + "rules": [ + { + "action": "allow", + "os": { + "name": "osx" + } + } + ], + "downloads": { + "artifact": { + "size": 173887, + "sha1": "f0e612c840a7639c1f77f68d72a28dae2f0c8490", + "path": "org/lwjgl/lwjgl/lwjgl_util/2.9.2-nightly-20140822/lwjgl_util-2.9.2-nightly-20140822.jar", + "url": "https://libraries.minecraft.net/org/lwjgl/lwjgl/lwjgl_util/2.9.2-nightly-20140822/lwjgl_util-2.9.2-nightly-20140822.jar" + } + } + }, + { + "extract": { + "exclude": [ + "META-INF/" + ] + }, + "name": "org.lwjgl.lwjgl:lwjgl-platform:2.9.2-nightly-20140822", + "natives": { + "linux": "natives-linux", + "osx": "natives-osx", + "windows": "natives-windows" + }, + "rules": [ + { + "action": "allow", + "os": { + "name": "osx" + } + } + ], + "downloads": { + "classifiers": { + "natives-linux": { + "size": 578539, + "sha1": "d898a33b5d0a6ef3fed3a4ead506566dce6720a5", + "path": "org/lwjgl/lwjgl/lwjgl-platform/2.9.2-nightly-20140822/lwjgl-platform-2.9.2-nightly-20140822-natives-linux.jar", + "url": "https://libraries.minecraft.net/org/lwjgl/lwjgl/lwjgl-platform/2.9.2-nightly-20140822/lwjgl-platform-2.9.2-nightly-20140822-natives-linux.jar" + }, + "natives-osx": { + "size": 468116, + "sha1": "79f5ce2fea02e77fe47a3c745219167a542121d7", + "path": "org/lwjgl/lwjgl/lwjgl-platform/2.9.2-nightly-20140822/lwjgl-platform-2.9.2-nightly-20140822-natives-osx.jar", + "url": "https://libraries.minecraft.net/org/lwjgl/lwjgl/lwjgl-platform/2.9.2-nightly-20140822/lwjgl-platform-2.9.2-nightly-20140822-natives-osx.jar" + }, + "natives-windows": { + "size": 613680, + "sha1": "78b2a55ce4dc29c6b3ec4df8ca165eba05f9b341", + "path": "org/lwjgl/lwjgl/lwjgl-platform/2.9.2-nightly-20140822/lwjgl-platform-2.9.2-nightly-20140822-natives-windows.jar", + "url": "https://libraries.minecraft.net/org/lwjgl/lwjgl/lwjgl-platform/2.9.2-nightly-20140822/lwjgl-platform-2.9.2-nightly-20140822-natives-windows.jar" + } + } + } + }, + { + "extract": { + "exclude": [ + "META-INF/" + ] + }, + "name": "net.java.jinput:jinput-platform:2.0.5", + "natives": { + "linux": "natives-linux", + "osx": "natives-osx", + "windows": "natives-windows" + }, + "downloads": { + "classifiers": { + "natives-linux": { + "size": 10362, + "sha1": "7ff832a6eb9ab6a767f1ade2b548092d0fa64795", + "path": "net/java/jinput/jinput-platform/2.0.5/jinput-platform-2.0.5-natives-linux.jar", + "url": "https://libraries.minecraft.net/net/java/jinput/jinput-platform/2.0.5/jinput-platform-2.0.5-natives-linux.jar" + }, + "natives-osx": { + "size": 12186, + "sha1": "53f9c919f34d2ca9de8c51fc4e1e8282029a9232", + "path": "net/java/jinput/jinput-platform/2.0.5/jinput-platform-2.0.5-natives-osx.jar", + "url": "https://libraries.minecraft.net/net/java/jinput/jinput-platform/2.0.5/jinput-platform-2.0.5-natives-osx.jar" + }, + "natives-windows": { + "size": 155179, + "sha1": "385ee093e01f587f30ee1c8a2ee7d408fd732e16", + "path": "net/java/jinput/jinput-platform/2.0.5/jinput-platform-2.0.5-natives-windows.jar", + "url": "https://libraries.minecraft.net/net/java/jinput/jinput-platform/2.0.5/jinput-platform-2.0.5-natives-windows.jar" + } + } + } + } + ], + "logging": { + "client": { + "file": { + "id": "client-1.7.xml", + "sha1": "49e2e41bc339698bd8199e0da9398c926e68c95d", + "size": 467, + "url": "https://launchermeta.mojang.com/mc/log_configs/client-1.7.xml/49e2e41bc339698bd8199e0da9398c926e68c95d/client-1.7.xml" + }, + "argument": "-Dlog4j.configurationFile=${path}", + "type": "log4j2-xml" + } + }, + "mainClass": "net.minecraft.client.main.Main", + "minecraftArguments": "--username ${auth_player_name} --version ${version_name} --gameDir ${game_directory} --assetsDir ${assets_root} --assetIndex ${assets_index_name} --uuid ${auth_uuid} --accessToken ${auth_access_token} --userType ${user_type} --versionType ${version_type}", + "minimumLauncherVersion": 18, + "releaseTime": "2016-11-08T13:42:50+00:00", + "time": "2016-11-08T13:44:29+00:00", + "type": "snapshot" +} diff --git a/patches/minecraft/net/minecraft/block/Block.java.patch b/patches/minecraft/net/minecraft/block/Block.java.patch index 16256f647..e4fde4a45 100644 --- a/patches/minecraft/net/minecraft/block/Block.java.patch +++ b/patches/minecraft/net/minecraft/block/Block.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/block/Block.java +++ ../src-work/minecraft/net/minecraft/block/Block.java -@@ -44,11 +44,12 @@ +@@ -50,11 +50,12 @@ import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -14,9 +14,9 @@ + @Deprecated //Modders: DO NOT use this! Use GameRegistry + public static final ObjectIntIdentityMap field_176229_d = net.minecraftforge.fml.common.registry.GameData.getBlockStateIDMap(); public static final AxisAlignedBB field_185505_j = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 1.0D, 1.0D); + @Nullable public static final AxisAlignedBB field_185506_k = null; - private CreativeTabs field_149772_a; -@@ -84,7 +85,8 @@ +@@ -91,7 +92,8 @@ public static Block func_149729_e(int p_149729_0_) { @@ -26,7 +26,7 @@ } public static IBlockState func_176220_d(int p_176220_0_) -@@ -292,7 +294,7 @@ +@@ -307,7 +309,7 @@ public boolean func_176200_f(IBlockAccess p_176200_1_, BlockPos p_176200_2_) { @@ -35,7 +35,7 @@ } public Block func_149711_c(float p_149711_1_) -@@ -330,9 +332,10 @@ +@@ -345,9 +347,10 @@ return this.field_149789_z; } @@ -47,7 +47,7 @@ } @Deprecated -@@ -376,13 +379,13 @@ +@@ -360,13 +363,13 @@ @SideOnly(Side.CLIENT) public int func_185484_c(IBlockState p_185484_1_, IBlockAccess p_185484_2_, BlockPos p_185484_3_) { @@ -63,7 +63,7 @@ } else { -@@ -446,7 +449,7 @@ +@@ -430,7 +433,7 @@ } } @@ -71,8 +71,8 @@ + return !p_176225_2_.func_180495_p(p_176225_3_.func_177972_a(p_176225_4_)).doesSideBlockRendering(p_176225_2_, p_176225_3_.func_177972_a(p_176225_4_), p_176225_4_.func_176734_d()); } - @Deprecated -@@ -506,6 +509,10 @@ + public boolean func_176212_b(IBlockAccess p_176212_1_, BlockPos p_176212_2_, EnumFacing p_176212_3_) +@@ -521,6 +524,10 @@ public void func_180663_b(World p_180663_1_, BlockPos p_180663_2_, IBlockState p_180663_3_) { @@ -83,7 +83,7 @@ } public int func_149745_a(Random p_149745_1_) -@@ -522,8 +529,7 @@ +@@ -536,8 +543,7 @@ @Deprecated public float func_180647_a(IBlockState p_180647_1_, EntityPlayer p_180647_2_, World p_180647_3_, BlockPos p_180647_4_) { @@ -93,7 +93,7 @@ } public final void func_176226_b(World p_176226_1_, BlockPos p_176226_2_, IBlockState p_176226_3_, int p_176226_4_) -@@ -533,20 +539,16 @@ +@@ -547,20 +553,16 @@ public void func_180653_a(World p_180653_1_, BlockPos p_180653_2_, IBlockState p_180653_3_, float p_180653_4_, int p_180653_5_) { @@ -111,7 +111,7 @@ { - Item item = this.func_180660_a(p_180653_3_, p_180653_1_.field_73012_v, p_180653_5_); - -- if (item != null) +- if (item != Items.field_190931_a) - { - func_180635_a(p_180653_1_, p_180653_2_, new ItemStack(item, 1, this.func_180651_a(p_180653_3_))); - } @@ -119,12 +119,12 @@ } } } -@@ -554,8 +556,13 @@ +@@ -568,8 +570,13 @@ public static void func_180635_a(World p_180635_0_, BlockPos p_180635_1_, ItemStack p_180635_2_) { -- if (!p_180635_0_.field_72995_K && p_180635_0_.func_82736_K().func_82766_b("doTileDrops")) -+ if (!p_180635_0_.field_72995_K && p_180635_0_.func_82736_K().func_82766_b("doTileDrops") && !p_180635_0_.restoringBlockSnapshots) // do not drop items while restoring blockstates, prevents item dupe +- if (!p_180635_0_.field_72995_K && !p_180635_2_.func_190926_b() && p_180635_0_.func_82736_K().func_82766_b("doTileDrops")) ++ if (!p_180635_0_.field_72995_K && !p_180635_2_.func_190926_b() && p_180635_0_.func_82736_K().func_82766_b("doTileDrops")&& !p_180635_0_.restoringBlockSnapshots) // do not drop items while restoring blockstates, prevents item dupe { + if (captureDrops.get()) + { @@ -134,7 +134,7 @@ float f = 0.5F; double d0 = (double)(p_180635_0_.field_73012_v.nextFloat() * 0.5F) + 0.25D; double d1 = (double)(p_180635_0_.field_73012_v.nextFloat() * 0.5F) + 0.25D; -@@ -627,7 +634,7 @@ +@@ -636,7 +643,7 @@ public boolean func_176196_c(World p_176196_1_, BlockPos p_176196_2_) { @@ -142,8 +142,8 @@ + return p_176196_1_.func_180495_p(p_176196_2_).func_177230_c().func_176200_f(p_176196_1_, p_176196_2_); } - public boolean func_180639_a(World p_180639_1_, BlockPos p_180639_2_, IBlockState p_180639_3_, EntityPlayer p_180639_4_, EnumHand p_180639_5_, @Nullable ItemStack p_180639_6_, EnumFacing p_180639_7_, float p_180639_8_, float p_180639_9_, float p_180639_10_) -@@ -639,6 +646,8 @@ + public boolean func_180639_a(World p_180639_1_, BlockPos p_180639_2_, IBlockState p_180639_3_, EntityPlayer p_180639_4_, EnumHand p_180639_5_, EnumFacing p_180639_6_, float p_180639_7_, float p_180639_8_, float p_180639_9_) +@@ -648,6 +655,8 @@ { } @@ -152,21 +152,21 @@ public IBlockState func_180642_a(World p_180642_1_, BlockPos p_180642_2_, EnumFacing p_180642_3_, float p_180642_4_, float p_180642_5_, float p_180642_6_, int p_180642_7_, EntityLivingBase p_180642_8_) { return this.func_176203_a(p_180642_7_); -@@ -680,25 +689,35 @@ +@@ -689,21 +698,35 @@ p_180657_2_.func_71029_a(StatList.func_188055_a(this)); - p_180657_2_.func_71020_j(0.025F); + p_180657_2_.func_71020_j(0.005F); - if (this.func_149700_E() && EnchantmentHelper.func_77506_a(Enchantments.field_185306_r, p_180657_6_) > 0) + if (this.canSilkHarvest(p_180657_1_, p_180657_3_, p_180657_4_, p_180657_2_) && EnchantmentHelper.func_77506_a(Enchantments.field_185306_r, p_180657_6_) > 0) { + java.util.List items = new java.util.ArrayList(); ItemStack itemstack = this.func_180643_i(p_180657_4_); - - if (itemstack != null) - { -- func_180635_a(p_180657_1_, p_180657_3_, itemstack); +- func_180635_a(p_180657_1_, p_180657_3_, itemstack); ++ ++ if (itemstack != null) ++ { + items.add(itemstack); - } ++ } + + net.minecraftforge.event.ForgeEventFactory.fireBlockHarvesting(items, p_180657_1_, p_180657_3_, p_180657_4_, 0, 1.0f, true, p_180657_2_); + for (ItemStack item : items) @@ -190,30 +190,26 @@ + return this.func_176223_P().func_185917_h() && !this.hasTileEntity(silk_check_state.get()); } - @Nullable -@@ -794,9 +813,11 @@ + protected ItemStack func_180643_i(IBlockState p_180643_1_) +@@ -789,6 +812,8 @@ + p_176216_2_.field_70181_x = 0.0D; } - @Nullable ++ @Nullable + @Deprecated // Forge: Use more sensitive version below: getPickBlock public ItemStack func_185473_a(World p_185473_1_, BlockPos p_185473_2_, IBlockState p_185473_3_) { -- return new ItemStack(Item.func_150898_a(this), 1, this.func_180651_a(p_185473_3_)); -+ Item item = Item.func_150898_a(this); -+ return item == null ? null : new ItemStack(item, 1, this.func_180651_a(p_185473_3_)); - } - - @SideOnly(Side.CLIENT) -@@ -883,6 +904,7 @@ - return Block.EnumOffsetType.NONE; + return new ItemStack(Item.func_150898_a(this), 1, this.func_180651_a(p_185473_3_)); +@@ -893,6 +918,7 @@ + } } + @Deprecated // Forge - World/state/pos/entity sensitive version below public SoundType func_185467_w() { return this.field_149762_H; -@@ -893,6 +915,1186 @@ - return "Block{" + field_149771_c.func_177774_c(this) + "}"; +@@ -908,6 +934,1186 @@ + { } + /* ======================================== FORGE START =====================================*/ @@ -1389,7 +1385,7 @@ + * @param stack The stack being used to place this block + * @return The state to be placed in the world + */ -+ public IBlockState getStateForPlacement(World world, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer, ItemStack stack) ++ public IBlockState getStateForPlacement(World world, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer) + { + return func_180642_a(world, pos, facing, hitX, hitY, hitZ, meta, placer); + } @@ -1399,12 +1395,15 @@ public static void func_149671_p() { func_176215_a(0, field_176230_a, (new BlockAir()).func_149663_c("air")); -@@ -1169,11 +2371,7 @@ +@@ -1201,14 +2407,7 @@ } else { -- for (IBlockState iblockstate : block16.func_176194_O().func_177619_a()) +- UnmodifiableIterator lvt_18_2_ = block16.func_176194_O().func_177619_a().iterator(); +- +- while (lvt_18_2_.hasNext()) - { +- IBlockState iblockstate = (IBlockState)lvt_18_2_.next(); - int k = field_149771_c.func_148757_b(block16) << 4 | block16.func_176201_c(iblockstate); - field_176229_d.func_148746_a(iblockstate, k); - } diff --git a/patches/minecraft/net/minecraft/block/BlockBanner.java.patch b/patches/minecraft/net/minecraft/block/BlockBanner.java.patch index aa5eb1502..5eca9f91b 100644 --- a/patches/minecraft/net/minecraft/block/BlockBanner.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockBanner.java.patch @@ -1,21 +1,23 @@ --- ../src-base/minecraft/net/minecraft/block/BlockBanner.java +++ ../src-work/minecraft/net/minecraft/block/BlockBanner.java -@@ -107,14 +107,7 @@ +@@ -89,16 +89,9 @@ public void func_180653_a(World p_180653_1_, BlockPos p_180653_2_, IBlockState p_180653_3_, float p_180653_4_, int p_180653_5_) { -- ItemStack itemstack = this.func_185549_e(p_180653_1_, p_180653_2_, p_180653_3_); +- ItemStack itemstack = this.func_185549_e(p_180653_1_, p_180653_2_); - -- if (itemstack != null) +- if (itemstack.func_190926_b()) { -- func_180635_a(p_180653_1_, p_180653_2_, itemstack); -- } -- else -- { super.func_180653_a(p_180653_1_, p_180653_2_, p_180653_3_, p_180653_4_, p_180653_5_); } +- else +- { +- func_180635_a(p_180653_1_, p_180653_2_, itemstack); +- } } -@@ -141,6 +134,28 @@ + + public boolean func_176196_c(World p_176196_1_, BlockPos p_176196_2_) +@@ -120,6 +113,25 @@ } } @@ -27,12 +29,9 @@ + java.util.List ret = new java.util.ArrayList(); + if (te instanceof TileEntityBanner) + { -+ TileEntityBanner banner = (TileEntityBanner)te; -+ ItemStack item = new ItemStack(Items.field_179564_cE, 1, banner.func_175115_b()); -+ NBTTagCompound nbt = new NBTTagCompound(); -+ TileEntityBanner.func_181020_a(nbt, banner.func_175115_b(), banner.func_181021_d()); -+ item.func_77983_a("BlockEntityTag", nbt); -+ ret.add(item); ++ TileEntityBanner tileentitybanner = (TileEntityBanner)te; ++ ItemStack itemstack = tileentitybanner.func_190615_l(); ++ ret.add(itemstack); + } + else + { diff --git a/patches/minecraft/net/minecraft/block/BlockButton.java.patch b/patches/minecraft/net/minecraft/block/BlockButton.java.patch index d79d251a1..f7e8794be 100644 --- a/patches/minecraft/net/minecraft/block/BlockButton.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockButton.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/block/BlockButton.java +++ ../src-work/minecraft/net/minecraft/block/BlockButton.java -@@ -91,7 +91,7 @@ +@@ -90,7 +90,7 @@ protected static boolean func_181088_a(World p_181088_0_, BlockPos p_181088_1_, EnumFacing p_181088_2_) { BlockPos blockpos = p_181088_1_.func_177972_a(p_181088_2_); diff --git a/patches/minecraft/net/minecraft/block/BlockCactus.java.patch b/patches/minecraft/net/minecraft/block/BlockCactus.java.patch index a159a8c67..aa6a2d155 100644 --- a/patches/minecraft/net/minecraft/block/BlockCactus.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockCactus.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/block/BlockCactus.java +++ ../src-work/minecraft/net/minecraft/block/BlockCactus.java -@@ -18,7 +18,7 @@ +@@ -19,7 +19,7 @@ import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -9,7 +9,7 @@ { public static final PropertyInteger field_176587_a = PropertyInteger.func_177719_a("age", 0, 15); protected static final AxisAlignedBB field_185593_b = new AxisAlignedBB(0.0625D, 0.0D, 0.0625D, 0.9375D, 0.9375D, 0.9375D); -@@ -49,6 +49,8 @@ +@@ -50,6 +50,8 @@ { int j = ((Integer)p_180650_3_.func_177229_b(field_176587_a)).intValue(); @@ -18,7 +18,7 @@ if (j == 15) { p_180650_1_.func_175656_a(blockpos, this.func_176223_P()); -@@ -60,6 +62,8 @@ +@@ -61,6 +63,8 @@ { p_180650_1_.func_180501_a(p_180650_2_, p_180650_3_.func_177226_a(field_176587_a, Integer.valueOf(j + 1)), 4); } @@ -27,7 +27,7 @@ } } } -@@ -110,8 +114,8 @@ +@@ -111,8 +115,8 @@ } } @@ -38,7 +38,7 @@ } public void func_180634_a(World p_180634_1_, BlockPos p_180634_2_, IBlockState p_180634_3_, Entity p_180634_4_) -@@ -135,6 +139,18 @@ +@@ -136,6 +140,18 @@ return ((Integer)p_176201_1_.func_177229_b(field_176587_a)).intValue(); } diff --git a/patches/minecraft/net/minecraft/block/BlockChest.java.patch b/patches/minecraft/net/minecraft/block/BlockChest.java.patch index bb875f7ab..55d6a8433 100644 --- a/patches/minecraft/net/minecraft/block/BlockChest.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockChest.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/block/BlockChest.java +++ ../src-work/minecraft/net/minecraft/block/BlockChest.java -@@ -514,7 +514,7 @@ +@@ -522,7 +522,7 @@ private boolean func_176456_n(World p_176456_1_, BlockPos p_176456_2_) { diff --git a/patches/minecraft/net/minecraft/block/BlockChorusFlower.java.patch b/patches/minecraft/net/minecraft/block/BlockChorusFlower.java.patch index 02ff137db..572e48fff 100644 --- a/patches/minecraft/net/minecraft/block/BlockChorusFlower.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockChorusFlower.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/block/BlockChorusFlower.java +++ ../src-work/minecraft/net/minecraft/block/BlockChorusFlower.java -@@ -52,7 +52,7 @@ +@@ -53,7 +53,7 @@ { int i = ((Integer)p_180650_3_.func_177229_b(field_185607_a)).intValue(); @@ -9,7 +9,7 @@ { boolean flag = false; boolean flag1 = false; -@@ -141,6 +141,7 @@ +@@ -142,6 +142,7 @@ { this.func_185605_c(p_180650_1_, p_180650_2_); } diff --git a/patches/minecraft/net/minecraft/block/BlockCrops.java.patch b/patches/minecraft/net/minecraft/block/BlockCrops.java.patch index 696ab09f2..b0d1832b9 100644 --- a/patches/minecraft/net/minecraft/block/BlockCrops.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockCrops.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/block/BlockCrops.java +++ ../src-work/minecraft/net/minecraft/block/BlockCrops.java -@@ -79,9 +79,10 @@ +@@ -78,9 +78,10 @@ { float f = func_180672_a(this, p_180650_1_, p_180650_2_); @@ -12,7 +12,7 @@ } } } -@@ -117,11 +118,11 @@ +@@ -116,11 +117,11 @@ float f1 = 0.0F; IBlockState iblockstate = p_180672_1_.func_180495_p(blockpos.func_177982_a(i, 0, j)); @@ -26,7 +26,7 @@ { f1 = 3.0F; } -@@ -162,7 +163,8 @@ +@@ -161,7 +162,8 @@ public boolean func_180671_f(World p_180671_1_, BlockPos p_180671_2_, IBlockState p_180671_3_) { @@ -36,7 +36,7 @@ } protected Item func_149866_i() -@@ -175,11 +177,33 @@ +@@ -174,11 +176,33 @@ return Items.field_151015_O; } diff --git a/patches/minecraft/net/minecraft/block/BlockDeadBush.java.patch b/patches/minecraft/net/minecraft/block/BlockDeadBush.java.patch index 8264ec529..a29cac203 100644 --- a/patches/minecraft/net/minecraft/block/BlockDeadBush.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockDeadBush.java.patch @@ -9,16 +9,16 @@ { protected static final AxisAlignedBB field_185516_a = new AxisAlignedBB(0.09999999403953552D, 0.0D, 0.09999999403953552D, 0.8999999761581421D, 0.800000011920929D, 0.8999999761581421D); -@@ -59,7 +59,7 @@ +@@ -58,7 +58,7 @@ - public void func_180657_a(World p_180657_1_, EntityPlayer p_180657_2_, BlockPos p_180657_3_, IBlockState p_180657_4_, @Nullable TileEntity p_180657_5_, @Nullable ItemStack p_180657_6_) + public void func_180657_a(World p_180657_1_, EntityPlayer p_180657_2_, BlockPos p_180657_3_, IBlockState p_180657_4_, @Nullable TileEntity p_180657_5_, ItemStack p_180657_6_) { -- if (!p_180657_1_.field_72995_K && p_180657_6_ != null && p_180657_6_.func_77973_b() == Items.field_151097_aZ) -+ if (false && !p_180657_1_.field_72995_K && p_180657_6_ != null && p_180657_6_.func_77973_b() == Items.field_151097_aZ) // Forge: Noop +- if (!p_180657_1_.field_72995_K && p_180657_6_.func_77973_b() == Items.field_151097_aZ) ++ if (false && !p_180657_1_.field_72995_K && p_180657_6_.func_77973_b() == Items.field_151097_aZ) { p_180657_2_.func_71029_a(StatList.func_188055_a(this)); func_180635_a(p_180657_1_, p_180657_3_, new ItemStack(Blocks.field_150330_I, 1, 0)); -@@ -69,4 +69,11 @@ +@@ -68,4 +68,11 @@ super.func_180657_a(p_180657_1_, p_180657_2_, p_180657_3_, p_180657_4_, p_180657_5_, p_180657_6_); } } diff --git a/patches/minecraft/net/minecraft/block/BlockDoor.java.patch b/patches/minecraft/net/minecraft/block/BlockDoor.java.patch index 7acf535d5..67a569880 100644 --- a/patches/minecraft/net/minecraft/block/BlockDoor.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockDoor.java.patch @@ -1,15 +1,15 @@ --- ../src-base/minecraft/net/minecraft/block/BlockDoor.java +++ ../src-work/minecraft/net/minecraft/block/BlockDoor.java -@@ -108,7 +108,7 @@ +@@ -107,7 +107,7 @@ { if (this.field_149764_J == Material.field_151573_f) { -- return true; +- return false; + return false; //Allow items to interact with the door } else { -@@ -176,7 +176,7 @@ +@@ -175,7 +175,7 @@ flag1 = true; } @@ -18,7 +18,7 @@ { p_189540_2_.func_175698_g(p_189540_3_); flag1 = true; -@@ -221,7 +221,7 @@ +@@ -219,7 +219,7 @@ public boolean func_176196_c(World p_176196_1_, BlockPos p_176196_2_) { diff --git a/patches/minecraft/net/minecraft/block/BlockDoublePlant.java.patch b/patches/minecraft/net/minecraft/block/BlockDoublePlant.java.patch index ff7053ba2..0c4709dca 100644 --- a/patches/minecraft/net/minecraft/block/BlockDoublePlant.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockDoublePlant.java.patch @@ -37,15 +37,15 @@ if (p_180671_3_.func_177229_b(field_176492_b) == BlockDoublePlant.EnumBlockHalf.UPPER) { return p_180671_1_.func_180495_p(p_180671_2_.func_177977_b()).func_177230_c() == this; -@@ -151,7 +149,6 @@ +@@ -150,7 +148,6 @@ - public void func_180657_a(World p_180657_1_, EntityPlayer p_180657_2_, BlockPos p_180657_3_, IBlockState p_180657_4_, @Nullable TileEntity p_180657_5_, @Nullable ItemStack p_180657_6_) + public void func_180657_a(World p_180657_1_, EntityPlayer p_180657_2_, BlockPos p_180657_3_, IBlockState p_180657_4_, @Nullable TileEntity p_180657_5_, ItemStack p_180657_6_) { -- if (p_180657_1_.field_72995_K || p_180657_6_ == null || p_180657_6_.func_77973_b() != Items.field_151097_aZ || p_180657_4_.func_177229_b(field_176492_b) != BlockDoublePlant.EnumBlockHalf.LOWER || !this.func_176489_b(p_180657_1_, p_180657_3_, p_180657_4_, p_180657_2_)) +- if (p_180657_1_.field_72995_K || p_180657_6_.func_77973_b() != Items.field_151097_aZ || p_180657_4_.func_177229_b(field_176492_b) != BlockDoublePlant.EnumBlockHalf.LOWER || !this.func_176489_b(p_180657_1_, p_180657_3_, p_180657_4_, p_180657_2_)) { super.func_180657_a(p_180657_1_, p_180657_2_, p_180657_3_, p_180657_4_, p_180657_5_, p_180657_6_); } -@@ -211,8 +208,6 @@ +@@ -210,8 +207,6 @@ else { p_176489_4_.func_71029_a(StatList.func_188055_a(this)); @@ -54,7 +54,7 @@ return true; } } -@@ -283,6 +278,33 @@ +@@ -281,6 +276,33 @@ return Block.EnumOffsetType.XZ; } diff --git a/patches/minecraft/net/minecraft/block/BlockDragonEgg.java.patch b/patches/minecraft/net/minecraft/block/BlockDragonEgg.java.patch index 3dd148bd4..873f4336c 100644 --- a/patches/minecraft/net/minecraft/block/BlockDragonEgg.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockDragonEgg.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/block/BlockDragonEgg.java +++ ../src-work/minecraft/net/minecraft/block/BlockDragonEgg.java -@@ -49,7 +49,7 @@ +@@ -47,7 +47,7 @@ private void func_180683_d(World p_180683_1_, BlockPos p_180683_2_) { @@ -9,7 +9,7 @@ { int i = 32; -@@ -62,7 +62,7 @@ +@@ -60,7 +60,7 @@ p_180683_1_.func_175698_g(p_180683_2_); BlockPos blockpos; diff --git a/patches/minecraft/net/minecraft/block/BlockDropper.java.patch b/patches/minecraft/net/minecraft/block/BlockDropper.java.patch index 5145575b8..3f71656ac 100644 --- a/patches/minecraft/net/minecraft/block/BlockDropper.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockDropper.java.patch @@ -1,11 +1,11 @@ --- ../src-base/minecraft/net/minecraft/block/BlockDropper.java +++ ../src-work/minecraft/net/minecraft/block/BlockDropper.java -@@ -44,7 +44,7 @@ +@@ -43,7 +43,7 @@ { ItemStack itemstack = tileentitydispenser.func_70301_a(i); -- if (itemstack != null) -+ if (itemstack != null && net.minecraftforge.items.VanillaInventoryCodeHooks.dropperInsertHook(p_176439_1_, p_176439_2_, tileentitydispenser, i, itemstack)) +- if (!itemstack.func_190926_b()) ++ if (!itemstack.func_190926_b() && net.minecraftforge.items.VanillaInventoryCodeHooks.dropperInsertHook(p_176439_1_, p_176439_2_, tileentitydispenser, i, itemstack)) { EnumFacing enumfacing = (EnumFacing)p_176439_1_.func_180495_p(p_176439_2_).func_177229_b(field_176441_a); BlockPos blockpos = p_176439_2_.func_177972_a(enumfacing); diff --git a/patches/minecraft/net/minecraft/block/BlockEnchantmentTable.java.patch b/patches/minecraft/net/minecraft/block/BlockEnchantmentTable.java.patch index b5eb0aa5b..ff0179d37 100644 --- a/patches/minecraft/net/minecraft/block/BlockEnchantmentTable.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockEnchantmentTable.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/block/BlockEnchantmentTable.java +++ ../src-work/minecraft/net/minecraft/block/BlockEnchantmentTable.java -@@ -64,7 +64,7 @@ +@@ -63,7 +63,7 @@ { BlockPos blockpos = p_180655_3_.func_177982_a(i, k, j); diff --git a/patches/minecraft/net/minecraft/block/BlockFarmland.java.patch b/patches/minecraft/net/minecraft/block/BlockFarmland.java.patch index df7254586..75b874ee6 100644 --- a/patches/minecraft/net/minecraft/block/BlockFarmland.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockFarmland.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/block/BlockFarmland.java +++ ../src-work/minecraft/net/minecraft/block/BlockFarmland.java -@@ -83,7 +83,7 @@ +@@ -93,7 +93,7 @@ private boolean func_176529_d(World p_176529_1_, BlockPos p_176529_2_) { Block block = p_176529_1_.func_180495_p(p_176529_2_.func_177984_a()).func_177230_c(); diff --git a/patches/minecraft/net/minecraft/block/BlockFlowerPot.java.patch b/patches/minecraft/net/minecraft/block/BlockFlowerPot.java.patch index 70d9eac0c..c85bf0c1b 100644 --- a/patches/minecraft/net/minecraft/block/BlockFlowerPot.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockFlowerPot.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/block/BlockFlowerPot.java +++ ../src-work/minecraft/net/minecraft/block/BlockFlowerPot.java -@@ -151,13 +151,6 @@ +@@ -165,13 +165,6 @@ public void func_180663_b(World p_180663_1_, BlockPos p_180663_2_, IBlockState p_180663_3_) { @@ -14,7 +14,7 @@ super.func_180663_b(p_180663_1_, p_180663_2_, p_180663_3_); } -@@ -379,6 +372,31 @@ +@@ -392,6 +385,31 @@ return BlockRenderLayer.CUTOUT; } diff --git a/patches/minecraft/net/minecraft/block/BlockGrass.java.patch b/patches/minecraft/net/minecraft/block/BlockGrass.java.patch index 7603eb7f8..73c11c5f9 100644 --- a/patches/minecraft/net/minecraft/block/BlockGrass.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockGrass.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/block/BlockGrass.java +++ ../src-work/minecraft/net/minecraft/block/BlockGrass.java -@@ -39,7 +39,7 @@ +@@ -38,7 +38,7 @@ { if (!p_180650_1_.field_72995_K) { @@ -9,7 +9,7 @@ { p_180650_1_.func_175656_a(p_180650_2_, Blocks.field_150346_d.func_176223_P()); } -@@ -59,7 +59,7 @@ +@@ -58,7 +58,7 @@ IBlockState iblockstate = p_180650_1_.func_180495_p(blockpos.func_177984_a()); IBlockState iblockstate1 = p_180650_1_.func_180495_p(blockpos); @@ -18,7 +18,7 @@ { p_180650_1_.func_175656_a(blockpos, Blocks.field_150349_c.func_176223_P()); } -@@ -98,18 +98,11 @@ +@@ -96,18 +96,11 @@ { if (j >= i / 16) { diff --git a/patches/minecraft/net/minecraft/block/BlockHugeMushroom.java.patch b/patches/minecraft/net/minecraft/block/BlockHugeMushroom.java.patch index 1c4c23501..c4f0ba396 100644 --- a/patches/minecraft/net/minecraft/block/BlockHugeMushroom.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockHugeMushroom.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/block/BlockHugeMushroom.java +++ ../src-work/minecraft/net/minecraft/block/BlockHugeMushroom.java -@@ -223,6 +223,20 @@ +@@ -221,6 +221,20 @@ return new BlockStateContainer(this, new IProperty[] {field_176380_a}); } diff --git a/patches/minecraft/net/minecraft/block/BlockIce.java.patch b/patches/minecraft/net/minecraft/block/BlockIce.java.patch index 9abffdf1b..5b385fabc 100644 --- a/patches/minecraft/net/minecraft/block/BlockIce.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockIce.java.patch @@ -1,20 +1,15 @@ --- ../src-base/minecraft/net/minecraft/block/BlockIce.java +++ ../src-work/minecraft/net/minecraft/block/BlockIce.java -@@ -41,14 +41,19 @@ +@@ -41,9 +41,14 @@ p_180657_2_.func_71029_a(StatList.func_188055_a(this)); - p_180657_2_.func_71020_j(0.025F); + p_180657_2_.func_71020_j(0.005F); - if (this.func_149700_E() && EnchantmentHelper.func_77506_a(Enchantments.field_185306_r, p_180657_6_) > 0) + if (this.canSilkHarvest(p_180657_1_, p_180657_3_, p_180657_4_, p_180657_2_) && EnchantmentHelper.func_77506_a(Enchantments.field_185306_r, p_180657_6_) > 0) { +- func_180635_a(p_180657_1_, p_180657_3_, this.func_180643_i(p_180657_4_)); + java.util.List items = new java.util.ArrayList(); - ItemStack itemstack = this.func_180643_i(p_180657_4_); - - if (itemstack != null) - { -- func_180635_a(p_180657_1_, p_180657_3_, itemstack); -+ items.add(itemstack); - } ++ items.add(this.func_180643_i(p_180657_4_)); + + net.minecraftforge.event.ForgeEventFactory.fireBlockHarvesting(items, p_180657_1_, p_180657_3_, p_180657_4_, 0, 1.0f, true, p_180657_2_); + for (ItemStack is : items) @@ -22,7 +17,7 @@ } else { -@@ -59,7 +64,9 @@ +@@ -54,7 +59,9 @@ } int i = EnchantmentHelper.func_77506_a(Enchantments.field_185308_t, p_180657_6_); diff --git a/patches/minecraft/net/minecraft/block/BlockLeaves.java.patch b/patches/minecraft/net/minecraft/block/BlockLeaves.java.patch index 37bb7d5e0..5c6218204 100644 --- a/patches/minecraft/net/minecraft/block/BlockLeaves.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockLeaves.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/block/BlockLeaves.java +++ ../src-work/minecraft/net/minecraft/block/BlockLeaves.java -@@ -18,7 +18,7 @@ +@@ -17,7 +17,7 @@ import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -9,7 +9,7 @@ { public static final PropertyBool field_176237_a = PropertyBool.func_177716_a("decayable"); public static final PropertyBool field_176236_b = PropertyBool.func_177716_a("check_decay"); -@@ -54,9 +54,9 @@ +@@ -53,9 +53,9 @@ BlockPos blockpos = p_180663_2_.func_177982_a(j1, k1, l1); IBlockState iblockstate = p_180663_1_.func_180495_p(blockpos); @@ -21,7 +21,7 @@ } } } -@@ -97,9 +97,9 @@ +@@ -96,9 +96,9 @@ IBlockState iblockstate = p_180650_1_.func_180495_p(blockpos$mutableblockpos.func_181079_c(k + i2, l + j2, i1 + k2)); Block block = iblockstate.func_177230_c(); @@ -33,7 +33,7 @@ { this.field_150128_a[(i2 + 16) * 1024 + (j2 + 16) * 32 + k2 + 16] = -2; } -@@ -207,40 +207,7 @@ +@@ -205,40 +205,7 @@ public void func_180653_a(World p_180653_1_, BlockPos p_180653_2_, IBlockState p_180653_3_, float p_180653_4_, int p_180653_5_) { @@ -75,7 +75,7 @@ } protected void func_176234_a(World p_176234_1_, BlockPos p_176234_2_, IBlockState p_176234_3_, int p_176234_4_) -@@ -276,6 +243,49 @@ +@@ -274,6 +241,49 @@ public abstract BlockPlanks.EnumType func_176233_b(int p_176233_1_); diff --git a/patches/minecraft/net/minecraft/block/BlockLever.java.patch b/patches/minecraft/net/minecraft/block/BlockLever.java.patch index f48e9f4ab..2768dab85 100644 --- a/patches/minecraft/net/minecraft/block/BlockLever.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockLever.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/block/BlockLever.java +++ ../src-work/minecraft/net/minecraft/block/BlockLever.java -@@ -297,6 +297,12 @@ +@@ -296,6 +296,12 @@ return new BlockStateContainer(this, new IProperty[] {field_176360_a, field_176359_b}); } diff --git a/patches/minecraft/net/minecraft/block/BlockMobSpawner.java.patch b/patches/minecraft/net/minecraft/block/BlockMobSpawner.java.patch index eaf055571..f5093e664 100644 --- a/patches/minecraft/net/minecraft/block/BlockMobSpawner.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockMobSpawner.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/block/BlockMobSpawner.java +++ ../src-work/minecraft/net/minecraft/block/BlockMobSpawner.java -@@ -41,10 +41,14 @@ +@@ -40,10 +40,14 @@ public void func_180653_a(World p_180653_1_, BlockPos p_180653_2_, IBlockState p_180653_3_, float p_180653_4_, int p_180653_5_) { super.func_180653_a(p_180653_1_, p_180653_2_, p_180653_3_, p_180653_4_, p_180653_5_); diff --git a/patches/minecraft/net/minecraft/block/BlockMycelium.java.patch b/patches/minecraft/net/minecraft/block/BlockMycelium.java.patch index 67477c39b..f97644492 100644 --- a/patches/minecraft/net/minecraft/block/BlockMycelium.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockMycelium.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/block/BlockMycelium.java +++ ../src-work/minecraft/net/minecraft/block/BlockMycelium.java -@@ -40,7 +40,7 @@ +@@ -39,7 +39,7 @@ { if (!p_180650_1_.field_72995_K) { @@ -9,7 +9,7 @@ { p_180650_1_.func_175656_a(p_180650_2_, Blocks.field_150346_d.func_176223_P().func_177226_a(BlockDirt.field_176386_a, BlockDirt.DirtType.DIRT)); } -@@ -54,7 +54,7 @@ +@@ -53,7 +53,7 @@ IBlockState iblockstate = p_180650_1_.func_180495_p(blockpos); IBlockState iblockstate1 = p_180650_1_.func_180495_p(blockpos.func_177984_a()); diff --git a/patches/minecraft/net/minecraft/block/BlockNetherWart.java.patch b/patches/minecraft/net/minecraft/block/BlockNetherWart.java.patch index e07ed5028..667541c2b 100644 --- a/patches/minecraft/net/minecraft/block/BlockNetherWart.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockNetherWart.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/block/BlockNetherWart.java +++ ../src-work/minecraft/net/minecraft/block/BlockNetherWart.java -@@ -43,25 +43,28 @@ +@@ -42,25 +42,28 @@ public boolean func_180671_f(World p_180671_1_, BlockPos p_180671_2_, IBlockState p_180671_3_) { @@ -32,7 +32,7 @@ { int i = 1; -@@ -108,6 +111,26 @@ +@@ -106,6 +109,26 @@ return ((Integer)p_176201_1_.func_177229_b(field_176486_a)).intValue(); } diff --git a/patches/minecraft/net/minecraft/block/BlockNewLeaf.java.patch b/patches/minecraft/net/minecraft/block/BlockNewLeaf.java.patch index 12f218dfa..6cf25c84c 100644 --- a/patches/minecraft/net/minecraft/block/BlockNewLeaf.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockNewLeaf.java.patch @@ -2,10 +2,10 @@ +++ ../src-work/minecraft/net/minecraft/block/BlockNewLeaf.java @@ -99,7 +99,7 @@ - public void func_180657_a(World p_180657_1_, EntityPlayer p_180657_2_, BlockPos p_180657_3_, IBlockState p_180657_4_, @Nullable TileEntity p_180657_5_, @Nullable ItemStack p_180657_6_) + public void func_180657_a(World p_180657_1_, EntityPlayer p_180657_2_, BlockPos p_180657_3_, IBlockState p_180657_4_, @Nullable TileEntity p_180657_5_, ItemStack p_180657_6_) { -- if (!p_180657_1_.field_72995_K && p_180657_6_ != null && p_180657_6_.func_77973_b() == Items.field_151097_aZ) -+ if (false && !p_180657_1_.field_72995_K && p_180657_6_ != null && p_180657_6_.func_77973_b() == Items.field_151097_aZ) //Forge: Noop this +- if (!p_180657_1_.field_72995_K && p_180657_6_.func_77973_b() == Items.field_151097_aZ) ++ if (false && !p_180657_1_.field_72995_K && p_180657_6_.func_77973_b() == Items.field_151097_aZ) { p_180657_2_.func_71029_a(StatList.func_188055_a(this)); func_180635_a(p_180657_1_, p_180657_3_, new ItemStack(Item.func_150898_a(this), 1, ((BlockPlanks.EnumType)p_180657_4_.func_177229_b(field_176240_P)).func_176839_a() - 4)); @@ -15,8 +15,8 @@ } + + @Override -+ public List onSheared(ItemStack item, net.minecraft.world.IBlockAccess world, BlockPos pos, int fortune) ++ public NonNullList onSheared(ItemStack item, net.minecraft.world.IBlockAccess world, BlockPos pos, int fortune) + { -+ return java.util.Arrays.asList(new ItemStack(this, 1, world.func_180495_p(pos).func_177229_b(field_176240_P).func_176839_a() - 4)); ++ return NonNullList.func_191197_a(1, new ItemStack(this, 1, world.func_180495_p(pos).func_177229_b(field_176240_P).func_176839_a() - 4)); + } } diff --git a/patches/minecraft/net/minecraft/block/BlockNote.java.patch b/patches/minecraft/net/minecraft/block/BlockNote.java.patch index 658b677d2..af8e8f711 100644 --- a/patches/minecraft/net/minecraft/block/BlockNote.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockNote.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/block/BlockNote.java +++ ../src-work/minecraft/net/minecraft/block/BlockNote.java -@@ -65,7 +65,9 @@ +@@ -63,7 +63,9 @@ if (tileentity instanceof TileEntityNote) { TileEntityNote tileentitynote = (TileEntityNote)tileentity; @@ -10,7 +10,7 @@ tileentitynote.func_175108_a(p_180639_1_, p_180639_2_); p_180639_4_.func_71029_a(StatList.field_188087_U); } -@@ -105,6 +107,10 @@ +@@ -103,6 +105,10 @@ public boolean func_189539_a(IBlockState p_189539_1_, World p_189539_2_, BlockPos p_189539_3_, int p_189539_4_, int p_189539_5_) { diff --git a/patches/minecraft/net/minecraft/block/BlockOldLeaf.java.patch b/patches/minecraft/net/minecraft/block/BlockOldLeaf.java.patch index 70af2e65e..cfebcb1bb 100644 --- a/patches/minecraft/net/minecraft/block/BlockOldLeaf.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockOldLeaf.java.patch @@ -1,7 +1,7 @@ --- ../src-base/minecraft/net/minecraft/block/BlockOldLeaf.java +++ ../src-work/minecraft/net/minecraft/block/BlockOldLeaf.java @@ -104,11 +104,16 @@ - if (!p_180657_1_.field_72995_K && p_180657_6_ != null && p_180657_6_.func_77973_b() == Items.field_151097_aZ) + if (!p_180657_1_.field_72995_K && p_180657_6_.func_77973_b() == Items.field_151097_aZ) { p_180657_2_.func_71029_a(StatList.func_188055_a(this)); - func_180635_a(p_180657_1_, p_180657_3_, new ItemStack(Item.func_150898_a(this), 1, ((BlockPlanks.EnumType)p_180657_4_.func_177229_b(field_176239_P)).func_176839_a())); @@ -13,8 +13,8 @@ } + + @Override -+ public List onSheared(ItemStack item, net.minecraft.world.IBlockAccess world, BlockPos pos, int fortune) ++ public NonNullList onSheared(ItemStack item, net.minecraft.world.IBlockAccess world, BlockPos pos, int fortune) + { -+ return java.util.Arrays.asList(new ItemStack(this, 1, world.func_180495_p(pos).func_177229_b(field_176239_P).func_176839_a())); ++ return NonNullList.func_191197_a(1, new ItemStack(this, 1, world.func_180495_p(pos).func_177229_b(field_176239_P).func_176839_a())); + } } diff --git a/patches/minecraft/net/minecraft/block/BlockOre.java.patch b/patches/minecraft/net/minecraft/block/BlockOre.java.patch index a73fdb7e1..15b1046bc 100644 --- a/patches/minecraft/net/minecraft/block/BlockOre.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockOre.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/block/BlockOre.java +++ ../src-work/minecraft/net/minecraft/block/BlockOre.java -@@ -61,34 +61,39 @@ +@@ -59,34 +59,39 @@ public void func_180653_a(World p_180653_1_, BlockPos p_180653_2_, IBlockState p_180653_3_, float p_180653_4_, int p_180653_5_) { super.func_180653_a(p_180653_1_, p_180653_2_, p_180653_3_, p_180653_4_, p_180653_5_); diff --git a/patches/minecraft/net/minecraft/block/BlockPane.java.patch b/patches/minecraft/net/minecraft/block/BlockPane.java.patch index cd313a6cc..c463646b2 100644 --- a/patches/minecraft/net/minecraft/block/BlockPane.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockPane.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/block/BlockPane.java +++ ../src-work/minecraft/net/minecraft/block/BlockPane.java -@@ -106,7 +106,10 @@ +@@ -107,7 +107,10 @@ public IBlockState func_176221_a(IBlockState p_176221_1_, IBlockAccess p_176221_2_, BlockPos p_176221_3_) { @@ -11,7 +11,7 @@ + .func_177226_a(field_176242_M, canPaneConnectTo(p_176221_2_, p_176221_3_, EnumFacing.EAST)); } - @Nullable + public Item func_180660_a(IBlockState p_180660_1_, Random p_180660_2_, int p_180660_3_) @@ -184,4 +187,11 @@ { return new BlockStateContainer(this, new IProperty[] {field_176241_b, field_176242_M, field_176244_O, field_176243_N}); diff --git a/patches/minecraft/net/minecraft/block/BlockPistonBase.java.patch b/patches/minecraft/net/minecraft/block/BlockPistonBase.java.patch index 063eab9f8..995604bed 100644 --- a/patches/minecraft/net/minecraft/block/BlockPistonBase.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockPistonBase.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/block/BlockPistonBase.java +++ ../src-work/minecraft/net/minecraft/block/BlockPistonBase.java -@@ -236,7 +236,7 @@ +@@ -240,7 +240,7 @@ } } @@ -9,7 +9,7 @@ { this.func_176319_a(p_189539_2_, p_189539_3_, enumfacing, false); } -@@ -322,7 +322,7 @@ +@@ -306,7 +306,7 @@ return false; } @@ -18,7 +18,7 @@ } else { -@@ -368,7 +368,9 @@ +@@ -352,7 +352,9 @@ { BlockPos blockpos1 = (BlockPos)list2.get(j); IBlockState iblockstate = p_176319_1_.func_180495_p(blockpos1); diff --git a/patches/minecraft/net/minecraft/block/BlockPistonMoving.java.patch b/patches/minecraft/net/minecraft/block/BlockPistonMoving.java.patch index d7232703d..33ebf9556 100644 --- a/patches/minecraft/net/minecraft/block/BlockPistonMoving.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockPistonMoving.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/block/BlockPistonMoving.java +++ ../src-work/minecraft/net/minecraft/block/BlockPistonMoving.java -@@ -112,7 +112,7 @@ +@@ -115,7 +115,7 @@ public void func_180653_a(World p_180653_1_, BlockPos p_180653_2_, IBlockState p_180653_3_, float p_180653_4_, int p_180653_5_) { @@ -9,15 +9,15 @@ { TileEntityPiston tileentitypiston = this.func_185589_c(p_180653_1_, p_180653_2_); -@@ -122,6 +122,7 @@ +@@ -125,6 +125,7 @@ iblockstate.func_177230_c().func_176226_b(p_180653_1_, p_180653_2_, iblockstate, 0); } } + super.func_180653_a(p_180653_1_, p_180653_2_, p_180653_3_, 1, p_180653_5_); // mimic vanilla behavior from above and ignore chance } - public RayTraceResult func_180636_a(IBlockState p_180636_1_, World p_180636_2_, BlockPos p_180636_3_, Vec3d p_180636_4_, Vec3d p_180636_5_) -@@ -195,4 +196,16 @@ + @Nullable +@@ -208,4 +209,16 @@ { return new BlockStateContainer(this, new IProperty[] {field_176426_a, field_176425_b}); } diff --git a/patches/minecraft/net/minecraft/block/BlockRailBase.java.patch b/patches/minecraft/net/minecraft/block/BlockRailBase.java.patch index 5a6027d12..b2890fbf4 100644 --- a/patches/minecraft/net/minecraft/block/BlockRailBase.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockRailBase.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/block/BlockRailBase.java +++ ../src-work/minecraft/net/minecraft/block/BlockRailBase.java -@@ -32,7 +32,7 @@ +@@ -33,7 +33,7 @@ public static boolean func_176563_d(IBlockState p_176563_0_) { Block block = p_176563_0_.func_177230_c(); @@ -9,7 +9,7 @@ } protected BlockRailBase(boolean p_i45389_1_) -@@ -66,7 +66,7 @@ +@@ -67,7 +67,7 @@ public boolean func_176196_c(World p_176196_1_, BlockPos p_176196_2_) { @@ -18,7 +18,7 @@ } public void func_176213_c(World p_176213_1_, BlockPos p_176213_2_, IBlockState p_176213_3_) -@@ -89,24 +89,24 @@ +@@ -90,24 +90,24 @@ BlockRailBase.EnumRailDirection blockrailbase$enumraildirection = (BlockRailBase.EnumRailDirection)p_189540_1_.func_177229_b(this.func_176560_l()); boolean flag = false; @@ -48,7 +48,7 @@ { flag = true; } -@@ -161,6 +161,98 @@ +@@ -162,6 +162,98 @@ public abstract IProperty func_176560_l(); @@ -147,7 +147,7 @@ public static enum EnumRailDirection implements IStringSerializable { NORTH_SOUTH(0, "north_south"), -@@ -231,6 +323,7 @@ +@@ -232,6 +324,7 @@ private IBlockState field_180366_e; private final boolean field_150656_f; private final List field_150657_g = Lists.newArrayList(); @@ -155,7 +155,7 @@ public Rail(World p_i45739_2_, BlockPos p_i45739_3_, IBlockState p_i45739_4_) { -@@ -238,8 +331,9 @@ +@@ -239,8 +332,9 @@ this.field_180367_c = p_i45739_3_; this.field_180366_e = p_i45739_4_; this.field_180365_d = (BlockRailBase)p_i45739_4_.func_177230_c(); @@ -167,7 +167,7 @@ this.func_180360_a(blockrailbase$enumraildirection); } -@@ -431,7 +525,7 @@ +@@ -432,7 +526,7 @@ } } @@ -176,7 +176,7 @@ { if (BlockRailBase.func_176562_d(this.field_150660_b, blockpos.func_177984_a())) { -@@ -444,7 +538,7 @@ +@@ -445,7 +539,7 @@ } } @@ -185,7 +185,7 @@ { if (BlockRailBase.func_176562_d(this.field_150660_b, blockpos3.func_177984_a())) { -@@ -587,7 +681,7 @@ +@@ -588,7 +682,7 @@ } } @@ -194,7 +194,7 @@ { if (BlockRailBase.func_176562_d(this.field_150660_b, blockpos.func_177984_a())) { -@@ -600,7 +694,7 @@ +@@ -601,7 +695,7 @@ } } diff --git a/patches/minecraft/net/minecraft/block/BlockRedstoneComparator.java.patch b/patches/minecraft/net/minecraft/block/BlockRedstoneComparator.java.patch index d0dc16fc5..f9a9309fb 100644 --- a/patches/minecraft/net/minecraft/block/BlockRedstoneComparator.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockRedstoneComparator.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/block/BlockRedstoneComparator.java +++ ../src-work/minecraft/net/minecraft/block/BlockRedstoneComparator.java -@@ -312,6 +312,21 @@ +@@ -311,6 +311,21 @@ return this.func_176223_P().func_177226_a(field_185512_D, p_180642_8_.func_174811_aO().func_176734_d()).func_177226_a(field_176464_a, Boolean.valueOf(false)).func_177226_a(field_176463_b, BlockRedstoneComparator.Mode.COMPARE); } @@ -9,7 +9,7 @@ + { + if (pos.func_177956_o() == neighbor.func_177956_o() && world instanceof World) + { -+ func_189540_a(world.func_180495_p(pos), (World)world, pos, world.func_180495_p(neighbor).func_177230_c()); ++ func_189540_a(world.func_180495_p(pos), (World)world, pos, world.func_180495_p(neighbor).func_177230_c(), neighbor); + } + } + diff --git a/patches/minecraft/net/minecraft/block/BlockRedstoneDiode.java.patch b/patches/minecraft/net/minecraft/block/BlockRedstoneDiode.java.patch index f9a873048..43c5d1741 100644 --- a/patches/minecraft/net/minecraft/block/BlockRedstoneDiode.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockRedstoneDiode.java.patch @@ -4,8 +4,8 @@ { EnumFacing enumfacing = (EnumFacing)p_176400_3_.func_177229_b(field_185512_D); BlockPos blockpos = p_176400_2_.func_177972_a(enumfacing.func_176734_d()); -+ if(net.minecraftforge.event.ForgeEventFactory.onNeighborNotify(p_176400_1_, p_176400_2_, p_176400_1_.func_180495_p(p_176400_2_), java.util.EnumSet.of(enumfacing.func_176734_d())).isCanceled()) ++ if(net.minecraftforge.event.ForgeEventFactory.onNeighborNotify(p_176400_1_, p_176400_2_, p_176400_1_.func_180495_p(p_176400_2_), java.util.EnumSet.of(enumfacing.func_176734_d()), false).isCanceled()) + return; - p_176400_1_.func_180496_d(blockpos, this); + p_176400_1_.func_190524_a(blockpos, this, p_176400_2_); p_176400_1_.func_175695_a(blockpos, this, enumfacing); } diff --git a/patches/minecraft/net/minecraft/block/BlockRedstoneOre.java.patch b/patches/minecraft/net/minecraft/block/BlockRedstoneOre.java.patch index d9adb18e1..7762d1ea3 100644 --- a/patches/minecraft/net/minecraft/block/BlockRedstoneOre.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockRedstoneOre.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/block/BlockRedstoneOre.java +++ ../src-work/minecraft/net/minecraft/block/BlockRedstoneOre.java -@@ -94,12 +94,16 @@ +@@ -92,12 +92,16 @@ public void func_180653_a(World p_180653_1_, BlockPos p_180653_2_, IBlockState p_180653_3_, float p_180653_4_, int p_180653_5_) { super.func_180653_a(p_180653_1_, p_180653_2_, p_180653_3_, p_180653_4_, p_180653_5_); diff --git a/patches/minecraft/net/minecraft/block/BlockRedstoneWire.java.patch b/patches/minecraft/net/minecraft/block/BlockRedstoneWire.java.patch index 2c3aeb1dd..61c4ec80e 100644 --- a/patches/minecraft/net/minecraft/block/BlockRedstoneWire.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockRedstoneWire.java.patch @@ -19,7 +19,7 @@ { if (iblockstate.func_185898_k()) { -@@ -409,21 +409,16 @@ +@@ -408,21 +408,16 @@ IBlockState iblockstate = p_176339_1_.func_180495_p(blockpos); boolean flag = iblockstate.func_185915_l(); boolean flag1 = p_176339_1_.func_180495_p(p_176339_2_.func_177984_a()).func_185915_l(); @@ -44,12 +44,12 @@ Block block = p_176343_0_.func_177230_c(); if (block == Blocks.field_150488_af) -@@ -437,7 +432,7 @@ +@@ -436,7 +431,7 @@ } else { -- return p_176343_0_.func_185897_m() && p_176343_1_ != null; -+ return p_176343_0_.func_177230_c().canConnectRedstone(p_176343_0_, world, pos, p_176343_1_); +- return Blocks.field_190976_dk == p_176343_0_.func_177230_c() ? p_176343_1_ == p_176343_0_.func_177229_b(BlockObserver.field_176387_N) : p_176343_0_.func_185897_m() && p_176343_1_ != null; ++ return Blocks.field_190976_dk == p_176343_0_.func_177230_c() ? p_176343_1_ == p_176343_0_.func_177229_b(BlockObserver.field_176387_N) : p_176343_0_.func_177230_c().canConnectRedstone(p_176343_0_, world, pos, p_176343_1_); } } diff --git a/patches/minecraft/net/minecraft/block/BlockReed.java.patch b/patches/minecraft/net/minecraft/block/BlockReed.java.patch index 4f09dc849..ac9844d7e 100644 --- a/patches/minecraft/net/minecraft/block/BlockReed.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockReed.java.patch @@ -38,7 +38,7 @@ if (block == this) { -@@ -165,6 +171,17 @@ +@@ -164,6 +170,17 @@ return ((Integer)p_176201_1_.func_177229_b(field_176355_a)).intValue(); } diff --git a/patches/minecraft/net/minecraft/block/BlockSkull.java.patch b/patches/minecraft/net/minecraft/block/BlockSkull.java.patch index a8e559768..4faba1b44 100644 --- a/patches/minecraft/net/minecraft/block/BlockSkull.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockSkull.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/block/BlockSkull.java +++ ../src-work/minecraft/net/minecraft/block/BlockSkull.java -@@ -118,10 +118,6 @@ +@@ -126,10 +126,6 @@ return new ItemStack(Items.field_151144_bL, 1, i); } @@ -11,7 +11,7 @@ public void func_176208_a(World p_176208_1_, BlockPos p_176208_2_, IBlockState p_176208_3_, EntityPlayer p_176208_4_) { if (p_176208_4_.field_71075_bZ.field_75098_d) -@@ -129,13 +125,18 @@ +@@ -137,13 +133,18 @@ p_176208_3_ = p_176208_3_.func_177226_a(field_176417_b, Boolean.valueOf(true)); p_176208_1_.func_180501_a(p_176208_2_, p_176208_3_, 4); } @@ -31,7 +31,7 @@ { if (!((Boolean)p_180663_3_.func_177229_b(field_176417_b)).booleanValue()) { -@@ -144,7 +145,7 @@ +@@ -152,7 +153,7 @@ if (tileentity instanceof TileEntitySkull) { TileEntitySkull tileentityskull = (TileEntitySkull)tileentity; @@ -40,7 +40,7 @@ if (tileentityskull.func_145904_a() == 3 && tileentityskull.func_152108_a() != null) { -@@ -154,12 +155,11 @@ +@@ -162,12 +163,11 @@ itemstack.func_77978_p().func_74782_a("SkullOwner", nbttagcompound); } @@ -54,4 +54,4 @@ + return ret; } - @Nullable + public Item func_180660_a(IBlockState p_180660_1_, Random p_180660_2_, int p_180660_3_) diff --git a/patches/minecraft/net/minecraft/block/BlockSlab.java.patch b/patches/minecraft/net/minecraft/block/BlockSlab.java.patch index 506564a71..c9c768f0a 100644 --- a/patches/minecraft/net/minecraft/block/BlockSlab.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockSlab.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/block/BlockSlab.java +++ ../src-work/minecraft/net/minecraft/block/BlockSlab.java -@@ -50,6 +50,19 @@ +@@ -56,6 +56,19 @@ return this.func_176552_j(); } @@ -20,7 +20,7 @@ public IBlockState func_180642_a(World p_180642_1_, BlockPos p_180642_2_, EnumFacing p_180642_3_, float p_180642_4_, float p_180642_5_, float p_180642_6_, int p_180642_7_, EntityLivingBase p_180642_8_) { IBlockState iblockstate = super.func_180642_a(p_180642_1_, p_180642_2_, p_180642_3_, p_180642_4_, p_180642_5_, p_180642_6_, p_180642_7_, p_180642_8_).func_177226_a(field_176554_a, BlockSlab.EnumBlockHalf.BOTTOM); -@@ -77,13 +90,14 @@ +@@ -83,13 +96,14 @@ { return false; } diff --git a/patches/minecraft/net/minecraft/block/BlockSnow.java.patch b/patches/minecraft/net/minecraft/block/BlockSnow.java.patch index d3522c76e..ae6c576ec 100644 --- a/patches/minecraft/net/minecraft/block/BlockSnow.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockSnow.java.patch @@ -4,11 +4,11 @@ { IBlockState iblockstate = p_176196_1_.func_180495_p(p_176196_2_.func_177977_b()); Block block = iblockstate.func_177230_c(); -- return block != Blocks.field_150432_aD && block != Blocks.field_150403_cj ? (iblockstate.func_185904_a() == Material.field_151584_j ? true : (block == this && ((Integer)iblockstate.func_177229_b(field_176315_a)).intValue() >= 7 ? true : iblockstate.func_185914_p() && iblockstate.func_185904_a().func_76230_c())) : false; -+ return block != Blocks.field_150432_aD && block != Blocks.field_150403_cj ? (iblockstate.func_177230_c().isLeaves(iblockstate, p_176196_1_, p_176196_2_.func_177977_b()) ? true : (block == this && ((Integer)iblockstate.func_177229_b(field_176315_a)).intValue() >= 7 ? true : iblockstate.func_185914_p() && iblockstate.func_185904_a().func_76230_c())) : false; +- return block != Blocks.field_150432_aD && block != Blocks.field_150403_cj ? (iblockstate.func_185904_a() == Material.field_151584_j ? true : (block == this && ((Integer)iblockstate.func_177229_b(field_176315_a)).intValue() == 8 ? true : iblockstate.func_185914_p() && iblockstate.func_185904_a().func_76230_c())) : false; ++ return block != Blocks.field_150432_aD && block != Blocks.field_150403_cj ? (iblockstate.func_177230_c().isLeaves(iblockstate, p_176196_1_, p_176196_2_.func_177977_b()) ? true : (block == this && ((Integer)iblockstate.func_177229_b(field_176315_a)).intValue() == 8 ? true : iblockstate.func_185914_p() && iblockstate.func_185904_a().func_76230_c())) : false; } - public void func_189540_a(IBlockState p_189540_1_, World p_189540_2_, BlockPos p_189540_3_, Block p_189540_4_) + public void func_189540_a(IBlockState p_189540_1_, World p_189540_2_, BlockPos p_189540_3_, Block p_189540_4_, BlockPos p_189540_5_) @@ -87,7 +87,6 @@ { if (!this.func_176196_c(p_176314_1_, p_176314_2_)) @@ -19,7 +19,7 @@ } @@ -99,9 +98,8 @@ - public void func_180657_a(World p_180657_1_, EntityPlayer p_180657_2_, BlockPos p_180657_3_, IBlockState p_180657_4_, @Nullable TileEntity p_180657_5_, @Nullable ItemStack p_180657_6_) + public void func_180657_a(World p_180657_1_, EntityPlayer p_180657_2_, BlockPos p_180657_3_, IBlockState p_180657_4_, @Nullable TileEntity p_180657_5_, ItemStack p_180657_6_) { - func_180635_a(p_180657_1_, p_180657_3_, new ItemStack(Items.field_151126_ay, ((Integer)p_180657_4_.func_177229_b(field_176315_a)).intValue() + 1, 0)); + super.func_180657_a(p_180657_1_, p_180657_2_, p_180657_3_, p_180657_4_, p_180657_5_, p_180657_6_); @@ -27,8 +27,8 @@ - p_180657_2_.func_71029_a(StatList.func_188055_a(this)); } - @Nullable -@@ -112,14 +110,13 @@ + public Item func_180660_a(IBlockState p_180660_1_, Random p_180660_2_, int p_180660_3_) +@@ -111,14 +109,13 @@ public int func_149745_a(Random p_149745_1_) { @@ -44,7 +44,7 @@ p_180650_1_.func_175698_g(p_180650_2_); } } -@@ -153,6 +150,8 @@ +@@ -152,6 +149,8 @@ return ((Integer)p_176201_1_.func_177229_b(field_176315_a)).intValue() - 1; } diff --git a/patches/minecraft/net/minecraft/block/BlockStairs.java.patch b/patches/minecraft/net/minecraft/block/BlockStairs.java.patch index 74b97411f..7f0d1ea61 100644 --- a/patches/minecraft/net/minecraft/block/BlockStairs.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockStairs.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/block/BlockStairs.java +++ ../src-work/minecraft/net/minecraft/block/BlockStairs.java -@@ -445,6 +445,29 @@ +@@ -444,6 +444,29 @@ return new BlockStateContainer(this, new IProperty[] {field_176309_a, field_176308_b, field_176310_M}); } diff --git a/patches/minecraft/net/minecraft/block/BlockTallGrass.java.patch b/patches/minecraft/net/minecraft/block/BlockTallGrass.java.patch index 6261b3eec..8320200de 100644 --- a/patches/minecraft/net/minecraft/block/BlockTallGrass.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockTallGrass.java.patch @@ -18,44 +18,43 @@ } public boolean func_176200_f(IBlockAccess p_176200_1_, BlockPos p_176200_2_) -@@ -53,7 +53,7 @@ - @Nullable +@@ -52,7 +52,7 @@ + public Item func_180660_a(IBlockState p_180660_1_, Random p_180660_2_, int p_180660_3_) { -- return p_180660_2_.nextInt(8) == 0 ? Items.field_151014_N : null; +- return p_180660_2_.nextInt(8) == 0 ? Items.field_151014_N : Items.field_190931_a; + return null; } public int func_149679_a(int p_149679_1_, Random p_149679_2_) -@@ -63,7 +63,7 @@ +@@ -62,7 +62,7 @@ - public void func_180657_a(World p_180657_1_, EntityPlayer p_180657_2_, BlockPos p_180657_3_, IBlockState p_180657_4_, @Nullable TileEntity p_180657_5_, @Nullable ItemStack p_180657_6_) + public void func_180657_a(World p_180657_1_, EntityPlayer p_180657_2_, BlockPos p_180657_3_, IBlockState p_180657_4_, @Nullable TileEntity p_180657_5_, ItemStack p_180657_6_) { -- if (!p_180657_1_.field_72995_K && p_180657_6_ != null && p_180657_6_.func_77973_b() == Items.field_151097_aZ) -+ if (false && !p_180657_1_.field_72995_K && p_180657_6_ != null && p_180657_6_.func_77973_b() == Items.field_151097_aZ) // Forge: Noop Taken care of by IShearable +- if (!p_180657_1_.field_72995_K && p_180657_6_.func_77973_b() == Items.field_151097_aZ) ++ if (false && !p_180657_1_.field_72995_K && p_180657_6_.func_77973_b() == Items.field_151097_aZ) // Forge: Noop Taken care of by IShearable { p_180657_2_.func_71029_a(StatList.func_188055_a(this)); func_180635_a(p_180657_1_, p_180657_3_, new ItemStack(Blocks.field_150329_H, 1, ((BlockTallGrass.EnumType)p_180657_4_.func_177229_b(field_176497_a)).func_177044_a())); -@@ -183,4 +183,22 @@ +@@ -181,4 +181,21 @@ } } } + + @Override public boolean isShearable(ItemStack item, IBlockAccess world, BlockPos pos){ return true; } + @Override -+ public List onSheared(ItemStack item, IBlockAccess world, BlockPos pos, int fortune) ++ public NonNullList onSheared(ItemStack item, IBlockAccess world, BlockPos pos, int fortune) + { -+ List ret = new java.util.ArrayList(); -+ ret.add(new ItemStack(Blocks.field_150329_H, 1, ((BlockTallGrass.EnumType)world.func_180495_p(pos).func_177229_b(field_176497_a)).func_177044_a())); -+ return ret; ++ return NonNullList.func_191197_a(1, new ItemStack(Blocks.field_150329_H, 1, ((BlockTallGrass.EnumType)world.func_180495_p(pos).func_177229_b(field_176497_a)).func_177044_a())); + } + @Override -+ public List getDrops(IBlockAccess world, BlockPos pos, IBlockState state, int fortune) ++ public NonNullList getDrops(IBlockAccess world, BlockPos pos, IBlockState state, int fortune) + { -+ List ret = new java.util.ArrayList(); -+ if (RANDOM.nextInt(8) != 0) return ret; ++ if (RANDOM.nextInt(8) != 0) return NonNullList.func_191196_a(); + ItemStack seed = net.minecraftforge.common.ForgeHooks.getGrassSeed(RANDOM, fortune); -+ if (seed != null) ret.add(seed); -+ return ret; ++ if (!seed.func_190926_b()) ++ return NonNullList.func_191197_a(1, seed); ++ else ++ return NonNullList.func_191196_a(); + } } diff --git a/patches/minecraft/net/minecraft/block/BlockTrapDoor.java.patch b/patches/minecraft/net/minecraft/block/BlockTrapDoor.java.patch index 462017af8..11144cd92 100644 --- a/patches/minecraft/net/minecraft/block/BlockTrapDoor.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockTrapDoor.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/block/BlockTrapDoor.java +++ ../src-work/minecraft/net/minecraft/block/BlockTrapDoor.java -@@ -240,6 +240,18 @@ +@@ -244,6 +244,18 @@ return new BlockStateContainer(this, new IProperty[] {field_176284_a, field_176283_b, field_176285_M}); } diff --git a/patches/minecraft/net/minecraft/block/BlockVine.java.patch b/patches/minecraft/net/minecraft/block/BlockVine.java.patch index f903027ac..9364c30c7 100644 --- a/patches/minecraft/net/minecraft/block/BlockVine.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockVine.java.patch @@ -9,16 +9,16 @@ { public static final PropertyBool field_176277_a = PropertyBool.func_177716_a("up"); public static final PropertyBool field_176273_b = PropertyBool.func_177716_a("north"); -@@ -345,7 +345,7 @@ +@@ -344,7 +344,7 @@ - public void func_180657_a(World p_180657_1_, EntityPlayer p_180657_2_, BlockPos p_180657_3_, IBlockState p_180657_4_, @Nullable TileEntity p_180657_5_, @Nullable ItemStack p_180657_6_) + public void func_180657_a(World p_180657_1_, EntityPlayer p_180657_2_, BlockPos p_180657_3_, IBlockState p_180657_4_, @Nullable TileEntity p_180657_5_, ItemStack p_180657_6_) { -- if (!p_180657_1_.field_72995_K && p_180657_6_ != null && p_180657_6_.func_77973_b() == Items.field_151097_aZ) -+ if (false && !p_180657_1_.field_72995_K && p_180657_6_ != null && p_180657_6_.func_77973_b() == Items.field_151097_aZ) // Forge: Noop, Covered by IShearable +- if (!p_180657_1_.field_72995_K && p_180657_6_.func_77973_b() == Items.field_151097_aZ) ++ if (false && !p_180657_1_.field_72995_K && p_180657_6_.func_77973_b() == Items.field_151097_aZ) // Forge: Noop, Covered by IShearable { p_180657_2_.func_71029_a(StatList.func_188055_a(this)); func_180635_a(p_180657_1_, p_180657_3_, new ItemStack(Blocks.field_150395_bd, 1, 0)); -@@ -460,4 +460,14 @@ +@@ -459,4 +459,14 @@ return i; } diff --git a/patches/minecraft/net/minecraft/block/state/BlockStateContainer.java.patch b/patches/minecraft/net/minecraft/block/state/BlockStateContainer.java.patch index 1188777ff..205f945bf 100644 --- a/patches/minecraft/net/minecraft/block/state/BlockStateContainer.java.patch +++ b/patches/minecraft/net/minecraft/block/state/BlockStateContainer.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/block/state/BlockStateContainer.java +++ ../src-work/minecraft/net/minecraft/block/state/BlockStateContainer.java -@@ -57,12 +57,22 @@ +@@ -59,12 +59,22 @@ public BlockStateContainer(Block p_i45663_1_, IProperty... p_i45663_2_) { @@ -26,7 +26,7 @@ map.put(iproperty.func_177701_a(), iproperty); } -@@ -73,7 +83,7 @@ +@@ -75,7 +85,7 @@ for (List < Comparable> list : Cartesian.func_179321_a(this.func_177620_e())) { Map < IProperty, Comparable> map1 = MapPopulator. < IProperty, Comparable> func_179400_b(this.field_177624_d.values(), list); @@ -35,7 +35,7 @@ map2.put(map1, blockstatecontainer$stateimplementation); list1.add(blockstatecontainer$stateimplementation); } -@@ -165,6 +175,13 @@ +@@ -170,6 +180,13 @@ this.field_177237_b = p_i45660_2_; } @@ -49,9 +49,9 @@ public Collection < IProperty> func_177227_a() { return Collections. < IProperty> unmodifiableCollection(this.field_177237_b.keySet()); -@@ -445,5 +462,86 @@ +@@ -468,5 +485,86 @@ { - this.field_177239_a.func_189540_a(this, p_189546_1_, p_189546_2_, p_189546_3_); + return this.field_177239_a.func_176214_u(this); } + + //Forge Start diff --git a/patches/minecraft/net/minecraft/block/state/IBlockProperties.java.patch b/patches/minecraft/net/minecraft/block/state/IBlockProperties.java.patch index 917c74d42..9ebb9aa01 100644 --- a/patches/minecraft/net/minecraft/block/state/IBlockProperties.java.patch +++ b/patches/minecraft/net/minecraft/block/state/IBlockProperties.java.patch @@ -14,14 +14,17 @@ @SideOnly(Side.CLIENT) boolean func_185895_e(); -@@ -92,5 +96,10 @@ +@@ -95,8 +99,13 @@ RayTraceResult func_185910_a(World p_185910_1_, BlockPos p_185910_2_, Vec3d p_185910_3_, Vec3d p_185910_4_); + @Deprecated // Forge: Use isSideSolid(IBlockAccess, BlockPos, EnumFacing.UP) instead boolean func_185896_q(); -+ + + //Forge added functions + boolean doesSideBlockRendering(IBlockAccess world, BlockPos pos, EnumFacing side); + boolean isSideSolid(IBlockAccess world, BlockPos pos, EnumFacing side); - } ++ + Vec3d func_191059_e(IBlockAccess p_191059_1_, BlockPos p_191059_2_); + + boolean func_191058_s(); diff --git a/patches/minecraft/net/minecraft/client/Minecraft.java.patch b/patches/minecraft/net/minecraft/client/Minecraft.java.patch index 274d1e559..3f85ff8e9 100644 --- a/patches/minecraft/net/minecraft/client/Minecraft.java.patch +++ b/patches/minecraft/net/minecraft/client/Minecraft.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/client/Minecraft.java +++ ../src-work/minecraft/net/minecraft/client/Minecraft.java -@@ -322,7 +322,6 @@ +@@ -321,7 +321,6 @@ this.field_152355_az = (new YggdrasilAuthenticationService(this.field_110453_aa, UUID.randomUUID().toString())).createMinecraftSessionService(); this.field_71449_j = p_i45547_1_.field_178745_a.field_178752_a; field_147123_G.info("Setting user: {}", new Object[] {this.field_71449_j.func_111285_a()}); @@ -8,7 +8,7 @@ this.field_71459_aj = p_i45547_1_.field_178741_d.field_178756_a; this.field_71443_c = p_i45547_1_.field_178743_b.field_178764_a > 0 ? p_i45547_1_.field_178743_b.field_178764_a : 1; this.field_71440_d = p_i45547_1_.field_178743_b.field_178762_b > 0 ? p_i45547_1_.field_178743_b.field_178762_b : 1; -@@ -437,10 +436,10 @@ +@@ -436,10 +435,10 @@ this.field_110451_am = new SimpleReloadableResourceManager(this.field_110452_an); this.field_135017_as = new LanguageManager(this.field_110452_an, this.field_71474_y.field_74363_ab); this.field_110451_am.func_110542_a(this.field_135017_as); @@ -21,7 +21,7 @@ this.field_152350_aA = new SkinManager(this.field_71446_o, new File(this.field_110446_Y, "skins"), this.field_152355_az); this.field_71469_aa = new AnvilSaveConverter(new File(this.field_71412_D, "saves"), this.field_184131_U); this.field_147127_av = new SoundHandler(this.field_110451_am, this.field_71474_y); -@@ -465,7 +464,7 @@ +@@ -464,7 +463,7 @@ { try { @@ -30,7 +30,7 @@ } catch (Exception exception) { -@@ -474,6 +473,8 @@ +@@ -473,6 +472,8 @@ } }); this.field_71417_B = new MouseHelper(); @@ -39,7 +39,7 @@ this.func_71361_d("Pre startup"); GlStateManager.func_179098_w(); GlStateManager.func_179103_j(7425); -@@ -487,19 +488,24 @@ +@@ -486,19 +487,24 @@ GlStateManager.func_179096_D(); GlStateManager.func_179128_n(5888); this.func_71361_d("Startup"); @@ -65,7 +65,7 @@ this.field_71460_t = new EntityRenderer(this, this.field_110451_am); this.field_110451_am.func_110542_a(this.field_71460_t); this.field_175618_aM = new BlockRendererDispatcher(this.field_175617_aL.func_174954_c(), this.field_184127_aH); -@@ -509,23 +515,27 @@ +@@ -508,23 +514,27 @@ this.field_71458_u = new GuiAchievement(this); GlStateManager.func_179083_b(0, 0, this.field_71443_c, this.field_71440_d); this.field_71452_i = new ParticleManager(this.field_71441_e, this.field_71446_o); @@ -96,7 +96,7 @@ if (this.field_71474_y.field_74353_u && !this.field_71431_Q) { this.func_71352_k(); -@@ -697,21 +707,23 @@ +@@ -696,21 +706,23 @@ File file2 = new File(file1, "crash-" + (new SimpleDateFormat("yyyy-MM-dd_HH.mm.ss")).format(new Date()) + "-client.txt"); Bootstrap.func_179870_a(p_71377_1_.func_71502_e()); @@ -123,7 +123,7 @@ } public boolean func_152349_b() -@@ -904,11 +916,6 @@ +@@ -903,11 +915,6 @@ public void func_147108_a(@Nullable GuiScreen p_147108_1_) { @@ -135,7 +135,7 @@ if (p_147108_1_ == null && this.field_71441_e == null) { p_147108_1_ = new GuiMainMenu(); -@@ -918,6 +925,17 @@ +@@ -917,6 +924,17 @@ p_147108_1_ = new GuiGameOver((ITextComponent)null); } @@ -153,7 +153,7 @@ if (p_147108_1_ instanceof GuiMainMenu || p_147108_1_ instanceof GuiMultiplayer) { this.field_71474_y.field_74330_P = false; -@@ -1053,9 +1071,11 @@ +@@ -1052,9 +1070,11 @@ if (!this.field_71454_w) { @@ -165,7 +165,7 @@ } this.field_71424_I.func_76319_b(); -@@ -1398,9 +1418,9 @@ +@@ -1397,9 +1417,9 @@ { BlockPos blockpos = this.field_71476_x.func_178782_a(); @@ -177,7 +177,7 @@ this.field_71439_g.func_184609_a(EnumHand.MAIN_HAND); } } -@@ -1434,7 +1454,7 @@ +@@ -1433,7 +1453,7 @@ case BLOCK: BlockPos blockpos = this.field_71476_x.func_178782_a(); @@ -186,7 +186,7 @@ { this.field_71442_b.func_180511_b(blockpos, this.field_71476_x.field_178784_b); break; -@@ -1448,6 +1468,7 @@ +@@ -1447,6 +1467,7 @@ } this.field_71439_g.func_184821_cY(); @@ -194,24 +194,15 @@ } this.field_71439_g.func_184609_a(EnumHand.MAIN_HAND); -@@ -1477,7 +1498,6 @@ - switch (this.field_71476_x.field_72313_a) - { - case ENTITY: -- - if (this.field_71442_b.func_187102_a(this.field_71439_g, this.field_71476_x.field_72308_g, this.field_71476_x, this.field_71439_g.func_184586_b(enumhand), enumhand) == EnumActionResult.SUCCESS) - { - return; -@@ -1520,7 +1540,7 @@ +@@ -1512,6 +1533,7 @@ + } } - ItemStack itemstack1 = this.field_71439_g.func_184586_b(enumhand); -- -+ if (itemstack1 == null && (this.field_71476_x == null || this.field_71476_x.field_72313_a == RayTraceResult.Type.MISS)) net.minecraftforge.common.ForgeHooks.onEmptyClick(this.field_71439_g, enumhand); - if (itemstack1 != null && this.field_71442_b.func_187101_a(this.field_71439_g, this.field_71441_e, itemstack1, enumhand) == EnumActionResult.SUCCESS) ++ if (itemstack.func_190926_b() && (this.field_71476_x == null || this.field_71476_x.field_72313_a == RayTraceResult.Type.MISS)) net.minecraftforge.common.ForgeHooks.onEmptyClick(this.field_71439_g, enumhand); + if (!itemstack.func_190926_b() && this.field_71442_b.func_187101_a(this.field_71439_g, this.field_71441_e, enumhand) == EnumActionResult.SUCCESS) { this.field_71460_t.field_78516_c.func_187460_a(enumhand); -@@ -1627,6 +1647,8 @@ +@@ -1618,6 +1640,8 @@ --this.field_71467_ac; } @@ -220,7 +211,7 @@ this.field_71424_I.func_76320_a("gui"); if (!this.field_71445_n) -@@ -1738,6 +1760,7 @@ +@@ -1729,6 +1753,7 @@ this.field_71457_ai = 0; this.field_71441_e.func_72897_h(this.field_71439_g); } @@ -228,7 +219,7 @@ } this.field_71424_I.func_76318_c("gameRenderer"); -@@ -1825,6 +1848,7 @@ +@@ -1816,6 +1841,7 @@ this.field_71453_ak.func_74428_b(); } @@ -236,7 +227,7 @@ this.field_71424_I.func_76319_b(); this.field_71423_H = func_71386_F(); } -@@ -1931,6 +1955,7 @@ +@@ -1922,6 +1948,7 @@ } } } @@ -244,7 +235,7 @@ } this.func_184117_aA(); -@@ -2177,6 +2202,8 @@ +@@ -2168,6 +2195,8 @@ { while (Mouse.next()) { @@ -253,7 +244,7 @@ int i = Mouse.getEventButton(); KeyBinding.func_74510_a(i - 100, Mouse.getEventButtonState()); -@@ -2242,6 +2269,7 @@ +@@ -2233,6 +2262,7 @@ public void func_71371_a(String p_71371_1_, String p_71371_2_, @Nullable WorldSettings p_71371_3_) { @@ -261,7 +252,7 @@ this.func_71403_a((WorldClient)null); System.gc(); ISaveHandler isavehandler = this.field_71469_aa.func_75804_a(p_71371_1_, false); -@@ -2284,6 +2312,12 @@ +@@ -2275,6 +2305,12 @@ while (!this.field_71437_Z.func_71200_ad()) { @@ -274,13 +265,13 @@ String s = this.field_71437_Z.func_71195_b_(); if (s != null) -@@ -2309,8 +2343,14 @@ +@@ -2300,8 +2336,14 @@ SocketAddress socketaddress = this.field_71437_Z.func_147137_ag().func_151270_a(); NetworkManager networkmanager = NetworkManager.func_150722_a(socketaddress); networkmanager.func_150719_a(new NetHandlerLoginClient(networkmanager, this, (GuiScreen)null)); -- networkmanager.func_179290_a(new C00Handshake(210, socketaddress.toString(), 0, EnumConnectionState.LOGIN)); +- networkmanager.func_179290_a(new C00Handshake(314, socketaddress.toString(), 0, EnumConnectionState.LOGIN)); - networkmanager.func_179290_a(new CPacketLoginStart(this.func_110432_I().func_148256_e())); -+ networkmanager.func_179290_a(new C00Handshake(210, socketaddress.toString(), 0, EnumConnectionState.LOGIN, true)); ++ networkmanager.func_179290_a(new C00Handshake(314, socketaddress.toString(), 0, EnumConnectionState.LOGIN, true)); + com.mojang.authlib.GameProfile gameProfile = this.func_110432_I().func_148256_e(); + if (!this.func_110432_I().hasCachedProperties()) + { @@ -291,7 +282,7 @@ this.field_71453_ak = networkmanager; } -@@ -2321,6 +2361,8 @@ +@@ -2312,6 +2354,8 @@ public void func_71353_a(@Nullable WorldClient p_71353_1_, String p_71353_2_) { @@ -300,7 +291,7 @@ if (p_71353_1_ == null) { NetHandlerPlayClient nethandlerplayclient = this.func_147114_u(); -@@ -2333,6 +2375,18 @@ +@@ -2324,6 +2368,18 @@ if (this.field_71437_Z != null && this.field_71437_Z.func_175578_N()) { this.field_71437_Z.func_71263_m(); @@ -319,7 +310,7 @@ } this.field_71437_Z = null; -@@ -2356,6 +2410,7 @@ +@@ -2347,6 +2403,7 @@ this.field_71456_v.func_181029_i(); this.func_71351_a((ServerData)null); this.field_71455_al = false; @@ -327,7 +318,7 @@ } this.field_147127_av.func_147690_c(); -@@ -2473,159 +2528,8 @@ +@@ -2464,159 +2521,8 @@ { if (this.field_71476_x != null && this.field_71476_x.field_72313_a != RayTraceResult.Type.MISS) { @@ -348,7 +339,7 @@ - - itemstack = block.func_185473_a(this.field_71441_e, blockpos, iblockstate); - -- if (itemstack == null) +- if (itemstack.func_190926_b()) - { - return; - } @@ -378,13 +369,13 @@ - EntityItemFrame entityitemframe = (EntityItemFrame)this.field_71476_x.field_72308_g; - ItemStack itemstack1 = entityitemframe.func_82335_i(); - -- if (itemstack1 == null) +- if (itemstack1.func_190926_b()) - { - itemstack = new ItemStack(Items.field_151160_bD); - } - else - { -- itemstack = ItemStack.func_77944_b(itemstack1); +- itemstack = itemstack1.func_77946_l(); - } - } - else if (this.field_71476_x.field_72308_g instanceof EntityMinecart) @@ -429,32 +420,32 @@ - } - else - { -- String s = EntityList.func_75621_b(this.field_71476_x.field_72308_g); +- ResourceLocation resourcelocation = EntityList.func_191301_a(this.field_71476_x.field_72308_g); - -- if (!EntityList.field_75627_a.containsKey(s)) +- if (resourcelocation == null || !EntityList.field_75627_a.containsKey(resourcelocation)) - { - return; - } - - itemstack = new ItemStack(Items.field_151063_bx); -- ItemMonsterPlacer.func_185078_a(itemstack, s); +- ItemMonsterPlacer.func_185078_a(itemstack, resourcelocation); - } - } - -- if (itemstack.func_77973_b() == null) +- if (itemstack.func_190926_b()) - { -- String s1 = ""; +- String s = ""; - - if (this.field_71476_x.field_72313_a == RayTraceResult.Type.BLOCK) - { -- s1 = ((ResourceLocation)Block.field_149771_c.func_177774_c(this.field_71441_e.func_180495_p(this.field_71476_x.func_178782_a()).func_177230_c())).toString(); +- s = ((ResourceLocation)Block.field_149771_c.func_177774_c(this.field_71441_e.func_180495_p(this.field_71476_x.func_178782_a()).func_177230_c())).toString(); - } - else if (this.field_71476_x.field_72313_a == RayTraceResult.Type.ENTITY) - { -- s1 = EntityList.func_75621_b(this.field_71476_x.field_72308_g); +- s = EntityList.func_191301_a(this.field_71476_x.field_72308_g).toString(); - } - -- field_147123_G.warn("Picking on: [{}] {} gave null item", new Object[] {this.field_71476_x.field_72313_a, s1}); +- field_147123_G.warn("Picking on: [{}] {} gave null item", new Object[] {this.field_71476_x.field_72313_a, s}); - } - else - { @@ -489,7 +480,7 @@ } } -@@ -2927,18 +2831,8 @@ +@@ -2919,18 +2825,8 @@ public static int func_71369_N() { @@ -510,7 +501,7 @@ } public boolean func_70002_Q() -@@ -3077,15 +2971,16 @@ +@@ -3069,15 +2965,16 @@ { if (Keyboard.getEventKeyState()) { @@ -529,7 +520,7 @@ } } } -@@ -3205,6 +3100,12 @@ +@@ -3197,6 +3094,12 @@ return this.field_184127_aH; } diff --git a/patches/minecraft/net/minecraft/client/audio/SoundManager.java.patch b/patches/minecraft/net/minecraft/client/audio/SoundManager.java.patch index ed5adecd7..4bded6e20 100644 --- a/patches/minecraft/net/minecraft/client/audio/SoundManager.java.patch +++ b/patches/minecraft/net/minecraft/client/audio/SoundManager.java.patch @@ -46,4 +46,4 @@ + net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.sound.PlaySoundSourceEvent(this, p_148611_1_, s)); } - field_148621_b.debug(field_148623_a, "Playing sound {} for event {} as channel {}", new Object[] {sound.func_188719_a(), resourcelocation1, s}); + field_148621_b.debug(field_148623_a, "Playing sound {} for event {} as channel {}", new Object[] {sound.func_188719_a(), resourcelocation, s}); diff --git a/patches/minecraft/net/minecraft/client/entity/EntityPlayerSP.java.patch b/patches/minecraft/net/minecraft/client/entity/EntityPlayerSP.java.patch index c94b8cbcb..e06a2aee5 100644 --- a/patches/minecraft/net/minecraft/client/entity/EntityPlayerSP.java.patch +++ b/patches/minecraft/net/minecraft/client/entity/EntityPlayerSP.java.patch @@ -1,7 +1,7 @@ --- ../src-base/minecraft/net/minecraft/client/entity/EntityPlayerSP.java +++ ../src-work/minecraft/net/minecraft/client/entity/EntityPlayerSP.java -@@ -415,6 +415,15 @@ - this.field_71159_c.field_71456_v.func_146158_b().func_146227_a(p_146105_1_); +@@ -428,6 +428,15 @@ + } } + private boolean isHeadspaceFree(BlockPos pos, int height) @@ -16,7 +16,7 @@ protected boolean func_145771_j(double p_145771_1_, double p_145771_3_, double p_145771_5_) { if (this.field_70145_X) -@@ -427,30 +436,34 @@ +@@ -440,30 +449,34 @@ double d0 = p_145771_1_ - (double)blockpos.func_177958_n(); double d1 = p_145771_5_ - (double)blockpos.func_177952_p(); @@ -56,7 +56,7 @@ { d2 = 1.0D - d1; i = 5; -@@ -485,7 +498,7 @@ +@@ -498,7 +511,7 @@ private boolean func_175162_d(BlockPos p_175162_1_) { @@ -65,7 +65,7 @@ } public void func_70031_b(boolean p_70031_1_) -@@ -530,7 +543,13 @@ +@@ -543,7 +556,13 @@ public void func_184185_a(SoundEvent p_184185_1_, float p_184185_2_, float p_184185_3_) { diff --git a/patches/minecraft/net/minecraft/client/gui/FontRenderer.java.patch b/patches/minecraft/net/minecraft/client/gui/FontRenderer.java.patch index 284b9d37a..29caffe3c 100644 --- a/patches/minecraft/net/minecraft/client/gui/FontRenderer.java.patch +++ b/patches/minecraft/net/minecraft/client/gui/FontRenderer.java.patch @@ -9,15 +9,7 @@ for (int i = 0; i < 32; ++i) { -@@ -97,6 +97,7 @@ - public void func_110549_a(IResourceManager p_110549_1_) - { - this.func_111272_d(); -+ this.func_98306_d(); - } - - private void func_111272_d() -@@ -106,7 +107,7 @@ +@@ -107,7 +107,7 @@ try { @@ -26,7 +18,7 @@ bufferedimage = TextureUtil.func_177053_a(iresource.func_110527_b()); } catch (IOException ioexception) -@@ -171,7 +172,7 @@ +@@ -172,7 +172,7 @@ try { @@ -35,7 +27,7 @@ iresource.func_110527_b().read(this.field_78287_e); } catch (IOException ioexception) -@@ -202,7 +203,7 @@ +@@ -203,7 +203,7 @@ int i = p_78266_1_ % 16 * 8; int j = p_78266_1_ / 16 * 8; int k = p_78266_2_ ? 1 : 0; @@ -44,7 +36,7 @@ int l = this.field_78286_d[p_78266_1_]; float f = (float)l - 0.01F; GlStateManager.func_187447_r(5); -@@ -230,7 +231,7 @@ +@@ -231,7 +231,7 @@ private void func_78257_a(int p_78257_1_) { @@ -53,7 +45,7 @@ } protected float func_78277_a(char p_78277_1_, boolean p_78277_2_) -@@ -279,7 +280,7 @@ +@@ -280,7 +280,7 @@ public int func_175065_a(String p_175065_1_, float p_175065_2_, float p_175065_3_, int p_175065_4_, boolean p_175065_5_) { @@ -62,7 +54,7 @@ this.func_78265_b(); int i; -@@ -349,7 +350,7 @@ +@@ -350,7 +350,7 @@ int j1 = this.field_78285_g[i1]; this.field_78304_r = j1; @@ -71,7 +63,7 @@ } else if (i1 == 16) { -@@ -378,7 +379,7 @@ +@@ -379,7 +379,7 @@ this.field_78299_w = false; this.field_78300_v = false; this.field_78301_u = false; @@ -80,7 +72,7 @@ } ++i; -@@ -406,7 +407,7 @@ +@@ -407,7 +407,7 @@ c0 = c1; } @@ -89,7 +81,7 @@ boolean flag = (c0 == 0 || j == -1 || this.field_78293_l) && p_78255_2_; if (flag) -@@ -444,7 +445,16 @@ +@@ -445,7 +445,16 @@ ++f; } @@ -106,7 +98,7 @@ if (this.field_78299_w) { Tessellator tessellator = Tessellator.func_178181_a(); -@@ -517,7 +527,7 @@ +@@ -518,7 +527,7 @@ this.field_78292_o = (float)(p_180455_4_ >> 8 & 255) / 255.0F; this.field_78306_p = (float)(p_180455_4_ & 255) / 255.0F; this.field_78305_q = (float)(p_180455_4_ >> 24 & 255) / 255.0F; @@ -115,7 +107,7 @@ this.field_78295_j = p_180455_2_; this.field_78296_k = p_180455_3_; this.func_78255_a(p_180455_1_, p_180455_5_); -@@ -848,6 +858,26 @@ +@@ -849,6 +858,26 @@ return this.field_78294_m; } diff --git a/patches/minecraft/net/minecraft/client/gui/GuiIngame.java.patch b/patches/minecraft/net/minecraft/client/gui/GuiIngame.java.patch index 9d96734bc..ec5b86ec1 100644 --- a/patches/minecraft/net/minecraft/client/gui/GuiIngame.java.patch +++ b/patches/minecraft/net/minecraft/client/gui/GuiIngame.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/client/gui/GuiIngame.java +++ ../src-work/minecraft/net/minecraft/client/gui/GuiIngame.java -@@ -360,7 +360,8 @@ +@@ -359,7 +359,8 @@ BlockPos blockpos = raytraceresult.func_178782_a(); @@ -10,7 +10,7 @@ { return; } -@@ -418,7 +419,10 @@ +@@ -417,7 +418,10 @@ { Potion potion = potioneffect.func_188419_a(); @@ -22,7 +22,7 @@ { int k = p_184048_1_.func_78326_a(); int l = 1; -@@ -455,7 +459,10 @@ +@@ -460,7 +464,10 @@ } GlStateManager.func_179131_c(1.0F, 1.0F, 1.0F, f); diff --git a/patches/minecraft/net/minecraft/client/gui/GuiListWorldSelectionEntry.java.patch b/patches/minecraft/net/minecraft/client/gui/GuiListWorldSelectionEntry.java.patch index 67dff1d65..e24503cc7 100644 --- a/patches/minecraft/net/minecraft/client/gui/GuiListWorldSelectionEntry.java.patch +++ b/patches/minecraft/net/minecraft/client/gui/GuiListWorldSelectionEntry.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/client/gui/GuiListWorldSelectionEntry.java +++ ../src-work/minecraft/net/minecraft/client/gui/GuiListWorldSelectionEntry.java -@@ -242,7 +242,7 @@ +@@ -246,7 +246,7 @@ if (this.field_186784_e.func_71359_d().func_90033_f(this.field_186786_g.func_75786_a())) { diff --git a/patches/minecraft/net/minecraft/client/gui/GuiMainMenu.java.patch b/patches/minecraft/net/minecraft/client/gui/GuiMainMenu.java.patch index d0ece8c62..818d8be72 100644 --- a/patches/minecraft/net/minecraft/client/gui/GuiMainMenu.java.patch +++ b/patches/minecraft/net/minecraft/client/gui/GuiMainMenu.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/client/gui/GuiMainMenu.java +++ ../src-work/minecraft/net/minecraft/client/gui/GuiMainMenu.java -@@ -67,6 +67,8 @@ +@@ -65,6 +65,8 @@ private GuiButton field_175372_K; private boolean field_183502_L; private GuiScreen field_183503_M; @@ -9,7 +9,7 @@ public GuiMainMenu() { -@@ -209,13 +211,15 @@ +@@ -216,13 +218,15 @@ this.field_183503_M.func_183500_a(this.field_146294_l, this.field_146295_m); this.field_183503_M.func_73866_w_(); } @@ -26,7 +26,7 @@ } private void func_73972_b(int p_73972_1_, int p_73972_2_) -@@ -263,6 +267,11 @@ +@@ -270,6 +274,11 @@ this.field_146297_k.func_71400_g(); } @@ -38,7 +38,7 @@ if (p_146284_1_.field_146127_k == 11) { this.field_146297_k.func_71371_a("Demo_World", "Demo_World", DemoWorldServer.field_73071_a); -@@ -490,6 +499,8 @@ +@@ -501,6 +510,8 @@ this.func_73729_b(j + 155, 30, 0, 45, 155, 44); } @@ -47,7 +47,7 @@ GlStateManager.func_179094_E(); GlStateManager.func_179109_b((float)(this.field_146294_l / 2 + 90), 70.0F, 0.0F); GlStateManager.func_179114_b(-20.0F, 0.0F, 0.0F, 1.0F); -@@ -509,7 +520,15 @@ +@@ -520,7 +531,15 @@ s = s + ("release".equalsIgnoreCase(this.field_146297_k.func_184123_d()) ? "" : "/" + this.field_146297_k.func_184123_d()); } @@ -64,7 +64,7 @@ String s1 = "Copyright Mojang AB. Do not distribute!"; this.func_73731_b(this.field_146289_q, "Copyright Mojang AB. Do not distribute!", this.field_146294_l - this.field_146289_q.func_78256_a("Copyright Mojang AB. Do not distribute!") - 2, this.field_146295_m - 10, -1); -@@ -526,6 +545,7 @@ +@@ -537,6 +556,7 @@ { this.field_183503_M.func_73863_a(p_73863_1_, p_73863_2_, p_73863_3_); } @@ -72,7 +72,7 @@ } protected void func_73864_a(int p_73864_1_, int p_73864_2_, int p_73864_3_) throws IOException -@@ -546,6 +566,8 @@ +@@ -557,6 +577,8 @@ { this.field_183503_M.func_73864_a(p_73864_1_, p_73864_2_, p_73864_3_); } diff --git a/patches/minecraft/net/minecraft/client/gui/GuiOverlayDebug.java.patch b/patches/minecraft/net/minecraft/client/gui/GuiOverlayDebug.java.patch index c95daa27c..d2f9d1c51 100644 --- a/patches/minecraft/net/minecraft/client/gui/GuiOverlayDebug.java.patch +++ b/patches/minecraft/net/minecraft/client/gui/GuiOverlayDebug.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/client/gui/GuiOverlayDebug.java +++ ../src-work/minecraft/net/minecraft/client/gui/GuiOverlayDebug.java -@@ -188,6 +188,9 @@ +@@ -189,6 +189,9 @@ long l = j - k; List list = Lists.newArrayList(new String[] {String.format("Java: %s %dbit", new Object[]{System.getProperty("java.version"), Integer.valueOf(this.field_175242_a.func_147111_S() ? 64 : 32)}), String.format("Mem: % 2d%% %03d/%03dMB", new Object[]{Long.valueOf(l * 100L / i), Long.valueOf(func_175240_a(l)), Long.valueOf(func_175240_a(i))}), String.format("Allocated: % 2d%% %03dMB", new Object[]{Long.valueOf(j * 100L / i), Long.valueOf(func_175240_a(j))}), "", String.format("CPU: %s", new Object[]{OpenGlHelper.func_183029_j()}), "", String.format("Display: %dx%d (%s)", new Object[]{Integer.valueOf(Display.getWidth()), Integer.valueOf(Display.getHeight()), GlStateManager.func_187416_u(7936)}), GlStateManager.func_187416_u(7937), GlStateManager.func_187416_u(7938)}); diff --git a/patches/minecraft/net/minecraft/client/gui/GuiScreen.java.patch b/patches/minecraft/net/minecraft/client/gui/GuiScreen.java.patch index 8792c9cdf..b3a8d9498 100644 --- a/patches/minecraft/net/minecraft/client/gui/GuiScreen.java.patch +++ b/patches/minecraft/net/minecraft/client/gui/GuiScreen.java.patch @@ -27,7 +27,7 @@ { GlStateManager.func_179101_C(); RenderHelper.func_74518_a(); -@@ -427,6 +436,7 @@ +@@ -418,6 +427,7 @@ { this.field_146297_k.field_71456_v.func_146158_b().func_146239_a(p_175281_1_); } @@ -35,7 +35,7 @@ this.field_146297_k.field_71439_g.func_71165_d(p_175281_1_); } -@@ -441,9 +451,15 @@ +@@ -432,9 +442,15 @@ if (guibutton.func_146116_c(this.field_146297_k, p_73864_1_, p_73864_2_)) { @@ -51,7 +51,7 @@ } } } -@@ -473,8 +489,12 @@ +@@ -464,8 +480,12 @@ this.field_146289_q = p_146280_1_.field_71466_p; this.field_146294_l = p_146280_2_; this.field_146295_m = p_146280_3_; @@ -64,7 +64,7 @@ } public void func_183500_a(int p_183500_1_, int p_183500_2_) -@@ -493,7 +513,9 @@ +@@ -484,7 +504,9 @@ { while (Mouse.next()) { @@ -74,7 +74,7 @@ } } -@@ -501,7 +523,9 @@ +@@ -492,7 +514,9 @@ { while (Keyboard.next()) { @@ -84,7 +84,7 @@ } } } -@@ -563,6 +587,7 @@ +@@ -554,6 +578,7 @@ public void func_146276_q_() { this.func_146270_b(0); diff --git a/patches/minecraft/net/minecraft/client/gui/GuiScreenDemo.java.patch b/patches/minecraft/net/minecraft/client/gui/GuiScreenDemo.java.patch index bc1953025..dc1d19bca 100644 --- a/patches/minecraft/net/minecraft/client/gui/GuiScreenDemo.java.patch +++ b/patches/minecraft/net/minecraft/client/gui/GuiScreenDemo.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/client/gui/GuiScreenDemo.java +++ ../src-work/minecraft/net/minecraft/client/gui/GuiScreenDemo.java -@@ -73,10 +73,10 @@ +@@ -68,10 +68,10 @@ this.field_146289_q.func_78276_b(I18n.func_135052_a("demo.help.title", new Object[0]), i, j, 2039583); j = j + 12; GameSettings gamesettings = this.field_146297_k.field_71474_y; diff --git a/patches/minecraft/net/minecraft/client/gui/GuiVideoSettings.java.patch b/patches/minecraft/net/minecraft/client/gui/GuiVideoSettings.java.patch index a57fd0102..54b664ace 100644 --- a/patches/minecraft/net/minecraft/client/gui/GuiVideoSettings.java.patch +++ b/patches/minecraft/net/minecraft/client/gui/GuiVideoSettings.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/client/gui/GuiVideoSettings.java +++ ../src-work/minecraft/net/minecraft/client/gui/GuiVideoSettings.java -@@ -107,4 +107,12 @@ +@@ -117,4 +117,12 @@ this.func_73732_a(this.field_146289_q, this.field_146500_a, this.field_146294_l / 2, 5, 16777215); super.func_73863_a(p_73863_1_, p_73863_2_, p_73863_3_); } diff --git a/patches/minecraft/net/minecraft/client/gui/ServerListEntryNormal.java.patch b/patches/minecraft/net/minecraft/client/gui/ServerListEntryNormal.java.patch index d229b6e3f..5ee3ba235 100644 --- a/patches/minecraft/net/minecraft/client/gui/ServerListEntryNormal.java.patch +++ b/patches/minecraft/net/minecraft/client/gui/ServerListEntryNormal.java.patch @@ -1,7 +1,7 @@ --- ../src-base/minecraft/net/minecraft/client/gui/ServerListEntryNormal.java +++ ../src-work/minecraft/net/minecraft/client/gui/ServerListEntryNormal.java @@ -82,7 +82,7 @@ - boolean flag1 = this.field_148301_e.field_82821_f < 210; + boolean flag1 = this.field_148301_e.field_82821_f < 314; boolean flag2 = flag || flag1; this.field_148300_d.field_71466_p.func_78276_b(this.field_148301_e.field_78847_a, p_180790_2_ + 32 + 3, p_180790_3_ + 1, 16777215); - List list = this.field_148300_d.field_71466_p.func_78271_c(this.field_148301_e.field_78843_d, p_180790_4_ - 32 - 2); diff --git a/patches/minecraft/net/minecraft/client/gui/inventory/GuiContainer.java.patch b/patches/minecraft/net/minecraft/client/gui/inventory/GuiContainer.java.patch index b840dcf57..65197f151 100644 --- a/patches/minecraft/net/minecraft/client/gui/inventory/GuiContainer.java.patch +++ b/patches/minecraft/net/minecraft/client/gui/inventory/GuiContainer.java.patch @@ -1,21 +1,20 @@ --- ../src-base/minecraft/net/minecraft/client/gui/inventory/GuiContainer.java +++ ../src-work/minecraft/net/minecraft/client/gui/inventory/GuiContainer.java -@@ -176,8 +176,11 @@ +@@ -180,8 +180,10 @@ GlStateManager.func_179109_b(0.0F, 0.0F, 32.0F); this.field_73735_i = 200.0F; this.field_146296_j.field_77023_b = 200.0F; -+ net.minecraft.client.gui.FontRenderer font = null; -+ if (p_146982_1_ != null) font = p_146982_1_.func_77973_b().getFontRenderer(p_146982_1_); ++ net.minecraft.client.gui.FontRenderer font = p_146982_1_.func_77973_b().getFontRenderer(p_146982_1_); + if (font == null) font = field_146289_q; this.field_146296_j.func_180450_b(p_146982_1_, p_146982_2_, p_146982_3_); -- this.field_146296_j.func_180453_a(this.field_146289_q, p_146982_1_, p_146982_2_, p_146982_3_ - (this.field_147012_x == null ? 0 : 8), p_146982_4_); -+ this.field_146296_j.func_180453_a(font, p_146982_1_, p_146982_2_, p_146982_3_ - (this.field_147012_x == null ? 0 : 8), p_146982_4_); +- this.field_146296_j.func_180453_a(this.field_146289_q, p_146982_1_, p_146982_2_, p_146982_3_ - (this.field_147012_x.func_190926_b() ? 0 : 8), p_146982_4_); ++ this.field_146296_j.func_180453_a(font, p_146982_1_, p_146982_2_, p_146982_3_ - (this.field_147012_x.func_190926_b() ? 0 : 8), p_146982_4_); this.field_73735_i = 0.0F; this.field_146296_j.field_77023_b = 0.0F; } -@@ -240,13 +243,12 @@ +@@ -239,13 +241,12 @@ - if (itemstack == null && p_146977_1_.func_111238_b()) + if (itemstack.func_190926_b() && p_146977_1_.func_111238_b()) { - String s1 = p_146977_1_.func_178171_c(); + TextureAtlasSprite textureatlassprite = p_146977_1_.getBackgroundSprite(); @@ -30,7 +29,7 @@ this.func_175175_a(i, j, textureatlassprite, 16, 16); GlStateManager.func_179145_e(); flag1 = true; -@@ -316,7 +318,7 @@ +@@ -319,7 +320,7 @@ protected void func_73864_a(int p_73864_1_, int p_73864_2_, int p_73864_3_) throws IOException { super.func_73864_a(p_73864_1_, p_73864_2_, p_73864_3_); @@ -39,7 +38,7 @@ Slot slot = this.func_146975_c(p_73864_1_, p_73864_2_); long i = Minecraft.func_71386_F(); this.field_146993_M = this.field_146998_K == slot && i - this.field_146997_J < 250L && this.field_146992_L == p_73864_3_; -@@ -327,6 +329,7 @@ +@@ -330,6 +331,7 @@ int j = this.field_147003_i; int k = this.field_147009_r; boolean flag1 = p_73864_1_ < j || p_73864_2_ < k || p_73864_1_ >= j + this.field_146999_f || p_73864_2_ >= k + this.field_147000_g; @@ -47,16 +46,16 @@ int l = -1; if (slot != null) -@@ -364,7 +367,7 @@ +@@ -367,7 +369,7 @@ { - if (this.field_146297_k.field_71439_g.field_71071_by.func_70445_o() == null) + if (this.field_146297_k.field_71439_g.field_71071_by.func_70445_o().func_190926_b()) { - if (p_73864_3_ == this.field_146297_k.field_71474_y.field_74322_I.func_151463_i() + 100) + if (this.field_146297_k.field_71474_y.field_74322_I.isActiveAndMatches(p_73864_3_ - 100)) { this.func_184098_a(slot, l, p_73864_3_, ClickType.CLONE); } -@@ -402,7 +405,7 @@ +@@ -405,7 +407,7 @@ { this.field_146987_F = 1; } @@ -65,7 +64,7 @@ { this.field_146987_F = 2; } -@@ -464,10 +467,12 @@ +@@ -467,10 +469,12 @@ protected void func_146286_b(int p_146286_1_, int p_146286_2_, int p_146286_3_) { @@ -78,7 +77,7 @@ int k = -1; if (slot != null) -@@ -488,7 +493,7 @@ +@@ -491,7 +495,7 @@ { for (Slot slot2 : this.field_147002_h.field_75151_b) { @@ -87,16 +86,16 @@ { this.func_184098_a(slot2, slot2.field_75222_d, p_146286_3_, ClickType.QUICK_MOVE); } -@@ -575,7 +580,7 @@ +@@ -578,7 +582,7 @@ } - else if (this.field_146297_k.field_71439_g.field_71071_by.func_70445_o() != null) + else if (!this.field_146297_k.field_71439_g.field_71071_by.func_70445_o().func_190926_b()) { - if (p_146286_3_ == this.field_146297_k.field_71474_y.field_74322_I.func_151463_i() + 100) + if (this.field_146297_k.field_71474_y.field_74322_I.isActiveAndMatches(p_146286_3_ - 100)) { this.func_184098_a(slot, k, p_146286_3_, ClickType.CLONE); } -@@ -627,7 +632,7 @@ +@@ -630,7 +634,7 @@ protected void func_73869_a(char p_73869_1_, int p_73869_2_) throws IOException { @@ -105,7 +104,7 @@ { this.field_146297_k.field_71439_g.func_71053_j(); } -@@ -636,11 +641,11 @@ +@@ -639,11 +643,11 @@ if (this.field_147006_u != null && this.field_147006_u.func_75216_d()) { @@ -119,7 +118,7 @@ { this.func_184098_a(this.field_147006_u, this.field_147006_u.field_75222_d, func_146271_m() ? 1 : 0, ClickType.THROW); } -@@ -653,7 +658,7 @@ +@@ -656,7 +660,7 @@ { for (int i = 0; i < 9; ++i) { @@ -128,7 +127,7 @@ { this.func_184098_a(this.field_147006_u, this.field_147006_u.field_75222_d, i, ClickType.SWAP); return true; -@@ -686,4 +691,16 @@ +@@ -689,4 +693,16 @@ this.field_146297_k.field_71439_g.func_71053_j(); } } diff --git a/patches/minecraft/net/minecraft/client/gui/inventory/GuiContainerCreative.java.patch b/patches/minecraft/net/minecraft/client/gui/inventory/GuiContainerCreative.java.patch index 3eb60412f..b9106120d 100644 --- a/patches/minecraft/net/minecraft/client/gui/inventory/GuiContainerCreative.java.patch +++ b/patches/minecraft/net/minecraft/client/gui/inventory/GuiContainerCreative.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/client/gui/inventory/GuiContainerCreative.java +++ ../src-work/minecraft/net/minecraft/client/gui/inventory/GuiContainerCreative.java -@@ -50,6 +50,8 @@ +@@ -52,6 +52,8 @@ private Slot field_147064_C; private boolean field_147057_D; private CreativeCrafting field_147059_E; @@ -9,7 +9,7 @@ public GuiContainerCreative(EntityPlayer p_i1088_1_) { -@@ -259,6 +261,13 @@ +@@ -265,6 +267,13 @@ this.func_147050_b(CreativeTabs.field_78032_a[i]); this.field_147059_E = new CreativeCrafting(this.field_146297_k); this.field_146297_k.field_71439_g.field_71069_bz.func_75132_a(this.field_147059_E); @@ -23,7 +23,7 @@ } else { -@@ -280,7 +289,7 @@ +@@ -286,7 +295,7 @@ protected void func_73869_a(char p_73869_1_, int p_73869_2_) throws IOException { @@ -32,7 +32,7 @@ { if (GameSettings.func_100015_a(this.field_146297_k.field_71474_y.field_74310_D)) { -@@ -318,6 +327,14 @@ +@@ -324,6 +333,14 @@ GuiContainerCreative.ContainerCreative guicontainercreative$containercreative = (GuiContainerCreative.ContainerCreative)this.field_147002_h; guicontainercreative$containercreative.field_148330_a.clear(); @@ -47,7 +47,7 @@ for (Item item : Item.field_150901_e) { if (item != null && item.func_77640_w() != null) -@@ -325,7 +342,13 @@ +@@ -331,7 +348,13 @@ item.func_150895_a(item, (CreativeTabs)null, guicontainercreative$containercreative.field_148330_a); } } @@ -61,15 +61,15 @@ for (Enchantment enchantment : Enchantment.field_185264_b) { if (enchantment != null && enchantment.field_77351_y != null) -@@ -333,7 +356,6 @@ +@@ -339,7 +362,6 @@ Items.field_151134_bR.func_92113_a(enchantment, guicontainercreative$containercreative.field_148330_a); } } - Iterator iterator = guicontainercreative$containercreative.field_148330_a.iterator(); - String s1 = this.field_147062_A.func_146179_b().toLowerCase(); + String s1 = this.field_147062_A.func_146179_b().toLowerCase(Locale.ROOT); -@@ -365,7 +387,7 @@ +@@ -371,7 +393,7 @@ { CreativeTabs creativetabs = CreativeTabs.field_78032_a[field_147058_w]; @@ -78,7 +78,7 @@ { GlStateManager.func_179084_k(); this.field_146289_q.func_78276_b(I18n.func_135052_a(creativetabs.func_78024_c(), new Object[0]), 8, 6, 4210752); -@@ -400,7 +422,7 @@ +@@ -406,7 +428,7 @@ for (CreativeTabs creativetabs : CreativeTabs.field_78032_a) { @@ -87,7 +87,7 @@ { this.func_147050_b(creativetabs); return; -@@ -413,11 +435,13 @@ +@@ -419,11 +441,13 @@ private boolean func_147055_p() { @@ -101,7 +101,7 @@ int i = field_147058_w; field_147058_w = p_147050_1_.func_78021_a(); GuiContainerCreative.ContainerCreative guicontainercreative$containercreative = (GuiContainerCreative.ContainerCreative)this.field_147002_h; -@@ -488,12 +512,14 @@ +@@ -494,12 +518,14 @@ if (this.field_147062_A != null) { @@ -117,7 +117,7 @@ this.func_147053_i(); } else -@@ -563,20 +589,43 @@ +@@ -569,20 +595,43 @@ } super.func_73863_a(p_73863_1_, p_73863_2_, p_73863_3_); @@ -162,7 +162,7 @@ GlStateManager.func_179131_c(1.0F, 1.0F, 1.0F, 1.0F); GlStateManager.func_179140_f(); } -@@ -624,7 +673,9 @@ +@@ -630,7 +679,9 @@ } } @@ -172,7 +172,7 @@ } else { -@@ -638,16 +689,35 @@ +@@ -644,16 +695,35 @@ RenderHelper.func_74520_c(); CreativeTabs creativetabs = CreativeTabs.field_78032_a[field_147058_w]; @@ -209,7 +209,7 @@ this.field_146297_k.func_110434_K().func_110577_a(new ResourceLocation("textures/gui/container/creative_inventory/tab_" + creativetabs.func_78015_f())); this.func_73729_b(this.field_147003_i, this.field_147009_r, 0, 0, this.field_146999_f, this.field_147000_g); this.field_147062_A.func_146194_f(); -@@ -662,6 +732,14 @@ +@@ -668,6 +738,14 @@ this.func_73729_b(i, j + (int)((float)(k - j - 17) * this.field_147067_x), 232 + (this.func_147055_p() ? 0 : 12), 0, 12, 15); } @@ -224,7 +224,7 @@ this.func_147051_a(creativetabs); if (creativetabs == CreativeTabs.field_78036_m) -@@ -672,6 +750,14 @@ +@@ -678,6 +756,14 @@ protected boolean func_147049_a(CreativeTabs p_147049_1_, int p_147049_2_, int p_147049_3_) { @@ -239,7 +239,7 @@ int i = p_147049_1_.func_78020_k(); int j = 28 * i; int k = 0; -@@ -768,6 +854,8 @@ +@@ -774,6 +860,8 @@ } GlStateManager.func_179140_f(); @@ -248,7 +248,7 @@ this.func_73729_b(l, i1, j, k, 28, 32); this.field_73735_i = 100.0F; this.field_146296_j.field_77023_b = 100.0F; -@@ -794,6 +882,15 @@ +@@ -800,6 +888,15 @@ { this.field_146297_k.func_147108_a(new GuiStats(this, this.field_146297_k.field_71439_g.func_146107_m())); } diff --git a/patches/minecraft/net/minecraft/client/multiplayer/ChunkProviderClient.java.patch b/patches/minecraft/net/minecraft/client/multiplayer/ChunkProviderClient.java.patch index 0350d3139..f6725fc12 100644 --- a/patches/minecraft/net/minecraft/client/multiplayer/ChunkProviderClient.java.patch +++ b/patches/minecraft/net/minecraft/client/multiplayer/ChunkProviderClient.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/client/multiplayer/ChunkProviderClient.java +++ ../src-work/minecraft/net/minecraft/client/multiplayer/ChunkProviderClient.java -@@ -59,6 +59,7 @@ +@@ -60,6 +60,7 @@ { Chunk chunk = new Chunk(this.field_73235_d, p_73158_1_, p_73158_2_); this.field_73236_b.put(ChunkPos.func_77272_a(p_73158_1_, p_73158_2_), chunk); diff --git a/patches/minecraft/net/minecraft/client/multiplayer/GuiConnecting.java.patch b/patches/minecraft/net/minecraft/client/multiplayer/GuiConnecting.java.patch index 2323322a9..e405930bf 100644 --- a/patches/minecraft/net/minecraft/client/multiplayer/GuiConnecting.java.patch +++ b/patches/minecraft/net/minecraft/client/multiplayer/GuiConnecting.java.patch @@ -4,8 +4,8 @@ inetaddress = InetAddress.getByName(p_146367_1_); GuiConnecting.this.field_146371_g = NetworkManager.func_181124_a(inetaddress, p_146367_2_, GuiConnecting.this.field_146297_k.field_71474_y.func_181148_f()); GuiConnecting.this.field_146371_g.func_150719_a(new NetHandlerLoginClient(GuiConnecting.this.field_146371_g, GuiConnecting.this.field_146297_k, GuiConnecting.this.field_146374_i)); -- GuiConnecting.this.field_146371_g.func_179290_a(new C00Handshake(210, p_146367_1_, p_146367_2_, EnumConnectionState.LOGIN)); -+ GuiConnecting.this.field_146371_g.func_179290_a(new C00Handshake(210, p_146367_1_, p_146367_2_, EnumConnectionState.LOGIN, true)); +- GuiConnecting.this.field_146371_g.func_179290_a(new C00Handshake(314, p_146367_1_, p_146367_2_, EnumConnectionState.LOGIN)); ++ GuiConnecting.this.field_146371_g.func_179290_a(new C00Handshake(314, p_146367_1_, p_146367_2_, EnumConnectionState.LOGIN, true)); GuiConnecting.this.field_146371_g.func_179290_a(new CPacketLoginStart(GuiConnecting.this.field_146297_k.func_110432_I().func_148256_e())); } catch (UnknownHostException unknownhostexception) diff --git a/patches/minecraft/net/minecraft/client/multiplayer/PlayerControllerMP.java.patch b/patches/minecraft/net/minecraft/client/multiplayer/PlayerControllerMP.java.patch index d42843ad4..68c9cf8b9 100644 --- a/patches/minecraft/net/minecraft/client/multiplayer/PlayerControllerMP.java.patch +++ b/patches/minecraft/net/minecraft/client/multiplayer/PlayerControllerMP.java.patch @@ -1,19 +1,19 @@ --- ../src-base/minecraft/net/minecraft/client/multiplayer/PlayerControllerMP.java +++ ../src-work/minecraft/net/minecraft/client/multiplayer/PlayerControllerMP.java -@@ -123,6 +123,12 @@ +@@ -122,6 +122,12 @@ } } + ItemStack stack = field_78776_a.field_71439_g.func_184614_ca(); -+ if (stack != null && stack.func_77973_b() != null && stack.func_77973_b().onBlockStartBreak(stack, p_187103_1_, field_78776_a.field_71439_g)) ++ if (!stack.func_190926_b() && stack.func_77973_b().onBlockStartBreak(stack, p_187103_1_, field_78776_a.field_71439_g)) + { + return false; + } + - if (this.field_78779_k.func_77145_d() && this.field_78776_a.field_71439_g.func_184614_ca() != null && this.field_78776_a.field_71439_g.func_184614_ca().func_77973_b() instanceof ItemSword) + if (this.field_78779_k.func_77145_d() && !this.field_78776_a.field_71439_g.func_184614_ca().func_190926_b() && this.field_78776_a.field_71439_g.func_184614_ca().func_77973_b() instanceof ItemSword) { return false; -@@ -144,14 +150,7 @@ +@@ -143,19 +149,13 @@ else { world.func_175718_b(2001, p_187103_1_, Block.func_176210_f(iblockstate)); @@ -28,15 +28,18 @@ this.field_178895_c = new BlockPos(this.field_178895_c.func_177958_n(), -1, this.field_178895_c.func_177952_p()); if (!this.field_78779_k.func_77145_d()) -@@ -162,13 +161,20 @@ - { - itemstack1.func_179548_a(world, iblockstate, p_187103_1_, this.field_78776_a.field_71439_g); + { + ItemStack itemstack1 = this.field_78776_a.field_71439_g.func_184614_ca(); ++ ItemStack copyBeforeUse = itemstack1.func_77946_l(); -- if (itemstack1.field_77994_a == 0) -+ if (itemstack1.field_77994_a <= 0) + if (!itemstack1.func_190926_b()) + { +@@ -163,11 +163,18 @@ + + if (itemstack1.func_190926_b()) { -+ net.minecraftforge.event.ForgeEventFactory.onPlayerDestroyItem(this.field_78776_a.field_71439_g, itemstack1, EnumHand.MAIN_HAND); - this.field_78776_a.field_71439_g.func_184611_a(EnumHand.MAIN_HAND, (ItemStack)null); ++ net.minecraftforge.event.ForgeEventFactory.onPlayerDestroyItem(this.field_78776_a.field_71439_g, copyBeforeUse, EnumHand.MAIN_HAND); + this.field_78776_a.field_71439_g.func_184611_a(EnumHand.MAIN_HAND, ItemStack.field_190927_a); } } } @@ -50,7 +53,7 @@ return flag; } } -@@ -208,6 +214,7 @@ +@@ -207,6 +214,7 @@ if (this.field_78779_k.func_77145_d()) { this.field_78774_b.func_147297_a(new CPacketPlayerDigging(CPacketPlayerDigging.Action.START_DESTROY_BLOCK, p_180511_1_, p_180511_2_)); @@ -58,7 +61,7 @@ func_178891_a(this.field_78776_a, this, p_180511_1_, p_180511_2_); this.field_78781_i = 5; } -@@ -219,14 +226,17 @@ +@@ -218,14 +226,17 @@ } this.field_78774_b.func_147297_a(new CPacketPlayerDigging(CPacketPlayerDigging.Action.START_DESTROY_BLOCK, p_180511_1_, p_180511_2_)); @@ -77,7 +80,7 @@ if (flag && iblockstate.func_185903_a(this.field_78776_a.field_71439_g, this.field_78776_a.field_71439_g.field_70170_p, p_180511_1_) >= 1.0F) { this.func_187103_a(p_180511_1_); -@@ -290,7 +300,7 @@ +@@ -289,7 +300,7 @@ if (this.field_78780_h % 4.0F == 0.0F) { @@ -86,105 +89,104 @@ this.field_78776_a.func_147118_V().func_147682_a(new PositionedSoundRecord(soundtype.func_185846_f(), SoundCategory.NEUTRAL, (soundtype.func_185843_a() + 1.0F) / 8.0F, soundtype.func_185847_b() * 0.5F, p_180512_1_)); } -@@ -342,7 +352,7 @@ +@@ -341,7 +352,7 @@ - if (this.field_85183_f != null && itemstack != null) + if (!this.field_85183_f.func_190926_b() && !itemstack.func_190926_b()) { - flag = itemstack.func_77973_b() == this.field_85183_f.func_77973_b() && ItemStack.func_77970_a(itemstack, this.field_85183_f) && (itemstack.func_77984_f() || itemstack.func_77960_j() == this.field_85183_f.func_77960_j()); + flag = !net.minecraftforge.client.ForgeHooksClient.shouldCauseBlockBreakReset(this.field_85183_f, itemstack); } return p_178893_1_.equals(this.field_178895_c) && flag; -@@ -373,13 +383,32 @@ +@@ -373,13 +384,31 @@ } else { + net.minecraftforge.event.entity.player.PlayerInteractEvent.RightClickBlock event = net.minecraftforge.common.ForgeHooks -+ .onRightClickBlock(p_187099_1_, p_187099_7_, p_187099_3_, p_187099_4_, p_187099_5_, net.minecraftforge.common.ForgeHooks.rayTraceEyeHitVec(p_187099_1_, func_78757_d() + 1)); ++ .onRightClickBlock(p_187099_1_, p_187099_6_, p_187099_3_, p_187099_4_, net.minecraftforge.common.ForgeHooks.rayTraceEyeHitVec(p_187099_1_, func_78757_d() + 1)); + if (event.isCanceled()) + { + // Give the server a chance to fire event as well. That way server event is not dependant on client event. -+ this.field_78774_b.func_147297_a(new CPacketPlayerTryUseItemOnBlock(p_187099_4_, p_187099_5_, p_187099_7_, f, f1, f2)); ++ this.field_78774_b.func_147297_a(new CPacketPlayerTryUseItemOnBlock(p_187099_3_, p_187099_4_, p_187099_6_, f, f1, f2)); + return EnumActionResult.PASS; + } + EnumActionResult result = EnumActionResult.PASS; + if (this.field_78779_k != GameType.SPECTATOR) { -+ net.minecraft.item.Item item = p_187099_3_ == null ? null : p_187099_3_.func_77973_b(); -+ EnumActionResult ret = item == null ? EnumActionResult.PASS : item.onItemUseFirst(p_187099_3_, p_187099_1_, p_187099_2_, p_187099_4_, p_187099_5_, f, f1, f2, p_187099_7_); ++ EnumActionResult ret = itemstack.onItemUseFirst(p_187099_1_, p_187099_2_, p_187099_3_, p_187099_6_, p_187099_4_, f, f1, f2); + if (ret != EnumActionResult.PASS) return ret; + - IBlockState iblockstate = p_187099_2_.func_180495_p(p_187099_4_); + IBlockState iblockstate = p_187099_2_.func_180495_p(p_187099_3_); + boolean bypass = true; + for (ItemStack s : new ItemStack[]{p_187099_1_.func_184614_ca(), p_187099_1_.func_184592_cb()}) //TODO: Expand to more hands? player.inv.getHands()? -+ bypass = bypass && (s == null || s.func_77973_b().doesSneakBypassUse(s, p_187099_2_, p_187099_4_, p_187099_1_)); ++ bypass = bypass && (s == null || s.func_77973_b().doesSneakBypassUse(s, p_187099_2_, p_187099_3_, p_187099_1_)); -- if ((!p_187099_1_.func_70093_af() || p_187099_1_.func_184614_ca() == null && p_187099_1_.func_184592_cb() == null) && iblockstate.func_177230_c().func_180639_a(p_187099_2_, p_187099_4_, iblockstate, p_187099_1_, p_187099_7_, p_187099_3_, p_187099_5_, f, f1, f2)) -+ if (!p_187099_1_.func_70093_af() || bypass || event.getUseBlock() == net.minecraftforge.fml.common.eventhandler.Event.Result.ALLOW) +- if ((!p_187099_1_.func_70093_af() || p_187099_1_.func_184614_ca().func_190926_b() && p_187099_1_.func_184592_cb().func_190926_b()) && iblockstate.func_177230_c().func_180639_a(p_187099_2_, p_187099_3_, iblockstate, p_187099_1_, p_187099_6_, p_187099_4_, f, f1, f2)) ++ if ((!p_187099_1_.func_70093_af() || bypass || event.getUseBlock() == net.minecraftforge.fml.common.eventhandler.Event.Result.ALLOW)) { - flag = true; -+ if(event.getUseBlock() != net.minecraftforge.fml.common.eventhandler.Event.Result.DENY) -+ flag = iblockstate.func_177230_c().func_180639_a(p_187099_2_, p_187099_4_, iblockstate, p_187099_1_, p_187099_7_, p_187099_3_, p_187099_5_, f, f1, f2); -+ if(flag) result = EnumActionResult.SUCCESS; ++ if (event.getUseBlock() != net.minecraftforge.fml.common.eventhandler.Event.Result.DENY) ++ flag = p_187099_1_.func_184614_ca().func_190926_b() && p_187099_1_.func_184592_cb().func_190926_b() && iblockstate.func_177230_c().func_180639_a(p_187099_2_, p_187099_3_, iblockstate, p_187099_1_, p_187099_6_, p_187099_4_, f, f1, f2); ++ if (flag) result = EnumActionResult.SUCCESS; } - if (!flag && p_187099_3_ != null && p_187099_3_.func_77973_b() instanceof ItemBlock) + if (!flag && itemstack.func_77973_b() instanceof ItemBlock) @@ -395,7 +424,7 @@ - this.field_78774_b.func_147297_a(new CPacketPlayerTryUseItemOnBlock(p_187099_4_, p_187099_5_, p_187099_7_, f, f1, f2)); + this.field_78774_b.func_147297_a(new CPacketPlayerTryUseItemOnBlock(p_187099_3_, p_187099_4_, p_187099_6_, f, f1, f2)); - if (!flag && this.field_78779_k != GameType.SPECTATOR) + if (!flag && this.field_78779_k != GameType.SPECTATOR || event.getUseItem() == net.minecraftforge.fml.common.eventhandler.Event.Result.ALLOW) { - if (p_187099_3_ == null) + if (itemstack.func_190926_b()) { -@@ -421,14 +450,19 @@ +@@ -421,14 +450,20 @@ { - int i = p_187099_3_.func_77960_j(); - int j = p_187099_3_.field_77994_a; + int i = itemstack.func_77960_j(); + int j = itemstack.func_190916_E(); + if (event.getUseItem() != net.minecraftforge.fml.common.eventhandler.Event.Result.DENY) { - EnumActionResult enumactionresult = p_187099_3_.func_179546_a(p_187099_1_, p_187099_2_, p_187099_4_, p_187099_7_, p_187099_5_, f, f1, f2); - p_187099_3_.func_77964_b(i); - p_187099_3_.field_77994_a = j; + EnumActionResult enumactionresult = itemstack.func_179546_a(p_187099_1_, p_187099_2_, p_187099_3_, p_187099_6_, p_187099_4_, f, f1, f2); + itemstack.func_77964_b(i); + itemstack.func_190920_e(j); return enumactionresult; + } else return result; } else { -- return p_187099_3_.func_179546_a(p_187099_1_, p_187099_2_, p_187099_4_, p_187099_7_, p_187099_5_, f, f1, f2); +- return itemstack.func_179546_a(p_187099_1_, p_187099_2_, p_187099_3_, p_187099_6_, p_187099_4_, f, f1, f2); ++ ItemStack copyForUse = itemstack.func_77946_l(); + if (event.getUseItem() != net.minecraftforge.fml.common.eventhandler.Event.Result.DENY) -+ result = p_187099_3_.func_179546_a(p_187099_1_, p_187099_2_, p_187099_4_, p_187099_7_, p_187099_5_, f, f1, f2); -+ if (p_187099_3_.field_77994_a <= 0) net.minecraftforge.event.ForgeEventFactory.onPlayerDestroyItem(p_187099_1_, p_187099_3_, p_187099_7_); ++ result = itemstack.func_179546_a(p_187099_1_, p_187099_2_, p_187099_3_, p_187099_6_, p_187099_4_, f, f1, f2); ++ if (itemstack.func_190926_b()) net.minecraftforge.event.ForgeEventFactory.onPlayerDestroyItem(p_187099_1_, copyForUse, p_187099_6_); + return result; } } } -@@ -456,6 +490,7 @@ +@@ -457,6 +492,7 @@ } else { -+ if (net.minecraftforge.common.ForgeHooks.onItemRightClick(p_187101_1_, p_187101_4_, p_187101_3_)) return net.minecraft.util.EnumActionResult.PASS; - int i = p_187101_3_.field_77994_a; - ActionResult actionresult = p_187101_3_.func_77957_a(p_187101_2_, p_187101_1_, p_187101_4_); - ItemStack itemstack = (ItemStack)actionresult.func_188398_b(); -@@ -464,9 +499,10 @@ ++ if (net.minecraftforge.common.ForgeHooks.onItemRightClick(p_187101_1_, p_187101_3_)) return net.minecraft.util.EnumActionResult.PASS; + int i = itemstack.func_190916_E(); + ActionResult actionresult = itemstack.func_77957_a(p_187101_2_, p_187101_1_, p_187101_3_); + ItemStack itemstack1 = (ItemStack)actionresult.func_188398_b(); +@@ -464,6 +500,10 @@ + if (itemstack1 != itemstack || itemstack1.func_190916_E() != i) { - p_187101_1_.func_184611_a(p_187101_4_, itemstack); - -- if (itemstack.field_77994_a == 0) -+ if (itemstack.field_77994_a <= 0) - { - p_187101_1_.func_184611_a(p_187101_4_, (ItemStack)null); -+ net.minecraftforge.event.ForgeEventFactory.onPlayerDestroyItem(p_187101_1_, itemstack, p_187101_4_); - } + p_187101_1_.func_184611_a(p_187101_3_, itemstack1); ++ if (itemstack1.func_190926_b()) ++ { ++ net.minecraftforge.event.ForgeEventFactory.onPlayerDestroyItem(p_187101_1_, itemstack, p_187101_3_); ++ } } -@@ -504,6 +540,7 @@ + return actionresult.func_188397_a(); +@@ -500,6 +540,7 @@ this.func_78750_j(); - Vec3d vec3d = new Vec3d(p_187102_3_.field_72307_f.field_72450_a - p_187102_2_.field_70165_t, p_187102_3_.field_72307_f.field_72448_b - p_187102_2_.field_70163_u, p_187102_3_.field_72307_f.field_72449_c - p_187102_2_.field_70161_v); - this.field_78774_b.func_147297_a(new CPacketUseEntity(p_187102_2_, p_187102_5_, vec3d)); -+ if(net.minecraftforge.common.ForgeHooks.onInteractEntityAt(p_187102_1_, p_187102_2_, p_187102_3_, p_187102_1_.func_184586_b(p_187102_5_), p_187102_5_)) return EnumActionResult.PASS; - return this.field_78779_k == GameType.SPECTATOR ? EnumActionResult.PASS : p_187102_2_.func_184199_a(p_187102_1_, vec3d, p_187102_4_, p_187102_5_); + Vec3d vec3d = new Vec3d(p_184120_3_.field_72307_f.field_72450_a - p_184120_2_.field_70165_t, p_184120_3_.field_72307_f.field_72448_b - p_184120_2_.field_70163_u, p_184120_3_.field_72307_f.field_72449_c - p_184120_2_.field_70161_v); + this.field_78774_b.func_147297_a(new CPacketUseEntity(p_184120_2_, p_184120_4_, vec3d)); ++ if(net.minecraftforge.common.ForgeHooks.onInteractEntityAt(p_184120_1_, p_184120_2_, p_184120_3_, p_184120_4_)) return EnumActionResult.PASS; + return this.field_78779_k == GameType.SPECTATOR ? EnumActionResult.PASS : p_184120_2_.func_184199_a(p_184120_1_, vec3d, p_184120_4_); } diff --git a/patches/minecraft/net/minecraft/client/network/NetHandlerLoginClient.java.patch b/patches/minecraft/net/minecraft/client/network/NetHandlerLoginClient.java.patch index 5d54f059f..515d903fc 100644 --- a/patches/minecraft/net/minecraft/client/network/NetHandlerLoginClient.java.patch +++ b/patches/minecraft/net/minecraft/client/network/NetHandlerLoginClient.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/client/network/NetHandlerLoginClient.java +++ ../src-work/minecraft/net/minecraft/client/network/NetHandlerLoginClient.java -@@ -106,7 +106,10 @@ +@@ -108,7 +108,10 @@ { this.field_175091_e = p_147390_1_.func_179730_a(); this.field_147393_d.func_150723_a(EnumConnectionState.PLAY); diff --git a/patches/minecraft/net/minecraft/client/network/NetHandlerPlayClient.java.patch b/patches/minecraft/net/minecraft/client/network/NetHandlerPlayClient.java.patch index 054c4bf4e..11828abd0 100644 --- a/patches/minecraft/net/minecraft/client/network/NetHandlerPlayClient.java.patch +++ b/patches/minecraft/net/minecraft/client/network/NetHandlerPlayClient.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/client/network/NetHandlerPlayClient.java +++ ../src-work/minecraft/net/minecraft/client/network/NetHandlerPlayClient.java -@@ -271,7 +271,7 @@ +@@ -280,7 +280,7 @@ { PacketThreadUtil.func_180031_a(p_147282_1_, this, this.field_147299_f); this.field_147299_f.field_71442_b = new PlayerControllerMP(this.field_147299_f, this); @@ -9,7 +9,7 @@ this.field_147299_f.field_71474_y.field_74318_M = p_147282_1_.func_149192_g(); this.field_147299_f.func_71403_a(this.field_147300_g); this.field_147299_f.field_71439_g.field_71093_bK = p_147282_1_.func_149194_f(); -@@ -725,7 +725,7 @@ +@@ -742,7 +742,7 @@ if (tileentity != null) { @@ -18,7 +18,7 @@ } } } -@@ -803,14 +803,16 @@ +@@ -819,14 +819,16 @@ public void func_147251_a(SPacketChat p_147251_1_) { PacketThreadUtil.func_180031_a(p_147251_1_, this, this.field_147299_f); @@ -37,19 +37,7 @@ } } -@@ -866,6 +868,11 @@ - float f = (float)(p_147281_1_.func_149028_l() * 360) / 256.0F; - float f1 = (float)(p_147281_1_.func_149030_m() * 360) / 256.0F; - EntityLivingBase entitylivingbase = (EntityLivingBase)EntityList.func_75616_a(p_147281_1_.func_149025_e(), this.field_147299_f.field_71441_e); -+ if (entitylivingbase == null) -+ { -+ net.minecraftforge.fml.common.FMLLog.info("Server attempted to spawn an unknown entity using ID: {0} at ({1}, {2}, {3}) Skipping!", p_147281_1_.func_149025_e(), d0, d1, d2); -+ return; -+ } - EntityTracker.func_187254_a(entitylivingbase, d0, d1, d2); - entitylivingbase.field_70761_aq = (float)(p_147281_1_.func_149032_n() * 360) / 256.0F; - entitylivingbase.field_70759_as = (float)(p_147281_1_.func_149032_n() * 360) / 256.0F; -@@ -938,7 +945,7 @@ +@@ -958,7 +960,7 @@ if (entity1 == this.field_147299_f.field_71439_g && !flag) { @@ -58,7 +46,7 @@ } } } -@@ -1169,6 +1176,10 @@ +@@ -1205,6 +1207,10 @@ { tileentity.func_145839_a(p_147273_1_.func_148857_g()); } @@ -69,7 +57,7 @@ if (flag && this.field_147299_f.field_71462_r instanceof GuiCommandBlock) { -@@ -1266,15 +1277,15 @@ +@@ -1302,15 +1308,15 @@ } else if (f == 101.0F) { @@ -88,7 +76,7 @@ } } else if (i == 6) -@@ -1368,7 +1379,7 @@ +@@ -1424,7 +1430,7 @@ if (entity instanceof EntityLivingBase) { diff --git a/patches/minecraft/net/minecraft/client/network/ServerPinger.java.patch b/patches/minecraft/net/minecraft/client/network/ServerPinger.java.patch index b32b646a2..8d4423567 100644 --- a/patches/minecraft/net/minecraft/client/network/ServerPinger.java.patch +++ b/patches/minecraft/net/minecraft/client/network/ServerPinger.java.patch @@ -12,8 +12,8 @@ try { -- networkmanager.func_179290_a(new C00Handshake(210, serveraddress.func_78861_a(), serveraddress.func_78864_b(), EnumConnectionState.STATUS)); -+ networkmanager.func_179290_a(new C00Handshake(210, serveraddress.func_78861_a(), serveraddress.func_78864_b(), EnumConnectionState.STATUS, true)); +- networkmanager.func_179290_a(new C00Handshake(314, serveraddress.func_78861_a(), serveraddress.func_78864_b(), EnumConnectionState.STATUS)); ++ networkmanager.func_179290_a(new C00Handshake(314, serveraddress.func_78861_a(), serveraddress.func_78864_b(), EnumConnectionState.STATUS, true)); networkmanager.func_179290_a(new CPacketServerQuery()); } catch (Throwable throwable) diff --git a/patches/minecraft/net/minecraft/client/particle/ParticleManager.java.patch b/patches/minecraft/net/minecraft/client/particle/ParticleManager.java.patch index 63fcf306e..51eb5cbb3 100644 --- a/patches/minecraft/net/minecraft/client/particle/ParticleManager.java.patch +++ b/patches/minecraft/net/minecraft/client/particle/ParticleManager.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/client/particle/ParticleManager.java +++ ../src-work/minecraft/net/minecraft/client/particle/ParticleManager.java -@@ -146,6 +146,7 @@ +@@ -153,6 +153,7 @@ public void func_78873_a(Particle p_78873_1_) { @@ -8,7 +8,7 @@ this.field_187241_h.add(p_78873_1_); } -@@ -380,7 +381,7 @@ +@@ -387,7 +388,7 @@ public void func_180533_a(BlockPos p_180533_1_, IBlockState p_180533_2_) { @@ -17,7 +17,7 @@ { p_180533_2_ = p_180533_2_.func_185899_b(this.field_78878_a, p_180533_1_); int i = 4; -@@ -464,4 +465,13 @@ +@@ -471,4 +472,13 @@ return "" + i; } diff --git a/patches/minecraft/net/minecraft/client/renderer/BlockModelRenderer.java.patch b/patches/minecraft/net/minecraft/client/renderer/BlockModelRenderer.java.patch index f0313eddf..00b47dacf 100644 --- a/patches/minecraft/net/minecraft/client/renderer/BlockModelRenderer.java.patch +++ b/patches/minecraft/net/minecraft/client/renderer/BlockModelRenderer.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/client/renderer/BlockModelRenderer.java +++ ../src-work/minecraft/net/minecraft/client/renderer/BlockModelRenderer.java -@@ -141,7 +141,14 @@ +@@ -128,7 +128,14 @@ p_187492_8_.func_187491_a(p_187492_1_, p_187492_2_, p_187492_3_, bakedquad.func_178210_d(), p_187492_6_, p_187492_7_); p_187492_4_.func_178981_a(bakedquad.func_178209_a()); p_187492_4_.func_178962_a(p_187492_8_.field_178207_c[0], p_187492_8_.field_178207_c[1], p_187492_8_.field_178207_c[2], p_187492_8_.field_178207_c[3]); @@ -16,10 +16,10 @@ if (bakedquad.func_178212_b()) { int k = this.field_187499_a.func_186724_a(p_187492_2_, p_187492_1_, p_187492_3_, bakedquad.func_178211_c()); -@@ -291,11 +298,26 @@ - float f = (float)(j1 >> 16 & 255) / 255.0F; - float f1 = (float)(j1 >> 8 & 255) / 255.0F; - float f2 = (float)(j1 & 255) / 255.0F; +@@ -262,11 +269,26 @@ + float f = (float)(k >> 16 & 255) / 255.0F; + float f1 = (float)(k >> 8 & 255) / 255.0F; + float f2 = (float)(k & 255) / 255.0F; + if(bakedquad.shouldApplyDiffuseLighting()) + { + float diffuse = net.minecraftforge.client.model.pipeline.LightUtil.diffuseLight(bakedquad.func_178210_d()); diff --git a/patches/minecraft/net/minecraft/client/renderer/BlockModelShapes.java.patch b/patches/minecraft/net/minecraft/client/renderer/BlockModelShapes.java.patch index 6ff9d53b7..156cea6c9 100644 --- a/patches/minecraft/net/minecraft/client/renderer/BlockModelShapes.java.patch +++ b/patches/minecraft/net/minecraft/client/renderer/BlockModelShapes.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/client/renderer/BlockModelShapes.java +++ ../src-work/minecraft/net/minecraft/client/renderer/BlockModelShapes.java -@@ -307,5 +307,6 @@ +@@ -392,5 +392,6 @@ return new ModelResourceLocation(s + "_double_slab", s1); } }); diff --git a/patches/minecraft/net/minecraft/client/renderer/BlockRendererDispatcher.java.patch b/patches/minecraft/net/minecraft/client/renderer/BlockRendererDispatcher.java.patch index 3b5e95d38..884649bcd 100644 --- a/patches/minecraft/net/minecraft/client/renderer/BlockRendererDispatcher.java.patch +++ b/patches/minecraft/net/minecraft/client/renderer/BlockRendererDispatcher.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/client/renderer/BlockRendererDispatcher.java +++ ../src-work/minecraft/net/minecraft/client/renderer/BlockRendererDispatcher.java -@@ -29,7 +29,7 @@ +@@ -28,7 +28,7 @@ public BlockRendererDispatcher(BlockModelShapes p_i46577_1_, BlockColors p_i46577_2_) { this.field_175028_a = p_i46577_1_; @@ -9,7 +9,7 @@ this.field_175025_e = new BlockFluidRenderer(p_i46577_2_); } -@@ -44,7 +44,7 @@ +@@ -43,7 +43,7 @@ { p_175020_1_ = p_175020_1_.func_185899_b(p_175020_4_, p_175020_2_); IBakedModel ibakedmodel = this.field_175028_a.func_178125_b(p_175020_1_); @@ -18,7 +18,7 @@ this.field_175027_c.func_178267_a(p_175020_4_, ibakedmodel1, p_175020_1_, p_175020_2_, Tessellator.func_178181_a().func_178180_c(), true); } } -@@ -76,7 +76,9 @@ +@@ -75,7 +75,9 @@ switch (enumblockrendertype) { case MODEL: diff --git a/patches/minecraft/net/minecraft/client/renderer/EntityRenderer.java.patch b/patches/minecraft/net/minecraft/client/renderer/EntityRenderer.java.patch index 2e5d953c2..6643cac8f 100644 --- a/patches/minecraft/net/minecraft/client/renderer/EntityRenderer.java.patch +++ b/patches/minecraft/net/minecraft/client/renderer/EntityRenderer.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/client/renderer/EntityRenderer.java +++ ../src-work/minecraft/net/minecraft/client/renderer/EntityRenderer.java -@@ -207,6 +207,7 @@ +@@ -212,6 +212,7 @@ { this.func_175069_a(new ResourceLocation("shaders/post/invert.json")); } @@ -8,7 +8,7 @@ } } -@@ -398,7 +399,7 @@ +@@ -413,7 +414,7 @@ if (d3 < d2 || d2 == 0.0D) { @@ -17,7 +17,7 @@ { if (d2 == 0.0D) { -@@ -491,7 +492,7 @@ +@@ -506,7 +507,7 @@ f = f * 60.0F / 70.0F; } @@ -26,7 +26,7 @@ } } -@@ -555,14 +556,8 @@ +@@ -570,14 +571,8 @@ { BlockPos blockpos = new BlockPos(entity); IBlockState iblockstate = this.field_78531_r.field_71441_e.func_180495_p(blockpos); @@ -42,7 +42,7 @@ GlStateManager.func_179114_b(entity.field_70126_B + (entity.field_70177_z - entity.field_70126_B) * p_78467_1_ + 180.0F, 0.0F, -1.0F, 0.0F); GlStateManager.func_179114_b(entity.field_70127_C + (entity.field_70125_A - entity.field_70127_C) * p_78467_1_, -1.0F, 0.0F, 0.0F); } -@@ -629,17 +624,20 @@ +@@ -644,17 +639,20 @@ if (!this.field_78531_r.field_71474_y.field_74325_U) { @@ -70,7 +70,7 @@ } GlStateManager.func_179109_b(0.0F, -f, 0.0F); -@@ -757,6 +755,7 @@ +@@ -772,6 +770,7 @@ boolean flag = this.field_78531_r.func_175606_aa() instanceof EntityLivingBase && ((EntityLivingBase)this.field_78531_r.func_175606_aa()).func_70608_bn(); @@ -78,7 +78,7 @@ if (this.field_78531_r.field_71474_y.field_74320_O == 0 && !flag && !this.field_78531_r.field_71474_y.field_74319_N && !this.field_78531_r.field_71442_b.func_78747_a()) { this.func_180436_i(); -@@ -1092,7 +1091,7 @@ +@@ -1109,7 +1108,7 @@ try { @@ -87,7 +87,7 @@ } catch (Throwable throwable) { -@@ -1187,7 +1186,7 @@ +@@ -1204,7 +1203,7 @@ if (this.field_78531_r.field_71442_b.func_178889_l() == GameType.SPECTATOR) { @@ -96,7 +96,7 @@ } else { -@@ -1312,7 +1311,9 @@ +@@ -1329,7 +1328,9 @@ GlStateManager.func_179094_E(); RenderHelper.func_74519_b(); this.field_78531_r.field_71424_I.func_76318_c("entities"); @@ -106,7 +106,7 @@ RenderHelper.func_74518_a(); this.func_175072_h(); } -@@ -1325,6 +1326,7 @@ +@@ -1342,6 +1343,7 @@ EntityPlayer entityplayer = (EntityPlayer)entity; GlStateManager.func_179118_c(); this.field_78531_r.field_71424_I.func_76318_c("outline"); @@ -114,7 +114,7 @@ renderglobal.func_72731_b(entityplayer, this.field_78531_r.field_71476_x, 0, p_175068_2_); GlStateManager.func_179141_d(); } -@@ -1371,6 +1373,17 @@ +@@ -1388,6 +1390,17 @@ GlStateManager.func_179103_j(7425); this.field_78531_r.field_71424_I.func_76318_c("translucent"); renderglobal.func_174977_a(BlockRenderLayer.TRANSLUCENT, (double)p_175068_2_, p_175068_1_, entity); @@ -132,7 +132,7 @@ GlStateManager.func_179103_j(7424); GlStateManager.func_179132_a(true); GlStateManager.func_179089_o(); -@@ -1383,6 +1396,9 @@ +@@ -1400,6 +1413,9 @@ this.func_180437_a(renderglobal, p_175068_2_, p_175068_1_); } @@ -142,7 +142,7 @@ this.field_78531_r.field_71424_I.func_76318_c("hand"); if (this.field_175074_C) -@@ -1498,6 +1514,13 @@ +@@ -1515,6 +1531,13 @@ protected void func_78474_d(float p_78474_1_) { @@ -156,7 +156,7 @@ float f = this.field_78531_r.field_71441_e.func_72867_j(p_78474_1_); if (f > 0.0F) -@@ -1828,6 +1851,13 @@ +@@ -1845,6 +1868,13 @@ this.field_175081_S = f7; } @@ -170,7 +170,7 @@ GlStateManager.func_179082_a(this.field_175080_Q, this.field_175082_R, this.field_175081_S, 0.0F); } -@@ -1838,7 +1868,9 @@ +@@ -1855,7 +1885,9 @@ GlStateManager.func_187432_a(0.0F, -1.0F, 0.0F); GlStateManager.func_179131_c(1.0F, 1.0F, 1.0F, 1.0F); IBlockState iblockstate = ActiveRenderInfo.func_186703_a(this.field_78531_r.field_71441_e, entity, p_78468_2_); @@ -181,7 +181,7 @@ if (entity instanceof EntityLivingBase && ((EntityLivingBase)entity).func_70644_a(MobEffects.field_76440_q)) { float f1 = 5.0F; -@@ -1923,6 +1955,7 @@ +@@ -1940,6 +1972,7 @@ GlStateManager.func_179102_b(f * 0.05F); GlStateManager.func_179153_c(Math.min(f, 192.0F) * 0.5F); } diff --git a/patches/minecraft/net/minecraft/client/renderer/ItemRenderer.java.patch b/patches/minecraft/net/minecraft/client/renderer/ItemRenderer.java.patch index 645a062f5..538b3d411 100644 --- a/patches/minecraft/net/minecraft/client/renderer/ItemRenderer.java.patch +++ b/patches/minecraft/net/minecraft/client/renderer/ItemRenderer.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/client/renderer/ItemRenderer.java +++ ../src-work/minecraft/net/minecraft/client/renderer/ItemRenderer.java -@@ -317,7 +317,7 @@ +@@ -311,7 +311,7 @@ { ItemStack itemstack = abstractclientplayer.func_184607_cu(); @@ -9,7 +9,7 @@ { EnumHand enumhand1 = abstractclientplayer.func_184600_cs(); flag = enumhand1 == EnumHand.MAIN_HAND; -@@ -334,6 +334,7 @@ +@@ -328,6 +328,7 @@ { float f3 = enumhand == EnumHand.MAIN_HAND ? f : 0.0F; float f5 = 1.0F - (this.field_187470_g + (this.field_187469_f - this.field_187470_g) * p_78440_1_); @@ -17,7 +17,7 @@ this.func_187457_a(abstractclientplayer, p_78440_1_, f1, EnumHand.MAIN_HAND, f3, this.field_187467_d, f5); } -@@ -341,6 +342,7 @@ +@@ -335,6 +336,7 @@ { float f4 = enumhand == EnumHand.OFF_HAND ? f : 0.0F; float f6 = 1.0F - (this.field_187472_i + (this.field_187471_h - this.field_187472_i) * p_78440_1_); @@ -25,16 +25,16 @@ this.func_187457_a(abstractclientplayer, p_78440_1_, f1, EnumHand.OFF_HAND, f4, this.field_187468_e, f6); } -@@ -361,7 +363,7 @@ +@@ -355,7 +357,7 @@ this.func_187456_a(p_187457_7_, p_187457_5_, enumhandside); } } - else if (p_187457_6_.func_77973_b() == Items.field_151098_aY) + else if (p_187457_6_.func_77973_b() instanceof net.minecraft.item.ItemMap) { - if (flag && this.field_187468_e == null) + if (flag && this.field_187468_e.func_190926_b()) { -@@ -445,6 +447,7 @@ +@@ -439,6 +441,7 @@ if (this.field_78455_a.field_71439_g.func_70094_T()) { IBlockState iblockstate = this.field_78455_a.field_71441_e.func_180495_p(new BlockPos(this.field_78455_a.field_71439_g)); @@ -42,8 +42,8 @@ EntityPlayer entityplayer = this.field_78455_a.field_71439_g; for (int i = 0; i < 8; ++i) -@@ -458,11 +461,13 @@ - if (iblockstate1.func_177230_c().func_176214_u()) +@@ -452,11 +455,13 @@ + if (iblockstate1.func_191058_s()) { iblockstate = iblockstate1; + overlayPos = blockpos; @@ -56,7 +56,7 @@ this.func_178108_a(p_78447_1_, this.field_78455_a.func_175602_ab().func_175023_a().func_178122_a(iblockstate)); } } -@@ -471,11 +476,13 @@ +@@ -465,11 +470,13 @@ { if (this.field_78455_a.field_71439_g.func_70055_a(Material.field_151586_h)) { @@ -70,7 +70,7 @@ this.func_78442_d(p_78447_1_); } } -@@ -597,8 +604,8 @@ +@@ -591,8 +598,8 @@ else { float f = entityplayersp.func_184825_o(1.0F); diff --git a/patches/minecraft/net/minecraft/client/renderer/OpenGlHelper.java.patch b/patches/minecraft/net/minecraft/client/renderer/OpenGlHelper.java.patch index 41709861e..52a6d1ecf 100644 --- a/patches/minecraft/net/minecraft/client/renderer/OpenGlHelper.java.patch +++ b/patches/minecraft/net/minecraft/client/renderer/OpenGlHelper.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/client/renderer/OpenGlHelper.java +++ ../src-work/minecraft/net/minecraft/client/renderer/OpenGlHelper.java -@@ -92,6 +92,10 @@ +@@ -93,6 +93,10 @@ public static int field_176089_P; public static int field_148826_e; @@ -11,7 +11,7 @@ public static void func_77474_a() { ContextCapabilities contextcapabilities = GLContext.getCapabilities(); -@@ -852,6 +856,12 @@ +@@ -853,6 +857,12 @@ { GL13.glMultiTexCoord2f(p_77475_0_, p_77475_1_, p_77475_2_); } diff --git a/patches/minecraft/net/minecraft/client/renderer/RenderGlobal.java.patch b/patches/minecraft/net/minecraft/client/renderer/RenderGlobal.java.patch index 69fa5b823..b384e522b 100644 --- a/patches/minecraft/net/minecraft/client/renderer/RenderGlobal.java.patch +++ b/patches/minecraft/net/minecraft/client/renderer/RenderGlobal.java.patch @@ -1,14 +1,6 @@ --- ../src-base/minecraft/net/minecraft/client/renderer/RenderGlobal.java +++ ../src-work/minecraft/net/minecraft/client/renderer/RenderGlobal.java -@@ -456,6 +456,7 @@ - { - this.field_175009_l.clear(); - this.field_72755_R.clear(); -+ if (field_175008_n != null) field_175008_n.func_178160_a(); // Forge: Fix MC-105406 - this.field_175008_n = null; - - if (this.field_174995_M != null) -@@ -548,8 +549,10 @@ +@@ -551,8 +551,10 @@ public void func_180446_a(Entity p_180446_1_, ICamera p_180446_2_, float p_180446_3_) { @@ -19,7 +11,7 @@ --this.field_72740_G; } else -@@ -560,9 +563,12 @@ +@@ -563,9 +565,12 @@ this.field_72769_h.field_72984_F.func_76320_a("prepare"); TileEntityRendererDispatcher.field_147556_a.func_190056_a(this.field_72769_h, this.field_72777_q.func_110434_K(), this.field_72777_q.field_71466_p, this.field_72777_q.func_175606_aa(), this.field_72777_q.field_71476_x, p_180446_3_); this.field_175010_j.func_180597_a(this.field_72769_h, this.field_72777_q.field_71466_p, this.field_72777_q.func_175606_aa(), this.field_72777_q.field_147125_j, this.field_72777_q.field_71474_y, p_180446_3_); @@ -32,7 +24,7 @@ Entity entity = this.field_72777_q.func_175606_aa(); double d3 = entity.field_70142_S + (entity.field_70165_t - entity.field_70142_S) * (double)p_180446_3_; double d4 = entity.field_70137_T + (entity.field_70163_u - entity.field_70137_T) * (double)p_180446_3_; -@@ -574,11 +580,15 @@ +@@ -577,11 +582,15 @@ this.field_72777_q.field_71460_t.func_180436_i(); this.field_72769_h.field_72984_F.func_76318_c("global"); List list = this.field_72769_h.func_72910_y(); @@ -48,7 +40,7 @@ ++this.field_72749_I; if (entity1.func_145770_h(d0, d1, d2)) -@@ -601,6 +611,7 @@ +@@ -604,6 +613,7 @@ { for (Entity entity2 : classinheritancemultimap) { @@ -56,7 +48,7 @@ boolean flag = this.field_175010_j.func_178635_a(entity2, p_180446_2_, d0, d1, d2) || entity2.func_184215_y(this.field_72777_q.field_71439_g); if (flag) -@@ -637,6 +648,7 @@ +@@ -640,6 +650,7 @@ } } @@ -64,7 +56,7 @@ if (this.func_174985_d() && (!list1.isEmpty() || this.field_184386_ad)) { this.field_72769_h.field_72984_F.func_76318_c("entityOutlines"); -@@ -676,6 +688,7 @@ +@@ -679,6 +690,7 @@ this.field_72769_h.field_72984_F.func_76318_c("blockentities"); RenderHelper.func_74519_b(); @@ -72,7 +64,7 @@ for (RenderGlobal.ContainerLocalRenderInformation renderglobal$containerlocalrenderinformation1 : this.field_72755_R) { List list3 = renderglobal$containerlocalrenderinformation1.field_178036_a.func_178571_g().func_178485_b(); -@@ -684,6 +697,7 @@ +@@ -687,6 +699,7 @@ { for (TileEntity tileentity2 : list3) { @@ -80,7 +72,7 @@ TileEntityRendererDispatcher.field_147556_a.func_180546_a(tileentity2, p_180446_3_, -1); } } -@@ -693,9 +707,11 @@ +@@ -696,9 +709,11 @@ { for (TileEntity tileentity : this.field_181024_n) { @@ -92,16 +84,7 @@ this.func_180443_s(); -@@ -722,7 +738,7 @@ - - Block block = this.field_72769_h.func_180495_p(blockpos).func_177230_c(); - -- if (tileentity1 != null && (block instanceof BlockChest || block instanceof BlockEnderChest || block instanceof BlockSign || block instanceof BlockSkull)) -+ if (tileentity1 != null && tileentity1.shouldRenderInPass(pass) && tileentity1.canRenderBreaking() && p_180446_2_.func_78546_a(tileentity1.getRenderBoundingBox())) - { - TileEntityRendererDispatcher.field_147556_a.func_180546_a(tileentity1, p_180446_3_, destroyblockprogress.func_73106_e()); - } -@@ -1213,6 +1229,13 @@ +@@ -1220,6 +1235,13 @@ public void func_174976_a(float p_174976_1_, int p_174976_2_) { @@ -115,7 +98,7 @@ if (this.field_72777_q.field_71441_e.field_73011_w.func_186058_p().func_186068_a() == 1) { this.func_180448_r(); -@@ -1430,6 +1453,12 @@ +@@ -1437,6 +1459,12 @@ public void func_180447_b(float p_180447_1_, int p_180447_2_) { @@ -128,7 +111,7 @@ if (this.field_72777_q.field_71441_e.field_73011_w.func_76569_d()) { if (this.field_72777_q.field_71474_y.func_181147_e() == 2) -@@ -1857,8 +1886,11 @@ +@@ -1864,8 +1892,11 @@ double d4 = (double)blockpos.func_177956_o() - d1; double d5 = (double)blockpos.func_177952_p() - d2; Block block = this.field_72769_h.func_180495_p(blockpos).func_177230_c(); @@ -141,7 +124,7 @@ { if (d3 * d3 + d4 * d4 + d5 * d5 > 1024.0D) { -@@ -2304,7 +2336,7 @@ +@@ -2333,7 +2364,7 @@ if (block.func_176223_P().func_185904_a() != Material.field_151579_a) { diff --git a/patches/minecraft/net/minecraft/client/renderer/RenderItem.java.patch b/patches/minecraft/net/minecraft/client/renderer/RenderItem.java.patch index 08410f932..5d58c4cc4 100644 --- a/patches/minecraft/net/minecraft/client/renderer/RenderItem.java.patch +++ b/patches/minecraft/net/minecraft/client/renderer/RenderItem.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/client/renderer/RenderItem.java +++ ../src-work/minecraft/net/minecraft/client/renderer/RenderItem.java -@@ -72,7 +72,7 @@ +@@ -71,7 +71,7 @@ public RenderItem(TextureManager p_i46552_1_, ModelManager p_i46552_2_, ItemColors p_i46552_3_) { this.field_175057_n = p_i46552_1_; @@ -9,7 +9,7 @@ this.func_175041_b(); this.field_184395_f = p_i46552_3_; } -@@ -224,7 +224,7 @@ +@@ -223,7 +223,7 @@ k = k | -16777216; } @@ -18,7 +18,7 @@ } } -@@ -246,17 +246,7 @@ +@@ -245,17 +245,7 @@ public IBakedModel func_184393_a(ItemStack p_184393_1_, @Nullable World p_184393_2_, @Nullable EntityLivingBase p_184393_3_) { IBakedModel ibakedmodel = this.field_175059_m.func_178089_a(p_184393_1_); @@ -37,7 +37,7 @@ } public void func_184392_a(ItemStack p_184392_1_, EntityLivingBase p_184392_2_, ItemCameraTransforms.TransformType p_184392_3_, boolean p_184392_4_) -@@ -280,14 +270,9 @@ +@@ -279,14 +269,9 @@ GlStateManager.func_179147_l(); GlStateManager.func_187428_a(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO); GlStateManager.func_179094_E(); @@ -54,7 +54,7 @@ this.func_180454_a(p_184394_1_, p_184394_2_); GlStateManager.func_187407_a(GlStateManager.CullFace.BACK); GlStateManager.func_179121_F(); -@@ -320,7 +305,7 @@ +@@ -319,7 +304,7 @@ GlStateManager.func_187401_a(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA); GlStateManager.func_179131_c(1.0F, 1.0F, 1.0F, 1.0F); this.func_180452_a(p_184390_2_, p_184390_3_, p_184390_4_.func_177556_c()); @@ -63,7 +63,7 @@ this.func_180454_a(p_184390_1_, p_184390_4_); GlStateManager.func_179118_c(); GlStateManager.func_179101_C(); -@@ -425,12 +410,16 @@ +@@ -418,9 +403,12 @@ p_180453_1_.func_175063_a(s, (float)(p_180453_3_ + 19 - 2 - p_180453_1_.func_78256_a(s)), (float)(p_180453_4_ + 6 + 3), 16777215); GlStateManager.func_179145_e(); GlStateManager.func_179126_j(); @@ -75,15 +75,25 @@ - if (p_180453_2_.func_77951_h()) + if (p_180453_2_.func_77973_b().showDurabilityBar(p_180453_2_)) { -- int j = (int)Math.round(13.0D - (double)p_180453_2_.func_77952_i() * 13.0D / (double)p_180453_2_.func_77958_k()); -- int i = (int)Math.round(255.0D - (double)p_180453_2_.func_77952_i() * 255.0D / (double)p_180453_2_.func_77958_k()); -+ double health = p_180453_2_.func_77973_b().getDurabilityForDisplay(p_180453_2_); -+ int j = (int)Math.round(13.0D - health * 13.0D); -+ int i = (int)Math.round(255.0D - health * 255.0D); GlStateManager.func_179140_f(); GlStateManager.func_179097_i(); - GlStateManager.func_179090_x(); -@@ -1059,6 +1048,7 @@ +@@ -429,11 +417,10 @@ + GlStateManager.func_179084_k(); + Tessellator tessellator = Tessellator.func_178181_a(); + VertexBuffer vertexbuffer = tessellator.func_178180_c(); +- float f = (float)p_180453_2_.func_77952_i(); +- float f1 = (float)p_180453_2_.func_77958_k(); +- float f2 = Math.max(0.0F, (f1 - f) / f1); +- int i = Math.round(13.0F - f * 13.0F / f1); +- int j = MathHelper.func_181758_c(f2 / 3.0F, 1.0F, 1.0F); ++ double health = p_180453_2_.func_77973_b().getDurabilityForDisplay(p_180453_2_); ++ int rgbfordisplay = p_180453_2_.func_77973_b().getRGBDurabilityForDisplay(p_180453_2_); ++ int i = Math.round(13.0F - (float)health * 13.0F); ++ int j = rgbfordisplay; + this.func_181565_a(vertexbuffer, p_180453_3_ + 2, p_180453_4_ + 13, 13, 2, 0, 0, 0, 255); + this.func_181565_a(vertexbuffer, p_180453_3_ + 2, p_180453_4_ + 13, i, 1, j >> 16 & 255, j >> 8 & 255, j & 255, 255); + GlStateManager.func_179147_l(); +@@ -1073,6 +1060,7 @@ this.func_175029_a(Blocks.field_185779_df, TileEntityStructure.Mode.LOAD.func_185110_a(), "structure_block"); this.func_175029_a(Blocks.field_185779_df, TileEntityStructure.Mode.CORNER.func_185110_a(), "structure_block"); this.func_175029_a(Blocks.field_185779_df, TileEntityStructure.Mode.DATA.func_185110_a(), "structure_block"); diff --git a/patches/minecraft/net/minecraft/client/renderer/block/model/ModelBakery.java.patch b/patches/minecraft/net/minecraft/client/renderer/block/model/ModelBakery.java.patch index 95347b26f..5a2488cd3 100644 --- a/patches/minecraft/net/minecraft/client/renderer/block/model/ModelBakery.java.patch +++ b/patches/minecraft/net/minecraft/client/renderer/block/model/ModelBakery.java.patch @@ -22,16 +22,23 @@ ModelBlockDefinition modelblockdefinition = this.func_177586_a(resourcelocation); Map map = blockstatemapper.func_188181_b(block); -@@ -110,7 +125,7 @@ - { - Collection collection = Sets.newHashSet(map.values()); - modelblockdefinition.func_188001_c().func_188138_a(block.func_176194_O()); -- this.field_188642_k.put(modelblockdefinition, Lists.newArrayList(Iterables.filter(collection, new Predicate() -+ registerMultipartVariant(modelblockdefinition, Lists.newArrayList(Iterables.filter(collection, new Predicate() +@@ -115,7 +130,6 @@ + if (collection1 == null) { - public boolean apply(@Nullable ModelResourceLocation p_apply_1_) - { -@@ -127,22 +142,18 @@ + collection1 = Lists.newArrayList(); +- this.field_188642_k.put(modelblockdefinition, collection1); + } + + collection1.addAll(Lists.newArrayList(Iterables.filter(collection, new Predicate() +@@ -125,6 +139,7 @@ + return resourcelocation.equals(p_apply_1_); + } + }))); ++ registerMultipartVariant(modelblockdefinition, collection1); + } + + for (Entry entry : map.entrySet()) +@@ -135,22 +150,18 @@ { try { @@ -56,7 +63,7 @@ } } } -@@ -371,6 +382,7 @@ +@@ -394,6 +405,7 @@ protected void func_177592_e() { @@ -64,7 +71,7 @@ this.field_177613_u.put(Item.func_150898_a(Blocks.field_150348_b), Lists.newArrayList(new String[] {"stone", "granite", "granite_smooth", "diorite", "diorite_smooth", "andesite", "andesite_smooth"})); this.field_177613_u.put(Item.func_150898_a(Blocks.field_150346_d), Lists.newArrayList(new String[] {"dirt", "coarse_dirt", "podzol"})); this.field_177613_u.put(Item.func_150898_a(Blocks.field_150344_f), Lists.newArrayList(new String[] {"oak_planks", "spruce_planks", "birch_planks", "jungle_planks", "acacia_planks", "dark_oak_planks"})); -@@ -414,6 +426,10 @@ +@@ -438,6 +450,10 @@ this.field_177613_u.put(Item.func_150898_a(Blocks.field_180407_aO), Lists.newArrayList(new String[] {"oak_fence"})); this.field_177613_u.put(Items.field_179570_aq, Lists.newArrayList(new String[] {"oak_door"})); this.field_177613_u.put(Items.field_151124_az, Lists.newArrayList(new String[] {"oak_boat"})); @@ -75,7 +82,7 @@ } protected List func_177596_a(Item p_177596_1_) -@@ -430,7 +446,7 @@ +@@ -454,7 +470,7 @@ protected ResourceLocation func_177583_a(String p_177583_1_) { @@ -84,7 +91,7 @@ return new ResourceLocation(resourcelocation.func_110624_b(), "item/" + resourcelocation.func_110623_a()); } -@@ -538,7 +554,7 @@ +@@ -562,7 +578,7 @@ for (Entry entry : this.field_177615_s.entrySet()) { ResourceLocation resourcelocation = (ResourceLocation)entry.getValue(); @@ -93,7 +100,7 @@ ModelBlock modelblock = (ModelBlock)this.field_177611_h.get(resourcelocation); if (modelblock != null && modelblock.func_178303_d()) -@@ -626,6 +642,11 @@ +@@ -650,6 +666,11 @@ @Nullable private IBakedModel func_177578_a(ModelBlock p_177578_1_, ModelRotation p_177578_2_, boolean p_177578_3_) { @@ -105,7 +112,7 @@ TextureAtlasSprite textureatlassprite = (TextureAtlasSprite)this.field_177599_g.get(new ResourceLocation(p_177578_1_.func_178308_c("particle"))); SimpleBakedModel.Builder simplebakedmodel$builder = (new SimpleBakedModel.Builder(p_177578_1_, p_177578_1_.func_187967_g())).func_177646_a(textureatlassprite); -@@ -642,13 +663,13 @@ +@@ -666,13 +687,13 @@ BlockPartFace blockpartface = (BlockPartFace)blockpart.field_178240_c.get(enumfacing); TextureAtlasSprite textureatlassprite1 = (TextureAtlasSprite)this.field_177599_g.get(new ResourceLocation(p_177578_1_.func_178308_c(blockpartface.field_178242_d))); @@ -122,7 +129,7 @@ } } } -@@ -659,9 +680,14 @@ +@@ -683,9 +704,14 @@ private BakedQuad func_177589_a(BlockPart p_177589_1_, BlockPartFace p_177589_2_, TextureAtlasSprite p_177589_3_, EnumFacing p_177589_4_, ModelRotation p_177589_5_, boolean p_177589_6_) { @@ -138,7 +145,7 @@ private void func_177597_h() { this.func_177574_i(); -@@ -882,4 +908,23 @@ +@@ -906,4 +932,23 @@ field_177606_o.field_178317_b = "generation marker"; field_177616_r.field_178317_b = "block entity marker"; } diff --git a/patches/minecraft/net/minecraft/client/renderer/block/model/ModelResourceLocation.java.patch b/patches/minecraft/net/minecraft/client/renderer/block/model/ModelResourceLocation.java.patch index b9461784b..bd20a3c06 100644 --- a/patches/minecraft/net/minecraft/client/renderer/block/model/ModelResourceLocation.java.patch +++ b/patches/minecraft/net/minecraft/client/renderer/block/model/ModelResourceLocation.java.patch @@ -1,8 +1,8 @@ --- ../src-base/minecraft/net/minecraft/client/renderer/block/model/ModelResourceLocation.java +++ ../src-work/minecraft/net/minecraft/client/renderer/block/model/ModelResourceLocation.java -@@ -1,11 +1,8 @@ - package net.minecraft.client.renderer.block.model; +@@ -2,11 +2,8 @@ + import java.util.Locale; import net.minecraft.util.ResourceLocation; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; diff --git a/patches/minecraft/net/minecraft/client/renderer/color/BlockColors.java.patch b/patches/minecraft/net/minecraft/client/renderer/color/BlockColors.java.patch index 78f1e7c35..9755484fd 100644 --- a/patches/minecraft/net/minecraft/client/renderer/color/BlockColors.java.patch +++ b/patches/minecraft/net/minecraft/client/renderer/color/BlockColors.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/client/renderer/color/BlockColors.java +++ ../src-work/minecraft/net/minecraft/client/renderer/color/BlockColors.java -@@ -27,7 +27,8 @@ +@@ -26,7 +26,8 @@ @SideOnly(Side.CLIENT) public class BlockColors { @@ -10,7 +10,7 @@ public static BlockColors func_186723_a() { -@@ -147,7 +148,7 @@ +@@ -144,7 +145,7 @@ public int func_189991_a(IBlockState p_189991_1_) { @@ -19,7 +19,7 @@ if (iblockcolor != null) { -@@ -162,7 +163,7 @@ +@@ -159,7 +160,7 @@ public int func_186724_a(IBlockState p_186724_1_, @Nullable IBlockAccess p_186724_2_, @Nullable BlockPos p_186724_3_, int p_186724_4_) { @@ -28,7 +28,7 @@ return iblockcolor == null ? -1 : iblockcolor.func_186720_a(p_186724_1_, p_186724_2_, p_186724_3_, p_186724_4_); } -@@ -170,7 +171,9 @@ +@@ -167,7 +168,9 @@ { for (Block block : p_186722_2_) { diff --git a/patches/minecraft/net/minecraft/client/renderer/entity/RenderEntityItem.java.patch b/patches/minecraft/net/minecraft/client/renderer/entity/RenderEntityItem.java.patch index 93c9d6fd0..c1bcb797d 100644 --- a/patches/minecraft/net/minecraft/client/renderer/entity/RenderEntityItem.java.patch +++ b/patches/minecraft/net/minecraft/client/renderer/entity/RenderEntityItem.java.patch @@ -9,7 +9,7 @@ float f2 = p_177077_9_.func_177552_f().func_181688_b(ItemCameraTransforms.TransformType.GROUND).field_178363_d.y; GlStateManager.func_179109_b((float)p_177077_2_, (float)p_177077_4_ + f1 + 0.25F * f2, (float)p_177077_6_); -@@ -114,16 +114,13 @@ +@@ -104,16 +104,13 @@ GlStateManager.func_179094_E(); IBakedModel ibakedmodel = this.field_177080_a.func_184393_a(itemstack, p_76986_1_.field_70170_p, (EntityLivingBase)null); int j = this.func_177077_a(p_76986_1_, p_76986_2_, p_76986_4_, p_76986_6_, p_76986_9_, ibakedmodel); @@ -29,7 +29,7 @@ GlStateManager.func_179109_b(f3, f4, f5); } -@@ -144,10 +141,10 @@ +@@ -134,10 +131,10 @@ float f7 = (this.field_177079_e.nextFloat() * 2.0F - 1.0F) * 0.15F; float f9 = (this.field_177079_e.nextFloat() * 2.0F - 1.0F) * 0.15F; float f6 = (this.field_177079_e.nextFloat() * 2.0F - 1.0F) * 0.15F; @@ -42,7 +42,7 @@ this.field_177080_a.func_180454_a(itemstack, ibakedmodel); GlStateManager.func_179121_F(); } -@@ -162,10 +159,10 @@ +@@ -152,10 +149,10 @@ GlStateManager.func_179109_b(f8, f10, 0.0F); } @@ -55,7 +55,7 @@ } } -@@ -192,4 +189,25 @@ +@@ -182,4 +179,25 @@ { return TextureMap.field_110575_b; } diff --git a/patches/minecraft/net/minecraft/client/renderer/entity/RenderLivingBase.java.patch b/patches/minecraft/net/minecraft/client/renderer/entity/RenderLivingBase.java.patch index c5fc8210e..0b7adb341 100644 --- a/patches/minecraft/net/minecraft/client/renderer/entity/RenderLivingBase.java.patch +++ b/patches/minecraft/net/minecraft/client/renderer/entity/RenderLivingBase.java.patch @@ -10,7 +10,7 @@ public RenderLivingBase(RenderManager p_i46156_1_, ModelBase p_i46156_2_, float p_i46156_3_) { super(p_i46156_1_); -@@ -77,10 +80,12 @@ +@@ -72,10 +75,12 @@ public void func_76986_a(T p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_, float p_76986_9_) { @@ -24,7 +24,7 @@ this.field_77045_g.field_78091_s = p_76986_1_.func_70631_g_(); try -@@ -89,7 +94,7 @@ +@@ -84,7 +89,7 @@ float f1 = this.func_77034_a(p_76986_1_.field_70758_at, p_76986_1_.field_70759_as, p_76986_9_); float f2 = f1 - f; @@ -33,7 +33,7 @@ { EntityLivingBase entitylivingbase = (EntityLivingBase)p_76986_1_.func_184187_bx(); f = this.func_77034_a(entitylivingbase.field_70760_ar, entitylivingbase.field_70761_aq, p_76986_9_); -@@ -197,6 +202,7 @@ +@@ -192,6 +197,7 @@ GlStateManager.func_179089_o(); GlStateManager.func_179121_F(); super.func_76986_a(p_76986_1_, p_76986_2_, p_76986_4_, p_76986_6_, p_76986_8_, p_76986_9_); @@ -41,7 +41,7 @@ } public float func_188322_c(T p_188322_1_, float p_188322_2_) -@@ -452,10 +458,11 @@ +@@ -447,10 +453,11 @@ public void func_177067_a(T p_177067_1_, double p_177067_2_, double p_177067_4_, double p_177067_6_) { @@ -54,7 +54,7 @@ if (d0 < (double)(f * f)) { -@@ -464,6 +471,7 @@ +@@ -459,6 +466,7 @@ this.func_188296_a(p_177067_1_, p_177067_2_, p_177067_4_, p_177067_6_, s, d0); } } diff --git a/patches/minecraft/net/minecraft/client/renderer/entity/RenderManager.java.patch b/patches/minecraft/net/minecraft/client/renderer/entity/RenderManager.java.patch index 5690b9e38..901928cd5 100644 --- a/patches/minecraft/net/minecraft/client/renderer/entity/RenderManager.java.patch +++ b/patches/minecraft/net/minecraft/client/renderer/entity/RenderManager.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/client/renderer/entity/RenderManager.java +++ ../src-work/minecraft/net/minecraft/client/renderer/entity/RenderManager.java -@@ -209,8 +209,13 @@ +@@ -226,8 +226,13 @@ this.field_178637_m = new RenderPlayer(this); this.field_178636_l.put("default", this.field_178637_m); this.field_178636_l.put("slim", new RenderPlayer(this, true)); @@ -14,7 +14,7 @@ public void func_178628_a(double p_178628_1_, double p_178628_3_, double p_178628_5_) { this.field_78725_b = p_178628_1_; -@@ -259,9 +264,9 @@ +@@ -276,9 +281,9 @@ IBlockState iblockstate = p_180597_1_.func_180495_p(new BlockPos(p_180597_3_)); Block block = iblockstate.func_177230_c(); diff --git a/patches/minecraft/net/minecraft/client/renderer/entity/RenderVillager.java.patch b/patches/minecraft/net/minecraft/client/renderer/entity/RenderVillager.java.patch index 4b0720edf..15ef1c6f5 100644 --- a/patches/minecraft/net/minecraft/client/renderer/entity/RenderVillager.java.patch +++ b/patches/minecraft/net/minecraft/client/renderer/entity/RenderVillager.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/client/renderer/entity/RenderVillager.java +++ ../src-work/minecraft/net/minecraft/client/renderer/entity/RenderVillager.java -@@ -31,21 +31,7 @@ +@@ -31,22 +31,7 @@ protected ResourceLocation func_110775_a(EntityVillager p_110775_1_) { @@ -16,6 +16,7 @@ - return field_110905_l; - case 4: - return field_110906_m; +- case 5: - default: - return field_110903_f; - } diff --git a/patches/minecraft/net/minecraft/client/renderer/entity/RenderZombie.java.patch b/patches/minecraft/net/minecraft/client/renderer/entity/RenderZombie.java.patch deleted file mode 100644 index 3e789e527..000000000 --- a/patches/minecraft/net/minecraft/client/renderer/entity/RenderZombie.java.patch +++ /dev/null @@ -1,25 +0,0 @@ ---- ../src-base/minecraft/net/minecraft/client/renderer/entity/RenderZombie.java -+++ ../src-work/minecraft/net/minecraft/client/renderer/entity/RenderZombie.java -@@ -83,21 +83,7 @@ - { - if (p_110775_1_.func_82231_m()) - { -- switch (p_110775_1_.func_184736_de()) -- { -- case 0: -- return field_188330_l; -- case 1: -- return field_188331_m; -- case 2: -- return field_188332_n; -- case 3: -- return field_188333_o; -- case 4: -- return field_188329_p; -- default: -- return field_110864_q; -- } -+ return p_110775_1_.getVillagerTypeForge().getZombieSkin(); - } - else - { diff --git a/patches/minecraft/net/minecraft/client/renderer/entity/layers/LayerArmorBase.java.patch b/patches/minecraft/net/minecraft/client/renderer/entity/layers/LayerArmorBase.java.patch index d451084ed..595a63976 100644 --- a/patches/minecraft/net/minecraft/client/renderer/entity/layers/LayerArmorBase.java.patch +++ b/patches/minecraft/net/minecraft/client/renderer/entity/layers/LayerArmorBase.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/client/renderer/entity/layers/LayerArmorBase.java +++ ../src-work/minecraft/net/minecraft/client/renderer/entity/layers/LayerArmorBase.java -@@ -58,31 +58,29 @@ +@@ -57,31 +57,29 @@ if (itemarmor.func_185083_B_() == p_188361_9_) { T t = this.func_188360_a(p_188361_9_); @@ -41,7 +41,7 @@ { func_188364_a(this.field_177190_a, p_188361_1_, t, p_188361_2_, p_188361_3_, p_188361_4_, p_188361_5_, p_188361_6_, p_188361_7_, p_188361_8_); } -@@ -142,11 +140,13 @@ +@@ -136,11 +134,13 @@ GlStateManager.func_179084_k(); } @@ -55,7 +55,7 @@ private ResourceLocation func_177178_a(ItemArmor p_177178_1_, boolean p_177178_2_, String p_177178_3_) { String s = String.format("textures/models/armor/%s_layer_%d%s.png", new Object[] {p_177178_1_.func_82812_d().func_179242_c(), Integer.valueOf(p_177178_2_ ? 2 : 1), p_177178_3_ == null ? "" : String.format("_%s", new Object[]{p_177178_3_})}); -@@ -164,4 +164,49 @@ +@@ -158,4 +158,49 @@ protected abstract void func_177177_a(); protected abstract void func_188359_a(T p_188359_1_, EntityEquipmentSlot p_188359_2_); diff --git a/patches/minecraft/net/minecraft/client/renderer/entity/layers/LayerHeldItem.java.patch b/patches/minecraft/net/minecraft/client/renderer/entity/layers/LayerHeldItem.java.patch index d37e85324..2f0324798 100644 --- a/patches/minecraft/net/minecraft/client/renderer/entity/layers/LayerHeldItem.java.patch +++ b/patches/minecraft/net/minecraft/client/renderer/entity/layers/LayerHeldItem.java.patch @@ -1,10 +1,10 @@ --- ../src-base/minecraft/net/minecraft/client/renderer/entity/layers/LayerHeldItem.java +++ ../src-work/minecraft/net/minecraft/client/renderer/entity/layers/LayerHeldItem.java -@@ -50,13 +50,13 @@ - if (p_188358_2_ != null) +@@ -49,13 +49,13 @@ + if (!p_188358_2_.func_190926_b()) { GlStateManager.func_179094_E(); -- ((ModelBiped)this.field_177206_a.func_177087_b()).func_187073_a(0.0625F, p_188358_4_); +- this.func_191361_a(p_188358_4_); if (p_188358_1_.func_70093_af()) { @@ -12,7 +12,7 @@ } - + // Forge: moved this call down, fixes incorrect offset while sneaking. -+ ((ModelBiped)this.field_177206_a.func_177087_b()).func_187073_a(0.0625F, p_188358_4_); ++ this.func_191361_a(p_188358_4_); GlStateManager.func_179114_b(-90.0F, 1.0F, 0.0F, 0.0F); GlStateManager.func_179114_b(180.0F, 0.0F, 1.0F, 0.0F); boolean flag = p_188358_4_ == EnumHandSide.LEFT; diff --git a/patches/minecraft/net/minecraft/client/renderer/tileentity/RenderItemFrame.java.patch b/patches/minecraft/net/minecraft/client/renderer/tileentity/RenderItemFrame.java.patch index 1cd896209..9e7a02230 100644 --- a/patches/minecraft/net/minecraft/client/renderer/tileentity/RenderItemFrame.java.patch +++ b/patches/minecraft/net/minecraft/client/renderer/tileentity/RenderItemFrame.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/client/renderer/tileentity/RenderItemFrame.java +++ ../src-work/minecraft/net/minecraft/client/renderer/tileentity/RenderItemFrame.java -@@ -105,15 +105,18 @@ +@@ -106,15 +106,18 @@ GlStateManager.func_179140_f(); int i = p_82402_1_.func_82333_j(); @@ -21,7 +21,7 @@ this.field_76990_c.field_78724_e.func_110577_a(field_110789_a); GlStateManager.func_179114_b(180.0F, 0.0F, 0.0F, 1.0F); float f = 0.0078125F; -@@ -142,6 +145,7 @@ +@@ -137,6 +140,7 @@ RenderHelper.func_74518_a(); GlStateManager.func_179099_b(); } diff --git a/patches/minecraft/net/minecraft/client/renderer/tileentity/TileEntityItemStackRenderer.java.patch b/patches/minecraft/net/minecraft/client/renderer/tileentity/TileEntityItemStackRenderer.java.patch index 3977f21e2..93804b3b7 100644 --- a/patches/minecraft/net/minecraft/client/renderer/tileentity/TileEntityItemStackRenderer.java.patch +++ b/patches/minecraft/net/minecraft/client/renderer/tileentity/TileEntityItemStackRenderer.java.patch @@ -1,10 +1,10 @@ --- ../src-base/minecraft/net/minecraft/client/renderer/tileentity/TileEntityItemStackRenderer.java +++ ../src-work/minecraft/net/minecraft/client/renderer/tileentity/TileEntityItemStackRenderer.java -@@ -98,6 +98,7 @@ - { - TileEntityRendererDispatcher.field_147556_a.func_147549_a(this.field_147718_c, 0.0D, 0.0D, 0.0D, 0.0F); - } -+ else if (block != Blocks.field_150486_ae) net.minecraftforge.client.ForgeHooksClient.renderTileItem(p_179022_1_.func_77973_b(), p_179022_1_.func_77960_j()); - else - { - TileEntityRendererDispatcher.field_147556_a.func_147549_a(this.field_147717_b, 0.0D, 0.0D, 0.0D, 0.0F); +@@ -106,6 +106,7 @@ + { + TileEntityRendererDispatcher.field_147556_a.func_147549_a(field_191274_b[BlockShulkerBox.func_190955_b(item).func_176765_a()], 0.0D, 0.0D, 0.0D, 0.0F); + } ++ else if (Block.func_149634_a(item) != Blocks.field_150486_ae) net.minecraftforge.client.ForgeHooksClient.renderTileItem(p_179022_1_.func_77973_b(), p_179022_1_.func_77960_j()); + else + { + TileEntityRendererDispatcher.field_147556_a.func_147549_a(this.field_147717_b, 0.0D, 0.0D, 0.0D, 0.0F); diff --git a/patches/minecraft/net/minecraft/client/renderer/tileentity/TileEntityRendererDispatcher.java.patch b/patches/minecraft/net/minecraft/client/renderer/tileentity/TileEntityRendererDispatcher.java.patch index 5fb23fd30..578dd2c4f 100644 --- a/patches/minecraft/net/minecraft/client/renderer/tileentity/TileEntityRendererDispatcher.java.patch +++ b/patches/minecraft/net/minecraft/client/renderer/tileentity/TileEntityRendererDispatcher.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/client/renderer/tileentity/TileEntityRendererDispatcher.java +++ ../src-work/minecraft/net/minecraft/client/renderer/tileentity/TileEntityRendererDispatcher.java -@@ -113,11 +113,14 @@ +@@ -116,11 +116,14 @@ if (p_180546_1_.func_145835_a(this.field_147560_j, this.field_147561_k, this.field_147558_l) < p_180546_1_.func_145833_n()) { RenderHelper.func_74519_b(); @@ -15,7 +15,7 @@ BlockPos blockpos = p_180546_1_.func_174877_v(); this.func_178469_a(p_180546_1_, (double)blockpos.func_177958_n() - field_147554_b, (double)blockpos.func_177956_o() - field_147555_c, (double)blockpos.func_177952_p() - field_147552_d, p_180546_2_, p_180546_3_); } -@@ -136,6 +139,11 @@ +@@ -139,6 +142,11 @@ { try { @@ -27,7 +27,7 @@ tileentityspecialrenderer.func_180535_a(p_178469_1_, p_178469_2_, p_178469_4_, p_178469_6_, p_178469_8_, p_178469_9_); } catch (Throwable throwable) -@@ -162,4 +170,52 @@ +@@ -165,4 +173,52 @@ { return this.field_147557_n; } diff --git a/patches/minecraft/net/minecraft/client/resources/AbstractResourcePack.java.patch b/patches/minecraft/net/minecraft/client/resources/AbstractResourcePack.java.patch deleted file mode 100644 index 8f378ff41..000000000 --- a/patches/minecraft/net/minecraft/client/resources/AbstractResourcePack.java.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- ../src-base/minecraft/net/minecraft/client/resources/AbstractResourcePack.java -+++ ../src-work/minecraft/net/minecraft/client/resources/AbstractResourcePack.java -@@ -58,7 +58,7 @@ - - protected void func_110594_c(String p_110594_1_) - { -- field_110598_a.warn("ResourcePack: ignored non-lowercase namespace: %s in %s", new Object[] {p_110594_1_, this.field_110597_b}); -+ field_110598_a.warn("ResourcePack: ignored non-lowercase namespace: {} in {}", new Object[] {p_110594_1_, this.field_110597_b}); - } - - public T func_135058_a(MetadataSerializer p_135058_1_, String p_135058_2_) throws IOException diff --git a/patches/minecraft/net/minecraft/client/resources/FallbackResourceManager.java.patch b/patches/minecraft/net/minecraft/client/resources/FallbackResourceManager.java.patch index 4d42cf311..94b4d3486 100644 --- a/patches/minecraft/net/minecraft/client/resources/FallbackResourceManager.java.patch +++ b/patches/minecraft/net/minecraft/client/resources/FallbackResourceManager.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/client/resources/FallbackResourceManager.java +++ ../src-work/minecraft/net/minecraft/client/resources/FallbackResourceManager.java -@@ -68,6 +68,7 @@ +@@ -69,6 +69,7 @@ throw new FileNotFoundException(p_110536_1_.toString()); } diff --git a/patches/minecraft/net/minecraft/command/CommandBase.java.patch b/patches/minecraft/net/minecraft/command/CommandBase.java.patch index 49c1eaedf..65a38ab7d 100644 --- a/patches/minecraft/net/minecraft/command/CommandBase.java.patch +++ b/patches/minecraft/net/minecraft/command/CommandBase.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/command/CommandBase.java +++ ../src-work/minecraft/net/minecraft/command/CommandBase.java -@@ -369,7 +369,7 @@ +@@ -384,7 +384,7 @@ itextcomponent.func_150258_a(" "); } diff --git a/patches/minecraft/net/minecraft/command/CommandDebug.java.patch b/patches/minecraft/net/minecraft/command/CommandDebug.java.patch deleted file mode 100644 index 0f9ee1ef0..000000000 --- a/patches/minecraft/net/minecraft/command/CommandDebug.java.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- ../src-base/minecraft/net/minecraft/command/CommandDebug.java -+++ ../src-work/minecraft/net/minecraft/command/CommandDebug.java -@@ -99,7 +99,7 @@ - { - IOUtils.closeQuietly((Writer)filewriter); - field_147208_a.error("Could not save profiler results to {}", new Object[] {file1, throwable}); -- } -+ } finally { IOUtils.closeQuietly(filewriter); } // FORGE: Fix MC-103399 - } - - private String func_184893_b(long p_184893_1_, int p_184893_3_, MinecraftServer p_184893_4_) diff --git a/patches/minecraft/net/minecraft/command/CommandFill.java.patch b/patches/minecraft/net/minecraft/command/CommandFill.java.patch index ba7356a85..450527f82 100644 --- a/patches/minecraft/net/minecraft/command/CommandFill.java.patch +++ b/patches/minecraft/net/minecraft/command/CommandFill.java.patch @@ -1,28 +1,20 @@ --- ../src-base/minecraft/net/minecraft/command/CommandFill.java +++ ../src-work/minecraft/net/minecraft/command/CommandFill.java -@@ -51,6 +51,7 @@ - { - i = func_175764_a(p_184881_3_[7], 0, 15); - } -+ IBlockState state = block.func_176203_a(i); - - BlockPos blockpos2 = new BlockPos(Math.min(blockpos.func_177958_n(), blockpos1.func_177958_n()), Math.min(blockpos.func_177956_o(), blockpos1.func_177956_o()), Math.min(blockpos.func_177952_p(), blockpos1.func_177952_p())); - BlockPos blockpos3 = new BlockPos(Math.max(blockpos.func_177958_n(), blockpos1.func_177958_n()), Math.max(blockpos.func_177956_o(), blockpos1.func_177956_o()), Math.max(blockpos.func_177952_p(), blockpos1.func_177952_p())); -@@ -78,7 +79,7 @@ +@@ -82,7 +82,7 @@ NBTTagCompound nbttagcompound = new NBTTagCompound(); boolean flag = false; - if (p_184881_3_.length >= 10 && block.func_149716_u()) -+ if (p_184881_3_.length >= 10 && block.hasTileEntity(state)) ++ if (p_184881_3_.length >= 10 && block.hasTileEntity(iblockstate)) { String s = func_147178_a(p_184881_2_, p_184881_3_, 9).func_150260_c(); -@@ -119,7 +120,7 @@ +@@ -123,7 +123,7 @@ continue; } } -- else if ("replace".equals(p_184881_3_[8]) && !block.func_149716_u()) -+ else if ("replace".equals(p_184881_3_[8]) && !block.hasTileEntity(state)) +- else if ("replace".equals(p_184881_3_[8]) && !block.func_149716_u() && p_184881_3_.length > 9) ++ else if ("replace".equals(p_184881_3_[8]) && !block.hasTileEntity(iblockstate) && p_184881_3_.length > 9) { - if (p_184881_3_.length > 9) - { + Block block1 = CommandBase.func_147180_g(p_184881_2_, p_184881_3_[9]); + diff --git a/patches/minecraft/net/minecraft/command/CommandHandler.java.patch b/patches/minecraft/net/minecraft/command/CommandHandler.java.patch index 60de14659..077bdb4b5 100644 --- a/patches/minecraft/net/minecraft/command/CommandHandler.java.patch +++ b/patches/minecraft/net/minecraft/command/CommandHandler.java.patch @@ -1,24 +1,24 @@ --- ../src-base/minecraft/net/minecraft/command/CommandHandler.java +++ ../src-work/minecraft/net/minecraft/command/CommandHandler.java -@@ -47,6 +47,17 @@ - } - else if (icommand.func_184882_a(this.func_184879_a(), p_71556_1_)) - { -+ net.minecraftforge.event.CommandEvent event = new net.minecraftforge.event.CommandEvent(icommand, p_71556_1_, astring); -+ if (net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(event)) -+ { -+ if (event.getException() != null) -+ { -+ com.google.common.base.Throwables.propagateIfPossible(event.getException()); -+ } -+ return 1; -+ } -+ if (event.getParameters() != null) astring = event.getParameters(); -+ - if (i > -1) +@@ -50,6 +50,17 @@ + } + else if (icommand.func_184882_a(this.func_184879_a(), p_71556_1_)) { - List list = EntitySelector.func_179656_b(p_71556_1_, astring[i], Entity.class); -@@ -110,7 +121,7 @@ ++ net.minecraftforge.event.CommandEvent event = new net.minecraftforge.event.CommandEvent(icommand, p_71556_1_, astring); ++ if (net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(event)) ++ { ++ if (event.getException() != null) ++ { ++ com.google.common.base.Throwables.propagateIfPossible(event.getException()); ++ } ++ return 1; ++ } ++ if (event.getParameters() != null) astring = event.getParameters(); ++ + if (j > -1) + { + List list = EntitySelector.func_179656_b(p_71556_1_, astring[j], Entity.class); +@@ -125,7 +136,7 @@ TextComponentTranslation textcomponenttranslation = new TextComponentTranslation("commands.generic.exception", new Object[0]); textcomponenttranslation.func_150256_b().func_150238_a(TextFormatting.RED); p_175786_1_.func_145747_a(textcomponenttranslation); diff --git a/patches/minecraft/net/minecraft/command/EntitySelector.java.patch b/patches/minecraft/net/minecraft/command/EntitySelector.java.patch index c95b86bda..19220045f 100644 --- a/patches/minecraft/net/minecraft/command/EntitySelector.java.patch +++ b/patches/minecraft/net/minecraft/command/EntitySelector.java.patch @@ -1,18 +1,6 @@ --- ../src-base/minecraft/net/minecraft/command/EntitySelector.java +++ ../src-work/minecraft/net/minecraft/command/EntitySelector.java -@@ -37,9 +37,9 @@ - - public class EntitySelector - { -- private static final Pattern field_82389_a = Pattern.compile("^@([pare])(?:\\[([\\w=,!-]*)\\])?$"); -+ private static final Pattern field_82389_a = Pattern.compile("^@([pare])(?:\\[([\\w\\.:=,!-]*)\\])?$"); // FORGE: allow '.' and ':' in entity selectors - private static final Pattern field_82387_b = Pattern.compile("\\G([-!]?[\\w-]*)(?:$|,)"); -- private static final Pattern field_82388_c = Pattern.compile("\\G(\\w+)=([-!]?[\\w-]*)(?:$|,)"); -+ private static final Pattern field_82388_c = Pattern.compile("\\G([\\w:]+)=([-!]?[\\w\\.-]*)(?:$|,)"); // FORGE: allow ':' in arguments and '.' in value of entity selectors - private static final Set field_179666_d = Sets.newHashSet(new String[] {"x", "y", "z", "dx", "dy", "dz", "rm", "r"}); - - @Nullable -@@ -111,6 +111,7 @@ +@@ -148,6 +148,7 @@ list2.addAll(func_184951_f(map)); list2.addAll(func_180698_a(map, vec3d)); list2.addAll(func_179662_g(map)); diff --git a/patches/minecraft/net/minecraft/command/server/CommandSetBlock.java.patch b/patches/minecraft/net/minecraft/command/server/CommandSetBlock.java.patch index 79c11fd38..5c4cc7a0b 100644 --- a/patches/minecraft/net/minecraft/command/server/CommandSetBlock.java.patch +++ b/patches/minecraft/net/minecraft/command/server/CommandSetBlock.java.patch @@ -1,20 +1,11 @@ --- ../src-base/minecraft/net/minecraft/command/server/CommandSetBlock.java +++ ../src-work/minecraft/net/minecraft/command/server/CommandSetBlock.java -@@ -55,6 +55,8 @@ - i = func_175764_a(p_184881_3_[4], 0, 15); - } - -+ IBlockState state = block.func_176203_a(i); -+ - World world = p_184881_2_.func_130014_f_(); - - if (!world.func_175667_e(blockpos)) -@@ -66,7 +68,7 @@ +@@ -70,7 +70,7 @@ NBTTagCompound nbttagcompound = new NBTTagCompound(); boolean flag = false; - if (p_184881_3_.length >= 7 && block.func_149716_u()) -+ if (p_184881_3_.length >= 7 && block.hasTileEntity(state)) ++ if (p_184881_3_.length >= 7 && block.hasTileEntity(iblockstate)) { String s = func_147178_a(p_184881_2_, p_184881_3_, 6).func_150260_c(); diff --git a/patches/minecraft/net/minecraft/command/server/CommandTestForBlock.java.patch b/patches/minecraft/net/minecraft/command/server/CommandTestForBlock.java.patch deleted file mode 100644 index 640ab078b..000000000 --- a/patches/minecraft/net/minecraft/command/server/CommandTestForBlock.java.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- ../src-base/minecraft/net/minecraft/command/server/CommandTestForBlock.java -+++ ../src-work/minecraft/net/minecraft/command/server/CommandTestForBlock.java -@@ -73,7 +73,7 @@ - NBTTagCompound nbttagcompound = new NBTTagCompound(); - boolean flag = false; - -- if (p_184881_3_.length >= 6 && block.func_149716_u()) -+ if (p_184881_3_.length >= 6 && block.hasTileEntity(block.func_176203_a(i))) - { - String s = func_147178_a(p_184881_2_, p_184881_3_, 5).func_150260_c(); - diff --git a/patches/minecraft/net/minecraft/creativetab/CreativeTabs.java.patch b/patches/minecraft/net/minecraft/creativetab/CreativeTabs.java.patch index d8d07737b..0aae0fbe7 100644 --- a/patches/minecraft/net/minecraft/creativetab/CreativeTabs.java.patch +++ b/patches/minecraft/net/minecraft/creativetab/CreativeTabs.java.patch @@ -1,7 +1,7 @@ --- ../src-base/minecraft/net/minecraft/creativetab/CreativeTabs.java +++ ../src-work/minecraft/net/minecraft/creativetab/CreativeTabs.java -@@ -125,8 +125,22 @@ - @SideOnly(Side.CLIENT) +@@ -122,8 +122,22 @@ + private EnumEnchantmentType[] field_111230_s; private ItemStack field_151245_t; + public CreativeTabs(String label) @@ -22,8 +22,8 @@ + } this.field_78033_n = p_i1853_1_; this.field_78034_o = p_i1853_2_; - field_78032_a[p_i1853_1_] = this; -@@ -209,12 +223,20 @@ + this.field_151245_t = ItemStack.field_190927_a; +@@ -201,12 +215,20 @@ @SideOnly(Side.CLIENT) public int func_78020_k() { @@ -44,7 +44,7 @@ return this.field_78033_n < 6; } -@@ -256,10 +278,17 @@ +@@ -248,10 +270,17 @@ { for (Item item : Item.field_150901_e) { @@ -64,7 +64,7 @@ } if (this.func_111225_m() != null) -@@ -292,4 +321,39 @@ +@@ -284,4 +313,39 @@ } } } diff --git a/patches/minecraft/net/minecraft/enchantment/Enchantment.java.patch b/patches/minecraft/net/minecraft/enchantment/Enchantment.java.patch index 3195fd27c..487d39a53 100644 --- a/patches/minecraft/net/minecraft/enchantment/Enchantment.java.patch +++ b/patches/minecraft/net/minecraft/enchantment/Enchantment.java.patch @@ -1,7 +1,7 @@ --- ../src-base/minecraft/net/minecraft/enchantment/Enchantment.java +++ ../src-work/minecraft/net/minecraft/enchantment/Enchantment.java -@@ -13,9 +13,9 @@ - import net.minecraft.util.registry.RegistryNamespaced; +@@ -14,9 +14,9 @@ + import net.minecraft.util.text.TextFormatting; import net.minecraft.util.text.translation.I18n; -public abstract class Enchantment @@ -12,7 +12,7 @@ private final EntityEquipmentSlot[] field_185263_a; private final Enchantment.Rarity field_77333_a; public EnumEnchantmentType field_77351_y; -@@ -122,7 +122,7 @@ +@@ -128,7 +128,7 @@ public boolean func_92089_a(ItemStack p_92089_1_) { @@ -21,7 +21,7 @@ } public void func_151368_a(EntityLivingBase p_151368_1_, Entity p_151368_2_, int p_151368_3_) -@@ -138,6 +138,26 @@ +@@ -149,6 +149,26 @@ return false; } diff --git a/patches/minecraft/net/minecraft/enchantment/EnchantmentHelper.java.patch b/patches/minecraft/net/minecraft/enchantment/EnchantmentHelper.java.patch index e501e6bc9..a0a081422 100644 --- a/patches/minecraft/net/minecraft/enchantment/EnchantmentHelper.java.patch +++ b/patches/minecraft/net/minecraft/enchantment/EnchantmentHelper.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/enchantment/EnchantmentHelper.java +++ ../src-work/minecraft/net/minecraft/enchantment/EnchantmentHelper.java -@@ -299,7 +299,7 @@ +@@ -307,7 +307,7 @@ public static int func_77514_a(Random p_77514_0_, int p_77514_1_, int p_77514_2_, ItemStack p_77514_3_) { Item item = p_77514_3_.func_77973_b(); @@ -9,7 +9,7 @@ if (i <= 0) { -@@ -346,7 +346,7 @@ +@@ -354,7 +354,7 @@ { List list = Lists.newArrayList(); Item item = p_77513_1_.func_77973_b(); @@ -18,7 +18,7 @@ if (i <= 0) { -@@ -387,7 +387,8 @@ +@@ -395,7 +395,8 @@ while (iterator.hasNext()) { @@ -28,7 +28,7 @@ { iterator.remove(); } -@@ -402,7 +403,7 @@ +@@ -410,7 +411,7 @@ for (Enchantment enchantment : Enchantment.field_185264_b) { diff --git a/patches/minecraft/net/minecraft/enchantment/EnchantmentThorns.java.patch b/patches/minecraft/net/minecraft/enchantment/EnchantmentThorns.java.patch index fb21368df..4c3e8dee8 100644 --- a/patches/minecraft/net/minecraft/enchantment/EnchantmentThorns.java.patch +++ b/patches/minecraft/net/minecraft/enchantment/EnchantmentThorns.java.patch @@ -2,13 +2,13 @@ +++ ../src-work/minecraft/net/minecraft/enchantment/EnchantmentThorns.java @@ -51,12 +51,12 @@ - if (itemstack != null) + if (!itemstack.func_190926_b()) { - itemstack.func_77972_a(3, p_151367_1_); + damageArmor(itemstack, 3, p_151367_1_); } } - else if (itemstack != null) + else if (!itemstack.func_190926_b()) { - itemstack.func_77972_a(1, p_151367_1_); + damageArmor(itemstack, 1, p_151367_1_); diff --git a/patches/minecraft/net/minecraft/entity/Entity.java.patch b/patches/minecraft/net/minecraft/entity/Entity.java.patch index f15eb5bd9..c080e7176 100644 --- a/patches/minecraft/net/minecraft/entity/Entity.java.patch +++ b/patches/minecraft/net/minecraft/entity/Entity.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/entity/Entity.java +++ ../src-work/minecraft/net/minecraft/entity/Entity.java -@@ -78,7 +78,7 @@ +@@ -83,7 +83,7 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -8,8 +8,8 @@ +public abstract class Entity implements ICommandSender, net.minecraftforge.common.capabilities.ICapabilitySerializable { private static final Logger field_184243_a = LogManager.getLogger(); - private static final AxisAlignedBB field_174836_a = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 0.0D, 0.0D, 0.0D); -@@ -190,7 +190,7 @@ + private static final List field_190535_b = Collections.emptyList(); +@@ -193,7 +193,7 @@ if (p_i1582_1_ != null) { @@ -18,7 +18,7 @@ } this.field_70180_af = new EntityDataManager(this); -@@ -201,8 +201,16 @@ +@@ -204,8 +204,16 @@ this.field_70180_af.func_187214_a(field_184234_aB, Boolean.valueOf(false)); this.field_70180_af.func_187214_a(field_189655_aD, Boolean.valueOf(false)); this.func_70088_a(); @@ -35,7 +35,7 @@ public int func_145782_y() { return this.field_145783_c; -@@ -944,7 +952,7 @@ +@@ -976,7 +984,7 @@ protected void func_180429_a(BlockPos p_180429_1_, Block p_180429_2_) { @@ -44,7 +44,7 @@ if (this.field_70170_p.func_180495_p(p_180429_1_.func_177984_a()).func_177230_c() == Blocks.field_150431_aC) { -@@ -1151,12 +1159,12 @@ +@@ -1183,12 +1191,12 @@ BlockPos blockpos = new BlockPos(this.field_70165_t, d0, this.field_70161_v); IBlockState iblockstate = this.field_70170_p.func_180495_p(blockpos); @@ -61,7 +61,7 @@ } else { -@@ -1568,6 +1576,9 @@ +@@ -1620,6 +1628,9 @@ p_189511_1_.func_74782_a("Tags", nbttaglist); } @@ -71,7 +71,7 @@ this.func_70014_b(p_189511_1_); if (this.func_184207_aI()) -@@ -1675,6 +1686,9 @@ +@@ -1727,6 +1738,9 @@ this.func_189654_d(p_70020_1_.func_74767_n("NoGravity")); this.func_184195_f(p_70020_1_.func_74767_n("Glowing")); @@ -81,7 +81,7 @@ if (p_70020_1_.func_150297_b("Tags", 9)) { this.field_184236_aF.clear(); -@@ -1757,7 +1771,10 @@ +@@ -1818,7 +1832,10 @@ { EntityItem entityitem = new EntityItem(this.field_70170_p, this.field_70165_t, this.field_70163_u + (double)p_70099_2_, this.field_70161_v, p_70099_1_); entityitem.func_174869_p(); @@ -92,16 +92,16 @@ + this.field_70170_p.func_72838_d(entityitem); return entityitem; } - else -@@ -1867,6 +1884,7 @@ + } +@@ -1932,6 +1949,7 @@ + } + } - public boolean func_184205_a(Entity p_184205_1_, boolean p_184205_2_) - { + if (!net.minecraftforge.event.ForgeEventFactory.canMountEntity(this, p_184205_1_, true)) return false; if (p_184205_2_ || this.func_184228_n(p_184205_1_) && p_184205_1_.func_184219_q(this)) { if (this.func_184218_aH()) -@@ -1902,6 +1920,7 @@ +@@ -1967,6 +1985,7 @@ if (this.field_184239_as != null) { Entity entity = this.field_184239_as; @@ -109,7 +109,7 @@ this.field_184239_as = null; entity.func_184225_p(this); } -@@ -2336,6 +2355,7 @@ +@@ -2412,6 +2431,7 @@ { if (!this.field_70170_p.field_72995_K && !this.field_70128_L) { @@ -117,7 +117,7 @@ this.field_70170_p.field_72984_F.func_76320_a("changeDimension"); MinecraftServer minecraftserver = this.func_184102_h(); int i = this.field_71093_bK; -@@ -2429,7 +2449,7 @@ +@@ -2505,7 +2525,7 @@ public float func_180428_a(Explosion p_180428_1_, World p_180428_2_, BlockPos p_180428_3_, IBlockState p_180428_4_) { @@ -126,7 +126,7 @@ } public boolean func_174816_a(Explosion p_174816_1_, World p_174816_2_, BlockPos p_174816_3_, IBlockState p_174816_4_, float p_174816_5_) -@@ -2726,6 +2746,164 @@ +@@ -2802,6 +2822,164 @@ EnchantmentHelper.func_151385_b(p_174815_1_, p_174815_2_); } @@ -200,7 +200,7 @@ + } + else + { -+ String name = EntityList.func_75621_b(this); ++ ResourceLocation name = EntityList.func_191301_a(this); + if (EntityList.field_75627_a.containsKey(name)) + { + ItemStack stack = new ItemStack(net.minecraft.init.Items.field_151063_bx); diff --git a/patches/minecraft/net/minecraft/entity/EntityAgeable.java.patch b/patches/minecraft/net/minecraft/entity/EntityAgeable.java.patch deleted file mode 100644 index 65aca1002..000000000 --- a/patches/minecraft/net/minecraft/entity/EntityAgeable.java.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- ../src-base/minecraft/net/minecraft/entity/EntityAgeable.java -+++ ../src-work/minecraft/net/minecraft/entity/EntityAgeable.java -@@ -35,7 +35,7 @@ - { - if (!this.field_70170_p.field_72995_K) - { -- Class oclass = EntityList.func_90035_a(EntityList.func_180122_a(ItemMonsterPlacer.func_185080_h(p_184645_3_))); -+ Class oclass = EntityList.field_75625_b.get(ItemMonsterPlacer.func_185080_h(p_184645_3_)); - - if (oclass != null && this.getClass() == oclass) - { diff --git a/patches/minecraft/net/minecraft/entity/EntityList.java.patch b/patches/minecraft/net/minecraft/entity/EntityList.java.patch index c306cf7b0..cb012a6d1 100644 --- a/patches/minecraft/net/minecraft/entity/EntityList.java.patch +++ b/patches/minecraft/net/minecraft/entity/EntityList.java.patch @@ -1,28 +1,8 @@ --- ../src-base/minecraft/net/minecraft/entity/EntityList.java +++ ../src-work/minecraft/net/minecraft/entity/EntityList.java -@@ -93,6 +93,7 @@ - - public static void func_75618_a(Class p_75618_0_, String p_75618_1_, int p_75618_2_) - { -+ if (p_75618_2_ < 0 || p_75618_2_ > 255) throw new IllegalArgumentException("Attempted to register a entity with invalid ID: " + p_75618_2_ + " Name: " + p_75618_1_ + " Class: " + p_75618_0_); - if (field_75625_b.containsKey(p_75618_1_)) - { - throw new IllegalArgumentException("ID is already registered: " + p_75618_1_); -@@ -152,9 +153,10 @@ - { - Entity entity = null; - -+ Class oclass = null; - try - { -- Class oclass = (Class)field_75625_b.get(p_75615_0_.func_74779_i("id")); -+ oclass = field_75625_b.get(p_75615_0_.func_74779_i("id")); - - if (oclass != null) - { -@@ -168,7 +170,17 @@ - - if (entity != null) +@@ -189,7 +189,17 @@ + } + else { + try + { @@ -32,19 +12,9 @@ + { + net.minecraftforge.fml.common.FMLLog.log(org.apache.logging.log4j.Level.ERROR, e, + "An Entity %s(%s) has thrown an exception during loading, its state cannot be restored. Report this to the mod author", -+ p_75615_0_.func_74779_i("id"), oclass.getName()); ++ p_75615_0_.func_74779_i("id"), entity.func_70005_c_()); + entity = null; + } } - else - { -@@ -208,7 +220,8 @@ - @Nullable - public static Entity func_188429_b(String p_188429_0_, World p_188429_1_) - { -- return func_75616_a(func_180122_a(p_188429_0_), p_188429_1_); -+ Entity e = func_75620_a(p_188429_0_, p_188429_1_); // Forge: Support entities without global ID -+ return e == null ? func_75620_a("Pig", p_188429_1_) : e; - } - public static int func_75619_a(Entity p_75619_0_) + return entity; diff --git a/patches/minecraft/net/minecraft/entity/EntityLiving.java.patch b/patches/minecraft/net/minecraft/entity/EntityLiving.java.patch index a24764760..3f91839ba 100644 --- a/patches/minecraft/net/minecraft/entity/EntityLiving.java.patch +++ b/patches/minecraft/net/minecraft/entity/EntityLiving.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/entity/EntityLiving.java +++ ../src-work/minecraft/net/minecraft/entity/EntityLiving.java -@@ -170,6 +170,7 @@ +@@ -171,6 +171,7 @@ public void func_70624_b(@Nullable EntityLivingBase p_70624_1_) { this.field_70696_bz = p_70624_1_; @@ -8,7 +8,19 @@ } public boolean func_70686_a(Class p_70686_1_) -@@ -712,10 +713,22 @@ +@@ -347,9 +348,9 @@ + } + } + +- public static void func_189752_a(DataFixer p_189752_0_, Class p_189752_1_) ++ public static void func_189752_a(DataFixer p_189752_1_, Class p_189752_2_) + { +- p_189752_0_.func_188258_a(FixTypes.ENTITY, new ItemStackDataLists(p_189752_1_, new String[] {"ArmorItems", "HandItems"})); ++ p_189752_1_.func_188258_a(FixTypes.ENTITY, new ItemStackDataLists(p_189752_2_, new String[] {"ArmorItems", "HandItems"})); + } + + public void func_70014_b(NBTTagCompound p_70014_1_) +@@ -708,10 +709,22 @@ protected void func_70623_bb() { @@ -31,7 +43,7 @@ else { Entity entity = this.field_70170_p.func_72890_a(this, -1.0D); -@@ -849,7 +862,6 @@ +@@ -845,7 +858,6 @@ return !this.field_70170_p.func_72953_d(this.func_174813_aQ()) && this.field_70170_p.func_184144_a(this, this.func_174813_aQ()).isEmpty() && this.field_70170_p.func_72917_a(this.func_174813_aQ(), this); } diff --git a/patches/minecraft/net/minecraft/entity/EntityLivingBase.java.patch b/patches/minecraft/net/minecraft/entity/EntityLivingBase.java.patch index d70fba6d3..b313ee17b 100644 --- a/patches/minecraft/net/minecraft/entity/EntityLivingBase.java.patch +++ b/patches/minecraft/net/minecraft/entity/EntityLivingBase.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/entity/EntityLivingBase.java +++ ../src-work/minecraft/net/minecraft/entity/EntityLivingBase.java -@@ -193,10 +193,11 @@ +@@ -199,10 +199,11 @@ { float f = (float)MathHelper.func_76123_f(this.field_70143_R - 3.0F); @@ -13,7 +13,7 @@ ((WorldServer)this.field_70170_p).func_175739_a(EnumParticleTypes.BLOCK_DUST, this.field_70165_t, this.field_70163_u, this.field_70161_v, i, 0.0D, 0.0D, 0.0D, 0.15000000596046448D, new int[] {Block.func_176210_f(p_184231_4_)}); } } -@@ -273,7 +274,7 @@ +@@ -279,7 +280,7 @@ } } @@ -22,7 +22,7 @@ { this.func_184210_p(); } -@@ -372,7 +373,7 @@ +@@ -378,7 +379,7 @@ if (!this.field_70170_p.field_72995_K && (this.func_70684_aJ() || this.field_70718_bc > 0 && this.func_146066_aG() && this.field_70170_p.func_82736_K().func_82766_b("doMobLoot"))) { int i = this.func_70693_a(this.field_70717_bb); @@ -31,7 +31,7 @@ while (i > 0) { int j = EntityXPOrb.func_70527_a(i); -@@ -433,6 +434,7 @@ +@@ -440,6 +441,7 @@ { this.field_70755_b = p_70604_1_; this.field_70756_c = this.field_70173_aa; @@ -39,7 +39,7 @@ } public EntityLivingBase func_110144_aD() -@@ -793,6 +795,8 @@ +@@ -812,6 +814,8 @@ public void func_70691_i(float p_70691_1_) { @@ -48,7 +48,7 @@ float f = this.func_110143_aJ(); if (f > 0.0F) -@@ -813,6 +817,7 @@ +@@ -832,6 +836,7 @@ public boolean func_70097_a(DamageSource p_70097_1_, float p_70097_2_) { @@ -56,19 +56,19 @@ if (this.func_180431_b(p_70097_1_)) { return false; -@@ -902,9 +907,9 @@ +@@ -918,9 +923,9 @@ this.field_70718_bc = 100; - this.field_70717_bb = (EntityPlayer)entity; + this.field_70717_bb = (EntityPlayer)entity1; } -- else if (entity instanceof EntityWolf) -+ else if (entity instanceof net.minecraft.entity.passive.EntityTameable) +- else if (entity1 instanceof EntityWolf) ++ else if (entity1 instanceof net.minecraft.entity.passive.EntityTameable) { -- EntityWolf entitywolf = (EntityWolf)entity; -+ net.minecraft.entity.passive.EntityTameable entitywolf = (net.minecraft.entity.passive.EntityTameable)entity; +- EntityWolf entitywolf = (EntityWolf)entity1; ++ net.minecraft.entity.passive.EntityTameable entitywolf = (net.minecraft.entity.passive.EntityTameable)entity1; if (entitywolf.func_70909_n()) { -@@ -1043,6 +1048,7 @@ +@@ -1107,6 +1112,7 @@ public void func_70645_a(DamageSource p_70645_1_) { @@ -76,7 +76,7 @@ if (!this.field_70729_aU) { Entity entity = p_70645_1_.func_76346_g(); -@@ -1063,18 +1069,26 @@ +@@ -1127,18 +1133,26 @@ if (!this.field_70170_p.field_72995_K) { @@ -108,7 +108,7 @@ } this.field_70170_p.func_72960_a(this, (byte)3); -@@ -1151,7 +1165,7 @@ +@@ -1215,7 +1229,7 @@ BlockPos blockpos = new BlockPos(i, j, k); IBlockState iblockstate = this.field_70170_p.func_180495_p(blockpos); Block block = iblockstate.func_177230_c(); @@ -117,7 +117,7 @@ } } -@@ -1177,6 +1191,9 @@ +@@ -1241,6 +1255,9 @@ public void func_180430_e(float p_180430_1_, float p_180430_2_) { @@ -127,7 +127,7 @@ super.func_180430_e(p_180430_1_, p_180430_2_); PotionEffect potioneffect = this.func_70660_b(MobEffects.field_76430_j); float f = potioneffect == null ? 0.0F : (float)(potioneffect.func_76458_c() + 1); -@@ -1193,7 +1210,7 @@ +@@ -1257,7 +1274,7 @@ if (iblockstate.func_185904_a() != Material.field_151579_a) { @@ -136,7 +136,7 @@ this.func_184185_a(soundtype.func_185842_g(), soundtype.func_185843_a() * 0.5F, soundtype.func_185847_b() * 0.75F); } } -@@ -1270,6 +1287,8 @@ +@@ -1334,6 +1351,8 @@ { if (!this.func_180431_b(p_70665_1_)) { @@ -145,7 +145,7 @@ p_70665_2_ = this.func_70655_b(p_70665_1_, p_70665_2_); p_70665_2_ = this.func_70672_c(p_70665_1_, p_70665_2_); float f = p_70665_2_; -@@ -1319,6 +1338,11 @@ +@@ -1383,6 +1402,11 @@ public void func_184609_a(EnumHand p_184609_1_) { @@ -157,33 +157,33 @@ if (!this.field_82175_bq || this.field_110158_av >= this.func_82166_i() / 2 || this.field_110158_av < 0) { this.field_110158_av = -1; -@@ -1545,7 +1569,7 @@ +@@ -1613,7 +1637,7 @@ - if (!this.field_70170_p.func_184143_b(axisalignedbb1)) - { -- if (this.field_70170_p.func_180495_p(new BlockPos(d11, this.field_70163_u, d12)).func_185896_q()) -+ if (this.field_70170_p.func_180495_p(new BlockPos(d11, this.field_70163_u, d12)).isSideSolid(field_70170_p, new BlockPos(d11, this.field_70163_u, d12), EnumFacing.UP)) + if (!this.field_70170_p.func_184143_b(axisalignedbb1)) { - this.func_70634_a(d11, this.field_70163_u + 1.0D, d12); - return; -@@ -1553,14 +1577,14 @@ +- if (this.field_70170_p.func_180495_p(new BlockPos(d11, this.field_70163_u, d12)).func_185896_q()) ++ if (this.field_70170_p.func_180495_p(new BlockPos(d11, this.field_70163_u, d12)).isSideSolid(field_70170_p, new BlockPos(d11, this.field_70163_u, d12), EnumFacing.UP)) + { + this.func_70634_a(d11, this.field_70163_u + 1.0D, d12); + return; +@@ -1621,14 +1645,14 @@ - BlockPos blockpos = new BlockPos(d11, this.field_70163_u - 1.0D, d12); + BlockPos blockpos = new BlockPos(d11, this.field_70163_u - 1.0D, d12); -- if (this.field_70170_p.func_180495_p(blockpos).func_185896_q() || this.field_70170_p.func_180495_p(blockpos).func_185904_a() == Material.field_151586_h) -+ if (this.field_70170_p.func_180495_p(blockpos).isSideSolid(field_70170_p, blockpos, EnumFacing.UP) || this.field_70170_p.func_180495_p(blockpos).func_185904_a() == Material.field_151586_h) +- if (this.field_70170_p.func_180495_p(blockpos).func_185896_q() || this.field_70170_p.func_180495_p(blockpos).func_185904_a() == Material.field_151586_h) ++ if (this.field_70170_p.func_180495_p(blockpos).isSideSolid(field_70170_p, blockpos, EnumFacing.UP) || this.field_70170_p.func_180495_p(blockpos).func_185904_a() == Material.field_151586_h) + { + d1 = d11; + d13 = this.field_70163_u + 1.0D; + d14 = d12; + } + } +- else if (!this.field_70170_p.func_184143_b(axisalignedbb1.func_72317_d(0.0D, 1.0D, 0.0D)) && this.field_70170_p.func_180495_p(new BlockPos(d11, this.field_70163_u + 1.0D, d12)).func_185896_q()) ++ else if (!this.field_70170_p.func_184143_b(axisalignedbb1.func_72317_d(0.0D, 1.0D, 0.0D)) && this.field_70170_p.func_180495_p(new BlockPos(d11, this.field_70163_u + 1.0D, d12)).isSideSolid(field_70170_p, new BlockPos(d11, this.field_70163_u + 1.0D, d12), EnumFacing.UP)) { d1 = d11; - d13 = this.field_70163_u + 1.0D; - d14 = d12; - } - } -- else if (!this.field_70170_p.func_184143_b(axisalignedbb1.func_72317_d(0.0D, 1.0D, 0.0D)) && this.field_70170_p.func_180495_p(new BlockPos(d11, this.field_70163_u + 1.0D, d12)).func_185896_q()) -+ else if (!this.field_70170_p.func_184143_b(axisalignedbb1.func_72317_d(0.0D, 1.0D, 0.0D)) && this.field_70170_p.func_180495_p(new BlockPos(d11, this.field_70163_u + 1.0D, d12)).isSideSolid(field_70170_p, new BlockPos(d11, this.field_70163_u + 1.0D, d12), EnumFacing.UP)) - { - d1 = d11; - d13 = this.field_70163_u + 2.0D; -@@ -1631,6 +1655,7 @@ + d13 = this.field_70163_u + 2.0D; +@@ -1700,6 +1724,7 @@ } this.field_70160_al = true; @@ -191,7 +191,7 @@ } protected void func_70629_bd() -@@ -1903,6 +1928,7 @@ +@@ -1972,6 +1997,7 @@ public void func_70071_h_() { @@ -199,7 +199,7 @@ super.func_70071_h_(); this.func_184608_ct(); -@@ -2409,6 +2435,40 @@ +@@ -2488,6 +2514,40 @@ this.field_70752_e = true; } @@ -240,7 +240,7 @@ public abstract EnumHandSide func_184591_cq(); public boolean func_184587_cr() -@@ -2429,12 +2489,19 @@ +@@ -2508,12 +2568,19 @@ if (itemstack == this.field_184627_bm) { @@ -261,9 +261,9 @@ { this.func_71036_o(); } -@@ -2452,8 +2519,10 @@ +@@ -2531,8 +2598,10 @@ - if (itemstack != null && !this.func_184587_cr()) + if (!itemstack.func_190926_b() && !this.func_184587_cr()) { + int duration = net.minecraftforge.event.ForgeEventFactory.onItemUseStart(this, itemstack, itemstack.func_77988_m()); + if (duration <= 0) return; @@ -273,18 +273,20 @@ if (!this.field_70170_p.field_72995_K) { -@@ -2536,6 +2605,8 @@ +@@ -2613,7 +2682,9 @@ + if (!this.field_184627_bm.func_190926_b() && this.func_184587_cr()) + { this.func_184584_a(this.field_184627_bm, 16); - ItemStack itemstack = this.field_184627_bm.func_77950_b(this.field_70170_p, this); - +- this.func_184611_a(this.func_184600_cs(), this.field_184627_bm.func_77950_b(this.field_70170_p, this)); ++ ItemStack itemstack = this.field_184627_bm.func_77950_b(this.field_70170_p, this); + itemstack = net.minecraftforge.event.ForgeEventFactory.onItemUseFinish(this, field_184627_bm, func_184605_cv(), itemstack); -+ - if (itemstack != null && itemstack.field_77994_a == 0) - { - itemstack = null; -@@ -2566,7 +2637,8 @@ ++ this.func_184611_a(this.func_184600_cs(), itemstack); + this.func_184602_cy(); + } + } +@@ -2637,7 +2708,8 @@ { - if (this.field_184627_bm != null) + if (!this.field_184627_bm.func_190926_b()) { - this.field_184627_bm.func_77974_b(this.field_70170_p, this, this.func_184605_cv()); + if (!net.minecraftforge.event.ForgeEventFactory.onUseItemStop(this, field_184627_bm, this.func_184605_cv())) @@ -292,7 +294,7 @@ } this.func_184602_cy(); -@@ -2685,4 +2757,28 @@ +@@ -2761,4 +2833,28 @@ { return true; } diff --git a/patches/minecraft/net/minecraft/entity/EntitySpawnPlacementRegistry.java.patch b/patches/minecraft/net/minecraft/entity/EntitySpawnPlacementRegistry.java.patch index 018d2b397..7c716d9a9 100644 --- a/patches/minecraft/net/minecraft/entity/EntitySpawnPlacementRegistry.java.patch +++ b/patches/minecraft/net/minecraft/entity/EntitySpawnPlacementRegistry.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/entity/EntitySpawnPlacementRegistry.java +++ ../src-work/minecraft/net/minecraft/entity/EntitySpawnPlacementRegistry.java -@@ -44,6 +44,12 @@ +@@ -52,6 +52,12 @@ return (EntityLiving.SpawnPlacementType)field_180110_a.get(p_180109_0_); } diff --git a/patches/minecraft/net/minecraft/entity/EntityTracker.java.patch b/patches/minecraft/net/minecraft/entity/EntityTracker.java.patch index 1a78df1c3..25000bf6b 100644 --- a/patches/minecraft/net/minecraft/entity/EntityTracker.java.patch +++ b/patches/minecraft/net/minecraft/entity/EntityTracker.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/entity/EntityTracker.java +++ ../src-work/minecraft/net/minecraft/entity/EntityTracker.java -@@ -75,6 +75,8 @@ +@@ -77,6 +77,8 @@ public void func_72786_a(Entity p_72786_1_) { @@ -9,7 +9,7 @@ if (p_72786_1_ instanceof EntityPlayerMP) { this.func_72791_a(p_72786_1_, 512, 2); -@@ -329,6 +331,25 @@ +@@ -339,6 +341,25 @@ } } diff --git a/patches/minecraft/net/minecraft/entity/EntityTrackerEntry.java.patch b/patches/minecraft/net/minecraft/entity/EntityTrackerEntry.java.patch index af7161360..90551e859 100644 --- a/patches/minecraft/net/minecraft/entity/EntityTrackerEntry.java.patch +++ b/patches/minecraft/net/minecraft/entity/EntityTrackerEntry.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/entity/EntityTrackerEntry.java +++ ../src-work/minecraft/net/minecraft/entity/EntityTrackerEntry.java -@@ -438,6 +438,7 @@ +@@ -450,6 +450,7 @@ this.field_73132_a.func_184178_b(p_73117_1_); p_73117_1_.func_184848_d(this.field_73132_a); @@ -8,7 +8,7 @@ } } else if (this.field_73134_o.contains(p_73117_1_)) -@@ -445,6 +446,7 @@ +@@ -457,6 +458,7 @@ this.field_73134_o.remove(p_73117_1_); this.field_73132_a.func_184203_c(p_73117_1_); p_73117_1_.func_152339_d(this.field_73132_a); @@ -16,13 +16,13 @@ } } } -@@ -477,6 +479,9 @@ +@@ -489,6 +491,9 @@ field_151262_p.warn("Fetching addPacket for removed entity"); } + Packet pkt = net.minecraftforge.fml.common.network.internal.FMLNetworkHandler.getEntitySpawningPacket(this.field_73132_a); + if (pkt != null) return pkt; + - if (this.field_73132_a instanceof EntityItem) + if (this.field_73132_a instanceof EntityPlayerMP) { - return new SPacketSpawnObject(this.field_73132_a, 2, 1); + return new SPacketSpawnPlayer((EntityPlayer)this.field_73132_a); diff --git a/patches/minecraft/net/minecraft/entity/ai/EntityAIAttackMelee.java.patch b/patches/minecraft/net/minecraft/entity/ai/EntityAIAttackMelee.java.patch index 515c3f8f5..c815a23ea 100644 --- a/patches/minecraft/net/minecraft/entity/ai/EntityAIAttackMelee.java.patch +++ b/patches/minecraft/net/minecraft/entity/ai/EntityAIAttackMelee.java.patch @@ -27,7 +27,7 @@ + } + } this.field_75438_g = this.field_75441_b.func_70661_as().func_75494_a(entitylivingbase); - return this.field_75438_g != null; + return this.field_75438_g != null ? true : this.func_179512_a(entitylivingbase) >= this.field_75441_b.func_70092_e(entitylivingbase.field_70165_t, entitylivingbase.func_174813_aQ().field_72338_b, entitylivingbase.field_70161_v); } @@ -88,6 +103,23 @@ this.field_151496_k = entitylivingbase.field_70161_v; diff --git a/patches/minecraft/net/minecraft/entity/ai/EntityAIMate.java.patch b/patches/minecraft/net/minecraft/entity/ai/EntityAIMate.java.patch index 9e57b3479..fadba74de 100644 --- a/patches/minecraft/net/minecraft/entity/ai/EntityAIMate.java.patch +++ b/patches/minecraft/net/minecraft/entity/ai/EntityAIMate.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/entity/ai/EntityAIMate.java +++ ../src-work/minecraft/net/minecraft/entity/ai/EntityAIMate.java -@@ -86,6 +86,18 @@ +@@ -93,6 +93,18 @@ { EntityAgeable entityageable = this.field_75390_d.func_90011_a(this.field_75391_e); diff --git a/patches/minecraft/net/minecraft/entity/boss/EntityDragon.java.patch b/patches/minecraft/net/minecraft/entity/boss/EntityDragon.java.patch index 088ed3963..a35c1a828 100644 --- a/patches/minecraft/net/minecraft/entity/boss/EntityDragon.java.patch +++ b/patches/minecraft/net/minecraft/entity/boss/EntityDragon.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/entity/boss/EntityDragon.java +++ ../src-work/minecraft/net/minecraft/entity/boss/EntityDragon.java -@@ -481,13 +481,13 @@ +@@ -498,13 +498,13 @@ IBlockState iblockstate = this.field_70170_p.func_180495_p(blockpos); Block block = iblockstate.func_177230_c(); diff --git a/patches/minecraft/net/minecraft/entity/boss/EntityWither.java.patch b/patches/minecraft/net/minecraft/entity/boss/EntityWither.java.patch index c68ec555f..4158c101b 100644 --- a/patches/minecraft/net/minecraft/entity/boss/EntityWither.java.patch +++ b/patches/minecraft/net/minecraft/entity/boss/EntityWither.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/entity/boss/EntityWither.java +++ ../src-work/minecraft/net/minecraft/entity/boss/EntityWither.java -@@ -372,7 +372,7 @@ +@@ -377,7 +377,7 @@ IBlockState iblockstate = this.field_70170_p.func_180495_p(blockpos); Block block = iblockstate.func_177230_c(); diff --git a/patches/minecraft/net/minecraft/entity/item/EntityFallingBlock.java.patch b/patches/minecraft/net/minecraft/entity/item/EntityFallingBlock.java.patch index 503b46aaa..25973d7cb 100644 --- a/patches/minecraft/net/minecraft/entity/item/EntityFallingBlock.java.patch +++ b/patches/minecraft/net/minecraft/entity/item/EntityFallingBlock.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/entity/item/EntityFallingBlock.java +++ ../src-work/minecraft/net/minecraft/entity/item/EntityFallingBlock.java -@@ -135,6 +135,7 @@ +@@ -136,6 +136,7 @@ { IBlockState iblockstate = this.field_70170_p.func_180495_p(blockpos1); diff --git a/patches/minecraft/net/minecraft/entity/item/EntityItem.java.patch b/patches/minecraft/net/minecraft/entity/item/EntityItem.java.patch index 8c5a2cc5e..9083ab241 100644 --- a/patches/minecraft/net/minecraft/entity/item/EntityItem.java.patch +++ b/patches/minecraft/net/minecraft/entity/item/EntityItem.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/entity/item/EntityItem.java +++ ../src-work/minecraft/net/minecraft/entity/item/EntityItem.java -@@ -41,6 +41,11 @@ +@@ -40,6 +40,11 @@ private String field_145802_g; public float field_70290_d; @@ -12,7 +12,7 @@ public EntityItem(World p_i1709_1_, double p_i1709_2_, double p_i1709_4_, double p_i1709_6_) { super(p_i1709_1_); -@@ -58,6 +63,7 @@ +@@ -57,6 +62,7 @@ { this(p_i1710_1_, p_i1710_2_, p_i1710_4_, p_i1710_6_); this.func_92058_a(p_i1710_8_); @@ -20,21 +20,20 @@ } protected boolean func_70041_e_() -@@ -81,6 +87,8 @@ +@@ -80,6 +86,7 @@ public void func_70071_h_() { -+ ItemStack stack = this.func_184212_Q().func_187225_a(field_184533_c).orNull(); -+ if (stack != null && stack.func_77973_b() != null && stack.func_77973_b().onEntityItemUpdate(this)) return; - if (this.func_92059_d() == null) ++ if (func_92059_d().func_77973_b().onEntityItemUpdate(this)) return; + if (this.func_92059_d().func_190926_b()) { this.func_70106_y(); -@@ -146,8 +154,16 @@ - - this.func_70072_I(); +@@ -169,8 +176,16 @@ + } + } - if (!this.field_70170_p.field_72995_K && this.field_70292_b >= 6000) -+ ItemStack item = this.func_184212_Q().func_187225_a(field_184533_c).orNull(); ++ ItemStack item = this.func_92059_d(); + + if (!this.field_70170_p.field_72995_K && this.field_70292_b >= lifespan) { @@ -42,12 +41,12 @@ + if (hook < 0) this.func_70106_y(); + else this.lifespan += hook; + } -+ if (item != null && item.field_77994_a <= 0) ++ if (item.func_190926_b()) + { this.func_70106_y(); } } -@@ -204,6 +220,10 @@ +@@ -227,6 +242,10 @@ { return false; } @@ -57,8 +56,8 @@ + } else { - itemstack1.field_77994_a += itemstack.field_77994_a; -@@ -293,6 +313,7 @@ + itemstack1.func_190917_f(itemstack.func_190916_E()); +@@ -316,6 +335,7 @@ p_70014_1_.func_74777_a("Health", (short)this.field_70291_e); p_70014_1_.func_74777_a("Age", (short)this.field_70292_b); p_70014_1_.func_74777_a("PickupDelay", (short)this.field_145804_b); @@ -66,16 +65,10 @@ if (this.func_145800_j() != null) { -@@ -333,20 +354,23 @@ - NBTTagCompound nbttagcompound = p_70037_1_.func_74775_l("Item"); - this.func_92058_a(ItemStack.func_77949_a(nbttagcompound)); - -- if (this.func_92059_d() == null) -- { -- this.func_70106_y(); -- } -+ ItemStack item = this.func_184212_Q().func_187225_a(field_184533_c).orNull(); -+ if (item == null || item.field_77994_a <= 0) this.func_70106_y(); +@@ -360,17 +380,22 @@ + { + this.func_70106_y(); + } + if (p_70037_1_.func_74764_b("Lifespan")) lifespan = p_70037_1_.func_74762_e("Lifespan"); } @@ -85,7 +78,8 @@ { + if (this.field_145804_b > 0) return; ItemStack itemstack = this.func_92059_d(); - int i = itemstack.field_77994_a; + Item item = itemstack.func_77973_b(); + int i = itemstack.func_190916_E(); - if (this.field_145804_b == 0 && (this.field_145802_g == null || 6000 - this.field_70292_b <= 200 || this.field_145802_g.equals(p_70100_1_.func_70005_c_())) && p_70100_1_.field_71071_by.func_70441_a(itemstack)) + int hook = net.minecraftforge.event.ForgeEventFactory.onItemPickup(this, p_70100_1_, itemstack); @@ -93,29 +87,17 @@ + + if (this.field_145804_b <= 0 && (this.field_145802_g == null || lifespan - this.field_70292_b <= 200 || this.field_145802_g.equals(p_70100_1_.func_70005_c_())) && (hook == 1 || i <= 0 || p_70100_1_.field_71071_by.func_70441_a(itemstack))) { - if (itemstack.func_77973_b() == Item.func_150898_a(Blocks.field_150364_r)) + if (item == Item.func_150898_a(Blocks.field_150364_r)) { -@@ -383,6 +407,7 @@ +@@ -407,6 +432,7 @@ } } + net.minecraftforge.fml.common.FMLCommonHandler.instance().firePlayerItemPickupEvent(p_70100_1_, this); - if (!this.func_174814_R()) - { - this.field_70170_p.func_184148_a((EntityPlayer)null, p_70100_1_.field_70165_t, p_70100_1_.field_70163_u, p_70100_1_.field_70161_v, SoundEvents.field_187638_cR, SoundCategory.PLAYERS, 0.2F, ((this.field_70146_Z.nextFloat() - this.field_70146_Z.nextFloat()) * 0.7F + 1.0F) * 2.0F); -@@ -429,11 +454,6 @@ + p_70100_1_.func_71001_a(this, i); - if (itemstack == null) - { -- if (this.field_70170_p != null) -- { -- field_145803_d.error("Item entity {} has no item?!", new Object[] {Integer.valueOf(this.func_145782_y())}); -- } -- - return new ItemStack(Blocks.field_150348_b); - } - else -@@ -507,6 +527,6 @@ + if (itemstack.func_190926_b()) +@@ -513,6 +539,6 @@ public void func_174870_v() { this.func_174871_r(); diff --git a/patches/minecraft/net/minecraft/entity/item/EntityItemFrame.java.patch b/patches/minecraft/net/minecraft/entity/item/EntityItemFrame.java.patch index 0df5cd919..d8bc0dc15 100644 --- a/patches/minecraft/net/minecraft/entity/item/EntityItemFrame.java.patch +++ b/patches/minecraft/net/minecraft/entity/item/EntityItemFrame.java.patch @@ -1,8 +1,8 @@ --- ../src-base/minecraft/net/minecraft/entity/item/EntityItemFrame.java +++ ../src-work/minecraft/net/minecraft/entity/item/EntityItemFrame.java -@@ -141,7 +141,7 @@ +@@ -140,7 +140,7 @@ { - if (p_110131_1_ != null) + if (!p_110131_1_.func_190926_b()) { - if (p_110131_1_.func_77973_b() == Items.field_151098_aY) + if (p_110131_1_.func_77973_b() instanceof net.minecraft.item.ItemMap) diff --git a/patches/minecraft/net/minecraft/entity/item/EntityMinecart.java.patch b/patches/minecraft/net/minecraft/entity/item/EntityMinecart.java.patch index df4af684d..c6a785855 100644 --- a/patches/minecraft/net/minecraft/entity/item/EntityMinecart.java.patch +++ b/patches/minecraft/net/minecraft/entity/item/EntityMinecart.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/entity/item/EntityMinecart.java +++ ../src-work/minecraft/net/minecraft/entity/item/EntityMinecart.java -@@ -58,6 +58,20 @@ +@@ -59,6 +59,20 @@ @SideOnly(Side.CLIENT) private double field_70506_as; @@ -21,7 +21,7 @@ public EntityMinecart(World p_i1712_1_) { super(p_i1712_1_); -@@ -104,18 +118,20 @@ +@@ -105,18 +119,20 @@ @Nullable public AxisAlignedBB func_70114_g(Entity p_70114_1_) { @@ -43,7 +43,7 @@ } public EntityMinecart(World p_i1713_1_, double p_i1713_2_, double p_i1713_4_, double p_i1713_6_) -@@ -326,7 +342,7 @@ +@@ -322,7 +338,7 @@ BlockPos blockpos = new BlockPos(k, l, i1); IBlockState iblockstate = this.field_70170_p.func_180495_p(blockpos); @@ -52,7 +52,7 @@ { this.func_180460_a(blockpos, iblockstate); -@@ -365,9 +381,13 @@ +@@ -361,9 +377,13 @@ this.func_70101_b(this.field_70177_z, this.field_70125_A); @@ -68,7 +68,7 @@ if (!list.isEmpty()) { -@@ -388,7 +408,7 @@ +@@ -384,7 +404,7 @@ } else { @@ -77,7 +77,7 @@ { if (!this.func_184196_w(entity) && entity.func_70104_M() && entity instanceof EntityMinecart) { -@@ -398,6 +418,7 @@ +@@ -394,6 +414,7 @@ } this.func_70072_I(); @@ -85,7 +85,7 @@ } } -@@ -412,10 +433,21 @@ +@@ -408,10 +429,21 @@ protected void func_180459_n() { @@ -108,12 +108,12 @@ if (this.field_70122_E) { this.field_70159_w *= 0.5D; -@@ -423,13 +455,13 @@ +@@ -419,13 +451,13 @@ this.field_70179_y *= 0.5D; } -- this.func_70091_d(this.field_70159_w, this.field_70181_x, this.field_70179_y); -+ this.func_70091_d(this.field_70159_w, moveY, this.field_70179_y); +- this.func_70091_d(MoverType.SELF, this.field_70159_w, this.field_70181_x, this.field_70179_y); ++ this.func_70091_d(MoverType.SELF, this.field_70159_w, moveY, this.field_70179_y); if (!this.field_70122_E) { @@ -126,7 +126,7 @@ } } -@@ -449,25 +481,25 @@ +@@ -445,25 +477,25 @@ flag1 = !flag; } @@ -158,7 +158,7 @@ ++this.field_70163_u; } -@@ -513,7 +545,7 @@ +@@ -509,7 +541,7 @@ } } @@ -167,7 +167,7 @@ { double d17 = Math.sqrt(this.field_70159_w * this.field_70159_w + this.field_70179_y * this.field_70179_y); -@@ -559,20 +591,8 @@ +@@ -555,20 +587,8 @@ this.field_70165_t = d18 + d1 * d10; this.field_70161_v = d19 + d2 * d10; this.func_70107_b(this.field_70165_t, this.field_70163_u, this.field_70161_v); @@ -184,12 +184,12 @@ - double d13 = this.func_174898_m(); - d22 = MathHelper.func_151237_a(d22, -d13, d13); - d23 = MathHelper.func_151237_a(d23, -d13, d13); -- this.func_70091_d(d22, 0.0D, d23); +- this.func_70091_d(MoverType.SELF, d22, 0.0D, d23); - if (aint[0][1] != 0 && MathHelper.func_76128_c(this.field_70165_t) - p_180460_1_.func_177958_n() == aint[0][0] && MathHelper.func_76128_c(this.field_70161_v) - p_180460_1_.func_177952_p() == aint[0][2]) { this.func_70107_b(this.field_70165_t, this.field_70163_u + (double)aint[0][1], this.field_70161_v); -@@ -609,8 +629,14 @@ +@@ -605,8 +625,14 @@ this.field_70179_y = d5 * (double)(i - p_180460_1_.func_177952_p()); } @@ -205,7 +205,16 @@ double d15 = Math.sqrt(this.field_70159_w * this.field_70159_w + this.field_70179_y * this.field_70179_y); if (d15 > 0.01D) -@@ -832,6 +858,12 @@ +@@ -790,7 +816,7 @@ + return this.func_94100_s() ? axisalignedbb.func_186662_g((double)Math.abs(this.func_94099_q()) / 16.0D) : axisalignedbb; + } + +- public static void func_189669_a(DataFixer p_189669_0_, Class p_189669_1_) ++ public static void func_189669_a(DataFixer p_189669_1_, Class p_189669_2_) + { + } + +@@ -830,6 +856,12 @@ public void func_70108_f(Entity p_70108_1_) { @@ -218,7 +227,7 @@ if (!this.field_70170_p.field_72995_K) { if (!p_70108_1_.field_70145_X && !this.field_70145_X) -@@ -879,7 +911,7 @@ +@@ -877,7 +909,7 @@ double d7 = p_70108_1_.field_70159_w + this.field_70159_w; double d8 = p_70108_1_.field_70179_y + this.field_70179_y; @@ -227,7 +236,7 @@ { this.field_70159_w *= 0.20000000298023224D; this.field_70179_y *= 0.20000000298023224D; -@@ -887,7 +919,7 @@ +@@ -885,7 +917,7 @@ p_70108_1_.field_70159_w *= 0.949999988079071D; p_70108_1_.field_70179_y *= 0.949999988079071D; } @@ -236,7 +245,7 @@ { p_70108_1_.field_70159_w *= 0.20000000298023224D; p_70108_1_.field_70179_y *= 0.20000000298023224D; -@@ -1017,6 +1049,229 @@ +@@ -1015,6 +1047,229 @@ this.func_184212_Q().func_187227_b(field_184270_f, Boolean.valueOf(p_94096_1_)); } @@ -280,7 +289,7 @@ + double max = this.getMaxSpeed(); + mX = MathHelper.func_151237_a(mX, -max, max); + mZ = MathHelper.func_151237_a(mZ, -max, max); -+ this.func_70091_d(mX, 0.0D, mZ); ++ this.func_70091_d(MoverType.SELF, mX, 0.0D, mZ); + } + + /** diff --git a/patches/minecraft/net/minecraft/entity/item/EntityMinecartCommandBlock.java.patch b/patches/minecraft/net/minecraft/entity/item/EntityMinecartCommandBlock.java.patch index 3f65941ca..934ad146a 100644 --- a/patches/minecraft/net/minecraft/entity/item/EntityMinecartCommandBlock.java.patch +++ b/patches/minecraft/net/minecraft/entity/item/EntityMinecartCommandBlock.java.patch @@ -1,10 +1,10 @@ --- ../src-base/minecraft/net/minecraft/entity/item/EntityMinecartCommandBlock.java +++ ../src-work/minecraft/net/minecraft/entity/item/EntityMinecartCommandBlock.java -@@ -146,6 +146,7 @@ +@@ -147,6 +147,7 @@ - public boolean func_184230_a(EntityPlayer p_184230_1_, @Nullable ItemStack p_184230_2_, EnumHand p_184230_3_) + public boolean func_184230_a(EntityPlayer p_184230_1_, EnumHand p_184230_2_) { -+ if (net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.event.entity.minecart.MinecartInteractEvent(this, p_184230_1_, p_184230_2_, p_184230_3_))) return true; ++ if (net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.event.entity.minecart.MinecartInteractEvent(this, p_184230_1_, p_184230_2_))) return true; this.field_145824_a.func_175574_a(p_184230_1_); return false; } diff --git a/patches/minecraft/net/minecraft/entity/item/EntityMinecartContainer.java.patch b/patches/minecraft/net/minecraft/entity/item/EntityMinecartContainer.java.patch index dbb8c3e64..606633483 100644 --- a/patches/minecraft/net/minecraft/entity/item/EntityMinecartContainer.java.patch +++ b/patches/minecraft/net/minecraft/entity/item/EntityMinecartContainer.java.patch @@ -1,14 +1,14 @@ --- ../src-base/minecraft/net/minecraft/entity/item/EntityMinecartContainer.java +++ ../src-work/minecraft/net/minecraft/entity/item/EntityMinecartContainer.java -@@ -209,6 +209,7 @@ +@@ -195,6 +195,7 @@ - public boolean func_184230_a(EntityPlayer p_184230_1_, @Nullable ItemStack p_184230_2_, EnumHand p_184230_3_) + public boolean func_184230_a(EntityPlayer p_184230_1_, EnumHand p_184230_2_) { -+ if(net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.event.entity.minecart.MinecartInteractEvent(this, p_184230_1_, p_184230_2_, p_184230_3_))) return true; ++ if(net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.event.entity.minecart.MinecartInteractEvent(this, p_184230_1_, p_184230_2_))) return true; if (!this.field_70170_p.field_72995_K) { p_184230_1_.func_71007_a(this); -@@ -288,6 +289,25 @@ +@@ -274,6 +275,25 @@ } } diff --git a/patches/minecraft/net/minecraft/entity/item/EntityMinecartEmpty.java.patch b/patches/minecraft/net/minecraft/entity/item/EntityMinecartEmpty.java.patch index f562c5ed9..642fb7aec 100644 --- a/patches/minecraft/net/minecraft/entity/item/EntityMinecartEmpty.java.patch +++ b/patches/minecraft/net/minecraft/entity/item/EntityMinecartEmpty.java.patch @@ -1,10 +1,10 @@ --- ../src-base/minecraft/net/minecraft/entity/item/EntityMinecartEmpty.java +++ ../src-work/minecraft/net/minecraft/entity/item/EntityMinecartEmpty.java -@@ -26,6 +26,8 @@ +@@ -24,6 +24,8 @@ - public boolean func_184230_a(EntityPlayer p_184230_1_, @Nullable ItemStack p_184230_2_, EnumHand p_184230_3_) + public boolean func_184230_a(EntityPlayer p_184230_1_, EnumHand p_184230_2_) { -+ if (net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.event.entity.minecart.MinecartInteractEvent(this, p_184230_1_, p_184230_2_, p_184230_3_))) return true; ++ if (net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.event.entity.minecart.MinecartInteractEvent(this, p_184230_1_, p_184230_2_))) return true; + if (p_184230_1_.func_70093_af()) { diff --git a/patches/minecraft/net/minecraft/entity/item/EntityMinecartFurnace.java.patch b/patches/minecraft/net/minecraft/entity/item/EntityMinecartFurnace.java.patch index 84b3bfc1b..1b520ef99 100644 --- a/patches/minecraft/net/minecraft/entity/item/EntityMinecartFurnace.java.patch +++ b/patches/minecraft/net/minecraft/entity/item/EntityMinecartFurnace.java.patch @@ -1,11 +1,11 @@ --- ../src-base/minecraft/net/minecraft/entity/item/EntityMinecartFurnace.java +++ ../src-work/minecraft/net/minecraft/entity/item/EntityMinecartFurnace.java -@@ -144,6 +144,8 @@ - - public boolean func_184230_a(EntityPlayer p_184230_1_, @Nullable ItemStack p_184230_2_, EnumHand p_184230_3_) +@@ -145,6 +145,8 @@ { -+ if (net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.event.entity.minecart.MinecartInteractEvent(this, p_184230_1_, p_184230_2_, p_184230_3_))) return true; + ItemStack itemstack = p_184230_1_.func_184586_b(p_184230_2_); + ++ if (net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.event.entity.minecart.MinecartInteractEvent(this, p_184230_1_, p_184230_2_))) return true; + - if (p_184230_2_ != null && p_184230_2_.func_77973_b() == Items.field_151044_h && this.field_94110_c + 3600 <= 32000) + if (itemstack.func_77973_b() == Items.field_151044_h && this.field_94110_c + 3600 <= 32000) { if (!p_184230_1_.field_71075_bZ.field_75098_d) diff --git a/patches/minecraft/net/minecraft/entity/item/EntityMinecartHopper.java.patch b/patches/minecraft/net/minecraft/entity/item/EntityMinecartHopper.java.patch index 0f8e58e27..4ae1da716 100644 --- a/patches/minecraft/net/minecraft/entity/item/EntityMinecartHopper.java.patch +++ b/patches/minecraft/net/minecraft/entity/item/EntityMinecartHopper.java.patch @@ -1,10 +1,10 @@ --- ../src-base/minecraft/net/minecraft/entity/item/EntityMinecartHopper.java +++ ../src-work/minecraft/net/minecraft/entity/item/EntityMinecartHopper.java -@@ -58,6 +58,7 @@ +@@ -57,6 +57,7 @@ - public boolean func_184230_a(EntityPlayer p_184230_1_, @Nullable ItemStack p_184230_2_, EnumHand p_184230_3_) + public boolean func_184230_a(EntityPlayer p_184230_1_, EnumHand p_184230_2_) { -+ if(net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.event.entity.minecart.MinecartInteractEvent(this, p_184230_1_, p_184230_2_, p_184230_3_))) return true; ++ if(net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.event.entity.minecart.MinecartInteractEvent(this, p_184230_1_, p_184230_2_))) return true; if (!this.field_70170_p.field_72995_K) { p_184230_1_.func_71007_a(this); diff --git a/patches/minecraft/net/minecraft/entity/item/EntityXPOrb.java.patch b/patches/minecraft/net/minecraft/entity/item/EntityXPOrb.java.patch index a3dd5f748..3279db9b0 100644 --- a/patches/minecraft/net/minecraft/entity/item/EntityXPOrb.java.patch +++ b/patches/minecraft/net/minecraft/entity/item/EntityXPOrb.java.patch @@ -6,5 +6,5 @@ { + if (net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.event.entity.player.PlayerPickupXpEvent(p_70100_1_, this))) return; p_70100_1_.field_71090_bL = 2; - this.field_70170_p.func_184148_a((EntityPlayer)null, p_70100_1_.field_70165_t, p_70100_1_.field_70163_u, p_70100_1_.field_70161_v, SoundEvents.field_187607_bg, SoundCategory.PLAYERS, 0.1F, 0.5F * ((this.field_70146_Z.nextFloat() - this.field_70146_Z.nextFloat()) * 0.7F + 1.8F)); p_70100_1_.func_71001_a(this, 1); + ItemStack itemstack = EnchantmentHelper.func_92099_a(Enchantments.field_185296_A, p_70100_1_); diff --git a/patches/minecraft/net/minecraft/entity/monster/EntityEnderman.java.patch b/patches/minecraft/net/minecraft/entity/monster/EntityEnderman.java.patch index 2e17729ae..934f9ab79 100644 --- a/patches/minecraft/net/minecraft/entity/monster/EntityEnderman.java.patch +++ b/patches/minecraft/net/minecraft/entity/monster/EntityEnderman.java.patch @@ -11,7 +11,7 @@ if (flag) { -@@ -358,6 +360,18 @@ +@@ -354,6 +356,18 @@ } } diff --git a/patches/minecraft/net/minecraft/entity/monster/EntitySlime.java.patch b/patches/minecraft/net/minecraft/entity/monster/EntitySlime.java.patch index ae4d1e232..ee7a4b241 100644 --- a/patches/minecraft/net/minecraft/entity/monster/EntitySlime.java.patch +++ b/patches/minecraft/net/minecraft/entity/monster/EntitySlime.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/entity/monster/EntitySlime.java +++ ../src-work/minecraft/net/minecraft/entity/monster/EntitySlime.java -@@ -132,7 +132,7 @@ +@@ -137,7 +137,7 @@ if (this.field_70122_E && !this.field_175452_bi) { int i = this.func_70809_q(); @@ -9,7 +9,7 @@ for (int j = 0; j < i * 8; ++j) { float f = this.field_70146_Z.nextFloat() * ((float)Math.PI * 2F); -@@ -299,7 +299,7 @@ +@@ -304,7 +304,7 @@ BlockPos blockpos = new BlockPos(MathHelper.func_76128_c(this.field_70165_t), 0, MathHelper.func_76128_c(this.field_70161_v)); Chunk chunk = this.field_70170_p.func_175726_f(blockpos); @@ -18,7 +18,7 @@ { return false; } -@@ -365,6 +365,14 @@ +@@ -370,6 +370,14 @@ return this.func_189101_db() ? SoundEvents.field_189110_fE : SoundEvents.field_187882_fq; } diff --git a/patches/minecraft/net/minecraft/entity/monster/EntityZombie.java.patch b/patches/minecraft/net/minecraft/entity/monster/EntityZombie.java.patch index 756b6a37f..995850185 100644 --- a/patches/minecraft/net/minecraft/entity/monster/EntityZombie.java.patch +++ b/patches/minecraft/net/minecraft/entity/monster/EntityZombie.java.patch @@ -1,14 +1,14 @@ --- ../src-base/minecraft/net/minecraft/entity/monster/EntityZombie.java +++ ../src-work/minecraft/net/minecraft/entity/monster/EntityZombie.java -@@ -67,6 +67,7 @@ +@@ -60,6 +60,7 @@ + private static final DataParameter field_184737_bv = EntityDataManager.func_187226_a(EntityZombie.class, DataSerializers.field_187198_h); private static final DataParameter field_184738_bw = EntityDataManager.func_187226_a(EntityZombie.class, DataSerializers.field_187192_b); - private static final DataParameter field_184739_bx = EntityDataManager.func_187226_a(EntityZombie.class, DataSerializers.field_187198_h); private static final DataParameter field_184740_by = EntityDataManager.func_187226_a(EntityZombie.class, DataSerializers.field_187198_h); + private static final DataParameter VILLAGER_TYPE_STR = EntityDataManager.func_187226_a(EntityZombie.class, DataSerializers.field_187194_d); private final EntityAIBreakDoor field_146075_bs = new EntityAIBreakDoor(this); - private int field_82234_d; private boolean field_146076_bu; -@@ -106,7 +107,7 @@ + private float field_146074_bv = -1.0F; +@@ -98,7 +99,7 @@ this.func_110148_a(SharedMonsterAttributes.field_111263_d).func_111128_a(0.23000000417232513D); this.func_110148_a(SharedMonsterAttributes.field_111264_e).func_111128_a(3.0D); this.func_110148_a(SharedMonsterAttributes.field_188791_g).func_111128_a(2.0D); @@ -17,83 +17,15 @@ } protected void func_70088_a() -@@ -114,6 +115,7 @@ +@@ -106,6 +107,7 @@ super.func_70088_a(); this.func_184212_Q().func_187214_a(field_184737_bv, Boolean.valueOf(false)); this.func_184212_Q().func_187214_a(field_184738_bw, Integer.valueOf(0)); + this.func_184212_Q().func_187214_a(VILLAGER_TYPE_STR, ""); - this.func_184212_Q().func_187214_a(field_184739_bx, Boolean.valueOf(false)); this.func_184212_Q().func_187214_a(field_184740_by, Boolean.valueOf(false)); } -@@ -185,6 +187,8 @@ - this.func_146071_k(p_82227_1_); - } -+ @Deprecated //Do not use, Replacement TBD -+ @Nullable - public ZombieType func_189777_di() - { - return ZombieType.func_190146_a(((Integer)this.func_184212_Q().func_187225_a(field_184738_bw)).intValue()); -@@ -192,32 +196,54 @@ - - public boolean func_82231_m() - { -- return this.func_189777_di().func_190154_b(); -+ return getVillagerTypeForge() != null; - } - -- public int func_184736_de() -+ private net.minecraftforge.fml.common.registry.VillagerRegistry.VillagerProfession prof; -+ @Nullable -+ public net.minecraftforge.fml.common.registry.VillagerRegistry.VillagerProfession getVillagerTypeForge() - { -- return this.func_189777_di().func_190148_c(); -+ return this.prof; - } - -+ @Deprecated //Use Forge version below - public void func_189778_a(ZombieType p_189778_1_) - { - this.func_184212_Q().func_187227_b(field_184738_bw, Integer.valueOf(p_189778_1_.func_190150_a())); -+ net.minecraftforge.fml.common.registry.VillagerRegistry.onSetProfession(this, p_189778_1_, p_189778_1_.func_190150_a()); - } - -+ public void setVillagerType(@Nullable net.minecraftforge.fml.common.registry.VillagerRegistry.VillagerProfession type) -+ { -+ this.prof = type; -+ this.func_184212_Q().func_187227_b(VILLAGER_TYPE_STR, type == null ? "" : type.getRegistryName().toString()); -+ net.minecraftforge.fml.common.registry.VillagerRegistry.onSetProfession(this, type); -+ } -+ - public void func_184206_a(DataParameter p_184206_1_) - { - if (field_184737_bv.equals(p_184206_1_)) - { - this.func_146071_k(this.func_70631_g_()); - } -+ else if (field_184738_bw.equals(p_184206_1_)) -+ { -+ net.minecraftforge.fml.common.registry.VillagerRegistry.onSetProfession(this, ZombieType.func_190146_a(this.func_184212_Q().func_187225_a(field_184738_bw)), this.func_184212_Q().func_187225_a(field_184738_bw)); -+ } -+ else if (VILLAGER_TYPE_STR.equals(p_184206_1_)) -+ { -+ String name = this.func_184212_Q().func_187225_a(VILLAGER_TYPE_STR); -+ net.minecraftforge.fml.common.registry.VillagerRegistry.VillagerProfession p = -+ "".equals(name) ? null : net.minecraftforge.fml.common.registry.ForgeRegistries.VILLAGER_PROFESSIONS.getValue(new ResourceLocation(name)); -+ this.setVillagerType(p); -+ } - - super.func_184206_a(p_184206_1_); - } - - public void func_70636_d() - { -- if (this.field_70170_p.func_72935_r() && !this.field_70170_p.field_72995_K && !this.func_70631_g_() && this.func_189777_di().func_190155_e()) -+ if (this.field_70170_p.func_72935_r() && !this.field_70170_p.field_72995_K && !this.func_70631_g_() && (this.func_189777_di() == null || this.func_189777_di().func_190155_e())) - { - float f = this.func_70013_c(1.0F); - BlockPos blockpos = this.func_184187_bx() instanceof EntityBoat ? (new BlockPos(this.field_70165_t, (double)Math.round(this.field_70163_u), this.field_70161_v)).func_177984_a() : new BlockPos(this.field_70165_t, (double)Math.round(this.field_70163_u), this.field_70161_v); -@@ -264,12 +290,24 @@ +@@ -239,12 +241,24 @@ entitylivingbase = (EntityLivingBase)p_70097_1_.func_76346_g(); } @@ -123,7 +55,7 @@ for (int l = 0; l < 50; ++l) { -@@ -277,14 +315,14 @@ +@@ -252,14 +266,14 @@ int j1 = j + MathHelper.func_76136_a(this.field_70146_Z, 7, 40) * MathHelper.func_76136_a(this.field_70146_Z, -1, 1); int k1 = k + MathHelper.func_76136_a(this.field_70146_Z, 7, 40) * MathHelper.func_76136_a(this.field_70146_Z, -1, 1); @@ -140,127 +72,3 @@ entityzombie.func_180482_a(this.field_70170_p.func_175649_E(new BlockPos(entityzombie)), (IEntityLivingData)null); this.func_110148_a(field_110186_bp).func_111121_a(new AttributeModifier("Zombie reinforcement caller charge", -0.05000000074505806D, 0)); entityzombie.func_110148_a(field_110186_bp).func_111121_a(new AttributeModifier("Zombie reinforcement callee charge", -0.05000000074505806D, 0)); -@@ -345,22 +383,25 @@ - - protected SoundEvent func_184639_G() - { -+ if (this.func_189777_di() == null) return SoundEvents.field_187940_hn; - return this.func_189777_di().func_190153_f(); - } - - protected SoundEvent func_184601_bQ() - { -+ if (this.func_189777_di() == null) return SoundEvents.field_187944_hr; - return this.func_189777_di().func_190152_g(); - } - - protected SoundEvent func_184615_bR() - { -+ if (this.func_189777_di() == null) return SoundEvents.field_187943_hq; - return this.func_189777_di().func_190151_h(); - } - - protected void func_180429_a(BlockPos p_180429_1_, Block p_180429_2_) - { -- SoundEvent soundevent = this.func_189777_di().func_190149_i(); -+ SoundEvent soundevent = this.func_189777_di() == null ? SoundEvents.field_187946_ht : this.func_189777_di().func_190149_i(); - this.func_184185_a(soundevent, 0.15F, 1.0F); - } - -@@ -408,7 +449,8 @@ - p_70014_1_.func_74757_a("IsBaby", true); - } - -- p_70014_1_.func_74768_a("ZombieType", this.func_189777_di().func_190150_a()); -+ p_70014_1_.func_74768_a("ZombieType", this.func_184212_Q().func_187225_a(field_184738_bw)); -+ p_70014_1_.func_74778_a("VillagerProfessionName", this.getVillagerTypeForge() == null ? "" : this.getVillagerTypeForge().getRegistryName().toString()); - p_70014_1_.func_74768_a("ConversionTime", this.func_82230_o() ? this.field_82234_d : -1); - p_70014_1_.func_74757_a("CanBreakDoors", this.func_146072_bX()); - } -@@ -426,19 +468,33 @@ - { - if (p_70037_1_.func_150297_b("VillagerProfession", 99)) - { -- this.func_189778_a(ZombieType.func_190146_a(p_70037_1_.func_74762_e("VillagerProfession") + 1)); -+ int id = p_70037_1_.func_74762_e("VillagerProfession") + 1; -+ this.func_184212_Q().func_187227_b(field_184738_bw, id); -+ net.minecraftforge.fml.common.registry.VillagerRegistry.onSetProfession(this, ZombieType.func_190146_a(id), id); - } - else - { -- this.func_189778_a(ZombieType.func_190146_a(this.field_70170_p.field_73012_v.nextInt(5) + 1)); -+ net.minecraftforge.fml.common.registry.VillagerRegistry.setRandomProfession(this, this.field_70170_p.field_73012_v); - } - } - - if (p_70037_1_.func_74764_b("ZombieType")) - { -- this.func_189778_a(ZombieType.func_190146_a(p_70037_1_.func_74762_e("ZombieType"))); -+ int id = p_70037_1_.func_74762_e("ZombieType"); -+ this.func_184212_Q().func_187227_b(field_184738_bw, id); -+ net.minecraftforge.fml.common.registry.VillagerRegistry.onSetProfession(this, ZombieType.func_190146_a(id), id); - } - -+ String name = p_70037_1_.func_74779_i("VillagerProfessionName"); -+ if (!"".equals(name)) -+ { -+ net.minecraftforge.fml.common.registry.VillagerRegistry.VillagerProfession p = -+ net.minecraftforge.fml.common.registry.ForgeRegistries.VILLAGER_PROFESSIONS.getValue(new ResourceLocation(name)); -+ if (p == null) -+ p = net.minecraftforge.fml.common.registry.ForgeRegistries.VILLAGER_PROFESSIONS.getValue(new ResourceLocation("minecraft:farmer")); -+ this.setVillagerType(p); -+ } -+ - if (p_70037_1_.func_150297_b("ConversionTime", 99) && p_70037_1_.func_74762_e("ConversionTime") > -1) - { - this.func_82228_a(p_70037_1_.func_74762_e("ConversionTime")); -@@ -463,7 +519,7 @@ - entityzombie.func_82149_j(p_70074_1_); - this.field_70170_p.func_72900_e(p_70074_1_); - entityzombie.func_180482_a(this.field_70170_p.func_175649_E(new BlockPos(entityzombie)), new EntityZombie.GroupData(false, true)); -- entityzombie.func_189778_a(ZombieType.func_190146_a(entityvillager.func_70946_n() + 1)); -+ entityzombie.setVillagerType(entityvillager.getProfessionForge()); - entityzombie.func_82227_f(p_70074_1_.func_70631_g_()); - entityzombie.func_94061_f(entityvillager.func_175446_cd()); - -@@ -504,7 +560,7 @@ - - if (p_180482_2_ == null) - { -- p_180482_2_ = new EntityZombie.GroupData(this.field_70170_p.field_73012_v.nextFloat() < 0.05F, this.field_70170_p.field_73012_v.nextFloat() < 0.05F); -+ p_180482_2_ = new EntityZombie.GroupData(this.field_70170_p.field_73012_v.nextFloat() < net.minecraftforge.common.ForgeModContainer.zombieBabyChance, this.field_70170_p.field_73012_v.nextFloat() < 0.05F); - } - - if (p_180482_2_ instanceof EntityZombie.GroupData) -@@ -521,7 +577,7 @@ - - if (!flag && entityzombie$groupdata.field_142046_b) - { -- this.func_189778_a(ZombieType.func_190146_a(this.field_70146_Z.nextInt(5) + 1)); -+ net.minecraftforge.fml.common.registry.VillagerRegistry.setRandomProfession(this, this.field_70146_Z); - } - - if (entityzombie$groupdata.field_142048_a) -@@ -655,7 +711,10 @@ - - this.field_70170_p.func_72900_e(this); - entityvillager.func_94061_f(this.func_175446_cd()); -- entityvillager.func_70938_b(this.func_184736_de()); -+ if (this.getVillagerTypeForge() != null) -+ entityvillager.setProfession(this.getVillagerTypeForge()); -+ else -+ entityvillager.func_70938_b(0); - - if (this.func_145818_k_()) - { -@@ -742,7 +801,9 @@ - - public String func_70005_c_() - { -- return this.func_145818_k_() ? this.func_95999_t() : this.func_189777_di().func_190145_d().func_150260_c(); -+ if (this.func_145818_k_()) return this.func_95999_t(); -+ if (this.getVillagerTypeForge() != null) return "entity.Zombie.name"; -+ return this.func_189777_di().func_190145_d().func_150260_c(); - } - - class GroupData implements IEntityLivingData diff --git a/patches/minecraft/net/minecraft/entity/monster/EntityZombieVillager.java.patch b/patches/minecraft/net/minecraft/entity/monster/EntityZombieVillager.java.patch new file mode 100644 index 000000000..5767d3d42 --- /dev/null +++ b/patches/minecraft/net/minecraft/entity/monster/EntityZombieVillager.java.patch @@ -0,0 +1,30 @@ +--- ../src-base/minecraft/net/minecraft/entity/monster/EntityZombieVillager.java ++++ ../src-work/minecraft/net/minecraft/entity/monster/EntityZombieVillager.java +@@ -48,6 +48,7 @@ + public void func_190733_a(int p_190733_1_) + { + this.field_70180_af.func_187227_b(field_190739_c, Integer.valueOf(p_190733_1_)); ++ net.minecraftforge.fml.common.registry.VillagerRegistry.onSetProfession(this, p_190733_1_); + } + + public int func_190736_dl() +@@ -85,6 +86,19 @@ + return super.func_180482_a(p_180482_1_, p_180482_2_); + } + ++ private net.minecraftforge.fml.common.registry.VillagerRegistry.VillagerProfession prof; ++ public void setForgeProfession(net.minecraftforge.fml.common.registry.VillagerRegistry.VillagerProfession prof) ++ { ++ this.prof = prof; ++ net.minecraftforge.fml.common.registry.VillagerRegistry.onSetProfession(this, prof); ++ } ++ ++ public net.minecraftforge.fml.common.registry.VillagerRegistry.VillagerProfession getForgeProfession() ++ { ++ return this.prof; ++ } ++ ++ + public void func_70071_h_() + { + if (!this.field_70170_p.field_72995_K && this.func_82230_o()) diff --git a/patches/minecraft/net/minecraft/entity/monster/ZombieType.java.patch b/patches/minecraft/net/minecraft/entity/monster/ZombieType.java.patch deleted file mode 100644 index 51a22bb12..000000000 --- a/patches/minecraft/net/minecraft/entity/monster/ZombieType.java.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- ../src-base/minecraft/net/minecraft/entity/monster/ZombieType.java -+++ ../src-work/minecraft/net/minecraft/entity/monster/ZombieType.java -@@ -38,8 +38,10 @@ - return this.field_190163_h ? this.func_190150_a() - 1 : 0; - } - -+ @javax.annotation.Nullable - public static ZombieType func_190146_a(int p_190146_0_) - { -+ if (p_190146_0_ < 0 || p_190146_0_ >= values().length) return null; - return values()[p_190146_0_]; - } - diff --git a/patches/minecraft/net/minecraft/entity/passive/EntityHorse.java.patch b/patches/minecraft/net/minecraft/entity/passive/EntityHorse.java.patch index d0ab8c393..7b61ba876 100644 --- a/patches/minecraft/net/minecraft/entity/passive/EntityHorse.java.patch +++ b/patches/minecraft/net/minecraft/entity/passive/EntityHorse.java.patch @@ -1,41 +1,15 @@ --- ../src-base/minecraft/net/minecraft/entity/passive/EntityHorse.java +++ ../src-work/minecraft/net/minecraft/entity/passive/EntityHorse.java -@@ -405,7 +405,7 @@ - - if (iblockstate.func_185904_a() != Material.field_151579_a && !this.func_174814_R()) - { -- SoundType soundtype = block.func_185467_w(); -+ SoundType soundtype = block.getSoundType(iblockstate, field_70170_p, new BlockPos(this.field_70165_t, this.field_70163_u - 0.2D - (double)this.field_70126_B, this.field_70161_v), this); - this.field_70170_p.func_184148_a((EntityPlayer)null, this.field_70165_t, this.field_70163_u, this.field_70161_v, soundtype.func_185844_d(), this.func_184176_by(), soundtype.func_185843_a() * 0.5F, soundtype.func_185847_b() * 0.75F); - } +@@ -85,6 +85,7 @@ } -@@ -441,6 +441,7 @@ - this.field_110296_bG.func_110134_a(this); this.func_110232_cE(); + this.itemHandler = new net.minecraftforge.items.wrapper.InvWrapper(this.field_110296_bG); } - private void func_110232_cE() -@@ -556,7 +557,7 @@ - - protected void func_180429_a(BlockPos p_180429_1_, Block p_180429_2_) - { -- SoundType soundtype = p_180429_2_.func_185467_w(); -+ SoundType soundtype = p_180429_2_.getSoundType(field_70170_p.func_180495_p(p_180429_1_), field_70170_p, p_180429_1_, this); - - if (this.field_70170_p.func_180495_p(p_180429_1_.func_177984_a()).func_177230_c() == Blocks.field_150431_aC) - { -@@ -1212,6 +1213,7 @@ - } - - this.field_110277_bt = 0.0F; -+ net.minecraftforge.common.ForgeHooks.onLivingJump(this); - } - - this.field_70747_aH = this.func_70689_ay() * 0.1F; -@@ -1813,4 +1815,21 @@ - this.field_188477_b = p_i46589_2_; + public void func_110235_q(int p_110235_1_) +@@ -401,4 +402,21 @@ + this.field_190885_a = p_i47337_1_; } } + diff --git a/patches/minecraft/net/minecraft/entity/passive/EntityMooshroom.java.patch b/patches/minecraft/net/minecraft/entity/passive/EntityMooshroom.java.patch index f039e3aff..158bec0ea 100644 --- a/patches/minecraft/net/minecraft/entity/passive/EntityMooshroom.java.patch +++ b/patches/minecraft/net/minecraft/entity/passive/EntityMooshroom.java.patch @@ -9,24 +9,16 @@ { public EntityMooshroom(World p_i1687_1_) { -@@ -30,6 +30,7 @@ - EntityLiving.func_189752_a(p_189791_0_, "MushroomCow"); - } - -+ @SuppressWarnings("unused") - public boolean func_184645_a(EntityPlayer p_184645_1_, EnumHand p_184645_2_, @Nullable ItemStack p_184645_3_) - { - if (p_184645_3_ != null && p_184645_3_.func_77973_b() == Items.field_151054_z && this.func_70874_b() >= 0 && !p_184645_1_.field_71075_bZ.field_75098_d) -@@ -45,7 +46,7 @@ +@@ -49,7 +49,7 @@ return true; } -- else if (p_184645_3_ != null && p_184645_3_.func_77973_b() == Items.field_151097_aZ && this.func_70874_b() >= 0) -+ else if (false && p_184645_3_ != null && p_184645_3_.func_77973_b() == Items.field_151097_aZ && this.func_70874_b() >= 0) //Forge Disable, Moved to onSheared +- else if (itemstack.func_77973_b() == Items.field_151097_aZ && this.func_70874_b() >= 0) ++ else if (false && itemstack.func_77973_b() == Items.field_151097_aZ && this.func_70874_b() >= 0) //Forge Disable, Moved to onSheared { this.func_70106_y(); this.field_70170_p.func_175688_a(EnumParticleTypes.EXPLOSION_LARGE, this.field_70165_t, this.field_70163_u + (double)(this.field_70131_O / 2.0F), this.field_70161_v, 0.0D, 0.0D, 0.0D, new int[0]); -@@ -86,6 +87,35 @@ +@@ -90,6 +90,35 @@ return new EntityMooshroom(this.field_70170_p); } diff --git a/patches/minecraft/net/minecraft/entity/passive/EntityOcelot.java.patch b/patches/minecraft/net/minecraft/entity/passive/EntityOcelot.java.patch index bd828575d..a9b6b1240 100644 --- a/patches/minecraft/net/minecraft/entity/passive/EntityOcelot.java.patch +++ b/patches/minecraft/net/minecraft/entity/passive/EntityOcelot.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/entity/passive/EntityOcelot.java +++ ../src-work/minecraft/net/minecraft/entity/passive/EntityOcelot.java -@@ -297,7 +297,7 @@ +@@ -299,7 +299,7 @@ IBlockState iblockstate = this.field_70170_p.func_180495_p(blockpos.func_177977_b()); Block block = iblockstate.func_177230_c(); diff --git a/patches/minecraft/net/minecraft/entity/passive/EntitySheep.java.patch b/patches/minecraft/net/minecraft/entity/passive/EntitySheep.java.patch index fb8f2a984..0ba6c1606 100644 --- a/patches/minecraft/net/minecraft/entity/passive/EntitySheep.java.patch +++ b/patches/minecraft/net/minecraft/entity/passive/EntitySheep.java.patch @@ -9,18 +9,16 @@ { private static final DataParameter field_184774_bv = EntityDataManager.func_187226_a(EntitySheep.class, DataSerializers.field_187191_a); private final InventoryCrafting field_90016_e = new InventoryCrafting(new Container() -@@ -176,8 +176,10 @@ - } - } - -+ @SuppressWarnings("unused") - public boolean func_184645_a(EntityPlayer p_184645_1_, EnumHand p_184645_2_, @Nullable ItemStack p_184645_3_) +@@ -180,7 +180,7 @@ { -+ if (false) //Forge: Moved to onSheared - if (p_184645_3_ != null && p_184645_3_.func_77973_b() == Items.field_151097_aZ && !this.func_70892_o() && !this.func_70631_g_()) + ItemStack itemstack = p_184645_1_.func_184586_b(p_184645_2_); + +- if (itemstack.func_77973_b() == Items.field_151097_aZ && !this.func_70892_o() && !this.func_70631_g_()) ++ if (false && itemstack.func_77973_b() == Items.field_151097_aZ && !this.func_70892_o() && !this.func_70631_g_()) //Forge: Moved to onSheared { if (!this.field_70170_p.field_72995_K) -@@ -367,4 +369,19 @@ + { +@@ -369,4 +369,19 @@ field_175514_bm.put(EnumDyeColor.RED, new float[] {0.6F, 0.2F, 0.2F}); field_175514_bm.put(EnumDyeColor.BLACK, new float[] {0.1F, 0.1F, 0.1F}); } diff --git a/patches/minecraft/net/minecraft/entity/passive/EntityVillager.java.patch b/patches/minecraft/net/minecraft/entity/passive/EntityVillager.java.patch index 7f68f6342..0fe50da75 100644 --- a/patches/minecraft/net/minecraft/entity/passive/EntityVillager.java.patch +++ b/patches/minecraft/net/minecraft/entity/passive/EntityVillager.java.patch @@ -1,31 +1,22 @@ --- ../src-base/minecraft/net/minecraft/entity/passive/EntityVillager.java +++ ../src-work/minecraft/net/minecraft/entity/passive/EntityVillager.java -@@ -81,6 +81,7 @@ - public class EntityVillager extends EntityAgeable implements IMerchant, INpc +@@ -94,6 +94,7 @@ { + private static final Logger field_190674_bx = LogManager.getLogger(); private static final DataParameter field_184752_bw = EntityDataManager.func_187226_a(EntityVillager.class, DataSerializers.field_187192_b); + private static final DataParameter PROFESSION_STR = EntityDataManager.func_187226_a(EntityVillager.class, DataSerializers.field_187194_d); private int field_70955_e; private boolean field_70952_f; private boolean field_70953_g; -@@ -97,6 +98,7 @@ +@@ -111,6 +112,7 @@ private boolean field_82190_bM; private boolean field_175564_by; private final InventoryBasic field_175560_bz; + @Deprecated //Use VillagerRegistry - private static final EntityVillager.ITradeList[][][][] field_175561_bA = new EntityVillager.ITradeList[][][][] {{{{new EntityVillager.EmeraldForItems(Items.field_151015_O, new EntityVillager.PriceInfo(18, 22)), new EntityVillager.EmeraldForItems(Items.field_151174_bG, new EntityVillager.PriceInfo(15, 19)), new EntityVillager.EmeraldForItems(Items.field_151172_bF, new EntityVillager.PriceInfo(15, 19)), new EntityVillager.ListItemForEmeralds(Items.field_151025_P, new EntityVillager.PriceInfo(-4, -2))}, {new EntityVillager.EmeraldForItems(Item.func_150898_a(Blocks.field_150423_aK), new EntityVillager.PriceInfo(8, 13)), new EntityVillager.ListItemForEmeralds(Items.field_151158_bO, new EntityVillager.PriceInfo(-3, -2))}, {new EntityVillager.EmeraldForItems(Item.func_150898_a(Blocks.field_150440_ba), new EntityVillager.PriceInfo(7, 12)), new EntityVillager.ListItemForEmeralds(Items.field_151034_e, new EntityVillager.PriceInfo(-5, -7))}, {new EntityVillager.ListItemForEmeralds(Items.field_151106_aX, new EntityVillager.PriceInfo(-6, -10)), new EntityVillager.ListItemForEmeralds(Items.field_151105_aU, new EntityVillager.PriceInfo(1, 1))}}, {{new EntityVillager.EmeraldForItems(Items.field_151007_F, new EntityVillager.PriceInfo(15, 20)), new EntityVillager.EmeraldForItems(Items.field_151044_h, new EntityVillager.PriceInfo(16, 24)), new EntityVillager.ItemAndEmeraldToItem(Items.field_151115_aP, new EntityVillager.PriceInfo(6, 6), Items.field_179566_aV, new EntityVillager.PriceInfo(6, 6))}, {new EntityVillager.ListEnchantedItemForEmeralds(Items.field_151112_aM, new EntityVillager.PriceInfo(7, 8))}}, {{new EntityVillager.EmeraldForItems(Item.func_150898_a(Blocks.field_150325_L), new EntityVillager.PriceInfo(16, 22)), new EntityVillager.ListItemForEmeralds(Items.field_151097_aZ, new EntityVillager.PriceInfo(3, 4))}, {new EntityVillager.ListItemForEmeralds(new ItemStack(Item.func_150898_a(Blocks.field_150325_L)), new EntityVillager.PriceInfo(1, 2)), new EntityVillager.ListItemForEmeralds(new ItemStack(Item.func_150898_a(Blocks.field_150325_L), 1, 1), new EntityVillager.PriceInfo(1, 2)), new EntityVillager.ListItemForEmeralds(new ItemStack(Item.func_150898_a(Blocks.field_150325_L), 1, 2), new EntityVillager.PriceInfo(1, 2)), new EntityVillager.ListItemForEmeralds(new ItemStack(Item.func_150898_a(Blocks.field_150325_L), 1, 3), new EntityVillager.PriceInfo(1, 2)), new EntityVillager.ListItemForEmeralds(new ItemStack(Item.func_150898_a(Blocks.field_150325_L), 1, 4), new EntityVillager.PriceInfo(1, 2)), new EntityVillager.ListItemForEmeralds(new ItemStack(Item.func_150898_a(Blocks.field_150325_L), 1, 5), new EntityVillager.PriceInfo(1, 2)), new EntityVillager.ListItemForEmeralds(new ItemStack(Item.func_150898_a(Blocks.field_150325_L), 1, 6), new EntityVillager.PriceInfo(1, 2)), new EntityVillager.ListItemForEmeralds(new ItemStack(Item.func_150898_a(Blocks.field_150325_L), 1, 7), new EntityVillager.PriceInfo(1, 2)), new EntityVillager.ListItemForEmeralds(new ItemStack(Item.func_150898_a(Blocks.field_150325_L), 1, 8), new EntityVillager.PriceInfo(1, 2)), new EntityVillager.ListItemForEmeralds(new ItemStack(Item.func_150898_a(Blocks.field_150325_L), 1, 9), new EntityVillager.PriceInfo(1, 2)), new EntityVillager.ListItemForEmeralds(new ItemStack(Item.func_150898_a(Blocks.field_150325_L), 1, 10), new EntityVillager.PriceInfo(1, 2)), new EntityVillager.ListItemForEmeralds(new ItemStack(Item.func_150898_a(Blocks.field_150325_L), 1, 11), new EntityVillager.PriceInfo(1, 2)), new EntityVillager.ListItemForEmeralds(new ItemStack(Item.func_150898_a(Blocks.field_150325_L), 1, 12), new EntityVillager.PriceInfo(1, 2)), new EntityVillager.ListItemForEmeralds(new ItemStack(Item.func_150898_a(Blocks.field_150325_L), 1, 13), new EntityVillager.PriceInfo(1, 2)), new EntityVillager.ListItemForEmeralds(new ItemStack(Item.func_150898_a(Blocks.field_150325_L), 1, 14), new EntityVillager.PriceInfo(1, 2)), new EntityVillager.ListItemForEmeralds(new ItemStack(Item.func_150898_a(Blocks.field_150325_L), 1, 15), new EntityVillager.PriceInfo(1, 2))}}, {{new EntityVillager.EmeraldForItems(Items.field_151007_F, new EntityVillager.PriceInfo(15, 20)), new EntityVillager.ListItemForEmeralds(Items.field_151032_g, new EntityVillager.PriceInfo(-12, -8))}, {new EntityVillager.ListItemForEmeralds(Items.field_151031_f, new EntityVillager.PriceInfo(2, 3)), new EntityVillager.ItemAndEmeraldToItem(Item.func_150898_a(Blocks.field_150351_n), new EntityVillager.PriceInfo(10, 10), Items.field_151145_ak, new EntityVillager.PriceInfo(6, 10))}}}, {{{new EntityVillager.EmeraldForItems(Items.field_151121_aF, new EntityVillager.PriceInfo(24, 36)), new EntityVillager.ListEnchantedBookForEmeralds()}, {new EntityVillager.EmeraldForItems(Items.field_151122_aG, new EntityVillager.PriceInfo(8, 10)), new EntityVillager.ListItemForEmeralds(Items.field_151111_aL, new EntityVillager.PriceInfo(10, 12)), new EntityVillager.ListItemForEmeralds(Item.func_150898_a(Blocks.field_150342_X), new EntityVillager.PriceInfo(3, 4))}, {new EntityVillager.EmeraldForItems(Items.field_151164_bB, new EntityVillager.PriceInfo(2, 2)), new EntityVillager.ListItemForEmeralds(Items.field_151113_aN, new EntityVillager.PriceInfo(10, 12)), new EntityVillager.ListItemForEmeralds(Item.func_150898_a(Blocks.field_150359_w), new EntityVillager.PriceInfo(-5, -3))}, {new EntityVillager.ListEnchantedBookForEmeralds()}, {new EntityVillager.ListEnchantedBookForEmeralds()}, {new EntityVillager.ListItemForEmeralds(Items.field_151057_cb, new EntityVillager.PriceInfo(20, 22))}}}, {{{new EntityVillager.EmeraldForItems(Items.field_151078_bh, new EntityVillager.PriceInfo(36, 40)), new EntityVillager.EmeraldForItems(Items.field_151043_k, new EntityVillager.PriceInfo(8, 10))}, {new EntityVillager.ListItemForEmeralds(Items.field_151137_ax, new EntityVillager.PriceInfo(-4, -1)), new EntityVillager.ListItemForEmeralds(new ItemStack(Items.field_151100_aR, 1, EnumDyeColor.BLUE.func_176767_b()), new EntityVillager.PriceInfo(-2, -1))}, {new EntityVillager.ListItemForEmeralds(Items.field_151079_bi, new EntityVillager.PriceInfo(4, 7)), new EntityVillager.ListItemForEmeralds(Item.func_150898_a(Blocks.field_150426_aN), new EntityVillager.PriceInfo(-3, -1))}, {new EntityVillager.ListItemForEmeralds(Items.field_151062_by, new EntityVillager.PriceInfo(3, 11))}}}, {{{new EntityVillager.EmeraldForItems(Items.field_151044_h, new EntityVillager.PriceInfo(16, 24)), new EntityVillager.ListItemForEmeralds(Items.field_151028_Y, new EntityVillager.PriceInfo(4, 6))}, {new EntityVillager.EmeraldForItems(Items.field_151042_j, new EntityVillager.PriceInfo(7, 9)), new EntityVillager.ListItemForEmeralds(Items.field_151030_Z, new EntityVillager.PriceInfo(10, 14))}, {new EntityVillager.EmeraldForItems(Items.field_151045_i, new EntityVillager.PriceInfo(3, 4)), new EntityVillager.ListEnchantedItemForEmeralds(Items.field_151163_ad, new EntityVillager.PriceInfo(16, 19))}, {new EntityVillager.ListItemForEmeralds(Items.field_151029_X, new EntityVillager.PriceInfo(5, 7)), new EntityVillager.ListItemForEmeralds(Items.field_151022_W, new EntityVillager.PriceInfo(9, 11)), new EntityVillager.ListItemForEmeralds(Items.field_151020_U, new EntityVillager.PriceInfo(5, 7)), new EntityVillager.ListItemForEmeralds(Items.field_151023_V, new EntityVillager.PriceInfo(11, 15))}}, {{new EntityVillager.EmeraldForItems(Items.field_151044_h, new EntityVillager.PriceInfo(16, 24)), new EntityVillager.ListItemForEmeralds(Items.field_151036_c, new EntityVillager.PriceInfo(6, 8))}, {new EntityVillager.EmeraldForItems(Items.field_151042_j, new EntityVillager.PriceInfo(7, 9)), new EntityVillager.ListEnchantedItemForEmeralds(Items.field_151040_l, new EntityVillager.PriceInfo(9, 10))}, {new EntityVillager.EmeraldForItems(Items.field_151045_i, new EntityVillager.PriceInfo(3, 4)), new EntityVillager.ListEnchantedItemForEmeralds(Items.field_151048_u, new EntityVillager.PriceInfo(12, 15)), new EntityVillager.ListEnchantedItemForEmeralds(Items.field_151056_x, new EntityVillager.PriceInfo(9, 12))}}, {{new EntityVillager.EmeraldForItems(Items.field_151044_h, new EntityVillager.PriceInfo(16, 24)), new EntityVillager.ListEnchantedItemForEmeralds(Items.field_151037_a, new EntityVillager.PriceInfo(5, 7))}, {new EntityVillager.EmeraldForItems(Items.field_151042_j, new EntityVillager.PriceInfo(7, 9)), new EntityVillager.ListEnchantedItemForEmeralds(Items.field_151035_b, new EntityVillager.PriceInfo(9, 11))}, {new EntityVillager.EmeraldForItems(Items.field_151045_i, new EntityVillager.PriceInfo(3, 4)), new EntityVillager.ListEnchantedItemForEmeralds(Items.field_151046_w, new EntityVillager.PriceInfo(12, 15))}}}, {{{new EntityVillager.EmeraldForItems(Items.field_151147_al, new EntityVillager.PriceInfo(14, 18)), new EntityVillager.EmeraldForItems(Items.field_151076_bf, new EntityVillager.PriceInfo(14, 18))}, {new EntityVillager.EmeraldForItems(Items.field_151044_h, new EntityVillager.PriceInfo(16, 24)), new EntityVillager.ListItemForEmeralds(Items.field_151157_am, new EntityVillager.PriceInfo(-7, -5)), new EntityVillager.ListItemForEmeralds(Items.field_151077_bg, new EntityVillager.PriceInfo(-8, -6))}}, {{new EntityVillager.EmeraldForItems(Items.field_151116_aA, new EntityVillager.PriceInfo(9, 12)), new EntityVillager.ListItemForEmeralds(Items.field_151026_S, new EntityVillager.PriceInfo(2, 4))}, {new EntityVillager.ListEnchantedItemForEmeralds(Items.field_151027_R, new EntityVillager.PriceInfo(7, 12))}, {new EntityVillager.ListItemForEmeralds(Items.field_151141_av, new EntityVillager.PriceInfo(8, 10))}}}}; + private static final EntityVillager.ITradeList[][][][] field_175561_bA = new EntityVillager.ITradeList[][][][] {{{{new EntityVillager.EmeraldForItems(Items.field_151015_O, new EntityVillager.PriceInfo(18, 22)), new EntityVillager.EmeraldForItems(Items.field_151174_bG, new EntityVillager.PriceInfo(15, 19)), new EntityVillager.EmeraldForItems(Items.field_151172_bF, new EntityVillager.PriceInfo(15, 19)), new EntityVillager.ListItemForEmeralds(Items.field_151025_P, new EntityVillager.PriceInfo(-4, -2))}, {new EntityVillager.EmeraldForItems(Item.func_150898_a(Blocks.field_150423_aK), new EntityVillager.PriceInfo(8, 13)), new EntityVillager.ListItemForEmeralds(Items.field_151158_bO, new EntityVillager.PriceInfo(-3, -2))}, {new EntityVillager.EmeraldForItems(Item.func_150898_a(Blocks.field_150440_ba), new EntityVillager.PriceInfo(7, 12)), new EntityVillager.ListItemForEmeralds(Items.field_151034_e, new EntityVillager.PriceInfo(-7, -5))}, {new EntityVillager.ListItemForEmeralds(Items.field_151106_aX, new EntityVillager.PriceInfo(-10, -6)), new EntityVillager.ListItemForEmeralds(Items.field_151105_aU, new EntityVillager.PriceInfo(1, 1))}}, {{new EntityVillager.EmeraldForItems(Items.field_151007_F, new EntityVillager.PriceInfo(15, 20)), new EntityVillager.EmeraldForItems(Items.field_151044_h, new EntityVillager.PriceInfo(16, 24)), new EntityVillager.ItemAndEmeraldToItem(Items.field_151115_aP, new EntityVillager.PriceInfo(6, 6), Items.field_179566_aV, new EntityVillager.PriceInfo(6, 6))}, {new EntityVillager.ListEnchantedItemForEmeralds(Items.field_151112_aM, new EntityVillager.PriceInfo(7, 8))}}, {{new EntityVillager.EmeraldForItems(Item.func_150898_a(Blocks.field_150325_L), new EntityVillager.PriceInfo(16, 22)), new EntityVillager.ListItemForEmeralds(Items.field_151097_aZ, new EntityVillager.PriceInfo(3, 4))}, {new EntityVillager.ListItemForEmeralds(new ItemStack(Item.func_150898_a(Blocks.field_150325_L)), new EntityVillager.PriceInfo(1, 2)), new EntityVillager.ListItemForEmeralds(new ItemStack(Item.func_150898_a(Blocks.field_150325_L), 1, 1), new EntityVillager.PriceInfo(1, 2)), new EntityVillager.ListItemForEmeralds(new ItemStack(Item.func_150898_a(Blocks.field_150325_L), 1, 2), new EntityVillager.PriceInfo(1, 2)), new EntityVillager.ListItemForEmeralds(new ItemStack(Item.func_150898_a(Blocks.field_150325_L), 1, 3), new EntityVillager.PriceInfo(1, 2)), new EntityVillager.ListItemForEmeralds(new ItemStack(Item.func_150898_a(Blocks.field_150325_L), 1, 4), new EntityVillager.PriceInfo(1, 2)), new EntityVillager.ListItemForEmeralds(new ItemStack(Item.func_150898_a(Blocks.field_150325_L), 1, 5), new EntityVillager.PriceInfo(1, 2)), new EntityVillager.ListItemForEmeralds(new ItemStack(Item.func_150898_a(Blocks.field_150325_L), 1, 6), new EntityVillager.PriceInfo(1, 2)), new EntityVillager.ListItemForEmeralds(new ItemStack(Item.func_150898_a(Blocks.field_150325_L), 1, 7), new EntityVillager.PriceInfo(1, 2)), new EntityVillager.ListItemForEmeralds(new ItemStack(Item.func_150898_a(Blocks.field_150325_L), 1, 8), new EntityVillager.PriceInfo(1, 2)), new EntityVillager.ListItemForEmeralds(new ItemStack(Item.func_150898_a(Blocks.field_150325_L), 1, 9), new EntityVillager.PriceInfo(1, 2)), new EntityVillager.ListItemForEmeralds(new ItemStack(Item.func_150898_a(Blocks.field_150325_L), 1, 10), new EntityVillager.PriceInfo(1, 2)), new EntityVillager.ListItemForEmeralds(new ItemStack(Item.func_150898_a(Blocks.field_150325_L), 1, 11), new EntityVillager.PriceInfo(1, 2)), new EntityVillager.ListItemForEmeralds(new ItemStack(Item.func_150898_a(Blocks.field_150325_L), 1, 12), new EntityVillager.PriceInfo(1, 2)), new EntityVillager.ListItemForEmeralds(new ItemStack(Item.func_150898_a(Blocks.field_150325_L), 1, 13), new EntityVillager.PriceInfo(1, 2)), new EntityVillager.ListItemForEmeralds(new ItemStack(Item.func_150898_a(Blocks.field_150325_L), 1, 14), new EntityVillager.PriceInfo(1, 2)), new EntityVillager.ListItemForEmeralds(new ItemStack(Item.func_150898_a(Blocks.field_150325_L), 1, 15), new EntityVillager.PriceInfo(1, 2))}}, {{new EntityVillager.EmeraldForItems(Items.field_151007_F, new EntityVillager.PriceInfo(15, 20)), new EntityVillager.ListItemForEmeralds(Items.field_151032_g, new EntityVillager.PriceInfo(-12, -8))}, {new EntityVillager.ListItemForEmeralds(Items.field_151031_f, new EntityVillager.PriceInfo(2, 3)), new EntityVillager.ItemAndEmeraldToItem(Item.func_150898_a(Blocks.field_150351_n), new EntityVillager.PriceInfo(10, 10), Items.field_151145_ak, new EntityVillager.PriceInfo(6, 10))}}}, {{{new EntityVillager.EmeraldForItems(Items.field_151121_aF, new EntityVillager.PriceInfo(24, 36)), new EntityVillager.ListEnchantedBookForEmeralds()}, {new EntityVillager.EmeraldForItems(Items.field_151122_aG, new EntityVillager.PriceInfo(8, 10)), new EntityVillager.ListItemForEmeralds(Items.field_151111_aL, new EntityVillager.PriceInfo(10, 12)), new EntityVillager.ListItemForEmeralds(Item.func_150898_a(Blocks.field_150342_X), new EntityVillager.PriceInfo(3, 4))}, {new EntityVillager.EmeraldForItems(Items.field_151164_bB, new EntityVillager.PriceInfo(2, 2)), new EntityVillager.ListItemForEmeralds(Items.field_151113_aN, new EntityVillager.PriceInfo(10, 12)), new EntityVillager.ListItemForEmeralds(Item.func_150898_a(Blocks.field_150359_w), new EntityVillager.PriceInfo(-5, -3))}, {new EntityVillager.ListEnchantedBookForEmeralds()}, {new EntityVillager.ListEnchantedBookForEmeralds()}, {new EntityVillager.ListItemForEmeralds(Items.field_151057_cb, new EntityVillager.PriceInfo(20, 22))}}, {{new EntityVillager.EmeraldForItems(Items.field_151121_aF, new EntityVillager.PriceInfo(24, 36))}, {new EntityVillager.EmeraldForItems(Items.field_151111_aL, new EntityVillager.PriceInfo(1, 1))}, {new EntityVillager.ListItemForEmeralds(Items.field_151148_bJ, new EntityVillager.PriceInfo(7, 11))}, {new EntityVillager.TreasureMapForEmeralds(new EntityVillager.PriceInfo(12, 20), "Monument", MapDecoration.Type.MONUMENT), new EntityVillager.TreasureMapForEmeralds(new EntityVillager.PriceInfo(16, 28), "Mansion", MapDecoration.Type.MANSION)}}}, {{{new EntityVillager.EmeraldForItems(Items.field_151078_bh, new EntityVillager.PriceInfo(36, 40)), new EntityVillager.EmeraldForItems(Items.field_151043_k, new EntityVillager.PriceInfo(8, 10))}, {new EntityVillager.ListItemForEmeralds(Items.field_151137_ax, new EntityVillager.PriceInfo(-4, -1)), new EntityVillager.ListItemForEmeralds(new ItemStack(Items.field_151100_aR, 1, EnumDyeColor.BLUE.func_176767_b()), new EntityVillager.PriceInfo(-2, -1))}, {new EntityVillager.ListItemForEmeralds(Items.field_151079_bi, new EntityVillager.PriceInfo(4, 7)), new EntityVillager.ListItemForEmeralds(Item.func_150898_a(Blocks.field_150426_aN), new EntityVillager.PriceInfo(-3, -1))}, {new EntityVillager.ListItemForEmeralds(Items.field_151062_by, new EntityVillager.PriceInfo(3, 11))}}}, {{{new EntityVillager.EmeraldForItems(Items.field_151044_h, new EntityVillager.PriceInfo(16, 24)), new EntityVillager.ListItemForEmeralds(Items.field_151028_Y, new EntityVillager.PriceInfo(4, 6))}, {new EntityVillager.EmeraldForItems(Items.field_151042_j, new EntityVillager.PriceInfo(7, 9)), new EntityVillager.ListItemForEmeralds(Items.field_151030_Z, new EntityVillager.PriceInfo(10, 14))}, {new EntityVillager.EmeraldForItems(Items.field_151045_i, new EntityVillager.PriceInfo(3, 4)), new EntityVillager.ListEnchantedItemForEmeralds(Items.field_151163_ad, new EntityVillager.PriceInfo(16, 19))}, {new EntityVillager.ListItemForEmeralds(Items.field_151029_X, new EntityVillager.PriceInfo(5, 7)), new EntityVillager.ListItemForEmeralds(Items.field_151022_W, new EntityVillager.PriceInfo(9, 11)), new EntityVillager.ListItemForEmeralds(Items.field_151020_U, new EntityVillager.PriceInfo(5, 7)), new EntityVillager.ListItemForEmeralds(Items.field_151023_V, new EntityVillager.PriceInfo(11, 15))}}, {{new EntityVillager.EmeraldForItems(Items.field_151044_h, new EntityVillager.PriceInfo(16, 24)), new EntityVillager.ListItemForEmeralds(Items.field_151036_c, new EntityVillager.PriceInfo(6, 8))}, {new EntityVillager.EmeraldForItems(Items.field_151042_j, new EntityVillager.PriceInfo(7, 9)), new EntityVillager.ListEnchantedItemForEmeralds(Items.field_151040_l, new EntityVillager.PriceInfo(9, 10))}, {new EntityVillager.EmeraldForItems(Items.field_151045_i, new EntityVillager.PriceInfo(3, 4)), new EntityVillager.ListEnchantedItemForEmeralds(Items.field_151048_u, new EntityVillager.PriceInfo(12, 15)), new EntityVillager.ListEnchantedItemForEmeralds(Items.field_151056_x, new EntityVillager.PriceInfo(9, 12))}}, {{new EntityVillager.EmeraldForItems(Items.field_151044_h, new EntityVillager.PriceInfo(16, 24)), new EntityVillager.ListEnchantedItemForEmeralds(Items.field_151037_a, new EntityVillager.PriceInfo(5, 7))}, {new EntityVillager.EmeraldForItems(Items.field_151042_j, new EntityVillager.PriceInfo(7, 9)), new EntityVillager.ListEnchantedItemForEmeralds(Items.field_151035_b, new EntityVillager.PriceInfo(9, 11))}, {new EntityVillager.EmeraldForItems(Items.field_151045_i, new EntityVillager.PriceInfo(3, 4)), new EntityVillager.ListEnchantedItemForEmeralds(Items.field_151046_w, new EntityVillager.PriceInfo(12, 15))}}}, {{{new EntityVillager.EmeraldForItems(Items.field_151147_al, new EntityVillager.PriceInfo(14, 18)), new EntityVillager.EmeraldForItems(Items.field_151076_bf, new EntityVillager.PriceInfo(14, 18))}, {new EntityVillager.EmeraldForItems(Items.field_151044_h, new EntityVillager.PriceInfo(16, 24)), new EntityVillager.ListItemForEmeralds(Items.field_151157_am, new EntityVillager.PriceInfo(-7, -5)), new EntityVillager.ListItemForEmeralds(Items.field_151077_bg, new EntityVillager.PriceInfo(-8, -6))}}, {{new EntityVillager.EmeraldForItems(Items.field_151116_aA, new EntityVillager.PriceInfo(9, 12)), new EntityVillager.ListItemForEmeralds(Items.field_151026_S, new EntityVillager.PriceInfo(2, 4))}, {new EntityVillager.ListEnchantedItemForEmeralds(Items.field_151027_R, new EntityVillager.PriceInfo(7, 12))}, {new EntityVillager.ListItemForEmeralds(Items.field_151141_av, new EntityVillager.PriceInfo(8, 10))}}}, {new EntityVillager.ITradeList[0][]}}; public EntityVillager(World p_i1747_1_) -@@ -228,7 +230,7 @@ - { - boolean flag = p_184645_3_ != null && p_184645_3_.func_77973_b() == Items.field_151063_bx; - -- if (!flag && this.func_70089_S() && !this.func_70940_q() && !this.func_70631_g_()) -+ if (!flag && this.func_70089_S() && !this.func_70940_q() && !this.func_70631_g_() && !p_184645_1_.func_70093_af()) - { - if (!this.field_70170_p.field_72995_K && (this.field_70963_i == null || !this.field_70963_i.isEmpty())) - { -@@ -249,6 +251,7 @@ +@@ -285,6 +287,7 @@ { super.func_70088_a(); this.field_70180_af.func_187214_a(field_184752_bw, Integer.valueOf(0)); @@ -33,7 +24,7 @@ } public static void func_189785_b(DataFixer p_189785_0_) -@@ -287,6 +290,7 @@ +@@ -323,6 +326,7 @@ { super.func_70014_b(p_70014_1_); p_70014_1_.func_74768_a("Profession", this.func_70946_n()); @@ -41,7 +32,7 @@ p_70014_1_.func_74768_a("Riches", this.field_70956_bz); p_70014_1_.func_74768_a("Career", this.field_175563_bv); p_70014_1_.func_74768_a("CareerLevel", this.field_175562_bw); -@@ -316,6 +320,14 @@ +@@ -352,6 +356,14 @@ { super.func_70037_a(p_70037_1_); this.func_70938_b(p_70037_1_.func_74762_e("Profession")); @@ -56,7 +47,7 @@ this.field_70956_bz = p_70037_1_.func_74762_e("Riches"); this.field_175563_bv = p_70037_1_.func_74762_e("Career"); this.field_175562_bw = p_70037_1_.func_74762_e("CareerLevel"); -@@ -366,13 +378,52 @@ +@@ -408,13 +420,52 @@ public void func_70938_b(int p_70938_1_) { this.field_70180_af.func_187227_b(field_184752_bw, Integer.valueOf(p_70938_1_)); @@ -66,7 +57,7 @@ + @Deprecated //Use Forge Variant below public int func_70946_n() { - return Math.max(((Integer)this.field_70180_af.func_187225_a(field_184752_bw)).intValue() % 5, 0); + return Math.max(((Integer)this.field_70180_af.func_187225_a(field_184752_bw)).intValue() % 6, 0); } + private net.minecraftforge.fml.common.registry.VillagerRegistry.VillagerProfession prof; @@ -109,7 +100,7 @@ public boolean func_70941_o() { return this.field_70952_f; -@@ -572,15 +623,13 @@ +@@ -607,15 +658,13 @@ private void func_175554_cu() { @@ -126,38 +117,42 @@ this.field_175562_bw = 1; } -@@ -591,13 +640,11 @@ +@@ -626,19 +675,13 @@ int i = this.field_175563_bv - 1; int j = this.field_175562_bw - 1; -- EntityVillager.ITradeList[][] aentityvillager$itradelist1 = aentityvillager$itradelist[i]; + java.util.List trades = this.getProfessionForge().getCareer(i).getTrades(j); -- if (j >= 0 && j < aentityvillager$itradelist1.length) +- if (i >= 0 && i < aentityvillager$itradelist.length) + if (trades != null) { -- EntityVillager.ITradeList[] aentityvillager$itradelist2 = aentityvillager$itradelist1[j]; +- EntityVillager.ITradeList[][] aentityvillager$itradelist1 = aentityvillager$itradelist[i]; - -- for (EntityVillager.ITradeList entityvillager$itradelist : aentityvillager$itradelist2) +- if (j >= 0 && j < aentityvillager$itradelist1.length) + for (EntityVillager.ITradeList entityvillager$itradelist : trades) { - entityvillager$itradelist.func_179401_a(this.field_70963_i, this.field_70146_Z); +- EntityVillager.ITradeList[] aentityvillager$itradelist2 = aentityvillager$itradelist1[j]; +- +- for (EntityVillager.ITradeList entityvillager$itradelist : aentityvillager$itradelist2) +- { +- entityvillager$itradelist.func_190888_a(this, this.field_70963_i, this.field_70146_Z); +- } ++ entityvillager$itradelist.func_190888_a(this, this.field_70963_i, this.field_70146_Z); } -@@ -686,9 +733,9 @@ - } + } + } +@@ -748,7 +791,7 @@ + s1 = "nitwit"; } - if (s1 != null) + s1 = "entity.Villager." + this.getProfessionForge().getCareer(this.field_175563_bv-1).getName(); { -- TextComponentTranslation textcomponenttranslation = new TextComponentTranslation("entity.Villager." + s1, new Object[0]); -+ TextComponentTranslation textcomponenttranslation = new TextComponentTranslation(s1, new Object[0]); - textcomponenttranslation.func_150256_b().func_150209_a(this.func_174823_aP()); - textcomponenttranslation.func_150256_b().func_179989_a(this.func_189512_bd()); + ITextComponent itextcomponent = new TextComponentTranslation("entity.Villager." + s1, new Object[0]); + itextcomponent.func_150256_b().func_150209_a(this.func_174823_aP()); +@@ -761,10 +804,6 @@ -@@ -699,10 +746,6 @@ - - return textcomponenttranslation; + return itextcomponent; } - else - { @@ -166,19 +161,21 @@ } } -@@ -748,7 +791,7 @@ - public IEntityLivingData func_180482_a(DifficultyInstance p_180482_1_, @Nullable IEntityLivingData p_180482_2_) - { - p_180482_2_ = super.func_180482_a(p_180482_1_, p_180482_2_); -- this.func_70938_b(this.field_70170_p.field_73012_v.nextInt(5)); -+ net.minecraftforge.fml.common.registry.VillagerRegistry.setRandomProfession(this, this.field_70170_p.field_73012_v); +@@ -818,7 +857,7 @@ + + if (p_190672_3_) + { +- this.func_70938_b(this.field_70170_p.field_73012_v.nextInt(6)); ++ net.minecraftforge.fml.common.registry.VillagerRegistry.setRandomProfession(this, this.field_70170_p.field_73012_v); + } + this.func_175552_ct(); - return p_180482_2_; - } -@@ -1068,4 +1111,6 @@ - return ((Integer)this.func_76341_a()).intValue() >= ((Integer)this.func_76340_b()).intValue() ? ((Integer)this.func_76341_a()).intValue() : ((Integer)this.func_76341_a()).intValue() + p_179412_1_.nextInt(((Integer)this.func_76340_b()).intValue() - ((Integer)this.func_76341_a()).intValue() + 1); +@@ -1071,6 +1110,8 @@ + p_190888_2_.add(new MerchantRecipe(itemstack, itemstack1)); } } + //MODDERS DO NOT USE OR EDIT THIS IN ANY WAY IT WILL HAVE NO EFFECT, THIS IS JUST IN HERE TO ALLOW FORGE TO ACCESS IT + public static ITradeList[][][][] GET_TRADES_DONT_USE(){ return field_175561_bA; } - } + + public static class ListItemForEmeralds implements EntityVillager.ITradeList + { diff --git a/patches/minecraft/net/minecraft/entity/player/EntityPlayer.java.patch b/patches/minecraft/net/minecraft/entity/player/EntityPlayer.java.patch index f9bb19ccc..e1f0f4a8c 100644 --- a/patches/minecraft/net/minecraft/entity/player/EntityPlayer.java.patch +++ b/patches/minecraft/net/minecraft/entity/player/EntityPlayer.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/entity/player/EntityPlayer.java +++ ../src-work/minecraft/net/minecraft/entity/player/EntityPlayer.java -@@ -99,6 +99,11 @@ +@@ -98,6 +98,11 @@ @SuppressWarnings("incomplete-switch") public abstract class EntityPlayer extends EntityLivingBase { @@ -12,7 +12,7 @@ private static final DataParameter field_184829_a = EntityDataManager.func_187226_a(EntityPlayer.class, DataSerializers.field_187193_c); private static final DataParameter field_184830_b = EntityDataManager.func_187226_a(EntityPlayer.class, DataSerializers.field_187192_b); protected static final DataParameter field_184827_bp = EntityDataManager.func_187226_a(EntityPlayer.class, DataSerializers.field_187191_a); -@@ -181,6 +186,7 @@ +@@ -180,6 +185,7 @@ public void func_70071_h_() { @@ -20,7 +20,7 @@ this.field_70145_X = this.func_175149_v(); if (this.func_175149_v()) -@@ -373,6 +379,7 @@ +@@ -372,6 +378,7 @@ this.func_70105_a(f, f1); } } @@ -28,7 +28,7 @@ } public int func_82145_z() -@@ -455,11 +462,11 @@ +@@ -459,11 +466,11 @@ this.field_71109_bG = 0.0F; this.func_71015_k(this.field_70165_t - d0, this.field_70163_u - d1, this.field_70161_v - d2); @@ -42,7 +42,7 @@ } } } -@@ -589,11 +596,15 @@ +@@ -593,11 +600,15 @@ public void func_70645_a(DamageSource p_70645_1_) { @@ -58,11 +58,7 @@ if ("Notch".equals(this.func_70005_c_())) { this.func_146097_a(new ItemStack(Items.field_151034_e, 1), true, false); -@@ -601,9 +612,13 @@ - - if (!this.field_70170_p.func_82736_K().func_82766_b("keepInventory") && !this.func_175149_v()) - { -+ this.func_71053_j(); //Force the screen closed before droping inventory, this will cause the held item to drop and 'bag' items to finalize. +@@ -609,6 +620,9 @@ this.field_71071_by.func_70436_m(); } @@ -72,37 +68,35 @@ if (p_70645_1_ != null) { this.field_70159_w = (double)(-MathHelper.func_76134_b((this.field_70739_aP + this.field_70177_z) * 0.017453292F) * 0.1F); -@@ -692,13 +707,26 @@ +@@ -712,13 +726,24 @@ @Nullable public EntityItem func_71040_bB(boolean p_71040_1_) { -- return this.func_146097_a(this.field_71071_by.func_70298_a(this.field_71071_by.field_70461_c, p_71040_1_ && this.field_71071_by.func_70448_g() != null ? this.field_71071_by.func_70448_g().field_77994_a : 1), false, true); +- return this.func_146097_a(this.field_71071_by.func_70298_a(this.field_71071_by.field_70461_c, p_71040_1_ && !this.field_71071_by.func_70448_g().func_190926_b() ? this.field_71071_by.func_70448_g().func_190916_E() : 1), false, true); + ItemStack stack = field_71071_by.func_70448_g(); + -+ if (stack == null) ++ if (stack.func_190926_b()) + { + return null; + } -+ + if (stack.func_77973_b().onDroppedByPlayer(stack, this)) + { -+ int count = p_71040_1_ && this.field_71071_by.func_70448_g() != null ? this.field_71071_by.func_70448_g().field_77994_a : 1; ++ int count = p_71040_1_ ? this.field_71071_by.func_70448_g().func_190916_E() : 1; + return net.minecraftforge.common.ForgeHooks.onPlayerTossEvent(this, field_71071_by.func_70298_a(field_71071_by.field_70461_c, count), true); + } -+ + return null; } @Nullable - public EntityItem func_71019_a(@Nullable ItemStack p_71019_1_, boolean p_71019_2_) + public EntityItem func_71019_a(ItemStack p_71019_1_, boolean p_71019_2_) { -- return this.func_146097_a(p_71019_1_, false, false); +- return this.func_146097_a(p_71019_1_, false, p_71019_2_); + return net.minecraftforge.common.ForgeHooks.onPlayerTossEvent(this, p_71019_1_, false); } @Nullable -@@ -763,14 +791,22 @@ - @Nullable +@@ -778,14 +803,22 @@ + public ItemStack func_184816_a(EntityItem p_184816_1_) { + if (captureDrops) capturedDrops.add(p_184816_1_); @@ -125,7 +119,7 @@ if (f > 1.0F) { int i = EnchantmentHelper.func_185293_e(this); -@@ -820,12 +856,13 @@ +@@ -835,12 +868,13 @@ f /= 5.0F; } @@ -141,7 +135,7 @@ } public static void func_189806_a(DataFixer p_189806_0_) -@@ -874,6 +911,16 @@ +@@ -889,6 +923,16 @@ this.field_82248_d = p_70037_1_.func_74767_n("SpawnForced"); } @@ -158,7 +152,7 @@ this.field_71100_bB.func_75112_a(p_70037_1_); this.field_71075_bZ.func_75095_b(p_70037_1_); -@@ -906,6 +953,23 @@ +@@ -921,6 +965,23 @@ p_70014_1_.func_74757_a("SpawnForced", this.field_82248_d); } @@ -182,7 +176,7 @@ this.field_71100_bB.func_75117_b(p_70014_1_); this.field_71075_bZ.func_75091_a(p_70014_1_); p_70014_1_.func_74782_a("EnderItems", this.field_71078_a.func_70487_g()); -@@ -913,6 +977,7 @@ +@@ -928,6 +989,7 @@ public boolean func_70097_a(DamageSource p_70097_1_, float p_70097_2_) { @@ -190,15 +184,15 @@ if (this.func_180431_b(p_70097_1_)) { return false; -@@ -981,6 +1046,7 @@ - if (this.field_184627_bm.field_77994_a <= 0) +@@ -1006,6 +1068,7 @@ + if (this.field_184627_bm.func_190926_b()) { EnumHand enumhand = this.func_184600_cs(); + net.minecraftforge.event.ForgeEventFactory.onPlayerDestroyItem(this, this.field_184627_bm, enumhand); if (enumhand == EnumHand.MAIN_HAND) { -@@ -1016,7 +1082,10 @@ +@@ -1041,7 +1104,10 @@ { if (!this.func_180431_b(p_70665_1_)) { @@ -210,31 +204,35 @@ p_70665_2_ = this.func_70672_c(p_70665_1_, p_70665_2_); float f = p_70665_2_; p_70665_2_ = Math.max(p_70665_2_ - this.func_110139_bj(), 0.0F); -@@ -1086,6 +1155,7 @@ +@@ -1111,6 +1177,7 @@ } else { -+ if (net.minecraftforge.common.ForgeHooks.onInteractEntity(this, p_184822_1_, p_184822_2_, p_184822_3_)) return EnumActionResult.PASS; - ItemStack itemstack = p_184822_2_ != null ? p_184822_2_.func_77946_l() : null; ++ if (net.minecraftforge.common.ForgeHooks.onInteractEntity(this, p_190775_1_, p_190775_2_)) return EnumActionResult.PASS; + ItemStack itemstack = this.func_184586_b(p_190775_2_); + ItemStack itemstack1 = itemstack.func_190926_b() ? ItemStack.field_190927_a : itemstack.func_77946_l(); - if (!p_184822_1_.func_184230_a(this, p_184822_2_, p_184822_3_)) -@@ -1101,6 +1171,7 @@ +@@ -1120,7 +1187,10 @@ + { + itemstack.func_190920_e(itemstack1.func_190916_E()); + } +- ++ if (!this.field_71075_bZ.field_75098_d && itemstack.func_190926_b()) ++ { ++ net.minecraftforge.event.ForgeEventFactory.onPlayerDestroyItem(this, itemstack1, p_190775_2_); ++ } + return EnumActionResult.SUCCESS; + } + else +@@ -1136,6 +1206,7 @@ { - if (p_184822_2_.field_77994_a <= 0 && !this.field_71075_bZ.field_75098_d) + if (itemstack.func_190926_b() && !this.field_71075_bZ.field_75098_d) { -+ net.minecraftforge.event.ForgeEventFactory.onPlayerDestroyItem(this, p_184822_2_, p_184822_3_); - this.func_184611_a(p_184822_3_, (ItemStack)null); ++ net.minecraftforge.event.ForgeEventFactory.onPlayerDestroyItem(this, itemstack1, p_190775_2_); + this.func_184611_a(p_190775_2_, ItemStack.field_190927_a); } -@@ -1116,6 +1187,7 @@ - { - if (p_184822_2_.field_77994_a <= 0 && !this.field_71075_bZ.field_75098_d) - { -+ net.minecraftforge.event.ForgeEventFactory.onPlayerDestroyItem(this, p_184822_2_, p_184822_3_); - this.func_184611_a(p_184822_3_, (ItemStack)null); - } - else if (p_184822_2_.field_77994_a < itemstack.field_77994_a && this.field_71075_bZ.field_75098_d) -@@ -1142,6 +1214,7 @@ +@@ -1161,6 +1232,7 @@ public void func_71059_n(Entity p_71059_1_) { @@ -242,38 +240,42 @@ if (p_71059_1_.func_70075_an()) { if (!p_71059_1_.func_85031_j(this)) -@@ -1340,6 +1413,7 @@ - if (itemstack1.field_77994_a <= 0) +@@ -1331,11 +1403,13 @@ + + if (!itemstack1.func_190926_b() && entity instanceof EntityLivingBase) + { ++ ItemStack beforeHitCopy = itemstack1.func_77946_l(); + itemstack1.func_77961_a((EntityLivingBase)entity, this); + + if (itemstack1.func_190926_b()) { - this.func_184611_a(EnumHand.MAIN_HAND, (ItemStack)null); -+ net.minecraftforge.event.ForgeEventFactory.onPlayerDestroyItem(this, itemstack1, EnumHand.MAIN_HAND); + this.func_184611_a(EnumHand.MAIN_HAND, ItemStack.field_190927_a); ++ net.minecraftforge.event.ForgeEventFactory.onPlayerDestroyItem(this, beforeHitCopy, EnumHand.MAIN_HAND); } } -@@ -1428,6 +1502,8 @@ +@@ -1441,6 +1515,8 @@ public EntityPlayer.SleepResult func_180469_a(BlockPos p_180469_1_) { + EntityPlayer.SleepResult ret = net.minecraftforge.event.ForgeEventFactory.onPlayerSleepInBed(this, p_180469_1_); + if (ret != null) return ret; + EnumFacing enumfacing = (EnumFacing)this.field_70170_p.func_180495_p(p_180469_1_).func_177229_b(BlockHorizontal.field_185512_D); + if (!this.field_70170_p.field_72995_K) - { - if (this.func_70608_bn() || !this.func_70089_S()) -@@ -1467,9 +1543,10 @@ +@@ -1482,8 +1558,9 @@ this.func_70105_a(0.2F, 0.2F); - if (this.field_70170_p.func_175667_e(p_180469_1_)) - { -- EnumFacing enumfacing = (EnumFacing)this.field_70170_p.func_180495_p(p_180469_1_).func_177229_b(BlockHorizontal.field_185512_D); + IBlockState state = null; + if (this.field_70170_p.func_175667_e(p_180469_1_)) state = this.field_70170_p.func_180495_p(p_180469_1_); + if (state != null && state.func_177230_c().isBed(state, this.field_70170_p, p_180469_1_, this)) { -+ EnumFacing enumfacing = state.func_177230_c().getBedDirection(state, this.field_70170_p, p_180469_1_); - float f = 0.5F; - float f1 = 0.5F; - -@@ -1534,13 +1611,14 @@ + float f1 = 0.5F + (float)enumfacing.func_82601_c() * 0.4F; + float f = 0.5F + (float)enumfacing.func_82599_e() * 0.4F; + this.func_175139_a(enumfacing); +@@ -1530,13 +1607,14 @@ public void func_70999_a(boolean p_70999_1_, boolean p_70999_2_, boolean p_70999_3_) { @@ -291,7 +293,7 @@ if (blockpos == null) { -@@ -1549,6 +1627,10 @@ +@@ -1545,6 +1623,10 @@ this.func_70107_b((double)((float)blockpos.func_177958_n() + 0.5F), (double)((float)blockpos.func_177956_o() + 0.1F), (double)((float)blockpos.func_177952_p() + 0.5F)); } @@ -302,7 +304,7 @@ this.field_71083_bS = false; -@@ -1567,15 +1649,16 @@ +@@ -1563,15 +1645,16 @@ private boolean func_175143_p() { @@ -322,7 +324,7 @@ { if (!p_180467_2_) { -@@ -1590,16 +1673,17 @@ +@@ -1586,16 +1669,17 @@ } else { @@ -343,7 +345,7 @@ switch (enumfacing) { -@@ -1639,16 +1723,24 @@ +@@ -1635,16 +1719,24 @@ public BlockPos func_180470_cg() { @@ -370,7 +372,7 @@ if (p_180473_1_ != null) { this.field_71077_c = p_180473_1_; -@@ -1843,6 +1935,10 @@ +@@ -1839,6 +1931,10 @@ super.func_180430_e(p_180430_1_, p_180430_2_); } @@ -381,7 +383,7 @@ } protected void func_71061_d_() -@@ -2043,6 +2139,18 @@ +@@ -2039,6 +2135,18 @@ this.field_175152_f = p_71049_1_.field_175152_f; this.field_71078_a = p_71049_1_.field_71078_a; this.func_184212_Q().func_187227_b(field_184827_bp, p_71049_1_.func_184212_Q().func_187225_a(field_184827_bp)); @@ -400,7 +402,7 @@ } protected boolean func_70041_e_() -@@ -2142,7 +2250,10 @@ +@@ -2137,7 +2245,10 @@ public ITextComponent func_145748_c_() { @@ -412,7 +414,7 @@ itextcomponent.func_150256_b().func_150241_a(new ClickEvent(ClickEvent.Action.SUGGEST_COMMAND, "/msg " + this.func_70005_c_() + " ")); itextcomponent.func_150256_b().func_150209_a(this.func_174823_aP()); itextcomponent.func_150256_b().func_179989_a(this.func_70005_c_()); -@@ -2151,7 +2262,7 @@ +@@ -2146,7 +2257,7 @@ public float func_70047_e() { @@ -421,7 +423,7 @@ if (this.func_70608_bn()) { -@@ -2367,6 +2478,161 @@ +@@ -2362,6 +2473,161 @@ return this.field_71075_bZ.field_75098_d && this.func_70003_b(2, ""); } diff --git a/patches/minecraft/net/minecraft/entity/player/EntityPlayerMP.java.patch b/patches/minecraft/net/minecraft/entity/player/EntityPlayerMP.java.patch index 3da6a132d..ca50f9ad1 100644 --- a/patches/minecraft/net/minecraft/entity/player/EntityPlayerMP.java.patch +++ b/patches/minecraft/net/minecraft/entity/player/EntityPlayerMP.java.patch @@ -1,24 +1,18 @@ --- ../src-base/minecraft/net/minecraft/entity/player/EntityPlayerMP.java +++ ../src-work/minecraft/net/minecraft/entity/player/EntityPlayerMP.java -@@ -136,14 +136,15 @@ - public int field_71138_i; - public boolean field_71136_j; - -+ @SuppressWarnings("unused") - public EntityPlayerMP(MinecraftServer p_i45285_1_, WorldServer p_i45285_2_, GameProfile p_i45285_3_, PlayerInteractionManager p_i45285_4_) - { +@@ -142,9 +142,9 @@ super(p_i45285_2_, p_i45285_3_); p_i45285_4_.field_73090_b = this; this.field_71134_c = p_i45285_4_; - BlockPos blockpos = p_i45285_2_.func_175694_M(); + BlockPos blockpos = p_i45285_2_.field_73011_w.getRandomizedSpawnPoint(); -- if (!p_i45285_2_.field_73011_w.func_177495_o() && p_i45285_2_.func_72912_H().func_76077_q() != GameType.ADVENTURE) -+ if (false && !p_i45285_2_.field_73011_w.func_177495_o() && p_i45285_2_.func_72912_H().func_76077_q() != GameType.ADVENTURE) +- if (p_i45285_2_.field_73011_w.func_191066_m() && p_i45285_2_.func_72912_H().func_76077_q() != GameType.ADVENTURE) ++ if (false && p_i45285_2_.field_73011_w.func_191066_m() && p_i45285_2_.func_72912_H().func_76077_q() != GameType.ADVENTURE) { int i = Math.max(0, p_i45285_1_.func_184108_a(p_i45285_2_)); int j = MathHelper.func_76128_c(p_i45285_2_.func_175723_af().func_177729_b((double)blockpos.func_177958_n(), (double)blockpos.func_177952_p())); -@@ -252,7 +253,7 @@ +@@ -253,7 +253,7 @@ this.field_71070_bA.func_75142_b(); @@ -27,7 +21,7 @@ { this.func_71053_j(); this.field_71070_bA = this.field_71069_bz; -@@ -435,6 +436,7 @@ +@@ -436,6 +436,7 @@ public void func_70645_a(DamageSource p_70645_1_) { @@ -35,13 +29,13 @@ boolean flag = this.field_70170_p.func_82736_K().func_82766_b("showDeathMessages"); this.field_71135_a.func_147359_a(new SPacketCombatEvent(this.func_110142_aN(), SPacketCombatEvent.Event.ENTITY_DIED, flag)); -@@ -461,7 +463,20 @@ +@@ -462,8 +463,20 @@ if (!this.field_70170_p.func_82736_K().func_82766_b("keepInventory") && !this.func_175149_v()) { + captureDrops = true; + capturedDrops.clear(); -+ + this.func_190776_cN(); this.field_71071_by.func_70436_m(); + + captureDrops = false; @@ -56,7 +50,7 @@ } for (ScoreObjective scoreobjective : this.field_70170_p.func_96441_U().func_96520_a(IScoreCriteria.field_96642_c)) -@@ -543,6 +558,7 @@ +@@ -547,6 +560,7 @@ @Nullable public Entity func_184204_a(int p_184204_1_) { @@ -64,7 +58,7 @@ this.field_184851_cj = true; if (this.field_71093_bK == 1 && p_184204_1_ == 1) -@@ -700,7 +716,7 @@ +@@ -704,7 +718,7 @@ BlockPos blockpos = new BlockPos(i, j, k); IBlockState iblockstate = this.field_70170_p.func_180495_p(blockpos); @@ -73,7 +67,7 @@ { BlockPos blockpos1 = blockpos.func_177977_b(); IBlockState iblockstate1 = this.field_70170_p.func_180495_p(blockpos1); -@@ -740,6 +756,7 @@ +@@ -744,6 +758,7 @@ this.field_71070_bA = p_180468_1_.func_174876_a(this.field_71071_by, this); this.field_71070_bA.field_75152_c = this.field_71139_cq; this.field_71070_bA.func_75132_a(this); @@ -81,7 +75,7 @@ } } -@@ -783,6 +800,7 @@ +@@ -787,6 +802,7 @@ this.field_71070_bA.field_75152_c = this.field_71139_cq; this.field_71070_bA.func_75132_a(this); @@ -89,7 +83,7 @@ } } -@@ -792,6 +810,7 @@ +@@ -796,6 +812,7 @@ this.field_71070_bA = new ContainerMerchant(this.field_71071_by, p_180472_1_, this.field_70170_p); this.field_71070_bA.field_75152_c = this.field_71139_cq; this.field_71070_bA.func_75132_a(this); @@ -97,7 +91,7 @@ IInventory iinventory = ((ContainerMerchant)this.field_71070_bA).func_75174_d(); ITextComponent itextcomponent = p_180472_1_.func_145748_c_(); this.field_71135_a.func_147359_a(new SPacketOpenWindow(this.field_71139_cq, "minecraft:villager", itextcomponent, iinventory.func_70302_i_())); -@@ -890,6 +909,7 @@ +@@ -894,6 +911,7 @@ public void func_71128_l() { this.field_71070_bA.func_75134_a(this); @@ -105,7 +99,7 @@ this.field_71070_bA = this.field_71069_bz; } -@@ -921,6 +941,7 @@ +@@ -925,6 +943,7 @@ { if (p_71064_1_ != null) { diff --git a/patches/minecraft/net/minecraft/entity/player/InventoryPlayer.java.patch b/patches/minecraft/net/minecraft/entity/player/InventoryPlayer.java.patch index 88e739bf3..0c49f3ff8 100644 --- a/patches/minecraft/net/minecraft/entity/player/InventoryPlayer.java.patch +++ b/patches/minecraft/net/minecraft/entity/player/InventoryPlayer.java.patch @@ -1,27 +1,27 @@ --- ../src-base/minecraft/net/minecraft/entity/player/InventoryPlayer.java +++ ../src-work/minecraft/net/minecraft/entity/player/InventoryPlayer.java -@@ -272,7 +272,8 @@ +@@ -275,7 +275,8 @@ - if (itemstack == null) + if (itemstack.func_190926_b()) { - itemstack = new ItemStack(item, 0, p_70452_1_.func_77960_j()); + itemstack = p_70452_1_.func_77946_l(); // Forge: Replace Item clone above to preserve item capabilities when picking the item up. -+ itemstack.field_77994_a = 0; ++ itemstack.func_190920_e(0); if (p_70452_1_.func_77942_o()) { -@@ -344,6 +345,14 @@ +@@ -347,6 +348,14 @@ } } } + -+ for (int i = 0; i < field_70460_b.length; i++) ++ for (ItemStack is : field_70460_b) // FORGE: Tick armor on animation ticks + { -+ if (field_70460_b[i] != null) ++ if (!is.func_190926_b()) + { -+ field_70460_b[i].func_77973_b().onArmorTick(field_70458_d.field_70170_p, field_70458_d, field_70460_b[i]); ++ is.func_77973_b().onArmorTick(field_70458_d.field_70170_p, field_70458_d, is); + } + } } - public boolean func_70441_a(@Nullable final ItemStack p_70441_1_) + public boolean func_70441_a(final ItemStack p_70441_1_) diff --git a/patches/minecraft/net/minecraft/entity/projectile/EntityTippedArrow.java.patch b/patches/minecraft/net/minecraft/entity/projectile/EntityTippedArrow.java.patch deleted file mode 100644 index cb84e1a2b..000000000 --- a/patches/minecraft/net/minecraft/entity/projectile/EntityTippedArrow.java.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- ../src-base/minecraft/net/minecraft/entity/projectile/EntityTippedArrow.java -+++ ../src-work/minecraft/net/minecraft/entity/projectile/EntityTippedArrow.java -@@ -182,6 +182,7 @@ - - for (PotionEffect potioneffect : this.field_184560_g.func_185170_a()) - { -+ if(potioneffect.func_188419_a().func_76403_b()) potioneffect.func_188419_a().func_180793_a(this, field_70250_c, p_184548_1_, potioneffect.func_76458_c(), 1); else // FORGE: Fix MC-91728 Tipped Arrows do not apply instant effects - p_184548_1_.func_70690_d(new PotionEffect(potioneffect.func_188419_a(), potioneffect.func_76459_b() / 8, potioneffect.func_76458_c(), potioneffect.func_82720_e(), potioneffect.func_188418_e())); - } - diff --git a/patches/minecraft/net/minecraft/init/Bootstrap.java.patch b/patches/minecraft/net/minecraft/init/Bootstrap.java.patch index 5d1703675..86d690346 100644 --- a/patches/minecraft/net/minecraft/init/Bootstrap.java.patch +++ b/patches/minecraft/net/minecraft/init/Bootstrap.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/init/Bootstrap.java +++ ../src-work/minecraft/net/minecraft/init/Bootstrap.java -@@ -264,6 +264,9 @@ +@@ -258,6 +258,9 @@ }; BlockDispenser.field_149943_a.func_82595_a(Items.field_151129_at, ibehaviordispenseitem); BlockDispenser.field_149943_a.func_82595_a(Items.field_151131_as, ibehaviordispenseitem); @@ -10,7 +10,7 @@ BlockDispenser.field_149943_a.func_82595_a(Items.field_151133_ar, new BehaviorDefaultDispenseItem() { private final BehaviorDefaultDispenseItem field_150840_b = new BehaviorDefaultDispenseItem(); -@@ -541,6 +544,7 @@ +@@ -496,6 +499,7 @@ StatList.func_151178_a(); Biome.func_185358_q(); func_151353_a(); diff --git a/patches/minecraft/net/minecraft/inventory/Container.java.patch b/patches/minecraft/net/minecraft/inventory/Container.java.patch index 06224c3eb..67669e778 100644 --- a/patches/minecraft/net/minecraft/inventory/Container.java.patch +++ b/patches/minecraft/net/minecraft/inventory/Container.java.patch @@ -1,20 +1,11 @@ --- ../src-base/minecraft/net/minecraft/inventory/Container.java +++ ../src-work/minecraft/net/minecraft/inventory/Container.java -@@ -650,7 +650,7 @@ - Slot slot1 = (Slot)this.field_75151_b.get(i); - ItemStack itemstack1 = slot1.func_75211_c(); - -- if (itemstack1 == null) -+ if (itemstack1 == null && slot1.func_75214_a(p_75135_1_)) // Forge: Make sure to respect isItemValid in the slot. - { - slot1.func_75215_d(p_75135_1_.func_77946_l()); - slot1.func_75218_e(); -@@ -728,7 +728,7 @@ - p_94525_2_.field_77994_a = 1; +@@ -708,7 +708,7 @@ + p_94525_2_.func_190920_e(1); break; case 2: -- p_94525_2_.field_77994_a = p_94525_2_.func_77973_b().func_77639_j(); -+ p_94525_2_.field_77994_a = p_94525_2_.func_77976_d(); +- p_94525_2_.func_190920_e(p_94525_2_.func_77973_b().func_77639_j()); ++ p_94525_2_.func_190920_e(p_94525_2_.func_77976_d()); } - p_94525_2_.field_77994_a += p_94525_3_; + p_94525_2_.func_190917_f(p_94525_3_); diff --git a/patches/minecraft/net/minecraft/inventory/ContainerBeacon.java.patch b/patches/minecraft/net/minecraft/inventory/ContainerBeacon.java.patch index 23a8e90ce..0c55b32a6 100644 --- a/patches/minecraft/net/minecraft/inventory/ContainerBeacon.java.patch +++ b/patches/minecraft/net/minecraft/inventory/ContainerBeacon.java.patch @@ -1,11 +1,12 @@ --- ../src-base/minecraft/net/minecraft/inventory/ContainerBeacon.java +++ ../src-work/minecraft/net/minecraft/inventory/ContainerBeacon.java -@@ -146,7 +146,7 @@ +@@ -145,8 +145,7 @@ - public boolean func_75214_a(@Nullable ItemStack p_75214_1_) + public boolean func_75214_a(ItemStack p_75214_1_) { -- return p_75214_1_ == null ? false : p_75214_1_.func_77973_b() == Items.field_151166_bC || p_75214_1_.func_77973_b() == Items.field_151045_i || p_75214_1_.func_77973_b() == Items.field_151043_k || p_75214_1_.func_77973_b() == Items.field_151042_j; -+ return p_75214_1_ == null ? false : p_75214_1_.func_77973_b().isBeaconPayment(p_75214_1_); +- Item item = p_75214_1_.func_77973_b(); +- return item == Items.field_151166_bC || item == Items.field_151045_i || item == Items.field_151043_k || item == Items.field_151042_j; ++ return p_75214_1_.func_77973_b().isBeaconPayment(p_75214_1_); } public int func_75219_a() diff --git a/patches/minecraft/net/minecraft/inventory/ContainerBrewingStand.java.patch b/patches/minecraft/net/minecraft/inventory/ContainerBrewingStand.java.patch index cee1b84f2..500b3c028 100644 --- a/patches/minecraft/net/minecraft/inventory/ContainerBrewingStand.java.patch +++ b/patches/minecraft/net/minecraft/inventory/ContainerBrewingStand.java.patch @@ -1,29 +1,29 @@ --- ../src-base/minecraft/net/minecraft/inventory/ContainerBrewingStand.java +++ ../src-work/minecraft/net/minecraft/inventory/ContainerBrewingStand.java -@@ -198,7 +198,7 @@ +@@ -197,7 +197,7 @@ - public boolean func_75214_a(@Nullable ItemStack p_75214_1_) + public boolean func_75214_a(ItemStack p_75214_1_) { -- return p_75214_1_ != null && PotionHelper.func_185205_a(p_75214_1_); -+ return p_75214_1_ != null && net.minecraftforge.common.brewing.BrewingRecipeRegistry.isValidIngredient(p_75214_1_); +- return PotionHelper.func_185205_a(p_75214_1_); ++ return net.minecraftforge.common.brewing.BrewingRecipeRegistry.isValidIngredient(p_75214_1_); } public int func_75219_a() -@@ -231,6 +231,7 @@ - { - if (PotionUtils.func_185191_c(p_82870_2_) != PotionTypes.field_185230_b) +@@ -232,6 +232,7 @@ + + if (potiontype != PotionTypes.field_185230_b && potiontype != PotionTypes.field_185229_a) { -+ net.minecraftforge.event.ForgeEventFactory.onPlayerBrewedPotion(p_82870_1_, p_82870_2_); ++ net.minecraftforge.event.ForgeEventFactory.onPlayerBrewedPotion(p_190901_1_, p_190901_2_); this.field_75244_a.func_71029_a(AchievementList.field_187970_B); } -@@ -245,8 +246,7 @@ - } - else - { -- Item item = p_75243_0_.func_77973_b(); -- return item == Items.field_151068_bn || item == Items.field_151069_bo || item == Items.field_185155_bH || item == Items.field_185156_bI; -+ return net.minecraftforge.common.brewing.BrewingRecipeRegistry.isValidInput(p_75243_0_); - } +@@ -241,8 +242,7 @@ + + public static boolean func_75243_a_(ItemStack p_75243_0_) + { +- Item item = p_75243_0_.func_77973_b(); +- return item == Items.field_151068_bn || item == Items.field_185155_bH || item == Items.field_185156_bI || item == Items.field_151069_bo; ++ return net.minecraftforge.common.brewing.BrewingRecipeRegistry.isValidInput(p_75243_0_); } } + } diff --git a/patches/minecraft/net/minecraft/inventory/ContainerEnchantment.java.patch b/patches/minecraft/net/minecraft/inventory/ContainerEnchantment.java.patch index 166bf10cf..34f4fa144 100644 --- a/patches/minecraft/net/minecraft/inventory/ContainerEnchantment.java.patch +++ b/patches/minecraft/net/minecraft/inventory/ContainerEnchantment.java.patch @@ -1,11 +1,11 @@ --- ../src-base/minecraft/net/minecraft/inventory/ContainerEnchantment.java +++ ../src-work/minecraft/net/minecraft/inventory/ContainerEnchantment.java -@@ -71,9 +71,12 @@ +@@ -70,9 +70,12 @@ }); this.func_75146_a(new Slot(this.field_75168_e, 1, 35, 47) { + java.util.List ores = net.minecraftforge.oredict.OreDictionary.getOres("gemLapis"); - public boolean func_75214_a(@Nullable ItemStack p_75214_1_) + public boolean func_75214_a(ItemStack p_75214_1_) { - return p_75214_1_.func_77973_b() == Items.field_151100_aR && EnumDyeColor.func_176766_a(p_75214_1_.func_77960_j()) == EnumDyeColor.BLUE; + for (ItemStack ore : ores) @@ -14,7 +14,7 @@ } }); -@@ -158,6 +161,7 @@ +@@ -157,6 +160,7 @@ if (!this.field_75172_h.field_72995_K) { int l = 0; @@ -22,7 +22,7 @@ for (int j = -1; j <= 1; ++j) { -@@ -165,37 +169,14 @@ +@@ -164,37 +168,14 @@ { if ((j != 0 || k != 0) && this.field_75172_h.func_175623_d(this.field_178150_j.func_177982_a(k, 0, j)) && this.field_75172_h.func_175623_d(this.field_178150_j.func_177982_a(k, 1, j))) { @@ -66,7 +66,7 @@ } } } -@@ -205,7 +186,7 @@ +@@ -204,7 +185,7 @@ for (int i1 = 0; i1 < 3; ++i1) { diff --git a/patches/minecraft/net/minecraft/inventory/ContainerPlayer.java.patch b/patches/minecraft/net/minecraft/inventory/ContainerPlayer.java.patch index 0b64ec79a..e0f2dc793 100644 --- a/patches/minecraft/net/minecraft/inventory/ContainerPlayer.java.patch +++ b/patches/minecraft/net/minecraft/inventory/ContainerPlayer.java.patch @@ -1,12 +1,11 @@ --- ../src-base/minecraft/net/minecraft/inventory/ContainerPlayer.java +++ ../src-work/minecraft/net/minecraft/inventory/ContainerPlayer.java -@@ -49,8 +49,7 @@ - } - else - { -- EntityEquipmentSlot entityequipmentslot1 = EntityLiving.func_184640_d(p_75214_1_); -- return entityequipmentslot1 == entityequipmentslot; -+ return p_75214_1_.func_77973_b().isValidArmor(p_75214_1_, entityequipmentslot, field_82862_h); - } +@@ -44,7 +44,7 @@ } - @Nullable + public boolean func_75214_a(ItemStack p_75214_1_) + { +- return entityequipmentslot == EntityLiving.func_184640_d(p_75214_1_); ++ return p_75214_1_.func_77973_b().isValidArmor(p_75214_1_, entityequipmentslot, field_82862_h); + } + public boolean func_82869_a(EntityPlayer p_82869_1_) + { diff --git a/patches/minecraft/net/minecraft/inventory/ContainerRepair.java.patch b/patches/minecraft/net/minecraft/inventory/ContainerRepair.java.patch index 56bd242c8..c25cc504a 100644 --- a/patches/minecraft/net/minecraft/inventory/ContainerRepair.java.patch +++ b/patches/minecraft/net/minecraft/inventory/ContainerRepair.java.patch @@ -1,30 +1,30 @@ --- ../src-base/minecraft/net/minecraft/inventory/ContainerRepair.java +++ ../src-work/minecraft/net/minecraft/inventory/ContainerRepair.java -@@ -70,6 +70,8 @@ - p_82870_1_.func_82242_a(-ContainerRepair.this.field_82854_e); +@@ -69,6 +69,8 @@ + p_190901_1_.func_82242_a(-ContainerRepair.this.field_82854_e); } -+ float breakChance = net.minecraftforge.common.ForgeHooks.onAnvilRepair(p_82870_1_, p_82870_2_, ContainerRepair.this.field_82853_g.func_70301_a(0), ContainerRepair.this.field_82853_g.func_70301_a(1)); ++ float breakChance = net.minecraftforge.common.ForgeHooks.onAnvilRepair(p_190901_1_, p_190901_2_, ContainerRepair.this.field_82853_g.func_70301_a(0), ContainerRepair.this.field_82853_g.func_70301_a(1)); + - ContainerRepair.this.field_82853_g.func_70299_a(0, (ItemStack)null); + ContainerRepair.this.field_82853_g.func_70299_a(0, ItemStack.field_190927_a); if (ContainerRepair.this.field_82856_l > 0) -@@ -94,7 +96,7 @@ +@@ -93,7 +95,7 @@ ContainerRepair.this.field_82854_e = 0; IBlockState iblockstate = p_i45807_2_.func_180495_p(p_i45807_3_); -- if (!p_82870_1_.field_71075_bZ.field_75098_d && !p_i45807_2_.field_72995_K && iblockstate.func_177230_c() == Blocks.field_150467_bQ && p_82870_1_.func_70681_au().nextFloat() < 0.12F) -+ if (!p_82870_1_.field_71075_bZ.field_75098_d && !p_i45807_2_.field_72995_K && iblockstate.func_177230_c() == Blocks.field_150467_bQ && p_82870_1_.func_70681_au().nextFloat() < breakChance) +- if (!p_190901_1_.field_71075_bZ.field_75098_d && !p_i45807_2_.field_72995_K && iblockstate.func_177230_c() == Blocks.field_150467_bQ && p_190901_1_.func_70681_au().nextFloat() < 0.12F) ++ if (!p_190901_1_.field_71075_bZ.field_75098_d && !p_i45807_2_.field_72995_K && iblockstate.func_177230_c() == Blocks.field_150467_bQ && p_190901_1_.func_70681_au().nextFloat() < breakChance) { int l = ((Integer)iblockstate.func_177229_b(BlockAnvil.field_176505_b)).intValue(); ++l; -@@ -161,10 +163,12 @@ +@@ -162,10 +164,12 @@ Map map = EnchantmentHelper.func_82781_a(itemstack1); - j = j + itemstack.func_82838_A() + (itemstack2 == null ? 0 : itemstack2.func_82838_A()); + j = j + itemstack.func_82838_A() + (itemstack2.func_190926_b() ? 0 : itemstack2.func_82838_A()); this.field_82856_l = 0; + boolean flag = false; - if (itemstack2 != null) + if (!itemstack2.func_190926_b()) { - boolean flag = itemstack2.func_77973_b() == Items.field_151134_bR && !Items.field_151134_bR.func_92110_g(itemstack2).func_82582_d(); + if (!net.minecraftforge.common.ForgeHooks.onAnvilChange(this, itemstack, itemstack2, field_82852_f, field_82857_m, j)) return; @@ -32,7 +32,7 @@ if (itemstack1.func_77984_f() && itemstack1.func_77973_b().func_82789_a(itemstack, itemstack2)) { -@@ -236,7 +240,7 @@ +@@ -237,7 +241,7 @@ for (Enchantment enchantment : map.keySet()) { @@ -41,7 +41,7 @@ { flag1 = false; ++i; -@@ -280,6 +284,8 @@ +@@ -281,6 +285,8 @@ } } diff --git a/patches/minecraft/net/minecraft/inventory/InventoryHelper.java.patch b/patches/minecraft/net/minecraft/inventory/InventoryHelper.java.patch deleted file mode 100644 index 7d25b34d9..000000000 --- a/patches/minecraft/net/minecraft/inventory/InventoryHelper.java.patch +++ /dev/null @@ -1,23 +0,0 @@ ---- ../src-base/minecraft/net/minecraft/inventory/InventoryHelper.java -+++ ../src-work/minecraft/net/minecraft/inventory/InventoryHelper.java -@@ -44,19 +44,8 @@ - { - int i = field_180177_a.nextInt(21) + 10; - -- if (i > p_180173_7_.field_77994_a) -- { -- i = p_180173_7_.field_77994_a; -- } -+ EntityItem entityitem = new EntityItem(p_180173_0_, p_180173_1_ + (double)f, p_180173_3_ + (double)f1, p_180173_5_ + (double)f2, p_180173_7_.func_77979_a(i)); - -- p_180173_7_.field_77994_a -= i; -- EntityItem entityitem = new EntityItem(p_180173_0_, p_180173_1_ + (double)f, p_180173_3_ + (double)f1, p_180173_5_ + (double)f2, new ItemStack(p_180173_7_.func_77973_b(), i, p_180173_7_.func_77960_j())); -- -- if (p_180173_7_.func_77942_o()) -- { -- entityitem.func_92059_d().func_77982_d(p_180173_7_.func_77978_p().func_74737_b()); -- } -- - float f3 = 0.05F; - entityitem.field_70159_w = field_180177_a.nextGaussian() * 0.05000000074505806D; - entityitem.field_70181_x = field_180177_a.nextGaussian() * 0.05000000074505806D + 0.20000000298023224D; diff --git a/patches/minecraft/net/minecraft/inventory/Slot.java.patch b/patches/minecraft/net/minecraft/inventory/Slot.java.patch index b4787a2b4..c6296c05b 100644 --- a/patches/minecraft/net/minecraft/inventory/Slot.java.patch +++ b/patches/minecraft/net/minecraft/inventory/Slot.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/inventory/Slot.java +++ ../src-work/minecraft/net/minecraft/inventory/Slot.java -@@ -92,7 +92,7 @@ +@@ -90,7 +90,7 @@ @SideOnly(Side.CLIENT) public String func_178171_c() { @@ -9,7 +9,7 @@ } public ItemStack func_75209_a(int p_75209_1_) -@@ -115,4 +115,73 @@ +@@ -113,4 +113,73 @@ { return true; } diff --git a/patches/minecraft/net/minecraft/inventory/SlotCrafting.java.patch b/patches/minecraft/net/minecraft/inventory/SlotCrafting.java.patch index 8894b89e3..c2f95998c 100644 --- a/patches/minecraft/net/minecraft/inventory/SlotCrafting.java.patch +++ b/patches/minecraft/net/minecraft/inventory/SlotCrafting.java.patch @@ -1,14 +1,14 @@ --- ../src-base/minecraft/net/minecraft/inventory/SlotCrafting.java +++ ../src-work/minecraft/net/minecraft/inventory/SlotCrafting.java -@@ -108,8 +108,11 @@ +@@ -113,8 +113,11 @@ - public void func_82870_a(EntityPlayer p_82870_1_, ItemStack p_82870_2_) + public ItemStack func_190901_a(EntityPlayer p_190901_1_, ItemStack p_190901_2_) { -+ net.minecraftforge.fml.common.FMLCommonHandler.instance().firePlayerCraftingEvent(p_82870_1_, p_82870_2_, field_75239_a); - this.func_75208_c(p_82870_2_); -+ net.minecraftforge.common.ForgeHooks.setCraftingPlayer(p_82870_1_); - ItemStack[] aitemstack = CraftingManager.func_77594_a().func_180303_b(this.field_75239_a, p_82870_1_.field_70170_p); ++ net.minecraftforge.fml.common.FMLCommonHandler.instance().firePlayerCraftingEvent(p_190901_1_, p_190901_2_, field_75239_a); + this.func_75208_c(p_190901_2_); ++ net.minecraftforge.common.ForgeHooks.setCraftingPlayer(p_190901_1_); + NonNullList nonnulllist = CraftingManager.func_77594_a().func_180303_b(this.field_75239_a, p_190901_1_.field_70170_p); + net.minecraftforge.common.ForgeHooks.setCraftingPlayer(null); - for (int i = 0; i < aitemstack.length; ++i) + for (int i = 0; i < nonnulllist.size(); ++i) { diff --git a/patches/minecraft/net/minecraft/item/Item.java.patch b/patches/minecraft/net/minecraft/item/Item.java.patch index 7ae41d3a2..43c9696ae 100644 --- a/patches/minecraft/net/minecraft/item/Item.java.patch +++ b/patches/minecraft/net/minecraft/item/Item.java.patch @@ -14,7 +14,7 @@ private static final IItemPropertyGetter field_185046_b = new IItemPropertyGetter() { @SideOnly(Side.CLIENT) -@@ -196,6 +196,7 @@ +@@ -202,6 +202,7 @@ return p_77654_1_; } @@ -22,7 +22,7 @@ public int func_77639_j() { return this.field_77777_bU; -@@ -217,6 +218,7 @@ +@@ -223,6 +224,7 @@ return this; } @@ -30,7 +30,7 @@ public int func_77612_l() { return this.field_77699_b; -@@ -316,6 +318,7 @@ +@@ -322,6 +324,7 @@ return this.field_77700_c; } @@ -38,7 +38,7 @@ public boolean func_77634_r() { return this.field_77700_c != null; -@@ -371,7 +374,7 @@ +@@ -377,7 +380,7 @@ public boolean func_77616_k(ItemStack p_77616_1_) { @@ -47,7 +47,7 @@ } protected RayTraceResult func_77621_a(World p_77621_1_, EntityPlayer p_77621_2_, boolean p_77621_3_) -@@ -389,7 +392,11 @@ +@@ -395,7 +398,11 @@ float f6 = f3 * f4; float f7 = f2 * f4; double d3 = 5.0D; @@ -60,7 +60,7 @@ return p_77621_1_.func_147447_a(vec3d, vec3d1, p_77621_3_, !p_77621_3_, false); } -@@ -426,11 +433,592 @@ +@@ -433,11 +440,604 @@ return false; } @@ -116,7 +116,7 @@ + * @param hand Which hand the item is being held in. + * @return Return PASS to allow vanilla handling, any other to skip normal code. + */ -+ public EnumActionResult onItemUseFirst(ItemStack stack, EntityPlayer player, World world, BlockPos pos, EnumFacing side, float hitX, float hitY, float hitZ, EnumHand hand) ++ public EnumActionResult onItemUseFirst(EntityPlayer player, World world, BlockPos pos, EnumFacing side, float hitX, float hitY, float hitZ, EnumHand hand) + { + return EnumActionResult.PASS; + } @@ -204,7 +204,7 @@ + { + if (!hasContainerItem(itemStack)) + { -+ return null; ++ return ItemStack.field_190927_a; + } + return new ItemStack(func_77668_q()); + } @@ -367,6 +367,7 @@ + * @return A instance of FontRenderer or null to use default + */ + @SideOnly(Side.CLIENT) ++ @Nullable + public net.minecraft.client.gui.FontRenderer getFontRenderer(ItemStack stack) + { + return null; @@ -457,6 +458,17 @@ + } + + /** ++ * Returns the packed int RGB value used to render the durability bar in the GUI. ++ * Defaults to a value based on the hue scaled as the damage decreases, but can be overriden. ++ * ++ * @param stack Stack to get durability from ++ * @return A packed RGB value for the durability colour (0x00RRGGBB) ++ */ ++ public int getRGBDurabilityForDisplay(ItemStack stack) ++ { ++ return MathHelper.func_181758_c(Math.max(0.0F, (stack.func_77958_k() - stack.func_77952_i()) / stack.func_77958_k()) / 3.0F, 1.0F, 1.0F); ++ } ++ /** + * Return the maxDamage for this ItemStack. Defaults to the maxDamage field in this item, + * but can be overridden here for other sources such as NBT. + * @@ -652,8 +664,8 @@ + public static void func_150900_l() { - func_179214_a(Blocks.field_150348_b, (new ItemMultiTexture(Blocks.field_150348_b, Blocks.field_150348_b, new Function() -@@ -962,6 +1550,10 @@ + func_179214_a(Blocks.field_150350_a, new ItemAir(Blocks.field_150350_a)); +@@ -972,6 +1572,10 @@ private final float field_78011_i; private final int field_78008_j; @@ -664,7 +676,7 @@ private ToolMaterial(int p_i1874_3_, int p_i1874_4_, float p_i1874_5_, float p_i1874_6_, int p_i1874_7_) { this.field_78001_f = p_i1874_3_; -@@ -996,9 +1588,36 @@ +@@ -1006,9 +1610,36 @@ return this.field_78008_j; } diff --git a/patches/minecraft/net/minecraft/item/ItemArmor.java.patch b/patches/minecraft/net/minecraft/item/ItemArmor.java.patch index 80487205f..1e9f5da7a 100644 --- a/patches/minecraft/net/minecraft/item/ItemArmor.java.patch +++ b/patches/minecraft/net/minecraft/item/ItemArmor.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/item/ItemArmor.java +++ ../src-work/minecraft/net/minecraft/item/ItemArmor.java -@@ -222,6 +222,19 @@ +@@ -221,6 +221,19 @@ return multimap; } @@ -20,7 +20,7 @@ public static enum ArmorMaterial { LEATHER("leather", 5, new int[]{1, 2, 3, 1}, 15, SoundEvents.field_187728_s, 0.0F), -@@ -236,6 +249,8 @@ +@@ -235,6 +248,8 @@ private final int field_78055_h; private final SoundEvent field_185020_j; private final float field_189417_k; @@ -29,7 +29,7 @@ private ArmorMaterial(String p_i47117_3_, int p_i47117_4_, int[] p_i47117_5_, int p_i47117_6_, SoundEvent p_i47117_7_, float p_i47117_8_) { -@@ -269,7 +284,15 @@ +@@ -268,7 +283,15 @@ public Item func_151685_b() { diff --git a/patches/minecraft/net/minecraft/item/ItemBed.java.patch b/patches/minecraft/net/minecraft/item/ItemBed.java.patch index 683c37610..be24641d1 100644 --- a/patches/minecraft/net/minecraft/item/ItemBed.java.patch +++ b/patches/minecraft/net/minecraft/item/ItemBed.java.patch @@ -1,11 +1,11 @@ --- ../src-base/minecraft/net/minecraft/item/ItemBed.java +++ ../src-work/minecraft/net/minecraft/item/ItemBed.java -@@ -63,7 +63,7 @@ - p_180614_3_.func_180501_a(blockpos, iblockstate2, 11); - } - -- SoundType soundtype = iblockstate1.func_177230_c().func_185467_w(); -+ SoundType soundtype = iblockstate1.func_177230_c().getSoundType(iblockstate1, p_180614_3_, p_180614_4_, p_180614_2_); - p_180614_3_.func_184133_a((EntityPlayer)null, p_180614_4_, soundtype.func_185841_e(), SoundCategory.BLOCKS, (soundtype.func_185843_a() + 1.0F) / 2.0F, soundtype.func_185847_b() * 0.8F); - --p_180614_1_.field_77994_a; +@@ -62,7 +62,7 @@ + p_180614_2_.func_180501_a(blockpos, iblockstate2.func_177226_a(BlockBed.field_176472_a, BlockBed.EnumPartType.HEAD), 10); + p_180614_2_.func_175722_b(p_180614_3_, block, false); + p_180614_2_.func_175722_b(blockpos, iblockstate1.func_177230_c(), false); +- SoundType soundtype = iblockstate2.func_177230_c().func_185467_w(); ++ SoundType soundtype = iblockstate2.func_177230_c().getSoundType(iblockstate2, p_180614_2_, p_180614_3_, p_180614_1_); + p_180614_2_.func_184133_a((EntityPlayer)null, p_180614_3_, soundtype.func_185841_e(), SoundCategory.BLOCKS, (soundtype.func_185843_a() + 1.0F) / 2.0F, soundtype.func_185847_b() * 0.8F); + itemstack.func_190918_g(1); return EnumActionResult.SUCCESS; diff --git a/patches/minecraft/net/minecraft/item/ItemBlock.java.patch b/patches/minecraft/net/minecraft/item/ItemBlock.java.patch index da85a8eff..d15a9516d 100644 --- a/patches/minecraft/net/minecraft/item/ItemBlock.java.patch +++ b/patches/minecraft/net/minecraft/item/ItemBlock.java.patch @@ -1,29 +1,29 @@ --- ../src-base/minecraft/net/minecraft/item/ItemBlock.java +++ ../src-work/minecraft/net/minecraft/item/ItemBlock.java -@@ -49,19 +49,11 @@ - if (p_180614_1_.field_77994_a != 0 && p_180614_2_.func_175151_a(p_180614_4_, p_180614_6_, p_180614_1_) && p_180614_3_.func_175716_a(this.field_150939_a, p_180614_4_, false, p_180614_6_, (Entity)null, p_180614_1_)) +@@ -46,19 +46,11 @@ + if (!itemstack.func_190926_b() && p_180614_1_.func_175151_a(p_180614_3_, p_180614_5_, itemstack) && p_180614_2_.func_190527_a(this.field_150939_a, p_180614_3_, false, p_180614_5_, (Entity)null)) { - int i = this.func_77647_b(p_180614_1_.func_77960_j()); -- IBlockState iblockstate1 = this.field_150939_a.func_180642_a(p_180614_3_, p_180614_4_, p_180614_6_, p_180614_7_, p_180614_8_, p_180614_9_, i, p_180614_2_); -+ IBlockState iblockstate1 = this.field_150939_a.getStateForPlacement(p_180614_3_, p_180614_4_, p_180614_6_, p_180614_7_, p_180614_8_, p_180614_9_, i, p_180614_2_, p_180614_1_); + int i = this.func_77647_b(itemstack.func_77960_j()); +- IBlockState iblockstate1 = this.field_150939_a.func_180642_a(p_180614_2_, p_180614_3_, p_180614_5_, p_180614_6_, p_180614_7_, p_180614_8_, i, p_180614_1_); ++ IBlockState iblockstate1 = this.field_150939_a.getStateForPlacement(p_180614_2_, p_180614_3_, p_180614_5_, p_180614_6_, p_180614_7_, p_180614_8_, i, p_180614_1_); -- if (p_180614_3_.func_180501_a(p_180614_4_, iblockstate1, 11)) -+ if (placeBlockAt(p_180614_1_, p_180614_2_, p_180614_3_, p_180614_4_, p_180614_6_, p_180614_7_, p_180614_8_, p_180614_9_, iblockstate1)) +- if (p_180614_2_.func_180501_a(p_180614_3_, iblockstate1, 11)) ++ if (placeBlockAt(itemstack, p_180614_1_, p_180614_2_, p_180614_3_, p_180614_5_, p_180614_6_, p_180614_7_, p_180614_8_, iblockstate1)) { -- iblockstate1 = p_180614_3_.func_180495_p(p_180614_4_); +- iblockstate1 = p_180614_2_.func_180495_p(p_180614_3_); - - if (iblockstate1.func_177230_c() == this.field_150939_a) - { -- func_179224_a(p_180614_3_, p_180614_2_, p_180614_4_, p_180614_1_); -- this.field_150939_a.func_180633_a(p_180614_3_, p_180614_4_, iblockstate1, p_180614_2_, p_180614_1_); +- func_179224_a(p_180614_2_, p_180614_1_, p_180614_3_, itemstack); +- this.field_150939_a.func_180633_a(p_180614_2_, p_180614_3_, iblockstate1, p_180614_1_, itemstack); - } - - SoundType soundtype = this.field_150939_a.func_185467_w(); -+ SoundType soundtype = p_180614_3_.func_180495_p(p_180614_4_).func_177230_c().getSoundType(p_180614_3_.func_180495_p(p_180614_4_), p_180614_3_, p_180614_4_, p_180614_2_); - p_180614_3_.func_184133_a(p_180614_2_, p_180614_4_, soundtype.func_185841_e(), SoundCategory.BLOCKS, (soundtype.func_185843_a() + 1.0F) / 2.0F, soundtype.func_185847_b() * 0.8F); - --p_180614_1_.field_77994_a; ++ SoundType soundtype = p_180614_2_.func_180495_p(p_180614_3_).func_177230_c().getSoundType(p_180614_2_.func_180495_p(p_180614_3_), p_180614_2_, p_180614_3_, p_180614_1_); + p_180614_2_.func_184133_a(p_180614_1_, p_180614_3_, soundtype.func_185841_e(), SoundCategory.BLOCKS, (soundtype.func_185843_a() + 1.0F) / 2.0F, soundtype.func_185847_b() * 0.8F); + itemstack.func_190918_g(1); } -@@ -121,7 +113,7 @@ +@@ -119,7 +111,7 @@ { Block block = p_179222_1_.func_180495_p(p_179222_2_).func_177230_c(); @@ -32,7 +32,7 @@ { p_179222_3_ = EnumFacing.UP; } -@@ -159,4 +151,32 @@ +@@ -164,4 +156,26 @@ { return this.field_150939_a; } @@ -47,7 +47,7 @@ + */ + public boolean placeBlockAt(ItemStack stack, EntityPlayer player, World world, BlockPos pos, EnumFacing side, float hitX, float hitY, float hitZ, IBlockState newState) + { -+ if (!world.func_180501_a(pos, newState, 3)) return false; ++ if (!world.func_180501_a(pos, newState, 11)) return false; + + IBlockState state = world.func_180495_p(pos); + if (state.func_177230_c() == this.field_150939_a) @@ -57,11 +57,5 @@ + } + + return true; -+ } -+ -+ @SideOnly(Side.CLIENT) -+ public void func_77624_a(ItemStack stack, EntityPlayer playerIn, List tooltip, boolean advanced) -+ { -+ field_150939_a.addInformation(stack, playerIn, tooltip, advanced); + } } diff --git a/patches/minecraft/net/minecraft/item/ItemBlockSpecial.java.patch b/patches/minecraft/net/minecraft/item/ItemBlockSpecial.java.patch index d1528af7a..012ef5eea 100644 --- a/patches/minecraft/net/minecraft/item/ItemBlockSpecial.java.patch +++ b/patches/minecraft/net/minecraft/item/ItemBlockSpecial.java.patch @@ -1,20 +1,20 @@ --- ../src-base/minecraft/net/minecraft/item/ItemBlockSpecial.java +++ ../src-work/minecraft/net/minecraft/item/ItemBlockSpecial.java -@@ -39,7 +39,7 @@ +@@ -41,7 +41,7 @@ - if (p_180614_2_.func_175151_a(p_180614_4_, p_180614_6_, p_180614_1_) && p_180614_1_.field_77994_a != 0 && p_180614_3_.func_175716_a(this.field_150935_a, p_180614_4_, false, p_180614_6_, (Entity)null, p_180614_1_)) + if (!itemstack.func_190926_b() && p_180614_1_.func_175151_a(p_180614_3_, p_180614_5_, itemstack) && p_180614_2_.func_190527_a(this.field_150935_a, p_180614_3_, false, p_180614_5_, (Entity)null)) { -- IBlockState iblockstate1 = this.field_150935_a.func_180642_a(p_180614_3_, p_180614_4_, p_180614_6_, p_180614_7_, p_180614_8_, p_180614_9_, 0, p_180614_2_); -+ IBlockState iblockstate1 = this.field_150935_a.getStateForPlacement(p_180614_3_, p_180614_4_, p_180614_6_, p_180614_7_, p_180614_8_, p_180614_9_, 0, p_180614_2_, p_180614_1_); +- IBlockState iblockstate1 = this.field_150935_a.func_180642_a(p_180614_2_, p_180614_3_, p_180614_5_, p_180614_6_, p_180614_7_, p_180614_8_, 0, p_180614_1_); ++ IBlockState iblockstate1 = this.field_150935_a.getStateForPlacement(p_180614_2_, p_180614_3_, p_180614_5_, p_180614_6_, p_180614_7_, p_180614_8_, 0, p_180614_1_); - if (!p_180614_3_.func_180501_a(p_180614_4_, iblockstate1, 11)) + if (!p_180614_2_.func_180501_a(p_180614_3_, iblockstate1, 11)) { -@@ -55,7 +55,7 @@ - iblockstate1.func_177230_c().func_180633_a(p_180614_3_, p_180614_4_, iblockstate1, p_180614_2_, p_180614_1_); +@@ -57,7 +57,7 @@ + iblockstate1.func_177230_c().func_180633_a(p_180614_2_, p_180614_3_, iblockstate1, p_180614_1_, itemstack); } - SoundType soundtype = this.field_150935_a.func_185467_w(); -+ SoundType soundtype = iblockstate1.func_177230_c().getSoundType(iblockstate1, p_180614_3_, p_180614_4_, p_180614_2_); - p_180614_3_.func_184133_a(p_180614_2_, p_180614_4_, soundtype.func_185841_e(), SoundCategory.BLOCKS, (soundtype.func_185843_a() + 1.0F) / 2.0F, soundtype.func_185847_b() * 0.8F); - --p_180614_1_.field_77994_a; ++ SoundType soundtype = iblockstate1.func_177230_c().getSoundType(iblockstate1, p_180614_2_, p_180614_3_, p_180614_1_); + p_180614_2_.func_184133_a(p_180614_1_, p_180614_3_, soundtype.func_185841_e(), SoundCategory.BLOCKS, (soundtype.func_185843_a() + 1.0F) / 2.0F, soundtype.func_185847_b() * 0.8F); + itemstack.func_190918_g(1); return EnumActionResult.SUCCESS; diff --git a/patches/minecraft/net/minecraft/item/ItemBow.java.patch b/patches/minecraft/net/minecraft/item/ItemBow.java.patch index eef4d43a7..ec8c86713 100644 --- a/patches/minecraft/net/minecraft/item/ItemBow.java.patch +++ b/patches/minecraft/net/minecraft/item/ItemBow.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/item/ItemBow.java +++ ../src-work/minecraft/net/minecraft/item/ItemBow.java -@@ -91,6 +91,10 @@ +@@ -83,6 +83,10 @@ boolean flag = entityplayer.field_71075_bZ.field_75098_d || EnchantmentHelper.func_77506_a(Enchantments.field_185312_x, p_77615_1_) > 0; ItemStack itemstack = this.func_185060_a(entityplayer); @@ -8,10 +8,10 @@ + i = net.minecraftforge.event.ForgeEventFactory.onArrowLoose(p_77615_1_, p_77615_2_, (EntityPlayer)p_77615_3_, i, itemstack != null || flag); + if (i < 0) return; + - if (itemstack != null || flag) + if (!itemstack.func_190926_b() || flag) { - if (itemstack == null) -@@ -98,12 +102,11 @@ + if (itemstack.func_190926_b()) +@@ -90,12 +94,11 @@ itemstack = new ItemStack(Items.field_151032_g); } @@ -25,13 +25,13 @@ if (!p_77615_2_.field_72995_K) { -@@ -190,6 +193,9 @@ - { - boolean flag = this.func_185060_a(p_77659_3_) != null; +@@ -183,6 +186,9 @@ + ItemStack itemstack = p_77659_2_.func_184586_b(p_77659_3_); + boolean flag = !this.func_185060_a(p_77659_2_).func_190926_b(); -+ ActionResult ret = net.minecraftforge.event.ForgeEventFactory.onArrowNock(p_77659_1_, p_77659_2_, p_77659_3_, p_77659_4_, flag); ++ ActionResult ret = net.minecraftforge.event.ForgeEventFactory.onArrowNock(itemstack, p_77659_1_, p_77659_2_, p_77659_3_, flag); + if (ret != null) return ret; + - if (!p_77659_3_.field_71075_bZ.field_75098_d && !flag) + if (!p_77659_2_.field_71075_bZ.field_75098_d && !flag) { - return !flag ? new ActionResult(EnumActionResult.FAIL, p_77659_1_) : new ActionResult(EnumActionResult.PASS, p_77659_1_); + return flag ? new ActionResult(EnumActionResult.PASS, itemstack) : new ActionResult(EnumActionResult.FAIL, itemstack); diff --git a/patches/minecraft/net/minecraft/item/ItemBucket.java.patch b/patches/minecraft/net/minecraft/item/ItemBucket.java.patch index 42de7cf0f..738f4220c 100644 --- a/patches/minecraft/net/minecraft/item/ItemBucket.java.patch +++ b/patches/minecraft/net/minecraft/item/ItemBucket.java.patch @@ -1,15 +1,15 @@ --- ../src-base/minecraft/net/minecraft/item/ItemBucket.java +++ ../src-work/minecraft/net/minecraft/item/ItemBucket.java -@@ -37,6 +37,8 @@ - { +@@ -38,6 +38,8 @@ boolean flag = this.field_77876_a == Blocks.field_150350_a; - RayTraceResult raytraceresult = this.func_77621_a(p_77659_2_, p_77659_3_, flag); -+ ActionResult ret = net.minecraftforge.event.ForgeEventFactory.onBucketUse(p_77659_3_, p_77659_2_, p_77659_1_, raytraceresult); + ItemStack itemstack = p_77659_2_.func_184586_b(p_77659_3_); + RayTraceResult raytraceresult = this.func_77621_a(p_77659_1_, p_77659_2_, flag); ++ ActionResult ret = net.minecraftforge.event.ForgeEventFactory.onBucketUse(p_77659_2_, p_77659_1_, itemstack, raytraceresult); + if (ret != null) return ret; if (raytraceresult == null) { -@@ -175,4 +177,23 @@ +@@ -181,4 +183,23 @@ } } } diff --git a/patches/minecraft/net/minecraft/item/ItemBucketMilk.java.patch b/patches/minecraft/net/minecraft/item/ItemBucketMilk.java.patch index 78a8a6e0c..baa9c56ad 100644 --- a/patches/minecraft/net/minecraft/item/ItemBucketMilk.java.patch +++ b/patches/minecraft/net/minecraft/item/ItemBucketMilk.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/item/ItemBucketMilk.java +++ ../src-work/minecraft/net/minecraft/item/ItemBucketMilk.java -@@ -29,7 +29,7 @@ +@@ -27,7 +27,7 @@ if (!p_77654_2_.field_72995_K) { @@ -9,9 +9,9 @@ } if (p_77654_3_ instanceof EntityPlayer) -@@ -55,4 +55,9 @@ - p_77659_3_.func_184598_c(p_77659_4_); - return new ActionResult(EnumActionResult.SUCCESS, p_77659_1_); +@@ -53,4 +53,9 @@ + p_77659_2_.func_184598_c(p_77659_3_); + return new ActionResult(EnumActionResult.SUCCESS, p_77659_2_.func_184586_b(p_77659_3_)); } + + @Override diff --git a/patches/minecraft/net/minecraft/item/ItemDoor.java.patch b/patches/minecraft/net/minecraft/item/ItemDoor.java.patch index 139065aac..8321edc9c 100644 --- a/patches/minecraft/net/minecraft/item/ItemDoor.java.patch +++ b/patches/minecraft/net/minecraft/item/ItemDoor.java.patch @@ -1,11 +1,11 @@ --- ../src-base/minecraft/net/minecraft/item/ItemDoor.java +++ ../src-work/minecraft/net/minecraft/item/ItemDoor.java -@@ -46,7 +46,7 @@ +@@ -48,7 +48,7 @@ int j = enumfacing.func_82599_e(); - boolean flag = i < 0 && p_180614_9_ < 0.5F || i > 0 && p_180614_9_ > 0.5F || j < 0 && p_180614_7_ > 0.5F || j > 0 && p_180614_7_ < 0.5F; - func_179235_a(p_180614_3_, p_180614_4_, enumfacing, this.field_179236_a, flag); + boolean flag = i < 0 && p_180614_8_ < 0.5F || i > 0 && p_180614_8_ > 0.5F || j < 0 && p_180614_6_ > 0.5F || j > 0 && p_180614_6_ < 0.5F; + func_179235_a(p_180614_2_, p_180614_3_, enumfacing, this.field_179236_a, flag); - SoundType soundtype = this.field_179236_a.func_185467_w(); -+ SoundType soundtype = p_180614_3_.func_180495_p(p_180614_4_).func_177230_c().getSoundType(p_180614_3_.func_180495_p(p_180614_4_), p_180614_3_, p_180614_4_, p_180614_2_); - p_180614_3_.func_184133_a(p_180614_2_, p_180614_4_, soundtype.func_185841_e(), SoundCategory.BLOCKS, (soundtype.func_185843_a() + 1.0F) / 2.0F, soundtype.func_185847_b() * 0.8F); - --p_180614_1_.field_77994_a; ++ SoundType soundtype = p_180614_2_.func_180495_p(p_180614_3_).func_177230_c().getSoundType(p_180614_2_.func_180495_p(p_180614_3_), p_180614_2_, p_180614_3_, p_180614_1_); + p_180614_2_.func_184133_a(p_180614_1_, p_180614_3_, soundtype.func_185841_e(), SoundCategory.BLOCKS, (soundtype.func_185843_a() + 1.0F) / 2.0F, soundtype.func_185847_b() * 0.8F); + itemstack.func_190918_g(1); return EnumActionResult.SUCCESS; diff --git a/patches/minecraft/net/minecraft/item/ItemDye.java.patch b/patches/minecraft/net/minecraft/item/ItemDye.java.patch index 07eb07c21..7f57f8151 100644 --- a/patches/minecraft/net/minecraft/item/ItemDye.java.patch +++ b/patches/minecraft/net/minecraft/item/ItemDye.java.patch @@ -1,24 +1,24 @@ --- ../src-base/minecraft/net/minecraft/item/ItemDye.java +++ ../src-work/minecraft/net/minecraft/item/ItemDye.java -@@ -50,7 +50,7 @@ +@@ -52,7 +52,7 @@ if (enumdyecolor == EnumDyeColor.WHITE) { -- if (func_179234_a(p_180614_1_, p_180614_3_, p_180614_4_)) -+ if (applyBonemeal(p_180614_1_, p_180614_3_, p_180614_4_, p_180614_2_)) +- if (func_179234_a(itemstack, p_180614_2_, p_180614_3_)) ++ if (applyBonemeal(itemstack, p_180614_2_, p_180614_3_, p_180614_1_)) { - if (!p_180614_3_.field_72995_K) + if (!p_180614_2_.field_72995_K) { -@@ -73,7 +73,7 @@ +@@ -78,7 +78,7 @@ - if (p_180614_3_.func_175623_d(p_180614_4_)) - { -- IBlockState iblockstate1 = Blocks.field_150375_by.func_180642_a(p_180614_3_, p_180614_4_, p_180614_6_, p_180614_7_, p_180614_8_, p_180614_9_, 0, p_180614_2_); -+ IBlockState iblockstate1 = Blocks.field_150375_by.getStateForPlacement(p_180614_3_, p_180614_4_, p_180614_6_, p_180614_7_, p_180614_8_, p_180614_9_, 0, p_180614_2_, p_180614_1_); - p_180614_3_.func_180501_a(p_180614_4_, iblockstate1, 10); + if (p_180614_2_.func_175623_d(p_180614_3_)) + { +- IBlockState iblockstate1 = Blocks.field_150375_by.func_180642_a(p_180614_2_, p_180614_3_, p_180614_5_, p_180614_6_, p_180614_7_, p_180614_8_, 0, p_180614_1_); ++ IBlockState iblockstate1 = Blocks.field_150375_by.getStateForPlacement(p_180614_2_, p_180614_3_, p_180614_5_, p_180614_6_, p_180614_7_, p_180614_8_, 0, p_180614_1_); + p_180614_2_.func_180501_a(p_180614_3_, iblockstate1, 10); - if (!p_180614_2_.field_71075_bZ.field_75098_d) -@@ -97,8 +97,18 @@ + if (!p_180614_1_.field_71075_bZ.field_75098_d) +@@ -99,8 +99,18 @@ public static boolean func_179234_a(ItemStack p_179234_0_, World p_179234_1_, BlockPos p_179234_2_) { @@ -37,7 +37,7 @@ if (iblockstate.func_177230_c() instanceof IGrowable) { IGrowable igrowable = (IGrowable)iblockstate.func_177230_c(); -@@ -142,6 +152,16 @@ +@@ -144,6 +154,16 @@ p_180617_0_.func_175688_a(EnumParticleTypes.VILLAGER_HAPPY, (double)((float)p_180617_1_.func_177958_n() + field_77697_d.nextFloat()), (double)p_180617_1_.func_177956_o() + (double)field_77697_d.nextFloat() * iblockstate.func_185900_c(p_180617_0_, p_180617_1_).field_72337_e, (double)((float)p_180617_1_.func_177952_p() + field_77697_d.nextFloat()), d0, d1, d2, new int[0]); } } diff --git a/patches/minecraft/net/minecraft/item/ItemEmptyMap.java.patch b/patches/minecraft/net/minecraft/item/ItemEmptyMap.java.patch deleted file mode 100644 index ca0d861df..000000000 --- a/patches/minecraft/net/minecraft/item/ItemEmptyMap.java.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- ../src-base/minecraft/net/minecraft/item/ItemEmptyMap.java -+++ ../src-work/minecraft/net/minecraft/item/ItemEmptyMap.java -@@ -25,7 +25,7 @@ - p_77659_2_.func_72823_a(s, mapdata); - mapdata.field_76197_d = 0; - mapdata.func_176054_a(p_77659_3_.field_70165_t, p_77659_3_.field_70161_v, mapdata.field_76197_d); -- mapdata.field_76200_c = (byte)p_77659_2_.field_73011_w.func_186058_p().func_186068_a(); -+ mapdata.field_76200_c = p_77659_2_.field_73011_w.getDimension(); - mapdata.field_186210_e = true; - mapdata.func_76185_a(); - --p_77659_1_.field_77994_a; diff --git a/patches/minecraft/net/minecraft/item/ItemFlintAndSteel.java.patch b/patches/minecraft/net/minecraft/item/ItemFlintAndSteel.java.patch index 9e1f53a17..899f24c68 100644 --- a/patches/minecraft/net/minecraft/item/ItemFlintAndSteel.java.patch +++ b/patches/minecraft/net/minecraft/item/ItemFlintAndSteel.java.patch @@ -1,11 +1,11 @@ --- ../src-base/minecraft/net/minecraft/item/ItemFlintAndSteel.java +++ ../src-work/minecraft/net/minecraft/item/ItemFlintAndSteel.java -@@ -31,7 +31,7 @@ +@@ -32,7 +32,7 @@ } else { -- if (p_180614_3_.func_180495_p(p_180614_4_).func_185904_a() == Material.field_151579_a) -+ if (p_180614_3_.func_175623_d(p_180614_4_)) +- if (p_180614_2_.func_180495_p(p_180614_3_).func_185904_a() == Material.field_151579_a) ++ if (p_180614_2_.func_175623_d(p_180614_3_)) { - p_180614_3_.func_184133_a(p_180614_2_, p_180614_4_, SoundEvents.field_187649_bu, SoundCategory.BLOCKS, 1.0F, field_77697_d.nextFloat() * 0.4F + 0.8F); - p_180614_3_.func_180501_a(p_180614_4_, Blocks.field_150480_ab.func_176223_P(), 11); + p_180614_2_.func_184133_a(p_180614_1_, p_180614_3_, SoundEvents.field_187649_bu, SoundCategory.BLOCKS, 1.0F, field_77697_d.nextFloat() * 0.4F + 0.8F); + p_180614_2_.func_180501_a(p_180614_3_, Blocks.field_150480_ab.func_176223_P(), 11); diff --git a/patches/minecraft/net/minecraft/item/ItemHoe.java.patch b/patches/minecraft/net/minecraft/item/ItemHoe.java.patch index 98f3a2028..01cd1bbfb 100644 --- a/patches/minecraft/net/minecraft/item/ItemHoe.java.patch +++ b/patches/minecraft/net/minecraft/item/ItemHoe.java.patch @@ -1,17 +1,17 @@ --- ../src-base/minecraft/net/minecraft/item/ItemHoe.java +++ ../src-work/minecraft/net/minecraft/item/ItemHoe.java -@@ -45,10 +45,13 @@ +@@ -47,10 +47,13 @@ } else { -+ int hook = net.minecraftforge.event.ForgeEventFactory.onHoeUse(p_180614_1_, p_180614_2_, p_180614_3_, p_180614_4_); ++ int hook = net.minecraftforge.event.ForgeEventFactory.onHoeUse(itemstack, p_180614_1_, p_180614_2_, p_180614_3_); + if (hook != 0) return hook > 0 ? EnumActionResult.SUCCESS : EnumActionResult.FAIL; + - IBlockState iblockstate = p_180614_3_.func_180495_p(p_180614_4_); + IBlockState iblockstate = p_180614_2_.func_180495_p(p_180614_3_); Block block = iblockstate.func_177230_c(); -- if (p_180614_6_ != EnumFacing.DOWN && p_180614_3_.func_180495_p(p_180614_4_.func_177984_a()).func_185904_a() == Material.field_151579_a) -+ if (p_180614_6_ != EnumFacing.DOWN && p_180614_3_.func_175623_d(p_180614_4_.func_177984_a())) +- if (p_180614_5_ != EnumFacing.DOWN && p_180614_2_.func_180495_p(p_180614_3_.func_177984_a()).func_185904_a() == Material.field_151579_a) ++ if (p_180614_5_ != EnumFacing.DOWN && p_180614_2_.func_175623_d(p_180614_3_.func_177984_a())) { if (block == Blocks.field_150349_c || block == Blocks.field_185774_da) { diff --git a/patches/minecraft/net/minecraft/item/ItemLilyPad.java.patch b/patches/minecraft/net/minecraft/item/ItemLilyPad.java.patch index 75b8ed979..f4d29af13 100644 --- a/patches/minecraft/net/minecraft/item/ItemLilyPad.java.patch +++ b/patches/minecraft/net/minecraft/item/ItemLilyPad.java.patch @@ -1,18 +1,18 @@ --- ../src-base/minecraft/net/minecraft/item/ItemLilyPad.java +++ ../src-work/minecraft/net/minecraft/item/ItemLilyPad.java -@@ -47,6 +47,15 @@ +@@ -48,6 +48,15 @@ - if (iblockstate.func_185904_a() == Material.field_151586_h && ((Integer)iblockstate.func_177229_b(BlockLiquid.field_176367_b)).intValue() == 0 && p_77659_2_.func_175623_d(blockpos1)) + if (iblockstate.func_185904_a() == Material.field_151586_h && ((Integer)iblockstate.func_177229_b(BlockLiquid.field_176367_b)).intValue() == 0 && p_77659_1_.func_175623_d(blockpos1)) { + // special case for handling block placement with water lilies -+ net.minecraftforge.common.util.BlockSnapshot blocksnapshot = net.minecraftforge.common.util.BlockSnapshot.getBlockSnapshot(p_77659_2_, blockpos1); -+ p_77659_2_.func_175656_a(blockpos1, Blocks.field_150392_bi.func_176223_P()); -+ if (net.minecraftforge.event.ForgeEventFactory.onPlayerBlockPlace(p_77659_3_, blocksnapshot, net.minecraft.util.EnumFacing.UP, p_77659_4_).isCanceled()) ++ net.minecraftforge.common.util.BlockSnapshot blocksnapshot = net.minecraftforge.common.util.BlockSnapshot.getBlockSnapshot(p_77659_1_, blockpos1); ++ p_77659_1_.func_175656_a(blockpos1, Blocks.field_150392_bi.func_176223_P()); ++ if (net.minecraftforge.event.ForgeEventFactory.onPlayerBlockPlace(p_77659_2_, blocksnapshot, net.minecraft.util.EnumFacing.UP, p_77659_3_).isCanceled()) + { + blocksnapshot.restore(true, false); -+ return new ActionResult(EnumActionResult.FAIL, p_77659_1_); ++ return new ActionResult(EnumActionResult.FAIL, itemstack); + } + - p_77659_2_.func_180501_a(blockpos1, Blocks.field_150392_bi.func_176223_P(), 11); + p_77659_1_.func_180501_a(blockpos1, Blocks.field_150392_bi.func_176223_P(), 11); - if (!p_77659_3_.field_71075_bZ.field_75098_d) + if (!p_77659_2_.field_71075_bZ.field_75098_d) diff --git a/patches/minecraft/net/minecraft/item/ItemMap.java.patch b/patches/minecraft/net/minecraft/item/ItemMap.java.patch index 598de6180..167eeb4da 100644 --- a/patches/minecraft/net/minecraft/item/ItemMap.java.patch +++ b/patches/minecraft/net/minecraft/item/ItemMap.java.patch @@ -1,6 +1,15 @@ --- ../src-base/minecraft/net/minecraft/item/ItemMap.java +++ ../src-work/minecraft/net/minecraft/item/ItemMap.java -@@ -58,7 +58,7 @@ +@@ -40,7 +40,7 @@ + p_190906_0_.func_72823_a(s, mapdata); + mapdata.field_76197_d = p_190906_5_; + mapdata.func_176054_a(p_190906_1_, p_190906_3_, mapdata.field_76197_d); +- mapdata.field_76200_c = (byte)p_190906_0_.field_73011_w.func_186058_p().func_186068_a(); ++ mapdata.field_76200_c = p_190906_0_.field_73011_w.getDimension(); + mapdata.field_186210_e = p_190906_6_; + mapdata.field_191096_f = p_190906_7_; + mapdata.func_76185_a(); +@@ -68,7 +68,7 @@ mapdata = new MapData(s); mapdata.field_76197_d = 3; mapdata.func_176054_a((double)p_77873_2_.func_72912_H().func_76079_c(), (double)p_77873_2_.func_72912_H().func_76074_e(), mapdata.field_76197_d); @@ -9,7 +18,7 @@ mapdata.func_76185_a(); p_77873_2_.func_72823_a(s, mapdata); } -@@ -68,7 +68,7 @@ +@@ -78,7 +78,7 @@ public void func_77872_a(World p_77872_1_, Entity p_77872_2_, MapData p_77872_3_) { diff --git a/patches/minecraft/net/minecraft/item/ItemMonsterPlacer.java.patch b/patches/minecraft/net/minecraft/item/ItemMonsterPlacer.java.patch deleted file mode 100644 index 4db19cc92..000000000 --- a/patches/minecraft/net/minecraft/item/ItemMonsterPlacer.java.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- ../src-base/minecraft/net/minecraft/item/ItemMonsterPlacer.java -+++ ../src-work/minecraft/net/minecraft/item/ItemMonsterPlacer.java -@@ -89,7 +89,7 @@ - p_180614_4_ = p_180614_4_.func_177972_a(p_180614_6_); - double d0 = 0.0D; - -- if (p_180614_6_ == EnumFacing.UP && iblockstate instanceof BlockFence) -+ if (p_180614_6_ == EnumFacing.UP && iblockstate.func_177230_c() instanceof BlockFence) //Forge: Fix Vanilla bug comparing state instead of block - { - d0 = 0.5D; - } diff --git a/patches/minecraft/net/minecraft/item/ItemRecord.java.patch b/patches/minecraft/net/minecraft/item/ItemRecord.java.patch index ae10bcd67..74ba72565 100644 --- a/patches/minecraft/net/minecraft/item/ItemRecord.java.patch +++ b/patches/minecraft/net/minecraft/item/ItemRecord.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/item/ItemRecord.java +++ ../src-work/minecraft/net/minecraft/item/ItemRecord.java -@@ -63,6 +63,17 @@ +@@ -64,6 +64,17 @@ p_77624_3_.add(this.func_150927_i()); } diff --git a/patches/minecraft/net/minecraft/item/ItemSeedFood.java.patch b/patches/minecraft/net/minecraft/item/ItemSeedFood.java.patch index e780f8e1b..4b6d47a6e 100644 --- a/patches/minecraft/net/minecraft/item/ItemSeedFood.java.patch +++ b/patches/minecraft/net/minecraft/item/ItemSeedFood.java.patch @@ -9,17 +9,18 @@ { private final Block field_150908_b; private final Block field_82809_c; -@@ -22,7 +22,8 @@ - - public EnumActionResult func_180614_a(ItemStack p_180614_1_, EntityPlayer p_180614_2_, World p_180614_3_, BlockPos p_180614_4_, EnumHand p_180614_5_, EnumFacing p_180614_6_, float p_180614_7_, float p_180614_8_, float p_180614_9_) +@@ -23,8 +23,8 @@ + public EnumActionResult func_180614_a(EntityPlayer p_180614_1_, World p_180614_2_, BlockPos p_180614_3_, EnumHand p_180614_4_, EnumFacing p_180614_5_, float p_180614_6_, float p_180614_7_, float p_180614_8_) { -- if (p_180614_6_ == EnumFacing.UP && p_180614_2_.func_175151_a(p_180614_4_.func_177972_a(p_180614_6_), p_180614_6_, p_180614_1_) && p_180614_3_.func_180495_p(p_180614_4_).func_177230_c() == this.field_82809_c && p_180614_3_.func_175623_d(p_180614_4_.func_177984_a())) -+ net.minecraft.block.state.IBlockState state = p_180614_3_.func_180495_p(p_180614_4_); -+ if (p_180614_6_ == EnumFacing.UP && p_180614_2_.func_175151_a(p_180614_4_.func_177972_a(p_180614_6_), p_180614_6_, p_180614_1_) && state.func_177230_c().canSustainPlant(state, p_180614_3_, p_180614_4_, EnumFacing.UP, this) && p_180614_3_.func_175623_d(p_180614_4_.func_177984_a())) + ItemStack itemstack = p_180614_1_.func_184586_b(p_180614_4_); +- +- if (p_180614_5_ == EnumFacing.UP && p_180614_1_.func_175151_a(p_180614_3_.func_177972_a(p_180614_5_), p_180614_5_, itemstack) && p_180614_2_.func_180495_p(p_180614_3_).func_177230_c() == this.field_82809_c && p_180614_2_.func_175623_d(p_180614_3_.func_177984_a())) ++ net.minecraft.block.state.IBlockState state = p_180614_2_.func_180495_p(p_180614_3_); ++ if (p_180614_5_ == EnumFacing.UP && p_180614_1_.func_175151_a(p_180614_3_.func_177972_a(p_180614_5_), p_180614_5_, itemstack) && state.func_177230_c().canSustainPlant(state, p_180614_2_, p_180614_3_, EnumFacing.UP, this) && p_180614_2_.func_175623_d(p_180614_3_.func_177984_a())) { - p_180614_3_.func_180501_a(p_180614_4_.func_177984_a(), this.field_150908_b.func_176223_P(), 11); - --p_180614_1_.field_77994_a; -@@ -33,4 +34,16 @@ + p_180614_2_.func_180501_a(p_180614_3_.func_177984_a(), this.field_150908_b.func_176223_P(), 11); + itemstack.func_190918_g(1); +@@ -35,4 +35,16 @@ return EnumActionResult.FAIL; } } diff --git a/patches/minecraft/net/minecraft/item/ItemSeeds.java.patch b/patches/minecraft/net/minecraft/item/ItemSeeds.java.patch index ffb8aacc5..fc14c78f0 100644 --- a/patches/minecraft/net/minecraft/item/ItemSeeds.java.patch +++ b/patches/minecraft/net/minecraft/item/ItemSeeds.java.patch @@ -9,17 +9,18 @@ { private final Block field_150925_a; private final Block field_77838_b; -@@ -23,7 +23,8 @@ - - public EnumActionResult func_180614_a(ItemStack p_180614_1_, EntityPlayer p_180614_2_, World p_180614_3_, BlockPos p_180614_4_, EnumHand p_180614_5_, EnumFacing p_180614_6_, float p_180614_7_, float p_180614_8_, float p_180614_9_) +@@ -24,8 +24,8 @@ + public EnumActionResult func_180614_a(EntityPlayer p_180614_1_, World p_180614_2_, BlockPos p_180614_3_, EnumHand p_180614_4_, EnumFacing p_180614_5_, float p_180614_6_, float p_180614_7_, float p_180614_8_) { -- if (p_180614_6_ == EnumFacing.UP && p_180614_2_.func_175151_a(p_180614_4_.func_177972_a(p_180614_6_), p_180614_6_, p_180614_1_) && p_180614_3_.func_180495_p(p_180614_4_).func_177230_c() == this.field_77838_b && p_180614_3_.func_175623_d(p_180614_4_.func_177984_a())) -+ net.minecraft.block.state.IBlockState state = p_180614_3_.func_180495_p(p_180614_4_); -+ if (p_180614_6_ == EnumFacing.UP && p_180614_2_.func_175151_a(p_180614_4_.func_177972_a(p_180614_6_), p_180614_6_, p_180614_1_) && state.func_177230_c().canSustainPlant(state, p_180614_3_, p_180614_4_, EnumFacing.UP, this) && p_180614_3_.func_175623_d(p_180614_4_.func_177984_a())) + ItemStack itemstack = p_180614_1_.func_184586_b(p_180614_4_); +- +- if (p_180614_5_ == EnumFacing.UP && p_180614_1_.func_175151_a(p_180614_3_.func_177972_a(p_180614_5_), p_180614_5_, itemstack) && p_180614_2_.func_180495_p(p_180614_3_).func_177230_c() == this.field_77838_b && p_180614_2_.func_175623_d(p_180614_3_.func_177984_a())) ++ net.minecraft.block.state.IBlockState state = p_180614_2_.func_180495_p(p_180614_3_); ++ if (p_180614_5_ == EnumFacing.UP && p_180614_1_.func_175151_a(p_180614_3_.func_177972_a(p_180614_5_), p_180614_5_, itemstack) && state.func_177230_c().canSustainPlant(state, p_180614_2_, p_180614_3_, EnumFacing.UP, this) && p_180614_2_.func_175623_d(p_180614_3_.func_177984_a())) { - p_180614_3_.func_175656_a(p_180614_4_.func_177984_a(), this.field_150925_a.func_176223_P()); - --p_180614_1_.field_77994_a; -@@ -34,4 +35,16 @@ + p_180614_2_.func_175656_a(p_180614_3_.func_177984_a(), this.field_150925_a.func_176223_P()); + itemstack.func_190918_g(1); +@@ -36,4 +36,16 @@ return EnumActionResult.FAIL; } } diff --git a/patches/minecraft/net/minecraft/item/ItemShears.java.patch b/patches/minecraft/net/minecraft/item/ItemShears.java.patch index 3746b62ab..4abe80219 100644 --- a/patches/minecraft/net/minecraft/item/ItemShears.java.patch +++ b/patches/minecraft/net/minecraft/item/ItemShears.java.patch @@ -1,15 +1,15 @@ --- ../src-base/minecraft/net/minecraft/item/ItemShears.java +++ ../src-work/minecraft/net/minecraft/item/ItemShears.java -@@ -22,7 +22,7 @@ - { - p_179218_1_.func_77972_a(1, p_179218_5_); +@@ -26,7 +26,7 @@ + } + Block block = p_179218_3_.func_177230_c(); - return p_179218_3_.func_185904_a() != Material.field_151584_j && block != Blocks.field_150321_G && block != Blocks.field_150329_H && block != Blocks.field_150395_bd && block != Blocks.field_150473_bD && block != Blocks.field_150325_L ? super.func_179218_a(p_179218_1_, p_179218_2_, p_179218_3_, p_179218_4_, p_179218_5_) : true; + return p_179218_3_.func_185904_a() != Material.field_151584_j && block != Blocks.field_150321_G && block != Blocks.field_150329_H && block != Blocks.field_150395_bd && block != Blocks.field_150473_bD && block != Blocks.field_150325_L && !(p_179218_3_ instanceof net.minecraftforge.common.IShearable) ? super.func_179218_a(p_179218_1_, p_179218_2_, p_179218_3_, p_179218_4_, p_179218_5_) : true; } public boolean func_150897_b(IBlockState p_150897_1_) -@@ -36,4 +36,71 @@ +@@ -40,4 +40,71 @@ Block block = p_150893_2_.func_177230_c(); return block != Blocks.field_150321_G && p_150893_2_.func_185904_a() != Material.field_151584_j ? (block == Blocks.field_150325_L ? 5.0F : super.func_150893_a(p_150893_1_, p_150893_2_)) : 15.0F; } diff --git a/patches/minecraft/net/minecraft/item/ItemSkull.java.patch b/patches/minecraft/net/minecraft/item/ItemSkull.java.patch index ac5e80329..cabea4855 100644 --- a/patches/minecraft/net/minecraft/item/ItemSkull.java.patch +++ b/patches/minecraft/net/minecraft/item/ItemSkull.java.patch @@ -1,22 +1,22 @@ --- ../src-base/minecraft/net/minecraft/item/ItemSkull.java +++ ../src-work/minecraft/net/minecraft/item/ItemSkull.java -@@ -42,13 +42,18 @@ +@@ -43,13 +43,18 @@ } else { -+ if (p_180614_3_.func_180495_p(p_180614_4_).func_177230_c().func_176200_f(p_180614_3_, p_180614_4_)) ++ if (p_180614_2_.func_180495_p(p_180614_3_).func_177230_c().func_176200_f(p_180614_2_, p_180614_3_)) + { -+ p_180614_6_ = EnumFacing.UP; -+ p_180614_4_ = p_180614_4_.func_177977_b(); ++ p_180614_5_ = EnumFacing.UP; ++ p_180614_3_ = p_180614_3_.func_177977_b(); + } - IBlockState iblockstate = p_180614_3_.func_180495_p(p_180614_4_); + IBlockState iblockstate = p_180614_2_.func_180495_p(p_180614_3_); Block block = iblockstate.func_177230_c(); - boolean flag = block.func_176200_f(p_180614_3_, p_180614_4_); + boolean flag = block.func_176200_f(p_180614_2_, p_180614_3_); if (!flag) { -- if (!p_180614_3_.func_180495_p(p_180614_4_).func_185904_a().func_76220_a()) -+ if (!p_180614_3_.func_180495_p(p_180614_4_).func_185904_a().func_76220_a() && !p_180614_3_.isSideSolid(p_180614_4_, p_180614_6_, true)) +- if (!p_180614_2_.func_180495_p(p_180614_3_).func_185904_a().func_76220_a()) ++ if (!p_180614_2_.func_180495_p(p_180614_3_).func_185904_a().func_76220_a() && !p_180614_2_.isSideSolid(p_180614_3_, p_180614_5_, true)) { return EnumActionResult.FAIL; } diff --git a/patches/minecraft/net/minecraft/item/ItemSlab.java.patch b/patches/minecraft/net/minecraft/item/ItemSlab.java.patch index e9581998e..da817c640 100644 --- a/patches/minecraft/net/minecraft/item/ItemSlab.java.patch +++ b/patches/minecraft/net/minecraft/item/ItemSlab.java.patch @@ -1,20 +1,20 @@ --- ../src-base/minecraft/net/minecraft/item/ItemSlab.java +++ ../src-work/minecraft/net/minecraft/item/ItemSlab.java -@@ -60,7 +60,7 @@ +@@ -62,7 +62,7 @@ - if (axisalignedbb != Block.field_185506_k && p_180614_3_.func_72855_b(axisalignedbb.func_186670_a(p_180614_4_)) && p_180614_3_.func_180501_a(p_180614_4_, iblockstate1, 11)) + if (axisalignedbb != Block.field_185506_k && p_180614_2_.func_72855_b(axisalignedbb.func_186670_a(p_180614_3_)) && p_180614_2_.func_180501_a(p_180614_3_, iblockstate1, 11)) { - SoundType soundtype = this.field_179226_c.func_185467_w(); -+ SoundType soundtype = this.field_179226_c.getSoundType(iblockstate1, p_180614_3_, p_180614_4_,p_180614_2_); - p_180614_3_.func_184133_a(p_180614_2_, p_180614_4_, soundtype.func_185841_e(), SoundCategory.BLOCKS, (soundtype.func_185843_a() + 1.0F) / 2.0F, soundtype.func_185847_b() * 0.8F); - --p_180614_1_.field_77994_a; ++ SoundType soundtype = this.field_179226_c.getSoundType(iblockstate1, p_180614_2_, p_180614_3_, p_180614_1_); + p_180614_2_.func_184133_a(p_180614_1_, p_180614_3_, soundtype.func_185841_e(), SoundCategory.BLOCKS, (soundtype.func_185843_a() + 1.0F) / 2.0F, soundtype.func_185847_b() * 0.8F); + itemstack.func_190918_g(1); } -@@ -115,7 +115,7 @@ +@@ -117,7 +117,7 @@ if (axisalignedbb != Block.field_185506_k && p_180615_3_.func_72855_b(axisalignedbb.func_186670_a(p_180615_4_)) && p_180615_3_.func_180501_a(p_180615_4_, iblockstate1, 11)) { - SoundType soundtype = this.field_179226_c.func_185467_w(); + SoundType soundtype = this.field_179226_c.getSoundType(iblockstate1, p_180615_3_, p_180615_4_, p_180615_1_); p_180615_3_.func_184133_a(p_180615_1_, p_180615_4_, soundtype.func_185841_e(), SoundCategory.BLOCKS, (soundtype.func_185843_a() + 1.0F) / 2.0F, soundtype.func_185847_b() * 0.8F); - --p_180615_2_.field_77994_a; + p_180615_2_.func_190918_g(1); } diff --git a/patches/minecraft/net/minecraft/item/ItemSnow.java.patch b/patches/minecraft/net/minecraft/item/ItemSnow.java.patch index 553dc9125..9a591f322 100644 --- a/patches/minecraft/net/minecraft/item/ItemSnow.java.patch +++ b/patches/minecraft/net/minecraft/item/ItemSnow.java.patch @@ -1,15 +1,15 @@ --- ../src-base/minecraft/net/minecraft/item/ItemSnow.java +++ ../src-work/minecraft/net/minecraft/item/ItemSnow.java -@@ -48,7 +48,7 @@ +@@ -49,7 +49,7 @@ - if (axisalignedbb != Block.field_185506_k && p_180614_3_.func_72855_b(axisalignedbb.func_186670_a(blockpos)) && p_180614_3_.func_180501_a(blockpos, iblockstate1, 10)) + if (axisalignedbb != Block.field_185506_k && p_180614_2_.func_72855_b(axisalignedbb.func_186670_a(blockpos)) && p_180614_2_.func_180501_a(blockpos, iblockstate1, 10)) { - SoundType soundtype = this.field_150939_a.func_185467_w(); -+ SoundType soundtype = this.field_150939_a.getSoundType(iblockstate1, p_180614_3_, blockpos, p_180614_2_); - p_180614_3_.func_184133_a(p_180614_2_, blockpos, soundtype.func_185841_e(), SoundCategory.BLOCKS, (soundtype.func_185843_a() + 1.0F) / 2.0F, soundtype.func_185847_b() * 0.8F); - --p_180614_1_.field_77994_a; ++ SoundType soundtype = this.field_150939_a.getSoundType(iblockstate1, p_180614_2_, p_180614_3_, p_180614_1_); + p_180614_2_.func_184133_a(p_180614_1_, blockpos, soundtype.func_185841_e(), SoundCategory.BLOCKS, (soundtype.func_185843_a() + 1.0F) / 2.0F, soundtype.func_185847_b() * 0.8F); + itemstack.func_190918_g(1); return EnumActionResult.SUCCESS; -@@ -68,4 +68,10 @@ +@@ -69,4 +69,10 @@ { return p_77647_1_; } diff --git a/patches/minecraft/net/minecraft/item/ItemStack.java.patch b/patches/minecraft/net/minecraft/item/ItemStack.java.patch index 254ac9207..a0566782d 100644 --- a/patches/minecraft/net/minecraft/item/ItemStack.java.patch +++ b/patches/minecraft/net/minecraft/item/ItemStack.java.patch @@ -1,15 +1,15 @@ --- ../src-base/minecraft/net/minecraft/item/ItemStack.java +++ ../src-work/minecraft/net/minecraft/item/ItemStack.java -@@ -46,7 +46,7 @@ +@@ -47,7 +47,7 @@ import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; -public final class ItemStack +public final class ItemStack implements net.minecraftforge.common.capabilities.ICapabilitySerializable { + public static final ItemStack field_190927_a = new ItemStack((Item)null); public static final DecimalFormat field_111284_a = new DecimalFormat("#.##"); - public int field_77994_a; -@@ -60,6 +60,10 @@ +@@ -63,6 +63,10 @@ private Block field_179550_j; private boolean field_179551_k; @@ -20,7 +20,7 @@ public ItemStack(Block p_i1876_1_) { this((Block)p_i1876_1_, 1); -@@ -85,9 +89,11 @@ +@@ -88,8 +92,10 @@ this((Item)p_i1880_1_, p_i1880_2_, 0); } @@ -28,36 +28,58 @@ + public ItemStack(Item p_i1881_1_, int p_i1881_2_, int p_i1881_3_){ this(p_i1881_1_, p_i1881_2_, p_i1881_3_, null); } + public ItemStack(Item p_i1881_1_, int p_i1881_2_, int p_i1881_3_, NBTTagCompound capNBT) { -- this.field_151002_e = p_i1881_1_; + this.capNBT = capNBT; -+ this.func_150996_a(p_i1881_1_); - this.field_77994_a = p_i1881_2_; + this.field_151002_e = p_i1881_1_; this.field_77991_e = p_i1881_3_; - -@@ -117,7 +123,7 @@ - public ItemStack func_77979_a(int p_77979_1_) + this.field_77994_a = p_i1881_2_; +@@ -105,10 +111,12 @@ + private void func_190923_F() { - p_77979_1_ = Math.min(p_77979_1_, this.field_77994_a); -- ItemStack itemstack = new ItemStack(this.field_151002_e, p_77979_1_, this.field_77991_e); -+ ItemStack itemstack = new ItemStack(this.field_151002_e, p_77979_1_, this.field_77991_e, this.capabilities != null ? this.capabilities.serializeNBT() : null); + this.field_190928_g = this.func_190926_b(); ++ this.delegate = this.field_151002_e != null ? this.field_151002_e.delegate : null; + } - if (this.field_77990_d != null) - { -@@ -130,11 +136,12 @@ + public ItemStack(NBTTagCompound p_i47263_1_) + { ++ this.capNBT = p_i47263_1_.func_74764_b("ForgeCaps") ? p_i47263_1_.func_74775_l("ForgeCaps") : null; + this.field_151002_e = Item.func_111206_d(p_i47263_1_.func_74779_i("id")); + this.field_77994_a = p_i47263_1_.func_74771_c("Count"); + this.field_77991_e = Math.max(0, p_i47263_1_.func_74765_d("Damage")); +@@ -148,11 +156,12 @@ public Item func_77973_b() { -- return this.field_151002_e; -+ return this.delegate != null ? this.delegate.get() : null; +- return this.field_190928_g ? Item.func_150898_a(Blocks.field_150350_a) : this.field_151002_e; ++ return this.field_190928_g || this.delegate == null ? Item.func_150898_a(Blocks.field_150350_a) : this.delegate.get(); } public EnumActionResult func_179546_a(EntityPlayer p_179546_1_, World p_179546_2_, BlockPos p_179546_3_, EnumHand p_179546_4_, EnumFacing p_179546_5_, float p_179546_6_, float p_179546_7_, float p_179546_8_) { + if (!p_179546_2_.field_72995_K) return net.minecraftforge.common.ForgeHooks.onPlaceItemIntoWorld(this, p_179546_1_, p_179546_2_, p_179546_3_, p_179546_5_, p_179546_6_, p_179546_7_, p_179546_8_, p_179546_4_); - EnumActionResult enumactionresult = this.func_77973_b().func_180614_a(this, p_179546_1_, p_179546_2_, p_179546_3_, p_179546_4_, p_179546_5_, p_179546_6_, p_179546_7_, p_179546_8_); + EnumActionResult enumactionresult = this.func_77973_b().func_180614_a(p_179546_1_, p_179546_2_, p_179546_3_, p_179546_4_, p_179546_5_, p_179546_6_, p_179546_7_, p_179546_8_); if (enumactionresult == EnumActionResult.SUCCESS) -@@ -173,12 +180,20 @@ +@@ -163,6 +172,19 @@ + return enumactionresult; + } + ++ public EnumActionResult onItemUseFirst(EntityPlayer playerIn, World worldIn, BlockPos pos, EnumHand hand, EnumFacing side, float hitX, float hitY, float hitZ) ++ { ++ // copy of onitemuse but for onitemusefirst ++ EnumActionResult enumactionresult = this.func_77973_b().onItemUseFirst(playerIn, worldIn, pos, side, hitX, hitY, hitZ, hand); ++ ++ if (enumactionresult == EnumActionResult.SUCCESS) ++ { ++ playerIn.func_71029_a(StatList.func_188057_b(this.field_151002_e)); ++ } ++ ++ return enumactionresult; ++ } ++ + public float func_150997_a(IBlockState p_150997_1_) + { + return this.func_77973_b().func_150893_a(this, p_150997_1_); +@@ -190,12 +212,18 @@ p_77955_1_.func_74782_a("tag", this.field_77990_d); } @@ -70,22 +92,6 @@ return p_77955_1_; } - public void func_77963_c(NBTTagCompound p_77963_1_) - { -- this.field_151002_e = Item.func_111206_d(p_77963_1_.func_74779_i("id")); -+ this.capNBT = p_77963_1_.func_74764_b("ForgeCaps") ? p_77963_1_.func_74775_l("ForgeCaps") : null; -+ this.func_150996_a(Item.func_111206_d(p_77963_1_.func_74779_i("id"))); -+ this.capNBT = null; - this.field_77994_a = p_77963_1_.func_74771_c("Count"); - this.field_77991_e = p_77963_1_.func_74765_d("Damage"); - -@@ -196,11 +211,12 @@ - this.field_151002_e.func_179215_a(this.field_77990_d); - } - } -+ else this.field_77990_d = null; - } - public int func_77976_d() { - return this.func_77973_b().func_77639_j(); @@ -93,16 +99,16 @@ } public boolean func_77985_e() -@@ -210,7 +226,7 @@ +@@ -205,7 +233,7 @@ public boolean func_77984_f() { -- return this.field_151002_e == null ? false : (this.field_151002_e.func_77612_l() <= 0 ? false : !this.func_77942_o() || !this.func_77978_p().func_74767_n("Unbreakable")); -+ return this.field_151002_e == null ? false : (this.field_151002_e.getMaxDamage(this) <= 0 ? false : !this.func_77942_o() || !this.func_77978_p().func_74767_n("Unbreakable")); +- return this.field_190928_g ? false : (this.field_151002_e.func_77612_l() <= 0 ? false : !this.func_77942_o() || !this.func_77978_p().func_74767_n("Unbreakable")); ++ return this.field_190928_g ? false : (this.field_151002_e.getMaxDamage(this) <= 0 ? false : !this.func_77942_o() || !this.func_77978_p().func_74767_n("Unbreakable")); } public boolean func_77981_g() -@@ -220,32 +236,27 @@ +@@ -215,32 +243,27 @@ public boolean func_77951_h() { @@ -135,12 +141,12 @@ public int func_77958_k() { -- return this.field_151002_e == null ? 0 : this.field_151002_e.func_77612_l(); -+ return this.field_151002_e == null ? 0 : this.field_151002_e.getMaxDamage(this); +- return this.func_77973_b().func_77612_l(); ++ return this.func_77973_b().getMaxDamage(this); } public boolean func_96631_a(int p_96631_1_, Random p_96631_2_) -@@ -277,8 +288,8 @@ +@@ -272,8 +295,8 @@ } } @@ -151,16 +157,16 @@ } } -@@ -332,7 +343,7 @@ +@@ -322,7 +345,7 @@ public boolean func_150998_b(IBlockState p_150998_1_) { -- return this.field_151002_e.func_150897_b(p_150998_1_); -+ return func_77973_b().canHarvestBlock(p_150998_1_, this); +- return this.func_77973_b().func_150897_b(p_150998_1_); ++ return this.func_77973_b().canHarvestBlock(p_150998_1_, this); } public boolean func_111282_a(EntityPlayer p_111282_1_, EntityLivingBase p_111282_2_, EnumHand p_111282_3_) -@@ -342,7 +353,7 @@ +@@ -332,7 +355,7 @@ public ItemStack func_77946_l() { @@ -169,41 +175,7 @@ if (this.field_77990_d != null) { -@@ -354,7 +365,19 @@ - - public static boolean func_77970_a(@Nullable ItemStack p_77970_0_, @Nullable ItemStack p_77970_1_) - { -- return p_77970_0_ == null && p_77970_1_ == null ? true : (p_77970_0_ != null && p_77970_1_ != null ? (p_77970_0_.field_77990_d == null && p_77970_1_.field_77990_d != null ? false : p_77970_0_.field_77990_d == null || p_77970_0_.field_77990_d.equals(p_77970_1_.field_77990_d)) : false); -+ if (p_77970_0_ == null && p_77970_1_ == null) return true; -+ if (p_77970_0_ == null && p_77970_1_ != null) return false; -+ if (p_77970_0_ != null && p_77970_1_ == null) return false; -+ if (p_77970_0_.field_77990_d == null && p_77970_1_.field_77990_d != null) return false; -+ if (p_77970_0_.field_77990_d != null && p_77970_1_.field_77990_d == null) return false; -+ if (p_77970_0_.field_77990_d != null && !p_77970_0_.field_77990_d.equals(p_77970_1_.field_77990_d)) return false; -+ if (p_77970_0_.capabilities != null || p_77970_1_.capabilities != null) -+ { -+ boolean ret = p_77970_0_.capabilities != null ? p_77970_0_.capabilities.areCompatible(p_77970_1_.capabilities) : p_77970_1_.capabilities.areCompatible(null); -+ if (!ret) return false; -+ } -+ -+ return true; - } - - public static boolean func_77989_b(@Nullable ItemStack p_77989_0_, @Nullable ItemStack p_77989_1_) -@@ -364,7 +387,11 @@ - - private boolean func_77959_d(ItemStack p_77959_1_) - { -- return this.field_77994_a != p_77959_1_.field_77994_a ? false : (this.field_151002_e != p_77959_1_.field_151002_e ? false : (this.field_77991_e != p_77959_1_.field_77991_e ? false : (this.field_77990_d == null && p_77959_1_.field_77990_d != null ? false : this.field_77990_d == null || this.field_77990_d.equals(p_77959_1_.field_77990_d)))); -+ if (this.field_77994_a != p_77959_1_.field_77994_a) return false; -+ if (this.field_151002_e != p_77959_1_.field_151002_e) return false; -+ if (this.field_77991_e != p_77959_1_.field_77991_e) return false; -+ if (!ItemStack.func_77970_a(this, p_77959_1_)) return false; -+ return true; - } - - public static boolean func_179545_c(@Nullable ItemStack p_179545_0_, @Nullable ItemStack p_179545_1_) -@@ -764,6 +791,7 @@ +@@ -758,6 +781,7 @@ } } @@ -211,7 +183,7 @@ return list; } -@@ -875,7 +903,7 @@ +@@ -869,7 +893,7 @@ } else { @@ -220,30 +192,10 @@ } return multimap; -@@ -908,6 +936,18 @@ - @Deprecated - public void func_150996_a(Item p_150996_1_) - { -+ if (p_150996_1_ == this.field_151002_e && field_151002_e != null && this.capabilities != null) //Item Didn't change but refreshed -+ { -+ net.minecraftforge.common.capabilities.ICapabilityProvider parent = field_151002_e.initCapabilities(this, this.capabilities.serializeNBT()); -+ this.capabilities = net.minecraftforge.event.ForgeEventFactory.gatherCapabilities(field_151002_e, this, parent); -+ } -+ else if (p_150996_1_ != this.field_151002_e && p_150996_1_ != null) // Item Changed -+ { -+ net.minecraftforge.common.capabilities.ICapabilityProvider parent = p_150996_1_.initCapabilities(this, this.capNBT); -+ this.capabilities = net.minecraftforge.event.ForgeEventFactory.gatherCapabilities(p_150996_1_, this, parent); -+ } -+ if (this.capNBT != null && this.capabilities != null) this.capabilities.deserializeNBT(this.capNBT); -+ this.delegate = p_150996_1_ != null ? p_150996_1_.delegate : null; - this.field_151002_e = p_150996_1_; - } - -@@ -993,4 +1033,45 @@ - return false; +@@ -982,6 +1006,50 @@ } } -+ + + public boolean hasCapability(net.minecraftforge.common.capabilities.Capability capability, net.minecraft.util.EnumFacing facing) + { + return this.capabilities == null ? false : this.capabilities.hasCapability(capability, facing); @@ -256,7 +208,10 @@ + + public void deserializeNBT(NBTTagCompound nbt) + { -+ this.func_77963_c(nbt); ++ // TODO do this better while respecting new rules ++ final ItemStack itemStack = new ItemStack(nbt); ++ this.field_77990_d = itemStack.field_77990_d; ++ this.capNBT = itemStack.capNBT; + } + + public NBTTagCompound serializeNBT() @@ -284,4 +239,7 @@ + return this.capabilities.areCompatible(other.capabilities); + } + } - } ++ + @SideOnly(Side.CLIENT) + public int func_190921_D() + { diff --git a/patches/minecraft/net/minecraft/item/crafting/FurnaceRecipes.java.patch b/patches/minecraft/net/minecraft/item/crafting/FurnaceRecipes.java.patch index fdeca6c9c..0d6a291aa 100644 --- a/patches/minecraft/net/minecraft/item/crafting/FurnaceRecipes.java.patch +++ b/patches/minecraft/net/minecraft/item/crafting/FurnaceRecipes.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/item/crafting/FurnaceRecipes.java +++ ../src-work/minecraft/net/minecraft/item/crafting/FurnaceRecipes.java -@@ -74,6 +74,7 @@ +@@ -73,6 +73,7 @@ public void func_151394_a(ItemStack p_151394_1_, ItemStack p_151394_2_, float p_151394_3_) { @@ -8,7 +8,7 @@ this.field_77604_b.put(p_151394_1_, p_151394_2_); this.field_77605_c.put(p_151394_2_, Float.valueOf(p_151394_3_)); } -@@ -104,6 +105,9 @@ +@@ -102,6 +103,9 @@ public float func_151398_b(ItemStack p_151398_1_) { diff --git a/patches/minecraft/net/minecraft/item/crafting/RecipeFireworks.java.patch b/patches/minecraft/net/minecraft/item/crafting/RecipeFireworks.java.patch index f21dd4979..08b6f29bd 100644 --- a/patches/minecraft/net/minecraft/item/crafting/RecipeFireworks.java.patch +++ b/patches/minecraft/net/minecraft/item/crafting/RecipeFireworks.java.patch @@ -22,16 +22,15 @@ return true; } else if (j == 1 && i == 0 && l == 0 && k > 0 && j1 <= 1) -@@ -252,11 +252,7 @@ - for (int i = 0; i < aitemstack.length; ++i) +@@ -251,10 +251,7 @@ { ItemStack itemstack = p_179532_1_.func_70301_a(i); -- -- if (itemstack != null && itemstack.func_77973_b().func_77634_r()) + +- if (itemstack.func_77973_b().func_77634_r()) - { -- aitemstack[i] = new ItemStack(itemstack.func_77973_b().func_77668_q()); +- nonnulllist.set(i, new ItemStack(itemstack.func_77973_b().func_77668_q())); - } -+ aitemstack[i] = net.minecraftforge.common.ForgeHooks.getContainerItem(itemstack); ++ nonnulllist.set(i, net.minecraftforge.common.ForgeHooks.getContainerItem(itemstack)); } - return aitemstack; + return nonnulllist; diff --git a/patches/minecraft/net/minecraft/item/crafting/RecipeRepairItem.java.patch b/patches/minecraft/net/minecraft/item/crafting/RecipeRepairItem.java.patch index c670ec8b4..6c650acf2 100644 --- a/patches/minecraft/net/minecraft/item/crafting/RecipeRepairItem.java.patch +++ b/patches/minecraft/net/minecraft/item/crafting/RecipeRepairItem.java.patch @@ -4,26 +4,26 @@ { ItemStack itemstack1 = (ItemStack)list.get(0); -- if (itemstack.func_77973_b() != itemstack1.func_77973_b() || itemstack1.field_77994_a != 1 || itemstack.field_77994_a != 1 || !itemstack1.func_77973_b().func_77645_m()) -+ if (itemstack.func_77973_b() != itemstack1.func_77973_b() || itemstack1.field_77994_a != 1 || itemstack.field_77994_a != 1 || !itemstack1.func_77973_b().isRepairable()) +- if (itemstack.func_77973_b() != itemstack1.func_77973_b() || itemstack1.func_190916_E() != 1 || itemstack.func_190916_E() != 1 || !itemstack1.func_77973_b().func_77645_m()) ++ if (itemstack.func_77973_b() != itemstack1.func_77973_b() || itemstack1.func_190916_E() != 1 || itemstack.func_190916_E() != 1 || !itemstack1.func_77973_b().isRepairable()) { return false; } -@@ -54,7 +54,7 @@ +@@ -53,7 +53,7 @@ { ItemStack itemstack1 = (ItemStack)list.get(0); -- if (itemstack.func_77973_b() != itemstack1.func_77973_b() || itemstack1.field_77994_a != 1 || itemstack.field_77994_a != 1 || !itemstack1.func_77973_b().func_77645_m()) -+ if (itemstack.func_77973_b() != itemstack1.func_77973_b() || itemstack1.field_77994_a != 1 || itemstack.field_77994_a != 1 || !itemstack1.func_77973_b().isRepairable()) +- if (itemstack.func_77973_b() != itemstack1.func_77973_b() || itemstack1.func_190916_E() != 1 || itemstack.func_190916_E() != 1 || !itemstack1.func_77973_b().func_77645_m()) ++ if (itemstack.func_77973_b() != itemstack1.func_77973_b() || itemstack1.func_190916_E() != 1 || itemstack.func_190916_E() != 1 || !itemstack1.func_77973_b().isRepairable()) { - return null; + return ItemStack.field_190927_a; } -@@ -67,13 +67,13 @@ +@@ -66,13 +66,13 @@ ItemStack itemstack2 = (ItemStack)list.get(0); ItemStack itemstack3 = (ItemStack)list.get(1); -- if (itemstack2.func_77973_b() == itemstack3.func_77973_b() && itemstack2.field_77994_a == 1 && itemstack3.field_77994_a == 1 && itemstack2.func_77973_b().func_77645_m()) -+ if (itemstack2.func_77973_b() == itemstack3.func_77973_b() && itemstack2.field_77994_a == 1 && itemstack3.field_77994_a == 1 && itemstack2.func_77973_b().isRepairable()) +- if (itemstack2.func_77973_b() == itemstack3.func_77973_b() && itemstack2.func_190916_E() == 1 && itemstack3.func_190916_E() == 1 && itemstack2.func_77973_b().func_77645_m()) ++ if (itemstack2.func_77973_b() == itemstack3.func_77973_b() && itemstack2.func_190916_E() == 1 && itemstack3.func_190916_E() == 1 && itemstack2.func_77973_b().isRepairable()) { - Item item = itemstack2.func_77973_b(); - int j = item.func_77612_l() - itemstack2.func_77952_i(); @@ -38,16 +38,16 @@ if (i1 < 0) { -@@ -105,11 +105,7 @@ - for (int i = 0; i < aitemstack.length; ++i) +@@ -103,11 +103,7 @@ + for (int i = 0; i < nonnulllist.size(); ++i) { ItemStack itemstack = p_179532_1_.func_70301_a(i); - -- if (itemstack != null && itemstack.func_77973_b().func_77634_r()) +- if (itemstack.func_77973_b().func_77634_r()) - { -- aitemstack[i] = new ItemStack(itemstack.func_77973_b().func_77668_q()); +- nonnulllist.set(i, new ItemStack(itemstack.func_77973_b().func_77668_q())); - } -+ aitemstack[i] = net.minecraftforge.common.ForgeHooks.getContainerItem(itemstack); ++ nonnulllist.set(i, net.minecraftforge.common.ForgeHooks.getContainerItem(itemstack)); } - return aitemstack; + return nonnulllist; diff --git a/patches/minecraft/net/minecraft/item/crafting/RecipesArmorDyes.java.patch b/patches/minecraft/net/minecraft/item/crafting/RecipesArmorDyes.java.patch index e4e23c561..44f27a779 100644 --- a/patches/minecraft/net/minecraft/item/crafting/RecipesArmorDyes.java.patch +++ b/patches/minecraft/net/minecraft/item/crafting/RecipesArmorDyes.java.patch @@ -1,15 +1,15 @@ --- ../src-base/minecraft/net/minecraft/item/crafting/RecipesArmorDyes.java +++ ../src-work/minecraft/net/minecraft/item/crafting/RecipesArmorDyes.java -@@ -149,11 +149,7 @@ - for (int i = 0; i < aitemstack.length; ++i) +@@ -147,11 +147,7 @@ + for (int i = 0; i < nonnulllist.size(); ++i) { ItemStack itemstack = p_179532_1_.func_70301_a(i); - -- if (itemstack != null && itemstack.func_77973_b().func_77634_r()) +- if (itemstack.func_77973_b().func_77634_r()) - { -- aitemstack[i] = new ItemStack(itemstack.func_77973_b().func_77668_q()); +- nonnulllist.set(i, new ItemStack(itemstack.func_77973_b().func_77668_q())); - } -+ aitemstack[i] = net.minecraftforge.common.ForgeHooks.getContainerItem(itemstack); ++ nonnulllist.set(i, net.minecraftforge.common.ForgeHooks.getContainerItem(itemstack)); } - return aitemstack; + return nonnulllist; diff --git a/patches/minecraft/net/minecraft/item/crafting/RecipesBanners.java.patch b/patches/minecraft/net/minecraft/item/crafting/RecipesBanners.java.patch index 8650ce003..530615f56 100644 --- a/patches/minecraft/net/minecraft/item/crafting/RecipesBanners.java.patch +++ b/patches/minecraft/net/minecraft/item/crafting/RecipesBanners.java.patch @@ -1,10 +1,10 @@ --- ../src-base/minecraft/net/minecraft/item/crafting/RecipesBanners.java +++ ../src-work/minecraft/net/minecraft/item/crafting/RecipesBanners.java -@@ -91,9 +91,10 @@ +@@ -93,9 +93,10 @@ { ItemStack itemstack2 = p_77572_1_.func_70301_a(j); -- if (itemstack2 != null && itemstack2.func_77973_b() == Items.field_151100_aR) +- if (itemstack2.func_77973_b() == Items.field_151100_aR) + int color = getColor(itemstack2); + if (color != -1) { @@ -13,38 +13,38 @@ break; } } -@@ -138,11 +139,7 @@ - for (int i = 0; i < aitemstack.length; ++i) +@@ -139,11 +140,7 @@ + for (int i = 0; i < nonnulllist.size(); ++i) { ItemStack itemstack = p_179532_1_.func_70301_a(i); - -- if (itemstack != null && itemstack.func_77973_b().func_77634_r()) +- if (itemstack.func_77973_b().func_77634_r()) - { -- aitemstack[i] = new ItemStack(itemstack.func_77973_b().func_77668_q()); +- nonnulllist.set(i, new ItemStack(itemstack.func_77973_b().func_77668_q())); - } -+ aitemstack[i] = net.minecraftforge.common.ForgeHooks.getContainerItem(itemstack); ++ nonnulllist.set(i, net.minecraftforge.common.ForgeHooks.getContainerItem(itemstack)); } - return aitemstack; -@@ -168,7 +165,7 @@ + return nonnulllist; +@@ -169,7 +166,7 @@ - if (itemstack != null && itemstack.func_77973_b() != Items.field_179564_cE) + if (!itemstack.func_190926_b() && itemstack.func_77973_b() != Items.field_179564_cE) { - if (itemstack.func_77973_b() == Items.field_151100_aR) + if (isDye(itemstack)) { if (flag2) { -@@ -208,7 +205,7 @@ +@@ -209,7 +206,7 @@ - if (itemstack1 != null && itemstack1.func_77973_b() != Items.field_179564_cE) + if (!itemstack1.func_190926_b() && itemstack1.func_77973_b() != Items.field_179564_cE) { - if (itemstack1.func_77973_b() != Items.field_151100_aR) + if (!isDye(itemstack1)) { flag = false; break; -@@ -249,6 +246,38 @@ +@@ -250,6 +247,38 @@ return null; } @@ -83,15 +83,15 @@ } public static class RecipeDuplicatePattern implements IRecipe -@@ -362,9 +391,9 @@ +@@ -361,9 +390,9 @@ - if (itemstack != null) + if (!itemstack.func_190926_b()) { - if (itemstack.func_77973_b().func_77634_r()) + if (itemstack.func_77973_b().hasContainerItem(itemstack)) { -- aitemstack[i] = new ItemStack(itemstack.func_77973_b().func_77668_q()); -+ aitemstack[i] = net.minecraftforge.common.ForgeHooks.getContainerItem(itemstack); +- nonnulllist.set(i, new ItemStack(itemstack.func_77973_b().func_77668_q())); ++ nonnulllist.set(i, net.minecraftforge.common.ForgeHooks.getContainerItem(itemstack)); } else if (itemstack.func_77942_o() && TileEntityBanner.func_175113_c(itemstack) > 0) { diff --git a/patches/minecraft/net/minecraft/item/crafting/RecipesMapCloning.java.patch b/patches/minecraft/net/minecraft/item/crafting/RecipesMapCloning.java.patch index 31f2fbe1d..073a6581f 100644 --- a/patches/minecraft/net/minecraft/item/crafting/RecipesMapCloning.java.patch +++ b/patches/minecraft/net/minecraft/item/crafting/RecipesMapCloning.java.patch @@ -1,15 +1,15 @@ --- ../src-base/minecraft/net/minecraft/item/crafting/RecipesMapCloning.java +++ ../src-work/minecraft/net/minecraft/item/crafting/RecipesMapCloning.java -@@ -111,11 +111,7 @@ - for (int i = 0; i < aitemstack.length; ++i) +@@ -114,11 +114,7 @@ + for (int i = 0; i < nonnulllist.size(); ++i) { ItemStack itemstack = p_179532_1_.func_70301_a(i); - -- if (itemstack != null && itemstack.func_77973_b().func_77634_r()) +- if (itemstack.func_77973_b().func_77634_r()) - { -- aitemstack[i] = new ItemStack(itemstack.func_77973_b().func_77668_q()); +- nonnulllist.set(i, new ItemStack(itemstack.func_77973_b().func_77668_q())); - } -+ aitemstack[i] = net.minecraftforge.common.ForgeHooks.getContainerItem(itemstack); ++ nonnulllist.set(i, net.minecraftforge.common.ForgeHooks.getContainerItem(itemstack)); } - return aitemstack; + return nonnulllist; diff --git a/patches/minecraft/net/minecraft/item/crafting/ShapedRecipes.java.patch b/patches/minecraft/net/minecraft/item/crafting/ShapedRecipes.java.patch index 719da837b..3f4ccc054 100644 --- a/patches/minecraft/net/minecraft/item/crafting/ShapedRecipes.java.patch +++ b/patches/minecraft/net/minecraft/item/crafting/ShapedRecipes.java.patch @@ -1,15 +1,15 @@ --- ../src-base/minecraft/net/minecraft/item/crafting/ShapedRecipes.java +++ ../src-work/minecraft/net/minecraft/item/crafting/ShapedRecipes.java -@@ -34,11 +34,7 @@ - for (int i = 0; i < aitemstack.length; ++i) +@@ -42,11 +42,7 @@ + for (int i = 0; i < nonnulllist.size(); ++i) { ItemStack itemstack = p_179532_1_.func_70301_a(i); - -- if (itemstack != null && itemstack.func_77973_b().func_77634_r()) +- if (itemstack.func_77973_b().func_77634_r()) - { -- aitemstack[i] = new ItemStack(itemstack.func_77973_b().func_77668_q()); +- nonnulllist.set(i, new ItemStack(itemstack.func_77973_b().func_77668_q())); - } -+ aitemstack[i] = net.minecraftforge.common.ForgeHooks.getContainerItem(itemstack); ++ nonnulllist.set(i, net.minecraftforge.common.ForgeHooks.getContainerItem(itemstack)); } - return aitemstack; + return nonnulllist; diff --git a/patches/minecraft/net/minecraft/item/crafting/ShapelessRecipes.java.patch b/patches/minecraft/net/minecraft/item/crafting/ShapelessRecipes.java.patch index 5cd70c62b..6429c0664 100644 --- a/patches/minecraft/net/minecraft/item/crafting/ShapelessRecipes.java.patch +++ b/patches/minecraft/net/minecraft/item/crafting/ShapelessRecipes.java.patch @@ -1,15 +1,15 @@ --- ../src-base/minecraft/net/minecraft/item/crafting/ShapelessRecipes.java +++ ../src-work/minecraft/net/minecraft/item/crafting/ShapelessRecipes.java -@@ -31,11 +31,7 @@ - for (int i = 0; i < aitemstack.length; ++i) +@@ -30,11 +30,7 @@ + for (int i = 0; i < nonnulllist.size(); ++i) { ItemStack itemstack = p_179532_1_.func_70301_a(i); - -- if (itemstack != null && itemstack.func_77973_b().func_77634_r()) +- if (itemstack.func_77973_b().func_77634_r()) - { -- aitemstack[i] = new ItemStack(itemstack.func_77973_b().func_77668_q()); +- nonnulllist.set(i, new ItemStack(itemstack.func_77973_b().func_77668_q())); - } -+ aitemstack[i] = net.minecraftforge.common.ForgeHooks.getContainerItem(itemstack); ++ nonnulllist.set(i, net.minecraftforge.common.ForgeHooks.getContainerItem(itemstack)); } - return aitemstack; + return nonnulllist; diff --git a/patches/minecraft/net/minecraft/network/NetHandlerPlayServer.java.patch b/patches/minecraft/net/minecraft/network/NetHandlerPlayServer.java.patch index fe2dcb358..a9639617d 100644 --- a/patches/minecraft/net/minecraft/network/NetHandlerPlayServer.java.patch +++ b/patches/minecraft/net/minecraft/network/NetHandlerPlayServer.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/network/NetHandlerPlayServer.java +++ ../src-work/minecraft/net/minecraft/network/NetHandlerPlayServer.java -@@ -611,7 +611,10 @@ +@@ -606,7 +606,10 @@ double d2 = this.field_147369_b.field_70161_v - ((double)blockpos.func_177952_p() + 0.5D); double d3 = d0 * d0 + d1 * d1 + d2 * d2; @@ -12,7 +12,7 @@ { return; } -@@ -669,7 +672,9 @@ +@@ -664,7 +667,9 @@ if (blockpos.func_177956_o() < this.field_147367_d.func_71207_Z() - 1 || enumfacing != EnumFacing.UP && blockpos.func_177956_o() < this.field_147367_d.func_71207_Z()) { @@ -23,23 +23,7 @@ { this.field_147369_b.field_71134_c.func_187251_a(this.field_147369_b, worldserver, itemstack, enumhand, blockpos, enumfacing, p_184337_1_.func_187026_d(), p_184337_1_.func_187025_e(), p_184337_1_.func_187020_f()); } -@@ -688,6 +693,7 @@ - if (itemstack != null && itemstack.field_77994_a == 0) - { - this.field_147369_b.func_184611_a(enumhand, (ItemStack)null); -+ net.minecraftforge.event.ForgeEventFactory.onPlayerDestroyItem(this.field_147369_b, itemstack, enumhand); - } - } - -@@ -707,6 +713,7 @@ - if (itemstack != null && itemstack.field_77994_a == 0) - { - this.field_147369_b.func_184611_a(enumhand, (ItemStack)null); -+ net.minecraftforge.event.ForgeEventFactory.onPlayerDestroyItem(this.field_147369_b, itemstack, enumhand); - itemstack = null; - } - } -@@ -886,7 +893,9 @@ +@@ -868,7 +873,9 @@ } else { @@ -50,15 +34,15 @@ this.field_147367_d.func_184103_al().func_148544_a(itextcomponent, false); } -@@ -1016,6 +1025,7 @@ +@@ -1001,6 +1008,7 @@ + else if (p_147340_1_.func_149565_c() == CPacketUseEntity.Action.INTERACT_AT) { EnumHand enumhand1 = p_147340_1_.func_186994_b(); - ItemStack itemstack1 = this.field_147369_b.func_184586_b(enumhand1); -+ if(net.minecraftforge.common.ForgeHooks.onInteractEntityAt(field_147369_b, entity, p_147340_1_.func_179712_b(), itemstack1, enumhand1)) return; - entity.func_184199_a(this.field_147369_b, p_147340_1_.func_179712_b(), itemstack1, enumhand1); ++ if(net.minecraftforge.common.ForgeHooks.onInteractEntityAt(field_147369_b, entity, p_147340_1_.func_179712_b(), enumhand1)) return; + entity.func_184199_a(this.field_147369_b, p_147340_1_.func_179712_b(), enumhand1); } else if (p_147340_1_.func_149565_c() == CPacketUseEntity.Action.ATTACK) -@@ -1055,7 +1065,7 @@ +@@ -1040,7 +1048,7 @@ return; } diff --git a/patches/minecraft/net/minecraft/potion/PotionType.java.patch b/patches/minecraft/net/minecraft/potion/PotionType.java.patch index 56a32b480..6c7d18233 100644 --- a/patches/minecraft/net/minecraft/potion/PotionType.java.patch +++ b/patches/minecraft/net/minecraft/potion/PotionType.java.patch @@ -1,14 +1,14 @@ --- ../src-base/minecraft/net/minecraft/potion/PotionType.java +++ ../src-work/minecraft/net/minecraft/potion/PotionType.java -@@ -9,10 +9,11 @@ - import net.minecraftforge.fml.relauncher.Side; - import net.minecraftforge.fml.relauncher.SideOnly; +@@ -8,10 +8,11 @@ + import net.minecraft.util.ResourceLocation; + import net.minecraft.util.registry.RegistryNamespacedDefaultedByKey; -public class PotionType +public class PotionType extends net.minecraftforge.fml.common.registry.IForgeRegistryEntry.Impl { + @Deprecated // unused - private static final ResourceLocation field_185177_b = new ResourceLocation("water"); + private static final ResourceLocation field_185177_b = new ResourceLocation("empty"); - public static final RegistryNamespacedDefaultedByKey field_185176_a = new RegistryNamespacedDefaultedByKey(field_185177_b); + public static final RegistryNamespacedDefaultedByKey field_185176_a = net.minecraftforge.fml.common.registry.GameData.getPotionTypesRegistry(); private static int field_185178_c; diff --git a/patches/minecraft/net/minecraft/realms/RealmsConnect.java.patch b/patches/minecraft/net/minecraft/realms/RealmsConnect.java.patch index 6a6839fca..8f6e95346 100644 --- a/patches/minecraft/net/minecraft/realms/RealmsConnect.java.patch +++ b/patches/minecraft/net/minecraft/realms/RealmsConnect.java.patch @@ -12,8 +12,8 @@ return; } -- RealmsConnect.this.connection.func_179290_a(new C00Handshake(210, p_connect_1_, p_connect_2_, EnumConnectionState.LOGIN)); -+ RealmsConnect.this.connection.func_179290_a(new C00Handshake(210, p_connect_1_, p_connect_2_, EnumConnectionState.LOGIN, true)); +- RealmsConnect.this.connection.func_179290_a(new C00Handshake(314, p_connect_1_, p_connect_2_, EnumConnectionState.LOGIN)); ++ RealmsConnect.this.connection.func_179290_a(new C00Handshake(314, p_connect_1_, p_connect_2_, EnumConnectionState.LOGIN, true)); if (RealmsConnect.this.aborted) { diff --git a/patches/minecraft/net/minecraft/server/MinecraftServer.java.patch b/patches/minecraft/net/minecraft/server/MinecraftServer.java.patch index a4291f466..d75bd1025 100644 --- a/patches/minecraft/net/minecraft/server/MinecraftServer.java.patch +++ b/patches/minecraft/net/minecraft/server/MinecraftServer.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/server/MinecraftServer.java +++ ../src-work/minecraft/net/minecraft/server/MinecraftServer.java -@@ -103,7 +103,7 @@ +@@ -105,7 +105,7 @@ @SideOnly(Side.SERVER) private String field_71320_r; private int field_71319_s = -1; @@ -9,7 +9,7 @@ private PlayerList field_71318_t; private boolean field_71317_u = true; private boolean field_71316_v; -@@ -120,7 +120,8 @@ +@@ -123,7 +123,8 @@ private int field_71280_D; private int field_143008_E; public final long[] field_71311_j = new long[100]; @@ -19,7 +19,7 @@ private KeyPair field_71292_I; private String field_71293_J; private String field_71294_K; -@@ -218,8 +219,6 @@ +@@ -222,8 +223,6 @@ { this.func_71237_c(p_71247_1_); this.func_71192_d("menu.loadingLevel"); @@ -28,7 +28,7 @@ ISaveHandler isavehandler = this.field_71310_m.func_75804_a(p_71247_1_, true); this.func_175584_a(this.func_71270_I(), isavehandler); WorldInfo worldinfo = isavehandler.func_75757_d(); -@@ -250,47 +249,21 @@ +@@ -254,47 +253,21 @@ worldsettings = new WorldSettings(worldinfo); } @@ -84,7 +84,7 @@ this.func_147139_a(this.func_147135_j()); this.func_71222_d(); } -@@ -305,7 +278,7 @@ +@@ -309,7 +282,7 @@ this.func_71192_d("menu.generatingTerrain"); int j1 = 0; field_147145_h.info("Preparing start region for level 0"); @@ -93,7 +93,7 @@ BlockPos blockpos = worldserver.func_175694_M(); long k1 = func_130071_aq(); -@@ -423,9 +396,16 @@ +@@ -434,9 +407,16 @@ { if (worldserver1 != null) { @@ -110,7 +110,7 @@ } if (this.field_71307_n.func_76468_d()) -@@ -450,6 +430,7 @@ +@@ -461,6 +441,7 @@ { if (this.func_71197_b()) { @@ -118,7 +118,7 @@ this.field_175591_ab = func_130071_aq(); long i = 0L; this.field_147147_p.func_151315_a(new TextComponentString(this.field_71286_C)); -@@ -494,12 +475,20 @@ +@@ -505,12 +486,20 @@ Thread.sleep(Math.max(1L, 50L - i)); this.field_71296_Q = true; } @@ -139,7 +139,7 @@ catch (Throwable throwable1) { field_147145_h.error("Encountered an unexpected exception", throwable1); -@@ -525,14 +514,15 @@ +@@ -536,14 +525,15 @@ field_147145_h.error("We were unable to save this crash report to disk."); } @@ -156,7 +156,7 @@ } catch (Throwable throwable) { -@@ -540,6 +530,8 @@ +@@ -551,6 +541,8 @@ } finally { @@ -165,7 +165,7 @@ this.func_71240_o(); } } -@@ -607,6 +599,7 @@ +@@ -618,6 +610,7 @@ public void func_71217_p() { long i = System.nanoTime(); @@ -173,7 +173,7 @@ ++this.field_71315_w; if (this.field_71295_T) -@@ -633,6 +626,7 @@ +@@ -644,6 +637,7 @@ Collections.shuffle(Arrays.asList(agameprofile)); this.field_147147_p.func_151318_b().func_151330_a(agameprofile); @@ -181,7 +181,7 @@ } if (this.field_71315_w % 900 == 0) -@@ -660,6 +654,7 @@ +@@ -671,6 +665,7 @@ this.field_71304_b.func_76319_b(); this.field_71304_b.func_76319_b(); @@ -189,7 +189,7 @@ } public void func_71190_q() -@@ -675,24 +670,28 @@ +@@ -686,24 +681,28 @@ } this.field_71304_b.func_76318_c("levels"); @@ -222,7 +222,7 @@ try { -@@ -716,6 +715,7 @@ +@@ -727,6 +726,7 @@ throw new ReportedException(crashreport1); } @@ -230,7 +230,7 @@ this.field_71304_b.func_76319_b(); this.field_71304_b.func_76320_a("tracker"); worldserver.func_73039_n().func_72788_a(); -@@ -723,9 +723,11 @@ +@@ -734,9 +734,11 @@ this.field_71304_b.func_76319_b(); } @@ -243,7 +243,7 @@ this.field_71304_b.func_76318_c("connection"); this.func_147137_ag().func_151269_c(); this.field_71304_b.func_76318_c("players"); -@@ -747,6 +749,7 @@ +@@ -758,6 +760,7 @@ public void func_71256_s() { @@ -251,7 +251,7 @@ this.field_175590_aa = new Thread(this, "Server thread"); this.field_175590_aa.start(); } -@@ -763,7 +766,13 @@ +@@ -774,7 +777,13 @@ public WorldServer func_71218_a(int p_71218_1_) { @@ -266,7 +266,7 @@ } public String func_71249_w() -@@ -793,7 +802,7 @@ +@@ -804,7 +813,7 @@ public String getServerModName() { diff --git a/patches/minecraft/net/minecraft/server/dedicated/DedicatedServer.java.patch b/patches/minecraft/net/minecraft/server/dedicated/DedicatedServer.java.patch index bc0d9783b..1aec21b85 100644 --- a/patches/minecraft/net/minecraft/server/dedicated/DedicatedServer.java.patch +++ b/patches/minecraft/net/minecraft/server/dedicated/DedicatedServer.java.patch @@ -25,7 +25,7 @@ field_155771_h.info("Loading properties"); this.field_71340_o = new PropertyManager(new File("server.properties")); this.field_154332_n = new ServerEula(new File("eula.txt")); -@@ -207,6 +211,7 @@ +@@ -208,6 +212,7 @@ } else { @@ -33,7 +33,7 @@ this.func_184105_a(new DedicatedPlayerList(this)); long j = System.nanoTime(); -@@ -256,6 +261,7 @@ +@@ -257,6 +262,7 @@ TileEntitySkull.func_184293_a(this.func_152358_ax()); TileEntitySkull.func_184294_a(this.func_147130_as()); PlayerProfileCache.func_187320_a(this.func_71266_T()); @@ -41,7 +41,7 @@ field_155771_h.info("Preparing level \"{}\"", new Object[] {this.func_71270_I()}); this.func_71247_a(this.func_71270_I(), this.func_71270_I(), k, worldtype, s2); long i1 = System.nanoTime() - j; -@@ -284,7 +290,7 @@ +@@ -285,7 +291,7 @@ thread1.start(); } @@ -50,7 +50,7 @@ } } } -@@ -507,7 +513,7 @@ +@@ -504,7 +510,7 @@ public boolean func_175579_a(World p_175579_1_, BlockPos p_175579_2_, EntityPlayer p_175579_3_) { @@ -59,7 +59,7 @@ { return false; } -@@ -581,6 +587,9 @@ +@@ -578,6 +584,9 @@ return this.field_71340_o.func_73669_a("network-compression-threshold", super.func_175577_aI()); } diff --git a/patches/minecraft/net/minecraft/server/management/PlayerInteractionManager.java.patch b/patches/minecraft/net/minecraft/server/management/PlayerInteractionManager.java.patch index 846ded03e..ba2cb48d3 100644 --- a/patches/minecraft/net/minecraft/server/management/PlayerInteractionManager.java.patch +++ b/patches/minecraft/net/minecraft/server/management/PlayerInteractionManager.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/server/management/PlayerInteractionManager.java +++ ../src-work/minecraft/net/minecraft/server/management/PlayerInteractionManager.java -@@ -29,6 +29,8 @@ +@@ -28,6 +28,8 @@ public class PlayerInteractionManager { @@ -9,7 +9,7 @@ public World field_73092_a; public EntityPlayerMP field_73090_b; private GameType field_73091_c = GameType.NOT_SET; -@@ -90,7 +92,7 @@ +@@ -89,7 +91,7 @@ IBlockState iblockstate = this.field_73092_a.func_180495_p(this.field_180241_i); Block block = iblockstate.func_177230_c(); @@ -18,7 +18,7 @@ { this.field_73097_j = false; } -@@ -117,7 +119,7 @@ +@@ -116,7 +118,7 @@ IBlockState iblockstate1 = this.field_73092_a.func_180495_p(this.field_180240_f); Block block1 = iblockstate1.func_177230_c(); @@ -27,7 +27,7 @@ { this.field_73092_a.func_175715_c(this.field_73090_b.func_145782_y(), this.field_180240_f, -1); this.field_73094_o = -1; -@@ -126,7 +128,7 @@ +@@ -125,7 +127,7 @@ else { int k = this.field_73100_i - this.field_73089_e; @@ -36,7 +36,7 @@ int l = (int)(f1 * 10.0F); if (l != this.field_73094_o) -@@ -140,6 +142,15 @@ +@@ -139,6 +141,15 @@ public void func_180784_a(BlockPos p_180784_1_, EnumFacing p_180784_2_) { @@ -52,7 +52,7 @@ if (this.func_73083_d()) { if (!this.field_73092_a.func_175719_a((EntityPlayer)null, p_180784_1_, p_180784_2_)) -@@ -175,17 +186,36 @@ +@@ -174,17 +185,36 @@ } } @@ -93,7 +93,7 @@ { this.func_180237_b(p_180784_1_); } -@@ -207,7 +237,7 @@ +@@ -206,7 +236,7 @@ int i = this.field_73100_i - this.field_73089_e; IBlockState iblockstate = this.field_73092_a.func_180495_p(p_180785_1_); @@ -102,7 +102,7 @@ { float f = iblockstate.func_185903_a(this.field_73090_b, this.field_73090_b.field_70170_p, p_180785_1_) * (float)(i + 1); -@@ -236,13 +266,17 @@ +@@ -235,13 +265,17 @@ private boolean func_180235_c(BlockPos p_180235_1_) { @@ -124,17 +124,17 @@ } return flag; -@@ -250,7 +284,8 @@ +@@ -249,7 +283,8 @@ public boolean func_180237_b(BlockPos p_180237_1_) { -- if (this.field_73091_c.func_77145_d() && this.field_73090_b.func_184614_ca() != null && this.field_73090_b.func_184614_ca().func_77973_b() instanceof ItemSword) +- if (this.field_73091_c.func_77145_d() && !this.field_73090_b.func_184614_ca().func_190926_b() && this.field_73090_b.func_184614_ca().func_77973_b() instanceof ItemSword) + int exp = net.minecraftforge.common.ForgeHooks.onBlockBreakEvent(field_73092_a, field_73091_c, field_73090_b, p_180237_1_); + if (exp == -1) { return false; } -@@ -267,58 +302,46 @@ +@@ -266,53 +301,40 @@ } else { @@ -145,13 +145,13 @@ - return false; - } + ItemStack stack = field_73090_b.func_184614_ca(); -+ if (stack != null && stack.func_77973_b().onBlockStartBreak(stack, p_180237_1_, field_73090_b)) return false; ++ if (!stack.func_190926_b() && stack.func_77973_b().onBlockStartBreak(stack, p_180237_1_, field_73090_b)) return false; - if (!this.field_73090_b.func_175142_cm()) - { - ItemStack itemstack = this.field_73090_b.func_184614_ca(); - -- if (itemstack == null) +- if (itemstack.func_190926_b()) - { - return false; - } @@ -175,20 +175,13 @@ else { ItemStack itemstack1 = this.field_73090_b.func_184614_ca(); - ItemStack itemstack2 = itemstack1 == null ? null : itemstack1.func_77946_l(); + ItemStack itemstack2 = itemstack1.func_190926_b() ? ItemStack.field_190927_a : itemstack1.func_77946_l(); - boolean flag = this.field_73090_b.func_184823_b(iblockstate); + boolean flag = iblockstate.func_177230_c().canHarvestBlock(field_73092_a, p_180237_1_, field_73090_b); - if (itemstack1 != null) + if (!itemstack1.func_190926_b()) { itemstack1.func_179548_a(this.field_73092_a, iblockstate, p_180237_1_, this.field_73090_b); - -- if (itemstack1.field_77994_a == 0) -+ if (itemstack1.field_77994_a <= 0) - { -+ net.minecraftforge.event.ForgeEventFactory.onPlayerDestroyItem(this.field_73090_b, itemstack1, EnumHand.MAIN_HAND); - this.field_73090_b.func_184611_a(EnumHand.MAIN_HAND, (ItemStack)null); - } } + flag1 = this.removeBlock(p_180237_1_, flag); @@ -206,33 +199,35 @@ return flag1; } } -@@ -336,6 +359,7 @@ +@@ -330,8 +352,10 @@ } else { -+ if (net.minecraftforge.common.ForgeHooks.onItemRightClick(p_187250_1_, p_187250_4_, p_187250_3_)) return net.minecraft.util.EnumActionResult.PASS; - int i = p_187250_3_.field_77994_a; ++ if (net.minecraftforge.common.ForgeHooks.onItemRightClick(p_187250_1_, p_187250_4_)) return net.minecraft.util.EnumActionResult.PASS; + int i = p_187250_3_.func_190916_E(); int j = p_187250_3_.func_77960_j(); ++ ItemStack copyBeforeUse = p_187250_3_.func_77946_l(); ActionResult actionresult = p_187250_3_.func_77957_a(p_187250_2_, p_187250_1_, p_187250_4_); -@@ -362,6 +386,7 @@ - if (itemstack.field_77994_a == 0) + ItemStack itemstack = (ItemStack)actionresult.func_188398_b(); + +@@ -360,6 +384,7 @@ + if (itemstack.func_190926_b()) { - p_187250_1_.func_184611_a(p_187250_4_, (ItemStack)null); -+ net.minecraftforge.event.ForgeEventFactory.onPlayerDestroyItem(p_187250_1_, itemstack, p_187250_4_); + p_187250_1_.func_184611_a(p_187250_4_, ItemStack.field_190927_a); ++ net.minecraftforge.event.ForgeEventFactory.onPlayerDestroyItem(p_187250_1_, copyBeforeUse, p_187250_4_); } if (!p_187250_1_.func_184587_cr()) -@@ -406,13 +431,26 @@ +@@ -404,13 +429,25 @@ } else { -- if (!p_187251_1_.func_70093_af() || p_187251_1_.func_184614_ca() == null && p_187251_1_.func_184592_cb() == null) +- if (!p_187251_1_.func_70093_af() || p_187251_1_.func_184614_ca().func_190926_b() && p_187251_1_.func_184592_cb().func_190926_b()) + net.minecraftforge.event.entity.player.PlayerInteractEvent.RightClickBlock event = net.minecraftforge.common.ForgeHooks -+ .onRightClickBlock(p_187251_1_, p_187251_4_, p_187251_3_, p_187251_5_, p_187251_6_, net.minecraftforge.common.ForgeHooks.rayTraceEyeHitVec(field_73090_b, getBlockReachDistance() + 1)); ++ .onRightClickBlock(p_187251_1_, p_187251_4_, p_187251_5_, p_187251_6_, net.minecraftforge.common.ForgeHooks.rayTraceEyeHitVec(field_73090_b, getBlockReachDistance() + 1)); + if (event.isCanceled()) return EnumActionResult.PASS; + -+ net.minecraft.item.Item item = p_187251_3_ == null ? null : p_187251_3_.func_77973_b(); -+ EnumActionResult ret = item == null ? EnumActionResult.PASS : item.onItemUseFirst(p_187251_3_, p_187251_1_, p_187251_2_, p_187251_5_, p_187251_6_, p_187251_7_, p_187251_8_, p_187251_9_, p_187251_4_); ++ EnumActionResult ret = p_187251_3_.onItemUseFirst(p_187251_1_, p_187251_2_, p_187251_5_, p_187251_4_, p_187251_6_, p_187251_7_, p_187251_8_, p_187251_9_); + if (ret != EnumActionResult.PASS) return ret; + + boolean bypass = true; @@ -245,22 +240,22 @@ IBlockState iblockstate = p_187251_2_.func_180495_p(p_187251_5_); - + if(event.getUseBlock() != net.minecraftforge.fml.common.eventhandler.Event.Result.DENY) - if (iblockstate.func_177230_c().func_180639_a(p_187251_2_, p_187251_5_, iblockstate, p_187251_1_, p_187251_4_, p_187251_3_, p_187251_6_, p_187251_7_, p_187251_8_, p_187251_9_)) + if (iblockstate.func_177230_c().func_180639_a(p_187251_2_, p_187251_5_, iblockstate, p_187251_1_, p_187251_4_, p_187251_6_, p_187251_7_, p_187251_8_, p_187251_9_)) { - return EnumActionResult.SUCCESS; + result = EnumActionResult.SUCCESS; } } -@@ -440,14 +478,20 @@ +@@ -438,14 +475,20 @@ { int j = p_187251_3_.func_77960_j(); - int i = p_187251_3_.field_77994_a; + int i = p_187251_3_.func_190916_E(); + if (result != EnumActionResult.SUCCESS && event.getUseItem() != net.minecraftforge.fml.common.eventhandler.Event.Result.DENY + || result == EnumActionResult.SUCCESS && event.getUseItem() == net.minecraftforge.fml.common.eventhandler.Event.Result.ALLOW) { EnumActionResult enumactionresult = p_187251_3_.func_179546_a(p_187251_1_, p_187251_2_, p_187251_5_, p_187251_4_, p_187251_6_, p_187251_7_, p_187251_8_, p_187251_9_); p_187251_3_.func_77964_b(j); - p_187251_3_.field_77994_a = i; + p_187251_3_.func_190920_e(i); return enumactionresult; + } else return result; } @@ -273,7 +268,7 @@ } } } -@@ -457,4 +501,13 @@ +@@ -455,4 +498,13 @@ { this.field_73092_a = p_73080_1_; } diff --git a/patches/minecraft/net/minecraft/server/management/PlayerList.java.patch b/patches/minecraft/net/minecraft/server/management/PlayerList.java.patch index f556df712..6cd6c3c8e 100644 --- a/patches/minecraft/net/minecraft/server/management/PlayerList.java.patch +++ b/patches/minecraft/net/minecraft/server/management/PlayerList.java.patch @@ -27,9 +27,9 @@ p_72355_2_.field_71134_c.func_73080_a((WorldServer)p_72355_2_.field_70170_p); String s1 = "local"; -@@ -124,8 +135,8 @@ +@@ -123,8 +134,8 @@ + WorldServer worldserver = this.field_72400_f.func_71218_a(p_72355_2_.field_71093_bK); WorldInfo worldinfo = worldserver.func_72912_H(); - BlockPos blockpos = worldserver.func_175694_M(); this.func_72381_a(p_72355_2_, (EntityPlayerMP)null, worldserver); - NetHandlerPlayServer nethandlerplayserver = new NetHandlerPlayServer(this.field_72400_f, p_72355_1_, p_72355_2_); - nethandlerplayserver.func_147359_a(new SPacketJoinGame(p_72355_2_.func_145782_y(), p_72355_2_.field_71134_c.func_73081_b(), worldinfo.func_76093_s(), worldserver.field_73011_w.func_186058_p().func_186068_a(), worldserver.func_175659_aa(), this.func_72352_l(), worldinfo.func_76067_t(), worldserver.func_82736_K().func_82766_b("reducedDebugInfo"))); @@ -37,8 +37,8 @@ + nethandlerplayserver.func_147359_a(new SPacketJoinGame(p_72355_2_.func_145782_y(), p_72355_2_.field_71134_c.func_73081_b(), worldinfo.func_76093_s(), worldserver.field_73011_w.getDimension(), worldserver.func_175659_aa(), this.func_72352_l(), worldinfo.func_76067_t(), worldserver.func_82736_K().func_82766_b("reducedDebugInfo"))); nethandlerplayserver.func_147359_a(new SPacketCustomPayload("MC|Brand", (new PacketBuffer(Unpooled.buffer())).func_180714_a(this.func_72365_p().getServerModName()))); nethandlerplayserver.func_147359_a(new SPacketServerDifficulty(worldinfo.func_176130_y(), worldinfo.func_176123_z())); - nethandlerplayserver.func_147359_a(new SPacketSpawnPosition(blockpos)); -@@ -214,6 +225,7 @@ + nethandlerplayserver.func_147359_a(new SPacketPlayerAbilities(p_72355_2_.field_71075_bZ)); +@@ -212,6 +223,7 @@ } p_72355_2_.func_71116_b(); @@ -46,7 +46,7 @@ } protected void func_96456_a(ServerScoreboard p_96456_1_, EntityPlayerMP p_96456_2_) -@@ -303,6 +315,7 @@ +@@ -301,6 +313,7 @@ nbttagcompound1 = this.field_72400_f.func_184110_aI().func_188257_a(FixTypes.PLAYER, nbttagcompound); p_72380_1_.func_70020_e(nbttagcompound1); field_148546_d.debug("loading single player"); @@ -54,7 +54,7 @@ } else { -@@ -312,8 +325,24 @@ +@@ -310,8 +323,24 @@ return nbttagcompound1; } @@ -79,7 +79,7 @@ this.field_72412_k.func_75753_a(p_72391_1_); StatisticsManagerServer statisticsmanagerserver = (StatisticsManagerServer)this.field_148547_k.get(p_72391_1_.func_110124_au()); -@@ -335,6 +364,7 @@ +@@ -333,6 +362,7 @@ p_72377_1_.field_71135_a.func_147359_a(new SPacketPlayerListItem(SPacketPlayerListItem.Action.ADD_PLAYER, new EntityPlayerMP[] {(EntityPlayerMP)this.field_72404_b.get(i)})); } @@ -87,7 +87,7 @@ worldserver.func_72838_d(p_72377_1_); this.func_72375_a(p_72377_1_, (WorldServer)null); } -@@ -346,6 +376,7 @@ +@@ -344,6 +374,7 @@ public void func_72367_e(EntityPlayerMP p_72367_1_) { @@ -95,7 +95,7 @@ WorldServer worldserver = p_72367_1_.func_71121_q(); p_72367_1_.func_71029_a(StatList.field_75947_j); this.func_72391_b(p_72367_1_); -@@ -380,6 +411,7 @@ +@@ -378,6 +409,7 @@ this.field_177454_f.remove(uuid); this.field_148547_k.remove(uuid); } @@ -103,7 +103,7 @@ this.func_148540_a(new SPacketPlayerListItem(SPacketPlayerListItem.Action.REMOVE_PLAYER, new EntityPlayerMP[] {p_72367_1_})); } -@@ -463,13 +495,23 @@ +@@ -461,13 +493,23 @@ public EntityPlayerMP func_72368_a(EntityPlayerMP p_72368_1_, int p_72368_2_, boolean p_72368_3_) { @@ -129,7 +129,7 @@ p_72368_1_.field_71093_bK = p_72368_2_; PlayerInteractionManager playerinteractionmanager; -@@ -485,7 +527,8 @@ +@@ -483,7 +525,8 @@ EntityPlayerMP entityplayermp = new EntityPlayerMP(this.field_72400_f, this.field_72400_f.func_71218_a(p_72368_1_.field_71093_bK), p_72368_1_.func_146103_bH(), playerinteractionmanager); entityplayermp.field_71135_a = p_72368_1_.field_71135_a; entityplayermp.func_71049_a(p_72368_1_, p_72368_3_); @@ -139,7 +139,7 @@ entityplayermp.func_174817_o(p_72368_1_); entityplayermp.func_184819_a(p_72368_1_.func_184591_cq()); -@@ -532,6 +575,7 @@ +@@ -530,6 +573,7 @@ this.field_177454_f.put(entityplayermp.func_110124_au(), entityplayermp); entityplayermp.func_71116_b(); entityplayermp.func_70606_j(entityplayermp.func_110143_aJ()); @@ -147,7 +147,7 @@ return entityplayermp; } -@@ -546,15 +590,20 @@ +@@ -544,15 +588,20 @@ public void func_187242_a(EntityPlayerMP p_187242_1_, int p_187242_2_) { @@ -170,7 +170,7 @@ this.func_72375_a(p_187242_1_, worldserver); p_187242_1_.field_71135_a.func_147364_a(p_187242_1_.field_70165_t, p_187242_1_.field_70163_u, p_187242_1_.field_70161_v, p_187242_1_.field_70177_z, p_187242_1_.field_70125_A); p_187242_1_.field_71134_c.func_73080_a(worldserver1); -@@ -566,17 +615,27 @@ +@@ -564,17 +613,27 @@ { p_187242_1_.field_71135_a.func_147359_a(new SPacketEntityEffect(p_187242_1_.func_145782_y(), potioneffect)); } @@ -201,7 +201,7 @@ { d0 = MathHelper.func_151237_a(d0 / 8.0D, p_82448_4_.func_175723_af().func_177726_b() + 16.0D, p_82448_4_.func_175723_af().func_177728_d() - 16.0D); d1 = MathHelper.func_151237_a(d1 / 8.0D, p_82448_4_.func_175723_af().func_177736_c() + 16.0D, p_82448_4_.func_175723_af().func_177733_e() - 16.0D); -@@ -587,7 +646,7 @@ +@@ -585,7 +644,7 @@ p_82448_3_.func_72866_a(p_82448_1_, false); } } @@ -210,7 +210,7 @@ { d0 = MathHelper.func_151237_a(d0 * 8.0D, p_82448_4_.func_175723_af().func_177726_b() + 16.0D, p_82448_4_.func_175723_af().func_177728_d() - 16.0D); d1 = MathHelper.func_151237_a(d1 * 8.0D, p_82448_4_.func_175723_af().func_177736_c() + 16.0D, p_82448_4_.func_175723_af().func_177733_e() - 16.0D); -@@ -598,7 +657,8 @@ +@@ -596,7 +655,8 @@ p_82448_3_.func_72866_a(p_82448_1_, false); } } @@ -220,7 +220,7 @@ { BlockPos blockpos; -@@ -633,7 +693,7 @@ +@@ -631,7 +691,7 @@ if (p_82448_1_.func_70089_S()) { p_82448_1_.func_70012_b(d0, p_82448_1_.field_70163_u, d1, p_82448_1_.field_70177_z, p_82448_1_.field_70125_A); diff --git a/patches/minecraft/net/minecraft/server/network/NetHandlerLoginServer.java.patch b/patches/minecraft/net/minecraft/server/network/NetHandlerLoginServer.java.patch index 624eebff6..e4992a0e0 100644 --- a/patches/minecraft/net/minecraft/server/network/NetHandlerLoginServer.java.patch +++ b/patches/minecraft/net/minecraft/server/network/NetHandlerLoginServer.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/server/network/NetHandlerLoginServer.java +++ ../src-work/minecraft/net/minecraft/server/network/NetHandlerLoginServer.java -@@ -66,7 +66,7 @@ +@@ -70,7 +70,7 @@ if (entityplayermp == null) { this.field_147328_g = NetHandlerLoginServer.LoginState.READY_TO_ACCEPT; @@ -9,7 +9,7 @@ this.field_181025_l = null; } } -@@ -130,7 +130,7 @@ +@@ -134,7 +134,7 @@ } else { diff --git a/patches/minecraft/net/minecraft/stats/StatList.java.patch b/patches/minecraft/net/minecraft/stats/StatList.java.patch index 9b4b7eb80..ceb6ace8f 100644 --- a/patches/minecraft/net/minecraft/stats/StatList.java.patch +++ b/patches/minecraft/net/minecraft/stats/StatList.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/stats/StatList.java +++ ../src-work/minecraft/net/minecraft/stats/StatList.java -@@ -162,12 +162,12 @@ +@@ -165,12 +165,12 @@ } } @@ -15,7 +15,7 @@ { Item item = Item.func_150898_a(block); -@@ -184,12 +184,12 @@ +@@ -187,12 +187,12 @@ } } @@ -30,7 +30,7 @@ { if (item != null) { -@@ -208,12 +208,12 @@ +@@ -211,12 +211,12 @@ } } @@ -45,7 +45,7 @@ { if (item != null) { -@@ -227,12 +227,12 @@ +@@ -230,12 +230,12 @@ } } @@ -60,7 +60,7 @@ { if (item != null) { -@@ -247,7 +247,7 @@ +@@ -250,7 +250,7 @@ } } @@ -69,7 +69,7 @@ } private static String func_180204_a(Item p_180204_0_) -@@ -256,28 +256,35 @@ +@@ -259,28 +259,35 @@ return resourcelocation != null ? resourcelocation.toString().replace(':', '.') : null; } @@ -123,7 +123,7 @@ if (p_151180_0_[i] != null && p_151180_0_[j] == null) { -@@ -306,4 +313,36 @@ +@@ -312,4 +319,36 @@ { return (StatBase)field_188093_a.get(p_151177_0_); } diff --git a/patches/minecraft/net/minecraft/tileentity/MobSpawnerBaseLogic.java.patch b/patches/minecraft/net/minecraft/tileentity/MobSpawnerBaseLogic.java.patch index cfdbcfabc..fc95e819b 100644 --- a/patches/minecraft/net/minecraft/tileentity/MobSpawnerBaseLogic.java.patch +++ b/patches/minecraft/net/minecraft/tileentity/MobSpawnerBaseLogic.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/tileentity/MobSpawnerBaseLogic.java +++ ../src-work/minecraft/net/minecraft/tileentity/MobSpawnerBaseLogic.java -@@ -117,10 +117,11 @@ +@@ -125,10 +125,11 @@ EntityLiving entityliving = entity instanceof EntityLiving ? (EntityLiving)entity : null; entity.func_70012_b(entity.field_70165_t, entity.field_70163_u, entity.field_70161_v, world.field_73012_v.nextFloat() * 360.0F, 0.0F); diff --git a/patches/minecraft/net/minecraft/tileentity/TileEntity.java.patch b/patches/minecraft/net/minecraft/tileentity/TileEntity.java.patch index aa4dffe1e..fb74b3183 100644 --- a/patches/minecraft/net/minecraft/tileentity/TileEntity.java.patch +++ b/patches/minecraft/net/minecraft/tileentity/TileEntity.java.patch @@ -8,8 +8,8 @@ +public abstract class TileEntity implements net.minecraftforge.common.capabilities.ICapabilitySerializable { private static final Logger field_145852_a = LogManager.getLogger(); - private static final Map < String, Class > field_145855_i = Maps. < String, Class > newHashMap(); -@@ -63,6 +63,8 @@ + private static final RegistryNamespaced < ResourceLocation, Class > field_190562_f = new RegistryNamespaced(); +@@ -60,6 +60,8 @@ public void func_145839_a(NBTTagCompound p_145839_1_) { this.field_174879_c = new BlockPos(p_145839_1_.func_74762_e("x"), p_145839_1_.func_74762_e("y"), p_145839_1_.func_74762_e("z")); @@ -18,7 +18,7 @@ } public NBTTagCompound func_189515_b(NBTTagCompound p_189515_1_) -@@ -84,6 +86,8 @@ +@@ -81,6 +83,8 @@ p_189516_1_.func_74768_a("x", this.field_174879_c.func_177958_n()); p_189516_1_.func_74768_a("y", this.field_174879_c.func_177956_o()); p_189516_1_.func_74768_a("z", this.field_174879_c.func_177952_p()); @@ -27,7 +27,7 @@ return p_189516_1_; } } -@@ -92,10 +96,11 @@ +@@ -90,10 +94,11 @@ { TileEntity tileentity = null; String s = p_190200_1_.func_74779_i("id"); @@ -35,12 +35,12 @@ try { -- Class oclass = (Class)field_145855_i.get(s); -+ oclass = field_145855_i.get(s); +- Class oclass = (Class)field_190562_f.func_82594_a(new ResourceLocation(s)); ++ oclass = (Class)field_190562_f.func_82594_a(new ResourceLocation(s)); if (oclass != null) { -@@ -105,6 +110,9 @@ +@@ -103,6 +108,9 @@ catch (Throwable throwable1) { field_145852_a.error("Failed to create block entity {}", new Object[] {s, throwable1}); @@ -50,7 +50,7 @@ } if (tileentity != null) -@@ -117,6 +125,9 @@ +@@ -115,6 +123,9 @@ catch (Throwable throwable) { field_145852_a.error("Failed to load data for block entity {}", new Object[] {s, throwable}); @@ -60,7 +60,7 @@ tileentity = null; } } -@@ -158,7 +169,6 @@ +@@ -156,7 +167,6 @@ } } @@ -68,7 +68,7 @@ public double func_145835_a(double p_145835_1_, double p_145835_3_, double p_145835_5_) { double d0 = (double)this.field_174879_c.func_177958_n() + 0.5D - p_145835_1_; -@@ -305,6 +315,202 @@ +@@ -303,6 +313,202 @@ { } @@ -270,4 +270,4 @@ + static { - func_145826_a(TileEntityFurnace.class, "Furnace"); + func_190560_a("furnace", TileEntityFurnace.class); diff --git a/patches/minecraft/net/minecraft/tileentity/TileEntityBeacon.java.patch b/patches/minecraft/net/minecraft/tileentity/TileEntityBeacon.java.patch index e26a7465c..4594c2639 100644 --- a/patches/minecraft/net/minecraft/tileentity/TileEntityBeacon.java.patch +++ b/patches/minecraft/net/minecraft/tileentity/TileEntityBeacon.java.patch @@ -34,7 +34,7 @@ { flag1 = false; break; -@@ -382,7 +388,7 @@ +@@ -383,7 +389,7 @@ public boolean func_94041_b(int p_94041_1_, ItemStack p_94041_2_) { diff --git a/patches/minecraft/net/minecraft/tileentity/TileEntityBrewingStand.java.patch b/patches/minecraft/net/minecraft/tileentity/TileEntityBrewingStand.java.patch index 2be1cd6d4..2fddfcc48 100644 --- a/patches/minecraft/net/minecraft/tileentity/TileEntityBrewingStand.java.patch +++ b/patches/minecraft/net/minecraft/tileentity/TileEntityBrewingStand.java.patch @@ -1,35 +1,27 @@ --- ../src-base/minecraft/net/minecraft/tileentity/TileEntityBrewingStand.java +++ ../src-work/minecraft/net/minecraft/tileentity/TileEntityBrewingStand.java -@@ -144,7 +144,7 @@ +@@ -153,6 +153,7 @@ private boolean func_145934_k() { -- if (this.field_145945_j[3] != null && this.field_145945_j[3].field_77994_a > 0) -+ if (this.field_145945_j[3] != null && this.field_145945_j[3].field_77994_a > 0 && false) // Code moved to net.minecraftforge.common.brewing.VanillaBrewingRecipe - { - ItemStack itemstack = this.field_145945_j[3]; ++ if (1 == 1) return net.minecraftforge.common.brewing.BrewingRecipeRegistry.canBrew(field_145945_j, field_145945_j.get(3), field_145947_i); // divert to VanillaBrewingRegistry + ItemStack itemstack = (ItemStack)this.field_145945_j.get(3); -@@ -169,25 +169,23 @@ - } - else - { -- return false; -+ return net.minecraftforge.common.brewing.BrewingRecipeRegistry.canBrew(field_145945_j, field_145945_j[3], field_145947_i); - } - } + if (itemstack.func_190926_b()) +@@ -181,19 +182,17 @@ private void func_145940_l() { + if (net.minecraftforge.event.ForgeEventFactory.onPotionAttemptBrew(field_145945_j)) return; - ItemStack itemstack = this.field_145945_j[3]; + ItemStack itemstack = (ItemStack)this.field_145945_j.get(3); - for (int i = 0; i < 3; ++i) - { -- this.field_145945_j[i] = PotionHelper.func_185212_d(itemstack, this.field_145945_j[i]); +- this.field_145945_j.set(i, PotionHelper.func_185212_d(itemstack, (ItemStack)this.field_145945_j.get(i))); - } -+ net.minecraftforge.common.brewing.BrewingRecipeRegistry.brewPotions(field_145945_j, field_145945_j[3], field_145947_i); ++ net.minecraftforge.common.brewing.BrewingRecipeRegistry.brewPotions(field_145945_j, field_145945_j.get(3), field_145947_i); - --itemstack.field_77994_a; + itemstack.func_190918_g(1); BlockPos blockpos = this.func_174877_v(); - if (itemstack.func_77973_b().func_77634_r()) @@ -38,17 +30,17 @@ - ItemStack itemstack1 = new ItemStack(itemstack.func_77973_b().func_77668_q()); + ItemStack itemstack1 = itemstack.func_77973_b().getContainerItem(itemstack); - if (itemstack.field_77994_a <= 0) + if (itemstack.func_190926_b()) { -@@ -206,6 +204,7 @@ +@@ -207,6 +206,7 @@ - this.field_145945_j[3] = itemstack; + this.field_145945_j.set(3, itemstack); this.field_145850_b.func_175718_b(1035, blockpos, 0); + net.minecraftforge.event.ForgeEventFactory.onPotionBrewed(field_145945_j); } public static void func_189675_a(DataFixer p_189675_0_) -@@ -316,12 +315,12 @@ +@@ -289,12 +289,12 @@ { if (p_94041_1_ == 3) { @@ -63,7 +55,7 @@ } } -@@ -375,6 +374,26 @@ +@@ -348,6 +348,26 @@ } } diff --git a/patches/minecraft/net/minecraft/tileentity/TileEntityChest.java.patch b/patches/minecraft/net/minecraft/tileentity/TileEntityChest.java.patch index ee47db69a..897aada37 100644 --- a/patches/minecraft/net/minecraft/tileentity/TileEntityChest.java.patch +++ b/patches/minecraft/net/minecraft/tileentity/TileEntityChest.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/tileentity/TileEntityChest.java +++ ../src-work/minecraft/net/minecraft/tileentity/TileEntityChest.java -@@ -184,6 +184,7 @@ +@@ -116,6 +116,7 @@ { super.func_145836_u(); this.field_145984_a = false; @@ -8,11 +8,10 @@ } @SuppressWarnings("incomplete-switch") -@@ -470,4 +471,26 @@ - this.field_145985_p[i] = null; +@@ -349,6 +350,28 @@ } } -+ + + public net.minecraftforge.items.VanillaDoubleChestItemHandler doubleChestHandler; + + @SuppressWarnings("unchecked") @@ -34,4 +33,7 @@ + return super.getCapability(net.minecraftforge.items.CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null); + } + - } ++ + public void func_145843_s() + { + super.func_145843_s(); diff --git a/patches/minecraft/net/minecraft/tileentity/TileEntityFurnace.java.patch b/patches/minecraft/net/minecraft/tileentity/TileEntityFurnace.java.patch index 00ef493cf..ea91da729 100644 --- a/patches/minecraft/net/minecraft/tileentity/TileEntityFurnace.java.patch +++ b/patches/minecraft/net/minecraft/tileentity/TileEntityFurnace.java.patch @@ -1,68 +1,89 @@ --- ../src-base/minecraft/net/minecraft/tileentity/TileEntityFurnace.java +++ ../src-work/minecraft/net/minecraft/tileentity/TileEntityFurnace.java -@@ -122,9 +122,9 @@ - } - } - +@@ -121,9 +121,9 @@ + super.func_145839_a(p_145839_1_); + this.field_145957_n = NonNullList.func_191197_a(this.func_70302_i_(), ItemStack.field_190927_a); + ItemStackHelper.func_191283_b(p_145839_1_, this.field_145957_n); - this.field_145956_a = p_145839_1_.func_74765_d("BurnTime"); - this.field_174906_k = p_145839_1_.func_74765_d("CookTime"); - this.field_174905_l = p_145839_1_.func_74765_d("CookTimeTotal"); + this.field_145956_a = p_145839_1_.func_74762_e("BurnTime"); + this.field_174906_k = p_145839_1_.func_74762_e("CookTime"); + this.field_174905_l = p_145839_1_.func_74762_e("CookTimeTotal"); - this.field_145963_i = func_145952_a(this.field_145957_n[1]); + this.field_145963_i = func_145952_a((ItemStack)this.field_145957_n.get(1)); if (p_145839_1_.func_150297_b("CustomName", 8)) -@@ -136,9 +136,9 @@ +@@ -135,9 +135,9 @@ public NBTTagCompound func_189515_b(NBTTagCompound p_189515_1_) { super.func_189515_b(p_189515_1_); - p_189515_1_.func_74777_a("BurnTime", (short)this.field_145956_a); - p_189515_1_.func_74777_a("CookTime", (short)this.field_174906_k); - p_189515_1_.func_74777_a("CookTimeTotal", (short)this.field_174905_l); -+ p_189515_1_.func_74768_a("BurnTime", this.field_145956_a); -+ p_189515_1_.func_74768_a("CookTime", this.field_174906_k); -+ p_189515_1_.func_74768_a("CookTimeTotal", this.field_174905_l); - NBTTagList nbttaglist = new NBTTagList(); ++ p_189515_1_.func_74768_a("BurnTime", (short)this.field_145956_a); ++ p_189515_1_.func_74768_a("CookTime", (short)this.field_174906_k); ++ p_189515_1_.func_74768_a("CookTimeTotal", (short)this.field_174905_l); + ItemStackHelper.func_191282_a(p_189515_1_, this.field_145957_n); - for (int i = 0; i < this.field_145957_n.length; ++i) -@@ -207,8 +207,7 @@ + if (this.func_145818_k_()) +@@ -196,8 +196,8 @@ - if (this.field_145957_n[1].field_77994_a == 0) + if (itemstack.func_190926_b()) { -- Item item = this.field_145957_n[1].func_77973_b().func_77668_q(); -- this.field_145957_n[1] = item != null ? new ItemStack(item) : null; -+ this.field_145957_n[1] = field_145957_n[1].func_77973_b().getContainerItem(field_145957_n[1]); +- Item item1 = item.func_77668_q(); +- this.field_145957_n.set(1, item1 == null ? ItemStack.field_190927_a : new ItemStack(item1)); ++ ItemStack item1 = item.getContainerItem(itemstack); ++ this.field_145957_n.set(1, item1); } } } -@@ -263,7 +262,11 @@ - else - { - ItemStack itemstack = FurnaceRecipes.func_77602_a().func_151395_a(this.field_145957_n[0]); -- return itemstack == null ? false : (this.field_145957_n[2] == null ? true : (!this.field_145957_n[2].func_77969_a(itemstack) ? false : (this.field_145957_n[2].field_77994_a < this.func_70297_j_() && this.field_145957_n[2].field_77994_a < this.field_145957_n[2].func_77976_d() ? true : this.field_145957_n[2].field_77994_a < itemstack.func_77976_d()))); -+ if (itemstack == null) return false; -+ if (this.field_145957_n[2] == null) return true; -+ if (!this.field_145957_n[2].func_77969_a(itemstack)) return false; -+ int result = field_145957_n[2].field_77994_a + itemstack.field_77994_a; -+ return result <= func_70297_j_() && result <= this.field_145957_n[2].func_77976_d(); //Forge BugFix: Make it respect stack sizes properly. +@@ -260,7 +260,10 @@ + else + { + ItemStack itemstack1 = (ItemStack)this.field_145957_n.get(2); +- return itemstack1.func_190926_b() ? true : (!itemstack1.func_77969_a(itemstack) ? false : (itemstack1.func_190916_E() < this.func_70297_j_() && itemstack1.func_190916_E() < itemstack1.func_77976_d() ? true : itemstack1.func_190916_E() < itemstack.func_77976_d())); ++ if (itemstack1.func_190926_b()) return true; ++ if (!itemstack1.func_77969_a(itemstack)) return false; ++ int result = itemstack1.func_190916_E() + itemstack.func_190916_E(); ++ return result <= func_70297_j_() && result <= itemstack1.func_77976_d(); // Forge fix: make furnace respect stack sizes in furnace recipes + } } } - @@ -279,7 +282,7 @@ } - else if (this.field_145957_n[2].func_77973_b() == itemstack.func_77973_b()) + else if (itemstack2.func_77973_b() == itemstack1.func_77973_b()) { -- ++this.field_145957_n[2].field_77994_a; -+ this.field_145957_n[2].field_77994_a += itemstack.field_77994_a; // Forge BugFix: Results may have multiple items +- itemstack2.func_190917_f(1); ++ itemstack2.func_190917_f(itemstack1.func_190916_E()); } - if (this.field_145957_n[0].func_77973_b() == Item.func_150898_a(Blocks.field_150360_v) && this.field_145957_n[0].func_77960_j() == 1 && this.field_145957_n[1] != null && this.field_145957_n[1].func_77973_b() == Items.field_151133_ar) -@@ -326,7 +329,15 @@ - } - } - -- return item instanceof ItemTool && "WOOD".equals(((ItemTool)item).func_77861_e()) ? 200 : (item instanceof ItemSword && "WOOD".equals(((ItemSword)item).func_150932_j()) ? 200 : (item instanceof ItemHoe && "WOOD".equals(((ItemHoe)item).func_77842_f()) ? 200 : (item == Items.field_151055_y ? 100 : (item == Items.field_151044_h ? 1600 : (item == Items.field_151129_at ? 20000 : (item == Item.func_150898_a(Blocks.field_150345_g) ? 100 : (item == Items.field_151072_bj ? 2400 : 0))))))); + if (itemstack.func_77973_b() == Item.func_150898_a(Blocks.field_150360_v) && itemstack.func_77960_j() == 1 && !((ItemStack)this.field_145957_n.get(1)).func_190926_b() && ((ItemStack)this.field_145957_n.get(1)).func_77973_b() == Items.field_151133_ar) +@@ -300,7 +303,36 @@ + else + { + Item item = p_145952_0_.func_77973_b(); +- return item == Item.func_150898_a(Blocks.field_150376_bx) ? 150 : (item == Item.func_150898_a(Blocks.field_150325_L) ? 100 : (item == Item.func_150898_a(Blocks.field_150404_cg) ? 67 : (item == Item.func_150898_a(Blocks.field_150468_ap) ? 300 : (item == Item.func_150898_a(Blocks.field_150471_bO) ? 100 : (Block.func_149634_a(item).func_176223_P().func_185904_a() == Material.field_151575_d ? 300 : (item == Item.func_150898_a(Blocks.field_150402_ci) ? 16000 : (item instanceof ItemTool && "WOOD".equals(((ItemTool)item).func_77861_e()) ? 200 : (item instanceof ItemSword && "WOOD".equals(((ItemSword)item).func_150932_j()) ? 200 : (item instanceof ItemHoe && "WOOD".equals(((ItemHoe)item).func_77842_f()) ? 200 : (item == Items.field_151055_y ? 100 : (item != Items.field_151031_f && item != Items.field_151112_aM ? (item == Items.field_151155_ap ? 200 : (item == Items.field_151044_h ? 1600 : (item == Items.field_151129_at ? 20000 : (item != Item.func_150898_a(Blocks.field_150345_g) && item != Items.field_151054_z ? (item == Items.field_151072_bj ? 2400 : (item instanceof ItemDoor && item != Items.field_151139_aw ? 200 : (item instanceof ItemBoat ? 400 : 0))) : 100)))) : 300))))))))))); ++ ++ if (item instanceof net.minecraft.item.ItemBlock && Block.func_149634_a(item) != Blocks.field_150350_a) ++ { ++ Block block = Block.func_149634_a(item); ++ ++ if (block == Blocks.field_150376_bx) ++ { ++ return 150; ++ } ++ ++ if (block.func_176223_P().func_185904_a() == Material.field_151575_d) ++ { ++ return 300; ++ } ++ ++ if (block == Blocks.field_150402_ci) ++ { ++ return 16000; ++ } ++ } ++ + if (item instanceof ItemTool && "WOOD".equals(((ItemTool)item).func_77861_e())) return 200; + if (item instanceof ItemSword && "WOOD".equals(((ItemSword)item).func_150932_j())) return 200; + if (item instanceof ItemHoe && "WOOD".equals(((ItemHoe)item).func_77842_f())) return 200; @@ -75,9 +96,9 @@ } } -@@ -447,4 +458,22 @@ - this.field_145957_n[i] = null; - } +@@ -418,4 +450,22 @@ + { + this.field_145957_n.clear(); } + + net.minecraftforge.items.IItemHandler handlerTop = new net.minecraftforge.items.wrapper.SidedInvWrapper(this, net.minecraft.util.EnumFacing.UP); diff --git a/patches/minecraft/net/minecraft/tileentity/TileEntityHopper.java.patch b/patches/minecraft/net/minecraft/tileentity/TileEntityHopper.java.patch index 9a671d166..3d768de9b 100644 --- a/patches/minecraft/net/minecraft/tileentity/TileEntityHopper.java.patch +++ b/patches/minecraft/net/minecraft/tileentity/TileEntityHopper.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/tileentity/TileEntityHopper.java +++ ../src-work/minecraft/net/minecraft/tileentity/TileEntityHopper.java -@@ -251,6 +251,7 @@ +@@ -191,6 +191,7 @@ private boolean func_145883_k() { @@ -8,7 +8,7 @@ IInventory iinventory = this.func_145895_l(); if (iinventory == null) -@@ -357,6 +358,8 @@ +@@ -297,6 +298,8 @@ public static boolean func_145891_a(IHopper p_145891_0_) { @@ -17,47 +17,16 @@ IInventory iinventory = func_145884_b(p_145891_0_); if (iinventory != null) -@@ -506,17 +509,31 @@ - - if (itemstack == null) - { -+ //Forge: BUGFIX: Again, make things respect max stack sizes. -+ int max = Math.min(p_174916_1_.func_77976_d(), p_174916_0_.func_70297_j_()); -+ if (max >= p_174916_1_.field_77994_a) -+ { - p_174916_0_.func_70299_a(p_174916_2_, p_174916_1_); - p_174916_1_ = null; -+ } -+ else -+ { -+ p_174916_0_.func_70299_a(p_174916_2_, p_174916_1_.func_77979_a(max)); -+ } - flag = true; - } - else if (func_145894_a(itemstack, p_174916_1_)) - { -- int i = p_174916_1_.func_77976_d() - itemstack.field_77994_a; -+ //Forge: BUGFIX: Again, make things respect max stack sizes. -+ int max = Math.min(p_174916_1_.func_77976_d(), p_174916_0_.func_70297_j_()); -+ if (max > itemstack.field_77994_a) -+ { -+ int i = max - itemstack.field_77994_a; - int j = Math.min(p_174916_1_.field_77994_a, i); - p_174916_1_.field_77994_a -= j; - itemstack.field_77994_a += j; - flag = j > 0; -+ } - } - - if (flag) -@@ -662,4 +679,10 @@ - this.field_145900_a[i] = null; +@@ -396,6 +399,12 @@ } } -+ + + + protected net.minecraftforge.items.IItemHandler createUnSidedHandler() + { + return new net.minecraftforge.items.VanillaHopperItemHandler(this); + } - } ++ + public static ItemStack func_174918_a(IInventory p_174918_0_, IInventory p_174918_1_, ItemStack p_174918_2_, @Nullable EnumFacing p_174918_3_) + { + if (p_174918_1_ instanceof ISidedInventory && p_174918_3_ != null) diff --git a/patches/minecraft/net/minecraft/tileentity/TileEntityLockable.java.patch b/patches/minecraft/net/minecraft/tileentity/TileEntityLockable.java.patch index 399b55c21..ce5395a72 100644 --- a/patches/minecraft/net/minecraft/tileentity/TileEntityLockable.java.patch +++ b/patches/minecraft/net/minecraft/tileentity/TileEntityLockable.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/tileentity/TileEntityLockable.java +++ ../src-work/minecraft/net/minecraft/tileentity/TileEntityLockable.java -@@ -49,4 +49,26 @@ +@@ -48,4 +48,26 @@ { return (ITextComponent)(this.func_145818_k_() ? new TextComponentString(this.func_70005_c_()) : new TextComponentTranslation(this.func_70005_c_(), new Object[0])); } diff --git a/patches/minecraft/net/minecraft/tileentity/TileEntityPiston.java.patch b/patches/minecraft/net/minecraft/tileentity/TileEntityPiston.java.patch deleted file mode 100644 index d955359f0..000000000 --- a/patches/minecraft/net/minecraft/tileentity/TileEntityPiston.java.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- ../src-base/minecraft/net/minecraft/tileentity/TileEntityPiston.java -+++ ../src-work/minecraft/net/minecraft/tileentity/TileEntityPiston.java -@@ -203,7 +203,8 @@ - if (this.field_145850_b.func_180495_p(this.field_174879_c).func_177230_c() == Blocks.field_180384_M) - { - this.field_145850_b.func_180501_a(this.field_174879_c, this.field_174932_a, 3); -- this.field_145850_b.func_180496_d(this.field_174879_c, this.field_174932_a.func_177230_c()); -+ if(!net.minecraftforge.event.ForgeEventFactory.onNeighborNotify(field_145850_b, field_174879_c, field_145850_b.func_180495_p(field_174879_c), java.util.EnumSet.of(this.field_174931_f.func_176734_d())).isCanceled()) -+ this.field_145850_b.func_180496_d(this.field_174879_c, this.field_174932_a.func_177230_c()); - } - } - } -@@ -221,7 +222,8 @@ - if (this.field_145850_b.func_180495_p(this.field_174879_c).func_177230_c() == Blocks.field_180384_M) - { - this.field_145850_b.func_180501_a(this.field_174879_c, this.field_174932_a, 3); -- this.field_145850_b.func_180496_d(this.field_174879_c, this.field_174932_a.func_177230_c()); -+ if(!net.minecraftforge.event.ForgeEventFactory.onNeighborNotify(field_145850_b, field_174879_c, field_145850_b.func_180495_p(field_174879_c), java.util.EnumSet.of(this.field_174931_f.func_176734_d())).isCanceled()) -+ this.field_145850_b.func_180496_d(this.field_174879_c, this.field_174932_a.func_177230_c()); - } - } - else diff --git a/patches/minecraft/net/minecraft/util/EnumFacing.java.patch b/patches/minecraft/net/minecraft/util/EnumFacing.java.patch index 1ceeb65ba..4ca5aafe9 100644 --- a/patches/minecraft/net/minecraft/util/EnumFacing.java.patch +++ b/patches/minecraft/net/minecraft/util/EnumFacing.java.patch @@ -1,7 +1,7 @@ --- ../src-base/minecraft/net/minecraft/util/EnumFacing.java +++ ../src-work/minecraft/net/minecraft/util/EnumFacing.java -@@ -9,8 +9,6 @@ - import javax.annotation.Nullable; +@@ -12,8 +12,6 @@ + import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.MathHelper; import net.minecraft.util.math.Vec3i; -import net.minecraftforge.fml.relauncher.Side; @@ -9,7 +9,7 @@ public enum EnumFacing implements IStringSerializable { -@@ -63,7 +61,6 @@ +@@ -66,7 +64,6 @@ return func_82600_a(this.field_176759_h); } @@ -17,7 +17,7 @@ public EnumFacing func_176732_a(EnumFacing.Axis p_176732_1_) { switch (p_176732_1_) -@@ -114,7 +111,6 @@ +@@ -117,7 +114,6 @@ } } @@ -25,7 +25,7 @@ private EnumFacing func_176744_n() { switch (this) -@@ -134,7 +130,6 @@ +@@ -137,7 +133,6 @@ } } @@ -33,15 +33,15 @@ private EnumFacing func_176738_p() { switch (this) -@@ -196,7 +191,6 @@ +@@ -199,7 +194,6 @@ } @Nullable - @SideOnly(Side.CLIENT) public static EnumFacing func_176739_a(String p_176739_0_) { - return p_176739_0_ == null ? null : (EnumFacing)field_176761_p.get(p_176739_0_.toLowerCase()); -@@ -227,7 +221,6 @@ + return p_176739_0_ == null ? null : (EnumFacing)field_176761_p.get(p_176739_0_.toLowerCase(Locale.ROOT)); +@@ -230,7 +224,6 @@ return values()[p_176741_0_.nextInt(values().length)]; } @@ -49,19 +49,19 @@ public static EnumFacing func_176737_a(float p_176737_0_, float p_176737_1_, float p_176737_2_) { EnumFacing enumfacing = NORTH; -@@ -270,7 +263,6 @@ - throw new IllegalArgumentException("No such direction: " + p_181076_0_ + " " + p_181076_1_); +@@ -293,7 +286,6 @@ + return p_190914_1_.func_174811_aO().func_176734_d(); } - @SideOnly(Side.CLIENT) public Vec3i func_176730_m() { return this.field_176756_m; -@@ -307,7 +299,6 @@ +@@ -330,7 +322,6 @@ } @Nullable - @SideOnly(Side.CLIENT) public static EnumFacing.Axis func_176717_a(String p_176717_0_) { - return p_176717_0_ == null ? null : (EnumFacing.Axis)field_176725_d.get(p_176717_0_.toLowerCase()); + return p_176717_0_ == null ? null : (EnumFacing.Axis)field_176725_d.get(p_176717_0_.toLowerCase(Locale.ROOT)); diff --git a/patches/minecraft/net/minecraft/util/Session.java.patch b/patches/minecraft/net/minecraft/util/Session.java.patch index 8f807d2a9..1285715d3 100644 --- a/patches/minecraft/net/minecraft/util/Session.java.patch +++ b/patches/minecraft/net/minecraft/util/Session.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/util/Session.java +++ ../src-work/minecraft/net/minecraft/util/Session.java -@@ -16,9 +16,25 @@ +@@ -17,9 +17,25 @@ private final String field_148257_b; private final String field_148258_c; private final Session.Type field_152429_d; @@ -26,7 +26,7 @@ this.field_74286_b = p_i1098_1_; this.field_148257_b = p_i1098_2_; this.field_148258_c = p_i1098_3_; -@@ -50,14 +66,29 @@ +@@ -51,14 +67,29 @@ try { UUID uuid = UUIDTypeAdapter.fromString(this.func_148255_b()); diff --git a/patches/minecraft/net/minecraft/util/text/translation/LanguageMap.java.patch b/patches/minecraft/net/minecraft/util/text/translation/LanguageMap.java.patch index b6e9a122f..d7e8277eb 100644 --- a/patches/minecraft/net/minecraft/util/text/translation/LanguageMap.java.patch +++ b/patches/minecraft/net/minecraft/util/text/translation/LanguageMap.java.patch @@ -4,7 +4,7 @@ public LanguageMap() { -+ InputStream inputstream = LanguageMap.class.getResourceAsStream("/assets/minecraft/lang/en_US.lang"); ++ InputStream inputstream = LanguageMap.class.getResourceAsStream("/assets/minecraft/lang/en_us.lang"); + inject(this, inputstream); + } + @@ -25,7 +25,7 @@ + Map table = Maps.newHashMap(); try { -- InputStream inputstream = LanguageMap.class.getResourceAsStream("/assets/minecraft/lang/en_US.lang"); +- InputStream inputstream = LanguageMap.class.getResourceAsStream("/assets/minecraft/lang/en_us.lang"); + inputstream = net.minecraftforge.fml.common.FMLCommonHandler.instance().loadLanguage(table, inputstream); + if (inputstream == null) return table; diff --git a/patches/minecraft/net/minecraft/world/BossInfo.java.patch b/patches/minecraft/net/minecraft/world/BossInfo.java.patch index c5bb266f3..447890e81 100644 --- a/patches/minecraft/net/minecraft/world/BossInfo.java.patch +++ b/patches/minecraft/net/minecraft/world/BossInfo.java.patch @@ -9,15 +9,7 @@ public abstract class BossInfo { -@@ -35,7 +33,6 @@ - return this.field_186749_a; - } - -- @SideOnly(Side.CLIENT) - public void func_186739_a(ITextComponent p_186739_1_) - { - this.field_186749_a = p_186739_1_; -@@ -56,7 +53,6 @@ +@@ -55,7 +53,6 @@ return this.field_186751_c; } @@ -25,7 +17,7 @@ public void func_186745_a(BossInfo.Color p_186745_1_) { this.field_186751_c = p_186745_1_; -@@ -67,7 +63,6 @@ +@@ -66,7 +63,6 @@ return this.field_186752_d; } diff --git a/patches/minecraft/net/minecraft/world/BossInfoServer.java.patch b/patches/minecraft/net/minecraft/world/BossInfoServer.java.patch index 29ad09714..d9e3ba034 100644 --- a/patches/minecraft/net/minecraft/world/BossInfoServer.java.patch +++ b/patches/minecraft/net/minecraft/world/BossInfoServer.java.patch @@ -25,11 +25,3 @@ public void func_186746_a(BossInfo.Overlay p_186746_1_) { if (p_186746_1_ != this.field_186752_d) -@@ -87,7 +83,6 @@ - return this; - } - -- @SideOnly(Side.CLIENT) - public void func_186739_a(ITextComponent p_186739_1_) - { - if (!Objects.equal(p_186739_1_, this.field_186749_a)) diff --git a/patches/minecraft/net/minecraft/world/Explosion.java.patch b/patches/minecraft/net/minecraft/world/Explosion.java.patch index 73813f369..1c6266c34 100644 --- a/patches/minecraft/net/minecraft/world/Explosion.java.patch +++ b/patches/minecraft/net/minecraft/world/Explosion.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/world/Explosion.java +++ ../src-work/minecraft/net/minecraft/world/Explosion.java -@@ -40,6 +40,7 @@ +@@ -41,6 +41,7 @@ private final float field_77280_f; private final List field_77281_g; private final Map field_77288_k; @@ -8,7 +8,7 @@ @SideOnly(Side.CLIENT) public Explosion(World p_i45752_1_, Entity p_i45752_2_, double p_i45752_3_, double p_i45752_5_, double p_i45752_7_, float p_i45752_9_, List p_i45752_10_) -@@ -67,6 +68,7 @@ +@@ -68,6 +69,7 @@ this.field_77282_d = p_i45754_7_; this.field_77286_a = p_i45754_10_; this.field_82755_b = p_i45754_11_; @@ -16,7 +16,7 @@ } public void func_77278_a() -@@ -101,7 +103,7 @@ +@@ -102,7 +104,7 @@ if (iblockstate.func_185904_a() != Material.field_151579_a) { @@ -25,7 +25,7 @@ f -= (f2 + 0.3F) * 0.3F; } -@@ -128,6 +130,7 @@ +@@ -129,6 +131,7 @@ int j2 = MathHelper.func_76128_c(this.field_77282_d - (double)f3 - 1.0D); int j1 = MathHelper.func_76128_c(this.field_77282_d + (double)f3 + 1.0D); List list = this.field_77287_j.func_72839_b(this.field_77283_e, new AxisAlignedBB((double)k1, (double)i2, (double)j2, (double)l1, (double)i1, (double)j1)); @@ -33,7 +33,7 @@ Vec3d vec3d = new Vec3d(this.field_77284_b, this.field_77285_c, this.field_77282_d); for (int k2 = 0; k2 < list.size(); ++k2) -@@ -227,8 +230,7 @@ +@@ -228,8 +231,7 @@ block.func_180653_a(this.field_77287_j, blockpos, this.field_77287_j.func_180495_p(blockpos), 1.0F / this.field_77280_f, 0); } @@ -43,7 +43,7 @@ } } } -@@ -264,4 +266,6 @@ +@@ -266,4 +268,6 @@ { return this.field_77281_g; } diff --git a/patches/minecraft/net/minecraft/world/ServerWorldEventHandler.java.patch b/patches/minecraft/net/minecraft/world/ServerWorldEventHandler.java.patch index bc0e848a5..f67ef2483 100644 --- a/patches/minecraft/net/minecraft/world/ServerWorldEventHandler.java.patch +++ b/patches/minecraft/net/minecraft/world/ServerWorldEventHandler.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/world/ServerWorldEventHandler.java +++ ../src-work/minecraft/net/minecraft/world/ServerWorldEventHandler.java -@@ -51,7 +51,7 @@ +@@ -55,7 +55,7 @@ public void func_184375_a(@Nullable EntityPlayer p_184375_1_, SoundEvent p_184375_2_, SoundCategory p_184375_3_, double p_184375_4_, double p_184375_6_, double p_184375_8_, float p_184375_10_, float p_184375_11_) { @@ -9,7 +9,7 @@ } public void func_147585_a(int p_147585_1_, int p_147585_2_, int p_147585_3_, int p_147585_4_, int p_147585_5_, int p_147585_6_) -@@ -73,7 +73,7 @@ +@@ -77,7 +77,7 @@ public void func_180439_a(EntityPlayer p_180439_1_, int p_180439_2_, BlockPos p_180439_3_, int p_180439_4_) { diff --git a/patches/minecraft/net/minecraft/world/World.java.patch b/patches/minecraft/net/minecraft/world/World.java.patch index ac3bbc453..dae0eaef2 100644 --- a/patches/minecraft/net/minecraft/world/World.java.patch +++ b/patches/minecraft/net/minecraft/world/World.java.patch @@ -59,10 +59,11 @@ } public boolean func_175667_e(BlockPos p_175667_1_) -@@ -298,23 +317,49 @@ +@@ -302,24 +321,50 @@ + else { Chunk chunk = this.func_175726_f(p_180501_1_); - Block block = p_180501_2_.func_177230_c(); +- Block block = p_180501_2_.func_177230_c(); + + net.minecraftforge.common.util.BlockSnapshot blockSnapshot = null; + if (this.captureBlockSnapshots && !this.field_72995_K) @@ -104,6 +105,7 @@ + // Split off from original setBlockState(BlockPos, IBlockState, int) method in order to directly send client and physic updates + public void markAndNotifyBlock(BlockPos p_180501_1_, Chunk chunk, IBlockState iblockstate, IBlockState p_180501_2_, int p_180501_3_) + { ++ Block block = p_180501_2_.func_177230_c(); + { + { + if ((p_180501_3_ & 2) != 0 && (!this.field_72995_K || (p_180501_3_ & 4) == 0) && (chunk == null || chunk.func_150802_k())) @@ -111,20 +113,16 @@ this.func_184138_a(p_180501_1_, iblockstate, p_180501_2_, p_180501_3_); } -@@ -324,11 +369,9 @@ - - if (p_180501_2_.func_185912_n()) - { -- this.func_175666_e(p_180501_1_, block); -+ this.func_175666_e(p_180501_1_, p_180501_2_.func_177230_c()); - } +@@ -336,8 +381,6 @@ + { + this.func_190522_c(p_180501_1_, block); } - - return true; } } } -@@ -343,7 +386,7 @@ +@@ -352,7 +395,7 @@ IBlockState iblockstate = this.func_180495_p(p_175655_1_); Block block = iblockstate.func_177230_c(); @@ -133,29 +131,29 @@ { return false; } -@@ -416,6 +459,9 @@ +@@ -435,6 +478,9 @@ - public void func_175685_c(BlockPos p_175685_1_, Block p_175685_2_) + public void func_175685_c(BlockPos p_175685_1_, Block p_175685_2_, boolean p_175685_3_) { -+ if(net.minecraftforge.event.ForgeEventFactory.onNeighborNotify(this, p_175685_1_, this.func_180495_p(p_175685_1_), java.util.EnumSet.allOf(EnumFacing.class)).isCanceled()) ++ if(net.minecraftforge.event.ForgeEventFactory.onNeighborNotify(this, p_175685_1_, this.func_180495_p(p_175685_1_), java.util.EnumSet.allOf(EnumFacing.class), p_175685_3_).isCanceled()) + return; + - this.func_180496_d(p_175685_1_.func_177976_e(), p_175685_2_); - this.func_180496_d(p_175685_1_.func_177974_f(), p_175685_2_); - this.func_180496_d(p_175685_1_.func_177977_b(), p_175685_2_); -@@ -426,6 +472,11 @@ + this.func_190524_a(p_175685_1_.func_177976_e(), p_175685_2_, p_175685_1_); + this.func_190524_a(p_175685_1_.func_177974_f(), p_175685_2_, p_175685_1_); + this.func_190524_a(p_175685_1_.func_177977_b(), p_175685_2_, p_175685_1_); +@@ -450,6 +496,11 @@ public void func_175695_a(BlockPos p_175695_1_, Block p_175695_2_, EnumFacing p_175695_3_) { + java.util.EnumSet directions = java.util.EnumSet.allOf(EnumFacing.class); + directions.remove(p_175695_3_); -+ if(net.minecraftforge.event.ForgeEventFactory.onNeighborNotify(this, p_175695_1_, this.func_180495_p(p_175695_1_), directions).isCanceled()) ++ if(net.minecraftforge.event.ForgeEventFactory.onNeighborNotify(this, p_175695_1_, this.func_180495_p(p_175695_1_), directions, false).isCanceled()) + return; + if (p_175695_3_ != EnumFacing.WEST) { - this.func_180496_d(p_175695_1_.func_177976_e(), p_175695_2_); -@@ -521,7 +572,7 @@ + this.func_190524_a(p_175695_1_.func_177976_e(), p_175695_2_, p_175695_1_); +@@ -582,7 +633,7 @@ { IBlockState iblockstate = this.func_180495_p(blockpos); @@ -164,7 +162,7 @@ { return false; } -@@ -795,7 +846,7 @@ +@@ -856,7 +907,7 @@ public boolean func_72935_r() { @@ -173,7 +171,7 @@ } @Nullable -@@ -998,6 +1049,13 @@ +@@ -1059,6 +1110,13 @@ public void func_184148_a(@Nullable EntityPlayer p_184148_1_, double p_184148_2_, double p_184148_4_, double p_184148_6_, SoundEvent p_184148_8_, SoundCategory p_184148_9_, float p_184148_10_, float p_184148_11_) { @@ -187,7 +185,7 @@ for (int i = 0; i < this.field_73021_x.size(); ++i) { ((IWorldEventListener)this.field_73021_x.get(i)).func_184375_a(p_184148_1_, p_184148_8_, p_184148_9_, p_184148_2_, p_184148_4_, p_184148_6_, p_184148_10_, p_184148_11_); -@@ -1043,6 +1101,9 @@ +@@ -1112,6 +1170,9 @@ public boolean func_72838_d(Entity p_72838_1_) { @@ -197,7 +195,7 @@ int i = MathHelper.func_76128_c(p_72838_1_.field_70165_t / 16.0D); int j = MathHelper.func_76128_c(p_72838_1_.field_70161_v / 16.0D); boolean flag = p_72838_1_.field_98038_p; -@@ -1065,6 +1126,8 @@ +@@ -1134,6 +1195,8 @@ this.func_72854_c(); } @@ -206,15 +204,15 @@ this.func_72964_e(i, j).func_76612_a(p_72838_1_); this.field_72996_f.add(p_72838_1_); this.func_72923_a(p_72838_1_); -@@ -1296,7 +1359,6 @@ - return list; +@@ -1319,7 +1382,6 @@ + return p_175673_2_.field_70165_t > d0 && p_175673_2_.field_70165_t < d2 && p_175673_2_.field_70161_v > d1 && p_175673_2_.field_70161_v < d3; } - @SideOnly(Side.CLIENT) public void func_72848_b(IWorldEventListener p_72848_1_) { this.field_73021_x.remove(p_72848_1_); -@@ -1359,19 +1421,38 @@ +@@ -1382,19 +1444,38 @@ public int func_72967_a(float p_72967_1_) { @@ -255,7 +253,7 @@ float f = this.func_72826_c(p_72971_1_); float f1 = 1.0F - (MathHelper.func_76134_b(f * ((float)Math.PI * 2F)) * 2.0F + 0.2F); f1 = MathHelper.func_76131_a(f1, 0.0F, 1.0F); -@@ -1384,6 +1465,12 @@ +@@ -1407,6 +1488,12 @@ @SideOnly(Side.CLIENT) public Vec3d func_72833_a(Entity p_72833_1_, float p_72833_2_) { @@ -268,7 +266,7 @@ float f = this.func_72826_c(p_72833_2_); float f1 = MathHelper.func_76134_b(f * ((float)Math.PI * 2F)) * 2.0F + 0.5F; f1 = MathHelper.func_76131_a(f1, 0.0F, 1.0F); -@@ -1391,9 +1478,7 @@ +@@ -1414,9 +1501,7 @@ int j = MathHelper.func_76128_c(p_72833_1_.field_70163_u); int k = MathHelper.func_76128_c(p_72833_1_.field_70161_v); BlockPos blockpos = new BlockPos(i, j, k); @@ -279,7 +277,7 @@ float f3 = (float)(l >> 16 & 255) / 255.0F; float f4 = (float)(l >> 8 & 255) / 255.0F; float f5 = (float)(l & 255) / 255.0F; -@@ -1453,6 +1538,11 @@ +@@ -1476,6 +1561,11 @@ public float func_130001_d() { @@ -291,7 +289,7 @@ return WorldProvider.field_111203_a[this.field_73011_w.func_76559_b(this.field_72986_A.func_76073_f())]; } -@@ -1465,6 +1555,12 @@ +@@ -1488,6 +1578,12 @@ @SideOnly(Side.CLIENT) public Vec3d func_72824_f(float p_72824_1_) { @@ -304,7 +302,7 @@ float f = this.func_72826_c(p_72824_1_); float f1 = MathHelper.func_76134_b(f * ((float)Math.PI * 2F)) * 2.0F + 0.5F; f1 = MathHelper.func_76131_a(f1, 0.0F, 1.0F); -@@ -1520,9 +1616,9 @@ +@@ -1543,9 +1639,9 @@ for (blockpos = new BlockPos(p_175672_1_.func_177958_n(), chunk.func_76625_h() + 16, p_175672_1_.func_177952_p()); blockpos.func_177956_o() >= 0; blockpos = blockpos1) { blockpos1 = blockpos.func_177977_b(); @@ -316,7 +314,7 @@ { break; } -@@ -1534,6 +1630,12 @@ +@@ -1557,6 +1653,12 @@ @SideOnly(Side.CLIENT) public float func_72880_h(float p_72880_1_) { @@ -329,7 +327,7 @@ float f = this.func_72826_c(p_72880_1_); float f1 = 1.0F - (MathHelper.func_76134_b(f * ((float)Math.PI * 2F)) * 2.0F + 0.25F); f1 = MathHelper.func_76131_a(f1, 0.0F, 1.0F); -@@ -1585,6 +1687,12 @@ +@@ -1608,6 +1710,12 @@ entity.func_85029_a(crashreportcategory); } @@ -342,7 +340,7 @@ throw new ReportedException(crashreport); } -@@ -1646,6 +1754,12 @@ +@@ -1669,6 +1777,12 @@ CrashReport crashreport1 = CrashReport.func_85055_a(throwable1, "Ticking entity"); CrashReportCategory crashreportcategory1 = crashreport1.func_85058_a("Entity being ticked"); entity2.func_85029_a(crashreportcategory1); @@ -355,7 +353,7 @@ throw new ReportedException(crashreport1); } } -@@ -1682,7 +1796,7 @@ +@@ -1705,7 +1819,7 @@ { BlockPos blockpos = tileentity.func_174877_v(); @@ -364,7 +362,7 @@ { try { -@@ -1695,6 +1809,13 @@ +@@ -1718,6 +1832,13 @@ CrashReport crashreport2 = CrashReport.func_85055_a(throwable, "Ticking block entity"); CrashReportCategory crashreportcategory2 = crashreport2.func_85058_a("Block entity being ticked"); tileentity.func_145828_a(crashreportcategory2); @@ -378,7 +376,7 @@ throw new ReportedException(crashreport2); } } -@@ -1707,20 +1828,28 @@ +@@ -1730,20 +1851,28 @@ if (this.func_175667_e(tileentity.func_174877_v())) { @@ -410,7 +408,7 @@ this.field_72984_F.func_76318_c("pendingBlockEntities"); if (!this.field_147484_a.isEmpty()) -@@ -1759,8 +1888,12 @@ +@@ -1782,8 +1911,12 @@ public boolean func_175700_a(TileEntity p_175700_1_) { @@ -424,7 +422,7 @@ if (flag && p_175700_1_ instanceof ITickable) { this.field_175730_i.add(p_175700_1_); -@@ -1780,6 +1913,11 @@ +@@ -1803,6 +1936,11 @@ { if (this.field_147481_N) { @@ -436,7 +434,7 @@ this.field_147484_a.addAll(p_147448_1_); } else -@@ -1800,9 +1938,12 @@ +@@ -1823,9 +1961,12 @@ { int i = MathHelper.func_76128_c(p_72866_1_.field_70165_t); int j = MathHelper.func_76128_c(p_72866_1_.field_70161_v); @@ -451,7 +449,7 @@ { p_72866_1_.field_70142_S = p_72866_1_.field_70165_t; p_72866_1_.field_70137_T = p_72866_1_.field_70163_u; -@@ -2001,6 +2142,10 @@ +@@ -2024,6 +2165,10 @@ blockpos$pooledmutableblockpos.func_185344_t(); return true; } @@ -462,7 +460,7 @@ } } } -@@ -2040,6 +2185,16 @@ +@@ -2063,6 +2208,16 @@ IBlockState iblockstate = this.func_180495_p(blockpos$pooledmutableblockpos); Block block = iblockstate.func_177230_c(); @@ -479,17 +477,7 @@ if (iblockstate.func_185904_a() == p_72918_2_) { double d0 = (double)((float)(l1 + 1) - BlockLiquid.func_149801_b(((Integer)iblockstate.func_177229_b(BlockLiquid.field_176367_b)).intValue())); -@@ -2116,6 +2271,9 @@ - { - IBlockState iblockstate = this.func_180495_p(blockpos$pooledmutableblockpos.func_181079_c(k1, l1, i2)); - -+ Boolean result = iblockstate.func_177230_c().isAABBInsideMaterial(this, blockpos$pooledmutableblockpos, p_72830_1_, p_72830_2_); -+ if (result != null) return result; -+ - if (iblockstate.func_185904_a() == p_72830_2_) - { - int j2 = ((Integer)iblockstate.func_177229_b(BlockLiquid.field_176367_b)).intValue(); -@@ -2148,6 +2306,7 @@ +@@ -2129,6 +2284,7 @@ public Explosion func_72885_a(@Nullable Entity p_72885_1_, double p_72885_2_, double p_72885_4_, double p_72885_6_, float p_72885_8_, boolean p_72885_9_, boolean p_72885_10_) { Explosion explosion = new Explosion(this, p_72885_1_, p_72885_2_, p_72885_4_, p_72885_6_, p_72885_8_, p_72885_9_, p_72885_10_); @@ -497,7 +485,7 @@ explosion.func_77278_a(); explosion.func_77279_a(true); return explosion; -@@ -2270,6 +2429,7 @@ +@@ -2251,6 +2407,7 @@ public void func_175690_a(BlockPos p_175690_1_, @Nullable TileEntity p_175690_2_) { @@ -505,7 +493,7 @@ if (!this.func_189509_E(p_175690_1_)) { if (p_175690_2_ != null && !p_175690_2_.func_145837_r()) -@@ -2277,6 +2437,8 @@ +@@ -2258,6 +2415,8 @@ if (this.field_147481_N) { p_175690_2_.func_174878_a(p_175690_1_); @@ -514,19 +502,17 @@ Iterator iterator = this.field_147484_a.iterator(); while (iterator.hasNext()) -@@ -2295,8 +2457,10 @@ +@@ -2275,7 +2434,8 @@ + } else { - this.func_175700_a(p_175690_2_); - this.func_175726_f(p_175690_1_).func_177426_a(p_175690_1_, p_175690_2_); -+ Chunk chunk = this.func_175726_f(p_175690_1_); //Forge add NPE protection ++ Chunk chunk = this.func_175726_f(p_175690_1_); + if (chunk != null) chunk.func_177426_a(p_175690_1_, p_175690_2_); + this.func_175700_a(p_175690_2_); } -+ this.func_175666_e(p_175690_1_, func_180495_p(p_175690_1_).func_177230_c()); //Notify neighbors of changes } - } - } -@@ -2309,6 +2473,8 @@ +@@ -2290,6 +2450,8 @@ { tileentity.func_145843_s(); this.field_147484_a.remove(tileentity); @@ -535,7 +521,7 @@ } else { -@@ -2321,6 +2487,7 @@ +@@ -2302,6 +2464,7 @@ this.func_175726_f(p_175713_1_).func_177425_e(p_175713_1_); } @@ -543,7 +529,7 @@ } public void func_147457_a(TileEntity p_147457_1_) -@@ -2347,7 +2514,7 @@ +@@ -2328,7 +2491,7 @@ if (chunk != null && !chunk.func_76621_g()) { IBlockState iblockstate = this.func_180495_p(p_175677_1_); @@ -552,7 +538,7 @@ } else { -@@ -2370,6 +2537,7 @@ +@@ -2351,6 +2514,7 @@ { this.field_72985_G = p_72891_1_; this.field_72992_H = p_72891_2_; @@ -560,7 +546,7 @@ } public void func_72835_b() -@@ -2379,6 +2547,11 @@ +@@ -2360,6 +2524,11 @@ protected void func_72947_a() { @@ -572,7 +558,7 @@ if (this.field_72986_A.func_76059_o()) { this.field_73004_o = 1.0F; -@@ -2392,6 +2565,11 @@ +@@ -2373,6 +2542,11 @@ protected void func_72979_l() { @@ -581,10 +567,10 @@ + + public void updateWeatherBody() + { - if (!this.field_73011_w.func_177495_o()) + if (this.field_73011_w.func_191066_m()) { if (!this.field_72995_K) -@@ -2511,6 +2689,11 @@ +@@ -2497,6 +2671,11 @@ public boolean func_175670_e(BlockPos p_175670_1_, boolean p_175670_2_) { @@ -596,7 +582,7 @@ Biome biome = this.func_180494_b(p_175670_1_); float f = biome.func_180626_a(p_175670_1_); -@@ -2552,6 +2735,11 @@ +@@ -2538,6 +2717,11 @@ public boolean func_175708_f(BlockPos p_175708_1_, boolean p_175708_2_) { @@ -608,7 +594,7 @@ Biome biome = this.func_180494_b(p_175708_1_); float f = biome.func_180626_a(p_175708_1_); -@@ -2569,7 +2757,7 @@ +@@ -2555,7 +2739,7 @@ { IBlockState iblockstate = this.func_180495_p(p_175708_1_); @@ -617,7 +603,7 @@ { return true; } -@@ -2601,10 +2789,11 @@ +@@ -2587,10 +2771,11 @@ else { IBlockState iblockstate = this.func_180495_p(p_175638_1_); @@ -632,7 +618,7 @@ { j = 1; } -@@ -2703,7 +2892,7 @@ +@@ -2689,7 +2874,7 @@ int j4 = j2 + enumfacing.func_96559_d(); int k4 = k2 + enumfacing.func_82599_e(); blockpos$pooledmutableblockpos.func_181079_c(i4, j4, k4); @@ -641,7 +627,7 @@ i3 = this.func_175642_b(p_180500_1_, blockpos$pooledmutableblockpos); if (i3 == l2 - l4 && j < this.field_72994_J.length) -@@ -2811,10 +3000,10 @@ +@@ -2797,10 +2982,10 @@ public List func_175674_a(@Nullable Entity p_175674_1_, AxisAlignedBB p_175674_2_, @Nullable Predicate p_175674_3_) { List list = Lists.newArrayList(); @@ -656,7 +642,7 @@ for (int i1 = i; i1 <= j; ++i1) { -@@ -2867,10 +3056,10 @@ +@@ -2853,10 +3038,10 @@ public List func_175647_a(Class p_175647_1_, AxisAlignedBB p_175647_2_, @Nullable Predicate p_175647_3_) { @@ -671,7 +657,7 @@ List list = Lists.newArrayList(); for (int i1 = i; i1 < j; ++i1) -@@ -2950,11 +3139,13 @@ +@@ -2936,11 +3121,13 @@ public void func_175650_b(Collection p_175650_1_) { @@ -688,16 +674,16 @@ } } -@@ -2967,7 +3158,7 @@ +@@ -2953,7 +3140,7 @@ { - IBlockState iblockstate = this.func_180495_p(p_175716_2_); - AxisAlignedBB axisalignedbb = p_175716_3_ ? null : p_175716_1_.func_176223_P().func_185890_d(this, p_175716_2_); -- return axisalignedbb != Block.field_185506_k && !this.func_72917_a(axisalignedbb.func_186670_a(p_175716_2_), p_175716_5_) ? false : (iblockstate.func_185904_a() == Material.field_151594_q && p_175716_1_ == Blocks.field_150467_bQ ? true : iblockstate.func_185904_a().func_76222_j() && p_175716_1_.func_176193_a(this, p_175716_2_, p_175716_4_, p_175716_6_)); -+ return axisalignedbb != Block.field_185506_k && !this.func_72917_a(axisalignedbb.func_186670_a(p_175716_2_), p_175716_5_) ? false : (iblockstate.func_185904_a() == Material.field_151594_q && p_175716_1_ == Blocks.field_150467_bQ ? true : iblockstate.func_177230_c().func_176200_f(this, p_175716_2_) && p_175716_1_.func_176193_a(this, p_175716_2_, p_175716_4_, p_175716_6_)); + IBlockState iblockstate = this.func_180495_p(p_190527_2_); + AxisAlignedBB axisalignedbb = p_190527_3_ ? null : p_190527_1_.func_176223_P().func_185890_d(this, p_190527_2_); +- return axisalignedbb != Block.field_185506_k && !this.func_72917_a(axisalignedbb.func_186670_a(p_190527_2_), p_190527_5_) ? false : (iblockstate.func_185904_a() == Material.field_151594_q && p_190527_1_ == Blocks.field_150467_bQ ? true : iblockstate.func_185904_a().func_76222_j() && p_190527_1_.func_176198_a(this, p_190527_2_, p_190527_4_)); ++ return axisalignedbb != Block.field_185506_k && !this.func_72917_a(axisalignedbb.func_186670_a(p_190527_2_), p_190527_5_) ? false : (iblockstate.func_185904_a() == Material.field_151594_q && p_190527_1_ == Blocks.field_150467_bQ ? true : iblockstate.func_177230_c().func_176200_f(this, p_190527_2_) && p_190527_1_.func_176198_a(this, p_190527_2_, p_190527_4_)); } public int func_181545_F() -@@ -3050,7 +3241,7 @@ +@@ -3036,7 +3223,7 @@ public int func_175651_c(BlockPos p_175651_1_, EnumFacing p_175651_2_) { IBlockState iblockstate = this.func_180495_p(p_175651_1_); @@ -706,7 +692,7 @@ } public boolean func_175640_z(BlockPos p_175640_1_) -@@ -3247,7 +3438,7 @@ +@@ -3240,7 +3427,7 @@ public long func_72905_C() { @@ -715,7 +701,7 @@ } public long func_82737_E() -@@ -3257,17 +3448,17 @@ +@@ -3250,17 +3437,17 @@ public long func_72820_D() { @@ -736,7 +722,7 @@ if (!this.func_175723_af().func_177746_a(blockpos)) { -@@ -3279,7 +3470,7 @@ +@@ -3272,7 +3459,7 @@ public void func_175652_B(BlockPos p_175652_1_) { @@ -745,7 +731,7 @@ } @SideOnly(Side.CLIENT) -@@ -3299,12 +3490,18 @@ +@@ -3292,12 +3479,18 @@ if (!this.field_72996_f.contains(p_72897_1_)) { @@ -764,7 +750,7 @@ return true; } -@@ -3398,8 +3595,7 @@ +@@ -3391,8 +3584,7 @@ public boolean func_180502_D(BlockPos p_180502_1_) { @@ -774,7 +760,7 @@ } @Nullable -@@ -3460,12 +3656,12 @@ +@@ -3453,12 +3645,12 @@ public int func_72800_K() { @@ -789,7 +775,7 @@ } public Random func_72843_D(int p_72843_1_, int p_72843_2_, int p_72843_3_) -@@ -3509,7 +3705,7 @@ +@@ -3502,7 +3694,7 @@ @SideOnly(Side.CLIENT) public double func_72919_O() { @@ -798,7 +784,7 @@ } public void func_175715_c(int p_175715_1_, BlockPos p_175715_2_, int p_175715_3_) -@@ -3543,7 +3739,7 @@ +@@ -3536,7 +3728,7 @@ public void func_175666_e(BlockPos p_175666_1_, Block p_175666_2_) { @@ -807,30 +793,7 @@ { BlockPos blockpos = p_175666_1_.func_177972_a(enumfacing); -@@ -3551,18 +3747,14 @@ - { - IBlockState iblockstate = this.func_180495_p(blockpos); - -- if (Blocks.field_150441_bU.func_185547_C(iblockstate)) -+ iblockstate.func_177230_c().onNeighborChange(this, blockpos, p_175666_1_); -+ if (iblockstate.func_177230_c().isNormalCube(iblockstate, this, blockpos)) - { -- iblockstate.func_189546_a(this, blockpos, p_175666_2_); -- } -- else if (iblockstate.func_185915_l()) -- { - blockpos = blockpos.func_177972_a(enumfacing); - iblockstate = this.func_180495_p(blockpos); -- -- if (Blocks.field_150441_bU.func_185547_C(iblockstate)) -+ if (iblockstate.func_177230_c().getWeakChanges(this, blockpos)) - { -- iblockstate.func_189546_a(this, blockpos, p_175666_2_); -+ iblockstate.func_177230_c().onNeighborChange(this, blockpos, p_175666_1_); - } - } - } -@@ -3628,6 +3820,112 @@ +@@ -3621,6 +3813,112 @@ return i >= -128 && i <= 128 && j >= -128 && j <= 128; } diff --git a/patches/minecraft/net/minecraft/world/WorldEntitySpawner.java.patch b/patches/minecraft/net/minecraft/world/WorldEntitySpawner.java.patch index 81719f7c6..525af1f21 100644 --- a/patches/minecraft/net/minecraft/world/WorldEntitySpawner.java.patch +++ b/patches/minecraft/net/minecraft/world/WorldEntitySpawner.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/world/WorldEntitySpawner.java +++ ../src-work/minecraft/net/minecraft/world/WorldEntitySpawner.java -@@ -78,15 +78,17 @@ +@@ -79,15 +79,17 @@ { if ((!enumcreaturetype.func_75599_d() || p_77192_3_) && (enumcreaturetype.func_75599_d() || p_77192_2_) && (!enumcreaturetype.func_82705_e() || p_77192_4_)) { @@ -20,7 +20,7 @@ { BlockPos blockpos = func_180621_a(p_77192_1_, chunkpos1.field_77276_a, chunkpos1.field_77275_b); int k1 = blockpos.func_177958_n(); -@@ -145,8 +147,10 @@ +@@ -146,8 +148,10 @@ entityliving.func_70012_b((double)f, (double)i3, (double)f1, p_77192_1_.field_73012_v.nextFloat() * 360.0F, 0.0F); @@ -32,7 +32,7 @@ ientitylivingdata = entityliving.func_180482_a(p_77192_1_.func_175649_E(new BlockPos(entityliving)), ientitylivingdata); if (entityliving.func_70058_J()) -@@ -159,7 +163,7 @@ +@@ -160,7 +164,7 @@ entityliving.func_70106_y(); } @@ -41,7 +41,7 @@ { continue label411; } -@@ -212,8 +216,9 @@ +@@ -213,8 +217,9 @@ else { BlockPos blockpos = p_180267_2_.func_177977_b(); diff --git a/patches/minecraft/net/minecraft/world/WorldProvider.java.patch b/patches/minecraft/net/minecraft/world/WorldProvider.java.patch index 77b782a58..a19dd407a 100644 --- a/patches/minecraft/net/minecraft/world/WorldProvider.java.patch +++ b/patches/minecraft/net/minecraft/world/WorldProvider.java.patch @@ -1,35 +1,6 @@ --- ../src-base/minecraft/net/minecraft/world/WorldProvider.java +++ ../src-work/minecraft/net/minecraft/world/WorldProvider.java -@@ -53,26 +53,12 @@ - - protected void func_76572_b() - { -- WorldType worldtype = this.field_76579_a.func_72912_H().func_76067_t(); -- -- if (worldtype == WorldType.field_77138_c) -- { -- FlatGeneratorInfo flatgeneratorinfo = FlatGeneratorInfo.func_82651_a(this.field_76579_a.func_72912_H().func_82571_y()); -- this.field_76578_c = new BiomeProviderSingle(Biome.func_180276_a(flatgeneratorinfo.func_82648_a(), Biomes.field_180279_ad)); -- } -- else if (worldtype == WorldType.field_180272_g) -- { -- this.field_76578_c = new BiomeProviderSingle(Biomes.field_76772_c); -- } -- else -- { -- this.field_76578_c = new BiomeProvider(this.field_76579_a.func_72912_H()); -- } -+ this.field_76578_c = field_76577_b.getBiomeProvider(field_76579_a); - } - - public IChunkGenerator func_186060_c() - { -- return (IChunkGenerator)(this.field_76577_b == WorldType.field_77138_c ? new ChunkProviderFlat(this.field_76579_a, this.field_76579_a.func_72905_C(), this.field_76579_a.func_72912_H().func_76089_r(), this.field_82913_c) : (this.field_76577_b == WorldType.field_180272_g ? new ChunkProviderDebug(this.field_76579_a) : (this.field_76577_b == WorldType.field_180271_f ? new ChunkProviderOverworld(this.field_76579_a, this.field_76579_a.func_72905_C(), this.field_76579_a.func_72912_H().func_76089_r(), this.field_82913_c) : new ChunkProviderOverworld(this.field_76579_a, this.field_76579_a.func_72905_C(), this.field_76579_a.func_72912_H().func_76089_r(), this.field_82913_c)))); -+ return field_76577_b.getChunkGenerator(field_76579_a, field_82913_c); - } - - public boolean func_76566_a(int p_76566_1_, int p_76566_2_) -@@ -158,7 +144,7 @@ +@@ -160,7 +160,7 @@ @SideOnly(Side.CLIENT) public float func_76571_f() { @@ -38,7 +9,7 @@ } @SideOnly(Side.CLIENT) -@@ -174,13 +160,13 @@ +@@ -177,13 +177,13 @@ public int func_76557_i() { @@ -54,7 +25,7 @@ } @SideOnly(Side.CLIENT) -@@ -214,6 +200,339 @@ +@@ -222,6 +222,339 @@ return new WorldBorder(); } diff --git a/patches/minecraft/net/minecraft/world/WorldServer.java.patch b/patches/minecraft/net/minecraft/world/WorldServer.java.patch index cc3e32304..573d80c72 100644 --- a/patches/minecraft/net/minecraft/world/WorldServer.java.patch +++ b/patches/minecraft/net/minecraft/world/WorldServer.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/world/WorldServer.java +++ ../src-work/minecraft/net/minecraft/world/WorldServer.java -@@ -98,30 +98,39 @@ +@@ -97,30 +97,39 @@ private int field_147489_T; private final List field_94579_S = Lists.newArrayList(); @@ -43,7 +43,7 @@ } else { -@@ -156,6 +165,7 @@ +@@ -155,6 +164,7 @@ this.func_175723_af().func_177750_a(this.field_72986_A.func_176137_E()); } @@ -51,7 +51,7 @@ return this; } -@@ -215,6 +225,10 @@ +@@ -214,6 +224,10 @@ this.field_175740_d.func_75528_a(); this.field_72984_F.func_76318_c("portalForcer"); this.field_85177_Q.func_85189_a(this.func_82737_E()); @@ -62,7 +62,7 @@ this.field_72984_F.func_76319_b(); this.func_147488_Z(); } -@@ -223,12 +237,14 @@ +@@ -222,12 +236,14 @@ public Biome.SpawnListEntry func_175734_a(EnumCreatureType p_175734_1_, BlockPos p_175734_2_) { List list = this.func_72863_F().func_177458_a(p_175734_1_, p_175734_2_); @@ -77,7 +77,7 @@ return list != null && !list.isEmpty() ? list.contains(p_175732_2_) : false; } -@@ -274,10 +290,7 @@ +@@ -276,10 +292,7 @@ private void func_73051_P() { @@ -89,7 +89,7 @@ } public boolean func_73056_e() -@@ -370,7 +383,7 @@ +@@ -372,7 +385,7 @@ boolean flag1 = this.func_72911_I(); this.field_72984_F.func_76320_a("pollingChunks"); @@ -98,7 +98,7 @@ { this.field_72984_F.func_76320_a("getChunk"); Chunk chunk = (Chunk)iterator.next(); -@@ -382,7 +395,7 @@ +@@ -384,7 +397,7 @@ chunk.func_150804_b(false); this.field_72984_F.func_76318_c("thunder"); @@ -107,7 +107,7 @@ { this.field_73005_l = this.field_73005_l * 3 + 1013904223; int l = this.field_73005_l >> 2; -@@ -411,7 +424,7 @@ +@@ -412,7 +425,7 @@ this.field_72984_F.func_76318_c("iceandsnow"); @@ -116,7 +116,7 @@ { this.field_73005_l = this.field_73005_l * 3 + 1013904223; int j2 = this.field_73005_l >> 2; -@@ -527,7 +540,10 @@ +@@ -528,7 +541,10 @@ { if (p_175654_2_.func_149698_L()) { @@ -128,7 +128,7 @@ { IBlockState iblockstate = this.func_180495_p(p_175654_1_); -@@ -587,7 +603,7 @@ +@@ -588,7 +604,7 @@ public void func_72939_s() { @@ -137,7 +137,7 @@ { if (this.field_80004_Q++ >= 300) { -@@ -711,6 +727,9 @@ +@@ -712,6 +728,9 @@ { NextTickListEntry nextticklistentry1 = (NextTickListEntry)iterator.next(); iterator.remove(); @@ -147,7 +147,7 @@ int k = 0; if (this.func_175707_a(nextticklistentry1.field_180282_a.func_177982_a(0, 0, 0), nextticklistentry1.field_180282_a.func_177982_a(0, 0, 0))) -@@ -837,6 +856,10 @@ +@@ -838,6 +857,10 @@ public boolean func_175660_a(EntityPlayer p_175660_1_, BlockPos p_175660_2_) { @@ -158,7 +158,7 @@ return !this.field_73061_a.func_175579_a(this, p_175660_2_, p_175660_1_) && this.func_175723_af().func_177746_a(p_175660_2_); } -@@ -902,6 +925,7 @@ +@@ -903,6 +926,7 @@ } else { @@ -166,7 +166,7 @@ this.field_72987_B = true; BiomeProvider biomeprovider = this.field_73011_w.func_177499_m(); List list = biomeprovider.func_76932_a(); -@@ -986,6 +1010,7 @@ +@@ -988,6 +1012,7 @@ } chunkproviderserver.func_186027_a(p_73044_1_); @@ -174,7 +174,7 @@ for (Chunk chunk : Lists.newArrayList(chunkproviderserver.func_189548_a())) { -@@ -1030,6 +1055,7 @@ +@@ -1032,6 +1057,7 @@ this.field_72986_A.func_176135_e(this.func_175723_af().func_177732_i()); this.field_73019_z.func_75755_a(this.field_72986_A, this.field_73061_a.func_184103_al().func_72378_q()); this.field_72988_C.func_75744_a(); @@ -182,7 +182,7 @@ } public boolean func_72838_d(Entity p_72838_1_) -@@ -1041,7 +1067,7 @@ +@@ -1043,7 +1069,7 @@ { for (Entity entity : Lists.newArrayList(p_175650_1_)) { @@ -191,7 +191,7 @@ { this.field_72996_f.add(entity); this.func_72923_a(entity); -@@ -1122,7 +1148,7 @@ +@@ -1124,7 +1150,7 @@ { if (super.func_72942_c(p_72942_1_)) { @@ -200,7 +200,7 @@ return true; } else -@@ -1144,6 +1170,7 @@ +@@ -1146,6 +1172,7 @@ public Explosion func_72885_a(@Nullable Entity p_72885_1_, double p_72885_2_, double p_72885_4_, double p_72885_6_, float p_72885_8_, boolean p_72885_9_, boolean p_72885_10_) { Explosion explosion = new Explosion(this, p_72885_1_, p_72885_2_, p_72885_4_, p_72885_6_, p_72885_8_, p_72885_9_, p_72885_10_); @@ -208,7 +208,7 @@ explosion.func_77278_a(); explosion.func_77279_a(false); -@@ -1189,7 +1216,7 @@ +@@ -1191,7 +1218,7 @@ { if (this.func_147485_a(blockeventdata)) { @@ -217,7 +217,7 @@ } } -@@ -1215,27 +1242,31 @@ +@@ -1217,27 +1244,31 @@ if (this.field_73003_n != this.field_73004_o) { @@ -255,8 +255,8 @@ } } -@@ -1314,6 +1345,11 @@ - return this.field_73061_a.func_152345_ab(); +@@ -1322,6 +1353,11 @@ + return this.func_72863_F().func_180513_a(this, p_190528_1_, p_190528_2_, p_190528_3_); } + public java.io.File getChunkSaveLocation() diff --git a/patches/minecraft/net/minecraft/world/WorldType.java.patch b/patches/minecraft/net/minecraft/world/WorldType.java.patch index f38e093ce..5acbd325e 100644 --- a/patches/minecraft/net/minecraft/world/WorldType.java.patch +++ b/patches/minecraft/net/minecraft/world/WorldType.java.patch @@ -143,12 +143,12 @@ + * + * @param worldSeed The world seed + * @param parentLayer The parent layer to feed into any layer you return -+ * @param chunkProviderSettingsJson The JSON string to use when initializing ChunkProviderSettings.Factory ++ * @param chunkProviderSettings The ChunkProviderSettings constructed from the custom JSON + * @return A GenLayer that will return ints representing the Biomes to be generated, see GenLayerBiome + */ -+ public net.minecraft.world.gen.layer.GenLayer getBiomeLayer(long worldSeed, net.minecraft.world.gen.layer.GenLayer parentLayer, String chunkProviderSettingsJson) ++ public net.minecraft.world.gen.layer.GenLayer getBiomeLayer(long worldSeed, net.minecraft.world.gen.layer.GenLayer parentLayer, net.minecraft.world.gen.ChunkProviderSettings chunkProviderSettings) + { -+ net.minecraft.world.gen.layer.GenLayer ret = new net.minecraft.world.gen.layer.GenLayerBiome(200L, parentLayer, this, chunkProviderSettingsJson); ++ net.minecraft.world.gen.layer.GenLayer ret = new net.minecraft.world.gen.layer.GenLayerBiome(200L, parentLayer, this, chunkProviderSettings); + ret = net.minecraft.world.gen.layer.GenLayerZoom.func_75915_a(1000L, ret, 2); + ret = new net.minecraft.world.gen.layer.GenLayerBiomeEdge(1000L, ret); + return ret; diff --git a/patches/minecraft/net/minecraft/world/biome/Biome.java.patch b/patches/minecraft/net/minecraft/world/biome/Biome.java.patch index d79e8c14a..1f0ed44f2 100644 --- a/patches/minecraft/net/minecraft/world/biome/Biome.java.patch +++ b/patches/minecraft/net/minecraft/world/biome/Biome.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/world/biome/Biome.java +++ ../src-work/minecraft/net/minecraft/world/biome/Biome.java -@@ -52,7 +52,7 @@ +@@ -53,7 +53,7 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -9,7 +9,7 @@ { private static final Logger field_150586_aC = LogManager.getLogger(); protected static final IBlockState field_185365_a = Blocks.field_150348_b.func_176223_P(); -@@ -71,7 +71,7 @@ +@@ -72,7 +72,7 @@ protected static final WorldGenTrees field_76757_N = new WorldGenTrees(false); protected static final WorldGenBigTree field_76758_O = new WorldGenBigTree(false); protected static final WorldGenSwamp field_76763_Q = new WorldGenSwamp(); @@ -18,7 +18,7 @@ private final String field_76791_y; private final float field_76748_D; private final float field_76749_E; -@@ -132,11 +132,12 @@ +@@ -134,11 +134,12 @@ this.field_76761_J.add(new Biome.SpawnListEntry(EntityWitch.class, 5, 1, 1)); this.field_76755_L.add(new Biome.SpawnListEntry(EntitySquid.class, 10, 4, 4)); this.field_82914_M.add(new Biome.SpawnListEntry(EntityBat.class, 10, 8, 8)); @@ -32,7 +32,7 @@ } public boolean func_185363_b() -@@ -232,7 +233,7 @@ +@@ -234,7 +235,7 @@ { double d0 = (double)MathHelper.func_76131_a(this.func_180626_a(p_180627_1_), 0.0F, 1.0F); double d1 = (double)MathHelper.func_76131_a(this.func_76727_i(), 0.0F, 1.0F); @@ -41,7 +41,7 @@ } public final void func_180628_b(World p_180628_1_, Random p_180628_2_, ChunkPrimer p_180628_3_, int p_180628_4_, int p_180628_5_, double p_180628_6_) -@@ -325,7 +326,7 @@ +@@ -327,7 +328,7 @@ { double d0 = (double)MathHelper.func_76131_a(this.func_180626_a(p_180625_1_), 0.0F, 1.0F); double d1 = (double)MathHelper.func_76131_a(this.func_76727_i(), 0.0F, 1.0F); @@ -50,7 +50,7 @@ } public Class func_150562_l() -@@ -391,6 +392,83 @@ +@@ -393,6 +394,83 @@ return this.field_76766_R; } diff --git a/patches/minecraft/net/minecraft/world/biome/BiomeDesert.java.patch b/patches/minecraft/net/minecraft/world/biome/BiomeDesert.java.patch index ae58336e9..3ff729ac1 100644 --- a/patches/minecraft/net/minecraft/world/biome/BiomeDesert.java.patch +++ b/patches/minecraft/net/minecraft/world/biome/BiomeDesert.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/world/biome/BiomeDesert.java +++ ../src-work/minecraft/net/minecraft/world/biome/BiomeDesert.java -@@ -28,6 +28,7 @@ +@@ -47,6 +47,7 @@ { super.func_180624_a(p_180624_1_, p_180624_2_, p_180624_3_); @@ -8,7 +8,7 @@ if (p_180624_2_.nextInt(1000) == 0) { int i = p_180624_2_.nextInt(16) + 8; -@@ -36,6 +37,7 @@ +@@ -55,6 +56,7 @@ (new WorldGenDesertWells()).func_180709_b(p_180624_1_, p_180624_2_, blockpos); } diff --git a/patches/minecraft/net/minecraft/world/biome/BiomeHills.java.patch b/patches/minecraft/net/minecraft/world/biome/BiomeHills.java.patch index 9c7ab1c76..637f99e98 100644 --- a/patches/minecraft/net/minecraft/world/biome/BiomeHills.java.patch +++ b/patches/minecraft/net/minecraft/world/biome/BiomeHills.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/world/biome/BiomeHills.java +++ ../src-work/minecraft/net/minecraft/world/biome/BiomeHills.java -@@ -37,28 +37,20 @@ +@@ -39,28 +39,20 @@ public void func_180624_a(World p_180624_1_, Random p_180624_2_, BlockPos p_180624_3_) { super.func_180624_a(p_180624_1_, p_180624_2_, p_180624_3_); @@ -36,7 +36,7 @@ } public void func_180622_a(World p_180622_1_, Random p_180622_2_, ChunkPrimer p_180622_3_, int p_180622_4_, int p_180622_5_, double p_180622_6_) -@@ -86,4 +78,24 @@ +@@ -88,4 +80,24 @@ EXTRA_TREES, MUTATED; } diff --git a/patches/minecraft/net/minecraft/world/biome/BiomePlains.java.patch b/patches/minecraft/net/minecraft/world/biome/BiomePlains.java.patch index 76dd26ac2..4d2396deb 100644 --- a/patches/minecraft/net/minecraft/world/biome/BiomePlains.java.patch +++ b/patches/minecraft/net/minecraft/world/biome/BiomePlains.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/world/biome/BiomePlains.java +++ ../src-work/minecraft/net/minecraft/world/biome/BiomePlains.java -@@ -70,6 +70,7 @@ +@@ -72,6 +72,7 @@ this.field_76760_I.field_76803_B = 10; field_180280_ag.func_180710_a(BlockDoublePlant.EnumPlantType.GRASS); @@ -8,7 +8,7 @@ for (int i = 0; i < 7; ++i) { int j = p_180624_2_.nextInt(16) + 8; -@@ -79,7 +80,7 @@ +@@ -81,7 +82,7 @@ } } @@ -17,7 +17,7 @@ { field_180280_ag.func_180710_a(BlockDoublePlant.EnumPlantType.SUNFLOWER); -@@ -95,6 +96,21 @@ +@@ -97,6 +98,21 @@ super.func_180624_a(p_180624_1_, p_180624_2_, p_180624_3_); } diff --git a/patches/minecraft/net/minecraft/world/biome/BiomeProvider.java.patch b/patches/minecraft/net/minecraft/world/biome/BiomeProvider.java.patch index 9659e0809..e1526b132 100644 --- a/patches/minecraft/net/minecraft/world/biome/BiomeProvider.java.patch +++ b/patches/minecraft/net/minecraft/world/biome/BiomeProvider.java.patch @@ -1,14 +1,11 @@ --- ../src-base/minecraft/net/minecraft/world/biome/BiomeProvider.java +++ ../src-work/minecraft/net/minecraft/world/biome/BiomeProvider.java -@@ -16,6 +16,7 @@ - - public class BiomeProvider - { -+ public static List allowedBiomes = Lists.newArrayList(Biomes.field_76767_f, Biomes.field_76772_c, Biomes.field_76768_g, Biomes.field_76784_u, Biomes.field_76785_t, Biomes.field_76782_w, Biomes.field_76792_x); - private GenLayer field_76944_d; +@@ -22,11 +22,11 @@ private GenLayer field_76945_e; private final BiomeCache field_76942_f; -@@ -24,13 +25,14 @@ + private final List field_76943_g; +- ++ public static List allowedBiomes = Lists.newArrayList(Biomes.field_76767_f, Biomes.field_76772_c, Biomes.field_76768_g, Biomes.field_76784_u, Biomes.field_76785_t, Biomes.field_76782_w, Biomes.field_76792_x); protected BiomeProvider() { this.field_76942_f = new BiomeCache(this); @@ -17,22 +14,25 @@ } private BiomeProvider(long p_i45744_1_, WorldType p_i45744_3_, String p_i45744_4_) - { - this(); - GenLayer[] agenlayer = GenLayer.func_180781_a(p_i45744_1_, p_i45744_3_, p_i45744_4_); +@@ -39,6 +39,7 @@ + } + + GenLayer[] agenlayer = GenLayer.func_180781_a(p_i45744_1_, p_i45744_3_, this.field_190945_a); + agenlayer = getModdedBiomeGenerators(p_i45744_3_, p_i45744_1_, agenlayer); this.field_76944_d = agenlayer[0]; this.field_76945_e = agenlayer[1]; } -@@ -198,4 +200,11 @@ - { +@@ -207,6 +208,13 @@ this.field_76942_f.func_76838_a(); } -+ + + public GenLayer[] getModdedBiomeGenerators(WorldType worldType, long seed, GenLayer[] original) + { + net.minecraftforge.event.terraingen.WorldTypeEvent.InitBiomeGens event = new net.minecraftforge.event.terraingen.WorldTypeEvent.InitBiomeGens(worldType, seed, original); + net.minecraftforge.common.MinecraftForge.TERRAIN_GEN_BUS.post(event); + return event.getNewBiomeGens(); + } - } ++ + public boolean func_190944_c() + { + return this.field_190945_a != null && this.field_190945_a.field_177779_F >= 0; diff --git a/patches/minecraft/net/minecraft/world/biome/BiomeSavanna.java.patch b/patches/minecraft/net/minecraft/world/biome/BiomeSavanna.java.patch index 9bda289a3..bf73f1eaf 100644 --- a/patches/minecraft/net/minecraft/world/biome/BiomeSavanna.java.patch +++ b/patches/minecraft/net/minecraft/world/biome/BiomeSavanna.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/world/biome/BiomeSavanna.java +++ ../src-work/minecraft/net/minecraft/world/biome/BiomeSavanna.java -@@ -30,6 +30,7 @@ +@@ -39,6 +39,7 @@ { field_180280_ag.func_180710_a(BlockDoublePlant.EnumPlantType.GRASS); diff --git a/patches/minecraft/net/minecraft/world/biome/BiomeSnow.java.patch b/patches/minecraft/net/minecraft/world/biome/BiomeSnow.java.patch index 9345f4220..c2c1715f7 100644 --- a/patches/minecraft/net/minecraft/world/biome/BiomeSnow.java.patch +++ b/patches/minecraft/net/minecraft/world/biome/BiomeSnow.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/world/biome/BiomeSnow.java +++ ../src-work/minecraft/net/minecraft/world/biome/BiomeSnow.java -@@ -39,7 +39,7 @@ +@@ -56,7 +56,7 @@ public void func_180624_a(World p_180624_1_, Random p_180624_2_, BlockPos p_180624_3_) { diff --git a/patches/minecraft/net/minecraft/world/chunk/Chunk.java.patch b/patches/minecraft/net/minecraft/world/chunk/Chunk.java.patch index 5137f4b72..7f09586e9 100644 --- a/patches/minecraft/net/minecraft/world/chunk/Chunk.java.patch +++ b/patches/minecraft/net/minecraft/world/chunk/Chunk.java.patch @@ -234,7 +234,7 @@ + tileEntity.func_145838_q(); + } + - boolean flag = !this.field_76637_e.field_73011_w.func_177495_o(); + boolean flag = this.field_76637_e.field_73011_w.func_191066_m(); for (int i = 0; i < this.field_76652_q.length; ++i) @@ -1163,10 +1174,16 @@ diff --git a/patches/minecraft/net/minecraft/world/chunk/storage/AnvilChunkLoader.java.patch b/patches/minecraft/net/minecraft/world/chunk/storage/AnvilChunkLoader.java.patch index 9e66cea02..837111374 100644 --- a/patches/minecraft/net/minecraft/world/chunk/storage/AnvilChunkLoader.java.patch +++ b/patches/minecraft/net/minecraft/world/chunk/storage/AnvilChunkLoader.java.patch @@ -44,7 +44,7 @@ ChunkPos chunkpos = new ChunkPos(p_75815_2_, p_75815_3_); NBTTagCompound nbttagcompound = (NBTTagCompound)this.field_75828_a.get(chunkpos); -@@ -67,11 +101,17 @@ +@@ -67,7 +101,7 @@ nbttagcompound = this.field_186055_e.func_188257_a(FixTypes.CHUNK, CompressedStreamTools.func_74794_a(datainputstream)); } @@ -52,6 +52,9 @@ + return this.checkedReadChunkFromNBT__Async(p_75815_1_, p_75815_2_, p_75815_3_, nbttagcompound); } + public boolean func_191063_a(int p_191063_1_, int p_191063_2_) +@@ -80,6 +114,12 @@ + @Nullable protected Chunk func_75822_a(World p_75822_1_, int p_75822_2_, int p_75822_3_, NBTTagCompound p_75822_4_) { + Object[] data = this.checkedReadChunkFromNBT__Async(p_75822_1_, p_75822_2_, p_75822_3_, p_75822_4_); @@ -63,7 +66,7 @@ if (!p_75822_4_.func_150297_b("Level", 10)) { field_151505_a.error("Chunk file at {},{} is missing level data, skipping", new Object[] {Integer.valueOf(p_75822_2_), Integer.valueOf(p_75822_3_)}); -@@ -95,10 +135,29 @@ +@@ -103,10 +143,29 @@ field_151505_a.error("Chunk file at {},{} is in the wrong location; relocating. (Expected {}, {}, got {}, {})", new Object[] {Integer.valueOf(p_75822_2_), Integer.valueOf(p_75822_3_), Integer.valueOf(p_75822_2_), Integer.valueOf(p_75822_3_), Integer.valueOf(chunk.field_76635_g), Integer.valueOf(chunk.field_76647_h)}); nbttagcompound.func_74768_a("xPos", p_75822_2_); nbttagcompound.func_74768_a("zPos", p_75822_3_); @@ -94,15 +97,15 @@ } } } -@@ -114,6 +173,7 @@ +@@ -122,6 +181,7 @@ nbttagcompound.func_74782_a("Level", nbttagcompound1); - nbttagcompound.func_74768_a("DataVersion", 512); + nbttagcompound.func_74768_a("DataVersion", 818); this.func_75820_a(p_75816_2_, p_75816_1_, nbttagcompound1); + net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.event.world.ChunkDataEvent.Save(p_75816_2_, nbttagcompound)); this.func_75824_a(p_75816_2_.func_76632_l(), nbttagcompound); } catch (Exception exception) -@@ -299,8 +359,17 @@ +@@ -307,8 +367,17 @@ if (entity.func_70039_c(nbttagcompound2)) { @@ -120,7 +123,7 @@ } } } -@@ -310,8 +379,17 @@ +@@ -318,8 +387,17 @@ for (TileEntity tileentity : p_75820_1_.func_177434_r().values()) { @@ -138,7 +141,7 @@ } p_75820_3_.func_74782_a("TileEntities", nbttaglist2); -@@ -380,6 +458,12 @@ +@@ -388,6 +466,12 @@ chunk.func_76616_a(p_75823_2_.func_74770_j("Biomes")); } @@ -150,9 +153,9 @@ + { NBTTagList nbttaglist1 = p_75823_2_.func_150295_c("Entities", 10); - if (nbttaglist1 != null) -@@ -432,8 +516,6 @@ - } + for (int j1 = 0; j1 < nbttaglist1.func_74745_c(); ++j1) +@@ -431,8 +515,6 @@ + p_75823_1_.func_180497_b(new BlockPos(nbttagcompound3.func_74762_e("x"), nbttagcompound3.func_74762_e("y"), nbttagcompound3.func_74762_e("z")), block, nbttagcompound3.func_74762_e("t"), nbttagcompound3.func_74762_e("p")); } } - diff --git a/patches/minecraft/net/minecraft/world/chunk/storage/RegionFile.java.patch b/patches/minecraft/net/minecraft/world/chunk/storage/RegionFile.java.patch index 4f7ea6449..0113ec45f 100644 --- a/patches/minecraft/net/minecraft/world/chunk/storage/RegionFile.java.patch +++ b/patches/minecraft/net/minecraft/world/chunk/storage/RegionFile.java.patch @@ -1,8 +1,8 @@ --- ../src-base/minecraft/net/minecraft/world/chunk/storage/RegionFile.java +++ ../src-work/minecraft/net/minecraft/world/chunk/storage/RegionFile.java -@@ -94,6 +94,39 @@ - } - } +@@ -97,6 +97,39 @@ + + @Nullable + // This is a copy (sort of) of the method below it, make sure they stay in sync + public synchronized boolean chunkExists(int x, int z) diff --git a/patches/minecraft/net/minecraft/world/gen/ChunkProviderEnd.java.patch b/patches/minecraft/net/minecraft/world/gen/ChunkProviderEnd.java.patch index 50573abdc..6dcd1c56e 100644 --- a/patches/minecraft/net/minecraft/world/gen/ChunkProviderEnd.java.patch +++ b/patches/minecraft/net/minecraft/world/gen/ChunkProviderEnd.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/world/gen/ChunkProviderEnd.java +++ ../src-work/minecraft/net/minecraft/world/gen/ChunkProviderEnd.java -@@ -40,6 +40,9 @@ +@@ -44,6 +44,9 @@ double[] field_185967_f; double[] field_185968_g; private final WorldGenEndIsland field_185975_r = new WorldGenEndIsland(); @@ -8,16 +8,16 @@ + private int chunkX = 0; + private int chunkZ = 0; - public ChunkProviderEnd(World p_i46667_1_, boolean p_i46667_2_, long p_i46667_3_) + public ChunkProviderEnd(World p_i47241_1_, boolean p_i47241_2_, long p_i47241_3_, BlockPos p_i47241_5_) { -@@ -52,6 +55,16 @@ +@@ -57,6 +60,16 @@ this.field_73214_a = new NoiseGeneratorOctaves(this.field_73220_k, 10); this.field_73212_b = new NoiseGeneratorOctaves(this.field_73220_k, 16); this.field_185973_o = new NoiseGeneratorSimplex(this.field_73220_k); + + net.minecraftforge.event.terraingen.InitNoiseGensEvent.ContextEnd ctx = + new net.minecraftforge.event.terraingen.InitNoiseGensEvent.ContextEnd(field_185969_i, field_185970_j, field_185971_k, field_73214_a, field_73212_b, field_185973_o); -+ ctx = net.minecraftforge.event.terraingen.TerrainGen.getModdedNoiseGenerators(p_i46667_1_, this.field_73220_k, ctx); ++ ctx = net.minecraftforge.event.terraingen.TerrainGen.getModdedNoiseGenerators(p_i47241_1_, this.field_73220_k, ctx); + this.field_185969_i = ctx.getLPerlin1(); + this.field_185970_j = ctx.getLPerlin2(); + this.field_185971_k = ctx.getPerlin(); @@ -27,7 +27,7 @@ } public void func_180518_a(int p_180518_1_, int p_180518_2_, ChunkPrimer p_180518_3_) -@@ -124,6 +137,7 @@ +@@ -129,6 +142,7 @@ public void func_185962_a(ChunkPrimer p_185962_1_) { @@ -35,7 +35,7 @@ for (int i = 0; i < 16; ++i) { for (int j = 0; j < 16; ++j) -@@ -169,6 +183,7 @@ +@@ -174,6 +188,7 @@ public Chunk func_185932_a(int p_185932_1_, int p_185932_2_) { @@ -43,7 +43,7 @@ this.field_73220_k.setSeed((long)p_185932_1_ * 341873128712L + (long)p_185932_2_ * 132897987541L); ChunkPrimer chunkprimer = new ChunkPrimer(); this.field_73231_z = this.field_73230_p.func_72959_q().func_76933_b(this.field_73231_z, p_185932_1_ * 16, p_185932_2_ * 16, 16, 16); -@@ -250,6 +265,10 @@ +@@ -255,6 +270,10 @@ private double[] func_185963_a(double[] p_185963_1_, int p_185963_2_, int p_185963_3_, int p_185963_4_, int p_185963_5_, int p_185963_6_, int p_185963_7_) { @@ -54,7 +54,7 @@ if (p_185963_1_ == null) { p_185963_1_ = new double[p_185963_5_ * p_185963_6_ * p_185963_7_]; -@@ -322,6 +341,7 @@ +@@ -327,6 +346,7 @@ public void func_185931_b(int p_185931_1_, int p_185931_2_) { BlockFalling.field_149832_M = true; @@ -62,7 +62,7 @@ BlockPos blockpos = new BlockPos(p_185931_1_ * 16, 0, p_185931_2_ * 16); if (this.field_73229_q) -@@ -369,6 +389,7 @@ +@@ -395,6 +415,7 @@ } } diff --git a/patches/minecraft/net/minecraft/world/gen/ChunkProviderFlat.java.patch b/patches/minecraft/net/minecraft/world/gen/ChunkProviderFlat.java.patch index 6df9bd1fe..8e1876ca0 100644 --- a/patches/minecraft/net/minecraft/world/gen/ChunkProviderFlat.java.patch +++ b/patches/minecraft/net/minecraft/world/gen/ChunkProviderFlat.java.patch @@ -14,7 +14,7 @@ + net.minecraftforge.event.ForgeEventFactory.onChunkPopulate(true, this, this.field_73163_a, this.field_73161_b, p_185931_1_, p_185931_2_, flag); + - for (MapGenStructure mapgenstructure : this.field_82696_f) + for (MapGenStructure mapgenstructure : this.field_82696_f.values()) { boolean flag1 = mapgenstructure.func_175794_a(this.field_73163_a, this.field_73161_b, chunkpos); @@ -211,6 +214,9 @@ diff --git a/patches/minecraft/net/minecraft/world/gen/ChunkProviderOverworld.java.patch b/patches/minecraft/net/minecraft/world/gen/ChunkProviderOverworld.java.patch index 4a24c86b3..66b241359 100644 --- a/patches/minecraft/net/minecraft/world/gen/ChunkProviderOverworld.java.patch +++ b/patches/minecraft/net/minecraft/world/gen/ChunkProviderOverworld.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/world/gen/ChunkProviderOverworld.java +++ ../src-work/minecraft/net/minecraft/world/gen/ChunkProviderOverworld.java -@@ -60,6 +60,15 @@ +@@ -62,6 +62,15 @@ public ChunkProviderOverworld(World p_i46668_1_, long p_i46668_2_, boolean p_i46668_4_, String p_i46668_5_) { @@ -16,7 +16,7 @@ this.field_185995_n = p_i46668_1_; this.field_185996_o = p_i46668_4_; this.field_185997_p = p_i46668_1_.func_72912_H().func_76067_t(); -@@ -89,6 +98,17 @@ +@@ -91,6 +100,17 @@ this.field_186001_t = this.field_186000_s.field_177778_E ? Blocks.field_150353_l.func_176223_P() : Blocks.field_150355_j.func_176223_P(); p_i46668_1_.func_181544_b(this.field_186000_s.field_177841_q); } @@ -34,7 +34,7 @@ } public void func_185976_a(int p_185976_1_, int p_185976_2_, ChunkPrimer p_185976_3_) -@@ -162,6 +182,7 @@ +@@ -164,6 +184,7 @@ public void func_185977_a(int p_185977_1_, int p_185977_2_, ChunkPrimer p_185977_3_, Biome[] p_185977_4_) { @@ -42,7 +42,7 @@ double d0 = 0.03125D; this.field_186002_u = this.field_185994_m.func_151599_a(this.field_186002_u, (double)(p_185977_1_ * 16), (double)(p_185977_2_ * 16), 16, 16, 0.0625D, 0.0625D, 1.0D); -@@ -364,6 +385,8 @@ +@@ -371,6 +392,8 @@ boolean flag = false; ChunkPos chunkpos = new ChunkPos(p_185931_1_, p_185931_2_); @@ -51,7 +51,7 @@ if (this.field_185996_o) { if (this.field_186000_s.field_177829_w) -@@ -393,6 +416,7 @@ +@@ -405,6 +428,7 @@ } if (biome != Biomes.field_76769_d && biome != Biomes.field_76786_s && this.field_186000_s.field_177781_A && !flag && this.field_185990_i.nextInt(this.field_186000_s.field_177782_B) == 0) @@ -59,7 +59,7 @@ { int i1 = this.field_185990_i.nextInt(16) + 8; int j1 = this.field_185990_i.nextInt(256); -@@ -401,6 +425,7 @@ +@@ -413,6 +437,7 @@ } if (!flag && this.field_185990_i.nextInt(this.field_186000_s.field_177777_D / 10) == 0 && this.field_186000_s.field_177783_C) @@ -67,7 +67,7 @@ { int i2 = this.field_185990_i.nextInt(16) + 8; int l2 = this.field_185990_i.nextInt(this.field_185990_i.nextInt(248) + 8); -@@ -413,6 +438,7 @@ +@@ -425,6 +450,7 @@ } if (this.field_186000_s.field_177837_s) @@ -75,7 +75,7 @@ { for (int j2 = 0; j2 < this.field_186000_s.field_177835_t; ++j2) { -@@ -424,9 +450,12 @@ +@@ -436,9 +462,12 @@ } biome.func_180624_a(this.field_185995_n, this.field_185990_i, new BlockPos(i, 0, j)); @@ -88,7 +88,7 @@ for (int k2 = 0; k2 < 16; ++k2) { for (int j3 = 0; j3 < 16; ++j3) -@@ -445,7 +474,10 @@ +@@ -457,7 +486,10 @@ } } } diff --git a/patches/minecraft/net/minecraft/world/gen/ChunkProviderServer.java.patch b/patches/minecraft/net/minecraft/world/gen/ChunkProviderServer.java.patch index 406469374..c148d2f1e 100644 --- a/patches/minecraft/net/minecraft/world/gen/ChunkProviderServer.java.patch +++ b/patches/minecraft/net/minecraft/world/gen/ChunkProviderServer.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/world/gen/ChunkProviderServer.java +++ ../src-work/minecraft/net/minecraft/world/gen/ChunkProviderServer.java -@@ -35,6 +35,7 @@ +@@ -36,6 +36,7 @@ public final IChunkLoader field_73247_e; public final Long2ObjectMap field_73244_f = new Long2ObjectOpenHashMap(8192); public final WorldServer field_73251_h; @@ -8,7 +8,7 @@ public ChunkProviderServer(WorldServer p_i46838_1_, IChunkLoader p_i46838_2_, IChunkGenerator p_i46838_3_) { -@@ -82,20 +83,47 @@ +@@ -86,20 +87,47 @@ @Nullable public Chunk func_186028_c(int p_186028_1_, int p_186028_2_) { @@ -60,7 +60,7 @@ return chunk; } -@@ -221,6 +249,11 @@ +@@ -225,6 +253,11 @@ { if (!this.field_73248_b.isEmpty()) { @@ -72,7 +72,7 @@ Iterator iterator = this.field_73248_b.iterator(); for (int i = 0; i < 100 && iterator.hasNext(); iterator.remove()) -@@ -235,6 +268,11 @@ +@@ -239,6 +272,11 @@ this.func_73243_a(chunk); this.field_73244_f.remove(olong); ++i; diff --git a/patches/minecraft/net/minecraft/world/gen/feature/WorldGenDungeons.java.patch b/patches/minecraft/net/minecraft/world/gen/feature/WorldGenDungeons.java.patch index 098f8b475..6ca2da90e 100644 --- a/patches/minecraft/net/minecraft/world/gen/feature/WorldGenDungeons.java.patch +++ b/patches/minecraft/net/minecraft/world/gen/feature/WorldGenDungeons.java.patch @@ -1,8 +1,8 @@ --- ../src-base/minecraft/net/minecraft/world/gen/feature/WorldGenDungeons.java +++ ../src-work/minecraft/net/minecraft/world/gen/feature/WorldGenDungeons.java -@@ -154,6 +154,6 @@ +@@ -159,6 +159,6 @@ - private String func_76543_b(Random p_76543_1_) + private ResourceLocation func_76543_b(Random p_76543_1_) { - return field_175916_b[p_76543_1_.nextInt(field_175916_b.length)]; + return net.minecraftforge.common.DungeonHooks.getRandomDungeonMob(p_76543_1_); diff --git a/patches/minecraft/net/minecraft/world/gen/layer/GenLayer.java.patch b/patches/minecraft/net/minecraft/world/gen/layer/GenLayer.java.patch index 760ae52ff..b06745871 100644 --- a/patches/minecraft/net/minecraft/world/gen/layer/GenLayer.java.patch +++ b/patches/minecraft/net/minecraft/world/gen/layer/GenLayer.java.patch @@ -1,22 +1,22 @@ --- ../src-base/minecraft/net/minecraft/world/gen/layer/GenLayer.java +++ ../src-work/minecraft/net/minecraft/world/gen/layer/GenLayer.java -@@ -48,12 +48,12 @@ +@@ -47,12 +47,12 @@ i = 6; } + i = getModdedBiomeSize(p_180781_2_, i); + - GenLayer lvt_8_1_ = GenLayerZoom.func_75915_a(1000L, genlayer4, 0); - GenLayerRiverInit genlayerriverinit = new GenLayerRiverInit(100L, lvt_8_1_); -- GenLayerBiome lvt_9_1_ = new GenLayerBiome(200L, genlayer4, p_180781_2_, p_180781_3_); -- GenLayer genlayer6 = GenLayerZoom.func_75915_a(1000L, lvt_9_1_, 2); + GenLayer lvt_7_1_ = GenLayerZoom.func_75915_a(1000L, genlayer4, 0); + GenLayerRiverInit genlayerriverinit = new GenLayerRiverInit(100L, lvt_7_1_); +- GenLayerBiome lvt_8_1_ = new GenLayerBiome(200L, genlayer4, p_180781_2_, p_180781_3_); +- GenLayer genlayer6 = GenLayerZoom.func_75915_a(1000L, lvt_8_1_, 2); - GenLayerBiomeEdge genlayerbiomeedge = new GenLayerBiomeEdge(1000L, genlayer6); - GenLayer lvt_10_1_ = GenLayerZoom.func_75915_a(1000L, genlayerriverinit, 2); + GenLayer lvt_9_1_ = GenLayerZoom.func_75915_a(1000L, genlayerriverinit, 2); + GenLayer genlayerbiomeedge = p_180781_2_.getBiomeLayer(p_180781_0_, genlayer4, p_180781_3_); - GenLayer genlayerhills = new GenLayerHills(1000L, genlayerbiomeedge, lvt_10_1_); + GenLayer genlayerhills = new GenLayerHills(1000L, genlayerbiomeedge, lvt_9_1_); GenLayer genlayer5 = GenLayerZoom.func_75915_a(1000L, genlayerriverinit, 2); genlayer5 = GenLayerZoom.func_75915_a(1000L, genlayer5, j); -@@ -157,8 +157,7 @@ +@@ -156,8 +156,7 @@ protected static boolean func_151618_b(int p_151618_0_) { @@ -26,7 +26,7 @@ } protected int func_151619_a(int... p_151619_1_) -@@ -170,4 +169,27 @@ +@@ -169,4 +168,27 @@ { return p_151617_2_ == p_151617_3_ && p_151617_3_ == p_151617_4_ ? p_151617_2_ : (p_151617_1_ == p_151617_2_ && p_151617_1_ == p_151617_3_ ? p_151617_1_ : (p_151617_1_ == p_151617_2_ && p_151617_1_ == p_151617_4_ ? p_151617_1_ : (p_151617_1_ == p_151617_3_ && p_151617_1_ == p_151617_4_ ? p_151617_1_ : (p_151617_1_ == p_151617_2_ && p_151617_3_ != p_151617_4_ ? p_151617_1_ : (p_151617_1_ == p_151617_3_ && p_151617_2_ != p_151617_4_ ? p_151617_1_ : (p_151617_1_ == p_151617_4_ && p_151617_2_ != p_151617_3_ ? p_151617_1_ : (p_151617_2_ == p_151617_3_ && p_151617_1_ != p_151617_4_ ? p_151617_2_ : (p_151617_2_ == p_151617_4_ && p_151617_1_ != p_151617_3_ ? p_151617_2_ : (p_151617_3_ == p_151617_4_ && p_151617_1_ != p_151617_2_ ? p_151617_3_ : this.func_151619_a(new int[] {p_151617_1_, p_151617_2_, p_151617_3_, p_151617_4_})))))))))); } diff --git a/patches/minecraft/net/minecraft/world/gen/layer/GenLayerBiome.java.patch b/patches/minecraft/net/minecraft/world/gen/layer/GenLayerBiome.java.patch index c517dd716..52c001534 100644 --- a/patches/minecraft/net/minecraft/world/gen/layer/GenLayerBiome.java.patch +++ b/patches/minecraft/net/minecraft/world/gen/layer/GenLayerBiome.java.patch @@ -12,7 +12,7 @@ + private java.util.List[] biomes = new java.util.ArrayList[net.minecraftforge.common.BiomeManager.BiomeType.values().length]; private final ChunkProviderSettings field_175973_g; - public GenLayerBiome(long p_i45560_1_, GenLayer p_i45560_3_, WorldType p_i45560_4_, String p_i45560_5_) + public GenLayerBiome(long p_i45560_1_, GenLayer p_i45560_3_, WorldType p_i45560_4_, ChunkProviderSettings p_i45560_5_) @@ -18,9 +16,30 @@ super(p_i45560_1_); this.field_75909_a = p_i45560_3_; @@ -44,8 +44,8 @@ + biomes[desertIdx].add(new net.minecraftforge.common.BiomeManager.BiomeEntry(Biomes.field_76768_g, 10)); this.field_175973_g = null; } - else if (p_i45560_4_ == WorldType.field_180271_f) -@@ -74,7 +93,7 @@ + else +@@ -70,7 +89,7 @@ } else { @@ -54,7 +54,7 @@ } } else if (k == 2) -@@ -85,7 +104,7 @@ +@@ -81,7 +100,7 @@ } else { @@ -63,7 +63,7 @@ } } else if (k == 3) -@@ -96,12 +115,12 @@ +@@ -92,12 +111,12 @@ } else { @@ -78,7 +78,7 @@ } else { -@@ -112,4 +131,12 @@ +@@ -108,4 +127,12 @@ return aint1; } diff --git a/patches/minecraft/net/minecraft/world/gen/structure/MapGenStronghold.java.patch b/patches/minecraft/net/minecraft/world/gen/structure/MapGenStronghold.java.patch index 696606ee4..d9a07a6c9 100644 --- a/patches/minecraft/net/minecraft/world/gen/structure/MapGenStronghold.java.patch +++ b/patches/minecraft/net/minecraft/world/gen/structure/MapGenStronghold.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/world/gen/structure/MapGenStronghold.java +++ ../src-work/minecraft/net/minecraft/world/gen/structure/MapGenStronghold.java -@@ -28,11 +28,19 @@ +@@ -29,11 +29,19 @@ for (Biome biome : Biome.field_185377_q) { diff --git a/patches/minecraft/net/minecraft/world/gen/structure/MapGenStructure.java.patch b/patches/minecraft/net/minecraft/world/gen/structure/MapGenStructure.java.patch index 628727ece..9e7d62a1d 100644 --- a/patches/minecraft/net/minecraft/world/gen/structure/MapGenStructure.java.patch +++ b/patches/minecraft/net/minecraft/world/gen/structure/MapGenStructure.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/world/gen/structure/MapGenStructure.java +++ ../src-work/minecraft/net/minecraft/world/gen/structure/MapGenStructure.java -@@ -221,12 +221,12 @@ +@@ -168,12 +168,12 @@ { if (this.field_143029_e == null) { diff --git a/patches/minecraft/net/minecraft/world/gen/structure/StructureComponent.java.patch b/patches/minecraft/net/minecraft/world/gen/structure/StructureComponent.java.patch index 8b8d8c9c7..d46138d51 100644 --- a/patches/minecraft/net/minecraft/world/gen/structure/StructureComponent.java.patch +++ b/patches/minecraft/net/minecraft/world/gen/structure/StructureComponent.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/world/gen/structure/StructureComponent.java +++ ../src-work/minecraft/net/minecraft/world/gen/structure/StructureComponent.java -@@ -40,6 +40,10 @@ +@@ -41,6 +41,10 @@ public final NBTTagCompound func_143010_b() { diff --git a/patches/minecraft/net/minecraft/world/gen/structure/StructureVillagePieces.java.patch b/patches/minecraft/net/minecraft/world/gen/structure/StructureVillagePieces.java.patch index 2c3db8583..b65b5cd04 100644 --- a/patches/minecraft/net/minecraft/world/gen/structure/StructureVillagePieces.java.patch +++ b/patches/minecraft/net/minecraft/world/gen/structure/StructureVillagePieces.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/world/gen/structure/StructureVillagePieces.java +++ ../src-work/minecraft/net/minecraft/world/gen/structure/StructureVillagePieces.java -@@ -67,6 +67,7 @@ +@@ -68,6 +68,7 @@ list.add(new StructureVillagePieces.PieceWeight(StructureVillagePieces.Field2.class, 3, MathHelper.func_76136_a(p_75084_0_, 2 + p_75084_1_, 4 + p_75084_1_ * 2))); list.add(new StructureVillagePieces.PieceWeight(StructureVillagePieces.House2.class, 15, MathHelper.func_76136_a(p_75084_0_, 0, 1 + p_75084_1_))); list.add(new StructureVillagePieces.PieceWeight(StructureVillagePieces.House3.class, 8, MathHelper.func_76136_a(p_75084_0_, 0 + p_75084_1_, 3 + p_75084_1_ * 2))); @@ -8,7 +8,7 @@ Iterator iterator = list.iterator(); while (iterator.hasNext()) -@@ -139,6 +140,10 @@ +@@ -140,6 +141,10 @@ { structurevillagepieces$village = StructureVillagePieces.House3.func_175849_a(p_176065_0_, p_176065_2_, p_176065_3_, p_176065_4_, p_176065_5_, p_176065_6_, p_176065_7_, p_176065_8_); } @@ -19,7 +19,7 @@ return structurevillagepieces$village; } -@@ -1538,6 +1543,7 @@ +@@ -1539,6 +1544,7 @@ public List field_74931_h; public List field_74932_i = Lists.newArrayList(); public List field_74930_j = Lists.newArrayList(); @@ -27,7 +27,7 @@ public Start() { -@@ -1550,6 +1556,8 @@ +@@ -1551,6 +1557,8 @@ this.field_74931_h = p_i2104_6_; this.field_74928_c = p_i2104_7_; Biome biome = p_i2104_1_.func_180300_a(new BlockPos(p_i2104_4_, 0, p_i2104_5_), Biomes.field_180279_ad); @@ -36,7 +36,7 @@ if (biome instanceof BiomeDesert) { -@@ -1622,6 +1630,7 @@ +@@ -1623,6 +1631,7 @@ private int field_74896_a; protected int field_189928_h; protected boolean field_189929_i; @@ -44,7 +44,7 @@ public Village() { -@@ -1635,6 +1644,7 @@ +@@ -1636,6 +1645,7 @@ { this.field_189928_h = p_i2107_1_.field_189928_h; this.field_189929_i = p_i2107_1_.field_189929_i; @@ -52,24 +52,24 @@ } } -@@ -1767,7 +1777,7 @@ - EntityZombie entityzombie = new EntityZombie(p_74893_1_); - entityzombie.func_70012_b((double)j + 0.5D, (double)k, (double)l + 0.5D, 0.0F, 0.0F); - entityzombie.func_180482_a(p_74893_1_.func_175649_E(new BlockPos(entityzombie)), (IEntityLivingData)null); -- entityzombie.func_189778_a(ZombieType.func_190144_b(this.func_180779_c(i, 0))); -+ entityzombie.setVillagerType(chooseForgeProfession(i, net.minecraftforge.fml.common.registry.ForgeRegistries.VILLAGER_PROFESSIONS.getValue(new net.minecraft.util.ResourceLocation("minecraft:farmer")))); - entityzombie.func_110163_bv(); - p_74893_1_.func_72838_d(entityzombie); +@@ -1770,7 +1780,6 @@ + EntityZombieVillager entityzombievillager = new EntityZombieVillager(p_74893_1_); + entityzombievillager.func_70012_b((double)j + 0.5D, (double)k, (double)l + 0.5D, 0.0F, 0.0F); + entityzombievillager.func_180482_a(p_74893_1_.func_175649_E(new BlockPos(entityzombievillager)), (IEntityLivingData)null); +- entityzombievillager.func_190733_a(this.func_180779_c(i, 0)); + entityzombievillager.func_110163_bv(); + p_74893_1_.func_72838_d(entityzombievillager); } -@@ -1776,20 +1786,28 @@ +@@ -1778,7 +1787,7 @@ + { EntityVillager entityvillager = new EntityVillager(p_74893_1_); entityvillager.func_70012_b((double)j + 0.5D, (double)k, (double)l + 0.5D, 0.0F, 0.0F); - entityvillager.func_180482_a(p_74893_1_.func_175649_E(new BlockPos(entityvillager)), (IEntityLivingData)null); -- entityvillager.func_70938_b(this.func_180779_c(i, entityvillager.func_70946_n())); +- entityvillager.func_70938_b(this.func_180779_c(i, p_74893_1_.field_73012_v.nextInt(6))); + entityvillager.setProfession(this.chooseForgeProfession(i, entityvillager.getProfessionForge())); + entityvillager.func_190672_a(p_74893_1_.func_175649_E(new BlockPos(entityvillager)), (IEntityLivingData)null, false); p_74893_1_.func_72838_d(entityvillager); } - } +@@ -1786,13 +1795,21 @@ } } diff --git a/patches/minecraft/net/minecraft/world/storage/MapData.java.patch b/patches/minecraft/net/minecraft/world/storage/MapData.java.patch index af51761d2..50cac1095 100644 --- a/patches/minecraft/net/minecraft/world/storage/MapData.java.patch +++ b/patches/minecraft/net/minecraft/world/storage/MapData.java.patch @@ -1,14 +1,14 @@ --- ../src-base/minecraft/net/minecraft/world/storage/MapData.java +++ ../src-work/minecraft/net/minecraft/world/storage/MapData.java -@@ -22,7 +22,7 @@ +@@ -21,7 +21,7 @@ { public int field_76201_a; public int field_76199_b; - public byte field_76200_c; + public int field_76200_c; //FML byte -> int public boolean field_186210_e; + public boolean field_191096_f; public byte field_76197_d; - public byte[] field_76198_e = new byte[16384]; @@ -46,7 +46,17 @@ public void func_76184_a(NBTTagCompound p_76184_1_) @@ -28,7 +28,7 @@ this.field_76201_a = p_76184_1_.func_74762_e("xCenter"); this.field_76199_b = p_76184_1_.func_74762_e("zCenter"); this.field_76197_d = p_76184_1_.func_74771_c("scale"); -@@ -97,7 +107,7 @@ +@@ -98,7 +108,7 @@ public NBTTagCompound func_189551_b(NBTTagCompound p_189551_1_) { @@ -37,12 +37,12 @@ p_189551_1_.func_74768_a("xCenter", this.field_76201_a); p_189551_1_.func_74768_a("zCenter", this.field_76199_b); p_189551_1_.func_74774_a("scale", this.field_76197_d); -@@ -178,7 +188,7 @@ - p_82567_8_ = p_82567_8_ + (p_82567_8_ < 0.0D ? -8.0D : 8.0D); - b2 = (byte)((int)(p_82567_8_ * 16.0D / 360.0D)); +@@ -209,7 +219,7 @@ + p_191095_8_ = p_191095_8_ + (p_191095_8_ < 0.0D ? -8.0D : 8.0D); + b2 = (byte)((int)(p_191095_8_ * 16.0D / 360.0D)); - if (this.field_76200_c < 0) -+ if (p_82567_2_.field_73011_w.shouldMapSpin(p_82567_3_, p_82567_4_, p_82567_6_, p_82567_8_)) ++ if (p_191095_2_.field_73011_w.shouldMapSpin(p_191095_3_, p_191095_4_, p_191095_6_, p_191095_8_)) { - int k = (int)(p_82567_2_.func_72912_H().func_76073_f() / 10L); - b2 = (byte)(k * k * 34187121 + k * 121 >> 15 & 15); + int l = (int)(p_191095_2_.func_72912_H().func_76073_f() / 10L); + b2 = (byte)(l * l * 34187121 + l * 121 >> 15 & 15); diff --git a/patches/minecraft/net/minecraft/world/storage/SaveFormatOld.java.patch b/patches/minecraft/net/minecraft/world/storage/SaveFormatOld.java.patch index dfb416fcd..60f926478 100644 --- a/patches/minecraft/net/minecraft/world/storage/SaveFormatOld.java.patch +++ b/patches/minecraft/net/minecraft/world/storage/SaveFormatOld.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/world/storage/SaveFormatOld.java +++ ../src-work/minecraft/net/minecraft/world/storage/SaveFormatOld.java -@@ -108,6 +108,24 @@ +@@ -109,6 +109,24 @@ } } diff --git a/patches/minecraft/net/minecraft/world/storage/SaveHandler.java.patch b/patches/minecraft/net/minecraft/world/storage/SaveHandler.java.patch index 0e01b2a5a..895152f64 100644 --- a/patches/minecraft/net/minecraft/world/storage/SaveHandler.java.patch +++ b/patches/minecraft/net/minecraft/world/storage/SaveHandler.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/world/storage/SaveHandler.java +++ ../src-work/minecraft/net/minecraft/world/storage/SaveHandler.java -@@ -118,7 +118,7 @@ +@@ -119,7 +119,7 @@ if (file1.exists()) { @@ -9,7 +9,7 @@ if (worldinfo != null) { -@@ -126,8 +126,9 @@ +@@ -127,8 +127,9 @@ } } @@ -20,7 +20,7 @@ } public void func_75755_a(WorldInfo p_75755_1_, @Nullable NBTTagCompound p_75755_2_) -@@ -136,6 +137,8 @@ +@@ -137,6 +138,8 @@ NBTTagCompound nbttagcompound1 = new NBTTagCompound(); nbttagcompound1.func_74782_a("Data", nbttagcompound); @@ -29,7 +29,7 @@ try { File file1 = new File(this.field_75770_b, "level.dat_new"); -@@ -188,6 +191,7 @@ +@@ -189,6 +192,7 @@ } file1.renameTo(file2); @@ -37,7 +37,7 @@ } catch (Exception var5) { -@@ -218,6 +222,7 @@ +@@ -219,6 +223,7 @@ p_75752_1_.func_70020_e(this.field_186341_a.func_188257_a(FixTypes.PLAYER, nbttagcompound)); } @@ -45,7 +45,7 @@ return nbttagcompound; } -@@ -259,4 +264,22 @@ +@@ -260,4 +265,22 @@ { return this.field_186342_h; } diff --git a/patches/minecraft/net/minecraft/world/storage/loot/LootEntryItem.java.patch b/patches/minecraft/net/minecraft/world/storage/loot/LootEntryItem.java.patch index 240a8c049..8c110fcf3 100644 --- a/patches/minecraft/net/minecraft/world/storage/loot/LootEntryItem.java.patch +++ b/patches/minecraft/net/minecraft/world/storage/loot/LootEntryItem.java.patch @@ -14,10 +14,10 @@ } @@ -39,7 +39,7 @@ - if (itemstack.field_77994_a > 0) + if (!itemstack.func_190926_b()) { -- if (itemstack.field_77994_a < this.field_186368_a.func_77639_j()) -+ if (itemstack.field_77994_a < this.field_186368_a.getItemStackLimit(itemstack)) +- if (itemstack.func_190916_E() < this.field_186368_a.func_77639_j()) ++ if (itemstack.func_190916_E() < this.field_186368_a.getItemStackLimit(itemstack)) { p_186363_1_.add(itemstack); } diff --git a/patches/minecraft/net/minecraft/world/storage/loot/LootTable.java.patch b/patches/minecraft/net/minecraft/world/storage/loot/LootTable.java.patch index ec673e536..58ecc2ba2 100644 --- a/patches/minecraft/net/minecraft/world/storage/loot/LootTable.java.patch +++ b/patches/minecraft/net/minecraft/world/storage/loot/LootTable.java.patch @@ -14,7 +14,7 @@ } public List func_186462_a(Random p_186462_1_, LootContext p_186462_2_) -@@ -146,6 +146,58 @@ +@@ -144,6 +144,58 @@ return list; } diff --git a/src/main/java/net/minecraftforge/common/DungeonHooks.java b/src/main/java/net/minecraftforge/common/DungeonHooks.java index 57ec24494..c23ca8eb0 100644 --- a/src/main/java/net/minecraftforge/common/DungeonHooks.java +++ b/src/main/java/net/minecraftforge/common/DungeonHooks.java @@ -22,6 +22,7 @@ package net.minecraftforge.common; import java.util.ArrayList; import java.util.Random; +import net.minecraft.util.ResourceLocation; import net.minecraft.util.WeightedRandom; public class DungeonHooks @@ -42,7 +43,7 @@ public class DungeonHooks * Meaning, Zombies are twice as common as spiders or skeletons. * @return The new rarity of the monster, */ - public static float addDungeonMob(String name, int rarity) + public static float addDungeonMob(ResourceLocation name, int rarity) { if (rarity <= 0) { @@ -85,21 +86,17 @@ public class DungeonHooks * @param rand World generation random number generator * @return The mob name */ - public static String getRandomDungeonMob(Random rand) + public static ResourceLocation getRandomDungeonMob(Random rand) { DungeonMob mob = WeightedRandom.getRandomItem(rand, dungeonMobs); - if (mob == null) - { - return ""; - } return mob.type; } public static class DungeonMob extends WeightedRandom.Item { - public String type; - public DungeonMob(int weight, String type) + public ResourceLocation type; + public DungeonMob(int weight, ResourceLocation type) { super(weight); this.type = type; @@ -114,8 +111,8 @@ public class DungeonHooks static { - addDungeonMob("Skeleton", 100); - addDungeonMob("Zombie", 200); - addDungeonMob("Spider", 100); + addDungeonMob(new ResourceLocation("skeleton"), 100); + addDungeonMob(new ResourceLocation("zombie"), 200); + addDungeonMob(new ResourceLocation("spider"), 100); } } diff --git a/src/main/java/net/minecraftforge/common/ForgeHooks.java b/src/main/java/net/minecraftforge/common/ForgeHooks.java index edd1b6f5d..543095dd9 100644 --- a/src/main/java/net/minecraftforge/common/ForgeHooks.java +++ b/src/main/java/net/minecraftforge/common/ForgeHooks.java @@ -78,6 +78,7 @@ import net.minecraft.util.EnumActionResult; import net.minecraft.util.EnumFacing; import net.minecraft.util.EnumHand; import net.minecraft.util.JsonUtils; +import net.minecraft.util.NonNullList; import net.minecraft.util.ResourceLocation; import net.minecraft.util.WeightedRandom; import net.minecraft.util.math.AxisAlignedBB; @@ -146,7 +147,7 @@ public class ForgeHooks SeedEntry entry = WeightedRandom.getRandomItem(rand, seedList); if (entry == null || entry.seed == null) { - return null; + return ItemStack.field_190927_a; } return entry.getStack(rand, fortune); } @@ -264,14 +265,14 @@ public class ForgeHooks public static int getTotalArmorValue(EntityPlayer player) { int ret = 0; - for (int x = 0; x < player.inventory.armorInventory.length; x++) + for (int x = 0; x < player.inventory.armorInventory.size(); x++) { - ItemStack stack = player.inventory.armorInventory[x]; - if (stack != null && stack.getItem() instanceof ISpecialArmor) + ItemStack stack = player.inventory.armorInventory.get(x); + if (stack.getItem() instanceof ISpecialArmor) { ret += ((ISpecialArmor)stack.getItem()).getArmorDisplay(player, stack, x); } - else if (stack != null && stack.getItem() instanceof ItemArmor) + else if (stack.getItem() instanceof ItemArmor) { ret += ((ItemArmor)stack.getItem()).damageReduceAmount; } @@ -297,6 +298,7 @@ public class ForgeHooks public static boolean onPickBlock(RayTraceResult target, EntityPlayer player, World world) { /* + boolean flag = this.thePlayer.capabilities.isCreativeMode; TileEntity tileentity = null; ItemStack itemstack; @@ -306,14 +308,14 @@ public class ForgeHooks IBlockState iblockstate = this.theWorld.getBlockState(blockpos); Block block = iblockstate.getBlock(); - if (iblockstate.getMaterial() == Material.air) + if (iblockstate.getMaterial() == Material.AIR) { return; } - itemstack = block.func_185473_a(this.theWorld, blockpos, iblockstate); + itemstack = block.getItem(this.theWorld, blockpos, iblockstate); - if (itemstack == null) + if (itemstack.func_190926_b()) { return; } @@ -332,24 +334,24 @@ public class ForgeHooks if (this.objectMouseOver.entityHit instanceof EntityPainting) { - itemstack = new ItemStack(Items.painting); + itemstack = new ItemStack(Items.PAINTING); } else if (this.objectMouseOver.entityHit instanceof EntityLeashKnot) { - itemstack = new ItemStack(Items.lead); + itemstack = new ItemStack(Items.LEAD); } else if (this.objectMouseOver.entityHit instanceof EntityItemFrame) { EntityItemFrame entityitemframe = (EntityItemFrame)this.objectMouseOver.entityHit; ItemStack itemstack1 = entityitemframe.getDisplayedItem(); - if (itemstack1 == null) + if (itemstack1.func_190926_b()) { - itemstack = new ItemStack(Items.item_frame); + itemstack = new ItemStack(Items.ITEM_FRAME); } else { - itemstack = ItemStack.copyItemStack(itemstack1); + itemstack = itemstack1.copy(); } } else if (this.objectMouseOver.entityHit instanceof EntityMinecart) @@ -357,52 +359,96 @@ public class ForgeHooks EntityMinecart entityminecart = (EntityMinecart)this.objectMouseOver.entityHit; Item item; - switch (entityminecart.func_184264_v()) + switch (entityminecart.getType()) { case FURNACE: - item = Items.furnace_minecart; + item = Items.FURNACE_MINECART; break; case CHEST: - item = Items.chest_minecart; + item = Items.CHEST_MINECART; break; case TNT: - item = Items.tnt_minecart; + item = Items.TNT_MINECART; break; case HOPPER: - item = Items.hopper_minecart; + item = Items.HOPPER_MINECART; break; case COMMAND_BLOCK: - item = Items.command_block_minecart; + item = Items.COMMAND_BLOCK_MINECART; break; default: - item = Items.minecart; + item = Items.MINECART; } itemstack = new ItemStack(item); } else if (this.objectMouseOver.entityHit instanceof EntityBoat) { - itemstack = new ItemStack(((EntityBoat)this.objectMouseOver.entityHit).func_184455_j()); + itemstack = new ItemStack(((EntityBoat)this.objectMouseOver.entityHit).getItemBoat()); } else if (this.objectMouseOver.entityHit instanceof EntityArmorStand) { - itemstack = new ItemStack(Items.armor_stand); + itemstack = new ItemStack(Items.ARMOR_STAND); } else if (this.objectMouseOver.entityHit instanceof EntityEnderCrystal) { - itemstack = new ItemStack(Items.field_185158_cP); + itemstack = new ItemStack(Items.END_CRYSTAL); } else { - String s = EntityList.getEntityString(this.objectMouseOver.entityHit); + ResourceLocation resourcelocation = EntityList.func_191301_a(this.objectMouseOver.entityHit); - if (!EntityList.entityEggs.containsKey(s)) + if (resourcelocation == null || !EntityList.ENTITY_EGGS.containsKey(resourcelocation)) { return; } - itemstack = new ItemStack(Items.spawn_egg); - ItemMonsterPlacer.func_185078_a(itemstack, s); + itemstack = new ItemStack(Items.SPAWN_EGG); + ItemMonsterPlacer.applyEntityIdToItemStack(itemstack, resourcelocation); + } + } + + if (itemstack.func_190926_b()) + { + String s = ""; + + if (this.objectMouseOver.typeOfHit == RayTraceResult.Type.BLOCK) + { + s = ((ResourceLocation)Block.REGISTRY.getNameForObject(this.theWorld.getBlockState(this.objectMouseOver.getBlockPos()).getBlock())).toString(); + } + else if (this.objectMouseOver.typeOfHit == RayTraceResult.Type.ENTITY) + { + s = EntityList.func_191301_a(this.objectMouseOver.entityHit).toString(); + } + + LOGGER.warn("Picking on: [{}] {} gave null item", new Object[] {this.objectMouseOver.typeOfHit, s}); + } + else + { + InventoryPlayer inventoryplayer = this.thePlayer.inventory; + + if (tileentity != null) + { + this.storeTEInStack(itemstack, tileentity); + } + + int i = inventoryplayer.getSlotFor(itemstack); + + if (flag) + { + inventoryplayer.setPickedItemStack(itemstack); + this.playerController.sendSlotPacket(this.thePlayer.getHeldItem(EnumHand.MAIN_HAND), 36 + inventoryplayer.currentItem); + } + else if (i != -1) + { + if (InventoryPlayer.isHotbar(i)) + { + inventoryplayer.currentItem = i; + } + else + { + this.playerController.pickItem(i); + } } } */ @@ -756,7 +802,7 @@ public class ForgeHooks { // handle all placement events here int meta = itemstack.getItemDamage(); - int size = itemstack.stackSize; + int size = itemstack.func_190916_E(); NBTTagCompound nbt = null; if (itemstack.getTagCompound() != null) { @@ -768,14 +814,14 @@ public class ForgeHooks world.captureBlockSnapshots = true; } - EnumActionResult ret = itemstack.getItem().onItemUse(itemstack, player, world, pos, hand, side, hitX, hitY, hitZ); + EnumActionResult ret = itemstack.getItem().onItemUse(player, world, pos, hand, side, hitX, hitY, hitZ); world.captureBlockSnapshots = false; if (ret == EnumActionResult.SUCCESS) { // save new item data int newMeta = itemstack.getItemDamage(); - int newSize = itemstack.stackSize; + int newSize = itemstack.func_190916_E(); NBTTagCompound newNBT = null; if (itemstack.getTagCompound() != null) { @@ -788,7 +834,7 @@ public class ForgeHooks // make sure to set pre-placement item data for event itemstack.setItemDamage(meta); - itemstack.stackSize = size; + itemstack.func_190920_e(size); if (nbt != null) { itemstack.setTagCompound(nbt); @@ -817,7 +863,7 @@ public class ForgeHooks { // Change the stack to its new content itemstack.setItemDamage(newMeta); - itemstack.stackSize = newSize; + itemstack.func_190920_e(newSize); if (nbt != null) { itemstack.setTagCompound(newNBT); @@ -883,12 +929,12 @@ public class ForgeHooks * @param inv Crafting inventory * @return Crafting inventory contents after the recipe. */ - public static ItemStack[] defaultRecipeGetRemainingItems(InventoryCrafting inv) + public static NonNullList defaultRecipeGetRemainingItems(InventoryCrafting inv) { - ItemStack[] ret = new ItemStack[inv.getSizeInventory()]; - for (int i = 0; i < ret.length; i++) + NonNullList ret = NonNullList.func_191197_a(inv.getSizeInventory(), ItemStack.field_190927_a); + for (int i = 0; i < ret.size(); i++) { - ret[i] = getContainerItem(inv.getStackInSlot(i)); + ret.set(i, getContainerItem(inv.getStackInSlot(i))); } return ret; } @@ -983,25 +1029,25 @@ public class ForgeHooks return git == null ? null : git.hitVec; } - public static boolean onInteractEntityAt(EntityPlayer player, Entity entity, RayTraceResult ray, ItemStack stack, EnumHand hand) + public static boolean onInteractEntityAt(EntityPlayer player, Entity entity, RayTraceResult ray, EnumHand hand) { Vec3d vec3d = new Vec3d(ray.hitVec.xCoord - entity.posX, ray.hitVec.yCoord - entity.posY, ray.hitVec.zCoord - entity.posZ); - return onInteractEntityAt(player, entity, vec3d, stack, hand); + return onInteractEntityAt(player, entity, vec3d, hand); } - public static boolean onInteractEntityAt(EntityPlayer player, Entity entity, Vec3d vec3d, ItemStack stack, EnumHand hand) + public static boolean onInteractEntityAt(EntityPlayer player, Entity entity, Vec3d vec3d, EnumHand hand) { - return MinecraftForge.EVENT_BUS.post(new PlayerInteractEvent.EntityInteractSpecific(player, hand, stack, entity, vec3d)); + return MinecraftForge.EVENT_BUS.post(new PlayerInteractEvent.EntityInteractSpecific(player, hand, entity, vec3d)); } - public static boolean onInteractEntity(EntityPlayer player, Entity entity, ItemStack item, EnumHand hand) + public static boolean onInteractEntity(EntityPlayer player, Entity entity, EnumHand hand) { - return MinecraftForge.EVENT_BUS.post(new PlayerInteractEvent.EntityInteract(player, hand, item, entity)); + return MinecraftForge.EVENT_BUS.post(new PlayerInteractEvent.EntityInteract(player, hand, entity)); } - public static boolean onItemRightClick(EntityPlayer player, EnumHand hand, ItemStack stack) + public static boolean onItemRightClick(EntityPlayer player, EnumHand hand) { - return MinecraftForge.EVENT_BUS.post(new PlayerInteractEvent.RightClickItem(player, hand, stack)); + return MinecraftForge.EVENT_BUS.post(new PlayerInteractEvent.RightClickItem(player, hand)); } public static PlayerInteractEvent.LeftClickBlock onLeftClickBlock(EntityPlayer player, BlockPos pos, EnumFacing face, Vec3d hitVec) @@ -1011,9 +1057,9 @@ public class ForgeHooks return evt; } - public static PlayerInteractEvent.RightClickBlock onRightClickBlock(EntityPlayer player, EnumHand hand, ItemStack stack, BlockPos pos, EnumFacing face, Vec3d hitVec) + public static PlayerInteractEvent.RightClickBlock onRightClickBlock(EntityPlayer player, EnumHand hand, BlockPos pos, EnumFacing face, Vec3d hitVec) { - PlayerInteractEvent.RightClickBlock evt = new PlayerInteractEvent.RightClickBlock(player, hand, stack, pos, face, hitVec); + PlayerInteractEvent.RightClickBlock evt = new PlayerInteractEvent.RightClickBlock(player, hand, pos, face, hitVec); MinecraftForge.EVENT_BUS.post(evt); return evt; } diff --git a/src/main/java/net/minecraftforge/common/ForgeVersion.java b/src/main/java/net/minecraftforge/common/ForgeVersion.java index 59b13c19f..904e98a9a 100644 --- a/src/main/java/net/minecraftforge/common/ForgeVersion.java +++ b/src/main/java/net/minecraftforge/common/ForgeVersion.java @@ -50,17 +50,17 @@ import net.minecraftforge.fml.common.versioning.ComparableVersion; public class ForgeVersion { //This number is incremented every time we remove deprecated code/major API changes, never reset - public static final int majorVersion = 12; + public static final int majorVersion = 13; //This number is incremented every minecraft release, never reset - public static final int minorVersion = 18; + public static final int minorVersion = 19; //This number is incremented every time a interface changes or new major feature is added, and reset every Minecraft version - public static final int revisionVersion = 2; + public static final int revisionVersion = 0; //This number is incremented every time Jenkins builds Forge, and never reset. Should always be 0 in the repo code. public static final int buildVersion = 0; // This is the minecraft version we're building for - used in various places in Forge/FML code - public static final String mcVersion = "1.10.2"; + public static final String mcVersion = "1.11_pre1"; // This is the MCP data version we're using - public static final String mcpVersion = "9.32"; + public static final String mcpVersion = "9.34"; @SuppressWarnings("unused") private static Status status = PENDING; @SuppressWarnings("unused") diff --git a/src/main/java/net/minecraftforge/common/ISpecialArmor.java b/src/main/java/net/minecraftforge/common/ISpecialArmor.java index 984974c2e..77cf3e4de 100644 --- a/src/main/java/net/minecraftforge/common/ISpecialArmor.java +++ b/src/main/java/net/minecraftforge/common/ISpecialArmor.java @@ -32,6 +32,7 @@ import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemArmor; import net.minecraft.item.ItemStack; +import net.minecraft.util.NonNullList; /** * This interface is to be implemented by ItemArmor classes. It will allow to @@ -110,7 +111,7 @@ public interface ISpecialArmor * @param damage The total damage being done * @return The left over damage that has not been absorbed by the armor */ - public static float applyArmor(EntityLivingBase entity, ItemStack[] inventory, DamageSource source, double damage) + public static float applyArmor(EntityLivingBase entity, NonNullList inventory, DamageSource source, double damage) { if (DEBUG) { @@ -118,10 +119,10 @@ public interface ISpecialArmor } damage *= 25; ArrayList dmgVals = new ArrayList(); - for (int x = 0; x < inventory.length; x++) + for (int x = 0; x < inventory.size(); x++) { - ItemStack stack = inventory[x]; - if (stack == null) + ItemStack stack = inventory.get(x); + if (stack.func_190926_b()) { continue; } @@ -161,7 +162,7 @@ public interface ISpecialArmor double absorb = damage * prop.AbsorbRatio; if (absorb > 0) { - ItemStack stack = inventory[prop.Slot]; + ItemStack stack = inventory.get(prop.Slot); int itemDamage = (int)(absorb / 25D < 1 ? 1 : absorb / 25D); if (stack.getItem() instanceof ISpecialArmor) { @@ -175,13 +176,13 @@ public interface ISpecialArmor } stack.damageItem(itemDamage, entity); } - if (stack.stackSize <= 0) + if (stack.func_190926_b()) { /*if (entity instanceof EntityPlayer) { stack.onItemDestroyedByUse((EntityPlayer)entity); }*/ - inventory[prop.Slot] = null; + inventory.set(prop.Slot, ItemStack.field_190927_a); } } } diff --git a/src/main/java/net/minecraftforge/common/brewing/AbstractBrewingRecipe.java b/src/main/java/net/minecraftforge/common/brewing/AbstractBrewingRecipe.java index 51fde25db..369703714 100644 --- a/src/main/java/net/minecraftforge/common/brewing/AbstractBrewingRecipe.java +++ b/src/main/java/net/minecraftforge/common/brewing/AbstractBrewingRecipe.java @@ -54,7 +54,7 @@ public abstract class AbstractBrewingRecipe implements IBrewingRecipe { @Override public ItemStack getOutput(ItemStack input, ItemStack ingredient) { - return isInput(input) && isIngredient(ingredient) ? ItemStack.copyItemStack(getOutput()) : null; + return isInput(input) && isIngredient(ingredient) ? getOutput().copy() : null; } public ItemStack getInput() diff --git a/src/main/java/net/minecraftforge/common/brewing/BrewingRecipeRegistry.java b/src/main/java/net/minecraftforge/common/brewing/BrewingRecipeRegistry.java index 42a202fec..ad04b39b9 100644 --- a/src/main/java/net/minecraftforge/common/brewing/BrewingRecipeRegistry.java +++ b/src/main/java/net/minecraftforge/common/brewing/BrewingRecipeRegistry.java @@ -23,6 +23,9 @@ import java.util.ArrayList; import java.util.Collections; import java.util.List; import net.minecraft.item.ItemStack; +import net.minecraft.util.NonNullList; + +import javax.annotation.Nonnull; public class BrewingRecipeRegistry { @@ -84,10 +87,11 @@ public class BrewingRecipeRegistry { * Returns the output ItemStack obtained by brewing the passed input and * ingredient. Null if no matches are found. */ - public static ItemStack getOutput(ItemStack input, ItemStack ingredient) + @Nonnull + public static ItemStack getOutput(@Nonnull ItemStack input, ItemStack ingredient) { - if (input == null || input.getMaxStackSize() != 1 || input.stackSize != 1) return null; - if (ingredient == null || ingredient.stackSize <= 0) return null; + if (input.func_190926_b() || input.getMaxStackSize() != 1 || input.func_190916_E() != 1) return ItemStack.field_190927_a; + if (ingredient.func_190926_b()) return ItemStack.field_190927_a; for (IBrewingRecipe recipe : recipes) { @@ -97,7 +101,7 @@ public class BrewingRecipeRegistry { return output; } } - return null; + return ItemStack.field_190927_a; } /** @@ -105,7 +109,7 @@ public class BrewingRecipeRegistry { */ public static boolean hasOutput(ItemStack input, ItemStack ingredient) { - return getOutput(input, ingredient) != null; + return !getOutput(input, ingredient).func_190926_b(); } /** @@ -113,13 +117,13 @@ public class BrewingRecipeRegistry { * Extra parameters exist to allow modders to create bigger brewing stands * without much hassle */ - public static boolean canBrew(ItemStack[] inputs, ItemStack ingredient, int[] inputIndexes) + public static boolean canBrew(NonNullList inputs, @Nonnull ItemStack ingredient, int[] inputIndexes) { - if (ingredient == null || ingredient.stackSize <= 0) return false; + if (ingredient.func_190926_b()) return false; for (int i : inputIndexes) { - if (hasOutput(inputs[i], ingredient)) + if (hasOutput(inputs.get(i), ingredient)) { return true; } @@ -132,14 +136,14 @@ public class BrewingRecipeRegistry { * Used by the brewing stand to brew its inventory Extra parameters exist to * allow modders to create bigger brewing stands without much hassle */ - public static void brewPotions(ItemStack[] inputs, ItemStack ingredient, int[] inputIndexes) + public static void brewPotions(NonNullList inputs, @Nonnull ItemStack ingredient, int[] inputIndexes) { for (int i : inputIndexes) { - ItemStack output = getOutput(inputs[i], ingredient); - if (output != null) + ItemStack output = getOutput(inputs.get(i), ingredient); + if (!output.func_190926_b()) { - inputs[i] = output; + inputs.set(i, output); } } } @@ -148,9 +152,9 @@ public class BrewingRecipeRegistry { * Returns true if the passed ItemStack is a valid ingredient for any of the * recipes in the registry. */ - public static boolean isValidIngredient(ItemStack stack) + public static boolean isValidIngredient(@Nonnull ItemStack stack) { - if (stack == null || stack.stackSize <= 0) return false; + if (stack.func_190926_b()) return false; for (IBrewingRecipe recipe : recipes) { @@ -166,9 +170,9 @@ public class BrewingRecipeRegistry { * Returns true if the passed ItemStack is a valid input for any of the * recipes in the registry. */ - public static boolean isValidInput(ItemStack stack) + public static boolean isValidInput(@Nonnull ItemStack stack) { - if (stack == null || stack.getMaxStackSize() != 1 || stack.stackSize != 1) return false; + if (stack.getMaxStackSize() != 1 || stack.func_190916_E() != 1) return false; for (IBrewingRecipe recipe : recipes) { diff --git a/src/main/java/net/minecraftforge/common/util/FakePlayer.java b/src/main/java/net/minecraftforge/common/util/FakePlayer.java index 154d004c9..41b349ada 100644 --- a/src/main/java/net/minecraftforge/common/util/FakePlayer.java +++ b/src/main/java/net/minecraftforge/common/util/FakePlayer.java @@ -44,7 +44,7 @@ public class FakePlayer extends EntityPlayerMP @Override public Vec3d getPositionVector(){ return new Vec3d(0, 0, 0); } @Override public boolean canCommandSenderUseCommand(int i, String s){ return false; } - @Override public void addChatComponentMessage(ITextComponent chatmessagecomponent){} + @Override public void addChatComponentMessage(ITextComponent chatmessagecomponent, boolean type){} @Override public void addStat(StatBase par1StatBase, int par2){} @Override public void openGui(Object mod, int modGuiId, World world, int x, int y, int z){} @Override public boolean isEntityInvulnerable(DamageSource source){ return true; } diff --git a/src/main/java/net/minecraftforge/event/ForgeEventFactory.java b/src/main/java/net/minecraftforge/event/ForgeEventFactory.java index 448bed7e4..548c6306c 100644 --- a/src/main/java/net/minecraftforge/event/ForgeEventFactory.java +++ b/src/main/java/net/minecraftforge/event/ForgeEventFactory.java @@ -46,6 +46,7 @@ import net.minecraft.util.DamageSource; import net.minecraft.util.EnumActionResult; import net.minecraft.util.EnumFacing; import net.minecraft.util.EnumHand; +import net.minecraft.util.NonNullList; import net.minecraft.util.ResourceLocation; import net.minecraft.util.SoundCategory; import net.minecraft.util.SoundEvent; @@ -152,9 +153,9 @@ public class ForgeEventFactory return event; } - public static NeighborNotifyEvent onNeighborNotify(World world, BlockPos pos, IBlockState state, EnumSet notifiedSides) + public static NeighborNotifyEvent onNeighborNotify(World world, BlockPos pos, IBlockState state, EnumSet notifiedSides, boolean forceRedstoneUpdate) { - NeighborNotifyEvent event = new NeighborNotifyEvent(world, pos, state, notifiedSides); + NeighborNotifyEvent event = new NeighborNotifyEvent(world, pos, state, notifiedSides, forceRedstoneUpdate); MinecraftForge.EVENT_BUS.post(event); return event; } @@ -354,7 +355,7 @@ public class ForgeEventFactory if (event.getResult() == Result.ALLOW) { if (!world.isRemote) - stack.stackSize--; + stack.func_190918_g(1); return 1; } return 0; @@ -370,7 +371,8 @@ public class ForgeEventFactory if (player.capabilities.isCreativeMode) return new ActionResult(EnumActionResult.SUCCESS, stack); - if (--stack.stackSize <= 0) + stack.func_190918_g(1); + if (stack.func_190926_b()) return new ActionResult(EnumActionResult.SUCCESS, event.getFilledBucket()); if (!player.inventory.addItemStackToInventory(event.getFilledBucket())) @@ -398,7 +400,7 @@ public class ForgeEventFactory public static int onItemExpire(EntityItem entity, ItemStack item) { if (item == null) return -1; - ItemExpireEvent event = new ItemExpireEvent(entity, (item.getItem() == null ? 6000 : item.getItem().getEntityLifespan(item, entity.worldObj))); + ItemExpireEvent event = new ItemExpireEvent(entity, (item.func_190926_b() ? 6000 : item.getItem().getEntityLifespan(item, entity.worldObj))); if (!MinecraftForge.EVENT_BUS.post(event)) return -1; return event.getExtraLife(); } @@ -493,20 +495,20 @@ public class ForgeEventFactory return (MinecraftForge.EVENT_BUS.post(event) ? 0 : event.getAmount()); } - public static boolean onPotionAttemptBrew(ItemStack[] stacks) + public static boolean onPotionAttemptBrew(NonNullList stacks) { - ItemStack[] tmp = new ItemStack[stacks.length]; - for (int x = 0; x < tmp.length; x++) - tmp[x] = ItemStack.copyItemStack(stacks[x]); + NonNullList tmp = NonNullList.func_191197_a(stacks.size(), ItemStack.field_190927_a); + for (int x = 0; x < tmp.size(); x++) + tmp.set(x, stacks.get(x).copy()); PotionBrewEvent.Pre event = new PotionBrewEvent.Pre(tmp); if (MinecraftForge.EVENT_BUS.post(event)) { boolean changed = false; - for (int x = 0; x < stacks.length; x++) + for (int x = 0; x < stacks.size(); x++) { - changed |= ItemStack.areItemStacksEqual(tmp[x], stacks[x]); - stacks[x] = event.getItem(x); + changed |= ItemStack.areItemStacksEqual(tmp.get(x), stacks.get(x)); + stacks.set(x, event.getItem(x)); } if (changed) onPotionBrewed(stacks); @@ -515,7 +517,7 @@ public class ForgeEventFactory return false; } - public static void onPotionBrewed(ItemStack[] brewingItemStacks) + public static void onPotionBrewed(NonNullList brewingItemStacks) { MinecraftForge.EVENT_BUS.post(new PotionBrewEvent.Post(brewingItemStacks)); } diff --git a/src/main/java/net/minecraftforge/event/brewing/PotionBrewEvent.java b/src/main/java/net/minecraftforge/event/brewing/PotionBrewEvent.java index e87f24999..3d34d4754 100644 --- a/src/main/java/net/minecraftforge/event/brewing/PotionBrewEvent.java +++ b/src/main/java/net/minecraftforge/event/brewing/PotionBrewEvent.java @@ -21,6 +21,7 @@ package net.minecraftforge.event.brewing; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntityBrewingStand; +import net.minecraft.util.NonNullList; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.fml.common.eventhandler.Cancelable; import net.minecraftforge.fml.common.eventhandler.Event; @@ -29,30 +30,30 @@ import net.minecraftforge.fml.common.eventhandler.Event.HasResult; public class PotionBrewEvent extends Event { - private ItemStack[] stacks; + private NonNullList stacks; - protected PotionBrewEvent(ItemStack[] stacks) + protected PotionBrewEvent(NonNullList stacks) { this.stacks = stacks; } public ItemStack getItem(int index) { - if (index >= stacks.length) return null; - return stacks[index]; + if (index >= stacks.size()) return null; + return stacks.get(index); } public void setItem(int index, ItemStack stack) { - if (index < stacks.length) + if (index < stacks.size()) { - stacks[index] = stack; + stacks.set(index, stack); } } public int getLength() { - return stacks.length; + return stacks.size(); } /** @@ -75,7 +76,7 @@ public class PotionBrewEvent extends Event @Cancelable public static class Pre extends PotionBrewEvent { - public Pre(ItemStack[] stacks) + public Pre(NonNullList stacks) { super(stacks); } @@ -96,7 +97,7 @@ public class PotionBrewEvent extends Event **/ public static class Post extends PotionBrewEvent { - public Post(ItemStack[] stacks) + public Post(NonNullList stacks) { super(stacks); } diff --git a/src/main/java/net/minecraftforge/event/entity/minecart/MinecartInteractEvent.java b/src/main/java/net/minecraftforge/event/entity/minecart/MinecartInteractEvent.java index e9fe48309..71718d2c4 100644 --- a/src/main/java/net/minecraftforge/event/entity/minecart/MinecartInteractEvent.java +++ b/src/main/java/net/minecraftforge/event/entity/minecart/MinecartInteractEvent.java @@ -52,18 +52,16 @@ import net.minecraft.util.EnumHand; public class MinecartInteractEvent extends MinecartEvent { private final EntityPlayer player; - private final ItemStack item; private final EnumHand hand; - public MinecartInteractEvent(EntityMinecart minecart, EntityPlayer player, ItemStack item, EnumHand hand) + public MinecartInteractEvent(EntityMinecart minecart, EntityPlayer player, EnumHand hand) { super(minecart); this.player = player; - this.item = item; this.hand = hand; } public EntityPlayer getPlayer() { return player; } - public ItemStack getItem() { return item; } + public ItemStack getItem() { return player.getHeldItem(hand); } public EnumHand getHand() { return hand; } } diff --git a/src/main/java/net/minecraftforge/event/entity/player/PlayerInteractEvent.java b/src/main/java/net/minecraftforge/event/entity/player/PlayerInteractEvent.java index 9a10e5149..37e3e0695 100644 --- a/src/main/java/net/minecraftforge/event/entity/player/PlayerInteractEvent.java +++ b/src/main/java/net/minecraftforge/event/entity/player/PlayerInteractEvent.java @@ -35,6 +35,7 @@ import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.fml.common.eventhandler.Cancelable; import net.minecraftforge.fml.relauncher.Side; +import javax.annotation.Nonnull; import javax.annotation.Nullable; import static net.minecraftforge.fml.common.eventhandler.Event.Result.DEFAULT; @@ -48,15 +49,13 @@ import static net.minecraftforge.fml.common.eventhandler.Event.Result.DENY; public class PlayerInteractEvent extends PlayerEvent { private final EnumHand hand; - private final ItemStack stack; private final BlockPos pos; private final EnumFacing face; - private PlayerInteractEvent(EntityPlayer player, EnumHand hand, ItemStack stack, BlockPos pos, EnumFacing face) + private PlayerInteractEvent(EntityPlayer player, EnumHand hand, BlockPos pos, EnumFacing face) { super(Preconditions.checkNotNull(player, "Null player in PlayerInteractEvent!")); this.hand = Preconditions.checkNotNull(hand, "Null hand in PlayerInteractEvent!"); - this.stack = stack; this.pos = Preconditions.checkNotNull(pos, "Null position in PlayerInteractEvent!"); this.face = face; } @@ -78,9 +77,9 @@ public class PlayerInteractEvent extends PlayerEvent private final Vec3d localPos; private final Entity target; - public EntityInteractSpecific(EntityPlayer player, EnumHand hand, ItemStack stack, Entity target, Vec3d localPos) + public EntityInteractSpecific(EntityPlayer player, EnumHand hand, Entity target, Vec3d localPos) { - super(player, hand, stack, new BlockPos(target), null); + super(player, hand, new BlockPos(target), null); this.localPos = localPos; this.target = target; } @@ -120,9 +119,9 @@ public class PlayerInteractEvent extends PlayerEvent { private final Entity target; - public EntityInteract(EntityPlayer player, EnumHand hand, ItemStack stack, Entity target) + public EntityInteract(EntityPlayer player, EnumHand hand, Entity target) { - super(player, hand, stack, new BlockPos(target), null); + super(player, hand, new BlockPos(target), null); this.target = target; } @@ -147,9 +146,8 @@ public class PlayerInteractEvent extends PlayerEvent private Result useItem = DEFAULT; private final Vec3d hitVec; - public RightClickBlock(EntityPlayer player, EnumHand hand, ItemStack stack, - BlockPos pos, EnumFacing face, Vec3d hitVec) { - super(player, hand, stack, pos, face); + public RightClickBlock(EntityPlayer player, EnumHand hand, BlockPos pos, EnumFacing face, Vec3d hitVec) { + super(player, hand, pos, face); this.hitVec = hitVec; } @@ -218,9 +216,9 @@ public class PlayerInteractEvent extends PlayerEvent @Cancelable public static class RightClickItem extends PlayerInteractEvent { - public RightClickItem(EntityPlayer player, EnumHand hand, ItemStack stack) + public RightClickItem(EntityPlayer player, EnumHand hand) { - super(player, hand, stack, new BlockPos(player), null); + super(player, hand, new BlockPos(player), null); } } @@ -233,7 +231,7 @@ public class PlayerInteractEvent extends PlayerEvent { public RightClickEmpty(EntityPlayer player, EnumHand hand) { - super(player, hand, null, new BlockPos(player), null); + super(player, hand, new BlockPos(player), null); } } @@ -258,7 +256,7 @@ public class PlayerInteractEvent extends PlayerEvent public LeftClickBlock(EntityPlayer player, BlockPos pos, EnumFacing face, Vec3d hitVec) { - super(player, EnumHand.MAIN_HAND, player.getHeldItem(EnumHand.MAIN_HAND), pos, face); + super(player, EnumHand.MAIN_HAND, pos, face); this.hitVec = hitVec; } @@ -317,7 +315,7 @@ public class PlayerInteractEvent extends PlayerEvent { public LeftClickEmpty(EntityPlayer player, ItemStack stack) { - super(player, EnumHand.MAIN_HAND, stack, new BlockPos(player), null); + super(player, EnumHand.MAIN_HAND, new BlockPos(player), null); } } @@ -332,10 +330,10 @@ public class PlayerInteractEvent extends PlayerEvent /** * @return The itemstack involved in this interaction, or null if the hand was empty. */ - @Nullable + @Nonnull public ItemStack getItemStack() { - return stack; + return getEntityPlayer().getHeldItem(hand); } /** diff --git a/src/main/java/net/minecraftforge/event/world/BlockEvent.java b/src/main/java/net/minecraftforge/event/world/BlockEvent.java index 258c6287c..0aa101cab 100644 --- a/src/main/java/net/minecraftforge/event/world/BlockEvent.java +++ b/src/main/java/net/minecraftforge/event/world/BlockEvent.java @@ -255,11 +255,13 @@ public class BlockEvent extends Event public static class NeighborNotifyEvent extends BlockEvent { private final EnumSet notifiedSides; + private final boolean forceRedstoneUpdate; - public NeighborNotifyEvent(World world, BlockPos pos, IBlockState state, EnumSet notifiedSides) + public NeighborNotifyEvent(World world, BlockPos pos, IBlockState state, EnumSet notifiedSides, boolean forceRedstoneUpdate) { super(world, pos, state); this.notifiedSides = notifiedSides; + this.forceRedstoneUpdate = forceRedstoneUpdate; } /** @@ -271,6 +273,15 @@ public class BlockEvent extends Event { return notifiedSides; } + + /** + * Get if redstone update was forced during setBlock call (0x16 to flags) + * @return if the flag was set + */ + public boolean getForceRedstoneUpdate() + { + return forceRedstoneUpdate; + } } /** diff --git a/src/main/java/net/minecraftforge/fluids/BlockFluidBase.java b/src/main/java/net/minecraftforge/fluids/BlockFluidBase.java index b356fd50a..3a728c068 100644 --- a/src/main/java/net/minecraftforge/fluids/BlockFluidBase.java +++ b/src/main/java/net/minecraftforge/fluids/BlockFluidBase.java @@ -325,7 +325,7 @@ public abstract class BlockFluidBase extends Block implements IFluidBlock } @Override - public void neighborChanged(IBlockState state, World world, BlockPos pos, Block neighborBlock) + public void neighborChanged(IBlockState state, World world, BlockPos pos, Block neighborBlock, BlockPos neighbourPos) { world.scheduleUpdate(pos, this, tickRate); } @@ -675,7 +675,7 @@ public abstract class BlockFluidBase extends Block implements IFluidBlock } @Override - public AxisAlignedBB getCollisionBoundingBox(IBlockState blockState, World worldIn, BlockPos pos) + public AxisAlignedBB getCollisionBoundingBox(IBlockState blockState, IBlockAccess worldIn, BlockPos pos) { return NULL_AABB; } diff --git a/src/main/java/net/minecraftforge/fluids/BlockFluidClassic.java b/src/main/java/net/minecraftforge/fluids/BlockFluidClassic.java index 39e7316f1..63a2a5b0c 100644 --- a/src/main/java/net/minecraftforge/fluids/BlockFluidClassic.java +++ b/src/main/java/net/minecraftforge/fluids/BlockFluidClassic.java @@ -152,7 +152,7 @@ public class BlockFluidClassic extends BlockFluidBase { world.setBlockState(pos, state.withProperty(LEVEL, quantaPerBlock - expQuanta), 2); world.scheduleUpdate(pos, this, tickRate); - world.notifyNeighborsOfStateChange(pos, this); + world.notifyNeighborsOfStateChange(pos, this, false); } } } diff --git a/src/main/java/net/minecraftforge/fluids/DispenseFluidContainer.java b/src/main/java/net/minecraftforge/fluids/DispenseFluidContainer.java index 46b917c49..58cc3f654 100644 --- a/src/main/java/net/minecraftforge/fluids/DispenseFluidContainer.java +++ b/src/main/java/net/minecraftforge/fluids/DispenseFluidContainer.java @@ -29,6 +29,8 @@ import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; import net.minecraftforge.fluids.capability.IFluidHandler; +import javax.annotation.Nonnull; + /** * Fills or drains a fluid container item using a Dispenser. */ @@ -60,7 +62,8 @@ public class DispenseFluidContainer extends BehaviorDefaultDispenseItem /** * Picks up fluid in front of a Dispenser and fills a container with it. */ - private ItemStack fillContainer(IBlockSource source, ItemStack stack) + @Nonnull + private ItemStack fillContainer(IBlockSource source, @Nonnull ItemStack stack) { World world = source.getWorld(); EnumFacing dispenserFacing = source.getBlockState().getValue(BlockDispenser.FACING); @@ -72,7 +75,7 @@ public class DispenseFluidContainer extends BehaviorDefaultDispenseItem return super.dispenseStack(source, stack); } - if (--stack.stackSize == 0) + if (stack.func_190916_E() == 1) { stack.deserializeNBT(result.serializeNBT()); } @@ -81,6 +84,7 @@ public class DispenseFluidContainer extends BehaviorDefaultDispenseItem this.dispenseBehavior.dispense(source, result); } + stack.func_190918_g(1); return stack; } @@ -90,7 +94,7 @@ public class DispenseFluidContainer extends BehaviorDefaultDispenseItem private ItemStack dumpContainer(IBlockSource source, ItemStack stack) { ItemStack dispensedStack = stack.copy(); - dispensedStack.stackSize = 1; + dispensedStack.func_190920_e(1); IFluidHandler fluidHandler = FluidUtil.getFluidHandler(dispensedStack); if (fluidHandler == null) { @@ -105,7 +109,7 @@ public class DispenseFluidContainer extends BehaviorDefaultDispenseItem { fluidHandler.drain(Fluid.BUCKET_VOLUME, true); - if (--stack.stackSize == 0) + if (stack.func_190916_E() == 1) { stack.deserializeNBT(dispensedStack.serializeNBT()); } diff --git a/src/main/java/net/minecraftforge/fluids/FluidUtil.java b/src/main/java/net/minecraftforge/fluids/FluidUtil.java index 82c437302..4a205a6ce 100644 --- a/src/main/java/net/minecraftforge/fluids/FluidUtil.java +++ b/src/main/java/net/minecraftforge/fluids/FluidUtil.java @@ -19,6 +19,7 @@ package net.minecraftforge.fluids; +import javax.annotation.Nonnull; import javax.annotation.Nullable; import net.minecraft.block.Block; @@ -84,10 +85,11 @@ public class FluidUtil * @param doFill true if the container should actually be filled, false if it should be simulated. * @return The filled container or null if the liquid couldn't be taken from the tank. */ - public static ItemStack tryFillContainer(ItemStack container, IFluidHandler fluidSource, int maxAmount, @Nullable EntityPlayer player, boolean doFill) + @Nonnull + public static ItemStack tryFillContainer(@Nonnull ItemStack container, IFluidHandler fluidSource, int maxAmount, @Nullable EntityPlayer player, boolean doFill) { container = container.copy(); // do not modify the input - container.stackSize = 1; + container.func_190920_e(1); IFluidHandler containerFluidHandler = getFluidHandler(container); if (containerFluidHandler != null) { @@ -125,11 +127,11 @@ public class FluidUtil * NOTE The empty container will have a stackSize of 0 when a filled container is consumable, * i.e. it has a "null" empty container but has successfully been emptied. */ - @Nullable - public static ItemStack tryEmptyContainer(ItemStack container, IFluidHandler fluidDestination, int maxAmount, @Nullable EntityPlayer player, boolean doDrain) + @Nonnull + public static ItemStack tryEmptyContainer(@Nonnull ItemStack container, IFluidHandler fluidDestination, int maxAmount, @Nullable EntityPlayer player, boolean doDrain) { container = container.copy(); // do not modify the input - container.stackSize = 1; + container.func_190920_e(1); IFluidHandler containerFluidHandler = getFluidHandler(container); if (containerFluidHandler != null) { @@ -169,9 +171,9 @@ public class FluidUtil * @param player The player that gets the items the inventory can't take. Can be null, only used if the inventory cannot take the filled stack. * @return True if the container was filled successfully and stowed, false otherwise. */ - public static boolean tryFillContainerAndStow(ItemStack container, IFluidHandler fluidSource, IItemHandler inventory, int maxAmount, @Nullable EntityPlayer player) + public static boolean tryFillContainerAndStow(@Nonnull ItemStack container, IFluidHandler fluidSource, IItemHandler inventory, int maxAmount, @Nullable EntityPlayer player) { - if (container == null || container.stackSize < 1) + if (container.func_190926_b()) { return false; } @@ -184,7 +186,7 @@ public class FluidUtil return true; } } - else if (container.stackSize == 1) // don't need to stow anything, just fill and edit the container stack + else if (container.func_190916_E() == 1) // don't need to stow anything, just fill and edit the container stack { ItemStack filledReal = tryFillContainer(container, fluidSource, maxAmount, player, true); if (filledReal != null) @@ -211,7 +213,7 @@ public class FluidUtil ItemHandlerHelper.giveItemToPlayer(player, remainder); } - container.stackSize--; + container.func_190918_g(1); return true; } } @@ -234,9 +236,9 @@ public class FluidUtil * @param player The player that gets the items the inventory can't take. Can be null, only used if the inventory cannot take the filled stack. * @return True if the container was filled successfully and stowed, false otherwise. */ - public static boolean tryEmptyContainerAndStow(ItemStack container, IFluidHandler fluidDestination, IItemHandler inventory, int maxAmount, @Nullable EntityPlayer player) + public static boolean tryEmptyContainerAndStow(@Nonnull ItemStack container, IFluidHandler fluidDestination, IItemHandler inventory, int maxAmount, @Nullable EntityPlayer player) { - if (container == null || container.stackSize < 1) + if (container.func_190926_b()) { return false; } @@ -249,51 +251,45 @@ public class FluidUtil return true; } } - else if (container.stackSize == 1) // don't need to stow anything, just fill and edit the container stack + else if (container.func_190916_E() == 1) // don't need to stow anything, just fill and edit the container stack { ItemStack emptiedReal = tryEmptyContainer(container, fluidDestination, maxAmount, player, true); - if (emptiedReal != null) + if (emptiedReal.func_190926_b()) { - if (emptiedReal.stackSize <= 0) - { - container.stackSize--; - } - else - { - container.deserializeNBT(emptiedReal.serializeNBT()); - } - return true; + container.func_190918_g(1); } + else + { + container.deserializeNBT(emptiedReal.serializeNBT()); + } + return true; } else { ItemStack emptiedSimulated = tryEmptyContainer(container, fluidDestination, maxAmount, player, false); - if (emptiedSimulated != null) + if (emptiedSimulated.func_190926_b()) + { + tryEmptyContainer(container, fluidDestination, maxAmount, player, true); + container.func_190918_g(1); + return true; + } + else { - if (emptiedSimulated.stackSize <= 0) + // check if we can give the itemStack to the inventory + ItemStack remainder = ItemHandlerHelper.insertItemStacked(inventory, emptiedSimulated, true); + if (remainder == null || player != null) { - tryEmptyContainer(container, fluidDestination, maxAmount, player, true); - container.stackSize--; - return true; - } - else - { - // check if we can give the itemStack to the inventory - ItemStack remainder = ItemHandlerHelper.insertItemStacked(inventory, emptiedSimulated, true); - if (remainder == null || player != null) + ItemStack emptiedReal = tryEmptyContainer(container, fluidDestination, maxAmount, player, true); + remainder = ItemHandlerHelper.insertItemStacked(inventory, emptiedReal, false); + + // give it to the player or drop it at their feet + if (remainder != null && player != null) { - ItemStack emptiedReal = tryEmptyContainer(container, fluidDestination, maxAmount, player, true); - remainder = ItemHandlerHelper.insertItemStacked(inventory, emptiedReal, false); - - // give it to the player or drop it at their feet - if (remainder != null && player != null) - { - ItemHandlerHelper.giveItemToPlayer(player, remainder); - } - - container.stackSize--; - return true; + ItemHandlerHelper.giveItemToPlayer(player, remainder); } + + container.func_190918_g(1); + return true; } } } @@ -381,7 +377,7 @@ public class FluidUtil if (container != null) { container = container.copy(); - container.stackSize = 1; + container.func_190920_e(1); IFluidHandler fluidHandler = FluidUtil.getFluidHandler(container); if (fluidHandler != null) { @@ -488,11 +484,11 @@ public class FluidUtil * @param side The side of the fluid that is being drained. * @return a filled container if it was successful. returns null on failure. */ - @Nullable - public static ItemStack tryPickUpFluid(ItemStack emptyContainer, @Nullable EntityPlayer playerIn, World worldIn, BlockPos pos, EnumFacing side) + @Nonnull + public static ItemStack tryPickUpFluid(@Nonnull ItemStack emptyContainer, @Nullable EntityPlayer playerIn, World worldIn, BlockPos pos, EnumFacing side) { - if (emptyContainer == null || worldIn == null || pos == null) { - return null; + if (emptyContainer.func_190926_b() || worldIn == null || pos == null) { + return ItemStack.field_190927_a; } IBlockState state = worldIn.getBlockState(pos); @@ -639,11 +635,11 @@ public class FluidUtil if (liquid != null && liquid.amount > 0) { // check which itemstack shall be altered by the fill call - if (container.stackSize > 1) + if (container.func_190916_E() > 1) { // create a copy of the container and fill it ItemStack toFill = container.copy(); - toFill.stackSize = 1; + toFill.func_190920_e(1); int filled = fluidContainer.fill(toFill, liquid, false); if (filled > 0) { @@ -677,7 +673,7 @@ public class FluidUtil tank.drain(side, filled, true); // decrease its stacksize to accommodate the filled one (it was >1 from the check above) - container.stackSize--; + container.func_190918_g(1); } // just 1 empty container to fill, no special treatment needed else @@ -754,11 +750,11 @@ public class FluidUtil if (drained != null && drained.amount == filled) { // more than 1 filled itemstack, ensure that we can insert the changed container - if (container.stackSize > 1) + if (container.func_190916_E() > 1) { // create a copy of the container and drain it ItemStack toEmpty = container.copy(); - toEmpty.stackSize = 1; + toEmpty.func_190920_e(1); drained = fluidContainer.drain(toEmpty, filled, true); // modifies the container! if(player == null || !player.worldObj.isRemote) @@ -782,7 +778,7 @@ public class FluidUtil tank.fill(side, drained, true); // decrease its stacksize to accommodate the filled one (it was >1 from the check above) - container.stackSize--; + container.func_190918_g(1); } // itemstack of size 1, no special treatment needed else diff --git a/src/main/java/net/minecraftforge/fluids/UniversalBucket.java b/src/main/java/net/minecraftforge/fluids/UniversalBucket.java index dcf5c9bc5..cd2593a59 100644 --- a/src/main/java/net/minecraftforge/fluids/UniversalBucket.java +++ b/src/main/java/net/minecraftforge/fluids/UniversalBucket.java @@ -98,7 +98,7 @@ public class UniversalBucket extends Item implements IFluidContainerItem @SideOnly(Side.CLIENT) @Override - public void getSubItems(Item itemIn, CreativeTabs tab, List subItems) + public void getSubItems(Item itemIn, CreativeTabs tab, NonNullList subItems) { for (Fluid fluid : FluidRegistry.getRegisteredFluids().values()) { @@ -139,8 +139,9 @@ public class UniversalBucket extends Item implements IFluidContainerItem } @Override - public ActionResult onItemRightClick(ItemStack itemstack, World world, EntityPlayer player, EnumHand hand) + public ActionResult onItemRightClick(World world, EntityPlayer player, EnumHand hand) { + ItemStack itemstack = player.getHeldItem(hand); FluidStack fluidStack = getFluid(itemstack); // empty bucket shouldn't exist, do nothing since it should be handled by the bucket event if (fluidStack == null) @@ -173,11 +174,11 @@ public class UniversalBucket extends Item implements IFluidContainerItem // success! player.addStat(StatList.getObjectUseStats(this)); - itemstack.stackSize--; + itemstack.func_190918_g(1); ItemStack emptyStack = getEmpty() != null ? getEmpty().copy() : new ItemStack(this); // check whether we replace the item or add the empty one to the inventory - if (itemstack.stackSize <= 0) + if (itemstack.func_190926_b()) { return ActionResult.newResult(EnumActionResult.SUCCESS, emptyStack); } @@ -244,7 +245,7 @@ public class UniversalBucket extends Item implements IFluidContainerItem BlockPos pos = target.getBlockPos(); ItemStack singleBucket = emptyBucket.copy(); - singleBucket.stackSize = 1; + singleBucket.func_190920_e(1); ItemStack filledBucket = FluidUtil.tryPickUpFluid(singleBucket, event.getEntityPlayer(), world, pos, target.sideHit); if (filledBucket != null) @@ -285,7 +286,7 @@ public class UniversalBucket extends Item implements IFluidContainerItem public int fill(ItemStack container, FluidStack resource, boolean doFill) { // has to be exactly 1, must be handled from the caller - if (container.stackSize != 1) + if (container.func_190916_E() != 1) { return 0; } @@ -342,7 +343,7 @@ public class UniversalBucket extends Item implements IFluidContainerItem public FluidStack drain(ItemStack container, int maxDrain, boolean doDrain) { // has to be exactly 1, must be handled from the caller - if (container.stackSize != 1) + if (container.func_190916_E() != 1) { return null; } @@ -361,7 +362,7 @@ public class UniversalBucket extends Item implements IFluidContainerItem container.deserializeNBT(getEmpty().serializeNBT()); } else { - container.stackSize = 0; + container.func_190920_e(0); } } diff --git a/src/main/java/net/minecraftforge/fluids/capability/templates/FluidHandlerItemStack.java b/src/main/java/net/minecraftforge/fluids/capability/templates/FluidHandlerItemStack.java index b68e915a8..462aff577 100644 --- a/src/main/java/net/minecraftforge/fluids/capability/templates/FluidHandlerItemStack.java +++ b/src/main/java/net/minecraftforge/fluids/capability/templates/FluidHandlerItemStack.java @@ -90,7 +90,7 @@ public class FluidHandlerItemStack implements IFluidHandler, ICapabilityProvider @Override public int fill(FluidStack resource, boolean doFill) { - if (container.stackSize != 1 || resource == null || resource.amount <= 0 || !canFillFluidType(resource)) + if (container.func_190916_E() != 1 || resource == null || resource.amount <= 0 || !canFillFluidType(resource)) { return 0; } @@ -130,7 +130,7 @@ public class FluidHandlerItemStack implements IFluidHandler, ICapabilityProvider @Override public FluidStack drain(FluidStack resource, boolean doDrain) { - if (container.stackSize != 1 || resource == null || resource.amount <= 0 || !resource.isFluidEqual(getFluid())) + if (container.func_190916_E() != 1 || resource == null || resource.amount <= 0 || !resource.isFluidEqual(getFluid())) { return null; } @@ -140,7 +140,7 @@ public class FluidHandlerItemStack implements IFluidHandler, ICapabilityProvider @Override public FluidStack drain(int maxDrain, boolean doDrain) { - if (container.stackSize != 1 || maxDrain <= 0) + if (container.func_190916_E() != 1 || maxDrain <= 0) { return null; } @@ -219,7 +219,7 @@ public class FluidHandlerItemStack implements IFluidHandler, ICapabilityProvider protected void setContainerToEmpty() { super.setContainerToEmpty(); - container.stackSize--; + container.func_190918_g(1); } } diff --git a/src/main/java/net/minecraftforge/fluids/capability/templates/FluidHandlerItemStackSimple.java b/src/main/java/net/minecraftforge/fluids/capability/templates/FluidHandlerItemStackSimple.java index db6b10690..ab52ee7ae 100644 --- a/src/main/java/net/minecraftforge/fluids/capability/templates/FluidHandlerItemStackSimple.java +++ b/src/main/java/net/minecraftforge/fluids/capability/templates/FluidHandlerItemStackSimple.java @@ -88,7 +88,7 @@ public class FluidHandlerItemStackSimple implements IFluidHandler, ICapabilityPr @Override public int fill(FluidStack resource, boolean doFill) { - if (container.stackSize != 1 || resource == null || resource.amount <= 0 || !canFillFluidType(resource)) + if (container.func_190916_E() != 1 || resource == null || resource.amount <= 0 || !canFillFluidType(resource)) { return 0; } @@ -114,7 +114,7 @@ public class FluidHandlerItemStackSimple implements IFluidHandler, ICapabilityPr @Override public FluidStack drain(FluidStack resource, boolean doDrain) { - if (container.stackSize != 1 || resource == null || resource.amount <= 0 || !resource.isFluidEqual(getFluid())) + if (container.func_190916_E() != 1 || resource == null || resource.amount <= 0 || !resource.isFluidEqual(getFluid())) { return null; } @@ -124,7 +124,7 @@ public class FluidHandlerItemStackSimple implements IFluidHandler, ICapabilityPr @Override public FluidStack drain(int maxDrain, boolean doDrain) { - if (container.stackSize != 1 || maxDrain <= 0) + if (container.func_190916_E() != 1 || maxDrain <= 0) { return null; } @@ -196,7 +196,7 @@ public class FluidHandlerItemStackSimple implements IFluidHandler, ICapabilityPr protected void setContainerToEmpty() { super.setContainerToEmpty(); - container.stackSize--; + container.func_190918_g(1); } } diff --git a/src/main/java/net/minecraftforge/fluids/capability/wrappers/FluidBucketWrapper.java b/src/main/java/net/minecraftforge/fluids/capability/wrappers/FluidBucketWrapper.java index 9d7c9e714..9ad262ed1 100644 --- a/src/main/java/net/minecraftforge/fluids/capability/wrappers/FluidBucketWrapper.java +++ b/src/main/java/net/minecraftforge/fluids/capability/wrappers/FluidBucketWrapper.java @@ -119,7 +119,7 @@ public class FluidBucketWrapper implements IFluidHandler, ICapabilityProvider @Override public int fill(FluidStack resource, boolean doFill) { - if (container.stackSize != 1 || resource == null || resource.amount < Fluid.BUCKET_VOLUME || container.getItem() instanceof ItemBucketMilk || getFluid() != null || !canFillFluidType(resource)) + if (container.func_190916_E() != 1 || resource == null || resource.amount < Fluid.BUCKET_VOLUME || container.getItem() instanceof ItemBucketMilk || getFluid() != null || !canFillFluidType(resource)) { return 0; } @@ -136,7 +136,7 @@ public class FluidBucketWrapper implements IFluidHandler, ICapabilityProvider @Override public FluidStack drain(FluidStack resource, boolean doDrain) { - if (container.stackSize != 1 || resource == null || resource.amount < Fluid.BUCKET_VOLUME) + if (container.func_190916_E() != 1 || resource == null || resource.amount < Fluid.BUCKET_VOLUME) { return null; } @@ -158,7 +158,7 @@ public class FluidBucketWrapper implements IFluidHandler, ICapabilityProvider @Override public FluidStack drain(int maxDrain, boolean doDrain) { - if (container.stackSize != 1 || maxDrain < Fluid.BUCKET_VOLUME) + if (container.func_190916_E() != 1 || maxDrain < Fluid.BUCKET_VOLUME) { return null; } diff --git a/src/main/java/net/minecraftforge/fluids/capability/wrappers/FluidContainerItemWrapper.java b/src/main/java/net/minecraftforge/fluids/capability/wrappers/FluidContainerItemWrapper.java index 9dbefbd10..bca9d3953 100644 --- a/src/main/java/net/minecraftforge/fluids/capability/wrappers/FluidContainerItemWrapper.java +++ b/src/main/java/net/minecraftforge/fluids/capability/wrappers/FluidContainerItemWrapper.java @@ -55,7 +55,7 @@ public class FluidContainerItemWrapper implements IFluidHandler, ICapabilityProv @Override public int fill(FluidStack resource, boolean doFill) { - if (container.stackSize != 1) + if (container.func_190916_E() != 1) { return 0; } @@ -65,7 +65,7 @@ public class FluidContainerItemWrapper implements IFluidHandler, ICapabilityProv @Override public FluidStack drain(FluidStack resource, boolean doDrain) { - if (container.stackSize != 1 || resource == null) + if (container.func_190916_E() != 1 || resource == null) { return null; } @@ -84,7 +84,7 @@ public class FluidContainerItemWrapper implements IFluidHandler, ICapabilityProv @Override public FluidStack drain(int maxDrain, boolean doDrain) { - if (container.stackSize != 1) + if (container.func_190916_E() != 1) { return null; } diff --git a/src/main/java/net/minecraftforge/fluids/capability/wrappers/FluidContainerRegistryWrapper.java b/src/main/java/net/minecraftforge/fluids/capability/wrappers/FluidContainerRegistryWrapper.java index 600c2ad48..081474ef1 100644 --- a/src/main/java/net/minecraftforge/fluids/capability/wrappers/FluidContainerRegistryWrapper.java +++ b/src/main/java/net/minecraftforge/fluids/capability/wrappers/FluidContainerRegistryWrapper.java @@ -58,7 +58,7 @@ public class FluidContainerRegistryWrapper implements IFluidHandler, ICapability @Override public int fill(FluidStack resource, boolean doFill) { - if (container.stackSize != 1 || resource == null) + if (container.func_190916_E() != 1 || resource == null) { return 0; } @@ -87,7 +87,7 @@ public class FluidContainerRegistryWrapper implements IFluidHandler, ICapability @Override public FluidStack drain(FluidStack resource, boolean doDrain) { - if (container.stackSize != 1 || resource == null) + if (container.func_190916_E() != 1 || resource == null) { return null; } @@ -105,7 +105,7 @@ public class FluidContainerRegistryWrapper implements IFluidHandler, ICapability @Override public FluidStack drain(int maxDrain, boolean doDrain) { - if (container.stackSize != 1) + if (container.func_190916_E() != 1) { return null; } @@ -122,7 +122,7 @@ public class FluidContainerRegistryWrapper implements IFluidHandler, ICapability { if (FluidContainerRegistry.hasNullEmptyContainer(container)) { - emptyContainer.stackSize = 0; + emptyContainer.func_190920_e(0); } container.deserializeNBT(emptyContainer.serializeNBT()); } diff --git a/src/main/java/net/minecraftforge/fml/common/asm/transformers/ItemStackTransformer.java b/src/main/java/net/minecraftforge/fml/common/asm/transformers/ItemStackTransformer.java index a65f7ca66..dc9689a89 100644 --- a/src/main/java/net/minecraftforge/fml/common/asm/transformers/ItemStackTransformer.java +++ b/src/main/java/net/minecraftforge/fml/common/asm/transformers/ItemStackTransformer.java @@ -81,6 +81,7 @@ public class ItemStackTransformer implements IClassTransformer { for (MethodNode m: classNode.methods) { + if (m.name.equals("func_190923_F") || m.name.equals("func_190926_b")) continue; for (ListIterator it = m.instructions.iterator(); it.hasNext(); ) { AbstractInsnNode insnNode = it.next(); diff --git a/src/main/java/net/minecraftforge/fml/common/registry/EntityRegistry.java b/src/main/java/net/minecraftforge/fml/common/registry/EntityRegistry.java index 59a6f26c9..14831e4c1 100644 --- a/src/main/java/net/minecraftforge/fml/common/registry/EntityRegistry.java +++ b/src/main/java/net/minecraftforge/fml/common/registry/EntityRegistry.java @@ -172,29 +172,6 @@ public class EntityRegistry private void doModEntityRegistration(Class entityClass, String entityName, int id, Object mod, int trackingRange, int updateFrequency, boolean sendsVelocityUpdates) { ModContainer mc = FMLCommonHandler.instance().findContainerFor(mod); - EntityRegistration er = new EntityRegistration(mc, entityClass, entityName, id, trackingRange, updateFrequency, sendsVelocityUpdates); - try - { - entityClassRegistrations.put(entityClass, er); - entityNames.put(entityName, mc); - if (!EntityList.CLASS_TO_NAME.containsKey(entityClass)) - { - String entityModName = String.format("%s.%s", mc.getModId(), entityName); - EntityList.CLASS_TO_NAME.put(entityClass, entityModName); - EntityList.NAME_TO_CLASS.put(entityModName, entityClass); - FMLLog.finer("Automatically registered mod %s entity %s as %s", mc.getModId(), entityName, entityModName); - } - else - { - FMLLog.fine("Skipping automatic mod %s entity registration for already registered class %s", mc.getModId(), entityClass.getName()); - } - } - catch (IllegalArgumentException e) - { - FMLLog.log(Level.WARN, e, "The mod %s tried to register the entity (name,class) (%s,%s) one or both of which are already registered", mc.getModId(), entityName, entityClass.getName()); - return; - } - entityRegistrations.put(mc, er); } /** @@ -214,16 +191,6 @@ public class EntityRegistry public static void registerEgg(Class entityClass, int primary, int secondary) { - if (EntityList.CLASS_TO_NAME.containsKey(entityClass)) - { - String name = EntityList.CLASS_TO_NAME.get(entityClass); - EntityList.ENTITY_EGGS.put(name, new EntityList.EntityEggInfo(name, primary, secondary)); - FMLLog.fine("Registering entity egg '%s' for %s", name, entityClass); - } - else - { - FMLLog.fine("Failed registering entity egg %s (No entity found)", entityClass.getName()); - } } /** @@ -272,7 +239,7 @@ public class EntityRegistry @SuppressWarnings("unchecked") public static void addSpawn(String entityName, int weightedProb, int min, int max, EnumCreatureType typeOfCreature, Biome... biomes) { - Class entityClazz = EntityList.NAME_TO_CLASS.get(entityName); + Class entityClazz = null; if (EntityLiving.class.isAssignableFrom(entityClazz)) { @@ -312,7 +279,7 @@ public class EntityRegistry @SuppressWarnings("unchecked") public static void removeSpawn(String entityName, EnumCreatureType typeOfCreature, Biome... biomes) { - Class entityClazz = EntityList.NAME_TO_CLASS.get(entityName); + Class entityClazz = null; if (EntityLiving.class.isAssignableFrom(entityClazz)) { diff --git a/src/main/java/net/minecraftforge/fml/common/registry/GameRegistry.java b/src/main/java/net/minecraftforge/fml/common/registry/GameRegistry.java index 69bbe32cb..864fa6b43 100644 --- a/src/main/java/net/minecraftforge/fml/common/registry/GameRegistry.java +++ b/src/main/java/net/minecraftforge/fml/common/registry/GameRegistry.java @@ -257,7 +257,7 @@ public class GameRegistry public static void registerTileEntity(Class tileEntityClass, String id) { - TileEntity.addMapping(tileEntityClass, id); +// TileEntity.addMapping(tileEntityClass, id); } /** @@ -270,7 +270,7 @@ public class GameRegistry */ public static void registerTileEntityWithAlternatives(Class tileEntityClass, String id, String... alternatives) { - TileEntity.addMapping(tileEntityClass, id); +// TileEntity.addMapping(tileEntityClass, id); Map> teMappings = ObfuscationReflectionHelper.getPrivateValue(TileEntity.class, null, "field_" + "145855_i", "nameToClassMap"); for (String s : alternatives) { diff --git a/src/main/java/net/minecraftforge/fml/common/registry/VillagerRegistry.java b/src/main/java/net/minecraftforge/fml/common/registry/VillagerRegistry.java index c33813075..f4497266c 100644 --- a/src/main/java/net/minecraftforge/fml/common/registry/VillagerRegistry.java +++ b/src/main/java/net/minecraftforge/fml/common/registry/VillagerRegistry.java @@ -25,10 +25,10 @@ import java.util.Map; import java.util.Random; import com.google.common.collect.Lists; import com.google.common.collect.Maps; +import net.minecraft.entity.monster.EntityZombieVillager; import org.apache.commons.lang3.Validate; import net.minecraft.entity.monster.EntityZombie; -import net.minecraft.entity.monster.ZombieType; import net.minecraft.entity.passive.EntityVillager; import net.minecraft.entity.passive.EntityVillager.ITradeList; import net.minecraft.util.EnumFacing; @@ -315,10 +315,9 @@ public class VillagerRegistry List entries = INSTANCE.professions.getValues(); entity.setProfession(entries.get(rand.nextInt(entries.size()))); } - public static void setRandomProfession(EntityZombie entity, Random rand) + public static void setRandomProfession(EntityZombieVillager entity, Random rand) { List entries = INSTANCE.professions.getValues(); - entity.setVillagerType(entries.get(rand.nextInt(entries.size()))); } @@ -352,50 +351,21 @@ public class VillagerRegistry } @SuppressWarnings("deprecation") - public static void onSetProfession(EntityZombie entity, VillagerProfession prof) + public static void onSetProfession(EntityZombieVillager entity, VillagerProfession prof) { - if (prof == null) - { - if (entity.getZombieType() != ZombieType.NORMAL && entity.getZombieType() != ZombieType.HUSK) - entity.setZombieType(ZombieType.NORMAL); - return; - } - - int network = INSTANCE.professions.getId(prof); - if (network == -1 || prof != INSTANCE.professions.getObjectById(network)) - { - throw new RuntimeException("Attempted to set villager profession to unregistered profession: " + network + " " + prof); - } - - if (network >= 0 && network < 5) // Vanilla - { - if (entity.getZombieType() == null || entity.getZombieType().getId() != network + 1) - { - entity.setZombieType(ZombieType.getVillagerByOrdinal(network)); - } - } - else if (entity.getZombieType() != null) - entity.setZombieType(ZombieType.NORMAL); } - public static void onSetProfession(EntityZombie entity, ZombieType type, int network) + + public static void onSetProfession(EntityZombieVillager entity, int network) { - if (type == ZombieType.NORMAL || type == ZombieType.HUSK) - { - if (entity.getVillagerTypeForge() != null) - entity.setVillagerType(null); - return; - } int realID = network - 1; - if (type == null) //Forge type? - realID = network * -1; // Forge encoded as -ID VillagerProfession prof = INSTANCE.professions.getObjectById(realID); if (prof == null && network != 0 || INSTANCE.professions.getId(prof) != realID) { throw new RuntimeException("Attempted to set villager profession to unregistered profession: " + realID + " " + prof); } - if (prof != entity.getVillagerTypeForge()) - entity.setVillagerType(prof); + if (prof != entity.getForgeProfession()) + entity.setForgeProfession(prof); } @Deprecated public static VillagerProfession getById(int network){ return INSTANCE.professions.getObjectById(network); } diff --git a/src/main/java/net/minecraftforge/items/CapabilityItemHandler.java b/src/main/java/net/minecraftforge/items/CapabilityItemHandler.java index 9f30871c2..790172f53 100644 --- a/src/main/java/net/minecraftforge/items/CapabilityItemHandler.java +++ b/src/main/java/net/minecraftforge/items/CapabilityItemHandler.java @@ -72,7 +72,7 @@ public class CapabilityItemHandler if (j >= 0 && j < instance.getSlots()) { - itemHandlerModifiable.setStackInSlot(j, ItemStack.loadItemStackFromNBT(itemTags)); + itemHandlerModifiable.setStackInSlot(j, new ItemStack(itemTags)); } } } diff --git a/src/main/java/net/minecraftforge/items/IItemHandler.java b/src/main/java/net/minecraftforge/items/IItemHandler.java index 80b520484..c577351fe 100644 --- a/src/main/java/net/minecraftforge/items/IItemHandler.java +++ b/src/main/java/net/minecraftforge/items/IItemHandler.java @@ -21,6 +21,8 @@ package net.minecraftforge.items; import net.minecraft.item.ItemStack; +import javax.annotation.Nonnull; + public interface IItemHandler { /** @@ -49,6 +51,7 @@ public interface IItemHandler * @param slot Slot to query * @return ItemStack in given slot. May be null. **/ + @Nonnull ItemStack getStackInSlot(int slot); /** @@ -62,7 +65,8 @@ public interface IItemHandler * @return The remaining ItemStack that was not inserted (if the entire stack is accepted, then return null). * May be the same as the input ItemStack if unchanged, otherwise a new ItemStack. **/ - ItemStack insertItem(int slot, ItemStack stack, boolean simulate); + @Nonnull + ItemStack insertItem(int slot, @Nonnull ItemStack stack, boolean simulate); /** * Extracts an ItemStack from the given slot. The returned value must be null @@ -74,5 +78,6 @@ public interface IItemHandler * @param simulate If true, the extraction is only simulated * @return ItemStack extracted from the slot, must be null, if nothing can be extracted **/ + @Nonnull ItemStack extractItem(int slot, int amount, boolean simulate); } diff --git a/src/main/java/net/minecraftforge/items/IItemHandlerModifiable.java b/src/main/java/net/minecraftforge/items/IItemHandlerModifiable.java index 5102d2db9..18c83bf1f 100644 --- a/src/main/java/net/minecraftforge/items/IItemHandlerModifiable.java +++ b/src/main/java/net/minecraftforge/items/IItemHandlerModifiable.java @@ -21,6 +21,8 @@ package net.minecraftforge.items; import net.minecraft.item.ItemStack; +import javax.annotation.Nonnull; + public interface IItemHandlerModifiable extends IItemHandler { /** @@ -34,5 +36,5 @@ public interface IItemHandlerModifiable extends IItemHandler * @throws RuntimeException if the handler is called in a way that the handler * was not expecting. **/ - void setStackInSlot(int slot, ItemStack stack); + void setStackInSlot(int slot, @Nonnull ItemStack stack); } diff --git a/src/main/java/net/minecraftforge/items/ItemHandlerHelper.java b/src/main/java/net/minecraftforge/items/ItemHandlerHelper.java index 813b42f40..8a908abf1 100644 --- a/src/main/java/net/minecraftforge/items/ItemHandlerHelper.java +++ b/src/main/java/net/minecraftforge/items/ItemHandlerHelper.java @@ -28,19 +28,22 @@ import net.minecraft.util.SoundCategory; import net.minecraft.world.World; import net.minecraftforge.items.wrapper.PlayerMainInvWrapper; +import javax.annotation.Nonnull; + public class ItemHandlerHelper { - public static ItemStack insertItem(IItemHandler dest, ItemStack stack, boolean simulate) + @Nonnull + public static ItemStack insertItem(IItemHandler dest, @Nonnull ItemStack stack, boolean simulate) { - if (dest == null || stack == null) - return stack; + if (dest == null || stack.func_190926_b()) + return ItemStack.field_190927_a; for (int i = 0; i < dest.getSlots(); i++) { stack = dest.insertItem(i, stack, simulate); - if (stack == null || stack.stackSize <= 0) + if (stack.func_190926_b()) { - return null; + return ItemStack.field_190927_a; } } @@ -80,13 +83,13 @@ public class ItemHandlerHelper return (aTag != null || bTag == null) && (aTag == null || aTag.equals(bTag)); } + @Nonnull public static ItemStack copyStackWithSize(ItemStack itemStack, int size) { if (size == 0) - return null; - ItemStack copy = ItemStack.copyItemStack(itemStack); - if (copy != null) - copy.stackSize = size; + return ItemStack.field_190927_a; + ItemStack copy = itemStack.copy(); + copy.func_190920_e(size); return copy; } @@ -174,7 +177,7 @@ public class ItemHandlerHelper } // play sound if something got picked up - if (remainder == null || remainder.stackSize != stack.stackSize) + if (remainder == null || remainder.func_190916_E() != stack.func_190916_E()) { world.playSound(player, player.posX, player.posY, player.posZ, SoundEvents.ENTITY_ITEM_PICKUP, SoundCategory.PLAYERS, 0.2F, ((world.rand.nextFloat() - world.rand.nextFloat()) * 0.7F + 1.0F) * 2.0F); diff --git a/src/main/java/net/minecraftforge/items/ItemStackHandler.java b/src/main/java/net/minecraftforge/items/ItemStackHandler.java index 74d497743..18b211a0f 100644 --- a/src/main/java/net/minecraftforge/items/ItemStackHandler.java +++ b/src/main/java/net/minecraftforge/items/ItemStackHandler.java @@ -22,12 +22,15 @@ package net.minecraftforge.items; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; +import net.minecraft.util.NonNullList; import net.minecraftforge.common.util.Constants; import net.minecraftforge.common.util.INBTSerializable; +import javax.annotation.Nonnull; + public class ItemStackHandler implements IItemHandler, IItemHandlerModifiable, INBTSerializable { - protected ItemStack[] stacks; + protected NonNullList stacks; public ItemStackHandler() { @@ -36,102 +39,105 @@ public class ItemStackHandler implements IItemHandler, IItemHandlerModifiable, I public ItemStackHandler(int size) { - stacks = new ItemStack[size]; + stacks = NonNullList.func_191196_a(); } - public ItemStackHandler(ItemStack[] stacks) + public ItemStackHandler(NonNullList stacks) { this.stacks = stacks; } public void setSize(int size) { - stacks = new ItemStack[size]; + stacks = NonNullList.func_191197_a(size, ItemStack.field_190927_a); } @Override - public void setStackInSlot(int slot, ItemStack stack) + public void setStackInSlot(int slot, @Nonnull ItemStack stack) { validateSlotIndex(slot); - if (ItemStack.areItemStacksEqual(this.stacks[slot], stack)) + if (ItemStack.areItemStacksEqual(this.stacks.get(slot), stack)) return; - this.stacks[slot] = stack; + this.stacks.set(slot, stack); onContentsChanged(slot); } @Override public int getSlots() { - return stacks.length; + return stacks.size(); } @Override + @Nonnull public ItemStack getStackInSlot(int slot) { validateSlotIndex(slot); - return this.stacks[slot]; + return this.stacks.get(slot); } @Override - public ItemStack insertItem(int slot, ItemStack stack, boolean simulate) + @Nonnull + public ItemStack insertItem(int slot, @Nonnull ItemStack stack, boolean simulate) { - if (stack == null || stack.stackSize == 0) - return null; + if (stack.func_190926_b()) + return ItemStack.field_190927_a; validateSlotIndex(slot); - ItemStack existing = this.stacks[slot]; + ItemStack existing = this.stacks.get(slot); int limit = getStackLimit(slot, stack); - if (existing != null) + if (!existing.func_190926_b()) { if (!ItemHandlerHelper.canItemStacksStack(stack, existing)) return stack; - limit -= existing.stackSize; + limit -= existing.func_190916_E(); } if (limit <= 0) return stack; - boolean reachedLimit = stack.stackSize > limit; + boolean reachedLimit = stack.func_190916_E() > limit; if (!simulate) { - if (existing == null) + if (existing.func_190926_b()) { - this.stacks[slot] = reachedLimit ? ItemHandlerHelper.copyStackWithSize(stack, limit) : stack; + this.stacks.set(slot, reachedLimit ? ItemHandlerHelper.copyStackWithSize(stack, limit) : stack); } else { - existing.stackSize += reachedLimit ? limit : stack.stackSize; + existing.func_190917_f(reachedLimit ? limit : stack.func_190916_E()); } onContentsChanged(slot); } - return reachedLimit ? ItemHandlerHelper.copyStackWithSize(stack, stack.stackSize - limit) : null; + return reachedLimit ? ItemHandlerHelper.copyStackWithSize(stack, stack.func_190916_E()- limit) : ItemStack.field_190927_a; } + @Nonnull public ItemStack extractItem(int slot, int amount, boolean simulate) { if (amount == 0) - return null; + return ItemStack.field_190927_a; validateSlotIndex(slot); - ItemStack existing = this.stacks[slot]; + ItemStack existing = this.stacks.get(slot); - if (existing == null) - return null; + if (existing.func_190926_b()) + return ItemStack.field_190927_a; int toExtract = Math.min(amount, existing.getMaxStackSize()); - if (existing.stackSize <= toExtract) + if (existing.func_190916_E() <= toExtract) { if (!simulate) { - this.stacks[slot] = null; + this.stacks.set(slot, ItemStack.field_190927_a); onContentsChanged(slot); } return existing; @@ -140,7 +146,7 @@ public class ItemStackHandler implements IItemHandler, IItemHandlerModifiable, I { if (!simulate) { - this.stacks[slot] = ItemHandlerHelper.copyStackWithSize(existing, existing.stackSize - toExtract); + this.stacks.set(slot, ItemHandlerHelper.copyStackWithSize(existing, existing.func_190916_E() - toExtract)); onContentsChanged(slot); } @@ -157,35 +163,35 @@ public class ItemStackHandler implements IItemHandler, IItemHandlerModifiable, I public NBTTagCompound serializeNBT() { NBTTagList nbtTagList = new NBTTagList(); - for (int i = 0; i < stacks.length; i++) + for (int i = 0; i < stacks.size(); i++) { - if (stacks[i] != null) + if (!stacks.get(i).func_190926_b()) { NBTTagCompound itemTag = new NBTTagCompound(); itemTag.setInteger("Slot", i); - stacks[i].writeToNBT(itemTag); + stacks.get(i).writeToNBT(itemTag); nbtTagList.appendTag(itemTag); } } NBTTagCompound nbt = new NBTTagCompound(); nbt.setTag("Items", nbtTagList); - nbt.setInteger("Size", stacks.length); + nbt.setInteger("Size", stacks.size()); return nbt; } @Override public void deserializeNBT(NBTTagCompound nbt) { - setSize(nbt.hasKey("Size", Constants.NBT.TAG_INT) ? nbt.getInteger("Size") : stacks.length); + setSize(nbt.hasKey("Size", Constants.NBT.TAG_INT) ? nbt.getInteger("Size") : stacks.size()); NBTTagList tagList = nbt.getTagList("Items", Constants.NBT.TAG_COMPOUND); for (int i = 0; i < tagList.tagCount(); i++) { NBTTagCompound itemTags = tagList.getCompoundTagAt(i); int slot = itemTags.getInteger("Slot"); - if (slot >= 0 && slot < stacks.length) + if (slot >= 0 && slot < stacks.size()) { - stacks[slot] = ItemStack.loadItemStackFromNBT(itemTags); + stacks.set(slot, new ItemStack(itemTags)); } } onLoad(); @@ -193,8 +199,8 @@ public class ItemStackHandler implements IItemHandler, IItemHandlerModifiable, I protected void validateSlotIndex(int slot) { - if (slot < 0 || slot >= stacks.length) - throw new RuntimeException("Slot " + slot + " not in valid range - [0," + stacks.length + ")"); + if (slot < 0 || slot >= stacks.size()) + throw new RuntimeException("Slot " + slot + " not in valid range - [0," + stacks.size() + ")"); } protected void onLoad() diff --git a/src/main/java/net/minecraftforge/items/SlotItemHandler.java b/src/main/java/net/minecraftforge/items/SlotItemHandler.java index 8a0ee5928..f5ff2607e 100644 --- a/src/main/java/net/minecraftforge/items/SlotItemHandler.java +++ b/src/main/java/net/minecraftforge/items/SlotItemHandler.java @@ -25,6 +25,8 @@ import net.minecraft.inventory.InventoryBasic; import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; +import javax.annotation.Nonnull; + public class SlotItemHandler extends Slot { private static IInventory emptyInventory = new InventoryBasic("[Null]", true, 0); @@ -39,9 +41,9 @@ public class SlotItemHandler extends Slot } @Override - public boolean isItemValid(ItemStack stack) + public boolean isItemValid(@Nonnull ItemStack stack) { - if (stack == null) + if (stack.func_190926_b()) return false; IItemHandler handler = this.getItemHandler(); @@ -51,7 +53,7 @@ public class SlotItemHandler extends Slot IItemHandlerModifiable handlerModifiable = (IItemHandlerModifiable) handler; ItemStack currentStack = handlerModifiable.getStackInSlot(index); - handlerModifiable.setStackInSlot(index, null); + handlerModifiable.setStackInSlot(index, ItemStack.field_190927_a); remainder = handlerModifiable.insertItem(index, stack, true); @@ -61,10 +63,11 @@ public class SlotItemHandler extends Slot { remainder = handler.insertItem(index, stack, true); } - return remainder == null || remainder.stackSize < stack.stackSize; + return remainder == null || remainder.func_190916_E() < stack.func_190916_E(); } @Override + @Nonnull public ItemStack getStack() { return this.getItemHandler().getStackInSlot(index); @@ -72,44 +75,44 @@ public class SlotItemHandler extends Slot // Override if your IItemHandler does not implement IItemHandlerModifiable @Override - public void putStack(ItemStack stack) + public void putStack(@Nonnull ItemStack stack) { ((IItemHandlerModifiable) this.getItemHandler()).setStackInSlot(index, stack); this.onSlotChanged(); } @Override - public void onSlotChange(ItemStack p_75220_1_, ItemStack p_75220_2_) + public void onSlotChange(@Nonnull ItemStack p_75220_1_, @Nonnull ItemStack p_75220_2_) { } @Override - public int getItemStackLimit(ItemStack stack) + public int getItemStackLimit(@Nonnull ItemStack stack) { ItemStack maxAdd = stack.copy(); int maxInput = stack.getMaxStackSize(); - maxAdd.stackSize = maxInput; + maxAdd.func_190920_e(maxInput); IItemHandler handler = this.getItemHandler(); ItemStack currentStack = handler.getStackInSlot(index); if (handler instanceof IItemHandlerModifiable) { IItemHandlerModifiable handlerModifiable = (IItemHandlerModifiable) handler; - handlerModifiable.setStackInSlot(index, null); + handlerModifiable.setStackInSlot(index, ItemStack.field_190927_a); ItemStack remainder = handlerModifiable.insertItem(index, maxAdd, true); handlerModifiable.setStackInSlot(index, currentStack); - return maxInput - (remainder != null ? remainder.stackSize : 0); + return maxInput - remainder.func_190916_E(); } else { ItemStack remainder = handler.insertItem(index, maxAdd, true); - int current = currentStack == null ? 0 : currentStack.stackSize; - int added = maxInput - (remainder != null ? remainder.stackSize : 0); + int current = currentStack.func_190916_E(); + int added = maxInput - remainder.func_190916_E(); return current + added; } } @@ -117,10 +120,11 @@ public class SlotItemHandler extends Slot @Override public boolean canTakeStack(EntityPlayer playerIn) { - return this.getItemHandler().extractItem(index, 1, true) != null; + return !this.getItemHandler().extractItem(index, 1, true).func_190926_b(); } @Override + @Nonnull public ItemStack decrStackSize(int amount) { return this.getItemHandler().extractItem(index, amount, false); diff --git a/src/main/java/net/minecraftforge/items/VanillaDoubleChestItemHandler.java b/src/main/java/net/minecraftforge/items/VanillaDoubleChestItemHandler.java index 65add9778..ce10fd841 100644 --- a/src/main/java/net/minecraftforge/items/VanillaDoubleChestItemHandler.java +++ b/src/main/java/net/minecraftforge/items/VanillaDoubleChestItemHandler.java @@ -31,6 +31,8 @@ import java.lang.ref.WeakReference; import com.google.common.base.Objects; +import javax.annotation.Nonnull; + public class VanillaDoubleChestItemHandler extends WeakReference implements IItemHandlerModifiable { // Dummy cache value to signify that we have checked and definitely found no adjacent chests @@ -102,16 +104,17 @@ public class VanillaDoubleChestItemHandler extends WeakReference getRemainingItems(InventoryCrafting inv) //getRecipeLeftovers { return ForgeHooks.defaultRecipeGetRemainingItems(inv); } diff --git a/src/main/java/net/minecraftforge/oredict/ShapelessOreRecipe.java b/src/main/java/net/minecraftforge/oredict/ShapelessOreRecipe.java index 4ff36e94b..b77fe5370 100644 --- a/src/main/java/net/minecraftforge/oredict/ShapelessOreRecipe.java +++ b/src/main/java/net/minecraftforge/oredict/ShapelessOreRecipe.java @@ -30,6 +30,7 @@ import net.minecraft.inventory.InventoryCrafting; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.ShapelessRecipes; +import net.minecraft.util.NonNullList; import net.minecraft.world.World; import net.minecraftforge.common.ForgeHooks; @@ -166,7 +167,7 @@ public class ShapelessOreRecipe implements IRecipe } @Override - public ItemStack[] getRemainingItems(InventoryCrafting inv) //getRecipeLeftovers + public NonNullList getRemainingItems(InventoryCrafting inv) //getRecipeLeftovers { return ForgeHooks.defaultRecipeGetRemainingItems(inv); } diff --git a/src/main/resources/forge_at.cfg b/src/main/resources/forge_at.cfg index f2af0d02b..34db5f903 100644 --- a/src/main/resources/forge_at.cfg +++ b/src/main/resources/forge_at.cfg @@ -85,7 +85,7 @@ public net.minecraft.entity.item.EntityXPOrb field_70530_e # xpValue # Village public net.minecraft.world.gen.structure.StructureVillagePieces$Village # RenderPlayer -public net.minecraft.client.renderer.entity.RenderBiped field_77071_a #modelBipedMain +#public net.minecraft.client.renderer.entity.RenderBiped field_77071_a #modelBipedMain # ChunkProviderServer public net.minecraft.world.gen.ChunkProviderServer field_186029_c # chunkGenerator public net.minecraft.world.gen.ChunkProviderServer field_73244_f # loadedChunkHashMap @@ -149,13 +149,13 @@ public net.minecraft.network.status.server.SPacketServerInfo field_149297_a # GS #Main FML Access Transformer configuration file # TileEntity addMapping -public net.minecraft.tileentity.TileEntity func_145826_a(Ljava/lang/Class;Ljava/lang/String;)V +#public net.minecraft.tileentity.TileEntity func_145826_a(Ljava/lang/Class;Ljava/lang/String;)V # EntityList addMappings -public net.minecraft.entity.EntityList func_75618_a(Ljava/lang/Class;Ljava/lang/String;I)V -public net.minecraft.entity.EntityList func_75614_a(Ljava/lang/Class;Ljava/lang/String;III)V -public net.minecraft.entity.EntityList field_75625_b #nameToClassMap -public net.minecraft.entity.EntityList field_75626_c #classToNameMap -public net.minecraft.entity.EntityList field_75623_d #idToClassMap +#public net.minecraft.entity.EntityList func_75618_a(Ljava/lang/Class;Ljava/lang/String;I)V +#public net.minecraft.entity.EntityList func_75614_a(Ljava/lang/Class;Ljava/lang/String;III)V +#public net.minecraft.entity.EntityList field_75625_b #nameToClassMap +#public net.minecraft.entity.EntityList field_75626_c #classToNameMap +#public net.minecraft.entity.EntityList field_75623_d #idToClassMap ## RenderManager public net.minecraft.client.renderer.entity.RenderManager field_78729_o #renderers ## TileEntityRendererDispatcher @@ -266,7 +266,7 @@ private-f net.minecraft.server.management.PlayerChunkMapEntry field_187285_e # f # RenderLivingBase public net.minecraft.client.renderer.entity.RenderLivingBase func_177094_a(Lnet/minecraft/client/renderer/entity/layers/LayerRenderer;)Z # addLayer -public net.minecraft.client.renderer.entity.RenderLivingBase func_177089_b(Lnet/minecraft/client/renderer/entity/layers/LayerRenderer;)Z # removeLayer +#public net.minecraft.client.renderer.entity.RenderLivingBase func_177089_b(Lnet/minecraft/client/renderer/entity/layers/LayerRenderer;)Z # removeLayer # LootTable Stuff private-f net.minecraft.world.storage.loot.LootPool field_186455_c # rolls diff --git a/src/test/java/net/minecraftforge/debug/DynBucketTest.java b/src/test/java/net/minecraftforge/debug/DynBucketTest.java index 28192f4aa..d077ce5be 100644 --- a/src/test/java/net/minecraftforge/debug/DynBucketTest.java +++ b/src/test/java/net/minecraftforge/debug/DynBucketTest.java @@ -21,6 +21,7 @@ import net.minecraft.network.play.server.SPacketUpdateTileEntity; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ActionResult; import net.minecraft.util.EnumActionResult; +import net.minecraft.util.NonNullList; import net.minecraft.util.math.BlockPos; import net.minecraft.util.text.TextComponentString; import net.minecraft.util.EnumFacing; @@ -187,8 +188,9 @@ public class DynBucketTest public static class TestItem extends Item { @Override - public ActionResult onItemRightClick(ItemStack itemStackIn, World worldIn, EntityPlayer playerIn, EnumHand hand) + public ActionResult onItemRightClick(World worldIn, EntityPlayer playerIn, EnumHand hand) { + ItemStack itemStackIn = playerIn.getHeldItem(hand); if(worldIn.isRemote) return new ActionResult(EnumActionResult.PASS, itemStackIn); @@ -235,7 +237,7 @@ public class DynBucketTest } @Override - public void getSubItems(Item itemIn, CreativeTabs tab, List subItems) + public void getSubItems(Item itemIn, CreativeTabs tab, NonNullList subItems) { for (int i = 0; i < 4; i++) { @@ -276,8 +278,9 @@ public class DynBucketTest } @Override - public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumHand hand, ItemStack heldItem, EnumFacing side, float hitX, float hitY, float hitZ) + public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumHand hand, EnumFacing side, float hitX, float hitY, float hitZ) { + ItemStack heldItem = playerIn.getHeldItem(hand); TileEntity te = worldIn.getTileEntity(pos); if (!(te instanceof IFluidHandler)) { @@ -286,7 +289,7 @@ public class DynBucketTest IFluidHandler tank = (IFluidHandler) te; side = side.getOpposite(); - if (heldItem == null) + if (null == null) { sendText(playerIn, tank, side); return false; diff --git a/src/test/java/net/minecraftforge/debug/ForgeBlockStatesLoaderDebug.java b/src/test/java/net/minecraftforge/debug/ForgeBlockStatesLoaderDebug.java index f89dbbe84..48b6f3b74 100644 --- a/src/test/java/net/minecraftforge/debug/ForgeBlockStatesLoaderDebug.java +++ b/src/test/java/net/minecraftforge/debug/ForgeBlockStatesLoaderDebug.java @@ -54,7 +54,7 @@ public class ForgeBlockStatesLoaderDebug { public static void registerItems(RegistryEvent.Register event) { event.getRegistry().registerAll( - new ItemMultiTexture(BLOCKS.custom_wall, BLOCKS.custom_wall, new Function() + new ItemMultiTexture(BLOCKS.custom_wall, BLOCKS.custom_wall, new ItemMultiTexture.Mapper() { @Override public String apply(ItemStack stack) diff --git a/src/test/java/net/minecraftforge/debug/ItemTileDebug.java b/src/test/java/net/minecraftforge/debug/ItemTileDebug.java index 7204ee7f5..0c9a71759 100644 --- a/src/test/java/net/minecraftforge/debug/ItemTileDebug.java +++ b/src/test/java/net/minecraftforge/debug/ItemTileDebug.java @@ -136,7 +136,7 @@ public class ItemTileDebug public boolean isFullCube(IBlockState state) { return false; } @Override - public boolean isVisuallyOpaque() { return false; } + public boolean isVisuallyOpaque(IBlockState state) { return false; } @Override public TileEntity createNewTileEntity(World world, int meta) diff --git a/src/test/java/net/minecraftforge/debug/ModelAnimationDebug.java b/src/test/java/net/minecraftforge/debug/ModelAnimationDebug.java index 11aff14fd..6441b3b29 100644 --- a/src/test/java/net/minecraftforge/debug/ModelAnimationDebug.java +++ b/src/test/java/net/minecraftforge/debug/ModelAnimationDebug.java @@ -100,7 +100,7 @@ public class ModelAnimationDebug @Override public IBlockState onBlockPlaced(World world, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer) { - return this.getDefaultState().withProperty(FACING, BlockPistonBase.getFacingFromEntity(pos, placer)); + return this.getDefaultState().withProperty(FACING, EnumFacing.func_190914_a(pos, placer)); } @Override @@ -139,7 +139,7 @@ public class ModelAnimationDebug }*/ @Override - public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, ItemStack heldItem, EnumFacing side, float hitX, float hitY, float hitZ) + public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing side, float hitX, float hitY, float hitZ) { if(world.isRemote) { diff --git a/src/test/java/net/minecraftforge/debug/ModelBakeEventDebug.java b/src/test/java/net/minecraftforge/debug/ModelBakeEventDebug.java index 8052d9192..cd0953f48 100644 --- a/src/test/java/net/minecraftforge/debug/ModelBakeEventDebug.java +++ b/src/test/java/net/minecraftforge/debug/ModelBakeEventDebug.java @@ -148,7 +148,7 @@ public class ModelBakeEventDebug public boolean isFullCube(IBlockState state) { return false; } @Override - public boolean isVisuallyOpaque() { return false; } + public boolean isVisuallyOpaque(IBlockState state) { return false; } @Override public TileEntity createNewTileEntity(World world, int meta) @@ -157,7 +157,7 @@ public class ModelBakeEventDebug } @Override - public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, ItemStack heldItem, EnumFacing side, float hitX, float hitY, float hitZ) + public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing side, float hitX, float hitY, float hitZ) { TileEntity te = world.getTileEntity(pos); if(te instanceof CustomTileEntity) diff --git a/src/test/java/net/minecraftforge/debug/ModelLoaderRegistryDebug.java b/src/test/java/net/minecraftforge/debug/ModelLoaderRegistryDebug.java index fa3fe4bee..9bf36f6e8 100644 --- a/src/test/java/net/minecraftforge/debug/ModelLoaderRegistryDebug.java +++ b/src/test/java/net/minecraftforge/debug/ModelLoaderRegistryDebug.java @@ -139,7 +139,7 @@ public class ModelLoaderRegistryDebug public boolean isFullCube(IBlockState state) { return false; } @Override - public boolean isVisuallyOpaque() { return false; } + public boolean isVisuallyOpaque(IBlockState state) { return false; } @Override public IBlockState onBlockPlaced(World world, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer) @@ -168,7 +168,7 @@ public class ModelLoaderRegistryDebug } @Override - public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, ItemStack heldItem, EnumFacing side, float hitX, float hitY, float hitZ) + public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing side, float hitX, float hitY, float hitZ) { if(world.isRemote) { @@ -244,10 +244,10 @@ public class ModelLoaderRegistryDebug public boolean isFullCube(IBlockState state) { return false; } @Override - public boolean isVisuallyOpaque() { return false; } + public boolean isVisuallyOpaque(IBlockState state) { return false; } @Override - public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, ItemStack heldItem, EnumFacing side, float hitX, float hitY, float hitZ) + public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing side, float hitX, float hitY, float hitZ) { if (world.getTileEntity(pos) == null) world.setTileEntity(pos, new OBJTesseractTileEntity()); OBJTesseractTileEntity tileEntity = (OBJTesseractTileEntity) world.getTileEntity(pos); @@ -381,7 +381,7 @@ public class ModelLoaderRegistryDebug public boolean isFullCube(IBlockState state) { return false; } @Override - public boolean isVisuallyOpaque() { return false; } + public boolean isVisuallyOpaque(IBlockState state) { return false; } } /** @@ -438,7 +438,7 @@ public class ModelLoaderRegistryDebug public boolean isFullCube(IBlockState state) { return false; } @Override - public boolean isVisuallyOpaque() { return false; } + public boolean isVisuallyOpaque(IBlockState state) { return false; } public static EnumFacing getFacingFromEntity(World worldIn, BlockPos clickedBlock, EntityLivingBase entityIn) { @@ -488,7 +488,7 @@ public class ModelLoaderRegistryDebug } @Override - public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, ItemStack heldItem, EnumFacing side, float hitX, float hitY, float hitZ) + public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing side, float hitX, float hitY, float hitZ) { if (world.getTileEntity(pos) != null && world.getTileEntity(pos) instanceof OBJVertexColoring2TileEntity) { @@ -591,7 +591,7 @@ public class ModelLoaderRegistryDebug public boolean isFullCube(IBlockState state) { return false; } @Override - public boolean isVisuallyOpaque() { return false; } + public boolean isVisuallyOpaque(IBlockState state) { return false; } @Override public IBlockState onBlockPlaced(World world, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer) diff --git a/src/test/java/net/minecraftforge/fml/common/registry/ItemBlockSubstitutionRemoveRestoreTest.java b/src/test/java/net/minecraftforge/fml/common/registry/ItemBlockSubstitutionRemoveRestoreTest.java index ba1da0b1d..6ac0dbbd1 100644 --- a/src/test/java/net/minecraftforge/fml/common/registry/ItemBlockSubstitutionRemoveRestoreTest.java +++ b/src/test/java/net/minecraftforge/fml/common/registry/ItemBlockSubstitutionRemoveRestoreTest.java @@ -17,6 +17,7 @@ import org.junit.BeforeClass; import org.junit.Test; import org.junit.runner.RunWith; +import javax.annotation.Nonnull; import javax.annotation.Nullable; import static org.junit.Assert.assertEquals; @@ -32,10 +33,10 @@ public class ItemBlockSubstitutionRemoveRestoreTest private static class ItemMyDirt extends ItemMultiTexture { public ItemMyDirt() { - super(Blocks.DIRT, Blocks.DIRT, new Function() + super(Blocks.DIRT, Blocks.DIRT, new Mapper() { @Nullable - public String apply(@Nullable ItemStack p_apply_1_) + public String apply(@Nonnull ItemStack p_apply_1_) { return BlockDirt.DirtType.byMetadata(p_apply_1_.getMetadata()).getUnlocalizedName(); } diff --git a/src/test/java/net/minecraftforge/test/FluidHandlerTest.java b/src/test/java/net/minecraftforge/test/FluidHandlerTest.java index 96709ffc1..1c00af610 100644 --- a/src/test/java/net/minecraftforge/test/FluidHandlerTest.java +++ b/src/test/java/net/minecraftforge/test/FluidHandlerTest.java @@ -6,6 +6,7 @@ import java.util.List; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; +import net.minecraft.util.NonNullList; import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidStack; @@ -74,7 +75,7 @@ public class FluidHandlerTest private static String stackString(ItemStack stack) { - if (stack == null || stack.stackSize <= 0) + if (stack.func_190926_b()) { return "no item"; } @@ -89,13 +90,13 @@ public class FluidHandlerTest { resourceDomain = stack.getItem().getRegistryName().getResourceDomain(); } - return stack.stackSize + " " + stack.getDisplayName() + " (" + resourceDomain + ")"; + return stack.func_190916_E() + " " + stack.getDisplayName() + " (" + resourceDomain + ")"; } } private static List getAllItems() { - List list = new ArrayList(); + NonNullList list = NonNullList.func_191196_a(); for (Item item : ForgeRegistries.ITEMS.getValues()) { for (CreativeTabs tab : item.getCreativeTabs()) diff --git a/src/test/java/net/minecraftforge/test/NoBedSleepingTest.java b/src/test/java/net/minecraftforge/test/NoBedSleepingTest.java index 9a774396e..9a2ee03ee 100644 --- a/src/test/java/net/minecraftforge/test/NoBedSleepingTest.java +++ b/src/test/java/net/minecraftforge/test/NoBedSleepingTest.java @@ -161,8 +161,9 @@ public class NoBedSleepingTest } @Override - public ActionResult onItemRightClick(ItemStack stack, World world, EntityPlayer player, EnumHand hand) + public ActionResult onItemRightClick(World world, EntityPlayer player, EnumHand hand) { + ItemStack stack = player.getHeldItem(hand); if (!world.isRemote) { final SleepResult result = player.trySleep(player.getPosition()); diff --git a/src/test/java/net/minecraftforge/test/PlayerInteractEventTest.java b/src/test/java/net/minecraftforge/test/PlayerInteractEventTest.java index fc4b0b2f0..5e57d4275 100644 --- a/src/test/java/net/minecraftforge/test/PlayerInteractEventTest.java +++ b/src/test/java/net/minecraftforge/test/PlayerInteractEventTest.java @@ -3,7 +3,6 @@ package net.minecraftforge.test; import net.minecraft.entity.item.EntityArmorStand; import net.minecraft.entity.monster.EntityCreeper; import net.minecraft.entity.monster.EntitySkeleton; -import net.minecraft.entity.monster.SkeletonType; import net.minecraft.entity.passive.EntityHorse; import net.minecraft.init.Items; import net.minecraft.tileentity.TileEntity; @@ -136,8 +135,8 @@ public class PlayerInteractEventTest && evt.getTarget() instanceof EntitySkeleton && evt.getLocalPos().yCoord > evt.getTarget().height / 2.0) { - // If we right click the upper half of a skeleton it becomes wither skeleton. Otherwise nothing happens. - ((EntitySkeleton) evt.getTarget()).setSkeletonType(SkeletonType.WITHER); + // If we right click the upper half of a skeleton it dies. + ((EntitySkeleton) evt.getTarget()).setDead(); evt.setCanceled(true); } }