mirror of
https://github.com/FabricMC/fabric.git
synced 2024-12-02 04:17:01 -05:00
Fix AFTER_SETUP event not being able to render (#4219)
* Add BEFORE_TERRAIN world render event
* Add 1.21.2 rendering issue warning
* Add comment to injection point
* close b tag
* Undo all new event changes
* Move AFTER_SETUP event to new mixin
* Remove event interface
* Refine mixin
(cherry picked from commit 69228316a9
)
This commit is contained in:
parent
56e78b9be0
commit
6dc662b6c6
1 changed files with 12 additions and 0 deletions
|
@ -79,6 +79,18 @@ public abstract class WorldRendererMixin {
|
|||
@Inject(method = "setupTerrain", at = @At("RETURN"))
|
||||
private void afterTerrainSetup(Camera camera, Frustum frustum, boolean hasForcedFrustum, boolean spectator, CallbackInfo ci) {
|
||||
context.setFrustum(frustum);
|
||||
}
|
||||
|
||||
@Inject(
|
||||
method = "method_62214",
|
||||
at = @At(
|
||||
value = "INVOKE_STRING",
|
||||
target = "Lnet/minecraft/util/profiler/Profiler;push(Ljava/lang/String;)V",
|
||||
args = "ldc=terrain",
|
||||
shift = Shift.AFTER
|
||||
) // Points to after profiler.push("terrain");
|
||||
)
|
||||
private void beforeTerrainSolid(CallbackInfo ci) {
|
||||
WorldRenderEvents.AFTER_SETUP.invoker().afterSetup(context);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue