├── .gitignore ├── CREDITS.txt ├── LICENSE ├── LICENSE-Paulscode IBXM Library.txt ├── LICENSE-Paulscode SoundSystem CodecIBXM.txt ├── LICENSE.txt ├── README.txt ├── build.gradle ├── changelog.txt ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat └── src └── main ├── java └── com │ └── example │ └── examplemod │ ├── ExampleMod.java │ ├── ExampleModLoadingPlugin.java │ └── mixins │ └── MixinBlockDirt.java └── resources ├── mcmod.info ├── mixins.examplemod.json └── pack.mcmeta /.gitignore: -------------------------------------------------------------------------------- 1 | # Build # 2 | ######### 3 | MANIFEST.MF 4 | dependency-reduced-pom.xml 5 | 6 | # Compiled # 7 | ############ 8 | bin 9 | build 10 | classes 11 | dist 12 | lib 13 | libs 14 | out 15 | run 16 | target 17 | *.com 18 | *.class 19 | *.dll 20 | *.exe 21 | *.o 22 | *.so 23 | 24 | # Databases # 25 | ############# 26 | *.db 27 | *.sql 28 | *.sqlite 29 | 30 | # Packages # 31 | ############ 32 | *.7z 33 | *.dmg 34 | *.gz 35 | *.iso 36 | *.rar 37 | *.tar 38 | *.zip 39 | 40 | # Repository # 41 | ############## 42 | .git 43 | 44 | # Logging # 45 | ########### 46 | /logs 47 | *.log 48 | 49 | # Misc # 50 | ######## 51 | *.bak 52 | 53 | # System # 54 | ########## 55 | .DS_Store 56 | ehthumbs.db 57 | Thumbs.db 58 | *.sh 59 | 60 | # Project # 61 | ########### 62 | .checkstyle 63 | .classpath 64 | .externalToolBuilders 65 | .gradle 66 | .nb-gradle 67 | .idea 68 | .project 69 | .settings 70 | eclipse 71 | nbproject 72 | atlassian-ide-plugin.xml 73 | build.xml 74 | nb-configuration.xml 75 | *.iml 76 | *.ipr 77 | *.iws 78 | *.launch 79 | *.number 80 | -------------------------------------------------------------------------------- /CREDITS.txt: -------------------------------------------------------------------------------- 1 | Minecraft Forge: Credits/Thank You 2 | 3 | Forge is a set of tools and modifications to the Minecraft base game code to assist 4 | mod developers in creating new and exciting content. It has been in development for 5 | several years now, but I would like to take this time thank a few people who have 6 | helped it along it's way. 7 | 8 | First, the people who originally created the Forge projects way back in Minecraft 9 | alpha. Eloraam of RedPower, and SpaceToad of Buildcraft, without their acceptiance 10 | of me taking over the project, who knows what Minecraft modding would be today. 11 | 12 | Secondly, someone who has worked with me, and developed some of the core features 13 | that allow modding to he as functional, and as simple as it is, cpw. For developing 14 | FML, which stabelized the client and server modding ecosystem. As well as the base 15 | loading system that allows us to modify Minecraft's code as elegently as possible. 16 | 17 | Mezz, who has stepped up as the issue and pull request manager. Helping to keep me 18 | sane as well as guiding the community into creating better additions to Forge. 19 | 20 | Searge, Bspks, Fesh0r, ProfMobious, and all the rest over on the MCP team {of which 21 | I am a part}. For creating some of the core tools needed to make Minecraft modding 22 | both possible, and as stable as can be. 23 | On that note, here is some specific information of the MCP data we use: 24 | * Minecraft Coder Pack (MCP) * 25 | Forge Mod Loader and Minecraft Forge have permission to distribute and automatically 26 | download components of MCP and distribute MCP data files. This permission is not 27 | transitive and others wishing to redistribute the Minecraft Forge source independently 28 | should seek permission of MCP or remove the MCP data files and request their users 29 | to download MCP separately. 30 | 31 | And lastly, the countless community members who have spent time submitting bug reports, 32 | pull requests, and just helping out the community in general. Thank you. 33 | 34 | --LexManos 35 | 36 | ========================================================================= 37 | 38 | This is Forge Mod Loader. 39 | 40 | You can find the source code at all times at https://github.com/MinecraftForge/MinecraftForge/tree/1.12.x/src/main/java/net/minecraftforge/fml 41 | 42 | This minecraft mod is a clean open source implementation of a mod loader for minecraft servers 43 | and minecraft clients. 44 | 45 | The code is authored by cpw. 46 | 47 | It began by partially implementing an API defined by the client side ModLoader, authored by Risugami. 48 | http://www.minecraftforum.net/topic/75440- 49 | This support has been dropped as of Minecraft release 1.7, as Risugami no longer maintains ModLoader. 50 | 51 | It also contains suggestions and hints and generous helpings of code from LexManos, author of MinecraftForge. 52 | http://www.minecraftforge.net/ 53 | 54 | Additionally, it contains an implementation of topological sort based on that 55 | published at http://keithschwarz.com/interesting/code/?dir=topological-sort 56 | 57 | It also contains code from the Maven project for performing versioned dependency 58 | resolution. http://maven.apache.org/ 59 | 60 | It also contains a partial repackaging of the javaxdelta library from http://sourceforge.net/projects/javaxdelta/ 61 | with credit to it's authors. 62 | 63 | Forge Mod Loader downloads components from the Minecraft Coder Pack 64 | (http://mcp.ocean-labs.de/index.php/Main_Page) with kind permission from the MCP team. 65 | 66 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /LICENSE-Paulscode IBXM Library.txt: -------------------------------------------------------------------------------- 1 | IBXM is copyright (c) 2007, Martin Cameron, and is licensed under the BSD License. 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 5 | 6 | Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 7 | Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 8 | Neither the name of mumart nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. 9 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 10 | 11 | -------------------------------------------------------------------------------- /LICENSE-Paulscode SoundSystem CodecIBXM.txt: -------------------------------------------------------------------------------- 1 | SoundSystem CodecIBXM Class License: 2 | 3 | You are free to use this class for any purpose, commercial or otherwise. 4 | You may modify this class or source code, and distribute it any way you 5 | like, provided the following conditions are met: 6 | 7 | 1) You may not falsely claim to be the author of this class or any 8 | unmodified portion of it. 9 | 2) You may not copyright this class or a modified version of it and then 10 | sue me for copyright infringement. 11 | 3) If you modify the source code, you must clearly document the changes 12 | made before redistributing the modified source code, so other users know 13 | it is not the original code. 14 | 4) You are not required to give me credit for this class in any derived 15 | work, but if you do, you must also mention my website: 16 | http://www.paulscode.com 17 | 5) I the author will not be responsible for any damages (physical, 18 | financial, or otherwise) caused by the use if this class or any 19 | portion of it. 20 | 6) I the author do not guarantee, warrant, or make any representations, 21 | either expressed or implied, regarding the use of this class or any 22 | portion of it. 23 | 24 | Author: Paul Lamb 25 | http://www.paulscode.com 26 | 27 | 28 | This software is based on or using the IBXM library available from 29 | http://www.geocities.com/sunet2000/ 30 | 31 | 32 | IBXM is copyright (c) 2007, Martin Cameron, and is licensed under the BSD License. 33 | All rights reserved. 34 | 35 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 36 | 37 | Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 38 | Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 39 | Neither the name of mumart nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. 40 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 41 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | Unless noted below, Minecraft Forge, Forge Mod Loader, and all 2 | parts herein are licensed under the terms of the LGPL 2.1 found 3 | here http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt and 4 | copied below. 5 | 6 | Homepage: http://MinecraftForge.net/ 7 | http://github.com/MinecraftForge/MinecraftForge 8 | 9 | 10 | A note on authorship: 11 | All source artifacts are property of their original author, with 12 | the exclusion of the contents of the patches directory and others 13 | copied from it from time to time. Authorship of the contents of 14 | the patches directory is retained by the Minecraft Forge project. 15 | This is because the patches are partially machine generated 16 | artifacts, and are changed heavily due to the way forge works. 17 | Individual attribution within them is impossible. 18 | 19 | Consent: 20 | All contributions to Forge must consent to the release of any 21 | patch content to the Forge project. 22 | 23 | A note on infectivity: 24 | The LGPL is chosen specifically so that projects may depend on Forge 25 | features without being infected with its license. That is the 26 | purpose of the LGPL. Mods and others using this code via ordinary 27 | Java mechanics for referencing libraries are specifically not bound 28 | by Forge's license for the Mod code. 29 | 30 | 31 | === MCP Data === 32 | This software includes data from the Minecraft Coder Pack (MCP), with kind permission 33 | from them. The license to MCP data is not transitive - distribution of this data by 34 | third parties requires independent licensing from the MCP team. This data is not 35 | redistributable without permission from the MCP team. 36 | 37 | === Sharing === 38 | I grant permission for some parts of FML to be redistributed outside the terms of the LGPL, for the benefit of 39 | the minecraft modding community. All contributions to these parts should be licensed under the same additional grant. 40 | 41 | -- Runtime patcher -- 42 | License is granted to redistribute the runtime patcher code (src/main/java/net/minecraftforge/fml/common/patcher 43 | and subdirectories) under any alternative open source license as classified by the OSI (http://opensource.org/licenses) 44 | 45 | -- ASM transformers -- 46 | License is granted to redistribute the ASM transformer code (src/main/java/net/minecraftforge/common/asm/ and subdirectories) 47 | under any alternative open source license as classified by the OSI (http://opensource.org/licenses) 48 | 49 | ========================================================================= 50 | This software includes portions from the Apache Maven project at 51 | http://maven.apache.org/ specifically the ComparableVersion.java code. It is 52 | included based on guidelines at 53 | http://www.softwarefreedom.org/resources/2007/gpl-non-gpl-collaboration.html 54 | with notices intact. The only change is a non-functional change of package name. 55 | 56 | This software contains a partial repackaging of javaxdelta, a BSD licensed program for generating 57 | binary differences and applying them, sourced from the subversion at http://sourceforge.net/projects/javaxdelta/ 58 | authored by genman, heikok, pivot. 59 | The only changes are to replace some Trove collection types with standard Java collections, and repackaged. 60 | 61 | This software contains potions of Paulscodee IBXM library, a BSD liceensed library for 62 | loading and playing IBXM formated auto. No modifications havee beeen made. The associated 63 | licenses can be found along side this one, or at 64 | https://github.com/MinecraftForge/MinecraftForge/blob/1.12.x/LICENSE-Paulscode%20IBXM%20Library.txt 65 | https://github.com/MinecraftForge/MinecraftForge/blob/1.12.x/LICENSE-Paulscode%20SoundSystem%20CodecIBXM.txt 66 | ========================================================================= 67 | 68 | 69 | GNU LESSER GENERAL PUBLIC LICENSE 70 | Version 2.1, February 1999 71 | 72 | Copyright (C) 1991, 1999 Free Software Foundation, Inc. 73 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 74 | Everyone is permitted to copy and distribute verbatim copies 75 | of this license document, but changing it is not allowed. 76 | 77 | [This is the first released version of the Lesser GPL. It also counts 78 | as the successor of the GNU Library Public License, version 2, hence 79 | the version number 2.1.] 80 | 81 | Preamble 82 | 83 | The licenses for most software are designed to take away your 84 | freedom to share and change it. By contrast, the GNU General Public 85 | Licenses are intended to guarantee your freedom to share and change 86 | free software--to make sure the software is free for all its users. 87 | 88 | This license, the Lesser General Public License, applies to some 89 | specially designated software packages--typically libraries--of the 90 | Free Software Foundation and other authors who decide to use it. You 91 | can use it too, but we suggest you first think carefully about whether 92 | this license or the ordinary General Public License is the better 93 | strategy to use in any particular case, based on the explanations below. 94 | 95 | When we speak of free software, we are referring to freedom of use, 96 | not price. Our General Public Licenses are designed to make sure that 97 | you have the freedom to distribute copies of free software (and charge 98 | for this service if you wish); that you receive source code or can get 99 | it if you want it; that you can change the software and use pieces of 100 | it in new free programs; and that you are informed that you can do 101 | these things. 102 | 103 | To protect your rights, we need to make restrictions that forbid 104 | distributors to deny you these rights or to ask you to surrender these 105 | rights. These restrictions translate to certain responsibilities for 106 | you if you distribute copies of the library or if you modify it. 107 | 108 | For example, if you distribute copies of the library, whether gratis 109 | or for a fee, you must give the recipients all the rights that we gave 110 | you. You must make sure that they, too, receive or can get the source 111 | code. If you link other code with the library, you must provide 112 | complete object files to the recipients, so that they can relink them 113 | with the library after making changes to the library and recompiling 114 | it. And you must show them these terms so they know their rights. 115 | 116 | We protect your rights with a two-step method: (1) we copyright the 117 | library, and (2) we offer you this license, which gives you legal 118 | permission to copy, distribute and/or modify the library. 119 | 120 | To protect each distributor, we want to make it very clear that 121 | there is no warranty for the free library. Also, if the library is 122 | modified by someone else and passed on, the recipients should know 123 | that what they have is not the original version, so that the original 124 | author's reputation will not be affected by problems that might be 125 | introduced by others. 126 | 127 | Finally, software patents pose a constant threat to the existence of 128 | any free program. We wish to make sure that a company cannot 129 | effectively restrict the users of a free program by obtaining a 130 | restrictive license from a patent holder. Therefore, we insist that 131 | any patent license obtained for a version of the library must be 132 | consistent with the full freedom of use specified in this license. 133 | 134 | Most GNU software, including some libraries, is covered by the 135 | ordinary GNU General Public License. This license, the GNU Lesser 136 | General Public License, applies to certain designated libraries, and 137 | is quite different from the ordinary General Public License. We use 138 | this license for certain libraries in order to permit linking those 139 | libraries into non-free programs. 140 | 141 | When a program is linked with a library, whether statically or using 142 | a shared library, the combination of the two is legally speaking a 143 | combined work, a derivative of the original library. The ordinary 144 | General Public License therefore permits such linking only if the 145 | entire combination fits its criteria of freedom. The Lesser General 146 | Public License permits more lax criteria for linking other code with 147 | the library. 148 | 149 | We call this license the "Lesser" General Public License because it 150 | does Less to protect the user's freedom than the ordinary General 151 | Public License. It also provides other free software developers Less 152 | of an advantage over competing non-free programs. These disadvantages 153 | are the reason we use the ordinary General Public License for many 154 | libraries. However, the Lesser license provides advantages in certain 155 | special circumstances. 156 | 157 | For example, on rare occasions, there may be a special need to 158 | encourage the widest possible use of a certain library, so that it becomes 159 | a de-facto standard. To achieve this, non-free programs must be 160 | allowed to use the library. A more frequent case is that a free 161 | library does the same job as widely used non-free libraries. In this 162 | case, there is little to gain by limiting the free library to free 163 | software only, so we use the Lesser General Public License. 164 | 165 | In other cases, permission to use a particular library in non-free 166 | programs enables a greater number of people to use a large body of 167 | free software. For example, permission to use the GNU C Library in 168 | non-free programs enables many more people to use the whole GNU 169 | operating system, as well as its variant, the GNU/Linux operating 170 | system. 171 | 172 | Although the Lesser General Public License is Less protective of the 173 | users' freedom, it does ensure that the user of a program that is 174 | linked with the Library has the freedom and the wherewithal to run 175 | that program using a modified version of the Library. 176 | 177 | The precise terms and conditions for copying, distribution and 178 | modification follow. Pay close attention to the difference between a 179 | "work based on the library" and a "work that uses the library". The 180 | former contains code derived from the library, whereas the latter must 181 | be combined with the library in order to run. 182 | 183 | GNU LESSER GENERAL PUBLIC LICENSE 184 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 185 | 186 | 0. This License Agreement applies to any software library or other 187 | program which contains a notice placed by the copyright holder or 188 | other authorized party saying it may be distributed under the terms of 189 | this Lesser General Public License (also called "this License"). 190 | Each licensee is addressed as "you". 191 | 192 | A "library" means a collection of software functions and/or data 193 | prepared so as to be conveniently linked with application programs 194 | (which use some of those functions and data) to form executables. 195 | 196 | The "Library", below, refers to any such software library or work 197 | which has been distributed under these terms. A "work based on the 198 | Library" means either the Library or any derivative work under 199 | copyright law: that is to say, a work containing the Library or a 200 | portion of it, either verbatim or with modifications and/or translated 201 | straightforwardly into another language. (Hereinafter, translation is 202 | included without limitation in the term "modification".) 203 | 204 | "Source code" for a work means the preferred form of the work for 205 | making modifications to it. For a library, complete source code means 206 | all the source code for all modules it contains, plus any associated 207 | interface definition files, plus the scripts used to control compilation 208 | and installation of the library. 209 | 210 | Activities other than copying, distribution and modification are not 211 | covered by this License; they are outside its scope. The act of 212 | running a program using the Library is not restricted, and output from 213 | such a program is covered only if its contents constitute a work based 214 | on the Library (independent of the use of the Library in a tool for 215 | writing it). Whether that is true depends on what the Library does 216 | and what the program that uses the Library does. 217 | 218 | 1. You may copy and distribute verbatim copies of the Library's 219 | complete source code as you receive it, in any medium, provided that 220 | you conspicuously and appropriately publish on each copy an 221 | appropriate copyright notice and disclaimer of warranty; keep intact 222 | all the notices that refer to this License and to the absence of any 223 | warranty; and distribute a copy of this License along with the 224 | Library. 225 | 226 | You may charge a fee for the physical act of transferring a copy, 227 | and you may at your option offer warranty protection in exchange for a 228 | fee. 229 | 230 | 2. You may modify your copy or copies of the Library or any portion 231 | of it, thus forming a work based on the Library, and copy and 232 | distribute such modifications or work under the terms of Section 1 233 | above, provided that you also meet all of these conditions: 234 | 235 | a) The modified work must itself be a software library. 236 | 237 | b) You must cause the files modified to carry prominent notices 238 | stating that you changed the files and the date of any change. 239 | 240 | c) You must cause the whole of the work to be licensed at no 241 | charge to all third parties under the terms of this License. 242 | 243 | d) If a facility in the modified Library refers to a function or a 244 | table of data to be supplied by an application program that uses 245 | the facility, other than as an argument passed when the facility 246 | is invoked, then you must make a good faith effort to ensure that, 247 | in the event an application does not supply such function or 248 | table, the facility still operates, and performs whatever part of 249 | its purpose remains meaningful. 250 | 251 | (For example, a function in a library to compute square roots has 252 | a purpose that is entirely well-defined independent of the 253 | application. Therefore, Subsection 2d requires that any 254 | application-supplied function or table used by this function must 255 | be optional: if the application does not supply it, the square 256 | root function must still compute square roots.) 257 | 258 | These requirements apply to the modified work as a whole. If 259 | identifiable sections of that work are not derived from the Library, 260 | and can be reasonably considered independent and separate works in 261 | themselves, then this License, and its terms, do not apply to those 262 | sections when you distribute them as separate works. But when you 263 | distribute the same sections as part of a whole which is a work based 264 | on the Library, the distribution of the whole must be on the terms of 265 | this License, whose permissions for other licensees extend to the 266 | entire whole, and thus to each and every part regardless of who wrote 267 | it. 268 | 269 | Thus, it is not the intent of this section to claim rights or contest 270 | your rights to work written entirely by you; rather, the intent is to 271 | exercise the right to control the distribution of derivative or 272 | collective works based on the Library. 273 | 274 | In addition, mere aggregation of another work not based on the Library 275 | with the Library (or with a work based on the Library) on a volume of 276 | a storage or distribution medium does not bring the other work under 277 | the scope of this License. 278 | 279 | 3. You may opt to apply the terms of the ordinary GNU General Public 280 | License instead of this License to a given copy of the Library. To do 281 | this, you must alter all the notices that refer to this License, so 282 | that they refer to the ordinary GNU General Public License, version 2, 283 | instead of to this License. (If a newer version than version 2 of the 284 | ordinary GNU General Public License has appeared, then you can specify 285 | that version instead if you wish.) Do not make any other change in 286 | these notices. 287 | 288 | Once this change is made in a given copy, it is irreversible for 289 | that copy, so the ordinary GNU General Public License applies to all 290 | subsequent copies and derivative works made from that copy. 291 | 292 | This option is useful when you wish to copy part of the code of 293 | the Library into a program that is not a library. 294 | 295 | 4. You may copy and distribute the Library (or a portion or 296 | derivative of it, under Section 2) in object code or executable form 297 | under the terms of Sections 1 and 2 above provided that you accompany 298 | it with the complete corresponding machine-readable source code, which 299 | must be distributed under the terms of Sections 1 and 2 above on a 300 | medium customarily used for software interchange. 301 | 302 | If distribution of object code is made by offering access to copy 303 | from a designated place, then offering equivalent access to copy the 304 | source code from the same place satisfies the requirement to 305 | distribute the source code, even though third parties are not 306 | compelled to copy the source along with the object code. 307 | 308 | 5. A program that contains no derivative of any portion of the 309 | Library, but is designed to work with the Library by being compiled or 310 | linked with it, is called a "work that uses the Library". Such a 311 | work, in isolation, is not a derivative work of the Library, and 312 | therefore falls outside the scope of this License. 313 | 314 | However, linking a "work that uses the Library" with the Library 315 | creates an executable that is a derivative of the Library (because it 316 | contains portions of the Library), rather than a "work that uses the 317 | library". The executable is therefore covered by this License. 318 | Section 6 states terms for distribution of such executables. 319 | 320 | When a "work that uses the Library" uses material from a header file 321 | that is part of the Library, the object code for the work may be a 322 | derivative work of the Library even though the source code is not. 323 | Whether this is true is especially significant if the work can be 324 | linked without the Library, or if the work is itself a library. The 325 | threshold for this to be true is not precisely defined by law. 326 | 327 | If such an object file uses only numerical parameters, data 328 | structure layouts and accessors, and small macros and small inline 329 | functions (ten lines or less in length), then the use of the object 330 | file is unrestricted, regardless of whether it is legally a derivative 331 | work. (Executables containing this object code plus portions of the 332 | Library will still fall under Section 6.) 333 | 334 | Otherwise, if the work is a derivative of the Library, you may 335 | distribute the object code for the work under the terms of Section 6. 336 | Any executables containing that work also fall under Section 6, 337 | whether or not they are linked directly with the Library itself. 338 | 339 | 6. As an exception to the Sections above, you may also combine or 340 | link a "work that uses the Library" with the Library to produce a 341 | work containing portions of the Library, and distribute that work 342 | under terms of your choice, provided that the terms permit 343 | modification of the work for the customer's own use and reverse 344 | engineering for debugging such modifications. 345 | 346 | You must give prominent notice with each copy of the work that the 347 | Library is used in it and that the Library and its use are covered by 348 | this License. You must supply a copy of this License. If the work 349 | during execution displays copyright notices, you must include the 350 | copyright notice for the Library among them, as well as a reference 351 | directing the user to the copy of this License. Also, you must do one 352 | of these things: 353 | 354 | a) Accompany the work with the complete corresponding 355 | machine-readable source code for the Library including whatever 356 | changes were used in the work (which must be distributed under 357 | Sections 1 and 2 above); and, if the work is an executable linked 358 | with the Library, with the complete machine-readable "work that 359 | uses the Library", as object code and/or source code, so that the 360 | user can modify the Library and then relink to produce a modified 361 | executable containing the modified Library. (It is understood 362 | that the user who changes the contents of definitions files in the 363 | Library will not necessarily be able to recompile the application 364 | to use the modified definitions.) 365 | 366 | b) Use a suitable shared library mechanism for linking with the 367 | Library. A suitable mechanism is one that (1) uses at run time a 368 | copy of the library already present on the user's computer system, 369 | rather than copying library functions into the executable, and (2) 370 | will operate properly with a modified version of the library, if 371 | the user installs one, as long as the modified version is 372 | interface-compatible with the version that the work was made with. 373 | 374 | c) Accompany the work with a written offer, valid for at 375 | least three years, to give the same user the materials 376 | specified in Subsection 6a, above, for a charge no more 377 | than the cost of performing this distribution. 378 | 379 | d) If distribution of the work is made by offering access to copy 380 | from a designated place, offer equivalent access to copy the above 381 | specified materials from the same place. 382 | 383 | e) Verify that the user has already received a copy of these 384 | materials or that you have already sent this user a copy. 385 | 386 | For an executable, the required form of the "work that uses the 387 | Library" must include any data and utility programs needed for 388 | reproducing the executable from it. However, as a special exception, 389 | the materials to be distributed need not include anything that is 390 | normally distributed (in either source or binary form) with the major 391 | components (compiler, kernel, and so on) of the operating system on 392 | which the executable runs, unless that component itself accompanies 393 | the executable. 394 | 395 | It may happen that this requirement contradicts the license 396 | restrictions of other proprietary libraries that do not normally 397 | accompany the operating system. Such a contradiction means you cannot 398 | use both them and the Library together in an executable that you 399 | distribute. 400 | 401 | 7. You may place library facilities that are a work based on the 402 | Library side-by-side in a single library together with other library 403 | facilities not covered by this License, and distribute such a combined 404 | library, provided that the separate distribution of the work based on 405 | the Library and of the other library facilities is otherwise 406 | permitted, and provided that you do these two things: 407 | 408 | a) Accompany the combined library with a copy of the same work 409 | based on the Library, uncombined with any other library 410 | facilities. This must be distributed under the terms of the 411 | Sections above. 412 | 413 | b) Give prominent notice with the combined library of the fact 414 | that part of it is a work based on the Library, and explaining 415 | where to find the accompanying uncombined form of the same work. 416 | 417 | 8. You may not copy, modify, sublicense, link with, or distribute 418 | the Library except as expressly provided under this License. Any 419 | attempt otherwise to copy, modify, sublicense, link with, or 420 | distribute the Library is void, and will automatically terminate your 421 | rights under this License. However, parties who have received copies, 422 | or rights, from you under this License will not have their licenses 423 | terminated so long as such parties remain in full compliance. 424 | 425 | 9. You are not required to accept this License, since you have not 426 | signed it. However, nothing else grants you permission to modify or 427 | distribute the Library or its derivative works. These actions are 428 | prohibited by law if you do not accept this License. Therefore, by 429 | modifying or distributing the Library (or any work based on the 430 | Library), you indicate your acceptance of this License to do so, and 431 | all its terms and conditions for copying, distributing or modifying 432 | the Library or works based on it. 433 | 434 | 10. Each time you redistribute the Library (or any work based on the 435 | Library), the recipient automatically receives a license from the 436 | original licensor to copy, distribute, link with or modify the Library 437 | subject to these terms and conditions. You may not impose any further 438 | restrictions on the recipients' exercise of the rights granted herein. 439 | You are not responsible for enforcing compliance by third parties with 440 | this License. 441 | 442 | 11. If, as a consequence of a court judgment or allegation of patent 443 | infringement or for any other reason (not limited to patent issues), 444 | conditions are imposed on you (whether by court order, agreement or 445 | otherwise) that contradict the conditions of this License, they do not 446 | excuse you from the conditions of this License. If you cannot 447 | distribute so as to satisfy simultaneously your obligations under this 448 | License and any other pertinent obligations, then as a consequence you 449 | may not distribute the Library at all. For example, if a patent 450 | license would not permit royalty-free redistribution of the Library by 451 | all those who receive copies directly or indirectly through you, then 452 | the only way you could satisfy both it and this License would be to 453 | refrain entirely from distribution of the Library. 454 | 455 | If any portion of this section is held invalid or unenforceable under any 456 | particular circumstance, the balance of the section is intended to apply, 457 | and the section as a whole is intended to apply in other circumstances. 458 | 459 | It is not the purpose of this section to induce you to infringe any 460 | patents or other property right claims or to contest validity of any 461 | such claims; this section has the sole purpose of protecting the 462 | integrity of the free software distribution system which is 463 | implemented by public license practices. Many people have made 464 | generous contributions to the wide range of software distributed 465 | through that system in reliance on consistent application of that 466 | system; it is up to the author/donor to decide if he or she is willing 467 | to distribute software through any other system and a licensee cannot 468 | impose that choice. 469 | 470 | This section is intended to make thoroughly clear what is believed to 471 | be a consequence of the rest of this License. 472 | 473 | 12. If the distribution and/or use of the Library is restricted in 474 | certain countries either by patents or by copyrighted interfaces, the 475 | original copyright holder who places the Library under this License may add 476 | an explicit geographical distribution limitation excluding those countries, 477 | so that distribution is permitted only in or among countries not thus 478 | excluded. In such case, this License incorporates the limitation as if 479 | written in the body of this License. 480 | 481 | 13. The Free Software Foundation may publish revised and/or new 482 | versions of the Lesser General Public License from time to time. 483 | Such new versions will be similar in spirit to the present version, 484 | but may differ in detail to address new problems or concerns. 485 | 486 | Each version is given a distinguishing version number. If the Library 487 | specifies a version number of this License which applies to it and 488 | "any later version", you have the option of following the terms and 489 | conditions either of that version or of any later version published by 490 | the Free Software Foundation. If the Library does not specify a 491 | license version number, you may choose any version ever published by 492 | the Free Software Foundation. 493 | 494 | 14. If you wish to incorporate parts of the Library into other free 495 | programs whose distribution conditions are incompatible with these, 496 | write to the author to ask for permission. For software which is 497 | copyrighted by the Free Software Foundation, write to the Free 498 | Software Foundation; we sometimes make exceptions for this. Our 499 | decision will be guided by the two goals of preserving the free status 500 | of all derivatives of our free software and of promoting the sharing 501 | and reuse of software generally. 502 | 503 | NO WARRANTY 504 | 505 | 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO 506 | WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. 507 | EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR 508 | OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY 509 | KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE 510 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 511 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE 512 | LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME 513 | THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 514 | 515 | 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN 516 | WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY 517 | AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU 518 | FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR 519 | CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE 520 | LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING 521 | RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A 522 | FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF 523 | SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH 524 | DAMAGES. 525 | 526 | END OF TERMS AND CONDITIONS 527 | -------------------------------------------------------------------------------- /README.txt: -------------------------------------------------------------------------------- 1 | ------------------------------------------- 2 | Source installation information for modders 3 | ------------------------------------------- 4 | This code follows the Minecraft Forge installation methodology. It will apply 5 | some small patches to the vanilla MCP source code, giving you and it access 6 | to some of the data and functions you need to build a successful mod. 7 | 8 | Note also that the patches are built against "unrenamed" MCP source code (aka 9 | srgnames) - this means that you will not be able to read them directly against 10 | normal code. 11 | 12 | Source pack installation information: 13 | 14 | Standalone source installation 15 | ============================== 16 | 17 | See the Forge Documentation online for more detailed instructions: 18 | http://mcforge.readthedocs.io/en/latest/gettingstarted/ 19 | 20 | Step 1: Open your command-line and browse to the folder where you extracted the zip file. 21 | 22 | Step 2: Once you have a command window up in the folder that the downloaded material was placed, type: 23 | 24 | Windows: "gradlew setupDecompWorkspace" 25 | Linux/Mac OS: "./gradlew setupDecompWorkspace" 26 | 27 | Step 3: After all that finished, you're left with a choice. 28 | For eclipse, run "gradlew eclipse" (./gradlew eclipse if you are on Mac/Linux) 29 | 30 | If you prefer to use IntelliJ, steps are a little different. 31 | 1. Open IDEA, and import project. 32 | 2. Select your build.gradle file and have it import. 33 | 3. Once it's finished you must close IntelliJ and run the following command: 34 | 35 | "gradlew genIntellijRuns" (./gradlew genIntellijRuns if you are on Mac/Linux) 36 | 37 | Step 4: The final step is to open Eclipse and switch your workspace to /eclipse/ (if you use IDEA, it should automatically start on your project) 38 | 39 | If at any point you are missing libraries in your IDE, or you've run into problems you can run "gradlew --refresh-dependencies" to refresh the local cache. "gradlew clean" to reset everything {this does not affect your code} and then start the processs again. 40 | 41 | Should it still not work, 42 | Refer to #ForgeGradle on EsperNet for more information about the gradle environment. 43 | 44 | Tip: 45 | If you do not care about seeing Minecraft's source code you can replace "setupDecompWorkspace" with one of the following: 46 | "setupDevWorkspace": Will patch, deobfuscate, and gather required assets to run minecraft, but will not generate human readable source code. 47 | "setupCIWorkspace": Same as Dev but will not download any assets. This is useful in build servers as it is the fastest because it does the least work. 48 | 49 | Tip: 50 | When using Decomp workspace, the Minecraft source code is NOT added to your workspace in a editable way. Minecraft is treated like a normal Library. Sources are there for documentation and research purposes and usually can be accessed under the 'referenced libraries' section of your IDE. 51 | 52 | Forge source installation 53 | ========================= 54 | MinecraftForge ships with this code and installs it as part of the forge 55 | installation process, no further action is required on your part. 56 | 57 | LexManos' Install Video 58 | ======================= 59 | https://www.youtube.com/watch?v=8VEdtQLuLO0&feature=youtu.be 60 | 61 | For more details update more often refer to the Forge Forums: 62 | http://www.minecraftforge.net/forum/index.php/topic,14048.0.html 63 | -------------------------------------------------------------------------------- /build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | repositories { 3 | jcenter() 4 | maven { url = 'https://files.minecraftforge.net/maven' } 5 | maven { url = 'https://repo.spongepowered.org/maven' } 6 | maven { url = 'https://plugins.gradle.org/m2' } 7 | } 8 | dependencies { 9 | classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT' 10 | classpath 'org.spongepowered:mixingradle:0.6-SNAPSHOT' 11 | classpath 'com.github.jengelman.gradle.plugins:shadow:2.0.4' 12 | } 13 | } 14 | apply plugin: 'net.minecraftforge.gradle.forge' 15 | apply plugin: 'org.spongepowered.mixin' 16 | apply plugin: 'com.github.johnrengelman.shadow' 17 | //Only edit below this line, the above code adds and enables the necessary things for Forge to be setup. 18 | 19 | 20 | version = '1.0' 21 | group = 'com.example.examplemod' // http://maven.apache.org/guides/mini/guide-naming-conventions.html 22 | archivesBaseName = 'examplemod' 23 | 24 | sourceCompatibility = targetCompatibility = '1.8' // Need this here so eclipse task generates correctly. 25 | compileJava { 26 | sourceCompatibility = targetCompatibility = '1.8' 27 | } 28 | 29 | minecraft { 30 | version = '1.12.2-14.23.5.2847' 31 | runDir = 'run' 32 | coreMod = 'com.example.examplemod.ExampleModLoadingPlugin' 33 | // the mappings can be changed at any time, and must be in the following format. 34 | // snapshot_YYYYMMDD snapshot are built nightly. 35 | // stable_# stables are built at the discretion of the MCP team. 36 | // Use non-default mappings at your own risk. they may not always work. 37 | // simply re-run your setup task after changing the mappings to update your workspace. 38 | mappings = 'stable_39' 39 | // makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable. 40 | } 41 | 42 | jar.manifest.attributes( 43 | 'FMLCorePluginContainsFMLMod': true, 44 | 'FMLCorePlugin': 'com.example.examplemod.ExampleModLoadingPlugin', 45 | 'ForceLoadAsMod': true, 46 | 'TweakClass': 'org.spongepowered.asm.launch.MixinTweaker' 47 | ) 48 | 49 | repositories { 50 | mavenCentral() 51 | maven { url = 'https://repo.spongepowered.org/maven' } 52 | } 53 | 54 | dependencies { 55 | // you may put jars on which you depend on in ./libs 56 | // or you may define them like so.. 57 | //compile 'some.group:artifact:version:classifier' 58 | //compile 'some.group:artifact:version' 59 | 60 | // real examples 61 | //compile 'com.mod-buildcraft:buildcraft:6.0.8:dev' // adds buildcraft to the dev env 62 | //compile 'com.googlecode.efficient-java-matrix-library:ejml:0.24' // adds ejml to the dev env 63 | 64 | // the 'provided' configuration is for optional dependencies that exist at compile-time but might not at runtime. 65 | //provided 'com.mod-buildcraft:buildcraft:6.0.8:dev' 66 | 67 | // the deobf configurations: 'deobfCompile' and 'deobfProvided' are the same as the normal compile and provided, 68 | // except that these dependencies get remapped to your current MCP mappings 69 | //deobfCompile 'com.mod-buildcraft:buildcraft:6.0.8:dev' 70 | //deobfProvided 'com.mod-buildcraft:buildcraft:6.0.8:dev' 71 | 72 | // for more info... 73 | // http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html 74 | // http://www.gradle.org/docs/current/userguide/dependency_management.html 75 | 76 | compile 'org.spongepowered:mixin:0.8.2' 77 | } 78 | 79 | mixin { 80 | add sourceSets.main, 'mixins.examplemod.refmap.json' 81 | } 82 | 83 | shadowJar { 84 | exclude 'dummyThing' 85 | exclude 'LICENSE.txt' 86 | 87 | classifier = '' 88 | } 89 | build.dependsOn(shadowJar) 90 | 91 | reobf { 92 | shadowJar { 93 | mappingType = 'SEARGE' 94 | classpath = sourceSets.main.compileClasspath 95 | } 96 | } 97 | 98 | processResources { 99 | // this will ensure that this task is redone when the versions change. 100 | inputs.property 'version', project.version 101 | inputs.property 'mcversion', project.minecraft.version 102 | 103 | // replace stuff in mcmod.info, nothing else 104 | from(sourceSets.main.resources.srcDirs) { 105 | include 'mcmod.info' 106 | 107 | // replace version and mcversion 108 | expand 'version':project.version, 'mcversion':project.minecraft.version 109 | } 110 | 111 | // copy everything else except the mcmod.info 112 | from(sourceSets.main.resources.srcDirs) { 113 | exclude 'mcmod.info' 114 | } 115 | } 116 | -------------------------------------------------------------------------------- /changelog.txt: -------------------------------------------------------------------------------- 1 | ========= 2 | Build: 1.12.2-14.23.5.2846 - Tue Sep 03 21:22:46 GMT 2019 3 | ichttt: 4 | Fix CME when removing ticket managers (#5861) 5 | 6 | ========= 7 | Build: 1.12.2-14.23.5.2844 - Thu Aug 29 02:33:00 GMT 2019 8 | Barteks2x: 9 | Fix client sometimes generating biomes, causing incorrect biome 10 | generation on integrated server (#5720) 11 | 12 | bs2609: 13 | Add checks for tile entities in now-unloaded chunks (#5724) 14 | 15 | ========= 16 | Build: 1.12.2-14.23.5.2843 - Thu Aug 29 02:23:04 GMT 2019 17 | bs2609: 18 | Fix invalid placeholder entity attributes (MC-150405) (#5718) 19 | 20 | ========= 21 | Build: 1.12.2-14.23.5.2842 - Thu Aug 29 02:08:57 GMT 2019 22 | bs2609: 23 | Allow conditional loading of advancements (#5255) 24 | 25 | ========= 26 | Build: 1.12.2-14.23.5.2841 - Thu Aug 29 01:58:50 GMT 2019 27 | bs2609: 28 | Improve performance of persistent chunk checks (#5706) 29 | 30 | jensen.derik: 31 | Fix lightning not triggering EntityJoinWorldEvent (#5290) 32 | 33 | ========= 34 | Build: 1.12.2-14.23.5.2840 - Thu Aug 29 01:19:55 GMT 2019 35 | lex: 36 | Fix copy paste derp 37 | 38 | 39 | Build 2838: 40 | bs2609: Fix vanilla handling of options file (MC-117449, MC-151173) (#5725) 41 | 42 | Build 2837: 43 | clienthax: Update EnumHelper to be compatible with Eclipse's OpenJ9 JVM. (#5712) 44 | 45 | Build 2836: 46 | tterrag: 47 | Revert "Invalidate tile entities that are queued for removal (#5512)" 48 | This reverts commit 75788f63eea6c33ccef7e5cbcab27ad9ad2c2a04. 49 | This solution is invalid as TEs are free to modify the world 50 | tileEntities list, usually indirectly via chunkloading, from inside 51 | invalidate(). 52 | This happens in vanilla, in TileEntityChest#invalidate, where it calls 53 | checkForAdjacentChests(), which has the potential to load neighboring 54 | chunks and cause a CME. 55 | A more sophisticated solution is needed. 56 | 57 | Build 2835: 58 | bs2609: Fix some vertex format changes not being handled correctly (#5368) 59 | 60 | Build 2834: 61 | bs2609: 62 | Transform vertex normals as well as positions when generating quads 63 | (#5242) 64 | 65 | Build 2833: 66 | rseifert.phone: Fix for SidedInvWrapper isItemValid using wrong slot (#5642) 67 | 68 | Build 2832: 69 | bs2609: Invalidate tile entities that are queued for removal (#5512) 70 | 71 | Build 2831: 72 | lclc98: Added Wool to OreDictionary (#5414) 73 | 74 | Build 2830: 75 | CreativeMD: Fixed boat not taking care of block-liquid hooks (#5086) 76 | 77 | Build 2829: 78 | bs2609: Add Forge dimension-changing hooks to spectator handling code (#5212) 79 | 80 | Build 2828: 81 | ichttt: 82 | Minor performace improvement when building chunks and rendering blocks 83 | (#5286) 84 | 85 | Build 2827: 86 | bs2609: Catch json parsing errors from constants/factories files (#5258) 87 | 88 | Build 2826: 89 | bs2609: Allow custom DataSerializers to be registered safely (#5245) 90 | 91 | Build 2825: 92 | cpw: 93 | Try and make 1.13 mods more obviously wrong in 1.12.. 94 | Signed-off-by: cpw 95 | 96 | Build 2824: 97 | tterrag: Fix #5651 Re-add canPlaceBlockOnSide check in World#mayPlace 98 | 99 | Build 2823: 100 | Pokechu022: 101 | Fail fast when null is used with setTag instead of crashing in 102 | writeEntry (#5257) 103 | 104 | Build 2822: 105 | tterrag: Fix block placement not checking for player collision 106 | 107 | Build 2821: 108 | wynprice999: Added more Constants (#5323) 109 | 110 | Build 2820: 111 | python0429: [1.12.2] Add a few events pertaining to villages (#5302) 112 | 113 | Build 2819: 114 | Tyler Hancock: [1.12] Fix special spawn event not firing in many cases. (#5389) 115 | 116 | Build 2818: 117 | bs2609: Only prompt for missing registries on local worlds (#5348) 118 | 119 | Build 2817: 120 | ckrier.3000: Add EntityPlaceEvent (#5057) 121 | 122 | Build 2816: 123 | bs2609: Generalise EnumRarity to an interface (#5182) 124 | 125 | Build 2815: 126 | bs2609: Apply access-level changes to inner class attributes (#5468) 127 | 128 | Build 2814: 129 | bs2609: Fix small logic error in ItemTextureQuadConverter (#5463) 130 | 131 | Build 2813: 132 | bs2609: Better support for custom bows (#5209) 133 | 134 | Build 2812: 135 | CovertJaguar: Remove FluidStack amount from hashcode calculation (#5272) 136 | molecularphylo: 137 | Fixed incorrect string representation of string list config property 138 | default values in their comments. 139 | bs2609: 140 | Improve tracking of used dimension IDs (#5249) 141 | Closes #5378 Large dimension IDs bloat level.data 142 | 143 | Build 2811: 144 | bs2609: 145 | Fix up torch placement logic to handle more vanilla special-casing 146 | (#5426) 147 | 148 | Build 2810: 149 | LexManos: Written size does not include int bytes. 150 | 151 | Build 2809: 152 | LexManos: 153 | Extend Region files to support >1MB per chunk. If the 'sector count' is 154 | 255, ask the compressed data header for the proper length. 155 | 156 | Build 2808: 157 | tterrag1098: Add default impl to IConfigElement#getValidValuesDisplay 158 | 159 | Build 2807: 160 | tterrag: Simplify custom item rendering by removing GL emissivity hacks 161 | 162 | Build 2806: 163 | tterrag: Support diffuse lighting flag in item rendering 164 | 165 | Build 2805: 166 | bs2609: 167 | Add a hook to allow continuously using items through stack changes 168 | (#4834) 169 | * Add a hook to allow continuously using items through stack changes 170 | 171 | * Update licences 172 | 173 | Build 2804: 174 | oOMitchOo: 175 | Added an additional constructor to every implementation of IFluidBlock. 176 | It is now possible to create a fluid block with a Fluid, Material and 177 | MapColor, so that the Material's MapColor isn't used for the blocks 178 | MapColor. (#5293) 179 | 180 | Build 2803: 181 | bs2609: Add redirects to PotionEffect to respect registry replacement (#5213) 182 | 183 | Build 2802: 184 | alexiy.ov: 185 | Add an annotation for @Config elements which will automatically create a 186 | slider control (#5026) 187 | 188 | Build 2801: 189 | bs2609: Fix small logic error in emissive item rendering code (#5320) 190 | 191 | Build 2800: 192 | molecularphylo: 193 | Allow config GUI cycling button elements generated from enums to display 194 | toString return values, rather than actual values. (#5125) 195 | 196 | Build 2799: 197 | bs2609: Fix incorrect indexing in mipmap generation code (#5201) 198 | 199 | Build 2798: 200 | bs2609: 201 | Ensure slave maps are cleaned up when handling registry overrides 202 | (#5250) 203 | 204 | Build 2797: 205 | d_scalzi: Fix issue with --modListFile. (#5316) 206 | 207 | Build 2796: 208 | LexManos: 209 | Fix potential issues with the Minecraft FakePlayer lingering around 210 | after world unloads. 211 | 212 | Build 2795: 213 | tterrag: Fix potion remove event not always firing, add expiry event 214 | 215 | Build 2794: 216 | tterrag: Clean up CraftingHelper constants loading API 217 | 218 | Build 2793: 219 | tterrag: Fix crash from CraftingHelper due to FileSystem being closed early 220 | 221 | Build 2792: 222 | tterrag: 223 | added PotionHooks, closes #3867, #4375 (#4614) 224 | * solved merge confilct 225 | 226 | * improved var names & removed tabs 227 | 228 | * Added spaces around != 229 | 230 | * fixed typo 231 | 232 | Build 2791: 233 | tterrag: 234 | Add a hook for farmland watering (#4891) 235 | * Add a FarmlandWaterCheckEvent to allow mods to override when Farmland 236 | is watered or not 237 | 238 | * revert 1.12.2 json 239 | 240 | * Move the farmland patch to a ticket based instead of a event based 241 | system 242 | 243 | * Minor changes 244 | 245 | * Faster isValid checks, faster validation/invalidation if the state did 246 | not change, expand test mod to include a test for the validation system 247 | 248 | * remove isValid boolean flag, we can express it with the tick counter 249 | 250 | * Fix test mod resource warnings 251 | 252 | * Remove tick timeout, add a javadoc note to invalidate on chunk unload, 253 | cleaned up test mod 254 | 255 | * Allow mods to provide custom handling to determine if a pos is valid 256 | or not 257 | 258 | * Make SimpleTicket more simple, make register public so custom tickets 259 | can be registered 260 | 261 | * Fixes for review 262 | 263 | * Add missing license headers 264 | 265 | * Use a weak hash set 266 | 267 | * Split up the map into smaller chunk based maps 268 | 269 | * Add missing license headers 270 | 271 | * Make MultiTicketManager more universal for custom implementations, 272 | cleanup imports 273 | 274 | Build 2790: 275 | tterrag: 276 | Add methods to allow loading json constants outside of _constants 277 | (#4975) 278 | * add interface methods for loading json constants from an arbitary file 279 | 280 | 281 | * use try-with-resources 282 | 283 | * don't make modders create jsoncontext, clean up resource use 284 | 285 | * very minor cleanup 286 | 287 | Build 2789: 288 | tterrag: 289 | Compute ASMDataTable submaps parallel, speeds up contructing mods 290 | (#5246) 291 | * Compute submaps parallel, speeds up contructing mods by a lot 292 | 293 | * Use stream API better 294 | 295 | Build 2788: 296 | mezz: Add logging for data manager key registration errors (#5129) 297 | 298 | Build 2787: 299 | mezz: Improve support for custom block path types (#5203) 300 | 301 | Build 2786: 302 | mezz: Fix missing comments in configs created with annotations (#5189) 303 | 304 | Build 2785: 305 | mezz: Allow items to control the rate of repair from mending (#5102) 306 | 307 | Build 2784: 308 | mezz: Improve exception handling from server starting events (#5226) 309 | 310 | Build 2783: 311 | mezz: Improve context provided by potion icon rendering hooks (#5111) 312 | 313 | Build 2782: 314 | mezz: Fix an ObjectHolderRef internal error message (#5214) 315 | 316 | Build 2781: 317 | mezz: Implement rendering for item models with emissive quads (#5047) 318 | 319 | Build 2780: 320 | mezz: Clean up logged mod states (#5227) 321 | mezz: Fix minor issue in getFilledPercentage for Fluid rendering (#5206) 322 | 323 | Build 2779: 324 | mezz: Improve reflection helper methods (#4853) 325 | mezz: Fix inaccurate main thread name shown in client log (#5078) 326 | 327 | Build 2778: 328 | mezz: Fix Baked Item models with transformations (#5241) 329 | 330 | Build 2777: 331 | mezz: 332 | Re-add some missing villager profession patches (#5200) 333 | * Fix zombie villagers only spawning with vanilla professions 334 | * Fix spawning modded villagers that do not have their own building 335 | mezz: Fix missing string parameters in some log messages (#5210) 336 | mezz: Stop firing LivingSetAttackTargetEvent for setRevengeTarget (#5217) 337 | mezz: Prevent RecipeBook from crashing on empty modded ingredients (#5234) 338 | 339 | Build 2776: 340 | mezz: Fix the bed position given to the SleepingTimeCheck event (#5107) 341 | 342 | Build 2775: 343 | LexManos: Fix some null returns from defaulted registries (#5235) 344 | 345 | Build 2774: 346 | LexManos: 347 | Only remove synthetic lambda methods referenced in body of SideOnly 348 | methods (#5127) 349 | 350 | Build 2773: 351 | LexManos: 352 | A different approach to my changes in 353 | https://github.com/MinecraftForge/MinecraftForge/commit/8ace535995522bec0557d4217e0d98b3dc76cf1e 354 | to fix #5207 355 | LexManos: Fix patches from #5160 setting rotation as well as position (#5233) 356 | LexManos: Use HTTPS for files website. 357 | 358 | Build 2772: 359 | tterrag: Make Forge-provided default transforms accessible to custom models 360 | tterrag: 361 | Make Forge blockstate variants correctly inherit AO setting from vanilla 362 | models (#5190) 363 | * Make Forge blockstate variants correctly inherit AO setting 364 | 365 | * Move variant format checks into variant, check for added properties 366 | 367 | * Small code cleanup 368 | tterrag: fixed visual bug with guislider 369 | tterrag: 370 | Allow IModel to express itself as a vanilla parent (#5195) 371 | * Fix errors caused by fancy missing model being non-vanilla parent 372 | 373 | * Switch instanceof checks to a default IModel method 374 | 375 | * Small code tweaks 376 | 377 | Build 2771: 378 | tterrag: Add CreativeTabs#getLabelColor 379 | 380 | Build 2770: 381 | tterrag: 382 | Allow providing a BufferedImage for banner render generation (#5041) 383 | * Adds an Event to allow providing a BufferedImage for the banner render 384 | generation (cached) 385 | textures, since banners don't use an atlas. 386 | implementation. 387 | 388 | * Missed some copyright; might as well absolut text match, I guess 389 | 390 | * Remove unneeded patch change 391 | 392 | * Fix event variable access convention 393 | 394 | * Formatting fix 395 | 396 | * Improve event handling registration 397 | 398 | * Import cleanup 399 | 400 | * Replace event approach with Supplier approach 401 | 402 | * Better name for test mod (now that it's no longer an event); adds 403 | ENABLE flag 404 | 405 | * Moves MC code into 406 | net.minecraftforge.client.MinecraftForgeClient.getImageLayer to simplify 407 | patch 408 | 409 | * Generalize naming 410 | 411 | Build 2769: 412 | mezz: Fix Mesa biome entry tags in the BiomeDictionary (#5177) 413 | 414 | Build 2768: 415 | LexManos: Bump version number for RB. 416 | 417 | Build 2767: 418 | LexManos: 419 | Change biome spawn list entries to use factory method where possible 420 | (#5075) 421 | LexManos: Prevent some texture loading errors from crashing the game (#5121) 422 | LexManos: Patch PotionHelper to use registry delegates (#5142) 423 | LexManos: Add a notification event for handling game rule changes (#5152) 424 | 425 | Build 2766: 426 | LexManos: 427 | Change universal bucket support to use fluid names instead of instances 428 | (#5031) 429 | 430 | Build 2765: 431 | LexManos: Fix NPE on clientside entities constructed with null world (#5170) 432 | 433 | Build 2764: 434 | tterrag: Fix patches from #5160 running on the client and causing stutter 435 | 436 | Build 2763: 437 | LexManos: 438 | Class transformer optimizations (#5159) 439 | * Filter packages for deobf transformation 440 | * Only serialize transformed class with TerminalTransformer if bytecode 441 | changed 442 | 443 | Build 2762: 444 | github: Update github stale so issues can be Assigned 445 | 446 | Build 2761: 447 | LexManos: 448 | Fix MC-136995 - Chunk loading and unloading issue with entities placed 449 | in exact positions. (#5160) 450 | Scatter gun patches to improve entity tracking and position tracking. 451 | Provided by Aikar through the Paper project, this commit of patches 452 | combines the following patches: 453 | 454 | https://github.com/PaperMC/Paper/blob/fd1bd5223a461b6d98280bb8f2d67280a30dd24a/Spigot-Server-Patches/0306-Mark-chunk-dirty-anytime-entities-change-to-guarante.patch 455 | 456 | https://github.com/PaperMC/Paper/blob/fd1bd5223a461b6d98280bb8f2d67280a30dd24a/Spigot-Server-Patches/0315-Always-process-chunk-registration-after-moving.patch 457 | 458 | https://github.com/PaperMC/Paper/blob/fd1bd5223a461b6d98280bb8f2d67280a30dd24a/Spigot-Server-Patches/0335-Ensure-chunks-are-always-loaded-on-hard-position-set.patch 459 | 460 | https://github.com/PaperMC/Paper/blob/fd1bd5223a461b6d98280bb8f2d67280a30dd24a/Spigot-Server-Patches/0378-Sync-Player-Position-to-Vehicles.patch 461 | 462 | Build 2760: 463 | LexManos: Fix --mods and --modListFile arguments not making it past LaunchWrapper. 464 | 465 | Build 2759: 466 | LexManos: Remove BlamingTransformer (#5115) 467 | 468 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Sets default memory used for gradle commands. Can be overridden by user or command line properties. 2 | # This is required to provide enough memory for the Minecraft decompilation process. 3 | org.gradle.jvmargs=-Xmx3G 4 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nessiesson/ForgeMixinExampleMod/d24ade95ad221eda7110e40d6ccd5a82d28aa288/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.3-all.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /gradlew: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | 3 | ############################################################################## 4 | ## 5 | ## Gradle start up script for UN*X 6 | ## 7 | ############################################################################## 8 | 9 | # Attempt to set APP_HOME 10 | # Resolve links: $0 may be a link 11 | PRG="$0" 12 | # Need this for relative symlinks. 13 | while [ -h "$PRG" ] ; do 14 | ls=`ls -ld "$PRG"` 15 | link=`expr "$ls" : '.*-> \(.*\)$'` 16 | if expr "$link" : '/.*' > /dev/null; then 17 | PRG="$link" 18 | else 19 | PRG=`dirname "$PRG"`"/$link" 20 | fi 21 | done 22 | SAVED="`pwd`" 23 | cd "`dirname \"$PRG\"`/" >/dev/null 24 | APP_HOME="`pwd -P`" 25 | cd "$SAVED" >/dev/null 26 | 27 | APP_NAME="Gradle" 28 | APP_BASE_NAME=`basename "$0"` 29 | 30 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 31 | DEFAULT_JVM_OPTS="" 32 | 33 | # Use the maximum available, or set MAX_FD != -1 to use that value. 34 | MAX_FD="maximum" 35 | 36 | warn () { 37 | echo "$*" 38 | } 39 | 40 | die () { 41 | echo 42 | echo "$*" 43 | echo 44 | exit 1 45 | } 46 | 47 | # OS specific support (must be 'true' or 'false'). 48 | cygwin=false 49 | msys=false 50 | darwin=false 51 | nonstop=false 52 | case "`uname`" in 53 | CYGWIN* ) 54 | cygwin=true 55 | ;; 56 | Darwin* ) 57 | darwin=true 58 | ;; 59 | MINGW* ) 60 | msys=true 61 | ;; 62 | NONSTOP* ) 63 | nonstop=true 64 | ;; 65 | esac 66 | 67 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 68 | 69 | # Determine the Java command to use to start the JVM. 70 | if [ -n "$JAVA_HOME" ] ; then 71 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 72 | # IBM's JDK on AIX uses strange locations for the executables 73 | JAVACMD="$JAVA_HOME/jre/sh/java" 74 | else 75 | JAVACMD="$JAVA_HOME/bin/java" 76 | fi 77 | if [ ! -x "$JAVACMD" ] ; then 78 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 79 | 80 | Please set the JAVA_HOME variable in your environment to match the 81 | location of your Java installation." 82 | fi 83 | else 84 | JAVACMD="java" 85 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 86 | 87 | Please set the JAVA_HOME variable in your environment to match the 88 | location of your Java installation." 89 | fi 90 | 91 | # Increase the maximum file descriptors if we can. 92 | if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then 93 | MAX_FD_LIMIT=`ulimit -H -n` 94 | if [ $? -eq 0 ] ; then 95 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then 96 | MAX_FD="$MAX_FD_LIMIT" 97 | fi 98 | ulimit -n $MAX_FD 99 | if [ $? -ne 0 ] ; then 100 | warn "Could not set maximum file descriptor limit: $MAX_FD" 101 | fi 102 | else 103 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" 104 | fi 105 | fi 106 | 107 | # For Darwin, add options to specify how the application appears in the dock 108 | if $darwin; then 109 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" 110 | fi 111 | 112 | # For Cygwin, switch paths to Windows format before running java 113 | if $cygwin ; then 114 | APP_HOME=`cygpath --path --mixed "$APP_HOME"` 115 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` 116 | JAVACMD=`cygpath --unix "$JAVACMD"` 117 | 118 | # We build the pattern for arguments to be converted via cygpath 119 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` 120 | SEP="" 121 | for dir in $ROOTDIRSRAW ; do 122 | ROOTDIRS="$ROOTDIRS$SEP$dir" 123 | SEP="|" 124 | done 125 | OURCYGPATTERN="(^($ROOTDIRS))" 126 | # Add a user-defined pattern to the cygpath arguments 127 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then 128 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" 129 | fi 130 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 131 | i=0 132 | for arg in "$@" ; do 133 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` 134 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option 135 | 136 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition 137 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` 138 | else 139 | eval `echo args$i`="\"$arg\"" 140 | fi 141 | i=$((i+1)) 142 | done 143 | case $i in 144 | (0) set -- ;; 145 | (1) set -- "$args0" ;; 146 | (2) set -- "$args0" "$args1" ;; 147 | (3) set -- "$args0" "$args1" "$args2" ;; 148 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;; 149 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; 150 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; 151 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; 152 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; 153 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; 154 | esac 155 | fi 156 | 157 | # Escape application args 158 | save () { 159 | for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done 160 | echo " " 161 | } 162 | APP_ARGS=$(save "$@") 163 | 164 | # Collect all arguments for the java command, following the shell quoting and substitution rules 165 | eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" 166 | 167 | # by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong 168 | if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then 169 | cd "$(dirname "$0")" 170 | fi 171 | 172 | exec "$JAVACMD" "$@" 173 | -------------------------------------------------------------------------------- /gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | set DIRNAME=%~dp0 12 | if "%DIRNAME%" == "" set DIRNAME=. 13 | set APP_BASE_NAME=%~n0 14 | set APP_HOME=%DIRNAME% 15 | 16 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 17 | set DEFAULT_JVM_OPTS= 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windows variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | 53 | :win9xME_args 54 | @rem Slurp the command line arguments. 55 | set CMD_LINE_ARGS= 56 | set _SKIP=2 57 | 58 | :win9xME_args_slurp 59 | if "x%~1" == "x" goto execute 60 | 61 | set CMD_LINE_ARGS=%* 62 | 63 | :execute 64 | @rem Setup the command line 65 | 66 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 67 | 68 | @rem Execute Gradle 69 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 70 | 71 | :end 72 | @rem End local scope for the variables with windows NT shell 73 | if "%ERRORLEVEL%"=="0" goto mainEnd 74 | 75 | :fail 76 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 77 | rem the _cmd.exe /c_ return code! 78 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 79 | exit /b 1 80 | 81 | :mainEnd 82 | if "%OS%"=="Windows_NT" endlocal 83 | 84 | :omega 85 | -------------------------------------------------------------------------------- /src/main/java/com/example/examplemod/ExampleMod.java: -------------------------------------------------------------------------------- 1 | package com.example.examplemod; 2 | 3 | import net.minecraft.init.Blocks; 4 | import net.minecraftforge.fml.common.Mod; 5 | import net.minecraftforge.fml.common.Mod.EventHandler; 6 | import net.minecraftforge.fml.common.event.FMLInitializationEvent; 7 | import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; 8 | import org.apache.logging.log4j.Logger; 9 | 10 | @Mod(modid = ExampleMod.MODID, name = ExampleMod.NAME, version = ExampleMod.VERSION) 11 | public class ExampleMod 12 | { 13 | public static final String MODID = "examplemod"; 14 | public static final String NAME = "Example Mod"; 15 | public static final String VERSION = "1.0"; 16 | 17 | private static Logger logger; 18 | 19 | @EventHandler 20 | public void preInit(FMLPreInitializationEvent event) 21 | { 22 | logger = event.getModLog(); 23 | } 24 | 25 | @EventHandler 26 | public void init(FMLInitializationEvent event) 27 | { 28 | // some example code 29 | logger.info("DIRT BLOCK >> {}", Blocks.DIRT.getRegistryName()); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/com/example/examplemod/ExampleModLoadingPlugin.java: -------------------------------------------------------------------------------- 1 | package com.example.examplemod; 2 | 3 | import net.minecraftforge.common.ForgeVersion; 4 | import net.minecraftforge.fml.relauncher.IFMLLoadingPlugin; 5 | import org.spongepowered.asm.launch.MixinBootstrap; 6 | import org.spongepowered.asm.mixin.Mixins; 7 | 8 | import javax.annotation.Nullable; 9 | import java.util.Map; 10 | 11 | @IFMLLoadingPlugin.MCVersion(ForgeVersion.mcVersion) 12 | public class ExampleModLoadingPlugin implements IFMLLoadingPlugin 13 | { 14 | public ExampleModLoadingPlugin() 15 | { 16 | MixinBootstrap.init(); 17 | Mixins.addConfiguration("mixins.examplemod.json"); 18 | } 19 | 20 | /** 21 | * Return a list of classes that implements the IClassTransformer interface 22 | * 23 | * @return a list of classes that implements the IClassTransformer interface 24 | */ 25 | @Override 26 | public String[] getASMTransformerClass() 27 | { 28 | return new String[0]; 29 | } 30 | 31 | /** 32 | * Return a class name that implements "ModContainer" for injection into the mod list 33 | * The "getName" function should return a name that other mods can, if need be, 34 | * depend on. 35 | * Trivially, this modcontainer will be loaded before all regular mod containers, 36 | * which means it will be forced to be "immutable" - not susceptible to normal 37 | * sorting behaviour. 38 | * All other mod behaviours are available however- this container can receive and handle 39 | * normal loading events 40 | */ 41 | @Override 42 | public String getModContainerClass() 43 | { 44 | return null; 45 | } 46 | 47 | /** 48 | * Return the class name of an implementor of "IFMLCallHook", that will be run, in the 49 | * main thread, to perform any additional setup this coremod may require. It will be 50 | * run prior to Minecraft starting, so it CANNOT operate on minecraft 51 | * itself. The game will deliberately crash if this code is detected to trigger a 52 | * minecraft class loading 53 | * TODO: implement crash ;) 54 | */ 55 | @Nullable 56 | @Override 57 | public String getSetupClass() 58 | { 59 | return null; 60 | } 61 | 62 | /** 63 | * Inject coremod data into this coremod 64 | * This data includes: 65 | * "mcLocation" : the location of the minecraft directory, 66 | * "coremodList" : the list of coremods 67 | * "coremodLocation" : the file this coremod loaded from, 68 | * 69 | * @param data 70 | */ 71 | @Override 72 | public void injectData(Map data) 73 | { 74 | 75 | } 76 | 77 | /** 78 | * Return an optional access transformer class for this coremod. It will be injected post-deobf 79 | * so ensure your ATs conform to the new srgnames scheme. 80 | * 81 | * @return the name of an access transformer class or null if none is provided 82 | */ 83 | @Override 84 | public String getAccessTransformerClass() 85 | { 86 | return null; 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /src/main/java/com/example/examplemod/mixins/MixinBlockDirt.java: -------------------------------------------------------------------------------- 1 | package com.example.examplemod.mixins; 2 | 3 | import net.minecraft.block.BlockDirt; 4 | import net.minecraftforge.fml.common.FMLLog; 5 | import org.spongepowered.asm.mixin.Mixin; 6 | import org.spongepowered.asm.mixin.injection.At; 7 | import org.spongepowered.asm.mixin.injection.Inject; 8 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 9 | 10 | @Mixin(BlockDirt.class) 11 | public abstract class MixinBlockDirt 12 | { 13 | @Inject(method = "", at = @At("RETURN")) 14 | private void onDirtInit(CallbackInfo ci) 15 | { 16 | // you really should not be using FMLLog. 17 | FMLLog.info("Hello from Mixins!"); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/main/resources/mcmod.info: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "modid": "examplemod", 4 | "name": "Example Mod", 5 | "description": "Example placeholder mod.", 6 | "version": "${version}", 7 | "mcversion": "${mcversion}", 8 | "url": "", 9 | "updateUrl": "", 10 | "authorList": ["ExampleDude"], 11 | "credits": "The Forge and FML guys, for making this example", 12 | "logoFile": "", 13 | "screenshots": [], 14 | "dependencies": [] 15 | } 16 | ] 17 | -------------------------------------------------------------------------------- /src/main/resources/mixins.examplemod.json: -------------------------------------------------------------------------------- 1 | { 2 | "required": true, 3 | "package": "com.example.examplemod.mixins", 4 | "refmap": "mixins.examplemod.refmap.json", 5 | "minVersion": "0.7.3", 6 | "compatibilityLevel": "JAVA_8", 7 | "mixins": [ 8 | "MixinBlockDirt" 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /src/main/resources/pack.mcmeta: -------------------------------------------------------------------------------- 1 | { 2 | "pack": { 3 | "description": "examplemod resources", 4 | "pack_format": 3, 5 | "_comment": "A pack_format of 3 should be used starting with Minecraft 1.11. All resources, including language files, should be lowercase (eg: en_us.lang). A pack_format of 2 will load your mod resources with LegacyV2Adapter, which requires language files to have uppercase letters (eg: en_US.lang)." 6 | } 7 | } 8 | --------------------------------------------------------------------------------