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 named net/minecraft/item/BrushItemintermediary net/minecraft/class_8162official csu
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class net.minecraft.item.Item
Item.Settings, Item.TooltipContext -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intprivate static final intFields inherited from class net.minecraft.item.Item
BASE_ATTACK_DAMAGE_MODIFIER_ID, BASE_ATTACK_SPEED_MODIFIER_ID, BLOCK_ITEMS, DEFAULT_MAX_COUNT, ITEM_BAR_STEPS, MAX_MAX_COUNTFields inherited from interface net.minecraft.resource.featuretoggle.ToggleableFeature
FEATURE_ENABLED_REGISTRY_KEYS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidaddDustParticles(World world, BlockHitResult hitResult, BlockState state, Vec3d userRotation, Arm arm) private HitResultgetHitResult(PlayerEntity user) intgetMaxUseTime(ItemStack stack, LivingEntity user) 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.Item
appendTooltip, asItem, byRawId, canBeNested, canMine, canRepair, finishUsing, fromBlock, getAttributeModifiers, getBonusAttackDamage, getBreakSound, getComponents, getDefaultStack, getDrinkSound, getEatSound, getEnchantability, getItemBarColor, getItemBarStep, getMaxCount, getMiningSpeed, getName, getName, getOrCreateTranslationKey, getRawId, getRecipeRemainder, getRegistryEntry, getRequiredFeatures, getTooltipData, getTranslationKey, getTranslationKey, hasGlint, hasRecipeRemainder, inventoryTick, isCorrectForDrops, isEnchantable, isItemBarVisible, isNetworkSynced, isUsedOnRelease, onClicked, onCraft, onCraftByPlayer, onItemEntityDestroyed, onStackClicked, onStoppedUsing, postDamageEntity, postHit, postMine, postProcessComponents, raycast, toString, use, useOnEntityMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.resource.featuretoggle.ToggleableFeature
isEnabled
-
Field Details
-
ANIMATION_DURATION
public static final int ANIMATION_DURATION- See Also:
- Mappings:
Namespace Name Mixin selector named ANIMATION_DURATIONLnet/minecraft/item/BrushItem;ANIMATION_DURATION:Iintermediary field_43390Lnet/minecraft/class_8162;field_43390:Iofficial aLcsu;a:I
-
MAX_BRUSH_TIME
private static final int MAX_BRUSH_TIME- See Also:
- Mappings:
Namespace Name Mixin selector named MAX_BRUSH_TIMELnet/minecraft/item/BrushItem;MAX_BRUSH_TIME:Iintermediary field_42683Lnet/minecraft/class_8162;field_42683:Iofficial bLcsu;b:I
-
-
Constructor Details
-
BrushItem
- Mappings:
Namespace Name Mixin selector named <init>Lnet/minecraft/item/Item;<init>(Lnet/minecraft/item/Item$Settings;)Vintermediary <init>Lnet/minecraft/class_1792;<init>(Lnet/minecraft/class_1792$class_1793;)Vofficial <init>Lcul;<init>(Lcul$a;)V
-
-
Method Details
-
useOnBlock
Called 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 classItem- 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 named useOnBlockLnet/minecraft/item/Item;useOnBlock(Lnet/minecraft/item/ItemUsageContext;)Lnet/minecraft/util/ActionResult;intermediary method_7884Lnet/minecraft/class_1792;method_7884(Lnet/minecraft/class_1838;)Lnet/minecraft/class_1269;official aLcul;a(Lcyf;)Lbqr;
-
getUseAction
Returns the use action the item should perform.- Overrides:
getUseActionin classItem- Returns:
- the use action the item should perform
- Mappings:
Namespace Name Mixin selector named getUseActionLnet/minecraft/item/Item;getUseAction(Lnet/minecraft/item/ItemStack;)Lnet/minecraft/util/UseAction;intermediary method_7853Lnet/minecraft/class_1792;method_7853(Lnet/minecraft/class_1799;)Lnet/minecraft/class_1839;official bLcul;b(Lcuq;)Lcwo;
-
getMaxUseTime
Returns 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 classItem- Returns:
- the maximum use (right-click) time of this item, in ticks
- Mappings:
Namespace Name Mixin selector named getMaxUseTimeLnet/minecraft/item/Item;getMaxUseTime(Lnet/minecraft/item/ItemStack;Lnet/minecraft/entity/LivingEntity;)Iintermediary method_7881Lnet/minecraft/class_1792;method_7881(Lnet/minecraft/class_1799;Lnet/minecraft/class_1309;)Iofficial aLcul;a(Lcuq;Lbtn;)I
-
usageTick
Called 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,getMaxUseTime(net.minecraft.item.ItemStack, net.minecraft.entity.LivingEntity)should also be overridden to return a positive value.- Overrides:
usageTickin classItem- Parameters:
remainingUseTicks- how long it's left until the entity finishes using the item, in ticks- See Also:
- Mappings:
Namespace Name Mixin selector named usageTickLnet/minecraft/item/Item;usageTick(Lnet/minecraft/world/World;Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/item/ItemStack;I)Vintermediary method_7852Lnet/minecraft/class_1792;method_7852(Lnet/minecraft/class_1937;Lnet/minecraft/class_1309;Lnet/minecraft/class_1799;I)Vofficial aLcul;a(Ldcw;Lbtn;Lcuq;I)V
-
getHitResult
- Mappings:
Namespace Name Mixin selector named getHitResultLnet/minecraft/item/BrushItem;getHitResult(Lnet/minecraft/entity/player/PlayerEntity;)Lnet/minecraft/util/hit/HitResult;intermediary method_49999Lnet/minecraft/class_8162;method_49999(Lnet/minecraft/class_1657;)Lnet/minecraft/class_239;official aLcsu;a(Lcmx;)Lexa;
-
addDustParticles
private void addDustParticles(World world, BlockHitResult hitResult, BlockState state, Vec3d userRotation, Arm arm) - Mappings:
Namespace Name Mixin selector named addDustParticlesLnet/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;)Vintermediary method_49184Lnet/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;)Vofficial aLcsu;a(Ldcw;Lewy;Ldtc;Lexc;Lbtg;)V
-