Move remaining mixins to replay module

This commit is contained in:
johni0702
2016-09-03 11:56:12 +02:00
parent 31eed8801a
commit 4de933516e
9 changed files with 35 additions and 59 deletions

View File

@@ -0,0 +1,22 @@
package com.replaymod.replay.mixin;
import com.replaymod.replay.ReplayModReplay;
import net.minecraft.client.renderer.culling.ICamera;
import net.minecraft.client.renderer.entity.Render;
import net.minecraft.client.renderer.entity.RenderArrow;
import net.minecraft.client.renderer.entity.RenderManager;
import net.minecraft.entity.Entity;
import org.spongepowered.asm.mixin.Mixin;
@Mixin(RenderArrow.class)
public abstract class MixinRenderArrow extends Render {
protected MixinRenderArrow(RenderManager renderManager) {
super(renderManager);
}
@Override
public boolean shouldRender(Entity entity, ICamera camera, double camX, double camY, double camZ) {
// Force arrows to always render, otherwise they stop rendering when you get close to them
return ReplayModReplay.instance.getReplayHandler() != null || super.shouldRender(entity, camera, camX, camY, camZ);
}
}