Initial commit

This commit is contained in:
spdis 2025-08-28 14:34:45 +08:00
commit a4600b2219
90 changed files with 2592 additions and 0 deletions

5
.gitattributes vendored Normal file
View File

@ -0,0 +1,5 @@
# Disable autocrlf on generated files, they always generate with LF
# Add any extra files or paths here to make git stop saying they
# are changed when only line endings change.
src/generated/**/.cache/cache text eol=lf
src/generated/**/*.json text eol=lf

25
.gitignore vendored Normal file
View File

@ -0,0 +1,25 @@
# eclipse
bin
*.launch
.settings
.metadata
.classpath
.project
# idea
out
*.ipr
*.iws
*.iml
.idea
# gradle
build
.gradle
# other
eclipse
run
# Files from Forge MDK
forge*changelog.txt

65
CREDITS.txt Normal file
View File

@ -0,0 +1,65 @@
Minecraft Forge: Credits/Thank You
Forge is a set of tools and modifications to the Minecraft base game code to assist
mod developers in creating new and exciting content. It has been in development for
several years now, but I would like to take this time thank a few people who have
helped it along its way.
First, the people who originally created the Forge projects way back in Minecraft
alpha. Eloraam of RedPower, and SpaceToad of Buildcraft, without their acceptiance
of me taking over the project, who knows what Minecraft modding would be today.
Secondly, someone who has worked with me, and developed some of the core features
that allow modding to be as functional, and as simple as it is, cpw. For developing
FML, which stabilized the client and server modding ecosystem. As well as the base
loading system that allows us to modify Minecraft's code as elegently as possible.
Mezz, who has stepped up as the issue and pull request manager. Helping to keep me
sane as well as guiding the community into creating better additions to Forge.
Searge, Bspks, Fesh0r, ProfMobious, and all the rest over on the MCP team {of which
I am a part}. For creating some of the core tools needed to make Minecraft modding
both possible, and as stable as can be.
On that note, here is some specific information of the MCP data we use:
* Minecraft Coder Pack (MCP) *
Forge Mod Loader and Minecraft Forge have permission to distribute and automatically
download components of MCP and distribute MCP data files. This permission is not
transitive and others wishing to redistribute the Minecraft Forge source independently
should seek permission of MCP or remove the MCP data files and request their users
to download MCP separately.
And lastly, the countless community members who have spent time submitting bug reports,
pull requests, and just helping out the community in general. Thank you.
--LexManos
=========================================================================
This is Forge Mod Loader.
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
This minecraft mod is a clean open source implementation of a mod loader for minecraft servers
and minecraft clients.
The code is authored by cpw.
It began by partially implementing an API defined by the client side ModLoader, authored by Risugami.
https://www.minecraftforum.net/topic/75440-
This support has been dropped as of Minecraft release 1.7, as Risugami no longer maintains ModLoader.
It also contains suggestions and hints and generous helpings of code from LexManos, author of MinecraftForge.
https://minecraftforge.net/
Additionally, it contains an implementation of topological sort based on that
published at http://keithschwarz.com/interesting/code/?dir=topological-sort
It also contains code from the Maven project for performing versioned dependency
resolution. http://maven.apache.org/
It also contains a partial repackaging of the javaxdelta library from http://sourceforge.net/projects/javaxdelta/
with credit to it's authors.
Forge Mod Loader downloads components from the Minecraft Coder Pack
(http://mcp.ocean-labs.de/index.php/Main_Page) with kind permission from the MCP team.

523
LICENSE.txt Normal file
View File

@ -0,0 +1,523 @@
Unless noted below, Minecraft Forge, Forge Mod Loader, and all
parts herein are licensed under the terms of the LGPL 2.1 found
here http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt and
copied below.
Homepage: http://minecraftforge.net/
https://github.com/MinecraftForge/MinecraftForge
A note on authorship:
All source artifacts are property of their original author, with
the exclusion of the contents of the patches directory and others
copied from it from time to time. Authorship of the contents of
the patches directory is retained by the Minecraft Forge project.
This is because the patches are partially machine generated
artifacts, and are changed heavily due to the way forge works.
Individual attribution within them is impossible.
Consent:
All contributions to Forge must consent to the release of any
patch content to the Forge project.
A note on infectivity:
The LGPL is chosen specifically so that projects may depend on Forge
features without being infected with its license. That is the
purpose of the LGPL. Mods and others using this code via ordinary
Java mechanics for referencing libraries are specifically not bound
by Forge's license for the Mod code.
=== MCP Data ===
This software includes data from the Minecraft Coder Pack (MCP), with kind permission
from them. The license to MCP data is not transitive - distribution of this data by
third parties requires independent licensing from the MCP team. This data is not
redistributable without permission from the MCP team.
=== Sharing ===
I grant permission for some parts of FML to be redistributed outside the terms of the LGPL, for the benefit of
the minecraft modding community. All contributions to these parts should be licensed under the same additional grant.
-- Runtime patcher --
License is granted to redistribute the runtime patcher code (src/main/java/net/minecraftforge/fml/common/patcher
and subdirectories) under any alternative open source license as classified by the OSI (http://opensource.org/licenses)
-- ASM transformers --
License is granted to redistribute the ASM transformer code (src/main/java/net/minecraftforge/common/asm/ and subdirectories)
under any alternative open source license as classified by the OSI (http://opensource.org/licenses)
=========================================================================
This software includes portions from the Apache Maven project at
http://maven.apache.org/ specifically the ComparableVersion.java code. It is
included based on guidelines at
http://www.softwarefreedom.org/resources/2007/gpl-non-gpl-collaboration.html
with notices intact. The only change is a non-functional change of package name.
This software contains a partial repackaging of javaxdelta, a BSD licensed program for generating
binary differences and applying them, sourced from the subversion at http://sourceforge.net/projects/javaxdelta/
authored by genman, heikok, pivot.
The only changes are to replace some Trove collection types with standard Java collections, and repackaged.
This software includes the Monocraft font from https://github.com/IdreesInc/Monocraft/ for use in the early loading
display.
=========================================================================
GNU LESSER GENERAL PUBLIC LICENSE
Version 2.1, February 1999
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
[This is the first released version of the Lesser GPL. It also counts
as the successor of the GNU Library Public License, version 2, hence
the version number 2.1.]
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
Licenses are intended to guarantee your freedom to share and change
free software--to make sure the software is free for all its users.
This license, the Lesser General Public License, applies to some
specially designated software packages--typically libraries--of the
Free Software Foundation and other authors who decide to use it. You
can use it too, but we suggest you first think carefully about whether
this license or the ordinary General Public License is the better
strategy to use in any particular case, based on the explanations below.
When we speak of free software, we are referring to freedom of use,
not price. Our General Public Licenses are designed to make sure that
you have the freedom to distribute copies of free software (and charge
for this service if you wish); that you receive source code or can get
it if you want it; that you can change the software and use pieces of
it in new free programs; and that you are informed that you can do
these things.
To protect your rights, we need to make restrictions that forbid
distributors to deny you these rights or to ask you to surrender these
rights. These restrictions translate to certain responsibilities for
you if you distribute copies of the library or if you modify it.
For example, if you distribute copies of the library, whether gratis
or for a fee, you must give the recipients all the rights that we gave
you. You must make sure that they, too, receive or can get the source
code. If you link other code with the library, you must provide
complete object files to the recipients, so that they can relink them
with the library after making changes to the library and recompiling
it. And you must show them these terms so they know their rights.
We protect your rights with a two-step method: (1) we copyright the
library, and (2) we offer you this license, which gives you legal
permission to copy, distribute and/or modify the library.
To protect each distributor, we want to make it very clear that
there is no warranty for the free library. Also, if the library is
modified by someone else and passed on, the recipients should know
that what they have is not the original version, so that the original
author's reputation will not be affected by problems that might be
introduced by others.
Finally, software patents pose a constant threat to the existence of
any free program. We wish to make sure that a company cannot
effectively restrict the users of a free program by obtaining a
restrictive license from a patent holder. Therefore, we insist that
any patent license obtained for a version of the library must be
consistent with the full freedom of use specified in this license.
Most GNU software, including some libraries, is covered by the
ordinary GNU General Public License. This license, the GNU Lesser
General Public License, applies to certain designated libraries, and
is quite different from the ordinary General Public License. We use
this license for certain libraries in order to permit linking those
libraries into non-free programs.
When a program is linked with a library, whether statically or using
a shared library, the combination of the two is legally speaking a
combined work, a derivative of the original library. The ordinary
General Public License therefore permits such linking only if the
entire combination fits its criteria of freedom. The Lesser General
Public License permits more lax criteria for linking other code with
the library.
We call this license the "Lesser" General Public License because it
does Less to protect the user's freedom than the ordinary General
Public License. It also provides other free software developers Less
of an advantage over competing non-free programs. These disadvantages
are the reason we use the ordinary General Public License for many
libraries. However, the Lesser license provides advantages in certain
special circumstances.
For example, on rare occasions, there may be a special need to
encourage the widest possible use of a certain library, so that it becomes
a de-facto standard. To achieve this, non-free programs must be
allowed to use the library. A more frequent case is that a free
library does the same job as widely used non-free libraries. In this
case, there is little to gain by limiting the free library to free
software only, so we use the Lesser General Public License.
In other cases, permission to use a particular library in non-free
programs enables a greater number of people to use a large body of
free software. For example, permission to use the GNU C Library in
non-free programs enables many more people to use the whole GNU
operating system, as well as its variant, the GNU/Linux operating
system.
Although the Lesser General Public License is Less protective of the
users' freedom, it does ensure that the user of a program that is
linked with the Library has the freedom and the wherewithal to run
that program using a modified version of the Library.
The precise terms and conditions for copying, distribution and
modification follow. Pay close attention to the difference between a
"work based on the library" and a "work that uses the library". The
former contains code derived from the library, whereas the latter must
be combined with the library in order to run.
GNU LESSER GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any software library or other
program which contains a notice placed by the copyright holder or
other authorized party saying it may be distributed under the terms of
this Lesser General Public License (also called "this License").
Each licensee is addressed as "you".
A "library" means a collection of software functions and/or data
prepared so as to be conveniently linked with application programs
(which use some of those functions and data) to form executables.
The "Library", below, refers to any such software library or work
which has been distributed under these terms. A "work based on the
Library" means either the Library or any derivative work under
copyright law: that is to say, a work containing the Library or a
portion of it, either verbatim or with modifications and/or translated
straightforwardly into another language. (Hereinafter, translation is
included without limitation in the term "modification".)
"Source code" for a work means the preferred form of the work for
making modifications to it. For a library, complete source code means
all the source code for all modules it contains, plus any associated
interface definition files, plus the scripts used to control compilation
and installation of the library.
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running a program using the Library is not restricted, and output from
such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does.
1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an
appropriate copyright notice and disclaimer of warranty; keep intact
all the notices that refer to this License and to the absence of any
warranty; and distribute a copy of this License along with the
Library.
You may charge a fee for the physical act of transferring a copy,
and you may at your option offer warranty protection in exchange for a
fee.
2. You may modify your copy or copies of the Library or any portion
of it, thus forming a work based on the Library, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) The modified work must itself be a software library.
b) You must cause the files modified to carry prominent notices
stating that you changed the files and the date of any change.
c) You must cause the whole of the work to be licensed at no
charge to all third parties under the terms of this License.
d) If a facility in the modified Library refers to a function or a
table of data to be supplied by an application program that uses
the facility, other than as an argument passed when the facility
is invoked, then you must make a good faith effort to ensure that,
in the event an application does not supply such function or
table, the facility still operates, and performs whatever part of
its purpose remains meaningful.
(For example, a function in a library to compute square roots has
a purpose that is entirely well-defined independent of the
application. Therefore, Subsection 2d requires that any
application-supplied function or table used by this function must
be optional: if the application does not supply it, the square
root function must still compute square roots.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Library,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Library, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote
it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Library.
In addition, mere aggregation of another work not based on the Library
with the Library (or with a work based on the Library) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may opt to apply the terms of the ordinary GNU General Public
License instead of this License to a given copy of the Library. To do
this, you must alter all the notices that refer to this License, so
that they refer to the ordinary GNU General Public License, version 2,
instead of to this License. (If a newer version than version 2 of the
ordinary GNU General Public License has appeared, then you can specify
that version instead if you wish.) Do not make any other change in
these notices.
Once this change is made in a given copy, it is irreversible for
that copy, so the ordinary GNU General Public License applies to all
subsequent copies and derivative works made from that copy.
This option is useful when you wish to copy part of the code of
the Library into a program that is not a library.
4. You may copy and distribute the Library (or a portion or
derivative of it, under Section 2) in object code or executable form
under the terms of Sections 1 and 2 above provided that you accompany
it with the complete corresponding machine-readable source code, which
must be distributed under the terms of Sections 1 and 2 above on a
medium customarily used for software interchange.
If distribution of object code is made by offering access to copy
from a designated place, then offering equivalent access to copy the
source code from the same place satisfies the requirement to
distribute the source code, even though third parties are not
compelled to copy the source along with the object code.
5. A program that contains no derivative of any portion of the
Library, but is designed to work with the Library by being compiled or
linked with it, is called a "work that uses the Library". Such a
work, in isolation, is not a derivative work of the Library, and
therefore falls outside the scope of this License.
However, linking a "work that uses the Library" with the Library
creates an executable that is a derivative of the Library (because it
contains portions of the Library), rather than a "work that uses the
library". The executable is therefore covered by this License.
Section 6 states terms for distribution of such executables.
When a "work that uses the Library" uses material from a header file
that is part of the Library, the object code for the work may be a
derivative work of the Library even though the source code is not.
Whether this is true is especially significant if the work can be
linked without the Library, or if the work is itself a library. The
threshold for this to be true is not precisely defined by law.
If such an object file uses only numerical parameters, data
structure layouts and accessors, and small macros and small inline
functions (ten lines or less in length), then the use of the object
file is unrestricted, regardless of whether it is legally a derivative
work. (Executables containing this object code plus portions of the
Library will still fall under Section 6.)
Otherwise, if the work is a derivative of the Library, you may
distribute the object code for the work under the terms of Section 6.
Any executables containing that work also fall under Section 6,
whether or not they are linked directly with the Library itself.
6. As an exception to the Sections above, you may also combine or
link a "work that uses the Library" with the Library to produce a
work containing portions of the Library, and distribute that work
under terms of your choice, provided that the terms permit
modification of the work for the customer's own use and reverse
engineering for debugging such modifications.
You must give prominent notice with each copy of the work that the
Library is used in it and that the Library and its use are covered by
this License. You must supply a copy of this License. If the work
during execution displays copyright notices, you must include the
copyright notice for the Library among them, as well as a reference
directing the user to the copy of this License. Also, you must do one
of these things:
a) Accompany the work with the complete corresponding
machine-readable source code for the Library including whatever
changes were used in the work (which must be distributed under
Sections 1 and 2 above); and, if the work is an executable linked
with the Library, with the complete machine-readable "work that
uses the Library", as object code and/or source code, so that the
user can modify the Library and then relink to produce a modified
executable containing the modified Library. (It is understood
that the user who changes the contents of definitions files in the
Library will not necessarily be able to recompile the application
to use the modified definitions.)
b) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (1) uses at run time a
copy of the library already present on the user's computer system,
rather than copying library functions into the executable, and (2)
will operate properly with a modified version of the library, if
the user installs one, as long as the modified version is
interface-compatible with the version that the work was made with.
c) Accompany the work with a written offer, valid for at
least three years, to give the same user the materials
specified in Subsection 6a, above, for a charge no more
than the cost of performing this distribution.
d) If distribution of the work is made by offering access to copy
from a designated place, offer equivalent access to copy the above
specified materials from the same place.
e) Verify that the user has already received a copy of these
materials or that you have already sent this user a copy.
For an executable, the required form of the "work that uses the
Library" must include any data and utility programs needed for
reproducing the executable from it. However, as a special exception,
the materials to be distributed need not include anything that is
normally distributed (in either source or binary form) with the major
components (compiler, kernel, and so on) of the operating system on
which the executable runs, unless that component itself accompanies
the executable.
It may happen that this requirement contradicts the license
restrictions of other proprietary libraries that do not normally
accompany the operating system. Such a contradiction means you cannot
use both them and the Library together in an executable that you
distribute.
7. You may place library facilities that are a work based on the
Library side-by-side in a single library together with other library
facilities not covered by this License, and distribute such a combined
library, provided that the separate distribution of the work based on
the Library and of the other library facilities is otherwise
permitted, and provided that you do these two things:
a) Accompany the combined library with a copy of the same work
based on the Library, uncombined with any other library
facilities. This must be distributed under the terms of the
Sections above.
b) Give prominent notice with the combined library of the fact
that part of it is a work based on the Library, and explaining
where to find the accompanying uncombined form of the same work.
8. You may not copy, modify, sublicense, link with, or distribute
the Library except as expressly provided under this License. Any
attempt otherwise to copy, modify, sublicense, link with, or
distribute the Library is void, and will automatically terminate your
rights under this License. However, parties who have received copies,
or rights, from you under this License will not have their licenses
terminated so long as such parties remain in full compliance.
9. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Library or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Library (or any work based on the
Library), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Library or works based on it.
10. Each time you redistribute the Library (or any work based on the
Library), the recipient automatically receives a license from the
original licensor to copy, distribute, link with or modify the Library
subject to these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties with
this License.
11. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Library at all. For example, if a patent
license would not permit royalty-free redistribution of the Library by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Library.
If any portion of this section is held invalid or unenforceable under any
particular circumstance, the balance of the section is intended to apply,
and the section as a whole is intended to apply in other circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
12. If the distribution and/or use of the Library is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Library under this License may add
an explicit geographical distribution limitation excluding those countries,
so that distribution is permitted only in or among countries not thus
excluded. In such case, this License incorporates the limitation as if
written in the body of this License.
13. The Free Software Foundation may publish revised and/or new
versions of the Lesser General Public License from time to time.
Such new versions will be similar in spirit to the present version,
but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Library
specifies a version number of this License which applies to it and
"any later version", you have the option of following the terms and
conditions either of that version or of any later version published by
the Free Software Foundation. If the Library does not specify a
license version number, you may choose any version ever published by
the Free Software Foundation.
14. If you wish to incorporate parts of the Library into other free
programs whose distribution conditions are incompatible with these,
write to the author to ask for permission. For software which is
copyrighted by the Free Software Foundation, write to the Free
Software Foundation; we sometimes make exceptions for this. Our
decision will be guided by the two goals of preserving the free status
of all derivatives of our free software and of promoting the sharing
and reuse of software generally.
NO WARRANTY
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.
END OF TERMS AND CONDITIONS

46
README.txt Normal file
View File

@ -0,0 +1,46 @@
Source installation information for modders
-------------------------------------------
This code follows the Minecraft Forge installation methodology. It will apply
some small patches to the vanilla MCP source code, giving you and it access
to some of the data and functions you need to build a successful mod.
Note also that the patches are built against "un-renamed" MCP source code (aka
SRG Names) - this means that you will not be able to read them directly against
normal code.
Setup Process:
==============================
Step 1: Open your command-line and browse to the folder where you extracted the zip file.
Step 2: You're left with a choice.
If you prefer to use Eclipse:
1. Run the following command: `./gradlew genEclipseRuns`
2. Open Eclipse, Import > Existing Gradle Project > Select Folder
or run `gradlew eclipse` to generate the project.
If you prefer to use IntelliJ:
1. Open IDEA, and import project.
2. Select your build.gradle file and have it import.
3. Run the following command: `./gradlew genIntellijRuns`
4. Refresh the Gradle Project in IDEA if required.
If at any point you are missing libraries in your IDE, or you've run into problems you can
run `gradlew --refresh-dependencies` to refresh the local cache. `gradlew clean` to reset everything
(this does not affect your code) and then start the process again.
Mapping Names:
=============================
By default, the MDK is configured to use the official mapping names from Mojang for methods and fields
in the Minecraft codebase. These names are covered by a specific license. All modders should be aware of this
license, if you do not agree with it you can change your mapping names to other crowdsourced names in your
build.gradle. For the latest license text, refer to the mapping file itself, or the reference copy here:
https://github.com/MinecraftForge/MCPConfig/blob/master/Mojang.md
Additional Resources:
=========================
Community Documentation: https://docs.minecraftforge.net/en/latest/gettingstarted/
LexManos' Install Video: https://youtu.be/8VEdtQLuLO0
Forge Forums: https://forums.minecraftforge.net/
Forge Discord: https://discord.minecraftforge.net/

BIN
black_sugar.png Normal file

Binary file not shown.

227
build.gradle Normal file
View File

