mirror of
https://github.com/Wurst-Imperium/Wurst7.git
synced 2024-09-19 17:02:13 +02:00
Update to 24w20a
This commit is contained in:
parent
3a03086e4c
commit
0d188f60db
@ -21,6 +21,7 @@ import com.llamalad7.mixinextras.sugar.Local;
|
||||
|
||||
import net.minecraft.client.render.Camera;
|
||||
import net.minecraft.client.render.GameRenderer;
|
||||
import net.minecraft.client.render.RenderTickCounter;
|
||||
import net.minecraft.client.util.math.MatrixStack;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.LivingEntity;
|
||||
@ -42,8 +43,9 @@ public abstract class GameRendererMixin implements AutoCloseable
|
||||
*/
|
||||
@Inject(at = @At(value = "INVOKE",
|
||||
target = "Lnet/minecraft/client/render/GameRenderer;bobView(Lnet/minecraft/client/util/math/MatrixStack;F)V",
|
||||
ordinal = 0), method = "renderWorld(FJ)V")
|
||||
private void onRenderWorldViewBobbing(float tickDelta, long limitTime,
|
||||
ordinal = 0),
|
||||
method = "renderWorld(Lnet/minecraft/client/render/RenderTickCounter;)V")
|
||||
private void onRenderWorldViewBobbing(RenderTickCounter tickCounter,
|
||||
CallbackInfo ci)
|
||||
{
|
||||
CameraTransformViewBobbingEvent event =
|
||||
@ -89,9 +91,10 @@ public abstract class GameRendererMixin implements AutoCloseable
|
||||
target = "Lnet/minecraft/client/render/GameRenderer;renderHand:Z",
|
||||
opcode = Opcodes.GETFIELD,
|
||||
ordinal = 0),
|
||||
method = "renderWorld(FJ)V")
|
||||
private void onRenderWorld(float tickDelta, long limitTime, CallbackInfo ci,
|
||||
@Local(ordinal = 1) Matrix4f matrix4f2)
|
||||
method = "renderWorld(Lnet/minecraft/client/render/RenderTickCounter;)V")
|
||||
private void onRenderWorldHandRendering(RenderTickCounter tickCounter,
|
||||
CallbackInfo ci, @Local(ordinal = 1) Matrix4f matrix4f2,
|
||||
@Local(ordinal = 1) float tickDelta)
|
||||
{
|
||||
MatrixStack matrixStack = new MatrixStack();
|
||||
matrixStack.multiplyPositionMatrix(matrix4f2);
|
||||
@ -130,8 +133,8 @@ public abstract class GameRendererMixin implements AutoCloseable
|
||||
at = @At(value = "INVOKE",
|
||||
target = "Lnet/minecraft/util/math/MathHelper;lerp(FFF)F",
|
||||
ordinal = 0),
|
||||
method = "renderWorld(FJ)V")
|
||||
private float wurstNauseaLerp(float delta, float start, float end,
|
||||
method = "renderWorld(Lnet/minecraft/client/render/RenderTickCounter;)V")
|
||||
private float onRenderWorldNauseaLerp(float delta, float start, float end,
|
||||
Operation<Float> original)
|
||||
{
|
||||
if(!WurstClient.INSTANCE.getHax().antiWobbleHack.isEnabled())
|
||||
|
@ -17,6 +17,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
import net.minecraft.client.gui.DrawContext;
|
||||
import net.minecraft.client.gui.hud.DebugHud;
|
||||
import net.minecraft.client.gui.hud.InGameHud;
|
||||
import net.minecraft.client.render.RenderTickCounter;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.wurstclient.WurstClient;
|
||||
import net.wurstclient.event.EventManager;
|
||||
@ -32,13 +33,14 @@ public class IngameHudMixin
|
||||
// runs after renderScoreboardSidebar()
|
||||
// and before playerListHud.setVisible()
|
||||
@Inject(at = @At("HEAD"),
|
||||
method = "renderPlayerList(Lnet/minecraft/client/gui/DrawContext;F)V")
|
||||
private void onRenderPlayerList(DrawContext context, float tickDelta,
|
||||
CallbackInfo ci)
|
||||
method = "renderPlayerList(Lnet/minecraft/client/gui/DrawContext;Lnet/minecraft/client/render/RenderTickCounter;)V")
|
||||
private void onRenderPlayerList(DrawContext context,
|
||||
RenderTickCounter tickCounter, CallbackInfo ci)
|
||||
{
|
||||
if(debugHud.shouldShowDebugHud())
|
||||
return;
|
||||
|
||||
float tickDelta = tickCounter.getTickDelta(true);
|
||||
EventManager.fire(new GUIRenderEvent(context, tickDelta));
|
||||
}
|
||||
|
||||
|
@ -17,14 +17,14 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
||||
import net.minecraft.client.render.RenderTickCounter;
|
||||
import net.wurstclient.WurstClient;
|
||||
|
||||
@Mixin(RenderTickCounter.class)
|
||||
public abstract class RenderTickCounterMixin
|
||||
@Mixin(RenderTickCounter.Dynamic.class)
|
||||
public abstract class RenderTickCounterDynamicMixin
|
||||
{
|
||||
@Shadow
|
||||
public float lastFrameDuration;
|
||||
|
||||
@Inject(at = @At(value = "FIELD",
|
||||
target = "Lnet/minecraft/client/render/RenderTickCounter;prevTimeMillis:J",
|
||||
target = "Lnet/minecraft/client/render/RenderTickCounter$Dynamic;prevTimeMillis:J",
|
||||
opcode = Opcodes.PUTFIELD,
|
||||
ordinal = 0), method = "beginRenderTick(J)I")
|
||||
public void onBeginRenderTick(long timeMillis,
|
@ -30,8 +30,8 @@
|
||||
|
||||
"depends": {
|
||||
"fabricloader": ">=0.15.9",
|
||||
"fabric-api": ">=0.98.1",
|
||||
"minecraft": "~1.21-alpha.24.19.a",
|
||||
"fabric-api": ">=0.98.2",
|
||||
"minecraft": "~1.21-alpha.24.20.a",
|
||||
"java": ">=21"
|
||||
},
|
||||
"suggests": {
|
||||
|
@ -53,7 +53,7 @@
|
||||
"PlayerInventoryMixin",
|
||||
"PlayerSkinProviderMixin",
|
||||
"PowderSnowBlockMixin",
|
||||
"RenderTickCounterMixin",
|
||||
"RenderTickCounterDynamicMixin",
|
||||
"ScreenMixin",
|
||||
"ShulkerBoxScreenMixin",
|
||||
"SimpleOptionMixin",
|
||||
|
Loading…
Reference in New Issue
Block a user