Package net.minecraft.world.level.block
Class ObserverBlock
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.ObserverBlock
- All Implemented Interfaces:
FeatureElement,ItemLike,IBlockExtension
-
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 TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<ObserverBlock> static final BooleanPropertyFields 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_ALL_SIDEEFFECTS, UPDATE_SKIP_BLOCK_ENTITY_SIDEEFFECTS, UPDATE_SKIP_ON_PLACE, 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 TypeMethodDescriptionprotected voidaffectNeighborsAfterRemoval(BlockState p_393998_, ServerLevel p_394664_, BlockPos p_394449_, boolean p_394257_) com.mojang.serialization.MapCodec<ObserverBlock> codec()protected voidprotected intgetDirectSignal(BlockState pBlockState, BlockGetter pBlockAccess, BlockPos pPos, Direction pSide) Returns the direct signal this block emits in the given direction.protected intgetSignal(BlockState pBlockState, BlockGetter pBlockAccess, BlockPos pPos, Direction pSide) Returns the signal this block emits in the given direction.getStateForPlacement(BlockPlaceContext pContext) protected booleanisSignalSource(BlockState pState) Returns whether this block is capable of emitting redstone signals.protected BlockStatemirror(BlockState pState, Mirror pMirror) Returns the blockstate with the given mirror of the passed blockstate.protected voidonPlace(BlockState pState, Level pLevel, BlockPos pPos, BlockState pOldState, boolean pIsMoving) protected BlockStaterotate(BlockState pState, Rotation pRot) Returns the blockstate with the given rotation from the passed blockstate.private voidstartSignal(LevelReader pLevel, ScheduledTickAccess pScheduledTickAccess, BlockPos pPos) protected voidtick(BlockState p_221840_, ServerLevel p_221841_, BlockPos p_221842_, RandomSource p_221843_) protected voidupdateNeighborsInFront(Level pLevel, BlockPos pPos, BlockState pState) protected BlockStateupdateShape(BlockState p_55118_, LevelReader p_374557_, ScheduledTickAccess p_374458_, BlockPos p_55122_, Direction p_55119_, BlockPos p_55123_, BlockState p_55120_, RandomSource p_374161_) Methods inherited from class net.minecraft.world.level.block.Block
animateTick, asBlock, asItem, box, boxes, boxZ, boxZ, boxZ, builtInRegistryHolder, byItem, canSupportCenter, canSupportRigidBlock, column, column, cube, cube, defaultBlockState, destroy, dropFromBlockInteractLootTable, dropFromExplosion, dropFromLootTable, 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, 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, getFluidState, getInteractionShape, getLightBlock, getLootTable, getMaxHorizontalOffset, getMaxVerticalOffset, getMenuProvider, getOcclusionShape, getRenderShape, getSeed, getShadeBrightness, getShape, getSoundType, getVisualShape, hasAnalogOutputSignal, isAir, isCollisionShapeFullBlock, isPathfindable, isRandomlyTicking, neighborChanged, onExplosionHit, onProjectileHit, propagatesSkylightDown, properties, propertiesCodec, randomTick, requiredFeatures, shouldChangedStateKeepBlockEntity, 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, ignitedByLava, 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
-
-
Constructor Details
-
ObserverBlock
-
-
Method Details
-
codec
- Specified by:
codecin classDirectionalBlock
-
createBlockStateDefinition
- Overrides:
createBlockStateDefinitionin classBlock
-
rotate
Description copied from class:BlockBehaviourReturns the blockstate with the given rotation from the passed blockstate. If inapplicable, returns the passed blockstate.- Overrides:
rotatein classBlockBehaviour
-
mirror
Description copied from class:BlockBehaviourReturns the blockstate with the given mirror of the passed blockstate. If inapplicable, returns the passed blockstate.- Overrides:
mirrorin classBlockBehaviour
-
tick
protected void tick(BlockState p_221840_, ServerLevel p_221841_, BlockPos p_221842_, RandomSource p_221843_) - Overrides:
tickin classBlockBehaviour
-
updateShape
protected BlockState updateShape(BlockState p_55118_, LevelReader p_374557_, ScheduledTickAccess p_374458_, BlockPos p_55122_, Direction p_55119_, BlockPos p_55123_, BlockState p_55120_, RandomSource p_374161_) - Overrides:
updateShapein classBlockBehaviour
-
startSignal
private void startSignal(LevelReader pLevel, ScheduledTickAccess pScheduledTickAccess, BlockPos pPos) -
updateNeighborsInFront
-
isSignalSource
Description copied from class:BlockBehaviourReturns whether this block is capable of emitting redstone signals.- Overrides:
isSignalSourcein classBlockBehaviour
-
getDirectSignal
protected int getDirectSignal(BlockState pBlockState, BlockGetter pBlockAccess, BlockPos pPos, Direction pSide) 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
-
getSignal
protected int getSignal(BlockState pBlockState, BlockGetter pBlockAccess, BlockPos pPos, Direction pSide) 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
-
onPlace
protected void onPlace(BlockState pState, Level pLevel, BlockPos pPos, BlockState pOldState, boolean pIsMoving) - Overrides:
onPlacein classBlockBehaviour
-
affectNeighborsAfterRemoval
protected void affectNeighborsAfterRemoval(BlockState p_393998_, ServerLevel p_394664_, BlockPos p_394449_, boolean p_394257_) - Overrides:
affectNeighborsAfterRemovalin classBlockBehaviour
-
getStateForPlacement
- Overrides:
getStateForPlacementin classBlock
-