Compare commits
58 Commits
test
...
master-1.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bd5329f3ce | ||
|
|
24793d7606 | ||
| 7f9e5ad294 | |||
| eb07701181 | |||
|
|
6476b0aee1 | ||
|
|
4e270cccc1 | ||
|
|
f9e546d66b | ||
|
|
25d426ff31 | ||
|
|
210c023f2b | ||
|
|
6744c4b22d | ||
|
|
d0a9606931 | ||
|
|
93374f71d9 | ||
|
|
d597e3d2c6 | ||
|
|
226eb7a62f | ||
|
|
3040b4cc52 | ||
|
|
256ea2b4db | ||
|
|
f3e71409fd | ||
|
|
4440c4bd19 | ||
|
|
034ab4b8d0 | ||
|
|
92e96fd13f | ||
|
|
a3eac08572 | ||
|
|
ee788d0b35 | ||
|
|
16868d3a1c | ||
|
|
3928deeb7b | ||
|
|
e86fa3f518 | ||
|
|
0189c176df | ||
|
|
69b25b37ff | ||
|
|
27e670e537 | ||
|
|
42f1621fea | ||
|
|
c2a22770f7 | ||
|
|
c21ca30137 | ||
|
|
6fc8485f82 | ||
|
|
e948ec99c9 | ||
|
|
10b7e8d75b | ||
|
|
431b93bf31 | ||
|
|
53680a59c8 | ||
|
|
4d33953135 | ||
|
|
5305247683 | ||
|
|
b832af808f | ||
|
|
8aefcbbf09 | ||
|
|
4e5ada44cf | ||
|
|
9a607d5abd | ||
|
|
e72f91d3ac | ||
|
|
f503570db7 | ||
|
|
d1b0d02131 | ||
|
|
8f30ff4e96 | ||
|
|
350461ee1c | ||
|
|
f11bc16690 | ||
| 37a8321d87 | |||
| 9f5a391539 | |||
|
|
407eceafa4 | ||
|
|
8ae050bddd | ||
|
|
b7d2b6580a | ||
|
|
981d117f3d | ||
|
|
7f6d9616ba | ||
|
|
2f0dbfa973 | ||
|
|
f9e8ba52ad | ||
|
|
7934f8ba65 |
@@ -1,28 +0,0 @@
|
|||||||
This is Forge Mod Loader.
|
|
||||||
|
|
||||||
You can find the source code at all times at https://github.com/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.
|
|
||||||
http://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.
|
|
||||||
http://www.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.
|
|
||||||
|
|
||||||
@@ -1,59 +0,0 @@
|
|||||||
-------------------------------------------
|
|
||||||
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 "unrenamed" MCP source code (aka
|
|
||||||
srgnames) - this means that you will not be able to read them directly against
|
|
||||||
normal code.
|
|
||||||
|
|
||||||
Source pack installation information:
|
|
||||||
|
|
||||||
Standalone source installation
|
|
||||||
==============================
|
|
||||||
|
|
||||||
Step 1: Open your command-line and browse to the folder where you extracted the zip file.
|
|
||||||
|
|
||||||
Step 2: Once you have a command window up in the folder that the downloaded material was placed, type:
|
|
||||||
|
|
||||||
Windows: "gradlew setupDecompWorkspace"
|
|
||||||
Linux/Mac OS: "./gradlew setupDecompWorkspace"
|
|
||||||
|
|
||||||
Step 3: After all that finished, you're left with a choice.
|
|
||||||
For eclipse, run "gradlew eclipse" (./gradlew eclipse if you are on Mac/Linux)
|
|
||||||
|
|
||||||
If you preffer to use IntelliJ, steps are a little different.
|
|
||||||
1. Open IDEA, and import project.
|
|
||||||
2. Select your build.gradle file and have it import.
|
|
||||||
3. Once it's finished you must close IntelliJ and run the following command:
|
|
||||||
|
|
||||||
"gradlew genIntellijRuns" (./gradlew genIntellijRuns if you are on Mac/Linux)
|
|
||||||
|
|
||||||
Step 4: The final step is to open Eclipse and switch your workspace to /eclipse/ (if you use IDEA, it should automatically start on your project)
|
|
||||||
|
|
||||||
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 effect your code} and then start the processs again.
|
|
||||||
|
|
||||||
Should it still not work,
|
|
||||||
Refer to #ForgeGradle on EsperNet for more information about the gradle environment.
|
|
||||||
|
|
||||||
Tip:
|
|
||||||
If you do not care about seeing Minecraft's source code you can replace "setupDecompWorkspace" with one of the following:
|
|
||||||
"setupDevWorkspace": Will patch, deobfusicated, and gather required assets to run minecraft, but will not generated human readable source code.
|
|
||||||
"setupCIWorkspace": Same as Dev but will not download any assets. This is useful in build servers as it is the fastest because it does the least work.
|
|
||||||
|
|
||||||
Tip:
|
|
||||||
When using Decomp workspace, the Minecraft source code is NOT added to your workspace in a editable way. Minecraft is treated like a normal Library. Sources are there for documentation and research purposes and usually can be accessed under the 'referenced libraries' section of your IDE.
|
|
||||||
|
|
||||||
Forge source installation
|
|
||||||
=========================
|
|
||||||
MinecraftForge ships with this code and installs it as part of the forge
|
|
||||||
installation process, no further action is required on your part.
|
|
||||||
|
|
||||||
LexManos' Install Video
|
|
||||||
=======================
|
|
||||||
https://www.youtube.com/watch?v=8VEdtQLuLO0&feature=youtu.be
|
|
||||||
|
|
||||||
For more details update more often refer to the Forge Forums:
|
|
||||||
http://www.minecraftforge.net/forum/index.php/topic,14048.0.html
|
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -1,28 +0,0 @@
|
|||||||
This is Forge Mod Loader.
|
|
||||||
|
|
||||||
You can find the source code at all times at https://github.com/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.
|
|
||||||
http://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.
|
|
||||||
http://www.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.
|
|
||||||
|
|
||||||
@@ -1,483 +0,0 @@
|
|||||||
Minecraft Forge is 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.
|
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
|
|
||||||
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
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
* Eloraam *
|
|
||||||
|
|
||||||
* FlowerChild *
|
|
||||||
|
|
||||||
* Hawkye *
|
|
||||||
|
|
||||||
* MALfunction84 *
|
|
||||||
|
|
||||||
Submitted the sleep handler code for his mod (Somnia) and others to use.
|
|
||||||
|
|
||||||
* Scokeev9 *
|
|
||||||
|
|
||||||
Gave permission for ScotTools API to be integrated into MCF, and also supported the Forge by converting his mods to use it.
|
|
||||||
|
|
||||||
ScotTools Background: ScotTools was an API that enabled modders to add blocks to harvesting levels (and many other ease-of-use features to create new tools), and the first tool API that used block material for block breaking efficiency which allowed blocks from mods that didn't use ScotTools API to break with the correct speed.
|
|
||||||
|
|
||||||
* SpaceToad *
|
|
||||||
|
|
||||||
* LexManos *
|
|
||||||
|
|
||||||
* cpw *
|
|
||||||
|
|
||||||
* 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.
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
IBXM is copyright (c) 2007, Martin Cameron, and is licensed under the BSD License.
|
|
||||||
All rights reserved.
|
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
|
||||||
|
|
||||||
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
|
||||||
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
|
||||||
Neither the name of mumart nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
|
||||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
|
|
||||||
@@ -1,40 +0,0 @@
|
|||||||
SoundSystem CodecIBXM Class License:
|
|
||||||
|
|
||||||
You are free to use this class for any purpose, commercial or otherwise.
|
|
||||||
You may modify this class or source code, and distribute it any way you
|
|
||||||
like, provided the following conditions are met:
|
|
||||||
|
|
||||||
1) You may not falsely claim to be the author of this class or any
|
|
||||||
unmodified portion of it.
|
|
||||||
2) You may not copyright this class or a modified version of it and then
|
|
||||||
sue me for copyright infringement.
|
|
||||||
3) If you modify the source code, you must clearly document the changes
|
|
||||||
made before redistributing the modified source code, so other users know
|
|
||||||
it is not the original code.
|
|
||||||
4) You are not required to give me credit for this class in any derived
|
|
||||||
work, but if you do, you must also mention my website:
|
|
||||||
http://www.paulscode.com
|
|
||||||
5) I the author will not be responsible for any damages (physical,
|
|
||||||
financial, or otherwise) caused by the use if this class or any
|
|
||||||
portion of it.
|
|
||||||
6) I the author do not guarantee, warrant, or make any representations,
|
|
||||||
either expressed or implied, regarding the use of this class or any
|
|
||||||
portion of it.
|
|
||||||
|
|
||||||
Author: Paul Lamb
|
|
||||||
http://www.paulscode.com
|
|
||||||
|
|
||||||
|
|
||||||
This software is based on or using the IBXM library available from
|
|
||||||
http://www.geocities.com/sunet2000/
|
|
||||||
|
|
||||||
|
|
||||||
IBXM is copyright (c) 2007, Martin Cameron, and is licensed under the BSD License.
|
|
||||||
All rights reserved.
|
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
|
||||||
|
|
||||||
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
|
||||||
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
|
||||||
Neither the name of mumart nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
|
||||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
@@ -1,59 +0,0 @@
|
|||||||
-------------------------------------------
|
|
||||||
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 "unrenamed" MCP source code (aka
|
|
||||||
srgnames) - this means that you will not be able to read them directly against
|
|
||||||
normal code.
|
|
||||||
|
|
||||||
Source pack installation information:
|
|
||||||
|
|
||||||
Standalone source installation
|
|
||||||
==============================
|
|
||||||
|
|
||||||
Step 1: Open your command-line and browse to the folder where you extracted the zip file.
|
|
||||||
|
|
||||||
Step 2: Once you have a command window up in the folder that the downloaded material was placed, type:
|
|
||||||
|
|
||||||
Windows: "gradlew setupDecompWorkspace"
|
|
||||||
Linux/Mac OS: "./gradlew setupDecompWorkspace"
|
|
||||||
|
|
||||||
Step 3: After all that finished, you're left with a choice.
|
|
||||||
For eclipse, run "gradlew eclipse" (./gradlew eclipse if you are on Mac/Linux)
|
|
||||||
|
|
||||||
If you preffer to use IntelliJ, steps are a little different.
|
|
||||||
1. Open IDEA, and import project.
|
|
||||||
2. Select your build.gradle file and have it import.
|
|
||||||
3. Once it's finished you must close IntelliJ and run the following command:
|
|
||||||
|
|
||||||
"gradlew genIntellijRuns" (./gradlew genIntellijRuns if you are on Mac/Linux)
|
|
||||||
|
|
||||||
Step 4: The final step is to open Eclipse and switch your workspace to /eclipse/ (if you use IDEA, it should automatically start on your project)
|
|
||||||
|
|
||||||
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 effect your code} and then start the processs again.
|
|
||||||
|
|
||||||
Should it still not work,
|
|
||||||
Refer to #ForgeGradle on EsperNet for more information about the gradle environment.
|
|
||||||
|
|
||||||
Tip:
|
|
||||||
If you do not care about seeing Minecraft's source code you can replace "setupDecompWorkspace" with one of the following:
|
|
||||||
"setupDevWorkspace": Will patch, deobfusicated, and gather required assets to run minecraft, but will not generated human readable source code.
|
|
||||||
"setupCIWorkspace": Same as Dev but will not download any assets. This is useful in build servers as it is the fastest because it does the least work.
|
|
||||||
|
|
||||||
Tip:
|
|
||||||
When using Decomp workspace, the Minecraft source code is NOT added to your workspace in a editable way. Minecraft is treated like a normal Library. Sources are there for documentation and research purposes and usually can be accessed under the 'referenced libraries' section of your IDE.
|
|
||||||
|
|
||||||
Forge source installation
|
|
||||||
=========================
|
|
||||||
MinecraftForge ships with this code and installs it as part of the forge
|
|
||||||
installation process, no further action is required on your part.
|
|
||||||
|
|
||||||
LexManos' Install Video
|
|
||||||
=======================
|
|
||||||
https://www.youtube.com/watch?v=8VEdtQLuLO0&feature=youtu.be
|
|
||||||
|
|
||||||
For more details update more often refer to the Forge Forums:
|
|
||||||
http://www.minecraftforge.net/forum/index.php/topic,14048.0.html
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
[]
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
[]
|
|
||||||
@@ -1,84 +0,0 @@
|
|||||||
# Configuration file
|
|
||||||
|
|
||||||
client {
|
|
||||||
# Replace the vanilla bucket models with Forges own dynamic bucket model. Unifies bucket visuals if a mod uses the Forge bucket model.
|
|
||||||
B:replaceVanillaBucketModel=false
|
|
||||||
|
|
||||||
# Toggle off to make missing model text in the gui fit inside the slot.
|
|
||||||
B:zoomInMissingModelTextInGui=false
|
|
||||||
|
|
||||||
# The timestamp of the last reminder to update to Java 8 in number of milliseconds since January 1, 1970, 00:00:00 GMT. Nag will show only once every 24 hours. To disable it set this to some really high number.
|
|
||||||
D:java8Reminder=0
|
|
||||||
|
|
||||||
# Disable culling of hidden faces next to stairs and slabs. Causes extra rendering, but may fix some resource packs that exploit this vanilla mechanic.
|
|
||||||
B:disableStairSlabCulling=false
|
|
||||||
|
|
||||||
# Enable forge to queue all chunk updates to the Chunk Update thread. May increase FPS significantly, but may also cause weird rendering lag. Not recommended for computers without a significant number of cores available.
|
|
||||||
B:alwaysSetupTerrainOffThread=false
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
general {
|
|
||||||
# Set to true to disable Forge's version check mechanics. Forge queries a small json file on our server for version information. For more details see the ForgeVersion class in our github.
|
|
||||||
B:disableVersionCheck=false
|
|
||||||
|
|
||||||
# Controls the number threshold at which Packet51 is preferred over Packet52, default and minimum 64, maximum 1024
|
|
||||||
I:clumpingThreshold=64
|
|
||||||
|
|
||||||
# Set to true to enable the post initialization sorting of crafting recipes using Forge's sorter. May cause desyncing on conflicting recipes. MUST RESTART MINECRAFT IF CHANGED FROM THE CONFIG GUI.
|
|
||||||
B:sortRecipies=true
|
|
||||||
|
|
||||||
# Set this to true to remove any Entity that throws an error in its update method instead of closing the server and reporting a crash log. BE WARNED THIS COULD SCREW UP EVERYTHING USE SPARINGLY WE ARE NOT RESPONSIBLE FOR DAMAGES.
|
|
||||||
B:removeErroringEntities=false
|
|
||||||
|
|
||||||
# Set this to true to remove any TileEntity that throws an error in its update method instead of closing the server and reporting a crash log. BE WARNED THIS COULD SCREW UP EVERYTHING USE SPARINGLY WE ARE NOT RESPONSIBLE FOR DAMAGES.
|
|
||||||
B:removeErroringTileEntities=false
|
|
||||||
|
|
||||||
# Set this to true to check the entire entity's collision bounding box for ladders instead of just the block they are in. Causes noticeable differences in mechanics so default is vanilla behavior. Default: false
|
|
||||||
B:fullBoundingBoxLadders=false
|
|
||||||
|
|
||||||
# Control the range of sky blending for colored skies in biomes.
|
|
||||||
I:biomeSkyBlendRange <
|
|
||||||
2
|
|
||||||
4
|
|
||||||
6
|
|
||||||
8
|
|
||||||
10
|
|
||||||
12
|
|
||||||
14
|
|
||||||
16
|
|
||||||
18
|
|
||||||
20
|
|
||||||
22
|
|
||||||
24
|
|
||||||
26
|
|
||||||
28
|
|
||||||
30
|
|
||||||
32
|
|
||||||
34
|
|
||||||
>
|
|
||||||
|
|
||||||
# Base zombie summoning spawn chance. Allows changing the bonus zombie summoning mechanic.
|
|
||||||
D:zombieBaseSummonChance=0.1
|
|
||||||
|
|
||||||
# Chance that a zombie (or subclass) is a baby. Allows changing the zombie spawning mechanic.
|
|
||||||
D:zombieBabyChance=0.05
|
|
||||||
|
|
||||||
# Enable the forge block rendering pipeline - fixes the lighting of custom models.
|
|
||||||
B:forgeLightPipelineEnabled=true
|
|
||||||
|
|
||||||
# Log cascading chunk generation issues during terrain population.
|
|
||||||
B:logCascadingWorldGeneration=true
|
|
||||||
|
|
||||||
# The time in ticks the server will wait when a dimension was queued to unload. This can be useful when rapidly loading and unloading dimensions, like e.g. throwing items through a nether portal a few time per second.
|
|
||||||
I:dimensionUnloadQueueDelay=0
|
|
||||||
B:enableGlobalConfig=false
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
version_checking {
|
|
||||||
# Enable the entire mod update check system. This only applies to mods using the Forge system.
|
|
||||||
B:Global=true
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
#By changing the setting below to TRUE you are indicating your agreement to our EULA (https://account.mojang.com/documents/minecraft_eula).
|
|
||||||
#Sat Apr 01 13:44:13 EDT 2017
|
|
||||||
eula=true
|
|
||||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@@ -1 +0,0 @@
|
|||||||
[]
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 586 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 582 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 566 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 506 KiB |
@@ -1,39 +0,0 @@
|
|||||||
#Minecraft server properties
|
|
||||||
#Fri Jun 09 22:53:20 PDT 2017
|
|
||||||
max-tick-time=60000
|
|
||||||
generator-settings=
|
|
||||||
force-gamemode=false
|
|
||||||
allow-nether=true
|
|
||||||
gamemode=1
|
|
||||||
enable-query=false
|
|
||||||
player-idle-timeout=0
|
|
||||||
difficulty=1
|
|
||||||
spawn-monsters=false
|
|
||||||
op-permission-level=4
|
|
||||||
announce-player-achievements=true
|
|
||||||
pvp=true
|
|
||||||
snooper-enabled=true
|
|
||||||
level-type=DEFAULT
|
|
||||||
hardcore=false
|
|
||||||
enable-command-block=false
|
|
||||||
max-players=20
|
|
||||||
network-compression-threshold=256
|
|
||||||
resource-pack-sha1=
|
|
||||||
max-world-size=29999984
|
|
||||||
server-port=25565
|
|
||||||
server-ip=
|
|
||||||
spawn-npcs=true
|
|
||||||
allow-flight=true
|
|
||||||
level-name=world
|
|
||||||
view-distance=10
|
|
||||||
resource-pack=
|
|
||||||
spawn-animals=true
|
|
||||||
white-list=false
|
|
||||||
generate-structures=true
|
|
||||||
online-mode=false
|
|
||||||
max-build-height=256
|
|
||||||
level-seed=
|
|
||||||
use-native-transport=true
|
|
||||||
prevent-proxy-connections=false
|
|
||||||
motd=A Minecraft Server
|
|
||||||
enable-rcon=false
|
|
||||||
BIN
1.11/servers.dat
BIN
1.11/servers.dat
Binary file not shown.
@@ -1,100 +0,0 @@
|
|||||||
package nmd.primal.forgecraft;
|
|
||||||
|
|
||||||
import net.minecraft.creativetab.CreativeTabs;
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraftforge.fml.relauncher.Side;
|
|
||||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
|
||||||
import nmd.primal.forgecraft.init.ModItems;
|
|
||||||
//import nmd.primal.forgecraft.Item.ModItems;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Created by kitsu on 11/24/2016.
|
|
||||||
*/
|
|
||||||
public class ModInfo {
|
|
||||||
/** Mod Details**/
|
|
||||||
public static final String MOD_ID = "forgecraft";
|
|
||||||
public static final String MOD_NAME = "Kitsu's ForgeCraft";
|
|
||||||
//public static final String MOD_PREFIX = MOD_ID + ":";
|
|
||||||
public static final String MOD_CHANNEL = MOD_ID;
|
|
||||||
public static final String MOD_VERSION = "1.2.22";
|
|
||||||
public static final String MC_VERSIONS = "[1.11.0, 1.12.0)";
|
|
||||||
public static final String DEPENDENCIES = "required-after:forge@[13.20.0.2226,);" + "required-after:primal@[0.4,);";
|
|
||||||
|
|
||||||
/** Mod Structures **/
|
|
||||||
public static final String SERVER_PROXY = "nmd.primal.forgecraft.proxy.ServerProxy";
|
|
||||||
public static final String CLIENT_PROXY = "nmd.primal.forgecraft.proxy.ClientProxy";
|
|
||||||
//public static final String GUI_FACTORY = "nmd.primal.forgecraft.gui.GuiFactory";
|
|
||||||
//public static final String UPDATE_JSON = "";
|
|
||||||
|
|
||||||
public enum ForgecraftItems {
|
|
||||||
TEST("test", "itemtest"),
|
|
||||||
BELLOWSHANDLE("bellowshandle", "bellowshandle"),
|
|
||||||
STONETONGS("stonetongs", "stonetongs"),
|
|
||||||
SOFTCRUCIBLE("softcrucible", "softcrucible"),
|
|
||||||
FORGINGMANUAL("forgingmanual","forgingmanual");
|
|
||||||
|
|
||||||
private String unlocalizedName;
|
|
||||||
private String registryName;
|
|
||||||
|
|
||||||
ForgecraftItems(String unlocalizedName, String registryName) {
|
|
||||||
this.unlocalizedName = unlocalizedName;
|
|
||||||
this.registryName = registryName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getUnlocalizedName() {
|
|
||||||
return unlocalizedName;
|
|
||||||
}
|
|
||||||
public String getRegistryName() {
|
|
||||||
return registryName;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public enum ForgecraftBlocks {
|
|
||||||
FIREBOX("firebox", "firebox"),
|
|
||||||
PISTONBELLOWS("pistonbellows", "pistonbellows"),
|
|
||||||
BLOOMERY("bloomery", "bloomery"),
|
|
||||||
EMPTYCRUCIBLE("emptycrucible", "emptycrucible");
|
|
||||||
|
|
||||||
private String unlocalizedName;
|
|
||||||
private String registryName;
|
|
||||||
|
|
||||||
ForgecraftBlocks(String unlocalizedName, String registryName) {
|
|
||||||
this.unlocalizedName = unlocalizedName;
|
|
||||||
this.registryName = registryName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getUnlocalizedName() {
|
|
||||||
return unlocalizedName;
|
|
||||||
}
|
|
||||||
public String getRegistryName() {
|
|
||||||
return registryName;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Creative Tabs **/
|
|
||||||
public static CreativeTabs TAB_FORGECRAFT = new CreativeTabs(MOD_ID)
|
|
||||||
{
|
|
||||||
@Override
|
|
||||||
@SideOnly(Side.CLIENT)
|
|
||||||
public ItemStack getTabIconItem() {
|
|
||||||
return new ItemStack(ModItems.forgehammer);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
/*
|
|
||||||
public static CreativeTabs TAB_PRIMAL = new CreativeTabs(MOD_ID)
|
|
||||||
{
|
|
||||||
|
|
||||||
@Override
|
|
||||||
@SideOnly(Side.CLIENT)
|
|
||||||
public ItemStack getTabIconItem() {
|
|
||||||
return new ItemStack(PrimalItems.FLINT_HATCHET);
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,454 +0,0 @@
|
|||||||
package nmd.primal.forgecraft.blocks;
|
|
||||||
|
|
||||||
import net.minecraft.block.ITileEntityProvider;
|
|
||||||
import net.minecraft.block.material.Material;
|
|
||||||
import net.minecraft.block.properties.IProperty;
|
|
||||||
import net.minecraft.block.properties.PropertyBool;
|
|
||||||
import net.minecraft.block.state.BlockStateContainer;
|
|
||||||
import net.minecraft.block.state.IBlockState;
|
|
||||||
import net.minecraft.entity.Entity;
|
|
||||||
import net.minecraft.entity.EntityLivingBase;
|
|
||||||
import net.minecraft.entity.item.EntityItem;
|
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
|
||||||
import net.minecraft.init.Items;
|
|
||||||
import net.minecraft.init.SoundEvents;
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraft.tileentity.TileEntity;
|
|
||||||
import net.minecraft.util.*;
|
|
||||||
import net.minecraft.util.math.BlockPos;
|
|
||||||
import net.minecraft.util.text.ITextComponent;
|
|
||||||
import net.minecraft.util.text.TextComponentString;
|
|
||||||
import net.minecraft.world.IBlockAccess;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
import net.minecraftforge.fml.relauncher.Side;
|
|
||||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
|
||||||
import nmd.primal.core.api.PrimalItems;
|
|
||||||
import nmd.primal.forgecraft.CommonUtils;
|
|
||||||
import nmd.primal.forgecraft.ModInfo;
|
|
||||||
import nmd.primal.forgecraft.crafting.BloomeryCrafting;
|
|
||||||
import nmd.primal.forgecraft.tiles.TileBloomery;
|
|
||||||
|
|
||||||
import java.util.Random;
|
|
||||||
import java.util.concurrent.ThreadLocalRandom;
|
|
||||||
|
|
||||||
import static nmd.primal.core.common.helper.FireHelper.makeSmoke;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Created by mminaie on 1/21/17.
|
|
||||||
*/
|
|
||||||
public class Bloomery extends CustomContainerFacing implements ITileEntityProvider {
|
|
||||||
|
|
||||||
public static final PropertyBool ACTIVE = PropertyBool.create("active");
|
|
||||||
public static final PropertyBool COVERED = PropertyBool.create("covered");
|
|
||||||
|
|
||||||
public Bloomery(Material material, String registryName) {
|
|
||||||
super(material);
|
|
||||||
setUnlocalizedName(ModInfo.ForgecraftBlocks.BLOOMERY.getUnlocalizedName());
|
|
||||||
setRegistryName(registryName);
|
|
||||||
//setRegistryName(ModInfo.ForgecraftBlocks.FIREBOX.getRegistryName());
|
|
||||||
setCreativeTab(ModInfo.TAB_FORGECRAFT);
|
|
||||||
setDefaultState(this.blockState.getBaseState().withProperty(FACING, EnumFacing.NORTH).withProperty(ACTIVE, Boolean.valueOf(false)));
|
|
||||||
setHardness(3.0f);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public TileEntity createNewTileEntity(World worldIn, int meta)
|
|
||||||
{
|
|
||||||
return new TileBloomery();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void randomTick(World world, BlockPos pos, IBlockState state, Random random)
|
|
||||||
{
|
|
||||||
this.updateTick(world, pos, state, random);
|
|
||||||
if(!world.isRemote){
|
|
||||||
if(state.getValue(ACTIVE) == true) {
|
|
||||||
makeSmoke(world, pos);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ)
|
|
||||||
{
|
|
||||||
if (!world.isRemote) {
|
|
||||||
TileBloomery tile = (TileBloomery) world.getTileEntity(pos);
|
|
||||||
if (tile != null) {
|
|
||||||
ItemStack pItem = player.inventory.getCurrentItem();
|
|
||||||
ItemStack tileItem = tile.getSlotStack(0);
|
|
||||||
ItemStack tileItem1 = tile.getSlotStack(1);
|
|
||||||
if(pItem.isEmpty()) {
|
|
||||||
|
|
||||||
|
|
||||||
if (player.isSneaking()) {
|
|
||||||
if (!tileItem.isEmpty()) {
|
|
||||||
CommonUtils.spawnItemEntity(world, player, tile.getSlotStack(0));
|
|
||||||
tile.setSlotStack(0, ItemStack.EMPTY);
|
|
||||||
tile.markDirty();
|
|
||||||
tile.updateBlock();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(!player.isSneaking()){
|
|
||||||
if(world.getBlockState(pos).getValue(ACTIVE) == true){
|
|
||||||
Integer bloomeryHeat = tile.getHeat();
|
|
||||||
Integer idealTemp = null;
|
|
||||||
Integer cookCounter = tile.getCookCounter();
|
|
||||||
Integer idealCookTime = null;
|
|
||||||
Integer remainingTime = null;
|
|
||||||
|
|
||||||
String stringBloomeryHeat = bloomeryHeat.toString();
|
|
||||||
String stringIdealTemp = "";
|
|
||||||
String stringRemainingTime = "";
|
|
||||||
|
|
||||||
BloomeryCrafting recipe = BloomeryCrafting.getRecipe(tile.getSlotStack(1));
|
|
||||||
if(recipe != null) {
|
|
||||||
idealTemp = recipe.getHeatThreshold();
|
|
||||||
idealCookTime = recipe.getIdealTime();
|
|
||||||
stringIdealTemp = idealTemp.toString();
|
|
||||||
remainingTime = idealCookTime - cookCounter;
|
|
||||||
stringRemainingTime = remainingTime.toString();
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
ITextComponent itextcomponent = new TextComponentString("Current Temp: " + stringBloomeryHeat + " Ideal Temp: " + stringIdealTemp + " Ticks Remaining: " + stringRemainingTime);
|
|
||||||
player.sendStatusMessage(itextcomponent, true);
|
|
||||||
//System.out.println(pos);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(tile.getSlotStack(0) != ItemStack.EMPTY) {
|
|
||||||
if((pItem.getItem() == Items.FLINT_AND_STEEL) ||
|
|
||||||
(pItem.getItem() == PrimalItems.FIRE_BOW) ||
|
|
||||||
pItem.getItem() == PrimalItems.TORCH_WOOD_LIT ||
|
|
||||||
pItem.getItem() == PrimalItems.TORCH_NETHER_LIT ) {
|
|
||||||
world.setBlockState(pos, state.withProperty(ACTIVE, true), 2);
|
|
||||||
tile.setHeat(100);
|
|
||||||
tile.markDirty();
|
|
||||||
tile.updateBlock();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if((!pItem.isEmpty()) && tile.isItemValidForSlot(0, pItem)) {
|
|
||||||
if (!tileItem.isEmpty()){
|
|
||||||
if(pItem.getItem() == tileItem.getItem()){
|
|
||||||
if(tileItem.getCount() < 64){
|
|
||||||
if(tileItem.getCount() + pItem.getCount() <= 64){
|
|
||||||
tileItem.grow(pItem.getCount());
|
|
||||||
player.inventory.setInventorySlotContents(player.inventory.currentItem, ItemStack.EMPTY);
|
|
||||||
tile.markDirty();
|
|
||||||
tile.updateBlock();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
if(tileItem.getCount() + pItem.getCount() > 64){
|
|
||||||
pItem.setCount(64-pItem.getCount());
|
|
||||||
tileItem.setCount(64);
|
|
||||||
tile.markDirty();
|
|
||||||
tile.updateBlock();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(tileItem.isEmpty()) {
|
|
||||||
tile.setSlotStack(0, pItem);
|
|
||||||
player.inventory.setInventorySlotContents(player.inventory.currentItem, ItemStack.EMPTY);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if((!pItem.isEmpty()) && tile.isItemValidForSlot(1, pItem)) {
|
|
||||||
if (!tileItem1.isEmpty()) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if(tileItem1.isEmpty()){
|
|
||||||
ItemStack tempItem = new ItemStack(pItem.getItem(), 1);
|
|
||||||
tile.setSlotStack(1, tempItem);
|
|
||||||
pItem.shrink(1);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int getLightValue(IBlockState state, IBlockAccess world, BlockPos pos)
|
|
||||||
{
|
|
||||||
int lightState =0;
|
|
||||||
if(state.getValue(ACTIVE) == true){
|
|
||||||
lightState = 10;
|
|
||||||
}
|
|
||||||
return lightState;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getFlammability(IBlockAccess world, BlockPos pos, EnumFacing face)
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isFlammable(IBlockAccess world, BlockPos pos, EnumFacing face)
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isFireSource(World world, BlockPos pos, EnumFacing side)
|
|
||||||
{
|
|
||||||
if(!world.isRemote){
|
|
||||||
if(world.getBlockState(pos).getValue(ACTIVE)==true){
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onEntityCollidedWithBlock(World world, BlockPos pos, IBlockState state, Entity ent)
|
|
||||||
{
|
|
||||||
if(ent instanceof EntityPlayer){
|
|
||||||
if(state.getValue(ACTIVE) == true){
|
|
||||||
ent.setFire(1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Called serverside after this block is replaced with another in Chunk, but before the Tile Entity is updated
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public void breakBlock(World world, BlockPos pos, IBlockState state)
|
|
||||||
{
|
|
||||||
if (!world.isRemote && world.getGameRules().getBoolean("doTileDrops"))
|
|
||||||
{
|
|
||||||
TileBloomery tile = (TileBloomery) world.getTileEntity(pos);
|
|
||||||
if (tile !=null)
|
|
||||||
{
|
|
||||||
for (ItemStack stack : tile.getSlotList())
|
|
||||||
{
|
|
||||||
if (stack != null) {
|
|
||||||
float offset = 0.7F;
|
|
||||||
double offsetX = world.rand.nextFloat() * offset + (1.0F - offset) * 0.5D;
|
|
||||||
double offsetY = world.rand.nextFloat() * offset + (1.0F - offset) * 0.5D;
|
|
||||||
double offsetZ = world.rand.nextFloat() * offset + (1.0F - offset) * 0.5D;
|
|
||||||
EntityItem item = new EntityItem(world, pos.getX() + offsetX, pos.getY() + offsetY, pos.getZ() + offsetZ, stack);
|
|
||||||
item.setDefaultPickupDelay();
|
|
||||||
world.spawnEntity(item);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
super.breakBlock(world, pos, state);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onBlockPlacedBy(World worldIn, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack)
|
|
||||||
{
|
|
||||||
if(!worldIn.isRemote){
|
|
||||||
worldIn.setBlockState(pos, state.withProperty(FACING, placer.getHorizontalFacing()).withProperty(ACTIVE, Boolean.valueOf(false)).withProperty(COVERED, Boolean.valueOf(false)), 2);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int getMetaFromState(IBlockState state) {
|
|
||||||
int i = 0;
|
|
||||||
|
|
||||||
if( state.getValue(FACING) == EnumFacing.EAST && state.getValue(ACTIVE) == false && state.getValue(COVERED) == false){
|
|
||||||
i = 0;
|
|
||||||
return i;
|
|
||||||
}
|
|
||||||
if( state.getValue(FACING) == EnumFacing.WEST && state.getValue(ACTIVE) == false && state.getValue(COVERED) == false){
|
|
||||||
i = 1;
|
|
||||||
return i;
|
|
||||||
}
|
|
||||||
if( state.getValue(FACING) == EnumFacing.SOUTH && state.getValue(ACTIVE) == false && state.getValue(COVERED) == false){
|
|
||||||
i = 2;
|
|
||||||
return i;
|
|
||||||
}
|
|
||||||
if( state.getValue(FACING) == EnumFacing.NORTH && state.getValue(ACTIVE) == false && state.getValue(COVERED) == false){
|
|
||||||
i = 3;
|
|
||||||
return i;
|
|
||||||
}
|
|
||||||
if( state.getValue(FACING) == EnumFacing.EAST && state.getValue(ACTIVE) == true && state.getValue(COVERED) == false){
|
|
||||||
i = 4;
|
|
||||||
return i;
|
|
||||||
}
|
|
||||||
if( state.getValue(FACING) == EnumFacing.WEST && state.getValue(ACTIVE) == true && state.getValue(COVERED) == false){
|
|
||||||
i = 5;
|
|
||||||
return i;
|
|
||||||
}
|
|
||||||
if( state.getValue(FACING) == EnumFacing.SOUTH && state.getValue(ACTIVE) == true && state.getValue(COVERED) == false){
|
|
||||||
i = 6;
|
|
||||||
return i;
|
|
||||||
}
|
|
||||||
if( state.getValue(FACING) == EnumFacing.NORTH && state.getValue(ACTIVE) == true && state.getValue(COVERED) == false){
|
|
||||||
i = 7;
|
|
||||||
return i;
|
|
||||||
}
|
|
||||||
if( state.getValue(FACING) == EnumFacing.EAST && state.getValue(ACTIVE) == true && state.getValue(COVERED) == true){
|
|
||||||
i = 8;
|
|
||||||
return i;
|
|
||||||
}
|
|
||||||
if( state.getValue(FACING) == EnumFacing.WEST && state.getValue(ACTIVE) == true && state.getValue(COVERED) == true){
|
|
||||||
i = 9;
|
|
||||||
return i;
|
|
||||||
}
|
|
||||||
if( state.getValue(FACING) == EnumFacing.SOUTH && state.getValue(ACTIVE) == true && state.getValue(COVERED) == true){
|
|
||||||
i = 10;
|
|
||||||
return i;
|
|
||||||
}
|
|
||||||
if( state.getValue(FACING) == EnumFacing.NORTH && state.getValue(ACTIVE) == true && state.getValue(COVERED) == true){
|
|
||||||
i = 11;
|
|
||||||
return i;
|
|
||||||
}
|
|
||||||
if( state.getValue(FACING) == EnumFacing.EAST && state.getValue(ACTIVE) == false && state.getValue(COVERED) == true){
|
|
||||||
i = 12;
|
|
||||||
return i;
|
|
||||||
}
|
|
||||||
if( state.getValue(FACING) == EnumFacing.WEST && state.getValue(ACTIVE) == false && state.getValue(COVERED) == true){
|
|
||||||
i = 13;
|
|
||||||
return i;
|
|
||||||
}
|
|
||||||
if( state.getValue(FACING) == EnumFacing.SOUTH && state.getValue(ACTIVE) == false && state.getValue(COVERED) == true){
|
|
||||||
i = 14;
|
|
||||||
return i;
|
|
||||||
}
|
|
||||||
if( state.getValue(FACING) == EnumFacing.NORTH && state.getValue(ACTIVE) == false && state.getValue(COVERED) == true){
|
|
||||||
i = 15;
|
|
||||||
return i;
|
|
||||||
}
|
|
||||||
return i;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public IBlockState getStateFromMeta(int meta)
|
|
||||||
{
|
|
||||||
IBlockState iblockstate = this.getDefaultState();
|
|
||||||
|
|
||||||
if (meta == 0){
|
|
||||||
iblockstate = iblockstate.withProperty(FACING, EnumFacing.EAST).withProperty(ACTIVE, Boolean.valueOf(false)).withProperty(COVERED, Boolean.valueOf(false));
|
|
||||||
}
|
|
||||||
if (meta == 1) {
|
|
||||||
iblockstate = iblockstate.withProperty(FACING, EnumFacing.WEST).withProperty(ACTIVE, Boolean.valueOf(false)).withProperty(COVERED, Boolean.valueOf(false));
|
|
||||||
}
|
|
||||||
if (meta == 2) {
|
|
||||||
iblockstate = iblockstate.withProperty(FACING, EnumFacing.SOUTH).withProperty(ACTIVE, Boolean.valueOf(false)).withProperty(COVERED, Boolean.valueOf(false));
|
|
||||||
}
|
|
||||||
if (meta == 3) {
|
|
||||||
iblockstate = iblockstate.withProperty(FACING, EnumFacing.NORTH).withProperty(ACTIVE, Boolean.valueOf(false)).withProperty(COVERED, Boolean.valueOf(false));
|
|
||||||
}
|
|
||||||
if (meta == 4) {
|
|
||||||
iblockstate = iblockstate.withProperty(FACING, EnumFacing.EAST).withProperty(ACTIVE, Boolean.valueOf(true)).withProperty(COVERED, Boolean.valueOf(false));
|
|
||||||
}
|
|
||||||
if (meta == 5) {
|
|
||||||
iblockstate = iblockstate.withProperty(FACING, EnumFacing.WEST).withProperty(ACTIVE, Boolean.valueOf(true)).withProperty(COVERED, Boolean.valueOf(false));
|
|
||||||
}
|
|
||||||
if (meta == 6) {
|
|
||||||
iblockstate = iblockstate.withProperty(FACING, EnumFacing.SOUTH).withProperty(ACTIVE, Boolean.valueOf(true)).withProperty(COVERED, Boolean.valueOf(false));
|
|
||||||
}
|
|
||||||
if (meta == 7) {
|
|
||||||
iblockstate = iblockstate.withProperty(FACING, EnumFacing.NORTH).withProperty(ACTIVE, Boolean.valueOf(true)).withProperty(COVERED, Boolean.valueOf(false));
|
|
||||||
}
|
|
||||||
if (meta == 8) {
|
|
||||||
iblockstate = iblockstate.withProperty(FACING, EnumFacing.EAST).withProperty(ACTIVE, Boolean.valueOf(true)).withProperty(COVERED, Boolean.valueOf(true));
|
|
||||||
}
|
|
||||||
if (meta == 9) {
|
|
||||||
iblockstate = iblockstate.withProperty(FACING, EnumFacing.WEST).withProperty(ACTIVE, Boolean.valueOf(true)).withProperty(COVERED, Boolean.valueOf(true));
|
|
||||||
}
|
|
||||||
if (meta == 10) {
|
|
||||||
iblockstate = iblockstate.withProperty(FACING, EnumFacing.SOUTH).withProperty(ACTIVE, Boolean.valueOf(true)).withProperty(COVERED, Boolean.valueOf(true));
|
|
||||||
}
|
|
||||||
if (meta == 11) {
|
|
||||||
iblockstate = iblockstate.withProperty(FACING, EnumFacing.NORTH).withProperty(ACTIVE, Boolean.valueOf(true)).withProperty(COVERED, Boolean.valueOf(true));
|
|
||||||
}
|
|
||||||
if (meta == 12) {
|
|
||||||
iblockstate = iblockstate.withProperty(FACING, EnumFacing.EAST).withProperty(ACTIVE, Boolean.valueOf(false)).withProperty(COVERED, Boolean.valueOf(true));
|
|
||||||
}
|
|
||||||
if (meta == 13) {
|
|
||||||
iblockstate = iblockstate.withProperty(FACING, EnumFacing.WEST).withProperty(ACTIVE, Boolean.valueOf(false)).withProperty(COVERED, Boolean.valueOf(true));
|
|
||||||
}
|
|
||||||
if (meta == 14) {
|
|
||||||
iblockstate = iblockstate.withProperty(FACING, EnumFacing.SOUTH).withProperty(ACTIVE, Boolean.valueOf(false)).withProperty(COVERED, Boolean.valueOf(true));
|
|
||||||
}
|
|
||||||
if (meta == 15) {
|
|
||||||
iblockstate = iblockstate.withProperty(FACING, EnumFacing.NORTH).withProperty(ACTIVE, Boolean.valueOf(false)).withProperty(COVERED, Boolean.valueOf(true));
|
|
||||||
}
|
|
||||||
return iblockstate;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected BlockStateContainer createBlockState() {
|
|
||||||
return new BlockStateContainer(this, new IProperty[] {FACING, ACTIVE, COVERED});
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isFullCube(IBlockState state)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isFullyOpaque(IBlockState state)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isOpaqueCube(IBlockState state)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
@SideOnly(Side.CLIENT)
|
|
||||||
public boolean shouldSideBeRendered(IBlockState blockState, IBlockAccess blockAccess, BlockPos pos, EnumFacing side)
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public EnumBlockRenderType getRenderType(IBlockState state)
|
|
||||||
{
|
|
||||||
return EnumBlockRenderType.MODEL;
|
|
||||||
}
|
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
|
||||||
@SuppressWarnings("incomplete-switch")
|
|
||||||
public void randomDisplayTick(IBlockState state, World world, BlockPos pos, Random rand)
|
|
||||||
{
|
|
||||||
if(state.getValue(Forge.ACTIVE) == true)
|
|
||||||
{
|
|
||||||
double d0 = (double)pos.getX() + 0.5D;
|
|
||||||
double d1 = (double)pos.getY() + 0.2D;
|
|
||||||
double d2 = (double)pos.getZ() + 0.5D;
|
|
||||||
double d3 = 0.52D;
|
|
||||||
double d4 = ThreadLocalRandom.current().nextDouble(0.075, 0.35);
|
|
||||||
double ySpeed = ThreadLocalRandom.current().nextDouble(0.0, 0.075);
|
|
||||||
|
|
||||||
if (rand.nextDouble() < 0.1D)
|
|
||||||
{
|
|
||||||
world.playSound((double)pos.getX() + 0.5D, (double)pos.getY(), (double)pos.getZ() + 0.5D, SoundEvents.BLOCK_FURNACE_FIRE_CRACKLE, SoundCategory.BLOCKS, 1.0F, 1.0F, false);
|
|
||||||
}
|
|
||||||
if(rand.nextInt(4) == 1){
|
|
||||||
world.spawnParticle(EnumParticleTypes.FLAME, d0+d4, d1, d2+d4, 0.0D, ySpeed, 0.0D, new int[0]);
|
|
||||||
world.spawnParticle(EnumParticleTypes.FLAME, d0+d4, d1, d2-d4, 0.0D, ySpeed, 0.0D, new int[0]);
|
|
||||||
}
|
|
||||||
if(rand.nextInt(4) == 2){
|
|
||||||
world.spawnParticle(EnumParticleTypes.FLAME, d0+d4, d1, d2-d4, 0.0D, ySpeed, 0.0D, new int[0]);
|
|
||||||
world.spawnParticle(EnumParticleTypes.FLAME, d0-d4, d1, d2+d4, 0.0D, ySpeed, 0.0D, new int[0]);
|
|
||||||
}
|
|
||||||
if(rand.nextInt(4) == 3){
|
|
||||||
world.spawnParticle(EnumParticleTypes.FLAME, d0-d4, d1, d2+d4, 0.0D, ySpeed, 0.0D, new int[0]);
|
|
||||||
world.spawnParticle(EnumParticleTypes.FLAME, d0-d4, d1, d2-d4, 0.0D, ySpeed, 0.0D, new int[0]);
|
|
||||||
}
|
|
||||||
if(rand.nextInt(4) == 4){
|
|
||||||
world.spawnParticle(EnumParticleTypes.FLAME, d0-d4, d1, d2-d4, 0.0D, ySpeed, 0.0D, new int[0]);
|
|
||||||
world.spawnParticle(EnumParticleTypes.FLAME, d0+d4, d1, d2+d4, 0.0D, ySpeed, 0.0D, new int[0]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
package nmd.primal.forgecraft.items;
|
|
||||||
|
|
||||||
import nmd.primal.forgecraft.ModInfo;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Created by mminaie on 1/7/17.
|
|
||||||
*/
|
|
||||||
public class ItemBellowsHandle extends BaseItem {
|
|
||||||
|
|
||||||
public ItemBellowsHandle() {
|
|
||||||
setUnlocalizedName(ModInfo.ForgecraftItems.BELLOWSHANDLE.getUnlocalizedName());
|
|
||||||
setRegistryName(ModInfo.ForgecraftItems.BELLOWSHANDLE.getRegistryName());
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
package nmd.primal.forgecraft.items;
|
|
||||||
|
|
||||||
import nmd.primal.forgecraft.ModInfo;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Created by mminaie on 1/22/17.
|
|
||||||
*/
|
|
||||||
public class ItemSoftCrucible extends BaseItem {
|
|
||||||
|
|
||||||
public ItemSoftCrucible() {
|
|
||||||
setUnlocalizedName(ModInfo.ForgecraftItems.SOFTCRUCIBLE.getUnlocalizedName());
|
|
||||||
setRegistryName(ModInfo.ForgecraftItems.SOFTCRUCIBLE.getRegistryName());
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,86 +0,0 @@
|
|||||||
package nmd.primal.forgecraft.items.tools;
|
|
||||||
|
|
||||||
import com.google.common.collect.Sets;
|
|
||||||
import net.minecraft.block.Block;
|
|
||||||
import net.minecraft.block.material.Material;
|
|
||||||
import net.minecraft.block.state.IBlockState;
|
|
||||||
import net.minecraft.init.Blocks;
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
|
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Created by mminaie on 3/29/17.
|
|
||||||
*/
|
|
||||||
public abstract class BasePickaxe extends BaseTool
|
|
||||||
{
|
|
||||||
private static final Set<Block> EFFECTIVE_ON = Sets.newHashSet(new Block[] {Blocks.ACTIVATOR_RAIL, Blocks.COAL_ORE, Blocks.COBBLESTONE, Blocks.DETECTOR_RAIL, Blocks.DIAMOND_BLOCK, Blocks.DIAMOND_ORE, Blocks.DOUBLE_STONE_SLAB, Blocks.GOLDEN_RAIL, Blocks.GOLD_BLOCK, Blocks.GOLD_ORE, Blocks.ICE, Blocks.IRON_BLOCK, Blocks.IRON_ORE, Blocks.LAPIS_BLOCK, Blocks.LAPIS_ORE, Blocks.LIT_REDSTONE_ORE, Blocks.MOSSY_COBBLESTONE, Blocks.NETHERRACK, Blocks.PACKED_ICE, Blocks.RAIL, Blocks.REDSTONE_ORE, Blocks.SANDSTONE, Blocks.RED_SANDSTONE, Blocks.STONE, Blocks.STONE_SLAB, Blocks.STONE_BUTTON, Blocks.STONE_PRESSURE_PLATE});
|
|
||||||
|
|
||||||
protected BasePickaxe(ForgeToolMaterial material)
|
|
||||||
{
|
|
||||||
super(1.0F, -2.8F, material, EFFECTIVE_ON);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Check whether this Item can harvest the given Block
|
|
||||||
*/
|
|
||||||
public boolean canHarvestBlock(IBlockState blockIn)
|
|
||||||
{
|
|
||||||
Block block = blockIn.getBlock();
|
|
||||||
|
|
||||||
if (block == Blocks.OBSIDIAN)
|
|
||||||
{
|
|
||||||
return this.toolMaterial.getHarvestLevel() == 3;
|
|
||||||
}
|
|
||||||
else if (block != Blocks.DIAMOND_BLOCK && block != Blocks.DIAMOND_ORE)
|
|
||||||
{
|
|
||||||
if (block != Blocks.EMERALD_ORE && block != Blocks.EMERALD_BLOCK)
|
|
||||||
{
|
|
||||||
if (block != Blocks.GOLD_BLOCK && block != Blocks.GOLD_ORE)
|
|
||||||
{
|
|
||||||
if (block != Blocks.IRON_BLOCK && block != Blocks.IRON_ORE)
|
|
||||||
{
|
|
||||||
if (block != Blocks.LAPIS_BLOCK && block != Blocks.LAPIS_ORE)
|
|
||||||
{
|
|
||||||
if (block != Blocks.REDSTONE_ORE && block != Blocks.LIT_REDSTONE_ORE)
|
|
||||||
{
|
|
||||||
Material material = blockIn.getMaterial();
|
|
||||||
return material == Material.ROCK ? true : (material == Material.IRON ? true : material == Material.ANVIL);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return this.toolMaterial.getHarvestLevel() >= 2;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return this.toolMaterial.getHarvestLevel() >= 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return this.toolMaterial.getHarvestLevel() >= 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return this.toolMaterial.getHarvestLevel() >= 2;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return this.toolMaterial.getHarvestLevel() >= 2;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return this.toolMaterial.getHarvestLevel() >= 2;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public float getStrVsBlock(ItemStack stack, IBlockState state)
|
|
||||||
{
|
|
||||||
Material material = state.getMaterial();
|
|
||||||
return material != Material.IRON && material != Material.ANVIL && material != Material.ROCK ? super.getStrVsBlock(stack, state) : this.efficiencyOnProperMaterial;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,262 +0,0 @@
|
|||||||
package nmd.primal.forgecraft.items.tools;
|
|
||||||
|
|
||||||
import com.google.common.collect.Multimap;
|
|
||||||
import net.minecraft.block.Block;
|
|
||||||
import net.minecraft.block.state.IBlockState;
|
|
||||||
import net.minecraft.creativetab.CreativeTabs;
|
|
||||||
import net.minecraft.entity.EntityLivingBase;
|
|
||||||
import net.minecraft.entity.SharedMonsterAttributes;
|
|
||||||
import net.minecraft.entity.ai.attributes.AttributeModifier;
|
|
||||||
import net.minecraft.inventory.EntityEquipmentSlot;
|
|
||||||
import net.minecraft.item.Item;
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraft.util.math.BlockPos;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
import net.minecraftforge.fml.relauncher.Side;
|
|
||||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
|
||||||
|
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Created by mminaie on 3/29/17.
|
|
||||||
*/
|
|
||||||
public abstract class BaseTool extends Item {
|
|
||||||
|
|
||||||
private final Set<Block> effectiveBlocks;
|
|
||||||
protected float efficiencyOnProperMaterial;
|
|
||||||
/** Damage versus entities. */
|
|
||||||
protected float damageVsEntity;
|
|
||||||
protected float attackSpeed;
|
|
||||||
/** The material this tool is made from. */
|
|
||||||
protected ForgeToolMaterial toolMaterial;
|
|
||||||
|
|
||||||
protected BaseTool(float attackDamageIn, float attackSpeedIn, ForgeToolMaterial materialIn, Set<Block> effectiveBlocksIn)
|
|
||||||
{
|
|
||||||
this.efficiencyOnProperMaterial = 4.0F;
|
|
||||||
this.toolMaterial = materialIn;
|
|
||||||
this.effectiveBlocks = effectiveBlocksIn;
|
|
||||||
this.maxStackSize = 1;
|
|
||||||
this.setMaxDamage(materialIn.getMaxUses());
|
|
||||||
this.efficiencyOnProperMaterial = materialIn.getEfficiencyOnProperMaterial();
|
|
||||||
this.damageVsEntity = attackDamageIn + materialIn.getDamageVsEntity();
|
|
||||||
this.attackSpeed = attackSpeedIn;
|
|
||||||
this.setCreativeTab(CreativeTabs.TOOLS);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected BaseTool(ForgeToolMaterial materialIn, Set<Block> effectiveBlocksIn)
|
|
||||||
{
|
|
||||||
this(0.0F, 0.0F, materialIn, effectiveBlocksIn);
|
|
||||||
}
|
|
||||||
|
|
||||||
public float getStrVsBlock(ItemStack stack, IBlockState state)
|
|
||||||
{
|
|
||||||
for (String type : getToolClasses(stack))
|
|
||||||
{
|
|
||||||
if (state.getBlock().isToolEffective(type, state))
|
|
||||||
return efficiencyOnProperMaterial;
|
|
||||||
}
|
|
||||||
return this.effectiveBlocks.contains(state.getBlock()) ? this.efficiencyOnProperMaterial : 1.0F;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public static enum ForgeToolMaterial {
|
|
||||||
IRON(2, 250, 6.0F, 2.0F, 14);
|
|
||||||
//DIAMOND(3, 1561, 8.0F, 3.0F, 10),
|
|
||||||
//GOLD(0, 32, 12.0F, 0.0F, 22);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The level of material this tool can harvest (3 = DIAMOND, 2 = IRON, 1 = STONE, 0 = WOOD/GOLD)
|
|
||||||
*/
|
|
||||||
private int harvestLevel;
|
|
||||||
/**
|
|
||||||
* The number of uses this material allows. (wood = 59, stone = 131, iron = 250, diamond = 1561, gold = 32)
|
|
||||||
*/
|
|
||||||
private int maxUses;
|
|
||||||
/**
|
|
||||||
* The strength of this tool material against blocks which it is effective against.
|
|
||||||
*/
|
|
||||||
private float efficiencyOnProperMaterial;
|
|
||||||
/**
|
|
||||||
* Damage versus entities.
|
|
||||||
*/
|
|
||||||
private float damageVsEntity;
|
|
||||||
/**
|
|
||||||
* Defines the natural enchantability factor of the material.
|
|
||||||
*/
|
|
||||||
private int enchantability;
|
|
||||||
//Added by forge for custom Tool materials.
|
|
||||||
|
|
||||||
ForgeToolMaterial(int harvestLevel, int maxUses, float efficiency, float damageVsEntity, int enchantability) {
|
|
||||||
this.harvestLevel = harvestLevel;
|
|
||||||
this.maxUses = maxUses;
|
|
||||||
this.efficiencyOnProperMaterial = efficiency;
|
|
||||||
this.damageVsEntity = damageVsEntity;
|
|
||||||
this.enchantability = enchantability;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The number of uses this material allows. (wood = 59, stone = 131, iron = 250, diamond = 1561, gold = 32)
|
|
||||||
*/
|
|
||||||
public int getMaxUses() {
|
|
||||||
return this.maxUses;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setMaxUses(int maxUses) {
|
|
||||||
this.maxUses = maxUses;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The strength of this tool material against blocks which it is effective against.
|
|
||||||
*/
|
|
||||||
public float getEfficiencyOnProperMaterial() {
|
|
||||||
return this.efficiencyOnProperMaterial;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setEfficiencyOnProperMaterial(float efficiencyOnProperMaterial) {
|
|
||||||
this.efficiencyOnProperMaterial = efficiencyOnProperMaterial;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the damage against a given entity.
|
|
||||||
*/
|
|
||||||
public float getDamageVsEntity() {
|
|
||||||
return this.damageVsEntity;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setDamageVsEntity(float damageVsEntity) {
|
|
||||||
this.damageVsEntity = damageVsEntity;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The level of material this tool can harvest (3 = DIAMOND, 2 = IRON, 1 = STONE, 0 = IRON/GOLD)
|
|
||||||
*/
|
|
||||||
public int getHarvestLevel() {
|
|
||||||
return this.harvestLevel;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setHarvestLevel(int harvestLevel) {
|
|
||||||
this.harvestLevel = harvestLevel;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Return the natural enchantability factor of the material.
|
|
||||||
*/
|
|
||||||
public int getEnchantability() {
|
|
||||||
return this.enchantability;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setEnchantability(int enchantability) {
|
|
||||||
this.enchantability = enchantability;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Current implementations of this method in child classes do not use the entry argument beside ev. They just raise
|
|
||||||
* the damage on the stack.
|
|
||||||
*/
|
|
||||||
public boolean hitEntity(ItemStack stack, EntityLivingBase target, EntityLivingBase attacker)
|
|
||||||
{
|
|
||||||
stack.damageItem(2, attacker);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Called when a Block is destroyed using this Item. Return true to trigger the "Use Item" statistic.
|
|
||||||
*/
|
|
||||||
public boolean onBlockDestroyed(ItemStack stack, World worldIn, IBlockState state, BlockPos pos, EntityLivingBase entityLiving)
|
|
||||||
{
|
|
||||||
if (!worldIn.isRemote && (double)state.getBlockHardness(worldIn, pos) != 0.0D)
|
|
||||||
{
|
|
||||||
stack.damageItem(1, entityLiving);
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns True is the item is renderer in full 3D when hold.
|
|
||||||
*/
|
|
||||||
@SideOnly(Side.CLIENT)
|
|
||||||
public boolean isFull3D()
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public ForgeToolMaterial getToolMaterial()
|
|
||||||
{
|
|
||||||
return this.toolMaterial;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Return the enchantability factor of the item, most of the time is based on material.
|
|
||||||
*/
|
|
||||||
public int getItemEnchantability()
|
|
||||||
{
|
|
||||||
return this.toolMaterial.getEnchantability();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Return the name for this tool's material.
|
|
||||||
*/
|
|
||||||
public String getToolMaterialName()
|
|
||||||
{
|
|
||||||
return this.toolMaterial.toString();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Return whether this item is repairable in an anvil.
|
|
||||||
*/
|
|
||||||
public boolean getIsRepairable(ItemStack toRepair, ItemStack repair)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Multimap<String, AttributeModifier> getItemAttributeModifiers(EntityEquipmentSlot equipmentSlot)
|
|
||||||
{
|
|
||||||
Multimap<String, AttributeModifier> multimap = super.getItemAttributeModifiers(equipmentSlot);
|
|
||||||
|
|
||||||
if (equipmentSlot == EntityEquipmentSlot.MAINHAND)
|
|
||||||
{
|
|
||||||
multimap.put(SharedMonsterAttributes.ATTACK_DAMAGE.getName(), new AttributeModifier(ATTACK_DAMAGE_MODIFIER, "Tool modifier", (double)this.damageVsEntity, 0));
|
|
||||||
multimap.put(SharedMonsterAttributes.ATTACK_SPEED.getName(), new AttributeModifier(ATTACK_SPEED_MODIFIER, "Tool modifier", (double)this.attackSpeed, 0));
|
|
||||||
}
|
|
||||||
|
|
||||||
return multimap;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*===================================== FORGE START =================================*/
|
|
||||||
@javax.annotation.Nullable
|
|
||||||
private String toolClass;
|
|
||||||
@Override
|
|
||||||
public int getHarvestLevel(ItemStack stack, String toolClass, @javax.annotation.Nullable net.minecraft.entity.player.EntityPlayer player, @javax.annotation.Nullable IBlockState blockState)
|
|
||||||
{
|
|
||||||
int level = super.getHarvestLevel(stack, toolClass, player, blockState);
|
|
||||||
if (level == -1 && toolClass.equals(this.toolClass))
|
|
||||||
{
|
|
||||||
return this.toolMaterial.getHarvestLevel();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return level;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Set<String> getToolClasses(ItemStack stack)
|
|
||||||
{
|
|
||||||
return toolClass != null ? com.google.common.collect.ImmutableSet.of(toolClass) : super.getToolClasses(stack);
|
|
||||||
}
|
|
||||||
/*===================================== FORGE END =================================*/
|
|
||||||
}
|
|
||||||
@@ -1,43 +0,0 @@
|
|||||||
package nmd.primal.forgecraft.items.weapons;
|
|
||||||
|
|
||||||
import net.minecraft.item.Item;
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraft.item.ItemSword;
|
|
||||||
import net.minecraftforge.fml.relauncher.Side;
|
|
||||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
|
||||||
import nmd.primal.forgecraft.ModInfo;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Created by mminaie on 3/23/17.
|
|
||||||
*/
|
|
||||||
public class CustomSword extends ItemSword {
|
|
||||||
|
|
||||||
public CustomSword(String name, Item.ToolMaterial material) {
|
|
||||||
super(material);
|
|
||||||
this.setUnlocalizedName(name);
|
|
||||||
this.setRegistryName(name);
|
|
||||||
this.setCreativeTab(ModInfo.TAB_FORGECRAFT);
|
|
||||||
this.setMaxStackSize(1);
|
|
||||||
this.setNoRepair();
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
|
||||||
@Override
|
|
||||||
public boolean hasEffect(ItemStack stack)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isRepairable()
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getItemEnchantability(ItemStack stack)
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
{
|
|
||||||
"variants": {
|
|
||||||
"active=false,covered=false,facing=north": { "model": "forgecraft:bloomery" },
|
|
||||||
"active=false,covered=false,facing=east": { "model": "forgecraft:bloomery", "y": 90 },
|
|
||||||
"active=false,covered=false,facing=south": { "model": "forgecraft:bloomery", "y": 180 },
|
|
||||||
"active=false,covered=false,facing=west": { "model": "forgecraft:bloomery", "y": 270 },
|
|
||||||
"active=true,covered=false,facing=north": { "model": "forgecraft:bloomery_lit" },
|
|
||||||
"active=true,covered=false,facing=east": { "model": "forgecraft:bloomery_lit", "y": 90 },
|
|
||||||
"active=true,covered=false,facing=south": { "model": "forgecraft:bloomery_lit", "y": 180 },
|
|
||||||
"active=true,covered=false,facing=west": { "model": "forgecraft:bloomery_lit", "y": 270 },
|
|
||||||
"active=true,covered=true,facing=north": { "model": "forgecraft:bloomery_lit_covered" },
|
|
||||||
"active=true,covered=true,facing=east": { "model": "forgecraft:bloomery_lit_covered", "y": 90 },
|
|
||||||
"active=true,covered=true,facing=south": { "model": "forgecraft:bloomery_lit_covered", "y": 180 },
|
|
||||||
"active=true,covered=true,facing=west": { "model": "forgecraft:bloomery_lit_covered", "y": 270 },
|
|
||||||
"active=false,covered=true,facing=north": { "model": "forgecraft:bloomery_covered" },
|
|
||||||
"active=false,covered=true,facing=east": { "model": "forgecraft:bloomery_covered", "y": 90 },
|
|
||||||
"active=false,covered=true,facing=south": { "model": "forgecraft:bloomery_covered", "y": 180 },
|
|
||||||
"active=false,covered=true,facing=west": { "model": "forgecraft:bloomery_covered", "y": 270 }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
{
|
|
||||||
"variants": {
|
|
||||||
"active=false,facing=north": { "model": "forgecraft:firebox" },
|
|
||||||
"active=false,facing=east": { "model": "forgecraft:firebox", "y": 90 },
|
|
||||||
"active=false,facing=south": { "model": "forgecraft:firebox", "y": 180 },
|
|
||||||
"active=false,facing=west": { "model": "forgecraft:firebox", "y": 270 },
|
|
||||||
"active=true,facing=north": { "model": "forgecraft:firebox_lit" },
|
|
||||||
"active=true,facing=east": { "model": "forgecraft:firebox_lit", "y": 90 },
|
|
||||||
"active=true,facing=south": { "model": "forgecraft:firebox_lit", "y": 180 },
|
|
||||||
"active=true,facing=west": { "model": "forgecraft:firebox_lit", "y": 270 }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,35 +0,0 @@
|
|||||||
itemGroup.forgecraft=ForgeCraft
|
|
||||||
|
|
||||||
|
|
||||||
tile.firebox.name=Forge
|
|
||||||
tile.bloomery.name=Bloomery
|
|
||||||
tile.stoneanvil.name=Stone Anvil
|
|
||||||
tile.pistonbellows.name=Wooden Piston Bellows
|
|
||||||
tile.emptycrucible.name=Empty Crucible
|
|
||||||
tile.emptycruciblehit.name=Hot Empty Crucible
|
|
||||||
tile.emptycruciblecracked.name= Cracked Empty Crucible
|
|
||||||
tile.emptycruciblecrackedhot.name=Cracked Hot Empty Crucible
|
|
||||||
tile.rawironcrucible.name=Filled Iron Crucible
|
|
||||||
tile.hotironcrucible.name=Hot Iron Crucible
|
|
||||||
tile.hotcookedironcrucible.name=Hot Cooked Iron Crucible
|
|
||||||
tile.coolironcrucible.name=Cool Iron Crucible
|
|
||||||
tile.failedironcrucible.name=Failed Iron Crucible
|
|
||||||
tile.failedironcruciblehot.name=Failed Iron Crucible Hot
|
|
||||||
tile.ironball.name=Raw Iron Ingot
|
|
||||||
tile.ironchunk.name=Iron Chunk
|
|
||||||
|
|
||||||
item.bellowshandle.name=Bellows Handle
|
|
||||||
item.softcrucible.name=Soft Crucible
|
|
||||||
item.stonetongs.name=Stone Tongs
|
|
||||||
item.forgehammer.name=Forge Hammer
|
|
||||||
item.ironingothot.name=Iron Ingot Hot
|
|
||||||
item.ironchunkhot.name=Iron Chunk Hot
|
|
||||||
item.ironpickaxehead.name=Iron Pickaxe Head
|
|
||||||
item.ironaxehead.name=Iron Axe Head
|
|
||||||
item.ironshovelhead.name=Iron Shovel Head
|
|
||||||
item.ironhoehead.name=Iron Hoe Head
|
|
||||||
item.ironpickaxe.name=Iron Pickaxe
|
|
||||||
item.ironaxe.name=Iron Axe
|
|
||||||
item.ironshovel.name=Iron Shovel
|
|
||||||
item.ironhoe.name=Iron Hoe
|
|
||||||
item.ironsword.name=Iron Sword
|
|
||||||
@@ -1,200 +0,0 @@
|
|||||||
{
|
|
||||||
"__comment": "Designed by Kitsushadow with Cubik Studio - https://cubik.studio",
|
|
||||||
"textures": {
|
|
||||||
"particle": "blocks/e_particle",
|
|
||||||
"texture": "blocks/e_texture",
|
|
||||||
"texture1": "blocks/checker_test",
|
|
||||||
"texture2": "blocks/e_texture"
|
|
||||||
},
|
|
||||||
"elements": [
|
|
||||||
{
|
|
||||||
"__comment": "Cube1",
|
|
||||||
"from": [ 0, 0, 0 ],
|
|
||||||
"to": [ 6, 2, 16 ],
|
|
||||||
"faces": {
|
|
||||||
"down": { "uv": [ 0, 0, 6, 16 ], "texture": "#texture" },
|
|
||||||
"up": { "uv": [ 0, 0, 6, 16 ], "texture": "#texture" },
|
|
||||||
"north": { "uv": [ 10, 14, 16, 16 ], "texture": "#texture" },
|
|
||||||
"south": { "uv": [ 0, 14, 6, 16 ], "texture": "#texture" },
|
|
||||||
"west": { "uv": [ 0, 14, 16, 16 ], "texture": "#texture" }
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__comment": "Cube2",
|
|
||||||
"from": [ 6, 0, 2 ],
|
|
||||||
"to": [ 10, 2, 16 ],
|
|
||||||
"faces": {
|
|
||||||
"down": { "uv": [ 6, 0, 10, 14 ], "texture": "#texture" },
|
|
||||||
"up": { "uv": [ 6, 2, 10, 16 ], "texture": "#texture" },
|
|
||||||
"north": { "uv": [ 6, 14, 10, 16 ], "texture": "#texture" },
|
|
||||||
"south": { "uv": [ 6, 14, 10, 16 ], "texture": "#texture" }
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__comment": "Cube3",
|
|
||||||
"from": [ 10, 0, 0 ],
|
|
||||||
"to": [ 16, 2, 16 ],
|
|
||||||
"faces": {
|
|
||||||
"down": { "uv": [ 10, 0, 16, 16 ], "texture": "#texture" },
|
|
||||||
"up": { "uv": [ 10, 0, 16, 16 ], "texture": "#texture" },
|
|
||||||
"north": { "uv": [ 0, 14, 6, 16 ], "texture": "#texture" },
|
|
||||||
"south": { "uv": [ 10, 14, 16, 16 ], "texture": "#texture" },
|
|
||||||
"east": { "uv": [ 0, 14, 16, 16 ], "texture": "#texture" }
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__comment": "PlaneX5",
|
|
||||||
"from": [ 6, 0, 0 ],
|
|
||||||
"to": [ 6.001, 2, 2 ],
|
|
||||||
"faces": {
|
|
||||||
"east": { "uv": [ 14, 14, 16, 16 ], "texture": "#texture" }
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__comment": "PlaneX6",
|
|
||||||
"from": [ 10, 0, 0 ],
|
|
||||||
"to": [ 10.001, 2, 2 ],
|
|
||||||
"faces": {
|
|
||||||
"west": { "uv": [ 0, 14, 2, 16 ], "texture": "#texture" }
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__comment": "Cube7",
|
|
||||||
"from": [ 0, 2, 8 ],
|
|
||||||
"to": [ 2, 4, 15 ],
|
|
||||||
"faces": {
|
|
||||||
"down": { "uv": [ 0, 1, 2, 8 ], "texture": "#texture" },
|
|
||||||
"up": { "uv": [ 0, 8, 2, 15 ], "texture": "#texture" },
|
|
||||||
"north": { "uv": [ 14, 12, 16, 14 ], "texture": "#texture" },
|
|
||||||
"south": { "uv": [ 0, 12, 2, 14 ], "texture": "#texture" },
|
|
||||||
"west": { "uv": [ 8, 12, 15, 14 ], "texture": "#texture" },
|
|
||||||
"east": { "uv": [ 1, 12, 8, 14 ], "texture": "#texture" }
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__comment": "Cube8",
|
|
||||||
"from": [ 0, 4, 9 ],
|
|
||||||
"to": [ 2, 6, 14 ],
|
|
||||||
"faces": {
|
|
||||||
"down": { "uv": [ 0, 2, 2, 7 ], "texture": "#texture" },
|
|
||||||
"up": { "uv": [ 0, 9, 2, 14 ], "texture": "#texture" },
|
|
||||||
"north": { "uv": [ 14, 10, 16, 12 ], "texture": "#texture" },
|
|
||||||
"south": { "uv": [ 0, 10, 2, 12 ], "texture": "#texture" },
|
|
||||||
"west": { "uv": [ 9, 10, 14, 12 ], "texture": "#texture" },
|
|
||||||
"east": { "uv": [ 2, 10, 7, 12 ], "texture": "#texture" }
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__comment": "Cube9",
|
|
||||||
"from": [ 0, 6, 10 ],
|
|
||||||
"to": [ 2, 8, 13 ],
|
|
||||||
"faces": {
|
|
||||||
"down": { "uv": [ 0, 3, 2, 6 ], "texture": "#texture" },
|
|
||||||
"up": { "uv": [ 0, 10, 2, 13 ], "texture": "#texture" },
|
|
||||||
"north": { "uv": [ 14, 8, 16, 10 ], "texture": "#texture" },
|
|
||||||
"south": { "uv": [ 0, 8, 2, 10 ], "texture": "#texture" },
|
|
||||||
"west": { "uv": [ 10, 8, 13, 10 ], "texture": "#texture" },
|
|
||||||
"east": { "uv": [ 3, 8, 6, 10 ], "texture": "#texture" }
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__comment": "Cube7",
|
|
||||||
"from": [ 14, 2, 8 ],
|
|
||||||
"to": [ 16, 4, 15 ],
|
|
||||||
"faces": {
|
|
||||||
"down": { "uv": [ 0, 0, 2, 7 ], "texture": "#texture" },
|
|
||||||
"up": { "uv": [ 0, 9, 2, 16 ], "texture": "#texture" },
|
|
||||||
"north": { "uv": [ 14, 12, 16, 14 ], "texture": "#texture" },
|
|
||||||
"south": { "uv": [ 0, 12, 2, 14 ], "texture": "#texture" },
|
|
||||||
"west": { "uv": [ 9, 12, 16, 14 ], "texture": "#texture" },
|
|
||||||
"east": { "uv": [ 0, 12, 7, 14 ], "texture": "#texture" }
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__comment": "Cube8",
|
|
||||||
"from": [ 14, 4, 9 ],
|
|
||||||
"to": [ 16, 6, 14 ],
|
|
||||||
"faces": {
|
|
||||||
"down": { "uv": [ 0, 1, 2, 6 ], "texture": "#texture" },
|
|
||||||
"up": { "uv": [ 0, 10, 2, 15 ], "texture": "#texture" },
|
|
||||||
"north": { "uv": [ 14, 10, 16, 12 ], "texture": "#texture" },
|
|
||||||
"south": { "uv": [ 0, 10, 2, 12 ], "texture": "#texture" },
|
|
||||||
"west": { "uv": [ 10, 10, 15, 12 ], "texture": "#texture" },
|
|
||||||
"east": { "uv": [ 1, 10, 6, 12 ], "texture": "#texture" }
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__comment": "Cube9",
|
|
||||||
"from": [ 14, 6, 10 ],
|
|
||||||
"to": [ 16, 8, 13 ],
|
|
||||||
"faces": {
|
|
||||||
"down": { "uv": [ 0, 2, 2, 5 ], "texture": "#texture" },
|
|
||||||
"up": { "uv": [ 0, 11, 2, 14 ], "texture": "#texture" },
|
|
||||||
"north": { "uv": [ 14, 8, 16, 10 ], "texture": "#texture" },
|
|
||||||
"south": { "uv": [ 0, 8, 2, 10 ], "texture": "#texture" },
|
|
||||||
"west": { "uv": [ 11, 8, 14, 10 ], "texture": "#texture" },
|
|
||||||
"east": { "uv": [ 2, 8, 5, 10 ], "texture": "#texture" }
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__comment": "Cube13",
|
|
||||||
"from": [ 2, 6.5, 10.5 ],
|
|
||||||
"to": [ 14, 8, 12 ],
|
|
||||||
"faces": {
|
|
||||||
"down": { "uv": [ 2, 1, 14, 3 ], "texture": "#texture1" },
|
|
||||||
"up": { "uv": [ 2, 13, 14, 15 ], "texture": "#texture1" },
|
|
||||||
"north": { "uv": [ 2, 8, 14, 10 ], "texture": "#texture1" },
|
|
||||||
"south": { "uv": [ 2, 8, 14, 10 ], "texture": "#texture1" }
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__comment": "Cube14",
|
|
||||||
"from": [ 2, 5.5, 12.5 ],
|
|
||||||
"to": [ 3, 11.5, 13.5 ],
|
|
||||||
"faces": {
|
|
||||||
"down": { "uv": [ 15, 2.5, 16, 3.5 ], "texture": "#texture" },
|
|
||||||
"up": { "uv": [ 14, 0, 15, 1 ], "texture": "#texture" },
|
|
||||||
"north": { "uv": [ 11.5, 0, 12.5, 6 ], "texture": "#texture" },
|
|
||||||
"south": { "uv": [ 13, 0, 14, 6 ], "texture": "#texture" },
|
|
||||||
"west": { "uv": [ 14, 0, 15, 6 ], "texture": "#texture" },
|
|
||||||
"east": { "uv": [ 15, 0, 16, 6 ], "texture": "#texture" }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"display": {
|
|
||||||
"thirdperson_righthand": {
|
|
||||||
"rotation": [ 75, 45, 0 ],
|
|
||||||
"translation": [ 0, 2.5, 0 ],
|
|
||||||
"scale": [ 0.375, 0.375, 0.375 ]
|
|
||||||
},
|
|
||||||
"thirdperson_lefthand": {
|
|
||||||
"rotation": [ 75, 45, 0 ],
|
|
||||||
"translation": [ 0, 2.5, 0 ],
|
|
||||||
"scale": [ 0.375, 0.375, 0.375 ]
|
|
||||||
},
|
|
||||||
"firstperson_righthand": {
|
|
||||||
"rotation": [ 0, 45, 0 ],
|
|
||||||
"translation": [ 0, 1, 0 ],
|
|
||||||
"scale": [ 0.4, 0.4, 0.4 ]
|
|
||||||
},
|
|
||||||
"firstperson_lefthand": {
|
|
||||||
"rotation": [ 0, 45, 0 ],
|
|
||||||
"translation": [ 0, 1, 0 ],
|
|
||||||
"scale": [ 0.4, 0.4, 0.4 ]
|
|
||||||
},
|
|
||||||
"gui": {
|
|
||||||
"rotation": [ 30, 225, 0 ],
|
|
||||||
"translation": [ 0, 2.5, 0 ],
|
|
||||||
"scale": [ 0.625, 0.625, 0.625 ]
|
|
||||||
},
|
|
||||||
"ground": {
|
|
||||||
"translation": [ 0, 1, 0 ],
|
|
||||||
"scale": [ 0.25, 0.25, 0.25 ]
|
|
||||||
},
|
|
||||||
"fixed": {
|
|
||||||
"rotation": [ -90, -90, 0 ],
|
|
||||||
"translation": [ 0, 0, -3 ],
|
|
||||||
"scale": [ 0.5, 0.5, 0.5 ]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,234 +0,0 @@
|
|||||||
{
|
|
||||||
"__comment": "Designed by Kitsushadow with Cubik Studio - https://cubik.studio",
|
|
||||||
"textures": {
|
|
||||||
"particle": "forgecraft:blocks/brick",
|
|
||||||
"texture": "forgecraft:blocks/brick",
|
|
||||||
"texture1": "forgecraft:blocks/brick_lit",
|
|
||||||
"texture2": "forgecraft:blocks/stone_slab",
|
|
||||||
"texture3": "forgecraft:blocks/stone_slab_hot"
|
|
||||||
},
|
|
||||||
"elements": [
|
|
||||||
{
|
|
||||||
"__comment": "Cube1",
|
|
||||||
"from": [ 2, 0, 2 ],
|
|
||||||
"to": [ 14, 1, 14 ],
|
|
||||||
"faces": {
|
|
||||||
"down": { "uv": [ 2, 2, 14, 14 ], "texture": "#texture" },
|
|
||||||
"up": { "uv": [ 2, 2, 14, 14 ], "texture": "#texture" },
|
|
||||||
"north": { "uv": [ 2, 15, 14, 16 ], "texture": "#texture" },
|
|
||||||
"south": { "uv": [ 2, 15, 14, 16 ], "texture": "#texture" },
|
|
||||||
"west": { "uv": [ 2, 15, 14, 16 ], "texture": "#texture" },
|
|
||||||
"east": { "uv": [ 2, 15, 14, 16 ], "texture": "#texture" }
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__comment": "Cube3",
|
|
||||||
"from": [ 0, 0, 3 ],
|
|
||||||
"to": [ 2, 14, 13 ],
|
|
||||||
"faces": {
|
|
||||||
"down": { "uv": [ 0, 3, 2, 13 ], "texture": "#texture" },
|
|
||||||
"up": { "uv": [ 3, 1, 13, 3 ], "texture": "#texture", "rotation": 90 },
|
|
||||||
"north": { "uv": [ 14, 2, 16, 16 ], "texture": "#texture" },
|
|
||||||
"south": { "uv": [ 0, 2, 2, 16 ], "texture": "#texture" },
|
|
||||||
"west": { "uv": [ 3, 2, 13, 16 ], "texture": "#texture" },
|
|
||||||
"east": { "uv": [ 2, 2, 12, 16 ], "texture": "#texture" }
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__comment": "Cube4",
|
|
||||||
"from": [ 3, 0, 14 ],
|
|
||||||
"to": [ 13, 1, 16 ],
|
|
||||||
"faces": {
|
|
||||||
"down": { "uv": [ 3, 0, 13, 2 ], "texture": "#texture" },
|
|
||||||
"up": { "uv": [ 3, 14, 13, 16 ], "texture": "#texture" },
|
|
||||||
"north": { "uv": [ 3, 15, 13, 16 ], "texture": "#texture" },
|
|
||||||
"south": { "uv": [ 3, 15, 13, 16 ], "texture": "#texture" },
|
|
||||||
"west": { "uv": [ 14, 15, 16, 16 ], "texture": "#texture" },
|
|
||||||
"east": { "uv": [ 0, 15, 2, 16 ], "texture": "#texture" }
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__comment": "Cube6",
|
|
||||||
"from": [ 3, 0, 0 ],
|
|
||||||
"to": [ 13, 14, 2 ],
|
|
||||||
"faces": {
|
|
||||||
"down": { "uv": [ 3, 14, 13, 16 ], "texture": "#texture" },
|
|
||||||
"up": { "uv": [ 2, 0, 12, 2 ], "texture": "#texture" },
|
|
||||||
"north": { "uv": [ 3, 2, 13, 16 ], "texture": "#texture" },
|
|
||||||
"south": { "uv": [ 2, 2, 12, 16 ], "texture": "#texture" },
|
|
||||||
"west": { "uv": [ 0, 2, 2, 16 ], "texture": "#texture" },
|
|
||||||
"east": { "uv": [ 14, 2, 16, 16 ], "texture": "#texture" }
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__comment": "Cube8",
|
|
||||||
"from": [ 14, 0, 3 ],
|
|
||||||
"to": [ 16, 14, 13 ],
|
|
||||||
"faces": {
|
|
||||||
"down": { "uv": [ 14, 3, 16, 13 ], "texture": "#texture" },
|
|
||||||
"up": { "uv": [ 2, 9, 12, 11 ], "texture": "#texture", "rotation": 90 },
|
|
||||||
"north": { "uv": [ 0, 2, 2, 16 ], "texture": "#texture" },
|
|
||||||
"south": { "uv": [ 14, 2, 16, 16 ], "texture": "#texture" },
|
|
||||||
"west": { "uv": [ 2, 2, 12, 16 ], "texture": "#texture" },
|
|
||||||
"east": { "uv": [ 3, 2, 13, 16 ], "texture": "#texture" }
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__comment": "Cube14",
|
|
||||||
"from": [ 3, 1, 14 ],
|
|
||||||
"to": [ 4, 3, 16 ],
|
|
||||||
"faces": {
|
|
||||||
"down": { "uv": [ 3, 0, 4, 2 ], "texture": "#texture" },
|
|
||||||
"up": { "uv": [ 3, 14, 4, 16 ], "texture": "#texture" },
|
|
||||||
"north": { "uv": [ 12, 13, 13, 15 ], "texture": "#texture" },
|
|
||||||
"south": { "uv": [ 3, 13, 4, 15 ], "texture": "#texture" },
|
|
||||||
"west": { "uv": [ 14, 13, 16, 15 ], "texture": "#texture" },
|
|
||||||
"east": { "uv": [ 0, 13, 2, 15 ], "texture": "#texture" }
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__comment": "Cube14",
|
|
||||||
"from": [ 12, 1, 14 ],
|
|
||||||
"to": [ 13, 3, 16 ],
|
|
||||||
"faces": {
|
|
||||||
"down": { "uv": [ 3, 0, 4, 1 ], "texture": "#texture" },
|
|
||||||
"up": { "uv": [ 3, 15, 4, 16 ], "texture": "#texture" },
|
|
||||||
"north": { "uv": [ 12, 11, 13, 15 ], "texture": "#texture" },
|
|
||||||
"south": { "uv": [ 3, 11, 4, 15 ], "texture": "#texture" },
|
|
||||||
"west": { "uv": [ 15, 11, 16, 15 ], "texture": "#texture" },
|
|
||||||
"east": { "uv": [ 0, 11, 1, 15 ], "texture": "#texture" }
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__comment": "Cube16",
|
|
||||||
"from": [ 3, 3, 14 ],
|
|
||||||
"to": [ 13, 14, 16 ],
|
|
||||||
"faces": {
|
|
||||||
"down": { "uv": [ 3, 0, 13, 2 ], "texture": "#texture" },
|
|
||||||
"up": { "uv": [ 3, 9, 13, 11 ], "texture": "#texture" },
|
|
||||||
"north": { "uv": [ 2, 2, 12, 13 ], "texture": "#texture" },
|
|
||||||
"south": { "uv": [ 3, 2, 13, 13 ], "texture": "#texture" },
|
|
||||||
"west": { "uv": [ 14, 2, 16, 13 ], "texture": "#texture" },
|
|
||||||
"east": { "uv": [ 0, 2, 2, 13 ], "texture": "#texture" }
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__comment": "Cube17",
|
|
||||||
"from": [ 2, 0, 14 ],
|
|
||||||
"to": [ 3, 14, 15 ],
|
|
||||||
"faces": {
|
|
||||||
"down": { "uv": [ 2, 1, 3, 2 ], "texture": "#texture" },
|
|
||||||
"up": { "uv": [ 2, 14, 3, 15 ], "texture": "#texture" },
|
|
||||||
"north": { "uv": [ 13, 2, 14, 16 ], "texture": "#texture" },
|
|
||||||
"south": { "uv": [ 2, 2, 3, 16 ], "texture": "#texture" },
|
|
||||||
"west": { "uv": [ 14, 2, 15, 16 ], "texture": "#texture" },
|
|
||||||
"east": { "uv": [ 1, 2, 2, 16 ], "texture": "#texture" }
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__comment": "Cube17",
|
|
||||||
"from": [ 1, 0, 13 ],
|
|
||||||
"to": [ 3, 14, 14 ],
|
|
||||||
"faces": {
|
|
||||||
"down": { "uv": [ 2, 1, 3, 2 ], "texture": "#texture" },
|
|
||||||
"up": { "uv": [ 2, 14, 3, 15 ], "texture": "#texture" },
|
|
||||||
"north": { "uv": [ 13, 2, 14, 16 ], "texture": "#texture" },
|
|
||||||
"south": { "uv": [ 2, 2, 3, 16 ], "texture": "#texture" },
|
|
||||||
"west": { "uv": [ 14, 2, 15, 16 ], "texture": "#texture" },
|
|
||||||
"east": { "uv": [ 1, 2, 2, 16 ], "texture": "#texture" }
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__comment": "Cube17",
|
|
||||||
"from": [ 1, 0, 2 ],
|
|
||||||
"to": [ 3, 14, 3 ],
|
|
||||||
"faces": {
|
|
||||||
"down": { "uv": [ 2, 1, 3, 2 ], "texture": "#texture" },
|
|
||||||
"up": { "uv": [ 2, 14, 3, 15 ], "texture": "#texture" },
|
|
||||||
"north": { "uv": [ 13, 2, 14, 16 ], "texture": "#texture" },
|
|
||||||
"south": { "uv": [ 2, 2, 3, 16 ], "texture": "#texture" },
|
|
||||||
"west": { "uv": [ 14, 2, 15, 16 ], "texture": "#texture" },
|
|
||||||
"east": { "uv": [ 1, 2, 2, 16 ], "texture": "#texture" }
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__comment": "Cube17",
|
|
||||||
"from": [ 2, 0, 1 ],
|
|
||||||
"to": [ 3, 14, 2 ],
|
|
||||||
"faces": {
|
|
||||||
"down": { "uv": [ 2, 1, 3, 2 ], "texture": "#texture" },
|
|
||||||
"up": { "uv": [ 2, 14, 3, 15 ], "texture": "#texture" },
|
|
||||||
"north": { "uv": [ 13, 2, 14, 16 ], "texture": "#texture" },
|
|
||||||
"south": { "uv": [ 2, 2, 3, 16 ], "texture": "#texture" },
|
|
||||||
"west": { "uv": [ 14, 2, 15, 16 ], "texture": "#texture" },
|
|
||||||
"east": { "uv": [ 1, 2, 2, 16 ], "texture": "#texture" }
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__comment": "Cube17",
|
|
||||||
"from": [ 14, 0, 2 ],
|
|
||||||
"to": [ 15, 14, 3 ],
|
|
||||||
"faces": {
|
|
||||||
"down": { "uv": [ 2, 1, 3, 2 ], "texture": "#texture" },
|
|
||||||
"up": { "uv": [ 2, 14, 3, 15 ], "texture": "#texture" },
|
|
||||||
"north": { "uv": [ 13, 2, 14, 16 ], "texture": "#texture" },
|
|
||||||
"south": { "uv": [ 2, 2, 3, 16 ], "texture": "#texture" },
|
|
||||||
"west": { "uv": [ 14, 2, 15, 16 ], "texture": "#texture" },
|
|
||||||
"east": { "uv": [ 1, 2, 2, 16 ], "texture": "#texture" }
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__comment": "Cube17",
|
|
||||||
"from": [ 13, 0, 1 ],
|
|
||||||
"to": [ 14, 14, 3 ],
|
|
||||||
"faces": {
|
|
||||||
"down": { "uv": [ 2, 1, 3, 2 ], "texture": "#texture" },
|
|
||||||
"up": { "uv": [ 2, 14, 3, 15 ], "texture": "#texture" },
|
|
||||||
"north": { "uv": [ 13, 2, 14, 16 ], "texture": "#texture" },
|
|
||||||
"south": { "uv": [ 2, 2, 3, 16 ], "texture": "#texture" },
|
|
||||||
"west": { "uv": [ 14, 2, 15, 16 ], "texture": "#texture" },
|
|
||||||
"east": { "uv": [ 1, 2, 2, 16 ], "texture": "#texture" }
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__comment": "Cube17",
|
|
||||||
"from": [ 13, 0, 13 ],
|
|
||||||
"to": [ 14, 14, 15 ],
|
|
||||||
"faces": {
|
|
||||||
"down": { "uv": [ 2, 1, 3, 2 ], "texture": "#texture" },
|
|
||||||
"up": { "uv": [ 2, 14, 3, 15 ], "texture": "#texture" },
|
|
||||||
"north": { "uv": [ 13, 2, 14, 16 ], "texture": "#texture" },
|
|
||||||
"south": { "uv": [ 2, 2, 3, 16 ], "texture": "#texture" },
|
|
||||||
"west": { "uv": [ 14, 2, 15, 16 ], "texture": "#texture" },
|
|
||||||
"east": { "uv": [ 1, 2, 2, 16 ], "texture": "#texture" }
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__comment": "Cube17",
|
|
||||||
"from": [ 14, 0, 13 ],
|
|
||||||
"to": [ 15, 14, 14 ],
|
|
||||||
"faces": {
|
|
||||||
"down": { "uv": [ 2, 1, 3, 2 ], "texture": "#texture" },
|
|
||||||
"up": { "uv": [ 2, 14, 3, 15 ], "texture": "#texture" },
|
|
||||||
"north": { "uv": [ 13, 2, 14, 16 ], "texture": "#texture" },
|
|
||||||
"south": { "uv": [ 2, 2, 3, 16 ], "texture": "#texture" },
|
|
||||||
"west": { "uv": [ 14, 2, 15, 16 ], "texture": "#texture" },
|
|
||||||
"east": { "uv": [ 1, 2, 2, 16 ], "texture": "#texture" }
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__comment": "lid",
|
|
||||||
"from": [ -0.5, 14, 8 ],
|
|
||||||
"to": [ 11.5, 16, 20 ],
|
|
||||||
"rotation": { "origin": [ -0.5, 14, 8 ], "axis": "y", "angle": 45 },
|
|
||||||
"faces": {
|
|
||||||
"down": { "uv": [ 2, 14, 14, 2 ], "texture": "#texture2" },
|
|
||||||
"up": { "uv": [ 2, 2, 14, 14 ], "texture": "#texture2" },
|
|
||||||
"north": { "uv": [ 14, 9, 2, 11 ], "texture": "#texture2" },
|
|
||||||
"south": { "uv": [ 2, 4, 14, 6 ], "texture": "#texture2" },
|
|
||||||
"west": { "uv": [ 4, 2, 6, 14 ], "texture": "#texture2", "rotation": 270 },
|
|
||||||
"east": { "uv": [ 4, 1, 6, 13 ], "texture": "#texture2", "rotation": 270 }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -1,234 +0,0 @@
|
|||||||
{
|
|
||||||
"__comment": "Designed by Kitsushadow with Cubik Studio - https://cubik.studio",
|
|
||||||
"textures": {
|
|
||||||
"particle": "forgecraft:blocks/brick",
|
|
||||||
"texture": "forgecraft:blocks/brick",
|
|
||||||
"texture1": "forgecraft:blocks/brick_lit",
|
|
||||||
"texture2": "forgecraft:blocks/stone_slab",
|
|
||||||
"texture3": "forgecraft:blocks/stone_slab_hot"
|
|
||||||
},
|
|
||||||
"elements": [
|
|
||||||
{
|
|
||||||
"__comment": "Cube1",
|
|
||||||
"from": [ 2, 0, 2 ],
|
|
||||||
"to": [ 14, 1, 14 ],
|
|
||||||
"faces": {
|
|
||||||
"down": { "uv": [ 2, 2, 14, 14 ], "texture": "#texture" },
|
|
||||||
"up": { "uv": [ 2, 2, 14, 14 ], "texture": "#texture1" },
|
|
||||||
"north": { "uv": [ 2, 15, 14, 16 ], "texture": "#texture" },
|
|
||||||
"south": { "uv": [ 2, 15, 14, 16 ], "texture": "#texture" },
|
|
||||||
"west": { "uv": [ 2, 15, 14, 16 ], "texture": "#texture" },
|
|
||||||
"east": { "uv": [ 2, 15, 14, 16 ], "texture": "#texture" }
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__comment": "Cube3",
|
|
||||||
"from": [ 0, 0, 3 ],
|
|
||||||
"to": [ 2, 14, 13 ],
|
|
||||||
"faces": {
|
|
||||||
"down": { "uv": [ 0, 3, 2, 13 ], "texture": "#texture" },
|
|
||||||
"up": { "uv": [ 3, 1, 13, 3 ], "texture": "#texture", "rotation": 90 },
|
|
||||||
"north": { "uv": [ 13, 2, 15, 16 ], "texture": "#texture" },
|
|
||||||
"south": { "uv": [ 0, 2, 2, 16 ], "texture": "#texture" },
|
|
||||||
"west": { "uv": [ 3, 2, 13, 16 ], "texture": "#texture" },
|
|
||||||
"east": { "uv": [ 2, 2, 12, 16 ], "texture": "#texture1" }
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__comment": "Cube4",
|
|
||||||
"from": [ 3, 0, 14 ],
|
|
||||||
"to": [ 13, 1, 16 ],
|
|
||||||
"faces": {
|
|
||||||
"down": { "uv": [ 3, 0, 13, 2 ], "texture": "#texture" },
|
|
||||||
"up": { "uv": [ 3, 14, 13, 16 ], "texture": "#texture" },
|
|
||||||
"north": { "uv": [ 3, 15, 13, 16 ], "texture": "#texture" },
|
|
||||||
"south": { "uv": [ 3, 15, 13, 16 ], "texture": "#texture" },
|
|
||||||
"west": { "uv": [ 14, 15, 16, 16 ], "texture": "#texture" },
|
|
||||||
"east": { "uv": [ 0, 15, 2, 16 ], "texture": "#texture" }
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__comment": "Cube6",
|
|
||||||
"from": [ 3, 0, 0 ],
|
|
||||||
"to": [ 13, 14, 2 ],
|
|
||||||
"faces": {
|
|
||||||
"down": { "uv": [ 3, 14, 13, 16 ], "texture": "#texture" },
|
|
||||||
"up": { "uv": [ 2, 0, 12, 2 ], "texture": "#texture" },
|
|
||||||
"north": { "uv": [ 3, 2, 13, 16 ], "texture": "#texture" },
|
|
||||||
"south": { "uv": [ 2, 2, 12, 16 ], "texture": "#texture1" },
|
|
||||||
"west": { "uv": [ 0, 2, 2, 16 ], "texture": "#texture" },
|
|
||||||
"east": { "uv": [ 14, 2, 16, 16 ], "texture": "#texture" }
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__comment": "Cube8",
|
|
||||||
"from": [ 14, 0, 3 ],
|
|
||||||
"to": [ 16, 14, 13 ],
|
|
||||||
"faces": {
|
|
||||||
"down": { "uv": [ 14, 3, 16, 13 ], "texture": "#texture" },
|
|
||||||
"up": { "uv": [ 2, 9, 12, 11 ], "texture": "#texture", "rotation": 90 },
|
|
||||||
"north": { "uv": [ 0, 2, 2, 16 ], "texture": "#texture" },
|
|
||||||
"south": { "uv": [ 13, 2, 15, 16 ], "texture": "#texture" },
|
|
||||||
"west": { "uv": [ 2, 2, 12, 16 ], "texture": "#texture1" },
|
|
||||||
"east": { "uv": [ 3, 2, 13, 16 ], "texture": "#texture" }
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__comment": "Cube14",
|
|
||||||
"from": [ 3, 1, 14 ],
|
|
||||||
"to": [ 4, 3, 16 ],
|
|
||||||
"faces": {
|
|
||||||
"down": { "uv": [ 3, 0, 4, 2 ], "texture": "#texture" },
|
|
||||||
"up": { "uv": [ 3, 14, 4, 16 ], "texture": "#texture" },
|
|
||||||
"north": { "uv": [ 12, 13, 13, 15 ], "texture": "#texture1" },
|
|
||||||
"south": { "uv": [ 3, 13, 4, 15 ], "texture": "#texture" },
|
|
||||||
"west": { "uv": [ 14, 13, 16, 15 ], "texture": "#texture" },
|
|
||||||
"east": { "uv": [ 0, 13, 2, 15 ], "texture": "#texture" }
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__comment": "Cube14",
|
|
||||||
"from": [ 12, 1, 14 ],
|
|
||||||
"to": [ 13, 3, 16 ],
|
|
||||||
"faces": {
|
|
||||||
"down": { "uv": [ 3, 0, 4, 1 ], "texture": "#texture" },
|
|
||||||
"up": { "uv": [ 3, 15, 4, 16 ], "texture": "#texture" },
|
|
||||||
"north": { "uv": [ 12, 11, 13, 15 ], "texture": "#texture1" },
|
|
||||||
"south": { "uv": [ 3, 11, 4, 15 ], "texture": "#texture" },
|
|
||||||
"west": { "uv": [ 15, 11, 16, 15 ], "texture": "#texture" },
|
|
||||||
"east": { "uv": [ 0, 11, 1, 15 ], "texture": "#texture" }
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__comment": "Cube16",
|
|
||||||
"from": [ 3, 3, 14 ],
|
|
||||||
"to": [ 13, 14, 16 ],
|
|
||||||
"faces": {
|
|
||||||
"down": { "uv": [ 3, 0, 13, 2 ], "texture": "#texture" },
|
|
||||||
"up": { "uv": [ 3, 9, 13, 11 ], "texture": "#texture" },
|
|
||||||
"north": { "uv": [ 2, 2, 12, 13 ], "texture": "#texture1" },
|
|
||||||
"south": { "uv": [ 3, 2, 13, 13 ], "texture": "#texture" },
|
|
||||||
"west": { "uv": [ 14, 2, 16, 13 ], "texture": "#texture" },
|
|
||||||
"east": { "uv": [ 0, 2, 2, 13 ], "texture": "#texture" }
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__comment": "Cube17",
|
|
||||||
"from": [ 2, 0, 14 ],
|
|
||||||
"to": [ 3, 14, 15 ],
|
|
||||||
"faces": {
|
|
||||||
"down": { "uv": [ 2, 1, 3, 2 ], "texture": "#texture" },
|
|
||||||
"up": { "uv": [ 2, 14, 3, 15 ], "texture": "#texture" },
|
|
||||||
"north": { "uv": [ 13, 2, 14, 16 ], "texture": "#texture" },
|
|
||||||
"south": { "uv": [ 2, 2, 3, 16 ], "texture": "#texture" },
|
|
||||||
"west": { "uv": [ 14, 2, 15, 16 ], "texture": "#texture" },
|
|
||||||
"east": { "uv": [ 1, 2, 2, 16 ], "texture": "#texture" }
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__comment": "Cube17",
|
|
||||||
"from": [ 1, 0, 13 ],
|
|
||||||
"to": [ 3, 14, 14 ],
|
|
||||||
"faces": {
|
|
||||||
"down": { "uv": [ 2, 1, 3, 2 ], "texture": "#texture" },
|
|
||||||
"up": { "uv": [ 2, 14, 3, 15 ], "texture": "#texture" },
|
|
||||||
"north": { "uv": [ 13, 2, 14, 16 ], "texture": "#texture1" },
|
|
||||||
"south": { "uv": [ 2, 2, 3, 16 ], "texture": "#texture" },
|
|
||||||
"west": { "uv": [ 14, 2, 15, 16 ], "texture": "#texture" },
|
|
||||||
"east": { "uv": [ 1, 2, 2, 16 ], "texture": "#texture1" }
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__comment": "Cube17",
|
|
||||||
"from": [ 1, 0, 2 ],
|
|
||||||
"to": [ 3, 14, 3 ],
|
|
||||||
"faces": {
|
|
||||||
"down": { "uv": [ 2, 1, 3, 2 ], "texture": "#texture" },
|
|
||||||
"up": { "uv": [ 2, 14, 3, 15 ], "texture": "#texture" },
|
|
||||||
"north": { "uv": [ 13, 2, 14, 16 ], "texture": "#texture" },
|
|
||||||
"south": { "uv": [ 2, 2, 3, 16 ], "texture": "#texture1" },
|
|
||||||
"west": { "uv": [ 14, 2, 15, 16 ], "texture": "#texture" },
|
|
||||||
"east": { "uv": [ 1, 2, 2, 16 ], "texture": "#texture" }
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__comment": "Cube17",
|
|
||||||
"from": [ 2, 0, 1 ],
|
|
||||||
"to": [ 3, 14, 2 ],
|
|
||||||
"faces": {
|
|
||||||
"down": { "uv": [ 2, 1, 3, 2 ], "texture": "#texture" },
|
|
||||||
"up": { "uv": [ 2, 14, 3, 15 ], "texture": "#texture" },
|
|
||||||
"north": { "uv": [ 13, 2, 14, 16 ], "texture": "#texture" },
|
|
||||||
"south": { "uv": [ 2, 2, 3, 16 ], "texture": "#texture" },
|
|
||||||
"west": { "uv": [ 14, 2, 15, 16 ], "texture": "#texture" },
|
|
||||||
"east": { "uv": [ 1, 2, 2, 16 ], "texture": "#texture" }
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__comment": "Cube17",
|
|
||||||
"from": [ 14, 0, 2 ],
|
|
||||||
"to": [ 15, 14, 3 ],
|
|
||||||
"faces": {
|
|
||||||
"down": { "uv": [ 2, 1, 3, 2 ], "texture": "#texture" },
|
|
||||||
"up": { "uv": [ 2, 14, 3, 15 ], "texture": "#texture" },
|
|
||||||
"north": { "uv": [ 13, 2, 14, 16 ], "texture": "#texture" },
|
|
||||||
"south": { "uv": [ 2, 2, 3, 16 ], "texture": "#texture" },
|
|
||||||
"west": { "uv": [ 14, 2, 15, 16 ], "texture": "#texture" },
|
|
||||||
"east": { "uv": [ 1, 2, 2, 16 ], "texture": "#texture" }
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__comment": "Cube17",
|
|
||||||
"from": [ 13, 0, 1 ],
|
|
||||||
"to": [ 14, 14, 3 ],
|
|
||||||
"faces": {
|
|
||||||
"down": { "uv": [ 2, 1, 3, 2 ], "texture": "#texture" },
|
|
||||||
"up": { "uv": [ 2, 14, 3, 15 ], "texture": "#texture" },
|
|
||||||
"north": { "uv": [ 13, 2, 14, 16 ], "texture": "#texture" },
|
|
||||||
"south": { "uv": [ 2, 2, 3, 16 ], "texture": "#texture1" },
|
|
||||||
"west": { "uv": [ 14, 2, 15, 16 ], "texture": "#texture1" },
|
|
||||||
"east": { "uv": [ 1, 2, 2, 16 ], "texture": "#texture" }
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__comment": "Cube17",
|
|
||||||
"from": [ 13, 0, 13 ],
|
|
||||||
"to": [ 14, 14, 15 ],
|
|
||||||
"faces": {
|
|
||||||
"down": { "uv": [ 2, 1, 3, 2 ], "texture": "#texture" },
|
|
||||||
"up": { "uv": [ 2, 14, 3, 15 ], "texture": "#texture" },
|
|
||||||
"north": { "uv": [ 13, 2, 14, 16 ], "texture": "#texture1" },
|
|
||||||
"south": { "uv": [ 2, 2, 3, 16 ], "texture": "#texture" },
|
|
||||||
"west": { "uv": [ 14, 2, 15, 16 ], "texture": "#texture1" },
|
|
||||||
"east": { "uv": [ 1, 2, 2, 16 ], "texture": "#texture" }
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__comment": "Cube17",
|
|
||||||
"from": [ 14, 0, 13 ],
|
|
||||||
"to": [ 15, 14, 14 ],
|
|
||||||
"faces": {
|
|
||||||
"down": { "uv": [ 2, 1, 3, 2 ], "texture": "#texture" },
|
|
||||||
"up": { "uv": [ 2, 14, 3, 15 ], "texture": "#texture" },
|
|
||||||
"north": { "uv": [ 13, 2, 14, 16 ], "texture": "#texture" },
|
|
||||||
"south": { "uv": [ 2, 2, 3, 16 ], "texture": "#texture" },
|
|
||||||
"west": { "uv": [ 14, 2, 15, 16 ], "texture": "#texture" },
|
|
||||||
"east": { "uv": [ 1, 2, 2, 16 ], "texture": "#texture" }
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__comment": "lid",
|
|
||||||
"from": [ -0.5, 14, 8 ],
|
|
||||||
"to": [ 11.5, 16, 20 ],
|
|
||||||
"rotation": { "origin": [ -0.5, 14, 8 ], "axis": "y", "angle": 45 },
|
|
||||||
"faces": {
|
|
||||||
"down": { "uv": [ 2, 14, 14, 2 ], "texture": "#texture3" },
|
|
||||||
"up": { "uv": [ 2, 2, 14, 14 ], "texture": "#texture3" },
|
|
||||||
"north": { "uv": [ 14, 9, 2, 11 ], "texture": "#texture3" },
|
|
||||||
"south": { "uv": [ 2, 4, 14, 6 ], "texture": "#texture3" },
|
|
||||||
"west": { "uv": [ 4, 2, 6, 14 ], "texture": "#texture3", "rotation": 270 },
|
|
||||||
"east": { "uv": [ 4, 1, 6, 13 ], "texture": "#texture3", "rotation": 270 }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 386 B |
Binary file not shown.
|
Before Width: | Height: | Size: 329 B |
@@ -1 +0,0 @@
|
|||||||
[]
|
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
0
1.11/.gitignore → kfc/.gitignore
vendored
0
1.11/.gitignore → kfc/.gitignore
vendored
@@ -3,8 +3,10 @@ To-Dos
|
|||||||
*** Bugs ***
|
*** Bugs ***
|
||||||
|
|
||||||
|
|
||||||
*** Priority ***
|
*** Current Feature ***
|
||||||
|
- [x] BlockBreaker Support for copper dust and tin dust
|
||||||
|
- [x] picking up raw bronze crucible returns some other shit
|
||||||
|
- [x] Tool breaking should return tool head
|
||||||
|
|
||||||
*** Feature Musket ***
|
*** Feature Musket ***
|
||||||
- [ ] Create powder charge item (copper, charcoal, gunpowder)
|
- [ ] Create powder charge item (copper, charcoal, gunpowder)
|
||||||
@@ -19,7 +21,6 @@ To-Dos
|
|||||||
|
|
||||||
*** Backlog ***
|
*** Backlog ***
|
||||||
- [ ] Move Ingot break into chunks logic out of the block and into the ForgeHammer
|
- [ ] Move Ingot break into chunks logic out of the block and into the ForgeHammer
|
||||||
- [ ] Add Yew
|
|
||||||
- [ ] Add Iron Ring Recipe
|
- [ ] Add Iron Ring Recipe
|
||||||
- [ ] Add chainmail recipe
|
- [ ] Add chainmail recipe
|
||||||
- [ ] Add Iron Shield
|
- [ ] Add Iron Shield
|
||||||
@@ -27,10 +28,7 @@ To-Dos
|
|||||||
- [ ] Create a method which adds the types of NBT upgrades and creates a unique float instead of using magic numbers
|
- [ ] Create a method which adds the types of NBT upgrades and creates a unique float instead of using magic numbers
|
||||||
- [ ] Add forgehammer to oreDict
|
- [ ] Add forgehammer to oreDict
|
||||||
- [ ] WeaponHead recipes
|
- [ ] WeaponHead recipes
|
||||||
- [ ] Casting Table
|
|
||||||
- [ ] Block
|
|
||||||
- [ ] Gui
|
|
||||||
- [ ] Crafting recipes
|
|
||||||
|
|
||||||
*** Tid-Bits ***
|
*** Tid-Bits ***
|
||||||
sed -i -- 's/iron/steel/g' *
|
sed -i -- 's/iron/steel/g' *
|
||||||
@@ -38,6 +36,10 @@ rm *.json--
|
|||||||
rename s/iron/steel/ iron*
|
rename s/iron/steel/ iron*
|
||||||
|
|
||||||
*** Completed ***
|
*** Completed ***
|
||||||
|
- [x] Casting Table
|
||||||
|
- [x] Block
|
||||||
|
- [x] Gui
|
||||||
|
- [x] Crafting recipes
|
||||||
- [x] StoneTongs for all tool heads
|
- [x] StoneTongs for all tool heads
|
||||||
- [x] ItemNBT
|
- [x] ItemNBT
|
||||||
- [x] ItemRender
|
- [x] ItemRender
|
||||||
@@ -87,10 +87,10 @@ dependencies {
|
|||||||
// <MINECRAFT-VERSION> and <JEI-VERSION> can be found on CurseForge, check the file name of the version you want.
|
// <MINECRAFT-VERSION> and <JEI-VERSION> can be found on CurseForge, check the file name of the version you want.
|
||||||
//
|
//
|
||||||
// compile against the JEI API
|
// compile against the JEI API
|
||||||
deobfCompile "mezz.jei:jei_${mc_version}:${jei_version}:api"
|
deobfCompile "nmd.primal.core:PrimalCore:${mc_version}-${primal_version}:dev"
|
||||||
//runtime "mezz.jei:jei_${mc_version}:${jei_version}"
|
//runtime "mezz.jei:jei_${mc_version}:${jei_version}"
|
||||||
|
|
||||||
deobfCompile "nmd.primal.core:PrimalCore:${primal_version}:dev"
|
deobfCompile "nmd.primal.core:PrimalCore:${mc_version}-${primal_version}:dev"
|
||||||
//runtime "nmd.primal.core:PrimalCore:${primal_version}"
|
//runtime "nmd.primal.core:PrimalCore:${primal_version}"
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -5,9 +5,9 @@ org.gradle.jvmargs=-Xmx3G
|
|||||||
|
|
||||||
mod_group=nmd.primal.forgecraft
|
mod_group=nmd.primal.forgecraft
|
||||||
mod_name=ForgeCraft
|
mod_name=ForgeCraft
|
||||||
mod_version=1.2.22
|
mod_version=1.2.74
|
||||||
forge_version=13.20.0.2311
|
forge_version=13.20.1.2388
|
||||||
mcp_mappings=snapshot_20170121
|
mcp_mappings=snapshot_20170610
|
||||||
mc_version=1.11.2
|
mc_version=1.11.2
|
||||||
|
|
||||||
primal_version=0.4+
|
primal_version=0.4+
|
||||||
0
1.10.2/gradlew → kfc/gradlew
vendored
Normal file → Executable file
0
1.10.2/gradlew → kfc/gradlew
vendored
Normal file → Executable file
0
1.11/gradlew.bat → kfc/gradlew.bat
vendored
0
1.11/gradlew.bat → kfc/gradlew.bat
vendored
@@ -5,17 +5,15 @@ import net.minecraft.nbt.NBTTagCompound;
|
|||||||
import net.minecraftforge.fml.common.eventhandler.EventPriority;
|
import net.minecraftforge.fml.common.eventhandler.EventPriority;
|
||||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||||
import net.minecraftforge.fml.common.gameevent.PlayerEvent;
|
import net.minecraftforge.fml.common.gameevent.PlayerEvent;
|
||||||
import nmd.primal.forgecraft.init.ModItems;
|
import nmd.primal.forgecraft.items.parts.BronzeToolPart;
|
||||||
import nmd.primal.forgecraft.items.parts.ToolPart;
|
import nmd.primal.forgecraft.items.parts.ToolPart;
|
||||||
import nmd.primal.forgecraft.items.tools.CustomAxe;
|
import nmd.primal.forgecraft.items.tools.*;
|
||||||
import nmd.primal.forgecraft.items.tools.CustomHoe;
|
import nmd.primal.forgecraft.util.ToolNBT;
|
||||||
import nmd.primal.forgecraft.items.tools.CustomPickaxe;
|
|
||||||
import nmd.primal.forgecraft.items.tools.CustomShovel;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by mminaie on 3/15/17.
|
* Created by mminaie on 3/15/17.
|
||||||
*/
|
*/
|
||||||
public class CommonEvents implements ToolNBT{
|
public class CommonEvents implements ToolNBT {
|
||||||
|
|
||||||
|
|
||||||
@SubscribeEvent(priority= EventPriority.LOWEST, receiveCanceled=true)
|
@SubscribeEvent(priority= EventPriority.LOWEST, receiveCanceled=true)
|
||||||
@@ -23,13 +21,13 @@ public class CommonEvents implements ToolNBT{
|
|||||||
|
|
||||||
if(!event.player.getEntityWorld().isRemote) {
|
if(!event.player.getEntityWorld().isRemote) {
|
||||||
|
|
||||||
if (event.crafting.getItem() instanceof CustomPickaxe) {
|
if (event.crafting.getItem() instanceof CustomPickaxe || event.crafting.getItem() instanceof BronzePickaxe) {
|
||||||
NBTTagCompound tempTag = new NBTTagCompound();
|
NBTTagCompound tempTag = new NBTTagCompound();
|
||||||
for (int i = 0; i < event.craftMatrix.getSizeInventory(); i++) { // Checks all the slots
|
for (int i = 0; i < event.craftMatrix.getSizeInventory(); i++) { // Checks all the slots
|
||||||
|
|
||||||
if (event.craftMatrix.getStackInSlot(i) != null) { // If there is an item
|
if (event.craftMatrix.getStackInSlot(i) != null) { // If there is an item
|
||||||
ItemStack a = event.craftMatrix.getStackInSlot(i); // Gets the item
|
ItemStack a = event.craftMatrix.getStackInSlot(i); // Gets the item
|
||||||
if (a.getItem() instanceof ToolPart) {
|
if (a.getItem() instanceof ToolPart || a.getItem() instanceof BronzeToolPart) {
|
||||||
tempTag = a.getSubCompound("tags").copy();
|
tempTag = a.getSubCompound("tags").copy();
|
||||||
event.crafting.getTagCompound().setTag("tags", tempTag);
|
event.crafting.getTagCompound().setTag("tags", tempTag);
|
||||||
event.crafting.getItem().updateItemStackNBT(event.crafting.getTagCompound());
|
event.crafting.getItem().updateItemStackNBT(event.crafting.getTagCompound());
|
||||||
@@ -38,13 +36,13 @@ public class CommonEvents implements ToolNBT{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (event.crafting.getItem() instanceof CustomAxe) {
|
if (event.crafting.getItem() instanceof CustomAxe || event.crafting.getItem() instanceof BronzeAxe) {
|
||||||
NBTTagCompound tempTag = new NBTTagCompound();
|
NBTTagCompound tempTag = new NBTTagCompound();
|
||||||
for (int i = 0; i < event.craftMatrix.getSizeInventory(); i++) { // Checks all the slots
|
for (int i = 0; i < event.craftMatrix.getSizeInventory(); i++) { // Checks all the slots
|
||||||
|
|
||||||
if (event.craftMatrix.getStackInSlot(i) != null) { // If there is an item
|
if (event.craftMatrix.getStackInSlot(i) != null) { // If there is an item
|
||||||
ItemStack a = event.craftMatrix.getStackInSlot(i); // Gets the item
|
ItemStack a = event.craftMatrix.getStackInSlot(i); // Gets the item
|
||||||
if (a.getItem() instanceof ToolPart) {
|
if (a.getItem() instanceof ToolPart || a.getItem() instanceof BronzeToolPart) {
|
||||||
tempTag = a.getSubCompound("tags").copy();
|
tempTag = a.getSubCompound("tags").copy();
|
||||||
event.crafting.getTagCompound().setTag("tags", tempTag);
|
event.crafting.getTagCompound().setTag("tags", tempTag);
|
||||||
event.crafting.getItem().updateItemStackNBT(event.crafting.getTagCompound());
|
event.crafting.getItem().updateItemStackNBT(event.crafting.getTagCompound());
|
||||||
@@ -53,70 +51,64 @@ public class CommonEvents implements ToolNBT{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (event.crafting.getItem() instanceof CustomShovel) {
|
if (event.crafting.getItem() instanceof CustomShovel || event.crafting.getItem() instanceof BronzeShovel) {
|
||||||
NBTTagCompound tempTag = new NBTTagCompound();
|
NBTTagCompound tempTag = new NBTTagCompound();
|
||||||
for (int i = 0; i < event.craftMatrix.getSizeInventory(); i++) { // Checks all the slots
|
for (int i = 0; i < event.craftMatrix.getSizeInventory(); i++) { // Checks all the slots
|
||||||
|
|
||||||
if (event.craftMatrix.getStackInSlot(i) != null) { // If there is an item
|
if (event.craftMatrix.getStackInSlot(i) != null) { // If there is an item
|
||||||
ItemStack a = event.craftMatrix.getStackInSlot(i); // Gets the item
|
ItemStack a = event.craftMatrix.getStackInSlot(i); // Gets the item
|
||||||
if (a.getItem() instanceof ToolPart) {
|
if (a.getItem() instanceof ToolPart || a.getItem() instanceof BronzeToolPart) {
|
||||||
tempTag = a.getSubCompound("tags").copy();
|
tempTag = a.getSubCompound("tags").copy();
|
||||||
event.crafting.getTagCompound().setTag("tags", tempTag);
|
event.crafting.getTagCompound().setTag("tags", tempTag);
|
||||||
event.crafting.getItem().updateItemStackNBT(event.crafting.getTagCompound());
|
event.crafting.getItem().updateItemStackNBT(event.crafting.getTagCompound());
|
||||||
event.crafting.setItemDamage(event.craftMatrix.getStackInSlot(i).getItemDamage());
|
event.crafting.setItemDamage(event.craftMatrix.getStackInSlot(i).getItemDamage());
|
||||||
//if( getDiamondLevel(event.crafting) > 0 ){
|
|
||||||
// event.crafting.getItem().setHarvestLevel("pickaxe", 3);
|
|
||||||
//}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (event.crafting.getItem() instanceof CustomHoe) {
|
if (event.crafting.getItem() instanceof CustomHoe || event.crafting.getItem() instanceof BronzeHoe) {
|
||||||
NBTTagCompound tempTag = new NBTTagCompound();
|
NBTTagCompound tempTag = new NBTTagCompound();
|
||||||
for (int i = 0; i < event.craftMatrix.getSizeInventory(); i++) { // Checks all the slots
|
for (int i = 0; i < event.craftMatrix.getSizeInventory(); i++) { // Checks all the slots
|
||||||
|
|
||||||
if (event.craftMatrix.getStackInSlot(i) != null) { // If there is an item
|
if (event.craftMatrix.getStackInSlot(i) != null) { // If there is an item
|
||||||
ItemStack a = event.craftMatrix.getStackInSlot(i); // Gets the item
|
ItemStack a = event.craftMatrix.getStackInSlot(i); // Gets the item
|
||||||
if (a.getItem() instanceof ToolPart) {
|
if (a.getItem() instanceof ToolPart || a.getItem() instanceof BronzeToolPart) {
|
||||||
tempTag = a.getSubCompound("tags").copy();
|
tempTag = a.getSubCompound("tags").copy();
|
||||||
event.crafting.getTagCompound().setTag("tags", tempTag);
|
event.crafting.getTagCompound().setTag("tags", tempTag);
|
||||||
event.crafting.getItem().updateItemStackNBT(event.crafting.getTagCompound());
|
event.crafting.getItem().updateItemStackNBT(event.crafting.getTagCompound());
|
||||||
event.crafting.setItemDamage(event.craftMatrix.getStackInSlot(i).getItemDamage());
|
event.crafting.setItemDamage(event.craftMatrix.getStackInSlot(i).getItemDamage());
|
||||||
//if( getDiamondLevel(event.crafting) > 0 ){
|
|
||||||
// event.crafting.getItem().setHarvestLevel("pickaxe", 3);
|
|
||||||
//}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (event.crafting.getItem() instanceof ToolPart) {
|
if (event.crafting.getItem() instanceof ToolPart || event.crafting.getItem() instanceof BronzeToolPart) {
|
||||||
NBTTagCompound tempTag = new NBTTagCompound();
|
NBTTagCompound tempTag = new NBTTagCompound();
|
||||||
for (int i = 0; i < event.craftMatrix.getSizeInventory(); i++) { // Checks all the slots
|
for (int i = 0; i < event.craftMatrix.getSizeInventory(); i++) { // Checks all the slots
|
||||||
|
|
||||||
if (event.craftMatrix.getStackInSlot(i) != null) { // If there is an item
|
if (event.craftMatrix.getStackInSlot(i) != null) { // If there is an item
|
||||||
ItemStack a = event.craftMatrix.getStackInSlot(i); // Gets the item
|
ItemStack a = event.craftMatrix.getStackInSlot(i); // Gets the item
|
||||||
if (a.getItem() instanceof CustomAxe) {
|
if (a.getItem() instanceof CustomAxe || a.getItem() instanceof BronzeAxe) {
|
||||||
tempTag = a.getSubCompound("tags").copy();
|
tempTag = a.getSubCompound("tags").copy();
|
||||||
event.crafting.getTagCompound().setTag("tags", tempTag);
|
event.crafting.getTagCompound().setTag("tags", tempTag);
|
||||||
event.crafting.getItem().updateItemStackNBT(event.crafting.getTagCompound());
|
event.crafting.getItem().updateItemStackNBT(event.crafting.getTagCompound());
|
||||||
Integer tempDamage = event.craftMatrix.getStackInSlot(i).getItemDamage();
|
Integer tempDamage = event.craftMatrix.getStackInSlot(i).getItemDamage();
|
||||||
event.crafting.setItemDamage(tempDamage);
|
event.crafting.setItemDamage(tempDamage);
|
||||||
}
|
}
|
||||||
if (a.getItem() instanceof CustomPickaxe) {
|
if (a.getItem() instanceof CustomPickaxe || a.getItem() instanceof BronzePickaxe) {
|
||||||
tempTag = a.getSubCompound("tags").copy();
|
tempTag = a.getSubCompound("tags").copy();
|
||||||
event.crafting.getTagCompound().setTag("tags", tempTag);
|
event.crafting.getTagCompound().setTag("tags", tempTag);
|
||||||
event.crafting.getItem().updateItemStackNBT(event.crafting.getTagCompound());
|
event.crafting.getItem().updateItemStackNBT(event.crafting.getTagCompound());
|
||||||
Integer tempDamage = event.craftMatrix.getStackInSlot(i).getItemDamage();
|
Integer tempDamage = event.craftMatrix.getStackInSlot(i).getItemDamage();
|
||||||
event.crafting.setItemDamage(tempDamage);
|
event.crafting.setItemDamage(tempDamage);
|
||||||
}
|
}
|
||||||
if (a.getItem() instanceof CustomShovel) {
|
if (a.getItem() instanceof CustomShovel || a.getItem() instanceof BronzeShovel) {
|
||||||
tempTag = a.getSubCompound("tags").copy();
|
tempTag = a.getSubCompound("tags").copy();
|
||||||
event.crafting.getTagCompound().setTag("tags", tempTag);
|
event.crafting.getTagCompound().setTag("tags", tempTag);
|
||||||
event.crafting.getItem().updateItemStackNBT(event.crafting.getTagCompound());
|
event.crafting.getItem().updateItemStackNBT(event.crafting.getTagCompound());
|
||||||
Integer tempDamage = event.craftMatrix.getStackInSlot(i).getItemDamage();
|
Integer tempDamage = event.craftMatrix.getStackInSlot(i).getItemDamage();
|
||||||
event.crafting.setItemDamage(tempDamage);
|
event.crafting.setItemDamage(tempDamage);
|
||||||
}
|
}
|
||||||
if (a.getItem() instanceof CustomHoe) {
|
if (a.getItem() instanceof CustomHoe || a.getItem() instanceof BronzeHoe) {
|
||||||
tempTag = a.getSubCompound("tags").copy();
|
tempTag = a.getSubCompound("tags").copy();
|
||||||
event.crafting.getTagCompound().setTag("tags", tempTag);
|
event.crafting.getTagCompound().setTag("tags", tempTag);
|
||||||
event.crafting.getItem().updateItemStackNBT(event.crafting.getTagCompound());
|
event.crafting.getItem().updateItemStackNBT(event.crafting.getTagCompound());
|
||||||
@@ -13,11 +13,15 @@ import nmd.primal.forgecraft.compat.ModDictionary;
|
|||||||
import nmd.primal.forgecraft.gui.GuiHandler;
|
import nmd.primal.forgecraft.gui.GuiHandler;
|
||||||
import nmd.primal.forgecraft.init.*;
|
import nmd.primal.forgecraft.init.*;
|
||||||
import nmd.primal.forgecraft.proxy.CommonProxy;
|
import nmd.primal.forgecraft.proxy.CommonProxy;
|
||||||
|
import org.apache.logging.log4j.LogManager;
|
||||||
|
import org.apache.logging.log4j.Logger;
|
||||||
|
|
||||||
|
import java.util.Locale;
|
||||||
|
|
||||||
//import nmd.primal.forgecraft.common.init.*;
|
//import nmd.primal.forgecraft.common.init.*;
|
||||||
|
|
||||||
@Mod( modid = ModInfo.MOD_ID,
|
@Mod( modid = ModInfo.MOD_ID,
|
||||||
name = ModInfo.MOD_NAME,
|
name = ModInfo.MOD_ID,
|
||||||
version = ModInfo.MOD_VERSION,
|
version = ModInfo.MOD_VERSION,
|
||||||
acceptedMinecraftVersions = ModInfo.MC_VERSIONS,
|
acceptedMinecraftVersions = ModInfo.MC_VERSIONS,
|
||||||
dependencies = ModInfo.DEPENDENCIES
|
dependencies = ModInfo.DEPENDENCIES
|
||||||
@@ -31,10 +35,13 @@ public class ForgeCraft
|
|||||||
public static SimpleNetworkWrapper NETWORK;
|
public static SimpleNetworkWrapper NETWORK;
|
||||||
@SidedProxy(clientSide = ModInfo.CLIENT_PROXY, serverSide = ModInfo.SERVER_PROXY)
|
@SidedProxy(clientSide = ModInfo.CLIENT_PROXY, serverSide = ModInfo.SERVER_PROXY)
|
||||||
public static CommonProxy proxy;
|
public static CommonProxy proxy;
|
||||||
|
public static Logger LOGGER = LogManager.getLogger(ModInfo.MOD_ID);
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void preInit(FMLPreInitializationEvent event)
|
public void preInit(FMLPreInitializationEvent event)
|
||||||
{
|
{
|
||||||
|
Locale.setDefault(Locale.ENGLISH);
|
||||||
|
|
||||||
|
|
||||||
NETWORK = NetworkRegistry.INSTANCE.newSimpleChannel(ModInfo.MOD_CHANNEL);
|
NETWORK = NetworkRegistry.INSTANCE.newSimpleChannel(ModInfo.MOD_CHANNEL);
|
||||||
NetworkRegistry.INSTANCE.registerGuiHandler(this, new GuiHandler());
|
NetworkRegistry.INSTANCE.registerGuiHandler(this, new GuiHandler());
|
||||||
@@ -51,6 +58,7 @@ public class ForgeCraft
|
|||||||
//ModEvents.registerClientEvents();
|
//ModEvents.registerClientEvents();
|
||||||
// ModItems.registerRenders();
|
// ModItems.registerRenders();
|
||||||
proxy.preInit();
|
proxy.preInit();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
@@ -70,15 +78,4 @@ public class ForgeCraft
|
|||||||
//this.proxy.postInit(event);
|
//this.proxy.postInit(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*@EventHandler
|
|
||||||
public void serverStarting(FMLServerStartingEvent event)
|
|
||||||
{
|
|
||||||
//event.registerServerCommand(new PrimalCommand());
|
|
||||||
}
|
|
||||||
|
|
||||||
//public File getConfigDirectory()
|
|
||||||
//{
|
|
||||||
// return CONFIG_DIRECTORY;
|
|
||||||
//}
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
39
kfc/src/main/java/nmd/primal/forgecraft/ModInfo.java
Normal file
39
kfc/src/main/java/nmd/primal/forgecraft/ModInfo.java
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
package nmd.primal.forgecraft;
|
||||||
|
|
||||||
|
import net.minecraft.creativetab.CreativeTabs;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraftforge.fml.relauncher.Side;
|
||||||
|
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||||
|
import nmd.primal.forgecraft.init.ModItems;
|
||||||
|
//import nmd.primal.forgecraft.Item.ModItems;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by kitsu on 11/24/2016.
|
||||||
|
*/
|
||||||
|
public class ModInfo {
|
||||||
|
/** Mod Details**/
|
||||||
|
public static final String MOD_ID = "forgecraft";
|
||||||
|
public static final String MOD_NAME = "Kitsu's ForgeCraft";
|
||||||
|
public static final String MOD_CONFIG = "primal/" + MOD_ID;
|
||||||
|
//public static final String MOD_PREFIX = MOD_ID + ":";
|
||||||
|
public static final String MOD_CHANNEL = MOD_ID;
|
||||||
|
public static final String MOD_VERSION = "1.2.74";
|
||||||
|
public static final String MC_VERSIONS = "[1.11.0, 1.12.0)";
|
||||||
|
public static final String DEPENDENCIES = "required-after:forge@[13.20.1.2388,);" + "required-after:primal@[0.4,);";
|
||||||
|
|
||||||
|
/** Mod Structures **/
|
||||||
|
public static final String SERVER_PROXY = "nmd.primal.forgecraft.proxy.ServerProxy";
|
||||||
|
public static final String CLIENT_PROXY = "nmd.primal.forgecraft.proxy.ClientProxy";
|
||||||
|
//public static final String GUI_FACTORY = "nmd.primal.forgecraft.gui.GuiFactory";
|
||||||
|
//public static final String UPDATE_JSON = "";
|
||||||
|
|
||||||
|
/** Creative Tabs **/
|
||||||
|
public static CreativeTabs TAB_FORGECRAFT = new CreativeTabs(MOD_ID)
|
||||||
|
{
|
||||||
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
public ItemStack getTabIconItem() {
|
||||||
|
return new ItemStack(ModItems.forgehammer);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -0,0 +1,142 @@
|
|||||||
|
package nmd.primal.forgecraft.blocks.Anvil;
|
||||||
|
|
||||||
|
import net.minecraft.block.material.Material;
|
||||||
|
import net.minecraft.block.properties.IProperty;
|
||||||
|
import net.minecraft.block.state.BlockStateContainer;
|
||||||
|
import net.minecraft.block.state.IBlockState;
|
||||||
|
import net.minecraft.entity.EntityLivingBase;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
import net.minecraft.util.EnumBlockRenderType;
|
||||||
|
import net.minecraft.util.EnumFacing;
|
||||||
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
import net.minecraft.world.IBlockAccess;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraftforge.fml.relauncher.Side;
|
||||||
|
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||||
|
import nmd.primal.forgecraft.ModInfo;
|
||||||
|
import nmd.primal.forgecraft.blocks.CustomContainerFacing;
|
||||||
|
import nmd.primal.forgecraft.tiles.TileAnvil;
|
||||||
|
import nmd.primal.forgecraft.util.AnvilHandler;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by mminaie on 6/11/17.
|
||||||
|
*/
|
||||||
|
public abstract class AnvilBase extends CustomContainerFacing implements AnvilHandler{
|
||||||
|
|
||||||
|
private boolean anvil;
|
||||||
|
|
||||||
|
public AnvilBase(Material material, String registryName, Float hardness, Boolean anvil) {
|
||||||
|
super(material, registryName);
|
||||||
|
setCreativeTab(ModInfo.TAB_FORGECRAFT);
|
||||||
|
setDefaultState(this.blockState.getBaseState().withProperty(FACING, EnumFacing.NORTH));
|
||||||
|
setHardness(hardness);
|
||||||
|
this.setIsAnvil(anvil);
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isAnvil() {
|
||||||
|
return anvil;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIsAnvil(boolean anvil) {
|
||||||
|
anvil = anvil;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void breakBlock(World world, BlockPos pos, IBlockState state)
|
||||||
|
{
|
||||||
|
AnvilHandler.doDrops(world, pos);
|
||||||
|
super.breakBlock(world, pos, state);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public TileEntity createNewTileEntity(World worldIn, int meta)
|
||||||
|
{
|
||||||
|
return new TileAnvil();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBlockPlacedBy(World worldIn, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack)
|
||||||
|
{
|
||||||
|
//if(!worldIn.isRemote) {
|
||||||
|
worldIn.setBlockState(pos, state.withProperty(FACING, placer.getHorizontalFacing()), 2);
|
||||||
|
//}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getMetaFromState(IBlockState state) {
|
||||||
|
int i = 0;
|
||||||
|
|
||||||
|
if( state.getValue(FACING) == EnumFacing.EAST) {
|
||||||
|
i = 0;
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
if( state.getValue(FACING) == EnumFacing.WEST) {
|
||||||
|
i = 1;
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
if( state.getValue(FACING) == EnumFacing.SOUTH){
|
||||||
|
i = 2;
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
if( state.getValue(FACING) == EnumFacing.NORTH){
|
||||||
|
i = 3;
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IBlockState getStateFromMeta(int meta)
|
||||||
|
{
|
||||||
|
IBlockState iblockstate = this.getDefaultState();
|
||||||
|
|
||||||
|
if (meta == 0){
|
||||||
|
iblockstate = iblockstate.withProperty(FACING, EnumFacing.EAST);
|
||||||
|
}
|
||||||
|
if (meta == 1) {
|
||||||
|
iblockstate = iblockstate.withProperty(FACING, EnumFacing.WEST);
|
||||||
|
}
|
||||||
|
if (meta == 2) {
|
||||||
|
iblockstate = iblockstate.withProperty(FACING, EnumFacing.SOUTH);
|
||||||
|
}
|
||||||
|
if (meta == 3) {
|
||||||
|
iblockstate = iblockstate.withProperty(FACING, EnumFacing.NORTH);
|
||||||
|
}
|
||||||
|
return iblockstate;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected BlockStateContainer createBlockState() {
|
||||||
|
return new BlockStateContainer(this, new IProperty[] {FACING});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isFullCube(IBlockState state)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isOpaqueCube(IBlockState state)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
public boolean shouldSideBeRendered(IBlockState blockState, IBlockAccess blockAccess, BlockPos pos, EnumFacing side)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public EnumBlockRenderType getRenderType(IBlockState state)
|
||||||
|
{
|
||||||
|
return EnumBlockRenderType.MODEL;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
package nmd.primal.forgecraft.blocks.Anvil;
|
||||||
|
|
||||||
|
import net.minecraft.block.material.Material;
|
||||||
|
import net.minecraft.block.state.IBlockState;
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.util.EnumFacing;
|
||||||
|
import net.minecraft.util.EnumHand;
|
||||||
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import nmd.primal.core.common.items.tools.WorkMallet;
|
||||||
|
import nmd.primal.forgecraft.init.ModItems;
|
||||||
|
import nmd.primal.forgecraft.tiles.TileAnvil;
|
||||||
|
import nmd.primal.forgecraft.util.AnvilHandler;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by mminaie on 6/10/17.
|
||||||
|
*/
|
||||||
|
public class AnvilIron extends AnvilBase implements AnvilHandler {
|
||||||
|
|
||||||
|
public AnvilIron(Material material, String registryName, Float hardness, Boolean anvil) {
|
||||||
|
super(material, registryName, hardness, anvil);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing facing, float hitx, float hity, float hitz) {
|
||||||
|
|
||||||
|
/******************************************************************************
|
||||||
|
Crafting AnvilStone Recipes
|
||||||
|
*****************************************************************************/
|
||||||
|
if (!world.isRemote) {
|
||||||
|
ItemStack pItem = player.inventory.getCurrentItem();
|
||||||
|
TileAnvil tile = (TileAnvil) world.getTileEntity(pos);
|
||||||
|
if (tile != null) {
|
||||||
|
if ((pItem.getItem() instanceof WorkMallet) || (pItem.getItem() == ModItems.forgehammer)) {
|
||||||
|
String[] tempArray = new String[25];
|
||||||
|
for (int i = 0; i < 25; i++) {
|
||||||
|
tempArray[i] = tile.getSlotStack(i).getItem().getRegistryName().toString();
|
||||||
|
}
|
||||||
|
/*for (int i = 0; i < 25; i++) {
|
||||||
|
if (tile.getSlotStack(i).getItem() instanceof BaseMultiItem) {
|
||||||
|
if (((BaseMultiItem) tile.getSlotStack(i).getItem()).getMaterial(tile.getSlotStack(i).getItem()) != PrimalMaterials.TOOL_BASIC_STEEL
|
||||||
|
|| ((BaseMultiItem) tile.getSlotStack(i).getItem()).getMaterial(tile.getSlotStack(i).getItem()) != PrimalMaterials.TOOL_CLEAN_IRON
|
||||||
|
|| ((BaseMultiItem) tile.getSlotStack(i).getItem()).getMaterial(tile.getSlotStack(i).getItem()) != PrimalMaterials.TOOL_WROUGHT_IRON
|
||||||
|
) {
|
||||||
|
world.setBlockState(pos, Blocks.AIR.getDefaultState(), 2);
|
||||||
|
CommonUtils.spawnItemEntityFromWorld(world, pos, new ItemStack(PrimalItems.ROCK_STONE, 3));
|
||||||
|
CommonUtils.spawnItemEntityFromWorld(world, pos, new ItemStack(ModBlocks.ironball, 1));
|
||||||
|
this.breakBlock(world, pos, state);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}*/
|
||||||
|
doAnvilRecipe(pItem, tempArray, world, tile, pos, player);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
doAnvilInventoryManager(pItem, world, tile, pos, hitx, hity, hitz, state, player);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
package nmd.primal.forgecraft.blocks.Anvil;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by mminaie on 6/10/17.
|
||||||
|
*/
|
||||||
|
public class AnvilSteel {
|
||||||
|
}
|
||||||
@@ -0,0 +1,65 @@
|
|||||||
|
package nmd.primal.forgecraft.blocks.Anvil;
|
||||||
|
|
||||||
|
import net.minecraft.block.material.Material;
|
||||||
|
import net.minecraft.block.state.IBlockState;
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.init.Blocks;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.util.EnumFacing;
|
||||||
|
import net.minecraft.util.EnumHand;
|
||||||
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import nmd.primal.core.api.PrimalItems;
|
||||||
|
import nmd.primal.core.api.PrimalMaterials;
|
||||||
|
import nmd.primal.core.common.items.tools.WorkMallet;
|
||||||
|
import nmd.primal.forgecraft.CommonUtils;
|
||||||
|
import nmd.primal.forgecraft.init.ModBlocks;
|
||||||
|
import nmd.primal.forgecraft.init.ModItems;
|
||||||
|
import nmd.primal.forgecraft.items.BaseMultiItem;
|
||||||
|
import nmd.primal.forgecraft.tiles.TileAnvil;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by mminaie on 3/4/17.
|
||||||
|
*/
|
||||||
|
public class AnvilStone extends AnvilBase {
|
||||||
|
|
||||||
|
public AnvilStone(Material material, String registryName, Float hardness, Boolean anvil) {
|
||||||
|
super(material, registryName, hardness, anvil);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing facing, float hitx, float hity, float hitz) {
|
||||||
|
|
||||||
|
/******************************************************************************
|
||||||
|
Crafting AnvilStone Recipes
|
||||||
|
*****************************************************************************/
|
||||||
|
if (!world.isRemote) {
|
||||||
|
ItemStack pItem = player.inventory.getCurrentItem();
|
||||||
|
TileAnvil tile = (TileAnvil) world.getTileEntity(pos);
|
||||||
|
if (tile != null) {
|
||||||
|
if ((pItem.getItem() instanceof WorkMallet) || (pItem.getItem() == ModItems.forgehammer)) {
|
||||||
|
String[] tempArray = new String[25];
|
||||||
|
for (int i = 0; i < 25; i++) {
|
||||||
|
tempArray[i] = tile.getSlotStack(i).getItem().getRegistryName().toString();
|
||||||
|
}
|
||||||
|
for (int i = 0; i < 25; i++) {
|
||||||
|
if (tile.getSlotStack(i).getItem() instanceof BaseMultiItem) {
|
||||||
|
if (((BaseMultiItem) tile.getSlotStack(i).getItem()).getMaterial(tile.getSlotStack(i).getItem()) != PrimalMaterials.TOOL_WROUGHT_IRON) {
|
||||||
|
world.setBlockState(pos, Blocks.AIR.getDefaultState(), 2);
|
||||||
|
CommonUtils.spawnItemEntityFromWorld(world, pos, new ItemStack(PrimalItems.ROCK_STONE, 3));
|
||||||
|
CommonUtils.spawnItemEntityFromWorld(world, pos, new ItemStack(ModBlocks.ironball, 1));
|
||||||
|
this.breakBlock(world, pos, state);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
doAnvilRecipe(pItem, tempArray, world, tile, pos, player);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
doAnvilInventoryManager(pItem, world, tile, pos, hitx, hity, hitz, state, player);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -33,12 +33,6 @@ public class BlockCustomBase extends BlockBase {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isFullyOpaque(IBlockState state)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isOpaqueCube(IBlockState state)
|
public boolean isOpaqueCube(IBlockState state)
|
||||||
{
|
{
|
||||||
422
kfc/src/main/java/nmd/primal/forgecraft/blocks/BloomeryBase.java
Normal file
422
kfc/src/main/java/nmd/primal/forgecraft/blocks/BloomeryBase.java
Normal file
@@ -0,0 +1,422 @@
|
|||||||
|
package nmd.primal.forgecraft.blocks;
|
||||||
|
|
||||||
|
import net.minecraft.block.ITileEntityProvider;
|
||||||
|
import net.minecraft.block.material.Material;
|
||||||
|
import net.minecraft.block.properties.IProperty;
|
||||||
|
import net.minecraft.block.state.BlockStateContainer;
|
||||||
|
import net.minecraft.block.state.IBlockState;
|
||||||
|
import net.minecraft.entity.Entity;
|
||||||
|
import net.minecraft.entity.EntityLivingBase;
|
||||||
|
import net.minecraft.entity.item.EntityItem;
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.init.SoundEvents;
|
||||||
|
import net.minecraft.item.ItemSpade;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
import net.minecraft.util.*;
|
||||||
|
import net.minecraft.util.math.AxisAlignedBB;
|
||||||
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
import net.minecraft.util.text.ITextComponent;
|
||||||
|
import net.minecraft.util.text.TextComponentString;
|
||||||
|
import net.minecraft.world.IBlockAccess;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraftforge.fml.relauncher.Side;
|
||||||
|
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||||
|
import nmd.primal.core.api.PrimalStates;
|
||||||
|
import nmd.primal.core.common.crafting.FireSource;
|
||||||
|
import nmd.primal.core.common.helper.PlayerHelper;
|
||||||
|
import nmd.primal.forgecraft.ModInfo;
|
||||||
|
import nmd.primal.forgecraft.crafting.BloomeryCrafting;
|
||||||
|
import nmd.primal.forgecraft.tiles.TileBloomery;
|
||||||
|
|
||||||
|
import java.util.Random;
|
||||||
|
import java.util.concurrent.ThreadLocalRandom;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by mminaie on 6/11/17.
|
||||||
|
*/
|
||||||
|
public class BloomeryBase extends CustomContainerFacing implements ITileEntityProvider {
|
||||||
|
|
||||||
|
//public static final PropertyBool COVERED = PropertyBool.create("covered");
|
||||||
|
private int maxHeat;
|
||||||
|
public AxisAlignedBB AABB = new AxisAlignedBB(5/32D, 0.0D, 5/32D, 27/32D, 12/16D, 27/32D);
|
||||||
|
|
||||||
|
public BloomeryBase(Material material, String registryName, Integer maxHeat) {
|
||||||
|
super(material, registryName);
|
||||||
|
setCreativeTab(ModInfo.TAB_FORGECRAFT);
|
||||||
|
setDefaultState(this.blockState.getBaseState().withProperty(FACING, EnumFacing.NORTH).withProperty(PrimalStates.ACTIVE, Boolean.valueOf(false)));
|
||||||
|
setHardness(3.0f);
|
||||||
|
setResistance(5.0f);
|
||||||
|
this.maxHeat=maxHeat;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos)
|
||||||
|
{
|
||||||
|
return AABB;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getMaxHeat() {
|
||||||
|
return maxHeat;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMaxHeat(int maxHeat) {
|
||||||
|
this.maxHeat = maxHeat;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public TileEntity createNewTileEntity(World worldIn, int meta)
|
||||||
|
{
|
||||||
|
return new TileBloomery();
|
||||||
|
}
|
||||||
|
|
||||||
|
/*@Override
|
||||||
|
public void randomTick(World world, BlockPos pos, IBlockState state, Random random)
|
||||||
|
{
|
||||||
|
this.updateTick(world, pos, state, random);
|
||||||
|
if(!world.isRemote){
|
||||||
|
if(state.getValue(PrimalStates.ACTIVE) == true) {
|
||||||
|
FireHelper.makeSmoke(world, pos, 50);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}*/
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ)
|
||||||
|
{
|
||||||
|
|
||||||
|
if (world.isRemote)
|
||||||
|
return true;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
TileBloomery tile = (TileBloomery) world.getTileEntity(pos);
|
||||||
|
if (tile != null) {
|
||||||
|
ItemStack pItem = player.inventory.getCurrentItem();
|
||||||
|
ItemStack tileItem = tile.getSlotStack(0);
|
||||||
|
ItemStack tileItem1 = tile.getSlotStack(1);
|
||||||
|
if(pItem.isEmpty()) {
|
||||||
|
|
||||||
|
if(!player.isSneaking()){
|
||||||
|
if(world.getBlockState(pos).getValue(PrimalStates.ACTIVE) == true){
|
||||||
|
|
||||||
|
Integer bloomeryHeat = tile.getHeat();
|
||||||
|
String display = "\n" + "Current Temp: " + bloomeryHeat.toString() +
|
||||||
|
" Fuel Remaining: " + tileItem.getCount();
|
||||||
|
ITextComponent itextcomponent = new TextComponentString(display);
|
||||||
|
player.sendStatusMessage(itextcomponent, false);
|
||||||
|
|
||||||
|
BloomeryCrafting recipe = BloomeryCrafting.getRecipe(tile.getSlotStack(1));
|
||||||
|
if(recipe != null) {
|
||||||
|
Integer minTemp = recipe.getHeatThreshold();
|
||||||
|
Integer cookCounter = tile.getCookCounter();
|
||||||
|
Integer idealTime = recipe.getIdealTime();
|
||||||
|
Integer remainingTime = idealTime - cookCounter;
|
||||||
|
|
||||||
|
String display1 =
|
||||||
|
"Cooking: " + tileItem1.getDisplayName() +
|
||||||
|
" Target Temp: " + minTemp.toString() +
|
||||||
|
" Time Left: " + remainingTime.toString();
|
||||||
|
ITextComponent itextcomponent1 = new TextComponentString(display1);
|
||||||
|
player.sendStatusMessage(itextcomponent1, false);
|
||||||
|
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(tile.getSlotStack(0) != ItemStack.EMPTY) {
|
||||||
|
if((FireSource.useSource(world, pos, player, pItem, hand, facing, hitX, hitY, hitZ))) {
|
||||||
|
world.setBlockState(pos, state.withProperty(PrimalStates.ACTIVE, true), 2);
|
||||||
|
tile.setHeat(100);
|
||||||
|
tile.markDirty();
|
||||||
|
tile.updateBlock();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if((!pItem.isEmpty()) && tile.isItemValidForSlot(0, pItem)) {
|
||||||
|
if (!tileItem.isEmpty()){
|
||||||
|
if(pItem.getItem() == tileItem.getItem()){
|
||||||
|
if(tileItem.getCount() < 64){
|
||||||
|
if(tileItem.getCount() + pItem.getCount() <= 64){
|
||||||
|
tileItem.grow(pItem.getCount());
|
||||||
|
player.inventory.setInventorySlotContents(player.inventory.currentItem, ItemStack.EMPTY);
|
||||||
|
tile.markDirty();
|
||||||
|
tile.updateBlock();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if(tileItem.getCount() + pItem.getCount() > 64){
|
||||||
|
pItem.setCount(64-pItem.getCount());
|
||||||
|
tileItem.setCount(64);
|
||||||
|
tile.markDirty();
|
||||||
|
tile.updateBlock();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(tileItem.isEmpty()) {
|
||||||
|
tile.setSlotStack(0, pItem);
|
||||||
|
player.inventory.setInventorySlotContents(player.inventory.currentItem, ItemStack.EMPTY);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if((!pItem.isEmpty()) && tile.isItemValidForSlot(1, pItem)) {
|
||||||
|
if (!tileItem1.isEmpty()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if(tileItem1.isEmpty()){
|
||||||
|
ItemStack tempItem = new ItemStack(pItem.getItem(), 1);
|
||||||
|
tile.setSlotStack(1, tempItem);
|
||||||
|
pItem.shrink(1);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (player.isSneaking()) {
|
||||||
|
if (!tile.getSlotStack(0).isEmpty()) {
|
||||||
|
if(player.inventory.getCurrentItem().getItem() instanceof ItemSpade) {
|
||||||
|
ItemStack returnStack = tile.getSlotStack(0).copy();
|
||||||
|
PlayerHelper.spawnItemOnPlayer(world, player, returnStack);
|
||||||
|
tile.clearSlot(0);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getLightValue(IBlockState state, IBlockAccess world, BlockPos pos)
|
||||||
|
{
|
||||||
|
int lightState =0;
|
||||||
|
if(state.getValue(PrimalStates.ACTIVE) == true){
|
||||||
|
lightState = 10;
|
||||||
|
}
|
||||||
|
return lightState;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getFlammability(IBlockAccess world, BlockPos pos, EnumFacing face)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isFlammable(IBlockAccess world, BlockPos pos, EnumFacing face)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isFireSource(World world, BlockPos pos, EnumFacing side)
|
||||||
|
{
|
||||||
|
if(!world.isRemote){
|
||||||
|
if(world.getBlockState(pos).getValue(PrimalStates.ACTIVE)==true){
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onEntityCollidedWithBlock(World world, BlockPos pos, IBlockState state, Entity ent)
|
||||||
|
{
|
||||||
|
if(ent instanceof EntityPlayer){
|
||||||
|
if(state.getValue(PrimalStates.ACTIVE) == true){
|
||||||
|
ent.setFire(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called serverside after this block is replaced with another in Chunk, but before the Tile Entity is updated
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void breakBlock(World world, BlockPos pos, IBlockState state)
|
||||||
|
{
|
||||||
|
if (!world.isRemote && world.getGameRules().getBoolean("doTileDrops"))
|
||||||
|
{
|
||||||
|
TileBloomery tile = (TileBloomery) world.getTileEntity(pos);
|
||||||
|
if (tile !=null)
|
||||||
|
{
|
||||||
|
for (ItemStack stack : tile.getSlotList())
|
||||||
|
{
|
||||||
|
if (stack != null) {
|
||||||
|
float offset = 0.7F;
|
||||||
|
double offsetX = world.rand.nextFloat() * offset + (1.0F - offset) * 0.5D;
|
||||||
|
double offsetY = world.rand.nextFloat() * offset + (1.0F - offset) * 0.5D;
|
||||||
|
double offsetZ = world.rand.nextFloat() * offset + (1.0F - offset) * 0.5D;
|
||||||
|
EntityItem item = new EntityItem(world, pos.getX() + offsetX, pos.getY() + offsetY, pos.getZ() + offsetZ, stack);
|
||||||
|
item.setDefaultPickupDelay();
|
||||||
|
world.spawnEntity(item);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
super.breakBlock(world, pos, state);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBlockPlacedBy(World worldIn, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack)
|
||||||
|
{
|
||||||
|
if(!worldIn.isRemote) {
|
||||||
|
worldIn.setBlockState(pos, state.withProperty(FACING, placer.getHorizontalFacing()).withProperty(PrimalStates.ACTIVE, Boolean.valueOf(false)), 2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getMetaFromState(IBlockState state) {
|
||||||
|
int i = 0;
|
||||||
|
|
||||||
|
if( (state.getValue(FACING) == EnumFacing.EAST) && state.getValue(PrimalStates.ACTIVE) == false){
|
||||||
|
i = 0;
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
if( (state.getValue(FACING) == EnumFacing.WEST) && state.getValue(PrimalStates.ACTIVE) == false){
|
||||||
|
i = 1;
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
if( (state.getValue(FACING) == EnumFacing.SOUTH) && state.getValue(PrimalStates.ACTIVE) == false){
|
||||||
|
i = 2;
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
if( (state.getValue(FACING) == EnumFacing.NORTH) && state.getValue(PrimalStates.ACTIVE) == false){
|
||||||
|
i = 3;
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
if( (state.getValue(FACING) == EnumFacing.EAST) && state.getValue(PrimalStates.ACTIVE) == true){
|
||||||
|
i = 4;
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
if( (state.getValue(FACING) == EnumFacing.WEST) && state.getValue(PrimalStates.ACTIVE) == true){
|
||||||
|
i = 5;
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
if( (state.getValue(FACING) == EnumFacing.SOUTH) && state.getValue(PrimalStates.ACTIVE) == true){
|
||||||
|
i = 6;
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
if( (state.getValue(FACING) == EnumFacing.NORTH) && state.getValue(PrimalStates.ACTIVE) == true){
|
||||||
|
i = 7;
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IBlockState getStateFromMeta(int meta) {
|
||||||
|
EnumFacing enumfacing;
|
||||||
|
Boolean active;
|
||||||
|
switch (meta & 7)
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
enumfacing = EnumFacing.EAST;
|
||||||
|
active = false;
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
enumfacing = EnumFacing.WEST;
|
||||||
|
active = false;
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
enumfacing = EnumFacing.SOUTH;
|
||||||
|
active = false;
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
enumfacing = EnumFacing.NORTH;
|
||||||
|
active = false;
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
enumfacing = EnumFacing.EAST;
|
||||||
|
active = true;
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
enumfacing = EnumFacing.WEST;
|
||||||
|
active = true;
|
||||||
|
break;
|
||||||
|
case 6:
|
||||||
|
enumfacing = EnumFacing.SOUTH;
|
||||||
|
active = true;
|
||||||
|
break;
|
||||||
|
case 7:
|
||||||
|
enumfacing = EnumFacing.NORTH;
|
||||||
|
active = true;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
enumfacing = EnumFacing.NORTH;
|
||||||
|
active = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return this.getDefaultState().withProperty(FACING, enumfacing).withProperty(PrimalStates.ACTIVE, Boolean.valueOf(active));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected BlockStateContainer createBlockState() {
|
||||||
|
return new BlockStateContainer(this, new IProperty[] {FACING, PrimalStates.ACTIVE});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isFullCube(IBlockState state)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isOpaqueCube(IBlockState state)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
public boolean shouldSideBeRendered(IBlockState blockState, IBlockAccess blockAccess, BlockPos pos, EnumFacing side)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public EnumBlockRenderType getRenderType(IBlockState state)
|
||||||
|
{
|
||||||
|
return EnumBlockRenderType.MODEL;
|
||||||
|
}
|
||||||
|
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
@SuppressWarnings("incomplete-switch")
|
||||||
|
public void randomDisplayTick(IBlockState state, World world, BlockPos pos, Random rand)
|
||||||
|
{
|
||||||
|
if(state.getValue(PrimalStates.ACTIVE) == true)
|
||||||
|
{
|
||||||
|
double d0 = (double)pos.getX() + 0.5D;
|
||||||
|
double d1 = (double)pos.getY() + 0.2D;
|
||||||
|
double d2 = (double)pos.getZ() + 0.5D;
|
||||||
|
double d3 = 0.52D;
|
||||||
|
double d4 = ThreadLocalRandom.current().nextDouble(0.075, 0.35);
|
||||||
|
double ySpeed = ThreadLocalRandom.current().nextDouble(0.0, 0.075);
|
||||||
|
|
||||||
|
if (rand.nextDouble() < 0.1D)
|
||||||
|
{
|
||||||
|
world.playSound((double)pos.getX() + 0.5D, (double)pos.getY(), (double)pos.getZ() + 0.5D, SoundEvents.BLOCK_FURNACE_FIRE_CRACKLE, SoundCategory.BLOCKS, 1.0F, 1.0F, false);
|
||||||
|
}
|
||||||
|
if(rand.nextInt(4) == 1){
|
||||||
|
world.spawnParticle(EnumParticleTypes.FLAME, d0+d4, d1, d2+d4, 0.0D, ySpeed, 0.0D, new int[0]);
|
||||||
|
world.spawnParticle(EnumParticleTypes.FLAME, d0+d4, d1, d2-d4, 0.0D, ySpeed, 0.0D, new int[0]);
|
||||||
|
}
|
||||||
|
if(rand.nextInt(4) == 2){
|
||||||
|
world.spawnParticle(EnumParticleTypes.FLAME, d0+d4, d1, d2-d4, 0.0D, ySpeed, 0.0D, new int[0]);
|
||||||
|
world.spawnParticle(EnumParticleTypes.FLAME, d0-d4, d1, d2+d4, 0.0D, ySpeed, 0.0D, new int[0]);
|
||||||
|
}
|
||||||
|
if(rand.nextInt(4) == 3){
|
||||||
|
world.spawnParticle(EnumParticleTypes.FLAME, d0-d4, d1, d2+d4, 0.0D, ySpeed, 0.0D, new int[0]);
|
||||||
|
world.spawnParticle(EnumParticleTypes.FLAME, d0-d4, d1, d2-d4, 0.0D, ySpeed, 0.0D, new int[0]);
|
||||||
|
}
|
||||||
|
if(rand.nextInt(4) == 4){
|
||||||
|
world.spawnParticle(EnumParticleTypes.FLAME, d0-d4, d1, d2-d4, 0.0D, ySpeed, 0.0D, new int[0]);
|
||||||
|
world.spawnParticle(EnumParticleTypes.FLAME, d0+d4, d1, d2+d4, 0.0D, ySpeed, 0.0D, new int[0]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -2,91 +2,46 @@ package nmd.primal.forgecraft.blocks;
|
|||||||
|
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.block.properties.IProperty;
|
import net.minecraft.block.properties.IProperty;
|
||||||
import net.minecraft.block.properties.PropertyBool;
|
|
||||||
import net.minecraft.block.state.BlockStateContainer;
|
import net.minecraft.block.state.BlockStateContainer;
|
||||||
import net.minecraft.block.state.IBlockState;
|
import net.minecraft.block.state.IBlockState;
|
||||||
import net.minecraft.entity.EntityLivingBase;
|
import net.minecraft.entity.EntityLivingBase;
|
||||||
import net.minecraft.entity.item.EntityItem;
|
import net.minecraft.entity.item.EntityItem;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.init.Blocks;
|
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.util.EnumBlockRenderType;
|
import net.minecraft.util.EnumBlockRenderType;
|
||||||
import net.minecraft.util.EnumFacing;
|
import net.minecraft.util.EnumFacing;
|
||||||
import net.minecraft.util.EnumHand;
|
import net.minecraft.util.EnumHand;
|
||||||
|
import net.minecraft.util.math.AxisAlignedBB;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.world.IBlockAccess;
|
import net.minecraft.world.IBlockAccess;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraftforge.fml.relauncher.Side;
|
import net.minecraftforge.fml.relauncher.Side;
|
||||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||||
import nmd.primal.core.api.PrimalItems;
|
import nmd.primal.core.api.PrimalStates;
|
||||||
import nmd.primal.core.common.items.tools.WorkMallet;
|
import nmd.primal.core.common.items.tools.WorkMallet;
|
||||||
import nmd.primal.forgecraft.CommonUtils;
|
|
||||||
import nmd.primal.forgecraft.ModInfo;
|
import nmd.primal.forgecraft.ModInfo;
|
||||||
import nmd.primal.forgecraft.tiles.TileBreaker;
|
import nmd.primal.forgecraft.tiles.TileBreaker;
|
||||||
|
import nmd.primal.forgecraft.util.BreakerHandler;
|
||||||
import java.util.concurrent.ThreadLocalRandom;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by mminaie on 4/9/17.
|
* Created by mminaie on 4/9/17.
|
||||||
*/
|
*/
|
||||||
public class Breaker extends CustomContainerFacing {
|
public class Breaker extends CustomContainerFacing implements BreakerHandler {
|
||||||
|
|
||||||
public static final PropertyBool ACTIVE = PropertyBool.create("active");
|
public AxisAlignedBB AABB = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 6/16D, 1.0D);
|
||||||
|
|
||||||
public Breaker(Material material, String registryName, Float hardness) {
|
public Breaker(Material material, String registryName, Float hardness) {
|
||||||
super(material);
|
super(material, registryName);
|
||||||
setUnlocalizedName(registryName);
|
|
||||||
setRegistryName(registryName);
|
|
||||||
setCreativeTab(ModInfo.TAB_FORGECRAFT);
|
setCreativeTab(ModInfo.TAB_FORGECRAFT);
|
||||||
setDefaultState(this.blockState.getBaseState().withProperty(FACING, EnumFacing.NORTH).withProperty(ACTIVE, false));
|
setDefaultState(this.blockState.getBaseState().withProperty(FACING, EnumFacing.NORTH).withProperty(PrimalStates.ACTIVE, false));
|
||||||
setHardness(hardness);
|
setHardness(hardness);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void doWork (World world, IBlockState state, BlockPos pos, TileBreaker tile){
|
@Override
|
||||||
if (state.getValue(FACING) == EnumFacing.EAST) {
|
public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos)
|
||||||
if(tile.getCharge() > world.getBlockState(pos.east()).getBlockHardness(world, pos.east())) {
|
{
|
||||||
if (world.getBlockState(pos.east()).getBlock() == Blocks.IRON_ORE) {
|
return AABB;
|
||||||
world.setBlockToAir(pos.east());
|
|
||||||
CommonUtils.spawnItemEntityFromWorld(world, pos.east(), new ItemStack(PrimalItems.IRON_DUST, ThreadLocalRandom.current().nextInt(1, 2)));
|
|
||||||
tile.getSlotStack(0).setItemDamage(tile.getSlotStack(0).getItemDamage()-1);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
tile.getSlotStack(0).setItemDamage(tile.getSlotStack(0).getItemDamage()-10);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (state.getValue(FACING) == EnumFacing.WEST) {
|
|
||||||
if(tile.getCharge() > world.getBlockState(pos.west()).getBlockHardness(world, pos.west())) {
|
|
||||||
if (world.getBlockState(pos.west()).getBlock() == Blocks.IRON_ORE) {
|
|
||||||
world.setBlockToAir(pos.west());
|
|
||||||
CommonUtils.spawnItemEntityFromWorld(world, pos.east(), new ItemStack(PrimalItems.IRON_DUST, ThreadLocalRandom.current().nextInt(1, 2)));
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
tile.getSlotStack(0).setItemDamage(tile.getSlotStack(0).getItemDamage()-10);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (state.getValue(FACING) == EnumFacing.SOUTH) {
|
|
||||||
if(tile.getCharge() > world.getBlockState(pos.south()).getBlockHardness(world, pos.south())) {
|
|
||||||
if (world.getBlockState(pos.south()).getBlock() == Blocks.IRON_ORE) {
|
|
||||||
world.setBlockToAir(pos.south());
|
|
||||||
CommonUtils.spawnItemEntityFromWorld(world, pos.east(), new ItemStack(PrimalItems.IRON_DUST, ThreadLocalRandom.current().nextInt(1, 2)));
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
tile.getSlotStack(0).setItemDamage(tile.getSlotStack(0).getItemDamage()-10);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (state.getValue(FACING) == EnumFacing.NORTH) {
|
|
||||||
if(tile.getCharge() > world.getBlockState(pos.north()).getBlockHardness(world, pos.north())) {
|
|
||||||
if (world.getBlockState(pos.north()).getBlock() == Blocks.IRON_ORE) {
|
|
||||||
world.setBlockToAir(pos.north());
|
|
||||||
CommonUtils.spawnItemEntityFromWorld(world, pos.east(), new ItemStack(PrimalItems.IRON_DUST, ThreadLocalRandom.current().nextInt(1, 2)));
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
//tile.getSlotStack(0).damageItem(10, (EntityPlayer) null);
|
|
||||||
tile.getSlotStack(0).setItemDamage(tile.getSlotStack(0).getItemDamage()-10);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
tile.setCharge(0.0f);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -96,30 +51,36 @@ public class Breaker extends CustomContainerFacing {
|
|||||||
TileBreaker tile = (TileBreaker) world.getTileEntity(pos);
|
TileBreaker tile = (TileBreaker) world.getTileEntity(pos);
|
||||||
ItemStack pItem = player.inventory.getCurrentItem();
|
ItemStack pItem = player.inventory.getCurrentItem();
|
||||||
|
|
||||||
if(state.getValue(ACTIVE) == true && player.isSneaking() && pItem.isEmpty()){
|
if(state.getValue(PrimalStates.ACTIVE) == true && player.isSneaking() && pItem.isEmpty()){
|
||||||
world.setBlockState(pos, state.withProperty(FACING, state.getValue(FACING)).withProperty(ACTIVE, false));
|
doBreaking(world, state, pos, tile);
|
||||||
|
world.setBlockState(pos, state.withProperty(FACING, state.getValue(FACING)).withProperty(PrimalStates.ACTIVE, false));
|
||||||
|
|
||||||
doWork(world, state, pos, tile);
|
tile.setCharge(0);
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
if(!player.isSneaking() && pItem.isEmpty()) {
|
if(!player.isSneaking() && pItem.isEmpty()) {
|
||||||
if (!state.getValue(ACTIVE)) {
|
if (!state.getValue(PrimalStates.ACTIVE)) {
|
||||||
world.setBlockState(pos, state.withProperty(FACING, state.getValue(FACING)).withProperty(ACTIVE, true), 2);
|
world.setBlockState(pos, state.withProperty(FACING, state.getValue(FACING)).withProperty(PrimalStates.ACTIVE, true), 2);
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
if(tile.getCharge() < 181) {
|
if(state.getValue(PrimalStates.ACTIVE)) {
|
||||||
|
if (tile.getCharge() < 181) {
|
||||||
tile.setCharge(tile.getCharge() + 2.0f);
|
tile.setCharge(tile.getCharge() + 2.0f);
|
||||||
tile.updateBlock();
|
tile.updateBlock();
|
||||||
//System.out.println(tile.charge);
|
//System.out.println(tile.charge);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if(pItem.getItem() instanceof WorkMallet){
|
if(pItem.getItem() instanceof WorkMallet){
|
||||||
|
|
||||||
tile.setSlotStack(0, player.inventory.getCurrentItem());
|
tile.setSlotStack(0, player.inventory.getCurrentItem());
|
||||||
player.inventory.setInventorySlotContents(player.inventory.currentItem, ItemStack.EMPTY);
|
player.inventory.setInventorySlotContents(player.inventory.currentItem, ItemStack.EMPTY);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
@@ -161,7 +122,7 @@ public class Breaker extends CustomContainerFacing {
|
|||||||
public void onBlockPlacedBy(World worldIn, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack)
|
public void onBlockPlacedBy(World worldIn, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack)
|
||||||
{
|
{
|
||||||
//if(!worldIn.isRemote) {
|
//if(!worldIn.isRemote) {
|
||||||
worldIn.setBlockState(pos, state.withProperty(FACING, placer.getHorizontalFacing()).withProperty(ACTIVE, false), 2);
|
worldIn.setBlockState(pos, state.withProperty(FACING, placer.getHorizontalFacing()).withProperty(PrimalStates.ACTIVE, false), 2);
|
||||||
//}
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -169,7 +130,7 @@ public class Breaker extends CustomContainerFacing {
|
|||||||
public int getMetaFromState(IBlockState state) {
|
public int getMetaFromState(IBlockState state) {
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
||||||
if(state.getValue(ACTIVE ) == false) {
|
if(state.getValue(PrimalStates.ACTIVE ) == false) {
|
||||||
if (state.getValue(FACING) == EnumFacing.EAST) {
|
if (state.getValue(FACING) == EnumFacing.EAST) {
|
||||||
i = 0;
|
i = 0;
|
||||||
return i;
|
return i;
|
||||||
@@ -188,7 +149,7 @@ public class Breaker extends CustomContainerFacing {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(state.getValue(ACTIVE)) {
|
if(state.getValue(PrimalStates.ACTIVE)) {
|
||||||
if (state.getValue(FACING) == EnumFacing.EAST) {
|
if (state.getValue(FACING) == EnumFacing.EAST) {
|
||||||
i = 4;
|
i = 4;
|
||||||
return i;
|
return i;
|
||||||
@@ -215,35 +176,35 @@ public class Breaker extends CustomContainerFacing {
|
|||||||
IBlockState iblockstate = this.getDefaultState();
|
IBlockState iblockstate = this.getDefaultState();
|
||||||
|
|
||||||
if (meta == 0){
|
if (meta == 0){
|
||||||
iblockstate = iblockstate.withProperty(FACING, EnumFacing.EAST).withProperty(ACTIVE, false);
|
iblockstate = iblockstate.withProperty(FACING, EnumFacing.EAST).withProperty(PrimalStates.ACTIVE, false);
|
||||||
}
|
}
|
||||||
if (meta == 1) {
|
if (meta == 1) {
|
||||||
iblockstate = iblockstate.withProperty(FACING, EnumFacing.WEST).withProperty(ACTIVE, false);
|
iblockstate = iblockstate.withProperty(FACING, EnumFacing.WEST).withProperty(PrimalStates.ACTIVE, false);
|
||||||
}
|
}
|
||||||
if (meta == 2) {
|
if (meta == 2) {
|
||||||
iblockstate = iblockstate.withProperty(FACING, EnumFacing.SOUTH).withProperty(ACTIVE, false);
|
iblockstate = iblockstate.withProperty(FACING, EnumFacing.SOUTH).withProperty(PrimalStates.ACTIVE, false);
|
||||||
}
|
}
|
||||||
if (meta == 3) {
|
if (meta == 3) {
|
||||||
iblockstate = iblockstate.withProperty(FACING, EnumFacing.NORTH).withProperty(ACTIVE, false);
|
iblockstate = iblockstate.withProperty(FACING, EnumFacing.NORTH).withProperty(PrimalStates.ACTIVE, false);
|
||||||
}
|
}
|
||||||
if (meta == 4){
|
if (meta == 4){
|
||||||
iblockstate = iblockstate.withProperty(FACING, EnumFacing.EAST).withProperty(ACTIVE, true);
|
iblockstate = iblockstate.withProperty(FACING, EnumFacing.EAST).withProperty(PrimalStates.ACTIVE, true);
|
||||||
}
|
}
|
||||||
if (meta == 5) {
|
if (meta == 5) {
|
||||||
iblockstate = iblockstate.withProperty(FACING, EnumFacing.WEST).withProperty(ACTIVE, true);
|
iblockstate = iblockstate.withProperty(FACING, EnumFacing.WEST).withProperty(PrimalStates.ACTIVE, true);
|
||||||
}
|
}
|
||||||
if (meta == 6) {
|
if (meta == 6) {
|
||||||
iblockstate = iblockstate.withProperty(FACING, EnumFacing.SOUTH).withProperty(ACTIVE, true);
|
iblockstate = iblockstate.withProperty(FACING, EnumFacing.SOUTH).withProperty(PrimalStates.ACTIVE, true);
|
||||||
}
|
}
|
||||||
if (meta == 7) {
|
if (meta == 7) {
|
||||||
iblockstate = iblockstate.withProperty(FACING, EnumFacing.NORTH).withProperty(ACTIVE, true);
|
iblockstate = iblockstate.withProperty(FACING, EnumFacing.NORTH).withProperty(PrimalStates.ACTIVE, true);
|
||||||
}
|
}
|
||||||
return iblockstate;
|
return iblockstate;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected BlockStateContainer createBlockState() {
|
protected BlockStateContainer createBlockState() {
|
||||||
return new BlockStateContainer(this, new IProperty[] {ACTIVE, FACING});
|
return new BlockStateContainer(this, new IProperty[] {PrimalStates.ACTIVE, FACING});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -252,11 +213,6 @@ public class Breaker extends CustomContainerFacing {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isFullyOpaque(IBlockState state)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isOpaqueCube(IBlockState state)
|
public boolean isOpaqueCube(IBlockState state)
|
||||||
689
kfc/src/main/java/nmd/primal/forgecraft/blocks/CastingBlock.java
Normal file
689
kfc/src/main/java/nmd/primal/forgecraft/blocks/CastingBlock.java
Normal file
@@ -0,0 +1,689 @@
|
|||||||
|
package nmd.primal.forgecraft.blocks;
|
||||||
|
|
||||||
|
import net.minecraft.block.material.Material;
|
||||||
|
import net.minecraft.block.properties.IProperty;
|
||||||
|
import net.minecraft.block.state.BlockStateContainer;
|
||||||
|
import net.minecraft.block.state.IBlockState;
|
||||||
|
import net.minecraft.entity.EntityLivingBase;
|
||||||
|
import net.minecraft.entity.item.EntityItem;
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
import net.minecraft.util.EnumBlockRenderType;
|
||||||
|
import net.minecraft.util.EnumFacing;
|
||||||
|
import net.minecraft.util.EnumHand;
|
||||||
|
import net.minecraft.util.EnumParticleTypes;
|
||||||
|
import net.minecraft.util.math.AxisAlignedBB;
|
||||||
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
import net.minecraft.world.IBlockAccess;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraftforge.fml.relauncher.Side;
|
||||||
|
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||||
|
import nmd.primal.core.common.helper.CommonUtils;
|
||||||
|
import nmd.primal.core.common.helper.PlayerHelper;
|
||||||
|
import nmd.primal.forgecraft.ModInfo;
|
||||||
|
import nmd.primal.forgecraft.init.ModBlocks;
|
||||||
|
import nmd.primal.forgecraft.init.ModItems;
|
||||||
|
import nmd.primal.forgecraft.items.casting.CastingPart;
|
||||||
|
import nmd.primal.forgecraft.tiles.TileCastingBlock;
|
||||||
|
|
||||||
|
import java.util.Random;
|
||||||
|
import java.util.concurrent.ThreadLocalRandom;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by mminaie on 6/24/17.
|
||||||
|
*/
|
||||||
|
public class CastingBlock extends CustomContainerFacing {
|
||||||
|
|
||||||
|
protected static AxisAlignedBB bound = new AxisAlignedBB(0/16D, 0.0D, 0/16D, 16/16D, 5.5/16D, 16/16D);
|
||||||
|
|
||||||
|
public CastingBlock(Material material, String registryName) {
|
||||||
|
super(material, registryName);
|
||||||
|
setDefaultState(this.blockState.getBaseState().withProperty(FACING, EnumFacing.NORTH));
|
||||||
|
setCreativeTab(ModInfo.TAB_FORGECRAFT);
|
||||||
|
}
|
||||||
|
private void makeEmbers(World world, BlockPos pos, Random rand){
|
||||||
|
double d0 = (double)pos.getX() + 0.5D;
|
||||||
|
double d1 = (double)pos.getY() + 0.2D;
|
||||||
|
double d2 = (double)pos.getZ() + 0.5D;
|
||||||
|
double d3 = 0.52D;
|
||||||
|
double d4 = ThreadLocalRandom.current().nextDouble(0.066, 0.33);
|
||||||
|
double ySpeed = ThreadLocalRandom.current().nextDouble(0.05, 0.20);
|
||||||
|
|
||||||
|
if(rand.nextInt(3) == 0){
|
||||||
|
world.spawnParticle(EnumParticleTypes.FLAME, d0+d4, d1, d2+d4, ySpeed, ySpeed, ySpeed, new int[0]);
|
||||||
|
world.spawnParticle(EnumParticleTypes.FLAME, d0+d4, d1, d2-d4, ySpeed, ySpeed, ySpeed, new int[0]);
|
||||||
|
}
|
||||||
|
if(rand.nextInt(3) == 1){
|
||||||
|
world.spawnParticle(EnumParticleTypes.FLAME, d0+d4, d1, d2-d4, ySpeed, ySpeed, ySpeed, new int[0]);
|
||||||
|
world.spawnParticle(EnumParticleTypes.FLAME, d0-d4, d1, d2+d4, ySpeed, ySpeed, ySpeed, new int[0]);
|
||||||
|
}
|
||||||
|
if(rand.nextInt(3) == 2){
|
||||||
|
world.spawnParticle(EnumParticleTypes.FLAME, d0-d4, d1, d2+d4, ySpeed, ySpeed, ySpeed, new int[0]);
|
||||||
|
world.spawnParticle(EnumParticleTypes.FLAME, d0-d4, d1, d2-d4, ySpeed, ySpeed, ySpeed, new int[0]);
|
||||||
|
}
|
||||||
|
if(rand.nextInt(3) == 3){
|
||||||
|
world.spawnParticle(EnumParticleTypes.FLAME, d0-d4, d1, d2-d4, ySpeed, ySpeed, ySpeed, new int[0]);
|
||||||
|
world.spawnParticle(EnumParticleTypes.FLAME, d0+d4, d1, d2+d4, ySpeed, ySpeed, ySpeed, new int[0]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing facing, float hitx, float hity, float hitz) {
|
||||||
|
|
||||||
|
if (!world.isRemote) {
|
||||||
|
TileCastingBlock tile = (TileCastingBlock) world.getTileEntity(pos);
|
||||||
|
ItemStack pItem = player.inventory.getCurrentItem();
|
||||||
|
|
||||||
|
if(player.isSneaking()) {
|
||||||
|
if(!tile.getSlotStack(0).isEmpty()){
|
||||||
|
ItemStack copyStack = tile.getSlotStack(0).copy();
|
||||||
|
PlayerHelper.spawnItemOnPlayer(world, player, copyStack);
|
||||||
|
tile.setSlotStack(0, ItemStack.EMPTY);
|
||||||
|
tile.updateBlock();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(pItem.getItem() instanceof CastingPart){
|
||||||
|
if(!player.isSneaking()) {
|
||||||
|
if (tile.getSlotStack(0).isEmpty()) {
|
||||||
|
ItemStack copyStack = pItem.copy();
|
||||||
|
copyStack.setCount(1);
|
||||||
|
pItem.shrink(1);
|
||||||
|
tile.setSlotStack(0, copyStack);
|
||||||
|
tile.updateBlock();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(pItem.getItem() == ModItems.stonetongs ){
|
||||||
|
ItemStack dropCrucible = new ItemStack(ModBlocks.emptycrucible);
|
||||||
|
if(pItem.getTagCompound().getInteger("type") == 40){
|
||||||
|
if(tile.getSlotStack(0).getItem() == ModItems.cast_hoe){
|
||||||
|
ItemStack dropStack = new ItemStack(ModItems.bronzehoehead);
|
||||||
|
|
||||||
|
PlayerHelper.spawnItemOnGround(world, pos, dropStack);
|
||||||
|
PlayerHelper.spawnItemOnGround(world, pos, dropCrucible);
|
||||||
|
pItem.getTagCompound().setInteger("type", 0);
|
||||||
|
if(CommonUtils.randomCheck(2)){
|
||||||
|
tile.setSlotStack(0, ItemStack.EMPTY);
|
||||||
|
}
|
||||||
|
//makeEmbers(world, pos, world.rand);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if(tile.getSlotStack(0).getItem() == ModItems.cast_pickaxe){
|
||||||
|
ItemStack dropStack = new ItemStack(ModItems.bronzepickaxehead);
|
||||||
|
PlayerHelper.spawnItemOnGround(world, pos, dropStack);
|
||||||
|
PlayerHelper.spawnItemOnGround(world, pos, dropCrucible);
|
||||||
|
pItem.getTagCompound().setInteger("type", 0);
|
||||||
|
if(CommonUtils.randomCheck(2)){
|
||||||
|
tile.setSlotStack(0, ItemStack.EMPTY);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if(tile.getSlotStack(0).getItem() == ModItems.cast_axe){
|
||||||
|
ItemStack dropStack = new ItemStack(ModItems.bronzeaxehead);
|
||||||
|
PlayerHelper.spawnItemOnGround(world, pos, dropStack);
|
||||||
|
PlayerHelper.spawnItemOnGround(world, pos, dropCrucible);
|
||||||
|
pItem.getTagCompound().setInteger("type", 0);
|
||||||
|
if(CommonUtils.randomCheck(2)){
|
||||||
|
tile.setSlotStack(0, ItemStack.EMPTY);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if(tile.getSlotStack(0).getItem() == ModItems.cast_shovel){
|
||||||
|
ItemStack dropStack = new ItemStack(ModItems.bronzeshovelhead);
|
||||||
|
PlayerHelper.spawnItemOnGround(world, pos, dropStack);
|
||||||
|
PlayerHelper.spawnItemOnGround(world, pos, dropCrucible);
|
||||||
|
pItem.getTagCompound().setInteger("type", 0);
|
||||||
|
if(CommonUtils.randomCheck(2)){
|
||||||
|
tile.setSlotStack(0, ItemStack.EMPTY);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if(tile.getSlotStack(0).getItem() == ModItems.cast_gladius){
|
||||||
|
ItemStack dropStack = new ItemStack(ModItems.bronzegladius);
|
||||||
|
PlayerHelper.spawnItemOnGround(world, pos, dropStack);
|
||||||
|
PlayerHelper.spawnItemOnGround(world, pos, dropCrucible);
|
||||||
|
pItem.getTagCompound().setInteger("type", 0);
|
||||||
|
if(CommonUtils.randomCheck(2)){
|
||||||
|
tile.setSlotStack(0, ItemStack.EMPTY);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/***************************
|
||||||
|
* Bronze *
|
||||||
|
*
|
||||||
|
46 | Hot Cooked Bronze Crucible Emerald
|
||||||
|
48 | Hot Cooked Bronze Crucible Diamond
|
||||||
|
50 | Hot Cooked Bronze Crucible Redstone
|
||||||
|
52 | Hot Cooked Bronze Crucible Lapis
|
||||||
|
***************************/
|
||||||
|
if(pItem.getTagCompound().getInteger("type") == 46){
|
||||||
|
if(tile.getSlotStack(0).getItem() == ModItems.cast_hoe){
|
||||||
|
ItemStack dropStack = new ItemStack(ModItems.bronzehoehead);
|
||||||
|
dropStack.setTagCompound(new NBTTagCompound());
|
||||||
|
NBTTagCompound tags = new NBTTagCompound();
|
||||||
|
|
||||||
|
dropStack.getTagCompound().setTag("tags", tags);
|
||||||
|
dropStack.getSubCompound("tags").setBoolean("hot", false);
|
||||||
|
|
||||||
|
dropStack.getSubCompound("tags").setBoolean("emerald", true);
|
||||||
|
dropStack.getSubCompound("tags").setInteger("diamond", 0);
|
||||||
|
dropStack.getSubCompound("tags").setInteger("redstone", 0);
|
||||||
|
dropStack.getSubCompound("tags").setInteger("lapis", 0);
|
||||||
|
|
||||||
|
dropStack.getSubCompound("tags").setInteger("modifiers", 1);
|
||||||
|
PlayerHelper.spawnItemOnGround(world, pos, dropStack);
|
||||||
|
PlayerHelper.spawnItemOnGround(world, pos, dropCrucible);
|
||||||
|
pItem.getTagCompound().setInteger("type", 0);
|
||||||
|
if(CommonUtils.randomCheck(2)){
|
||||||
|
tile.setSlotStack(0, ItemStack.EMPTY);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if(tile.getSlotStack(0).getItem() == ModItems.cast_pickaxe){
|
||||||
|
ItemStack dropStack = new ItemStack(ModItems.bronzepickaxehead);
|
||||||
|
dropStack.setTagCompound(new NBTTagCompound());
|
||||||
|
NBTTagCompound tags = new NBTTagCompound();
|
||||||
|
|
||||||
|
dropStack.getTagCompound().setTag("tags", tags);
|
||||||
|
dropStack.getSubCompound("tags").setBoolean("hot", false);
|
||||||
|
|
||||||
|
dropStack.getSubCompound("tags").setBoolean("emerald", true);
|
||||||
|
dropStack.getSubCompound("tags").setInteger("diamond", 0);
|
||||||
|
dropStack.getSubCompound("tags").setInteger("redstone", 0);
|
||||||
|
dropStack.getSubCompound("tags").setInteger("lapis", 0);
|
||||||
|
|
||||||
|
dropStack.getSubCompound("tags").setInteger("modifiers", 1);
|
||||||
|
PlayerHelper.spawnItemOnGround(world, pos, dropStack);
|
||||||
|
PlayerHelper.spawnItemOnGround(world, pos, dropCrucible);
|
||||||
|
pItem.getTagCompound().setInteger("type", 0);
|
||||||
|
if(CommonUtils.randomCheck(2)){
|
||||||
|
tile.setSlotStack(0, ItemStack.EMPTY);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if(tile.getSlotStack(0).getItem() == ModItems.cast_axe){
|
||||||
|
ItemStack dropStack = new ItemStack(ModItems.bronzeaxehead);
|
||||||
|
dropStack.setTagCompound(new NBTTagCompound());
|
||||||
|
NBTTagCompound tags = new NBTTagCompound();
|
||||||
|
|
||||||
|
dropStack.getTagCompound().setTag("tags", tags);
|
||||||
|
dropStack.getSubCompound("tags").setBoolean("hot", false);
|
||||||
|
|
||||||
|
dropStack.getSubCompound("tags").setBoolean("emerald", true);
|
||||||
|
dropStack.getSubCompound("tags").setInteger("diamond", 0);
|
||||||
|
dropStack.getSubCompound("tags").setInteger("redstone", 0);
|
||||||
|
dropStack.getSubCompound("tags").setInteger("lapis", 0);
|
||||||
|
|
||||||
|
dropStack.getSubCompound("tags").setInteger("modifiers", 1);
|
||||||
|
PlayerHelper.spawnItemOnGround(world, pos, dropStack);
|
||||||
|
PlayerHelper.spawnItemOnGround(world, pos, dropCrucible);
|
||||||
|
pItem.getTagCompound().setInteger("type", 0);
|
||||||
|
if(CommonUtils.randomCheck(2)){
|
||||||
|
tile.setSlotStack(0, ItemStack.EMPTY);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if(tile.getSlotStack(0).getItem() == ModItems.cast_shovel){
|
||||||
|
ItemStack dropStack = new ItemStack(ModItems.bronzeshovelhead);
|
||||||
|
dropStack.setTagCompound(new NBTTagCompound());
|
||||||
|
NBTTagCompound tags = new NBTTagCompound();
|
||||||
|
|
||||||
|
dropStack.getTagCompound().setTag("tags", tags);
|
||||||
|
dropStack.getSubCompound("tags").setBoolean("hot", false);
|
||||||
|
|
||||||
|
dropStack.getSubCompound("tags").setBoolean("emerald", true);
|
||||||
|
dropStack.getSubCompound("tags").setInteger("diamond", 0);
|
||||||
|
dropStack.getSubCompound("tags").setInteger("redstone", 0);
|
||||||
|
dropStack.getSubCompound("tags").setInteger("lapis", 0);
|
||||||
|
|
||||||
|
dropStack.getSubCompound("tags").setInteger("modifiers", 1);
|
||||||
|
PlayerHelper.spawnItemOnGround(world, pos, dropStack);
|
||||||
|
PlayerHelper.spawnItemOnGround(world, pos, dropCrucible);
|
||||||
|
pItem.getTagCompound().setInteger("type", 0);
|
||||||
|
if(CommonUtils.randomCheck(2)){
|
||||||
|
tile.setSlotStack(0, ItemStack.EMPTY);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if(tile.getSlotStack(0).getItem() == ModItems.cast_gladius){
|
||||||
|
ItemStack dropStack = new ItemStack(ModItems.bronzegladius);
|
||||||
|
PlayerHelper.spawnItemOnGround(world, pos, dropStack);
|
||||||
|
PlayerHelper.spawnItemOnGround(world, pos, dropCrucible);
|
||||||
|
pItem.getTagCompound().setInteger("type", 0);
|
||||||
|
if(CommonUtils.randomCheck(2)){
|
||||||
|
tile.setSlotStack(0, ItemStack.EMPTY);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(pItem.getTagCompound().getInteger("type") == 48) {
|
||||||
|
if (tile.getSlotStack(0).getItem() == ModItems.cast_hoe) {
|
||||||
|
ItemStack dropStack = new ItemStack(ModItems.bronzehoehead);
|
||||||
|
dropStack.setTagCompound(new NBTTagCompound());
|
||||||
|
|
||||||
|
NBTTagCompound tags = new NBTTagCompound();
|
||||||
|
dropStack.getTagCompound().setTag("tags", tags);
|
||||||
|
dropStack.getSubCompound("tags").setBoolean("hot", false);
|
||||||
|
dropStack.getSubCompound("tags").setBoolean("emerald", false);
|
||||||
|
dropStack.getSubCompound("tags").setInteger("diamond", 1);
|
||||||
|
dropStack.getSubCompound("tags").setInteger("redstone", 0);
|
||||||
|
dropStack.getSubCompound("tags").setInteger("lapis", 0);
|
||||||
|
dropStack.getSubCompound("tags").setInteger("modifiers", 1);
|
||||||
|
|
||||||
|
PlayerHelper.spawnItemOnGround(world, pos, dropStack);
|
||||||
|
PlayerHelper.spawnItemOnGround(world, pos, dropCrucible);
|
||||||
|
pItem.getTagCompound().setInteger("type", 0);
|
||||||
|
if (CommonUtils.randomCheck(2)) {
|
||||||
|
tile.setSlotStack(0, ItemStack.EMPTY);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (tile.getSlotStack(0).getItem() == ModItems.cast_pickaxe) {
|
||||||
|
ItemStack dropStack = new ItemStack(ModItems.bronzepickaxehead);
|
||||||
|
dropStack.setTagCompound(new NBTTagCompound());
|
||||||
|
|
||||||
|
NBTTagCompound tags = new NBTTagCompound();
|
||||||
|
dropStack.getTagCompound().setTag("tags", tags);
|
||||||
|
dropStack.getSubCompound("tags").setBoolean("hot", false);
|
||||||
|
dropStack.getSubCompound("tags").setBoolean("emerald", false);
|
||||||
|
dropStack.getSubCompound("tags").setInteger("diamond", 1);
|
||||||
|
dropStack.getSubCompound("tags").setInteger("redstone", 0);
|
||||||
|
dropStack.getSubCompound("tags").setInteger("lapis", 0);
|
||||||
|
dropStack.getSubCompound("tags").setInteger("modifiers", 1);
|
||||||
|
|
||||||
|
PlayerHelper.spawnItemOnGround(world, pos, dropStack);
|
||||||
|
PlayerHelper.spawnItemOnGround(world, pos, dropCrucible);
|
||||||
|
pItem.getTagCompound().setInteger("type", 0);
|
||||||
|
if (CommonUtils.randomCheck(2)) {
|
||||||
|
tile.setSlotStack(0, ItemStack.EMPTY);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (tile.getSlotStack(0).getItem() == ModItems.cast_axe) {
|
||||||
|
ItemStack dropStack = new ItemStack(ModItems.bronzeaxehead);
|
||||||
|
dropStack.setTagCompound(new NBTTagCompound());
|
||||||
|
|
||||||
|
|
||||||
|
NBTTagCompound tags = new NBTTagCompound();
|
||||||
|
dropStack.getTagCompound().setTag("tags", tags);
|
||||||
|
dropStack.getSubCompound("tags").setBoolean("hot", false);
|
||||||
|
dropStack.getSubCompound("tags").setBoolean("emerald", false);
|
||||||
|
dropStack.getSubCompound("tags").setInteger("diamond", 1);
|
||||||
|
dropStack.getSubCompound("tags").setInteger("redstone", 0);
|
||||||
|
dropStack.getSubCompound("tags").setInteger("lapis", 0);
|
||||||
|
dropStack.getSubCompound("tags").setInteger("modifiers", 1);
|
||||||
|
|
||||||
|
|
||||||
|
PlayerHelper.spawnItemOnGround(world, pos, dropStack);
|
||||||
|
PlayerHelper.spawnItemOnGround(world, pos, dropCrucible);
|
||||||
|
pItem.getTagCompound().setInteger("type", 0);
|
||||||
|
if (CommonUtils.randomCheck(2)) {
|
||||||
|
tile.setSlotStack(0, ItemStack.EMPTY);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (tile.getSlotStack(0).getItem() == ModItems.cast_shovel) {
|
||||||
|
ItemStack dropStack = new ItemStack(ModItems.bronzeshovelhead);
|
||||||
|
dropStack.setTagCompound(new NBTTagCompound());
|
||||||
|
|
||||||
|
|
||||||
|
NBTTagCompound tags = new NBTTagCompound();
|
||||||
|
dropStack.getTagCompound().setTag("tags", tags);
|
||||||
|
dropStack.getSubCompound("tags").setBoolean("hot", false);
|
||||||
|
dropStack.getSubCompound("tags").setBoolean("emerald", false);
|
||||||
|
dropStack.getSubCompound("tags").setInteger("diamond", 1);
|
||||||
|
dropStack.getSubCompound("tags").setInteger("redstone", 0);
|
||||||
|
dropStack.getSubCompound("tags").setInteger("lapis", 0);
|
||||||
|
dropStack.getSubCompound("tags").setInteger("modifiers", 1);
|
||||||
|
|
||||||
|
|
||||||
|
PlayerHelper.spawnItemOnGround(world, pos, dropStack);
|
||||||
|
PlayerHelper.spawnItemOnGround(world, pos, dropCrucible);
|
||||||
|
pItem.getTagCompound().setInteger("type", 0);
|
||||||
|
if (CommonUtils.randomCheck(2)) {
|
||||||
|
tile.setSlotStack(0, ItemStack.EMPTY);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (tile.getSlotStack(0).getItem() == ModItems.cast_gladius) {
|
||||||
|
ItemStack dropStack = new ItemStack(ModItems.bronzegladius);
|
||||||
|
PlayerHelper.spawnItemOnGround(world, pos, dropStack);
|
||||||
|
PlayerHelper.spawnItemOnGround(world, pos, dropCrucible);
|
||||||
|
pItem.getTagCompound().setInteger("type", 0);
|
||||||
|
if (CommonUtils.randomCheck(2)) {
|
||||||
|
tile.setSlotStack(0, ItemStack.EMPTY);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(pItem.getTagCompound().getInteger("type") == 50) {
|
||||||
|
if (tile.getSlotStack(0).getItem() == ModItems.cast_hoe) {
|
||||||
|
ItemStack dropStack = new ItemStack(ModItems.bronzehoehead);
|
||||||
|
dropStack.setTagCompound(new NBTTagCompound());
|
||||||
|
|
||||||
|
NBTTagCompound tags = new NBTTagCompound();
|
||||||
|
dropStack.getTagCompound().setTag("tags", tags);
|
||||||
|
dropStack.getSubCompound("tags").setBoolean("hot", false);
|
||||||
|
dropStack.getSubCompound("tags").setBoolean("emerald", false);
|
||||||
|
dropStack.getSubCompound("tags").setInteger("diamond", 0);
|
||||||
|
dropStack.getSubCompound("tags").setInteger("redstone", 1);
|
||||||
|
dropStack.getSubCompound("tags").setInteger("lapis", 0);
|
||||||
|
dropStack.getSubCompound("tags").setInteger("modifiers", 1);
|
||||||
|
|
||||||
|
PlayerHelper.spawnItemOnGround(world, pos, dropStack);
|
||||||
|
PlayerHelper.spawnItemOnGround(world, pos, dropCrucible);
|
||||||
|
pItem.getTagCompound().setInteger("type", 0);
|
||||||
|
if(CommonUtils.randomCheck(2)){
|
||||||
|
tile.setSlotStack(0, ItemStack.EMPTY);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (tile.getSlotStack(0).getItem() == ModItems.cast_pickaxe) {
|
||||||
|
ItemStack dropStack = new ItemStack(ModItems.bronzepickaxehead);
|
||||||
|
dropStack.setTagCompound(new NBTTagCompound());
|
||||||
|
|
||||||
|
NBTTagCompound tags = new NBTTagCompound();
|
||||||
|
dropStack.getTagCompound().setTag("tags", tags);
|
||||||
|
dropStack.getSubCompound("tags").setBoolean("hot", false);
|
||||||
|
dropStack.getSubCompound("tags").setBoolean("emerald", false);
|
||||||
|
dropStack.getSubCompound("tags").setInteger("diamond", 0);
|
||||||
|
dropStack.getSubCompound("tags").setInteger("redstone", 1);
|
||||||
|
dropStack.getSubCompound("tags").setInteger("lapis", 0);
|
||||||
|
dropStack.getSubCompound("tags").setInteger("modifiers", 1);
|
||||||
|
|
||||||
|
PlayerHelper.spawnItemOnGround(world, pos, dropStack);
|
||||||
|
PlayerHelper.spawnItemOnGround(world, pos, dropCrucible);
|
||||||
|
pItem.getTagCompound().setInteger("type", 0);
|
||||||
|
if(CommonUtils.randomCheck(2)){
|
||||||
|
tile.setSlotStack(0, ItemStack.EMPTY);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (tile.getSlotStack(0).getItem() == ModItems.cast_axe) {
|
||||||
|
ItemStack dropStack = new ItemStack(ModItems.bronzeaxehead);
|
||||||
|
dropStack.setTagCompound(new NBTTagCompound());
|
||||||
|
|
||||||
|
|
||||||
|
NBTTagCompound tags = new NBTTagCompound();
|
||||||
|
dropStack.getTagCompound().setTag("tags", tags);
|
||||||
|
dropStack.getSubCompound("tags").setBoolean("hot", false);
|
||||||
|
dropStack.getSubCompound("tags").setBoolean("emerald", false);
|
||||||
|
dropStack.getSubCompound("tags").setInteger("diamond", 0);
|
||||||
|
dropStack.getSubCompound("tags").setInteger("redstone", 1);
|
||||||
|
dropStack.getSubCompound("tags").setInteger("lapis", 0);
|
||||||
|
dropStack.getSubCompound("tags").setInteger("modifiers", 1);
|
||||||
|
|
||||||
|
|
||||||
|
PlayerHelper.spawnItemOnGround(world, pos, dropStack);
|
||||||
|
PlayerHelper.spawnItemOnGround(world, pos, dropCrucible);
|
||||||
|
pItem.getTagCompound().setInteger("type", 0);
|
||||||
|
if(CommonUtils.randomCheck(2)){
|
||||||
|
tile.setSlotStack(0, ItemStack.EMPTY);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (tile.getSlotStack(0).getItem() == ModItems.cast_shovel) {
|
||||||
|
ItemStack dropStack = new ItemStack(ModItems.bronzeshovelhead);
|
||||||
|
dropStack.setTagCompound(new NBTTagCompound());
|
||||||
|
|
||||||
|
|
||||||
|
NBTTagCompound tags = new NBTTagCompound();
|
||||||
|
dropStack.getTagCompound().setTag("tags", tags);
|
||||||
|
dropStack.getSubCompound("tags").setBoolean("hot", false);
|
||||||
|
dropStack.getSubCompound("tags").setBoolean("emerald", false);
|
||||||
|
dropStack.getSubCompound("tags").setInteger("diamond", 0);
|
||||||
|
dropStack.getSubCompound("tags").setInteger("redstone", 1);
|
||||||
|
dropStack.getSubCompound("tags").setInteger("lapis", 0);
|
||||||
|
dropStack.getSubCompound("tags").setInteger("modifiers", 1);
|
||||||
|
|
||||||
|
|
||||||
|
PlayerHelper.spawnItemOnGround(world, pos, dropStack);
|
||||||
|
PlayerHelper.spawnItemOnGround(world, pos, dropCrucible);
|
||||||
|
pItem.getTagCompound().setInteger("type", 0);
|
||||||
|
if(CommonUtils.randomCheck(2)){
|
||||||
|
tile.setSlotStack(0, ItemStack.EMPTY);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (tile.getSlotStack(0).getItem() == ModItems.cast_gladius) {
|
||||||
|
ItemStack dropStack = new ItemStack(ModItems.bronzegladius);
|
||||||
|
PlayerHelper.spawnItemOnGround(world, pos, dropStack);
|
||||||
|
PlayerHelper.spawnItemOnGround(world, pos, dropCrucible);
|
||||||
|
pItem.getTagCompound().setInteger("type", 0);
|
||||||
|
if(CommonUtils.randomCheck(2)){
|
||||||
|
tile.setSlotStack(0, ItemStack.EMPTY);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(pItem.getTagCompound().getInteger("type") == 52) {
|
||||||
|
if (tile.getSlotStack(0).getItem() == ModItems.cast_hoe) {
|
||||||
|
ItemStack dropStack = new ItemStack(ModItems.bronzehoehead);
|
||||||
|
dropStack.setTagCompound(new NBTTagCompound());
|
||||||
|
|
||||||
|
NBTTagCompound tags = new NBTTagCompound();
|
||||||
|
dropStack.getTagCompound().setTag("tags", tags);
|
||||||
|
dropStack.getSubCompound("tags").setBoolean("hot", false);
|
||||||
|
dropStack.getSubCompound("tags").setBoolean("emerald", false);
|
||||||
|
dropStack.getSubCompound("tags").setInteger("diamond", 0);
|
||||||
|
dropStack.getSubCompound("tags").setInteger("redstone", 0);
|
||||||
|
dropStack.getSubCompound("tags").setInteger("lapis", 1);
|
||||||
|
dropStack.getSubCompound("tags").setInteger("modifiers", 1);
|
||||||
|
|
||||||
|
PlayerHelper.spawnItemOnGround(world, pos, dropStack);
|
||||||
|
PlayerHelper.spawnItemOnGround(world, pos, dropCrucible);
|
||||||
|
pItem.getTagCompound().setInteger("type", 0);
|
||||||
|
if(CommonUtils.randomCheck(2)){
|
||||||
|
tile.setSlotStack(0, ItemStack.EMPTY);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (tile.getSlotStack(0).getItem() == ModItems.cast_pickaxe) {
|
||||||
|
ItemStack dropStack = new ItemStack(ModItems.bronzepickaxehead);
|
||||||
|
dropStack.setTagCompound(new NBTTagCompound());
|
||||||
|
|
||||||
|
NBTTagCompound tags = new NBTTagCompound();
|
||||||
|
dropStack.getTagCompound().setTag("tags", tags);
|
||||||
|
dropStack.getSubCompound("tags").setBoolean("hot", false);
|
||||||
|
dropStack.getSubCompound("tags").setBoolean("emerald", false);
|
||||||
|
dropStack.getSubCompound("tags").setInteger("diamond", 0);
|
||||||
|
dropStack.getSubCompound("tags").setInteger("redstone", 0);
|
||||||
|
dropStack.getSubCompound("tags").setInteger("lapis", 1);
|
||||||
|
dropStack.getSubCompound("tags").setInteger("modifiers", 1);
|
||||||
|
|
||||||
|
PlayerHelper.spawnItemOnGround(world, pos, dropStack);
|
||||||
|
PlayerHelper.spawnItemOnGround(world, pos, dropCrucible);
|
||||||
|
pItem.getTagCompound().setInteger("type", 0);
|
||||||
|
if(CommonUtils.randomCheck(2)){
|
||||||
|
tile.setSlotStack(0, ItemStack.EMPTY);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (tile.getSlotStack(0).getItem() == ModItems.cast_axe) {
|
||||||
|
ItemStack dropStack = new ItemStack(ModItems.bronzeaxehead);
|
||||||
|
dropStack.setTagCompound(new NBTTagCompound());
|
||||||
|
|
||||||
|
|
||||||
|
NBTTagCompound tags = new NBTTagCompound();
|
||||||
|
dropStack.getTagCompound().setTag("tags", tags);
|
||||||
|
dropStack.getSubCompound("tags").setBoolean("hot", false);
|
||||||
|
dropStack.getSubCompound("tags").setBoolean("emerald", false);
|
||||||
|
dropStack.getSubCompound("tags").setInteger("diamond", 0);
|
||||||
|
dropStack.getSubCompound("tags").setInteger("redstone", 0);
|
||||||
|
dropStack.getSubCompound("tags").setInteger("lapis", 1);
|
||||||
|
dropStack.getSubCompound("tags").setInteger("modifiers", 1);
|
||||||
|
|
||||||
|
|
||||||
|
PlayerHelper.spawnItemOnGround(world, pos, dropStack);
|
||||||
|
PlayerHelper.spawnItemOnGround(world, pos, dropCrucible);
|
||||||
|
pItem.getTagCompound().setInteger("type", 0);
|
||||||
|
if(CommonUtils.randomCheck(2)){
|
||||||
|
tile.setSlotStack(0, ItemStack.EMPTY);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (tile.getSlotStack(0).getItem() == ModItems.cast_shovel) {
|
||||||
|
ItemStack dropStack = new ItemStack(ModItems.bronzeshovelhead);
|
||||||
|
dropStack.setTagCompound(new NBTTagCompound());
|
||||||
|
|
||||||
|
|
||||||
|
NBTTagCompound tags = new NBTTagCompound();
|
||||||
|
dropStack.getTagCompound().setTag("tags", tags);
|
||||||
|
dropStack.getSubCompound("tags").setBoolean("hot", false);
|
||||||
|
dropStack.getSubCompound("tags").setBoolean("emerald", false);
|
||||||
|
dropStack.getSubCompound("tags").setInteger("diamond", 0);
|
||||||
|
dropStack.getSubCompound("tags").setInteger("redstone", 0);
|
||||||
|
dropStack.getSubCompound("tags").setInteger("lapis", 1);
|
||||||
|
dropStack.getSubCompound("tags").setInteger("modifiers", 1);
|
||||||
|
|
||||||
|
|
||||||
|
PlayerHelper.spawnItemOnGround(world, pos, dropStack);
|
||||||
|
PlayerHelper.spawnItemOnGround(world, pos, dropCrucible);
|
||||||
|
pItem.getTagCompound().setInteger("type", 0);
|
||||||
|
if(CommonUtils.randomCheck(2)){
|
||||||
|
tile.setSlotStack(0, ItemStack.EMPTY);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (tile.getSlotStack(0).getItem() == ModItems.cast_gladius) {
|
||||||
|
ItemStack dropStack = new ItemStack(ModItems.bronzegladius);
|
||||||
|
PlayerHelper.spawnItemOnGround(world, pos, dropStack);
|
||||||
|
PlayerHelper.spawnItemOnGround(world, pos, dropCrucible);
|
||||||
|
pItem.getTagCompound().setInteger("type", 0);
|
||||||
|
if(CommonUtils.randomCheck(2)){
|
||||||
|
tile.setSlotStack(0, ItemStack.EMPTY);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void breakBlock(World world, BlockPos pos, IBlockState state)
|
||||||
|
{
|
||||||
|
if (!world.isRemote && world.getGameRules().getBoolean("doTileDrops"))
|
||||||
|
{
|
||||||
|
TileCastingBlock tile = (TileCastingBlock) world.getTileEntity(pos);
|
||||||
|
if (tile !=null)
|
||||||
|
{
|
||||||
|
for (ItemStack stack : tile.getSlotList())
|
||||||
|
{
|
||||||
|
if (stack != null) {
|
||||||
|
float offset = 0.7F;
|
||||||
|
double offsetX = world.rand.nextFloat() * offset + (1.0F - offset) * 0.5D;
|
||||||
|
double offsetY = world.rand.nextFloat() * offset + (1.0F - offset) * 0.5D;
|
||||||
|
double offsetZ = world.rand.nextFloat() * offset + (1.0F - offset) * 0.5D;
|
||||||
|
EntityItem item = new EntityItem(world, pos.getX() + offsetX, pos.getY() + offsetY, pos.getZ() + offsetZ, stack);
|
||||||
|
item.setDefaultPickupDelay();
|
||||||
|
world.spawnEntity(item);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
super.breakBlock(world, pos, state);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public TileEntity createNewTileEntity(World worldIn, int meta) {
|
||||||
|
return new TileCastingBlock();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos)
|
||||||
|
{
|
||||||
|
return bound;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBlockPlacedBy(World worldIn, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack)
|
||||||
|
{
|
||||||
|
//if(!worldIn.isRemote) {
|
||||||
|
worldIn.setBlockState(pos, state.withProperty(FACING, placer.getHorizontalFacing()), 2);
|
||||||
|
//}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getMetaFromState(IBlockState state) {
|
||||||
|
int i = 0;
|
||||||
|
|
||||||
|
if( state.getValue(FACING) == EnumFacing.EAST) {
|
||||||
|
i = 0;
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
if( state.getValue(FACING) == EnumFacing.WEST) {
|
||||||
|
i = 1;
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
if( state.getValue(FACING) == EnumFacing.SOUTH){
|
||||||
|
i = 2;
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
if( state.getValue(FACING) == EnumFacing.NORTH){
|
||||||
|
i = 3;
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IBlockState getStateFromMeta(int meta)
|
||||||
|
{
|
||||||
|
IBlockState iblockstate = this.getDefaultState();
|
||||||
|
|
||||||
|
if (meta == 0){
|
||||||
|
iblockstate = iblockstate.withProperty(FACING, EnumFacing.EAST);
|
||||||
|
}
|
||||||
|
if (meta == 1) {
|
||||||
|
iblockstate = iblockstate.withProperty(FACING, EnumFacing.WEST);
|
||||||
|
}
|
||||||
|
if (meta == 2) {
|
||||||
|
iblockstate = iblockstate.withProperty(FACING, EnumFacing.SOUTH);
|
||||||
|
}
|
||||||
|
if (meta == 3) {
|
||||||
|
iblockstate = iblockstate.withProperty(FACING, EnumFacing.NORTH);
|
||||||
|
}
|
||||||
|
return iblockstate;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected BlockStateContainer createBlockState() {
|
||||||
|
return new BlockStateContainer(this, new IProperty[] {FACING});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isFullCube(IBlockState state)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isOpaqueCube(IBlockState state)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
public boolean shouldSideBeRendered(IBlockState blockState, IBlockAccess blockAccess, BlockPos pos, EnumFacing side)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public EnumBlockRenderType getRenderType(IBlockState state)
|
||||||
|
{
|
||||||
|
return EnumBlockRenderType.MODEL;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
192
kfc/src/main/java/nmd/primal/forgecraft/blocks/CastingForm.java
Normal file
192
kfc/src/main/java/nmd/primal/forgecraft/blocks/CastingForm.java
Normal file
@@ -0,0 +1,192 @@
|
|||||||
|
package nmd.primal.forgecraft.blocks;
|
||||||
|
|
||||||
|
import net.minecraft.block.material.Material;
|
||||||
|
import net.minecraft.block.properties.IProperty;
|
||||||
|
import net.minecraft.block.state.BlockStateContainer;
|
||||||
|
import net.minecraft.block.state.IBlockState;
|
||||||
|
import net.minecraft.entity.EntityLivingBase;
|
||||||
|
import net.minecraft.entity.item.EntityItem;
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
import net.minecraft.util.EnumBlockRenderType;
|
||||||
|
import net.minecraft.util.EnumFacing;
|
||||||
|
import net.minecraft.util.EnumHand;
|
||||||
|
import net.minecraft.util.math.AxisAlignedBB;
|
||||||
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
import net.minecraft.world.IBlockAccess;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraftforge.fml.relauncher.Side;
|
||||||
|
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||||
|
import nmd.primal.core.common.helper.CommonUtils;
|
||||||
|
import nmd.primal.forgecraft.ModInfo;
|
||||||
|
import nmd.primal.forgecraft.tiles.TileCastingForm;
|
||||||
|
import nmd.primal.forgecraft.util.CastingFormHandler;
|
||||||
|
|
||||||
|
import java.util.Random;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by mminaie on 6/19/17.
|
||||||
|
*/
|
||||||
|
public class CastingForm extends CustomContainerFacing implements CastingFormHandler{
|
||||||
|
|
||||||
|
protected static AxisAlignedBB bound = new AxisAlignedBB(0/16D, 0.0D, 0/16D, 16/16D, 3/16D, 16/16D);
|
||||||
|
|
||||||
|
public CastingForm(Material material, String registryName) {
|
||||||
|
super(material, registryName);
|
||||||
|
setDefaultState(this.blockState.getBaseState().withProperty(FACING, EnumFacing.NORTH));
|
||||||
|
setCreativeTab(ModInfo.TAB_FORGECRAFT);
|
||||||
|
this.setTickRandomly(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing facing, float hitx, float hity, float hitz) {
|
||||||
|
|
||||||
|
if (!world.isRemote) {
|
||||||
|
TileCastingForm tile = (TileCastingForm) world.getTileEntity(pos);
|
||||||
|
ItemStack pItem = player.inventory.getCurrentItem();
|
||||||
|
doInventoryManager(pItem, world, tile, pos, hitx, hity, hitz, state, player);
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void updateTick(World world, BlockPos pos, IBlockState state, Random random)
|
||||||
|
{
|
||||||
|
if (!world.isRemote) {
|
||||||
|
if(CommonUtils.randomCheck(4)) {
|
||||||
|
TileCastingForm tile = (TileCastingForm) world.getTileEntity(pos);
|
||||||
|
String[] tempArray = new String[25];
|
||||||
|
for (int i = 0; i < 25; i++) {
|
||||||
|
tempArray[i] = tile.getSlotStack(i).getItem().getRegistryName().toString();
|
||||||
|
}
|
||||||
|
doCraftingformCrafting(tempArray, world, tile, pos);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void breakBlock(World world, BlockPos pos, IBlockState state)
|
||||||
|
{
|
||||||
|
if (!world.isRemote && world.getGameRules().getBoolean("doTileDrops"))
|
||||||
|
{
|
||||||
|
TileCastingForm tile = (TileCastingForm) world.getTileEntity(pos);
|
||||||
|
if (tile !=null)
|
||||||
|
{
|
||||||
|
for (ItemStack stack : tile.getSlotList())
|
||||||
|
{
|
||||||
|
if (stack != null) {
|
||||||
|
float offset = 0.7F;
|
||||||
|
double offsetX = world.rand.nextFloat() * offset + (1.0F - offset) * 0.5D;
|
||||||
|
double offsetY = world.rand.nextFloat() * offset + (1.0F - offset) * 0.5D;
|
||||||
|
double offsetZ = world.rand.nextFloat() * offset + (1.0F - offset) * 0.5D;
|
||||||
|
EntityItem item = new EntityItem(world, pos.getX() + offsetX, pos.getY() + offsetY, pos.getZ() + offsetZ, stack);
|
||||||
|
item.setDefaultPickupDelay();
|
||||||
|
world.spawnEntity(item);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
super.breakBlock(world, pos, state);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public TileEntity createNewTileEntity(World worldIn, int meta) {
|
||||||
|
return new TileCastingForm();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos)
|
||||||
|
{
|
||||||
|
return bound;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBlockPlacedBy(World worldIn, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack)
|
||||||
|
{
|
||||||
|
//if(!worldIn.isRemote) {
|
||||||
|
worldIn.setBlockState(pos, state.withProperty(FACING, placer.getHorizontalFacing()), 2);
|
||||||
|
//}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getMetaFromState(IBlockState state) {
|
||||||
|
int i = 0;
|
||||||
|
|
||||||
|
if( state.getValue(FACING) == EnumFacing.EAST) {
|
||||||
|
i = 0;
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
if( state.getValue(FACING) == EnumFacing.WEST) {
|
||||||
|
i = 1;
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
if( state.getValue(FACING) == EnumFacing.SOUTH){
|
||||||
|
i = 2;
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
if( state.getValue(FACING) == EnumFacing.NORTH){
|
||||||
|
i = 3;
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IBlockState getStateFromMeta(int meta)
|
||||||
|
{
|
||||||
|
IBlockState iblockstate = this.getDefaultState();
|
||||||
|
|
||||||
|
if (meta == 0){
|
||||||
|
iblockstate = iblockstate.withProperty(FACING, EnumFacing.EAST);
|
||||||
|
}
|
||||||
|
if (meta == 1) {
|
||||||
|
iblockstate = iblockstate.withProperty(FACING, EnumFacing.WEST);
|
||||||
|
}
|
||||||
|
if (meta == 2) {
|
||||||
|
iblockstate = iblockstate.withProperty(FACING, EnumFacing.SOUTH);
|
||||||
|
}
|
||||||
|
if (meta == 3) {
|
||||||
|
iblockstate = iblockstate.withProperty(FACING, EnumFacing.NORTH);
|
||||||
|
}
|
||||||
|
return iblockstate;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected BlockStateContainer createBlockState() {
|
||||||
|
return new BlockStateContainer(this, new IProperty[] {FACING});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isFullCube(IBlockState state)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isOpaqueCube(IBlockState state)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
public boolean shouldSideBeRendered(IBlockState blockState, IBlockAccess blockAccess, BlockPos pos, EnumFacing side)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public EnumBlockRenderType getRenderType(IBlockState state)
|
||||||
|
{
|
||||||
|
return EnumBlockRenderType.MODEL;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package nmd.primal.forgecraft.blocks;
|
package nmd.primal.forgecraft.blocks.Crucibles;
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
@@ -80,7 +80,8 @@ public class Crucible extends Block {
|
|||||||
{
|
{
|
||||||
|
|
||||||
if(!world.isRemote){
|
if(!world.isRemote){
|
||||||
spawnItemEntityFromWorld(world, pos, new ItemStack(ModBlocks.emptycrucible, 1));
|
if(this.getUnlocalizedName().equals("tile.emptycruciblecracked")){} else spawnItemEntityFromWorld(world, pos, new ItemStack(ModBlocks.emptycrucible, 1));
|
||||||
|
|
||||||
if(StringUtils.isEmpty(this.getUnlocalizedName()) == false) {
|
if(StringUtils.isEmpty(this.getUnlocalizedName()) == false) {
|
||||||
if(checkDrops(this.getUnlocalizedName()) != null) {
|
if(checkDrops(this.getUnlocalizedName()) != null) {
|
||||||
if (checkDrops(this.getUnlocalizedName()).equals(this.getUnlocalizedName())) {
|
if (checkDrops(this.getUnlocalizedName()).equals(this.getUnlocalizedName())) {
|
||||||
@@ -118,6 +119,9 @@ public class Crucible extends Block {
|
|||||||
if(name.equals("tile.rawwootzcrucible")){
|
if(name.equals("tile.rawwootzcrucible")){
|
||||||
string = this.getUnlocalizedName();
|
string = this.getUnlocalizedName();
|
||||||
}
|
}
|
||||||
|
if(name.equals("tile.emptycruciblecracked")){
|
||||||
|
string = this.getUnlocalizedName();
|
||||||
|
}
|
||||||
|
|
||||||
return string;
|
return string;
|
||||||
}
|
}
|
||||||
@@ -139,6 +143,8 @@ public class Crucible extends Block {
|
|||||||
return Item.getItemFromBlock(ModBlocks.wootzball);
|
return Item.getItemFromBlock(ModBlocks.wootzball);
|
||||||
} else if (name.equals("tile.rawcleanironcrucible")){
|
} else if (name.equals("tile.rawcleanironcrucible")){
|
||||||
return PrimalItems.GOLDEN_STICK;
|
return PrimalItems.GOLDEN_STICK;
|
||||||
|
}else if (name.equals("tile.emptycruciblecracked")){
|
||||||
|
return Items.CLAY_BALL;
|
||||||
}
|
}
|
||||||
else return Items.AIR;
|
else return Items.AIR;
|
||||||
}
|
}
|
||||||
@@ -161,12 +167,6 @@ public class Crucible extends Block {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isFullyOpaque(IBlockState state)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isOpaqueCube(IBlockState state)
|
public boolean isOpaqueCube(IBlockState state)
|
||||||
{
|
{
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package nmd.primal.forgecraft.blocks;
|
package nmd.primal.forgecraft.blocks.Crucibles;
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.BlockDynamicLiquid;
|
import net.minecraft.block.BlockDynamicLiquid;
|
||||||
@@ -78,12 +78,6 @@ public class CrucibleHot extends Block implements ITileEntityProvider {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isFullyOpaque(IBlockState state)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isOpaqueCube(IBlockState state)
|
public boolean isOpaqueCube(IBlockState state)
|
||||||
{
|
{
|
||||||
@@ -13,9 +13,13 @@ public abstract class CustomContainerFacing extends BlockContainer {
|
|||||||
|
|
||||||
public static final PropertyDirection FACING = PropertyDirection.create("facing", EnumFacing.Plane.HORIZONTAL);
|
public static final PropertyDirection FACING = PropertyDirection.create("facing", EnumFacing.Plane.HORIZONTAL);
|
||||||
|
|
||||||
protected CustomContainerFacing(Material material)
|
protected CustomContainerFacing(Material material, String registryName)
|
||||||
{
|
{
|
||||||
super(material);
|
super(material);
|
||||||
|
this.setRegistryName(registryName);
|
||||||
|
this.setUnlocalizedName(registryName);
|
||||||
|
this.setHardness(3.0f);
|
||||||
|
this.setResistance(4.0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected CustomContainerFacing(Material material, MapColor color)
|
protected CustomContainerFacing(Material material, MapColor color)
|
||||||
@@ -4,7 +4,6 @@ import net.minecraft.block.Block;
|
|||||||
import net.minecraft.block.ITileEntityProvider;
|
import net.minecraft.block.ITileEntityProvider;
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.block.properties.IProperty;
|
import net.minecraft.block.properties.IProperty;
|
||||||
import net.minecraft.block.properties.PropertyBool;
|
|
||||||
import net.minecraft.block.state.BlockStateContainer;
|
import net.minecraft.block.state.BlockStateContainer;
|
||||||
import net.minecraft.block.state.IBlockState;
|
import net.minecraft.block.state.IBlockState;
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
@@ -13,6 +12,7 @@ import net.minecraft.entity.item.EntityItem;
|
|||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.init.Items;
|
import net.minecraft.init.Items;
|
||||||
import net.minecraft.init.SoundEvents;
|
import net.minecraft.init.SoundEvents;
|
||||||
|
import net.minecraft.item.ItemSpade;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.util.*;
|
import net.minecraft.util.*;
|
||||||
@@ -24,8 +24,9 @@ import net.minecraft.world.IBlockAccess;
|
|||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraftforge.fml.relauncher.Side;
|
import net.minecraftforge.fml.relauncher.Side;
|
||||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||||
import nmd.primal.core.api.PrimalItems;
|
import nmd.primal.core.api.PrimalStates;
|
||||||
import nmd.primal.forgecraft.CommonUtils;
|
import nmd.primal.core.common.crafting.FireSource;
|
||||||
|
import nmd.primal.core.common.helper.PlayerHelper;
|
||||||
import nmd.primal.forgecraft.ModInfo;
|
import nmd.primal.forgecraft.ModInfo;
|
||||||
import nmd.primal.forgecraft.items.parts.ToolPart;
|
import nmd.primal.forgecraft.items.parts.ToolPart;
|
||||||
import nmd.primal.forgecraft.tiles.TileForge;
|
import nmd.primal.forgecraft.tiles.TileForge;
|
||||||
@@ -42,19 +43,28 @@ import static nmd.primal.core.common.helper.FireHelper.makeSmoke;
|
|||||||
/**
|
/**
|
||||||
* Created by kitsu on 11/26/2016.
|
* Created by kitsu on 11/26/2016.
|
||||||
*/
|
*/
|
||||||
public class Forge extends CustomContainerFacing implements ITileEntityProvider/*, ITextComponent*/ {
|
public class Forge extends CustomContainerFacing implements ITileEntityProvider{
|
||||||
|
|
||||||
public static final PropertyBool ACTIVE = PropertyBool.create("active");
|
private int maxHeat;
|
||||||
|
//public static final PropertyBool PrimalStates.ACTIVE = PropertyBool.create("PrimalStates.ACTIVE");
|
||||||
protected static final AxisAlignedBB collideBox = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 0.99D, 1.0D);
|
protected static final AxisAlignedBB collideBox = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 0.99D, 1.0D);
|
||||||
protected static final AxisAlignedBB boundBox = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 1.0D, 1.0D);
|
protected static final AxisAlignedBB boundBox = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 1.0D, 1.0D);
|
||||||
|
|
||||||
public Forge(Material material) {
|
public Forge(Material material, String name, Integer maxHeat) {
|
||||||
super(material);
|
super(material, name);
|
||||||
setUnlocalizedName(ModInfo.ForgecraftBlocks.FIREBOX.getUnlocalizedName());
|
|
||||||
setRegistryName(ModInfo.ForgecraftBlocks.FIREBOX.getRegistryName());
|
|
||||||
setCreativeTab(ModInfo.TAB_FORGECRAFT);
|
setCreativeTab(ModInfo.TAB_FORGECRAFT);
|
||||||
setDefaultState(this.blockState.getBaseState().withProperty(FACING, EnumFacing.NORTH).withProperty(ACTIVE, Boolean.valueOf(false)));
|
setDefaultState(this.blockState.getBaseState().withProperty(FACING, EnumFacing.NORTH).withProperty(PrimalStates.ACTIVE, Boolean.valueOf(false)));
|
||||||
setHardness(3.0f);
|
setHardness(3.0f);
|
||||||
|
setResistance(5.0f);
|
||||||
|
this.maxHeat=maxHeat;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getMaxHeat() {
|
||||||
|
return maxHeat;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMaxHeat(int maxHeat) {
|
||||||
|
this.maxHeat = maxHeat;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -91,21 +101,20 @@ public class Forge extends CustomContainerFacing implements ITileEntityProvider/
|
|||||||
/***********************
|
/***********************
|
||||||
FUEL SLOT CODE
|
FUEL SLOT CODE
|
||||||
***********************/
|
***********************/
|
||||||
if(pItem.isEmpty()) {
|
|
||||||
if (player.isSneaking()) {
|
if (player.isSneaking()) {
|
||||||
if (!fuelItem.isEmpty()) {
|
if (!tile.getSlotStack(0).isEmpty()) {
|
||||||
if(facing == EnumFacing.NORTH || facing == EnumFacing.SOUTH || facing == EnumFacing.EAST || facing == EnumFacing.WEST ) {
|
if(player.inventory.getCurrentItem().getItem() instanceof ItemSpade) {
|
||||||
//System.out.println();
|
ItemStack returnStack = tile.getSlotStack(0).copy();
|
||||||
CommonUtils.spawnItemEntity(world, player, tile.getSlotStack(0));
|
PlayerHelper.spawnItemOnPlayer(world, player, returnStack);
|
||||||
tile.setSlotStack(0, ItemStack.EMPTY);
|
tile.clearSlot(0);
|
||||||
tile.markDirty();
|
|
||||||
tile.updateBlock();
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(pItem.isEmpty()) {
|
||||||
if(!player.isSneaking()){
|
if(!player.isSneaking()){
|
||||||
if(world.getBlockState(pos).getValue(ACTIVE) == true){
|
if(world.getBlockState(pos).getValue(PrimalStates.ACTIVE) == true){
|
||||||
Integer tempInt = tile.getHeat();
|
Integer tempInt = tile.getHeat();
|
||||||
String tempString = tempInt.toString();
|
String tempString = tempInt.toString();
|
||||||
ITextComponent itextcomponent = new TextComponentString(tempString);
|
ITextComponent itextcomponent = new TextComponentString(tempString);
|
||||||
@@ -115,8 +124,8 @@ public class Forge extends CustomContainerFacing implements ITileEntityProvider/
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if((pItem.getItem() == Items.FLINT_AND_STEEL) || (pItem.getItem() == PrimalItems.FIRE_BOW) || pItem.getItem() == PrimalItems.TORCH_WOOD_LIT || pItem.getItem() == PrimalItems.TORCH_NETHER_LIT ) {
|
if((FireSource.useSource(world, pos, player, pItem, hand, facing, hitX, hitY, hitZ))) {
|
||||||
world.setBlockState(pos, state.withProperty(ACTIVE, true), 2);
|
world.setBlockState(pos, state.withProperty(PrimalStates.ACTIVE, true), 2);
|
||||||
tile.setHeat(100);
|
tile.setHeat(100);
|
||||||
tile.markDirty();
|
tile.markDirty();
|
||||||
tile.updateBlock();
|
tile.updateBlock();
|
||||||
@@ -224,7 +233,7 @@ public class Forge extends CustomContainerFacing implements ITileEntityProvider/
|
|||||||
{
|
{
|
||||||
//if (!world.isRemote){
|
//if (!world.isRemote){
|
||||||
if(ent instanceof EntityPlayer){
|
if(ent instanceof EntityPlayer){
|
||||||
if(state.getValue(ACTIVE) == true){
|
if(state.getValue(PrimalStates.ACTIVE) == true){
|
||||||
ent.setFire(1);
|
ent.setFire(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -238,7 +247,7 @@ public class Forge extends CustomContainerFacing implements ITileEntityProvider/
|
|||||||
@Override
|
@Override
|
||||||
public int getLightValue(IBlockState state, IBlockAccess world, BlockPos pos)
|
public int getLightValue(IBlockState state, IBlockAccess world, BlockPos pos)
|
||||||
{
|
{
|
||||||
if(state.getValue(ACTIVE) == true){
|
if(state.getValue(PrimalStates.ACTIVE) == true){
|
||||||
return 15;
|
return 15;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
@@ -262,7 +271,7 @@ public class Forge extends CustomContainerFacing implements ITileEntityProvider/
|
|||||||
if(!world.isRemote){
|
if(!world.isRemote){
|
||||||
TileForge tile = (TileForge) world.getTileEntity(pos);
|
TileForge tile = (TileForge) world.getTileEntity(pos);
|
||||||
if(tile.getSlotStack(0) != ItemStack.EMPTY){
|
if(tile.getSlotStack(0) != ItemStack.EMPTY){
|
||||||
if(world.getBlockState(pos).getValue(ACTIVE)==true){
|
if(world.getBlockState(pos).getValue(PrimalStates.ACTIVE)==true){
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -303,14 +312,14 @@ public class Forge extends CustomContainerFacing implements ITileEntityProvider/
|
|||||||
/*@Override
|
/*@Override
|
||||||
public IBlockState onBlockPlaced(World worldIn, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer) {
|
public IBlockState onBlockPlaced(World worldIn, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer) {
|
||||||
IBlockState state = super.onBlockPlaced(worldIn, pos, facing, hitX, hitY, hitZ, meta, placer);
|
IBlockState state = super.onBlockPlaced(worldIn, pos, facing, hitX, hitY, hitZ, meta, placer);
|
||||||
return state.withProperty(FACING, placer.getHorizontalFacing()).withProperty(ACTIVE, Boolean.valueOf(false));
|
return state.withProperty(FACING, placer.getHorizontalFacing()).withProperty(PrimalStates.ACTIVE, Boolean.valueOf(false));
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onBlockPlacedBy(World worldIn, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack)
|
public void onBlockPlacedBy(World worldIn, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack)
|
||||||
{
|
{
|
||||||
if(!worldIn.isRemote) {
|
if(!worldIn.isRemote) {
|
||||||
worldIn.setBlockState(pos, state.withProperty(FACING, placer.getHorizontalFacing()).withProperty(ACTIVE, Boolean.valueOf(false)), 2);
|
worldIn.setBlockState(pos, state.withProperty(FACING, placer.getHorizontalFacing()).withProperty(PrimalStates.ACTIVE, Boolean.valueOf(false)), 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -318,35 +327,35 @@ public class Forge extends CustomContainerFacing implements ITileEntityProvider/
|
|||||||
public int getMetaFromState(IBlockState state) {
|
public int getMetaFromState(IBlockState state) {
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
||||||
if( (state.getValue(FACING) == EnumFacing.EAST) && state.getValue(ACTIVE) == false){
|
if( (state.getValue(FACING) == EnumFacing.EAST) && state.getValue(PrimalStates.ACTIVE) == false){
|
||||||
i = 0;
|
i = 0;
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
if( (state.getValue(FACING) == EnumFacing.WEST) && state.getValue(ACTIVE) == false){
|
if( (state.getValue(FACING) == EnumFacing.WEST) && state.getValue(PrimalStates.ACTIVE) == false){
|
||||||
i = 1;
|
i = 1;
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
if( (state.getValue(FACING) == EnumFacing.SOUTH) && state.getValue(ACTIVE) == false){
|
if( (state.getValue(FACING) == EnumFacing.SOUTH) && state.getValue(PrimalStates.ACTIVE) == false){
|
||||||
i = 2;
|
i = 2;
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
if( (state.getValue(FACING) == EnumFacing.NORTH) && state.getValue(ACTIVE) == false){
|
if( (state.getValue(FACING) == EnumFacing.NORTH) && state.getValue(PrimalStates.ACTIVE) == false){
|
||||||
i = 3;
|
i = 3;
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
if( (state.getValue(FACING) == EnumFacing.EAST) && state.getValue(ACTIVE) == true){
|
if( (state.getValue(FACING) == EnumFacing.EAST) && state.getValue(PrimalStates.ACTIVE) == true){
|
||||||
i = 4;
|
i = 4;
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
if( (state.getValue(FACING) == EnumFacing.WEST) && state.getValue(ACTIVE) == true){
|
if( (state.getValue(FACING) == EnumFacing.WEST) && state.getValue(PrimalStates.ACTIVE) == true){
|
||||||
i = 5;
|
i = 5;
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
if( (state.getValue(FACING) == EnumFacing.SOUTH) && state.getValue(ACTIVE) == true){
|
if( (state.getValue(FACING) == EnumFacing.SOUTH) && state.getValue(PrimalStates.ACTIVE) == true){
|
||||||
i = 6;
|
i = 6;
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
if( (state.getValue(FACING) == EnumFacing.NORTH) && state.getValue(ACTIVE) == true){
|
if( (state.getValue(FACING) == EnumFacing.NORTH) && state.getValue(PrimalStates.ACTIVE) == true){
|
||||||
i = 7;
|
i = 7;
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
@@ -358,9 +367,6 @@ public class Forge extends CustomContainerFacing implements ITileEntityProvider/
|
|||||||
public IBlockState getStateFromMeta(int meta) {
|
public IBlockState getStateFromMeta(int meta) {
|
||||||
EnumFacing enumfacing;
|
EnumFacing enumfacing;
|
||||||
Boolean active;
|
Boolean active;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
switch (meta & 7)
|
switch (meta & 7)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
@@ -400,12 +406,12 @@ public class Forge extends CustomContainerFacing implements ITileEntityProvider/
|
|||||||
active = false;
|
active = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return this.getDefaultState().withProperty(FACING, enumfacing).withProperty(ACTIVE, Boolean.valueOf(active));
|
return this.getDefaultState().withProperty(FACING, enumfacing).withProperty(PrimalStates.ACTIVE, Boolean.valueOf(active));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected BlockStateContainer createBlockState() {
|
protected BlockStateContainer createBlockState() {
|
||||||
return new BlockStateContainer(this, new IProperty[] {FACING, ACTIVE});
|
return new BlockStateContainer(this, new IProperty[] {FACING, PrimalStates.ACTIVE});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -414,12 +420,6 @@ public class Forge extends CustomContainerFacing implements ITileEntityProvider/
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isFullyOpaque(IBlockState state)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isOpaqueCube(IBlockState state)
|
public boolean isOpaqueCube(IBlockState state)
|
||||||
{
|
{
|
||||||
@@ -444,7 +444,7 @@ public class Forge extends CustomContainerFacing implements ITileEntityProvider/
|
|||||||
{
|
{
|
||||||
this.updateTick(world, pos, state, random);
|
this.updateTick(world, pos, state, random);
|
||||||
if(!world.isRemote){
|
if(!world.isRemote){
|
||||||
if(state.getValue(ACTIVE) == true) {
|
if(state.getValue(PrimalStates.ACTIVE) == true) {
|
||||||
makeSmoke(world, pos);
|
makeSmoke(world, pos);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -454,7 +454,7 @@ public class Forge extends CustomContainerFacing implements ITileEntityProvider/
|
|||||||
@SuppressWarnings("incomplete-switch")
|
@SuppressWarnings("incomplete-switch")
|
||||||
public void randomDisplayTick(IBlockState state, World world, BlockPos pos, Random rand)
|
public void randomDisplayTick(IBlockState state, World world, BlockPos pos, Random rand)
|
||||||
{
|
{
|
||||||
if(state.getValue(Forge.ACTIVE) == true)
|
if(state.getValue(PrimalStates.ACTIVE) == true)
|
||||||
{
|
{
|
||||||
double d0 = (double)pos.getX() + 0.5D;
|
double d0 = (double)pos.getX() + 0.5D;
|
||||||
double d1 = (double)pos.getY() + 0.96D;
|
double d1 = (double)pos.getY() + 0.96D;
|
||||||
@@ -1,12 +1,13 @@
|
|||||||
package nmd.primal.forgecraft.blocks;
|
package nmd.primal.forgecraft.blocks;
|
||||||
|
|
||||||
|
import net.minecraft.block.BlockDynamicLiquid;
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.block.properties.IProperty;
|
import net.minecraft.block.properties.IProperty;
|
||||||
import net.minecraft.block.properties.PropertyBool;
|
|
||||||
import net.minecraft.block.state.BlockStateContainer;
|
import net.minecraft.block.state.BlockStateContainer;
|
||||||
import net.minecraft.block.state.IBlockState;
|
import net.minecraft.block.state.IBlockState;
|
||||||
import net.minecraft.entity.EntityLivingBase;
|
import net.minecraft.entity.EntityLivingBase;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.init.Blocks;
|
||||||
import net.minecraft.init.SoundEvents;
|
import net.minecraft.init.SoundEvents;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.util.SoundCategory;
|
import net.minecraft.util.SoundCategory;
|
||||||
@@ -14,6 +15,7 @@ import net.minecraft.util.math.AxisAlignedBB;
|
|||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.world.IBlockAccess;
|
import net.minecraft.world.IBlockAccess;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
import nmd.primal.core.api.PrimalStates;
|
||||||
|
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
import java.util.concurrent.ThreadLocalRandom;
|
import java.util.concurrent.ThreadLocalRandom;
|
||||||
@@ -25,7 +27,7 @@ public class IngotBall extends BlockCustomBase {
|
|||||||
|
|
||||||
protected static AxisAlignedBB boundBoxLarge = new AxisAlignedBB(6/16D, 0.0D, 6/16D, 10/16D, 4/16D, 10/16D);
|
protected static AxisAlignedBB boundBoxLarge = new AxisAlignedBB(6/16D, 0.0D, 6/16D, 10/16D, 4/16D, 10/16D);
|
||||||
protected static AxisAlignedBB boundBoxSmall = new AxisAlignedBB(7/16D, 0.0D, 7/16D, 9/16D, 2/16D, 9/16D);
|
protected static AxisAlignedBB boundBoxSmall = new AxisAlignedBB(7/16D, 0.0D, 7/16D, 9/16D, 2/16D, 9/16D);
|
||||||
public static final PropertyBool ACTIVE = PropertyBool.create("active");
|
//public static final PropertyBool ACTIVE = PropertyBool.create("active");
|
||||||
private String type;
|
private String type;
|
||||||
|
|
||||||
public IngotBall(Material material, String registryName, Float hardness, String type){
|
public IngotBall(Material material, String registryName, Float hardness, String type){
|
||||||
@@ -49,19 +51,32 @@ public class IngotBall extends BlockCustomBase {
|
|||||||
public void onBlockPlacedBy(World worldIn, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack)
|
public void onBlockPlacedBy(World worldIn, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack)
|
||||||
{
|
{
|
||||||
//System.out.println(stack.getItemDamage());
|
//System.out.println(stack.getItemDamage());
|
||||||
worldIn.setBlockState(pos, state.withProperty(ACTIVE, Boolean.valueOf(false)), 2);
|
worldIn.setBlockState(pos, state.withProperty(PrimalStates.ACTIVE, Boolean.valueOf(false)), 2);
|
||||||
//System.out.println(state.getValue(ACTIVE));
|
//System.out.println(state.getValue(ACTIVE));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void onBlockDestroyedByPlayer(World world, BlockPos pos, IBlockState state)
|
||||||
|
{
|
||||||
|
|
||||||
|
if(!world.isRemote){
|
||||||
|
if(state.getValue(PrimalStates.ACTIVE)){
|
||||||
|
world.setBlockState(pos, Blocks.FLOWING_LAVA.getDefaultState().withProperty(BlockDynamicLiquid.LEVEL, 1), 3);
|
||||||
|
}
|
||||||
|
if(!state.getValue(PrimalStates.ACTIVE)){
|
||||||
|
//PlayerHelper.spawnItemOnGround(world, pos, new ItemStack(this, 1));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getMetaFromState(IBlockState state) {
|
public int getMetaFromState(IBlockState state) {
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
||||||
if( state.getValue(ACTIVE) == false) {
|
if( state.getValue(PrimalStates.ACTIVE) == false) {
|
||||||
i = 0;
|
i = 0;
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
if( state.getValue(ACTIVE) == true) {
|
if( state.getValue(PrimalStates.ACTIVE) == true) {
|
||||||
i = 1;
|
i = 1;
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
@@ -74,17 +89,17 @@ public class IngotBall extends BlockCustomBase {
|
|||||||
IBlockState iblockstate = this.getDefaultState();
|
IBlockState iblockstate = this.getDefaultState();
|
||||||
|
|
||||||
if (meta == 0){
|
if (meta == 0){
|
||||||
iblockstate = iblockstate.withProperty(ACTIVE, Boolean.valueOf(false));
|
iblockstate = iblockstate.withProperty(PrimalStates.ACTIVE, Boolean.valueOf(false));
|
||||||
}
|
}
|
||||||
if (meta == 1) {
|
if (meta == 1) {
|
||||||
iblockstate = iblockstate.withProperty(ACTIVE, Boolean.valueOf(true));
|
iblockstate = iblockstate.withProperty(PrimalStates.ACTIVE, Boolean.valueOf(true));
|
||||||
}
|
}
|
||||||
return iblockstate;
|
return iblockstate;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected BlockStateContainer createBlockState() {
|
protected BlockStateContainer createBlockState() {
|
||||||
return new BlockStateContainer(this, new IProperty[] {ACTIVE});
|
return new BlockStateContainer(this, new IProperty[] {PrimalStates.ACTIVE});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -93,8 +108,8 @@ public class IngotBall extends BlockCustomBase {
|
|||||||
this.updateTick(world, pos, state, random);
|
this.updateTick(world, pos, state, random);
|
||||||
if(!world.isRemote){
|
if(!world.isRemote){
|
||||||
if ( ThreadLocalRandom.current().nextInt(0,4) == 0) {
|
if ( ThreadLocalRandom.current().nextInt(0,4) == 0) {
|
||||||
if(state.getValue(ACTIVE) == true) {
|
if(state.getValue(PrimalStates.ACTIVE) == true) {
|
||||||
world.setBlockState(pos, state.withProperty(ACTIVE, Boolean.valueOf(false)), 2);
|
world.setBlockState(pos, state.withProperty(PrimalStates.ACTIVE, Boolean.valueOf(false)), 2);
|
||||||
world.playSound((EntityPlayer) null, pos, SoundEvents.BLOCK_FIRE_EXTINGUISH, SoundCategory.BLOCKS, 1.0F, world.rand.nextFloat() * 0.4F + 0.8F);
|
world.playSound((EntityPlayer) null, pos, SoundEvents.BLOCK_FIRE_EXTINGUISH, SoundCategory.BLOCKS, 1.0F, world.rand.nextFloat() * 0.4F + 0.8F);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2,7 +2,6 @@ package nmd.primal.forgecraft.blocks;
|
|||||||
|
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.block.properties.IProperty;
|
import net.minecraft.block.properties.IProperty;
|
||||||
import net.minecraft.block.properties.PropertyBool;
|
|
||||||
import net.minecraft.block.state.BlockStateContainer;
|
import net.minecraft.block.state.BlockStateContainer;
|
||||||
import net.minecraft.block.state.IBlockState;
|
import net.minecraft.block.state.IBlockState;
|
||||||
import net.minecraft.entity.EntityLivingBase;
|
import net.minecraft.entity.EntityLivingBase;
|
||||||
@@ -17,7 +16,6 @@ import net.minecraft.world.World;
|
|||||||
import net.minecraftforge.fml.relauncher.Side;
|
import net.minecraftforge.fml.relauncher.Side;
|
||||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||||
import nmd.primal.forgecraft.ModInfo;
|
import nmd.primal.forgecraft.ModInfo;
|
||||||
import nmd.primal.forgecraft.init.ModBlocks;
|
|
||||||
import nmd.primal.forgecraft.init.ModSounds;
|
import nmd.primal.forgecraft.init.ModSounds;
|
||||||
import nmd.primal.forgecraft.tiles.TileBloomery;
|
import nmd.primal.forgecraft.tiles.TileBloomery;
|
||||||
import nmd.primal.forgecraft.tiles.TileForge;
|
import nmd.primal.forgecraft.tiles.TileForge;
|
||||||
@@ -26,12 +24,14 @@ import nmd.primal.forgecraft.tiles.TilePistonBellows;
|
|||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
import java.util.concurrent.ThreadLocalRandom;
|
import java.util.concurrent.ThreadLocalRandom;
|
||||||
|
|
||||||
|
import static nmd.primal.core.api.PrimalStates.ACTIVE;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by mminaie on 1/1/17.
|
* Created by mminaie on 1/1/17.
|
||||||
*/
|
*/
|
||||||
public class PistonBellows extends CustomContainerFacing {
|
public class PistonBellows extends CustomContainerFacing {
|
||||||
|
|
||||||
public static final PropertyBool ACTIVE = PropertyBool.create("active");
|
//public static final PropertyBool ACTIVE = PropertyBool.create("active");
|
||||||
//protected static final AxisAlignedBB collideBox = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 0.99D, 1.0D);
|
//protected static final AxisAlignedBB collideBox = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 0.99D, 1.0D);
|
||||||
protected static final AxisAlignedBB boundBoxNorth = new AxisAlignedBB(0.1875D, 0.0D, 0.0D, 1.0D, 12 / 16D, 1.0D);
|
protected static final AxisAlignedBB boundBoxNorth = new AxisAlignedBB(0.1875D, 0.0D, 0.0D, 1.0D, 12 / 16D, 1.0D);
|
||||||
protected static final AxisAlignedBB boundBoxSouth = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 0.8125D, 12 / 16D, 1.0D);
|
protected static final AxisAlignedBB boundBoxSouth = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 0.8125D, 12 / 16D, 1.0D);
|
||||||
@@ -39,11 +39,7 @@ public class PistonBellows extends CustomContainerFacing {
|
|||||||
protected static final AxisAlignedBB boundBoxWest = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 12 / 16D, 0.8125D);
|
protected static final AxisAlignedBB boundBoxWest = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 12 / 16D, 0.8125D);
|
||||||
|
|
||||||
public PistonBellows(Material material, String registryName) {
|
public PistonBellows(Material material, String registryName) {
|
||||||
super(material);
|
super(material, registryName);
|
||||||
|
|
||||||
setUnlocalizedName(ModInfo.ForgecraftBlocks.PISTONBELLOWS.getUnlocalizedName());
|
|
||||||
//setRegistryName(ModInfo.ForgecraftBlocks.PISTONBELLOWS.getRegistryName());
|
|
||||||
setRegistryName(registryName);
|
|
||||||
setCreativeTab(ModInfo.TAB_FORGECRAFT);
|
setCreativeTab(ModInfo.TAB_FORGECRAFT);
|
||||||
setDefaultState(this.blockState.getBaseState().withProperty(FACING, EnumFacing.NORTH).withProperty(ACTIVE, Boolean.valueOf(false)));
|
setDefaultState(this.blockState.getBaseState().withProperty(FACING, EnumFacing.NORTH).withProperty(ACTIVE, Boolean.valueOf(false)));
|
||||||
setHardness(3.0f);
|
setHardness(3.0f);
|
||||||
@@ -70,7 +66,7 @@ public class PistonBellows extends CustomContainerFacing {
|
|||||||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ) {
|
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ) {
|
||||||
if(!world.isRemote){
|
if(!world.isRemote){
|
||||||
//System.out.println(state.getValue(PistonBellows.FACING));
|
//System.out.println(state.getValue(PistonBellows.FACING));
|
||||||
if(state.getValue(this.ACTIVE) == false) {
|
if(state.getValue(ACTIVE) == false) {
|
||||||
world.setBlockState(pos, state.withProperty(ACTIVE, true), 2);
|
world.setBlockState(pos, state.withProperty(ACTIVE, true), 2);
|
||||||
//world.playSound(pos, ForgecraftSounds.PISTON_BELLOWS, SoundCategory.BLOCKS, 1.0f, 1.0f);
|
//world.playSound(pos, ForgecraftSounds.PISTON_BELLOWS, SoundCategory.BLOCKS, 1.0f, 1.0f);
|
||||||
//world.playSound((double)pos.getX(), (double)pos.getY(), (double)pos.getZ(), ModSounds.PISTON_BELLOWS, SoundCategory.BLOCKS, 1.0f, 1.0f, true);
|
//world.playSound((double)pos.getX(), (double)pos.getY(), (double)pos.getZ(), ModSounds.PISTON_BELLOWS, SoundCategory.BLOCKS, 1.0f, 1.0f, true);
|
||||||
@@ -80,9 +76,9 @@ public class PistonBellows extends CustomContainerFacing {
|
|||||||
|
|
||||||
if (state.getValue(PistonBellows.FACING) == EnumFacing.NORTH) {
|
if (state.getValue(PistonBellows.FACING) == EnumFacing.NORTH) {
|
||||||
BlockPos tempPos = new BlockPos(pos.getX() + 1, pos.getY(), pos.getZ());
|
BlockPos tempPos = new BlockPos(pos.getX() + 1, pos.getY(), pos.getZ());
|
||||||
if (world.getBlockState(tempPos).getBlock() == ModBlocks.firebox) {
|
if (world.getBlockState(tempPos).getBlock() instanceof Forge) {
|
||||||
TileForge tile = (TileForge) world.getTileEntity(tempPos);
|
TileForge tile = (TileForge) world.getTileEntity(tempPos);
|
||||||
if ((world.getBlockState(tempPos).getValue(Forge.ACTIVE) == true) && (world.getBlockState(tempPos).getValue(Forge.FACING) == EnumFacing.EAST)) {
|
if ((world.getBlockState(tempPos).getValue(ACTIVE) == true) && (world.getBlockState(tempPos).getValue(Forge.FACING) == EnumFacing.EAST)) {
|
||||||
if (tile != null) {
|
if (tile != null) {
|
||||||
//System.out.println(world.getBlockState(tempPos).getValue(Forge.FACING));
|
//System.out.println(world.getBlockState(tempPos).getValue(Forge.FACING));
|
||||||
tile.setHeat(tile.getHeat() + 50);
|
tile.setHeat(tile.getHeat() + 50);
|
||||||
@@ -92,16 +88,13 @@ public class PistonBellows extends CustomContainerFacing {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (world.getBlockState(tempPos).getBlock() == ModBlocks.bloomery) {
|
if (world.getBlockState(tempPos).getBlock() instanceof BloomeryBase) {
|
||||||
TileBloomery tile = (TileBloomery) world.getTileEntity(tempPos);
|
TileBloomery tile = (TileBloomery) world.getTileEntity(tempPos);
|
||||||
if ((world.getBlockState(tempPos).getValue(Bloomery.ACTIVE) == true)
|
if ((world.getBlockState(tempPos).getValue(ACTIVE) == true)
|
||||||
&& (world.getBlockState(tempPos).getValue(Bloomery.FACING) == EnumFacing.EAST)) {
|
&& (world.getBlockState(tempPos).getValue(FACING) == EnumFacing.EAST)) {
|
||||||
if (tile != null) {
|
if (tile != null) {
|
||||||
//System.out.println(world.getBlockState(tempPos).getValue(Forge.FACING));
|
//System.out.println(world.getBlockState(tempPos).getValue(Forge.FACING));
|
||||||
tile.setHeat(tile.getHeat() + 50);
|
tile.setHeat(tile.getHeat() + 50);
|
||||||
if(world.getBlockState(tempPos).getValue(Bloomery.COVERED) == true){
|
|
||||||
tile.setHeat(tile.getHeat() + 50);
|
|
||||||
}
|
|
||||||
tile.updateBlock();
|
tile.updateBlock();
|
||||||
tile.markDirty();
|
tile.markDirty();
|
||||||
return true;
|
return true;
|
||||||
@@ -111,9 +104,9 @@ public class PistonBellows extends CustomContainerFacing {
|
|||||||
}
|
}
|
||||||
if (state.getValue(PistonBellows.FACING) == EnumFacing.SOUTH) {
|
if (state.getValue(PistonBellows.FACING) == EnumFacing.SOUTH) {
|
||||||
BlockPos tempPos = new BlockPos(pos.getX() - 1, pos.getY(), pos.getZ());
|
BlockPos tempPos = new BlockPos(pos.getX() - 1, pos.getY(), pos.getZ());
|
||||||
if (world.getBlockState(tempPos).getBlock() == ModBlocks.firebox) {
|
if (world.getBlockState(tempPos).getBlock() instanceof Forge) {
|
||||||
TileForge tile = (TileForge) world.getTileEntity(tempPos);
|
TileForge tile = (TileForge) world.getTileEntity(tempPos);
|
||||||
if ((world.getBlockState(tempPos).getValue(Forge.ACTIVE) == true) && (world.getBlockState(tempPos).getValue(Forge.FACING) == EnumFacing.WEST)) {
|
if ((world.getBlockState(tempPos).getValue(ACTIVE) == true) && (world.getBlockState(tempPos).getValue(Forge.FACING) == EnumFacing.WEST)) {
|
||||||
if (tile != null) {
|
if (tile != null) {
|
||||||
//System.out.println(world.getBlockState(tempPos).getValue(Forge.FACING));
|
//System.out.println(world.getBlockState(tempPos).getValue(Forge.FACING));
|
||||||
tile.setHeat(tile.getHeat() + 50);
|
tile.setHeat(tile.getHeat() + 50);
|
||||||
@@ -123,16 +116,13 @@ public class PistonBellows extends CustomContainerFacing {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (world.getBlockState(tempPos).getBlock() == ModBlocks.bloomery) {
|
if (world.getBlockState(tempPos).getBlock() instanceof BloomeryBase) {
|
||||||
TileBloomery tile = (TileBloomery) world.getTileEntity(tempPos);
|
TileBloomery tile = (TileBloomery) world.getTileEntity(tempPos);
|
||||||
if ((world.getBlockState(tempPos).getValue(Bloomery.ACTIVE) == true)
|
if ((world.getBlockState(tempPos).getValue(ACTIVE) == true)
|
||||||
&& (world.getBlockState(tempPos).getValue(Bloomery.FACING) == EnumFacing.WEST)) {
|
&& (world.getBlockState(tempPos).getValue(FACING) == EnumFacing.WEST)) {
|
||||||
if (tile != null) {
|
if (tile != null) {
|
||||||
//System.out.println(world.getBlockState(tempPos).getValue(Forge.FACING));
|
//System.out.println(world.getBlockState(tempPos).getValue(Forge.FACING));
|
||||||
tile.setHeat(tile.getHeat() + 50);
|
tile.setHeat(tile.getHeat() + 50);
|
||||||
if(world.getBlockState(tempPos).getValue(Bloomery.COVERED) == true){
|
|
||||||
tile.setHeat(tile.getHeat() + 50);
|
|
||||||
}
|
|
||||||
tile.updateBlock();
|
tile.updateBlock();
|
||||||
tile.markDirty();
|
tile.markDirty();
|
||||||
return true;
|
return true;
|
||||||
@@ -142,9 +132,9 @@ public class PistonBellows extends CustomContainerFacing {
|
|||||||
}
|
}
|
||||||
if (state.getValue(PistonBellows.FACING) == EnumFacing.EAST) {
|
if (state.getValue(PistonBellows.FACING) == EnumFacing.EAST) {
|
||||||
BlockPos tempPos = new BlockPos(pos.getX(), pos.getY(), pos.getZ() + 1);
|
BlockPos tempPos = new BlockPos(pos.getX(), pos.getY(), pos.getZ() + 1);
|
||||||
if (world.getBlockState(tempPos).getBlock() == ModBlocks.firebox) {
|
if (world.getBlockState(tempPos).getBlock() instanceof Forge) {
|
||||||
TileForge tile = (TileForge) world.getTileEntity(tempPos);
|
TileForge tile = (TileForge) world.getTileEntity(tempPos);
|
||||||
if ((world.getBlockState(tempPos).getValue(Forge.ACTIVE) == true) && (world.getBlockState(tempPos).getValue(Forge.FACING) == EnumFacing.SOUTH)) {
|
if ((world.getBlockState(tempPos).getValue(ACTIVE) == true) && (world.getBlockState(tempPos).getValue(Forge.FACING) == EnumFacing.SOUTH)) {
|
||||||
if (tile != null) {
|
if (tile != null) {
|
||||||
//System.out.println(world.getBlockState(tempPos).getValue(Forge.FACING));
|
//System.out.println(world.getBlockState(tempPos).getValue(Forge.FACING));
|
||||||
tile.setHeat(tile.getHeat() + 50);
|
tile.setHeat(tile.getHeat() + 50);
|
||||||
@@ -154,16 +144,13 @@ public class PistonBellows extends CustomContainerFacing {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (world.getBlockState(tempPos).getBlock() == ModBlocks.bloomery) {
|
if (world.getBlockState(tempPos).getBlock() instanceof BloomeryBase) {
|
||||||
TileBloomery tile = (TileBloomery) world.getTileEntity(tempPos);
|
TileBloomery tile = (TileBloomery) world.getTileEntity(tempPos);
|
||||||
if ((world.getBlockState(tempPos).getValue(Bloomery.ACTIVE) == true)
|
if ((world.getBlockState(tempPos).getValue(ACTIVE) == true)
|
||||||
&& (world.getBlockState(tempPos).getValue(Bloomery.FACING) == EnumFacing.SOUTH)) {
|
&& (world.getBlockState(tempPos).getValue(FACING) == EnumFacing.SOUTH)) {
|
||||||
if (tile != null) {
|
if (tile != null) {
|
||||||
//System.out.println(world.getBlockState(tempPos).getValue(Forge.FACING));
|
//System.out.println(world.getBlockState(tempPos).getValue(Forge.FACING));
|
||||||
tile.setHeat(tile.getHeat() + 50);
|
tile.setHeat(tile.getHeat() + 50);
|
||||||
if(world.getBlockState(tempPos).getValue(Bloomery.COVERED) == true){
|
|
||||||
tile.setHeat(tile.getHeat() + 50);
|
|
||||||
}
|
|
||||||
tile.updateBlock();
|
tile.updateBlock();
|
||||||
tile.markDirty();
|
tile.markDirty();
|
||||||
return true;
|
return true;
|
||||||
@@ -173,9 +160,9 @@ public class PistonBellows extends CustomContainerFacing {
|
|||||||
}
|
}
|
||||||
if (state.getValue(PistonBellows.FACING) == EnumFacing.WEST) {
|
if (state.getValue(PistonBellows.FACING) == EnumFacing.WEST) {
|
||||||
BlockPos tempPos = new BlockPos(pos.getX(), pos.getY(), pos.getZ() - 1);
|
BlockPos tempPos = new BlockPos(pos.getX(), pos.getY(), pos.getZ() - 1);
|
||||||
if (world.getBlockState(tempPos).getBlock() == ModBlocks.firebox) {
|
if (world.getBlockState(tempPos).getBlock() instanceof Forge) {
|
||||||
TileForge tile = (TileForge) world.getTileEntity(tempPos);
|
TileForge tile = (TileForge) world.getTileEntity(tempPos);
|
||||||
if ((world.getBlockState(tempPos).getValue(Forge.ACTIVE) == true) && (world.getBlockState(tempPos).getValue(Forge.FACING) == EnumFacing.NORTH)) {
|
if ((world.getBlockState(tempPos).getValue(ACTIVE) == true) && (world.getBlockState(tempPos).getValue(Forge.FACING) == EnumFacing.NORTH)) {
|
||||||
if (tile != null) {
|
if (tile != null) {
|
||||||
//System.out.println(world.getBlockState(tempPos).getValue(Forge.FACING));
|
//System.out.println(world.getBlockState(tempPos).getValue(Forge.FACING));
|
||||||
tile.setHeat(tile.getHeat() + 50);
|
tile.setHeat(tile.getHeat() + 50);
|
||||||
@@ -185,16 +172,13 @@ public class PistonBellows extends CustomContainerFacing {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (world.getBlockState(tempPos).getBlock() == ModBlocks.bloomery) {
|
if (world.getBlockState(tempPos).getBlock() instanceof BloomeryBase) {
|
||||||
TileBloomery tile = (TileBloomery) world.getTileEntity(tempPos);
|
TileBloomery tile = (TileBloomery) world.getTileEntity(tempPos);
|
||||||
if ((world.getBlockState(tempPos).getValue(Bloomery.ACTIVE) == true)
|
if ((world.getBlockState(tempPos).getValue(ACTIVE) == true)
|
||||||
&& (world.getBlockState(tempPos).getValue(Bloomery.FACING) == EnumFacing.NORTH)) {
|
&& (world.getBlockState(tempPos).getValue(FACING) == EnumFacing.NORTH)) {
|
||||||
if (tile != null) {
|
if (tile != null) {
|
||||||
//System.out.println(world.getBlockState(tempPos).getValue(Forge.FACING));
|
//System.out.println(world.getBlockState(tempPos).getValue(Forge.FACING));
|
||||||
tile.setHeat(tile.getHeat() + 50);
|
tile.setHeat(tile.getHeat() + 50);
|
||||||
if(world.getBlockState(tempPos).getValue(Bloomery.COVERED) == true){
|
|
||||||
tile.setHeat(tile.getHeat() + 50);
|
|
||||||
}
|
|
||||||
tile.updateBlock();
|
tile.updateBlock();
|
||||||
tile.markDirty();
|
tile.markDirty();
|
||||||
return true;
|
return true;
|
||||||
@@ -358,12 +342,6 @@ public class PistonBellows extends CustomContainerFacing {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isFullyOpaque(IBlockState state)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isOpaqueCube(IBlockState state)
|
public boolean isOpaqueCube(IBlockState state)
|
||||||
{
|
{
|
||||||
@@ -385,18 +363,18 @@ public class PistonBellows extends CustomContainerFacing {
|
|||||||
|
|
||||||
public void randomDisplayTick(IBlockState state, World world, BlockPos pos, Random rand)
|
public void randomDisplayTick(IBlockState state, World world, BlockPos pos, Random rand)
|
||||||
{
|
{
|
||||||
if(state.getValue(PistonBellows.ACTIVE) == Boolean.TRUE) {
|
if(state.getValue(ACTIVE) == Boolean.TRUE) {
|
||||||
if (state.getValue(PistonBellows.FACING) == EnumFacing.NORTH) {
|
if (state.getValue(PistonBellows.FACING) == EnumFacing.NORTH) {
|
||||||
BlockPos tempPos = new BlockPos(pos.getX() + 1, pos.getY(), pos.getZ());
|
BlockPos tempPos = new BlockPos(pos.getX() + 1, pos.getY(), pos.getZ());
|
||||||
if (world.getBlockState(tempPos).getBlock() == ModBlocks.firebox) {
|
if (world.getBlockState(tempPos).getBlock() instanceof Forge) {
|
||||||
TileForge tile = (TileForge) world.getTileEntity(tempPos);
|
TileForge tile = (TileForge) world.getTileEntity(tempPos);
|
||||||
if ((world.getBlockState(tempPos).getValue(Forge.ACTIVE) == true) && (world.getBlockState(tempPos).getValue(Forge.FACING) == EnumFacing.EAST)) {
|
if ((world.getBlockState(tempPos).getValue(ACTIVE) == true) && (world.getBlockState(tempPos).getValue(Forge.FACING) == EnumFacing.EAST)) {
|
||||||
makeEmbers(world, tempPos, world.rand);
|
makeEmbers(world, tempPos, world.rand);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (world.getBlockState(tempPos).getBlock() instanceof Bloomery) {
|
if (world.getBlockState(tempPos).getBlock() instanceof BloomeryBase) {
|
||||||
TileBloomery tile = (TileBloomery) world.getTileEntity(tempPos);
|
TileBloomery tile = (TileBloomery) world.getTileEntity(tempPos);
|
||||||
if ((world.getBlockState(tempPos).getValue(Bloomery.ACTIVE) == true) && (world.getBlockState(tempPos).getValue(Bloomery.FACING) == EnumFacing.EAST)) {
|
if ((world.getBlockState(tempPos).getValue(ACTIVE) == true) && (world.getBlockState(tempPos).getValue(BloomeryBase.FACING) == EnumFacing.EAST)) {
|
||||||
makeEmbers(world, tempPos, world.rand);
|
makeEmbers(world, tempPos, world.rand);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -405,15 +383,15 @@ public class PistonBellows extends CustomContainerFacing {
|
|||||||
|
|
||||||
if (state.getValue(PistonBellows.FACING) == EnumFacing.SOUTH) {
|
if (state.getValue(PistonBellows.FACING) == EnumFacing.SOUTH) {
|
||||||
BlockPos tempPos = new BlockPos(pos.getX() - 1, pos.getY(), pos.getZ());
|
BlockPos tempPos = new BlockPos(pos.getX() - 1, pos.getY(), pos.getZ());
|
||||||
if (world.getBlockState(tempPos).getBlock() == ModBlocks.firebox) {
|
if (world.getBlockState(tempPos).getBlock() instanceof Forge) {
|
||||||
TileForge tile = (TileForge) world.getTileEntity(tempPos);
|
TileForge tile = (TileForge) world.getTileEntity(tempPos);
|
||||||
if ((world.getBlockState(tempPos).getValue(Forge.ACTIVE) == true) && (world.getBlockState(tempPos).getValue(Forge.FACING) == EnumFacing.WEST)) {
|
if ((world.getBlockState(tempPos).getValue(ACTIVE) == true) && (world.getBlockState(tempPos).getValue(Forge.FACING) == EnumFacing.WEST)) {
|
||||||
makeEmbers(world, tempPos, world.rand);
|
makeEmbers(world, tempPos, world.rand);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (world.getBlockState(tempPos).getBlock() instanceof Bloomery) {
|
if (world.getBlockState(tempPos).getBlock() instanceof BloomeryBase) {
|
||||||
TileBloomery tile = (TileBloomery) world.getTileEntity(tempPos);
|
TileBloomery tile = (TileBloomery) world.getTileEntity(tempPos);
|
||||||
if ((world.getBlockState(tempPos).getValue(Bloomery.ACTIVE) == true) && (world.getBlockState(tempPos).getValue(Bloomery.FACING) == EnumFacing.WEST)) {
|
if ((world.getBlockState(tempPos).getValue(ACTIVE) == true) && (world.getBlockState(tempPos).getValue(BloomeryBase.FACING) == EnumFacing.WEST)) {
|
||||||
makeEmbers(world, tempPos, world.rand);
|
makeEmbers(world, tempPos, world.rand);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -422,15 +400,15 @@ public class PistonBellows extends CustomContainerFacing {
|
|||||||
|
|
||||||
if (state.getValue(PistonBellows.FACING) == EnumFacing.EAST) {
|
if (state.getValue(PistonBellows.FACING) == EnumFacing.EAST) {
|
||||||
BlockPos tempPos = new BlockPos(pos.getX(), pos.getY(), pos.getZ() + 1);
|
BlockPos tempPos = new BlockPos(pos.getX(), pos.getY(), pos.getZ() + 1);
|
||||||
if (world.getBlockState(tempPos).getBlock() == ModBlocks.firebox) {
|
if (world.getBlockState(tempPos).getBlock() instanceof Forge) {
|
||||||
TileForge tile = (TileForge) world.getTileEntity(tempPos);
|
TileForge tile = (TileForge) world.getTileEntity(tempPos);
|
||||||
if ((world.getBlockState(tempPos).getValue(Forge.ACTIVE) == true) && (world.getBlockState(tempPos).getValue(Forge.FACING) == EnumFacing.SOUTH)) {
|
if ((world.getBlockState(tempPos).getValue(ACTIVE) == true) && (world.getBlockState(tempPos).getValue(Forge.FACING) == EnumFacing.SOUTH)) {
|
||||||
makeEmbers(world, tempPos, world.rand);
|
makeEmbers(world, tempPos, world.rand);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (world.getBlockState(tempPos).getBlock() instanceof Bloomery) {
|
if (world.getBlockState(tempPos).getBlock() instanceof BloomeryBase) {
|
||||||
TileBloomery tile = (TileBloomery) world.getTileEntity(tempPos);
|
TileBloomery tile = (TileBloomery) world.getTileEntity(tempPos);
|
||||||
if ((world.getBlockState(tempPos).getValue(Bloomery.ACTIVE) == true) && (world.getBlockState(tempPos).getValue(Bloomery.FACING) == EnumFacing.SOUTH)) {
|
if ((world.getBlockState(tempPos).getValue(ACTIVE) == true) && (world.getBlockState(tempPos).getValue(BloomeryBase.FACING) == EnumFacing.SOUTH)) {
|
||||||
makeEmbers(world, tempPos, world.rand);
|
makeEmbers(world, tempPos, world.rand);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -439,15 +417,15 @@ public class PistonBellows extends CustomContainerFacing {
|
|||||||
|
|
||||||
if (state.getValue(PistonBellows.FACING) == EnumFacing.WEST) {
|
if (state.getValue(PistonBellows.FACING) == EnumFacing.WEST) {
|
||||||
BlockPos tempPos = new BlockPos(pos.getX(), pos.getY(), pos.getZ() - 1);
|
BlockPos tempPos = new BlockPos(pos.getX(), pos.getY(), pos.getZ() - 1);
|
||||||
if (world.getBlockState(tempPos).getBlock() == ModBlocks.firebox) {
|
if (world.getBlockState(tempPos).getBlock() instanceof Forge) {
|
||||||
TileForge tile = (TileForge) world.getTileEntity(tempPos);
|
TileForge tile = (TileForge) world.getTileEntity(tempPos);
|
||||||
if ((world.getBlockState(tempPos).getValue(Forge.ACTIVE) == true) && (world.getBlockState(tempPos).getValue(Forge.FACING) == EnumFacing.NORTH)) {
|
if ((world.getBlockState(tempPos).getValue(ACTIVE) == true) && (world.getBlockState(tempPos).getValue(Forge.FACING) == EnumFacing.NORTH)) {
|
||||||
makeEmbers(world, tempPos, world.rand);
|
makeEmbers(world, tempPos, world.rand);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (world.getBlockState(tempPos).getBlock() instanceof Bloomery) {
|
if (world.getBlockState(tempPos).getBlock() instanceof BloomeryBase) {
|
||||||
TileBloomery tile = (TileBloomery) world.getTileEntity(tempPos);
|
TileBloomery tile = (TileBloomery) world.getTileEntity(tempPos);
|
||||||
if ((world.getBlockState(tempPos).getValue(Bloomery.ACTIVE) == true) && (world.getBlockState(tempPos).getValue(Bloomery.FACING) == EnumFacing.NORTH)) {
|
if ((world.getBlockState(tempPos).getValue(ACTIVE) == true) && (world.getBlockState(tempPos).getValue(BloomeryBase.FACING) == EnumFacing.NORTH)) {
|
||||||
makeEmbers(world, tempPos, world.rand);
|
makeEmbers(world, tempPos, world.rand);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -459,7 +437,7 @@ public class PistonBellows extends CustomContainerFacing {
|
|||||||
double d1 = (double)pos.getY() + 0.2D;
|
double d1 = (double)pos.getY() + 0.2D;
|
||||||
double d2 = (double)pos.getZ() + 0.5D;
|
double d2 = (double)pos.getZ() + 0.5D;
|
||||||
double d3 = 0.52D;
|
double d3 = 0.52D;
|
||||||
double d4 = ThreadLocalRandom.current().nextDouble(0.075, 0.25);
|
double d4 = ThreadLocalRandom.current().nextDouble(0.066, 0.33);
|
||||||
double ySpeed = ThreadLocalRandom.current().nextDouble(0.05, 0.20);
|
double ySpeed = ThreadLocalRandom.current().nextDouble(0.05, 0.20);
|
||||||
|
|
||||||
if(rand.nextInt(3) == 0){
|
if(rand.nextInt(3) == 0){
|
||||||
64
kfc/src/main/java/nmd/primal/forgecraft/blocks/YewStave.java
Normal file
64
kfc/src/main/java/nmd/primal/forgecraft/blocks/YewStave.java
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
package nmd.primal.forgecraft.blocks;
|
||||||
|
|
||||||
|
import net.minecraft.block.material.Material;
|
||||||
|
import net.minecraft.block.state.IBlockState;
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.init.Blocks;
|
||||||
|
import net.minecraft.item.Item;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.util.EnumFacing;
|
||||||
|
import net.minecraft.util.EnumHand;
|
||||||
|
import net.minecraft.util.SoundCategory;
|
||||||
|
import net.minecraft.util.math.AxisAlignedBB;
|
||||||
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
import net.minecraft.world.IBlockAccess;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import nmd.primal.core.api.PrimalSounds;
|
||||||
|
import nmd.primal.core.common.helper.PlayerHelper;
|
||||||
|
import nmd.primal.core.common.items.tools.WorkBlade;
|
||||||
|
import nmd.primal.core.common.helper.CommonUtils;
|
||||||
|
import nmd.primal.forgecraft.init.ModItems;
|
||||||
|
import nmd.primal.forgecraft.init.ModSounds;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by mminaie on 7/2/17.
|
||||||
|
*/
|
||||||
|
public class YewStave extends BlockCustomBase {
|
||||||
|
|
||||||
|
public AxisAlignedBB AABBSTAVE = new AxisAlignedBB(13/32D, 0.0D, 13/32D, 19/32D, 1.0D, 19/32D);
|
||||||
|
|
||||||
|
public YewStave(Material material, String registryName, Float hardness) {
|
||||||
|
super(material, registryName, hardness);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos)
|
||||||
|
{
|
||||||
|
return AABBSTAVE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing facing, float hitx, float hity, float hitz) {
|
||||||
|
if (world.isRemote)
|
||||||
|
return true;
|
||||||
|
|
||||||
|
|
||||||
|
ItemStack pItem = player.inventory.getCurrentItem();
|
||||||
|
if(pItem.getItem() instanceof WorkBlade){
|
||||||
|
if(world.getBlockState(pos.up()).getBlock() instanceof YewStave ) {
|
||||||
|
//world.playSound(player, player.posX, player.posY, player.posZ, PrimalSounds.TOOL_BLADE_SCRAPE, SoundCategory.PLAYERS, 1.0F, 1F);
|
||||||
|
world.playSound(null, pos, PrimalSounds.TOOL_BLADE_SCRAPE, SoundCategory.PLAYERS, 1.0F, 1.0F);
|
||||||
|
if(CommonUtils.randomCheck(3) ) {
|
||||||
|
PlayerHelper.spawnItemOnGround(world, pos, new ItemStack(ModItems.rawlongbow, 1));
|
||||||
|
world.setBlockState(pos, Blocks.AIR.getDefaultState(), 2);
|
||||||
|
world.setBlockState(pos.up(), Blocks.AIR.getDefaultState(), 2);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -21,6 +21,10 @@ public class ModDictionary {/***************************************************
|
|||||||
//OreDictionary.registerOre("clayball", Items.CLAY_BALL);
|
//OreDictionary.registerOre("clayball", Items.CLAY_BALL);
|
||||||
OreDictionary.registerOre("ingotIron", ModBlocks.ironball);
|
OreDictionary.registerOre("ingotIron", ModBlocks.ironball);
|
||||||
OreDictionary.registerOre("nuggetIron", ModBlocks.ironchunk);
|
OreDictionary.registerOre("nuggetIron", ModBlocks.ironchunk);
|
||||||
|
OreDictionary.registerOre("ingotIron", ModBlocks.ironcleanball);
|
||||||
|
OreDictionary.registerOre("nuggetIron", ModBlocks.ironcleanchunk);
|
||||||
|
OreDictionary.registerOre("ingotSteel", ModBlocks.steelball);
|
||||||
|
OreDictionary.registerOre("nuggetSteel", ModBlocks.steelchunk);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,62 @@
|
|||||||
|
package nmd.primal.forgecraft.crafting;
|
||||||
|
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by mminaie on 6/22/17.
|
||||||
|
*/
|
||||||
|
public class CastingformCrafting {
|
||||||
|
|
||||||
|
// ***************************************************************************** //
|
||||||
|
// Recipe Handler AnvilCrafting
|
||||||
|
// ***************************************************************************** //
|
||||||
|
|
||||||
|
private static ArrayList<CastingformCrafting> castingRecipes = new ArrayList<>();
|
||||||
|
|
||||||
|
private String[] input = new String[25];
|
||||||
|
|
||||||
|
private ItemStack output;
|
||||||
|
|
||||||
|
public CastingformCrafting(String[] input, ItemStack output){
|
||||||
|
|
||||||
|
this.input = input;
|
||||||
|
this.output = output;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// ***************************************************************************** //
|
||||||
|
// Recipe Methods
|
||||||
|
// ***************************************************************************** //
|
||||||
|
|
||||||
|
public static void addRecipe(String[] input, ItemStack output)
|
||||||
|
{
|
||||||
|
castingRecipes.add(new CastingformCrafting(input, output));
|
||||||
|
}
|
||||||
|
|
||||||
|
public static boolean isRecipe(String[] array)
|
||||||
|
{
|
||||||
|
for(CastingformCrafting recipe : castingRecipes) {
|
||||||
|
if (Arrays.equals(array, recipe.input))
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static CastingformCrafting getRecipe(String[] array)
|
||||||
|
{
|
||||||
|
for(CastingformCrafting recipe : castingRecipes) {
|
||||||
|
if (Arrays.equals(array, recipe.input))
|
||||||
|
return recipe;
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String[] getInput() {return this.input;}
|
||||||
|
|
||||||
|
public ItemStack getOutput() {return this.output;}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -19,7 +19,12 @@ import net.minecraftforge.fml.common.registry.GameRegistry;
|
|||||||
import net.minecraftforge.fml.relauncher.Side;
|
import net.minecraftforge.fml.relauncher.Side;
|
||||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||||
import nmd.primal.core.common.items.tools.WorkMallet;
|
import nmd.primal.core.common.items.tools.WorkMallet;
|
||||||
|
import nmd.primal.forgecraft.blocks.Anvil.AnvilBase;
|
||||||
|
import nmd.primal.forgecraft.blocks.Anvil.AnvilIron;
|
||||||
|
import nmd.primal.forgecraft.blocks.Anvil.AnvilStone;
|
||||||
import nmd.primal.forgecraft.blocks.*;
|
import nmd.primal.forgecraft.blocks.*;
|
||||||
|
import nmd.primal.forgecraft.blocks.Crucibles.Crucible;
|
||||||
|
import nmd.primal.forgecraft.blocks.Crucibles.CrucibleHot;
|
||||||
import nmd.primal.forgecraft.items.ForgeHammer;
|
import nmd.primal.forgecraft.items.ForgeHammer;
|
||||||
import nmd.primal.forgecraft.tiles.TileAnvil;
|
import nmd.primal.forgecraft.tiles.TileAnvil;
|
||||||
|
|
||||||
@@ -28,9 +33,13 @@ import nmd.primal.forgecraft.tiles.TileAnvil;
|
|||||||
*/
|
*/
|
||||||
public class ModBlocks {
|
public class ModBlocks {
|
||||||
|
|
||||||
public static Block firebox;
|
public static Block forge_brick;
|
||||||
public static Block bloomery;
|
public static Block forge_adobe;
|
||||||
|
public static Block bloomery_brick;
|
||||||
|
public static Block bloomery_adobe;
|
||||||
public static Block blockbreaker;
|
public static Block blockbreaker;
|
||||||
|
public static Block castingform;
|
||||||
|
public static Block castingblock;
|
||||||
|
|
||||||
public static Block pistonbellowsoak;
|
public static Block pistonbellowsoak;
|
||||||
public static Block pistonbellowsjungle;
|
public static Block pistonbellowsjungle;
|
||||||
@@ -44,6 +53,26 @@ public class ModBlocks {
|
|||||||
public static Block emptycruciblecracked;
|
public static Block emptycruciblecracked;
|
||||||
public static Block emptycruciblecrackedhot;
|
public static Block emptycruciblecrackedhot;
|
||||||
|
|
||||||
|
public static Block rawbronzecrucible;
|
||||||
|
public static Block hotbronzecrucible;
|
||||||
|
public static Block hotcookedbronzecrucible;
|
||||||
|
|
||||||
|
public static Block rawbronzecrucible_redstone;
|
||||||
|
public static Block hotbronzecrucible_redstone;
|
||||||
|
public static Block hotcookedbronzecrucible_redstone;
|
||||||
|
|
||||||
|
public static Block rawbronzecrucible_lapis;
|
||||||
|
public static Block hotbronzecrucible_lapis;
|
||||||
|
public static Block hotcookedbronzecrucible_lapis;
|
||||||
|
|
||||||
|
public static Block rawbronzecrucible_diamond;
|
||||||
|
public static Block hotbronzecrucible_diamond;
|
||||||
|
public static Block hotcookedbronzecrucible_diamond;
|
||||||
|
|
||||||
|
public static Block rawbronzecrucible_emerald;
|
||||||
|
public static Block hotbronzecrucible_emerald;
|
||||||
|
public static Block hotcookedbronzecrucible_emerald;
|
||||||
|
|
||||||
public static Block rawironcrucible;
|
public static Block rawironcrucible;
|
||||||
public static Block hotironcrucible;
|
public static Block hotironcrucible;
|
||||||
public static Block hotcookedironcrucible;
|
public static Block hotcookedironcrucible;
|
||||||
@@ -84,12 +113,18 @@ public class ModBlocks {
|
|||||||
public static Block stoneanvil;
|
public static Block stoneanvil;
|
||||||
public static Block ironanvil;
|
public static Block ironanvil;
|
||||||
|
|
||||||
|
public static Block yewstave;
|
||||||
|
|
||||||
|
|
||||||
public static void init() {
|
public static void init() {
|
||||||
|
|
||||||
firebox = new Forge(Material.ROCK);
|
forge_brick = new Forge(Material.ROCK, "forge_brick", 5000);
|
||||||
bloomery = new Bloomery(Material.ROCK, "bloomery");
|
forge_adobe = new Forge(Material.ROCK, "forge_adobe", 5000);
|
||||||
|
bloomery_brick = new BloomeryBase(Material.ROCK, "bloomery_brick", 5000);
|
||||||
|
bloomery_adobe = new BloomeryBase(Material.ROCK, "bloomery_adobe", 5000);
|
||||||
blockbreaker = new Breaker(Material.WOOD, "blockbreaker", 4.0f);
|
blockbreaker = new Breaker(Material.WOOD, "blockbreaker", 4.0f);
|
||||||
|
castingform = new CastingForm(Material.WOOD, "castingform");
|
||||||
|
castingblock = new CastingBlock(Material.ROCK, "castingblock");
|
||||||
|
|
||||||
pistonbellowsoak = new PistonBellows(Material.WOOD, "pistonbellowsoak");
|
pistonbellowsoak = new PistonBellows(Material.WOOD, "pistonbellowsoak");
|
||||||
pistonbellowsjungle = new PistonBellows(Material.WOOD, "pistonbellowsjungle");
|
pistonbellowsjungle = new PistonBellows(Material.WOOD, "pistonbellowsjungle");
|
||||||
@@ -103,6 +138,26 @@ public class ModBlocks {
|
|||||||
emptycruciblecracked = new Crucible(Material.ROCK, "emptycruciblecracked");
|
emptycruciblecracked = new Crucible(Material.ROCK, "emptycruciblecracked");
|
||||||
emptycruciblecrackedhot = new CrucibleHot(Material.ROCK, "emptycruciblecrackedhot");
|
emptycruciblecrackedhot = new CrucibleHot(Material.ROCK, "emptycruciblecrackedhot");
|
||||||
|
|
||||||
|
rawbronzecrucible = new Crucible(Material.ROCK, "rawbronzecrucible");
|
||||||
|
hotbronzecrucible = new CrucibleHot(Material.ROCK, "hotbronzecrucible");
|
||||||
|
hotcookedbronzecrucible = new CrucibleHot(Material.ROCK, "hotcookedbronzecrucible");
|
||||||
|
|
||||||
|
rawbronzecrucible_redstone = new Crucible(Material.ROCK, "rawbronzecrucible_redstone");
|
||||||
|
hotbronzecrucible_redstone = new CrucibleHot(Material.ROCK, "hotbronzecrucible_redstone");
|
||||||
|
hotcookedbronzecrucible_redstone = new CrucibleHot(Material.ROCK, "hotcookedbronzecrucible_redstone");
|
||||||
|
|
||||||
|
rawbronzecrucible_diamond = new Crucible(Material.ROCK, "rawbronzecrucible_diamond");
|
||||||
|
hotbronzecrucible_diamond = new CrucibleHot(Material.ROCK, "hotbronzecrucible_diamond");
|
||||||
|
hotcookedbronzecrucible_diamond = new CrucibleHot(Material.ROCK, "hotcookedbronzecrucible_diamond");
|
||||||
|
|
||||||
|
rawbronzecrucible_lapis = new Crucible(Material.ROCK, "rawbronzecrucible_lapis");
|
||||||
|
hotbronzecrucible_lapis = new CrucibleHot(Material.ROCK, "hotbronzecrucible_lapis");
|
||||||
|
hotcookedbronzecrucible_lapis = new CrucibleHot(Material.ROCK, "hotcookedbronzecrucible_lapis");
|
||||||
|
|
||||||
|
rawbronzecrucible_emerald = new Crucible(Material.ROCK, "rawbronzecrucible_emerald");
|
||||||
|
hotbronzecrucible_emerald = new CrucibleHot(Material.ROCK, "hotbronzecrucible_emerald");
|
||||||
|
hotcookedbronzecrucible_emerald = new CrucibleHot(Material.ROCK, "hotcookedbronzecrucible_emerald");
|
||||||
|
|
||||||
rawironcrucible = new Crucible(Material.ROCK, "rawironcrucible");
|
rawironcrucible = new Crucible(Material.ROCK, "rawironcrucible");
|
||||||
hotironcrucible = new CrucibleHot(Material.ROCK, "hotironcrucible");
|
hotironcrucible = new CrucibleHot(Material.ROCK, "hotironcrucible");
|
||||||
hotcookedironcrucible = new CrucibleHot(Material.ROCK, "hotcookedironcrucible");
|
hotcookedironcrucible = new CrucibleHot(Material.ROCK, "hotcookedironcrucible");
|
||||||
@@ -142,7 +197,7 @@ public class ModBlocks {
|
|||||||
if (pItem instanceof WorkMallet && world.getBlockState(belowPos).getBlock().equals(Blocks.STONE)) {
|
if (pItem instanceof WorkMallet && world.getBlockState(belowPos).getBlock().equals(Blocks.STONE)) {
|
||||||
player.swingArm(hand);
|
player.swingArm(hand);
|
||||||
world.setBlockState(pos, Blocks.AIR.getDefaultState(), 2);
|
world.setBlockState(pos, Blocks.AIR.getDefaultState(), 2);
|
||||||
world.setBlockState(belowPos, ModBlocks.stoneanvil.getDefaultState().withProperty(Anvil.FACING, player.getHorizontalFacing()), 2);
|
world.setBlockState(belowPos, ModBlocks.stoneanvil.getDefaultState().withProperty(AnvilStone.FACING, player.getHorizontalFacing()), 2);
|
||||||
world.playEvent(1031, pos, 0);
|
world.playEvent(1031, pos, 0);
|
||||||
//CommonUtils.spawnItemEntityFromWorld(world, pos, new ItemStack(ModBlocks.stoneanvil, 1));
|
//CommonUtils.spawnItemEntityFromWorld(world, pos, new ItemStack(ModBlocks.stoneanvil, 1));
|
||||||
return true;
|
return true;
|
||||||
@@ -150,13 +205,13 @@ public class ModBlocks {
|
|||||||
/*if (pItem instanceof ForgeHammer && world.getBlockState(belowPos).getBlock().equals(Blocks.IRON_BLOCK)) {
|
/*if (pItem instanceof ForgeHammer && world.getBlockState(belowPos).getBlock().equals(Blocks.IRON_BLOCK)) {
|
||||||
player.swingArm(hand);
|
player.swingArm(hand);
|
||||||
world.setBlockState(pos, Blocks.AIR.getDefaultState(), 2);
|
world.setBlockState(pos, Blocks.AIR.getDefaultState(), 2);
|
||||||
world.setBlockState(belowPos, ModBlocks.ironanvil.getDefaultState().withProperty(Anvil.FACING, player.getHorizontalFacing()), 2);
|
world.setBlockState(belowPos, ModBlocks.ironanvil.getDefaultState().withProperty(AnvilStone.FACING, player.getHorizontalFacing()), 2);
|
||||||
world.playEvent(1031, pos, 0);
|
world.playEvent(1031, pos, 0);
|
||||||
//CommonUtils.spawnItemEntityFromWorld(world, pos, new ItemStack(ModBlocks.stoneanvil, 1));
|
//CommonUtils.spawnItemEntityFromWorld(world, pos, new ItemStack(ModBlocks.stoneanvil, 1));
|
||||||
return true;
|
return true;
|
||||||
}*/
|
}*/
|
||||||
if (pItem instanceof WorkMallet || pItem.equals(ModItems.forgehammer)) {
|
if (pItem instanceof WorkMallet || pItem.equals(ModItems.forgehammer)) {
|
||||||
if(world.getBlockState(belowPos).getBlock().equals(ModBlocks.stoneanvil)) {
|
if(world.getBlockState(belowPos).getBlock() instanceof AnvilBase) {
|
||||||
|
|
||||||
TileAnvil tile = (TileAnvil) world.getTileEntity(belowPos);
|
TileAnvil tile = (TileAnvil) world.getTileEntity(belowPos);
|
||||||
|
|
||||||
@@ -203,13 +258,13 @@ public class ModBlocks {
|
|||||||
if (pItem instanceof ForgeHammer && world.getBlockState(belowPos).getBlock().equals(Blocks.IRON_BLOCK)) {
|
if (pItem instanceof ForgeHammer && world.getBlockState(belowPos).getBlock().equals(Blocks.IRON_BLOCK)) {
|
||||||
player.swingArm(hand);
|
player.swingArm(hand);
|
||||||
world.setBlockState(pos, Blocks.AIR.getDefaultState(), 2);
|
world.setBlockState(pos, Blocks.AIR.getDefaultState(), 2);
|
||||||
world.setBlockState(belowPos, ModBlocks.ironanvil.getDefaultState().withProperty(Anvil.FACING, player.getHorizontalFacing()), 2);
|
world.setBlockState(belowPos, ModBlocks.ironanvil.getDefaultState().withProperty(AnvilStone.FACING, player.getHorizontalFacing()), 2);
|
||||||
world.playEvent(1031, pos, 0);
|
world.playEvent(1031, pos, 0);
|
||||||
//System.out.println("Activating");
|
//System.out.println("Activating");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (pItem instanceof WorkMallet || pItem.equals(ModItems.forgehammer)) {
|
if (pItem instanceof WorkMallet || pItem.equals(ModItems.forgehammer)) {
|
||||||
if(world.getBlockState(belowPos).getBlock() instanceof Anvil) {
|
if(world.getBlockState(belowPos).getBlock() instanceof AnvilBase) {
|
||||||
|
|
||||||
TileAnvil tile = (TileAnvil) world.getTileEntity(belowPos);
|
TileAnvil tile = (TileAnvil) world.getTileEntity(belowPos);
|
||||||
|
|
||||||
@@ -255,13 +310,13 @@ public class ModBlocks {
|
|||||||
if (pItem instanceof ForgeHammer && world.getBlockState(belowPos).getBlock().equals(Blocks.IRON_BLOCK)) {
|
if (pItem instanceof ForgeHammer && world.getBlockState(belowPos).getBlock().equals(Blocks.IRON_BLOCK)) {
|
||||||
player.swingArm(hand);
|
player.swingArm(hand);
|
||||||
world.setBlockState(pos, Blocks.AIR.getDefaultState(), 2);
|
world.setBlockState(pos, Blocks.AIR.getDefaultState(), 2);
|
||||||
world.setBlockState(belowPos, ModBlocks.ironanvil.getDefaultState().withProperty(Anvil.FACING, player.getHorizontalFacing()), 2);
|
world.setBlockState(belowPos, ModBlocks.ironanvil.getDefaultState().withProperty(AnvilStone.FACING, player.getHorizontalFacing()), 2);
|
||||||
world.playEvent(1031, pos, 0);
|
world.playEvent(1031, pos, 0);
|
||||||
//CommonUtils.spawnItemEntityFromWorld(world, pos, new ItemStack(ModBlocks.stoneanvil, 1));
|
//CommonUtils.spawnItemEntityFromWorld(world, pos, new ItemStack(ModBlocks.stoneanvil, 1));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (pItem instanceof WorkMallet || pItem.equals(ModItems.forgehammer)) {
|
if (pItem instanceof WorkMallet || pItem.equals(ModItems.forgehammer)) {
|
||||||
if(world.getBlockState(belowPos).getBlock() instanceof Anvil) {
|
if(world.getBlockState(belowPos).getBlock() instanceof AnvilBase) {
|
||||||
|
|
||||||
TileAnvil tile = (TileAnvil) world.getTileEntity(belowPos);
|
TileAnvil tile = (TileAnvil) world.getTileEntity(belowPos);
|
||||||
|
|
||||||
@@ -307,13 +362,13 @@ public class ModBlocks {
|
|||||||
if (pItem instanceof ForgeHammer && world.getBlockState(belowPos).getBlock().equals(Blocks.IRON_BLOCK)) {
|
if (pItem instanceof ForgeHammer && world.getBlockState(belowPos).getBlock().equals(Blocks.IRON_BLOCK)) {
|
||||||
player.swingArm(hand);
|
player.swingArm(hand);
|
||||||
world.setBlockState(pos, Blocks.AIR.getDefaultState(), 2);
|
world.setBlockState(pos, Blocks.AIR.getDefaultState(), 2);
|
||||||
world.setBlockState(belowPos, ModBlocks.ironanvil.getDefaultState().withProperty(Anvil.FACING, player.getHorizontalFacing()), 2);
|
world.setBlockState(belowPos, ModBlocks.ironanvil.getDefaultState().withProperty(AnvilStone.FACING, player.getHorizontalFacing()), 2);
|
||||||
world.playEvent(1031, pos, 0);
|
world.playEvent(1031, pos, 0);
|
||||||
//CommonUtils.spawnItemEntityFromWorld(world, pos, new ItemStack(ModBlocks.stoneanvil, 1));
|
//CommonUtils.spawnItemEntityFromWorld(world, pos, new ItemStack(ModBlocks.stoneanvil, 1));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (pItem instanceof WorkMallet || pItem.equals(ModItems.forgehammer)) {
|
if (pItem instanceof WorkMallet || pItem.equals(ModItems.forgehammer)) {
|
||||||
if(world.getBlockState(belowPos).getBlock() instanceof Anvil) {
|
if(world.getBlockState(belowPos).getBlock() instanceof AnvilBase) {
|
||||||
|
|
||||||
TileAnvil tile = (TileAnvil) world.getTileEntity(belowPos);
|
TileAnvil tile = (TileAnvil) world.getTileEntity(belowPos);
|
||||||
|
|
||||||
@@ -354,18 +409,23 @@ public class ModBlocks {
|
|||||||
steelchunk = new IngotBall(Material.IRON, "steelchunk", 6.0f, "chunk"); //steel_ingot steelchunk.json steelchunkhot.json - done
|
steelchunk = new IngotBall(Material.IRON, "steelchunk", 6.0f, "chunk"); //steel_ingot steelchunk.json steelchunkhot.json - done
|
||||||
wootzchunk = new IngotBall(Material.IRON, "wootzchunk", 6.0f, "chunk"); //wootz_ingot wootzchunk.json wootzchunkhot.json - done
|
wootzchunk = new IngotBall(Material.IRON, "wootzchunk", 6.0f, "chunk"); //wootz_ingot wootzchunk.json wootzchunkhot.json - done
|
||||||
|
|
||||||
stoneanvil = new Anvil(Material.ANVIL, "stoneanvil", 5.0f);
|
stoneanvil = new AnvilStone(Material.ANVIL, "stoneanvil", 5.0f, true);
|
||||||
ironanvil = new Anvil(Material.ANVIL, "ironanvil", 6.0f);
|
ironanvil = new AnvilIron(Material.ANVIL, "ironanvil", 6.0f, true);
|
||||||
//ironballitemcool = new ItemBlockIngotBall(ironball);
|
//ironballitemcool = new ItemBlockIngotBall(ironball);
|
||||||
//ironballitemhot = new ItemBlockIngotBall(ironball);
|
//ironballitemhot = new ItemBlockIngotBall(ironball);
|
||||||
|
yewstave = new YewStave(Material.WOOD, "yewstave", 3.0F);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public static void register() {
|
public static void register() {
|
||||||
registerBlock(firebox);
|
registerBlock(forge_brick);
|
||||||
registerBlock(bloomery);
|
registerBlock(forge_adobe);
|
||||||
|
registerBlock(bloomery_brick);
|
||||||
|
registerBlock(bloomery_adobe);
|
||||||
registerBlock(blockbreaker);
|
registerBlock(blockbreaker);
|
||||||
|
registerBlock(castingform);
|
||||||
|
registerBlock(castingblock);
|
||||||
|
|
||||||
registerBlock(pistonbellowsoak);
|
registerBlock(pistonbellowsoak);
|
||||||
registerBlock(pistonbellowsjungle);
|
registerBlock(pistonbellowsjungle);
|
||||||
@@ -379,6 +439,26 @@ public class ModBlocks {
|
|||||||
registerBlock(emptycruciblecracked);
|
registerBlock(emptycruciblecracked);
|
||||||
registerBlock(emptycruciblecrackedhot);
|
registerBlock(emptycruciblecrackedhot);
|
||||||
|
|
||||||
|
registerBlock(rawbronzecrucible);
|
||||||
|
registerBlock(hotbronzecrucible);
|
||||||
|
registerBlock(hotcookedbronzecrucible);
|
||||||
|
|
||||||
|
registerBlock(rawbronzecrucible_diamond);
|
||||||
|
registerBlock(hotbronzecrucible_diamond);
|
||||||
|
registerBlock(hotcookedbronzecrucible_diamond);
|
||||||
|
|
||||||
|
registerBlock(rawbronzecrucible_emerald);
|
||||||
|
registerBlock(hotbronzecrucible_emerald);
|
||||||
|
registerBlock(hotcookedbronzecrucible_emerald);
|
||||||
|
|
||||||
|
registerBlock(rawbronzecrucible_redstone);
|
||||||
|
registerBlock(hotbronzecrucible_redstone);
|
||||||
|
registerBlock(hotcookedbronzecrucible_redstone);
|
||||||
|
|
||||||
|
registerBlock(rawbronzecrucible_lapis);
|
||||||
|
registerBlock(hotbronzecrucible_lapis);
|
||||||
|
registerBlock(hotcookedbronzecrucible_lapis);
|
||||||
|
|
||||||
registerBlock(rawironcrucible);
|
registerBlock(rawironcrucible);
|
||||||
registerBlock(hotironcrucible);
|
registerBlock(hotironcrucible);
|
||||||
registerBlock(hotcookedironcrucible);
|
registerBlock(hotcookedironcrucible);
|
||||||
@@ -423,11 +503,17 @@ public class ModBlocks {
|
|||||||
|
|
||||||
registerBlock(stoneanvil);
|
registerBlock(stoneanvil);
|
||||||
registerBlock(ironanvil);
|
registerBlock(ironanvil);
|
||||||
|
|
||||||
|
registerBlock(yewstave);
|
||||||
}
|
}
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public static void registerRenders() {
|
public static void registerRenders() {
|
||||||
registerRender(firebox);
|
registerRender(forge_brick);
|
||||||
|
registerRender(forge_adobe);
|
||||||
|
registerRender(castingform);
|
||||||
|
registerRender(castingblock);
|
||||||
|
|
||||||
registerRender(blockbreaker);
|
registerRender(blockbreaker);
|
||||||
registerRender(pistonbellowsoak);
|
registerRender(pistonbellowsoak);
|
||||||
registerRender(pistonbellowsjungle);
|
registerRender(pistonbellowsjungle);
|
||||||
@@ -435,12 +521,35 @@ public class ModBlocks {
|
|||||||
registerRender(pistonbellowsspruce);
|
registerRender(pistonbellowsspruce);
|
||||||
registerRender(pistonbellowsdarkoak);
|
registerRender(pistonbellowsdarkoak);
|
||||||
registerRender(pistonbellowsacacia);
|
registerRender(pistonbellowsacacia);
|
||||||
registerRender(bloomery);
|
|
||||||
|
registerRender(bloomery_brick);
|
||||||
|
registerRender(bloomery_adobe);
|
||||||
|
|
||||||
registerRender(emptycrucible);
|
registerRender(emptycrucible);
|
||||||
registerRender(emptycruciblehot);
|
registerRender(emptycruciblehot);
|
||||||
registerRender(emptycruciblecracked);
|
registerRender(emptycruciblecracked);
|
||||||
registerRender(emptycruciblecrackedhot);
|
registerRender(emptycruciblecrackedhot);
|
||||||
|
|
||||||
|
registerRender(rawbronzecrucible);
|
||||||
|
registerRender(hotbronzecrucible);
|
||||||
|
registerRender(hotcookedbronzecrucible);
|
||||||
|
|
||||||
|
registerRender(rawbronzecrucible_diamond);
|
||||||
|
registerRender(hotbronzecrucible_diamond);
|
||||||
|
registerRender(hotcookedbronzecrucible_diamond);
|
||||||
|
|
||||||
|
registerRender(rawbronzecrucible_emerald);
|
||||||
|
registerRender(hotbronzecrucible_emerald);
|
||||||
|
registerRender(hotcookedbronzecrucible_emerald);
|
||||||
|
|
||||||
|
registerRender(rawbronzecrucible_redstone);
|
||||||
|
registerRender(hotbronzecrucible_redstone);
|
||||||
|
registerRender(hotcookedbronzecrucible_redstone);
|
||||||
|
|
||||||
|
registerRender(rawbronzecrucible_lapis);
|
||||||
|
registerRender(hotbronzecrucible_lapis);
|
||||||
|
registerRender(hotcookedbronzecrucible_lapis);
|
||||||
|
|
||||||
registerRender(rawironcrucible);
|
registerRender(rawironcrucible);
|
||||||
registerRender(hotironcrucible);
|
registerRender(hotironcrucible);
|
||||||
registerRender(hotcookedironcrucible);
|
registerRender(hotcookedironcrucible);
|
||||||
@@ -486,6 +595,8 @@ public class ModBlocks {
|
|||||||
registerRender(stoneanvil);
|
registerRender(stoneanvil);
|
||||||
registerRender(ironanvil);
|
registerRender(ironanvil);
|
||||||
|
|
||||||
|
registerRender(yewstave);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void registerBlock(Block block) {
|
private static void registerBlock(Block block) {
|
||||||
47
kfc/src/main/java/nmd/primal/forgecraft/init/ModConfig.java
Normal file
47
kfc/src/main/java/nmd/primal/forgecraft/init/ModConfig.java
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
package nmd.primal.forgecraft.init;
|
||||||
|
|
||||||
|
import net.minecraftforge.common.config.Config;
|
||||||
|
import nmd.primal.forgecraft.ForgeCraft;
|
||||||
|
import nmd.primal.forgecraft.ModInfo;
|
||||||
|
|
||||||
|
@Config(modid = ModInfo.MOD_ID, name = ModInfo.MOD_CONFIG, category = "")
|
||||||
|
@Config.LangKey("forgecraft.config.title")
|
||||||
|
@SuppressWarnings("unused")
|
||||||
|
public class ModConfig
|
||||||
|
{
|
||||||
|
static {
|
||||||
|
ForgeCraft.LOGGER.info("Loading Config File: " + ModInfo.MOD_CONFIG + ".cfg");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Main Config Sections
|
||||||
|
*/
|
||||||
|
public static Compatibility compatibility;
|
||||||
|
public static ModConfig.Features features;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Options related to compatibility with mods and vanilla features
|
||||||
|
*/
|
||||||
|
public static class Compatibility
|
||||||
|
{
|
||||||
|
@Config.Comment({"Ore Dictionary Wootz steel for compatibility with common mod steel"})
|
||||||
|
public static boolean COMPAT_DICTIONARY_WOOTZ_STEEL;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Customize main features of the mod
|
||||||
|
*/
|
||||||
|
public static class Features
|
||||||
|
{
|
||||||
|
@Config.Comment({"Smoke is produced from various forge blocks when active"})
|
||||||
|
public static boolean FEATURE_ENABLE_SMOKE = true;
|
||||||
|
|
||||||
|
@Config.RequiresMcRestart
|
||||||
|
@Config.Comment({"Various forge blocks will set fire to their surroundings when active"})
|
||||||
|
public static boolean FEATURE_ENABLE_FIRE = true;
|
||||||
|
|
||||||
|
@Config.Comment({"Sample config for a numeric range"})
|
||||||
|
@Config.RangeInt(min = 0, max = 1000)
|
||||||
|
public static int FEATURE_HEAT_RANGE = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -8,8 +8,10 @@ import net.minecraftforge.fml.common.registry.GameRegistry;
|
|||||||
import net.minecraftforge.oredict.OreDictionary;
|
import net.minecraftforge.oredict.OreDictionary;
|
||||||
import net.minecraftforge.oredict.ShapedOreRecipe;
|
import net.minecraftforge.oredict.ShapedOreRecipe;
|
||||||
import nmd.primal.core.api.PrimalItems;
|
import nmd.primal.core.api.PrimalItems;
|
||||||
|
import nmd.primal.core.common.helper.CommonUtils;
|
||||||
import nmd.primal.forgecraft.crafting.AnvilCrafting;
|
import nmd.primal.forgecraft.crafting.AnvilCrafting;
|
||||||
import nmd.primal.forgecraft.crafting.BloomeryCrafting;
|
import nmd.primal.forgecraft.crafting.BloomeryCrafting;
|
||||||
|
import nmd.primal.forgecraft.crafting.CastingformCrafting;
|
||||||
import nmd.primal.forgecraft.crafting.ForgeCrafting;
|
import nmd.primal.forgecraft.crafting.ForgeCrafting;
|
||||||
|
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
@@ -23,12 +25,51 @@ public class ModCrafting {
|
|||||||
|
|
||||||
Random rand = new Random();
|
Random rand = new Random();
|
||||||
|
|
||||||
|
/***CASTING BLOCK***/
|
||||||
|
GameRegistry.addShapedRecipe(new ItemStack(ModBlocks.castingblock),
|
||||||
|
" B ", "BXB", " B ", 'X', Blocks.STONE_SLAB, 'B', PrimalItems.ADOBEBRICK_DRY);
|
||||||
|
|
||||||
|
/***CASTING FORM***/
|
||||||
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.castingform, 1),
|
||||||
|
true, new Object[]{" S ", "S S", " S ",
|
||||||
|
('S'), "logSplit"
|
||||||
|
}));
|
||||||
|
/***CASTING MUD***/
|
||||||
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.castingmud, 4),
|
||||||
|
true, new Object[]{" C ", "CSC", " C ",
|
||||||
|
('S'), Blocks.SAND,
|
||||||
|
('C'), PrimalItems.MUD_CLUMP
|
||||||
|
}));
|
||||||
|
/***YEW STAVE***/
|
||||||
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.yewstave, 2),
|
||||||
|
true, new Object[]{"C", "C",
|
||||||
|
('C'), PrimalItems.LOGS_SPLIT_YEW
|
||||||
|
}));
|
||||||
|
/***Unstrung Longbow***/
|
||||||
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.unstrunglongbow, 1),
|
||||||
|
true, new Object[]{"C", "A",
|
||||||
|
('C'), "fatAnimal",
|
||||||
|
('A'), ModItems.rawlongbow
|
||||||
|
}));
|
||||||
|
/***Longbow***/
|
||||||
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.longbow, 1),
|
||||||
|
true, new Object[]{"C ","CA","C ",
|
||||||
|
('C'), PrimalItems.SILK_CORDAGE,
|
||||||
|
('A'), ModItems.unstrunglongbow
|
||||||
|
}));
|
||||||
|
|
||||||
|
|
||||||
/***Forge***/
|
/***Forge***/
|
||||||
GameRegistry.addShapedRecipe(new ItemStack(ModBlocks.firebox),
|
GameRegistry.addShapedRecipe(new ItemStack(ModBlocks.forge_brick),
|
||||||
"X X", "XYX", "X X", 'X', Items.BRICK, 'Y', Blocks.FURNACE);
|
"X X", "XYX", "X X", 'X', Items.BRICK, 'Y', Blocks.FURNACE);
|
||||||
|
GameRegistry.addShapedRecipe(new ItemStack(ModBlocks.forge_adobe),
|
||||||
|
"X X", "XYX", "X X", 'X', PrimalItems.ADOBEBRICK_DRY, 'Y', Blocks.FURNACE);
|
||||||
/***Bloomery***/
|
/***Bloomery***/
|
||||||
GameRegistry.addShapedRecipe(new ItemStack(ModBlocks.bloomery),
|
GameRegistry.addShapedRecipe(new ItemStack(ModBlocks.bloomery_brick),
|
||||||
"X X", "X X", "XXX", 'X', Items.BRICK);
|
"X X", "X X", "XXX", 'X', Items.BRICK);
|
||||||
|
|
||||||
|
GameRegistry.addShapedRecipe(new ItemStack(ModBlocks.bloomery_adobe),
|
||||||
|
"X X", "X X", "XXX", 'X', PrimalItems.ADOBEBRICK_DRY);
|
||||||
/***Block Breaker***/
|
/***Block Breaker***/
|
||||||
GameRegistry.addShapedRecipe(new ItemStack(ModBlocks.blockbreaker),
|
GameRegistry.addShapedRecipe(new ItemStack(ModBlocks.blockbreaker),
|
||||||
"L ", "BSB", "BBB", 'L', Blocks.LEVER, 'B', new ItemStack(Blocks.PLANKS, 1, OreDictionary.WILDCARD_VALUE), 'S', PrimalItems.SILK_CORDAGE_COILED);
|
"L ", "BSB", "BBB", 'L', Blocks.LEVER, 'B', new ItemStack(Blocks.PLANKS, 1, OreDictionary.WILDCARD_VALUE), 'S', PrimalItems.SILK_CORDAGE_COILED);
|
||||||
@@ -43,30 +84,28 @@ public class ModCrafting {
|
|||||||
|
|
||||||
/***Wooden PistonBellows***/
|
/***Wooden PistonBellows***/
|
||||||
GameRegistry.addShapedRecipe(new ItemStack(ModBlocks.pistonbellowsoak), "XXX", "X Y", "XXX",
|
GameRegistry.addShapedRecipe(new ItemStack(ModBlocks.pistonbellowsoak), "XXX", "X Y", "XXX",
|
||||||
'X', new ItemStack(Blocks.PLANKS, 1, 0), 'Y', ModItems.pistonbellows);
|
'X', new ItemStack(Blocks.PLANKS, 1, 0), 'Y', ModItems.bellowshandle);
|
||||||
GameRegistry.addShapedRecipe(new ItemStack(ModBlocks.pistonbellowsspruce), "XXX", "X Y", "XXX",
|
GameRegistry.addShapedRecipe(new ItemStack(ModBlocks.pistonbellowsspruce), "XXX", "X Y", "XXX",
|
||||||
'X', new ItemStack(Blocks.PLANKS, 1, 1), 'Y', ModItems.pistonbellows);
|
'X', new ItemStack(Blocks.PLANKS, 1, 1), 'Y', ModItems.bellowshandle);
|
||||||
GameRegistry.addShapedRecipe(new ItemStack(ModBlocks.pistonbellowsbirch), "XXX", "X Y", "XXX",
|
GameRegistry.addShapedRecipe(new ItemStack(ModBlocks.pistonbellowsbirch), "XXX", "X Y", "XXX",
|
||||||
'X', new ItemStack(Blocks.PLANKS, 1, 2), 'Y', ModItems.pistonbellows);
|
'X', new ItemStack(Blocks.PLANKS, 1, 2), 'Y', ModItems.bellowshandle);
|
||||||
GameRegistry.addShapedRecipe(new ItemStack(ModBlocks.pistonbellowsjungle), "XXX", "X Y", "XXX",
|
GameRegistry.addShapedRecipe(new ItemStack(ModBlocks.pistonbellowsjungle), "XXX", "X Y", "XXX",
|
||||||
'X', new ItemStack(Blocks.PLANKS, 1, 3), 'Y', ModItems.pistonbellows);
|
'X', new ItemStack(Blocks.PLANKS, 1, 3), 'Y', ModItems.bellowshandle);
|
||||||
GameRegistry.addShapedRecipe(new ItemStack(ModBlocks.pistonbellowsacacia), "XXX", "X Y", "XXX",
|
GameRegistry.addShapedRecipe(new ItemStack(ModBlocks.pistonbellowsacacia), "XXX", "X Y", "XXX",
|
||||||
'X', new ItemStack(Blocks.PLANKS, 1, 4), 'Y', ModItems.pistonbellows);
|
'X', new ItemStack(Blocks.PLANKS, 1, 4), 'Y', ModItems.bellowshandle);
|
||||||
GameRegistry.addShapedRecipe(new ItemStack(ModBlocks.pistonbellowsdarkoak), "XXX", "X Y", "XXX",
|
GameRegistry.addShapedRecipe(new ItemStack(ModBlocks.pistonbellowsdarkoak), "XXX", "X Y", "XXX",
|
||||||
'X', new ItemStack(Blocks.PLANKS, 1, 5), 'Y', ModItems.pistonbellows);
|
'X', new ItemStack(Blocks.PLANKS, 1, 5), 'Y', ModItems.bellowshandle);
|
||||||
|
|
||||||
/***Bellows Handle***/
|
/***Bellows Handle***/
|
||||||
GameRegistry.addShapedRecipe(new ItemStack(ModItems.pistonbellows),
|
GameRegistry.addShapedRecipe(new ItemStack(ModItems.bellowshandle),
|
||||||
"X X", "X X", " X ", 'X', Items.STICK);
|
"X X", "X X", " X ", 'X', Items.STICK);
|
||||||
|
|
||||||
/***Tongs***/
|
/***Tongs***/
|
||||||
GameRegistry.addShapedRecipe(new ItemStack(ModItems.stonetongs, 1),
|
GameRegistry.addShapedRecipe(new ItemStack(ModItems.stonetongs, 1),
|
||||||
"X X", "YSY", 'X', Blocks.STONE, 'S', Items.STRING, 'Y', Items.STICK);
|
"X X", "YSY", 'X', Blocks.STONE, 'S', Items.STRING, 'Y', Items.STICK);
|
||||||
|
|
||||||
/***Iron Crucible***/
|
/***RAW CRUCIBLES***/
|
||||||
|
|
||||||
|
|
||||||
//Regular Iron Ore
|
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.rawironcrucible),
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.rawironcrucible),
|
||||||
"X","Y",
|
"X","Y",
|
||||||
('X'), "oreIron",
|
('X'), "oreIron",
|
||||||
@@ -81,23 +120,104 @@ public class ModCrafting {
|
|||||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.rawsteelcrucible),
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.rawsteelcrucible),
|
||||||
"XC","Y ",
|
"XC","Y ",
|
||||||
('X'), new ItemStack(ModBlocks.ironcleanball, 1),
|
('X'), new ItemStack(ModBlocks.ironcleanball, 1),
|
||||||
('C'), new ItemStack(Items.COAL, 1, 1),
|
('C'), new ItemStack(PrimalItems.CHARCOAL_HIGH),
|
||||||
|
('Y'), ModBlocks.emptycrucible));
|
||||||
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.rawbronzecrucible),
|
||||||
|
"XCX"," X "," Y ",
|
||||||
|
('X'), "dustCopper",
|
||||||
|
('C'), "dustTin",
|
||||||
|
('Y'), ModBlocks.emptycrucible));
|
||||||
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.rawbronzecrucible),
|
||||||
|
"XXX"," X "," Y ",
|
||||||
|
('X'), "nuggetBronze",
|
||||||
|
('Y'), ModBlocks.emptycrucible));
|
||||||
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.rawbronzecrucible),
|
||||||
|
"X","Y",
|
||||||
|
('X'), new ItemStack(ModItems.bronzepickaxehead, 1, OreDictionary.WILDCARD_VALUE),
|
||||||
|
('Y'), ModBlocks.emptycrucible));
|
||||||
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.rawbronzecrucible),
|
||||||
|
"X","Y",
|
||||||
|
('X'), new ItemStack(ModItems.bronzeaxehead, 1, OreDictionary.WILDCARD_VALUE),
|
||||||
|
('Y'), ModBlocks.emptycrucible));
|
||||||
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.rawbronzecrucible),
|
||||||
|
"X","Y",
|
||||||
|
('X'), new ItemStack(ModItems.bronzeshovelhead, 1, OreDictionary.WILDCARD_VALUE),
|
||||||
|
('Y'), ModBlocks.emptycrucible));
|
||||||
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.rawbronzecrucible),
|
||||||
|
"X","Y",
|
||||||
|
('X'), new ItemStack(ModItems.bronzehoehead, 1, OreDictionary.WILDCARD_VALUE),
|
||||||
|
('Y'), ModBlocks.emptycrucible));
|
||||||
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.rawbronzecrucible),
|
||||||
|
"X","Y",
|
||||||
|
('X'), new ItemStack(ModItems.bronzegladius, 1, OreDictionary.WILDCARD_VALUE),
|
||||||
('Y'), ModBlocks.emptycrucible));
|
('Y'), ModBlocks.emptycrucible));
|
||||||
|
|
||||||
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.rawbronzecrucible_redstone),
|
||||||
|
"R","Y",
|
||||||
|
('R'), Items.REDSTONE,
|
||||||
|
('Y'), ModBlocks.rawbronzecrucible));
|
||||||
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.rawbronzecrucible_diamond),
|
||||||
|
"D","Y",
|
||||||
|
('D'), PrimalItems.DIAMOND_KNAPP,
|
||||||
|
('Y'), ModBlocks.rawbronzecrucible));
|
||||||
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.rawbronzecrucible_lapis),
|
||||||
|
"L","Y",
|
||||||
|
('L'), new ItemStack(Items.DYE, 1, 4),
|
||||||
|
('Y'), ModBlocks.rawbronzecrucible));
|
||||||
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.rawbronzecrucible_emerald),
|
||||||
|
"E","Y",
|
||||||
|
('E'), PrimalItems.EMERALD_KNAPP,
|
||||||
|
('Y'), ModBlocks.rawbronzecrucible));
|
||||||
|
|
||||||
|
|
||||||
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.rawbronzecrucible, 1),
|
||||||
|
"T", "Y",
|
||||||
|
('T'), new ItemStack(ModItems.brokenbronzetool, 1),
|
||||||
|
('Y'), new ItemStack(ModBlocks.emptycrucible, 1)
|
||||||
|
));
|
||||||
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.rawironcrucible, 1),
|
||||||
|
"T", "Y",
|
||||||
|
('T'), new ItemStack(ModItems.brokenwroughtirontool, 1),
|
||||||
|
('Y'), new ItemStack(ModBlocks.emptycrucible, 1)
|
||||||
|
));
|
||||||
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.rawcleanironcrucible, 1),
|
||||||
|
"T", "Y",
|
||||||
|
('T'), new ItemStack(ModItems.brokencleanirontool, 1),
|
||||||
|
('Y'), new ItemStack(ModBlocks.emptycrucible, 1)
|
||||||
|
));
|
||||||
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.rawsteelcrucible, 1),
|
||||||
|
"T", "Y",
|
||||||
|
('T'), new ItemStack(ModItems.brokensteeltool, 1),
|
||||||
|
('Y'), new ItemStack(ModBlocks.emptycrucible, 1)
|
||||||
|
));
|
||||||
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.rawwootzcrucible, 1),
|
||||||
|
"T", "Y",
|
||||||
|
('T'), new ItemStack(ModItems.brokenwootztool, 1),
|
||||||
|
('Y'), new ItemStack(ModBlocks.emptycrucible, 1)
|
||||||
|
));
|
||||||
|
|
||||||
|
|
||||||
|
/***************************************************************
|
||||||
|
* TOOL CRAFTING RECIPES
|
||||||
|
***************************************************************/
|
||||||
|
|
||||||
/***Pickaxe Crafting***/
|
/***Pickaxe Crafting***/
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ironpickaxe), "T", "C", "S",
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.bronzepickaxe, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S",
|
||||||
|
('T'), new ItemStack(ModItems.bronzepickaxehead, 1, OreDictionary.WILDCARD_VALUE), //new ItemStack( 1, OreDictionary.WILDCARD_VALUE),
|
||||||
|
('S'), PrimalItems.LACQUER_STICK,
|
||||||
|
('C'), "cordageGeneral"));
|
||||||
|
|
||||||
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ironpickaxe, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S",
|
||||||
('T'), new ItemStack(ModItems.pickaxehead, 1, OreDictionary.WILDCARD_VALUE), //new ItemStack( 1, OreDictionary.WILDCARD_VALUE),
|
('T'), new ItemStack(ModItems.pickaxehead, 1, OreDictionary.WILDCARD_VALUE), //new ItemStack( 1, OreDictionary.WILDCARD_VALUE),
|
||||||
('S'), PrimalItems.LACQUER_STICK,
|
('S'), PrimalItems.LACQUER_STICK,
|
||||||
('C'), "cordageGeneral"));
|
('C'), "cordageGeneral"));
|
||||||
|
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.cleanironpickaxe), "T", "C", "S",
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.cleanironpickaxe, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S",
|
||||||
('T'), new ItemStack(ModItems.cleanironpickaxehead, 1, OreDictionary.WILDCARD_VALUE),
|
('T'), new ItemStack(ModItems.cleanironpickaxehead, 1, OreDictionary.WILDCARD_VALUE),
|
||||||
('S'), PrimalItems.LACQUER_STICK,
|
('S'), PrimalItems.LACQUER_STICK,
|
||||||
('C'), "cordageGeneral"));
|
('C'), "cordageGeneral"));
|
||||||
|
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.steelpickaxe), "T", "C", "S",
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.steelpickaxe, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S",
|
||||||
('T'), new ItemStack(ModItems.steelpickaxehead, 1, OreDictionary.WILDCARD_VALUE),
|
('T'), new ItemStack(ModItems.steelpickaxehead, 1, OreDictionary.WILDCARD_VALUE),
|
||||||
('S'), PrimalItems.LACQUER_STICK,
|
('S'), PrimalItems.LACQUER_STICK,
|
||||||
('C'), "cordageGeneral"));
|
('C'), "cordageGeneral"));
|
||||||
@@ -105,19 +225,25 @@ public class ModCrafting {
|
|||||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Items.IRON_PICKAXE), "T", "S",
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Items.IRON_PICKAXE), "T", "S",
|
||||||
('T'), ModItems.pickaxehead,
|
('T'), ModItems.pickaxehead,
|
||||||
('S'), Items.STICK));
|
('S'), Items.STICK));
|
||||||
|
//TODO wootz placeholder
|
||||||
//placeholder wootz
|
|
||||||
|
|
||||||
/***Axe Crafting***/
|
/***Axe Crafting***/
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ironaxe), "T", "C", "S",
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.bronzeaxe, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S",
|
||||||
|
('T'), new ItemStack(ModItems.bronzeaxehead, 1, OreDictionary.WILDCARD_VALUE),
|
||||||
|
('S'), PrimalItems.LACQUER_STICK,
|
||||||
|
('C'), "cordageGeneral"));
|
||||||
|
|
||||||
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ironaxe, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S",
|
||||||
('T'), new ItemStack(ModItems.ironaxehead, 1, OreDictionary.WILDCARD_VALUE),
|
('T'), new ItemStack(ModItems.ironaxehead, 1, OreDictionary.WILDCARD_VALUE),
|
||||||
('S'), PrimalItems.LACQUER_STICK,
|
('S'), PrimalItems.LACQUER_STICK,
|
||||||
('C'), "cordageGeneral"));
|
('C'), "cordageGeneral"));
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.cleanironaxe), "T", "C", "S",
|
|
||||||
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.cleanironaxe, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S",
|
||||||
('T'), new ItemStack(ModItems.cleanironaxehead, 1, OreDictionary.WILDCARD_VALUE),
|
('T'), new ItemStack(ModItems.cleanironaxehead, 1, OreDictionary.WILDCARD_VALUE),
|
||||||
('S'), PrimalItems.LACQUER_STICK,
|
('S'), PrimalItems.LACQUER_STICK,
|
||||||
('C'), "cordageGeneral"));
|
('C'), "cordageGeneral"));
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.steelaxe), "T", "C", "S",
|
|
||||||
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.steelaxe, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S",
|
||||||
('T'), new ItemStack(ModItems.steelaxehead,1, OreDictionary.WILDCARD_VALUE),
|
('T'), new ItemStack(ModItems.steelaxehead,1, OreDictionary.WILDCARD_VALUE),
|
||||||
('S'), PrimalItems.LACQUER_STICK,
|
('S'), PrimalItems.LACQUER_STICK,
|
||||||
('C'), "cordageGeneral"));
|
('C'), "cordageGeneral"));
|
||||||
@@ -127,15 +253,22 @@ public class ModCrafting {
|
|||||||
('S'), Items.STICK));
|
('S'), Items.STICK));
|
||||||
|
|
||||||
/***Shovel Crafting***/
|
/***Shovel Crafting***/
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ironshovel), "T", "C", "S",
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.bronzeshovel, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S",
|
||||||
|
('T'), new ItemStack(ModItems.bronzeshovelhead, 1, OreDictionary.WILDCARD_VALUE),
|
||||||
|
('S'), PrimalItems.LACQUER_STICK,
|
||||||
|
('C'), "cordageGeneral"));
|
||||||
|
|
||||||
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ironshovel, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S",
|
||||||
('T'), new ItemStack(ModItems.ironshovelhead, 1, OreDictionary.WILDCARD_VALUE),
|
('T'), new ItemStack(ModItems.ironshovelhead, 1, OreDictionary.WILDCARD_VALUE),
|
||||||
('S'), PrimalItems.LACQUER_STICK,
|
('S'), PrimalItems.LACQUER_STICK,
|
||||||
('C'), "cordageGeneral"));
|
('C'), "cordageGeneral"));
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.cleanironshovel), "T", "C", "S",
|
|
||||||
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.cleanironshovel, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S",
|
||||||
('T'), new ItemStack(ModItems.cleanironshovelhead, 1, OreDictionary.WILDCARD_VALUE),
|
('T'), new ItemStack(ModItems.cleanironshovelhead, 1, OreDictionary.WILDCARD_VALUE),
|
||||||
('S'), PrimalItems.LACQUER_STICK,
|
('S'), PrimalItems.LACQUER_STICK,
|
||||||
('C'), "cordageGeneral"));
|
('C'), "cordageGeneral"));
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.steelshovel), "T", "C", "S",
|
|
||||||
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.steelshovel, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S",
|
||||||
('T'), new ItemStack(ModItems.steelshovelhead, 1, OreDictionary.WILDCARD_VALUE),
|
('T'), new ItemStack(ModItems.steelshovelhead, 1, OreDictionary.WILDCARD_VALUE),
|
||||||
('S'), PrimalItems.LACQUER_STICK,
|
('S'), PrimalItems.LACQUER_STICK,
|
||||||
('C'), "cordageGeneral"));
|
('C'), "cordageGeneral"));
|
||||||
@@ -145,15 +278,22 @@ public class ModCrafting {
|
|||||||
('S'), Items.STICK));
|
('S'), Items.STICK));
|
||||||
|
|
||||||
/***Hoe Crafting***/
|
/***Hoe Crafting***/
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ironhoe), "T", "C", "S",
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.bronzehoe, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S",
|
||||||
|
('T'), new ItemStack(ModItems.bronzehoehead, 1, OreDictionary.WILDCARD_VALUE),
|
||||||
|
('S'), PrimalItems.LACQUER_STICK,
|
||||||
|
('C'), "cordageGeneral"));
|
||||||
|
|
||||||
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ironhoe, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S",
|
||||||
('T'), new ItemStack(ModItems.ironhoehead, 1, OreDictionary.WILDCARD_VALUE),
|
('T'), new ItemStack(ModItems.ironhoehead, 1, OreDictionary.WILDCARD_VALUE),
|
||||||
('S'), PrimalItems.LACQUER_STICK,
|
('S'), PrimalItems.LACQUER_STICK,
|
||||||
('C'), "cordageGeneral"));
|
('C'), "cordageGeneral"));
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.cleanironhoe), "T", "C", "S",
|
|
||||||
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.cleanironhoe, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S",
|
||||||
('T'), new ItemStack(ModItems.cleanironhoehead, 1, OreDictionary.WILDCARD_VALUE),
|
('T'), new ItemStack(ModItems.cleanironhoehead, 1, OreDictionary.WILDCARD_VALUE),
|
||||||
('S'), PrimalItems.LACQUER_STICK,
|
('S'), PrimalItems.LACQUER_STICK,
|
||||||
('C'), "cordageGeneral"));
|
('C'), "cordageGeneral"));
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.steelhoe), "T", "C", "S",
|
|
||||||
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.steelhoe, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S",
|
||||||
('T'), new ItemStack(ModItems.steelhoehead, 1, OreDictionary.WILDCARD_VALUE),
|
('T'), new ItemStack(ModItems.steelhoehead, 1, OreDictionary.WILDCARD_VALUE),
|
||||||
('S'), PrimalItems.LACQUER_STICK,
|
('S'), PrimalItems.LACQUER_STICK,
|
||||||
('C'), "cordageGeneral"));
|
('C'), "cordageGeneral"));
|
||||||
@@ -164,11 +304,24 @@ public class ModCrafting {
|
|||||||
|
|
||||||
|
|
||||||
/***************************************************************
|
/***************************************************************
|
||||||
* TEMPORARY RECIPES
|
* TOOL DISASSEMBLY RECIPES
|
||||||
***************************************************************/
|
***************************************************************/
|
||||||
//GameRegistry.addShapedRecipe(new ItemStack(ModItems.ironaxehead, 1, OreDictionary.WILDCARD_VALUE),
|
//GameRegistry.addShapedRecipe(new ItemStack(ModItems.ironaxehead, 1, OreDictionary.WILDCARD_VALUE),
|
||||||
// " ", " X ", " ", 'X', ModItems.ironaxe);
|
// " ", " X ", " ", 'X', ModItems.ironaxe);
|
||||||
|
|
||||||
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.bronzeaxehead, 1, OreDictionary.WILDCARD_VALUE),
|
||||||
|
true, "X", ('X'), new ItemStack(ModItems.bronzeaxe, 1, OreDictionary.WILDCARD_VALUE)));
|
||||||
|
|
||||||
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.bronzepickaxehead, 1, OreDictionary.WILDCARD_VALUE),
|
||||||
|
true, "X", ('X'), new ItemStack(ModItems.bronzepickaxe, 1, OreDictionary.WILDCARD_VALUE)));
|
||||||
|
|
||||||
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.bronzeshovelhead, 1, OreDictionary.WILDCARD_VALUE),
|
||||||
|
true, "X", ('X'), new ItemStack(ModItems.bronzeshovel, 1, OreDictionary.WILDCARD_VALUE)));
|
||||||
|
|
||||||
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.bronzehoehead, 1, OreDictionary.WILDCARD_VALUE),
|
||||||
|
true, "X", ('X'), new ItemStack(ModItems.bronzehoe, 1, OreDictionary.WILDCARD_VALUE)));
|
||||||
|
|
||||||
|
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ironaxehead, 1, OreDictionary.WILDCARD_VALUE),
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ironaxehead, 1, OreDictionary.WILDCARD_VALUE),
|
||||||
true, "X", ('X'), new ItemStack(ModItems.ironaxe, 1, OreDictionary.WILDCARD_VALUE)));
|
true, "X", ('X'), new ItemStack(ModItems.ironaxe, 1, OreDictionary.WILDCARD_VALUE)));
|
||||||
|
|
||||||
@@ -217,7 +370,7 @@ public class ModCrafting {
|
|||||||
new ItemStack(ModBlocks.emptycruciblehot, 1),
|
new ItemStack(ModBlocks.emptycruciblehot, 1),
|
||||||
new ItemStack(ModBlocks.emptycruciblecrackedhot, 1),
|
new ItemStack(ModBlocks.emptycruciblecrackedhot, 1),
|
||||||
new ItemStack(ModBlocks.emptycrucible, 1),
|
new ItemStack(ModBlocks.emptycrucible, 1),
|
||||||
2100,
|
2000,
|
||||||
1600,
|
1600,
|
||||||
600,
|
600,
|
||||||
0.25f,
|
0.25f,
|
||||||
@@ -229,7 +382,7 @@ public class ModCrafting {
|
|||||||
new ItemStack(ModBlocks.emptycruciblecrackedhot, 1),
|
new ItemStack(ModBlocks.emptycruciblecrackedhot, 1),
|
||||||
new ItemStack(ModBlocks.emptycruciblecrackedhot, 1),
|
new ItemStack(ModBlocks.emptycruciblecrackedhot, 1),
|
||||||
new ItemStack(ModBlocks.emptycruciblecracked, 1),
|
new ItemStack(ModBlocks.emptycruciblecracked, 1),
|
||||||
2700,
|
2250,
|
||||||
9000,
|
9000,
|
||||||
600,
|
600,
|
||||||
0.0f,
|
0.0f,
|
||||||
@@ -254,7 +407,7 @@ public class ModCrafting {
|
|||||||
new ItemStack(ModBlocks.hotcookedironcrucible, 1),
|
new ItemStack(ModBlocks.hotcookedironcrucible, 1),
|
||||||
new ItemStack(ModBlocks.failedironcruciblehot, 1),
|
new ItemStack(ModBlocks.failedironcruciblehot, 1),
|
||||||
new ItemStack(ModBlocks.coolironcrucible, 1),
|
new ItemStack(ModBlocks.coolironcrucible, 1),
|
||||||
1550,
|
1400,
|
||||||
1200,
|
1200,
|
||||||
800,
|
800,
|
||||||
0.33f,
|
0.33f,
|
||||||
@@ -306,15 +459,202 @@ public class ModCrafting {
|
|||||||
new ItemStack(ModBlocks.hotcookedsteelcrucible, 1),
|
new ItemStack(ModBlocks.hotcookedsteelcrucible, 1),
|
||||||
new ItemStack(ModBlocks.failedsteelcrucible, 1),
|
new ItemStack(ModBlocks.failedsteelcrucible, 1),
|
||||||
new ItemStack(ModBlocks.coolsteelcrucible, 1),
|
new ItemStack(ModBlocks.coolsteelcrucible, 1),
|
||||||
1550,
|
2100,
|
||||||
1500,
|
1500,
|
||||||
1000,
|
1000,
|
||||||
0.2f,
|
0.2f,
|
||||||
0.25f
|
0.25f
|
||||||
);
|
);
|
||||||
|
//Makes the Hot Bronze Crucible
|
||||||
|
BloomeryCrafting.addRecipe(
|
||||||
|
new ItemStack(ModBlocks.rawbronzecrucible, 1),
|
||||||
|
new ItemStack(ModBlocks.hotbronzecrucible, 1),
|
||||||
|
new ItemStack(ModBlocks.hotbronzecrucible, 1),
|
||||||
|
new ItemStack(ModBlocks.rawbronzecrucible, 1),
|
||||||
|
800,
|
||||||
|
20,
|
||||||
|
500,
|
||||||
|
0.5f,
|
||||||
|
0.0f
|
||||||
|
);
|
||||||
|
|
||||||
//PLACE HOLDER FOR WOOTZ
|
//Makes the Finished Hot Bronze Crucible
|
||||||
|
BloomeryCrafting.addRecipe(
|
||||||
|
new ItemStack(ModBlocks.hotbronzecrucible, 1),
|
||||||
|
new ItemStack(ModBlocks.hotcookedbronzecrucible, 1),
|
||||||
|
new ItemStack(ModBlocks.hotcookedbronzecrucible, 1),
|
||||||
|
new ItemStack(ModBlocks.rawbronzecrucible, 1),
|
||||||
|
1100,
|
||||||
|
800,
|
||||||
|
600,
|
||||||
|
0.5f,
|
||||||
|
0.5f
|
||||||
|
);
|
||||||
|
|
||||||
|
//Makes the Hot Bronze Crucible
|
||||||
|
BloomeryCrafting.addRecipe(
|
||||||
|
new ItemStack(ModBlocks.rawbronzecrucible_diamond, 1),
|
||||||
|
new ItemStack(ModBlocks.hotbronzecrucible_diamond, 1),
|
||||||
|
new ItemStack(ModBlocks.hotbronzecrucible_diamond, 1),
|
||||||
|
new ItemStack(ModBlocks.rawbronzecrucible_diamond, 1),
|
||||||
|
800,
|
||||||
|
800,
|
||||||
|
500,
|
||||||
|
0.5f,
|
||||||
|
0.5f
|
||||||
|
);
|
||||||
|
|
||||||
|
//Makes the Finished Hot Bronze Crucible
|
||||||
|
BloomeryCrafting.addRecipe(
|
||||||
|
new ItemStack(ModBlocks.hotbronzecrucible_diamond, 1),
|
||||||
|
new ItemStack(ModBlocks.hotcookedbronzecrucible_diamond, 1),
|
||||||
|
new ItemStack(ModBlocks.hotcookedbronzecrucible_diamond, 1),
|
||||||
|
new ItemStack(ModBlocks.rawbronzecrucible_diamond, 1),
|
||||||
|
1100,
|
||||||
|
1100,
|
||||||
|
600,
|
||||||
|
0.5f,
|
||||||
|
0.5f
|
||||||
|
);
|
||||||
|
//Makes the Hot Bronze Crucible
|
||||||
|
BloomeryCrafting.addRecipe(
|
||||||
|
new ItemStack(ModBlocks.rawbronzecrucible_redstone, 1),
|
||||||
|
new ItemStack(ModBlocks.hotbronzecrucible_redstone, 1),
|
||||||
|
new ItemStack(ModBlocks.hotbronzecrucible_redstone, 1),
|
||||||
|
new ItemStack(ModBlocks.rawbronzecrucible_redstone, 1),
|
||||||
|
800,
|
||||||
|
20,
|
||||||
|
500,
|
||||||
|
0.5f,
|
||||||
|
0.0f
|
||||||
|
);
|
||||||
|
|
||||||
|
//Makes the Finished Hot Bronze Crucible
|
||||||
|
BloomeryCrafting.addRecipe(
|
||||||
|
new ItemStack(ModBlocks.hotbronzecrucible_redstone, 1),
|
||||||
|
new ItemStack(ModBlocks.hotcookedbronzecrucible_redstone, 1),
|
||||||
|
new ItemStack(ModBlocks.hotcookedbronzecrucible_redstone, 1),
|
||||||
|
new ItemStack(ModBlocks.rawbronzecrucible_redstone, 1),
|
||||||
|
1100,
|
||||||
|
1100,
|
||||||
|
600,
|
||||||
|
0.5f,
|
||||||
|
0.5f
|
||||||
|
);
|
||||||
|
//Makes the Hot Bronze Crucible
|
||||||
|
BloomeryCrafting.addRecipe(
|
||||||
|
new ItemStack(ModBlocks.rawbronzecrucible_emerald, 1),
|
||||||
|
new ItemStack(ModBlocks.hotbronzecrucible_emerald, 1),
|
||||||
|
new ItemStack(ModBlocks.hotbronzecrucible_emerald, 1),
|
||||||
|
new ItemStack(ModBlocks.rawbronzecrucible_emerald, 1),
|
||||||
|
800,
|
||||||
|
20,
|
||||||
|
500,
|
||||||
|
0.5f,
|
||||||
|
0.0f
|
||||||
|
);
|
||||||
|
|
||||||
|
//Makes the Finished Hot Bronze Crucible
|
||||||
|
BloomeryCrafting.addRecipe(
|
||||||
|
new ItemStack(ModBlocks.hotbronzecrucible_emerald, 1),
|
||||||
|
new ItemStack(ModBlocks.hotcookedbronzecrucible_emerald, 1),
|
||||||
|
new ItemStack(ModBlocks.hotcookedbronzecrucible_emerald, 1),
|
||||||
|
new ItemStack(ModBlocks.rawbronzecrucible_emerald, 1),
|
||||||
|
1100,
|
||||||
|
1100,
|
||||||
|
600,
|
||||||
|
0.5f,
|
||||||
|
0.5f
|
||||||
|
);
|
||||||
|
//Makes the Hot Bronze Crucible
|
||||||
|
BloomeryCrafting.addRecipe(
|
||||||
|
new ItemStack(ModBlocks.rawbronzecrucible_lapis, 1),
|
||||||
|
new ItemStack(ModBlocks.hotbronzecrucible_lapis, 1),
|
||||||
|
new ItemStack(ModBlocks.hotbronzecrucible_lapis, 1),
|
||||||
|
new ItemStack(ModBlocks.rawbronzecrucible_lapis, 1),
|
||||||
|
800,
|
||||||
|
20,
|
||||||
|
500,
|
||||||
|
0.5f,
|
||||||
|
0.0f
|
||||||
|
);
|
||||||
|
|
||||||
|
//Makes the Finished Hot Bronze Crucible
|
||||||
|
BloomeryCrafting.addRecipe(
|
||||||
|
new ItemStack(ModBlocks.hotbronzecrucible_lapis, 1),
|
||||||
|
new ItemStack(ModBlocks.hotcookedbronzecrucible_lapis, 1),
|
||||||
|
new ItemStack(ModBlocks.hotcookedbronzecrucible_lapis, 1),
|
||||||
|
new ItemStack(ModBlocks.rawbronzecrucible_lapis, 1),
|
||||||
|
1100,
|
||||||
|
1100,
|
||||||
|
600,
|
||||||
|
0.5f,
|
||||||
|
0.5f
|
||||||
|
);
|
||||||
|
|
||||||
|
//TODO PLACE HOLDER FOR WOOTZ
|
||||||
|
|
||||||
|
/******************************************************************************
|
||||||
|
CASTING
|
||||||
|
******************************************************************************/
|
||||||
|
|
||||||
|
String empty = ItemStack.EMPTY.getItem().getRegistryName().toString();
|
||||||
|
String muddd = ModItems.castingmud.getRegistryName().toString();
|
||||||
|
|
||||||
|
//Casting Pickaxe
|
||||||
|
CastingformCrafting.addRecipe(
|
||||||
|
new String[] {
|
||||||
|
muddd,muddd,muddd,muddd,muddd,
|
||||||
|
muddd,empty,empty,empty,muddd,
|
||||||
|
empty,muddd,muddd,muddd,empty,
|
||||||
|
muddd,muddd,muddd,muddd,muddd,
|
||||||
|
muddd,muddd,muddd,muddd,muddd },
|
||||||
|
new ItemStack(ModItems.cast_pickaxe, 1)
|
||||||
|
);
|
||||||
|
|
||||||
|
//Casting Shovel
|
||||||
|
CastingformCrafting.addRecipe(
|
||||||
|
new String[] {
|
||||||
|
muddd,muddd,muddd,muddd,muddd,
|
||||||
|
muddd,muddd,empty,muddd,muddd,
|
||||||
|
muddd,empty,empty,empty,muddd,
|
||||||
|
muddd,empty,empty,empty,muddd,
|
||||||
|
muddd,empty,muddd,empty,muddd },
|
||||||
|
new ItemStack(ModItems.cast_shovel, 1)
|
||||||
|
);
|
||||||
|
|
||||||
|
//Casting Axe
|
||||||
|
CastingformCrafting.addRecipe(
|
||||||
|
new String[] {
|
||||||
|
muddd,empty,empty,muddd,muddd,
|
||||||
|
muddd,empty,empty,empty,muddd,
|
||||||
|
muddd,empty,empty,empty,muddd,
|
||||||
|
muddd,empty,muddd,muddd,muddd,
|
||||||
|
muddd,muddd,muddd,muddd,muddd },
|
||||||
|
new ItemStack(ModItems.cast_axe, 1)
|
||||||
|
);
|
||||||
|
|
||||||
|
//Casting Hoe
|
||||||
|
CastingformCrafting.addRecipe(
|
||||||
|
new String[] {
|
||||||
|
muddd,muddd,muddd,empty,empty,
|
||||||
|
muddd,muddd,empty,muddd,muddd,
|
||||||
|
muddd,empty,muddd,muddd,muddd,
|
||||||
|
empty,muddd,muddd,muddd,muddd,
|
||||||
|
muddd,muddd,muddd,muddd,muddd },
|
||||||
|
new ItemStack(ModItems.cast_hoe, 1)
|
||||||
|
);
|
||||||
|
|
||||||
|
//Casting Gladius
|
||||||
|
CastingformCrafting.addRecipe(
|
||||||
|
new String[] {
|
||||||
|
muddd,muddd,muddd,muddd,muddd,
|
||||||
|
muddd,muddd,empty,muddd,muddd,
|
||||||
|
muddd,muddd,empty,muddd,muddd,
|
||||||
|
muddd,empty,empty,empty,muddd,
|
||||||
|
muddd,muddd,empty,muddd,muddd },
|
||||||
|
new ItemStack(ModItems.cast_gladius, 1)
|
||||||
|
);
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
FORGING
|
FORGING
|
||||||
@@ -419,7 +759,7 @@ public class ModCrafting {
|
|||||||
ForgeCrafting.addRecipe(
|
ForgeCrafting.addRecipe(
|
||||||
ModItems.steelpickaxehead,
|
ModItems.steelpickaxehead,
|
||||||
new ItemStack(ModItems.steelpickaxehead, 1 ),
|
new ItemStack(ModItems.steelpickaxehead, 1 ),
|
||||||
800,
|
1000,
|
||||||
160,
|
160,
|
||||||
400,
|
400,
|
||||||
1.0f,
|
1.0f,
|
||||||
@@ -528,7 +868,7 @@ public class ModCrafting {
|
|||||||
ANVILING
|
ANVILING
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
String empty = ItemStack.EMPTY.getItem().getRegistryName().toString();
|
//String empty = ItemStack.EMPTY.getItem().getRegistryName().toString();
|
||||||
String hotChunk = ModItems.ironchunkhot.getRegistryName().toString();
|
String hotChunk = ModItems.ironchunkhot.getRegistryName().toString();
|
||||||
String hotCleanChunk = ModItems.ironcleanchunkhot.getRegistryName().toString();
|
String hotCleanChunk = ModItems.ironcleanchunkhot.getRegistryName().toString();
|
||||||
String hotSteelChunk = ModItems.steelchunkhot.getRegistryName().toString();
|
String hotSteelChunk = ModItems.steelchunkhot.getRegistryName().toString();
|
||||||
@@ -603,6 +943,18 @@ public class ModCrafting {
|
|||||||
"null"
|
"null"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
/*** Iron Bars ***/
|
||||||
|
AnvilCrafting.addRecipe(
|
||||||
|
new String [] {
|
||||||
|
hotChunk,empty,hotChunk,empty,hotChunk,
|
||||||
|
hotChunk,hotChunk,hotChunk,hotChunk,hotChunk,
|
||||||
|
hotChunk,empty,hotChunk,empty,hotChunk,
|
||||||
|
hotChunk,hotChunk,hotChunk,hotChunk,hotChunk,
|
||||||
|
hotChunk,empty,hotChunk,empty,hotChunk, },
|
||||||
|
new ItemStack(PrimalItems.IRON_PLATE, 1),
|
||||||
|
"null"
|
||||||
|
);
|
||||||
|
|
||||||
/*** Flaked diamond ***/
|
/*** Flaked diamond ***/
|
||||||
AnvilCrafting.addRecipe(
|
AnvilCrafting.addRecipe(
|
||||||
new String[] {
|
new String[] {
|
||||||
@@ -611,7 +963,7 @@ public class ModCrafting {
|
|||||||
empty,empty,diamond,empty,empty,
|
empty,empty,diamond,empty,empty,
|
||||||
empty,empty,empty,empty,empty,
|
empty,empty,empty,empty,empty,
|
||||||
empty,empty,empty,empty,empty },
|
empty,empty,empty,empty,empty },
|
||||||
new ItemStack(PrimalItems.DIAMOND_KNAPP, 1),
|
new ItemStack(PrimalItems.DIAMOND_KNAPP, CommonUtils.randomChanceReturn(2, 2, 3)),
|
||||||
"null"
|
"null"
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -623,10 +975,11 @@ public class ModCrafting {
|
|||||||
empty,empty,hotChunk,empty,empty,
|
empty,empty,hotChunk,empty,empty,
|
||||||
empty,hotChunk,hotChunk,hotChunk,empty,
|
empty,hotChunk,hotChunk,hotChunk,empty,
|
||||||
empty,empty,hotChunk,empty,empty },
|
empty,empty,hotChunk,empty,empty },
|
||||||
new ItemStack(ModItems.ironsword, 1),
|
new ItemStack(ModItems.wroughtirongladius, 1),
|
||||||
"null"
|
"null"
|
||||||
);
|
);
|
||||||
/*** Temp Clean Iron Sword ***/
|
/*** Temp Clean Iron Sword ***/
|
||||||
|
//TODO uncomment this
|
||||||
AnvilCrafting.addRecipe(
|
AnvilCrafting.addRecipe(
|
||||||
new String[] {
|
new String[] {
|
||||||
empty,empty,empty,empty,empty,
|
empty,empty,empty,empty,empty,
|
||||||
@@ -634,7 +987,7 @@ public class ModCrafting {
|
|||||||
empty,empty,hotCleanChunk,empty,empty,
|
empty,empty,hotCleanChunk,empty,empty,
|
||||||
empty,hotCleanChunk,hotCleanChunk,hotCleanChunk,empty,
|
empty,hotCleanChunk,hotCleanChunk,hotCleanChunk,empty,
|
||||||
empty,empty,hotCleanChunk,empty,empty },
|
empty,empty,hotCleanChunk,empty,empty },
|
||||||
new ItemStack(ModItems.cleanironsword, 1),
|
new ItemStack(ModItems.cleanirongladius, 1),
|
||||||
"null"
|
"null"
|
||||||
);
|
);
|
||||||
/*** Temp Steel Sword ***/
|
/*** Temp Steel Sword ***/
|
||||||
@@ -645,9 +998,69 @@ public class ModCrafting {
|
|||||||
empty,empty,hotSteelChunk,empty,empty,
|
empty,empty,hotSteelChunk,empty,empty,
|
||||||
empty,hotSteelChunk,hotSteelChunk,hotSteelChunk,empty,
|
empty,hotSteelChunk,hotSteelChunk,hotSteelChunk,empty,
|
||||||
empty,empty,hotSteelChunk,empty,empty },
|
empty,empty,hotSteelChunk,empty,empty },
|
||||||
new ItemStack(ModItems.steelsword, 1),
|
new ItemStack(ModItems.steelgladius, 1),
|
||||||
"null"
|
"null"
|
||||||
);
|
);
|
||||||
|
/*** Temp Clean Iron LongSword ***/
|
||||||
|
//TODO uncomment this
|
||||||
|
AnvilCrafting.addRecipe(
|
||||||
|
new String[] {
|
||||||
|
empty,empty,hotCleanChunk,empty,empty,
|
||||||
|
empty,empty,hotCleanChunk,empty,empty,
|
||||||
|
empty,empty,hotCleanChunk,empty,empty,
|
||||||
|
empty,hotCleanChunk,hotCleanChunk,hotCleanChunk,empty,
|
||||||
|
empty,empty,hotCleanChunk,empty,empty },
|
||||||
|
new ItemStack(ModItems.cleanironlongsword, 1),
|
||||||
|
"null"
|
||||||
|
);
|
||||||
|
/*** Temp Steel LongSword ***/
|
||||||
|
AnvilCrafting.addRecipe(
|
||||||
|
new String[] {
|
||||||
|
empty,empty,hotSteelChunk,empty,empty,
|
||||||
|
empty,empty,hotSteelChunk,empty,empty,
|
||||||
|
empty,empty,hotSteelChunk,empty,empty,
|
||||||
|
empty,hotSteelChunk,hotSteelChunk,hotSteelChunk,empty,
|
||||||
|
empty,empty,hotSteelChunk,empty,empty },
|
||||||
|
new ItemStack(ModItems.steellongsword, 1),
|
||||||
|
"null"
|
||||||
|
);
|
||||||
|
|
||||||
|
/*** Temp WROUGHTIRON SLAYER ***/
|
||||||
|
AnvilCrafting.addRecipe(
|
||||||
|
new String[] {
|
||||||
|
empty,empty,hotChunk,hotChunk,hotChunk,
|
||||||
|
empty,empty,hotChunk,hotChunk,empty,
|
||||||
|
empty,empty,hotChunk,hotChunk,empty,
|
||||||
|
empty,hotChunk,hotChunk,hotChunk,hotChunk,
|
||||||
|
empty,empty,hotChunk,hotChunk,empty },
|
||||||
|
new ItemStack(ModItems.wroughtironslayer, 1),
|
||||||
|
"null"
|
||||||
|
);
|
||||||
|
/*** Temp CLEANIRON SLAYER ***/
|
||||||
|
AnvilCrafting.addRecipe(
|
||||||
|
new String[] {
|
||||||
|
empty,empty,hotCleanChunk,hotCleanChunk,hotCleanChunk,
|
||||||
|
empty,empty,hotCleanChunk,hotCleanChunk,empty,
|
||||||
|
empty,empty,hotCleanChunk,hotCleanChunk,empty,
|
||||||
|
empty,hotCleanChunk,hotCleanChunk,hotCleanChunk,hotCleanChunk,
|
||||||
|
empty,empty,hotCleanChunk,hotCleanChunk,empty },
|
||||||
|
new ItemStack(ModItems.cleanironslayer, 1),
|
||||||
|
"null"
|
||||||
|
);
|
||||||
|
/*** Temp STEELSLAYER ***/
|
||||||
|
AnvilCrafting.addRecipe(
|
||||||
|
new String[] {
|
||||||
|
empty,empty,hotSteelChunk,hotSteelChunk,hotSteelChunk,
|
||||||
|
empty,empty,hotSteelChunk,hotSteelChunk,empty,
|
||||||
|
empty,empty,hotSteelChunk,hotSteelChunk,empty,
|
||||||
|
empty,hotSteelChunk,hotSteelChunk,hotSteelChunk,hotSteelChunk,
|
||||||
|
empty,empty,hotSteelChunk,hotSteelChunk,empty },
|
||||||
|
new ItemStack(ModItems.steelslayer, 1),
|
||||||
|
"null"
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*** Flaked emerald ***/
|
/*** Flaked emerald ***/
|
||||||
AnvilCrafting.addRecipe(
|
AnvilCrafting.addRecipe(
|
||||||
@@ -657,7 +1070,7 @@ public class ModCrafting {
|
|||||||
empty,empty,emerald,empty,empty,
|
empty,empty,emerald,empty,empty,
|
||||||
empty,empty,empty,empty,empty,
|
empty,empty,empty,empty,empty,
|
||||||
empty,empty,empty,empty,empty },
|
empty,empty,empty,empty,empty },
|
||||||
new ItemStack(PrimalItems.EMERALD_KNAPP, 1),
|
new ItemStack(PrimalItems.EMERALD_KNAPP, CommonUtils.randomChanceReturn(3, 2, 3)),
|
||||||
"null"
|
"null"
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -1,8 +1,6 @@
|
|||||||
package nmd.primal.forgecraft.init;
|
package nmd.primal.forgecraft.init;
|
||||||
|
|
||||||
import net.minecraftforge.common.MinecraftForge;
|
import net.minecraftforge.common.MinecraftForge;
|
||||||
import net.minecraftforge.fml.relauncher.Side;
|
|
||||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
|
||||||
import nmd.primal.forgecraft.CommonEvents;
|
import nmd.primal.forgecraft.CommonEvents;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -17,9 +15,4 @@ public class ModEvents {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
|
||||||
public static void registerClientEvents() {
|
|
||||||
//MinecraftForge.EVENT_BUS.register(new ClientEvents());
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -4,6 +4,7 @@ import net.minecraft.client.Minecraft;
|
|||||||
import net.minecraft.client.renderer.ItemMeshDefinition;
|
import net.minecraft.client.renderer.ItemMeshDefinition;
|
||||||
import net.minecraft.client.renderer.block.model.ModelBakery;
|
import net.minecraft.client.renderer.block.model.ModelBakery;
|
||||||
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
|
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
|
||||||
|
import net.minecraft.inventory.EntityEquipmentSlot;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemBlock;
|
import net.minecraft.item.ItemBlock;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
@@ -15,13 +16,15 @@ import net.minecraftforge.fml.relauncher.SideOnly;
|
|||||||
import nmd.primal.core.api.PrimalMaterials;
|
import nmd.primal.core.api.PrimalMaterials;
|
||||||
import nmd.primal.forgecraft.ModInfo;
|
import nmd.primal.forgecraft.ModInfo;
|
||||||
import nmd.primal.forgecraft.items.*;
|
import nmd.primal.forgecraft.items.*;
|
||||||
|
import nmd.primal.forgecraft.items.armor.CustomLeggings;
|
||||||
|
import nmd.primal.forgecraft.items.casting.CastingPart;
|
||||||
|
import nmd.primal.forgecraft.items.parts.BronzeToolPart;
|
||||||
import nmd.primal.forgecraft.items.parts.ToolPart;
|
import nmd.primal.forgecraft.items.parts.ToolPart;
|
||||||
import nmd.primal.forgecraft.items.tools.CustomAxe;
|
import nmd.primal.forgecraft.items.tools.*;
|
||||||
import nmd.primal.forgecraft.items.tools.CustomHoe;
|
|
||||||
import nmd.primal.forgecraft.items.tools.CustomPickaxe;
|
|
||||||
import nmd.primal.forgecraft.items.tools.CustomShovel;
|
|
||||||
import nmd.primal.forgecraft.items.weapons.CustomShield;
|
import nmd.primal.forgecraft.items.weapons.CustomShield;
|
||||||
import nmd.primal.forgecraft.items.weapons.CustomSword;
|
import nmd.primal.forgecraft.items.weapons.CustomSword;
|
||||||
|
import nmd.primal.forgecraft.items.weapons.Longbow;
|
||||||
|
import nmd.primal.forgecraft.items.weapons.SlayerSword;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by kitsu on 11/26/2016.
|
* Created by kitsu on 11/26/2016.
|
||||||
@@ -29,10 +32,11 @@ import nmd.primal.forgecraft.items.weapons.CustomSword;
|
|||||||
public class ModItems {
|
public class ModItems {
|
||||||
|
|
||||||
//public static Item test;
|
//public static Item test;
|
||||||
public static Item pistonbellows;
|
public static Item bellowshandle;
|
||||||
public static Item forgehammer;
|
public static Item forgehammer;
|
||||||
public static Item softcrucible;
|
public static Item softcrucible;
|
||||||
public static Item stonetongs;
|
public static Item stonetongs;
|
||||||
|
public static Item castingmud;
|
||||||
|
|
||||||
public static Item ironingotballhot;
|
public static Item ironingotballhot;
|
||||||
public static Item ironchunkhot;
|
public static Item ironchunkhot;
|
||||||
@@ -44,6 +48,12 @@ public class ModItems {
|
|||||||
public static Item wootzchunkhot;
|
public static Item wootzchunkhot;
|
||||||
|
|
||||||
|
|
||||||
|
public static Item cast_axe;
|
||||||
|
public static Item cast_gladius;
|
||||||
|
public static Item cast_hoe;
|
||||||
|
public static Item cast_pickaxe;
|
||||||
|
public static Item cast_shovel;
|
||||||
|
|
||||||
|
|
||||||
public static Item pickaxehead;
|
public static Item pickaxehead;
|
||||||
public static Item ironaxehead;
|
public static Item ironaxehead;
|
||||||
@@ -66,6 +76,15 @@ public class ModItems {
|
|||||||
public static Item wootzhoehead;
|
public static Item wootzhoehead;
|
||||||
|
|
||||||
|
|
||||||
|
public static Item bronzepickaxehead;
|
||||||
|
public static Item bronzeaxehead;
|
||||||
|
public static Item bronzeshovelhead;
|
||||||
|
public static Item bronzehoehead;
|
||||||
|
|
||||||
|
public static Item bronzepickaxe;
|
||||||
|
public static Item bronzeaxe;
|
||||||
|
public static Item bronzeshovel;
|
||||||
|
public static Item bronzehoe;
|
||||||
|
|
||||||
public static Item ironpickaxe;
|
public static Item ironpickaxe;
|
||||||
public static Item ironaxe;
|
public static Item ironaxe;
|
||||||
@@ -87,10 +106,23 @@ public class ModItems {
|
|||||||
public static Item wootzshovel;
|
public static Item wootzshovel;
|
||||||
public static Item wootzhoe;
|
public static Item wootzhoe;
|
||||||
|
|
||||||
public static Item ironsword;
|
public static Item bronzegladius;
|
||||||
public static Item cleanironsword;
|
public static Item wroughtirongladius;
|
||||||
public static Item steelsword;
|
public static Item cleanirongladius;
|
||||||
public static Item wootzsword;
|
public static Item steelgladius;
|
||||||
|
|
||||||
|
public static Item cleanironlongsword;
|
||||||
|
public static Item steellongsword;
|
||||||
|
|
||||||
|
public static Item wroughtironslayer;
|
||||||
|
public static Item cleanironslayer;
|
||||||
|
public static Item steelslayer;
|
||||||
|
|
||||||
|
public static Item brokenbronzetool;
|
||||||
|
public static Item brokenwroughtirontool;
|
||||||
|
public static Item brokencleanirontool;
|
||||||
|
public static Item brokensteeltool;
|
||||||
|
public static Item brokenwootztool;
|
||||||
|
|
||||||
public static Item wroughtironshield;
|
public static Item wroughtironshield;
|
||||||
//public static Item cleanironshield;
|
//public static Item cleanironshield;
|
||||||
@@ -98,90 +130,143 @@ public class ModItems {
|
|||||||
//public static Item wootzshield;
|
//public static Item wootzshield;
|
||||||
|
|
||||||
public static Item matchlockmusket;
|
public static Item matchlockmusket;
|
||||||
|
public static Item rawlongbow;
|
||||||
|
public static Item unstrunglongbow;
|
||||||
|
public static Item longbow;
|
||||||
|
|
||||||
|
|
||||||
|
//public static Item testleggings;
|
||||||
|
|
||||||
//public static Item forgingmanual;
|
//public static Item forgingmanual;
|
||||||
|
|
||||||
public static void init() {
|
public static void init() {
|
||||||
//OBJLoader.INSTANCE.addDomain(ModInfo.MOD_ID);
|
//OBJLoader.INSTANCE.addDomain(ModInfo.MOD_ID);
|
||||||
pistonbellows = new ItemBellowsHandle();
|
//pistonbellows = new ItemBellowsHandle("pistonbellows");
|
||||||
softcrucible = new ItemSoftCrucible();
|
bellowshandle = new BaseItem("bellowshandle");
|
||||||
|
softcrucible = new ItemSoftCrucible("softcrucible");
|
||||||
stonetongs = new ItemStoneTongs("stonetongs");
|
stonetongs = new ItemStoneTongs("stonetongs");
|
||||||
forgehammer = new ForgeHammer("forgehammer");
|
forgehammer = new ForgeHammer("forgehammer");
|
||||||
|
castingmud = new BaseItem("castingmud");
|
||||||
|
|
||||||
|
rawlongbow = new BaseItem("rawlongbow");
|
||||||
|
unstrunglongbow = new BaseItem("unstrunglongbow");
|
||||||
|
longbow = new Longbow("longbow");
|
||||||
//matchlockmusket = new Musket("matchlock_musket");
|
//matchlockmusket = new Musket("matchlock_musket");
|
||||||
|
|
||||||
|
|
||||||
|
/**********
|
||||||
|
CASTING PARTS
|
||||||
|
**********/
|
||||||
|
cast_axe = new CastingPart("cast_axe");
|
||||||
|
cast_gladius = new CastingPart("cast_gladius");
|
||||||
|
cast_hoe = new CastingPart("cast_hoe");
|
||||||
|
cast_pickaxe = new CastingPart("cast_pickaxe");
|
||||||
|
cast_shovel = new CastingPart("cast_shovel");
|
||||||
|
|
||||||
/**********
|
/**********
|
||||||
TOOL PARTS
|
TOOL PARTS
|
||||||
**********/
|
**********/
|
||||||
pickaxehead = new ToolPart("ironpickaxehead", PrimalMaterials.TOOL_WROUGHT_IRON);
|
|
||||||
ironaxehead = new ToolPart("ironaxehead", PrimalMaterials.TOOL_WROUGHT_IRON);
|
|
||||||
ironshovelhead = new ToolPart("ironshovelhead", PrimalMaterials.TOOL_WROUGHT_IRON);
|
|
||||||
ironhoehead = new ToolPart("ironhoehead", PrimalMaterials.TOOL_WROUGHT_IRON);
|
|
||||||
|
|
||||||
cleanironpickaxehead = new ToolPart("cleanironpickaxehead", PrimalMaterials.TOOL_CLEAN_IRON);
|
bronzepickaxehead = new BronzeToolPart("bronzepickaxehead", PrimalMaterials.TOOL_BRONZE, 41);
|
||||||
cleanironaxehead = new ToolPart("cleanironaxehead", PrimalMaterials.TOOL_CLEAN_IRON);
|
bronzeaxehead = new BronzeToolPart("bronzeaxehead", PrimalMaterials.TOOL_BRONZE, 42);
|
||||||
cleanironshovelhead = new ToolPart("cleanironshovelhead", PrimalMaterials.TOOL_CLEAN_IRON);
|
bronzeshovelhead = new BronzeToolPart("bronzeshovelhead", PrimalMaterials.TOOL_BRONZE, 43);
|
||||||
cleanironhoehead = new ToolPart("cleanironhoehead", PrimalMaterials.TOOL_CLEAN_IRON);
|
bronzehoehead = new BronzeToolPart("bronzehoehead", PrimalMaterials.TOOL_BRONZE, 44);
|
||||||
|
|
||||||
steelpickaxehead = new ToolPart("steelpickaxehead", PrimalMaterials.TOOL_BASIC_STEEL);
|
pickaxehead = new ToolPart("ironpickaxehead", PrimalMaterials.TOOL_WROUGHT_IRON, 8);
|
||||||
steelaxehead = new ToolPart("steelaxehead", PrimalMaterials.TOOL_BASIC_STEEL);
|
ironaxehead = new ToolPart("ironaxehead", PrimalMaterials.TOOL_WROUGHT_IRON, 9);
|
||||||
steelshovelhead = new ToolPart("steelshovelhead", PrimalMaterials.TOOL_BASIC_STEEL);
|
ironshovelhead = new ToolPart("ironshovelhead", PrimalMaterials.TOOL_WROUGHT_IRON, 10);
|
||||||
steelhoehead = new ToolPart("steelhoehead", PrimalMaterials.TOOL_BASIC_STEEL);
|
ironhoehead = new ToolPart("ironhoehead", PrimalMaterials.TOOL_WROUGHT_IRON, 11);
|
||||||
|
|
||||||
wootzpickaxehead = new ToolPart("wootzpickaxehead", PrimalMaterials.TOOL_WOOTZ_STEEL);
|
cleanironpickaxehead = new ToolPart("cleanironpickaxehead", PrimalMaterials.TOOL_CLEAN_IRON, 17);
|
||||||
wootzaxehead = new ToolPart("wootzaxehead", PrimalMaterials.TOOL_WOOTZ_STEEL);
|
cleanironaxehead = new ToolPart("cleanironaxehead", PrimalMaterials.TOOL_CLEAN_IRON, 18);
|
||||||
wootzshovelhead = new ToolPart("wootzshovelhead", PrimalMaterials.TOOL_WOOTZ_STEEL);
|
cleanironshovelhead = new ToolPart("cleanironshovelhead", PrimalMaterials.TOOL_CLEAN_IRON, 19);
|
||||||
wootzhoehead = new ToolPart("wootzhoehead", PrimalMaterials.TOOL_WOOTZ_STEEL);
|
cleanironhoehead = new ToolPart("cleanironhoehead", PrimalMaterials.TOOL_CLEAN_IRON, 20);
|
||||||
|
|
||||||
|
steelpickaxehead = new ToolPart("steelpickaxehead", PrimalMaterials.TOOL_BASIC_STEEL, 26);
|
||||||
|
steelaxehead = new ToolPart("steelaxehead", PrimalMaterials.TOOL_BASIC_STEEL, 27);
|
||||||
|
steelshovelhead = new ToolPart("steelshovelhead", PrimalMaterials.TOOL_BASIC_STEEL, 28);
|
||||||
|
steelhoehead = new ToolPart("steelhoehead", PrimalMaterials.TOOL_BASIC_STEEL, 29);
|
||||||
|
|
||||||
|
wootzpickaxehead = new ToolPart("wootzpickaxehead", PrimalMaterials.TOOL_WOOTZ_STEEL, 35);
|
||||||
|
wootzaxehead = new ToolPart("wootzaxehead", PrimalMaterials.TOOL_WOOTZ_STEEL, 36);
|
||||||
|
wootzshovelhead = new ToolPart("wootzshovelhead", PrimalMaterials.TOOL_WOOTZ_STEEL, 37);
|
||||||
|
wootzhoehead = new ToolPart("wootzhoehead", PrimalMaterials.TOOL_WOOTZ_STEEL, 38);
|
||||||
/**********
|
/**********
|
||||||
TOOLS
|
TOOLS
|
||||||
**********/
|
**********/
|
||||||
ironpickaxe = new CustomPickaxe("ironpickaxe", PrimalMaterials.TOOL_WROUGHT_IRON);
|
bronzepickaxe = new BronzePickaxe("bronzepickaxe", PrimalMaterials.TOOL_BRONZE, bronzepickaxehead);
|
||||||
ironaxe = new CustomAxe("ironaxe", PrimalMaterials.TOOL_WROUGHT_IRON);
|
bronzeaxe = new BronzeAxe("bronzeaxe", PrimalMaterials.TOOL_BRONZE, bronzeaxehead);
|
||||||
ironshovel = new CustomShovel("ironshovel", PrimalMaterials.TOOL_WROUGHT_IRON);
|
bronzeshovel = new BronzeShovel("bronzeshovel", PrimalMaterials.TOOL_BRONZE, bronzeshovelhead);
|
||||||
ironhoe = new CustomHoe("ironhoe", PrimalMaterials.TOOL_WROUGHT_IRON);
|
bronzehoe = new BronzeHoe("bronzehoe", PrimalMaterials.TOOL_BRONZE, bronzehoehead);
|
||||||
|
|
||||||
cleanironpickaxe = new CustomPickaxe("cleanironpickaxe", PrimalMaterials.TOOL_CLEAN_IRON);
|
ironpickaxe = new CustomPickaxe("ironpickaxe", PrimalMaterials.TOOL_WROUGHT_IRON, pickaxehead);
|
||||||
cleanironaxe = new CustomAxe("cleanironaxe", PrimalMaterials.TOOL_CLEAN_IRON);
|
ironaxe = new CustomAxe("ironaxe", PrimalMaterials.TOOL_WROUGHT_IRON, ironaxehead);
|
||||||
cleanironshovel = new CustomShovel("cleanironshovel", PrimalMaterials.TOOL_CLEAN_IRON);
|
ironshovel = new CustomShovel("ironshovel", PrimalMaterials.TOOL_WROUGHT_IRON, ironshovelhead);
|
||||||
cleanironhoe = new CustomHoe("cleanironhoe", PrimalMaterials.TOOL_CLEAN_IRON);
|
ironhoe = new CustomHoe("ironhoe", PrimalMaterials.TOOL_WROUGHT_IRON, ironhoehead);
|
||||||
|
|
||||||
steelpickaxe = new CustomPickaxe("steelpickaxe", PrimalMaterials.TOOL_BASIC_STEEL);
|
cleanironpickaxe = new CustomPickaxe("cleanironpickaxe", PrimalMaterials.TOOL_CLEAN_IRON, cleanironpickaxehead);
|
||||||
steelaxe = new CustomAxe("steelaxe", PrimalMaterials.TOOL_BASIC_STEEL);
|
cleanironaxe = new CustomAxe("cleanironaxe", PrimalMaterials.TOOL_CLEAN_IRON, cleanironaxehead);
|
||||||
steelshovel = new CustomShovel("steelshovel", PrimalMaterials.TOOL_BASIC_STEEL);
|
cleanironshovel = new CustomShovel("cleanironshovel", PrimalMaterials.TOOL_CLEAN_IRON, cleanironshovelhead);
|
||||||
steelhoe = new CustomHoe("steelhoe", PrimalMaterials.TOOL_BASIC_STEEL);
|
cleanironhoe = new CustomHoe("cleanironhoe", PrimalMaterials.TOOL_CLEAN_IRON, cleanironhoehead);
|
||||||
|
|
||||||
wootzpickaxe = new CustomPickaxe("wootzpickaxe", PrimalMaterials.TOOL_WOOTZ_STEEL);
|
steelpickaxe = new CustomPickaxe("steelpickaxe", PrimalMaterials.TOOL_BASIC_STEEL, steelpickaxehead);
|
||||||
wootzaxe = new CustomAxe("wootzaxe", PrimalMaterials.TOOL_WOOTZ_STEEL);
|
steelaxe = new CustomAxe("steelaxe", PrimalMaterials.TOOL_BASIC_STEEL, steelaxehead);
|
||||||
wootzshovel = new CustomShovel("wootzshovel", PrimalMaterials.TOOL_WOOTZ_STEEL);
|
steelshovel = new CustomShovel("steelshovel", PrimalMaterials.TOOL_BASIC_STEEL, steelshovelhead);
|
||||||
wootzhoe = new CustomHoe("wootzhoe", PrimalMaterials.TOOL_WOOTZ_STEEL);
|
steelhoe = new CustomHoe("steelhoe", PrimalMaterials.TOOL_BASIC_STEEL, steelhoehead);
|
||||||
|
|
||||||
|
wootzpickaxe = new CustomPickaxe("wootzpickaxe", PrimalMaterials.TOOL_WOOTZ_STEEL, wootzpickaxehead);
|
||||||
|
wootzaxe = new CustomAxe("wootzaxe", PrimalMaterials.TOOL_WOOTZ_STEEL, wootzaxehead);
|
||||||
|
wootzshovel = new CustomShovel("wootzshovel", PrimalMaterials.TOOL_WOOTZ_STEEL, wootzshovelhead);
|
||||||
|
wootzhoe = new CustomHoe("wootzhoe", PrimalMaterials.TOOL_WOOTZ_STEEL, wootzhoehead);
|
||||||
|
|
||||||
/**********
|
/**********
|
||||||
WEAPONS
|
WEAPONS
|
||||||
**********/
|
**********/
|
||||||
ironsword = new CustomSword("ironsword", PrimalMaterials.TOOL_WROUGHT_IRON);
|
bronzegladius = new CustomSword("bronzegladius", PrimalMaterials.TOOL_BRONZE, 5D, 2D);
|
||||||
cleanironsword = new CustomSword("ironsword", PrimalMaterials.TOOL_CLEAN_IRON);
|
wroughtirongladius = new CustomSword("wroughtirongladius", PrimalMaterials.TOOL_WROUGHT_IRON, 4.5D, -1.85D);
|
||||||
steelsword = new CustomSword("ironsword", PrimalMaterials.TOOL_BASIC_STEEL);
|
cleanirongladius = new CustomSword("cleanirongladius", PrimalMaterials.TOOL_CLEAN_IRON, 5D, -1.85D);
|
||||||
wootzsword = new CustomSword("ironsword", PrimalMaterials.TOOL_WOOTZ_STEEL);
|
steelgladius = new CustomSword("steelgladius", PrimalMaterials.TOOL_BASIC_STEEL,6D, -1.85D);
|
||||||
|
|
||||||
|
cleanironlongsword = new CustomSword("cleanironlongsword", PrimalMaterials.TOOL_CLEAN_IRON, 7D, -2.5D);
|
||||||
|
steellongsword = new CustomSword("steellongsword", PrimalMaterials.TOOL_BASIC_STEEL,8D, -2.25D);
|
||||||
|
|
||||||
|
wroughtironslayer = new SlayerSword("wroughtironslayer", PrimalMaterials.TOOL_WROUGHT_IRON, 11.5D, -3.7D);
|
||||||
|
cleanironslayer = new SlayerSword("cleanironslayer", PrimalMaterials.TOOL_CLEAN_IRON, 10D, -3.5D);
|
||||||
|
steelslayer = new SlayerSword("steelslayer", PrimalMaterials.TOOL_BASIC_STEEL,11D, -3.3D);
|
||||||
|
|
||||||
wroughtironshield = new CustomShield("wroughtironshield", PrimalMaterials.TOOL_WROUGHT_IRON);
|
wroughtironshield = new CustomShield("wroughtironshield", PrimalMaterials.TOOL_WROUGHT_IRON);
|
||||||
|
|
||||||
/**********
|
/**********
|
||||||
INGOTS AND CHUNKS
|
INGOTS AND CHUNKS
|
||||||
**********/
|
**********/
|
||||||
ironingotballhot = new BaseMultiItem("ironingothot", PrimalMaterials.TOOL_WROUGHT_IRON);
|
ironingotballhot = new BaseMultiItem("ironingothot", PrimalMaterials.TOOL_WROUGHT_IRON, 6);
|
||||||
ironchunkhot = new BaseMultiItem("ironchunkhot", PrimalMaterials.TOOL_WROUGHT_IRON);
|
ironchunkhot = new BaseMultiItem("ironchunkhot", PrimalMaterials.TOOL_WROUGHT_IRON, 7);
|
||||||
ironcleaningotballhot= new BaseMultiItem("ironcleaningotballhot", PrimalMaterials.TOOL_CLEAN_IRON);
|
ironcleaningotballhot= new BaseMultiItem("ironcleaningotballhot", PrimalMaterials.TOOL_CLEAN_IRON, 15);
|
||||||
ironcleanchunkhot= new BaseMultiItem("ironcleanchunkhot", PrimalMaterials.TOOL_CLEAN_IRON);
|
ironcleanchunkhot= new BaseMultiItem("ironcleanchunkhot", PrimalMaterials.TOOL_CLEAN_IRON, 16);
|
||||||
steelingotballhot= new BaseMultiItem("steelingotballhot", PrimalMaterials.TOOL_BASIC_STEEL);
|
steelingotballhot= new BaseMultiItem("steelingotballhot", PrimalMaterials.TOOL_BASIC_STEEL, 24);
|
||||||
steelchunkhot= new BaseMultiItem("steelchunkhot", PrimalMaterials.TOOL_BASIC_STEEL);
|
steelchunkhot= new BaseMultiItem("steelchunkhot", PrimalMaterials.TOOL_BASIC_STEEL, 25);
|
||||||
wootzingotballhot= new BaseMultiItem("wootzingotballhot", PrimalMaterials.TOOL_WOOTZ_STEEL);
|
wootzingotballhot= new BaseMultiItem("wootzingotballhot", PrimalMaterials.TOOL_WOOTZ_STEEL, 33);
|
||||||
wootzchunkhot= new BaseMultiItem("wootzchunkhot", PrimalMaterials.TOOL_WOOTZ_STEEL);
|
wootzchunkhot= new BaseMultiItem("wootzchunkhot", PrimalMaterials.TOOL_WOOTZ_STEEL, 34);
|
||||||
|
|
||||||
//forgingmanual = new ItemForgingManual();
|
//forgingmanual = new ItemForgingManual();
|
||||||
//test = new ItemTest("ironsword");
|
//test = new ItemTest("ironsword");
|
||||||
|
|
||||||
|
brokenbronzetool = new BaseItem("brokenbronzetool");
|
||||||
|
brokenwroughtirontool = new BaseItem("brokenwroughtirontool");
|
||||||
|
brokencleanirontool = new BaseItem("brokencleanirontool");
|
||||||
|
brokensteeltool = new BaseItem("brokensteeltool");
|
||||||
|
brokenwootztool = new BaseItem("brokenwootztool");
|
||||||
|
|
||||||
|
/**********
|
||||||
|
ARMOR
|
||||||
|
**********/
|
||||||
|
//testleggings=new CustomLeggings(PrimalMaterials.ARMOR_ADAMANT, 3, EntityEquipmentSlot.LEGS, "testleggings");
|
||||||
|
//registerItem(312, "diamond_leggings", (new ItemArmor(ItemArmor.ArmorMaterial.DIAMOND, 3, EntityEquipmentSlot.LEGS)).setUnlocalizedName("leggingsDiamond"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void register() {
|
public static void register() {
|
||||||
GameRegistry.register(pistonbellows);
|
GameRegistry.register(castingmud);
|
||||||
|
GameRegistry.register(bellowshandle);
|
||||||
GameRegistry.register(softcrucible);
|
GameRegistry.register(softcrucible);
|
||||||
GameRegistry.register(stonetongs);
|
GameRegistry.register(stonetongs);
|
||||||
GameRegistry.register(forgehammer);
|
GameRegistry.register(forgehammer);
|
||||||
@@ -195,9 +280,23 @@ public class ModItems {
|
|||||||
GameRegistry.register(wootzchunkhot);
|
GameRegistry.register(wootzchunkhot);
|
||||||
//GameRegistry.register(test);
|
//GameRegistry.register(test);
|
||||||
|
|
||||||
|
/**********
|
||||||
|
CASTING PARTS
|
||||||
|
**********/
|
||||||
|
GameRegistry.register(cast_axe);
|
||||||
|
GameRegistry.register(cast_gladius);
|
||||||
|
GameRegistry.register(cast_hoe);
|
||||||
|
GameRegistry.register(cast_pickaxe);
|
||||||
|
GameRegistry.register(cast_shovel);
|
||||||
|
|
||||||
/**********
|
/**********
|
||||||
TOOL PARTS
|
TOOL PARTS
|
||||||
**********/
|
**********/
|
||||||
|
GameRegistry.register(bronzepickaxehead);
|
||||||
|
GameRegistry.register(bronzeaxehead);
|
||||||
|
GameRegistry.register(bronzeshovelhead);
|
||||||
|
GameRegistry.register(bronzehoehead);
|
||||||
|
|
||||||
GameRegistry.register(pickaxehead);
|
GameRegistry.register(pickaxehead);
|
||||||
GameRegistry.register(ironaxehead);
|
GameRegistry.register(ironaxehead);
|
||||||
GameRegistry.register(ironshovelhead);
|
GameRegistry.register(ironshovelhead);
|
||||||
@@ -221,6 +320,11 @@ public class ModItems {
|
|||||||
/**********
|
/**********
|
||||||
TOOLS
|
TOOLS
|
||||||
**********/
|
**********/
|
||||||
|
GameRegistry.register(bronzepickaxe);
|
||||||
|
GameRegistry.register(bronzeaxe);
|
||||||
|
GameRegistry.register(bronzeshovel);
|
||||||
|
GameRegistry.register(bronzehoe);
|
||||||
|
|
||||||
GameRegistry.register(ironpickaxe);
|
GameRegistry.register(ironpickaxe);
|
||||||
GameRegistry.register(ironaxe);
|
GameRegistry.register(ironaxe);
|
||||||
GameRegistry.register(ironshovel);
|
GameRegistry.register(ironshovel);
|
||||||
@@ -244,16 +348,43 @@ public class ModItems {
|
|||||||
/**********
|
/**********
|
||||||
WEAPONS
|
WEAPONS
|
||||||
**********/
|
**********/
|
||||||
GameRegistry.register(ironsword);
|
GameRegistry.register(wroughtirongladius);
|
||||||
GameRegistry.register(wroughtironshield);
|
GameRegistry.register(bronzegladius);
|
||||||
|
GameRegistry.register(cleanirongladius);
|
||||||
|
GameRegistry.register(steelgladius);
|
||||||
|
|
||||||
|
GameRegistry.register(cleanironlongsword);
|
||||||
|
GameRegistry.register(steellongsword);
|
||||||
|
|
||||||
|
GameRegistry.register(wroughtironslayer);
|
||||||
|
GameRegistry.register(cleanironslayer);
|
||||||
|
GameRegistry.register(steelslayer);
|
||||||
|
|
||||||
|
GameRegistry.register(rawlongbow);
|
||||||
|
GameRegistry.register(unstrunglongbow);
|
||||||
|
GameRegistry.register(longbow);
|
||||||
//GameRegistry.register(matchlockmusket);
|
//GameRegistry.register(matchlockmusket);
|
||||||
|
|
||||||
|
GameRegistry.register(brokenbronzetool);
|
||||||
|
GameRegistry.register(brokenwroughtirontool);
|
||||||
|
GameRegistry.register(brokencleanirontool);
|
||||||
|
GameRegistry.register(brokensteeltool);
|
||||||
|
GameRegistry.register(brokenwootztool);
|
||||||
|
|
||||||
|
/**********
|
||||||
|
ARMOR
|
||||||
|
**********/
|
||||||
|
//GameRegistry.register(testleggings);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//GameRegistry.register(forgingmanual);
|
//GameRegistry.register(forgingmanual);
|
||||||
}
|
}
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public static void registerRenders() {
|
public static void registerRenders() {
|
||||||
registerRender(pistonbellows);
|
registerRender(castingmud);
|
||||||
|
registerRender(bellowshandle);
|
||||||
registerRender(softcrucible);
|
registerRender(softcrucible);
|
||||||
registerRender(forgehammer);
|
registerRender(forgehammer);
|
||||||
registerRender(ironingotballhot);
|
registerRender(ironingotballhot);
|
||||||
@@ -264,9 +395,23 @@ public class ModItems {
|
|||||||
registerRender(steelchunkhot);
|
registerRender(steelchunkhot);
|
||||||
//registerRender(test);
|
//registerRender(test);
|
||||||
|
|
||||||
|
/**********
|
||||||
|
CASTING PARTS
|
||||||
|
**********/
|
||||||
|
registerRender(cast_axe);
|
||||||
|
registerRender(cast_gladius);
|
||||||
|
registerRender(cast_hoe);
|
||||||
|
registerRender(cast_pickaxe);
|
||||||
|
registerRender(cast_shovel);
|
||||||
|
|
||||||
/**********
|
/**********
|
||||||
TOOL PARTS
|
TOOL PARTS
|
||||||
**********/
|
**********/
|
||||||
|
registerRender(bronzepickaxehead);
|
||||||
|
registerRender(bronzeaxehead);
|
||||||
|
registerRender(bronzeshovelhead);
|
||||||
|
registerRender(bronzehoehead);
|
||||||
|
|
||||||
registerRender(pickaxehead);
|
registerRender(pickaxehead);
|
||||||
registerRender(ironaxehead);
|
registerRender(ironaxehead);
|
||||||
registerRender(ironshovelhead);
|
registerRender(ironshovelhead);
|
||||||
@@ -290,6 +435,11 @@ public class ModItems {
|
|||||||
/**********
|
/**********
|
||||||
TOOLS
|
TOOLS
|
||||||
**********/
|
**********/
|
||||||
|
registerRender(bronzepickaxe);
|
||||||
|
registerRender(bronzeaxe);
|
||||||
|
registerRender(bronzeshovel);
|
||||||
|
registerRender(bronzehoe);
|
||||||
|
|
||||||
registerRender(ironpickaxe);
|
registerRender(ironpickaxe);
|
||||||
registerRender(ironaxe);
|
registerRender(ironaxe);
|
||||||
registerRender(ironshovel);
|
registerRender(ironshovel);
|
||||||
@@ -313,10 +463,39 @@ public class ModItems {
|
|||||||
/**********
|
/**********
|
||||||
WEAPONS
|
WEAPONS
|
||||||
**********/
|
**********/
|
||||||
registerRender(ironsword);
|
|
||||||
registerRender(wroughtironshield);
|
registerRender(wroughtironshield);
|
||||||
|
|
||||||
|
registerRender(bronzegladius);
|
||||||
|
registerRender(wroughtirongladius);
|
||||||
|
registerRender(cleanirongladius);
|
||||||
|
registerRender(steelgladius);
|
||||||
|
|
||||||
|
registerRender(cleanironlongsword);
|
||||||
|
registerRender(steellongsword);
|
||||||
|
|
||||||
|
registerRender(wroughtironslayer);
|
||||||
|
registerRender(cleanironslayer);
|
||||||
|
registerRender(steelslayer);
|
||||||
|
|
||||||
|
registerRender(rawlongbow);
|
||||||
|
registerRender(unstrunglongbow);
|
||||||
|
registerRender(longbow);
|
||||||
//registerRender(forgingmanual);
|
//registerRender(forgingmanual);
|
||||||
//registerRender(matchlockmusket);
|
//registerRender(matchlockmusket);
|
||||||
|
|
||||||
|
|
||||||
|
registerRender(brokenbronzetool);
|
||||||
|
registerRender(brokenwroughtirontool);
|
||||||
|
registerRender(brokencleanirontool);
|
||||||
|
registerRender(brokensteeltool);
|
||||||
|
registerRender(brokenwootztool);
|
||||||
|
|
||||||
|
|
||||||
|
/**********
|
||||||
|
ARMOR
|
||||||
|
**********/
|
||||||
|
//registerRender(testleggings);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
@@ -355,7 +534,17 @@ public class ModItems {
|
|||||||
new ResourceLocation(ModInfo.MOD_ID, "stonetongs_steel_pickaxe_hot"),
|
new ResourceLocation(ModInfo.MOD_ID, "stonetongs_steel_pickaxe_hot"),
|
||||||
new ResourceLocation(ModInfo.MOD_ID, "stonetongs_steel_axe_hot"),
|
new ResourceLocation(ModInfo.MOD_ID, "stonetongs_steel_axe_hot"),
|
||||||
new ResourceLocation(ModInfo.MOD_ID, "stonetongs_steel_shovel_hot"),
|
new ResourceLocation(ModInfo.MOD_ID, "stonetongs_steel_shovel_hot"),
|
||||||
new ResourceLocation(ModInfo.MOD_ID, "stonetongs_steel_hoe_hot")
|
new ResourceLocation(ModInfo.MOD_ID, "stonetongs_steel_hoe_hot"),
|
||||||
|
new ResourceLocation(ModInfo.MOD_ID, "stonetongs_hotbronze"),
|
||||||
|
new ResourceLocation(ModInfo.MOD_ID, "stonetongs_hotbronzecooked"),
|
||||||
|
new ResourceLocation(ModInfo.MOD_ID, "stonetongs_hotbronze_lapis"),
|
||||||
|
new ResourceLocation(ModInfo.MOD_ID, "stonetongs_hotbronzecooked_lapis"),
|
||||||
|
new ResourceLocation(ModInfo.MOD_ID, "stonetongs_hotbronze_redstone"),
|
||||||
|
new ResourceLocation(ModInfo.MOD_ID, "stonetongs_hotbronzecooked_redstone"),
|
||||||
|
new ResourceLocation(ModInfo.MOD_ID, "stonetongs_hotbronze_emerald"),
|
||||||
|
new ResourceLocation(ModInfo.MOD_ID, "stonetongs_hotbronzecooked_emerald"),
|
||||||
|
new ResourceLocation(ModInfo.MOD_ID, "stonetongs_hotbronze_diamond"),
|
||||||
|
new ResourceLocation(ModInfo.MOD_ID, "stonetongs_hotbronzecooked_diamond")
|
||||||
);
|
);
|
||||||
ModelLoader.setCustomMeshDefinition(ModItems.stonetongs, new ItemMeshDefinition() {
|
ModelLoader.setCustomMeshDefinition(ModItems.stonetongs, new ItemMeshDefinition() {
|
||||||
|
|
||||||
@@ -452,6 +641,36 @@ public class ModItems {
|
|||||||
else if (stack.getTagCompound().getInteger("type") == 29 ) {
|
else if (stack.getTagCompound().getInteger("type") == 29 ) {
|
||||||
return new ModelResourceLocation(stack.getItem().getRegistryName() + "_steel_hoe_hot", "inventory");
|
return new ModelResourceLocation(stack.getItem().getRegistryName() + "_steel_hoe_hot", "inventory");
|
||||||
}
|
}
|
||||||
|
else if (stack.getTagCompound().getInteger("type") == 39 ) {
|
||||||
|
return new ModelResourceLocation(stack.getItem().getRegistryName() + "_hotbronze", "inventory");
|
||||||
|
}
|
||||||
|
else if (stack.getTagCompound().getInteger("type") == 40 ) {
|
||||||
|
return new ModelResourceLocation(stack.getItem().getRegistryName() + "_hotbronzecooked", "inventory");
|
||||||
|
}
|
||||||
|
else if (stack.getTagCompound().getInteger("type") == 45 ) {
|
||||||
|
return new ModelResourceLocation(stack.getItem().getRegistryName() + "_hotbronze_emerald", "inventory");
|
||||||
|
}
|
||||||
|
else if (stack.getTagCompound().getInteger("type") == 46 ) {
|
||||||
|
return new ModelResourceLocation(stack.getItem().getRegistryName() + "_hotbronzecooked_emerald", "inventory");
|
||||||
|
}
|
||||||
|
else if (stack.getTagCompound().getInteger("type") == 47 ) {
|
||||||
|
return new ModelResourceLocation(stack.getItem().getRegistryName() + "_hotbronze_diamond", "inventory");
|
||||||
|
}
|
||||||
|
else if (stack.getTagCompound().getInteger("type") == 48 ) {
|
||||||
|
return new ModelResourceLocation(stack.getItem().getRegistryName() + "_hotbronzecooked_diamond", "inventory");
|
||||||
|
}
|
||||||
|
else if (stack.getTagCompound().getInteger("type") == 49 ) {
|
||||||
|
return new ModelResourceLocation(stack.getItem().getRegistryName() + "_hotbronze_redstone", "inventory");
|
||||||
|
}
|
||||||
|
else if (stack.getTagCompound().getInteger("type") == 50 ) {
|
||||||
|
return new ModelResourceLocation(stack.getItem().getRegistryName() + "_hotbronzecooked_redstone", "inventory");
|
||||||
|
}
|
||||||
|
else if (stack.getTagCompound().getInteger("type") == 51 ) {
|
||||||
|
return new ModelResourceLocation(stack.getItem().getRegistryName() + "_hotbronze_lapis", "inventory");
|
||||||
|
}
|
||||||
|
else if (stack.getTagCompound().getInteger("type") == 52 ) {
|
||||||
|
return new ModelResourceLocation(stack.getItem().getRegistryName() + "_hotbronzecooked_lapis", "inventory");
|
||||||
|
}
|
||||||
else return new ModelResourceLocation(stack.getItem().getRegistryName(), "inventory");
|
else return new ModelResourceLocation(stack.getItem().getRegistryName(), "inventory");
|
||||||
}
|
}
|
||||||
return new ModelResourceLocation(stack.getItem().getRegistryName(), "inventory");
|
return new ModelResourceLocation(stack.getItem().getRegistryName(), "inventory");
|
||||||
@@ -12,11 +12,13 @@ public class ModSounds {
|
|||||||
|
|
||||||
public static SoundEvent PISTON_BELLOWS;
|
public static SoundEvent PISTON_BELLOWS;
|
||||||
public static SoundEvent MUSKET_SHOT;
|
public static SoundEvent MUSKET_SHOT;
|
||||||
|
public static SoundEvent BOW_TWANG;
|
||||||
|
|
||||||
public static void registerSounds()
|
public static void registerSounds()
|
||||||
{
|
{
|
||||||
PISTON_BELLOWS = registerSound("piston_bellows");
|
PISTON_BELLOWS = registerSound("piston_bellows");
|
||||||
MUSKET_SHOT = registerSound("musket_shot");
|
MUSKET_SHOT = registerSound("musket_shot");
|
||||||
|
BOW_TWANG = registerSound("bow_twang");
|
||||||
}
|
}
|
||||||
|
|
||||||
private static SoundEvent registerSound(String name)
|
private static SoundEvent registerSound(String name)
|
||||||
@@ -16,6 +16,8 @@ public class ModTiles {
|
|||||||
registerTileEntity(TileBaseCrucible.class, "basecrucible");
|
registerTileEntity(TileBaseCrucible.class, "basecrucible");
|
||||||
registerTileEntity(TileAnvil.class, "anvil");
|
registerTileEntity(TileAnvil.class, "anvil");
|
||||||
registerTileEntity(TileBreaker.class, "breaker");
|
registerTileEntity(TileBreaker.class, "breaker");
|
||||||
|
registerTileEntity(TileCastingForm.class, "castingform");
|
||||||
|
registerTileEntity(TileCastingBlock.class, "castingblock");
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void registerTileEntity(Class<? extends TileEntity> tile_class, String baseName) {
|
private static void registerTileEntity(Class<? extends TileEntity> tile_class, String baseName) {
|
||||||
@@ -8,8 +8,10 @@ import nmd.primal.forgecraft.ModInfo;
|
|||||||
*/
|
*/
|
||||||
public class BaseItem extends Item
|
public class BaseItem extends Item
|
||||||
{
|
{
|
||||||
public BaseItem()
|
public BaseItem(String registryName)
|
||||||
{
|
{
|
||||||
|
this.setRegistryName(registryName);
|
||||||
|
this.setUnlocalizedName(registryName);
|
||||||
this.setCreativeTab(ModInfo.TAB_FORGECRAFT);
|
this.setCreativeTab(ModInfo.TAB_FORGECRAFT);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -8,15 +8,20 @@ import net.minecraft.item.Item;
|
|||||||
public class BaseMultiItem extends BaseItem {
|
public class BaseMultiItem extends BaseItem {
|
||||||
|
|
||||||
private Item.ToolMaterial mat;
|
private Item.ToolMaterial mat;
|
||||||
|
private int ID;
|
||||||
|
|
||||||
public BaseMultiItem( String registryName, Item.ToolMaterial material) {
|
public BaseMultiItem( String registryName, Item.ToolMaterial material, Integer ID) {
|
||||||
setUnlocalizedName(registryName);
|
super(registryName);
|
||||||
setRegistryName(registryName);
|
|
||||||
mat = material;
|
mat = material;
|
||||||
|
this.ID = ID;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Item.ToolMaterial getMaterial(Item item){
|
public Item.ToolMaterial getMaterial(Item item){
|
||||||
return mat;
|
return mat;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getID() {
|
||||||
|
return ID;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user