WIP 1.15 and ReplayStudio v2 update
This commit is contained in:
@@ -1,12 +1,10 @@
|
||||
package com.replaymod.render.mixin;
|
||||
|
||||
import com.replaymod.render.RenderSettings;
|
||||
import com.replaymod.render.capturer.CubicOpenGlFrameCapturer;
|
||||
import com.replaymod.render.hooks.EntityRendererHandler;
|
||||
import com.replaymod.replay.camera.CameraEntity;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.LivingEntity;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
@@ -134,51 +132,4 @@ public abstract class MixinCamera {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//#if MC>=11400
|
||||
@Inject(method = "update", at = @At("HEAD"))
|
||||
//#else
|
||||
//$$ @Inject(method = "orientCamera", at = @At("HEAD"))
|
||||
//#endif
|
||||
private void replayModRender_setupCubicFrameRotation(
|
||||
//#if MC>=11400
|
||||
BlockView blockView,
|
||||
Entity entity,
|
||||
boolean thirdPerson,
|
||||
boolean inverseView,
|
||||
//#endif
|
||||
float partialTicks,
|
||||
CallbackInfo ci
|
||||
) {
|
||||
if (getHandler() != null && getHandler().data instanceof CubicOpenGlFrameCapturer.Data) {
|
||||
switch ((CubicOpenGlFrameCapturer.Data) getHandler().data) {
|
||||
case FRONT:
|
||||
GL11.glRotatef(0, 0.0F, 1.0F, 0.0F);
|
||||
break;
|
||||
case RIGHT:
|
||||
GL11.glRotatef(90, 0.0F, 1.0F, 0.0F);
|
||||
break;
|
||||
case BACK:
|
||||
GL11.glRotatef(180, 0.0F, 1.0F, 0.0F);
|
||||
break;
|
||||
case LEFT:
|
||||
GL11.glRotatef(-90, 0.0F, 1.0F, 0.0F);
|
||||
break;
|
||||
case BOTTOM:
|
||||
GL11.glRotatef(90, 1.0F, 0.0F, 0.0F);
|
||||
break;
|
||||
case TOP:
|
||||
GL11.glRotatef(-90, 1.0F, 0.0F, 0.0F);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (getHandler() != null && getHandler().omnidirectional) {
|
||||
// Minecraft goes back a little so we have to revert that
|
||||
//#if MC>=11300
|
||||
GL11.glTranslatef(0.0F, 0.0F, -0.05F);
|
||||
//#else
|
||||
//$$ GL11.glTranslatef(0.0F, 0.0F, 0.1F);
|
||||
//#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user