Class HandCannonItem
java.lang.Object
net.minecraft.world.item.Item
tech.anonymoushacker1279.immersiveweapons.item.gun.AbstractGunItem
tech.anonymoushacker1279.immersiveweapons.item.gun.SimplePistolItem
tech.anonymoushacker1279.immersiveweapons.item.gun.HandCannonItem
- All Implemented Interfaces:
net.minecraft.world.flag.FeatureElement, net.minecraft.world.level.ItemLike, net.neoforged.neoforge.common.extensions.IItemExtension
- Direct Known Subclasses:
DragonsBreathCannonItem
-
Nested Class Summary
Nested classes/interfaces inherited from class AbstractGunItem
AbstractGunItem.PowderTypeNested classes/interfaces inherited from class net.minecraft.world.item.Item
net.minecraft.world.item.Item.Properties, net.minecraft.world.item.Item.TooltipContext -
Field Summary
Fields inherited from class AbstractGunItem
CANNONBALLS, DRAGON_FIREBALLS, FLAMMABLE_POWDERS, FLARES, MUSKET_BALLS, POWDER_TYPEFields inherited from class net.minecraft.world.item.Item
ABSOLUTE_MAX_STACK_SIZE, APPROXIMATELY_INFINITE_USE_DURATION, BASE_ATTACK_DAMAGE_ID, BASE_ATTACK_SPEED_ID, BY_BLOCK, canCombineRepair, CODEC, CODEC_WITH_BOUND_COMPONENTS, DEFAULT_MAX_STACK_SIZE, descriptionId, MAX_BAR_WIDTH, STREAM_CODECFields inherited from interface net.minecraft.world.flag.FeatureElement
FILTERED_REGISTRIES -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.world.item.ItemGet the default ammunition.floatintnet.minecraft.sounds.SoundEventGet the fire sound.floatPredicate<net.minecraft.world.item.ItemStack> Get the predicate to match ammunition when searching the player's inventory, not their main/offhandintfloatfloatvoidprepareBulletForFire(net.minecraft.world.item.ItemStack gun, BulletEntity bulletEntity, net.minecraft.world.entity.LivingEntity shooter, float powderModifier) Methods inherited from class AbstractGunItem
defaultPowder, findAmmo, findPowder, getBulletsToFire, getFireVelocity, getHeldPredicate, getMaxBulletsToFire, getUseDuration, handleAmmoStack, handleMuzzleFlash, handlePowderStack, releaseUsing, setupFire, useMethods inherited from class net.minecraft.world.item.Item
appendHoverText, asItem, builtInRegistryHolder, byBlock, byId, canDestroyBlock, canFitInsideContainerItems, components, computeDefaultResource, finishUsingItem, getAttackDamageBonus, getBarColor, getBarWidth, getCraftingRemainder, getDefaultInstance, getDefaultMaxStackSize, getDescriptionId, getDestroySpeed, getId, getItemDamageSource, getName, getPlayerPOVHitResult, getTooltipImage, getUseAnimation, hurtEnemy, interactLivingEntity, inventoryTick, isBarVisible, isCombineRepairable, isCorrectToolForDrops, isFoil, mineBlock, onCraftedBy, onCraftedPostProcess, onDestroyed, onUseTick, overrideOtherStackedOnMe, overrideStackedOnOther, postHurtEnemy, requiredFeatures, resetDefaultResource, shouldPrintOpWarning, toString, useOn, useOnReleaseMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.world.flag.FeatureElement
isEnabledMethods inherited from interface net.neoforged.neoforge.common.extensions.IItemExtension
applyEnchantments, canBeHurtBy, canContinueUsing, canEquip, canFitInsideContainerItems, canGrindstoneRepair, canPerformAction, canWalkOnPowderedSnow, createEntity, damageItem, doesSneakBypassUse, getAllEnchantments, getBurnTime, getCraftingRemainder, getCreatorModId, getDamage, getDefaultAttributeModifiers, getEnchantmentLevel, getEntityLifespan, getEquipmentSlot, getHighlightTip, getMaxDamage, getMaxStackSize, getSweepHitBox, getXpRepairRatio, hasCustomEntity, isDamageable, isDamaged, isGazeDisguise, isNotReplaceableByPickAction, isPiglinCurrency, isPrimaryItemFor, makesPiglinsNeutral, onAnimalArmorTick, onDestroyed, onDroppedByPlayer, onEntityItemUpdate, onEntitySwing, onItemUseFirst, onLeftClickEntity, onStopUsing, setDamage, shouldCauseBlockBreakReset, shouldCauseReequipAnimation, supportsEnchantment
-
Constructor Details
-
HandCannonItem
public HandCannonItem(net.minecraft.world.item.Item.Properties properties)
-
-
Method Details
-
defaultAmmo
public net.minecraft.world.item.Item defaultAmmo()Description copied from class:AbstractGunItemGet the default ammunition.- Overrides:
defaultAmmoin classAbstractGunItem- Returns:
- Item
-
getInventoryAmmoPredicate
Description copied from class:AbstractGunItemGet the predicate to match ammunition when searching the player's inventory, not their main/offhand- Overrides:
getInventoryAmmoPredicatein classAbstractGunItem- Returns:
- Predicate extending ItemStack
-
getFireSound
public net.minecraft.sounds.SoundEvent getFireSound()Description copied from class:AbstractGunItemGet the fire sound.- Overrides:
getFireSoundin classAbstractGunItem- Returns:
- SoundEvent
-
getKnockbackLevel
public int getKnockbackLevel()- Overrides:
getKnockbackLevelin classAbstractGunItem
-
getBaseFireVelocity
public float getBaseFireVelocity()- Overrides:
getBaseFireVelocityin classAbstractGunItem
-
getInaccuracy
public float getInaccuracy()- Overrides:
getInaccuracyin classAbstractGunItem
-
prepareBulletForFire
public void prepareBulletForFire(net.minecraft.world.item.ItemStack gun, BulletEntity bulletEntity, net.minecraft.world.entity.LivingEntity shooter, float powderModifier) - Overrides:
prepareBulletForFirein classAbstractGunItem
-
getMaxYRecoil
public float getMaxYRecoil()- Overrides:
getMaxYRecoilin classAbstractGunItem
-
getMaxXRecoil
public float getMaxXRecoil()- Overrides:
getMaxXRecoilin classAbstractGunItem
-
getCooldown
public int getCooldown()- Overrides:
getCooldownin classAbstractGunItem
-