From b36dc615e1d6f9b2715dde44bf2e975bc6c5e4c3 Mon Sep 17 00:00:00 2001 From: Abdulaziz <127992888+0hwx@users.noreply.github.com> Date: Wed, 8 Jan 2025 10:32:51 +0300 Subject: [PATCH] Check for players only (#30) --- .../bogosorter/mixins/early/minecraft/MixinItemStack.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/cleanroommc/bogosorter/mixins/early/minecraft/MixinItemStack.java b/src/main/java/com/cleanroommc/bogosorter/mixins/early/minecraft/MixinItemStack.java index 331c9fc..e0ba7c0 100644 --- a/src/main/java/com/cleanroommc/bogosorter/mixins/early/minecraft/MixinItemStack.java +++ b/src/main/java/com/cleanroommc/bogosorter/mixins/early/minecraft/MixinItemStack.java @@ -3,7 +3,7 @@ import java.util.Random; import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.item.ItemStack; import org.spongepowered.asm.mixin.Mixin; @@ -19,7 +19,7 @@ public abstract class MixinItemStack { @Unique - EntityPlayer bogo$entityPlayer = null; + EntityPlayerMP bogo$entityPlayer = null; @Inject( method = "attemptDamageItem", @@ -35,7 +35,7 @@ public abstract class MixinItemStack { target = "Lnet/minecraft/item/ItemStack;isItemStackDamageable()Z", shift = At.Shift.AFTER)) private void bogo$damageItem(int p_77972_1_, EntityLivingBase p_77972_2_, CallbackInfo ci) { - if (p_77972_2_ instanceof EntityPlayer player) { + if (p_77972_2_ instanceof EntityPlayerMP player) { bogo$entityPlayer = player; } else bogo$entityPlayer = null; }