Package net.minecraft.world.level.block
Class LightningRodBlock
java.lang.Object
net.minecraft.world.level.block.state.BlockBehaviour
net.minecraft.world.level.block.Block
net.minecraft.world.level.block.DirectionalBlock
net.minecraft.world.level.block.RodBlock
net.minecraft.world.level.block.LightningRodBlock
- All Implemented Interfaces:
FeatureElement,BucketPickup,LiquidBlockContainer,SimpleWaterloggedBlock,ItemLike,IBlockExtension,IBucketPickupExtension
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.level.block.Block
Block.ShapePairKeyNested 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 TypeFieldDescriptionprivate static final intstatic final com.mojang.serialization.MapCodec<LightningRodBlock> static final BooleanPropertystatic final intprivate static final intstatic final BooleanPropertyFields inherited from class net.minecraft.world.level.block.RodBlock
AABB_MAX, AABB_MIN, X_AXIS_AABB, Y_AXIS_AABB, Z_AXIS_AABBFields inherited from class net.minecraft.world.level.block.DirectionalBlock
FACINGFields 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_SHAPE_UPDATE_ON_WIRE, UPDATE_SUPPRESS_DROPSFields inherited from class net.minecraft.world.level.block.state.BlockBehaviour
descriptionId, drops, dynamicShape, explosionResistance, friction, hasCollision, isRandomlyTicking, jumpFactor, properties, requiredFeatures, soundType, speedFactor, UPDATE_SHAPE_ORDERFields inherited from interface net.minecraft.world.flag.FeatureElement
FILTERED_REGISTRIES -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidanimateTick(BlockState p_221405_, Level p_221406_, BlockPos p_221407_, RandomSource p_221408_) Called periodically clientside on blocks near the player to show effects (like furnace fire particles).com.mojang.serialization.MapCodec<LightningRodBlock> codec()protected voidprotected intgetDirectSignal(BlockState p_153748_, BlockGetter p_153749_, BlockPos p_153750_, Direction p_153751_) Returns the direct signal this block emits in the given direction.protected FluidStategetFluidState(BlockState p_153759_) protected intgetSignal(BlockState p_153723_, BlockGetter p_153724_, BlockPos p_153725_, Direction p_153726_) Returns the signal this block emits in the given direction.getStateForPlacement(BlockPlaceContext p_153711_) protected booleanisSignalSource(BlockState p_153769_) Returns whether this block is capable of emitting redstone signals.voidonLightningStrike(BlockState pState, Level pLevel, BlockPos pPos) protected voidonPlace(BlockState p_153753_, Level p_153754_, BlockPos p_153755_, BlockState p_153756_, boolean p_153757_) protected voidonRemove(BlockState p_153728_, Level p_153729_, BlockPos p_153730_, BlockState p_153731_, boolean p_153732_) protected voidtick(BlockState p_221400_, ServerLevel p_221401_, BlockPos p_221402_, RandomSource p_221403_) private voidupdateNeighbours(BlockState pState, Level pLevel, BlockPos pPos) protected BlockStateupdateShape(BlockState p_153739_, LevelReader p_374261_, ScheduledTickAccess p_374456_, BlockPos p_153743_, Direction p_153740_, BlockPos p_153744_, BlockState p_153741_, RandomSource p_374086_) Methods inherited from class net.minecraft.world.level.block.RodBlock
getShape, isPathfindable, mirror, rotateMethods inherited from class net.minecraft.world.level.block.Block
appendHoverText, asBlock, asItem, box, builtInRegistryHolder, byItem, canSupportCenter, canSupportRigidBlock, defaultBlockState, destroy, dropFromExplosion, dropResources, dropResources, dropResources, fallOn, getDrops, getDrops, getExplosionResistance, getFriction, getId, getJumpFactor, getName, 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, withPropertiesOfMethods inherited from class net.minecraft.world.level.block.state.BlockBehaviour
attack, canBeReplaced, canBeReplaced, canSurvive, defaultDestroyTime, defaultMapColor, entityInside, getAnalogOutputSignal, getBlockSupportShape, getCloneItemStack, getCollisionShape, getDescriptionId, getDestroyProgress, getDrops, getEntityInsideCollisionShape, getInteractionShape, getLightBlock, getLootTable, getMaxHorizontalOffset, getMaxVerticalOffset, getMenuProvider, getOcclusionShape, getRenderShape, getSeed, getShadeBrightness, getSoundType, getVisualShape, hasAnalogOutputSignal, isAir, isCollisionShapeFullBlock, isRandomlyTicking, neighborChanged, onExplosionHit, onProjectileHit, propagatesSkylightDown, properties, propertiesCodec, randomTick, requiredFeatures, simpleCodec, skipRendering, spawnAfterBreak, triggerEvent, updateIndirectNeighbourShapes, useItemOn, useShapeForLightOcclusion, useWithoutItemMethods 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.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, rotate, setBedOccupied, shouldCheckWeakPower, shouldDisplayFluidOverlay, shouldHideAdjacentFluidFace, supportsExternalFaceHidingMethods inherited from interface net.neoforged.neoforge.common.extensions.IBucketPickupExtension
getPickupSoundMethods inherited from interface net.minecraft.world.level.block.SimpleWaterloggedBlock
canPlaceLiquid, getPickupSound, pickupBlock, placeLiquid
-
Field Details
-
CODEC
-
WATERLOGGED
-
POWERED
-
ACTIVATION_TICKS
private static final int ACTIVATION_TICKS- See Also:
-
RANGE
public static final int RANGE- See Also:
-
SPARK_CYCLE
private static final int SPARK_CYCLE- See Also:
-
-
Constructor Details
-
LightningRodBlock
-
-
Method Details
-
codec
-
getStateForPlacement
- Overrides:
getStateForPlacementin classBlock
-
updateShape
protected BlockState updateShape(BlockState p_153739_, LevelReader p_374261_, ScheduledTickAccess p_374456_, BlockPos p_153743_, Direction p_153740_, BlockPos p_153744_, BlockState p_153741_, RandomSource p_374086_) - Overrides:
updateShapein classBlockBehaviour
-
getFluidState
- Overrides:
getFluidStatein classBlockBehaviour
-
getSignal
protected int getSignal(BlockState p_153723_, BlockGetter p_153724_, BlockPos p_153725_, Direction p_153726_) Description copied from class:BlockBehaviourReturns the signal this block emits in the given direction.NOTE: directions in redstone signal related methods are backwards, so this method checks for the signal emitted in the opposite direction of the one given.
- Overrides:
getSignalin classBlockBehaviour
-
getDirectSignal
protected int getDirectSignal(BlockState p_153748_, BlockGetter p_153749_, BlockPos p_153750_, Direction p_153751_) Description copied from class:BlockBehaviourReturns the direct signal this block emits in the given direction.NOTE: directions in redstone signal related methods are backwards, so this method checks for the signal emitted in the opposite direction of the one given.
- Overrides:
getDirectSignalin classBlockBehaviour
-
onLightningStrike
-
updateNeighbours
-
tick
protected void tick(BlockState p_221400_, ServerLevel p_221401_, BlockPos p_221402_, RandomSource p_221403_) - Overrides:
tickin classBlockBehaviour
-
animateTick
public void animateTick(BlockState p_221405_, Level p_221406_, BlockPos p_221407_, RandomSource p_221408_) Description copied from class:BlockCalled periodically clientside on blocks near the player to show effects (like furnace fire particles).- Overrides:
animateTickin classBlock
-
onRemove
protected void onRemove(BlockState p_153728_, Level p_153729_, BlockPos p_153730_, BlockState p_153731_, boolean p_153732_) - Overrides:
onRemovein classBlockBehaviour
-
onPlace
protected void onPlace(BlockState p_153753_, Level p_153754_, BlockPos p_153755_, BlockState p_153756_, boolean p_153757_) - Overrides:
onPlacein classBlockBehaviour
-
createBlockStateDefinition
- Overrides:
createBlockStateDefinitionin classBlock
-
isSignalSource
Description copied from class:BlockBehaviourReturns whether this block is capable of emitting redstone signals.- Overrides:
isSignalSourcein classBlockBehaviour
-