diff --git a/build.gradle b/build.gradle index 5f993b0cd..55f9431a7 100644 --- a/build.gradle +++ b/build.gradle @@ -11,7 +11,7 @@ buildscript { } } dependencies { - classpath 'net.minecraftforge.gradle:ForgeGradle:2.2-SNAPSHOT' + classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT' } } @@ -26,7 +26,7 @@ apply plugin: "maven" apply plugin: "net.minecraftforge.gradle.patcher" apply plugin: "net.minecraftforge.gradle.launch4j" -minecraft.version = "1.11.2" +minecraft.version = "1.12" minecraft { mappings = 'snapshot_nodoc_20161220' @@ -202,7 +202,7 @@ launch4j { outfile = file("build/distributions/${project.name}-${project.version}-installer-win.exe").canonicalPath icon = file('icon.ico').canonicalPath manifest = file('l4jManifest.xml').canonicalPath - jreMinVersion = '1.6.0' + jreMinVersion = '1.8.0' initialHeapPercent = 5; maxHeapPercent = 100; } diff --git a/jsons/1.12-dev.json b/jsons/1.12-dev.json new file mode 100644 index 000000000..2aaae7b36 --- /dev/null +++ b/jsons/1.12-dev.json @@ -0,0 +1,92 @@ +{ + "id": "@minecraft_version@-@project@@version@", + "time": "@timestamp@", + "releaseTime": "1960-01-01T00:00:00-0700", + "type": "release", + "inheritsFrom": "1.12", + "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.1", + "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.12-rel.json b/jsons/1.12-rel.json new file mode 100644 index 000000000..61a91dd18 --- /dev/null +++ b/jsons/1.12-rel.json @@ -0,0 +1,154 @@ +{ +"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", + "modList":"none" +}, +"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.12", + "jar": "1.12", + "logging": {}, + "libraries": [ + { + "name": "@artifact@", + "url": "http://files.minecraftforge.net/maven/" + }, + { + "name": "net.minecraft:launchwrapper:1.12", + "serverreq":true + }, + { + "name": "org.ow2.asm:asm-all:5.1", + "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 + } + ] +}, +"optionals": [ + { + "name": "Mercurius", + "client": true, + "server": true, + "default": true, + "inject": true, + "desc": "A mod that collects statistics about Minecraft and your system.
Useful for Forge to understand how Minecraft/Forge are used.", + "url": "http://www.minecraftforge.net/forum/index.php?topic=43278.0", + "artifact": "net.minecraftforge:MercuriusUpdater:1.12", + "maven": "http://files.minecraftforge.net/maven/" + } +] +} diff --git a/jsons/1.12.json b/jsons/1.12.json new file mode 100644 index 000000000..18f5d1064 --- /dev/null +++ b/jsons/1.12.json @@ -0,0 +1,724 @@ +{ + "assetIndex": { + "id": "1.12", + "sha1": "9838fc4e7d9808b5d9b44c97f6034a304ed4854c", + "size": 169014, + "url": "https://launchermeta.mojang.com/mc/assets/1.12/9838fc4e7d9808b5d9b44c97f6034a304ed4854c/1.12.json", + "totalSize": 127005140 + }, + "assets": "1.12", + "downloads": { + "client": { + "sha1": "909823f9c467f9934687f136bc95a667a0d19d7f", + "size": 10177098, + "url": "https://launcher.mojang.com/mc/game/1.12/client/909823f9c467f9934687f136bc95a667a0d19d7f/client.jar" + }, + "server": { + "sha1": "8494e844e911ea0d63878f64da9dcc21f53a3463", + "size": 30202458, + "url": "https://launcher.mojang.com/mc/game/1.12/server/8494e844e911ea0d63878f64da9dcc21f53a3463/server.jar" + } + }, + "id": "1.12", + "libraries": [ + { + "name": "com.mojang:patchy:1.1", + "downloads": { + "artifact": { + "size": 15817, + "sha1": "aef610b34a1be37fa851825f12372b78424d8903", + "path": "com/mojang/patchy/1.1/patchy-1.1.jar", + "url": "https://libraries.minecraft.net/com/mojang/patchy/1.1/patchy-1.1.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:4.4.0", + "downloads": { + "artifact": { + "size": 1091208, + "sha1": "cb208278274bf12ebdb56c61bd7407e6f774d65a", + "path": "net/java/dev/jna/jna/4.4.0/jna-4.4.0.jar", + "url": "https://libraries.minecraft.net/net/java/dev/jna/jna/4.4.0/jna-4.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:5.0.3", + "downloads": { + "artifact": { + "size": 78175, + "sha1": "cdd846cfc4e0f7eefafc02c0f5dce32b9303aa2a", + "path": "net/sf/jopt-simple/jopt-simple/5.0.3/jopt-simple-5.0.3.jar", + "url": "https://libraries.minecraft.net/net/sf/jopt-simple/jopt-simple/5.0.3/jopt-simple-5.0.3.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.1.9.Final", + "downloads": { + "artifact": { + "size": 3511093, + "sha1": "0097860965d6a0a6b98e7f569f3f966727b8db75", + "path": "io/netty/netty-all/4.1.9.Final/netty-all-4.1.9.Final.jar", + "url": "https://libraries.minecraft.net/io/netty/netty-all/4.1.9.Final/netty-all-4.1.9.Final.jar" + } + } + }, + { + "name": "com.google.guava:guava:21.0", + "downloads": { + "artifact": { + "size": 2521113, + "sha1": "3a3d111be1be1b745edfa7d91678a12d7ed38709", + "path": "com/google/guava/guava/21.0/guava-21.0.jar", + "url": "https://libraries.minecraft.net/com/google/guava/guava/21.0/guava-21.0.jar" + } + } + }, + { + "name": "org.apache.commons:commons-lang3:3.5", + "downloads": { + "classifiers": { + "tests": { + "size": 780282, + "sha1": "8ca309192f104265c67a1570245ae827a8650af9", + "path": "org/apache/commons/commons-lang3/3.5/commons-lang3-3.5-tests.jar", + "url": "https://libraries.minecraft.net/org/apache/commons/commons-lang3/3.5/commons-lang3-3.5-tests.jar" + } + }, + "artifact": { + "size": 479881, + "sha1": "6c6c702c89bfff3cd9e80b04d668c5e190d588c6", + "path": "org/apache/commons/commons-lang3/3.5/commons-lang3-3.5.jar", + "url": "https://libraries.minecraft.net/org/apache/commons/commons-lang3/3.5/commons-lang3-3.5.jar" + } + } + }, + { + "name": "commons-io:commons-io:2.5", + "downloads": { + "classifiers": { + "tests": { + "size": 372821, + "sha1": "32b15369c83e9435ced8cd3fbe652dfba9c497ef", + "path": "commons-io/commons-io/2.5/commons-io-2.5-tests.jar", + "url": "https://libraries.minecraft.net/commons-io/commons-io/2.5/commons-io-2.5-tests.jar" + } + }, + "artifact": { + "size": 208700, + "sha1": "2852e6e05fbb95076fc091f6d1780f1f8fe35e0f", + "path": "commons-io/commons-io/2.5/commons-io-2.5.jar", + "url": "https://libraries.minecraft.net/commons-io/commons-io/2.5/commons-io-2.5.jar" + } + } + }, + { + "name": "commons-codec:commons-codec:1.10", + "downloads": { + "classifiers": { + "tests": { + "size": 256617, + "sha1": "df86446f0fe79f15ce8048c0ed04d1a92fa8d265", + "path": "commons-codec/commons-codec/1.10/commons-codec-1.10-tests.jar", + "url": "https://libraries.minecraft.net/commons-codec/commons-codec/1.10/commons-codec-1.10-tests.jar" + } + }, + "artifact": { + "size": 284184, + "sha1": "4b95f4897fa13f2cd904aee711aeafc0c5295cd8", + "path": "commons-codec/commons-codec/1.10/commons-codec-1.10.jar", + "url": "https://libraries.minecraft.net/commons-codec/commons-codec/1.10/commons-codec-1.10.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.8.0", + "downloads": { + "artifact": { + "size": 231952, + "sha1": "c4ba5371a29ac9b2ad6129b1d39ea38750043eff", + "path": "com/google/code/gson/gson/2.8.0/gson-2.8.0.jar", + "url": "https://libraries.minecraft.net/com/google/code/gson/gson/2.8.0/gson-2.8.0.jar" + } + } + }, + { + "name": "com.mojang:authlib:1.5.25", + "downloads": { + "artifact": { + "size": 65621, + "sha1": "9834cdf236c22e84b946bba989e2f94ef5897c3c", + "path": "com/mojang/authlib/1.5.25/authlib-1.5.25.jar", + "url": "https://libraries.minecraft.net/com/mojang/authlib/1.5.25/authlib-1.5.25.jar" + } + } + }, + { + "name": "com.mojang:realms:1.10.16", + "downloads": { + "artifact": { + "size": 3257394, + "sha1": "b4948eb06ff238e45044f47aa69c2c977ce69dcb", + "path": "com/mojang/realms/1.10.16/realms-1.10.16.jar", + "url": "https://libraries.minecraft.net/com/mojang/realms/1.10.16/realms-1.10.16.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.1.0", + "downloads": { + "artifact": { + "size": 17655579, + "sha1": "9835253257524c1be7ab50c057aa2d418fb72082", + "path": "it/unimi/dsi/fastutil/7.1.0/fastutil-7.1.0.jar", + "url": "https://libraries.minecraft.net/it/unimi/dsi/fastutil/7.1.0/fastutil-7.1.0.jar" + } + } + }, + { + "name": "org.apache.logging.log4j:log4j-api:2.8.1", + "downloads": { + "classifiers": { + "tests": { + "size": 192791, + "sha1": "9d0c48c6186ea7f7f443803801ee7c9469129b85", + "path": "org/apache/logging/log4j/log4j-api/2.8.1/log4j-api-2.8.1-tests.jar", + "url": "https://libraries.minecraft.net/org/apache/logging/log4j/log4j-api/2.8.1/log4j-api-2.8.1-tests.jar" + } + }, + "artifact": { + "size": 228859, + "sha1": "e801d13612e22cad62a3f4f3fe7fdbe6334a8e72", + "path": "org/apache/logging/log4j/log4j-api/2.8.1/log4j-api-2.8.1.jar", + "url": "https://libraries.minecraft.net/org/apache/logging/log4j/log4j-api/2.8.1/log4j-api-2.8.1.jar" + } + } + }, + { + "name": "org.apache.logging.log4j:log4j-core:2.8.1", + "downloads": { + "classifiers": { + "tests": { + "size": 1412295, + "sha1": "ef19122d4ad5de8da81fafabd007403007c8a832", + "path": "org/apache/logging/log4j/log4j-core/2.8.1/log4j-core-2.8.1-tests.jar", + "url": "https://libraries.minecraft.net/org/apache/logging/log4j/log4j-core/2.8.1/log4j-core-2.8.1-tests.jar" + } + }, + "artifact": { + "size": 1402925, + "sha1": "4ac28ff2f1ddf05dae3043a190451e8c46b73c31", + "path": "org/apache/logging/log4j/log4j-core/2.8.1/log4j-core-2.8.1.jar", + "url": "https://libraries.minecraft.net/org/apache/logging/log4j/log4j-core/2.8.1/log4j-core-2.8.1.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" + } + } + } + }, + { + "name": "com.mojang:text2speech:1.10.3", + "downloads": { + "classifiers": { + "natives-linux": { + "size": 7833, + "sha1": "ab7896aec3b3dd272b06194357f2d98f832c0cfc", + "path": "com/mojang/text2speech/1.10.3/text2speech-1.10.3-natives-linux.jar", + "url": "https://libraries.minecraft.net/com/mojang/text2speech/1.10.3/text2speech-1.10.3-natives-linux.jar" + }, + "natives-windows": { + "size": 81217, + "sha1": "84a4b856389cc4f485275b1f63497a95a857a443", + "path": "com/mojang/text2speech/1.10.3/text2speech-1.10.3-natives-windows.jar", + "url": "https://libraries.minecraft.net/com/mojang/text2speech/1.10.3/text2speech-1.10.3-natives-windows.jar" + } + }, + "artifact": { + "size": 11055, + "sha1": "48fd510879dff266c3815947de66e3d4809f8668", + "path": "com/mojang/text2speech/1.10.3/text2speech-1.10.3.jar", + "url": "https://libraries.minecraft.net/com/mojang/text2speech/1.10.3/text2speech-1.10.3.jar" + } + } + }, + { + "extract": { + "exclude": [ + "META-INF/" + ] + }, + "name": "com.mojang:text2speech:1.10.3", + "natives": { + "linux": "natives-linux", + "windows": "natives-windows" + }, + "downloads": { + "classifiers": { + "natives-linux": { + "size": 7833, + "sha1": "ab7896aec3b3dd272b06194357f2d98f832c0cfc", + "path": "com/mojang/text2speech/1.10.3/text2speech-1.10.3-natives-linux.jar", + "url": "https://libraries.minecraft.net/com/mojang/text2speech/1.10.3/text2speech-1.10.3-natives-linux.jar" + }, + "natives-windows": { + "size": 81217, + "sha1": "84a4b856389cc4f485275b1f63497a95a857a443", + "path": "com/mojang/text2speech/1.10.3/text2speech-1.10.3-natives-windows.jar", + "url": "https://libraries.minecraft.net/com/mojang/text2speech/1.10.3/text2speech-1.10.3-natives-windows.jar" + } + }, + "artifact": { + "size": 11055, + "sha1": "48fd510879dff266c3815947de66e3d4809f8668", + "path": "com/mojang/text2speech/1.10.3/text2speech-1.10.3.jar", + "url": "https://libraries.minecraft.net/com/mojang/text2speech/1.10.3/text2speech-1.10.3.jar" + } + } + }, + { + "extract": { + "exclude": [ + "META-INF/" + ] + }, + "name": "ca.weblite:java-objc-bridge:1.0.0", + "natives": { + "osx": "natives-osx" + }, + "rules": [ + { + "action": "allow", + "os": { + "name": "osx" + } + } + ], + "downloads": { + "classifiers": { + "natives-osx": { + "size": 5629, + "sha1": "08befab4894d55875f33c3d300f4f71e6e828f64", + "path": "ca/weblite/java-objc-bridge/1.0.0/java-objc-bridge-1.0.0-natives-osx.jar", + "url": "https://libraries.minecraft.net/ca/weblite/java-objc-bridge/1.0.0/java-objc-bridge-1.0.0-natives-osx.jar" + } + }, + "artifact": { + "size": 40502, + "sha1": "6ef160c3133a78de015830860197602ca1c855d3", + "path": "ca/weblite/java-objc-bridge/1.0.0/java-objc-bridge-1.0.0.jar", + "url": "https://libraries.minecraft.net/ca/weblite/java-objc-bridge/1.0.0/java-objc-bridge-1.0.0.jar" + } + } + }, + { + "name": "ca.weblite:java-objc-bridge:1.0.0", + "rules": [ + { + "action": "allow", + "os": { + "name": "osx" + } + } + ], + "downloads": { + "classifiers": { + "natives-osx": { + "size": 5629, + "sha1": "08befab4894d55875f33c3d300f4f71e6e828f64", + "path": "ca/weblite/java-objc-bridge/1.0.0/java-objc-bridge-1.0.0-natives-osx.jar", + "url": "https://libraries.minecraft.net/ca/weblite/java-objc-bridge/1.0.0/java-objc-bridge-1.0.0-natives-osx.jar" + } + }, + "artifact": { + "size": 40502, + "sha1": "6ef160c3133a78de015830860197602ca1c855d3", + "path": "ca/weblite/java-objc-bridge/1.0.0/java-objc-bridge-1.0.0.jar", + "url": "https://libraries.minecraft.net/ca/weblite/java-objc-bridge/1.0.0/java-objc-bridge-1.0.0.jar" + } + } + } + ], + "logging": { + "client": { + "file": { + "id": "client-1.12.xml", + "sha1": "ef4f57b922df243d0cef096efe808c72db042149", + "size": 877, + "url": "https://launchermeta.mojang.com/mc/log_configs/client-1.12.xml/ef4f57b922df243d0cef096efe808c72db042149/client-1.12.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": "2017-06-02T13:50:27+00:00", + "time": "2017-06-07T11:50:36+00:00", + "type": "release" +} diff --git a/mdk/build.gradle b/mdk/build.gradle index c888e9114..deaf2d9e5 100644 --- a/mdk/build.gradle +++ b/mdk/build.gradle @@ -4,7 +4,7 @@ buildscript { maven { url = "http://files.minecraftforge.net/maven" } } dependencies { - classpath 'net.minecraftforge.gradle:ForgeGradle:2.2-SNAPSHOT' + classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT' } } apply plugin: 'net.minecraftforge.gradle.forge' @@ -15,9 +15,9 @@ version = "1.0" group = "com.yourname.modid" // http://maven.apache.org/guides/mini/guide-naming-conventions.html archivesBaseName = "modid" -sourceCompatibility = targetCompatibility = "1.6" // Need this here so eclipse task generates correctly. +sourceCompatibility = targetCompatibility = '1.8' // Need this here so eclipse task generates correctly. compileJava { - sourceCompatibility = targetCompatibility = "1.6" + sourceCompatibility = targetCompatibility = '1.8' } minecraft { diff --git a/patches/minecraft/net/minecraft/block/Block.java.patch b/patches/minecraft/net/minecraft/block/Block.java.patch index e4ab4ff1f..55c71d95a 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 -@@ -50,11 +50,12 @@ +@@ -52,11 +52,12 @@ import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -8,15 +8,15 @@ +public class Block extends net.minecraftforge.fml.common.registry.IForgeRegistryEntry.Impl { private static final ResourceLocation field_176230_a = new ResourceLocation("air"); -- public static final RegistryNamespacedDefaultedByKey field_149771_c = new RegistryNamespacedDefaultedByKey(field_176230_a); -- public static final ObjectIntIdentityMap field_176229_d = new ObjectIntIdentityMap(); +- public static final RegistryNamespacedDefaultedByKey field_149771_c = new RegistryNamespacedDefaultedByKey(field_176230_a); +- public static final ObjectIntIdentityMap field_176229_d = new ObjectIntIdentityMap(); + public static final RegistryNamespacedDefaultedByKey field_149771_c = net.minecraftforge.fml.common.registry.GameData.getBlockRegistry(); + @Deprecated //Modders: DO NOT use this! Use GameRegistry + public static final ObjectIntIdentityMap field_176229_d = net.minecraftforge.fml.common.registry.GameData.getBlockStateIDMap(); 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; -@@ -307,7 +308,7 @@ +@@ -319,7 +320,7 @@ public boolean func_176200_f(IBlockAccess p_176200_1_, BlockPos p_176200_2_) { @@ -25,7 +25,7 @@ } public Block func_149711_c(float p_149711_1_) -@@ -345,9 +346,10 @@ +@@ -357,9 +358,10 @@ return this.field_149789_z; } @@ -37,7 +37,7 @@ } @Deprecated -@@ -360,13 +362,13 @@ +@@ -372,13 +374,13 @@ @SideOnly(Side.CLIENT) public int func_185484_c(IBlockState p_185484_1_, IBlockAccess p_185484_2_, BlockPos p_185484_3_) { @@ -53,7 +53,7 @@ } else { -@@ -430,7 +432,7 @@ +@@ -442,7 +444,7 @@ } } @@ -61,8 +61,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()); } - public boolean func_176212_b(IBlockAccess p_176212_1_, BlockPos p_176212_2_, EnumFacing p_176212_3_) -@@ -521,6 +523,10 @@ + @Deprecated +@@ -534,6 +536,10 @@ public void func_180663_b(World p_180663_1_, BlockPos p_180663_2_, IBlockState p_180663_3_) { @@ -73,17 +73,25 @@ } public int func_149745_a(Random p_149745_1_) -@@ -536,8 +542,7 @@ +@@ -549,16 +555,7 @@ @Deprecated public float func_180647_a(IBlockState p_180647_1_, EntityPlayer p_180647_2_, World p_180647_3_, BlockPos p_180647_4_) { - float f = p_180647_1_.func_185887_b(p_180647_3_, p_180647_4_); -- return f < 0.0F ? 0.0F : (!p_180647_2_.func_184823_b(p_180647_1_) ? p_180647_2_.func_184813_a(p_180647_1_) / f / 100.0F : p_180647_2_.func_184813_a(p_180647_1_) / f / 30.0F); +- +- if (f < 0.0F) +- { +- return 0.0F; +- } +- else +- { +- return !p_180647_2_.func_184823_b(p_180647_1_) ? p_180647_2_.func_184813_a(p_180647_1_) / f / 100.0F : p_180647_2_.func_184813_a(p_180647_1_) / f / 30.0F; +- } + return net.minecraftforge.common.ForgeHooks.blockStrength(p_180647_1_, p_180647_2_, p_180647_3_, p_180647_4_); } public final void func_176226_b(World p_176226_1_, BlockPos p_176226_2_, IBlockState p_176226_3_, int p_176226_4_) -@@ -547,20 +552,17 @@ +@@ -568,20 +565,17 @@ 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_) { @@ -110,7 +118,7 @@ } } } -@@ -568,8 +570,13 @@ +@@ -589,8 +583,13 @@ public static void func_180635_a(World p_180635_0_, BlockPos p_180635_1_, ItemStack p_180635_2_) { @@ -125,7 +133,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; -@@ -598,6 +605,7 @@ +@@ -619,6 +618,7 @@ return 0; } @@ -133,7 +141,7 @@ public float func_149638_a(Entity p_149638_1_) { return this.field_149781_w / 5.0F; -@@ -636,7 +644,7 @@ +@@ -657,7 +657,7 @@ public boolean func_176196_c(World p_176196_1_, BlockPos p_176196_2_) { @@ -142,7 +150,7 @@ } 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 +656,8 @@ +@@ -669,6 +669,8 @@ { } @@ -151,7 +159,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_) { return this.func_176203_a(p_180642_7_); -@@ -689,21 +699,35 @@ +@@ -710,21 +712,35 @@ p_180657_2_.func_71029_a(StatList.func_188055_a(this)); p_180657_2_.func_71020_j(0.005F); @@ -190,7 +198,7 @@ } protected ItemStack func_180643_i(IBlockState p_180643_1_) -@@ -789,6 +813,7 @@ +@@ -810,6 +826,7 @@ p_176216_2_.field_70181_x = 0.0D; } @@ -198,7 +206,7 @@ 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_)); -@@ -893,6 +918,7 @@ +@@ -921,6 +938,7 @@ } } @@ -206,7 +214,7 @@ public SoundType func_185467_w() { return this.field_149762_H; -@@ -908,6 +934,1217 @@ +@@ -936,6 +954,1216 @@ { } @@ -285,6 +293,7 @@ + * @param side The side to check + * @return True if the block is solid on the specified side. + */ ++ @Deprecated //Use IBlockState.func_193401_d + public boolean isSideSolid(IBlockState base_state, IBlockAccess world, BlockPos pos, EnumFacing side) + { + if (base_state.func_185896_q() && side == EnumFacing.UP) // Short circuit to vanilla function if its true @@ -458,14 +467,12 @@ + */ + public boolean isFireSource(World world, BlockPos pos, EnumFacing side) + { -+ if (this == net.minecraft.init.Blocks.field_150424_aL && side == EnumFacing.UP) -+ { ++ if (side != EnumFacing.UP) ++ return false; ++ if (this == Blocks.field_150424_aL || this == Blocks.field_189877_df) + return true; -+ } -+ if ((world.field_73011_w instanceof net.minecraft.world.WorldProviderEnd) && this == net.minecraft.init.Blocks.field_150357_h && side == EnumFacing.UP) -+ { ++ if ((world.field_73011_w instanceof net.minecraft.world.WorldProviderEnd) && this == Blocks.field_150357_h) + return true; -+ } + return false; + } + @@ -783,13 +790,13 @@ + */ + public boolean canPlaceTorchOnTop(IBlockState state, IBlockAccess world, BlockPos pos) + { -+ if (state.isSideSolid(world, pos, EnumFacing.UP)) ++ if (state.func_193401_d(world, pos, EnumFacing.UP) == BlockFaceShape.SOLID) + { -+ return true; ++ return this != Blocks.field_185775_db && this != Blocks.field_150428_aP; + } + else + { -+ return this instanceof BlockFence || this == net.minecraft.init.Blocks.field_150359_w || this == net.minecraft.init.Blocks.field_150463_bK || this == net.minecraft.init.Blocks.field_150399_cn; ++ return this instanceof BlockFence || this == Blocks.field_150359_w || this == Blocks.field_150463_bK || this == Blocks.field_150399_cn; + } + } + @@ -1424,19 +1431,19 @@ public static void func_149671_p() { func_176215_a(0, field_176230_a, (new BlockAir()).func_149663_c("air")); -@@ -1201,14 +2438,7 @@ +@@ -1247,14 +2475,7 @@ } else { -- UnmodifiableIterator lvt_18_2_ = block16.func_176194_O().func_177619_a().iterator(); +- UnmodifiableIterator unmodifiableiterator = block16.func_176194_O().func_177619_a().iterator(); - -- while (lvt_18_2_.hasNext()) +- while (unmodifiableiterator.hasNext()) - { -- IBlockState iblockstate = (IBlockState)lvt_18_2_.next(); +- IBlockState iblockstate = (IBlockState)unmodifiableiterator.next(); - int k = field_149771_c.func_148757_b(block16) << 4 | block16.func_176201_c(iblockstate); - field_176229_d.func_148746_a(iblockstate, k); - } -+// Handled in GameData.BlockCallbacks - leaving tripwire as it seems to be special cased ++// Handled in GameData.BlockCallbacks - leaving tripwire as it seems to be special cased } } } diff --git a/patches/minecraft/net/minecraft/block/BlockBanner.java.patch b/patches/minecraft/net/minecraft/block/BlockBanner.java.patch index 5eca9f91b..88a8a5ef8 100644 --- a/patches/minecraft/net/minecraft/block/BlockBanner.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockBanner.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/block/BlockBanner.java +++ ../src-work/minecraft/net/minecraft/block/BlockBanner.java -@@ -89,16 +89,9 @@ +@@ -90,16 +90,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_) { @@ -17,8 +17,8 @@ } public boolean func_176196_c(World p_176196_1_, BlockPos p_176196_2_) -@@ -120,6 +113,25 @@ - } +@@ -126,6 +119,25 @@ + return BlockFaceShape.UNDEFINED; } + @Override diff --git a/patches/minecraft/net/minecraft/block/BlockBush.java.patch b/patches/minecraft/net/minecraft/block/BlockBush.java.patch index 03f7cde2e..4972a054f 100644 --- a/patches/minecraft/net/minecraft/block/BlockBush.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockBush.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/block/BlockBush.java +++ ../src-work/minecraft/net/minecraft/block/BlockBush.java -@@ -15,7 +15,7 @@ +@@ -17,7 +17,7 @@ import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -9,7 +9,7 @@ { protected static final AxisAlignedBB field_185515_b = new AxisAlignedBB(0.30000001192092896D, 0.0D, 0.30000001192092896D, 0.699999988079071D, 0.6000000238418579D, 0.699999988079071D); -@@ -38,7 +38,8 @@ +@@ -40,7 +40,8 @@ public boolean func_176196_c(World p_176196_1_, BlockPos p_176196_2_) { @@ -19,7 +19,7 @@ } protected boolean func_185514_i(IBlockState p_185514_1_) -@@ -68,6 +69,11 @@ +@@ -70,6 +71,11 @@ public boolean func_180671_f(World p_180671_1_, BlockPos p_180671_2_, IBlockState p_180671_3_) { @@ -31,7 +31,7 @@ return this.func_185514_i(p_180671_1_.func_180495_p(p_180671_2_.func_177977_b())); } -@@ -92,6 +98,35 @@ +@@ -94,6 +100,35 @@ return false; } diff --git a/patches/minecraft/net/minecraft/block/BlockButton.java.patch b/patches/minecraft/net/minecraft/block/BlockButton.java.patch deleted file mode 100644 index f7e8794be..000000000 --- a/patches/minecraft/net/minecraft/block/BlockButton.java.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- ../src-base/minecraft/net/minecraft/block/BlockButton.java -+++ ../src-work/minecraft/net/minecraft/block/BlockButton.java -@@ -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_); -- return p_181088_2_ == EnumFacing.DOWN ? p_181088_0_.func_180495_p(blockpos).func_185896_q() : p_181088_0_.func_180495_p(blockpos).func_185915_l(); -+ return p_181088_0_.func_180495_p(blockpos).isSideSolid(p_181088_0_, blockpos, p_181088_2_.func_176734_d()); - } - - 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_) diff --git a/patches/minecraft/net/minecraft/block/BlockCactus.java.patch b/patches/minecraft/net/minecraft/block/BlockCactus.java.patch index aa6a2d155..6de92639c 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 -@@ -19,7 +19,7 @@ +@@ -20,7 +20,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); -@@ -50,6 +50,8 @@ +@@ -51,6 +51,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()); -@@ -61,6 +63,8 @@ +@@ -62,6 +64,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 @@ } } } -@@ -111,8 +115,8 @@ +@@ -112,8 +116,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_) -@@ -136,6 +140,18 @@ +@@ -137,6 +141,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 338a9c449..6708b0dd5 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 -@@ -522,7 +522,7 @@ +@@ -538,7 +538,7 @@ private boolean func_176456_n(World p_176456_1_, BlockPos p_176456_2_) { @@ -9,7 +9,7 @@ } private boolean func_176453_o(World p_176453_1_, BlockPos p_176453_2_) -@@ -587,4 +587,10 @@ +@@ -608,4 +608,10 @@ BASIC, TRAP; } diff --git a/patches/minecraft/net/minecraft/block/BlockChorusFlower.java.patch b/patches/minecraft/net/minecraft/block/BlockChorusFlower.java.patch index 572e48fff..37b7878b0 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 -@@ -53,7 +53,7 @@ +@@ -55,7 +55,7 @@ { int i = ((Integer)p_180650_3_.func_177229_b(field_185607_a)).intValue(); @@ -9,7 +9,7 @@ { boolean flag = false; boolean flag1 = false; -@@ -142,6 +142,7 @@ +@@ -144,6 +144,7 @@ { this.func_185605_c(p_180650_1_, p_180650_2_); } diff --git a/patches/minecraft/net/minecraft/block/BlockCocoa.java.patch b/patches/minecraft/net/minecraft/block/BlockCocoa.java.patch index 2a88acfb2..04b3edc43 100644 --- a/patches/minecraft/net/minecraft/block/BlockCocoa.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockCocoa.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/block/BlockCocoa.java +++ ../src-work/minecraft/net/minecraft/block/BlockCocoa.java -@@ -43,13 +43,14 @@ +@@ -44,13 +44,14 @@ { this.func_176500_f(p_180650_1_, p_180650_2_, p_180650_3_); } @@ -17,7 +17,7 @@ } } } -@@ -131,7 +132,14 @@ +@@ -132,7 +133,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_) { @@ -33,7 +33,7 @@ int j = 1; if (i >= 2) -@@ -141,8 +149,9 @@ +@@ -142,8 +150,9 @@ for (int k = 0; k < j; ++k) { diff --git a/patches/minecraft/net/minecraft/block/BlockDoor.java.patch b/patches/minecraft/net/minecraft/block/BlockDoor.java.patch index 67a569880..713f3ef2d 100644 --- a/patches/minecraft/net/minecraft/block/BlockDoor.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockDoor.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/block/BlockDoor.java +++ ../src-work/minecraft/net/minecraft/block/BlockDoor.java -@@ -107,7 +107,7 @@ +@@ -135,7 +135,7 @@ { if (this.field_149764_J == Material.field_151573_f) { @@ -9,7 +9,7 @@ } else { -@@ -175,7 +175,7 @@ +@@ -203,7 +203,7 @@ flag1 = true; } @@ -18,12 +18,19 @@ { p_189540_2_.func_175698_g(p_189540_3_); flag1 = true; -@@ -219,7 +219,7 @@ +@@ -247,13 +247,13 @@ public boolean func_176196_c(World p_176196_1_, BlockPos p_176196_2_) { -- return p_176196_2_.func_177956_o() >= 255 ? false : p_176196_1_.func_180495_p(p_176196_2_.func_177977_b()).func_185896_q() && super.func_176196_c(p_176196_1_, p_176196_2_) && super.func_176196_c(p_176196_1_, p_176196_2_.func_177984_a()); -+ return p_176196_2_.func_177956_o() >= p_176196_1_.func_72800_K() - 1 ? false : p_176196_1_.func_180495_p(p_176196_2_.func_177977_b()).isSideSolid(p_176196_1_, p_176196_2_.func_177977_b(), EnumFacing.UP) && super.func_176196_c(p_176196_1_, p_176196_2_) && super.func_176196_c(p_176196_1_, p_176196_2_.func_177984_a()); +- if (p_176196_2_.func_177956_o() >= 255) ++ if (p_176196_2_.func_177956_o() >= p_176196_1_.func_72800_K() - 1) + { + return false; + } + else + { +- return p_176196_1_.func_180495_p(p_176196_2_.func_177977_b()).func_185896_q() && super.func_176196_c(p_176196_1_, p_176196_2_) && super.func_176196_c(p_176196_1_, p_176196_2_.func_177984_a()); ++ return p_176196_1_.func_180495_p(p_176196_2_.func_177977_b()).func_193401_d(p_176196_1_, p_176196_2_.func_177977_b(), EnumFacing.UP) == BlockFaceShape.SOLID && super.func_176196_c(p_176196_1_, p_176196_2_) && super.func_176196_c(p_176196_1_, p_176196_2_.func_177984_a()); + } } - public EnumPushReaction func_149656_h(IBlockState p_149656_1_) diff --git a/patches/minecraft/net/minecraft/block/BlockDoublePlant.java.patch b/patches/minecraft/net/minecraft/block/BlockDoublePlant.java.patch index 0c4709dca..f34975c0e 100644 --- a/patches/minecraft/net/minecraft/block/BlockDoublePlant.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockDoublePlant.java.patch @@ -37,7 +37,7 @@ 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; -@@ -150,7 +148,6 @@ +@@ -162,7 +160,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_) { @@ -45,7 +45,7 @@ { super.func_180657_a(p_180657_1_, p_180657_2_, p_180657_3_, p_180657_4_, p_180657_5_, p_180657_6_); } -@@ -210,8 +207,6 @@ +@@ -222,8 +219,6 @@ else { p_176489_4_.func_71029_a(StatList.func_188055_a(this)); @@ -54,7 +54,7 @@ return true; } } -@@ -281,6 +276,33 @@ +@@ -293,6 +288,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 873f4336c..2eb9dd2a2 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 -@@ -47,7 +47,7 @@ +@@ -48,7 +48,7 @@ private void func_180683_d(World p_180683_1_, BlockPos p_180683_2_) { @@ -9,7 +9,7 @@ { int i = 32; -@@ -60,7 +60,7 @@ +@@ -61,7 +61,7 @@ p_180683_1_.func_175698_g(p_180683_2_); BlockPos blockpos; diff --git a/patches/minecraft/net/minecraft/block/BlockEnchantmentTable.java.patch b/patches/minecraft/net/minecraft/block/BlockEnchantmentTable.java.patch index ff0179d37..b5eb0aa5b 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 -@@ -63,7 +63,7 @@ +@@ -64,7 +64,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 c2b6229a8..761572d89 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 -@@ -70,7 +70,7 @@ +@@ -71,7 +71,7 @@ public void func_180658_a(World p_180658_1_, BlockPos p_180658_2_, Entity p_180658_3_, float p_180658_4_) { @@ -9,7 +9,7 @@ { this.func_190970_b(p_180658_1_, p_180658_2_); } -@@ -93,7 +93,7 @@ +@@ -94,7 +94,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/BlockFence.java.patch b/patches/minecraft/net/minecraft/block/BlockFence.java.patch index 5142dd8f7..fdae5832b 100644 --- a/patches/minecraft/net/minecraft/block/BlockFence.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockFence.java.patch @@ -1,22 +1,21 @@ --- ../src-base/minecraft/net/minecraft/block/BlockFence.java +++ ../src-work/minecraft/net/minecraft/block/BlockFence.java -@@ -157,7 +157,10 @@ +@@ -165,7 +165,10 @@ public IBlockState func_176221_a(IBlockState p_176221_1_, IBlockAccess p_176221_2_, BlockPos p_176221_3_) { -- return p_176221_1_.func_177226_a(field_176526_a, Boolean.valueOf(this.func_176524_e(p_176221_2_, p_176221_3_.func_177978_c()))).func_177226_a(field_176525_b, Boolean.valueOf(this.func_176524_e(p_176221_2_, p_176221_3_.func_177974_f()))).func_177226_a(field_176527_M, Boolean.valueOf(this.func_176524_e(p_176221_2_, p_176221_3_.func_177968_d()))).func_177226_a(field_176528_N, Boolean.valueOf(this.func_176524_e(p_176221_2_, p_176221_3_.func_177976_e()))); +- return p_176221_1_.func_177226_a(field_176526_a, Boolean.valueOf(this.func_176524_e(p_176221_2_, p_176221_3_.func_177978_c(), EnumFacing.SOUTH))).func_177226_a(field_176525_b, Boolean.valueOf(this.func_176524_e(p_176221_2_, p_176221_3_.func_177974_f(), EnumFacing.WEST))).func_177226_a(field_176527_M, Boolean.valueOf(this.func_176524_e(p_176221_2_, p_176221_3_.func_177968_d(), EnumFacing.NORTH))).func_177226_a(field_176528_N, Boolean.valueOf(this.func_176524_e(p_176221_2_, p_176221_3_.func_177976_e(), EnumFacing.EAST))); + return p_176221_1_.func_177226_a(field_176526_a, canFenceConnectTo(p_176221_2_, p_176221_3_, EnumFacing.NORTH)) -+ .func_177226_a(field_176525_b, canFenceConnectTo(p_176221_2_, p_176221_3_, EnumFacing.EAST)) -+ .func_177226_a(field_176527_M, canFenceConnectTo(p_176221_2_, p_176221_3_, EnumFacing.SOUTH)) -+ .func_177226_a(field_176528_N, canFenceConnectTo(p_176221_2_, p_176221_3_, EnumFacing.WEST)); ++ .func_177226_a(field_176525_b, canFenceConnectTo(p_176221_2_, p_176221_3_, EnumFacing.EAST)) ++ .func_177226_a(field_176527_M, canFenceConnectTo(p_176221_2_, p_176221_3_, EnumFacing.SOUTH)) ++ .func_177226_a(field_176528_N, canFenceConnectTo(p_176221_2_, p_176221_3_, EnumFacing.WEST)); } public IBlockState func_185499_a(IBlockState p_185499_1_, Rotation p_185499_2_) -@@ -192,4 +195,34 @@ - { +@@ -201,6 +204,37 @@ return new BlockStateContainer(this, new IProperty[] {field_176526_a, field_176525_b, field_176528_N, field_176527_M}); } -+ + + /* ======================================== FORGE START ======================================== */ + + @Override @@ -41,9 +40,13 @@ + + private boolean canFenceConnectTo(IBlockAccess world, BlockPos pos, EnumFacing facing) + { -+ Block block = world.func_180495_p(pos.func_177972_a(facing)).func_177230_c(); -+ return block.canBeConnectedTo(world, pos.func_177972_a(facing), facing.func_176734_d()) || func_176524_e(world, pos.func_177972_a(facing)); ++ BlockPos other = pos.func_177972_a(facing); ++ Block block = world.func_180495_p(other).func_177230_c(); ++ return block.canBeConnectedTo(world, other, facing.func_176734_d()) || func_176524_e(world, other, facing.func_176734_d()); + } + + /* ======================================== FORGE END ======================================== */ - } ++ + public BlockFaceShape func_193383_a(IBlockAccess p_193383_1_, IBlockState p_193383_2_, BlockPos p_193383_3_, EnumFacing p_193383_4_) + { + return p_193383_4_ != EnumFacing.UP && p_193383_4_ != EnumFacing.DOWN ? BlockFaceShape.MIDDLE_POLE : BlockFaceShape.CENTER; diff --git a/patches/minecraft/net/minecraft/block/BlockFenceGate.java.patch b/patches/minecraft/net/minecraft/block/BlockFenceGate.java.patch index 2762bbade..39a694401 100644 --- a/patches/minecraft/net/minecraft/block/BlockFenceGate.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockFenceGate.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/block/BlockFenceGate.java +++ ../src-work/minecraft/net/minecraft/block/BlockFenceGate.java -@@ -50,7 +50,7 @@ +@@ -59,7 +59,7 @@ { EnumFacing.Axis enumfacing$axis = ((EnumFacing)p_176221_1_.func_177229_b(field_185512_D)).func_176740_k(); @@ -9,11 +9,10 @@ { p_176221_1_ = p_176221_1_.func_177226_a(field_176467_M, Boolean.valueOf(true)); } -@@ -175,4 +175,21 @@ - { +@@ -192,6 +192,23 @@ return new BlockStateContainer(this, new IProperty[] {field_185512_D, field_176466_a, field_176465_b, field_176467_M}); } -+ + + /* ======================================== FORGE START ======================================== */ + + @Override @@ -30,4 +29,7 @@ + } + + /* ======================================== FORGE END ======================================== */ - } ++ + public BlockFaceShape func_193383_a(IBlockAccess p_193383_1_, IBlockState p_193383_2_, BlockPos p_193383_3_, EnumFacing p_193383_4_) + { + if (p_193383_4_ != EnumFacing.UP && p_193383_4_ != EnumFacing.DOWN) diff --git a/patches/minecraft/net/minecraft/block/BlockFire.java.patch b/patches/minecraft/net/minecraft/block/BlockFire.java.patch index 134226ab3..470603693 100644 --- a/patches/minecraft/net/minecraft/block/BlockFire.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockFire.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/block/BlockFire.java +++ ../src-work/minecraft/net/minecraft/block/BlockFire.java -@@ -38,7 +38,15 @@ +@@ -39,7 +39,15 @@ public IBlockState func_176221_a(IBlockState p_176221_1_, IBlockAccess p_176221_2_, BlockPos p_176221_3_) { @@ -17,7 +17,7 @@ } protected BlockFire() -@@ -91,6 +99,7 @@ +@@ -92,6 +100,7 @@ public void func_180686_a(Block p_180686_1_, int p_180686_2_, int p_180686_3_) { @@ -25,11 +25,11 @@ this.field_149849_a.put(p_180686_1_, Integer.valueOf(p_180686_2_)); this.field_149848_b.put(p_180686_1_, Integer.valueOf(p_180686_3_)); } -@@ -131,13 +140,8 @@ +@@ -132,13 +141,8 @@ } Block block = p_180650_1_.func_180495_p(p_180650_2_.func_177977_b()).func_177230_c(); -- boolean flag = block == Blocks.field_150424_aL; +- boolean flag = block == Blocks.field_150424_aL || block == Blocks.field_189877_df; + boolean flag = block.isFireSource(p_180650_1_, p_180650_2_.func_177977_b(), EnumFacing.UP); - if (p_180650_1_.field_73011_w instanceof WorldProviderEnd && block == Blocks.field_150357_h) @@ -40,7 +40,7 @@ int i = ((Integer)p_180650_3_.func_177229_b(field_176543_a)).intValue(); if (!flag && p_180650_1_.func_72896_J() && this.func_176537_d(p_180650_1_, p_180650_2_) && p_180650_4_.nextFloat() < 0.2F + (float)i * 0.03F) -@@ -158,7 +162,7 @@ +@@ -159,7 +163,7 @@ { if (!this.func_176533_e(p_180650_1_, p_180650_2_)) { @@ -49,7 +49,7 @@ { p_180650_1_.func_175698_g(p_180650_2_); } -@@ -166,7 +170,7 @@ +@@ -167,7 +171,7 @@ return; } @@ -58,7 +58,7 @@ { p_180650_1_.func_175698_g(p_180650_2_); return; -@@ -181,12 +185,12 @@ +@@ -182,12 +186,12 @@ j = -50; } @@ -77,21 +77,21 @@ for (int k = -1; k <= 1; ++k) { -@@ -245,22 +249,30 @@ +@@ -246,22 +250,30 @@ return false; } + @Deprecated // Use Block.getFlammability public int func_176532_c(Block p_176532_1_) { - Integer integer = (Integer)this.field_149848_b.get(p_176532_1_); + Integer integer = this.field_149848_b.get(p_176532_1_); return integer == null ? 0 : integer.intValue(); } -+ @Deprecated // Use Block.getFlammability ++ @Deprecated // Use Block.getFireSpreadSpeed public int func_176534_d(Block p_176534_1_) { - Integer integer = (Integer)this.field_149849_a.get(p_176534_1_); + Integer integer = this.field_149849_a.get(p_176534_1_); return integer == null ? 0 : integer.intValue(); } @@ -109,7 +109,7 @@ if (p_176536_4_.nextInt(p_176536_3_) < i) { IBlockState iblockstate = p_176536_1_.func_180495_p(p_176536_2_); -@@ -292,7 +304,7 @@ +@@ -293,7 +305,7 @@ { for (EnumFacing enumfacing : EnumFacing.values()) { @@ -118,7 +118,7 @@ { return true; } -@@ -313,7 +325,7 @@ +@@ -314,7 +326,7 @@ for (EnumFacing enumfacing : EnumFacing.values()) { @@ -127,7 +127,7 @@ } return i; -@@ -325,9 +337,10 @@ +@@ -326,9 +338,10 @@ return false; } @@ -139,7 +139,7 @@ } public boolean func_176196_c(World p_176196_1_, BlockPos p_176196_2_) -@@ -366,9 +379,9 @@ +@@ -372,9 +385,9 @@ p_180655_2_.func_184134_a((double)((float)p_180655_3_.func_177958_n() + 0.5F), (double)((float)p_180655_3_.func_177956_o() + 0.5F), (double)((float)p_180655_3_.func_177952_p() + 0.5F), SoundEvents.field_187643_bs, SoundCategory.BLOCKS, 1.0F + p_180655_4_.nextFloat(), p_180655_4_.nextFloat() * 0.7F + 0.3F, false); } @@ -151,7 +151,7 @@ { for (int j = 0; j < 2; ++j) { -@@ -379,7 +392,7 @@ +@@ -385,7 +398,7 @@ } } @@ -160,7 +160,7 @@ { for (int k = 0; k < 2; ++k) { -@@ -390,7 +403,7 @@ +@@ -396,7 +409,7 @@ } } @@ -169,7 +169,7 @@ { for (int l = 0; l < 2; ++l) { -@@ -401,7 +414,7 @@ +@@ -407,7 +420,7 @@ } } @@ -178,7 +178,7 @@ { for (int i1 = 0; i1 < 2; ++i1) { -@@ -412,7 +425,7 @@ +@@ -418,7 +431,7 @@ } } @@ -187,11 +187,10 @@ { for (int j1 = 0; j1 < 2; ++j1) { -@@ -460,4 +473,19 @@ - { +@@ -462,6 +475,21 @@ return new BlockStateContainer(this, new IProperty[] {field_176543_a, field_176545_N, field_176546_O, field_176541_P, field_176539_Q, field_176542_R}); } -+ + + /*================================= Forge Start ======================================*/ + /** + * Side sensitive version that calls the block function. @@ -206,4 +205,7 @@ + return world.func_180495_p(pos).func_177230_c().isFlammable(world, pos, face); + } + /*================================= Forge Start ======================================*/ - } ++ + public BlockFaceShape func_193383_a(IBlockAccess p_193383_1_, IBlockState p_193383_2_, BlockPos p_193383_3_, EnumFacing p_193383_4_) + { + return BlockFaceShape.UNDEFINED; diff --git a/patches/minecraft/net/minecraft/block/BlockFlowerPot.java.patch b/patches/minecraft/net/minecraft/block/BlockFlowerPot.java.patch index 0cdce5feb..dd6c21d58 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 -@@ -165,13 +165,6 @@ +@@ -166,13 +166,6 @@ public void func_180663_b(World p_180663_1_, BlockPos p_180663_2_, IBlockState p_180663_3_) { @@ -14,8 +14,8 @@ super.func_180663_b(p_180663_1_, p_180663_2_, p_180663_3_); } -@@ -392,6 +385,31 @@ - return BlockRenderLayer.CUTOUT; +@@ -398,6 +391,31 @@ + return BlockFaceShape.UNDEFINED; } + diff --git a/patches/minecraft/net/minecraft/block/BlockHugeMushroom.java.patch b/patches/minecraft/net/minecraft/block/BlockHugeMushroom.java.patch index c4f0ba396..a1ea62029 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 -@@ -221,6 +221,20 @@ +@@ -222,6 +222,20 @@ return new BlockStateContainer(this, new IProperty[] {field_176380_a}); } diff --git a/patches/minecraft/net/minecraft/block/BlockLadder.java.patch b/patches/minecraft/net/minecraft/block/BlockLadder.java.patch index 4251c5bd5..6fa84a562 100644 --- a/patches/minecraft/net/minecraft/block/BlockLadder.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockLadder.java.patch @@ -1,30 +1,11 @@ --- ../src-base/minecraft/net/minecraft/block/BlockLadder.java +++ ../src-work/minecraft/net/minecraft/block/BlockLadder.java -@@ -61,7 +61,10 @@ - - public boolean func_176196_c(World p_176196_1_, BlockPos p_176196_2_) - { -- return p_176196_1_.func_180495_p(p_176196_2_.func_177976_e()).func_185915_l() ? true : (p_176196_1_.func_180495_p(p_176196_2_.func_177974_f()).func_185915_l() ? true : (p_176196_1_.func_180495_p(p_176196_2_.func_177978_c()).func_185915_l() ? true : p_176196_1_.func_180495_p(p_176196_2_.func_177968_d()).func_185915_l())); -+ return p_176196_1_.func_180495_p(p_176196_2_.func_177976_e()).isSideSolid(p_176196_1_, p_176196_2_.func_177976_e(), EnumFacing.EAST) || -+ p_176196_1_.func_180495_p(p_176196_2_.func_177974_f()).isSideSolid(p_176196_1_, p_176196_2_.func_177974_f(), EnumFacing.WEST) || -+ p_176196_1_.func_180495_p(p_176196_2_.func_177978_c()).isSideSolid(p_176196_1_, p_176196_2_.func_177978_c(), EnumFacing.SOUTH) || -+ p_176196_1_.func_180495_p(p_176196_2_.func_177968_d()).isSideSolid(p_176196_1_, p_176196_2_.func_177968_d(), EnumFacing.NORTH); - } - - 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_) -@@ -99,7 +102,7 @@ - - protected boolean func_176381_b(World p_176381_1_, BlockPos p_176381_2_, EnumFacing p_176381_3_) - { -- return p_176381_1_.func_180495_p(p_176381_2_.func_177972_a(p_176381_3_.func_176734_d())).func_185915_l(); -+ return p_176381_1_.func_180495_p(p_176381_2_.func_177972_a(p_176381_3_.func_176734_d())).isSideSolid(p_176381_1_, p_176381_2_.func_177972_a(p_176381_3_.func_176734_d()), p_176381_3_); - } - - public IBlockState func_176203_a(int p_176203_1_) -@@ -139,4 +142,6 @@ - { +@@ -158,6 +158,8 @@ return new BlockStateContainer(this, new IProperty[] {field_176382_a}); } -+ + + @Override public boolean isLadder(IBlockState state, IBlockAccess world, BlockPos pos, EntityLivingBase entity) { return true; } - } ++ + public BlockFaceShape func_193383_a(IBlockAccess p_193383_1_, IBlockState p_193383_2_, BlockPos p_193383_3_, EnumFacing p_193383_4_) + { + return BlockFaceShape.UNDEFINED; diff --git a/patches/minecraft/net/minecraft/block/BlockLever.java.patch b/patches/minecraft/net/minecraft/block/BlockLever.java.patch index 2768dab85..398c85a70 100644 --- a/patches/minecraft/net/minecraft/block/BlockLever.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockLever.java.patch @@ -1,7 +1,7 @@ --- ../src-base/minecraft/net/minecraft/block/BlockLever.java +++ ../src-work/minecraft/net/minecraft/block/BlockLever.java -@@ -296,6 +296,12 @@ - return new BlockStateContainer(this, new IProperty[] {field_176360_a, field_176359_b}); +@@ -309,6 +309,12 @@ + return BlockFaceShape.UNDEFINED; } + diff --git a/patches/minecraft/net/minecraft/block/BlockMushroom.java.patch b/patches/minecraft/net/minecraft/block/BlockMushroom.java.patch index ff671be04..103ba635c 100644 --- a/patches/minecraft/net/minecraft/block/BlockMushroom.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockMushroom.java.patch @@ -1,11 +1,11 @@ --- ../src-base/minecraft/net/minecraft/block/BlockMushroom.java +++ ../src-work/minecraft/net/minecraft/block/BlockMushroom.java -@@ -78,7 +78,7 @@ - if (p_180671_2_.func_177956_o() >= 0 && p_180671_2_.func_177956_o() < 256) - { - IBlockState iblockstate = p_180671_1_.func_180495_p(p_180671_2_.func_177977_b()); -- return iblockstate.func_177230_c() == Blocks.field_150391_bh ? true : (iblockstate.func_177230_c() == Blocks.field_150346_d && iblockstate.func_177229_b(BlockDirt.field_176386_a) == BlockDirt.DirtType.PODZOL ? true : p_180671_1_.func_175699_k(p_180671_2_) < 13 && this.func_185514_i(iblockstate)); -+ return iblockstate.func_177230_c() == Blocks.field_150391_bh ? true : (iblockstate.func_177230_c() == Blocks.field_150346_d && iblockstate.func_177229_b(BlockDirt.field_176386_a) == BlockDirt.DirtType.PODZOL ? true : p_180671_1_.func_175699_k(p_180671_2_) < 13 && iblockstate.func_177230_c().canSustainPlant(iblockstate, p_180671_1_, p_180671_2_.func_177977_b(), net.minecraft.util.EnumFacing.UP, this)); +@@ -89,7 +89,7 @@ + } + else + { +- return p_180671_1_.func_175699_k(p_180671_2_) < 13 && this.func_185514_i(iblockstate); ++ return p_180671_1_.func_175699_k(p_180671_2_) < 13 && iblockstate.func_177230_c().canSustainPlant(iblockstate, p_180671_1_, p_180671_2_.func_177977_b(), net.minecraft.util.EnumFacing.UP, this); + } } else - { diff --git a/patches/minecraft/net/minecraft/block/BlockNote.java.patch b/patches/minecraft/net/minecraft/block/BlockNote.java.patch index af8e8f711..654716d83 100644 --- a/patches/minecraft/net/minecraft/block/BlockNote.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockNote.java.patch @@ -20,4 +20,4 @@ + p_189539_5_ = e.getVanillaNoteId(); float f = (float)Math.pow(2.0D, (double)(p_189539_5_ - 12) / 12.0D); p_189539_2_.func_184133_a((EntityPlayer)null, p_189539_3_, this.func_185576_e(p_189539_4_), SoundCategory.RECORDS, 3.0F, f); - p_189539_2_.func_175688_a(EnumParticleTypes.NOTE, (double)p_189539_3_.func_177958_n() + 0.5D, (double)p_189539_3_.func_177956_o() + 1.2D, (double)p_189539_3_.func_177952_p() + 0.5D, (double)p_189539_5_ / 24.0D, 0.0D, 0.0D, new int[0]); + p_189539_2_.func_175688_a(EnumParticleTypes.NOTE, (double)p_189539_3_.func_177958_n() + 0.5D, (double)p_189539_3_.func_177956_o() + 1.2D, (double)p_189539_3_.func_177952_p() + 0.5D, (double)p_189539_5_ / 24.0D, 0.0D, 0.0D); diff --git a/patches/minecraft/net/minecraft/block/BlockOre.java.patch b/patches/minecraft/net/minecraft/block/BlockOre.java.patch index 15b1046bc..0c839576b 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 -@@ -59,34 +59,39 @@ +@@ -78,34 +78,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 b0a4b8ec2..e5ea2d0c0 100644 --- a/patches/minecraft/net/minecraft/block/BlockPane.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockPane.java.patch @@ -1,22 +1,9 @@ --- ../src-base/minecraft/net/minecraft/block/BlockPane.java +++ ../src-work/minecraft/net/minecraft/block/BlockPane.java -@@ -111,7 +111,10 @@ - - public IBlockState func_176221_a(IBlockState p_176221_1_, IBlockAccess p_176221_2_, BlockPos p_176221_3_) - { -- return p_176221_1_.func_177226_a(field_176241_b, Boolean.valueOf(this.func_150098_a(p_176221_2_.func_180495_p(p_176221_3_.func_177978_c()).func_177230_c()))).func_177226_a(field_176243_N, Boolean.valueOf(this.func_150098_a(p_176221_2_.func_180495_p(p_176221_3_.func_177968_d()).func_177230_c()))).func_177226_a(field_176244_O, Boolean.valueOf(this.func_150098_a(p_176221_2_.func_180495_p(p_176221_3_.func_177976_e()).func_177230_c()))).func_177226_a(field_176242_M, Boolean.valueOf(this.func_150098_a(p_176221_2_.func_180495_p(p_176221_3_.func_177974_f()).func_177230_c()))); -+ return p_176221_1_.func_177226_a(field_176241_b, canPaneConnectTo(p_176221_2_, p_176221_3_, EnumFacing.NORTH)) -+ .func_177226_a(field_176243_N, canPaneConnectTo(p_176221_2_, p_176221_3_, EnumFacing.SOUTH)) -+ .func_177226_a(field_176244_O, canPaneConnectTo(p_176221_2_, p_176221_3_, EnumFacing.WEST)) -+ .func_177226_a(field_176242_M, canPaneConnectTo(p_176221_2_, p_176221_3_, EnumFacing.EAST)); - } - - public Item func_180660_a(IBlockState p_180660_1_, Random p_180660_2_, int p_180660_3_) -@@ -188,4 +191,21 @@ - { +@@ -197,6 +197,24 @@ return new BlockStateContainer(this, new IProperty[] {field_176241_b, field_176242_M, field_176244_O, field_176243_N}); } -+ + + /* ======================================== FORGE START ======================================== */ + + @Override @@ -28,9 +15,13 @@ + + public boolean canPaneConnectTo(IBlockAccess world, BlockPos pos, EnumFacing dir) + { -+ IBlockState state = world.func_180495_p(pos.func_177972_a(dir)); -+ return state.func_177230_c().canBeConnectedTo(world, pos.func_177972_a(dir), dir.func_176734_d()) || func_150098_a(state.func_177230_c()) || state.isSideSolid(world, pos.func_177972_a(dir), dir.func_176734_d()); ++ BlockPos other = pos.func_177972_a(dir); ++ IBlockState state = world.func_180495_p(other); ++ return state.func_177230_c().canBeConnectedTo(world, other, dir.func_176734_d()) || func_193393_b(world, state, other, dir.func_176734_d()); + } + + /* ======================================== FORGE END ======================================== */ - } ++ + public BlockFaceShape func_193383_a(IBlockAccess p_193383_1_, IBlockState p_193383_2_, BlockPos p_193383_3_, EnumFacing p_193383_4_) + { + return p_193383_4_ != EnumFacing.UP && p_193383_4_ != EnumFacing.DOWN ? BlockFaceShape.MIDDLE_POLE_THIN : BlockFaceShape.CENTER_SMALL; diff --git a/patches/minecraft/net/minecraft/block/BlockPistonBase.java.patch b/patches/minecraft/net/minecraft/block/BlockPistonBase.java.patch index 7acd5d449..e265c2672 100644 --- a/patches/minecraft/net/minecraft/block/BlockPistonBase.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockPistonBase.java.patch @@ -1,15 +1,15 @@ --- ../src-base/minecraft/net/minecraft/block/BlockPistonBase.java +++ ../src-work/minecraft/net/minecraft/block/BlockPistonBase.java -@@ -240,7 +240,7 @@ +@@ -241,7 +241,7 @@ } } -- if (!flag1 && iblockstate.func_185904_a() != Material.field_151579_a && func_185646_a(iblockstate, p_189539_2_, blockpos, enumfacing.func_176734_d(), false) && (iblockstate.func_185905_o() == EnumPushReaction.NORMAL || block == Blocks.field_150331_J || block == Blocks.field_150320_F)) -+ if (!flag1 && !iblockstate.func_177230_c().isAir(iblockstate, p_189539_2_, p_189539_3_) && func_185646_a(iblockstate, p_189539_2_, blockpos, enumfacing.func_176734_d(), false) && (iblockstate.func_185905_o() == EnumPushReaction.NORMAL || block == Blocks.field_150331_J || block == Blocks.field_150320_F)) +- if (!flag1 && iblockstate.func_185904_a() != Material.field_151579_a && func_185646_a(iblockstate, p_189539_2_, blockpos, enumfacing.func_176734_d(), false, enumfacing) && (iblockstate.func_185905_o() == EnumPushReaction.NORMAL || block == Blocks.field_150331_J || block == Blocks.field_150320_F)) ++ if (!flag1 && !iblockstate.func_177230_c().isAir(iblockstate, p_189539_2_, blockpos) && func_185646_a(iblockstate, p_189539_2_, blockpos, enumfacing.func_176734_d(), false, enumfacing) && (iblockstate.func_185905_o() == EnumPushReaction.NORMAL || block == Blocks.field_150331_J || block == Blocks.field_150320_F)) { this.func_176319_a(p_189539_2_, p_189539_3_, enumfacing, false); } -@@ -306,7 +306,7 @@ +@@ -307,7 +307,7 @@ return false; } @@ -18,9 +18,9 @@ } else { -@@ -352,7 +352,9 @@ +@@ -353,7 +353,9 @@ { - BlockPos blockpos1 = (BlockPos)list2.get(j); + BlockPos blockpos1 = list2.get(j); IBlockState iblockstate = p_176319_1_.func_180495_p(blockpos1); - iblockstate.func_177230_c().func_176226_b(p_176319_1_, blockpos1, iblockstate, 0); + // Forge: With our change to how snowballs are dropped this needs to disallow to mimic vanilla behavior. @@ -29,15 +29,17 @@ p_176319_1_.func_180501_a(blockpos1, Blocks.field_150350_a.func_176223_P(), 4); --k; aiblockstate[k] = iblockstate; -@@ -432,4 +434,11 @@ - { +@@ -434,6 +436,13 @@ return new BlockStateContainer(this, new IProperty[] {field_176387_N, field_176320_b}); } -+ + + /* ======================================== FORGE START =====================================*/ + public boolean rotateBlock(World world, BlockPos pos, EnumFacing axis) + { + IBlockState state = world.func_180495_p(pos); + return !state.func_177229_b(field_176320_b) && super.rotateBlock(world, pos, axis); + } - } ++ + public BlockFaceShape func_193383_a(IBlockAccess p_193383_1_, IBlockState p_193383_2_, BlockPos p_193383_3_, EnumFacing p_193383_4_) + { + p_193383_2_ = this.func_176221_a(p_193383_2_, p_193383_1_, p_193383_3_); diff --git a/patches/minecraft/net/minecraft/block/BlockPistonMoving.java.patch b/patches/minecraft/net/minecraft/block/BlockPistonMoving.java.patch index 33ebf9556..ec3b7e1ff 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 -@@ -115,7 +115,7 @@ +@@ -116,7 +116,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,7 +9,7 @@ { TileEntityPiston tileentitypiston = this.func_185589_c(p_180653_1_, p_180653_2_); -@@ -125,6 +125,7 @@ +@@ -126,6 +126,7 @@ iblockstate.func_177230_c().func_176226_b(p_180653_1_, p_180653_2_, iblockstate, 0); } } @@ -17,11 +17,10 @@ } @Nullable -@@ -208,4 +209,16 @@ - { +@@ -210,6 +211,18 @@ return new BlockStateContainer(this, new IProperty[] {field_176426_a, field_176425_b}); } -+ + + @Override + public java.util.List getDrops(IBlockAccess world, BlockPos pos, IBlockState state, int fortune) + { @@ -33,4 +32,7 @@ + } + return new java.util.ArrayList(); + } - } ++ + public BlockFaceShape func_193383_a(IBlockAccess p_193383_1_, IBlockState p_193383_2_, BlockPos p_193383_3_, EnumFacing p_193383_4_) + { + return BlockFaceShape.UNDEFINED; diff --git a/patches/minecraft/net/minecraft/block/BlockPumpkin.java.patch b/patches/minecraft/net/minecraft/block/BlockPumpkin.java.patch index 3b0aad014..aaed6d002 100644 --- a/patches/minecraft/net/minecraft/block/BlockPumpkin.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockPumpkin.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/block/BlockPumpkin.java +++ ../src-work/minecraft/net/minecraft/block/BlockPumpkin.java -@@ -124,7 +124,7 @@ +@@ -136,7 +136,7 @@ public boolean func_176196_c(World p_176196_1_, BlockPos p_176196_2_) { diff --git a/patches/minecraft/net/minecraft/block/BlockQuartz.java.patch b/patches/minecraft/net/minecraft/block/BlockQuartz.java.patch index dbf07920f..8d1713b45 100644 --- a/patches/minecraft/net/minecraft/block/BlockQuartz.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockQuartz.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/block/BlockQuartz.java +++ ../src-work/minecraft/net/minecraft/block/BlockQuartz.java -@@ -110,6 +110,26 @@ +@@ -111,6 +111,26 @@ return new BlockStateContainer(this, new IProperty[] {field_176335_a}); } diff --git a/patches/minecraft/net/minecraft/block/BlockRailBase.java.patch b/patches/minecraft/net/minecraft/block/BlockRailBase.java.patch index 7dc25fc08..f3fbfbf5e 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 -@@ -33,7 +33,7 @@ +@@ -34,7 +34,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_) -@@ -56,7 +56,7 @@ +@@ -57,7 +57,7 @@ public AxisAlignedBB func_185496_a(IBlockState p_185496_1_, IBlockAccess p_185496_2_, BlockPos p_185496_3_) { @@ -18,7 +18,7 @@ return blockrailbase$enumraildirection != null && blockrailbase$enumraildirection.func_177018_c() ? field_190959_b : field_185590_a; } -@@ -67,7 +67,7 @@ +@@ -73,7 +73,7 @@ public boolean func_176196_c(World p_176196_1_, BlockPos p_176196_2_) { @@ -27,7 +27,7 @@ } public void func_176213_c(World p_176213_1_, BlockPos p_176213_2_, IBlockState p_176213_3_) -@@ -87,27 +87,27 @@ +@@ -93,27 +93,27 @@ { if (!p_189540_2_.field_72995_K) { @@ -61,7 +61,7 @@ { flag = true; } -@@ -148,7 +148,7 @@ +@@ -154,7 +154,7 @@ { super.func_180663_b(p_180663_1_, p_180663_2_, p_180663_3_); @@ -70,7 +70,7 @@ { p_180663_1_.func_175685_c(p_180663_2_.func_177984_a(), this, false); } -@@ -160,8 +160,101 @@ +@@ -166,8 +166,101 @@ } } @@ -172,7 +172,7 @@ public static enum EnumRailDirection implements IStringSerializable { NORTH_SOUTH(0, "north_south"), -@@ -232,6 +325,7 @@ +@@ -238,6 +331,7 @@ private IBlockState field_180366_e; private final boolean field_150656_f; private final List field_150657_g = Lists.newArrayList(); @@ -180,7 +180,7 @@ public Rail(World p_i45739_2_, BlockPos p_i45739_3_, IBlockState p_i45739_4_) { -@@ -239,8 +333,9 @@ +@@ -245,8 +339,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(); @@ -192,7 +192,7 @@ this.func_180360_a(blockrailbase$enumraildirection); } -@@ -432,7 +527,7 @@ +@@ -438,7 +533,7 @@ } } @@ -201,7 +201,7 @@ { if (BlockRailBase.func_176562_d(this.field_150660_b, blockpos.func_177984_a())) { -@@ -445,7 +540,7 @@ +@@ -451,7 +546,7 @@ } } @@ -210,7 +210,7 @@ { if (BlockRailBase.func_176562_d(this.field_150660_b, blockpos3.func_177984_a())) { -@@ -588,7 +683,7 @@ +@@ -594,7 +689,7 @@ } } @@ -219,7 +219,7 @@ { if (BlockRailBase.func_176562_d(this.field_150660_b, blockpos.func_177984_a())) { -@@ -601,7 +696,7 @@ +@@ -607,7 +702,7 @@ } } diff --git a/patches/minecraft/net/minecraft/block/BlockRailDetector.java.patch b/patches/minecraft/net/minecraft/block/BlockRailDetector.java.patch index 13579be5f..e65cfd400 100644 --- a/patches/minecraft/net/minecraft/block/BlockRailDetector.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockRailDetector.java.patch @@ -1,11 +1,11 @@ --- ../src-base/minecraft/net/minecraft/block/BlockRailDetector.java +++ ../src-work/minecraft/net/minecraft/block/BlockRailDetector.java -@@ -156,6 +156,8 @@ +@@ -163,6 +163,8 @@ { if (((Boolean)p_180641_1_.func_177229_b(field_176574_M)).booleanValue()) { + List carts = this.func_176571_a(p_180641_2_, p_180641_3_, EntityMinecart.class); + if (!carts.isEmpty() && carts.get(0).getComparatorLevel() > -1) return carts.get(0).getComparatorLevel(); - List list = this.func_176571_a(p_180641_2_, p_180641_3_, EntityMinecartCommandBlock.class, new Predicate[0]); + List list = this.func_176571_a(p_180641_2_, p_180641_3_, EntityMinecartCommandBlock.class); if (!list.isEmpty()) diff --git a/patches/minecraft/net/minecraft/block/BlockRedstoneComparator.java.patch b/patches/minecraft/net/minecraft/block/BlockRedstoneComparator.java.patch index f9a9309fb..b11b92ca0 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 -@@ -311,6 +311,21 @@ +@@ -319,6 +319,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); } diff --git a/patches/minecraft/net/minecraft/block/BlockRedstoneDiode.java.patch b/patches/minecraft/net/minecraft/block/BlockRedstoneDiode.java.patch index 7225c6991..4fc3feed7 100644 --- a/patches/minecraft/net/minecraft/block/BlockRedstoneDiode.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockRedstoneDiode.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/block/BlockRedstoneDiode.java +++ ../src-work/minecraft/net/minecraft/block/BlockRedstoneDiode.java -@@ -204,6 +204,8 @@ +@@ -227,6 +227,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()); @@ -9,11 +9,10 @@ p_176400_1_.func_190524_a(blockpos, this, p_176400_2_); p_176400_1_.func_175695_a(blockpos, this, enumfacing); } -@@ -275,4 +277,23 @@ - { +@@ -307,6 +309,25 @@ return BlockRenderLayer.CUTOUT; } -+ + + /* ======================================== FORGE START =====================================*/ + @Override + public boolean rotateBlock(World world, BlockPos pos, EnumFacing axis) @@ -32,4 +31,7 @@ + } + return false; + } - } ++ + public BlockFaceShape func_193383_a(IBlockAccess p_193383_1_, IBlockState p_193383_2_, BlockPos p_193383_3_, EnumFacing p_193383_4_) + { + return p_193383_4_ == EnumFacing.DOWN ? BlockFaceShape.SOLID : BlockFaceShape.UNDEFINED; diff --git a/patches/minecraft/net/minecraft/block/BlockRedstoneWire.java.patch b/patches/minecraft/net/minecraft/block/BlockRedstoneWire.java.patch index 61c4ec80e..403ed34da 100644 --- a/patches/minecraft/net/minecraft/block/BlockRedstoneWire.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockRedstoneWire.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/block/BlockRedstoneWire.java +++ ../src-work/minecraft/net/minecraft/block/BlockRedstoneWire.java -@@ -98,15 +98,15 @@ +@@ -99,15 +99,15 @@ BlockPos blockpos = p_176341_2_.func_177972_a(p_176341_3_); IBlockState iblockstate = p_176341_1_.func_180495_p(p_176341_2_.func_177972_a(p_176341_3_)); @@ -19,13 +19,16 @@ { if (iblockstate.func_185898_k()) { -@@ -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(); -- return !flag1 && flag && func_176340_e(p_176339_1_, blockpos.func_177984_a()) ? true : (func_176343_a(iblockstate, p_176339_3_) ? true : (iblockstate.func_177230_c() == Blocks.field_150416_aS && iblockstate.func_177229_b(BlockRedstoneDiode.field_185512_D) == p_176339_3_ ? true : !flag && func_176340_e(p_176339_1_, blockpos.func_177977_b()))); -+ return !flag1 && flag && func_176340_e(p_176339_1_, blockpos.func_177984_a()) ? true : (canConnectTo(iblockstate, p_176339_3_, p_176339_1_, p_176339_2_) ? true : (iblockstate.func_177230_c() == Blocks.field_150416_aS && iblockstate.func_177229_b(BlockRedstoneDiode.field_185512_D) == p_176339_3_ ? true : !flag && func_176340_e(p_176339_1_, blockpos.func_177977_b()))); - } +@@ -414,7 +414,7 @@ + { + return true; + } +- else if (func_176343_a(iblockstate, p_176339_3_)) ++ else if (canConnectTo(iblockstate, p_176339_3_, p_176339_1_, p_176339_2_)) + { + return true; + } +@@ -430,16 +430,11 @@ protected static boolean func_176340_e(IBlockAccess p_176340_0_, BlockPos p_176340_1_) { @@ -34,7 +37,7 @@ } - protected static boolean func_176346_d(IBlockState p_176346_0_) -+ protected static boolean canConnectTo(IBlockState p_176343_0_, @Nullable EnumFacing p_176343_1_, IBlockAccess world, BlockPos pos ) ++ protected static boolean canConnectTo(IBlockState p_176343_0_, @Nullable EnumFacing p_176343_1_, IBlockAccess world, BlockPos pos) { - return func_176343_a(p_176346_0_, (EnumFacing)null); - } @@ -44,12 +47,12 @@ Block block = p_176343_0_.func_177230_c(); if (block == Blocks.field_150488_af) -@@ -436,7 +431,7 @@ +@@ -457,7 +452,7 @@ } else { -- 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_); +- 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_); } } diff --git a/patches/minecraft/net/minecraft/block/BlockReed.java.patch b/patches/minecraft/net/minecraft/block/BlockReed.java.patch index ac9844d7e..7cfa88f62 100644 --- a/patches/minecraft/net/minecraft/block/BlockReed.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockReed.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/block/BlockReed.java +++ ../src-work/minecraft/net/minecraft/block/BlockReed.java -@@ -20,7 +20,7 @@ +@@ -21,7 +21,7 @@ import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -9,7 +9,7 @@ { public static final PropertyInteger field_176355_a = PropertyInteger.func_177719_a("age", 0, 15); protected static final AxisAlignedBB field_185701_b = new AxisAlignedBB(0.125D, 0.0D, 0.125D, 0.875D, 1.0D, 0.875D); -@@ -54,6 +54,8 @@ +@@ -55,6 +55,8 @@ { int j = ((Integer)p_180650_3_.func_177229_b(field_176355_a)).intValue(); @@ -18,7 +18,7 @@ if (j == 15) { p_180650_1_.func_175656_a(p_180650_2_.func_177984_a(), this.func_176223_P()); -@@ -63,6 +65,8 @@ +@@ -64,6 +66,8 @@ { p_180650_1_.func_180501_a(p_180650_2_, p_180650_3_.func_177226_a(field_176355_a, Integer.valueOf(j + 1)), 4); } @@ -27,7 +27,7 @@ } } } -@@ -70,7 +74,9 @@ +@@ -71,7 +75,9 @@ public boolean func_176196_c(World p_176196_1_, BlockPos p_176196_2_) { @@ -38,7 +38,7 @@ if (block == this) { -@@ -164,6 +170,17 @@ +@@ -165,6 +171,17 @@ return ((Integer)p_176201_1_.func_177229_b(field_176355_a)).intValue(); } diff --git a/patches/minecraft/net/minecraft/block/BlockSapling.java.patch b/patches/minecraft/net/minecraft/block/BlockSapling.java.patch index 752aa85b6..bddb0fa30 100644 --- a/patches/minecraft/net/minecraft/block/BlockSapling.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockSapling.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/block/BlockSapling.java +++ ../src-work/minecraft/net/minecraft/block/BlockSapling.java -@@ -77,6 +77,7 @@ +@@ -76,6 +76,7 @@ public void func_176476_e(World p_176476_1_, BlockPos p_176476_2_, IBlockState p_176476_3_, Random p_176476_4_) { diff --git a/patches/minecraft/net/minecraft/block/BlockSkull.java.patch b/patches/minecraft/net/minecraft/block/BlockSkull.java.patch index 4faba1b44..94524a2a6 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 -@@ -126,10 +126,6 @@ +@@ -128,10 +128,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) -@@ -137,13 +133,18 @@ +@@ -139,13 +135,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()) { -@@ -152,7 +153,7 @@ +@@ -154,7 +155,7 @@ if (tileentity instanceof TileEntitySkull) { TileEntitySkull tileentityskull = (TileEntitySkull)tileentity; @@ -40,7 +40,7 @@ if (tileentityskull.func_145904_a() == 3 && tileentityskull.func_152108_a() != null) { -@@ -162,12 +163,11 @@ +@@ -164,12 +165,11 @@ itemstack.func_77978_p().func_74782_a("SkullOwner", nbttagcompound); } diff --git a/patches/minecraft/net/minecraft/block/BlockSlab.java.patch b/patches/minecraft/net/minecraft/block/BlockSlab.java.patch index c9c768f0a..2b1c6a50d 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 -@@ -56,6 +56,19 @@ +@@ -80,6 +80,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); -@@ -83,13 +96,14 @@ +@@ -115,7 +128,7 @@ { return false; } @@ -29,8 +29,9 @@ { IBlockState iblockstate = p_176225_2_.func_180495_p(p_176225_3_.func_177972_a(p_176225_4_)); boolean flag = func_185675_i(iblockstate) && iblockstate.func_177229_b(field_176554_a) == BlockSlab.EnumBlockHalf.TOP; - boolean flag1 = func_185675_i(p_176225_1_) && p_176225_1_.func_177229_b(field_176554_a) == BlockSlab.EnumBlockHalf.TOP; - return flag1 ? (p_176225_4_ == EnumFacing.DOWN ? true : (p_176225_4_ == EnumFacing.UP && super.func_176225_a(p_176225_1_, p_176225_2_, p_176225_3_, p_176225_4_) ? true : !func_185675_i(iblockstate) || !flag)) : (p_176225_4_ == EnumFacing.UP ? true : (p_176225_4_ == EnumFacing.DOWN && super.func_176225_a(p_176225_1_, p_176225_2_, p_176225_3_, p_176225_4_) ? true : !func_185675_i(iblockstate) || flag)); +@@ -149,6 +162,7 @@ + return !func_185675_i(iblockstate) || flag; + } } + return super.func_176225_a(p_176225_1_, p_176225_2_, p_176225_3_, p_176225_4_); } diff --git a/patches/minecraft/net/minecraft/block/BlockSnow.java.patch b/patches/minecraft/net/minecraft/block/BlockSnow.java.patch index ae6c576ec..a4fa871d3 100644 --- a/patches/minecraft/net/minecraft/block/BlockSnow.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockSnow.java.patch @@ -1,15 +1,15 @@ --- ../src-base/minecraft/net/minecraft/block/BlockSnow.java +++ ../src-work/minecraft/net/minecraft/block/BlockSnow.java -@@ -75,7 +75,7 @@ - { - 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() == 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_, BlockPos p_189540_5_) -@@ -87,7 +87,6 @@ +@@ -85,7 +85,7 @@ + if (block != Blocks.field_150432_aD && block != Blocks.field_150403_cj && block != Blocks.field_180401_cv) + { + BlockFaceShape blockfaceshape = iblockstate.func_193401_d(p_176196_1_, p_176196_2_.func_177977_b(), EnumFacing.UP); +- return blockfaceshape == BlockFaceShape.SOLID || iblockstate.func_185904_a() == Material.field_151584_j || block == this && ((Integer)iblockstate.func_177229_b(field_176315_a)).intValue() == 8; ++ return blockfaceshape == BlockFaceShape.SOLID || iblockstate.func_177230_c().isLeaves(iblockstate, p_176196_1_, p_176196_2_.func_177977_b()) || block == this && ((Integer)iblockstate.func_177229_b(field_176315_a)).intValue() == 8; + } + else + { +@@ -102,7 +102,6 @@ { if (!this.func_176196_c(p_176314_1_, p_176314_2_)) { @@ -17,7 +17,7 @@ p_176314_1_.func_175698_g(p_176314_2_); return false; } -@@ -99,9 +98,8 @@ +@@ -114,9 +113,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_, ItemStack p_180657_6_) { @@ -28,7 +28,7 @@ } public Item func_180660_a(IBlockState p_180660_1_, Random p_180660_2_, int p_180660_3_) -@@ -111,14 +109,13 @@ +@@ -126,14 +124,13 @@ public int func_149745_a(Random p_149745_1_) { @@ -44,7 +44,7 @@ p_180650_1_.func_175698_g(p_180650_2_); } } -@@ -152,6 +149,8 @@ +@@ -167,6 +164,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 b50c431eb..648edc76d 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 -@@ -447,6 +447,29 @@ +@@ -483,6 +483,29 @@ return new BlockStateContainer(this, new IProperty[] {field_176309_a, field_176308_b, field_176310_M}); } diff --git a/patches/minecraft/net/minecraft/block/BlockTorch.java.patch b/patches/minecraft/net/minecraft/block/BlockTorch.java.patch index fa4280fdb..7bba68256 100644 --- a/patches/minecraft/net/minecraft/block/BlockTorch.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockTorch.java.patch @@ -1,47 +1,23 @@ --- ../src-base/minecraft/net/minecraft/block/BlockTorch.java +++ ../src-work/minecraft/net/minecraft/block/BlockTorch.java -@@ -81,14 +81,14 @@ +@@ -82,18 +82,8 @@ private boolean func_176594_d(World p_176594_1_, BlockPos p_176594_2_) { +- Block block = p_176594_1_.func_180495_p(p_176594_2_).func_177230_c(); +- boolean flag = block == Blocks.field_185775_db || block == Blocks.field_150428_aP; +- - if (p_176594_1_.func_180495_p(p_176594_2_).func_185896_q()) +- { +- return !flag; +- } +- else +- { +- boolean flag1 = block instanceof BlockFence || block == Blocks.field_150359_w || block == Blocks.field_150463_bK || block == Blocks.field_150399_cn; +- return flag1 && !flag; +- } + IBlockState state = p_176594_1_.func_180495_p(p_176594_2_); -+ if (state.isSideSolid(p_176594_1_, p_176594_2_, EnumFacing.UP)) - { - return true; - } - else - { -- Block block = p_176594_1_.func_180495_p(p_176594_2_).func_177230_c(); -- return block instanceof BlockFence || block == Blocks.field_150359_w || block == Blocks.field_150463_bK || block == Blocks.field_150399_cn; -+ return state.func_177230_c().canPlaceTorchOnTop(state, p_176594_1_, p_176594_2_); - } ++ return state.func_177230_c().canPlaceTorchOnTop(state, p_176594_1_, p_176594_2_); } -@@ -109,7 +109,7 @@ - { - BlockPos blockpos = p_176595_2_.func_177972_a(p_176595_3_.func_176734_d()); - boolean flag = p_176595_3_.func_176740_k().func_176722_c(); -- return flag && p_176595_1_.func_175677_d(blockpos, true) || p_176595_3_.equals(EnumFacing.UP) && this.func_176594_d(p_176595_1_, blockpos); -+ return flag && p_176595_1_.isSideSolid(blockpos, p_176595_3_, true) || p_176595_3_.equals(EnumFacing.UP) && this.func_176594_d(p_176595_1_, blockpos); - } - - 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_) -@@ -122,7 +122,7 @@ - { - for (EnumFacing enumfacing : EnumFacing.Plane.HORIZONTAL) - { -- if (p_180642_1_.func_175677_d(p_180642_2_.func_177972_a(enumfacing.func_176734_d()), true)) -+ if (p_180642_1_.isSideSolid(p_180642_2_.func_177972_a(enumfacing.func_176734_d()), enumfacing, true)) - { - return this.func_176223_P().func_177226_a(field_176596_a, enumfacing); - } -@@ -155,7 +155,7 @@ - EnumFacing enumfacing1 = enumfacing.func_176734_d(); - boolean flag = false; - -- if (enumfacing$axis.func_176722_c() && !p_176592_1_.func_175677_d(p_176592_2_.func_177972_a(enumfacing1), true)) -+ if (enumfacing$axis.func_176722_c() && !p_176592_1_.isSideSolid(p_176592_2_.func_177972_a(enumfacing1), enumfacing, true)) - { - flag = true; - } + public boolean func_176196_c(World p_176196_1_, BlockPos p_176196_2_) diff --git a/patches/minecraft/net/minecraft/block/BlockTrapDoor.java.patch b/patches/minecraft/net/minecraft/block/BlockTrapDoor.java.patch index 11144cd92..f67ffbb68 100644 --- a/patches/minecraft/net/minecraft/block/BlockTrapDoor.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockTrapDoor.java.patch @@ -1,7 +1,7 @@ --- ../src-base/minecraft/net/minecraft/block/BlockTrapDoor.java +++ ../src-work/minecraft/net/minecraft/block/BlockTrapDoor.java -@@ -244,6 +244,18 @@ - return new BlockStateContainer(this, new IProperty[] {field_176284_a, field_176283_b, field_176285_M}); +@@ -250,6 +250,18 @@ + return (p_193383_4_ == EnumFacing.UP && p_193383_2_.func_177229_b(field_176285_M) == BlockTrapDoor.DoorHalf.TOP || p_193383_4_ == EnumFacing.DOWN && p_193383_2_.func_177229_b(field_176285_M) == BlockTrapDoor.DoorHalf.BOTTOM) && !((Boolean)p_193383_2_.func_177229_b(field_176283_b)).booleanValue() ? BlockFaceShape.SOLID : BlockFaceShape.UNDEFINED; } + @Override diff --git a/patches/minecraft/net/minecraft/block/BlockTripWireHook.java.patch b/patches/minecraft/net/minecraft/block/BlockTripWireHook.java.patch deleted file mode 100644 index 990880a0a..000000000 --- a/patches/minecraft/net/minecraft/block/BlockTripWireHook.java.patch +++ /dev/null @@ -1,28 +0,0 @@ ---- ../src-base/minecraft/net/minecraft/block/BlockTripWireHook.java -+++ ../src-work/minecraft/net/minecraft/block/BlockTripWireHook.java -@@ -79,14 +79,14 @@ - - public boolean func_176198_a(World p_176198_1_, BlockPos p_176198_2_, EnumFacing p_176198_3_) - { -- return p_176198_3_.func_176740_k().func_176722_c() && p_176198_1_.func_180495_p(p_176198_2_.func_177972_a(p_176198_3_.func_176734_d())).func_185915_l(); -+ return p_176198_3_.func_176740_k().func_176722_c() && p_176198_1_.func_180495_p(p_176198_2_.func_177972_a(p_176198_3_.func_176734_d())).isSideSolid(p_176198_1_, p_176198_2_.func_177972_a(p_176198_3_.func_176734_d()), p_176198_3_); - } - - public boolean func_176196_c(World p_176196_1_, BlockPos p_176196_2_) - { - for (EnumFacing enumfacing : EnumFacing.Plane.HORIZONTAL) - { -- if (p_176196_1_.func_180495_p(p_176196_2_.func_177972_a(enumfacing)).func_185915_l()) -+ if (p_176196_1_.func_180495_p(p_176196_2_.func_177972_a(enumfacing)).isSideSolid(p_176196_1_, p_176196_2_.func_177972_a(enumfacing), enumfacing.func_176734_d())) - { - return true; - } -@@ -120,7 +120,7 @@ - { - EnumFacing enumfacing = (EnumFacing)p_189540_1_.func_177229_b(field_176264_a); - -- if (!p_189540_2_.func_180495_p(p_189540_3_.func_177972_a(enumfacing.func_176734_d())).func_185915_l()) -+ if (!p_189540_2_.func_180495_p(p_189540_3_.func_177972_a(enumfacing.func_176734_d())).isSideSolid(p_189540_2_, p_189540_3_.func_177972_a(enumfacing.func_176734_d()), enumfacing)) - { - this.func_176226_b(p_189540_2_, p_189540_3_, p_189540_1_, 0); - p_189540_2_.func_175698_g(p_189540_3_); diff --git a/patches/minecraft/net/minecraft/block/BlockVine.java.patch b/patches/minecraft/net/minecraft/block/BlockVine.java.patch index 0d3a99649..63a3855ac 100644 --- a/patches/minecraft/net/minecraft/block/BlockVine.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockVine.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/block/BlockVine.java +++ ../src-work/minecraft/net/minecraft/block/BlockVine.java -@@ -27,7 +27,7 @@ +@@ -28,7 +28,7 @@ import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -9,7 +9,7 @@ { public static final PropertyBool field_176277_a = PropertyBool.func_177716_a("up"); public static final PropertyBool field_176273_b = PropertyBool.func_177716_a("north"); -@@ -459,4 +459,14 @@ +@@ -459,7 +459,17 @@ return i; } @@ -22,5 +22,8 @@ + return java.util.Arrays.asList(new ItemStack(this, 1)); + } + /*************************FORGE END***********************************/ + + - } + public BlockFaceShape func_193383_a(IBlockAccess p_193383_1_, IBlockState p_193383_2_, BlockPos p_193383_3_, EnumFacing p_193383_4_) + { + return BlockFaceShape.UNDEFINED; diff --git a/patches/minecraft/net/minecraft/block/BlockWall.java.patch b/patches/minecraft/net/minecraft/block/BlockWall.java.patch index 1d7db02dd..4e6188e3d 100644 --- a/patches/minecraft/net/minecraft/block/BlockWall.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockWall.java.patch @@ -1,22 +1,22 @@ --- ../src-base/minecraft/net/minecraft/block/BlockWall.java +++ ../src-work/minecraft/net/minecraft/block/BlockWall.java -@@ -154,10 +154,10 @@ +@@ -160,10 +160,10 @@ public IBlockState func_176221_a(IBlockState p_176221_1_, IBlockAccess p_176221_2_, BlockPos p_176221_3_) { -- boolean flag = this.func_176253_e(p_176221_2_, p_176221_3_.func_177978_c()); -- boolean flag1 = this.func_176253_e(p_176221_2_, p_176221_3_.func_177974_f()); -- boolean flag2 = this.func_176253_e(p_176221_2_, p_176221_3_.func_177968_d()); -- boolean flag3 = this.func_176253_e(p_176221_2_, p_176221_3_.func_177976_e()); -+ boolean flag = canWallConnectTo(p_176221_2_, p_176221_3_, EnumFacing.NORTH); +- boolean flag = this.func_176253_e(p_176221_2_, p_176221_3_.func_177978_c(), EnumFacing.SOUTH); +- boolean flag1 = this.func_176253_e(p_176221_2_, p_176221_3_.func_177974_f(), EnumFacing.WEST); +- boolean flag2 = this.func_176253_e(p_176221_2_, p_176221_3_.func_177968_d(), EnumFacing.NORTH); +- boolean flag3 = this.func_176253_e(p_176221_2_, p_176221_3_.func_177976_e(), EnumFacing.EAST); ++ boolean flag = canWallConnectTo(p_176221_2_, p_176221_3_, EnumFacing.NORTH); + boolean flag1 = canWallConnectTo(p_176221_2_, p_176221_3_, EnumFacing.EAST); + boolean flag2 = canWallConnectTo(p_176221_2_, p_176221_3_, EnumFacing.SOUTH); + boolean flag3 = canWallConnectTo(p_176221_2_, p_176221_3_, EnumFacing.WEST); boolean flag4 = flag && !flag1 && flag2 && !flag3 || !flag && flag1 && !flag2 && flag3; return p_176221_1_.func_177226_a(field_176256_a, Boolean.valueOf(!flag4 || !p_176221_2_.func_175623_d(p_176221_3_.func_177984_a()))).func_177226_a(field_176254_b, Boolean.valueOf(flag)).func_177226_a(field_176257_M, Boolean.valueOf(flag1)).func_177226_a(field_176258_N, Boolean.valueOf(flag2)).func_177226_a(field_176259_O, Boolean.valueOf(flag3)); } -@@ -167,6 +167,23 @@ - return new BlockStateContainer(this, new IProperty[] {field_176256_a, field_176254_b, field_176257_M, field_176259_O, field_176258_N, field_176255_P}); +@@ -178,6 +178,24 @@ + return p_193383_4_ != EnumFacing.UP && p_193383_4_ != EnumFacing.DOWN ? BlockFaceShape.MIDDLE_POLE_THICK : BlockFaceShape.CENTER_BIG; } + /* ======================================== FORGE START ======================================== */ @@ -30,8 +30,9 @@ + + private boolean canWallConnectTo(IBlockAccess world, BlockPos pos, EnumFacing facing) + { -+ Block block = world.func_180495_p(pos.func_177972_a(facing)).func_177230_c(); -+ return block.canBeConnectedTo(world, pos.func_177972_a(facing), facing.func_176734_d()) || func_176253_e(world, pos.func_177972_a(facing)); ++ BlockPos other = pos.func_177972_a(facing); ++ Block block = world.func_180495_p(other).func_177230_c(); ++ return block.canBeConnectedTo(world, other, facing.func_176734_d()) || func_176253_e(world, other, facing.func_176734_d()); + } + + /* ======================================== FORGE END ======================================== */ diff --git a/patches/minecraft/net/minecraft/block/BlockWeb.java.patch b/patches/minecraft/net/minecraft/block/BlockWeb.java.patch index 9a8fc2943..822fdbf49 100644 --- a/patches/minecraft/net/minecraft/block/BlockWeb.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockWeb.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/block/BlockWeb.java +++ ../src-work/minecraft/net/minecraft/block/BlockWeb.java -@@ -20,7 +20,7 @@ +@@ -22,7 +22,7 @@ import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -9,14 +9,16 @@ { public BlockWeb() { -@@ -77,4 +77,10 @@ - super.func_180657_a(p_180657_1_, p_180657_2_, p_180657_3_, p_180657_4_, p_180657_5_, p_180657_6_); +@@ -80,6 +80,12 @@ } } -+ + + @Override public boolean isShearable(ItemStack item, IBlockAccess world, BlockPos pos) { return true; } + @Override + public java.util.List onSheared(ItemStack item, IBlockAccess world, BlockPos pos, int fortune) { + return com.google.common.collect.Lists.newArrayList(new ItemStack(Item.func_150898_a(this))); + } - } ++ + public BlockFaceShape func_193383_a(IBlockAccess p_193383_1_, IBlockState p_193383_2_, BlockPos p_193383_3_, EnumFacing p_193383_4_) + { + return BlockFaceShape.UNDEFINED; diff --git a/patches/minecraft/net/minecraft/block/state/BlockPistonStructureHelper.java.patch b/patches/minecraft/net/minecraft/block/state/BlockPistonStructureHelper.java.patch index 7d8c10310..a9e9834a9 100644 --- a/patches/minecraft/net/minecraft/block/state/BlockPistonStructureHelper.java.patch +++ b/patches/minecraft/net/minecraft/block/state/BlockPistonStructureHelper.java.patch @@ -13,8 +13,8 @@ iblockstate = this.field_177261_a.func_180495_p(blockpos); block = iblockstate.func_177230_c(); -- if (iblockstate.func_185904_a() == Material.field_151579_a || !BlockPistonBase.func_185646_a(iblockstate, this.field_177261_a, blockpos, this.field_177257_d, false) || blockpos.equals(this.field_177259_b)) -+ if (iblockstate.func_177230_c().isAir(iblockstate, this.field_177261_a, blockpos) || !BlockPistonBase.func_185646_a(iblockstate, this.field_177261_a, blockpos, this.field_177257_d, false) || blockpos.equals(this.field_177259_b)) +- if (iblockstate.func_185904_a() == Material.field_151579_a || !BlockPistonBase.func_185646_a(iblockstate, this.field_177261_a, blockpos, this.field_177257_d, false, this.field_177257_d.func_176734_d()) || blockpos.equals(this.field_177259_b)) ++ if (iblockstate.func_177230_c().isAir(iblockstate, this.field_177261_a, blockpos) || !BlockPistonBase.func_185646_a(iblockstate, this.field_177261_a, blockpos, this.field_177257_d, false, this.field_177257_d.func_176734_d()) || blockpos.equals(this.field_177259_b)) { break; } diff --git a/patches/minecraft/net/minecraft/block/state/BlockStateContainer.java.patch b/patches/minecraft/net/minecraft/block/state/BlockStateContainer.java.patch index 1edf31b3e..11935aade 100644 --- a/patches/minecraft/net/minecraft/block/state/BlockStateContainer.java.patch +++ b/patches/minecraft/net/minecraft/block/state/BlockStateContainer.java.patch @@ -49,9 +49,9 @@ public Collection < IProperty> func_177227_a() { return Collections. < IProperty> unmodifiableCollection(this.field_177237_b.keySet()); -@@ -468,5 +485,86 @@ +@@ -473,5 +490,86 @@ { - return this.field_177239_a.func_176214_u(this); + return this.field_177239_a.func_193383_a(p_193401_1_, this, p_193401_2_, p_193401_3_); } + + //Forge Start diff --git a/patches/minecraft/net/minecraft/client/LoadingScreenRenderer.java.patch b/patches/minecraft/net/minecraft/client/LoadingScreenRenderer.java.patch index 176c16474..ab853bf67 100644 --- a/patches/minecraft/net/minecraft/client/LoadingScreenRenderer.java.patch +++ b/patches/minecraft/net/minecraft/client/LoadingScreenRenderer.java.patch @@ -9,7 +9,7 @@ + if (!net.minecraftforge.fml.client.FMLClientHandler.instance().handleLoadingScreen(scaledresolution)) //FML Don't render while FML's pre-screen is rendering + { Tessellator tessellator = Tessellator.func_178181_a(); - VertexBuffer vertexbuffer = tessellator.func_178180_c(); + BufferBuilder bufferbuilder = tessellator.func_178180_c(); this.field_73725_b.func_110434_K().func_110577_a(Gui.field_110325_k); @@ -174,6 +178,12 @@ GlStateManager.func_187428_a(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO); diff --git a/patches/minecraft/net/minecraft/client/Minecraft.java.patch b/patches/minecraft/net/minecraft/client/Minecraft.java.patch index 308925fa1..99421c74c 100644 --- a/patches/minecraft/net/minecraft/client/Minecraft.java.patch +++ b/patches/minecraft/net/minecraft/client/Minecraft.java.patch @@ -1,14 +1,14 @@ --- ../src-base/minecraft/net/minecraft/client/Minecraft.java +++ ../src-work/minecraft/net/minecraft/client/Minecraft.java -@@ -322,7 +322,6 @@ +@@ -344,7 +344,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()}); -- field_147123_G.debug("(Session ID is {})", new Object[] {this.field_71449_j.func_111286_b()}); + field_147123_G.info("Setting user: {}", (Object)this.field_71449_j.func_111285_a()); +- field_147123_G.debug("(Session ID is {})", (Object)this.field_71449_j.func_111286_b()); 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; -@@ -438,10 +437,10 @@ +@@ -464,10 +463,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,25 +21,16 @@ 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); -@@ -466,7 +465,7 @@ - { - try - { -- return String.format(p_74535_1_, new Object[] {GameSettings.func_74298_c(Minecraft.this.field_71474_y.field_151445_Q.func_151463_i())}); -+ return String.format(p_74535_1_, new Object[] {Minecraft.this.field_71474_y.field_151445_Q.getDisplayName()}); - } - catch (Exception exception) - { -@@ -475,6 +474,8 @@ - } - }); +@@ -487,6 +486,8 @@ + this.field_110451_am.func_110542_a(new GrassColorReloadListener()); + this.field_110451_am.func_110542_a(new FoliageColorReloadListener()); this.field_71417_B = new MouseHelper(); + net.minecraftforge.fml.common.ProgressManager.ProgressBar bar= net.minecraftforge.fml.common.ProgressManager.push("Rendering Setup", 5, true); + bar.step("GL Setup"); this.func_71361_d("Pre startup"); GlStateManager.func_179098_w(); GlStateManager.func_179103_j(7425); -@@ -488,19 +489,24 @@ +@@ -500,19 +501,24 @@ GlStateManager.func_179096_D(); GlStateManager.func_179128_n(5888); this.func_71361_d("Startup"); @@ -65,8 +56,8 @@ 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); -@@ -510,23 +516,27 @@ - this.field_71458_u = new GuiAchievement(this); +@@ -523,23 +529,27 @@ + this.field_110451_am.func_110542_a(this.field_193995_ae); 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); + net.minecraftforge.fml.client.SplashProgress.resume(); @@ -96,7 +87,16 @@ if (this.field_71474_y.field_74353_u && !this.field_71431_Q) { this.func_71352_k(); -@@ -698,21 +708,23 @@ +@@ -581,7 +591,7 @@ + { + return (List)p_193990_0_.func_192711_b().stream().flatMap((p_193993_0_) -> { + return p_193993_0_.func_77571_b().func_82840_a((EntityPlayer)null, ITooltipFlag.TooltipFlags.NORMAL).stream(); +- }).map(TextFormatting::func_110646_a).map(String::trim).filter((p_193994_0_) -> { ++ }).map(TextFormatting::getTextWithoutFormattingCodes).map(String::trim).filter((p_193994_0_) -> { + return !p_193994_0_.isEmpty(); + }).collect(Collectors.toList()); + }, (p_193991_0_) -> +@@ -748,21 +758,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() -@@ -905,11 +917,6 @@ +@@ -955,11 +967,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(); -@@ -919,6 +926,17 @@ +@@ -969,6 +976,17 @@ p_147108_1_ = new GuiGameOver((ITextComponent)null); } @@ -153,19 +153,21 @@ if (p_147108_1_ instanceof GuiMainMenu || p_147108_1_ instanceof GuiMultiplayer) { this.field_71474_y.field_74330_P = false; -@@ -1054,9 +1072,11 @@ +@@ -1094,11 +1112,13 @@ if (!this.field_71454_w) { -+ net.minecraftforge.fml.common.FMLCommonHandler.instance().onRenderTickStart(this.field_71428_T.field_74281_c); ++ net.minecraftforge.fml.common.FMLCommonHandler.instance().onRenderTickStart(this.field_71428_T.field_194147_b); this.field_71424_I.func_76318_c("gameRenderer"); - this.field_71460_t.func_181560_a(this.field_71428_T.field_74281_c, i); + this.field_71460_t.func_181560_a(this.field_71445_n ? this.field_193996_ah : this.field_71428_T.field_194147_b, i); + this.field_71424_I.func_76318_c("toasts"); + this.field_193034_aS.func_191783_a(new ScaledResolution(this)); this.field_71424_I.func_76319_b(); -+ net.minecraftforge.fml.common.FMLCommonHandler.instance().onRenderTickEnd(this.field_71428_T.field_74281_c); ++ net.minecraftforge.fml.common.FMLCommonHandler.instance().onRenderTickEnd(this.field_71428_T.field_194147_b); } this.field_71424_I.func_76319_b(); -@@ -1399,9 +1419,9 @@ +@@ -1455,9 +1475,9 @@ { BlockPos blockpos = this.field_71476_x.func_178782_a(); @@ -177,7 +179,7 @@ this.field_71439_g.func_184609_a(EnumHand.MAIN_HAND); } } -@@ -1435,7 +1455,7 @@ +@@ -1491,7 +1511,7 @@ case BLOCK: BlockPos blockpos = this.field_71476_x.func_178782_a(); @@ -186,7 +188,7 @@ { this.field_71442_b.func_180511_b(blockpos, this.field_71476_x.field_178784_b); break; -@@ -1449,6 +1469,7 @@ +@@ -1505,6 +1525,7 @@ } this.field_71439_g.func_184821_cY(); @@ -194,7 +196,7 @@ } this.field_71439_g.func_184609_a(EnumHand.MAIN_HAND); -@@ -1514,6 +1535,7 @@ +@@ -1570,6 +1591,7 @@ } } @@ -202,7 +204,7 @@ 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); -@@ -1620,6 +1642,8 @@ +@@ -1676,6 +1698,8 @@ --this.field_71467_ac; } @@ -211,7 +213,7 @@ this.field_71424_I.func_76320_a("gui"); if (!this.field_71445_n) -@@ -1731,6 +1755,7 @@ +@@ -1788,6 +1812,7 @@ this.field_71457_ai = 0; this.field_71441_e.func_72897_h(this.field_71439_g); } @@ -219,7 +221,7 @@ } this.field_71424_I.func_76318_c("gameRenderer"); -@@ -1819,6 +1844,7 @@ +@@ -1877,6 +1902,7 @@ } this.field_71424_I.func_76319_b(); @@ -227,7 +229,7 @@ this.field_71423_H = func_71386_F(); } -@@ -1924,6 +1950,7 @@ +@@ -1982,6 +2008,7 @@ } } } @@ -235,7 +237,7 @@ } this.func_184117_aA(); -@@ -2170,6 +2197,8 @@ +@@ -2239,6 +2266,8 @@ { while (Mouse.next()) { @@ -244,7 +246,7 @@ int i = Mouse.getEventButton(); KeyBinding.func_74510_a(i - 100, Mouse.getEventButtonState()); -@@ -2235,6 +2264,7 @@ +@@ -2304,6 +2333,7 @@ public void func_71371_a(String p_71371_1_, String p_71371_2_, @Nullable WorldSettings p_71371_3_) { @@ -252,7 +254,7 @@ this.func_71403_a((WorldClient)null); System.gc(); ISaveHandler isavehandler = this.field_71469_aa.func_75804_a(p_71371_1_, false); -@@ -2277,6 +2307,12 @@ +@@ -2346,6 +2376,12 @@ while (!this.field_71437_Z.func_71200_ad()) { @@ -265,13 +267,13 @@ String s = this.field_71437_Z.func_71195_b_(); if (s != null) -@@ -2302,8 +2338,14 @@ +@@ -2371,8 +2407,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(316, socketaddress.toString(), 0, EnumConnectionState.LOGIN)); +- networkmanager.func_179290_a(new C00Handshake(335, socketaddress.toString(), 0, EnumConnectionState.LOGIN)); - networkmanager.func_179290_a(new CPacketLoginStart(this.func_110432_I().func_148256_e())); -+ networkmanager.func_179290_a(new C00Handshake(316, socketaddress.toString(), 0, EnumConnectionState.LOGIN, true)); ++ networkmanager.func_179290_a(new C00Handshake(335, socketaddress.toString(), 0, EnumConnectionState.LOGIN, true)); + com.mojang.authlib.GameProfile gameProfile = this.func_110432_I().func_148256_e(); + if (!this.func_110432_I().hasCachedProperties()) + { @@ -282,7 +284,7 @@ this.field_71453_ak = networkmanager; } -@@ -2314,6 +2356,8 @@ +@@ -2383,6 +2425,8 @@ public void func_71353_a(@Nullable WorldClient p_71353_1_, String p_71353_2_) { @@ -291,7 +293,7 @@ if (p_71353_1_ == null) { NetHandlerPlayClient nethandlerplayclient = this.func_147114_u(); -@@ -2326,6 +2370,18 @@ +@@ -2395,6 +2439,18 @@ if (this.field_71437_Z != null && this.field_71437_Z.func_175578_N()) { this.field_71437_Z.func_71263_m(); @@ -310,7 +312,7 @@ } this.field_71437_Z = null; -@@ -2349,6 +2405,7 @@ +@@ -2418,6 +2474,7 @@ this.field_71456_v.func_181029_i(); this.func_71351_a((ServerData)null); this.field_71455_al = false; @@ -318,7 +320,7 @@ } this.field_147127_av.func_147690_c(); -@@ -2466,159 +2523,8 @@ +@@ -2535,159 +2592,8 @@ { if (this.field_71476_x != null && this.field_71476_x.field_72313_a != RayTraceResult.Type.MISS) { @@ -381,30 +383,30 @@ - else if (this.field_71476_x.field_72308_g instanceof EntityMinecart) - { - EntityMinecart entityminecart = (EntityMinecart)this.field_71476_x.field_72308_g; -- Item item; +- Item item1; - - switch (entityminecart.func_184264_v()) - { - case FURNACE: -- item = Items.field_151109_aJ; +- item1 = Items.field_151109_aJ; - break; - case CHEST: -- item = Items.field_151108_aI; +- item1 = Items.field_151108_aI; - break; - case TNT: -- item = Items.field_151142_bV; +- item1 = Items.field_151142_bV; - break; - case HOPPER: -- item = Items.field_151140_bW; +- item1 = Items.field_151140_bW; - break; - case COMMAND_BLOCK: -- item = Items.field_151095_cc; +- item1 = Items.field_151095_cc; - break; - default: -- item = Items.field_151143_au; +- item1 = Items.field_151143_au; - } - -- itemstack = new ItemStack(item); +- itemstack = new ItemStack(item1); - } - else if (this.field_71476_x.field_72308_g instanceof EntityBoat) - { @@ -445,7 +447,7 @@ - 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, s}); +- field_147123_G.warn("Picking on: [{}] {} gave null item", this.field_71476_x.field_72313_a, s); - } - else - { @@ -480,7 +482,7 @@ } } -@@ -2921,18 +2827,8 @@ +@@ -3009,18 +2915,8 @@ public static int func_71369_N() { @@ -501,7 +503,7 @@ } public boolean func_70002_Q() -@@ -3071,15 +2967,16 @@ +@@ -3181,11 +3077,11 @@ { if (Keyboard.getEventKeyState()) { @@ -515,12 +517,15 @@ { this.field_71456_v.func_146158_b().func_146227_a(ScreenShotHelper.func_148260_a(this.field_71412_D, this.field_71443_c, this.field_71440_d, this.field_147124_at)); } +@@ -3199,6 +3095,7 @@ + } + } } + else if (this.field_71462_r instanceof GuiControls) ((GuiControls)this.field_71462_r).field_146491_f = null; } } } -@@ -3199,6 +3096,12 @@ +@@ -3328,6 +3225,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 4bded6e20..e37e6fcec 100644 --- a/patches/minecraft/net/minecraft/client/audio/SoundManager.java.patch +++ b/patches/minecraft/net/minecraft/client/audio/SoundManager.java.patch @@ -24,7 +24,7 @@ this.field_148629_h.clear(); this.field_148626_m.clear(); this.field_148625_l.clear(); -@@ -338,6 +341,9 @@ +@@ -346,6 +349,9 @@ { if (this.field_148617_f) { @@ -34,7 +34,7 @@ SoundEventAccessor soundeventaccessor = p_148611_1_.func_184366_a(this.field_148622_c); ResourceLocation resourcelocation = p_148611_1_.func_147650_b(); -@@ -400,10 +406,12 @@ +@@ -408,10 +414,12 @@ if (sound.func_188723_h()) { this.field_148620_e.newStreamingSource(false, s, func_148612_a(resourcelocation1), resourcelocation1.toString(), flag, p_148611_1_.func_147649_g(), p_148611_1_.func_147654_h(), p_148611_1_.func_147651_i(), p_148611_1_.func_147656_j().func_148586_a(), f); @@ -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(), resourcelocation, s}); + field_148621_b.debug(field_148623_a, "Playing sound {} for event {} as channel {}", 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 417659bf3..7c2e6c5b0 100644 --- a/patches/minecraft/net/minecraft/client/entity/EntityPlayerSP.java.patch +++ b/patches/minecraft/net/minecraft/client/entity/EntityPlayerSP.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/client/entity/EntityPlayerSP.java +++ ../src-work/minecraft/net/minecraft/client/entity/EntityPlayerSP.java -@@ -125,6 +125,7 @@ +@@ -130,6 +130,7 @@ public boolean func_70097_a(DamageSource p_70097_1_, float p_70097_2_) { @@ -8,7 +8,7 @@ return false; } -@@ -428,6 +429,15 @@ +@@ -447,6 +448,15 @@ } } @@ -24,7 +24,7 @@ protected boolean func_145771_j(double p_145771_1_, double p_145771_3_, double p_145771_5_) { if (this.field_70145_X) -@@ -440,30 +450,34 @@ +@@ -459,30 +469,34 @@ double d0 = p_145771_1_ - (double)blockpos.func_177958_n(); double d1 = p_145771_5_ - (double)blockpos.func_177952_p(); @@ -64,7 +64,7 @@ { d2 = 1.0D - d1; i = 5; -@@ -498,7 +512,8 @@ +@@ -517,7 +531,8 @@ private boolean func_175162_d(BlockPos p_175162_1_) { @@ -74,7 +74,7 @@ } public void func_70031_b(boolean p_70031_1_) -@@ -543,7 +558,13 @@ +@@ -562,7 +577,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 4a59b77fc..5890c8524 100644 --- a/patches/minecraft/net/minecraft/client/gui/FontRenderer.java.patch +++ b/patches/minecraft/net/minecraft/client/gui/FontRenderer.java.patch @@ -32,7 +32,7 @@ private float func_181559_a(char p_181559_1_, boolean p_181559_2_) { + if (p_181559_1_ == 160) return 4.0F; // forge: display nbsp as space. MC-2595 - if (p_181559_1_ == 32) + if (p_181559_1_ == ' ') { return 4.0F; @@ -203,7 +204,7 @@ diff --git a/patches/minecraft/net/minecraft/client/gui/GuiBossOverlay.java.patch b/patches/minecraft/net/minecraft/client/gui/GuiBossOverlay.java.patch index 2acdca22c..3b6ed0e03 100644 --- a/patches/minecraft/net/minecraft/client/gui/GuiBossOverlay.java.patch +++ b/patches/minecraft/net/minecraft/client/gui/GuiBossOverlay.java.patch @@ -1,16 +1,16 @@ --- ../src-base/minecraft/net/minecraft/client/gui/GuiBossOverlay.java +++ ../src-work/minecraft/net/minecraft/client/gui/GuiBossOverlay.java -@@ -35,13 +35,18 @@ - for (BossInfoLerping bossinfolerping : this.field_184060_g.values()) +@@ -34,13 +34,18 @@ + for (BossInfoClient bossinfoclient : this.field_184060_g.values()) { int k = i / 2 - 91; + net.minecraftforge.client.event.RenderGameOverlayEvent.BossInfo event = -+ net.minecraftforge.client.ForgeHooksClient.bossBarRenderPre(scaledresolution, bossinfolerping, k, j, 10 + this.field_184059_f.field_71466_p.field_78288_b); ++ net.minecraftforge.client.ForgeHooksClient.bossBarRenderPre(scaledresolution, bossinfoclient, k, j, 10 + this.field_184059_f.field_71466_p.field_78288_b); + if (!event.isCanceled()) { GlStateManager.func_179131_c(1.0F, 1.0F, 1.0F, 1.0F); this.field_184059_f.func_110434_K().func_110577_a(field_184058_a); - this.func_184052_a(k, j, bossinfolerping); - String s = bossinfolerping.func_186744_e().func_150254_d(); + this.func_184052_a(k, j, bossinfoclient); + String s = bossinfoclient.func_186744_e().func_150254_d(); this.field_184059_f.field_71466_p.func_175063_a(s, (float)(i / 2 - this.field_184059_f.field_71466_p.func_78256_a(s) / 2), (float)(j - 9), 16777215); - j += 10 + this.field_184059_f.field_71466_p.field_78288_b; + } diff --git a/patches/minecraft/net/minecraft/client/gui/GuiButton.java.patch b/patches/minecraft/net/minecraft/client/gui/GuiButton.java.patch index 4d2f4ad58..92c79564f 100644 --- a/patches/minecraft/net/minecraft/client/gui/GuiButton.java.patch +++ b/patches/minecraft/net/minecraft/client/gui/GuiButton.java.patch @@ -9,7 +9,7 @@ public GuiButton(int p_i1020_1_, int p_i1020_2_, int p_i1020_3_, String p_i1020_4_) { @@ -75,6 +76,11 @@ - this.func_146119_b(p_146112_1_, p_146112_2_, p_146112_3_); + this.func_146119_b(p_191745_1_, p_191745_2_, p_191745_3_); int j = 14737632; + if (packedFGColour != 0) diff --git a/patches/minecraft/net/minecraft/client/gui/GuiCreateWorld.java.patch b/patches/minecraft/net/minecraft/client/gui/GuiCreateWorld.java.patch index 8299dd441..7132b205e 100644 --- a/patches/minecraft/net/minecraft/client/gui/GuiCreateWorld.java.patch +++ b/patches/minecraft/net/minecraft/client/gui/GuiCreateWorld.java.patch @@ -25,7 +25,7 @@ } } } -@@ -371,7 +366,7 @@ +@@ -379,7 +374,7 @@ this.field_146326_C.field_146125_m = this.field_146344_y; this.field_146320_D.field_146125_m = this.field_146344_y; this.field_146321_E.field_146125_m = this.field_146344_y; diff --git a/patches/minecraft/net/minecraft/client/gui/GuiEnchantment.java.patch b/patches/minecraft/net/minecraft/client/gui/GuiEnchantment.java.patch index bd222a5d6..80db6586a 100644 --- a/patches/minecraft/net/minecraft/client/gui/GuiEnchantment.java.patch +++ b/patches/minecraft/net/minecraft/client/gui/GuiEnchantment.java.patch @@ -9,7 +9,7 @@ { this.func_73729_b(i1, j + 14 + 19 * l, 0, 185, 108, 19); this.func_73729_b(i1 + 1, j + 15 + 19 * l, 16 * l, 239, 16, 16); -@@ -217,11 +217,12 @@ +@@ -220,11 +220,12 @@ int l = this.field_147075_G.field_185002_i[j]; int i1 = j + 1; @@ -17,8 +17,8 @@ + if (this.func_146978_c(60, 14 + 19 * j, 108, 17, p_73863_1_, p_73863_2_) && k > 0) { List list = Lists.newArrayList(); -- list.add("" + TextFormatting.WHITE + TextFormatting.ITALIC + I18n.func_135052_a("container.enchant.clue", new Object[] {enchantment.func_77316_c(l)})); -+ list.add("" + TextFormatting.WHITE + TextFormatting.ITALIC + I18n.func_135052_a("container.enchant.clue", new Object[] {enchantment == null ? "" : enchantment.func_77316_c(l)})); +- list.add("" + TextFormatting.WHITE + TextFormatting.ITALIC + I18n.func_135052_a("container.enchant.clue", enchantment.func_77316_c(l))); ++ list.add("" + TextFormatting.WHITE + TextFormatting.ITALIC + I18n.func_135052_a("container.enchant.clue", enchantment == null ? "" : enchantment.func_77316_c(l))); + if(enchantment == null) java.util.Collections.addAll(list, "", TextFormatting.RED + I18n.func_135052_a("forge.container.enchant.limitedEnchantability")); else if (!flag) diff --git a/patches/minecraft/net/minecraft/client/gui/GuiIngame.java.patch b/patches/minecraft/net/minecraft/client/gui/GuiIngame.java.patch index 795cfe98f..4e444c1e7 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 -@@ -359,7 +359,8 @@ +@@ -379,7 +379,8 @@ BlockPos blockpos = raytraceresult.func_178782_a(); @@ -10,7 +10,7 @@ { return; } -@@ -429,7 +430,10 @@ +@@ -449,7 +450,10 @@ { Potion potion = potioneffect.func_188419_a(); @@ -22,7 +22,7 @@ { int k = p_184048_1_.func_78326_a(); int l = 1; -@@ -472,7 +476,10 @@ +@@ -492,7 +496,10 @@ } GlStateManager.func_179131_c(1.0F, 1.0F, 1.0F, f); diff --git a/patches/minecraft/net/minecraft/client/gui/GuiIngameMenu.java.patch b/patches/minecraft/net/minecraft/client/gui/GuiIngameMenu.java.patch index 0334dae3d..acf44ad8e 100644 --- a/patches/minecraft/net/minecraft/client/gui/GuiIngameMenu.java.patch +++ b/patches/minecraft/net/minecraft/client/gui/GuiIngameMenu.java.patch @@ -2,20 +2,20 @@ +++ ../src-work/minecraft/net/minecraft/client/gui/GuiIngameMenu.java @@ -30,7 +30,8 @@ - this.field_146292_n.add(new GuiButton(4, this.field_146294_l / 2 - 100, this.field_146295_m / 4 + 24 + -16, I18n.func_135052_a("menu.returnToGame", new Object[0]))); - this.field_146292_n.add(new GuiButton(0, this.field_146294_l / 2 - 100, this.field_146295_m / 4 + 96 + -16, 98, 20, I18n.func_135052_a("menu.options", new Object[0]))); -- GuiButton guibutton = this.func_189646_b(new GuiButton(7, this.field_146294_l / 2 + 2, this.field_146295_m / 4 + 96 + -16, 98, 20, I18n.func_135052_a("menu.shareToLan", new Object[0]))); + this.field_146292_n.add(new GuiButton(4, this.field_146294_l / 2 - 100, this.field_146295_m / 4 + 24 + -16, I18n.func_135052_a("menu.returnToGame"))); + this.field_146292_n.add(new GuiButton(0, this.field_146294_l / 2 - 100, this.field_146295_m / 4 + 96 + -16, 98, 20, I18n.func_135052_a("menu.options"))); +- GuiButton guibutton = this.func_189646_b(new GuiButton(7, this.field_146294_l / 2 + 2, this.field_146295_m / 4 + 96 + -16, 98, 20, I18n.func_135052_a("menu.shareToLan"))); + this.field_146292_n.add(new GuiButton(12, this.field_146294_l / 2 + 2, this.field_146295_m / 4 + 96 + i, 98, 20, I18n.func_135052_a("fml.menu.modoptions"))); + GuiButton guibutton = this.func_189646_b(new GuiButton(7, this.field_146294_l / 2 - 100, this.field_146295_m / 4 + 72 + -16, 200, 20, I18n.func_135052_a("menu.shareToLan", new Object[0]))); guibutton.field_146124_l = this.field_146297_k.func_71356_B() && !this.field_146297_k.func_71401_C().func_71344_c(); - this.field_146292_n.add(new GuiButton(5, this.field_146294_l / 2 - 100, this.field_146295_m / 4 + 48 + -16, 98, 20, I18n.func_135052_a("gui.achievements", new Object[0]))); - this.field_146292_n.add(new GuiButton(6, this.field_146294_l / 2 + 2, this.field_146295_m / 4 + 48 + -16, 98, 20, I18n.func_135052_a("gui.stats", new Object[0]))); + this.field_146292_n.add(new GuiButton(5, this.field_146294_l / 2 - 100, this.field_146295_m / 4 + 48 + -16, 98, 20, I18n.func_135052_a("gui.advancements"))); + this.field_146292_n.add(new GuiButton(6, this.field_146294_l / 2 + 2, this.field_146295_m / 4 + 48 + -16, 98, 20, I18n.func_135052_a("gui.stats"))); @@ -73,13 +74,19 @@ this.field_146297_k.func_71381_h(); break; case 5: + if (this.field_146297_k.field_71439_g != null) - this.field_146297_k.func_147108_a(new GuiAchievements(this, this.field_146297_k.field_71439_g.func_146107_m())); + this.field_146297_k.func_147108_a(new GuiScreenAdvancements(this.field_146297_k.field_71439_g.field_71174_a.func_191982_f())); break; case 6: + if (this.field_146297_k.field_71439_g != null) diff --git a/patches/minecraft/net/minecraft/client/gui/GuiKeyBindingList.java.patch b/patches/minecraft/net/minecraft/client/gui/GuiKeyBindingList.java.patch index 2471d1bf9..6c1ef8811 100644 --- a/patches/minecraft/net/minecraft/client/gui/GuiKeyBindingList.java.patch +++ b/patches/minecraft/net/minecraft/client/gui/GuiKeyBindingList.java.patch @@ -12,24 +12,24 @@ @@ -113,7 +113,7 @@ { this.field_148282_b = p_i45029_2_; - this.field_148283_c = I18n.func_135052_a(p_i45029_2_.func_151464_g(), new Object[0]); -- this.field_148280_d = new GuiButton(0, 0, 0, 75, 20, I18n.func_135052_a(p_i45029_2_.func_151464_g(), new Object[0])); -+ this.field_148280_d = new GuiButton(0, 0, 0, 95, 20, I18n.func_135052_a(p_i45029_2_.func_151464_g(), new Object[0])); - this.field_148281_e = new GuiButton(0, 0, 0, 50, 20, I18n.func_135052_a("controls.reset", new Object[0])); + this.field_148283_c = I18n.func_135052_a(p_i45029_2_.func_151464_g()); +- this.field_148280_d = new GuiButton(0, 0, 0, 75, 20, I18n.func_135052_a(p_i45029_2_.func_151464_g())); ++ this.field_148280_d = new GuiButton(0, 0, 0, 95, 20, I18n.func_135052_a(p_i45029_2_.func_151464_g())); + this.field_148281_e = new GuiButton(0, 0, 0, 50, 20, I18n.func_135052_a("controls.reset")); } @@ -121,23 +121,24 @@ { boolean flag = GuiKeyBindingList.this.field_148191_k.field_146491_f == this.field_148282_b; - GuiKeyBindingList.this.field_148189_l.field_71466_p.func_78276_b(this.field_148283_c, p_180790_2_ + 90 - GuiKeyBindingList.this.field_148188_n, p_180790_3_ + p_180790_5_ / 2 - GuiKeyBindingList.this.field_148189_l.field_71466_p.field_78288_b / 2, 16777215); -- this.field_148281_e.field_146128_h = p_180790_2_ + 190; -+ this.field_148281_e.field_146128_h = p_180790_2_ + 210; - this.field_148281_e.field_146129_i = p_180790_3_; + GuiKeyBindingList.this.field_148189_l.field_71466_p.func_78276_b(this.field_148283_c, p_192634_2_ + 90 - GuiKeyBindingList.this.field_148188_n, p_192634_3_ + p_192634_5_ / 2 - GuiKeyBindingList.this.field_148189_l.field_71466_p.field_78288_b / 2, 16777215); +- this.field_148281_e.field_146128_h = p_192634_2_ + 190; ++ this.field_148281_e.field_146128_h = p_192634_2_ + 210; + this.field_148281_e.field_146129_i = p_192634_3_; - this.field_148281_e.field_146124_l = this.field_148282_b.func_151463_i() != this.field_148282_b.func_151469_h(); -+ this.field_148281_e.field_146124_l = !this.field_148282_b.isSetToDefaultValue(); - this.field_148281_e.func_146112_a(GuiKeyBindingList.this.field_148189_l, p_180790_6_, p_180790_7_); - this.field_148280_d.field_146128_h = p_180790_2_ + 105; - this.field_148280_d.field_146129_i = p_180790_3_; ++ this.field_148281_e.field_146124_l = this.field_148282_b.isSetToDefaultValue(); + this.field_148281_e.func_191745_a(GuiKeyBindingList.this.field_148189_l, p_192634_6_, p_192634_7_, p_192634_9_); + this.field_148280_d.field_146128_h = p_192634_2_ + 105; + this.field_148280_d.field_146129_i = p_192634_3_; - this.field_148280_d.field_146126_j = GameSettings.func_74298_c(this.field_148282_b.func_151463_i()); + this.field_148280_d.field_146126_j = this.field_148282_b.getDisplayName(); boolean flag1 = false; @@ -56,7 +56,7 @@ + this.field_148280_d.field_146126_j = (keyCodeModifierConflict ? TextFormatting.GOLD : TextFormatting.RED) + this.field_148280_d.field_146126_j; } - this.field_148280_d.func_146112_a(GuiKeyBindingList.this.field_148189_l, p_180790_6_, p_180790_7_); + this.field_148280_d.func_191745_a(GuiKeyBindingList.this.field_148189_l, p_192634_6_, p_192634_7_, p_192634_9_); @@ -163,6 +164,7 @@ } else if (this.field_148281_e.func_146116_c(GuiKeyBindingList.this.field_148189_l, p_148278_2_, p_148278_3_)) diff --git a/patches/minecraft/net/minecraft/client/gui/GuiMainMenu.java.patch b/patches/minecraft/net/minecraft/client/gui/GuiMainMenu.java.patch index 818d8be72..70670bfd2 100644 --- a/patches/minecraft/net/minecraft/client/gui/GuiMainMenu.java.patch +++ b/patches/minecraft/net/minecraft/client/gui/GuiMainMenu.java.patch @@ -1,15 +1,15 @@ --- ../src-base/minecraft/net/minecraft/client/gui/GuiMainMenu.java +++ ../src-work/minecraft/net/minecraft/client/gui/GuiMainMenu.java -@@ -65,6 +65,8 @@ - private GuiButton field_175372_K; - private boolean field_183502_L; +@@ -69,6 +69,8 @@ private GuiScreen field_183503_M; + private int field_193978_M; + private int field_193979_N; + private GuiButton modButton; + private net.minecraftforge.client.gui.NotificationModUpdateScreen modUpdateNotification; public GuiMainMenu() { -@@ -216,13 +218,15 @@ +@@ -211,13 +213,15 @@ this.field_183503_M.func_183500_a(this.field_146294_l, this.field_146295_m); this.field_183503_M.func_73866_w_(); } @@ -18,15 +18,15 @@ private void func_73969_a(int p_73969_1_, int p_73969_2_) { - this.field_146292_n.add(new GuiButton(1, this.field_146294_l / 2 - 100, p_73969_1_, I18n.func_135052_a("menu.singleplayer", new Object[0]))); - this.field_146292_n.add(new GuiButton(2, this.field_146294_l / 2 - 100, p_73969_1_ + p_73969_2_ * 1, I18n.func_135052_a("menu.multiplayer", new Object[0]))); -- this.field_175372_K = this.func_189646_b(new GuiButton(14, this.field_146294_l / 2 - 100, p_73969_1_ + p_73969_2_ * 2, I18n.func_135052_a("menu.online", new Object[0]))); -+ this.field_175372_K = this.func_189646_b(new GuiButton(14, this.field_146294_l / 2 + 2, p_73969_1_ + p_73969_2_ * 2, 98, 20, I18n.func_135052_a("menu.online", new Object[0]).replace("Minecraft", "").trim())); + this.field_146292_n.add(new GuiButton(1, this.field_146294_l / 2 - 100, p_73969_1_, I18n.func_135052_a("menu.singleplayer"))); + this.field_146292_n.add(new GuiButton(2, this.field_146294_l / 2 - 100, p_73969_1_ + p_73969_2_ * 1, I18n.func_135052_a("menu.multiplayer"))); +- this.field_175372_K = this.func_189646_b(new GuiButton(14, this.field_146294_l / 2 - 100, p_73969_1_ + p_73969_2_ * 2, I18n.func_135052_a("menu.online"))); ++ this.field_175372_K = this.func_189646_b(new GuiButton(14, this.field_146294_l / 2 + 2, p_73969_1_ + p_73969_2_ * 2, 98, 20, I18n.func_135052_a("menu.online").replace("Minecraft", "").trim())); + this.field_146292_n.add(modButton = new GuiButton(6, this.field_146294_l / 2 - 100, p_73969_1_ + p_73969_2_ * 2, 98, 20, I18n.func_135052_a("fml.menu.mods"))); } private void func_73972_b(int p_73972_1_, int p_73972_2_) -@@ -270,6 +274,11 @@ +@@ -265,6 +269,11 @@ this.field_146297_k.func_71400_g(); } @@ -37,8 +37,8 @@ + if (p_146284_1_.field_146127_k == 11) { - this.field_146297_k.func_71371_a("Demo_World", "Demo_World", DemoWorldServer.field_73071_a); -@@ -501,6 +510,8 @@ + this.field_146297_k.func_71371_a("Demo_World", "Demo_World", WorldServerDemo.field_73071_a); +@@ -497,6 +506,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); -@@ -520,7 +531,15 @@ +@@ -516,7 +527,16 @@ s = s + ("release".equalsIgnoreCase(this.field_146297_k.func_184123_d()) ? "" : "/" + this.field_146297_k.func_184123_d()); } @@ -61,10 +61,11 @@ + this.func_73731_b(this.field_146289_q, brd, 2, this.field_146295_m - ( 10 + brdline * (this.field_146289_q.field_78288_b + 1)), 16777215); + } + } - String s1 = "Copyright Mojang AB. Do not distribute!"; - this.func_73731_b(this.field_146289_q, "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); ++ + this.func_73731_b(this.field_146289_q, "Copyright Mojang AB. Do not distribute!", this.field_193979_N, this.field_146295_m - 10, -1); -@@ -537,6 +556,7 @@ + if (p_73863_1_ > this.field_193979_N && p_73863_1_ < this.field_193979_N + this.field_193978_M && p_73863_2_ > this.field_146295_m - 10 && p_73863_2_ < this.field_146295_m && Mouse.isInsideWindow()) +@@ -537,6 +557,7 @@ { this.field_183503_M.func_73863_a(p_73863_1_, p_73863_2_, p_73863_3_); } @@ -72,9 +73,9 @@ } protected void func_73864_a(int p_73864_1_, int p_73864_2_, int p_73864_3_) throws IOException -@@ -557,6 +577,8 @@ +@@ -562,6 +583,8 @@ { - this.field_183503_M.func_73864_a(p_73864_1_, p_73864_2_, p_73864_3_); + this.field_146297_k.func_147108_a(new GuiWinGame(false, Runnables.doNothing())); } + + net.minecraftforge.client.ForgeHooksClient.mainMenuMouseClick(p_73864_1_, p_73864_2_, p_73864_3_, this.field_146289_q, this.field_146294_l); diff --git a/patches/minecraft/net/minecraft/client/gui/GuiOverlayDebug.java.patch b/patches/minecraft/net/minecraft/client/gui/GuiOverlayDebug.java.patch index d2f9d1c51..7d5cf304b 100644 --- a/patches/minecraft/net/minecraft/client/gui/GuiOverlayDebug.java.patch +++ b/patches/minecraft/net/minecraft/client/gui/GuiOverlayDebug.java.patch @@ -2,7 +2,7 @@ +++ ../src-work/minecraft/net/minecraft/client/gui/GuiOverlayDebug.java @@ -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)}); + List list = Lists.newArrayList(String.format("Java: %s %dbit", System.getProperty("java.version"), this.field_175242_a.func_147111_S() ? 64 : 32), String.format("Mem: % 2d%% %03d/%03dMB", l * 100L / i, func_175240_a(l), func_175240_a(i)), String.format("Allocated: % 2d%% %03dMB", j * 100L / i, func_175240_a(j)), "", String.format("CPU: %s", OpenGlHelper.func_183029_j()), "", String.format("Display: %dx%d (%s)", Display.getWidth(), Display.getHeight(), GlStateManager.func_187416_u(7936)), GlStateManager.func_187416_u(7937), GlStateManager.func_187416_u(7938)); + list.add(""); + list.addAll(net.minecraftforge.fml.common.FMLCommonHandler.instance().getBrandings(false)); diff --git a/patches/minecraft/net/minecraft/client/gui/GuiScreen.java.patch b/patches/minecraft/net/minecraft/client/gui/GuiScreen.java.patch index b9c16b91d..537a2bde1 100644 --- a/patches/minecraft/net/minecraft/client/gui/GuiScreen.java.patch +++ b/patches/minecraft/net/minecraft/client/gui/GuiScreen.java.patch @@ -1,28 +1,28 @@ --- ../src-base/minecraft/net/minecraft/client/gui/GuiScreen.java +++ ../src-work/minecraft/net/minecraft/client/gui/GuiScreen.java -@@ -63,6 +63,7 @@ - private long field_146288_g; +@@ -61,6 +61,7 @@ private int field_146298_h; private URI field_175286_t; + private boolean field_193977_u; + protected boolean keyHandled, mouseHandled; // Forge: allow canceling key and mouse Post events from handleMouseInput and handleKeyboardInput public void func_73863_a(int p_73863_1_, int p_73863_2_, float p_73863_3_) { -@@ -147,7 +148,10 @@ - } - } +@@ -131,7 +132,10 @@ -- this.func_146283_a(list, p_146285_2_, p_146285_3_); + protected void func_146285_a(ItemStack p_146285_1_, int p_146285_2_, int p_146285_3_) + { +- this.func_146283_a(this.func_191927_a(p_146285_1_), p_146285_2_, p_146285_3_); + FontRenderer font = p_146285_1_.func_77973_b().getFontRenderer(p_146285_1_); + net.minecraftforge.fml.client.config.GuiUtils.preItemToolTip(p_146285_1_); -+ this.drawHoveringText(list, p_146285_2_, p_146285_3_, (font == null ? field_146289_q : font)); ++ this.drawHoveringText(this.func_191927_a(p_146285_1_), p_146285_2_, p_146285_3_, (font == null ? field_146289_q : font)); + net.minecraftforge.fml.client.config.GuiUtils.postItemToolTip(); } - protected void func_146279_a(String p_146279_1_, int p_146279_2_, int p_146279_3_) -@@ -157,7 +161,13 @@ + public List func_191927_a(ItemStack p_191927_1_) +@@ -170,7 +174,13 @@ - protected void func_146283_a(List p_146283_1_, int p_146283_2_, int p_146283_3_) + public void func_146283_a(List p_146283_1_, int p_146283_2_, int p_146283_3_) { - if (!p_146283_1_.isEmpty()) + drawHoveringText(p_146283_1_, p_146283_2_, p_146283_3_, field_146289_q); @@ -35,7 +35,7 @@ { GlStateManager.func_179101_C(); RenderHelper.func_74518_a(); -@@ -414,10 +424,13 @@ +@@ -403,10 +413,13 @@ public void func_175281_b(String p_175281_1_, boolean p_175281_2_) { @@ -49,7 +49,7 @@ this.field_146297_k.field_71439_g.func_71165_d(p_175281_1_); } -@@ -432,9 +445,15 @@ +@@ -421,9 +434,15 @@ if (guibutton.func_146116_c(this.field_146297_k, p_73864_1_, p_73864_2_)) { @@ -65,7 +65,7 @@ } } } -@@ -464,8 +483,12 @@ +@@ -453,8 +472,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_; @@ -78,7 +78,7 @@ } public void func_183500_a(int p_183500_1_, int p_183500_2_) -@@ -484,7 +507,10 @@ +@@ -473,7 +496,10 @@ { while (Mouse.next()) { @@ -89,7 +89,7 @@ } } -@@ -492,7 +518,10 @@ +@@ -481,7 +507,10 @@ { while (Keyboard.next()) { @@ -100,7 +100,7 @@ } } } -@@ -554,6 +583,7 @@ +@@ -543,6 +572,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 dc1d19bca..7bd08fc2e 100644 --- a/patches/minecraft/net/minecraft/client/gui/GuiScreenDemo.java.patch +++ b/patches/minecraft/net/minecraft/client/gui/GuiScreenDemo.java.patch @@ -1,16 +1,16 @@ --- ../src-base/minecraft/net/minecraft/client/gui/GuiScreenDemo.java +++ ../src-work/minecraft/net/minecraft/client/gui/GuiScreenDemo.java @@ -68,10 +68,10 @@ - this.field_146289_q.func_78276_b(I18n.func_135052_a("demo.help.title", new Object[0]), i, j, 2039583); + this.field_146289_q.func_78276_b(I18n.func_135052_a("demo.help.title"), i, j, 2039583); j = j + 12; GameSettings gamesettings = this.field_146297_k.field_71474_y; -- this.field_146289_q.func_78276_b(I18n.func_135052_a("demo.help.movementShort", new Object[] {GameSettings.func_74298_c(gamesettings.field_74351_w.func_151463_i()), GameSettings.func_74298_c(gamesettings.field_74370_x.func_151463_i()), GameSettings.func_74298_c(gamesettings.field_74368_y.func_151463_i()), GameSettings.func_74298_c(gamesettings.field_74366_z.func_151463_i())}), i, j, 5197647); -+ this.field_146289_q.func_78276_b(I18n.func_135052_a("demo.help.movementShort", new Object[] {gamesettings.field_74351_w.getDisplayName(), gamesettings.field_74370_x.getDisplayName(), gamesettings.field_74368_y.getDisplayName(), gamesettings.field_74366_z.getDisplayName()}), i, j, 5197647); - this.field_146289_q.func_78276_b(I18n.func_135052_a("demo.help.movementMouse", new Object[0]), i, j + 12, 5197647); -- this.field_146289_q.func_78276_b(I18n.func_135052_a("demo.help.jump", new Object[] {GameSettings.func_74298_c(gamesettings.field_74314_A.func_151463_i())}), i, j + 24, 5197647); -- this.field_146289_q.func_78276_b(I18n.func_135052_a("demo.help.inventory", new Object[] {GameSettings.func_74298_c(gamesettings.field_151445_Q.func_151463_i())}), i, j + 36, 5197647); -+ this.field_146289_q.func_78276_b(I18n.func_135052_a("demo.help.jump", new Object[] {gamesettings.field_74314_A.getDisplayName()}), i, j + 24, 5197647); -+ this.field_146289_q.func_78276_b(I18n.func_135052_a("demo.help.inventory", new Object[] {gamesettings.field_151445_Q.getDisplayName()}), i, j + 36, 5197647); - this.field_146289_q.func_78279_b(I18n.func_135052_a("demo.help.fullWrapped", new Object[0]), i, j + 68, 218, 2039583); +- this.field_146289_q.func_78276_b(I18n.func_135052_a("demo.help.movementShort", GameSettings.func_74298_c(gamesettings.field_74351_w.func_151463_i()), GameSettings.func_74298_c(gamesettings.field_74370_x.func_151463_i()), GameSettings.func_74298_c(gamesettings.field_74368_y.func_151463_i()), GameSettings.func_74298_c(gamesettings.field_74366_z.func_151463_i())), i, j, 5197647); ++ this.field_146289_q.func_78276_b(I18n.func_135052_a("demo.help.movementShort", gamesettings.field_74351_w.getDisplayName(), gamesettings.field_74370_x.getDisplayName(), gamesettings.field_74368_y.getDisplayName(), gamesettings.field_74366_z.getDisplayName()), i, j, 5197647); + this.field_146289_q.func_78276_b(I18n.func_135052_a("demo.help.movementMouse"), i, j + 12, 5197647); +- this.field_146289_q.func_78276_b(I18n.func_135052_a("demo.help.jump", GameSettings.func_74298_c(gamesettings.field_74314_A.func_151463_i())), i, j + 24, 5197647); +- this.field_146289_q.func_78276_b(I18n.func_135052_a("demo.help.inventory", GameSettings.func_74298_c(gamesettings.field_151445_Q.func_151463_i())), i, j + 36, 5197647); ++ this.field_146289_q.func_78276_b(I18n.func_135052_a("demo.help.jump", gamesettings.field_74314_A.getDisplayName()), i, j + 24, 5197647); ++ this.field_146289_q.func_78276_b(I18n.func_135052_a("demo.help.inventory", gamesettings.field_151445_Q.getDisplayName()), i, j + 36, 5197647); + this.field_146289_q.func_78279_b(I18n.func_135052_a("demo.help.fullWrapped"), i, j + 68, 218, 2039583); super.func_73863_a(p_73863_1_, p_73863_2_, p_73863_3_); } diff --git a/patches/minecraft/net/minecraft/client/gui/GuiSlot.java.patch b/patches/minecraft/net/minecraft/client/gui/GuiSlot.java.patch index 8304f70be..d6c6e6068 100644 --- a/patches/minecraft/net/minecraft/client/gui/GuiSlot.java.patch +++ b/patches/minecraft/net/minecraft/client/gui/GuiSlot.java.patch @@ -3,15 +3,15 @@ @@ -181,15 +181,8 @@ GlStateManager.func_179106_n(); Tessellator tessellator = Tessellator.func_178181_a(); - VertexBuffer vertexbuffer = tessellator.func_178180_c(); + BufferBuilder bufferbuilder = tessellator.func_178180_c(); - this.field_148161_k.func_110434_K().func_110577_a(Gui.field_110325_k); - GlStateManager.func_179131_c(1.0F, 1.0F, 1.0F, 1.0F); - float f = 32.0F; -- vertexbuffer.func_181668_a(7, DefaultVertexFormats.field_181709_i); -- vertexbuffer.func_181662_b((double)this.field_148152_e, (double)this.field_148154_c, 0.0D).func_187315_a((double)((float)this.field_148152_e / 32.0F), (double)((float)(this.field_148154_c + (int)this.field_148169_q) / 32.0F)).func_181669_b(32, 32, 32, 255).func_181675_d(); -- vertexbuffer.func_181662_b((double)this.field_148151_d, (double)this.field_148154_c, 0.0D).func_187315_a((double)((float)this.field_148151_d / 32.0F), (double)((float)(this.field_148154_c + (int)this.field_148169_q) / 32.0F)).func_181669_b(32, 32, 32, 255).func_181675_d(); -- vertexbuffer.func_181662_b((double)this.field_148151_d, (double)this.field_148153_b, 0.0D).func_187315_a((double)((float)this.field_148151_d / 32.0F), (double)((float)(this.field_148153_b + (int)this.field_148169_q) / 32.0F)).func_181669_b(32, 32, 32, 255).func_181675_d(); -- vertexbuffer.func_181662_b((double)this.field_148152_e, (double)this.field_148153_b, 0.0D).func_187315_a((double)((float)this.field_148152_e / 32.0F), (double)((float)(this.field_148153_b + (int)this.field_148169_q) / 32.0F)).func_181669_b(32, 32, 32, 255).func_181675_d(); +- bufferbuilder.func_181668_a(7, DefaultVertexFormats.field_181709_i); +- bufferbuilder.func_181662_b((double)this.field_148152_e, (double)this.field_148154_c, 0.0D).func_187315_a((double)((float)this.field_148152_e / 32.0F), (double)((float)(this.field_148154_c + (int)this.field_148169_q) / 32.0F)).func_181669_b(32, 32, 32, 255).func_181675_d(); +- bufferbuilder.func_181662_b((double)this.field_148151_d, (double)this.field_148154_c, 0.0D).func_187315_a((double)((float)this.field_148151_d / 32.0F), (double)((float)(this.field_148154_c + (int)this.field_148169_q) / 32.0F)).func_181669_b(32, 32, 32, 255).func_181675_d(); +- bufferbuilder.func_181662_b((double)this.field_148151_d, (double)this.field_148153_b, 0.0D).func_187315_a((double)((float)this.field_148151_d / 32.0F), (double)((float)(this.field_148153_b + (int)this.field_148169_q) / 32.0F)).func_181669_b(32, 32, 32, 255).func_181675_d(); +- bufferbuilder.func_181662_b((double)this.field_148152_e, (double)this.field_148153_b, 0.0D).func_187315_a((double)((float)this.field_148152_e / 32.0F), (double)((float)(this.field_148153_b + (int)this.field_148169_q) / 32.0F)).func_181669_b(32, 32, 32, 255).func_181675_d(); - tessellator.func_78381_a(); + // Forge: background rendering moved into separate method. + this.drawContainerBackground(tessellator); @@ -25,7 +25,7 @@ + + protected void drawContainerBackground(Tessellator tessellator) + { -+ VertexBuffer buffer = tessellator.func_178180_c(); ++ BufferBuilder buffer = tessellator.func_178180_c(); + this.field_148161_k.func_110434_K().func_110577_a(Gui.field_110325_k); + GlStateManager.func_179131_c(1.0F, 1.0F, 1.0F, 1.0F); + float f = 32.0F; diff --git a/patches/minecraft/net/minecraft/client/gui/ServerListEntryNormal.java.patch b/patches/minecraft/net/minecraft/client/gui/ServerListEntryNormal.java.patch index 447c9078d..b118ead7c 100644 --- a/patches/minecraft/net/minecraft/client/gui/ServerListEntryNormal.java.patch +++ b/patches/minecraft/net/minecraft/client/gui/ServerListEntryNormal.java.patch @@ -1,23 +1,23 @@ --- ../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 < 316; +@@ -83,7 +83,7 @@ + boolean flag1 = this.field_148301_e.field_82821_f < 335; 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); -+ List list = this.field_148300_d.field_71466_p.func_78271_c(net.minecraftforge.fml.client.FMLClientHandler.instance().fixDescription(this.field_148301_e.field_78843_d), p_180790_4_ - 48 - 2); + this.field_148300_d.field_71466_p.func_78276_b(this.field_148301_e.field_78847_a, p_192634_2_ + 32 + 3, p_192634_3_ + 1, 16777215); +- List list = this.field_148300_d.field_71466_p.func_78271_c(this.field_148301_e.field_78843_d, p_192634_4_ - 32 - 2); ++ List list = this.field_148300_d.field_71466_p.func_78271_c(net.minecraftforge.fml.client.FMLClientHandler.instance().fixDescription(this.field_148301_e.field_78843_d), p_192634_4_ - 32 - 2); for (int i = 0; i < Math.min(list.size(), 2); ++i) { -@@ -176,6 +176,11 @@ - int i1 = p_180790_6_ - p_180790_2_; - int j1 = p_180790_7_ - p_180790_3_; +@@ -177,6 +177,11 @@ + int i1 = p_192634_6_ - p_192634_2_; + int j1 = p_192634_7_ - p_192634_3_; -+ String tooltip = net.minecraftforge.fml.client.FMLClientHandler.instance().enhanceServerListEntry(this, this.field_148301_e, p_180790_2_, p_180790_4_, p_180790_3_, i1, j1); ++ String tooltip = net.minecraftforge.fml.client.FMLClientHandler.instance().enhanceServerListEntry(this, this.field_148301_e, p_192634_2_, p_192634_4_, p_192634_3_, i1, j1); + if (tooltip != null) + { + this.field_148303_c.func_146793_a(tooltip); + } else - if (i1 >= p_180790_4_ - 15 && i1 <= p_180790_4_ - 5 && j1 >= 0 && j1 <= 8) + if (i1 >= p_192634_4_ - 15 && i1 <= p_192634_4_ - 5 && j1 >= 0 && j1 <= 8) { this.field_148303_c.func_146793_a(s1); diff --git a/patches/minecraft/net/minecraft/client/gui/achievement/GuiAchievements.java.patch b/patches/minecraft/net/minecraft/client/gui/achievement/GuiAchievements.java.patch deleted file mode 100644 index 2bc64296a..000000000 --- a/patches/minecraft/net/minecraft/client/gui/achievement/GuiAchievements.java.patch +++ /dev/null @@ -1,124 +0,0 @@ ---- ../src-base/minecraft/net/minecraft/client/gui/achievement/GuiAchievements.java -+++ ../src-work/minecraft/net/minecraft/client/gui/achievement/GuiAchievements.java -@@ -49,6 +49,10 @@ - private final StatisticsManager field_146556_E; - private boolean field_146558_F = true; - -+ private int currentPage = -1; -+ private GuiButton button; -+ private java.util.LinkedList minecraftAchievements = new java.util.LinkedList(); -+ - public GuiAchievements(GuiScreen p_i45026_1_, StatisticsManager p_i45026_2_) - { - this.field_146562_a = p_i45026_1_; -@@ -61,6 +65,14 @@ - this.field_146573_x = (double)(AchievementList.field_187982_f.field_75991_b * 24 - 70); - this.field_146568_t = this.field_146573_x; - this.field_146566_v = this.field_146573_x; -+ minecraftAchievements.clear(); -+ for (Achievement achievement : AchievementList.field_187981_e) -+ { -+ if (!net.minecraftforge.common.AchievementPage.isAchievementInPages(achievement)) -+ { -+ minecraftAchievements.add(achievement); -+ } -+ } - } - - public void func_73866_w_() -@@ -68,6 +80,7 @@ - this.field_146297_k.func_147114_u().func_147297_a(new CPacketClientStatus(CPacketClientStatus.State.REQUEST_STATS)); - this.field_146292_n.clear(); - this.field_146292_n.add(new GuiOptionButton(1, this.field_146294_l / 2 + 24, this.field_146295_m / 2 + 74, 80, 20, I18n.func_135052_a("gui.done", new Object[0]))); -+ this.field_146292_n.add(button = new GuiButton(2, (field_146294_l - field_146555_f) / 2 + 24, field_146295_m / 2 + 74, 125, 20, net.minecraftforge.common.AchievementPage.getTitle(currentPage))); - } - - protected void func_146284_a(GuiButton p_146284_1_) throws IOException -@@ -78,12 +91,22 @@ - { - this.field_146297_k.func_147108_a(this.field_146562_a); - } -+ -+ if (p_146284_1_.field_146127_k == 2) -+ { -+ currentPage++; -+ if (currentPage >= net.minecraftforge.common.AchievementPage.getAchievementPages().size()) -+ { -+ currentPage = -1; -+ } -+ this.button.field_146126_j = net.minecraftforge.common.AchievementPage.getTitle(currentPage); -+ } - } - } - - protected void func_73869_a(char p_73869_1_, int p_73869_2_) throws IOException - { -- if (p_73869_2_ == this.field_146297_k.field_71474_y.field_151445_Q.func_151463_i()) -+ if (this.field_146297_k.field_71474_y.field_151445_Q.isActiveAndMatches(p_73869_2_)) - { - this.field_146297_k.func_147108_a((GuiScreen)null); - this.field_146297_k.func_71381_h(); -@@ -264,7 +287,9 @@ - GlStateManager.func_179143_c(518); - GlStateManager.func_179094_E(); - GlStateManager.func_179109_b((float)i1, (float)j1, -200.0F); -- GlStateManager.func_179152_a(1.0F / this.field_146570_r, 1.0F / this.field_146570_r, 0.0F); -+ // FIXES models rendering weirdly in the acheivements pane -+ // see https://github.com/MinecraftForge/MinecraftForge/commit/1b7ce7592caafb760ec93066184182ae0711e793#commitcomment-10512284 -+ GlStateManager.func_179152_a(1.0F / this.field_146570_r, 1.0F / this.field_146570_r, 1.0F); - GlStateManager.func_179098_w(); - GlStateManager.func_179140_f(); - GlStateManager.func_179091_B(); -@@ -338,11 +363,12 @@ - GlStateManager.func_179143_c(515); - this.field_146297_k.func_110434_K().func_110577_a(field_146561_C); - -- for (int j5 = 0; j5 < AchievementList.field_187981_e.size(); ++j5) -+ java.util.List achievementList = (currentPage == -1 ? minecraftAchievements : net.minecraftforge.common.AchievementPage.getAchievementPage(currentPage).getAchievements()); -+ for (int j5 = 0; j5 < achievementList.size(); ++j5) - { -- Achievement achievement1 = (Achievement)AchievementList.field_187981_e.get(j5); -+ Achievement achievement1 = achievementList.get(j5); - -- if (achievement1.field_75992_c != null) -+ if (achievement1.field_75992_c != null && achievementList.contains(achievement1.field_75992_c)) - { - int k5 = achievement1.field_75993_a * 24 - i + 11; - int l5 = achievement1.field_75991_b * 24 - j + 11; -@@ -396,9 +422,9 @@ - GlStateManager.func_179091_B(); - GlStateManager.func_179142_g(); - -- for (int i6 = 0; i6 < AchievementList.field_187981_e.size(); ++i6) -+ for (int i6 = 0; i6 < achievementList.size(); ++i6) - { -- Achievement achievement2 = (Achievement)AchievementList.field_187981_e.get(i6); -+ Achievement achievement2 = achievementList.get(i6); - int l6 = achievement2.field_75993_a * 24 - i; - int j7 = achievement2.field_75991_b * 24 - j; - -@@ -439,6 +465,7 @@ - - this.field_146297_k.func_110434_K().func_110577_a(field_146561_C); - -+ GlStateManager.func_179147_l(); // Forge: Specifically enable blend because it is needed here. And we fix Generic RenderItem's leakage of it. - if (achievement2.func_75984_f()) - { - this.func_73729_b(l6 - 2, j7 - 2, 26, 202, 26, 26); -@@ -447,6 +474,7 @@ - { - this.func_73729_b(l6 - 2, j7 - 2, 0, 202, 26, 26); - } -+ GlStateManager.func_179084_k(); //Forge: Cleanup states we set. - - if (!this.field_146556_E.func_77442_b(achievement2)) - { -@@ -455,7 +483,7 @@ - this.field_146296_j.func_175039_a(false); - } - -- GlStateManager.func_179145_e(); -+ GlStateManager.func_179140_f(); //Forge: Make sure Lighting is disabled. Fixes MC-33065 - GlStateManager.func_179089_o(); - this.field_146296_j.func_180450_b(achievement2.field_75990_d, l6 + 3, j7 + 3); - GlStateManager.func_187401_a(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA); 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 18609eff4..3e9179c8d 100644 --- a/patches/minecraft/net/minecraft/client/gui/inventory/GuiContainer.java.patch +++ b/patches/minecraft/net/minecraft/client/gui/inventory/GuiContainer.java.patch @@ -41,7 +41,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; + boolean flag1 = this.func_193983_c(p_73864_1_, p_73864_2_, j, k); + if (slot != null) flag1 = false; // Forge, prevent dropping of items through slots outside of GUI boundaries int l = -1; @@ -64,7 +64,7 @@ { this.field_146987_F = 2; } -@@ -467,10 +469,12 @@ +@@ -472,10 +474,12 @@ protected void func_146286_b(int p_146286_1_, int p_146286_2_, int p_146286_3_) { @@ -72,12 +72,12 @@ Slot slot = this.func_146975_c(p_146286_1_, p_146286_2_); int i = this.field_147003_i; int j = this.field_147009_r; - boolean flag = p_146286_1_ < i || p_146286_2_ < j || p_146286_1_ >= i + this.field_146999_f || p_146286_2_ >= j + this.field_147000_g; + boolean flag = this.func_193983_c(p_146286_1_, p_146286_2_, i, j); + if (slot != null) flag = false; // Forge, prevent dropping of items through slots outside of GUI boundaries int k = -1; if (slot != null) -@@ -491,7 +495,7 @@ +@@ -496,7 +500,7 @@ { for (Slot slot2 : this.field_147002_h.field_75151_b) { @@ -86,7 +86,7 @@ { this.func_184098_a(slot2, slot2.field_75222_d, p_146286_3_, ClickType.QUICK_MOVE); } -@@ -578,7 +582,7 @@ +@@ -583,7 +587,7 @@ } else if (!this.field_146297_k.field_71439_g.field_71071_by.func_70445_o().func_190926_b()) { @@ -95,7 +95,7 @@ { this.func_184098_a(slot, k, p_146286_3_, ClickType.CLONE); } -@@ -630,7 +634,7 @@ +@@ -635,7 +639,7 @@ protected void func_73869_a(char p_73869_1_, int p_73869_2_) throws IOException { @@ -104,7 +104,7 @@ { this.field_146297_k.field_71439_g.func_71053_j(); } -@@ -639,11 +643,11 @@ +@@ -644,11 +648,11 @@ if (this.field_147006_u != null && this.field_147006_u.func_75216_d()) { @@ -118,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); } -@@ -656,7 +660,7 @@ +@@ -661,7 +665,7 @@ { for (int i = 0; i < 9; ++i) { @@ -127,7 +127,7 @@ { this.func_184098_a(this.field_147006_u, this.field_147006_u.field_75222_d, i, ClickType.SWAP); return true; -@@ -689,4 +693,18 @@ +@@ -694,4 +698,18 @@ 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 da0185cc7..86ba9db9d 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 -@@ -52,6 +52,8 @@ +@@ -57,6 +57,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_) { -@@ -272,6 +274,13 @@ +@@ -287,6 +289,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 { -@@ -293,7 +302,7 @@ +@@ -308,7 +317,7 @@ protected void func_73869_a(char p_73869_1_, int p_73869_2_) throws IOException { @@ -32,44 +32,43 @@ { if (GameSettings.func_100015_a(this.field_146297_k.field_71474_y.field_74310_D)) { -@@ -331,6 +340,14 @@ +@@ -346,6 +355,35 @@ GuiContainerCreative.ContainerCreative guicontainercreative$containercreative = (GuiContainerCreative.ContainerCreative)this.field_147002_h; guicontainercreative$containercreative.field_148330_a.clear(); + CreativeTabs tab = CreativeTabs.field_78032_a[field_147058_w]; + if (tab.hasSearchBar() && tab != CreativeTabs.field_78027_g) + { -+ tab.func_78018_a(guicontainercreative$containercreative.field_148330_a); -+ updateFilteredItems(guicontainercreative$containercreative); ++ for (Item item : Item.field_150901_e) ++ item.func_150895_a(tab, guicontainercreative$containercreative.field_148330_a); ++ if (!this.field_147062_A.func_146179_b().isEmpty()) ++ { ++ //TODO: Make this a SearchTree not a manual search ++ String search = this.field_147062_A.func_146179_b().toLowerCase(Locale.ROOT); ++ java.util.Iterator itr = guicontainercreative$containercreative.field_148330_a.iterator(); ++ while (itr.hasNext()) { ++ ItemStack stack = itr.next(); ++ boolean matches = false; ++ for (String line : stack.func_82840_a(this.field_146297_k.field_71439_g, this.field_146297_k.field_71474_y.field_82882_x ? ITooltipFlag.TooltipFlags.ADVANCED : ITooltipFlag.TooltipFlags.NORMAL)) ++ { ++ if (TextFormatting.func_110646_a(line).toLowerCase(Locale.ROOT).contains(search)) { ++ matches = true; ++ break; ++ } ++ } ++ if (!matches) ++ itr.remove(); ++ } ++ } ++ this.field_147067_x = 0.0F; ++ guicontainercreative$containercreative.func_148329_a(0.0F); + return; + } + - for (Item item : Item.field_150901_e) + if (this.field_147062_A.func_146179_b().isEmpty()) { - if (item != null && item.func_77640_w() != null) -@@ -338,7 +355,13 @@ - item.func_150895_a(item, (CreativeTabs)null, guicontainercreative$containercreative.field_148330_a); - } - } -+ updateFilteredItems(guicontainercreative$containercreative); -+ } - -+ //split from above for custom search tabs -+ private void updateFilteredItems(GuiContainerCreative.ContainerCreative guicontainercreative$containercreative) -+ { -+ if (CreativeTabs.field_78032_a[field_147058_w] == CreativeTabs.field_78027_g) // FORGE: Only add enchanted books to the regular search - for (Enchantment enchantment : Enchantment.field_185264_b) - { - if (enchantment != null && enchantment.field_77351_y != null) -@@ -346,7 +369,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(Locale.ROOT); - -@@ -378,7 +400,7 @@ + for (Item item : Item.field_150901_e) +@@ -366,7 +404,7 @@ { CreativeTabs creativetabs = CreativeTabs.field_78032_a[field_147058_w]; @@ -77,8 +76,8 @@ + if (creativetabs != null && creativetabs.func_78019_g()) { 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); -@@ -413,7 +435,7 @@ + this.field_146289_q.func_78276_b(I18n.func_135052_a(creativetabs.func_78024_c()), 8, 6, 4210752); +@@ -401,7 +439,7 @@ for (CreativeTabs creativetabs : CreativeTabs.field_78032_a) { @@ -87,7 +86,7 @@ { this.func_147050_b(creativetabs); return; -@@ -426,11 +448,13 @@ +@@ -414,11 +452,13 @@ private boolean func_147055_p() { @@ -101,7 +100,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; -@@ -501,12 +525,14 @@ +@@ -524,12 +564,14 @@ if (this.field_147062_A != null) { @@ -117,16 +116,16 @@ this.func_147053_i(); } else -@@ -576,20 +602,43 @@ - } +@@ -601,19 +643,43 @@ super.func_73863_a(p_73863_1_, p_73863_2_, p_73863_3_); + +- for (CreativeTabs creativetabs : CreativeTabs.field_78032_a) + int start = tabPage * 10; + int end = Math.min(CreativeTabs.field_78032_a.length, ((tabPage + 1) * 10) + 2); + if (tabPage != 0) start += 2; + boolean rendered = false; - -- for (CreativeTabs creativetabs : CreativeTabs.field_78032_a) ++ + for (CreativeTabs creativetabs : java.util.Arrays.copyOfRange(CreativeTabs.field_78032_a,start,end)) { + if (creativetabs == null) continue; @@ -144,7 +143,7 @@ + if (this.field_147064_C != null && field_147058_w == CreativeTabs.field_78036_m.func_78021_a() && this.func_146978_c(this.field_147064_C.field_75223_e, this.field_147064_C.field_75221_f, 16, 16, p_73863_1_, p_73863_2_)) { - this.func_146279_a(I18n.func_135052_a("inventory.binSlot", new Object[0]), p_73863_1_, p_73863_2_); + this.func_146279_a(I18n.func_135052_a("inventory.binSlot"), p_73863_1_, p_73863_2_); } + if (maxPages != 0) @@ -161,8 +160,8 @@ + GlStateManager.func_179131_c(1.0F, 1.0F, 1.0F, 1.0F); GlStateManager.func_179140_f(); - } -@@ -637,7 +686,9 @@ + this.func_191948_b(p_73863_1_, p_73863_2_); +@@ -662,7 +728,9 @@ } } @@ -172,7 +171,7 @@ } else { -@@ -651,16 +702,35 @@ +@@ -676,16 +744,35 @@ RenderHelper.func_74520_c(); CreativeTabs creativetabs = CreativeTabs.field_78032_a[field_147058_w]; @@ -209,7 +208,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(); -@@ -675,6 +745,14 @@ +@@ -700,6 +787,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 +223,7 @@ this.func_147051_a(creativetabs); if (creativetabs == CreativeTabs.field_78036_m) -@@ -685,6 +763,14 @@ +@@ -710,6 +805,14 @@ protected boolean func_147049_a(CreativeTabs p_147049_1_, int p_147049_2_, int p_147049_3_) { @@ -239,7 +238,7 @@ int i = p_147049_1_.func_78020_k(); int j = 28 * i; int k = 0; -@@ -781,6 +867,8 @@ +@@ -806,6 +909,8 @@ } GlStateManager.func_179140_f(); @@ -248,7 +247,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; -@@ -807,6 +895,15 @@ +@@ -827,6 +932,15 @@ { this.field_146297_k.func_147108_a(new GuiStats(this, this.field_146297_k.field_71439_g.func_146107_m())); } @@ -264,7 +263,7 @@ } public int func_147056_g() -@@ -984,5 +1081,37 @@ +@@ -1031,6 +1145,38 @@ { return this.field_148332_b.func_82869_a(p_82869_1_); } @@ -301,4 +300,5 @@ + } + /*========================================= FORGE END =====================================*/ } - } + + @SideOnly(Side.CLIENT) diff --git a/patches/minecraft/net/minecraft/client/model/ModelBox.java.patch b/patches/minecraft/net/minecraft/client/model/ModelBox.java.patch index f50228fff..7995ccb23 100644 --- a/patches/minecraft/net/minecraft/client/model/ModelBox.java.patch +++ b/patches/minecraft/net/minecraft/client/model/ModelBox.java.patch @@ -13,6 +13,6 @@ } + @SideOnly(Side.CLIENT) - public void func_178780_a(VertexBuffer p_178780_1_, float p_178780_2_) + public void func_178780_a(BufferBuilder p_178780_1_, float p_178780_2_) { for (TexturedQuad texturedquad : this.field_78254_i) diff --git a/patches/minecraft/net/minecraft/client/model/TexturedQuad.java.patch b/patches/minecraft/net/minecraft/client/model/TexturedQuad.java.patch index 860a67a8b..9712d2d3d 100644 --- a/patches/minecraft/net/minecraft/client/model/TexturedQuad.java.patch +++ b/patches/minecraft/net/minecraft/client/model/TexturedQuad.java.patch @@ -13,6 +13,6 @@ } + @SideOnly(Side.CLIENT) - public void func_178765_a(VertexBuffer p_178765_1_, float p_178765_2_) + public void func_178765_a(BufferBuilder p_178765_1_, float p_178765_2_) { Vec3d vec3d = this.field_78239_a[1].field_78243_a.func_72444_a(this.field_78239_a[0].field_78243_a); diff --git a/patches/minecraft/net/minecraft/client/multiplayer/GuiConnecting.java.patch b/patches/minecraft/net/minecraft/client/multiplayer/GuiConnecting.java.patch index ec649cfc6..f548f649a 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(316, p_146367_1_, p_146367_2_, EnumConnectionState.LOGIN)); -+ GuiConnecting.this.field_146371_g.func_179290_a(new C00Handshake(316, p_146367_1_, p_146367_2_, EnumConnectionState.LOGIN, true)); +- GuiConnecting.this.field_146371_g.func_179290_a(new C00Handshake(335, p_146367_1_, p_146367_2_, EnumConnectionState.LOGIN)); ++ GuiConnecting.this.field_146371_g.func_179290_a(new C00Handshake(335, 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 b3c2fccec..475ea0719 100644 --- a/patches/minecraft/net/minecraft/client/multiplayer/PlayerControllerMP.java.patch +++ b/patches/minecraft/net/minecraft/client/multiplayer/PlayerControllerMP.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/client/multiplayer/PlayerControllerMP.java +++ ../src-work/minecraft/net/minecraft/client/multiplayer/PlayerControllerMP.java -@@ -122,10 +122,16 @@ +@@ -126,10 +126,16 @@ } } @@ -18,7 +18,7 @@ else { World world = this.field_78776_a.field_71441_e; -@@ -143,19 +149,13 @@ +@@ -147,19 +153,13 @@ else { world.func_175718_b(2001, p_187103_1_, Block.func_176210_f(iblockstate)); @@ -39,7 +39,7 @@ if (!itemstack1.func_190926_b()) { -@@ -163,11 +163,18 @@ +@@ -167,11 +167,18 @@ if (itemstack1.func_190926_b()) { @@ -58,34 +58,37 @@ return flag; } } -@@ -207,6 +214,7 @@ - if (this.field_78779_k.func_77145_d()) +@@ -212,6 +219,7 @@ { + this.field_78776_a.func_193032_ao().func_193294_a(this.field_78776_a.field_71441_e, p_180511_1_, this.field_78776_a.field_71441_e.func_180495_p(p_180511_1_), 1.0F); this.field_78774_b.func_147297_a(new CPacketPlayerDigging(CPacketPlayerDigging.Action.START_DESTROY_BLOCK, p_180511_1_, p_180511_2_)); + if (!net.minecraftforge.common.ForgeHooks.onLeftClickBlock(this.field_78776_a.field_71439_g, p_180511_1_, p_180511_2_, net.minecraftforge.common.ForgeHooks.rayTraceEyeHitVec(this.field_78776_a.field_71439_g, func_78757_d() + 1)).isCanceled()) func_178891_a(this.field_78776_a, this, p_180511_1_, p_180511_2_); this.field_78781_i = 5; } -@@ -218,14 +226,17 @@ +@@ -222,6 +230,9 @@ + this.field_78774_b.func_147297_a(new CPacketPlayerDigging(CPacketPlayerDigging.Action.ABORT_DESTROY_BLOCK, this.field_178895_c, p_180511_2_)); } - this.field_78774_b.func_147297_a(new CPacketPlayerDigging(CPacketPlayerDigging.Action.START_DESTROY_BLOCK, p_180511_1_, p_180511_2_)); ++ this.field_78774_b.func_147297_a(new CPacketPlayerDigging(CPacketPlayerDigging.Action.START_DESTROY_BLOCK, p_180511_1_, p_180511_2_)); + net.minecraftforge.event.entity.player.PlayerInteractEvent.LeftClickBlock event = net.minecraftforge.common.ForgeHooks.onLeftClickBlock(this.field_78776_a.field_71439_g, p_180511_1_, p_180511_2_, net.minecraftforge.common.ForgeHooks.rayTraceEyeHitVec(this.field_78776_a.field_71439_g, func_78757_d() + 1)); + IBlockState iblockstate = this.field_78776_a.field_71441_e.func_180495_p(p_180511_1_); - boolean flag = iblockstate.func_185904_a() != Material.field_151579_a; + this.field_78776_a.func_193032_ao().func_193294_a(this.field_78776_a.field_71441_e, p_180511_1_, iblockstate, 0.0F); + this.field_78774_b.func_147297_a(new CPacketPlayerDigging(CPacketPlayerDigging.Action.START_DESTROY_BLOCK, p_180511_1_, p_180511_2_)); +@@ -229,9 +240,11 @@ if (flag && this.field_78770_f == 0.0F) { + if (event.getUseBlock() != net.minecraftforge.fml.common.eventhandler.Event.Result.DENY) iblockstate.func_177230_c().func_180649_a(this.field_78776_a.field_71441_e, p_180511_1_, this.field_78776_a.field_71439_g); } -- + + if (event.getUseItem() == net.minecraftforge.fml.common.eventhandler.Event.Result.DENY) return true; 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_); -@@ -289,7 +300,7 @@ +@@ -297,7 +310,7 @@ if (this.field_78780_h % 4.0F == 0.0F) { @@ -94,7 +97,7 @@ 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_)); } -@@ -341,7 +352,7 @@ +@@ -350,7 +363,7 @@ if (!this.field_85183_f.func_190926_b() && !itemstack.func_190926_b()) { @@ -103,7 +106,7 @@ } return p_178893_1_.equals(this.field_178895_c) && flag; -@@ -373,13 +384,29 @@ +@@ -382,13 +395,29 @@ } else { @@ -135,7 +138,7 @@ } if (!flag && itemstack.func_77973_b() instanceof ItemBlock) -@@ -395,7 +422,7 @@ +@@ -404,7 +433,7 @@ this.field_78774_b.func_147297_a(new CPacketPlayerTryUseItemOnBlock(p_187099_3_, p_187099_4_, p_187099_6_, f, f1, f2)); @@ -144,7 +147,7 @@ { if (itemstack.func_190926_b()) { -@@ -421,14 +448,20 @@ +@@ -430,14 +459,20 @@ { int i = itemstack.func_77960_j(); int j = itemstack.func_190916_E(); @@ -166,7 +169,7 @@ } } } -@@ -457,6 +490,8 @@ +@@ -466,6 +501,8 @@ } else { @@ -174,8 +177,8 @@ + if (cancelResult != null) return cancelResult; 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 +499,10 @@ + ItemStack itemstack1 = actionresult.func_188398_b(); +@@ -473,6 +510,10 @@ if (itemstack1 != itemstack || itemstack1.func_190916_E() != i) { p_187101_1_.func_184611_a(p_187101_3_, itemstack1); @@ -186,7 +189,7 @@ } return actionresult.func_188397_a(); -@@ -500,6 +539,9 @@ +@@ -509,6 +550,9 @@ 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_4_, vec3d)); diff --git a/patches/minecraft/net/minecraft/client/network/NetHandlerPlayClient.java.patch b/patches/minecraft/net/minecraft/client/network/NetHandlerPlayClient.java.patch index d3cf2681e..c9efc08e7 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 -@@ -280,7 +280,7 @@ +@@ -293,7 +293,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(); -@@ -742,7 +742,7 @@ +@@ -755,7 +755,7 @@ if (tileentity != null) { @@ -18,35 +18,27 @@ } } } -@@ -825,14 +825,16 @@ +@@ -838,7 +838,9 @@ public void func_147251_a(SPacketChat p_147251_1_) { PacketThreadUtil.func_180031_a(p_147251_1_, this, this.field_147299_f); -+ net.minecraft.util.text.ITextComponent message = net.minecraftforge.event.ForgeEventFactory.onClientChat(p_147251_1_.func_179841_c(), p_147251_1_.func_148915_c()); +- this.field_147299_f.field_71456_v.func_191742_a(p_147251_1_.func_192590_c(), p_147251_1_.func_148915_c()); ++ net.minecraft.util.text.ITextComponent message = net.minecraftforge.event.ForgeEventFactory.onClientChat(p_147251_1_.func_192590_c(), p_147251_1_.func_148915_c()); + if (message == null) return; - - if (p_147251_1_.func_179841_c() == 2) - { -- this.field_147299_f.field_71456_v.func_175188_a(p_147251_1_.func_148915_c(), false); -+ this.field_147299_f.field_71456_v.func_175188_a(message, false); - } - else - { -- this.field_147299_f.field_71456_v.func_146158_b().func_146227_a(p_147251_1_.func_148915_c()); -+ this.field_147299_f.field_71456_v.func_146158_b().func_146227_a(message); - } ++ this.field_147299_f.field_71456_v.func_191742_a(p_147251_1_.func_192590_c(), message); } -@@ -964,7 +966,7 @@ + public void func_147279_a(SPacketAnimation p_147279_1_) +@@ -969,7 +971,7 @@ if (entity1 == this.field_147299_f.field_71439_g && !flag) { -- this.field_147299_f.field_71456_v.func_110326_a(I18n.func_135052_a("mount.onboard", new Object[] {GameSettings.func_74298_c(this.field_147299_f.field_71474_y.field_74311_E.func_151463_i())}), false); -+ this.field_147299_f.field_71456_v.func_110326_a(I18n.func_135052_a("mount.onboard", new Object[] {this.field_147299_f.field_71474_y.field_74311_E.getDisplayName()}), false); +- this.field_147299_f.field_71456_v.func_110326_a(I18n.func_135052_a("mount.onboard", GameSettings.func_74298_c(this.field_147299_f.field_71474_y.field_74311_E.func_151463_i())), false); ++ this.field_147299_f.field_71456_v.func_110326_a(I18n.func_135052_a("mount.onboard", this.field_147299_f.field_71474_y.field_74311_E.getDisplayName()), false); } } } -@@ -1211,6 +1213,15 @@ +@@ -1217,6 +1219,15 @@ { tileentity.func_145839_a(p_147273_1_.func_148857_g()); } @@ -62,7 +54,7 @@ if (flag && this.field_147299_f.field_71462_r instanceof GuiCommandBlock) { -@@ -1308,15 +1319,15 @@ +@@ -1317,15 +1328,15 @@ } else if (f == 101.0F) { @@ -81,7 +73,7 @@ } } else if (i == 6) -@@ -1430,7 +1441,7 @@ +@@ -1487,7 +1498,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 ca58e0c9e..be543b37f 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(316, serveraddress.func_78861_a(), serveraddress.func_78864_b(), EnumConnectionState.STATUS)); -+ networkmanager.func_179290_a(new C00Handshake(316, serveraddress.func_78861_a(), serveraddress.func_78864_b(), EnumConnectionState.STATUS, true)); +- networkmanager.func_179290_a(new C00Handshake(335, serveraddress.func_78861_a(), serveraddress.func_78864_b(), EnumConnectionState.STATUS)); ++ networkmanager.func_179290_a(new C00Handshake(335, 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 51eb5cbb3..d90b99b15 100644 --- a/patches/minecraft/net/minecraft/client/particle/ParticleManager.java.patch +++ b/patches/minecraft/net/minecraft/client/particle/ParticleManager.java.patch @@ -8,7 +8,7 @@ this.field_187241_h.add(p_78873_1_); } -@@ -387,7 +388,7 @@ +@@ -409,7 +410,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; -@@ -471,4 +472,13 @@ +@@ -493,4 +494,13 @@ return "" + i; } diff --git a/patches/minecraft/net/minecraft/client/renderer/BlockModelShapes.java.patch b/patches/minecraft/net/minecraft/client/renderer/BlockModelShapes.java.patch index 156cea6c9..f4b9120b6 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 -@@ -392,5 +392,6 @@ +@@ -391,5 +391,6 @@ return new ModelResourceLocation(s + "_double_slab", s1); } }); diff --git a/patches/minecraft/net/minecraft/client/renderer/VertexBuffer.java.patch b/patches/minecraft/net/minecraft/client/renderer/BufferBuilder.java.patch similarity index 67% rename from patches/minecraft/net/minecraft/client/renderer/VertexBuffer.java.patch rename to patches/minecraft/net/minecraft/client/renderer/BufferBuilder.java.patch index 834a89968..a1f5d60b8 100644 --- a/patches/minecraft/net/minecraft/client/renderer/VertexBuffer.java.patch +++ b/patches/minecraft/net/minecraft/client/renderer/BufferBuilder.java.patch @@ -1,5 +1,5 @@ ---- ../src-base/minecraft/net/minecraft/client/renderer/VertexBuffer.java -+++ ../src-work/minecraft/net/minecraft/client/renderer/VertexBuffer.java +--- ../src-base/minecraft/net/minecraft/client/renderer/BufferBuilder.java ++++ ../src-work/minecraft/net/minecraft/client/renderer/BufferBuilder.java @@ -123,6 +123,8 @@ bitset.set(i1); @@ -8,8 +8,8 @@ + this.field_178999_b.position(this.func_181664_j()); } - public VertexBuffer.State func_181672_a() -@@ -507,15 +509,15 @@ + public BufferBuilder.State func_181672_a() +@@ -506,15 +508,15 @@ break; case USHORT: case SHORT: @@ -31,13 +31,23 @@ } this.func_181667_k(); -@@ -606,4 +608,9 @@ +@@ -605,4 +607,19 @@ return this.field_179018_e; } } + ++ ++ //For some unknown reason Mojang changed the vanilla function to hardcode alpha as 255.... So lets re-add the parameter -.- ++ public void putColorRGBA(int index, int red, int green, int blue, int alpha) ++ { ++ if (ByteOrder.nativeOrder() == ByteOrder.LITTLE_ENDIAN) ++ this.field_178999_b.put(index, alpha << 24 | blue << 16 | green << 8 | red); ++ else ++ this.field_178999_b.put(index, red << 24 | green << 16 | blue << 8 | alpha); ++ } ++ + public boolean isColorDisabled() + { -+ return field_78939_q; ++ return this.field_78939_q; + } } diff --git a/patches/minecraft/net/minecraft/client/renderer/EntityRenderer.java.patch b/patches/minecraft/net/minecraft/client/renderer/EntityRenderer.java.patch index 0c3cd4b1d..874491c6b 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 -@@ -212,6 +212,7 @@ +@@ -211,6 +211,7 @@ { this.func_175069_a(new ResourceLocation("shaders/post/invert.json")); } @@ -8,7 +8,7 @@ } } -@@ -413,7 +414,7 @@ +@@ -412,7 +413,7 @@ if (d3 < d2 || d2 == 0.0D) { @@ -17,7 +17,7 @@ { if (d2 == 0.0D) { -@@ -506,7 +507,7 @@ +@@ -505,7 +506,7 @@ f = f * 60.0F / 70.0F; } @@ -26,7 +26,7 @@ } } -@@ -570,14 +571,8 @@ +@@ -569,14 +570,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); } -@@ -644,17 +639,20 @@ +@@ -643,17 +638,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); -@@ -772,6 +770,7 @@ +@@ -771,6 +769,7 @@ boolean flag = this.field_78531_r.func_175606_aa() instanceof EntityLivingBase && ((EntityLivingBase)this.field_78531_r.func_175606_aa()).func_70608_bn(); @@ -93,8 +93,8 @@ try { -- this.field_78531_r.field_71462_r.func_73863_a(k1, l1, p_181560_1_); -+ net.minecraftforge.client.ForgeHooksClient.drawScreen(this.field_78531_r.field_71462_r, k1, l1, p_181560_1_); +- this.field_78531_r.field_71462_r.func_73863_a(k1, l1, this.field_78531_r.func_193989_ak()); ++ net.minecraftforge.client.ForgeHooksClient.drawScreen(this.field_78531_r.field_71462_r, k1, l1, this.field_78531_r.func_193989_ak()); } catch (Throwable throwable) { diff --git a/patches/minecraft/net/minecraft/client/renderer/InventoryEffectRenderer.java.patch b/patches/minecraft/net/minecraft/client/renderer/InventoryEffectRenderer.java.patch index 11a8ba613..8279ca875 100644 --- a/patches/minecraft/net/minecraft/client/renderer/InventoryEffectRenderer.java.patch +++ b/patches/minecraft/net/minecraft/client/renderer/InventoryEffectRenderer.java.patch @@ -35,6 +35,6 @@ + potion.renderInventoryEffect(i, j, potioneffect, field_146297_k); + if (!potion.shouldRenderInvText(potioneffect)) { j += l; continue; } - String s1 = I18n.func_135052_a(potion.func_76393_a(), new Object[0]); + String s1 = I18n.func_135052_a(potion.func_76393_a()); if (potioneffect.func_76458_c() == 1) diff --git a/patches/minecraft/net/minecraft/client/renderer/ItemRenderer.java.patch b/patches/minecraft/net/minecraft/client/renderer/ItemRenderer.java.patch index 538b3d411..4c6717f0e 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 -@@ -311,7 +311,7 @@ +@@ -312,7 +312,7 @@ { ItemStack itemstack = abstractclientplayer.func_184607_cu(); @@ -9,7 +9,7 @@ { EnumHand enumhand1 = abstractclientplayer.func_184600_cs(); flag = enumhand1 == EnumHand.MAIN_HAND; -@@ -328,6 +328,7 @@ +@@ -329,6 +329,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); } -@@ -335,6 +336,7 @@ +@@ -336,6 +337,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,7 +25,7 @@ this.func_187457_a(abstractclientplayer, p_78440_1_, f1, EnumHand.OFF_HAND, f4, this.field_187468_e, f6); } -@@ -355,7 +357,7 @@ +@@ -356,7 +358,7 @@ this.func_187456_a(p_187457_7_, p_187457_5_, enumhandside); } } @@ -34,7 +34,7 @@ { if (flag && this.field_187468_e.func_190926_b()) { -@@ -439,6 +441,7 @@ +@@ -440,6 +442,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,7 +42,7 @@ EntityPlayer entityplayer = this.field_78455_a.field_71439_g; for (int i = 0; i < 8; ++i) -@@ -452,11 +455,13 @@ +@@ -453,11 +456,13 @@ if (iblockstate1.func_191058_s()) { iblockstate = iblockstate1; @@ -53,10 +53,10 @@ if (iblockstate.func_185901_i() != EnumBlockRenderType.INVISIBLE) { + if (!net.minecraftforge.event.ForgeEventFactory.renderBlockOverlay(field_78455_a.field_71439_g, p_78447_1_, net.minecraftforge.client.event.RenderBlockOverlayEvent.OverlayType.BLOCK, iblockstate, overlayPos)) - this.func_178108_a(p_78447_1_, this.field_78455_a.func_175602_ab().func_175023_a().func_178122_a(iblockstate)); + this.func_178108_a(this.field_78455_a.func_175602_ab().func_175023_a().func_178122_a(iblockstate)); } } -@@ -465,11 +470,13 @@ +@@ -466,11 +471,13 @@ { if (this.field_78455_a.field_71439_g.func_70055_a(Material.field_151586_h)) { @@ -67,15 +67,15 @@ if (this.field_78455_a.field_71439_g.func_70027_ad()) { + if (!net.minecraftforge.event.ForgeEventFactory.renderFireOverlay(field_78455_a.field_71439_g, p_78447_1_)) - this.func_78442_d(p_78447_1_); + this.func_78442_d(); } } -@@ -591,8 +598,8 @@ +@@ -592,8 +599,8 @@ else { float f = entityplayersp.func_184825_o(1.0F); -- this.field_187469_f += MathHelper.func_76131_a((Objects.equal(this.field_187467_d, itemstack) ? f * f * f : 0.0F) - this.field_187469_f, -0.4F, 0.4F); -- this.field_187471_h += MathHelper.func_76131_a((float)(Objects.equal(this.field_187468_e, itemstack1) ? 1 : 0) - this.field_187471_h, -0.4F, 0.4F); +- this.field_187469_f += MathHelper.func_76131_a((Objects.equals(this.field_187467_d, itemstack) ? f * f * f : 0.0F) - this.field_187469_f, -0.4F, 0.4F); +- this.field_187471_h += MathHelper.func_76131_a((float)(Objects.equals(this.field_187468_e, itemstack1) ? 1 : 0) - this.field_187471_h, -0.4F, 0.4F); + this.field_187469_f += MathHelper.func_76131_a((!net.minecraftforge.client.ForgeHooksClient.shouldCauseReequipAnimation(this.field_187467_d, itemstack, entityplayersp.field_71071_by.field_70461_c) ? f * f * f : 0.0F) - this.field_187469_f, -0.4F, 0.4F); + this.field_187471_h += MathHelper.func_76131_a((float)(!net.minecraftforge.client.ForgeHooksClient.shouldCauseReequipAnimation(this.field_187468_e, itemstack1, -1) ? 1 : 0) - this.field_187471_h, -0.4F, 0.4F); } diff --git a/patches/minecraft/net/minecraft/client/renderer/RenderGlobal.java.patch b/patches/minecraft/net/minecraft/client/renderer/RenderGlobal.java.patch index 7d59dd701..c25d39444 100644 --- a/patches/minecraft/net/minecraft/client/renderer/RenderGlobal.java.patch +++ b/patches/minecraft/net/minecraft/client/renderer/RenderGlobal.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/client/renderer/RenderGlobal.java +++ ../src-work/minecraft/net/minecraft/client/renderer/RenderGlobal.java -@@ -551,8 +551,10 @@ +@@ -552,8 +552,10 @@ public void func_180446_a(Entity p_180446_1_, ICamera p_180446_2_, float p_180446_3_) { @@ -11,7 +11,7 @@ --this.field_72740_G; } else -@@ -563,9 +565,12 @@ +@@ -564,9 +566,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_); @@ -24,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_; -@@ -577,11 +582,15 @@ +@@ -578,11 +583,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(); @@ -35,12 +35,12 @@ for (int i = 0; i < this.field_72769_h.field_73007_j.size(); ++i) { - Entity entity1 = (Entity)this.field_72769_h.field_73007_j.get(i); + Entity entity1 = this.field_72769_h.field_73007_j.get(i); + if (!entity1.shouldRenderInPass(pass)) continue; ++this.field_72749_I; if (entity1.func_145770_h(d0, d1, d2)) -@@ -604,6 +613,7 @@ +@@ -605,6 +614,7 @@ { for (Entity entity2 : classinheritancemultimap) { @@ -48,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) -@@ -640,6 +650,7 @@ +@@ -641,6 +651,7 @@ } } @@ -56,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"); -@@ -679,6 +690,7 @@ +@@ -680,6 +691,7 @@ this.field_72769_h.field_72984_F.func_76318_c("blockentities"); RenderHelper.func_74519_b(); @@ -64,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(); -@@ -687,6 +699,7 @@ +@@ -688,6 +700,7 @@ { for (TileEntity tileentity2 : list3) { @@ -72,7 +72,7 @@ TileEntityRendererDispatcher.field_147556_a.func_180546_a(tileentity2, p_180446_3_, -1); } } -@@ -696,9 +709,11 @@ +@@ -697,9 +710,11 @@ { for (TileEntity tileentity : this.field_181024_n) { @@ -84,7 +84,7 @@ this.func_180443_s(); -@@ -933,7 +948,7 @@ +@@ -950,7 +965,7 @@ BlockPos blockpos2 = renderchunk4.func_178568_j().func_177982_a(8, 8, 8); boolean flag3 = blockpos2.func_177951_i(blockpos1) < 768.0D; @@ -93,7 +93,7 @@ { this.field_175009_l.add(renderchunk4); } -@@ -1220,6 +1235,13 @@ +@@ -1249,6 +1264,13 @@ public void func_174976_a(float p_174976_1_, int p_174976_2_) { @@ -107,7 +107,7 @@ if (this.field_72777_q.field_71441_e.field_73011_w.func_186058_p().func_186068_a() == 1) { this.func_180448_r(); -@@ -1437,6 +1459,12 @@ +@@ -1466,6 +1488,12 @@ public void func_180447_b(float p_180447_1_, int p_180447_2_, double p_180447_3_, double p_180447_5_, double p_180447_7_) { @@ -120,7 +120,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) -@@ -1859,8 +1887,11 @@ +@@ -1888,8 +1916,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(); @@ -133,7 +133,7 @@ { if (d3 * d3 + d4 * d4 + d5 * d5 > 1024.0D) { -@@ -2328,7 +2359,7 @@ +@@ -2384,7 +2415,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 287020018..e2fb0d169 100644 --- a/patches/minecraft/net/minecraft/client/renderer/RenderItem.java.patch +++ b/patches/minecraft/net/minecraft/client/renderer/RenderItem.java.patch @@ -9,16 +9,16 @@ this.func_175041_b(); this.field_184395_f = p_i46552_3_; } -@@ -223,7 +223,7 @@ +@@ -218,7 +218,7 @@ k = k | -16777216; } -- this.func_175033_a(p_175032_1_, bakedquad, k); -+ net.minecraftforge.client.model.pipeline.LightUtil.renderQuadColor(p_175032_1_, bakedquad, k); +- this.func_191969_a(p_191970_1_, bakedquad, k); ++ net.minecraftforge.client.model.pipeline.LightUtil.renderQuadColor(p_191970_1_, bakedquad, k); } } -@@ -245,17 +245,7 @@ +@@ -240,17 +240,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_) -@@ -279,14 +269,9 @@ +@@ -274,14 +264,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,16 +54,16 @@ this.func_180454_a(p_184394_1_, p_184394_2_); GlStateManager.func_187407_a(GlStateManager.CullFace.BACK); GlStateManager.func_179121_F(); -@@ -319,7 +304,7 @@ +@@ -314,7 +299,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()); -- p_184390_4_.func_177552_f().func_181689_a(ItemCameraTransforms.TransformType.GUI); -+ p_184390_4_ = net.minecraftforge.client.ForgeHooksClient.handleCameraTransforms(p_184390_4_, ItemCameraTransforms.TransformType.GUI, false); - this.func_180454_a(p_184390_1_, p_184390_4_); + this.func_180452_a(p_191962_2_, p_191962_3_, p_191962_4_.func_177556_c()); +- p_191962_4_.func_177552_f().func_181689_a(ItemCameraTransforms.TransformType.GUI); ++ p_191962_4_ = net.minecraftforge.client.ForgeHooksClient.handleCameraTransforms(p_191962_4_, ItemCameraTransforms.TransformType.GUI, false); + this.func_180454_a(p_191962_1_, p_191962_4_); GlStateManager.func_179118_c(); GlStateManager.func_179101_C(); -@@ -418,9 +403,12 @@ +@@ -413,9 +398,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(); @@ -77,10 +77,10 @@ { GlStateManager.func_179140_f(); GlStateManager.func_179097_i(); -@@ -429,11 +417,10 @@ +@@ -424,11 +412,10 @@ GlStateManager.func_179084_k(); Tessellator tessellator = Tessellator.func_178181_a(); - VertexBuffer vertexbuffer = tessellator.func_178180_c(); + BufferBuilder bufferbuilder = 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); @@ -90,10 +90,10 @@ + 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); + this.func_181565_a(bufferbuilder, p_180453_3_ + 2, p_180453_4_ + 13, 13, 2, 0, 0, 0, 255); + this.func_181565_a(bufferbuilder, p_180453_3_ + 2, p_180453_4_ + 13, i, 1, j >> 16 & 255, j >> 8 & 255, j & 255, 255); GlStateManager.func_179147_l(); -@@ -1074,6 +1061,7 @@ +@@ -1099,6 +1086,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/WorldVertexBufferUploader.java.patch b/patches/minecraft/net/minecraft/client/renderer/WorldVertexBufferUploader.java.patch index 8b9356ee9..f877af5ab 100644 --- a/patches/minecraft/net/minecraft/client/renderer/WorldVertexBufferUploader.java.patch +++ b/patches/minecraft/net/minecraft/client/renderer/WorldVertexBufferUploader.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/client/renderer/WorldVertexBufferUploader.java +++ ../src-work/minecraft/net/minecraft/client/renderer/WorldVertexBufferUploader.java -@@ -28,26 +28,8 @@ +@@ -27,26 +27,8 @@ int l = vertexformatelement.func_177369_e(); bytebuffer.position(vertexformat.func_181720_d(j)); @@ -29,7 +29,7 @@ } GlStateManager.func_187439_f(p_181679_1_.func_178979_i(), 0, p_181679_1_.func_178989_h()); -@@ -59,23 +41,8 @@ +@@ -58,23 +40,8 @@ VertexFormatElement.EnumUsage vertexformatelement$enumusage1 = vertexformatelement1.func_177375_c(); int k1 = vertexformatelement1.func_177369_e(); 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 f8c27887f..0b07c47e6 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 @@ -43,13 +43,13 @@ try { - this.field_177612_i.put(modelresourcelocation, modelblockdefinition.func_188004_c(modelresourcelocation.func_177518_c())); -+ this.func_177569_a(modelblockdefinition, modelresourcelocation); ++ func_177569_a(modelblockdefinition, modelresourcelocation); } catch (RuntimeException var12) { if (!modelblockdefinition.func_188002_b()) { -- field_177603_c.warn("Unable to load variant: {} from {}", new Object[] {modelresourcelocation.func_177518_c(), modelresourcelocation}); +- field_177603_c.warn("Unable to load variant: {} from {}", modelresourcelocation.func_177518_c(), modelresourcelocation); + field_177603_c.warn("Unable to load variant: " + modelresourcelocation.func_177518_c() + " from " + modelresourcelocation, var12); } } @@ -58,7 +58,7 @@ } - catch (Exception exception) - { -- field_177603_c.warn("Unable to load definition {}", new Object[] {resourcelocation, exception}); +- field_177603_c.warn("Unable to load definition {}", resourcelocation, exception); - } } } @@ -67,23 +67,22 @@ protected void func_177592_e() { -+ this.field_177613_u.clear(); //FML clear this to prevent double ups. - this.field_177613_u.put(Item.func_150898_a(Blocks.field_150348_b), Lists.newArrayList(new String[] {"stone", "granite", "granite_smooth", "diorite", "diorite_smooth", "andesite", "andesite_smooth"})); - this.field_177613_u.put(Item.func_150898_a(Blocks.field_150346_d), Lists.newArrayList(new String[] {"dirt", "coarse_dirt", "podzol"})); - this.field_177613_u.put(Item.func_150898_a(Blocks.field_150344_f), Lists.newArrayList(new String[] {"oak_planks", "spruce_planks", "birch_planks", "jungle_planks", "acacia_planks", "dark_oak_planks"})); -@@ -439,6 +451,11 @@ - 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"})); - this.field_177613_u.put(Items.field_190929_cY, Lists.newArrayList(new String[] {"totem"})); ++ this.field_177613_u.clear(); // FML clear this to prevent double ups. + this.field_177613_u.put(Item.func_150898_a(Blocks.field_150348_b), Lists.newArrayList("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("dirt", "coarse_dirt", "podzol")); + this.field_177613_u.put(Item.func_150898_a(Blocks.field_150344_f), Lists.newArrayList("oak_planks", "spruce_planks", "birch_planks", "jungle_planks", "acacia_planks", "dark_oak_planks")); +@@ -441,6 +453,10 @@ + this.field_177613_u.put(Items.field_179570_aq, Lists.newArrayList("oak_door")); + this.field_177613_u.put(Items.field_151124_az, Lists.newArrayList("oak_boat")); + this.field_177613_u.put(Items.field_190929_cY, Lists.newArrayList("totem")); + for (Entry, Set> e : customVariantNames.entrySet()) + { + this.field_177613_u.put(e.getKey().get(), Lists.newArrayList(e.getValue().iterator())); + } -+ } protected List func_177596_a(Item p_177596_1_) -@@ -455,7 +472,7 @@ +@@ -457,7 +473,7 @@ protected ResourceLocation func_177583_a(String p_177583_1_) { @@ -92,16 +91,16 @@ return new ResourceLocation(resourcelocation.func_110624_b(), "item/" + resourcelocation.func_110623_a()); } -@@ -563,7 +580,7 @@ +@@ -565,7 +581,7 @@ for (Entry entry : this.field_177615_s.entrySet()) { - ResourceLocation resourcelocation = (ResourceLocation)entry.getValue(); -- ModelResourceLocation modelresourcelocation = new ModelResourceLocation((String)entry.getKey(), "inventory"); + ResourceLocation resourcelocation = entry.getValue(); +- ModelResourceLocation modelresourcelocation = new ModelResourceLocation(entry.getKey(), "inventory"); + ModelResourceLocation modelresourcelocation = net.minecraftforge.client.model.ModelLoader.getInventoryVariant(entry.getKey()); - ModelBlock modelblock = (ModelBlock)this.field_177611_h.get(resourcelocation); + ModelBlock modelblock = this.field_177611_h.get(resourcelocation); if (modelblock != null && modelblock.func_178303_d()) -@@ -651,6 +668,11 @@ +@@ -653,6 +669,11 @@ @Nullable private IBakedModel func_177578_a(ModelBlock p_177578_1_, ModelRotation p_177578_2_, boolean p_177578_3_) { @@ -110,12 +109,12 @@ + + protected IBakedModel bakeModel(ModelBlock p_177578_1_, net.minecraftforge.common.model.ITransformation p_177578_2_, boolean p_177578_3_) + { - TextureAtlasSprite textureatlassprite = (TextureAtlasSprite)this.field_177599_g.get(new ResourceLocation(p_177578_1_.func_178308_c("particle"))); + 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); -@@ -667,13 +689,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))); +@@ -669,13 +690,13 @@ + BlockPartFace blockpartface = blockpart.field_178240_c.get(enumfacing); + TextureAtlasSprite textureatlassprite1 = this.field_177599_g.get(new ResourceLocation(p_177578_1_.func_178308_c(blockpartface.field_178242_d))); - if (blockpartface.field_178244_b == null) + if (blockpartface.field_178244_b == null || !net.minecraftforge.common.model.TRSRTransformation.isInteger(p_177578_2_.getMatrix())) @@ -130,7 +129,7 @@ } } } -@@ -684,9 +706,14 @@ +@@ -686,9 +707,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_) { @@ -146,7 +145,7 @@ private void func_177597_h() { this.func_177574_i(); -@@ -907,4 +934,23 @@ +@@ -916,4 +942,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/ModelBlockDefinition.java.patch b/patches/minecraft/net/minecraft/client/renderer/block/model/ModelBlockDefinition.java.patch index 47026f38d..d486d3a6c 100644 --- a/patches/minecraft/net/minecraft/client/renderer/block/model/ModelBlockDefinition.java.patch +++ b/patches/minecraft/net/minecraft/client/renderer/block/model/ModelBlockDefinition.java.patch @@ -4,7 +4,7 @@ public static ModelBlockDefinition func_178331_a(Reader p_178331_0_) { -- return (ModelBlockDefinition)field_178333_a.fromJson(p_178331_0_, ModelBlockDefinition.class); +- return (ModelBlockDefinition)JsonUtils.func_193839_a(field_178333_a, p_178331_0_, ModelBlockDefinition.class); + return net.minecraftforge.client.model.BlockStateLoader.load(p_178331_0_, field_178333_a); } diff --git a/patches/minecraft/net/minecraft/client/renderer/block/model/ModelManager.java.patch b/patches/minecraft/net/minecraft/client/renderer/block/model/ModelManager.java.patch index b05f5c139..5b344f7a1 100644 --- a/patches/minecraft/net/minecraft/client/renderer/block/model/ModelManager.java.patch +++ b/patches/minecraft/net/minecraft/client/renderer/block/model/ModelManager.java.patch @@ -7,7 +7,7 @@ - ModelBakery modelbakery = new ModelBakery(p_110549_1_, this.field_174956_b, this.field_174957_c); + net.minecraftforge.client.model.ModelLoader modelbakery = new net.minecraftforge.client.model.ModelLoader(p_110549_1_, this.field_174956_b, this.field_174957_c); this.field_174958_a = modelbakery.func_177570_a(); - this.field_174955_d = (IBakedModel)this.field_174958_a.func_82594_a(ModelBakery.field_177604_a); + this.field_174955_d = this.field_174958_a.func_82594_a(ModelBakery.field_177604_a); + net.minecraftforge.client.ForgeHooksClient.onModelBake(this, this.field_174958_a, modelbakery); this.field_174957_c.func_178124_c(); } diff --git a/patches/minecraft/net/minecraft/client/renderer/chunk/ChunkRenderDispatcher.java.patch b/patches/minecraft/net/minecraft/client/renderer/chunk/ChunkRenderDispatcher.java.patch index 488101486..8297410b1 100644 --- a/patches/minecraft/net/minecraft/client/renderer/chunk/ChunkRenderDispatcher.java.patch +++ b/patches/minecraft/net/minecraft/client/renderer/chunk/ChunkRenderDispatcher.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/client/renderer/chunk/ChunkRenderDispatcher.java +++ ../src-work/minecraft/net/minecraft/client/renderer/chunk/ChunkRenderDispatcher.java -@@ -43,9 +43,15 @@ +@@ -44,9 +44,15 @@ public ChunkRenderDispatcher() { diff --git a/patches/minecraft/net/minecraft/client/renderer/chunk/RenderChunk.java.patch b/patches/minecraft/net/minecraft/client/renderer/chunk/RenderChunk.java.patch index 451f8ed9f..8914328f4 100644 --- a/patches/minecraft/net/minecraft/client/renderer/chunk/RenderChunk.java.patch +++ b/patches/minecraft/net/minecraft/client/renderer/chunk/RenderChunk.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/client/renderer/chunk/RenderChunk.java +++ ../src-work/minecraft/net/minecraft/client/renderer/chunk/RenderChunk.java -@@ -161,7 +161,7 @@ +@@ -162,7 +162,7 @@ lvt_9_1_.func_178606_a(blockpos$mutableblockpos); } @@ -9,7 +9,7 @@ { TileEntity tileentity = this.field_189564_r.func_190300_a(blockpos$mutableblockpos, Chunk.EnumCreateEntityType.CHECK); -@@ -171,17 +171,19 @@ +@@ -172,17 +172,19 @@ if (tileentityspecialrenderer != null) { @@ -31,16 +31,16 @@ int j = blockrenderlayer1.ordinal(); if (block.func_176223_P().func_185901_i() != EnumBlockRenderType.INVISIBLE) -@@ -196,6 +198,8 @@ +@@ -197,6 +199,8 @@ - aboolean[j] |= blockrendererdispatcher.func_175018_a(iblockstate, blockpos$mutableblockpos, this.field_189564_r, vertexbuffer); + aboolean[j] |= blockrendererdispatcher.func_175018_a(iblockstate, blockpos$mutableblockpos, this.field_189564_r, bufferbuilder); } + } + net.minecraftforge.client.ForgeHooksClient.setRenderLayer(null); } for (BlockRenderLayer blockrenderlayer : BlockRenderLayer.values()) -@@ -277,7 +281,9 @@ +@@ -278,7 +282,9 @@ private void func_189563_q() { int i = 1; @@ -51,7 +51,7 @@ } @Nullable -@@ -426,6 +432,26 @@ +@@ -427,6 +433,26 @@ return this.field_178593_n && this.field_188284_q; } 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 9755484fd..e506385f1 100644 --- a/patches/minecraft/net/minecraft/client/renderer/color/BlockColors.java.patch +++ b/patches/minecraft/net/minecraft/client/renderer/color/BlockColors.java.patch @@ -1,34 +1,34 @@ --- ../src-base/minecraft/net/minecraft/client/renderer/color/BlockColors.java +++ ../src-work/minecraft/net/minecraft/client/renderer/color/BlockColors.java -@@ -26,7 +26,8 @@ +@@ -27,7 +27,8 @@ @SideOnly(Side.CLIENT) public class BlockColors { -- private final ObjectIntIdentityMap field_186725_a = new ObjectIntIdentityMap(32); +- private final ObjectIntIdentityMap field_186725_a = new ObjectIntIdentityMap(32); + // FORGE: Use RegistryDelegates as non-Vanilla block ids are not constant + private final java.util.Map, IBlockColor> blockColorMap = com.google.common.collect.Maps.newHashMap(); public static BlockColors func_186723_a() { -@@ -144,7 +145,7 @@ +@@ -164,7 +165,7 @@ - public int func_189991_a(IBlockState p_189991_1_) + public int func_189991_a(IBlockState p_189991_1_, World p_189991_2_, BlockPos p_189991_3_) { -- IBlockColor iblockcolor = (IBlockColor)this.field_186725_a.func_148745_a(Block.func_149682_b(p_189991_1_.func_177230_c())); -+ IBlockColor iblockcolor = (IBlockColor)this.blockColorMap.get(p_189991_1_.func_177230_c().delegate); +- IBlockColor iblockcolor = this.field_186725_a.func_148745_a(Block.func_149682_b(p_189991_1_.func_177230_c())); ++ IBlockColor iblockcolor = this.blockColorMap.get(p_189991_1_.func_177230_c().delegate); if (iblockcolor != null) { -@@ -159,7 +160,7 @@ +@@ -179,7 +180,7 @@ public int func_186724_a(IBlockState p_186724_1_, @Nullable IBlockAccess p_186724_2_, @Nullable BlockPos p_186724_3_, int p_186724_4_) { -- IBlockColor iblockcolor = (IBlockColor)this.field_186725_a.func_148745_a(Block.func_149682_b(p_186724_1_.func_177230_c())); -+ IBlockColor iblockcolor = (IBlockColor)this.blockColorMap.get(p_186724_1_.func_177230_c().delegate); +- IBlockColor iblockcolor = this.field_186725_a.func_148745_a(Block.func_149682_b(p_186724_1_.func_177230_c())); ++ IBlockColor iblockcolor = this.blockColorMap.get(p_186724_1_.func_177230_c().delegate); return iblockcolor == null ? -1 : iblockcolor.func_186720_a(p_186724_1_, p_186724_2_, p_186724_3_, p_186724_4_); } -@@ -167,7 +168,9 @@ +@@ -187,7 +188,9 @@ { for (Block block : p_186722_2_) { diff --git a/patches/minecraft/net/minecraft/client/renderer/color/ItemColors.java.patch b/patches/minecraft/net/minecraft/client/renderer/color/ItemColors.java.patch index c250d8cca..f09b43255 100644 --- a/patches/minecraft/net/minecraft/client/renderer/color/ItemColors.java.patch +++ b/patches/minecraft/net/minecraft/client/renderer/color/ItemColors.java.patch @@ -4,22 +4,22 @@ @SideOnly(Side.CLIENT) public class ItemColors { -- private final ObjectIntIdentityMap field_186732_a = new ObjectIntIdentityMap(32); +- private final ObjectIntIdentityMap field_186732_a = new ObjectIntIdentityMap(32); + // FORGE: Use RegistryDelegates as non-Vanilla item ids are not constant + private final java.util.Map, IItemColor> itemColorMap = com.google.common.collect.Maps.newHashMap(); public static ItemColors func_186729_a(final BlockColors p_186729_0_) { -@@ -134,7 +135,7 @@ +@@ -142,7 +143,7 @@ public int func_186728_a(ItemStack p_186728_1_, int p_186728_2_) { -- IItemColor iitemcolor = (IItemColor)this.field_186732_a.func_148745_a(Item.field_150901_e.func_148757_b(p_186728_1_.func_77973_b())); -+ IItemColor iitemcolor = (IItemColor)this.itemColorMap.get(p_186728_1_.func_77973_b().delegate); +- IItemColor iitemcolor = this.field_186732_a.func_148745_a(Item.field_150901_e.func_148757_b(p_186728_1_.func_77973_b())); ++ IItemColor iitemcolor = this.itemColorMap.get(p_186728_1_.func_77973_b().delegate); return iitemcolor == null ? -1 : iitemcolor.func_186726_a(p_186728_1_, p_186728_2_); } -@@ -142,7 +143,9 @@ +@@ -150,7 +151,9 @@ { for (Block block : p_186731_2_) { @@ -30,7 +30,7 @@ } } -@@ -150,7 +153,9 @@ +@@ -158,7 +161,9 @@ { for (Item item : p_186730_2_) { diff --git a/patches/minecraft/net/minecraft/client/renderer/tileentity/RenderItemFrame.java.patch b/patches/minecraft/net/minecraft/client/renderer/entity/RenderItemFrame.java.patch similarity index 51% rename from patches/minecraft/net/minecraft/client/renderer/tileentity/RenderItemFrame.java.patch rename to patches/minecraft/net/minecraft/client/renderer/entity/RenderItemFrame.java.patch index 9e7a02230..b8ea55b2d 100644 --- a/patches/minecraft/net/minecraft/client/renderer/tileentity/RenderItemFrame.java.patch +++ b/patches/minecraft/net/minecraft/client/renderer/entity/RenderItemFrame.java.patch @@ -1,27 +1,21 @@ ---- ../src-base/minecraft/net/minecraft/client/renderer/tileentity/RenderItemFrame.java -+++ ../src-work/minecraft/net/minecraft/client/renderer/tileentity/RenderItemFrame.java -@@ -106,15 +106,18 @@ +--- ../src-base/minecraft/net/minecraft/client/renderer/entity/RenderItemFrame.java ++++ ../src-work/minecraft/net/minecraft/client/renderer/entity/RenderItemFrame.java +@@ -96,10 +96,13 @@ + { + GlStateManager.func_179094_E(); GlStateManager.func_179140_f(); - int i = p_82402_1_.func_82333_j(); - -- if (item == Items.field_151098_aY) -+ if (item instanceof net.minecraft.item.ItemMap) - { - i = i % 4 * 2; - } - +- boolean flag = itemstack.func_77973_b() == Items.field_151098_aY; ++ boolean flag = itemstack.func_77973_b() instanceof net.minecraft.item.ItemMap; + int i = flag ? p_82402_1_.func_82333_j() % 4 * 2 : p_82402_1_.func_82333_j(); GlStateManager.func_179114_b((float)i * 360.0F / 8.0F, 0.0F, 0.0F, 1.0F); -- if (item == Items.field_151098_aY) + net.minecraftforge.client.event.RenderItemInFrameEvent event = new net.minecraftforge.client.event.RenderItemInFrameEvent(p_82402_1_, this); + if (!net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(event)) - { -+ if (item instanceof net.minecraft.item.ItemMap) + { + if (flag) + { 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; -@@ -137,6 +140,7 @@ +@@ -124,6 +127,7 @@ RenderHelper.func_74518_a(); GlStateManager.func_179099_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 950486400..eb6ce86f6 100644 --- a/patches/minecraft/net/minecraft/client/renderer/entity/RenderLivingBase.java.patch +++ b/patches/minecraft/net/minecraft/client/renderer/entity/RenderLivingBase.java.patch @@ -33,15 +33,15 @@ { 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_); -@@ -107,6 +112,7 @@ +@@ -133,6 +138,7 @@ { - f += f3 * 0.2F; + f5 = 1.0F; } + f2 = f1 - f; // Forge: Fix MC-1207 } - float f7 = p_76986_1_.field_70127_C + (p_76986_1_.field_70125_A - p_76986_1_.field_70127_C) * p_76986_9_; -@@ -192,6 +198,7 @@ + GlStateManager.func_179141_d(); +@@ -194,6 +200,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_); @@ -49,7 +49,7 @@ } public float func_188322_c(T p_188322_1_, float p_188322_2_) -@@ -447,10 +454,11 @@ +@@ -454,10 +461,11 @@ public void func_177067_a(T p_177067_1_, double p_177067_2_, double p_177067_4_, double p_177067_6_) { @@ -62,7 +62,7 @@ if (d0 < (double)(f * f)) { -@@ -459,6 +467,7 @@ +@@ -466,6 +474,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 901928cd5..c7756b937 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 -@@ -226,8 +226,13 @@ +@@ -227,8 +227,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_; -@@ -276,9 +281,9 @@ +@@ -277,9 +282,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/RenderPlayer.java.patch b/patches/minecraft/net/minecraft/client/renderer/entity/RenderPlayer.java.patch index dca69401e..90797a0b8 100644 --- a/patches/minecraft/net/minecraft/client/renderer/entity/RenderPlayer.java.patch +++ b/patches/minecraft/net/minecraft/client/renderer/entity/RenderPlayer.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/client/renderer/entity/RenderPlayer.java +++ ../src-work/minecraft/net/minecraft/client/renderer/entity/RenderPlayer.java -@@ -55,6 +55,7 @@ +@@ -56,6 +56,7 @@ public void func_76986_a(AbstractClientPlayer p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_, float p_76986_9_) { @@ -8,7 +8,7 @@ if (!p_76986_1_.func_175144_cb() || this.field_76990_c.field_78734_h == p_76986_1_) { double d0 = p_76986_4_; -@@ -69,6 +70,7 @@ +@@ -70,6 +71,7 @@ super.func_76986_a(p_76986_1_, p_76986_2_, d0, p_76986_6_, p_76986_8_, p_76986_9_); GlStateManager.func_187440_b(GlStateManager.Profile.PLAYER_SKIN); } @@ -16,7 +16,7 @@ } private void func_177137_d(AbstractClientPlayer p_177137_1_) -@@ -127,6 +129,11 @@ +@@ -128,6 +130,11 @@ { modelbiped$armpose1 = ModelBiped.ArmPose.BLOCK; } 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 c9033a06d..628916d7b 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 @@ -54,7 +54,7 @@ + @Deprecated //Use the more sensitive version getArmorResource below 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_})}); + String s = String.format("textures/models/armor/%s_layer_%d%s.png", p_177178_1_.func_82812_d().func_179242_c(), p_177178_2_ ? 2 : 1, p_177178_3_ == null ? "" : String.format("_%s", p_177178_3_)); @@ -161,4 +161,49 @@ protected abstract void func_177177_a(); diff --git a/patches/minecraft/net/minecraft/client/renderer/texture/Stitcher.java.patch b/patches/minecraft/net/minecraft/client/renderer/texture/Stitcher.java.patch index 119ed55e6..cf292a07a 100644 --- a/patches/minecraft/net/minecraft/client/renderer/texture/Stitcher.java.patch +++ b/patches/minecraft/net/minecraft/client/renderer/texture/Stitcher.java.patch @@ -11,7 +11,7 @@ + bar.step(stitcher$holder.func_98150_a().func_94215_i()); if (!this.func_94310_b(stitcher$holder)) { - String s = String.format("Unable to fit: %s - size: %dx%d - Maybe try a lowerresolution resourcepack?", new Object[] {stitcher$holder.func_98150_a().func_94215_i(), Integer.valueOf(stitcher$holder.func_98150_a().func_94211_a()), Integer.valueOf(stitcher$holder.func_98150_a().func_94216_b())}); + String s = String.format("Unable to fit: %s - size: %dx%d - Maybe try a lowerresolution resourcepack?", stitcher$holder.func_98150_a().func_94215_i(), stitcher$holder.func_98150_a().func_94211_a(), stitcher$holder.func_98150_a().func_94216_b()); + net.minecraftforge.fml.common.FMLLog.info(s); + for (Stitcher.Holder h : astitcher$holder) + net.minecraftforge.fml.common.FMLLog.info(" %s", h); diff --git a/patches/minecraft/net/minecraft/client/renderer/texture/TextureAtlasSprite.java.patch b/patches/minecraft/net/minecraft/client/renderer/texture/TextureAtlasSprite.java.patch index e81315232..f00d1c6fd 100644 --- a/patches/minecraft/net/minecraft/client/renderer/texture/TextureAtlasSprite.java.patch +++ b/patches/minecraft/net/minecraft/client/renderer/texture/TextureAtlasSprite.java.patch @@ -19,7 +19,7 @@ public void func_94217_a(TextureAtlasSprite p_94217_1_) @@ -398,4 +396,30 @@ { - return "TextureAtlasSprite{name=\'" + this.field_110984_i + '\'' + ", frameCount=" + this.field_110976_a.size() + ", rotated=" + this.field_130222_e + ", x=" + this.field_110975_c + ", y=" + this.field_110974_d + ", height=" + this.field_130224_d + ", width=" + this.field_130223_c + ", u0=" + this.field_110979_l + ", u1=" + this.field_110980_m + ", v0=" + this.field_110977_n + ", v1=" + this.field_110978_o + '}'; + return "TextureAtlasSprite{name='" + this.field_110984_i + '\'' + ", frameCount=" + this.field_110976_a.size() + ", rotated=" + this.field_130222_e + ", x=" + this.field_110975_c + ", y=" + this.field_110974_d + ", height=" + this.field_130224_d + ", width=" + this.field_130223_c + ", u0=" + this.field_110979_l + ", u1=" + this.field_110980_m + ", v0=" + this.field_110977_n + ", v1=" + this.field_110978_o + '}'; } + + /*===================================== FORGE START =====================================*/ diff --git a/patches/minecraft/net/minecraft/client/renderer/texture/TextureManager.java.patch b/patches/minecraft/net/minecraft/client/renderer/texture/TextureManager.java.patch index 637effc1c..8112c0668 100644 --- a/patches/minecraft/net/minecraft/client/renderer/texture/TextureManager.java.patch +++ b/patches/minecraft/net/minecraft/client/renderer/texture/TextureManager.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/client/renderer/texture/TextureManager.java +++ ../src-work/minecraft/net/minecraft/client/renderer/texture/TextureManager.java -@@ -131,15 +131,19 @@ +@@ -137,17 +137,20 @@ if (itextureobject != null) { @@ -12,10 +12,18 @@ public void func_110549_a(IResourceManager p_110549_1_) { + net.minecraftforge.fml.common.ProgressManager.ProgressBar bar = net.minecraftforge.fml.common.ProgressManager.push("Reloading Texture Manager", this.field_110585_a.keySet().size(), true); - for (Entry entry : this.field_110585_a.entrySet()) + Iterator> iterator = this.field_110585_a.entrySet().iterator(); + + while (iterator.hasNext()) { + Entry entry = (Entry)iterator.next(); + bar.step(entry.getKey().toString()); - this.func_110579_a((ResourceLocation)entry.getKey(), (ITextureObject)entry.getValue()); + ITextureObject itextureobject = entry.getValue(); + + if (itextureobject == TextureUtil.field_111001_a) +@@ -159,5 +162,6 @@ + this.func_110579_a(entry.getKey(), itextureobject); + } } + net.minecraftforge.fml.common.ProgressManager.pop(bar); } diff --git a/patches/minecraft/net/minecraft/client/renderer/texture/TextureMap.java.patch b/patches/minecraft/net/minecraft/client/renderer/texture/TextureMap.java.patch index 8da367b5a..9841f87d7 100644 --- a/patches/minecraft/net/minecraft/client/renderer/texture/TextureMap.java.patch +++ b/patches/minecraft/net/minecraft/client/renderer/texture/TextureMap.java.patch @@ -48,19 +48,19 @@ p_174943_2_.func_177059_a(this); this.func_110569_e(); this.func_147631_c(); -@@ -89,12 +103,25 @@ +@@ -88,13 +102,25 @@ + this.field_94258_i.clear(); int j = Integer.MAX_VALUE; int k = 1 << this.field_147636_j; - + net.minecraftforge.fml.common.FMLLog.info("Max texture size: %d", i); + net.minecraftforge.fml.common.ProgressManager.ProgressBar bar = net.minecraftforge.fml.common.ProgressManager.push("Texture stitching", skipFirst ? 0 : this.field_110574_e.size()); -+ + + if(!skipFirst) for (Entry entry : this.field_110574_e.entrySet()) { - TextureAtlasSprite textureatlassprite = (TextureAtlasSprite)entry.getValue(); + TextureAtlasSprite textureatlassprite = entry.getValue(); ResourceLocation resourcelocation = this.func_184396_a(textureatlassprite); -+ bar.step(resourcelocation.func_110623_a()); ++ bar.step(resourcelocation.toString()); IResource iresource = null; + if (textureatlassprite.hasCustomLoader(p_110571_1_, resourcelocation)) @@ -74,31 +74,31 @@ try { PngSizeInfo pngsizeinfo = PngSizeInfo.func_188532_a(p_110571_1_.func_110536_a(resourcelocation)); -@@ -104,12 +131,14 @@ +@@ -104,12 +130,14 @@ } catch (RuntimeException runtimeexception) { -- field_147635_d.error("Unable to parse metadata from {}", new Object[] {resourcelocation, runtimeexception}); -+ //LOGGER.error("Unable to parse metadata from {}", new Object[] {resourcelocation, runtimeexception}); +- field_147635_d.error("Unable to parse metadata from {}", resourcelocation, runtimeexception); ++ //LOGGER.error("Unable to parse metadata from {}", resourcelocation, runtimeexception); + net.minecraftforge.fml.client.FMLClientHandler.instance().trackBrokenTexture(resourcelocation, runtimeexception.getMessage()); continue; } catch (IOException ioexception) { -- field_147635_d.error("Using missing texture, unable to load {}", new Object[] {resourcelocation, ioexception}); -+ //LOGGER.error("Using missing texture, unable to load {}", new Object[] {resourcelocation, ioexception}); +- field_147635_d.error("Using missing texture, unable to load {}", resourcelocation, ioexception); ++ //LOGGER.error("Using missing texture, unable to load {}", resourcelocation, ioexception); + net.minecraftforge.fml.client.FMLClientHandler.instance().trackMissingTexture(resourcelocation); continue; } finally -@@ -122,17 +151,18 @@ +@@ -122,17 +150,18 @@ - if (lvt_11_2_ < k) + if (j1 < k) { -- field_147635_d.warn("Texture {} with size {}x{} limits mip level from {} to {}", new Object[] {resourcelocation, Integer.valueOf(textureatlassprite.func_94211_a()), Integer.valueOf(textureatlassprite.func_94216_b()), Integer.valueOf(MathHelper.func_151239_c(k)), Integer.valueOf(MathHelper.func_151239_c(lvt_11_2_))}); -- k = lvt_11_2_; +- field_147635_d.warn("Texture {} with size {}x{} limits mip level from {} to {}", resourcelocation, Integer.valueOf(textureatlassprite.func_94211_a()), Integer.valueOf(textureatlassprite.func_94216_b()), Integer.valueOf(MathHelper.func_151239_c(k)), Integer.valueOf(MathHelper.func_151239_c(j1))); +- k = j1; + // FORGE: do not lower the mipmap level, just log the problematic textures -+ field_147635_d.warn("Texture {} with size {}x{} will have visual artifacts at mip level {}, it can only support level {}. Please report to the mod author that the texture should be some multiple of 16x16.", resourcelocation, textureatlassprite.func_94211_a(), textureatlassprite.func_94216_b(), MathHelper.func_151239_c(k), MathHelper.func_151239_c(lvt_11_2_)); ++ field_147635_d.warn("Texture {} with size {}x{} will have visual artifacts at mip level {}, it can only support level {}. Please report to the mod author that the texture should be some multiple of 16x16.", resourcelocation, Integer.valueOf(textureatlassprite.func_94211_a()), Integer.valueOf(textureatlassprite.func_94216_b()), Integer.valueOf(MathHelper.func_151239_c(k)), Integer.valueOf(MathHelper.func_151239_c(j1))); } stitcher.func_110934_a(textureatlassprite); @@ -109,11 +109,11 @@ int i1 = MathHelper.func_151239_c(l); - if (i1 < this.field_147636_j) -+ if (false && i1 < this.field_147636_j) // FORGE: do not lower the mipmap level ++ if (false && i1 < this.field_147636_j) // FORGE: do not lower the mipmap level { - field_147635_d.warn("{}: dropping miplevel from {} to {}, because of minimum power of two: {}", new Object[] {this.field_94254_c, Integer.valueOf(this.field_147636_j), Integer.valueOf(i1), Integer.valueOf(l)}); + field_147635_d.warn("{}: dropping miplevel from {} to {}, because of minimum power of two: {}", this.field_94254_c, Integer.valueOf(this.field_147636_j), Integer.valueOf(i1), Integer.valueOf(l)); this.field_147636_j = i1; -@@ -140,9 +170,12 @@ +@@ -140,9 +169,12 @@ this.field_94249_f.func_147963_d(this.field_147636_j); stitcher.func_110934_a(this.field_94249_f); @@ -126,10 +126,10 @@ stitcher.func_94305_f(); } catch (StitcherException stitcherexception) -@@ -151,11 +184,16 @@ +@@ -151,11 +183,16 @@ } - field_147635_d.info("Created: {}x{} {}-atlas", new Object[] {Integer.valueOf(stitcher.func_110935_a()), Integer.valueOf(stitcher.func_110936_b()), this.field_94254_c}); + field_147635_d.info("Created: {}x{} {}-atlas", Integer.valueOf(stitcher.func_110935_a()), Integer.valueOf(stitcher.func_110936_b()), this.field_94254_c); + bar.step("Allocating GL texture"); TextureUtil.func_180600_a(this.func_110552_b(), this.field_147636_j, stitcher.func_110935_a(), stitcher.func_110936_b()); Map map = Maps.newHashMap(this.field_110574_e); @@ -143,7 +143,7 @@ if (textureatlassprite1 == this.field_94249_f || this.func_184397_a(p_110571_1_, textureatlassprite1)) { String s = textureatlassprite1.func_94215_i(); -@@ -186,6 +224,13 @@ +@@ -186,6 +223,13 @@ { textureatlassprite2.func_94217_a(this.field_94249_f); } @@ -157,25 +157,25 @@ } private boolean func_184397_a(IResourceManager p_184397_1_, final TextureAtlasSprite p_184397_2_) -@@ -195,7 +240,7 @@ - label9: +@@ -195,7 +239,7 @@ + label62: { boolean flag; - -+ if (p_184397_2_.hasCustomLoader(p_184397_1_, resourcelocation)) break label9; ++ if (p_184397_2_.hasCustomLoader(p_184397_1_, resourcelocation)) break label62; try { iresource = p_184397_1_.func_110536_a(resourcelocation); -@@ -292,7 +337,7 @@ +@@ -292,7 +336,7 @@ } else { -- TextureAtlasSprite textureatlassprite = (TextureAtlasSprite)this.field_110574_e.get(p_174942_1_); -+ TextureAtlasSprite textureatlassprite = (TextureAtlasSprite)this.field_110574_e.get(p_174942_1_.toString()); +- TextureAtlasSprite textureatlassprite = this.field_110574_e.get(p_174942_1_); ++ TextureAtlasSprite textureatlassprite = this.field_110574_e.get(p_174942_1_.toString()); if (textureatlassprite == null) { -@@ -318,4 +363,48 @@ +@@ -318,4 +362,48 @@ { return this.field_94249_f; } 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 93804b3b7..526faae0d 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 -@@ -106,6 +106,7 @@ +@@ -118,6 +118,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); + TileEntityRendererDispatcher.field_147556_a.func_192855_a(field_191274_b[BlockShulkerBox.func_190955_b(item).func_176765_a()], 0.0D, 0.0D, 0.0D, 0.0F, p_192838_2_); } -+ 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 if (Block.func_149634_a(item) != Blocks.field_150486_ae) net.minecraftforge.client.ForgeHooksClient.renderTileItem(p_192838_1_.func_77973_b(), p_192838_1_.func_77960_j()); else { - TileEntityRendererDispatcher.field_147556_a.func_147549_a(this.field_147717_b, 0.0D, 0.0D, 0.0D, 0.0F); + TileEntityRendererDispatcher.field_147556_a.func_192855_a(this.field_147717_b, 0.0D, 0.0D, 0.0D, 0.0F, p_192838_2_); diff --git a/patches/minecraft/net/minecraft/client/renderer/tileentity/TileEntityPistonRenderer.java.patch b/patches/minecraft/net/minecraft/client/renderer/tileentity/TileEntityPistonRenderer.java.patch index d70da76e8..48dd4c3a5 100644 --- a/patches/minecraft/net/minecraft/client/renderer/tileentity/TileEntityPistonRenderer.java.patch +++ b/patches/minecraft/net/minecraft/client/renderer/tileentity/TileEntityPistonRenderer.java.patch @@ -7,9 +7,9 @@ - private final BlockRendererDispatcher field_178462_c = Minecraft.func_71410_x().func_175602_ab(); + private BlockRendererDispatcher field_178462_c; - public void func_180535_a(TileEntityPiston p_180535_1_, double p_180535_2_, double p_180535_4_, double p_180535_6_, float p_180535_8_, int p_180535_9_) + public void func_192841_a(TileEntityPiston p_192841_1_, double p_192841_2_, double p_192841_4_, double p_192841_6_, float p_192841_8_, int p_192841_9_, float p_192841_10_) { -+ if(field_178462_c == null) field_178462_c = Minecraft.func_71410_x().func_175602_ab(); - BlockPos blockpos = p_180535_1_.func_174877_v(); - IBlockState iblockstate = p_180535_1_.func_174927_b(); ++ if (field_178462_c == null) field_178462_c = Minecraft.func_71410_x().func_175602_ab(); //Forge: Delay this from constructor to allow us to change it later + BlockPos blockpos = p_192841_1_.func_174877_v(); + IBlockState iblockstate = p_192841_1_.func_174927_b(); Block block = iblockstate.func_177230_c(); 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 578dd2c4f..cb4bcca93 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 -@@ -116,11 +116,14 @@ +@@ -118,11 +118,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(); @@ -13,21 +13,19 @@ GlStateManager.func_179131_c(1.0F, 1.0F, 1.0F, 1.0F); + } 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_); + this.func_192854_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_, 1.0F); } -@@ -139,6 +142,11 @@ +@@ -146,6 +149,9 @@ { try { -+ if(drawingBatch && p_178469_1_.hasFastRenderer()) -+ { -+ tileentityspecialrenderer.renderTileEntityFast(p_178469_1_, p_178469_2_, p_178469_4_, p_178469_6_, p_178469_8_, p_178469_9_, batchBuffer.func_178180_c()); -+ } ++ if(drawingBatch && p_192854_1_.hasFastRenderer()) ++ tileentityspecialrenderer.renderTileEntityFast(p_192854_1_, p_192854_2_, p_192854_4_, p_192854_6_, p_192854_8_, p_192854_9_, p_192854_10_, batchBuffer.func_178180_c()); + else - tileentityspecialrenderer.func_180535_a(p_178469_1_, p_178469_2_, p_178469_4_, p_178469_6_, p_178469_8_, p_178469_9_); + tileentityspecialrenderer.func_192841_a(p_192854_1_, p_192854_2_, p_192854_4_, p_192854_6_, p_192854_8_, p_192854_9_, p_192854_10_); } catch (Throwable throwable) -@@ -165,4 +173,52 @@ +@@ -172,4 +178,52 @@ { return this.field_147557_n; } diff --git a/patches/minecraft/net/minecraft/client/renderer/tileentity/TileEntitySpecialRenderer.java.patch b/patches/minecraft/net/minecraft/client/renderer/tileentity/TileEntitySpecialRenderer.java.patch index 165835c27..471c25f00 100644 --- a/patches/minecraft/net/minecraft/client/renderer/tileentity/TileEntitySpecialRenderer.java.patch +++ b/patches/minecraft/net/minecraft/client/renderer/tileentity/TileEntitySpecialRenderer.java.patch @@ -4,7 +4,7 @@ return false; } -+ public void renderTileEntityFast(T te, double x, double y, double z, float partialTicks, int destroyStage, net.minecraft.client.renderer.VertexBuffer buffer) {} ++ public void renderTileEntityFast(T te, double x, double y, double z, float partialTicks, int destroyStage, float partial, net.minecraft.client.renderer.BufferBuilder buffer) {} + protected void func_190052_a(T p_190052_1_, String p_190052_2_, double p_190052_3_, double p_190052_5_, double p_190052_7_, int p_190052_9_) { diff --git a/patches/minecraft/net/minecraft/client/renderer/vertex/VertexFormatElement.java.patch b/patches/minecraft/net/minecraft/client/renderer/vertex/VertexFormatElement.java.patch index 9faa76e8f..7638560c2 100644 --- a/patches/minecraft/net/minecraft/client/renderer/vertex/VertexFormatElement.java.patch +++ b/patches/minecraft/net/minecraft/client/renderer/vertex/VertexFormatElement.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/client/renderer/vertex/VertexFormatElement.java +++ ../src-work/minecraft/net/minecraft/client/renderer/vertex/VertexFormatElement.java -@@ -142,10 +142,17 @@ +@@ -158,10 +158,17 @@ NORMAL("Normal"), COLOR("Vertex Color"), UV("UV"), diff --git a/patches/minecraft/net/minecraft/client/resources/Language.java.patch b/patches/minecraft/net/minecraft/client/resources/Language.java.patch index 24f2c43ec..1e729c942 100644 --- a/patches/minecraft/net/minecraft/client/resources/Language.java.patch +++ b/patches/minecraft/net/minecraft/client/resources/Language.java.patch @@ -8,7 +8,7 @@ } public String func_135034_a() -@@ -48,4 +49,8 @@ +@@ -55,4 +56,8 @@ { return this.field_135039_a.compareTo(p_compareTo_1_.field_135039_a); } diff --git a/patches/minecraft/net/minecraft/client/resources/Locale.java.patch b/patches/minecraft/net/minecraft/client/resources/Locale.java.patch index 95dc701db..3d878a45a 100644 --- a/patches/minecraft/net/minecraft/client/resources/Locale.java.patch +++ b/patches/minecraft/net/minecraft/client/resources/Locale.java.patch @@ -6,6 +6,6 @@ { + p_135021_1_ = net.minecraftforge.fml.common.FMLCommonHandler.instance().loadLanguage(field_135032_a, p_135021_1_); + if (p_135021_1_ == null) return; - for (String s : IOUtils.readLines(p_135021_1_, Charsets.UTF_8)) + for (String s : IOUtils.readLines(p_135021_1_, StandardCharsets.UTF_8)) { - if (!s.isEmpty() && s.charAt(0) != 35) + if (!s.isEmpty() && s.charAt(0) != '#') diff --git a/patches/minecraft/net/minecraft/client/resources/SimpleReloadableResourceManager.java.patch b/patches/minecraft/net/minecraft/client/resources/SimpleReloadableResourceManager.java.patch index 53804f5e3..f2b81d4cb 100644 --- a/patches/minecraft/net/minecraft/client/resources/SimpleReloadableResourceManager.java.patch +++ b/patches/minecraft/net/minecraft/client/resources/SimpleReloadableResourceManager.java.patch @@ -6,9 +6,9 @@ { + net.minecraftforge.fml.common.ProgressManager.ProgressBar resReload = net.minecraftforge.fml.common.ProgressManager.push("Loading Resources", p_110541_1_.size()+1, true); this.func_110543_a(); - field_147967_a.info("Reloading ResourceManager: {}", new Object[] {field_130074_a.join(Iterables.transform(p_110541_1_, new Function() + field_147967_a.info("Reloading ResourceManager: {}", (Object)field_130074_a.join(Iterables.transform(p_110541_1_, new Function() { -@@ -104,23 +105,32 @@ +@@ -103,23 +104,32 @@ for (IResourcePack iresourcepack : p_110541_1_) { diff --git a/patches/minecraft/net/minecraft/client/settings/GameSettings.java.patch b/patches/minecraft/net/minecraft/client/settings/GameSettings.java.patch index cbc4fad7f..c934f2e6a 100644 --- a/patches/minecraft/net/minecraft/client/settings/GameSettings.java.patch +++ b/patches/minecraft/net/minecraft/client/settings/GameSettings.java.patch @@ -1,22 +1,22 @@ --- ../src-base/minecraft/net/minecraft/client/settings/GameSettings.java +++ ../src-work/minecraft/net/minecraft/client/settings/GameSettings.java -@@ -156,6 +156,7 @@ +@@ -165,6 +165,7 @@ public GameSettings(Minecraft p_i46326_1_, File p_i46326_2_) { + setForgeKeybindProperties(); - this.field_74324_K = (KeyBinding[])ArrayUtils.addAll(new KeyBinding[] {this.field_74312_F, this.field_74313_G, this.field_74351_w, this.field_74370_x, this.field_74368_y, this.field_74366_z, this.field_74314_A, this.field_74311_E, this.field_151444_V, this.field_74316_C, this.field_151445_Q, this.field_74310_D, this.field_74321_H, this.field_74322_I, this.field_74323_J, this.field_151447_Z, this.field_151457_aa, this.field_151458_ab, this.field_152395_am, this.field_178883_an, this.field_186718_X}, this.field_151456_ac); + this.field_74324_K = (KeyBinding[])ArrayUtils.addAll(new KeyBinding[] {this.field_74312_F, this.field_74313_G, this.field_74351_w, this.field_74370_x, this.field_74368_y, this.field_74366_z, this.field_74314_A, this.field_74311_E, this.field_151444_V, this.field_74316_C, this.field_151445_Q, this.field_74310_D, this.field_74321_H, this.field_74322_I, this.field_74323_J, this.field_151447_Z, this.field_151457_aa, this.field_151458_ab, this.field_152395_am, this.field_178883_an, this.field_186718_X, this.field_193629_ap, this.field_193630_aq, this.field_194146_ao}, this.field_151456_ac); this.field_74318_M = EnumDifficulty.NORMAL; this.field_74332_R = ""; -@@ -179,6 +180,7 @@ +@@ -188,6 +189,7 @@ public GameSettings() { + setForgeKeybindProperties(); - this.field_74324_K = (KeyBinding[])ArrayUtils.addAll(new KeyBinding[] {this.field_74312_F, this.field_74313_G, this.field_74351_w, this.field_74370_x, this.field_74368_y, this.field_74366_z, this.field_74314_A, this.field_74311_E, this.field_151444_V, this.field_74316_C, this.field_151445_Q, this.field_74310_D, this.field_74321_H, this.field_74322_I, this.field_74323_J, this.field_151447_Z, this.field_151457_aa, this.field_151458_ab, this.field_152395_am, this.field_178883_an, this.field_186718_X}, this.field_151456_ac); + this.field_74324_K = (KeyBinding[])ArrayUtils.addAll(new KeyBinding[] {this.field_74312_F, this.field_74313_G, this.field_74351_w, this.field_74370_x, this.field_74368_y, this.field_74366_z, this.field_74314_A, this.field_74311_E, this.field_151444_V, this.field_74316_C, this.field_151445_Q, this.field_74310_D, this.field_74321_H, this.field_74322_I, this.field_74323_J, this.field_151447_Z, this.field_151457_aa, this.field_151458_ab, this.field_152395_am, this.field_178883_an, this.field_186718_X, this.field_193629_ap, this.field_193630_aq, this.field_194146_ao}, this.field_151456_ac); this.field_74318_M = EnumDifficulty.NORMAL; this.field_74332_R = ""; -@@ -265,7 +267,7 @@ +@@ -299,7 +301,7 @@ this.field_74317_L.func_147117_R().func_147633_a(this.field_151442_I); this.field_74317_L.func_110434_K().func_110577_a(TextureMap.field_110575_b); this.field_74317_L.func_147117_R().func_174937_a(false, this.field_151442_I > 0); @@ -25,7 +25,7 @@ } } -@@ -887,7 +889,12 @@ +@@ -1068,7 +1070,12 @@ { if (s1.equals("key_" + keybinding.func_151464_g())) { @@ -39,7 +39,7 @@ } } -@@ -944,6 +951,7 @@ +@@ -1132,6 +1139,7 @@ public void func_74303_b() { @@ -47,7 +47,7 @@ PrintWriter printwriter = null; try -@@ -1017,7 +1025,8 @@ +@@ -1206,7 +1214,8 @@ for (KeyBinding keybinding : this.field_74324_K) { @@ -57,7 +57,7 @@ } for (SoundCategory soundcategory : SoundCategory.values()) -@@ -1250,4 +1259,35 @@ +@@ -1440,4 +1449,35 @@ return p_148264_1_; } } diff --git a/patches/minecraft/net/minecraft/client/settings/KeyBinding.java.patch b/patches/minecraft/net/minecraft/client/settings/KeyBinding.java.patch index 15fce4de6..a5bae80c8 100644 --- a/patches/minecraft/net/minecraft/client/settings/KeyBinding.java.patch +++ b/patches/minecraft/net/minecraft/client/settings/KeyBinding.java.patch @@ -1,50 +1,50 @@ --- ../src-base/minecraft/net/minecraft/client/settings/KeyBinding.java +++ ../src-work/minecraft/net/minecraft/client/settings/KeyBinding.java -@@ -14,7 +14,7 @@ +@@ -15,7 +15,7 @@ public class KeyBinding implements Comparable { - private static final List field_74516_a = Lists.newArrayList(); -- private static final IntHashMap field_74514_b = new IntHashMap(); + private static final Map field_74516_a = Maps.newHashMap(); +- private static final IntHashMap field_74514_b = new IntHashMap(); + private static final net.minecraftforge.client.settings.KeyBindingMap field_74514_b = new net.minecraftforge.client.settings.KeyBindingMap(); private static final Set field_151473_c = Sets.newHashSet(); + private static final Map field_193627_d = Maps.newHashMap(); private final String field_74515_c; - private final int field_151472_e; -@@ -27,7 +27,7 @@ +@@ -29,7 +29,7 @@ { if (p_74507_0_ != 0) { -- KeyBinding keybinding = (KeyBinding)field_74514_b.func_76041_a(p_74507_0_); +- KeyBinding keybinding = field_74514_b.func_76041_a(p_74507_0_); + KeyBinding keybinding = field_74514_b.lookupActive(p_74507_0_); if (keybinding != null) { -@@ -40,7 +40,7 @@ +@@ -42,7 +42,7 @@ { if (p_74510_0_ != 0) { -- KeyBinding keybinding = (KeyBinding)field_74514_b.func_76041_a(p_74510_0_); +- KeyBinding keybinding = field_74514_b.func_76041_a(p_74510_0_); + for (KeyBinding keybinding : field_74514_b.lookupAll(p_74510_0_)) if (keybinding != null) { -@@ -74,11 +74,11 @@ +@@ -76,11 +76,11 @@ public static void func_74508_b() { - field_74514_b.func_76046_c(); + field_74514_b.clearMap(); - for (KeyBinding keybinding : field_74516_a) + for (KeyBinding keybinding : field_74516_a.values()) { - field_74514_b.func_76038_a(keybinding.field_74512_d, keybinding); + field_74514_b.addKey(keybinding.field_74512_d, keybinding); } } -@@ -94,13 +94,13 @@ +@@ -96,13 +96,13 @@ this.field_151472_e = p_i45001_2_; this.field_151471_f = p_i45001_3_; - field_74516_a.add(this); + field_74516_a.put(p_i45001_1_, this); - field_74514_b.func_76038_a(p_i45001_2_, this); + field_74514_b.addKey(p_i45001_2_, this); field_151473_c.add(p_i45001_3_); @@ -57,11 +57,10 @@ } public String func_151466_e() -@@ -158,4 +158,135 @@ - - return i; +@@ -154,6 +154,137 @@ + return this.field_151471_f.equals(p_compareTo_1_.field_151471_f) ? I18n.func_135052_a(this.field_74515_c).compareTo(I18n.func_135052_a(p_compareTo_1_.field_74515_c)) : ((Integer)field_193627_d.get(this.field_151471_f)).compareTo(field_193627_d.get(p_compareTo_1_.field_151471_f)); } -+ + + /****************** Forge Start *****************************/ + private net.minecraftforge.client.settings.KeyModifier keyModifierDefault = net.minecraftforge.client.settings.KeyModifier.NONE; + private net.minecraftforge.client.settings.KeyModifier keyModifier = net.minecraftforge.client.settings.KeyModifier.NONE; @@ -91,7 +90,7 @@ + { + this.keyModifier = net.minecraftforge.client.settings.KeyModifier.NONE; + } -+ field_74516_a.add(this); ++ field_74516_a.put(description, this); + field_74514_b.addKey(keyCode, this); + field_151473_c.add(category); + } @@ -146,7 +145,7 @@ + return func_151463_i() == func_151469_h() && getKeyModifier() == getKeyModifierDefault(); + } + -+ /** ++ /** + * Returns true when the other keyBinding conflicts with this one + */ + public boolean conflicts(KeyBinding other) @@ -192,4 +191,16 @@ + return getKeyModifier().getLocalizedComboName(func_151463_i()); + } + /****************** Forge End *****************************/ - } ++ + public static Supplier func_193626_b(String p_193626_0_) + { + KeyBinding keybinding = field_74516_a.get(p_193626_0_); +@@ -162,7 +293,7 @@ + return p_193626_0_; + } : () -> + { +- return GameSettings.func_74298_c(keybinding.func_151463_i()); ++ return keybinding.getDisplayName(); + }; + } + diff --git a/patches/minecraft/net/minecraft/client/shader/ShaderLoader.java.patch b/patches/minecraft/net/minecraft/client/shader/ShaderLoader.java.patch index 1c05a3378..48459f74a 100644 --- a/patches/minecraft/net/minecraft/client/shader/ShaderLoader.java.patch +++ b/patches/minecraft/net/minecraft/client/shader/ShaderLoader.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/client/shader/ShaderLoader.java +++ ../src-work/minecraft/net/minecraft/client/shader/ShaderLoader.java -@@ -61,7 +61,8 @@ +@@ -60,7 +60,8 @@ if (shaderloader == null) { diff --git a/patches/minecraft/net/minecraft/command/CommandBase.java.patch b/patches/minecraft/net/minecraft/command/CommandBase.java.patch index 65a38ab7d..1962ddd75 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 -@@ -384,7 +384,7 @@ +@@ -393,7 +393,7 @@ itextcomponent.func_150258_a(" "); } diff --git a/patches/minecraft/net/minecraft/command/CommandFill.java.patch b/patches/minecraft/net/minecraft/command/CommandFill.java.patch index 450527f82..cec0241ec 100644 --- a/patches/minecraft/net/minecraft/command/CommandFill.java.patch +++ b/patches/minecraft/net/minecraft/command/CommandFill.java.patch @@ -7,7 +7,7 @@ - if (p_184881_3_.length >= 10 && block.func_149716_u()) + if (p_184881_3_.length >= 10 && block.hasTileEntity(iblockstate)) { - String s = func_147178_a(p_184881_2_, p_184881_3_, 9).func_150260_c(); + String s = func_180529_a(p_184881_3_, 9); @@ -123,7 +123,7 @@ continue; diff --git a/patches/minecraft/net/minecraft/command/CommandHandler.java.patch b/patches/minecraft/net/minecraft/command/CommandHandler.java.patch index 077bdb4b5..79fda6af5 100644 --- a/patches/minecraft/net/minecraft/command/CommandHandler.java.patch +++ b/patches/minecraft/net/minecraft/command/CommandHandler.java.patch @@ -18,12 +18,3 @@ 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); -- field_147175_a.warn("Couldn\'t process command: \'{}\'", new Object[] {p_175786_4_}); -+ field_147175_a.warn("Couldn\'t process command: \'" + p_175786_4_ + "\'", var9); - } - - return false; diff --git a/patches/minecraft/net/minecraft/command/EntitySelector.java.patch b/patches/minecraft/net/minecraft/command/EntitySelector.java.patch index 724f47f96..c2dbe4168 100644 --- a/patches/minecraft/net/minecraft/command/EntitySelector.java.patch +++ b/patches/minecraft/net/minecraft/command/EntitySelector.java.patch @@ -1,10 +1,10 @@ --- ../src-base/minecraft/net/minecraft/command/EntitySelector.java +++ ../src-work/minecraft/net/minecraft/command/EntitySelector.java -@@ -148,6 +148,7 @@ +@@ -153,6 +153,7 @@ list2.addAll(func_184951_f(map)); list2.addAll(func_180698_a(map, vec3d)); list2.addAll(func_179662_g(map)); + list2.addAll(net.minecraftforge.fml.common.registry.GameRegistry.createEntitySelectors(map, s, p_179656_0_, vec3d)); - list1.addAll(func_179660_a(map, p_179656_2_, list2, s, world, blockpos)); - } - } + + if ("s".equalsIgnoreCase(s)) + { diff --git a/patches/minecraft/net/minecraft/command/server/CommandSetBlock.java.patch b/patches/minecraft/net/minecraft/command/server/CommandSetBlock.java.patch index 5c4cc7a0b..64017a5bc 100644 --- a/patches/minecraft/net/minecraft/command/server/CommandSetBlock.java.patch +++ b/patches/minecraft/net/minecraft/command/server/CommandSetBlock.java.patch @@ -7,5 +7,5 @@ - if (p_184881_3_.length >= 7 && block.func_149716_u()) + if (p_184881_3_.length >= 7 && block.hasTileEntity(iblockstate)) { - String s = func_147178_a(p_184881_2_, p_184881_3_, 6).func_150260_c(); + String s = func_180529_a(p_184881_3_, 6); diff --git a/patches/minecraft/net/minecraft/crash/CrashReport.java.patch b/patches/minecraft/net/minecraft/crash/CrashReport.java.patch index bc4c866cf..03212e916 100644 --- a/patches/minecraft/net/minecraft/crash/CrashReport.java.patch +++ b/patches/minecraft/net/minecraft/crash/CrashReport.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/crash/CrashReport.java +++ ../src-work/minecraft/net/minecraft/crash/CrashReport.java -@@ -114,6 +114,7 @@ +@@ -116,6 +116,7 @@ return IntCache.func_85144_b(); } }); @@ -8,7 +8,7 @@ } public String func_71501_a() -@@ -203,6 +204,8 @@ +@@ -205,6 +206,8 @@ { StringBuilder stringbuilder = new StringBuilder(); stringbuilder.append("---- Minecraft Crash Report ----\n"); diff --git a/patches/minecraft/net/minecraft/creativetab/CreativeTabs.java.patch b/patches/minecraft/net/minecraft/creativetab/CreativeTabs.java.patch index 0aae0fbe7..0c8267301 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 -@@ -122,8 +122,22 @@ - private EnumEnchantmentType[] field_111230_s; +@@ -131,8 +131,22 @@ + private EnumEnchantmentType[] field_111230_s = new EnumEnchantmentType[0]; private ItemStack field_151245_t; + public CreativeTabs(String label) @@ -23,7 +23,7 @@ this.field_78033_n = p_i1853_1_; this.field_78034_o = p_i1853_2_; this.field_151245_t = ItemStack.field_190927_a; -@@ -201,12 +215,20 @@ +@@ -210,12 +224,20 @@ @SideOnly(Side.CLIENT) public int func_78020_k() { @@ -44,28 +44,8 @@ return this.field_78033_n < 6; } -@@ -248,10 +270,17 @@ - { - for (Item item : Item.field_150901_e) - { -- if (item != null && item.func_77640_w() == this) -+ if (item == null) - { -- item.func_150895_a(item, this, p_78018_1_); -+ continue; - } -+ for (CreativeTabs tab : item.getCreativeTabs()) -+ { -+ if (tab == this) -+ { -+ item.func_150895_a(item, this, p_78018_1_); -+ } -+ } - } - - if (this.func_111225_m() != null) -@@ -284,4 +313,39 @@ - } +@@ -262,4 +284,39 @@ + item.func_150895_a(this, p_78018_1_); } } + diff --git a/patches/minecraft/net/minecraft/enchantment/Enchantment.java.patch b/patches/minecraft/net/minecraft/enchantment/Enchantment.java.patch index 1797a2370..f500df024 100644 --- a/patches/minecraft/net/minecraft/enchantment/Enchantment.java.patch +++ b/patches/minecraft/net/minecraft/enchantment/Enchantment.java.patch @@ -7,12 +7,12 @@ -public abstract class Enchantment +public abstract class Enchantment extends net.minecraftforge.fml.common.registry.IForgeRegistryEntry.Impl { -- public static final RegistryNamespaced field_185264_b = new RegistryNamespaced(); +- public static final RegistryNamespaced field_185264_b = new RegistryNamespaced(); + public static final RegistryNamespaced field_185264_b = net.minecraftforge.fml.common.registry.GameData.getEnchantmentRegistry(); private final EntityEquipmentSlot[] field_185263_a; private final Enchantment.Rarity field_77333_a; - public EnumEnchantmentType field_77351_y; -@@ -133,7 +133,7 @@ + @Nullable +@@ -134,7 +134,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_) -@@ -154,6 +154,26 @@ +@@ -155,6 +155,26 @@ return false; } diff --git a/patches/minecraft/net/minecraft/enchantment/EnchantmentHelper.java.patch b/patches/minecraft/net/minecraft/enchantment/EnchantmentHelper.java.patch index a2b25151c..a3234d844 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 -@@ -313,7 +313,7 @@ +@@ -302,7 +302,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) { -@@ -360,7 +360,7 @@ +@@ -357,7 +357,7 @@ { List list = Lists.newArrayList(); Item item = p_77513_1_.func_77973_b(); @@ -18,7 +18,7 @@ if (i <= 0) { -@@ -416,7 +416,7 @@ +@@ -413,7 +413,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 4c3e8dee8..821c4f1a5 100644 --- a/patches/minecraft/net/minecraft/enchantment/EnchantmentThorns.java.patch +++ b/patches/minecraft/net/minecraft/enchantment/EnchantmentThorns.java.patch @@ -15,7 +15,7 @@ } } -@@ -69,4 +69,25 @@ +@@ -76,4 +76,25 @@ { return p_92095_0_ > 10 ? p_92095_0_ - 10 : 1 + p_92095_1_.nextInt(4); } diff --git a/patches/minecraft/net/minecraft/entity/Entity.java.patch b/patches/minecraft/net/minecraft/entity/Entity.java.patch index 0487ad426..a235e29e4 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 -@@ -84,7 +84,7 @@ +@@ -85,7 +85,7 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -9,18 +9,18 @@ { private static final Logger field_184243_a = LogManager.getLogger(); private static final List field_190535_b = Collections.emptyList(); -@@ -175,6 +175,10 @@ +@@ -177,6 +177,10 @@ private boolean field_184237_aG; - private double[] field_191505_aI; + private final double[] field_191505_aI; private long field_191506_aJ; + /** -+ * Setting this to true will prevent the world from calling {@link #onUpdate()} for this entity. ++ * Setting this to true will prevent the world from calling {@link #onUpdate()} for this entity. + */ + public boolean updateBlocked; public Entity(World p_i1582_1_) { -@@ -197,7 +201,7 @@ +@@ -200,7 +204,7 @@ if (p_i1582_1_ != null) { @@ -29,7 +29,7 @@ } this.field_70180_af = new EntityDataManager(this); -@@ -208,8 +212,16 @@ +@@ -211,8 +215,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(); @@ -46,7 +46,7 @@ public int func_145782_y() { return this.field_145783_c; -@@ -1034,7 +1046,7 @@ +@@ -1053,7 +1065,7 @@ protected void func_180429_a(BlockPos p_180429_1_, Block p_180429_2_) { @@ -55,7 +55,7 @@ if (this.field_70170_p.func_180495_p(p_180429_1_.func_177984_a()).func_177230_c() == Blocks.field_150431_aC) { -@@ -1243,12 +1255,12 @@ +@@ -1277,12 +1289,12 @@ BlockPos blockpos = new BlockPos(this.field_70165_t, d0, this.field_70161_v); IBlockState iblockstate = this.field_70170_p.func_180495_p(blockpos); @@ -72,15 +72,15 @@ } else { -@@ -1667,6 +1679,7 @@ +@@ -1707,6 +1719,7 @@ { p_189511_1_.func_74757_a("Glowing", this.field_184238_ar); } + p_189511_1_.func_74757_a("UpdateBlocked", updateBlocked); - if (this.field_184236_aF.size() > 0) + if (!this.field_184236_aF.isEmpty()) { -@@ -1680,6 +1693,9 @@ +@@ -1720,6 +1733,9 @@ p_189511_1_.func_74782_a("Tags", nbttaglist); } @@ -90,7 +90,7 @@ this.func_70014_b(p_189511_1_); if (this.func_184207_aI()) -@@ -1786,7 +1802,11 @@ +@@ -1826,7 +1842,11 @@ this.func_174810_b(p_70020_1_.func_74767_n("Silent")); this.func_189654_d(p_70020_1_.func_74767_n("NoGravity")); this.func_184195_f(p_70020_1_.func_74767_n("Glowing")); @@ -102,7 +102,7 @@ if (p_70020_1_.func_150297_b("Tags", 9)) { this.field_184236_aF.clear(); -@@ -1878,7 +1898,10 @@ +@@ -1918,7 +1938,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(); @@ -114,7 +114,7 @@ return entityitem; } } -@@ -1945,6 +1968,7 @@ +@@ -1985,6 +2008,7 @@ this.field_70159_w = 0.0D; this.field_70181_x = 0.0D; this.field_70179_y = 0.0D; @@ -122,7 +122,7 @@ this.func_70071_h_(); if (this.func_184218_aH()) -@@ -1992,6 +2016,7 @@ +@@ -2032,6 +2056,7 @@ } } @@ -130,7 +130,7 @@ if (p_184205_2_ || this.func_184228_n(p_184205_1_) && p_184205_1_.func_184219_q(this)) { if (this.func_184218_aH()) -@@ -2027,6 +2052,7 @@ +@@ -2067,6 +2092,7 @@ if (this.field_184239_as != null) { Entity entity = this.field_184239_as; @@ -138,7 +138,7 @@ this.field_184239_as = null; entity.func_184225_p(this); } -@@ -2472,6 +2498,7 @@ +@@ -2511,6 +2537,7 @@ { if (!this.field_70170_p.field_72995_K && !this.field_70128_L) { @@ -146,7 +146,7 @@ this.field_70170_p.field_72984_F.func_76320_a("changeDimension"); MinecraftServer minecraftserver = this.func_184102_h(); int i = this.field_71093_bK; -@@ -2565,7 +2592,7 @@ +@@ -2604,7 +2631,7 @@ public float func_180428_a(Explosion p_180428_1_, World p_180428_2_, BlockPos p_180428_3_, IBlockState p_180428_4_) { @@ -155,7 +155,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_) -@@ -2862,6 +2889,184 @@ +@@ -2901,6 +2928,184 @@ EnchantmentHelper.func_151385_b(p_174815_1_, p_174815_2_); } diff --git a/patches/minecraft/net/minecraft/entity/EntityList.java.patch b/patches/minecraft/net/minecraft/entity/EntityList.java.patch index 124d3f13d..1344d6c95 100644 --- a/patches/minecraft/net/minecraft/entity/EntityList.java.patch +++ b/patches/minecraft/net/minecraft/entity/EntityList.java.patch @@ -1,10 +1,10 @@ --- ../src-base/minecraft/net/minecraft/entity/EntityList.java +++ ../src-work/minecraft/net/minecraft/entity/EntityList.java -@@ -105,10 +105,8 @@ +@@ -107,10 +107,8 @@ public static final ResourceLocation field_191307_a = new ResourceLocation("lightning_bolt"); private static final ResourceLocation field_191310_e = new ResourceLocation("player"); private static final Logger field_151516_b = LogManager.getLogger(); -- public static final RegistryNamespaced < ResourceLocation, Class > field_191308_b = new RegistryNamespaced(); +- public static final RegistryNamespaced < ResourceLocation, Class > field_191308_b = new RegistryNamespaced < ResourceLocation, Class > (); public static final Map field_75627_a = Maps.newLinkedHashMap(); - public static final Set field_191309_d = Sets.newHashSet(); - private static final List field_191311_g = Lists.newArrayList(); @@ -12,11 +12,11 @@ @Nullable public static ResourceLocation func_191301_a(Entity p_191301_0_) -@@ -119,30 +117,44 @@ +@@ -121,37 +119,52 @@ @Nullable public static ResourceLocation func_191306_a(Class p_191306_0_) { -- return (ResourceLocation)field_191308_b.func_177774_c(p_191306_0_); +- return field_191308_b.func_177774_c(p_191306_0_); + net.minecraftforge.fml.common.registry.EntityEntry entry = net.minecraftforge.fml.common.registry.EntityRegistry.getEntry(p_191306_0_); + return entry == null ? null : entry.getRegistryName(); } @@ -45,6 +45,15 @@ { - return (Class)field_191308_b.func_148754_a(p_90035_0_); + net.minecraftforge.fml.common.registry.EntityEntry entry = net.minecraftforge.fml.common.registry.GameData.getEntityRegistry().func_148754_a(p_90035_0_); ++ return entry == null ? null : entry.getEntityClass(); + } + + @Nullable + @SideOnly(Side.CLIENT) + public static Class func_192839_a(String p_192839_0_) + { +- return (Class)field_191308_b.func_82594_a(new ResourceLocation(p_192839_0_)); ++ net.minecraftforge.fml.common.registry.EntityEntry entry = net.minecraftforge.fml.common.registry.ForgeRegistries.ENTITIES.getValue(new ResourceLocation(p_192839_0_)); + return entry == null ? null : entry.getEntityClass(); } @@ -63,7 +72,16 @@ @Nullable public static Entity func_191304_a(@Nullable Class p_191304_0_, World p_191304_1_) { -@@ -168,13 +180,15 @@ +@@ -163,6 +176,8 @@ + { + try + { ++ net.minecraftforge.fml.common.registry.EntityEntry entry = net.minecraftforge.fml.common.registry.EntityRegistry.getEntry(p_191304_0_); ++ if (entry != null) return entry.newInstance(p_191304_1_); + return p_191304_0_.getConstructor(World.class).newInstance(p_191304_1_); + } + catch (Exception exception) +@@ -177,13 +192,15 @@ @SideOnly(Side.CLIENT) public static Entity func_75616_a(int p_75616_0_, World p_75616_1_) { @@ -75,13 +93,13 @@ @Nullable public static Entity func_188429_b(ResourceLocation p_188429_0_, World p_188429_1_) { -- return func_191304_a((Class)field_191308_b.func_82594_a(p_188429_0_), p_188429_1_); +- return func_191304_a(field_191308_b.func_82594_a(p_188429_0_), p_188429_1_); + net.minecraftforge.fml.common.registry.EntityEntry entry = net.minecraftforge.fml.common.registry.ForgeRegistries.ENTITIES.getValue(p_188429_0_); + return entry == null ? null : entry.newInstance(p_188429_1_); } @Nullable -@@ -189,7 +203,17 @@ +@@ -198,7 +215,17 @@ } else { @@ -99,7 +117,7 @@ } return entity; -@@ -197,7 +221,7 @@ +@@ -206,7 +233,7 @@ public static Set func_180124_b() { @@ -108,7 +126,7 @@ } public static boolean func_180123_a(Entity p_180123_0_, ResourceLocation p_180123_1_) -@@ -336,7 +360,7 @@ +@@ -373,7 +400,7 @@ func_191305_a("zombie_horse", 3232308, 9945732); func_191305_a("zombie_pigman", 15373203, 5009705); func_191305_a("zombie_villager", 5651507, 7969893); @@ -117,7 +135,7 @@ } private static void func_191303_a(int p_191303_0_, String p_191303_1_, Class p_191303_2_, String p_191303_3_) -@@ -357,22 +381,19 @@ +@@ -394,22 +421,19 @@ else { ResourceLocation resourcelocation = new ResourceLocation(p_191303_1_); @@ -126,7 +144,7 @@ - - while (field_191311_g.size() <= p_191303_0_) - { -- field_191311_g.add((String)null); +- field_191311_g.add(null); - } - - field_191311_g.set(p_191303_0_, p_191303_3_); @@ -139,7 +157,7 @@ protected static EntityList.EntityEggInfo func_191305_a(String p_191305_0_, int p_191305_1_, int p_191305_2_) { ResourceLocation resourcelocation = new ResourceLocation(p_191305_0_); -- return (EntityList.EntityEggInfo)field_75627_a.put(resourcelocation, new EntityList.EntityEggInfo(resourcelocation, p_191305_1_, p_191305_2_)); +- return field_75627_a.put(resourcelocation, new EntityList.EntityEggInfo(resourcelocation, p_191305_1_, p_191305_2_)); + EntityList.EntityEggInfo egg = new EntityList.EntityEggInfo(resourcelocation, p_191305_1_, p_191305_2_); + net.minecraftforge.fml.common.registry.EntityEntry entry = net.minecraftforge.fml.common.registry.ForgeRegistries.ENTITIES.getValue(resourcelocation); + if (entry != null) entry.setEgg(egg); diff --git a/patches/minecraft/net/minecraft/entity/EntityLiving.java.patch b/patches/minecraft/net/minecraft/entity/EntityLiving.java.patch index 6bf38e4c8..01a52b0e7 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 -@@ -171,6 +171,7 @@ +@@ -170,6 +170,7 @@ public void func_70624_b(@Nullable EntityLivingBase p_70624_1_) { this.field_70696_bz = p_70624_1_; @@ -8,7 +8,7 @@ } public boolean func_70686_a(Class p_70686_1_) -@@ -708,10 +709,22 @@ +@@ -702,10 +703,22 @@ protected void func_70623_bb() { @@ -31,7 +31,7 @@ else { Entity entity = this.field_70170_p.func_72890_a(this, -1.0D); -@@ -845,7 +858,6 @@ +@@ -839,7 +852,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 686dd3f60..f45de1127 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 -@@ -199,10 +199,11 @@ +@@ -201,10 +201,11 @@ { float f = (float)MathHelper.func_76123_f(this.field_70143_R - 3.0F); @@ -10,10 +10,10 @@ double d0 = Math.min((double)(0.2F + f / 15.0F), 2.5D); int i = (int)(150.0D * d0); + if (!p_184231_4_.func_177230_c().addLandingEffects(p_184231_4_, (WorldServer)this.field_70170_p, p_184231_5_, p_184231_4_, this, i)) - ((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_)}); + ((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, Block.func_176210_f(p_184231_4_)); } } -@@ -279,7 +280,7 @@ +@@ -281,7 +282,7 @@ } } @@ -22,7 +22,7 @@ { this.func_184210_p(); } -@@ -378,7 +379,7 @@ +@@ -380,7 +381,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); -@@ -440,6 +441,7 @@ +@@ -442,6 +443,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() -@@ -668,8 +670,10 @@ +@@ -670,8 +672,10 @@ else { Collection collection = this.field_70713_bf.values(); @@ -52,7 +52,7 @@ this.func_82142_c(this.func_70644_a(MobEffects.field_76441_p)); } } -@@ -812,6 +816,8 @@ +@@ -819,6 +823,8 @@ public void func_70691_i(float p_70691_1_) { @@ -61,7 +61,7 @@ float f = this.func_110143_aJ(); if (f > 0.0F) -@@ -832,6 +838,7 @@ +@@ -839,6 +845,7 @@ public boolean func_70097_a(DamageSource p_70097_1_, float p_70097_2_) { @@ -69,7 +69,7 @@ if (this.func_180431_b(p_70097_1_)) { return false; -@@ -918,9 +925,9 @@ +@@ -927,9 +934,9 @@ this.field_70718_bc = 100; this.field_70717_bb = (EntityPlayer)entity1; } @@ -81,7 +81,7 @@ if (entitywolf.func_70909_n()) { -@@ -1089,7 +1096,7 @@ +@@ -1127,7 +1134,7 @@ public void func_70669_a(ItemStack p_70669_1_) { @@ -90,15 +90,16 @@ for (int i = 0; i < 5; ++i) { -@@ -1101,12 +1108,16 @@ +@@ -1139,12 +1146,17 @@ vec3d1 = vec3d1.func_178789_a(-this.field_70125_A * 0.017453292F); vec3d1 = vec3d1.func_178785_b(-this.field_70177_z * 0.017453292F); vec3d1 = vec3d1.func_72441_c(this.field_70165_t, this.field_70163_u + (double)this.func_70047_e(), this.field_70161_v); -- this.field_70170_p.func_175688_a(EnumParticleTypes.ITEM_CRACK, vec3d1.field_72450_a, vec3d1.field_72448_b, vec3d1.field_72449_c, vec3d.field_72450_a, vec3d.field_72448_b + 0.05D, vec3d.field_72449_c, new int[] {Item.func_150891_b(p_70669_1_.func_77973_b())}); +- this.field_70170_p.func_175688_a(EnumParticleTypes.ITEM_CRACK, vec3d1.field_72450_a, vec3d1.field_72448_b, vec3d1.field_72449_c, vec3d.field_72450_a, vec3d.field_72448_b + 0.05D, vec3d.field_72449_c, Item.func_150891_b(p_70669_1_.func_77973_b())); + if (this.field_70170_p instanceof WorldServer) //Forge: Fix MC-2518 spawnParticle is nooped on server, need to use server specific variant + ((WorldServer)this.field_70170_p).func_175739_a(EnumParticleTypes.ITEM_CRACK, vec3d1.field_72450_a, vec3d1.field_72448_b, vec3d1.field_72449_c, 0, vec3d.field_72450_a, vec3d.field_72448_b + 0.05D, vec3d.field_72449_c, 0.0D, Item.func_150891_b(p_70669_1_.func_77973_b()), p_70669_1_.func_77960_j()); + else //Fix the fact that spawning ItemCrack uses TWO arguments. + this.field_70170_p.func_175688_a(EnumParticleTypes.ITEM_CRACK, vec3d1.field_72450_a, vec3d1.field_72448_b, vec3d1.field_72449_c, vec3d.field_72450_a, vec3d.field_72448_b + 0.05D, vec3d.field_72449_c, Item.func_150891_b(p_70669_1_.func_77973_b()), p_70669_1_.func_77960_j()); ++ } } @@ -108,7 +109,7 @@ if (!this.field_70729_aU) { Entity entity = p_70645_1_.func_76346_g(); -@@ -1127,18 +1138,26 @@ +@@ -1165,18 +1177,26 @@ if (!this.field_70170_p.field_72995_K) { @@ -140,16 +141,24 @@ } this.field_70170_p.func_72960_a(this, (byte)3); -@@ -1215,7 +1234,7 @@ +@@ -1253,15 +1273,7 @@ BlockPos blockpos = new BlockPos(i, j, k); IBlockState iblockstate = this.field_70170_p.func_180495_p(blockpos); Block block = iblockstate.func_177230_c(); -- return block != Blocks.field_150468_ap && block != Blocks.field_150395_bd ? block instanceof BlockTrapDoor && this.func_184604_a(blockpos, iblockstate) : true; +- +- if (block != Blocks.field_150468_ap && block != Blocks.field_150395_bd) +- { +- return block instanceof BlockTrapDoor && this.func_184604_a(blockpos, iblockstate); +- } +- else +- { +- return true; +- } + return net.minecraftforge.common.ForgeHooks.isLivingOnLadder(iblockstate, field_70170_p, new BlockPos(i, j, k), this); } } -@@ -1241,6 +1260,9 @@ +@@ -1287,6 +1299,9 @@ public void func_180430_e(float p_180430_1_, float p_180430_2_) { @@ -159,7 +168,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); -@@ -1257,7 +1279,7 @@ +@@ -1303,7 +1318,7 @@ if (iblockstate.func_185904_a() != Material.field_151579_a) { @@ -168,7 +177,7 @@ this.func_184185_a(soundtype.func_185842_g(), soundtype.func_185843_a() * 0.5F, soundtype.func_185847_b() * 0.75F); } } -@@ -1334,6 +1356,8 @@ +@@ -1380,6 +1395,8 @@ { if (!this.func_180431_b(p_70665_1_)) { @@ -177,7 +186,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_; -@@ -1383,6 +1407,11 @@ +@@ -1447,6 +1464,11 @@ public void func_184609_a(EnumHand p_184609_1_) { @@ -189,7 +198,7 @@ if (!this.field_82175_bq || this.field_110158_av >= this.func_82166_i() / 2 || this.field_110158_av < 0) { this.field_110158_av = -1; -@@ -1613,7 +1642,7 @@ +@@ -1694,7 +1716,7 @@ if (!this.field_70170_p.func_184143_b(axisalignedbb1)) { @@ -198,7 +207,7 @@ { this.func_70634_a(d11, this.field_70163_u + 1.0D, d12); return; -@@ -1621,14 +1650,14 @@ +@@ -1702,14 +1724,14 @@ BlockPos blockpos = new BlockPos(d11, this.field_70163_u - 1.0D, d12); @@ -215,7 +224,7 @@ { d1 = d11; d13 = this.field_70163_u + 2.0D; -@@ -1700,6 +1729,7 @@ +@@ -1781,6 +1803,7 @@ } this.field_70160_al = true; @@ -223,7 +232,7 @@ } protected void func_70629_bd() -@@ -1972,6 +2002,7 @@ +@@ -2054,6 +2077,7 @@ public void func_70071_h_() { @@ -231,7 +240,7 @@ super.func_70071_h_(); this.func_184608_ct(); -@@ -2015,6 +2046,7 @@ +@@ -2097,6 +2121,7 @@ if (!ItemStack.func_77989_b(itemstack1, itemstack)) { ((WorldServer)this.field_70170_p).func_73039_n().func_151247_a(this, new SPacketEntityEquipment(this.func_145782_y(), entityequipmentslot, itemstack1)); @@ -239,7 +248,7 @@ if (!itemstack.func_190926_b()) { -@@ -2488,6 +2520,40 @@ +@@ -2575,6 +2600,40 @@ this.field_70752_e = true; } @@ -280,7 +289,7 @@ public abstract EnumHandSide func_184591_cq(); public boolean func_184587_cr() -@@ -2508,12 +2574,19 @@ +@@ -2595,12 +2654,19 @@ if (itemstack == this.field_184627_bm) { @@ -301,7 +310,7 @@ { this.func_71036_o(); } -@@ -2531,8 +2604,10 @@ +@@ -2618,8 +2684,10 @@ if (!itemstack.func_190926_b() && !this.func_184587_cr()) { @@ -313,7 +322,7 @@ if (!this.field_70170_p.field_72995_K) { -@@ -2613,7 +2688,9 @@ +@@ -2700,7 +2768,9 @@ if (!this.field_184627_bm.func_190926_b() && this.func_184587_cr()) { this.func_184584_a(this.field_184627_bm, 16); @@ -324,7 +333,7 @@ this.func_184602_cy(); } } -@@ -2637,7 +2714,8 @@ +@@ -2724,7 +2794,8 @@ { if (!this.field_184627_bm.func_190926_b()) { @@ -334,14 +343,13 @@ } this.func_184602_cy(); -@@ -2761,4 +2839,29 @@ - { +@@ -2852,6 +2923,31 @@ return true; } -+ + + // FORGE -+ private final net.minecraftforge.items.IItemHandlerModifiable handHandler = new net.minecraftforge.items.ItemStackHandler(field_184630_bs); -+ private final net.minecraftforge.items.IItemHandlerModifiable armorHandler = new net.minecraftforge.items.ItemStackHandler(field_184631_bt); ++ private final net.minecraftforge.items.IItemHandlerModifiable handHandler = new net.minecraftforge.items.wrapper.EntityHandsInvWrapper(this); ++ private final net.minecraftforge.items.IItemHandlerModifiable armorHandler = new net.minecraftforge.items.wrapper.EntityArmorInvWrapper(this); + private final net.minecraftforge.items.IItemHandler joinedHandler = new net.minecraftforge.items.wrapper.CombinedInvWrapper(armorHandler, handHandler); + + @SuppressWarnings("unchecked") @@ -363,4 +371,7 @@ + { + return capability == net.minecraftforge.items.CapabilityItemHandler.ITEM_HANDLER_CAPABILITY || super.hasCapability(capability, facing); + } - } ++ + public boolean func_190631_cK() + { + return true; diff --git a/patches/minecraft/net/minecraft/entity/EntitySpawnPlacementRegistry.java.patch b/patches/minecraft/net/minecraft/entity/EntitySpawnPlacementRegistry.java.patch index 7c716d9a9..b21656f61 100644 --- a/patches/minecraft/net/minecraft/entity/EntitySpawnPlacementRegistry.java.patch +++ b/patches/minecraft/net/minecraft/entity/EntitySpawnPlacementRegistry.java.patch @@ -1,7 +1,7 @@ --- ../src-base/minecraft/net/minecraft/entity/EntitySpawnPlacementRegistry.java +++ ../src-work/minecraft/net/minecraft/entity/EntitySpawnPlacementRegistry.java -@@ -52,6 +52,12 @@ - return (EntityLiving.SpawnPlacementType)field_180110_a.get(p_180109_0_); +@@ -53,6 +53,12 @@ + return field_180110_a.get(p_180109_0_); } + public static void setPlacementType(Class entityClass, EntityLiving.SpawnPlacementType placementType) diff --git a/patches/minecraft/net/minecraft/entity/EntityTracker.java.patch b/patches/minecraft/net/minecraft/entity/EntityTracker.java.patch index 25000bf6b..33c225524 100644 --- a/patches/minecraft/net/minecraft/entity/EntityTracker.java.patch +++ b/patches/minecraft/net/minecraft/entity/EntityTracker.java.patch @@ -34,4 +34,4 @@ + public void func_151248_b(Entity p_151248_1_, Packet p_151248_2_) { - EntityTrackerEntry entitytrackerentry = (EntityTrackerEntry)this.field_72794_c.func_76041_a(p_151248_1_.func_145782_y()); + EntityTrackerEntry entitytrackerentry = this.field_72794_c.func_76041_a(p_151248_1_.func_145782_y()); diff --git a/patches/minecraft/net/minecraft/entity/EntityTrackerEntry.java.patch b/patches/minecraft/net/minecraft/entity/EntityTrackerEntry.java.patch index 90551e859..c6131f12d 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 -@@ -450,6 +450,7 @@ +@@ -457,6 +457,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_)) -@@ -457,6 +458,7 @@ +@@ -464,6 +465,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,7 +16,7 @@ } } } -@@ -489,6 +491,9 @@ +@@ -496,6 +498,9 @@ field_151262_p.warn("Fetching addPacket for removed entity"); } diff --git a/patches/minecraft/net/minecraft/entity/ai/EntityAIAttackMelee.java.patch b/patches/minecraft/net/minecraft/entity/ai/EntityAIAttackMelee.java.patch index c815a23ea..30ff2d124 100644 --- a/patches/minecraft/net/minecraft/entity/ai/EntityAIAttackMelee.java.patch +++ b/patches/minecraft/net/minecraft/entity/ai/EntityAIAttackMelee.java.patch @@ -27,9 +27,9 @@ + } + } this.field_75438_g = this.field_75441_b.func_70661_as().func_75494_a(entitylivingbase); - 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 @@ + + if (this.field_75438_g != null) +@@ -116,6 +131,23 @@ this.field_151496_k = entitylivingbase.field_70161_v; this.field_75445_i = 4 + this.field_75441_b.func_70681_au().nextInt(7); diff --git a/patches/minecraft/net/minecraft/entity/ai/EntityAIMate.java.patch b/patches/minecraft/net/minecraft/entity/ai/EntityAIMate.java.patch index fadba74de..48fda1f82 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 -@@ -93,6 +93,18 @@ +@@ -92,6 +92,18 @@ { EntityAgeable entityageable = this.field_75390_d.func_90011_a(this.field_75391_e); @@ -18,4 +18,4 @@ + if (entityageable != null) { - EntityPlayer entityplayer = this.field_75390_d.func_146083_cb(); + EntityPlayerMP entityplayermp = this.field_75390_d.func_191993_do(); diff --git a/patches/minecraft/net/minecraft/entity/boss/EntityDragon.java.patch b/patches/minecraft/net/minecraft/entity/boss/EntityDragon.java.patch index b13691f08..1bfd4d85d 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 -@@ -498,13 +498,13 @@ +@@ -499,13 +499,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 ff0738735..cc3778126 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 -@@ -383,7 +383,7 @@ +@@ -382,7 +382,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/effect/EntityLightningBolt.java.patch b/patches/minecraft/net/minecraft/entity/effect/EntityLightningBolt.java.patch index e60918847..e8fbc7e34 100644 --- a/patches/minecraft/net/minecraft/entity/effect/EntityLightningBolt.java.patch +++ b/patches/minecraft/net/minecraft/entity/effect/EntityLightningBolt.java.patch @@ -3,7 +3,7 @@ @@ -104,7 +104,8 @@ for (int i = 0; i < list.size(); ++i) { - Entity entity = (Entity)list.get(i); + Entity entity = list.get(i); - entity.func_70077_a(this); + if (!net.minecraftforge.event.ForgeEventFactory.onEntityStruckByLightning(entity, this)) + entity.func_70077_a(this); diff --git a/patches/minecraft/net/minecraft/entity/item/EntityEnderPearl.java.patch b/patches/minecraft/net/minecraft/entity/item/EntityEnderPearl.java.patch index 023e80b51..cce0c9e6a 100644 --- a/patches/minecraft/net/minecraft/entity/item/EntityEnderPearl.java.patch +++ b/patches/minecraft/net/minecraft/entity/item/EntityEnderPearl.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/entity/item/EntityEnderPearl.java +++ ../src-work/minecraft/net/minecraft/entity/item/EntityEnderPearl.java -@@ -90,6 +90,9 @@ +@@ -96,6 +96,9 @@ if (entityplayermp.field_71135_a.func_147362_b().func_150724_d() && entityplayermp.field_70170_p == this.field_70170_p && !entityplayermp.func_70608_bn()) { @@ -10,7 +10,7 @@ if (this.field_70146_Z.nextFloat() < 0.05F && this.field_70170_p.func_82736_K().func_82766_b("doMobSpawning")) { EntityEndermite entityendermite = new EntityEndermite(this.field_70170_p); -@@ -103,9 +106,10 @@ +@@ -109,9 +112,10 @@ entitylivingbase.func_184210_p(); } diff --git a/patches/minecraft/net/minecraft/entity/item/EntityFallingBlock.java.patch b/patches/minecraft/net/minecraft/entity/item/EntityFallingBlock.java.patch index c29d85f17..a6322acef 100644 --- a/patches/minecraft/net/minecraft/entity/item/EntityFallingBlock.java.patch +++ b/patches/minecraft/net/minecraft/entity/item/EntityFallingBlock.java.patch @@ -1,15 +1,15 @@ --- ../src-base/minecraft/net/minecraft/entity/item/EntityFallingBlock.java +++ ../src-work/minecraft/net/minecraft/entity/item/EntityFallingBlock.java -@@ -136,6 +136,7 @@ +@@ -166,6 +166,7 @@ { IBlockState iblockstate = this.field_70170_p.func_180495_p(blockpos1); + if (this.field_70170_p.func_175623_d(new BlockPos(this.field_70165_t, this.field_70163_u - 0.009999999776482582D, this.field_70161_v))) //Forge: Don't indent below. - if (BlockFalling.func_185759_i(this.field_70170_p.func_180495_p(new BlockPos(this.field_70165_t, this.field_70163_u - 0.009999999776482582D, this.field_70161_v)))) + if (!flag1 && BlockFalling.func_185759_i(this.field_70170_p.func_180495_p(new BlockPos(this.field_70165_t, this.field_70163_u - 0.009999999776482582D, this.field_70161_v)))) { this.field_70122_E = false; -@@ -159,7 +160,7 @@ - ((BlockFalling)block).func_176502_a_(this.field_70170_p, blockpos1); +@@ -189,7 +190,7 @@ + ((BlockFalling)block).func_176502_a_(this.field_70170_p, blockpos1, this.field_175132_d, iblockstate); } - if (this.field_145810_d != null && block instanceof ITileEntityProvider) diff --git a/patches/minecraft/net/minecraft/entity/item/EntityItem.java.patch b/patches/minecraft/net/minecraft/entity/item/EntityItem.java.patch index 8bba8e826..f39f20e30 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 -@@ -40,6 +40,11 @@ +@@ -38,6 +38,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_); -@@ -57,6 +62,7 @@ +@@ -55,6 +60,7 @@ { this(p_i1710_1_, p_i1710_2_, p_i1710_4_, p_i1710_6_); this.func_92058_a(p_i1710_8_); @@ -20,7 +20,7 @@ } protected boolean func_70041_e_() -@@ -80,6 +86,7 @@ +@@ -78,6 +84,7 @@ public void func_70071_h_() { @@ -28,7 +28,7 @@ if (this.func_92059_d().func_190926_b()) { this.func_70106_y(); -@@ -169,8 +176,16 @@ +@@ -167,8 +174,16 @@ } } @@ -46,7 +46,7 @@ this.func_70106_y(); } } -@@ -227,6 +242,10 @@ +@@ -225,6 +240,10 @@ { return false; } @@ -57,7 +57,7 @@ else { itemstack1.func_190917_f(itemstack.func_190916_E()); -@@ -284,6 +303,7 @@ +@@ -282,6 +301,7 @@ public boolean func_70097_a(DamageSource p_70097_1_, float p_70097_2_) { @@ -65,7 +65,7 @@ if (this.func_180431_b(p_70097_1_)) { return false; -@@ -316,6 +336,7 @@ +@@ -314,6 +334,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); @@ -73,7 +73,7 @@ if (this.func_145800_j() != null) { -@@ -360,17 +381,22 @@ +@@ -358,18 +379,24 @@ { this.func_70106_y(); } @@ -95,17 +95,11 @@ + + 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 (item == Item.func_150898_a(Blocks.field_150364_r)) - { -@@ -407,6 +433,7 @@ - } - } - + net.minecraftforge.fml.common.FMLCommonHandler.instance().firePlayerItemPickupEvent(p_70100_1_, this); p_70100_1_.func_71001_a(this, i); if (itemstack.func_190926_b()) -@@ -513,6 +540,6 @@ +@@ -476,6 +503,6 @@ public void func_174870_v() { this.func_174871_r(); diff --git a/patches/minecraft/net/minecraft/entity/item/EntityMinecart.java.patch b/patches/minecraft/net/minecraft/entity/item/EntityMinecart.java.patch index 8c5fba004..3b14fc7c5 100644 --- a/patches/minecraft/net/minecraft/entity/item/EntityMinecart.java.patch +++ b/patches/minecraft/net/minecraft/entity/item/EntityMinecart.java.patch @@ -63,8 +63,8 @@ + + if (canBeRidden() && this.field_70159_w * this.field_70159_w + this.field_70179_y * this.field_70179_y > 0.01D) { -- List list = this.field_70170_p.func_175674_a(this, this.func_174813_aQ().func_72314_b(0.20000000298023224D, 0.0D, 0.20000000298023224D), EntitySelectors.func_188442_a(this)); -+ List list = this.field_70170_p.func_175674_a(this, box, EntitySelectors.func_188442_a(this)); +- List list = this.field_70170_p.func_175674_a(this, this.func_174813_aQ().func_72314_b(0.20000000298023224D, 0.0D, 0.20000000298023224D), EntitySelectors.func_188442_a(this)); ++ List list = this.field_70170_p.func_175674_a(this, box, EntitySelectors.func_188442_a(this)); if (!list.isEmpty()) { diff --git a/patches/minecraft/net/minecraft/entity/item/EntityMinecartContainer.java.patch b/patches/minecraft/net/minecraft/entity/item/EntityMinecartContainer.java.patch index 12328f18e..ec3b8b0e6 100644 --- a/patches/minecraft/net/minecraft/entity/item/EntityMinecartContainer.java.patch +++ b/patches/minecraft/net/minecraft/entity/item/EntityMinecartContainer.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/entity/item/EntityMinecartContainer.java +++ ../src-work/minecraft/net/minecraft/entity/item/EntityMinecartContainer.java -@@ -195,6 +195,7 @@ +@@ -202,6 +202,7 @@ public boolean func_184230_a(EntityPlayer p_184230_1_, EnumHand p_184230_2_) { @@ -8,7 +8,7 @@ if (!this.field_70170_p.field_72995_K) { p_184230_1_.func_71007_a(this); -@@ -274,6 +275,26 @@ +@@ -281,6 +282,26 @@ } } diff --git a/patches/minecraft/net/minecraft/entity/monster/EntityIronGolem.java.patch b/patches/minecraft/net/minecraft/entity/monster/EntityIronGolem.java.patch index 9ca6a7be6..0fe2a53a9 100644 --- a/patches/minecraft/net/minecraft/entity/monster/EntityIronGolem.java.patch +++ b/patches/minecraft/net/minecraft/entity/monster/EntityIronGolem.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/entity/monster/EntityIronGolem.java +++ ../src-work/minecraft/net/minecraft/entity/monster/EntityIronGolem.java -@@ -287,7 +287,7 @@ +@@ -294,7 +294,7 @@ { if (!this.func_70850_q() && this.field_70717_bb != null && this.field_70857_d != null) { diff --git a/patches/minecraft/net/minecraft/entity/monster/EntityMagmaCube.java.patch b/patches/minecraft/net/minecraft/entity/monster/EntityMagmaCube.java.patch index 14f6a4bc4..2a2e07af6 100644 --- a/patches/minecraft/net/minecraft/entity/monster/EntityMagmaCube.java.patch +++ b/patches/minecraft/net/minecraft/entity/monster/EntityMagmaCube.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/entity/monster/EntityMagmaCube.java +++ ../src-work/minecraft/net/minecraft/entity/monster/EntityMagmaCube.java -@@ -95,6 +95,7 @@ +@@ -96,6 +96,7 @@ { this.field_70181_x = (double)(0.42F + (float)this.func_70809_q() * 0.1F); this.field_70160_al = true; diff --git a/patches/minecraft/net/minecraft/entity/monster/EntitySnowman.java.patch b/patches/minecraft/net/minecraft/entity/monster/EntitySnowman.java.patch index 2661671bb..178e0e15c 100644 --- a/patches/minecraft/net/minecraft/entity/monster/EntitySnowman.java.patch +++ b/patches/minecraft/net/minecraft/entity/monster/EntitySnowman.java.patch @@ -18,11 +18,10 @@ { this.func_184747_a(false); itemstack.func_77972_a(1, p_184645_1_); -@@ -197,4 +197,12 @@ - { +@@ -198,6 +198,14 @@ return SoundEvents.field_187801_fC; } -+ + + @Override public boolean isShearable(ItemStack item, net.minecraft.world.IBlockAccess world, BlockPos pos) { return this.func_184748_o(); } + @Override + public java.util.List onSheared(ItemStack item, net.minecraft.world.IBlockAccess world, BlockPos pos, int fortune) @@ -30,4 +29,7 @@ + this.func_184747_a(false); + return com.google.common.collect.Lists.newArrayList(); + } - } ++ + public void func_184724_a(boolean p_184724_1_) + { + } diff --git a/patches/minecraft/net/minecraft/entity/monster/EntityZombieVillager.java.patch b/patches/minecraft/net/minecraft/entity/monster/EntityZombieVillager.java.patch index 95c9a4f32..3110ae581 100644 --- a/patches/minecraft/net/minecraft/entity/monster/EntityZombieVillager.java.patch +++ b/patches/minecraft/net/minecraft/entity/monster/EntityZombieVillager.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/entity/monster/EntityZombieVillager.java +++ ../src-work/minecraft/net/minecraft/entity/monster/EntityZombieVillager.java -@@ -48,11 +48,14 @@ +@@ -53,11 +53,14 @@ public void func_190733_a(int p_190733_1_) { this.field_70180_af.func_187227_b(field_190739_c, Integer.valueOf(p_190733_1_)); @@ -16,15 +16,15 @@ } public static void func_190737_b(DataFixer p_190737_0_) -@@ -64,6 +67,7 @@ +@@ -69,6 +72,7 @@ { super.func_70014_b(p_70014_1_); p_70014_1_.func_74768_a("Profession", this.func_190736_dl()); + p_70014_1_.func_74778_a("ProfessionName", this.getForgeProfession().getRegistryName().toString()); p_70014_1_.func_74768_a("ConversionTime", this.func_82230_o() ? this.field_82234_d : -1); - } -@@ -71,6 +75,12 @@ + if (this.field_191992_by != null) +@@ -81,6 +85,12 @@ { super.func_70037_a(p_70037_1_); this.func_190733_a(p_70037_1_.func_74762_e("Profession")); @@ -37,7 +37,7 @@ if (p_70037_1_.func_150297_b("ConversionTime", 99) && p_70037_1_.func_74762_e("ConversionTime") > -1) { -@@ -164,7 +174,7 @@ +@@ -175,7 +185,7 @@ { EntityVillager entityvillager = new EntityVillager(this.field_70170_p); entityvillager.func_82149_j(this); @@ -46,7 +46,7 @@ entityvillager.func_190672_a(this.field_70170_p.func_175649_E(new BlockPos(entityvillager)), (IEntityLivingData)null, false); entityvillager.func_82187_q(); -@@ -256,4 +266,37 @@ +@@ -278,4 +288,37 @@ { return ItemStack.field_190927_a; } diff --git a/patches/minecraft/net/minecraft/entity/passive/AbstractHorse.java.patch b/patches/minecraft/net/minecraft/entity/passive/AbstractHorse.java.patch index a48b88757..fa9cd4ce9 100644 --- a/patches/minecraft/net/minecraft/entity/passive/AbstractHorse.java.patch +++ b/patches/minecraft/net/minecraft/entity/passive/AbstractHorse.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/entity/passive/AbstractHorse.java +++ ../src-work/minecraft/net/minecraft/entity/passive/AbstractHorse.java -@@ -310,6 +310,7 @@ +@@ -312,6 +312,7 @@ this.field_110296_bG.func_110134_a(this); this.func_110232_cE(); @@ -8,7 +8,7 @@ } protected void func_110232_cE() -@@ -1219,4 +1220,22 @@ +@@ -1227,4 +1228,22 @@ return p_180482_2_; } diff --git a/patches/minecraft/net/minecraft/entity/passive/EntityMooshroom.java.patch b/patches/minecraft/net/minecraft/entity/passive/EntityMooshroom.java.patch index 726e62f31..ad9f10775 100644 --- a/patches/minecraft/net/minecraft/entity/passive/EntityMooshroom.java.patch +++ b/patches/minecraft/net/minecraft/entity/passive/EntityMooshroom.java.patch @@ -17,7 +17,7 @@ + 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]); + 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); @@ -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 52656390d..2a439cff2 100644 --- a/patches/minecraft/net/minecraft/entity/passive/EntityOcelot.java.patch +++ b/patches/minecraft/net/minecraft/entity/passive/EntityOcelot.java.patch @@ -1,15 +1,15 @@ --- ../src-base/minecraft/net/minecraft/entity/passive/EntityOcelot.java +++ ../src-work/minecraft/net/minecraft/entity/passive/EntityOcelot.java -@@ -208,7 +208,7 @@ +@@ -222,7 +222,7 @@ if (!this.field_70170_p.field_72995_K) { - if (this.field_70146_Z.nextInt(3) == 0) + if (this.field_70146_Z.nextInt(3) == 0 && !net.minecraftforge.event.ForgeEventFactory.onAnimalTame(this, p_184645_1_)) { - this.func_70903_f(true); + this.func_193101_c(p_184645_1_); this.func_70912_b(1 + this.field_70170_p.field_73012_v.nextInt(3)); -@@ -299,7 +299,7 @@ +@@ -320,7 +320,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/EntityParrot.java.patch b/patches/minecraft/net/minecraft/entity/passive/EntityParrot.java.patch new file mode 100644 index 000000000..a20edfc60 --- /dev/null +++ b/patches/minecraft/net/minecraft/entity/passive/EntityParrot.java.patch @@ -0,0 +1,125 @@ +--- ../src-base/minecraft/net/minecraft/entity/passive/EntityParrot.java ++++ ../src-work/minecraft/net/minecraft/entity/passive/EntityParrot.java +@@ -1,6 +1,7 @@ + package net.minecraft.entity.passive; + + import com.google.common.base.Predicate; ++import com.google.common.collect.Maps; + import com.google.common.collect.Sets; + import it.unimi.dsi.fastutil.ints.Int2ObjectMap; + import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap; +@@ -89,12 +90,12 @@ + { + public boolean apply(@Nullable EntityLiving p_apply_1_) + { +- return p_apply_1_ != null && EntityParrot.field_192017_bK.containsKey(EntityList.field_191308_b.func_148757_b(p_apply_1_.getClass())); ++ return p_apply_1_ != null && EntityParrot.MIMIC_SOUNDS.containsKey(p_apply_1_.getClass()); + } + }; + private static final Item field_192015_bI = Items.field_151106_aX; + private static final Set field_192016_bJ = Sets.newHashSet(Items.field_151014_N, Items.field_151081_bc, Items.field_151080_bb, Items.field_185163_cU); +- private static final Int2ObjectMap field_192017_bK = new Int2ObjectOpenHashMap(32); ++ private static final java.util.Map, SoundEvent> MIMIC_SOUNDS = Maps.newHashMapWithExpectedSize(32); + public float field_192008_bB; + public float field_192009_bC; + public float field_192010_bD; +@@ -214,7 +215,7 @@ + + if (!entityliving.func_174814_R()) + { +- SoundEvent soundevent = func_191999_g(EntityList.field_191308_b.func_148757_b(entityliving.getClass())); ++ SoundEvent soundevent = MIMIC_SOUNDS.get(entityliving.getClass()); + p_192006_0_.func_184148_a((EntityPlayer)null, p_192006_1_.field_70165_t, p_192006_1_.field_70163_u, p_192006_1_.field_70161_v, soundevent, p_192006_1_.func_184176_by(), 0.7F, func_192000_b(p_192006_0_.field_73012_v)); + return true; + } +@@ -345,8 +346,9 @@ + { + if (p_192003_0_.nextInt(1000) == 0) + { +- List list = new ArrayList(field_192017_bK.keySet()); +- return func_191999_g(((Integer)list.get(p_192003_0_.nextInt(list.size()))).intValue()); ++ List list = new ArrayList(MIMIC_SOUNDS.values()); ++ SoundEvent ret = list.get(p_192003_0_.nextInt(list.size())); ++ return ret == null ? SoundEvents.field_192792_ep : ret; + } + else + { +@@ -354,11 +356,6 @@ + } + } + +- public static SoundEvent func_191999_g(int p_191999_0_) +- { +- return field_192017_bK.containsKey(p_191999_0_) ? (SoundEvent)field_192017_bK.get(p_191999_0_) : SoundEvents.field_192792_ep; +- } +- + protected SoundEvent func_184601_bQ(DamageSource p_184601_1_) + { + return SoundEvents.field_192794_er; +@@ -471,33 +468,38 @@ + + static + { +- field_192017_bK.put(EntityList.field_191308_b.func_148757_b(EntityBlaze.class), SoundEvents.field_193791_eM); +- field_192017_bK.put(EntityList.field_191308_b.func_148757_b(EntityCaveSpider.class), SoundEvents.field_193813_fc); +- field_192017_bK.put(EntityList.field_191308_b.func_148757_b(EntityCreeper.class), SoundEvents.field_193792_eN); +- field_192017_bK.put(EntityList.field_191308_b.func_148757_b(EntityElderGuardian.class), SoundEvents.field_193793_eO); +- field_192017_bK.put(EntityList.field_191308_b.func_148757_b(EntityDragon.class), SoundEvents.field_193794_eP); +- field_192017_bK.put(EntityList.field_191308_b.func_148757_b(EntityEnderman.class), SoundEvents.field_193795_eQ); +- field_192017_bK.put(EntityList.field_191308_b.func_148757_b(EntityEndermite.class), SoundEvents.field_193796_eR); +- field_192017_bK.put(EntityList.field_191308_b.func_148757_b(EntityEvoker.class), SoundEvents.field_193797_eS); +- field_192017_bK.put(EntityList.field_191308_b.func_148757_b(EntityGhast.class), SoundEvents.field_193798_eT); +- field_192017_bK.put(EntityList.field_191308_b.func_148757_b(EntityHusk.class), SoundEvents.field_193799_eU); +- field_192017_bK.put(EntityList.field_191308_b.func_148757_b(EntityIllusionIllager.class), SoundEvents.field_193800_eV); +- field_192017_bK.put(EntityList.field_191308_b.func_148757_b(EntityMagmaCube.class), SoundEvents.field_193801_eW); +- field_192017_bK.put(EntityList.field_191308_b.func_148757_b(EntityPigZombie.class), SoundEvents.field_193822_fl); +- field_192017_bK.put(EntityList.field_191308_b.func_148757_b(EntityPolarBear.class), SoundEvents.field_193802_eX); +- field_192017_bK.put(EntityList.field_191308_b.func_148757_b(EntityShulker.class), SoundEvents.field_193803_eY); +- field_192017_bK.put(EntityList.field_191308_b.func_148757_b(EntitySilverfish.class), SoundEvents.field_193804_eZ); +- field_192017_bK.put(EntityList.field_191308_b.func_148757_b(EntitySkeleton.class), SoundEvents.field_193811_fa); +- field_192017_bK.put(EntityList.field_191308_b.func_148757_b(EntitySlime.class), SoundEvents.field_193812_fb); +- field_192017_bK.put(EntityList.field_191308_b.func_148757_b(EntitySpider.class), SoundEvents.field_193813_fc); +- field_192017_bK.put(EntityList.field_191308_b.func_148757_b(EntityStray.class), SoundEvents.field_193814_fd); +- field_192017_bK.put(EntityList.field_191308_b.func_148757_b(EntityVex.class), SoundEvents.field_193815_fe); +- field_192017_bK.put(EntityList.field_191308_b.func_148757_b(EntityVindicator.class), SoundEvents.field_193816_ff); +- field_192017_bK.put(EntityList.field_191308_b.func_148757_b(EntityWitch.class), SoundEvents.field_193817_fg); +- field_192017_bK.put(EntityList.field_191308_b.func_148757_b(EntityWither.class), SoundEvents.field_193818_fh); +- field_192017_bK.put(EntityList.field_191308_b.func_148757_b(EntityWitherSkeleton.class), SoundEvents.field_193819_fi); +- field_192017_bK.put(EntityList.field_191308_b.func_148757_b(EntityWolf.class), SoundEvents.field_193820_fj); +- field_192017_bK.put(EntityList.field_191308_b.func_148757_b(EntityZombie.class), SoundEvents.field_193821_fk); +- field_192017_bK.put(EntityList.field_191308_b.func_148757_b(EntityZombieVillager.class), SoundEvents.field_193823_fm); ++ registerMimicSound(EntityBlaze.class, SoundEvents.field_193791_eM); ++ registerMimicSound(EntityCaveSpider.class, SoundEvents.field_193813_fc); ++ registerMimicSound(EntityCreeper.class, SoundEvents.field_193792_eN); ++ registerMimicSound(EntityElderGuardian.class, SoundEvents.field_193793_eO); ++ registerMimicSound(EntityDragon.class, SoundEvents.field_193794_eP); ++ registerMimicSound(EntityEnderman.class, SoundEvents.field_193795_eQ); ++ registerMimicSound(EntityEndermite.class, SoundEvents.field_193796_eR); ++ registerMimicSound(EntityEvoker.class, SoundEvents.field_193797_eS); ++ registerMimicSound(EntityGhast.class, SoundEvents.field_193798_eT); ++ registerMimicSound(EntityHusk.class, SoundEvents.field_193799_eU); ++ registerMimicSound(EntityIllusionIllager.class, SoundEvents.field_193800_eV); ++ registerMimicSound(EntityMagmaCube.class, SoundEvents.field_193801_eW); ++ registerMimicSound(EntityPigZombie.class, SoundEvents.field_193822_fl); ++ registerMimicSound(EntityPolarBear.class, SoundEvents.field_193802_eX); ++ registerMimicSound(EntityShulker.class, SoundEvents.field_193803_eY); ++ registerMimicSound(EntitySilverfish.class, SoundEvents.field_193804_eZ); ++ registerMimicSound(EntitySkeleton.class, SoundEvents.field_193811_fa); ++ registerMimicSound(EntitySlime.class, SoundEvents.field_193812_fb); ++ registerMimicSound(EntitySpider.class, SoundEvents.field_193813_fc); ++ registerMimicSound(EntityStray.class, SoundEvents.field_193814_fd); ++ registerMimicSound(EntityVex.class, SoundEvents.field_193815_fe); ++ registerMimicSound(EntityVindicator.class, SoundEvents.field_193816_ff); ++ registerMimicSound(EntityWitch.class, SoundEvents.field_193817_fg); ++ registerMimicSound(EntityWither.class, SoundEvents.field_193818_fh); ++ registerMimicSound(EntityWitherSkeleton.class, SoundEvents.field_193819_fi); ++ registerMimicSound(EntityWolf.class, SoundEvents.field_193820_fj); ++ registerMimicSound(EntityZombie.class, SoundEvents.field_193821_fk); ++ registerMimicSound(EntityZombieVillager.class, SoundEvents.field_193823_fm); + } ++ ++ public static void registerMimicSound(Class cls, SoundEvent sound) ++ { ++ MIMIC_SOUNDS.put(cls, sound); ++ } + } diff --git a/patches/minecraft/net/minecraft/entity/passive/EntitySheep.java.patch b/patches/minecraft/net/minecraft/entity/passive/EntitySheep.java.patch index 0ba6c1606..88da777f9 100644 --- a/patches/minecraft/net/minecraft/entity/passive/EntitySheep.java.patch +++ b/patches/minecraft/net/minecraft/entity/passive/EntitySheep.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/entity/passive/EntitySheep.java +++ ../src-work/minecraft/net/minecraft/entity/passive/EntitySheep.java -@@ -45,7 +45,7 @@ +@@ -46,7 +46,7 @@ import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -9,7 +9,7 @@ { 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() -@@ -180,7 +180,7 @@ +@@ -189,7 +189,7 @@ { ItemStack itemstack = p_184645_1_.func_184586_b(p_184645_2_); @@ -18,11 +18,10 @@ { if (!this.field_70170_p.field_72995_K) { -@@ -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}); +@@ -364,6 +364,21 @@ + return p_180482_2_; } -+ + + @Override public boolean isShearable(ItemStack item, net.minecraft.world.IBlockAccess world, BlockPos pos){ return !this.func_70892_o() && !this.func_70631_g_(); } + @Override + public java.util.List onSheared(ItemStack item, net.minecraft.world.IBlockAccess world, BlockPos pos, int fortune) @@ -37,4 +36,7 @@ + this.func_184185_a(SoundEvents.field_187763_eJ, 1.0F, 1.0F); + return ret; + } - } ++ + private EnumDyeColor func_175511_a(EntityAnimal p_175511_1_, EntityAnimal p_175511_2_) + { + int i = ((EntitySheep)p_175511_1_).func_175509_cj().func_176767_b(); diff --git a/patches/minecraft/net/minecraft/entity/passive/EntityVillager.java.patch b/patches/minecraft/net/minecraft/entity/passive/EntityVillager.java.patch index 7983c6c97..d41728b6a 100644 --- a/patches/minecraft/net/minecraft/entity/passive/EntityVillager.java.patch +++ b/patches/minecraft/net/minecraft/entity/passive/EntityVillager.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/entity/passive/EntityVillager.java +++ ../src-work/minecraft/net/minecraft/entity/passive/EntityVillager.java -@@ -105,7 +105,7 @@ +@@ -109,7 +109,7 @@ private boolean field_70959_by; private boolean field_175565_bs; private int field_70956_bz; @@ -9,7 +9,7 @@ private int field_175563_bv; private int field_175562_bw; private boolean field_82190_bM; -@@ -230,7 +230,7 @@ +@@ -234,7 +234,7 @@ if (this.field_70954_d != null && this.field_82189_bL != null) { this.field_70170_p.func_72960_a(this, (byte)14); @@ -18,7 +18,7 @@ } } -@@ -323,6 +323,7 @@ +@@ -327,6 +327,7 @@ { super.func_70014_b(p_70014_1_); p_70014_1_.func_74768_a("Profession", this.func_70946_n()); @@ -26,7 +26,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); -@@ -352,6 +353,14 @@ +@@ -356,6 +357,14 @@ { super.func_70037_a(p_70037_1_); this.func_70938_b(p_70037_1_.func_74762_e("Profession")); @@ -41,7 +41,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"); -@@ -408,13 +417,43 @@ +@@ -412,13 +421,43 @@ public void func_70938_b(int p_70938_1_) { this.field_70180_af.func_187227_b(field_184752_bw, Integer.valueOf(p_70938_1_)); @@ -86,7 +86,7 @@ public boolean func_70941_o() { return this.field_70952_f; -@@ -452,7 +491,7 @@ +@@ -456,7 +495,7 @@ i = -3; } @@ -95,7 +95,7 @@ if (this.func_70089_S()) { -@@ -472,7 +511,7 @@ +@@ -476,7 +515,7 @@ { if (entity instanceof EntityPlayer) { @@ -104,7 +104,7 @@ } else if (entity instanceof IMob) { -@@ -564,7 +603,7 @@ +@@ -569,7 +608,7 @@ if (this.field_70962_h != null) { @@ -113,7 +113,7 @@ } else { -@@ -607,15 +646,13 @@ +@@ -617,15 +656,13 @@ private void func_175554_cu() { @@ -130,7 +130,7 @@ this.field_175562_bw = 1; } -@@ -626,19 +663,13 @@ +@@ -636,19 +673,13 @@ int i = this.field_175563_bv - 1; int j = this.field_175562_bw - 1; @@ -154,7 +154,7 @@ } } } -@@ -748,7 +779,7 @@ +@@ -758,7 +789,7 @@ s1 = "nitwit"; } @@ -163,7 +163,7 @@ { ITextComponent itextcomponent = new TextComponentTranslation("entity.Villager." + s1, new Object[0]); itextcomponent.func_150256_b().func_150209_a(this.func_174823_aP()); -@@ -761,10 +792,6 @@ +@@ -771,10 +802,6 @@ return itextcomponent; } @@ -174,7 +174,7 @@ } } -@@ -818,7 +845,7 @@ +@@ -828,7 +855,7 @@ if (p_190672_3_) { @@ -183,7 +183,7 @@ } this.func_175552_ct(); -@@ -1071,6 +1098,9 @@ +@@ -1089,6 +1116,9 @@ p_190888_2_.add(new MerchantRecipe(itemstack, itemstack1)); } } diff --git a/patches/minecraft/net/minecraft/entity/passive/EntityWolf.java.patch b/patches/minecraft/net/minecraft/entity/passive/EntityWolf.java.patch index 5df834e61..ebb5890e4 100644 --- a/patches/minecraft/net/minecraft/entity/passive/EntityWolf.java.patch +++ b/patches/minecraft/net/minecraft/entity/passive/EntityWolf.java.patch @@ -1,11 +1,11 @@ --- ../src-base/minecraft/net/minecraft/entity/passive/EntityWolf.java +++ ../src-work/minecraft/net/minecraft/entity/passive/EntityWolf.java -@@ -423,7 +423,7 @@ +@@ -434,7 +434,7 @@ if (!this.field_70170_p.field_72995_K) { - if (this.field_70146_Z.nextInt(3) == 0) + if (this.field_70146_Z.nextInt(3) == 0 && !net.minecraftforge.event.ForgeEventFactory.onAnimalTame(this, p_184645_1_)) { - this.func_70903_f(true); + this.func_193101_c(p_184645_1_); this.field_70699_by.func_75499_g(); diff --git a/patches/minecraft/net/minecraft/entity/player/EntityPlayer.java.patch b/patches/minecraft/net/minecraft/entity/player/EntityPlayer.java.patch index fd71243e8..c517a7a41 100644 --- a/patches/minecraft/net/minecraft/entity/player/EntityPlayer.java.patch +++ b/patches/minecraft/net/minecraft/entity/player/EntityPlayer.java.patch @@ -1,12 +1,12 @@ --- ../src-base/minecraft/net/minecraft/entity/player/EntityPlayer.java +++ ../src-work/minecraft/net/minecraft/entity/player/EntityPlayer.java -@@ -98,6 +98,11 @@ +@@ -96,6 +96,11 @@ @SuppressWarnings("incomplete-switch") public abstract class EntityPlayer extends EntityLivingBase { + public static final String PERSISTED_NBT_TAG = "PlayerPersisted"; -+ private java.util.HashMap spawnChunkMap = new java.util.HashMap(); -+ private java.util.HashMap spawnForcedMap = new java.util.HashMap(); ++ protected java.util.HashMap spawnChunkMap = new java.util.HashMap(); ++ protected java.util.HashMap spawnForcedMap = new java.util.HashMap(); + public float eyeHeight = this.getDefaultEyeHeight(); + private static final DataParameter field_184829_a = EntityDataManager.func_187226_a(EntityPlayer.class, DataSerializers.field_187193_c); @@ -20,7 +20,7 @@ this.field_70145_X = this.func_175149_v(); if (this.func_175149_v()) -@@ -372,6 +378,7 @@ +@@ -367,6 +373,7 @@ this.func_70105_a(f, f1); } } @@ -28,7 +28,7 @@ } public int func_82145_z() -@@ -459,11 +466,11 @@ +@@ -454,11 +461,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 @@ } } } -@@ -593,11 +600,15 @@ +@@ -609,11 +616,15 @@ public void func_70645_a(DamageSource p_70645_1_) { @@ -58,7 +58,7 @@ if ("Notch".equals(this.func_70005_c_())) { this.func_146097_a(new ItemStack(Items.field_151034_e, 1), true, false); -@@ -609,6 +620,9 @@ +@@ -625,6 +636,9 @@ this.field_71071_by.func_70436_m(); } @@ -68,7 +68,7 @@ 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); -@@ -712,13 +726,24 @@ +@@ -675,13 +689,24 @@ @Nullable public EntityItem func_71040_bB(boolean p_71040_1_) { @@ -95,7 +95,7 @@ } @Nullable -@@ -778,14 +803,22 @@ +@@ -741,14 +766,22 @@ public ItemStack func_184816_a(EntityItem p_184816_1_) { @@ -119,7 +119,7 @@ if (f > 1.0F) { int i = EnchantmentHelper.func_185293_e(this); -@@ -835,12 +868,13 @@ +@@ -798,12 +831,13 @@ f /= 5.0F; } @@ -135,7 +135,7 @@ } public static void func_189806_a(DataFixer p_189806_0_) -@@ -889,6 +923,17 @@ +@@ -863,6 +897,17 @@ this.field_82248_d = p_70037_1_.func_74767_n("SpawnForced"); } @@ -153,15 +153,15 @@ this.field_71100_bB.func_75112_a(p_70037_1_); this.field_71075_bZ.func_75095_b(p_70037_1_); -@@ -903,6 +948,7 @@ +@@ -887,6 +932,7 @@ { super.func_70014_b(p_70014_1_); - p_70014_1_.func_74768_a("DataVersion", 922); + p_70014_1_.func_74768_a("DataVersion", 1139); + net.minecraftforge.fml.common.FMLCommonHandler.instance().getDataFixer().writeVersionData(p_70014_1_); p_70014_1_.func_74782_a("Inventory", this.field_71071_by.func_70442_a(new NBTTagList())); p_70014_1_.func_74768_a("SelectedItemSlot", this.field_71071_by.field_70461_c); p_70014_1_.func_74757_a("Sleeping", this.field_71083_bS); -@@ -921,6 +967,27 @@ +@@ -905,6 +951,27 @@ p_70014_1_.func_74757_a("SpawnForced", this.field_82248_d); } @@ -189,7 +189,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()); -@@ -928,6 +995,7 @@ +@@ -922,6 +989,7 @@ public boolean func_70097_a(DamageSource p_70097_1_, float p_70097_2_) { @@ -197,7 +197,7 @@ if (this.func_180431_b(p_70097_1_)) { return false; -@@ -1000,12 +1068,14 @@ +@@ -1004,12 +1072,14 @@ { if (p_184590_1_ >= 3.0F && this.field_184627_bm.func_77973_b() == Items.field_185159_cQ) { @@ -212,7 +212,7 @@ if (enumhand == EnumHand.MAIN_HAND) { -@@ -1041,7 +1111,10 @@ +@@ -1045,7 +1115,10 @@ { if (!this.func_180431_b(p_70665_1_)) { @@ -224,7 +224,7 @@ 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); -@@ -1111,6 +1184,8 @@ +@@ -1115,6 +1188,8 @@ } else { @@ -233,7 +233,7 @@ ItemStack itemstack = this.func_184586_b(p_190775_2_); ItemStack itemstack1 = itemstack.func_190926_b() ? ItemStack.field_190927_a : itemstack.func_77946_l(); -@@ -1120,7 +1195,10 @@ +@@ -1124,7 +1199,10 @@ { itemstack.func_190920_e(itemstack1.func_190916_E()); } @@ -245,7 +245,7 @@ return EnumActionResult.SUCCESS; } else -@@ -1136,6 +1214,7 @@ +@@ -1140,6 +1218,7 @@ { if (itemstack.func_190926_b() && !this.field_71075_bZ.field_75098_d) { @@ -253,7 +253,7 @@ this.func_184611_a(p_190775_2_, ItemStack.field_190927_a); } -@@ -1161,6 +1240,7 @@ +@@ -1165,6 +1244,7 @@ public void func_71059_n(Entity p_71059_1_) { @@ -261,7 +261,7 @@ if (p_71059_1_.func_70075_an()) { if (!p_71059_1_.func_85031_j(this)) -@@ -1333,10 +1413,12 @@ +@@ -1332,10 +1412,12 @@ if (!itemstack1.func_190926_b() && entity instanceof EntityLivingBase) { @@ -274,7 +274,7 @@ this.func_184611_a(EnumHand.MAIN_HAND, ItemStack.field_190927_a); } } -@@ -1443,6 +1525,8 @@ +@@ -1442,6 +1524,8 @@ public EntityPlayer.SleepResult func_180469_a(BlockPos p_180469_1_) { @@ -284,7 +284,7 @@ if (!this.field_70170_p.field_72995_K) @@ -1484,8 +1568,9 @@ - + this.func_192030_dh(); this.func_70105_a(0.2F, 0.2F); - if (this.field_70170_p.func_175667_e(p_180469_1_)) @@ -392,7 +392,7 @@ if (p_180473_1_ != null) { this.field_71077_c = p_180473_1_; -@@ -1841,6 +1941,10 @@ +@@ -1839,6 +1939,10 @@ super.func_180430_e(p_180430_1_, p_180430_2_); } @@ -403,26 +403,7 @@ } protected void func_71061_d_() -@@ -2041,6 +2145,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)); -+ -+ this.spawnChunkMap = p_71049_1_.spawnChunkMap; -+ this.spawnForcedMap = p_71049_1_.spawnForcedMap; -+ -+ //Copy over a section of the Entity Data from the old player. -+ //Allows mods to specify data that persists after players respawn. -+ NBTTagCompound old = p_71049_1_.getEntityData(); -+ if (old.func_74764_b(PERSISTED_NBT_TAG)) -+ { -+ getEntityData().func_74782_a(PERSISTED_NBT_TAG, old.func_74775_l(PERSISTED_NBT_TAG)); -+ } -+ net.minecraftforge.event.ForgeEventFactory.onPlayerClone(this, p_71049_1_, !p_71049_2_); - } - - protected boolean func_70041_e_() -@@ -2145,7 +2261,10 @@ +@@ -2176,7 +2280,10 @@ public ITextComponent func_145748_c_() { @@ -434,7 +415,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_()); -@@ -2154,7 +2273,7 @@ +@@ -2185,7 +2292,7 @@ public float func_70047_e() { @@ -443,7 +424,7 @@ if (this.func_70608_bn()) { -@@ -2370,6 +2489,168 @@ +@@ -2421,6 +2528,168 @@ 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 cc485b978..98df4442f 100644 --- a/patches/minecraft/net/minecraft/entity/player/EntityPlayerMP.java.patch +++ b/patches/minecraft/net/minecraft/entity/player/EntityPlayerMP.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/entity/player/EntityPlayerMP.java +++ ../src-work/minecraft/net/minecraft/entity/player/EntityPlayerMP.java -@@ -146,9 +146,9 @@ +@@ -158,9 +158,9 @@ super(p_i45285_2_, p_i45285_3_); p_i45285_4_.field_73090_b = this; this.field_71134_c = p_i45285_4_; @@ -12,7 +12,7 @@ { 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())); -@@ -279,7 +279,7 @@ +@@ -323,7 +323,7 @@ this.field_71070_bA.func_75142_b(); @@ -21,7 +21,7 @@ { this.func_71053_j(); this.field_71070_bA = this.field_71069_bz; -@@ -462,6 +462,7 @@ +@@ -471,6 +471,7 @@ public void func_70645_a(DamageSource p_70645_1_) { @@ -29,7 +29,7 @@ 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)); -@@ -488,8 +489,20 @@ +@@ -499,8 +500,20 @@ if (!this.field_70170_p.func_82736_K().func_82766_b("keepInventory") && !this.func_175149_v()) { @@ -50,15 +50,15 @@ } for (ScoreObjective scoreobjective : this.field_70170_p.func_96441_U().func_96520_a(IScoreCriteria.field_96642_c)) -@@ -573,6 +586,7 @@ +@@ -647,6 +660,7 @@ @Nullable public Entity func_184204_a(int p_184204_1_) { + if (!net.minecraftforge.common.ForgeHooks.onTravelToDimension(this, p_184204_1_)) return this; this.field_184851_cj = true; - if (this.field_71093_bK == 1 && p_184204_1_ == 1) -@@ -730,7 +744,7 @@ + if (this.field_71093_bK == 0 && p_184204_1_ == -1) +@@ -808,7 +822,7 @@ BlockPos blockpos = new BlockPos(i, j, k); IBlockState iblockstate = this.field_70170_p.func_180495_p(blockpos); @@ -67,7 +67,7 @@ { BlockPos blockpos1 = blockpos.func_177977_b(); IBlockState iblockstate1 = this.field_70170_p.func_180495_p(blockpos1); -@@ -770,6 +784,7 @@ +@@ -848,6 +862,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); @@ -75,7 +75,7 @@ } } -@@ -813,6 +828,7 @@ +@@ -891,6 +906,7 @@ this.field_71070_bA.field_75152_c = this.field_71139_cq; this.field_71070_bA.func_75132_a(this); @@ -83,7 +83,7 @@ } } -@@ -822,6 +838,7 @@ +@@ -900,6 +916,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); @@ -91,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_())); -@@ -920,6 +937,7 @@ +@@ -1003,6 +1020,7 @@ public void func_71128_l() { this.field_71070_bA.func_75134_a(this); @@ -99,11 +99,22 @@ this.field_71070_bA = this.field_71069_bz; } -@@ -951,6 +969,7 @@ - { - if (p_71064_1_ != null) - { -+ if (p_71064_1_.func_75967_d() && net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.event.entity.player.AchievementEvent(this, (net.minecraft.stats.Achievement) p_71064_1_))) return; - this.field_147103_bO.func_150871_b(this, p_71064_1_, p_71064_2_); +@@ -1144,6 +1162,18 @@ + this.field_193110_cw = p_193104_1_.field_193110_cw; + this.func_192029_h(p_193104_1_.func_192023_dk()); + this.func_192031_i(p_193104_1_.func_192025_dl()); ++ ++ this.spawnChunkMap = p_193104_1_.spawnChunkMap; ++ this.spawnForcedMap = p_193104_1_.spawnForcedMap; ++ ++ //Copy over a section of the Entity Data from the old player. ++ //Allows mods to specify data that persists after players respawn. ++ NBTTagCompound old = p_193104_1_.getEntityData(); ++ if (old.func_74764_b(PERSISTED_NBT_TAG)) ++ { ++ getEntityData().func_74782_a(PERSISTED_NBT_TAG, old.func_74775_l(PERSISTED_NBT_TAG)); ++ } ++ net.minecraftforge.event.ForgeEventFactory.onPlayerClone(this, p_193104_1_, !p_193104_2_); + } - for (ScoreObjective scoreobjective : this.func_96123_co().func_96520_a(p_71064_1_.func_150952_k())) + protected void func_70670_a(PotionEffect p_70670_1_) diff --git a/patches/minecraft/net/minecraft/entity/player/InventoryPlayer.java.patch b/patches/minecraft/net/minecraft/entity/player/InventoryPlayer.java.patch index 0c49f3ff8..2209a1a2b 100644 --- a/patches/minecraft/net/minecraft/entity/player/InventoryPlayer.java.patch +++ b/patches/minecraft/net/minecraft/entity/player/InventoryPlayer.java.patch @@ -1,17 +1,7 @@ --- ../src-base/minecraft/net/minecraft/entity/player/InventoryPlayer.java +++ ../src-work/minecraft/net/minecraft/entity/player/InventoryPlayer.java -@@ -275,7 +275,8 @@ - - 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.func_190920_e(0); - - if (p_70452_1_.func_77942_o()) - { -@@ -347,6 +348,14 @@ - } +@@ -110,6 +110,14 @@ + this.func_184430_d(i); } } + @@ -24,4 +14,14 @@ + } } - public boolean func_70441_a(final ItemStack p_70441_1_) + public void func_184430_d(int p_184430_1_) +@@ -293,7 +301,8 @@ + + if (itemstack.func_190926_b()) + { +- itemstack = new ItemStack(item, 0, p_191973_2_.func_77960_j()); ++ itemstack = p_191973_2_.func_77946_l(); // Forge: Replace Item clone above to preserve item capabilities when picking the item up. ++ itemstack.func_190920_e(0); + + if (p_191973_2_.func_77942_o()) + { diff --git a/patches/minecraft/net/minecraft/init/Bootstrap.java.patch b/patches/minecraft/net/minecraft/init/Bootstrap.java.patch index 86d690346..ff0511f05 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 -@@ -258,6 +258,9 @@ +@@ -264,6 +264,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,10 +10,11 @@ BlockDispenser.field_149943_a.func_82595_a(Items.field_151133_ar, new BehaviorDefaultDispenseItem() { private final BehaviorDefaultDispenseItem field_150840_b = new BehaviorDefaultDispenseItem(); -@@ -496,6 +499,7 @@ - StatList.func_151178_a(); - Biome.func_185358_q(); - func_151353_a(); +@@ -524,6 +527,8 @@ + field_179871_c.error("Errors with built-in loot tables"); + } + } ++ + net.minecraftforge.fml.common.registry.GameData.vanillaSnapshot(); } } diff --git a/patches/minecraft/net/minecraft/inventory/Container.java.patch b/patches/minecraft/net/minecraft/inventory/Container.java.patch index 1741ee26d..0a419f70f 100644 --- a/patches/minecraft/net/minecraft/inventory/Container.java.patch +++ b/patches/minecraft/net/minecraft/inventory/Container.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/inventory/Container.java +++ ../src-work/minecraft/net/minecraft/inventory/Container.java -@@ -578,18 +578,19 @@ +@@ -603,18 +603,19 @@ if (!itemstack.func_190926_b() && itemstack.func_77973_b() == p_75135_1_.func_77973_b() && (!p_75135_1_.func_77981_g() || p_75135_1_.func_77960_j() == itemstack.func_77960_j()) && ItemStack.func_77970_a(p_75135_1_, itemstack)) { int j = itemstack.func_190916_E() + p_75135_1_.func_190916_E(); @@ -24,7 +24,7 @@ slot.func_75218_e(); flag = true; } -@@ -708,7 +709,7 @@ +@@ -752,7 +753,7 @@ p_94525_2_.func_190920_e(1); break; case 2: diff --git a/patches/minecraft/net/minecraft/inventory/ContainerBrewingStand.java.patch b/patches/minecraft/net/minecraft/inventory/ContainerBrewingStand.java.patch index 500b3c028..f5b404c23 100644 --- a/patches/minecraft/net/minecraft/inventory/ContainerBrewingStand.java.patch +++ b/patches/minecraft/net/minecraft/inventory/ContainerBrewingStand.java.patch @@ -9,15 +9,15 @@ } public int func_75219_a() -@@ -232,6 +232,7 @@ +@@ -229,6 +229,7 @@ - if (potiontype != PotionTypes.field_185230_b && potiontype != PotionTypes.field_185229_a) + if (p_190901_1_ instanceof EntityPlayerMP) { + net.minecraftforge.event.ForgeEventFactory.onPlayerBrewedPotion(p_190901_1_, p_190901_2_); - this.field_75244_a.func_71029_a(AchievementList.field_187970_B); + CriteriaTriggers.field_192130_j.func_192173_a((EntityPlayerMP)p_190901_1_, potiontype); } -@@ -241,8 +242,7 @@ +@@ -238,8 +239,7 @@ public static boolean func_75243_a_(ItemStack p_75243_0_) { diff --git a/patches/minecraft/net/minecraft/inventory/ContainerEnchantment.java.patch b/patches/minecraft/net/minecraft/inventory/ContainerEnchantment.java.patch index ef524fe3b..dc24e5efe 100644 --- a/patches/minecraft/net/minecraft/inventory/ContainerEnchantment.java.patch +++ b/patches/minecraft/net/minecraft/inventory/ContainerEnchantment.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/inventory/ContainerEnchantment.java +++ ../src-work/minecraft/net/minecraft/inventory/ContainerEnchantment.java -@@ -70,9 +70,12 @@ +@@ -73,9 +73,12 @@ }); this.func_75146_a(new Slot(this.field_75168_e, 1, 35, 47) { @@ -14,7 +14,7 @@ } }); -@@ -157,6 +160,7 @@ +@@ -160,6 +163,7 @@ if (!this.field_75172_h.field_72995_K) { int l = 0; @@ -22,7 +22,7 @@ for (int j = -1; j <= 1; ++j) { -@@ -164,37 +168,14 @@ +@@ -167,37 +171,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 @@ } } } -@@ -204,7 +185,7 @@ +@@ -207,7 +188,7 @@ for (int i1 = 0; i1 < 3; ++i1) { @@ -75,7 +75,7 @@ this.field_185001_h[i1] = -1; this.field_185002_i[i1] = -1; -@@ -212,6 +193,7 @@ +@@ -215,6 +196,7 @@ { this.field_75167_g[i1] = 0; } diff --git a/patches/minecraft/net/minecraft/inventory/ContainerPlayer.java.patch b/patches/minecraft/net/minecraft/inventory/ContainerPlayer.java.patch index e0f2dc793..6fea935b0 100644 --- a/patches/minecraft/net/minecraft/inventory/ContainerPlayer.java.patch +++ b/patches/minecraft/net/minecraft/inventory/ContainerPlayer.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/inventory/ContainerPlayer.java +++ ../src-work/minecraft/net/minecraft/inventory/ContainerPlayer.java -@@ -44,7 +44,7 @@ +@@ -43,7 +43,7 @@ } public boolean func_75214_a(ItemStack p_75214_1_) { diff --git a/patches/minecraft/net/minecraft/inventory/ContainerRepair.java.patch b/patches/minecraft/net/minecraft/inventory/ContainerRepair.java.patch index b6eb59306..d5b59f737 100644 --- a/patches/minecraft/net/minecraft/inventory/ContainerRepair.java.patch +++ b/patches/minecraft/net/minecraft/inventory/ContainerRepair.java.patch @@ -6,10 +6,10 @@ + 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)); + - ItemStack itemstack = ContainerRepair.this.field_82853_g.func_70301_a(0); + ContainerRepair.this.field_82853_g.func_70299_a(0, ItemStack.field_190927_a); - if (itemstack.func_190916_E() != 1 && !p_190901_1_.field_71075_bZ.field_75098_d && !(itemstack.func_77973_b() instanceof ItemNameTag)) -@@ -103,7 +105,7 @@ + if (ContainerRepair.this.field_82856_l > 0) +@@ -94,7 +96,7 @@ ContainerRepair.this.field_82854_e = 0; IBlockState iblockstate = p_i45807_2_.func_180495_p(p_i45807_3_); @@ -18,7 +18,7 @@ { int l = ((Integer)iblockstate.func_177229_b(BlockAnvil.field_176505_b)).intValue(); ++l; -@@ -178,10 +180,12 @@ +@@ -163,10 +165,12 @@ Map map = EnchantmentHelper.func_82781_a(itemstack1); j = j + itemstack.func_82838_A() + (itemstack2.func_190926_b() ? 0 : itemstack2.func_82838_A()); this.field_82856_l = 0; @@ -26,13 +26,13 @@ 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(); +- boolean flag = itemstack2.func_77973_b() == Items.field_151134_bR && !ItemEnchantedBook.func_92110_g(itemstack2).func_82582_d(); + if (!net.minecraftforge.common.ForgeHooks.onAnvilChange(this, itemstack, itemstack2, field_82852_f, field_82857_m, j)) return; -+ flag = itemstack2.func_77973_b() == Items.field_151134_bR && !Items.field_151134_bR.func_92110_g(itemstack2).func_82582_d(); ++ flag = itemstack2.func_77973_b() == Items.field_151134_bR && !ItemEnchantedBook.func_92110_g(itemstack2).func_82582_d(); if (itemstack1.func_77984_f() && itemstack1.func_77973_b().func_82789_a(itemstack, itemstack2)) { -@@ -327,6 +331,7 @@ +@@ -317,6 +321,7 @@ i += k; itemstack1.func_151001_c(this.field_82857_m); } diff --git a/patches/minecraft/net/minecraft/inventory/SlotCrafting.java.patch b/patches/minecraft/net/minecraft/inventory/SlotCrafting.java.patch index b6503d2b2..8d60d550e 100644 --- a/patches/minecraft/net/minecraft/inventory/SlotCrafting.java.patch +++ b/patches/minecraft/net/minecraft/inventory/SlotCrafting.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/inventory/SlotCrafting.java +++ ../src-work/minecraft/net/minecraft/inventory/SlotCrafting.java -@@ -56,6 +56,7 @@ +@@ -51,6 +51,7 @@ if (this.field_75237_g > 0) { p_75208_1_.func_77980_a(this.field_75238_b.field_70170_p, this.field_75238_b, this.field_75237_g); @@ -8,12 +8,12 @@ } this.field_75237_g = 0; -@@ -114,7 +115,9 @@ +@@ -67,7 +68,9 @@ public ItemStack func_190901_a(EntityPlayer p_190901_1_, ItemStack p_190901_2_) { 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); + NonNullList nonnulllist = CraftingManager.func_180303_b(this.field_75239_a, p_190901_1_.field_70170_p); + net.minecraftforge.common.ForgeHooks.setCraftingPlayer(null); for (int i = 0; i < nonnulllist.size(); ++i) diff --git a/patches/minecraft/net/minecraft/inventory/SlotFurnaceOutput.java.patch b/patches/minecraft/net/minecraft/inventory/SlotFurnaceOutput.java.patch index 9eed3569a..843b76257 100644 --- a/patches/minecraft/net/minecraft/inventory/SlotFurnaceOutput.java.patch +++ b/patches/minecraft/net/minecraft/inventory/SlotFurnaceOutput.java.patch @@ -1,11 +1,9 @@ --- ../src-base/minecraft/net/minecraft/inventory/SlotFurnaceOutput.java +++ ../src-work/minecraft/net/minecraft/inventory/SlotFurnaceOutput.java -@@ -82,6 +82,8 @@ +@@ -79,5 +79,6 @@ + } this.field_75228_b = 0; - + net.minecraftforge.fml.common.FMLCommonHandler.instance().firePlayerSmeltedEvent(field_75229_a, p_75208_1_); -+ - if (p_75208_1_.func_77973_b() == Items.field_151042_j) - { - this.field_75229_a.func_71029_a(AchievementList.field_187987_k); + } + } diff --git a/patches/minecraft/net/minecraft/item/Item.java.patch b/patches/minecraft/net/minecraft/item/Item.java.patch index 1d93e0b64..d7f478eec 100644 --- a/patches/minecraft/net/minecraft/item/Item.java.patch +++ b/patches/minecraft/net/minecraft/item/Item.java.patch @@ -1,20 +1,20 @@ --- ../src-base/minecraft/net/minecraft/item/Item.java +++ ../src-work/minecraft/net/minecraft/item/Item.java -@@ -57,10 +57,10 @@ +@@ -58,10 +58,10 @@ import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; -public class Item +public class Item extends net.minecraftforge.fml.common.registry.IForgeRegistryEntry.Impl { -- public static final RegistryNamespaced field_150901_e = new RegistryNamespaced(); +- public static final RegistryNamespaced field_150901_e = new RegistryNamespaced(); - private static final Map field_179220_a = Maps.newHashMap(); -+ public static final RegistryNamespaced field_150901_e = net.minecraftforge.fml.common.registry.GameData.getItemRegistry();; ++ public static final RegistryNamespaced field_150901_e = net.minecraftforge.fml.common.registry.GameData.getItemRegistry(); + private static final Map field_179220_a = net.minecraftforge.fml.common.registry.GameData.getBlockItemMap(); private static final IItemPropertyGetter field_185046_b = new IItemPropertyGetter() { @SideOnly(Side.CLIENT) -@@ -202,6 +202,7 @@ +@@ -197,6 +197,7 @@ return p_77654_1_; } @@ -22,7 +22,7 @@ public int func_77639_j() { return this.field_77777_bU; -@@ -223,6 +224,7 @@ +@@ -218,6 +219,7 @@ return this; } @@ -30,7 +30,7 @@ public int func_77612_l() { return this.field_77699_b; -@@ -322,6 +324,7 @@ +@@ -317,6 +319,7 @@ return this.field_77700_c; } @@ -38,7 +38,7 @@ public boolean func_77634_r() { return this.field_77700_c != null; -@@ -377,7 +380,7 @@ +@@ -372,7 +375,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_) -@@ -395,7 +398,11 @@ +@@ -390,7 +393,11 @@ float f6 = f3 * f4; float f7 = f2 * f4; double d3 = 5.0D; @@ -60,7 +60,17 @@ return p_77621_1_.func_147447_a(vec3d, vec3d1, p_77621_3_, !p_77621_3_, false); } -@@ -433,11 +440,632 @@ +@@ -411,6 +418,9 @@ + @SideOnly(Side.CLIENT) + protected boolean func_194125_a(CreativeTabs p_194125_1_) + { ++ for (CreativeTabs tab : this.getCreativeTabs()) ++ if (tab == p_194125_1_) ++ return true; + CreativeTabs creativetabs = this.func_77640_w(); + return creativetabs != null && (p_194125_1_ == CreativeTabs.field_78027_g || p_194125_1_ == creativetabs); + } +@@ -438,11 +448,632 @@ return false; } @@ -693,7 +703,7 @@ public static void func_150900_l() { func_179214_a(Blocks.field_150350_a, new ItemAir(Blocks.field_150350_a)); -@@ -972,6 +1600,8 @@ +@@ -1002,6 +1633,8 @@ private final float field_78010_h; private final float field_78011_i; private final int field_78008_j; @@ -702,14 +712,17 @@ private ToolMaterial(int p_i1874_3_, int p_i1874_4_, float p_i1874_5_, float p_i1874_6_, int p_i1874_7_) { -@@ -1007,9 +1637,26 @@ +@@ -1037,6 +1670,7 @@ return this.field_78008_j; } + @Deprecated // Use getRepairItemStack below public Item func_150995_f() { - return this == WOOD ? Item.func_150898_a(Blocks.field_150344_f) : (this == STONE ? Item.func_150898_a(Blocks.field_150347_e) : (this == GOLD ? Items.field_151043_k : (this == IRON ? Items.field_151042_j : (this == DIAMOND ? Items.field_151045_i : null)))); + if (this == WOOD) +@@ -1060,5 +1694,21 @@ + return this == DIAMOND ? Items.field_151045_i : null; + } } + + public ToolMaterial setRepairItem(ItemStack stack) diff --git a/patches/minecraft/net/minecraft/item/ItemArmor.java.patch b/patches/minecraft/net/minecraft/item/ItemArmor.java.patch index 1046ea8ef..aeabab817 100644 --- a/patches/minecraft/net/minecraft/item/ItemArmor.java.patch +++ b/patches/minecraft/net/minecraft/item/ItemArmor.java.patch @@ -47,8 +47,8 @@ + @Deprecated // Use getRepairItemStack below public Item func_151685_b() { - return this == LEATHER ? Items.field_151116_aA : (this == CHAIN ? Items.field_151042_j : (this == GOLD ? Items.field_151043_k : (this == IRON ? Items.field_151042_j : (this == DIAMOND ? Items.field_151045_i : null)))); -@@ -281,5 +299,21 @@ + if (this == LEATHER) +@@ -300,5 +318,21 @@ { return this.field_189417_k; } diff --git a/patches/minecraft/net/minecraft/item/ItemBed.java.patch b/patches/minecraft/net/minecraft/item/ItemBed.java.patch index be24641d1..e7f00012c 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 -@@ -62,7 +62,7 @@ +@@ -69,7 +69,7 @@ + IBlockState iblockstate2 = Blocks.field_150324_C.func_176223_P().func_177226_a(BlockBed.field_176471_b, Boolean.valueOf(false)).func_177226_a(BlockBed.field_185512_D, enumfacing).func_177226_a(BlockBed.field_176472_a, BlockBed.EnumPartType.FOOT); + p_180614_2_.func_180501_a(p_180614_3_, iblockstate2, 10); 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; + TileEntity tileentity = p_180614_2_.func_175625_s(blockpos); + diff --git a/patches/minecraft/net/minecraft/item/ItemBlock.java.patch b/patches/minecraft/net/minecraft/item/ItemBlock.java.patch index fdfa1bc85..e1676fd26 100644 --- a/patches/minecraft/net/minecraft/item/ItemBlock.java.patch +++ b/patches/minecraft/net/minecraft/item/ItemBlock.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/item/ItemBlock.java +++ ../src-work/minecraft/net/minecraft/item/ItemBlock.java -@@ -46,19 +46,11 @@ +@@ -49,24 +49,12 @@ 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(itemstack.func_77960_j()); @@ -10,20 +10,25 @@ - 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_2_.func_180495_p(p_180614_3_); + iblockstate1 = p_180614_2_.func_180495_p(p_180614_3_); - - if (iblockstate1.func_177230_c() == this.field_150939_a) - { - 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); +- +- if (p_180614_1_ instanceof EntityPlayerMP) +- { +- CriteriaTriggers.field_193137_x.func_193173_a((EntityPlayerMP)p_180614_1_, p_180614_3_, itemstack); +- } - } - - SoundType soundtype = this.field_150939_a.func_185467_w(); -+ 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_); ++ 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); } -@@ -119,7 +111,7 @@ +@@ -127,7 +115,7 @@ { Block block = p_179222_1_.func_180495_p(p_179222_2_).func_177230_c(); @@ -32,7 +37,7 @@ { p_179222_3_ = EnumFacing.UP; } -@@ -164,4 +156,26 @@ +@@ -175,4 +163,29 @@ { return this.field_150939_a; } @@ -54,6 +59,9 @@ + { + func_179224_a(world, player, pos, stack); + this.field_150939_a.func_180633_a(world, pos, state, player, stack); ++ ++ if (player instanceof EntityPlayerMP) ++ CriteriaTriggers.field_193137_x.func_193173_a((EntityPlayerMP)player, pos, stack); + } + + return true; diff --git a/patches/minecraft/net/minecraft/item/ItemBlockSpecial.java.patch b/patches/minecraft/net/minecraft/item/ItemBlockSpecial.java.patch index 821bf9bfb..7bf822c60 100644 --- a/patches/minecraft/net/minecraft/item/ItemBlockSpecial.java.patch +++ b/patches/minecraft/net/minecraft/item/ItemBlockSpecial.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/item/ItemBlockSpecial.java +++ ../src-work/minecraft/net/minecraft/item/ItemBlockSpecial.java -@@ -41,7 +41,7 @@ +@@ -43,7 +43,7 @@ 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)) { @@ -9,8 +9,8 @@ if (!p_180614_2_.func_180501_a(p_180614_3_, iblockstate1, 11)) { -@@ -57,7 +57,7 @@ - iblockstate1.func_177230_c().func_180633_a(p_180614_2_, p_180614_3_, iblockstate1, p_180614_1_, itemstack); +@@ -64,7 +64,7 @@ + } } - SoundType soundtype = this.field_150935_a.func_185467_w(); @@ -18,7 +18,7 @@ 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; -@@ -68,4 +68,9 @@ +@@ -75,4 +75,9 @@ return EnumActionResult.FAIL; } } diff --git a/patches/minecraft/net/minecraft/item/ItemBow.java.patch b/patches/minecraft/net/minecraft/item/ItemBow.java.patch index 50cafecf8..0694e0b30 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 -@@ -83,6 +83,10 @@ +@@ -90,6 +90,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); @@ -11,7 +11,7 @@ if (!itemstack.func_190926_b() || flag) { if (itemstack.func_190926_b()) -@@ -90,12 +94,11 @@ +@@ -97,12 +101,11 @@ itemstack = new ItemStack(Items.field_151032_g); } @@ -25,7 +25,7 @@ if (!p_77615_2_.field_72995_K) { -@@ -183,6 +186,9 @@ +@@ -190,6 +193,9 @@ ItemStack itemstack = p_77659_2_.func_184586_b(p_77659_3_); boolean flag = !this.func_185060_a(p_77659_2_).func_190926_b(); diff --git a/patches/minecraft/net/minecraft/item/ItemBucket.java.patch b/patches/minecraft/net/minecraft/item/ItemBucket.java.patch index 15162b111..10e135cc2 100644 --- a/patches/minecraft/net/minecraft/item/ItemBucket.java.patch +++ b/patches/minecraft/net/minecraft/item/ItemBucket.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/item/ItemBucket.java +++ ../src-work/minecraft/net/minecraft/item/ItemBucket.java -@@ -38,6 +38,8 @@ +@@ -40,6 +40,8 @@ boolean flag = this.field_77876_a == Blocks.field_150350_a; ItemStack itemstack = p_77659_2_.func_184586_b(p_77659_3_); RayTraceResult raytraceresult = this.func_77621_a(p_77659_1_, p_77659_2_, flag); @@ -9,7 +9,7 @@ if (raytraceresult == null) { -@@ -181,4 +183,16 @@ +@@ -188,4 +190,16 @@ } } } diff --git a/patches/minecraft/net/minecraft/item/ItemBucketMilk.java.patch b/patches/minecraft/net/minecraft/item/ItemBucketMilk.java.patch index 5b852302f..55f14044e 100644 --- a/patches/minecraft/net/minecraft/item/ItemBucketMilk.java.patch +++ b/patches/minecraft/net/minecraft/item/ItemBucketMilk.java.patch @@ -1,26 +1,34 @@ --- ../src-base/minecraft/net/minecraft/item/ItemBucketMilk.java +++ ../src-work/minecraft/net/minecraft/item/ItemBucketMilk.java -@@ -20,11 +20,13 @@ +@@ -22,6 +22,7 @@ public ItemStack func_77654_b(ItemStack p_77654_1_, World p_77654_2_, EntityLivingBase p_77654_3_) { + if (!p_77654_2_.field_72995_K) p_77654_3_.curePotionEffects(p_77654_1_); // FORGE - move up so stack.shrink does not turn stack into air - if (p_77654_3_ instanceof EntityPlayer && !((EntityPlayer)p_77654_3_).field_71075_bZ.field_75098_d) + if (p_77654_3_ instanceof EntityPlayerMP) { + EntityPlayerMP entityplayermp = (EntityPlayerMP)p_77654_3_; +@@ -34,11 +35,6 @@ p_77654_1_.func_190918_g(1); } -+ if (false) // FORGE - stack sensitive version at top of method - if (!p_77654_2_.field_72995_K) - { - p_77654_3_.func_70674_bp(); -@@ -53,4 +55,9 @@ - p_77659_2_.func_184598_c(p_77659_3_); - return new ActionResult(EnumActionResult.SUCCESS, p_77659_2_.func_184586_b(p_77659_3_)); +- if (!p_77654_2_.field_72995_K) +- { +- p_77654_3_.func_70674_bp(); +- } +- + return p_77654_1_.func_190926_b() ? new ItemStack(Items.field_151133_ar) : p_77654_1_; } -+ + +@@ -52,6 +48,11 @@ + return EnumAction.DRINK; + } + + @Override + public net.minecraftforge.common.capabilities.ICapabilityProvider initCapabilities(ItemStack stack, net.minecraft.nbt.NBTTagCompound nbt) { + return new net.minecraftforge.fluids.capability.wrappers.FluidBucketWrapper(stack); + } - } ++ + public ActionResult func_77659_a(World p_77659_1_, EntityPlayer p_77659_2_, EnumHand p_77659_3_) + { + p_77659_2_.func_184598_c(p_77659_3_); diff --git a/patches/minecraft/net/minecraft/item/ItemDye.java.patch b/patches/minecraft/net/minecraft/item/ItemDye.java.patch index 1b1652c07..bb12aee52 100644 --- a/patches/minecraft/net/minecraft/item/ItemDye.java.patch +++ b/patches/minecraft/net/minecraft/item/ItemDye.java.patch @@ -47,7 +47,7 @@ { IGrowable igrowable = (IGrowable)iblockstate.func_177230_c(); @@ -144,6 +163,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]); + 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); } } + else diff --git a/patches/minecraft/net/minecraft/item/ItemFlintAndSteel.java.patch b/patches/minecraft/net/minecraft/item/ItemFlintAndSteel.java.patch index 899f24c68..bc751c102 100644 --- a/patches/minecraft/net/minecraft/item/ItemFlintAndSteel.java.patch +++ b/patches/minecraft/net/minecraft/item/ItemFlintAndSteel.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/item/ItemFlintAndSteel.java +++ ../src-work/minecraft/net/minecraft/item/ItemFlintAndSteel.java -@@ -32,7 +32,7 @@ +@@ -34,7 +34,7 @@ } else { diff --git a/patches/minecraft/net/minecraft/item/ItemLilyPad.java.patch b/patches/minecraft/net/minecraft/item/ItemLilyPad.java.patch index f4d29af13..73ca02424 100644 --- a/patches/minecraft/net/minecraft/item/ItemLilyPad.java.patch +++ b/patches/minecraft/net/minecraft/item/ItemLilyPad.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/item/ItemLilyPad.java +++ ../src-work/minecraft/net/minecraft/item/ItemLilyPad.java -@@ -48,6 +48,15 @@ +@@ -50,6 +50,15 @@ 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)) { @@ -15,4 +15,4 @@ + p_77659_1_.func_180501_a(blockpos1, Blocks.field_150392_bi.func_176223_P(), 11); - if (!p_77659_2_.field_71075_bZ.field_75098_d) + if (p_77659_2_ instanceof EntityPlayerMP) diff --git a/patches/minecraft/net/minecraft/item/ItemMap.java.patch b/patches/minecraft/net/minecraft/item/ItemMap.java.patch index 167eeb4da..cfd3a7962 100644 --- a/patches/minecraft/net/minecraft/item/ItemMap.java.patch +++ b/patches/minecraft/net/minecraft/item/ItemMap.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/item/ItemMap.java +++ ../src-work/minecraft/net/minecraft/item/ItemMap.java -@@ -40,7 +40,7 @@ +@@ -42,7 +42,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); @@ -9,7 +9,7 @@ mapdata.field_186210_e = p_190906_6_; mapdata.field_191096_f = p_190906_7_; mapdata.func_76185_a(); -@@ -68,7 +68,7 @@ +@@ -70,7 +70,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); @@ -18,7 +18,7 @@ mapdata.func_76185_a(); p_77873_2_.func_72823_a(s, mapdata); } -@@ -78,7 +78,7 @@ +@@ -80,7 +80,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/ItemRecord.java.patch b/patches/minecraft/net/minecraft/item/ItemRecord.java.patch index 74ba72565..4bebc5b3d 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 -@@ -64,6 +64,17 @@ +@@ -65,6 +65,17 @@ p_77624_3_.add(this.func_150927_i()); } diff --git a/patches/minecraft/net/minecraft/item/ItemSeeds.java.patch b/patches/minecraft/net/minecraft/item/ItemSeeds.java.patch index fc14c78f0..93e4b84fb 100644 --- a/patches/minecraft/net/minecraft/item/ItemSeeds.java.patch +++ b/patches/minecraft/net/minecraft/item/ItemSeeds.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/item/ItemSeeds.java +++ ../src-work/minecraft/net/minecraft/item/ItemSeeds.java -@@ -9,7 +9,7 @@ +@@ -11,7 +11,7 @@ import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; @@ -9,7 +9,7 @@ { private final Block field_150925_a; private final Block field_77838_b; -@@ -24,8 +24,8 @@ +@@ -26,8 +26,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_) { ItemStack itemstack = p_180614_1_.func_184586_b(p_180614_4_); @@ -19,8 +19,8 @@ + 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_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 @@ + +@@ -44,4 +44,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 dd9d598a3..20a1ff8b4 100644 --- a/patches/minecraft/net/minecraft/item/ItemShears.java.patch +++ b/patches/minecraft/net/minecraft/item/ItemShears.java.patch @@ -8,11 +8,10 @@ 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; } -@@ -40,4 +41,73 @@ - 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; +@@ -35,6 +36,75 @@ + return block == Blocks.field_150321_G || block == Blocks.field_150488_af || block == Blocks.field_150473_bD; } -+ + + + @Override + public boolean func_111207_a(ItemStack itemstack, net.minecraft.entity.player.EntityPlayer player, EntityLivingBase entity, net.minecraft.util.EnumHand hand) @@ -81,4 +80,7 @@ + } + return false; + } - } ++ + public float func_150893_a(ItemStack p_150893_1_, IBlockState p_150893_2_) + { + Block block = p_150893_2_.func_177230_c(); diff --git a/patches/minecraft/net/minecraft/item/ItemSkull.java.patch b/patches/minecraft/net/minecraft/item/ItemSkull.java.patch index cabea4855..692fd4d45 100644 --- a/patches/minecraft/net/minecraft/item/ItemSkull.java.patch +++ b/patches/minecraft/net/minecraft/item/ItemSkull.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/item/ItemSkull.java +++ ../src-work/minecraft/net/minecraft/item/ItemSkull.java -@@ -43,13 +43,18 @@ +@@ -45,13 +45,18 @@ } else { diff --git a/patches/minecraft/net/minecraft/item/ItemSlab.java.patch b/patches/minecraft/net/minecraft/item/ItemSlab.java.patch index da817c640..483b99ef5 100644 --- a/patches/minecraft/net/minecraft/item/ItemSlab.java.patch +++ b/patches/minecraft/net/minecraft/item/ItemSlab.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/item/ItemSlab.java +++ ../src-work/minecraft/net/minecraft/item/ItemSlab.java -@@ -62,7 +62,7 @@ +@@ -64,7 +64,7 @@ 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)) { @@ -8,8 +8,8 @@ + 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); - } -@@ -117,7 +117,7 @@ + +@@ -124,7 +124,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)) { diff --git a/patches/minecraft/net/minecraft/item/ItemSnow.java.patch b/patches/minecraft/net/minecraft/item/ItemSnow.java.patch index 9a591f322..1cd3c65cb 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 -@@ -49,7 +49,7 @@ +@@ -51,7 +51,7 @@ 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_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; -@@ -69,4 +69,10 @@ + + if (p_180614_1_ instanceof EntityPlayerMP) +@@ -77,4 +77,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 02576c32a..34fea415b 100644 --- a/patches/minecraft/net/minecraft/item/ItemStack.java.patch +++ b/patches/minecraft/net/minecraft/item/ItemStack.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/item/ItemStack.java +++ ../src-work/minecraft/net/minecraft/item/ItemStack.java -@@ -47,7 +47,7 @@ +@@ -50,7 +50,7 @@ import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -9,7 +9,7 @@ { public static final ItemStack field_190927_a = new ItemStack((Item)null); public static final DecimalFormat field_111284_a = new DecimalFormat("#.##"); -@@ -63,6 +63,10 @@ +@@ -66,6 +66,10 @@ private Block field_179550_j; private boolean field_179551_k; @@ -19,9 +19,9 @@ + public ItemStack(Block p_i1876_1_) { - this((Block)p_i1876_1_, 1); -@@ -88,8 +92,10 @@ - this((Item)p_i1880_1_, p_i1880_2_, 0); + this(p_i1876_1_, 1); +@@ -91,8 +95,10 @@ + this(p_i1880_1_, p_i1880_2_, 0); } - public ItemStack(Item p_i1881_1_, int p_i1881_2_, int p_i1881_3_) @@ -32,7 +32,7 @@ this.field_151002_e = p_i1881_1_; this.field_77991_e = p_i1881_3_; this.field_77994_a = p_i1881_2_; -@@ -100,6 +106,7 @@ +@@ -103,6 +109,7 @@ } this.func_190923_F(); @@ -40,7 +40,7 @@ } private void func_190923_F() -@@ -109,7 +116,8 @@ +@@ -112,7 +119,8 @@ public ItemStack(NBTTagCompound p_i47263_1_) { @@ -50,7 +50,7 @@ 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")); -@@ -124,11 +132,12 @@ +@@ -127,6 +135,7 @@ } this.func_190923_F(); @@ -58,13 +58,16 @@ } public boolean func_190926_b() - { -- return this == field_190927_a ? true : (this.field_151002_e != null && this.field_151002_e != Item.func_150898_a(Blocks.field_150350_a) ? (this.field_77994_a <= 0 ? true : this.field_77991_e < -32768 || this.field_77991_e > 65535) : true); -+ return this == field_190927_a ? true : (getItemRaw() != null && getItemRaw() != Item.func_150898_a(Blocks.field_150350_a) ? (this.field_77994_a <= 0 ? true : this.field_77991_e < -32768 || this.field_77991_e > 65535) : true); - } - - public static void func_189868_a(DataFixer p_189868_0_) -@@ -148,11 +157,12 @@ +@@ -135,7 +144,7 @@ + { + return true; + } +- else if (this.field_151002_e != null && this.field_151002_e != Item.func_150898_a(Blocks.field_150350_a)) ++ else if (this.getItemRaw() != null && this.getItemRaw() != Item.func_150898_a(Blocks.field_150350_a)) + { + if (this.field_77994_a <= 0) + { +@@ -169,11 +178,12 @@ public Item func_77973_b() { @@ -78,7 +81,7 @@ 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) -@@ -163,6 +173,19 @@ +@@ -184,6 +194,19 @@ return enumactionresult; } @@ -98,7 +101,7 @@ public float func_150997_a(IBlockState p_150997_1_) { return this.func_77973_b().func_150893_a(this, p_150997_1_); -@@ -190,12 +213,18 @@ +@@ -211,12 +234,18 @@ p_77955_1_.func_74782_a("tag", this.field_77990_d); } @@ -118,16 +121,16 @@ } public boolean func_77985_e() -@@ -205,7 +234,7 @@ - - public boolean func_77984_f() - { -- 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() -@@ -215,32 +244,27 @@ +@@ -230,7 +259,7 @@ + { + return false; + } +- else if (this.field_151002_e.func_77612_l() <= 0) ++ else if (this.field_151002_e.getMaxDamage(this) <= 0) + { + return false; + } +@@ -247,32 +276,27 @@ public boolean func_77951_h() { @@ -164,9 +167,9 @@ + return this.func_77973_b().getMaxDamage(this); } - public boolean func_96631_a(int p_96631_1_, Random p_96631_2_) -@@ -272,8 +296,8 @@ - } + public boolean func_96631_a(int p_96631_1_, Random p_96631_2_, @Nullable EntityPlayerMP p_96631_3_) +@@ -309,8 +333,8 @@ + CriteriaTriggers.field_193132_s.func_193158_a(p_96631_3_, this, this.field_77991_e + p_96631_1_); } - this.field_77991_e += p_96631_1_; @@ -176,7 +179,7 @@ } } -@@ -322,7 +346,7 @@ +@@ -359,7 +383,7 @@ public boolean func_150998_b(IBlockState p_150998_1_) { @@ -185,34 +188,34 @@ } public boolean func_111282_a(EntityPlayer p_111282_1_, EntityLivingBase p_111282_2_, EnumHand p_111282_3_) -@@ -332,7 +356,7 @@ +@@ -369,7 +393,7 @@ public ItemStack func_77946_l() { - ItemStack itemstack = new ItemStack(this.field_151002_e, this.field_77994_a, this.field_77991_e); + ItemStack itemstack = new ItemStack(this.field_151002_e, this.field_77994_a, this.field_77991_e, this.capabilities != null ? this.capabilities.serializeNBT() : null); + itemstack.func_190915_d(this.func_190921_D()); if (this.field_77990_d != null) +@@ -394,7 +418,7 @@ + } + else + { +- return p_77970_0_.field_77990_d == null || p_77970_0_.field_77990_d.equals(p_77970_1_.field_77990_d); ++ return (p_77970_0_.field_77990_d == null || p_77970_0_.field_77990_d.equals(p_77970_1_.field_77990_d)) && p_77970_0_.areCapsCompatible(p_77970_1_); + } + } + else +@@ -435,7 +459,7 @@ + } + else { -@@ -344,7 +368,7 @@ - - public static boolean func_77970_a(ItemStack p_77970_0_, ItemStack p_77970_1_) - { -- return p_77970_0_.func_190926_b() && p_77970_1_.func_190926_b() ? true : (!p_77970_0_.func_190926_b() && !p_77970_1_.func_190926_b() ? (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); -+ return p_77970_0_.func_190926_b() && p_77970_1_.func_190926_b() ? true : (!p_77970_0_.func_190926_b() && !p_77970_1_.func_190926_b() ? (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)) && p_77970_0_.areCapsCompatible(p_77970_1_)) : false); +- return this.field_77990_d == null || this.field_77990_d.equals(p_77959_1_.field_77990_d); ++ return (this.field_77990_d == null || this.field_77990_d.equals(p_77959_1_.field_77990_d)) && this.areCapsCompatible(p_77959_1_); + } } - public static boolean func_77989_b(ItemStack p_77989_0_, ItemStack p_77989_1_) -@@ -354,7 +378,7 @@ - - private boolean func_77959_d(ItemStack p_77959_1_) - { -- return this.field_77994_a != p_77959_1_.field_77994_a ? false : (this.func_77973_b() != p_77959_1_.func_77973_b() ? 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)))); -+ return this.field_77994_a != p_77959_1_.field_77994_a ? false : (this.func_77973_b() != p_77959_1_.func_77973_b() ? 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)) && this.areCapsCompatible(p_77959_1_)))); - } - - public static boolean func_179545_c(ItemStack p_179545_0_, ItemStack p_179545_1_) -@@ -758,6 +782,7 @@ +@@ -862,6 +886,7 @@ } } @@ -220,7 +223,7 @@ return list; } -@@ -869,7 +894,7 @@ +@@ -987,7 +1012,7 @@ } else { @@ -229,10 +232,11 @@ } return multimap; -@@ -982,6 +1007,53 @@ - } +@@ -1130,4 +1155,113 @@ + { + this.func_190917_f(-p_190918_1_); } - ++ + @Override + public boolean hasCapability(net.minecraftforge.common.capabilities.Capability capability, @Nullable net.minecraft.util.EnumFacing facing) + { @@ -279,14 +283,6 @@ + return this.capabilities.areCompatible(other.capabilities); + } + } -+ - @SideOnly(Side.CLIENT) - public int func_190921_D() - { -@@ -1013,4 +1085,66 @@ - { - this.func_190917_f(-p_190918_1_); - } + + /** + * Set up forge's ItemStack additions. diff --git a/patches/minecraft/net/minecraft/item/ItemTool.java.patch b/patches/minecraft/net/minecraft/item/ItemTool.java.patch index 385fc42b4..1cc6b23a8 100644 --- a/patches/minecraft/net/minecraft/item/ItemTool.java.patch +++ b/patches/minecraft/net/minecraft/item/ItemTool.java.patch @@ -31,7 +31,7 @@ return this.field_150914_c.contains(p_150893_2_.func_177230_c()) ? this.field_77864_a : 1.0F; } -@@ -84,7 +101,9 @@ +@@ -79,7 +96,9 @@ public boolean func_82789_a(ItemStack p_82789_1_, ItemStack p_82789_2_) { @@ -42,7 +42,7 @@ } public Multimap func_111205_h(EntityEquipmentSlot p_111205_1_) -@@ -99,4 +118,28 @@ +@@ -94,4 +113,28 @@ return multimap; } diff --git a/patches/minecraft/net/minecraft/item/crafting/FurnaceRecipes.java.patch b/patches/minecraft/net/minecraft/item/crafting/FurnaceRecipes.java.patch index c3512830e..443afb62c 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 -@@ -97,6 +97,7 @@ +@@ -113,6 +113,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_)); } -@@ -126,6 +127,9 @@ +@@ -142,6 +143,9 @@ public float func_151398_b(ItemStack p_151398_1_) { @@ -17,4 +17,4 @@ + for (Entry entry : this.field_77605_c.entrySet()) { - if (this.func_151397_a(p_151398_1_, (ItemStack)entry.getKey())) + if (this.func_151397_a(p_151398_1_, entry.getKey())) diff --git a/patches/minecraft/net/minecraft/item/crafting/IRecipe.java.patch b/patches/minecraft/net/minecraft/item/crafting/IRecipe.java.patch new file mode 100644 index 000000000..960db18ff --- /dev/null +++ b/patches/minecraft/net/minecraft/item/crafting/IRecipe.java.patch @@ -0,0 +1,41 @@ +--- ../src-base/minecraft/net/minecraft/item/crafting/IRecipe.java ++++ ../src-work/minecraft/net/minecraft/item/crafting/IRecipe.java +@@ -4,8 +4,6 @@ + import net.minecraft.item.ItemStack; + import net.minecraft.util.NonNullList; + import net.minecraft.world.World; +-import net.minecraftforge.fml.relauncher.Side; +-import net.minecraftforge.fml.relauncher.SideOnly; + + public interface IRecipe + { +@@ -13,26 +11,23 @@ + + ItemStack func_77572_b(InventoryCrafting p_77572_1_); + +- @SideOnly(Side.CLIENT) + boolean func_194133_a(int p_194133_1_, int p_194133_2_); + + ItemStack func_77571_b(); + + NonNullList func_179532_b(InventoryCrafting p_179532_1_); + +- @SideOnly(Side.CLIENT) +-default NonNullList func_192400_c() ++ default NonNullList func_192400_c() + { + return NonNullList.func_191196_a(); + } + +-default boolean func_192399_d() ++ default boolean func_192399_d() + { + return false; + } + +- @SideOnly(Side.CLIENT) +-default String func_193358_e() ++ default String func_193358_e() + { + return ""; + } diff --git a/patches/minecraft/net/minecraft/item/crafting/Ingredient.java.patch b/patches/minecraft/net/minecraft/item/crafting/Ingredient.java.patch new file mode 100644 index 000000000..35dc51897 --- /dev/null +++ b/patches/minecraft/net/minecraft/item/crafting/Ingredient.java.patch @@ -0,0 +1,50 @@ +--- ../src-base/minecraft/net/minecraft/item/crafting/Ingredient.java ++++ ../src-work/minecraft/net/minecraft/item/crafting/Ingredient.java +@@ -13,6 +13,8 @@ + + public class Ingredient implements Predicate + { ++ //Because Mojang caches things... we need to invalidate them.. so... here we go.. ++ private static final java.util.Set INSTANCES = java.util.Collections.newSetFromMap(new java.util.WeakHashMap()); + public static final Ingredient field_193370_a = new Ingredient(new ItemStack[0]) + { + public boolean apply(@Nullable ItemStack p_apply_1_) +@@ -21,15 +23,19 @@ + } + }; + private final ItemStack[] field_193371_b; +- @SideOnly(Side.CLIENT) + private IntList field_194140_c; + ++ protected Ingredient(int size) ++ { ++ this(new ItemStack[size]); ++ } ++ + private Ingredient(ItemStack... p_i47503_1_) + { + this.field_193371_b = p_i47503_1_; ++ Ingredient.INSTANCES.add(this); + } + +- @SideOnly(Side.CLIENT) + public ItemStack[] func_193365_a() + { + return this.field_193371_b; +@@ -110,4 +116,16 @@ + + return this.field_194140_c; + } ++ ++ public static void invalidateAll() ++ { ++ for (Ingredient ing : INSTANCES) ++ if (ing != null) ++ ing.invalidate(); ++ } ++ ++ protected void invalidate() ++ { ++ this.field_194140_c = null; ++ } + } diff --git a/patches/minecraft/net/minecraft/item/crafting/RecipeBookCloning.java.patch b/patches/minecraft/net/minecraft/item/crafting/RecipeBookCloning.java.patch new file mode 100644 index 000000000..27a76532e --- /dev/null +++ b/patches/minecraft/net/minecraft/item/crafting/RecipeBookCloning.java.patch @@ -0,0 +1,10 @@ +--- ../src-base/minecraft/net/minecraft/item/crafting/RecipeBookCloning.java ++++ ../src-work/minecraft/net/minecraft/item/crafting/RecipeBookCloning.java +@@ -127,7 +127,6 @@ + return true; + } + +- @SideOnly(Side.CLIENT) + public boolean func_194133_a(int p_194133_1_, int p_194133_2_) + { + return p_194133_1_ >= 3 && p_194133_2_ >= 3; diff --git a/patches/minecraft/net/minecraft/item/crafting/RecipeFireworks.java.patch b/patches/minecraft/net/minecraft/item/crafting/RecipeFireworks.java.patch index 0b081969f..0631bd684 100644 --- a/patches/minecraft/net/minecraft/item/crafting/RecipeFireworks.java.patch +++ b/patches/minecraft/net/minecraft/item/crafting/RecipeFireworks.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/item/crafting/RecipeFireworks.java +++ ../src-work/minecraft/net/minecraft/item/crafting/RecipeFireworks.java -@@ -251,10 +251,7 @@ +@@ -248,10 +248,7 @@ { ItemStack itemstack = p_179532_1_.func_70301_a(i); @@ -12,3 +12,11 @@ } return nonnulllist; +@@ -262,7 +259,6 @@ + return true; + } + +- @SideOnly(Side.CLIENT) + public boolean func_194133_a(int p_194133_1_, int p_194133_2_) + { + return p_194133_1_ * p_194133_2_ >= 1; diff --git a/patches/minecraft/net/minecraft/item/crafting/RecipeRepairItem.java.patch b/patches/minecraft/net/minecraft/item/crafting/RecipeRepairItem.java.patch index 6c650acf2..d79d74d8e 100644 --- a/patches/minecraft/net/minecraft/item/crafting/RecipeRepairItem.java.patch +++ b/patches/minecraft/net/minecraft/item/crafting/RecipeRepairItem.java.patch @@ -1,26 +1,26 @@ --- ../src-base/minecraft/net/minecraft/item/crafting/RecipeRepairItem.java +++ ../src-work/minecraft/net/minecraft/item/crafting/RecipeRepairItem.java -@@ -26,7 +26,7 @@ +@@ -28,7 +28,7 @@ { - ItemStack itemstack1 = (ItemStack)list.get(0); + ItemStack itemstack1 = list.get(0); - 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; } -@@ -53,7 +53,7 @@ +@@ -55,7 +55,7 @@ { - ItemStack itemstack1 = (ItemStack)list.get(0); + ItemStack itemstack1 = list.get(0); - 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 ItemStack.field_190927_a; } -@@ -66,13 +66,13 @@ - ItemStack itemstack2 = (ItemStack)list.get(0); - ItemStack itemstack3 = (ItemStack)list.get(1); +@@ -68,13 +68,13 @@ + ItemStack itemstack2 = list.get(0); + ItemStack itemstack3 = list.get(1); - 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()) @@ -38,7 +38,7 @@ if (i1 < 0) { -@@ -103,11 +103,7 @@ +@@ -100,11 +100,7 @@ for (int i = 0; i < nonnulllist.size(); ++i) { ItemStack itemstack = p_179532_1_.func_70301_a(i); @@ -51,3 +51,11 @@ } return nonnulllist; +@@ -115,7 +111,6 @@ + return true; + } + +- @SideOnly(Side.CLIENT) + public boolean func_194133_a(int p_194133_1_, int p_194133_2_) + { + return p_194133_1_ * p_194133_2_ >= 2; diff --git a/patches/minecraft/net/minecraft/item/crafting/RecipeTippedArrow.java.patch b/patches/minecraft/net/minecraft/item/crafting/RecipeTippedArrow.java.patch new file mode 100644 index 000000000..1862be061 --- /dev/null +++ b/patches/minecraft/net/minecraft/item/crafting/RecipeTippedArrow.java.patch @@ -0,0 +1,10 @@ +--- ../src-base/minecraft/net/minecraft/item/crafting/RecipeTippedArrow.java ++++ ../src-work/minecraft/net/minecraft/item/crafting/RecipeTippedArrow.java +@@ -83,7 +83,6 @@ + return true; + } + +- @SideOnly(Side.CLIENT) + public boolean func_194133_a(int p_194133_1_, int p_194133_2_) + { + return p_194133_1_ >= 2 && p_194133_2_ >= 2; diff --git a/patches/minecraft/net/minecraft/item/crafting/RecipesArmorDyes.java.patch b/patches/minecraft/net/minecraft/item/crafting/RecipesArmorDyes.java.patch index 44f27a779..a7880f5ab 100644 --- a/patches/minecraft/net/minecraft/item/crafting/RecipesArmorDyes.java.patch +++ b/patches/minecraft/net/minecraft/item/crafting/RecipesArmorDyes.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/item/crafting/RecipesArmorDyes.java +++ ../src-work/minecraft/net/minecraft/item/crafting/RecipesArmorDyes.java -@@ -147,11 +147,7 @@ +@@ -143,11 +143,7 @@ for (int i = 0; i < nonnulllist.size(); ++i) { ItemStack itemstack = p_179532_1_.func_70301_a(i); @@ -13,3 +13,11 @@ } return nonnulllist; +@@ -158,7 +154,6 @@ + return true; + } + +- @SideOnly(Side.CLIENT) + public boolean func_194133_a(int p_194133_1_, int p_194133_2_) + { + return p_194133_1_ * p_194133_2_ >= 2; diff --git a/patches/minecraft/net/minecraft/item/crafting/RecipesBanners.java.patch b/patches/minecraft/net/minecraft/item/crafting/RecipesBanners.java.patch index 530615f56..69db92f59 100644 --- a/patches/minecraft/net/minecraft/item/crafting/RecipesBanners.java.patch +++ b/patches/minecraft/net/minecraft/item/crafting/RecipesBanners.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/item/crafting/RecipesBanners.java +++ ../src-work/minecraft/net/minecraft/item/crafting/RecipesBanners.java -@@ -93,9 +93,10 @@ +@@ -79,9 +79,10 @@ { ItemStack itemstack2 = p_77572_1_.func_70301_a(j); @@ -13,7 +13,7 @@ break; } } -@@ -139,11 +140,7 @@ +@@ -120,11 +121,7 @@ for (int i = 0; i < nonnulllist.size(); ++i) { ItemStack itemstack = p_179532_1_.func_70301_a(i); @@ -26,7 +26,7 @@ } return nonnulllist; -@@ -169,7 +166,7 @@ +@@ -150,7 +147,7 @@ if (!itemstack.func_190926_b() && itemstack.func_77973_b() != Items.field_179564_cE) { @@ -35,7 +35,7 @@ { if (flag2) { -@@ -209,7 +206,7 @@ +@@ -190,7 +187,7 @@ if (!itemstack1.func_190926_b() && itemstack1.func_77973_b() != Items.field_179564_cE) { @@ -44,9 +44,14 @@ { flag = false; break; -@@ -250,6 +247,38 @@ +@@ -237,11 +234,42 @@ + return true; + } - return null; +- @SideOnly(Side.CLIENT) + public boolean func_194133_a(int p_194133_1_, int p_194133_2_) + { + return p_194133_1_ >= 3 && p_194133_2_ >= 3; } + + private static String[] colors = { "Black", "Red", "Green", "Brown", "Blue", "Purple", "Cyan", "LightGray", "Gray", "Pink", "Lime", "Yellow", "LightBlue", "Magenta", "Orange", "White" }; @@ -83,7 +88,7 @@ } public static class RecipeDuplicatePattern implements IRecipe -@@ -361,9 +390,9 @@ +@@ -344,9 +372,9 @@ if (!itemstack.func_190926_b()) { @@ -95,3 +100,11 @@ } else if (itemstack.func_77942_o() && TileEntityBanner.func_175113_c(itemstack) > 0) { +@@ -365,7 +393,6 @@ + return true; + } + +- @SideOnly(Side.CLIENT) + public boolean func_194133_a(int p_194133_1_, int p_194133_2_) + { + return p_194133_1_ * p_194133_2_ >= 2; diff --git a/patches/minecraft/net/minecraft/item/crafting/RecipesIngots.java.patch b/patches/minecraft/net/minecraft/item/crafting/RecipesIngots.java.patch deleted file mode 100644 index 4695cbac4..000000000 --- a/patches/minecraft/net/minecraft/item/crafting/RecipesIngots.java.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- ../src-base/minecraft/net/minecraft/item/crafting/RecipesIngots.java -+++ ../src-work/minecraft/net/minecraft/item/crafting/RecipesIngots.java -@@ -16,7 +16,9 @@ - { - Block block = (Block)aobject[0]; - ItemStack itemstack = (ItemStack)aobject[1]; -- p_77590_1_.func_92103_a(new ItemStack(block), new Object[] {"###", "###", "###", '#', itemstack}); -+ ItemStack itemstackIngredient = itemstack.func_77946_l(); // forge: MC-103403 ensure ingredient stack size is 1 and not 9. -+ itemstackIngredient.func_190920_e(1); -+ p_77590_1_.func_92103_a(new ItemStack(block), new Object[] {"###", "###", "###", '#', itemstackIngredient}); - p_77590_1_.func_92103_a(itemstack, new Object[] {"#", '#', block}); - } - diff --git a/patches/minecraft/net/minecraft/item/crafting/RecipesMapCloning.java.patch b/patches/minecraft/net/minecraft/item/crafting/RecipesMapCloning.java.patch index 073a6581f..284e45bcc 100644 --- a/patches/minecraft/net/minecraft/item/crafting/RecipesMapCloning.java.patch +++ b/patches/minecraft/net/minecraft/item/crafting/RecipesMapCloning.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/item/crafting/RecipesMapCloning.java +++ ../src-work/minecraft/net/minecraft/item/crafting/RecipesMapCloning.java -@@ -114,11 +114,7 @@ +@@ -111,11 +111,7 @@ for (int i = 0; i < nonnulllist.size(); ++i) { ItemStack itemstack = p_179532_1_.func_70301_a(i); @@ -13,3 +13,11 @@ } return nonnulllist; +@@ -126,7 +122,6 @@ + return true; + } + +- @SideOnly(Side.CLIENT) + public boolean func_194133_a(int p_194133_1_, int p_194133_2_) + { + return p_194133_1_ >= 3 && p_194133_2_ >= 3; diff --git a/patches/minecraft/net/minecraft/item/crafting/ShapedRecipes.java.patch b/patches/minecraft/net/minecraft/item/crafting/ShapedRecipes.java.patch index 3f4ccc054..c6602cecd 100644 --- a/patches/minecraft/net/minecraft/item/crafting/ShapedRecipes.java.patch +++ b/patches/minecraft/net/minecraft/item/crafting/ShapedRecipes.java.patch @@ -1,6 +1,14 @@ --- ../src-base/minecraft/net/minecraft/item/crafting/ShapedRecipes.java +++ ../src-work/minecraft/net/minecraft/item/crafting/ShapedRecipes.java -@@ -42,11 +42,7 @@ +@@ -39,7 +39,6 @@ + this.field_77575_e = p_i47501_5_; + } + +- @SideOnly(Side.CLIENT) + public String func_193358_e() + { + return this.field_194137_e; +@@ -57,23 +56,17 @@ for (int i = 0; i < nonnulllist.size(); ++i) { ItemStack itemstack = p_179532_1_.func_70301_a(i); @@ -13,3 +21,15 @@ } return nonnulllist; + } + +- @SideOnly(Side.CLIENT) + public NonNullList func_192400_c() + { + return this.field_77574_d; + } + +- @SideOnly(Side.CLIENT) + public boolean func_194133_a(int p_194133_1_, int p_194133_2_) + { + return p_194133_1_ >= this.field_77576_b && p_194133_2_ >= this.field_77577_c; diff --git a/patches/minecraft/net/minecraft/item/crafting/ShapelessRecipes.java.patch b/patches/minecraft/net/minecraft/item/crafting/ShapelessRecipes.java.patch index 6429c0664..ea9163436 100644 --- a/patches/minecraft/net/minecraft/item/crafting/ShapelessRecipes.java.patch +++ b/patches/minecraft/net/minecraft/item/crafting/ShapelessRecipes.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/item/crafting/ShapelessRecipes.java +++ ../src-work/minecraft/net/minecraft/item/crafting/ShapelessRecipes.java -@@ -30,11 +30,7 @@ +@@ -44,17 +44,12 @@ for (int i = 0; i < nonnulllist.size(); ++i) { ItemStack itemstack = p_179532_1_.func_70301_a(i); @@ -13,3 +13,17 @@ } return nonnulllist; + } + +- @SideOnly(Side.CLIENT) + public NonNullList func_192400_c() + { + return this.field_77579_b; +@@ -137,7 +132,6 @@ + return nonnulllist; + } + +- @SideOnly(Side.CLIENT) + public boolean func_194133_a(int p_194133_1_, int p_194133_2_) + { + return p_194133_1_ * p_194133_2_ >= this.field_77579_b.size(); diff --git a/patches/minecraft/net/minecraft/item/crafting/ShieldRecipes.java.patch b/patches/minecraft/net/minecraft/item/crafting/ShieldRecipes.java.patch new file mode 100644 index 000000000..6ef465cee --- /dev/null +++ b/patches/minecraft/net/minecraft/item/crafting/ShieldRecipes.java.patch @@ -0,0 +1,10 @@ +--- ../src-base/minecraft/net/minecraft/item/crafting/ShieldRecipes.java ++++ ../src-work/minecraft/net/minecraft/item/crafting/ShieldRecipes.java +@@ -128,7 +128,6 @@ + return true; + } + +- @SideOnly(Side.CLIENT) + public boolean func_194133_a(int p_194133_1_, int p_194133_2_) + { + return p_194133_1_ * p_194133_2_ >= 2; diff --git a/patches/minecraft/net/minecraft/item/crafting/ShulkerBoxRecipes.java.patch b/patches/minecraft/net/minecraft/item/crafting/ShulkerBoxRecipes.java.patch new file mode 100644 index 000000000..e912b5a50 --- /dev/null +++ b/patches/minecraft/net/minecraft/item/crafting/ShulkerBoxRecipes.java.patch @@ -0,0 +1,10 @@ +--- ../src-base/minecraft/net/minecraft/item/crafting/ShulkerBoxRecipes.java ++++ ../src-work/minecraft/net/minecraft/item/crafting/ShulkerBoxRecipes.java +@@ -109,7 +109,6 @@ + return true; + } + +- @SideOnly(Side.CLIENT) + public boolean func_194133_a(int p_194133_1_, int p_194133_2_) + { + return p_194133_1_ * p_194133_2_ >= 2; diff --git a/patches/minecraft/net/minecraft/nbt/CompressedStreamTools.java.patch b/patches/minecraft/net/minecraft/nbt/CompressedStreamTools.java.patch index 400efd0fd..32f6bffe3 100644 --- a/patches/minecraft/net/minecraft/nbt/CompressedStreamTools.java.patch +++ b/patches/minecraft/net/minecraft/nbt/CompressedStreamTools.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/nbt/CompressedStreamTools.java +++ ../src-work/minecraft/net/minecraft/nbt/CompressedStreamTools.java -@@ -17,8 +17,6 @@ +@@ -18,8 +18,6 @@ import net.minecraft.crash.CrashReport; import net.minecraft.crash.CrashReportCategory; import net.minecraft.util.ReportedException; @@ -9,7 +9,7 @@ public class CompressedStreamTools { -@@ -53,7 +51,6 @@ +@@ -54,7 +52,6 @@ } } @@ -17,7 +17,7 @@ public static void func_74793_a(NBTTagCompound p_74793_0_, File p_74793_1_) throws IOException { File file1 = new File(p_74793_1_.getAbsolutePath() + "_tmp"); -@@ -118,6 +115,7 @@ +@@ -119,6 +116,7 @@ private static NBTBase func_152455_a(DataInput p_152455_0_, int p_152455_1_, NBTSizeTracker p_152455_2_) throws IOException { byte b0 = p_152455_0_.readByte(); @@ -25,7 +25,7 @@ if (b0 == 0) { -@@ -125,7 +123,8 @@ +@@ -126,7 +124,8 @@ } else { @@ -43,10 +43,10 @@ public static void func_74795_b(NBTTagCompound p_74795_0_, File p_74795_1_) throws IOException { DataOutputStream dataoutputstream = new DataOutputStream(new FileOutputStream(p_74795_1_)); -@@ -159,7 +157,6 @@ - } +@@ -160,7 +158,6 @@ } + @Nullable - @SideOnly(Side.CLIENT) public static NBTTagCompound func_74797_a(File p_74797_0_) throws IOException { diff --git a/patches/minecraft/net/minecraft/nbt/NBTTagCompound.java.patch b/patches/minecraft/net/minecraft/nbt/NBTTagCompound.java.patch index 305fa1dbe..07296de5a 100644 --- a/patches/minecraft/net/minecraft/nbt/NBTTagCompound.java.patch +++ b/patches/minecraft/net/minecraft/nbt/NBTTagCompound.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/nbt/NBTTagCompound.java +++ ../src-work/minecraft/net/minecraft/nbt/NBTTagCompound.java -@@ -470,6 +470,7 @@ +@@ -477,6 +477,7 @@ private static byte func_152447_a(DataInput p_152447_0_, NBTSizeTracker p_152447_1_) throws IOException { @@ -8,7 +8,7 @@ return p_152447_0_.readByte(); } -@@ -480,6 +481,7 @@ +@@ -487,6 +488,7 @@ static NBTBase func_152449_a(byte p_152449_0_, String p_152449_1_, DataInput p_152449_2_, int p_152449_3_, NBTSizeTracker p_152449_4_) throws IOException { diff --git a/patches/minecraft/net/minecraft/nbt/NBTTagList.java.patch b/patches/minecraft/net/minecraft/nbt/NBTTagList.java.patch index 472d63ba8..0fe0f23dc 100644 --- a/patches/minecraft/net/minecraft/nbt/NBTTagList.java.patch +++ b/patches/minecraft/net/minecraft/nbt/NBTTagList.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/nbt/NBTTagList.java +++ ../src-work/minecraft/net/minecraft/nbt/NBTTagList.java -@@ -8,7 +8,7 @@ +@@ -9,7 +9,7 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -9,7 +9,7 @@ { private static final Logger field_179239_b = LogManager.getLogger(); private List field_74747_a = Lists.newArrayList(); -@@ -282,4 +282,5 @@ +@@ -281,4 +281,5 @@ { return this.field_74746_b; } diff --git a/patches/minecraft/net/minecraft/nbt/NBTTagString.java.patch b/patches/minecraft/net/minecraft/nbt/NBTTagString.java.patch index 663efa2b7..3820c8686 100644 --- a/patches/minecraft/net/minecraft/nbt/NBTTagString.java.patch +++ b/patches/minecraft/net/minecraft/nbt/NBTTagString.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/nbt/NBTTagString.java +++ ../src-work/minecraft/net/minecraft/nbt/NBTTagString.java -@@ -32,7 +32,7 @@ +@@ -29,7 +29,7 @@ { p_152446_3_.func_152450_a(288L); this.field_74751_a = p_152446_1_.readUTF(); @@ -9,13 +9,3 @@ } public byte func_74732_a() -@@ -42,7 +42,8 @@ - - public String toString() - { -- return "\"" + this.field_74751_a.replace("\"", "\\\"") + "\""; -+ // Forge: BugFix: Vanilla does a normal " -> \" conversion but doesn't escape \ -+ return "\"" + org.apache.commons.lang3.StringUtils.replaceEach(this.field_74751_a, new String[]{"\\","\""}, new String[]{"\\\\","\\\""}) + "\""; - } - - public NBTTagString func_74737_b() diff --git a/patches/minecraft/net/minecraft/network/NetHandlerPlayServer.java.patch b/patches/minecraft/net/minecraft/network/NetHandlerPlayServer.java.patch index a26c099f0..0ed9546f8 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 -@@ -617,7 +617,10 @@ +@@ -661,7 +661,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; } -@@ -675,7 +678,9 @@ +@@ -719,7 +722,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,7 +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()); } -@@ -879,7 +884,9 @@ +@@ -923,7 +928,9 @@ } else { @@ -34,7 +34,7 @@ this.field_147367_d.func_184103_al().func_148544_a(itextcomponent, false); } -@@ -1012,6 +1019,7 @@ +@@ -1056,6 +1063,7 @@ else if (p_147340_1_.func_149565_c() == CPacketUseEntity.Action.INTERACT_AT) { EnumHand enumhand1 = p_147340_1_.func_186994_b(); @@ -42,7 +42,7 @@ 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) -@@ -1051,7 +1059,7 @@ +@@ -1096,7 +1104,7 @@ return; } @@ -51,7 +51,7 @@ if (this.field_147367_d.func_71199_h()) { -@@ -1097,7 +1105,7 @@ +@@ -1139,7 +1147,7 @@ { ItemStack itemstack2 = this.field_147369_b.field_71070_bA.func_184996_a(p_147351_1_.func_149544_d(), p_147351_1_.func_149543_e(), p_147351_1_.func_186993_f(), this.field_147369_b); diff --git a/patches/minecraft/net/minecraft/network/NetworkManager.java.patch b/patches/minecraft/net/minecraft/network/NetworkManager.java.patch index 28063a3f7..08546e0b7 100644 --- a/patches/minecraft/net/minecraft/network/NetworkManager.java.patch +++ b/patches/minecraft/net/minecraft/network/NetworkManager.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/network/NetworkManager.java +++ ../src-work/minecraft/net/minecraft/network/NetworkManager.java -@@ -90,6 +90,11 @@ +@@ -88,6 +88,11 @@ this.field_179294_g = p_i46004_1_; } @@ -12,7 +12,7 @@ public void channelActive(ChannelHandlerContext p_channelActive_1_) throws Exception { super.channelActive(p_channelActive_1_); -@@ -206,7 +211,7 @@ +@@ -204,7 +209,7 @@ final EnumConnectionState enumconnectionstate = EnumConnectionState.func_150752_a(p_150732_1_); final EnumConnectionState enumconnectionstate1 = (EnumConnectionState)this.field_150746_k.attr(field_150739_c).get(); @@ -21,7 +21,7 @@ { field_150735_g.debug("Disabled auto read"); this.field_150746_k.config().setAutoRead(false); -@@ -214,7 +219,7 @@ +@@ -212,7 +217,7 @@ if (this.field_150746_k.eventLoop().inEventLoop()) { @@ -30,7 +30,7 @@ { this.func_150723_a(enumconnectionstate); } -@@ -234,7 +239,7 @@ +@@ -232,7 +237,7 @@ { public void run() { @@ -39,7 +39,7 @@ { NetworkManager.this.func_150723_a(enumconnectionstate); } -@@ -453,6 +458,11 @@ +@@ -454,6 +459,11 @@ } } diff --git a/patches/minecraft/net/minecraft/network/NetworkSystem.java.patch b/patches/minecraft/net/minecraft/network/NetworkSystem.java.patch index cf3967d0b..9bb9d90c1 100644 --- a/patches/minecraft/net/minecraft/network/NetworkSystem.java.patch +++ b/patches/minecraft/net/minecraft/network/NetworkSystem.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/network/NetworkSystem.java +++ ../src-work/minecraft/net/minecraft/network/NetworkSystem.java -@@ -50,21 +50,21 @@ +@@ -49,21 +49,21 @@ { protected NioEventLoopGroup func_179280_b() { @@ -25,12 +25,12 @@ } }; private final MinecraftServer field_151273_d; -@@ -111,7 +111,7 @@ +@@ -110,7 +110,7 @@ ; } -- p_initChannel_1_.pipeline().addLast((String)"timeout", (ChannelHandler)(new ReadTimeoutHandler(30))).addLast((String)"legacy_query", (ChannelHandler)(new LegacyPingHandler(NetworkSystem.this))).addLast((String)"splitter", (ChannelHandler)(new NettyVarint21FrameDecoder())).addLast((String)"decoder", (ChannelHandler)(new NettyPacketDecoder(EnumPacketDirection.SERVERBOUND))).addLast((String)"prepender", (ChannelHandler)(new NettyVarint21FrameEncoder())).addLast((String)"encoder", (ChannelHandler)(new NettyPacketEncoder(EnumPacketDirection.CLIENTBOUND))); -+ p_initChannel_1_.pipeline().addLast((String)"timeout", (ChannelHandler)(new ReadTimeoutHandler(net.minecraftforge.fml.common.network.internal.FMLNetworkHandler.READ_TIMEOUT))).addLast((String)"legacy_query", (ChannelHandler)(new LegacyPingHandler(NetworkSystem.this))).addLast((String)"splitter", (ChannelHandler)(new NettyVarint21FrameDecoder())).addLast((String)"decoder", (ChannelHandler)(new NettyPacketDecoder(EnumPacketDirection.SERVERBOUND))).addLast((String)"prepender", (ChannelHandler)(new NettyVarint21FrameEncoder())).addLast((String)"encoder", (ChannelHandler)(new NettyPacketEncoder(EnumPacketDirection.CLIENTBOUND))); +- p_initChannel_1_.pipeline().addLast("timeout", new ReadTimeoutHandler(30)).addLast("legacy_query", new LegacyPingHandler(NetworkSystem.this)).addLast("splitter", new NettyVarint21FrameDecoder()).addLast("decoder", new NettyPacketDecoder(EnumPacketDirection.SERVERBOUND)).addLast("prepender", new NettyVarint21FrameEncoder()).addLast("encoder", new NettyPacketEncoder(EnumPacketDirection.CLIENTBOUND)); ++ p_initChannel_1_.pipeline().addLast("timeout", new ReadTimeoutHandler(net.minecraftforge.fml.common.network.internal.FMLNetworkHandler.READ_TIMEOUT)).addLast("legacy_query", new LegacyPingHandler(NetworkSystem.this)).addLast("splitter", new NettyVarint21FrameDecoder()).addLast("decoder", new NettyPacketDecoder(EnumPacketDirection.SERVERBOUND)).addLast("prepender", new NettyVarint21FrameEncoder()).addLast("encoder", new NettyPacketEncoder(EnumPacketDirection.CLIENTBOUND)); NetworkManager networkmanager = new NetworkManager(EnumPacketDirection.SERVERBOUND); NetworkSystem.this.field_151272_f.add(networkmanager); - p_initChannel_1_.pipeline().addLast((String)"packet_handler", (ChannelHandler)networkmanager); + p_initChannel_1_.pipeline().addLast("packet_handler", networkmanager); diff --git a/patches/minecraft/net/minecraft/network/PacketBuffer.java.patch b/patches/minecraft/net/minecraft/network/PacketBuffer.java.patch index 285265ca6..3b58a5f07 100755 --- a/patches/minecraft/net/minecraft/network/PacketBuffer.java.patch +++ b/patches/minecraft/net/minecraft/network/PacketBuffer.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/network/PacketBuffer.java +++ ../src-work/minecraft/net/minecraft/network/PacketBuffer.java -@@ -333,7 +333,7 @@ +@@ -336,7 +336,7 @@ if (p_150788_1_.func_77973_b().func_77645_m() || p_150788_1_.func_77973_b().func_77651_p()) { diff --git a/patches/minecraft/net/minecraft/pathfinding/WalkNodeProcessor.java.patch b/patches/minecraft/net/minecraft/pathfinding/WalkNodeProcessor.java.patch index 7f95fbf46..30c0973ec 100644 --- a/patches/minecraft/net/minecraft/pathfinding/WalkNodeProcessor.java.patch +++ b/patches/minecraft/net/minecraft/pathfinding/WalkNodeProcessor.java.patch @@ -1,19 +1,20 @@ --- ../src-base/minecraft/net/minecraft/pathfinding/WalkNodeProcessor.java +++ ../src-work/minecraft/net/minecraft/pathfinding/WalkNodeProcessor.java -@@ -415,6 +415,7 @@ +@@ -427,6 +427,7 @@ { - pathnodetype = PathNodeType.DANGER_FIRE; + p_193578_5_ = PathNodeType.DANGER_FIRE; } -+ else if(block1.isBurning(p_186330_1_,blockpos$pooledmutableblockpos.func_181079_c(j +p_186330_2_, p_186330_3_, i + p_186330_4_))) pathnodetype = PathNodeType.DAMAGE_FIRE; ++ else if(block.isBurning(p_193578_1_,blockpos$pooledmutableblockpos)) p_193578_5_ = PathNodeType.DAMAGE_FIRE; } } } -@@ -430,6 +431,8 @@ - IBlockState iblockstate = p_189553_1_.func_180495_p(blockpos); +@@ -443,6 +444,9 @@ Block block = iblockstate.func_177230_c(); Material material = iblockstate.func_185904_a(); -+ PathNodeType type = block.getAiPathNodeType(iblockstate, p_189553_1_,blockpos); + ++ PathNodeType type = block.getAiPathNodeType(iblockstate, p_189553_1_, blockpos); + if (type != null) return type; - return material == Material.field_151579_a ? PathNodeType.OPEN : (block != Blocks.field_150415_aT && block != Blocks.field_180400_cw && block != Blocks.field_150392_bi ? (block == Blocks.field_150480_ab ? PathNodeType.DAMAGE_FIRE : (block == Blocks.field_150434_aF ? PathNodeType.DAMAGE_CACTUS : (block instanceof BlockDoor && material == Material.field_151575_d && !((Boolean)iblockstate.func_177229_b(BlockDoor.field_176519_b)).booleanValue() ? PathNodeType.DOOR_WOOD_CLOSED : (block instanceof BlockDoor && material == Material.field_151573_f && !((Boolean)iblockstate.func_177229_b(BlockDoor.field_176519_b)).booleanValue() ? PathNodeType.DOOR_IRON_CLOSED : (block instanceof BlockDoor && ((Boolean)iblockstate.func_177229_b(BlockDoor.field_176519_b)).booleanValue() ? PathNodeType.DOOR_OPEN : (block instanceof BlockRailBase ? PathNodeType.RAIL : (!(block instanceof BlockFence) && !(block instanceof BlockWall) && (!(block instanceof BlockFenceGate) || ((Boolean)iblockstate.func_177229_b(BlockFenceGate.field_176466_a)).booleanValue()) ? (material == Material.field_151586_h ? PathNodeType.WATER : (material == Material.field_151587_i ? PathNodeType.LAVA : (block.func_176205_b(p_189553_1_, blockpos) ? PathNodeType.OPEN : PathNodeType.BLOCKED))) : PathNodeType.FENCE))))))) : PathNodeType.TRAPDOOR); - } - } ++ + if (material == Material.field_151579_a) + { + return PathNodeType.OPEN; diff --git a/patches/minecraft/net/minecraft/potion/Potion.java.patch b/patches/minecraft/net/minecraft/potion/Potion.java.patch index f248f49b1..aca33d9f3 100644 --- a/patches/minecraft/net/minecraft/potion/Potion.java.patch +++ b/patches/minecraft/net/minecraft/potion/Potion.java.patch @@ -7,12 +7,12 @@ -public class Potion +public class Potion extends net.minecraftforge.fml.common.registry.IForgeRegistryEntry.Impl { -- public static final RegistryNamespaced field_188414_b = new RegistryNamespaced(); +- public static final RegistryNamespaced field_188414_b = new RegistryNamespaced(); + public static final RegistryNamespaced field_188414_b = net.minecraftforge.fml.common.registry.GameData.getPotionRegistry(); private final Map field_111188_I = Maps.newHashMap(); private final boolean field_76418_K; private final int field_76414_N; -@@ -198,7 +198,6 @@ +@@ -222,7 +222,6 @@ return this.field_76417_J; } @@ -20,7 +20,7 @@ public boolean func_76398_f() { return this.field_76418_K; -@@ -269,7 +268,74 @@ +@@ -293,7 +292,74 @@ return p_111183_2_.func_111164_d() * (double)(p_111183_1_ + 1); } diff --git a/patches/minecraft/net/minecraft/potion/PotionType.java.patch b/patches/minecraft/net/minecraft/potion/PotionType.java.patch index 6c7d18233..935876ae8 100644 --- a/patches/minecraft/net/minecraft/potion/PotionType.java.patch +++ b/patches/minecraft/net/minecraft/potion/PotionType.java.patch @@ -9,7 +9,7 @@ { + @Deprecated // unused 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 = 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; private final String field_185179_d; diff --git a/patches/minecraft/net/minecraft/profiler/Profiler.java.patch b/patches/minecraft/net/minecraft/profiler/Profiler.java.patch index 4023fecc5..6728ba358 100644 --- a/patches/minecraft/net/minecraft/profiler/Profiler.java.patch +++ b/patches/minecraft/net/minecraft/profiler/Profiler.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/profiler/Profiler.java +++ ../src-work/minecraft/net/minecraft/profiler/Profiler.java -@@ -170,4 +170,15 @@ +@@ -177,4 +177,15 @@ return (this.field_76331_c.hashCode() & 11184810) + 4473924; } } diff --git a/patches/minecraft/net/minecraft/realms/RealmsConnect.java.patch b/patches/minecraft/net/minecraft/realms/RealmsConnect.java.patch index 37e5979ad..6483283cf 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(316, p_connect_1_, p_connect_2_, EnumConnectionState.LOGIN)); -+ RealmsConnect.this.connection.func_179290_a(new C00Handshake(316, p_connect_1_, p_connect_2_, EnumConnectionState.LOGIN, true)); +- RealmsConnect.this.connection.func_179290_a(new C00Handshake(335, p_connect_1_, p_connect_2_, EnumConnectionState.LOGIN)); ++ RealmsConnect.this.connection.func_179290_a(new C00Handshake(335, 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 e29541c4a..e939caaf9 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 -@@ -105,7 +105,7 @@ +@@ -104,7 +104,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; -@@ -123,7 +123,8 @@ +@@ -122,7 +122,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; -@@ -222,8 +223,6 @@ +@@ -221,8 +222,6 @@ { this.func_71237_c(p_71247_1_); this.func_71192_d("menu.loadingLevel"); @@ -28,63 +28,40 @@ 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(); -@@ -254,47 +253,21 @@ +@@ -253,6 +252,7 @@ worldsettings = new WorldSettings(worldinfo); } -- for (int i = 0; i < this.field_71305_c.length; ++i) -+ WorldServer overWorld = (WorldServer)(func_71242_L() ? new DemoWorldServer(this, isavehandler, worldinfo, 0, field_71304_b).func_175643_b() : new WorldServer(this, isavehandler, worldinfo, 0, field_71304_b).func_175643_b()); -+ overWorld.func_72963_a(worldsettings); -+ for (int dim : net.minecraftforge.common.DimensionManager.getStaticDimensionIDs()) ++ if (false) { //Forge Dead code, reimplemented below + for (int i = 0; i < this.field_71305_c.length; ++i) { -- int j = 0; -+ WorldServer world = (dim == 0 ? overWorld : (WorldServer)new WorldServerMulti(this, isavehandler, dim, overWorld, field_71304_b).func_175643_b()); -+ world.func_72954_a(new ServerWorldEventHandler(this, world)); - -- if (i == 1) -- { -- j = -1; -- } -- -- if (i == 2) -- { -- j = 1; -- } -- -- if (i == 0) -- { -- if (this.func_71242_L()) -- { -- this.field_71305_c[i] = (WorldServer)(new DemoWorldServer(this, isavehandler, worldinfo, j, this.field_71304_b)).func_175643_b(); -- } -- else -- { -- this.field_71305_c[i] = (WorldServer)(new WorldServer(this, isavehandler, worldinfo, j, this.field_71304_b)).func_175643_b(); -- } -- -- this.field_71305_c[i].func_72963_a(worldsettings); -- } -- else -- { -- this.field_71305_c[i] = (WorldServer)(new WorldServerMulti(this, isavehandler, j, this.field_71305_c[0], this.field_71304_b)).func_175643_b(); -- } -- -- this.field_71305_c[i].func_72954_a(new ServerWorldEventHandler(this, this.field_71305_c[i])); -- - if (!this.func_71264_H()) - { -- this.field_71305_c[i].func_72912_H().func_76060_a(this.func_71265_f()); -+ world.func_72912_H().func_76060_a(this.func_71265_f()); + int j = 0; +@@ -292,8 +292,23 @@ + this.field_71305_c[i].func_72912_H().func_76060_a(this.func_71265_f()); } -+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.event.world.WorldEvent.Load(world)); } ++ } //Forge: End dead code - this.field_71318_t.func_72364_a(this.field_71305_c); ++ WorldServer overWorld = (WorldServer)(func_71242_L() ? new WorldServerDemo(this, isavehandler, worldinfo, 0, field_71304_b).func_175643_b() : new WorldServer(this, isavehandler, worldinfo, 0, field_71304_b).func_175643_b()); ++ overWorld.func_72963_a(worldsettings); ++ for (int dim : net.minecraftforge.common.DimensionManager.getStaticDimensionIDs()) ++ { ++ WorldServer world = (dim == 0 ? overWorld : (WorldServer)new WorldServerMulti(this, isavehandler, dim, overWorld, field_71304_b).func_175643_b()); ++ world.func_72954_a(new ServerWorldEventHandler(this, world)); ++ ++ if (!this.func_71264_H()) ++ { ++ world.func_72912_H().func_76060_a(this.func_71265_f()); ++ } ++ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.event.world.WorldEvent.Load(world)); ++ } ++ + this.field_71318_t.func_72364_a(new WorldServer[]{ overWorld }); this.func_147139_a(this.func_147135_j()); this.func_71222_d(); } -@@ -309,7 +282,7 @@ +@@ -308,7 +323,7 @@ this.func_71192_d("menu.generatingTerrain"); int j1 = 0; field_147145_h.info("Preparing start region for level 0"); @@ -93,7 +70,7 @@ BlockPos blockpos = worldserver.func_175694_M(); long k1 = func_130071_aq(); -@@ -434,9 +407,16 @@ +@@ -433,9 +448,16 @@ { if (worldserver1 != null) { @@ -110,7 +87,7 @@ } if (this.field_71307_n.func_76468_d()) -@@ -461,6 +441,7 @@ +@@ -460,6 +482,7 @@ { if (this.func_71197_b()) { @@ -118,7 +95,7 @@ this.field_175591_ab = func_130071_aq(); long i = 0L; this.field_147147_p.func_151315_a(new TextComponentString(this.field_71286_C)); -@@ -505,12 +486,20 @@ +@@ -504,12 +527,20 @@ Thread.sleep(Math.max(1L, 50L - i)); this.field_71296_Q = true; } @@ -139,7 +116,7 @@ catch (Throwable throwable1) { field_147145_h.error("Encountered an unexpected exception", throwable1); -@@ -536,14 +525,15 @@ +@@ -535,14 +566,15 @@ field_147145_h.error("We were unable to save this crash report to disk."); } @@ -156,7 +133,7 @@ } catch (Throwable throwable) { -@@ -551,6 +541,8 @@ +@@ -550,6 +582,8 @@ } finally { @@ -165,7 +142,7 @@ this.func_71240_o(); } } -@@ -618,6 +610,7 @@ +@@ -617,6 +651,7 @@ public void func_71217_p() { long i = System.nanoTime(); @@ -173,7 +150,7 @@ ++this.field_71315_w; if (this.field_71295_T) -@@ -644,6 +637,7 @@ +@@ -643,6 +678,7 @@ Collections.shuffle(Arrays.asList(agameprofile)); this.field_147147_p.func_151318_b().func_151330_a(agameprofile); @@ -181,7 +158,7 @@ } if (this.field_71315_w % 900 == 0) -@@ -671,6 +665,7 @@ +@@ -670,6 +706,7 @@ this.field_71304_b.func_76319_b(); this.field_71304_b.func_76319_b(); @@ -189,7 +166,7 @@ } public void func_71190_q() -@@ -686,24 +681,28 @@ +@@ -685,24 +722,28 @@ } this.field_71304_b.func_76318_c("levels"); @@ -222,7 +199,7 @@ try { -@@ -727,6 +726,7 @@ +@@ -726,6 +767,7 @@ throw new ReportedException(crashreport1); } @@ -230,7 +207,7 @@ this.field_71304_b.func_76319_b(); this.field_71304_b.func_76320_a("tracker"); worldserver.func_73039_n().func_72788_a(); -@@ -734,9 +734,11 @@ +@@ -733,9 +775,11 @@ this.field_71304_b.func_76319_b(); } @@ -243,7 +220,7 @@ this.field_71304_b.func_76318_c("connection"); this.func_147137_ag().func_151269_c(); this.field_71304_b.func_76318_c("players"); -@@ -758,7 +760,8 @@ +@@ -759,7 +803,8 @@ public void func_71256_s() { @@ -253,22 +230,27 @@ this.field_175590_aa.start(); } -@@ -774,7 +777,13 @@ +@@ -775,14 +820,13 @@ public WorldServer func_71218_a(int p_71218_1_) { -- return p_71218_1_ == -1 ? this.field_71305_c[1] : (p_71218_1_ == 1 ? this.field_71305_c[2] : this.field_71305_c[0]); +- if (p_71218_1_ == -1) + WorldServer ret = net.minecraftforge.common.DimensionManager.getWorld(p_71218_1_); + if (ret == null) -+ { + { +- return this.field_71305_c[1]; + net.minecraftforge.common.DimensionManager.initDimension(p_71218_1_); + ret = net.minecraftforge.common.DimensionManager.getWorld(p_71218_1_); -+ } + } +- else +- { +- return p_71218_1_ == 1 ? this.field_71305_c[2] : this.field_71305_c[0]; +- } + return ret; } public String func_71249_w() -@@ -804,7 +813,7 @@ +@@ -812,7 +856,7 @@ public String getServerModName() { @@ -277,3 +259,13 @@ } public CrashReport func_71230_b(CrashReport p_71230_1_) +@@ -1594,4 +1638,9 @@ + { + return this.field_175590_aa; + } ++ ++ public DataFixer getDataFixer() ++ { ++ return this.field_184112_s; ++ } + } diff --git a/patches/minecraft/net/minecraft/server/dedicated/DedicatedServer.java.patch b/patches/minecraft/net/minecraft/server/dedicated/DedicatedServer.java.patch index 1aec21b85..fce3ffb2e 100644 --- a/patches/minecraft/net/minecraft/server/dedicated/DedicatedServer.java.patch +++ b/patches/minecraft/net/minecraft/server/dedicated/DedicatedServer.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/server/dedicated/DedicatedServer.java +++ ../src-work/minecraft/net/minecraft/server/dedicated/DedicatedServer.java -@@ -58,6 +58,7 @@ +@@ -59,6 +59,7 @@ private boolean field_71338_p; private GameType field_71337_q; private boolean field_71335_s; @@ -8,15 +8,15 @@ public DedicatedServer(File p_i47086_1_, DataFixer p_i47086_2_, YggdrasilAuthenticationService p_i47086_3_, MinecraftSessionService p_i47086_4_, GameProfileRepository p_i47086_5_, PlayerProfileCache p_i47086_6_) { -@@ -91,6 +92,7 @@ +@@ -92,6 +93,7 @@ { public void run() { + if (net.minecraftforge.server.console.TerminalHandler.handleCommands(DedicatedServer.this)) return; - BufferedReader bufferedreader = new BufferedReader(new InputStreamReader(System.in)); + BufferedReader bufferedreader = new BufferedReader(new InputStreamReader(System.in, StandardCharsets.UTF_8)); String s4; -@@ -116,6 +118,8 @@ +@@ -117,6 +119,8 @@ field_155771_h.warn("To start the server with more ram, launch it as \"java -Xmx1024M -Xms1024M -jar minecraft_server.jar\""); } @@ -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")); -@@ -208,6 +212,7 @@ +@@ -209,6 +213,7 @@ } else { @@ -38,10 +38,10 @@ TileEntitySkull.func_184294_a(this.func_147130_as()); PlayerProfileCache.func_187320_a(this.func_71266_T()); + if (!net.minecraftforge.fml.common.FMLCommonHandler.instance().handleServerAboutToStart(this)) return false; - field_155771_h.info("Preparing level \"{}\"", new Object[] {this.func_71270_I()}); + field_155771_h.info("Preparing level \"{}\"", (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; -@@ -285,7 +291,7 @@ +@@ -292,7 +298,7 @@ thread1.start(); } @@ -50,7 +50,7 @@ } } } -@@ -504,7 +510,7 @@ +@@ -511,7 +517,7 @@ public boolean func_175579_a(World p_175579_1_, BlockPos p_175579_2_, EntityPlayer p_175579_3_) { @@ -59,7 +59,7 @@ { return false; } -@@ -578,6 +584,9 @@ +@@ -580,6 +586,9 @@ return this.field_71340_o.func_73669_a("network-compression-threshold", super.func_175577_aI()); } diff --git a/patches/minecraft/net/minecraft/server/dedicated/ServerHangWatchdog.java.patch b/patches/minecraft/net/minecraft/server/dedicated/ServerHangWatchdog.java.patch index f4bcc652b..286148004 100644 --- a/patches/minecraft/net/minecraft/server/dedicated/ServerHangWatchdog.java.patch +++ b/patches/minecraft/net/minecraft/server/dedicated/ServerHangWatchdog.java.patch @@ -15,7 +15,7 @@ - if (k > this.field_180250_c) + if (k > this.field_180250_c && !this.firstRun) { - field_180251_a.fatal("A single server tick took {} seconds (should be max {})", new Object[] {String.format("%.2f", new Object[]{Float.valueOf((float)k / 1000.0F)}), String.format("%.2f", new Object[]{Float.valueOf(0.05F)})}); + field_180251_a.fatal("A single server tick took {} seconds (should be max {})", String.format("%.2f", (float)k / 1000.0F), String.format("%.2f", 0.05F)); field_180251_a.fatal("Considering it to be crashed, server will forcibly shutdown."); @@ -75,6 +76,8 @@ this.func_180248_a(); diff --git a/patches/minecraft/net/minecraft/server/integrated/IntegratedServer.java.patch b/patches/minecraft/net/minecraft/server/integrated/IntegratedServer.java.patch index b4915dd2d..ab05c869d 100644 --- a/patches/minecraft/net/minecraft/server/integrated/IntegratedServer.java.patch +++ b/patches/minecraft/net/minecraft/server/integrated/IntegratedServer.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/server/integrated/IntegratedServer.java +++ ../src-work/minecraft/net/minecraft/server/integrated/IntegratedServer.java -@@ -69,8 +69,6 @@ +@@ -68,8 +68,6 @@ public void func_71247_a(String p_71247_1_, String p_71247_2_, long p_71247_3_, WorldType p_71247_5_, String p_71247_6_) { this.func_71237_c(p_71247_1_); @@ -9,63 +9,43 @@ ISaveHandler isavehandler = this.func_71254_M().func_75804_a(p_71247_1_, true); this.func_175584_a(this.func_71270_I(), isavehandler); WorldInfo worldinfo = isavehandler.func_75757_d(); -@@ -84,44 +82,23 @@ +@@ -83,6 +81,7 @@ worldinfo.func_76062_a(p_71247_2_); } -- for (int i = 0; i < this.field_71305_c.length; ++i) -+ WorldServer overWorld = (func_71242_L() ? (WorldServer)(new DemoWorldServer(this, isavehandler, worldinfo, 0, this.field_71304_b)).func_175643_b() : ++ if (false) { //Forge: Dead Code, implement below. + for (int i = 0; i < this.field_71305_c.length; ++i) + { + int j = 0; +@@ -117,10 +116,25 @@ + + this.field_71305_c[i].func_72954_a(new ServerWorldEventHandler(this, this.field_71305_c[i])); + } ++ }// Forge: End Dead Code + +- this.func_184103_al().func_72364_a(this.field_71305_c); ++ WorldServer overWorld = (func_71242_L() ? (WorldServer)(new WorldServerDemo(this, isavehandler, worldinfo, 0, this.field_71304_b)).func_175643_b() : + (WorldServer)(new WorldServer(this, isavehandler, worldinfo, 0, this.field_71304_b)).func_175643_b()); + overWorld.func_72963_a(this.field_71350_m); + for (int dim : net.minecraftforge.common.DimensionManager.getStaticDimensionIDs()) - { -- int j = 0; -- -- if (i == 1) ++ { + WorldServer world = (dim == 0 ? overWorld : (WorldServer)(new WorldServerMulti(this, isavehandler, dim, overWorld, this.field_71304_b)).func_175643_b()); + world.func_72954_a(new ServerWorldEventHandler(this, world)); + if (!this.func_71264_H()) - { -- j = -1; ++ { + world.func_72912_H().func_76060_a(func_71265_f()); - } -- -- if (i == 2) -- { -- j = 1; -- } -- -- if (i == 0) -- { -- if (this.func_71242_L()) -- { -- this.field_71305_c[i] = (WorldServer)(new DemoWorldServer(this, isavehandler, worldinfo, j, this.field_71304_b)).func_175643_b(); -- } -- else -- { -- this.field_71305_c[i] = (WorldServer)(new WorldServer(this, isavehandler, worldinfo, j, this.field_71304_b)).func_175643_b(); -- } -- -- this.field_71305_c[i].func_72963_a(this.field_71350_m); -- } -- else -- { -- this.field_71305_c[i] = (WorldServer)(new WorldServerMulti(this, isavehandler, j, this.field_71305_c[0], this.field_71304_b)).func_175643_b(); -- } -- -- this.field_71305_c[i].func_72954_a(new ServerWorldEventHandler(this, this.field_71305_c[i])); ++ } + net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.event.world.WorldEvent.Load(world)); - } - -- this.func_184103_al().func_72364_a(this.field_71305_c); -+ this.func_184103_al().func_72364_a(new WorldServer[]{ overWorld }); ++ } - if (this.field_71305_c[0].func_72912_H().func_176130_y() == null) ++ this.func_184103_al().func_72364_a(new WorldServer[]{ overWorld }); ++ + if (overWorld.func_72912_H().func_176130_y() == null) { this.func_147139_a(this.field_71349_l.field_71474_y.field_74318_M); } -@@ -139,9 +116,10 @@ +@@ -138,9 +152,10 @@ this.func_71245_h(true); field_147148_h.info("Generating keypair"); this.func_71253_a(CryptManager.func_75891_b()); @@ -77,7 +57,7 @@ } public void func_71217_p() -@@ -214,6 +192,7 @@ +@@ -213,6 +228,7 @@ public EnumDifficulty func_147135_j() { @@ -85,7 +65,7 @@ return this.field_71349_l.field_71441_e.func_72912_H().func_176130_y(); } -@@ -357,6 +336,7 @@ +@@ -364,6 +380,7 @@ public void func_71263_m() { diff --git a/patches/minecraft/net/minecraft/server/management/PlayerInteractionManager.java.patch b/patches/minecraft/net/minecraft/server/management/PlayerInteractionManager.java.patch index 4dfdfc89d..dfafa7ecc 100644 --- a/patches/minecraft/net/minecraft/server/management/PlayerInteractionManager.java.patch +++ b/patches/minecraft/net/minecraft/server/management/PlayerInteractionManager.java.patch @@ -9,25 +9,25 @@ public World field_73092_a; public EntityPlayerMP field_73090_b; private GameType field_73091_c = GameType.NOT_SET; -@@ -89,7 +91,7 @@ +@@ -88,7 +90,7 @@ + int i = this.field_73100_i - this.field_73093_n; IBlockState iblockstate = this.field_73092_a.func_180495_p(this.field_180241_i); - Block block = iblockstate.func_177230_c(); - if (iblockstate.func_185904_a() == Material.field_151579_a) -+ if (block.isAir(iblockstate, field_73092_a, field_180241_i)) ++ if (iblockstate.func_177230_c().isAir(iblockstate, field_73092_a, field_180241_i)) { this.field_73097_j = false; } -@@ -116,7 +118,7 @@ +@@ -114,7 +116,7 @@ + { IBlockState iblockstate1 = this.field_73092_a.func_180495_p(this.field_180240_f); - Block block1 = iblockstate1.func_177230_c(); - if (iblockstate1.func_185904_a() == Material.field_151579_a) -+ if (block1.isAir(iblockstate1, field_73092_a, field_180240_f)) ++ if (iblockstate1.func_177230_c().isAir(iblockstate1, field_73092_a, field_180240_f)) { this.field_73092_a.func_175715_c(this.field_73090_b.func_145782_y(), this.field_180240_f, -1); this.field_73094_o = -1; -@@ -125,7 +127,7 @@ +@@ -123,7 +125,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) -@@ -139,6 +141,15 @@ +@@ -137,6 +139,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_)) -@@ -174,17 +185,36 @@ +@@ -172,17 +183,36 @@ } } @@ -93,7 +93,7 @@ { this.func_180237_b(p_180784_1_); } -@@ -206,7 +236,7 @@ +@@ -204,7 +234,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); -@@ -235,13 +265,17 @@ +@@ -233,13 +263,17 @@ private boolean func_180235_c(BlockPos p_180235_1_) { @@ -124,7 +124,7 @@ } return flag; -@@ -249,7 +283,8 @@ +@@ -247,7 +281,8 @@ public boolean func_180237_b(BlockPos p_180237_1_) { @@ -134,7 +134,7 @@ { return false; } -@@ -266,53 +301,41 @@ +@@ -264,53 +299,41 @@ } else { @@ -200,7 +200,7 @@ return flag1; } } -@@ -330,8 +353,11 @@ +@@ -328,8 +351,11 @@ } else { @@ -210,9 +210,9 @@ 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_); - ItemStack itemstack = (ItemStack)actionresult.func_188398_b(); + ItemStack itemstack = actionresult.func_188398_b(); -@@ -359,6 +385,7 @@ +@@ -357,6 +383,7 @@ if (itemstack.func_190926_b()) { @@ -220,7 +220,7 @@ p_187250_1_.func_184611_a(p_187250_4_, ItemStack.field_190927_a); } -@@ -404,13 +431,23 @@ +@@ -402,13 +429,23 @@ } else { @@ -247,7 +247,7 @@ } } -@@ -438,14 +475,22 @@ +@@ -436,14 +473,22 @@ { int j = p_187251_3_.func_77960_j(); int i = p_187251_3_.func_190916_E(); @@ -271,7 +271,7 @@ } } } -@@ -455,4 +500,13 @@ +@@ -453,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 c17ee6139..2cafd885b 100644 --- a/patches/minecraft/net/minecraft/server/management/PlayerList.java.patch +++ b/patches/minecraft/net/minecraft/server/management/PlayerList.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/server/management/PlayerList.java +++ ../src-work/minecraft/net/minecraft/server/management/PlayerList.java -@@ -102,7 +102,7 @@ +@@ -106,7 +106,7 @@ this.field_72405_c = 8; } @@ -9,7 +9,7 @@ { GameProfile gameprofile = p_72355_2_.func_146103_bH(); PlayerProfileCache playerprofilecache = this.field_72400_f.func_152358_ax(); -@@ -111,6 +111,17 @@ +@@ -115,6 +115,17 @@ playerprofilecache.func_152649_a(gameprofile); NBTTagCompound nbttagcompound = this.func_72380_a(p_72355_2_); p_72355_2_.func_70029_a(this.field_72400_f.func_71218_a(p_72355_2_.field_71093_bK)); @@ -27,7 +27,7 @@ p_72355_2_.field_71134_c.func_73080_a((WorldServer)p_72355_2_.field_70170_p); String s1 = "local"; -@@ -123,8 +134,8 @@ +@@ -127,8 +138,8 @@ WorldServer worldserver = this.field_72400_f.func_71218_a(p_72355_2_.field_71093_bK); WorldInfo worldinfo = worldserver.func_72912_H(); this.func_72381_a(p_72355_2_, (EntityPlayerMP)null, worldserver); @@ -38,7 +38,7 @@ 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 SPacketPlayerAbilities(p_72355_2_.field_71075_bZ)); -@@ -200,6 +211,7 @@ +@@ -204,6 +215,7 @@ } p_72355_2_.func_71116_b(); @@ -46,15 +46,15 @@ } protected void func_96456_a(ServerScoreboard p_96456_1_, EntityPlayerMP p_96456_2_) -@@ -290,6 +302,7 @@ - nbttagcompound1 = this.field_72400_f.func_184110_aI().func_188257_a(FixTypes.PLAYER, nbttagcompound); - p_72380_1_.func_70020_e(nbttagcompound1); +@@ -304,6 +316,7 @@ + nbttagcompound1 = nbttagcompound; + p_72380_1_.func_70020_e(nbttagcompound); field_148546_d.debug("loading single player"); + net.minecraftforge.event.ForgeEventFactory.firePlayerLoadingEvent(p_72380_1_, this.field_72412_k, p_72380_1_.func_110124_au().toString()); } else { -@@ -299,8 +312,24 @@ +@@ -313,8 +326,24 @@ return nbttagcompound1; } @@ -77,17 +77,17 @@ + if (p_72391_1_.field_71135_a == null) return; + this.field_72412_k.func_75753_a(p_72391_1_); - StatisticsManagerServer statisticsmanagerserver = (StatisticsManagerServer)this.field_148547_k.get(p_72391_1_.func_110124_au()); + StatisticsManagerServer statisticsmanagerserver = this.field_148547_k.get(p_72391_1_.func_110124_au()); -@@ -322,6 +351,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)})); +@@ -343,6 +372,7 @@ + p_72377_1_.field_71135_a.func_147359_a(new SPacketPlayerListItem(SPacketPlayerListItem.Action.ADD_PLAYER, new EntityPlayerMP[] {this.field_72404_b.get(i)})); } + net.minecraftforge.common.chunkio.ChunkIOExecutor.adjustPoolSize(this.func_72394_k()); worldserver.func_72838_d(p_72377_1_); this.func_72375_a(p_72377_1_, (WorldServer)null); } -@@ -333,6 +363,7 @@ +@@ -354,6 +384,7 @@ public void func_72367_e(EntityPlayerMP p_72367_1_) { @@ -95,15 +95,15 @@ 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_); -@@ -367,6 +398,7 @@ - this.field_177454_f.remove(uuid); - this.field_148547_k.remove(uuid); +@@ -376,6 +407,7 @@ + worldserver.func_72964_e(p_72367_1_.field_70176_ah, p_72367_1_.field_70164_aj).func_76630_e(); + } } + net.minecraftforge.common.chunkio.ChunkIOExecutor.adjustPoolSize(this.func_72394_k()); - this.func_148540_a(new SPacketPlayerListItem(SPacketPlayerListItem.Action.REMOVE_PLAYER, new EntityPlayerMP[] {p_72367_1_})); - } -@@ -450,13 +482,24 @@ + worldserver.func_72900_e(p_72367_1_); + worldserver.func_184164_w().func_72695_c(p_72367_1_); +@@ -473,13 +505,24 @@ public EntityPlayerMP func_72368_a(EntityPlayerMP p_72368_1_, int p_72368_2_, boolean p_72368_3_) { @@ -130,15 +130,15 @@ p_72368_1_.field_71093_bK = p_72368_2_; PlayerInteractionManager playerinteractionmanager; -@@ -472,6 +515,7 @@ +@@ -495,6 +538,7 @@ 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_); + entityplayermp.func_193104_a(p_72368_1_, p_72368_3_); + entityplayermp.field_71093_bK = p_72368_2_; entityplayermp.func_145769_d(p_72368_1_.func_145782_y()); entityplayermp.func_174817_o(p_72368_1_); entityplayermp.func_184819_a(p_72368_1_.func_184591_cq()); -@@ -519,6 +563,7 @@ +@@ -542,6 +586,7 @@ this.field_177454_f.put(entityplayermp.func_110124_au(), entityplayermp); entityplayermp.func_71116_b(); entityplayermp.func_70606_j(entityplayermp.func_110143_aJ()); @@ -146,7 +146,7 @@ return entityplayermp; } -@@ -533,15 +578,20 @@ +@@ -556,15 +601,20 @@ public void func_187242_a(EntityPlayerMP p_187242_1_, int p_187242_2_) { @@ -169,7 +169,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); -@@ -553,17 +603,27 @@ +@@ -576,17 +626,27 @@ { p_187242_1_.field_71135_a.func_147359_a(new SPacketEntityEffect(p_187242_1_.func_145782_y(), potioneffect)); } @@ -200,7 +200,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); -@@ -574,7 +634,7 @@ +@@ -597,7 +657,7 @@ p_82448_3_.func_72866_a(p_82448_1_, false); } } @@ -209,7 +209,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); -@@ -585,7 +645,8 @@ +@@ -608,7 +668,8 @@ p_82448_3_.func_72866_a(p_82448_1_, false); } } @@ -219,7 +219,7 @@ { BlockPos blockpos; -@@ -620,7 +681,7 @@ +@@ -643,7 +704,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 d872daa1d..2c3ee93c0 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 -@@ -70,7 +70,7 @@ +@@ -69,7 +69,7 @@ if (entityplayermp == null) { this.field_147328_g = NetHandlerLoginServer.LoginState.READY_TO_ACCEPT; @@ -9,7 +9,7 @@ this.field_181025_l = null; } } -@@ -134,7 +134,7 @@ +@@ -132,7 +132,7 @@ } else { @@ -18,7 +18,7 @@ } } } -@@ -179,7 +179,7 @@ +@@ -177,7 +177,7 @@ this.field_147335_k = p_147315_1_.func_149300_a(privatekey); this.field_147328_g = NetHandlerLoginServer.LoginState.AUTHENTICATING; this.field_147333_a.func_150727_a(this.field_147335_k); diff --git a/patches/minecraft/net/minecraft/stats/StatList.java.patch b/patches/minecraft/net/minecraft/stats/StatList.java.patch index 4fab2ba72..906adf505 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 -@@ -163,12 +163,12 @@ +@@ -162,12 +162,12 @@ } } @@ -15,7 +15,7 @@ { Item item = Item.func_150898_a(block); -@@ -185,12 +185,12 @@ +@@ -184,12 +184,12 @@ } } @@ -30,7 +30,7 @@ { if (item != null) { -@@ -209,12 +209,12 @@ +@@ -208,12 +208,12 @@ } } @@ -45,7 +45,7 @@ { if (item != null) { -@@ -228,12 +228,12 @@ +@@ -227,12 +227,12 @@ } } @@ -60,7 +60,7 @@ { if (item != null) { -@@ -248,7 +248,7 @@ +@@ -247,7 +247,7 @@ } } @@ -69,7 +69,7 @@ } private static String func_180204_a(Item p_180204_0_) -@@ -257,28 +257,35 @@ +@@ -256,28 +256,35 @@ return resourcelocation != null ? resourcelocation.toString().replace(':', '.') : null; } @@ -123,9 +123,9 @@ if (p_151180_0_[i] != null && p_151180_0_[j] == null) { -@@ -310,4 +317,37 @@ +@@ -309,4 +316,36 @@ { - return (StatBase)field_188093_a.get(p_151177_0_); + return field_188093_a.get(p_151177_0_); } + + @Deprecated //MODDER DO NOT CALL THIS ITS JUST A EVENT CALLBACK FOR FORGE @@ -135,7 +135,6 @@ + field_188094_c.clear(); + field_188095_d.clear(); + field_188096_e.clear(); -+ AchievementList.field_187981_e.clear(); + + for (StatBase[] sb : new StatBase[][]{field_188065_ae, field_188066_af, field_75929_E, field_75930_F, field_188067_ai, field_188068_aj}) + { diff --git a/patches/minecraft/net/minecraft/tileentity/TileEntity.java.patch b/patches/minecraft/net/minecraft/tileentity/TileEntity.java.patch index deac75d2e..b9fe86187 100644 --- a/patches/minecraft/net/minecraft/tileentity/TileEntity.java.patch +++ b/patches/minecraft/net/minecraft/tileentity/TileEntity.java.patch @@ -8,7 +8,7 @@ +public abstract class TileEntity implements net.minecraftforge.common.capabilities.ICapabilitySerializable { private static final Logger field_145852_a = LogManager.getLogger(); -- private static final RegistryNamespaced < ResourceLocation, Class > field_190562_f = new RegistryNamespaced(); +- private static final RegistryNamespaced < ResourceLocation, Class > field_190562_f = new RegistryNamespaced < ResourceLocation, Class > (); + private static final RegistryNamespaced < ResourceLocation, Class > field_190562_f = net.minecraftforge.fml.common.registry.GameData.getTileEntityRegistry(); protected World field_145850_b; protected BlockPos field_174879_c = BlockPos.field_177992_a; @@ -47,7 +47,7 @@ @@ -103,6 +108,9 @@ catch (Throwable throwable1) { - field_145852_a.error("Failed to create block entity {}", new Object[] {s, throwable1}); + field_145852_a.error("Failed to create block entity {}", s, throwable1); + net.minecraftforge.fml.common.FMLLog.log(org.apache.logging.log4j.Level.ERROR, throwable1, + "A TileEntity %s(%s) has thrown an exception during loading, its state cannot be restored. Report this to the mod author", + s, oclass.getName()); @@ -57,7 +57,7 @@ @@ -115,6 +123,9 @@ catch (Throwable throwable) { - field_145852_a.error("Failed to load data for block entity {}", new Object[] {s, throwable}); + field_145852_a.error("Failed to load data for block entity {}", s, throwable); + net.minecraftforge.fml.common.FMLLog.log(org.apache.logging.log4j.Level.ERROR, throwable, + "A TileEntity %s(%s) has thrown an exception during loading, its state cannot be restored. Report this to the mod author", + s, oclass.getName()); diff --git a/patches/minecraft/net/minecraft/tileentity/TileEntityBeacon.java.patch b/patches/minecraft/net/minecraft/tileentity/TileEntityBeacon.java.patch index 4594c2639..8fbc3d27f 100644 --- a/patches/minecraft/net/minecraft/tileentity/TileEntityBeacon.java.patch +++ b/patches/minecraft/net/minecraft/tileentity/TileEntityBeacon.java.patch @@ -1,17 +1,17 @@ --- ../src-base/minecraft/net/minecraft/tileentity/TileEntityBeacon.java +++ ../src-work/minecraft/net/minecraft/tileentity/TileEntityBeacon.java -@@ -130,17 +130,23 @@ +@@ -130,17 +130,21 @@ { if (iblockstate.func_177230_c() != Blocks.field_150397_co) { - if (iblockstate.func_185891_c() >= 15 && iblockstate.func_177230_c() != Blocks.field_150357_h) -+ if (iblockstate.getLightOpacity(this.field_145850_b, blockpos$mutableblockpos) >= 15 && iblockstate.func_177230_c() != Blocks.field_150357_h) ++ if (iblockstate.getLightOpacity(field_145850_b, blockpos$mutableblockpos) >= 15 && iblockstate.func_177230_c() != Blocks.field_150357_h) { this.field_146015_k = false; this.field_174909_f.clear(); break; } - +- + float[] customColor = iblockstate.func_177230_c().getBeaconColorMultiplier(iblockstate, this.field_145850_b, blockpos$mutableblockpos, func_174877_v()); + if (customColor != null) + afloat = customColor; @@ -20,12 +20,12 @@ continue; + } } - +- + else - afloat = EntitySheep.func_175513_a((EnumDyeColor)iblockstate.func_177229_b(BlockStainedGlassPane.field_176245_a)); + afloat = ((EnumDyeColor)iblockstate.func_177229_b(BlockStainedGlassPane.field_176245_a)).func_193349_f(); } -@@ -181,7 +187,7 @@ +@@ -181,7 +185,7 @@ { Block block = this.field_145850_b.func_180495_p(new BlockPos(j1, i2, k1)).func_177230_c(); @@ -34,7 +34,7 @@ { flag1 = false; break; -@@ -383,7 +389,7 @@ +@@ -395,7 +399,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 2a2541f60..760f50515 100644 --- a/patches/minecraft/net/minecraft/tileentity/TileEntityBrewingStand.java.patch +++ b/patches/minecraft/net/minecraft/tileentity/TileEntityBrewingStand.java.patch @@ -5,7 +5,7 @@ private boolean func_145934_k() { + 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); + ItemStack itemstack = this.field_145945_j.get(3); if (itemstack.func_190926_b()) @@ -181,19 +182,17 @@ @@ -13,11 +13,11 @@ private void func_145940_l() { + if (net.minecraftforge.event.ForgeEventFactory.onPotionAttemptBrew(field_145945_j)) return; - ItemStack itemstack = (ItemStack)this.field_145945_j.get(3); + ItemStack itemstack = this.field_145945_j.get(3); - for (int i = 0; i < 3; ++i) - { -- this.field_145945_j.set(i, PotionHelper.func_185212_d(itemstack, (ItemStack)this.field_145945_j.get(i))); +- this.field_145945_j.set(i, PotionHelper.func_185212_d(itemstack, this.field_145945_j.get(i))); - } + net.minecraftforge.common.brewing.BrewingRecipeRegistry.brewPotions(field_145945_j, field_145945_j.get(3), field_145947_i); @@ -40,7 +40,7 @@ } public static void func_189675_a(DataFixer p_189675_0_) -@@ -289,12 +289,12 @@ +@@ -296,7 +296,7 @@ { if (p_94041_1_ == 3) { @@ -49,13 +49,16 @@ } else { - Item item = p_94041_2_.func_77973_b(); -- return p_94041_1_ == 4 ? item == Items.field_151065_br : (item == Items.field_151068_bn || item == Items.field_185155_bH || item == Items.field_185156_bI || item == Items.field_151069_bo) && this.func_70301_a(p_94041_1_) == ItemStack.field_190927_a; -+ return p_94041_1_ == 4 ? item == Items.field_151065_br : net.minecraftforge.common.brewing.BrewingRecipeRegistry.isValidInput(p_94041_2_) && this.func_70301_a(p_94041_1_).func_190926_b(); // FORGE - Fix MC-111753 Identity comparing with ItemStack.EMPTY +@@ -308,7 +308,7 @@ + } + else + { +- return (item == Items.field_151068_bn || item == Items.field_185155_bH || item == Items.field_185156_bI || item == Items.field_151069_bo) && this.func_70301_a(p_94041_1_).func_190926_b(); ++ return net.minecraftforge.common.brewing.BrewingRecipeRegistry.isValidInput(p_94041_2_) && this.func_70301_a(p_94041_1_).func_190926_b(); + } } } - -@@ -348,6 +348,26 @@ +@@ -377,6 +377,26 @@ } } diff --git a/patches/minecraft/net/minecraft/tileentity/TileEntityFurnace.java.patch b/patches/minecraft/net/minecraft/tileentity/TileEntityFurnace.java.patch index 77b4d2b31..ee33e5b5e 100644 --- a/patches/minecraft/net/minecraft/tileentity/TileEntityFurnace.java.patch +++ b/patches/minecraft/net/minecraft/tileentity/TileEntityFurnace.java.patch @@ -10,7 +10,7 @@ + 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((ItemStack)this.field_145957_n.get(1)); + this.field_145963_i = func_145952_a(this.field_145957_n.get(1)); if (p_145839_1_.func_150297_b("CustomName", 8)) @@ -135,9 +135,9 @@ @@ -37,19 +37,23 @@ } } } -@@ -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 +@@ -269,13 +269,13 @@ + { + return false; + } +- else if (itemstack1.func_190916_E() < this.func_70297_j_() && itemstack1.func_190916_E() < itemstack1.func_77976_d()) ++ else if (itemstack1.func_190916_E() + itemstack.func_190916_E() <= this.func_70297_j_() && itemstack1.func_190916_E() + itemstack.func_190916_E() <= itemstack1.func_77976_d()) // Forge fix: make furnace respect stack sizes in furnace recipes + { + return true; + } + else + { +- return itemstack1.func_190916_E() < itemstack.func_77976_d(); ++ return itemstack1.func_190916_E() + itemstack.func_190916_E() <= itemstack.func_77976_d(); // Forge fix: make furnace respect stack sizes in furnace recipes + } } } - } -@@ -279,7 +282,7 @@ +@@ -295,7 +295,7 @@ } else if (itemstack2.func_77973_b() == itemstack1.func_77973_b()) { @@ -58,7 +62,7 @@ } 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,6 +303,11 @@ +@@ -316,6 +316,11 @@ else { Item item = p_145952_0_.func_77973_b(); @@ -67,10 +71,10 @@ + int burnTime = net.minecraftforge.fml.common.registry.GameRegistry.getFuelValue(p_145952_0_); + if (burnTime != 0) return burnTime; + } - 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))))))))))); - } - } -@@ -418,4 +426,22 @@ + + if (item == Item.func_150898_a(Blocks.field_150376_bx)) + { +@@ -530,4 +535,22 @@ { this.field_145957_n.clear(); } diff --git a/patches/minecraft/net/minecraft/tileentity/TileEntityHopper.java.patch b/patches/minecraft/net/minecraft/tileentity/TileEntityHopper.java.patch index 8819a4104..a758f873e 100644 --- a/patches/minecraft/net/minecraft/tileentity/TileEntityHopper.java.patch +++ b/patches/minecraft/net/minecraft/tileentity/TileEntityHopper.java.patch @@ -30,7 +30,7 @@ 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) -@@ -509,9 +518,10 @@ +@@ -516,9 +525,10 @@ int j = MathHelper.func_76128_c(p_145893_3_); int k = MathHelper.func_76128_c(p_145893_5_); BlockPos blockpos = new BlockPos(i, j, k); @@ -43,7 +43,7 @@ { TileEntity tileentity = p_145893_0_.func_175625_s(blockpos); -@@ -589,4 +599,6 @@ +@@ -611,4 +621,6 @@ { return this.field_145900_a; } diff --git a/patches/minecraft/net/minecraft/tileentity/TileEntityNote.java.patch b/patches/minecraft/net/minecraft/tileentity/TileEntityNote.java.patch index 49be21b18..e8d6a2688 100644 --- a/patches/minecraft/net/minecraft/tileentity/TileEntityNote.java.patch +++ b/patches/minecraft/net/minecraft/tileentity/TileEntityNote.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/tileentity/TileEntityNote.java +++ ../src-work/minecraft/net/minecraft/tileentity/TileEntityNote.java -@@ -30,7 +30,9 @@ +@@ -32,7 +32,9 @@ public void func_145877_a() { diff --git a/patches/minecraft/net/minecraft/tileentity/TileEntitySign.java.patch b/patches/minecraft/net/minecraft/tileentity/TileEntitySign.java.patch index b5069bceb..f0b24d2e3 100644 --- a/patches/minecraft/net/minecraft/tileentity/TileEntitySign.java.patch +++ b/patches/minecraft/net/minecraft/tileentity/TileEntitySign.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/tileentity/TileEntitySign.java +++ ../src-work/minecraft/net/minecraft/tileentity/TileEntitySign.java -@@ -66,7 +66,7 @@ +@@ -59,7 +59,7 @@ } public boolean func_70003_b(int p_70003_1_, String p_70003_2_) { diff --git a/patches/minecraft/net/minecraft/util/ClassInheritanceMultiMap.java.patch b/patches/minecraft/net/minecraft/util/ClassInheritanceMultiMap.java.patch index 5799fbdaa..93d097b39 100644 --- a/patches/minecraft/net/minecraft/util/ClassInheritanceMultiMap.java.patch +++ b/patches/minecraft/net/minecraft/util/ClassInheritanceMultiMap.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/util/ClassInheritanceMultiMap.java +++ ../src-work/minecraft/net/minecraft/util/ClassInheritanceMultiMap.java -@@ -12,7 +12,8 @@ +@@ -13,7 +13,8 @@ public class ClassInheritanceMultiMap extends AbstractSet { diff --git a/patches/minecraft/net/minecraft/util/ScreenShotHelper.java.patch b/patches/minecraft/net/minecraft/util/ScreenShotHelper.java.patch index f7ace8c62..33fd2b6e6 100644 --- a/patches/minecraft/net/minecraft/util/ScreenShotHelper.java.patch +++ b/patches/minecraft/net/minecraft/util/ScreenShotHelper.java.patch @@ -1,13 +1,13 @@ --- ../src-base/minecraft/net/minecraft/util/ScreenShotHelper.java +++ ../src-work/minecraft/net/minecraft/util/ScreenShotHelper.java -@@ -52,10 +52,14 @@ +@@ -53,10 +53,14 @@ file2 = new File(file1, p_148259_1_); } + file2 = file2.getCanonicalFile(); // FORGE: Fix errors on Windows with paths that include \.\ + net.minecraftforge.client.event.ScreenshotEvent event = net.minecraftforge.client.ForgeHooksClient.onScreenshot(bufferedimage, file2); + if (event.isCanceled()) return event.getCancelMessage(); else file2 = event.getScreenshotFile(); - ImageIO.write(bufferedimage, "png", (File)file2); + ImageIO.write(bufferedimage, "png", file2); ITextComponent itextcomponent = new TextComponentString(file2.getName()); itextcomponent.func_150256_b().func_150241_a(new ClickEvent(ClickEvent.Action.OPEN_FILE, file2.getAbsolutePath())); itextcomponent.func_150256_b().func_150228_d(Boolean.valueOf(true)); diff --git a/patches/minecraft/net/minecraft/util/SoundEvent.java.patch b/patches/minecraft/net/minecraft/util/SoundEvent.java.patch index a8d86ef43..57c472974 100644 --- a/patches/minecraft/net/minecraft/util/SoundEvent.java.patch +++ b/patches/minecraft/net/minecraft/util/SoundEvent.java.patch @@ -7,7 +7,7 @@ -public class SoundEvent +public class SoundEvent extends net.minecraftforge.fml.common.registry.IForgeRegistryEntry.Impl { -- public static final RegistryNamespaced field_187505_a = new RegistryNamespaced(); +- public static final RegistryNamespaced field_187505_a = new RegistryNamespaced(); + public static final RegistryNamespaced field_187505_a = net.minecraftforge.fml.common.registry.GameData.getSoundEventRegistry(); private final ResourceLocation field_187506_b; private static int field_187507_c; diff --git a/patches/minecraft/net/minecraft/util/TabCompleter.java.patch b/patches/minecraft/net/minecraft/util/TabCompleter.java.patch index 4d34d47f2..381309b8f 100644 --- a/patches/minecraft/net/minecraft/util/TabCompleter.java.patch +++ b/patches/minecraft/net/minecraft/util/TabCompleter.java.patch @@ -4,7 +4,7 @@ this.field_186844_a.func_146175_b(i - this.field_186844_a.func_146198_h()); } -- this.field_186844_a.func_146191_b((String)this.field_186849_f.get(this.field_186848_e++)); +- this.field_186844_a.func_146191_b(this.field_186849_f.get(this.field_186848_e++)); + this.field_186844_a.func_146191_b(net.minecraft.util.text.TextFormatting.func_110646_a(this.field_186849_f.get(this.field_186848_e++))); } diff --git a/patches/minecraft/net/minecraft/util/datafix/DataFixesManager.java.patch b/patches/minecraft/net/minecraft/util/datafix/DataFixesManager.java.patch index 6572f8890..87e0c8cc6 100644 --- a/patches/minecraft/net/minecraft/util/datafix/DataFixesManager.java.patch +++ b/patches/minecraft/net/minecraft/util/datafix/DataFixesManager.java.patch @@ -1,9 +1,9 @@ --- ../src-base/minecraft/net/minecraft/util/datafix/DataFixesManager.java +++ ../src-work/minecraft/net/minecraft/util/datafix/DataFixesManager.java -@@ -161,6 +161,7 @@ +@@ -165,6 +165,7 @@ public static DataFixer func_188279_a() { - DataFixer datafixer = new DataFixer(922); + DataFixer datafixer = new DataFixer(1139); + datafixer = new net.minecraftforge.common.util.CompoundDataFixer(datafixer); WorldInfo.func_189967_a(datafixer); EntityPlayerMP.func_191522_a(datafixer); diff --git a/patches/minecraft/net/minecraft/util/math/Vec3d.java.patch b/patches/minecraft/net/minecraft/util/math/Vec3d.java.patch index cfcc654e4..f01939a01 100644 --- a/patches/minecraft/net/minecraft/util/math/Vec3d.java.patch +++ b/patches/minecraft/net/minecraft/util/math/Vec3d.java.patch @@ -26,7 +26,7 @@ public double func_189985_c() { return this.field_72450_a * this.field_72450_a + this.field_72448_b * this.field_72448_b + this.field_72449_c * this.field_72449_c; -@@ -227,13 +222,11 @@ +@@ -239,13 +234,11 @@ return new Vec3d(d0, d1, d2); } diff --git a/patches/minecraft/net/minecraft/util/registry/RegistryNamespacedDefaultedByKey.java.patch b/patches/minecraft/net/minecraft/util/registry/RegistryNamespacedDefaultedByKey.java.patch index ffdc4e7ef..a6441f767 100644 --- a/patches/minecraft/net/minecraft/util/registry/RegistryNamespacedDefaultedByKey.java.patch +++ b/patches/minecraft/net/minecraft/util/registry/RegistryNamespacedDefaultedByKey.java.patch @@ -1,7 +1,7 @@ --- ../src-base/minecraft/net/minecraft/util/registry/RegistryNamespacedDefaultedByKey.java +++ ../src-work/minecraft/net/minecraft/util/registry/RegistryNamespacedDefaultedByKey.java @@ -63,4 +63,11 @@ - V v = super.func_186801_a(p_186801_1_); + V v = (V)super.func_186801_a(p_186801_1_); return (V)(v == null ? this.field_148761_e : v); } + diff --git a/patches/minecraft/net/minecraft/util/text/ITextComponent.java.patch b/patches/minecraft/net/minecraft/util/text/ITextComponent.java.patch index d7c43cfc4..34da23c67 100644 --- a/patches/minecraft/net/minecraft/util/text/ITextComponent.java.patch +++ b/patches/minecraft/net/minecraft/util/text/ITextComponent.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/util/text/ITextComponent.java +++ ../src-work/minecraft/net/minecraft/util/text/ITextComponent.java -@@ -33,7 +33,6 @@ +@@ -34,7 +34,6 @@ String func_150260_c(); 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 d7e8277eb..841728247 100644 --- a/patches/minecraft/net/minecraft/util/text/translation/LanguageMap.java.patch +++ b/patches/minecraft/net/minecraft/util/text/translation/LanguageMap.java.patch @@ -29,7 +29,7 @@ + inputstream = net.minecraftforge.fml.common.FMLCommonHandler.instance().loadLanguage(table, inputstream); + if (inputstream == null) return table; - for (String s : IOUtils.readLines(inputstream, Charsets.UTF_8)) + for (String s : IOUtils.readLines(inputstream, StandardCharsets.UTF_8)) { @@ -37,17 +57,18 @@ { diff --git a/patches/minecraft/net/minecraft/village/Village.java.patch b/patches/minecraft/net/minecraft/village/Village.java.patch index 38af13936..564e3bd3e 100644 --- a/patches/minecraft/net/minecraft/village/Village.java.patch +++ b/patches/minecraft/net/minecraft/village/Village.java.patch @@ -45,7 +45,7 @@ if (entityplayer1 != null) { -@@ -407,25 +409,51 @@ +@@ -415,25 +417,51 @@ } } @@ -57,7 +57,7 @@ + + public int getPlayerReputation(UUID p_82684_1_) + { - Integer integer = (Integer)this.field_82693_j.get(p_82684_1_); + Integer integer = this.field_82693_j.get(p_82684_1_); return integer == null ? 0 : integer.intValue(); } @@ -99,7 +99,7 @@ public void func_82690_a(NBTTagCompound p_82690_1_) { this.field_75588_h = p_82690_1_.func_74762_e("PopSize"); -@@ -451,21 +479,17 @@ +@@ -459,21 +487,17 @@ { NBTTagCompound nbttagcompound1 = nbttaglist1.func_150305_b(j); @@ -126,7 +126,7 @@ } public void func_82689_b(NBTTagCompound p_82689_1_) -@@ -499,18 +523,14 @@ +@@ -507,18 +531,14 @@ p_82689_1_.func_74782_a("Doors", nbttaglist); NBTTagList nbttaglist1 = new NBTTagList(); @@ -147,7 +147,7 @@ nbttagcompound1.func_74768_a("S", ((Integer)this.field_82693_j.get(s)).intValue()); nbttaglist1.func_74742_a(nbttagcompound1); } -@@ -522,6 +542,7 @@ +@@ -530,6 +550,7 @@ } p_82689_1_.func_74782_a("Players", nbttaglist1); @@ -155,7 +155,7 @@ } public void func_82692_h() -@@ -536,9 +557,9 @@ +@@ -544,9 +565,9 @@ public void func_82683_b(int p_82683_1_) { @@ -167,7 +167,7 @@ } } -@@ -553,4 +574,30 @@ +@@ -561,4 +582,30 @@ this.field_75590_b = p_i1674_3_; } } diff --git a/patches/minecraft/net/minecraft/world/DimensionType.java.patch b/patches/minecraft/net/minecraft/world/DimensionType.java.patch index b7c257354..06d76f880 100644 --- a/patches/minecraft/net/minecraft/world/DimensionType.java.patch +++ b/patches/minecraft/net/minecraft/world/DimensionType.java.patch @@ -16,11 +16,10 @@ } public int func_186068_a() -@@ -74,4 +76,18 @@ - +@@ -75,6 +77,20 @@ throw new IllegalArgumentException("Invalid dimension id " + p_186069_0_); } -+ + + public boolean shouldLoadSpawn(){ return this.shouldLoadSpawn; } + public DimensionType setLoadSpawn(boolean value) { this.shouldLoadSpawn = value; return this; } + @@ -34,4 +33,7 @@ + return ret.setLoadSpawn(keepLoaded); + } + //TODO: Unregister? There is no way to really delete a enum value... - } ++ + public static DimensionType func_193417_a(String p_193417_0_) + { + for (DimensionType dimensiontype : values()) diff --git a/patches/minecraft/net/minecraft/world/Explosion.java.patch b/patches/minecraft/net/minecraft/world/Explosion.java.patch index 1c6266c34..90b0c87f2 100644 --- a/patches/minecraft/net/minecraft/world/Explosion.java.patch +++ b/patches/minecraft/net/minecraft/world/Explosion.java.patch @@ -43,7 +43,7 @@ } } } -@@ -266,4 +268,6 @@ +@@ -277,4 +279,6 @@ { return this.field_77281_g; } diff --git a/patches/minecraft/net/minecraft/world/World.java.patch b/patches/minecraft/net/minecraft/world/World.java.patch index 4b773568e..7f716dac1 100644 --- a/patches/minecraft/net/minecraft/world/World.java.patch +++ b/patches/minecraft/net/minecraft/world/World.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/world/World.java +++ ../src-work/minecraft/net/minecraft/world/World.java -@@ -59,8 +59,15 @@ +@@ -62,8 +62,15 @@ import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -17,7 +17,7 @@ private int field_181546_a = 63; protected boolean field_72999_e; public final List field_72996_f = Lists.newArrayList(); -@@ -102,6 +109,12 @@ +@@ -107,6 +114,12 @@ private final WorldBorder field_175728_M; int[] field_72994_J; @@ -29,8 +29,8 @@ + protected World(ISaveHandler p_i45749_1_, WorldInfo p_i45749_2_, WorldProvider p_i45749_3_, Profiler p_i45749_4_, boolean p_i45749_5_) { - this.field_73021_x = Lists.newArrayList(new IWorldEventListener[] {this.field_184152_t}); -@@ -116,6 +129,7 @@ + this.field_73021_x = Lists.newArrayList(this.field_184152_t); +@@ -121,6 +134,7 @@ this.field_73011_w = p_i45749_3_; this.field_72995_K = p_i45749_5_; this.field_175728_M = p_i45749_3_.func_177501_r(); @@ -38,7 +38,7 @@ } public World func_175643_b() -@@ -125,6 +139,11 @@ +@@ -130,6 +144,11 @@ public Biome func_180494_b(final BlockPos p_180494_1_) { @@ -50,7 +50,7 @@ if (this.func_175667_e(p_180494_1_)) { Chunk chunk = this.func_175726_f(p_180494_1_); -@@ -201,7 +220,7 @@ +@@ -206,7 +225,7 @@ public boolean func_175623_d(BlockPos p_175623_1_) { @@ -59,7 +59,7 @@ } public boolean func_175667_e(BlockPos p_175667_1_) -@@ -302,24 +321,50 @@ +@@ -307,24 +326,50 @@ else { Chunk chunk = this.func_175726_f(p_180501_1_); @@ -113,7 +113,7 @@ this.func_184138_a(p_180501_1_, iblockstate, p_180501_2_, p_180501_3_); } -@@ -336,8 +381,6 @@ +@@ -341,8 +386,6 @@ { this.func_190522_c(p_180501_1_, block); } @@ -122,7 +122,7 @@ } } } -@@ -352,7 +395,7 @@ +@@ -357,7 +400,7 @@ IBlockState iblockstate = this.func_180495_p(p_175655_1_); Block block = iblockstate.func_177230_c(); @@ -131,7 +131,7 @@ { return false; } -@@ -435,6 +478,9 @@ +@@ -440,6 +483,9 @@ public void func_175685_c(BlockPos p_175685_1_, Block p_175685_2_, boolean p_175685_3_) { @@ -141,7 +141,7 @@ 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 @@ +@@ -455,6 +501,11 @@ public void func_175695_a(BlockPos p_175695_1_, Block p_175695_2_, EnumFacing p_175695_3_) { @@ -153,7 +153,7 @@ if (p_175695_3_ != EnumFacing.WEST) { this.func_190524_a(p_175695_1_.func_177976_e(), p_175695_2_, p_175695_1_); -@@ -521,11 +572,11 @@ +@@ -526,11 +577,11 @@ { IBlockState iblockstate = this.func_180495_p(p_190529_1_); @@ -167,16 +167,16 @@ } catch (Throwable throwable) { -@@ -582,7 +633,7 @@ +@@ -587,7 +638,7 @@ { - IBlockState iblockstate = this.func_180495_p(blockpos); + IBlockState iblockstate = this.func_180495_p(blockpos1); - if (iblockstate.func_185891_c() > 0 && !iblockstate.func_185904_a().func_76224_d()) + if (iblockstate.func_177230_c().getLightOpacity(iblockstate, this, blockpos) > 0 && !iblockstate.func_185904_a().func_76224_d()) { return false; } -@@ -856,7 +907,7 @@ +@@ -861,7 +912,7 @@ public boolean func_72935_r() { @@ -185,7 +185,7 @@ } @Nullable -@@ -1059,6 +1110,13 @@ +@@ -1064,6 +1115,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_) { @@ -199,7 +199,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_); -@@ -1112,6 +1170,9 @@ +@@ -1117,6 +1175,9 @@ public boolean func_72838_d(Entity p_72838_1_) { @@ -209,7 +209,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; -@@ -1134,6 +1195,8 @@ +@@ -1139,6 +1200,8 @@ this.func_72854_c(); } @@ -218,7 +218,7 @@ 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_); -@@ -1262,6 +1325,7 @@ +@@ -1267,6 +1330,7 @@ } iblockstate1.func_185908_a(this, blockpos$pooledmutableblockpos, p_191504_2_, p_191504_4_, p_191504_1_, false); @@ -226,7 +226,7 @@ if (p_191504_3_ && !p_191504_4_.isEmpty()) { -@@ -1313,11 +1377,10 @@ +@@ -1318,11 +1382,10 @@ } } } @@ -239,7 +239,7 @@ public void func_72848_b(IWorldEventListener p_72848_1_) { this.field_73021_x.remove(p_72848_1_); -@@ -1355,19 +1418,38 @@ +@@ -1360,19 +1423,38 @@ public int func_72967_a(float p_72967_1_) { @@ -280,7 +280,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); -@@ -1380,6 +1462,12 @@ +@@ -1385,6 +1467,12 @@ @SideOnly(Side.CLIENT) public Vec3d func_72833_a(Entity p_72833_1_, float p_72833_2_) { @@ -293,7 +293,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); -@@ -1387,9 +1475,7 @@ +@@ -1392,9 +1480,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); @@ -304,7 +304,7 @@ float f3 = (float)(l >> 16 & 255) / 255.0F; float f4 = (float)(l >> 8 & 255) / 255.0F; float f5 = (float)(l & 255) / 255.0F; -@@ -1438,20 +1524,25 @@ +@@ -1443,20 +1529,25 @@ public float func_72826_c(float p_72826_1_) { @@ -333,7 +333,7 @@ public float func_72929_e(float p_72929_1_) { float f = this.func_72826_c(p_72929_1_); -@@ -1461,6 +1552,12 @@ +@@ -1466,6 +1557,12 @@ @SideOnly(Side.CLIENT) public Vec3d func_72824_f(float p_72824_1_) { @@ -346,7 +346,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); -@@ -1516,9 +1613,9 @@ +@@ -1521,9 +1618,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(); @@ -358,7 +358,7 @@ { break; } -@@ -1530,6 +1627,12 @@ +@@ -1535,6 +1632,12 @@ @SideOnly(Side.CLIENT) public float func_72880_h(float p_72880_1_) { @@ -371,7 +371,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); -@@ -1564,6 +1667,7 @@ +@@ -1569,6 +1672,7 @@ try { @@ -379,7 +379,7 @@ ++entity.field_70173_aa; entity.func_70071_h_(); } -@@ -1581,6 +1685,12 @@ +@@ -1586,6 +1690,12 @@ entity.func_85029_a(crashreportcategory); } @@ -392,7 +392,7 @@ throw new ReportedException(crashreport); } -@@ -1642,6 +1752,12 @@ +@@ -1647,6 +1757,12 @@ CrashReport crashreport1 = CrashReport.func_85055_a(throwable1, "Ticking entity"); CrashReportCategory crashreportcategory1 = crashreport1.func_85058_a("Entity being ticked"); entity2.func_85029_a(crashreportcategory1); @@ -405,7 +405,7 @@ throw new ReportedException(crashreport1); } } -@@ -1678,11 +1794,11 @@ +@@ -1683,11 +1799,11 @@ { BlockPos blockpos = tileentity.func_174877_v(); @@ -419,7 +419,7 @@ ((ITickable)tileentity).func_73660_a(); this.field_72984_F.func_76319_b(); } -@@ -1691,6 +1807,13 @@ +@@ -1696,6 +1812,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); @@ -433,7 +433,7 @@ throw new ReportedException(crashreport2); } } -@@ -1703,20 +1826,28 @@ +@@ -1708,20 +1831,28 @@ if (this.func_175667_e(tileentity.func_174877_v())) { @@ -465,7 +465,7 @@ this.field_72984_F.func_76318_c("pendingBlockEntities"); if (!this.field_147484_a.isEmpty()) -@@ -1755,12 +1886,18 @@ +@@ -1760,12 +1891,18 @@ public boolean func_175700_a(TileEntity p_175700_1_) { @@ -484,7 +484,7 @@ if (this.field_72995_K) { -@@ -1776,6 +1913,11 @@ +@@ -1781,6 +1918,11 @@ { if (this.field_147481_N) { @@ -496,30 +496,30 @@ this.field_147484_a.addAll(p_147448_1_); } else -@@ -1796,9 +1938,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); -- int k = 32; -+ boolean isForced = getPersistentChunks().containsKey(new net.minecraft.util.math.ChunkPos(i >> 4, j >> 4)); -+ int k = isForced ? 0 : 32; -+ boolean canUpdate = !p_72866_2_ || this.func_175663_a(i - k, 0, j - k, i + k, 0, j + k, true); -+ if (!canUpdate) canUpdate = net.minecraftforge.event.ForgeEventFactory.canEntityUpdate(p_72866_1_); - -- if (!p_72866_2_ || this.func_175663_a(i - 32, 0, j - 32, i + 32, 0, j + 32, true)) -+ if (canUpdate) +@@ -1803,9 +1945,12 @@ { - p_72866_1_.field_70142_S = p_72866_1_.field_70165_t; - p_72866_1_.field_70137_T = p_72866_1_.field_70163_u; -@@ -1816,6 +1961,7 @@ - } - else - { -+ if(!p_72866_1_.updateBlocked) - p_72866_1_.func_70071_h_(); - } + int i = MathHelper.func_76128_c(p_72866_1_.field_70165_t); + int j = MathHelper.func_76128_c(p_72866_1_.field_70161_v); +- int k = 32; ++ boolean isForced = getPersistentChunks().containsKey(new net.minecraft.util.math.ChunkPos(i >> 4, j >> 4)); ++ int k = isForced ? 0 : 32; ++ boolean canUpdate = !p_72866_2_ || this.func_175663_a(i - k, 0, j - k, i + k, 0, j + k, true); ++ if (!canUpdate) canUpdate = net.minecraftforge.event.ForgeEventFactory.canEntityUpdate(p_72866_1_); + +- if (p_72866_2_ && !this.func_175663_a(i - 32, 0, j - 32, i + 32, 0, j + 32, true)) ++ if (!canUpdate) + { + return; } -@@ -1997,6 +2143,11 @@ +@@ -1827,6 +1972,7 @@ + } + else + { ++ if(!p_72866_1_.updateBlocked) + p_72866_1_.func_70071_h_(); + } + } +@@ -2007,6 +2153,11 @@ blockpos$pooledmutableblockpos.func_185344_t(); return true; } @@ -531,7 +531,7 @@ } } } -@@ -2036,6 +2187,16 @@ +@@ -2046,6 +2197,16 @@ IBlockState iblockstate = this.func_180495_p(blockpos$pooledmutableblockpos); Block block = iblockstate.func_177230_c(); @@ -548,7 +548,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())); -@@ -2102,6 +2263,7 @@ +@@ -2112,6 +2273,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_); @@ -556,7 +556,7 @@ explosion.func_77278_a(); explosion.func_77279_a(true); return explosion; -@@ -2224,6 +2386,7 @@ +@@ -2234,6 +2396,7 @@ public void func_175690_a(BlockPos p_175690_1_, @Nullable TileEntity p_175690_2_) { @@ -564,7 +564,7 @@ if (!this.func_189509_E(p_175690_1_)) { if (p_175690_2_ != null && !p_175690_2_.func_145837_r()) -@@ -2231,6 +2394,8 @@ +@@ -2241,6 +2404,8 @@ if (this.field_147481_N) { p_175690_2_.func_174878_a(p_175690_1_); @@ -573,7 +573,7 @@ Iterator iterator = this.field_147484_a.iterator(); while (iterator.hasNext()) -@@ -2248,7 +2413,8 @@ +@@ -2258,7 +2423,8 @@ } else { @@ -583,7 +583,7 @@ this.func_175700_a(p_175690_2_); } } -@@ -2263,6 +2429,8 @@ +@@ -2273,6 +2439,8 @@ { tileentity.func_145843_s(); this.field_147484_a.remove(tileentity); @@ -592,7 +592,7 @@ } else { -@@ -2275,6 +2443,7 @@ +@@ -2285,6 +2453,7 @@ this.func_175726_f(p_175713_1_).func_177425_e(p_175713_1_); } @@ -600,7 +600,7 @@ } public void func_147457_a(TileEntity p_147457_1_) -@@ -2301,7 +2470,7 @@ +@@ -2311,7 +2480,7 @@ if (chunk != null && !chunk.func_76621_g()) { IBlockState iblockstate = this.func_180495_p(p_175677_1_); @@ -609,7 +609,7 @@ } else { -@@ -2324,6 +2493,7 @@ +@@ -2334,6 +2503,7 @@ { this.field_72985_G = p_72891_1_; this.field_72992_H = p_72891_2_; @@ -617,7 +617,7 @@ } public void func_72835_b() -@@ -2333,6 +2503,11 @@ +@@ -2343,6 +2513,11 @@ protected void func_72947_a() { @@ -629,7 +629,7 @@ if (this.field_72986_A.func_76059_o()) { this.field_73004_o = 1.0F; -@@ -2346,6 +2521,11 @@ +@@ -2356,6 +2531,11 @@ protected void func_72979_l() { @@ -641,7 +641,7 @@ if (this.field_73011_w.func_191066_m()) { if (!this.field_72995_K) -@@ -2470,6 +2650,11 @@ +@@ -2480,6 +2660,11 @@ public boolean func_175670_e(BlockPos p_175670_1_, boolean p_175670_2_) { @@ -653,7 +653,7 @@ Biome biome = this.func_180494_b(p_175670_1_); float f = biome.func_180626_a(p_175670_1_); -@@ -2511,6 +2696,11 @@ +@@ -2521,6 +2706,11 @@ public boolean func_175708_f(BlockPos p_175708_1_, boolean p_175708_2_) { @@ -665,7 +665,7 @@ Biome biome = this.func_180494_b(p_175708_1_); float f = biome.func_180626_a(p_175708_1_); -@@ -2528,7 +2718,7 @@ +@@ -2538,7 +2728,7 @@ { IBlockState iblockstate = this.func_180495_p(p_175708_1_); @@ -674,7 +674,7 @@ { return true; } -@@ -2560,10 +2750,11 @@ +@@ -2570,10 +2760,11 @@ else { IBlockState iblockstate = this.func_180495_p(p_175638_1_); @@ -689,15 +689,7 @@ { j = 1; } -@@ -2597,6 +2788,7 @@ - - if (i >= 14) - { -+ blockpos$pooledmutableblockpos.func_185344_t(); // Forge fix mutable blockpos leak MC-114281 - return i; - } - } -@@ -2662,7 +2854,7 @@ +@@ -2679,7 +2870,7 @@ int j4 = j2 + enumfacing.func_96559_d(); int k4 = k2 + enumfacing.func_82599_e(); blockpos$pooledmutableblockpos.func_181079_c(i4, j4, k4); @@ -706,7 +698,7 @@ i3 = this.func_175642_b(p_180500_1_, blockpos$pooledmutableblockpos); if (i3 == l2 - l4 && j < this.field_72994_J.length) -@@ -2770,10 +2962,10 @@ +@@ -2787,10 +2978,10 @@ public List func_175674_a(@Nullable Entity p_175674_1_, AxisAlignedBB p_175674_2_, @Nullable Predicate p_175674_3_) { List list = Lists.newArrayList(); @@ -721,7 +713,7 @@ for (int i1 = i; i1 <= j; ++i1) { -@@ -2826,10 +3018,10 @@ +@@ -2843,10 +3034,10 @@ public List func_175647_a(Class p_175647_1_, AxisAlignedBB p_175647_2_, @Nullable Predicate p_175647_3_) { @@ -736,7 +728,7 @@ List list = Lists.newArrayList(); for (int i1 = i; i1 < j; ++i1) -@@ -2909,11 +3101,13 @@ +@@ -2926,11 +3117,13 @@ public void func_175650_b(Collection p_175650_1_) { @@ -753,16 +745,16 @@ } } -@@ -2926,7 +3120,7 @@ - { - 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_)); +@@ -2954,7 +3147,7 @@ + } + else + { +- return iblockstate.func_185904_a().func_76222_j() && p_190527_1_.func_176198_a(this, p_190527_2_, p_190527_4_); ++ return 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() -@@ -3009,7 +3203,7 @@ +@@ -3038,7 +3231,7 @@ public int func_175651_c(BlockPos p_175651_1_, EnumFacing p_175651_2_) { IBlockState iblockstate = this.func_180495_p(p_175651_1_); @@ -771,8 +763,8 @@ } public boolean func_175640_z(BlockPos p_175640_1_) -@@ -3152,6 +3346,8 @@ - d2 *= ((Double)Objects.firstNonNull(p_184150_11_.apply(entityplayer1), Double.valueOf(1.0D))).doubleValue(); +@@ -3204,6 +3397,8 @@ + d2 *= ((Double)MoreObjects.firstNonNull(p_184150_11_.apply(entityplayer1), Double.valueOf(1.0D))).doubleValue(); } + d2 = net.minecraftforge.common.ForgeHooks.getPlayerVisibilityDistance(entityplayer1, d2, p_184150_9_); @@ -780,7 +772,7 @@ if ((p_184150_9_ < 0.0D || Math.abs(entityplayer1.field_70163_u - p_184150_3_) < p_184150_9_ * p_184150_9_) && (p_184150_7_ < 0.0D || d1 < d2 * d2) && (d0 == -1.0D || d1 < d0)) { d0 = d1; -@@ -3213,7 +3409,7 @@ +@@ -3265,7 +3460,7 @@ public long func_72905_C() { @@ -789,7 +781,7 @@ } public long func_82737_E() -@@ -3223,17 +3419,17 @@ +@@ -3275,17 +3470,17 @@ public long func_72820_D() { @@ -810,7 +802,7 @@ if (!this.func_175723_af().func_177746_a(blockpos)) { -@@ -3245,7 +3441,7 @@ +@@ -3297,7 +3492,7 @@ public void func_175652_B(BlockPos p_175652_1_) { @@ -819,7 +811,7 @@ } @SideOnly(Side.CLIENT) -@@ -3265,12 +3461,18 @@ +@@ -3317,12 +3512,18 @@ if (!this.field_72996_f.contains(p_72897_1_)) { @@ -838,7 +830,7 @@ return true; } -@@ -3364,8 +3566,7 @@ +@@ -3424,8 +3625,7 @@ public boolean func_180502_D(BlockPos p_180502_1_) { @@ -848,7 +840,7 @@ } @Nullable -@@ -3426,12 +3627,12 @@ +@@ -3486,12 +3686,12 @@ public int func_72800_K() { @@ -863,7 +855,7 @@ } public Random func_72843_D(int p_72843_1_, int p_72843_2_, int p_72843_3_) -@@ -3475,7 +3676,7 @@ +@@ -3535,7 +3735,7 @@ @SideOnly(Side.CLIENT) public double func_72919_O() { @@ -872,7 +864,7 @@ } public void func_175715_c(int p_175715_1_, BlockPos p_175715_2_, int p_175715_3_) -@@ -3509,7 +3710,7 @@ +@@ -3569,7 +3769,7 @@ public void func_175666_e(BlockPos p_175666_1_, Block p_175666_2_) { @@ -881,7 +873,7 @@ { BlockPos blockpos = p_175666_1_.func_177972_a(enumfacing); -@@ -3517,18 +3718,14 @@ +@@ -3577,18 +3777,14 @@ { IBlockState iblockstate = this.func_180495_p(blockpos); @@ -904,7 +896,7 @@ } } } -@@ -3594,6 +3791,115 @@ +@@ -3654,6 +3850,115 @@ return i >= -128 && i <= 128 && j >= -128 && j <= 128; } @@ -1019,4 +1011,4 @@ + public void func_184135_a(Packet p_184135_1_) { - throw new UnsupportedOperationException("Can\'t send packets to server unless you\'re on the client."); + throw new UnsupportedOperationException("Can't send packets to server unless you're on the client."); diff --git a/patches/minecraft/net/minecraft/world/WorldEntitySpawner.java.patch b/patches/minecraft/net/minecraft/world/WorldEntitySpawner.java.patch index fbeb2bff9..0a0621279 100644 --- a/patches/minecraft/net/minecraft/world/WorldEntitySpawner.java.patch +++ b/patches/minecraft/net/minecraft/world/WorldEntitySpawner.java.patch @@ -13,7 +13,7 @@ + java.util.ArrayList shuffled = com.google.common.collect.Lists.newArrayList(this.field_77193_b); + java.util.Collections.shuffle(shuffled); BlockPos.MutableBlockPos blockpos$mutableblockpos = new BlockPos.MutableBlockPos(); - label411: + label134: - for (ChunkPos chunkpos1 : this.field_77193_b) + for (ChunkPos chunkpos1 : shuffled) @@ -24,8 +24,8 @@ try { -- entityliving = (EntityLiving)biome$spawnlistentry.field_76300_b.getConstructor(new Class[] {World.class}).newInstance(new Object[] {p_77192_1_}); -+ entityliving = (EntityLiving)biome$spawnlistentry.newInstance(p_77192_1_); +- entityliving = biome$spawnlistentry.field_76300_b.getConstructor(World.class).newInstance(p_77192_1_); ++ entityliving = biome$spawnlistentry.newInstance(p_77192_1_); } catch (Exception exception) { @@ -48,9 +48,9 @@ - if (j2 >= entityliving.func_70641_bl()) + if (j2 >= net.minecraftforge.event.ForgeEventFactory.getMaxSpawnPackSize(entityliving)) { - continue label411; + continue label134; } -@@ -213,8 +217,9 @@ +@@ -228,8 +232,9 @@ else { BlockPos blockpos = p_180267_2_.func_177977_b(); @@ -61,12 +61,12 @@ { return false; } -@@ -258,7 +263,7 @@ +@@ -273,7 +278,7 @@ try { -- entityliving = (EntityLiving)biome$spawnlistentry.field_76300_b.getConstructor(new Class[] {World.class}).newInstance(new Object[] {p_77191_0_}); -+ entityliving = (EntityLiving)biome$spawnlistentry.newInstance(p_77191_0_); +- entityliving = biome$spawnlistentry.field_76300_b.getConstructor(World.class).newInstance(p_77191_0_); ++ entityliving = biome$spawnlistentry.newInstance(p_77191_0_); } catch (Exception exception) { diff --git a/patches/minecraft/net/minecraft/world/WorldProvider.java.patch b/patches/minecraft/net/minecraft/world/WorldProvider.java.patch index e7c65d495..95b3c3d05 100644 --- a/patches/minecraft/net/minecraft/world/WorldProvider.java.patch +++ b/patches/minecraft/net/minecraft/world/WorldProvider.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/world/WorldProvider.java +++ ../src-work/minecraft/net/minecraft/world/WorldProvider.java -@@ -55,26 +55,12 @@ +@@ -55,37 +55,12 @@ protected void func_76572_b() { this.field_191067_f = true; @@ -19,17 +19,28 @@ - { - this.field_76578_c = new BiomeProvider(this.field_76579_a.func_72912_H()); - } -+ this.field_76578_c = field_76577_b.getBiomeProvider(field_76579_a); ++ this.field_76578_c = this.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); +- if (this.field_76577_b == WorldType.field_77138_c) +- { +- return new ChunkGeneratorFlat(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); +- } +- else if (this.field_76577_b == WorldType.field_180272_g) +- { +- return new ChunkGeneratorDebug(this.field_76579_a); +- } +- else +- { +- return this.field_76577_b == WorldType.field_180271_f ? new ChunkGeneratorOverworld(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 ChunkGeneratorOverworld(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 this.field_76577_b.getChunkGenerator(field_76579_a, field_82913_c); } public boolean func_76566_a(int p_76566_1_, int p_76566_2_) -@@ -160,7 +146,7 @@ +@@ -179,7 +154,7 @@ @SideOnly(Side.CLIENT) public float func_76571_f() { @@ -38,7 +49,7 @@ } @SideOnly(Side.CLIENT) -@@ -177,13 +163,13 @@ +@@ -196,13 +171,13 @@ public int func_76557_i() { @@ -54,7 +65,7 @@ } @SideOnly(Side.CLIENT) -@@ -222,6 +208,339 @@ +@@ -241,6 +216,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 521984aac..6b443bbf3 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 -@@ -97,30 +97,39 @@ +@@ -100,30 +100,39 @@ private int field_147489_T; private final List field_94579_S = Lists.newArrayList(); @@ -43,7 +43,7 @@ } else { -@@ -155,6 +164,7 @@ +@@ -160,6 +169,7 @@ this.func_175723_af().func_177750_a(this.field_72986_A.func_176137_E()); } @@ -51,7 +51,7 @@ return this; } -@@ -173,8 +183,8 @@ +@@ -178,8 +188,8 @@ { if (this.func_82736_K().func_82766_b("doDaylightCycle")) { @@ -62,7 +62,7 @@ } this.func_73053_d(); -@@ -200,7 +210,7 @@ +@@ -205,7 +215,7 @@ if (this.func_82736_K().func_82766_b("doDaylightCycle")) { @@ -71,7 +71,7 @@ } this.field_72984_F.func_76318_c("tickPending"); -@@ -214,6 +224,10 @@ +@@ -219,6 +229,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()); @@ -82,7 +82,7 @@ this.field_72984_F.func_76319_b(); this.func_147488_Z(); } -@@ -222,12 +236,14 @@ +@@ -227,12 +241,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_); @@ -97,7 +97,7 @@ return list != null && !list.isEmpty() ? list.contains(p_175732_2_) : false; } -@@ -276,10 +292,7 @@ +@@ -281,10 +297,7 @@ private void func_73051_P() { @@ -109,7 +109,7 @@ } public boolean func_73056_e() -@@ -372,7 +385,7 @@ +@@ -377,7 +390,7 @@ boolean flag1 = this.func_72911_I(); this.field_72984_F.func_76320_a("pollingChunks"); @@ -117,8 +117,8 @@ + for (Iterator iterator = getPersistentChunkIterable(this.field_73063_M.func_187300_b()); iterator.hasNext(); this.field_72984_F.func_76319_b()) { this.field_72984_F.func_76320_a("getChunk"); - Chunk chunk = (Chunk)iterator.next(); -@@ -384,7 +397,7 @@ + Chunk chunk = iterator.next(); +@@ -389,7 +402,7 @@ chunk.func_150804_b(false); this.field_72984_F.func_76318_c("thunder"); @@ -127,7 +127,7 @@ { this.field_73005_l = this.field_73005_l * 3 + 1013904223; int l = this.field_73005_l >> 2; -@@ -412,7 +425,7 @@ +@@ -417,7 +430,7 @@ this.field_72984_F.func_76318_c("iceandsnow"); @@ -136,7 +136,7 @@ { this.field_73005_l = this.field_73005_l * 3 + 1013904223; int j2 = this.field_73005_l >> 2; -@@ -528,7 +541,10 @@ +@@ -527,7 +540,10 @@ { if (p_175654_2_.func_149698_L()) { @@ -148,15 +148,15 @@ { IBlockState iblockstate = this.func_180495_p(p_175654_1_); -@@ -564,6 +580,7 @@ +@@ -563,6 +579,7 @@ public void func_180497_b(BlockPos p_180497_1_, Block p_180497_2_, int p_180497_3_, int p_180497_4_) { + if (p_180497_2_ == null) return; //Forge: Prevent null blocks from ticking, can happen if blocks are removed in old worlds. TODO: Fix real issue causing block to be null. - if (p_180497_1_ instanceof BlockPos.MutableBlockPos || p_180497_1_ instanceof BlockPos.PooledMutableBlockPos) - { - p_180497_1_ = new BlockPos(p_180497_1_); -@@ -588,7 +605,7 @@ + NextTickListEntry nextticklistentry = new NextTickListEntry(p_180497_1_, p_180497_2_); + nextticklistentry.func_82753_a(p_180497_4_); + Material material = p_180497_2_.func_176223_P().func_185904_a(); +@@ -581,7 +598,7 @@ public void func_72939_s() { @@ -165,9 +165,9 @@ { if (this.field_80004_Q++ >= 300) { -@@ -712,6 +729,9 @@ +@@ -705,6 +722,9 @@ { - NextTickListEntry nextticklistentry1 = (NextTickListEntry)iterator.next(); + NextTickListEntry nextticklistentry1 = iterator.next(); iterator.remove(); + //Keeping here as a note for future when it may be restored. + //boolean isForced = getPersistentChunks().containsKey(new ChunkPos(nextticklistentry.xCoord >> 4, nextticklistentry.zCoord >> 4)); @@ -175,7 +175,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))) -@@ -838,6 +858,10 @@ +@@ -831,6 +851,10 @@ public boolean func_175660_a(EntityPlayer p_175660_1_, BlockPos p_175660_2_) { @@ -186,7 +186,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_); } -@@ -903,6 +927,7 @@ +@@ -896,6 +920,7 @@ } else { @@ -194,7 +194,7 @@ this.field_72987_B = true; BiomeProvider biomeprovider = this.field_73011_w.func_177499_m(); List list = biomeprovider.func_76932_a(); -@@ -988,6 +1013,7 @@ +@@ -981,6 +1006,7 @@ } chunkproviderserver.func_186027_a(p_73044_1_); @@ -202,7 +202,7 @@ for (Chunk chunk : Lists.newArrayList(chunkproviderserver.func_189548_a())) { -@@ -1032,6 +1058,7 @@ +@@ -1025,6 +1051,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(); @@ -210,7 +210,7 @@ } public boolean func_72838_d(Entity p_72838_1_) -@@ -1043,7 +1070,7 @@ +@@ -1036,7 +1063,7 @@ { for (Entity entity : Lists.newArrayList(p_175650_1_)) { @@ -219,7 +219,7 @@ { this.field_72996_f.add(entity); this.func_72923_a(entity); -@@ -1124,7 +1151,7 @@ +@@ -1117,7 +1144,7 @@ { if (super.func_72942_c(p_72942_1_)) { @@ -228,7 +228,7 @@ return true; } else -@@ -1146,6 +1173,7 @@ +@@ -1139,6 +1166,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_); @@ -236,7 +236,7 @@ explosion.func_77278_a(); explosion.func_77279_a(false); -@@ -1191,7 +1219,7 @@ +@@ -1184,7 +1212,7 @@ { if (this.func_147485_a(blockeventdata)) { @@ -245,7 +245,7 @@ } } -@@ -1217,27 +1245,31 @@ +@@ -1210,27 +1238,31 @@ if (this.field_73003_n != this.field_73004_o) { @@ -283,8 +283,8 @@ } } -@@ -1322,6 +1354,11 @@ - return this.func_72863_F().func_180513_a(this, p_190528_1_, p_190528_2_, p_190528_3_); +@@ -1325,6 +1357,11 @@ + return this.field_193036_D; } + public java.io.File getChunkSaveLocation() diff --git a/patches/minecraft/net/minecraft/world/WorldServerMulti.java.patch b/patches/minecraft/net/minecraft/world/WorldServerMulti.java.patch index 121f7da8f..c31730313 100644 --- a/patches/minecraft/net/minecraft/world/WorldServerMulti.java.patch +++ b/patches/minecraft/net/minecraft/world/WorldServerMulti.java.patch @@ -30,9 +30,9 @@ } public World func_175643_b() -@@ -59,12 +62,12 @@ - this.field_96442_D = this.field_175743_a.func_96441_U(); +@@ -60,12 +63,12 @@ this.field_184151_B = this.field_175743_a.func_184146_ak(); + this.field_191951_C = this.field_175743_a.func_191952_z(); String s = VillageCollection.func_176062_a(this.field_73011_w); - VillageCollection villagecollection = (VillageCollection)this.field_72988_C.func_75742_a(VillageCollection.class, s); + VillageCollection villagecollection = (VillageCollection)this.perWorldStorage.func_75742_a(VillageCollection.class, s); @@ -45,7 +45,7 @@ } else { -@@ -72,9 +75,18 @@ +@@ -73,9 +76,18 @@ this.field_72982_D.func_82566_a(this); } diff --git a/patches/minecraft/net/minecraft/world/WorldType.java.patch b/patches/minecraft/net/minecraft/world/WorldType.java.patch index 5acbd325e..28bfd1c32 100644 --- a/patches/minecraft/net/minecraft/world/WorldType.java.patch +++ b/patches/minecraft/net/minecraft/world/WorldType.java.patch @@ -30,12 +30,12 @@ + } + } + -+ public net.minecraft.world.chunk.IChunkGenerator getChunkGenerator(World world, String generatorOptions) ++ public net.minecraft.world.gen.IChunkGenerator getChunkGenerator(World world, String generatorOptions) + { -+ if (this == field_77138_c) return new net.minecraft.world.gen.ChunkProviderFlat(world, world.func_72905_C(), world.func_72912_H().func_76089_r(), generatorOptions); -+ if (this == field_180272_g) return new net.minecraft.world.gen.ChunkProviderDebug(world); -+ if (this == field_180271_f) return new net.minecraft.world.gen.ChunkProviderOverworld(world, world.func_72905_C(), world.func_72912_H().func_76089_r(), generatorOptions); -+ return new net.minecraft.world.gen.ChunkProviderOverworld(world, world.func_72905_C(), world.func_72912_H().func_76089_r(), generatorOptions); ++ if (this == field_77138_c) return new net.minecraft.world.gen.ChunkGeneratorFlat(world, world.func_72905_C(), world.func_72912_H().func_76089_r(), generatorOptions); ++ if (this == field_180272_g) return new net.minecraft.world.gen.ChunkGeneratorDebug(world); ++ if (this == field_180271_f) return new net.minecraft.world.gen.ChunkGeneratorOverworld(world, world.func_72905_C(), world.func_72912_H().func_76089_r(), generatorOptions); ++ return new net.minecraft.world.gen.ChunkGeneratorOverworld(world, world.func_72905_C(), world.func_72912_H().func_76089_r(), generatorOptions); + } + + public int getMinimumSpawnHeight(World world) @@ -143,12 +143,12 @@ + * + * @param worldSeed The world seed + * @param parentLayer The parent layer to feed into any layer you return -+ * @param chunkProviderSettings The ChunkProviderSettings constructed from the custom JSON ++ * @param chunkSettings The ChunkGeneratorSettings 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, net.minecraft.world.gen.ChunkProviderSettings chunkProviderSettings) ++ public net.minecraft.world.gen.layer.GenLayer getBiomeLayer(long worldSeed, net.minecraft.world.gen.layer.GenLayer parentLayer, net.minecraft.world.gen.ChunkGeneratorSettings chunkSettings) + { -+ net.minecraft.world.gen.layer.GenLayer ret = new net.minecraft.world.gen.layer.GenLayerBiome(200L, parentLayer, this, chunkProviderSettings); ++ net.minecraft.world.gen.layer.GenLayer ret = new net.minecraft.world.gen.layer.GenLayerBiome(200L, parentLayer, this, chunkSettings); + 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 e31392c29..e8ff693f8 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 -@@ -53,7 +53,7 @@ +@@ -50,7 +50,7 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -9,16 +9,16 @@ { private static final Logger field_150586_aC = LogManager.getLogger(); protected static final IBlockState field_185365_a = Blocks.field_150348_b.func_176223_P(); -@@ -72,7 +72,7 @@ +@@ -68,7 +68,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(); -- public static final RegistryNamespaced field_185377_q = new RegistryNamespaced(); +- public static final RegistryNamespaced field_185377_q = new RegistryNamespaced(); + public static final RegistryNamespaced field_185377_q = net.minecraftforge.fml.common.registry.GameData.getBiomeRegistry(); private final String field_76791_y; private final float field_76748_D; private final float field_76749_E; -@@ -90,6 +90,8 @@ +@@ -86,6 +86,8 @@ protected List field_76762_K = Lists.newArrayList(); protected List field_76755_L = Lists.newArrayList(); protected List field_82914_M = Lists.newArrayList(); @@ -27,7 +27,7 @@ public static int func_185362_a(Biome p_185362_0_) { -@@ -134,11 +136,12 @@ +@@ -130,11 +132,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)); @@ -41,7 +41,7 @@ } public boolean func_185363_b() -@@ -182,7 +185,9 @@ +@@ -178,7 +181,9 @@ case AMBIENT: return this.field_82914_M; default: @@ -52,7 +52,7 @@ } } -@@ -234,7 +239,7 @@ +@@ -230,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); @@ -61,7 +61,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_) -@@ -327,7 +332,7 @@ +@@ -323,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); @@ -70,7 +70,7 @@ } public Class func_150562_l() -@@ -385,7 +390,7 @@ +@@ -389,7 +394,7 @@ @SideOnly(Side.CLIENT) public final int func_185361_o() { @@ -79,7 +79,7 @@ } public final boolean func_150559_j() -@@ -393,6 +398,83 @@ +@@ -397,6 +402,83 @@ return this.field_76766_R; } @@ -163,7 +163,7 @@ public static void func_185358_q() { func_185354_a(0, "ocean", new BiomeOcean((new Biome.BiomeProperties("Ocean")).func_185398_c(-1.0F).func_185400_d(0.1F))); -@@ -549,6 +631,7 @@ +@@ -552,6 +634,7 @@ public Class field_76300_b; public int field_76301_c; public int field_76299_d; @@ -171,7 +171,7 @@ public SpawnListEntry(Class p_i1970_1_, int p_i1970_2_, int p_i1970_3_, int p_i1970_4_) { -@@ -556,12 +639,28 @@ +@@ -559,12 +642,28 @@ this.field_76300_b = p_i1970_1_; this.field_76301_c = p_i1970_3_; this.field_76299_d = p_i1970_4_; diff --git a/patches/minecraft/net/minecraft/world/biome/BiomeForest.java.patch b/patches/minecraft/net/minecraft/world/biome/BiomeForest.java.patch index e54aa1460..fcc210f25 100644 --- a/patches/minecraft/net/minecraft/world/biome/BiomeForest.java.patch +++ b/patches/minecraft/net/minecraft/world/biome/BiomeForest.java.patch @@ -18,7 +18,7 @@ } public WorldGenAbstractTree func_150567_a(Random p_150567_1_) -@@ -74,6 +85,8 @@ +@@ -85,6 +96,8 @@ this.func_185379_b(p_180624_1_, p_180624_2_, p_180624_3_); } @@ -27,7 +27,7 @@ int i = p_180624_2_.nextInt(5) - 3; if (this.field_150632_aF == BiomeForest.Type.FLOWER) -@@ -82,11 +95,13 @@ +@@ -93,11 +106,13 @@ } this.func_185378_a(p_180624_1_, p_180624_2_, p_180624_3_, i); @@ -41,7 +41,7 @@ for (int i = 0; i < 4; ++i) { for (int j = 0; j < 4; ++j) -@@ -95,12 +110,12 @@ +@@ -106,12 +121,12 @@ int l = j * 4 + 1 + 8 + p_185379_2_.nextInt(3); BlockPos blockpos = p_185379_1_.func_175645_m(p_185379_3_.func_177982_a(k, 0, l)); diff --git a/patches/minecraft/net/minecraft/world/biome/BiomeHills.java.patch b/patches/minecraft/net/minecraft/world/biome/BiomeHills.java.patch index 637f99e98..b516c9383 100644 --- a/patches/minecraft/net/minecraft/world/biome/BiomeHills.java.patch +++ b/patches/minecraft/net/minecraft/world/biome/BiomeHills.java.patch @@ -1,42 +1,41 @@ --- ../src-base/minecraft/net/minecraft/world/biome/BiomeHills.java +++ ../src-work/minecraft/net/minecraft/world/biome/BiomeHills.java -@@ -39,28 +39,20 @@ +@@ -39,28 +39,21 @@ 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_); - int i = 3 + p_180624_2_.nextInt(6); + +- for (int j = 0; j < i; ++j) +- { +- int k = p_180624_2_.nextInt(16); +- int l = p_180624_2_.nextInt(28) + 4; +- int i1 = p_180624_2_.nextInt(16); +- BlockPos blockpos = p_180624_3_.func_177982_a(k, l, i1); + net.minecraftforge.common.MinecraftForge.ORE_GEN_BUS.post(new net.minecraftforge.event.terraingen.OreGenEvent.Pre(p_180624_1_, p_180624_2_, p_180624_3_)); + WorldGenerator emeralds = new EmeraldGenerator(); + if (net.minecraftforge.event.terraingen.TerrainGen.generateOre(p_180624_1_, p_180624_2_, emeralds, p_180624_3_, net.minecraftforge.event.terraingen.OreGenEvent.GenerateMinable.EventType.EMERALD)) + emeralds.func_180709_b(p_180624_1_, p_180624_2_, p_180624_3_); -- for (int j = 0; j < i; ++j) -+ for (int i = 0; i < 7; ++i) - { -- int k = p_180624_2_.nextInt(16); -- int l = p_180624_2_.nextInt(28) + 4; -- int i1 = p_180624_2_.nextInt(16); -- BlockPos blockpos = p_180624_3_.func_177982_a(k, l, i1); -- - if (p_180624_1_.func_180495_p(blockpos).func_177230_c() == Blocks.field_150348_b) - { - p_180624_1_.func_180501_a(blockpos, Blocks.field_150412_bA.func_176223_P(), 2); - } - } - -- for (i = 0; i < 7; ++i) -- { - int j1 = p_180624_2_.nextInt(16); - int k1 = p_180624_2_.nextInt(64); - int l1 = p_180624_2_.nextInt(16); + for (int j1 = 0; j1 < 7; ++j1) + { + int k1 = p_180624_2_.nextInt(16); + int l1 = p_180624_2_.nextInt(64); + int i2 = p_180624_2_.nextInt(16); + if (net.minecraftforge.event.terraingen.TerrainGen.generateOre(p_180624_1_, p_180624_2_, field_82915_S, p_180624_3_.func_177982_a(j1, k1, l1), net.minecraftforge.event.terraingen.OreGenEvent.GenerateMinable.EventType.SILVERFISH)) - this.field_82915_S.func_180709_b(p_180624_1_, p_180624_2_, p_180624_3_.func_177982_a(j1, k1, l1)); + this.field_82915_S.func_180709_b(p_180624_1_, p_180624_2_, p_180624_3_.func_177982_a(k1, l1, i2)); } + net.minecraftforge.common.MinecraftForge.ORE_GEN_BUS.post(new net.minecraftforge.event.terraingen.OreGenEvent.Post(p_180624_1_, p_180624_2_, p_180624_3_)); } 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_) -@@ -88,4 +80,24 @@ +@@ -88,4 +81,24 @@ EXTRA_TREES, MUTATED; } diff --git a/patches/minecraft/net/minecraft/world/biome/BiomeJungle.java.patch b/patches/minecraft/net/minecraft/world/biome/BiomeJungle.java.patch index f4fcbcdf5..05acdf088 100644 --- a/patches/minecraft/net/minecraft/world/biome/BiomeJungle.java.patch +++ b/patches/minecraft/net/minecraft/world/biome/BiomeJungle.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/world/biome/BiomeJungle.java +++ ../src-work/minecraft/net/minecraft/world/biome/BiomeJungle.java -@@ -68,10 +68,14 @@ +@@ -81,10 +81,14 @@ super.func_180624_a(p_180624_1_, p_180624_2_, p_180624_3_); int i = p_180624_2_.nextInt(16) + 8; int j = p_180624_2_.nextInt(16) + 8; @@ -13,6 +13,6 @@ WorldGenVines worldgenvines = new WorldGenVines(); + if(net.minecraftforge.event.terraingen.TerrainGen.decorate(p_180624_1_, p_180624_2_, p_180624_3_, net.minecraftforge.event.terraingen.DecorateBiomeEvent.Decorate.EventType.GRASS)) - for (j = 0; j < 50; ++j) + for (int j1 = 0; j1 < 50; ++j1) { k = p_180624_2_.nextInt(16) + 8; diff --git a/patches/minecraft/net/minecraft/world/biome/BiomePlains.java.patch b/patches/minecraft/net/minecraft/world/biome/BiomePlains.java.patch index 4d2396deb..a6795d00c 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 -@@ -72,6 +72,7 @@ +@@ -80,6 +80,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; -@@ -81,7 +82,7 @@ +@@ -89,7 +90,7 @@ } } @@ -17,7 +17,7 @@ { field_180280_ag.func_180710_a(BlockDoublePlant.EnumPlantType.SUNFLOWER); -@@ -97,6 +98,21 @@ +@@ -105,6 +106,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 e1526b132..2506b7829 100644 --- a/patches/minecraft/net/minecraft/world/biome/BiomeProvider.java.patch +++ b/patches/minecraft/net/minecraft/world/biome/BiomeProvider.java.patch @@ -1,20 +1,20 @@ --- ../src-base/minecraft/net/minecraft/world/biome/BiomeProvider.java +++ ../src-work/minecraft/net/minecraft/world/biome/BiomeProvider.java -@@ -22,11 +22,11 @@ +@@ -22,11 +22,12 @@ private GenLayer field_76945_e; private final BiomeCache field_76942_f; 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); -- this.field_76943_g = Lists.newArrayList(new Biome[] {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}); +- this.field_76943_g = 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); + this.field_76943_g = Lists.newArrayList(allowedBiomes); } private BiomeProvider(long p_i45744_1_, WorldType p_i45744_3_, String p_i45744_4_) -@@ -39,6 +39,7 @@ +@@ -39,6 +40,7 @@ } GenLayer[] agenlayer = GenLayer.func_180781_a(p_i45744_1_, p_i45744_3_, this.field_190945_a); @@ -22,7 +22,7 @@ this.field_76944_d = agenlayer[0]; this.field_76945_e = agenlayer[1]; } -@@ -207,6 +208,13 @@ +@@ -207,6 +209,13 @@ this.field_76942_f.func_76838_a(); } diff --git a/patches/minecraft/net/minecraft/world/biome/BiomeTaiga.java.patch b/patches/minecraft/net/minecraft/world/biome/BiomeTaiga.java.patch index 2a6be6db1..51fc965ba 100644 --- a/patches/minecraft/net/minecraft/world/biome/BiomeTaiga.java.patch +++ b/patches/minecraft/net/minecraft/world/biome/BiomeTaiga.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/world/biome/BiomeTaiga.java +++ ../src-work/minecraft/net/minecraft/world/biome/BiomeTaiga.java -@@ -60,7 +60,7 @@ +@@ -67,7 +67,7 @@ public void func_180624_a(World p_180624_1_, Random p_180624_2_, BlockPos p_180624_3_) { @@ -9,7 +9,7 @@ { int i = p_180624_2_.nextInt(3); -@@ -75,6 +75,7 @@ +@@ -82,6 +82,7 @@ field_180280_ag.func_180710_a(BlockDoublePlant.EnumPlantType.FERN); diff --git a/patches/minecraft/net/minecraft/world/border/WorldBorder.java.patch b/patches/minecraft/net/minecraft/world/border/WorldBorder.java.patch index 6c9214f8e..fea866e4c 100644 --- a/patches/minecraft/net/minecraft/world/border/WorldBorder.java.patch +++ b/patches/minecraft/net/minecraft/world/border/WorldBorder.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/world/border/WorldBorder.java +++ ../src-work/minecraft/net/minecraft/world/border/WorldBorder.java -@@ -277,4 +277,9 @@ +@@ -284,4 +284,9 @@ iborderlistener.func_177690_b(this, p_177747_1_); } } diff --git a/patches/minecraft/net/minecraft/world/chunk/Chunk.java.patch b/patches/minecraft/net/minecraft/world/chunk/Chunk.java.patch index 5c03995ce..23b998d58 100644 --- a/patches/minecraft/net/minecraft/world/chunk/Chunk.java.patch +++ b/patches/minecraft/net/minecraft/world/chunk/Chunk.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/world/chunk/Chunk.java +++ ../src-work/minecraft/net/minecraft/world/chunk/Chunk.java -@@ -178,7 +178,7 @@ +@@ -179,7 +179,7 @@ { IBlockState iblockstate = this.func_186032_a(j, l - 1, k); @@ -9,7 +9,7 @@ { this.field_76634_f[k << 4 | j] = l; -@@ -451,12 +451,13 @@ +@@ -452,12 +452,13 @@ public int func_177437_b(BlockPos p_177437_1_) { @@ -25,7 +25,7 @@ } public IBlockState func_177435_g(BlockPos p_177435_1_) -@@ -538,6 +539,7 @@ +@@ -539,6 +540,7 @@ { Block block = p_177436_2_.func_177230_c(); Block block1 = iblockstate.func_177230_c(); @@ -33,7 +33,7 @@ ExtendedBlockStorage extendedblockstorage = this.field_76652_q[j >> 4]; boolean flag = false; -@@ -555,14 +557,19 @@ +@@ -556,14 +558,19 @@ extendedblockstorage.func_177484_a(i, j & 15, k, p_177436_2_); @@ -55,7 +55,7 @@ this.field_76637_e.func_175713_t(p_177436_1_); } } -@@ -579,8 +586,7 @@ +@@ -580,8 +587,7 @@ } else { @@ -65,7 +65,7 @@ if (j1 > 0) { -@@ -600,28 +606,19 @@ +@@ -601,28 +607,19 @@ } } @@ -98,7 +98,7 @@ this.field_76637_e.func_175690_a(p_177436_1_, tileentity1); } -@@ -725,6 +722,7 @@ +@@ -738,6 +735,7 @@ k = this.field_76645_j.length - 1; } @@ -106,7 +106,7 @@ p_76612_1_.field_70175_ag = true; p_76612_1_.field_70176_ah = this.field_76635_g; p_76612_1_.field_70162_ai = k; -@@ -765,7 +763,7 @@ +@@ -778,7 +776,7 @@ { IBlockState iblockstate = this.func_177435_g(p_177422_1_); Block block = iblockstate.func_177230_c(); @@ -115,9 +115,9 @@ } @Nullable -@@ -773,6 +771,12 @@ +@@ -786,6 +784,12 @@ { - TileEntity tileentity = (TileEntity)this.field_150816_i.get(p_177424_1_); + TileEntity tileentity = this.field_150816_i.get(p_177424_1_); + if (tileentity != null && tileentity.func_145837_r()) + { @@ -128,7 +128,7 @@ if (tileentity == null) { if (p_177424_2_ == Chunk.EnumCreateEntityType.IMMEDIATE) -@@ -782,14 +786,9 @@ +@@ -795,14 +799,9 @@ } else if (p_177424_2_ == Chunk.EnumCreateEntityType.QUEUED) { @@ -144,7 +144,7 @@ return tileentity; } -@@ -806,10 +805,11 @@ +@@ -819,10 +818,11 @@ public void func_177426_a(BlockPos p_177426_1_, TileEntity p_177426_2_) { @@ -157,7 +157,7 @@ { if (this.field_150816_i.containsKey(p_177426_1_)) { -@@ -841,8 +841,9 @@ +@@ -854,8 +854,9 @@ for (ClassInheritanceMultiMap classinheritancemultimap : this.field_76645_j) { @@ -168,7 +168,7 @@ } public void func_76623_d() -@@ -858,6 +859,7 @@ +@@ -871,6 +872,7 @@ { this.field_76637_e.func_175681_c(classinheritancemultimap); } @@ -176,7 +176,7 @@ } public void func_76630_e() -@@ -867,8 +869,8 @@ +@@ -880,8 +882,8 @@ public void func_177414_a(@Nullable Entity p_177414_1_, AxisAlignedBB p_177414_2_, List p_177414_3_, Predicate p_177414_4_) { @@ -187,7 +187,7 @@ i = MathHelper.func_76125_a(i, 0, this.field_76645_j.length - 1); j = MathHelper.func_76125_a(j, 0, this.field_76645_j.length - 1); -@@ -905,8 +907,8 @@ +@@ -918,8 +920,8 @@ public void func_177430_a(Class p_177430_1_, AxisAlignedBB p_177430_2_, List p_177430_3_, Predicate p_177430_4_) { @@ -198,7 +198,7 @@ i = MathHelper.func_76125_a(i, 0, this.field_76645_j.length - 1); j = MathHelper.func_76125_a(j, 0, this.field_76645_j.length - 1); -@@ -984,6 +986,8 @@ +@@ -997,6 +999,8 @@ protected void func_186034_a(IChunkGenerator p_186034_1_) { @@ -207,7 +207,7 @@ if (this.func_177419_t()) { if (p_186034_1_.func_185933_a(this, this.field_76635_g, this.field_76647_h)) -@@ -995,8 +999,10 @@ +@@ -1008,8 +1012,10 @@ { this.func_150809_p(); p_186034_1_.func_185931_b(this.field_76635_g, this.field_76647_h); @@ -218,16 +218,16 @@ } public BlockPos func_177440_h(BlockPos p_177440_1_) -@@ -1051,7 +1057,7 @@ +@@ -1064,7 +1070,7 @@ { - BlockPos blockpos = (BlockPos)this.field_177447_w.poll(); + BlockPos blockpos = this.field_177447_w.poll(); - if (this.func_177424_a(blockpos, Chunk.EnumCreateEntityType.CHECK) == null && this.func_177435_g(blockpos).func_177230_c().func_149716_u()) + if (this.func_177424_a(blockpos, Chunk.EnumCreateEntityType.CHECK) == null && this.func_177435_g(blockpos).func_177230_c().hasTileEntity(this.func_177435_g(blockpos))) { TileEntity tileentity = this.func_177422_i(blockpos); this.field_76637_e.func_175690_a(blockpos, tileentity); -@@ -1115,6 +1121,13 @@ +@@ -1128,6 +1134,13 @@ @SideOnly(Side.CLIENT) public void func_186033_a(PacketBuffer p_186033_1_, int p_186033_2_, boolean p_186033_3_) { @@ -241,7 +241,7 @@ 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 +1176,16 @@ +@@ -1176,10 +1189,16 @@ this.field_76646_k = true; this.func_76590_a(); @@ -258,7 +258,7 @@ } public Biome func_177411_a(BlockPos p_177411_1_, BiomeProvider p_177411_2_) -@@ -1231,13 +1250,13 @@ +@@ -1244,13 +1263,13 @@ BlockPos blockpos1 = blockpos.func_177982_a(k, (j << 4) + i1, l); boolean flag = i1 == 0 || i1 == 15 || k == 0 || k == 15 || l == 0 || l == 15; @@ -274,7 +274,7 @@ { this.field_76637_e.func_175664_x(blockpos2); } -@@ -1368,7 +1387,7 @@ +@@ -1381,7 +1400,7 @@ { blockpos$mutableblockpos.func_181079_c(blockpos$mutableblockpos.func_177958_n(), l, blockpos$mutableblockpos.func_177952_p()); @@ -283,7 +283,7 @@ { this.field_76637_e.func_175664_x(blockpos$mutableblockpos); } -@@ -1476,4 +1495,34 @@ +@@ -1489,4 +1508,34 @@ QUEUED, CHECK; } 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 94a4c145d..9cdef46d6 100644 --- a/patches/minecraft/net/minecraft/world/chunk/storage/AnvilChunkLoader.java.patch +++ b/patches/minecraft/net/minecraft/world/chunk/storage/AnvilChunkLoader.java.patch @@ -1,14 +1,14 @@ --- ../src-base/minecraft/net/minecraft/world/chunk/storage/AnvilChunkLoader.java +++ ../src-work/minecraft/net/minecraft/world/chunk/storage/AnvilChunkLoader.java @@ -49,9 +49,43 @@ - this.field_186055_e = p_i46673_2_; + this.field_193416_e = p_i46673_2_; } + public boolean chunkExists(World world, int x, int z) + { + ChunkPos chunkcoordintpair = new ChunkPos(x, z); + -+ if (this.field_75826_b.contains(chunkcoordintpair)) ++ if (this.field_193415_c.contains(chunkcoordintpair)) + { + for(ChunkPos pendingChunkCoord : this.field_75828_a.keySet()) + { @@ -42,10 +42,10 @@ + public Object[] loadChunk__Async(World p_75815_1_, int p_75815_2_, int p_75815_3_) throws IOException + { ChunkPos chunkpos = new ChunkPos(p_75815_2_, p_75815_3_); - NBTTagCompound nbttagcompound = (NBTTagCompound)this.field_75828_a.get(chunkpos); + NBTTagCompound nbttagcompound = this.field_75828_a.get(chunkpos); @@ -67,7 +101,7 @@ - nbttagcompound = this.field_186055_e.func_188257_a(FixTypes.CHUNK, CompressedStreamTools.func_74794_a(datainputstream)); + nbttagcompound = this.field_193416_e.func_188257_a(FixTypes.CHUNK, CompressedStreamTools.func_74794_a(datainputstream)); } - return this.func_75822_a(p_75815_1_, p_75815_2_, p_75815_3_, nbttagcompound); @@ -65,9 +65,9 @@ + { 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_)}); + field_151505_a.error("Chunk file at {},{} is missing level data, skipping", Integer.valueOf(p_75822_2_), Integer.valueOf(p_75822_3_)); @@ -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)}); + field_151505_a.error("Chunk file at {},{} is in the wrong location; relocating. (Expected {}, {}, got {}, {})", 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_); + @@ -100,7 +100,7 @@ @@ -121,7 +180,9 @@ NBTTagCompound nbttagcompound1 = new NBTTagCompound(); nbttagcompound.func_74782_a("Level", nbttagcompound1); - nbttagcompound.func_74768_a("DataVersion", 922); + nbttagcompound.func_74768_a("DataVersion", 1139); + net.minecraftforge.fml.common.FMLCommonHandler.instance().getDataFixer().writeVersionData(nbttagcompound); 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)); diff --git a/patches/minecraft/net/minecraft/world/gen/ChunkProviderEnd.java.patch b/patches/minecraft/net/minecraft/world/gen/ChunkGeneratorEnd.java.patch similarity index 89% rename from patches/minecraft/net/minecraft/world/gen/ChunkProviderEnd.java.patch rename to patches/minecraft/net/minecraft/world/gen/ChunkGeneratorEnd.java.patch index 6dcd1c56e..b5c90b97c 100644 --- a/patches/minecraft/net/minecraft/world/gen/ChunkProviderEnd.java.patch +++ b/patches/minecraft/net/minecraft/world/gen/ChunkGeneratorEnd.java.patch @@ -1,6 +1,6 @@ ---- ../src-base/minecraft/net/minecraft/world/gen/ChunkProviderEnd.java -+++ ../src-work/minecraft/net/minecraft/world/gen/ChunkProviderEnd.java -@@ -44,6 +44,9 @@ +--- ../src-base/minecraft/net/minecraft/world/gen/ChunkGeneratorEnd.java ++++ ../src-work/minecraft/net/minecraft/world/gen/ChunkGeneratorEnd.java +@@ -43,6 +43,9 @@ double[] field_185967_f; double[] field_185968_g; private final WorldGenEndIsland field_185975_r = new WorldGenEndIsland(); @@ -8,9 +8,9 @@ + private int chunkX = 0; + private int chunkZ = 0; - public ChunkProviderEnd(World p_i47241_1_, boolean p_i47241_2_, long p_i47241_3_, BlockPos p_i47241_5_) + public ChunkGeneratorEnd(World p_i47241_1_, boolean p_i47241_2_, long p_i47241_3_, BlockPos p_i47241_5_) { -@@ -57,6 +60,16 @@ +@@ -56,6 +59,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); @@ -27,7 +27,7 @@ } public void func_180518_a(int p_180518_1_, int p_180518_2_, ChunkPrimer p_180518_3_) -@@ -129,6 +142,7 @@ +@@ -128,6 +141,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) -@@ -174,6 +188,7 @@ +@@ -173,6 +187,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); -@@ -255,6 +270,10 @@ +@@ -254,6 +269,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_]; -@@ -327,6 +346,7 @@ +@@ -326,6 +345,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) -@@ -395,6 +415,7 @@ +@@ -394,6 +414,7 @@ } } diff --git a/patches/minecraft/net/minecraft/world/gen/ChunkProviderFlat.java.patch b/patches/minecraft/net/minecraft/world/gen/ChunkGeneratorFlat.java.patch similarity index 85% rename from patches/minecraft/net/minecraft/world/gen/ChunkProviderFlat.java.patch rename to patches/minecraft/net/minecraft/world/gen/ChunkGeneratorFlat.java.patch index 8e1876ca0..1592b257a 100644 --- a/patches/minecraft/net/minecraft/world/gen/ChunkProviderFlat.java.patch +++ b/patches/minecraft/net/minecraft/world/gen/ChunkGeneratorFlat.java.patch @@ -1,6 +1,6 @@ ---- ../src-base/minecraft/net/minecraft/world/gen/ChunkProviderFlat.java -+++ ../src-work/minecraft/net/minecraft/world/gen/ChunkProviderFlat.java -@@ -163,6 +163,7 @@ +--- ../src-base/minecraft/net/minecraft/world/gen/ChunkGeneratorFlat.java ++++ ../src-work/minecraft/net/minecraft/world/gen/ChunkGeneratorFlat.java +@@ -162,6 +162,7 @@ public void func_185931_b(int p_185931_1_, int p_185931_2_) { @@ -8,7 +8,7 @@ int i = p_185931_1_ * 16; int j = p_185931_2_ * 16; BlockPos blockpos = new BlockPos(i, 0, j); -@@ -174,6 +175,8 @@ +@@ -173,6 +174,8 @@ this.field_73161_b.setSeed((long)p_185931_1_ * k + (long)p_185931_2_ * l ^ this.field_73163_a.func_72905_C()); ChunkPos chunkpos = new ChunkPos(p_185931_1_, p_185931_2_); @@ -17,7 +17,7 @@ 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 @@ +@@ -210,6 +213,9 @@ { biome.func_180624_a(this.field_73163_a, this.field_73161_b, blockpos); } diff --git a/patches/minecraft/net/minecraft/world/gen/ChunkProviderHell.java.patch b/patches/minecraft/net/minecraft/world/gen/ChunkGeneratorHell.java.patch similarity index 96% rename from patches/minecraft/net/minecraft/world/gen/ChunkProviderHell.java.patch rename to patches/minecraft/net/minecraft/world/gen/ChunkGeneratorHell.java.patch index 6baf68b13..5ff095d2d 100644 --- a/patches/minecraft/net/minecraft/world/gen/ChunkProviderHell.java.patch +++ b/patches/minecraft/net/minecraft/world/gen/ChunkGeneratorHell.java.patch @@ -1,6 +1,6 @@ ---- ../src-base/minecraft/net/minecraft/world/gen/ChunkProviderHell.java -+++ ../src-work/minecraft/net/minecraft/world/gen/ChunkProviderHell.java -@@ -78,6 +78,19 @@ +--- ../src-base/minecraft/net/minecraft/world/gen/ChunkGeneratorHell.java ++++ ../src-work/minecraft/net/minecraft/world/gen/ChunkGeneratorHell.java +@@ -77,6 +77,19 @@ this.field_185946_g = new NoiseGeneratorOctaves(this.field_185954_p, 10); this.field_185947_h = new NoiseGeneratorOctaves(this.field_185954_p, 16); p_i45637_1_.func_181544_b(63); @@ -20,7 +20,7 @@ } public void func_185936_a(int p_185936_1_, int p_185936_2_, ChunkPrimer p_185936_3_) -@@ -156,6 +169,7 @@ +@@ -155,6 +168,7 @@ public void func_185937_b(int p_185937_1_, int p_185937_2_, ChunkPrimer p_185937_3_) { @@ -28,7 +28,7 @@ int i = this.field_185952_n.func_181545_F() + 1; double d0 = 0.03125D; this.field_73185_q = this.field_73177_m.func_76304_a(this.field_73185_q, p_185937_1_ * 16, p_185937_2_ * 16, 0, 16, 16, 1, 0.03125D, 0.03125D, 1.0D); -@@ -278,6 +292,10 @@ +@@ -277,6 +291,10 @@ p_185938_1_ = new double[p_185938_5_ * p_185938_6_ * p_185938_7_]; } @@ -39,7 +39,7 @@ double d0 = 684.412D; double d1 = 2053.236D; this.field_73168_g = this.field_185946_g.func_76304_a(this.field_73168_g, p_185938_2_, p_185938_3_, p_185938_4_, p_185938_5_, 1, p_185938_7_, 1.0D, 0.0D, 1.0D); -@@ -359,6 +377,7 @@ +@@ -358,6 +376,7 @@ public void func_185931_b(int p_185931_1_, int p_185931_2_) { BlockFalling.field_149832_M = true; @@ -47,7 +47,7 @@ int i = p_185931_1_ * 16; int j = p_185931_2_ * 16; BlockPos blockpos = new BlockPos(i, 0, j); -@@ -366,16 +385,20 @@ +@@ -365,16 +384,20 @@ ChunkPos chunkpos = new ChunkPos(p_185931_1_, p_185931_2_); this.field_73172_c.func_175794_a(this.field_185952_n, this.field_185954_p, chunkpos); @@ -68,7 +68,7 @@ for (int j1 = 0; j1 < this.field_185954_p.nextInt(this.field_185954_p.nextInt(10) + 1); ++j1) { this.field_177469_u.func_180709_b(this.field_185952_n, this.field_185954_p, blockpos.func_177982_a(this.field_185954_p.nextInt(16) + 8, this.field_185954_p.nextInt(120) + 4, this.field_185954_p.nextInt(16) + 8)); -@@ -385,7 +408,13 @@ +@@ -384,7 +407,13 @@ { this.field_177468_v.func_180709_b(this.field_185952_n, this.field_185954_p, blockpos.func_177982_a(this.field_185954_p.nextInt(16) + 8, this.field_185954_p.nextInt(128), this.field_185954_p.nextInt(16) + 8)); } @@ -82,17 +82,18 @@ if (this.field_185954_p.nextBoolean()) { this.field_177471_z.func_180709_b(this.field_185952_n, this.field_185954_p, blockpos.func_177982_a(this.field_185954_p.nextInt(16) + 8, this.field_185954_p.nextInt(128), this.field_185954_p.nextInt(16) + 8)); -@@ -395,7 +424,9 @@ +@@ -394,7 +423,10 @@ { this.field_177465_A.func_180709_b(this.field_185952_n, this.field_185954_p, blockpos.func_177982_a(this.field_185954_p.nextInt(16) + 8, this.field_185954_p.nextInt(128), this.field_185954_p.nextInt(16) + 8)); } + } ++ + if (net.minecraftforge.event.terraingen.TerrainGen.generateOre(this.field_185952_n, this.field_185954_p, field_177467_w, blockpos, net.minecraftforge.event.terraingen.OreGenEvent.GenerateMinable.EventType.QUARTZ)) for (int l1 = 0; l1 < 16; ++l1) { this.field_177467_w.func_180709_b(this.field_185952_n, this.field_185954_p, blockpos.func_177982_a(this.field_185954_p.nextInt(16), this.field_185954_p.nextInt(108) + 10, this.field_185954_p.nextInt(16))); -@@ -403,17 +434,22 @@ +@@ -402,17 +434,22 @@ int i2 = this.field_185952_n.func_181545_F() / 2 + 1; diff --git a/patches/minecraft/net/minecraft/world/gen/ChunkProviderOverworld.java.patch b/patches/minecraft/net/minecraft/world/gen/ChunkGeneratorOverworld.java.patch similarity index 93% rename from patches/minecraft/net/minecraft/world/gen/ChunkProviderOverworld.java.patch rename to patches/minecraft/net/minecraft/world/gen/ChunkGeneratorOverworld.java.patch index 66b241359..72daa7151 100644 --- a/patches/minecraft/net/minecraft/world/gen/ChunkProviderOverworld.java.patch +++ b/patches/minecraft/net/minecraft/world/gen/ChunkGeneratorOverworld.java.patch @@ -1,8 +1,8 @@ ---- ../src-base/minecraft/net/minecraft/world/gen/ChunkProviderOverworld.java -+++ ../src-work/minecraft/net/minecraft/world/gen/ChunkProviderOverworld.java -@@ -62,6 +62,15 @@ +--- ../src-base/minecraft/net/minecraft/world/gen/ChunkGeneratorOverworld.java ++++ ../src-work/minecraft/net/minecraft/world/gen/ChunkGeneratorOverworld.java +@@ -61,6 +61,15 @@ - public ChunkProviderOverworld(World p_i46668_1_, long p_i46668_2_, boolean p_i46668_4_, String p_i46668_5_) + public ChunkGeneratorOverworld(World p_i46668_1_, long p_i46668_2_, boolean p_i46668_4_, String p_i46668_5_) { + { + field_186003_v = net.minecraftforge.event.terraingen.TerrainGen.getModdedMapGen(field_186003_v, net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.CAVE); @@ -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(); -@@ -91,6 +100,17 @@ +@@ -90,6 +99,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_) -@@ -164,6 +184,7 @@ +@@ -163,6 +183,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); -@@ -371,6 +392,8 @@ +@@ -370,6 +391,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) -@@ -405,6 +428,7 @@ +@@ -404,6 +427,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); -@@ -413,6 +437,7 @@ +@@ -412,6 +436,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); -@@ -425,6 +450,7 @@ +@@ -424,6 +449,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) { -@@ -436,9 +462,12 @@ +@@ -435,9 +461,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) -@@ -457,7 +486,10 @@ +@@ -456,7 +485,10 @@ } } } diff --git a/patches/minecraft/net/minecraft/world/gen/ChunkProviderServer.java.patch b/patches/minecraft/net/minecraft/world/gen/ChunkProviderServer.java.patch index c148d2f1e..fe683f122 100644 --- a/patches/minecraft/net/minecraft/world/gen/ChunkProviderServer.java.patch +++ b/patches/minecraft/net/minecraft/world/gen/ChunkProviderServer.java.patch @@ -1,14 +1,14 @@ --- ../src-base/minecraft/net/minecraft/world/gen/ChunkProviderServer.java +++ ../src-work/minecraft/net/minecraft/world/gen/ChunkProviderServer.java -@@ -36,6 +36,7 @@ +@@ -35,6 +35,7 @@ public final IChunkLoader field_73247_e; - public final Long2ObjectMap field_73244_f = new Long2ObjectOpenHashMap(8192); + public final Long2ObjectMap field_73244_f = new Long2ObjectOpenHashMap(8192); public final WorldServer field_73251_h; + private Set loadingChunks = com.google.common.collect.Sets.newHashSet(); public ChunkProviderServer(WorldServer p_i46838_1_, IChunkLoader p_i46838_2_, IChunkGenerator p_i46838_3_) { -@@ -86,20 +87,47 @@ +@@ -85,20 +86,47 @@ @Nullable public Chunk func_186028_c(int p_186028_1_, int p_186028_2_) { @@ -60,7 +60,7 @@ return chunk; } -@@ -225,6 +253,11 @@ +@@ -224,6 +252,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()) -@@ -239,6 +272,11 @@ +@@ -238,6 +271,11 @@ this.func_73243_a(chunk); this.field_73244_f.remove(olong); ++i; diff --git a/patches/minecraft/net/minecraft/world/gen/MapGenCaves.java.patch b/patches/minecraft/net/minecraft/world/gen/MapGenCaves.java.patch index 258e466ea..2188761f3 100644 --- a/patches/minecraft/net/minecraft/world/gen/MapGenCaves.java.patch +++ b/patches/minecraft/net/minecraft/world/gen/MapGenCaves.java.patch @@ -13,7 +13,7 @@ } @@ -180,28 +178,12 @@ IBlockState iblockstate1 = p_180702_5_.func_177856_a(j3, j2, i2); - IBlockState iblockstate2 = (IBlockState)Objects.firstNonNull(p_180702_5_.func_177856_a(j3, j2 + 1, i2), field_186127_b); + IBlockState iblockstate2 = (IBlockState)MoreObjects.firstNonNull(p_180702_5_.func_177856_a(j3, j2 + 1, i2), field_186127_b); - if (iblockstate1.func_177230_c() == Blocks.field_150349_c || iblockstate1.func_177230_c() == Blocks.field_150391_bh) + if (isTopBlock(p_180702_5_, j3, j2, i2, p_180702_3_, p_180702_4_)) @@ -42,7 +42,7 @@ } } } -@@ -260,4 +242,66 @@ +@@ -299,4 +281,66 @@ } } } diff --git a/patches/minecraft/net/minecraft/world/gen/feature/WorldGenBigTree.java.patch b/patches/minecraft/net/minecraft/world/gen/feature/WorldGenBigTree.java.patch index 9b5ed8239..6c34a84ea 100644 --- a/patches/minecraft/net/minecraft/world/gen/feature/WorldGenBigTree.java.patch +++ b/patches/minecraft/net/minecraft/world/gen/feature/WorldGenBigTree.java.patch @@ -12,7 +12,7 @@ { this.func_175903_a(this.field_175946_l, blockpos, p_181631_3_); } -@@ -254,7 +254,7 @@ +@@ -269,7 +269,7 @@ { BlockPos blockpos1 = p_175936_1_.func_177963_a((double)(0.5F + (float)j * f), (double)(0.5F + (float)j * f1), (double)(0.5F + (float)j * f2)); @@ -21,7 +21,7 @@ { return j; } -@@ -282,6 +282,7 @@ +@@ -297,6 +297,7 @@ if (!this.func_76497_e()) { @@ -29,7 +29,7 @@ return false; } else -@@ -290,15 +291,18 @@ +@@ -305,15 +306,18 @@ this.func_175941_b(); this.func_175942_c(); this.func_175939_d(); diff --git a/patches/minecraft/net/minecraft/world/gen/feature/WorldGenSwamp.java.patch b/patches/minecraft/net/minecraft/world/gen/feature/WorldGenSwamp.java.patch index e24b76223..dfe3fe59d 100644 --- a/patches/minecraft/net/minecraft/world/gen/feature/WorldGenSwamp.java.patch +++ b/patches/minecraft/net/minecraft/world/gen/feature/WorldGenSwamp.java.patch @@ -56,43 +56,34 @@ BlockPos blockpos2 = blockpos$mutableblockpos1.func_177968_d(); - if (p_180709_2_.nextInt(4) == 0 && p_180709_1_.func_180495_p(blockpos3).func_185904_a() == Material.field_151579_a) -+ if (p_180709_2_.nextInt(4) == 0 && isAir(p_180709_1_, blockpos3)) ++ if (p_180709_2_.nextInt(4) == 0 && p_180709_1_.func_175623_d(blockpos3)) { this.func_181647_a(p_180709_1_, blockpos3, BlockVine.field_176278_M); } - if (p_180709_2_.nextInt(4) == 0 && p_180709_1_.func_180495_p(blockpos4).func_185904_a() == Material.field_151579_a) -+ if (p_180709_2_.nextInt(4) == 0 && isAir(p_180709_1_, blockpos4)) ++ if (p_180709_2_.nextInt(4) == 0 && p_180709_1_.func_175623_d(blockpos4)) { this.func_181647_a(p_180709_1_, blockpos4, BlockVine.field_176280_O); } - if (p_180709_2_.nextInt(4) == 0 && p_180709_1_.func_180495_p(blockpos1).func_185904_a() == Material.field_151579_a) -+ if (p_180709_2_.nextInt(4) == 0 && isAir(p_180709_1_, blockpos1)) ++ if (p_180709_2_.nextInt(4) == 0 && p_180709_1_.func_175623_d(blockpos1)) { this.func_181647_a(p_180709_1_, blockpos1, BlockVine.field_176279_N); } - if (p_180709_2_.nextInt(4) == 0 && p_180709_1_.func_180495_p(blockpos2).func_185904_a() == Material.field_151579_a) -+ if (p_180709_2_.nextInt(4) == 0 && isAir(p_180709_1_, blockpos2)) ++ if (p_180709_2_.nextInt(4) == 0 && p_180709_1_.func_175623_d(blockpos2)) { this.func_181647_a(p_180709_1_, blockpos2, BlockVine.field_176273_b); } -@@ -193,10 +197,16 @@ +@@ -193,7 +197,7 @@ this.func_175903_a(p_181647_1_, p_181647_2_, iblockstate); int i = 4; -- for (p_181647_2_ = p_181647_2_.func_177977_b(); p_181647_1_.func_180495_p(p_181647_2_).func_185904_a() == Material.field_151579_a && i > 0; --i) -+ for (p_181647_2_ = p_181647_2_.func_177977_b(); isAir(p_181647_1_, p_181647_2_) && i > 0; --i) +- for (BlockPos blockpos = p_181647_2_.func_177977_b(); p_181647_1_.func_180495_p(blockpos).func_185904_a() == Material.field_151579_a && i > 0; --i) ++ for (BlockPos blockpos = p_181647_2_.func_177977_b(); p_181647_1_.func_175623_d(blockpos) && i > 0; --i) { - this.func_175903_a(p_181647_1_, p_181647_2_, iblockstate); - p_181647_2_ = p_181647_2_.func_177977_b(); - } - } -+ -+ private boolean isAir(World world, BlockPos pos) -+ { -+ IBlockState state = world.func_180495_p(pos); -+ return state.func_177230_c().isAir(state, world, pos); -+ } - } + this.func_175903_a(p_181647_1_, blockpos, iblockstate); + blockpos = blockpos.func_177977_b(); diff --git a/patches/minecraft/net/minecraft/world/gen/feature/WorldGenTrees.java.patch b/patches/minecraft/net/minecraft/world/gen/feature/WorldGenTrees.java.patch index 0cc330d12..f6ba38728 100644 --- a/patches/minecraft/net/minecraft/world/gen/feature/WorldGenTrees.java.patch +++ b/patches/minecraft/net/minecraft/world/gen/feature/WorldGenTrees.java.patch @@ -101,8 +101,8 @@ this.func_181651_a(p_181650_1_, p_181650_2_, p_181650_3_); int i = 4; -- for (p_181650_2_ = p_181650_2_.func_177977_b(); p_181650_1_.func_180495_p(p_181650_2_).func_185904_a() == Material.field_151579_a && i > 0; --i) -+ for (p_181650_2_ = p_181650_2_.func_177977_b(); p_181650_1_.func_175623_d(p_181650_2_) && i > 0; --i) +- for (BlockPos blockpos = p_181650_2_.func_177977_b(); p_181650_1_.func_180495_p(blockpos).func_185904_a() == Material.field_151579_a && i > 0; --i) ++ for (BlockPos blockpos = p_181650_2_.func_177977_b(); p_181650_1_.func_175623_d(blockpos) && i > 0; --i) { - this.func_181651_a(p_181650_1_, p_181650_2_, p_181650_3_); - p_181650_2_ = p_181650_2_.func_177977_b(); + this.func_181651_a(p_181650_1_, blockpos, p_181650_3_); + blockpos = blockpos.func_177977_b(); 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 b06745871..37db40005 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,21 @@ --- ../src-base/minecraft/net/minecraft/world/gen/layer/GenLayer.java +++ ../src-work/minecraft/net/minecraft/world/gen/layer/GenLayer.java -@@ -47,12 +47,12 @@ +@@ -47,11 +47,11 @@ i = 6; } + i = getModdedBiomeSize(p_180781_2_, i); + 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 genlayerriverinit = new GenLayerRiverInit(100L, lvt_7_1_); +- GenLayer 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_9_1_ = GenLayerZoom.func_75915_a(1000L, genlayerriverinit, 2); +- GenLayer genlayerbiomeedge = new GenLayerBiomeEdge(1000L, genlayer6); + GenLayer genlayerbiomeedge = p_180781_2_.getBiomeLayer(p_180781_0_, genlayer4, p_180781_3_); + GenLayer lvt_9_1_ = GenLayerZoom.func_75915_a(1000L, genlayerriverinit, 2); 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); -@@ -156,8 +156,7 @@ +@@ -171,10 +171,32 @@ protected static boolean func_151618_b(int p_151618_0_) { @@ -25,12 +24,6 @@ + return net.minecraftforge.common.BiomeManager.oceanBiomes.contains(Biome.func_150568_d(p_151618_0_)); } - protected int func_151619_a(int... p_151619_1_) -@@ -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_})))))))))); - } -+ + /* ======================================== FORGE START =====================================*/ + protected long nextLong(long par1) + { @@ -53,4 +46,7 @@ + return event.getNewSize(); + } + /* ========================================= FORGE END ======================================*/ - } ++ + protected int func_151619_a(int... p_151619_1_) + { + return p_151619_1_[this.func_75902_a(p_151619_1_.length)]; 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 52c001534..18fbcfa5a 100644 --- a/patches/minecraft/net/minecraft/world/gen/layer/GenLayerBiome.java.patch +++ b/patches/minecraft/net/minecraft/world/gen/layer/GenLayerBiome.java.patch @@ -10,9 +10,9 @@ - private final Biome[] field_151620_f = new Biome[] {Biomes.field_76774_n, Biomes.field_76774_n, Biomes.field_76774_n, Biomes.field_150584_S}; + @SuppressWarnings("unchecked") + private java.util.List[] biomes = new java.util.ArrayList[net.minecraftforge.common.BiomeManager.BiomeType.values().length]; - private final ChunkProviderSettings field_175973_g; + private final ChunkGeneratorSettings field_175973_g; - public GenLayerBiome(long p_i45560_1_, GenLayer p_i45560_3_, WorldType p_i45560_4_, ChunkProviderSettings p_i45560_5_) + public GenLayerBiome(long p_i45560_1_, GenLayer p_i45560_3_, WorldType p_i45560_4_, ChunkGeneratorSettings p_i45560_5_) @@ -18,9 +16,30 @@ super(p_i45560_1_); this.field_75909_a = p_i45560_3_; 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 9e7d62a1d..b0924ce1f 100644 --- a/patches/minecraft/net/minecraft/world/gen/structure/MapGenStructure.java.patch +++ b/patches/minecraft/net/minecraft/world/gen/structure/MapGenStructure.java.patch @@ -1,8 +1,8 @@ --- ../src-base/minecraft/net/minecraft/world/gen/structure/MapGenStructure.java +++ ../src-work/minecraft/net/minecraft/world/gen/structure/MapGenStructure.java -@@ -168,12 +168,12 @@ +@@ -175,12 +175,12 @@ { - if (this.field_143029_e == null) + if (this.field_143029_e == null && p_143027_1_ != null) { - this.field_143029_e = (MapGenStructureData)p_143027_1_.func_72943_a(MapGenStructureData.class, this.func_143025_a()); + this.field_143029_e = (MapGenStructureData)p_143027_1_.getPerWorldStorage().func_75742_a(MapGenStructureData.class, this.func_143025_a()); diff --git a/patches/minecraft/net/minecraft/world/gen/structure/template/Template.java.patch b/patches/minecraft/net/minecraft/world/gen/structure/template/Template.java.patch index 02b35f8e4..e553ea8fb 100644 --- a/patches/minecraft/net/minecraft/world/gen/structure/template/Template.java.patch +++ b/patches/minecraft/net/minecraft/world/gen/structure/template/Template.java.patch @@ -1,9 +1,9 @@ --- ../src-base/minecraft/net/minecraft/world/gen/structure/template/Template.java +++ ../src-work/minecraft/net/minecraft/world/gen/structure/template/Template.java @@ -520,6 +520,7 @@ - p_189552_1_.func_74782_a("size", this.func_186267_a(new int[] {this.field_186272_c.func_177958_n(), this.field_186272_c.func_177956_o(), this.field_186272_c.func_177952_p()})); + p_189552_1_.func_74782_a("size", this.func_186267_a(this.field_186272_c.func_177958_n(), this.field_186272_c.func_177956_o(), this.field_186272_c.func_177952_p())); p_189552_1_.func_74778_a("author", this.field_186273_d); - p_189552_1_.func_74768_a("DataVersion", 922); + p_189552_1_.func_74768_a("DataVersion", 1139); + net.minecraftforge.fml.common.FMLCommonHandler.instance().getDataFixer().writeVersionData(p_189552_1_); return p_189552_1_; } diff --git a/patches/minecraft/net/minecraft/world/storage/MapData.java.patch b/patches/minecraft/net/minecraft/world/storage/MapData.java.patch index dee1a2968..df1ee059a 100644 --- a/patches/minecraft/net/minecraft/world/storage/MapData.java.patch +++ b/patches/minecraft/net/minecraft/world/storage/MapData.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/world/storage/MapData.java +++ ../src-work/minecraft/net/minecraft/world/storage/MapData.java -@@ -21,7 +21,7 @@ +@@ -20,7 +20,7 @@ { public int field_76201_a; public int field_76199_b; @@ -9,7 +9,7 @@ public boolean field_186210_e; public boolean field_191096_f; public byte field_76197_d; -@@ -46,7 +46,7 @@ +@@ -45,7 +45,7 @@ public void func_76184_a(NBTTagCompound p_76184_1_) { @@ -18,7 +18,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"); -@@ -98,7 +98,7 @@ +@@ -97,7 +97,7 @@ public NBTTagCompound func_189551_b(NBTTagCompound p_189551_1_) { @@ -27,7 +27,7 @@ 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); -@@ -209,9 +209,9 @@ +@@ -208,9 +208,9 @@ 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)); diff --git a/patches/minecraft/net/minecraft/world/storage/WorldInfo.java.patch b/patches/minecraft/net/minecraft/world/storage/WorldInfo.java.patch index 31671571a..b13279c0c 100644 --- a/patches/minecraft/net/minecraft/world/storage/WorldInfo.java.patch +++ b/patches/minecraft/net/minecraft/world/storage/WorldInfo.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/world/storage/WorldInfo.java +++ ../src-work/minecraft/net/minecraft/world/storage/WorldInfo.java -@@ -64,8 +64,9 @@ +@@ -63,8 +63,9 @@ private double field_176153_H = 0.2D; private int field_176154_I = 5; private int field_176155_J = 15; @@ -11,7 +11,7 @@ protected WorldInfo() { -@@ -252,7 +253,7 @@ +@@ -251,7 +252,7 @@ for (String s : nbttagcompound1.func_150296_c()) { @@ -20,28 +20,28 @@ } } } -@@ -335,6 +336,7 @@ +@@ -334,6 +335,7 @@ nbttagcompound.func_74757_a("Snapshot", false); p_76064_1_.func_74782_a("Version", nbttagcompound); - p_76064_1_.func_74768_a("DataVersion", 922); + p_76064_1_.func_74768_a("DataVersion", 1139); + net.minecraftforge.fml.common.FMLCommonHandler.instance().getDataFixer().writeVersionData(p_76064_1_); p_76064_1_.func_74772_a("RandomSeed", this.field_76100_a); p_76064_1_.func_74778_a("generatorName", this.field_76098_b.func_77127_a()); p_76064_1_.func_74768_a("generatorVersion", this.field_76098_b.func_77131_c()); -@@ -377,9 +379,10 @@ +@@ -376,9 +378,10 @@ p_76064_1_.func_74782_a("GameRules", this.field_82577_x.func_82770_a()); NBTTagCompound nbttagcompound1 = new NBTTagCompound(); - for (Entry entry : this.field_186348_N.entrySet()) + for (Entry entry : this.field_186348_N.entrySet()) { -- nbttagcompound1.func_74782_a(String.valueOf(((DimensionType)entry.getKey()).func_186068_a()), (NBTBase)entry.getValue()); -+ if (entry.getValue() == null || entry.getValue().func_82582_d()) continue; -+ nbttagcompound1.func_74782_a(String.valueOf(entry.getKey()), (NBTBase)entry.getValue()); +- nbttagcompound1.func_74782_a(String.valueOf(((DimensionType)entry.getKey()).func_186068_a()), entry.getValue()); ++ if (entry.getValue() != null || entry.getValue().func_82582_d()) continue; ++ nbttagcompound1.func_74782_a(String.valueOf(entry.getKey()), entry.getValue()); } p_76064_1_.func_74782_a("DimensionData", nbttagcompound1); -@@ -709,6 +712,7 @@ +@@ -708,6 +711,7 @@ public void func_176144_a(EnumDifficulty p_176144_1_) { @@ -49,10 +49,10 @@ this.field_176158_z = p_176144_1_; } -@@ -807,17 +811,49 @@ +@@ -805,18 +809,49 @@ + } }); } - + /** + * Allow access to additional mod specific world based properties + * Used by FML to store mod list associated with a world, and maybe an id map @@ -67,7 +67,7 @@ + this.additionalProperties = additionalProperties; + } + } -+ + + public net.minecraft.nbt.NBTBase getAdditionalProperty(String additionalProperty) + { + return this.additionalProperties!=null? this.additionalProperties.get(additionalProperty) : null; @@ -76,12 +76,12 @@ + @Deprecated //Use the int version below, and pass in dimension id NOT TYPE id public NBTTagCompound func_186347_a(DimensionType p_186347_1_) { -- NBTTagCompound nbttagcompound = (NBTTagCompound)this.field_186348_N.get(p_186347_1_); +- NBTTagCompound nbttagcompound = this.field_186348_N.get(p_186347_1_); + return getDimensionData(p_186347_1_.func_186068_a()); + } -+ public NBTTagCompound getDimensionData(int dimensionID) ++ public NBTTagCompound getDimensionData(int dimensionIn) + { -+ NBTTagCompound nbttagcompound = (NBTTagCompound)this.field_186348_N.get(dimensionID); ++ NBTTagCompound nbttagcompound = this.field_186348_N.get(dimensionIn); return nbttagcompound == null ? new NBTTagCompound() : nbttagcompound; } diff --git a/patches/minecraft/net/minecraft/world/WorldSavedData.java.patch b/patches/minecraft/net/minecraft/world/storage/WorldSavedData.java.patch similarity index 79% rename from patches/minecraft/net/minecraft/world/WorldSavedData.java.patch rename to patches/minecraft/net/minecraft/world/storage/WorldSavedData.java.patch index 8356a8a70..2849daca6 100644 --- a/patches/minecraft/net/minecraft/world/WorldSavedData.java.patch +++ b/patches/minecraft/net/minecraft/world/storage/WorldSavedData.java.patch @@ -1,5 +1,5 @@ ---- ../src-base/minecraft/net/minecraft/world/WorldSavedData.java -+++ ../src-work/minecraft/net/minecraft/world/WorldSavedData.java +--- ../src-base/minecraft/net/minecraft/world/storage/WorldSavedData.java ++++ ../src-work/minecraft/net/minecraft/world/storage/WorldSavedData.java @@ -2,7 +2,7 @@ import net.minecraft.nbt.NBTTagCompound; diff --git a/patches/minecraft/net/minecraft/world/storage/loot/LootEntry.java.patch b/patches/minecraft/net/minecraft/world/storage/loot/LootEntry.java.patch index cc2efb1f1..372136e65 100644 --- a/patches/minecraft/net/minecraft/world/storage/loot/LootEntry.java.patch +++ b/patches/minecraft/net/minecraft/world/storage/loot/LootEntry.java.patch @@ -44,10 +44,10 @@ JsonObject jsonobject = new JsonObject(); + if (p_serialize_1_.entryName != null && !p_serialize_1_.entryName.startsWith("custom#")) + jsonobject.addProperty("entryName", p_serialize_1_.entryName); - jsonobject.addProperty("weight", (Number)Integer.valueOf(p_serialize_1_.field_186364_c)); - jsonobject.addProperty("quality", (Number)Integer.valueOf(p_serialize_1_.field_186365_d)); + jsonobject.addProperty("weight", Integer.valueOf(p_serialize_1_.field_186364_c)); + jsonobject.addProperty("quality", Integer.valueOf(p_serialize_1_.field_186365_d)); -@@ -86,13 +95,16 @@ +@@ -86,6 +95,9 @@ jsonobject.add("conditions", p_serialize_3_.serialize(p_serialize_1_.field_186366_e)); } @@ -57,11 +57,3 @@ if (p_serialize_1_ instanceof LootEntryItem) { jsonobject.addProperty("type", "item"); - } - else if (p_serialize_1_ instanceof LootEntryTable) - { -- jsonobject.addProperty("type", "item"); -+ jsonobject.addProperty("type", "loot_table"); //Forge: fix incorrect serialization MC-115407 - } - else - { diff --git a/patches/minecraft/net/minecraft/world/storage/loot/LootTableManager.java.patch b/patches/minecraft/net/minecraft/world/storage/loot/LootTableManager.java.patch index 8aa0cafe8..81a4d3d3c 100644 --- a/patches/minecraft/net/minecraft/world/storage/loot/LootTableManager.java.patch +++ b/patches/minecraft/net/minecraft/world/storage/loot/LootTableManager.java.patch @@ -1,19 +1,19 @@ --- ../src-base/minecraft/net/minecraft/world/storage/loot/LootTableManager.java +++ ../src-work/minecraft/net/minecraft/world/storage/loot/LootTableManager.java -@@ -104,7 +104,7 @@ +@@ -111,7 +111,7 @@ - try - { -- return (LootTable)LootTableManager.field_186526_b.fromJson(s, LootTable.class); -+ return net.minecraftforge.common.ForgeHooks.loadLootTable(LootTableManager.field_186526_b, p_186517_1_, s, true, LootTableManager.this); - } - catch (JsonParseException jsonparseexception) - { -@@ -145,7 +145,7 @@ + try + { +- return (LootTable)JsonUtils.func_188178_a(LootTableManager.field_186526_b, s, LootTable.class); ++ return net.minecraftforge.common.ForgeHooks.loadLootTable(LootTableManager.field_186526_b, p_186517_1_, s, true, LootTableManager.this); + } + catch (IllegalArgumentException | JsonParseException jsonparseexception) + { +@@ -153,7 +153,7 @@ try { -- return (LootTable)LootTableManager.field_186526_b.fromJson(s, LootTable.class); +- return (LootTable)JsonUtils.func_188178_a(LootTableManager.field_186526_b, s, LootTable.class); + return net.minecraftforge.common.ForgeHooks.loadLootTable(LootTableManager.field_186526_b, p_186518_1_, s, false, LootTableManager.this); } catch (JsonParseException jsonparseexception) diff --git a/src/main/java/net/minecraftforge/client/ForgeHooksClient.java b/src/main/java/net/minecraftforge/client/ForgeHooksClient.java index fb2dca330..929571621 100644 --- a/src/main/java/net/minecraftforge/client/ForgeHooksClient.java +++ b/src/main/java/net/minecraftforge/client/ForgeHooksClient.java @@ -43,16 +43,17 @@ import net.minecraft.block.state.IBlockState; import net.minecraft.client.Minecraft; import net.minecraft.client.audio.ISound; import net.minecraft.client.audio.SoundManager; +import net.minecraft.client.gui.BossInfoClient; import net.minecraft.client.gui.FontRenderer; import net.minecraft.client.gui.GuiMainMenu; import net.minecraft.client.gui.GuiScreen; import net.minecraft.client.gui.ScaledResolution; import net.minecraft.client.model.ModelBiped; +import net.minecraft.client.renderer.BufferBuilder; import net.minecraft.client.renderer.EntityRenderer; import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.OpenGlHelper; import net.minecraft.client.renderer.RenderGlobal; -import net.minecraft.client.renderer.VertexBuffer; import net.minecraft.client.renderer.block.model.BakedQuad; import net.minecraft.client.renderer.block.model.BlockFaceUV; import net.minecraft.client.renderer.block.model.IBakedModel; @@ -87,7 +88,6 @@ import net.minecraft.util.math.MathHelper; import net.minecraft.util.math.RayTraceResult; import net.minecraft.util.registry.IRegistry; import net.minecraft.util.text.TextFormatting; -import net.minecraft.world.BossInfoLerping; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import net.minecraft.world.biome.Biome; @@ -566,7 +566,7 @@ public class ForgeHooksClient return ret; } - public static void putQuadColor(VertexBuffer renderer, BakedQuad quad, int color) + public static void putQuadColor(BufferBuilder renderer, BakedQuad quad, int color) { float cb = color & 0xFF; float cg = (color >>> 8) & 0xFF; @@ -600,7 +600,7 @@ public class ForgeHooksClient TileEntitySpecialRenderer r = TileEntityRendererDispatcher.instance.getSpecialRendererByClass(tileClass); if (r != null) { - r.renderTileEntityAt(null, 0, 0, 0, 0, -1); + r.func_192841_a(null, 0, 0, 0, 0, -1, 0.0F); } } } @@ -730,7 +730,7 @@ public class ForgeHooksClient return new BlockFaceUV(new float[]{ uMin, vMin, uMax, vMax }, angle); } - public static RenderGameOverlayEvent.BossInfo bossBarRenderPre(ScaledResolution res, BossInfoLerping bossInfo, int x, int y, int increment) + public static RenderGameOverlayEvent.BossInfo bossBarRenderPre(ScaledResolution res, BossInfoClient bossInfo, int x, int y, int increment) { RenderGameOverlayEvent.BossInfo evt = new RenderGameOverlayEvent.BossInfo(new RenderGameOverlayEvent(Animation.getPartialTickTime(), res), BOSSINFO, bossInfo, x, y, increment); diff --git a/src/main/java/net/minecraftforge/client/GuiIngameForge.java b/src/main/java/net/minecraftforge/client/GuiIngameForge.java index 97d630e4d..634767cee 100644 --- a/src/main/java/net/minecraftforge/client/GuiIngameForge.java +++ b/src/main/java/net/minecraftforge/client/GuiIngameForge.java @@ -122,7 +122,7 @@ public class GuiIngameForge extends GuiIngame if (Minecraft.isFancyGraphicsEnabled()) { - renderVignette(mc.player.getBrightness(partialTicks), res); + renderVignette(mc.player.getBrightness(), res); } else { diff --git a/src/main/java/net/minecraftforge/client/event/ClientChatReceivedEvent.java b/src/main/java/net/minecraftforge/client/event/ClientChatReceivedEvent.java index 19ffdee93..5a66130bc 100644 --- a/src/main/java/net/minecraftforge/client/event/ClientChatReceivedEvent.java +++ b/src/main/java/net/minecraftforge/client/event/ClientChatReceivedEvent.java @@ -19,6 +19,7 @@ package net.minecraftforge.client.event; +import net.minecraft.util.text.ChatType; import net.minecraft.util.text.ITextComponent; import net.minecraftforge.fml.common.eventhandler.Cancelable; import net.minecraftforge.fml.common.eventhandler.Event; @@ -27,8 +28,8 @@ import net.minecraftforge.fml.common.eventhandler.Event; public class ClientChatReceivedEvent extends Event { private ITextComponent message; - private final byte type; - public ClientChatReceivedEvent(byte type, ITextComponent message) + private final ChatType type; + public ClientChatReceivedEvent(ChatType type, ITextComponent message) { this.type = type; this.setMessage(message); @@ -44,13 +45,7 @@ public class ClientChatReceivedEvent extends Event this.message = message; } - /** - * Introduced in 1.8: - * 0 : Standard Text Message - * 1 : 'System' message, displayed as standard text. - * 2 : 'Status' message, displayed above action bar, where song notifications are. - */ - public byte getType() + public ChatType getType() { return type; } diff --git a/src/main/java/net/minecraftforge/client/event/RenderGameOverlayEvent.java b/src/main/java/net/minecraftforge/client/event/RenderGameOverlayEvent.java index 3939dce16..e43585151 100644 --- a/src/main/java/net/minecraftforge/client/event/RenderGameOverlayEvent.java +++ b/src/main/java/net/minecraftforge/client/event/RenderGameOverlayEvent.java @@ -21,10 +21,9 @@ package net.minecraftforge.client.event; import java.util.ArrayList; -import net.minecraft.world.BossInfoLerping; import net.minecraftforge.fml.common.eventhandler.Cancelable; import net.minecraftforge.fml.common.eventhandler.Event; - +import net.minecraft.client.gui.BossInfoClient; import net.minecraft.client.gui.ScaledResolution; @Cancelable @@ -107,11 +106,11 @@ public class RenderGameOverlayEvent extends Event public static class BossInfo extends Pre { - private final BossInfoLerping bossInfo; + private final BossInfoClient bossInfo; private final int x; private final int y; private int increment; - public BossInfo(RenderGameOverlayEvent parent, ElementType type, BossInfoLerping bossInfo, int x, int y, int increment) + public BossInfo(RenderGameOverlayEvent parent, ElementType type, BossInfoClient bossInfo, int x, int y, int increment) { super(parent, type); this.bossInfo = bossInfo; @@ -121,9 +120,9 @@ public class RenderGameOverlayEvent extends Event } /** - * @return The {@link BossInfoLerping} currently being rendered + * @return The {@link BossInfoClient} currently being rendered */ - public BossInfoLerping getBossInfo() + public BossInfoClient getBossInfo() { return bossInfo; } diff --git a/src/main/java/net/minecraftforge/client/event/RenderItemInFrameEvent.java b/src/main/java/net/minecraftforge/client/event/RenderItemInFrameEvent.java index dfea1b23e..9b4cf0dec 100644 --- a/src/main/java/net/minecraftforge/client/event/RenderItemInFrameEvent.java +++ b/src/main/java/net/minecraftforge/client/event/RenderItemInFrameEvent.java @@ -19,7 +19,7 @@ package net.minecraftforge.client.event; -import net.minecraft.client.renderer.tileentity.RenderItemFrame; +import net.minecraft.client.renderer.entity.RenderItemFrame; import net.minecraft.entity.item.EntityItemFrame; import net.minecraft.item.ItemStack; import net.minecraftforge.fml.common.eventhandler.Cancelable; @@ -29,7 +29,7 @@ import javax.annotation.Nonnull; /** * This event is called when an item is rendered in an item frame. - * + * * You can set canceled to do no further vanilla processing. */ @Cancelable @@ -38,7 +38,7 @@ public class RenderItemInFrameEvent extends Event private final ItemStack item; private final EntityItemFrame entityItemFrame; private final RenderItemFrame renderer; - + public RenderItemInFrameEvent(EntityItemFrame itemFrame, RenderItemFrame renderItemFrame) { item = itemFrame.getDisplayedItem(); diff --git a/src/main/java/net/minecraftforge/client/model/animation/AnimationModelBase.java b/src/main/java/net/minecraftforge/client/model/animation/AnimationModelBase.java index aa38506ff..b7b43d09d 100644 --- a/src/main/java/net/minecraftforge/client/model/animation/AnimationModelBase.java +++ b/src/main/java/net/minecraftforge/client/model/animation/AnimationModelBase.java @@ -22,10 +22,10 @@ package net.minecraftforge.client.model.animation; import java.util.List; import net.minecraft.client.model.ModelBase; +import net.minecraft.client.renderer.BufferBuilder; import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.RenderHelper; import net.minecraft.client.renderer.Tessellator; -import net.minecraft.client.renderer.VertexBuffer; import net.minecraft.client.renderer.block.model.BakedQuad; import net.minecraft.client.renderer.vertex.DefaultVertexFormats; import net.minecraft.client.renderer.block.model.IBakedModel; @@ -84,11 +84,11 @@ public class AnimationModelBase extends ModelBase implements I GlStateManager.pushMatrix(); GlStateManager.rotate(180, 0, 0, 1); Tessellator tessellator = Tessellator.getInstance(); - VertexBuffer VertexBuffer = tessellator.getBuffer(); - VertexBuffer.begin(GL11.GL_QUADS, DefaultVertexFormats.BLOCK); - VertexBuffer.setTranslation(-0.5, -1.5, -0.5); + BufferBuilder builder = tessellator.getBuffer(); + builder.begin(GL11.GL_QUADS, DefaultVertexFormats.BLOCK); + builder.setTranslation(-0.5, -1.5, -0.5); - lighter.setParent(new VertexBufferConsumer(VertexBuffer)); + lighter.setParent(new VertexBufferConsumer(builder)); lighter.setWorld(entity.world); lighter.setState(Blocks.AIR.getDefaultState()); lighter.setBlockPos(pos); @@ -123,7 +123,7 @@ public class AnimationModelBase extends ModelBase implements I VertexBuffer.pos(1, 1, 1).color(0xFF, 0xFF, 0xFF, 0xFF).tex(1, 1).lightmap(240, 0).endVertex(); VertexBuffer.pos(1, 1, 0).color(0xFF, 0xFF, 0xFF, 0xFF).tex(1, 0).lightmap(240, 0).endVertex();*/ - VertexBuffer.setTranslation(0, 0, 0); + builder.setTranslation(0, 0, 0); tessellator.draw(); GlStateManager.popMatrix(); diff --git a/src/main/java/net/minecraftforge/client/model/animation/AnimationTESR.java b/src/main/java/net/minecraftforge/client/model/animation/AnimationTESR.java index f248d805e..bb6269ec3 100644 --- a/src/main/java/net/minecraftforge/client/model/animation/AnimationTESR.java +++ b/src/main/java/net/minecraftforge/client/model/animation/AnimationTESR.java @@ -22,7 +22,7 @@ package net.minecraftforge.client.model.animation; import net.minecraft.block.state.IBlockState; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.BlockRendererDispatcher; -import net.minecraft.client.renderer.VertexBuffer; +import net.minecraft.client.renderer.BufferBuilder; import net.minecraft.client.renderer.block.model.IBakedModel; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.math.BlockPos; @@ -47,7 +47,7 @@ public class AnimationTESR extends FastTESR implements { protected static BlockRendererDispatcher blockRenderer; - public void renderTileEntityFast(@Nonnull T te, double x, double y, double z, float partialTick, int breakStage, @Nonnull VertexBuffer renderer) + public void renderTileEntityFast(@Nonnull T te, double x, double y, double z, float partialTick, int breakStage, float partial, @Nonnull BufferBuilder renderer) { if(!te.hasCapability(CapabilityAnimation.ANIMATION_CAPABILITY, null)) { @@ -86,4 +86,4 @@ public class AnimationTESR extends FastTESR implements } public void handleEvents(T te, float time, Iterable pastEvents) {} -} \ No newline at end of file +} diff --git a/src/main/java/net/minecraftforge/client/model/animation/FastTESR.java b/src/main/java/net/minecraftforge/client/model/animation/FastTESR.java index 8f4a0d499..41af87840 100644 --- a/src/main/java/net/minecraftforge/client/model/animation/FastTESR.java +++ b/src/main/java/net/minecraftforge/client/model/animation/FastTESR.java @@ -25,7 +25,7 @@ import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.RenderHelper; import net.minecraft.client.renderer.Tessellator; -import net.minecraft.client.renderer.VertexBuffer; +import net.minecraft.client.renderer.BufferBuilder; import net.minecraft.client.renderer.texture.TextureMap; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.client.renderer.vertex.DefaultVertexFormats; @@ -36,10 +36,10 @@ import javax.annotation.Nonnull; public abstract class FastTESR extends TileEntitySpecialRenderer { @Override - public final void renderTileEntityAt(@Nonnull T te, double x, double y, double z, float partialTicks, int destroyStage) + public final void func_192841_a(@Nonnull T te, double x, double y, double z, float partialTicks, int destroyStage, float partial) { Tessellator tessellator = Tessellator.getInstance(); - VertexBuffer VertexBuffer = tessellator.getBuffer(); + BufferBuilder buffer = tessellator.getBuffer(); this.bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE); RenderHelper.disableStandardItemLighting(); GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); @@ -55,10 +55,10 @@ public abstract class FastTESR extends TileEntitySpecialRe GlStateManager.shadeModel(GL11.GL_FLAT); } - VertexBuffer.begin(GL11.GL_QUADS, DefaultVertexFormats.BLOCK); + buffer.begin(GL11.GL_QUADS, DefaultVertexFormats.BLOCK); - renderTileEntityFast(te, x, y, z, partialTicks, destroyStage, VertexBuffer); - VertexBuffer.setTranslation(0, 0, 0); + renderTileEntityFast(te, x, y, z, partialTicks, destroyStage, partial, buffer); + buffer.setTranslation(0, 0, 0); tessellator.draw(); @@ -66,5 +66,5 @@ public abstract class FastTESR extends TileEntitySpecialRe } @Override - public abstract void renderTileEntityFast(@Nonnull T te, double x, double y, double z, float partialTicks, int destroyStage, @Nonnull VertexBuffer VertexBuffer); + public abstract void renderTileEntityFast(@Nonnull T te, double x, double y, double z, float partialTicks, int destroyStage, float partial, @Nonnull BufferBuilder buffer); } diff --git a/src/main/java/net/minecraftforge/client/model/obj/OBJModel.java b/src/main/java/net/minecraftforge/client/model/obj/OBJModel.java index 51bbc5144..7940a15f4 100644 --- a/src/main/java/net/minecraftforge/client/model/obj/OBJModel.java +++ b/src/main/java/net/minecraftforge/client/model/obj/OBJModel.java @@ -64,12 +64,12 @@ import net.minecraftforge.common.property.Properties; import net.minecraftforge.fml.common.FMLLog; import org.apache.commons.lang3.tuple.Pair; -import org.apache.logging.log4j.core.helpers.Strings; import com.google.common.base.Charsets; import com.google.common.base.Function; import com.google.common.base.Objects; import com.google.common.base.Optional; +import com.google.common.base.Strings; import com.google.common.cache.CacheBuilder; import com.google.common.cache.CacheLoader; import com.google.common.cache.LoadingCache; @@ -294,8 +294,8 @@ public class OBJModel implements IRetexturableModel, IModelCustomData String[] pts = splitData[i].split("/"); int vert = Integer.parseInt(pts[0]); - Integer texture = pts.length < 2 || Strings.isEmpty(pts[1]) ? null : Integer.parseInt(pts[1]); - Integer normal = pts.length < 3 || Strings.isEmpty(pts[2]) ? null : Integer.parseInt(pts[2]); + Integer texture = pts.length < 2 || Strings.isNullOrEmpty(pts[1]) ? null : Integer.parseInt(pts[1]); + Integer normal = pts.length < 3 || Strings.isNullOrEmpty(pts[2]) ? null : Integer.parseInt(pts[2]); vert = vert < 0 ? this.vertices.size() - 1 : vert - 1; Vertex newV = new Vertex(new Vector4f(this.vertices.get(vert).getPos()), this.vertices.get(vert).getMaterial()); diff --git a/src/main/java/net/minecraftforge/client/model/pipeline/ForgeBlockModelRenderer.java b/src/main/java/net/minecraftforge/client/model/pipeline/ForgeBlockModelRenderer.java index a496bfa61..eecc2041c 100644 --- a/src/main/java/net/minecraftforge/client/model/pipeline/ForgeBlockModelRenderer.java +++ b/src/main/java/net/minecraftforge/client/model/pipeline/ForgeBlockModelRenderer.java @@ -23,7 +23,7 @@ import java.util.List; import net.minecraft.block.state.IBlockState; import net.minecraft.client.renderer.BlockModelRenderer; -import net.minecraft.client.renderer.VertexBuffer; +import net.minecraft.client.renderer.BufferBuilder; import net.minecraft.client.renderer.block.model.BakedQuad; import net.minecraft.client.renderer.block.model.IBakedModel; import net.minecraft.client.renderer.color.BlockColors; @@ -54,8 +54,8 @@ public class ForgeBlockModelRenderer extends BlockModelRenderer private final ThreadLocal wrFlat = new ThreadLocal(); private final ThreadLocal wrSmooth = new ThreadLocal(); - private final ThreadLocal lastRendererFlat = new ThreadLocal(); - private final ThreadLocal lastRendererSmooth = new ThreadLocal(); + private final ThreadLocal lastRendererFlat = new ThreadLocal(); + private final ThreadLocal lastRendererSmooth = new ThreadLocal(); private final BlockColors colors; @@ -67,7 +67,7 @@ public class ForgeBlockModelRenderer extends BlockModelRenderer } @Override - public boolean renderModelFlat(IBlockAccess world, IBakedModel model, IBlockState state, BlockPos pos, VertexBuffer buffer, boolean checkSides, long rand) + public boolean renderModelFlat(IBlockAccess world, IBakedModel model, IBlockState state, BlockPos pos, BufferBuilder buffer, boolean checkSides, long rand) { if(ForgeModContainer.forgeLightPipelineEnabled) { @@ -88,7 +88,7 @@ public class ForgeBlockModelRenderer extends BlockModelRenderer } @Override - public boolean renderModelSmooth(IBlockAccess world, IBakedModel model, IBlockState state, BlockPos pos, VertexBuffer buffer, boolean checkSides, long rand) + public boolean renderModelSmooth(IBlockAccess world, IBakedModel model, IBlockState state, BlockPos pos, BufferBuilder buffer, boolean checkSides, long rand) { if(ForgeModContainer.forgeLightPipelineEnabled) { @@ -108,7 +108,7 @@ public class ForgeBlockModelRenderer extends BlockModelRenderer } } - public static boolean render(VertexLighterFlat lighter, IBlockAccess world, IBakedModel model, IBlockState state, BlockPos pos, VertexBuffer wr, boolean checkSides, long rand) + public static boolean render(VertexLighterFlat lighter, IBlockAccess world, IBakedModel model, IBlockState state, BlockPos pos, BufferBuilder wr, boolean checkSides, long rand) { lighter.setWorld(world); lighter.setState(state); diff --git a/src/main/java/net/minecraftforge/client/model/pipeline/LightUtil.java b/src/main/java/net/minecraftforge/client/model/pipeline/LightUtil.java index 2b37fc378..857cf634b 100644 --- a/src/main/java/net/minecraftforge/client/model/pipeline/LightUtil.java +++ b/src/main/java/net/minecraftforge/client/model/pipeline/LightUtil.java @@ -20,7 +20,7 @@ package net.minecraftforge.client.model.pipeline; import net.minecraft.client.renderer.Tessellator; -import net.minecraft.client.renderer.VertexBuffer; +import net.minecraft.client.renderer.BufferBuilder; import net.minecraft.client.renderer.block.model.BakedQuad; import net.minecraft.client.renderer.vertex.VertexFormat; import net.minecraft.client.renderer.vertex.VertexFormatElement; @@ -257,7 +257,7 @@ public class LightUtil if(tessellator == null) { Tessellator tes = Tessellator.getInstance(); - VertexBuffer wr = tes.getBuffer(); + BufferBuilder wr = tes.getBuffer(); tessellator = new VertexBufferConsumer(wr); } return tessellator; @@ -274,7 +274,7 @@ public class LightUtil } // renders quad in any Vertex Format, but is slower - public static void renderQuadColorSlow(VertexBuffer wr, BakedQuad quad, int auxColor) + public static void renderQuadColorSlow(BufferBuilder wr, BakedQuad quad, int auxColor) { ItemConsumer cons; if(wr == Tessellator.getInstance().getBuffer()) @@ -294,7 +294,7 @@ public class LightUtil quad.pipe(cons); } - public static void renderQuadColor(VertexBuffer wr, BakedQuad quad, int auxColor) + public static void renderQuadColor(BufferBuilder wr, BakedQuad quad, int auxColor) { wr.addVertexData(quad.getVertexData()); ForgeHooksClient.putQuadColor(wr, quad, auxColor); diff --git a/src/main/java/net/minecraftforge/client/model/pipeline/VertexBufferConsumer.java b/src/main/java/net/minecraftforge/client/model/pipeline/VertexBufferConsumer.java index 7752ad55a..13f9e9b7a 100644 --- a/src/main/java/net/minecraftforge/client/model/pipeline/VertexBufferConsumer.java +++ b/src/main/java/net/minecraftforge/client/model/pipeline/VertexBufferConsumer.java @@ -19,7 +19,7 @@ package net.minecraftforge.client.model.pipeline; -import net.minecraft.client.renderer.VertexBuffer; +import net.minecraft.client.renderer.BufferBuilder; import net.minecraft.client.renderer.texture.TextureAtlasSprite; import net.minecraft.client.renderer.vertex.VertexFormat; import net.minecraft.client.renderer.vertex.VertexFormatElement.EnumUsage; @@ -27,17 +27,17 @@ import net.minecraft.util.math.BlockPos; import net.minecraft.util.EnumFacing; /** - * Assumes VertexFormatElement is present in the VertexBuffer's vertex format. + * Assumes VertexFormatElement is present in the BufferBuilder's vertex format. */ public class VertexBufferConsumer implements IVertexConsumer { private static final float[] dummyColor = new float[]{ 1, 1, 1, 1 }; - private final VertexBuffer renderer; + private final BufferBuilder renderer; private final int[] quadData; private int v = 0; private BlockPos offset = BlockPos.ORIGIN; - public VertexBufferConsumer(VertexBuffer renderer) + public VertexBufferConsumer(BufferBuilder renderer) { super(); this.renderer = renderer; diff --git a/src/main/java/net/minecraftforge/common/AchievementPage.java b/src/main/java/net/minecraftforge/common/AchievementPage.java deleted file mode 100644 index 0dfbb70ec..000000000 --- a/src/main/java/net/minecraftforge/common/AchievementPage.java +++ /dev/null @@ -1,130 +0,0 @@ -/* - * Minecraft Forge - * Copyright (c) 2016. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation version 2.1 - * of the License. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -/** - * This software is provided under the terms of the Minecraft Forge Public - * License v1.0. - */ - -package net.minecraftforge.common; - -import java.util.Arrays; -import java.util.HashSet; -import java.util.LinkedList; -import java.util.List; -import java.util.Set; - -import net.minecraft.stats.Achievement; - -import javax.annotation.Nullable; - -public class AchievementPage -{ - private String name; - private LinkedList achievements; - - public AchievementPage(String name, Achievement... achievements) - { - this.name = name; - this.achievements = new LinkedList(Arrays.asList(achievements)); - } - - public String getName() - { - return name; - } - - public List getAchievements() - { - return achievements; - } - - private static LinkedList achievementPages = new LinkedList(); - - /** - * Registers an achievement page. - * @param page The page. - */ - public static void registerAchievementPage(AchievementPage page) - { - if (getAchievementPage(page.getName()) != null) - { - throw new RuntimeException("Duplicate achievement page name \"" + page.getName() + "\"!"); - } - achievementPages.add(page); - } - - /** - * Will return an achievement page by its index on the list. - * @param index The page's index. - * @return the achievement page corresponding to the index or null if invalid index - */ - public static AchievementPage getAchievementPage(int index) - { - return achievementPages.get(index); - } - - /** - * Will return an achievement page by its name. - * @param name The page's name. - * @return the achievement page with the given name or null if no such page - */ - @Nullable - public static AchievementPage getAchievementPage(String name) - { - for (AchievementPage page : achievementPages) - { - if (page.getName().equals(name)) - { - return page; - } - } - return null; - } - - /** - * Will return the list of achievement pages. - * @return the list's size - */ - public static Set getAchievementPages() - { - return new HashSet(achievementPages); - } - - /** - * Will return whether an achievement is in any page or not. - * @param achievement The achievement. - */ - public static boolean isAchievementInPages(Achievement achievement) - { - for (AchievementPage page : achievementPages) - { - if (page.getAchievements().contains(achievement)) - { - return true; - } - } - return false; - } - - public static String getTitle(int index) - { - return index == -1 ? "Minecraft" : getAchievementPage(index).getName(); - } -} \ No newline at end of file diff --git a/src/main/java/net/minecraftforge/common/ForgeModContainer.java b/src/main/java/net/minecraftforge/common/ForgeModContainer.java index ddfc75a7d..75fae25b9 100644 --- a/src/main/java/net/minecraftforge/common/ForgeModContainer.java +++ b/src/main/java/net/minecraftforge/common/ForgeModContainer.java @@ -44,6 +44,7 @@ import java.util.Map; import org.apache.logging.log4j.Level; import net.minecraft.crash.ICrashReportDetail; +import net.minecraft.item.crafting.Ingredient; import net.minecraft.nbt.NBTBase; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.stats.StatList; @@ -523,6 +524,7 @@ public class ForgeModContainer extends DummyModContainer implements WorldAccessC { OreDictionary.rebakeMap(); StatList.reinit(); + Ingredient.invalidateAll(); } diff --git a/src/main/java/net/minecraftforge/common/ForgeVersion.java b/src/main/java/net/minecraftforge/common/ForgeVersion.java index 249c63857..9f40050d8 100644 --- a/src/main/java/net/minecraftforge/common/ForgeVersion.java +++ b/src/main/java/net/minecraftforge/common/ForgeVersion.java @@ -54,17 +54,17 @@ public class ForgeVersion // This is Forge's Mod Id, used for the ForgeModContainer and resource locations public static final String MOD_ID = "forge"; //This number is incremented every time we remove deprecated code/major API changes, never reset - public static final int majorVersion = 13; + public static final int majorVersion = 14; //This number is incremented every minecraft release, never reset - public static final int minorVersion = 20; + public static final int minorVersion = 21; //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 = 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.11.2"; + public static final String mcVersion = "1.12"; // This is the MCP data version we're using - public static final String mcpVersion = "9.38"; + public static final String mcpVersion = "9.40"; @SuppressWarnings("unused") private static Status status = PENDING; @SuppressWarnings("unused") diff --git a/src/main/java/net/minecraftforge/common/animation/Event.java b/src/main/java/net/minecraftforge/common/animation/Event.java index 2b0bbc307..196203000 100644 --- a/src/main/java/net/minecraftforge/common/animation/Event.java +++ b/src/main/java/net/minecraftforge/common/animation/Event.java @@ -19,7 +19,7 @@ package net.minecraftforge.common.animation; -import com.google.common.base.Objects; +import com.google.common.base.MoreObjects; /** @@ -60,6 +60,6 @@ public final class Event implements Comparable @Override public String toString() { - return Objects.toStringHelper(getClass()).add("event", event).add("offset", offset).toString(); + return MoreObjects.toStringHelper(getClass()).add("event", event).add("offset", offset).toString(); } } diff --git a/src/main/java/net/minecraftforge/common/model/Models.java b/src/main/java/net/minecraftforge/common/model/Models.java index be57d26e7..8a9e36324 100644 --- a/src/main/java/net/minecraftforge/common/model/Models.java +++ b/src/main/java/net/minecraftforge/common/model/Models.java @@ -20,6 +20,7 @@ package net.minecraftforge.common.model; import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableSet; import com.google.common.collect.Iterators; import com.google.common.collect.UnmodifiableIterator; @@ -38,6 +39,7 @@ public enum Models { return ((HiddenModelPart) part).getPath().iterator(); } - return Iterators.emptyIterator(); + ImmutableSet ret = ImmutableSet.of(); + return ret.iterator(); } } diff --git a/src/main/java/net/minecraftforge/common/model/TRSRTransformation.java b/src/main/java/net/minecraftforge/common/model/TRSRTransformation.java index 68fbdd36a..e098cd9bf 100644 --- a/src/main/java/net/minecraftforge/common/model/TRSRTransformation.java +++ b/src/main/java/net/minecraftforge/common/model/TRSRTransformation.java @@ -41,7 +41,7 @@ import net.minecraftforge.fml.relauncher.SideOnly; import org.apache.commons.lang3.tuple.Pair; import org.apache.commons.lang3.tuple.Triple; -import com.google.common.base.Objects; +import com.google.common.base.MoreObjects; import com.google.common.base.Optional; import com.google.common.collect.Maps; @@ -508,7 +508,7 @@ public final class TRSRTransformation implements IModelState, ITransformation } /* - * Divides m by m33, sets last row to (0, 0, 0, 1), extracts linear and translation parts + * Divides m by m33, sets last row to (0, 0, 0, 1), extracts linear and translation parts */ public static Pair toAffine(Matrix4f m) { @@ -607,7 +607,7 @@ public final class TRSRTransformation implements IModelState, ITransformation public String toString() { genCheck(); - return Objects.toStringHelper(this.getClass()) + return MoreObjects.toStringHelper(this.getClass()) .add("matrix", matrix) .add("translation", translation) .add("leftRot", leftRot) diff --git a/src/main/java/net/minecraftforge/common/util/WorldCapabilityData.java b/src/main/java/net/minecraftforge/common/util/WorldCapabilityData.java index 28aafc952..418ba7b36 100644 --- a/src/main/java/net/minecraftforge/common/util/WorldCapabilityData.java +++ b/src/main/java/net/minecraftforge/common/util/WorldCapabilityData.java @@ -2,7 +2,7 @@ package net.minecraftforge.common.util; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.world.WorldProvider; -import net.minecraft.world.WorldSavedData; +import net.minecraft.world.storage.WorldSavedData; public class WorldCapabilityData extends WorldSavedData { @@ -56,4 +56,4 @@ public class WorldCapabilityData extends WorldSavedData this.capNBT = null; } } -} \ No newline at end of file +} diff --git a/src/main/java/net/minecraftforge/event/AttachCapabilitiesEvent.java b/src/main/java/net/minecraftforge/event/AttachCapabilitiesEvent.java index 6c4c68a9a..49a5a226c 100644 --- a/src/main/java/net/minecraftforge/event/AttachCapabilitiesEvent.java +++ b/src/main/java/net/minecraftforge/event/AttachCapabilitiesEvent.java @@ -43,12 +43,6 @@ public class AttachCapabilitiesEvent extends GenericEvent final Map caps;// package-private for ForgeEventFactory private final Map view; - @SuppressWarnings("unchecked") - @Deprecated - public AttachCapabilitiesEvent(T obj) - { - this((Class)Object.class, obj); - } public AttachCapabilitiesEvent(Class type, T obj) { this(type, obj, Maps.newLinkedHashMap()); @@ -93,83 +87,21 @@ public class AttachCapabilitiesEvent extends GenericEvent return view; } - - /** - * A version of the parent event which is only fired for Tile Entities. - */ - @Deprecated - public static class TileEntity extends AttachCapabilitiesEvent - { - private final net.minecraft.tileentity.TileEntity te; - public TileEntity(net.minecraft.tileentity.TileEntity te) - { - super(net.minecraft.tileentity.TileEntity.class, te); - this.te = te; - } - public net.minecraft.tileentity.TileEntity getTileEntity() - { - return this.te; - } - } - - /** - * A version of the parent event which is only fired for Entities. - */ - @Deprecated - public static class Entity extends AttachCapabilitiesEvent - { - private final net.minecraft.entity.Entity entity; - public Entity(net.minecraft.entity.Entity entity) - { - super(net.minecraft.entity.Entity.class, entity); - this.entity = entity; - } - public net.minecraft.entity.Entity getEntity() - { - return this.entity; - } - } - /** * A version of the parent event which is only fired for ItemStacks. */ - @Deprecated public static class Item extends AttachCapabilitiesEvent { private final net.minecraft.item.ItemStack stack; - private final net.minecraft.item.Item item; public Item(net.minecraft.item.Item item, @Nonnull net.minecraft.item.ItemStack stack) { super(net.minecraft.item.Item.class, item); - this.item = item; this.stack = stack; } - public net.minecraft.item.Item getItem() - { - return this.item; - } @Nonnull public net.minecraft.item.ItemStack getItemStack() { return this.stack; } } - - /** - * A version of the parent event which is only fired for Worlds. - */ - @Deprecated - public static class World extends AttachCapabilitiesEvent - { - private final net.minecraft.world.World world; - public World(net.minecraft.world.World world) - { - super(net.minecraft.world.World.class, world); - this.world = world; - } - public net.minecraft.world.World getWorld() - { - return this.world; - } - } } diff --git a/src/main/java/net/minecraftforge/event/EntitySelectorEvent.java b/src/main/java/net/minecraftforge/event/EntitySelectorEvent.java deleted file mode 100644 index fc76c69c7..000000000 --- a/src/main/java/net/minecraftforge/event/EntitySelectorEvent.java +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Minecraft Forge - * Copyright (c) 2016. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation version 2.1 - * of the License. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -package net.minecraftforge.event; - -import com.google.common.base.Predicate; -import com.google.common.collect.Lists; -import net.minecraft.command.EntitySelector; -import net.minecraft.command.ICommandSender; -import net.minecraft.entity.Entity; -import net.minecraft.util.math.Vec3d; -import net.minecraftforge.fml.common.IEntitySelectorFactory; -import net.minecraftforge.fml.common.eventhandler.Event; - -import java.util.List; -import java.util.Map; - -/** - * Is not fired anymore. - * Replaced by a factory, which has to be registered with {@link net.minecraftforge.fml.common.registry.GameRegistry#registerEntitySelector(IEntitySelectorFactory, String...)} - * TODO remove in 1.12 - */ -@Deprecated -public class EntitySelectorEvent extends Event -{ - - private final Map map; - private final String mainSelector; - private final ICommandSender sender; - private final Vec3d position; - private final List> selectors; - - public EntitySelectorEvent(Map map, String mainSelector, ICommandSender sender, Vec3d position) - { - this.map = map; - this.mainSelector = mainSelector; - this.sender = sender; - this.position = position; - selectors = Lists.newArrayList(); - } - - /** - * Add your custom selector. - * It is recommend to use "modid:name", if checking for own arguments, to avoid inter-mod interference (e.g. "@a[Forge:timeplayed=100]"). - * - * @param selector Your custom predicate - */ - public void addPredicate(Predicate selector) - { - if (selector == null) - { - throw new NullPointerException("Attempted to add null predicate as entity selector"); - } - selectors.add(selector); - } - - /** - * @return The main selector used (e.g. 'a' for all players or 'e' for all entities) - */ - public String getMainSelector() - { - return mainSelector; - } - - /** - * Example: "@a[test=true]" would result in a map with "test"=>"true" - * - * @return The argument map. Maps all given argument names with its value. - */ - public Map getArgumentMap() - { - return map; - } - - /** - * See {@link EntitySelector#getPosFromArguments(Map, Vec3d)} - * - * @return A position either specified in the selector arguments or by the players position. - */ - public Vec3d getPosition() - { - return position; - } - - /** - * @return The sender of the command. - */ - public ICommandSender getSender() - { - return sender; - } - - /** - * @return The list of added custom selectors - */ - List> getSelectors() - { - return selectors; - } - -} diff --git a/src/main/java/net/minecraftforge/event/ForgeEventFactory.java b/src/main/java/net/minecraftforge/event/ForgeEventFactory.java index aad624483..e9a785463 100644 --- a/src/main/java/net/minecraftforge/event/ForgeEventFactory.java +++ b/src/main/java/net/minecraftforge/event/ForgeEventFactory.java @@ -27,6 +27,7 @@ import java.util.Random; import com.google.common.base.Predicate; import net.minecraft.block.state.IBlockState; +import net.minecraft.client.util.ITooltipFlag; import net.minecraft.command.ICommandSender; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLiving; @@ -54,6 +55,7 @@ import net.minecraft.util.SoundEvent; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.RayTraceResult; import net.minecraft.util.math.Vec3d; +import net.minecraft.util.text.ChatType; import net.minecraft.util.text.ITextComponent; import net.minecraft.village.Village; import net.minecraft.world.Explosion; @@ -62,7 +64,7 @@ import net.minecraft.world.WorldServer; import net.minecraft.world.WorldSettings; import net.minecraft.world.biome.Biome; import net.minecraft.world.chunk.ChunkPrimer; -import net.minecraft.world.chunk.IChunkGenerator; +import net.minecraft.world.gen.IChunkGenerator; import net.minecraft.world.storage.IPlayerFileData; import net.minecraft.world.storage.SaveHandler; import net.minecraft.world.storage.loot.LootTable; @@ -125,15 +127,6 @@ import javax.annotation.Nullable; public class ForgeEventFactory { - /** - * @deprecated Use {@link #onPlayerMultiBlockPlace(EntityPlayer, List, EnumFacing, EnumHand)} instead. - */ - @Deprecated - public static MultiPlaceEvent onPlayerMultiBlockPlace(EntityPlayer player, List blockSnapshots, EnumFacing direction) - { - return onPlayerMultiBlockPlace(player, blockSnapshots, direction, null); - } - public static MultiPlaceEvent onPlayerMultiBlockPlace(EntityPlayer player, List blockSnapshots, EnumFacing direction, @Nullable EnumHand hand) { BlockSnapshot snap = blockSnapshots.get(0); @@ -143,15 +136,6 @@ public class ForgeEventFactory return event; } - /** - * @deprecated Use {@link #onPlayerBlockPlace(EntityPlayer, BlockSnapshot, EnumFacing, EnumHand)} instead. - */ - @Deprecated - public static PlaceEvent onPlayerBlockPlace(EntityPlayer player, BlockSnapshot blockSnapshot, EnumFacing direction) - { - return onPlayerBlockPlace(player, blockSnapshot, direction, EnumHand.MAIN_HAND); - } - public static PlaceEvent onPlayerBlockPlace(@Nonnull EntityPlayer player, @Nonnull BlockSnapshot blockSnapshot, @Nonnull EnumFacing direction, @Nonnull EnumHand hand) { IBlockState placedAgainst = blockSnapshot.getWorld().getBlockState(blockSnapshot.getPos().offset(direction.getOpposite())); @@ -254,17 +238,6 @@ public class ForgeEventFactory return event.getDisplayname(); } - /** - * TODO remove in 1.12 - */ - @Deprecated - public static List> gatherEntitySelectors(Map map, String mainSelector, ICommandSender sender, Vec3d position) - { - EntitySelectorEvent event=new EntitySelectorEvent(map, mainSelector, sender, position); - MinecraftForge.EVENT_BUS.post(event); - return event.getSelectors(); - } - public static float fireBlockHarvesting(List drops, World world, BlockPos pos, IBlockState state, int fortune, float dropChance, boolean silkTouch, EntityPlayer player) { BlockEvent.HarvestDropsEvent event = new BlockEvent.HarvestDropsEvent(world, pos, state, fortune, dropChance, drops, player, silkTouch); @@ -272,9 +245,9 @@ public class ForgeEventFactory return event.getDropChance(); } - public static ItemTooltipEvent onItemTooltip(ItemStack itemStack, EntityPlayer entityPlayer, List toolTip, boolean showAdvancedItemTooltips) + public static ItemTooltipEvent onItemTooltip(ItemStack itemStack, EntityPlayer entityPlayer, List toolTip, ITooltipFlag flags) { - ItemTooltipEvent event = new ItemTooltipEvent(itemStack, entityPlayer, toolTip, showAdvancedItemTooltips); + ItemTooltipEvent event = new ItemTooltipEvent(itemStack, entityPlayer, toolTip, flags); MinecraftForge.EVENT_BUS.post(event); return event; } @@ -343,7 +316,7 @@ public class ForgeEventFactory } @Nullable - public static ITextComponent onClientChat(byte type, ITextComponent message) + public static ITextComponent onClientChat(ChatType type, ITextComponent message) { ClientChatReceivedEvent event = new ClientChatReceivedEvent(type, message); return MinecraftForge.EVENT_BUS.post(event) ? null : event.getMessage(); @@ -368,14 +341,6 @@ public class ForgeEventFactory return 0; } - /** - * @deprecated Use {@link #onApplyBonemeal(EntityPlayer, World, BlockPos, IBlockState, ItemStack, EnumHand)} instead. - */ - @Deprecated - public static int onApplyBonemeal(EntityPlayer player, World world, BlockPos pos, IBlockState state, ItemStack stack) - { - return onApplyBonemeal(player, world, pos, state, stack, null); - } public static int onApplyBonemeal(@Nonnull EntityPlayer player, @Nonnull World world, @Nonnull BlockPos pos, @Nonnull IBlockState state, @Nonnull ItemStack stack, @Nullable EnumHand hand) { @@ -580,15 +545,15 @@ public class ForgeEventFactory @Nullable public static CapabilityDispatcher gatherCapabilities(TileEntity tileEntity) { - return gatherCapabilities(new AttachCapabilitiesEvent.TileEntity(tileEntity), null); + return gatherCapabilities(new AttachCapabilitiesEvent(TileEntity.class, tileEntity), null); } @Nullable public static CapabilityDispatcher gatherCapabilities(Entity entity) { - return gatherCapabilities(new AttachCapabilitiesEvent.Entity(entity), null); + return gatherCapabilities(new AttachCapabilitiesEvent(Entity.class, entity), null); } - + @Nullable public static CapabilityDispatcher gatherCapabilities(Village village) { @@ -610,7 +575,7 @@ public class ForgeEventFactory @Nullable public static CapabilityDispatcher gatherCapabilities(World world, ICapabilityProvider parent) { - return gatherCapabilities(new AttachCapabilitiesEvent.World(world), parent); + return gatherCapabilities(new AttachCapabilitiesEvent(World.class, world), parent); } @Nullable @@ -658,30 +623,11 @@ public class ForgeEventFactory return event.getResult() != net.minecraftforge.fml.common.eventhandler.Event.Result.DENY; } - /** - * @deprecated Use {@link #onChunkPopulate(boolean, IChunkGenerator, World, Random, int, int, boolean)}
- * The Random param should not be world.rand, it should be the same chunk-position-seeded rand used by the Chunk Provider. - */ - @Deprecated - public static void onChunkPopulate(boolean pre, IChunkGenerator gen, World world, int x, int z, boolean hasVillageGenerated) - { - MinecraftForge.EVENT_BUS.post(pre ? new PopulateChunkEvent.Pre(gen, world, world.rand, x, z, hasVillageGenerated) : new PopulateChunkEvent.Post(gen, world, world.rand, x, z, hasVillageGenerated)); - } - public static void onChunkPopulate(boolean pre, IChunkGenerator gen, World world, Random rand, int x, int z, boolean hasVillageGenerated) { MinecraftForge.EVENT_BUS.post(pre ? new PopulateChunkEvent.Pre(gen, world, rand, x, z, hasVillageGenerated) : new PopulateChunkEvent.Post(gen, world, rand, x, z, hasVillageGenerated)); } - /** - * @deprecated Use {@link #loadLootTable(ResourceLocation, LootTable, LootTableManager)}
- */ - @Deprecated - public static LootTable loadLootTable(ResourceLocation name, LootTable table) - { - return loadLootTable(name, table, null); - } - public static LootTable loadLootTable(ResourceLocation name, LootTable table, LootTableManager lootTableManager) { LootTableLoadEvent event = new LootTableLoadEvent(name, table, lootTableManager); @@ -705,7 +651,7 @@ public class ForgeEventFactory net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(e); return e.getLevel(); } - + public static boolean onEntityDestroyBlock(EntityLivingBase entity, BlockPos pos, IBlockState state) { return !MinecraftForge.EVENT_BUS.post(new LivingDestroyBlockEvent(entity, pos, state)); diff --git a/src/main/java/net/minecraftforge/event/entity/living/BabyEntitySpawnEvent.java b/src/main/java/net/minecraftforge/event/entity/living/BabyEntitySpawnEvent.java index 061fa78d6..b7982640e 100644 --- a/src/main/java/net/minecraftforge/event/entity/living/BabyEntitySpawnEvent.java +++ b/src/main/java/net/minecraftforge/event/entity/living/BabyEntitySpawnEvent.java @@ -62,12 +62,12 @@ public class BabyEntitySpawnEvent extends Event //causedByPlayer calculated here to simplify the patch. EntityPlayer causedByPlayer = null; if (parentA instanceof EntityAnimal) { - causedByPlayer = ((EntityAnimal)parentA).getPlayerInLove(); + causedByPlayer = ((EntityAnimal)parentA).func_191993_do(); } if (causedByPlayer == null && parentB instanceof EntityAnimal) { - causedByPlayer = ((EntityAnimal)parentB).getPlayerInLove(); + causedByPlayer = ((EntityAnimal)parentB).func_191993_do(); } this.parentA = parentA; @@ -102,4 +102,4 @@ public class BabyEntitySpawnEvent extends Event { child = proposedChild; } -} \ No newline at end of file +} diff --git a/src/main/java/net/minecraftforge/event/entity/player/AchievementEvent.java b/src/main/java/net/minecraftforge/event/entity/player/AchievementEvent.java deleted file mode 100644 index 9d2c9400a..000000000 --- a/src/main/java/net/minecraftforge/event/entity/player/AchievementEvent.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Minecraft Forge - * Copyright (c) 2016. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation version 2.1 - * of the License. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -package net.minecraftforge.event.entity.player; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.stats.Achievement; -import net.minecraftforge.fml.common.eventhandler.Cancelable; - -/** - * When the player receives an achievement. If canceled the player will not receive anything. - */ -@Cancelable -public class AchievementEvent extends PlayerEvent { - - private final Achievement achievement; - public AchievementEvent(EntityPlayer player, Achievement achievement) - { - super(player); - this.achievement = achievement; - } - - public Achievement getAchievement() - { - return achievement; - } -} diff --git a/src/main/java/net/minecraftforge/event/entity/player/ItemTooltipEvent.java b/src/main/java/net/minecraftforge/event/entity/player/ItemTooltipEvent.java index 4ab614d0f..0de42e774 100644 --- a/src/main/java/net/minecraftforge/event/entity/player/ItemTooltipEvent.java +++ b/src/main/java/net/minecraftforge/event/entity/player/ItemTooltipEvent.java @@ -20,6 +20,8 @@ package net.minecraftforge.event.entity.player; import java.util.List; + +import net.minecraft.client.util.ITooltipFlag; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; @@ -27,7 +29,7 @@ import javax.annotation.Nonnull; public class ItemTooltipEvent extends PlayerEvent { - private final boolean showAdvancedItemTooltips; + private final ITooltipFlag flags; @Nonnull private final ItemStack itemStack; private final List toolTip; @@ -35,20 +37,20 @@ public class ItemTooltipEvent extends PlayerEvent /** * This event is fired in {@link ItemStack#getTooltip(EntityPlayer, boolean)}, which in turn is called from it's respective GUIContainer. */ - public ItemTooltipEvent(@Nonnull ItemStack itemStack, EntityPlayer entityPlayer, List toolTip, boolean showAdvancedItemTooltips) + public ItemTooltipEvent(@Nonnull ItemStack itemStack, EntityPlayer entityPlayer, List toolTip, ITooltipFlag flags) { super(entityPlayer); this.itemStack = itemStack; this.toolTip = toolTip; - this.showAdvancedItemTooltips = showAdvancedItemTooltips; + this.flags = flags; } /** - * Whether the advanced information on item tooltips is being shown, toggled by F3+H. + * Use to determine if the advanced information on item tooltips is being shown, toggled by F3+H. */ - public boolean isShowAdvancedItemTooltips() + public ITooltipFlag getFlags() { - return showAdvancedItemTooltips; + return flags; } /** @@ -67,4 +69,4 @@ public class ItemTooltipEvent extends PlayerEvent { return toolTip; } -} \ No newline at end of file +} diff --git a/src/main/java/net/minecraftforge/event/terraingen/ChunkGeneratorEvent.java b/src/main/java/net/minecraftforge/event/terraingen/ChunkGeneratorEvent.java index 81b917d84..313c16fef 100644 --- a/src/main/java/net/minecraftforge/event/terraingen/ChunkGeneratorEvent.java +++ b/src/main/java/net/minecraftforge/event/terraingen/ChunkGeneratorEvent.java @@ -22,7 +22,7 @@ package net.minecraftforge.event.terraingen; import net.minecraftforge.fml.common.eventhandler.Event; import net.minecraft.world.World; import net.minecraft.world.chunk.ChunkPrimer; -import net.minecraft.world.chunk.IChunkGenerator; +import net.minecraft.world.gen.IChunkGenerator; public class ChunkGeneratorEvent extends Event { diff --git a/src/main/java/net/minecraftforge/event/terraingen/PopulateChunkEvent.java b/src/main/java/net/minecraftforge/event/terraingen/PopulateChunkEvent.java index 7429938fa..36fbb2dcf 100644 --- a/src/main/java/net/minecraftforge/event/terraingen/PopulateChunkEvent.java +++ b/src/main/java/net/minecraftforge/event/terraingen/PopulateChunkEvent.java @@ -22,10 +22,7 @@ package net.minecraftforge.event.terraingen; import java.util.Random; import net.minecraft.world.World; -import net.minecraft.world.chunk.IChunkGenerator; -import net.minecraft.world.gen.ChunkProviderEnd; -import net.minecraft.world.gen.ChunkProviderHell; -import net.minecraft.world.gen.ChunkProviderOverworld; +import net.minecraft.world.gen.IChunkGenerator; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.fml.common.eventhandler.Cancelable; import net.minecraftforge.fml.common.eventhandler.Event; diff --git a/src/main/java/net/minecraftforge/event/terraingen/TerrainGen.java b/src/main/java/net/minecraftforge/event/terraingen/TerrainGen.java index c00956c1c..c2c3e82a4 100644 --- a/src/main/java/net/minecraftforge/event/terraingen/TerrainGen.java +++ b/src/main/java/net/minecraftforge/event/terraingen/TerrainGen.java @@ -23,7 +23,7 @@ import java.util.Random; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; -import net.minecraft.world.chunk.IChunkGenerator; +import net.minecraft.world.gen.IChunkGenerator; import net.minecraft.world.gen.MapGenBase; import net.minecraft.world.gen.feature.WorldGenerator; import net.minecraftforge.common.MinecraftForge; diff --git a/src/main/java/net/minecraftforge/event/terraingen/WorldTypeEvent.java b/src/main/java/net/minecraftforge/event/terraingen/WorldTypeEvent.java index ecdf12c43..0d03feb89 100644 --- a/src/main/java/net/minecraftforge/event/terraingen/WorldTypeEvent.java +++ b/src/main/java/net/minecraftforge/event/terraingen/WorldTypeEvent.java @@ -20,7 +20,6 @@ package net.minecraftforge.event.terraingen; import net.minecraft.world.biome.BiomeProvider; -import net.minecraft.world.gen.ChunkProviderSettings; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.fml.common.eventhandler.Cancelable; import net.minecraftforge.fml.common.eventhandler.Event; diff --git a/src/main/java/net/minecraftforge/fluids/BlockFluidBase.java b/src/main/java/net/minecraftforge/fluids/BlockFluidBase.java index ef220370e..63e454513 100644 --- a/src/main/java/net/minecraftforge/fluids/BlockFluidBase.java +++ b/src/main/java/net/minecraftforge/fluids/BlockFluidBase.java @@ -27,6 +27,7 @@ import net.minecraft.block.BlockLiquid; import net.minecraft.block.material.Material; import net.minecraft.block.properties.IProperty; import net.minecraft.block.properties.PropertyInteger; +import net.minecraft.block.state.BlockFaceShape; import net.minecraft.block.state.BlockStateContainer; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.Entity; @@ -525,7 +526,7 @@ public abstract class BlockFluidBase extends Block implements IFluidBlock corner[1][1] = 1; } } - + state = state.withProperty(LEVEL_CORNERS[0], corner[0][0]); state = state.withProperty(LEVEL_CORNERS[1], corner[0][1]); state = state.withProperty(LEVEL_CORNERS[2], corner[1][1]); @@ -728,6 +729,11 @@ public abstract class BlockFluidBase extends Block implements IFluidBlock return vec; } + private boolean isBlockSolid(IBlockAccess world, BlockPos pos, EnumFacing face) + { + return world.getBlockState(pos).func_193401_d(world, pos, face) == BlockFaceShape.SOLID; + } + /* IFluidBlock */ @Override public Fluid getFluid() diff --git a/src/main/java/net/minecraftforge/fluids/UniversalBucket.java b/src/main/java/net/minecraftforge/fluids/UniversalBucket.java index 8ec2905af..ef6496f1d 100644 --- a/src/main/java/net/minecraftforge/fluids/UniversalBucket.java +++ b/src/main/java/net/minecraftforge/fluids/UniversalBucket.java @@ -104,8 +104,10 @@ public class UniversalBucket extends Item @SideOnly(Side.CLIENT) @Override - public void getSubItems(@Nonnull Item itemIn, @Nullable CreativeTabs tab, @Nonnull NonNullList subItems) + public void getSubItems(@Nullable CreativeTabs tab, @Nonnull NonNullList subItems) { + if (!this.func_194125_a(tab)) + return; for (Fluid fluid : FluidRegistry.getRegisteredFluids().values()) { if (fluid != FluidRegistry.WATER && fluid != FluidRegistry.LAVA && !fluid.getName().equals("milk")) diff --git a/src/main/java/net/minecraftforge/fml/client/FMLClientHandler.java b/src/main/java/net/minecraftforge/fml/client/FMLClientHandler.java index a0f694221..417b0f520 100644 --- a/src/main/java/net/minecraftforge/fml/client/FMLClientHandler.java +++ b/src/main/java/net/minecraftforge/fml/client/FMLClientHandler.java @@ -119,7 +119,7 @@ import org.lwjgl.input.Mouse; import org.lwjgl.opengl.Display; import com.google.common.base.CharMatcher; -import com.google.common.base.Objects; +import com.google.common.base.MoreObjects; import com.google.common.base.Strings; import com.google.common.base.Throwables; import com.google.common.collect.BiMap; @@ -332,7 +332,8 @@ public class FMLClientHandler implements IFMLSidedHandler { SplashProgress.finish(); client.displayCrashReport(new CrashReport(message, t)); - throw Throwables.propagate(t); + Throwables.throwIfUnchecked(t); + throw new RuntimeException(t); } public boolean hasError() @@ -990,7 +991,7 @@ public class FMLClientHandler implements IFMLSidedHandler if (badType == null) { badType = Sets.newHashSet(); - brokenTextures.put(resourceLocation.getResourceDomain(), Objects.firstNonNull(error, "Unknown error"), badType); + brokenTextures.put(resourceLocation.getResourceDomain(), MoreObjects.firstNonNull(error, "Unknown error"), badType); } badType.add(resourceLocation); } diff --git a/src/main/java/net/minecraftforge/fml/client/FMLConfigGuiFactory.java b/src/main/java/net/minecraftforge/fml/client/FMLConfigGuiFactory.java index 402c7e06f..79e059324 100644 --- a/src/main/java/net/minecraftforge/fml/client/FMLConfigGuiFactory.java +++ b/src/main/java/net/minecraftforge/fml/client/FMLConfigGuiFactory.java @@ -41,16 +41,16 @@ import net.minecraftforge.fml.client.config.DummyConfigElement.DummyCategoryElem import net.minecraftforge.fml.client.config.DummyConfigElement.DummyListElement; import net.minecraftforge.fml.client.config.GuiConfigEntries.NumberSliderEntry; -public class FMLConfigGuiFactory implements IModGuiFactory +public class FMLConfigGuiFactory implements IModGuiFactory { - public static class FMLConfigGuiScreen extends GuiConfig + public static class FMLConfigGuiScreen extends GuiConfig { public FMLConfigGuiScreen(GuiScreen parent) { super(parent, getConfigElements(), "FML", false, false, I18n.format("fml.config.sample.title")); } - + private static List getConfigElements() { List list = new ArrayList(); @@ -58,13 +58,13 @@ public class FMLConfigGuiFactory implements IModGuiFactory List stringsList = new ArrayList(); List numbersList = new ArrayList(); Pattern commaDelimitedPattern = Pattern.compile("([A-Za-z]+((,){1}( )*|$))+?"); - + // Top Level Settings list.add(new DummyConfigElement("imABoolean", true, ConfigGuiType.BOOLEAN, "fml.config.sample.imABoolean").setRequiresMcRestart(true)); list.add(new DummyConfigElement("imAnInteger", 42, ConfigGuiType.INTEGER, "fml.config.sample.imAnInteger", -1, 256).setRequiresMcRestart(true)); list.add(new DummyConfigElement("imADouble", 42.4242D, ConfigGuiType.DOUBLE, "fml.config.sample.imADouble", -1.0D, 256.256D).setRequiresMcRestart(true)); list.add(new DummyConfigElement("imAString", "http://www.montypython.net/scripts/string.php", ConfigGuiType.STRING, "fml.config.sample.imAString").setRequiresMcRestart(true)); - + // Lists category listsList.add(new DummyListElement("booleanList", new Boolean[] {true, false, true, false, true, false, true, false}, ConfigGuiType.BOOLEAN, "fml.config.sample.booleanList")); listsList.add(new DummyListElement("booleanListFixed", new Boolean[] {true, false, true, false, true, false, true, false}, ConfigGuiType.BOOLEAN, "fml.config.sample.booleanListFixed", true)); @@ -84,16 +84,16 @@ public class FMLConfigGuiFactory implements IModGuiFactory listsList.add(new DummyListElement("stringListCustom", new Object[0], ConfigGuiType.STRING, "fml.config.sample.stringListCustom").setArrayEntryClass(CustomArrayEntry.class)); list.add(new DummyCategoryElement("lists", "fml.config.sample.ctgy.lists", listsList)); - + // Strings category stringsList.add(new DummyConfigElement("basicString", "Just a regular String value, anything goes.", ConfigGuiType.STRING, "fml.config.sample.basicString")); stringsList.add(new DummyConfigElement("cycleString", "this", ConfigGuiType.STRING, "fml.config.sample.cycleString", new String[] {"this", "property", "cycles", "through", "a", "list", "of", "valid", "choices"})); stringsList.add(new DummyConfigElement("patternString", "only, comma, separated, words, can, be, entered, in, this, box", ConfigGuiType.STRING, "fml.config.sample.patternString", commaDelimitedPattern)); stringsList.add(new DummyConfigElement("chatColorPicker", "c", ConfigGuiType.COLOR, "fml.config.sample.chatColorPicker", new String[] {"0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f"})); stringsList.add(new DummyConfigElement("modIDSelector", "FML", ConfigGuiType.MOD_ID, "fml.config.sample.modIDSelector")); - + list.add(new DummyCategoryElement("strings", "fml.config.sample.ctgy.strings", stringsList)); - + // Numbers category numbersList.add((new DummyConfigElement("basicInteger", 42, ConfigGuiType.INTEGER, "fml.config.sample.basicInteger"))); numbersList.add((new DummyConfigElement("boundedInteger", 42, ConfigGuiType.INTEGER, "fml.config.sample.boundedInteger", -1, 256))); @@ -103,11 +103,11 @@ public class FMLConfigGuiFactory implements IModGuiFactory numbersList.add(new DummyConfigElement("sliderDouble", 42.4242D, ConfigGuiType.DOUBLE, "fml.config.sample.sliderDouble", -1.0D, 256.256D).setCustomListEntryClass(NumberSliderEntry.class)); list.add(new DummyCategoryElement("numbers", "fml.config.sample.ctgy.numbers", numbersList)); - + return list; } } - + @Override public boolean hasConfigGui() @@ -123,10 +123,10 @@ public class FMLConfigGuiFactory implements IModGuiFactory } @Override - public void drawEntry(int slotIndex, int x, int y, int listWidth, int slotHeight, int mouseX, int mouseY, boolean isSelected) + public void func_192634_a(int slotIndex, int x, int y, int listWidth, int slotHeight, int mouseX, int mouseY, boolean isSelected, float partial) { textFieldValue.setTextColor((int) (Math.random() * 0xFFFFFF)); - super.drawEntry(slotIndex, x, y, listWidth, slotHeight, mouseX, mouseY, isSelected); + super.func_192634_a(slotIndex, x, y, listWidth, slotHeight, mouseX, mouseY, isSelected, partial); } } @@ -140,7 +140,7 @@ public class FMLConfigGuiFactory implements IModGuiFactory { return new FMLConfigGuiScreen(parentScreen); } - + @Override public Class mainConfigGuiClass() { diff --git a/src/main/java/net/minecraftforge/fml/client/GuiErrorBase.java b/src/main/java/net/minecraftforge/fml/client/GuiErrorBase.java index fe62fd29a..f2351bb44 100644 --- a/src/main/java/net/minecraftforge/fml/client/GuiErrorBase.java +++ b/src/main/java/net/minecraftforge/fml/client/GuiErrorBase.java @@ -86,7 +86,7 @@ public class GuiErrorBase extends GuiErrorScreen { for(GuiButton button : buttonList) { - button.drawButton(this.mc, mouseX, mouseY); + button.func_191745_a(this.mc, mouseX, mouseY, partialTicks); } } } diff --git a/src/main/java/net/minecraftforge/fml/client/GuiModList.java b/src/main/java/net/minecraftforge/fml/client/GuiModList.java index cd5a4604d..82208d311 100644 --- a/src/main/java/net/minecraftforge/fml/client/GuiModList.java +++ b/src/main/java/net/minecraftforge/fml/client/GuiModList.java @@ -40,7 +40,7 @@ import net.minecraft.client.gui.GuiTextField; import net.minecraft.client.gui.GuiUtilRenderComponents; import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.Tessellator; -import net.minecraft.client.renderer.VertexBuffer; +import net.minecraft.client.renderer.BufferBuilder; import net.minecraft.client.renderer.texture.DynamicTexture; import net.minecraft.client.renderer.texture.TextureManager; import net.minecraft.client.renderer.vertex.DefaultVertexFormats; @@ -283,7 +283,7 @@ public class GuiModList extends GuiScreen { IModGuiFactory guiFactory = FMLClientHandler.instance().getGuiFactoryFor(selectedMod); GuiScreen newScreen = null; - try + try { newScreen = guiFactory.createConfigGui(this); } @@ -564,7 +564,7 @@ public class GuiModList extends GuiScreen { GlStateManager.enableBlend(); GuiModList.this.mc.renderEngine.bindTexture(logoPath); - VertexBuffer wr = tess.getBuffer(); + BufferBuilder wr = tess.getBuffer(); int offset = (this.left + this.listWidth/2) - (logoDims.width / 2); wr.begin(7, DefaultVertexFormats.POSITION_TEX); wr.pos(offset, top + logoDims.height, zLevel).tex(0, 1).endVertex(); diff --git a/src/main/java/net/minecraftforge/fml/client/GuiOldSaveLoadConfirm.java b/src/main/java/net/minecraftforge/fml/client/GuiOldSaveLoadConfirm.java index d534ad108..ac6a05980 100644 --- a/src/main/java/net/minecraftforge/fml/client/GuiOldSaveLoadConfirm.java +++ b/src/main/java/net/minecraftforge/fml/client/GuiOldSaveLoadConfirm.java @@ -61,7 +61,7 @@ public class GuiOldSaveLoadConfirm extends GuiYesNo implements GuiYesNoCallback for (k = 0; k < this.buttonList.size(); ++k) { - this.buttonList.get(k).drawButton(this.mc, mouseX, mouseY); + this.buttonList.get(k).func_191745_a(this.mc, mouseX, mouseY, partialTicks); } for (k = 0; k < this.labelList.size(); ++k) diff --git a/src/main/java/net/minecraftforge/fml/client/GuiScrollingList.java b/src/main/java/net/minecraftforge/fml/client/GuiScrollingList.java index e1dc95341..3bb4b1fd7 100644 --- a/src/main/java/net/minecraftforge/fml/client/GuiScrollingList.java +++ b/src/main/java/net/minecraftforge/fml/client/GuiScrollingList.java @@ -23,9 +23,9 @@ import net.minecraft.client.Minecraft; import net.minecraft.client.gui.Gui; import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.ScaledResolution; +import net.minecraft.client.renderer.BufferBuilder; import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.Tessellator; -import net.minecraft.client.renderer.VertexBuffer; import net.minecraft.client.renderer.vertex.DefaultVertexFormats; import org.lwjgl.input.Mouse; import org.lwjgl.opengl.GL11; @@ -276,7 +276,7 @@ public abstract class GuiScrollingList this.applyScrollLimits(); Tessellator tess = Tessellator.getInstance(); - VertexBuffer worldr = tess.getBuffer(); + BufferBuilder worldr = tess.getBuffer(); ScaledResolution res = new ScaledResolution(client); double scaleW = client.displayWidth / res.getScaledWidth_double(); @@ -403,12 +403,12 @@ public abstract class GuiScrollingList GlStateManager.tryBlendFuncSeparate(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, 1, 0); GlStateManager.shadeModel(GL11.GL_SMOOTH); Tessellator tessellator = Tessellator.getInstance(); - VertexBuffer VertexBuffer = tessellator.getBuffer(); - VertexBuffer.begin(7, DefaultVertexFormats.POSITION_COLOR); - VertexBuffer.pos(right, top, 0.0D).color(r1, g1, b1, a1).endVertex(); - VertexBuffer.pos(left, top, 0.0D).color(r1, g1, b1, a1).endVertex(); - VertexBuffer.pos(left, bottom, 0.0D).color(r2, g2, b2, a2).endVertex(); - VertexBuffer.pos(right, bottom, 0.0D).color(r2, g2, b2, a2).endVertex(); + BufferBuilder buffer = tessellator.getBuffer(); + buffer.begin(7, DefaultVertexFormats.POSITION_COLOR); + buffer.pos(right, top, 0.0D).color(r1, g1, b1, a1).endVertex(); + buffer.pos(left, top, 0.0D).color(r1, g1, b1, a1).endVertex(); + buffer.pos(left, bottom, 0.0D).color(r2, g2, b2, a2).endVertex(); + buffer.pos(right, bottom, 0.0D).color(r2, g2, b2, a2).endVertex(); tessellator.draw(); GlStateManager.shadeModel(GL11.GL_FLAT); GlStateManager.disableBlend(); diff --git a/src/main/java/net/minecraftforge/fml/client/config/GuiButtonExt.java b/src/main/java/net/minecraftforge/fml/client/config/GuiButtonExt.java index c9688b682..4b54cad9e 100644 --- a/src/main/java/net/minecraftforge/fml/client/config/GuiButtonExt.java +++ b/src/main/java/net/minecraftforge/fml/client/config/GuiButtonExt.java @@ -48,7 +48,7 @@ public class GuiButtonExt extends GuiButton * Draws this button to the screen. */ @Override - public void drawButton(Minecraft mc, int mouseX, int mouseY) + public void func_191745_a(Minecraft mc, int mouseX, int mouseY, float partial) { if (this.visible) { diff --git a/src/main/java/net/minecraftforge/fml/client/config/GuiCheckBox.java b/src/main/java/net/minecraftforge/fml/client/config/GuiCheckBox.java index fd6df7b65..d95f80080 100644 --- a/src/main/java/net/minecraftforge/fml/client/config/GuiCheckBox.java +++ b/src/main/java/net/minecraftforge/fml/client/config/GuiCheckBox.java @@ -42,7 +42,7 @@ public class GuiCheckBox extends GuiButton } @Override - public void drawButton(Minecraft mc, int mouseX, int mouseY) + public void func_191745_a(Minecraft mc, int mouseX, int mouseY, float partial) { if (this.visible) { diff --git a/src/main/java/net/minecraftforge/fml/client/config/GuiConfigEntries.java b/src/main/java/net/minecraftforge/fml/client/config/GuiConfigEntries.java index a1afee229..33ea1d161 100644 --- a/src/main/java/net/minecraftforge/fml/client/config/GuiConfigEntries.java +++ b/src/main/java/net/minecraftforge/fml/client/config/GuiConfigEntries.java @@ -84,7 +84,7 @@ public class GuiConfigEntries extends GuiListExtended { super(mc, parent.width, parent.height, parent.titleLine2 != null ? 33 : 23, parent.height - 32, 20); this.owningScreen = parent; - this.setShowSelectionBox(false); + this.func_193651_b(false); this.mc = mc; this.listEntries = new ArrayList(); @@ -562,10 +562,10 @@ public class GuiConfigEntries extends GuiListExtended } @Override - public void drawEntry(int slotIndex, int x, int y, int listWidth, int slotHeight, int mouseX, int mouseY, boolean isSelected) + public void func_192634_a(int slotIndex, int x, int y, int listWidth, int slotHeight, int mouseX, int mouseY, boolean isSelected, float partial) { this.btnValue.packedFGColour = GuiUtils.getColorCode(this.configElement.getValidValues()[currentIndex].charAt(0), true); - super.drawEntry(slotIndex, x, y, listWidth, slotHeight, mouseX, mouseY, isSelected); + super.func_192634_a(slotIndex, x, y, listWidth, slotHeight, mouseX, mouseY, isSelected, partial); } @Override @@ -910,14 +910,14 @@ public class GuiConfigEntries extends GuiListExtended public abstract void valueButtonPressed(int slotIndex); @Override - public void drawEntry(int slotIndex, int x, int y, int listWidth, int slotHeight, int mouseX, int mouseY, boolean isSelected) + public void func_192634_a(int slotIndex, int x, int y, int listWidth, int slotHeight, int mouseX, int mouseY, boolean isSelected, float partial) { - super.drawEntry(slotIndex, x, y, listWidth, slotHeight, mouseX, mouseY, isSelected); + super.func_192634_a(slotIndex, x, y, listWidth, slotHeight, mouseX, mouseY, isSelected, partial); this.btnValue.width = this.owningEntryList.controlWidth; this.btnValue.xPosition = this.owningScreen.entryList.controlX; this.btnValue.yPosition = y; this.btnValue.enabled = enabled(); - this.btnValue.drawButton(this.mc, mouseX, mouseY); + this.btnValue.func_191745_a(this.mc, mouseX, mouseY, partial); } /** @@ -1190,9 +1190,9 @@ public class GuiConfigEntries extends GuiListExtended } @Override - public void drawEntry(int slotIndex, int x, int y, int listWidth, int slotHeight, int mouseX, int mouseY, boolean isSelected) + public void func_192634_a(int slotIndex, int x, int y, int listWidth, int slotHeight, int mouseX, int mouseY, boolean isSelected, float partial) { - super.drawEntry(slotIndex, x, y, listWidth, slotHeight, mouseX, mouseY, isSelected); + super.func_192634_a(slotIndex, x, y, listWidth, slotHeight, mouseX, mouseY, isSelected, partial); this.textFieldValue.xPosition = this.owningEntryList.controlX + 2; this.textFieldValue.yPosition = y + 1; this.textFieldValue.width = this.owningEntryList.controlWidth - 4; @@ -1326,14 +1326,14 @@ public class GuiConfigEntries extends GuiListExtended } @Override - public void drawEntry(int slotIndex, int x, int y, int listWidth, int slotHeight, int mouseX, int mouseY, boolean isSelected) + public void func_192634_a(int slotIndex, int x, int y, int listWidth, int slotHeight, int mouseX, int mouseY, boolean isSelected, float partial) { this.btnSelectCategory.xPosition = listWidth / 2 - 150; this.btnSelectCategory.yPosition = y; this.btnSelectCategory.enabled = enabled(); - this.btnSelectCategory.drawButton(this.mc, mouseX, mouseY); + this.btnSelectCategory.func_191745_a(this.mc, mouseX, mouseY, partial); - super.drawEntry(slotIndex, x, y, listWidth, slotHeight, mouseX, mouseY, isSelected); + super.func_192634_a(slotIndex, x, y, listWidth, slotHeight, mouseX, mouseY, isSelected, partial); } @Override @@ -1526,7 +1526,7 @@ public class GuiConfigEntries extends GuiListExtended } @Override - public void drawEntry(int slotIndex, int x, int y, int listWidth, int slotHeight, int mouseX, int mouseY, boolean isSelected) + public void func_192634_a(int slotIndex, int x, int y, int listWidth, int slotHeight, int mouseX, int mouseY, boolean isSelected, float partial) { boolean isChanged = isChanged(); @@ -1545,12 +1545,12 @@ public class GuiConfigEntries extends GuiListExtended this.btnUndoChanges.xPosition = this.owningEntryList.scrollBarX - 44; this.btnUndoChanges.yPosition = y; this.btnUndoChanges.enabled = enabled() && isChanged; - this.btnUndoChanges.drawButton(this.mc, mouseX, mouseY); + this.btnUndoChanges.func_191745_a(this.mc, mouseX, mouseY, partial); this.btnDefault.xPosition = this.owningEntryList.scrollBarX - 22; this.btnDefault.yPosition = y; this.btnDefault.enabled = enabled() && !isDefault(); - this.btnDefault.drawButton(this.mc, mouseX, mouseY); + this.btnDefault.func_191745_a(this.mc, mouseX, mouseY, partial); if (this.tooltipHoverChecker == null) this.tooltipHoverChecker = new HoverChecker(y, y + slotHeight, x, this.owningScreen.entryList.controlX - 8, 800); @@ -1624,7 +1624,7 @@ public class GuiConfigEntries extends GuiListExtended public abstract boolean saveConfigElement(); @Override - public void setSelected(int p_178011_1_, int p_178011_2_, int p_178011_3_){} + public void func_192633_a(int p_178011_1_, int p_178011_2_, int p_178011_3_, float partial){} @Override public boolean enabled() @@ -1674,7 +1674,7 @@ public class GuiConfigEntries extends GuiListExtended int tagStartPosition = tagStartPosition = target.indexOf(tagStart); int tagEndPosition = tagEndPosition = target.indexOf(tagEnd, tagStartPosition + tagStart.length()); - if (-1 == tagStartPosition || -1 == tagEndPosition) + if (-1 == tagStartPosition || -1 == tagEndPosition) return target; String taglessResult = target.substring(0, tagStartPosition); diff --git a/src/main/java/net/minecraftforge/fml/client/config/GuiEditArrayEntries.java b/src/main/java/net/minecraftforge/fml/client/config/GuiEditArrayEntries.java index 4a01e2e2e..759779aac 100644 --- a/src/main/java/net/minecraftforge/fml/client/config/GuiEditArrayEntries.java +++ b/src/main/java/net/minecraftforge/fml/client/config/GuiEditArrayEntries.java @@ -60,7 +60,7 @@ public class GuiEditArrayEntries extends GuiListExtended this.configElement = configElement; this.beforeValues = beforeValues; this.currentValues = currentValues; - this.setShowSelectionBox(false); + this.func_193651_b(false); this.isChanged = !Arrays.deepEquals(beforeValues, currentValues); this.isDefault = Arrays.deepEquals(currentValues, configElement.getDefaults()); this.canAddMoreEntries = !configElement.isListLengthFixed() && (configElement.getMaxListLength() == -1 || currentValues.length < configElement.getMaxListLength()); @@ -450,9 +450,9 @@ public class GuiEditArrayEntries extends GuiListExtended } @Override - public void drawEntry(int slotIndex, int x, int y, int listWidth, int slotHeight, int mouseX, int mouseY, boolean isSelected) + public void func_192634_a(int slotIndex, int x, int y, int listWidth, int slotHeight, int mouseX, int mouseY, boolean isSelected, float partial) { - super.drawEntry(slotIndex, x, y, listWidth, slotHeight, mouseX, mouseY, isSelected); + super.func_192634_a(slotIndex, x, y, listWidth, slotHeight, mouseX, mouseY, isSelected, partial); if (configElement.isListLengthFixed() || slotIndex != owningEntryList.listEntries.size() - 1) { this.textFieldValue.setVisible(true); @@ -516,9 +516,9 @@ public class GuiEditArrayEntries extends GuiListExtended } @Override - public void drawEntry(int slotIndex, int x, int y, int listWidth, int slotHeight, int mouseX, int mouseY, boolean isSelected) + public void func_192634_a(int slotIndex, int x, int y, int listWidth, int slotHeight, int mouseX, int mouseY, boolean isSelected, float partial) { - super.drawEntry(slotIndex, x, y, listWidth, slotHeight, mouseX, mouseY, isSelected); + super.func_192634_a(slotIndex, x, y, listWidth, slotHeight, mouseX, mouseY, isSelected, partial); this.btnValue.xPosition = listWidth / 4; this.btnValue.yPosition = y; @@ -529,7 +529,7 @@ public class GuiEditArrayEntries extends GuiListExtended this.btnValue.displayString = String.valueOf(value); btnValue.packedFGColour = value ? GuiUtils.getColorCode('2', true) : GuiUtils.getColorCode('4', true); - this.btnValue.drawButton(owningEntryList.getMC(), mouseX, mouseY); + this.btnValue.func_191745_a(owningEntryList.getMC(), mouseX, mouseY, partial); } @Override @@ -593,7 +593,7 @@ public class GuiEditArrayEntries extends GuiListExtended } @Override - public void drawEntry(int slotIndex, int x, int y, int listWidth, int slotHeight, int mouseX, int mouseY, boolean isSelected) + public void func_192634_a(int slotIndex, int x, int y, int listWidth, int slotHeight, int mouseX, int mouseY, boolean isSelected, float partial) { if (this.getValue() != null && this.isValidated) owningEntryList.getMC().fontRendererObj.drawString( @@ -608,7 +608,7 @@ public class GuiEditArrayEntries extends GuiListExtended this.btnAddNewEntryAbove.visible = true; this.btnAddNewEntryAbove.xPosition = half + ((half / 2) - 44); this.btnAddNewEntryAbove.yPosition = y; - this.btnAddNewEntryAbove.drawButton(owningEntryList.getMC(), mouseX, mouseY); + this.btnAddNewEntryAbove.func_191745_a(owningEntryList.getMC(), mouseX, mouseY, partial); } else this.btnAddNewEntryAbove.visible = false; @@ -618,7 +618,7 @@ public class GuiEditArrayEntries extends GuiListExtended this.btnRemoveEntry.visible = true; this.btnRemoveEntry.xPosition = half + ((half / 2) - 22); this.btnRemoveEntry.yPosition = y; - this.btnRemoveEntry.drawButton(owningEntryList.getMC(), mouseX, mouseY); + this.btnRemoveEntry.func_191745_a(owningEntryList.getMC(), mouseX, mouseY, partial); } else this.btnRemoveEntry.visible = false; @@ -687,7 +687,7 @@ public class GuiEditArrayEntries extends GuiListExtended } @Override - public void setSelected(int p_178011_1_, int p_178011_2_, int p_178011_3_){} + public void func_192633_a(int p_178011_1_, int p_178011_2_, int p_178011_3_, float partial){} } public static interface IArrayEntry extends GuiListExtended.IGuiListEntry diff --git a/src/main/java/net/minecraftforge/fml/client/config/GuiSelectStringEntries.java b/src/main/java/net/minecraftforge/fml/client/config/GuiSelectStringEntries.java index cbd01a706..5a8a75449 100644 --- a/src/main/java/net/minecraftforge/fml/client/config/GuiSelectStringEntries.java +++ b/src/main/java/net/minecraftforge/fml/client/config/GuiSelectStringEntries.java @@ -54,7 +54,7 @@ public class GuiSelectStringEntries extends GuiListExtended this.mc = mc; this.configElement = configElement; this.selectableValues = selectableValues; - this.setShowSelectionBox(true); + this.func_193651_b(true); listEntries = new ArrayList(); @@ -173,7 +173,7 @@ public class GuiSelectStringEntries extends GuiListExtended } @Override - public void drawEntry(int slotIndex, int x, int y, int listWidth, int slotHeight, int mouseX, int mouseY, boolean isSelected) + public void func_192634_a(int slotIndex, int x, int y, int listWidth, int slotHeight, int mouseX, int mouseY, boolean isSelected, float partial) { owningList.mc.fontRendererObj.drawString(value.getValue(), x + 1, y, slotIndex == owningList.selectedIndex ? 16777215 : 14737632); } @@ -195,7 +195,7 @@ public class GuiSelectStringEntries extends GuiListExtended } @Override - public void setSelected(int p_178011_1_, int p_178011_2_, int p_178011_3_){} + public void func_192633_a(int p_192633_1_, int p_192633_2_, int p_192633_3_, float p_192633_4_){} } public static interface IGuiSelectStringListEntry extends GuiListExtended.IGuiListEntry diff --git a/src/main/java/net/minecraftforge/fml/client/config/GuiUnicodeGlyphButton.java b/src/main/java/net/minecraftforge/fml/client/config/GuiUnicodeGlyphButton.java index 9f3ac46bc..2180756c5 100644 --- a/src/main/java/net/minecraftforge/fml/client/config/GuiUnicodeGlyphButton.java +++ b/src/main/java/net/minecraftforge/fml/client/config/GuiUnicodeGlyphButton.java @@ -41,7 +41,7 @@ public class GuiUnicodeGlyphButton extends GuiButtonExt } @Override - public void drawButton(Minecraft mc, int mouseX, int mouseY) + public void func_191745_a(Minecraft mc, int mouseX, int mouseY, float partial) { if (this.visible) { diff --git a/src/main/java/net/minecraftforge/fml/client/config/GuiUtils.java b/src/main/java/net/minecraftforge/fml/client/config/GuiUtils.java index fdb6b89c8..5c8a5374b 100644 --- a/src/main/java/net/minecraftforge/fml/client/config/GuiUtils.java +++ b/src/main/java/net/minecraftforge/fml/client/config/GuiUtils.java @@ -24,7 +24,7 @@ import net.minecraft.client.gui.FontRenderer; import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.RenderHelper; import net.minecraft.client.renderer.Tessellator; -import net.minecraft.client.renderer.VertexBuffer; +import net.minecraft.client.renderer.BufferBuilder; import net.minecraft.client.renderer.vertex.DefaultVertexFormats; import net.minecraft.item.ItemStack; import net.minecraft.util.ResourceLocation; @@ -201,7 +201,7 @@ public class GuiUtils float uScale = 1f / 0x100; float vScale = 1f / 0x100; Tessellator tessellator = Tessellator.getInstance(); - VertexBuffer wr = tessellator.getBuffer(); + BufferBuilder wr = tessellator.getBuffer(); wr.begin(7, DefaultVertexFormats.POSITION_TEX); wr.pos(x , y + height, zLevel).tex( u * uScale, ((v + height) * vScale)).endVertex(); wr.pos(x + width, y + height, zLevel).tex((u + width) * uScale, ((v + height) * vScale)).endVertex(); @@ -215,14 +215,14 @@ public class GuiUtils /** * Must be called from {@code GuiScreen.renderToolTip} before {@code GuiScreen.drawHoveringText} is called. - * + * * @param stack The stack for which a tooltip is about to be drawn. */ public static void preItemToolTip(@Nonnull ItemStack stack) { cachedTooltipStack = stack; } - + /** * Must be called from {@code GuiScreen.renderToolTip} after {@code GuiScreen.drawHoveringText} is called. */ @@ -250,10 +250,10 @@ public class GuiUtils { drawHoveringText(cachedTooltipStack, textLines, mouseX, mouseY, screenWidth, screenHeight, maxTextWidth, font); } - + /** * Use this version if calling from somewhere where ItemStack context is available. - * + * * @see #drawHoveringText(List, int, int, int, int, int, FontRenderer) */ public static void drawHoveringText(@Nonnull final ItemStack stack, List textLines, int mouseX, int mouseY, int screenWidth, int screenHeight, int maxTextWidth, FontRenderer font) @@ -270,7 +270,7 @@ public class GuiUtils screenHeight = event.getScreenHeight(); maxTextWidth = event.getMaxWidth(); font = event.getFontRenderer(); - + GlStateManager.disableRescaleNormal(); RenderHelper.disableStandardItemLighting(); GlStateManager.disableLighting(); @@ -382,7 +382,7 @@ public class GuiUtils MinecraftForge.EVENT_BUS.post(new RenderTooltipEvent.PostBackground(stack, textLines, tooltipX, tooltipY, font, tooltipTextWidth, tooltipHeight)); int tooltipTop = tooltipY; - + for (int lineNumber = 0; lineNumber < textLines.size(); ++lineNumber) { String line = textLines.get(lineNumber); @@ -423,12 +423,12 @@ public class GuiUtils GlStateManager.shadeModel(7425); Tessellator tessellator = Tessellator.getInstance(); - VertexBuffer vertexbuffer = tessellator.getBuffer(); - vertexbuffer.begin(7, DefaultVertexFormats.POSITION_COLOR); - vertexbuffer.pos(right, top, zLevel).color(startRed, startGreen, startBlue, startAlpha).endVertex(); - vertexbuffer.pos(left, top, zLevel).color(startRed, startGreen, startBlue, startAlpha).endVertex(); - vertexbuffer.pos(left, bottom, zLevel).color(endRed, endGreen, endBlue, endAlpha).endVertex(); - vertexbuffer.pos(right, bottom, zLevel).color(endRed, endGreen, endBlue, endAlpha).endVertex(); + BufferBuilder buffer = tessellator.getBuffer(); + buffer.begin(7, DefaultVertexFormats.POSITION_COLOR); + buffer.pos(right, top, zLevel).color(startRed, startGreen, startBlue, startAlpha).endVertex(); + buffer.pos(left, top, zLevel).color(startRed, startGreen, startBlue, startAlpha).endVertex(); + buffer.pos(left, bottom, zLevel).color(endRed, endGreen, endBlue, endAlpha).endVertex(); + buffer.pos(right, bottom, zLevel).color(endRed, endGreen, endBlue, endAlpha).endVertex(); tessellator.draw(); GlStateManager.shadeModel(7424); diff --git a/src/main/java/net/minecraftforge/fml/common/IWorldGenerator.java b/src/main/java/net/minecraftforge/fml/common/IWorldGenerator.java index 4de13d2fb..1ebccc85f 100644 --- a/src/main/java/net/minecraftforge/fml/common/IWorldGenerator.java +++ b/src/main/java/net/minecraftforge/fml/common/IWorldGenerator.java @@ -22,8 +22,8 @@ package net.minecraftforge.fml.common; import java.util.Random; import net.minecraft.world.World; -import net.minecraft.world.chunk.IChunkGenerator; import net.minecraft.world.chunk.IChunkProvider; +import net.minecraft.world.gen.IChunkGenerator; /** diff --git a/src/main/java/net/minecraftforge/fml/common/discovery/asm/ASMModParser.java b/src/main/java/net/minecraftforge/fml/common/discovery/asm/ASMModParser.java index cd47f094e..221f0ebf6 100644 --- a/src/main/java/net/minecraftforge/fml/common/discovery/asm/ASMModParser.java +++ b/src/main/java/net/minecraftforge/fml/common/discovery/asm/ASMModParser.java @@ -35,6 +35,7 @@ import org.apache.logging.log4j.Level; import org.objectweb.asm.ClassReader; import org.objectweb.asm.Type; +import com.google.common.base.MoreObjects; import com.google.common.base.Objects; import com.google.common.base.Strings; import com.google.common.collect.Lists; @@ -98,7 +99,7 @@ public class ASMModParser @Override public String toString() { - return Objects.toStringHelper("ASMAnnotationDiscoverer") + return MoreObjects.toStringHelper("ASMAnnotationDiscoverer") .add("className", asmType.getClassName()) .add("classVersion", classVersion) .add("superName", asmSuperType.getClassName()) diff --git a/src/main/java/net/minecraftforge/fml/common/discovery/asm/ModAnnotation.java b/src/main/java/net/minecraftforge/fml/common/discovery/asm/ModAnnotation.java index ad0fc72c7..1279368de 100644 --- a/src/main/java/net/minecraftforge/fml/common/discovery/asm/ModAnnotation.java +++ b/src/main/java/net/minecraftforge/fml/common/discovery/asm/ModAnnotation.java @@ -26,7 +26,7 @@ import net.minecraftforge.fml.common.discovery.asm.ASMModParser.AnnotationType; import org.objectweb.asm.Type; -import com.google.common.base.Objects; +import com.google.common.base.MoreObjects; import com.google.common.collect.Lists; import com.google.common.collect.Maps; @@ -74,7 +74,7 @@ public class ModAnnotation @Override public String toString() { - return Objects.toStringHelper("Annotation") + return MoreObjects.toStringHelper("Annotation") .add("type",type) .add("name",asmType.getClassName()) .add("member",member) diff --git a/src/main/java/net/minecraftforge/fml/common/network/handshake/NetworkDispatcher.java b/src/main/java/net/minecraftforge/fml/common/network/handshake/NetworkDispatcher.java index 9faf63a22..63163e34c 100644 --- a/src/main/java/net/minecraftforge/fml/common/network/handshake/NetworkDispatcher.java +++ b/src/main/java/net/minecraftforge/fml/common/network/handshake/NetworkDispatcher.java @@ -71,7 +71,7 @@ import org.apache.logging.log4j.Level; // TODO build test suites to validate the behaviour of this stuff and make it less annoyingly magical public class NetworkDispatcher extends SimpleChannelInboundHandler> implements ChannelOutboundHandler { - private static boolean DEBUG_HANDSHAKE = Boolean.parseBoolean(System.getProperty("fml.debugNetworkHandshake", "false")); + private static boolean DEBUG_HANDSHAKE = Boolean.parseBoolean(System.getProperty("fml.debugNetworkHandshake", "true")); private static enum ConnectionState { OPENING, AWAITING_HANDSHAKE, HANDSHAKING, HANDSHAKECOMPLETE, FINALIZING, CONNECTED; } diff --git a/src/main/java/net/minecraftforge/fml/common/network/internal/FMLNetworkHandler.java b/src/main/java/net/minecraftforge/fml/common/network/internal/FMLNetworkHandler.java index 24cc2a789..f100852fc 100644 --- a/src/main/java/net/minecraftforge/fml/common/network/internal/FMLNetworkHandler.java +++ b/src/main/java/net/minecraftforge/fml/common/network/internal/FMLNetworkHandler.java @@ -54,8 +54,6 @@ import net.minecraftforge.fml.common.registry.EntityRegistry.EntityRegistration; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; -import org.apache.logging.log4j.core.helpers.Integers; - import com.google.common.collect.Lists; import com.google.gson.JsonArray; import com.google.gson.JsonObject; @@ -64,8 +62,8 @@ import javax.annotation.Nullable; public class FMLNetworkHandler { - public static final int READ_TIMEOUT = Integers.parseInt(System.getProperty("fml.readTimeout","30"),30); - public static final int LOGIN_TIMEOUT = Integers.parseInt(System.getProperty("fml.loginTimeout","600"),600); + public static final int READ_TIMEOUT = Integer.parseInt(System.getProperty("fml.readTimeout","30")); + public static final int LOGIN_TIMEOUT = Integer.parseInt(System.getProperty("fml.loginTimeout","600")); private static EnumMap channelPair; public static void fmlServerHandshake(PlayerList scm, NetworkManager manager, EntityPlayerMP player) diff --git a/src/main/java/net/minecraftforge/fml/common/network/internal/FMLProxyPacket.java b/src/main/java/net/minecraftforge/fml/common/network/internal/FMLProxyPacket.java index 701382c95..2860cc243 100644 --- a/src/main/java/net/minecraftforge/fml/common/network/internal/FMLProxyPacket.java +++ b/src/main/java/net/minecraftforge/fml/common/network/internal/FMLProxyPacket.java @@ -41,7 +41,6 @@ import net.minecraftforge.fml.common.network.handshake.NetworkDispatcher; import net.minecraftforge.fml.relauncher.Side; import org.apache.logging.log4j.Level; -import org.apache.logging.log4j.core.helpers.Integers; import com.google.common.collect.ConcurrentHashMultiset; import com.google.common.collect.Lists; @@ -58,7 +57,7 @@ public class FMLProxyPacket implements Packet { private INetHandler netHandler; private NetworkDispatcher dispatcher; private static Multiset badPackets = ConcurrentHashMultiset.create(); - private static int packetCountWarning = Integers.parseInt(System.getProperty("fml.badPacketCounter", "100"), 100); + private static int packetCountWarning = Integer.parseInt(System.getProperty("fml.badPacketCounter", "100")); public FMLProxyPacket(SPacketCustomPayload original) { 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 916596001..da35717c6 100644 --- a/src/main/java/net/minecraftforge/fml/common/registry/GameRegistry.java +++ b/src/main/java/net/minecraftforge/fml/common/registry/GameRegistry.java @@ -43,6 +43,7 @@ import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.CraftingManager; import net.minecraft.item.crafting.FurnaceRecipes; import net.minecraft.item.crafting.IRecipe; +import net.minecraft.item.crafting.Ingredient; import net.minecraft.nbt.JsonToNBT; import net.minecraft.nbt.NBTBase; import net.minecraft.nbt.NBTException; @@ -51,8 +52,8 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ResourceLocation; import net.minecraft.util.math.Vec3d; import net.minecraft.world.World; -import net.minecraft.world.chunk.IChunkGenerator; import net.minecraft.world.chunk.IChunkProvider; +import net.minecraft.world.gen.IChunkGenerator; import net.minecraftforge.fml.common.FMLLog; import net.minecraftforge.fml.common.IFuelHandler; import net.minecraftforge.fml.common.IWorldGenerator; @@ -272,24 +273,25 @@ public class GameRegistry GameData.getMain().registerSubstitutionAlias(nameToSubstitute, type, object); } - public static void addRecipe(@Nonnull ItemStack output, Object... params) + @Deprecated //TODO Make IRecipe a registry + public static IRecipe addShapedRecipe(ResourceLocation name, @Nonnull ItemStack output, Object... params) { - addShapedRecipe(output, params); + throw new RuntimeException("TODO: Forge implement IRecipe registry"); + //return CraftingManager.addRecipe(output, params); } - public static IRecipe addShapedRecipe(@Nonnull ItemStack output, Object... params) + @Deprecated //TODO Make IRecipe a registry + public static void addShapelessRecipe(ResourceLocation name, @Nonnull ItemStack output, Ingredient... params) { - return CraftingManager.getInstance().addRecipe(output, params); + throw new RuntimeException("TODO: Forge implement IRecipe registry"); + //CraftingManager.getInstance().addShapelessRecipe(output, params); } - public static void addShapelessRecipe(@Nonnull ItemStack output, Object... params) + @Deprecated //TODO Make IRecipe a registry + public static void addRecipe(ResourceLocation name, IRecipe recipe) { - CraftingManager.getInstance().addShapelessRecipe(output, params); - } - - public static void addRecipe(IRecipe recipe) - { - CraftingManager.getInstance().getRecipeList().add(recipe); + throw new RuntimeException("TODO: Forge implement IRecipe registry"); + //CraftingManager.getInstance().getRecipeList().add(recipe); } public static void addSmelting(Block input, @Nonnull ItemStack output, float xp) diff --git a/src/main/java/net/minecraftforge/items/wrapper/EntityArmorInvWrapper.java b/src/main/java/net/minecraftforge/items/wrapper/EntityArmorInvWrapper.java new file mode 100644 index 000000000..a14c4f8e5 --- /dev/null +++ b/src/main/java/net/minecraftforge/items/wrapper/EntityArmorInvWrapper.java @@ -0,0 +1,17 @@ +package net.minecraftforge.items.wrapper; + +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.inventory.EntityEquipmentSlot; +import net.minecraftforge.items.IItemHandler; + +/** + * Exposes the armor inventory of an {@link EntityLivingBase} as an {@link IItemHandler} using {@link EntityLivingBase#getItemStackFromSlot} and + * {@link EntityLivingBase#setItemStackToSlot}. + */ +public class EntityArmorInvWrapper extends EntityEquipmentInvWrapper +{ + public EntityArmorInvWrapper(final EntityLivingBase entity) + { + super(entity, EntityEquipmentSlot.Type.ARMOR); + } +} diff --git a/src/main/java/net/minecraftforge/items/wrapper/EntityEquipmentInvWrapper.java b/src/main/java/net/minecraftforge/items/wrapper/EntityEquipmentInvWrapper.java new file mode 100644 index 000000000..362c543c2 --- /dev/null +++ b/src/main/java/net/minecraftforge/items/wrapper/EntityEquipmentInvWrapper.java @@ -0,0 +1,170 @@ +package net.minecraftforge.items.wrapper; + +import com.google.common.collect.ImmutableList; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.inventory.EntityEquipmentSlot; +import net.minecraft.item.ItemStack; +import net.minecraftforge.items.IItemHandler; +import net.minecraftforge.items.IItemHandlerModifiable; +import net.minecraftforge.items.ItemHandlerHelper; + +import javax.annotation.Nonnull; +import java.util.ArrayList; +import java.util.List; + +/** + * Exposes the armor or hands inventory of an {@link EntityLivingBase} as an {@link IItemHandler} using {@link EntityLivingBase#getItemStackFromSlot} and + * {@link EntityLivingBase#setItemStackToSlot}. + */ +public abstract class EntityEquipmentInvWrapper implements IItemHandlerModifiable +{ + /** + * The entity. + */ + protected final EntityLivingBase entity; + + /** + * The slots exposed by this wrapper, with {@link EntityEquipmentSlot#index} as the index. + */ + protected final List slots; + + /** + * @param entity The entity. + * @param slotType The slot type to expose. + */ + public EntityEquipmentInvWrapper(final EntityLivingBase entity, final EntityEquipmentSlot.Type slotType) + { + this.entity = entity; + + final List slots = new ArrayList(); + + for (final EntityEquipmentSlot slot : EntityEquipmentSlot.values()) + { + if (slot.getSlotType() == slotType) + { + slots.add(slot); + } + } + + this.slots = ImmutableList.copyOf(slots); + } + + @Override + public int getSlots() + { + return slots.size(); + } + + @Nonnull + @Override + public ItemStack getStackInSlot(final int slot) + { + return entity.getItemStackFromSlot(validateSlotIndex(slot)); + } + + @Nonnull + @Override + public ItemStack insertItem(final int slot, @Nonnull final ItemStack stack, final boolean simulate) + { + if (stack.isEmpty()) + return ItemStack.EMPTY; + + final EntityEquipmentSlot equipmentSlot = validateSlotIndex(slot); + + final ItemStack existing = entity.getItemStackFromSlot(equipmentSlot); + + int limit = getStackLimit(slot, stack); + + if (!existing.isEmpty()) + { + if (!ItemHandlerHelper.canItemStacksStack(stack, existing)) + return stack; + + limit -= existing.getCount(); + } + + if (limit <= 0) + return stack; + + boolean reachedLimit = stack.getCount() > limit; + + if (!simulate) + { + if (existing.isEmpty()) + { + entity.setItemStackToSlot(equipmentSlot, reachedLimit ? ItemHandlerHelper.copyStackWithSize(stack, limit) : stack); + } + else + { + existing.grow(reachedLimit ? limit : stack.getCount()); + } + } + + return reachedLimit ? ItemHandlerHelper.copyStackWithSize(stack, stack.getCount() - limit) : ItemStack.EMPTY; + } + + @Nonnull + @Override + public ItemStack extractItem(final int slot, final int amount, final boolean simulate) + { + if (amount == 0) + return ItemStack.EMPTY; + + final EntityEquipmentSlot equipmentSlot = validateSlotIndex(slot); + + final ItemStack existing = entity.getItemStackFromSlot(equipmentSlot); + + if (existing.isEmpty()) + return ItemStack.EMPTY; + + final int toExtract = Math.min(amount, existing.getMaxStackSize()); + + if (existing.getCount() <= toExtract) + { + if (!simulate) + { + entity.setItemStackToSlot(equipmentSlot, ItemStack.EMPTY); + } + + return existing; + } + else + { + if (!simulate) + { + entity.setItemStackToSlot(equipmentSlot, ItemHandlerHelper.copyStackWithSize(existing, existing.getCount() - toExtract)); + } + + return ItemHandlerHelper.copyStackWithSize(existing, toExtract); + } + } + + @Override + public int getSlotLimit(final int slot) + { + final EntityEquipmentSlot equipmentSlot = validateSlotIndex(slot); + return equipmentSlot.getSlotType() == EntityEquipmentSlot.Type.ARMOR ? 1 : 64; + } + + protected int getStackLimit(final int slot, @Nonnull final ItemStack stack) + { + return Math.min(getSlotLimit(slot), stack.getMaxStackSize()); + } + + @Override + public void setStackInSlot(final int slot, @Nonnull final ItemStack stack) + { + final EntityEquipmentSlot equipmentSlot = validateSlotIndex(slot); + if (ItemStack.areItemStacksEqual(entity.getItemStackFromSlot(equipmentSlot), stack)) + return; + entity.setItemStackToSlot(equipmentSlot, stack); + } + + protected EntityEquipmentSlot validateSlotIndex(final int slot) + { + if (slot < 0 || slot >= slots.size()) + throw new IllegalArgumentException("Slot " + slot + " not in valid range - [0," + slots.size() + ")"); + + return slots.get(slot); + } +} diff --git a/src/main/java/net/minecraftforge/items/wrapper/EntityHandsInvWrapper.java b/src/main/java/net/minecraftforge/items/wrapper/EntityHandsInvWrapper.java new file mode 100644 index 000000000..e7e704620 --- /dev/null +++ b/src/main/java/net/minecraftforge/items/wrapper/EntityHandsInvWrapper.java @@ -0,0 +1,17 @@ +package net.minecraftforge.items.wrapper; + +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.inventory.EntityEquipmentSlot; +import net.minecraftforge.items.IItemHandler; + +/** + * Exposes the hands inventory of an {@link EntityLivingBase} as an {@link IItemHandler} using {@link EntityLivingBase#getItemStackFromSlot} and + * {@link EntityLivingBase#setItemStackToSlot}. + */ +public class EntityHandsInvWrapper extends EntityEquipmentInvWrapper +{ + public EntityHandsInvWrapper(EntityLivingBase entity) + { + super(entity, EntityEquipmentSlot.Type.HAND); + } +} diff --git a/src/main/java/net/minecraftforge/oredict/OreDictionary.java b/src/main/java/net/minecraftforge/oredict/OreDictionary.java index 9ea8efe5d..759282d05 100644 --- a/src/main/java/net/minecraftforge/oredict/OreDictionary.java +++ b/src/main/java/net/minecraftforge/oredict/OreDictionary.java @@ -25,6 +25,7 @@ import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; +import java.util.Map.Entry; import java.util.Set; import net.minecraft.block.BlockPrismarine; @@ -40,6 +41,7 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.CraftingManager; import net.minecraft.item.crafting.IRecipe; +import net.minecraft.item.crafting.Ingredient; import net.minecraft.item.crafting.ShapedRecipes; import net.minecraft.item.crafting.ShapelessRecipes; import net.minecraftforge.common.MinecraftForge; @@ -347,52 +349,67 @@ public class OreDictionary ItemStack.EMPTY //So the above can have a comma and we don't have to keep editing extra lines. }; - List recipes = CraftingManager.getInstance().getRecipeList(); - List recipesToRemove = new ArrayList(); - List recipesToAdd = new ArrayList(); - + int replaced = 0; // Search vanilla recipes for recipes to replace - for(Object obj : recipes) + for(IRecipe obj : CraftingManager.field_193380_a) { - if(obj.getClass() == ShapedRecipes.class) + if(obj.getClass() == ShapedRecipes.class || obj.getClass() == ShapelessRecipes.class) { - ShapedRecipes recipe = (ShapedRecipes)obj; - ItemStack output = recipe.getRecipeOutput(); + ItemStack output = obj.getRecipeOutput(); if (!output.isEmpty() && containsMatch(false, exclusions, output)) { continue; } - if(containsMatch(true, recipe.recipeItems, replaceStacks)) + NonNullList lst = obj.func_192400_c(); + for (int x = 0; x < lst.size(); x++) { - recipesToRemove.add(recipe); - recipesToAdd.add(new ShapedOreRecipe(recipe, replacements)); - } - } - else if(obj.getClass() == ShapelessRecipes.class) - { - ShapelessRecipes recipe = (ShapelessRecipes)obj; - ItemStack output = recipe.getRecipeOutput(); - if (!output.isEmpty() && containsMatch(false, exclusions, output)) - { - continue; - } + Ingredient ing = lst.get(x); + ItemStack[] ingredients = ing.func_193365_a(); + String oreName = null; + boolean skip = false; - if(containsMatch(true, recipe.recipeItems.toArray(new ItemStack[recipe.recipeItems.size()]), replaceStacks)) - { - recipesToRemove.add((IRecipe)obj); - IRecipe newRecipe = new ShapelessOreRecipe(recipe, replacements); - recipesToAdd.add(newRecipe); + for (ItemStack stack : ingredients) + { + boolean matches = false; + for (Entry ent : replacements.entrySet()) + { + if (itemMatches(ent.getKey(), stack, true)) + { + matches = true; + if (oreName != null && !oreName.equals(ent.getValue())) + { + FMLLog.info("Invalid recipe found with multiple oredict ingredients in the same ingredient..."); //TODO: Write a dumper? + skip = true; + break; + } + else if (oreName == null) + { + oreName = ent.getValue(); + break; + } + } + } + if (!matches && oreName != null) + { + //TODO: Properly fix this, Broken recipe example: Beds + //FMLLog.info("Invalid recipe found with ingredient that partially matches ore entries..."); //TODO: Write a dumper? + skip = true; + } + if (skip) + break; + } + if (!skip && oreName != null) + { + //Replace! + lst.set(x, new OreIngredient(oreName)); + replaced++; + } } } } - recipes.removeAll(recipesToRemove); - recipes.addAll(recipesToAdd); - if (recipesToRemove.size() > 0) - { - FMLLog.info("Replaced %d ore recipes", recipesToRemove.size()); - } + FMLLog.info("Replaced %d ore ingredients", replaced); } /** diff --git a/src/main/java/net/minecraftforge/oredict/OreIngredient.java b/src/main/java/net/minecraftforge/oredict/OreIngredient.java new file mode 100644 index 000000000..ea466b408 --- /dev/null +++ b/src/main/java/net/minecraftforge/oredict/OreIngredient.java @@ -0,0 +1,85 @@ +/* + * Minecraft Forge + * Copyright (c) 2016. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation version 2.1 + * of the License. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ +package net.minecraftforge.oredict; + +import javax.annotation.Nullable; + +import it.unimi.dsi.fastutil.ints.IntArrayList; +import it.unimi.dsi.fastutil.ints.IntComparators; +import it.unimi.dsi.fastutil.ints.IntList; +import net.minecraft.client.util.RecipeItemHelper; +import net.minecraft.item.ItemStack; +import net.minecraft.item.crafting.Ingredient; +import net.minecraft.util.NonNullList; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; + +public class OreIngredient extends Ingredient +{ + private NonNullList ores; + private IntList itemIds = null; + + public OreIngredient(String ore) + { + super(0); + ores = OreDictionary.getOres(ore); + } + + @Override + public ItemStack[] func_193365_a() + { + return ores.toArray(new ItemStack[ores.size()]); + } + + @SideOnly(Side.CLIENT) + public IntList func_194139_b() + { + if (this.itemIds == null || this.itemIds.size() != ores.size()) + { + this.itemIds = new IntArrayList(this.ores.size()); + + for (ItemStack itemstack : this.ores) + { + this.itemIds.add(RecipeItemHelper.func_194113_b(itemstack)); + } + + this.itemIds.sort(IntComparators.NATURAL_COMPARATOR); + } + + return this.itemIds; + } + + + public boolean apply(@Nullable ItemStack target) + { + if (target == null) + return false; + + for (ItemStack ore : this.ores) + if (OreDictionary.itemMatches(target, ore, false)) + return true; + + return false; + } + + protected void invalidate() + { + this.itemIds = null; + } +} diff --git a/src/main/java/net/minecraftforge/oredict/RecipeSorter.java b/src/main/java/net/minecraftforge/oredict/RecipeSorter.java index a441cf566..2dadc0f35 100644 --- a/src/main/java/net/minecraftforge/oredict/RecipeSorter.java +++ b/src/main/java/net/minecraftforge/oredict/RecipeSorter.java @@ -51,7 +51,7 @@ import net.minecraft.item.crafting.RecipesBanners.RecipeDuplicatePattern; import javax.annotation.Nullable; import static net.minecraftforge.oredict.RecipeSorter.Category.*; - +@Deprecated //DO NOT USE IN 1.12 UNTIL THIS DEPRECATION MARKER IS REMOVED THIS WILL MOST LIKELY BE DELETED YOU HAVE BEEN WARNED public class RecipeSorter implements Comparator { public enum Category @@ -171,8 +171,8 @@ public class RecipeSorter implements Comparator } else { - if (r2.getRecipeSize() < r1.getRecipeSize()) return -1; - if (r2.getRecipeSize() > r1.getRecipeSize()) return 1; + if (r2.func_192400_c().size() < r1.func_192400_c().size()) return -1; + if (r2.func_192400_c().size() > r1.func_192400_c().size()) return 1; return getPriority(r2) - getPriority(r1); // high priority value first! } } @@ -183,7 +183,7 @@ public class RecipeSorter implements Comparator bake(); FMLLog.fine("Sorting recipes"); warned.clear(); - Collections.sort(CraftingManager.getInstance().getRecipeList(), INSTANCE); + //Collections.sort(CraftingManager.getInstance().getRecipeList(), INSTANCE); } public static void register(String name, Class recipe, Category category, String dependencies) diff --git a/src/main/java/net/minecraftforge/oredict/ShapedOreRecipe.java b/src/main/java/net/minecraftforge/oredict/ShapedOreRecipe.java index 67ad846af..2997ed1c1 100644 --- a/src/main/java/net/minecraftforge/oredict/ShapedOreRecipe.java +++ b/src/main/java/net/minecraftforge/oredict/ShapedOreRecipe.java @@ -19,23 +19,22 @@ package net.minecraftforge.oredict; -import java.util.List; import java.util.HashMap; -import java.util.Iterator; -import java.util.Map; -import java.util.Map.Entry; import net.minecraft.block.Block; import net.minecraft.item.crafting.IRecipe; +import net.minecraft.item.crafting.Ingredient; import net.minecraft.inventory.InventoryCrafting; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; -import net.minecraft.item.crafting.ShapedRecipes; import net.minecraft.util.NonNullList; +import net.minecraft.util.ResourceLocation; import net.minecraft.world.World; import net.minecraftforge.common.ForgeHooks; import javax.annotation.Nonnull; +import com.google.common.collect.Maps; + public class ShapedOreRecipe implements IRecipe { //Added in for future ease of change, but hard coded for now. @@ -44,15 +43,17 @@ public class ShapedOreRecipe implements IRecipe @Nonnull protected ItemStack output = ItemStack.EMPTY; - protected Object[] input = null; + protected NonNullList input = null; protected int width = 0; protected int height = 0; protected boolean mirrored = true; + protected ResourceLocation group; - public ShapedOreRecipe(Block result, Object... recipe){ this(new ItemStack(result), recipe); } - public ShapedOreRecipe(Item result, Object... recipe){ this(new ItemStack(result), recipe); } - public ShapedOreRecipe(@Nonnull ItemStack result, Object... recipe) + public ShapedOreRecipe(ResourceLocation group, Block result, Object... recipe){ this(group, new ItemStack(result), recipe); } + public ShapedOreRecipe(ResourceLocation group, Item result, Object... recipe){ this(group, new ItemStack(result), recipe); } + public ShapedOreRecipe(ResourceLocation group, @Nonnull ItemStack result, Object... recipe) { + this.group = group; output = result.copy(); String shape = ""; @@ -105,7 +106,7 @@ public class ShapedOreRecipe implements IRecipe throw new RuntimeException(ret); } - HashMap itemMap = new HashMap(); + HashMap itemMap = Maps.newHashMap(); for (; idx < recipe.length; idx += 2) { @@ -114,19 +115,23 @@ public class ShapedOreRecipe implements IRecipe if (in instanceof ItemStack) { - itemMap.put(chr, ((ItemStack)in).copy()); + itemMap.put(chr, Ingredient.func_193369_a(((ItemStack)in).copy())); } else if (in instanceof Item) { - itemMap.put(chr, new ItemStack((Item)in)); + itemMap.put(chr, Ingredient.func_193367_a((Item)in)); } else if (in instanceof Block) { - itemMap.put(chr, new ItemStack((Block)in, 1, OreDictionary.WILDCARD_VALUE)); + itemMap.put(chr, Ingredient.func_193369_a(new ItemStack((Block)in, 1, OreDictionary.WILDCARD_VALUE))); } else if (in instanceof String) { - itemMap.put(chr, OreDictionary.getOres((String)in)); + itemMap.put(chr, new OreIngredient((String)in)); + } + else if (in instanceof Ingredient) + { + itemMap.put(chr, (Ingredient)in); } else { @@ -140,38 +145,11 @@ public class ShapedOreRecipe implements IRecipe } } - input = new Object[width * height]; + this.input = NonNullList.withSize(width * height, Ingredient.field_193370_a); int x = 0; for (char chr : shape.toCharArray()) { - input[x++] = itemMap.get(chr); - } - } - - ShapedOreRecipe(ShapedRecipes recipe, Map replacements) - { - output = recipe.getRecipeOutput(); - width = recipe.recipeWidth; - height = recipe.recipeHeight; - - input = new Object[recipe.recipeItems.length]; - - for(int i = 0; i < input.length; i++) - { - ItemStack ingredient = recipe.recipeItems[i]; - - if(ingredient.isEmpty()) continue; - - input[i] = recipe.recipeItems[i]; - - for(Entry replace : replacements.entrySet()) - { - if(OreDictionary.itemMatches(replace.getKey(), ingredient, true)) - { - input[i] = OreDictionary.getOres(replace.getValue()); - break; - } - } + input.add(x++, itemMap.get(chr)); } } @@ -179,9 +157,6 @@ public class ShapedOreRecipe implements IRecipe @Nonnull public ItemStack getCraftingResult(@Nonnull InventoryCrafting var1){ return output.copy(); } - @Override - public int getRecipeSize(){ return input.length; } - @Override @Nonnull public ItemStack getRecipeOutput(){ return output; } @@ -208,7 +183,6 @@ public class ShapedOreRecipe implements IRecipe return false; } - @SuppressWarnings("unchecked") protected boolean checkMatch(InventoryCrafting inv, int startX, int startY, boolean mirror) { for (int x = 0; x < MAX_CRAFT_GRID_WIDTH; x++) @@ -217,45 +191,21 @@ public class ShapedOreRecipe implements IRecipe { int subX = x - startX; int subY = y - startY; - Object target = null; + Ingredient target = null; if (subX >= 0 && subY >= 0 && subX < width && subY < height) { if (mirror) { - target = input[width - subX - 1 + subY * width]; + target = input.get(width - subX - 1 + subY * width); } else { - target = input[subX + subY * width]; + target = input.get(subX + subY * width); } } - ItemStack slot = inv.getStackInRowAndColumn(x, y); - - if (target instanceof ItemStack) - { - if (!OreDictionary.itemMatches((ItemStack)target, slot, false)) - { - return false; - } - } - else if (target instanceof List) - { - boolean matched = false; - - Iterator itr = ((List)target).iterator(); - while (itr.hasNext() && !matched) - { - matched = OreDictionary.itemMatches(itr.next(), slot, false); - } - - if (!matched) - { - return false; - } - } - else if (target == null && !slot.isEmpty()) + if (!target.apply(inv.getStackInRowAndColumn(x, y))) { return false; } @@ -271,12 +221,7 @@ public class ShapedOreRecipe implements IRecipe return this; } - /** - * Returns the input for this recipe, any mod accessing this value should never - * manipulate the values in this array as it will effect the recipe itself. - * @return The recipes input vales. - */ - public Object[] getInput() + public NonNullList func_192400_c() { return this.input; } @@ -296,4 +241,14 @@ public class ShapedOreRecipe implements IRecipe { return height; } + + public String func_193358_e() + { + return this.group.toString(); + } + + public boolean func_194133_a(int p_194133_1_, int p_194133_2_) + { + return p_194133_1_ >= this.width && p_194133_2_ >= this.height; + } } diff --git a/src/main/java/net/minecraftforge/oredict/ShapelessOreRecipe.java b/src/main/java/net/minecraftforge/oredict/ShapelessOreRecipe.java index 59a3bc32a..9042a950f 100644 --- a/src/main/java/net/minecraftforge/oredict/ShapelessOreRecipe.java +++ b/src/main/java/net/minecraftforge/oredict/ShapelessOreRecipe.java @@ -25,11 +25,13 @@ import java.util.Map.Entry; import java.util.List; import net.minecraft.block.Block; import net.minecraft.item.crafting.IRecipe; +import net.minecraft.item.crafting.Ingredient; 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.util.ResourceLocation; import net.minecraft.world.World; import net.minecraftforge.common.ForgeHooks; @@ -39,31 +41,37 @@ public class ShapelessOreRecipe implements IRecipe { @Nonnull protected ItemStack output = ItemStack.EMPTY; - protected NonNullList input = NonNullList.create(); + protected NonNullList input = NonNullList.create(); + protected ResourceLocation group; - public ShapelessOreRecipe(Block result, Object... recipe){ this(new ItemStack(result), recipe); } - public ShapelessOreRecipe(Item result, Object... recipe){ this(new ItemStack(result), recipe); } + public ShapelessOreRecipe(ResourceLocation group, Block result, Object... recipe){ this(group, new ItemStack(result), recipe); } + public ShapelessOreRecipe(ResourceLocation group, Item result, Object... recipe){ this(group, new ItemStack(result), recipe); } - public ShapelessOreRecipe(@Nonnull ItemStack result, Object... recipe) + public ShapelessOreRecipe(ResourceLocation group, @Nonnull ItemStack result, Object... recipe) { + this.group = group; output = result.copy(); for (Object in : recipe) { if (in instanceof ItemStack) { - input.add(((ItemStack)in).copy()); + input.add(Ingredient.func_193369_a(((ItemStack)in).copy())); } else if (in instanceof Item) { - input.add(new ItemStack((Item)in)); + input.add(Ingredient.func_193367_a((Item)in)); } else if (in instanceof Block) { - input.add(new ItemStack((Block)in)); + input.add(Ingredient.func_193369_a(new ItemStack((Block)in, 1, OreDictionary.WILDCARD_VALUE))); } else if (in instanceof String) { - input.add(OreDictionary.getOres((String)in)); + input.add(new OreIngredient((String)in)); + } + else if (in instanceof Ingredient) + { + input.add((Ingredient)in); } else { @@ -78,28 +86,6 @@ public class ShapelessOreRecipe implements IRecipe } } - ShapelessOreRecipe(ShapelessRecipes recipe, Map replacements) - { - output = recipe.getRecipeOutput(); - - for(ItemStack ingredient : recipe.recipeItems) - { - Object finalObj = ingredient; - for(Entry replace : replacements.entrySet()) - { - if(OreDictionary.itemMatches(replace.getKey(), ingredient, false)) - { - finalObj = OreDictionary.getOres(replace.getValue()); - break; - } - } - input.add(finalObj); - } - } - - @Override - public int getRecipeSize(){ return input.size(); } - @Override @Nonnull public ItemStack getRecipeOutput(){ return output; } @@ -112,7 +98,7 @@ public class ShapelessOreRecipe implements IRecipe @Override public boolean matches(InventoryCrafting var1, World world) { - NonNullList required = NonNullList.create(); + NonNullList required = NonNullList.create(); required.addAll(input); for (int x = 0; x < var1.getSizeInventory(); x++) @@ -122,31 +108,14 @@ public class ShapelessOreRecipe implements IRecipe if (!slot.isEmpty()) { boolean inRecipe = false; - Iterator req = required.iterator(); + Iterator req = required.iterator(); while (req.hasNext()) { - boolean match = false; - - Object next = req.next(); - - if (next instanceof ItemStack) - { - match = OreDictionary.itemMatches((ItemStack)next, slot, false); - } - else if (next instanceof List) - { - Iterator itr = ((List)next).iterator(); - while (itr.hasNext() && !match) - { - match = OreDictionary.itemMatches(itr.next(), slot, false); - } - } - - if (match) + if (req.next().apply(slot)) { inRecipe = true; - required.remove(next); + req.remove(); break; } } @@ -161,20 +130,26 @@ public class ShapelessOreRecipe implements IRecipe return required.isEmpty(); } - /** - * Returns the input for this recipe, any mod accessing this value should never - * manipulate the values in this array as it will effect the recipe itself. - * @return The recipes input vales. - */ - public NonNullList getInput() + + public NonNullList func_192400_c() { return this.input; } @Override @Nonnull - public NonNullList getRemainingItems(InventoryCrafting inv) //getRecipeLeftovers + public NonNullList getRemainingItems(InventoryCrafting inv) { return ForgeHooks.defaultRecipeGetRemainingItems(inv); } + + public String func_193358_e() + { + return this.group.toString(); + } + + public boolean func_194133_a(int p_194133_1_, int p_194133_2_) + { + return p_194133_1_ * p_194133_2_ >= this.input.size(); + } } diff --git a/src/main/java/net/minecraftforge/server/console/TerminalConsoleAppender.java b/src/main/java/net/minecraftforge/server/console/TerminalConsoleAppender.java index 1ea39f38d..53b0d155e 100644 --- a/src/main/java/net/minecraftforge/server/console/TerminalConsoleAppender.java +++ b/src/main/java/net/minecraftforge/server/console/TerminalConsoleAppender.java @@ -21,7 +21,6 @@ package net.minecraftforge.server.console; import static jline.TerminalFactory.OFF; import static jline.console.ConsoleReader.RESET_LINE; -import static org.apache.logging.log4j.core.helpers.Booleans.parseBoolean; import java.io.IOException; import java.io.PrintStream; @@ -89,10 +88,10 @@ public class TerminalConsoleAppender extends AbstractAppender } if (layout == null) { - layout = PatternLayout.createLayout(null, null, null, null, null); + layout = PatternLayout.newBuilder().build(); } - boolean ignoreExceptions = parseBoolean(ignore, true); + boolean ignoreExceptions = Boolean.parseBoolean(ignore); // This is handled by jline System.setProperty("log4j.skipJansi", "true"); diff --git a/src/main/resources/forge_at.cfg b/src/main/resources/forge_at.cfg index 68aece7c2..984a84678 100644 --- a/src/main/resources/forge_at.cfg +++ b/src/main/resources/forge_at.cfg @@ -139,8 +139,8 @@ protected net.minecraft.client.renderer.block.model.ModelBakery func_188638_a(Ln # EnumFacing public net.minecraft.util.EnumFacing field_82609_l # VALUES public net.minecraft.util.EnumFacing field_176754_o # HORIZONTALS -public net.minecraft.client.renderer.VertexBuffer func_78909_a(I)I # getColorIndex -public net.minecraft.client.renderer.VertexBuffer func_178972_a(IIIII)V # putColorRGBA +public net.minecraft.client.renderer.BufferBuilder func_78909_a(I)I # getColorIndex +public net.minecraft.client.renderer.BufferBuilder func_178972_a(IIII)V # putColorRGB -- Add A? # ModelBlock Constructor #public net.minecraft.client.renderer.block.model.ModelBlock (Lnet/minecraft/util/ResourceLocation;Ljava/util/List;Ljava/util/Map;ZZLnet/minecraft/client/renderer/block/model/ItemCameraTransforms;)V # RenderLivingEntity @@ -234,35 +234,35 @@ protected net.minecraft.client.gui.FontRenderer field_78296_k # posY protected net.minecraft.client.gui.FontRenderer func_78266_a(IZ)F # renderDefaultChar protected net.minecraft.client.gui.FontRenderer func_78277_a(CZ)F # renderUnicodeChar -# ChunkProviderEnd -private-f net.minecraft.world.gen.ChunkProviderEnd field_185969_i #lperlin1 -private-f net.minecraft.world.gen.ChunkProviderEnd field_185970_j #lperlin2 -private-f net.minecraft.world.gen.ChunkProviderEnd field_185971_k #perlin -private-f net.minecraft.world.gen.ChunkProviderEnd field_185973_o #island +# ChunkGeneratorEnd +private-f net.minecraft.world.gen.ChunkGeneratorEnd field_185969_i #lperlin1 +private-f net.minecraft.world.gen.ChunkGeneratorEnd field_185970_j #lperlin2 +private-f net.minecraft.world.gen.ChunkGeneratorEnd field_185971_k #perlin +private-f net.minecraft.world.gen.ChunkGeneratorEnd field_185973_o #island -# ChunkProviderOverworld -private-f net.minecraft.world.gen.ChunkProviderOverworld field_185991_j #lperlin1 -private-f net.minecraft.world.gen.ChunkProviderOverworld field_185992_k #lperlin2 -private-f net.minecraft.world.gen.ChunkProviderOverworld field_185993_l #perlin -private-f net.minecraft.world.gen.ChunkProviderOverworld field_185994_m #surface -private-f net.minecraft.world.gen.ChunkProviderOverworld field_185979_A #ravineGenerator -private-f net.minecraft.world.gen.ChunkProviderOverworld field_185980_B #oceanMonumentGenerator -private-f net.minecraft.world.gen.ChunkProviderOverworld field_186003_v #caveGenerator -private-f net.minecraft.world.gen.ChunkProviderOverworld field_186004_w #strongholdGenerator -private-f net.minecraft.world.gen.ChunkProviderOverworld field_186005_x #villageGenerator -private-f net.minecraft.world.gen.ChunkProviderOverworld field_186006_y #mineshaftGenerator -private-f net.minecraft.world.gen.ChunkProviderOverworld field_186007_z #scatteredFeatureGenerator +# ChunkGeneratorOverworld +private-f net.minecraft.world.gen.ChunkGeneratorOverworld field_185991_j #lperlin1 +private-f net.minecraft.world.gen.ChunkGeneratorOverworld field_185992_k #lperlin2 +private-f net.minecraft.world.gen.ChunkGeneratorOverworld field_185993_l #perlin +private-f net.minecraft.world.gen.ChunkGeneratorOverworld field_185994_m #surface +private-f net.minecraft.world.gen.ChunkGeneratorOverworld field_185979_A #ravineGenerator +private-f net.minecraft.world.gen.ChunkGeneratorOverworld field_185980_B #oceanMonumentGenerator +private-f net.minecraft.world.gen.ChunkGeneratorOverworld field_186003_v #caveGenerator +private-f net.minecraft.world.gen.ChunkGeneratorOverworld field_186004_w #strongholdGenerator +private-f net.minecraft.world.gen.ChunkGeneratorOverworld field_186005_x #villageGenerator +private-f net.minecraft.world.gen.ChunkGeneratorOverworld field_186006_y #mineshaftGenerator +private-f net.minecraft.world.gen.ChunkGeneratorOverworld field_186007_z #scatteredFeatureGenerator -# ChunkProviderHell -private-f net.minecraft.world.gen.ChunkProviderHell field_185957_u #lperlin1 -private-f net.minecraft.world.gen.ChunkProviderHell field_185958_v #lperlin2 -private-f net.minecraft.world.gen.ChunkProviderHell field_185959_w #perlin -private-f net.minecraft.world.gen.ChunkProviderHell field_73177_m #perlin2 -private-f net.minecraft.world.gen.ChunkProviderHell field_73174_n #perlin3 -public-f net.minecraft.world.gen.ChunkProviderHell field_185946_g #scale -public-f net.minecraft.world.gen.ChunkProviderHell field_185947_h #depth -private-f net.minecraft.world.gen.ChunkProviderHell field_185939_I #netherCaveGenerator -private-f net.minecraft.world.gen.ChunkProviderHell field_73172_c #netherBridgeGenerator +# ChunkGeneratorHell +private-f net.minecraft.world.gen.ChunkGeneratorHell field_185957_u #lperlin1 +private-f net.minecraft.world.gen.ChunkGeneratorHell field_185958_v #lperlin2 +private-f net.minecraft.world.gen.ChunkGeneratorHell field_185959_w #perlin +private-f net.minecraft.world.gen.ChunkGeneratorHell field_73177_m #perlin2 +private-f net.minecraft.world.gen.ChunkGeneratorHell field_73174_n #perlin3 +public-f net.minecraft.world.gen.ChunkGeneratorHell field_185946_g #scale +public-f net.minecraft.world.gen.ChunkGeneratorHell field_185947_h #depth +private-f net.minecraft.world.gen.ChunkGeneratorHell field_185939_I #netherCaveGenerator +private-f net.minecraft.world.gen.ChunkGeneratorHell field_73172_c #netherBridgeGenerator # PlayerManager private-f net.minecraft.server.management.PlayerChunkMapEntry field_187285_e # field_187285_e @@ -282,11 +282,11 @@ public net.minecraft.nbt.NBTPrimitive public net.minecraft.client.gui.GuiOverlayDebug func_181554_e()V # renderLagometer # Expose vanilla brewing recipe system -public net.minecraft.potion.PotionHelper$ItemPredicateInstance public net.minecraft.potion.PotionHelper$MixPredicate -public net.minecraft.potion.PotionHelper func_185201_a(Lnet/minecraft/item/ItemPotion;Lnet/minecraft/potion/PotionHelper$ItemPredicateInstance;Lnet/minecraft/item/ItemPotion;)V # registerPotionItemConversion -public net.minecraft.potion.PotionHelper func_185202_a(Lnet/minecraft/potion/PotionHelper$ItemPredicateInstance;)V # registerPotionItem -public net.minecraft.potion.PotionHelper func_185204_a(Lnet/minecraft/potion/PotionType;Lcom/google/common/base/Predicate;Lnet/minecraft/potion/PotionType;)V # registerPotionTypeConversion +public net.minecraft.potion.PotionHelper func_193355_a(Lnet/minecraft/item/ItemPotion;Lnet/minecraft/item/Item;Lnet/minecraft/item/ItemPotion;)V # registerPotionItemConversion +public net.minecraft.potion.PotionHelper func_193354_a(Lnet/minecraft/item/ItemPotion;)V # registerPotionItem +public net.minecraft.potion.PotionHelper func_193357_a(Lnet/minecraft/potion/PotionType;Lnet/minecraft/item/Item;Lnet/minecraft/potion/PotionType;)V # registerPotionTypeConversion +public net.minecraft.potion.PotionHelper func_193356_a(Lnet/minecraft/potion/PotionType;Lnet/minecraft/item/crafting/Ingredient;Lnet/minecraft/potion/PotionType;)V # registerPotionTypeConversion # TileEntityHopper public net.minecraft.tileentity.TileEntityHopper func_174914_o()Z # mayTransfer diff --git a/src/test/java/net/minecraftforge/debug/DynBucketTest.java b/src/test/java/net/minecraftforge/debug/DynBucketTest.java index 5aff3a7dd..4223ee7e9 100644 --- a/src/test/java/net/minecraftforge/debug/DynBucketTest.java +++ b/src/test/java/net/minecraftforge/debug/DynBucketTest.java @@ -145,7 +145,7 @@ public class DynBucketTest //GameRegistry.registerItem(dynBucket, "dynbucket"); GameRegistry.register(dynBottle); ItemStack filledBucket = UniversalBucket.getFilledBucket(ForgeModContainer.getInstance().universalBucket, TestFluid.instance); - GameRegistry.addShapelessRecipe(new ItemStack(Items.DIAMOND), filledBucket); + //GameRegistry.addShapelessRecipe(new ItemStack(Items.DIAMOND), filledBucket); proxy.setupModels(); //MinecraftForge.EVENT_BUS.register(this); @@ -236,8 +236,10 @@ public class DynBucketTest } @Override - public void getSubItems(Item itemIn, CreativeTabs tab, NonNullList subItems) + public void getSubItems(CreativeTabs tab, NonNullList subItems) { + if (!this.func_194125_a(tab)) + return; for (int i = 0; i < 4; i++) { ItemStack bucket = new ItemStack(this, 1, i); diff --git a/src/test/java/net/minecraftforge/debug/FluidHandlerTest.java b/src/test/java/net/minecraftforge/debug/FluidHandlerTest.java index bfb998bd4..1d7ad6fb1 100644 --- a/src/test/java/net/minecraftforge/debug/FluidHandlerTest.java +++ b/src/test/java/net/minecraftforge/debug/FluidHandlerTest.java @@ -134,7 +134,7 @@ public class FluidHandlerTest { for (CreativeTabs tab : item.getCreativeTabs()) { - item.getSubItems(item, tab, list); + item.getSubItems(tab, list); } } return list; diff --git a/src/test/java/net/minecraftforge/debug/FluidPlacementTest.java b/src/test/java/net/minecraftforge/debug/FluidPlacementTest.java index cc5866264..d9ae12a75 100644 --- a/src/test/java/net/minecraftforge/debug/FluidPlacementTest.java +++ b/src/test/java/net/minecraftforge/debug/FluidPlacementTest.java @@ -6,6 +6,7 @@ import net.minecraft.client.renderer.ItemMeshDefinition; import net.minecraft.client.renderer.block.model.ModelBakery; import net.minecraft.client.renderer.block.model.ModelResourceLocation; import net.minecraft.client.renderer.block.statemap.StateMapperBase; +import net.minecraft.client.util.ITooltipFlag; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; @@ -17,6 +18,7 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.NonNullList; import net.minecraft.util.ResourceLocation; +import net.minecraft.world.World; import net.minecraftforge.client.model.ModelLoader; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.common.capabilities.ICapabilityProvider; @@ -235,7 +237,7 @@ public class FluidPlacementTest @Override @SideOnly(Side.CLIENT) - public void addInformation(ItemStack stack, EntityPlayer playerIn, List tooltip, boolean advanced) + public void addInformation(ItemStack stack, @Nullable World playerIn, List tooltip, ITooltipFlag advanced) { FluidStack fluid = getFluid(stack); if (fluid != null) @@ -245,8 +247,10 @@ public class FluidPlacementTest } @Override - public void getSubItems(@Nonnull Item itemIn, @Nullable CreativeTabs tab, @Nonnull NonNullList subItems) + public void getSubItems(@Nullable CreativeTabs tab, @Nonnull NonNullList subItems) { + if (!this.func_194125_a(tab)) + return; Fluid[] fluids = new Fluid[]{FluidRegistry.WATER, FluidRegistry.LAVA, FiniteFluid.instance, ModelFluidDebug.TestFluid.instance}; // add 16 variable fillings for (Fluid fluid : fluids) @@ -278,4 +282,4 @@ public class FluidPlacementTest return new FluidHandlerItemStack.SwapEmpty(stack, new ItemStack(EmptyFluidContainer.instance), 1000); } } -} \ No newline at end of file +} diff --git a/src/test/java/net/minecraftforge/debug/ItemTileDebug.java b/src/test/java/net/minecraftforge/debug/ItemTileDebug.java index 66c744af2..d4c2e666d 100644 --- a/src/test/java/net/minecraftforge/debug/ItemTileDebug.java +++ b/src/test/java/net/minecraftforge/debug/ItemTileDebug.java @@ -113,7 +113,7 @@ public class ItemTileDebug } @Override - public void renderTileEntityAt(CustomTileEntity p_180535_1_, double x, double y, double z, float p_180535_8_, int p_180535_9_) + public void func_192841_a(CustomTileEntity p_180535_1_, double x, double y, double z, float p_180535_8_, int p_180535_9_, float partial) { glPushMatrix(); glTranslated(x, y, z); diff --git a/src/test/java/net/minecraftforge/debug/NBTShareTagItemTest.java b/src/test/java/net/minecraftforge/debug/NBTShareTagItemTest.java index 2926f1b37..9a75ef1db 100644 --- a/src/test/java/net/minecraftforge/debug/NBTShareTagItemTest.java +++ b/src/test/java/net/minecraftforge/debug/NBTShareTagItemTest.java @@ -39,7 +39,7 @@ public class NBTShareTagItemTest NBTTagCompound craftedNBT = new NBTTagCompound(); craftedNBT.setBoolean("crafted", true); crafted.setTagCompound(craftedNBT); - CraftingManager.getInstance().addShapelessRecipe(crafted, new ItemStack(Items.STICK)); + //CraftingManager.getInstance().addShapelessRecipe(crafted, new ItemStack(Items.STICK)); } public static class ShareTagItem extends Item @@ -61,9 +61,11 @@ public class NBTShareTagItemTest } @Override - public void getSubItems(Item itemIn, CreativeTabs tab, NonNullList subItems) + public void getSubItems(CreativeTabs tab, NonNullList subItems) { - ItemStack creativeMenuItem = new ItemStack(itemIn); + if (!this.func_194125_a(tab)) + return; + ItemStack creativeMenuItem = new ItemStack(this); NBTTagCompound creativeMenuNBT = new NBTTagCompound(); creativeMenuNBT.setBoolean("creativeMenu", true); creativeMenuItem.setTagCompound(creativeMenuNBT); diff --git a/src/test/java/net/minecraftforge/debug/NoBedSleepingTest.java b/src/test/java/net/minecraftforge/debug/NoBedSleepingTest.java index bb582abee..77d698b7e 100644 --- a/src/test/java/net/minecraftforge/debug/NoBedSleepingTest.java +++ b/src/test/java/net/minecraftforge/debug/NoBedSleepingTest.java @@ -2,6 +2,7 @@ package net.minecraftforge.debug; import net.minecraft.client.renderer.block.model.ModelResourceLocation; import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer.SleepResult; import net.minecraft.item.Item; @@ -79,9 +80,9 @@ public class NoBedSleepingTest public static class EventHandler { @SubscribeEvent - public void onEntityConstruct(AttachCapabilitiesEvent.Entity evt) + public void onEntityConstruct(AttachCapabilitiesEvent evt) { - if (!(evt.getEntity() instanceof EntityPlayer)) + if (!(evt.getObject() instanceof EntityPlayer)) { return; } diff --git a/src/test/java/net/minecraftforge/debug/PotionRegistryDebug.java b/src/test/java/net/minecraftforge/debug/PotionRegistryDebug.java index e4354d857..2aef6b844 100644 --- a/src/test/java/net/minecraftforge/debug/PotionRegistryDebug.java +++ b/src/test/java/net/minecraftforge/debug/PotionRegistryDebug.java @@ -3,9 +3,9 @@ package net.minecraftforge.debug; import gnu.trove.set.TIntSet; import gnu.trove.set.hash.TIntHashSet; import net.minecraft.client.Minecraft; +import net.minecraft.client.renderer.BufferBuilder; import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.Tessellator; -import net.minecraft.client.renderer.VertexBuffer; import net.minecraft.client.renderer.texture.TextureAtlasSprite; import net.minecraft.client.renderer.texture.TextureMap; import net.minecraft.client.renderer.vertex.DefaultVertexFormats; @@ -81,7 +81,7 @@ public class PotionRegistryDebug float a = (float) (potion.getLiquidColor() & 255) / 255.0F; Tessellator tessellator = Tessellator.getInstance(); - VertexBuffer buf = tessellator.getBuffer(); + BufferBuilder buf = tessellator.getBuffer(); buf.begin(7, DefaultVertexFormats.POSITION_TEX); GlStateManager.color(r, g, b, a); buf.pos((double) x, (double) (y + height), 0.0D).tex(sprite.getMinU(), sprite.getMaxV()).endVertex(); @@ -110,7 +110,7 @@ public class PotionRegistryDebug float b = (float) (potion.getLiquidColor() >> 8 & 255) / 255.0F; Tessellator tessellator = Tessellator.getInstance(); - VertexBuffer buf = tessellator.getBuffer(); + BufferBuilder buf = tessellator.getBuffer(); buf.begin(7, DefaultVertexFormats.POSITION_TEX); GlStateManager.color(r, g, b, alpha); buf.pos((double) x, (double) (y + height), 0.0D).tex(sprite.getMinU(), sprite.getMaxV()).endVertex(); diff --git a/src/test/java/net/minecraftforge/debug/WorldCapabilityRainTimerTest.java b/src/test/java/net/minecraftforge/debug/WorldCapabilityRainTimerTest.java index bb228b89f..bafd6b57f 100644 --- a/src/test/java/net/minecraftforge/debug/WorldCapabilityRainTimerTest.java +++ b/src/test/java/net/minecraftforge/debug/WorldCapabilityRainTimerTest.java @@ -4,6 +4,7 @@ import net.minecraft.nbt.NBTBase; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.EnumFacing; import net.minecraft.util.ResourceLocation; +import net.minecraft.world.World; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.common.capabilities.Capability; import net.minecraftforge.common.capabilities.Capability.IStorage; @@ -41,9 +42,9 @@ public class WorldCapabilityRainTimerTest public static class NormalEventHandler { @SubscribeEvent - public void attatchTimer(AttachCapabilitiesEvent.World event) + public void attatchTimer(AttachCapabilitiesEvent event) { - if (!event.getWorld().isRemote && !event.getWorld().provider.hasNoSky()) + if (!event.getObject().isRemote && !event.getObject().provider.hasNoSky()) { event.addCapability(new ResourceLocation(MODID, "rainTimer"), new RainTimerProvider()); }