-
Notifications
You must be signed in to change notification settings - Fork 421
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
90 additions
and
21 deletions.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
...v1/src/client/java/net/fabricmc/fabric/api/client/rendering/v1/HudPostRenderCallback.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package net.fabricmc.fabric.api.client.rendering.v1; | ||
|
||
import net.fabricmc.fabric.api.event.Event; | ||
import net.fabricmc.fabric.api.event.EventFactory; | ||
|
||
import net.minecraft.client.gui.DrawContext; | ||
import net.minecraft.client.render.RenderTickCounter; | ||
|
||
public interface HudPostRenderCallback { | ||
Event<HudPostRenderCallback> EVENT = EventFactory.createArrayBacked(HudPostRenderCallback.class, (listeners) -> (matrixStack, delta) -> { | ||
for (HudPostRenderCallback event : listeners) { | ||
event.onHudPostRender(matrixStack, delta); | ||
} | ||
}); | ||
|
||
/** | ||
* Called after rendering the whole hud, which is displayed in game, in a world. | ||
* | ||
* @param drawContext the {@link DrawContext} instance | ||
* @param tickCounter the {@link RenderTickCounter} instance | ||
*/ | ||
void onHudPostRender(DrawContext drawContext, RenderTickCounter tickCounter); | ||
} |
23 changes: 23 additions & 0 deletions
23
...-v1/src/client/java/net/fabricmc/fabric/api/client/rendering/v1/HudPreRenderCallback.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package net.fabricmc.fabric.api.client.rendering.v1; | ||
|
||
import net.fabricmc.fabric.api.event.Event; | ||
import net.fabricmc.fabric.api.event.EventFactory; | ||
|
||
import net.minecraft.client.gui.DrawContext; | ||
import net.minecraft.client.render.RenderTickCounter; | ||
|
||
public interface HudPreRenderCallback { | ||
Event<HudPreRenderCallback> EVENT = EventFactory.createArrayBacked(HudPreRenderCallback.class, (listeners) -> (matrixStack, delta) -> { | ||
for (HudPreRenderCallback event : listeners) { | ||
event.onHudPreRender(matrixStack, delta); | ||
} | ||
}); | ||
|
||
/** | ||
* Called before rendering the whole hud, which is displayed in game, in a world. | ||
* | ||
* @param drawContext the {@link DrawContext} instance | ||
* @param tickCounter the {@link RenderTickCounter} instance | ||
*/ | ||
void onHudPreRender(DrawContext drawContext, RenderTickCounter tickCounter); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters