public class ItemGPSAreaTool extends net.minecraft.item.Item implements IPositionProvider
| Modifier and Type | Class and Description |
|---|---|
static class |
ItemGPSAreaTool.EventHandler |
| Constructor and Description |
|---|
ItemGPSAreaTool() |
| 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) |
boolean |
disableDepthTest()
Whether or not the rendered positions should be visible through the world.
|
static ProgWidgetArea |
getArea(net.minecraft.item.ItemStack stack) |
static net.minecraft.util.math.BlockPos |
getGPSLocation(net.minecraft.world.World world,
net.minecraft.item.ItemStack gpsTool,
int index) |
java.util.List<net.minecraft.util.math.BlockPos> |
getRawStoredPositions(net.minecraft.world.World world,
net.minecraft.item.ItemStack stack)
Gets the raw stored positions in this provider.
|
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,
int index) |
void |
inventoryTick(net.minecraft.item.ItemStack stack,
net.minecraft.world.World world,
net.minecraft.entity.Entity entity,
int slot,
boolean heldItem) |
static void |
setGPSPosAndNotify(net.minecraft.entity.player.PlayerEntity player,
net.minecraft.util.math.BlockPos pos,
net.minecraft.util.Hand hand,
int index) |
static void |
setVariable(net.minecraft.item.ItemStack gpsTool,
java.lang.String variable,
int index) |
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, waitcanApplyAtEnchantingTable, 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 static void setGPSPosAndNotify(net.minecraft.entity.player.PlayerEntity player,
net.minecraft.util.math.BlockPos pos,
net.minecraft.util.Hand hand,
int index)
public 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.Item@Nonnull public static ProgWidgetArea getArea(net.minecraft.item.ItemStack stack)
public static net.minecraft.util.math.BlockPos getGPSLocation(net.minecraft.world.World world,
net.minecraft.item.ItemStack gpsTool,
int index)
public static void setVariable(net.minecraft.item.ItemStack gpsTool,
java.lang.String variable,
int index)
public static java.lang.String getVariable(net.minecraft.item.ItemStack gpsTool,
int index)
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 itemstackpublic 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 java.util.List<net.minecraft.util.math.BlockPos> getRawStoredPositions(net.minecraft.world.World world,
net.minecraft.item.ItemStack stack)
IPositionProvidergetRawStoredPositions 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 boolean disableDepthTest()
IPositionProviderdisableDepthTest in interface IPositionProvider