Compare commits
3 Commits
1.9.4-2.0.
...
1.10.2-2.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b1661e359a | ||
|
|
7cc0ee523a | ||
|
|
09f167f10e |
18
.drone.yml
@@ -1,18 +0,0 @@
|
|||||||
pipeline:
|
|
||||||
clone:
|
|
||||||
image: plugins/git
|
|
||||||
tags: true
|
|
||||||
build:
|
|
||||||
image: openjdk:8
|
|
||||||
commands:
|
|
||||||
- JAVA_OPTS=-Xmx1516M ./gradlew setupDecompWorkspace
|
|
||||||
- ./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.cGlwZWxpbmU6CiAgY2xvbmU6CiAgICBpbWFnZTogcGx1Z2lucy9naXQKICAgIHRhZ3M6IHRydWUKICBidWlsZDoKICAgIGltYWdlOiBvcGVuamRrOjgKICAgIGNvbW1hbmRzOgogICAgICAtIEpBVkFfT1BUUz0tWG14MTUxNk0gLi9ncmFkbGV3IHNldHVwRGVjb21wV29ya3NwYWNlCiAgICAgIC0gLi9ncmFkbGV3IDpidWlsZAogIGFyY2hpdmU6CiAgICBpbWFnZTogcGx1Z2lucy9zMwogICAgYWNsOiBwdWJsaWMtcmVhZAogICAgcmVnaW9uOiAidXMtZWFzdC0xIgogICAgYnVja2V0OiAicmVwbGF5bW9kIgogICAgcGF0aF9zdHlsZTogdHJ1ZQogICAgc291cmNlOiBidWlsZC9saWJzLyoKICAgIHN0cmlwX3ByZWZpeDogYnVpbGQvbGlicy8KICAgIHRhcmdldDogLwo.Q_jQxd73CuNh8ZTGTw31yMmBIzWprIagmaddFYovDrc
|
|
||||||
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.
|
|
||||||
@@ -36,7 +36,7 @@ archivesBaseName = "replaymod"
|
|||||||
|
|
||||||
minecraft {
|
minecraft {
|
||||||
coreMod = 'com.replaymod.core.LoadingPlugin'
|
coreMod = 'com.replaymod.core.LoadingPlugin'
|
||||||
version = '1.9.4-12.17.0.1976'
|
version = '1.10.2-12.18.2.2099'
|
||||||
runDir = "eclipse"
|
runDir = "eclipse"
|
||||||
mappings = "snapshot_20160518"
|
mappings = "snapshot_20160518"
|
||||||
}
|
}
|
||||||
|
|||||||
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')
|
|
||||||
})
|
|
||||||
674
docs/content.md
@@ -1,674 +0,0 @@
|
|||||||
# Installation [installing]
|
|
||||||
## Installing the Replay Mod [replaymod]
|
|
||||||
The **ReplayMod** requires **Minecraft Forge** to be installed.
|
|
||||||
|
|
||||||
For the use with the **Replay Mod**, we recommend using Forge Version `1.8-11.14.3.1450`, which can be downloaded [here](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**!
|
|
||||||
|
|
||||||
### 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.
|
|
||||||
However, due to the way that recording works, many Mods that add new Blocks, Mobs or Game Mechanics are not supported.
|
|
||||||
Mods that simply modify the client (like the [PixelCam Mod](http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/2327429-pixelcam-camera-studio-for-minecraft-1-8)
|
|
||||||
or the [CommandGroups Mod](http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/2443430-command-groups-mod-order-label-and-color-command)) usually work.
|
|
||||||
|
|
||||||
### Optifine [optifine]
|
|
||||||
The **Replay Mod** is compatible with `Optifine 1.8.0 HD U D5`, which can be downloaded at <https://optifine.net/downloads>.
|
|
||||||
Other Optifine versions for Minecraft 1.8.0 might, but don't have to be compatible as well.
|
|
||||||
|
|
||||||
> **Warning:** If you have Optifine installed, you **can not render videos** from within the Replay Mod.
|
|
||||||
This might change in future Replay Mod versions.
|
|
||||||
|
|
||||||
### Shaders Mod [shaders]
|
|
||||||
You can use the Replay Mod together with [karyonix' Shaders Mod](http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/1286604-shaders-mod-updated-by-karyonix),
|
|
||||||
but rendering videos results in **possible crashes** and **malformed videos**.
|
|
||||||
Therefore, you have to **uninstall the Shaders Mod before rendering**.
|
|
||||||
|
|
||||||
## 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.
|
|
||||||
|
|
||||||
# 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.
|
|
||||||
|
|
||||||
### 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 current Path"** button.
|
|
||||||
You can change the Preset's name using the Text Input Field in the upper right corner.
|
|
||||||
To load a Keyframe Preset, select a Preset from the list on the left side and click the **"Load"** button.
|
|
||||||
Using the **"Remove"** button, you can permanently delete a Keyframe Preset from the **Keyframe Repository**.
|
|
||||||
|
|
||||||
## Custom Objects [objects]
|
|
||||||
|
|
||||||
[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** Screen
|
|
||||||
|
|
||||||
By clicking the **"Advanced Settings" Button** in the lower right corner, you can access more settings.
|
|
||||||
|
|
||||||
#### Hide Nametags [nametags]
|
|
||||||
If you don't want to see Entity's Nametags in the rendered video, simply 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** Screen
|
|
||||||
|
|
||||||
|
|
||||||
> **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** Tag 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.
|
|
||||||
Above 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: 68 KiB |
|
Before Width: | Height: | Size: 112 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: 48 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: 62 KiB |
|
Before Width: | Height: | Size: 78 KiB |
|
Before Width: | Height: | Size: 76 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,6 +1,5 @@
|
|||||||
package com.replaymod.compat;
|
package com.replaymod.compat;
|
||||||
|
|
||||||
import com.replaymod.compat.optifine.DisableFastRender;
|
|
||||||
import com.replaymod.compat.shaders.ShaderBeginRender;
|
import com.replaymod.compat.shaders.ShaderBeginRender;
|
||||||
import com.replaymod.core.ReplayMod;
|
import com.replaymod.core.ReplayMod;
|
||||||
import net.minecraftforge.common.MinecraftForge;
|
import net.minecraftforge.common.MinecraftForge;
|
||||||
@@ -19,7 +18,6 @@ public class ReplayModCompat {
|
|||||||
public void init(FMLInitializationEvent event) {
|
public void init(FMLInitializationEvent event) {
|
||||||
EventBus bus = MinecraftForge.EVENT_BUS;
|
EventBus bus = MinecraftForge.EVENT_BUS;
|
||||||
bus.register(new ShaderBeginRender());
|
bus.register(new ShaderBeginRender());
|
||||||
bus.register(new DisableFastRender());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,37 +0,0 @@
|
|||||||
package com.replaymod.compat.optifine;
|
|
||||||
|
|
||||||
import com.replaymod.render.events.ReplayRenderEvent;
|
|
||||||
import net.minecraft.client.Minecraft;
|
|
||||||
import net.minecraftforge.fml.client.FMLClientHandler;
|
|
||||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
|
||||||
|
|
||||||
public class DisableFastRender {
|
|
||||||
|
|
||||||
private final Minecraft mc = Minecraft.getMinecraft();
|
|
||||||
|
|
||||||
private boolean wasFastRender = false;
|
|
||||||
|
|
||||||
@SubscribeEvent
|
|
||||||
public void onRenderBegin(ReplayRenderEvent.Pre event) {
|
|
||||||
if (!FMLClientHandler.instance().hasOptifine()) return;
|
|
||||||
|
|
||||||
try {
|
|
||||||
wasFastRender = (boolean) OptifineReflection.gameSettings_ofFastRender.get(mc.gameSettings);
|
|
||||||
OptifineReflection.gameSettings_ofFastRender.set(mc.gameSettings, false);
|
|
||||||
} catch (IllegalAccessException e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@SubscribeEvent
|
|
||||||
public void onRenderEnd(ReplayRenderEvent.Post event){
|
|
||||||
if (!FMLClientHandler.instance().hasOptifine()) return;
|
|
||||||
|
|
||||||
try {
|
|
||||||
OptifineReflection.gameSettings_ofFastRender.set(mc.gameSettings, wasFastRender);
|
|
||||||
} catch (IllegalAccessException e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
package com.replaymod.compat.optifine;
|
|
||||||
|
|
||||||
import net.minecraft.client.settings.GameSettings;
|
|
||||||
|
|
||||||
import java.lang.reflect.Field;
|
|
||||||
|
|
||||||
public class OptifineReflection {
|
|
||||||
|
|
||||||
// GameSettings.ofFastRender
|
|
||||||
public static Field gameSettings_ofFastRender;
|
|
||||||
|
|
||||||
static {
|
|
||||||
try {
|
|
||||||
// this throws an ignored ClassNotFoundException if Optifine isn't installed
|
|
||||||
Class.forName("Config");
|
|
||||||
|
|
||||||
gameSettings_ofFastRender = GameSettings.class.getDeclaredField("ofFastRender");
|
|
||||||
gameSettings_ofFastRender.setAccessible(true);
|
|
||||||
} catch (ClassNotFoundException ignore) {
|
|
||||||
// no optifine installed
|
|
||||||
} catch (NoSuchFieldException e) {
|
|
||||||
// the field wasn't found. Has it been renamed?
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -9,7 +9,6 @@ import net.minecraft.util.ReportedException;
|
|||||||
import net.minecraftforge.fml.client.registry.ClientRegistry;
|
import net.minecraftforge.fml.client.registry.ClientRegistry;
|
||||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||||
import net.minecraftforge.fml.common.gameevent.InputEvent;
|
import net.minecraftforge.fml.common.gameevent.InputEvent;
|
||||||
import net.minecraftforge.fml.common.gameevent.TickEvent;
|
|
||||||
import org.lwjgl.input.Keyboard;
|
import org.lwjgl.input.Keyboard;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
@@ -20,25 +19,16 @@ import java.util.Map;
|
|||||||
public class KeyBindingRegistry {
|
public class KeyBindingRegistry {
|
||||||
private Map<String, KeyBinding> keyBindings = new HashMap<String, KeyBinding>();
|
private Map<String, KeyBinding> keyBindings = new HashMap<String, KeyBinding>();
|
||||||
private Multimap<KeyBinding, Runnable> keyBindingHandlers = ArrayListMultimap.create();
|
private Multimap<KeyBinding, Runnable> keyBindingHandlers = ArrayListMultimap.create();
|
||||||
private Multimap<KeyBinding, Runnable> repeatedKeyBindingHandlers = ArrayListMultimap.create();
|
|
||||||
private Multimap<Integer, Runnable> rawHandlers = ArrayListMultimap.create();
|
private Multimap<Integer, Runnable> rawHandlers = ArrayListMultimap.create();
|
||||||
|
|
||||||
public void registerKeyBinding(String name, int keyCode, Runnable whenPressed) {
|
public void registerKeyBinding(String name, int keyCode, Runnable whenPressed) {
|
||||||
keyBindingHandlers.put(registerKeyBinding(name, keyCode), whenPressed);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void registerRepeatedKeyBinding(String name, int keyCode, Runnable whenPressed) {
|
|
||||||
repeatedKeyBindingHandlers.put(registerKeyBinding(name, keyCode), whenPressed);
|
|
||||||
}
|
|
||||||
|
|
||||||
private KeyBinding registerKeyBinding(String name, int keyCode) {
|
|
||||||
KeyBinding keyBinding = keyBindings.get(name);
|
KeyBinding keyBinding = keyBindings.get(name);
|
||||||
if (keyBinding == null) {
|
if (keyBinding == null) {
|
||||||
keyBinding = new KeyBinding(name, keyCode, "replaymod.title");
|
keyBinding = new KeyBinding(name, keyCode, "replaymod.title");
|
||||||
keyBindings.put(name, keyBinding);
|
keyBindings.put(name, keyBinding);
|
||||||
ClientRegistry.registerKeyBinding(keyBinding);
|
ClientRegistry.registerKeyBinding(keyBinding);
|
||||||
}
|
}
|
||||||
return keyBinding;
|
keyBindingHandlers.put(keyBinding, whenPressed);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void registerRaw(int keyCode, Runnable whenPressed) {
|
public void registerRaw(int keyCode, Runnable whenPressed) {
|
||||||
@@ -55,38 +45,20 @@ public class KeyBindingRegistry {
|
|||||||
handleRaw();
|
handleRaw();
|
||||||
}
|
}
|
||||||
|
|
||||||
@SubscribeEvent
|
|
||||||
public void onTick(TickEvent.RenderTickEvent event) {
|
|
||||||
if (event.phase != TickEvent.Phase.START) return;
|
|
||||||
handleRepeatedKeyBindings();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void handleRepeatedKeyBindings() {
|
|
||||||
for (Map.Entry<KeyBinding, Collection<Runnable>> entry : repeatedKeyBindingHandlers.asMap().entrySet()) {
|
|
||||||
if (entry.getKey().isKeyDown()) {
|
|
||||||
invokeKeyBindingHandlers(entry.getKey(), entry.getValue());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void handleKeyBindings() {
|
public void handleKeyBindings() {
|
||||||
for (Map.Entry<KeyBinding, Collection<Runnable>> entry : keyBindingHandlers.asMap().entrySet()) {
|
for (Map.Entry<KeyBinding, Collection<Runnable>> entry : keyBindingHandlers.asMap().entrySet()) {
|
||||||
while (entry.getKey().isPressed()) {
|
while (entry.getKey().isPressed()) {
|
||||||
invokeKeyBindingHandlers(entry.getKey(), entry.getValue());
|
for (final Runnable runnable : entry.getValue()) {
|
||||||
}
|
try {
|
||||||
}
|
runnable.run();
|
||||||
}
|
} catch (Throwable cause) {
|
||||||
|
CrashReport crashReport = CrashReport.makeCrashReport(cause, "Handling Key Binding");
|
||||||
private void invokeKeyBindingHandlers(KeyBinding keyBinding, Collection<Runnable> handlers) {
|
CrashReportCategory category = crashReport.makeCategory("Key Binding");
|
||||||
for (final Runnable runnable : handlers) {
|
category.addCrashSection("Key Binding", entry.getKey());
|
||||||
try {
|
category.setDetail("Handler", runnable::toString);
|
||||||
runnable.run();
|
throw new ReportedException(crashReport);
|
||||||
} catch (Throwable cause) {
|
}
|
||||||
CrashReport crashReport = CrashReport.makeCrashReport(cause, "Handling Key Binding");
|
}
|
||||||
CrashReportCategory category = crashReport.makeCategory("Key Binding");
|
|
||||||
category.addCrashSection("Key Binding", keyBinding);
|
|
||||||
category.setDetail("Handler", runnable::toString);
|
|
||||||
throw new ReportedException(crashReport);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -82,8 +82,7 @@ public class ReplayMod {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public File getReplayFolder() throws IOException {
|
public File getReplayFolder() throws IOException {
|
||||||
String path = getSettingsRegistry().get(Setting.RECORDING_PATH);
|
File folder = new File(getSettingsRegistry().get(Setting.RECORDING_PATH));
|
||||||
File folder = new File(path.startsWith("./") ? getMinecraft().mcDataDir : null, path);
|
|
||||||
FileUtils.forceMkdir(folder);
|
FileUtils.forceMkdir(folder);
|
||||||
return folder;
|
return folder;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ package com.replaymod.extras.playeroverview;
|
|||||||
import com.google.common.base.Optional;
|
import com.google.common.base.Optional;
|
||||||
import com.google.common.base.Predicate;
|
import com.google.common.base.Predicate;
|
||||||
import com.replaymod.core.ReplayMod;
|
import com.replaymod.core.ReplayMod;
|
||||||
import com.replaymod.core.utils.Utils;
|
|
||||||
import com.replaymod.extras.Extra;
|
import com.replaymod.extras.Extra;
|
||||||
import com.replaymod.replay.ReplayModReplay;
|
import com.replaymod.replay.ReplayModReplay;
|
||||||
import com.replaymod.replay.camera.CameraEntity;
|
import com.replaymod.replay.camera.CameraEntity;
|
||||||
@@ -40,16 +39,6 @@ public class PlayerOverview implements Extra {
|
|||||||
return !(input instanceof CameraEntity); // Exclude the camera entity
|
return !(input instanceof CameraEntity); // Exclude the camera entity
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (!Utils.isCtrlDown()) {
|
|
||||||
// Hide all players that have an UUID v2 (commonly used for NPCs)
|
|
||||||
Iterator<EntityPlayer> iter = players.iterator();
|
|
||||||
while (iter.hasNext()) {
|
|
||||||
UUID uuid = iter.next().getGameProfile().getId();
|
|
||||||
if (uuid != null && uuid.version() == 2) {
|
|
||||||
iter.remove();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
new PlayerOverviewGui(PlayerOverview.this, players).display();
|
new PlayerOverviewGui(PlayerOverview.this, players).display();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,8 +24,6 @@ import org.apache.logging.log4j.Logger;
|
|||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
import static net.minecraft.client.Minecraft.getMinecraft;
|
|
||||||
|
|
||||||
@Mod(modid = ReplayModOnline.MOD_ID, useMetadata = true)
|
@Mod(modid = ReplayModOnline.MOD_ID, useMetadata = true)
|
||||||
public class ReplayModOnline {
|
public class ReplayModOnline {
|
||||||
public static final String MOD_ID = "replaymod-online";
|
public static final String MOD_ID = "replaymod-online";
|
||||||
@@ -103,8 +101,7 @@ public class ReplayModOnline {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public File getDownloadsFolder() {
|
public File getDownloadsFolder() {
|
||||||
String path = core.getSettingsRegistry().get(Setting.DOWNLOAD_PATH);
|
return new File(core.getSettingsRegistry().get(Setting.DOWNLOAD_PATH));
|
||||||
return new File(path.startsWith("./") ? getMinecraft().mcDataDir : null, path);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public File getDownloadedFile(int id) {
|
public File getDownloadedFile(int id) {
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import com.replaymod.core.utils.Restrictions;
|
|||||||
import com.replaymod.recording.handler.ConnectionEventHandler;
|
import com.replaymod.recording.handler.ConnectionEventHandler;
|
||||||
import com.replaymod.recording.packet.PacketListener;
|
import com.replaymod.recording.packet.PacketListener;
|
||||||
import net.minecraftforge.common.MinecraftForge;
|
import net.minecraftforge.common.MinecraftForge;
|
||||||
import net.minecraft.network.NetworkManager;
|
|
||||||
import net.minecraftforge.fml.common.Mod;
|
import net.minecraftforge.fml.common.Mod;
|
||||||
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
|
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
|
||||||
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
|
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
|
||||||
@@ -18,9 +17,6 @@ import org.lwjgl.input.Keyboard;
|
|||||||
public class ReplayModRecording {
|
public class ReplayModRecording {
|
||||||
public static final String MOD_ID = "replaymod-recording";
|
public static final String MOD_ID = "replaymod-recording";
|
||||||
|
|
||||||
@Mod.Instance(MOD_ID)
|
|
||||||
public static ReplayModRecording instance;
|
|
||||||
|
|
||||||
@Mod.Instance(ReplayMod.MOD_ID)
|
@Mod.Instance(ReplayMod.MOD_ID)
|
||||||
private static ReplayMod core;
|
private static ReplayMod core;
|
||||||
|
|
||||||
@@ -53,8 +49,4 @@ public class ReplayModRecording {
|
|||||||
|
|
||||||
NetworkRegistry.INSTANCE.newSimpleChannel(Restrictions.PLUGIN_CHANNEL);
|
NetworkRegistry.INSTANCE.newSimpleChannel(Restrictions.PLUGIN_CHANNEL);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void initiateRecording(NetworkManager networkManager) {
|
|
||||||
connectionEventHandler.onConnectedToServerEvent(networkManager);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,10 +9,13 @@ import com.replaymod.replaystudio.replay.ReplayFile;
|
|||||||
import com.replaymod.replaystudio.replay.ReplayMetaData;
|
import com.replaymod.replaystudio.replay.ReplayMetaData;
|
||||||
import com.replaymod.replaystudio.replay.ZipReplayFile;
|
import com.replaymod.replaystudio.replay.ZipReplayFile;
|
||||||
import com.replaymod.replaystudio.studio.ReplayStudio;
|
import com.replaymod.replaystudio.studio.ReplayStudio;
|
||||||
|
import io.netty.channel.Channel;
|
||||||
|
import io.netty.channel.ChannelPipeline;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.network.NetworkManager;
|
import net.minecraft.network.NetworkManager;
|
||||||
import net.minecraft.world.WorldType;
|
import net.minecraft.world.WorldType;
|
||||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||||
|
import net.minecraftforge.fml.common.network.FMLNetworkEvent.ClientConnectedToServerEvent;
|
||||||
import net.minecraftforge.fml.common.network.FMLNetworkEvent.ClientDisconnectionFromServerEvent;
|
import net.minecraftforge.fml.common.network.FMLNetworkEvent.ClientDisconnectionFromServerEvent;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.apache.logging.log4j.Logger;
|
||||||
|
|
||||||
@@ -42,10 +45,10 @@ public class ConnectionEventHandler {
|
|||||||
this.core = core;
|
this.core = core;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onConnectedToServerEvent(NetworkManager networkManager) {
|
@SubscribeEvent
|
||||||
|
public void onConnectedToServerEvent(ClientConnectedToServerEvent event) {
|
||||||
try {
|
try {
|
||||||
boolean local = networkManager.isLocalChannel();
|
if(event.isLocal()) {
|
||||||
if (local) {
|
|
||||||
if (mc.getIntegratedServer().getEntityWorld().getWorldType() == WorldType.DEBUG_WORLD) {
|
if (mc.getIntegratedServer().getEntityWorld().getWorldType() == WorldType.DEBUG_WORLD) {
|
||||||
logger.info("Debug World recording is not supported.");
|
logger.info("Debug World recording is not supported.");
|
||||||
return;
|
return;
|
||||||
@@ -61,8 +64,9 @@ public class ConnectionEventHandler {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
NetworkManager nm = event.getManager();
|
||||||
String worldName;
|
String worldName;
|
||||||
if (local) {
|
if(event.isLocal()) {
|
||||||
worldName = mc.getIntegratedServer().getWorldName();
|
worldName = mc.getIntegratedServer().getWorldName();
|
||||||
} else if (Minecraft.getMinecraft().getCurrentServerData() != null) {
|
} else if (Minecraft.getMinecraft().getCurrentServerData() != null) {
|
||||||
worldName = Minecraft.getMinecraft().getCurrentServerData().serverIP;
|
worldName = Minecraft.getMinecraft().getCurrentServerData().serverIP;
|
||||||
@@ -71,6 +75,9 @@ public class ConnectionEventHandler {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Channel channel = nm.channel();
|
||||||
|
ChannelPipeline pipeline = channel.pipeline();
|
||||||
|
|
||||||
File folder = core.getReplayFolder();
|
File folder = core.getReplayFolder();
|
||||||
|
|
||||||
String name = sdf.format(Calendar.getInstance().getTime());
|
String name = sdf.format(Calendar.getInstance().getTime());
|
||||||
@@ -80,13 +87,13 @@ public class ConnectionEventHandler {
|
|||||||
replayFile.writeModInfo(ModCompat.getInstalledNetworkMods());
|
replayFile.writeModInfo(ModCompat.getInstalledNetworkMods());
|
||||||
|
|
||||||
ReplayMetaData metaData = new ReplayMetaData();
|
ReplayMetaData metaData = new ReplayMetaData();
|
||||||
metaData.setSingleplayer(local);
|
metaData.setSingleplayer(event.isLocal());
|
||||||
metaData.setServerName(worldName);
|
metaData.setServerName(worldName);
|
||||||
metaData.setGenerator("ReplayMod v" + ReplayMod.getContainer().getVersion());
|
metaData.setGenerator("ReplayMod v" + ReplayMod.getContainer().getVersion());
|
||||||
metaData.setDate(System.currentTimeMillis());
|
metaData.setDate(System.currentTimeMillis());
|
||||||
metaData.setMcVersion(ReplayMod.getMinecraftVersion());
|
metaData.setMcVersion(ReplayMod.getMinecraftVersion());
|
||||||
packetListener = new PacketListener(replayFile, metaData);
|
packetListener = new PacketListener(replayFile, metaData);
|
||||||
networkManager.channel().pipeline().addBefore(packetHandlerKey, "replay_recorder", packetListener);
|
pipeline.addBefore(packetHandlerKey, "replay_recorder", packetListener);
|
||||||
|
|
||||||
recordingEventHandler = new RecordingEventHandler(packetListener);
|
recordingEventHandler = new RecordingEventHandler(packetListener);
|
||||||
recordingEventHandler.register();
|
recordingEventHandler.register();
|
||||||
|
|||||||
@@ -1,27 +0,0 @@
|
|||||||
package com.replaymod.recording.mixin;
|
|
||||||
|
|
||||||
import com.replaymod.recording.ReplayModRecording;
|
|
||||||
import net.minecraft.client.network.NetHandlerLoginClient;
|
|
||||||
import net.minecraft.network.NetworkManager;
|
|
||||||
import org.spongepowered.asm.mixin.Mixin;
|
|
||||||
import org.spongepowered.asm.mixin.Shadow;
|
|
||||||
import org.spongepowered.asm.mixin.injection.At;
|
|
||||||
import org.spongepowered.asm.mixin.injection.Inject;
|
|
||||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
|
||||||
|
|
||||||
@Mixin(NetHandlerLoginClient.class)
|
|
||||||
public abstract class MixinNetHandlerLoginClient {
|
|
||||||
|
|
||||||
@Shadow
|
|
||||||
private NetworkManager networkManager;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Starts the recording right before switching into PLAY state.
|
|
||||||
* We cannot use the {@link net.minecraftforge.fml.common.network.FMLNetworkEvent.ClientConnectedToServerEvent}
|
|
||||||
* as it only fires after the forge handshake.
|
|
||||||
*/
|
|
||||||
@Inject(method = "handleLoginSuccess", at=@At("HEAD"))
|
|
||||||
public void replayModRecording_initiateRecording(CallbackInfo cb) {
|
|
||||||
ReplayModRecording.instance.initiateRecording(networkManager);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -3,7 +3,6 @@ package com.replaymod.recording.mixin;
|
|||||||
import com.replaymod.recording.handler.RecordingEventHandler;
|
import com.replaymod.recording.handler.RecordingEventHandler;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.client.network.NetHandlerPlayClient;
|
import net.minecraft.client.network.NetHandlerPlayClient;
|
||||||
import net.minecraft.client.network.NetworkPlayerInfo;
|
|
||||||
import net.minecraft.network.play.server.SPacketPlayerListItem;
|
import net.minecraft.network.play.server.SPacketPlayerListItem;
|
||||||
import net.minecraft.network.play.server.SPacketRespawn;
|
import net.minecraft.network.play.server.SPacketRespawn;
|
||||||
import org.spongepowered.asm.mixin.Mixin;
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
@@ -12,18 +11,12 @@ import org.spongepowered.asm.mixin.injection.At;
|
|||||||
import org.spongepowered.asm.mixin.injection.Inject;
|
import org.spongepowered.asm.mixin.injection.Inject;
|
||||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||||
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.UUID;
|
|
||||||
|
|
||||||
@Mixin(NetHandlerPlayClient.class)
|
@Mixin(NetHandlerPlayClient.class)
|
||||||
public abstract class MixinNetHandlerPlayClient {
|
public abstract class MixinNetHandlerPlayClient {
|
||||||
|
|
||||||
@Shadow
|
@Shadow
|
||||||
private Minecraft gameController;
|
private Minecraft gameController;
|
||||||
|
|
||||||
@Shadow
|
|
||||||
private Map<UUID, NetworkPlayerInfo> playerInfoMap;
|
|
||||||
|
|
||||||
public RecordingEventHandler getRecordingEventHandler() {
|
public RecordingEventHandler getRecordingEventHandler() {
|
||||||
return ((RecordingEventHandler.RecordingEventSender) gameController.renderGlobal).getRecordingEventHandler();
|
return ((RecordingEventHandler.RecordingEventSender) gameController.renderGlobal).getRecordingEventHandler();
|
||||||
}
|
}
|
||||||
@@ -35,17 +28,12 @@ public abstract class MixinNetHandlerPlayClient {
|
|||||||
* @param packet The packet
|
* @param packet The packet
|
||||||
* @param ci Callback info
|
* @param ci Callback info
|
||||||
*/
|
*/
|
||||||
@Inject(method = "handlePlayerListItem", at=@At("HEAD"))
|
@Inject(method = "handlePlayerListItem", at=@At("RETURN"))
|
||||||
public void recordOwnJoin(SPacketPlayerListItem packet, CallbackInfo ci) {
|
public void recordOwnJoin(SPacketPlayerListItem packet, CallbackInfo ci) {
|
||||||
if (gameController.thePlayer == null) return;
|
|
||||||
|
|
||||||
RecordingEventHandler handler = getRecordingEventHandler();
|
RecordingEventHandler handler = getRecordingEventHandler();
|
||||||
if (handler != null && packet.getAction() == SPacketPlayerListItem.Action.ADD_PLAYER) {
|
if (handler != null && packet.getAction() == SPacketPlayerListItem.Action.ADD_PLAYER) {
|
||||||
for (SPacketPlayerListItem.AddPlayerData data : packet.getEntries()) {
|
for (SPacketPlayerListItem.AddPlayerData data : packet.getEntries()) {
|
||||||
if (data.getProfile() == null || data.getProfile().getId() == null) continue;
|
if (data.getProfile().getId().equals(gameController.thePlayer.getGameProfile().getId())) {
|
||||||
// Only add spawn packet for our own player and only if he isn't known yet
|
|
||||||
if (data.getProfile().getId().equals(Minecraft.getMinecraft().thePlayer.getGameProfile().getId())
|
|
||||||
&& !playerInfoMap.containsKey(data.getProfile().getId())) {
|
|
||||||
handler.onPlayerJoin();
|
handler.onPlayerJoin();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,27 +0,0 @@
|
|||||||
package com.replaymod.recording.mixin;
|
|
||||||
|
|
||||||
import io.netty.channel.embedded.EmbeddedChannel;
|
|
||||||
import net.minecraftforge.fml.common.network.handshake.NetworkDispatcher;
|
|
||||||
import org.spongepowered.asm.mixin.Mixin;
|
|
||||||
import org.spongepowered.asm.mixin.Shadow;
|
|
||||||
import org.spongepowered.asm.mixin.injection.At;
|
|
||||||
import org.spongepowered.asm.mixin.injection.Inject;
|
|
||||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
|
||||||
|
|
||||||
@Mixin(value = NetworkDispatcher.class, remap = false)
|
|
||||||
public abstract class MixinNetworkDispatcher {
|
|
||||||
|
|
||||||
@Shadow
|
|
||||||
private EmbeddedChannel handshakeChannel;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Always sets fml:isLocal to false.
|
|
||||||
* This effectively removes the difference in the FML handshake between SP and MP
|
|
||||||
* and forces the block/item ids, etc. to always be send.
|
|
||||||
* This might have undesired side effects but at least it works at all.
|
|
||||||
*/
|
|
||||||
@Inject(method = "insertIntoChannel", at=@At("HEAD"))
|
|
||||||
public void replayModRecording_forceIsLocalToFalse(CallbackInfo cb) {
|
|
||||||
handshakeChannel.attr(NetworkDispatcher.IS_LOCAL).set(false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -132,7 +132,6 @@ public class PacketListener extends ChannelInboundHandlerAdapter {
|
|||||||
synchronized (replayFile) {
|
synchronized (replayFile) {
|
||||||
try {
|
try {
|
||||||
replayFile.save();
|
replayFile.save();
|
||||||
replayFile.close();
|
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
logger.error("Saving replay file:", e);
|
logger.error("Saving replay file:", e);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -83,39 +83,39 @@ public class ResourcePackRecorder {
|
|||||||
final File levelDir = new File(savesDir, levelName);
|
final File levelDir = new File(savesDir, levelName);
|
||||||
|
|
||||||
if (levelDir.isFile()) {
|
if (levelDir.isFile()) {
|
||||||
netManager.sendPacket(new CPacketResourcePackStatus(hash, CPacketResourcePackStatus.Action.ACCEPTED));
|
netManager.sendPacket(new CPacketResourcePackStatus(CPacketResourcePackStatus.Action.ACCEPTED));
|
||||||
Futures.addCallback(mc.getResourcePackRepository().setResourcePackInstance(levelDir), new FutureCallback<Object>() {
|
Futures.addCallback(mc.getResourcePackRepository().setResourcePackInstance(levelDir), new FutureCallback<Object>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(Object result) {
|
public void onSuccess(Object result) {
|
||||||
recordResourcePack(levelDir, requestId);
|
recordResourcePack(levelDir, requestId);
|
||||||
netManager.sendPacket(new CPacketResourcePackStatus(hash, CPacketResourcePackStatus.Action.SUCCESSFULLY_LOADED));
|
netManager.sendPacket(new CPacketResourcePackStatus(CPacketResourcePackStatus.Action.SUCCESSFULLY_LOADED));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(@Nonnull Throwable throwable) {
|
public void onFailure(@Nonnull Throwable throwable) {
|
||||||
netManager.sendPacket(new CPacketResourcePackStatus(hash, CPacketResourcePackStatus.Action.FAILED_DOWNLOAD));
|
netManager.sendPacket(new CPacketResourcePackStatus(CPacketResourcePackStatus.Action.FAILED_DOWNLOAD));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
netManager.sendPacket(new CPacketResourcePackStatus(hash, CPacketResourcePackStatus.Action.FAILED_DOWNLOAD));
|
netManager.sendPacket(new CPacketResourcePackStatus(CPacketResourcePackStatus.Action.FAILED_DOWNLOAD));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
final ServerData serverData = mc.getCurrentServerData();
|
final ServerData serverData = mc.getCurrentServerData();
|
||||||
if (serverData != null && serverData.getResourceMode() == ServerData.ServerResourceMode.ENABLED) {
|
if (serverData != null && serverData.getResourceMode() == ServerData.ServerResourceMode.ENABLED) {
|
||||||
netManager.sendPacket(new CPacketResourcePackStatus(hash, CPacketResourcePackStatus.Action.ACCEPTED));
|
netManager.sendPacket(new CPacketResourcePackStatus(CPacketResourcePackStatus.Action.ACCEPTED));
|
||||||
downloadResourcePackFuture(requestId, url, hash);
|
downloadResourcePackFuture(requestId, url, hash);
|
||||||
} else if (serverData != null && serverData.getResourceMode() != ServerData.ServerResourceMode.PROMPT) {
|
} else if (serverData != null && serverData.getResourceMode() != ServerData.ServerResourceMode.PROMPT) {
|
||||||
netManager.sendPacket(new CPacketResourcePackStatus(hash, CPacketResourcePackStatus.Action.DECLINED));
|
netManager.sendPacket(new CPacketResourcePackStatus(CPacketResourcePackStatus.Action.DECLINED));
|
||||||
} else {
|
} else {
|
||||||
mc.addScheduledTask(() -> mc.displayGuiScreen(new GuiYesNo((result, id) -> {
|
mc.addScheduledTask(() -> mc.displayGuiScreen(new GuiYesNo((result, id) -> {
|
||||||
if (serverData != null) {
|
if (serverData != null) {
|
||||||
serverData.setResourceMode(result ? ServerData.ServerResourceMode.ENABLED : ServerData.ServerResourceMode.DISABLED);
|
serverData.setResourceMode(result ? ServerData.ServerResourceMode.ENABLED : ServerData.ServerResourceMode.DISABLED);
|
||||||
}
|
}
|
||||||
if (result) {
|
if (result) {
|
||||||
netManager.sendPacket(new CPacketResourcePackStatus(hash, CPacketResourcePackStatus.Action.ACCEPTED));
|
netManager.sendPacket(new CPacketResourcePackStatus(CPacketResourcePackStatus.Action.ACCEPTED));
|
||||||
downloadResourcePackFuture(requestId, url, hash);
|
downloadResourcePackFuture(requestId, url, hash);
|
||||||
} else {
|
} else {
|
||||||
netManager.sendPacket(new CPacketResourcePackStatus(hash, CPacketResourcePackStatus.Action.DECLINED));
|
netManager.sendPacket(new CPacketResourcePackStatus(CPacketResourcePackStatus.Action.DECLINED));
|
||||||
}
|
}
|
||||||
|
|
||||||
ServerList.saveSingleServer(serverData);
|
ServerList.saveSingleServer(serverData);
|
||||||
@@ -131,12 +131,12 @@ public class ResourcePackRecorder {
|
|||||||
Futures.addCallback(downloadResourcePack(requestId, url, hash), new FutureCallback() {
|
Futures.addCallback(downloadResourcePack(requestId, url, hash), new FutureCallback() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(Object result) {
|
public void onSuccess(Object result) {
|
||||||
mc.getConnection().sendPacket(new CPacketResourcePackStatus(hash, CPacketResourcePackStatus.Action.SUCCESSFULLY_LOADED));
|
mc.getConnection().sendPacket(new CPacketResourcePackStatus(CPacketResourcePackStatus.Action.SUCCESSFULLY_LOADED));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(@Nonnull Throwable throwable) {
|
public void onFailure(@Nonnull Throwable throwable) {
|
||||||
mc.getConnection().sendPacket(new CPacketResourcePackStatus(hash, CPacketResourcePackStatus.Action.FAILED_DOWNLOAD));
|
mc.getConnection().sendPacket(new CPacketResourcePackStatus(CPacketResourcePackStatus.Action.FAILED_DOWNLOAD));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -186,7 +186,7 @@ public class ResourcePackRecorder {
|
|||||||
|
|
||||||
Futures.getUnchecked(mc.addScheduledTask(() -> mc.displayGuiScreen(guiScreen)));
|
Futures.getUnchecked(mc.addScheduledTask(() -> mc.displayGuiScreen(guiScreen)));
|
||||||
|
|
||||||
Map<String, String> sessionInfo = Minecraft.getSessionInfo();
|
Map<String, String> sessionInfo = ResourcePackRepository.func_190115_a();
|
||||||
repo.downloadingPacks = HttpUtil.downloadResourcePack(file, url, sessionInfo, 50 * 1024 * 1024, guiScreen, mc.getProxy());
|
repo.downloadingPacks = HttpUtil.downloadResourcePack(file, url, sessionInfo, 50 * 1024 * 1024, guiScreen, mc.getProxy());
|
||||||
Futures.addCallback(repo.downloadingPacks, new FutureCallback<Object>() {
|
Futures.addCallback(repo.downloadingPacks, new FutureCallback<Object>() {
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -1,17 +1,11 @@
|
|||||||
package com.replaymod.render;
|
package com.replaymod.render;
|
||||||
|
|
||||||
import com.replaymod.core.ReplayMod;
|
import com.replaymod.core.ReplayMod;
|
||||||
import net.minecraft.crash.CrashReport;
|
|
||||||
import net.minecraft.util.ReportedException;
|
|
||||||
import net.minecraftforge.common.config.Configuration;
|
import net.minecraftforge.common.config.Configuration;
|
||||||
import net.minecraftforge.fml.common.Mod;
|
import net.minecraftforge.fml.common.Mod;
|
||||||
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
|
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
|
||||||
import org.apache.commons.io.FileUtils;
|
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.apache.logging.log4j.Logger;
|
||||||
|
|
||||||
import java.io.File;
|
|
||||||
import java.io.IOException;
|
|
||||||
|
|
||||||
@Mod(modid = ReplayModRender.MOD_ID, useMetadata = true)
|
@Mod(modid = ReplayModRender.MOD_ID, useMetadata = true)
|
||||||
public class ReplayModRender {
|
public class ReplayModRender {
|
||||||
public static final String MOD_ID = "replaymod-render";
|
public static final String MOD_ID = "replaymod-render";
|
||||||
@@ -38,17 +32,6 @@ public class ReplayModRender {
|
|||||||
core.getSettingsRegistry().register(Setting.class);
|
core.getSettingsRegistry().register(Setting.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
public File getVideoFolder() {
|
|
||||||
String path = core.getSettingsRegistry().get(Setting.RENDER_PATH);
|
|
||||||
File folder = new File(path.startsWith("./") ? core.getMinecraft().mcDataDir : null, path);
|
|
||||||
try {
|
|
||||||
FileUtils.forceMkdir(folder);
|
|
||||||
} catch (IOException e) {
|
|
||||||
throw new ReportedException(CrashReport.makeCrashReport(e, "Cannot create video folder."));
|
|
||||||
}
|
|
||||||
return folder;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Configuration getConfiguration() {
|
public Configuration getConfiguration() {
|
||||||
return configuration;
|
return configuration;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,8 +49,7 @@ public class VideoWriter implements FrameConsumer<RGBFrame> {
|
|||||||
System.out.println("Starting " + settings.getExportCommand() + " with args: " + commandArgs);
|
System.out.println("Starting " + settings.getExportCommand() + " with args: " + commandArgs);
|
||||||
String[] cmdline = new CommandLine(executable).addArguments(commandArgs).toStrings();
|
String[] cmdline = new CommandLine(executable).addArguments(commandArgs).toStrings();
|
||||||
process = new ProcessBuilder(cmdline).directory(outputFolder).start();
|
process = new ProcessBuilder(cmdline).directory(outputFolder).start();
|
||||||
File exportLogFile = new File(Minecraft.getMinecraft().mcDataDir, "export.log");
|
OutputStream exportLogOut = new TeeOutputStream(new FileOutputStream("export.log"), ffmpegLog);
|
||||||
OutputStream exportLogOut = new TeeOutputStream(new FileOutputStream(exportLogFile), ffmpegLog);
|
|
||||||
new StreamPipe(process.getInputStream(), exportLogOut).start();
|
new StreamPipe(process.getInputStream(), exportLogOut).start();
|
||||||
new StreamPipe(process.getErrorStream(), exportLogOut).start();
|
new StreamPipe(process.getErrorStream(), exportLogOut).start();
|
||||||
outputStream = process.getOutputStream();
|
outputStream = process.getOutputStream();
|
||||||
|
|||||||
@@ -1,24 +0,0 @@
|
|||||||
package com.replaymod.render.events;
|
|
||||||
|
|
||||||
import com.replaymod.render.rendering.VideoRenderer;
|
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.RequiredArgsConstructor;
|
|
||||||
import net.minecraftforge.fml.common.eventhandler.Event;
|
|
||||||
|
|
||||||
@RequiredArgsConstructor
|
|
||||||
public abstract class ReplayRenderEvent extends Event {
|
|
||||||
@Getter
|
|
||||||
private final VideoRenderer videoRenderer;
|
|
||||||
|
|
||||||
public static class Pre extends ReplayRenderEvent {
|
|
||||||
public Pre(VideoRenderer videoRenderer) {
|
|
||||||
super(videoRenderer);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static class Post extends ReplayRenderEvent {
|
|
||||||
public Post(VideoRenderer videoRenderer) {
|
|
||||||
super(videoRenderer);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -7,6 +7,7 @@ import com.google.gson.GsonBuilder;
|
|||||||
import com.google.gson.InstanceCreator;
|
import com.google.gson.InstanceCreator;
|
||||||
import com.replaymod.render.RenderSettings;
|
import com.replaymod.render.RenderSettings;
|
||||||
import com.replaymod.render.ReplayModRender;
|
import com.replaymod.render.ReplayModRender;
|
||||||
|
import com.replaymod.render.Setting;
|
||||||
import com.replaymod.render.rendering.VideoRenderer;
|
import com.replaymod.render.rendering.VideoRenderer;
|
||||||
import com.replaymod.replay.ReplayHandler;
|
import com.replaymod.replay.ReplayHandler;
|
||||||
import com.replaymod.replaystudio.pathing.path.Timeline;
|
import com.replaymod.replaystudio.pathing.path.Timeline;
|
||||||
@@ -409,7 +410,7 @@ public class GuiRenderSettings extends GuiScreen implements Closeable {
|
|||||||
|
|
||||||
private File generateOutputFile(RenderSettings.EncodingPreset encodingPreset) {
|
private File generateOutputFile(RenderSettings.EncodingPreset encodingPreset) {
|
||||||
String fileName = new SimpleDateFormat("yyyy_MM_dd_HH_mm_ss").format(new Date());
|
String fileName = new SimpleDateFormat("yyyy_MM_dd_HH_mm_ss").format(new Date());
|
||||||
File folder = ReplayModRender.instance.getVideoFolder();
|
File folder = new File(ReplayModRender.instance.getCore().getSettingsRegistry().get(Setting.RENDER_PATH));
|
||||||
return new File(folder, fileName + "." + encodingPreset.getFileExtension());
|
return new File(folder, fileName + "." + encodingPreset.getFileExtension());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ import com.replaymod.render.RenderSettings;
|
|||||||
import com.replaymod.render.ReplayModRender;
|
import com.replaymod.render.ReplayModRender;
|
||||||
import com.replaymod.render.VideoWriter;
|
import com.replaymod.render.VideoWriter;
|
||||||
import com.replaymod.render.capturer.RenderInfo;
|
import com.replaymod.render.capturer.RenderInfo;
|
||||||
import com.replaymod.render.events.ReplayRenderEvent;
|
|
||||||
import com.replaymod.render.frame.RGBFrame;
|
import com.replaymod.render.frame.RGBFrame;
|
||||||
import com.replaymod.render.gui.GuiRenderingDone;
|
import com.replaymod.render.gui.GuiRenderingDone;
|
||||||
import com.replaymod.render.gui.GuiVideoRenderer;
|
import com.replaymod.render.gui.GuiVideoRenderer;
|
||||||
@@ -23,7 +22,6 @@ import net.minecraft.client.renderer.OpenGlHelper;
|
|||||||
import net.minecraft.client.shader.Framebuffer;
|
import net.minecraft.client.shader.Framebuffer;
|
||||||
import net.minecraft.util.SoundCategory;
|
import net.minecraft.util.SoundCategory;
|
||||||
import net.minecraft.util.Timer;
|
import net.minecraft.util.Timer;
|
||||||
import net.minecraftforge.common.MinecraftForge;
|
|
||||||
import org.lwjgl.input.Mouse;
|
import org.lwjgl.input.Mouse;
|
||||||
import org.lwjgl.opengl.Display;
|
import org.lwjgl.opengl.Display;
|
||||||
import org.lwjgl.util.Dimension;
|
import org.lwjgl.util.Dimension;
|
||||||
@@ -88,8 +86,6 @@ public class VideoRenderer implements RenderInfo {
|
|||||||
* @return {@code true} if rendering was successful, {@code false} if the user aborted rendering (or the window was closed)
|
* @return {@code true} if rendering was successful, {@code false} if the user aborted rendering (or the window was closed)
|
||||||
*/
|
*/
|
||||||
public boolean renderVideo() {
|
public boolean renderVideo() {
|
||||||
MinecraftForge.EVENT_BUS.post(new ReplayRenderEvent.Pre(this));
|
|
||||||
|
|
||||||
setup();
|
setup();
|
||||||
|
|
||||||
// Because this might take some time to prepare we'll render the GUI at least once to not confuse the user
|
// Because this might take some time to prepare we'll render the GUI at least once to not confuse the user
|
||||||
@@ -133,9 +129,6 @@ public class VideoRenderer implements RenderInfo {
|
|||||||
}
|
}
|
||||||
|
|
||||||
finish();
|
finish();
|
||||||
|
|
||||||
MinecraftForge.EVENT_BUS.post(new ReplayRenderEvent.Post(this));
|
|
||||||
|
|
||||||
return !cancelled;
|
return !cancelled;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||