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.NeighborGroupNested 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>ATTACHMENTprivate static VoxelShapeBELL_LIP_SHAPEprivate static VoxelShapeBELL_SHAPEprivate static VoxelShapeBELL_WAIST_SHAPEprivate static VoxelShapeEAST_WALL_SHAPEprivate static VoxelShapeEAST_WEST_SHAPEprivate static VoxelShapeEAST_WEST_WALLS_SHAPEstatic DirectionPropertyFACINGprivate static VoxelShapeHANGING_SHAPEprivate static VoxelShapeNORTH_SOUTH_SHAPEprivate static VoxelShapeNORTH_SOUTH_WALLS_SHAPEprivate static VoxelShapeNORTH_WALL_SHAPEstatic BooleanPropertyPOWEREDprivate static VoxelShapeSOUTH_WALL_SHAPEprivate static VoxelShapeWEST_WALL_SHAPEFields inherited from class net.minecraft.block.Block
LOGGER, STATE_IDS, stateManagerFields 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
checkType, createScreenHandlerFactory, onSyncedBlockEventMethods 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, isFaceFullSquare, isShapeFullCube, isTranslucent, onBreak, onBroken, onDestroyedByExplosion, onEntityLand, onLandedUpon, onPlaced, onSteppedOn, postProcessState, precipitationTick, pushEntitiesUpBeforeBlockChange, randomDisplayTick, replace, replace, setDefaultState, shouldDrawSide, shouldDropItemsOnExplosion, sideCoversSmallSquare, toStringMethods inherited from class net.minecraft.block.AbstractBlock
calcBlockBreakingDelta, canBucketPlace, canReplace, emitsRedstonePower, getAmbientOcclusionLightLevel, getComparatorOutput, getCullingShape, getDefaultMapColor, getDroppedStacks, getFluidState, getLootTableId, getMaxModelOffset, getOffsetType, getOpacity, getRaycastShape, getRenderingSeed, getSidesShape, getStrongRedstonePower, getVisualShape, getWeakRedstonePower, hasComparatorOutput, hasSidedTransparency, isSideInvisible, mirror, onBlockAdded, onBlockBreakStart, onEntityCollision, onStacksDropped, onStateReplaced, prepare, randomTick, rotate, scheduledTickMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.block.BlockEntityProvider
getGameEventListener
-
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:
neighborUpdatein classAbstractBlock
-
onProjectileHit
public void onProjectileHit(World world, BlockState state, BlockHitResult hit, ProjectileEntity projectile)- Overrides:
onProjectileHitin 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:
onUsein classAbstractBlock- Returns:
- an action result that specifies if using the block was successful.
-
ring
public boolean ring(World world, BlockState state, BlockHitResult hitResult, @Nullable PlayerEntity player, boolean bool) -
isPointOnBell
-
ring
-
getShape
-
getCollisionShape
public VoxelShape getCollisionShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context)- Overrides:
getCollisionShapein classAbstractBlock
-
getOutlineShape
public VoxelShape getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context)- Overrides:
getOutlineShapein classAbstractBlock
-
getRenderType
- Overrides:
getRenderTypein classBlockWithEntity
-
getPlacementState
- Overrides:
getPlacementStatein classBlock
-
getStateForNeighborUpdate
public BlockState getStateForNeighborUpdate(BlockState state, Direction direction, BlockState newState, WorldAccess world, BlockPos pos, BlockPos posFrom)- Overrides:
getStateForNeighborUpdatein classAbstractBlock
-
canPlaceAt
- Overrides:
canPlaceAtin classAbstractBlock
-
getPlacementSide
-
getPistonBehavior
- Overrides:
getPistonBehaviorin classAbstractBlock
-
appendProperties
- Overrides:
appendPropertiesin classBlock
-
createBlockEntity
-
getTicker
@Nullable public <T extends BlockEntity> BlockEntityTicker<T> getTicker(World world, BlockState state, BlockEntityType<T> type)
-