commit
fbfb5767c8
1
.gradle/2.0/taskArtifacts/cache.properties
Normal file
1
.gradle/2.0/taskArtifacts/cache.properties
Normal file
@ -0,0 +1 @@
|
||||
#Thu May 25 13:06:54 CEST 2017
|
BIN
.gradle/2.0/taskArtifacts/cache.properties.lock
Normal file
BIN
.gradle/2.0/taskArtifacts/cache.properties.lock
Normal file
Binary file not shown.
BIN
.gradle/2.0/taskArtifacts/fileSnapshots.bin
Normal file
BIN
.gradle/2.0/taskArtifacts/fileSnapshots.bin
Normal file
Binary file not shown.
BIN
.gradle/2.0/taskArtifacts/taskArtifacts.bin
Normal file
BIN
.gradle/2.0/taskArtifacts/taskArtifacts.bin
Normal file
Binary file not shown.
7
CHANGELOG.txt
Normal file
7
CHANGELOG.txt
Normal file
@ -0,0 +1,7 @@
|
||||
04/July/2016:
|
||||
- First import to github
|
||||
- Fix chat occurence to 1.7.10
|
||||
|
||||
05/July/2016
|
||||
- Add new 3D world and inventory render for blocks
|
||||
- Delete unused files
|
28
CREDITS-fml.txt
Normal file
28
CREDITS-fml.txt
Normal file
@ -0,0 +1,28 @@
|
||||
This is Forge Mod Loader.
|
||||
|
||||
You can find the source code at all times at https://github.com/MinecraftForge/FML
|
||||
|
||||
This minecraft mod is a clean open source implementation of a mod loader for minecraft servers
|
||||
and minecraft clients.
|
||||
|
||||
The code is authored by cpw.
|
||||
|
||||
It began by partially implementing an API defined by the client side ModLoader, authored by Risugami.
|
||||
http://www.minecraftforum.net/topic/75440-
|
||||
This support has been dropped as of Minecraft release 1.7, as Risugami no longer maintains ModLoader.
|
||||
|
||||
It also contains suggestions and hints and generous helpings of code from LexManos, author of MinecraftForge.
|
||||
http://www.minecraftforge.net/
|
||||
|
||||
Additionally, it contains an implementation of topological sort based on that
|
||||
published at http://keithschwarz.com/interesting/code/?dir=topological-sort
|
||||
|
||||
It also contains code from the Maven project for performing versioned dependency
|
||||
resolution. http://maven.apache.org/
|
||||
|
||||
It also contains a partial repackaging of the javaxdelta library from http://sourceforge.net/projects/javaxdelta/
|
||||
with credit to it's authors.
|
||||
|
||||
Forge Mod Loader downloads components from the Minecraft Coder Pack
|
||||
(http://mcp.ocean-labs.de/index.php/Main_Page) with kind permission from the MCP team.
|
||||
|
491
LICENSE-fml.txt
Normal file
491
LICENSE-fml.txt
Normal file
@ -0,0 +1,491 @@
|
||||
This minecraft mod, Forge Mod Loader, including all parts herein except as noted below,
|
||||
is licensed under the GNU LGPL v2.1 or later.
|
||||
|
||||
Homepage: https://github.com/MinecraftForge/FML
|
||||
|
||||
This software includes portions from the Apache Maven project at
|
||||
http://maven.apache.org/ specifically the ComparableVersion.java code. It is
|
||||
included based on guidelines at
|
||||
http://www.softwarefreedom.org/resources/2007/gpl-non-gpl-collaboration.html
|
||||
with notices intact. The only change is a non-functional change of package name.
|
||||
|
||||
This software contains a partial repackaging of javaxdelta, a BSD licensed program for generating
|
||||
binary differences and applying them, sourced from the subversion at http://sourceforge.net/projects/javaxdelta/
|
||||
authored by genman, heikok, pivot.
|
||||
The only changes are to replace some Trove collection types with standard Java collections, and repackaged.
|
||||
|
||||
|
||||
=== MCP Data ===
|
||||
This software includes data from the Minecraft Coder Pack (MCP), with kind permission
|
||||
from them. The license to MCP data is not transitive - distribution of this data by
|
||||
third parties requires independent licensing from the MCP team. This data is not
|
||||
redistributable without permission from the MCP team.
|
||||
|
||||
=== Sharing ===
|
||||
I grant permission for some parts of FML to be redistributed outside the terms of the LGPL, for the benefit of
|
||||
the minecraft modding community. All contributions to these parts should be licensed under the same additional grant.
|
||||
|
||||
-- Runtime patcher --
|
||||
License is granted to redistribute the runtime patcher code (common/cpw/mods/fml/patcher and subdirectories) under
|
||||
any alternative open source license as classified by the OSI (http://opensource.org/licenses)
|
||||
|
||||
-- ASM transformers --
|
||||
License is granted to redistribute the ASM transformer code (common/cpw/mods/fml/common/asm/ and subdirectories)
|
||||
under any alternative open source license as classified by the OSI (http://opensource.org/licenses)
|
||||
|
||||
========
|
||||
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 2.1, February 1999
|
||||
|
||||
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
Licenses are intended to guarantee your freedom to share and change
|
||||
free software--to make sure the software is free for all its users.
|
||||
|
||||
This license, the Lesser General Public License, applies to some
|
||||
specially designated software packages--typically libraries--of the
|
||||
Free Software Foundation and other authors who decide to use it. You
|
||||
can use it too, but we suggest you first think carefully about whether
|
||||
this license or the ordinary General Public License is the better
|
||||
strategy to use in any particular case, based on the explanations below.
|
||||
|
||||
When we speak of free software, we are referring to freedom of use,
|
||||
not price. Our General Public Licenses are designed to make sure that
|
||||
you have the freedom to distribute copies of free software (and charge
|
||||
for this service if you wish); that you receive source code or can get
|
||||
it if you want it; that you can change the software and use pieces of
|
||||
it in new free programs; and that you are informed that you can do
|
||||
these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
distributors to deny you these rights or to ask you to surrender these
|
||||
rights. These restrictions translate to certain responsibilities for
|
||||
you if you distribute copies of the library or if you modify it.
|
||||
|
||||
For example, if you distribute copies of the library, whether gratis
|
||||
or for a fee, you must give the recipients all the rights that we gave
|
||||
you. You must make sure that they, too, receive or can get the source
|
||||
code. If you link other code with the library, you must provide
|
||||
complete object files to the recipients, so that they can relink them
|
||||
with the library after making changes to the library and recompiling
|
||||
it. And you must show them these terms so they know their rights.
|
||||
|
||||
We protect your rights with a two-step method: (1) we copyright the
|
||||
library, and (2) we offer you this license, which gives you legal
|
||||
permission to copy, distribute and/or modify the library.
|
||||
|
||||
To protect each distributor, we want to make it very clear that
|
||||
there is no warranty for the free library. Also, if the library is
|
||||
modified by someone else and passed on, the recipients should know
|
||||
that what they have is not the original version, so that the original
|
||||
author's reputation will not be affected by problems that might be
|
||||
introduced by others.
|
||||
|
||||
Finally, software patents pose a constant threat to the existence of
|
||||
any free program. We wish to make sure that a company cannot
|
||||
effectively restrict the users of a free program by obtaining a
|
||||
restrictive license from a patent holder. Therefore, we insist that
|
||||
any patent license obtained for a version of the library must be
|
||||
consistent with the full freedom of use specified in this license.
|
||||
|
||||
Most GNU software, including some libraries, is covered by the
|
||||
ordinary GNU General Public License. This license, the GNU Lesser
|
||||
General Public License, applies to certain designated libraries, and
|
||||
is quite different from the ordinary General Public License. We use
|
||||
this license for certain libraries in order to permit linking those
|
||||
libraries into non-free programs.
|
||||
|
||||
When a program is linked with a library, whether statically or using
|
||||
a shared library, the combination of the two is legally speaking a
|
||||
combined work, a derivative of the original library. The ordinary
|
||||
General Public License therefore permits such linking only if the
|
||||
entire combination fits its criteria of freedom. The Lesser General
|
||||
Public License permits more lax criteria for linking other code with
|
||||
the library.
|
||||
|
||||
We call this license the "Lesser" General Public License because it
|
||||
does Less to protect the user's freedom than the ordinary General
|
||||
Public License. It also provides other free software developers Less
|
||||
of an advantage over competing non-free programs. These disadvantages
|
||||
are the reason we use the ordinary General Public License for many
|
||||
libraries. However, the Lesser license provides advantages in certain
|
||||
special circumstances.
|
||||
|
||||
For example, on rare occasions, there may be a special need to
|
||||
encourage the widest possible use of a certain library, so that it becomes
|
||||
a de-facto standard. To achieve this, non-free programs must be
|
||||
allowed to use the library. A more frequent case is that a free
|
||||
library does the same job as widely used non-free libraries. In this
|
||||
case, there is little to gain by limiting the free library to free
|
||||
software only, so we use the Lesser General Public License.
|
||||
|
||||
In other cases, permission to use a particular library in non-free
|
||||
programs enables a greater number of people to use a large body of
|
||||
free software. For example, permission to use the GNU C Library in
|
||||
non-free programs enables many more people to use the whole GNU
|
||||
operating system, as well as its variant, the GNU/Linux operating
|
||||
system.
|
||||
|
||||
Although the Lesser General Public License is Less protective of the
|
||||
users' freedom, it does ensure that the user of a program that is
|
||||
linked with the Library has the freedom and the wherewithal to run
|
||||
that program using a modified version of the Library.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow. Pay close attention to the difference between a
|
||||
"work based on the library" and a "work that uses the library". The
|
||||
former contains code derived from the library, whereas the latter must
|
||||
be combined with the library in order to run.
|
||||
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License Agreement applies to any software library or other
|
||||
program which contains a notice placed by the copyright holder or
|
||||
other authorized party saying it may be distributed under the terms of
|
||||
this Lesser General Public License (also called "this License").
|
||||
Each licensee is addressed as "you".
|
||||
|
||||
A "library" means a collection of software functions and/or data
|
||||
prepared so as to be conveniently linked with application programs
|
||||
(which use some of those functions and data) to form executables.
|
||||
|
||||
The "Library", below, refers to any such software library or work
|
||||
which has been distributed under these terms. A "work based on the
|
||||
Library" means either the Library or any derivative work under
|
||||
copyright law: that is to say, a work containing the Library or a
|
||||
portion of it, either verbatim or with modifications and/or translated
|
||||
straightforwardly into another language. (Hereinafter, translation is
|
||||
included without limitation in the term "modification".)
|
||||
|
||||
"Source code" for a work means the preferred form of the work for
|
||||
making modifications to it. For a library, complete source code means
|
||||
all the source code for all modules it contains, plus any associated
|
||||
interface definition files, plus the scripts used to control compilation
|
||||
and installation of the library.
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running a program using the Library is not restricted, and output from
|
||||
such a program is covered only if its contents constitute a work based
|
||||
on the Library (independent of the use of the Library in a tool for
|
||||
writing it). Whether that is true depends on what the Library does
|
||||
and what the program that uses the Library does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Library's
|
||||
complete source code as you receive it, in any medium, provided that
|
||||
you conspicuously and appropriately publish on each copy an
|
||||
appropriate copyright notice and disclaimer of warranty; keep intact
|
||||
all the notices that refer to this License and to the absence of any
|
||||
warranty; and distribute a copy of this License along with the
|
||||
Library.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy,
|
||||
and you may at your option offer warranty protection in exchange for a
|
||||
fee.
|
||||
|
||||
2. You may modify your copy or copies of the Library or any portion
|
||||
of it, thus forming a work based on the Library, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) The modified work must itself be a software library.
|
||||
|
||||
b) You must cause the files modified to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
c) You must cause the whole of the work to be licensed at no
|
||||
charge to all third parties under the terms of this License.
|
||||
|
||||
d) If a facility in the modified Library refers to a function or a
|
||||
table of data to be supplied by an application program that uses
|
||||
the facility, other than as an argument passed when the facility
|
||||
is invoked, then you must make a good faith effort to ensure that,
|
||||
in the event an application does not supply such function or
|
||||
table, the facility still operates, and performs whatever part of
|
||||
its purpose remains meaningful.
|
||||
|
||||
(For example, a function in a library to compute square roots has
|
||||
a purpose that is entirely well-defined independent of the
|
||||
application. Therefore, Subsection 2d requires that any
|
||||
application-supplied function or table used by this function must
|
||||
be optional: if the application does not supply it, the square
|
||||
root function must still compute square roots.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Library,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Library, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote
|
||||
it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Library.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Library
|
||||
with the Library (or with a work based on the Library) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may opt to apply the terms of the ordinary GNU General Public
|
||||
License instead of this License to a given copy of the Library. To do
|
||||
this, you must alter all the notices that refer to this License, so
|
||||
that they refer to the ordinary GNU General Public License, version 2,
|
||||
instead of to this License. (If a newer version than version 2 of the
|
||||
ordinary GNU General Public License has appeared, then you can specify
|
||||
that version instead if you wish.) Do not make any other change in
|
||||
these notices.
|
||||
|
||||
Once this change is made in a given copy, it is irreversible for
|
||||
that copy, so the ordinary GNU General Public License applies to all
|
||||
subsequent copies and derivative works made from that copy.
|
||||
|
||||
This option is useful when you wish to copy part of the code of
|
||||
the Library into a program that is not a library.
|
||||
|
||||
4. You may copy and distribute the Library (or a portion or
|
||||
derivative of it, under Section 2) in object code or executable form
|
||||
under the terms of Sections 1 and 2 above provided that you accompany
|
||||
it with the complete corresponding machine-readable source code, which
|
||||
must be distributed under the terms of Sections 1 and 2 above on a
|
||||
medium customarily used for software interchange.
|
||||
|
||||
If distribution of object code is made by offering access to copy
|
||||
from a designated place, then offering equivalent access to copy the
|
||||
source code from the same place satisfies the requirement to
|
||||
distribute the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
5. A program that contains no derivative of any portion of the
|
||||
Library, but is designed to work with the Library by being compiled or
|
||||
linked with it, is called a "work that uses the Library". Such a
|
||||
work, in isolation, is not a derivative work of the Library, and
|
||||
therefore falls outside the scope of this License.
|
||||
|
||||
However, linking a "work that uses the Library" with the Library
|
||||
creates an executable that is a derivative of the Library (because it
|
||||
contains portions of the Library), rather than a "work that uses the
|
||||
library". The executable is therefore covered by this License.
|
||||
Section 6 states terms for distribution of such executables.
|
||||
|
||||
When a "work that uses the Library" uses material from a header file
|
||||
that is part of the Library, the object code for the work may be a
|
||||
derivative work of the Library even though the source code is not.
|
||||
Whether this is true is especially significant if the work can be
|
||||
linked without the Library, or if the work is itself a library. The
|
||||
threshold for this to be true is not precisely defined by law.
|
||||
|
||||
If such an object file uses only numerical parameters, data
|
||||
structure layouts and accessors, and small macros and small inline
|
||||
functions (ten lines or less in length), then the use of the object
|
||||
file is unrestricted, regardless of whether it is legally a derivative
|
||||
work. (Executables containing this object code plus portions of the
|
||||
Library will still fall under Section 6.)
|
||||
|
||||
Otherwise, if the work is a derivative of the Library, you may
|
||||
distribute the object code for the work under the terms of Section 6.
|
||||
Any executables containing that work also fall under Section 6,
|
||||
whether or not they are linked directly with the Library itself.
|
||||
|
||||
6. As an exception to the Sections above, you may also combine or
|
||||
link a "work that uses the Library" with the Library to produce a
|
||||
work containing portions of the Library, and distribute that work
|
||||
under terms of your choice, provided that the terms permit
|
||||
modification of the work for the customer's own use and reverse
|
||||
engineering for debugging such modifications.
|
||||
|
||||
You must give prominent notice with each copy of the work that the
|
||||
Library is used in it and that the Library and its use are covered by
|
||||
this License. You must supply a copy of this License. If the work
|
||||
during execution displays copyright notices, you must include the
|
||||
copyright notice for the Library among them, as well as a reference
|
||||
directing the user to the copy of this License. Also, you must do one
|
||||
of these things:
|
||||
|
||||
a) Accompany the work with the complete corresponding
|
||||
machine-readable source code for the Library including whatever
|
||||
changes were used in the work (which must be distributed under
|
||||
Sections 1 and 2 above); and, if the work is an executable linked
|
||||
with the Library, with the complete machine-readable "work that
|
||||
uses the Library", as object code and/or source code, so that the
|
||||
user can modify the Library and then relink to produce a modified
|
||||
executable containing the modified Library. (It is understood
|
||||
that the user who changes the contents of definitions files in the
|
||||
Library will not necessarily be able to recompile the application
|
||||
to use the modified definitions.)
|
||||
|
||||
b) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (1) uses at run time a
|
||||
copy of the library already present on the user's computer system,
|
||||
rather than copying library functions into the executable, and (2)
|
||||
will operate properly with a modified version of the library, if
|
||||
the user installs one, as long as the modified version is
|
||||
interface-compatible with the version that the work was made with.
|
||||
|
||||
c) Accompany the work with a written offer, valid for at
|
||||
least three years, to give the same user the materials
|
||||
specified in Subsection 6a, above, for a charge no more
|
||||
than the cost of performing this distribution.
|
||||
|
||||
d) If distribution of the work is made by offering access to copy
|
||||
from a designated place, offer equivalent access to copy the above
|
||||
specified materials from the same place.
|
||||
|
||||
e) Verify that the user has already received a copy of these
|
||||
materials or that you have already sent this user a copy.
|
||||
|
||||
For an executable, the required form of the "work that uses the
|
||||
Library" must include any data and utility programs needed for
|
||||
reproducing the executable from it. However, as a special exception,
|
||||
the materials to be distributed need not include anything that is
|
||||
normally distributed (in either source or binary form) with the major
|
||||
components (compiler, kernel, and so on) of the operating system on
|
||||
which the executable runs, unless that component itself accompanies
|
||||
the executable.
|
||||
|
||||
It may happen that this requirement contradicts the license
|
||||
restrictions of other proprietary libraries that do not normally
|
||||
accompany the operating system. Such a contradiction means you cannot
|
||||
use both them and the Library together in an executable that you
|
||||
distribute.
|
||||
|
||||
7. You may place library facilities that are a work based on the
|
||||
Library side-by-side in a single library together with other library
|
||||
facilities not covered by this License, and distribute such a combined
|
||||
library, provided that the separate distribution of the work based on
|
||||
the Library and of the other library facilities is otherwise
|
||||
permitted, and provided that you do these two things:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work
|
||||
based on the Library, uncombined with any other library
|
||||
facilities. This must be distributed under the terms of the
|
||||
Sections above.
|
||||
|
||||
b) Give prominent notice with the combined library of the fact
|
||||
that part of it is a work based on the Library, and explaining
|
||||
where to find the accompanying uncombined form of the same work.
|
||||
|
||||
8. You may not copy, modify, sublicense, link with, or distribute
|
||||
the Library except as expressly provided under this License. Any
|
||||
attempt otherwise to copy, modify, sublicense, link with, or
|
||||
distribute the Library is void, and will automatically terminate your
|
||||
rights under this License. However, parties who have received copies,
|
||||
or rights, from you under this License will not have their licenses
|
||||
terminated so long as such parties remain in full compliance.
|
||||
|
||||
9. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Library or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Library (or any work based on the
|
||||
Library), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Library or works based on it.
|
||||
|
||||
10. Each time you redistribute the Library (or any work based on the
|
||||
Library), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute, link with or modify the Library
|
||||
subject to these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties with
|
||||
this License.
|
||||
|
||||
11. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Library at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Library by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Library.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under any
|
||||
particular circumstance, the balance of the section is intended to apply,
|
||||
and the section as a whole is intended to apply in other circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
12. If the distribution and/or use of the Library is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Library under this License may add
|
||||
an explicit geographical distribution limitation excluding those countries,
|
||||
so that distribution is permitted only in or among countries not thus
|
||||
excluded. In such case, this License incorporates the limitation as if
|
||||
written in the body of this License.
|
||||
|
||||
13. The Free Software Foundation may publish revised and/or new
|
||||
versions of the Lesser General Public License from time to time.
|
||||
Such new versions will be similar in spirit to the present version,
|
||||
but may differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Library
|
||||
specifies a version number of this License which applies to it and
|
||||
"any later version", you have the option of following the terms and
|
||||
conditions either of that version or of any later version published by
|
||||
the Free Software Foundation. If the Library does not specify a
|
||||
license version number, you may choose any version ever published by
|
||||
the Free Software Foundation.
|
||||
|
||||
14. If you wish to incorporate parts of the Library into other free
|
||||
programs whose distribution conditions are incompatible with these,
|
||||
write to the author to ask for permission. For software which is
|
||||
copyrighted by the Free Software Foundation, write to the Free
|
||||
Software Foundation; we sometimes make exceptions for this. Our
|
||||
decision will be guided by the two goals of preserving the free status
|
||||
of all derivatives of our free software and of promoting the sharing
|
||||
and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
||||
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
||||
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
||||
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
|
||||
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
|
||||
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
|
||||
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
|
||||
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
|
||||
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
|
||||
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
|
||||
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
|
||||
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
|
||||
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
|
||||
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
|
||||
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||
DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
26
MinecraftForge-Credits.txt
Normal file
26
MinecraftForge-Credits.txt
Normal file
@ -0,0 +1,26 @@
|
||||
* Eloraam *
|
||||
|
||||
* FlowerChild *
|
||||
|
||||
* Hawkye *
|
||||
|
||||
* MALfunction84 *
|
||||
|
||||
Submitted the sleep handler code for his mod (Somnia) and others to use.
|
||||
|
||||
* Scokeev9 *
|
||||
|
||||
Gave permission for ScotTools API to be integrated into MCF, and also supported the Forge by converting his mods to use it.
|
||||
|
||||
ScotTools Background: ScotTools was an API that enabled modders to add blocks to harvesting levels (and many other ease-of-use features to create new tools), and the first tool API that used block material for block breaking efficiency which allowed blocks from mods that didn't use ScotTools API to break with the correct speed.
|
||||
|
||||
* SpaceToad *
|
||||
|
||||
* LexManos *
|
||||
|
||||
* cpw *
|
||||
|
||||
* Minecraft Coder Pack (MCP) *
|
||||
Forge Mod Loader and Minecraft Forge have permission to distribute and automatically download components of MCP and distribute MCP data files.
|
||||
This permission is not transitive and others wishing to redistribute the Minecraft Forge source independently should seek permission of MCP or
|
||||
remove the MCP data files and request their users to download MCP separately.
|
70
MinecraftForge-License.txt
Normal file
70
MinecraftForge-License.txt
Normal file
@ -0,0 +1,70 @@
|
||||
Minecraft Forge Public Licence
|
||||
==============================
|
||||
|
||||
Version 1.0
|
||||
|
||||
0. Definitions
|
||||
--------------
|
||||
|
||||
Minecraft: Denotes a copy of the Minecraft game licensed by Mojang AB
|
||||
|
||||
User: Anybody that interract with the software in one of the following ways:
|
||||
- play
|
||||
- decompile
|
||||
- recompile or compile
|
||||
- modify
|
||||
|
||||
Minecraft Forge: The Minecraft Forge code, in source form, class file form, as
|
||||
obtained in a standalone fashion or as part of a wider distribution.
|
||||
|
||||
Dependency: Code required to have Minecraft Forge working properly. That can
|
||||
include dependencies required to compile the code as well as modifications in
|
||||
the Minecraft sources that are required to have Minecraft Forge working.
|
||||
|
||||
1. Scope
|
||||
--------
|
||||
|
||||
The present license is granted to any user of Minecraft Forge, for all files included
|
||||
unless stated otherwise in the file itself. As a prerequisite, a user of Minecraft
|
||||
Forge must own a legally aquired copy of Minecraft.
|
||||
|
||||
2. Play rights
|
||||
--------------
|
||||
|
||||
The user of Minecraft Forge is allowed to install the software on a client or
|
||||
a server and to play it without restriction.
|
||||
|
||||
3. Modification rights
|
||||
----------------------
|
||||
|
||||
The user has the right to decompile the source code, look at either the
|
||||
decompiled version or the original source code, and to modify it.
|
||||
|
||||
4. Derivation rights
|
||||
--------------------
|
||||
|
||||
The user has the rights to derive code from Minecraft Forge, that is to say to
|
||||
write code that either extends Minecraft Forge class and interfaces,
|
||||
instantiate the objects declared or calls the functions. This code is known as
|
||||
"derived" code, and can be licensed with conditions different from Minecraft
|
||||
Forge.
|
||||
|
||||
|
||||
5. Distribution rights
|
||||
----------------------
|
||||
|
||||
The user of Minecraft Forge is allowed to redistribute Minecraft Forge in
|
||||
partially, in totallity, or included in a distribution. When distributing
|
||||
binaries or class files, the user must provide means to obtain the sources of
|
||||
the distributed version of Minecraft Forge at no costs. This includes the
|
||||
files as well as any dependency that the code may rely on, including patches to
|
||||
minecraft original sources.
|
||||
|
||||
Modification of Minecraft Forge as well as dependencies, including patches to
|
||||
minecraft original sources, has to remain under the terms of the present
|
||||
license.
|
||||
|
||||
The right to distribute Minecraft Forge does not extend to the right to distribute
|
||||
MCP data files included within Minecraft Forge. These are the property of the MCP
|
||||
project and should be removed from any customized distribution of Minecraft Forge
|
||||
or permission sought separately from the MCP team.
|
37
README - Forge.txt
Normal file
37
README - Forge.txt
Normal file
@ -0,0 +1,37 @@
|
||||
-------------------------------------------
|
||||
Source installation information for modders
|
||||
-------------------------------------------
|
||||
This code follows the Minecraft Forge installation methodology. It will apply
|
||||
some small patches to the vanilla MCP source code, giving you and it access
|
||||
to some of the data and functions you need to build a successful mod.
|
||||
|
||||
Note also that the patches are built against "unrenamed" MCP source code (aka
|
||||
srgnames) - this means that you will not be able to read them directly against
|
||||
normal code.
|
||||
|
||||
Source pack installation information:
|
||||
|
||||
Standalone source installation
|
||||
==============================
|
||||
|
||||
To install this source code for development purposes, extract this zip file.
|
||||
It ships with a demonstration mod. Run 'gradlew setupDevWorkspace' to create
|
||||
a gradle environment primed with FML. Run 'gradlew eclipse' or 'gradlew idea' to
|
||||
create an IDE workspace of your choice.
|
||||
Refer to ForgeGradle for more information about the gradle environment
|
||||
Note: On macs or linux you run the './gradlew.sh' instead of 'gradlew'
|
||||
|
||||
Forge source installation
|
||||
=========================
|
||||
MinecraftForge ships with this code and installs it as part of the forge
|
||||
installation process, no further action is required on your part.
|
||||
|
||||
For reference this is version @MAJOR@.@MINOR@.@REV@.@BUILD@ of FML
|
||||
for Minecraft version @MCVERSION@.
|
||||
|
||||
LexManos' Install Video
|
||||
=======================
|
||||
https://www.youtube.com/watch?v=8VEdtQLuLO0&feature=youtu.be
|
||||
|
||||
For more details update more often refer to the Forge Forums:
|
||||
http://www.minecraftforge.net/forum/index.php/topic,14048.0.html
|
10
README.txt
Normal file
10
README.txt
Normal file
@ -0,0 +1,10 @@
|
||||
------------------------------------------------------
|
||||
######## ORBITAL BOMBARDMENT 1.7.10 ##########
|
||||
------------------------------------------------------
|
||||
Une suite du mod (mort) ORBITAL BOMBARDMENT de la 1.6.4.
|
||||
Celui permet d'ajouter au jeu de nouveaux blocs et items pour
|
||||
tirer de puissante salves destructrices sur vos cochons !
|
||||
|
||||
Bien sûr pour le moment je compte seulement porté le mod
|
||||
sur la 1.7.10. Après peut être je le continuerai pour agrandir
|
||||
ces fonctionnalités.
|
42
TODO.txt
Normal file
42
TODO.txt
Normal file
@ -0,0 +1,42 @@
|
||||
-Mettre à jour le gestion de la détection du tir: part du bloc le plus
|
||||
haut en coordonnée Y, descends un par un et le premier bloc touché serra
|
||||
celui qui subira l'explosion.
|
||||
-Implémanter 3 tailles différentes de laser, 1 pour le Low, 2 pour le Med et 3 pour le High
|
||||
-Rendre plus difficile d'accès le Med et le High
|
||||
-Craft du satellite plus complexe, mais à usage illimité.
|
||||
-Ajout du bloc brouilleur, impossible de demander un tir ou de tirer dans
|
||||
ça zone d'action
|
||||
-Ajout du bloc relais, permet de communiquer avec un satellite en orbite
|
||||
(remplace l'overrider actuel), permet de précisé les coordonées de tir manuel,
|
||||
la désactivation du satellite (pouvant être hacké, offrant alors la possibilité de changer
|
||||
les sets de réglages et déraglant ainsi la visée, rendant le satellite hors d'état,
|
||||
il peut être reconfiguré soit en résolvant un casse-tête soit en purgeant l'énergie
|
||||
du satellite se qui prends 1min par 1000PU)
|
||||
-Ajout du bloc surchargeur(en combinaison de relais) + identifiant propre à chaque satellite en orbite
|
||||
Si un joueur souhaite détruire son satellite, il précise l'identifiant et
|
||||
contre une grande quantité d'énergie, surcharge le satellite et le détruit
|
||||
-Ajout de la fusée, permettant de déployer le satellite de façon automatique
|
||||
-Ajout du scanner, scan dans son rayon d'action toute créatures hostiles dans
|
||||
un certain rayon et les désintègres s'il est activé, attention les mobs ne looterons
|
||||
rien car désintégrés, la vitesse de tir et cependant limité selon les modeles de sat
|
||||
Quasi instantanée pour la version créa
|
||||
-Modification du système de prodution de photon:
|
||||
Il n'y aura plus de générateur de photon, ni d'emetteur, ni de recepteur
|
||||
Plusieurs classes de satellite chaque avec des capacités de plus en plus
|
||||
puissantes selon la classe: Niveau 1 - Defense seulement + lightning
|
||||
Niveau 2 - Defense et attaque de petit niveau (creeper boom)
|
||||
Niveau 3 - 2 + Penetring strike + plus de puissance
|
||||
Niveau X(Crea seulement) - Meteor spawner, et super laser !
|
||||
|
||||
-Ajout de dysfonctionnement du satellite temporaire (réglable) désactivant une certain fonction
|
||||
cela peut touché: la chambre de tir, les panneaux solaires, les batteries ou le système de visée
|
||||
-Un satellite ne peut couvrir qu'une zone de 1000 blocs (sauf créa)
|
||||
-Ajout d'une bombe à régéneration, elle permet de regenerer un chunk entier contre 16 enderpearl
|
||||
et d'une énorme quantité d'énergie !
|
||||
-Ajout du satellite de soin, crafté à partir d'une étoile du nether tir
|
||||
un rayon de soin instantané pour le propriétaire contre de lénergie dans
|
||||
celui-ci, limité cependant à 100 coeurs, peut être recharger à l'aide
|
||||
d'une étoile du nether
|
||||
-EasterEgg: un tir d'un satellite de soin avec 100 coeurs en réserve sur une
|
||||
bombe à régénération à pleine puissance, créer une balise
|
||||
régénératrice illimité mais elle détruit cependant le satellite
|
63
build.gradle
Normal file
63
build.gradle
Normal file
@ -0,0 +1,63 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven {
|
||||
name = "forge"
|
||||
url = "http://files.minecraftforge.net/maven"
|
||||
}
|
||||
maven {
|
||||
name = "sonatype"
|
||||
url = "https://oss.sonatype.org/content/repositories/snapshots/"
|
||||
}
|
||||
}
|
||||
dependencies {
|
||||
classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT'
|
||||
}
|
||||
}
|
||||
|
||||
apply plugin: 'forge'
|
||||
|
||||
version = "2.0"
|
||||
group= "fr.jackcartersmith.ob" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
|
||||
archivesBaseName = "OrbitalBombardment"
|
||||
|
||||
minecraft {
|
||||
version = "1.7.10-10.13.4.1614-1.7.10"
|
||||
runDir = "eclipse"
|
||||
}
|
||||
|
||||
dependencies {
|
||||
// you may put jars on which you depend on in ./libs
|
||||
// or you may define them like so..
|
||||
//compile "some.group:artifact:version:classifier"
|
||||
//compile "some.group:artifact:version"
|
||||
|
||||
// real examples
|
||||
//compile 'com.mod-buildcraft:buildcraft:6.0.8:dev' // adds buildcraft to the dev env
|
||||
//compile 'com.googlecode.efficient-java-matrix-library:ejml:0.24' // adds ejml to the dev env
|
||||
|
||||
// for more info...
|
||||
// http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html
|
||||
// http://www.gradle.org/docs/current/userguide/dependency_management.html
|
||||
|
||||
}
|
||||
|
||||
processResources
|
||||
{
|
||||
// this will ensure that this task is redone when the versions change.
|
||||
inputs.property "version", project.version
|
||||
inputs.property "mcversion", project.minecraft.version
|
||||
|
||||
// replace stuff in mcmod.info, nothing else
|
||||
from(sourceSets.main.resources.srcDirs) {
|
||||
include 'mcmod.info'
|
||||
|
||||
// replace version and mcversion
|
||||
expand 'version':project.version, 'mcversion':project.minecraft.version
|
||||
}
|
||||
|
||||
// copy everything else, thats not the mcmod.info
|
||||
from(sourceSets.main.resources.srcDirs) {
|
||||
exclude 'mcmod.info'
|
||||
}
|
||||
}
|
0
eclipse/.metadata/.lock
Normal file
0
eclipse/.metadata/.lock
Normal file
BIN
eclipse/.metadata/.mylyn/.taskListIndex/segments.gen
Normal file
BIN
eclipse/.metadata/.mylyn/.taskListIndex/segments.gen
Normal file
Binary file not shown.
BIN
eclipse/.metadata/.mylyn/.taskListIndex/segments_1
Normal file
BIN
eclipse/.metadata/.mylyn/.taskListIndex/segments_1
Normal file
Binary file not shown.
Binary file not shown.
@ -0,0 +1 @@
|
||||
|
Binary file not shown.
@ -0,0 +1 @@
|
||||
|
Binary file not shown.
Binary file not shown.
@ -0,0 +1,4 @@
|
||||
#Sun Jun 05 18:58:07 CEST 2011
|
||||
version=1
|
||||
eclipse.preferences.version=1
|
||||
refresh.enabled=true
|
@ -0,0 +1,7 @@
|
||||
#Sun Jun 05 19:03:53 CEST 2011
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.debug.ui.UseContextualLaunch=false
|
||||
Console.highWaterMark=88000
|
||||
org.eclipse.debug.ui.PREF_LAUNCH_PERSPECTIVES=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?>\r\n<launchPerspectives/>\r\n
|
||||
org.eclipse.debug.ui.user_view_bindings=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?>\r\n<viewBindings>\r\n<view id\="org.eclipse.ui.console.ConsoleView">\r\n<perspective id\="org.eclipse.jdt.ui.JavaPerspective" userAction\="opened"/>\r\n</view>\r\n</viewBindings>\r\n
|
||||
StringVariablePreferencePage=130,107,107,86,
|
@ -0,0 +1,4 @@
|
||||
eclipse.preferences.version=1
|
||||
resetSendMode=KEEP
|
||||
resetSendModeOn=0
|
||||
sendMode=NOTIFY
|
@ -0,0 +1,3 @@
|
||||
#Sun Jun 05 18:58:07 CEST 2011
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.epp.usagedata.gathering.enabled=false
|
@ -0,0 +1,14 @@
|
||||
#Sun Sep 18 16:44:39 NZST 2011
|
||||
org.eclipse.jdt.core.compiler.compliance=1.6
|
||||
org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.deprecation=ignore
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.unusedLocal=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.unusedImport=ignore
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.rawTypeReference=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.missingSerialVersion=ignore
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
|
||||
org.eclipse.jdt.core.compiler.source=1.6
|
@ -0,0 +1,13 @@
|
||||
content_assist_proposals_background=255,255,255
|
||||
content_assist_proposals_foreground=0,0,0
|
||||
eclipse.preferences.version=1
|
||||
fontPropagated=true
|
||||
org.eclipse.jdt.ui.editor.tab.width=
|
||||
org.eclipse.jdt.ui.formatterprofiles.version=12
|
||||
org.eclipse.jdt.ui.javadoclocations.migrated=true
|
||||
org.eclipse.jface.textfont=1|Consolas|10.0|0|WINDOWS|1|0|0|0|0|0|0|0|0|1|0|0|0|0|Consolas;
|
||||
proposalOrderMigrated=true
|
||||
spelling_locale_initialized=true
|
||||
tabWidthPropagated=true
|
||||
useAnnotationsPrefPage=true
|
||||
useQuickDiffPrefPage=true
|
@ -0,0 +1,2 @@
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.m2e.discovery.pref.projects=
|
@ -0,0 +1,2 @@
|
||||
eclipse.preferences.version=1
|
||||
mylyn.attention.migrated=true
|
@ -0,0 +1,2 @@
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.mylyn.monitor.activity.tracking.enabled.checked=true
|
@ -0,0 +1,5 @@
|
||||
eclipse.preferences.version=1
|
||||
migrated.task.repositories.secure.store=true
|
||||
org.eclipse.mylyn.tasks.ui.filters.nonmatching=true
|
||||
org.eclipse.mylyn.tasks.ui.filters.nonmatching.encouraged=true
|
||||
org.eclipse.mylyn.tasks.ui.welcome.message=true
|
@ -0,0 +1,2 @@
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.team.ui.first_time=false
|
@ -0,0 +1,4 @@
|
||||
#Sun Jun 05 18:58:05 CEST 2011
|
||||
spacesForTabs=true
|
||||
eclipse.preferences.version=1
|
||||
overviewRuler_migration=migrated_3.1
|
@ -0,0 +1,8 @@
|
||||
IMPORT_FILES_AND_FOLDERS_MODE=prompt
|
||||
IMPORT_FILES_AND_FOLDERS_VIRTUAL_FOLDER_MODE=prompt
|
||||
PROBLEMS_FILTERS_MIGRATE=true
|
||||
SAVE_ALL_BEFORE_BUILD=true
|
||||
eclipse.preferences.version=1
|
||||
platformState=1465652141027
|
||||
quickStart=false
|
||||
tipsAndTricks=true
|
@ -0,0 +1,3 @@
|
||||
#Sun Jun 05 18:50:08 CEST 2011
|
||||
eclipse.preferences.version=1
|
||||
showIntro=false
|
@ -0,0 +1,3 @@
|
||||
//org.eclipse.ui.commands/state/org.eclipse.ui.navigator.resources.nested.changeProjectPresentation/org.eclipse.ui.commands.radioState=false
|
||||
PLUGINS_NOT_ACTIVATED_ON_STARTUP=org.eclipse.m2e.discovery;
|
||||
eclipse.preferences.version=1
|
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
|
||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
|
||||
<listEntry value="/Minecraft/lib/net/minecraft/launchwrapper/1.8/launchwrapper-1.8.jar"/>
|
||||
</listAttribute>
|
||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
|
||||
<listEntry value="1"/>
|
||||
</listAttribute>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="GradleStart"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="Minecraft"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xincgc -Xmx1024M -Xms1024M"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.WORKING_DIRECTORY" value="${workspace_loc}"/>
|
||||
</launchConfiguration>
|
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
|
||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
|
||||
<listEntry value="/Minecraft/src/net/minecraft/server/MinecraftServer.java"/>
|
||||
</listAttribute>
|
||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
|
||||
<listEntry value="1"/>
|
||||
</listAttribute>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="GradleStartServer"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="Minecraft"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xincgc -Xmx1024M -Xms1024M"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.WORKING_DIRECTORY" value="${workspace_loc}"/>
|
||||
</launchConfiguration>
|
@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<launchHistory>
|
||||
<launchGroup id="org.eclipse.ui.externaltools.launchGroup">
|
||||
<mruHistory/>
|
||||
<favorites/>
|
||||
</launchGroup>
|
||||
<launchGroup id="org.eclipse.debug.ui.launchGroup.profile">
|
||||
<mruHistory/>
|
||||
<favorites/>
|
||||
</launchGroup>
|
||||
<launchGroup id="org.eclipse.debug.ui.launchGroup.debug">
|
||||
<mruHistory>
|
||||
<launch memento="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <launchConfiguration local="true" path="Client"/> "/>
|
||||
<launch memento="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <launchConfiguration local="true" path="Server"/> "/>
|
||||
</mruHistory>
|
||||
<favorites/>
|
||||
</launchGroup>
|
||||
<launchGroup id="org.eclipse.debug.ui.launchGroup.run">
|
||||
<mruHistory>
|
||||
<launch memento="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <launchConfiguration local="true" path="Client"/> "/>
|
||||
<launch memento="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <launchConfiguration local="true" path="Server"/> "/>
|
||||
</mruHistory>
|
||||
<favorites/>
|
||||
</launchGroup>
|
||||
</launchHistory>
|
2226
eclipse/.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi
Normal file
2226
eclipse/.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi
Normal file
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
@ -0,0 +1 @@
|
||||
ýÿÿÿversion
|
@ -0,0 +1 @@
|
||||
NRM<EFBFBD>
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,2 @@
|
||||
ýÿÿÿfingerprintaction
|
||||
problemUrlmessagebugIdbugUrl
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1 @@
|
||||
NRM<EFBFBD>jjttmgymmjkimkmxmukimfjkibbbmipjomllnrmjllkylritnmoibklgldljmhhi|o|k|lfjmltriklppy|lhljslfxixwjydbf|nbl|xl|mhfkhmovkgliydh||wuq||ljxxytlnlmmjlkflvnr|je|ljklnxklsxmmlgkl|him|m|jvkl|hmfllmgmiunjihgsnimbffhjimkobkifmjnl`kldkaflgjldjmmhhmiillljhajeopklkdhllljgjhmkkjhhpkkejjihmljhmlmlklgfkiihllnmiijkjhnkilnjlgklnhmhi|flgljjhkjlhllmjilllhlijjmkillnikgbmnhhmliim]lilkilmlkkngmhimhhedg`jl`inmidblajikjnhnj_j]|qtmxjk|x|vjuvnkkob|kk|rwl|q|p|ot||||||||||||||||vlt|||||qt||ux|xurd|x|y||||ty|tttqqq||q|s|srx|nr|wput|xpuuh|txw|yx|tr|yln|or||hmpkx|i|t|||mptppug||_vlx|xu||vetd||rwyr|||xyr||y|jyuqy||r|lqtih||rx\|kal|fyuvw|yv|||lyxvxwxw|yry|t|w|x|xx|x||x|ye|t|y|uet|y|||y|y|s|wuvpy|wxw|vnkkphjkjb`mljgeafkbhhdkclfjlmghhlbdlefmhogmmdjd`jqkllnejlnmkmhljklkilmnhen^ffiihhbljimihlilhnlekiijhjllnkohljmnmcfhmhikgllfoakhgmbdieihekililmkhfihhfmncijllilklkkiifeljkfjlknkkljghaglnjlkmm\nniiigmldmmlbikpnxvsjcflkxiiintshkkh`jr|nhm|||i|u|jg||kkukdu||yy|pl||yekxxk|x|b|m||||||t|y|cl||f||ukh|nl||q|v|g|kg|ktt||gly|gquq|mcx|qv||u||xxux|ym|xl|yu|||c|h||yjsj||txm|uhis|mmgt|x|s||||hoy|wws|pd||uxr||hmtuerrvp|mypq|||y|||qmygn|ypbm|vx|n||sg|gxy|v||y|unntk||||ir|xwx||p||thyu|k||ax||c|||yr|yd|txi|w|mry||g|||||e|ppx|||t|||efxq||||||||||jq|y|f|yk||vs|||||||||||||liktux|xy|xxt||oy|v|vt|||nr|ovu|||gsp|||l||mnw|x||hn|y||t|n||q|||||uvrv|||l||p|xyhu||||x|uxk||||m||||wwt||xy||m|v|lpy||o||||y|||vqru|||pt||q|op||ttu||y|||r||xtq|||lv||p||uv|xxiyqtxy|hk|||`|i|p|qde||i|||u|px|o|||xlpf|ntp|oyrx||r|||mx||||xugtkttpxuw|x|xl||ys|xxv|lxu|tv|syy|tmv|||||||||vi|uwxt|qe|krxq|p||wa|||||||r||t||n|||y|||x||||||o|||l|||nxx|orio|msty|u|x||vmyhi||qtkyjrqsx|lxxldm|||j|y|te|m|||u|lqpkyy|||kvuu|lt|xh|el||xu|qrthqyn|sx||utv|p||txvxrq|syxyxwxxp|x||vsu|x||uyx|yyt|pyyvsr|iy|vy|rlyxyytttvvyqyutyytxtq|s|yhh||mq|myxnnxx||wihn|wxvvkxy||qiikrpxxu|prx|xxrxytqw|ly||||vy||wxrs||||d|||||uxxyw|gxp|xy|vruyx|yxx|||xs|y|wx|x|t|tyyy|vxtyy|y||w|ui||||||xm||mxyivxxx|||twxv|u||q||yym||v||yvy||x|fi|jercae|kpbeaiw|jres|||kyfpcyl||j||r||dsqk^||nyqpkl|hmx|hkqesso||n|hcnf|n||hoh|||ric|ru|p|^|bspxvocoi||g|||||`nil|kdyyh]pkox|t|yv|nisjk|||cq|s||s|nnh||vwoqtld||fhdlpiiii|cgqkcuxfdj|bdi|ftfwl|xf||rjkv||nh|n|wwdcw|||r|tlf|cqno|||dx|pnql||nnsdqqlt|pt|hjdlr|mgihrx|||ki|u||f|xxupbo|uv||bdmikhnkmihfnmmllmmb|mlnnnblmijelllohmlplimemflijiiiikhkkbmmljfmjjgl`m`ilj[lhilmj|hgklljlhhemkflkflhonmkmlmljlmmjmkmlkkkkmljejhjkmmmklijhjmdmljmomkjkclhkhliilimmiclmjjjmlmlikkgliilllfmmhbhhlhhfljhikgkjimklddlill^kmnlnmnhl_mgkejlnglmmmnkimlhhcmlmmkjhjimmmdfgmjmmlmmklhmlljmllmkjfnlndklhjlkjlmljkljmehiik`lglhgfnkhnkmikljmtlmhkkjhjkdllkimmmjlimjlimmmllmjlllmlhlhkemnmnmmmiiiliimkkhmikllhkbfljleklkjliilmmmllhkifhmkihmlmjh|gkkhhlmmkmgmmljjhlghlldemmlmmmiokkmekimmljjjljliljeikmhihikllmmmhhkcililihiljmmmhlekkaihmijdliehfjidiiifmefcjgghllkhljiilgllkjklhegkflijldmjflkklhllkhlcilkljihmjklmjdlmmkmjmlcihknemhmhjhlliillllhmcnhdhmemihmmmtinhmiiifkllhhhmmylmijnalji`mkhmkhmjjlmjjjjimjilimellmklmhjkmmlijZeemihikklklljlllhikkl
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,64 @@
|
||||
{
|
||||
"version": "v1",
|
||||
"title": "Eclipse Automated Error Reporting",
|
||||
"timestamp": 1467795330905,
|
||||
"ttl": 10080,
|
||||
"helpUrl": "https://dev.eclipse.org/recommenders/community/aeri/v2/help/",
|
||||
"feedbackUrl": "http://ctrlflow.com/automated-error-reporting",
|
||||
"aboutUrl": "https://wiki.eclipse.org/EPP/Logging",
|
||||
"submitUrl": "https://dev.eclipse.org/recommenders/community/confess/0.6/reports/",
|
||||
"maxReportSize": 262144,
|
||||
"problemsUrl": "https://www.eclipse.org/downloads/download.php?r\u003d1\u0026file\u003d/technology/epp/logging/problems.zip",
|
||||
"problemsTtl": 20160,
|
||||
"connectTimeout": 10,
|
||||
"socketTimeout": 10,
|
||||
"acceptedProducts": [
|
||||
"org.eclipse.*"
|
||||
],
|
||||
"acceptedPlugins": [
|
||||
"org.apache.log4j.*",
|
||||
"org.eclipse.*"
|
||||
],
|
||||
"acceptedPackages": [
|
||||
"ch.qos.*",
|
||||
"com.cforcoding.*",
|
||||
"com.ctrlflow.*",
|
||||
"com.google.*",
|
||||
"com.gradleware.tooling.*",
|
||||
"com.naef.*",
|
||||
"com.sun.*",
|
||||
"java.*",
|
||||
"javafx.*",
|
||||
"javax.*",
|
||||
"org.apache.*",
|
||||
"org.eclipse.*",
|
||||
"org.gradle.*",
|
||||
"org.osgi.*",
|
||||
"org.slf4j.*",
|
||||
"sun.*"
|
||||
],
|
||||
"requiredPackages": [
|
||||
"com.cforcoding.*",
|
||||
"com.ctrlflow.*",
|
||||
"com.gradleware.tooling.*",
|
||||
"com.naef.*",
|
||||
"org.eclipse.*",
|
||||
"org.gradle.*"
|
||||
],
|
||||
"acceptOtherPackages": true,
|
||||
"acceptUiFreezes": true,
|
||||
"ignoredStatuses": [
|
||||
":java.io.IOException:There is not enough space on the disk",
|
||||
":java.net.*:",
|
||||
"org.eclipse.core.filesystem::Could not delete*",
|
||||
"org.eclipse.core.filesystem::Could not move*",
|
||||
"org.eclipse.core.runtime::Invalid input url*",
|
||||
"org.eclipse.epp.mpc.ui:java.io.IOException:",
|
||||
"org.eclipse.equinox.p2.*::",
|
||||
"org.eclipse.jface:java.io.IOException:Unable to resolve plug-in*",
|
||||
"org.eclipse.oomph.setup.core:$org.apache.http.ConnectionClosedException:",
|
||||
"org.eclipse.pde.core::The current target platform contains errors*",
|
||||
"org.eclipse.ui::Conflicting handlers for*"
|
||||
],
|
||||
"problemsZipLastDownloadTimestamp": 1467795640650
|
||||
}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<typeInfoHistroy/>
|
@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<qualifiedTypeNameHistroy/>
|
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<section name="Workbench">
|
||||
<section name="org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart">
|
||||
<item value="2" key="layout"/>
|
||||
<item value="true" key="group_libraries"/>
|
||||
<item value="<?xml version="1.0" encoding="UTF-8"?>
<packageExplorer group_libraries="1" layout="2" linkWithEditor="0" rootMode="1" workingSetName="Aggregate for window 1467795326311">
<customFilters userDefinedPatternsEnabled="false">
<xmlDefinedFilters>
<child filterId="org.eclipse.jdt.ui.PackageExplorer.StaticsFilter" isEnabled="false"/>
<child filterId="org.eclipse.buildship.ui.packageexplorer.filter.gradle.buildfolder" isEnabled="true"/>
<child filterId="org.eclipse.mylyn.java.ui.MembersFilter" isEnabled="false"/>
<child filterId="org.eclipse.jdt.ui.PackageExplorer.NonJavaProjectsFilter" isEnabled="false"/>
<child filterId="org.eclipse.jdt.ui.PackageExplorer_patternFilterId_.*" isEnabled="true"/>
<child filterId="org.eclipse.jdt.ui.PackageExplorer.NonSharedProjectsFilter" isEnabled="false"/>
<child filterId="org.eclipse.jdt.ui.PackageExplorer.SyntheticMembersFilter" isEnabled="true"/>
<child filterId="org.eclipse.jdt.ui.PackageExplorer.ContainedLibraryFilter" isEnabled="false"/>
<child filterId="org.eclipse.jdt.internal.ui.PackageExplorer.HideInnerClassFilesFilter" isEnabled="true"/>
<child filterId="org.eclipse.jdt.internal.ui.PackageExplorer.EmptyInnerPackageFilter" isEnabled="true"/>
<child filterId="org.eclipse.m2e.MavenModuleFilter" isEnabled="false"/>
<child filterId="org.eclipse.buildship.ui.packageexplorer.filter.gradle.subProject" isEnabled="true"/>
<child filterId="org.eclipse.jdt.ui.PackageExplorer.ClosedProjectsFilter" isEnabled="false"/>
<child filterId="org.eclipse.jdt.ui.PackageExplorer.EmptyLibraryContainerFilter" isEnabled="true"/>
<child filterId="org.eclipse.jdt.ui.PackageExplorer.PackageDeclarationFilter" isEnabled="true"/>
<child filterId="org.eclipse.jdt.ui.PackageExplorer.ImportDeclarationFilter" isEnabled="true"/>
<child filterId="org.eclipse.jdt.ui.PackageExplorer.NonJavaElementFilter" isEnabled="false"/>
<child filterId="org.eclipse.jdt.ui.PackageExplorer.LibraryFilter" isEnabled="false"/>
<child filterId="org.eclipse.jdt.ui.PackageExplorer.CuAndClassFileFilter" isEnabled="false"/>
<child filterId="org.eclipse.jdt.internal.ui.PackageExplorer.EmptyPackageFilter" isEnabled="false"/>
<child filterId="org.eclipse.jdt.ui.PackageExplorer.NonPublicFilter" isEnabled="false"/>
<child filterId="org.eclipse.jdt.ui.PackageExplorer.LocalTypesFilter" isEnabled="false"/>
<child filterId="org.eclipse.jdt.ui.PackageExplorer.FieldsFilter" isEnabled="false"/>
</xmlDefinedFilters>
</customFilters>
</packageExplorer>" key="memento"/>
|
||||
<item value="1" key="rootMode"/>
|
||||
<item value="false" key="linkWithEditor"/>
|
||||
</section>
|
||||
</section>
|
@ -0,0 +1,43 @@
|
||||
<configuration scan="true">
|
||||
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
|
||||
<pattern>%date [%thread] %-5level %logger{35} - %msg%n</pattern>
|
||||
</encoder>
|
||||
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
|
||||
<level>OFF</level> <!-- change to DEBUG to mimic '-consolelog' behaviour -->
|
||||
</filter>
|
||||
</appender>
|
||||
|
||||
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<File>${org.eclipse.m2e.log.dir}/0.log</File>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
|
||||
<FileNamePattern>${org.eclipse.m2e.log.dir}/%i.log</FileNamePattern>
|
||||
<MinIndex>1</MinIndex>
|
||||
<MaxIndex>10</MaxIndex>
|
||||
</rollingPolicy>
|
||||
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
|
||||
<MaxFileSize>100MB</MaxFileSize>
|
||||
</triggeringPolicy>
|
||||
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
|
||||
<pattern>%date [%thread] %-5level %logger{35} - %msg%n</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<appender name="EclipseLog" class="org.eclipse.m2e.logback.appender.EclipseLogAppender">
|
||||
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
|
||||
<level>WARN</level>
|
||||
</filter>
|
||||
</appender>
|
||||
|
||||
<appender name="MavenConsoleLog" class="org.eclipse.m2e.logback.appender.MavenConsoleAppender">
|
||||
</appender>
|
||||
|
||||
<root level="INFO">
|
||||
<appender-ref ref="FILE" />
|
||||
<appender-ref ref="STDOUT" />
|
||||
<appender-ref ref="EclipseLog" />
|
||||
<appender-ref ref="MavenConsoleLog" />
|
||||
</root>
|
||||
|
||||
<logger name="com.ning.http.client" level="INFO" />
|
||||
</configuration>
|
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<setup:Workspace
|
||||
xmi:version="2.0"
|
||||
xmlns:xmi="http://www.omg.org/XMI"
|
||||
xmlns:setup="http://www.eclipse.org/oomph/setup/1.0"
|
||||
name="workspace"/>
|
@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<section name="Workbench">
|
||||
<section name="org.eclipse.ui.internal.QuickAccess">
|
||||
<item value="-1" key="dialogHeight"/>
|
||||
<item value="-1" key="dialogWidth"/>
|
||||
<list key="textEntries">
|
||||
</list>
|
||||
<list key="orderedElements">
|
||||
</list>
|
||||
<list key="orderedProviders">
|
||||
</list>
|
||||
<list key="textArray">
|
||||
</list>
|
||||
</section>
|
||||
</section>
|
@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<workingSetManager>
|
||||
<workingSet aggregate="true" factoryID="org.eclipse.ui.internal.WorkingSetFactory" id="1467795326311_0" label="Window Working Set" name="Aggregate for window 1467795326311"/>
|
||||
</workingSetManager>
|
3
eclipse/.metadata/version.ini
Normal file
3
eclipse/.metadata/version.ini
Normal file
@ -0,0 +1,3 @@
|
||||
#Wed Jul 06 10:55:15 CEST 2016
|
||||
org.eclipse.core.runtime=2
|
||||
org.eclipse.platform=4.6.0.v20160525-2000
|
8329
forge-1.7.10-10.13.4.1614-1.7.10-changelog.txt
Normal file
8329
forge-1.7.10-10.13.4.1614-1.7.10-changelog.txt
Normal file
File diff suppressed because it is too large
Load Diff
6
gradle/wrapper/gradle-wrapper.properties
vendored
Normal file
6
gradle/wrapper/gradle-wrapper.properties
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
#Wed Jul 02 15:54:47 CDT 2014
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-2.0-bin.zip
|
164
gradlew
vendored
Normal file
164
gradlew
vendored
Normal file
@ -0,0 +1,164 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
##############################################################################
|
||||
##
|
||||
## Gradle start up script for UN*X
|
||||
##
|
||||
##############################################################################
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS=""
|
||||
|
||||
APP_NAME="Gradle"
|
||||
APP_BASE_NAME=`basename "$0"`
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD="maximum"
|
||||
|
||||
warn ( ) {
|
||||
echo "$*"
|
||||
}
|
||||
|
||||
die ( ) {
|
||||
echo
|
||||
echo "$*"
|
||||
echo
|
||||
exit 1
|
||||
}
|
||||
|
||||
# OS specific support (must be 'true' or 'false').
|
||||
cygwin=false
|
||||
msys=false
|
||||
darwin=false
|
||||
case "`uname`" in
|
||||
CYGWIN* )
|
||||
cygwin=true
|
||||
;;
|
||||
Darwin* )
|
||||
darwin=true
|
||||
;;
|
||||
MINGW* )
|
||||
msys=true
|
||||
;;
|
||||
esac
|
||||
|
||||
# For Cygwin, ensure paths are in UNIX format before anything is touched.
|
||||
if $cygwin ; then
|
||||
[ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
|
||||
fi
|
||||
|
||||
# Attempt to set APP_HOME
|
||||
# Resolve links: $0 may be a link
|
||||
PRG="$0"
|
||||
# Need this for relative symlinks.
|
||||
while [ -h "$PRG" ] ; do
|
||||
ls=`ls -ld "$PRG"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
PRG="$link"
|
||||
else
|
||||
PRG=`dirname "$PRG"`"/$link"
|
||||
fi
|
||||
done
|
||||
SAVED="`pwd`"
|
||||
cd "`dirname \"$PRG\"`/" >&-
|
||||
APP_HOME="`pwd -P`"
|
||||
cd "$SAVED" >&-
|
||||
|
||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
|
||||
# Determine the Java command to use to start the JVM.
|
||||
if [ -n "$JAVA_HOME" ] ; then
|
||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||
# IBM's JDK on AIX uses strange locations for the executables
|
||||
JAVACMD="$JAVA_HOME/jre/sh/java"
|
||||
else
|
||||
JAVACMD="$JAVA_HOME/bin/java"
|
||||
fi
|
||||
if [ ! -x "$JAVACMD" ] ; then
|
||||
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
else
|
||||
JAVACMD="java"
|
||||
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
|
||||
# Increase the maximum file descriptors if we can.
|
||||
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
|
||||
MAX_FD_LIMIT=`ulimit -H -n`
|
||||
if [ $? -eq 0 ] ; then
|
||||
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
|
||||
MAX_FD="$MAX_FD_LIMIT"
|
||||
fi
|
||||
ulimit -n $MAX_FD
|
||||
if [ $? -ne 0 ] ; then
|
||||
warn "Could not set maximum file descriptor limit: $MAX_FD"
|
||||
fi
|
||||
else
|
||||
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
|
||||
fi
|
||||
fi
|
||||
|
||||
# For Darwin, add options to specify how the application appears in the dock
|
||||
if $darwin; then
|
||||
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
|
||||
fi
|
||||
|
||||
# For Cygwin, switch paths to Windows format before running java
|
||||
if $cygwin ; then
|
||||
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
||||
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
||||
|
||||
# We build the pattern for arguments to be converted via cygpath
|
||||
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
|
||||
SEP=""
|
||||
for dir in $ROOTDIRSRAW ; do
|
||||
ROOTDIRS="$ROOTDIRS$SEP$dir"
|
||||
SEP="|"
|
||||
done
|
||||
OURCYGPATTERN="(^($ROOTDIRS))"
|
||||
# Add a user-defined pattern to the cygpath arguments
|
||||
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
|
||||
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
|
||||
fi
|
||||
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||
i=0
|
||||
for arg in "$@" ; do
|
||||
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
|
||||
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
|
||||
|
||||
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
|
||||
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
|
||||
else
|
||||
eval `echo args$i`="\"$arg\""
|
||||
fi
|
||||
i=$((i+1))
|
||||
done
|
||||
case $i in
|
||||
(0) set -- ;;
|
||||
(1) set -- "$args0" ;;
|
||||
(2) set -- "$args0" "$args1" ;;
|
||||
(3) set -- "$args0" "$args1" "$args2" ;;
|
||||
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
|
||||
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
|
||||
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
|
||||
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
|
||||
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
|
||||
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
|
||||
function splitJvmOpts() {
|
||||
JVM_OPTS=("$@")
|
||||
}
|
||||
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
|
||||
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
|
||||
|
||||
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
|
90
gradlew.bat
vendored
Normal file
90
gradlew.bat
vendored
Normal file
@ -0,0 +1,90 @@
|
||||
@if "%DEBUG%" == "" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem Gradle startup script for Windows
|
||||
@rem
|
||||
@rem ##########################################################################
|
||||
|
||||
@rem Set local scope for the variables with windows NT shell
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
|
||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
set DEFAULT_JVM_OPTS=
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%" == "" set DIRNAME=.
|
||||
set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
@rem Find java.exe
|
||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if "%ERRORLEVEL%" == "0" goto init
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:findJavaFromJavaHome
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto init
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:init
|
||||
@rem Get command-line arguments, handling Windowz variants
|
||||
|
||||
if not "%OS%" == "Windows_NT" goto win9xME_args
|
||||
if "%@eval[2+2]" == "4" goto 4NT_args
|
||||
|
||||
:win9xME_args
|
||||
@rem Slurp the command line arguments.
|
||||
set CMD_LINE_ARGS=
|
||||
set _SKIP=2
|
||||
|
||||
:win9xME_args_slurp
|
||||
if "x%~1" == "x" goto execute
|
||||
|
||||
set CMD_LINE_ARGS=%*
|
||||
goto execute
|
||||
|
||||
:4NT_args
|
||||
@rem Get arguments from the 4NT Shell from JP Software
|
||||
set CMD_LINE_ARGS=%$
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if "%ERRORLEVEL%"=="0" goto mainEnd
|
||||
|
||||
:fail
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd.exe /c_ return code!
|
||||
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
||||
exit /b 1
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
||||
:omega
|
35
src/main/java/fr/jackcartersmith/ob/OBNetwork$1.java
Normal file
35
src/main/java/fr/jackcartersmith/ob/OBNetwork$1.java
Normal file
@ -0,0 +1,35 @@
|
||||
package fr.jackcartersmith.ob;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import fr.jackcartersmith.ob.entities.MeteorEntity;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
|
||||
public class OBNetwork$1 extends Thread
|
||||
{
|
||||
final Random val$random;
|
||||
final EntityPlayerMP val$playerMP;
|
||||
final int val$fx;
|
||||
final int val$fy;
|
||||
final int val$fz;
|
||||
|
||||
OBNetwork$1(Random var2, EntityPlayerMP var3, int var4, int var5, int var6){
|
||||
this.val$random = var2;
|
||||
this.val$playerMP = var3;
|
||||
this.val$fx = var4;
|
||||
this.val$fy = var5;
|
||||
this.val$fz = var6;
|
||||
}
|
||||
|
||||
public void run(){
|
||||
try{
|
||||
Thread.sleep((long)this.val$random.nextInt(2000));
|
||||
this.val$playerMP.worldObj.playSoundAtEntity(this.val$playerMP, "ob:reentry", 5.0F, 1.0F);
|
||||
this.val$playerMP.worldObj.playSoundAtEntity(this.val$playerMP, "ob:booming", 8.0F, 2.0F);
|
||||
this.val$playerMP.worldObj.spawnEntityInWorld(new MeteorEntity(this.val$playerMP.worldObj, this.val$fx, this.val$fy, this.val$fz));
|
||||
}
|
||||
catch (InterruptedException var2){
|
||||
var2.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
232
src/main/java/fr/jackcartersmith/ob/OBNetwork.java
Normal file
232
src/main/java/fr/jackcartersmith/ob/OBNetwork.java
Normal file
@ -0,0 +1,232 @@
|
||||
package fr.jackcartersmith.ob;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.DataOutputStream;
|
||||
import java.util.ArrayList;
|
||||
import java.util.ConcurrentModificationException;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import cpw.mods.fml.common.network.ByteBufUtils;
|
||||
import cpw.mods.fml.common.network.simpleimpl.IMessage;
|
||||
import cpw.mods.fml.common.network.simpleimpl.IMessageHandler;
|
||||
import cpw.mods.fml.common.network.simpleimpl.MessageContext;
|
||||
import fr.jackcartersmith.ob.blocks.OverriderBlockTileEntity;
|
||||
import fr.jackcartersmith.ob.libs.OBConstants;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLiving;
|
||||
import net.minecraft.entity.effect.EntityLightningBolt;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class OBNetwork implements IMessage
|
||||
{
|
||||
private List<Integer> dataArray = new ArrayList<Integer>();
|
||||
|
||||
public OBNetwork() {}
|
||||
|
||||
public OBNetwork(List<Integer> dataArray) {
|
||||
this.dataArray = dataArray;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fromBytes(ByteBuf buf){
|
||||
for (int i = 0; i < 5; i++){
|
||||
this.dataArray.add(buf.readInt());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void toBytes(ByteBuf buf){
|
||||
for (int i = 0; i < 5; i++){
|
||||
buf.writeInt(this.dataArray.get(i));
|
||||
}
|
||||
}
|
||||
|
||||
public static class Handler implements IMessageHandler<OBNetwork, IMessage>{
|
||||
int function;
|
||||
int xCoord;
|
||||
int yCoord;
|
||||
int zCoord;
|
||||
int data_value;
|
||||
|
||||
public void sendChangeToClient(int xCoord, int yCoord, int zCoord, int chargeLevel)
|
||||
{
|
||||
List<Integer> bos = new ArrayList<Integer>();
|
||||
|
||||
bos.add(5);
|
||||
bos.add(xCoord);
|
||||
bos.add(yCoord);
|
||||
bos.add(zCoord);
|
||||
bos.add(chargeLevel);
|
||||
|
||||
/*
|
||||
Packet250CustomPayload packet = new Packet250CustomPayload();
|
||||
packet.channel = "OB";
|
||||
packet.data = bos.toByteArray();
|
||||
packet.length = bos.size();
|
||||
PacketDispatcher.sendPacketToAllPlayers(packet);
|
||||
*/
|
||||
OrbitalBombardment.obNetwork.sendToAll(new OBNetworkClient(bos));
|
||||
}
|
||||
|
||||
@Override
|
||||
public IMessage onMessage(OBNetwork message, MessageContext ctx){
|
||||
EntityPlayer sender = ctx.getServerHandler().playerEntity;
|
||||
EntityPlayerMP player = ctx.getServerHandler().playerEntity;
|
||||
|
||||
try{
|
||||
this.function = message.dataArray.get(0);
|
||||
}catch(Exception var22){
|
||||
var22.printStackTrace();
|
||||
}
|
||||
|
||||
try{
|
||||
|
||||
|
||||
if (this.function == 2){
|
||||
this.xCoord = message.dataArray.get(1);
|
||||
this.yCoord = message.dataArray.get(2);
|
||||
this.zCoord = message.dataArray.get(3);
|
||||
this.data_value = message.dataArray.get(4);
|
||||
|
||||
try{
|
||||
List charge1 = player.worldObj.getEntitiesWithinAABB(EntityLiving.class,
|
||||
AxisAlignedBB.getBoundingBox((double)(this.xCoord - this.data_value / 3),
|
||||
(double)(this.yCoord - this.data_value / 3), (double)(this.zCoord - this.data_value / 3),
|
||||
(double)(this.xCoord + this.data_value / 3), (double)(this.yCoord + this.data_value / 3),
|
||||
(double)(this.zCoord + this.data_value / 3)));
|
||||
|
||||
if (charge1.size() > 0){
|
||||
for(int y = 0; y <= charge1.size() - 1; y++){
|
||||
Random next = new Random();
|
||||
EntityLiving e1 = (EntityLiving)charge1.get(y);
|
||||
e1.setHealth(0.5F);
|
||||
e1.motionY = (double)(this.data_value / 5);
|
||||
e1.motionX = next.nextGaussian() * 5.0D;
|
||||
e1.motionZ = next.nextGaussian() * 5.0D;
|
||||
}
|
||||
}
|
||||
}catch(Exception var27){
|
||||
var27.printStackTrace();
|
||||
}
|
||||
|
||||
if (this.data_value <= 10){
|
||||
player.worldObj.playSoundAtEntity(player, "ob:explode", 0.3F, 5.0F);
|
||||
}
|
||||
|
||||
if (this.data_value > 10 && this.data_value <= 40){
|
||||
player.worldObj.playSoundAtEntity(player, "ob:explode", 0.3F, 1.5F);
|
||||
}
|
||||
|
||||
if (this.data_value > 40){
|
||||
player.worldObj.playSoundAtEntity(player, "ob:explode", 0.4F, 0.3F);
|
||||
}
|
||||
|
||||
player.worldObj.createExplosion((Entity)null, (double)this.xCoord, (double)this.yCoord, (double)this.zCoord, (float)this.data_value, true);
|
||||
}
|
||||
|
||||
if (this.function == 5 && message != null){
|
||||
this.xCoord = message.dataArray.get(1);
|
||||
this.yCoord = message.dataArray.get(2);
|
||||
this.zCoord = message.dataArray.get(3);
|
||||
Random rand = new Random();
|
||||
OBNetwork$1 obNetworkServerThread = new OBNetwork$1(rand, player,this.xCoord, this.yCoord, this.zCoord);
|
||||
obNetworkServerThread.start();
|
||||
}
|
||||
|
||||
if (this.function == 9){
|
||||
this.xCoord = message.dataArray.get(1);
|
||||
this.yCoord = message.dataArray.get(2);
|
||||
this.zCoord = message.dataArray.get(3);
|
||||
player.worldObj.spawnEntityInWorld(new EntityLightningBolt(player.worldObj, (double)this.xCoord, (double)this.yCoord, (double)this.zCoord));
|
||||
}
|
||||
|
||||
if (this.function == 12){
|
||||
synchronized (sender){
|
||||
this.xCoord = message.dataArray.get(1);
|
||||
this.yCoord = message.dataArray.get(2);
|
||||
this.zCoord = message.dataArray.get(3);
|
||||
this.data_value = message.dataArray.get(4);
|
||||
World world = player.worldObj;
|
||||
boolean var35 = false;
|
||||
int var36 = this.yCoord + 1;
|
||||
world.playSoundAtEntity(player, "ob:digging", 0.7F, 0.3F);
|
||||
|
||||
do{
|
||||
--var36;
|
||||
|
||||
try{
|
||||
Block found = world.getBlock(this.xCoord, var36, this.zCoord);
|
||||
ItemStack itemBlock = new ItemStack(found);
|
||||
new Random();
|
||||
EntityItem droppedItem = new EntityItem(world, (double)this.xCoord, (double)this.yCoord, (double)this.zCoord, itemBlock);
|
||||
Random rand = new Random();
|
||||
droppedItem.motionX = rand.nextGaussian() / 10.0D;
|
||||
droppedItem.motionY = 0.8D;
|
||||
droppedItem.motionZ = rand.nextGaussian() / 10.0D;
|
||||
world.spawnEntityInWorld(droppedItem);
|
||||
world.setBlockToAir(this.xCoord, var36, this.zCoord);
|
||||
Thread.sleep(5L);
|
||||
}catch(NullPointerException var23){
|
||||
}catch(ConcurrentModificationException var24){
|
||||
break;
|
||||
}catch(Exception var25){}
|
||||
}while(world.getBlock(this.xCoord, var36 - 1, this.zCoord) != Blocks.bedrock
|
||||
&& world.getBlock(this.xCoord, var36 - 1, this.zCoord) != Blocks.flowing_lava
|
||||
&& world.getBlock(this.xCoord, var36 - 1, this.zCoord) != Blocks.lava
|
||||
&& world.getBlock(this.xCoord, var36 - 1, this.zCoord) != Blocks.flowing_water
|
||||
&& world.getBlock(this.xCoord, var36 - 1, this.zCoord) != Blocks.water);
|
||||
|
||||
world.setBlockToAir(this.xCoord, this.yCoord + 1, this.zCoord);
|
||||
}
|
||||
}
|
||||
|
||||
if (this.function == 15){
|
||||
this.xCoord = message.dataArray.get(1);
|
||||
this.yCoord = message.dataArray.get(2);
|
||||
this.zCoord = message.dataArray.get(3);
|
||||
this.data_value = message.dataArray.get(4);
|
||||
OverriderBlockTileEntity overrider = (OverriderBlockTileEntity)player.worldObj.getTileEntity(this.xCoord, this.yCoord, this.zCoord);
|
||||
overrider.currentCharge -= this.data_value;
|
||||
--overrider.shotsLeft;
|
||||
}
|
||||
|
||||
if (this.function == 18){
|
||||
this.xCoord = message.dataArray.get(1);
|
||||
this.yCoord = message.dataArray.get(2);
|
||||
this.zCoord = message.dataArray.get(3);
|
||||
this.data_value = message.dataArray.get(4);
|
||||
player.worldObj.playSoundAtEntity(player, "ob:satelliteLaunch", 1.0F, 1.0F);
|
||||
OverriderBlockTileEntity overrider = (OverriderBlockTileEntity)player.worldObj.getTileEntity(this.xCoord, this.yCoord, this.zCoord);
|
||||
overrider.shotsLeft += this.data_value;
|
||||
overrider.currentCharge -= OBConstants.SateliteLaunchPUCost;
|
||||
this.sendChangeToClient(this.xCoord, this.yCoord, this.zCoord, this.data_value);
|
||||
}
|
||||
|
||||
if (this.function == 21){
|
||||
this.xCoord = message.dataArray.get(1);
|
||||
this.yCoord = message.dataArray.get(2);
|
||||
this.zCoord = message.dataArray.get(3);
|
||||
this.data_value = message.dataArray.get(4);
|
||||
player.worldObj.removeTileEntity(this.xCoord, this.yCoord, this.zCoord);
|
||||
player.worldObj.setBlockToAir(this.xCoord, this.yCoord, this.zCoord);
|
||||
}
|
||||
|
||||
if (this.function == 24){
|
||||
player.worldObj.playSoundAtEntity(player, "ob:start", 1.0F, 1.0F);
|
||||
player.worldObj.playSoundAtEntity(player, "ob:middle", 1.0F, 0.7F);
|
||||
}
|
||||
|
||||
}catch(Exception var28){}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
177
src/main/java/fr/jackcartersmith/ob/OBNetworkClient.java
Normal file
177
src/main/java/fr/jackcartersmith/ob/OBNetworkClient.java
Normal file
@ -0,0 +1,177 @@
|
||||
package fr.jackcartersmith.ob;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import cpw.mods.fml.common.network.simpleimpl.IMessage;
|
||||
import cpw.mods.fml.common.network.simpleimpl.IMessageHandler;
|
||||
import cpw.mods.fml.common.network.simpleimpl.MessageContext;
|
||||
import fr.jackcartersmith.ob.blocks.ExtenderTileEntity;
|
||||
import fr.jackcartersmith.ob.blocks.OverriderBlockTileEntity;
|
||||
import fr.jackcartersmith.ob.interfaces.PhotonRecieving;
|
||||
import fr.jackcartersmith.ob.interfaces.PhotonSending;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.entity.EntityClientPlayerMP;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
|
||||
public class OBNetworkClient implements IMessage
|
||||
{
|
||||
private List<Integer> dataArray = new ArrayList<Integer>();
|
||||
|
||||
public OBNetworkClient() {}
|
||||
|
||||
public OBNetworkClient(List<Integer> dataArray) {
|
||||
this.dataArray = dataArray;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fromBytes(ByteBuf buf){
|
||||
for (int i = 0; i < 5; i++){
|
||||
this.dataArray.add(buf.readInt());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void toBytes(ByteBuf buf){
|
||||
for (int i = 0; i < 5; i++){
|
||||
buf.writeInt(this.dataArray.get(i));
|
||||
}
|
||||
}
|
||||
|
||||
public static class Handler implements IMessageHandler<OBNetworkClient, IMessage>{
|
||||
int function;
|
||||
int x;
|
||||
int y;
|
||||
int z;
|
||||
int data_value;
|
||||
|
||||
@Override
|
||||
public IMessage onMessage(OBNetworkClient message, MessageContext ctx){
|
||||
try{
|
||||
this.function = message.dataArray.get(0);
|
||||
this.x = message.dataArray.get(1);
|
||||
this.y = message.dataArray.get(2);
|
||||
this.z = message.dataArray.get(3);
|
||||
this.data_value = message.dataArray.get(4);
|
||||
}catch(Exception var8){
|
||||
var8.printStackTrace();
|
||||
return null;
|
||||
}
|
||||
|
||||
/*
|
||||
System.out.println(this.function);
|
||||
System.out.println(this.x);
|
||||
System.out.println(this.y);
|
||||
System.out.println(this.z);
|
||||
System.out.println(this.data_value);
|
||||
*/
|
||||
|
||||
try{
|
||||
if (this.function == 1){
|
||||
EntityClientPlayerMP player = Minecraft.getMinecraft().thePlayer;
|
||||
OverriderBlockTileEntity overrider = (OverriderBlockTileEntity)player.worldObj.getTileEntity(this.x, this.y, this.z);
|
||||
|
||||
if (overrider != null && overrider instanceof OverriderBlockTileEntity){
|
||||
overrider.currentCharge = this.data_value;
|
||||
}
|
||||
}
|
||||
|
||||
if (this.function == 3){
|
||||
EntityClientPlayerMP player = Minecraft.getMinecraft().thePlayer;
|
||||
ExtenderTileEntity extender = (ExtenderTileEntity)player.worldObj.getTileEntity(this.x, this.y, this.z);
|
||||
|
||||
if (extender instanceof ExtenderTileEntity){
|
||||
extender.currentCharge = this.data_value;
|
||||
}
|
||||
}
|
||||
|
||||
if (this.function == 5){
|
||||
EntityClientPlayerMP player = Minecraft.getMinecraft().thePlayer;
|
||||
OverriderBlockTileEntity overrider = (OverriderBlockTileEntity)player.worldObj.getTileEntity(this.x, this.y, this.z);
|
||||
|
||||
if (overrider instanceof OverriderBlockTileEntity){
|
||||
overrider.shotsLeft = this.data_value;
|
||||
}
|
||||
}
|
||||
|
||||
if (this.function == 7)
|
||||
{
|
||||
EntityClientPlayerMP player = Minecraft.getMinecraft().thePlayer;
|
||||
PhotonSending ext2 = (PhotonSending)player.worldObj.getTileEntity(this.x, this.y, this.z);
|
||||
|
||||
if (ext2 instanceof PhotonSending)
|
||||
{
|
||||
ext2.setOutputRate(this.data_value);
|
||||
}
|
||||
}
|
||||
|
||||
if (this.function == 9)
|
||||
{
|
||||
EntityClientPlayerMP player = Minecraft.getMinecraft().thePlayer;
|
||||
PhotonSending ext2 = (PhotonSending)player.worldObj.getTileEntity(this.x, this.y, this.z);
|
||||
|
||||
if (ext2 instanceof PhotonSending)
|
||||
{
|
||||
ext2.setScaledOutput(this.data_value);
|
||||
}
|
||||
}
|
||||
|
||||
if (this.function == 11)
|
||||
{
|
||||
EntityClientPlayerMP player = Minecraft.getMinecraft().thePlayer;
|
||||
PhotonSending ext2 = (PhotonSending)player.worldObj.getTileEntity(this.x, this.y, this.z);
|
||||
|
||||
if (ext2 instanceof PhotonSending)
|
||||
{
|
||||
ext2.setListSize(this.data_value);
|
||||
}
|
||||
}
|
||||
|
||||
if (this.function == 13)
|
||||
{
|
||||
EntityClientPlayerMP player = Minecraft.getMinecraft().thePlayer;
|
||||
PhotonRecieving ext3 = (PhotonRecieving)player.worldObj.getTileEntity(this.x, this.y, this.z);
|
||||
|
||||
if (ext3 instanceof PhotonRecieving)
|
||||
{
|
||||
ext3.setScaledOutput(this.data_value);
|
||||
}
|
||||
}
|
||||
|
||||
if (this.function == 15)
|
||||
{
|
||||
EntityClientPlayerMP player = Minecraft.getMinecraft().thePlayer;
|
||||
PhotonRecieving ext3 = (PhotonRecieving)player.worldObj.getTileEntity(this.x, this.y, this.z);
|
||||
|
||||
if (ext3 instanceof PhotonRecieving)
|
||||
{
|
||||
ext3.setPowerIncoming(this.data_value);
|
||||
}
|
||||
}
|
||||
|
||||
if (this.function == 17)
|
||||
{
|
||||
EntityClientPlayerMP player = Minecraft.getMinecraft().thePlayer;
|
||||
PhotonRecieving ext3 = (PhotonRecieving)player.worldObj.getTileEntity(this.x, this.y, this.z);
|
||||
|
||||
if (ext3 instanceof PhotonRecieving)
|
||||
{
|
||||
ext3.setCurrentCharge(this.data_value);
|
||||
}
|
||||
}
|
||||
|
||||
if (this.function == 19)
|
||||
{
|
||||
EntityClientPlayerMP player = Minecraft.getMinecraft().thePlayer;
|
||||
player.worldObj.playSoundEffect((double)this.x, (double)this.y, (double)this.z, "ob:defender_strike", 1.0F, 1.0F);
|
||||
}
|
||||
|
||||
return null;
|
||||
}catch (Exception var7){
|
||||
//var7.printStackTrace();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
89
src/main/java/fr/jackcartersmith/ob/OrbitalBombardment.java
Normal file
89
src/main/java/fr/jackcartersmith/ob/OrbitalBombardment.java
Normal file
@ -0,0 +1,89 @@
|
||||
package fr.jackcartersmith.ob;
|
||||
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.init.Blocks;
|
||||
import cpw.mods.fml.common.Mod;
|
||||
import cpw.mods.fml.common.Mod.EventHandler;
|
||||
import cpw.mods.fml.common.Mod.Instance;
|
||||
import cpw.mods.fml.common.SidedProxy;
|
||||
import cpw.mods.fml.common.event.FMLInitializationEvent;
|
||||
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
|
||||
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
||||
import cpw.mods.fml.common.network.NetworkRegistry;
|
||||
import cpw.mods.fml.common.network.simpleimpl.SimpleNetworkWrapper;
|
||||
import cpw.mods.fml.common.registry.EntityRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import fr.jackcartersmith.ob.blocks.OBBlocks;
|
||||
import fr.jackcartersmith.ob.entities.LaserLightEntity;
|
||||
import fr.jackcartersmith.ob.entities.MeteorEntity;
|
||||
import fr.jackcartersmith.ob.gui.GuiHandlerForOb;
|
||||
import fr.jackcartersmith.ob.items.OBItems;
|
||||
import fr.jackcartersmith.ob.libs.OBConstants;
|
||||
import fr.jackcartersmith.ob.libs.OBCreativeTabs;
|
||||
import fr.jackcartersmith.ob.proxy.CommonProxy;
|
||||
|
||||
@Mod(modid = OrbitalBombardment.MODID, version = OrbitalBombardment.VERSION)
|
||||
public class OrbitalBombardment
|
||||
{
|
||||
@Instance("ob")
|
||||
public static OrbitalBombardment instance;
|
||||
|
||||
@SidedProxy(clientSide = "fr.jackcartersmith.ob.proxy.ClientProxy", serverSide = "fr.jackcartersmith.ob.proxy.CommonProxy")
|
||||
public static CommonProxy proxy;
|
||||
|
||||
public static SimpleNetworkWrapper obNetwork = NetworkRegistry.INSTANCE.newSimpleChannel("OB");
|
||||
//private GuiHandlerForOb guiHandlerForOb = new GuiHandlerForOb();
|
||||
|
||||
public static int sateliteModelId;
|
||||
|
||||
public int lastChargerX;
|
||||
public int lastChargerY;
|
||||
public int lastChargerZ;
|
||||
public int lastExtenderX;
|
||||
public int lastExtenderY;
|
||||
public int lastExtenderZ;
|
||||
public int lastGeneralX;
|
||||
public int lastGeneralY;
|
||||
public int lastGeneralZ;
|
||||
|
||||
public static int mobid = 0;
|
||||
|
||||
public static final String MODID = "ob";
|
||||
public static final String VERSION = "2.0";
|
||||
|
||||
public static CreativeTabs OBCreativeTabs = new OBCreativeTabs("ob_creative_tabs");
|
||||
|
||||
@EventHandler
|
||||
public void preInit(FMLPreInitializationEvent event)
|
||||
{
|
||||
//Init conf file
|
||||
OBConstants.init(event.getSuggestedConfigurationFile());
|
||||
|
||||
//Create packet channel for OB and register packets
|
||||
obNetwork = NetworkRegistry.INSTANCE.newSimpleChannel("OB");
|
||||
obNetwork.registerMessage(OBNetwork.Handler.class, OBNetwork.class, 1, Side.SERVER);
|
||||
obNetwork.registerMessage(OBNetworkClient.Handler.class, OBNetworkClient.class, 2, Side.CLIENT);
|
||||
|
||||
//Init Items and Blocks
|
||||
OBItems.init();
|
||||
OBBlocks.init();
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void init(FMLInitializationEvent event)
|
||||
{
|
||||
EntityRegistry.registerModEntity(MeteorEntity.class, "meteor", 1, instance, 80, 3, true);
|
||||
EntityRegistry.registerModEntity(LaserLightEntity.class, "LaserLightEntity", 2, instance, 80, 3, true);
|
||||
|
||||
//Register GuiHandler for all GUI
|
||||
NetworkRegistry.INSTANCE.registerGuiHandler(OrbitalBombardment.instance, new GuiHandlerForOb());
|
||||
|
||||
proxy.registerRender();
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void postInit(FMLPostInitializationEvent event)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
81
src/main/java/fr/jackcartersmith/ob/blocks/DefLasBlock.java
Normal file
81
src/main/java/fr/jackcartersmith/ob/blocks/DefLasBlock.java
Normal file
@ -0,0 +1,81 @@
|
||||
package fr.jackcartersmith.ob.blocks;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import fr.jackcartersmith.ob.proxy.ClientProxy;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class DefLasBlock extends BlockContainer
|
||||
{
|
||||
public DefLasBlock(Material par2Material)
|
||||
{
|
||||
super(par2Material);
|
||||
}
|
||||
|
||||
public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z)
|
||||
{
|
||||
this.setBlockBounds(0.0F, 0.0F, 0.0F, 0.0F, 10000.0F, 0.0F);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
|
||||
/**
|
||||
* When this method is called, your block should register all the icons it needs with the given IconRegister. This
|
||||
* is the only chance you get to register icons.
|
||||
*/
|
||||
public void registerIcons(IIconRegister icon) {}
|
||||
|
||||
/**
|
||||
* Returns a new instance of a block's tile entity class. Called on placing the block.
|
||||
*/
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World arg0, int arg1) {
|
||||
return new DefenderLaserTileEntity();
|
||||
}
|
||||
@Override
|
||||
public boolean hasTileEntity(int metadata)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Called on server worlds only when the block has been replaced by a different block ID, or the same block with a
|
||||
* different metadata value, but before the new metadata value is set. Args: World, x, y, z, old block ID, old
|
||||
* metadata
|
||||
*/
|
||||
public void breakBlock(World par1World, int par2, int par3, int par4, Block block, int par6)
|
||||
{
|
||||
par1World.removeTileEntity(par2, par3, par4);
|
||||
}
|
||||
|
||||
/**
|
||||
* The type of render function that is called for this block
|
||||
*/
|
||||
public int getRenderType()
|
||||
{
|
||||
return ClientProxy.tesrRenderId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Is this block (a) opaque and (b) a full 1m cube? This determines whether or not to render the shared face of two
|
||||
* adjacent blocks and also whether the player can attach torches, redstone wire, etc to this block.
|
||||
*/
|
||||
public boolean isOpaqueCube()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* If this block doesn't render as an ordinary block it will return False (examples: signs, buttons, stairs, etc)
|
||||
*/
|
||||
public boolean renderAsNormalBlock()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
@ -0,0 +1,90 @@
|
||||
package fr.jackcartersmith.ob.blocks;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import fr.jackcartersmith.ob.OrbitalBombardment;
|
||||
import fr.jackcartersmith.ob.proxy.ClientProxy;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.EntityLiving;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class DefenderBlock extends BlockContainer
|
||||
{
|
||||
public DefenderBlock(Material par2Material)
|
||||
{
|
||||
super(par2Material);
|
||||
}
|
||||
|
||||
public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z)
|
||||
{
|
||||
this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 2.0F, 1.0F);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
|
||||
/**
|
||||
* When this method is called, your block should register all the icons it needs with the given IconRegister. This
|
||||
* is the only chance you get to register icons.
|
||||
*/
|
||||
public void registerIcons(IIconRegister icon) {}
|
||||
|
||||
/**
|
||||
* Called on server worlds only when the block has been replaced by a different block ID, or the same block with a
|
||||
* different metadata value, but before the new metadata value is set. Args: World, x, y, z, old block ID, old
|
||||
* metadata
|
||||
*/
|
||||
public void breakBlock(World par1World, int par2, int par3, int par4, Block block, int par6)
|
||||
{
|
||||
par1World.removeTileEntity(par2, par3, par4);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a new instance of a block's tile entity class. Called on placing the block.
|
||||
*/
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World arg0, int arg1) {
|
||||
return new DefenderTileEntity();
|
||||
}
|
||||
@Override
|
||||
public boolean hasTileEntity(int metadata)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* The type of render function that is called for this block
|
||||
*/
|
||||
public int getRenderType()
|
||||
{
|
||||
return ClientProxy.tesrRenderId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Is this block (a) opaque and (b) a full 1m cube? This determines whether or not to render the shared face of two
|
||||
* adjacent blocks and also whether the player can attach torches, redstone wire, etc to this block.
|
||||
*/
|
||||
public boolean isOpaqueCube()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* If this block doesn't render as an ordinary block it will return False (examples: signs, buttons, stairs, etc)
|
||||
*/
|
||||
public boolean renderAsNormalBlock()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public void onBlockPlacedBy(World world, int i, int j, int k, EntityLiving entityliving)
|
||||
{
|
||||
int rotation = MathHelper.floor_double((double)(entityliving.rotationYaw * 4.0F / 360.0F) + 2.5D) & 3;
|
||||
world.setBlockMetadataWithNotify(i, j, k, rotation - 1, rotation - 1);
|
||||
}
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package fr.jackcartersmith.ob.blocks;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
import fr.jackcartersmith.ob.interfaces.PhotonRecieving;
|
||||
import fr.jackcartersmith.ob.libs.OBConstants;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.monster.EntityMob;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.DamageSource;
|
||||
|
||||
|
||||
public class DefenderLaserTileEntity extends PhotonRecieving
|
||||
{
|
||||
int ticksCount = 0;
|
||||
|
||||
/**
|
||||
* Allows the entity to update its state. Overridden in most subclasses, e.g. the mob spawner uses this to count
|
||||
* ticks and creates a new spawn inside its implementation.
|
||||
*/
|
||||
public void updateEntity()
|
||||
{
|
||||
this.rotate += 1.0E-6F * (float)this.getCurrentCharge();
|
||||
|
||||
if ((double)this.rotate >= 3.141D)
|
||||
{
|
||||
this.rotate = -3.141F;
|
||||
}
|
||||
|
||||
if (this.ticksCount == 15)
|
||||
{
|
||||
List damages = this.getNearByEntitiesForDamage(this.xCoord, this.yCoord, this.zCoord);
|
||||
Iterator i$ = damages.iterator();
|
||||
|
||||
while (i$.hasNext())
|
||||
{
|
||||
EntityMob damage = (EntityMob)i$.next();
|
||||
DamageSource source = DamageSource.anvil;
|
||||
damage.attackEntityFrom(source, 10.0F);
|
||||
}
|
||||
|
||||
this.worldObj.setBlockToAir(this.xCoord, this.yCoord, this.zCoord);
|
||||
this.worldObj.removeTileEntity(this.xCoord, this.yCoord, this.zCoord);
|
||||
|
||||
if (!(this.worldObj.getTileEntity(this.xCoord, this.yCoord - 1, this.zCoord) instanceof DefenderTileEntity))
|
||||
{
|
||||
this.worldObj.createExplosion((Entity)null, (double)this.xCoord, (double)this.yCoord, (double)this.zCoord, 0.1F, true);
|
||||
}
|
||||
}
|
||||
|
||||
++this.ticksCount;
|
||||
}
|
||||
|
||||
public List getNearByEntitiesForDamage(int x, int y, int z)
|
||||
{
|
||||
int radius = OBConstants.DefenderRadius;
|
||||
List entities = this.worldObj.getEntitiesWithinAABB(EntityMob.class, AxisAlignedBB.getBoundingBox((double)(x - 5), (double)(y - 5), (double)(z - 5), (double)(x + 5), (double)(y + 5), (double)(z + 5)));
|
||||
return entities;
|
||||
}
|
||||
}
|
@ -0,0 +1,103 @@
|
||||
package fr.jackcartersmith.ob.blocks;
|
||||
|
||||
import fr.jackcartersmith.ob.OBNetworkClient;
|
||||
import fr.jackcartersmith.ob.OrbitalBombardment;
|
||||
import fr.jackcartersmith.ob.interfaces.PhotonRecieving;
|
||||
import fr.jackcartersmith.ob.libs.OBConstants;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.entity.monster.EntityMob;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
|
||||
public class DefenderTileEntity extends PhotonRecieving
|
||||
{
|
||||
int ticksCount = 0;
|
||||
|
||||
/**
|
||||
* Allows the entity to update its state. Overridden in most subclasses, e.g. the mob spawner uses this to count
|
||||
* ticks and creates a new spawn inside its implementation.
|
||||
*/
|
||||
public void updateEntity()
|
||||
{
|
||||
this.rotate += 1.0E-6F * (float)this.getCurrentCharge();
|
||||
|
||||
if ((double)this.rotate >= 3.141D)
|
||||
{
|
||||
this.rotate = -3.141F;
|
||||
}
|
||||
|
||||
if (!this.worldObj.isRemote && this.getCurrentCharge() > 500)
|
||||
{
|
||||
++this.ticksCount;
|
||||
|
||||
if (this.ticksCount > 35)
|
||||
{
|
||||
this.sendChangeToClient17();
|
||||
this.ticksCount = 0;
|
||||
List entities = this.getNearByEntities();
|
||||
int thisX = this.xCoord;
|
||||
int thisY = this.yCoord;
|
||||
int thisZ = this.zCoord;
|
||||
Random random = new Random();
|
||||
|
||||
if (entities.size() > 0)
|
||||
{
|
||||
this.worldObj.playSoundEffect((double)thisX, (double)thisY, (double)thisZ, "ob:defenderLock", 1.0F, 1.0F);
|
||||
EntityMob mob = (EntityMob)entities.get(random.nextInt(entities.size()));
|
||||
|
||||
if (this.getCurrentCharge() > 500)
|
||||
{
|
||||
this.removeCharge(500);
|
||||
int x = (int)mob.lastTickPosX;
|
||||
int y = (int)mob.lastTickPosY;
|
||||
int z = (int)mob.lastTickPosZ;
|
||||
this.worldObj.setBlock(x, y, z, OBBlocks.laserDef);
|
||||
this.worldObj.setBlock(thisX, thisY + 1, thisZ, OBBlocks.laserDef);
|
||||
this.removeCharge(500);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (this.getCurrentCharge() > 5000)
|
||||
{
|
||||
this.setCurrentCharge(5000);
|
||||
}
|
||||
}
|
||||
|
||||
public List getNearByEntities()
|
||||
{
|
||||
int radius = OBConstants.DefenderRadius;
|
||||
List entities = this.worldObj.getEntitiesWithinAABB(EntityMob.class, AxisAlignedBB.getBoundingBox((double)(this.xCoord - radius), (double)(this.yCoord - radius), (double)(this.zCoord - radius), (double)(this.xCoord + radius), (double)(this.yCoord + radius), (double)(this.zCoord + radius)));
|
||||
return entities;
|
||||
}
|
||||
|
||||
public void sendChangeToClient17()
|
||||
{
|
||||
List<Integer> bos = new ArrayList<Integer>();
|
||||
|
||||
bos.add(17);
|
||||
bos.add(this.xCoord);
|
||||
bos.add(this.yCoord);
|
||||
bos.add(this.zCoord);
|
||||
bos.add(this.getCurrentCharge());
|
||||
|
||||
OrbitalBombardment.obNetwork.sendToAll(new OBNetworkClient(bos));
|
||||
}
|
||||
|
||||
public void sendChangeToClient19()
|
||||
{
|
||||
List<Integer> bos = new ArrayList<Integer>();
|
||||
|
||||
bos.add(19);
|
||||
bos.add(this.xCoord);
|
||||
bos.add(this.yCoord);
|
||||
bos.add(this.zCoord);
|
||||
bos.add(0);
|
||||
|
||||
OrbitalBombardment.obNetwork.sendToAll(new OBNetworkClient(bos));
|
||||
}
|
||||
}
|
@ -0,0 +1,97 @@
|
||||
package fr.jackcartersmith.ob.blocks;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import fr.jackcartersmith.ob.OrbitalBombardment;
|
||||
import fr.jackcartersmith.ob.proxy.ClientProxy;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class ExtenderBlock extends BlockContainer
|
||||
{
|
||||
public ExtenderBlock(Material par2Material)
|
||||
{
|
||||
super(par2Material);
|
||||
}
|
||||
|
||||
public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z)
|
||||
{
|
||||
this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
|
||||
/**
|
||||
* When this method is called, your block should register all the icons it needs with the given IconRegister. This
|
||||
* is the only chance you get to register icons.
|
||||
*/
|
||||
public void registerIcons(IIconRegister icon)
|
||||
{
|
||||
this.blockIcon = icon.registerIcon("OB".toLowerCase() + ":extender");
|
||||
}
|
||||
|
||||
/**
|
||||
* Called upon block activation (right click on the block.)
|
||||
*/
|
||||
public boolean onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9)
|
||||
{
|
||||
OrbitalBombardment.instance.lastExtenderX = par2;
|
||||
OrbitalBombardment.instance.lastExtenderY = par3;
|
||||
OrbitalBombardment.instance.lastExtenderZ = par4;
|
||||
par5EntityPlayer.openGui(OrbitalBombardment.instance, 3, par1World, par2, par3, par4);
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a new instance of a block's tile entity class. Called on placing the block.
|
||||
*/
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World arg0, int arg1) {
|
||||
return new ExtenderTileEntity();
|
||||
}
|
||||
@Override
|
||||
public boolean hasTileEntity(int metadata)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
/**
|
||||
* Called on server worlds only when the block has been replaced by a different block ID, or the same block with a
|
||||
* different metadata value, but before the new metadata value is set. Args: World, x, y, z, old block ID, old
|
||||
* metadata
|
||||
*/
|
||||
public void breakBlock(World par1World, int par2, int par3, int par4, Block block, int par6)
|
||||
{
|
||||
par1World.removeTileEntity(par2, par3, par4);
|
||||
}
|
||||
|
||||
/**
|
||||
* The type of render function that is called for this block
|
||||
*/
|
||||
public int getRenderType()
|
||||
{
|
||||
return ClientProxy.tesrRenderId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Is this block (a) opaque and (b) a full 1m cube? This determines whether or not to render the shared face of two
|
||||
* adjacent blocks and also whether the player can attach torches, redstone wire, etc to this block.
|
||||
*/
|
||||
public boolean isOpaqueCube()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* If this block doesn't render as an ordinary block it will return False (examples: signs, buttons, stairs, etc)
|
||||
*/
|
||||
public boolean renderAsNormalBlock()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
@ -0,0 +1,200 @@
|
||||
package fr.jackcartersmith.ob.blocks;
|
||||
|
||||
import fr.jackcartersmith.ob.OBNetworkClient;
|
||||
import fr.jackcartersmith.ob.OrbitalBombardment;
|
||||
import fr.jackcartersmith.ob.libs.OBConstants;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class ExtenderTileEntity extends TileEntity
|
||||
{
|
||||
int tick;
|
||||
final int takeGiveRate = 50;
|
||||
public int currentCharge;
|
||||
public final int maxCharge;
|
||||
|
||||
public ExtenderTileEntity()
|
||||
{
|
||||
this.maxCharge = OBConstants.ExtenderMaxCharge;
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes a tile entity to NBT.
|
||||
*/
|
||||
public void writeToNBT(NBTTagCompound par1)
|
||||
{
|
||||
super.writeToNBT(par1);
|
||||
par1.setInteger("currentChargeExtender", this.currentCharge);
|
||||
}
|
||||
|
||||
/**
|
||||
* Reads a tile entity from NBT.
|
||||
*/
|
||||
public void readFromNBT(NBTTagCompound par1)
|
||||
{
|
||||
super.readFromNBT(par1);
|
||||
this.currentCharge = par1.getInteger("currentChargeExtender");
|
||||
this.sendChangeToClient();
|
||||
}
|
||||
|
||||
/**
|
||||
* Allows the entity to update its state. Overridden in most subclasses, e.g. the mob spawner uses this to count
|
||||
* ticks and creates a new spawn inside its implementation.
|
||||
*/
|
||||
public void updateEntity()
|
||||
{
|
||||
++this.tick;
|
||||
World par1world = this.worldObj;
|
||||
|
||||
if (!par1world.isRemote)
|
||||
{
|
||||
Block north = par1world.getBlock(this.xCoord + 1, this.yCoord, this.zCoord);
|
||||
Block south = par1world.getBlock(this.xCoord - 1, this.yCoord, this.zCoord);
|
||||
Block east = par1world.getBlock(this.xCoord, this.yCoord, this.zCoord + 1);
|
||||
Block west = par1world.getBlock(this.xCoord, this.yCoord, this.zCoord - 1);
|
||||
Block top = par1world.getBlock(this.xCoord, this.yCoord + 1, this.zCoord);
|
||||
Block bottom = par1world.getBlock(this.xCoord, this.yCoord - 1, this.zCoord);
|
||||
OverriderBlockTileEntity entity;
|
||||
int overriderCharge;
|
||||
int overriderMax;
|
||||
|
||||
if (north == OBBlocks.overrider)
|
||||
{
|
||||
entity = (OverriderBlockTileEntity)par1world.getTileEntity(this.xCoord + 1, this.yCoord, this.zCoord);
|
||||
overriderCharge = entity.getCurrentCharge();
|
||||
overriderMax = entity.maxCharge;
|
||||
|
||||
if (overriderCharge >= overriderMax && this.currentCharge <= this.maxCharge)
|
||||
{
|
||||
entity.currentCharge -= 50;
|
||||
this.currentCharge += 50;
|
||||
}
|
||||
|
||||
if (overriderCharge + 50 < overriderMax && this.currentCharge >= 50)
|
||||
{
|
||||
entity.currentCharge += 50;
|
||||
this.currentCharge -= 50;
|
||||
}
|
||||
}
|
||||
|
||||
if (south == OBBlocks.overrider)
|
||||
{
|
||||
entity = (OverriderBlockTileEntity)par1world.getTileEntity(this.xCoord - 1, this.yCoord, this.zCoord);
|
||||
overriderCharge = entity.currentCharge;
|
||||
overriderMax = entity.maxCharge;
|
||||
|
||||
if (overriderCharge >= overriderMax && this.currentCharge <= this.maxCharge)
|
||||
{
|
||||
entity.currentCharge -= 50;
|
||||
this.currentCharge += 50;
|
||||
}
|
||||
|
||||
if (overriderCharge + 50 < overriderMax && this.currentCharge >= 50)
|
||||
{
|
||||
entity.currentCharge += 50;
|
||||
this.currentCharge -= 50;
|
||||
}
|
||||
}
|
||||
|
||||
if (east == OBBlocks.overrider)
|
||||
{
|
||||
entity = (OverriderBlockTileEntity)par1world.getTileEntity(this.xCoord, this.yCoord, this.zCoord + 1);
|
||||
overriderCharge = entity.currentCharge;
|
||||
overriderMax = entity.maxCharge;
|
||||
|
||||
if (overriderCharge >= overriderMax && this.currentCharge <= this.maxCharge)
|
||||
{
|
||||
entity.currentCharge -= 50;
|
||||
this.currentCharge += 50;
|
||||
}
|
||||
|
||||
if (overriderCharge + 1000 < overriderMax && this.currentCharge >= 50)
|
||||
{
|
||||
entity.currentCharge += 50;
|
||||
this.currentCharge -= 50;
|
||||
}
|
||||
}
|
||||
|
||||
if (west == OBBlocks.overrider)
|
||||
{
|
||||
entity = (OverriderBlockTileEntity)par1world.getTileEntity(this.xCoord, this.yCoord, this.zCoord - 1);
|
||||
overriderCharge = entity.currentCharge;
|
||||
overriderMax = entity.maxCharge;
|
||||
|
||||
if (overriderCharge >= overriderMax && this.currentCharge <= this.maxCharge)
|
||||
{
|
||||
entity.currentCharge -= 50;
|
||||
this.currentCharge += 50;
|
||||
}
|
||||
|
||||
if (overriderCharge + 50 < overriderMax && this.currentCharge >= 50)
|
||||
{
|
||||
entity.currentCharge += 50;
|
||||
this.currentCharge -= 50;
|
||||
}
|
||||
}
|
||||
|
||||
if (top == OBBlocks.overrider)
|
||||
{
|
||||
entity = (OverriderBlockTileEntity)par1world.getTileEntity(this.xCoord, this.yCoord + 1, this.zCoord);
|
||||
overriderCharge = entity.currentCharge;
|
||||
overriderMax = entity.maxCharge;
|
||||
|
||||
if (overriderCharge >= overriderMax && this.currentCharge <= this.maxCharge)
|
||||
{
|
||||
entity.currentCharge -= 50;
|
||||
this.currentCharge += 50;
|
||||
}
|
||||
|
||||
if (overriderCharge + 50 < overriderMax && this.currentCharge >= 50)
|
||||
{
|
||||
entity.currentCharge += 50;
|
||||
this.currentCharge -= 50;
|
||||
}
|
||||
}
|
||||
|
||||
if (bottom == OBBlocks.overrider)
|
||||
{
|
||||
entity = (OverriderBlockTileEntity)par1world.getTileEntity(this.xCoord, this.yCoord - 1, this.zCoord);
|
||||
overriderCharge = entity.currentCharge;
|
||||
overriderMax = entity.maxCharge;
|
||||
|
||||
if (overriderCharge >= overriderMax && this.currentCharge <= this.maxCharge)
|
||||
{
|
||||
entity.currentCharge -= 50;
|
||||
this.currentCharge += 50;
|
||||
}
|
||||
|
||||
if (overriderCharge + 50 < overriderMax && this.currentCharge >= 50)
|
||||
{
|
||||
entity.currentCharge += 50;
|
||||
this.currentCharge -= 50;
|
||||
}
|
||||
}
|
||||
|
||||
if (this.tick == 20 && !this.worldObj.isRemote)
|
||||
{
|
||||
this.tick = 0;
|
||||
this.sendChangeToClient();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void sendChangeToClient()
|
||||
{
|
||||
List<Integer> bos = new ArrayList<Integer>();
|
||||
|
||||
bos.add(3);
|
||||
bos.add(this.xCoord);
|
||||
bos.add(this.yCoord);
|
||||
bos.add(this.zCoord);
|
||||
bos.add(this.currentCharge);
|
||||
|
||||
OrbitalBombardment.obNetwork.sendToAll(new OBNetworkClient(bos));
|
||||
}
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
package fr.jackcartersmith.ob.blocks;
|
||||
|
||||
import fr.jackcartersmith.ob.interfaces.PhotonProducing;
|
||||
import fr.jackcartersmith.ob.libs.OBConstants;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
||||
public class InverterAdvTileEntity extends PhotonProducing
|
||||
{
|
||||
public InverterAdvTileEntity()
|
||||
{
|
||||
this.setChargeRate(OBConstants.AdvPhotonInvChargeRate);
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes a tile entity to NBT.
|
||||
*/
|
||||
public void writeToNBT(NBTTagCompound par1)
|
||||
{
|
||||
super.writeToNBT(par1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Reads a tile entity from NBT.
|
||||
*/
|
||||
public void readFromNBT(NBTTagCompound par1)
|
||||
{
|
||||
super.readFromNBT(par1);
|
||||
}
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
package fr.jackcartersmith.ob.blocks;
|
||||
|
||||
import fr.jackcartersmith.ob.interfaces.PhotonProducing;
|
||||
import fr.jackcartersmith.ob.libs.OBConstants;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
||||
public class InverterTileEntity extends PhotonProducing
|
||||
{
|
||||
public InverterTileEntity()
|
||||
{
|
||||
this.setChargeRate(OBConstants.PhotonInvChargeRate);
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes a tile entity to NBT.
|
||||
*/
|
||||
public void writeToNBT(NBTTagCompound par1)
|
||||
{
|
||||
super.writeToNBT(par1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Reads a tile entity from NBT.
|
||||
*/
|
||||
public void readFromNBT(NBTTagCompound par1)
|
||||
{
|
||||
super.readFromNBT(par1);
|
||||
}
|
||||
}
|
126
src/main/java/fr/jackcartersmith/ob/blocks/LaserLowBlock.java
Normal file
126
src/main/java/fr/jackcartersmith/ob/blocks/LaserLowBlock.java
Normal file
@ -0,0 +1,126 @@
|
||||
package fr.jackcartersmith.ob.blocks;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import fr.jackcartersmith.ob.items.OBItems;
|
||||
import fr.jackcartersmith.ob.proxy.ClientProxy;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
public class LaserLowBlock extends BlockContainer
|
||||
{
|
||||
public LaserLowBlock(Material par2Material)
|
||||
{
|
||||
super(par2Material);
|
||||
}
|
||||
|
||||
public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z)
|
||||
{
|
||||
this.setBlockBounds(0.0F, 0.0F, 0.0F, 0.0F, 200.0F, 0.0F);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
|
||||
/**
|
||||
* When this method is called, your block should register all the icons it needs with the given IconRegister. This
|
||||
* is the only chance you get to register icons.
|
||||
*/
|
||||
public void registerIcons(IIconRegister icon)
|
||||
{
|
||||
this.blockIcon = icon.registerIcon("OB".toLowerCase() + ":laserLow");
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the quantity of items to drop on block destruction.
|
||||
*/
|
||||
public int quantityDropped(Random par1Random)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* If this block doesn't render as an ordinary block it will return False (examples: signs, buttons, stairs, etc)
|
||||
*/
|
||||
public boolean renderAsNormalBlock()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Is this block (a) opaque and (b) a full 1m cube? This determines whether or not to render the shared face of two
|
||||
* adjacent blocks and also whether the player can attach torches, redstone wire, etc to this block.
|
||||
*/
|
||||
public boolean isOpaqueCube()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* The type of render function that is called for this block
|
||||
*/
|
||||
public int getRenderType()
|
||||
{
|
||||
return ClientProxy.tesrRenderId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a new instance of a block's tile entity class. Called on placing the block.
|
||||
*/
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World arg0, int arg1)
|
||||
{
|
||||
String color = "";
|
||||
|
||||
try
|
||||
{
|
||||
if (Minecraft.getMinecraft().thePlayer.getCurrentEquippedItem().getUnlocalizedName().equals(OBItems.laserGunHighItem.getUnlocalizedName()))
|
||||
{
|
||||
color = "red";
|
||||
}
|
||||
|
||||
if (Minecraft.getMinecraft().thePlayer.getCurrentEquippedItem().getUnlocalizedName().equals(OBItems.laserGunMedItem.getUnlocalizedName()))
|
||||
{
|
||||
color = "orange";
|
||||
}
|
||||
|
||||
if (Minecraft.getMinecraft().thePlayer.getCurrentEquippedItem().getUnlocalizedName().equals(OBItems.laserGunLowItem.getUnlocalizedName()))
|
||||
{
|
||||
color = "blue";
|
||||
}
|
||||
|
||||
return new LaserLowTileEntity(color);
|
||||
}
|
||||
catch (Exception var4)
|
||||
{
|
||||
return new LaserLowTileEntity("blue");
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public boolean hasTileEntity(int metadata)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Called on server worlds only when the block has been replaced by a different block ID, or the same block with a
|
||||
* different metadata value, but before the new metadata value is set. Args: World, x, y, z, old block ID, old
|
||||
* metadata
|
||||
*/
|
||||
public void breakBlock(World par1World, int par2, int par3, int par4, Block block, int par6)
|
||||
{
|
||||
par1World.removeTileEntity(par2, par3, par4);
|
||||
}
|
||||
|
||||
/**
|
||||
* Ticks the block if it's been scheduled
|
||||
*/
|
||||
public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random) {}
|
||||
}
|
@ -0,0 +1,110 @@
|
||||
package fr.jackcartersmith.ob.blocks;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
public class LaserLowTileEntity extends TileEntity
|
||||
{
|
||||
public float rotate = -3.141F;
|
||||
public float insideCounter = 8.0F;
|
||||
public float color = 0.0F;
|
||||
public float grow = 1.0F;
|
||||
public boolean low = false;
|
||||
public boolean med = false;
|
||||
public boolean high = false;
|
||||
public double speed;
|
||||
boolean down = true;
|
||||
|
||||
public LaserLowTileEntity(String color)
|
||||
{
|
||||
if (color == "blue")
|
||||
{
|
||||
this.low = true;
|
||||
}
|
||||
|
||||
if (color == "orange")
|
||||
{
|
||||
this.med = true;
|
||||
}
|
||||
|
||||
if (color == "red")
|
||||
{
|
||||
this.high = true;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes a tile entity to NBT.
|
||||
*/
|
||||
public void writeToNBT(NBTTagCompound par1)
|
||||
{
|
||||
super.writeToNBT(par1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Reads a tile entity from NBT.
|
||||
*/
|
||||
public void readFromNBT(NBTTagCompound par1)
|
||||
{
|
||||
super.readFromNBT(par1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Allows the entity to update its state. Overridden in most subclasses, e.g. the mob spawner uses this to count
|
||||
* ticks and creates a new spawn inside its implementation.
|
||||
*/
|
||||
public void updateEntity()
|
||||
{
|
||||
this.speed += 0.5D;
|
||||
Random random = new Random();
|
||||
float f1 = (float)this.xCoord + 0.5F;
|
||||
float f2 = (float)this.yCoord + 1.0F;
|
||||
float f3 = (float)this.zCoord + 0.5F;
|
||||
int id;
|
||||
|
||||
if (this.low)
|
||||
{
|
||||
for (id = 0; id <= 150; ++id)
|
||||
{
|
||||
this.worldObj.spawnParticle("reddust", (double)f1 + random.nextDouble() + 0.3D - 0.6D, (double)f2 + random.nextDouble() + 0.3D - 0.6D + (double)id, (double)f3 + random.nextDouble() + 0.3D - 0.6D, 20.0D - this.speed, 20.0D - this.speed, 20.0D + this.speed);
|
||||
}
|
||||
}
|
||||
|
||||
if (this.med)
|
||||
{
|
||||
for (id = 0; id <= 300; ++id)
|
||||
{
|
||||
this.worldObj.spawnParticle("reddust", (double)f1 + random.nextDouble() + 0.3D - 0.6D, (double)f2 + random.nextDouble() + 0.3D - 0.6D + (double)id, (double)f3 + random.nextDouble() + 0.3D - 0.6D, 20.0D + this.speed, 20.0D + this.speed, 20.0D - this.speed);
|
||||
}
|
||||
}
|
||||
|
||||
if (this.high)
|
||||
{
|
||||
for (id = 0; id <= 600; ++id)
|
||||
{
|
||||
this.worldObj.spawnParticle("reddust", (double)f1 + random.nextDouble() + 0.3D - 0.6D, (double)f2 + random.nextDouble() + 0.3D - 0.6D + (double)id, (double)f3 + random.nextDouble() + 0.3D - 0.6D, 20.0D + this.speed, 20.0D - this.speed, 20.0D - this.speed);
|
||||
}
|
||||
}
|
||||
|
||||
this.rotate += 0.05F;
|
||||
|
||||
if (this.rotate > 3.141F)
|
||||
{
|
||||
this.rotate = -3.141F;
|
||||
}
|
||||
|
||||
if (this.insideCounter > 0.5F)
|
||||
{
|
||||
this.insideCounter -= 0.1F;
|
||||
}
|
||||
|
||||
++this.color;
|
||||
|
||||
if (this.insideCounter < 0.5F)
|
||||
{
|
||||
this.grow += 0.05F;
|
||||
}
|
||||
}
|
||||
}
|
62
src/main/java/fr/jackcartersmith/ob/blocks/OBBlocks.java
Normal file
62
src/main/java/fr/jackcartersmith/ob/blocks/OBBlocks.java
Normal file
@ -0,0 +1,62 @@
|
||||
package fr.jackcartersmith.ob.blocks;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import fr.jackcartersmith.ob.OrbitalBombardment;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
|
||||
public class OBBlocks {
|
||||
public static Block laserLow;
|
||||
public static Block overrider;
|
||||
public static Block photonInverter;
|
||||
public static Block photonInverterAdv;
|
||||
public static Block extender;
|
||||
public static Block furnace;
|
||||
public static Block satelite;
|
||||
public static Block photonDecelerator;
|
||||
public static Block photonAccelerator;
|
||||
public static Block defender;
|
||||
public static Block laserDef;
|
||||
|
||||
public static void init(){
|
||||
laserLow = new LaserLowBlock(Material.air).setBlockName("obLaserLow").setBlockTextureName(OrbitalBombardment.MODID + ":laserLow").setHardness(-1.0F).setResistance(-1.0F).setLightLevel(25.0F);;
|
||||
GameRegistry.registerBlock(laserLow, "ob_laserLow");
|
||||
GameRegistry.registerTileEntity(LaserLowTileEntity.class, "laserLowTileEntity");
|
||||
|
||||
laserDef = new DefLasBlock(Material.air).setBlockName("obDefenderLaser").setBlockTextureName(OrbitalBombardment.MODID + ":laserLow").setHardness(10.0F).setResistance(25.0F).setLightLevel(5.0F);;
|
||||
GameRegistry.registerBlock(laserDef, "ob_defenderLaser");
|
||||
GameRegistry.registerTileEntity(DefenderLaserTileEntity.class, "defenderLaserTileEntity");
|
||||
|
||||
overrider = new OverriderBlock(Material.anvil).setBlockName("obOverrider").setBlockTextureName(OrbitalBombardment.MODID + ":overrider").setHardness(10.0F).setResistance(25.0F).setCreativeTab(OrbitalBombardment.OBCreativeTabs);;
|
||||
GameRegistry.registerBlock(overrider, "ob_overrider");
|
||||
GameRegistry.registerTileEntity(OverriderBlockTileEntity.class, "overriderBlockTileEntity");
|
||||
|
||||
photonInverter = new PhotonInverterBlock(Material.iron).setBlockName("obInverter").setBlockTextureName(OrbitalBombardment.MODID + ":solarPanel").setHardness(2.0F).setResistance(15.0F).setStepSound(Block.soundTypeStone).setCreativeTab(OrbitalBombardment.OBCreativeTabs);;
|
||||
GameRegistry.registerBlock(photonInverter, "ob_inverter");
|
||||
GameRegistry.registerTileEntity(InverterTileEntity.class, "inverter");
|
||||
|
||||
photonInverterAdv = new PhotonInverterAdvBlock(Material.iron).setBlockName("obInverterAdv").setBlockTextureName(OrbitalBombardment.MODID + ":solarPanel").setHardness(2.0F).setResistance(15.0F).setStepSound(Block.soundTypeStone).setCreativeTab(OrbitalBombardment.OBCreativeTabs);;
|
||||
GameRegistry.registerBlock(photonInverterAdv, "ob_photonInverterAdv");
|
||||
GameRegistry.registerTileEntity(InverterAdvTileEntity.class, "inverterAdv");
|
||||
|
||||
extender = new ExtenderBlock(Material.anvil).setBlockName("obExtender").setBlockTextureName(OrbitalBombardment.MODID + ":extender").setHardness(10.0F).setResistance(25.0F).setCreativeTab(OrbitalBombardment.OBCreativeTabs);;
|
||||
GameRegistry.registerBlock(extender, "ob_extender");
|
||||
GameRegistry.registerTileEntity(ExtenderTileEntity.class, "extenderTileEntity");
|
||||
|
||||
satelite = new SateliteBlock(Material.anvil).setHardness(10.0F).setBlockName("obSatelite").setBlockTextureName(OrbitalBombardment.MODID + ":satelite").setResistance(25.0F).setCreativeTab(OrbitalBombardment.OBCreativeTabs);
|
||||
GameRegistry.registerBlock(satelite, "ob_satelite");
|
||||
GameRegistry.registerTileEntity(SateliteTileEntity.class, "sateliteTileEntity");
|
||||
|
||||
photonDecelerator = new PhotonDeceleratorBlock(Material.iron).setBlockName("obDecelerator").setBlockTextureName(OrbitalBombardment.MODID + ":photonDecelerator").setHardness(2.0F).setResistance(15.0F).setStepSound(Block.soundTypeStone).setCreativeTab(OrbitalBombardment.OBCreativeTabs);
|
||||
GameRegistry.registerBlock(photonDecelerator, "ob_decelerator");
|
||||
GameRegistry.registerTileEntity(PhotonDeceleratorTileEntity.class, "PhotonDeceleratorTileEntity");
|
||||
|
||||
photonAccelerator = new PhotonAcceleratorBlock(Material.iron).setBlockName("obAccelerator").setBlockTextureName(OrbitalBombardment.MODID + ":photonAccelerator").setHardness(2.0F).setResistance(15.0F).setStepSound(Block.soundTypeMetal).setCreativeTab(OrbitalBombardment.OBCreativeTabs);
|
||||
GameRegistry.registerBlock(photonAccelerator, "ob_accelerator");
|
||||
GameRegistry.registerTileEntity(PhotonAcceleratorTileEntity.class, "PhotonAcceleratorTileEntity");
|
||||
|
||||
defender = new DefenderBlock(Material.anvil).setBlockName("obDefender").setBlockTextureName(OrbitalBombardment.MODID + ":defender").setLightLevel(0.2F).setResistance(25.0F).setHardness(10.0F).setCreativeTab(OrbitalBombardment.OBCreativeTabs);
|
||||
GameRegistry.registerBlock(defender, "ob_defender");
|
||||
GameRegistry.registerTileEntity(DefenderTileEntity.class, "DefenderTileEntity");
|
||||
}
|
||||
}
|
152
src/main/java/fr/jackcartersmith/ob/blocks/OverriderBlock.java
Normal file
152
src/main/java/fr/jackcartersmith/ob/blocks/OverriderBlock.java
Normal file
@ -0,0 +1,152 @@
|
||||
package fr.jackcartersmith.ob.blocks;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import fr.jackcartersmith.ob.OrbitalBombardment;
|
||||
import fr.jackcartersmith.ob.proxy.ClientProxy;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.EntityLiving;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
public class OverriderBlock extends BlockContainer
|
||||
{
|
||||
public OverriderBlock(Material par2Material)
|
||||
{
|
||||
super(par2Material);
|
||||
}
|
||||
|
||||
public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z)
|
||||
{
|
||||
this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.8F, 1.0F);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
|
||||
/**
|
||||
* When this method is called, your block should register all the icons it needs with the given IconRegister. This
|
||||
* is the only chance you get to register icons.
|
||||
*/
|
||||
public void registerIcons(IIconRegister icon)
|
||||
{
|
||||
this.blockIcon = icon.registerIcon("OB".toLowerCase() + ":satelite");
|
||||
}
|
||||
|
||||
public void onNeighborTileChange(World world, int x, int y, int z, int tileX, int tileY, int tileZ)
|
||||
{
|
||||
OverriderBlockTileEntity entity = (OverriderBlockTileEntity)world.getTileEntity(x, y, z);
|
||||
|
||||
if (entity.isCharging())
|
||||
{
|
||||
world.playSoundEffect((double)x, (double)y, (double)z, "ob:startCharging", 1.0F, 1.0F);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Called on server worlds only when the block has been replaced by a different block ID, or the same block with a
|
||||
* different metadata value, but before the new metadata value is set. Args: World, x, y, z, old block ID, old
|
||||
* metadata
|
||||
*/
|
||||
public void breakBlock(World par1World, int par2, int par3, int par4, Block block, int par6)
|
||||
{
|
||||
if (par1World.getBlock(par2, par3 + 1, par4) == OBBlocks.satelite)
|
||||
{
|
||||
par1World.removeTileEntity(par2, par3 + 1, par4);
|
||||
par1World.setBlockToAir(par2, par3 + 1, par4);
|
||||
}
|
||||
par1World.removeTileEntity(par2, par3, par4);
|
||||
}
|
||||
|
||||
/**
|
||||
* Called upon block activation (right click on the block.)
|
||||
*/
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int i, float a, float b, float c)
|
||||
{
|
||||
OverriderBlockTileEntity entity = (OverriderBlockTileEntity)world.getTileEntity(x, y, z);
|
||||
|
||||
if (!player.isSneaking())
|
||||
{
|
||||
OrbitalBombardment.instance.lastChargerX = x;
|
||||
OrbitalBombardment.instance.lastChargerY = y;
|
||||
OrbitalBombardment.instance.lastChargerZ = z;
|
||||
player.openGui(OrbitalBombardment.instance, 0, world, (int)player.posX, (int)player.posY, (int)player.posZ);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* A randomly called display update to be able to add particles or other items for display
|
||||
*/
|
||||
public void randomDisplayTick(World par1World, int par2, int par3, int par4, Random par5Random)
|
||||
{
|
||||
OverriderBlockTileEntity entity = (OverriderBlockTileEntity)par1World.getTileEntity(par2, par3, par4);
|
||||
|
||||
if (entity.currentCharge > 0)
|
||||
{
|
||||
float f1 = (float)par2 + 0.5F;
|
||||
float f2 = (float)par3 + 1.0F;
|
||||
float f3 = (float)par4 + 0.5F;
|
||||
|
||||
if (!(par1World.getTileEntity(par2, par3 + 1, par4) instanceof LaserLowTileEntity))
|
||||
{
|
||||
for (int i = 0; i <= 50; ++i)
|
||||
{
|
||||
par1World.spawnParticle("reddust", (double)f1 + par5Random.nextDouble() + 0.3D - 0.6D, (double)f2 + par5Random.nextDouble() + 0.3D - 0.6D + (double)i, (double)f3 + par5Random.nextDouble() + 0.3D - 0.6D, 250.0D, 250.0D, 250.0D);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a new instance of a block's tile entity class. Called on placing the block.
|
||||
*/
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World arg0, int arg1) {
|
||||
return new OverriderBlockTileEntity();
|
||||
}
|
||||
@Override
|
||||
public boolean hasTileEntity(int metadata)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* The type of render function that is called for this block
|
||||
*/
|
||||
public int getRenderType()
|
||||
{
|
||||
return ClientProxy.tesrRenderId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Is this block (a) opaque and (b) a full 1m cube? This determines whether or not to render the shared face of two
|
||||
* adjacent blocks and also whether the player can attach torches, redstone wire, etc to this block.
|
||||
*/
|
||||
public boolean isOpaqueCube()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* If this block doesn't render as an ordinary block it will return False (examples: signs, buttons, stairs, etc)
|
||||
*/
|
||||
public boolean renderAsNormalBlock()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public void onBlockPlacedBy(World world, int i, int j, int k, EntityLiving entityliving)
|
||||
{
|
||||
int rotation = MathHelper.floor_double((double)(entityliving.rotationYaw * 4.0F / 360.0F) + 2.5D) & 3;
|
||||
world.setBlockMetadataWithNotify(i, j, k, rotation - 1, rotation - 1);
|
||||
}
|
||||
}
|
@ -0,0 +1,152 @@
|
||||
package fr.jackcartersmith.ob.blocks;
|
||||
|
||||
import fr.jackcartersmith.ob.OBNetwork;
|
||||
import fr.jackcartersmith.ob.OBNetworkClient;
|
||||
import fr.jackcartersmith.ob.OrbitalBombardment;
|
||||
import fr.jackcartersmith.ob.interfaces.PhotonConsuming;
|
||||
import fr.jackcartersmith.ob.libs.OBConstants;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.entity.EntityClientPlayerMP;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
||||
public class OverriderBlockTileEntity extends PhotonConsuming
|
||||
{
|
||||
public boolean charging;
|
||||
public HashMap amountOfGuns = new HashMap();
|
||||
public int lightlevel;
|
||||
public int tickCount = 0;
|
||||
public float rotate;
|
||||
public boolean hasSatelite;
|
||||
public boolean hasSateliteLaunched;
|
||||
public int shotsLeft = 0;
|
||||
public int satTicksAlive = 0;
|
||||
|
||||
/**
|
||||
* Writes a tile entity to NBT.
|
||||
*/
|
||||
public void writeToNBT(NBTTagCompound par1)
|
||||
{
|
||||
super.writeToNBT(par1);
|
||||
par1.setInteger("currentCharge", this.getCurrentCharge());
|
||||
par1.setInteger("shotsLeft", this.shotsLeft);
|
||||
}
|
||||
|
||||
/**
|
||||
* Reads a tile entity from NBT.
|
||||
*/
|
||||
public void readFromNBT(NBTTagCompound par1)
|
||||
{
|
||||
super.readFromNBT(par1);
|
||||
this.currentCharge = par1.getInteger("currentCharge");
|
||||
this.shotsLeft = par1.getInteger("shotsLeft");
|
||||
}
|
||||
|
||||
/**
|
||||
* Allows the entity to update its state. Overridden in most subclasses, e.g. the mob spawner uses this to count
|
||||
* ticks and creates a new spawn inside its implementation.
|
||||
*/
|
||||
public void updateEntity()
|
||||
{
|
||||
this.maxCharge = OBConstants.OverriderMaxCharge;
|
||||
|
||||
if (this.currentCharge > this.maxCharge)
|
||||
{
|
||||
this.currentCharge = this.maxCharge;
|
||||
}
|
||||
|
||||
if (this.hasSateliteLaunched && this.worldObj.isRemote)
|
||||
{
|
||||
++this.satTicksAlive;
|
||||
|
||||
if (this.satTicksAlive >= 100)
|
||||
{
|
||||
this.hasSateliteLaunched = false;
|
||||
this.satTicksAlive = 0;
|
||||
this.sendChangeToServer21(this.xCoord, this.yCoord + 1, this.zCoord, 0, Minecraft.getMinecraft().thePlayer);
|
||||
this.worldObj.removeTileEntity(this.xCoord, this.yCoord + 1, this.zCoord);
|
||||
this.worldObj.setBlockToAir(this.xCoord, this.yCoord + 1, this.zCoord);
|
||||
}
|
||||
}
|
||||
|
||||
if (this.worldObj.getTileEntity(this.xCoord, this.yCoord + 1, this.zCoord) instanceof SateliteTileEntity)
|
||||
{
|
||||
this.hasSatelite = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.hasSatelite = false;
|
||||
}
|
||||
|
||||
if (this.tickCount == 2)
|
||||
{
|
||||
this.sendChangeToClient();
|
||||
this.sendChangeToClient5();
|
||||
this.tickCount = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
++this.tickCount;
|
||||
}
|
||||
|
||||
this.rotate += 0.05F;
|
||||
|
||||
if ((double)this.rotate >= 180.0D)
|
||||
{
|
||||
this.rotate = -180.0F;
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isCharging()
|
||||
{
|
||||
return this.charging;
|
||||
}
|
||||
|
||||
public void setCharging(boolean charging)
|
||||
{
|
||||
this.charging = charging;
|
||||
}
|
||||
|
||||
public void sendChangeToClient()
|
||||
{
|
||||
List<Integer> bos = new ArrayList<Integer>();
|
||||
|
||||
bos.add(1);
|
||||
bos.add(this.xCoord);
|
||||
bos.add(this.yCoord);
|
||||
bos.add(this.zCoord);
|
||||
bos.add(this.getCurrentCharge());
|
||||
|
||||
OrbitalBombardment.obNetwork.sendToAll(new OBNetworkClient(bos));
|
||||
}
|
||||
|
||||
public void sendChangeToClient5()
|
||||
{
|
||||
List<Integer> bos = new ArrayList<Integer>();
|
||||
|
||||
bos.add(5);
|
||||
bos.add(this.xCoord);
|
||||
bos.add(this.yCoord);
|
||||
bos.add(this.zCoord);
|
||||
bos.add(this.shotsLeft);
|
||||
|
||||
OrbitalBombardment.obNetwork.sendToAll(new OBNetworkClient(bos));
|
||||
}
|
||||
|
||||
public void sendChangeToServer21(int xCoord, int yCoord, int zCoord, int power, EntityClientPlayerMP mp)
|
||||
{
|
||||
List<Integer> bos = new ArrayList<Integer>();
|
||||
|
||||
bos.add(21);
|
||||
bos.add(xCoord);
|
||||
bos.add(yCoord);
|
||||
bos.add(zCoord);
|
||||
bos.add(power);
|
||||
|
||||
OrbitalBombardment.obNetwork.sendToServer(new OBNetwork(bos));
|
||||
}
|
||||
}
|
@ -0,0 +1,130 @@
|
||||
package fr.jackcartersmith.ob.blocks;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import fr.jackcartersmith.ob.OrbitalBombardment;
|
||||
import fr.jackcartersmith.ob.proxy.ClientProxy;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class PhotonAcceleratorBlock extends BlockContainer
|
||||
{
|
||||
public PhotonAcceleratorBlock(Material par2Material)
|
||||
{
|
||||
super(Material.iron);
|
||||
}
|
||||
|
||||
public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z)
|
||||
{
|
||||
this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 2.0F, 1.0F);
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when a block is placed using its ItemBlock. Args: World, X, Y, Z, side, hitX, hitY, hitZ, block metadata
|
||||
*/
|
||||
public int onBlockPlaced(World par1World, int par2, int par3, int par4, int par5, float par6, float par7, float par8, int par9)
|
||||
{
|
||||
return super.onBlockPlaced(par1World, par2, par3, par4, par5, par6, par7, par8, par9);
|
||||
}
|
||||
|
||||
/**
|
||||
* Called upon block activation (right click on the block.)
|
||||
*/
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int i, float a, float b, float c)
|
||||
{
|
||||
PhotonAcceleratorTileEntity entity = (PhotonAcceleratorTileEntity)world.getTileEntity(x, y, z);
|
||||
|
||||
if (!player.isSneaking())
|
||||
{
|
||||
OrbitalBombardment.instance.lastGeneralX = x;
|
||||
OrbitalBombardment.instance.lastGeneralY = y;
|
||||
OrbitalBombardment.instance.lastGeneralZ = z;
|
||||
player.openGui(OrbitalBombardment.instance, 4, world, (int)player.posX, (int)player.posY, (int)player.posZ);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* A randomly called display update to be able to add particles or other items for display
|
||||
*/
|
||||
public void randomDisplayTick(World par1World, int par2, int par3, int par4, Random par5Random)
|
||||
{
|
||||
PhotonAcceleratorTileEntity entity = (PhotonAcceleratorTileEntity)par1World.getTileEntity(par2, par3, par4);
|
||||
|
||||
if (entity.getOutputRate() > 0)
|
||||
{
|
||||
this.setLightLevel(1.0F);
|
||||
par1World.markBlockForUpdate(par2, par3, par4);
|
||||
float f1 = (float)par2 + 0.5F;
|
||||
float f2 = (float)par3 + 1.0F;
|
||||
float f3 = (float)par4 + 0.5F;
|
||||
|
||||
for (int i = 0; i <= 2; ++i)
|
||||
{
|
||||
par1World.spawnParticle("reddust", (double)f1 + par5Random.nextDouble() + 0.3D - 0.8D, (double)f2 + par5Random.nextDouble() + 0.3D - 0.8D + 1.0D, (double)f3 + par5Random.nextDouble() + 0.3D - 0.8D, 1.0D, 1.0D, 2.0D);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this.setLightLevel(0.0F);
|
||||
par1World.markBlockForUpdate(par2, par3, par4);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a new instance of a block's tile entity class. Called on placing the block.
|
||||
*/
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World arg0, int arg1)
|
||||
{
|
||||
return new PhotonAcceleratorTileEntity();
|
||||
}
|
||||
@Override
|
||||
public boolean hasTileEntity(int metadata)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Called on server worlds only when the block has been replaced by a different block ID, or the same block with a
|
||||
* different metadata value, but before the new metadata value is set. Args: World, x, y, z, old block ID, old
|
||||
* metadata
|
||||
*/
|
||||
public void breakBlock(World par1World, int par2, int par3, int par4, Block block, int par6)
|
||||
{
|
||||
par1World.removeTileEntity(par2, par3, par4);
|
||||
par1World.removeTileEntity(par2, par3 + 1, par4);
|
||||
par1World.setBlockToAir(par2, par3 + 1, par4);
|
||||
}
|
||||
|
||||
/**
|
||||
* The type of render function that is called for this block
|
||||
*/
|
||||
public int getRenderType()
|
||||
{
|
||||
return ClientProxy.tesrRenderId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Is this block (a) opaque and (b) a full 1m cube? This determines whether or not to render the shared face of two
|
||||
* adjacent blocks and also whether the player can attach torches, redstone wire, etc to this block.
|
||||
*/
|
||||
public boolean isOpaqueCube()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* If this block doesn't render as an ordinary block it will return False (examples: signs, buttons, stairs, etc)
|
||||
*/
|
||||
public boolean renderAsNormalBlock()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
package fr.jackcartersmith.ob.blocks;
|
||||
|
||||
import fr.jackcartersmith.ob.interfaces.PhotonSending;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
||||
public class PhotonAcceleratorTileEntity extends PhotonSending
|
||||
{
|
||||
/**
|
||||
* Writes a tile entity to NBT.
|
||||
*/
|
||||
public void writeToNBT(NBTTagCompound par1)
|
||||
{
|
||||
super.writeToNBT(par1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Reads a tile entity from NBT.
|
||||
*/
|
||||
public void readFromNBT(NBTTagCompound par1)
|
||||
{
|
||||
super.readFromNBT(par1);
|
||||
}
|
||||
}
|
@ -0,0 +1,106 @@
|
||||
package fr.jackcartersmith.ob.blocks;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import fr.jackcartersmith.ob.OrbitalBombardment;
|
||||
import fr.jackcartersmith.ob.proxy.ClientProxy;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class PhotonDeceleratorBlock extends BlockContainer
|
||||
{
|
||||
public PhotonDeceleratorBlock(Material par2Material)
|
||||
{
|
||||
super(Material.rock);
|
||||
}
|
||||
|
||||
public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z)
|
||||
{
|
||||
this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 2.0F, 1.0F);
|
||||
}
|
||||
|
||||
/**
|
||||
* Called upon block activation (right click on the block.)
|
||||
*/
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int i, float a, float b, float c)
|
||||
{
|
||||
PhotonDeceleratorTileEntity entity = (PhotonDeceleratorTileEntity)world.getTileEntity(x, y, z);
|
||||
|
||||
if (!player.isSneaking())
|
||||
{
|
||||
OrbitalBombardment.instance.lastGeneralX = x;
|
||||
OrbitalBombardment.instance.lastGeneralY = y;
|
||||
OrbitalBombardment.instance.lastGeneralZ = z;
|
||||
player.openGui(OrbitalBombardment.instance, 5, world, (int)player.posX, (int)player.posY, (int)player.posZ);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* A randomly called display update to be able to add particles or other items for display
|
||||
*/
|
||||
public void randomDisplayTick(World par1World, int par2, int par3, int par4, Random par5Random)
|
||||
{
|
||||
PhotonDeceleratorTileEntity entity = (PhotonDeceleratorTileEntity)par1World.getTileEntity(par2, par3, par4);
|
||||
|
||||
if (entity.getPowerIncoming() > 0)
|
||||
{
|
||||
this.setLightLevel(1.0F);
|
||||
//par1World.updateAllLightTypes(par2, par3, par4);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.setLightLevel(0.0F);
|
||||
//par1World.updateAllLightTypes(par2, par3, par4);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a new instance of a block's tile entity class. Called on placing the block.
|
||||
*/
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World arg0, int arg1) {
|
||||
return new PhotonDeceleratorTileEntity();
|
||||
}
|
||||
|
||||
/**
|
||||
* Called on server worlds only when the block has been replaced by a different block ID, or the same block with a
|
||||
* different metadata value, but before the new metadata value is set. Args: World, x, y, z, old block ID, old
|
||||
* metadata
|
||||
*/
|
||||
public void breakBlock(World par1World, int par2, int par3, int par4, Block block, int par6)
|
||||
{
|
||||
par1World.removeTileEntity(par2, par3, par4);
|
||||
}
|
||||
|
||||
/**
|
||||
* The type of render function that is called for this block
|
||||
*/
|
||||
public int getRenderType()
|
||||
{
|
||||
return ClientProxy.tesrRenderId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Is this block (a) opaque and (b) a full 1m cube? This determines whether or not to render the shared face of two
|
||||
* adjacent blocks and also whether the player can attach torches, redstone wire, etc to this block.
|
||||
*/
|
||||
public boolean isOpaqueCube()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* If this block doesn't render as an ordinary block it will return False (examples: signs, buttons, stairs, etc)
|
||||
*/
|
||||
public boolean renderAsNormalBlock()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
package fr.jackcartersmith.ob.blocks;
|
||||
|
||||
import fr.jackcartersmith.ob.interfaces.PhotonRecieving;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
||||
public class PhotonDeceleratorTileEntity extends PhotonRecieving
|
||||
{
|
||||
/**
|
||||
* Writes a tile entity to NBT.
|
||||
*/
|
||||
public void writeToNBT(NBTTagCompound par1)
|
||||
{
|
||||
super.writeToNBT(par1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Reads a tile entity from NBT.
|
||||
*/
|
||||
public void readFromNBT(NBTTagCompound par1)
|
||||
{
|
||||
super.readFromNBT(par1);
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user