Package net.minecraft.block
Class AbstractButtonBlock
- java.lang.Object
-
- All Implemented Interfaces:
IItemProvider
,IForgeBlock
,IForgeRegistryEntry<Block>
- Direct Known Subclasses:
StoneButtonBlock
,WoodButtonBlock
public abstract class AbstractButtonBlock extends HorizontalFaceBlock
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class net.minecraft.block.Block
Block.RenderSideCacheKey
-
Nested classes/interfaces inherited from class net.minecraft.block.AbstractBlock
AbstractBlock.AbstractBlockState, AbstractBlock.IExtendedPositionPredicate<A>, AbstractBlock.IPositionPredicate, AbstractBlock.OffsetType, AbstractBlock.Properties
-
Nested classes/interfaces inherited from class net.minecraftforge.registries.ForgeRegistryEntry
ForgeRegistryEntry.UncheckedRegistryEntry<V extends IForgeRegistryEntry<V>>
-
-
Field Summary
Fields Modifier and Type Field Description protected static VoxelShape
CEILING_AABB_X
protected static VoxelShape
CEILING_AABB_Z
protected static VoxelShape
EAST_AABB
protected static VoxelShape
FLOOR_AABB_X
protected static VoxelShape
FLOOR_AABB_Z
protected static VoxelShape
NORTH_AABB
static BooleanProperty
POWERED
protected static VoxelShape
PRESSED_CEILING_AABB_X
protected static VoxelShape
PRESSED_CEILING_AABB_Z
protected static VoxelShape
PRESSED_EAST_AABB
protected static VoxelShape
PRESSED_FLOOR_AABB_X
protected static VoxelShape
PRESSED_FLOOR_AABB_Z
protected static VoxelShape
PRESSED_NORTH_AABB
protected static VoxelShape
PRESSED_SOUTH_AABB
protected static VoxelShape
PRESSED_WEST_AABB
private boolean
sensitive
protected static VoxelShape
SOUTH_AABB
protected static VoxelShape
WEST_AABB
-
Fields inherited from class net.minecraft.block.HorizontalFaceBlock
FACE
-
Fields inherited from class net.minecraft.block.HorizontalBlock
FACING
-
Fields inherited from class net.minecraft.block.Block
BLOCK_STATE_REGISTRY, LOGGER, RANDOM, stateDefinition
-
Fields inherited from class net.minecraft.block.AbstractBlock
drops, dynamicShape, explosionResistance, friction, hasCollision, isRandomlyTicking, jumpFactor, material, properties, soundType, speedFactor, UPDATE_SHAPE_ORDER
-
Fields inherited from class net.minecraftforge.registries.ForgeRegistryEntry
delegate
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractButtonBlock(boolean p_i48436_1_, AbstractBlock.Properties p_i48436_2_)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description private void
checkPressed(BlockState p_185616_1_, World p_185616_2_, BlockPos p_185616_3_)
protected void
createBlockStateDefinition(StateContainer.Builder<Block,BlockState> p_206840_1_)
void
entityInside(BlockState p_196262_1_, World p_196262_2_, BlockPos p_196262_3_, Entity p_196262_4_)
int
getDirectSignal(BlockState p_176211_1_, IBlockReader p_176211_2_, BlockPos p_176211_3_, Direction p_176211_4_)
private int
getPressDuration()
VoxelShape
getShape(BlockState p_220053_1_, IBlockReader p_220053_2_, BlockPos p_220053_3_, ISelectionContext p_220053_4_)
int
getSignal(BlockState p_180656_1_, IBlockReader p_180656_2_, BlockPos p_180656_3_, Direction p_180656_4_)
protected abstract SoundEvent
getSound(boolean p_196369_1_)
boolean
isSignalSource(BlockState p_149744_1_)
void
onRemove(BlockState p_196243_1_, World p_196243_2_, BlockPos p_196243_3_, BlockState p_196243_4_, boolean p_196243_5_)
protected void
playSound(PlayerEntity p_196367_1_, IWorld p_196367_2_, BlockPos p_196367_3_, boolean p_196367_4_)
void
press(BlockState p_226910_1_, World p_226910_2_, BlockPos p_226910_3_)
void
tick(BlockState p_225534_1_, ServerWorld p_225534_2_, BlockPos p_225534_3_, java.util.Random p_225534_4_)
private void
updateNeighbours(BlockState p_196368_1_, World p_196368_2_, BlockPos p_196368_3_)
ActionResultType
use(BlockState p_225533_1_, World p_225533_2_, BlockPos p_225533_3_, PlayerEntity p_225533_4_, Hand p_225533_5_, BlockRayTraceResult p_225533_6_)
-
Methods inherited from class net.minecraft.block.HorizontalFaceBlock
canAttach, canSurvive, getConnectedDirection, getStateForPlacement, updateShape
-
Methods inherited from class net.minecraft.block.HorizontalBlock
mirror, rotate
-
Methods inherited from class net.minecraft.block.Block
animateTick, appendHoverText, asBlock, asItem, box, byItem, canSupportCenter, canSupportRigidBlock, canSustainPlant, defaultBlockState, destroy, dropFromExplosion, dropResources, dropResources, dropResources, fallOn, fillItemCategory, getCloneItemStack, getDescriptionId, getDrops, getDrops, getExplosionResistance, getFriction, getHarvestLevel, getHarvestTool, getId, getJumpFactor, getName, getSoundType, getSpeedFactor, getStateDefinition, getTags, handleRain, hasDynamicShape, is, is, isExceptionForConnection, isFaceFull, isPossibleToRespawnInThis, isRandomlyTicking, isShapeFullBlock, playerDestroy, playerWillDestroy, popExperience, popResource, propagatesSkylightDown, pushEntitiesUp, registerDefaultState, setPlacedBy, shouldRenderFace, stateById, stepOn, toString, updateEntityAfterFallOn, updateFromNeighbourShapes, updateOrDestroy, updateOrDestroy, wasExploded
-
Methods inherited from class net.minecraft.block.AbstractBlock
attack, canBeReplaced, canBeReplaced, defaultMaterialColor, getAnalogOutputSignal, getBlockSupportShape, getCollisionShape, getDestroyProgress, getDrops, getFluidState, getInteractionShape, getLightBlock, getLootTable, getMenuProvider, getOcclusionShape, getOffsetType, getPistonPushReaction, getRenderShape, getSeed, getShadeBrightness, getVisualShape, hasAnalogOutputSignal, isAir, isEntityBlock, isPathfindable, neighborChanged, onPlace, onProjectileHit, randomTick, skipRendering, spawnAfterBreak, triggerEvent, updateIndirectNeighbourShapes, useShapeForLightOcclusion
-
Methods inherited from class net.minecraftforge.registries.ForgeRegistryEntry
getRegistryName, getRegistryType, setRegistryName, setRegistryName, setRegistryName
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface net.minecraftforge.common.extensions.IForgeBlock
addDestroyEffects, addHitEffects, addLandingEffects, addRunningEffects, canBeReplacedByLeaves, canBeReplacedByLogs, canConnectRedstone, canCreatureSpawn, canDropFromExplosion, canEntityDestroy, canHarvestBlock, canStickTo, catchFire, collisionExtendsVertically, createTileEntity, getAiPathNodeType, getBeaconColorMultiplier, getBedDirection, getBedSpawnPosition, getBlock, getEnchantPowerBonus, getExpDrop, getExplosionResistance, getFireSpreadSpeed, getFlammability, getFogColor, getLightValue, getPickBlock, getRespawnPosition, getSlipperiness, getSoundType, getStateAtViewpoint, getToolModifiedState, getWeakChanges, hasTileEntity, isAir, isBed, isBurning, isConduitFrame, isFertile, isFireSource, isFlammable, isLadder, isPortalFrame, isScaffolding, isSlimeBlock, isStickyBlock, isToolEffective, makesOpenTrapdoorAboveClimbable, observedNeighborChange, onBlockExploded, onNeighborChange, onPlantGrow, removedByPlayer, rotate, setBedOccupied, shouldCheckWeakPower, shouldDisplayFluidOverlay
-
-
-
-
Field Detail
-
POWERED
public static final BooleanProperty POWERED
-
CEILING_AABB_X
protected static final VoxelShape CEILING_AABB_X
-
CEILING_AABB_Z
protected static final VoxelShape CEILING_AABB_Z
-
FLOOR_AABB_X
protected static final VoxelShape FLOOR_AABB_X
-
FLOOR_AABB_Z
protected static final VoxelShape FLOOR_AABB_Z
-
NORTH_AABB
protected static final VoxelShape NORTH_AABB
-
SOUTH_AABB
protected static final VoxelShape SOUTH_AABB
-
WEST_AABB
protected static final VoxelShape WEST_AABB
-
EAST_AABB
protected static final VoxelShape EAST_AABB
-
PRESSED_CEILING_AABB_X
protected static final VoxelShape PRESSED_CEILING_AABB_X
-
PRESSED_CEILING_AABB_Z
protected static final VoxelShape PRESSED_CEILING_AABB_Z
-
PRESSED_FLOOR_AABB_X
protected static final VoxelShape PRESSED_FLOOR_AABB_X
-
PRESSED_FLOOR_AABB_Z
protected static final VoxelShape PRESSED_FLOOR_AABB_Z
-
PRESSED_NORTH_AABB
protected static final VoxelShape PRESSED_NORTH_AABB
-
PRESSED_SOUTH_AABB
protected static final VoxelShape PRESSED_SOUTH_AABB
-
PRESSED_WEST_AABB
protected static final VoxelShape PRESSED_WEST_AABB
-
PRESSED_EAST_AABB
protected static final VoxelShape PRESSED_EAST_AABB
-
sensitive
private final boolean sensitive
-
-
Constructor Detail
-
AbstractButtonBlock
protected AbstractButtonBlock(boolean p_i48436_1_, AbstractBlock.Properties p_i48436_2_)
-
-
Method Detail
-
getPressDuration
private int getPressDuration()
-
getShape
public VoxelShape getShape(BlockState p_220053_1_, IBlockReader p_220053_2_, BlockPos p_220053_3_, ISelectionContext p_220053_4_)
- Overrides:
getShape
in classAbstractBlock
-
use
public ActionResultType use(BlockState p_225533_1_, World p_225533_2_, BlockPos p_225533_3_, PlayerEntity p_225533_4_, Hand p_225533_5_, BlockRayTraceResult p_225533_6_)
- Overrides:
use
in classAbstractBlock
-
press
public void press(BlockState p_226910_1_, World p_226910_2_, BlockPos p_226910_3_)
-
playSound
protected void playSound(@Nullable PlayerEntity p_196367_1_, IWorld p_196367_2_, BlockPos p_196367_3_, boolean p_196367_4_)
-
getSound
protected abstract SoundEvent getSound(boolean p_196369_1_)
-
onRemove
public void onRemove(BlockState p_196243_1_, World p_196243_2_, BlockPos p_196243_3_, BlockState p_196243_4_, boolean p_196243_5_)
- Overrides:
onRemove
in classAbstractBlock
-
getSignal
public int getSignal(BlockState p_180656_1_, IBlockReader p_180656_2_, BlockPos p_180656_3_, Direction p_180656_4_)
- Overrides:
getSignal
in classAbstractBlock
-
getDirectSignal
public int getDirectSignal(BlockState p_176211_1_, IBlockReader p_176211_2_, BlockPos p_176211_3_, Direction p_176211_4_)
- Overrides:
getDirectSignal
in classAbstractBlock
-
isSignalSource
public boolean isSignalSource(BlockState p_149744_1_)
- Overrides:
isSignalSource
in classAbstractBlock
-
tick
public void tick(BlockState p_225534_1_, ServerWorld p_225534_2_, BlockPos p_225534_3_, java.util.Random p_225534_4_)
- Overrides:
tick
in classAbstractBlock
-
entityInside
public void entityInside(BlockState p_196262_1_, World p_196262_2_, BlockPos p_196262_3_, Entity p_196262_4_)
- Overrides:
entityInside
in classAbstractBlock
-
checkPressed
private void checkPressed(BlockState p_185616_1_, World p_185616_2_, BlockPos p_185616_3_)
-
updateNeighbours
private void updateNeighbours(BlockState p_196368_1_, World p_196368_2_, BlockPos p_196368_3_)
-
createBlockStateDefinition
protected void createBlockStateDefinition(StateContainer.Builder<Block,BlockState> p_206840_1_)
- Overrides:
createBlockStateDefinition
in classBlock
-
-