diff options
author | SoniEx2 <endermoneymod@gmail.com> | 2023-07-02 01:32:49 -0300 |
---|---|---|
committer | SoniEx2 <endermoneymod@gmail.com> | 2023-07-02 01:32:49 -0300 |
commit | 12048dc1a1cf01f8a0f37ced83af78b57a35b4cd (patch) | |
tree | ec521c2f2f4694ffa35012518fcec9c7b1fca002 /src/main/java/ganarchy/chewstuff/ChewableItem.java | |
parent | e9fda053b04038c772d7fc0010f6c10557e0d83e (diff) |
Diffstat (limited to 'src/main/java/ganarchy/chewstuff/ChewableItem.java')
-rw-r--r-- | src/main/java/ganarchy/chewstuff/ChewableItem.java | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/main/java/ganarchy/chewstuff/ChewableItem.java b/src/main/java/ganarchy/chewstuff/ChewableItem.java index e3c8f60..5e637c4 100644 --- a/src/main/java/ganarchy/chewstuff/ChewableItem.java +++ b/src/main/java/ganarchy/chewstuff/ChewableItem.java @@ -9,7 +9,6 @@ import net.minecraft.entity.effect.StatusEffect; import net.minecraft.entity.effect.StatusEffectInstance; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.ItemStack; -import net.minecraft.item.Wearable; import net.minecraft.nbt.NbtCompound; import net.minecraft.network.packet.s2c.play.EntityStatusEffectS2CPacket; import net.minecraft.server.network.ServerPlayerEntity; @@ -23,7 +22,7 @@ import java.util.stream.Collectors; /** * An item that can be chewed. */ -public class ChewableItem extends TrinketItem implements Wearable { +public class ChewableItem extends TrinketItem { /** * The cooldown between activations, in ticks. */ @@ -44,7 +43,7 @@ public class ChewableItem extends TrinketItem implements Wearable { @Override public void onEquip(ItemStack stack, SlotReference slot, LivingEntity entity) { - if (entity.world.isClient) { + if (entity.getWorld().isClient) { return; } var maybeInfo = ChewComponents.CHEW.maybeGet(entity); @@ -57,7 +56,7 @@ public class ChewableItem extends TrinketItem implements Wearable { public void onUnequip( ItemStack stack, SlotReference slot, LivingEntity entity ) { - if (entity.world.isClient) { + if (entity.getWorld().isClient) { return; } var maybeInfo = ChewComponents.CHEW.maybeGet(entity); @@ -70,7 +69,7 @@ public class ChewableItem extends TrinketItem implements Wearable { @Override public void tick(ItemStack stack, SlotReference slot, LivingEntity entity) { - if (entity.world.isClient) { + if (entity.getWorld().isClient) { return; } if (entity instanceof PlayerEntity player) { |