cannon_time

This commit is contained in:
KitsuShadow
2016-02-15 22:44:27 -05:00
parent 661ab9e1bc
commit 56f8be5238
39 changed files with 2972 additions and 998 deletions

674
LICENSE
View File

@@ -1,674 +0,0 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, 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
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If 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 convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU 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
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "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 PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM 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 PROGRAM (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 PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
{one line to give the program's name and a brief idea of what it does.}
Copyright (C) {year} {name of author}
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
{project} Copyright (C) {year} {fullname}
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.

View File

@@ -22,7 +22,7 @@ group= "com.yourname.modid" // http://maven.apache.org/guides/mini/guide-naming-
archivesBaseName = "modid" archivesBaseName = "modid"
minecraft { minecraft {
version = "1.7.10-10.13.4.1448-1.7.10" version = "1.7.10-10.13.4.1614-1.7.10"
runDir = "eclipse" runDir = "eclipse"
} }

View File

@@ -1,5 +1,656 @@
Changelog: Changelog:
Build 1448: Build 1614:
LexManos: Fix dispensers equipping armor on players in the wrong slot Closes #1649
Build 1.8.8-11.15.0.1613-1.8.8:
bx9j52xd: Fixed that oldLight is not being used.
Build 1.8.8-11.15.0.1612-1.8.8:
fry: Workaround for https://github.com/google/guava/issues/738
Build 1.8.8-11.15.0.1611-1.8.8:
fry: Fixed orientations of generated item faces. Fixes #2215.
Build 1.8.8-11.15.0.1610-1.8.8:
LexManos: Remove MCP reference patches.
LexManos: Fixed colored leather armor, and custom armor textures.
Build 1.8.8-11.15.0.1609-1.8.8:
cpw: Add a flag to the modidremapping event. If the remapevent is because the registry is refreezing, it'll be true.
Build 1.8.8-11.15.0.1608-1.8.8:
cpw: Clean up chunk patch.
Build 1.8.8-11.15.0.1607-1.8.8:
mark.a.woodman:
Initialize sources list
Fixes crash NPE thrown by addFile()
Build 1.8.8-11.15.0.1606-1.8.8:
cpw: Most requested feature of all time? TileEntity init method called after it's ready to roll. remove all the if (firstTicks)
Build 1.8.8-11.15.0.1605-1.8.8:
cpw:
Fix language adapter loading.
The language adapter is now properly picked up after the mod is loaded
on the classpath, fixing the ClassNotFoundException occurring before.
Also fixed some minor formatting and made it throw a full
RuntimeException on failure.
Fix up some formatting
Build 1.8.8-11.15.0.1604-1.8.8:
cpw: Be noisy when API is in a coremod. It'll never work and modders should realize that fact.
Build 1.8.8-11.15.0.1603-1.8.8:
tehgeek: Allow server to access Potion isBadEffect()
Build 1.8.8-11.15.0.1602-1.8.8:
kashike: Use the FMLSecurityManager checkPermission(Permission) method for context-based permission checks. Fixes #2067
Build 1.8.8-11.15.0.1601-1.8.8:
cpw: Allow entity selectors to select "." in entity names. Closes #2125
Build 1.8.8-11.15.0.1600-1.8.8:
minecrell: Add jline-based console with colors and tab-completion
bernhard.bonigl: Add a PotionRegistry to handle dynamic distribution and remapping of Potion IDs
cpw: Some tweaks - GameRegistry is modder facing API, so avoid having MC methods there. Fix a couple of registry bugs.
cpw: Fixup Jline integration
cpw: A few fixes
Build 1.8.8-11.15.0.1596-1.8.8:
cpw: Fix problem with spam from registry on loading a second world. Empty the staging.
Build 1.8.8-11.15.0.1595-1.8.8:
lumien231: Fixed: The Integrated Server not being stopped when exiting a singleplayer world to the main menu
Build 1.8.8-11.15.0.1594-1.8.8:
LexManos: Add chunk loading protection to WorldSever.getTileEntitiesIn, may prevent orphanced chunks and a CME in EntityPlayerMP. Note: The 'max' parameters are NON-inclusive.
cpw: Fix up blockstate rebuild. Closes #2221. Also fix formatting. IDEA has differences. Solved now.
Build 1.8.8-11.15.0.1592-1.8.8:
cpw: Giant registry fixup
Build 1.8.8-11.15.0.1591-1.8.8:
LexManos: Bump version for new Minecraft version.
LexManos: Fixed placing blocks on snow layers with more then one layer.
LexManos: Fixed Large mushrooms generating incorrectly.
LexManos: Removed IItemRenderer class, all functionality is possible with new rendering system.
LexManos: Compiler warnings pass, undeprecated SplashProgress related stuff.
Build 1.8.8-11.14.4.1590-1.8.8:
cpw: Propogate AbortException. Closes #2206. Also fix tracing printstream when printStackTrace is called.
Build 1.8.8-11.14.4.1589-1.8.8:
cpw: Fix up a couple of patches, affected by the recent update
cpw:
Add .exc for StatList patch
More tweaking
Build 1.8.8-11.14.4.1588-1.8.8:
cpw: Fix button and lever placement problem. Closes #2204
Build 1.8.8-11.14.4.1587-1.8.8:
lordillyohs:
Remove trailing */ in the build.gradle
Signed-off-by: Anthony Anderson <lordillyohs@gmail.com>
Build 1.8.8-11.14.4.1586-1.8.8:
cpw: Cleaning up some derpy names
cpw: More cleanups, some documentation, a bunch of deprecations.
Build 1.8.8-11.14.4.1585-1.8.8:
cpw: Deprecate it as well, because hey, it's redundant now.
cpw: Clean up some very long dead code. Bukkit hasn't existed in a very long time now. IASM never worked, and I'm not about to implement it.
Build 1.8.8-11.14.4.1584-1.8.8:
cpw: ONE EVENT BUS TO RULE THEM ALL AND IN THE DARKNESS FIRE THEM!
Build 1.8.8-11.14.4.1583-1.8.8:
cpw: Fix MDK for 1.8.8 using FG2.1 snapshot
cpw: Yeah, amount is NOT deprecated.
Build 1.8.8-11.14.4.1582-1.8.8:
cpw:
OMG! Documentation? WUT? I haz lost my mind.
Also, Functional interface for IMC. Senders can send a classname implementing Guava's function, and receivers
will be able to get that function, and do, well, whatever, really. Probably best for those callback type
scenarios, connecting up APIs and stuffs.
Build 1.8.8-11.14.4.1581-1.8.8:
cpw: Cleanup Fluid deprecations stuff.
Build 1.8.8-11.14.4.1580-1.8.8:
LexManos: Update universal manifest for 1.8.8's json.
Build 1.8.8-11.14.4.1579-1.8.8:
fry: Fixed NPE is B3D loader caused by the missing vertex normal; updated the example chest model - it's now has 2 meshes; Updated ModelAnimationDebug - it now uses the new chest model, renders the base with the static world renderer, and only the lid with the TESR.
LexManos: Fix incorrect position passes to Block.getExplosionResistance from entities.
LexManos: Moved client side Block.onBlockDestroyed to after Item.onBlockDestroyed to match server order.
LexManos: Enable the normal ModList GUI in game. Use GL_SCISSOR to support the transparent in-game GUI.
Choonster.2010: BiomeManager: Fix off-by-one errors
LexManos: Fix bold font rendering, Unicode is 2x pixel density of normal.
LexManos: Fix invalid position passed to isAir/getLight in World.playAmbientSound
fry: Fixed forge lighting working incorrectly outside 0x1000000 coordinates.
fry: Implemented interpolation of TRSR transformations; B3D: added interpolation capabilities to B3DState, animated TESR example in ModelAnimationTest (pure TESR right now, no separation inside the example model between the static and dynamic parts right now).
fry: B3D loader: removed 2 redundand null checks, changed constructor args to final to fix (java6?) inner arg error.
fry: Fix holes in generated item models.
fry: Removed face doubles from item models.
fry: Fixed forge lighting working incorrectly outside 0x1000000 coordinates.
cpw: Update mappings to 20151122.
Build 1.8-11.14.4.1577:
fry: Implemented interpolation of TRSR transformations; B3D: added interpolation capabilities to B3DState, animated TESR example in ModelAnimationTest (pure TESR right now, no separation inside the example model between the static and dynamic parts right now).
fry: B3D loader: removed 2 redundand null checks, changed constructor args to final to fix (java6?) inner arg error.
fry: Fix holes in generated item models.
fry: Removed face doubles from item models.
fry: Fixed forge lighting working incorrectly outside 0x1000000 coordinates.
Build 1.8.8-11.14.4.1576-1.8.8:
cpw: Fix derpy fir trees in the taiga. So many patches. See if we can find any more mistakes?!
Build 1.8.8-11.14.4.1575-1.8.8:
cpw: Small tweak to the OUT/ERR logger - should skip the Throwable stuffs now.
cpw:
Fix weird patch issue where the this FG commit: https://github.com/MinecraftForge/ForgeGradle/commit/2f0ca9921b961133689d29b807333241010a802d
breaks if the exact end of a line is a srgname. Not ideal, but should work.
Build 1.8-11.14.4.1572:
LexManos: Fix invalid position passed to isAir/getLight in World.playAmbientSound
Build 1.8-11.14.4.1571:
Choonster.2010: BiomeManager: Fix off-by-one errors
Build 1.8-11.14.4.1570:
LexManos: Fix bold font rendering, Unicode is 2x pixel density of normal.
Build 1.8-11.14.4.1569:
LexManos: Enable the normal ModList GUI in game. Use GL_SCISSOR to support the transparent in-game GUI.
Build 1.8-11.14.4.1568:
LexManos: Fix incorrect position passes to Block.getExplosionResistance from entities.
LexManos: Moved client side Block.onBlockDestroyed to after Item.onBlockDestroyed to match server order.
Build Build Artifacts:<ul><li><a href="scp://files.minecraftforge.net/home/files/files.minecraftforge.net/mavennet/minecraftforge/forge/1.7.10-10.13.4.1566-1.7.10/forge-1.7.10-10.13.4.1566-1.7.10-userdev.jar">forge-1.7.10-10.13.4.1566-1.7.10-userdev.jar</a><li><a href="scp://files.minecraftforge.net/home/files/files.minecraftforge.net/mavennet/minecraftforge/forge/1.7.10-10.13.4.1566-1.7.10/forge-1.7.10-10.13.4.1566-1.7.10-src.zip">forge-1.7.10-10.13.4.1566-1.7.10-src.zip</a><li><a href="scp://files.minecraftforge.net/home/files/files.minecraftforge.net/mavennet/minecraftforge/forge/1.7.10-10.13.4.1566-1.7.10/forge-1.7.10-10.13.4.1566-1.7.10-changelog.txt">forge-1.7.10-10.13.4.1566-1.7.10-changelog.txt</a><li><a href="scp://files.minecraftforge.net/home/files/files.minecraftforge.net/mavennet/minecraftforge/forge/1.7.10-10.13.4.1566-1.7.10/forge-1.7.10-10.13.4.1566-1.7.10-installer.jar">forge-1.7.10-10.13.4.1566-1.7.10-installer.jar</a><li><a href="scp://files.minecraftforge.net/home/files/files.minecraftforge.net/mavennet/minecraftforge/forge/1.7.10-10.13.4.1566-1.7.10/forge-1.7.10-10.13.4.1566-1.7.10-universal.jar">forge-1.7.10-10.13.4.1566-1.7.10-universal.jar</a><li><a href="scp://files.minecraftforge.net/home/files/files.minecraftforge.net/mavennet/minecraftforge/forge/1.7.10-10.13.4.1566-1.7.10/forge-1.7.10-10.13.4.1566-1.7.10-installer-win.exe">forge-1.7.10-10.13.4.1566-1.7.10-installer-win.exe</a></ul>:
scott: Add an event hook to allow overriding of fuels recognized by vanilla fuel handling.
Build 1.8-11.14.4.1565:
lumien231: Fix Client Login Issue when logging into a non existent dimension
Build Build Artifacts:<ul><li><a href="scp://files.minecraftforge.net/home/files/files.minecraftforge.net/mavennet/minecraftforge/forge/1.7.10-10.13.4.1564-1.7.10/forge-1.7.10-10.13.4.1564-1.7.10-universal.jar">forge-1.7.10-10.13.4.1564-1.7.10-universal.jar</a><li><a href="scp://files.minecraftforge.net/home/files/files.minecraftforge.net/mavennet/minecraftforge/forge/1.7.10-10.13.4.1564-1.7.10/forge-1.7.10-10.13.4.1564-1.7.10-src.zip">forge-1.7.10-10.13.4.1564-1.7.10-src.zip</a><li><a href="scp://files.minecraftforge.net/home/files/files.minecraftforge.net/mavennet/minecraftforge/forge/1.7.10-10.13.4.1564-1.7.10/forge-1.7.10-10.13.4.1564-1.7.10-installer-win.exe">forge-1.7.10-10.13.4.1564-1.7.10-installer-win.exe</a><li><a href="scp://files.minecraftforge.net/home/files/files.minecraftforge.net/mavennet/minecraftforge/forge/1.7.10-10.13.4.1564-1.7.10/forge-1.7.10-10.13.4.1564-1.7.10-installer.jar">forge-1.7.10-10.13.4.1564-1.7.10-installer.jar</a><li><a href="scp://files.minecraftforge.net/home/files/files.minecraftforge.net/mavennet/minecraftforge/forge/1.7.10-10.13.4.1564-1.7.10/forge-1.7.10-10.13.4.1564-1.7.10-changelog.txt">forge-1.7.10-10.13.4.1564-1.7.10-changelog.txt</a><li><a href="scp://files.minecraftforge.net/home/files/files.minecraftforge.net/mavennet/minecraftforge/forge/1.7.10-10.13.4.1564-1.7.10/forge-1.7.10-10.13.4.1564-1.7.10-userdev.jar">forge-1.7.10-10.13.4.1564-1.7.10-userdev.jar</a></ul>:
LexManos: Fixed skulls not placing on fences like vanilla {Vanilla is buggy -.-} Closes #2185
Build 1.8-11.14.4.1563:
LexManos: Bump version for Recomended Build.
Build 1.8-11.14.3.1562:
LexManos:
Merge pull request #2179 from arideus101/patch-1
Fixed issue where custom colored armor wouldn't be colored. (reverted from commit dee0b2084b519419bbf97d8ad177204830ea2b07)
Build 1.8-11.14.3.1561:
jasondoyle528: Allows Custom Armor Coloring to be done easily
Build 1.8-11.14.3.1560:
gabizou:
Fix a possible NPE when checking supertypes of interfaces. Closes #2176.
Signed-off-by: Gabriel Harris-Rouquette <gabizou@me.com>
Build 1.8-11.14.3.1559:
bjoern:
Fix possible crash in EventBus
There is currently no way to check if an event handler has been registered or not.
But when trying to unregister a not-registered event handler, Minecraft crashes with a NullPointerException.
This is a simple fix to prevent such crashes.
cpw: Fix substitutions for recipes and oredict recipes. Should mean that substitutions start working properly.
cpw:
OreDictionary will warn if there's an invalid ore being registered now, rather than just
using -1 and doing weird things with the list as a result.
cpw: Two more corner cases in the oredictionary. Should work for all cases now.
cpw:
Fix firing the remap event. It always fires now, and additionally fires when the registry reverts to frozen.
Most mods refer to the gameregistry for ids they care about, so this shouldn't affect anything significantly,
but if your mod was dependent on their being content in the remap event, and only acting on that content,
empty content means it's "reverted to frozen" state - the state at the start of the game.
Build Build Artifacts:<ul><li><a href="scp://files.minecraftforge.net/home/files/files.minecraftforge.net/mavennet/minecraftforge/forge/1.7.10-10.13.4.1558-1.7.10/forge-1.7.10-10.13.4.1558-1.7.10-src.zip">forge-1.7.10-10.13.4.1558-1.7.10-src.zip</a><li><a href="scp://files.minecraftforge.net/home/files/files.minecraftforge.net/mavennet/minecraftforge/forge/1.7.10-10.13.4.1558-1.7.10/forge-1.7.10-10.13.4.1558-1.7.10-userdev.jar">forge-1.7.10-10.13.4.1558-1.7.10-userdev.jar</a><li><a href="scp://files.minecraftforge.net/home/files/files.minecraftforge.net/mavennet/minecraftforge/forge/1.7.10-10.13.4.1558-1.7.10/forge-1.7.10-10.13.4.1558-1.7.10-changelog.txt">forge-1.7.10-10.13.4.1558-1.7.10-changelog.txt</a><li><a href="scp://files.minecraftforge.net/home/files/files.minecraftforge.net/mavennet/minecraftforge/forge/1.7.10-10.13.4.1558-1.7.10/forge-1.7.10-10.13.4.1558-1.7.10-installer.jar">forge-1.7.10-10.13.4.1558-1.7.10-installer.jar</a><li><a href="scp://files.minecraftforge.net/home/files/files.minecraftforge.net/mavennet/minecraftforge/forge/1.7.10-10.13.4.1558-1.7.10/forge-1.7.10-10.13.4.1558-1.7.10-installer-win.exe">forge-1.7.10-10.13.4.1558-1.7.10-installer-win.exe</a><li><a href="scp://files.minecraftforge.net/home/files/files.minecraftforge.net/mavennet/minecraftforge/forge/1.7.10-10.13.4.1558-1.7.10/forge-1.7.10-10.13.4.1558-1.7.10-universal.jar">forge-1.7.10-10.13.4.1558-1.7.10-universal.jar</a></ul>:
cpw:
Fix firing the remap event. It always fires now, and additionally fires when the registry reverts to frozen.
Most mods refer to the gameregistry for ids they care about, so this shouldn't affect anything significantly,
but if your mod was dependent on their being content in the remap event, and only acting on that content,
empty content means it's "reverted to frozen" state - the state at the start of the game.
Build Build Artifacts:<ul><li><a href="scp://files.minecraftforge.net/home/files/files.minecraftforge.net/mavennet/minecraftforge/forge/1.7.10-10.13.4.1557-1.7.10/forge-1.7.10-10.13.4.1557-1.7.10-installer-win.exe">forge-1.7.10-10.13.4.1557-1.7.10-installer-win.exe</a><li><a href="scp://files.minecraftforge.net/home/files/files.minecraftforge.net/mavennet/minecraftforge/forge/1.7.10-10.13.4.1557-1.7.10/forge-1.7.10-10.13.4.1557-1.7.10-universal.jar">forge-1.7.10-10.13.4.1557-1.7.10-universal.jar</a><li><a href="scp://files.minecraftforge.net/home/files/files.minecraftforge.net/mavennet/minecraftforge/forge/1.7.10-10.13.4.1557-1.7.10/forge-1.7.10-10.13.4.1557-1.7.10-changelog.txt">forge-1.7.10-10.13.4.1557-1.7.10-changelog.txt</a><li><a href="scp://files.minecraftforge.net/home/files/files.minecraftforge.net/mavennet/minecraftforge/forge/1.7.10-10.13.4.1557-1.7.10/forge-1.7.10-10.13.4.1557-1.7.10-userdev.jar">forge-1.7.10-10.13.4.1557-1.7.10-userdev.jar</a><li><a href="scp://files.minecraftforge.net/home/files/files.minecraftforge.net/mavennet/minecraftforge/forge/1.7.10-10.13.4.1557-1.7.10/forge-1.7.10-10.13.4.1557-1.7.10-installer.jar">forge-1.7.10-10.13.4.1557-1.7.10-installer.jar</a><li><a href="scp://files.minecraftforge.net/home/files/files.minecraftforge.net/mavennet/minecraftforge/forge/1.7.10-10.13.4.1557-1.7.10/forge-1.7.10-10.13.4.1557-1.7.10-src.zip">forge-1.7.10-10.13.4.1557-1.7.10-src.zip</a></ul>:
cpw: Two more corner cases in the oredictionary. Should work for all cases now.
Build 1.8-11.14.3.1556:
LexManos: Fixed Open url confirm screen not showing URL.
LexManos: Fixed Stronghold Library not having anything in it's chests.
Build 1.8-11.14.3.1555:
diesieben07: Fix GameData.findBlock
Build 1.8-11.14.3.1554:
fry: Fixed anaglyph transformation not being applied in the forge lighting fully.
Build 1.8-11.14.3.1553:
fry: Provide ItemCameraTransforms for vanilla models when possible.
Build 1.8-11.14.3.1552:
fry: OBJ loader: reworked texture resolution: keys now have to start with #, like every other model loader; models without explicit library now work, remapping is possible by using the key "#OBJModel.Default.Texture.Name"; in addition to remapping by material name, remapping by texture name works too, like in other model formats.
Build 1.8-11.14.3.1551:
fry: Performace fix for item rendering.
Build 1.8-11.14.3.1550:
Choonster.2010:
Fix texture error message for broken textures
-- Fixes #2100
-- Iterates over badTextureDomains instead of missingTextures.keySet()
as a domain can have broken textures without any missing textures
Build 1.8-11.14.3.1549:
fry: Obj loader: fix vertices shared between faces having the same attributed (uvs/normals).
the.f1repl4ce: Fixed a bug that caused the config option name to overlap with the selectable values when using GuiConfigEntries.SelectValueEntry, fixes #2114
fry: OBJ model: use original vertex material when defining face.
fry: Fixed block color multiplier not being cached properly in the forge renderer, performance improvement.
LexManos: Merge FML and Forge lang file, and update crowdin project.
LexManos:
Redesign the ModList GUI to use a scrolling list for the main body content.
Allowing for larger information to be displayed.
URLs are auto-detected and now clickable.
Mod Logos are now centered, it looks better.
LexManos:
Introduce a new centralized version checking system.
Using the @Mod annotation mods can opt-in to a centrally controlled update system.
This is PURELY a notification system and will NOT automatically download any updates.
The End User can control which mods check for updates and disabel the system entirely using the Forge Config and GUI.
Format for the json the URL must point to is described here: https://gist.github.com/LexManos/7aacb9aa991330523884
Build 1.8-11.14.3.1543:
fry: Fix color multiplier applied incorrectly for items.
fry: OBJ loader: fixed another whitespace-related issue; removed unused "modifyUVs" property for now; added the "flip-v" property to switch between OpenGL-style and DirextX-style model UVs; fixed normals - they are now correct in-world, still a bit strange for the items; fixed normals a little bit for B3D models too.
Build Build Artifacts:<ul><li><a href="scp://files.minecraftforge.net/home/files/files.minecraftforge.net/mavennet/minecraftforge/forge/1.7.10-10.13.4.1541-1.7.10/forge-1.7.10-10.13.4.1541-1.7.10-userdev.jar">forge-1.7.10-10.13.4.1541-1.7.10-userdev.jar</a><li><a href="scp://files.minecraftforge.net/home/files/files.minecraftforge.net/mavennet/minecraftforge/forge/1.7.10-10.13.4.1541-1.7.10/forge-1.7.10-10.13.4.1541-1.7.10-installer.jar">forge-1.7.10-10.13.4.1541-1.7.10-installer.jar</a><li><a href="scp://files.minecraftforge.net/home/files/files.minecraftforge.net/mavennet/minecraftforge/forge/1.7.10-10.13.4.1541-1.7.10/forge-1.7.10-10.13.4.1541-1.7.10-installer-win.exe">forge-1.7.10-10.13.4.1541-1.7.10-installer-win.exe</a><li><a href="scp://files.minecraftforge.net/home/files/files.minecraftforge.net/mavennet/minecraftforge/forge/1.7.10-10.13.4.1541-1.7.10/forge-1.7.10-10.13.4.1541-1.7.10-changelog.txt">forge-1.7.10-10.13.4.1541-1.7.10-changelog.txt</a><li><a href="scp://files.minecraftforge.net/home/files/files.minecraftforge.net/mavennet/minecraftforge/forge/1.7.10-10.13.4.1541-1.7.10/forge-1.7.10-10.13.4.1541-1.7.10-src.zip">forge-1.7.10-10.13.4.1541-1.7.10-src.zip</a><li><a href="scp://files.minecraftforge.net/home/files/files.minecraftforge.net/mavennet/minecraftforge/forge/1.7.10-10.13.4.1541-1.7.10/forge-1.7.10-10.13.4.1541-1.7.10-universal.jar">forge-1.7.10-10.13.4.1541-1.7.10-universal.jar</a></ul>:
cpw:
OreDictionary will warn if there's an invalid ore being registered now, rather than just
using -1 and doing weird things with the list as a result.
Build Build Artifacts:<ul><li><a href="scp://files.minecraftforge.net/home/files/files.minecraftforge.net/mavennet/minecraftforge/forge/1.7.10-10.13.4.1539-1.7.10/forge-1.7.10-10.13.4.1539-1.7.10-installer.jar">forge-1.7.10-10.13.4.1539-1.7.10-installer.jar</a><li><a href="scp://files.minecraftforge.net/home/files/files.minecraftforge.net/mavennet/minecraftforge/forge/1.7.10-10.13.4.1539-1.7.10/forge-1.7.10-10.13.4.1539-1.7.10-changelog.txt">forge-1.7.10-10.13.4.1539-1.7.10-changelog.txt</a><li><a href="scp://files.minecraftforge.net/home/files/files.minecraftforge.net/mavennet/minecraftforge/forge/1.7.10-10.13.4.1539-1.7.10/forge-1.7.10-10.13.4.1539-1.7.10-universal.jar">forge-1.7.10-10.13.4.1539-1.7.10-universal.jar</a><li><a href="scp://files.minecraftforge.net/home/files/files.minecraftforge.net/mavennet/minecraftforge/forge/1.7.10-10.13.4.1539-1.7.10/forge-1.7.10-10.13.4.1539-1.7.10-userdev.jar">forge-1.7.10-10.13.4.1539-1.7.10-userdev.jar</a><li><a href="scp://files.minecraftforge.net/home/files/files.minecraftforge.net/mavennet/minecraftforge/forge/1.7.10-10.13.4.1539-1.7.10/forge-1.7.10-10.13.4.1539-1.7.10-src.zip">forge-1.7.10-10.13.4.1539-1.7.10-src.zip</a><li><a href="scp://files.minecraftforge.net/home/files/files.minecraftforge.net/mavennet/minecraftforge/forge/1.7.10-10.13.4.1539-1.7.10/forge-1.7.10-10.13.4.1539-1.7.10-installer-win.exe">forge-1.7.10-10.13.4.1539-1.7.10-installer-win.exe</a></ul>:
diesieben07: Fix CME when entities are spawned from EntityJoinWorldEvent
bernhard.bonigl: Fix Potion IDs above 127
Abrar Syed: Update FG version to 2.0.2
fry: Changed how the forge lighting system handles holey models for opaque blocks; it now mimics vanilla behaviour, which allows light to pass through them.
fry: Fix for the previous commit - transparent blocks were handled improperly.
glstillman: OBJLoader: Quick bandages to support/fix the new way that face/vertex normals are calculated, a very quick bandage to patch TextureCoordinates for the time being, and the Parser now uses a Pattern to split strings on whitespace instead of only splitting on " ".
cpw: Fix substitutions for recipes and oredict recipes. Should mean that substitutions start working properly.
Build 1.8-11.14.3.1532:
fry: Fixed normal calculation for vanilla models, fixed the grass darkening and simular issues.
fry: More lighting fixes, flat lighting now works correctly for grass and torches.
Build 1.8-11.14.3.1530:
fry: Fixed piston rendering (WorldRenderer offset wasn't applied); fixed TESR being registered too early in one of the debug mods.
Build 1.8-11.14.3.1529:
glstillman: Fixed a bug with item model loading that would occur if ModelBakery.addVariantName() was called with the same string location parameter for 2 different items, and the string pointed to a location that didn't exist, where ModelLoader.loadAnyModel() would substitute the blockdefinition in for the item model, but wouldn't remove the original input location from the loadingModels list, which would cause the location from the second call to throw an IllegalStateException even though that location now has a model.
fry:
Perspective awareness for vanilla and multi models, fixes #2148.
Improved error handling in MultiModel.
fry: Fixed generic bug in MultiModel
fry: Fixed AO being applied to OBJ model transparency, and OBJ loader trying to force the loading of the builtin white texture.
fry: Provide a IModel for "builtin/generated", fixes #2147
fry: Fixed another generic issue in MultiModel.
Build 1.8-11.14.3.1525:
fry: Small fix for reworked classic lighting
Build 1.8-11.14.3.1524:
fry: Added OBJ loader for the ModelLoaderRegistry system.
Build 1.8-11.14.3.1523:
fry:
Model pipeline system.
Should replace all ad-hoc quad generation methods in forge, and make IBakedModel -> WorldRenderer data transfer faster. Added IVertexConsumer + helper classes; lighting that works correctly for non-axis-aligned faces using the new infrastructure. Changed smooth lighting algorithm, now it should work correctly for everything.
New block lighter can be disabled in the forge config options.
fry: Added back in the lost class
Build 1.8-11.14.3.1521:
simonbarnes1:
Add Guava and Apache to LaunchClassLoader exclusion list on server
Move exclusions to common place. Less likely to get out of sync
Build 1.8-11.14.3.1520:
bk1325: Add PlayerSetSpawnEvent
Build 1.8-11.14.3.1519:
fry: '#' is now added automatically to the beginning of the texture names in B3D models, and the remapping is expected via the blockstate JSON, since it's more reasonable than adding it to the file name in the modelling program or matching the resource location with the filename.
Build 1.8-11.14.3.1518:
fry: Fixes Attributes.transform affecting only 1 vertex.
Build 1.7.10-10.13.4.1517-1.7.10:
bjoern:
Fix possible crash in EventBus
There is currently no way to check if an event handler has been registered or not.
But when trying to unregister a not-registered event handler, Minecraft crashes with a NullPointerException.
This is a simple fix to prevent such crashes.
Build 1.8-11.14.3.1516:
luacs1998: Fix a possible crash in EventBus
Build 1.8-11.14.3.1515:
rubensworks: Fix dispenser action for modded spawn eggs
Build 1.8-11.14.3.1514:
LexManos: Update Gradle wrapper to 2.7
LexManos: Fix entity count being incorrect for spawning logic. Now filter out 'persistant' entities.
Build 1.8-11.14.3.1513:
foka_12: Disallow conflicting furnace recipes
Build 1.8-11.14.3.1512:
fry: Workaround for MinecraftForge/ForgeGradle#256
Build 1.8-11.14.3.1511:
cpw:
FMLNetworkHandler.openGui should not try and open a GUI on a FakePlayer.
Fixes #2082 and probably dozens of mod errors. Also, side benefit of the
merged codebase! FML code can ref Forge code!
Build 1.8-11.14.3.1510:
laci200270: Update FMLSecurityManager.java
cpw: Format a bit better
Build 1.8-11.14.3.1509:
fry: Much requested temporary hack for items and TESRs. Context: #1582, #1597, #1713, #2058 and others.
Build 1.8-11.14.3.1508:
vorquel: Fix faulty Channel name
Build 1.8-11.14.3.1507:
simonbarnes1: Use already provided profile for the player's own skin
Build 1.8-11.14.3.1506:
cpw:
More cleanup of the default eclipse workspace. The project is now called "MDKExample" not "Minecraft".
The project tree is now contemporary, instead of a copy from 1.5.x era MC. The launches are cleaned up, and refer to
a better default "runDir" of "run" rather than "eclipse".. Updating to FG2.0.1 which will contain relevant binary fixes.
Build 1.8-11.14.3.1505:
cpw: Fix eclipse workspace inside the mdk - don't run it through the tokenconverter. Also add in CREDITS-fml.txt to the MDK - it's still required.
Build 1.8-11.14.3.1504:
LexManos:
Fixed issue where config folder would not be created before SplashProgress tried to read from it.
Default macs to disable the new loading screen due to to many macs having issues.
Users can enable it again by editing their config.
Catch and gracefully handle more errors when starting up the Splash Screen.
Build 1.8-11.14.3.1503:
diesieben07: Re-introduce RenderBlockOverlayEvent, seems to have been missed during 1.8 update
Abrar Syed: removed broken and duplicate AT lines
Abrar Syed: added hardcoded fml version file
Abrar Syed: DeobfuscationData no longer required at dev time
Abrar Syed: removed old unnecessary stuff
Abrar Syed: Added FG2 buildscript + updated for Gradle 2.4
Abrar Syed: added jenkins compat tasks
Abrar Syed: fixed local-building fail with changelog
Abrar Syed: updated installed gradle. not finished
Abrar Syed: fixed deployment credentials
cpw: FML is no more. FML has ceased to be. FML's expired and gone to meet its maker. FML's a stiff! Bereft of life, FML rests in peace.
cpw: Vestigal fml-ectomy.
cpw:
FML's metabolic processes are now history. FML's off the twig. FML's kicked the bucket, FML's shuffled off this mortal coil,
run down the curtain and joined the bleedin' choir invisible!! THIS IS AN EX-PROJECT!
Abrar Syed: added MDK package
cpw: Fix MDK task - it now runs.
cpw: The final nail in the coffin. BYE!
cpw:
Trying to fix the MDK to include gradle wrapper, but the gradle-wrapper.jar is
corrupted. @AbrarSyed can you take a look?
cpw:
Fix packaging the gradle wrapper properly. There is still a problem with
the MDK- it fails to run setupDecompWorkspace.
Filed an issue at ForgeGradle, since this seems to be something FG2 shouldn't
be doing, but is?
https://github.com/MinecraftForge/ForgeGradle/issues/235
cpw: Remove patches
cpw: Fix ciWriteBuildNumber task. Ugly, but it works.
cpw: Fix crowdin task. Good luck jenkins, lets roll!
cpw: Fix crowdin again. Run, jenkins, for god's sake, run!
LexManos: Update gradle wrapper and fix changelog task.
Build 1.8-11.14.3.1502:
cpw: ObjectHolder works great, but it should be a lot less spammy about failed lookups. They're usually mod options.
cpw: Actually rebuild the fluidNames each rebuild, don't just try and force changes in. Should fix #1973
cpw:
Wake up the FluidRegistry before any mods start loading. Should stop mods claiming to own water or lava (depending on who accessed
FluidRegistry first)
cpw: Be a little bit more helpful when the ObjectHolder misses. Should help figure out what is going in in #2006
cpw: Cherry pick some changes from 1.8 for inner class discovery, also fix the negativecache. Closes #1872
Build 1.8-11.14.3.1501:
LexManos: Fix placing skulls on fence posts. Closes #2055
Build 1.8-11.14.3.1500:
starbuck: Fix harvest logic running in addition to shearable logic
Build 1.8-11.14.3.1499:
glstillman: Fixed a bug with ExtendedBlockStates containing at least one IProperty and one IUnlistedProperty not allowing blocks to be placed.
Build 1.8-11.14.3.1498:
liach: Add an EnumHelper hook and fixed an issue
Build 1.8-11.14.3.1497:
simonbarnes1: Fix placing signs with NBT prompting for text
Build 1.8-11.14.3.1496:
Zaggy1024:
Fixed a Forge blockstates json removing models causing an NPE in the loader.
Fixed the deep clone of a V1 Variant not cloning the submodels properly.
Build 1.8-11.14.3.1495:
clienthax: Signed-off-by: Clienthax <clienthax@gmail.com>
Build 1.8-11.14.3.1494:
rubensworks: Make EnumFacing events available server-side
Build 1.8-11.14.3.1493:
rubensworks: Fix source block check for BlockFluidClassic
Build 1.7.10-10.13.4.1492-1.7.10:
cpw: Cherry pick some changes from 1.8 for inner class discovery, also fix the negativecache. Closes #1872
Build 1.8-11.14.3.1491:
diesieben07: Allow the new entity eggs to be created via middle-click
Build 1.7.10-10.13.4.1490-1.7.10:
cpw: Actually rebuild the fluidNames each rebuild, don't just try and force changes in. Should fix #1973
cpw:
Wake up the FluidRegistry before any mods start loading. Should stop mods claiming to own water or lava (depending on who accessed
FluidRegistry first)
cpw: Be a little bit more helpful when the ObjectHolder misses. Should help figure out what is going in in #2006
Build 1.8-11.14.3.1487:
fry: Custom transformations in forge blockstate json.
Build 1.8-11.14.3.1486:
LexManos: Fixed ItemMonsterPlacer.getEggInfo missing return. Closes #1975
Build 1.8-11.14.3.1485:
jadran.kotnik: Fixed error GUIs showing a white screen and replaced a rogue direct GL call.
Build 1.8-11.14.3.1484:
izooDee5: Fix particle texture of the generated item models.
Build 1.8-11.14.3.1483:
bernhard.bonigl: Fix StateMap always mapping properties to the "minecraft" domain instead of the mods, causing it to not find BlockState definitions.
Build 1.8-11.14.3.1482:
LexManos: Add debug for max texture size and output when Texture Atlas can not stitch all textures.
Build 1.7.10-10.13.4.1481-1.7.10:
cpw: ObjectHolder works great, but it should be a lot less spammy about failed lookups. They're usually mod options.
Build 1.8-11.14.3.1480:
LexManos: More descripotive error if Patcher is passed invalid data for vanilla classes.
Build 1.8-11.14.3.1479:
fry: Fixed perspective transformations for item models.
fry: Vanilla models can now use custom textures. Fixes #1962
fry: There's no Map.getOrDefault in java6.
Build 1.8-11.14.3.1476:
LexManos: Fix AT for Block constructor.
Build 1.8-11.14.3.1475:
fry: Added ItemLayerModel - less awkward, simpler and faster version of ItemModelGenerator.
Build 1.8-11.14.3.1474:
LexManos: Throw more descriptive errors when mods attempt to register invalid global entity IDs.
LexManos: Include the thread state in the potential error handleing for SplashProgress.
LexManos: Fixed Wavefront Object Importer reading files with integer values. Closes #1651, #1654
LexManos: Create config folder in SplashProgress if it does not exist.
LexManos: Add the stitching allocation stage to loading screen.
LexManos:
Make TextureMap for items and blocks skip the first pass of loading/stitching textures.
Should decrease loading times for large packs.
May cause issues with some mods so use -Dfml.skipFirstTextureLoad=false to disable.
LexManos: Add TextureManager to loading screen.
LexManos: Time each bar in the loading screen and print it to the log, useful information to see where most time is spent in loading.
cpw:
Mods that are extracted to the mods dir by unzipping or whatever will now cause the game to crash. Too much info is in the META-INF now,
and more will be being added. Extracting to the mods dir just completely breaks that.
Build 1.8-11.14.3.1473:
jamioflan:
Added CameraSetup sub-event for camera angles
Allows players to alter yaw and pitch of renderViewEntity, but more importantly, adds the ability to roll the view.
Added camera roll hook
Build 1.7.10-10.13.4.1472-1.7.10:
michafla: fix logic for guessing mesa tag in biome dict
cpw:
Mods that are extracted to the mods dir by unzipping or whatever will now cause the game to crash. Too much info is in the META-INF now,
and more will be being added. Extracting to the mods dir just completely breaks that.
Build 1.7.10-10.13.4.1470-1.7.10:
LexManos: Add TextureManager to loading screen.
LexManos: Time each bar in the loading screen and print it to the log, useful information to see where most time is spent in loading.
Build 1.7.10-10.13.4.1469-1.7.10:
LexManos: Create config folder in SplashProgress if it does not exist.
LexManos: Add the stitching allocation stage to loading screen.
LexManos:
Make TextureMap for items and blocks skip the first pass of loading/stitching textures.
Should decrease loading times for large packs.
May cause issues with some mods so use -Dfml.skipFirstTextureLoad=false to disable.
Build 1.8-11.14.3.1468:
LexManos: Patch line number update. Ignore this.
LexManos:
New system in EntityRegistry to allow modders to register spawn eggs.
For entites that do not use the global ID system.
{Which no mod entity should}
Vanilla spawn eggs will now detect a 'entity_name' entry in it's NBT data and use that for spawning/rendering.
Build 1.8-11.14.3.1467:
foka_12: Change permission levels on ore recipes parameters
Build 1.8-11.14.3.1466:
foka_12:
Fixed NPE when calling canBrew
Oversight on my part,
If the ingredient doesn't return true in Item.isPotionIngredient, Items.potionitem.getEffects(stack) returns null, causing an NPE to be thrown later on.
This invalidates #1947.
Build 1.8-11.14.3.1465:
LexManos: Use Guava instead of Nio for J6 compatibility.
Build 1.8-11.14.3.1464:
fry: Added fluid renderer.
Build 1.8-11.14.3.1463:
LexManos: Make Item.shouldCauseReequipAnimation is bit more precise and copy over the new item for rendering even if the animation is diabled.
Build 1.8-11.14.3.1462:
LexManos: Add vanilla block rotation support back in for certain blocks that were missed in 1.8 update. Closes #1903
Build 1.8-11.14.3.1461:
xxmicloxx: Bugfix for B3DLoader
Build 1.8-11.14.3.1460:
dan:
Fix incorrect block position in BlockReed canPlaceBlockAt
block.canSustainPlant is called on the wrong block position. It should be called on the block below (the 'soil' block).
Build 1.8-11.14.3.1459:
tehgeek: Add GuiScreenEvents for keyboard and mouse input
Build 1.8-11.14.3.1458:
t.tomkins:
Player sensitive version of Block.getPickBlock
Block.getPickBlock was patched in 1.7 but was overlooked in 1.8.
Closes: https://github.com/MinecraftForge/MinecraftForge/issues/1709
LexManos: Add Item.shouldCauseReequipAnimation to allow modders more control over the 'Reequip' animation.
Build 1.8-11.14.3.1457:
LexManos: Fixed compile issues with irtimaled's PR.
Build 1.7.10-10.13.4.1456-1.7.10:
irtimaled:
Copy fortress.dat from vanilla location
Fixes #1747
If the dat file isn't in the dimension specific folder but is present in the vanilla data folder then copy it over.
LexManos: Make FML Gui classes use GlStateManager. Closes FML#615
LexManos: Fixed Wavefront Object Importer reading files with integer values. Closes #1651, #1654
Build 1.8-11.14.3.1453:
LexManos: Cleanup code format in LayerBreakingTest.
LexManos: Fixup model loading errors not being printed by making ICustomModelLoader.loadModel propogate IOExceptions as needed.
Build 1.7.10-10.13.4.1452-1.7.10:
LexManos: Include the thread state in the potential error handleing for SplashProgress.
Build 1.7.10-10.13.4.1451-1.7.10:
LexManos: Throw more descriptive errors when mods attempt to register invalid global entity IDs.
Build 1.8-11.14.3.1450:
LexManos: Bump version for new RB.
LexManos: Cleanup some spammy output.
LexManos: Quiet ClassPatchManager debug spam by default. Reenable using -Dfml.debugClassPatchManager=true.
LexManos: Quiet FMLControlledNamespacedRegistry debug spam by default. Reenable using -Dfml.debugRegistryEntries=true.
LexManos: Quiet CrashReport class pre-loading debug, no flag to re-enable.
LexManos: Cleanup mod signature data table. Easily seperating those mods with signatures vs those with none.
LexManos: Cleanup mod state dump to be easier to read by displaying the states in abreviation and placing them before the mod info.
Build 1.8-11.14.3.1449:
clarsson: Fixing two IndexOutBoundsExceptions from the BiomeDictionary
Build 1.7.10-10.13.4.1448-1.7.10:
LexManos: Cleanup mod state dump to be easier to read by displaying the states in abreviation and placing them before the mod info. LexManos: Cleanup mod state dump to be easier to read by displaying the states in abreviation and placing them before the mod info.
Build 1.7.10-10.13.4.1447-1.7.10: Build 1.7.10-10.13.4.1447-1.7.10:
@@ -1382,7 +2033,7 @@ Build 1.7.10-10.13.1.1220:
jadran.kotnik: Prevent client only commands from bleeding through to the server. jadran.kotnik: Prevent client only commands from bleeding through to the server.
Build 1.7.10-10.13.1.1219: Build 1.7.10-10.13.1.1219:
jdroque: bloodshot:
Added PlaceEvent and MultiPlaceEvent which fires before placing a block. Added PlaceEvent and MultiPlaceEvent which fires before placing a block.
Before calling "ItemStack.tryPlaceItemInWorld", a recording flag is turned on for Before calling "ItemStack.tryPlaceItemInWorld", a recording flag is turned on for
@@ -1763,7 +2414,7 @@ Build 1.7.10-10.13.0.1156:
LexManos: Fix creative inventory tabs not blending base don items rendered. Closes #1179 LexManos: Fix creative inventory tabs not blending base don items rendered. Closes #1179
Build 1.7.10-10.13.0.1153: Build 1.7.10-10.13.0.1153:
jdroque: bloodshot:
Fixed wrong method call in ChunkIOProvider. Fixed wrong method call in ChunkIOProvider.
When a chunk fails to load async, we fallback to the original sync method. When a chunk fails to load async, we fallback to the original sync method.
@@ -1910,7 +2561,7 @@ Build 1.7.2-10.12.2.1125:
LexManos: Fixed vines generation for hanging off of trees. LexManos: Fixed vines generation for hanging off of trees.
Build 1.7.2-10.12.2.1124: Build 1.7.2-10.12.2.1124:
jdroque: bloodshot:
Don't call ChunkDataEvent.Load async Don't call ChunkDataEvent.Load async
ChunkDataEvent.Load must be called after TE's are loaded since this is ChunkDataEvent.Load must be called after TE's are loaded since this is
@@ -1918,7 +2569,7 @@ Build 1.7.2-10.12.2.1124:
callStage2. callStage2.
Build 1.7.2-10.12.2.1123: Build 1.7.2-10.12.2.1123:
jdroque: bloodshot:
Load chunks asynchronously for players. Load chunks asynchronously for players.
When a player triggers a chunk load via walking around or teleporting When a player triggers a chunk load via walking around or teleporting
@@ -2737,7 +3388,7 @@ Build 1.7.2-10.12.0.967:
MinecraftForge/FML@31ea100b29dfdb4fc907e212c3d49a5240ca72a9 Working on id missing handling MinecraftForge/FML@31ea100b29dfdb4fc907e212c3d49a5240ca72a9 Working on id missing handling
MinecraftForge/FML@3e76dfba34aaba4397fc3fb2bd28e0d1f0abe3e4 More tweaking on id stuffs at worldload MinecraftForge/FML@3e76dfba34aaba4397fc3fb2bd28e0d1f0abe3e4 More tweaking on id stuffs at worldload
MinecraftForge/FML@f860c8ad3bc7537f885b27c7f045b5b1140c05f4 bump to legacy launcher 1.9 with logging unification stuffs. MinecraftForge/FML@f860c8ad3bc7537f885b27c7f045b5b1140c05f4 bump to legacy launcher 1.9 with logging unification stuffs.
jdroque: bloodshot:
Refactored BiomeManager stronghold add/remove methods to support new Refactored BiomeManager stronghold add/remove methods to support new
MapGenStronghold dynamic biome changes. MapGenStronghold dynamic biome changes.
@@ -4098,7 +4749,7 @@ Build 1.5.2-7.8.0.713:
MinecraftForge/FML@edc1fb24e2cad9badd2dd18ccccd590d77156e18 Send the "suspect list", and print the suspect versions MinecraftForge/FML@edc1fb24e2cad9badd2dd18ccccd590d77156e18 Send the "suspect list", and print the suspect versions
Build 1.5.2-7.8.0.711: Build 1.5.2-7.8.0.711:
jdroque: bloodshot:
Add support for servers to register dimensions on client. Add support for servers to register dimensions on client.
In order to support multi-worlds such as MultiVerse, the server needs the In order to support multi-worlds such as MultiVerse, the server needs the

View File

@@ -1,16 +1,20 @@
package com.kitsu.medievalcraft; package com.kitsu.medievalcraft;
import com.kitsu.medievalcraft.entity.EntityCannonBall;
import com.kitsu.medievalcraft.entity.EntityITSpear; import com.kitsu.medievalcraft.entity.EntityITSpear;
import com.kitsu.medievalcraft.entity.EntityModelArrow; import com.kitsu.medievalcraft.entity.EntityModelArrow;
import com.kitsu.medievalcraft.entity.EntityModelITArrow; import com.kitsu.medievalcraft.entity.EntityModelITArrow;
import com.kitsu.medievalcraft.entity.EntityShit; import com.kitsu.medievalcraft.entity.EntityShit;
import com.kitsu.medievalcraft.entity.EntityTester; import com.kitsu.medievalcraft.entity.EntityTester;
import com.kitsu.medievalcraft.entity.ProjectileCannonBall;
import com.kitsu.medievalcraft.item.ModItems; import com.kitsu.medievalcraft.item.ModItems;
import com.kitsu.medievalcraft.renderer.RenderId; import com.kitsu.medievalcraft.renderer.RenderId;
import com.kitsu.medievalcraft.renderer.RendererRegistry; import com.kitsu.medievalcraft.renderer.RendererRegistry;
import com.kitsu.medievalcraft.renderer.blocks.RenderModelArrow; import com.kitsu.medievalcraft.renderer.blocks.RenderModelArrow;
import com.kitsu.medievalcraft.renderer.blocks.RenderModelITArrow; import com.kitsu.medievalcraft.renderer.blocks.RenderModelITArrow;
import com.kitsu.medievalcraft.renderer.blocks.RenderModelITSpear; import com.kitsu.medievalcraft.renderer.blocks.RenderModelITSpear;
import com.kitsu.medievalcraft.renderer.blocks.cannons.Render_CannonBall_Iron;
import com.kitsu.medievalcraft.renderer.blocks.cannons.Render_CannonBall_Projectile;
import cpw.mods.fml.client.FMLClientHandler; import cpw.mods.fml.client.FMLClientHandler;
import cpw.mods.fml.client.registry.RenderingRegistry; import cpw.mods.fml.client.registry.RenderingRegistry;
@@ -26,6 +30,8 @@ public class ClientProxy extends CommonProxy {
RenderingRegistry.registerEntityRenderingHandler(EntityModelArrow.class, new RenderModelArrow()); RenderingRegistry.registerEntityRenderingHandler(EntityModelArrow.class, new RenderModelArrow());
RenderingRegistry.registerEntityRenderingHandler(EntityModelITArrow.class, new RenderModelITArrow()); RenderingRegistry.registerEntityRenderingHandler(EntityModelITArrow.class, new RenderModelITArrow());
RenderingRegistry.registerEntityRenderingHandler(EntityITSpear.class, new RenderModelITSpear()); RenderingRegistry.registerEntityRenderingHandler(EntityITSpear.class, new RenderModelITSpear());
RenderingRegistry.registerEntityRenderingHandler(EntityCannonBall.class, new Render_CannonBall_Iron());
//RenderingRegistry.registerEntityRenderingHandler(ProjectileCannonBall.class, new Render_CannonBall_Projectile());
} }
@Override @Override

View File

@@ -4,12 +4,14 @@ import com.kitsu.medievalcraft.compat.FuelHandler;
import com.kitsu.medievalcraft.compat.ModDict; import com.kitsu.medievalcraft.compat.ModDict;
import com.kitsu.medievalcraft.crafting.CraftingHandle; import com.kitsu.medievalcraft.crafting.CraftingHandle;
import com.kitsu.medievalcraft.crafting.ModCrafting; import com.kitsu.medievalcraft.crafting.ModCrafting;
import com.kitsu.medievalcraft.entity.EntityCannonBall;
import com.kitsu.medievalcraft.entity.EntityITSpear; import com.kitsu.medievalcraft.entity.EntityITSpear;
import com.kitsu.medievalcraft.entity.EntityModelArrow; import com.kitsu.medievalcraft.entity.EntityModelArrow;
import com.kitsu.medievalcraft.entity.EntityModelITArrow; import com.kitsu.medievalcraft.entity.EntityModelITArrow;
import com.kitsu.medievalcraft.entity.EntityShit; import com.kitsu.medievalcraft.entity.EntityShit;
import com.kitsu.medievalcraft.entity.EntityShortLivedShit; import com.kitsu.medievalcraft.entity.EntityShortLivedShit;
import com.kitsu.medievalcraft.entity.EntityTester; import com.kitsu.medievalcraft.entity.EntityTester;
import com.kitsu.medievalcraft.entity.ProjectileCannonBall;
import com.kitsu.medievalcraft.events.BucketHandle; import com.kitsu.medievalcraft.events.BucketHandle;
import com.kitsu.medievalcraft.events.EventHandle; import com.kitsu.medievalcraft.events.EventHandle;
import com.kitsu.medievalcraft.gui.GuiHandler; import com.kitsu.medievalcraft.gui.GuiHandler;
@@ -117,6 +119,8 @@ public class Main {
EntityRegistry.registerModEntity(EntityITSpear.class, "itemITSpear", 4, this, 64, 10, true); EntityRegistry.registerModEntity(EntityITSpear.class, "itemITSpear", 4, this, 64, 10, true);
EntityRegistry.registerModEntity(EntityTester.class, "itemTester", 5, this, 64, 10, true); EntityRegistry.registerModEntity(EntityTester.class, "itemTester", 5, this, 64, 10, true);
EntityRegistry.registerModEntity(EntityShortLivedShit.class, "itemShit", 6, this, 64, 10, true); EntityRegistry.registerModEntity(EntityShortLivedShit.class, "itemShit", 6, this, 64, 10, true);
EntityRegistry.registerModEntity(EntityCannonBall.class, "cannonBall", 7, this, 64, 10, true);
//EntityRegistry.registerModEntity(ProjectileCannonBall.class, "cannonBallProjectile", 8, this, 64, 10, true);
GameRegistry.registerFuelHandler(new FuelHandler()); GameRegistry.registerFuelHandler(new FuelHandler());

View File

@@ -17,6 +17,7 @@ import com.kitsu.medievalcraft.block.crucible.empty.EmptySoftCrucible;
import com.kitsu.medievalcraft.block.crucible.empty.FilledWaterCrucible; import com.kitsu.medievalcraft.block.crucible.empty.FilledWaterCrucible;
import com.kitsu.medievalcraft.block.crucible.empty.SlackWaterCrucible; import com.kitsu.medievalcraft.block.crucible.empty.SlackWaterCrucible;
import com.kitsu.medievalcraft.block.crucible.empty.TanWaterCrucible; import com.kitsu.medievalcraft.block.crucible.empty.TanWaterCrucible;
import com.kitsu.medievalcraft.block.decorative.CannonBall28;
import com.kitsu.medievalcraft.block.decorative.EggWashedBrick; import com.kitsu.medievalcraft.block.decorative.EggWashedBrick;
import com.kitsu.medievalcraft.block.decorative.EggWashedWall; import com.kitsu.medievalcraft.block.decorative.EggWashedWall;
import com.kitsu.medievalcraft.block.decorative.LimestoneRaw; import com.kitsu.medievalcraft.block.decorative.LimestoneRaw;
@@ -31,6 +32,7 @@ import com.kitsu.medievalcraft.block.ingots.IronPlate;
import com.kitsu.medievalcraft.block.ingots.LapisIngot; import com.kitsu.medievalcraft.block.ingots.LapisIngot;
import com.kitsu.medievalcraft.block.ingots.RedstoneIngot; import com.kitsu.medievalcraft.block.ingots.RedstoneIngot;
import com.kitsu.medievalcraft.block.ingots.RefinedIron; import com.kitsu.medievalcraft.block.ingots.RefinedIron;
import com.kitsu.medievalcraft.block.machines.Cannon_28;
import com.kitsu.medievalcraft.block.machines.Firebox; import com.kitsu.medievalcraft.block.machines.Firebox;
import com.kitsu.medievalcraft.block.machines.Forge; import com.kitsu.medievalcraft.block.machines.Forge;
import com.kitsu.medievalcraft.block.machines.ForgeAnvil; import com.kitsu.medievalcraft.block.machines.ForgeAnvil;
@@ -118,6 +120,10 @@ public class ModBlocks {
public static Block solidFilter; public static Block solidFilter;
public static Block forge; public static Block forge;
//CANNONS
public static Block cannon_28;
public static Block cannonBall_28;
//GEMS //GEMS
public static Block myDiamond, myEmerald; public static Block myDiamond, myEmerald;
//IRON INGOTS //IRON INGOTS
@@ -184,6 +190,9 @@ public class ModBlocks {
GameRegistry.registerBlock(firebox = new Firebox("firebox", Material.rock), "firebox"); GameRegistry.registerBlock(firebox = new Firebox("firebox", Material.rock), "firebox");
GameRegistry.registerBlock(forge = new Forge("forge", Material.rock), "forge"); GameRegistry.registerBlock(forge = new Forge("forge", Material.rock), "forge");
GameRegistry.registerBlock(cannon_28 = new Cannon_28("cannon_28", Material.iron), "cannon_28");
GameRegistry.registerBlock(cannonBall_28 = new CannonBall28("cannonBall28", Material.iron), "cannonBall28");
/*GameRegistry.registerBlock(myIronIngot = new MyIronIngot("myIronIngot", Material.iron), "myIronIngot"); /*GameRegistry.registerBlock(myIronIngot = new MyIronIngot("myIronIngot", Material.iron), "myIronIngot");
GameRegistry.registerBlock(damascusIngot = new DamascusIngot("damascusIngot", Material.iron), "damascusIngot"); GameRegistry.registerBlock(damascusIngot = new DamascusIngot("damascusIngot", Material.iron), "damascusIngot");
GameRegistry.registerBlock(hotDamascusIngot = new HotDamascusIngot("hotDamascusIngot", Material.iron), "hotDamascusIngot"); GameRegistry.registerBlock(hotDamascusIngot = new HotDamascusIngot("hotDamascusIngot", Material.iron), "hotDamascusIngot");

View File

@@ -0,0 +1,87 @@
package com.kitsu.medievalcraft.block.decorative;
import java.util.Random;
import com.kitsu.medievalcraft.Main;
import com.kitsu.medievalcraft.block.ModBlocks;
import com.kitsu.medievalcraft.renderer.RenderId;
import com.kitsu.medievalcraft.tileents.cannon.TileCannonBall28;
import com.kitsu.medievalcraft.tileents.ingots.TileEntityMyDiamond;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
public class CannonBall28 extends BlockContainer {
public CannonBall28(String unlocalizedName, Material material) {
super(material);
this.setBlockName(unlocalizedName);
this.setBlockTextureName(Main.MODID + ":" + unlocalizedName);
//this.setCreativeTab(CustomTab.MedievalCraftTab);
this.setHardness(1.0F);
this.setResistance(1.0F);
this.setHarvestLevel(null, 0);
this.setStepSound(soundTypeGlass);
//this.setLightLevel(2.0F);
//xmin, ymin, zmin,
this.setBlockBounds(0.38F, 0.0F, 0.38F,
//xmax, ymax, zmax
0.62F, 0.2F, 0.62F);
}
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int p_149727_6_, float p_149727_7_, float p_149727_8_, float p_149727_9_){
int a = player.inventory.currentItem;
if(player.inventory.getStackInSlot(a)!=null){
if(player.getHeldItem().getItem()==Item.getItemFromBlock(this)){
ItemStack jar = new ItemStack(this);
player.inventory.addItemStackToInventory(jar);
if(!world.isRemote){
world.setBlock(x, y, z, Blocks.air, 0, 2);
}
}
}
if(player.inventory.getStackInSlot(a)==null){
ItemStack jar = new ItemStack(this);
player.inventory.setInventorySlotContents(a, jar);
if(!world.isRemote){
world.setBlock(x, y, z, Blocks.air, 0, 2);
}
}
return false;
}
@Override
public Item getItemDropped(int metadata, Random random, int fortune) {
return Item.getItemFromBlock(this);
}
@Override
public TileEntity createNewTileEntity(World world, int i) {
return new TileCannonBall28();
}
@Override
public int getRenderType() {
return RenderId.my28CannonBallID;
}
@Override
public boolean renderAsNormalBlock() {
return false;
}
@Override
public boolean isOpaqueCube() {
return false;
}
}

View File

@@ -0,0 +1,200 @@
package com.kitsu.medievalcraft.block.machines;
import static net.minecraftforge.common.util.ForgeDirection.UP;
import java.util.Random;
import com.kitsu.medievalcraft.Main;
import com.kitsu.medievalcraft.block.ModBlocks;
import com.kitsu.medievalcraft.entity.EntityCannonBall;
import com.kitsu.medievalcraft.entity.EntityModelArrow;
import com.kitsu.medievalcraft.entity.ProjectileCannonBall;
import com.kitsu.medievalcraft.item.ModItems;
import com.kitsu.medievalcraft.renderer.RenderId;
import com.kitsu.medievalcraft.tileents.cannon.TileCannon_28;
import com.kitsu.medievalcraft.tileents.machine.TileEntityFirebox;
import com.kitsu.medievalcraft.util.CustomTab;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.item.EntityTNTPrimed;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.projectile.EntityLargeFireball;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemHoe;
import net.minecraft.item.ItemStack;
import net.minecraft.item.ItemSword;
import net.minecraft.item.ItemTool;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.MathHelper;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
public class Cannon_28 extends BlockContainer{
private final Random random = new Random();
public Cannon_28(String unlocalizedName, Material material) {
super(material.iron);
this.setBlockName(unlocalizedName);
this.setBlockTextureName(Main.MODID + ":" + unlocalizedName);
this.setCreativeTab(CustomTab.MedievalCraftTab);
this.setHardness(3.0F);
this.setResistance(5.0F);
this.setHarvestLevel("pickaxe", 1, 0);
this.setStepSound(Block.soundTypeAnvil);
//this.isFlammable(world, x, y, z, face);
//(xmin, ymin, zmin,
// xmax, ymax, zmax)
this.setBlockBounds(0.0F, 0.00F, 0.0F,
1.0F, 1.00F, 1.0F);
}
@Override
public boolean isFlammable(IBlockAccess world, int x, int y, int z, ForgeDirection face){
return false;
}
@Override
@SideOnly(Side.CLIENT)
public void randomDisplayTick(World world, int x, int y, int z, Random rand)
{
super.randomDisplayTick(world, x, y, z, random);
}
private Entity shootCannon(World world, Integer x, Integer y, Integer z){
EntityCannonBall cannonball = null;
if(world.getBlockMetadata(x, y, z)==3){
cannonball = new EntityCannonBall(world, (double)x+2, (double)y, (double)z, null);
cannonball.setVelocity(5+world.rand.nextFloat(), 0.25, (world.rand.nextFloat()*2-1)/5);
}
if(world.getBlockMetadata(x, y, z)==2){
cannonball = new EntityCannonBall(world, (double)x, (double)y, (double)z-2, null);
cannonball.setVelocity((world.rand.nextFloat()*2-1)/5, 0.25, -5-world.rand.nextFloat());
}
if(world.getBlockMetadata(x, y, z)==1){
cannonball = new EntityCannonBall(world, (double)x-2, (double)y, (double)z, null);
cannonball.setVelocity(-5-world.rand.nextFloat(), 0.25, (world.rand.nextFloat()*2-1)/5);
}
if(world.getBlockMetadata(x, y, z)==0){
cannonball = new EntityCannonBall(world, (double)x, (double)y, (double)z+2, null);
cannonball.setVelocity((world.rand.nextFloat()*2-1)/5, 0.25, 5+world.rand.nextFloat());
}
return cannonball;
}
public boolean onBlockActivated (World world, int x, int y, int z, EntityPlayer player, int q, float a, float b, float c) {
if(!world.isRemote){
TileCannon_28 tileEnt = (TileCannon_28) world.getTileEntity(x, y, z);
if(tileEnt.isOn==false){
if(player.inventory.getCurrentItem()!=null){
if(player.inventory.getCurrentItem().getItem()==Items.flint_and_steel){
tileEnt.isOn=true;
world.playSoundEffect(x, y, z, "random.fizz", 0.1f, world.rand.nextFloat()/0.5f * 0.1F + 0.8F);
world.playSoundEffect(x, y, z, "random.explode", 0.5f, world.rand.nextFloat()/0.5f * 0.1F + 0.8F);
world.spawnEntityInWorld(shootCannon(world,x,y,z));
tileEnt.markForUpdate();
tileEnt.markDirty();
return true;
}
}
}
}
return false;
}
@Override
public void onNeighborBlockChange(World world, int x, int y, int z, Block block){
if (world.isBlockIndirectlyGettingPowered(x, y, z))
{
TileCannon_28 tileEnt = (TileCannon_28) world.getTileEntity(x, y, z);
if(tileEnt.isOn==false){
tileEnt.isOn=true;
world.playSoundEffect(x, y, z, "random.fizz", 0.1f, world.rand.nextFloat()/0.5f * 0.1F + 0.8F);
world.playSoundEffect(x, y, z, "random.explode", 0.5f, world.rand.nextFloat()/0.5f * 0.1F + 0.8F);
world.spawnEntityInWorld(shootCannon(world, x, y, z));
tileEnt.markForUpdate();
tileEnt.markDirty();
}
}
}
@Override
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack p_149689_6_) {
int dir = MathHelper.floor_double((player.rotationYaw * 4F) / 360F + 0.5D) & 3;
world.setBlockMetadataWithNotify(x, y, z, dir, 0);
System.out.println(dir);
}
public void breakBlock(World world, int x, int y, int z, Block block, int meta) {
TileCannon_28 tileEnt = (TileCannon_28) world.getTileEntity(x, y, z);
if (tileEnt != null) {
for (int i = 0; i < tileEnt.getSizeInventory(); ++i) {
ItemStack itemstack = tileEnt.getStackInSlot(i);
if (itemstack != null) {
float f = this.random.nextFloat() * 0.6F + 0.1F;
float f1 = this.random.nextFloat() * 0.6F + 0.1F;
float f2 = this.random.nextFloat() * 0.6F + 0.1F;
while (itemstack.stackSize > 0) {
int j = this.random.nextInt(21) + 10;
if (j > itemstack.stackSize) {
j = itemstack.stackSize;
}
itemstack.stackSize -= j;
EntityItem entityitem = new EntityItem(world, x + f, y + f1, z + f2, new ItemStack(itemstack.getItem(), j, itemstack.getItemDamage()));
if (itemstack.hasTagCompound()) {
entityitem.getEntityItem().setTagCompound(((NBTTagCompound) itemstack.getTagCompound().copy()));
}
float f3 = 0.025F;
entityitem.motionX = (float) this.random.nextGaussian() * f3;
entityitem.motionY = (float) this.random.nextGaussian() * f3 + 0.1F;
entityitem.motionZ = (float) this.random.nextGaussian() * f3;
world.spawnEntityInWorld(entityitem);
}
}
}
world.func_147453_f(x, y, z, block);
}
super.breakBlock(world, x, y, z, block, meta);
}
@Override
public TileEntity createNewTileEntity(World world, int i) {
return new TileCannon_28();
}
@Override
public int getRenderType() {
return RenderId.cannon_28ID;
}
@Override
public boolean renderAsNormalBlock() {
return false;
}
@Override
public boolean isOpaqueCube() {
return false;
}
}

View File

@@ -0,0 +1,131 @@
package com.kitsu.medievalcraft.entity;
import java.util.List;
import com.kitsu.medievalcraft.block.ModBlocks;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.enchantment.EnchantmentHelper;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.IProjectile;
import net.minecraft.entity.monster.EntityEnderman;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.network.play.server.S2BPacketChangeGameState;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.DamageSource;
import net.minecraft.util.MathHelper;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.util.Vec3;
import net.minecraft.world.World;
public class EntityCannonBall extends Entity{
private EntityLivingBase tntPlacedBy;
public int damage = 100;
private int field_145791_d = -1;
private int field_145792_e = -1;
private int field_145789_f = -1;
public Entity shootingEntity;
public EntityCannonBall(World p_i1582_1_) {
super(p_i1582_1_);
this.preventEntitySpawning = true;
this.setSize(0.5F, 0.5F);
//this.yOffset = this.height / 2.0F;
this.boundingBox.setBounds(0.3, 0.3, 0.3, 0.7, 0.7, 0.7);
}
public EntityCannonBall(World world, double x, double y, double z, EntityLivingBase entLiving)
{
this(world);
this.setPosition(x, y, z);
float f = (float)(Math.random() * Math.PI * 2.0D);
this.motionX = (double)(-((float)Math.sin((double)f)) * 0.02F);
this.motionY = 0.20000000298023224D;
this.motionZ = (double)(-((float)Math.cos((double)f)) * 0.02F);
this.prevPosX = x;
this.prevPosY = y;
this.prevPosZ = z;
this.tntPlacedBy = entLiving;
this.renderDistanceWeight = 100;
}
public void onUpdate()
{
this.prevPosX = this.posX;
this.prevPosY = this.posY;
this.prevPosZ = this.posZ;
this.motionY -= 0.03999999910593033D;
this.moveEntity(this.motionX, this.motionY, this.motionZ);
this.motionX *= 0.9800000190734863D;
this.motionY *= 0.9800000190734863D;
this.motionZ *= 0.9800000190734863D;
Vec3 vec31 = Vec3.createVectorHelper(this.posX, this.posY, this.posZ);
Vec3 vec3 = Vec3.createVectorHelper(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ);
MovingObjectPosition mop = this.worldObj.func_147447_a(vec31, vec3, false, true, false);
vec31 = Vec3.createVectorHelper(this.posX, this.posY, this.posZ);
vec3 = Vec3.createVectorHelper(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ);
if (mop != null)
{
vec3 = Vec3.createVectorHelper(mop.hitVec.xCoord, mop.hitVec.yCoord, mop.hitVec.zCoord);
//System.out.println(mop.entityHit);
}
if(!worldObj.isRemote){
if (this.onGround)
{
this.explode();
this.setDead();
}
if(this.motionX==0||this.motionY==0||this.motionZ==0){
this.explode();
this.setDead();
}
}
}
@Override
public boolean canBeCollidedWith()
{
return true;
}
private void explode()
{
float f = 1F+(this.worldObj.rand.nextFloat()/3)+(this.worldObj.rand.nextFloat()/4)+this.worldObj.rand.nextFloat()/5;
this.worldObj.createExplosion(this, this.posX, this.posY, this.posZ, f, true);
}
@Override
protected void readEntityFromNBT(NBTTagCompound p_70037_1_) {
}
@Override
protected void writeEntityToNBT(NBTTagCompound p_70014_1_) {
}
public EntityLivingBase getTntPlacedBy()
{
return this.tntPlacedBy;
}
@Override
protected void entityInit() {
this.dataWatcher.addObject(16, Byte.valueOf((byte)0));
}
}

View File

@@ -140,24 +140,24 @@ public class EntityITSpear extends EntityArrow implements IProjectile {
* Similar to setArrowHeading, it's point the throwable entity to a x, y, z direction. * Similar to setArrowHeading, it's point the throwable entity to a x, y, z direction.
*/ */
@SuppressWarnings("cast") @SuppressWarnings("cast")
public void setThrowableHeading(double p_70186_1_, double p_70186_3_, double p_70186_5_, float p_70186_7_, float p_70186_8_) public void setThrowableHeading(double x, double y, double z, float p_70186_7_, float p_70186_8_)
{ {
float f2 = MathHelper.sqrt_double(p_70186_1_ * p_70186_1_ + p_70186_3_ * p_70186_3_ + p_70186_5_ * p_70186_5_); float f2 = MathHelper.sqrt_double(x * x + y * y + z * z);
p_70186_1_ /= (double)f2; x /= (double)f2;
p_70186_3_ /= (double)f2; y /= (double)f2;
p_70186_5_ /= (double)f2; z /= (double)f2;
p_70186_1_ += this.rand.nextGaussian() * (double)(this.rand.nextBoolean() ? -1 : 1) * 0.007499999832361937D * (double)p_70186_8_; x += this.rand.nextGaussian() * (double)(this.rand.nextBoolean() ? -1 : 1) * 0.007499999832361937D * (double)p_70186_8_;
p_70186_3_ += this.rand.nextGaussian() * (double)(this.rand.nextBoolean() ? -1 : 1) * 0.007499999832361937D * (double)p_70186_8_; y += this.rand.nextGaussian() * (double)(this.rand.nextBoolean() ? -1 : 1) * 0.007499999832361937D * (double)p_70186_8_;
p_70186_5_ += this.rand.nextGaussian() * (double)(this.rand.nextBoolean() ? -1 : 1) * 0.007499999832361937D * (double)p_70186_8_; z += this.rand.nextGaussian() * (double)(this.rand.nextBoolean() ? -1 : 1) * 0.007499999832361937D * (double)p_70186_8_;
p_70186_1_ *= (double)p_70186_7_; x *= (double)p_70186_7_;
p_70186_3_ *= (double)p_70186_7_; y *= (double)p_70186_7_;
p_70186_5_ *= (double)p_70186_7_; z *= (double)p_70186_7_;
this.motionX = p_70186_1_/2.5; this.motionX = x/2.5;
this.motionY = p_70186_3_/1.75; this.motionY = y/1.75;
this.motionZ = p_70186_5_/2.5; this.motionZ = z/2.5;
float f3 = MathHelper.sqrt_double(p_70186_1_ * p_70186_1_ + p_70186_5_ * p_70186_5_); float f3 = MathHelper.sqrt_double(x * x + z * z);
this.prevRotationYaw = this.rotationYaw = (float)(Math.atan2(p_70186_1_, p_70186_5_) * 180.0D / Math.PI); this.prevRotationYaw = this.rotationYaw = (float)(Math.atan2(x, z) * 180.0D / Math.PI);
this.prevRotationPitch = this.rotationPitch = (float)(Math.atan2(p_70186_3_, (double)f3) * 180.0D / Math.PI); this.prevRotationPitch = this.rotationPitch = (float)(Math.atan2(y, (double)f3) * 180.0D / Math.PI);
this.ticksInGround = 1; this.ticksInGround = 1;
} }

View File

@@ -0,0 +1,592 @@
package com.kitsu.medievalcraft.entity;
import java.util.List;
import com.kitsu.medievalcraft.item.ModItems;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.enchantment.EnchantmentHelper;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.IProjectile;
import net.minecraft.entity.monster.EntityEnderman;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.entity.projectile.EntityArrow;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.network.play.server.S2BPacketChangeGameState;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.DamageSource;
import net.minecraft.util.MathHelper;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.util.Vec3;
import net.minecraft.world.World;
public class ProjectileCannonBall extends EntityArrow implements IProjectile {
private int field_145791_d = -1;
private int field_145792_e = -1;
private int field_145789_f = -1;
private Block field_145790_g;
private int inData;
private boolean inGround;
/** 1 if the player can pick up the arrow */
public int canBePickedUp;
/** Seems to be some sort of timer for animating an arrow. */
public int arrowShake;
/** The owner of this arrow. */
public Entity shootingEntity;
private int ticksInGround;
private int ticksInAir;
private double damage = 35.0D;
/** The amount of knockback an arrow applies when it hits a mob. */
private int knockbackStrength;
public ProjectileCannonBall(World world)
{
super(world);
this.renderDistanceWeight = 10.0D;
this.setSize(0.5F, 0.5F);
}
public ProjectileCannonBall(World world, double x, double y, double z)
{
super(world);
this.renderDistanceWeight = 10.0D;
this.setSize(0.5F, 0.5F);
this.setPosition(x, y, z);
this.yOffset = 0.0F;
}
@SuppressWarnings("cast")
public ProjectileCannonBall(World world, EntityLivingBase player, EntityLivingBase p_i1755_3_, float p_i1755_4_, float p_i1755_5_)
{
super(world);
this.renderDistanceWeight = 10.0D;
this.shootingEntity = player;
if (player instanceof EntityPlayer)
{
this.canBePickedUp = 1;
}
this.posY = player.posY + (double)player.getEyeHeight() + 0.10000000149011612D;
double d0 = p_i1755_3_.posX - player.posX;
double d1 = p_i1755_3_.boundingBox.minY + (double)(p_i1755_3_.height / 3.0F) - this.posY;
double d2 = p_i1755_3_.posZ - player.posZ;
double d3 = (double)MathHelper.sqrt_double(d0 * d0 + d2 * d2);
if (d3 >= 1.0E-7D)
{
float f2 = (float)(Math.atan2(d2, d0) * 180.0D / Math.PI) - 90.0F;
float f3 = (float)(-(Math.atan2(d1, d3) * 180.0D / Math.PI));
double d4 = d0 / d3;
double d5 = d2 / d3;
this.setLocationAndAngles(player.posX + d4, this.posY, player.posZ + d5, f2, f3);
this.yOffset = 0.0F;
float f4 = (float)d3 * 0.2F;
this.setThrowableHeading(d0, d1 + (double)f4, d2, p_i1755_4_, p_i1755_5_);
}
}
@SuppressWarnings("cast")
public ProjectileCannonBall(World world, EntityLivingBase player, float p_i1756_3_)
{
super(world);
this.renderDistanceWeight = 10.0D;
this.shootingEntity = player;
this.setSize(0.5F, 0.5F);
this.setLocationAndAngles(player.posX, player.posY + (double)player.getEyeHeight(), player.posZ, player.rotationYaw, player.rotationPitch);
this.posX += (player.getLookVec().xCoord);
//this.posY -= 0.10000000149011612D;
this.posZ += (player.getLookVec().zCoord);
//this.posX -= (double)(MathHelper.cos(this.rotationYaw / 180.0F * (float)Math.PI) * 0.16F);
this.posY += player.getLookVec().yCoord;
if(player.getLookVec().yCoord < 0){
this.posY += player.getLookVec().yCoord * 2;
}
this.setPosition(this.posX, this.posY, this.posZ);
//this.setSize(0.5F, 0.5F);
//this.setLocationAndAngles(player.posX, player.posY + (double)player.getEyeHeight(), player.posZ, player.rotationYaw, player.rotationPitch);
//this.posX -= (double)(MathHelper.cos(this.rotationYaw / 180.0F * (float)Math.PI) * 0.16F);
//this.posY -= 0.10000000149011612D;
//this.posZ -= (double)(MathHelper.sin(this.rotationYaw / 180.0F * (float)Math.PI) * 0.16F);
//this.setPosition(this.posX, this.posY, this.posZ);
this.yOffset = 0.0F;
this.motionX = (double)(-MathHelper.sin(this.rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float)Math.PI));
this.motionZ = (double)(MathHelper.cos(this.rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float)Math.PI));
this.motionY = (double)(-MathHelper.sin(this.rotationPitch / 180.0F * (float)Math.PI));
this.setThrowableHeading(this.motionX, this.motionY, this.motionZ, p_i1756_3_ * 1.5F, 1.0F);
}
protected void entityInit()
{
this.dataWatcher.addObject(16, Byte.valueOf((byte)0));
}
/**
* Similar to setArrowHeading, it's point the throwable entity to a x, y, z direction.
*/
@SuppressWarnings("cast")
public void setThrowableHeading(double x, double y, double z, float p_70186_7_, float p_70186_8_)
{
float f2 = MathHelper.sqrt_double(x * x + y * y + z * z);
x /= (double)f2;
y /= (double)f2;
z /= (double)f2;
x += this.rand.nextGaussian() * (double)(this.rand.nextBoolean() ? -1 : 1) * 0.007499999832361937D * (double)p_70186_8_;
y += this.rand.nextGaussian() * (double)(this.rand.nextBoolean() ? -1 : 1) * 0.007499999832361937D * (double)p_70186_8_;
z += this.rand.nextGaussian() * (double)(this.rand.nextBoolean() ? -1 : 1) * 0.007499999832361937D * (double)p_70186_8_;
x *= (double)p_70186_7_;
y *= (double)p_70186_7_;
z *= (double)p_70186_7_;
this.motionX = x/2.5;
this.motionY = y/1.75;
this.motionZ = z/2.5;
float f3 = MathHelper.sqrt_double(x * x + z * z);
this.prevRotationYaw = this.rotationYaw = (float)(Math.atan2(x, z) * 180.0D / Math.PI);
this.prevRotationPitch = this.rotationPitch = (float)(Math.atan2(y, (double)f3) * 180.0D / Math.PI);
this.ticksInGround = 1;
}
/**
* Sets the position and rotation. Only difference from the other one is no bounding on the rotation. Args: posX,
* posY, posZ, yaw, pitch
*/
@SideOnly(Side.CLIENT)
public void setPositionAndRotation2(double p_70056_1_, double p_70056_3_, double p_70056_5_, float p_70056_7_, float p_70056_8_, int p_70056_9_)
{
this.setPosition(p_70056_1_, p_70056_3_, p_70056_5_);
this.setRotation(p_70056_7_, p_70056_8_);
}
/**
* Sets the velocity to the args. Args: x, y, z
*/
@SuppressWarnings("cast")
@SideOnly(Side.CLIENT)
public void setVelocity(double p_70016_1_, double p_70016_3_, double p_70016_5_)
{
this.motionX = p_70016_1_ ;
this.motionY = p_70016_3_ ;
this.motionZ = p_70016_5_ ;
if (this.prevRotationPitch == 0.0F && this.prevRotationYaw == 0.0F)
{
float f = MathHelper.sqrt_double(p_70016_1_ * p_70016_1_ + p_70016_5_ * p_70016_5_);
this.prevRotationYaw = this.rotationYaw = (float)(Math.atan2(p_70016_1_, p_70016_5_) * 180.0D / Math.PI);
this.prevRotationPitch = this.rotationPitch = (float)(Math.atan2(p_70016_3_, (double)f) * 180.0D / Math.PI);
this.prevRotationPitch = this.rotationPitch;
this.prevRotationYaw = this.rotationYaw;
this.setLocationAndAngles(this.posX, this.posY, this.posZ, this.rotationYaw, this.rotationPitch);
this.ticksInGround = 0;
}
}
/**
* Called to update the entity's position/logic.
*/
@SuppressWarnings("cast")
public void onUpdate()
{
super.onUpdate();
if (this.prevRotationPitch == 0.0F && this.prevRotationYaw == 0.0F)
{
float f = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ);
this.prevRotationYaw = this.rotationYaw = (float)(Math.atan2(this.motionX, this.motionZ) * 180.0D / Math.PI);
this.prevRotationPitch = this.rotationPitch = (float)(Math.atan2(this.motionY, (double)f) * 180.0D / Math.PI);
}
Block block = this.worldObj.getBlock(this.field_145791_d, this.field_145792_e, this.field_145789_f);
//this.getEntityData().setInteger("blockX", this.field_145791_d);
if (block.getMaterial() != Material.air)
{
block.setBlockBoundsBasedOnState(this.worldObj, this.field_145791_d, this.field_145792_e, this.field_145789_f);
AxisAlignedBB axisalignedbb = block.getCollisionBoundingBoxFromPool(this.worldObj, this.field_145791_d, this.field_145792_e, this.field_145789_f);
if (axisalignedbb != null && axisalignedbb.isVecInside(Vec3.createVectorHelper(this.posX, this.posY, this.posZ)))
{
this.inGround = true;
}
}
if (this.arrowShake > 0)
{
--this.arrowShake;
}
if (this.inGround)
{
int j = this.worldObj.getBlockMetadata(this.field_145791_d, this.field_145792_e, this.field_145789_f);
if (block == this.field_145790_g && j == this.inData)
{
++this.ticksInGround;
if (this.ticksInGround == -1)
{
//this.setDead();
}
}
else
{
this.inGround = false;
this.motionX *= (double)(this.rand.nextFloat() * 0.2F);
this.motionY *= (double)(this.rand.nextFloat() * 0.2F);
this.motionZ *= (double)(this.rand.nextFloat() * 0.2F);
this.ticksInGround = 0;
this.ticksInAir = 0;
}
}
else
{
++this.ticksInAir;
Vec3 vec31 = Vec3.createVectorHelper(this.posX, this.posY, this.posZ);
Vec3 vec3 = Vec3.createVectorHelper(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ);
MovingObjectPosition movingobjectposition = this.worldObj.func_147447_a(vec31, vec3, false, true, false);
vec31 = Vec3.createVectorHelper(this.posX, this.posY, this.posZ);
vec3 = Vec3.createVectorHelper(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ);
if (movingobjectposition != null)
{
vec3 = Vec3.createVectorHelper(movingobjectposition.hitVec.xCoord, movingobjectposition.hitVec.yCoord, movingobjectposition.hitVec.zCoord);
}
Entity entity = null;
List list = this.worldObj.getEntitiesWithinAABBExcludingEntity(this, this.boundingBox.addCoord(this.motionX, this.motionY, this.motionZ).expand(1.0D, 1.0D, 1.0D));
double d0 = 0.0D;
int i;
float f1;
for (i = 0; i < list.size(); ++i)
{
Entity entity1 = (Entity)list.get(i);
if (entity1.canBeCollidedWith() && (entity1 != this.shootingEntity || this.ticksInAir >= 5))
{
f1 = 0.3F;
AxisAlignedBB axisalignedbb1 = entity1.boundingBox.expand((double)f1, (double)f1, (double)f1);
MovingObjectPosition movingobjectposition1 = axisalignedbb1.calculateIntercept(vec31, vec3);
if (movingobjectposition1 != null)
{
double d1 = vec31.distanceTo(movingobjectposition1.hitVec);
if (d1 < d0 || d0 == 0.0D)
{
entity = entity1;
d0 = d1;
}
}
}
}
if (entity != null)
{
movingobjectposition = new MovingObjectPosition(entity);
this.inGround=true;
}
if (movingobjectposition != null && movingobjectposition.entityHit != null && movingobjectposition.entityHit instanceof EntityPlayer)
{
EntityPlayer entityplayer = (EntityPlayer)movingobjectposition.entityHit;
if (entityplayer.capabilities.disableDamage || this.shootingEntity instanceof EntityPlayer && !((EntityPlayer)this.shootingEntity).canAttackPlayer(entityplayer))
{
movingobjectposition = null;
}
}
float f2;
float f4;
if (movingobjectposition != null)
{
if (movingobjectposition.entityHit != null)
{
f2 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionY * this.motionY + this.motionZ * this.motionZ);
int k = MathHelper.ceiling_double_int((double)f2 * this.damage);
DamageSource damagesource = null;
if (this.shootingEntity == null)
{
//EntityPlayer player = (EntityPlayer) movingobjectposition.entityHit;
//System.out.println(player.inventory.getTotalArmorValue());
damagesource = DamageSource.causeArrowDamage(this, this.shootingEntity);
//damagesource = DamageSource.
}
else
{
damagesource = DamageSource.causeThrownDamage(this, this.shootingEntity);
}
if (this.isBurning() && !(movingobjectposition.entityHit instanceof EntityEnderman))
{
movingobjectposition.entityHit.setFire(5);
}
if (movingobjectposition.entityHit.attackEntityFrom(damagesource, (float)k))
{
if (movingobjectposition.entityHit instanceof EntityLivingBase)
{
EntityLivingBase entitylivingbase = (EntityLivingBase)movingobjectposition.entityHit;
if (!this.worldObj.isRemote)
{
//entitylivingbase.setArrowCountInEntity(entitylivingbase.getArrowCountInEntity() + 1);
}
if (this.knockbackStrength > 0)
{
f4 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ);
if (f4 > 0.0F)
{
movingobjectposition.entityHit.addVelocity(this.motionX * (double)this.knockbackStrength * 0.6000000238418579D / (double)f4, 0.1D, this.motionZ * (double)this.knockbackStrength * 0.6000000238418579D / (double)f4);
}
}
if (this.shootingEntity != null && this.shootingEntity instanceof EntityLivingBase)
{
EnchantmentHelper.func_151384_a(entitylivingbase, this.shootingEntity);
EnchantmentHelper.func_151385_b((EntityLivingBase)this.shootingEntity, entitylivingbase);
}
if (this.shootingEntity != null && movingobjectposition.entityHit != this.shootingEntity && movingobjectposition.entityHit instanceof EntityPlayer && this.shootingEntity instanceof EntityPlayerMP)
{
((EntityPlayerMP)this.shootingEntity).playerNetServerHandler.sendPacket(new S2BPacketChangeGameState(6, 0.0F));
}
}
//this.playSound("random.bowhit", 1.0F, 1.2F / (this.rand.nextFloat() * 0.2F + 0.9F));
if (!(movingobjectposition.entityHit instanceof EntityEnderman))
{
this.inGround = true;
}
}
else
{
this.motionX *= -0.10000000149011612D;
this.motionY *= -0.10000000149011612D;
this.motionZ *= -0.10000000149011612D;
this.rotationYaw += 180.0F;
this.prevRotationYaw += 180.0F;
this.ticksInAir = 0;
}
this.inGround=true;
}
else
{
this.field_145791_d = movingobjectposition.blockX;
this.field_145792_e = movingobjectposition.blockY;
this.field_145789_f = movingobjectposition.blockZ;
this.field_145790_g = this.worldObj.getBlock(this.field_145791_d, this.field_145792_e, this.field_145789_f);
this.inData = this.worldObj.getBlockMetadata(this.field_145791_d, this.field_145792_e, this.field_145789_f);
this.motionX = (double)((float)(movingobjectposition.hitVec.xCoord - this.posX));
this.motionY = (double)((float)(movingobjectposition.hitVec.yCoord - this.posY));
this.motionZ = (double)((float)(movingobjectposition.hitVec.zCoord - this.posZ));
f2 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionY * this.motionY + this.motionZ * this.motionZ);
this.posX -= this.motionX / (double)f2 * 0.05000000074505806D;
this.posY -= this.motionY / (double)f2 * 0.05000000074505806D;
this.posZ -= this.motionZ / (double)f2 * 0.05000000074505806D;
//this.playSound("random.bowhit", 1.0F, 1.2F / (this.rand.nextFloat() * 0.2F + 0.9F));
this.inGround = true;
this.arrowShake = 7;
if (this.field_145790_g.getMaterial() != Material.air)
{
this.field_145790_g.onEntityCollidedWithBlock(this.worldObj, this.field_145791_d, this.field_145792_e, this.field_145789_f, this);
}
}
this.inGround=true;
}
this.posX += this.motionX;
this.posY += this.motionY;
this.posZ += this.motionZ;
f2 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ);
this.rotationYaw = (float)(Math.atan2(this.motionX, this.motionZ) * 180.0D / Math.PI);
for (this.rotationPitch = (float)(Math.atan2(this.motionY, (double)f2) * 180.0D / Math.PI); this.rotationPitch - this.prevRotationPitch < -180.0F; this.prevRotationPitch -= 360.0F)
{
;
}
while (this.rotationPitch - this.prevRotationPitch >= 180.0F)
{
this.prevRotationPitch += 360.0F;
}
while (this.rotationYaw - this.prevRotationYaw < -180.0F)
{
this.prevRotationYaw -= 360.0F;
}
while (this.rotationYaw - this.prevRotationYaw >= 180.0F)
{
this.prevRotationYaw += 360.0F;
}
this.rotationPitch = this.prevRotationPitch + (this.rotationPitch - this.prevRotationPitch) * 0.2F;
this.rotationYaw = this.prevRotationYaw + (this.rotationYaw - this.prevRotationYaw) * 0.2F;
float f3 = 0.99F;
f1 = 0.05F;
if (this.isInWater())
{
for (int l = 0; l < 4; ++l)
{
f4 = 0.25F;
this.worldObj.spawnParticle("bubble", this.posX - this.motionX * (double)f4, this.posY - this.motionY * (double)f4, this.posZ - this.motionZ * (double)f4, this.motionX, this.motionY, this.motionZ);
}
f3 = 0.8F;
}
if (this.isWet())
{
this.extinguish();
}
if (movingobjectposition != null)
{
if (movingobjectposition.entityHit != null)
{
this.inGround=true;
}
}
this.motionX *= (double)f3;
this.motionY *= (double)f3;
this.motionZ *= (double)f3;
this.motionY -= (double)f1;
this.setPosition(this.posX, this.posY, this.posZ);
this.func_145775_I();
}
}
/**
* (abstract) Protected helper method to write subclass entity data to NBT.
*/
public void writeEntityToNBT(NBTTagCompound p_70014_1_)
{
p_70014_1_.setShort("xTile", (short)this.field_145791_d);
p_70014_1_.setShort("yTile", (short)this.field_145792_e);
p_70014_1_.setShort("zTile", (short)this.field_145789_f);
p_70014_1_.setShort("life", (short)this.ticksInGround);
p_70014_1_.setByte("inTile", (byte)Block.getIdFromBlock(this.field_145790_g));
p_70014_1_.setByte("inData", (byte)this.inData);
p_70014_1_.setByte("shake", (byte)this.arrowShake);
p_70014_1_.setByte("inGround", (byte)(this.inGround ? 1 : 0));
p_70014_1_.setByte("pickup", (byte)this.canBePickedUp);
p_70014_1_.setDouble("damage", this.damage);
}
/**
* (abstract) Protected helper method to read subclass entity data from NBT.
*/
public void readEntityFromNBT(NBTTagCompound p_70037_1_)
{
this.field_145791_d = p_70037_1_.getShort("xTile");
this.field_145792_e = p_70037_1_.getShort("yTile");
this.field_145789_f = p_70037_1_.getShort("zTile");
this.ticksInGround = p_70037_1_.getShort("life");
this.field_145790_g = Block.getBlockById(p_70037_1_.getByte("inTile") & 255);
this.inData = p_70037_1_.getByte("inData") & 255;
this.arrowShake = p_70037_1_.getByte("shake") & 255;
this.inGround = p_70037_1_.getByte("inGround") == 1;
if (p_70037_1_.hasKey("damage", 99))
{
this.damage = p_70037_1_.getDouble("damage");
}
if (p_70037_1_.hasKey("pickup", 99))
{
this.canBePickedUp = p_70037_1_.getByte("pickup");
}
else if (p_70037_1_.hasKey("player", 99))
{
this.canBePickedUp = p_70037_1_.getBoolean("player") ? 1 : 0;
}
}
/**
* Called by a player entity when they collide with an entity
*/
public void onCollideWithPlayer(EntityPlayer p_70100_1_)
{
if (!this.worldObj.isRemote && this.inGround && this.arrowShake <= 0)
{
boolean flag = this.canBePickedUp == 1 || this.canBePickedUp == 2 && p_70100_1_.capabilities.isCreativeMode;
if (this.canBePickedUp == 1 && !p_70100_1_.inventory.addItemStackToInventory(new ItemStack(ModItems.itemITSpear, 1)))
{
flag = false;
}
if (flag)
{
this.playSound("random.pop", 0.2F, ((this.rand.nextFloat() - this.rand.nextFloat()) * 0.7F + 1.0F) * 2.0F);
p_70100_1_.onItemPickup(this, 1);
this.setDead();
}
}
}
/**
* returns if this entity triggers Block.onEntityWalking on the blocks they walk on. used for spiders and wolves to
* prevent them from trampling crops
*/
protected boolean canTriggerWalking()
{
return false;
}
@SideOnly(Side.CLIENT)
public float getShadowSize()
{
return 2.0F;
}
public void setDamage(double p_70239_1_)
{
this.damage = p_70239_1_;
}
public double getDamage()
{
return this.damage;
}
/**
* Sets the amount of knockback the arrow applies when it hits a mob.
*/
public void setKnockbackStrength(int p_70240_1_)
{
this.knockbackStrength = p_70240_1_;
}
/**
* If returns false, the item will not inflict any damage against entities.
*/
public boolean canAttackWithItem()
{
return true;
}
}

