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 ResourceLocation
protected final boolean
protected final float
protected final float
protected final boolean
protected final boolean
protected final float
private final Supplier<ResourceLocation>
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()
void
attack
(BlockState p_60499_, Level p_60500_, BlockPos p_60501_, Player p_60502_) Deprecated.boolean
canBeReplaced
(BlockState p_60470_, BlockPlaceContext p_60471_) Deprecated.boolean
canBeReplaced
(BlockState p_60535_, Fluid p_60536_) Deprecated.boolean
canSurvive
(BlockState p_60525_, LevelReader p_60526_, BlockPos p_60527_) Deprecated.protected abstract com.mojang.serialization.MapCodec<? extends Block>
codec()
float
void
entityInside
(BlockState p_60495_, Level p_60496_, BlockPos p_60497_, Entity p_60498_) Deprecated.int
getAnalogOutputSignal
(BlockState p_60487_, Level p_60488_, BlockPos p_60489_) Deprecated.getBlockSupportShape
(BlockState p_60581_, BlockGetter p_60582_, BlockPos p_60583_) Deprecated.getCollisionShape
(BlockState p_60572_, BlockGetter p_60573_, BlockPos p_60574_, CollisionContext p_60575_) Deprecated.float
getDestroyProgress
(BlockState p_60466_, Player p_60467_, BlockGetter p_60468_, BlockPos p_60469_) Deprecated.int
getDirectSignal
(BlockState p_60559_, BlockGetter p_60560_, BlockPos p_60561_, Direction p_60562_) Deprecated.getDrops
(BlockState p_287732_, LootParams.Builder p_287596_) Deprecated.getFluidState
(BlockState p_60577_) Deprecated.getInteractionShape
(BlockState p_60547_, BlockGetter p_60548_, BlockPos p_60549_) Deprecated.int
getLightBlock
(BlockState p_60585_, BlockGetter p_60586_, BlockPos p_60587_) Deprecated.final ResourceLocation
float
float
getMenuProvider
(BlockState p_60563_, Level p_60564_, BlockPos p_60565_) Deprecated.getOcclusionShape
(BlockState p_60578_, BlockGetter p_60579_, BlockPos p_60580_) Deprecated.getRenderShape
(BlockState p_60550_) Deprecated.long
getSeed
(BlockState p_60539_, BlockPos p_60540_) Deprecated.float
getShadeBrightness
(BlockState p_60472_, BlockGetter p_60473_, BlockPos p_60474_) Deprecated.getShape
(BlockState p_60555_, BlockGetter p_60556_, BlockPos p_60557_, CollisionContext p_60558_) Deprecated.int
getSignal
(BlockState p_60483_, BlockGetter p_60484_, BlockPos p_60485_, Direction p_60486_) Deprecated.getVisualShape
(BlockState p_60479_, BlockGetter p_60480_, BlockPos p_60481_, CollisionContext p_60482_) Deprecated.boolean
hasAnalogOutputSignal
(BlockState p_60457_) Deprecated.protected boolean
isAir
(BlockState state) boolean
isCollisionShapeFullBlock
(BlockState p_181242_, BlockGetter p_181243_, BlockPos p_181244_) Deprecated.boolean
isOcclusionShapeFullBlock
(BlockState p_222959_, BlockGetter p_222960_, BlockPos p_222961_) Deprecated.boolean
isPathfindable
(BlockState p_60475_, BlockGetter p_60476_, BlockPos p_60477_, PathComputationType p_60478_) Deprecated.boolean
isSignalSource
(BlockState p_60571_) Deprecated.mirror
(BlockState p_60528_, Mirror p_60529_) Deprecated.void
neighborChanged
(BlockState p_60509_, Level p_60510_, BlockPos p_60511_, Block p_60512_, BlockPos p_60513_, boolean p_60514_) Deprecated.void
onExplosionHit
(BlockState p_311951_, Level p_312820_, BlockPos p_312489_, Explosion p_312925_, BiConsumer<ItemStack, BlockPos> p_312073_) Deprecated.void
onPlace
(BlockState p_60566_, Level p_60567_, BlockPos p_60568_, BlockState p_60569_, boolean p_60570_) Deprecated.void
onProjectileHit
(Level p_60453_, BlockState p_60454_, BlockHitResult p_60455_, Projectile p_60456_) Deprecated.void
onRemove
(BlockState p_60515_, Level p_60516_, BlockPos p_60517_, BlockState p_60518_, boolean p_60519_) Deprecated.static <B extends Block>
com.mojang.serialization.codecs.RecordCodecBuilder<B,BlockBehaviour.Properties> void
randomTick
(BlockState p_222954_, ServerLevel p_222955_, BlockPos p_222956_, RandomSource p_222957_) Deprecated.rotate
(BlockState p_60530_, Rotation p_60531_) Deprecated.static <B extends Block>
com.mojang.serialization.MapCodec<B>simpleCodec
(Function<BlockBehaviour.Properties, B> p_304394_) boolean
skipRendering
(BlockState p_60532_, BlockState p_60533_, Direction p_60534_) Deprecated.void
spawnAfterBreak
(BlockState p_222949_, ServerLevel p_222950_, BlockPos p_222951_, ItemStack p_222952_, boolean p_222953_) Deprecated.void
tick
(BlockState p_222945_, ServerLevel p_222946_, BlockPos p_222947_, RandomSource p_222948_) Deprecated.boolean
triggerEvent
(BlockState p_60490_, Level p_60491_, BlockPos p_60492_, int p_60493_, int p_60494_) Deprecated.void
updateIndirectNeighbourShapes
(BlockState p_60520_, LevelAccessor p_60521_, BlockPos p_60522_, int p_60523_, int p_60524_) Deprecated.updateShape
(BlockState p_60541_, Direction p_60542_, BlockState p_60543_, LevelAccessor p_60544_, BlockPos p_60545_, BlockPos p_60546_) Deprecated.use
(BlockState p_60503_, Level p_60504_, BlockPos p_60505_, Player p_60506_, InteractionHand p_60507_, BlockHitResult p_60508_) Deprecated.boolean
useShapeForLightOcclusion
(BlockState p_60576_) Deprecated.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
@Deprecated public void updateIndirectNeighbourShapes(BlockState p_60520_, LevelAccessor p_60521_, BlockPos p_60522_, int p_60523_, int p_60524_) Deprecated. -
isPathfindable
@Deprecated public boolean isPathfindable(BlockState p_60475_, BlockGetter p_60476_, BlockPos p_60477_, PathComputationType p_60478_) Deprecated. -
updateShape
@Deprecated public BlockState updateShape(BlockState p_60541_, Direction p_60542_, BlockState p_60543_, LevelAccessor p_60544_, BlockPos p_60545_, BlockPos p_60546_) Deprecated. -
skipRendering
@Deprecated public boolean skipRendering(BlockState p_60532_, BlockState p_60533_, Direction p_60534_) Deprecated. -
neighborChanged
@Deprecated public void neighborChanged(BlockState p_60509_, Level p_60510_, BlockPos p_60511_, Block p_60512_, BlockPos p_60513_, boolean p_60514_) Deprecated. -
onPlace
@Deprecated public void onPlace(BlockState p_60566_, Level p_60567_, BlockPos p_60568_, BlockState p_60569_, boolean p_60570_) Deprecated. -
onRemove
@Deprecated public void onRemove(BlockState p_60515_, Level p_60516_, BlockPos p_60517_, BlockState p_60518_, boolean p_60519_) Deprecated. -
onExplosionHit
@Deprecated public void onExplosionHit(BlockState p_311951_, Level p_312820_, BlockPos p_312489_, Explosion p_312925_, BiConsumer<ItemStack, BlockPos> p_312073_) Deprecated. -
use
@Deprecated public InteractionResult use(BlockState p_60503_, Level p_60504_, BlockPos p_60505_, Player p_60506_, InteractionHand p_60507_, BlockHitResult p_60508_) Deprecated. -
triggerEvent
@Deprecated public boolean triggerEvent(BlockState p_60490_, Level p_60491_, BlockPos p_60492_, int p_60493_, int p_60494_) Deprecated. -
getRenderShape
Deprecated. -
useShapeForLightOcclusion
Deprecated. -
isSignalSource
Deprecated. -
getFluidState
Deprecated. -
hasAnalogOutputSignal
Deprecated. -
getMaxHorizontalOffset
public float getMaxHorizontalOffset() -
getMaxVerticalOffset
public float getMaxVerticalOffset() -
requiredFeatures
- Specified by:
requiredFeatures
in interfaceFeatureElement
-
rotate
Deprecated. -
mirror
Deprecated. -
canBeReplaced
Deprecated. -
canBeReplaced
Deprecated. -
getDrops
Deprecated. -
getSeed
Deprecated. -
getOcclusionShape
@Deprecated public VoxelShape getOcclusionShape(BlockState p_60578_, BlockGetter p_60579_, BlockPos p_60580_) Deprecated. -
getBlockSupportShape
@Deprecated public VoxelShape getBlockSupportShape(BlockState p_60581_, BlockGetter p_60582_, BlockPos p_60583_) Deprecated. -
getInteractionShape
@Deprecated public VoxelShape getInteractionShape(BlockState p_60547_, BlockGetter p_60548_, BlockPos p_60549_) Deprecated. -
getLightBlock
Deprecated. -
getMenuProvider
@Nullable @Deprecated public MenuProvider getMenuProvider(BlockState p_60563_, Level p_60564_, BlockPos p_60565_) Deprecated. -
canSurvive
Deprecated. -
getShadeBrightness
@Deprecated public float getShadeBrightness(BlockState p_60472_, BlockGetter p_60473_, BlockPos p_60474_) Deprecated. -
getAnalogOutputSignal
@Deprecated public int getAnalogOutputSignal(BlockState p_60487_, Level p_60488_, BlockPos p_60489_) Deprecated. -
getShape
@Deprecated public VoxelShape getShape(BlockState p_60555_, BlockGetter p_60556_, BlockPos p_60557_, CollisionContext p_60558_) Deprecated. -
getCollisionShape
@Deprecated public VoxelShape getCollisionShape(BlockState p_60572_, BlockGetter p_60573_, BlockPos p_60574_, CollisionContext p_60575_) Deprecated. -
isCollisionShapeFullBlock
@Deprecated public boolean isCollisionShapeFullBlock(BlockState p_181242_, BlockGetter p_181243_, BlockPos p_181244_) Deprecated. -
isOcclusionShapeFullBlock
@Deprecated public boolean isOcclusionShapeFullBlock(BlockState p_222959_, BlockGetter p_222960_, BlockPos p_222961_) Deprecated. -
getVisualShape
@Deprecated public VoxelShape getVisualShape(BlockState p_60479_, BlockGetter p_60480_, BlockPos p_60481_, CollisionContext p_60482_) Deprecated. -
randomTick
@Deprecated public void randomTick(BlockState p_222954_, ServerLevel p_222955_, BlockPos p_222956_, RandomSource p_222957_) Deprecated. -
tick
@Deprecated public void tick(BlockState p_222945_, ServerLevel p_222946_, BlockPos p_222947_, RandomSource p_222948_) Deprecated. -
getDestroyProgress
@Deprecated public float getDestroyProgress(BlockState p_60466_, Player p_60467_, BlockGetter p_60468_, BlockPos p_60469_) Deprecated. -
spawnAfterBreak
@Deprecated public void spawnAfterBreak(BlockState p_222949_, ServerLevel p_222950_, BlockPos p_222951_, ItemStack p_222952_, boolean p_222953_) Deprecated. -
attack
@Deprecated public void attack(BlockState p_60499_, Level p_60500_, BlockPos p_60501_, Player p_60502_) Deprecated. -
getSignal
@Deprecated public int getSignal(BlockState p_60483_, BlockGetter p_60484_, BlockPos p_60485_, Direction p_60486_) Deprecated. -
entityInside
@Deprecated public void entityInside(BlockState p_60495_, Level p_60496_, BlockPos p_60497_, Entity p_60498_) Deprecated. -
getDirectSignal
@Deprecated public int getDirectSignal(BlockState p_60559_, BlockGetter p_60560_, BlockPos p_60561_, Direction p_60562_) Deprecated. -
getLootTable
-
onProjectileHit
@Deprecated public void onProjectileHit(Level p_60453_, BlockState p_60454_, BlockHitResult p_60455_, Projectile p_60456_) Deprecated. -
asItem
-
asBlock
-
defaultMapColor
-
defaultDestroyTime
public float defaultDestroyTime() -
isAir
-