Class ItemBroom

java.lang.Object
net.minecraft.world.item.Item
net.minecraftforge.fluids.capability.ItemFluidContainer
org.cyclops.cyclopscore.item.DamageIndicatedItemFluidContainer
org.cyclops.evilcraft.core.item.ItemBloodContainer
org.cyclops.evilcraft.item.ItemBroom
All Implemented Interfaces:
net.minecraft.world.level.ItemLike, net.minecraftforge.common.extensions.IForgeItem, org.cyclops.cyclopscore.item.IInformationProvider, IBroom

public class ItemBroom extends ItemBloodContainer implements IBroom
Item for the EntityBroom.
  • Nested Class Summary

    Nested classes/interfaces inherited from class net.minecraft.world.item.Item

    net.minecraft.world.item.Item.Properties
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected static final net.minecraft.resources.ResourceLocation
     

    Fields inherited from class org.cyclops.evilcraft.core.item.ItemBloodContainer

    canPickUp

    Fields inherited from class org.cyclops.cyclopscore.item.DamageIndicatedItemFluidContainer

    component, fluid

    Fields inherited from class net.minecraftforge.fluids.capability.ItemFluidContainer

    capacity

    Fields inherited from class net.minecraft.world.item.Item

    BASE_ATTACK_DAMAGE_UUID, BASE_ATTACK_SPEED_UUID, BY_BLOCK, canRepair, category, EAT_DURATION, MAX_BAR_WIDTH, MAX_STACK_SIZE

    Fields inherited from interface org.cyclops.cyclopscore.item.IInformationProvider

    BLOCK_PREFIX, INFO_PREFIX, INFO_PREFIX_STYLES, ITEM_PREFIX
  • Constructor Summary

    Constructors
    Constructor
    Description
    ItemBroom(net.minecraft.world.item.Item.Properties properties)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    appendHoverText(net.minecraft.world.item.ItemStack itemStack, net.minecraft.world.level.Level world, List<net.minecraft.network.chat.Component> list, net.minecraft.world.item.TooltipFlag flag)
     
    boolean
    canConsumeBroomEnergy(int amount, net.minecraft.world.item.ItemStack itemStack, net.minecraft.world.entity.LivingEntity entityLiving)
    If this broom can consume a given energy amount.
    int
    consumeBroom(int amount, net.minecraft.world.item.ItemStack itemStack, net.minecraft.world.entity.LivingEntity entityLiving)
    Consume a given energy amount.
    getBroomModifiers(net.minecraft.world.item.ItemStack itemStack)
    All modifiers from the given broom.
    getBroomParts(net.minecraft.world.item.ItemStack itemStack)
    All parts from the given broom.
    net.minecraft.world.item.Rarity
    getRarity(net.minecraft.world.item.ItemStack itemStack)
     
    boolean
    If this item can pick up fluids when right-clicking (non-sneaking).
    boolean
    If this item can place fluids when right-clicking (non-sneaking).
    void
    onFovEvent(net.minecraftforge.client.event.FOVModifierEvent event)
     
    net.minecraft.world.InteractionResult
    onItemUseFirst(net.minecraft.world.item.ItemStack stack, net.minecraft.world.item.context.UseOnContext context)
     
    void
    onRenderOverlayEvent(net.minecraftforge.client.event.RenderGameOverlayEvent.Post event)
     
    net.minecraft.world.InteractionResultHolder<net.minecraft.world.item.ItemStack>
    use(net.minecraft.world.level.Level world, net.minecraft.world.entity.player.Player player, net.minecraft.world.InteractionHand hand)
     

    Methods inherited from class org.cyclops.evilcraft.core.item.ItemBloodContainer

    canConsume, consume, doesSneakBypassUse, drainFromOthers, setPlaceFluids

    Methods inherited from class org.cyclops.cyclopscore.item.DamageIndicatedItemFluidContainer

    canDrain, fillItemCategory, getBarColor, getBarWidth, getFluid, getInfo, initCapabilities, isBarVisible, provideInformation

    Methods inherited from class net.minecraft.world.item.Item

    allowedIn, asItem, builtInRegistryHolder, byBlock, byId, canAttackBlock, canBeDepleted, canBeHurtBy, canFitInsideContainerItems, finishUsingItem, getCraftingRemainingItem, getDefaultAttributeModifiers, getDefaultInstance, getDescription, getDescriptionId, getDescriptionId, getDestroySpeed, getDrinkingSound, getEatingSound, getEnchantmentValue, getEquipSound, getFoodProperties, getId, getItemCategory, getMaxDamage, getMaxStackSize, getName, getOrCreateDescriptionId, getPlayerPOVHitResult, getRenderPropertiesInternal, getTooltipImage, getUseAnimation, getUseDuration, hasCraftingRemainingItem, hurtEnemy, initializeClient, interactLivingEntity, inventoryTick, isComplex, isCorrectToolForDrops, isEdible, isEnchantable, isFireResistant, isFoil, isRepairable, isValidRepairItem, mineBlock, onCraftedBy, onDestroyed, onUseTick, overrideOtherStackedOnMe, overrideStackedOnOther, releaseUsing, shouldOverrideMultiplayerNbt, toString, useOn, useOnRelease, verifyTagAfterLoad

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface net.minecraftforge.common.extensions.IForgeItem

    canApplyAtEnchantingTable, canContinueUsing, canDisableShield, canElytraFly, canEquip, canPerformAction, canWalkOnPowderedSnow, createEntity, damageItem, elytraFlightTick, getAllEnchantments, getArmorTexture, getAttributeModifiers, getBurnTime, getContainerItem, getCreativeTabs, getCreatorModId, getDamage, getDefaultTooltipHideFlags, getEnchantmentLevel, getEntityLifespan, getEquipmentSlot, getFoodProperties, getHighlightTip, getItemEnchantability, getItemStackLimit, getMaxDamage, getShareTag, getSweepHitBox, getXpRepairRatio, hasContainerItem, hasCustomEntity, isBookEnchantable, isCorrectToolForDrops, isDamageable, isDamaged, isEnderMask, isPiglinCurrency, makesPiglinsNeutral, onArmorTick, onBlockStartBreak, onDestroyed, onDroppedByPlayer, onEntityItemUpdate, onEntitySwing, onHorseArmorTick, onLeftClickEntity, onUsingTick, readShareTag, setDamage, shouldCauseBlockBreakReset, shouldCauseReequipAnimation
  • Field Details

    • OVERLAY

      protected static final net.minecraft.resources.ResourceLocation OVERLAY
  • Constructor Details

    • ItemBroom

      public ItemBroom(net.minecraft.world.item.Item.Properties properties)
  • Method Details

    • isPlaceFluids

      public boolean isPlaceFluids()
      Description copied from class: ItemBloodContainer
      If this item can place fluids when right-clicking (non-sneaking). The fluid will only be placed if the container has at least 1000 mB inside of it and will drain that accordingly.
      Overrides:
      isPlaceFluids in class ItemBloodContainer
      Returns:
      If it can place fluids.
    • isPickupFluids

      public boolean isPickupFluids()
      Description copied from class: ItemBloodContainer
      If this item can pick up fluids when right-clicking (non-sneaking).
      Overrides:
      isPickupFluids in class ItemBloodContainer
      Returns:
      If it can pick up fluids.
    • use

      public net.minecraft.world.InteractionResultHolder<net.minecraft.world.item.ItemStack> use(net.minecraft.world.level.Level world, net.minecraft.world.entity.player.Player player, net.minecraft.world.InteractionHand hand)
      Overrides:
      use in class ItemBloodContainer
    • onItemUseFirst

      public net.minecraft.world.InteractionResult onItemUseFirst(net.minecraft.world.item.ItemStack stack, net.minecraft.world.item.context.UseOnContext context)
      Specified by:
      onItemUseFirst in interface net.minecraftforge.common.extensions.IForgeItem
      Overrides:
      onItemUseFirst in class ItemBloodContainer
    • getRarity

      public net.minecraft.world.item.Rarity getRarity(net.minecraft.world.item.ItemStack itemStack)
      Overrides:
      getRarity in class net.minecraft.world.item.Item
    • getBroomParts

      public Collection<IBroomPart> getBroomParts(net.minecraft.world.item.ItemStack itemStack)
      Description copied from interface: IBroom
      All parts from the given broom.
      Specified by:
      getBroomParts in interface IBroom
      Parameters:
      itemStack - The broom stack.
      Returns:
      The broom parts.
    • getBroomModifiers

      public Map<BroomModifier,Float> getBroomModifiers(net.minecraft.world.item.ItemStack itemStack)
      Description copied from interface: IBroom
      All modifiers from the given broom.
      Specified by:
      getBroomModifiers in interface IBroom
      Parameters:
      itemStack - The broom stack.
      Returns:
      The broom modifiers.
    • canConsumeBroomEnergy

      public boolean canConsumeBroomEnergy(int amount, net.minecraft.world.item.ItemStack itemStack, @Nullable net.minecraft.world.entity.LivingEntity entityLiving)
      Description copied from interface: IBroom
      If this broom can consume a given energy amount.
      Specified by:
      canConsumeBroomEnergy in interface IBroom
      Parameters:
      amount - The energy amount to drain.
      itemStack - The broom stack.
      entityLiving - The mounted entity.
      Returns:
      If the given amount can be drained.
    • consumeBroom

      public int consumeBroom(int amount, net.minecraft.world.item.ItemStack itemStack, @Nullable net.minecraft.world.entity.LivingEntity entityLiving)
      Description copied from interface: IBroom
      Consume a given energy amount.
      Specified by:
      consumeBroom in interface IBroom
      Parameters:
      amount - The energy amount to drain.
      itemStack - The broom stack.
      entityLiving - The mounted entity.
      Returns:
      The energy amount that was drained.
    • appendHoverText

      public void appendHoverText(net.minecraft.world.item.ItemStack itemStack, net.minecraft.world.level.Level world, List<net.minecraft.network.chat.Component> list, net.minecraft.world.item.TooltipFlag flag)
      Overrides:
      appendHoverText in class org.cyclops.cyclopscore.item.DamageIndicatedItemFluidContainer
    • onFovEvent

      public void onFovEvent(net.minecraftforge.client.event.FOVModifierEvent event)
    • onRenderOverlayEvent

      public void onRenderOverlayEvent(net.minecraftforge.client.event.RenderGameOverlayEvent.Post event)