Commit Graph
100 Commits
Author SHA1 Message Date
Jonas Herzig 000ff19749 Fix depth export while spectating on 1.12.2 and below (fixes #785) 2022-12-07 16:34:55 +01:00
Jonas Herzig ffcca61b5b Fix running in 1.14.4 dev environment
First version of modmenu in its repo appears to be for 1.15, so we need to
disable it in 1.14.
2022-12-07 16:34:55 +01:00
Jonas Herzig d571e8fed5 Port to MC 1.19.3
Building against 1.19.3-rc3 for now because 1.19.3 has yet to release.
ReplayStudio/ViaVersion is already targeting the release version though.
2022-12-07 16:34:55 +01:00
Jonas Herzig e8ea70aabc Port to MC 1.19.2 (fixes #801) 2022-12-07 16:34:50 +01:00
Jonas Herzig e0a682a5df Fix armor missing after dimension change (fixes #791)
The respawn packet re-creates the player entity, so we need to re-send its
armor (and technically also the riding and sleeping state, though that probably
wouldn't ever have caused issues in practice because a respawn will implicitly
reset those, unlike your inventory which is preserved).
2022-12-06 18:01:07 +01:00
Jonas Herzig 19404032fe Fix jGui resource pack when using per-version run folder 2022-12-06 17:51:55 +01:00
Jonas Herzig bee13fc9a1 Replace projection matrix Redirect with ModifyArg
Should be better for compatibility because multiple mods can ModifyArg but only
one can Redirect, and will be easier to port to 1.19.3.
2022-12-06 17:37:15 +01:00
Jonas Herzig 3cec8fde9f Release 2.6.8 2022-08-10 14:29:15 +02:00
Jonas Herzig cce65ec76d Ignore expired player public keys during replay
These would otherwise fail to be initialized and cause the game to disconnect
itself on the first chat message from the corresponding player.
2022-08-10 14:22:21 +02:00
Jonas Herzig 06f1e0c36c Fix chat message validation failure when Show Chat is off on 1.19.1+ 2022-08-10 14:22:21 +02:00
Jonas Herzig 35d1b7f24b Fix game crashing if client disconnects from replay during jump 2022-08-10 13:47:47 +02:00
Jonas Herzig 82d4408567 Add missing MC 1.19.1 .gitkeep file 2022-07-31 14:38:54 +02:00
Jonas Herzig e8ff8a2066 Release 2.6.7 2022-07-31 13:46:49 +02:00
Jonas Herzig ff98260216 Fix build on MC 1.8 2022-07-31 13:46:01 +02:00
Jonas Herzig c34f75d95a Fix item staying visually equipped after being dropped (fixes #658) 2022-07-31 13:03:43 +02:00
Jonas Herzig 62b9cd0538 Use DefaultedList for equipment tracking
Because on 1.11+ a `null` item stack is not something that should exist.
This then also allows us to compare item stacks by value rather than only by
reference, potentially saving a few redundant entity equipment update
packets (but more importantly, also allows us to store a copy instead of the
original, which will be important for the next commit).
2022-07-31 13:03:43 +02:00
Jonas Herzig 42d04d123c Deduplicate code 2022-07-31 12:55:54 +02:00
Jonas Herzig 7550e3dcb7 Fix race conditions in movement packet filtering (fixes #760)
We cannot filter this packet purely on the netty thread because our filter
depends on the current camera position (if it's too far, we do want to teleport
it closer) and accessing the camera is only safe from the main thread.

Previously the second part had not been considered which could lead to race
conditions where the camera may not yet exist on the netty thread at time of
handling. These appear to have gotten the wholly inappropriate "just put a null
check around it" treatment, but that means that the filter sometimes doesn't
work (hence the bug report).

This commit changes handling such that all access to `allowMovement` is always
done on the main thread and then moves the filtering there as well. And
therefore filtering should now work properly.
2022-07-31 12:55:54 +02:00
Jonas Herzig af3f6ddbe2 Always handle PlayerPositionLookS2CPacket manually 2022-07-31 12:48:39 +02:00
Jonas Herzig 962f08718f Fix "Show Chat" setting on 1.19+ (fixes #757) 2022-07-31 10:38:14 +02:00
Jonas Herzig a9401a9779 Update ModMenu 2022-07-31 10:38:07 +02:00
Jonas Herzig 400ec6bda5 Port to MC 1.19.1 2022-07-31 10:37:22 +02:00
Jonas Herzig bdea84b9a2 Remove unused GuiMainMenuAccessor 2022-07-31 10:22:20 +02:00
Jonas Herzig 6db47ee070 Updated broken forge docs link 2022-07-31 10:22:11 +02:00
Jonas Herzig a95edaa31d Update translations 2022-07-31 09:30:19 +02:00
Jonas Herzig 738320e896 Update translations 2022-07-17 23:03:44 +02:00
Jonas Herzig 6e3d30e41b Fix thread unsafety in OpenGlToBitmapProcessor
Sharing the temporary `row` and `rowSwap` buffers between different calls to the
processor is not safe because it will be used by multiple threads.
As a result some of the rows in the image could randomly get corrupted.

This commit gets rid of the cached buffers (the value of which questionable
anyway) and simply re-uses the same code which other processors use.
2022-07-17 17:08:03 +02:00
Jonas Herzig 633ac10d89 Fix main hand in first person spectator view (fixes #731) 2022-07-17 17:08:03 +02:00
Jonas Herzig 42aef017c1 Fix skin in Player Overview and first person on 1.8.9 (fixes #749)
No clue why `getResourceLocationForPlayerUUID` was implemented the way it was,
that commit dates back to 2015 (332c36a), but if the skin isn't loaded yet, it
won't load it, so sometimes it just won't show properly in first person and in
the Player Overview.
This commit just calls `AbstractClientPlayer.getSkinTexture` instead.

Unclear which MC versions are affected. At some point before 1.16.4 something
else was introduced which loads the skin for us, hence why modern versions were
not affected.
2022-07-17 16:02:41 +02:00
Jonas Herzig 3526ec526c Release 2.6.6 2022-06-26 14:49:13 +02:00
Jonas Herzig 7457f9c13b Increase maximum camera speed by about an order of magnitude 2022-06-26 13:54:52 +02:00
Jonas Herzig 08c86ce574 Enable compression for OpenEXR if we have the cpu power for it 2022-06-26 13:33:13 +02:00
Jonas Herzig 517591d72a Encode OpenEXR and PNG frames in parallel 2022-06-26 13:32:58 +02:00
Jonas Herzig a3f4049322 Reduces minimum speed of classic camera controller
Two blocks per second is still quite fast, so this commit reduces the minimum to
a tenth of that, allowing for much finer control.
2022-06-26 12:30:23 +02:00
Jonas Herzig 4f9a730b6d Fix classic camera speed changing way too quickly (fixes #719)
On my system, a single scroll tick results in 120 calls, which is fine for the
vanilla camera controller because it has a range of 2000, but the classic
controller only has a range of 36, making it impossible to select anything but
the extremes.
This commit changes the size of the range to match that of the vanilla controller.
2022-06-26 12:28:07 +02:00
Jonas Herzig 40f07279cf Load tinyexr in its own class loader
That way we can simply use whatever version we want and aren't tied to the
version of lwjgl which MC provides.

This fixes the OpenEXR export on 1.19 crashing either due to the windows
workaround or due to differing lwjgl versions (depending on OS).
And also enables OpenEXR export on MC versions using lwjgl2 (1.12.2 and below).
2022-06-26 11:57:24 +02:00
Jonas Herzig 814d0b7c17 Update ReplayStudio
Fixes fatal QuickMode error introduced with the 1.19 update.
2022-06-15 14:18:23 +02:00
Jonas Herzig 13ac8dcf0a Record raw packets instead of re-encoding decoded packets
Until now, recording worked by injecting right before the vanilla packet
handler. At that point it was receiving packet classes and had to re-encode them
to store them in the replay file. However, not all decoded packets can
necessarily be re-encoded without errors, requiring us to have a bunch of
workarounds.

This commit changes the way recording works by injecting right before the
decoder. It therefore receives the raw bytebufs and no longer has to deal with
the re-encode issue.
2022-06-15 14:18:23 +02:00
Jonas Herzig df11ba2e36 Port to MC 1.19 2022-06-12 13:47:41 +02:00
Jonas Herzig 9ce25f711f Port to MC 1.19-pre3 2022-05-27 10:05:50 +02:00
Jonas Herzig 9f8957f468 Migrate away from deprecated fabric-api modules 2022-05-26 08:19:34 +02:00
Jonas Herzig f595d9ca23 Release 2.6.5 2022-05-01 21:25:21 +02:00
Jonas Herzig 716df74893 Fix first person (cross)bow model animation on 1.9+ (fixes #708) 2022-05-01 21:06:24 +02:00
Jonas Herzig 4364347a19 Update ReplayStudio
6fc8e20 Fix incorrect relative packet order in squash filter (fixes #718)
2022-05-01 20:34:26 +02:00
Jonas Herzig 8b2d42f801 Fix broken fog when using Chroma Key with Sodium (fixes #726) 2022-05-01 20:05:00 +02:00
Jonas Herzig f2c96174bc Fix terrain culling not being updated for omnidirectional rendering
Terrain culling is only updated when the camera position or rotation changes.
For omnidirectional rendering, we don't change the camera directly though, we
rotate way earlier so we can consistently get before any other effects. As a
result, the terrain frustum culling wasn't updated between render passes
resulting in missing terrain.
This was largely masked by the fact that we used to call GameRenderer.onResize
every pass (even when the size hadn't changed) but fixing that made this issue
become apparent.
2022-04-17 12:01:40 +02:00
Jonas Herzig 497b8440ca Call Window.onFramebufferSizeChanged to resize (fixes #705)
Instead of setting the the values via accessor and calling the handler directly.
This allows mods like ResolutionControl+ to properly resize its internal
framebuffers as well.
2022-04-17 12:01:40 +02:00
Jonas Herzig 5be57681af Completely bypass Minecraft when window is resized during rendering
Should fix issues where resizing affects the render result.
2022-04-17 12:01:40 +02:00
Jonas Herzig fd9be55f79 Remove caching of ScaledResolution from Window shim
It'll become stale if the code holds on to the Window shim object for a longer
duration, and there's no reliable mechanism to invalidate it.
2022-04-17 12:01:40 +02:00
Jonas Herzig 4558793030 Remove unless window size tracking
The only thing we care about is the framebuffer size, cause that will differ
between game and progress gui rendering. The window size will be the same (real)
size for both.
2022-04-17 12:01:40 +02:00
Jonas Herzig fb36fc2ba8 Fix render progress framebuffer never being deleted 2022-04-10 18:20:26 +02:00
Jonas Herzig 01d37ab2cb Split gui window/framebuffer management code from VideoRenderer 2022-04-10 18:20:16 +02:00
Jonas Herzig a6c09bcb8a Fix crash when window is minimized on Windows 2022-04-10 15:33:42 +02:00
Jonas Herzig fb38a20465 Fix path separator in replay name
Would probably have been caught by the write check as well, except in the
specific case where the folder exists, e.g. `../`
2022-04-10 13:52:14 +02:00
Jonas Herzig d6c6220bdd Fix invalid characters in replay name on Windows (fixes #715) 2022-04-10 13:48:47 +02:00
Jonas Herzig 463b947c2b Suppress fabric-screen-handler-api during playback (fixes #713) 2022-04-10 13:36:50 +02:00
Jonas Herzig 8e140e8d01 Release 2.6.4 2022-03-09 07:09:00 +01:00
Jonas Herzig c010a437fc Orient camera for ODS in game instead of in vertex shader
This makes it work more like regular 360 mode and is generally more compatible
because it doesn't require the frustum culling workarounds which the GPU
solution needs.
In particular, this fixes frustum culling with newer sodium versions (which no
longer use the vanilla intersection checking method) and fixes the clouds on
modern Iris (which seems to be using a different shader program for clouds).
2022-03-09 07:08:02 +01:00
Jonas Herzig f2425a693a DRY (Iris)ODSFrameCapturer 2022-03-09 07:08:02 +01:00
Jonas Herzig 9df2035ca9 Update translations 2022-03-09 07:08:02 +01:00
Jonas Herzig 4aa667fe04 Port to MC 1.18.2 (closes #697) 2022-03-09 07:08:02 +01:00
Jonas Herzig 1fa027f362 Enable Quick Mode for 1.8.x 2022-03-06 13:39:49 +01:00
Jonas Herzig 74049dad77 Update ReplayStudio
9c5dec8 Fix writing of empty chunk load packet on 1.8.x (fixes #636)
3d8573f Fix writing of respawn packet on 1.8.x
39a85f7 Fix exception when cache file has invalid gzip header (fixes #535)
2022-03-06 13:39:49 +01:00
Jonas Herzig c146aa145c Fix stereoscopic eye offset on 1.16+
The mapping between intermediary name on 1.15.2 and yarn on 1.16.1 has already
been added in the previous commit.
2022-03-06 13:39:49 +01:00
Jonas Herzig ee6b53b247 Fix incorrect FOV and aspect during 360 render on 1.16+ 2022-03-06 13:39:49 +01:00
Jonas Herzig 1efb17e144 Fix ODS rendering on Iris 1.1.3+ (fixes #693) 2022-03-06 13:39:49 +01:00
Jonas Herzig 8573a9b208 Prevent jumping while path is playing (closes #694) 2022-03-06 13:39:49 +01:00
Jonas Herzig 0356fef61d Fix crash when receiving resource pack on 1.8-1.12.2 (fixes #86) 2022-03-06 13:39:49 +01:00
Jonas Herzig f9c58a1165 Try raw file name before percent encoding it (closes #536) 2022-03-06 13:39:49 +01:00
Jonas Herzig d178c0980e Log when replays are opened (closes #565) 2022-03-06 13:39:49 +01:00
Jonas Herzig b8cf7e6df4 Fix scrolling while replay paused on 1.12.2 and below (fixes #590) 2022-03-06 13:39:49 +01:00
Jonas Herzig 2e34a2abd9 Fix render timer breaking when system time changes (fixes #633)
Unlike `currentTimeMillis`, `nanoTime` is guaranteed to be relative to a
fixed point in time, regardless of system or wall-clock time.
2022-03-06 13:39:49 +01:00
Jonas Herzig e26480f041 Fix "Please wait" when jumping not being centered (fixes #646) 2022-03-06 13:39:49 +01:00
Jonas Herzig a8d05a2bca Skip mod compat warning screen when in render queue (fixes #653) 2022-03-06 13:39:49 +01:00
Jonas Herzig 7615499cef Add option to preserve alpha channel in export (closes #661)
Default off cause it being on by default had confused quite a few people.
2022-03-06 13:39:49 +01:00
Jonas Herzig fe67d7fa14 Link to our docs in the "Missing ffmpeg" screen (closes #663) 2022-03-06 13:39:49 +01:00
Jonas Herzig fb7900d805 Fix missing hand with Iris 1.1.3 and above (fixes #638) 2022-03-06 13:39:49 +01:00
Jonas Herzig 4a5df2ad6d Use GameRenderer.renderHand boolean field instead of mixin
Should be more compatible with mods which replace the entire renderHand
method (thereby making our mixin non-applicable), at least as long as these mods
check `renderHand` as well (Iris explicitly does).

This will become important once #638 is fixed.
2022-03-06 13:39:10 +01:00
Jonas Herzig 6cc370a117 Workaround Java breaking with symlinks (fixes #660) 2022-03-05 17:21:38 +01:00
Jonas Herzig abfb3d46f3 Use per-version folder for pack.mcmeta
Comments are not supported here, and depending on the exact environment, that
may break stuff (seems to only happen on fabric in dev).
2022-03-05 17:21:38 +01:00
Jonas Herzig 0b8a2a107c Use separate thread to send packets, even in sync mode (fixes #674) 2022-03-05 17:21:38 +01:00
Jonas Herzig e378ae8f93 Fix entities disappearing on 1.16.1 and 1.15.2 client (fixes #657) 2022-02-27 10:57:49 +01:00
Jonas Herzig 9528a5761c Update old ModMenu versions
To use the new maven group and for compatibility with newer fabric-loader.
2022-02-27 10:54:19 +01:00
Jonas Herzig 39ccea931d Release 2.6.3 2021-12-11 11:19:41 +01:00
Jonas Herzig 841c99148e Fix initial entity rotation getting lost (fixes #619)
This fixes the rotation of already existing entities that just got sent to the
client. Those get spawned with their rotation, which we didn't capture. This
commit fixes that by initializing our tracked rotation to NaN and returning the
original rotation until the tracked one is initialized (we do it this way rather
than initializing during the spawn packet handling because there are many spawn
packets, especially with modded, and we cannot possibly inject into all of
them).
This does not fix the rotation of newly placed entities (cause they seem to get
spawned with 0/0 and then get teleported to their correct rotation). The
previous commit fixed that case by capturing the rotation from the teleport
packet.
2021-12-11 11:00:57 +01:00
Jonas Herzig e472713d1c Fix rotation from entity teleport getting lost (related to #619)
This fixes the rotation of newly placed entities (cause they seem to get spawned
with 0/0 and then get teleported to their correct rotation, which we didn't
capture).
This does not fix the rotation of already existing entities that just got sent
to the client, those already get spawned with their rotation, which we don't yet
capture. The following commit fixes that.
2021-12-11 10:52:30 +01:00
Jonas Herzig 1d76427a4d Release 2.6.2 2021-12-10 11:52:58 +01:00
Jonas Herzig f943d11661 Bump to MC 1.18.1 2021-12-10 11:51:25 +01:00
Jonas Herzig 2df9049e6b Fix error when loading old replay on Java 9+ (fixes #578)
By updating the shadow plugin used in ReplayStudio.

java.lang.IncompatibleClassChangeError: Inconsistent constant pool data in classfile for class com/replaymod/replaystudio/lib/viaversion/libs/kyori/adventure/text/Component. Method 'boolean lambda$static$0(com.replaymod.replaystudio.lib.viaversion.libs.kyori.adventure.text.Component, com.replaymod.replaystudio.lib.viaversion.libs.kyori.adventure.text.Component)' at index 1064 is CONSTANT_MethodRef and should be CONSTANT_InterfaceMethodRef
2021-12-08 17:30:36 +01:00
Jonas Herzig ad62e51ab3 Fix lighting when block is placed in same frame as chunk load 2021-12-08 16:22:06 +01:00
Jonas Herzig 59ac665c81 Disable auto-sync if there is no stable position (closes #488)
Cause not doing anything is better than flickering between different parts of
the timeline every frame.
2021-12-08 16:04:47 +01:00
Jonas Herzig f4196748f5 Fix recording controls on menu-less pause screen (fixes #575) 2021-12-08 16:04:47 +01:00
Jonas Herzig 3d9d40656e Fix recording of riptide animation (fixes #581)
This code supposedly meant for recording when a player was eating/blocking was
never needed to begin with cause the server echos all data in DataTracker
anyway, and now it broke the riptide animation because that's part of the
living flags as well but wasn't considered here, i.e. unconditionally
overwritten.
2021-12-08 16:04:47 +01:00
Jonas Herzig bd68a80152 Fix chroma key rendering for 1.12.2 and below (fixes #589)
Forge naming strikes again, there's two different `updateCameraAndRender` in
1.14.4 forge, which lead us to use `updateCameraAndRender` for the older version
as well even though our desired method had a different name back then.
2021-12-08 16:04:47 +01:00
Jonas Herzig 96f7b78a38 Fix spectator hand jittering in 1.12.2 and below 2021-12-08 16:04:47 +01:00
Jonas Herzig 1b18b5c952 Fix spectator hand jumping when rotating across 0 yaw boundary, take 2
The `yaw` value of non-client-players is constraint to [0; 360), so when that
boundary is crossed, the `renderYaw` starts interpolating to its goal the
incorrect way round (instead of crossing the 360 boundary as well).

To fix that, we now add the difference between the current `renderYaw` and the
desired one, modulo 360 (but with range (-180; 180]), to the current
`renderYaw`. That way we always take the short way round.
Additionally, because for rendering MC looks at the difference without modulo,
afterwards (and when a new `yaw` is set) we wrap the result around such that the
actual difference is always less than 180 and therefore rendered as intended.
2021-12-08 16:04:47 +01:00
Jonas Herzig 51aa07e01e Revert "Fix spectator hand jumping when rotating across 0 yaw boundary" (fixes #601)
This reverts commit 411eaa4ca8.

The given solution does not work in old versions because those did not use
`getYaw` for hand rendering. Even worse, their headYaw does wrap around and it
does it in a different way than their yaw value, giving a worse result than
without this commit.
2021-12-08 16:04:47 +01:00
Jonas Herzig 29ef38213f Fix vanilla entity update packet handling (fixes #607) 2021-12-08 16:04:47 +01:00
Jonas Herzig b10b4fd25a Fix crash when render queue is not saved properly (fixes #617) 2021-12-07 13:35:36 +01:00
Jonas Herzig 9fa5adf395 Bump to MC 1.18 2021-12-07 13:35:36 +01:00