More 1.15 mapping fixes
This commit is contained in:
@@ -2,13 +2,18 @@
|
||||
package com.replaymod.replay.mixin;
|
||||
|
||||
import com.replaymod.replay.ReplayModReplay;
|
||||
import net.minecraft.client.render.VisibleRegion;
|
||||
import net.minecraft.client.render.entity.EntityRenderer;
|
||||
import net.minecraft.client.render.entity.ArrowEntityRenderer;
|
||||
import net.minecraft.client.render.entity.EntityRenderDispatcher;
|
||||
import net.minecraft.entity.Entity;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
|
||||
//#if MC>=11500
|
||||
//$$ import net.minecraft.client.render.Frustum;
|
||||
//#else
|
||||
import net.minecraft.client.render.VisibleRegion;
|
||||
//#endif
|
||||
|
||||
@Mixin(ArrowEntityRenderer.class)
|
||||
public abstract class MixinRenderArrow extends EntityRenderer {
|
||||
protected MixinRenderArrow(EntityRenderDispatcher renderManager) {
|
||||
@@ -17,7 +22,13 @@ public abstract class MixinRenderArrow extends EntityRenderer {
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public boolean isVisible(Entity entity, VisibleRegion camera, double camX, double camY, double camZ) {
|
||||
public boolean isVisible(Entity entity,
|
||||
//#if MC>=11500
|
||||
//$$ Frustum camera,
|
||||
//#else
|
||||
VisibleRegion camera,
|
||||
//#endif
|
||||
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.isVisible(entity, camera, camX, camY, camZ);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user