Package com.ldtteam.structurize.items
Class ItemCaliper
java.lang.Object
net.minecraft.world.item.Item
com.ldtteam.structurize.items.AbstractItemWithPosSelector
com.ldtteam.structurize.items.ItemCaliper
- All Implemented Interfaces:
net.minecraft.world.flag.FeatureElement,net.minecraft.world.level.ItemLike,net.neoforged.neoforge.common.extensions.IItemExtension
Caliper Item class. Calculates distances, areas, and volumes.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.ldtteam.structurize.items.AbstractItemWithPosSelector
AbstractItemWithPosSelector.PosSelectionNested classes/interfaces inherited from class net.minecraft.world.item.Item
net.minecraft.world.item.Item.Properties, net.minecraft.world.item.Item.TooltipContext -
Field Summary
Fields inherited from class net.minecraft.world.item.Item
ABSOLUTE_MAX_STACK_SIZE, BASE_ATTACK_DAMAGE_ID, BASE_ATTACK_SPEED_ID, BY_BLOCK, canRepair, DEFAULT_MAX_STACK_SIZE, MAX_BAR_WIDTHFields inherited from interface net.minecraft.world.flag.FeatureElement
FILTERED_REGISTRIES -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionUses to search for correct itemstack in both hands.net.minecraft.world.InteractionResultonAirRightClick(net.minecraft.core.BlockPos start, net.minecraft.core.BlockPos end, net.minecraft.world.level.Level worldIn, net.minecraft.world.entity.player.Player playerIn, net.minecraft.world.item.ItemStack itemStack) Is called when player air-right-clicks with item.Methods inherited from class com.ldtteam.structurize.items.AbstractItemWithPosSelector
canAttackBlock, getBounds, getDestroySpeed, setBounds, use, useOnMethods inherited from class net.minecraft.world.item.Item
appendHoverText, asItem, builtInRegistryHolder, byBlock, byId, canFitInsideContainerItems, components, finishUsingItem, getAttackDamageBonus, getBarColor, getBarWidth, getBreakingSound, getCraftingRemainingItem, getDefaultAttributeModifiers, getDefaultInstance, getDefaultMaxStackSize, getDescription, getDescriptionId, getDescriptionId, getDrinkingSound, getEatingSound, getEnchantmentValue, getId, getName, getOrCreateDescriptionId, getPlayerPOVHitResult, getTooltipImage, getUseAnimation, getUseDuration, hasCraftingRemainingItem, hurtEnemy, initializeClient, interactLivingEntity, inventoryTick, isBarVisible, isComplex, isCorrectToolForDrops, isEnchantable, isFoil, isRepairable, isValidRepairItem, mineBlock, modifyDefaultComponentsFrom, onCraftedBy, onCraftedPostProcess, onDestroyed, onUseTick, overrideOtherStackedOnMe, overrideStackedOnOther, postHurtEnemy, releaseUsing, requiredFeatures, toString, useOnRelease, verifyComponentsAfterLoadMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.world.flag.FeatureElement
isEnabledMethods inherited from interface net.neoforged.neoforge.common.extensions.IItemExtension
applyEnchantments, canBeHurtBy, canContinueUsing, canDisableShield, canElytraFly, canEquip, canGrindstoneRepair, canPerformAction, canWalkOnPowderedSnow, createEntity, damageItem, doesSneakBypassUse, elytraFlightTick, getAllEnchantments, getArmorTexture, getBurnTime, getCraftingRemainingItem, getCreatorModId, getDamage, getDefaultAttributeModifiers, getEnchantmentLevel, getEnchantmentValue, getEntityLifespan, getEquipmentSlot, getFoodProperties, getHighlightTip, getMaxDamage, getMaxStackSize, getSweepHitBox, getXpRepairRatio, hasCraftingRemainingItem, hasCustomEntity, isBookEnchantable, isDamageable, isDamaged, isEnderMask, isNotReplaceableByPickAction, isPiglinCurrency, isPrimaryItemFor, makesPiglinsNeutral, onAnimalArmorTick, onDestroyed, onDroppedByPlayer, onEntityItemUpdate, onEntitySwing, onEntitySwing, onItemUseFirst, onLeftClickEntity, onStopUsing, setDamage, shouldCauseBlockBreakReset, shouldCauseReequipAnimation, supportsEnchantment
-
Constructor Details
-
ItemCaliper
public ItemCaliper()Caliper constructor. Sets max stack to 1, like other tools.
-
-
Method Details
-
getRegisteredItemInstance
Description copied from class:AbstractItemWithPosSelectorUses to search for correct itemstack in both hands.- Specified by:
getRegisteredItemInstancein classAbstractItemWithPosSelector- Returns:
- item reference from
ModItems
-
onAirRightClick
public net.minecraft.world.InteractionResult onAirRightClick(net.minecraft.core.BlockPos start, net.minecraft.core.BlockPos end, net.minecraft.world.level.Level worldIn, net.minecraft.world.entity.player.Player playerIn, net.minecraft.world.item.ItemStack itemStack) Description copied from class:AbstractItemWithPosSelectorIs called when player air-right-clicks with item.- Specified by:
onAirRightClickin classAbstractItemWithPosSelector- Parameters:
start- first posend- second posworldIn- event worldplayerIn- event player- Returns:
- event result, typically success
-