Class SafetyGogglesItem

java.lang.Object
net.minecraft.world.item.Item
com.pixelmonmod.pixelmon.items.PixelmonItem
com.pixelmonmod.pixelmon.items.HeldItem
com.pixelmonmod.pixelmon.items.heldItems.SafetyGogglesItem
All Implemented Interfaces:
ITranslatable, IEquippable, net.minecraft.world.flag.FeatureElement, net.minecraft.world.level.ItemLike, net.minecraftforge.common.extensions.IForgeItem

public class SafetyGogglesItem extends HeldItem implements IEquippable
Protects from powder-based moves.
  • Constructor Details

    • SafetyGogglesItem

      public SafetyGogglesItem()
      Initializes the held item.
  • Method Details

    • allowsIncomingAttack

      public boolean allowsIncomingAttack(PixelmonWrapper pokemon, PixelmonWrapper user, Attack a)
      Description copied from class: HeldItem
      Determines whether the holder can be hit by an incoming attack.
      Overrides:
      allowsIncomingAttack in class HeldItem
      Parameters:
      pokemon - The holder.
      user - The attack's user.
      a - The attack.
      Returns:
      Whether the attack can hit the holder.
    • getEquipmentSlot

      public net.minecraft.world.entity.EquipmentSlot getEquipmentSlot(net.minecraft.world.item.ItemStack stack)
      Specified by:
      getEquipmentSlot in interface IEquippable
      Specified by:
      getEquipmentSlot in interface net.minecraftforge.common.extensions.IForgeItem
    • getEquippableModelKey

      public String getEquippableModelKey()
      Specified by:
      getEquippableModelKey in interface IEquippable
    • getEquippableTexture

      public net.minecraft.resources.ResourceLocation getEquippableTexture()
      Specified by:
      getEquippableTexture in interface IEquippable
    • getEquippableItem

      public net.minecraft.world.item.Item getEquippableItem()
      Specified by:
      getEquippableItem in interface IEquippable
    • canEquip

      public boolean canEquip(net.minecraft.world.item.ItemStack stack, net.minecraft.world.entity.EquipmentSlot armorType, net.minecraft.world.entity.Entity entity)
      Specified by:
      canEquip in interface net.minecraftforge.common.extensions.IForgeItem