Compare commits
14 Commits
1.8.9-2.0.
...
1.10.2-2.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b1661e359a | ||
|
|
e20dfa6d7f | ||
|
|
7cc0ee523a | ||
|
|
54790d33f9 | ||
|
|
165861764c | ||
|
|
5014edafe0 | ||
|
|
09f167f10e | ||
|
|
21ac84e990 | ||
|
|
8e6eec879f | ||
|
|
5100f36b2c | ||
|
|
7ef6a6d166 | ||
|
|
446b9be384 | ||
|
|
d1ed67f1a0 | ||
|
|
a80a20c37a |
20
.drone.yml
@@ -1,20 +0,0 @@
|
|||||||
pipeline:
|
|
||||||
clone:
|
|
||||||
image: plugins/git
|
|
||||||
tags: true
|
|
||||||
build:
|
|
||||||
image: maven:3.3.9-jdk-8
|
|
||||||
commands:
|
|
||||||
- curl --fail --create-dirs -o $HOME/.gradle/init.d/mirror.gradle https://maven.johni0702.de/config/gradle
|
|
||||||
- curl --fail --create-dirs -o $HOME/.m2/settings.xml https://maven.johni0702.de/config/maven
|
|
||||||
- ./gradlew setupCIWorkspace
|
|
||||||
- ./gradlew :build
|
|
||||||
archive:
|
|
||||||
image: plugins/s3
|
|
||||||
acl: public-read
|
|
||||||
region: "us-east-1"
|
|
||||||
bucket: "replaymod"
|
|
||||||
path_style: true
|
|
||||||
source: build/libs/*
|
|
||||||
strip_prefix: build/libs/
|
|
||||||
target: /
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
eyJhbGciOiJIUzI1NiJ9.cGlwZWxpbmU6CiAgY2xvbmU6CiAgICBpbWFnZTogcGx1Z2lucy9naXQKICAgIHRhZ3M6IHRydWUKICBidWlsZDoKICAgIGltYWdlOiBtYXZlbjozLjMuOS1qZGstOAogICAgY29tbWFuZHM6CiAgICAgIC0gY3VybCAtLWZhaWwgLS1jcmVhdGUtZGlycyAtbyAkSE9NRS8uZ3JhZGxlL2luaXQuZC9taXJyb3IuZ3JhZGxlIGh0dHBzOi8vbWF2ZW4uam9obmkwNzAyLmRlL2NvbmZpZy9ncmFkbGUKICAgICAgLSBjdXJsIC0tZmFpbCAtLWNyZWF0ZS1kaXJzIC1vICRIT01FLy5tMi9zZXR0aW5ncy54bWwgaHR0cHM6Ly9tYXZlbi5qb2huaTA3MDIuZGUvY29uZmlnL21hdmVuCiAgICAgIC0gLi9ncmFkbGV3IHNldHVwQ0lXb3Jrc3BhY2UKICAgICAgLSAuL2dyYWRsZXcgOmJ1aWxkCiAgYXJjaGl2ZToKICAgIGltYWdlOiBwbHVnaW5zL3MzCiAgICBhY2w6IHB1YmxpYy1yZWFkCiAgICByZWdpb246ICJ1cy1lYXN0LTEiCiAgICBidWNrZXQ6ICJyZXBsYXltb2QiCiAgICBwYXRoX3N0eWxlOiB0cnVlCiAgICBzb3VyY2U6IGJ1aWxkL2xpYnMvKgogICAgc3RyaXBfcHJlZml4OiBidWlsZC9saWJzLwogICAgdGFyZ2V0OiAvCg.riE6lhwfdNUhI7LO2SxEKFOjzjaX40ne7Ae9gyP75KE
|
|
||||||
4
.gitmodules
vendored
@@ -5,7 +5,3 @@
|
|||||||
[submodule "ReplayStudio"]
|
[submodule "ReplayStudio"]
|
||||||
path = ReplayStudio
|
path = ReplayStudio
|
||||||
url = https://github.com/ReplayMod/ReplayStudio
|
url = https://github.com/ReplayMod/ReplayStudio
|
||||||
|
|
||||||
[submodule "src/main/resources/assets/replaymod/lang"]
|
|
||||||
path = src/main/resources/assets/replaymod/lang
|
|
||||||
url = https://github.com/ReplayMod/Translations
|
|
||||||
|
|||||||
675
LICENSE.md
@@ -1,675 +0,0 @@
|
|||||||
### GNU GENERAL PUBLIC LICENSE
|
|
||||||
|
|
||||||
Version 3, 29 June 2007
|
|
||||||
|
|
||||||
Copyright (C) 2007 Free Software Foundation, Inc.
|
|
||||||
<http://fsf.org/>
|
|
||||||
|
|
||||||
Everyone is permitted to copy and distribute verbatim copies of this
|
|
||||||
license document, but changing it is not allowed.
|
|
||||||
|
|
||||||
### Preamble
|
|
||||||
|
|
||||||
The GNU General Public License is a free, copyleft license for
|
|
||||||
software and other kinds of works.
|
|
||||||
|
|
||||||
The licenses for most software and other practical works are designed
|
|
||||||
to take away your freedom to share and change the works. By contrast,
|
|
||||||
the GNU General Public License is intended to guarantee your freedom
|
|
||||||
to share and change all versions of a program--to make sure it remains
|
|
||||||
free software for all its users. We, the Free Software Foundation, use
|
|
||||||
the GNU General Public License for most of our software; it applies
|
|
||||||
also to any other work released this way by its authors. You can apply
|
|
||||||
it to your programs, too.
|
|
||||||
|
|
||||||
When we speak of free software, we are referring to freedom, not
|
|
||||||
price. Our General Public Licenses are designed to make sure that you
|
|
||||||
have the freedom to distribute copies of free software (and charge for
|
|
||||||
them if you wish), that you receive source code or can get it if you
|
|
||||||
want it, that you can change the software or use pieces of it in new
|
|
||||||
free programs, and that you know you can do these things.
|
|
||||||
|
|
||||||
To protect your rights, we need to prevent others from denying you
|
|
||||||
these rights or asking you to surrender the rights. Therefore, you
|
|
||||||
have certain responsibilities if you distribute copies of the
|
|
||||||
software, or if you modify it: responsibilities to respect the freedom
|
|
||||||
of others.
|
|
||||||
|
|
||||||
For example, if you distribute copies of such a program, whether
|
|
||||||
gratis or for a fee, you must pass on to the recipients the same
|
|
||||||
freedoms that you received. You must make sure that they, too, receive
|
|
||||||
or can get the source code. And you must show them these terms so they
|
|
||||||
know their rights.
|
|
||||||
|
|
||||||
Developers that use the GNU GPL protect your rights with two steps:
|
|
||||||
(1) assert copyright on the software, and (2) offer you this License
|
|
||||||
giving you legal permission to copy, distribute and/or modify it.
|
|
||||||
|
|
||||||
For the developers' and authors' protection, the GPL clearly explains
|
|
||||||
that there is no warranty for this free software. For both users' and
|
|
||||||
authors' sake, the GPL requires that modified versions be marked as
|
|
||||||
changed, so that their problems will not be attributed erroneously to
|
|
||||||
authors of previous versions.
|
|
||||||
|
|
||||||
Some devices are designed to deny users access to install or run
|
|
||||||
modified versions of the software inside them, although the
|
|
||||||
manufacturer can do so. This is fundamentally incompatible with the
|
|
||||||
aim of protecting users' freedom to change the software. The
|
|
||||||
systematic pattern of such abuse occurs in the area of products for
|
|
||||||
individuals to use, which is precisely where it is most unacceptable.
|
|
||||||
Therefore, we have designed this version of the GPL to prohibit the
|
|
||||||
practice for those products. If such problems arise substantially in
|
|
||||||
other domains, we stand ready to extend this provision to those
|
|
||||||
domains in future versions of the GPL, as needed to protect the
|
|
||||||
freedom of users.
|
|
||||||
|
|
||||||
Finally, every program is threatened constantly by software patents.
|
|
||||||
States should not allow patents to restrict development and use of
|
|
||||||
software on general-purpose computers, but in those that do, we wish
|
|
||||||
to avoid the special danger that patents applied to a free program
|
|
||||||
could make it effectively proprietary. To prevent this, the GPL
|
|
||||||
assures that patents cannot be used to render the program non-free.
|
|
||||||
|
|
||||||
The precise terms and conditions for copying, distribution and
|
|
||||||
modification follow.
|
|
||||||
|
|
||||||
### TERMS AND CONDITIONS
|
|
||||||
|
|
||||||
#### 0. Definitions.
|
|
||||||
|
|
||||||
"This License" refers to version 3 of the GNU General Public License.
|
|
||||||
|
|
||||||
"Copyright" also means copyright-like laws that apply to other kinds
|
|
||||||
of works, such as semiconductor masks.
|
|
||||||
|
|
||||||
"The Program" refers to any copyrightable work licensed under this
|
|
||||||
License. Each licensee is addressed as "you". "Licensees" and
|
|
||||||
"recipients" may be individuals or organizations.
|
|
||||||
|
|
||||||
To "modify" a work means to copy from or adapt all or part of the work
|
|
||||||
in a fashion requiring copyright permission, other than the making of
|
|
||||||
an exact copy. The resulting work is called a "modified version" of
|
|
||||||
the earlier work or a work "based on" the earlier work.
|
|
||||||
|
|
||||||
A "covered work" means either the unmodified Program or a work based
|
|
||||||
on the Program.
|
|
||||||
|
|
||||||
To "propagate" a work means to do anything with it that, without
|
|
||||||
permission, would make you directly or secondarily liable for
|
|
||||||
infringement under applicable copyright law, except executing it on a
|
|
||||||
computer or modifying a private copy. Propagation includes copying,
|
|
||||||
distribution (with or without modification), making available to the
|
|
||||||
public, and in some countries other activities as well.
|
|
||||||
|
|
||||||
To "convey" a work means any kind of propagation that enables other
|
|
||||||
parties to make or receive copies. Mere interaction with a user
|
|
||||||
through a computer network, with no transfer of a copy, is not
|
|
||||||
conveying.
|
|
||||||
|
|
||||||
An interactive user interface displays "Appropriate Legal Notices" to
|
|
||||||
the extent that it includes a convenient and prominently visible
|
|
||||||
feature that (1) displays an appropriate copyright notice, and (2)
|
|
||||||
tells the user that there is no warranty for the work (except to the
|
|
||||||
extent that warranties are provided), that licensees may convey the
|
|
||||||
work under this License, and how to view a copy of this License. If
|
|
||||||
the interface presents a list of user commands or options, such as a
|
|
||||||
menu, a prominent item in the list meets this criterion.
|
|
||||||
|
|
||||||
#### 1. Source Code.
|
|
||||||
|
|
||||||
The "source code" for a work means the preferred form of the work for
|
|
||||||
making modifications to it. "Object code" means any non-source form of
|
|
||||||
a work.
|
|
||||||
|
|
||||||
A "Standard Interface" means an interface that either is an official
|
|
||||||
standard defined by a recognized standards body, or, in the case of
|
|
||||||
interfaces specified for a particular programming language, one that
|
|
||||||
is widely used among developers working in that language.
|
|
||||||
|
|
||||||
The "System Libraries" of an executable work include anything, other
|
|
||||||
than the work as a whole, that (a) is included in the normal form of
|
|
||||||
packaging a Major Component, but which is not part of that Major
|
|
||||||
Component, and (b) serves only to enable use of the work with that
|
|
||||||
Major Component, or to implement a Standard Interface for which an
|
|
||||||
implementation is available to the public in source code form. A
|
|
||||||
"Major Component", in this context, means a major essential component
|
|
||||||
(kernel, window system, and so on) of the specific operating system
|
|
||||||
(if any) on which the executable work runs, or a compiler used to
|
|
||||||
produce the work, or an object code interpreter used to run it.
|
|
||||||
|
|
||||||
The "Corresponding Source" for a work in object code form means all
|
|
||||||
the source code needed to generate, install, and (for an executable
|
|
||||||
work) run the object code and to modify the work, including scripts to
|
|
||||||
control those activities. However, it does not include the work's
|
|
||||||
System Libraries, or general-purpose tools or generally available free
|
|
||||||
programs which are used unmodified in performing those activities but
|
|
||||||
which are not part of the work. For example, Corresponding Source
|
|
||||||
includes interface definition files associated with source files for
|
|
||||||
the work, and the source code for shared libraries and dynamically
|
|
||||||
linked subprograms that the work is specifically designed to require,
|
|
||||||
such as by intimate data communication or control flow between those
|
|
||||||
subprograms and other parts of the work.
|
|
||||||
|
|
||||||
The Corresponding Source need not include anything that users can
|
|
||||||
regenerate automatically from other parts of the Corresponding Source.
|
|
||||||
|
|
||||||
The Corresponding Source for a work in source code form is that same
|
|
||||||
work.
|
|
||||||
|
|
||||||
#### 2. Basic Permissions.
|
|
||||||
|
|
||||||
All rights granted under this License are granted for the term of
|
|
||||||
copyright on the Program, and are irrevocable provided the stated
|
|
||||||
conditions are met. This License explicitly affirms your unlimited
|
|
||||||
permission to run the unmodified Program. The output from running a
|
|
||||||
covered work is covered by this License only if the output, given its
|
|
||||||
content, constitutes a covered work. This License acknowledges your
|
|
||||||
rights of fair use or other equivalent, as provided by copyright law.
|
|
||||||
|
|
||||||
You may make, run and propagate covered works that you do not convey,
|
|
||||||
without conditions so long as your license otherwise remains in force.
|
|
||||||
You may convey covered works to others for the sole purpose of having
|
|
||||||
them make modifications exclusively for you, or provide you with
|
|
||||||
facilities for running those works, provided that you comply with the
|
|
||||||
terms of this License in conveying all material for which you do not
|
|
||||||
control copyright. Those thus making or running the covered works for
|
|
||||||
you must do so exclusively on your behalf, under your direction and
|
|
||||||
control, on terms that prohibit them from making any copies of your
|
|
||||||
copyrighted material outside their relationship with you.
|
|
||||||
|
|
||||||
Conveying under any other circumstances is permitted solely under the
|
|
||||||
conditions stated below. Sublicensing is not allowed; section 10 makes
|
|
||||||
it unnecessary.
|
|
||||||
|
|
||||||
#### 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
|
||||||
|
|
||||||
No covered work shall be deemed part of an effective technological
|
|
||||||
measure under any applicable law fulfilling obligations under article
|
|
||||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
|
||||||
similar laws prohibiting or restricting circumvention of such
|
|
||||||
measures.
|
|
||||||
|
|
||||||
When you convey a covered work, you waive any legal power to forbid
|
|
||||||
circumvention of technological measures to the extent such
|
|
||||||
circumvention is effected by exercising rights under this License with
|
|
||||||
respect to the covered work, and you disclaim any intention to limit
|
|
||||||
operation or modification of the work as a means of enforcing, against
|
|
||||||
the work's users, your or third parties' legal rights to forbid
|
|
||||||
circumvention of technological measures.
|
|
||||||
|
|
||||||
#### 4. Conveying Verbatim Copies.
|
|
||||||
|
|
||||||
You may convey verbatim copies of the Program's source code as you
|
|
||||||
receive it, in any medium, provided that you conspicuously and
|
|
||||||
appropriately publish on each copy an appropriate copyright notice;
|
|
||||||
keep intact all notices stating that this License and any
|
|
||||||
non-permissive terms added in accord with section 7 apply to the code;
|
|
||||||
keep intact all notices of the absence of any warranty; and give all
|
|
||||||
recipients a copy of this License along with the Program.
|
|
||||||
|
|
||||||
You may charge any price or no price for each copy that you convey,
|
|
||||||
and you may offer support or warranty protection for a fee.
|
|
||||||
|
|
||||||
#### 5. Conveying Modified Source Versions.
|
|
||||||
|
|
||||||
You may convey a work based on the Program, or the modifications to
|
|
||||||
produce it from the Program, in the form of source code under the
|
|
||||||
terms of section 4, provided that you also meet all of these
|
|
||||||
conditions:
|
|
||||||
|
|
||||||
- a) The work must carry prominent notices stating that you modified
|
|
||||||
it, and giving a relevant date.
|
|
||||||
- b) The work must carry prominent notices stating that it is
|
|
||||||
released under this License and any conditions added under
|
|
||||||
section 7. This requirement modifies the requirement in section 4
|
|
||||||
to "keep intact all notices".
|
|
||||||
- c) You must license the entire work, as a whole, under this
|
|
||||||
License to anyone who comes into possession of a copy. This
|
|
||||||
License will therefore apply, along with any applicable section 7
|
|
||||||
additional terms, to the whole of the work, and all its parts,
|
|
||||||
regardless of how they are packaged. This License gives no
|
|
||||||
permission to license the work in any other way, but it does not
|
|
||||||
invalidate such permission if you have separately received it.
|
|
||||||
- d) If the work has interactive user interfaces, each must display
|
|
||||||
Appropriate Legal Notices; however, if the Program has interactive
|
|
||||||
interfaces that do not display Appropriate Legal Notices, your
|
|
||||||
work need not make them do so.
|
|
||||||
|
|
||||||
A compilation of a covered work with other separate and independent
|
|
||||||
works, which are not by their nature extensions of the covered work,
|
|
||||||
and which are not combined with it such as to form a larger program,
|
|
||||||
in or on a volume of a storage or distribution medium, is called an
|
|
||||||
"aggregate" if the compilation and its resulting copyright are not
|
|
||||||
used to limit the access or legal rights of the compilation's users
|
|
||||||
beyond what the individual works permit. Inclusion of a covered work
|
|
||||||
in an aggregate does not cause this License to apply to the other
|
|
||||||
parts of the aggregate.
|
|
||||||
|
|
||||||
#### 6. Conveying Non-Source Forms.
|
|
||||||
|
|
||||||
You may convey a covered work in object code form under the terms of
|
|
||||||
sections 4 and 5, provided that you also convey the machine-readable
|
|
||||||
Corresponding Source under the terms of this License, in one of these
|
|
||||||
ways:
|
|
||||||
|
|
||||||
- a) Convey the object code in, or embodied in, a physical product
|
|
||||||
(including a physical distribution medium), accompanied by the
|
|
||||||
Corresponding Source fixed on a durable physical medium
|
|
||||||
customarily used for software interchange.
|
|
||||||
- b) Convey the object code in, or embodied in, a physical product
|
|
||||||
(including a physical distribution medium), accompanied by a
|
|
||||||
written offer, valid for at least three years and valid for as
|
|
||||||
long as you offer spare parts or customer support for that product
|
|
||||||
model, to give anyone who possesses the object code either (1) a
|
|
||||||
copy of the Corresponding Source for all the software in the
|
|
||||||
product that is covered by this License, on a durable physical
|
|
||||||
medium customarily used for software interchange, for a price no
|
|
||||||
more than your reasonable cost of physically performing this
|
|
||||||
conveying of source, or (2) access to copy the Corresponding
|
|
||||||
Source from a network server at no charge.
|
|
||||||
- c) Convey individual copies of the object code with a copy of the
|
|
||||||
written offer to provide the Corresponding Source. This
|
|
||||||
alternative is allowed only occasionally and noncommercially, and
|
|
||||||
only if you received the object code with such an offer, in accord
|
|
||||||
with subsection 6b.
|
|
||||||
- d) Convey the object code by offering access from a designated
|
|
||||||
place (gratis or for a charge), and offer equivalent access to the
|
|
||||||
Corresponding Source in the same way through the same place at no
|
|
||||||
further charge. You need not require recipients to copy the
|
|
||||||
Corresponding Source along with the object code. If the place to
|
|
||||||
copy the object code is a network server, the Corresponding Source
|
|
||||||
may be on a different server (operated by you or a third party)
|
|
||||||
that supports equivalent copying facilities, provided you maintain
|
|
||||||
clear directions next to the object code saying where to find the
|
|
||||||
Corresponding Source. Regardless of what server hosts the
|
|
||||||
Corresponding Source, you remain obligated to ensure that it is
|
|
||||||
available for as long as needed to satisfy these requirements.
|
|
||||||
- e) Convey the object code using peer-to-peer transmission,
|
|
||||||
provided you inform other peers where the object code and
|
|
||||||
Corresponding Source of the work are being offered to the general
|
|
||||||
public at no charge under subsection 6d.
|
|
||||||
|
|
||||||
A separable portion of the object code, whose source code is excluded
|
|
||||||
from the Corresponding Source as a System Library, need not be
|
|
||||||
included in conveying the object code work.
|
|
||||||
|
|
||||||
A "User Product" is either (1) a "consumer product", which means any
|
|
||||||
tangible personal property which is normally used for personal,
|
|
||||||
family, or household purposes, or (2) anything designed or sold for
|
|
||||||
incorporation into a dwelling. In determining whether a product is a
|
|
||||||
consumer product, doubtful cases shall be resolved in favor of
|
|
||||||
coverage. For a particular product received by a particular user,
|
|
||||||
"normally used" refers to a typical or common use of that class of
|
|
||||||
product, regardless of the status of the particular user or of the way
|
|
||||||
in which the particular user actually uses, or expects or is expected
|
|
||||||
to use, the product. A product is a consumer product regardless of
|
|
||||||
whether the product has substantial commercial, industrial or
|
|
||||||
non-consumer uses, unless such uses represent the only significant
|
|
||||||
mode of use of the product.
|
|
||||||
|
|
||||||
"Installation Information" for a User Product means any methods,
|
|
||||||
procedures, authorization keys, or other information required to
|
|
||||||
install and execute modified versions of a covered work in that User
|
|
||||||
Product from a modified version of its Corresponding Source. The
|
|
||||||
information must suffice to ensure that the continued functioning of
|
|
||||||
the modified object code is in no case prevented or interfered with
|
|
||||||
solely because modification has been made.
|
|
||||||
|
|
||||||
If you convey an object code work under this section in, or with, or
|
|
||||||
specifically for use in, a User Product, and the conveying occurs as
|
|
||||||
part of a transaction in which the right of possession and use of the
|
|
||||||
User Product is transferred to the recipient in perpetuity or for a
|
|
||||||
fixed term (regardless of how the transaction is characterized), the
|
|
||||||
Corresponding Source conveyed under this section must be accompanied
|
|
||||||
by the Installation Information. But this requirement does not apply
|
|
||||||
if neither you nor any third party retains the ability to install
|
|
||||||
modified object code on the User Product (for example, the work has
|
|
||||||
been installed in ROM).
|
|
||||||
|
|
||||||
The requirement to provide Installation Information does not include a
|
|
||||||
requirement to continue to provide support service, warranty, or
|
|
||||||
updates for a work that has been modified or installed by the
|
|
||||||
recipient, or for the User Product in which it has been modified or
|
|
||||||
installed. Access to a network may be denied when the modification
|
|
||||||
itself materially and adversely affects the operation of the network
|
|
||||||
or violates the rules and protocols for communication across the
|
|
||||||
network.
|
|
||||||
|
|
||||||
Corresponding Source conveyed, and Installation Information provided,
|
|
||||||
in accord with this section must be in a format that is publicly
|
|
||||||
documented (and with an implementation available to the public in
|
|
||||||
source code form), and must require no special password or key for
|
|
||||||
unpacking, reading or copying.
|
|
||||||
|
|
||||||
#### 7. Additional Terms.
|
|
||||||
|
|
||||||
"Additional permissions" are terms that supplement the terms of this
|
|
||||||
License by making exceptions from one or more of its conditions.
|
|
||||||
Additional permissions that are applicable to the entire Program shall
|
|
||||||
be treated as though they were included in this License, to the extent
|
|
||||||
that they are valid under applicable law. If additional permissions
|
|
||||||
apply only to part of the Program, that part may be used separately
|
|
||||||
under those permissions, but the entire Program remains governed by
|
|
||||||
this License without regard to the additional permissions.
|
|
||||||
|
|
||||||
When you convey a copy of a covered work, you may at your option
|
|
||||||
remove any additional permissions from that copy, or from any part of
|
|
||||||
it. (Additional permissions may be written to require their own
|
|
||||||
removal in certain cases when you modify the work.) You may place
|
|
||||||
additional permissions on material, added by you to a covered work,
|
|
||||||
for which you have or can give appropriate copyright permission.
|
|
||||||
|
|
||||||
Notwithstanding any other provision of this License, for material you
|
|
||||||
add to a covered work, you may (if authorized by the copyright holders
|
|
||||||
of that material) supplement the terms of this License with terms:
|
|
||||||
|
|
||||||
- a) Disclaiming warranty or limiting liability differently from the
|
|
||||||
terms of sections 15 and 16 of this License; or
|
|
||||||
- b) Requiring preservation of specified reasonable legal notices or
|
|
||||||
author attributions in that material or in the Appropriate Legal
|
|
||||||
Notices displayed by works containing it; or
|
|
||||||
- c) Prohibiting misrepresentation of the origin of that material,
|
|
||||||
or requiring that modified versions of such material be marked in
|
|
||||||
reasonable ways as different from the original version; or
|
|
||||||
- d) Limiting the use for publicity purposes of names of licensors
|
|
||||||
or authors of the material; or
|
|
||||||
- e) Declining to grant rights under trademark law for use of some
|
|
||||||
trade names, trademarks, or service marks; or
|
|
||||||
- f) Requiring indemnification of licensors and authors of that
|
|
||||||
material by anyone who conveys the material (or modified versions
|
|
||||||
of it) with contractual assumptions of liability to the recipient,
|
|
||||||
for any liability that these contractual assumptions directly
|
|
||||||
impose on those licensors and authors.
|
|
||||||
|
|
||||||
All other non-permissive additional terms are considered "further
|
|
||||||
restrictions" within the meaning of section 10. If the Program as you
|
|
||||||
received it, or any part of it, contains a notice stating that it is
|
|
||||||
governed by this License along with a term that is a further
|
|
||||||
restriction, you may remove that term. If a license document contains
|
|
||||||
a further restriction but permits relicensing or conveying under this
|
|
||||||
License, you may add to a covered work material governed by the terms
|
|
||||||
of that license document, provided that the further restriction does
|
|
||||||
not survive such relicensing or conveying.
|
|
||||||
|
|
||||||
If you add terms to a covered work in accord with this section, you
|
|
||||||
must place, in the relevant source files, a statement of the
|
|
||||||
additional terms that apply to those files, or a notice indicating
|
|
||||||
where to find the applicable terms.
|
|
||||||
|
|
||||||
Additional terms, permissive or non-permissive, may be stated in the
|
|
||||||
form of a separately written license, or stated as exceptions; the
|
|
||||||
above requirements apply either way.
|
|
||||||
|
|
||||||
#### 8. Termination.
|
|
||||||
|
|
||||||
You may not propagate or modify a covered work except as expressly
|
|
||||||
provided under this License. Any attempt otherwise to propagate or
|
|
||||||
modify it is void, and will automatically terminate your rights under
|
|
||||||
this License (including any patent licenses granted under the third
|
|
||||||
paragraph of section 11).
|
|
||||||
|
|
||||||
However, if you cease all violation of this License, then your license
|
|
||||||
from a particular copyright holder is reinstated (a) provisionally,
|
|
||||||
unless and until the copyright holder explicitly and finally
|
|
||||||
terminates your license, and (b) permanently, if the copyright holder
|
|
||||||
fails to notify you of the violation by some reasonable means prior to
|
|
||||||
60 days after the cessation.
|
|
||||||
|
|
||||||
Moreover, your license from a particular copyright holder is
|
|
||||||
reinstated permanently if the copyright holder notifies you of the
|
|
||||||
violation by some reasonable means, this is the first time you have
|
|
||||||
received notice of violation of this License (for any work) from that
|
|
||||||
copyright holder, and you cure the violation prior to 30 days after
|
|
||||||
your receipt of the notice.
|
|
||||||
|
|
||||||
Termination of your rights under this section does not terminate the
|
|
||||||
licenses of parties who have received copies or rights from you under
|
|
||||||
this License. If your rights have been terminated and not permanently
|
|
||||||
reinstated, you do not qualify to receive new licenses for the same
|
|
||||||
material under section 10.
|
|
||||||
|
|
||||||
#### 9. Acceptance Not Required for Having Copies.
|
|
||||||
|
|
||||||
You are not required to accept this License in order to receive or run
|
|
||||||
a copy of the Program. Ancillary propagation of a covered work
|
|
||||||
occurring solely as a consequence of using peer-to-peer transmission
|
|
||||||
to receive a copy likewise does not require acceptance. However,
|
|
||||||
nothing other than this License grants you permission to propagate or
|
|
||||||
modify any covered work. These actions infringe copyright if you do
|
|
||||||
not accept this License. Therefore, by modifying or propagating a
|
|
||||||
covered work, you indicate your acceptance of this License to do so.
|
|
||||||
|
|
||||||
#### 10. Automatic Licensing of Downstream Recipients.
|
|
||||||
|
|
||||||
Each time you convey a covered work, the recipient automatically
|
|
||||||
receives a license from the original licensors, to run, modify and
|
|
||||||
propagate that work, subject to this License. You are not responsible
|
|
||||||
for enforcing compliance by third parties with this License.
|
|
||||||
|
|
||||||
An "entity transaction" is a transaction transferring control of an
|
|
||||||
organization, or substantially all assets of one, or subdividing an
|
|
||||||
organization, or merging organizations. If propagation of a covered
|
|
||||||
work results from an entity transaction, each party to that
|
|
||||||
transaction who receives a copy of the work also receives whatever
|
|
||||||
licenses to the work the party's predecessor in interest had or could
|
|
||||||
give under the previous paragraph, plus a right to possession of the
|
|
||||||
Corresponding Source of the work from the predecessor in interest, if
|
|
||||||
the predecessor has it or can get it with reasonable efforts.
|
|
||||||
|
|
||||||
You may not impose any further restrictions on the exercise of the
|
|
||||||
rights granted or affirmed under this License. For example, you may
|
|
||||||
not impose a license fee, royalty, or other charge for exercise of
|
|
||||||
rights granted under this License, and you may not initiate litigation
|
|
||||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
|
||||||
any patent claim is infringed by making, using, selling, offering for
|
|
||||||
sale, or importing the Program or any portion of it.
|
|
||||||
|
|
||||||
#### 11. Patents.
|
|
||||||
|
|
||||||
A "contributor" is a copyright holder who authorizes use under this
|
|
||||||
License of the Program or a work on which the Program is based. The
|
|
||||||
work thus licensed is called the contributor's "contributor version".
|
|
||||||
|
|
||||||
A contributor's "essential patent claims" are all patent claims owned
|
|
||||||
or controlled by the contributor, whether already acquired or
|
|
||||||
hereafter acquired, that would be infringed by some manner, permitted
|
|
||||||
by this License, of making, using, or selling its contributor version,
|
|
||||||
but do not include claims that would be infringed only as a
|
|
||||||
consequence of further modification of the contributor version. For
|
|
||||||
purposes of this definition, "control" includes the right to grant
|
|
||||||
patent sublicenses in a manner consistent with the requirements of
|
|
||||||
this License.
|
|
||||||
|
|
||||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
|
||||||
patent license under the contributor's essential patent claims, to
|
|
||||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
|
||||||
propagate the contents of its contributor version.
|
|
||||||
|
|
||||||
In the following three paragraphs, a "patent license" is any express
|
|
||||||
agreement or commitment, however denominated, not to enforce a patent
|
|
||||||
(such as an express permission to practice a patent or covenant not to
|
|
||||||
sue for patent infringement). To "grant" such a patent license to a
|
|
||||||
party means to make such an agreement or commitment not to enforce a
|
|
||||||
patent against the party.
|
|
||||||
|
|
||||||
If you convey a covered work, knowingly relying on a patent license,
|
|
||||||
and the Corresponding Source of the work is not available for anyone
|
|
||||||
to copy, free of charge and under the terms of this License, through a
|
|
||||||
publicly available network server or other readily accessible means,
|
|
||||||
then you must either (1) cause the Corresponding Source to be so
|
|
||||||
available, or (2) arrange to deprive yourself of the benefit of the
|
|
||||||
patent license for this particular work, or (3) arrange, in a manner
|
|
||||||
consistent with the requirements of this License, to extend the patent
|
|
||||||
license to downstream recipients. "Knowingly relying" means you have
|
|
||||||
actual knowledge that, but for the patent license, your conveying the
|
|
||||||
covered work in a country, or your recipient's use of the covered work
|
|
||||||
in a country, would infringe one or more identifiable patents in that
|
|
||||||
country that you have reason to believe are valid.
|
|
||||||
|
|
||||||
If, pursuant to or in connection with a single transaction or
|
|
||||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
|
||||||
covered work, and grant a patent license to some of the parties
|
|
||||||
receiving the covered work authorizing them to use, propagate, modify
|
|
||||||
or convey a specific copy of the covered work, then the patent license
|
|
||||||
you grant is automatically extended to all recipients of the covered
|
|
||||||
work and works based on it.
|
|
||||||
|
|
||||||
A patent license is "discriminatory" if it does not include within the
|
|
||||||
scope of its coverage, prohibits the exercise of, or is conditioned on
|
|
||||||
the non-exercise of one or more of the rights that are specifically
|
|
||||||
granted under this License. You may not convey a covered work if you
|
|
||||||
are a party to an arrangement with a third party that is in the
|
|
||||||
business of distributing software, under which you make payment to the
|
|
||||||
third party based on the extent of your activity of conveying the
|
|
||||||
work, and under which the third party grants, to any of the parties
|
|
||||||
who would receive the covered work from you, a discriminatory patent
|
|
||||||
license (a) in connection with copies of the covered work conveyed by
|
|
||||||
you (or copies made from those copies), or (b) primarily for and in
|
|
||||||
connection with specific products or compilations that contain the
|
|
||||||
covered work, unless you entered into that arrangement, or that patent
|
|
||||||
license was granted, prior to 28 March 2007.
|
|
||||||
|
|
||||||
Nothing in this License shall be construed as excluding or limiting
|
|
||||||
any implied license or other defenses to infringement that may
|
|
||||||
otherwise be available to you under applicable patent law.
|
|
||||||
|
|
||||||
#### 12. No Surrender of Others' Freedom.
|
|
||||||
|
|
||||||
If conditions are imposed on you (whether by court order, agreement or
|
|
||||||
otherwise) that contradict the conditions of this License, they do not
|
|
||||||
excuse you from the conditions of this License. If you cannot convey a
|
|
||||||
covered work so as to satisfy simultaneously your obligations under
|
|
||||||
this License and any other pertinent obligations, then as a
|
|
||||||
consequence you may not convey it at all. For example, if you agree to
|
|
||||||
terms that obligate you to collect a royalty for further conveying
|
|
||||||
from those to whom you convey the Program, the only way you could
|
|
||||||
satisfy both those terms and this License would be to refrain entirely
|
|
||||||
from conveying the Program.
|
|
||||||
|
|
||||||
#### 13. Use with the GNU Affero General Public License.
|
|
||||||
|
|
||||||
Notwithstanding any other provision of this License, you have
|
|
||||||
permission to link or combine any covered work with a work licensed
|
|
||||||
under version 3 of the GNU Affero General Public License into a single
|
|
||||||
combined work, and to convey the resulting work. The terms of this
|
|
||||||
License will continue to apply to the part which is the covered work,
|
|
||||||
but the special requirements of the GNU Affero General Public License,
|
|
||||||
section 13, concerning interaction through a network will apply to the
|
|
||||||
combination as such.
|
|
||||||
|
|
||||||
#### 14. Revised Versions of this License.
|
|
||||||
|
|
||||||
The Free Software Foundation may publish revised and/or new versions
|
|
||||||
of the GNU General Public License from time to time. Such new versions
|
|
||||||
will be similar in spirit to the present version, but may differ in
|
|
||||||
detail to address new problems or concerns.
|
|
||||||
|
|
||||||
Each version is given a distinguishing version number. If the Program
|
|
||||||
specifies that a certain numbered version of the GNU General Public
|
|
||||||
License "or any later version" applies to it, you have the option of
|
|
||||||
following the terms and conditions either of that numbered version or
|
|
||||||
of any later version published by the Free Software Foundation. If the
|
|
||||||
Program does not specify a version number of the GNU General Public
|
|
||||||
License, you may choose any version ever published by the Free
|
|
||||||
Software Foundation.
|
|
||||||
|
|
||||||
If the Program specifies that a proxy can decide which future versions
|
|
||||||
of the GNU General Public License can be used, that proxy's public
|
|
||||||
statement of acceptance of a version permanently authorizes you to
|
|
||||||
choose that version for the Program.
|
|
||||||
|
|
||||||
Later license versions may give you additional or different
|
|
||||||
permissions. However, no additional obligations are imposed on any
|
|
||||||
author or copyright holder as a result of your choosing to follow a
|
|
||||||
later version.
|
|
||||||
|
|
||||||
#### 15. Disclaimer of Warranty.
|
|
||||||
|
|
||||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
|
||||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
|
||||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT
|
|
||||||
WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT
|
|
||||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
||||||
A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND
|
|
||||||
PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE
|
|
||||||
DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR
|
|
||||||
CORRECTION.
|
|
||||||
|
|
||||||
#### 16. Limitation of Liability.
|
|
||||||
|
|
||||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
|
||||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR
|
|
||||||
CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
|
||||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES
|
|
||||||
ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT
|
|
||||||
NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR
|
|
||||||
LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM
|
|
||||||
TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER
|
|
||||||
PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
|
||||||
|
|
||||||
#### 17. Interpretation of Sections 15 and 16.
|
|
||||||
|
|
||||||
If the disclaimer of warranty and limitation of liability provided
|
|
||||||
above cannot be given local legal effect according to their terms,
|
|
||||||
reviewing courts shall apply local law that most closely approximates
|
|
||||||
an absolute waiver of all civil liability in connection with the
|
|
||||||
Program, unless a warranty or assumption of liability accompanies a
|
|
||||||
copy of the Program in return for a fee.
|
|
||||||
|
|
||||||
END OF TERMS AND CONDITIONS
|
|
||||||
|
|
||||||
### How to Apply These Terms to Your New Programs
|
|
||||||
|
|
||||||
If you develop a new program, and you want it to be of the greatest
|
|
||||||
possible use to the public, the best way to achieve this is to make it
|
|
||||||
free software which everyone can redistribute and change under these
|
|
||||||
terms.
|
|
||||||
|
|
||||||
To do so, attach the following notices to the program. It is safest to
|
|
||||||
attach them to the start of each source file to most effectively state
|
|
||||||
the exclusion of warranty; and each file should have at least the
|
|
||||||
"copyright" line and a pointer to where the full notice is found.
|
|
||||||
|
|
||||||
<one line to give the program's name and a brief idea of what it does.>
|
|
||||||
Copyright (C) <year> <name of author>
|
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
Also add information on how to contact you by electronic and paper
|
|
||||||
mail.
|
|
||||||
|
|
||||||
If the program does terminal interaction, make it output a short
|
|
||||||
notice like this when it starts in an interactive mode:
|
|
||||||
|
|
||||||
<program> Copyright (C) <year> <name of author>
|
|
||||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
|
||||||
This is free software, and you are welcome to redistribute it
|
|
||||||
under certain conditions; type `show c' for details.
|
|
||||||
|
|
||||||
The hypothetical commands \`show w' and \`show c' should show the
|
|
||||||
appropriate parts of the General Public License. Of course, your
|
|
||||||
program's commands might be different; for a GUI interface, you would
|
|
||||||
use an "about box".
|
|
||||||
|
|
||||||
You should also get your employer (if you work as a programmer) or
|
|
||||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
|
||||||
necessary. For more information on this, and how to apply and follow
|
|
||||||
the GNU GPL, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
The GNU General Public License does not permit incorporating your
|
|
||||||
program into proprietary programs. If your program is a subroutine
|
|
||||||
library, you may consider it more useful to permit linking proprietary
|
|
||||||
applications with the library. If this is what you want to do, use the
|
|
||||||
GNU Lesser General Public License instead of this License. But first,
|
|
||||||
please read <http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
|
||||||
71
README.md
@@ -1,71 +0,0 @@
|
|||||||
# ReplayMod
|
|
||||||
A Minecraft mod to record game sessions and replay them afterwards from any perspective.
|
|
||||||
|
|
||||||
## Building
|
|
||||||
Make sure your sub-projects are up-to-date: `git submodule update --init --recursive`
|
|
||||||
|
|
||||||
For each branch you visit the first time, running `./gradlew setupDecompWorkspace` is necessary.
|
|
||||||
This will also be necessary if the `replaymod_at.cfg` file has been changed (getting errors about code that is trying
|
|
||||||
to access private fields is a good indication that this has happened).
|
|
||||||
|
|
||||||
### No IDE
|
|
||||||
You can build the mod by running `./gradlew :build`. You can then find the final jar files in `build/libs/`.
|
|
||||||
|
|
||||||
### IntelliJ
|
|
||||||
For the initial setup run `./gradlew preshadowJar idea genIntellijRuns`.
|
|
||||||
You also need to enable the Mixin annotation processor:
|
|
||||||
1. Go to File -> Settings -> Build, Execution, Deployment -> Compiler -> Annotation Processors
|
|
||||||
2. Tick "Enable annotation processing"
|
|
||||||
3. Add a new entry to the "Annotation Processor options"
|
|
||||||
4. Set the name to "reobfSrgFile" and the value to "$path/build/mcp-srg.srg" where you replace $path with the full
|
|
||||||
path to the folder containing the gradlew file
|
|
||||||
|
|
||||||
Whenever you switch to another branch, you can either just run `./gradlew preshadowJar idea` or instead run
|
|
||||||
`./gradlew preshadowJar copySrg` and then refresh the gradle project from within IntelliJ.
|
|
||||||
|
|
||||||
### Eclipse
|
|
||||||
|
|
||||||
## Development
|
|
||||||
### Branches
|
|
||||||
New features are developed on the `1.8` branch and merged upwards for release. Larger features are developed on their
|
|
||||||
own branch that is based on `1.8` and then merged back once it's finished.
|
|
||||||
|
|
||||||
Features or bug fixes that apply only to a specific Minecraft version are fixed on the branch corresponding to that
|
|
||||||
version and reverted when merging upwards.
|
|
||||||
|
|
||||||
Both subprojects follow a similar branching model.
|
|
||||||
|
|
||||||
The user documentation (`docs` folder) is only committed to on the current development branch. Any changes committed on
|
|
||||||
a branch for a more recent Minecraft version are not kept up to date on the website and should only be
|
|
||||||
of importance once support for the previous Minecraft version is dropped.
|
|
||||||
|
|
||||||
The `master` branch is solely to be used for the `version.json` file that contains a list of all versions
|
|
||||||
used by the clients to check for updates of this mod.
|
|
||||||
|
|
||||||
### Versioning
|
|
||||||
The ReplayMod uses the versioning scheme outlined [here](http://mcforge.readthedocs.io/en/latest/conventions/versioning/)
|
|
||||||
with three changes:
|
|
||||||
- No `MAJORAPI`, the ReplayMod does not provide any external API
|
|
||||||
- "Updating to a new Minecraft version" should not increment `MAJORMOD`, we maintain one version of the ReplayMod
|
|
||||||
for each version of Minecraft and all these versions share the same feature set (and most bugs). We therefore try to
|
|
||||||
keep the version name the same for all of them (with the exception of `MCVERSION` of course). This also means that the
|
|
||||||
"Multiple Minecraft Version" section does not apply.
|
|
||||||
- For pre-releases the shorter `-bX` is used instead of `-betaX`
|
|
||||||
|
|
||||||
When a new version is (pre-)release, a new annotated tag should be added with the name of the version and the
|
|
||||||
`versions.json` file in the `master` branch should be updated. To simplify this process the gradle task `doRelease` can
|
|
||||||
be used: `./gradlew -PreleaseVersion=1.8-2.0.0-rc1 doRelease`. It will create the tag and update the version.json
|
|
||||||
accordingly.
|
|
||||||
|
|
||||||
Care should be taken that the updated `version.json` is not pushed before a jar file is available on the
|
|
||||||
download page (or Jenkins) as it will inform the users of the update.
|
|
||||||
|
|
||||||
### Bugs
|
|
||||||
Bugs in the mod are tracked via [Bugzilla](https://bugs.replaymod.com/).
|
|
||||||
GitHub should only be used for issues that are generally not likely to affect any end users.
|
|
||||||
|
|
||||||
Bug numbers in commits such as `(fixes #42)` refer to Bugzilla unless noted otherwise.
|
|
||||||
|
|
||||||
## License
|
|
||||||
The ReplayMod is provided under the terms of the GNU General Public License Version 3 or (at your option) any later version.
|
|
||||||
See `LICENSE.md` for the full license text.
|
|
||||||
65
build.gradle
@@ -1,5 +1,7 @@
|
|||||||
import groovy.json.JsonOutput
|
import groovy.json.JsonOutput
|
||||||
|
|
||||||
|
import java.util.zip.ZipInputStream
|
||||||
|
|
||||||
buildscript {
|
buildscript {
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
@@ -18,7 +20,7 @@ buildscript {
|
|||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'net.minecraftforge.gradle:ForgeGradle:2.2-SNAPSHOT'
|
classpath 'net.minecraftforge.gradle:ForgeGradle:2.2-SNAPSHOT'
|
||||||
classpath 'org.spongepowered:mixingradle:0.3-SNAPSHOT'
|
classpath 'org.spongepowered:mixingradle:0.4-SNAPSHOT'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -34,11 +36,9 @@ archivesBaseName = "replaymod"
|
|||||||
|
|
||||||
minecraft {
|
minecraft {
|
||||||
coreMod = 'com.replaymod.core.LoadingPlugin'
|
coreMod = 'com.replaymod.core.LoadingPlugin'
|
||||||
version = '1.8.9-11.15.1.1722'
|
version = '1.10.2-12.18.2.2099'
|
||||||
runDir = "eclipse"
|
runDir = "eclipse"
|
||||||
mappings = "stable_22"
|
mappings = "snapshot_20160518"
|
||||||
replace '@MOD_VERSION@', project.version
|
|
||||||
replace '@MC_VERSION@', project.minecraft.version
|
|
||||||
}
|
}
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
@@ -59,7 +59,7 @@ configurations {
|
|||||||
dependencies {
|
dependencies {
|
||||||
compile 'org.projectlombok:lombok:1.16.4'
|
compile 'org.projectlombok:lombok:1.16.4'
|
||||||
|
|
||||||
compile 'org.spongepowered:mixin:0.6.8-SNAPSHOT'
|
compile 'org.spongepowered:mixin:0.5.9-SNAPSHOT'
|
||||||
shade 'com.googlecode.mp4parser:isoparser:1.1.7'
|
shade 'com.googlecode.mp4parser:isoparser:1.1.7'
|
||||||
shade 'org.apache.commons:commons-exec:1.3'
|
shade 'org.apache.commons:commons-exec:1.3'
|
||||||
shade 'com.google.apis:google-api-services-youtube:v3-rev178-1.22.0'
|
shade 'com.google.apis:google-api-services-youtube:v3-rev178-1.22.0'
|
||||||
@@ -101,6 +101,27 @@ jar {
|
|||||||
}
|
}
|
||||||
from noticeDir
|
from noticeDir
|
||||||
|
|
||||||
|
def langDir = file("$buildDir/languages")
|
||||||
|
doFirst {
|
||||||
|
try {
|
||||||
|
langDir.deleteDir()
|
||||||
|
langDir.mkdirs()
|
||||||
|
def dir = new File(langDir, 'assets/replaymod/lang/')
|
||||||
|
dir.mkdirs()
|
||||||
|
def zip = new ZipInputStream(new URL('http://replaymod.com/api/grab_languages').openStream())
|
||||||
|
def e;
|
||||||
|
while ((e = zip.nextEntry) != null) {
|
||||||
|
new File(dir, e.getName()) << zip
|
||||||
|
zip.closeEntry()
|
||||||
|
}
|
||||||
|
} catch(Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
from (langDir) {
|
||||||
|
exclude '**/en_US.lang'
|
||||||
|
}
|
||||||
|
|
||||||
from ({shade().collect { it.isDirectory() ? it : zipTree(it) }}) {
|
from ({shade().collect { it.isDirectory() ? it : zipTree(it) }}) {
|
||||||
exclude '**/NOTICE*'
|
exclude '**/NOTICE*'
|
||||||
// exclude everything taken in from jGui for running the mod in a dev environment
|
// exclude everything taken in from jGui for running the mod in a dev environment
|
||||||
@@ -115,6 +136,7 @@ jar {
|
|||||||
manifest {
|
manifest {
|
||||||
attributes 'TweakClass': 'org.spongepowered.asm.launch.MixinTweaker',
|
attributes 'TweakClass': 'org.spongepowered.asm.launch.MixinTweaker',
|
||||||
'TweakOrder': '0',
|
'TweakOrder': '0',
|
||||||
|
'FMLCorePluginContainsFMLMod': 'true',
|
||||||
'FMLAT': 'replaymod_at.cfg'
|
'FMLAT': 'replaymod_at.cfg'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -165,13 +187,6 @@ sourceSets {
|
|||||||
}
|
}
|
||||||
refMap = "mixins.replaymod.refmap.json"
|
refMap = "mixins.replaymod.refmap.json"
|
||||||
}
|
}
|
||||||
integrationTest {
|
|
||||||
compileClasspath += main.runtimeClasspath + main.output
|
|
||||||
java {
|
|
||||||
srcDir file('src/integration-test/java')
|
|
||||||
}
|
|
||||||
resources.srcDir file('src/integration-test/resources')
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
task copySrg(type: Copy, dependsOn: 'genSrgs') {
|
task copySrg(type: Copy, dependsOn: 'genSrgs') {
|
||||||
@@ -183,30 +198,6 @@ setupDecompWorkspace.dependsOn copySrg
|
|||||||
setupDevWorkspace.dependsOn copySrg
|
setupDevWorkspace.dependsOn copySrg
|
||||||
project.tasks.idea.dependsOn copySrg
|
project.tasks.idea.dependsOn copySrg
|
||||||
|
|
||||||
task runIntegrationTest(type: JavaExec, dependsOn: ["makeStart", "jar"]) {
|
|
||||||
main = 'GradleStart'
|
|
||||||
standardOutput = System.out
|
|
||||||
errorOutput = System.err
|
|
||||||
workingDir file(minecraft.runDir)
|
|
||||||
|
|
||||||
def testDir = new File(minecraft.runDir, "integration-test")
|
|
||||||
doFirst {
|
|
||||||
testDir.deleteDir()
|
|
||||||
testDir.mkdirs()
|
|
||||||
}
|
|
||||||
|
|
||||||
doLast {
|
|
||||||
testDir.deleteDir()
|
|
||||||
}
|
|
||||||
|
|
||||||
afterEvaluate {
|
|
||||||
def runClient = tasks.getByName("runClient")
|
|
||||||
runIntegrationTest.jvmArgs = runClient.jvmArgs + "-Dfml.noGrab=true"
|
|
||||||
runIntegrationTest.args = runClient.args + "--gameDir" + testDir.canonicalPath
|
|
||||||
runIntegrationTest.classpath runClient.classpath + sourceSets.integrationTest.output
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
def generateVersionsJson() {
|
def generateVersionsJson() {
|
||||||
// List all tags
|
// List all tags
|
||||||
def stdout = new ByteArrayOutputStream()
|
def stdout = new ByteArrayOutputStream()
|
||||||
|
|||||||
2
docs/.gitignore
vendored
@@ -1,2 +0,0 @@
|
|||||||
node_modules
|
|
||||||
content.html
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
### Documentation
|
|
||||||
The documentation at [replaymod.com/docs](https://www.replaymod.com/docs/) is generated from
|
|
||||||
`content.md` using a custom Node.js script.
|
|
||||||
|
|
||||||
Using an image directly after a header will show it to the right of the text and will show the following
|
|
||||||
text as its caption.
|
|
||||||
|
|
||||||
Block quotes (`> Quote`) are used to highlight sections of texts: `> **Note:** This is important.`
|
|
||||||
|
|
||||||
Images should be available in two formats: jpg, which is loaded by default and the original png which
|
|
||||||
is loaded when the user clicks on the image. Note that some might only be available as jpg right now
|
|
||||||
as their original was lost.
|
|
||||||
Animated images should be available in webm (vp9) format which is displayed by default and as a gif which is used as
|
|
||||||
the fallback for browsers that lack webm support.
|
|
||||||
In `content.md`, the default version is used.
|
|
||||||
|
|
||||||
Make sure you have [npm]() installed.
|
|
||||||
For the initial setup run `npm install`.
|
|
||||||
Run `node build` to generate the html.
|
|
||||||
|
|
||||||
Note: The template used for the live version is different and the one here is only for convenient testing.
|
|
||||||
209
docs/build.js
@@ -1,209 +0,0 @@
|
|||||||
require('array-findindex-polyfill')
|
|
||||||
require('string.prototype.endswith')
|
|
||||||
|
|
||||||
var fs = require('fs')
|
|
||||||
var markdown = require('md-jml')
|
|
||||||
|
|
||||||
var input = fs.readFileSync('content.md', 'utf8')
|
|
||||||
markdown.parse(input, {}, function (tree) {
|
|
||||||
// Assign numbers to headers
|
|
||||||
var counter = [0, 0, 0, 0]
|
|
||||||
var anchorStack = ['']
|
|
||||||
for (var i = 2; i < tree.length; i++) {
|
|
||||||
var e = tree[i]
|
|
||||||
if (typeof e === 'string' || !e[0].match(/h\d/)) {
|
|
||||||
continue // Not a header
|
|
||||||
}
|
|
||||||
var match = / \[(.+)\]/.exec(e[2])
|
|
||||||
if (!match) {
|
|
||||||
continue // Doesn't contain anchor tag
|
|
||||||
}
|
|
||||||
var tag = match[1]
|
|
||||||
e[2] = /(.+) \[.+\]/.exec(e[2])[1]
|
|
||||||
|
|
||||||
var level = +e[0].substring(1)
|
|
||||||
counter[level - 1]++
|
|
||||||
for (var j = level; j < 4; j++) {
|
|
||||||
counter[j] = 0
|
|
||||||
}
|
|
||||||
e[1].index = counter.slice(0, level).join('.')
|
|
||||||
if (e[1].index.indexOf('.') === -1) {
|
|
||||||
// There always has to be at least one dot in the index
|
|
||||||
e[1].index += '.'
|
|
||||||
}
|
|
||||||
// Prepend index to text
|
|
||||||
e[2] = e[1].index + ' ' + e[2]
|
|
||||||
|
|
||||||
anchorStack = anchorStack.slice(0, level)
|
|
||||||
anchorStack.push(anchorStack[level - 1] + '-' + tag)
|
|
||||||
e[1].anchor = anchorStack[level].substring(1)
|
|
||||||
}
|
|
||||||
|
|
||||||
function forEachElement (elements, matcher, callback) {
|
|
||||||
var indices = elements.map(function (h, index) {
|
|
||||||
// Find the indices of all matched children
|
|
||||||
return matcher(h) ? index : null
|
|
||||||
}).filter(function (i) {
|
|
||||||
// Filter out elements that didn't match
|
|
||||||
return i !== null
|
|
||||||
})
|
|
||||||
for (var i = 0; i < indices.length; i++) {
|
|
||||||
var element = elements[indices[i]]
|
|
||||||
var subElements = elements.slice(indices[i] + 1, i + 1 < indices.length ? indices[i + 1] : elements.length)
|
|
||||||
callback(element, subElements)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function generateIndex (headers, level) {
|
|
||||||
var out = ''
|
|
||||||
|
|
||||||
// Header
|
|
||||||
if (level == 0) {
|
|
||||||
out += '<h2>Contents</h2><dl>'
|
|
||||||
} else {
|
|
||||||
out += '<ul>'
|
|
||||||
}
|
|
||||||
|
|
||||||
// Find the indices of all headers one level below this one
|
|
||||||
forEachElement(headers, function (h) {
|
|
||||||
return h[0] === 'h' + (level + 1) && h[1].anchor
|
|
||||||
}, function (header, subHeaders) {
|
|
||||||
// Output header
|
|
||||||
if (level == 0) {
|
|
||||||
out += '<dt><a href="#' + header[1].anchor + '">' + header[2] + '</a></dt>'
|
|
||||||
} else {
|
|
||||||
out += '<dd><a href="#' + header[1].anchor + '">' + header[2] + '</a></dd>'
|
|
||||||
}
|
|
||||||
// Output sub headers (if any)
|
|
||||||
if (subHeaders.length) {
|
|
||||||
out += generateIndex(subHeaders, level + 1)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
// Footer
|
|
||||||
if (level == 0) {
|
|
||||||
out += '</dl>'
|
|
||||||
} else {
|
|
||||||
out += '</ul>'
|
|
||||||
}
|
|
||||||
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
var index = generateIndex(tree.slice(2).filter(function (e) {
|
|
||||||
return e[1] && e[1].index
|
|
||||||
}), 0)
|
|
||||||
|
|
||||||
function generateBody (elements) {
|
|
||||||
function generateElements (elements) {
|
|
||||||
return elements.slice(2).map(generateElement).join('')
|
|
||||||
}
|
|
||||||
function generateElement (element) {
|
|
||||||
if (!element) {
|
|
||||||
return ''
|
|
||||||
} else if (typeof element === 'string') {
|
|
||||||
return element
|
|
||||||
} else if (element[0] === 'em') {
|
|
||||||
return '<i>' + generateElements(element) + '</i>'
|
|
||||||
} else if (element[0] === 'strong') {
|
|
||||||
return '<b>' + generateElements(element) + '</b>'
|
|
||||||
} else if (element[0] === 'code') {
|
|
||||||
return '<code>' + generateElements(element) + '</code>'
|
|
||||||
} else if (element[0] === 'p') {
|
|
||||||
if (element.length === 3 && element[2][0] === 'a' && element[2][2] === 'YouTube') {
|
|
||||||
var id = element[2][1].href
|
|
||||||
return '<a href="https://www.youtube.com/watch?v=' + id+ '" class="thumbnail">' +
|
|
||||||
'<div class="embed-responsive embed-responsive-16by9"><iframe class="embed-responsive-item" ' +
|
|
||||||
'src="https://www.youtube.com/embed/' + id + '" allowfullscreen></iframe></div></a>'
|
|
||||||
}
|
|
||||||
return '<p>' + generateElements(element) + '</p>'
|
|
||||||
} else if (element[0] === 'a') {
|
|
||||||
return '<a href=' + element[1].href + '>' + generateElements(element) + '</a>'
|
|
||||||
} else if (element[0] === 'ul') {
|
|
||||||
return '<ul>' + generateElements(element) + '</ul>'
|
|
||||||
} else if (element[0] === 'li') {
|
|
||||||
return '<li>' + generateElements(element) + '</li>'
|
|
||||||
} else if (element[0] === 'img') {
|
|
||||||
return '<img src="' + element[1].src + '" alt="' + element[1].alt + '">'
|
|
||||||
} else if (element[0] === 'blockquote') {
|
|
||||||
return element.slice(2).map(function (e) {
|
|
||||||
return '<p><mark>' + generateElements(e) + '</mark></p>'
|
|
||||||
}).join('')
|
|
||||||
} else if (element[0] === 'hr') {
|
|
||||||
return '<hr>'
|
|
||||||
} else if (element[0] === 'br') {
|
|
||||||
return '<br>'
|
|
||||||
} else {
|
|
||||||
return JSON.stringify(element)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
function generateSection (header, elements) {
|
|
||||||
// Remove images and store them for later
|
|
||||||
var images = []
|
|
||||||
for (var i = 0; i < elements.length; i++) {
|
|
||||||
var element = elements[i]
|
|
||||||
if (element[0] !== 'p' || element[2][0] !== 'img') break
|
|
||||||
images.push(element)
|
|
||||||
}
|
|
||||||
elements.splice(0, images.length)
|
|
||||||
|
|
||||||
var out = ''
|
|
||||||
if (header[1].anchor) {
|
|
||||||
out += '<a class="anchor" id="' + header[1].anchor + '"></a>'
|
|
||||||
}
|
|
||||||
out += '<' + header[0] + ' class="text-ul">' + header[2] + '</' + header[0] +'>'
|
|
||||||
out += '<div class="row no-gutter"><div class="col-md-8">'
|
|
||||||
// Generate text
|
|
||||||
out += elements.map(generateElement).join('')
|
|
||||||
out += '</div><div class="col-md-4">'
|
|
||||||
// Generate images
|
|
||||||
images.forEach(function (image) {
|
|
||||||
var url = image[2][1].src
|
|
||||||
if (url.endsWith('.jpg') || url.endsWith('.png')) {
|
|
||||||
var fullQualityUrl = url
|
|
||||||
if (url.endsWith('.jpg')) {
|
|
||||||
fullQualityUrl = url.substring(0, url.length - 3) + 'png'
|
|
||||||
}
|
|
||||||
out += '<div class="thumbnail"><a href="' + fullQualityUrl + '" class="thumbnail" data-lightbox="' +
|
|
||||||
url + '"><img src="' +
|
|
||||||
url + '"></a><div class="caption"><p>' + generateElements(image.slice(1)) + '</p></div></div>'
|
|
||||||
} else if (url.endsWith('gif')) {
|
|
||||||
var webmUrl = url.substring(0, url.length - 3) + 'webm'
|
|
||||||
out += '<div class="thumbnail">' +
|
|
||||||
'<a href="' + url + '" class="thumbnail" data-lightbox="' +url + '">' +
|
|
||||||
'<video style="display:block;width:100%" autoplay loop src="' + webmUrl + '">' +
|
|
||||||
'<img src="' + url + '">' +
|
|
||||||
'</video></a><div class="caption"><p>' + generateElements(image.slice(1)) + '</p></div></div>'
|
|
||||||
} else {
|
|
||||||
console.log('[Warning] Unhandled image format: ' + url)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
out += '</div></div>'
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
var out = ''
|
|
||||||
forEachElement(elements, function (e) {
|
|
||||||
return e[0] === 'h1'
|
|
||||||
}, function (header, elements) {
|
|
||||||
out += '<div class="panel panel-default"><div class="panel-body">'
|
|
||||||
var firstHeaderIndex = elements.findIndex(function (e) {
|
|
||||||
return e[0].match(/h\d/)
|
|
||||||
})
|
|
||||||
header[0] = 'h2' // h1 headers should be rendered the same way as h2 ones are
|
|
||||||
out += generateSection(header, elements.slice(0, firstHeaderIndex === -1 ? elements.length + 1 : firstHeaderIndex))
|
|
||||||
forEachElement(elements, function (e) {
|
|
||||||
return e[0].match(/h\d/)
|
|
||||||
}, function (header, elements) {
|
|
||||||
out += generateSection(header, elements)
|
|
||||||
})
|
|
||||||
out += '</div></div>'
|
|
||||||
})
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
var out = fs.readFileSync('template.html', 'utf-8')
|
|
||||||
.replace('{{index}}', index)
|
|
||||||
.replace('{{content}}', generateBody(tree.slice(2)))
|
|
||||||
//out = JSON.stringify(tree, null, 2)
|
|
||||||
fs.writeFileSync('content.html', out, 'utf-8')
|
|
||||||
})
|
|
||||||
696
docs/content.md
@@ -1,696 +0,0 @@
|
|||||||
# Installation [installing]
|
|
||||||
## Installing the Replay Mod [replaymod]
|
|
||||||
The **ReplayMod** requires **Minecraft Forge** to be installed.
|
|
||||||
|
|
||||||
Depending on your **Replay Mod** version we recommend the following **Forge** versions:
|
|
||||||
|
|
||||||
- Replay Mod 2.0.0 or later for Minecraft 1.11: Forge [1.11-13.19.1.2189](https://files.minecraftforge.net/maven/net/minecraftforge/forge/index_1.11.html)
|
|
||||||
- Replay Mod 2.0.0 or later for Minecraft 1.10.2: Forge [1.10.2-12.18.2.2099](https://files.minecraftforge.net/maven/net/minecraftforge/forge/index_1.10.2.html)
|
|
||||||
- Replay Mod 2.0.0 or later for Minecraft 1.9.4: Forge [1.9.4-12.17.0.1976](https://files.minecraftforge.net/maven/net/minecraftforge/forge/index_1.9.4.html)
|
|
||||||
- Replay Mod 2.0.0 or later for Minecraft 1.8: Forge [1.8-11.14.4.1563](https://files.minecraftforge.net/maven/net/minecraftforge/forge/index_1.8.html)
|
|
||||||
- Replay Mod 1.0.8 or older for Minecraft 1.8: Forge [1.8-11.14.3.1450](http://files.minecraftforge.net/maven/net/minecraftforge/forge/index_1.8.html)
|
|
||||||
|
|
||||||
Other Forge Versions might, but don't necessarily work.
|
|
||||||
|
|
||||||
If you don't know how to install Forge, follow [this tutorial](https://www.youtube.com/watch?v=4i7-RystzC4).
|
|
||||||
|
|
||||||
After installing Forge, simply put the downloaded `ReplayMod.jar` file in the `/mods` folder of your Minecraft directory.
|
|
||||||
|
|
||||||
> **Note:** The **Replay Mod** is entirely client side and can not be installed on the servers you play on.
|
|
||||||
|
|
||||||
## Installing FFmpeg [ffmpeg]
|
|
||||||
To use the **Replay Mod**'s [Rendering Feature](#replaying-render), you need to have FFmpeg installed.
|
|
||||||
|
|
||||||
### Windows [windows]
|
|
||||||
Download the latest **FFmpeg Static Build** for your architecture from <http://ffmpeg.zeranoe.com/builds/>.
|
|
||||||
Then, extract the downloaded `.7z` file in the folder you want to install FFmpeg in.
|
|
||||||
|
|
||||||
Next, download this **Batch Script** to quickly install FFmpeg: <https://replaymod.com/files/ffmpeg-path-installer.bat>
|
|
||||||
|
|
||||||
> **Note:** If your browser warns you about the download, dismiss the message. It's a simple Batch Script which won't damage your computer.
|
|
||||||
|
|
||||||
Put the downloaded script into the folder where you extracted FFmpeg and run itt by double-clicking it.
|
|
||||||
If you see a success message in the console, you've sucessfully installed **FFmpeg**!
|
|
||||||
|
|
||||||
Alternatively, starting with ReplayMod 2.0.0-b5, you can also extract the downloaded `.7z` file into a `ffmpeg` folder
|
|
||||||
(you have to create it, it doesn't exist by default) in your `.minecraft` folder. No need to run any **Batch Script**.
|
|
||||||
The FFmpeg executable should end up at `.minecraft/ffmpeg/bin/ffmpeg.exe`.
|
|
||||||
|
|
||||||
### Mac OSX [mac]
|
|
||||||
On OSX, you can install **FFmpeg** with **[Homebrew](http://brew.sh/)** using `brew install ffmpeg`.
|
|
||||||
|
|
||||||
Alternatively, you can download the latest static build from <https://ffmpeg.org/> and copy the ffmpeg executable to `/usr/local/bin`.
|
|
||||||
|
|
||||||
### Linux [linux]
|
|
||||||
On Linux, you can install **FFmpeg** using your system's package manager, for example using `apt install ffmpeg`.
|
|
||||||
If in doubt, consult the documentation of your distribution.
|
|
||||||
|
|
||||||
## Compatibility with other Mods [compatibility]
|
|
||||||
### General information [general]
|
|
||||||
In General, the Replay Mod _should_ be compatible with most Forge Mods.
|
|
||||||
|
|
||||||
### Shaders Mod [shaders]
|
|
||||||
[Karyonix' Shaders Mod](http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/1286604-shaders-mod-updated-by-karyonix)
|
|
||||||
is no longer compatible with Minecraft Forge starting with 1.9.4. As such it is not compatible with the Replay Mod either.
|
|
||||||
Please use [Optifine](https://optifine.net/) instead.
|
|
||||||
|
|
||||||
### Custom Main Menu [custom-main-menu]
|
|
||||||
The [Custom Main Menu](https://mods.curse.com/mc-mods/minecraft/226406-custom-main-menu) mod is often used in mod packs to customize their Main Menu with a button layout fitting the background image, links to their website / bug tracker and similar.
|
|
||||||
If you are familiar with it, the button ids for the Replay Mod are: **17890234** (text: `replaymod.gui.replayviewer`), **17890237** (text: `replaymod.gui.replayeditor`) and **17890236** (text: `replaymod.gui.replaycenter`)
|
|
||||||
|
|
||||||
Due to the nature of this Custom Main Menu mod, buttons added to the Main Menu by 3rd party mods like the **Replay Mod** will not show up by default.
|
|
||||||
Thus, to access the Replay Viewer/Editor/Center, you need to manually configure the position for those buttons.
|
|
||||||
To do so, you need to modify the Custom Main Menu configuration file.
|
|
||||||
Usually, you can find it at `.minecraft/config/CustomMainMenu/mainmenu.json` (if you're using a mod pack launcher, it normally has its own .minecraft folder).
|
|
||||||
For an explanation of this config file, have a look at Custom Main Menu's page.
|
|
||||||
|
|
||||||
You can find a list of already modified config files [here](https://gist.github.com/Johni0702/3f3fab81dbf7ada83d045d9fe8f345aa).
|
|
||||||
|
|
||||||
## Troubleshooting [troubleshooting]
|
|
||||||
If you need help installing the **Replay Mod** or **FFmpeg**, please read [this forum thread](https://www.replaymod.com/forum/thread/220)
|
|
||||||
by [bela333](https://www.replaymod.com/user/bela333) - it covers most of the problems that users encountered so far.
|
|
||||||
|
|
||||||
## Settings [settings]
|
|
||||||
To access the **Replay Mod Settings** from the Main Menu click the **"Mods"** button, select the **Replay Mod** from the list and
|
|
||||||
the click the **"Config"** button.
|
|
||||||
|
|
||||||
When in a Replay, you can either bind a hotkey to the **Replay Mod Settings** in Minecraft's Control settings
|
|
||||||
or use the hotkey GUI by clicking on the arrow button in the lower left corner.
|
|
||||||
|
|
||||||
# Recording [recording]
|
|
||||||

|
|
||||||
The **Recording Indicator** which is displayed while recording
|
|
||||||
|
|
||||||
Recording Replays is the core feature of the **Replay Mod**.
|
|
||||||
|
|
||||||
Recording a Replay is really simple: If enabled in the **Replay Settings**, the Mod will automatically record all of your gaming sessions.
|
|
||||||
You will be notified that the Recording started by a **Chat Message**. Chat Messages can be disabled in the **Replay Settings**.
|
|
||||||
In the upper left corner, a **Recording Indicator** will be displayed unless disabled in the **Replay Settings** while you are recording.
|
|
||||||
|
|
||||||
While Recording, you can set [Event Markers](#replaying-markers) using the `M` key.
|
|
||||||
|
|
||||||
Upon exiting your Server/Singleplayer World, you might be asked to wait a couple of seconds until saving the Replay has been finished.
|
|
||||||
Congratulations, your Replay is now accessible via the **Replay Viewer**!
|
|
||||||
|
|
||||||
# Replaying [replaying]
|
|
||||||

|
|
||||||
The **Replay Viewer** with several recorded Replays
|
|
||||||
|
|
||||||
To watch one of your Replays, open up the **Replay Viewer** from the **Main Menu** and select the desired Replay.
|
|
||||||
Then, press the "Load" button.
|
|
||||||
|
|
||||||
In the **Replay Viewer**, you can also **rename**, **delete** and **upload** your **Replay Files**.
|
|
||||||
|
|
||||||
## Movement [movement]
|
|
||||||
### Basic Controls [basic]
|
|
||||||
While in the Replay, you can freely move around using the movement keys (`WASD, Space, Shift` by default).
|
|
||||||
You can move through block similar to Spectator Mode.
|
|
||||||
|
|
||||||
Using the **Mouse Wheel**, you can modify your flying speed. Scrolling **up** causes you to fly faster, while scrolling **down** slows you down.
|
|
||||||
|
|
||||||
If you prefer the camera to be controlled similar to vanilla Creative Mode, you can change that in the **Replay Settings**.
|
|
||||||
|
|
||||||
### Camera Roll [roll]
|
|
||||||

|
|
||||||
A Screenshot taken with a **tilted camera**
|
|
||||||
|
|
||||||
While in a Replay, you can tilt the Camera.
|
|
||||||
|
|
||||||
By default, pressing `J` will tilt the screen clockwise, and pressing `L` will tilt the screen counterclockwise.
|
|
||||||
Using `K`, you can reset the Camera Roll.
|
|
||||||
|
|
||||||
When holding the `Ctrl` key (`Cmd` key on Mac) while tilting, you can tilt slower and more precisely.
|
|
||||||
|
|
||||||
> **Hint:** Most of the Keybindings mentioned in this documentation can be changed in Minecraft's **Control Menu**.
|
|
||||||
|
|
||||||
### Spectating Entities [spectating]
|
|
||||||
You can spectate any living entitiy (including players) while in a Replay. When looking at an entity, a crosshair will be visible.
|
|
||||||
|
|
||||||
By right-clicking, you will start spectating the entity. If you want to stop spectating the entity, use your Sneak Key (`Shift`).
|
|
||||||
|
|
||||||
## Controlling Time [time]
|
|
||||||
### Replay Speed [speed]
|
|
||||||

|
|
||||||
The **Play/Pause button**, **Speed Slider** and **Replay Timeline** hightlighted
|
|
||||||
|
|
||||||
In the upper left corner of you screen, there is a **Play/Pause button** (Shortcut: `P`), using which you can entirely pause the time of the Replay.
|
|
||||||
All Entities, Particles and Block Updates will be frozen until you resume. You can fly through a paused Replay as usual.
|
|
||||||
|
|
||||||
Next to the Play/Pause Button, there is a **Speed Slider**. Using the **Speed Slider**, you can control how fast the time in your Replay passes.
|
|
||||||
The minimum Speed value is **0.1 times** the normal Minecraft Tick Speed, and the maximum Speed is **8 times** as fast.
|
|
||||||
|
|
||||||
### Jumping in Time [travel]
|
|
||||||
To the right of the Speed Slider, there is the **Replay Timeline**.
|
|
||||||
On the Replay Timeline, you see a yellow cursor indicating your current position in the Replay.
|
|
||||||
By clicking somewhere on this Timeline, you will travel in time towards the specified point in time.
|
|
||||||
Please note that it takes longer to do larger steps in time or to jump backwards in time.
|
|
||||||
|
|
||||||
## Camera Paths [paths]
|
|
||||||
### Introduction [intro]
|
|
||||||
While in a Replay, you can create controlled **Camera Movements** using the Mods's **Keyframe System**.
|
|
||||||
Those Camera Paths can be rendered to a video later (see [Rendering](#replaying-render)).
|
|
||||||
|
|
||||||
Camera Paths are inspired by the [PixelCam Mod](http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/2327429-pixelcam-camera-studio-for-minecraft-1-8) which is based on the Camera Studio Mod.
|
|
||||||
|
|
||||||
The **Replay Mod Keyframe System** is similar to many Video Editing Software's Keyframe Systems.
|
|
||||||
If you're new to Keyframe Systems, try reading [this Wikipedia article](https://en.wikipedia.org/wiki/Key_frame).
|
|
||||||
|
|
||||||
### Keyframe Timeline [timeline]
|
|
||||||

|
|
||||||
The **Keyframe Timeline** highlighted
|
|
||||||
|
|
||||||
All of the Keyframes which define a Camera Path are placed on the **Keyframe Timeline**.
|
|
||||||
The Keyframe Timeline is below the [Replay Timeline](#replaying-time-travel).
|
|
||||||
|
|
||||||
The **Keyframe Timeline** is 10 Minutes long, meaning a Camera Path can take up to 10 Minutes.
|
|
||||||
You can zoom in and out on the Keyframe Timeline using the `+` and `-` buttons next to it.
|
|
||||||
|
|
||||||
Other than the **Replay Timeline**, the **Keyframe Timeline**'s time values are not relative to the Replay's point of time, but refer to **real time**.
|
|
||||||
If two Keyframes are 5 seconds apart, the Camera Path will take 5 seconds to interpolate between those Keyframes.
|
|
||||||
|
|
||||||
You can drag Keyframes on the **Keyframe Timeline** by left-clicking them, holding the mouse button and moving your mouse.
|
|
||||||
|
|
||||||
### Position Keyframes [place]
|
|
||||||
The basic components of a Camera Path are **Position Keyframes**.
|
|
||||||
A Position Keyframe stores a **Camera Position** (x, y, z, yaw, pitch, roll).
|
|
||||||
|
|
||||||
You can set a **Position Keyframe** using the "Add Position Keyframe"  button.
|
|
||||||
A **Position Keyframe** initially contains the state the Camera was in when creating the Keyframe.
|
|
||||||
|
|
||||||
On the **Keyframe Timeline**, a **Position Keyframe** will appear at the cursors's current position.
|
|
||||||
This Keyframe is selected automatically, and the **Position Keyframe Button** will turn red.
|
|
||||||
By clicking the **Position Keyframe Button** again, the selected **Position Keyframe** will be removed.
|
|
||||||
|
|
||||||
By adding multiple **Position Keyframes** on the **Keyframe Timeline**, you can create a simple **Camera Path**.
|
|
||||||
Using the [Path Preview](#replaying-paths-place-preview), you can preview your **Camera Path**.
|
|
||||||
|
|
||||||
> **Hint:** By right-clicking a **Position Keyframe** on the **Keyframe Timeline**, you can jump to this Keyframe's Position.
|
|
||||||
|
|
||||||
#### Path Interpolation [interpolation]
|
|
||||||

|
|
||||||
A **Camera Path** using **Cubic Interpolation**
|
|
||||||
|
|
||||||

|
|
||||||
The same **Camera Path** using **Linear Interpolation**
|
|
||||||
|
|
||||||
By default, Camera Paths follow a smooth curve through all of the set **Position Keyframes**.
|
|
||||||
This curve is generated using [Cubic Spline Interpolation](https://en.wikipedia.org/wiki/Spline_interpolation).
|
|
||||||
If you wish to disable smooth interpolation and want to make the Path follow straight lines instead, change the **Path Interpolation Setting** in the **Replay Settings**.
|
|
||||||
|
|
||||||
You can easily toggle between **Linear** and **Cubic Interpolation** using the `O` key.
|
|
||||||
|
|
||||||
#### Path Preview [preview]
|
|
||||||

|
|
||||||
While the **Path Preview** is enabled, this camera symbol is displayed in the lower right corner of the screen.
|
|
||||||
|
|
||||||

|
|
||||||
A normal **Path Preview**
|
|
||||||
|
|
||||||
Using the `H` key, you can toggle a **visual representation** of your Camera Path.
|
|
||||||
If enabled, you will see a **Red Line** in the World following the Camrea Path.
|
|
||||||
|
|
||||||
The [Path Interpolation Setting](#replaying-paths-place-interpolation) is respected in this preview.
|
|
||||||
|
|
||||||
By moving the cursor on the **Keyframe Timeline**, you can see the Camera's current positon and view direction on the **Path Preview**.
|
|
||||||
|
|
||||||
### Time Keyframes [time]
|
|
||||||
**Time Keyframes** can be used to precisely control time travelling during a **Camera Path**.
|
|
||||||
|
|
||||||
> Every Time Keyframe represents a timestamp in the Replay itself.
|
|
||||||
|
|
||||||
You can set a **Time Keyframe** using the "Add Time Keyframe"  button.
|
|
||||||
A **Time Keyframe** initially contains the Replay's point in time when creating the Keyframe.
|
|
||||||
|
|
||||||
When playing the **Camera Path**, the Replay's time will interpolate between the set **Time Keyframes** in the Keyframes' intervals. Two **Time Keyframes** with the same Timestamp will freeze the Replay time for the duration of their interval.
|
|
||||||
|
|
||||||
> **Hint:** By right-clicking a **Time Keyframe** on the **Keyframe Timeline**, you can jump to this Keyframe's Timestamp Value.
|
|
||||||
|
|
||||||
> **Note:** Travelling backwards in time is not supported during **Camera Paths**. Do not add a **Time Keyframe** containing an earlier point in time after another **Time Keyframe**.
|
|
||||||
|
|
||||||
To play your first **Camera Path**, click the **Play Button** next to the **Keyframe Timeline**.
|
|
||||||
By default, the **Camera Path** starts from the Cursor Position on the Keyframe Timeline.
|
|
||||||
By clicking while holding the `Ctrl` key (`Cmd` key on Mac), you can however start from the beginning regardless of the Cursor Position.
|
|
||||||
|
|
||||||
#### Synchronizing Timelines [sync]
|
|
||||||
Using the `V` key, you can **synchronize** the **Keyframe Timeline** with the time that passed since the last **Time Keyframe**'s timestamp.
|
|
||||||
|
|
||||||
This means that pressing `V` moves the **Keyframe Timeline**'s cursor to the position where placing a **Time Keyframe** would result in a **Replay Speed** of the **Speed Slider's current value** between the newly placed and the last **Time Keyframe**.
|
|
||||||
|
|
||||||
If holding `Shift` while synchronizing, it will be synchronized as if the **Speed Slider's value** was **1.0**.
|
|
||||||
|
|
||||||
### Spectator Keyframes [spectator]
|
|
||||||

|
|
||||||
A **Path Preview** with **Spectator Keyframes**
|
|
||||||
|
|
||||||
While [spectating an entity](#replaying-movement-spectating), the "Add Position Keyframe" button becomes an "Add Spectator Keyframe"  button.
|
|
||||||
|
|
||||||
To sucessfully spectate an entity, you always need at least two **Spectator Keyframes** created while spectating the same entity.
|
|
||||||
On the **Keyframe Timeline**, the periods during which you are spectating an entity are marked with a blue line.
|
|
||||||
|
|
||||||
To leave a spectated entity during a camera path, simply add a normal **Position Keyframe**.
|
|
||||||
|
|
||||||
### Editing Keyframes [edit]
|
|
||||||

|
|
||||||
The **Keyframe Editor** for a **Position Keyframe**
|
|
||||||
|
|
||||||
You can edit any Keyframe by **double-clicking** it on the Keyframe Timeline.
|
|
||||||
A new GUI Screen will open which allows you to modify the Keyframe's properties.
|
|
||||||
|
|
||||||
On the lower part of the screen, you can precisely set the Keyframe's position on the **Keyframe Timeline**.
|
|
||||||
Above that, you can modify Keyframe specific settings, for example its Position value.
|
|
||||||
|
|
||||||
### Removing Keyframes [remove]
|
|
||||||
Using the `DELETE` key, you can remove the currently selected Keyframe.
|
|
||||||
Alternatively, while a Keyframe is selected, its connected Button turns red, and clicking it removes the Keyframe as well.
|
|
||||||
|
|
||||||
> **Note:** If you use an Apple Computer with a built-in keyboard, you may need to press `FN + DELETE` instead.
|
|
||||||
|
|
||||||
### Keyframe Repository [repository]
|
|
||||||

|
|
||||||
The **Keyframe Repository** with two **Path Presets**
|
|
||||||
|
|
||||||
[YouTube](IYrzbbIzWPw)
|
|
||||||
|
|
||||||
Using the `X` key, you can open the **Keyframe Repository**. Every Replay File has a separate Keyframe Repository which can contain several **Keyframe Presets**.
|
|
||||||
|
|
||||||
To save the Keyframes currently on your Timeline, click the **"Save as..."** button.
|
|
||||||
You can change a Preset's name, select it from the list and click the **"Rename"** button.
|
|
||||||
To load a Keyframe Preset, select a Preset from the list and click the **"Load"** button.
|
|
||||||
Using the **"Remove"** button, you can permanently delete a Keyframe Preset from the **Keyframe Repository**.
|
|
||||||
|
|
||||||
## Custom Objects [objects]
|
|
||||||
|
|
||||||
> Custom Objects are not available in the 2.0.0 versions. They are expected to return eventually.
|
|
||||||
|
|
||||||
[YouTube](_Xdpg828fbE)
|
|
||||||
|
|
||||||
### Introduction [introduction]
|
|
||||||
**Custom Objects** are mainly meant for **video creators**. They allow you to add any image into the Replay World and animate its Position, Opacity and much more.
|
|
||||||
|
|
||||||
Instead of using [Motion Tracking](https://en.wikipedia.org/wiki/Match_moving) to add text or pictures to a video, you can directly add these to the rendered file.
|
|
||||||
|
|
||||||
### Adding Assets [assets]
|
|
||||||

|
|
||||||
The **Asset Manager** with an example Asset
|
|
||||||
|
|
||||||
In order to create **Custom Objects**, you first have to add **Assets** to your Replay File.
|
|
||||||
Therefore, open the **Asset Manager** using the `G` key.
|
|
||||||
|
|
||||||
In the **Asset Manager**, you can add **Image Files (.png, .jpg and more)**, so-called **Assets**, to the Replay.
|
|
||||||
When clicking the **"Add"** button, a File Chooser will show up. Select the image file you want to use.
|
|
||||||
You can give the Asset a custom name using the Text Input Field in the top right corner.
|
|
||||||
|
|
||||||
All of the Assets you added can be used by **Custom Objects**.
|
|
||||||
|
|
||||||
### Creating Custom Objects [creating]
|
|
||||||

|
|
||||||
The **Object Manager** with some **Animation Keyframes**
|
|
||||||
|
|
||||||
Using the `F` key, you can open the **Object Manager**. Initially there won't be any Objects in the **Object List**, but you can simply add an Object using the **"Add"** button.
|
|
||||||
|
|
||||||
After doing so, you can name the newly created **Custom Object** using the Text Field in the upper right corner.
|
|
||||||
To define which **Asset File** (i.e. image) the **Custom Object** should use, select the desired **Asset** from the dropdown beneath the Name Input.
|
|
||||||
|
|
||||||
If you leave the **Object Manager**, you should see the image in the World somwhere near your position.
|
|
||||||
|
|
||||||
### Animating Custom Objects [animating]
|
|
||||||

|
|
||||||
An animated **Custom Image Object**.
|
|
||||||
|
|
||||||
Of course, you don't want the image to stay at that position.
|
|
||||||
herefore, open the **Object Manager** again and select the **Custom Object** you want to modify.
|
|
||||||
On the lower half of the screen you will see mutliple **Input Fields**, using which you can modify various settings
|
|
||||||
(so-called **Transformations**), for example the Object's **Position**, **Scale**, **Orientation** and **Opacity**.
|
|
||||||
|
|
||||||
When editing these values, you'll notice that on the TImeline to the right, Keyframes appear.
|
|
||||||
You can set and remove Keyframes for specific settings using its "Add Keyframe" button on the very left of the screen.
|
|
||||||
|
|
||||||
The **Object Manager's Keyframe System** is very similar to the **Position Keyframe** and **Time Keyframe** System.
|
|
||||||
|
|
||||||
During a **Camera Path**, the **Custom Objects** will interpolate their **Transformation Values** like **Position Keyframes** are interpolated.
|
|
||||||
While outside the **Object Manager** you can preview the Objects' position by moving the cursor on the **Keyframe Timeline** - the Objects will interpolate to the position they'll be at that timestamp during the **Camera Path**.
|
|
||||||
|
|
||||||
Once you got the hang of it, you'll be able to quickly animate **Custom Objects**.
|
|
||||||
|
|
||||||
## Rendering [render]
|
|
||||||
With the **Replay Mod**, you can render **Camera Paths** to videos **without** using a screen recording tool like Fraps.
|
|
||||||
To get started, first [set up your Camera Path](#replaying-paths) as described in the previous chapters.
|
|
||||||
Then, press the **"Render Camera Path"** button in the upper left corner.
|
|
||||||
|
|
||||||
### Rendering Method [method]
|
|
||||||
The **Replay Mod** does not only allow you to render "normal" vidoes as you see them on YouTube everyday,
|
|
||||||
you can also render **360 degree videos**, **3D videos** and more.
|
|
||||||
To change the rendering method, use the dropdown on the upper half of the **Render Settings Screen**.
|
|
||||||
|
|
||||||
#### Default Rendering [default]
|
|
||||||

|
|
||||||
A frame exported using **Default Rendering**
|
|
||||||
|
|
||||||
Renders the video in the specified resolution. Fastest Rendering Option.
|
|
||||||
|
|
||||||
#### Stereoscopic Rendering [stereoscopic]
|
|
||||||

|
|
||||||
A frame exported using **Stereoscopic Rendering**
|
|
||||||
|
|
||||||
Renders the video as a [stereoscopic](https://en.wikipedia.org/wiki/Stereoscopy) (side-by-side) 3D move, usable by different 3D technologies. The image for one eye is half the width of the video.
|
|
||||||
|
|
||||||
#### Cubic Rendering [cubic]
|
|
||||||

|
|
||||||
A frame exported using **Cubic Rendering**
|
|
||||||
|
|
||||||
Renders the video with a **360 degree panoramic view**, using [Cubic Projection](http://wiki.panotools.org/Cubic_Projection).
|
|
||||||
This is usable by several 360 degree video players (and the **Oculus Rift**), for example [VR Player](https://vrplayer.codeplex.com/).
|
|
||||||
While **Cubic Videos** can't be used for **YouTube 360° Videos**, it takes less time to render them, so if your player
|
|
||||||
is compatible with **Cubic Projection** anyway, you can use this setting.
|
|
||||||
|
|
||||||
#### Equirectangular Rendering [equirectangular]
|
|
||||||

|
|
||||||
A frame exported using **Equirectangular Rendering**
|
|
||||||
|
|
||||||
Renders the video with a 360 degree panoramic view, using [Equirectangular Projection](http://wiki.panotools.org/Equirectangular_Projection).
|
|
||||||
This is usable by [YouTube's new 360 degree video function](https://support.google.com/youtube/answer/6178631?hl=en), and several video players (and the **Oculus Rift**), for example [VR Player](https://vrplayer.codeplex.com/).
|
|
||||||
|
|
||||||
> **Note:** In order for **YouTube** to recognize 360 Degree Videos, you have to inject some Metadata. Follow [this guide](https://support.google.com/youtube/answer/6178631?hl=en) for a tutorial.
|
|
||||||
|
|
||||||
### Video Settings [settings]
|
|
||||||

|
|
||||||
The **Video Render Settings** Screen
|
|
||||||
|
|
||||||
After you chose the **Rendering Mode** you want to use, you can further customize the rendered video.
|
|
||||||
|
|
||||||
#### Video Resolution [resolution]
|
|
||||||
Below the **Render Method** Dropdown, you can enter the desired **Video Resolution** (Width * Height).
|
|
||||||
You can enter any resolution there, but make sure to use reasonable values.
|
|
||||||
|
|
||||||
Common Video Resolutions for **Default Rendering** are:
|
|
||||||
|
|
||||||
- 720p - 1280 * 720
|
|
||||||
- 1080p - 1920 * 1080
|
|
||||||
- 4k - 3840 * 2160
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
When using **Stereoscopic Rendering**, please note that the entered **Width** value is the final video's width.
|
|
||||||
Because **Stereoscopic Videos** have two frames next to each other, you therefore need to **double** the video width,
|
|
||||||
so if you want a **Full HD Stereoscopic Video**, you have to enter **3840 * 1080**.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
Videos in **Equirectangular Projection** always need to have an **Aspect Ratio** of **2:1**.
|
|
||||||
|
|
||||||
Please note that you should generally use a high resolution when exporting **Equirectangular Videos**, as the Video will be mapped onto a spherical surface in the Viewer you're using. To get a decent looking video, we recommend a resolution of **4320 * 2160**.
|
|
||||||
|
|
||||||
> **Note:** If you're re-rendering Equirectangular footage (e.g. using a video editing software like Premiere), make sure to export it at a **2:1** aspect ratio - otherwise it will look strange in 360 degrees.
|
|
||||||
|
|
||||||
#### Video Framerate [framerate]
|
|
||||||
|
|
||||||
#### Video Encoding and Quality [quality]
|
|
||||||

|
|
||||||
A comparison between the quality of the **MP4 Hight, Default and Potato** Quality Presets.
|
|
||||||
|
|
||||||
Below the **Render Method Dropdown**, there is another Dropdown Menu for **Encoding Presets**.
|
|
||||||
|
|
||||||
> **Note:** If you simply want to render an MP4 video in good quality, don't change these settings.
|
|
||||||
|
|
||||||
There are **7 Encoding Presets** you can choose from:
|
|
||||||
|
|
||||||
- **MP4 - Default Quality**
|
|
||||||
Renders an **MP4 video** encoded with the **x264 codec** in **Default Quality**.
|
|
||||||
This is default Encoding Preset, as it exports a video with good quality and a relativly low file size.
|
|
||||||
- **MP4 - High Quality**
|
|
||||||
Renders an **MP4 video** encoded with the **x264 codec** in **High Quality**.
|
|
||||||
Rendered videos have a relatively high file size, but their quality is almost lossless. This is useful for video producers who have to encode (render) their footage several times.
|
|
||||||
- **MP4 - Potato Quality**
|
|
||||||
Renders an **MP4 video** encoded with the **x264 codec** in **Very Low Quality**.
|
|
||||||
While the video itself looks really bad, the file size is tiny and therefore this preset can be used for test renders.
|
|
||||||
- **MP4 - Custom Bitrate**
|
|
||||||
If this Preset is chosen, the **Bitrate Input Field** gets enabled and you can define the video's bitrate yourself.
|
|
||||||
The rendered video is an **MP4 video** encoded with the **x264 codec**.
|
|
||||||
- **WEBM - Custom Bitrate**
|
|
||||||
If this Preset is chosen, the **Bitrate Input Field** gets enabled and you can define the video's bitrate yourself.
|
|
||||||
The rendered video is a **webm video** encoded with the **vp8 codec**.
|
|
||||||
**webm video files** are useful if you want to upload footage directly to streaming services like YouTube,
|
|
||||||
as they usually don't have to convert **vp8-encoded videos** when processing them.
|
|
||||||
- **MKV - Lossless**
|
|
||||||
Renders an **MKV video** encoded with the **x264 codec** in **Lossless Quality**.
|
|
||||||
While these video files are of perfect quality, most **non-FFmpeg-based video players and video editing software** (e.g. QuickTime Player, Sony Vegas and Adobe Premiere) can't play these videos. Therefore, you should instead use the **MP4 - High Quality** preset in most cases.
|
|
||||||
- **PNG Sequence**
|
|
||||||
Exports the sequence as individual frames in the **PNG Format**.
|
|
||||||
**Warning:** This can create a huge amount of files, so make sure to save them in a separate folder.
|
|
||||||
|
|
||||||
### Advanced Settings [advanced]
|
|
||||||

|
|
||||||
The **Advanced Render Settings**
|
|
||||||
|
|
||||||
#### Render Nametags [nametags]
|
|
||||||
If you don't want to see Entity's Nametags in the rendered video, simply un-tick the checkbox. Hidden Nametags also include Nametags of **Armor Stands** and **Mobs**, **not only Players**!
|
|
||||||
|
|
||||||
#### Stabilize Camera [stabilize]
|
|
||||||
This setting is only applicable for **Cubic Rendering** and **Equirectangular Rendering**.
|
|
||||||
Because you can rotate the camera in **360 degree viewers**, a tilted camera persepctive leads to a strange user experience:
|
|
||||||
If the user looks around, his view might appear to be tilted because the camera looked up or down.
|
|
||||||
Therefore, it is recommended to **always stabilize the camera's Pitch and Roll** using the repsective checkboxes.
|
|
||||||
|
|
||||||
[Example 360° video **without stabilized Camera Pitch**](https://www.youtube.com/watch?v=lHGSG-0CVZw)
|
|
||||||
[Example 360° video **with stabilized Camera Pitch and Roll**](https://www.youtube.com/watch?v=mtBehojUotQ)
|
|
||||||
|
|
||||||
#### Chroma Keying [chroma]
|
|
||||||

|
|
||||||
A screenshot of a video rendered with a **Red Chroma Key Setting**
|
|
||||||
|
|
||||||
This is an experimental setting for video producers which allows you to change the sky color to a fixed color.
|
|
||||||
Using a **Video Editing Software** like **Adobe After Effects** or **Sony Vegas**, you can change the sky color to transparency and add your own footage as sky. Read more about **Chroma Keying** [here](https://en.wikipedia.org/wiki/Chroma_key).
|
|
||||||
|
|
||||||
> **Note:** For best results, you should **disable clouds** before rendering, as they are transparent.
|
|
||||||
|
|
||||||
### Command Line Settings [commandline]
|
|
||||||

|
|
||||||
The **Command Line Render Settings**
|
|
||||||
|
|
||||||
|
|
||||||
> **Note**: This is for advanced users only. If you do not know what your're doing, leave these settings as they are.
|
|
||||||
|
|
||||||
The **Replay Mod** runs [FFmpeg](http://ffmpeg.org/) via the **Command Line** to encode videos.
|
|
||||||
|
|
||||||
You can customize both the **executed Command** and the **Command Line Arguments** in the **Command Line Settings** part of the **Render Settings Screen**.
|
|
||||||
|
|
||||||
#### Custom Command [command]
|
|
||||||
If you leave the left input field blank, `ffmpeg` will be used as **command**. If you haven't set your **PATH variable** to link to your FFmpeg distribution, simply enter the full path to your FFmpeg executable (e.g. `C:/ffmpeg/ffmpeg.exe` or `/usr/local/bin/ffmpeg`).
|
|
||||||
|
|
||||||
#### Command Line Arguments [arguments]
|
|
||||||
In the right input field, you can input custom **Command Line Arguments** to be used in the console.
|
|
||||||
|
|
||||||
Each of the **Encoding Presets** basically represents a set of **Command Line Arugments** which are used with the **ffmpeg Command**.
|
|
||||||
Customizing these **Command Line Arguments** allows you to use a specific codec or quality setting and much more.
|
|
||||||
If you need an introduction to **ffmpeg Command Line Arguments**, read the [FFmpeg documentation](http://ffmpeg.org/ffmpeg.html).
|
|
||||||
|
|
||||||
Before passing the given **Command Line Arguments** to the **ffmpeg Command**, the **Replay Mod** replaces the following placeholders with your inputs in the **Render Settings Screen**:
|
|
||||||
- **%WIDTH%**
|
|
||||||
The video's width
|
|
||||||
- **%HEIGHT%**
|
|
||||||
The video's height
|
|
||||||
- **%FPS%**
|
|
||||||
The video's framerate
|
|
||||||
- **%FILENAME%**
|
|
||||||
The video's filename **without the extension**. This should be surrounded with quotation marks `"`, as the filename might contain spaces.
|
|
||||||
As the **ffmpeg Command** is always executed from the target file's parent directory, %FILENAME% does **not** contain the file's full path.
|
|
||||||
- **%BITRATE%**
|
|
||||||
The video's bitrate in **kilobytes per second**. As the %BITRATE% placeholder already contains the **value identifier "K"**,
|
|
||||||
you don't have to take care of the bitrate value's format.
|
|
||||||
|
|
||||||
### Rendering Performance [performance]
|
|
||||||

|
|
||||||
The Screen which is displayed while a video is being rendered
|
|
||||||
|
|
||||||
By clicking the **Render Button** in the lower right corner, you start **Default Performance Rendering**. Usually, this is perfectly satisfying regarding rendering speed, but you can increase it slightly using **High Performance Rendering**.
|
|
||||||
|
|
||||||
To use **High Performance Rendering**, hold down the `Ctrl` key (`Cmd` key on Mac) while clicking the **Render Button**.
|
|
||||||
**High Performance Rendering** has the following changes to improve rendering speed:
|
|
||||||
- Rendering Process, Estimated Time Left and Button Clicks are not recalculated after every rendered frame,
|
|
||||||
but only after one rendered seconds (e.g. every 60 frames when rendering with 60fps)
|
|
||||||
- Resizing the Minecraft Window does not update the Rendering Gui
|
|
||||||
|
|
||||||
### Troubleshooting [troubleshooting]
|
|
||||||
|
|
||||||
> If you have trouble with rendering, please first consult the Documentation before asking for help in the Forums.
|
|
||||||
|
|
||||||
#### No FFmpeg installation found [ffmpeg]
|
|
||||||

|
|
||||||
The error screen that is displayed when no FFmpeg installation could be found
|
|
||||||
|
|
||||||
If the **Replay Mod** tells you to install FFmpeg even though you already have, you have to manually tell the **Replay Mod** where your FFmpeg executable is located.
|
|
||||||
|
|
||||||
First, get the full path to your `ffmpeg.exe` (on Windows) or `ffmpeg` executable (on Mac/Linux).
|
|
||||||
On Windows, this path might look like `C:/ffmpeg/ffmpeg.exe`.
|
|
||||||
|
|
||||||
Then, open the **"Command Line Settings" Tab** in the Render Settings and paste this path into the **left input field** and retry rendering.
|
|
||||||
|
|
||||||
#### Crash while rendering [crash]
|
|
||||||
If Minecraft crashes after a few frames of rendering, it most likely means the **FFmpeg** didn't like the **Command Line Arguments** you passed.
|
|
||||||
If you customized the Command Line Arguments manually, re-check them - it's probably your own fault.
|
|
||||||
|
|
||||||
> **Hint:** In your .minecraft folder, you'll find a file called `export.log` which contains information about FFmpeg's rendering process.
|
|
||||||
|
|
||||||
If you did **not** customize the **Command Line Arguments**, you might have entered some insanely high (or low) values e.g. for Bitrate or Video Resolution. Try again with other, more reasonable values.
|
|
||||||
|
|
||||||
## Ambient Lighting [lighting]
|
|
||||||

|
|
||||||
The same setting, onace with **Ambient Lighting** enabled, once with **Ambient Lighting** disabled
|
|
||||||
|
|
||||||

|
|
||||||
While **Ambient Lighting** is enabled, this eye symbol is displayed in the lower right corner of the screen.
|
|
||||||
|
|
||||||
If you have a Replay in a dark setting (for example at nighttime, or in a cave) and **Brightness: Bright** just isn't bright enough for you, you can toogle **Ambient Lighting** using the `Z` key (`Y` on some keyboards).
|
|
||||||
|
|
||||||
This works as a replacement for the **Night Vision Potion Effect**, without the side effect of a weird sky color.
|
|
||||||
|
|
||||||
## Player Overview [overview]
|
|
||||||

|
|
||||||
The **Player Overview** Screen
|
|
||||||
|
|
||||||
Using the `B` key, you can open the **Player Overview**. In the **Player Overview**, you see a list of all currently loaded **Players** in the Replay.
|
|
||||||
|
|
||||||
By clicking on a player's **Name or Head**, you can **spectate** this player.
|
|
||||||
|
|
||||||
Next to each player, there's a **checkbox** using which you can toggle the player's **visibility**.
|
|
||||||
This way, you can hide certain players from the Replay.
|
|
||||||
Below the individual checkboxes, there are two checkbox buttons - one to **hide all players** and one to **show all players**.
|
|
||||||
|
|
||||||
If you want to **save the player visibility settings**, check **"Remember Hidden Players" checkbox**.
|
|
||||||
If checked, invisible players will stay invisible after closing the Replay (this can of course be reverted),
|
|
||||||
otherwise all of the players are visible again after reloading the Replay.
|
|
||||||
|
|
||||||
## Thumbnails [thumbnail]
|
|
||||||

|
|
||||||
The **Default Thumbnail** which is used if no Thumbnail was created
|
|
||||||
|
|
||||||
While in a Replay, you can use the `N` key to create a **Thumbnail** of the current Replay.
|
|
||||||
A **Thumbnail** is a Screenshot which should give the viewer a good impression of your Replay's content.
|
|
||||||
|
|
||||||
**Thumbnails** are important when uploading a Replay to the **Replay Center**,
|
|
||||||
as other users are much more likely to download your Replay if they can see a preview of it.
|
|
||||||
They also help keeping your **Replay Viewer** clear and structured.
|
|
||||||
|
|
||||||
If no **Thumbnail** is set for a Replay, the **Default Thumbnail** will be displayed in the **Replay Viewer** and in the **Replay Center**.
|
|
||||||
|
|
||||||
## Event Markers [markers]
|
|
||||||

|
|
||||||
The **Replay Timeline** with several **Event Markers**
|
|
||||||
|
|
||||||
Long Replays easily get really clunky and difficult to handle.
|
|
||||||
Therefore, **Event Markers** are a simple way to mark important events in your Replay.
|
|
||||||
|
|
||||||
While [recording a Replay](#recording), you can press the `M` key anytime to set an **Event Marker**.
|
|
||||||
This **Event Marker** remembers the **Position** where you've added it and will later,
|
|
||||||
while watching a Replay, be displayed on the **Replay Timeline**.
|
|
||||||
|
|
||||||
While viewing a Replay, you can jump to an **Event Marker**'s Position and Timestamp by right-clicking it on the **Replay Timeline**.
|
|
||||||
|
|
||||||
You can also add new **Event Markers** while viewing a Replay using the `M` key as well.
|
|
||||||
|
|
||||||
You can name **Event Markers** by double-clicking them.
|
|
||||||
When hovering over the **Event Marker**, its name is displayed.
|
|
||||||
This way, it's even simpler to add structure to your Replays.
|
|
||||||
|
|
||||||
You can **delete an Event Marker** by clicking it once to select it and then pressing the `DELETE` key.
|
|
||||||
|
|
||||||
# Replay Center [center]
|
|
||||||
The **Replay Center** is where you can **share** your **Minecraft Moments** with others and discover awesome **Replays by other Users**.
|
|
||||||
To be able to use the **Replay Center**, you need an **account on ReplayMod.com**.
|
|
||||||
|
|
||||||
## Authentication [auth]
|
|
||||||

|
|
||||||
The **Login Screen** which is displayed upon startup
|
|
||||||
|
|
||||||

|
|
||||||
The **Register Screen**
|
|
||||||
|
|
||||||
When starting Minecraft with the **Replay Mod** installed, you will be asked to login to **ReplayMod.com**.
|
|
||||||
If you don't want to use the **Replay Center**, you can click the **"Skip" Button** to continue without logging in.
|
|
||||||
|
|
||||||
If you want to browse other users' **Replays** and **share your own Replays** however, you need to **Register an account**.
|
|
||||||
|
|
||||||
> **Note:** By registering an Account on **ReplayMod.com**, you agree to the Website's [Terms of Service](https://www.replaymod.com/legal/terms)
|
|
||||||
|
|
||||||
Please note that you can only create **one ReplayMod.com Account per Minecraft Account**, so choose your username wisely.
|
|
||||||
|
|
||||||
Once you've registered, you're automatically going to be logged in. The Mod **remembers your login** until you manually log out from the **Replay Center**, so it won't ask you upon every startup if you logged in once.
|
|
||||||
|
|
||||||
## Replay Files [files]
|
|
||||||

|
|
||||||
The **Replay Center** in the Mod
|
|
||||||
|
|
||||||
Once you've logged in, you can use the **"Replay Center" Button** in the Main Menu to access the **Replay Center**.
|
|
||||||
|
|
||||||
In the upper half of the screen, there are **5 Buttons** for **5 Tabs** of the **Replay Center**:
|
|
||||||
- **Recent**
|
|
||||||
Shows the most recently uploaded Replays in the **Replay Center**
|
|
||||||
- **Best**
|
|
||||||
Shows the Replays with the **best rating and most downloads**
|
|
||||||
- **Downloaded**
|
|
||||||
Shows all of the Replays you've downloaded locally
|
|
||||||
- **Favorited**
|
|
||||||
Shows all of the Replays you favorited
|
|
||||||
- **Search**
|
|
||||||
Allows you to search for specific Replays
|
|
||||||
|
|
||||||
When you've found an insteresting looking Replay, you can download it using the **"Download" Button** in the lower left corner.
|
|
||||||
After downloading, you'll automatically join the Replay.
|
|
||||||
|
|
||||||
After you've downloaded a Replay, you can rate and favorite it in the **Replay Center** using the respective buttons.
|
|
||||||
|
|
||||||
> You are encouraged to rate Replays after you downloaded them to help promoting the best Replays.
|
|
||||||
|
|
||||||
## Upload Replays [upload]
|
|
||||||

|
|
||||||
The **Replay Upload Screen**
|
|
||||||
|
|
||||||
You can share your own **Replay Files** with other users in the **Replay Center**.
|
|
||||||
Therefore, click the **"Upload" Button** in the **Replay Viewer** after selecting a Replay.
|
|
||||||
|
|
||||||
In the **Replay Upload Screen** there are **6 input fields**:
|
|
||||||
- **Replay Name**
|
|
||||||
The Replay's Name in the Replay Center
|
|
||||||
- **Replay Description**
|
|
||||||
A description of what happens in the Replay. Try to give the user a good impression why your Replay is worth downloading.
|
|
||||||
- **Category**
|
|
||||||
The Replay's Category, one of the following: **Survival**, **Build**, **Minigame**, **Miscellaneous**. If none of the other categories fit, use **Miscellaneous**.
|
|
||||||
- **Tags**
|
|
||||||
One or more tags that fit your replay, spearated by comma. **Example tags:** pvp,battle,redstone,creative
|
|
||||||
- **Hide Server IP**
|
|
||||||
If you've recorded a Replay on a private Server, you can remove the Server IP by checking the respective checkbox.
|
|
||||||
- **Thumbnail**
|
|
||||||
While you can't directly edit the Thumbnail when uploading, it is highly recommended that
|
|
||||||
you [create a Thumbnail](#replaying-thumbnail) before sharing your Replay.
|
|
||||||
Replays without a Thumbnail are much less likely to be downloaded by other users.
|
|
||||||
|
|
||||||
When uploading a Replay File, make sure to follow the [Replay Center Rules](https://www.replaymod.com/rules).
|
|
||||||
|
|
||||||
# Frequently Asked Questions [faq]
|
|
||||||
|
|
||||||
### Do I need a ReplayMod.com Account to use the mod?
|
|
||||||
You only need a ReplayMod.com Account to access the [Replay Center](#center).
|
|
||||||
All of the other features are also available offline.
|
|
||||||
|
|
||||||
### For how long can I record?
|
|
||||||
Theoretically, a Replay File can be up to **24 days, 20 hours, 30 minutes and 23 seconds** long - which is a timespan you'll probably never reach.
|
|
||||||
|
|
||||||
### How many chunks around me does the Mod record?
|
|
||||||
If you're playing in **Singleplayer**, all of the loaded chunks within your **Render Distance** are recorded.
|
|
||||||
If you're on a server, this depends on the **view-distance** setting in the **server.properties** file, which is set to **11 Chunks** by default.
|
|
||||||
|
|
||||||
The Replay Mod of course records every **loaded**, not only the **rendered** chunks. Therefore, chunks behind your back are recorded as well.
|
|
||||||
|
|
||||||
### Why can't I start recording in the middle of a session?
|
|
||||||
Due to the way the **Replay Mod** works, you need to start recording when joining a **Server** or **World** - otherwise some data which the **Replay Files** need is missing.
|
|
||||||
|
|
||||||
### How does recording affect my FPS?
|
|
||||||
Usually, recording a Replay does **_not_** affect your framerate, and it also doesn't lead to lag on servers.
|
|
||||||
We've tested the Mod on a low-end notebook with only **3GB of ram**, and everything worked fine.
|
|
||||||
|
|
||||||
### How big are the files the Replay Mod records?
|
|
||||||
The file size of the recorded **.mcpr files** greatly depends on the amount of world data the replay contains.
|
|
||||||
A Replay in which you travelled around and discovered a lot of terrain is significantly larger than a Replay which was recorded in a void world.
|
|
||||||
|
|
||||||
An average Replay File of **10 Minutes duration** usually is between **2MB and 10MB large**.
|
|
||||||
Replays recorded on **Minigame Servers** with lots of particle effects and world changes might be larger.
|
|
||||||
|
Before Width: | Height: | Size: 98 KiB |
|
Before Width: | Height: | Size: 208 KiB |
|
Before Width: | Height: | Size: 74 KiB |
|
Before Width: | Height: | Size: 155 KiB |
|
Before Width: | Height: | Size: 88 KiB |
|
Before Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 96 KiB |
|
Before Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 160 KiB |
|
Before Width: | Height: | Size: 151 KiB |
|
Before Width: | Height: | Size: 590 KiB |
|
Before Width: | Height: | Size: 528 KiB |
|
Before Width: | Height: | Size: 12 MiB |
|
Before Width: | Height: | Size: 8.0 MiB |
|
Before Width: | Height: | Size: 4.0 KiB |
|
Before Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 459 B |
|
Before Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 6.4 KiB |
|
Before Width: | Height: | Size: 82 KiB |
|
Before Width: | Height: | Size: 181 KiB |
|
Before Width: | Height: | Size: 50 KiB |
|
Before Width: | Height: | Size: 147 KiB |
|
Before Width: | Height: | Size: 49 KiB |
|
Before Width: | Height: | Size: 52 KiB |
|
Before Width: | Height: | Size: 12 MiB |
|
Before Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 9.9 KiB |
|
Before Width: | Height: | Size: 100 KiB |
|
Before Width: | Height: | Size: 148 KiB |
|
Before Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 573 B |
|
Before Width: | Height: | Size: 186 KiB |
|
Before Width: | Height: | Size: 448 KiB |
|
Before Width: | Height: | Size: 149 KiB |
|
Before Width: | Height: | Size: 430 KiB |
|
Before Width: | Height: | Size: 51 KiB |
|
Before Width: | Height: | Size: 101 KiB |
|
Before Width: | Height: | Size: 318 B |
|
Before Width: | Height: | Size: 1.2 MiB |
|
Before Width: | Height: | Size: 3.3 MiB |
|
Before Width: | Height: | Size: 48 KiB |
|
Before Width: | Height: | Size: 54 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 459 KiB |
|
Before Width: | Height: | Size: 610 KiB |
|
Before Width: | Height: | Size: 893 KiB |
|
Before Width: | Height: | Size: 1.2 MiB |
|
Before Width: | Height: | Size: 932 KiB |
|
Before Width: | Height: | Size: 1.1 MiB |
|
Before Width: | Height: | Size: 1.7 MiB |
|
Before Width: | Height: | Size: 2.0 MiB |
|
Before Width: | Height: | Size: 124 KiB |
|
Before Width: | Height: | Size: 136 KiB |
|
Before Width: | Height: | Size: 85 KiB |
|
Before Width: | Height: | Size: 147 KiB |
|
Before Width: | Height: | Size: 108 KiB |
|
Before Width: | Height: | Size: 150 KiB |
|
Before Width: | Height: | Size: 110 KiB |
|
Before Width: | Height: | Size: 140 KiB |
|
Before Width: | Height: | Size: 122 KiB |
|
Before Width: | Height: | Size: 73 KiB |
|
Before Width: | Height: | Size: 94 KiB |
|
Before Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 110 KiB |
|
Before Width: | Height: | Size: 75 KiB |
|
Before Width: | Height: | Size: 318 B |
|
Before Width: | Height: | Size: 321 B |
@@ -1,13 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "replaymod-docs",
|
|
||||||
"version": "0.0.0",
|
|
||||||
"description": "",
|
|
||||||
"main": "convert.js",
|
|
||||||
"author": "Jonas Herzig <me@johni0702.de>",
|
|
||||||
"license": "GPLv3",
|
|
||||||
"dependencies": {
|
|
||||||
"md-jml": "~2.0.1",
|
|
||||||
"array-findindex-polyfill": "~0.1.0",
|
|
||||||
"string.prototype.endswith": "~0.2.0"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html xmlns="http://www.w3.org/1999/html" lang="en">
|
|
||||||
<head>
|
|
||||||
<title>Minecraft Replay Mod - Documentation</title>
|
|
||||||
|
|
||||||
<meta content="text/html; charset=utf-8" http-equiv="content-type">
|
|
||||||
|
|
||||||
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet" type="text/css">
|
|
||||||
<meta name="theme-color" content="#ffffff">
|
|
||||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootswatch/3.3.5/darkly/bootstrap.min.css">
|
|
||||||
<link rel="stylesheet" href="https://www.replaymod.com/css/replaymod.css">
|
|
||||||
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
|
|
||||||
<script type="text/javascript" src="https://netdna.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
|
|
||||||
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery-mousewheel/3.1.12/jquery.mousewheel.min.js"></script>
|
|
||||||
<script type="text/javascript" src="https://cdn.jsdelivr.net/jquery.validation/1.14.0/jquery.validate.min.js"></script>
|
|
||||||
<link href="https://www.replaymod.com/css/lightbox.css" rel="stylesheet">
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div>
|
|
||||||
<div class="container">
|
|
||||||
<div class="panel panel-default">
|
|
||||||
<div class="panel-body">
|
|
||||||
{{index}}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{{content}}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<script src="https://www.replaymod.com/js/lightbox.min.js"></script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
2
jGui
@@ -1,30 +0,0 @@
|
|||||||
import org.apache.commons.io.FileUtils;
|
|
||||||
|
|
||||||
import java.io.File;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Entry point for running integration tests from within the IDE.
|
|
||||||
* This is <b>not</b> called when running integration tests directly from gradle.
|
|
||||||
*/
|
|
||||||
public class IntegrationTest {
|
|
||||||
public static void main(String[] args) throws Throwable {
|
|
||||||
// Prevent MC from grabbing our mouse during the test (it's not needed)
|
|
||||||
System.setProperty("fml.noGrab", "true");
|
|
||||||
|
|
||||||
// Make sure the test folder exists and is fresh
|
|
||||||
File gameDir = new File(System.getProperty("user.dir"), "integration-test");
|
|
||||||
if (gameDir.exists()) {
|
|
||||||
FileUtils.forceDelete(gameDir);
|
|
||||||
}
|
|
||||||
FileUtils.forceMkdir(gameDir);
|
|
||||||
|
|
||||||
// Set game dir to test folder and call regular entry point
|
|
||||||
List<String> argsList = new ArrayList<>(Arrays.asList(args));
|
|
||||||
argsList.add("--gameDir");
|
|
||||||
argsList.add(gameDir.getCanonicalPath());
|
|
||||||
GradleStart.main(argsList.toArray(new String[argsList.size()]));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,342 +0,0 @@
|
|||||||
package com.replaymod.core;
|
|
||||||
|
|
||||||
import com.google.common.collect.Iterables;
|
|
||||||
import com.google.common.util.concurrent.ListenableFuture;
|
|
||||||
import com.google.common.util.concurrent.SettableFuture;
|
|
||||||
import de.johni0702.minecraft.gui.container.AbstractGuiOverlay;
|
|
||||||
import de.johni0702.minecraft.gui.container.AbstractGuiScreen;
|
|
||||||
import de.johni0702.minecraft.gui.container.GuiContainer;
|
|
||||||
import de.johni0702.minecraft.gui.container.GuiOverlay;
|
|
||||||
import de.johni0702.minecraft.gui.container.GuiScreen;
|
|
||||||
import de.johni0702.minecraft.gui.element.GuiButton;
|
|
||||||
import de.johni0702.minecraft.gui.element.GuiElement;
|
|
||||||
import de.johni0702.minecraft.gui.element.GuiTexturedButton;
|
|
||||||
import de.johni0702.minecraft.gui.popup.AbstractGuiPopup;
|
|
||||||
import de.johni0702.minecraft.gui.utils.Consumer;
|
|
||||||
import net.minecraft.client.Minecraft;
|
|
||||||
import net.minecraft.client.settings.KeyBinding;
|
|
||||||
import net.minecraftforge.common.MinecraftForge;
|
|
||||||
import net.minecraftforge.fml.common.FMLCommonHandler;
|
|
||||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
|
||||||
import net.minecraftforge.fml.common.gameevent.TickEvent;
|
|
||||||
import org.lwjgl.input.Keyboard;
|
|
||||||
|
|
||||||
import java.lang.reflect.Field;
|
|
||||||
import java.lang.reflect.InvocationTargetException;
|
|
||||||
import java.lang.reflect.Method;
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.NoSuchElementException;
|
|
||||||
import java.util.concurrent.TimeoutException;
|
|
||||||
|
|
||||||
import static com.replaymod.core.ReplayModIntegrationTest.LOGGER;
|
|
||||||
import static com.replaymod.core.utils.Utils.addCallback;
|
|
||||||
|
|
||||||
public abstract class AbstractTask implements Task {
|
|
||||||
public static Task create(Consumer<AbstractTask> init) {
|
|
||||||
return new AbstractTask() {
|
|
||||||
@Override
|
|
||||||
protected void init() {
|
|
||||||
init.consume(this);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
public static final Minecraft mc = Minecraft.getMinecraft();
|
|
||||||
public final ReplayMod core = ReplayMod.instance;
|
|
||||||
public SettableFuture<Void> future;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public ListenableFuture<Void> execute() {
|
|
||||||
future = SettableFuture.create();
|
|
||||||
|
|
||||||
FMLCommonHandler.instance().bus().register(this);
|
|
||||||
MinecraftForge.EVENT_BUS.register(this);
|
|
||||||
addCallback(future, success -> {
|
|
||||||
FMLCommonHandler.instance().bus().unregister(this);
|
|
||||||
MinecraftForge.EVENT_BUS.unregister(this);
|
|
||||||
}, error -> {});
|
|
||||||
|
|
||||||
init();
|
|
||||||
|
|
||||||
return future;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected void init() {}
|
|
||||||
|
|
||||||
protected void runLater(Runnable runnable) {
|
|
||||||
core.runLater(() -> {
|
|
||||||
try {
|
|
||||||
runnable.run();
|
|
||||||
} catch (Throwable t) {
|
|
||||||
future.setException(t);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
public void expectGuiClosed(Runnable onClosed) {
|
|
||||||
expectGuiClosed0(10, onClosed);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void expectGuiClosed(int timeout, Runnable onClosed) {
|
|
||||||
expectGuiClosed0(timeout, onClosed);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void expectGuiClosed0(int timeout, Runnable onClosed) {
|
|
||||||
StackTraceElement[] stackTrace = Thread.currentThread().getStackTrace();
|
|
||||||
class EventHandler {
|
|
||||||
final net.minecraft.client.gui.GuiScreen currentScreen = mc.currentScreen;
|
|
||||||
int framesPassed;
|
|
||||||
|
|
||||||
@SubscribeEvent
|
|
||||||
public void onGuiOpen(TickEvent.RenderTickEvent event) {
|
|
||||||
if (event.phase != TickEvent.Phase.START) return;
|
|
||||||
if (currentScreen != mc.currentScreen) {
|
|
||||||
FMLCommonHandler.instance().bus().unregister(this);
|
|
||||||
onClosed.run();
|
|
||||||
} else {
|
|
||||||
if (framesPassed < timeout) {
|
|
||||||
framesPassed++;
|
|
||||||
} else {
|
|
||||||
Object gui = (gui = GuiScreen.from(currentScreen)) == null ? currentScreen : gui;
|
|
||||||
Exception e = new TimeoutException("Timeout while waiting for " + gui + " to be closed.");
|
|
||||||
e.setStackTrace(Arrays.copyOfRange(stackTrace, 3, stackTrace.length));
|
|
||||||
future.setException(e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
FMLCommonHandler.instance().bus().register(new EventHandler());
|
|
||||||
}
|
|
||||||
|
|
||||||
public void expectPopupClosed(Runnable onClosed) {
|
|
||||||
expectPopupClosed0(10, onClosed);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void expectPopupClosed(int timeout, Runnable onClosed) {
|
|
||||||
expectPopupClosed0(timeout, onClosed);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void expectPopupClosed0(int timeout, Runnable onClosed) {
|
|
||||||
StackTraceElement[] stackTrace = Thread.currentThread().getStackTrace();
|
|
||||||
AbstractGuiPopup popup = getPopup(mc.currentScreen);
|
|
||||||
if (popup == null) {
|
|
||||||
throw new IllegalStateException("No popup found.");
|
|
||||||
}
|
|
||||||
class EventHandler {
|
|
||||||
int framesPassed;
|
|
||||||
|
|
||||||
@SubscribeEvent
|
|
||||||
public void onGuiOpen(TickEvent.RenderTickEvent event) {
|
|
||||||
if (event.phase != TickEvent.Phase.START) return;
|
|
||||||
if (getPopup(mc.currentScreen) != popup) {
|
|
||||||
FMLCommonHandler.instance().bus().unregister(this);
|
|
||||||
onClosed.run();
|
|
||||||
} else {
|
|
||||||
if (framesPassed < timeout) {
|
|
||||||
framesPassed++;
|
|
||||||
} else {
|
|
||||||
Exception e = new TimeoutException("Timeout while waiting for " + popup + " to be closed.");
|
|
||||||
e.setStackTrace(Arrays.copyOfRange(stackTrace, 3, stackTrace.length));
|
|
||||||
future.setException(e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
FMLCommonHandler.instance().bus().register(new EventHandler());
|
|
||||||
}
|
|
||||||
|
|
||||||
private AbstractGuiPopup getPopup(net.minecraft.client.gui.GuiScreen minecraft) {
|
|
||||||
GuiContainer<?> container = GuiOverlay.from(minecraft);
|
|
||||||
if (container == null) {
|
|
||||||
container = GuiScreen.from(minecraft);
|
|
||||||
}
|
|
||||||
if (container != null) {
|
|
||||||
while (container.getContainer() != null) {
|
|
||||||
container = container.getContainer();
|
|
||||||
}
|
|
||||||
GuiElement popup = Iterables.getLast(container.getChildren());
|
|
||||||
if (popup instanceof AbstractGuiPopup) {
|
|
||||||
return (AbstractGuiPopup) popup;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
public <T> void expectGui(Class<T> guiClass, Consumer<T> onOpen) {
|
|
||||||
StackTraceElement[] stackTrace = Thread.currentThread().getStackTrace();
|
|
||||||
class EventHandler {
|
|
||||||
net.minecraft.client.gui.GuiScreen currentScreen;
|
|
||||||
int framesPassed;
|
|
||||||
|
|
||||||
@SubscribeEvent
|
|
||||||
public void onGuiOpen(TickEvent.RenderTickEvent event) {
|
|
||||||
if (event.phase != TickEvent.Phase.START) return;
|
|
||||||
if (currentScreen != mc.currentScreen) {
|
|
||||||
currentScreen = mc.currentScreen;
|
|
||||||
framesPassed = 0;
|
|
||||||
}
|
|
||||||
if (framesPassed < 10) {
|
|
||||||
framesPassed++;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
FMLCommonHandler.instance().bus().unregister(this);
|
|
||||||
|
|
||||||
Object foundGui = null;
|
|
||||||
if (AbstractGuiScreen.class.isAssignableFrom(guiClass)) {
|
|
||||||
AbstractGuiScreen guiScreen = GuiScreen.from(currentScreen);
|
|
||||||
if (guiClass.isInstance(guiScreen)) {
|
|
||||||
onOpen.consume(guiClass.cast(guiScreen));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
foundGui = guiScreen;
|
|
||||||
} else if (AbstractGuiOverlay.class.isAssignableFrom(guiClass)) {
|
|
||||||
AbstractGuiOverlay guiScreen = GuiOverlay.from(currentScreen);
|
|
||||||
if (guiClass.isInstance(guiScreen)) {
|
|
||||||
onOpen.consume(guiClass.cast(guiScreen));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
foundGui = guiScreen;
|
|
||||||
} else if (AbstractGuiPopup.class.isAssignableFrom(guiClass)) {
|
|
||||||
AbstractGuiPopup popup = getPopup(currentScreen);
|
|
||||||
if (guiClass.isInstance(popup)) {
|
|
||||||
onOpen.consume(guiClass.cast(popup));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (guiClass.isInstance(currentScreen)) {
|
|
||||||
onOpen.consume(guiClass.cast(currentScreen));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
class UnexpectedGuiException extends Exception {
|
|
||||||
UnexpectedGuiException(Object foundGui) {
|
|
||||||
super("Expected instance of " + guiClass + " but found " + foundGui);
|
|
||||||
setStackTrace(Arrays.copyOfRange(stackTrace, 2, stackTrace.length));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
future.setException(new UnexpectedGuiException(foundGui == null ? currentScreen : foundGui));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
FMLCommonHandler.instance().bus().register(new EventHandler());
|
|
||||||
}
|
|
||||||
|
|
||||||
private void clickNow(int x, int y) {
|
|
||||||
try {
|
|
||||||
Method method = net.minecraft.client.gui.GuiScreen.class
|
|
||||||
.getDeclaredMethod("mouseClicked", int.class, int.class, int.class);
|
|
||||||
method.setAccessible(true);
|
|
||||||
method.invoke(mc.currentScreen, x, y, 0);
|
|
||||||
} catch (NoSuchMethodException | InvocationTargetException | IllegalAccessException e) {
|
|
||||||
future.setException(e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void click(int x, int y) {
|
|
||||||
runLater(() -> {
|
|
||||||
LOGGER.info("Clicking at {}/{}", x, y);
|
|
||||||
clickNow(x, y);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
private void dragNow(int x, int y) {
|
|
||||||
try {
|
|
||||||
Method method = net.minecraft.client.gui.GuiScreen.class
|
|
||||||
.getDeclaredMethod("mouseClickMove", int.class, int.class, int.class, long.class);
|
|
||||||
method.setAccessible(true);
|
|
||||||
method.invoke(mc.currentScreen, x, y, 0, 0);
|
|
||||||
} catch (NoSuchMethodException | InvocationTargetException | IllegalAccessException e) {
|
|
||||||
future.setException(e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void drag(int x, int y) {
|
|
||||||
runLater(() -> {
|
|
||||||
LOGGER.info("Dragging to {}/{}", x, y);
|
|
||||||
dragNow(x, y);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
public void click(GuiButton button) {
|
|
||||||
runLater(() -> {
|
|
||||||
if (!button.isEnabled()) {
|
|
||||||
future.setException(new IllegalStateException("Button is disabled: " + button.getLabel()));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
LOGGER.info("Clicking button {}", button.getLabel());
|
|
||||||
button.onClick();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
public void click(GuiTexturedButton button) {
|
|
||||||
runLater(() -> {
|
|
||||||
if (!button.isEnabled()) {
|
|
||||||
future.setException(new IllegalStateException("Button is disabled: " + button.getTexture()));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
LOGGER.info("Clicking textured button {}", button.getTexture());
|
|
||||||
button.onClick();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
public void click(String buttonText) {
|
|
||||||
runLater(() -> {
|
|
||||||
LOGGER.info("Clicking button {}", buttonText);
|
|
||||||
try {
|
|
||||||
Field field = net.minecraft.client.gui.GuiScreen.class.getDeclaredField("buttonList");
|
|
||||||
field.setAccessible(true);
|
|
||||||
@SuppressWarnings("unchecked")
|
|
||||||
List<net.minecraft.client.gui.GuiButton> buttonList = (List)
|
|
||||||
field.get(mc.currentScreen);
|
|
||||||
|
|
||||||
net.minecraft.client.gui.GuiButton button = null;
|
|
||||||
for (net.minecraft.client.gui.GuiButton guiButton : buttonList) {
|
|
||||||
if (guiButton.displayString.equals(buttonText)) {
|
|
||||||
button = guiButton;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (button == null) {
|
|
||||||
future.setException(new NoSuchElementException("No button with label: " + buttonText));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
clickNow(button.xPosition + 5, button.yPosition + 5);
|
|
||||||
} catch (IllegalAccessException | NoSuchFieldException e) {
|
|
||||||
future.setException(e);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
public void type(String string) {
|
|
||||||
for (char c : string.toCharArray()) {
|
|
||||||
press(c, Keyboard.getKeyIndex(String.valueOf(c).toUpperCase()));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void press(int keyCode) {
|
|
||||||
String keyName = Keyboard.getKeyName(keyCode);
|
|
||||||
char character = keyName.length() == 1 ? keyName.charAt(0) : '\0';
|
|
||||||
press(character, keyCode);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void press(char character, int keyCode) {
|
|
||||||
runLater(() -> {
|
|
||||||
LOGGER.info("Pressing key {}", Keyboard.getKeyName(keyCode));
|
|
||||||
if (mc.currentScreen == null || mc.currentScreen.allowUserInput) {
|
|
||||||
KeyBinding.onTick(keyCode);
|
|
||||||
FMLCommonHandler.instance().fireKeyInput();
|
|
||||||
}
|
|
||||||
if (mc.currentScreen != null) {
|
|
||||||
try {
|
|
||||||
Method method = net.minecraft.client.gui.GuiScreen.class
|
|
||||||
.getDeclaredMethod("keyTyped", char.class, int.class);
|
|
||||||
method.setAccessible(true);
|
|
||||||
method.invoke(mc.currentScreen, character, keyCode);
|
|
||||||
} catch (NoSuchMethodException | InvocationTargetException | IllegalAccessException e) {
|
|
||||||
future.setException(e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,41 +0,0 @@
|
|||||||
package com.replaymod.core;
|
|
||||||
|
|
||||||
import com.google.common.util.concurrent.ListenableFuture;
|
|
||||||
import com.google.common.util.concurrent.SettableFuture;
|
|
||||||
|
|
||||||
import static com.replaymod.core.ReplayModIntegrationTest.LOGGER;
|
|
||||||
import static com.replaymod.core.utils.Utils.addCallback;
|
|
||||||
|
|
||||||
public class CompositeTask implements Task {
|
|
||||||
private SettableFuture<Void> future;
|
|
||||||
protected final Task[] children;
|
|
||||||
|
|
||||||
public CompositeTask(Task[] children) {
|
|
||||||
this.children = children;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public ListenableFuture<Void> execute() {
|
|
||||||
future = SettableFuture.create();
|
|
||||||
executeChild(0);
|
|
||||||
return future;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void executeChild(int childIndex) {
|
|
||||||
if (future.isDone()) return;
|
|
||||||
if (childIndex < children.length) {
|
|
||||||
ReplayMod.instance.runLater(() -> {
|
|
||||||
try {
|
|
||||||
Task task = children[childIndex];
|
|
||||||
LOGGER.info("Running task {}", task);
|
|
||||||
ListenableFuture<Void> childFuture = task.execute();
|
|
||||||
addCallback(childFuture, done -> executeChild(childIndex + 1), err -> future.setException(err));
|
|
||||||
} catch (Throwable t) {
|
|
||||||
future.setException(t);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
future.set(null);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,73 +0,0 @@
|
|||||||
package com.replaymod.core;
|
|
||||||
|
|
||||||
import com.replaymod.core.regression.RegressionTest60;
|
|
||||||
import com.replaymod.core.regression.RegressionTest61;
|
|
||||||
import com.replaymod.core.regression.RegressionTest62;
|
|
||||||
import com.replaymod.extra.DownloadOpenEye;
|
|
||||||
import com.replaymod.online.SkipLogin;
|
|
||||||
import com.replaymod.recording.CreateSPWorld;
|
|
||||||
import com.replaymod.recording.ExitSPWorld;
|
|
||||||
import com.replaymod.replay.ExitReplay;
|
|
||||||
import com.replaymod.replay.LoadReplay;
|
|
||||||
import com.replaymod.replay.OpenReplayViewer;
|
|
||||||
import net.minecraft.client.Minecraft;
|
|
||||||
import net.minecraftforge.fml.common.FMLCommonHandler;
|
|
||||||
import net.minecraftforge.fml.common.Mod;
|
|
||||||
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
|
|
||||||
import org.apache.logging.log4j.Logger;
|
|
||||||
|
|
||||||
import static com.replaymod.core.AbstractTask.mc;
|
|
||||||
import static com.replaymod.core.ReplayModIntegrationTest.MOD_ID;
|
|
||||||
import static com.replaymod.core.utils.Utils.addCallback;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Helper mod that initiates the integration tests.
|
|
||||||
*/
|
|
||||||
@Mod(modid = MOD_ID)
|
|
||||||
public class ReplayModIntegrationTest {
|
|
||||||
public static final String MOD_ID = "replaymod-integration-test";
|
|
||||||
|
|
||||||
public static Logger LOGGER;
|
|
||||||
|
|
||||||
@Mod.EventHandler
|
|
||||||
public void init(FMLPreInitializationEvent event) {
|
|
||||||
LOGGER = event.getModLog();
|
|
||||||
|
|
||||||
// Make sure the game window doesn't have to remain in focus during the test
|
|
||||||
mc.gameSettings.pauseOnLostFocus = false;
|
|
||||||
|
|
||||||
runTasks(
|
|
||||||
new SkipLogin(),
|
|
||||||
new DownloadOpenEye(),
|
|
||||||
new CreateSPWorld(),
|
|
||||||
new Wait(5000),
|
|
||||||
new ExitSPWorld(),
|
|
||||||
new OpenReplayViewer(),
|
|
||||||
new LoadReplay(),
|
|
||||||
|
|
||||||
new RegressionTest60(),
|
|
||||||
new RegressionTest61(),
|
|
||||||
new RegressionTest62(),
|
|
||||||
|
|
||||||
// new AbstractTask() {}, // Uncomment to not exit on success (useful for writing more tests)
|
|
||||||
new ExitReplay()
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void runTasks(Task... tests) {
|
|
||||||
addCallback(new CompositeTask(tests).execute(), success -> {
|
|
||||||
if (!Minecraft.getMinecraft().hasCrashed) {
|
|
||||||
LOGGER.info("===================================================");
|
|
||||||
LOGGER.info("= ALL TESTS PASSED =");
|
|
||||||
LOGGER.info("===================================================");
|
|
||||||
FMLCommonHandler.instance().exitJava(0, false);
|
|
||||||
}
|
|
||||||
}, error -> {
|
|
||||||
LOGGER.error("Failed task:", error);
|
|
||||||
LOGGER.error("===================================================");
|
|
||||||
LOGGER.error("= TEST FAILED =");
|
|
||||||
LOGGER.error("===================================================");
|
|
||||||
FMLCommonHandler.instance().exitJava(1, false);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,35 +0,0 @@
|
|||||||
package com.replaymod.core;
|
|
||||||
|
|
||||||
import com.google.common.util.concurrent.ListenableFuture;
|
|
||||||
|
|
||||||
public interface Task {
|
|
||||||
ListenableFuture<Void> execute();
|
|
||||||
|
|
||||||
static Task click(int x, int y) {
|
|
||||||
return AbstractTask.create(task -> {
|
|
||||||
task.click(x, y);
|
|
||||||
task.runLater(() -> task.future.set(null));
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
static Task drag(int x, int y) {
|
|
||||||
return AbstractTask.create(task -> {
|
|
||||||
task.drag(x, y);
|
|
||||||
task.runLater(() -> task.future.set(null));
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
static Task pressKey(int keyCode) {
|
|
||||||
return AbstractTask.create(task -> {
|
|
||||||
task.press(keyCode);
|
|
||||||
task.runLater(() -> task.future.set(null));
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
static Task pressKey(char character, int keyCode) {
|
|
||||||
return AbstractTask.create(task -> {
|
|
||||||
task.press(character, keyCode);
|
|
||||||
task.runLater(() -> task.future.set(null));
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
package com.replaymod.core;
|
|
||||||
|
|
||||||
public class Utils {
|
|
||||||
public static void times(int x, Runnable runnable) {
|
|
||||||
for (int i = 0; i < x; i++) {
|
|
||||||
runnable.run();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
package com.replaymod.core;
|
|
||||||
|
|
||||||
public class Wait extends AbstractTask {
|
|
||||||
private final int duration;
|
|
||||||
|
|
||||||
public Wait(int duration) {
|
|
||||||
this.duration = duration;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void init() {
|
|
||||||
new Thread(() -> {
|
|
||||||
try {
|
|
||||||
Thread.sleep(duration);
|
|
||||||
runLater(() -> future.set(null));
|
|
||||||
} catch (InterruptedException e) {
|
|
||||||
runLater(() -> future.setException(e));
|
|
||||||
}
|
|
||||||
}).start();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,59 +0,0 @@
|
|||||||
package com.replaymod.core.regression;
|
|
||||||
|
|
||||||
import com.replaymod.core.AbstractTask;
|
|
||||||
import com.replaymod.core.CompositeTask;
|
|
||||||
import com.replaymod.core.Task;
|
|
||||||
import com.replaymod.replay.SpectatePlayer;
|
|
||||||
import com.replaymod.replay.overlay.OverlayGui;
|
|
||||||
import com.replaymod.simplepathing.GuiPathingTasks;
|
|
||||||
import com.replaymod.simplepathing.gui.GuiEditKeyframe;
|
|
||||||
import org.lwjgl.input.Keyboard;
|
|
||||||
|
|
||||||
import static com.replaymod.core.AbstractTask.mc;
|
|
||||||
import static com.replaymod.core.Utils.times;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Regression test: #60 Crash in path preview when two spectator keyframes are closer than 50ms
|
|
||||||
*/
|
|
||||||
public class RegressionTest60 extends CompositeTask {
|
|
||||||
public RegressionTest60() {
|
|
||||||
super(new Task[]{
|
|
||||||
new SpectatePlayer(),
|
|
||||||
OverlayGui.whileOpened(
|
|
||||||
// Place first spectator keyframe
|
|
||||||
new GuiPathingTasks.ClickPositionKeyframeButton(),
|
|
||||||
// Place second spectator keyframe
|
|
||||||
Task.click(130, 50),
|
|
||||||
new GuiPathingTasks.ClickPositionKeyframeButton(),
|
|
||||||
// Move second keyframe to 20ms on the keyframe timeline
|
|
||||||
AbstractTask.create(task -> {
|
|
||||||
// Double click keyframe
|
|
||||||
task.click(130, 50);
|
|
||||||
task.click(130, 50);
|
|
||||||
task.expectGui(GuiEditKeyframe.Spectator.class, gui -> {
|
|
||||||
// Set ms field to 20
|
|
||||||
task.click(mc.currentScreen.width / 2 + 80, mc.currentScreen.height / 2);
|
|
||||||
times(4, () -> task.press(Keyboard.KEY_BACK));
|
|
||||||
task.type("20");
|
|
||||||
// Set other fields to 0
|
|
||||||
times(2, () -> {
|
|
||||||
task.press(Keyboard.KEY_TAB);
|
|
||||||
times(4, () -> task.press(Keyboard.KEY_BACK));
|
|
||||||
task.press(Keyboard.KEY_0);
|
|
||||||
});
|
|
||||||
task.click(gui.saveButton);
|
|
||||||
task.expectPopupClosed(() -> task.future.set(null));
|
|
||||||
});
|
|
||||||
}),
|
|
||||||
// Place second spectator keyframe
|
|
||||||
new GuiPathingTasks.ClickPositionKeyframeButton()
|
|
||||||
),
|
|
||||||
// Stop spectating player
|
|
||||||
new SpectatePlayer.End(),
|
|
||||||
// Enable path preview
|
|
||||||
Task.pressKey(Keyboard.KEY_H),
|
|
||||||
new GuiPathingTasks.ClearKeyframeTimeline(),
|
|
||||||
Task.pressKey(Keyboard.KEY_H),
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,35 +0,0 @@
|
|||||||
package com.replaymod.core.regression;
|
|
||||||
|
|
||||||
import com.replaymod.core.AbstractTask;
|
|
||||||
import com.replaymod.core.CompositeTask;
|
|
||||||
import com.replaymod.core.Task;
|
|
||||||
import com.replaymod.replay.overlay.OverlayGui;
|
|
||||||
import com.replaymod.simplepathing.GuiPathingTasks;
|
|
||||||
import com.replaymod.simplepathing.gui.GuiEditKeyframe;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Regression test: #61 NPE when saving in edit keyframe gui of last keyframe
|
|
||||||
*/
|
|
||||||
public class RegressionTest61 extends CompositeTask {
|
|
||||||
public RegressionTest61() {
|
|
||||||
super(new Task[]{
|
|
||||||
OverlayGui.whileOpened(
|
|
||||||
// Place keyframe
|
|
||||||
Task.click(130, 50),
|
|
||||||
new GuiPathingTasks.ClickPositionKeyframeButton(),
|
|
||||||
AbstractTask.create(task -> {
|
|
||||||
// Double click keyframe
|
|
||||||
task.click(130, 50);
|
|
||||||
task.click(130, 50);
|
|
||||||
task.expectGui(GuiEditKeyframe.Position.class, gui -> {
|
|
||||||
task.click(gui.saveButton);
|
|
||||||
task.expectPopupClosed(() -> task.future.set(null));
|
|
||||||
});
|
|
||||||
}),
|
|
||||||
// Place second spectator keyframe
|
|
||||||
new GuiPathingTasks.ClickPositionKeyframeButton()
|
|
||||||
),
|
|
||||||
new GuiPathingTasks.ClearKeyframeTimeline(),
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
package com.replaymod.core.regression;
|
|
||||||
|
|
||||||
import com.replaymod.core.CompositeTask;
|
|
||||||
import com.replaymod.core.Task;
|
|
||||||
import com.replaymod.replay.overlay.OverlayGui;
|
|
||||||
import com.replaymod.simplepathing.GuiPathingTasks;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Regression test: #62 Swapping the only two existing keyframes causes NPE
|
|
||||||
*/
|
|
||||||
public class RegressionTest62 extends CompositeTask {
|
|
||||||
public RegressionTest62() {
|
|
||||||
super(new Task[]{
|
|
||||||
OverlayGui.whileOpened(
|
|
||||||
// Place first keyframe
|
|
||||||
Task.click(130, 50),
|
|
||||||
new GuiPathingTasks.ClickPositionKeyframeButton(),
|
|
||||||
// Place second keyframe
|
|
||||||
Task.click(150, 50),
|
|
||||||
new GuiPathingTasks.ClickPositionKeyframeButton(),
|
|
||||||
// Move first keyframe past second keyframe
|
|
||||||
Task.click(130,50),
|
|
||||||
Task.drag(170,50)
|
|
||||||
),
|
|
||||||
new GuiPathingTasks.ClearKeyframeTimeline()
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
package com.replaymod.extra;
|
|
||||||
|
|
||||||
import com.replaymod.core.AbstractTask;
|
|
||||||
import com.replaymod.extras.OpenEyeExtra;
|
|
||||||
import net.minecraftforge.fml.common.Loader;
|
|
||||||
|
|
||||||
import java.io.File;
|
|
||||||
import java.nio.file.NoSuchFileException;
|
|
||||||
|
|
||||||
public class DownloadOpenEye extends AbstractTask {
|
|
||||||
@Override
|
|
||||||
protected void init() {
|
|
||||||
expectGui(OpenEyeExtra.OfferGui.class, offerGui -> {
|
|
||||||
click(offerGui.yesButton);
|
|
||||||
expectGuiClosed(20 * 1000, () -> {
|
|
||||||
File targetFile = new File(mc.mcDataDir, "mods/" + Loader.MC_VERSION + "/OpenEye.jar");
|
|
||||||
if (!targetFile.exists()) {
|
|
||||||
future.setException(new NoSuchFileException(targetFile.getAbsolutePath()));
|
|
||||||
} else {
|
|
||||||
future.set(null);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
package com.replaymod.online;
|
|
||||||
|
|
||||||
import com.replaymod.core.AbstractTask;
|
|
||||||
import com.replaymod.online.gui.GuiLoginPrompt;
|
|
||||||
|
|
||||||
public class SkipLogin extends AbstractTask {
|
|
||||||
@Override
|
|
||||||
protected void init() {
|
|
||||||
expectGui(GuiLoginPrompt.class, gui -> {
|
|
||||||
click(gui.cancelButton);
|
|
||||||
expectGuiClosed(() -> future.set(null));
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
package com.replaymod.recording;
|
|
||||||
|
|
||||||
import com.replaymod.core.AbstractTask;
|
|
||||||
import net.minecraft.client.gui.GuiCreateWorld;
|
|
||||||
import net.minecraft.client.gui.GuiMainMenu;
|
|
||||||
import net.minecraft.client.gui.GuiSelectWorld;
|
|
||||||
import net.minecraftforge.client.event.RenderGameOverlayEvent;
|
|
||||||
import net.minecraftforge.common.MinecraftForge;
|
|
||||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
|
||||||
|
|
||||||
public class CreateSPWorld extends AbstractTask {
|
|
||||||
@Override
|
|
||||||
protected void init() {
|
|
||||||
expectGui(GuiMainMenu.class, mainMenu -> {
|
|
||||||
click("Singleplayer");
|
|
||||||
expectGui(GuiSelectWorld.class, selectWorld -> {
|
|
||||||
click("Create New World");
|
|
||||||
expectGui(GuiCreateWorld.class, createWorld -> {
|
|
||||||
click("Create New World");
|
|
||||||
class EventHandler {
|
|
||||||
@SubscribeEvent
|
|
||||||
public void onRenderIngame(RenderGameOverlayEvent.Pre event) {
|
|
||||||
MinecraftForge.EVENT_BUS.unregister(this);
|
|
||||||
runLater(() -> future.set(null));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
MinecraftForge.EVENT_BUS.register(new EventHandler());
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,36 +0,0 @@
|
|||||||
package com.replaymod.recording;
|
|
||||||
|
|
||||||
import com.replaymod.core.AbstractTask;
|
|
||||||
import net.minecraft.client.gui.GuiIngameMenu;
|
|
||||||
import net.minecraft.client.gui.GuiMainMenu;
|
|
||||||
import org.apache.commons.io.filefilter.DirectoryFileFilter;
|
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
|
|
||||||
public class ExitSPWorld extends AbstractTask {
|
|
||||||
@Override
|
|
||||||
protected void init() {
|
|
||||||
mc.displayInGameMenu();
|
|
||||||
expectGui(GuiIngameMenu.class, ingameMenu -> {
|
|
||||||
click("Save and Quit to Title");
|
|
||||||
expectGui(GuiMainMenu.class, mainMenu -> new Thread(() -> {
|
|
||||||
try {
|
|
||||||
while (true) {
|
|
||||||
String[] dirs = core.getReplayFolder().list(DirectoryFileFilter.DIRECTORY);
|
|
||||||
if (dirs == null) {
|
|
||||||
future.setException(new NullPointerException("dirs is null"));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (dirs.length == 0) {
|
|
||||||
runLater(() -> future.set(null));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
Thread.sleep(10);
|
|
||||||
}
|
|
||||||
} catch (IOException | InterruptedException e) {
|
|
||||||
future.setException(e);
|
|
||||||
}
|
|
||||||
}).start());
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||