Class BlockBehaviour
java.lang.Object
net.minecraft.world.level.block.state.BlockBehaviour
- All Implemented Interfaces:
FeatureElement
- Direct Known Subclasses:
Block
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static interface
static enum
static class
static interface
static interface
-
Field Summary
Modifier and TypeFieldDescriptionprotected ResourceKey
<LootTable> protected final boolean
protected final float
protected final float
protected final boolean
protected final boolean
protected final float
private final Supplier
<ResourceKey<LootTable>> protected final BlockBehaviour.Properties
protected final FeatureFlagSet
protected final SoundType
protected final float
protected static final Direction[]
Fields inherited from interface net.minecraft.world.flag.FeatureElement
FILTERED_REGISTRIES
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected 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 VoxelShape
getCollisionShape
(BlockState p_60572_, BlockGetter p_60573_, BlockPos p_60574_, CollisionContext p_60575_) 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 FluidState
getFluidState
(BlockState p_60577_) protected VoxelShape
getInteractionShape
(BlockState p_60547_, BlockGetter p_60548_, BlockPos p_60549_) protected int
getLightBlock
(BlockState p_60585_, BlockGetter p_60586_, BlockPos p_60587_) final ResourceKey
<LootTable> protected float
protected float
protected MenuProvider
getMenuProvider
(BlockState p_60563_, Level p_60564_, BlockPos p_60565_) protected VoxelShape
getOcclusionShape
(BlockState p_60578_, BlockGetter p_60579_, BlockPos p_60580_) 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_320941_) Deprecated.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
isOcclusionShapeFullBlock
(BlockState p_222959_, BlockGetter p_222960_, BlockPos p_222961_) protected boolean
isPathfindable
(BlockState p_60475_, PathComputationType p_60478_) protected boolean
isRandomlyTicking
(BlockState p_320297_) 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_, BlockPos p_60513_, boolean p_60514_) protected void
onExplosionHit
(BlockState p_311951_, Level p_312820_, BlockPos p_312489_, Explosion p_312925_, BiConsumer<ItemStack, BlockPos> p_312073_) 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_320652_, BlockGetter p_320953_, BlockPos p_320082_) 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_304394_) 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_, Direction p_60542_, BlockState p_60543_, LevelAccessor p_60544_, BlockPos p_60545_, BlockPos p_60546_) protected ItemInteractionResult
useItemOn
(ItemStack p_316304_, BlockState p_316362_, Level p_316459_, BlockPos p_316366_, Player p_316132_, InteractionHand p_316595_, BlockHitResult p_316140_) protected boolean
useShapeForLightOcclusion
(BlockState p_60576_) protected InteractionResult
useWithoutItem
(BlockState p_60503_, Level p_60504_, BlockPos p_60505_, Player p_60506_, BlockHitResult p_60508_) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraft.world.flag.FeatureElement
isEnabled
-
Field Details
-
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
-
lootTableSupplier
-
-
Constructor Details
-
BlockBehaviour
-
-
Method Details
-
properties
-
codec
-
propertiesCodec
public 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_304394_) -
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_, Direction p_60542_, BlockState p_60543_, LevelAccessor p_60544_, BlockPos p_60545_, BlockPos p_60546_) -
skipRendering
-
neighborChanged
protected void neighborChanged(BlockState p_60509_, Level p_60510_, BlockPos p_60511_, Block p_60512_, BlockPos p_60513_, 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_311951_, Level p_312820_, BlockPos p_312489_, Explosion p_312925_, BiConsumer<ItemStack, BlockPos> p_312073_) -
useWithoutItem
protected InteractionResult useWithoutItem(BlockState p_60503_, Level p_60504_, BlockPos p_60505_, Player p_60506_, BlockHitResult p_60508_) -
useItemOn
protected ItemInteractionResult useItemOn(ItemStack p_316304_, BlockState p_316362_, Level p_316459_, BlockPos p_316366_, Player p_316132_, InteractionHand p_316595_, BlockHitResult p_316140_) -
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
- Specified by:
requiredFeatures
in interfaceFeatureElement
-
rotate
-
mirror
-
canBeReplaced
-
canBeReplaced
-
getDrops
-
getSeed
-
getOcclusionShape
protected VoxelShape getOcclusionShape(BlockState p_60578_, BlockGetter p_60579_, BlockPos p_60580_) -
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_) -
isOcclusionShapeFullBlock
protected boolean isOcclusionShapeFullBlock(BlockState p_222959_, BlockGetter p_222960_, BlockPos p_222961_) -
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_) -
getDirectSignal
protected int getDirectSignal(BlockState p_60559_, BlockGetter p_60560_, BlockPos p_60561_, Direction p_60562_) -
getLootTable
-
onProjectileHit
protected void onProjectileHit(Level p_60453_, BlockState p_60454_, BlockHitResult p_60455_, Projectile p_60456_) -
propagatesSkylightDown
protected boolean propagatesSkylightDown(BlockState p_320652_, BlockGetter p_320953_, BlockPos p_320082_) -
isRandomlyTicking
-
getSoundType
Deprecated. -
asItem
-
asBlock
-
defaultMapColor
-
defaultDestroyTime
public float defaultDestroyTime() -
isAir
-