类 ButtonBlock
- 所有已实现的接口:
FeatureElement
,ItemLike
,IBlockExtension
-
嵌套类概要
从类继承的嵌套类/接口 net.minecraft.world.level.block.Block
Block.ShapePairKey
从类继承的嵌套类/接口 net.minecraft.world.level.block.state.BlockBehaviour
BlockBehaviour.BlockStateBase, BlockBehaviour.OffsetFunction, BlockBehaviour.OffsetType, BlockBehaviour.Properties, BlockBehaviour.StateArgumentPredicate<A>, BlockBehaviour.StatePredicate
-
字段概要
字段修饰符和类型字段说明static final com.mojang.serialization.MapCodec
<ButtonBlock> static final BooleanProperty
private final Function
<BlockState, VoxelShape> private final int
private final BlockSetType
从类继承的字段 net.minecraft.world.level.block.FaceAttachedHorizontalDirectionalBlock
FACE
从类继承的字段 net.minecraft.world.level.block.HorizontalDirectionalBlock
FACING
从类继承的字段 net.minecraft.world.level.block.Block
BLOCK_STATE_REGISTRY, INDESTRUCTIBLE, INSTANT, stateDefinition, UPDATE_ALL, UPDATE_ALL_IMMEDIATE, UPDATE_CLIENTS, UPDATE_IMMEDIATE, UPDATE_INVISIBLE, UPDATE_KNOWN_SHAPE, UPDATE_LIMIT, UPDATE_MOVE_BY_PISTON, UPDATE_NEIGHBORS, UPDATE_NONE, UPDATE_SKIP_ALL_SIDEEFFECTS, UPDATE_SKIP_BLOCK_ENTITY_SIDEEFFECTS, UPDATE_SKIP_ON_PLACE, UPDATE_SKIP_SHAPE_UPDATE_ON_WIRE, UPDATE_SUPPRESS_DROPS
从类继承的字段 net.minecraft.world.level.block.state.BlockBehaviour
descriptionId, drops, dynamicShape, explosionResistance, friction, hasCollision, isRandomlyTicking, jumpFactor, properties, requiredFeatures, soundType, speedFactor, UPDATE_SHAPE_ORDER
从接口继承的字段 net.minecraft.world.flag.FeatureElement
FILTERED_REGISTRIES
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明protected void
affectNeighborsAfterRemoval
(BlockState p_394009_, ServerLevel p_394160_, BlockPos p_394096_, boolean p_393730_) protected void
checkPressed
(BlockState p_51121_, Level p_51122_, BlockPos p_51123_) com.mojang.serialization.MapCodec
<ButtonBlock> codec()
protected void
protected void
entityInside
(BlockState p_51083_, Level p_51084_, BlockPos p_51085_, Entity p_51086_, InsideBlockEffectApplier p_405475_) protected int
getDirectSignal
(BlockState p_51109_, BlockGetter p_51110_, BlockPos p_51111_, Direction p_51112_) protected VoxelShape
getShape
(BlockState p_51104_, BlockGetter p_51105_, BlockPos p_51106_, CollisionContext p_51107_) protected int
getSignal
(BlockState p_51078_, BlockGetter p_51079_, BlockPos p_51080_, Direction p_51081_) protected SoundEvent
getSound
(boolean p_51102_) protected boolean
isSignalSource
(BlockState p_51114_) private Function
<BlockState, VoxelShape> protected void
onExplosionHit
(BlockState p_312395_, ServerLevel p_364251_, BlockPos p_311817_, Explosion p_312150_, BiConsumer<ItemStack, BlockPos> p_311898_) protected void
playSound
(Player p_51068_, LevelAccessor p_51069_, BlockPos p_51070_, boolean p_51071_) void
press
(BlockState p_51117_, Level p_51118_, BlockPos p_51119_, Player p_345338_) protected void
tick
(BlockState p_220903_, ServerLevel p_220904_, BlockPos p_220905_, RandomSource p_220906_) private void
updateNeighbours
(BlockState p_51125_, Level p_51126_, BlockPos p_51127_) protected InteractionResult
useWithoutItem
(BlockState p_316833_, Level p_316124_, BlockPos p_316184_, Player p_316845_, BlockHitResult p_316247_) 从类继承的方法 net.minecraft.world.level.block.FaceAttachedHorizontalDirectionalBlock
canAttach, canSurvive, getConnectedDirection, getStateForPlacement, updateShape
从类继承的方法 net.minecraft.world.level.block.HorizontalDirectionalBlock
mirror, rotate
从类继承的方法 net.minecraft.world.level.block.Block
animateTick, asBlock, asItem, box, boxes, boxZ, boxZ, boxZ, builtInRegistryHolder, byItem, canSupportCenter, canSupportRigidBlock, column, column, cube, cube, defaultBlockState, destroy, dropFromExplosion, dropResources, dropResources, dropResources, fallOn, getDrops, getDrops, getExplosionResistance, getFriction, getId, getJumpFactor, getName, getShapeForEachState, getShapeForEachState, getSpeedFactor, getStateDefinition, handlePrecipitation, hasDynamicShape, isExceptionForConnection, isFaceFull, isPossibleToRespawnInThis, isShapeFullBlock, playerDestroy, playerWillDestroy, popExperience, popResource, popResourceFromFace, pushEntitiesUp, registerDefaultState, setPlacedBy, shouldRenderFace, shouldRenderFace, spawnDestroyParticles, stateById, stepOn, toString, tryDropExperience, updateEntityMovementAfterFallOn, updateFromNeighbourShapes, updateOrDestroy, updateOrDestroy, wasExploded, withPropertiesOf
从类继承的方法 net.minecraft.world.level.block.state.BlockBehaviour
attack, canBeReplaced, canBeReplaced, defaultDestroyTime, defaultMapColor, getAnalogOutputSignal, getBlockSupportShape, getCloneItemStack, getCollisionShape, getDescriptionId, getDestroyProgress, getDrops, getEntityInsideCollisionShape, getFluidState, getInteractionShape, getLightBlock, getLootTable, getMaxHorizontalOffset, getMaxVerticalOffset, getMenuProvider, getOcclusionShape, getRenderShape, getSeed, getShadeBrightness, getSoundType, getVisualShape, hasAnalogOutputSignal, isAir, isCollisionShapeFullBlock, isPathfindable, isRandomlyTicking, neighborChanged, onPlace, onProjectileHit, propagatesSkylightDown, properties, propertiesCodec, randomTick, requiredFeatures, simpleCodec, skipRendering, spawnAfterBreak, triggerEvent, updateIndirectNeighbourShapes, useItemOn, useShapeForLightOcclusion
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
从接口继承的方法 net.minecraft.world.flag.FeatureElement
isEnabled
从接口继承的方法 net.neoforged.neoforge.common.extensions.IBlockExtension
addLandingEffects, addRunningEffects, canBeHydrated, canConnectRedstone, canDropFromExplosion, canEntityDestroy, canHarvestBlock, canStickTo, canSustainPlant, collisionExtendsVertically, getAdjacentBlockPathType, getAppearance, getBeaconColorMultiplier, getBedDirection, getBlockPathType, getBubbleColumnDirection, getCloneItemStack, getEnchantPowerBonus, getExpDrop, getExplosionResistance, getFireSpreadSpeed, getFlammability, getFriction, getLightEmission, getMapColor, getPistonPushReaction, getRespawnPosition, getSoundType, getStateAtViewpoint, getToolModifiedState, getWeakChanges, hasDynamicLightEmission, hidesNeighborFace, isBed, isBurning, isConduitFrame, isEmpty, isFertile, isFireSource, isFlammable, isLadder, isPortalFrame, isScaffolding, isSlimeBlock, isStickyBlock, makesOpenTrapdoorAboveClimbable, onBlockExploded, onBlockStateChange, onCaughtFire, onDestroyedByPlayer, onDestroyedByPushReaction, onNeighborChange, onTreeGrow, playFallSound, playStepSound, rotate, setBedOccupied, shouldCheckWeakPower, shouldDisplayFluidOverlay, shouldHideAdjacentFluidFace, supportsExternalFaceHiding
-
字段详细资料
-
CODEC
-
POWERED
-
type
-
ticksToStayPressed
private final int ticksToStayPressed -
shapes
-
-
构造器详细资料
-
ButtonBlock
-
-
方法详细资料
-
codec
-
makeShapes
-
getShape
protected VoxelShape getShape(BlockState p_51104_, BlockGetter p_51105_, BlockPos p_51106_, CollisionContext p_51107_) - 覆盖:
getShape
在类中BlockBehaviour
-
useWithoutItem
protected InteractionResult useWithoutItem(BlockState p_316833_, Level p_316124_, BlockPos p_316184_, Player p_316845_, BlockHitResult p_316247_) - 覆盖:
useWithoutItem
在类中BlockBehaviour
-
onExplosionHit
protected void onExplosionHit(BlockState p_312395_, ServerLevel p_364251_, BlockPos p_311817_, Explosion p_312150_, BiConsumer<ItemStack, BlockPos> p_311898_) - 覆盖:
onExplosionHit
在类中BlockBehaviour
-
press
public void press(BlockState p_51117_, Level p_51118_, BlockPos p_51119_, @Nullable Player p_345338_) -
playSound
protected void playSound(@Nullable Player p_51068_, LevelAccessor p_51069_, BlockPos p_51070_, boolean p_51071_) -
getSound
-
affectNeighborsAfterRemoval
protected void affectNeighborsAfterRemoval(BlockState p_394009_, ServerLevel p_394160_, BlockPos p_394096_, boolean p_393730_) -
getSignal
protected int getSignal(BlockState p_51078_, BlockGetter p_51079_, BlockPos p_51080_, Direction p_51081_) - 覆盖:
getSignal
在类中BlockBehaviour
-
getDirectSignal
protected int getDirectSignal(BlockState p_51109_, BlockGetter p_51110_, BlockPos p_51111_, Direction p_51112_) - 覆盖:
getDirectSignal
在类中BlockBehaviour
-
isSignalSource
- 覆盖:
isSignalSource
在类中BlockBehaviour
-
tick
protected void tick(BlockState p_220903_, ServerLevel p_220904_, BlockPos p_220905_, RandomSource p_220906_) - 覆盖:
tick
在类中BlockBehaviour
-
entityInside
protected void entityInside(BlockState p_51083_, Level p_51084_, BlockPos p_51085_, Entity p_51086_, InsideBlockEffectApplier p_405475_) - 覆盖:
entityInside
在类中BlockBehaviour
-
checkPressed
-
updateNeighbours
-
createBlockStateDefinition
- 覆盖:
createBlockStateDefinition
在类中Block
-