public abstract class AbstractProvider
extends net.minecraft.item.Item
| Modifier and Type | Method and Description |
|---|---|
void |
addInformation(net.minecraft.item.ItemStack stack,
net.minecraft.entity.player.EntityPlayer player,
java.util.List<java.lang.String> tooltip,
boolean advanced) |
static int |
getDimension(net.minecraft.item.ItemStack stack)
Get the dimension the position the provider is bound to is in.
|
static net.minecraft.entity.Entity |
getEntity(net.minecraft.item.ItemStack stack,
net.minecraft.world.World world)
Get the entity the provider is bound to.
|
static net.minecraft.util.math.BlockPos |
getPosition(net.minecraft.item.ItemStack stack)
Get the position the provider is bound to.
|
static net.minecraft.util.EnumFacing |
getSide(net.minecraft.item.ItemStack stack)
Get the side of the block the provider is bound to.
|
protected abstract java.lang.String |
getTooltip() |
static boolean |
isBoundToBlock(net.minecraft.item.ItemStack stack)
Check whether this provider is currently bound to a position.
|
static boolean |
isBoundToEntity(net.minecraft.item.ItemStack stack)
Check whether this provider is currently bound to an entity.
|
abstract boolean |
isValidTarget(net.minecraft.entity.Entity entity) |
abstract boolean |
isValidTarget(net.minecraft.tileentity.TileEntity tileEntity,
net.minecraft.util.EnumFacing side) |
boolean |
itemInteractionForEntity(net.minecraft.item.ItemStack stack,
net.minecraft.entity.player.EntityPlayer playerIn,
net.minecraft.entity.EntityLivingBase target,
net.minecraft.util.EnumHand hand) |
net.minecraft.util.ActionResult<net.minecraft.item.ItemStack> |
onItemRightClick(net.minecraft.world.World world,
net.minecraft.entity.player.EntityPlayer player,
net.minecraft.util.EnumHand hand) |
net.minecraft.util.EnumActionResult |
onItemUse(net.minecraft.entity.player.EntityPlayer player,
net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos,
net.minecraft.util.EnumHand hand,
net.minecraft.util.EnumFacing side,
float hitX,
float hitY,
float hitZ) |
addPropertyOverride, canApplyAtEnchantingTable, canHarvestBlock, canHarvestBlock, canItemEditBlocks, createEntity, doesSneakBypassUse, getAnimationParameters, getArmorModel, getArmorTexture, getAttributeModifiers, getByNameOrId, getContainerItem, getContainerItem, getCreativeTab, getCreativeTabs, getDamage, getDefaultInstance, getDurabilityForDisplay, getEntityLifespan, getFontRenderer, getHarvestLevel, getHasSubtypes, getHighlightTip, getIdFromItem, getIsRepairable, getItemAttributeModifiers, getItemById, getItemEnchantability, getItemEnchantability, getItemFromBlock, getItemStackDisplayName, getItemStackLimit, getItemStackLimit, getItemUseAction, getMaxDamage, getMaxDamage, getMaxItemUseDuration, getMetadata, getMetadata, getNBTShareTag, getPropertyGetter, getRarity, getRGBDurabilityForDisplay, getShareTag, getSmeltingExperience, getStrVsBlock, getSubItems, getToolClasses, getUnlocalizedName, getUnlocalizedName, getUnlocalizedNameInefficiently, hasContainerItem, hasContainerItem, hasCustomEntity, hasCustomProperties, hasEffect, hitEntity, initCapabilities, isBeaconPayment, isBookEnchantable, isDamageable, isDamaged, isEnchantable, isFull3D, isMap, isRepairable, isValidArmor, onArmorTick, onBlockDestroyed, onBlockStartBreak, onCreated, onDroppedByPlayer, onEntityItemUpdate, onEntitySwing, onItemUseFinish, onItemUseFirst, onLeftClickEntity, onPlayerStoppedUsing, onUpdate, onUsingTick, rayTrace, registerItemBlock, registerItems, renderHelmetOverlay, setContainerItem, setCreativeTab, setDamage, setFull3D, setHarvestLevel, setHasSubtypes, setMaxDamage, setMaxStackSize, setNoRepair, setUnlocalizedName, shouldCauseBlockBreakReset, shouldCauseReequipAnimation, shouldRotateAroundWhenRendering, showDurabilityBar, updateItemStackNBTpublic static boolean isBoundToBlock(net.minecraft.item.ItemStack stack)
stack - the provider to check for.true if the provider is bound; false otherwise.public static boolean isBoundToEntity(net.minecraft.item.ItemStack stack)
stack - the provider to check for.true if the provider is bound; false otherwise.public static int getDimension(net.minecraft.item.ItemStack stack)
Behavior is undefined if isBoundToBlock(ItemStack) returns false.
stack - the provider to get the dimension for.public static net.minecraft.util.math.BlockPos getPosition(net.minecraft.item.ItemStack stack)
Behavior is undefined if isBoundToBlock(ItemStack) returns false.
stack - the provider to get the position for.@Nullable
public static net.minecraft.entity.Entity getEntity(net.minecraft.item.ItemStack stack,
net.minecraft.world.World world)
Behavior is undefined if isBoundToBlock(ItemStack) returns false.
stack - the provider to get the position for.world - the world to try to get the entity in.public static net.minecraft.util.EnumFacing getSide(net.minecraft.item.ItemStack stack)
Behavior is undefined if isBoundToBlock(ItemStack) returns false.
stack - the provider to get the bound-to side for.public abstract boolean isValidTarget(net.minecraft.tileentity.TileEntity tileEntity,
net.minecraft.util.EnumFacing side)
public abstract boolean isValidTarget(net.minecraft.entity.Entity entity)
protected abstract java.lang.String getTooltip()
public void addInformation(net.minecraft.item.ItemStack stack,
net.minecraft.entity.player.EntityPlayer player,
java.util.List<java.lang.String> tooltip,
boolean advanced)
addInformation in class net.minecraft.item.Itempublic net.minecraft.util.EnumActionResult onItemUse(net.minecraft.entity.player.EntityPlayer player,
net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos,
net.minecraft.util.EnumHand hand,
net.minecraft.util.EnumFacing side,
float hitX,
float hitY,
float hitZ)
onItemUse in class net.minecraft.item.Itempublic net.minecraft.util.ActionResult<net.minecraft.item.ItemStack> onItemRightClick(net.minecraft.world.World world,
net.minecraft.entity.player.EntityPlayer player,
net.minecraft.util.EnumHand hand)
onItemRightClick in class net.minecraft.item.Itempublic boolean itemInteractionForEntity(net.minecraft.item.ItemStack stack,
net.minecraft.entity.player.EntityPlayer playerIn,
net.minecraft.entity.EntityLivingBase target,
net.minecraft.util.EnumHand hand)
itemInteractionForEntity in class net.minecraft.item.Item