Class BlockBehaviour.BlockStateBase
java.lang.Object
net.minecraft.world.level.block.state.StateHolder<Block,BlockState>
net.minecraft.world.level.block.state.BlockBehaviour.BlockStateBase
- Direct Known Subclasses:
BlockState
- Enclosing class:
BlockBehaviour
-
Nested Class Summary
Modifier and TypeClassDescription(package private) static final class
-
Field Summary
Modifier and TypeFieldDescriptionprotected BlockBehaviour.BlockStateBase.Cache
private final boolean
private final float
private final BlockBehaviour.StatePredicate
private FluidState
private final BlockBehaviour.StatePredicate
private final boolean
private final NoteBlockInstrument
private final boolean
private boolean
private final BlockBehaviour.StatePredicate
private final BlockBehaviour.StatePredicate
private final BlockBehaviour.StatePredicate
private boolean
Deprecated.private final int
private final boolean
Deprecated.private final MapColor
private final BlockBehaviour.OffsetFunction
private final PushReaction
private final boolean
private final boolean
private final boolean
private final boolean
Fields inherited from class net.minecraft.world.level.block.state.StateHolder
NAME_TAG, owner, PROPERTIES_TAG, propertiesCodec
-
Constructor Summary
ModifierConstructorDescriptionprotected
BlockStateBase
(Block p_60608_, it.unimi.dsi.fastutil.objects.Reference2ObjectArrayMap<Property<?>, Comparable<?>> p_326208_, com.mojang.serialization.MapCodec<BlockState> p_60610_) -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract BlockState
asState()
void
boolean
Deprecated.private boolean
boolean
boolean
canBeReplaced
(BlockPlaceContext p_60630_) boolean
canBeReplaced
(Fluid p_60723_) boolean
boolean
canSurvive
(LevelReader p_60711_, BlockPos p_60712_) boolean
emissiveRendering
(BlockGetter p_60789_, BlockPos p_60790_) final boolean
entityCanStandOn
(BlockGetter p_60635_, BlockPos p_60636_, Entity p_60637_) final boolean
entityCanStandOnFace
(BlockGetter p_60639_, BlockPos p_60640_, Entity p_60641_, Direction p_60642_) void
entityInside
(Level p_60683_, BlockPos p_60684_, Entity p_60685_) int
getAnalogOutputSignal
(Level p_60675_, BlockPos p_60676_) getBlock()
getBlockSupportShape
(BlockGetter p_60817_, BlockPos p_60818_) getCollisionShape
(BlockGetter p_60813_, BlockPos p_60814_) getCollisionShape
(BlockGetter p_60743_, BlockPos p_60744_, CollisionContext p_60745_) float
getDestroyProgress
(Player p_60626_, BlockGetter p_60627_, BlockPos p_60628_) float
getDestroySpeed
(BlockGetter p_60801_, BlockPos p_60802_) int
getDirectSignal
(BlockGetter p_60776_, BlockPos p_60777_, Direction p_60778_) getDrops
(LootParams.Builder p_287688_) getFaceOcclusionShape
(BlockGetter p_60656_, BlockPos p_60657_, Direction p_60658_) getInteractionShape
(BlockGetter p_60821_, BlockPos p_60822_) int
getLightBlock
(BlockGetter p_60740_, BlockPos p_60741_) int
Deprecated.getMapColor
(BlockGetter p_285002_, BlockPos p_285293_) getMenuProvider
(Level p_60751_, BlockPos p_60752_) getOcclusionShape
(BlockGetter p_60769_, BlockPos p_60770_) getOffset
(BlockGetter p_60825_, BlockPos p_60826_) long
float
getShadeBrightness
(BlockGetter p_60793_, BlockPos p_60794_) getShape
(BlockGetter p_60809_, BlockPos p_60810_) getShape
(BlockGetter p_60652_, BlockPos p_60653_, CollisionContext p_60654_) int
getSignal
(BlockGetter p_60747_, BlockPos p_60748_, Direction p_60749_) Deprecated.getTags()
<T extends BlockEntity>
BlockEntityTicker<T> getTicker
(Level p_155945_, BlockEntityType<T> p_155946_) getVisualShape
(BlockGetter p_60772_, BlockPos p_60773_, CollisionContext p_60774_) void
handleNeighborChanged
(Level p_60691_, BlockPos p_60692_, Block p_60693_, BlockPos p_60694_, boolean p_60695_) boolean
boolean
boolean
boolean
boolean
hasPostProcess
(BlockGetter p_60836_, BlockPos p_60837_) boolean
void
boolean
boolean
boolean
is
(ResourceKey<Block> p_304668_) boolean
boolean
is
(TagKey<Block> p_204339_, Predicate<BlockBehaviour.BlockStateBase> p_204340_) boolean
boolean
isAir()
boolean
isCollisionShapeFullBlock
(BlockGetter p_60839_, BlockPos p_60840_) boolean
isFaceSturdy
(BlockGetter p_60784_, BlockPos p_60785_, Direction p_60786_) boolean
isFaceSturdy
(BlockGetter p_60660_, BlockPos p_60661_, Direction p_60662_, SupportType p_60663_) boolean
isPathfindable
(PathComputationType p_60650_) boolean
boolean
isRedstoneConductor
(BlockGetter p_60797_, BlockPos p_60798_) boolean
boolean
isSolid()
Deprecated.boolean
isSolidRender
(BlockGetter p_60805_, BlockPos p_60806_) boolean
isSuffocating
(BlockGetter p_60829_, BlockPos p_60830_) boolean
isValidSpawn
(BlockGetter p_60644_, BlockPos p_60645_, EntityType<?> p_60646_) boolean
isViewBlocking
(BlockGetter p_60832_, BlockPos p_60833_) boolean
liquid()
Deprecated.void
onExplosionHit
(Level p_312839_, BlockPos p_311872_, Explosion p_312863_, BiConsumer<ItemStack, BlockPos> p_312559_) void
onPlace
(Level p_60697_, BlockPos p_60698_, BlockState p_60699_, boolean p_60700_) void
onProjectileHit
(Level p_60670_, BlockState p_60671_, BlockHitResult p_60672_, Projectile p_60673_) void
onRemove
(Level p_60754_, BlockPos p_60755_, BlockState p_60756_, boolean p_60757_) boolean
propagatesSkylightDown
(BlockGetter p_60632_, BlockPos p_60633_) void
randomTick
(ServerLevel p_222973_, BlockPos p_222974_, RandomSource p_222975_) boolean
Deprecated.boolean
boolean
skipRendering
(BlockState p_60720_, Direction p_60721_) void
spawnAfterBreak
(ServerLevel p_222968_, BlockPos p_222969_, ItemStack p_222970_, boolean p_222971_) void
tick
(ServerLevel p_222964_, BlockPos p_222965_, RandomSource p_222966_) boolean
triggerEvent
(Level p_60678_, BlockPos p_60679_, int p_60680_, int p_60681_) final void
updateIndirectNeighbourShapes
(LevelAccessor p_60759_, BlockPos p_60760_, int p_60761_) void
updateIndirectNeighbourShapes
(LevelAccessor p_60763_, BlockPos p_60764_, int p_60765_, int p_60766_) final void
updateNeighbourShapes
(LevelAccessor p_60702_, BlockPos p_60703_, int p_60704_) final void
updateNeighbourShapes
(LevelAccessor p_60706_, BlockPos p_60707_, int p_60708_, int p_60709_) updateShape
(Direction p_60729_, BlockState p_60730_, LevelAccessor p_60731_, BlockPos p_60732_, BlockPos p_60733_) useItemOn
(ItemStack p_316374_, Level p_316651_, Player p_316623_, InteractionHand p_316469_, BlockHitResult p_316877_) boolean
useWithoutItem
(Level p_316368_, Player p_316500_, BlockHitResult p_316346_) Methods inherited from class net.minecraft.world.level.block.state.StateHolder
codec, cycle, findNextInCollection, getOptionalValue, getProperties, getValue, getValues, hasProperty, populateNeighbours, setValue, toString, trySetValue
-
Field Details
-
lightEmission
private final int lightEmission -
useShapeForLightOcclusion
private final boolean useShapeForLightOcclusion -
isAir
private final boolean isAir -
ignitedByLava
private final boolean ignitedByLava -
liquid
Deprecated. -
legacySolid
Deprecated. -
pushReaction
-
mapColor
-
destroySpeed
private final float destroySpeed -
requiresCorrectToolForDrops
private final boolean requiresCorrectToolForDrops -
canOcclude
private final boolean canOcclude -
isRedstoneConductor
-
isSuffocating
-
isViewBlocking
-
hasPostProcess
-
emissiveRendering
-
offsetFunction
-
spawnTerrainParticles
private final boolean spawnTerrainParticles -
instrument
-
replaceable
private final boolean replaceable -
cache
-
fluidState
-
isRandomlyTicking
private boolean isRandomlyTicking
-
-
Constructor Details
-
BlockStateBase
protected BlockStateBase(Block p_60608_, it.unimi.dsi.fastutil.objects.Reference2ObjectArrayMap<Property<?>, Comparable<?>> p_326208_, com.mojang.serialization.MapCodec<BlockState> p_60610_)
-
-
Method Details
-
calculateSolid
private boolean calculateSolid() -
initCache
public void initCache() -
getBlock
-
getBlockHolder
-
blocksMotion
Deprecated. -
isSolid
Deprecated. -
isValidSpawn
-
propagatesSkylightDown
-
getLightBlock
-
getFaceOcclusionShape
public VoxelShape getFaceOcclusionShape(BlockGetter p_60656_, BlockPos p_60657_, Direction p_60658_) -
getOcclusionShape
-
hasLargeCollisionShape
public boolean hasLargeCollisionShape() -
useShapeForLightOcclusion
public boolean useShapeForLightOcclusion() -
getLightEmission
Deprecated.Forge: UseIBlockStateExtension.getLightEmission(BlockGetter, BlockPos)
instead -
isAir
public boolean isAir() -
ignitedByLava
public boolean ignitedByLava() -
liquid
Deprecated. -
getMapColor
-
rotate
Deprecated. -
mirror
-
getRenderShape
-
emissiveRendering
-
getShadeBrightness
-
isRedstoneConductor
-
isSignalSource
public boolean isSignalSource() -
getSignal
-
hasAnalogOutputSignal
public boolean hasAnalogOutputSignal() -
getAnalogOutputSignal
-
getDestroySpeed
-
getDestroyProgress
-
getDirectSignal
-
getPistonPushReaction
-
isSolidRender
-
canOcclude
public boolean canOcclude() -
skipRendering
-
getShape
-
getShape
-
getCollisionShape
-
getCollisionShape
public VoxelShape getCollisionShape(BlockGetter p_60743_, BlockPos p_60744_, CollisionContext p_60745_) -
getBlockSupportShape
-
getVisualShape
public VoxelShape getVisualShape(BlockGetter p_60772_, BlockPos p_60773_, CollisionContext p_60774_) -
getInteractionShape
-
entityCanStandOn
-
entityCanStandOnFace
public final boolean entityCanStandOnFace(BlockGetter p_60639_, BlockPos p_60640_, Entity p_60641_, Direction p_60642_) -
getOffset
-
hasOffsetFunction
public boolean hasOffsetFunction() -
triggerEvent
-
handleNeighborChanged
-
updateNeighbourShapes
-
updateNeighbourShapes
public final void updateNeighbourShapes(LevelAccessor p_60706_, BlockPos p_60707_, int p_60708_, int p_60709_) -
updateIndirectNeighbourShapes
public final void updateIndirectNeighbourShapes(LevelAccessor p_60759_, BlockPos p_60760_, int p_60761_) -
updateIndirectNeighbourShapes
public void updateIndirectNeighbourShapes(LevelAccessor p_60763_, BlockPos p_60764_, int p_60765_, int p_60766_) -
onPlace
-
onRemove
-
onExplosionHit
-
tick
-
randomTick
-
entityInside
-
spawnAfterBreak
public void spawnAfterBreak(ServerLevel p_222968_, BlockPos p_222969_, ItemStack p_222970_, boolean p_222971_) -
getDrops
-
useItemOn
public ItemInteractionResult useItemOn(ItemStack p_316374_, Level p_316651_, Player p_316623_, InteractionHand p_316469_, BlockHitResult p_316877_) -
useWithoutItem
public InteractionResult useWithoutItem(Level p_316368_, Player p_316500_, BlockHitResult p_316346_) -
attack
-
isSuffocating
-
isViewBlocking
-
updateShape
public BlockState updateShape(Direction p_60729_, BlockState p_60730_, LevelAccessor p_60731_, BlockPos p_60732_, BlockPos p_60733_) -
isPathfindable
-
canBeReplaced
-
canBeReplaced
-
canBeReplaced
public boolean canBeReplaced() -
canSurvive
-
hasPostProcess
-
getMenuProvider
-
is
-
is
-
is
-
is
-
getTags
-
hasBlockEntity
public boolean hasBlockEntity() -
getTicker
@Nullable public <T extends BlockEntity> BlockEntityTicker<T> getTicker(Level p_155945_, BlockEntityType<T> p_155946_) -
is
-
is
-
getFluidState
-
isRandomlyTicking
public boolean isRandomlyTicking() -
getSeed
-
getSoundType
Deprecated. -
onProjectileHit
public void onProjectileHit(Level p_60670_, BlockState p_60671_, BlockHitResult p_60672_, Projectile p_60673_) -
isFaceSturdy
-
isFaceSturdy
public boolean isFaceSturdy(BlockGetter p_60660_, BlockPos p_60661_, Direction p_60662_, SupportType p_60663_) -
isCollisionShapeFullBlock
-
asState
-
requiresCorrectToolForDrops
public boolean requiresCorrectToolForDrops() -
shouldSpawnTerrainParticles
public boolean shouldSpawnTerrainParticles() -
instrument
-
IBlockStateExtension.getLightEmission(BlockGetter, BlockPos)
instead