Class CloudyItem
java.lang.Object
net.minecraft.item.Item
dev.jaxydog.astral.content.item.AstralItem
dev.jaxydog.astral.content.item.custom.CloudyItem
- All Implemented Interfaces:
Colored,Custom,Cloudy,LoreHolder,Registered,Registered.Client,Registered.Common,net.fabricmc.fabric.api.item.v1.FabricItem,net.minecraft.item.ItemConvertible,net.minecraft.resource.featuretoggle.ToggleableFeature
An item that implements the
Cloudy interface.
This type is automatically registered.
- Since:
- 1.4.0
-
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
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 dev.jaxydog.astral.content.item.custom.Cloudy
COLOR_MAX, COLOR_MIN, STORMINESS_KEY, STORMINESS_LABEL_KEYFields inherited from interface net.minecraft.resource.featuretoggle.ToggleableFeature
FEATURE_ENABLED_REGISTRY_KEYS -
Constructor Summary
ConstructorsConstructorDescriptionCloudyItem(String path, net.minecraft.item.Item.Settings settings) Creates a new item using the given settings.CloudyItem(String path, net.minecraft.item.Item.Settings settings, @Nullable Supplier<net.minecraft.registry.RegistryKey<net.minecraft.item.ItemGroup>> preferredGroup) Creates a new item using the given settings. -
Method Summary
Modifier and TypeMethodDescriptionvoidappendTooltip(net.minecraft.item.ItemStack stack, net.minecraft.world.World world, List<net.minecraft.text.Text> tooltip, net.minecraft.client.item.TooltipContext context) doublegetDecreaseDelta(net.minecraft.item.ItemStack stack) Returns the given item stack's storminess decrease delta.doublegetIncreaseDelta(net.minecraft.item.ItemStack stack) Returns the given item stack's storminess increase delta.intgetStackColor(net.minecraft.item.ItemStack stack, int index) Returns the color for the given stack at the provided layer index.voidinventoryTick(net.minecraft.item.ItemStack stack, net.minecraft.world.World world, net.minecraft.entity.Entity entity, int slot, boolean selected) Methods inherited from class dev.jaxydog.astral.content.item.AstralItem
getItemGroup, getRegistryPathMethods inherited from class net.minecraft.item.Item
asItem, byRawId, canBeNested, canMine, canRepair, damage, finishUsing, fromBlock, getAttributeModifiers, getDefaultStack, getDrinkSound, getEatSound, getEnchantability, getFoodComponent, getItemBarColor, getItemBarStep, getMaxCount, getMaxDamage, getMaxUseTime, getMiningSpeedMultiplier, getName, getName, getOrCreateTranslationKey, getRarity, getRawId, getRecipeRemainder, getRegistryEntry, getRequiredFeatures, getTooltipData, getTranslationKey, getTranslationKey, getUseAction, hasGlint, hasRecipeRemainder, isDamageable, isEnchantable, isFireproof, isFood, isItemBarVisible, isNbtSynced, isNetworkSynced, isSuitableFor, isUsedOnRelease, onClicked, onCraft, onItemEntityDestroyed, onStackClicked, onStoppedUsing, postHit, postMine, postProcessNbt, raycast, toString, usageTick, use, 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.Cloudy
clampStorminess, decreaseStorminess, getMaxStorminess, getMinStorminess, getStorminess, getStorminessColor, getStorminessText, increaseStorminess, setStorminess, updateStorminess, updateStorminessMethods inherited from interface dev.jaxydog.astral.content.item.Colored
registerClientMethods 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
getRegistryId, getRegistryPathMethods inherited from interface net.minecraft.resource.featuretoggle.ToggleableFeature
isEnabled
-
Constructor Details
-
CloudyItem
public CloudyItem(String path, net.minecraft.item.Item.Settings settings, @Nullable @Nullable Supplier<net.minecraft.registry.RegistryKey<net.minecraft.item.ItemGroup>> preferredGroup) Creates a new 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
-
CloudyItem
Creates a new 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:
- 1.4.0
-
-
Method Details
-
appendTooltip
public void appendTooltip(net.minecraft.item.ItemStack stack, net.minecraft.world.World world, List<net.minecraft.text.Text> tooltip, net.minecraft.client.item.TooltipContext context) - Overrides:
appendTooltipin classAstralItem
-
getDecreaseDelta
public double getDecreaseDelta(net.minecraft.item.ItemStack stack) Description copied from interface:CloudyReturns the given item stack's storminess decrease delta.This controls the rate at which a given item's storminess value is decreased.
- Specified by:
getDecreaseDeltain interfaceCloudy- Parameters:
stack- The item stack.- Returns:
- The decrease delta.
-
getIncreaseDelta
public double getIncreaseDelta(net.minecraft.item.ItemStack stack) Description copied from interface:CloudyReturns the given item stack's storminess increase delta.This controls the rate at which a given item's storminess value is increased.
- Specified by:
getIncreaseDeltain interfaceCloudy- Parameters:
stack- The item stack.- Returns:
- The increase delta.
-
getStackColor
public int getStackColor(net.minecraft.item.ItemStack stack, int index) Description copied from interface:ColoredReturns the color for the given stack at the provided layer index.- Specified by:
getStackColorin interfaceColored- Parameters:
stack- The item stack.index- The index of the color layer.- Returns:
- The layer's color.
-
inventoryTick
public void inventoryTick(net.minecraft.item.ItemStack stack, net.minecraft.world.World world, net.minecraft.entity.Entity entity, int slot, boolean selected) - Overrides:
inventoryTickin classnet.minecraft.item.Item
-