WIP 1.15 and ReplayStudio v2 update

This commit is contained in:
Jonas Herzig
2020-03-13 14:18:19 +01:00
parent 8bc0b0a4df
commit af8803d6b5
65 changed files with 874 additions and 1303 deletions

View File

@@ -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
}
}
}