├── .gitignore ├── CREDITS.txt ├── LICENSE.txt ├── README.md ├── build.gradle ├── changelog.txt ├── doc ├── architecture.jpg ├── demo.gif └── image.png ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── release └── kubechaoscraftmod-0.1.jar └── src └── main ├── java └── io │ └── github │ └── gashirar │ └── kubechaoscraft │ ├── KubeChaosCraftMod.java │ ├── ModEventSubscriber.java │ ├── config │ ├── CommonConfig.java │ └── KubeChaosCraftConfig.java │ ├── event │ └── LivingKilledByPlayerEvent.java │ └── kubernetes │ └── ExecutorSupplier.java └── resources ├── META-INF └── mods.toml └── pack.mcmeta /.gitignore: -------------------------------------------------------------------------------- 1 | # Java 2 | *.class 3 | *.war 4 | *.ear 5 | 6 | # Eclipse 7 | .project 8 | .classpath 9 | .settings 10 | 11 | # Idea 12 | .idea 13 | *.iml 14 | *.iws 15 | *.ipr 16 | 17 | # OS 18 | Thumbs.db 19 | .DS_Store 20 | 21 | # Gradle 22 | .gradle 23 | !gradle-wrapper.jar 24 | 25 | # Maven 26 | target 27 | 28 | # Build 29 | out 30 | build 31 | bin 32 | run 33 | 34 | # Other 35 | *.log 36 | *.swp 37 | *.bak 38 | -------------------------------------------------------------------------------- /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 be 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.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 | https://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 | 62 | 63 | GNU LESSER GENERAL PUBLIC LICENSE 64 | Version 2.1, February 1999 65 | 66 | Copyright (C) 1991, 1999 Free Software Foundation, Inc. 67 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 68 | Everyone is permitted to copy and distribute verbatim copies 69 | of this license document, but changing it is not allowed. 70 | 71 | [This is the first released version of the Lesser GPL. It also counts 72 | as the successor of the GNU Library Public License, version 2, hence 73 | the version number 2.1.] 74 | 75 | Preamble 76 | 77 | The licenses for most software are designed to take away your 78 | freedom to share and change it. By contrast, the GNU General Public 79 | Licenses are intended to guarantee your freedom to share and change 80 | free software--to make sure the software is free for all its users. 81 | 82 | This license, the Lesser General Public License, applies to some 83 | specially designated software packages--typically libraries--of the 84 | Free Software Foundation and other authors who decide to use it. You 85 | can use it too, but we suggest you first think carefully about whether 86 | this license or the ordinary General Public License is the better 87 | strategy to use in any particular case, based on the explanations below. 88 | 89 | When we speak of free software, we are referring to freedom of use, 90 | not price. Our General Public Licenses are designed to make sure that 91 | you have the freedom to distribute copies of free software (and charge 92 | for this service if you wish); that you receive source code or can get 93 | it if you want it; that you can change the software and use pieces of 94 | it in new free programs; and that you are informed that you can do 95 | these things. 96 | 97 | To protect your rights, we need to make restrictions that forbid 98 | distributors to deny you these rights or to ask you to surrender these 99 | rights. These restrictions translate to certain responsibilities for 100 | you if you distribute copies of the library or if you modify it. 101 | 102 | For example, if you distribute copies of the library, whether gratis 103 | or for a fee, you must give the recipients all the rights that we gave 104 | you. You must make sure that they, too, receive or can get the source 105 | code. If you link other code with the library, you must provide 106 | complete object files to the recipients, so that they can relink them 107 | with the library after making changes to the library and recompiling 108 | it. And you must show them these terms so they know their rights. 109 | 110 | We protect your rights with a two-step method: (1) we copyright the 111 | library, and (2) we offer you this license, which gives you legal 112 | permission to copy, distribute and/or modify the library. 113 | 114 | To protect each distributor, we want to make it very clear that 115 | there is no warranty for the free library. Also, if the library is 116 | modified by someone else and passed on, the recipients should know 117 | that what they have is not the original version, so that the original 118 | author's reputation will not be affected by problems that might be 119 | introduced by others. 120 | 121 | Finally, software patents pose a constant threat to the existence of 122 | any free program. We wish to make sure that a company cannot 123 | effectively restrict the users of a free program by obtaining a 124 | restrictive license from a patent holder. Therefore, we insist that 125 | any patent license obtained for a version of the library must be 126 | consistent with the full freedom of use specified in this license. 127 | 128 | Most GNU software, including some libraries, is covered by the 129 | ordinary GNU General Public License. This license, the GNU Lesser 130 | General Public License, applies to certain designated libraries, and 131 | is quite different from the ordinary General Public License. We use 132 | this license for certain libraries in order to permit linking those 133 | libraries into non-free programs. 134 | 135 | When a program is linked with a library, whether statically or using 136 | a shared library, the combination of the two is legally speaking a 137 | combined work, a derivative of the original library. The ordinary 138 | General Public License therefore permits such linking only if the 139 | entire combination fits its criteria of freedom. The Lesser General 140 | Public License permits more lax criteria for linking other code with 141 | the library. 142 | 143 | We call this license the "Lesser" General Public License because it 144 | does Less to protect the user's freedom than the ordinary General 145 | Public License. It also provides other free software developers Less 146 | of an advantage over competing non-free programs. These disadvantages 147 | are the reason we use the ordinary General Public License for many 148 | libraries. However, the Lesser license provides advantages in certain 149 | special circumstances. 150 | 151 | For example, on rare occasions, there may be a special need to 152 | encourage the widest possible use of a certain library, so that it becomes 153 | a de-facto standard. To achieve this, non-free programs must be 154 | allowed to use the library. A more frequent case is that a free 155 | library does the same job as widely used non-free libraries. In this 156 | case, there is little to gain by limiting the free library to free 157 | software only, so we use the Lesser General Public License. 158 | 159 | In other cases, permission to use a particular library in non-free 160 | programs enables a greater number of people to use a large body of 161 | free software. For example, permission to use the GNU C Library in 162 | non-free programs enables many more people to use the whole GNU 163 | operating system, as well as its variant, the GNU/Linux operating 164 | system. 165 | 166 | Although the Lesser General Public License is Less protective of the 167 | users' freedom, it does ensure that the user of a program that is 168 | linked with the Library has the freedom and the wherewithal to run 169 | that program using a modified version of the Library. 170 | 171 | The precise terms and conditions for copying, distribution and 172 | modification follow. Pay close attention to the difference between a 173 | "work based on the library" and a "work that uses the library". The 174 | former contains code derived from the library, whereas the latter must 175 | be combined with the library in order to run. 176 | 177 | GNU LESSER GENERAL PUBLIC LICENSE 178 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 179 | 180 | 0. This License Agreement applies to any software library or other 181 | program which contains a notice placed by the copyright holder or 182 | other authorized party saying it may be distributed under the terms of 183 | this Lesser General Public License (also called "this License"). 184 | Each licensee is addressed as "you". 185 | 186 | A "library" means a collection of software functions and/or data 187 | prepared so as to be conveniently linked with application programs 188 | (which use some of those functions and data) to form executables. 189 | 190 | The "Library", below, refers to any such software library or work 191 | which has been distributed under these terms. A "work based on the 192 | Library" means either the Library or any derivative work under 193 | copyright law: that is to say, a work containing the Library or a 194 | portion of it, either verbatim or with modifications and/or translated 195 | straightforwardly into another language. (Hereinafter, translation is 196 | included without limitation in the term "modification".) 197 | 198 | "Source code" for a work means the preferred form of the work for 199 | making modifications to it. For a library, complete source code means 200 | all the source code for all modules it contains, plus any associated 201 | interface definition files, plus the scripts used to control compilation 202 | and installation of the library. 203 | 204 | Activities other than copying, distribution and modification are not 205 | covered by this License; they are outside its scope. The act of 206 | running a program using the Library is not restricted, and output from 207 | such a program is covered only if its contents constitute a work based 208 | on the Library (independent of the use of the Library in a tool for 209 | writing it). Whether that is true depends on what the Library does 210 | and what the program that uses the Library does. 211 | 212 | 1. You may copy and distribute verbatim copies of the Library's 213 | complete source code as you receive it, in any medium, provided that 214 | you conspicuously and appropriately publish on each copy an 215 | appropriate copyright notice and disclaimer of warranty; keep intact 216 | all the notices that refer to this License and to the absence of any 217 | warranty; and distribute a copy of this License along with the 218 | Library. 219 | 220 | You may charge a fee for the physical act of transferring a copy, 221 | and you may at your option offer warranty protection in exchange for a 222 | fee. 223 | 224 | 2. You may modify your copy or copies of the Library or any portion 225 | of it, thus forming a work based on the Library, and copy and 226 | distribute such modifications or work under the terms of Section 1 227 | above, provided that you also meet all of these conditions: 228 | 229 | a) The modified work must itself be a software library. 230 | 231 | b) You must cause the files modified to carry prominent notices 232 | stating that you changed the files and the date of any change. 233 | 234 | c) You must cause the whole of the work to be licensed at no 235 | charge to all third parties under the terms of this License. 236 | 237 | d) If a facility in the modified Library refers to a function or a 238 | table of data to be supplied by an application program that uses 239 | the facility, other than as an argument passed when the facility 240 | is invoked, then you must make a good faith effort to ensure that, 241 | in the event an application does not supply such function or 242 | table, the facility still operates, and performs whatever part of 243 | its purpose remains meaningful. 244 | 245 | (For example, a function in a library to compute square roots has 246 | a purpose that is entirely well-defined independent of the 247 | application. Therefore, Subsection 2d requires that any 248 | application-supplied function or table used by this function must 249 | be optional: if the application does not supply it, the square 250 | root function must still compute square roots.) 251 | 252 | These requirements apply to the modified work as a whole. If 253 | identifiable sections of that work are not derived from the Library, 254 | and can be reasonably considered independent and separate works in 255 | themselves, then this License, and its terms, do not apply to those 256 | sections when you distribute them as separate works. But when you 257 | distribute the same sections as part of a whole which is a work based 258 | on the Library, the distribution of the whole must be on the terms of 259 | this License, whose permissions for other licensees extend to the 260 | entire whole, and thus to each and every part regardless of who wrote 261 | it. 262 | 263 | Thus, it is not the intent of this section to claim rights or contest 264 | your rights to work written entirely by you; rather, the intent is to 265 | exercise the right to control the distribution of derivative or 266 | collective works based on the Library. 267 | 268 | In addition, mere aggregation of another work not based on the Library 269 | with the Library (or with a work based on the Library) on a volume of 270 | a storage or distribution medium does not bring the other work under 271 | the scope of this License. 272 | 273 | 3. You may opt to apply the terms of the ordinary GNU General Public 274 | License instead of this License to a given copy of the Library. To do 275 | this, you must alter all the notices that refer to this License, so 276 | that they refer to the ordinary GNU General Public License, version 2, 277 | instead of to this License. (If a newer version than version 2 of the 278 | ordinary GNU General Public License has appeared, then you can specify 279 | that version instead if you wish.) Do not make any other change in 280 | these notices. 281 | 282 | Once this change is made in a given copy, it is irreversible for 283 | that copy, so the ordinary GNU General Public License applies to all 284 | subsequent copies and derivative works made from that copy. 285 | 286 | This option is useful when you wish to copy part of the code of 287 | the Library into a program that is not a library. 288 | 289 | 4. You may copy and distribute the Library (or a portion or 290 | derivative of it, under Section 2) in object code or executable form 291 | under the terms of Sections 1 and 2 above provided that you accompany 292 | it with the complete corresponding machine-readable source code, which 293 | must be distributed under the terms of Sections 1 and 2 above on a 294 | medium customarily used for software interchange. 295 | 296 | If distribution of object code is made by offering access to copy 297 | from a designated place, then offering equivalent access to copy the 298 | source code from the same place satisfies the requirement to 299 | distribute the source code, even though third parties are not 300 | compelled to copy the source along with the object code. 301 | 302 | 5. A program that contains no derivative of any portion of the 303 | Library, but is designed to work with the Library by being compiled or 304 | linked with it, is called a "work that uses the Library". Such a 305 | work, in isolation, is not a derivative work of the Library, and 306 | therefore falls outside the scope of this License. 307 | 308 | However, linking a "work that uses the Library" with the Library 309 | creates an executable that is a derivative of the Library (because it 310 | contains portions of the Library), rather than a "work that uses the 311 | library". The executable is therefore covered by this License. 312 | Section 6 states terms for distribution of such executables. 313 | 314 | When a "work that uses the Library" uses material from a header file 315 | that is part of the Library, the object code for the work may be a 316 | derivative work of the Library even though the source code is not. 317 | Whether this is true is especially significant if the work can be 318 | linked without the Library, or if the work is itself a library. The 319 | threshold for this to be true is not precisely defined by law. 320 | 321 | If such an object file uses only numerical parameters, data 322 | structure layouts and accessors, and small macros and small inline 323 | functions (ten lines or less in length), then the use of the object 324 | file is unrestricted, regardless of whether it is legally a derivative 325 | work. (Executables containing this object code plus portions of the 326 | Library will still fall under Section 6.) 327 | 328 | Otherwise, if the work is a derivative of the Library, you may 329 | distribute the object code for the work under the terms of Section 6. 330 | Any executables containing that work also fall under Section 6, 331 | whether or not they are linked directly with the Library itself. 332 | 333 | 6. As an exception to the Sections above, you may also combine or 334 | link a "work that uses the Library" with the Library to produce a 335 | work containing portions of the Library, and distribute that work 336 | under terms of your choice, provided that the terms permit 337 | modification of the work for the customer's own use and reverse 338 | engineering for debugging such modifications. 339 | 340 | You must give prominent notice with each copy of the work that the 341 | Library is used in it and that the Library and its use are covered by 342 | this License. You must supply a copy of this License. If the work 343 | during execution displays copyright notices, you must include the 344 | copyright notice for the Library among them, as well as a reference 345 | directing the user to the copy of this License. Also, you must do one 346 | of these things: 347 | 348 | a) Accompany the work with the complete corresponding 349 | machine-readable source code for the Library including whatever 350 | changes were used in the work (which must be distributed under 351 | Sections 1 and 2 above); and, if the work is an executable linked 352 | with the Library, with the complete machine-readable "work that 353 | uses the Library", as object code and/or source code, so that the 354 | user can modify the Library and then relink to produce a modified 355 | executable containing the modified Library. (It is understood 356 | that the user who changes the contents of definitions files in the 357 | Library will not necessarily be able to recompile the application 358 | to use the modified definitions.) 359 | 360 | b) Use a suitable shared library mechanism for linking with the 361 | Library. A suitable mechanism is one that (1) uses at run time a 362 | copy of the library already present on the user's computer system, 363 | rather than copying library functions into the executable, and (2) 364 | will operate properly with a modified version of the library, if 365 | the user installs one, as long as the modified version is 366 | interface-compatible with the version that the work was made with. 367 | 368 | c) Accompany the work with a written offer, valid for at 369 | least three years, to give the same user the materials 370 | specified in Subsection 6a, above, for a charge no more 371 | than the cost of performing this distribution. 372 | 373 | d) If distribution of the work is made by offering access to copy 374 | from a designated place, offer equivalent access to copy the above 375 | specified materials from the same place. 376 | 377 | e) Verify that the user has already received a copy of these 378 | materials or that you have already sent this user a copy. 379 | 380 | For an executable, the required form of the "work that uses the 381 | Library" must include any data and utility programs needed for 382 | reproducing the executable from it. However, as a special exception, 383 | the materials to be distributed need not include anything that is 384 | normally distributed (in either source or binary form) with the major 385 | components (compiler, kernel, and so on) of the operating system on 386 | which the executable runs, unless that component itself accompanies 387 | the executable. 388 | 389 | It may happen that this requirement contradicts the license 390 | restrictions of other proprietary libraries that do not normally 391 | accompany the operating system. Such a contradiction means you cannot 392 | use both them and the Library together in an executable that you 393 | distribute. 394 | 395 | 7. You may place library facilities that are a work based on the 396 | Library side-by-side in a single library together with other library 397 | facilities not covered by this License, and distribute such a combined 398 | library, provided that the separate distribution of the work based on 399 | the Library and of the other library facilities is otherwise 400 | permitted, and provided that you do these two things: 401 | 402 | a) Accompany the combined library with a copy of the same work 403 | based on the Library, uncombined with any other library 404 | facilities. This must be distributed under the terms of the 405 | Sections above. 406 | 407 | b) Give prominent notice with the combined library of the fact 408 | that part of it is a work based on the Library, and explaining 409 | where to find the accompanying uncombined form of the same work. 410 | 411 | 8. You may not copy, modify, sublicense, link with, or distribute 412 | the Library except as expressly provided under this License. Any 413 | attempt otherwise to copy, modify, sublicense, link with, or 414 | distribute the Library is void, and will automatically terminate your 415 | rights under this License. However, parties who have received copies, 416 | or rights, from you under this License will not have their licenses 417 | terminated so long as such parties remain in full compliance. 418 | 419 | 9. You are not required to accept this License, since you have not 420 | signed it. However, nothing else grants you permission to modify or 421 | distribute the Library or its derivative works. These actions are 422 | prohibited by law if you do not accept this License. Therefore, by 423 | modifying or distributing the Library (or any work based on the 424 | Library), you indicate your acceptance of this License to do so, and 425 | all its terms and conditions for copying, distributing or modifying 426 | the Library or works based on it. 427 | 428 | 10. Each time you redistribute the Library (or any work based on the 429 | Library), the recipient automatically receives a license from the 430 | original licensor to copy, distribute, link with or modify the Library 431 | subject to these terms and conditions. You may not impose any further 432 | restrictions on the recipients' exercise of the rights granted herein. 433 | You are not responsible for enforcing compliance by third parties with 434 | this License. 435 | 436 | 11. If, as a consequence of a court judgment or allegation of patent 437 | infringement or for any other reason (not limited to patent issues), 438 | conditions are imposed on you (whether by court order, agreement or 439 | otherwise) that contradict the conditions of this License, they do not 440 | excuse you from the conditions of this License. If you cannot 441 | distribute so as to satisfy simultaneously your obligations under this 442 | License and any other pertinent obligations, then as a consequence you 443 | may not distribute the Library at all. For example, if a patent 444 | license would not permit royalty-free redistribution of the Library by 445 | all those who receive copies directly or indirectly through you, then 446 | the only way you could satisfy both it and this License would be to 447 | refrain entirely from distribution of the Library. 448 | 449 | If any portion of this section is held invalid or unenforceable under any 450 | particular circumstance, the balance of the section is intended to apply, 451 | and the section as a whole is intended to apply in other circumstances. 452 | 453 | It is not the purpose of this section to induce you to infringe any 454 | patents or other property right claims or to contest validity of any 455 | such claims; this section has the sole purpose of protecting the 456 | integrity of the free software distribution system which is 457 | implemented by public license practices. Many people have made 458 | generous contributions to the wide range of software distributed 459 | through that system in reliance on consistent application of that 460 | system; it is up to the author/donor to decide if he or she is willing 461 | to distribute software through any other system and a licensee cannot 462 | impose that choice. 463 | 464 | This section is intended to make thoroughly clear what is believed to 465 | be a consequence of the rest of this License. 466 | 467 | 12. If the distribution and/or use of the Library is restricted in 468 | certain countries either by patents or by copyrighted interfaces, the 469 | original copyright holder who places the Library under this License may add 470 | an explicit geographical distribution limitation excluding those countries, 471 | so that distribution is permitted only in or among countries not thus 472 | excluded. In such case, this License incorporates the limitation as if 473 | written in the body of this License. 474 | 475 | 13. The Free Software Foundation may publish revised and/or new 476 | versions of the Lesser General Public License from time to time. 477 | Such new versions will be similar in spirit to the present version, 478 | but may differ in detail to address new problems or concerns. 479 | 480 | Each version is given a distinguishing version number. If the Library 481 | specifies a version number of this License which applies to it and 482 | "any later version", you have the option of following the terms and 483 | conditions either of that version or of any later version published by 484 | the Free Software Foundation. If the Library does not specify a 485 | license version number, you may choose any version ever published by 486 | the Free Software Foundation. 487 | 488 | 14. If you wish to incorporate parts of the Library into other free 489 | programs whose distribution conditions are incompatible with these, 490 | write to the author to ask for permission. For software which is 491 | copyrighted by the Free Software Foundation, write to the Free 492 | Software Foundation; we sometimes make exceptions for this. Our 493 | decision will be guided by the two goals of preserving the free status 494 | of all derivatives of our free software and of promoting the sharing 495 | and reuse of software generally. 496 | 497 | NO WARRANTY 498 | 499 | 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO 500 | WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. 501 | EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR 502 | OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY 503 | KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE 504 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 505 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE 506 | LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME 507 | THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 508 | 509 | 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN 510 | WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY 511 | AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU 512 | FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR 513 | CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE 514 | LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING 515 | RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A 516 | FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF 517 | SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH 518 | DAMAGES. 519 | 520 | END OF TERMS AND CONDITIONS 521 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # KubeChaosCraft Mod 2 | 3 | Kubernetes + Chaos Engineering + Minecraft = KubeChaosCraft! 4 | Gamified Chaos Engineering tool for Kubernetes. 5 | 6 | Inspired by KubeInvaders. 7 | https://github.com/lucky-sideburn/KubeInvaders 8 | 9 | 10 | ## Description 11 | 12 | KubeChaosCraft is Minecraft Mod. 13 | 14 | ![Architecture](doc/image.png "Let`s delete Pod!") 15 | 16 | See [Demo](https://github.com/gashirar/KubeChaosCraftMod/blob/master/doc/demo.gif) 17 | 18 | Using the event that the player defeated the Mob, it sends a request to the Kubernetes API Server to remove the Pod. 19 | 20 | ![Architecture](doc/architecture.jpg "Architecture") 21 | 22 | 23 | ## Installations 24 | 25 | ### Minecraft and Minecraft Forge 26 | 27 | Sorry! Please do your own. 28 | 29 | Forge Version is v1.15.2! 30 | 31 | 32 | 33 | ### KubeChaosCraftMod 34 | 35 | Put the `release/kubechaoscraftmod-x.x.jar` file in the mod directory. 36 | 37 | 38 | 39 | ### Kubernetes 40 | 41 | Start a Kubernetes cluster with v1.16. 42 | 43 | I recommend Minikube. 44 | 45 | `minikube start --kubernetes-version=v1.16.0` 46 | 47 | 48 | 49 | ## Configurations 50 | 51 | ### KubeChaosCraftMod Configuration 52 | | var | description | default value | 53 | | ---------------- | ------------------------------------------------------------ | ------------- | 54 | | threshold | The threshold to delete the Pod. If set to 0.5, there is a 50% chance that the Pod will be removed every time a Mob is killed by a player. | 0.0 | 55 | | targetNamespaces | List of the target namespace. | [] | 56 | 57 | ### Kubernetes Configuration 58 | This Mod uses Config.defaultClient() to obtain the cluster information. So make sure you have a Kubernetes configuration on the environment where you are running Minecraft. 59 | 60 | 61 | 62 | ## Use cases 63 | 64 | 65 | 66 | Adopting chaos engineering strategies for your production environment is really useful, because it is the only way to test if a system supports unexpected destructive events. 67 | 68 | ~~KubeInvaders~~ KubeChaosCraft is a game — so please do not take it too seriously! — but it demonstrates some important use cases: 69 | 70 | - Test how resilient Kubernetes clusters are on unexpected pod deletion 71 | - Collect metrics like pod restart time 72 | - Tune readiness probes 73 | 74 | https://kubernetes.io/blog/2020/01/22/kubeinvaders-gamified-chaos-engineering-tool-for-kubernetes/ 75 | 76 | 77 | 78 | ## All credits for Forge, FML etc go to their respective owners. 79 | 80 | Any code written by me is free for any use at all. -------------------------------------------------------------------------------- /build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | repositories { 3 | maven { url = 'https://files.minecraftforge.net/maven' } 4 | jcenter() 5 | mavenCentral() 6 | } 7 | dependencies { 8 | classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '3.+', changing: true 9 | } 10 | } 11 | 12 | plugins { 13 | id 'com.github.johnrengelman.shadow' version '5.2.0' 14 | id 'java' 15 | } 16 | 17 | apply plugin: 'net.minecraftforge.gradle' 18 | // Only edit below this line, the above code adds and enables the necessary things for Forge to be setup. 19 | apply plugin: 'eclipse' 20 | apply plugin: 'maven-publish' 21 | 22 | version = '0.1' 23 | group = 'io.github.gashirar.kubechaoscraftmod' // http://maven.apache.org/guides/mini/guide-naming-conventions.html 24 | archivesBaseName = 'kubechaoscraftmod' 25 | 26 | sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8' // Need this here so eclipse task generates correctly. 27 | 28 | minecraft { 29 | // The mappings can be changed at any time, and must be in the following format. 30 | // snapshot_YYYYMMDD Snapshot are built nightly. 31 | // stable_# Stables are built at the discretion of the MCP team. 32 | // Use non-default mappings at your own risk. they may not always work. 33 | // Simply re-run your setup task after changing the mappings to update your workspace. 34 | mappings channel: 'snapshot', version: '20200514-1.15.1' 35 | // makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable. 36 | 37 | // accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg') 38 | 39 | // Default run configurations. 40 | // These can be tweaked, removed, or duplicated as needed. 41 | runs { 42 | client { 43 | workingDirectory project.file('run') 44 | 45 | // Recommended logging data for a userdev environment 46 | property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP' 47 | 48 | // Recommended logging level for the console 49 | property 'forge.logging.console.level', 'debug' 50 | 51 | mods { 52 | kubechaoscraftmod { 53 | source sourceSets.main 54 | } 55 | } 56 | } 57 | 58 | server { 59 | workingDirectory project.file('run') 60 | 61 | // Recommended logging data for a userdev environment 62 | property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP' 63 | 64 | // Recommended logging level for the console 65 | property 'forge.logging.console.level', 'debug' 66 | 67 | mods { 68 | kubechaoscraftmod { 69 | source sourceSets.main 70 | } 71 | } 72 | } 73 | 74 | data { 75 | workingDirectory project.file('run') 76 | 77 | // Recommended logging data for a userdev environment 78 | property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP' 79 | 80 | // Recommended logging level for the console 81 | property 'forge.logging.console.level', 'debug' 82 | 83 | args '--mod', 'kubechaoscraftmod', '--all', '--output', file('src/generated/resources/') 84 | 85 | mods { 86 | kubechaoscraftmod { 87 | source sourceSets.main 88 | } 89 | } 90 | } 91 | } 92 | } 93 | 94 | configurations { 95 | provided 96 | compile.extendsFrom provided 97 | } 98 | 99 | dependencies { 100 | // Specify the version of Minecraft to use, If this is any group other then 'net.minecraft' it is assumed 101 | // that the dep is a ForgeGradle 'patcher' dependency. And it's patches will be applied. 102 | // The userdev artifact is a special name and will get all sorts of transformations applied to it. 103 | minecraft 'net.minecraftforge:forge:1.15.2-31.2.0' 104 | 105 | // You may put jars on which you depend on in ./libs or you may define them like so.. 106 | // compile "some.group:artifact:version:classifier" 107 | // compile "some.group:artifact:version" 108 | 109 | // Real examples 110 | // compile 'com.mod-buildcraft:buildcraft:6.0.8:dev' // adds buildcraft to the dev env 111 | // compile 'com.googlecode.efficient-java-matrix-library:ejml:0.24' // adds ejml to the dev env 112 | 113 | // The 'provided' configuration is for optional dependencies that exist at compile-time but might not at runtime. 114 | // provided 'com.mod-buildcraft:buildcraft:6.0.8:dev' 115 | 116 | // These dependencies get remapped to your current MCP mappings 117 | // deobf 'com.mod-buildcraft:buildcraft:6.0.8:dev' 118 | 119 | // For more info... 120 | // http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html 121 | // http://www.gradle.org/docs/current/userguide/dependency_management.html 122 | 123 | shadow 'io.kubernetes:client-java:8.0.2' 124 | } 125 | 126 | // Example for how to get properties into the manifest for reading by the runtime.. 127 | jar { 128 | manifest { 129 | attributes([ 130 | "Specification-Title": "kubechaoscraftmod", 131 | "Specification-Vendor": "kubechaoscraftmodsareus", 132 | "Specification-Version": "1", // We are version 1 of ourselves 133 | "Implementation-Title": project.name, 134 | "Implementation-Version": "${version}", 135 | "Implementation-Vendor" :"kubechaoscraftmodsareus", 136 | "Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ") 137 | ]) 138 | } 139 | } 140 | 141 | // Example configuration to allow publishing using the maven-publish task 142 | // This is the preferred method to reobfuscate your jar file 143 | jar.finalizedBy('reobfJar') 144 | // However if you are in a multi-project build, dev time needs unobfed jar files, so you can delay the obfuscation until publishing by doing 145 | //publish.dependsOn('reobfJar') 146 | 147 | publishing { 148 | publications { 149 | mavenJava(MavenPublication) { 150 | artifact jar 151 | } 152 | } 153 | repositories { 154 | maven { 155 | url "file:///${project.projectDir}/mcmodsrepo" 156 | } 157 | } 158 | } 159 | 160 | shadowJar { 161 | configurations = [project.configurations.shadow] // *** 162 | } -------------------------------------------------------------------------------- /changelog.txt: -------------------------------------------------------------------------------- 1 | Build: 1.15.2-31.2.0 - Fri May 15 19:34:16 GMT 2020 2 | lex: 3 | Bump version for new RB. 4 | 5 | ========= 6 | Build: 1.15.2-31.1.99 - Fri May 15 19:25:51 GMT 2020 7 | lex: 8 | Update MCP Mappings. 9 | 10 | ========= 11 | Build: 1.15.2-31.1.98 - Fri May 15 18:34:16 GMT 2020 12 | ichttt: 13 | fix test mod and add warning comment to framebuffer (#6698) 14 | 15 | ========= 16 | Build: 1.15.2-31.1.97 - Fri May 15 18:00:19 GMT 2020 17 | lex: 18 | Fix incorrect argument passed in RenderPipeline potentially causing crash. #6677 19 | 20 | lex: 21 | Fix FireBlock using flammability instead of spread speed when looking for places to spread. Closes #6646 22 | 23 | ========= 24 | Build: 1.15.2-31.1.95 - Fri May 15 17:53:00 GMT 2020 25 | FunwayguyEmail: 26 | Re-added patch to enable stencil buffer in net.minecraft.client.shader.Framebuffer 27 | Add test for the stencil buffer feature. Only tests that it doesn't crash when enabling, for now. - giga 28 | 29 | thesilkminer: 30 | Allow Music Discs to be created with SoundEvent delegates. (#6523) 31 | 32 | ========= 33 | Build: 1.15.2-31.1.93 - Fri May 15 17:32:12 GMT 2020 34 | Edwin.mindcraft: 35 | Use IProperty#getName when generating blockstate jsons (#6582) 36 | 37 | Close #6520 38 | 39 | ========= 40 | Build: 1.15.2-31.1.92 - Fri May 15 17:26:19 GMT 2020 41 | David Quintana: 42 | Model system fixes: 43 | - Add "origin" key to determine what origin to use. This will default to the existing (broken) behaviour to avoid breaking changes. 44 | - Fix interaction of transforms with variant transforms (transformation ordering). 45 | - Fix OBJ loader ignoring "diffuseLighting" attribute from the json. 46 | This attribute will continue not being used if "ambientToFullbright" is on (default) to avoid breaking changes. 47 | 48 | ========= 49 | Build: 1.15.2-31.1.91 - Fri May 15 16:38:42 GMT 2020 50 | lex: 51 | Fixed Partivle.onGround not updating correctly due to decompile error. Closes #6595 52 | 53 | lex: 54 | Fixed typo in registry alias writing causing infinite loop. Closes #6689 55 | 56 | ========= 57 | Build: 1.15.2-31.1.89 - Fri May 15 14:45:46 GMT 2020 58 | laughlan.cov: 59 | Remove duplicate post of ChunkEvent.Load. (#6697) 60 | 61 | ========= 62 | Build: 1.15.2-31.1.88 - Thu May 14 20:22:21 GMT 2020 63 | thpetuaudletang: 64 | Fix LevelChange event not firing after enchanting (#6693) 65 | 66 | ========= 67 | Build: 1.15.2-31.1.87 - Tue May 12 22:11:53 GMT 2020 68 | ichttt: 69 | Fix server config directory remaining locked when integrated server is shut down. (#6644) 70 | 71 | ========= 72 | Build: 1.15.2-31.1.86 - Tue May 12 22:02:09 GMT 2020 73 | LXGaming: 74 | Fix exclusion of coremods not filtering correctly when the mods directory is a symbolic link. (#6600) 75 | 76 | ========= 77 | Build: 1.15.2-31.1.85 - Tue May 12 21:29:40 GMT 2020 78 | jdk: 79 | Allow Bees to use custom hives. (#6656) 80 | 81 | ========= 82 | Build: 1.15.2-31.1.84 - Tue May 12 21:23:13 GMT 2020 83 | jmansfield: 84 | Fix vanilla screens escape key not matching done button behavior (#6682) 85 | 86 | jmansfield: 87 | Fixed CropGrowEvents not firing for Bamboo (#6680) 88 | 89 | tomboshoven: 90 | Fixed tile entities persisting when switching between states that don't have TEs without changing the block. (#6674) 91 | 92 | ========= 93 | Build: 1.15.2-31.1.81 - Tue May 12 21:17:26 GMT 2020 94 | ShetiPhian: 95 | Fixed FluidTank.drain calling onContentsChanged when simulating (#6684) 96 | 97 | ========= 98 | Build: 1.15.2-31.1.80 - Tue May 12 21:08:20 GMT 2020 99 | lex: 100 | Fix infinite loading screen when resources error. Closes #6592 & #6593 101 | 102 | ========= 103 | Build: 1.15.2-31.1.79 - Mon May 11 22:28:50 GMT 2020 104 | laughlan.cov: 105 | Fix IForgeBlock.removedByPlayer not firing on the client. (#6638) 106 | 107 | ========= 108 | Build: 1.15.2-31.1.78 - Mon May 11 00:35:20 GMT 2020 109 | cpw: 110 | Update to newer eventbus, with typetools compatibility with jvms up to j14. No guarantees on actual game compatibility however. 111 | 112 | Signed-off-by: cpw 113 | 114 | ========= 115 | Build: 1.15.2-31.1.77 - Wed May 06 20:49:23 GMT 2020 116 | jmansfield: 117 | Fixed informational /forge commands being repeated to all ops when logging is enabled. Closes #6330 118 | 119 | ========= 120 | Build: 1.15.2-31.1.76 - Wed May 06 20:41:52 GMT 2020 121 | jmansfield: 122 | Fix ModListScreen escape key not matching done button behavior. Closes #6672 123 | 124 | ========= 125 | Build: 1.15.2-31.1.75 - Wed May 06 11:31:06 GMT 2020 126 | David Quintana: 127 | Patch the bucket logic to not hardcode some checks to WATER. Fixes not being able to place custom fluids into modded fluid-loggable blocks that accept fluids other than water. 128 | 129 | ========= 130 | Build: 1.15.2-31.1.74 - Sun May 03 23:13:58 GMT 2020 131 | David Quintana: 132 | Avoid discarding the bottom 4 bits of the lightmap coords. It turns out vanilla relies on those bits. Fixes some blocks being darker than they should be in certain circumstances. 133 | 134 | ========= 135 | Build: 1.15.2-31.1.73 - Sun May 03 20:48:25 GMT 2020 136 | jacob101607: 137 | Fix issue with providing a null ItemStack to onPlayerDestroyItem (#6633) 138 | 139 | ========= 140 | Build: 1.15.2-31.1.72 - Sun May 03 20:40:43 GMT 2020 141 | Bward7864: 142 | Allow overriding of tool level requirements when harvesting a block, via the HarvestCheck event. (#6632) 143 | 144 | ========= 145 | Build: 1.15.2-31.1.71 - Sun May 03 20:34:34 GMT 2020 146 | richard: 147 | Fixed Hoppers not inserting fully into custom contains with slots that can hold more then max stack (#6631) 148 | 149 | ========= 150 | Build: 1.15.2-31.1.70 - Sun May 03 20:27:39 GMT 2020 151 | darklime: 152 | Change recipe condition log level to debug. (#6621) 153 | 154 | darklime: 155 | Fix vanilla loot table resource leak. (#6622) 156 | 157 | LordMonoxide: 158 | Fixed ChunkDataEvent.Save being fired with a null world if chunk isn't fully generated when unloaded. (#6628) 159 | 160 | ========= 161 | Build: 1.15.2-31.1.67 - Sun May 03 20:21:40 GMT 2020 162 | 41904979+CAS-ual-TY: 163 | Fix milk buckets removing potion effects without filters. (#6609) 164 | 165 | ========= 166 | Build: 1.15.2-31.1.66 - Sun May 03 20:15:40 GMT 2020 167 | dion: 168 | Added missing localization for swim speed, and reach distance attributes (#6585) 169 | 170 | ========= 171 | Build: 1.15.2-31.1.65 - Sun May 03 20:09:37 GMT 2020 172 | williewillus: 173 | Allow colors of tooltip to be specified in GuiUtils.drawHoveringText tooltip methods (#6579) 174 | 175 | ========= 176 | Build: 1.15.2-31.1.64 - Sun May 03 19:56:55 GMT 2020 177 | ichttt: 178 | Fix config comments referencing disallowed enum values. (#6542) 179 | 180 | ========= 181 | Build: 1.15.2-31.1.63 - Tue Apr 28 17:23:47 GMT 2020 182 | David Quintana: 183 | Remove redundant call to modifyLoot. Closes #6657 184 | 185 | ========= 186 | Build: 1.15.2-31.1.62 - Tue Apr 28 04:02:06 GMT 2020 187 | tterrag: 188 | Fix various issues with the loading screen and datagen 189 | 190 | Fix NPE on datagen startup 191 | Fix early loading GUI hanging and never terminating after datagen 192 | Add loading GUI messages for datagen 193 | 194 | ========= 195 | Build: 1.15.2-31.1.61 - Mon Apr 27 18:06:44 GMT 2020 196 | weiland: 197 | Fix BackgroundScanHandler crashing on servers (#6660) 198 | 199 | ========= 200 | Build: 1.15.2-31.1.60 - Mon Apr 27 13:55:33 GMT 2020 201 | cpw: 202 | Remove silly icon override. Squirrels are fun y'all.. 203 | 204 | Signed-off-by: cpw 205 | 206 | ========= 207 | Build: 1.15.2-31.1.59 - Mon Apr 27 05:10:06 GMT 2020 208 | tterrag: 209 | Fix VariantList calling deprecated bake method 210 | 211 | tterrag: 212 | Rename window icon image to avoid conflict, fix not using vanilla icon 213 | 214 | ========= 215 | Build: 1.15.2-31.1.57 - Mon Apr 27 03:06:13 GMT 2020 216 | lex: 217 | Fix Automatic Event Subscriber not detecting mod id defaults, and fix test mods. 218 | 219 | lex: 220 | Fix resource packs not being sorted properly. Closes #6287 221 | 222 | ========= 223 | Build: 1.15.2-31.1.55 - Mon Apr 27 01:42:42 GMT 2020 224 | roguelogix: 225 | move handOffWindow down near start() 226 | 227 | roguelogix: 228 | Move ClientVisualization to secondary thread 229 | 230 | cpw: 231 | Handle message display a bit better, try to make the UI tick a bit better.. Still a problem with 232 | a modelbake right at the end, happening on the window flip. 233 | 234 | Signed-off-by: cpw 235 | 236 | cpw: 237 | Use forge logo as short term window Icon, fix Buffer cast problems for new JDK stupid. 238 | 239 | Signed-off-by: cpw 240 | 241 | ========= 242 | Build: 1.15.2-31.1.51 - Sun Apr 26 22:25:05 GMT 2020 243 | cpw: 244 | merge early startup into main window if used. It seems to work well.. Also ticks window on main thread, so mac compatible now. 245 | 246 | Signed-off-by: cpw 247 | 248 | ========= 249 | Build: 1.15.2-31.1.50 - Sat Apr 25 21:55:22 GMT 2020 250 | cpw: 251 | Update jenkinsfile and gradle for new versions of things.. 252 | 253 | Signed-off-by: cpw 254 | 255 | ========= 256 | Build: 1.15.2-31.1.49 - Sat Apr 25 02:19:14 GMT 2020 257 | lex: 258 | Fix potential NPEs in RegistryObject.orElseThrow/isPresent/ifPresent Closes #6647 259 | 260 | ========= 261 | Build: 1.15.2-31.1.48 - Thu Apr 23 12:57:42 GMT 2020 262 | David Quintana: 263 | Add tickRate setter to the ForgeFlowingFluid Properties builder. 264 | 265 | ========= 266 | Build: 1.15.2-31.1.47 - Mon Apr 20 01:37:16 GMT 2020 267 | cpw: 268 | Fix recursion mess in PlayerAdvancement loading, by using an alternative based on a toposorted list of all advancements. 269 | It seems to be fully equivalent in testing, but there may be corner cases, so there is a config to disable, though disabling 270 | may break servers, especially those chunkloading fake players. 271 | 272 | Signed-off-by: cpw 273 | 274 | ========= 275 | Build: 1.15.2-31.1.46 - Wed Apr 15 17:10:05 GMT 2020 276 | lex: 277 | Revert defualt jvm args. 278 | 279 | ========= 280 | Build: 1.15.2-31.1.45 - Wed Apr 15 06:54:47 GMT 2020 281 | lex: 282 | Fixed dev time compilation using J9+ producing incorrect bytecode. 283 | 284 | ========= 285 | Build: 1.15.2-31.1.44 - Sun Apr 12 19:27:19 GMT 2020 286 | David Quintana: 287 | Add "type" field to global loot modifier jsons. (#6554) 288 | 289 | * Add "type" field to global loot modifier jsons and fix tests. 290 | To avoid binary breaking, "type" defaults to be the same as the filename. 291 | * Fix license headers. 292 | 293 | ========= 294 | Build: 1.15.2-31.1.43 - Sat Apr 11 06:03:58 GMT 2020 295 | tterrag: 296 | Fix child annotations not inheriting member name, cleanup 297 | 298 | ========= 299 | Build: 1.15.2-31.1.42 - Sat Apr 11 05:20:15 GMT 2020 300 | tterrag: 301 | Fix element type of scanned child annotations 302 | 303 | ========= 304 | Build: 1.15.2-31.1.41 - Thu Apr 09 00:19:35 GMT 2020 305 | 28677702+patrick-aoc: 306 | Fixed PlantType not extending IExtensibleEnum, Closes #6286 307 | 308 | ========= 309 | Build: 1.15.2-31.1.40 - Thu Apr 09 00:12:15 GMT 2020 310 | 46117728+valoeghese: 311 | Added hook to allow modded Hill Biomes (#6571) 312 | 313 | ========= 314 | Build: 1.15.2-31.1.39 - Wed Apr 08 01:45:04 GMT 2020 315 | tterrag: 316 | Revive forge lighting pipeline, disabled by default for now 317 | 318 | Remove a lot of light value convolution by using 0..1 for nearly everything 319 | Fix a lot of TODOs that are needed for the lighting pipeline to function 320 | Potential fix for #6425 321 | 322 | tterrag: 323 | Improve performance of VertexBufferConsumer by inlining element locs 324 | 325 | ========= 326 | Build: 1.15.2-31.1.37 - Sun Apr 05 04:50:22 GMT 2020 327 | tterrag: 328 | Fix Tag serializing empty optionals, improve RegistryObject error msg 329 | 330 | ========= 331 | Build: 1.15.2-31.1.36 - Sat Apr 04 19:36:37 GMT 2020 332 | tterrag: 333 | Remove SideOnly from WoodType methods 334 | 335 | ========= 336 | Build: 1.15.2-31.1.35 - Wed Apr 01 19:38:28 GMT 2020 337 | lex: 338 | Cleanup IForgeTagBuilder code style. 339 | 340 | ========= 341 | Build: 1.15.2-31.1.34 - Wed Apr 01 00:16:26 GMT 2020 342 | tterrag: 343 | Add support for optional tag values to Tag.Builder 344 | 345 | Add optional tag values to data gen test 346 | Fix data gen test not running by correcting gui_light value 347 | 348 | tterrag: 349 | Move global loot test data files out of generated folder 350 | 351 | ========= 352 | Build: 1.15.2-31.1.32 - Tue Mar 31 23:57:39 GMT 2020 353 | tterrag: 354 | Deprecate ModelBuilder#gui3d, add ModelBuilder#guiLight 355 | 356 | tterrag: 357 | Fix a few issues with BufferBuilder 358 | 359 | Fix vanilla bug that caused the byte order of the buffer from getNextBuffer to be incorrect 360 | Fix missing modification to nextElementBytes in putBulkData 361 | 362 | ========= 363 | Build: 1.15.2-31.1.30 - Fri Mar 27 23:26:45 GMT 2020 364 | naqaden: 365 | Add renderer to RenderNameplateEvent (#6562) 366 | 367 | ========= 368 | Build: 1.15.2-31.1.29 - Fri Mar 27 23:19:42 GMT 2020 369 | dags-: 370 | Defer writing the server.properties file until after mods have loaded to prevent config loss (#6545) 371 | 372 | ========= 373 | Build: 1.15.2-31.1.28 - Fri Mar 27 23:10:32 GMT 2020 374 | 36975818+hnOsmium0001: 375 | Fix ownership leak in ItemStackHandler (#6580) 376 | 377 | - Triggered by invoking ItemStackHandler#extractItem with `simulate=true` 378 | 379 | ========= 380 | Build: 1.15.2-31.1.27 - Sat Mar 21 00:06:03 GMT 2020 381 | cpw: 382 | Fix cycle happening in noteblock even though we're setting the new value as well.. 383 | 384 | Signed-off-by: cpw 385 | 386 | ========= 387 | Build: 1.15.2-31.1.26 - Fri Mar 20 21:35:06 GMT 2020 388 | cpw: 389 | Add a progress message for atlas textures. Fills a big time gap on bigger packs. 390 | 391 | Signed-off-by: cpw 392 | 393 | ========= 394 | Build: 1.15.2-31.1.25 - Tue Mar 17 09:41:49 GMT 2020 395 | bjfccb: 396 | Remove ArrowEntity patch, vanilla fixed MC-107941 397 | 398 | ========= 399 | Build: 1.15.2-31.1.24 - Sun Mar 15 23:28:36 GMT 2020 400 | lex: 401 | Fix Forge's tps and gen commands. 402 | 403 | ========= 404 | Build: 1.15.2-31.1.23 - Sun Mar 15 20:55:21 GMT 2020 405 | lex: 406 | Update gradle wrapper 407 | Update MCPConfig to version that bypasses javac compiler bugs 408 | Fix Global loot test compile errors. 409 | 410 | ========= 411 | Build: 1.15.2-31.1.22 - Sun Mar 15 07:39:18 GMT 2020 412 | tterrag: 413 | Fix loading text not rendering after mojang logo appears 414 | 415 | ========= 416 | Build: 1.15.2-31.1.21 - Sun Mar 15 07:28:02 GMT 2020 417 | tterrag: 418 | Fix loading GUI corrupting matrix state 419 | 420 | ========= 421 | Build: 1.15.2-31.1.20 - Sun Mar 15 03:29:03 GMT 2020 422 | cpw: 423 | Somewhat restore the loading screen overlay. It seems that once the mojang logo and progress bar 424 | start running, I can no longer write to the window, even though I am obviously trying to.. 425 | 426 | Signed-off-by: cpw 427 | 428 | ========= 429 | Build: 1.15.2-31.1.19 - Wed Mar 11 07:00:30 GMT 2020 430 | 17338378+Nightenom: 431 | Add projection matrix to RenderWorldLastEvent (#6536) 432 | 433 | ========= 434 | Build: 1.15.2-31.1.18 - Thu Feb 27 06:13:47 GMT 2020 435 | draco18s: 436 | Global Loot Functions (#6401) 437 | 438 | ========= 439 | Build: 1.15.2-31.1.17 - Wed Feb 26 03:45:24 GMT 2020 440 | Colby Prince: 441 | Updated ForgeDev MCP Mapping Version (#6532) 442 | 443 | ========= 444 | Build: 1.15.2-31.1.16 - Mon Feb 24 03:17:00 GMT 2020 445 | cpw: 446 | Fix up alarming security crisis with network handling that allowed for wrong code execution on the server, resulting in CRASHED SERVERS. AWFUL stuff. 447 | 448 | Also fixed a silly log message from the login handler. 449 | 450 | This change introduces a mechanism to direct certain packets to only process on one side or another. Invalid sidedness will result in the connection being terminated. 451 | 452 | Signed-off-by: cpw 453 | 454 | ========= 455 | Build: 1.15.2-31.1.15 - Sun Feb 23 17:32:42 GMT 2020 456 | julian.dunskus: 457 | Make TransformationHelper.slerp for quaternions public (#6528) 458 | 459 | ========= 460 | Build: 1.15.2-31.1.14 - Mon Feb 17 19:01:48 GMT 2020 461 | Colby Prince: 462 | Fixed Conduit and Beacon Activation on Vanilla Servers (#6438) 463 | 464 | ========= 465 | Build: 1.15.2-31.1.13 - Mon Feb 17 16:16:56 GMT 2020 466 | richard: 467 | Fix ITeleporter being ignored when teleporting from the end to the overworld (#6505) 468 | 469 | * Fix custom teleporters triggering end credits when returning from the end 470 | * Fix setdimension command ignoring position 471 | 472 | ========= 473 | Build: 1.15.2-31.1.12 - Fri Feb 14 21:43:40 GMT 2020 474 | williewillus: 475 | Fix missing call to itemstack TER (#6445) 476 | 477 | ========= 478 | Build: 1.15.2-31.1.11 - Fri Feb 14 21:33:36 GMT 2020 479 | williewillus: 480 | Fix missed modeldata passing in BlockModelRenderer (#6442) 481 | 482 | ========= 483 | Build: 1.15.2-31.1.10 - Fri Feb 14 20:34:50 GMT 2020 484 | treborx555: 485 | Fix NPE when players rejoin the server in a dimension that was deleted (#6511) 486 | 487 | ========= 488 | Build: 1.15.2-31.1.9 - Fri Feb 14 20:16:05 GMT 2020 489 | loic.frasse-mathon: 490 | Fix a wrong RenderState name MC-167447 (#6501) 491 | 492 | ========= 493 | Build: 1.15.2-31.1.8 - Fri Feb 14 20:09:19 GMT 2020 494 | malte0811: 495 | Fixed ChunkWatchEvent.(Un)Watch not firing correctly (#6453) 496 | 497 | ewewukek: 498 | Fix wrong arguments passed to ForgeHooksClient.renderSpecificFirstPersonHand() (#6496) 499 | 500 | 12281102+Aeltumn: 501 | Fix client not informing server when it attempts to interact with things, and is canceled by a client side handler. 502 | 503 | ========= 504 | Build: 1.15.2-31.1.5 - Fri Feb 14 20:02:26 GMT 2020 505 | joetarbit: 506 | Fixed Food not using effect suppliers, to better support delayed initialization and registry replacements. (#6411) 507 | 508 | Unnoen: 509 | Update version and support data on README. (#6429) 510 | 511 | ========= 512 | Build: 1.15.2-31.1.3 - Fri Feb 14 19:55:38 GMT 2020 513 | hawkeboyz2: 514 | Fixed displaying item names when only more sensitive version changes (#6402) 515 | 516 | ========= 517 | Build: 1.15.2-31.1.2 - Fri Feb 14 18:28:35 GMT 2020 518 | David Quintana: 519 | Fix gui_light for forge's item parent models. 520 | 521 | ========= 522 | Build: 1.15.2-31.1.1 - Thu Feb 06 22:53:49 GMT 2020 523 | richard: 524 | Allows custom blocks to define if they should use the fluid overlay instead of the flowing texture when in a fluid (#6493) 525 | 526 | ========= 527 | Build: 1.15.2-31.1.0 - Mon Feb 03 21:24:29 GMT 2020 528 | lex: 529 | Fix a small patch misalignment. 530 | 531 | ========= 532 | Build: 1.15.2-31.0.19 - Mon Feb 03 20:52:28 GMT 2020 533 | richard: 534 | Add FluidStack support to the Forge packet buffer. (#6353) (#6485) 535 | 536 | richard: 537 | Make Minecarts work with modded powered/activator rails. (#6486) 538 | 539 | Re-adds functionality for rails to have different maximum speeds. 540 | 541 | ========= 542 | Build: 1.15.2-31.0.17 - Mon Feb 03 20:21:20 GMT 2020 543 | ichttt: 544 | Revert game data to frozen on disconnect from a remote server or when terminating a local server. Closes #6487 (#6497) 545 | 546 | ========= 547 | Build: 1.15.2-31.0.16 - Sun Feb 02 22:11:19 GMT 2020 548 | David Quintana: 549 | Remove unintended changes. 550 | 551 | ========= 552 | Build: 1.15.2-31.0.15 - Sun Feb 02 22:03:15 GMT 2020 553 | David Quintana: 554 | Implement fluid overlay texture rendering for custom fluids. 555 | 556 | ========= 557 | Build: 1.15.2-31.0.14 - Thu Jan 30 06:12:15 GMT 2020 558 | Colby Prince: 559 | Fixed Attacks/Punches not Registering (#6481) 560 | 561 | Replaced incorrect magic number with constant 562 | 563 | ========= 564 | Build: 1.15.2-31.0.13 - Wed Jan 29 23:46:30 GMT 2020 565 | williewillus: 566 | Clean up a bunch of render events (#6444) 567 | 568 | * Delete RenderHandEvent as RenderSpecificHandEvent can do everything it does and more. Rename RenderSpecificHandEvent to RenderHandEvent as it's now the only hand rendering event. 569 | * Pass MatrixStack and IRenderTypeBuffer into the event whenever they are available. If they're available, that means we're in a batching environment and the modder should not be using the tessellator or other buffers on their own, or they risk "Already building" crashes. 570 | 571 | ========= 572 | Build: 1.15.2-31.0.12 - Wed Jan 29 21:55:18 GMT 2020 573 | Barteks2x: 574 | Fix NullPointerException on java 8u242 in dev environment. (#6473) 575 | 576 | Java 8u242 no longer re-initializes internal sys_paths and usr_paths fields in loadLibrary when they are null, so the value can't be set to null. 577 | 578 | ========= 579 | Build: 1.15.2-31.0.11 - Wed Jan 29 21:18:05 GMT 2020 580 | 12281102+Aeltumn: 581 | Fix RightClickBlock code differences between client and server implementation (#6451) 582 | 583 | williewillus: 584 | Fix incorrectly ported patch for restoreBlurMipmap (#6450) 585 | 586 | ========= 587 | Build: 1.15.2-31.0.9 - Wed Jan 29 21:11:24 GMT 2020 588 | 40495288+Yamahari: 589 | Defer material getting for ChestTileEntityRenderer into seperate function (#6465) 590 | 591 | ========= 592 | Build: 1.15.2-31.0.8 - Wed Jan 29 21:04:44 GMT 2020 593 | 37298044+Cadiboo: 594 | Small Forge config fixes (#6466) 595 | 596 | ========= 597 | Build: 1.15.2-31.0.7 - Wed Jan 29 20:50:44 GMT 2020 598 | lex: 599 | Fix PlayerChangedDimensionEvent using incorrect from dimension argument in ServerPlayerEntity.teleport. Closes #6457 600 | 601 | lex: 602 | Fix incorrect keybinding modifiers patch. Closes #6478 603 | 604 | lex: 605 | Fix ChunkDataEvent.Load not firing, it now fires in the aync thread. Be careful. Closes #6471 606 | 607 | ========= 608 | Build: 1.15.2-31.0.4 - Wed Jan 29 19:31:50 GMT 2020 609 | lex: 610 | Fix WakeupEvent patch misalign. Closes #6474 611 | 612 | lex: 613 | Fix default mod resources loosing it's sort order. 614 | 615 | ========= 616 | Build: 1.15.2-31.0.2 - Wed Jan 29 17:26:58 GMT 2020 617 | goto.minecraft: 618 | [1.15] Reimplemented the ITeleporter interface (#6404) 619 | 620 | ========= 621 | Build: 1.15.2-31.0.1 - Thu Jan 23 21:59:18 GMT 2020 622 | David Quintana: 623 | Hook "gui_light" value from the model into the IBakedModel implementations. 624 | Apply some of the suggestions from the 1.14 models PR. 625 | 626 | ========= 627 | Build: 1.15.2-31.0.0 - Wed Jan 22 21:47:51 GMT 2020 628 | lex: 629 | 1.15.2 Initial Update 630 | 631 | ========= 632 | Build: 1.15.1-30.0.51 - Wed Jan 22 21:10:07 GMT 2020 633 | ichttt: 634 | Cleanup fml packages removing old deprecated classes related to GUIs/Configs and fix HoverChecker (#6437) 635 | 636 | Fixed ModListWidget name to avoid confusion and collision. 637 | Delete CheckBox, as vanilla has it's own CheckBox now which looks much better 638 | Rename ModConfigEvent.ConfigReloading to ModConfigEvent.Reloading 639 | 640 | ========= 641 | Build: 1.15.1-30.0.50 - Wed Jan 22 20:38:22 GMT 2020 642 | 12281102+Aeltumn: 643 | Fixed parameter name issue in ISTER rename. #6461 (#6468) 644 | 645 | ========= 646 | Build: 1.15.1-30.0.49 - Wed Jan 22 19:56:16 GMT 2020 647 | lex: 648 | Fix default widget foreground color. 649 | 650 | ========= 651 | Build: 1.15.1-30.0.48 - Wed Jan 22 19:30:35 GMT 2020 652 | diesieben07: 653 | Use extended version of getLightValue in all places (#6433) 654 | 655 | Bward7864: 656 | Fixed RenderTypeLookup loosing mappings for registry replacements. (#6452) 657 | 658 | wynprice999: 659 | Fixed rounding issue with entity navigation fix (#6455) (#6456) 660 | 661 | 37298044+Cadiboo: 662 | Fix Widget Foreground Color not allowing pure black (#6460) 663 | 664 | 12281102+Aeltumn: 665 | Updated method names referencing ItemStackTileEntityRenderer (#6461) 666 | 667 | ========= 668 | Build: 1.15.1-30.0.43 - Wed Jan 22 19:22:15 GMT 2020 669 | scottehboeh: 670 | [1.15.x] Added entity nameplate rendering event hook (#6416) 671 | 672 | ========= 673 | Build: 1.15.1-30.0.42 - Tue Jan 21 03:47:02 GMT 2020 674 | tterrag: 675 | Remove emissive items hook, add small utility for bakedquad lighting 676 | 677 | ========= 678 | Build: 1.15.1-30.0.41 - Thu Jan 16 02:30:04 GMT 2020 679 | David Quintana: 680 | Fix breaking overlay weirdness. applyBakedNormals was not transforming the baked normals when applying them. Fixes #6432 681 | 682 | ========= 683 | Build: 1.15.1-30.0.40 - Thu Jan 16 00:30:10 GMT 2020 684 | 12281102+Aeltumn: 685 | [1.15] Add new InputEvent.ClickInputEvent, addresses #5802 (#6047) 686 | 687 | ========= 688 | Build: 1.15.1-30.0.39 - Mon Jan 13 22:21:01 GMT 2020 689 | David Quintana: 690 | Fix dark spots in fullbright quad rendering. 691 | Fix multi-layer model not declaring dependency on the particle texture. 692 | Fix mistake in 2c054fca which I didn't intend to push when I did. 693 | 694 | ========= 695 | Build: 1.15.1-30.0.38 - Mon Jan 13 18:39:06 GMT 2020 696 | David Quintana: 697 | Attempt to fix fullbright lighting. 698 | 699 | Fix lightmap value calculation. 700 | 701 | David Quintana: 702 | Fix multi-layer model loader to actually work in a sane way. No more "base" model involved, and now transforms and overrides work as expected. 703 | 704 | ========= 705 | Build: 1.15.1-30.0.36 - Thu Jan 09 22:28:02 GMT 2020 706 | tterrag: 707 | Add constructor for FishBucketItem that accepts suppliers 708 | 709 | ========= 710 | Build: 1.15.1-30.0.35 - Tue Jan 07 22:58:54 GMT 2020 711 | David Quintana: 712 | Fix QuadTransformer normal processing. 713 | 714 | Choonster.2010: 715 | Fix validation in RotationBuilder#angle (fixes #6323) (#6408) 716 | 717 | ========= 718 | Build: 1.15.1-30.0.33 - Tue Jan 07 22:20:46 GMT 2020 719 | richard: 720 | Add support for custom nether portal frame blocks (#6389) 721 | 722 | ========= 723 | Build: 1.15.1-30.0.32 - Tue Jan 07 21:22:49 GMT 2020 724 | RANKSHANK: 725 | InputEvent.RawMouseEvent fix (#6395) 726 | 727 | ========= 728 | Build: 1.15.1-30.0.31 - Tue Jan 07 21:15:19 GMT 2020 729 | Colby Prince: 730 | Fixed Big Mushrooms not generating (#6390) 731 | 732 | Removed vanilla negation from Forge logic that negated the vanilla logic it was replacing 733 | also ran datagen to update the dirt tag to reflect changes that were previously made in the datagen code 734 | 735 | ========= 736 | Build: 1.15.1-30.0.30 - Mon Jan 06 00:04:17 GMT 2020 737 | tterrag: 738 | Fix dyes tag containing dye items instead of tags 739 | 740 | Update generated data 741 | 742 | ========= 743 | Build: 1.15.1-30.0.29 - Sun Jan 05 19:36:08 GMT 2020 744 | Choonster.2010: 745 | [1.15.x] Remove unused parameter from ElementBuilder#rotation (fixes #6321) (#6407) 746 | 747 | ========= 748 | Build: 1.15.1-30.0.28 - Sun Jan 05 19:29:10 GMT 2020 749 | tterrag: 750 | Refactor BlockStateProvider to encapsulate a BlockModelProvider 751 | 752 | Make most protected methods of data generators public 753 | 754 | ========= 755 | Build: 1.15.1-30.0.27 - Sun Jan 05 18:39:00 GMT 2020 756 | tterrag: 757 | Fix crash when building BakedQuadBuilder 758 | 759 | Add javadocs and move sprite to constructor where possible 760 | 761 | ========= 762 | Build: 1.15.1-30.0.26 - Sun Jan 05 05:05:58 GMT 2020 763 | tterrag: 764 | Fix incorrect check for missing texture in DynamicBucketModel 765 | 766 | ========= 767 | Build: 1.15.1-30.0.25 - Sun Jan 05 04:38:48 GMT 2020 768 | tterrag: 769 | Remove custom vertex format from BakedQuad 770 | 771 | ========= 772 | Build: 1.15.1-30.0.24 - Sat Jan 04 16:19:24 GMT 2020 773 | David Quintana: 774 | Cherry-pick ca819e09 from the 1.14.x branch. Removes a patch from NativeImage which was invalid. 775 | 776 | David Quintana: 777 | A few more binary-breaking changes, before it's too late: 778 | - Move CompositeModel out of its package. 779 | - Move a few inner classes from the OBJ loader. 780 | - Rename the bucket model and fluid model classes to match the naming convention. 781 | - Remove BiomeEvent.* and WorldTypeEvent.InitBiomeGens as they are not currently implemented and they haven't been in the previous version either. 782 | 783 | ========= 784 | Build: 1.15.1-30.0.22 - Fri Jan 03 03:02:54 GMT 2020 785 | lex: 786 | Fix the particle renderer not setting GL state between each type. MC-168672 787 | 788 | ========= 789 | Build: 1.15.1-30.0.21 - Thu Jan 02 05:21:55 GMT 2020 790 | David Quintana: 791 | Fix CompositeModel not respecting "display" transforms. 792 | Remove leftovers from discarded feature. 793 | 794 | ========= 795 | Build: 1.15.1-30.0.20 - Wed Jan 01 16:41:59 GMT 2020 796 | David Quintana: 797 | Allow model jsons to override the material library used by OBJ models. 798 | Fix model loader test mod resources. 799 | Update licenses. 800 | 801 | ========= 802 | Build: 1.15.1-30.0.19 - Mon Dec 30 21:14:20 GMT 2019 803 | tterrag: 804 | Apply baked-in lightmap data to rendering 805 | 806 | - Fix ForgeHooksClient.fillNormal injecting data to lightmap 807 | - Fix OBJModel not filling lightmap data 808 | - Fix NewModelLoaderTest blockitem not linking with block 809 | 810 | ========= 811 | Build: 1.15.1-30.0.18 - Sun Dec 29 16:16:44 GMT 2019 812 | David Quintana: 813 | Fix LightUtil.unpack to set the 4th component to 1 when expanding an xyz position into a 4-component vector. 814 | Add TRSRTransformer test mod. 815 | Fix signature of the bindTileEntityRenderer method, to account for covariance. 816 | 817 | ========= 818 | Build: 1.15.1-30.0.17 - Sun Dec 29 01:16:20 GMT 2019 819 | David Quintana: 820 | More model/rendering fixes: 821 | - Breaking change: Change ClientRegistry.bindTileEntityRenderer to a factory, so mods don't have to manually specify the dispatcher. 822 | - Breaking change: Delete obsolete SimpleModelState (the class was duplicated by mistake, see SimpleModelTransform) and ICustomModelState (part of the old loader API). 823 | - Breaking change: Rename getTextureDependencies to getTextures, for consistency. 824 | - Reinstate the getRenderLayer method, fixed appropriately to return the new RenderType value. 825 | - Fix OBJ loader applying the model transform in the wrong reference frame. 826 | - Fix vanilla bug in TransformationMatrix#func_227986_a_ 827 | - Fix QuadTransformer logic. 828 | - Added new method to IModelConfiguration to retrieve the owner IUnbakedModel, needed in order to construct ItemOverrideLists when baking custom models. 829 | - Reintroduce multi-layer model through the new model loader system. 830 | 831 | ========= 832 | Build: 1.15.1-30.0.16 - Tue Dec 24 12:16:17 GMT 2019 833 | David Quintana: 834 | New batch of Model/rendering fixes: 835 | - PerspectiveMapWrapper did not pass IModelData through to the wrapped model. 836 | - CompositeModel did not store the returned textures from getTextureDependencies. 837 | - VertexFormat used COLOR instead of UV to detect UV presence. 838 | - QuadTransformer would crash due to index out of bounds. 839 | - Small cleanup of TransformationHelper 840 | 841 | ========= 842 | Build: 1.15.1-30.0.15 - Fri Dec 20 17:15:21 GMT 2019 843 | David Quintana: 844 | Fix obj models having all faces in the same mesh, breaking material assignments and visibility in the process. 845 | Reintroduce lost patch from the model loader, which would cause the custom values to be missing from generated models. 846 | 847 | ========= 848 | Build: 1.15.1-30.0.14 - Fri Dec 20 04:14:34 GMT 2019 849 | tterrag: 850 | Fix diffuse lighting being baked into models, fixes dark items 851 | 852 | ========= 853 | Build: 1.15.1-30.0.13 - Fri Dec 20 03:50:53 GMT 2019 854 | David Quintana: 855 | Fix item quads not using the existing vertex color when applying tint colors. 856 | 857 | ========= 858 | Build: 1.15.1-30.0.12 - Fri Dec 20 01:44:40 GMT 2019 859 | David Quintana: 860 | Fix bucket model. Some mask textures were not added to the repository, and the bucket override generation was broken. 861 | Fix OBJ loading crash due to a float value being parsed as int. 862 | Fixes 6377 863 | 864 | ========= 865 | Build: 1.15.1-30.0.11 - Thu Dec 19 05:56:10 GMT 2019 866 | bl4ckscor33: 867 | Fix game crashing when modded entities are present (#6364) 868 | 869 | ========= 870 | Build: 1.15.1-30.0.10 - Thu Dec 19 05:02:29 GMT 2019 871 | ichttt: 872 | Fix warning screen about missing minecraft registry entries (#6363) 873 | 874 | richard: 875 | Fix capabilities becoming inaccessible on returning from end (#6368) 876 | 877 | ========= 878 | Build: 1.15.1-30.0.8 - Thu Dec 19 04:39:52 GMT 2019 879 | ichttt: 880 | Some code cleanup for 1.15 (#6362) 881 | 882 | ========= 883 | Build: 1.15.1-30.0.7 - Wed Dec 18 02:11:01 GMT 2019 884 | tterrag: 885 | Fix MainMenuScreen patch 886 | 887 | tterrag: 888 | Mod list GUI detail pass 889 | 890 | - Make padding consistent on all elements 891 | - Properly horizontally center the "Search" text 892 | - Update and resize forge/mcp logos 893 | - Enable linear filtering on logo rendering by default 894 | - Can be disabled with the "logoBlur" mods.toml property 895 | 896 | ========= 897 | Build: 1.15.1-30.0.5 - Wed Dec 18 01:03:20 GMT 2019 898 | ichttt: 899 | Fix mod list screen (#6367) 900 | 901 | ========= 902 | Build: 1.15.1-30.0.4 - Tue Dec 17 23:47:00 GMT 2019 903 | David Quintana: 904 | Fix items in ground being too small, we were applying perspectives twice. 905 | Restore forge patch and fix a tiny mistake in it. 906 | 907 | tobias.hotz: 908 | Fix keybinds not loading/saving correctly 909 | 910 | ========= 911 | Build: 1.15.1-30.0.2 - Tue Dec 17 22:38:00 GMT 2019 912 | tterrag: 913 | Remove uvlock hook, fixes broken stair/fence/etc models 914 | 915 | tterrag: 916 | Update fallback spec version 917 | 918 | ========= 919 | Build: 1.15.1-30.0.0 - Tue Dec 17 19:42:28 GMT 2019 920 | tterrag: 921 | Update to 1.15.1 922 | 923 | ========= 924 | Build: 1.15-29.0.4 - Tue Dec 17 18:15:10 GMT 2019 925 | David Quintana: 926 | Finish converting the code from javax.vecmath to the vanilla vector classes. Forge is now vecmath-free! 927 | 928 | ========= 929 | Build: 1.15-29.0.3 - Tue Dec 17 09:50:53 GMT 2019 930 | tterrag: 931 | Remove deprecations 932 | 933 | ========= 934 | Build: 1.15-29.0.2 - Tue Dec 17 04:47:01 GMT 2019 935 | tterrag: 936 | Fix incorrect item lighting 937 | 938 | ========= 939 | Build: 1.15-29.0.1 - Tue Dec 17 04:22:29 GMT 2019 940 | tterrag: 941 | Revert fluid change to use Material, fixes server crash 942 | -------------------------------------------------------------------------------- /doc/architecture.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gashirar/KubeChaosCraftMod/1c63f653192c6590b7603be85627086022074c0c/doc/architecture.jpg -------------------------------------------------------------------------------- /doc/demo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gashirar/KubeChaosCraftMod/1c63f653192c6590b7603be85627086022074c0c/doc/demo.gif -------------------------------------------------------------------------------- /doc/image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gashirar/KubeChaosCraftMod/1c63f653192c6590b7603be85627086022074c0c/doc/image.png -------------------------------------------------------------------------------- /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 | org.gradle.daemon=false -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gashirar/KubeChaosCraftMod/1c63f653192c6590b7603be85627086022074c0c/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | zipStoreBase=GRADLE_USER_HOME 4 | zipStorePath=wrapper/dists 5 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-bin.zip 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 | -------------------------------------------------------------------------------- /release/kubechaoscraftmod-0.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gashirar/KubeChaosCraftMod/1c63f653192c6590b7603be85627086022074c0c/release/kubechaoscraftmod-0.1.jar -------------------------------------------------------------------------------- /src/main/java/io/github/gashirar/kubechaoscraft/KubeChaosCraftMod.java: -------------------------------------------------------------------------------- 1 | package io.github.gashirar.kubechaoscraft; 2 | 3 | import io.github.gashirar.kubechaoscraft.config.KubeChaosCraftConfig; 4 | import io.github.gashirar.kubechaoscraft.kubernetes.ExecutorSupplier; 5 | import net.minecraftforge.common.MinecraftForge; 6 | import net.minecraftforge.eventbus.api.SubscribeEvent; 7 | import net.minecraftforge.fml.ModLoadingContext; 8 | import net.minecraftforge.fml.common.Mod; 9 | import net.minecraftforge.fml.common.Mod.EventBusSubscriber.Bus; 10 | import net.minecraftforge.fml.config.ModConfig; 11 | import net.minecraftforge.fml.event.server.FMLServerStoppingEvent; 12 | import org.apache.logging.log4j.LogManager; 13 | import org.apache.logging.log4j.Logger; 14 | 15 | import java.util.concurrent.ExecutorService; 16 | import java.util.concurrent.Executors; 17 | 18 | @Mod("kubechaoscraftmod") 19 | @Mod.EventBusSubscriber(modid = KubeChaosCraftMod.MOD_ID, bus = Bus.MOD) 20 | public class KubeChaosCraftMod { 21 | 22 | public static final Logger LOGGER = LogManager.getLogger(); 23 | public static final String MOD_ID = "kubechaoscraftmod"; 24 | public static io.github.gashirar.kubechaoscraft.KubeChaosCraftMod instance; 25 | 26 | private static ExecutorService executor; 27 | public static ExecutorSupplier supplier; 28 | 29 | public KubeChaosCraftMod() { 30 | final ModLoadingContext modLoadingContext = ModLoadingContext.get(); 31 | 32 | modLoadingContext.registerConfig(ModConfig.Type.COMMON, KubeChaosCraftConfig.COMMON_SPEC); 33 | 34 | executor = Executors.newSingleThreadExecutor(); 35 | supplier = new ExecutorSupplier(executor); 36 | 37 | instance = this; 38 | MinecraftForge.EVENT_BUS.register(this); 39 | } 40 | 41 | @SubscribeEvent 42 | public static void onServerStopping(FMLServerStoppingEvent event) { 43 | KubeChaosCraftMod.LOGGER.info("FMLServerStoppingEvent fire."); 44 | executor.shutdownNow(); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/main/java/io/github/gashirar/kubechaoscraft/ModEventSubscriber.java: -------------------------------------------------------------------------------- 1 | package io.github.gashirar.kubechaoscraft; 2 | 3 | import io.github.gashirar.kubechaoscraft.config.KubeChaosCraftConfig; 4 | import net.minecraftforge.eventbus.api.SubscribeEvent; 5 | import net.minecraftforge.fml.common.Mod; 6 | import net.minecraftforge.fml.config.ModConfig; 7 | import org.apache.logging.log4j.LogManager; 8 | import org.apache.logging.log4j.Logger; 9 | 10 | 11 | @Mod.EventBusSubscriber(modid = KubeChaosCraftMod.MOD_ID, bus = Mod.EventBusSubscriber.Bus.MOD) 12 | public final class ModEventSubscriber { 13 | 14 | private static final Logger LOGGER = LogManager.getLogger(KubeChaosCraftMod.MOD_ID + " Mod Event Subscriber"); 15 | 16 | /** 17 | * This method will be called by Forge when a config changes. 18 | */ 19 | @SubscribeEvent 20 | public static void onModConfigEvent(final ModConfig.ModConfigEvent event) { 21 | final ModConfig config = event.getConfig(); 22 | 23 | if (config.getSpec() == KubeChaosCraftConfig.COMMON_SPEC) { 24 | KubeChaosCraftConfig.bakeCommon(config); 25 | } 26 | } 27 | } 28 | 29 | 30 | -------------------------------------------------------------------------------- /src/main/java/io/github/gashirar/kubechaoscraft/config/CommonConfig.java: -------------------------------------------------------------------------------- 1 | package io.github.gashirar.kubechaoscraft.config; 2 | 3 | import io.github.gashirar.kubechaoscraft.KubeChaosCraftMod; 4 | import net.minecraftforge.common.ForgeConfigSpec; 5 | 6 | import java.util.ArrayList; 7 | import java.util.List; 8 | 9 | public class CommonConfig { 10 | 11 | final ForgeConfigSpec.DoubleValue threshold; 12 | final ForgeConfigSpec.ConfigValue> targetNamespaces; 13 | 14 | CommonConfig(final ForgeConfigSpec.Builder builder) { 15 | builder.push("general"); 16 | targetNamespaces = builder 17 | .comment("Target Namespaces.") 18 | .translation(KubeChaosCraftMod.MOD_ID + ".config.targetNamespaces") 19 | .define("targetNamespaces", new ArrayList<>()); 20 | threshold = builder 21 | .comment("Delete Pod Probability.") 22 | .translation(KubeChaosCraftMod.MOD_ID + ".config.threshold") 23 | .defineInRange("threshold", 0, 0, 1.0); 24 | builder.pop(); 25 | } 26 | 27 | } -------------------------------------------------------------------------------- /src/main/java/io/github/gashirar/kubechaoscraft/config/KubeChaosCraftConfig.java: -------------------------------------------------------------------------------- 1 | package io.github.gashirar.kubechaoscraft.config; 2 | 3 | import io.github.gashirar.kubechaoscraft.KubeChaosCraftMod; 4 | import net.minecraftforge.common.ForgeConfigSpec; 5 | import net.minecraftforge.fml.common.Mod; 6 | import net.minecraftforge.fml.config.ModConfig; 7 | import org.apache.commons.lang3.tuple.Pair; 8 | 9 | import java.util.List; 10 | 11 | @Mod.EventBusSubscriber(modid = KubeChaosCraftMod.MOD_ID, bus = Mod.EventBusSubscriber.Bus.MOD) 12 | public class KubeChaosCraftConfig { 13 | public static final ForgeConfigSpec COMMON_SPEC; 14 | static final CommonConfig COMMON; 15 | 16 | static { 17 | { 18 | final Pair specPair = new ForgeConfigSpec.Builder().configure(CommonConfig::new); 19 | COMMON = specPair.getLeft(); 20 | COMMON_SPEC = specPair.getRight(); 21 | } 22 | } 23 | 24 | // Common 25 | public static List targetNamespaces; 26 | public static double threshold; 27 | 28 | public static void bakeCommon(final ModConfig config) { 29 | KubeChaosCraftConfig.targetNamespaces = KubeChaosCraftConfig.COMMON.targetNamespaces.get(); 30 | KubeChaosCraftConfig.threshold = KubeChaosCraftConfig.COMMON.threshold.get(); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/io/github/gashirar/kubechaoscraft/event/LivingKilledByPlayerEvent.java: -------------------------------------------------------------------------------- 1 | package io.github.gashirar.kubechaoscraft.event; 2 | 3 | import io.github.gashirar.kubechaoscraft.KubeChaosCraftMod; 4 | import io.github.gashirar.kubechaoscraft.config.KubeChaosCraftConfig; 5 | import net.minecraft.entity.Entity; 6 | import net.minecraft.entity.player.PlayerEntity; 7 | import net.minecraftforge.event.entity.living.LivingDeathEvent; 8 | import net.minecraftforge.eventbus.api.SubscribeEvent; 9 | import net.minecraftforge.fml.common.Mod; 10 | 11 | @Mod.EventBusSubscriber(modid = KubeChaosCraftMod.MOD_ID, bus = Mod.EventBusSubscriber.Bus.FORGE) 12 | public class LivingKilledByPlayerEvent { 13 | @SubscribeEvent 14 | public static void LivingKilledByPlayerEvent(LivingDeathEvent event) { 15 | Entity killer = event.getSource().getTrueSource(); 16 | if (killer != null && killer instanceof PlayerEntity) { 17 | if (new java.util.Random().nextDouble() < KubeChaosCraftConfig.threshold) { 18 | KubeChaosCraftMod.supplier.failureInjection(); 19 | } 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /src/main/java/io/github/gashirar/kubechaoscraft/kubernetes/ExecutorSupplier.java: -------------------------------------------------------------------------------- 1 | package io.github.gashirar.kubechaoscraft.kubernetes; 2 | 3 | import io.github.gashirar.kubechaoscraft.KubeChaosCraftMod; 4 | import io.github.gashirar.kubechaoscraft.config.KubeChaosCraftConfig; 5 | import io.kubernetes.client.openapi.ApiClient; 6 | import io.kubernetes.client.openapi.Configuration; 7 | import io.kubernetes.client.openapi.apis.CoreV1Api; 8 | import io.kubernetes.client.openapi.models.V1DeleteOptions; 9 | import io.kubernetes.client.openapi.models.V1Pod; 10 | import io.kubernetes.client.openapi.models.V1PodList; 11 | import io.kubernetes.client.util.Config; 12 | 13 | import java.util.ArrayList; 14 | import java.util.Collections; 15 | import java.util.List; 16 | import java.util.concurrent.Executor; 17 | 18 | public class ExecutorSupplier { 19 | private final Executor executor; 20 | 21 | public ExecutorSupplier(Executor executor) { 22 | this.executor = executor; 23 | } 24 | 25 | private boolean validate(String namespace) { 26 | return KubeChaosCraftConfig.targetNamespaces.contains(namespace); 27 | } 28 | 29 | public void failureInjection() { 30 | executor.execute(() -> { 31 | try { 32 | ApiClient client = Config.defaultClient(); 33 | Configuration.setDefaultApiClient(client); 34 | 35 | CoreV1Api api = new CoreV1Api(); 36 | V1PodList list = api.listPodForAllNamespaces( 37 | null, 38 | null, 39 | null, 40 | null, 41 | null, null, 42 | null, 43 | null, 44 | null); 45 | List shuffled = new ArrayList<>(list.getItems()); 46 | Collections.shuffle(shuffled); 47 | for (V1Pod item : shuffled) { 48 | if (validate((item.getMetadata().getNamespace()))) { 49 | KubeChaosCraftMod.LOGGER.info("Delete Target -> Namespace : " + item.getMetadata().getNamespace() + ", Pod : " + item.getMetadata().getName()); 50 | api.deleteNamespacedPod( 51 | item.getMetadata().getName(), 52 | item.getMetadata().getNamespace(), 53 | null, 54 | null, 55 | null, 56 | null, 57 | null, 58 | new V1DeleteOptions()); 59 | break; 60 | } 61 | } 62 | } catch (Exception e) { 63 | // TODO improve this. 64 | KubeChaosCraftMod.LOGGER.error(e); 65 | } 66 | }); 67 | } 68 | } -------------------------------------------------------------------------------- /src/main/resources/META-INF/mods.toml: -------------------------------------------------------------------------------- 1 | modLoader="javafml" #mandatory 2 | 3 | loaderVersion="[31,)" #mandatory This is typically bumped every Minecraft version by Forge. See our download page for lists of versions. 4 | 5 | issueTrackerURL="https://github.com/gashirar/KubeChaosCraftMod/issues" #optional 6 | 7 | [[mods]] #mandatory 8 | 9 | modId="kubechaoscraftmod" #mandatory 10 | 11 | version="${file.jarVersion}" #mandatory 12 | 13 | displayName="KubeChaosCraft Mod" #mandatory 14 | 15 | # A URL to query for updates for this mod. See the JSON update specification 16 | # updateJSONURL="http://myurl.me/" #optional 17 | 18 | displayURL="https://github.com/gashirar/KubeChaosCraftMod/" #optional 19 | 20 | # logoFile="kubechaoscraft.png" #optional 21 | 22 | # credits="Thanks for this example mod goes to Java" #optional 23 | 24 | authors="Gashirar" 25 | 26 | description=''' 27 | Kubernetes + Chaos Engineering + Mineecraft = KubeChaosCraft! 28 | ''' 29 | 30 | # A dependency - use the . to indicate dependency for a specific modid. Dependencies are optional. 31 | [[dependencies.kubechaoscraftmod]] #optional 32 | # the modid of the dependency 33 | modId="forge" #mandatory 34 | # Does this dependency have to exist - if not, ordering below must be specified 35 | mandatory=true #mandatory 36 | # The version range of the dependency 37 | versionRange="[31,)" #mandatory 38 | # An ordering relationship for the dependency - BEFORE or AFTER required if the relationship is not mandatory 39 | ordering="NONE" 40 | # Side this dependency is applied on - BOTH, CLIENT or SERVER 41 | side="BOTH" 42 | # Here's another dependency 43 | [[dependencies.kubechaoscraftmod]] 44 | modId="minecraft" 45 | mandatory=true 46 | versionRange="[1.15.2]" 47 | ordering="NONE" 48 | side="BOTH" 49 | -------------------------------------------------------------------------------- /src/main/resources/pack.mcmeta: -------------------------------------------------------------------------------- 1 | { 2 | "pack": { 3 | "description": "kubechaoscraftmod resources", 4 | "pack_format": 5, 5 | "_comment": "A pack_format of 5 requires json lang files and some texture changes from 1.15. Note: we require v5 pack meta for all mods." 6 | } 7 | } 8 | --------------------------------------------------------------------------------