Class HandCannonItem
java.lang.Object
net.minecraft.world.item.Item
tech.anonymoushacker1279.immersiveweapons.item.projectile.gun.AbstractGunItem
tech.anonymoushacker1279.immersiveweapons.item.projectile.gun.SimplePistolItem
tech.anonymoushacker1279.immersiveweapons.item.projectile.gun.HandCannonItem
- All Implemented Interfaces:
net.minecraft.world.flag.FeatureElement,net.minecraft.world.item.Vanishable,net.minecraft.world.level.ItemLike,net.minecraftforge.common.extensions.IForgeItem
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.item.Item
net.minecraft.world.item.Item.Properties -
Field Summary
Fields inherited from class tech.anonymoushacker1279.immersiveweapons.item.projectile.gun.AbstractGunItem
CANNONBALLS, FLARES, MUSKET_BALLSFields 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_SIZEFields 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.Predicate<net.minecraft.world.item.ItemStack>Get the predicate to match ammunition when searching the player's inventory, not their main/offhandintfloatfloatprotected voidsetupFire(net.minecraft.world.item.ItemStack gun, BulletEntity bulletEntity, net.minecraft.world.entity.player.Player player) Methods inherited from class tech.anonymoushacker1279.immersiveweapons.item.projectile.gun.AbstractGunItem
canScope, findAmmo, getBulletsToFire, getEnchantmentValue, getFireVelocity, getHeldAmmo, getMaxBulletsToFire, getRepairMaterial, getUseAnimation, getUseDuration, handleAmmoStack, initializeClient, inventoryTick, isValidRepairItem, onDroppedByPlayer, onUseTick, releaseUsing, useMethods 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, hasCraftingRemainingItem, hurtEnemy, interactLivingEntity, isBarVisible, isComplex, isCorrectToolForDrops, isEdible, isEnchantable, isFireResistant, isFoil, isRepairable, mineBlock, onCraftedBy, onDestroyed, overrideOtherStackedOnMe, overrideStackedOnOther, requiredFeatures, shouldOverrideMultiplayerNbt, toString, useOn, useOnRelease, verifyTagAfterLoadMethods 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.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, getEntityLifespan, getEquipmentSlot, getFoodProperties, getHighlightTip, getMaxDamage, getMaxStackSize, getShareTag, getSweepHitBox, getXpRepairRatio, hasCraftingRemainingItem, hasCustomEntity, initCapabilities, isBookEnchantable, isCorrectToolForDrops, isDamageable, isDamaged, isEnderMask, isNotReplaceableByPickAction, isPiglinCurrency, makesPiglinsNeutral, onArmorTick, onBlockStartBreak, onDestroyed, onEntityItemUpdate, onEntitySwing, onHorseArmorTick, onItemUseFirst, onLeftClickEntity, onStopUsing, readShareTag, setDamage, shouldCauseBlockBreakReset, shouldCauseReequipAnimation
-
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
-
setupFire
protected void setupFire(net.minecraft.world.item.ItemStack gun, BulletEntity bulletEntity, net.minecraft.world.entity.player.Player player) - Overrides:
setupFirein classAbstractGunItem
-
getMaxYRecoil
public float getMaxYRecoil()- Overrides:
getMaxYRecoilin classAbstractGunItem
-
getMaxXRecoil
public float getMaxXRecoil()- Overrides:
getMaxXRecoilin classAbstractGunItem
-
getCooldown
public int getCooldown()- Overrides:
getCooldownin classAbstractGunItem
-