Commit Graph

282 Commits

Author SHA1 Message Date
Jonas Herzig
f943d11661 Bump to MC 1.18.1 2021-12-10 11:51:25 +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
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
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
ce5886a427 Port to MC 1.18-rc4 2021-11-29 17:42:44 +01:00
Jonas Herzig
6e1febdab8 Port to MC 1.18-pre1 2021-11-14 17:27:35 +01:00
Jonas Herzig
612a90681e Reset camera inventory when no longer spectating (fixes #546) 2021-08-21 15:11:29 +02:00
Jonas Herzig
c88b4c1e76 Add missing .gitkeep files 2021-07-31 16:01:11 +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
f462a5b391 Fix 1.12 shim Window.getScaledHeight 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
1802b1a7d0 Port to 1.17-pre1 2021-06-06 10:42:16 +02:00
Jonas Herzig
c6b41d76fa Document valid values for MultipleChoiceSettings in config file 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
1924963d75 Move MixinOpenGlHelper into 1.7.10 project 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
Jonas Herzig
2fb4f73ae4 Move ChunkRenderDispatcherAccessor into 1.14.4 project 2021-03-14 12:12:53 +01:00
Jonas Herzig
6289545d84 Remove forge/fml event bus from MCVer 2021-03-14 12:12:53 +01:00
Jonas Herzig
cfb9e15b8a Make use of new @Pattern feature to centralize version-aware code
That is, most of the business code should not be aware that it is being compiled
to multiple versions even when it heavily interacts with MC, preprocessor
statements should be an escape hatch, not the norm.
Similarly, code should not be forced to do `MCVer.getWindow(mc)` instead of the
much more intuitive `mc.getWindow()`, and a new preprocessor (technically remap)
feature makes this possible by defining "search and replace"-like patterns (but
smarter in that they are type-aware) in one or more central places (the
"Patterns.java" files) which then are applied all over the code base.

In a way, this is another step in the automatic back-porting process where
preprocessor statements are used when we cannot yet do something automatically.
Previously we "merely" automatically converted between different mapping, this
new feature now also allows us to automatically perform simple refactoring
tasks like changing field access to a getter+setter (e.g. `mc.getWindow()`), or
changing how a method is called (e.g. `BufferBuilder.begin`), or changing a
method call chain (e.g. `dispatcher.camera.getYaw()`), or most other
search-and-replace-like changes and any combination of those.
The only major limitation is that the replacement itself is not smart, so
arguments must be kept in same order (or be temporarily assigned to local
variables which then can be used in any order).
2021-03-14 12:12:51 +01:00
Jonas Herzig
06a46e6f38 Use callback-style events for crosshair and hotbar render events 2021-02-28 09:52:19 +01:00
Jonas Herzig
da16b0fb78 Add 1.14.4 <> 1.12.2 mapping for Option <> GameSettings.Options 2021-02-28 09:52:19 +01:00
Jonas Herzig
f34b88cf7e Move MixinShader into 1.7.10 project 2021-02-28 09:52:19 +01:00
Jonas Herzig
d7dde42add Move HideInvisibleEntities into 1.12.2 project 2021-02-28 09:52:19 +01:00
Jonas Herzig
5f652ec7f2 Move DisableBetterSprinting into 1.12.2 project 2021-02-28 09:52:19 +01:00
Jonas Herzig
05d7971332 Move mapwriter.MixinMinecraft into 1.12.2 project 2021-02-28 09:52:19 +01:00
Jonas Herzig
4eeaca5af1 Use MainWindowAccessor across all versions 2021-02-28 09:52:19 +01:00
Jonas Herzig
3fbb4b50ea Rename ChunkLoadingRenderGlobal → ForceChunkLoadingHook
More descriptive, less MCP.
2021-02-28 09:52:19 +01:00
Jonas Herzig
ab5b101f96 Add stub ChunkLoadingRenderGlobal for 1.7.10
Allows us to get rid of all preprocessor guards around its usages.
2021-02-28 09:52:19 +01:00
Jonas Herzig
c729654f04 Split off 1.14.4 overwrite from ChunkLoadingRenderGlobal 2021-02-28 09:52:19 +01:00
Jonas Herzig
f19ee8ba63 Split off 1.14.4 overwrite from Mixin_ForceChunkLoading 2021-02-28 09:52:19 +01:00
Jonas Herzig
4b4d18026b Move GLStateTracker into 1.7.10 project 2021-02-28 09:52:19 +01:00
Jonas Herzig
87b55e187c Replace a few //#if statements with mapping file entries 2021-02-28 09:52:19 +01:00
Jonas Herzig
026bc1fdcb Move MixinWorldClient into 1.12.2 project 2021-02-28 09:52:19 +01:00
Jonas Herzig
470669b1f7 Move MixinRenderManager into 1.12.2 project 2021-02-23 01:21:44 +01:00
Jonas Herzig
b8bcb4967f Move MixinFMLClientHandler into 1.7.10 project 2021-02-23 01:05:48 +01:00
Jonas Herzig
6fa746a2e3 Move MixinEntityRenderer into 1.7.10 project 2021-02-23 01:01:55 +01:00
Jonas Herzig
01d47279fd Split off 1.12.2 overwrite from MixinCamera 2021-02-23 00:59:56 +01:00
Jonas Herzig
06db2ebb92 Move MixinS26PacketMapChunkBulk into 1.7.10 project 2021-02-23 00:47:01 +01:00
Jonas Herzig
6068aabea7 Move MixinPlayerControllerMP into 1.12.2 project 2021-02-23 00:45:12 +01:00
Jonas Herzig
6bc130312a Move MixinNetworkDispatcher into 1.12.2 project 2021-02-23 00:41:22 +01:00
Jonas Herzig
ba7c478da1 Split off 1.12.2 overwrite from MixinNetHandlerLoginClient 2021-02-23 00:41:22 +01:00
Jonas Herzig
25247a2371 Move MixinGuiScreen into 1.7.10 project 2021-02-23 00:41:22 +01:00
Jonas Herzig
22d1048999 Move FMLHandshakeFilter into 1.12.2 project 2021-02-23 00:41:22 +01:00