Package net.frozenblock.lib.item.api
Class DamageOnUseBlockItem
java.lang.Object
net.minecraft.world.item.Item
net.minecraft.world.item.BlockItem
net.frozenblock.lib.item.api.DamageOnUseBlockItem
- All Implemented Interfaces:
net.fabricmc.fabric.api.item.v1.FabricItem,net.minecraft.world.flag.FeatureElement,net.minecraft.world.level.ItemLike
public class DamageOnUseBlockItem
extends net.minecraft.world.item.BlockItem
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.item.Item
net.minecraft.world.item.Item.Properties, net.minecraft.world.item.Item.TooltipContextNested classes/interfaces inherited from interface net.fabricmc.fabric.api.item.v1.FabricItem
net.fabricmc.fabric.api.item.v1.FabricItem.Settings -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal floatfinal net.minecraft.resources.ResourceKey<net.minecraft.world.damagesource.DamageType> final net.minecraft.sounds.SoundEventFields inherited from class net.minecraft.world.item.Item
ABSOLUTE_MAX_STACK_SIZE, BASE_ATTACK_DAMAGE_ID, BASE_ATTACK_SPEED_ID, BY_BLOCK, CODEC, DEFAULT_MAX_STACK_SIZE, descriptionId, MAX_BAR_WIDTHFields inherited from interface net.minecraft.world.flag.FeatureElement
FILTERED_REGISTRIES -
Constructor Summary
ConstructorsConstructorDescriptionDamageOnUseBlockItem(net.minecraft.world.level.block.Block block, net.minecraft.world.item.Item.Properties properties, float damage, @Nullable net.minecraft.sounds.SoundEvent sound, net.minecraft.resources.ResourceKey<net.minecraft.world.damagesource.DamageType> damageType) -
Method Summary
Modifier and TypeMethodDescription@NotNull net.minecraft.world.item.ItemStackfinishUsingItem(@NotNull net.minecraft.world.item.ItemStack itemStack, net.minecraft.world.level.Level level, net.minecraft.world.entity.LivingEntity livingEntity) Methods inherited from class net.minecraft.world.item.BlockItem
appendHoverText, canFitInsideContainerItems, canPlace, getBlock, getPlacementState, getPlaceSound, mustSurvive, onDestroyed, place, placeBlock, registerBlocks, requiredFeatures, setBlockEntityData, updateCustomBlockEntityTag, updateCustomBlockEntityTag, updatePlacementContext, useOnMethods inherited from class net.minecraft.world.item.Item
asItem, builtInRegistryHolder, byBlock, byId, canAttackBlock, components, getAttackDamageBonus, getBarColor, getBarWidth, getBreakingSound, getCraftingRemainder, getDamageSource, getDefaultInstance, getDefaultMaxStackSize, getDescriptionId, getDestroySpeed, getId, getName, getName, getPlayerPOVHitResult, getTooltipImage, getUseAnimation, getUseDuration, hurtEnemy, interactLivingEntity, inventoryTick, isBarVisible, isCorrectToolForDrops, isFoil, mineBlock, onCraftedBy, onCraftedPostProcess, onUseTick, overrideOtherStackedOnMe, overrideStackedOnOther, postHurtEnemy, releaseUsing, toString, use, useOnRelease, verifyComponentsAfterLoadMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.fabricmc.fabric.api.item.v1.FabricItem
allowComponentsUpdateAnimation, allowContinuingBlockBreaking, canBeEnchantedWith, getRecipeRemainderMethods inherited from interface net.minecraft.world.flag.FeatureElement
isEnabled
-
Field Details
-
damage
public final float damage -
hurtSound
public final net.minecraft.sounds.SoundEvent hurtSound -
damageType
public final net.minecraft.resources.ResourceKey<net.minecraft.world.damagesource.DamageType> damageType
-
-
Constructor Details
-
DamageOnUseBlockItem
public DamageOnUseBlockItem(net.minecraft.world.level.block.Block block, net.minecraft.world.item.Item.Properties properties, float damage, @Nullable @Nullable net.minecraft.sounds.SoundEvent sound, net.minecraft.resources.ResourceKey<net.minecraft.world.damagesource.DamageType> damageType)
-
-
Method Details
-
finishUsingItem
@NotNull public @NotNull net.minecraft.world.item.ItemStack finishUsingItem(@NotNull @NotNull net.minecraft.world.item.ItemStack itemStack, net.minecraft.world.level.Level level, net.minecraft.world.entity.LivingEntity livingEntity) - Overrides:
finishUsingItemin classnet.minecraft.world.item.Item
-