Get all 1.15 mixins applying
This commit is contained in:
@@ -9,6 +9,11 @@ import org.spongepowered.asm.mixin.injection.At;
|
|||||||
import org.spongepowered.asm.mixin.injection.Inject;
|
import org.spongepowered.asm.mixin.injection.Inject;
|
||||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||||
|
|
||||||
|
//#if MC>=11500
|
||||||
|
//$$ import net.minecraft.client.render.VertexConsumer;
|
||||||
|
//$$ import net.minecraft.client.util.math.MatrixStack;
|
||||||
|
//#endif
|
||||||
|
|
||||||
//#if MC>=11400
|
//#if MC>=11400
|
||||||
import net.minecraft.client.render.item.ItemRenderer;
|
import net.minecraft.client.render.item.ItemRenderer;
|
||||||
import net.minecraft.client.render.model.BakedModel;
|
import net.minecraft.client.render.model.BakedModel;
|
||||||
@@ -28,6 +33,10 @@ import net.minecraft.client.render.model.BakedModel;
|
|||||||
//$$ @Mixin(RenderItem.class)
|
//$$ @Mixin(RenderItem.class)
|
||||||
//#endif
|
//#endif
|
||||||
public abstract class MixinRenderItem {
|
public abstract class MixinRenderItem {
|
||||||
|
//#if MC>=11500
|
||||||
|
//$$ @Inject(method = "renderBakedItemModel", at = @At("HEAD"))
|
||||||
|
//$$ private void onRenderModel(BakedModel model, ItemStack stack, int int_1, int int_2, MatrixStack matrixStack_1, VertexConsumer vertexConsumer_1, CallbackInfo ci) {
|
||||||
|
//#else
|
||||||
//#if MC>=11400
|
//#if MC>=11400
|
||||||
@Inject(method = "renderItemModel", at = @At("HEAD"))
|
@Inject(method = "renderItemModel", at = @At("HEAD"))
|
||||||
//#else
|
//#else
|
||||||
@@ -45,6 +54,7 @@ public abstract class MixinRenderItem {
|
|||||||
//#endif
|
//#endif
|
||||||
//#endif
|
//#endif
|
||||||
private void onRenderModel(BakedModel model, ItemStack stack, CallbackInfo ci) {
|
private void onRenderModel(BakedModel model, ItemStack stack, CallbackInfo ci) {
|
||||||
|
//#endif
|
||||||
BlendState blendState = BlendState.getState();
|
BlendState blendState = BlendState.getState();
|
||||||
if (blendState != null) {
|
if (blendState != null) {
|
||||||
blendState.get(ItemExporter.class).onRender(this, model, stack);
|
blendState.get(ItemExporter.class).onRender(this, model, stack);
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ package com.replaymod.render.blend.mixin;
|
|||||||
|
|
||||||
import com.replaymod.render.blend.BlendState;
|
import com.replaymod.render.blend.BlendState;
|
||||||
import com.replaymod.render.blend.exporters.EntityExporter;
|
import com.replaymod.render.blend.exporters.EntityExporter;
|
||||||
import net.minecraft.entity.LivingEntity;
|
|
||||||
import org.spongepowered.asm.mixin.Mixin;
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
import org.spongepowered.asm.mixin.injection.At;
|
import org.spongepowered.asm.mixin.injection.At;
|
||||||
import org.spongepowered.asm.mixin.injection.Inject;
|
import org.spongepowered.asm.mixin.injection.Inject;
|
||||||
@@ -31,11 +30,15 @@ public abstract class MixinRenderLivingBase {
|
|||||||
//#endif
|
//#endif
|
||||||
//#endif
|
//#endif
|
||||||
value = "INVOKE",
|
value = "INVOKE",
|
||||||
|
//#if MC>=11500
|
||||||
|
//$$ target = "Lnet/minecraft/client/render/entity/LivingEntityRenderer;scale(Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/client/util/math/MatrixStack;F)V",
|
||||||
|
//#else
|
||||||
//#if MC>=10904
|
//#if MC>=10904
|
||||||
target = "Lnet/minecraft/client/render/entity/LivingEntityRenderer;scaleAndTranslate(Lnet/minecraft/entity/LivingEntity;F)F",
|
target = "Lnet/minecraft/client/render/entity/LivingEntityRenderer;scaleAndTranslate(Lnet/minecraft/entity/LivingEntity;F)F",
|
||||||
//#else
|
//#else
|
||||||
//$$ target = "Lnet/minecraft/client/renderer/entity/RendererLivingEntity;preRenderCallback(Lnet/minecraft/entity/EntityLivingBase;F)V",
|
//$$ target = "Lnet/minecraft/client/renderer/entity/RendererLivingEntity;preRenderCallback(Lnet/minecraft/entity/EntityLivingBase;F)V",
|
||||||
//#endif
|
//#endif
|
||||||
|
//#endif
|
||||||
shift = At.Shift.AFTER
|
shift = At.Shift.AFTER
|
||||||
))
|
))
|
||||||
private void recordModelMatrix(CallbackInfo ci) {
|
private void recordModelMatrix(CallbackInfo ci) {
|
||||||
|
|||||||
@@ -38,7 +38,11 @@ public abstract class MixinRenderManager {
|
|||||||
//#endif
|
//#endif
|
||||||
//#endif
|
//#endif
|
||||||
at = @At(value = "INVOKE",
|
at = @At(value = "INVOKE",
|
||||||
|
//#if MC>=11500
|
||||||
|
//$$ target = "Lnet/minecraft/client/render/entity/EntityRenderer;render(Lnet/minecraft/entity/Entity;FFLnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/VertexConsumerProvider;I)V"))
|
||||||
|
//#else
|
||||||
target = "Lnet/minecraft/client/render/entity/EntityRenderer;render(Lnet/minecraft/entity/Entity;DDDFF)V"))
|
target = "Lnet/minecraft/client/render/entity/EntityRenderer;render(Lnet/minecraft/entity/Entity;DDDFF)V"))
|
||||||
|
//#endif
|
||||||
public void preRender(Entity entity, double x, double y, double z, float yaw, float renderPartialTicks,
|
public void preRender(Entity entity, double x, double y, double z, float yaw, float renderPartialTicks,
|
||||||
//#if MC>=11500
|
//#if MC>=11500
|
||||||
//$$ MatrixStack matrixStack,
|
//$$ MatrixStack matrixStack,
|
||||||
@@ -73,7 +77,11 @@ public abstract class MixinRenderManager {
|
|||||||
//#endif
|
//#endif
|
||||||
//#endif
|
//#endif
|
||||||
at = @At(value = "INVOKE",
|
at = @At(value = "INVOKE",
|
||||||
|
//#if MC>=11500
|
||||||
|
//$$ target = "Lnet/minecraft/client/render/entity/EntityRenderer;render(Lnet/minecraft/entity/Entity;FFLnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/VertexConsumerProvider;I)V",
|
||||||
|
//#else
|
||||||
target = "Lnet/minecraft/client/render/entity/EntityRenderer;render(Lnet/minecraft/entity/Entity;DDDFF)V",
|
target = "Lnet/minecraft/client/render/entity/EntityRenderer;render(Lnet/minecraft/entity/Entity;DDDFF)V",
|
||||||
|
//#endif
|
||||||
shift = At.Shift.AFTER))
|
shift = At.Shift.AFTER))
|
||||||
public void postRender(Entity entity, double x, double y, double z, float yaw, float renderPartialTicks,
|
public void postRender(Entity entity, double x, double y, double z, float yaw, float renderPartialTicks,
|
||||||
//#if MC>=11500
|
//#if MC>=11500
|
||||||
|
|||||||
@@ -19,8 +19,12 @@ import net.minecraft.client.render.Frustum;
|
|||||||
//$$ @Mixin(Frustrum.class)
|
//$$ @Mixin(Frustrum.class)
|
||||||
//#endif
|
//#endif
|
||||||
public abstract class MixinFrustum {
|
public abstract class MixinFrustum {
|
||||||
|
//#if MC>=11500
|
||||||
|
//$$ @Inject(method = "isAnyCornerVisible", at = @At("HEAD"), cancellable = true)
|
||||||
|
//#else
|
||||||
@Inject(method = "intersects", at = @At("HEAD"), cancellable = true)
|
@Inject(method = "intersects", at = @At("HEAD"), cancellable = true)
|
||||||
public void intersects(double minX, double minY, double minZ, double maxX, double maxY, double maxZ, CallbackInfoReturnable<Boolean> ci) {
|
//#endif
|
||||||
|
public void intersects(CallbackInfoReturnable<Boolean> ci) {
|
||||||
EntityRendererHandler handler = ((EntityRendererHandler.IEntityRenderer) MCVer.getMinecraft().gameRenderer).replayModRender_getHandler();
|
EntityRendererHandler handler = ((EntityRendererHandler.IEntityRenderer) MCVer.getMinecraft().gameRenderer).replayModRender_getHandler();
|
||||||
if (handler != null && handler.omnidirectional && handler.data == null) {
|
if (handler != null && handler.omnidirectional && handler.data == null) {
|
||||||
// Normally the camera is always facing the direction of the omnidirectional image face that is currently
|
// Normally the camera is always facing the direction of the omnidirectional image face that is currently
|
||||||
|
|||||||
@@ -1,18 +1,46 @@
|
|||||||
//#if MC>=11400
|
//#if MC>=11400
|
||||||
package com.replaymod.replay.mixin;
|
package com.replaymod.replay.mixin;
|
||||||
|
|
||||||
import com.mojang.blaze3d.platform.GlStateManager;
|
|
||||||
import com.replaymod.replay.camera.CameraEntity;
|
import com.replaymod.replay.camera.CameraEntity;
|
||||||
import net.minecraft.client.render.Camera;
|
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.world.BlockView;
|
|
||||||
import org.spongepowered.asm.mixin.Mixin;
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
import org.spongepowered.asm.mixin.injection.At;
|
import org.spongepowered.asm.mixin.injection.At;
|
||||||
import org.spongepowered.asm.mixin.injection.Inject;
|
import org.spongepowered.asm.mixin.injection.Inject;
|
||||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
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 {
|
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(
|
@Inject(
|
||||||
method = "update",
|
method = "update",
|
||||||
at = @At(
|
at = @At(
|
||||||
@@ -26,5 +54,6 @@ public class MixinCamera {
|
|||||||
GlStateManager.rotatef(((CameraEntity) view).roll, 0.0F, 0.0F, 1.0F);
|
GlStateManager.rotatef(((CameraEntity) view).roll, 0.0F, 0.0F, 1.0F);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//#endif
|
||||||
}
|
}
|
||||||
//#endif
|
//#endif
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ package com.replaymod.replay.mixin;
|
|||||||
|
|
||||||
import com.replaymod.replay.ReplayHandler;
|
import com.replaymod.replay.ReplayHandler;
|
||||||
import com.replaymod.replay.ReplayModReplay;
|
import com.replaymod.replay.ReplayModReplay;
|
||||||
import net.minecraft.client.render.item.ItemRenderer;
|
|
||||||
import org.spongepowered.asm.mixin.Mixin;
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
import org.spongepowered.asm.mixin.injection.At;
|
import org.spongepowered.asm.mixin.injection.At;
|
||||||
import org.spongepowered.asm.mixin.injection.Redirect;
|
import org.spongepowered.asm.mixin.injection.Redirect;
|
||||||
@@ -13,14 +12,22 @@ import net.minecraft.util.Util;
|
|||||||
//$$ import net.minecraft.client.Minecraft;
|
//$$ import net.minecraft.client.Minecraft;
|
||||||
//#endif
|
//#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 {
|
public class MixinRenderItem {
|
||||||
//#if MC>=11400
|
//#if MC>=11400
|
||||||
|
//#if MC>=11500
|
||||||
|
//$$ @Redirect(method = "setupGlintTexturing", at = @At(value = "INVOKE", target = "Lnet/minecraft/util/Util;getMeasuringTimeMs()J"))
|
||||||
|
//#else
|
||||||
//#if MC>=11400
|
//#if MC>=11400
|
||||||
@Redirect(method = "renderGlint", at = @At(value = "INVOKE", target = "Lnet/minecraft/util/Util;getMeasuringTimeMs()J"))
|
@Redirect(method = "renderGlint", at = @At(value = "INVOKE", target = "Lnet/minecraft/util/Util;getMeasuringTimeMs()J"))
|
||||||
//#else
|
//#else
|
||||||
//$$ @Redirect(method = "renderEffect", at = @At(value = "INVOKE", target = "Lnet/minecraft/util/Util;milliTime()J"))
|
//$$ @Redirect(method = "renderEffect", at = @At(value = "INVOKE", target = "Lnet/minecraft/util/Util;milliTime()J"))
|
||||||
//#endif
|
//#endif
|
||||||
|
//#endif
|
||||||
private static long getEnchantmentTime() {
|
private static long getEnchantmentTime() {
|
||||||
//#else
|
//#else
|
||||||
//$$ @Redirect(method = "renderEffect", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/Minecraft;getSystemTime()J"))
|
//$$ @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)
|
@Mixin(EndPortalBlockEntityRenderer.class)
|
||||||
public class MixinTileEntityEndPortalRenderer {
|
public class MixinTileEntityEndPortalRenderer {
|
||||||
|
//#if MC>=11500
|
||||||
|
//$$ // Seems like they finally removed all animation
|
||||||
|
//#else
|
||||||
//#if MC>=11400
|
//#if MC>=11400
|
||||||
@Redirect(method = "render", at = @At(value = "INVOKE", target = "Lnet/minecraft/util/Util;getMeasuringTimeMs()J"))
|
@Redirect(method = "render", at = @At(value = "INVOKE", target = "Lnet/minecraft/util/Util;getMeasuringTimeMs()J"))
|
||||||
//#else
|
//#else
|
||||||
@@ -43,4 +46,5 @@ public class MixinTileEntityEndPortalRenderer {
|
|||||||
//$$ return Minecraft.getSystemTime();
|
//$$ return Minecraft.getSystemTime();
|
||||||
//#endif
|
//#endif
|
||||||
}
|
}
|
||||||
|
//#endif
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ public abstract class MixinViewFrustum {
|
|||||||
value = "INVOKE",
|
value = "INVOKE",
|
||||||
//#if MC>=10904
|
//#if MC>=10904
|
||||||
//#if MC>=11500
|
//#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
|
//#else
|
||||||
target = "Lnet/minecraft/client/render/chunk/ChunkRenderer;setOrigin(III)V"
|
target = "Lnet/minecraft/client/render/chunk/ChunkRenderer;setOrigin(III)V"
|
||||||
//#endif
|
//#endif
|
||||||
|
|||||||
@@ -10,4 +10,6 @@ net.minecraft.client.render.WorldRenderer drawBlockOutline() drawHighlightedBloc
|
|||||||
net.minecraft.client.render.GameRenderer method_22973() applyCameraTransformations()
|
net.minecraft.client.render.GameRenderer method_22973() applyCameraTransformations()
|
||||||
net.minecraft.client.util.math.Matrix4f viewboxMatrix() method_4929()
|
net.minecraft.client.util.math.Matrix4f viewboxMatrix() method_4929()
|
||||||
net.minecraft.client.util.ScreenshotUtils takeScreenshot() method_1663()
|
net.minecraft.client.util.ScreenshotUtils takeScreenshot() method_1663()
|
||||||
|
net.minecraft.client.util.ScreenshotUtils saveScreenshot() method_1659()
|
||||||
net.minecraft.client.render.WorldRenderer setupTerrain() setUpTerrain()
|
net.minecraft.client.render.WorldRenderer setupTerrain() setUpTerrain()
|
||||||
|
net.minecraft.client.gui.hud.SpectatorHud cycleSlot() method_1976()
|
||||||
|
|||||||
Reference in New Issue
Block a user