aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/dulkirmod
diff options
context:
space:
mode:
authoringlettronald <inglettronald@gmail.com>2023-03-22 02:56:04 -0500
committeringlettronald <inglettronald@gmail.com>2023-03-22 02:56:04 -0500
commit2d250a5dd2250c9bd7ada1f9a5ef32f1fcf6166a (patch)
tree595ae64cf933c6e0ffe9da363353666456a878f2 /src/main/java/dulkirmod
parent2cb6f4cffee0ab505b35938cf71518e4640a229a (diff)
downloadDulkirMod-2d250a5dd2250c9bd7ada1f9a5ef32f1fcf6166a.tar.gz
DulkirMod-2d250a5dd2250c9bd7ada1f9a5ef32f1fcf6166a.tar.bz2
DulkirMod-2d250a5dd2250c9bd7ada1f9a5ef32f1fcf6166a.zip
bugfixing
Diffstat (limited to 'src/main/java/dulkirmod')
-rw-r--r--src/main/java/dulkirmod/mixins/MixinRendererManager.java26
1 files changed, 2 insertions, 24 deletions
diff --git a/src/main/java/dulkirmod/mixins/MixinRendererManager.java b/src/main/java/dulkirmod/mixins/MixinRendererManager.java
index d6e937e..2787f87 100644
--- a/src/main/java/dulkirmod/mixins/MixinRendererManager.java
+++ b/src/main/java/dulkirmod/mixins/MixinRendererManager.java
@@ -1,12 +1,8 @@
package dulkirmod.mixins;
-import dulkirmod.DulkirMod;
+import dulkirmod.features.HideHealerFairy;
import net.minecraft.client.renderer.entity.RenderManager;
import net.minecraft.entity.Entity;
-import net.minecraft.entity.item.EntityArmorStand;
-import net.minecraft.init.Items;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
@@ -17,24 +13,6 @@ 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) {
- if (!DulkirMod.Companion.getConfig().getHideHealerFairy()) return;
- if (entity instanceof EntityArmorStand) {
- 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")) {
- String healerFairyTexture = "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvOTZjM2UzMWNmYzY2NzMzMjc1YzQyZmNmYjVkOWE0NDM0MmQ2NDNiNTVjZDE0YzljNzdkMjczYTIzNTIifX19";
- if (healerFairyTexture.equals(properties.getTagList("textures", 10).getCompoundTagAt(0).getString("Value"))) {
- cir.cancel();
- }
- }
- }
- }
- }
- }
+ HideHealerFairy.INSTANCE.handle(entity, cir);
}
} \ No newline at end of file