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
-
Nested Class Summary
Nested classes/interfaces inherited from class tech.anonymoushacker1279.immersiveweapons.item.gun.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 tech.anonymoushacker1279.immersiveweapons.item.gun.AbstractGunItem
CANNONBALLS, FLAMMABLE_POWDERS, FLARES, MUSKET_BALLSFields inherited from class net.minecraft.world.item.Item
ABSOLUTE_MAX_STACK_SIZE, BASE_ATTACK_DAMAGE_ID, BASE_ATTACK_SPEED_ID, BY_BLOCK, canRepair, DEFAULT_MAX_STACK_SIZE, MAX_BAR_WIDTHFields 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 tech.anonymoushacker1279.immersiveweapons.item.gun.AbstractGunItem
canScope, defaultPowder, findAmmo, findPowder, getBulletsToFire, getEnchantmentValue, getFireVelocity, getHeldPredicate, getMaxBulletsToFire, getPowderFromItem, getRepairMaterial, getUseAnimation, getUseDuration, handleAmmoStack, handleMuzzleFlash, handlePowderStack, inventoryTick, isPowder, isValidRepairItem, onDroppedByPlayer, onUseTick, releaseUsing, setupFire, useMethods inherited from class net.minecraft.world.item.Item
appendHoverText, asItem, builtInRegistryHolder, byBlock, byId, canAttackBlock, canFitInsideContainerItems, components, finishUsingItem, getAttackDamageBonus, getBarColor, getBarWidth, getBreakingSound, getCraftingRemainingItem, getDefaultAttributeModifiers, getDefaultInstance, getDefaultMaxStackSize, getDescription, getDescriptionId, getDescriptionId, getDestroySpeed, getDrinkingSound, getEatingSound, getEnchantmentValue, getId, getName, getOrCreateDescriptionId, getPlayerPOVHitResult, getTooltipImage, hasCraftingRemainingItem, hurtEnemy, initializeClient, interactLivingEntity, isBarVisible, isComplex, isCorrectToolForDrops, isEnchantable, isFoil, isRepairable, mineBlock, modifyDefaultComponentsFrom, onCraftedBy, onCraftedPostProcess, onDestroyed, overrideOtherStackedOnMe, overrideStackedOnOther, postHurtEnemy, requiredFeatures, toString, useOn, useOnRelease, verifyComponentsAfterLoadMethods inherited from class java.lang.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, canDisableShield, canElytraFly, canEquip, canGrindstoneRepair, canPerformAction, canWalkOnPowderedSnow, createEntity, damageItem, doesSneakBypassUse, elytraFlightTick, getAllEnchantments, getArmorTexture, getBurnTime, getCraftingRemainingItem, getCreatorModId, getDamage, getDefaultAttributeModifiers, getEnchantmentLevel, getEntityLifespan, getEquipmentSlot, getFoodProperties, getHighlightTip, getMaxDamage, getMaxStackSize, getSweepHitBox, getXpRepairRatio, hasCraftingRemainingItem, hasCustomEntity, isBookEnchantable, isDamageable, isDamaged, isEnderMask, isNotReplaceableByPickAction, isPiglinCurrency, isPrimaryItemFor, makesPiglinsNeutral, onAnimalArmorTick, onDestroyed, onEntityItemUpdate, onEntitySwing, 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
-