Class BulletItem<T extends BulletEntity>
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.neoforged.neoforge.common.extensions.IItemExtension
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class net.minecraft.world.item.Item
net.minecraft.world.item.Item.Properties -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal booleanfinal doublefinal doublefinal HitEffectUtils.HitEffectfinal booleanfinal intfinal floatfinal intFields 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
ConstructorsConstructorDescriptionBulletItem(net.minecraft.world.item.Item.Properties properties, double damage, Supplier<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 TypeMethodDescriptioncreateBullet(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) booleanisInfinite(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
createArrowMethods 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, onCraftedPostProcess, onDestroyed, onUseTick, overrideOtherStackedOnMe, overrideStackedOnOther, releaseUsing, requiredFeatures, shouldOverrideMultiplayerNbt, toString, use, 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.neoforged.neoforge.common.extensions.IItemExtension
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, getSweepHitBox, getXpRepairRatio, hasCraftingRemainingItem, hasCustomEntity, isBookEnchantable, isCorrectToolForDrops, isDamageable, isDamaged, isEnderMask, isNotReplaceableByPickAction, isPiglinCurrency, makesPiglinsNeutral, onArmorTick, onBlockStartBreak, onDestroyed, onDroppedByPlayer, onEntityItemUpdate, onEntitySwing, onHorseArmorTick, onItemUseFirst, onLeftClickEntity, onStopUsing, setDamage, shouldCauseBlockBreakReset, shouldCauseReequipAnimation
-
Field Details
-
entitySupplier
-
pierceLevel
public final int pierceLevel -
canBeInfinite
public final boolean canBeInfinite -
misfireChance
public final float misfireChance -
gravityModifier
public final double gravityModifier -
shootingVectorInputs
-
knockbackStrength
public final int knockbackStrength -
damage
public final double damage -
hitEffect
-
isExplosive
public final boolean isExplosive
-
-
Constructor Details
-
BulletItem
public BulletItem(net.minecraft.world.item.Item.Properties properties, double damage, Supplier<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:
isInfinitein classnet.minecraft.world.item.ArrowItem- Parameters:
bullet- the bullet being checkedgun- the gun firing the bulletplayer- the player firing the gun- Returns:
- boolean
-