Package net.minecraft.item
Class BrushItem
java.lang.Object
net.minecraft.item.Item
net.minecraft.item.BrushItem
- All Implemented Interfaces:
- ItemConvertible,- ToggleableFeature
- Mappings:
- Namespace - Name - official - cdz- intermediary - net/minecraft/class_8162- named - net/minecraft/item/BrushItem
- 
Nested Class SummaryNested ClassesNested classes/interfaces inherited from class net.minecraft.item.ItemItem.Settings
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final intprivate static final doubleprivate static final intFields inherited from class net.minecraft.item.ItemATTACK_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.ToggleableFeatureFEATURE_ENABLED_REGISTRY_KEYS
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddDustParticles(World world, BlockHitResult hitResult, BlockState state, Vec3d userRotation, Arm arm) private HitResultgetHitResult(LivingEntity user) intgetMaxUseTime(ItemStack stack) Returns the maximum use (right-click) time of this item, in ticks.getUseAction(ItemStack stack) Returns the use action the item should perform.voidusageTick(World world, LivingEntity user, ItemStack stack, int remainingUseTicks) Called on both the server and the client every tick while an entity uses the item.useOnBlock(ItemUsageContext context) Called when an item is used on a block.Methods inherited from class net.minecraft.item.ItemappendTooltip, asItem, byRawId, canBeNested, canMine, canRepair, damage, finishUsing, fromBlock, getAttributeModifiers, getDefaultStack, getDrinkSound, getEatSound, getEnchantability, getFoodComponent, getItemBarColor, getItemBarStep, getMaxCount, getMaxDamage, 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, use, useOnEntityMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.resource.featuretoggle.ToggleableFeatureisEnabled
- 
Field Details- 
field_43390public static final int field_43390- See Also:
- Mappings:
- Namespace - Name - Mixin selector - official - a- Lcdz;a:I- intermediary - field_43390- Lnet/minecraft/class_8162;field_43390:I- named - field_43390- Lnet/minecraft/item/BrushItem;field_43390:I
 
- 
MAX_BRUSH_TIMEprivate static final int MAX_BRUSH_TIME- See Also:
- Mappings:
- Namespace - Name - Mixin selector - official - b- Lcdz;b:I- intermediary - field_42683- Lnet/minecraft/class_8162;field_42683:I- named - MAX_BRUSH_TIME- Lnet/minecraft/item/BrushItem;MAX_BRUSH_TIME:I
 
- 
MAX_BRUSH_DISTANCEprivate static final double MAX_BRUSH_DISTANCE- Mappings:
- Namespace - Name - Mixin selector - official - c- Lcdz;c:D- intermediary - field_44603- Lnet/minecraft/class_8162;field_44603:D- named - MAX_BRUSH_DISTANCE- Lnet/minecraft/item/BrushItem;MAX_BRUSH_DISTANCE:D
 
 
- 
- 
Constructor Details- 
BrushItem- Mappings:
- Namespace - Name - Mixin selector - official - <init>- Lcfu;<init>(Lcfu$a;)V- intermediary - <init>- Lnet/minecraft/class_1792;<init>(Lnet/minecraft/class_1792$class_1793;)V- named - <init>- Lnet/minecraft/item/Item;<init>(Lnet/minecraft/item/Item$Settings;)V
 
 
- 
- 
Method Details- 
useOnBlockCalled when an item is used on a block.This method is called on both the logical client and logical server, so take caution when using this method. The logical side can be checked using context.getWorld().isClient().- Overrides:
- useOnBlockin class- Item
- Parameters:
- context- the usage context
- Returns:
- an action result that specifies if using the item on a block was successful.
- Mappings:
- Namespace - Name - Mixin selector - official - a- Lcfu;a(Lcij;)Lbdx;- intermediary - method_7884- Lnet/minecraft/class_1792;method_7884(Lnet/minecraft/class_1838;)Lnet/minecraft/class_1269;- named - useOnBlock- Lnet/minecraft/item/Item;useOnBlock(Lnet/minecraft/item/ItemUsageContext;)Lnet/minecraft/util/ActionResult;
 
