mirror of
https://github.com/FabricMC/fabric.git
synced 2025-03-01 01:43:56 -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
This commit is contained in:
parent
2758bfbf66
commit
69228316a9
1 changed files with 12 additions and 0 deletions
|
@ -80,6 +80,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