Package net.minecraft.block
Class AbstractButtonBlock
java.lang.Object
net.minecraft.block.AbstractBlock
net.minecraft.block.Block
net.minecraft.block.HorizontalFacingBlock
net.minecraft.block.WallMountedBlock
net.minecraft.block.AbstractButtonBlock
- All Implemented Interfaces:
ItemConvertible
- Direct Known Subclasses:
StoneButtonBlock,WoodButtonBlock
public abstract class AbstractButtonBlock extends WallMountedBlock
-
Nested Class Summary
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 protected static VoxelShapeCEILING_X_PRESSED_SHAPEprotected static VoxelShapeCEILING_X_SHAPEprotected static VoxelShapeCEILING_Z_PRESSED_SHAPEprotected static VoxelShapeCEILING_Z_SHAPEprotected static VoxelShapeEAST_PRESSED_SHAPEprotected static VoxelShapeEAST_SHAPEprotected static VoxelShapeFLOOR_X_PRESSED_SHAPEprotected static VoxelShapeFLOOR_X_SHAPEprotected static VoxelShapeFLOOR_Z_PRESSED_SHAPEprotected static VoxelShapeFLOOR_Z_SHAPEprotected static VoxelShapeNORTH_PRESSED_SHAPEprotected static VoxelShapeNORTH_SHAPEstatic BooleanPropertyPOWEREDprotected static VoxelShapeSOUTH_PRESSED_SHAPEprotected static VoxelShapeSOUTH_SHAPEprotected static VoxelShapeWEST_PRESSED_SHAPEprotected static VoxelShapeWEST_SHAPEprivate booleanwoodenFields inherited from class net.minecraft.block.AbstractBlock
collidable, dynamicBounds, FACINGS, jumpVelocityMultiplier, lootTableId, material, randomTicks, resistance, settings, slipperiness, soundGroup, velocityMultiplier -
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractButtonBlock(boolean wooden, AbstractBlock.Settings settings) -
Method Summary
Methods inherited from class net.minecraft.block.WallMountedBlock
canPlaceAt, canPlaceAt, getDirection, getPlacementState, getStateForNeighborUpdateMethods inherited from class net.minecraft.block.Block
addStacksForDisplay, afterBreak, asBlock, asItem, buildTooltip, 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, isSideSolidFullSquare, isTranslucent, method_30094, onBreak, onBroken, onDestroyedByExplosion, onEntityLand, onLandedUpon, onPlaced, onSteppedOn, postProcessState, pushEntitiesUpBeforeBlockChange, rainTick, randomDisplayTick, replaceBlock, setDefaultState, shouldDrawSide, shouldDropItemsOnExplosion, sideCoversSmallSquare, toStringMethods inherited from class net.minecraft.block.AbstractBlock
calcBlockBreakingDelta, canBucketPlace, canPathfindThrough, canReplace, createScreenHandlerFactory, getAmbientOcclusionLightLevel, getCollisionShape, getComparatorOutput, getCullingShape, getDefaultMaterialColor, getDroppedStacks, getFluidState, getLootTableId, getOffsetType, getOpacity, getPistonBehavior, getRayTraceShape, getRenderingSeed, getRenderType, getSidesShape, getVisualShape, hasBlockEntity, hasComparatorOutput, hasSidedTransparency, isSideInvisible, neighborUpdate, onBlockAdded, onBlockBreakStart, onProjectileHit, onStacksDropped, onSyncedBlockEvent, prepare, randomTick
-
Field Details
-
POWERED
-
CEILING_X_SHAPE
-
CEILING_Z_SHAPE
-
FLOOR_X_SHAPE
-
FLOOR_Z_SHAPE
-
NORTH_SHAPE
-
SOUTH_SHAPE
-
WEST_SHAPE
-
EAST_SHAPE
-
CEILING_X_PRESSED_SHAPE
-
CEILING_Z_PRESSED_SHAPE
-
FLOOR_X_PRESSED_SHAPE
-
FLOOR_Z_PRESSED_SHAPE
-
NORTH_PRESSED_SHAPE
-
SOUTH_PRESSED_SHAPE
-
WEST_PRESSED_SHAPE
-
EAST_PRESSED_SHAPE
-
wooden
private final boolean wooden
-
-
Constructor Details
-
Method Details
-
getPressTicks
private int getPressTicks() -
getOutlineShape
public VoxelShape getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context)- Overrides:
getOutlineShapein classAbstractBlock
-
onUse
public ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit)- Overrides:
onUsein classAbstractBlock
-
powerOn
-
playClickSound
protected void playClickSound(@Nullable PlayerEntity player, WorldAccess world, BlockPos pos, boolean powered) -
getClickSound
-
onStateReplaced
public void onStateReplaced(BlockState state, World world, BlockPos pos, BlockState newState, boolean moved)Called inWorldChunk.setBlockState(BlockPos, BlockState, boolean)ifnewStateis different fromstate. Vanilla blocks perform removal cleanups here.- Overrides:
onStateReplacedin classAbstractBlock
-
getWeakRedstonePower
public int getWeakRedstonePower(BlockState state, BlockView world, BlockPos pos, Direction direction)- Overrides:
getWeakRedstonePowerin classAbstractBlock
-
getStrongRedstonePower
public int getStrongRedstonePower(BlockState state, BlockView world, BlockPos pos, Direction direction)- Overrides:
getStrongRedstonePowerin classAbstractBlock
-
emitsRedstonePower
- Overrides:
emitsRedstonePowerin classAbstractBlock
-
scheduledTick
- Overrides:
scheduledTickin classAbstractBlock
-
onEntityCollision
- Overrides:
onEntityCollisionin classAbstractBlock
-
tryPowerWithProjectiles
-
updateNeighbors
-
appendProperties
- Overrides:
appendPropertiesin classBlock
-