aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/moe/nea/firmament/mixins/HudRenderEventsPatch.java
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2024-07-05 22:17:02 +0200
committerLinnea Gräf <nea@nea.moe>2024-07-05 22:17:02 +0200
commit3d792dbef7c7e0f186e29f2e3999f99c2c14f5d7 (patch)
treeb383c2c584a96b93c46d1dae3efcd3c6571e3d05 /src/main/java/moe/nea/firmament/mixins/HudRenderEventsPatch.java
parent5ee4b8d925eb12e068038a1fd2e1f35cdd8ef87e (diff)
downloadfirmament-3d792dbef7c7e0f186e29f2e3999f99c2c14f5d7.tar.gz
firmament-3d792dbef7c7e0f186e29f2e3999f99c2c14f5d7.tar.bz2
firmament-3d792dbef7c7e0f186e29f2e3999f99c2c14f5d7.zip
Port to 1.21
Diffstat (limited to 'src/main/java/moe/nea/firmament/mixins/HudRenderEventsPatch.java')
-rw-r--r--src/main/java/moe/nea/firmament/mixins/HudRenderEventsPatch.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/main/java/moe/nea/firmament/mixins/HudRenderEventsPatch.java b/src/main/java/moe/nea/firmament/mixins/HudRenderEventsPatch.java
index 6618e95..d1b7d92 100644
--- a/src/main/java/moe/nea/firmament/mixins/HudRenderEventsPatch.java
+++ b/src/main/java/moe/nea/firmament/mixins/HudRenderEventsPatch.java
@@ -11,6 +11,7 @@ import moe.nea.firmament.events.HotbarItemRenderEvent;
import moe.nea.firmament.events.HudRenderEvent;
import net.minecraft.client.gui.DrawContext;
import net.minecraft.client.gui.hud.InGameHud;
+import net.minecraft.client.render.RenderTickCounter;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemStack;
import org.spongepowered.asm.mixin.Mixin;
@@ -21,13 +22,13 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
@Mixin(InGameHud.class)
public class HudRenderEventsPatch {
@Inject(method = "renderSleepOverlay", at = @At(value = "HEAD"))
- public void renderCallBack(DrawContext context, float tickDelta, CallbackInfo ci) {
- HudRenderEvent.Companion.publish(new HudRenderEvent(context, tickDelta));
+ public void renderCallBack(DrawContext context, RenderTickCounter tickCounter, CallbackInfo ci) {
+ HudRenderEvent.Companion.publish(new HudRenderEvent(context, tickCounter));
}
@Inject(method = "renderHotbarItem", at = @At("HEAD"))
- public void onRenderHotbarItem(DrawContext context, int x, int y, float tickDelta, PlayerEntity player, ItemStack stack, int seed, CallbackInfo ci) {
+ public void onRenderHotbarItem(DrawContext context, int x, int y, RenderTickCounter tickCounter, PlayerEntity player, ItemStack stack, int seed, CallbackInfo ci) {
if (stack != null && !stack.isEmpty())
- HotbarItemRenderEvent.Companion.publish(new HotbarItemRenderEvent(stack, context, x, y, tickDelta));
+ HotbarItemRenderEvent.Companion.publish(new HotbarItemRenderEvent(stack, context, x, y, tickCounter));
}
}