Class ElementiumShearsItem
java.lang.Object
net.minecraft.world.item.Item
net.minecraft.world.item.ShearsItem
vazkii.botania.common.item.equipment.tool.manasteel.ManasteelShearsItem
vazkii.botania.common.item.equipment.tool.elementium.ElementiumShearsItem
- All Implemented Interfaces:
net.minecraft.world.flag.FeatureElement,net.minecraft.world.level.ItemLike,SortableTool,CustomDamageItem
-
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 vazkii.botania.common.item.equipment.tool.manasteel.ManasteelShearsItem
MANA_PER_DAMAGEFields 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintgetSortingPriority(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.@NotNull net.minecraft.world.item.UseAnimgetUseAnimation(net.minecraft.world.item.ItemStack stack) intgetUseDuration(net.minecraft.world.item.ItemStack stack, net.minecraft.world.entity.LivingEntity entity) booleanisValidRepairItem(net.minecraft.world.item.ItemStack toRepair, @NotNull net.minecraft.world.item.ItemStack repairBy) voidonUseTick(net.minecraft.world.level.Level world, @NotNull net.minecraft.world.entity.LivingEntity living, @NotNull net.minecraft.world.item.ItemStack stack, int count) @NotNull net.minecraft.world.InteractionResultHolder<net.minecraft.world.item.ItemStack> use(net.minecraft.world.level.Level world, net.minecraft.world.entity.player.Player player, @NotNull net.minecraft.world.InteractionHand hand) Methods inherited from class vazkii.botania.common.item.equipment.tool.manasteel.ManasteelShearsItem
damageItem, inventoryTickMethods inherited from class net.minecraft.world.item.ShearsItem
createToolProperties, mineBlock, useOnMethods 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, getEnchantmentValue, getId, getName, getOrCreateDescriptionId, getPlayerPOVHitResult, getTooltipImage, hasCraftingRemainingItem, hurtEnemy, interactLivingEntity, isBarVisible, isComplex, isCorrectToolForDrops, isEnchantable, isFoil, onCraftedBy, onCraftedPostProcess, onDestroyed, overrideOtherStackedOnMe, overrideStackedOnOther, postHurtEnemy, releaseUsing, requiredFeatures, toString, 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
-
ElementiumShearsItem
public ElementiumShearsItem(net.minecraft.world.item.Item.Properties props)
-
-
Method Details
-
getUseAnimation
@NotNull public @NotNull net.minecraft.world.item.UseAnim getUseAnimation(net.minecraft.world.item.ItemStack stack) - Overrides:
getUseAnimationin classnet.minecraft.world.item.Item
-
getUseDuration
public int getUseDuration(net.minecraft.world.item.ItemStack stack, net.minecraft.world.entity.LivingEntity entity) - Overrides:
getUseDurationin classnet.minecraft.world.item.Item
-
use
@NotNull public @NotNull net.minecraft.world.InteractionResultHolder<net.minecraft.world.item.ItemStack> use(net.minecraft.world.level.Level world, net.minecraft.world.entity.player.Player player, @NotNull @NotNull net.minecraft.world.InteractionHand hand) - Overrides:
usein classnet.minecraft.world.item.Item
-
onUseTick
public void onUseTick(net.minecraft.world.level.Level world, @NotNull @NotNull net.minecraft.world.entity.LivingEntity living, @NotNull @NotNull net.minecraft.world.item.ItemStack stack, int count) - Overrides:
onUseTickin classnet.minecraft.world.item.Item
-
isValidRepairItem
public boolean isValidRepairItem(net.minecraft.world.item.ItemStack toRepair, @NotNull @NotNull net.minecraft.world.item.ItemStack repairBy) - Overrides:
isValidRepairItemin classManasteelShearsItem
-
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- Overrides:
getSortingPriorityin classManasteelShearsItem- Parameters:
state- The blockstate being broken.
-