public class PixelmonBlockItem
extends net.minecraft.item.BlockItem
Constructor and Description |
---|
PixelmonBlockItem(net.minecraft.block.Block block,
net.minecraft.item.Item.Properties properties)
Initializes an item block.
|
Modifier and Type | Method and Description |
---|---|
void |
appendHoverText(net.minecraft.item.ItemStack stack,
net.minecraft.world.World world,
java.util.List<net.minecraft.util.text.ITextComponent> tooltip,
net.minecraft.client.util.ITooltipFlag advanced) |
boolean |
canEquip(net.minecraft.item.ItemStack stack,
net.minecraft.inventory.EquipmentSlotType armorType,
net.minecraft.entity.Entity entity) |
protected boolean |
canPlace(net.minecraft.item.BlockItemUseContext context,
net.minecraft.block.BlockState p_195944_2_) |
static boolean |
canPlace(net.minecraft.util.math.BlockPos pos,
net.minecraft.util.Direction rot,
net.minecraft.world.World world,
MultiBlock mb,
net.minecraft.entity.player.PlayerEntity player,
net.minecraft.item.ItemStack stack,
net.minecraft.block.Block block)
Checks if a multiblock can be placed in a certain location.
|
java.lang.String |
getTooltipText() |
java.lang.String |
getTooltipText(net.minecraft.item.ItemStack stack) |
static int |
getWidthOffset(MultiBlock mb)
Used to calculate placement for JSON models, since they have special restrictions on model sizing
|
static void |
setMultiBlocksWidth(net.minecraft.util.math.BlockPos pos,
net.minecraft.util.Direction rot,
net.minecraft.world.World world,
MultiBlock mb,
net.minecraft.block.Block block,
net.minecraft.entity.player.PlayerEntity player)
Places a multiblock.
|
net.minecraft.util.ActionResult<net.minecraft.item.ItemStack> |
use(net.minecraft.world.World p_77659_1_,
net.minecraft.entity.player.PlayerEntity p_77659_2_,
net.minecraft.util.Hand p_77659_3_) |
net.minecraft.util.ActionResultType |
useOn(net.minecraft.item.ItemUseContext context)
Callback for item usage.
|
fillItemCategory, getBlock, getDescriptionId, getPlacementState, getPlaceSound, getPlaceSound, mustSurvive, place, placeBlock, registerBlocks, removeFromBlockToItemMap, updateCustomBlockEntityTag, updateCustomBlockEntityTag, updatePlacementContext
allowdedIn, asItem, byBlock, byId, canAttackBlock, canBeDepleted, canBeHurtBy, finishUsingItem, getCraftingRemainingItem, getDefaultAttributeModifiers, getDefaultInstance, getDescription, getDescriptionId, getDestroySpeed, getDrinkingSound, getEatingSound, getEnchantmentValue, getFoodProperties, getHarvestLevel, getId, getItemCategory, getItemStackTileEntityRenderer, getMaxDamage, getMaxStackSize, getName, getOrCreateDescriptionId, getPlayerPOVHitResult, getRarity, getTags, getToolTypes, getUseAnimation, getUseDuration, hasCraftingRemainingItem, hurtEnemy, interactLivingEntity, inventoryTick, is, isComplex, isCorrectToolForDrops, isEdible, isEnchantable, isFireResistant, isFoil, isRepairable, isValidRepairItem, mineBlock, onCraftedBy, onUseTick, releaseUsing, shouldOverrideMultiplayerNbt, toString, useOnRelease, verifyTagAfterLoad
getRegistryName, getRegistryType, setRegistryName, setRegistryName, setRegistryName
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
canApplyAtEnchantingTable, canContinueUsing, canDisableShield, canElytraFly, canHarvestBlock, createEntity, damageItem, doesSneakBypassUse, elytraFlightTick, getArmorModel, getArmorTexture, getAttributeModifiers, getBurnTime, getBurnTime, getContainerItem, getCreativeTabs, getCreatorModId, getDamage, getDurabilityForDisplay, getEntityLifespan, getEquipmentSlot, getFontRenderer, getHighlightTip, getItem, getItemEnchantability, getItemStackLimit, getMaxDamage, getRGBDurabilityForDisplay, getShareTag, getSmeltingExperience, getXpRepairRatio, hasContainerItem, hasCustomEntity, initCapabilities, isBookEnchantable, isDamageable, isDamaged, isEnderMask, isPiglinCurrency, isShield, makesPiglinsNeutral, onArmorTick, onBlockStartBreak, onDroppedByPlayer, onEntityItemUpdate, onEntitySwing, onHorseArmorTick, onItemUseFirst, onLeftClickEntity, onUsingTick, readShareTag, renderHelmetOverlay, setDamage, shouldCauseBlockBreakReset, shouldCauseReequipAnimation, showDurabilityBar
public PixelmonBlockItem(net.minecraft.block.Block block, net.minecraft.item.Item.Properties properties)
block
- The block form of the item.public net.minecraft.util.ActionResult<net.minecraft.item.ItemStack> use(net.minecraft.world.World p_77659_1_, net.minecraft.entity.player.PlayerEntity p_77659_2_, net.minecraft.util.Hand p_77659_3_)
use
in class net.minecraft.item.Item
public net.minecraft.util.ActionResultType useOn(net.minecraft.item.ItemUseContext context)
useOn
in class net.minecraft.item.BlockItem
public boolean canEquip(net.minecraft.item.ItemStack stack, net.minecraft.inventory.EquipmentSlotType armorType, net.minecraft.entity.Entity entity)
protected boolean canPlace(net.minecraft.item.BlockItemUseContext context, net.minecraft.block.BlockState p_195944_2_)
canPlace
in class net.minecraft.item.BlockItem
public static boolean canPlace(net.minecraft.util.math.BlockPos pos, net.minecraft.util.Direction rot, net.minecraft.world.World world, MultiBlock mb, net.minecraft.entity.player.PlayerEntity player, net.minecraft.item.ItemStack stack, net.minecraft.block.Block block)
pos
- The position that the multiblock will be placed at.rot
- The direction the multiblock will face.world
- The world to place the multiblock in.mb
- The multiblock to be placed.player
- The player placing the multiblock.stack
- The item stack where the multiblock is coming from.block
- The block to place the multiblock on.public static void setMultiBlocksWidth(net.minecraft.util.math.BlockPos pos, net.minecraft.util.Direction rot, net.minecraft.world.World world, MultiBlock mb, net.minecraft.block.Block block, net.minecraft.entity.player.PlayerEntity player)
pos
- The position of the multiblock's base.rot
- The direction the multiblock is facing.world
- The world to place the multiblock in.mb
- The multiblock to place.block
- The block to place the multiblock on.player
- The player placing the multiblock.public static int getWidthOffset(MultiBlock mb)
public void appendHoverText(net.minecraft.item.ItemStack stack, @Nullable net.minecraft.world.World world, java.util.List<net.minecraft.util.text.ITextComponent> tooltip, net.minecraft.client.util.ITooltipFlag advanced)
appendHoverText
in class net.minecraft.item.BlockItem
public java.lang.String getTooltipText(net.minecraft.item.ItemStack stack)
public java.lang.String getTooltipText()