Fix name of invis armor stand with CustomNameVisible not rendering (fixes #72)

This commit is contained in:
Jonas Herzig
2017-08-12 13:19:18 +02:00
parent b9ea572e19
commit 8499c0f154
2 changed files with 0 additions and 23 deletions

View File

@@ -1,22 +0,0 @@
package com.replaymod.replay.mixin;
import com.replaymod.replay.camera.CameraEntity;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.entity.ArmorStandRenderer;
import net.minecraft.entity.item.EntityArmorStand;
import net.minecraft.entity.player.EntityPlayer;
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.CallbackInfoReturnable;
@Mixin(ArmorStandRenderer.class)
public abstract class MixinArmorStandRenderer {
@Inject(method = "func_177099_b", at = @At("HEAD"), cancellable = true)
private void replayModReplay_canRenderInvisibleName(EntityArmorStand entity, CallbackInfoReturnable<Boolean> ci) {
EntityPlayer thePlayer = Minecraft.getMinecraft().thePlayer;
if (thePlayer instanceof CameraEntity && entity.isInvisible()) {
ci.setReturnValue(false);
}
}
}

View File

@@ -2,7 +2,6 @@
"required": true,
"package": "com.replaymod.replay.mixin",
"mixins": [
"MixinArmorStandRenderer",
"MixinGuiSpectator",
"MixinPlayerControllerMP",
"MixinRenderArrow",