public class BlockItem extends Item
Item.PropertiesATTACK_DAMAGE_MODIFIER, ATTACK_SPEED_MODIFIER, BLOCK_TO_ITEM, canRepair, group, properties, randomdelegate| コンストラクタと説明 |
|---|
BlockItem(Block blockIn,
Item.Properties builder) |
| 修飾子とタイプ | メソッドと説明 |
|---|---|
void |
addInformation(ItemStack stack,
World worldIn,
java.util.List<ITextComponent> tooltip,
ITooltipFlag flagIn)
allows items to add custom lines of information to the mouseover description
|
void |
addToBlockToItemMap(java.util.Map<Block,Item> blockToItemMap,
Item itemIn) |
protected boolean |
canPlace(BlockItemUseContext p_195944_1_,
BlockState p_195944_2_) |
protected boolean |
checkPosition() |
void |
fillItemGroup(ItemGroup group,
NonNullList<ItemStack> items)
returns a list of items with the same ID, but different meta (eg: dye returns 16 items)
|
Block |
getBlock() |
BlockItemUseContext |
getBlockItemUseContext(BlockItemUseContext context) |
protected SoundEvent |
getPlaceSound(BlockState state)
非推奨です。
|
protected SoundEvent |
getPlaceSound(BlockState state,
World world,
BlockPos pos,
PlayerEntity entity) |
protected BlockState |
getStateForPlacement(BlockItemUseContext context) |
java.lang.String |
getTranslationKey()
Returns the unlocalized name of this item.
|
protected boolean |
onBlockPlaced(BlockPos pos,
World worldIn,
PlayerEntity player,
ItemStack stack,
BlockState state) |
ActionResultType |
onItemUse(ItemUseContext context)
Called when this item is used when targetting a Block
|
protected boolean |
placeBlock(BlockItemUseContext context,
BlockState state) |
void |
removeFromBlockToItemMap(java.util.Map<Block,Item> blockToItemMap,
Item itemIn) |
static boolean |
setTileEntityNBT(World worldIn,
PlayerEntity player,
BlockPos pos,
ItemStack stackIn) |
ActionResultType |
tryPlace(BlockItemUseContext context) |
addPropertyOverride, asItem, canHarvestBlock, canPlayerBreakBlockWhileHolding, func_219972_a, func_225519_S__, func_225520_U__, getAttributeModifiers, getContainerItem, getDefaultInstance, getDefaultTranslationKey, getDestroySpeed, getDisplayName, getFood, getGroup, getHarvestLevel, getIdFromItem, getIsRepairable, getItemById, getItemEnchantability, getItemFromBlock, getItemStackTileEntityRenderer, getMaxDamage, getMaxStackSize, getName, getPropertyGetter, getRarity, getTags, getToolTypes, getTranslationKey, getUseAction, getUseDuration, hasContainerItem, hasCustomProperties, hasEffect, hitEntity, inventoryTick, isComplex, isCrossbow, isDamageable, isEnchantable, isFood, isIn, isInGroup, isRepairable, itemInteractionForEntity, onBlockDestroyed, onCreated, onItemRightClick, onItemUseFinish, onPlayerStoppedUsing, rayTrace, shouldSyncTag, toString, updateItemStackNBTgetRegistryName, getRegistryType, setRegistryName, setRegistryName, setRegistryNameclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcanApplyAtEnchantingTable, canContinueUsing, canDisableShield, canEquip, canHarvestBlock, createEntity, damageItem, doesSneakBypassUse, getAnimationParameters, getArmorModel, getArmorTexture, getAttributeModifiers, getBurnTime, getContainerItem, getCreativeTabs, getCreatorModId, getDamage, getDurabilityForDisplay, getEntityLifespan, getEquipmentSlot, getFontRenderer, getHighlightTip, getItem, getItemEnchantability, getItemStackLimit, getMaxDamage, getRGBDurabilityForDisplay, getShareTag, getSmeltingExperience, getXpRepairRatio, hasContainerItem, hasCustomEntity, initCapabilities, isBeaconPayment, isBookEnchantable, isDamaged, isShield, onArmorTick, onBlockStartBreak, onDroppedByPlayer, onEntityItemUpdate, onEntitySwing, onHorseArmorTick, onItemUseFirst, onLeftClickEntity, onUsingTick, readShareTag, renderHelmetOverlay, setDamage, shouldCauseBlockBreakReset, shouldCauseReequipAnimation, showDurabilityBarpublic BlockItem(Block blockIn, Item.Properties builder)
public ActionResultType onItemUse(ItemUseContext context)
public ActionResultType tryPlace(BlockItemUseContext context)
@Deprecated protected SoundEvent getPlaceSound(BlockState state)
protected SoundEvent getPlaceSound(BlockState state, World world, BlockPos pos, PlayerEntity entity)
@Nullable public BlockItemUseContext getBlockItemUseContext(BlockItemUseContext context)
protected boolean onBlockPlaced(BlockPos pos, World worldIn, @Nullable PlayerEntity player, ItemStack stack, BlockState state)
@Nullable protected BlockState getStateForPlacement(BlockItemUseContext context)
protected boolean canPlace(BlockItemUseContext p_195944_1_, BlockState p_195944_2_)
protected boolean checkPosition()
protected boolean placeBlock(BlockItemUseContext context, BlockState state)
public static boolean setTileEntityNBT(World worldIn, @Nullable PlayerEntity player, BlockPos pos, ItemStack stackIn)
public java.lang.String getTranslationKey()
getTranslationKey クラス内 Itempublic void fillItemGroup(ItemGroup group, NonNullList<ItemStack> items)
fillItemGroup クラス内 Itempublic void addInformation(ItemStack stack, @Nullable World worldIn, java.util.List<ITextComponent> tooltip, ITooltipFlag flagIn)
addInformation クラス内 Itempublic Block getBlock()
public void addToBlockToItemMap(java.util.Map<Block,Item> blockToItemMap, Item itemIn)