net.minecraft.world.level.block

public class ButtonBlock

extends FaceAttachedHorizontalDirectionalBlock

All mapped superinterfaces:

FeatureElement, ItemLike

dnz
net.minecraft.world.level.block.ButtonBlock
net.minecraft.class_2269
net.minecraft.block.ButtonBlock
net.minecraft.src.C_1716_

Field summary

Modifier and TypeField
public static final com.mojang.serialization.MapCodec<ButtonBlock>
a
CODEC
field_46293
CODEC
f_302240_
public static final BooleanProperty
b
POWERED
field_10729
POWERED
f_51045_
private final BlockSetType
d
type
field_42753
blockSetType
f_271519_
private final int
f
ticksToStayPressed
field_40298
pressTicks
f_244105_
private final Function<BlockState, VoxelShape>
g
shapes
field_55743
shapeFunction
f_380593_

Constructor summary

ModifierConstructor
protected (BlockSetType blockSetType, int pressTicks, BlockBehaviour$Properties settings)

Method summary

Modifier and TypeMethod
public com.mojang.serialization.MapCodec<ButtonBlock>
a()
codec()
method_53969()
getCodec()
m_304657_()
private Function<BlockState, VoxelShape>
b()
makeShapes()
method_66419()
createShapeFunction()
m_384267_()
protected VoxelShape
a(ebq arg0, djn arg1, iw arg2, fgh arg3)
getShape(BlockState arg0, BlockGetter arg1, BlockPos arg2, CollisionContext arg3)
method_9530(class_2680 arg0, class_1922 arg1, class_2338 arg2, class_3726 arg3)
getOutlineShape(BlockState arg0, BlockView arg1, BlockPos arg2, ShapeContext arg3)
m_5940_(C_2064_ p_51105_, C_1559_ p_51106_, C_4675_ p_51107_, C_3051_ arg3)
protected InteractionResult
a(ebq arg0, dkj arg1, iw arg2, csi arg3, ffy arg4)
useWithoutItem(BlockState arg0, Level arg1, BlockPos arg2, Player arg3, BlockHitResult arg4)
method_55766(class_2680 arg0, class_1937 arg1, class_2338 arg2, class_1657 arg3, class_3965 arg4)
onUse(BlockState arg0, World arg1, BlockPos arg2, PlayerEntity arg3, BlockHitResult arg4)
m_6227_(C_2064_ p_334611_, C_1596_ p_332004_, C_4675_ p_330636_, C_1141_ p_327724_, C_3041_ arg4)
protected void
a(ebq arg0, asb arg1, iw arg2, dkc arg3, BiConsumer<dak, iw> arg4)
onExplosionHit(BlockState arg0, ServerLevel arg1, BlockPos arg2, Explosion arg3, BiConsumer<ItemStack, BlockPos> arg4)
method_55124(class_2680 arg0, class_3218 arg1, class_2338 arg2, class_1927 arg3, BiConsumer<class_1799, class_2338> arg4)
onExploded(BlockState arg0, ServerWorld arg1, BlockPos arg2, Explosion arg3, BiConsumer<ItemStack, BlockPos> arg4)
m_304760_(C_2064_ p_363623_, C_12_ p_312982_, C_4675_ p_311820_, C_1578_ p_312672_, BiConsumer<C_1391_, C_4675_> arg4)
public void
a(ebq arg0, dkj arg1, iw arg2, csi arg3)
press(BlockState arg0, Level arg1, BlockPos arg2, Player arg3)
method_21845(class_2680 arg0, class_1937 arg1, class_2338 arg2, class_1657 arg3)
powerOn(BlockState state, World world, BlockPos pos, PlayerEntity player)
m_51116_(C_2064_ p_51118_, C_1596_ p_51119_, C_4675_ p_343045_, C_1141_ arg3)
protected void
a(csi arg0, dkk arg1, iw arg2, boolean arg3)
playSound(Player arg0, LevelAccessor arg1, BlockPos arg2, boolean arg3)
method_9714(class_1657 arg0, class_1936 arg1, class_2338 arg2, boolean arg3)
playClickSound(PlayerEntity player, WorldAccess world, BlockPos pos, boolean powered)
m_51067_(C_1141_ p_51069_, C_1598_ p_51070_, C_4675_ p_51071_, boolean arg3)
protected SoundEvent
a(boolean arg0)
getSound(boolean arg0)
method_9712(boolean arg0)
getClickSound(boolean powered)
m_5722_(boolean arg0)
protected void
a(ebq arg0, asb arg1, iw arg2, boolean arg3)
affectNeighborsAfterRemoval(BlockState arg0, ServerLevel arg1, BlockPos arg2, boolean arg3)
method_66388(class_2680 arg0, class_3218 arg1, class_2338 arg2, boolean arg3)
onStateReplaced(BlockState arg0, ServerWorld arg1, BlockPos arg2, boolean arg3)
m_7892_(C_2064_ p_395947_, C_12_ p_394950_, C_4675_ p_394747_, boolean arg3)
protected int
a(ebq arg0, djn arg1, iw arg2, jc arg3)
getSignal(BlockState arg0, BlockGetter arg1, BlockPos arg2, Direction arg3)
method_9524(class_2680 arg0, class_1922 arg1, class_2338 arg2, class_2350 arg3)
getWeakRedstonePower(BlockState arg0, BlockView arg1, BlockPos arg2, Direction arg3)
m_6378_(C_2064_ p_51079_, C_1559_ p_51080_, C_4675_ p_51081_, C_4687_ arg3)
protected int
b(ebq arg0, djn arg1, iw arg2, jc arg3)
getDirectSignal(BlockState arg0, BlockGetter arg1, BlockPos arg2, Direction arg3)
method_9603(class_2680 arg0, class_1922 arg1, class_2338 arg2, class_2350 arg3)
getStrongRedstonePower(BlockState arg0, BlockView arg1, BlockPos arg2, Direction arg3)
m_6376_(C_2064_ p_51110_, C_1559_ p_51111_, C_4675_ p_51112_, C_4687_ arg3)
protected boolean
f_(ebq arg0)
isSignalSource(BlockState arg0)
method_9506(class_2680 arg0)
emitsRedstonePower(BlockState arg0)
m_7899_(C_2064_ arg0)
protected void
a(ebq arg0, asb arg1, iw arg2, bai arg3)
tick(BlockState arg0, ServerLevel arg1, BlockPos arg2, RandomSource arg3)
method_9588(class_2680 arg0, class_3218 arg1, class_2338 arg2, class_5819 arg3)
scheduledTick(BlockState arg0, ServerWorld arg1, BlockPos arg2, Random arg3)
m_213897_(C_2064_ p_220904_, C_12_ p_220905_, C_4675_ p_220906_, C_212974_ arg3)
protected void
a(ebq arg0, dkj arg1, iw arg2, bxe arg3, bxx arg4)
entityInside(BlockState arg0, Level arg1, BlockPos arg2, Entity arg3, InsideBlockEffectApplier arg4)
method_9548(class_2680 arg0, class_1937 arg1, class_2338 arg2, class_1297 arg3, class_10774 arg4)
onEntityCollision(BlockState arg0, World arg1, BlockPos arg2, Entity arg3, EntityCollisionHandler arg4)
m_49259_(C_2064_ p_51084_, C_1596_ p_51085_, C_4675_ p_51086_, C_507_ p_394334_, C_378837_ arg4)
protected void
d(ebq arg0, dkj arg1, iw arg2)
checkPressed(BlockState arg0, Level arg1, BlockPos arg2)
method_9715(class_2680 arg0, class_1937 arg1, class_2338 arg2)
tryPowerWithProjectiles(BlockState state, World world, BlockPos pos)
m_51120_(C_2064_ p_51122_, C_1596_ p_51123_, C_4675_ arg2)
private void
e(ebq arg0, dkj arg1, iw arg2)
updateNeighbours(BlockState arg0, Level arg1, BlockPos arg2)
method_9713(class_2680 arg0, class_1937 arg1, class_2338 arg2)
updateNeighbors(BlockState state, World world, BlockPos pos)
m_51124_(C_2064_ p_51126_, C_1596_ p_51127_, C_4675_ arg2)
protected void
a(ebr$a<dno, ebq> arg0)
createBlockStateDefinition(StateDefinition$Builder<Block, BlockState> arg0)
method_9515(class_2689$class_2690<class_2248, class_2680> arg0)
appendProperties(StateManager$Builder<Block, BlockState> arg0)
m_7926_(C_2065_$C_2066_<C_1706_, C_2064_> arg0)