类 BlockBehaviour
java.lang.Object
net.minecraft.world.level.block.state.BlockBehaviour
- 所有已实现的接口:
FeatureElement
- 直接已知子类:
Block
-
嵌套类概要
嵌套类修饰符和类型类说明static class
static interface
static enum
static class
static interface
static interface
-
字段概要
字段修饰符和类型字段说明protected final String
protected final Optional
<ResourceKey<LootTable>> protected final boolean
protected final float
protected final float
protected final boolean
protected final boolean
protected final float
protected final BlockBehaviour.Properties
protected final FeatureFlagSet
protected final SoundType
protected final float
protected static final Direction[]
从接口继承的字段 net.minecraft.world.flag.FeatureElement
FILTERED_REGISTRIES
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明protected abstract Block
asBlock()
abstract Item
asItem()
protected void
attack
(BlockState p_60499_, Level p_60500_, BlockPos p_60501_, Player p_60502_) protected boolean
canBeReplaced
(BlockState p_60470_, BlockPlaceContext p_60471_) protected boolean
canBeReplaced
(BlockState p_60535_, Fluid p_60536_) protected boolean
canSurvive
(BlockState p_60525_, LevelReader p_60526_, BlockPos p_60527_) protected abstract com.mojang.serialization.MapCodec
<? extends Block> codec()
float
protected void
entityInside
(BlockState p_60495_, Level p_60496_, BlockPos p_60497_, Entity p_60498_) protected int
getAnalogOutputSignal
(BlockState p_60487_, Level p_60488_, BlockPos p_60489_) protected VoxelShape
getBlockSupportShape
(BlockState p_60581_, BlockGetter p_60582_, BlockPos p_60583_) protected ItemStack
getCloneItemStack
(LevelReader p_376835_, BlockPos p_375399_, BlockState p_375675_, boolean p_376021_) protected VoxelShape
getCollisionShape
(BlockState p_60572_, BlockGetter p_60573_, BlockPos p_60574_, CollisionContext p_60575_) final String
protected float
getDestroyProgress
(BlockState p_60466_, Player p_60467_, BlockGetter p_60468_, BlockPos p_60469_) protected int
getDirectSignal
(BlockState p_60559_, BlockGetter p_60560_, BlockPos p_60561_, Direction p_60562_) getDrops
(BlockState p_287732_, LootParams.Builder p_287596_) protected VoxelShape
getEntityInsideCollisionShape
(BlockState p_362126_, Level p_362740_, BlockPos p_367338_) protected FluidState
getFluidState
(BlockState p_60577_) protected VoxelShape
getInteractionShape
(BlockState p_60547_, BlockGetter p_60548_, BlockPos p_60549_) protected int
getLightBlock
(BlockState p_60585_) final Optional
<ResourceKey<LootTable>> protected float
protected float
protected MenuProvider
getMenuProvider
(BlockState p_60563_, Level p_60564_, BlockPos p_60565_) protected VoxelShape
getOcclusionShape
(BlockState p_60578_) protected RenderShape
getRenderShape
(BlockState p_60550_) protected long
getSeed
(BlockState p_60539_, BlockPos p_60540_) protected float
getShadeBrightness
(BlockState p_60472_, BlockGetter p_60473_, BlockPos p_60474_) protected VoxelShape
getShape
(BlockState p_60555_, BlockGetter p_60556_, BlockPos p_60557_, CollisionContext p_60558_) protected int
getSignal
(BlockState p_60483_, BlockGetter p_60484_, BlockPos p_60485_, Direction p_60486_) protected SoundType
getSoundType
(BlockState p_328629_) 已过时。protected VoxelShape
getVisualShape
(BlockState p_60479_, BlockGetter p_60480_, BlockPos p_60481_, CollisionContext p_60482_) protected boolean
hasAnalogOutputSignal
(BlockState p_60457_) protected boolean
isAir
(BlockState state) protected boolean
isCollisionShapeFullBlock
(BlockState p_181242_, BlockGetter p_181243_, BlockPos p_181244_) protected boolean
isPathfindable
(BlockState p_60475_, PathComputationType p_60478_) protected boolean
isRandomlyTicking
(BlockState p_333968_) protected boolean
isSignalSource
(BlockState p_60571_) protected BlockState
mirror
(BlockState p_60528_, Mirror p_60529_) protected void
neighborChanged
(BlockState p_60509_, Level p_60510_, BlockPos p_60511_, Block p_60512_, Orientation p_364486_, boolean p_60514_) protected void
onExplosionHit
(BlockState p_310712_, ServerLevel p_367589_, BlockPos p_311490_, Explosion p_312709_, BiConsumer<ItemStack, BlockPos> p_311277_) protected void
onPlace
(BlockState p_60566_, Level p_60567_, BlockPos p_60568_, BlockState p_60569_, boolean p_60570_) protected void
onProjectileHit
(Level p_60453_, BlockState p_60454_, BlockHitResult p_60455_, Projectile p_60456_) protected void
onRemove
(BlockState p_60515_, Level p_60516_, BlockPos p_60517_, BlockState p_60518_, boolean p_60519_) protected boolean
propagatesSkylightDown
(BlockState p_331634_) protected static <B extends Block>
com.mojang.serialization.codecs.RecordCodecBuilder<B, BlockBehaviour.Properties> protected void
randomTick
(BlockState p_222954_, ServerLevel p_222955_, BlockPos p_222956_, RandomSource p_222957_) protected BlockState
rotate
(BlockState p_60530_, Rotation p_60531_) static <B extends Block>
com.mojang.serialization.MapCodec<B> simpleCodec
(Function<BlockBehaviour.Properties, B> p_312290_) protected boolean
skipRendering
(BlockState p_60532_, BlockState p_60533_, Direction p_60534_) protected void
spawnAfterBreak
(BlockState p_222949_, ServerLevel p_222950_, BlockPos p_222951_, ItemStack p_222952_, boolean p_222953_) protected void
tick
(BlockState p_222945_, ServerLevel p_222946_, BlockPos p_222947_, RandomSource p_222948_) protected boolean
triggerEvent
(BlockState p_60490_, Level p_60491_, BlockPos p_60492_, int p_60493_, int p_60494_) protected void
updateIndirectNeighbourShapes
(BlockState p_60520_, LevelAccessor p_60521_, BlockPos p_60522_, int p_60523_, int p_60524_) protected BlockState
updateShape
(BlockState p_60541_, LevelReader p_368027_, ScheduledTickAccess p_366146_, BlockPos p_60545_, Direction p_60542_, BlockPos p_60546_, BlockState p_60543_, RandomSource p_363918_) protected InteractionResult
useItemOn
(ItemStack p_330929_, BlockState p_335716_, Level p_336112_, BlockPos p_328869_, Player p_332840_, InteractionHand p_336117_, BlockHitResult p_332723_) protected boolean
useShapeForLightOcclusion
(BlockState p_60576_) protected InteractionResult
useWithoutItem
(BlockState p_60503_, Level p_60504_, BlockPos p_60505_, Player p_60506_, BlockHitResult p_60508_) 从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
从接口继承的方法 net.minecraft.world.flag.FeatureElement
isEnabled
-
字段详细资料
-
UPDATE_SHAPE_ORDER
-
hasCollision
protected final boolean hasCollision -
explosionResistance
protected final float explosionResistance -
isRandomlyTicking
protected final boolean isRandomlyTicking -
soundType
-
friction
protected final float friction -
speedFactor
protected final float speedFactor -
jumpFactor
protected final float jumpFactor -
dynamicShape
protected final boolean dynamicShape -
requiredFeatures
-
properties
-
drops
-
descriptionId
-
-
构造器详细资料
-
BlockBehaviour
-
-
方法详细资料
-
properties
-
codec
-
propertiesCodec
protected static <B extends Block> com.mojang.serialization.codecs.RecordCodecBuilder<B,BlockBehaviour.Properties> propertiesCodec() -
simpleCodec
public static <B extends Block> com.mojang.serialization.MapCodec<B> simpleCodec(Function<BlockBehaviour.Properties, B> p_312290_) -
updateIndirectNeighbourShapes
protected void updateIndirectNeighbourShapes(BlockState p_60520_, LevelAccessor p_60521_, BlockPos p_60522_, int p_60523_, int p_60524_) -
isPathfindable
-
updateShape
protected BlockState updateShape(BlockState p_60541_, LevelReader p_368027_, ScheduledTickAccess p_366146_, BlockPos p_60545_, Direction p_60542_, BlockPos p_60546_, BlockState p_60543_, RandomSource p_363918_) -
skipRendering
-
neighborChanged
protected void neighborChanged(BlockState p_60509_, Level p_60510_, BlockPos p_60511_, Block p_60512_, @Nullable Orientation p_364486_, boolean p_60514_) -
onPlace
protected void onPlace(BlockState p_60566_, Level p_60567_, BlockPos p_60568_, BlockState p_60569_, boolean p_60570_) -
onRemove
protected void onRemove(BlockState p_60515_, Level p_60516_, BlockPos p_60517_, BlockState p_60518_, boolean p_60519_) -
onExplosionHit
protected void onExplosionHit(BlockState p_310712_, ServerLevel p_367589_, BlockPos p_311490_, Explosion p_312709_, BiConsumer<ItemStack, BlockPos> p_311277_) -
useWithoutItem
protected InteractionResult useWithoutItem(BlockState p_60503_, Level p_60504_, BlockPos p_60505_, Player p_60506_, BlockHitResult p_60508_) -
useItemOn
protected InteractionResult useItemOn(ItemStack p_330929_, BlockState p_335716_, Level p_336112_, BlockPos p_328869_, Player p_332840_, InteractionHand p_336117_, BlockHitResult p_332723_) -
triggerEvent
protected boolean triggerEvent(BlockState p_60490_, Level p_60491_, BlockPos p_60492_, int p_60493_, int p_60494_) -
getRenderShape
-
useShapeForLightOcclusion
-
isSignalSource
-
getFluidState
-
hasAnalogOutputSignal
-
getMaxHorizontalOffset
protected float getMaxHorizontalOffset() -
getMaxVerticalOffset
protected float getMaxVerticalOffset() -
requiredFeatures
- 指定者:
requiredFeatures
在接口中FeatureElement
-
rotate
-
mirror
-
canBeReplaced
-
canBeReplaced
-
getDrops
-
getSeed
-
getOcclusionShape
-
getBlockSupportShape
protected VoxelShape getBlockSupportShape(BlockState p_60581_, BlockGetter p_60582_, BlockPos p_60583_) -
getInteractionShape
protected VoxelShape getInteractionShape(BlockState p_60547_, BlockGetter p_60548_, BlockPos p_60549_) -
getLightBlock
-
getMenuProvider
@Nullable protected MenuProvider getMenuProvider(BlockState p_60563_, Level p_60564_, BlockPos p_60565_) -
canSurvive
-
getShadeBrightness
-
getAnalogOutputSignal
-
getShape
protected VoxelShape getShape(BlockState p_60555_, BlockGetter p_60556_, BlockPos p_60557_, CollisionContext p_60558_) -
getCollisionShape
protected VoxelShape getCollisionShape(BlockState p_60572_, BlockGetter p_60573_, BlockPos p_60574_, CollisionContext p_60575_) -
isCollisionShapeFullBlock
protected boolean isCollisionShapeFullBlock(BlockState p_181242_, BlockGetter p_181243_, BlockPos p_181244_) -
getVisualShape
protected VoxelShape getVisualShape(BlockState p_60479_, BlockGetter p_60480_, BlockPos p_60481_, CollisionContext p_60482_) -
randomTick
protected void randomTick(BlockState p_222954_, ServerLevel p_222955_, BlockPos p_222956_, RandomSource p_222957_) -
tick
protected void tick(BlockState p_222945_, ServerLevel p_222946_, BlockPos p_222947_, RandomSource p_222948_) -
getDestroyProgress
protected float getDestroyProgress(BlockState p_60466_, Player p_60467_, BlockGetter p_60468_, BlockPos p_60469_) -
spawnAfterBreak
protected void spawnAfterBreak(BlockState p_222949_, ServerLevel p_222950_, BlockPos p_222951_, ItemStack p_222952_, boolean p_222953_) -
attack
-
getSignal
protected int getSignal(BlockState p_60483_, BlockGetter p_60484_, BlockPos p_60485_, Direction p_60486_) -
entityInside
protected void entityInside(BlockState p_60495_, Level p_60496_, BlockPos p_60497_, Entity p_60498_) -
getEntityInsideCollisionShape
protected VoxelShape getEntityInsideCollisionShape(BlockState p_362126_, Level p_362740_, BlockPos p_367338_) -
getDirectSignal
protected int getDirectSignal(BlockState p_60559_, BlockGetter p_60560_, BlockPos p_60561_, Direction p_60562_) -
getLootTable
-
getDescriptionId
-
onProjectileHit
protected void onProjectileHit(Level p_60453_, BlockState p_60454_, BlockHitResult p_60455_, Projectile p_60456_) -
propagatesSkylightDown
-
isRandomlyTicking
-
getSoundType
已过时。Use more sensitive version引用无效
IForgeBlockState#getSoundType(IWorldReader, BlockPos, Entity)
-
getCloneItemStack
protected ItemStack getCloneItemStack(LevelReader p_376835_, BlockPos p_375399_, BlockState p_375675_, boolean p_376021_) -
asItem
-
asBlock
-
defaultMapColor
-
defaultDestroyTime
public float defaultDestroyTime() -
isAir
-
引用无效