Class SimpleShotgunItem
java.lang.Object
net.minecraft.world.item.Item
tech.anonymoushacker1279.immersiveweapons.item.gun.AbstractGunItem
tech.anonymoushacker1279.immersiveweapons.item.gun.SimpleShotgunItem
- 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, DRAGON_FIREBALLS, FLAMMABLE_POWDERS, FLARES, MUSKET_BALLS, POWDER_TYPEFields 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
ConstructorsConstructorDescriptionSimpleShotgunItem(net.minecraft.world.item.Item.Properties properties) Constructor for SimpleShotgunItem. -
Method Summary
Modifier and TypeMethodDescriptionfloatintnet.minecraft.sounds.SoundEventGet the fire sound.floatintintGet the maximum number of bullets that can be fired at once.floatfloatprotected net.minecraft.world.item.crafting.IngredientGet the repair material.voidprepareBulletForFire(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, defaultAmmo, defaultPowder, findAmmo, findPowder, getBulletsToFire, getEnchantmentValue, getFireVelocity, getHeldPredicate, getInventoryAmmoPredicate, getUseAnimation, getUseDuration, handleAmmoStack, handleMuzzleFlash, handlePowderStack, inventoryTick, 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
-
SimpleShotgunItem
public SimpleShotgunItem(net.minecraft.world.item.Item.Properties properties) Constructor for SimpleShotgunItem.- Parameters:
properties- thePropertiesfor the item
-
-
Method Details
-
prepareBulletForFire
public void prepareBulletForFire(net.minecraft.world.item.ItemStack gun, BulletEntity bulletEntity, net.minecraft.world.entity.LivingEntity shooter, float powderModifier) - Overrides:
prepareBulletForFirein classAbstractGunItem
-
getFireSound
public net.minecraft.sounds.SoundEvent getFireSound()Get the fire sound.- Overrides:
getFireSoundin classAbstractGunItem- Returns:
- SoundEvent
-
getRepairMaterial
protected net.minecraft.world.item.crafting.Ingredient getRepairMaterial()Get the repair material.- Overrides:
getRepairMaterialin classAbstractGunItem- Returns:
- Ingredient
-
getCooldown
public int getCooldown()- Overrides:
getCooldownin classAbstractGunItem
-
getMaxYRecoil
public float getMaxYRecoil()- Overrides:
getMaxYRecoilin classAbstractGunItem
-
getMaxXRecoil
public float getMaxXRecoil()- Overrides:
getMaxXRecoilin classAbstractGunItem
-
getMaxBulletsToFire
public int getMaxBulletsToFire()Description copied from class:AbstractGunItemGet the maximum number of bullets that can be fired at once.- Overrides:
getMaxBulletsToFirein classAbstractGunItem- Returns:
- int
-
getBaseFireVelocity
public float getBaseFireVelocity()- Overrides:
getBaseFireVelocityin classAbstractGunItem
-
getInaccuracy
public float getInaccuracy()- Overrides:
getInaccuracyin classAbstractGunItem
-
getKnockbackLevel
public int getKnockbackLevel()- Overrides:
getKnockbackLevelin classAbstractGunItem
-