diff --git a/build.gradle b/build.gradle index 25d1bdd..323dad8 100644 --- a/build.gradle +++ b/build.gradle @@ -72,8 +72,8 @@ dependencies { modImplementation include("io.github.Mysticpasta1:libgui:342ff6fc9f") - implementation 'com.madgag:animated-gif-lib:1.4' - include 'com.madgag:animated-gif-lib:1.4' + implementation 'com.github.rtyley:animated-gif-lib-for-java:animated-gif-lib-1.7' + include 'com.github.rtyley:animated-gif-lib-for-java:animated-gif-lib-1.7' modCompileOnly ("dev.su5ed.sinytra.fabric-api:fabric-api:0.91.0+1.10.8+1.20.1") modRuntimeOnly ("dev.su5ed.sinytra.fabric-api:fabric-api:0.91.0+1.10.8+1.20.1") diff --git a/src/main/java/com/mystic/holographicrenders/client/HolographicRendersClient.java b/src/main/java/com/mystic/holographicrenders/client/HolographicRendersClient.java index 9e089a0..05fc9d8 100644 --- a/src/main/java/com/mystic/holographicrenders/client/HolographicRendersClient.java +++ b/src/main/java/com/mystic/holographicrenders/client/HolographicRendersClient.java @@ -10,7 +10,6 @@ import com.mystic.holographicrenders.network.LightPacket; import com.mystic.holographicrenders.network.RotatePacket; import com.mystic.holographicrenders.network.SpinPacket; -import net.fabricmc.api.ClientModInitializer; import net.fabricmc.fabric.api.client.networking.v1.ClientPlayNetworking; import net.fabricmc.fabric.api.client.screenhandler.v1.ScreenRegistry; import net.minecraft.block.entity.BlockEntity; diff --git a/src/main/java/com/mystic/holographicrenders/client/TextboxScreenRoot.java b/src/main/java/com/mystic/holographicrenders/client/TextboxScreenRoot.java index ead4b1d..b14b0de 100644 --- a/src/main/java/com/mystic/holographicrenders/client/TextboxScreenRoot.java +++ b/src/main/java/com/mystic/holographicrenders/client/TextboxScreenRoot.java @@ -1,7 +1,6 @@ package com.mystic.holographicrenders.client; import com.mystic.holographicrenders.HolographicRenders; -import io.github.cottonmc.cotton.gui.ItemSyncedGuiDescription; import io.github.cottonmc.cotton.gui.client.LightweightGuiDescription; import io.github.cottonmc.cotton.gui.widget.WButton; import io.github.cottonmc.cotton.gui.widget.WGridPanel; @@ -9,8 +8,6 @@ import io.github.cottonmc.cotton.gui.widget.WTextField; import net.fabricmc.fabric.api.client.networking.v1.ClientPlayNetworking; import net.fabricmc.fabric.api.networking.v1.PacketByteBufs; -import net.minecraft.entity.player.PlayerInventory; -import net.minecraft.inventory.StackReference; import net.minecraft.network.PacketByteBuf; import net.minecraft.text.Text; import net.minecraft.util.Hand; diff --git a/src/main/java/com/mystic/holographicrenders/mixin/ArmorStandMixin.java b/src/main/java/com/mystic/holographicrenders/mixin/ArmorStandMixin.java index a5adb4a..8cd95e7 100644 --- a/src/main/java/com/mystic/holographicrenders/mixin/ArmorStandMixin.java +++ b/src/main/java/com/mystic/holographicrenders/mixin/ArmorStandMixin.java @@ -23,15 +23,14 @@ public abstract class ArmorStandMixin { @Shadow public abstract boolean isMarker(); - @Unique - protected abstract EquipmentSlot slotFromPosition(Vec3d vec3d); - @Shadow protected abstract boolean isSlotDisabled(EquipmentSlot slot); @Shadow protected abstract boolean equip(PlayerEntity player, EquipmentSlot slot, ItemStack stack, Hand hand); @Shadow public abstract boolean shouldShowArms(); + @Shadow protected abstract EquipmentSlot getSlotFromPosition(Vec3d hitPos); + @Inject(method = "interactAt", at = @At("HEAD"), cancellable = true) public void interactAt(PlayerEntity player, Vec3d hitPos, Hand hand, CallbackInfoReturnable cir){ cir.cancel(); @@ -46,7 +45,7 @@ public void interactAt(PlayerEntity player, Vec3d hitPos, Hand hand, CallbackInf } else { EquipmentSlot equipmentSlot = MobEntity.getPreferredEquipmentSlot(itemStack); if (itemStack.isEmpty()) { - EquipmentSlot equipmentSlot2 = this.slotFromPosition(hitPos); + EquipmentSlot equipmentSlot2 = this.getSlotFromPosition(hitPos); EquipmentSlot equipmentSlot3 = this.isSlotDisabled(equipmentSlot2) ? equipmentSlot : equipmentSlot2; if (player.hasStackEquipped(equipmentSlot3) && this.equip(player, equipmentSlot3, itemStack, hand)) { cir.setReturnValue(ActionResult.SUCCESS);