Remove overlays during replay via mixins
This commit is contained in:
@@ -100,9 +100,6 @@ public class CameraEntity extends EntityPlayer {
|
||||
//Aligns the particle rotation
|
||||
mc.thePlayer.rotationPitch = mc.thePlayer.prevRotationPitch = mc.getRenderViewEntity().rotationPitch;
|
||||
mc.thePlayer.rotationYaw = mc.thePlayer.prevRotationYaw = mc.getRenderViewEntity().rotationYaw;
|
||||
|
||||
//removes water/suffocation/shadow overlays in screen
|
||||
mc.thePlayer.setPosition(0, 500, 0);
|
||||
}
|
||||
|
||||
lastCall = Sys.getTime();
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
package eu.crushedpixel.replaymod.mixin;
|
||||
|
||||
import eu.crushedpixel.replaymod.replay.ReplayHandler;
|
||||
import net.minecraft.client.renderer.ItemRenderer;
|
||||
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(ItemRenderer.class)
|
||||
public abstract class MixinItemRenderer {
|
||||
@Inject(method = "renderOverlays", at = @At("HEAD"), cancellable = true)
|
||||
public void shouldRenderOverlay(float partialTick, CallbackInfo ci) {
|
||||
if (ReplayHandler.getCameraEntity() != null) {
|
||||
ci.cancel();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4,12 +4,13 @@
|
||||
"mixins": [
|
||||
"MixinEffectRenderer",
|
||||
"MixinEntityRenderer",
|
||||
"MixinItemRenderer",
|
||||
"MixinMinecraft",
|
||||
"MixinRender",
|
||||
"MixinRendererLivingEntity",
|
||||
"MixinRenderGlobal",
|
||||
"MixinRenderItem",
|
||||
"MixinRenderManager",
|
||||
"MixinRenderGlobal"
|
||||
"MixinRenderManager"
|
||||
],
|
||||
"server": [],
|
||||
"client": [],
|
||||
|
||||
Reference in New Issue
Block a user