Package net.minecraft.item
Class BlockItem
java.lang.Object
net.minecraft.item.Item
net.minecraft.item.BlockItem
- Direct Known Subclasses:
BannerItem,GrassBlockItem,LeavesItem,SnowLayerItem,StickyPistonBlockItem,StoneSlabItem,VariantBlockItem,WoolItem
public class BlockItem extends Item
- Mappings:
Namespace Name official yointermediary net/minecraft/class_2018named net/minecraft/item/BlockItem
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.item.Item
Item.ToolMaterialType -
Field Summary
Fields inherited from class net.minecraft.item.Item
ATTACK_DAMAGE_MODIFIER_UUID, damageable, handheld, maxCount, RANDOM, REGISTRY -
Constructor Summary
-
Method Summary
Modifier and Type Method Description voidappendItemStacks(Item item, ItemGroup group, List<ItemStack> list)Registers an item's sub itemsBlockgetBlock()ItemGroupgetItemGroup()Returns the itemgroup that the item is inStringgetTranslationKey()Returns the translation key of the current ItemStringgetTranslationKey(ItemStack stack)booleanmethod_8182(World world, BlockPos blockPos, Direction direction, PlayerEntity playerEntity, ItemStack itemStack)static booleansetBlockEntityTag(World world, PlayerEntity player, BlockPos pos, ItemStack itemStack)BlockItemsetTranslationKey(String string)Sets the current item's translation key.booleanuse(ItemStack itemStack, PlayerEntity player, World world, BlockPos pos, Direction direction, float facingX, float facingY, float facingZ)Methods inherited from class net.minecraft.item.Item
appendTooltip, byRawId, canRepair, canUseOnEntity, fromBlock, getAttributeModifierMap, getDisplayColor, getDisplayName, getEnchantability, getFromId, getItemstackTranslatedName, getMaxCount, getMaxDamage, getMaxUseTime, getMeta, getMiningSpeedMultiplier, getRarity, getRawId, getRecipeRemainder, getStatusEffectString, getUseAction, hasEnchantmentGlint, hasStatusEffectString, hasSubTypes, inventoryTick, isDamageable, isEffectiveOn, isEnchantable, isFood, isHandheld, isNetworkSynced, isUnbreakable, onBlockBroken, onCraft, onEntityHit, onFinishUse, onHit, onStartUse, onUseStopped, postProcessTag, registerBlockItem, setHandheld, setItemGroup, setMaxCount, setMaxDamage, setRecipeRemainder, setStatusEffectString, setUnbreakable, setup, shouldRotate, shouldSyncTagToClient
-
Field Details
-
block
- Mappings:
Namespace Name Mixin selector official aLyo;a:Lafh;intermediary field_8548Lnet/minecraft/class_2018;field_8548:Lnet/minecraft/class_160;named blockLnet/minecraft/item/BlockItem;block:Lnet/minecraft/block/Block;
-
-
Constructor Details
-
BlockItem
- Mappings:
Namespace Name Mixin selector official <init>Lyo;<init>(Lafh;)Vintermediary <init>Lnet/minecraft/class_2018;<init>(Lnet/minecraft/class_160;)Vnamed <init>Lnet/minecraft/item/BlockItem;<init>(Lnet/minecraft/block/Block;)V
-
-
Method Details
-
setTranslationKey
Description copied from class:ItemSets the current item's translation key.- Overrides:
setTranslationKeyin classItem- Parameters:
string- Translation key- Returns:
- The current Item
- Mappings:
Namespace Name Mixin selector official bLyo;b(Ljava/lang/String;)Lyo;intermediary method_8184Lnet/minecraft/class_2018;method_8184(Ljava/lang/String;)Lnet/minecraft/class_2018;named setTranslationKeyLnet/minecraft/item/BlockItem;setTranslationKey(Ljava/lang/String;)Lnet/minecraft/item/BlockItem;
-
use
public boolean use(ItemStack itemStack, PlayerEntity player, World world, BlockPos pos, Direction direction, float facingX, float facingY, float facingZ)- Overrides:
usein classItem- Mappings:
Namespace Name Mixin selector official aLzw;a(Lzx;Lwn;Ladm;Lcj;Lcq;FFF)Zintermediary method_8264Lnet/minecraft/class_2054;method_8264(Lnet/minecraft/class_2056;Lnet/minecraft/class_1963;Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_1383;FFF)Znamed useLnet/minecraft/item/Item;use(Lnet/minecraft/item/ItemStack;Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/Direction;FFF)Z
-
setBlockEntityTag
public static boolean setBlockEntityTag(World world, PlayerEntity player, BlockPos pos, ItemStack itemStack)- Mappings:
Namespace Name Mixin selector official aLyo;a(Ladm;Lwn;Lcj;Lzx;)Zintermediary method_8183Lnet/minecraft/class_2018;method_8183(Lnet/minecraft/class_99;Lnet/minecraft/class_1963;Lnet/minecraft/class_1372;Lnet/minecraft/class_2056;)Znamed setBlockEntityTagLnet/minecraft/item/BlockItem;setBlockEntityTag(Lnet/minecraft/world/World;Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/item/ItemStack;)Z
-
method_8182
@Environment(CLIENT) public boolean method_8182(World world, BlockPos blockPos, Direction direction, PlayerEntity playerEntity, ItemStack itemStack)- Mappings:
Namespace Name Mixin selector official aLyo;a(Ladm;Lcj;Lcq;Lwn;Lzx;)Zintermediary method_8182Lnet/minecraft/class_2018;method_8182(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_1383;Lnet/minecraft/class_1963;Lnet/minecraft/class_2056;)Znamed method_8182Lnet/minecraft/item/BlockItem;method_8182(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/Direction;Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/item/ItemStack;)Z
-
getTranslationKey
- Overrides:
getTranslationKeyin classItem- Mappings:
Namespace Name Mixin selector official e_Lzw;e_(Lzx;)Ljava/lang/String;intermediary method_8286Lnet/minecraft/class_2054;method_8286(Lnet/minecraft/class_2056;)Ljava/lang/String;named getTranslationKeyLnet/minecraft/item/Item;getTranslationKey(Lnet/minecraft/item/ItemStack;)Ljava/lang/String;
-
getTranslationKey
Returns the translation key of the current Item- Overrides:
getTranslationKeyin classItem- Returns:
- Translation key
- Mappings:
Namespace Name Mixin selector official aLzw;a()Ljava/lang/String;intermediary method_8246Lnet/minecraft/class_2054;method_8246()Ljava/lang/String;named getTranslationKeyLnet/minecraft/item/Item;getTranslationKey()Ljava/lang/String;
-
getItemGroup
Returns the itemgroup that the item is in- Overrides:
getItemGroupin classItem- Mappings:
Namespace Name Mixin selector official cLzw;c()Lyz;intermediary method_8274Lnet/minecraft/class_2054;method_8274()Lnet/minecraft/class_2029;named getItemGroupLnet/minecraft/item/Item;getItemGroup()Lnet/minecraft/item/ItemGroup;
-
appendItemStacks
@Environment(CLIENT) public void appendItemStacks(Item item, ItemGroup group, List<ItemStack> list)Registers an item's sub items- Overrides:
appendItemStacksin classItem- Parameters:
item- The Item instancegroup- The ItemGrouplist- The list of sub items- Mappings:
Namespace Name Mixin selector official aLzw;a(Lzw;Lyz;Ljava/util/List;)Vintermediary method_8255Lnet/minecraft/class_2054;method_8255(Lnet/minecraft/class_2054;Lnet/minecraft/class_2029;Ljava/util/List;)Vnamed appendItemStacksLnet/minecraft/item/Item;appendItemStacks(Lnet/minecraft/item/Item;Lnet/minecraft/item/ItemGroup;Ljava/util/List;)V
-
getBlock
- Mappings:
Namespace Name Mixin selector official dLyo;d()Lafh;intermediary method_8185Lnet/minecraft/class_2018;method_8185()Lnet/minecraft/class_160;named getBlockLnet/minecraft/item/BlockItem;getBlock()Lnet/minecraft/block/Block;
-