Class BlockBehaviour
java.lang.Object
net.minecraft.world.level.block.state.BlockBehaviour
- All Implemented Interfaces:
FeatureElement
- Direct Known Subclasses:
Block
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic interfacestatic enumstatic classstatic interfacestatic interface -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ResourceKey<LootTable> protected final booleanprotected final floatprotected final floatprotected final booleanprotected final booleanprotected final floatprivate final Supplier<ResourceKey<LootTable>> protected final BlockBehaviour.Propertiesprotected final FeatureFlagSetprotected final SoundTypeprotected final floatprotected static final Direction[]Fields inherited from interface net.minecraft.world.flag.FeatureElement
FILTERED_REGISTRIES -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract BlockasBlock()abstract ItemasItem()protected voidattack(BlockState p_60499_, Level p_60500_, BlockPos p_60501_, Player p_60502_) protected booleancanBeReplaced(BlockState p_60470_, BlockPlaceContext p_60471_) protected booleancanBeReplaced(BlockState p_60535_, Fluid p_60536_) protected booleancanSurvive(BlockState p_60525_, LevelReader p_60526_, BlockPos p_60527_) protected abstract com.mojang.serialization.MapCodec<? extends Block> codec()floatprotected voidentityInside(BlockState p_60495_, Level p_60496_, BlockPos p_60497_, Entity p_60498_) protected intgetAnalogOutputSignal(BlockState p_60487_, Level p_60488_, BlockPos p_60489_) protected VoxelShapegetBlockSupportShape(BlockState p_60581_, BlockGetter p_60582_, BlockPos p_60583_) protected VoxelShapegetCollisionShape(BlockState p_60572_, BlockGetter p_60573_, BlockPos p_60574_, CollisionContext p_60575_) protected floatgetDestroyProgress(BlockState p_60466_, Player p_60467_, BlockGetter p_60468_, BlockPos p_60469_) protected intgetDirectSignal(BlockState p_60559_, BlockGetter p_60560_, BlockPos p_60561_, Direction p_60562_) getDrops(BlockState p_287732_, LootParams.Builder p_287596_) protected FluidStategetFluidState(BlockState p_60577_) protected VoxelShapegetInteractionShape(BlockState p_60547_, BlockGetter p_60548_, BlockPos p_60549_) protected intgetLightBlock(BlockState p_60585_, BlockGetter p_60586_, BlockPos p_60587_) final ResourceKey<LootTable> protected floatprotected floatprotected MenuProvidergetMenuProvider(BlockState p_60563_, Level p_60564_, BlockPos p_60565_) protected VoxelShapegetOcclusionShape(BlockState p_60578_, BlockGetter p_60579_, BlockPos p_60580_) protected RenderShapegetRenderShape(BlockState p_60550_) protected longgetSeed(BlockState p_60539_, BlockPos p_60540_) protected floatgetShadeBrightness(BlockState p_60472_, BlockGetter p_60473_, BlockPos p_60474_) protected VoxelShapegetShape(BlockState p_60555_, BlockGetter p_60556_, BlockPos p_60557_, CollisionContext p_60558_) protected intgetSignal(BlockState p_60483_, BlockGetter p_60484_, BlockPos p_60485_, Direction p_60486_) protected SoundTypegetSoundType(BlockState p_328629_) Deprecated.protected VoxelShapegetVisualShape(BlockState p_60479_, BlockGetter p_60480_, BlockPos p_60481_, CollisionContext p_60482_) protected booleanhasAnalogOutputSignal(BlockState p_60457_) protected booleanisAir(BlockState state) protected booleanisCollisionShapeFullBlock(BlockState p_181242_, BlockGetter p_181243_, BlockPos p_181244_) protected booleanisOcclusionShapeFullBlock(BlockState p_222959_, BlockGetter p_222960_, BlockPos p_222961_) protected booleanisPathfindable(BlockState p_60475_, PathComputationType p_60478_) protected booleanisRandomlyTicking(BlockState p_333968_) protected booleanisSignalSource(BlockState p_60571_) protected BlockStatemirror(BlockState p_60528_, Mirror p_60529_) protected voidneighborChanged(BlockState p_60509_, Level p_60510_, BlockPos p_60511_, Block p_60512_, BlockPos p_60513_, boolean p_60514_) protected voidonExplosionHit(BlockState p_310712_, Level p_311693_, BlockPos p_311490_, Explosion p_312709_, BiConsumer<ItemStack, BlockPos> p_311277_) protected voidonPlace(BlockState p_60566_, Level p_60567_, BlockPos p_60568_, BlockState p_60569_, boolean p_60570_) protected voidonProjectileHit(Level p_60453_, BlockState p_60454_, BlockHitResult p_60455_, Projectile p_60456_) protected voidonRemove(BlockState p_60515_, Level p_60516_, BlockPos p_60517_, BlockState p_60518_, boolean p_60519_) protected booleanpropagatesSkylightDown(BlockState p_331634_, BlockGetter p_328736_, BlockPos p_328401_) protected static <B extends Block>
com.mojang.serialization.codecs.RecordCodecBuilder<B, BlockBehaviour.Properties> protected voidrandomTick(BlockState p_222954_, ServerLevel p_222955_, BlockPos p_222956_, RandomSource p_222957_) protected BlockStaterotate(BlockState p_60530_, Rotation p_60531_) static <B extends Block>
com.mojang.serialization.MapCodec<B> simpleCodec(Function<BlockBehaviour.Properties, B> p_312290_) protected booleanskipRendering(BlockState p_60532_, BlockState p_60533_, Direction p_60534_) protected voidspawnAfterBreak(BlockState p_222949_, ServerLevel p_222950_, BlockPos p_222951_, ItemStack p_222952_, boolean p_222953_) protected voidtick(BlockState p_222945_, ServerLevel p_222946_, BlockPos p_222947_, RandomSource p_222948_) protected booleantriggerEvent(BlockState p_60490_, Level p_60491_, BlockPos p_60492_, int p_60493_, int p_60494_) protected voidupdateIndirectNeighbourShapes(BlockState p_60520_, LevelAccessor p_60521_, BlockPos p_60522_, int p_60523_, int p_60524_) protected BlockStateupdateShape(BlockState p_60541_, Direction p_60542_, BlockState p_60543_, LevelAccessor p_60544_, BlockPos p_60545_, BlockPos p_60546_) protected ItemInteractionResultuseItemOn(ItemStack p_330929_, BlockState p_335716_, Level p_336112_, BlockPos p_328869_, Player p_332840_, InteractionHand p_336117_, BlockHitResult p_332723_) protected booleanuseShapeForLightOcclusion(BlockState p_60576_) protected InteractionResultuseWithoutItem(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, waitMethods 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
-
lootTableSupplier
-
drops
-
-
Constructor Details
-
BlockBehaviour
-
-
Method Details
-
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_, 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_310712_, Level p_311693_, 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 ItemInteractionResult 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
- Specified by:
requiredFeaturesin 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_331634_, BlockGetter p_328736_, BlockPos p_328401_) -
isRandomlyTicking
-
getSoundType
Deprecated.Use more sensitive versioninvalid reference
IForgeBlockState#getSoundType(IWorldReader, BlockPos, Entity) -
asItem
-
asBlock
-
defaultMapColor
-
defaultDestroyTime
public float defaultDestroyTime() -
isAir
-
invalid reference