Package net.minecraft.world.level.block
Class BellBlock
java.lang.Object
net.minecraft.world.level.block.state.BlockBehaviour
net.minecraft.world.level.block.Block
net.minecraft.world.level.block.BaseEntityBlock
net.minecraft.world.level.block.BellBlock
- All Implemented Interfaces:
FeatureElement
,EntityBlock
,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 EnumProperty
<BellAttachType> private static final VoxelShape
static final com.mojang.serialization.MapCodec
<BellBlock> static final int
static final EnumProperty
<Direction> static final BooleanProperty
private static final VoxelShape
private static final Map
<Direction.Axis, VoxelShape> private static final Map
<Direction.Axis, VoxelShape> private static final Map
<Direction, VoxelShape> 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 TypeMethodDescriptionboolean
attemptToRing
(Entity pEntity, Level pLevel, BlockPos pPos, Direction pDirection) boolean
attemptToRing
(Level pLevel, BlockPos pPos, Direction pDirection) protected boolean
canSurvive
(BlockState pState, LevelReader pLevel, BlockPos pPos) com.mojang.serialization.MapCodec
<BellBlock> codec()
protected void
protected VoxelShape
getCollisionShape
(BlockState pState, BlockGetter pLevel, BlockPos pPos, CollisionContext pContext) private static Direction
getConnectedDirection
(BlockState pState) protected VoxelShape
getShape
(BlockState pState, BlockGetter pLevel, BlockPos pPos, CollisionContext pContext) getStateForPlacement
(BlockPlaceContext pContext) <T extends BlockEntity>
BlockEntityTicker<T> getTicker
(Level p_152194_, BlockState p_152195_, BlockEntityType<T> p_152196_) private VoxelShape
getVoxelShape
(BlockState pState) protected boolean
isPathfindable
(BlockState p_49717_, PathComputationType p_49720_) private boolean
isProperHit
(BlockState pPos, Direction pDirection, double pDistanceY) mirror
(BlockState p_304560_, Mirror p_304709_) Returns the blockstate with the given mirror of the passed blockstate.protected void
neighborChanged
(BlockState p_49729_, Level p_49730_, BlockPos p_49731_, Block p_49732_, Orientation p_363666_, boolean p_49734_) newBlockEntity
(BlockPos p_152198_, BlockState p_152199_) protected void
onExplosionHit
(BlockState p_311884_, ServerLevel p_362869_, BlockPos p_312717_, Explosion p_312800_, BiConsumer<ItemStack, BlockPos> p_312339_) boolean
onHit
(Level pLevel, BlockState pState, BlockHitResult pResult, Player pPlayer, boolean pCanRingBell) protected void
onProjectileHit
(Level pLevel, BlockState pState, BlockHitResult pHit, Projectile pProjectile) rotate
(BlockState p_304966_, Rotation p_304463_) Returns the blockstate with the given rotation from the passed blockstate.protected BlockState
updateShape
(BlockState p_49744_, LevelReader p_374108_, ScheduledTickAccess p_374552_, BlockPos p_49748_, Direction p_49745_, BlockPos p_49749_, BlockState p_49746_, RandomSource p_374282_) protected InteractionResult
useWithoutItem
(BlockState p_49722_, Level p_49723_, BlockPos p_49724_, Player p_49725_, BlockHitResult p_49727_) Methods inherited from class net.minecraft.world.level.block.BaseEntityBlock
createTickerHelper, getMenuProvider, triggerEvent
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, 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
affectNeighborsAfterRemoval, attack, canBeReplaced, canBeReplaced, defaultDestroyTime, defaultMapColor, entityInside, getAnalogOutputSignal, getBlockSupportShape, getCloneItemStack, getDescriptionId, getDestroyProgress, getDirectSignal, getDrops, getEntityInsideCollisionShape, getFluidState, getInteractionShape, getLightBlock, getLootTable, getMaxHorizontalOffset, getMaxVerticalOffset, getOcclusionShape, getRenderShape, getSeed, getShadeBrightness, getSignal, getSoundType, getVisualShape, hasAnalogOutputSignal, isAir, isCollisionShapeFullBlock, isRandomlyTicking, isSignalSource, onPlace, propagatesSkylightDown, properties, propertiesCodec, randomTick, requiredFeatures, simpleCodec, skipRendering, spawnAfterBreak, tick, 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.level.block.EntityBlock
getListener
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
-
FACING
-
ATTACHMENT
-
POWERED
-
BELL_SHAPE
-
SHAPE_CEILING
-
SHAPE_FLOOR
-
SHAPE_DOUBLE_WALL
-
SHAPE_SINGLE_WALL
-
EVENT_BELL_RING
public static final int EVENT_BELL_RING- See Also:
-
-
Constructor Details
-
BellBlock
-
-
Method Details
-
codec
- Specified by:
codec
in classBaseEntityBlock
-
neighborChanged
protected void neighborChanged(BlockState p_49729_, Level p_49730_, BlockPos p_49731_, Block p_49732_, @Nullable Orientation p_363666_, boolean p_49734_) - Overrides:
neighborChanged
in classBlockBehaviour
-
onProjectileHit
protected void onProjectileHit(Level pLevel, BlockState pState, BlockHitResult pHit, Projectile pProjectile) - Overrides:
onProjectileHit
in classBlockBehaviour
-
useWithoutItem
protected InteractionResult useWithoutItem(BlockState p_49722_, Level p_49723_, BlockPos p_49724_, Player p_49725_, BlockHitResult p_49727_) - Overrides:
useWithoutItem
in classBlockBehaviour
-
onHit
public boolean onHit(Level pLevel, BlockState pState, BlockHitResult pResult, @Nullable Player pPlayer, boolean pCanRingBell) -
isProperHit
- Returns:
- true if the bell can be rung from the given side and vertical position. For example, bells attached to their northern neighbor cannot be rung from the south face, since it can't swing north-south.
-
attemptToRing
-
attemptToRing
-
getVoxelShape
-
getCollisionShape
protected VoxelShape getCollisionShape(BlockState pState, BlockGetter pLevel, BlockPos pPos, CollisionContext pContext) - Overrides:
getCollisionShape
in classBlockBehaviour
-
getShape
protected VoxelShape getShape(BlockState pState, BlockGetter pLevel, BlockPos pPos, CollisionContext pContext) - Overrides:
getShape
in classBlockBehaviour
-
getStateForPlacement
- Overrides:
getStateForPlacement
in classBlock
-
onExplosionHit
protected void onExplosionHit(BlockState p_311884_, ServerLevel p_362869_, BlockPos p_312717_, Explosion p_312800_, BiConsumer<ItemStack, BlockPos> p_312339_) - Overrides:
onExplosionHit
in classBlockBehaviour
-
updateShape
protected BlockState updateShape(BlockState p_49744_, LevelReader p_374108_, ScheduledTickAccess p_374552_, BlockPos p_49748_, Direction p_49745_, BlockPos p_49749_, BlockState p_49746_, RandomSource p_374282_) - Overrides:
updateShape
in classBlockBehaviour
-
canSurvive
- Overrides:
canSurvive
in classBlockBehaviour
-
getConnectedDirection
-
createBlockStateDefinition
- Overrides:
createBlockStateDefinition
in classBlock
-
newBlockEntity
-
getTicker
@Nullable public <T extends BlockEntity> BlockEntityTicker<T> getTicker(Level p_152194_, BlockState p_152195_, BlockEntityType<T> p_152196_) -
isPathfindable
- Overrides:
isPathfindable
in classBlockBehaviour
-
rotate
Description copied from class:BlockBehaviour
Returns the blockstate with the given rotation from the passed blockstate. If inapplicable, returns the passed blockstate.- Overrides:
rotate
in classBlockBehaviour
-
mirror
Description copied from class:BlockBehaviour
Returns the blockstate with the given mirror of the passed blockstate. If inapplicable, returns the passed blockstate.- Overrides:
mirror
in classBlockBehaviour
-