public class ItemGPSTool extends net.minecraft.item.Item implements IPositionProvider
| Constructor and Description |
|---|
ItemGPSTool() |
| Modifier and Type | Method and Description |
|---|---|
void |
appendHoverText(net.minecraft.item.ItemStack stack,
net.minecraft.world.World worldIn,
java.util.List<net.minecraft.util.text.ITextComponent> infoList,
net.minecraft.client.util.ITooltipFlag par4) |
static net.minecraft.util.math.BlockPos |
getGPSLocation(net.minecraft.item.ItemStack stack) |
static net.minecraft.util.math.BlockPos |
getGPSLocation(net.minecraft.world.World world,
net.minecraft.item.ItemStack gpsTool) |
int |
getRenderColor(int index)
Color that should be used to highlight the stored block positions if & when they are rendered on-screen.
|
java.util.List<net.minecraft.util.math.BlockPos> |
getStoredPositions(net.minecraft.world.World world,
net.minecraft.item.ItemStack stack)
Get block position data from the given ItemStack.
|
static java.lang.String |
getVariable(net.minecraft.item.ItemStack gpsTool) |
void |
inventoryTick(net.minecraft.item.ItemStack stack,
net.minecraft.world.World world,
net.minecraft.entity.Entity entity,
int slot,
boolean heldItem) |
static void |
setGPSLocation(net.minecraft.item.ItemStack gpsTool,
net.minecraft.util.math.BlockPos pos) |
static void |
setVariable(net.minecraft.item.ItemStack gpsTool,
java.lang.String variable) |
void |
syncVariables(net.minecraft.entity.player.ServerPlayerEntity player,
net.minecraft.item.ItemStack stack)
If the item stores any global variables which the client needs to know about (e.g.
|
net.minecraft.util.ActionResult<net.minecraft.item.ItemStack> |
use(net.minecraft.world.World worldIn,
net.minecraft.entity.player.PlayerEntity playerIn,
net.minecraft.util.Hand handIn) |
net.minecraft.util.ActionResultType |
useOn(net.minecraft.item.ItemUseContext ctx) |
allowdedIn, asItem, byBlock, byId, canAttackBlock, canBeDepleted, canBeHurtBy, fillItemCategory, finishUsingItem, getCraftingRemainingItem, getDefaultAttributeModifiers, getDefaultInstance, getDescription, getDescriptionId, getDescriptionId, getDestroySpeed, getDrinkingSound, getEatingSound, getEnchantmentValue, getFoodProperties, getHarvestLevel, getId, getItemCategory, getItemStackTileEntityRenderer, getMaxDamage, getMaxStackSize, getName, getOrCreateDescriptionId, getPlayerPOVHitResult, getRarity, getTags, getToolTypes, getUseAnimation, getUseDuration, hasCraftingRemainingItem, hurtEnemy, interactLivingEntity, is, isComplex, isCorrectToolForDrops, isEdible, isEnchantable, isFireResistant, isFoil, isRepairable, isValidRepairItem, mineBlock, onCraftedBy, onUseTick, releaseUsing, shouldOverrideMultiplayerNbt, toString, useOnRelease, verifyTagAfterLoadgetRegistryName, getRegistryType, setRegistryName, setRegistryName, setRegistryNameclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitdisableDepthTest, getRawStoredPositionscanApplyAtEnchantingTable, canContinueUsing, canDisableShield, canElytraFly, canEquip, 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, showDurabilityBarpublic net.minecraft.util.ActionResultType useOn(net.minecraft.item.ItemUseContext ctx)
useOn in class net.minecraft.item.Itempublic net.minecraft.util.ActionResult<net.minecraft.item.ItemStack> use(net.minecraft.world.World worldIn,
net.minecraft.entity.player.PlayerEntity playerIn,
net.minecraft.util.Hand handIn)
use in class net.minecraft.item.Itempublic void appendHoverText(net.minecraft.item.ItemStack stack,
net.minecraft.world.World worldIn,
java.util.List<net.minecraft.util.text.ITextComponent> infoList,
net.minecraft.client.util.ITooltipFlag par4)
appendHoverText in class net.minecraft.item.Itempublic void inventoryTick(net.minecraft.item.ItemStack stack,
net.minecraft.world.World world,
net.minecraft.entity.Entity entity,
int slot,
boolean heldItem)
inventoryTick in class net.minecraft.item.Itempublic static net.minecraft.util.math.BlockPos getGPSLocation(net.minecraft.item.ItemStack stack)
public static net.minecraft.util.math.BlockPos getGPSLocation(net.minecraft.world.World world,
net.minecraft.item.ItemStack gpsTool)
public static void setGPSLocation(net.minecraft.item.ItemStack gpsTool,
net.minecraft.util.math.BlockPos pos)
public static void setVariable(net.minecraft.item.ItemStack gpsTool,
java.lang.String variable)
public static java.lang.String getVariable(net.minecraft.item.ItemStack gpsTool)
public java.util.List<net.minecraft.util.math.BlockPos> getStoredPositions(net.minecraft.world.World world,
@Nonnull
net.minecraft.item.ItemStack stack)
IPositionProvidergetStoredPositions in interface IPositionProviderworld - the world (if a server world, global variables may be used)stack - the itemstackpublic int getRenderColor(int index)
IPositionProvidergetRenderColor in interface IPositionProviderindex - the index in the list returned by getStoredPositions()public void syncVariables(net.minecraft.entity.player.ServerPlayerEntity player,
net.minecraft.item.ItemStack stack)
IPositionProviderPneumaticRegistry.IPneumaticCraftInterface.syncGlobalVariable(ServerPlayerEntity, String)}
for a convenience method to send the necessary sync packet.syncVariables in interface IPositionProviderplayer - the player to sync tostack - the itemstack