aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/dulkirmod/mixins/MixinRendererManager.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/dulkirmod/mixins/MixinRendererManager.java')
-rw-r--r--src/main/java/dulkirmod/mixins/MixinRendererManager.java28
1 files changed, 8 insertions, 20 deletions
diff --git a/src/main/java/dulkirmod/mixins/MixinRendererManager.java b/src/main/java/dulkirmod/mixins/MixinRendererManager.java
index 964e690..d6e937e 100644
--- a/src/main/java/dulkirmod/mixins/MixinRendererManager.java
+++ b/src/main/java/dulkirmod/mixins/MixinRendererManager.java
@@ -1,5 +1,6 @@
package dulkirmod.mixins;
+import dulkirmod.DulkirMod;
import net.minecraft.client.renderer.entity.RenderManager;
import net.minecraft.entity.Entity;
import net.minecraft.entity.item.EntityArmorStand;
@@ -10,42 +11,29 @@ 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;
-import dulkirmod.DulkirMod;
@Mixin(RenderManager.class)
public class MixinRendererManager {
@Inject(method = "doRenderEntity", at = @At("HEAD"), cancellable = true)
- public void doRender(
- Entity entity,
- double x,
- double y,
- double z,
- float entityYaw,
- float partialTicks,
- boolean p_147939_10_,
- CallbackInfoReturnable<Boolean> cir
- ) {
+ public void doRender(Entity entity, double x, double y, double z, float entityYaw, float partialTicks, boolean p_147939_10_, CallbackInfoReturnable<Boolean> cir) {
if (!DulkirMod.Companion.getConfig().getHideHealerFairy()) return;
if (entity instanceof EntityArmorStand) {
- if (((EntityArmorStand) entity).getHeldItem() != null && ((EntityArmorStand) entity).getHeldItem().getItem() == Items.skull) {
- ItemStack stack = ((EntityArmorStand) entity).getHeldItem();
+ EntityArmorStand stand = (EntityArmorStand) entity;
+ if (stand.getHeldItem() != null && stand.getHeldItem().getItem() == Items.skull) {
+ ItemStack stack = stand.getHeldItem();
if (stack.hasTagCompound() && stack.getTagCompound().hasKey("SkullOwner")) {
NBTTagCompound skullOwner = stack.getTagCompound().getCompoundTag("SkullOwner");
if (skullOwner.hasKey("Properties")) {
NBTTagCompound properties = skullOwner.getCompoundTag("Properties");
if (properties.hasKey("textures")) {
- //if (properties.getTagList("textures", 10).tagCount() >= 1) {
- if ("eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvOTZjM2UzMWNmYzY2NzMzMjc1YzQyZmNmYjVkOWE0NDM0MmQ2NDNiNTVjZDE0YzljNzdkMjczYTIzNTIifX19"
- .equals(properties.getTagList("textures", 10).getCompoundTagAt(0).getString("Value")))
+ String healerFairyTexture = "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvOTZjM2UzMWNmYzY2NzMzMjc1YzQyZmNmYjVkOWE0NDM0MmQ2NDNiNTVjZDE0YzljNzdkMjczYTIzNTIifX19";
+ if (healerFairyTexture.equals(properties.getTagList("textures", 10).getCompoundTagAt(0).getString("Value"))) {
cir.cancel();
- //}
+ }
}
-
}
-
}
-
}
}
}