Skip to content

Commit

Permalink
switch to newer gif lib
Browse files Browse the repository at this point in the history
  • Loading branch information
Mysticpasta1 committed May 21, 2024
1 parent 7fce204 commit 0f95cfd
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 10 deletions.
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
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;
import io.github.cottonmc.cotton.gui.widget.WLabel;
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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<ActionResult> cir){
cir.cancel();
Expand All @@ -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);
Expand Down

0 comments on commit 0f95cfd

Please sign in to comment.