1
mirror of https://github.com/Shiewk/BedrockDeathScreen.git synced 2026-04-27 22:44:17 +02:00

1.21.3 Support

This commit is contained in:
Shy
2024-12-03 11:17:48 +01:00
parent d622d087d1
commit ac976bbf7b
4 changed files with 10 additions and 10 deletions
@@ -18,14 +18,14 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
@Mixin(GameRenderer.class)
public abstract class MixinGameRenderer {
@Shadow @Final MinecraftClient client;
@Shadow @Final private MinecraftClient client;
@Shadow protected abstract void renderHand(Camera camera, float tickDelta, Matrix4f matrix4f);
@Inject(at = @At("TAIL"), method = "getFov", cancellable = true)
public void onFovGet(Camera camera, float tickDelta, boolean changingFov, CallbackInfoReturnable<Double> cir){
public void onFovGet(Camera camera, float tickDelta, boolean changingFov, CallbackInfoReturnable<Float> cir){
if (client.currentScreen instanceof BedrockDeathScreen bedrockDeathScreen){
cir.setReturnValue(Math.min(60 + bedrockDeathScreen.getTotalDelta() / (405d), 80));
cir.setReturnValue(Math.min(60 + bedrockDeathScreen.getTotalDelta() / (405f), 80));
}
}