-
-
Notifications
You must be signed in to change notification settings - Fork 131
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New ticking system, fixes Replay mod issues.
- Loading branch information
AzureZhen
committed
Feb 25, 2022
1 parent
4fe2379
commit f43937a
Showing
2 changed files
with
24 additions
and
13 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
19 changes: 19 additions & 0 deletions
19
src/main/java/software/bernie/geckolib3/util/AnimationTicker.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,19 @@ | ||
package software.bernie.geckolib3.util; | ||
|
||
import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientTickEvents; | ||
import net.minecraft.client.MinecraftClient; | ||
import software.bernie.geckolib3.core.manager.AnimationData; | ||
|
||
public class AnimationTicker { | ||
|
||
private AnimationData manager; | ||
|
||
public AnimationTicker(AnimationData manager) { | ||
this.manager = manager; | ||
ClientTickEvents.START_CLIENT_TICK.register(this::onTick); | ||
} | ||
|
||
private void onTick(MinecraftClient minecraftClient) { | ||
manager.tick++; | ||
} | ||
} |