@ -0,0 +1,227 @@
plugins {
id 'eclipse'
id 'idea'
id 'maven-publish'
id 'net.minecraftforge.gradle' version '[6.0.36,6.2)'
}
version = mod_version
group = mod_group_id
base {
archivesName = mod_id
}
// Mojang ships Java 21 to end users in 1.20.5+, so your mod should target Java 21.
java.toolchain.languageVersion = JavaLanguageVersion.of(21)
println "Java: ${System.getProperty 'java.version'}, JVM: ${System.getProperty 'java.vm.version'} (${System.getProperty 'java.vendor'}), Arch: ${System.getProperty 'os.arch'}"
minecraft {
// The mappings can be changed at any time and must be in the following format.
// Channel: Version:
// official MCVersion Official field/method names from Mojang mapping files
// parchment YYYY.MM.DD-MCVersion Open community-sourced parameter names and javadocs layered on top of official
//
// Parchment is an unofficial project maintained by ParchmentMC, separate from MinecraftForge
// Additional setup is needed to use their mappings: https://parchmentmc.org/docs/getting-started
//
// Simply re-run your setup task after changing the mappings to update your workspace.
mappings channel: mapping_channel, version: mapping_version
// Forge 1.20.6 and newer use official mappings at runtime, so we shouldn't reobf from official to SRG
reobf = false
// When true, this property will have all Eclipse/IntelliJ IDEA run configurations run the "prepareX" task for the given run configuration before launching the game.
// In most cases, it is not necessary to enable.
// enableEclipsePrepareRuns = true
// enableIdeaPrepareRuns = true
// This property allows configuring Gradle's ProcessResources task(s) to run on IDE output locations before launching the game.
// It is REQUIRED to be set to true for this template to function.
// See https://docs.gradle.org/current/dsl/org.gradle.language.jvm.tasks.ProcessResources.html
copyIdeResources = true
// When true, this property will add the folder name of all declared run configurations to generated IDE run configurations.
// The folder name can be set on a run configuration using the "folderName" property.
// By default, the folder name of a run configuration is the name of the Gradle project containing it.
// generateRunFolders = true
// This property enables access transformers for use in development, applied to the Minecraft artifact.
// The access transformer file can be anywhere in the project.
// However, it must be at "META-INF/accesstransformer.cfg" in the final mod jar to be loaded by Forge.
// This default location is a best practice to automatically put the file in the right place in the final jar.
// See https://docs.minecraftforge.net/en/latest/advanced/accesstransformers/ for more information.
// accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')
// Default run configurations.
// These can be tweaked, removed, or duplicated as needed.
runs {
// applies to all the run configs below
configureEach {
workingDirectory project.file('run')
// Optional additional logging. The markers can be added/remove as needed, separated by commas.
// "SCAN": For mods scan.
// "REGISTRIES": For firing of registry events.
// "REGISTRYDUMP": For getting the contents of all registries.
// property 'forge.logging.markers', 'REGISTRIES'
property 'forge.logging.console.level', 'debug'
// arg "-mixin.config=${mod_id}.mixins.json"
}
client {
// Comma-separated list of namespaces to load gametests from. Empty = all namespaces.
property 'forge.enabledGameTestNamespaces', mod_id
}
server {
property 'forge.enabledGameTestNamespaces', mod_id
args '--nogui'
}
// This run config launches GameTestServer and runs all registered gametests, then exits.
// By default, the server will crash when no gametests are provided.
// The gametest system is also enabled by default for other run configs under the /test command.
gameTestServer {
property 'forge.enabledGameTestNamespaces', mod_id
}
data {
// example of overriding the workingDirectory set in configureEach above
workingDirectory project.file('run-data')
// Specify the modid for data generation, where to output the resulting resource, and where to look for existing resources.
args '--mod', mod_id, '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/')
}
}
}
// Include resources generated by data generators.
sourceSets.main.resources { srcDir 'src/generated/resources' }
repositories {
// Put repositories for dependencies here
mavenCentral()
maven {
name = 'Forge'
url = 'https://maven.minecraftforge.net'
}
maven {
name = 'Minecraft libraries'
url = 'https://libraries.minecraft.net'
}
exclusiveContent {
forRepository {
maven {
name = 'Sponge'
url = 'https://repo.spongepowered.org/repository/maven-public'
}
}
filter {
includeGroupAndSubgroups('org.spongepowered')
}
}
// If you have mod jar dependencies in ./libs, you can declare them as a repository like so.
// See https://docs.gradle.org/current/userguide/declaring_repositories.html#sub:flat_dir_resolver
// flatDir {
// dir 'libs'
// }
}
dependencies {
// Specify the version of Minecraft to use.
// Any artifact can be supplied so long as it has a "userdev" classifier artifact and is a compatible patcher artifact.
// The "userdev" classifier will be requested and setup by ForgeGradle.
// If the group id is "net.minecraft" and the artifact id is one of ["client", "server", "joined"],
// then special handling is done to allow a setup of a vanilla dependency without the use of an external repository.
minecraft "net.minecraftforge:forge:${minecraft_version}-${forge_version}"
// Example mod dependency with JEI
// The JEI API is declared for compile time use, while the full JEI artifact is used at runtime
// compileOnly "mezz.jei:jei-${mc_version}-common-api:${jei_version}"
// compileOnly "mezz.jei:jei-${mc_version}-forge-api:${jei_version}"
// runtimeOnly "mezz.jei:jei-${mc_version}-forge:${jei_version}"
// Example mod dependency using a mod jar from ./libs with a flat dir repository
// This maps to ./libs/coolmod-${mc_version}-${coolmod_version}.jar
// The group id is ignored when searching -- in this case, it is "blank"
// implementation fg.deobf("blank:coolmod-${mc_version}:${coolmod_version}")
// For more info:
// http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html
// http://www.gradle.org/docs/current/userguide/dependency_management.html
}
// This block of code expands all declared replace properties in the specified resource targets.
// A missing property will result in an error. Properties are expanded using ${} Groovy notation.
// When "copyIdeResources" is enabled, this will also run before the game launches in IDE environments.
// See https://docs.gradle.org/current/dsl/org.gradle.language.jvm.tasks.ProcessResources.html
tasks.named('processResources', ProcessResources) {
var replaceProperties = [
minecraft_version: minecraft_version, minecraft_version_range: minecraft_version_range,
forge_version: forge_version, forge_version_range: forge_version_range,
loader_version_range: loader_version_range,
mod_id: mod_id, mod_name: mod_name, mod_license: mod_license, mod_version: mod_version,
mod_authors: mod_authors, mod_description: mod_description,
]
inputs.properties replaceProperties
filesMatching(['META-INF/mods.toml', 'pack.mcmeta']) {
expand replaceProperties + [project: project]
}
}
// Example for how to get properties into the manifest for reading at runtime.
tasks.named('jar', Jar) {
manifest {
attributes([
'Specification-Title' : mod_id,
'Specification-Vendor' : mod_authors,
'Specification-Version' : '1', // We are version 1 of ourselves
'Implementation-Title' : project.name,
'Implementation-Version' : project.jar.archiveVersion,
'Implementation-Vendor' : mod_authors
])
// attributes['MixinConfigs'] = "${mod_id}.mixins.json"
}
}
// Example configuration to allow publishing using the maven-publish plugin
publishing {
publications {
register('mavenJava', MavenPublication) {
artifact jar
}
}
repositories {
maven {
url "file://${project.projectDir}/mcmodsrepo"
}
}
}
tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8' // Use the UTF-8 charset for Java compilation
}
// IntelliJ no longer downloads javadocs and sources by default, this tells Gradle to force IntelliJ to do it.
idea.module { downloadJavadoc = downloadSources = true }
eclipse {
// Run everytime eclipse builds the code
//autoBuildTasks genEclipseRuns
// Run when importing the project
synchronizationTasks 'genEclipseRuns'
}
// Merge the resources and classes into the same directory, because Java expects modules to be in a single directory.
// And if we have it in multiple we have to do performance intensive hacks like having the UnionFileSystem
// This will eventually be migrated to ForgeGradle so modders don't need to manually do it. But that is later.
sourceSets.each {
def dir = layout.buildDirectory.dir("sourcesSets/$it.name")
it.output.resourcesDir = dir
it.java.destinationDirectory = dir
}

421
changelog.txt Normal file
View File

@ -0,0 +1,421 @@
1.21.4 Changelog
54.1
====
- 54.1.6 Update MDK to fix OOM error and aid getting Mixin setup (#10582)
Backport of #10559 to 1.21.4.
Co-authored-by: Paint_Ninja <PaintNinja@users.noreply.github.com>
- 54.1.5 Add ForgeLayeredDraw & AddGuiOverlayLayersEvent as API for gui overlay management. (#10579)
- 54.1.4 Add event for adding framepasses (#10502)
- 54.1.3 Add Pumpkin Block and Item Tags (#10482)
- 54.1.2 Add '#forge:chorus_additionally_grows_on' tag for similar mechanics to '#minecraft:azalea_grows_on' but for chorus (#10459)
- 54.1.1 Fix Hanging Pale Moss not dropping with modded shears (#10414)
- 54.1.0 1.21.4 RB 1
https://forums.minecraftforge.net/topic/154394-forge-541-minecraft-1214/
54.0
====
- 54.0.38 Fix corrupted and invalidly symlinked worlds crashing on level select (#10406)
- 54.0.37 Add fast graphics render type to block model jsons (#10394)
Make modded leaves behave like vanilla leaves by default (Fixes #10389)
- 54.0.36 Add updated tag context to AddReloadListenerEvent (#10412)
Fixes using custom tags in GlobalLootModifiers.
- 54.0.35 Give ItemStack context to IForgeItem.getCapabilityProvider (#10404)
- 54.0.34 Re-introduce ItemStack Capabilities (#10324)
- 54.0.33 Fix redstone updates for comparators going up/down incorrectly. Related: #9973
- 54.0.32 Fix forced chunks never being ticked by the server (#10325)
- 54.0.31 Fix redstone update order not matching vanilla. (#10392)
- 54.0.30 Fix game test structure rotations being inconsistant (#10391)
- 54.0.29 Re-introduce IForgeItem.damageItem when an item takes damage, Fixes #10344 (#10371)
- 54.0.28 Gate client test mods behind clientSideOnly (#10390)
- 54.0.27 Fix issue with superclass event listeners by updating EventBus (#10384)
- 54.0.26 Bump dependencies, most notably EventBus (#10370)
- CoreMods 5.2.4 -> 5.2.6
- EventBus 6.2.15 -> 6.2.26
- Reduced memory usage
- Further performance improvements
- Fixed EventBus#39, unregistered listeners are now immediately reclaimable by the GC
- Apache MavenArtifact 3.8.5 -> 3.8.8
- NightConfig 3.7.3 -> 3.7.4
- 54.0.25 Fix shield disabling being completely ignored (#10316)
- 54.0.24 Update Gradle to 8.12.1
- 54.0.23 Fix JOpt Simple by updating ModLauncher (#10347)
- 54.0.22 GameTestHelper additions (#10338)
Co-authored-by: LexManos <LexManos@gmail.com>
- 54.0.21 Add `c:flowers`, `c:flowers/tall`, and `c:flowers/small` block and item tags (#10335)
Co-authored-by: TelepathicGrunt <40846040+telepathicgrunt@users.noreply.github.com>
- 54.0.20 Fix JOpt Simple needing a strict version requirement declaration (#10311)
- 54.0.19 Fix incorrect method reference in TntBlock.explode() (#10326)
- 54.0.18 Fix issues in VillagerTrades.EmeraldsForVillagerTypeItem related to custom Villager Types (#10298)
Add VillagerType#registerBiomeType
- 54.0.17 Fix render_type in block models not being used. Fixes #10294
- 54.0.16 Bump dependencies (#10274)
- EventBus 6.2.8 -> 6.2.15
- Bootstrap 2.1.7 -> 2.1.8
- SecureModules 2.2.20 -> 2.2.21
- AccessTransformers 8.2.0 -> 8.2.1
- ModLauncher 10.2.2 -> 10.2.3
These bumps include further clean-up and optimisations.
- 54.0.15 Simplify Title Screen Brandings (#10287)
- 54.0.14 Clean and fix Forge's internal coremods, fixes finalizeSpawn hook. (#10271)
- 54.0.13 Update jline for better darwin/arm64 support Fixes #10107 (#10279)
- 54.0.12 Bump CoreMods to 5.2.4 (#10262)
- 54.0.11 Allow mipmap lowering to be disabled (#10242)
- 54.0.10 Manage FileWatcher instance per ConfigFileTypeHandler (#10213)
- 54.0.9 Skip processing Forge classes in `RuntimeDistCleaner` (#10199)
Mod classes are still transformed as usual
- 54.0.8 Skip Forge classes in the RuntimeEnumExtender transformer (#10197)
Mod classes are still transformed as usual
- 54.0.7 Add hooks for using Vanilla's new Client data generator (#10206)
Add new hook for custom block models that do not have real blocks backing them
Some workspace cleanup fixing log4j annotation processor
- 54.0.6 Deprecate `@ObjectHolder`, add a couple of fast-paths (#10195)
- 54.0.5 Bump Bootstrap which has a slight performance boost during dev time.
- 54.0.4 Speed up mod annotation scanning by ~30%
- 54.0.3 Skip Vanilla classes for the CapabilityTokenSubclass transformer (#10196)
- 54.0.2 Simplify memory usage display on loading screen (#10193)
Co-authored-by: TelepathicGrunt <40846040+telepathicgrunt@users.noreply.github.com>
- 54.0.1 Fix custom particles causing crash
- 54.0.0 Minecraft 1.21.4
53.0
====
- 53.0.25 Remove debug code. Closes #10182
- 53.0.24 Pass the Holder<Enchantment> to Item.canApplyAtEnchantingTable. Closes #10181
- 53.0.23 Fix incorrect patch
- 53.0.22 Change vanilla registry order to last-seen. Closes #10179
- 53.0.21 Call IUnbakedGeometry.bake from BlockModel Closes #10178
- 53.0.20 Cleanup some warnings
- 53.0.19 Fix not being able to swim in lava
- 53.0.18 Move mdk back to com/example/examplemod to align with what people expect.
- 53.0.17 Move MDK example to test sourceset and fix Item/Block registration example. Closes #10139
- 53.0.16 Added support for using optional tags on Forge registries
Add DeferredRegister.key(name) helper function to make ResourceKey creation easier
Fix TagManager not binding tags
Fix Unbound Tag Exception when modders register tags during Register events Closes #10154
- 53.0.15 Fix empty tag conditional recipe test
- 53.0.14 Fixed missed call to getFriction hook in AbstractBoat
- 53.0.13 Pass player argument when firing `OnDatapackSyncEvent` (#10170)
- 53.0.12 Cleanup lifecycle transitions
Fix mod ordering for multi-mod jars
Make dependency resolution issues easier to debug/diagnose
- 53.0.11 Bump CoreMods to 5.2 (#10156)
Full Changelog:
https://gist.github.com/Jonathing/c3ad28b2a048ac839a7baba5417ee870
The key features are:
- ES6 language support
- Thoroughly updated ASMAPI, with full documentation
- Bug fixes (some optional for backwards-compatibility)
- Partial internal code cleanup
- 53.0.10 Fix PlayerRenderer#render invoking RenderLivingEvent and not RenderPlayerEvent (#10167)
- 53.0.9 Fix Powered Rails acting like Activator Rails due to misaligned patch
- 53.0.8 Properly allow normal mods.toml mods to specify the module names and use a full module-info.
Make FMLModContainer read and apply Add-Opens and Add-Exports manifest entries from mod files.
Forge is now the `net.minecraftforge.forge` module instead of `forge`
https://forums.minecraftforge.net/topic/153333-proper-java-module-support-in-forge-mods/
- 53.0.7 Fix LootTableLoadEvent not being fired. Closes #10144
- 53.0.6 Fix items with use durations of 0 being repeatedly used when use button is held down. Fixed #10150
- 53.0.5 Add AT for BlockEntityType constructor. (#10149)
- 53.0.4 Add `c:stripped_logs` and `c:stripped_woods` tags (#10146)
- 53.0.3 Bump CoreMods and ASM (#10145)
CoreMods 5.1.13 changelog: https://gist.github.com/Jonathing/905d142447ecef670526ae27243adbba
- 53.0.2 Remove redundant rendering options (#10140)
- 53.0.1 Fix pause menu having a black background, reverts PR #10115
- 53.0.0 1.21.3 update
52.0
====
- 52.0.22 Add `c:foods/pie` tag (#10135)
Replaces `forge:foods/pie`, which is now deprecated.
- 52.0.21 Fix back-compat with legacy `forge:` tags (#10126)
- 52.0.20 Implement the de-facto common tags, add many new Forge tags (#9955)
https://forums.minecraftforge.net/topic/152815-common-tags-in-forge/
- 52.0.19 Patch BlockEntity.java to use getType Method (#10124)
- 52.0.18 Fix and cleanup RuntimeDistCleaner
- 52.0.17 Sync component registry ids
Fix deprecation typo
Bump ModLauncher (better stack traces)
Set Automatic-Module-Name
- 52.0.16 Fix layering of translucent sprites being broken by re-adding blur call Mojang removed (#10115)
- 52.0.15 Cleanup length and size checks (#10108)
- 52.0.14 Update vulnerable `eclipse` dependency (#10109)
- 52.0.13 Add and fire SystemMessageReceivedEvent
Replaces ClientChatReceivedEvent.System which was not fired due to Mojang changing ChatType to a registry.
- 52.0.12 Fix highlighted item tooltip rendering twice. Closes #10112
- 52.0.11 Fix Network hooks not being initialized on GameTestServer (#10081)
Add rudimentary custom networking tests.
- 52.0.10 Fix inverted logic in TagEmptyCondition (#10069)
- 52.0.9 [1.21.1] Optionally supply `FMLJavaModLoadingContext` as a param to mod constructors (#10074)
Also made `FMLJavaModLoadingContext` extend `ModLoadingContext`. See the PR description for example usage.
- 52.0.8 Fix issues with `QuadBakingVertexConsumer` and Forge's OBJ loader (#10065)
- 52.0.7 Fire `OnDatapackSyncEvent` when a player joins a server (#10076)
- 52.0.6 Add a few Method Helpers onto ResourceKey to make getting Data Driven Entries Simpler (#10071)
- 52.0.5 Fix network channels not initializing during server transfers. Closes #10067
- 52.0.4 [1.21.1] ModLoading cleanup and optimisations (#10052)
- 52.0.3 Properly ignore unknown mod files (#10063)
- 52.0.2 Add level access to Item.TooltipContext if available.
- 52.0.1 Load mods that declare explicit 1.21 compatibility as 1.21.1 is a minor bugfix.
- 52.0.0 1.21.1
51.0
====
- 51.0.33 Removed unneeded boat patch related to MC-119811 (#10061)
- 51.0.32 Fix network sync of custom datapack registries.
Add gametest to verify that it functions.
- 51.0.31 Add a way to render tooltips from Formatted text and TooltipComponents elements (#10056)
- 51.0.30 Fix custom creative tabs with search listing all items instead of just their own.
- 51.0.29 Patch CropBlock to use instanceOf FarmBlock check instead of hard coding to Blocks.FARMLAND (#10044)
- 51.0.28 Fix ItemStack sensitive getDefaultAttributeModifiers not being called.
- 51.0.27 Add missed @user_jvm_args.txt to run.bat
- 51.0.26 Fix `onPlaceItemIntoWorld` always resetting item stack when in creative mode (#10047)
- 51.0.25 Fix matrix stack translations for `RenderHighlightEvent` (#10050)
- 51.0.24 Fix Global Loot Modifier deserialization not having registry access. Closes #10042 and #10043
- 51.0.23 Bump Mixin to 0.8.7 and allocate more ram to java compile tasks.
- 51.0.22 Use the new `fire()` and Result#isAllowed/isDenied/isDefault methods from EventBus (#10028)
- 51.0.21 Some build cleanup
- 51.0.20 Make HangingSignBlockEntity useable with custom BlockEntityTypes. #10038
- 51.0.19 Send last PoseStack pos to RenderLevelStageEvent AFTER_PARTICLES stage. Fixes #10031
- 51.0.18 Fix compile errors in MDK (#10029)
- 51.0.17 Fix converting dirt to mud consumes whole bottle (not just emptying) Closes #10027
- 51.0.16 Add support for named sub-caps
- 51.0.15 Fix conditional checking swallowing decoding errors when loading registry entries from datapacks. Fixes #9995
- 51.0.14 Apply license headers
- 51.0.13 Some code cleanup in ModInfo/ModFileInfo to use less streams and make things easier to debug.
- 51.0.12 Bump NightConfig to 3.7.3, to fix toml sub-configs being completely broken. Fixes #10015
- 51.0.11 Make ForgeSpawnEgg assume color is opaque if alpha is set to 0.
Fixes "invisible" spawn eggs by default, but still allows modders to specify partial transparency.
- 51.0.10 Fixed perspective rendering in SeparateTransformsModel (#10014)
- 51.0.9 Fix missed PartEntity patch in Player.attack (#10011)
- 51.0.8 Choose default JarJar mod file type based on parent JAR Closes #9939
- 51.0.7 Fixed falling block entities not rendering as moving blocks (#10006)
- 51.0.6 Bump Night Config, Should fix #9122
- 51.0.5 Fix ClientTickEvent not firing properly.
- 51.0.4 Change tick event to have pre/post classes (#9890)
- 51.0.3 Fix Bogged and Wolf armor not being shearable by custom shears. Closes #10005
- 51.0.2 Set team city branch
- 51.0.1 Remove Non-HolderLookup methods from INBTSerializeable and mark it as deprecated in favor of using Vanilla's new Component system. Closes #9998
- 51.0.0 1.21 Update
Co-authored-by: RealMangoRage <64402114+RealMangorage@users.noreply.github.com>
Co-authored-by: Daniel Norris <dnorris443@gmail.com>
Co-authored-by: Ven <tudurap.com@gmail.com>
50.1
====
- 50.1.3 Cleanup FML Bindings (#10004)
- 50.1.2 Fix NPE when calling ForgeHooks.getDefaultCreatorModId(ItemStack) on Spawn Eggs. Closes #10002
- 50.1.1 Fix boat travel distance being incorrect. Closes #9997
- 50.1.0 1.20.6 RB 1
https://forums.minecraftforge.net/topic/149458-forge-501-minecraft-1206/
50.0
====
- 50.0.37 Fix minor typo in MDK build.gradle
- 50.0.36 Fire EntityInteractSpecific on server side. Closes #9984
- 50.0.35 Unlock wrapped registries when firing register events.
- 50.0.34 Update Bootstrap to improve the Java version check error message (#9990)
- 50.0.33 Minor cleanup to ModListScreen and VersionChecker (#9988)
- 50.0.32 Prevent the `@OnlyIn` being misused on `@EventBusSubscriber` and `@Mod` annotated classes (#9891)
- 50.0.31 Fix CustomizeGuiOverlayEvent.DebugText and CustomizeGuiOverlayEvent.Chat not being fired. (#9982)
- 50.0.30 Actually fix creative tab count, IDE didn't save the file before regenning patches.
- 50.0.29 Move Creative Inventory page count to fix issue with partially transparent tooltips. Closes #9983
- 50.0.28 Make OpenContainer and SpawnEntity packets process on main game thread.
- 50.0.27 Add File.exists check to ConfigFileTypeHandler. Closes #9976
- 50.0.26 Fix crash when reloading a world that uses custom placed features. Closes #9979
- 50.0.25 Fix NPE in HurtByTargetGoal when mods set targets to null. Closes #7853
- 50.0.24 Fix RenderHandEvent firing with incorrect hand and item for offhand items. (#9977)
- 50.0.23 Fix screen layering and re-add the test. (#9978)
- 50.0.22 Add GatherComponentsEvent (#9944)
- 50.0.21 Fix powered rails not propogating correctly.
- 50.0.20 Remove ICustomPacket and add PayloadChannel. (#9972)
New PayloadChannel that uses the vanilla payload Type for packet distinction
Implement the minecraft:register/unregister channels using the new PayloadChannel
New generic channel builder function allowing people to implement channels however they want.
- 50.0.19 Implement entity aware armor model and texture hooks. Closes #9960
- 50.0.18 Fix finalizeSpawn's return value not being used correctly. Closes #9964
- 50.0.17 Fix Biome patch change that caused our field redirect coremod to not function correctly.
- 50.0.16 Make RegistryObject.getHolder lazy, Should help cases where vanilla registries use holders from other vanilla registries. Closes #9961
- 50.0.15 Ignore jar files in the mods folder that are not Forge mods. Closes #9968
- 50.0.14 Fix canceling MobSpawnEvent.FinalizeSpawn causing a NPE closes #9971
- 50.0.13 Fix potion brewing having arguments reversed. Closes #9970
- 50.0.12 Fix Melons/Pumpkins not growing correctly.
- 50.0.11 Some patch cleanup (#9951)
- 50.0.10 Filter paths discovered by ServiceProvider in ClasspathLocator. Closes #9899
- 50.0.9 Update SimpleChannel to make StreamCodecs easier (#9959)
Rework networking so that RegistryFriendlyByteBuf is useable for modders
Simple support for StreamCodec in SimpleChannel
Codecify all Forge packets
Make simpler builder pattern for SimpleChannel. Will eventually deprecate the old MessageBuilder as it's verbose and poorly written.
Co-authored-by: MrCrayfish <4958241+MrCrayfish@users.noreply.github.com>
Co-authored-by: Paint_Ninja <PaintNinja@users.noreply.github.com>
- 50.0.8 Fix shields not working correctly. Fixes #9966
- 50.0.7 Fix RenderTarget stencil patch location. Fixes #9965
- 50.0.6 Add ModelLayers patch back (#9962)
- 50.0.5 Fix canApplyAtEnchantingTable null pointer, Closes #9956
Bump SecureModules for package info and multi-release jar fixes.
- 50.0.4 Remove zombie chance config options (#9950)
- 50.0.3 Remove deprecated compressLanIPv6Addresses config option (#9949)
LAN IPv6 addresses are always compressed these days, so this config option is redundant
- 50.0.2 Fix custom payloads not being handled on the server in the game state. Closes #9948
Fix villagers not opening trade guis. Closes #9946
- 50.0.1 Fix MDK by bumping FG and disabling reobf tasks
Fix LAN server IPs being duplicated
Fix connecting to vanilla servers due to misapplied patch.
- 50.0.0 1.20.6 Initial Update
New Decompiler
Runtime Official mappings
ItemStacks arnt Capability providers anymore, use Vanilla's system.
Co-authored-by: RealMangoRage <64402114+RealMangorage@users.noreply.github.com>
Co-authored-by: Paint_Ninja <PaintNinja@users.noreply.github.com>
49.0
====
- 49.0.49 Make non-Forge mods.toml detection more robust (#9935)
- 49.0.48 Fix early window crash when parsing some forms of options.txt (#9933)
- 49.0.47 Fix edge-case regression with single-jar multiloader mods (#9931)
- 49.0.46 Add ClientPauseChangeEvent (#9905)
- 49.0.45 Improve mod loading errors (#9870)
- 49.0.44 Early display fixes/workarounds for buggy drivers (#9921)
- 49.0.43 Prevent registering null tiers (#9895)
Makes it easier to identify broken mods, as it moves the crash to when the broken mod in question registers the tier, rather than when any mod tries getting the tier.
- 49.0.42 Add helper method to `OnDatapackSyncEvent` (#9901)
Co-authored-by: blockingHD <9372035+blockinghd@users.noreply.github.com>
- 49.0.41 Fix NPE when acceptableValues in defineInList() does not allow nulls, fixes #9300 (#9903)
- 49.0.40 [1.20.x] Add ByteValue, ShortValue and FloatValue to ForgeConfigSpec, cleanup code (#9902)
- 49.0.39 Add Leaves method to ModelProvider.java (#9887)
- 49.0.38 Bump bootstrap
- 49.0.37 Fix level data not loading from existing worlds. Whole system needs a re-write.
- 49.0.36 Fix modlist size
- 49.0.35 Bump Bootstrap
- 49.0.34 Optimize Entity capabilities a bit by reordering conditions (#9886)
- 49.0.33 [1.20.x] Make common config screen registration tasks easier (#9884)
- 49.0.32 [1.20.4] Add CPU usage config option to early window, hide it by default (#9866)
- 49.0.31 Fix DatapackBuiltinEntriesProvider issues with forge registries, Fixes #9874
- 49.0.30 Readded DatapackBuiltinEntriesProvider (#9848)
- 49.0.29 Fix slightly offset mods screen link positioning (#9860)
Co-authored-by: Dennis C <11262040+XFactHD@users.noreply.github.com>
- 49.0.28 Fix DNS SRV record lookup not working by hacking the module system. Closes #9846
- 49.0.27 Add null check to DimensionDataStorage. Fixes #9859
- 49.0.26 Fix cases where LivingConversionEvents were not fired for vanilla conversions. Closes #9850
- 49.0.25 Update licenser plugin, and re-run it. Closes #9855
- 49.0.24 Fix background music looping when it shouldn't
- 49.0.23 Fix Criterion Test Mod
- 49.0.22 Improve help text on server Java check failure
- 49.0.21 [1.20.4] Restore the option of server run scripts (#9849)
Executable server jar is still a thing, but the run scripts are restored as an option for those that prefer it.
- 49.0.20 [1.20.x] More buildscript clean-up (#9845)
- 49.0.19 Fixed Spelling error in credits.txt (#9694)
- 49.0.18 Bump JarJar to fix more issues with UnionFileSystem assumptions.
- 49.0.17 Criterion test mod + unit test (#9744)
- 49.0.16 Fix launcher version name missing - between `forge` and the version. Closes #9843
- 49.0.15 Bump JarJar and SecureModule to fix issue with jars containing [] in their name. Closes #9842
- 49.0.14 Only add sorted/deduplicated mods to the classpath.
Fixes some mods causing the Forge error displays to break. Closes #9833
- 49.0.13 Improve server panel compatibility (#9836)
- 49.0.12 Make common DisplayTest registration tasks easier (#9822)
- 49.0.11 Cleanup Explosion patch but keep bin compatibility by using asm hacks. Closes #9817
- 49.0.10 Bump SecureModules, Closes #9820
- 49.0.9 Support pack overlay system. Closes #9818
- 49.0.8 Fix Server bundle
- 49.0.7 Optimise ForgeConfigSpec and make Range public (#9810)
- 49.0.6 Add `clientSideOnly` feature to mods.toml (#9804)
- 49.0.5 Add impl. of `IModFileInfo#showAsDataPack` (#9802)
- 49.0.4 Get rid of LibraryFinder
- 49.0.3 1.20.4 - Minor bug fix from Mojang
- 49.0.2 Fix java version check in bootstrap shim
- 49.0.1 1.20.3 Initial Update
https://forums.minecraftforge.net/topic/139822-forge-490-minecraft-1203/
- 49.0.0 Revive executable jars for the dedicated server
This has a minor change to development time build scripts. So developers, check the MDK
48.1
====
- 48.1.0 1.20.2 RB 1 - https://forums.minecraftforge.net/topic/139824-forge-481-minecraft-1202/
48.0
====
- 48.0.49 Implemented ClientPauseEvent/Hook (#9782)
- 48.0.48 Datagen addOptionalTag/s methods that allow passing the TagKey itself instead of passing the location (#9807)
- 48.0.47 Deprecate EntityRenderersEvent.AddLayers functions that hard case to LivingEntityRenderers as the backing maps do not guarantee that type. Closes #9683
- 48.0.46 Fix TagLoader error not printing tag name correctly. Closes #9693
- 48.0.45 Fix LoadingErrorScreen inner headers are not centered. Closes #9687
- 48.0.44 Rework KeyModifiers system to properly allow keybinds to be triggered when multiple modifiers are pressed.
Fix setting keybinds whel using keyboard inputs to select the menu. Closes #9793
- 48.0.43 Fix KeyModifiers not being properly taken into account. Closes #9806
- 48.0.42 Don't turn off VSync when rendering from Minecraft context (#9800)
Co-authored-by: embeddedt <42941056+embeddedt@users.noreply.github.com>
- 48.0.41 [1.20.x] Fix rare crash with early display window, fixes #9673 (#9798)
Co-Authored-By: embeddedt <42941056+embeddedt@users.noreply.github.com>
- 48.0.40 Move Chunk Watch/Unwatch events to fire after sync packets have been sent to the client (#9790)
This makes sure that modders who send extra chunk data will have clients who know about the chunk.
- 48.0.39 Add more sanitization to the ChannelListManager because other projects like to impose arbitrary critical restrictions. Closes #9789 #9772
- 48.0.38 Fix tag loading being unordered. Closes #9774
- 48.0.37 Fix texture UV values for obj models. Closes #9737 (#9767)
- 48.0.36 Gradle 8.4 (#9778)
- 48.0.35 Make Ingredient check for invalidation on getItems(), invalidate ingredients on tags update (#9688)
- 48.0.34 Improve mod description formatting in mods screen (#9768)
- 48.0.33 Fix lowcode implementation version, now that it's actually labeling the correct package.
- 48.0.32 Buildscript cleanup and organization.
Updated to use newer libraries that reduce the command line arguments needed to run the game.
Fix issues in the SecureModule's classloader that caused resources to not be seen when they are on parent module layers.
- 48.0.31 Fix @GameTestGenerator not functioning correctly. Closes #9748
- 48.0.30 Optimise registries by using fastutils collections to minimize boxing. (#9749)
- 48.0.29 Minor MDK changes (#9750)
- 48.0.28 Improve mod loading error message for errors inside mod constructors (#9751)
- 48.0.27 Add a CrashReportAnalyser that tries to identify the mod that crashed the game (#9732)
- 48.0.26 Fix potential threading issue when registering CriteriaTriggers. Closes #9745
- 48.0.25 Move to a cache based crowdin solution instead of hitting the api every build.
- 48.0.24 Fix Melon/Pumpkin stems having wrong plat type causing them to remain after trampling farmland. Fixes #9495
- 48.0.23 Fix loot tables not having their ids set.
- 48.0.22 Make horses and llama's fire LivingFallEvent. Fixes #9743
- 48.0.21 Fix advancement screen being too dark. Fixes #9727
- 48.0.20 Fix ConditionalCodec having an inverted test. Closes #9742
Remove clean project on CI.
Bump FG version to fix transitive issue on module path.
- 48.0.19 More buildscript work
Fixed ignoreList for client and server.
Lazy configured a few more tasks
Fixed early loading screen hardcoded names.. why?
- 48.0.18 Bump guava to module path for jimfs. Fixes dedicated server.
- 48.0.17 Revive custom ingredient types.
- 48.0.16 Revive ConditionalRecipe and ConditionalAdvancement.
Also directly add conditional support to all vanilla recipe data generators.
- 48.0.15 Rewrite our GameTest hooks to be sane.
Add game test to GlobalLootModifierTest which validates the smelting modifiers.
Removed FakePlayer system, it's broken and needs a major rewrite.
- 48.0.14 Cleanup FMLLoader and Launch Handlers.
Cleanup some of the build.gradle
Start work on restructuring test mods. They are now treated as their own jars, as well as having their mods.toml auto-generated. No more mods.toml conflicts!
Add pattern matching support to Data run modlist.
- 48.0.13 Fix Slot Index for Inventory Ticking Items (#9736)
- 48.0.12 Make default Entity.getAddPacket automatically use Forge's enhanced spawn packet if nessasary.
This spawn packet needs to be re-designed, it is effectively only there to hook into creating the new entity instance. This will be re-evaluated during the cleanup in 1.21+
- 48.0.11 Optimise path filter in mod loading (#9710)
Co-authored-by: embeddedt <42941056+embeddedt@users.noreply.github.com>
- 48.0.10 Fix ignitedByLava making blocks permanently flammable (#9735) Fixes #9730
- 48.0.9 Some BackgroundScanHandler code cleanup. Closes #9713
- 48.0.8 Fix missed patch causing new onInventoryTick method to not be called.
- 48.0.7 Fixed PlayerDestroyItemEvent not triggering for Fishing Rods (#9729)
- 48.0.6 Fix migration error causing nether and end portals to not function properly.
- 48.0.5 Optimise `ForgeRegistry#validateContent` by removing optimization that ModLauncher broke. (#9715)
- 48.0.4 Fix double message encoding in `Channel#toVanillaPacket` #9721 (#9722)
Fix OpenContainer message not resetting reader index of additional data.
- 48.0.3 Make CriteriaTriggers#register public again. Closes #9723
- 48.0.2 Fix Hunger bar rendering incorrectly. Fixes #9725
- 48.0.1 Send known channels to the server when they send us theirs.
- 48.0.0 1.20.2 Release
47.999
======
- 47.999.12 Enable ForgeLootTableProvider.
- 47.999.11 Global Loot Modifiers
- 47.999.10 Move old tests.
- 47.999.9 1.20.2-rc2
- 47.999.8 1.20.2-rc1
- 47.999.7 1.20.2-pre4
- 47.999.6 1.20.2-pre3
- 47.999.5 Use official mappings for in-repo patches, will be converted to SRG during build.
- 47.999.4 1.20.2-pre2
- 47.999.3 Fix debug overlay text not rendering.
- 47.999.2 Make SimpleChannel use a varInt for the discriminator allowing essentially unlimited packets.
- 47.999.1 Rewrite networking.
- 47.999.0 1.20.2-pre1

66
gradle.properties Normal file
View File

@ -0,0 +1,66 @@
# Sets default memory used for Gradle commands. Can be overridden by user or command line properties.
# This is required to provide enough memory for the Minecraft decompilation process.
org.gradle.jvmargs=-Xmx5G
org.gradle.daemon=false
# In the case that Gradle needs to fork to recompile, this will set the memory for that process.
systemProp.net.minecraftforge.gradle.repo.recompile.fork=true
systemProp.net.minecraftforge.gradle.repo.recompile.fork.args=-Xmx5G
# Opts-out of ForgeGradle automatically adding mavenCentral(), Forge's maven and MC libs maven to the repositories block
systemProp.net.minecraftforge.gradle.repo.attach=false
## Environment Properties
# The Minecraft version must agree with the Forge version to get a valid artifact
minecraft_version=1.21.4
# The Minecraft version range can use any release version of Minecraft as bounds.
# Snapshots, pre-releases, and release candidates are not guaranteed to sort properly
# as they do not follow standard versioning conventions.
minecraft_version_range=[1.21.4,1.22)
# The Forge version must agree with the Minecraft version to get a valid artifact
forge_version=54.1.6
# The Forge version range can use any version of Forge as bounds or match the loader version range
forge_version_range=[0,)
# The loader version range can only use the major version of Forge/FML as bounds
loader_version_range=[0,)
# The mapping channel to use for mappings.
# The default set of supported mapping channels are ["official", "snapshot", "snapshot_nodoc", "stable", "stable_nodoc"].
# Additional mapping channels can be registered through the "channelProviders" extension in a Gradle plugin.
#
# | Channel | Version | |
# |-----------|----------------------|--------------------------------------------------------------------------------|
# | official | MCVersion | Official field/method names from Mojang mapping files |
# | parchment | YYYY.MM.DD-MCVersion | Open community-sourced parameter names and javadocs layered on top of official |
#
# You must be aware of the Mojang license when using the 'official' or 'parchment' mappings.
# See more information here: https://github.com/MinecraftForge/MCPConfig/blob/master/Mojang.md
#
# Parchment is an unofficial project maintained by ParchmentMC, separate from Minecraft Forge.
# Additional setup is needed to use their mappings, see https://parchmentmc.org/docs/getting-started
mapping_channel=official
# The mapping version to query from the mapping channel.
# This must match the format required by the mapping channel.
mapping_version=1.21.4
## Mod Properties
# The unique mod identifier for the mod. Must be lowercase in English locale. Must fit the regex [a-z][a-z0-9_]{1,63}
# Must match the String constant located in the main mod class annotated with @Mod.
mod_id=blacksugarmod
# The human-readable display name for the mod.
mod_name=BlackSugar Mod
# The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default.
mod_license=All Rights Reserved
# The mod version. See https://semver.org/
mod_version=0.0.1
# The group ID for the mod. It is only important when publishing as an artifact to a Maven repository.
# This should match the base package used for the mod sources.
# See https://maven.apache.org/guides/mini/guide-naming-conventions.html
mod_group_id=com.spdis.blacksugarmod
# The authors of the mod. This is a simple text string that is used for display purposes in the mod list.
mod_authors=SPDIS
# The description of the mod. This is a simple multiline text string that is used for display purposes in the mod list.
mod_description=????????????????

BIN
gradle/wrapper/gradle-wrapper.jar vendored Normal file

Binary file not shown.

View File

@ -0,0 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

249
gradlew vendored Normal file
View File

@ -0,0 +1,249 @@
#!/bin/sh
#
# Copyright © 2015-2021 the original authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
#
# Gradle start up script for POSIX generated by Gradle.
#
# Important for running:
#
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
# noncompliant, but you have some other compliant shell such as ksh or
# bash, then to run this script, type that shell name before the whole
# command line, like:
#
# ksh Gradle
#
# Busybox and similar reduced shells will NOT work, because this script
# requires all of these POSIX shell features:
# * functions;
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
# * compound commands having a testable exit status, especially «case»;
# * various built-in commands including «command», «set», and «ulimit».
#
# Important for patching:
#
# (2) This script targets any POSIX shell, so it avoids extensions provided
# by Bash, Ksh, etc; in particular arrays are avoided.
#
# The "traditional" practice of packing multiple parameters into a
# space-separated string is a well documented source of bugs and security
# problems, so this is (mostly) avoided, by progressively accumulating
# options in "$@", and eventually passing that to Java.
#
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
# see the in-line comments for details.
#
# There are tweaks for specific operating systems such as AIX, CygWin,
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
#
##############################################################################
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
app_path=$0
# Need this for daisy-chained symlinks.
while
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
[ -h "$app_path" ]
do
ls=$( ls -ld "$app_path" )
link=${ls#*' -> '}
case $link in #(
/*) app_path=$link ;; #(
*) app_path=$APP_HOME$link ;;
esac
done
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
warn () {
echo "$*"
} >&2
die () {
echo
echo "$*"
echo
exit 1
} >&2
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
case "$( uname )" in #(
CYGWIN* ) cygwin=true ;; #(
Darwin* ) darwin=true ;; #(
MSYS* | MINGW* ) msys=true ;; #(
NONSTOP* ) nonstop=true ;;
esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD=$JAVA_HOME/jre/sh/java
else
JAVACMD=$JAVA_HOME/bin/java
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD=java
if ! command -v java >/dev/null 2>&1
then
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
fi
# Increase the maximum file descriptors if we can.
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC2039,SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC2039,SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
fi
# Collect all arguments for the java command, stacking in reverse order:
# * args from the command line
# * the main class name
# * -classpath
# * -D...appname settings
# * --module-path (only if needed)
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
# For Cygwin or MSYS, switch paths to Windows format before running java
if "$cygwin" || "$msys" ; then
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
JAVACMD=$( cygpath --unix "$JAVACMD" )
# Now convert the arguments - kludge to limit ourselves to /bin/sh
for arg do
if
case $arg in #(
-*) false ;; # don't mess with options #(
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
[ -e "$t" ] ;; #(
*) false ;;
esac
then
arg=$( cygpath --path --ignore --mixed "$arg" )
fi
# Roll the args list around exactly as many times as the number of
# args, so each arg winds up back in the position where it started, but
# possibly modified.
#
# NB: a `for` loop captures its iteration list before it begins, so
# changing the positional parameters here affects neither the number of
# iterations, nor the values presented in `arg`.
shift # remove old arg
set -- "$@" "$arg" # push replacement arg
done
fi
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Collect all arguments for the java command:
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# and any embedded shellness will be escaped.
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
# treated as '${Hostname}' itself on the command line.
set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
-classpath "$CLASSPATH" \
org.gradle.wrapper.GradleWrapperMain \
"$@"
# Stop when "xargs" is not available.
if ! command -v xargs >/dev/null 2>&1
then
die "xargs is not available"
fi
# Use "xargs" to parse quoted args.
#
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
#
# In Bash we could simply go:
#
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
# set -- "${ARGS[@]}" "$@"
#
# but POSIX shell has neither arrays nor command substitution, so instead we
# post-process each arg (as a line of input to sed) to backslash-escape any
# character that might be a shell metacharacter, then use eval to reverse
# that process (while maintaining the separation between arguments), and wrap
# the whole thing up as a single "set" statement.
#
# This will of course break if any of these variables contains a newline or
# an unmatched quote.
#
eval "set -- $(
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
xargs -n1 |
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
tr '\n' ' '
)" '"$@"'
exec "$JAVACMD" "$@"

92
gradlew.bat vendored Normal file
View File

@ -0,0 +1,92 @@
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%"=="" set DIRNAME=.
@rem This is normally unused
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute
echo. 1>&2
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto execute
echo. 1>&2
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2
goto fail
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
:end
@rem End local scope for the variables with windows NT shell
if %ERRORLEVEL% equ 0 goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
set EXIT_CODE=%ERRORLEVEL%
if %EXIT_CODE% equ 0 set EXIT_CODE=1
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
exit /b %EXIT_CODE%
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega

13
settings.gradle Normal file
View File

@ -0,0 +1,13 @@
pluginManagement {
repositories {
gradlePluginPortal()
maven {
name = 'MinecraftForge'
url = 'https://maven.minecraftforge.net/'
}
}
}
plugins {
id 'org.gradle.toolchains.foojay-resolver-convention' version '0.10.0'
}

View File

@ -0,0 +1,307 @@
package com.spdis.blacksugarmod;
import com.mojang.logging.LogUtils;
import net.minecraft.client.Minecraft;
import net.minecraft.core.registries.Registries;
import net.minecraft.world.effect.MobEffectInstance;
import net.minecraft.world.effect.MobEffects;
import net.minecraft.world.food.FoodProperties;
import net.minecraft.world.item.BlockItem;
import net.minecraft.world.item.CreativeModeTab;
import net.minecraft.world.item.CreativeModeTabs;
import net.minecraft.world.item.Item;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.level.block.state.BlockBehaviour;
import net.minecraft.world.level.material.MapColor;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.BuildCreativeModeTabContentsEvent;
import net.minecraftforge.event.server.ServerStartingEvent;
import net.minecraftforge.eventbus.api.IEventBus;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.config.ModConfig;
import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent;
import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent;
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;
import net.minecraftforge.registries.DeferredRegister;
import net.minecraftforge.registries.ForgeRegistries;
import net.minecraftforge.registries.RegistryObject;
import org.slf4j.Logger;
// 这里的值应该与 META-INF/mods.toml 文件中的条目匹配
@Mod(BlackSugarModMain.MODID)
public class BlackSugarModMain {
// 在一个公共位置定义模组ID供所有地方引用
public static final String MODID = "blacksugarmod";
// 直接引用slf4j日志记录器
private static final Logger LOGGER = LogUtils.getLogger();
// 创建一个延迟注册器来保存方块所有方块都将在"blacksugarmod"命名空间下注册
public static final DeferredRegister<Block> BLOCKS = DeferredRegister.create(ForgeRegistries.BLOCKS, MODID);
// 创建一个延迟注册器来保存物品所有物品都将在"blacksugarmod"命名空间下注册
public static final DeferredRegister<Item> ITEMS = DeferredRegister.create(ForgeRegistries.ITEMS, MODID);
// 创建一个延迟注册器来保存创造模式标签页所有标签页都将在"blacksugarmod"命名空间下注册
public static final DeferredRegister<CreativeModeTab> CREATIVE_MODE_TABS = DeferredRegister.create(Registries.CREATIVE_MODE_TAB, MODID);
// 创建黑糖物品ID为"blacksugarmod:black_sugar"// 黑糖物品
public static final RegistryObject<Item> BLACK_SUGAR = ITEMS.register("black_sugar",
() -> new Item(new Item.Properties()
.setId(ITEMS.key("black_sugar"))
)
);
// 面团物品
public static final RegistryObject<Item> DOUGH = ITEMS.register("dough",
() -> new Item(new Item.Properties()
.setId(ITEMS.key("dough"))
)
);
// 黑糖团子物品可食用
public static final RegistryObject<Item> BLACK_SUGAR_DUMPLING = ITEMS.register("black_sugar_dumpling",
() -> new Item(new Item.Properties()
.setId(ITEMS.key("black_sugar_dumpling"))
.food(new FoodProperties.Builder()
.alwaysEdible()
.nutrition(4)
.saturationModifier(9.6f)
.build()
)
)
);
// 脆香bro物品可食用
public static final RegistryObject<Item> CRISPY_BRO = ITEMS.register("crispy_bro",
() -> new Item(new Item.Properties()
.setId(ITEMS.key("crispy_bro"))
.food(new FoodProperties.Builder()
.alwaysEdible()
.nutrition(6)
.saturationModifier(8.0f)
.build()
)
)
);
// 食用油物品
public static final RegistryObject<Item> COOKING_OIL = ITEMS.register("cooking_oil",
() -> new Item(new Item.Properties()
.setId(ITEMS.key("cooking_oil"))
)
);
// 坚不可摧的海星物品
public static final RegistryObject<Item> INDESTRUCTIBLE_STARFISH = ITEMS.register("indestructible_starfish",
() -> new Item(new Item.Properties()
.setId(ITEMS.key("indestructible_starfish"))
)
);
// 串海星物品
public static final RegistryObject<Item> STARFISH_SKEWER = ITEMS.register("starfish_skewer",
() -> new Item(new Item.Properties()
.setId(ITEMS.key("starfish_skewer"))
)
);
// 棉花糖物品
public static final RegistryObject<Item> MARSHMALLOW = ITEMS.register("marshmallow",
() -> new Item(new Item.Properties()
.setId(ITEMS.key("marshmallow"))
)
);
// 烤棉花糖物品可食用
public static final RegistryObject<Item> ROASTED_MARSHMALLOW = ITEMS.register("roasted_marshmallow",
() -> new Item(new Item.Properties()
.setId(ITEMS.key("roasted_marshmallow"))
.food(new FoodProperties.Builder()
.alwaysEdible()
.nutrition(3)
.saturationModifier(5.0f)
.build()
)
)
);
// 致癌的棉花糖物品可食用
public static final RegistryObject<Item> CARCINOGENIC_MARSHMALLOW = ITEMS.register("carcinogenic_marshmallow",
() -> new Item(new Item.Properties()
.setId(ITEMS.key("carcinogenic_marshmallow"))
.food(new FoodProperties.Builder()
.alwaysEdible()
.nutrition(2)
.saturationModifier(3.0f)
.build()
)
)
);
// 萨卡班甲鱼物品
public static final RegistryObject<Item> SAKABAN_TURTLE = ITEMS.register("sakaban_turtle",
() -> new Item(new Item.Properties()
.setId(ITEMS.key("sakaban_turtle"))
)
);
// 葱花物品
public static final RegistryObject<Item> SCALLION = ITEMS.register("scallion",
() -> new Item(new Item.Properties()
.setId(ITEMS.key("scallion"))
)
);
// 腌制的甲鱼物品
public static final RegistryObject<Item> PICKLED_TURTLE = ITEMS.register("pickled_turtle",
() -> new Item(new Item.Properties()
.setId(ITEMS.key("pickled_turtle"))
)
);
// 一只觉得嘴里淡淡的小猫咪物品
public static final RegistryObject<Item> BLAND_KITTEN = ITEMS.register("bland_kitten",
() -> new Item(new Item.Properties()
.setId(ITEMS.key("bland_kitten"))
)
);
// 一只心怀歹念的小猫咪物品可食用
public static final RegistryObject<Item> MALICIOUS_KITTEN = ITEMS.register("malicious_kitten",
() -> new Item(new Item.Properties()
.setId(ITEMS.key("malicious_kitten"))
.food(new FoodProperties.Builder()
.alwaysEdible()
.nutrition(8)
.saturationModifier(12.0f)
.build()
)
)
);
// 香喷喷的串海星物品可食用
public static final RegistryObject<Item> FRAGRANT_STARFISH_SKEWER = ITEMS.register("fragrant_starfish_skewer",
() -> new Item(new Item.Properties()
.setId(ITEMS.key("fragrant_starfish_skewer"))
.food(new FoodProperties.Builder()
.alwaysEdible()
.nutrition(7)
.saturationModifier(10.0f)
.build()
)
)
);
// 一锅牢菜物品
public static final RegistryObject<Item> POT_OF_PRISON_VEGETABLES = ITEMS.register("pot_of_prison_vegetables",
() -> new Item(new Item.Properties()
.setId(ITEMS.key("pot_of_prison_vegetables"))
)
);
// 闷牢菜物品可食用
public static final RegistryObject<Item> BRAISED_PRISON_VEGETABLES = ITEMS.register("braised_prison_vegetables",
() -> new Item(new Item.Properties()
.setId(ITEMS.key("braised_prison_vegetables"))
.food(new FoodProperties.Builder()
.alwaysEdible()
.nutrition(5)
.saturationModifier(7.0f)
.build()
)
)
);
// 碳烤甲鱼物品可食用
public static final RegistryObject<Item> CHARCOAL_GRILLED_TURTLE = ITEMS.register("charcoal_grilled_turtle",
() -> new Item(new Item.Properties()
.setId(ITEMS.key("charcoal_grilled_turtle"))
.food(new FoodProperties.Builder()
.alwaysEdible()
.nutrition(9)
.saturationModifier(14.0f)
.build()
)
)
);
public BlackSugarModMain(FMLJavaModLoadingContext context) {
IEventBus modEventBus = context.getModEventBus();
// 为模组加载注册commonSetup方法
modEventBus.addListener(this::commonSetup);
// 将延迟注册器注册到模组事件总线以便方块得到注册
BLOCKS.register(modEventBus);
// 将延迟注册器注册到模组事件总线以便物品得到注册
ITEMS.register(modEventBus);
// 将延迟注册器注册到模组事件总线以便标签页得到注册
CREATIVE_MODE_TABS.register(modEventBus);
// 为我们感兴趣的服务器和其他游戏事件注册自己
MinecraftForge.EVENT_BUS.register(this);
// 将物品注册到创造模式标签页
modEventBus.addListener(this::addCreative);
// 注册我们模组的ForgeConfigSpec以便Forge可以为我们创建和加载配置文件
context.registerConfig(ModConfig.Type.COMMON, Config.SPEC);
}
// 将示例方块物品添加到建筑方块标签页
private void addCreative(BuildCreativeModeTabContentsEvent event) {
// 将黑糖物品添加到食物和饮品标签页
if (event.getTabKey() == CreativeModeTabs.FOOD_AND_DRINKS) {
event.accept(BLACK_SUGAR);
event.accept(DOUGH);
event.accept(BLACK_SUGAR_DUMPLING);
event.accept(CRISPY_BRO);
event.accept(COOKING_OIL);
event.accept(INDESTRUCTIBLE_STARFISH);
event.accept(STARFISH_SKEWER);
event.accept(MARSHMALLOW);
event.accept(ROASTED_MARSHMALLOW);
event.accept(CARCINOGENIC_MARSHMALLOW);
event.accept(SAKABAN_TURTLE);
event.accept(SCALLION);
event.accept(PICKLED_TURTLE);
event.accept(BLAND_KITTEN);
event.accept(MALICIOUS_KITTEN);
event.accept(FRAGRANT_STARFISH_SKEWER);
event.accept(POT_OF_PRISON_VEGETABLES);
event.accept(BRAISED_PRISON_VEGETABLES);
event.accept(CHARCOAL_GRILLED_TURTLE);
}
}
private void commonSetup(final FMLCommonSetupEvent event) {
// 一些通用设置代码
LOGGER.info("HELLO FROM COMMON SETUP");
if (Config.logDirtBlock)
LOGGER.info("DIRT BLOCK >> {}", ForgeRegistries.BLOCKS.getKey(Blocks.DIRT));
LOGGER.info(Config.magicNumberIntroduction + Config.magicNumber);
Config.items.forEach((item) -> LOGGER.info("ITEM >> {}", item.toString()));
}
// 你可以使用SubscribeEvent并让事件总线发现要调用的方法
@SubscribeEvent
public void onServerStarting(ServerStartingEvent event) {
// 当服务器启动时执行某些操作
LOGGER.info("HELLO from server starting");
}
// 你可以使用EventBusSubscriber来自动注册类中所有带有@SubscribeEvent注解的静态方法
@Mod.EventBusSubscriber(modid = MODID, bus = Mod.EventBusSubscriber.Bus.MOD, value = Dist.CLIENT)
public static class ClientModEvents {
@SubscribeEvent
public static void onClientSetup(FMLClientSetupEvent event) {
// 一些客户端设置代码
LOGGER.info("HELLO FROM CLIENT SETUP");
LOGGER.info("MINECRAFT NAME >> {}", Minecraft.getInstance().getUser().getName());
}
}
}

View File

@ -0,0 +1,60 @@
package com.spdis.blacksugarmod;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.item.Item;
import net.minecraftforge.common.ForgeConfigSpec;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.event.config.ModConfigEvent;
import net.minecraftforge.registries.ForgeRegistries;
import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;
// An example config class. This is not required, but it's a good idea to have one to keep your config organized.
// Demonstrates how to use Forge's config APIs
@Mod.EventBusSubscriber(modid = BlackSugarModMain.MODID, bus = Mod.EventBusSubscriber.Bus.MOD)
public class Config {
private static final ForgeConfigSpec.Builder BUILDER = new ForgeConfigSpec.Builder();
private static final ForgeConfigSpec.BooleanValue LOG_DIRT_BLOCK = BUILDER
.comment("Whether to log the dirt block on common setup")
.define("logDirtBlock", true);
private static final ForgeConfigSpec.IntValue MAGIC_NUMBER = BUILDER
.comment("A magic number")
.defineInRange("magicNumber", 42, 0, Integer.MAX_VALUE);
public static final ForgeConfigSpec.ConfigValue<String> MAGIC_NUMBER_INTRODUCTION = BUILDER
.comment("What you want the introduction message to be for the magic number")
.define("magicNumberIntroduction", "The magic number is... ");
// a list of strings that are treated as resource locations for items
private static final ForgeConfigSpec.ConfigValue<List<? extends String>> ITEM_STRINGS = BUILDER
.comment("A list of items to log on common setup.")
.defineListAllowEmpty("assets/blacksugarmod/items", List.of("minecraft:iron_ingot"), Config::validateItemName);
static final ForgeConfigSpec SPEC = BUILDER.build();
public static boolean logDirtBlock;
public static int magicNumber;
public static String magicNumberIntroduction;
public static Set<Item> items;
private static boolean validateItemName(final Object obj) {
return obj instanceof final String itemName && ForgeRegistries.ITEMS.containsKey(ResourceLocation.tryParse(itemName));
}
@SubscribeEvent
static void onLoad(final ModConfigEvent event) {
logDirtBlock = LOG_DIRT_BLOCK.get();
magicNumber = MAGIC_NUMBER.get();
magicNumberIntroduction = MAGIC_NUMBER_INTRODUCTION.get();
// convert the list of strings into a set of items
items = ITEM_STRINGS.get().stream()
.map(itemName -> ForgeRegistries.ITEMS.getValue(ResourceLocation.tryParse(itemName)))
.collect(Collectors.toSet());
}
}

View File

@ -0,0 +1,73 @@
# This is an example mods.toml file. It contains the data relating to the loading mods.
# There are several mandatory fields (#mandatory), and many more that are optional (#optional).
# The overall format is standard TOML format, v0.5.0.
# Note that there are a couple of TOML lists in this file.
# Find more information on toml format here: https://github.com/toml-lang/toml
# The name of the mod loader type to load - for regular FML @Mod mods it should be javafml
modLoader="javafml" #mandatory
# A version range to match for said mod loader - for regular FML @Mod it will be the forge version
loaderVersion="${loader_version_range}" #mandatory This is typically bumped every Minecraft version by Forge. See our download page for lists of versions.
# The license for you mod. This is mandatory metadata and allows for easier comprehension of your redistributive properties.
# Review your options at https://choosealicense.com/. All rights reserved is the default copyright stance, and is thus the default here.
license="${mod_license}"
# A URL to refer people to when problems occur with this mod
#issueTrackerURL="https://change.me.to.your.issue.tracker.example.invalid/" #optional
# If your mod is purely client-side and has no multiplayer functionality (be it dedicated servers or Open to LAN),
# set this to true, and Forge will set the correct displayTest for you and skip loading your mod on dedicated servers.
#clientSideOnly=true #optional - defaults to false if absent
# A list of mods - how many allowed here is determined by the individual mod loader
[[mods]] #mandatory
# The modid of the mod
modId="${mod_id}" #mandatory
# The version number of the mod
version="${mod_version}" #mandatory
# A display name for the mod
displayName="${mod_name}" #mandatory
# A URL to query for updates for this mod. See the JSON update specification https://docs.minecraftforge.net/en/latest/misc/updatechecker/
#updateJSONURL="https://change.me.example.invalid/updates.json" #optional
# A URL for the "homepage" for this mod, displayed in the mod UI
#displayURL="https://change.me.to.your.mods.homepage.example.invalid/" #optional
# A file name (in the root of the mod JAR) containing a logo for display
#logoFile="examplemod.png" #optional
# A text field displayed in the mod UI
#credits="" #optional
# A text field displayed in the mod UI
authors="${mod_authors}" #optional
# Display Test controls the display for your mod in the server connection screen
# MATCH_VERSION means that your mod will cause a red X if the versions on client and server differ. This is the default behaviour and should be what you choose if you have server and client elements to your mod.
# IGNORE_SERVER_VERSION means that your mod will not cause a red X if it's present on the server but not on the client. This is what you should use if you're a server only mod.
# IGNORE_ALL_VERSION means that your mod will not cause a red X if it's present on the client or the server. This is a special case and should only be used if your mod has no server component.
# NONE means that no display test is set on your mod. You need to do this yourself, see IExtensionPoint.DisplayTest for more information. You can define any scheme you wish with this value.
# IMPORTANT NOTE: this is NOT an instruction as to which environments (CLIENT or DEDICATED SERVER) your mod loads on. Your mod should load (and maybe do nothing!) whereever it finds itself.
#displayTest="MATCH_VERSION" # if nothing is specified, MATCH_VERSION is the default when clientSideOnly=false, otherwise IGNORE_ALL_VERSION when clientSideOnly=true (#optional)
# The description text for the mod (multi line!) (#mandatory)
description='''${mod_description}'''
# A dependency - use the . to indicate dependency for a specific modid. Dependencies are optional.
[[dependencies.${mod_id}]] #optional
# the modid of the dependency
modId="forge" #mandatory
# Does this dependency have to exist - if not, ordering below must be specified
mandatory=true #mandatory
# The version range of the dependency
versionRange="${forge_version_range}" #mandatory
# An ordering relationship for the dependency - BEFORE or AFTER required if the dependency is not mandatory
# BEFORE - This mod is loaded BEFORE the dependency
# AFTER - This mod is loaded AFTER the dependency
ordering="NONE"
# Side this dependency is applied on - BOTH, CLIENT, or SERVER
side="BOTH"
# Here's another dependency
[[dependencies.${mod_id}]]
modId="minecraft"
mandatory=true
# This version range declares a minimum of the current minecraft version up to but not including the next major version
versionRange="${minecraft_version_range}"
ordering="NONE"
side="BOTH"
# Features are specific properties of the game environment, that you may want to declare you require. This example declares
# that your mod requires GL version 3.2 or higher. Other features will be added. They are side aware so declaring this won't
# stop your mod loading on the server for example.
#[features.${mod_id}]
#openGLVersion="[3.2,)"

View File

@ -0,0 +1,6 @@
{
"model": {
"type": "minecraft:model",
"model": "blacksugarmod:item/black_sugar"
}
}

View File

@ -0,0 +1,6 @@
{
"model": {
"type": "minecraft:model",
"model": "blacksugarmod:item/black_sugar_dumpling"
}
}

View File

@ -0,0 +1,6 @@
{
"model": {
"type": "minecraft:model",
"model": "blacksugarmod:item/bland_kitten"
}
}

View File

@ -0,0 +1,6 @@
{
"model": {
"type": "minecraft:model",
"model": "blacksugarmod:item/braised_prison_vegetables"
}
}

View File

@ -0,0 +1,6 @@
{
"model": {
"type": "minecraft:model",
"model": "blacksugarmod:item/carcinogenic_marshmallow"
}
}

View File

@ -0,0 +1,6 @@
{
"model": {
"type": "minecraft:model",
"model": "blacksugarmod:item/charcoal_grilled_turtle"
}
}

View File

@ -0,0 +1,6 @@
{
"model": {
"type": "minecraft:model",
"model": "blacksugarmod:item/cooking_oil"
}
}

View File

@ -0,0 +1,6 @@
{
"model": {
"type": "minecraft:model",
"model": "blacksugarmod:item/crispy_bro"
}
}

View File

@ -0,0 +1,6 @@
{
"model": {
"type": "minecraft:model",
"model": "blacksugarmod:item/dough"
}
}

View File

@ -0,0 +1,6 @@
{
"model": {
"type": "minecraft:model",
"model": "blacksugarmod:item/fragrant_starfish_skewer"
}
}

View File

@ -0,0 +1,6 @@
{
"model": {
"type": "minecraft:model",
"model": "blacksugarmod:item/indestructible_starfish"
}
}

View File

@ -0,0 +1,6 @@
{
"model": {
"type": "minecraft:model",
"model": "blacksugarmod:item/malicious_kitten"
}
}

View File

@ -0,0 +1,6 @@
{
"model": {
"type": "minecraft:model",
"model": "blacksugarmod:item/marshmallow"
}
}

View File

@ -0,0 +1,6 @@
{
"model": {
"type": "minecraft:model",
"model": "blacksugarmod:item/pickled_turtle"
}
}

View File

@ -0,0 +1,6 @@
{
"model": {
"type": "minecraft:model",
"model": "blacksugarmod:item/pot_of_prison_vegetables"
}
}

View File

@ -0,0 +1,6 @@
{
"model": {
"type": "minecraft:model",
"model": "blacksugarmod:item/roasted_marshmallow"
}
}

View File

@ -0,0 +1,6 @@
{
"model": {
"type": "minecraft:model",
"model": "blacksugarmod:item/sakaban_turtle"
}
}

View File

@ -0,0 +1,6 @@
{
"model": {
"type": "minecraft:model",
"model": "blacksugarmod:item/scallion"
}
}

View File

@ -0,0 +1,6 @@
{
"model": {
"type": "minecraft:model",
"model": "blacksugarmod:item/starfish_skewer"
}
}

View File

@ -0,0 +1,5 @@
{
"item.blacksugarmod.black_sugar": "Black Sugar",
"item.blacksugarmod.dough": "Dough",
"item.blacksugarmod.black_sugar_dumpling": "Black Sugar Dumpling"
}

View File

@ -0,0 +1,21 @@
{
"item.blacksugarmod.black_sugar": "黑糖",
"item.blacksugarmod.dough": "面团",
"item.blacksugarmod.black_sugar_dumpling": "黑糖团子",
"item.blacksugarmod.crispy_bro": "脆香bro",
"item.blacksugarmod.cooking_oil": "食用油",
"item.blacksugarmod.indestructible_starfish": "坚不可摧的海星",
"item.blacksugarmod.starfish_skewer": "海星串",
"item.blacksugarmod.marshmallow": "棉花糖",
"item.blacksugarmod.roasted_marshmallow": "烤棉花糖",
"item.blacksugarmod.carcinogenic_marshmallow": "致癌的棉花糖",
"item.blacksugarmod.sakaban_turtle": "萨卡班甲鱼",
"item.blacksugarmod.scallion": "葱花",
"item.blacksugarmod.pickled_turtle": "腌好的萨卡班甲鱼",
"item.blacksugarmod.bland_kitten": "一只觉得嘴里淡淡的小猫咪",
"item.blacksugarmod.malicious_kitten": "一只心怀歹念的小猫咪",
"item.blacksugarmod.fragrant_starfish_skewer": "香喷喷的串海星",
"item.blacksugarmod.pot_of_prison_vegetables": "一锅牢菜",
"item.blacksugarmod.braised_prison_vegetables": "闷牢菜",
"item.blacksugarmod.charcoal_grilled_turtle": "炭烤萨卡班甲鱼"
}

View File

@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "blacksugarmod:item/black_sugar"
}
}

View File

@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "blacksugarmod:item/black_sugar_dumpling"
}
}

View File

@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "blacksugarmod:item/bland_kitten"
}
}

View File

@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "blacksugarmod:item/braised_prison_vegetables"
}
}

View File

@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "blacksugarmod:item/carcinogenic_marshmallow"
}
}

View File

@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "blacksugarmod:item/charcoal_grilled_turtle"
}
}

View File

@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "blacksugarmod:item/cooking_oil"
}
}

View File

@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "blacksugarmod:item/crispy_bro"
}
}

View File

@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "blacksugarmod:item/dough"
}
}

View File

@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "blacksugarmod:item/fragrant_starfish_skewer"
}
}

View File

@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "blacksugarmod:item/indestructible_starfish"
}
}

View File

@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "blacksugarmod:item/malicious_kitten"
}
}

View File

@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "blacksugarmod:item/marshmallow"
}
}

View File

@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "blacksugarmod:item/pickled_turtle"
}
}

View File

@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "blacksugarmod:item/pot_of_prison_vegetables"
}
}

View File

@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "blacksugarmod:item/roasted_marshmallow"
}
}

View File

@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "blacksugarmod:item/sakaban_turtle"
}
}

View File

@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "blacksugarmod:item/scallion"
}
}

View File

@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "blacksugarmod:item/starfish_skewer"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

@ -0,0 +1,10 @@
{
"type": "minecraft:smelting",
"experience": 0.1,
"cookingtime": 100,
"ingredient": "minecraft:sugar_cane",
"result":{
"id":"blacksugarmod:black_sugar",
"count": 1
}
}

View File

@ -0,0 +1,16 @@
{
"type": "minecraft:crafting_shaped",
"key": {
"B":"blacksugarmod:black_sugar",
"D":"blacksugarmod:dough"
},
"pattern": [
"BBB",
"BDB",
"BBB"
],
"result": {
"id": "blacksugarmod:black_sugar_dumpling",
"count": 2
}
}

View File

@ -0,0 +1,10 @@
{
"type": "minecraft:smelting",
"experience": 0.35,
"cookingtime": 400,
"ingredient": "blacksugarmod:pot_of_prison_vegetables",
"result": {
"id": "blacksugarmod:braised_prison_vegetables",
"count": 1
}
}

View File

@ -0,0 +1,10 @@
{
"type": "minecraft:campfire_cooking",
"experience": 0.35,
"cookingtime": 100,
"ingredient": "blacksugarmod:marshmallow",
"result": {
"id": "blacksugarmod:carcinogenic_marshmallow",
"count": 1
}
}

View File

@ -0,0 +1,10 @@
{
"type": "minecraft:campfire_cooking",
"experience": 0.35,
"cookingtime": 200,
"ingredient": "blacksugarmod:pickled_turtle",
"result": {
"id": "blacksugarmod:charcoal_grilled_turtle",
"count": 1
}
}

View File

@ -0,0 +1,12 @@
{
"type": "minecraft:crafting_shapeless",
"ingredients": [
"minecraft:bone",
"blacksugarmod:cooking_oil",
"blacksugarmod:scallion"
],
"result": {
"id": "blacksugarmod:crispy_bro",
"count": 1
}
}

View File

@ -0,0 +1,12 @@
{
"type": "minecraft:crafting_shapeless",
"ingredients": [
"minecraft:wheat",
"minecraft:water_bucket",
"minecraft:wheat"
],
"result": {
"id": "blacksugarmod:dough",
"count": 2
}
}

View File

@ -0,0 +1,10 @@
{
"type": "minecraft:campfire_cooking",
"experience": 0.35,
"cookingtime": 200,
"ingredient": "blacksugarmod:starfish_skewer",
"result": {
"id": "blacksugarmod:fragrant_starfish_skewer",
"count": 1
}
}

View File

@ -0,0 +1,13 @@
{
"type": "minecraft:crafting_shapeless",
"ingredients": [
"blacksugarmod:bland_kitten",
"blacksugarmod:cooking_oil",
"blacksugarmod:scallion",
"minecraft:nether_wart"
],
"result": {
"id": "blacksugarmod:malicious_kitten",
"count": 1
}
}

View File

@ -0,0 +1,12 @@
{
"type": "minecraft:crafting_shapeless",
"ingredients": [
"blacksugarmod:sakaban_turtle",
"blacksugarmod:scallion",
"blacksugarmod:cooking_oil"
],
"result": {
"id": "blacksugarmod:pickled_turtle",
"count": 1
}
}

View File

@ -0,0 +1,12 @@
{
"type": "minecraft:crafting_shapeless",
"ingredients": [
"minecraft:poppy",
"minecraft:carrot",
"minecraft:water_bucket"
],
"result": {
"id": "blacksugarmod:pot_of_prison_vegetables",
"count": 1
}
}

View File

@ -0,0 +1,10 @@
{
"type": "minecraft:smelting",
"experience": 0.35,
"cookingtime": 100,
"ingredient": "blacksugarmod:marshmallow",
"result": {
"id": "blacksugarmod:roasted_marshmallow",
"count": 1
}
}

View File

@ -0,0 +1,16 @@
{
"type": "minecraft:crafting_shapeless",
"ingredients": [
"blacksugarmod:indestructible_starfish",
"blacksugarmod:indestructible_starfish",
"blacksugarmod:indestructible_starfish",
"minecraft:nether_wart",
"blacksugarmod:cooking_oil",
"blacksugarmod:scallion",
"minecraft:stick"
],
"result": {
"id": "blacksugarmod:starfish_skewer",
"count": 1
}
}

View File

@ -0,0 +1,6 @@
{
"pack": {
"description": "${mod_id} resources",
"pack_format": 46
}
}