Add 1.7.10 version

This commit is contained in:
Jonas Herzig
2018-03-07 22:00:30 +01:00
parent fbbca76099
commit eb04eb47dc
106 changed files with 2083 additions and 251 deletions

View File

@@ -1,3 +1,4 @@
//#if MC>=10800
package com.replaymod.compat.shaders;
import com.replaymod.render.hooks.EntityRendererHandler;
@@ -37,3 +38,4 @@ public class ShaderBeginRender {
}
}
//#endif

View File

@@ -1,3 +1,4 @@
//#if MC>=10800
package com.replaymod.compat.shaders;
import net.minecraft.client.Minecraft;
@@ -51,3 +52,4 @@ public class ShaderReflection {
}
}
}
//#endif

View File

@@ -1,3 +1,4 @@
//#if MC>=10800
package com.replaymod.compat.shaders.mixin;
import com.replaymod.compat.shaders.ShaderReflection;
@@ -26,3 +27,4 @@ public abstract class MixinShaderEntityRenderer {
}
}
}
//#endif

View File

@@ -1,3 +1,4 @@
//#if MC>=10800
package com.replaymod.compat.shaders.mixin;
import com.replaymod.render.hooks.EntityRendererHandler;
@@ -27,3 +28,4 @@ public abstract class MixinShaderRenderChunk {
}
//#endif

View File

@@ -1,3 +1,4 @@
//#if MC>=10800
package com.replaymod.compat.shaders.mixin;
import com.replaymod.compat.shaders.ShaderReflection;
@@ -38,3 +39,4 @@ public abstract class MixinShaderRenderGlobal {
}
}
//#endif

View File

@@ -0,0 +1,52 @@
//#if MC<=10710
//$$ package com.replaymod.compat.shaders.mixin;
//$$
//$$ import com.replaymod.render.hooks.EntityRendererHandler;
//$$ import com.replaymod.replay.ReplayHandler;
//$$ import com.replaymod.replay.ReplayModReplay;
//$$ import net.minecraft.client.Minecraft;
//$$ import org.spongepowered.asm.mixin.Mixin;
//$$ import org.spongepowered.asm.mixin.Pseudo;
//$$ import org.spongepowered.asm.mixin.Shadow;
//$$ import org.spongepowered.asm.mixin.injection.At;
//$$ import org.spongepowered.asm.mixin.injection.Redirect;
//$$
//$$ @Pseudo
//$$ @Mixin(targets = "shadersmod/client/Shaders", remap = false)
//$$ public abstract class MixinShaders {
//$$
//$$ @Shadow static Minecraft mc;
//$$ @Shadow static long systemTime;
//$$ @Shadow static long lastSystemTime;
//$$ @Shadow static long diffSystemTime;
//$$ @Shadow static int frameCounter;
//$$ @Shadow static float frameTime;
//$$ @Shadow static float frameTimeCounter;
//$$
//$$ @Redirect(method = "beginRender", at = @At(value = "INVOKE", target = "Ljava/lang/System;currentTimeMillis()J"))
//$$ private static long replayModCompat_currentTimeMillis() {
//$$ ReplayHandler replayHandler = ReplayModReplay.instance.getReplayHandler();
//$$ if (replayHandler != null) {
//$$ systemTime = replayHandler.getReplaySender().currentTimeStamp();
//$$
//$$ // We need to manipulate all the other previous-frame-time-based variables too
//$$
//$$ lastSystemTime = 0; // Draw all frames as if they were the first ones
//$$ // diffSystemTime will be set to 0 by Shaders
//$$ // frameTime will be set to 0 by Shaders
//$$ frameTimeCounter = systemTime / 1000f; // will be %= 3600f by Shaders
//$$
//$$ // Set frameCounter only if rendering is in progress
//$$ EntityRendererHandler entityRendererHandler =
//$$ ((EntityRendererHandler.IEntityRenderer) mc.entityRenderer).replayModRender_getHandler();
//$$ if (entityRendererHandler != null) {
//$$ frameCounter = entityRendererHandler.getRenderInfo().getFramesDone();
//$$ }
//$$
//$$ return systemTime;
//$$ }
//$$ return System.currentTimeMillis();
//$$ }
//$$
//$$ }
//#endif