Class ItemBlockCable
java.lang.Object
net.minecraft.world.item.Item
net.minecraft.world.item.BlockItem
org.cyclops.integrateddynamics.item.ItemBlockCable
- All Implemented Interfaces:
net.minecraft.world.flag.FeatureElement,net.minecraft.world.level.ItemLike,net.neoforged.neoforge.common.extensions.IItemExtension
public class ItemBlockCable
extends net.minecraft.world.item.BlockItem
The item for the cable.
-
Nested Class Summary
Nested ClassesNested 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, APPROXIMATELY_INFINITE_USE_DURATION, BASE_ATTACK_DAMAGE_ID, BASE_ATTACK_SPEED_ID, BY_BLOCK, canCombineRepair, CODEC, DEFAULT_MAX_STACK_SIZE, descriptionId, MAX_BAR_WIDTH, STREAM_CODECFields inherited from interface net.minecraft.world.flag.FeatureElement
FILTERED_REGISTRIES -
Constructor Summary
ConstructorsConstructorDescriptionItemBlockCable(net.minecraft.world.level.block.Block block, net.minecraft.world.item.Item.Properties builder) -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddUseAction(ItemBlockCable.IUseAction useAction) Register a use action for the cable item.protected voidafterItemUse(net.minecraft.world.item.context.UseOnContext context, net.minecraft.core.BlockPos pos, BlockCable blockCable, boolean calledSuper) protected booleanattempItemUseTarget(net.minecraft.world.item.context.UseOnContext context, net.minecraft.core.BlockPos pos, net.minecraft.core.Direction side, BlockCable blockCable, boolean offsetAdded) protected booleancanPlace(net.minecraft.world.item.context.BlockPlaceContext context, net.minecraft.world.level.block.state.BlockState blockState) protected booleancheckCableAt(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos, net.minecraft.core.Direction side) static voidplayBreakSound(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState blockState) static voidplayPlaceSound(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos) net.minecraft.world.InteractionResultuseOn(net.minecraft.world.item.context.UseOnContext context) Methods inherited from class net.minecraft.world.item.BlockItem
canFitInsideContainerItems, getBlock, getPlacementState, getPlaceSound, getPlaceSound, mustSurvive, onDestroyed, place, placeBlock, registerBlocks, requiredFeatures, setBlockEntityData, shouldPrintOpWarning, updateCustomBlockEntityTag, updateCustomBlockEntityTag, updatePlacementContextMethods inherited from class net.minecraft.world.item.Item
appendHoverText, asItem, builtInRegistryHolder, byBlock, byId, canDestroyBlock, components, finishUsingItem, getAttackDamageBonus, getBarColor, getBarWidth, getCraftingRemainder, getDamageSource, getDefaultInstance, getDefaultMaxStackSize, getDescriptionId, getDestroySpeed, getId, getName, getName, getPlayerPOVHitResult, getTooltipImage, getUseAnimation, getUseDuration, hurtEnemy, interactLivingEntity, inventoryTick, isBarVisible, isCombineRepairable, isCorrectToolForDrops, isFoil, mineBlock, modifyDefaultComponentsFrom, onCraftedBy, onCraftedPostProcess, onUseTick, overrideOtherStackedOnMe, overrideStackedOnOther, postHurtEnemy, releaseUsing, toString, use, 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, canEquip, canGrindstoneRepair, canPerformAction, canWalkOnPowderedSnow, createEntity, damageItem, doesSneakBypassUse, getAllEnchantments, getBurnTime, getCraftingRemainder, getCreatorModId, getDamage, getDefaultAttributeModifiers, getEnchantmentLevel, getEntityLifespan, getEquipmentSlot, getHighlightTip, getMaxDamage, getMaxStackSize, getSweepHitBox, getXpRepairRatio, hasCustomEntity, isDamageable, isDamaged, isGazeDisguise, isNotReplaceableByPickAction, isPiglinCurrency, isPrimaryItemFor, makesPiglinsNeutral, onAnimalArmorTick, onDestroyed, onDroppedByPlayer, onEntityItemUpdate, onEntitySwing, onItemUseFirst, onLeftClickEntity, onStopUsing, setDamage, shouldCauseBlockBreakReset, shouldCauseReequipAnimation, supportsEnchantment
-
Constructor Details
-
ItemBlockCable
public ItemBlockCable(net.minecraft.world.level.block.Block block, net.minecraft.world.item.Item.Properties builder)
-
-
Method Details
-
addUseAction
Register a use action for the cable item.- Parameters:
useAction- The use action.
-
checkCableAt
protected boolean checkCableAt(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos, @Nullable net.minecraft.core.Direction side) -
canPlace
protected boolean canPlace(net.minecraft.world.item.context.BlockPlaceContext context, net.minecraft.world.level.block.state.BlockState blockState) - Overrides:
canPlacein classnet.minecraft.world.item.BlockItem
-
attempItemUseTarget
protected boolean attempItemUseTarget(net.minecraft.world.item.context.UseOnContext context, net.minecraft.core.BlockPos pos, net.minecraft.core.Direction side, BlockCable blockCable, boolean offsetAdded) -
afterItemUse
protected void afterItemUse(net.minecraft.world.item.context.UseOnContext context, net.minecraft.core.BlockPos pos, BlockCable blockCable, boolean calledSuper) -
playPlaceSound
public static void playPlaceSound(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos) -
playBreakSound
public static void playBreakSound(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState blockState) -
useOn
public net.minecraft.world.InteractionResult useOn(net.minecraft.world.item.context.UseOnContext context) - Overrides:
useOnin classnet.minecraft.world.item.BlockItem
-