Package net.minecraft.block
Class BellBlock
java.lang.Object
net.minecraft.block.AbstractBlock
net.minecraft.block.Block
net.minecraft.block.BlockWithEntity
net.minecraft.block.BellBlock
- All Implemented Interfaces:
BlockEntityProvider
,ItemConvertible
public class BellBlock extends BlockWithEntity
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.block.Block
Block.NeighborGroup
Nested classes/interfaces inherited from class net.minecraft.block.AbstractBlock
AbstractBlock.AbstractBlockState, AbstractBlock.ContextPredicate, AbstractBlock.OffsetType, AbstractBlock.Settings, AbstractBlock.TypedContextPredicate<A>
-
Field Summary
Fields Modifier and Type Field Description static EnumProperty<Attachment>
ATTACHMENT
private static VoxelShape
BELL_LIP_SHAPE
private static VoxelShape
BELL_SHAPE
private static VoxelShape
BELL_WAIST_SHAPE
private static VoxelShape
EAST_WALL_SHAPE
private static VoxelShape
EAST_WEST_SHAPE
private static VoxelShape
EAST_WEST_WALLS_SHAPE
static DirectionProperty
FACING
private static VoxelShape
HANGING_SHAPE
private static VoxelShape
NORTH_SOUTH_SHAPE
private static VoxelShape
NORTH_SOUTH_WALLS_SHAPE
private static VoxelShape
NORTH_WALL_SHAPE
static BooleanProperty
POWERED
private static VoxelShape
SOUTH_WALL_SHAPE
private static VoxelShape
WEST_WALL_SHAPE
Fields inherited from class net.minecraft.block.Block
LOGGER, STATE_IDS, stateManager
Fields inherited from class net.minecraft.block.AbstractBlock
collidable, dynamicBounds, FACINGS, jumpVelocityMultiplier, lootTableId, material, randomTicks, resistance, settings, slipperiness, soundGroup, velocityMultiplier
-
Constructor Summary
Constructors Constructor Description BellBlock(AbstractBlock.Settings settings)
-
Method Summary
Methods inherited from class net.minecraft.block.BlockWithEntity
createScreenHandlerFactory, onSyncedBlockEvent
Methods inherited from class net.minecraft.block.Block
addStacksForDisplay, afterBreak, appendTooltip, asBlock, asItem, canMobSpawnInside, cannotConnect, createCuboidShape, dropExperience, dropStack, dropStacks, dropStacks, dropStacks, getBlastResistance, getBlockFromItem, getDefaultState, getDroppedStacks, getDroppedStacks, getJumpVelocityMultiplier, getName, getPickStack, getRawIdFromState, getSlipperiness, getSoundGroup, getStateFromRawId, getStateManager, getTranslationKey, getVelocityMultiplier, hasDynamicBounds, hasRandomTicks, hasTopRim, is, isFaceFullSquare, isIn, isShapeFullCube, isTranslucent, onBreak, onBroken, onDestroyedByExplosion, onEntityLand, onLandedUpon, onPlaced, onSteppedOn, postProcessState, pushEntitiesUpBeforeBlockChange, rainTick, randomDisplayTick, replace, replace, setDefaultState, shouldDrawSide, shouldDropItemsOnExplosion, sideCoversSmallSquare, toString
Methods inherited from class net.minecraft.block.AbstractBlock
calcBlockBreakingDelta, canBucketPlace, canReplace, emitsRedstonePower, getAmbientOcclusionLightLevel, getComparatorOutput, getCullingShape, getDefaultMaterialColor, getDroppedStacks, getFluidState, getLootTableId, getOffsetType, getOpacity, getRaycastShape, getRenderingSeed, getSidesShape, getStrongRedstonePower, getVisualShape, getWeakRedstonePower, hasBlockEntity, hasComparatorOutput, hasSidedTransparency, isSideInvisible, mirror, onBlockAdded, onBlockBreakStart, onEntityCollision, onStacksDropped, onStateReplaced, prepare, randomTick, rotate, scheduledTick
-
Field Details
-
FACING
-
ATTACHMENT
-
POWERED
-
NORTH_SOUTH_SHAPE
-
EAST_WEST_SHAPE
-
BELL_WAIST_SHAPE
-
BELL_LIP_SHAPE
-
BELL_SHAPE
-
NORTH_SOUTH_WALLS_SHAPE
-
EAST_WEST_WALLS_SHAPE
-
WEST_WALL_SHAPE
-
EAST_WALL_SHAPE
-
NORTH_WALL_SHAPE
-
SOUTH_WALL_SHAPE
-
HANGING_SHAPE
-
-
Constructor Details
-
BellBlock
-
-
Method Details
-
neighborUpdate
public void neighborUpdate(BlockState state, World world, BlockPos pos, Block block, BlockPos fromPos, boolean notify)- Overrides:
neighborUpdate
in classAbstractBlock
-
onProjectileHit
public void onProjectileHit(World world, BlockState state, BlockHitResult hit, ProjectileEntity projectile)- Overrides:
onProjectileHit
in classAbstractBlock
-
onUse
public ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit)Called when this block is used by a player. This, by default, is bound to using the right mouse button.This method is called on both the logical client and logical server, so take caution when overriding this method. The logical side can be checked using
world.isClient()
.If the action result is successful on a logical client, then the action will be sent to the logical server for processing.
- Overrides:
onUse
in classAbstractBlock
- Returns:
- an action result that specifies if using the block was successful.
-
ring
public boolean ring(World world, BlockState state, BlockHitResult blockHitResult, @Nullable PlayerEntity playerEntity, boolean bool) -
isPointOnBell
-
ring
-
getShape
-
getCollisionShape
public VoxelShape getCollisionShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context)- Overrides:
getCollisionShape
in classAbstractBlock
-
getOutlineShape
public VoxelShape getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context)- Overrides:
getOutlineShape
in classAbstractBlock
-
getRenderType
- Overrides:
getRenderType
in classBlockWithEntity
-
getPlacementState
- Overrides:
getPlacementState
in classBlock
-
getStateForNeighborUpdate
public BlockState getStateForNeighborUpdate(BlockState state, Direction direction, BlockState newState, WorldAccess world, BlockPos pos, BlockPos posFrom)- Overrides:
getStateForNeighborUpdate
in classAbstractBlock
-
canPlaceAt
- Overrides:
canPlaceAt
in classAbstractBlock
-
getPlacementSide
-
getPistonBehavior
- Overrides:
getPistonBehavior
in classAbstractBlock
-
appendProperties
- Overrides:
appendProperties
in classBlock
-
createBlockEntity
-