Commit Graph
100 Commits
Author SHA1 Message Date
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
Jonas Herzig d6cd917d9d Fix passengers getting stuck in unloaded chunks (fixes #606)
We need to update the vehicle before its passengers.
2021-12-07 13:35:36 +01:00
Jonas Herzig 88a23222b6 Fix vanilla 1.18 bug causing entities to get stuck outside sim range
MC uses the client-side position of an entity to determine whether it is inside
the simulation range and therefore whether it will get ticked. For some (most)
entities it interpolates the client-side position to match the server-side one
inside of the tick method... no prices for guessing where this goes wrong.

Somewhat similar to the issue we have with chunk unloads which we work around in
FullReplaySender but worse cause they'll get stuck if they ever leave the sim
range even for a single tick, rather then just when their chunk is unloaded.
2021-12-07 13:35:36 +01:00
Jonas Herzig ff5c0f594e Fix chunks missing on first frame when rendering without Sodium 2021-12-07 13:35:36 +01:00
Jonas Herzig 58ba590c84 Fix replay being restarted when resuming path playback 2021-12-07 13:35:36 +01:00
Jonas Herzig 549996b270 Fix underwater visibility (fixes #572)
Used to always be super short because that method returns 0 when `isSubmergedIn`
returns false.
2021-12-07 13:35:31 +01:00
Jonas Herzig bd0dd10942 Ensure we cannot accidentally open a replay file twice
E.g. from the Replay Viewer while it is still being recovered.
Because that would potentially corrupt it.
2021-11-29 17:42:44 +01:00
Jonas Herzig 31817bcf11 Split replay folder and file management into their own classes 2021-11-29 17:42:44 +01:00
Jonas Herzig ce5886a427 Port to MC 1.18-rc4 2021-11-29 17:42:44 +01:00
Jonas Herzig b6f623efb8 Update Gradle to 7.3 2021-11-29 16:22:37 +01:00
Jonas Herzig 2ee8fe49c5 Update FG 2.1 to download MCP from Forge maven
Cause the MCP site is now offline.
2021-11-29 16:22:37 +01:00
Jonas Herzig 090778ca63 Fix build for 1.15.x and below 2021-11-29 16:22:37 +01:00
Jonas Herzig dd055e5c5b Fix build for 1.8 2021-11-29 16:22:37 +01:00
Jonas Herzig 6e1febdab8 Port to MC 1.18-pre1 2021-11-14 17:27:35 +01:00
Jonas Herzig d2f27e3918 Update Loom to 0.10 2021-11-14 16:09:37 +01:00
Jonas Herzig 55f3a15db6 Release 2.6.1 2021-08-21 15:32:42 +02:00
Jonas Herzig 33328adc9f Fix recording of 4-8 block teleports on 1.8.9 and below (fixes #525) 2021-08-21 15:11:55 +02:00
Jonas Herzig 5f9297b78e Improve lang resource pack injection point (closes #532)
Previously we injected it as a regular builtin resource pack (like the
Programmer Art pack) and hid it on the resource pack screen but this is bad for
several reasons. The most significant one being that it can be re-ordered and
makes the resource pack list ordering weird if you don't know that there is an
invisible pack there.
It also unnecessarily messes with other mods which make certain assumptions
about configurable resource packs (e.g. EBE, though in that case, it merely
triggers an existing bug in EBE).

We now instead inject it into the final resource pack list which gets
constructed from the configured packs, but never as a configurable pack itself.
2021-08-21 15:11:55 +02:00
Jonas Herzig 411eaa4ca8 Fix spectator hand jumping when rotating across 0 yaw boundary
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).

Instead we now use the `headYaw` value, which does not wrap around and as such
does not have this issue.
2021-08-21 15:11:55 +02:00
Jonas Herzig 6428416bc4 Fix between-ticks position of hand when spectating (fixes #563) 2021-08-21 15:11:55 +02:00
Jonas Herzig 0e5de6c816 Update ReplayStudio
c9de2f5 Fix incorrect initial version for Combat* packets (fixes #568)
a22df13 Fix off-by-3 in quick mode chunk unloading code
2e2cac4 Guard against bad chunk light masks (fixes #557)
2021-08-21 15:11:41 +02:00
Jonas Herzig 0ceb95a5e2 Abort path preview when opening render screen (fixes #524) 2021-08-21 15:11:41 +02:00
Jonas Herzig de3f4dab7e Pause path playback while resource pack is loading (closes #540) 2021-08-21 15:11:41 +02:00
Jonas Herzig 612a90681e Reset camera inventory when no longer spectating (fixes #546) 2021-08-21 15:11:29 +02:00
Jonas Herzig 88dece679d Fix scissor state not including scissor bounds (fixes #556)
This caused the bounds to not be relaxed after e.g. lists and as such the scroll
bar and shadows would not render properly.
2021-08-15 17:25:23 +02:00
Jonas Herzig 82c7da8739 Fix advanced screenshot GUI not opening on 1.17.1 (fixes #559) 2021-08-15 16:53:12 +02:00
Jonas Herzig b243dfc625 Workaround soft-lock when REI screen is closed (fixes #560) 2021-08-15 16:41:50 +02:00
Jonas Herzig 27f365a60a Change skin-caching feature to be fail-safe (fixes #561) 2021-08-15 13:53:31 +02:00
Jonas Herzig 463c51be85 Convert getDefaultRenderSettings into default constructor
Allows us to completely get rid of the custom Gson instance and is more
idiomatic anyway.
2021-08-15 11:45:23 +02:00
Jonas Herzig 9626a4c442 Fix parsing of render queue with chroma key (fixes #564)
By simply replacing the private field with a concrete type, so we do not need to
manually register one when constructing the gson instance (which is evidently
too easy to forget about).
2021-08-15 11:39:10 +02:00
Jonas Herzig 3db8c28505 Fix .no_recover files never being cleaned up (fixes #497) 2021-08-15 11:28:11 +02:00
Jonas Herzig 110199044f Fix nametags not rendering in screenhots (fixes #498)
No clue why this extra hud hiding was even there in the first place, the
renderer already takes care of properly hiding the hud (without hiding the
nametags) as it does for videos as well.
2021-08-15 11:19:52 +02:00
Jonas Herzig 4a587eed74 Workaround crash with REI and MainMenuScale (fixes #501, fixes #473) 2021-08-15 11:07:19 +02:00
Jonas Herzig e2b0422965 Fix timeline not saving when completely overwritten (fixes #505)
Either when it is cleared or when it is loaded from the keyframe repository, if
you exit the replay without any further changes, this used to not be saved.
2021-08-15 10:47:34 +02:00
Jonas Herzig a793cbee0d Remove RM 2.6+ for MC 1.7.10 from versions.json 2021-08-01 16:59:51 +02:00
Jonas Herzig f95a943589 Release 2.6.0 2021-07-31 16:01:48 +02:00
Jonas Herzig c88b4c1e76 Add missing .gitkeep files 2021-07-31 16:01:11 +02:00
Jonas Herzig a457bccf12 Fix Java 9+ ABI being used for Java 8 versions 2021-07-31 15:31:43 +02:00
Jonas Herzig 3cba99068e Increase default bitrate to from 10 to 20mbps 2021-07-31 14:37:10 +02:00
Jonas Herzig e9bf75b4d6 Remove ModCore
That was never actually finished and we do not need to keep it around anymore.
Whether we add its successor once that is ready for production use remains to be
seen.
2021-07-24 19:15:08 +02:00
Jonas Herzig 5bede327f3 Update jGui (fixes textures with Sodium) 2021-07-24 17:09:16 +02:00
Jonas Herzig 0cb14a9106 Re-introduce entity-in-wrong-chunk-at-unload workaround (fixes #548)
Nope, this was not fixed, they just changed where the chunkCoords are stored but
the interpolation issue remains.
2021-07-24 17:06:46 +02:00
Jonas Herzig 35fef5176d Fix skins of server-only NPCs being unreliable (fixes #486) 2021-07-24 14:43:38 +02:00
Jonas Herzig 3ef355a267 Failure to hide cache folder should never be fatal (closes #512) 2021-07-24 13:17:14 +02:00
Jonas Herzig 4090e7b540 Search for homebrew in /opt as well (fixes #496) 2021-07-24 13:14:23 +02:00
Jonas Herzig 2891c4e8fa Remove MP4 Default Quality preset (closes #475)
Similar to High Quality, it is too unpredictable, sometimes giving bad quality
and sometimes being unbearably slow. We should just encourage everyone to set
their bitrate manually.
2021-07-24 12:59:06 +02:00
Jonas Herzig 83cb459957 Fix keyframes being required to open render queue window
Half the reason we swapped the render queue / settings parent relationship was
so we don't need to go through the settings screen to access the queue. But for
some reason I stopped half way through and didn't also move the "You need at
last two keyframes." popup. This commit rectifies that.
2021-07-24 12:46:13 +02:00
Jonas Herzig 3f4dae05db Fix missing preprocessor comments 2021-07-24 11:30:34 +02:00
Jonas Herzig 2f4360a2a1 Fix Mixin_PreserveDepthDuringGuiRendering for 1.14-16 2021-07-24 11:29:27 +02:00
Jonas Herzig 2415a886e2 Update to 1.17.1 2021-07-24 11:05:39 +02:00
Jonas Herzig 927db36baa Use same fabric-loader version across all MC versions 2021-07-24 11:05:00 +02:00
Jonas Herzig d0620091d2 Add support for FREX Flawless Frames API (fixes #150) 2021-07-24 09:11:34 +02:00
Jonas Herzig 96bb1abc1d Update ReplayStudio
0e72e36 Add workaround for lack of way to determine global palette size
872bc75 Update vanilla global palette size
19d3dab Fix OOB when converting local palette storage to global palette (fixes #509)
c93a370 Fix incorrect packet release during SquashFilter.flush (fixes #490, fixes #492)
2021-07-01 14:05:52 +02:00
Jonas Herzig 7a52a29ef3 Fix race condition in resource pack recording (fixes #521)
If the server sends the resource pack right on connect (rather than when
switching to a sub-server), then `mc.getNetworkHandler()` will be null.
2021-07-01 14:05:52 +02:00
Jonas Herzig 7ab2edd738 Implement ODS rendering via Iris Shader for MC 1.17 2021-07-01 14:05:52 +02:00
Jonas Herzig f462a5b391 Fix 1.12 shim Window.getScaledHeight 2021-07-01 14:05:52 +02:00
Jonas Herzig e85618a27c Change frame time (used by Iris) to be based on replay or video time
Iris derives that one from the frameStartNanos argument passed to the render
method and shaders usually use it to do animations. Prior to this commit we
always pass 0 which effectively froze any shader animations.

With this commit, we now compute the frameStartNanos based on the
FPS of the video we are rendering (so animations will happen in real time when
watching the video) or based on the time in the replay (so animations will
be influenced by playback speed / be frozen if the replay is frozen).
We default to the video time based approach because the replay time one may
produce undesirable results when it comes to things like motion blur and TAA.
2021-07-01 14:05:52 +02:00
Jonas Herzig 3f2456ba65 Use GameRenderer.render instead of renderWorld, improves compat
In particular, Iris updates its frame counter and timer in the outer method, so
if we only call the inner one, then its shadows and sky will not update
properly.
Since the render method also renders the GUI, we set the current screen to null
and cancel the HUD during rendering. MC also clears the depth before rendering
the HUD, which we don't want because it breaks the depth map export, so we
cancel that as well.

This also allows Vanilla post-processing (aka Super Secret Settings, aka Vanilla
Shaders) as well as entity outlines to function properly cause those are applied
in that method as well.
Should have done this a long time ago but better late than never.

Closes #321
2021-07-01 14:05:52 +02:00
Jonas Herzig ed99e240ec Bundle missing transitive fabric-api dependency 2021-06-28 19:06:26 +02:00
Jonas Herzig 0fcb27c6b2 Fix keyPressed/keyReleased injection targets 2021-06-28 19:06:26 +02:00
Jonas Herzig 5289026313 Bump MC to 1.17 proper 2021-06-28 19:06:26 +02:00
Jonas Herzig 2be47e9810 Change ReplayButton icon to be white with shadow for better contrast
The previous one, blue with no shadow, had horrible contrast with the button
background and did not fit well with any of the other buttons.
Now it does (except that it's not yet in the 20-pixel width/height style).
2021-06-28 19:06:26 +02:00
Jonas Herzig 1af4add932 Update ReplayStudio
- MC 1.17
- Updated ViaVersion
- Quick Mode supports multiple worlds now (and no longer needs a manual Respawn)
2021-06-28 19:06:26 +02:00
Jonas Herzig 8d3d705fed Switch to commons-lang Pair instead of the ViaVersion one
Cause that one will be removed in a future version, and the lang one is just
fine.
2021-06-28 14:35:57 +02:00
Jonas Herzig 766d3346ee Pin FG5 version because its maintainers cannot be trusted
Versions after 5.0.5 emit tsrg2 instead of tsrg, breaking anything which reads
those files (e.g. Mixin and the preprocessor), later versions even bump the
required Gradle version.
2021-06-27 14:44:16 +02:00
Jonas Herzig 08165252d5 Switch to new Quick Mode backend 2021-06-06 10:42:16 +02:00
Jonas Herzig 1802b1a7d0 Port to 1.17-pre1 2021-06-06 10:42:16 +02:00
Jonas Herzig 5f2dca08d1 Fix "Cannot register receiver while client is not logging in!"
Since MC provides no reliable way to get the connection while still in the login
phase, Fabric API tries to determine it either from MinecraftClient's connection
field (for the integrated server) or from the ConnectScreen (for multiplayer).
However, neither is present during a replay, leading to the aforementioned
error.

To fix this, we store our ClientConnection in MinecraftClient's connection
field. This should have no significant effect on vanilla behavior.

Also remove the dead Forge 1.14 code which was in the same place.
2021-06-05 23:01:16 +02:00
Jonas Herzig 25a6cdc502 Fix RenderSettings (de)serialization with Java 16 (fixes #520)
Turns out we were relying on the implementation detail of the File class, and
Java 16 ensures we cannot do that.
2021-06-05 23:01:16 +02:00
Jonas Herzig 9d3583293b Bundle Gson on 1.11.2 and below (fixes #421)
Decided to go with 1.11.2 because the Gson from that version is the first to not
have the JsonAdapter annotiation, which we want for fixing #520.
2021-06-05 23:01:16 +02:00
Jonas Herzig e380907334 Switch preprocessor config to flat style 2021-06-05 23:01:16 +02:00
Jonas Herzig 4cdbfb7c46 Update Gradle to 7.0.2 2021-06-05 23:01:16 +02:00
Jonas Herzig 59fb58c6fc Disable 1.7.10 for now
Continued support would require porting FG1.2 to Gradle 7 / Java 16.
2021-06-05 22:57:46 +02:00
Jonas Herzig 3440b8d8a8 Update loom to 0.6 2021-03-14 12:13:06 +01:00
Jonas Herzig 537795f9ca Backport contextual key bindings to 1.12.2 and below (closes #478) 2021-03-14 12:12:53 +01:00
Jonas Herzig dda6bd41b6 Implement ffmpeg-independent PNGWriter (closes #476)
Creates a dedicated folder for each video and does not depend on ffmpeg, just
like the EXRWriter (but supporting all MC versions).

Also does 32 bit depth export by chunking the 32-bit float into the 8-bit BGRA
component channels.
2021-03-14 12:12:53 +01:00
Jonas Herzig 8ff27437af Add configurable, small Replay Viewer button (closes #471) 2021-03-14 12:12:53 +01:00
Jonas Herzig c6b41d76fa Document valid values for MultipleChoiceSettings in config file 2021-03-14 12:12:53 +01:00
Jonas Herzig 4ca4f2def6 Auto-reload config file on changes (Fabric only) 2021-03-14 12:12:53 +01:00
Jonas Herzig 61d67a5e80 Remove OpenEye (closes #465)
It is not available for Fabric and we stopped using it.
2021-03-14 12:12:53 +01:00
Jonas Herzig b7309283e9 Rename MixinRendererLivingEntity -> Mixin_HideNameTags_LivingEntity 2021-03-14 12:12:53 +01:00
Jonas Herzig a97190de1e Move MixinRendererLivingEntity into 1.8.9 project 2021-03-14 12:12:53 +01:00
Jonas Herzig c17fc79ab2 Rename MixinRender -> Mixin_HideNameTags 2021-03-14 12:12:53 +01:00
Jonas Herzig 1924963d75 Move MixinOpenGlHelper into 1.7.10 project 2021-03-14 12:12:53 +01:00
Jonas Herzig aba34d6c6f Rename Mixin_CubicRotation -> Mixin_Omnidirectional_Rotation 2021-03-14 12:12:53 +01:00
Jonas Herzig db5708f338 Rename MixinFrustum -> Mixin_Omnidirectional_DisableFrustumCulling 2021-03-14 12:12:53 +01:00
Jonas Herzig 6974f8e60c Rename MixinCamera -> Mixin_StabilizeCamera 2021-03-14 12:12:53 +01:00
Jonas Herzig 3ec81d5c35 Split MixinEntityRenderer into multiple, more focused files 2021-03-14 12:12:53 +01:00
Jonas Herzig fad89626e5 Move 1.7.10 code from MixinEntityRenderer to Mixin_ForceChunkLoading 2021-03-14 12:12:53 +01:00
Jonas Herzig e7a1fafdf9 Extract Mixin_ChromaKeyDisableFog from other mixins 2021-03-14 12:12:53 +01:00
Jonas Herzig cf1d7537e8 Move MixinEffectRenderer into 1.8.9 project 2021-03-14 12:12:53 +01:00
Jonas Herzig 10426f9d39 Move MixinChunkRenderWorker into 1.14.4 project 2021-03-14 12:12:53 +01:00