Get all 1.15 mixins applying
This commit is contained in:
@@ -1,18 +1,46 @@
|
||||
//#if MC>=11400
|
||||
package com.replaymod.replay.mixin;
|
||||
|
||||
import com.mojang.blaze3d.platform.GlStateManager;
|
||||
import com.replaymod.replay.camera.CameraEntity;
|
||||
import net.minecraft.client.render.Camera;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.world.BlockView;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
|
||||
@Mixin(Camera.class)
|
||||
//#if MC>=11500
|
||||
//$$ import net.minecraft.client.MinecraftClient;
|
||||
//$$ import net.minecraft.client.util.math.MatrixStack;
|
||||
//$$ import net.minecraft.client.util.math.Vector3f;
|
||||
//$$ import org.spongepowered.asm.mixin.Final;
|
||||
//$$ import org.spongepowered.asm.mixin.Shadow;
|
||||
//#else
|
||||
import com.mojang.blaze3d.platform.GlStateManager;
|
||||
import net.minecraft.world.BlockView;
|
||||
//#endif
|
||||
|
||||
//#if MC>=11500
|
||||
//$$ @Mixin(net.minecraft.client.render.GameRenderer.class)
|
||||
//#else
|
||||
@Mixin(net.minecraft.client.render.Camera.class)
|
||||
//#endif
|
||||
public class MixinCamera {
|
||||
//#if MC>=11500
|
||||
//$$ @Shadow @Final private MinecraftClient client;
|
||||
//$$ @Inject(
|
||||
//$$ method = "renderWorld",
|
||||
//$$ at = @At(
|
||||
//$$ value = "INVOKE",
|
||||
//$$ target = "Lnet/minecraft/client/render/Camera;getPitch()F"
|
||||
//$$ )
|
||||
//$$ )
|
||||
//$$ private void applyRoll(float float_1, long long_1, MatrixStack matrixStack, CallbackInfo ci) {
|
||||
//$$ Entity entity = this.client.getCameraEntity() == null ? this.client.player : this.client.getCameraEntity();
|
||||
//$$ if (entity instanceof CameraEntity) {
|
||||
//$$ matrixStack.multiply(Vector3f.POSITIVE_Z.getDegreesQuaternion(((CameraEntity) entity).roll));
|
||||
//$$ }
|
||||
//$$ }
|
||||
//#else
|
||||
@Inject(
|
||||
method = "update",
|
||||
at = @At(
|
||||
@@ -26,5 +54,6 @@ public class MixinCamera {
|
||||
GlStateManager.rotatef(((CameraEntity) view).roll, 0.0F, 0.0F, 1.0F);
|
||||
}
|
||||
}
|
||||
//#endif
|
||||
}
|
||||
//#endif
|
||||
|
||||
@@ -2,7 +2,6 @@ package com.replaymod.replay.mixin;
|
||||
|
||||
import com.replaymod.replay.ReplayHandler;
|
||||
import com.replaymod.replay.ReplayModReplay;
|
||||
import net.minecraft.client.render.item.ItemRenderer;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Redirect;
|
||||
@@ -13,14 +12,22 @@ import net.minecraft.util.Util;
|
||||
//$$ import net.minecraft.client.Minecraft;
|
||||
//#endif
|
||||
|
||||
@Mixin(ItemRenderer.class)
|
||||
//#if MC>=11500
|
||||
//$$ @Mixin(net.minecraft.client.render.RenderPhase.class)
|
||||
//#else
|
||||
@Mixin(net.minecraft.client.render.item.ItemRenderer.class)
|
||||
//#endif
|
||||
public class MixinRenderItem {
|
||||
//#if MC>=11400
|
||||
//#if MC>=11500
|
||||
//$$ @Redirect(method = "setupGlintTexturing", at = @At(value = "INVOKE", target = "Lnet/minecraft/util/Util;getMeasuringTimeMs()J"))
|
||||
//#else
|
||||
//#if MC>=11400
|
||||
@Redirect(method = "renderGlint", at = @At(value = "INVOKE", target = "Lnet/minecraft/util/Util;getMeasuringTimeMs()J"))
|
||||
//#else
|
||||
//$$ @Redirect(method = "renderEffect", at = @At(value = "INVOKE", target = "Lnet/minecraft/util/Util;milliTime()J"))
|
||||
//#endif
|
||||
//#endif
|
||||
private static long getEnchantmentTime() {
|
||||
//#else
|
||||
//$$ @Redirect(method = "renderEffect", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/Minecraft;getSystemTime()J"))
|
||||
|
||||
@@ -15,6 +15,9 @@ import net.minecraft.util.Util;
|
||||
|
||||
@Mixin(EndPortalBlockEntityRenderer.class)
|
||||
public class MixinTileEntityEndPortalRenderer {
|
||||
//#if MC>=11500
|
||||
//$$ // Seems like they finally removed all animation
|
||||
//#else
|
||||
//#if MC>=11400
|
||||
@Redirect(method = "render", at = @At(value = "INVOKE", target = "Lnet/minecraft/util/Util;getMeasuringTimeMs()J"))
|
||||
//#else
|
||||
@@ -43,4 +46,5 @@ public class MixinTileEntityEndPortalRenderer {
|
||||
//$$ return Minecraft.getSystemTime();
|
||||
//#endif
|
||||
}
|
||||
//#endif
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ public abstract class MixinViewFrustum {
|
||||
value = "INVOKE",
|
||||
//#if MC>=10904
|
||||
//#if MC>=11500
|
||||
//$$ target = "Lnet/minecraft/client/render/chunk/ChunkBuilder/BuiltChunk;setOrigin(III)V"
|
||||
//$$ target = "Lnet/minecraft/client/render/chunk/ChunkBuilder$BuiltChunk;setOrigin(III)V"
|
||||
//#else
|
||||
target = "Lnet/minecraft/client/render/chunk/ChunkRenderer;setOrigin(III)V"
|
||||
//#endif
|
||||
|
||||
Reference in New Issue
Block a user