Added Spectator Keyframes and handles them properly in both normal and rendered Replay Paths

This commit is contained in:
CrushedPixel
2015-05-31 13:54:22 +02:00
parent 431a36c9d9
commit fe036d72d8
8 changed files with 143 additions and 71 deletions

View File

@@ -1,5 +1,7 @@
package eu.crushedpixel.replaymod.video.entity;
import eu.crushedpixel.replaymod.ReplayMod;
import eu.crushedpixel.replaymod.replay.ReplayHandler;
import net.minecraft.client.Minecraft;
import net.minecraft.client.particle.EffectRenderer;
import net.minecraft.client.renderer.*;
@@ -7,6 +9,7 @@ import net.minecraft.client.renderer.culling.ClippingHelperImpl;
import net.minecraft.client.renderer.culling.ICamera;
import net.minecraft.client.renderer.texture.TextureMap;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.EnumWorldBlockLayer;
import net.minecraft.util.MathHelper;
@@ -172,6 +175,9 @@ public abstract class CustomEntityRenderer {
}
net.minecraftforge.client.ForgeHooksClient.dispatchRenderLast(renderglobal, partialTicks);
if(!ReplayHandler.isCamera() && ReplayHandler.getCurrentEntity() instanceof EntityPlayer)
ReplayMod.spectatorRenderer.renderSpectatorHand((EntityPlayer)ReplayHandler.getCurrentEntity(), partialTicks, renderPass);
}
protected void setupCameraTransform(float partialTicks) {