java.lang.Object
net.minecraft.world.item.Item
net.minecraft.world.item.ArrowItem
tech.anonymoushacker1279.immersiveweapons.item.projectile.BulletItem<T>
All Implemented Interfaces:
net.minecraft.world.flag.FeatureElement, net.minecraft.world.level.ItemLike, net.minecraftforge.common.extensions.IForgeItem

public class BulletItem<T extends BulletEntity> extends net.minecraft.world.item.ArrowItem
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
     

    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
    final boolean
     
    final double
     
    final net.minecraftforge.registries.RegistryObject<net.minecraft.world.entity.EntityType<T>>
     
    final double
     
     
    final boolean
     
    final int
     
    final float
     
    final int
     
    final List<Double>
     

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

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

    Fields inherited from interface net.minecraft.world.flag.FeatureElement

    FILTERED_REGISTRIES
  • Constructor Summary

    Constructors
    Constructor
    Description
    BulletItem(net.minecraft.world.item.Item.Properties properties, double damage, net.minecraftforge.registries.RegistryObject<net.minecraft.world.entity.EntityType<T>> bulletEntity, int pierceLevel, boolean canBeInfinite, float misfireChance, double gravityModifier, List<Double> shootingVectorInputs, int knockbackStrength, HitEffectUtils.HitEffect hitEffect, boolean isExplosive)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    createBullet(net.minecraft.world.level.Level level, net.minecraft.world.entity.LivingEntity shooter)
     
    createCannonball(net.minecraft.world.level.Level level, net.minecraft.world.entity.LivingEntity shooter)
     
    createFlare(net.minecraft.world.level.Level level, net.minecraft.world.entity.LivingEntity shooter)
     
    boolean
    isInfinite(net.minecraft.world.item.ItemStack bullet, net.minecraft.world.item.ItemStack gun, net.minecraft.world.entity.player.Player player)
    Check if the bullet is infinite.

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

    createArrow

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

    appendHoverText, asItem, builtInRegistryHolder, byBlock, byId, canAttackBlock, canBeDepleted, canBeHurtBy, canFitInsideContainerItems, finishUsingItem, getBarColor, getBarWidth, getCraftingRemainingItem, getDefaultAttributeModifiers, getDefaultInstance, getDescription, getDescriptionId, getDescriptionId, getDestroySpeed, getDrinkingSound, getEatingSound, getEnchantmentValue, getFoodProperties, getId, getMaxDamage, getMaxStackSize, getName, getOrCreateDescriptionId, getPlayerPOVHitResult, getRarity, getRenderPropertiesInternal, getTooltipImage, getUseAnimation, getUseDuration, hasCraftingRemainingItem, hurtEnemy, initializeClient, interactLivingEntity, inventoryTick, isBarVisible, isComplex, isCorrectToolForDrops, isEdible, isEnchantable, isFireResistant, isFoil, isRepairable, isValidRepairItem, mineBlock, onCraftedBy, onDestroyed, onUseTick, overrideOtherStackedOnMe, overrideStackedOnOther, releaseUsing, requiredFeatures, shouldOverrideMultiplayerNbt, toString, use, 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.minecraft.world.flag.FeatureElement

    isEnabled

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

    canApplyAtEnchantingTable, canContinueUsing, canDisableShield, canElytraFly, canEquip, canGrindstoneRepair, canPerformAction, canWalkOnPowderedSnow, createEntity, damageItem, doesSneakBypassUse, elytraFlightTick, getAllEnchantments, getArmorTexture, getAttributeModifiers, getBurnTime, getCraftingRemainingItem, getCreatorModId, getDamage, getDefaultTooltipHideFlags, getEnchantmentLevel, getEnchantmentValue, getEntityLifespan, getEquipmentSlot, getFoodProperties, getHighlightTip, getMaxDamage, getMaxStackSize, getShareTag, getSweepHitBox, getXpRepairRatio, hasCraftingRemainingItem, hasCustomEntity, initCapabilities, isBookEnchantable, isCorrectToolForDrops, isDamageable, isDamaged, isEnderMask, isNotReplaceableByPickAction, isPiglinCurrency, makesPiglinsNeutral, onArmorTick, onBlockStartBreak, onDestroyed, onDroppedByPlayer, onEntityItemUpdate, onEntitySwing, onHorseArmorTick, onItemUseFirst, onLeftClickEntity, onStopUsing, readShareTag, setDamage, shouldCauseBlockBreakReset, shouldCauseReequipAnimation
  • Field Details

    • entityRegistryObject

      public final net.minecraftforge.registries.RegistryObject<net.minecraft.world.entity.EntityType<T extends BulletEntity>> entityRegistryObject
    • pierceLevel

      public final int pierceLevel
    • canBeInfinite

      public final boolean canBeInfinite
    • misfireChance

      public final float misfireChance
    • gravityModifier

      public final double gravityModifier
    • shootingVectorInputs

      public final List<Double> shootingVectorInputs
    • knockbackStrength

      public final int knockbackStrength
    • damage

      public final double damage
    • hitEffect

      public final HitEffectUtils.HitEffect hitEffect
    • isExplosive

      public final boolean isExplosive
  • Constructor Details

    • BulletItem

      public BulletItem(net.minecraft.world.item.Item.Properties properties, double damage, net.minecraftforge.registries.RegistryObject<net.minecraft.world.entity.EntityType<T>> bulletEntity, int pierceLevel, boolean canBeInfinite, float misfireChance, double gravityModifier, List<Double> shootingVectorInputs, int knockbackStrength, HitEffectUtils.HitEffect hitEffect, boolean isExplosive)
  • Method Details

    • createBullet

      public BulletEntity createBullet(net.minecraft.world.level.Level level, net.minecraft.world.entity.LivingEntity shooter)
    • createFlare

      public FlareEntity createFlare(net.minecraft.world.level.Level level, net.minecraft.world.entity.LivingEntity shooter)
    • createCannonball

      public CannonballEntity createCannonball(net.minecraft.world.level.Level level, net.minecraft.world.entity.LivingEntity shooter)
    • isInfinite

      public boolean isInfinite(net.minecraft.world.item.ItemStack bullet, net.minecraft.world.item.ItemStack gun, net.minecraft.world.entity.player.Player player)
      Check if the bullet is infinite. A more flexible check than Vanilla provides. Restricts the ability to lower level bullets, for balance.
      Overrides:
      isInfinite in class net.minecraft.world.item.ArrowItem
      Parameters:
      bullet - the bullet being checked
      gun - the gun firing the bullet
      player - the player firing the gun
      Returns:
      boolean