View File

@@ -173,11 +173,11 @@ public void splitLogEvent(PlayerInteractEvent event){
if (event.entity instanceof EntityPlayer) { if (event.entity instanceof EntityPlayer) {
EntityPlayer player = (EntityPlayer) event.entity; EntityPlayer player = (EntityPlayer) event.entity;
if(player.inventory.getCurrentItem()!=null){ if(player.inventory.getCurrentItem()!=null){
Block test = event.world.getBlock(event.x, event.y, event.z); Block test = event.world.getBlock(event.x, event.y, event.z);
//Block isEmpty = event.world.getBlock(event.x, event.y + 1, event.z); //Block isEmpty = event.world.getBlock(event.x, event.y + 1, event.z);
ItemStack itemStack = new ItemStack(ModItems.itemBark); ItemStack itemStack = new ItemStack(ModItems.itemBark);
//ItemStack stickStack = new ItemStack(Items.stick); //ItemStack stickStack = new ItemStack(Items.stick);
if((player.inventory.getCurrentItem().getItem() == Items.stick)) { if((player.inventory.getCurrentItem().getItem() == Items.stick)) {
if((event.action == event.action.RIGHT_CLICK_BLOCK ) && ((test == Blocks.log)||test == Blocks.log2) ) { //&& (test == ModBlocks.testForge) && (isEmpty == Blocks.air) if((event.action == event.action.RIGHT_CLICK_BLOCK ) && ((test == Blocks.log)||test == Blocks.log2) ) { //&& (test == ModBlocks.testForge) && (isEmpty == Blocks.air)
if(test == Blocks.log){ if(test == Blocks.log){
@@ -587,47 +587,50 @@ public void onPlayerUpdateMaceWoodenShield (LivingUpdateEvent event) {
@SubscribeEvent @SubscribeEvent
public void onPlayerHurtShield (LivingHurtEvent event) { public void onPlayerHurtShield (LivingHurtEvent event) {
if (event.entity instanceof EntityPlayer && event.ammount > 0) { if(event.entity.worldObj.isRemote){
if (event.entity instanceof EntityPlayer && event.ammount > 0) {
EntityPlayer player = (EntityPlayer) event.entity;
Entity mobEntity = event.source.getEntity();
String mobString = event.source.getDamageType();
//System.out.println(mobEntity);
//System.out.println(mobString);
if (player.inventory.getCurrentItem()!=null){
if(player.isUsingItem()==true){
if (player.inventory.getCurrentItem()!=null){
if (player.inventory.getCurrentItem().getItem().equals(checkShield(player.inventory.getCurrentItem().getItem()))) {
if ((mobString.equals("explosion")) || (mobString.equals("thrown")) || (mobString.equals("arrow") || (mobString.equals("player")) || (mobString.equals("mob")) || (mobString.equals("fireball")))) {
EntityPlayer player = (EntityPlayer) event.entity; Vec3 vec3 = player.getLook(1.0F).normalize();
Entity mobEntity = event.source.getEntity(); Vec3 vec31 = Vec3.createVectorHelper(mobEntity.posX - player.posX, mobEntity.boundingBox.minY + mobEntity.height / 2.0F - (player.posY + player.getEyeHeight()), mobEntity.posZ - player.posZ);
String mobString = event.source.getDamageType(); double d0 = vec31.lengthVector();
//System.out.println(mobEntity); vec31 = vec31.normalize();
//System.out.println(mobString); double d1 = vec3.dotProduct(vec31);
double d2 = 1.0D - 0.025D / d0;
if(player.isUsingItem()==true){ if (d1 + 0.3 > d2) {
if (player.inventory.getCurrentItem().getItem().equals(checkShield(player.inventory.getCurrentItem().getItem()))) { if(player.inventory.getCurrentItem().getItem().equals(ModItems.woodenShield)){
if ((mobString.equals("explosion")) || (mobString.equals("thrown")) || (mobString.equals("arrow") || (mobString.equals("player")) || (mobString.equals("mob")) || (mobString.equals("fireball")))) { if(event.ammount > 1.5F){
event.ammount = event.ammount-2F;
} else event.ammount = 0;
player.getCurrentEquippedItem().damageItem(2, player);
player.worldObj.playSoundAtEntity(player, Main.MODID + ":woodshieldbash", 1.0F, 1.0F);
//event.entityLiving.addPotionEffect(new PotionEffect(Potion.resistance.id, 60, 0, true));
if (mobString.equals("explosion") && rand.nextInt(5) == 1) {
--player.getCurrentEquippedItem().stackSize;
}
}
if(player.inventory.getCurrentItem().getItem().equals(ModItems.ironShield)){
if(event.ammount > 4F){
event.ammount = event.ammount-4F;
} else event.ammount = 0;
player.getCurrentEquippedItem().damageItem(4, player);
player.worldObj.playSoundAtEntity(player, Main.MODID + ":ironShieldBash", 1.0F, 1.0F);
}
Vec3 vec3 = player.getLook(1.0F).normalize(); }
Vec3 vec31 = Vec3.createVectorHelper(mobEntity.posX - player.posX, mobEntity.boundingBox.minY + mobEntity.height / 2.0F - (player.posY + player.getEyeHeight()), mobEntity.posZ - player.posZ); }
double d0 = vec31.lengthVector();
vec31 = vec31.normalize();
double d1 = vec3.dotProduct(vec31);
double d2 = 1.0D - 0.025D / d0;
if (d1 + 0.3 > d2) {
if(player.inventory.getCurrentItem().getItem().equals(ModItems.woodenShield)){
if(event.ammount > 1.5F){
event.ammount = event.ammount-2F;
} else event.ammount = 0;
player.getCurrentEquippedItem().damageItem(2, player);
player.worldObj.playSoundAtEntity(player, Main.MODID + ":woodshieldbash", 1.0F, 1.0F);
//event.entityLiving.addPotionEffect(new PotionEffect(Potion.resistance.id, 60, 0, true));
if (mobString.equals("explosion") && rand.nextInt(5) == 1) {
--player.getCurrentEquippedItem().stackSize;
}
} }
if(player.inventory.getCurrentItem().getItem().equals(ModItems.ironShield)){
if(event.ammount > 4F){
event.ammount = event.ammount-4F;
} else event.ammount = 0;
player.getCurrentEquippedItem().damageItem(4, player);
player.worldObj.playSoundAtEntity(player, Main.MODID + ":ironShieldBash", 1.0F, 1.0F);
}
} }
} }
} }

View File

@@ -1,81 +0,0 @@
/*
package com.kitsu.medievalcraft.model_loader;
import java.util.Collection;
import java.util.Map;
import com.google.common.collect.Maps;
import cpw.mods.fml.common.FMLLog;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.model.obj.ObjModelLoader;
import net.minecraftforge.client.model.techne.TechneModelLoader;
import net.minecraftforge.common.ForgeVersion.Status;
/**
* Common interface for advanced model loading from files, based on file suffix
* Model support can be queried through the {@link #getSupportedSuffixes()} method.
* Instances can be created by calling {loadModel(String)} with a class-loadable-path
*
* @author cpw
*
@SideOnly(Side.CLIENT)
public class AdvancedModelLoader {
private static Map<String, IModelCustomLoader> instances = Maps.newHashMap();
/**
* Register a new model handler
* @param modelHandler The model handler to register
public static void registerModelHandler(IModelCustomLoader modelHandler)
{
for (String suffix : modelHandler.getSuffixes())
{
instances.put(suffix, modelHandler);
}
}
/**
* Load the model from the supplied classpath resolvable resource name
* @param resource The resource name
* @return A model
* @throws IllegalArgumentException if the resource name cannot be understood
* @throws ModelFormatException if the underlying model handler cannot parse the model format
public static IModelCustom loadModel(ResourceLocation resource) throws IllegalArgumentException, ModelFormatException
{
String name = resource.getResourcePath();
int i = name.lastIndexOf('.');
if (i == -1)
{
FMLLog.severe("The resource name %s is not valid", resource);
throw new IllegalArgumentException("The resource name is not valid");
}
String suffix = name.substring(i+1);
IModelCustomLoader loader = instances.get(suffix);
if (loader == null)
{
FMLLog.severe("The resource name %s is not supported", resource);
throw new IllegalArgumentException("The resource name is not supported");
}
return loader.loadInstance(resource);
}
public static Collection<String> getSupportedSuffixes()
{
return instances.keySet();
}
static
{
registerModelHandler(new ObjModelLoader());
registerModelHandler(new TechneModelLoader());
}
}
*/

View File

@@ -1,17 +0,0 @@
package com.kitsu.medievalcraft.model_loader;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public interface IModelCustom
{
String getType();
@SideOnly(Side.CLIENT)
void renderAll();
@SideOnly(Side.CLIENT)
void renderOnly(String... groupNames);
@SideOnly(Side.CLIENT)
void renderPart(String partName);
@SideOnly(Side.CLIENT)
void renderAllExcept(String... excludedGroupNames);
}

View File

@@ -1,30 +0,0 @@
package com.kitsu.medievalcraft.model_loader;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.model.ModelFormatException;
/**
* Instances of this class act as factories for their model type
*
* @author cpw
*
*/
public interface IModelCustomLoader {
/**
* Get the main type name for this loader
* @return the type name
*/
String getType();
/**
* Get resource suffixes this model loader recognizes
* @return a list of suffixes
*/
String[] getSuffixes();
/**
* Load a model instance from the supplied path
* @param resource The ResourceLocation of the model
* @return A model instance
* @throws ModelFormatException if the model format is not correct
*/
IModelCustom loadInstance(ResourceLocation resource) throws ModelFormatException;
}

View File

@@ -1,33 +0,0 @@
package com.kitsu.medievalcraft.model_loader;
/**
* Thrown if there is a problem parsing the model
*
* @author cpw
*
*/
public class ModelFormatException extends RuntimeException {
private static final long serialVersionUID = 2023547503969671835L;
public ModelFormatException()
{
super();
}
public ModelFormatException(String message, Throwable cause)
{
super(message, cause);
}
public ModelFormatException(String message)
{
super(message);
}
public ModelFormatException(Throwable cause)
{
super(cause);
}
}

View File

@@ -1,92 +0,0 @@
/*
package com.kitsu.medievalcraft.model_loader.obj;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.renderer.WorldRenderer;
import net.minecraft.util.Vec3;
import net.minecraftforge.client.model.obj.TextureCoordinate;
import net.minecraftforge.client.model.obj.Vertex;
public class Face
{
public Vertex[] vertices;
public Vertex[] vertexNormals;
public Vertex faceNormal;
public TextureCoordinate[] textureCoordinates;
@SideOnly(Side.CLIENT)
public void addFaceForRender(WorldRenderer worldRenderer)
{
addFaceForRender(worldRenderer, 0.0005F);
}
@SideOnly(Side.CLIENT)
public void addFaceForRender(WorldRenderer worldRenderer, float textureOffset)
{
if (faceNormal == null)
{
faceNormal = this.calculateFaceNormal();
}
//worldRenderer.normal(faceNormal.x, faceNormal.y, faceNormal.z);
float averageU = 0F;
float averageV = 0F;
if ((textureCoordinates != null) && (textureCoordinates.length > 0))
{
for (int i = 0; i < textureCoordinates.length; ++i)
{
averageU += textureCoordinates[i].u;
averageV += textureCoordinates[i].v;
}
averageU = averageU / textureCoordinates.length;
averageV = averageV / textureCoordinates.length;
}
float offsetU, offsetV;
for (int i = 0; i < vertices.length; ++i)
{
if ((textureCoordinates != null) && (textureCoordinates.length > 0))
{
offsetU = textureOffset;
offsetV = textureOffset;
if (textureCoordinates[i].u > averageU)
{
offsetU = -offsetU;
}
if (textureCoordinates[i].v > averageV)
{
offsetV = -offsetV;
}
worldRenderer.pos(vertices[i].x, vertices[i].y, vertices[i].z).tex(textureCoordinates[i].u + offsetU,
textureCoordinates[i].v + offsetV);
}
else
{
worldRenderer.pos(vertices[i].x, vertices[i].y, vertices[i].z);
}
}
}
public Vertex calculateFaceNormal()
{
Vec3 v0 = new Vec3(vertices[1].x - vertices[0].x, vertices[1].y - vertices[0].y, vertices[1].z - vertices[0].z);
//Vec3 v1 = new Vec3(, , );
//Vec3 v2 = new Vec3(vertices[2].x - vertices[0].x, vertices[2].y - vertices[0].y, vertices[2].z - vertices[0].z);
Vec3 normalVector = null;
//normalVector = v1.crossProduct(v2).normalize();
return new Vertex((float) normalVector.xCoord, (float) normalVector.yCoord, (float) normalVector.zCoord);
}
}
*/

View File

@@ -35,6 +35,8 @@ public class RenderId {
public static int shelfFourID; public static int shelfFourID;
public static int fireboxID; public static int fireboxID;
public static int forgeID; public static int forgeID;
public static int cannon_28ID;
public static int my28CannonBallID;
public static void init(){ public static void init(){
myironingotID = RenderingRegistry.getNextAvailableRenderId(); myironingotID = RenderingRegistry.getNextAvailableRenderId();
@@ -68,6 +70,8 @@ public class RenderId {
shelfFourID = RenderingRegistry.getNextAvailableRenderId(); shelfFourID = RenderingRegistry.getNextAvailableRenderId();
fireboxID = RenderingRegistry.getNextAvailableRenderId(); fireboxID = RenderingRegistry.getNextAvailableRenderId();
forgeID = RenderingRegistry.getNextAvailableRenderId(); forgeID = RenderingRegistry.getNextAvailableRenderId();
cannon_28ID = RenderingRegistry.getNextAvailableRenderId();
my28CannonBallID = RenderingRegistry.getNextAvailableRenderId();
testBlockID = RenderingRegistry.getNextAvailableRenderId(); testBlockID = RenderingRegistry.getNextAvailableRenderId();
} }

View File

@@ -5,6 +5,7 @@ import com.kitsu.medievalcraft.item.ModItems;
import com.kitsu.medievalcraft.renderer.blocks.BarrelLidRender; import com.kitsu.medievalcraft.renderer.blocks.BarrelLidRender;
import com.kitsu.medievalcraft.renderer.blocks.SmallBarrelRender; import com.kitsu.medievalcraft.renderer.blocks.SmallBarrelRender;
import com.kitsu.medievalcraft.renderer.blocks.TestBlockRenderer; import com.kitsu.medievalcraft.renderer.blocks.TestBlockRenderer;
import com.kitsu.medievalcraft.renderer.blocks.cannons.Render_Cannon_28;
import com.kitsu.medievalcraft.renderer.blocks.crucibles.IronOreCrucibleRenderer; import com.kitsu.medievalcraft.renderer.blocks.crucibles.IronOreCrucibleRenderer;
import com.kitsu.medievalcraft.renderer.blocks.crucibles.LapisCrucibleRenderer; import com.kitsu.medievalcraft.renderer.blocks.crucibles.LapisCrucibleRenderer;
import com.kitsu.medievalcraft.renderer.blocks.crucibles.RedstoneCrucibleRenderer; import com.kitsu.medievalcraft.renderer.blocks.crucibles.RedstoneCrucibleRenderer;
@@ -32,6 +33,7 @@ import com.kitsu.medievalcraft.renderer.itemrenderer.IRITSpear;
import com.kitsu.medievalcraft.renderer.itemrenderer.ItemRendererITModelArrow; import com.kitsu.medievalcraft.renderer.itemrenderer.ItemRendererITModelArrow;
import com.kitsu.medievalcraft.renderer.itemrenderer.ItemRendererLongbow; import com.kitsu.medievalcraft.renderer.itemrenderer.ItemRendererLongbow;
import com.kitsu.medievalcraft.renderer.itemrenderer.ItemRendererModelArrow; import com.kitsu.medievalcraft.renderer.itemrenderer.ItemRendererModelArrow;
import com.kitsu.medievalcraft.renderer.itemrenderer.cannons.IR_Cannon_28;
import com.kitsu.medievalcraft.renderer.itemrenderer.crucibles.IRCrucible; import com.kitsu.medievalcraft.renderer.itemrenderer.crucibles.IRCrucible;
import com.kitsu.medievalcraft.renderer.itemrenderer.crucibles.empty.IRSlackCrucible; import com.kitsu.medievalcraft.renderer.itemrenderer.crucibles.empty.IRSlackCrucible;
import com.kitsu.medievalcraft.renderer.itemrenderer.crucibles.empty.IRTanninCrucible; import com.kitsu.medievalcraft.renderer.itemrenderer.crucibles.empty.IRTanninCrucible;
@@ -64,6 +66,7 @@ import com.kitsu.medievalcraft.renderer.itemrenderer.weapons.NewIronShield;
import com.kitsu.medievalcraft.tileents.TileEntitySmallBarrel; import com.kitsu.medievalcraft.tileents.TileEntitySmallBarrel;
import com.kitsu.medievalcraft.tileents.TileEntitySmallLid; import com.kitsu.medievalcraft.tileents.TileEntitySmallLid;
import com.kitsu.medievalcraft.tileents.TileEntityTestBlock; import com.kitsu.medievalcraft.tileents.TileEntityTestBlock;
import com.kitsu.medievalcraft.tileents.cannon.TileCannon_28;
import com.kitsu.medievalcraft.tileents.crucible.TileCrucibleIronOre; import com.kitsu.medievalcraft.tileents.crucible.TileCrucibleIronOre;
import com.kitsu.medievalcraft.tileents.crucible.TileCrucibleLapis; import com.kitsu.medievalcraft.tileents.crucible.TileCrucibleLapis;
import com.kitsu.medievalcraft.tileents.crucible.TileCrucibleRedstone; import com.kitsu.medievalcraft.tileents.crucible.TileCrucibleRedstone;
@@ -117,6 +120,8 @@ public class RendererRegistry {
MinecraftForgeClient.registerItemRenderer(ModItems.itemITSpear, new IRITSpear()); MinecraftForgeClient.registerItemRenderer(ModItems.itemITSpear, new IRITSpear());
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(ModBlocks.cannon_28), new IR_Cannon_28());
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(ModBlocks.emptySoftCrucible), new ItemRendererSECrucible()); MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(ModBlocks.emptySoftCrucible), new ItemRendererSECrucible());
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(ModBlocks.emptyCookedCrucible), new ItemRendererECCrucible()); MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(ModBlocks.emptyCookedCrucible), new ItemRendererECCrucible());
@@ -178,7 +183,12 @@ public class RendererRegistry {
ClientRegistry.bindTileEntitySpecialRenderer(TileRedstoneIngot.class, new RedstoneIngotRenderer()); ClientRegistry.bindTileEntitySpecialRenderer(TileRedstoneIngot.class, new RedstoneIngotRenderer());
ClientRegistry.bindTileEntitySpecialRenderer(TileLapisIngot.class, new LapisIngotRenderer()); ClientRegistry.bindTileEntitySpecialRenderer(TileLapisIngot.class, new LapisIngotRenderer());
ClientRegistry.bindTileEntitySpecialRenderer(TileCannon_28.class, new Render_Cannon_28());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityTestBlock.class, new TestBlockRenderer()); ClientRegistry.bindTileEntitySpecialRenderer(TileEntityTestBlock.class, new TestBlockRenderer());
} }

View File

@@ -0,0 +1,65 @@
package com.kitsu.medievalcraft.renderer.blocks.cannons;
import org.lwjgl.opengl.GL11;
import com.kitsu.medievalcraft.entity.EntityCannonBall;
import com.kitsu.medievalcraft.entity.EntityITSpear;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.entity.Render;
import net.minecraft.entity.Entity;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.model.AdvancedModelLoader;
import net.minecraftforge.client.model.IModelCustom;
public class Render_CannonBall_Iron extends Render
{
//private static final ResourceLocation arrowTextures = new ResourceLocation("textures/entity/arrow.png");
private static final ResourceLocation arrowTextures = new ResourceLocation("kitsumedievalcraft:textures/items/Cannon.png");
public static final ResourceLocation MODEL = new ResourceLocation("kitsumedievalcraft:models/cannon_ball.obj");
public static final ResourceLocation TEXTURE = new ResourceLocation("kitsumedievalcraft:models/Cannon.png");
public IModelCustom model = AdvancedModelLoader.loadModel(MODEL);
public void doRender(EntityCannonBall ent, double x, double y, double z, float p_76986_8_, float p_76986_9_)
{
GL11.glPushMatrix();
float scale = 0.01f;
GL11.glScalef(scale, scale, scale);
GL11.glTranslatef((float)x, (float)y, (float)z );
//GL11.glRotatef(ent.prevRotationYaw + (ent.rotationYaw - ent.prevRotationYaw) * p_76986_9_ - 90.0F, 0.0F, 1.0F, 0.0F);
//GL11.glRotatef(ent.prevRotationPitch + (ent.rotationPitch - ent.prevRotationPitch) * p_76986_9_, 0.0F, 0.0F, 1.0F);
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
model.renderAll();
GL11.glPopMatrix();
}
protected ResourceLocation getEntityTexture(EntityCannonBall p_110775_1_)
{
return arrowTextures;
}
/**
* Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture.
*/
protected ResourceLocation getEntityTexture(Entity p_110775_1_)
{
return this.getEntityTexture((EntityCannonBall)p_110775_1_);
}
/**
* Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then
* handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic
* (Render<T extends Entity) and this method has signature public void func_76986_a(T entity, double d, double d1,
* double d2, float f, float f1). But JAD is pre 1.5 so doesn't do that.
*/
public void doRender(Entity p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_, float p_76986_9_)
{
//System.out.println("doRender Ran");
this.doRender((EntityCannonBall)p_76986_1_, p_76986_2_, p_76986_4_, p_76986_6_, p_76986_8_, p_76986_9_);
}
}

View File

@@ -0,0 +1,65 @@
package com.kitsu.medievalcraft.renderer.blocks.cannons;
import org.lwjgl.opengl.GL11;
import com.kitsu.medievalcraft.entity.EntityCannonBall;
import com.kitsu.medievalcraft.entity.ProjectileCannonBall;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.entity.Render;
import net.minecraft.entity.Entity;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.model.AdvancedModelLoader;
import net.minecraftforge.client.model.IModelCustom;
public class Render_CannonBall_Projectile extends Render
{
//private static final ResourceLocation arrowTextures = new ResourceLocation("textures/entity/arrow.png");
private static final ResourceLocation arrowTextures = new ResourceLocation("kitsumedievalcraft:textures/items/Cannon.png");
public static final ResourceLocation MODEL = new ResourceLocation("kitsumedievalcraft:models/cannon_ball.obj");
public static final ResourceLocation TEXTURE = new ResourceLocation("kitsumedievalcraft:models/Cannon.png");
public IModelCustom model = AdvancedModelLoader.loadModel(MODEL);
public void doRender(ProjectileCannonBall ent, double x, double y, double z, float p_76986_8_, float p_76986_9_)
{
GL11.glPushMatrix();
float scale = 0.01f;
GL11.glScalef(scale, scale, scale);
GL11.glTranslatef((float)x, (float)y, (float)z );
//GL11.glRotatef(ent.prevRotationYaw + (ent.rotationYaw - ent.prevRotationYaw) * p_76986_9_ - 90.0F, 0.0F, 1.0F, 0.0F);
//GL11.glRotatef(ent.prevRotationPitch + (ent.rotationPitch - ent.prevRotationPitch) * p_76986_9_, 0.0F, 0.0F, 1.0F);
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
model.renderAll();
GL11.glPopMatrix();
}
protected ResourceLocation getEntityTexture(ProjectileCannonBall p_110775_1_)
{
return arrowTextures;
}
/**
* Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture.
*/
protected ResourceLocation getEntityTexture(Entity p_110775_1_)
{
return this.getEntityTexture((ProjectileCannonBall)p_110775_1_);
}
/**
* Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then
* handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic
* (Render<T extends Entity) and this method has signature public void func_76986_a(T entity, double d, double d1,
* double d2, float f, float f1). But JAD is pre 1.5 so doesn't do that.
*/
public void doRender(Entity p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_, float p_76986_9_)
{
//System.out.println("doRender Ran");
this.doRender((ProjectileCannonBall)p_76986_1_, p_76986_2_, p_76986_4_, p_76986_6_, p_76986_8_, p_76986_9_);
}
}

View File

@@ -0,0 +1,111 @@
package com.kitsu.medievalcraft.renderer.blocks.cannons;
import org.lwjgl.opengl.GL11;
import com.kitsu.medievalcraft.block.ModBlocks;
import com.kitsu.medievalcraft.tileents.cannon.TileCannon_28;
import com.kitsu.medievalcraft.tileents.machine.TileEntityAnvilForge;
import cpw.mods.fml.client.FMLClientHandler;
import net.minecraft.block.Block;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.entity.RenderItem;
import net.minecraft.client.renderer.entity.RenderManager;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ResourceLocation;
import net.minecraft.world.World;
import net.minecraftforge.client.model.AdvancedModelLoader;
import net.minecraftforge.client.model.IModelCustom;
public class Render_Cannon_28 extends TileEntitySpecialRenderer {
EntityItem entItem = null;
private static final ResourceLocation MODEL_CRUCIBLE = new ResourceLocation("kitsumedievalcraft:models/Cannon.obj");
private static final ResourceLocation TEXTURE = new ResourceLocation("kitsumedievalcraft:models/Cannon.png");
private IModelCustom model = AdvancedModelLoader.loadModel(MODEL_CRUCIBLE);
@Override
public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float scale) {
TileCannon_28 tileEntity = (TileCannon_28)tile;
GL11.glPushMatrix();
GL11.glTranslatef((float) x, (float) y, (float) z);
/*if(tileEntity.getStackInSlot(0)==null){
entItem=null;
}
if(tileEntity.getStackInSlot(0)!=null){
entItem = new EntityItem(tileEntity.getWorldObj(), x, y, z, tileEntity.getStackInSlot(0));
GL11.glPushMatrix();
this.entItem.hoverStart = 0.0F;
RenderItem.renderInFrame = true;
GL11.glRotatef(90, 1, 0, 0);
RenderManager.instance.renderEntityWithPosYaw(this.entItem, 0.48D, 0.25D, -1.0D, 0.0F, 0.0F);
RenderItem.renderInFrame = false;
GL11.glPopMatrix();
tileEntity.markForUpdate();
tileEntity.markDirty();
}*/
renderBlock(tileEntity, tile.getWorldObj(), tile.xCoord,tile.yCoord, tile.zCoord, ModBlocks.cannon_28);
tileEntity.markForUpdate();
tileEntity.markDirty();
GL11.glPopMatrix();
}
public void renderBlock(TileCannon_28 tl, World world, int i, int j,int k, Block block) {
Tessellator tessellator = Tessellator.instance;
// This will make your block brightness dependent from surroundings
// lighting.
float f = block.getLightOpacity(world, i, j, k);
int l = world.getLightBrightnessForSkyBlocks(i, j, k, 0);
int l1 = l % 65536;
int l2 = l / 65536;
tessellator.setNormal(0.0F, 1.0F, 0.0F);
//OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit,(float) l1, (float) l2);
/*
* This will rotate your model corresponding to player direction that
* was when you placed the block. If you want this to work, add these
* lines to onBlockPlacedBy method in your block class. int dir =
* MathHelper.floor_double((double)((player.rotationYaw * 4F) / 360F) +
* 0.5D) & 3; world.setBlockMetadataWithNotify(x, y, z, dir, 0);
*/
int dir = world.getBlockMetadata(i, j, k);
GL11.glPushMatrix();
//GL11.glRotatef(15F, 0F, 1F, 0F);
float scale = 1.05f;
GL11.glScalef(scale, scale, scale);
if(dir == 0){
GL11.glTranslatef(0.48F, 0.5F, 0.7F);
GL11.glRotated(180F, 0.0, 1.0F, 0.0F);
}
if(dir == 1){
GL11.glTranslatef(0.3F, 0.5F, 0.48F);
GL11.glRotated(90F, 0.0, 1.0F, 0.0F);
}
if(dir == 2){
GL11.glTranslatef(0.48F, 0.5F, 0.3F);
GL11.glRotated(0F, 0.0, 1.0F, 0.0F);
}
if(dir == 3){
GL11.glTranslatef(0.7F, 0.5F, 0.48F);
GL11.glRotated(-90F, 0.0, 1.0F, 0.0F);
}
//
FMLClientHandler.instance().getClient().renderEngine.bindTexture(TEXTURE);
/*
* Place your rendering code here.
*/
this.model.renderAll();
GL11.glPopMatrix();
}
}

View File

@@ -0,0 +1,147 @@
package com.kitsu.medievalcraft.renderer.itemrenderer.cannons;
import org.lwjgl.opengl.GL11;
import net.minecraft.client.Minecraft;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.IItemRenderer;
import net.minecraftforge.client.IItemRenderer.ItemRenderType;
import net.minecraftforge.client.IItemRenderer.ItemRendererHelper;
import net.minecraftforge.client.model.AdvancedModelLoader;
import net.minecraftforge.client.model.IModelCustom;
public class IR_Cannon_28 implements IItemRenderer {
public static final ResourceLocation MODEL_CRUCIBLE = new ResourceLocation("kitsumedievalcraft:models/Cannon.obj");
public static final ResourceLocation TEXTURE = new ResourceLocation("kitsumedievalcraft:models/Cannon.png");
public IModelCustom model = AdvancedModelLoader.loadModel(MODEL_CRUCIBLE);
@Override
public boolean handleRenderType(ItemStack item, ItemRenderType type) {
switch(type) {
case EQUIPPED: {
return true;
}
case EQUIPPED_FIRST_PERSON: {
return true;
}
case INVENTORY: {
return true;
}
case ENTITY: {
return true;
}
default: return false;
}
}
@Override
public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item,
ItemRendererHelper helper) {
switch(type) {
case EQUIPPED: {
return helper == ItemRendererHelper.BLOCK_3D;
}
case EQUIPPED_FIRST_PERSON: {
return helper == ItemRendererHelper.EQUIPPED_BLOCK;
}
case INVENTORY: {
return helper == ItemRendererHelper.INVENTORY_BLOCK;
}
case ENTITY: {
return (helper == ItemRendererHelper.ENTITY_BOBBING ||
helper == ItemRendererHelper.ENTITY_ROTATION ||
helper == ItemRendererHelper.BLOCK_3D);
}
default: return false;
}
}
@Override
public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
switch(type) {
case EQUIPPED: {
GL11.glPushMatrix();
float scale = 1.0F;
GL11.glScalef(scale, scale, scale);
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
//GL11.glRotatef(22F, 0.0F, 0.0F, 1.0F);
//GL11.glRotatef(-90F, 0.0F, 1.0F, 0.0F);
GL11.glTranslatef(0.7F, 0.3F, 0.0F);
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
model.renderAll();
GL11.glPopMatrix();
} break;
case EQUIPPED_FIRST_PERSON: {
float f = 0.8F;
GL11.glPushMatrix();
GL11.glScalef(f, f, f);
GL11.glTranslatef(0.5F, 1.F, 1.0F);
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
GL11.glRotatef(-50F, 0.0F, 1.0F, 0.0F);
//GL11.glRotatef(-45F, 0.0F, 1.0F, 0.0F);
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
model.renderAll();
GL11.glPopMatrix();
} break;
case INVENTORY: {
GL11.glPushMatrix();
GL11.glEnable(GL11.GL_TEXTURE_2D);
float scale = 0.8F;
GL11.glScalef(scale, scale, scale);
//GL11.glRotatef(90, 1.0F, 0.0F, 0.0F);
GL11.glTranslatef(0.0F, -0.1F, 0.35F);
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
model.renderAll();
GL11.glPopMatrix();
} break;
case ENTITY: {
GL11.glPushMatrix();
//GL11.glScalef(1.75F, 1.75F, 1.75F);
//GL11.glTranslatef(0.0F, 0.0F, 0.0F);
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
model.renderAll();
GL11.glPopMatrix();
} break;
default:
break;
}
}
}

View File

@@ -141,8 +141,4 @@ public class IRForgeAnvil implements IItemRenderer {
break; break;
} }
} }
}
}

View File

@@ -1,5 +1,6 @@
package com.kitsu.medievalcraft.tileents; package com.kitsu.medievalcraft.tileents;
import com.kitsu.medievalcraft.tileents.cannon.TileCannon_28;
import com.kitsu.medievalcraft.tileents.crucible.TileCrucibleIronOre; import com.kitsu.medievalcraft.tileents.crucible.TileCrucibleIronOre;
import com.kitsu.medievalcraft.tileents.crucible.TileCrucibleLapis; import com.kitsu.medievalcraft.tileents.crucible.TileCrucibleLapis;
import com.kitsu.medievalcraft.tileents.crucible.TileCrucibleRedstone; import com.kitsu.medievalcraft.tileents.crucible.TileCrucibleRedstone;
@@ -63,6 +64,8 @@ public class TileEntRegister {
GameRegistry.registerTileEntity(TileRedstoneIngot.class, "RedstoneIngot"); GameRegistry.registerTileEntity(TileRedstoneIngot.class, "RedstoneIngot");
GameRegistry.registerTileEntity(TileLapisIngot.class, "LapisIngot"); GameRegistry.registerTileEntity(TileLapisIngot.class, "LapisIngot");
GameRegistry.registerTileEntity(TileCannon_28.class, "Cannon_28");
} }
} }

View File

@@ -0,0 +1,12 @@
package com.kitsu.medievalcraft.tileents.cannon;
import net.minecraft.tileentity.TileEntity;
public class TileCannonBall28 extends TileEntity {
private String tileCannonBall28;
public TileCannonBall28(){
}
}

View File

@@ -0,0 +1,235 @@
package com.kitsu.medievalcraft.tileents.cannon;
import com.kitsu.medievalcraft.block.ModBlocks;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Items;
import net.minecraft.inventory.IInventory;
import net.minecraft.inventory.ISidedInventory;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import net.minecraft.network.NetworkManager;
import net.minecraft.network.Packet;
import net.minecraft.network.play.server.S35PacketUpdateTileEntity;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
public class TileCannon_28 extends TileEntity implements IInventory, ISidedInventory{
private String tileCannon_28;
private ItemStack[] inv;
private NBTTagCompound tag = new NBTTagCompound();
private int ticks;
public boolean isOn;
public TileCannon_28(){
this.inv = new ItemStack[2];
}
@Override
public int getSizeInventory() {
return this.inv.length;
}
@Override
public ItemStack getStackInSlot(int slot) {
return this.inv[slot];
}
@Override
public ItemStack decrStackSize(int p_70298_1_, int p_70298_2_)
{
if (this.inv[p_70298_1_] != null)
{
ItemStack itemstack;
if (this.inv[p_70298_1_].stackSize <= p_70298_2_)
{
itemstack = this.inv[p_70298_1_];
this.inv[p_70298_1_] = null;
this.markForUpdate();
this.markDirty();
return itemstack;
}
itemstack = this.inv[p_70298_1_].splitStack(p_70298_2_);
if (this.inv[p_70298_1_].stackSize == 0)
{
this.inv[p_70298_1_] = null;
}
this.markForUpdate();
this.markDirty();
return itemstack;
}
this.markForUpdate();
this.markDirty();
return null;
}
@Override
public ItemStack getStackInSlotOnClosing(int i)
{
if (this.inv[i] != null)
{
ItemStack itemstack = this.inv[i];
this.inv[i] = null;
this.markForUpdate();
this.markDirty();
return itemstack;
}
else
{
this.markForUpdate();
this.markDirty();
return null;
}
}
@Override
public void setInventorySlotContents(int slot, ItemStack stack)
{
this.inv[slot] = stack;
if (stack != null && stack.stackSize > this.getInventoryStackLimit())
{
stack.stackSize = this.getInventoryStackLimit();
}
this.markForUpdate();
this.markDirty();
}
@Override
public String getInventoryName() {
return this.hasCustomInventoryName() ? this.tileCannon_28 : "tileCannon_28";
}
@Override
public boolean hasCustomInventoryName() {
return this.tileCannon_28 != null && this.tileCannon_28.length() > 0;
}
@Override
public int getInventoryStackLimit() {
return 9;
}
@Override
public boolean isUseableByPlayer(EntityPlayer player) {
return this.worldObj.getTileEntity(this.xCoord, this.yCoord, this.zCoord) != this ? false : player.getDistanceSq(this.xCoord + 0.5D, this.yCoord + 0.5D, this.zCoord + 0.5D) <= 64.0D;
}
@Override
public void openInventory() {}
@Override
public void closeInventory() {}
@Override
public boolean isItemValidForSlot(int slot, ItemStack itemstack) {
if(slot == 0 && itemstack.getItem() == Items.gunpowder){
return true;
}
if(slot == 1 && itemstack.getItem() == Item.getItemFromBlock(ModBlocks.cannonBall_28)){
return true;
}
return true;
}
public void markForUpdate(){
worldObj.markBlockForUpdate(this.xCoord, this.yCoord, this.zCoord);
}
@Override
public void readFromNBT(NBTTagCompound tagCompound) {
super.readFromNBT(tagCompound);
NBTTagList tagList = tagCompound.getTagList("Inventory", 10);
this.inv = new ItemStack[this.getSizeInventory()];
for (int i = 0; i < tagList.tagCount(); i++) {
NBTTagCompound tag = tagList.getCompoundTagAt(i);
byte slot = tag.getByte("Slot");
if (slot >= 0 && slot < this.inv.length) {
this.inv[slot] = ItemStack.loadItemStackFromNBT(tag);
}
}
if (tagCompound.hasKey("CustomName", 8)) {
this.tileCannon_28 = tagCompound.getString("CustomName");
}
}
@Override
public void writeToNBT(NBTTagCompound tagCompound) {
super.writeToNBT(tagCompound);
NBTTagList itemList = new NBTTagList();
for (int i = 0; i < inv.length; i++) {
//ItemStack stack = inv[i];
if (inv[i] != null) {
NBTTagCompound tag = new NBTTagCompound();
tag.setByte("Slot", (byte) i);
this.inv[i].writeToNBT(tag);
itemList.appendTag(tag);
}
}
tagCompound.setTag("Inventory", itemList);
}
@Override
public Packet getDescriptionPacket() {
NBTTagCompound tag = new NBTTagCompound();
this.writeToNBT(tag);
return new S35PacketUpdateTileEntity(xCoord, yCoord, zCoord, 998, tag);
}
@Override
public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt) {
readFromNBT(pkt.func_148857_g());
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
}
@Override
public void updateEntity() {
World world = getWorldObj();
int x = this.xCoord;
int y = this.yCoord;
int z = this.zCoord;
if(!world.isRemote){
if(this.isOn==true){
ticks++;
}
if(ticks>=100){
this.isOn=false;
ticks=0;
}
}
if (worldObj.isRemote) return;
}
@Override
public int[] getAccessibleSlotsFromSide(int p_94128_1_) {
// TODO Auto-generated method stub
return null;
}
@Override
public boolean canInsertItem(int p_102007_1_, ItemStack p_102007_2_, int p_102007_3_) {
// TODO Auto-generated method stub
return false;
}
@Override
public boolean canExtractItem(int p_102008_1_, ItemStack p_102008_2_, int p_102008_3_) {
// TODO Auto-generated method stub
return false;
}
}

View File

@@ -0,0 +1,11 @@
# Blender MTL File: 'cannon.blend'
# Material Count: 1
newmtl None
Ns 0
Ka 0.000000 0.000000 0.000000
Kd 0.8 0.8 0.8
Ks 0.8 0.8 0.8
d 1
illum 2
map_Kd /home/kitsudesktop/Development/Blends/Cannon.png

View File

@@ -0,0 +1,270 @@
# Blender v2.71 (sub 0) OBJ File: 'cannon.blend'
# www.blender.org
mtllib Cannon.mtl
o Cube_Cube.001
v -0.125000 -0.125000 -1.375000
v 0.125000 -0.125000 -1.375000
v -0.125000 0.125000 -1.375000
v -0.250000 -0.250000 0.650000
v -0.225000 -0.225000 -1.225000
v 0.225000 -0.225000 -1.225000
v 0.250000 -0.250000 0.650000
v -0.250000 0.250000 0.650000
v -0.225000 0.225000 -1.225000
v 0.225000 0.225000 -1.225000
v 0.250000 0.250000 0.650000
v -0.250000 -0.250000 -1.225000
v -0.250000 -0.250000 -1.375000
v 0.250000 -0.250000 -1.375000
v 0.250000 -0.250000 -1.225000
v -0.250000 0.250000 -1.225000
v -0.250000 0.250000 -1.375000
v 0.250000 0.250000 -1.375000
v 0.250000 0.250000 -1.225000
v 0.125000 0.125000 -1.375000
v -0.125000 0.125000 0.425000
v -0.125000 -0.125000 0.425000
v 0.125000 -0.125000 0.425000
v 0.125000 0.125000 0.425000
v -0.100940 -0.100940 0.650000
v 0.100940 -0.100940 0.650000
v -0.100940 0.100940 0.650000
v 0.100940 0.100940 0.650000
v -0.100940 -0.100940 0.725000
v 0.100940 -0.100940 0.725000
v -0.100940 0.100940 0.725000
v 0.100940 0.100940 0.725000
v 0.505154 -0.054574 -0.256972
v 0.505154 -0.054574 -0.150739
v 0.505154 0.051659 -0.256972
v 0.505154 0.051659 -0.150739
v 0.228100 0.051659 -0.256972
v 0.228100 0.051659 -0.150739
v 0.228100 -0.054574 -0.256972
v 0.228100 -0.054574 -0.150739
v -0.233931 -0.054574 -0.256972
v -0.233931 -0.054574 -0.150739
v -0.233931 0.051659 -0.256972
v -0.233931 0.051659 -0.150739
v -0.510986 0.051659 -0.256972
v -0.510986 0.051659 -0.150739
v -0.510986 -0.054574 -0.256972
v -0.510986 -0.054574 -0.150739
vt 0.425000 0.440784
vt 0.237500 0.440784
vt 0.227083 0.005226
vt 0.735416 0.625443
vt 0.735416 0.451232
vt 0.777083 0.451232
vt 0.006250 0.005226
vt 0.214583 0.005226
vt 0.204167 0.440784
vt 0.679167 0.005226
vt 0.866667 0.005226
vt 0.877083 0.440779
vt 0.645833 0.440779
vt 0.458333 0.440779
vt 0.447917 0.005226
vt 0.831249 0.451232
vt 0.831249 0.625443
vt 0.789583 0.625443
vt 0.006250 0.994774
vt 0.006250 0.820563
vt 0.016667 0.829274
vt 0.681250 0.625443
vt 0.681250 0.451232
vt 0.722916 0.451232
vt 0.343750 0.625447
vt 0.343750 0.451237
vt 0.385416 0.451237
vt 0.162500 0.494789
vt 0.214583 0.451237
vt 0.214583 0.625447
vt 0.204167 0.986063
vt 0.214583 0.994774
vt 0.993750 0.423329
vt 0.889583 0.005226
vt 0.889583 0.423329
vt 0.564583 0.869334
vt 0.668750 0.451232
vt 0.564583 0.451232
vt 0.214583 0.820563
vt 0.254436 0.699925
vt 0.233603 0.699925
vt 0.233603 0.629586
vt 0.152475 0.758175
vt 0.152475 0.687836
vt 0.214583 0.635900
vt 0.068359 0.758175
vt 0.214583 0.810111
vt 0.068359 0.687836
vt 0.006250 0.810111
vt 0.006250 0.635900
vt 0.227083 0.619134
vt 0.227083 0.548795
vt 0.311200 0.548795
vt 0.843749 0.602363
vt 0.843749 0.532024
vt 0.864582 0.532024
vt 0.857619 0.706234
vt 0.836786 0.706234
vt 0.836786 0.635895
vt 0.843749 0.451232
vt 0.864582 0.451232
vt 0.864582 0.521571
vt 0.296445 0.701728
vt 0.296445 0.738742
vt 0.266936 0.738742
vt 0.331250 0.538342
vt 0.227083 0.451237
vt 0.227083 0.538342
vt 0.681250 0.745051
vt 0.681250 0.708037
vt 0.710759 0.708037
vt 0.435417 0.005226
vt 0.777083 0.625443
vt 0.016667 0.440784
vt 0.668750 0.440779
vt 0.656250 0.005226
vt 0.789583 0.451232
vt 0.016667 0.986063
vt 0.722916 0.625443
vt 0.385416 0.625447
vt 0.204167 0.829274
vt 0.254436 0.629586
vt 0.311200 0.619134
vt 0.864582 0.602363
vt 0.857619 0.635895
vt 0.843749 0.521571
vt 0.266936 0.701728
vt 0.331250 0.451237
vt 0.710759 0.745051
vt 0.058333 0.494789
vt 0.006250 0.451237
vt 0.058333 0.581895
vt 0.889583 0.433782
vt 0.993750 0.851885
vt 0.993750 0.433782
vt 0.162500 0.581895
vt 0.006250 0.625447
vt 0.400513 0.697589
vt 0.400513 0.635900
vt 0.430022 0.635900
vt 0.397916 0.585068
vt 0.397916 0.523379
vt 0.427425 0.523379
vt 0.311200 0.691276
vt 0.266936 0.691276
vt 0.266936 0.629586
vt 0.725514 0.697585
vt 0.681250 0.697585
vt 0.681250 0.635895
vt 0.552083 0.869334
vt 0.447917 0.451232
vt 0.447917 0.869334
vt 0.794777 0.697585
vt 0.794777 0.635895
vt 0.824286 0.635895
vt 0.427425 0.451237
vt 0.427425 0.512926
vt 0.397916 0.512926
vt 0.738014 0.635895
vt 0.782277 0.635895
vt 0.782277 0.697585
vt 0.388013 0.697589
vt 0.343750 0.697589
vt 0.343750 0.635900
vt 0.993750 0.005226
vt 0.668750 0.869334
vt 0.889583 0.851885
vt 0.430022 0.697589
vt 0.427425 0.585068
vt 0.311200 0.629586
vt 0.725514 0.635895
vt 0.552083 0.451232
vt 0.824286 0.697585
vt 0.397916 0.451237
vt 0.738014 0.697585
vt 0.388013 0.635900
usemtl None
s off
f 9/1 5/2 4/3
f 17/4 13/5 12/6
f 11/7 7/8 6/9
f 5/10 6/11 7/12
f 10/13 9/14 8/15
f 19/16 15/17 14/18
f 15/19 19/20 10/21
f 13/22 14/23 15/24
f 18/25 17/26 16/27
f 20/28 18/29 14/30
f 5/31 12/32 15/19
f 21/33 20/34 24/35
f 20/36 23/37 24/38
f 10/21 19/20 16/39
f 16/39 12/32 5/31
f 27/40 31/41 32/42
f 25/43 27/44 8/45
f 26/46 25/43 4/47
f 28/48 26/46 7/49
f 27/44 28/48 11/50
f 30/51 32/52 31/53
f 26/54 28/55 32/56
f 26/57 30/58 29/59
f 25/60 29/61 31/62
f 36/63 34/64 33/65
f 22/66 24/67 23/68
f 48/69 46/70 45/71
f 8/72 9/1 4/3
f 16/73 17/4 12/6
f 10/74 11/7 6/9
f 4/75 5/10 7/12
f 11/76 10/13 8/15
f 18/77 19/16 14/18
f 6/78 15/19 10/21
f 12/79 13/22 15/24
f 19/80 18/25 16/27
f 6/78 5/31 15/19
f 9/81 10/21 16/39
f 9/81 16/39 5/31
f 28/82 27/40 32/42
f 4/47 25/43 8/45
f 7/49 26/46 4/47
f 11/50 28/48 7/49
f 8/45 27/44 11/50
f 29/83 30/51 31/53
f 30/84 26/54 32/56
f 25/85 26/57 29/59
f 27/86 25/60 31/62
f 35/87 36/63 33/65
f 21/88 24/67 22/66
f 47/89 48/69 45/71
f 3/90 17/91 18/29
f 17/91 3/90 1/92
f 23/93 1/94 22/95
f 2/96 14/30 13/97
f 35/98 37/99 38/100
f 39/101 33/102 34/103
f 38/104 40/105 34/106
f 35/107 33/108 39/109
f 22/110 3/111 21/112
f 43/113 45/114 46/115
f 47/116 41/117 42/118
f 46/119 48/120 42/121
f 43/122 41/123 47/124
f 20/28 3/90 18/29
f 2/96 20/28 14/30
f 13/97 17/91 1/92
f 3/125 20/34 21/33
f 2/126 23/37 20/36
f 2/127 1/94 23/93
f 1/92 2/96 13/97
f 36/128 35/98 38/100
f 40/129 39/101 34/103
f 36/130 38/104 34/106
f 37/131 35/107 39/109
f 1/132 3/111 22/110
f 44/133 43/113 46/115
f 48/134 47/116 42/118
f 44/135 46/119 42/121
f 45/136 43/122 47/124

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

View File

@@ -0,0 +1,11 @@
# Blender MTL File: 'cannon_ball.blend'
# Material Count: 1
newmtl None
Ns 0
Ka 0.000000 0.000000 0.000000
Kd 0.8 0.8 0.8
Ks 0.8 0.8 0.8
d 1
illum 2
map_Kd /home/kitsudesktop/Development/Blends/Cannon.png

View File

@@ -0,0 +1,278 @@
# Blender v2.71 (sub 0) OBJ File: 'cannon_ball.blend'
# www.blender.org
mtllib cannon_ball.mtl
o Sphere_Sphere.001
v -0.191342 0.461940 0.000000
v -0.353553 0.353553 0.000000
v -0.461940 0.191342 0.000000
v -0.500000 -0.000000 0.000000
v -0.461940 -0.191342 0.000000
v -0.353553 -0.353553 0.000000
v -0.191342 -0.461940 0.000000
v -0.000000 -0.500000 0.000000
v -0.135299 0.461940 -0.135299
v -0.250000 0.353553 -0.250000
v -0.326641 0.191342 -0.326641
v -0.353553 -0.000000 -0.353553
v -0.326641 -0.191342 -0.326641
v -0.250000 -0.353553 -0.250000
v -0.135299 -0.461940 -0.135299
v -0.000000 0.461940 -0.191342
v -0.000000 0.353553 -0.353553
v -0.000000 0.191342 -0.461940
v -0.000000 -0.000000 -0.500000
v -0.000000 -0.191342 -0.461940
v -0.000000 -0.353553 -0.353553
v -0.000000 -0.461940 -0.191342
v -0.000000 0.500000 0.000000
v 0.135299 0.461940 -0.135299
v 0.250000 0.353553 -0.250000
v 0.326641 0.191342 -0.326641
v 0.353553 -0.000000 -0.353553
v 0.326641 -0.191342 -0.326641
v 0.250000 -0.353553 -0.250000
v 0.135299 -0.461940 -0.135299
v 0.191342 0.461940 -0.000000
v 0.353553 0.353553 -0.000000
v 0.461940 0.191342 -0.000000
v 0.500000 -0.000000 -0.000000
v 0.461940 -0.191342 -0.000000
v 0.353553 -0.353553 -0.000000
v 0.191342 -0.461940 -0.000000
v 0.135299 0.461940 0.135299
v 0.250000 0.353553 0.250000
v 0.326641 0.191342 0.326641
v 0.353553 -0.000000 0.353553
v 0.326641 -0.191342 0.326641
v 0.250000 -0.353553 0.250000
v 0.135299 -0.461940 0.135299
v -0.000000 0.461940 0.191342
v -0.000000 0.353553 0.353553
v -0.000000 0.191342 0.461940
v -0.000000 -0.000000 0.500000
v -0.000000 -0.191342 0.461940
v -0.000000 -0.353553 0.353553
v -0.000000 -0.461940 0.191342
v -0.135299 0.461940 0.135299
v -0.250000 0.353553 0.250000
v -0.326641 0.191342 0.326641
v -0.353553 -0.000000 0.353553
v -0.326641 -0.191342 0.326641
v -0.250000 -0.353553 0.250000
v -0.135299 -0.461940 0.135299
vt 0.282973 0.603467
vt 0.154763 0.603467
vt 0.184175 0.527020
vt 0.302625 0.704900
vt 0.135111 0.704900
vt 0.309526 0.815877
vt 0.128210 0.815877
vt 0.302625 0.919502
vt 0.135111 0.919502
vt 0.282973 1.000000
vt 0.154763 1.000000
vt 0.743542 0.685153
vt 0.694710 0.744502
vt 0.619052 0.704111
vt 0.691937 0.327230
vt 0.691937 0.173593
vt 0.757620 0.215589
vt 0.016660 0.678766
vt 0.000000 0.787590
vt 0.266813 0.020059
vt 0.245107 0.162669
vt 0.152931 0.154361
vt 0.345969 0.077180
vt 0.329356 0.186330
vt 0.694710 0.827650
vt 0.782167 0.065979
vt 0.806452 0.157349
vt 0.066861 0.162669
vt 0.066861 0.364351
vt 0.000000 0.340690
vt 0.152931 0.372659
vt 0.245107 0.364351
vt 0.329356 0.340690
vt 0.743542 0.885890
vt 0.709282 0.965362
vt 0.909770 0.067428
vt 0.875510 0.158133
vt 0.770072 0.000000
vt 0.936794 0.001894
vt 0.176425 0.527020
vt 0.088567 0.506961
vt 0.266813 0.506961
vt 0.345969 0.449840
vt 0.812600 0.885106
vt 0.836885 0.963913
vt 1.000000 0.177091
vt 0.924342 0.217482
vt 0.612151 0.607518
vt 0.444637 0.607518
vt 0.464289 0.527020
vt 0.619052 0.711143
vt 0.437736 0.711143
vt 0.612151 0.822120
vt 0.444637 0.822120
vt 0.592499 0.923553
vt 0.464289 0.923553
vt 0.563087 1.000000
vt 0.493701 1.000000
vt 1.000000 0.330729
vt 0.924342 0.300630
vt 0.612781 0.506961
vt 0.591075 0.364351
vt 0.675324 0.340690
vt 0.522394 0.527020
vt 0.498899 0.372659
vt 0.326186 0.848253
vt 0.309526 0.739430
vt 0.373631 0.943554
vt 0.861432 0.825756
vt 0.861432 0.742608
vt 0.927115 0.700612
vt 0.909770 0.438342
vt 0.875510 0.358870
vt 0.591075 0.162669
vt 0.675324 0.186330
vt 0.498899 0.154361
vt 0.412829 0.364351
vt 0.412829 0.162669
vt 0.345969 0.340690
vt 0.345969 0.186330
vt 0.812600 0.684368
vt 0.839229 0.260198
vt 0.806452 0.358086
vt 0.757620 0.298737
vt 0.779823 0.787218
vt 0.782167 0.436893
vt 0.612781 0.020059
vt 0.691937 0.077180
vt 0.522394 0.000000
vt 0.434535 0.020059
vt 0.836885 0.592999
vt 0.709282 0.594448
vt 0.682258 0.528913
vt 0.253561 0.527020
vt 0.064105 0.583465
vt 0.176425 0.000000
vt 0.619052 0.857749
vt 0.000000 0.186330
vt 0.592499 0.527020
vt 0.691937 0.449839
vt 0.927115 0.854250
vt 0.848980 0.527020
usemtl None
s off
f 6/1 14/2 15/3
f 5/4 13/5 14/2
f 4/6 12/7 13/5
f 3/8 11/9 12/7
f 2/10 10/11 11/9
f 1/12 9/13 10/14
f 14/15 21/16 22/17
f 14/2 13/5 20/18
f 13/5 12/7 19/19
f 11/20 18/21 19/22
f 10/23 17/24 18/21
f 10/14 9/13 16/25
f 21/16 29/26 30/27
f 20/28 28/29 29/30
f 19/22 27/31 28/29
f 18/21 26/32 27/31
f 18/21 17/24 25/33
f 16/25 24/34 25/35
f 29/26 36/36 37/37
f 28/38 35/39 36/36
f 27/31 34/40 35/41
f 26/32 33/42 34/40
f 25/33 32/43 33/42
f 24/34 31/44 32/45
f 36/36 43/46 44/47
f 35/48 42/49 43/50
f 34/51 41/52 42/49
f 33/53 40/54 41/52
f 33/53 32/55 39/56
f 31/57 38/58 39/56
f 43/46 50/59 51/60
f 42/61 49/62 50/63
f 41/64 48/65 49/62
f 40/54 47/66 48/67
f 39/56 46/68 47/66
f 38/69 45/70 46/71
f 50/59 57/72 58/73
f 49/62 56/74 57/75
f 48/65 55/76 56/74
f 47/77 54/78 55/76
f 46/79 53/80 54/78
f 46/71 45/70 52/81
f 8/82 7/83 15/84
f 1/12 23/85 9/13
f 8/82 15/84 22/17
f 9/13 23/85 16/25
f 8/82 22/17 30/27
f 16/25 23/85 24/34
f 8/82 30/27 37/37
f 24/34 23/85 31/44
f 8/82 37/37 44/47
f 31/44 23/85 38/69
f 8/82 44/47 51/60
f 38/69 23/85 45/70
f 8/82 51/60 58/73
f 45/70 23/85 52/81
f 8/82 58/73 7/83
f 57/72 6/86 7/83
f 56/74 5/87 6/88
f 55/76 4/89 5/87
f 54/78 3/90 4/89
f 53/91 2/92 3/93
f 52/81 1/12 2/92
f 52/81 23/85 1/12
f 7/94 6/1 15/3
f 6/1 5/4 14/2
f 5/4 4/6 13/5
f 4/6 3/8 12/7
f 3/8 2/10 11/9
f 2/92 1/12 10/14
f 15/84 14/15 22/17
f 21/95 14/2 20/18
f 20/18 13/5 19/19
f 12/96 11/20 19/22
f 11/20 10/23 18/21
f 17/97 10/14 16/25
f 22/17 21/16 30/27
f 21/98 20/28 29/30
f 20/28 19/22 28/29
f 19/22 18/21 27/31
f 26/32 18/21 25/33
f 17/97 16/25 25/35
f 30/27 29/26 37/37
f 29/26 28/38 36/36
f 28/29 27/31 35/41
f 27/31 26/32 34/40
f 26/32 25/33 33/42
f 25/35 24/34 32/45
f 37/37 36/36 44/47
f 36/99 35/48 43/50
f 35/48 34/51 42/49
f 34/51 33/53 41/52
f 40/54 33/53 39/56
f 32/55 31/57 39/56
f 44/47 43/46 51/60
f 43/100 42/61 50/63
f 42/61 41/64 49/62
f 41/52 40/54 48/67
f 40/54 39/56 47/66
f 39/101 38/69 46/71
f 51/60 50/59 58/73
f 50/63 49/62 57/75
f 49/62 48/65 56/74
f 48/65 47/77 55/76
f 47/77 46/79 54/78
f 53/91 46/71 52/81
f 58/73 57/72 7/83
f 57/75 56/74 6/88
f 56/74 55/76 5/87
f 55/76 54/78 4/89
f 54/102 53/91 3/93
f 53/91 52/81 2/92