Class ManasteelAxeItem
java.lang.Object
net.minecraft.world.item.Item
net.minecraft.world.item.TieredItem
net.minecraft.world.item.DiggerItem
net.minecraft.world.item.AxeItem
vazkii.botania.common.item.equipment.tool.manasteel.ManasteelAxeItem
- All Implemented Interfaces:
net.minecraft.world.flag.FeatureElement,net.minecraft.world.level.ItemLike,SortableTool,CustomDamageItem
- Direct Known Subclasses:
ElementiumAxeItem,TerraTruncatorItem
public class ManasteelAxeItem
extends net.minecraft.world.item.AxeItem
implements CustomDamageItem, SortableTool
-
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.TooltipContext -
Field Summary
Fields inherited from class net.minecraft.world.item.AxeItem
STRIPPABLESFields inherited from class net.minecraft.world.item.Item
ABSOLUTE_MAX_STACK_SIZE, BASE_ATTACK_DAMAGE_ID, BASE_ATTACK_SPEED_ID, BY_BLOCK, DEFAULT_MAX_STACK_SIZE, MAX_BAR_WIDTHFields inherited from interface net.minecraft.world.flag.FeatureElement
FILTERED_REGISTRIES -
Constructor Summary
ConstructorsConstructorDescriptionManasteelAxeItem(net.minecraft.world.item.Item.Properties props) ManasteelAxeItem(net.minecraft.world.item.Tier mat, net.minecraft.world.item.Item.Properties props) -
Method Summary
Modifier and TypeMethodDescription<T extends net.minecraft.world.entity.LivingEntity>
intdamageItem(net.minecraft.world.item.ItemStack stack, int amount, T entity, Consumer<net.minecraft.world.item.Item> breakCallback) intintgetSortingPriority(net.minecraft.world.item.ItemStack stack, net.minecraft.world.level.block.state.BlockState state) Gets the priority that this tool should have when being sorted.voidinventoryTick(net.minecraft.world.item.ItemStack stack, net.minecraft.world.level.Level world, net.minecraft.world.entity.Entity entity, int slot, boolean selected) @NotNull net.minecraft.world.InteractionResultuseOn(net.minecraft.world.item.context.UseOnContext ctx) Methods inherited from class net.minecraft.world.item.DiggerItem
createAttributes, hurtEnemy, postHurtEnemyMethods inherited from class net.minecraft.world.item.TieredItem
getEnchantmentValue, getTier, isValidRepairItemMethods 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, getId, getName, getOrCreateDescriptionId, getPlayerPOVHitResult, getTooltipImage, getUseAnimation, getUseDuration, hasCraftingRemainingItem, interactLivingEntity, isBarVisible, isComplex, isCorrectToolForDrops, isEnchantable, isFoil, mineBlock, onCraftedBy, onCraftedPostProcess, onDestroyed, onUseTick, overrideOtherStackedOnMe, overrideStackedOnOther, releaseUsing, requiredFeatures, toString, use, 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
isEnabled
-
Constructor Details
-
ManasteelAxeItem
public ManasteelAxeItem(net.minecraft.world.item.Item.Properties props) -
ManasteelAxeItem
public ManasteelAxeItem(net.minecraft.world.item.Tier mat, net.minecraft.world.item.Item.Properties props)
-
-
Method Details
-
damageItem
public <T extends net.minecraft.world.entity.LivingEntity> int damageItem(net.minecraft.world.item.ItemStack stack, int amount, @Nullable T entity, Consumer<net.minecraft.world.item.Item> breakCallback) - Specified by:
damageItemin interfaceCustomDamageItem
-
getManaPerDamage
public int getManaPerDamage() -
useOn
@NotNull public @NotNull net.minecraft.world.InteractionResult useOn(net.minecraft.world.item.context.UseOnContext ctx) - Overrides:
useOnin classnet.minecraft.world.item.AxeItem
-
inventoryTick
public void inventoryTick(net.minecraft.world.item.ItemStack stack, net.minecraft.world.level.Level world, net.minecraft.world.entity.Entity entity, int slot, boolean selected) - Overrides:
inventoryTickin classnet.minecraft.world.item.Item
-
getSortingPriority
public int getSortingPriority(net.minecraft.world.item.ItemStack stack, net.minecraft.world.level.block.state.BlockState state) Description copied from interface:SortableToolGets the priority that this tool should have when being sorted. The tool with the highest priority will be picked. The way this is specified should be (tool-level) * 100 + (tool-modifier) * 10 + (efficiency-level).
For example, a Manasteel Pickaxe is tool-level 10 and it doesn't have modifiers. Assuming Efficiency 4, the priority should be 10 * 100 + 4 = 1004. This will rate higher than a similar pickaxe with Efficiency 3.
A Terra Shatterer has a modifier, its rank and is tool-level 20. With Efficiency 5 and rank B (2) the priority should be 20 * 100 + 2 * 10 + 5 = 2025.
All intermediate tool levels are there for other mod tools that wish to occupy the spots inbetween. Of course, you don't have to always adhere to this. Tools like the Vitreous Pickaxe don't, that one in particular is priority 0, unless looking at glass, in which case it'sInteger.MAX_VALUE.- Specified by:
getSortingPriorityin interfaceSortableTool- Parameters:
state- The blockstate being broken.
-