Package dev.jaxydog.astral.content.item
Class BowlItem
java.lang.Object
net.minecraft.item.Item
dev.jaxydog.astral.content.item.AstralItem
dev.jaxydog.astral.content.item.BowlItem
- All Implemented Interfaces:
Custom,LoreHolder,Registered,Registered.Common,net.fabricmc.fabric.api.item.v1.FabricItem,net.minecraft.item.ItemConvertible,net.minecraft.resource.featuretoggle.ToggleableFeature
An extension of an
AstralItem that returns an empty bowl to the entity when consumed.
This is one of the various instances of already-provided wrapper classes for commonly used types.
In future code, you should prefer to extend this class over AstralItem if at all possible.
This type is automatically registered.
- Since:
- 2.0.0
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.item.Item
net.minecraft.item.Item.SettingsNested classes/interfaces inherited from interface dev.jaxydog.astral.register.Registered
Registered.All, Registered.Client, Registered.Common, Registered.Generated, Registered.Server -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final booleanWhether this item prefers drinking sounds over eating sounds.Fields inherited from class net.minecraft.item.Item
ATTACK_DAMAGE_MODIFIER_ID, ATTACK_SPEED_MODIFIER_ID, BLOCK_ITEMS, DEFAULT_MAX_COUNT, DEFAULT_MAX_USE_TIME, ITEM_BAR_STEPSFields inherited from interface net.minecraft.resource.featuretoggle.ToggleableFeature
FEATURE_ENABLED_REGISTRY_KEYS -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new soup item using the given settings.BowlItem(String path, net.minecraft.item.Item.Settings settings, boolean usesDrinkSounds, @Nullable Supplier<net.minecraft.registry.RegistryKey<net.minecraft.item.ItemGroup>> preferredGroup) Creates a new soup item using the given settings. -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.item.ItemStackfinishUsing(net.minecraft.item.ItemStack stack, net.minecraft.world.World world, net.minecraft.entity.LivingEntity user) net.minecraft.util.UseActiongetUseAction(net.minecraft.item.ItemStack stack) net.minecraft.util.TypedActionResult<net.minecraft.item.ItemStack> use(net.minecraft.world.World world, net.minecraft.entity.player.PlayerEntity user, net.minecraft.util.Hand hand) Methods inherited from class dev.jaxydog.astral.content.item.AstralItem
appendTooltip, getItemGroup, getRegistryPathMethods inherited from class net.minecraft.item.Item
asItem, byRawId, canBeNested, canMine, canRepair, damage, fromBlock, getAttributeModifiers, getDefaultStack, getDrinkSound, getEatSound, getEnchantability, getFoodComponent, getItemBarColor, getItemBarStep, getMaxCount, getMaxDamage, getMaxUseTime, getMiningSpeedMultiplier, getName, getName, getOrCreateTranslationKey, getRarity, getRawId, getRecipeRemainder, getRegistryEntry, getRequiredFeatures, getTooltipData, getTranslationKey, getTranslationKey, hasGlint, hasRecipeRemainder, inventoryTick, isDamageable, isEnchantable, isFireproof, isFood, isItemBarVisible, isNbtSynced, isNetworkSynced, isSuitableFor, isUsedOnRelease, onClicked, onCraft, onItemEntityDestroyed, onStackClicked, onStoppedUsing, postHit, postMine, postProcessNbt, raycast, toString, usageTick, useOnBlock, useOnEntityMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface dev.jaxydog.astral.content.item.Custom
registerCommonMethods inherited from interface net.fabricmc.fabric.api.item.v1.FabricItem
allowContinuingBlockBreaking, allowNbtUpdateAnimation, getAttributeModifiers, getRecipeRemainder, isSuitableForMethods inherited from interface net.minecraft.item.ItemConvertible
asItemMethods inherited from interface dev.jaxydog.astral.content.item.LoreHolder
formatLoreText, getLoreTooltipsMethods inherited from interface dev.jaxydog.astral.register.Registered
getRegistryIdMethods inherited from interface net.minecraft.resource.featuretoggle.ToggleableFeature
isEnabled
-
Field Details
-
usesDrinkSounds
protected final boolean usesDrinkSoundsWhether this item prefers drinking sounds over eating sounds.- Since:
- 2.0.0
-
-
Constructor Details
-
BowlItem
public BowlItem(String path, net.minecraft.item.Item.Settings settings, boolean usesDrinkSounds, @Nullable @Nullable Supplier<net.minecraft.registry.RegistryKey<net.minecraft.item.ItemGroup>> preferredGroup) Creates a new soup item using the given settings.If the
preferredGroupsupplier isnull, this item will not be added to any item groups.- Parameters:
path- The item's identifier path.settings- The item's settings.preferredGroup- The item's preferred item group.- Since:
- 2.0.0
-
BowlItem
Creates a new soup item using the given settings.This item will be added to the default item group.
- Parameters:
path- The item's identifier path.settings- The item's settings.- Since:
- 2.0.0
-
-
Method Details
-
getUseAction
public net.minecraft.util.UseAction getUseAction(net.minecraft.item.ItemStack stack) - Overrides:
getUseActionin classnet.minecraft.item.Item
-
use
public net.minecraft.util.TypedActionResult<net.minecraft.item.ItemStack> use(net.minecraft.world.World world, net.minecraft.entity.player.PlayerEntity user, net.minecraft.util.Hand hand) - Overrides:
usein classnet.minecraft.item.Item
-
finishUsing
public net.minecraft.item.ItemStack finishUsing(net.minecraft.item.ItemStack stack, net.minecraft.world.World world, net.minecraft.entity.LivingEntity user) - Overrides:
finishUsingin classnet.minecraft.item.Item
-