forked from neoforged/NeoForge
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[1.20.5] Refactor tick events into distinct subclasses (neoforged#542)
- Loading branch information
1 parent
51b145c
commit 520b667
Showing
25 changed files
with
519 additions
and
242 deletions.
There are no files selected for viewing
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
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
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
36 changes: 36 additions & 0 deletions
36
src/main/java/net/neoforged/neoforge/client/event/ClientTickEvent.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,36 @@ | ||
/* | ||
* Copyright (c) NeoForged and contributors | ||
* SPDX-License-Identifier: LGPL-2.1-only | ||
*/ | ||
|
||
package net.neoforged.neoforge.client.event; | ||
|
||
import net.neoforged.bus.api.Event; | ||
|
||
/** | ||
* Base class of the two client tick events. | ||
* <p> | ||
* For the event that fires once per frame (instead of per tick), see {@link RenderFrameEvent}. | ||
* | ||
* @see ClientTickEvent.Pre | ||
* @see ClientTickEvent.Post | ||
*/ | ||
public abstract class ClientTickEvent extends Event { | ||
/** | ||
* {@link ClientTickEvent.Pre} is fired once per client tick, before the client performs work for the current tick. | ||
* <p> | ||
* This event only fires on the physical client. | ||
*/ | ||
public static class Pre extends ClientTickEvent { | ||
public Pre() {} | ||
} | ||
|
||
/** | ||
* {@link ClientTickEvent.Post} is fired once per client tick, after the client performs work for the current tick. | ||
* <p> | ||
* This event only fires on the physical client. | ||
*/ | ||
public static class Post extends ClientTickEvent { | ||
public Post() {} | ||
} | ||
} |
Oops, something went wrong.