75 Commits
test ... master

Author SHA1 Message Date
Mohammad-Ali Minaie
f708ac25f5 version bump 2017-09-16 10:47:08 -04:00
Mohammad-Ali Minaie
01834a6d77 fixed the API occorunces 2017-09-16 10:45:49 -04:00
Mohammad-Ali Minaie
b3d329c273 switch 12.1 to 12 2017-09-15 16:35:52 -04:00
Mohammad-Ali Minaie
9038bfc5ea fixed forge version 2017-09-15 16:31:45 -04:00
Mohammad-Ali Minaie
6d3533e588 big diff in the files 2017-09-15 16:15:23 -04:00
Mohammad-Ali Minaie
6f955f14f0 updating with new primal version 2017-09-15 16:12:49 -04:00
b374045de2 Merge branch 'primal-update' of nmd/ForgeCraft into master-1.12 2017-09-15 10:27:26 +00:00
b29071c6b4 Primal Blocks/Items refactor 2017-09-14 21:18:48 -07:00
b07102edd5 Update PrimalCore API changes 2017-09-14 18:15:47 -07:00
Mohammad-Ali Minaie
f0377332d8 fixed heating of damaged tools 2017-09-04 21:30:58 -04:00
Mohammad-Ali Minaie
622a3f4b17 fixing bugs 2017-09-04 13:24:17 -04:00
Mohammad-Ali Minaie
6fd05cffd5 updating lang file 2017-09-03 22:29:58 -04:00
srw
33c0582287 update to 1.12.1 2017-08-30 19:04:06 -07:00
Mohammad-Ali Minaie
6f084a9fa2 updating the .12 branch 2017-07-28 00:03:09 -04:00
Mohammad-Ali Minaie
24793d7606 update all branches with new build version 2017-07-16 15:14:40 -04:00
7f9e5ad294 Merge branch 'crashfix-20170716' of nmd/ForgeCraft into master-1.11 2017-07-16 19:13:32 +00:00
srw
eb07701181 replace tag methods with NBTHelpers, fixes null point exception crash 2017-07-16 15:08:28 -04:00
Mohammad-Ali Minaie
6476b0aee1 update to fix bug with toolhead drop missing NBT 2017-07-15 14:30:13 -04:00
Mohammad-Ali Minaie
4e270cccc1 update to newest primal version 2017-07-08 18:25:59 -04:00
Mohammad-Ali Minaie
f9e546d66b oops wrong branch 2017-07-08 13:57:37 -04:00
Mohammad-Ali Minaie
25d426ff31 fixed item drop for item tool breaking and breaker not breaking 2017-07-06 06:28:28 -04:00
Mohammad-Ali Minaie
210c023f2b fixed bug where tool could be repaired for free 2017-07-05 22:25:00 -04:00
Mohammad-Ali Minaie
6744c4b22d fixed epic dup bug and added broken item drops for tools, ur still better off not breaking ur tool 2017-07-05 22:15:32 -04:00
Mohammad-Ali Minaie
d0a9606931 version bump 2017-07-04 21:29:39 -04:00
Mohammad-Ali Minaie
93374f71d9 fix bunch of shit 2017-07-04 21:28:53 -04:00
Mohammad-Ali Minaie
d597e3d2c6 fixed longbow bug 2017-07-03 23:43:24 -04:00
Mohammad-Ali Minaie
226eb7a62f fixing stonetongs bug unable to replicate switching all state flags to 2 2017-07-03 20:26:37 -04:00
Mohammad-Ali Minaie
3040b4cc52 merge longbow and version bump 2017-07-03 18:51:29 -04:00
Mohammad-Ali Minaie
256ea2b4db update sound 2017-07-03 18:47:11 -04:00
Mohammad-Ali Minaie
f3e71409fd finished feature arrow 2017-07-03 18:44:21 -04:00
Mohammad-Ali Minaie
4440c4bd19 tweaked recipes 2017-07-03 08:47:13 -04:00
Mohammad-Ali Minaie
034ab4b8d0 gotta go wash my hair 2017-07-03 00:20:17 -04:00
Mohammad-Ali Minaie
92e96fd13f commiting b4 going out 2017-07-02 16:39:54 -04:00
Mohammad-Ali Minaie
a3eac08572 not adding that shit file 2017-07-02 11:16:14 -04:00
Mohammad-Ali Minaie
ee788d0b35 fixed missing recipe and breaker bug 2017-06-27 22:20:55 -04:00
Mohammad-Ali Minaie
16868d3a1c lang file bug switch getVanillaBurnItemtime 2017-06-26 10:17:40 -04:00
Mohammad-Ali Minaie
49007061d0 1.12 update 2017-06-26 00:19:38 -04:00
Mohammad-Ali Minaie
b8b80fb547 Merge branch 'master' into master-1.12 2017-06-25 22:50:14 -04:00
Mohammad-Ali Minaie
3928deeb7b moved 1.11 to kfc 2017-06-25 22:49:46 -04:00
Mohammad-Ali Minaie
3a40744de2 tryd to update gotta wait 2017-06-25 22:47:48 -04:00
Mohammad-Ali Minaie
3e1afd631b init to 1.12 2017-06-25 22:34:06 -04:00
Mohammad-Ali Minaie
e86fa3f518 master commit 2017-06-25 22:25:54 -04:00
Mohammad-Ali Minaie
0189c176df prepping for update 2017-06-25 16:29:51 -04:00
Mohammad-Ali Minaie
69b25b37ff i think ready for update 2017-06-25 14:58:57 -04:00
Mohammad-Ali Minaie
27e670e537 all the assets, casting recipes, bloomery recipes and tweaks, upgrades done 2017-06-25 03:42:41 -04:00
Mohammad-Ali Minaie
42f1621fea bronze assets finished, bronze casting finished 2017-06-24 16:04:20 -04:00
Mohammad-Ali Minaie
c2a22770f7 more casting stuff, need to make the actual tool parts and tools 2017-06-24 04:19:17 -04:00
Mohammad-Ali Minaie
c21ca30137 maded assets for pickcast added crafting handler and drying state 2017-06-22 22:45:28 -04:00
Mohammad-Ali Minaie
6fc8485f82 crafting twerk for diamond and emerald 2017-06-22 16:12:31 -04:00
Mohammad-Ali Minaie
e948ec99c9 casting crafting, say that 5 times fast 2017-06-22 16:09:57 -04:00
Mohammad-Ali Minaie
10b7e8d75b updated models and slot code, need to add recipe handler 2017-06-21 09:01:26 -04:00
Mohammad-Ali Minaie
431b93bf31 fixed bugs initial slot manager handler for casting added 2017-06-20 22:41:18 -04:00
Mohammad-Ali Minaie
53680a59c8 gettig ready to make tesr 2017-06-20 16:18:06 -04:00
Mohammad-Ali Minaie
4d33953135 model issues and refactoring 2017-06-19 07:55:57 -04:00
Mohammad-Ali Minaie
5305247683 getting ready for casting feature 2017-06-19 05:41:05 -04:00
Mohammad-Ali Minaie
b832af808f fixed merge conflicts 2017-06-18 15:55:01 -04:00
Mohammad-Ali Minaie
8aefcbbf09 finished adobe brick bloom and forge blocks, refactored forge, bloomery, and anvil 2017-06-18 15:51:01 -04:00
Mohammad-Ali Minaie
4e5ada44cf adobe forge, adobe bloomery, refactor forge bloomery stonetongs 2017-06-18 14:35:20 -04:00
Mohammad-Ali Minaie
9a607d5abd need to do adobe bloomery item model and update brick bloomery model 2017-06-18 05:10:47 -04:00
Mohammad-Ali Minaie
e72f91d3ac pushing changes i made in the wrong branch 2017-06-18 01:23:08 -04:00
Mohammad-Ali Minaie
f503570db7 pushing to ull new branch 2017-06-14 21:39:11 -04:00
Mohammad-Ali Minaie
d1b0d02131 fixed ingot dupe bug 2017-06-12 15:30:57 -04:00
Mohammad-Ali Minaie
8f30ff4e96 commiting b4 switch to bugfix branch 2017-06-12 15:08:31 -04:00
Mohammad-Ali Minaie
350461ee1c updating before system restart 2017-06-11 21:27:13 -04:00
Mohammad-Ali Minaie
f11bc16690 Merge branch 'master' of ssh://git.nmd.so:12000/nmd/ForgeCraft 2017-06-11 21:09:49 -04:00
37a8321d87 Merge branch 'configfile' of nmd/ForgeCraft into master 2017-06-12 01:09:04 +00:00
9f5a391539 Basic config file 2017-06-11 18:04:51 -07:00
Mohammad-Ali Minaie
407eceafa4 fixed anvil to not drop hot things 2017-06-11 18:46:11 -04:00
Mohammad-Ali Minaie
8ae050bddd all the bug fixes, refactoring, and feauture upgrades 2017-06-11 17:42:50 -04:00
Mohammad-Ali Minaie
b7d2b6580a working on block breaker 2017-06-11 02:13:27 -04:00
Mohammad-Ali Minaie
981d117f3d anvil rendering updates, anvil handler to reduce code localization, tong items now have IDs associated to the item registration to make matching them easier 2017-06-11 01:44:30 -04:00
Mohammad-Ali Minaie
7f6d9616ba fixing it so you can't crash urself like a dumb dumb 2017-06-10 17:33:36 -04:00
Mohammad Minaie
2f0dbfa973 Merge pull request #12 from kitsushadow/test
fixing makeSmoke missing dependencies
2017-06-10 02:02:26 -04:00
Zainkai
f9e8ba52ad deleting unnessary test file 2017-06-09 22:31:20 -07:00
Zainkai
7934f8ba65 testing 2017-06-09 22:25:33 -07:00
2900 changed files with 25352 additions and 27391 deletions

View File

@@ -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.

View File

@@ -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

View File

@@ -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.

View File

@@ -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

View File

@@ -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.

View File

@@ -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.

View File

@@ -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.

View File

@@ -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

View File

@@ -1 +0,0 @@
[]

View File

@@ -1 +0,0 @@
[]

View File

@@ -1,117 +0,0 @@
buildscript {
repositories {
jcenter()
maven {
name = "forge"
url = "http://files.minecraftforge.net/maven"
}
maven {
name = "sonatype"
url = "https://oss.sonatype.org/content/repositories/snapshots/"
}
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:2.2-SNAPSHOT'
}
}
repositories {
maven {
name = "jei"
url "http://dvs1.progwml6.com/files/maven"
}
maven {
name = "mobius"
url "http://mobiusstrip.eu/maven"
}
maven {
name = "primal"
url "https://maven.nmd.so"
}
}
apply plugin: 'net.minecraftforge.gradle.forge'
apply plugin: 'java'
compileJava {
sourceCompatibility = targetCompatibility = JavaVersion.VERSION_1_8
}
group = "${mod_group}"
version = "${mod_version}"
archivesBaseName = "${mod_name}"
idea { module { inheritOutputDirs = true } }
minecraft {
version = "${mc_version}" + "-" + "${forge_version}"
runDir = "run"
mappings = "${mcp_mappings}"
// JEI
//useDepAts = true
// Replace
replace "@VERSION@", project.mod_version
}
dependencies {
// you may put jars on which you depend on in ./libs
// or you may define them like so..
//compile "some.group:artifact:version:classifier"
//compile "some.group:artifact:version"
// real examples
//compile 'com.mod-buildcraft:buildcraft:6.0.8:dev' // adds buildcraft to the dev env
//compile 'com.googlecode.efficient-java-matrix-library:ejml:0.24' // adds ejml to the dev env
// the 'provided' configuration is for optional dependencies that exist at compile-time but might not at runtime.
//provided 'com.mod-buildcraft:buildcraft:6.0.8:dev'
// the deobf configurations: 'deobfCompile' and 'deobfProvided' are the same as the normal compile and provided,
// except that these dependencies get remapped to your current MCP mappings
//deobfCompile 'com.mod-buildcraft:buildcraft:6.0.8:dev'
//deobfProvided 'com.mod-buildcraft:buildcraft:6.0.8:dev'
// for more info...
// http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html
// http://www.gradle.org/docs/current/userguide/ddependency_management.html
// JEI
// https://github.com/mezz/JustEnoughItems
// http://minecraft.curseforge.com/projects/just-enough-items-jei/files
// <MINECRAFT-VERSION> and <JEI-VERSION> can be found on CurseForge, check the file name of the version you want.
//
// compile against the JEI API
deobfCompile "mezz.jei:jei_${mc_version}:${jei_version}:api"
//runtime "mezz.jei:jei_${mc_version}:${jei_version}"
deobfCompile "nmd.primal.core:PrimalCore:${primal_version}:dev"
//runtime "nmd.primal.core:PrimalCore:${primal_version}"
}
processResources {
// this will ensure that this task is redone when the versions change.
inputs.property "version", "${mod_version}"
inputs.property "mcversion", "${mc_version}"
// replace stuff in mcmod.info, nothing else
from(sourceSets.main.resources.srcDirs) {
include 'mcmod.info'
// replace version and mcversion
expand 'version':"${mod_version}", 'mcversion':"${mc_version}"
}
// copy everything else, thats not the mcmod.info
from(sourceSets.main.resources.srcDirs) {
exclude 'mcmod.info'
}
}
// end //

View File

@@ -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
}

View File

@@ -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.

View File

@@ -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

View File

@@ -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

Binary file not shown.

View File

@@ -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);
}
};
*/
}

View File

@@ -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]);
}
}
}
}

View File

@@ -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());
}
}

View File

@@ -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());
}
}

View File

@@ -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;
}
}

View File

@@ -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 =================================*/
}

View File

@@ -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;
}
}

View File

@@ -1,250 +0,0 @@
package nmd.primal.forgecraft.tiles;
import net.minecraft.block.Block;
import net.minecraft.block.state.IBlockState;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.ITickable;
import net.minecraft.util.NonNullList;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import nmd.primal.core.common.helper.CommonUtils;
import nmd.primal.forgecraft.blocks.Forge;
import nmd.primal.forgecraft.crafting.ForgeCrafting;
import static nmd.primal.forgecraft.CommonUtils.getVanillaItemBurnTime;
import static nmd.primal.core.common.helper.FireHelper.makeSmoke;
/**
* Created by mminaie on 11/30/16.
*/
public class TileForge extends TileBaseSlot implements ITickable {
private NonNullList<ItemStack> slotList = NonNullList.<ItemStack>withSize(7, ItemStack.EMPTY);
//private ItemStack[] inventory = new ItemStack [0];
//private String customName;
private int iteration = 0;
private int heat;
private int cookCounter2, cookCounter3, cookCounter4, cookCounter5, cookCounter6;
@Override
public void update () {
if(!world.isRemote){
World world = this.getWorld();
this.iteration ++;
IBlockState state = world.getBlockState(this.pos);
BlockPos abovePos = new BlockPos(this.getPos().getX(), this.getPos().getY()+1, this.getPos().getZ());
IBlockState aboveState = world.getBlockState(abovePos);
Block block = world.getBlockState(abovePos).getBlock();
if(this.iteration == 300 ) {
this.iteration = 0;
if (world.getBlockState(this.getPos()).getValue(Forge.ACTIVE)) {
if (this.getSlotStack(0) == ItemStack.EMPTY) {
world.setBlockState(this.getPos(), state.withProperty(Forge.ACTIVE, false), 2);
this.markDirty();
world.notifyBlockUpdate(pos, state, state, 2);
}
slotZeroManager(world);
}
this.heatManager(this.getHeat(), state, this.getSlotStack(0), world, pos);
}
craftingManager();
}
}
private void slotZeroManager(World world){
if(this.getSlotStack(0) != ItemStack.EMPTY) {
Integer decrInt = (int) Math.floor(getVanillaItemBurnTime(this.getSlotStack(0)) / 20);
if(decrInt == 0) {
decrInt = 1;
}
if (world.rand.nextInt(decrInt) == 0) {
this.decrStackSize(0, 1);
this.markDirty();
this.updateBlock();
}
if (this.getSlotStack(0).getCount() == 1){
this.decrStackSize(0, 1);
this.markDirty();
this.updateBlock();
}
makeSmoke(world, pos);
}
}
private void heatManager(Integer h, IBlockState state, ItemStack stack, World world, BlockPos pos){
if(state.getValue(Forge.ACTIVE) == true){
if(!stack.isEmpty()) {
if(h > 0) {
this.setHeat(h - 25);
}
if(h < 10 ){
world.setBlockState(pos, state.withProperty(Forge.ACTIVE, false), 2);
}
}
if(stack.isEmpty()){
world.setBlockState(pos, state.withProperty(Forge.ACTIVE, false), 2);
}
}
if(state.getValue(Forge.ACTIVE) == false){
if(h > 50){
this.setHeat(h - 50);
}
if(h < 0){
this.setHeat(0);
}
}
this.updateBlock();
this.markDirty();
}
private void craftingManager() {
for (int i = 2; i < this.getSlotListSize(); i++) {
Item itemTest = this.getSlotStack(i).getItem();
ForgeCrafting recipe = ForgeCrafting.getRecipe(itemTest);
if (recipe != null) {
if(i == 2){
if (this.getHeat() >= recipe.getHeatThreshold()) {
cookCounter2++;
}
if (this.getHeat() < recipe.getHeatThreshold() && cookCounter2 > 0) {
cookCounter2--;
}
if (cookCounter2 >= recipe.getIdealTime()) {
if(this.getSlotStack(i).hasTagCompound()){
this.getSlotStack(i).getSubCompound("tags").setBoolean("hot", true);
} else this.setSlotStack(i, recipe.getOutput());
cookCounter2 = 0;
}
}
if(i == 3){
if (this.getHeat() >= recipe.getHeatThreshold()) {
cookCounter3++;
}
if (this.getHeat() < recipe.getHeatThreshold() && cookCounter3 > 0) {
cookCounter3--;
}
if (cookCounter3 >= recipe.getIdealTime()) {
if(this.getSlotStack(i).hasTagCompound()){
this.getSlotStack(i).getSubCompound("tags").setBoolean("hot", true);
} else this.setSlotStack(i, recipe.getOutput());
cookCounter3 = 0;
}
}
if(i == 4){
if (this.getHeat() >= recipe.getHeatThreshold()) {
cookCounter4++;
}
if (this.getHeat() < recipe.getHeatThreshold() && cookCounter4 > 0) {
cookCounter4--;
}
if (cookCounter4 >= recipe.getIdealTime()) {
if(this.getSlotStack(i).hasTagCompound()){
if( this.getSlotStack(i).getSubCompound("tags").getBoolean("hot") == false) {
this.getSlotStack(i).getSubCompound("tags").setBoolean("hot", true);
//System.out.println(this.getSlotStack(i).getSubCompound("tags"));
//System.out.println("its hot now");
cookCounter4 = 0;
}
} else this.setSlotStack(i, recipe.getOutput());
cookCounter4 = 0;
}
}
if(i == 5){
if (this.getHeat() >= recipe.getHeatThreshold()) {
cookCounter5++;
}
if (this.getHeat() < recipe.getHeatThreshold() && cookCounter5 > 0) {
cookCounter5--;
}
if (cookCounter5 >= recipe.getIdealTime()) {
if(this.getSlotStack(i).hasTagCompound()){
this.getSlotStack(i).getSubCompound("tags").setBoolean("hot", true);
} else this.setSlotStack(i, recipe.getOutput());
cookCounter5 = 0;
}
}
if(i == 6){
if (this.getHeat() >= recipe.getHeatThreshold()) {
cookCounter6++;
}
if (this.getHeat() < recipe.getHeatThreshold() && cookCounter6 > 0) {
cookCounter6--;
}
if (cookCounter6 >= recipe.getIdealTime()) {
if(this.getSlotStack(i).hasTagCompound()){
this.getSlotStack(i).getSubCompound("tags").setBoolean("hot", true);
} else this.setSlotStack(i, recipe.getOutput());
cookCounter6 = 0;
}
}
/*
System.out.println(state.getValue(IngotBall.ACTIVE) + " : " + recipe.getStartState());
System.out.println(cookCounter + " : " + recipe.getIdealTime());
System.out.println(this.heat + " : " + recipe.getHeatThreshold());
System.out.println("========");
*/
}
}
}
public int getHeat(){
return this.heat;
}
public void setHeat(int newHeat){
this.heat = newHeat;
}
@Override
public int getSlotLimit() {
return 1;
}
public ItemStack removeStackFromSlot(int index) {
ItemStack stack = this.getSlotStack(index);
this.setSlotStack(index, ItemStack.EMPTY);
return stack;
}
public boolean isItemValidForSlot(int index, ItemStack stack) {
if(index == 0){
if(stack.getItem() == Items.COAL){
if(stack.getMetadata() == 1) {
return true;
}
}
}
return false;
}
// ***************************************************************************** //
// NBT
// ***************************************************************************** //
@Override
public NBTTagCompound readNBT(NBTTagCompound nbt)
{
super.readNBT(nbt);
this.heat = nbt.getInteger("heat");
return nbt;
}
@Override
public NBTTagCompound writeNBT(NBTTagCompound nbt)
{
nbt.setInteger("heat", this.heat);
super.writeNBT(nbt);
return nbt;
}
}

View File

@@ -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 }
}
}

View File

@@ -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 }
}
}

View File

@@ -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

View File

@@ -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 ]
}
}
}

View File

@@ -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 }
}
}
]
}

View File

@@ -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

View File

@@ -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.

View File

View File

@@ -3,8 +3,10 @@ To-Dos
*** 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 ***
- [ ] Create powder charge item (copper, charcoal, gunpowder)
@@ -19,7 +21,6 @@ To-Dos
*** Backlog ***
- [ ] Move Ingot break into chunks logic out of the block and into the ForgeHammer
- [ ] Add Yew
- [ ] Add Iron Ring Recipe
- [ ] Add chainmail recipe
- [ ] 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
- [ ] Add forgehammer to oreDict
- [ ] WeaponHead recipes
- [ ] Casting Table
- [ ] Block
- [ ] Gui
- [ ] Crafting recipes
*** Tid-Bits ***
sed -i -- 's/iron/steel/g' *
@@ -38,6 +36,10 @@ rm *.json--
rename s/iron/steel/ iron*
*** Completed ***
- [x] Casting Table
- [x] Block
- [x] Gui
- [x] Crafting recipes
- [x] StoneTongs for all tool heads
- [x] ItemNBT
- [x] ItemRender

80
kfc/build.gradle Normal file
View File

@@ -0,0 +1,80 @@
buildscript {
repositories {
jcenter()
maven {
name = "forge"
url = "http://files.minecraftforge.net/maven"
}
maven {
name = "sonatype"
url = "https://oss.sonatype.org/content/repositories/snapshots/"
}
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT'
}
}
repositories {
maven {
name = "jei"
url "http://dvs1.progwml6.com/files/maven"
}
maven {
name = "mobius"
url "http://mobiusstrip.eu/maven"
}
maven {
name = "primal"
url "https://maven.nmd.so"
}
}
apply plugin: 'net.minecraftforge.gradle.forge'
apply plugin: 'java'
compileJava {
sourceCompatibility = targetCompatibility = JavaVersion.VERSION_1_8
}
group = "${mod_group}"
version = "${mod_version}"
archivesBaseName = "${mod_name}"
idea { module { inheritOutputDirs = true } }
minecraft {
version = "${mc_version}" + "-" + "${forge_version}"
runDir = "run"
mappings = "${mcp_mappings}"
// JEI
//useDepAts = true
// Replace
replace "@VERSION@", project.mod_version
}
dependencies {
//compile against the JEI API
deobfCompile "mezz.jei:jei_${mc_version}:${jei_version}:api"
//runtime "mezz.jei:jei_${mc_version}:${jei_version}"
deobfCompile "nmd.primal.core:PrimalCore:${mc_version}-${primal_version}:dev"
//runtime "nmd.primal.core:PrimalCore:${primal_version}"
}
processResources {
// this will ensure that this task is redone when the versions change.
inputs.property "version", "${mod_version}"
inputs.property "mcversion", "${mc_version}"
// replace stuff in mcmod.info, nothing else
from(sourceSets.main.resources.srcDirs) {
include 'mcmod.info'
// replace version and mcversion
expand 'version':"${mod_version}", 'mcversion':"${mc_version}"
}
// copy everything else, thats not the mcmod.info
from(sourceSets.main.resources.srcDirs) {
exclude 'mcmod.info'
}
}
// end //

View File

@@ -5,12 +5,12 @@ org.gradle.jvmargs=-Xmx3G
mod_group=nmd.primal.forgecraft
mod_name=ForgeCraft
mod_version=1.2.22
forge_version=13.20.0.2311
mcp_mappings=snapshot_20170121
mc_version=1.11.2
mod_version=1.3.23
forge_version=14.21.1.2400
mcp_mappings=snapshot_20170624
mc_version=1.12
primal_version=0.4+
jei_version=4.3+
primal_version=0.5+
jei_version=4.7+
waila_version=1.7.0-B3
apple_version=2.1+

0
1.10.2/gradlew → kfc/gradlew vendored Normal file → Executable file
View File

View File

View File

@@ -5,17 +5,15 @@ import net.minecraft.nbt.NBTTagCompound;
import net.minecraftforge.fml.common.eventhandler.EventPriority;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
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.tools.CustomAxe;
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.tools.*;
import nmd.primal.forgecraft.util.ToolNBT;
/**
* Created by mminaie on 3/15/17.
*/
public class CommonEvents implements ToolNBT{
public class CommonEvents implements ToolNBT {
@SubscribeEvent(priority= EventPriority.LOWEST, receiveCanceled=true)
@@ -23,13 +21,13 @@ public class CommonEvents implements ToolNBT{
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();
for (int i = 0; i < event.craftMatrix.getSizeInventory(); i++) { // Checks all the slots
if (event.craftMatrix.getStackInSlot(i) != null) { // If there is an 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();
event.crafting.getTagCompound().setTag("tags", tempTag);
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();
for (int i = 0; i < event.craftMatrix.getSizeInventory(); i++) { // Checks all the slots
if (event.craftMatrix.getStackInSlot(i) != null) { // If there is an 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();
event.crafting.getTagCompound().setTag("tags", tempTag);
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();
for (int i = 0; i < event.craftMatrix.getSizeInventory(); i++) { // Checks all the slots
if (event.craftMatrix.getStackInSlot(i) != null) { // If there is an 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();
event.crafting.getTagCompound().setTag("tags", tempTag);
event.crafting.getItem().updateItemStackNBT(event.crafting.getTagCompound());
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();
for (int i = 0; i < event.craftMatrix.getSizeInventory(); i++) { // Checks all the slots
if (event.craftMatrix.getStackInSlot(i) != null) { // If there is an 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();
event.crafting.getTagCompound().setTag("tags", tempTag);
event.crafting.getItem().updateItemStackNBT(event.crafting.getTagCompound());
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();
for (int i = 0; i < event.craftMatrix.getSizeInventory(); i++) { // Checks all the slots
if (event.craftMatrix.getStackInSlot(i) != null) { // If there is an 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();
event.crafting.getTagCompound().setTag("tags", tempTag);
event.crafting.getItem().updateItemStackNBT(event.crafting.getTagCompound());
Integer tempDamage = event.craftMatrix.getStackInSlot(i).getItemDamage();
event.crafting.setItemDamage(tempDamage);
}
if (a.getItem() instanceof CustomPickaxe) {
if (a.getItem() instanceof CustomPickaxe || a.getItem() instanceof BronzePickaxe) {
tempTag = a.getSubCompound("tags").copy();
event.crafting.getTagCompound().setTag("tags", tempTag);
event.crafting.getItem().updateItemStackNBT(event.crafting.getTagCompound());
Integer tempDamage = event.craftMatrix.getStackInSlot(i).getItemDamage();
event.crafting.setItemDamage(tempDamage);
}
if (a.getItem() instanceof CustomShovel) {
if (a.getItem() instanceof CustomShovel || a.getItem() instanceof BronzeShovel) {
tempTag = a.getSubCompound("tags").copy();
event.crafting.getTagCompound().setTag("tags", tempTag);
event.crafting.getItem().updateItemStackNBT(event.crafting.getTagCompound());
Integer tempDamage = event.craftMatrix.getStackInSlot(i).getItemDamage();
event.crafting.setItemDamage(tempDamage);
}
if (a.getItem() instanceof CustomHoe) {
if (a.getItem() instanceof CustomHoe || a.getItem() instanceof BronzeHoe) {
tempTag = a.getSubCompound("tags").copy();
event.crafting.getTagCompound().setTag("tags", tempTag);
event.crafting.getItem().updateItemStackNBT(event.crafting.getTagCompound());

View File

@@ -13,11 +13,15 @@ import nmd.primal.forgecraft.compat.ModDictionary;
import nmd.primal.forgecraft.gui.GuiHandler;
import nmd.primal.forgecraft.init.*;
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.*;
@Mod( modid = ModInfo.MOD_ID,
name = ModInfo.MOD_NAME,
name = ModInfo.MOD_ID,
version = ModInfo.MOD_VERSION,
acceptedMinecraftVersions = ModInfo.MC_VERSIONS,
dependencies = ModInfo.DEPENDENCIES
@@ -31,10 +35,13 @@ public class ForgeCraft
public static SimpleNetworkWrapper NETWORK;
@SidedProxy(clientSide = ModInfo.CLIENT_PROXY, serverSide = ModInfo.SERVER_PROXY)
public static CommonProxy proxy;
public static Logger LOGGER = LogManager.getLogger(ModInfo.MOD_ID);
@EventHandler
public void preInit(FMLPreInitializationEvent event)
{
Locale.setDefault(Locale.ENGLISH);
NETWORK = NetworkRegistry.INSTANCE.newSimpleChannel(ModInfo.MOD_CHANNEL);
NetworkRegistry.INSTANCE.registerGuiHandler(this, new GuiHandler());
@@ -51,6 +58,7 @@ public class ForgeCraft
//ModEvents.registerClientEvents();
// ModItems.registerRenders();
proxy.preInit();
}
@EventHandler
@@ -70,15 +78,4 @@ public class ForgeCraft
//this.proxy.postInit(event);
}
/*@EventHandler
public void serverStarting(FMLServerStartingEvent event)
{
//event.registerServerCommand(new PrimalCommand());
}
//public File getConfigDirectory()
//{
// return CONFIG_DIRECTORY;
//}
*/
}

View 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.3.23";
public static final String MC_VERSIONS = "[1.12.0, 1.13.0)";
public static final String DEPENDENCIES = "required-after:forge@[14.21.1.2400,);" + "required-after:primal@[0.5,);";
/** 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);
}
};
}

View File

@@ -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;
}
}

View File

@@ -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;
}
}

View File

@@ -0,0 +1,7 @@
package nmd.primal.forgecraft.blocks.Anvil;
/**
* Created by mminaie on 6/10/17.
*/
public class AnvilSteel {
}

View File

@@ -0,0 +1,59 @@
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;
/**
* 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;
}
}

View File

@@ -33,12 +33,6 @@ public class BlockCustomBase extends BlockBase {
return false;
}
@Override
public boolean isFullyOpaque(IBlockState state)
{
return false;
}
@Override
public boolean isOpaqueCube(IBlockState state)
{

View 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]);
}
}
}
}

View File

@@ -2,91 +2,46 @@ package nmd.primal.forgecraft.blocks;
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.EntityLivingBase;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
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.api.PrimalItems;
import nmd.primal.core.api.PrimalStates;
import nmd.primal.core.common.items.tools.WorkMallet;
import nmd.primal.forgecraft.CommonUtils;
import nmd.primal.forgecraft.ModInfo;
import nmd.primal.forgecraft.tiles.TileBreaker;
import java.util.concurrent.ThreadLocalRandom;
import nmd.primal.forgecraft.util.BreakerHandler;
/**
* 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) {
super(material);
setUnlocalizedName(registryName);
setRegistryName(registryName);
super(material, registryName);
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);
}
private void doWork (World world, IBlockState state, BlockPos pos, TileBreaker tile){
if (state.getValue(FACING) == EnumFacing.EAST) {
if(tile.getCharge() > world.getBlockState(pos.east()).getBlockHardness(world, pos.east())) {
if (world.getBlockState(pos.east()).getBlock() == Blocks.IRON_ORE) {
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
public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos)
{
return AABB;
}
@Override
@@ -96,30 +51,36 @@ public class Breaker extends CustomContainerFacing {
TileBreaker tile = (TileBreaker) world.getTileEntity(pos);
ItemStack pItem = player.inventory.getCurrentItem();
if(state.getValue(ACTIVE) == true && player.isSneaking() && pItem.isEmpty()){
world.setBlockState(pos, state.withProperty(FACING, state.getValue(FACING)).withProperty(ACTIVE, false));
if(state.getValue(PrimalStates.ACTIVE) == true && player.isSneaking() && pItem.isEmpty()){
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 (!state.getValue(ACTIVE)) {
world.setBlockState(pos, state.withProperty(FACING, state.getValue(FACING)).withProperty(ACTIVE, true), 2);
}
if(tile.getCharge() < 181) {
tile.setCharge(tile.getCharge() + 2.0f);
tile.updateBlock();
//System.out.println(tile.charge);
if (!state.getValue(PrimalStates.ACTIVE)) {
world.setBlockState(pos, state.withProperty(FACING, state.getValue(FACING)).withProperty(PrimalStates.ACTIVE, true), 2);
return true;
}
if(state.getValue(PrimalStates.ACTIVE)) {
if (tile.getCharge() < 181) {
tile.setCharge(tile.getCharge() + 2.0f);
tile.updateBlock();
//System.out.println(tile.charge);
return true;
}
}
}
if(pItem.getItem() instanceof WorkMallet){
tile.setSlotStack(0, player.inventory.getCurrentItem());
player.inventory.setInventorySlotContents(player.inventory.currentItem, ItemStack.EMPTY);
return true;
}
}
return false;
@@ -161,7 +122,7 @@ public class Breaker extends CustomContainerFacing {
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, 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) {
int i = 0;
if(state.getValue(ACTIVE ) == false) {
if(state.getValue(PrimalStates.ACTIVE ) == false) {
if (state.getValue(FACING) == EnumFacing.EAST) {
i = 0;
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) {
i = 4;
return i;
@@ -215,35 +176,35 @@ public class Breaker extends CustomContainerFacing {
IBlockState iblockstate = this.getDefaultState();
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) {
iblockstate = iblockstate.withProperty(FACING, EnumFacing.WEST).withProperty(ACTIVE, false);
iblockstate = iblockstate.withProperty(FACING, EnumFacing.WEST).withProperty(PrimalStates.ACTIVE, false);
}
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) {
iblockstate = iblockstate.withProperty(FACING, EnumFacing.NORTH).withProperty(ACTIVE, false);
iblockstate = iblockstate.withProperty(FACING, EnumFacing.NORTH).withProperty(PrimalStates.ACTIVE, false);
}
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) {
iblockstate = iblockstate.withProperty(FACING, EnumFacing.WEST).withProperty(ACTIVE, true);
iblockstate = iblockstate.withProperty(FACING, EnumFacing.WEST).withProperty(PrimalStates.ACTIVE, true);
}
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) {
iblockstate = iblockstate.withProperty(FACING, EnumFacing.NORTH).withProperty(ACTIVE, true);
iblockstate = iblockstate.withProperty(FACING, EnumFacing.NORTH).withProperty(PrimalStates.ACTIVE, true);
}
return iblockstate;
}
@Override
protected BlockStateContainer createBlockState() {
return new BlockStateContainer(this, new IProperty[] {ACTIVE, FACING});
return new BlockStateContainer(this, new IProperty[] {PrimalStates.ACTIVE, FACING});
}
@Override
@@ -252,11 +213,6 @@ public class Breaker extends CustomContainerFacing {
return false;
}
@Override
public boolean isFullyOpaque(IBlockState state)
{
return false;
}
@Override
public boolean isOpaqueCube(IBlockState state)

View 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;
}
}

View 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;
}
}

View File

@@ -1,4 +1,4 @@
package nmd.primal.forgecraft.blocks;
package nmd.primal.forgecraft.blocks.Crucibles;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
@@ -80,7 +80,8 @@ public class Crucible extends Block {
{
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(checkDrops(this.getUnlocalizedName()) != null) {
if (checkDrops(this.getUnlocalizedName()).equals(this.getUnlocalizedName())) {
@@ -118,6 +119,9 @@ public class Crucible extends Block {
if(name.equals("tile.rawwootzcrucible")){
string = this.getUnlocalizedName();
}
if(name.equals("tile.emptycruciblecracked")){
string = this.getUnlocalizedName();
}
return string;
}
@@ -139,6 +143,8 @@ public class Crucible extends Block {
return Item.getItemFromBlock(ModBlocks.wootzball);
} else if (name.equals("tile.rawcleanironcrucible")){
return PrimalItems.GOLDEN_STICK;
}else if (name.equals("tile.emptycruciblecracked")){
return Items.CLAY_BALL;
}
else return Items.AIR;
}
@@ -161,12 +167,6 @@ public class Crucible extends Block {
return false;
}
@Override
public boolean isFullyOpaque(IBlockState state)
{
return false;
}
@Override
public boolean isOpaqueCube(IBlockState state)
{

View File

@@ -1,4 +1,4 @@
package nmd.primal.forgecraft.blocks;
package nmd.primal.forgecraft.blocks.Crucibles;
import net.minecraft.block.Block;
import net.minecraft.block.BlockDynamicLiquid;
@@ -78,12 +78,6 @@ public class CrucibleHot extends Block implements ITileEntityProvider {
return false;
}
@Override
public boolean isFullyOpaque(IBlockState state)
{
return false;
}
@Override
public boolean isOpaqueCube(IBlockState state)
{

View File

@@ -13,9 +13,13 @@ public abstract class CustomContainerFacing extends BlockContainer {
public static final PropertyDirection FACING = PropertyDirection.create("facing", EnumFacing.Plane.HORIZONTAL);
protected CustomContainerFacing(Material material)
protected CustomContainerFacing(Material material, String registryName)
{
super(material);
this.setRegistryName(registryName);
this.setUnlocalizedName(registryName);
this.setHardness(3.0f);
this.setResistance(4.0f);
}
protected CustomContainerFacing(Material material, MapColor color)

View File

@@ -4,7 +4,6 @@ import net.minecraft.block.Block;
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;
@@ -13,6 +12,7 @@ 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.ItemSpade;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.*;
@@ -24,8 +24,9 @@ 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.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.items.parts.ToolPart;
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.
*/
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 boundBox = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 1.0D, 1.0D);
public Forge(Material material) {
super(material);
setUnlocalizedName(ModInfo.ForgecraftBlocks.FIREBOX.getUnlocalizedName());
setRegistryName(ModInfo.ForgecraftBlocks.FIREBOX.getRegistryName());
public Forge(Material material, String name, Integer maxHeat) {
super(material, name);
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);
setResistance(5.0f);
this.maxHeat=maxHeat;
}
public int getMaxHeat() {
return maxHeat;
}
public void setMaxHeat(int maxHeat) {
this.maxHeat = maxHeat;
}
@Override
@@ -91,21 +101,20 @@ public class Forge extends CustomContainerFacing implements ITileEntityProvider/
/***********************
FUEL SLOT CODE
***********************/
if(pItem.isEmpty()) {
if (player.isSneaking()) {
if (!fuelItem.isEmpty()) {
if(facing == EnumFacing.NORTH || facing == EnumFacing.SOUTH || facing == EnumFacing.EAST || facing == EnumFacing.WEST ) {
//System.out.println();
CommonUtils.spawnItemEntity(world, player, tile.getSlotStack(0));
tile.setSlotStack(0, ItemStack.EMPTY);
tile.markDirty();
tile.updateBlock();
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;
}
}
}
if(pItem.isEmpty()) {
if(!player.isSneaking()){
if(world.getBlockState(pos).getValue(ACTIVE) == true){
if(world.getBlockState(pos).getValue(PrimalStates.ACTIVE) == true){
Integer tempInt = tile.getHeat();
String tempString = tempInt.toString();
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 ) {
world.setBlockState(pos, state.withProperty(ACTIVE, true), 2);
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();
@@ -224,7 +233,7 @@ public class Forge extends CustomContainerFacing implements ITileEntityProvider/
{
//if (!world.isRemote){
if(ent instanceof EntityPlayer){
if(state.getValue(ACTIVE) == true){
if(state.getValue(PrimalStates.ACTIVE) == true){
ent.setFire(1);
}
}
@@ -238,7 +247,7 @@ public class Forge extends CustomContainerFacing implements ITileEntityProvider/
@Override
public int getLightValue(IBlockState state, IBlockAccess world, BlockPos pos)
{
if(state.getValue(ACTIVE) == true){
if(state.getValue(PrimalStates.ACTIVE) == true){
return 15;
}
return 0;
@@ -262,7 +271,7 @@ public class Forge extends CustomContainerFacing implements ITileEntityProvider/
if(!world.isRemote){
TileForge tile = (TileForge) world.getTileEntity(pos);
if(tile.getSlotStack(0) != ItemStack.EMPTY){
if(world.getBlockState(pos).getValue(ACTIVE)==true){
if(world.getBlockState(pos).getValue(PrimalStates.ACTIVE)==true){
return true;
}
}
@@ -303,14 +312,14 @@ public class Forge extends CustomContainerFacing implements ITileEntityProvider/
/*@Override
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);
return state.withProperty(FACING, placer.getHorizontalFacing()).withProperty(ACTIVE, Boolean.valueOf(false));
return state.withProperty(FACING, placer.getHorizontalFacing()).withProperty(PrimalStates.ACTIVE, Boolean.valueOf(false));
}*/
@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)), 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) {
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;
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;
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;
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;
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;
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;
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;
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;
return i;
}
@@ -358,9 +367,6 @@ public class Forge extends CustomContainerFacing implements ITileEntityProvider/
public IBlockState getStateFromMeta(int meta) {
EnumFacing enumfacing;
Boolean active;
switch (meta & 7)
{
case 0:
@@ -400,12 +406,12 @@ public class Forge extends CustomContainerFacing implements ITileEntityProvider/
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
protected BlockStateContainer createBlockState() {
return new BlockStateContainer(this, new IProperty[] {FACING, ACTIVE});
return new BlockStateContainer(this, new IProperty[] {FACING, PrimalStates.ACTIVE});
}
@Override
@@ -414,12 +420,6 @@ public class Forge extends CustomContainerFacing implements ITileEntityProvider/
return false;
}
@Override
public boolean isFullyOpaque(IBlockState state)
{
return false;
}
@Override
public boolean isOpaqueCube(IBlockState state)
{
@@ -444,7 +444,7 @@ public class Forge extends CustomContainerFacing implements ITileEntityProvider/
{
this.updateTick(world, pos, state, random);
if(!world.isRemote){
if(state.getValue(ACTIVE) == true) {
if(state.getValue(PrimalStates.ACTIVE) == true) {
makeSmoke(world, pos);
}
}
@@ -454,7 +454,7 @@ public class Forge extends CustomContainerFacing implements ITileEntityProvider/
@SuppressWarnings("incomplete-switch")
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 d1 = (double)pos.getY() + 0.96D;

View File

@@ -1,12 +1,13 @@
package nmd.primal.forgecraft.blocks;
import net.minecraft.block.BlockDynamicLiquid;
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.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.init.SoundEvents;
import net.minecraft.item.ItemStack;
import net.minecraft.util.SoundCategory;
@@ -14,6 +15,7 @@ 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.PrimalStates;
import java.util.Random;
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 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;
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)
{
//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));
}
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
public int getMetaFromState(IBlockState state) {
int i = 0;
if( state.getValue(ACTIVE) == false) {
if( state.getValue(PrimalStates.ACTIVE) == false) {
i = 0;
return i;
}
if( state.getValue(ACTIVE) == true) {
if( state.getValue(PrimalStates.ACTIVE) == true) {
i = 1;
return i;
}
@@ -74,17 +89,17 @@ public class IngotBall extends BlockCustomBase {
IBlockState iblockstate = this.getDefaultState();
if (meta == 0){
iblockstate = iblockstate.withProperty(ACTIVE, Boolean.valueOf(false));
iblockstate = iblockstate.withProperty(PrimalStates.ACTIVE, Boolean.valueOf(false));
}
if (meta == 1) {
iblockstate = iblockstate.withProperty(ACTIVE, Boolean.valueOf(true));
iblockstate = iblockstate.withProperty(PrimalStates.ACTIVE, Boolean.valueOf(true));
}
return iblockstate;
}
@Override
protected BlockStateContainer createBlockState() {
return new BlockStateContainer(this, new IProperty[] {ACTIVE});
return new BlockStateContainer(this, new IProperty[] {PrimalStates.ACTIVE});
}
@Override
@@ -93,8 +108,8 @@ public class IngotBall extends BlockCustomBase {
this.updateTick(world, pos, state, random);
if(!world.isRemote){
if ( ThreadLocalRandom.current().nextInt(0,4) == 0) {
if(state.getValue(ACTIVE) == true) {
world.setBlockState(pos, state.withProperty(ACTIVE, Boolean.valueOf(false)), 2);
if(state.getValue(PrimalStates.ACTIVE) == true) {
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);
}
}

View File

@@ -2,7 +2,6 @@ package nmd.primal.forgecraft.blocks;
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.EntityLivingBase;
@@ -16,8 +15,8 @@ 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.forgecraft.ModInfo;
import nmd.primal.forgecraft.init.ModBlocks;
import nmd.primal.forgecraft.init.ModSounds;
import nmd.primal.forgecraft.tiles.TileBloomery;
import nmd.primal.forgecraft.tiles.TileForge;
@@ -31,7 +30,7 @@ import java.util.concurrent.ThreadLocalRandom;
*/
public class PistonBellows extends CustomContainerFacing {
public static final PropertyBool ACTIVE = PropertyBool.create("active");
//public static final PropertyBool PrimalStates.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 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);
@@ -39,13 +38,9 @@ public class PistonBellows extends CustomContainerFacing {
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) {
super(material);
setUnlocalizedName(ModInfo.ForgecraftBlocks.PISTONBELLOWS.getUnlocalizedName());
//setRegistryName(ModInfo.ForgecraftBlocks.PISTONBELLOWS.getRegistryName());
setRegistryName(registryName);
super(material, registryName);
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);
}
@@ -61,7 +56,7 @@ public class PistonBellows extends CustomContainerFacing {
TilePistonBellows tile = (TilePistonBellows) worldIn.getTileEntity(pos);
if (tile != null) {
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);
}
}
@@ -70,8 +65,8 @@ 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) {
if(!world.isRemote){
//System.out.println(state.getValue(PistonBellows.FACING));
if(state.getValue(this.ACTIVE) == false) {
world.setBlockState(pos, state.withProperty(ACTIVE, true), 2);
if(state.getValue(PrimalStates.ACTIVE) == false) {
world.setBlockState(pos, state.withProperty(PrimalStates.ACTIVE, true), 2);
//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(null, pos, ModSounds.PISTON_BELLOWS, SoundCategory.BLOCKS, 0.25F, 0.8F);
@@ -80,9 +75,9 @@ public class PistonBellows extends CustomContainerFacing {
if (state.getValue(PistonBellows.FACING) == EnumFacing.NORTH) {
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);
if ((world.getBlockState(tempPos).getValue(Forge.ACTIVE) == true) && (world.getBlockState(tempPos).getValue(Forge.FACING) == EnumFacing.EAST)) {
if ((world.getBlockState(tempPos).getValue(PrimalStates.ACTIVE) == true) && (world.getBlockState(tempPos).getValue(Forge.FACING) == EnumFacing.EAST)) {
if (tile != null) {
//System.out.println(world.getBlockState(tempPos).getValue(Forge.FACING));
tile.setHeat(tile.getHeat() + 50);
@@ -92,16 +87,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);
if ((world.getBlockState(tempPos).getValue(Bloomery.ACTIVE) == true)
&& (world.getBlockState(tempPos).getValue(Bloomery.FACING) == EnumFacing.EAST)) {
if ((world.getBlockState(tempPos).getValue(PrimalStates.ACTIVE) == true)
&& (world.getBlockState(tempPos).getValue(FACING) == EnumFacing.EAST)) {
if (tile != null) {
//System.out.println(world.getBlockState(tempPos).getValue(Forge.FACING));
tile.setHeat(tile.getHeat() + 50);
if(world.getBlockState(tempPos).getValue(Bloomery.COVERED) == true){
tile.setHeat(tile.getHeat() + 50);
}
tile.updateBlock();
tile.markDirty();
return true;
@@ -111,9 +103,9 @@ public class PistonBellows extends CustomContainerFacing {
}
if (state.getValue(PistonBellows.FACING) == EnumFacing.SOUTH) {
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);
if ((world.getBlockState(tempPos).getValue(Forge.ACTIVE) == true) && (world.getBlockState(tempPos).getValue(Forge.FACING) == EnumFacing.WEST)) {
if ((world.getBlockState(tempPos).getValue(PrimalStates.ACTIVE) == true) && (world.getBlockState(tempPos).getValue(Forge.FACING) == EnumFacing.WEST)) {
if (tile != null) {
//System.out.println(world.getBlockState(tempPos).getValue(Forge.FACING));
tile.setHeat(tile.getHeat() + 50);
@@ -123,16 +115,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);
if ((world.getBlockState(tempPos).getValue(Bloomery.ACTIVE) == true)
&& (world.getBlockState(tempPos).getValue(Bloomery.FACING) == EnumFacing.WEST)) {
if ((world.getBlockState(tempPos).getValue(PrimalStates.ACTIVE) == true)
&& (world.getBlockState(tempPos).getValue(FACING) == EnumFacing.WEST)) {
if (tile != null) {
//System.out.println(world.getBlockState(tempPos).getValue(Forge.FACING));
tile.setHeat(tile.getHeat() + 50);
if(world.getBlockState(tempPos).getValue(Bloomery.COVERED) == true){
tile.setHeat(tile.getHeat() + 50);
}
tile.updateBlock();
tile.markDirty();
return true;
@@ -142,9 +131,9 @@ public class PistonBellows extends CustomContainerFacing {
}
if (state.getValue(PistonBellows.FACING) == EnumFacing.EAST) {
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);
if ((world.getBlockState(tempPos).getValue(Forge.ACTIVE) == true) && (world.getBlockState(tempPos).getValue(Forge.FACING) == EnumFacing.SOUTH)) {
if ((world.getBlockState(tempPos).getValue(PrimalStates.ACTIVE) == true) && (world.getBlockState(tempPos).getValue(Forge.FACING) == EnumFacing.SOUTH)) {
if (tile != null) {
//System.out.println(world.getBlockState(tempPos).getValue(Forge.FACING));
tile.setHeat(tile.getHeat() + 50);
@@ -154,16 +143,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);
if ((world.getBlockState(tempPos).getValue(Bloomery.ACTIVE) == true)
&& (world.getBlockState(tempPos).getValue(Bloomery.FACING) == EnumFacing.SOUTH)) {
if ((world.getBlockState(tempPos).getValue(PrimalStates.ACTIVE) == true)
&& (world.getBlockState(tempPos).getValue(FACING) == EnumFacing.SOUTH)) {
if (tile != null) {
//System.out.println(world.getBlockState(tempPos).getValue(Forge.FACING));
tile.setHeat(tile.getHeat() + 50);
if(world.getBlockState(tempPos).getValue(Bloomery.COVERED) == true){
tile.setHeat(tile.getHeat() + 50);
}
tile.updateBlock();
tile.markDirty();
return true;
@@ -173,9 +159,9 @@ public class PistonBellows extends CustomContainerFacing {
}
if (state.getValue(PistonBellows.FACING) == EnumFacing.WEST) {
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);
if ((world.getBlockState(tempPos).getValue(Forge.ACTIVE) == true) && (world.getBlockState(tempPos).getValue(Forge.FACING) == EnumFacing.NORTH)) {
if ((world.getBlockState(tempPos).getValue(PrimalStates.ACTIVE) == true) && (world.getBlockState(tempPos).getValue(Forge.FACING) == EnumFacing.NORTH)) {
if (tile != null) {
//System.out.println(world.getBlockState(tempPos).getValue(Forge.FACING));
tile.setHeat(tile.getHeat() + 50);
@@ -185,16 +171,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);
if ((world.getBlockState(tempPos).getValue(Bloomery.ACTIVE) == true)
&& (world.getBlockState(tempPos).getValue(Bloomery.FACING) == EnumFacing.NORTH)) {
if ((world.getBlockState(tempPos).getValue(PrimalStates.ACTIVE) == true)
&& (world.getBlockState(tempPos).getValue(FACING) == EnumFacing.NORTH)) {
if (tile != null) {
//System.out.println(world.getBlockState(tempPos).getValue(Forge.FACING));
tile.setHeat(tile.getHeat() + 50);
if(world.getBlockState(tempPos).getValue(Bloomery.COVERED) == true){
tile.setHeat(tile.getHeat() + 50);
}
tile.updateBlock();
tile.markDirty();
return true;
@@ -260,35 +243,35 @@ public class PistonBellows extends CustomContainerFacing {
public int getMetaFromState(IBlockState state) {
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;
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;
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;
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;
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;
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;
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;
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;
return i;
}
@@ -342,12 +325,12 @@ public class PistonBellows extends CustomContainerFacing {
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
protected BlockStateContainer createBlockState() {
return new BlockStateContainer(this, new IProperty[] {FACING, ACTIVE});
return new BlockStateContainer(this, new IProperty[] {FACING, PrimalStates.ACTIVE});
}
//return new ExtendedBlockState(this, new IProperty[] { BotaniaStateProps.CARDINALS, Properties.StaticProperty }, new IUnlistedProperty[] { Properties.AnimationProperty });
@@ -358,12 +341,6 @@ public class PistonBellows extends CustomContainerFacing {
return false;
}
@Override
public boolean isFullyOpaque(IBlockState state)
{
return false;
}
@Override
public boolean isOpaqueCube(IBlockState state)
{
@@ -385,18 +362,18 @@ public class PistonBellows extends CustomContainerFacing {
public void randomDisplayTick(IBlockState state, World world, BlockPos pos, Random rand)
{
if(state.getValue(PistonBellows.ACTIVE) == Boolean.TRUE) {
if(state.getValue(PrimalStates.ACTIVE) == Boolean.TRUE) {
if (state.getValue(PistonBellows.FACING) == EnumFacing.NORTH) {
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);
if ((world.getBlockState(tempPos).getValue(Forge.ACTIVE) == true) && (world.getBlockState(tempPos).getValue(Forge.FACING) == EnumFacing.EAST)) {
if ((world.getBlockState(tempPos).getValue(PrimalStates.ACTIVE) == true) && (world.getBlockState(tempPos).getValue(Forge.FACING) == EnumFacing.EAST)) {
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);
if ((world.getBlockState(tempPos).getValue(Bloomery.ACTIVE) == true) && (world.getBlockState(tempPos).getValue(Bloomery.FACING) == EnumFacing.EAST)) {
if ((world.getBlockState(tempPos).getValue(PrimalStates.ACTIVE) == true) && (world.getBlockState(tempPos).getValue(BloomeryBase.FACING) == EnumFacing.EAST)) {
makeEmbers(world, tempPos, world.rand);
}
}
@@ -405,15 +382,15 @@ public class PistonBellows extends CustomContainerFacing {
if (state.getValue(PistonBellows.FACING) == EnumFacing.SOUTH) {
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);
if ((world.getBlockState(tempPos).getValue(Forge.ACTIVE) == true) && (world.getBlockState(tempPos).getValue(Forge.FACING) == EnumFacing.WEST)) {
if ((world.getBlockState(tempPos).getValue(PrimalStates.ACTIVE) == true) && (world.getBlockState(tempPos).getValue(Forge.FACING) == EnumFacing.WEST)) {
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);
if ((world.getBlockState(tempPos).getValue(Bloomery.ACTIVE) == true) && (world.getBlockState(tempPos).getValue(Bloomery.FACING) == EnumFacing.WEST)) {
if ((world.getBlockState(tempPos).getValue(PrimalStates.ACTIVE) == true) && (world.getBlockState(tempPos).getValue(BloomeryBase.FACING) == EnumFacing.WEST)) {
makeEmbers(world, tempPos, world.rand);
}
}
@@ -422,15 +399,15 @@ public class PistonBellows extends CustomContainerFacing {
if (state.getValue(PistonBellows.FACING) == EnumFacing.EAST) {
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);
if ((world.getBlockState(tempPos).getValue(Forge.ACTIVE) == true) && (world.getBlockState(tempPos).getValue(Forge.FACING) == EnumFacing.SOUTH)) {
if ((world.getBlockState(tempPos).getValue(PrimalStates.ACTIVE) == true) && (world.getBlockState(tempPos).getValue(Forge.FACING) == EnumFacing.SOUTH)) {
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);
if ((world.getBlockState(tempPos).getValue(Bloomery.ACTIVE) == true) && (world.getBlockState(tempPos).getValue(Bloomery.FACING) == EnumFacing.SOUTH)) {
if ((world.getBlockState(tempPos).getValue(PrimalStates.ACTIVE) == true) && (world.getBlockState(tempPos).getValue(BloomeryBase.FACING) == EnumFacing.SOUTH)) {
makeEmbers(world, tempPos, world.rand);
}
}
@@ -439,15 +416,15 @@ public class PistonBellows extends CustomContainerFacing {
if (state.getValue(PistonBellows.FACING) == EnumFacing.WEST) {
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);
if ((world.getBlockState(tempPos).getValue(Forge.ACTIVE) == true) && (world.getBlockState(tempPos).getValue(Forge.FACING) == EnumFacing.NORTH)) {
if ((world.getBlockState(tempPos).getValue(PrimalStates.ACTIVE) == true) && (world.getBlockState(tempPos).getValue(Forge.FACING) == EnumFacing.NORTH)) {
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);
if ((world.getBlockState(tempPos).getValue(Bloomery.ACTIVE) == true) && (world.getBlockState(tempPos).getValue(Bloomery.FACING) == EnumFacing.NORTH)) {
if ((world.getBlockState(tempPos).getValue(PrimalStates.ACTIVE) == true) && (world.getBlockState(tempPos).getValue(BloomeryBase.FACING) == EnumFacing.NORTH)) {
makeEmbers(world, tempPos, world.rand);
}
}
@@ -459,7 +436,7 @@ public class PistonBellows extends CustomContainerFacing {
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.25);
double d4 = ThreadLocalRandom.current().nextDouble(0.066, 0.33);
double ySpeed = ThreadLocalRandom.current().nextDouble(0.05, 0.20);
if(rand.nextInt(3) == 0){

View File

@@ -0,0 +1,62 @@
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.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.CommonUtils;
import nmd.primal.core.common.helper.PlayerHelper;
import nmd.primal.core.common.items.tools.WorkBlade;
import nmd.primal.forgecraft.init.ModItems;
/**
* 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;
}
}

View File

@@ -21,6 +21,10 @@ public class ModDictionary {/***************************************************
//OreDictionary.registerOre("clayball", Items.CLAY_BALL);
OreDictionary.registerOre("ingotIron", ModBlocks.ironball);
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);

View File

@@ -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;}
}

View File

@@ -15,11 +15,16 @@ import net.minecraft.util.EnumHand;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import net.minecraftforge.client.model.ModelLoader;
import net.minecraftforge.fml.common.registry.GameRegistry;
import net.minecraftforge.fml.common.registry.ForgeRegistries;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
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.Crucibles.Crucible;
import nmd.primal.forgecraft.blocks.Crucibles.CrucibleHot;
import nmd.primal.forgecraft.items.ForgeHammer;
import nmd.primal.forgecraft.tiles.TileAnvil;
@@ -28,9 +33,13 @@ import nmd.primal.forgecraft.tiles.TileAnvil;
*/
public class ModBlocks {
public static Block firebox;
public static Block bloomery;
public static Block forge_brick;
public static Block forge_adobe;
public static Block bloomery_brick;
public static Block bloomery_adobe;
public static Block blockbreaker;
public static Block castingform;
public static Block castingblock;
public static Block pistonbellowsoak;
public static Block pistonbellowsjungle;
@@ -44,6 +53,26 @@ public class ModBlocks {
public static Block emptycruciblecracked;
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 hotironcrucible;
public static Block hotcookedironcrucible;
@@ -84,12 +113,18 @@ public class ModBlocks {
public static Block stoneanvil;
public static Block ironanvil;
public static Block yewstave;
public static void init() {
firebox = new Forge(Material.ROCK);
bloomery = new Bloomery(Material.ROCK, "bloomery");
forge_brick = new Forge(Material.ROCK, "forge_brick", 5000);
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);
castingform = new CastingForm(Material.WOOD, "castingform");
castingblock = new CastingBlock(Material.ROCK, "castingblock");
pistonbellowsoak = new PistonBellows(Material.WOOD, "pistonbellowsoak");
pistonbellowsjungle = new PistonBellows(Material.WOOD, "pistonbellowsjungle");
@@ -103,6 +138,26 @@ public class ModBlocks {
emptycruciblecracked = new Crucible(Material.ROCK, "emptycruciblecracked");
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");
hotironcrucible = new CrucibleHot(Material.ROCK, "hotironcrucible");
hotcookedironcrucible = new CrucibleHot(Material.ROCK, "hotcookedironcrucible");
@@ -142,7 +197,7 @@ public class ModBlocks {
if (pItem instanceof WorkMallet && world.getBlockState(belowPos).getBlock().equals(Blocks.STONE)) {
player.swingArm(hand);
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);
//CommonUtils.spawnItemEntityFromWorld(world, pos, new ItemStack(ModBlocks.stoneanvil, 1));
return true;
@@ -150,13 +205,13 @@ public class ModBlocks {
/*if (pItem instanceof ForgeHammer && world.getBlockState(belowPos).getBlock().equals(Blocks.IRON_BLOCK)) {
player.swingArm(hand);
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);
//CommonUtils.spawnItemEntityFromWorld(world, pos, new ItemStack(ModBlocks.stoneanvil, 1));
return true;
}*/
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);
@@ -203,13 +258,13 @@ public class ModBlocks {
if (pItem instanceof ForgeHammer && world.getBlockState(belowPos).getBlock().equals(Blocks.IRON_BLOCK)) {
player.swingArm(hand);
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);
//System.out.println("Activating");
return true;
}
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);
@@ -255,13 +310,13 @@ public class ModBlocks {
if (pItem instanceof ForgeHammer && world.getBlockState(belowPos).getBlock().equals(Blocks.IRON_BLOCK)) {
player.swingArm(hand);
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);
//CommonUtils.spawnItemEntityFromWorld(world, pos, new ItemStack(ModBlocks.stoneanvil, 1));
return true;
}
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);
@@ -307,13 +362,13 @@ public class ModBlocks {
if (pItem instanceof ForgeHammer && world.getBlockState(belowPos).getBlock().equals(Blocks.IRON_BLOCK)) {
player.swingArm(hand);
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);
//CommonUtils.spawnItemEntityFromWorld(world, pos, new ItemStack(ModBlocks.stoneanvil, 1));
return true;
}
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);
@@ -354,18 +409,23 @@ public class ModBlocks {
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
stoneanvil = new Anvil(Material.ANVIL, "stoneanvil", 5.0f);
ironanvil = new Anvil(Material.ANVIL, "ironanvil", 6.0f);
stoneanvil = new AnvilStone(Material.ANVIL, "stoneanvil", 5.0f, true);
ironanvil = new AnvilIron(Material.ANVIL, "ironanvil", 6.0f, true);
//ironballitemcool = new ItemBlockIngotBall(ironball);
//ironballitemhot = new ItemBlockIngotBall(ironball);
yewstave = new YewStave(Material.WOOD, "yewstave", 3.0F);
}
public static void register() {
registerBlock(firebox);
registerBlock(bloomery);
registerBlock(forge_brick);
registerBlock(forge_adobe);
registerBlock(bloomery_brick);
registerBlock(bloomery_adobe);
registerBlock(blockbreaker);
registerBlock(castingform);
registerBlock(castingblock);
registerBlock(pistonbellowsoak);
registerBlock(pistonbellowsjungle);
@@ -379,6 +439,26 @@ public class ModBlocks {
registerBlock(emptycruciblecracked);
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(hotironcrucible);
registerBlock(hotcookedironcrucible);
@@ -423,11 +503,17 @@ public class ModBlocks {
registerBlock(stoneanvil);
registerBlock(ironanvil);
registerBlock(yewstave);
}
@SideOnly(Side.CLIENT)
public static void registerRenders() {
registerRender(firebox);
registerRender(forge_brick);
registerRender(forge_adobe);
registerRender(castingform);
registerRender(castingblock);
registerRender(blockbreaker);
registerRender(pistonbellowsoak);
registerRender(pistonbellowsjungle);
@@ -435,12 +521,35 @@ public class ModBlocks {
registerRender(pistonbellowsspruce);
registerRender(pistonbellowsdarkoak);
registerRender(pistonbellowsacacia);
registerRender(bloomery);
registerRender(bloomery_brick);
registerRender(bloomery_adobe);
registerRender(emptycrucible);
registerRender(emptycruciblehot);
registerRender(emptycruciblecracked);
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(hotironcrucible);
registerRender(hotcookedironcrucible);
@@ -486,27 +595,40 @@ public class ModBlocks {
registerRender(stoneanvil);
registerRender(ironanvil);
registerRender(yewstave);
}
private static void registerBlock(Block block) {
GameRegistry.register(block);
private static void registerBlock(Block block)
{
ForgeRegistries.BLOCKS.register(block);
//GameRegistry.register(block);
ItemBlock item = new ItemBlock(block);
item.setRegistryName(block.getRegistryName());
GameRegistry.register(item);
ForgeRegistries.ITEMS.register(item);
//GameRegistry.register(item);
}
private static void registerBlockSubType(Block block, ItemBlock itemBlock, String registryName){
GameRegistry.register(block);
ItemBlock item = itemBlock;
private static void registerBlockSubType(Block block, ItemBlock item, String registryName)
{
ForgeRegistries.BLOCKS.register(block);
//GameRegistry.register(block);
item.setRegistryName(registryName);
GameRegistry.register(item);
ForgeRegistries.ITEMS.register(item);
//GameRegistry.register(item);
}
private static void registerRender(Block block) {
private static void registerRender(Block block)
{
Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(Item.getItemFromBlock(block), 0, new ModelResourceLocation(block.getRegistryName(), "inventory"));
}
private static void registerRenderCustom(ItemBlock item, Integer meta, ModelResourceLocation model){
private static void registerRenderCustom(ItemBlock item, Integer meta, ModelResourceLocation model)
{
ModelLoader.setCustomModelResourceLocation(item, meta, model);
}

View 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;
}
}

View File

@@ -4,12 +4,13 @@ import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fml.common.registry.GameRegistry;
import net.minecraftforge.oredict.OreDictionary;
import net.minecraftforge.oredict.ShapedOreRecipe;
import nmd.primal.core.api.PrimalItems;
import nmd.primal.core.common.crafting.RecipeHandler;
import nmd.primal.core.common.helper.CommonUtils;
import nmd.primal.forgecraft.crafting.AnvilCrafting;
import nmd.primal.forgecraft.crafting.BloomeryCrafting;
import nmd.primal.forgecraft.crafting.CastingformCrafting;
import nmd.primal.forgecraft.crafting.ForgeCrafting;
import java.util.Random;
@@ -23,189 +24,342 @@ public class ModCrafting {
Random rand = new Random();
//RecipeHandler.addShapedOreRecipe();
/***CASTING BLOCK***/
RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.castingblock),
" B ", "BXB", " B ", 'X', Blocks.STONE_SLAB, 'B', PrimalItems.ADOBEBRICK_DRY);
/***CASTING FORM***/
RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.castingform, 1),
true, new Object[]{" S ", "S S", " S ",
('S'), "logSplit"
});
/***CASTING MUD***/
RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.castingmud, 4),
true, new Object[]{" C ", "CSC", " C ",
('S'), Blocks.SAND,
('C'), PrimalItems.MUD_CLUMP
});
/***YEW STAVE***/
RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.yewstave, 2),
true, new Object[]{"C", "C",
('C'), PrimalItems.LOGS_SPLIT_YEW
});
/***Unstrung Longbow***/
RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.unstrunglongbow, 1),
true, new Object[]{"C", "A",
('C'), "fatAnimal",
('A'), ModItems.rawlongbow
});
/***Longbow***/
RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.longbow, 1),
true, new Object[]{"C ","CA","C ",
('C'), PrimalItems.SILK_CORDAGE,
('A'), ModItems.unstrunglongbow
});
/***Forge***/
GameRegistry.addShapedRecipe(new ItemStack(ModBlocks.firebox),
RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.forge_brick),
"X X", "XYX", "X X", 'X', Items.BRICK, 'Y', Blocks.FURNACE);
RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.forge_adobe),
"X X", "XYX", "X X", 'X', PrimalItems.ADOBEBRICK_DRY, 'Y', Blocks.FURNACE);
/***Bloomery***/
GameRegistry.addShapedRecipe(new ItemStack(ModBlocks.bloomery),
RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.bloomery_brick),
"X X", "X X", "XXX", 'X', Items.BRICK);
RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.bloomery_adobe),
"X X", "X X", "XXX", 'X', PrimalItems.ADOBEBRICK_DRY);
/***Block Breaker***/
GameRegistry.addShapedRecipe(new ItemStack(ModBlocks.blockbreaker),
RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.blockbreaker),
"L ", "BSB", "BBB", 'L', Blocks.LEVER, 'B', new ItemStack(Blocks.PLANKS, 1, OreDictionary.WILDCARD_VALUE), 'S', PrimalItems.SILK_CORDAGE_COILED);
/*** Soft Crucible ***/
GameRegistry.addShapedRecipe(new ItemStack(ModItems.softcrucible),
RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.softcrucible),
"X X", "X X", "XXX", 'X', Items.CLAY_BALL);
/*** Soft Crucible ***/
GameRegistry.addShapedRecipe(new ItemStack(ModItems.softcrucible),
RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.softcrucible),
"X X", "X X", "XXX", 'X', PrimalItems.MUD_CLUMP);
/***Wooden PistonBellows***/
GameRegistry.addShapedRecipe(new ItemStack(ModBlocks.pistonbellowsoak), "XXX", "X Y", "XXX",
'X', new ItemStack(Blocks.PLANKS, 1, 0), 'Y', ModItems.pistonbellows);
GameRegistry.addShapedRecipe(new ItemStack(ModBlocks.pistonbellowsspruce), "XXX", "X Y", "XXX",
'X', new ItemStack(Blocks.PLANKS, 1, 1), 'Y', ModItems.pistonbellows);
GameRegistry.addShapedRecipe(new ItemStack(ModBlocks.pistonbellowsbirch), "XXX", "X Y", "XXX",
'X', new ItemStack(Blocks.PLANKS, 1, 2), 'Y', ModItems.pistonbellows);
GameRegistry.addShapedRecipe(new ItemStack(ModBlocks.pistonbellowsjungle), "XXX", "X Y", "XXX",
'X', new ItemStack(Blocks.PLANKS, 1, 3), 'Y', ModItems.pistonbellows);
GameRegistry.addShapedRecipe(new ItemStack(ModBlocks.pistonbellowsacacia), "XXX", "X Y", "XXX",
'X', new ItemStack(Blocks.PLANKS, 1, 4), 'Y', ModItems.pistonbellows);
GameRegistry.addShapedRecipe(new ItemStack(ModBlocks.pistonbellowsdarkoak), "XXX", "X Y", "XXX",
'X', new ItemStack(Blocks.PLANKS, 1, 5), 'Y', ModItems.pistonbellows);
RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.pistonbellowsoak), "XXX", "X Y", "XXX",
'X', new ItemStack(Blocks.PLANKS, 1, 0), 'Y', ModItems.bellowshandle);
RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.pistonbellowsspruce), "XXX", "X Y", "XXX",
'X', new ItemStack(Blocks.PLANKS, 1, 1), 'Y', ModItems.bellowshandle);
RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.pistonbellowsbirch), "XXX", "X Y", "XXX",
'X', new ItemStack(Blocks.PLANKS, 1, 2), 'Y', ModItems.bellowshandle);
RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.pistonbellowsjungle), "XXX", "X Y", "XXX",
'X', new ItemStack(Blocks.PLANKS, 1, 3), 'Y', ModItems.bellowshandle);
RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.pistonbellowsacacia), "XXX", "X Y", "XXX",
'X', new ItemStack(Blocks.PLANKS, 1, 4), 'Y', ModItems.bellowshandle);
RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.pistonbellowsdarkoak), "XXX", "X Y", "XXX",
'X', new ItemStack(Blocks.PLANKS, 1, 5), 'Y', ModItems.bellowshandle);
/***Bellows Handle***/
GameRegistry.addShapedRecipe(new ItemStack(ModItems.pistonbellows),
RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.bellowshandle),
"X X", "X X", " X ", 'X', Items.STICK);
/***Tongs***/
GameRegistry.addShapedRecipe(new ItemStack(ModItems.stonetongs, 1),
RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.stonetongs, 1),
"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),
RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.rawironcrucible),
"X","Y",
('X'), "oreIron",
('Y'), ModBlocks.emptycrucible));
('Y'), ModBlocks.emptycrucible);
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.rawcleanironcrucible),
RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.rawcleanironcrucible),
"XL","Y ",
('X'), "dustIron",
('L'), PrimalItems.CARBONATE_SLACK,
('Y'), ModBlocks.emptycrucible));
('Y'), ModBlocks.emptycrucible);
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.rawsteelcrucible),
RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.rawsteelcrucible),
"XC","Y ",
('X'), new ItemStack(ModBlocks.ironcleanball, 1),
('C'), new ItemStack(Items.COAL, 1, 1),
('Y'), ModBlocks.emptycrucible));
('C'), new ItemStack(PrimalItems.CHARCOAL_HIGH),
('Y'), ModBlocks.emptycrucible);
RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.rawbronzecrucible),
"XCX"," X "," Y ",
('X'), "dustCopper",
('C'), "dustTin",
('Y'), ModBlocks.emptycrucible);
RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.rawbronzecrucible),
"XXX"," X "," Y ",
('X'), "nuggetBronze",
('Y'), ModBlocks.emptycrucible);
RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.rawbronzecrucible),
"X","Y",
('X'), new ItemStack(ModItems.bronzepickaxehead, 1, OreDictionary.WILDCARD_VALUE),
('Y'), ModBlocks.emptycrucible);
RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.rawbronzecrucible),
"X","Y",
('X'), new ItemStack(ModItems.bronzeaxehead, 1, OreDictionary.WILDCARD_VALUE),
('Y'), ModBlocks.emptycrucible);
RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.rawbronzecrucible),
"X","Y",
('X'), new ItemStack(ModItems.bronzeshovelhead, 1, OreDictionary.WILDCARD_VALUE),
('Y'), ModBlocks.emptycrucible);
RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.rawbronzecrucible),
"X","Y",
('X'), new ItemStack(ModItems.bronzehoehead, 1, OreDictionary.WILDCARD_VALUE),
('Y'), ModBlocks.emptycrucible);
RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.rawbronzecrucible),
"X","Y",
('X'), new ItemStack(ModItems.bronzegladius, 1, OreDictionary.WILDCARD_VALUE),
('Y'), ModBlocks.emptycrucible);
RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.rawbronzecrucible_redstone),
"R","Y",
('R'), Items.REDSTONE,
('Y'), ModBlocks.rawbronzecrucible);
RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.rawbronzecrucible_diamond),
"D","Y",
('D'), PrimalItems.DIAMOND_KNAPP,
('Y'), ModBlocks.rawbronzecrucible);
RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.rawbronzecrucible_lapis),
"L","Y",
('L'), new ItemStack(Items.DYE, 1, 4),
('Y'), ModBlocks.rawbronzecrucible);
RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.rawbronzecrucible_emerald),
"E","Y",
('E'), PrimalItems.EMERALD_KNAPP,
('Y'), ModBlocks.rawbronzecrucible);
/***Pickaxe Crafting***/
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ironpickaxe), "T", "C", "S",
('T'), new ItemStack(ModItems.pickaxehead, 1, OreDictionary.WILDCARD_VALUE), //new ItemStack( 1, OreDictionary.WILDCARD_VALUE),
('S'), PrimalItems.LACQUER_STICK,
('C'), "cordageGeneral"));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.cleanironpickaxe), "T", "C", "S",
('T'), new ItemStack(ModItems.cleanironpickaxehead, 1, OreDictionary.WILDCARD_VALUE),
('S'), PrimalItems.LACQUER_STICK,
('C'), "cordageGeneral"));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.steelpickaxe), "T", "C", "S",
('T'), new ItemStack(ModItems.steelpickaxehead, 1, OreDictionary.WILDCARD_VALUE),
('S'), PrimalItems.LACQUER_STICK,
('C'), "cordageGeneral"));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Items.IRON_PICKAXE), "T", "S",
('T'), ModItems.pickaxehead,
('S'), Items.STICK));
//placeholder wootz
/***Axe Crafting***/
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ironaxe), "T", "C", "S",
('T'), new ItemStack(ModItems.ironaxehead, 1, OreDictionary.WILDCARD_VALUE),
('S'), PrimalItems.LACQUER_STICK,
('C'), "cordageGeneral"));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.cleanironaxe), "T", "C", "S",
('T'), new ItemStack(ModItems.cleanironaxehead, 1, OreDictionary.WILDCARD_VALUE),
('S'), PrimalItems.LACQUER_STICK,
('C'), "cordageGeneral"));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.steelaxe), "T", "C", "S",
('T'), new ItemStack(ModItems.steelaxehead,1, OreDictionary.WILDCARD_VALUE),
('S'), PrimalItems.LACQUER_STICK,
('C'), "cordageGeneral"));
//TODO wootz placeholder
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Items.IRON_AXE), "T", "S",
('T'), ModItems.ironaxehead,
('S'), Items.STICK));
/***Shovel Crafting***/
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ironshovel), "T", "C", "S",
('T'), new ItemStack(ModItems.ironshovelhead, 1, OreDictionary.WILDCARD_VALUE),
('S'), PrimalItems.LACQUER_STICK,
('C'), "cordageGeneral"));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.cleanironshovel), "T", "C", "S",
('T'), new ItemStack(ModItems.cleanironshovelhead, 1, OreDictionary.WILDCARD_VALUE),
('S'), PrimalItems.LACQUER_STICK,
('C'), "cordageGeneral"));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.steelshovel), "T", "C", "S",
('T'), new ItemStack(ModItems.steelshovelhead, 1, OreDictionary.WILDCARD_VALUE),
('S'), PrimalItems.LACQUER_STICK,
('C'), "cordageGeneral"));
//TODO placed holder for wootz
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Items.IRON_SHOVEL), "T", "S",
('T'), ModItems.ironshovelhead,
('S'), Items.STICK));
/***Hoe Crafting***/
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ironhoe), "T", "C", "S",
('T'), new ItemStack(ModItems.ironhoehead, 1, OreDictionary.WILDCARD_VALUE),
('S'), PrimalItems.LACQUER_STICK,
('C'), "cordageGeneral"));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.cleanironhoe), "T", "C", "S",
('T'), new ItemStack(ModItems.cleanironhoehead, 1, OreDictionary.WILDCARD_VALUE),
('S'), PrimalItems.LACQUER_STICK,
('C'), "cordageGeneral"));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.steelhoe), "T", "C", "S",
('T'), new ItemStack(ModItems.steelhoehead, 1, OreDictionary.WILDCARD_VALUE),
('S'), PrimalItems.LACQUER_STICK,
('C'), "cordageGeneral"));
//TODO PLACE HOLDER FOR WOOTZ STEEL
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Items.IRON_HOE), "T", "S",
('T'), ModItems.ironhoehead,
('S'), Items.STICK));
RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.rawbronzecrucible, 1),
"T", "Y",
('T'), new ItemStack(ModItems.brokenbronzetool, 1),
('Y'), new ItemStack(ModBlocks.emptycrucible, 1)
);
RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.rawironcrucible, 1),
"T", "Y",
('T'), new ItemStack(ModItems.brokenwroughtirontool, 1),
('Y'), new ItemStack(ModBlocks.emptycrucible, 1)
);
RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.rawcleanironcrucible, 1),
"T", "Y",
('T'), new ItemStack(ModItems.brokencleanirontool, 1),
('Y'), new ItemStack(ModBlocks.emptycrucible, 1)
);
RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.rawsteelcrucible, 1),
"T", "Y",
('T'), new ItemStack(ModItems.brokensteeltool, 1),
('Y'), new ItemStack(ModBlocks.emptycrucible, 1)
);
RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.rawwootzcrucible, 1),
"T", "Y",
('T'), new ItemStack(ModItems.brokenwootztool, 1),
('Y'), new ItemStack(ModBlocks.emptycrucible, 1)
);
/***************************************************************
* TEMPORARY RECIPES
* TOOL CRAFTING RECIPES
***************************************************************/
//GameRegistry.addShapedRecipe(new ItemStack(ModItems.ironaxehead, 1, OreDictionary.WILDCARD_VALUE),
/***Pickaxe Crafting***/
RecipeHandler.addShapedOreRecipe(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");
RecipeHandler.addShapedOreRecipe(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),
('S'), PrimalItems.LACQUER_STICK,
('C'), "cordageGeneral");
RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.cleanironpickaxe, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S",
('T'), new ItemStack(ModItems.cleanironpickaxehead, 1, OreDictionary.WILDCARD_VALUE),
('S'), PrimalItems.LACQUER_STICK,
('C'), "cordageGeneral");
RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.steelpickaxe, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S",
('T'), new ItemStack(ModItems.steelpickaxehead, 1, OreDictionary.WILDCARD_VALUE),
('S'), PrimalItems.LACQUER_STICK,
('C'), "cordageGeneral");
RecipeHandler.addShapedOreRecipe(new ItemStack(Items.IRON_PICKAXE), "T", "S",
('T'), ModItems.pickaxehead,
('S'), Items.STICK);
//TODO wootz placeholder
/***Axe Crafting***/
RecipeHandler.addShapedOreRecipe(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");
RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.ironaxe, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S",
('T'), new ItemStack(ModItems.ironaxehead, 1, OreDictionary.WILDCARD_VALUE),
('S'), PrimalItems.LACQUER_STICK,
('C'), "cordageGeneral");
RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.cleanironaxe, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S",
('T'), new ItemStack(ModItems.cleanironaxehead, 1, OreDictionary.WILDCARD_VALUE),
('S'), PrimalItems.LACQUER_STICK,
('C'), "cordageGeneral");
RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.steelaxe, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S",
('T'), new ItemStack(ModItems.steelaxehead,1, OreDictionary.WILDCARD_VALUE),
('S'), PrimalItems.LACQUER_STICK,
('C'), "cordageGeneral");
//TODO wootz placeholder
RecipeHandler.addShapedOreRecipe(new ItemStack(Items.IRON_AXE), "T", "S",
('T'), ModItems.ironaxehead,
('S'), Items.STICK);
/***Shovel Crafting***/
RecipeHandler.addShapedOreRecipe(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");
RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.ironshovel, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S",
('T'), new ItemStack(ModItems.ironshovelhead, 1, OreDictionary.WILDCARD_VALUE),
('S'), PrimalItems.LACQUER_STICK,
('C'), "cordageGeneral");
RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.cleanironshovel, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S",
('T'), new ItemStack(ModItems.cleanironshovelhead, 1, OreDictionary.WILDCARD_VALUE),
('S'), PrimalItems.LACQUER_STICK,
('C'), "cordageGeneral");
RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.steelshovel, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S",
('T'), new ItemStack(ModItems.steelshovelhead, 1, OreDictionary.WILDCARD_VALUE),
('S'), PrimalItems.LACQUER_STICK,
('C'), "cordageGeneral");
//TODO placed holder for wootz
RecipeHandler.addShapedOreRecipe(new ItemStack(Items.IRON_SHOVEL), "T", "S",
('T'), ModItems.ironshovelhead,
('S'), Items.STICK);
/***Hoe Crafting***/
RecipeHandler.addShapedOreRecipe(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");
RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.ironhoe, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S",
('T'), new ItemStack(ModItems.ironhoehead, 1, OreDictionary.WILDCARD_VALUE),
('S'), PrimalItems.LACQUER_STICK,
('C'), "cordageGeneral");
RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.cleanironhoe, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S",
('T'), new ItemStack(ModItems.cleanironhoehead, 1, OreDictionary.WILDCARD_VALUE),
('S'), PrimalItems.LACQUER_STICK,
('C'), "cordageGeneral");
RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.steelhoe, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S",
('T'), new ItemStack(ModItems.steelhoehead, 1, OreDictionary.WILDCARD_VALUE),
('S'), PrimalItems.LACQUER_STICK,
('C'), "cordageGeneral");
//TODO PLACE HOLDER FOR WOOTZ STEEL
RecipeHandler.addShapedOreRecipe(new ItemStack(Items.IRON_HOE), "T", "S",
('T'), ModItems.ironhoehead,
('S'), Items.STICK);
/***************************************************************
* TOOL DISASSEMBLY RECIPES
***************************************************************/
//RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.ironaxehead, 1, OreDictionary.WILDCARD_VALUE),
// " ", " X ", " ", 'X', ModItems.ironaxe);
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ironaxehead, 1, OreDictionary.WILDCARD_VALUE),
true, "X", ('X'), new ItemStack(ModItems.ironaxe, 1, OreDictionary.WILDCARD_VALUE)));
RecipeHandler.addShapedOreRecipe(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.pickaxehead, 1, OreDictionary.WILDCARD_VALUE),
true, "X", ('X'), new ItemStack(ModItems.ironpickaxe, 1, OreDictionary.WILDCARD_VALUE)));
RecipeHandler.addShapedOreRecipe(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.ironshovelhead, 1, OreDictionary.WILDCARD_VALUE),
true, "X", ('X'), new ItemStack(ModItems.ironshovel, 1, OreDictionary.WILDCARD_VALUE)));
RecipeHandler.addShapedOreRecipe(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.ironhoehead, 1, OreDictionary.WILDCARD_VALUE),
true, "X", ('X'), new ItemStack(ModItems.ironhoe, 1, OreDictionary.WILDCARD_VALUE)));
RecipeHandler.addShapedOreRecipe(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.cleanironaxehead, 1, OreDictionary.WILDCARD_VALUE),
true, "X", ('X'), new ItemStack(ModItems.cleanironaxe, 1, OreDictionary.WILDCARD_VALUE)));
RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.ironaxehead, 1, OreDictionary.WILDCARD_VALUE),
true, "X", ('X'), new ItemStack(ModItems.ironaxe, 1, OreDictionary.WILDCARD_VALUE));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.cleanironpickaxehead, 1, OreDictionary.WILDCARD_VALUE),
true, "X", ('X'), new ItemStack(ModItems.cleanironpickaxe, 1, OreDictionary.WILDCARD_VALUE)));
RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.pickaxehead, 1, OreDictionary.WILDCARD_VALUE),
true, "X", ('X'), new ItemStack(ModItems.ironpickaxe, 1, OreDictionary.WILDCARD_VALUE));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.cleanironshovelhead, 1, OreDictionary.WILDCARD_VALUE),
true, "X", ('X'), new ItemStack(ModItems.cleanironshovel, 1, OreDictionary.WILDCARD_VALUE)));
RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.ironshovelhead, 1, OreDictionary.WILDCARD_VALUE),
true, "X", ('X'), new ItemStack(ModItems.ironshovel, 1, OreDictionary.WILDCARD_VALUE));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.cleanironhoehead, 1, OreDictionary.WILDCARD_VALUE),
true, "X", ('X'), new ItemStack(ModItems.cleanironhoe, 1, OreDictionary.WILDCARD_VALUE)));
RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.ironhoehead, 1, OreDictionary.WILDCARD_VALUE),
true, "X", ('X'), new ItemStack(ModItems.ironhoe, 1, OreDictionary.WILDCARD_VALUE));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.steelaxehead, 1, OreDictionary.WILDCARD_VALUE),
true, "X", ('X'), new ItemStack(ModItems.steelaxe, 1, OreDictionary.WILDCARD_VALUE)));
RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.cleanironaxehead, 1, OreDictionary.WILDCARD_VALUE),
true, "X", ('X'), new ItemStack(ModItems.cleanironaxe, 1, OreDictionary.WILDCARD_VALUE));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.steelpickaxehead, 1, OreDictionary.WILDCARD_VALUE),
true, "X", ('X'), new ItemStack(ModItems.steelpickaxe, 1, OreDictionary.WILDCARD_VALUE)));
RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.cleanironpickaxehead, 1, OreDictionary.WILDCARD_VALUE),
true, "X", ('X'), new ItemStack(ModItems.cleanironpickaxe, 1, OreDictionary.WILDCARD_VALUE));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.steelshovelhead, 1, OreDictionary.WILDCARD_VALUE),
true, "X", ('X'), new ItemStack(ModItems.steelshovel, 1, OreDictionary.WILDCARD_VALUE)));
RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.cleanironshovelhead, 1, OreDictionary.WILDCARD_VALUE),
true, "X", ('X'), new ItemStack(ModItems.cleanironshovel, 1, OreDictionary.WILDCARD_VALUE));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.steelhoehead, 1, OreDictionary.WILDCARD_VALUE),
true, "X", ('X'), new ItemStack(ModItems.steelhoe, 1, OreDictionary.WILDCARD_VALUE)));
RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.cleanironhoehead, 1, OreDictionary.WILDCARD_VALUE),
true, "X", ('X'), new ItemStack(ModItems.cleanironhoe, 1, OreDictionary.WILDCARD_VALUE));
RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.steelaxehead, 1, OreDictionary.WILDCARD_VALUE),
true, "X", ('X'), new ItemStack(ModItems.steelaxe, 1, OreDictionary.WILDCARD_VALUE));
RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.steelpickaxehead, 1, OreDictionary.WILDCARD_VALUE),
true, "X", ('X'), new ItemStack(ModItems.steelpickaxe, 1, OreDictionary.WILDCARD_VALUE));
RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.steelshovelhead, 1, OreDictionary.WILDCARD_VALUE),
true, "X", ('X'), new ItemStack(ModItems.steelshovel, 1, OreDictionary.WILDCARD_VALUE));
RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.steelhoehead, 1, OreDictionary.WILDCARD_VALUE),
true, "X", ('X'), new ItemStack(ModItems.steelhoe, 1, OreDictionary.WILDCARD_VALUE));
/***************************************************************/
@@ -217,7 +371,7 @@ public class ModCrafting {
new ItemStack(ModBlocks.emptycruciblehot, 1),
new ItemStack(ModBlocks.emptycruciblecrackedhot, 1),
new ItemStack(ModBlocks.emptycrucible, 1),
2100,
2000,
1600,
600,
0.25f,
@@ -229,7 +383,7 @@ public class ModCrafting {
new ItemStack(ModBlocks.emptycruciblecrackedhot, 1),
new ItemStack(ModBlocks.emptycruciblecrackedhot, 1),
new ItemStack(ModBlocks.emptycruciblecracked, 1),
2700,
2250,
9000,
600,
0.0f,
@@ -254,7 +408,7 @@ public class ModCrafting {
new ItemStack(ModBlocks.hotcookedironcrucible, 1),
new ItemStack(ModBlocks.failedironcruciblehot, 1),
new ItemStack(ModBlocks.coolironcrucible, 1),
1550,
1400,
1200,
800,
0.33f,
@@ -306,15 +460,202 @@ public class ModCrafting {
new ItemStack(ModBlocks.hotcookedsteelcrucible, 1),
new ItemStack(ModBlocks.failedsteelcrucible, 1),
new ItemStack(ModBlocks.coolsteelcrucible, 1),
1550,
2100,
1500,
1000,
0.2f,
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
@@ -396,7 +737,7 @@ public class ModCrafting {
/***Makes a Hot Iron PickaxeHead***/
ForgeCrafting.addRecipe(
ModItems.pickaxehead,
new ItemStack(ModItems.pickaxehead, 1 ),
new ItemStack(ModItems.pickaxehead, 1),
800,
160,
400,
@@ -407,7 +748,7 @@ public class ModCrafting {
/***Makes a Hot Clean Iron PickaxeHead***/
ForgeCrafting.addRecipe(
ModItems.cleanironpickaxehead,
new ItemStack(ModItems.cleanironpickaxehead, 1 ),
new ItemStack(ModItems.cleanironpickaxehead, 1),
800,
160,
400,
@@ -418,8 +759,8 @@ public class ModCrafting {
/***Makes a Hot Steel PickaxeHead***/
ForgeCrafting.addRecipe(
ModItems.steelpickaxehead,
new ItemStack(ModItems.steelpickaxehead, 1 ),
800,
new ItemStack(ModItems.steelpickaxehead, 1),
1000,
160,
400,
1.0f,
@@ -431,7 +772,7 @@ public class ModCrafting {
/***Makes a Hot Iron AxeHead***/
ForgeCrafting.addRecipe(
ModItems.ironaxehead,
new ItemStack(ModItems.ironaxehead, 1 ),
new ItemStack(ModItems.ironaxehead, 1),
800,
160,
400,
@@ -441,7 +782,7 @@ public class ModCrafting {
/***Makes a Hot Clean Iron AxeHead***/
ForgeCrafting.addRecipe(
ModItems.cleanironaxehead,
new ItemStack(ModItems.cleanironaxehead, 1 ),
new ItemStack(ModItems.cleanironaxehead, 1),
800,
160,
400,
@@ -451,7 +792,7 @@ public class ModCrafting {
/***Makes a Hot Steel AxeHead***/
ForgeCrafting.addRecipe(
ModItems.steelaxehead,
new ItemStack(ModItems.steelaxehead, 1 ),
new ItemStack(ModItems.steelaxehead, 1),
800,
160,
400,
@@ -463,7 +804,7 @@ public class ModCrafting {
/***Makes a Hot Iron ShovelHead***/
ForgeCrafting.addRecipe(
ModItems.ironshovelhead,
new ItemStack(ModItems.ironshovelhead, 1 ),
new ItemStack(ModItems.ironshovelhead, 1),
800,
160,
400,
@@ -473,7 +814,7 @@ public class ModCrafting {
/***Makes a Hot Clean Iron ShovelHead***/
ForgeCrafting.addRecipe(
ModItems.cleanironshovelhead,
new ItemStack(ModItems.cleanironshovelhead, 1 ),
new ItemStack(ModItems.cleanironshovelhead, 1),
800,
160,
400,
@@ -483,7 +824,7 @@ public class ModCrafting {
/***Makes a Hot Steel ShovelHead***/
ForgeCrafting.addRecipe(
ModItems.steelshovelhead,
new ItemStack(ModItems.steelshovelhead, 1 ),
new ItemStack(ModItems.steelshovelhead, 1),
800,
160,
400,
@@ -495,7 +836,7 @@ public class ModCrafting {
/***Makes a Hot Iron HoeHead***/
ForgeCrafting.addRecipe(
ModItems.ironhoehead,
new ItemStack(ModItems.ironhoehead, 1 ),
new ItemStack(ModItems.ironhoehead, 1),
800,
160,
400,
@@ -505,7 +846,7 @@ public class ModCrafting {
/***Makes a Hot Clean Iron HoeHead***/
ForgeCrafting.addRecipe(
ModItems.cleanironhoehead,
new ItemStack(ModItems.cleanironhoehead, 1 ),
new ItemStack(ModItems.cleanironhoehead, 1),
800,
160,
400,
@@ -515,7 +856,7 @@ public class ModCrafting {
/***Makes a Hot Steel HoeHead***/
ForgeCrafting.addRecipe(
ModItems.steelhoehead,
new ItemStack(ModItems.steelhoehead, 1 ),
new ItemStack(ModItems.steelhoehead, 1),
800,
160,
400,
@@ -528,7 +869,7 @@ public class ModCrafting {
ANVILING
******************************************************************************/
String empty = ItemStack.EMPTY.getItem().getRegistryName().toString();
//String empty = ItemStack.EMPTY.getItem().getRegistryName().toString();
String hotChunk = ModItems.ironchunkhot.getRegistryName().toString();
String hotCleanChunk = ModItems.ironcleanchunkhot.getRegistryName().toString();
String hotSteelChunk = ModItems.steelchunkhot.getRegistryName().toString();
@@ -603,6 +944,18 @@ public class ModCrafting {
"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 ***/
AnvilCrafting.addRecipe(
new String[] {
@@ -611,7 +964,7 @@ public class ModCrafting {
empty,empty,diamond,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"
);
@@ -623,10 +976,11 @@ public class ModCrafting {
empty,empty,hotChunk,empty,empty,
empty,hotChunk,hotChunk,hotChunk,empty,
empty,empty,hotChunk,empty,empty },
new ItemStack(ModItems.ironsword, 1),
new ItemStack(ModItems.wroughtirongladius, 1),
"null"
);
/*** Temp Clean Iron Sword ***/
//TODO uncomment this
AnvilCrafting.addRecipe(
new String[] {
empty,empty,empty,empty,empty,
@@ -634,7 +988,7 @@ public class ModCrafting {
empty,empty,hotCleanChunk,empty,empty,
empty,hotCleanChunk,hotCleanChunk,hotCleanChunk,empty,
empty,empty,hotCleanChunk,empty,empty },
new ItemStack(ModItems.cleanironsword, 1),
new ItemStack(ModItems.cleanirongladius, 1),
"null"
);
/*** Temp Steel Sword ***/
@@ -645,9 +999,69 @@ public class ModCrafting {
empty,empty,hotSteelChunk,empty,empty,
empty,hotSteelChunk,hotSteelChunk,hotSteelChunk,empty,
empty,empty,hotSteelChunk,empty,empty },
new ItemStack(ModItems.steelsword, 1),
new ItemStack(ModItems.steelgladius, 1),
"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 ***/
AnvilCrafting.addRecipe(
@@ -657,7 +1071,7 @@ public class ModCrafting {
empty,empty,emerald,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"
);

View File

@@ -1,8 +1,6 @@
package nmd.primal.forgecraft.init;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
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());
}
}

View File

@@ -9,19 +9,20 @@ import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.model.ModelLoader;
import net.minecraftforge.fml.common.registry.GameRegistry;
import net.minecraftforge.fml.common.registry.ForgeRegistries;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import nmd.primal.core.api.PrimalMaterials;
import nmd.primal.forgecraft.ModInfo;
import nmd.primal.forgecraft.items.*;
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.tools.CustomAxe;
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.tools.*;
import nmd.primal.forgecraft.items.weapons.CustomShield;
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.
@@ -29,10 +30,11 @@ import nmd.primal.forgecraft.items.weapons.CustomSword;
public class ModItems {
//public static Item test;
public static Item pistonbellows;
public static Item bellowshandle;
public static Item forgehammer;
public static Item softcrucible;
public static Item stonetongs;
public static Item castingmud;
public static Item ironingotballhot;
public static Item ironchunkhot;
@@ -44,6 +46,12 @@ public class ModItems {
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 ironaxehead;
@@ -66,6 +74,15 @@ public class ModItems {
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 ironaxe;
@@ -87,10 +104,23 @@ public class ModItems {
public static Item wootzshovel;
public static Item wootzhoe;
public static Item ironsword;
public static Item cleanironsword;
public static Item steelsword;
public static Item wootzsword;
public static Item bronzegladius;
public static Item wroughtirongladius;
public static Item cleanirongladius;
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 cleanironshield;
@@ -98,162 +128,261 @@ public class ModItems {
//public static Item wootzshield;
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 void init() {
//OBJLoader.INSTANCE.addDomain(ModInfo.MOD_ID);
pistonbellows = new ItemBellowsHandle();
softcrucible = new ItemSoftCrucible();
//pistonbellows = new ItemBellowsHandle("pistonbellows");
bellowshandle = new BaseItem("bellowshandle");
softcrucible = new ItemSoftCrucible("softcrucible");
stonetongs = new ItemStoneTongs("stonetongs");
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");
/**********
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
**********/
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);
bronzepickaxehead = new BronzeToolPart("bronzepickaxehead", PrimalMaterials.TOOL_BRONZE, 41);
bronzeaxehead = new BronzeToolPart("bronzeaxehead", PrimalMaterials.TOOL_BRONZE, 42);
bronzeshovelhead = new BronzeToolPart("bronzeshovelhead", PrimalMaterials.TOOL_BRONZE, 43);
bronzehoehead = new BronzeToolPart("bronzehoehead", PrimalMaterials.TOOL_BRONZE, 44);
cleanironpickaxehead = new ToolPart("cleanironpickaxehead", PrimalMaterials.TOOL_CLEAN_IRON);
cleanironaxehead = new ToolPart("cleanironaxehead", PrimalMaterials.TOOL_CLEAN_IRON);
cleanironshovelhead = new ToolPart("cleanironshovelhead", PrimalMaterials.TOOL_CLEAN_IRON);
cleanironhoehead = new ToolPart("cleanironhoehead", PrimalMaterials.TOOL_CLEAN_IRON);
pickaxehead = new ToolPart("ironpickaxehead", PrimalMaterials.TOOL_WROUGHT_IRON, 8);
ironaxehead = new ToolPart("ironaxehead", PrimalMaterials.TOOL_WROUGHT_IRON, 9);
ironshovelhead = new ToolPart("ironshovelhead", PrimalMaterials.TOOL_WROUGHT_IRON, 10);
ironhoehead = new ToolPart("ironhoehead", PrimalMaterials.TOOL_WROUGHT_IRON, 11);
steelpickaxehead = new ToolPart("steelpickaxehead", PrimalMaterials.TOOL_BASIC_STEEL);
steelaxehead = new ToolPart("steelaxehead", PrimalMaterials.TOOL_BASIC_STEEL);
steelshovelhead = new ToolPart("steelshovelhead", PrimalMaterials.TOOL_BASIC_STEEL);
steelhoehead = new ToolPart("steelhoehead", PrimalMaterials.TOOL_BASIC_STEEL);
cleanironpickaxehead = new ToolPart("cleanironpickaxehead", PrimalMaterials.TOOL_CLEAN_IRON, 17);
cleanironaxehead = new ToolPart("cleanironaxehead", PrimalMaterials.TOOL_CLEAN_IRON, 18);
cleanironshovelhead = new ToolPart("cleanironshovelhead", PrimalMaterials.TOOL_CLEAN_IRON, 19);
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);
wootzpickaxehead = new ToolPart("wootzpickaxehead", PrimalMaterials.TOOL_WOOTZ_STEEL);
wootzaxehead = new ToolPart("wootzaxehead", PrimalMaterials.TOOL_WOOTZ_STEEL);
wootzshovelhead = new ToolPart("wootzshovelhead", PrimalMaterials.TOOL_WOOTZ_STEEL);
wootzhoehead = new ToolPart("wootzhoehead", PrimalMaterials.TOOL_WOOTZ_STEEL);
/**********
TOOLS
**********/
ironpickaxe = new CustomPickaxe("ironpickaxe", PrimalMaterials.TOOL_WROUGHT_IRON);
ironaxe = new CustomAxe("ironaxe", PrimalMaterials.TOOL_WROUGHT_IRON);
ironshovel = new CustomShovel("ironshovel", PrimalMaterials.TOOL_WROUGHT_IRON);
ironhoe = new CustomHoe("ironhoe", PrimalMaterials.TOOL_WROUGHT_IRON);
bronzepickaxe = new BronzePickaxe("bronzepickaxe", PrimalMaterials.TOOL_BRONZE, bronzepickaxehead);
bronzeaxe = new BronzeAxe("bronzeaxe", PrimalMaterials.TOOL_BRONZE, bronzeaxehead);
bronzeshovel = new BronzeShovel("bronzeshovel", PrimalMaterials.TOOL_BRONZE, bronzeshovelhead);
bronzehoe = new BronzeHoe("bronzehoe", PrimalMaterials.TOOL_BRONZE, bronzehoehead);
cleanironpickaxe = new CustomPickaxe("cleanironpickaxe", PrimalMaterials.TOOL_CLEAN_IRON);
cleanironaxe = new CustomAxe("cleanironaxe", PrimalMaterials.TOOL_CLEAN_IRON);
cleanironshovel = new CustomShovel("cleanironshovel", PrimalMaterials.TOOL_CLEAN_IRON);
cleanironhoe = new CustomHoe("cleanironhoe", PrimalMaterials.TOOL_CLEAN_IRON);
ironpickaxe = new CustomPickaxe("ironpickaxe", PrimalMaterials.TOOL_WROUGHT_IRON, pickaxehead);
ironaxe = new CustomAxe("ironaxe", PrimalMaterials.TOOL_WROUGHT_IRON, ironaxehead);
ironshovel = new CustomShovel("ironshovel", PrimalMaterials.TOOL_WROUGHT_IRON, ironshovelhead);
ironhoe = new CustomHoe("ironhoe", PrimalMaterials.TOOL_WROUGHT_IRON, ironhoehead);
steelpickaxe = new CustomPickaxe("steelpickaxe", PrimalMaterials.TOOL_BASIC_STEEL);
steelaxe = new CustomAxe("steelaxe", PrimalMaterials.TOOL_BASIC_STEEL);
steelshovel = new CustomShovel("steelshovel", PrimalMaterials.TOOL_BASIC_STEEL);
steelhoe = new CustomHoe("steelhoe", PrimalMaterials.TOOL_BASIC_STEEL);
cleanironpickaxe = new CustomPickaxe("cleanironpickaxe", PrimalMaterials.TOOL_CLEAN_IRON, cleanironpickaxehead);
cleanironaxe = new CustomAxe("cleanironaxe", PrimalMaterials.TOOL_CLEAN_IRON, cleanironaxehead);
cleanironshovel = new CustomShovel("cleanironshovel", PrimalMaterials.TOOL_CLEAN_IRON, cleanironshovelhead);
cleanironhoe = new CustomHoe("cleanironhoe", PrimalMaterials.TOOL_CLEAN_IRON, cleanironhoehead);
wootzpickaxe = new CustomPickaxe("wootzpickaxe", PrimalMaterials.TOOL_WOOTZ_STEEL);
wootzaxe = new CustomAxe("wootzaxe", PrimalMaterials.TOOL_WOOTZ_STEEL);
wootzshovel = new CustomShovel("wootzshovel", PrimalMaterials.TOOL_WOOTZ_STEEL);
wootzhoe = new CustomHoe("wootzhoe", PrimalMaterials.TOOL_WOOTZ_STEEL);
steelpickaxe = new CustomPickaxe("steelpickaxe", PrimalMaterials.TOOL_BASIC_STEEL, steelpickaxehead);
steelaxe = new CustomAxe("steelaxe", PrimalMaterials.TOOL_BASIC_STEEL, steelaxehead);
steelshovel = new CustomShovel("steelshovel", PrimalMaterials.TOOL_BASIC_STEEL, steelshovelhead);
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
**********/
ironsword = new CustomSword("ironsword", PrimalMaterials.TOOL_WROUGHT_IRON);
cleanironsword = new CustomSword("ironsword", PrimalMaterials.TOOL_CLEAN_IRON);
steelsword = new CustomSword("ironsword", PrimalMaterials.TOOL_BASIC_STEEL);
wootzsword = new CustomSword("ironsword", PrimalMaterials.TOOL_WOOTZ_STEEL);
bronzegladius = new CustomSword("bronzegladius", PrimalMaterials.TOOL_BRONZE, 5D, 2D);
wroughtirongladius = new CustomSword("wroughtirongladius", PrimalMaterials.TOOL_WROUGHT_IRON, 4.5D, -1.85D);
cleanirongladius = new CustomSword("cleanirongladius", PrimalMaterials.TOOL_CLEAN_IRON, 5D, -1.85D);
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);
/**********
INGOTS AND CHUNKS
**********/
ironingotballhot = new BaseMultiItem("ironingothot", PrimalMaterials.TOOL_WROUGHT_IRON);
ironchunkhot = new BaseMultiItem("ironchunkhot", PrimalMaterials.TOOL_WROUGHT_IRON);
ironcleaningotballhot= new BaseMultiItem("ironcleaningotballhot", PrimalMaterials.TOOL_CLEAN_IRON);
ironcleanchunkhot= new BaseMultiItem("ironcleanchunkhot", PrimalMaterials.TOOL_CLEAN_IRON);
steelingotballhot= new BaseMultiItem("steelingotballhot", PrimalMaterials.TOOL_BASIC_STEEL);
steelchunkhot= new BaseMultiItem("steelchunkhot", PrimalMaterials.TOOL_BASIC_STEEL);
wootzingotballhot= new BaseMultiItem("wootzingotballhot", PrimalMaterials.TOOL_WOOTZ_STEEL);
wootzchunkhot= new BaseMultiItem("wootzchunkhot", PrimalMaterials.TOOL_WOOTZ_STEEL);
ironingotballhot = new BaseMultiItem("ironingothot", PrimalMaterials.TOOL_WROUGHT_IRON, 6);
ironchunkhot = new BaseMultiItem("ironchunkhot", PrimalMaterials.TOOL_WROUGHT_IRON, 7);
ironcleaningotballhot= new BaseMultiItem("ironcleaningotballhot", PrimalMaterials.TOOL_CLEAN_IRON, 15);
ironcleanchunkhot= new BaseMultiItem("ironcleanchunkhot", PrimalMaterials.TOOL_CLEAN_IRON, 16);
steelingotballhot= new BaseMultiItem("steelingotballhot", PrimalMaterials.TOOL_BASIC_STEEL, 24);
steelchunkhot= new BaseMultiItem("steelchunkhot", PrimalMaterials.TOOL_BASIC_STEEL, 25);
wootzingotballhot= new BaseMultiItem("wootzingotballhot", PrimalMaterials.TOOL_WOOTZ_STEEL, 33);
wootzchunkhot= new BaseMultiItem("wootzchunkhot", PrimalMaterials.TOOL_WOOTZ_STEEL, 34);
//forgingmanual = new ItemForgingManual();
//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() {
GameRegistry.register(pistonbellows);
GameRegistry.register(softcrucible);
GameRegistry.register(stonetongs);
GameRegistry.register(forgehammer);
GameRegistry.register(ironingotballhot);
GameRegistry.register(ironchunkhot);
GameRegistry.register(ironcleaningotballhot);
GameRegistry.register(ironcleanchunkhot);
GameRegistry.register(steelingotballhot);
GameRegistry.register(steelchunkhot);
GameRegistry.register(wootzingotballhot);
GameRegistry.register(wootzchunkhot);
//GameRegistry.register(test);
ForgeRegistries.ITEMS.register(castingmud);
ForgeRegistries.ITEMS.register(bellowshandle);
ForgeRegistries.ITEMS.register(softcrucible);
ForgeRegistries.ITEMS.register(stonetongs);
ForgeRegistries.ITEMS.register(forgehammer);
ForgeRegistries.ITEMS.register(ironingotballhot);
ForgeRegistries.ITEMS.register(ironchunkhot);
ForgeRegistries.ITEMS.register(ironcleaningotballhot);
ForgeRegistries.ITEMS.register(ironcleanchunkhot);
ForgeRegistries.ITEMS.register(steelingotballhot);
ForgeRegistries.ITEMS.register(steelchunkhot);
ForgeRegistries.ITEMS.register(wootzingotballhot);
ForgeRegistries.ITEMS.register(wootzchunkhot);
//ForgeRegistries.ITEMS.register(test);
/**********
CASTING PARTS
**********/
ForgeRegistries.ITEMS.register(cast_axe);
ForgeRegistries.ITEMS.register(cast_gladius);
ForgeRegistries.ITEMS.register(cast_hoe);
ForgeRegistries.ITEMS.register(cast_pickaxe);
ForgeRegistries.ITEMS.register(cast_shovel);
/**********
TOOL PARTS
**********/
GameRegistry.register(pickaxehead);
GameRegistry.register(ironaxehead);
GameRegistry.register(ironshovelhead);
GameRegistry.register(ironhoehead);
ForgeRegistries.ITEMS.register(bronzepickaxehead);
ForgeRegistries.ITEMS.register(bronzeaxehead);
ForgeRegistries.ITEMS.register(bronzeshovelhead);
ForgeRegistries.ITEMS.register(bronzehoehead);
GameRegistry.register(cleanironpickaxehead);
GameRegistry.register(cleanironaxehead);
GameRegistry.register(cleanironshovelhead);
GameRegistry.register(cleanironhoehead);
ForgeRegistries.ITEMS.register(pickaxehead);
ForgeRegistries.ITEMS.register(ironaxehead);
ForgeRegistries.ITEMS.register(ironshovelhead);
ForgeRegistries.ITEMS.register(ironhoehead);
GameRegistry.register(steelpickaxehead);
GameRegistry.register(steelaxehead);
GameRegistry.register(steelshovelhead);
GameRegistry.register(steelhoehead);
ForgeRegistries.ITEMS.register(cleanironpickaxehead);
ForgeRegistries.ITEMS.register(cleanironaxehead);
ForgeRegistries.ITEMS.register(cleanironshovelhead);
ForgeRegistries.ITEMS.register(cleanironhoehead);
GameRegistry.register(wootzpickaxehead);
GameRegistry.register(wootzaxehead);
GameRegistry.register(wootzshovelhead);
GameRegistry.register(wootzhoehead);
ForgeRegistries.ITEMS.register(steelpickaxehead);
ForgeRegistries.ITEMS.register(steelaxehead);
ForgeRegistries.ITEMS.register(steelshovelhead);
ForgeRegistries.ITEMS.register(steelhoehead);
ForgeRegistries.ITEMS.register(wootzpickaxehead);
ForgeRegistries.ITEMS.register(wootzaxehead);
ForgeRegistries.ITEMS.register(wootzshovelhead);
ForgeRegistries.ITEMS.register(wootzhoehead);
/**********
TOOLS
**********/
GameRegistry.register(ironpickaxe);
GameRegistry.register(ironaxe);
GameRegistry.register(ironshovel);
GameRegistry.register(ironhoe);
ForgeRegistries.ITEMS.register(bronzepickaxe);
ForgeRegistries.ITEMS.register(bronzeaxe);
ForgeRegistries.ITEMS.register(bronzeshovel);
ForgeRegistries.ITEMS.register(bronzehoe);
GameRegistry.register(cleanironpickaxe);
GameRegistry.register(cleanironaxe);
GameRegistry.register(cleanironshovel);
GameRegistry.register(cleanironhoe);
ForgeRegistries.ITEMS.register(ironpickaxe);
ForgeRegistries.ITEMS.register(ironaxe);
ForgeRegistries.ITEMS.register(ironshovel);
ForgeRegistries.ITEMS.register(ironhoe);
GameRegistry.register(steelpickaxe);
GameRegistry.register(steelaxe);
GameRegistry.register(steelshovel);
GameRegistry.register(steelhoe);
ForgeRegistries.ITEMS.register(cleanironpickaxe);
ForgeRegistries.ITEMS.register(cleanironaxe);
ForgeRegistries.ITEMS.register(cleanironshovel);
ForgeRegistries.ITEMS.register(cleanironhoe);
GameRegistry.register(wootzpickaxe);
GameRegistry.register(wootzaxe);
GameRegistry.register(wootzshovel);
GameRegistry.register(wootzhoe);
ForgeRegistries.ITEMS.register(steelpickaxe);
ForgeRegistries.ITEMS.register(steelaxe);
ForgeRegistries.ITEMS.register(steelshovel);
ForgeRegistries.ITEMS.register(steelhoe);
ForgeRegistries.ITEMS.register(wootzpickaxe);
ForgeRegistries.ITEMS.register(wootzaxe);
ForgeRegistries.ITEMS.register(wootzshovel);
ForgeRegistries.ITEMS.register(wootzhoe);
/**********
WEAPONS
**********/
GameRegistry.register(ironsword);
GameRegistry.register(wroughtironshield);
//GameRegistry.register(matchlockmusket);
ForgeRegistries.ITEMS.register(wroughtirongladius);
ForgeRegistries.ITEMS.register(bronzegladius);
ForgeRegistries.ITEMS.register(cleanirongladius);
ForgeRegistries.ITEMS.register(steelgladius);
//GameRegistry.register(forgingmanual);
ForgeRegistries.ITEMS.register(cleanironlongsword);
ForgeRegistries.ITEMS.register(steellongsword);
ForgeRegistries.ITEMS.register(wroughtironslayer);
ForgeRegistries.ITEMS.register(cleanironslayer);
ForgeRegistries.ITEMS.register(steelslayer);
ForgeRegistries.ITEMS.register(rawlongbow);
ForgeRegistries.ITEMS.register(unstrunglongbow);
ForgeRegistries.ITEMS.register(longbow);
//ForgeRegistries.ITEMS.register(matchlockmusket);
ForgeRegistries.ITEMS.register(brokenbronzetool);
ForgeRegistries.ITEMS.register(brokenwroughtirontool);
ForgeRegistries.ITEMS.register(brokencleanirontool);
ForgeRegistries.ITEMS.register(brokensteeltool);
ForgeRegistries.ITEMS.register(brokenwootztool);
/**********
ARMOR
**********/
//ForgeRegistries.ITEMS.register(testleggings);
//ForgeRegistries.ITEMS.register(forgingmanual);
}
@SideOnly(Side.CLIENT)
public static void registerRenders() {
registerRender(pistonbellows);
registerRender(castingmud);
registerRender(bellowshandle);
registerRender(softcrucible);
registerRender(forgehammer);
registerRender(ironingotballhot);
@@ -264,9 +393,23 @@ public class ModItems {
registerRender(steelchunkhot);
//registerRender(test);
/**********
CASTING PARTS
**********/
registerRender(cast_axe);
registerRender(cast_gladius);
registerRender(cast_hoe);
registerRender(cast_pickaxe);
registerRender(cast_shovel);
/**********
TOOL PARTS
**********/
registerRender(bronzepickaxehead);
registerRender(bronzeaxehead);
registerRender(bronzeshovelhead);
registerRender(bronzehoehead);
registerRender(pickaxehead);
registerRender(ironaxehead);
registerRender(ironshovelhead);
@@ -290,6 +433,11 @@ public class ModItems {
/**********
TOOLS
**********/
registerRender(bronzepickaxe);
registerRender(bronzeaxe);
registerRender(bronzeshovel);
registerRender(bronzehoe);
registerRender(ironpickaxe);
registerRender(ironaxe);
registerRender(ironshovel);
@@ -313,10 +461,39 @@ public class ModItems {
/**********
WEAPONS
**********/
registerRender(ironsword);
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(matchlockmusket);
registerRender(brokenbronzetool);
registerRender(brokenwroughtirontool);
registerRender(brokencleanirontool);
registerRender(brokensteeltool);
registerRender(brokenwootztool);
/**********
ARMOR
**********/
//registerRender(testleggings);
}
@SideOnly(Side.CLIENT)
@@ -355,7 +532,17 @@ public class ModItems {
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_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() {
@@ -452,6 +639,36 @@ public class ModItems {
else if (stack.getTagCompound().getInteger("type") == 29 ) {
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");
}
return new ModelResourceLocation(stack.getItem().getRegistryName(), "inventory");

View File

@@ -12,11 +12,13 @@ public class ModSounds {
public static SoundEvent PISTON_BELLOWS;
public static SoundEvent MUSKET_SHOT;
public static SoundEvent BOW_TWANG;
public static void registerSounds()
{
PISTON_BELLOWS = registerSound("piston_bellows");
MUSKET_SHOT = registerSound("musket_shot");
BOW_TWANG = registerSound("bow_twang");
}
private static SoundEvent registerSound(String name)

View File

@@ -16,6 +16,8 @@ public class ModTiles {
registerTileEntity(TileBaseCrucible.class, "basecrucible");
registerTileEntity(TileAnvil.class, "anvil");
registerTileEntity(TileBreaker.class, "breaker");
registerTileEntity(TileCastingForm.class, "castingform");
registerTileEntity(TileCastingBlock.class, "castingblock");
}
private static void registerTileEntity(Class<? extends TileEntity> tile_class, String baseName) {

View File

@@ -8,8 +8,10 @@ import nmd.primal.forgecraft.ModInfo;
*/
public class BaseItem extends Item
{
public BaseItem()
public BaseItem(String registryName)
{
this.setRegistryName(registryName);
this.setUnlocalizedName(registryName);
this.setCreativeTab(ModInfo.TAB_FORGECRAFT);
}

Some files were not shown because too many files have changed in this diff Show More