Package net.minecraft.world.level.block
Class LeverBlock
- All Implemented Interfaces:
FeatureElement
,ItemLike
,IBlockExtension
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.level.block.Block
Block.ShapePairKey
Nested classes/interfaces inherited from class net.minecraft.world.level.block.state.BlockBehaviour
BlockBehaviour.BlockStateBase, BlockBehaviour.OffsetFunction, BlockBehaviour.OffsetType, BlockBehaviour.Properties, BlockBehaviour.StateArgumentPredicate<A>, BlockBehaviour.StatePredicate
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec
<LeverBlock> static final BooleanProperty
private final Function
<BlockState, VoxelShape> Fields inherited from class net.minecraft.world.level.block.FaceAttachedHorizontalDirectionalBlock
FACE
Fields inherited from class net.minecraft.world.level.block.HorizontalDirectionalBlock
FACING
Fields inherited from class net.minecraft.world.level.block.Block
BLOCK_STATE_REGISTRY, INDESTRUCTIBLE, INSTANT, stateDefinition, UPDATE_ALL, UPDATE_ALL_IMMEDIATE, UPDATE_CLIENTS, UPDATE_IMMEDIATE, UPDATE_INVISIBLE, UPDATE_KNOWN_SHAPE, UPDATE_LIMIT, UPDATE_MOVE_BY_PISTON, UPDATE_NEIGHBORS, UPDATE_NONE, UPDATE_SKIP_ALL_SIDEEFFECTS, UPDATE_SKIP_BLOCK_ENTITY_SIDEEFFECTS, UPDATE_SKIP_ON_PLACE, UPDATE_SKIP_SHAPE_UPDATE_ON_WIRE, UPDATE_SUPPRESS_DROPS
Fields inherited from class net.minecraft.world.level.block.state.BlockBehaviour
descriptionId, drops, dynamicShape, explosionResistance, friction, hasCollision, isRandomlyTicking, jumpFactor, properties, requiredFeatures, soundType, speedFactor, UPDATE_SHAPE_ORDER
Fields inherited from interface net.minecraft.world.flag.FeatureElement
FILTERED_REGISTRIES
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
affectNeighborsAfterRemoval
(BlockState p_394661_, ServerLevel p_394153_, BlockPos p_394342_, boolean p_393487_) void
animateTick
(BlockState p_221395_, Level p_221396_, BlockPos p_221397_, RandomSource p_221398_) com.mojang.serialization.MapCodec
<LeverBlock> codec()
protected void
protected int
getDirectSignal
(BlockState p_54670_, BlockGetter p_54671_, BlockPos p_54672_, Direction p_54673_) protected VoxelShape
getShape
(BlockState p_54665_, BlockGetter p_54666_, BlockPos p_54667_, CollisionContext p_54668_) protected int
getSignal
(BlockState p_54635_, BlockGetter p_54636_, BlockPos p_54637_, Direction p_54638_) protected boolean
isSignalSource
(BlockState p_54675_) private static void
makeParticle
(BlockState p_54658_, LevelAccessor p_54659_, BlockPos p_54660_, float p_54661_) private Function
<BlockState, VoxelShape> protected void
onExplosionHit
(BlockState p_312405_, ServerLevel p_361347_, BlockPos p_311795_, Explosion p_312090_, BiConsumer<ItemStack, BlockPos> p_312313_) protected static void
playSound
(Player p_346119_, LevelAccessor p_346020_, BlockPos p_345585_, BlockState p_346002_) void
pull
(BlockState p_54677_, Level p_54678_, BlockPos p_54679_, Player p_344918_) private void
updateNeighbours
(BlockState p_54681_, Level p_54682_, BlockPos p_54683_) protected InteractionResult
useWithoutItem
(BlockState p_54640_, Level p_54641_, BlockPos p_54642_, Player p_54643_, BlockHitResult p_54645_) Methods inherited from class net.minecraft.world.level.block.FaceAttachedHorizontalDirectionalBlock
canAttach, canSurvive, getConnectedDirection, getStateForPlacement, updateShape
Methods inherited from class net.minecraft.world.level.block.HorizontalDirectionalBlock
mirror, rotate
Methods inherited from class net.minecraft.world.level.block.Block
asBlock, asItem, box, boxes, boxZ, boxZ, boxZ, builtInRegistryHolder, byItem, canSupportCenter, canSupportRigidBlock, column, column, cube, cube, defaultBlockState, destroy, dropFromExplosion, dropResources, dropResources, dropResources, fallOn, getDrops, getDrops, getExplosionResistance, getFriction, getId, getJumpFactor, getName, getShapeForEachState, getShapeForEachState, getSpeedFactor, getStateDefinition, handlePrecipitation, hasDynamicShape, isExceptionForConnection, isFaceFull, isPossibleToRespawnInThis, isShapeFullBlock, playerDestroy, playerWillDestroy, popExperience, popResource, popResourceFromFace, pushEntitiesUp, registerDefaultState, setPlacedBy, shouldRenderFace, shouldRenderFace, spawnDestroyParticles, stateById, stepOn, toString, tryDropExperience, updateEntityMovementAfterFallOn, updateFromNeighbourShapes, updateOrDestroy, updateOrDestroy, wasExploded, withPropertiesOf
Methods inherited from class net.minecraft.world.level.block.state.BlockBehaviour
attack, canBeReplaced, canBeReplaced, defaultDestroyTime, defaultMapColor, entityInside, getAnalogOutputSignal, getBlockSupportShape, getCloneItemStack, getCollisionShape, getDescriptionId, getDestroyProgress, getDrops, getEntityInsideCollisionShape, getFluidState, getInteractionShape, getLightBlock, getLootTable, getMaxHorizontalOffset, getMaxVerticalOffset, getMenuProvider, getOcclusionShape, getRenderShape, getSeed, getShadeBrightness, getSoundType, getVisualShape, hasAnalogOutputSignal, isAir, isCollisionShapeFullBlock, isPathfindable, isRandomlyTicking, neighborChanged, onPlace, onProjectileHit, propagatesSkylightDown, properties, propertiesCodec, randomTick, requiredFeatures, simpleCodec, skipRendering, spawnAfterBreak, tick, triggerEvent, updateIndirectNeighbourShapes, useItemOn, useShapeForLightOcclusion
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minecraft.world.flag.FeatureElement
isEnabled
Methods inherited from interface net.neoforged.neoforge.common.extensions.IBlockExtension
addLandingEffects, addRunningEffects, canBeHydrated, canConnectRedstone, canDropFromExplosion, canEntityDestroy, canHarvestBlock, canStickTo, canSustainPlant, collisionExtendsVertically, getAdjacentBlockPathType, getAppearance, getBeaconColorMultiplier, getBedDirection, getBlockPathType, getBubbleColumnDirection, getCloneItemStack, getEnchantPowerBonus, getExpDrop, getExplosionResistance, getFireSpreadSpeed, getFlammability, getFriction, getLightEmission, getMapColor, getPistonPushReaction, getRespawnPosition, getSoundType, getStateAtViewpoint, getToolModifiedState, getWeakChanges, hasDynamicLightEmission, hidesNeighborFace, isBed, isBurning, isConduitFrame, isEmpty, isFertile, isFireSource, isFlammable, isLadder, isPortalFrame, isScaffolding, isSlimeBlock, isStickyBlock, makesOpenTrapdoorAboveClimbable, onBlockExploded, onBlockStateChange, onCaughtFire, onDestroyedByPlayer, onDestroyedByPushReaction, onNeighborChange, onTreeGrow, playFallSound, playStepSound, rotate, setBedOccupied, shouldCheckWeakPower, shouldDisplayFluidOverlay, shouldHideAdjacentFluidFace, supportsExternalFaceHiding
-
Field Details
-
CODEC
-
POWERED
-
shapes
-
-
Constructor Details
-
LeverBlock
-
-
Method Details
-
codec
- Specified by:
codec
in classFaceAttachedHorizontalDirectionalBlock
-
makeShapes
-
getShape
protected VoxelShape getShape(BlockState p_54665_, BlockGetter p_54666_, BlockPos p_54667_, CollisionContext p_54668_) - Overrides:
getShape
in classBlockBehaviour
-
useWithoutItem
protected InteractionResult useWithoutItem(BlockState p_54640_, Level p_54641_, BlockPos p_54642_, Player p_54643_, BlockHitResult p_54645_) - Overrides:
useWithoutItem
in classBlockBehaviour
-
onExplosionHit
protected void onExplosionHit(BlockState p_312405_, ServerLevel p_361347_, BlockPos p_311795_, Explosion p_312090_, BiConsumer<ItemStack, BlockPos> p_312313_) - Overrides:
onExplosionHit
in classBlockBehaviour
-
pull
public void pull(BlockState p_54677_, Level p_54678_, BlockPos p_54679_, @Nullable Player p_344918_) -
playSound
protected static void playSound(@Nullable Player p_346119_, LevelAccessor p_346020_, BlockPos p_345585_, BlockState p_346002_) -
makeParticle
private static void makeParticle(BlockState p_54658_, LevelAccessor p_54659_, BlockPos p_54660_, float p_54661_) -
animateTick
public void animateTick(BlockState p_221395_, Level p_221396_, BlockPos p_221397_, RandomSource p_221398_) - Overrides:
animateTick
in classBlock
-
affectNeighborsAfterRemoval
protected void affectNeighborsAfterRemoval(BlockState p_394661_, ServerLevel p_394153_, BlockPos p_394342_, boolean p_393487_) - Overrides:
affectNeighborsAfterRemoval
in classBlockBehaviour
-
getSignal
protected int getSignal(BlockState p_54635_, BlockGetter p_54636_, BlockPos p_54637_, Direction p_54638_) - Overrides:
getSignal
in classBlockBehaviour
-
getDirectSignal
protected int getDirectSignal(BlockState p_54670_, BlockGetter p_54671_, BlockPos p_54672_, Direction p_54673_) - Overrides:
getDirectSignal
in classBlockBehaviour
-
isSignalSource
- Overrides:
isSignalSource
in classBlockBehaviour
-
updateNeighbours
-
createBlockStateDefinition
- Overrides:
createBlockStateDefinition
in classBlock
-