public class BellBlock extends BlockWithEntity
Block.NeighborGroup
AbstractBlock.AbstractBlockState, AbstractBlock.ContextPredicate, AbstractBlock.OffsetType, AbstractBlock.Settings, AbstractBlock.TypedContextPredicate<A>
Modifier and Type | Field and 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 |
LOGGER, STATE_IDS, stateManager
collidable, dynamicBounds, FACINGS, jumpVelocityMultiplier, lootTableId, material, randomTicks, resistance, settings, slipperiness, soundGroup, velocityMultiplier
Constructor and Description |
---|
BellBlock(AbstractBlock.Settings settings) |
createScreenHandlerFactory, onSyncedBlockEvent
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
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
public static final DirectionProperty FACING
public static final EnumProperty<Attachment> ATTACHMENT
public static final BooleanProperty POWERED
private static final VoxelShape NORTH_SOUTH_SHAPE
private static final VoxelShape EAST_WEST_SHAPE
private static final VoxelShape BELL_WAIST_SHAPE
private static final VoxelShape BELL_LIP_SHAPE
private static final VoxelShape BELL_SHAPE
private static final VoxelShape NORTH_SOUTH_WALLS_SHAPE
private static final VoxelShape EAST_WEST_WALLS_SHAPE
private static final VoxelShape WEST_WALL_SHAPE
private static final VoxelShape EAST_WALL_SHAPE
private static final VoxelShape NORTH_WALL_SHAPE
private static final VoxelShape SOUTH_WALL_SHAPE
private static final VoxelShape HANGING_SHAPE
public BellBlock(AbstractBlock.Settings settings)
public void neighborUpdate(BlockState state, World world, BlockPos pos, Block block, BlockPos fromPos, boolean notify)
neighborUpdate
in class AbstractBlock
public void onProjectileHit(World world, BlockState state, BlockHitResult hit, ProjectileEntity projectile)
onProjectileHit
in class AbstractBlock
public ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit)
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.
onUse
in class AbstractBlock
public boolean ring(World world, BlockState state, BlockHitResult blockHitResult, @Nullable PlayerEntity playerEntity, boolean bool)
private boolean isPointOnBell(BlockState state, Direction side, double y)
private VoxelShape getShape(BlockState state)
public VoxelShape getCollisionShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context)
getCollisionShape
in class AbstractBlock
public VoxelShape getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context)
getOutlineShape
in class AbstractBlock
public BlockRenderType getRenderType(BlockState state)
getRenderType
in class BlockWithEntity
@Nullable public BlockState getPlacementState(ItemPlacementContext ctx)
getPlacementState
in class Block
public BlockState getStateForNeighborUpdate(BlockState state, Direction direction, BlockState newState, WorldAccess world, BlockPos pos, BlockPos posFrom)
getStateForNeighborUpdate
in class AbstractBlock
public boolean canPlaceAt(BlockState state, WorldView world, BlockPos pos)
canPlaceAt
in class AbstractBlock
private static Direction getPlacementSide(BlockState state)
public PistonBehavior getPistonBehavior(BlockState state)
getPistonBehavior
in class AbstractBlock
protected void appendProperties(StateManager.Builder<Block,BlockState> builder)
appendProperties
in class Block
@Nullable public BlockEntity createBlockEntity(BlockView world)
public boolean canPathfindThrough(BlockState state, BlockView world, BlockPos pos, NavigationType type)
canPathfindThrough
in class AbstractBlock