- 
getUseActionReturns the use action the item should perform.- Overrides:
- getUseActionin class- Item
- Returns:
- the use action the item should perform
- Mappings:
- Namespace - Name - Mixin selector - official - c- Lcfu;c(Lcfz;)Lchs;- intermediary - method_7853- Lnet/minecraft/class_1792;method_7853(Lnet/minecraft/class_1799;)Lnet/minecraft/class_1839;- named - getUseAction- Lnet/minecraft/item/Item;getUseAction(Lnet/minecraft/item/ItemStack;)Lnet/minecraft/util/UseAction;
 
- 
getMaxUseTimeReturns the maximum use (right-click) time of this item, in ticks. Once a player has used an item for said number of ticks, they stop using it, andItem.finishUsing(net.minecraft.item.ItemStack, net.minecraft.world.World, net.minecraft.entity.LivingEntity)is called.- Overrides:
- getMaxUseTimein class- Item
- Returns:
- the maximum use (right-click) time of this item, in ticks
- Mappings:
- Namespace - Name - Mixin selector - official - b- Lcfu;b(Lcfz;)I- intermediary - method_7881- Lnet/minecraft/class_1792;method_7881(Lnet/minecraft/class_1799;)I- named - getMaxUseTime- Lnet/minecraft/item/Item;getMaxUseTime(Lnet/minecraft/item/ItemStack;)I
 
- 
usageTickCalled on both the server and the client every tick while an entity uses the item. Currently used byCrossbowItemto charge the crossbow. If this is overridden,Item.getMaxUseTime(net.minecraft.item.ItemStack)should also be overridden to return a positive value.- Overrides:
- usageTickin class- Item
- Parameters:
- remainingUseTicks- how long it's left until the entity finishes using the item, in ticks
- See Also:
- Mappings:
- Namespace - Name - Mixin selector - official - a- Lcfu;a(Lcmm;Lbfz;Lcfz;I)V- intermediary - method_7852- Lnet/minecraft/class_1792;method_7852(Lnet/minecraft/class_1937;Lnet/minecraft/class_1309;Lnet/minecraft/class_1799;I)V- named - usageTick- Lnet/minecraft/item/Item;usageTick(Lnet/minecraft/world/World;Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/item/ItemStack;I)V
 
- 
getHitResult- Mappings:
- Namespace - Name - Mixin selector - official - a- Lcdz;a(Lbfz;)Leeg;- intermediary - method_49999- Lnet/minecraft/class_8162;method_49999(Lnet/minecraft/class_1309;)Lnet/minecraft/class_239;- named - getHitResult- Lnet/minecraft/item/BrushItem;getHitResult(Lnet/minecraft/entity/LivingEntity;)Lnet/minecraft/util/hit/HitResult;
 
- 
addDustParticlespublic void addDustParticles(World world, BlockHitResult hitResult, BlockState state, Vec3d userRotation, Arm arm) - Mappings:
- Namespace - Name - Mixin selector - official - a- Lcdz;a(Lcmm;Leee;Ldcb;Leei;Lbft;)V- intermediary - method_49184- Lnet/minecraft/class_8162;method_49184(Lnet/minecraft/class_1937;Lnet/minecraft/class_3965;Lnet/minecraft/class_2680;Lnet/minecraft/class_243;Lnet/minecraft/class_1306;)V- named - addDustParticles- Lnet/minecraft/item/BrushItem;addDustParticles(Lnet/minecraft/world/World;Lnet/minecraft/util/hit/BlockHitResult;Lnet/minecraft/block/BlockState;Lnet/minecraft/util/math/Vec3d;Lnet/minecraft/util/Arm;)V
 
 
-