MixinToolItem

public abstract class MixinToolItem extends Item implements DynamicAttributeTool

Constructors

MixinToolItem
Link copied to clipboard
void MixinToolItem(Item.Settings settings)

Functions

appendStacks
Link copied to clipboard
void appendStacks(ItemGroup group, DefaultedList<ItemStack> stacks)
appendTooltip
Link copied to clipboard
void appendTooltip(ItemStack stack, World world, List<Text> tooltip, TooltipContext context)
asItem
Link copied to clipboard
Item asItem()
byRawId
Link copied to clipboard
static Item byRawId(int id)
canBeNested
Link copied to clipboard
boolean canBeNested()
canMine
Link copied to clipboard
boolean canMine(BlockState state, World world, BlockPos pos, PlayerEntity miner)
canRepair
Link copied to clipboard
boolean canRepair(ItemStack stack, ItemStack ingredient)
damage
Link copied to clipboard
boolean damage(DamageSource source)
finishUsing
Link copied to clipboard
ItemStack finishUsing(ItemStack stack, World world, LivingEntity user)
fromBlock
Link copied to clipboard
static Item fromBlock(Block block)
getAttributeModifiers
Link copied to clipboard
Multimap<EntityAttribute, EntityAttributeModifiergetAttributeModifiers(EquipmentSlot slot)
getDefaultStack
Link copied to clipboard
ItemStack getDefaultStack()
getDrinkSound
Link copied to clipboard
SoundEvent getDrinkSound()
getDynamicModifiers
Link copied to clipboard
Multimap<EntityAttribute, EntityAttributeModifiergetDynamicModifiers(EquipmentSlot slot, ItemStack stack, @Nullable() LivingEntity user)
Add modifiers for any net.minecraft.entity.attribute.EntityAttributes your item should give when equipped, based on the stack.
getEatSound
Link copied to clipboard
SoundEvent getEatSound()
getEnchantability
Link copied to clipboard
int getEnchantability()
getEquipSound
Link copied to clipboard
SoundEvent getEquipSound()
getFoodComponent
Link copied to clipboard
FoodComponent getFoodComponent()
getGroup
Link copied to clipboard
final ItemGroup getGroup()
getItemBarColor
Link copied to clipboard
int getItemBarColor(ItemStack stack)
getItemBarStep
Link copied to clipboard
int getItemBarStep(ItemStack stack)
getMaterial
Link copied to clipboard
abstract ToolMaterial getMaterial()
getMaxCount
Link copied to clipboard
final int getMaxCount()
getMaxDamage
Link copied to clipboard
final int getMaxDamage()
getMaxUseTime
Link copied to clipboard
int getMaxUseTime(ItemStack stack)
getMiningLevel
Link copied to clipboard
int getMiningLevel(ItemStack stack, @Nullable() LivingEntity user)
Determines the mining level of the passed stack, which is used for calculating what blocks this tool is allowed to break.
int getMiningLevel(ItemStack stack, LivingEntity user)
Determines the mining level of the passed stack, which is used for calculating what blocks this tool is allowed to break.
int getMiningLevel(Tag<Item> tag, BlockState state, ItemStack stack, @Nullable() LivingEntity user)
Determines the mining level of the passed stack, which is used for calculating what blocks this tool is allowed to break.
getMiningSpeedMultiplier
Link copied to clipboard
float getMiningSpeedMultiplier(ItemStack stack, @Nullable() LivingEntity user)
Determines the mining speed multiplier of the passed stack, which is one factor in overall mining speed.
float getMiningSpeedMultiplier(ItemStack stack, LivingEntity user)
Determines the mining speed multiplier of the passed stack, which is one factor in overall mining speed.
float getMiningSpeedMultiplier(ItemStack stack, BlockState state)
float getMiningSpeedMultiplier(Tag<Item> tag, BlockState state, ItemStack stack, @Nullable() LivingEntity user)
Determines the mining speed multiplier of the passed stack, which is one factor in overall mining speed.
getName
Link copied to clipboard
Text getName()
getRarity
Link copied to clipboard
Rarity getRarity(ItemStack stack)
getRawId
Link copied to clipboard
static int getRawId(Item item)
getRecipeRemainder
Link copied to clipboard
final Item getRecipeRemainder()
getTooltipData
Link copied to clipboard
Optional<TooltipDatagetTooltipData(ItemStack stack)
getTranslationKey
Link copied to clipboard
String getTranslationKey()
getUseAction
Link copied to clipboard
UseAction getUseAction(ItemStack stack)
hasGlint
Link copied to clipboard
boolean hasGlint(ItemStack stack)
hasRecipeRemainder
Link copied to clipboard
boolean hasRecipeRemainder()
inventoryTick
Link copied to clipboard
void inventoryTick(ItemStack stack, World world, Entity entity, int slot, boolean selected)
isDamageable
Link copied to clipboard
boolean isDamageable()
isEnchantable
Link copied to clipboard
boolean isEnchantable(ItemStack stack)
isFireproof
Link copied to clipboard
boolean isFireproof()
isFood
Link copied to clipboard
boolean isFood()
isItemBarVisible
Link copied to clipboard
boolean isItemBarVisible(ItemStack stack)
isNetworkSynced
Link copied to clipboard
boolean isNetworkSynced()
isSuitableFor
Link copied to clipboard
boolean isSuitableFor(BlockState state)
isUsedOnRelease
Link copied to clipboard
boolean isUsedOnRelease(ItemStack stack)
onClicked
Link copied to clipboard
boolean onClicked(ItemStack stack, ItemStack otherStack, Slot slot, ClickType clickType, PlayerEntity player, StackReference cursorStackReference)
onCraft
Link copied to clipboard
void onCraft(ItemStack stack, World world, PlayerEntity player)
onItemEntityDestroyed
Link copied to clipboard
void onItemEntityDestroyed(ItemEntity entity)
onStackClicked
Link copied to clipboard
boolean onStackClicked(ItemStack stack, Slot slot, ClickType clickType, PlayerEntity player)
onStoppedUsing
Link copied to clipboard
void onStoppedUsing(ItemStack stack, World world, LivingEntity user, int remainingUseTicks)
postHit
Link copied to clipboard
boolean postHit(ItemStack stack, LivingEntity target, LivingEntity attacker)
postMine
Link copied to clipboard
boolean postMine(ItemStack stack, World world, BlockState state, BlockPos pos, LivingEntity miner)
postProcessMiningSpeed
Link copied to clipboard
float postProcessMiningSpeed(Tag<Item> tag, BlockState state, ItemStack stack, @Nullable() LivingEntity user, float currentSpeed, boolean isEffective)
Post process the mining speed, this takes place after the mining speed has been calculated.
postProcessNbt
Link copied to clipboard
void postProcessNbt(NbtCompound nbt)
shouldSyncTagToClient
Link copied to clipboard
boolean shouldSyncTagToClient()
toString
Link copied to clipboard
String toString()
usageTick
Link copied to clipboard
void usageTick(World world, LivingEntity user, ItemStack stack, int remainingUseTicks)
use
Link copied to clipboard
TypedActionResult<ItemStackuse(World world, PlayerEntity user, Hand hand)
useOnBlock
Link copied to clipboard
ActionResult useOnBlock(ItemUsageContext context)
useOnEntity
Link copied to clipboard
ActionResult useOnEntity(ItemStack stack, PlayerEntity user, LivingEntity entity, Hand hand)

Sources

jvm source
Link copied to clipboard