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 final BlockBehaviour.StatePredicate
private final boolean
private final BlockBehaviour.StatePredicate
private final BlockBehaviour.StatePredicate
private final BlockBehaviour.StatePredicate
private final int
private final Material
private final MaterialColor
private final BlockBehaviour.OffsetType
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_, com.google.common.collect.ImmutableMap<Property<?>, Comparable<?>> p_60609_, com.mojang.serialization.MapCodec<BlockState> p_60610_) -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract BlockState
asState()
void
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
(LootContext.Builder p_60725_) 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_60781_, BlockPos p_60782_) 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_) getTags()
<T extends BlockEntity>
BlockEntityTicker<T>getTicker
(Level p_155945_, BlockEntityType<T> p_155946_) getVisualShape
(BlockGetter p_60772_, BlockPos p_60773_, CollisionContext p_60774_) boolean
boolean
boolean
boolean
hasPostProcess
(BlockGetter p_60836_, BlockPos p_60837_) void
boolean
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
(BlockGetter p_60648_, BlockPos p_60649_, PathComputationType p_60650_) boolean
boolean
isRedstoneConductor
(BlockGetter p_60797_, BlockPos p_60798_) boolean
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_) void
neighborChanged
(Level p_60691_, BlockPos p_60692_, Block p_60693_, BlockPos p_60694_, boolean p_60695_) Deprecated.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
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_) use
(Level p_60665_, Player p_60666_, InteractionHand p_60667_, BlockHitResult p_60668_) boolean
Methods inherited from class net.minecraft.world.level.block.state.StateHolder
codec, cycle, findNextInCollection, getOptionalValue, getProperties, getValue, getValues, hasProperty, populateNeighbours, setValue, toString
-
Field Details
-
lightEmission
private final int lightEmission -
useShapeForLightOcclusion
private final boolean useShapeForLightOcclusion -
isAir
private final boolean isAir -
material
-
materialColor
-
destroySpeed
private final float destroySpeed -
requiresCorrectToolForDrops
private final boolean requiresCorrectToolForDrops -
canOcclude
private final boolean canOcclude -
isRedstoneConductor
-
isSuffocating
-
isViewBlocking
-
hasPostProcess
-
emissiveRendering
-
offsetType
-
cache
-
-
Constructor Details
-
BlockStateBase
protected BlockStateBase(Block p_60608_, com.google.common.collect.ImmutableMap<Property<?>, Comparable<?>> p_60609_, com.mojang.serialization.MapCodec<BlockState> p_60610_)
-
-
Method Details
-
initCache
public void initCache() -
getBlock
-
getBlockHolder
-
getMaterial
-
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. -
isAir
public boolean isAir() -
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
-
triggerEvent
-
neighborChanged
@Deprecated public void neighborChanged(Level p_60691_, BlockPos p_60692_, Block p_60693_, BlockPos p_60694_, boolean p_60695_) Deprecated. -
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
-
tick
-
randomTick
-
entityInside
-
spawnAfterBreak
public void spawnAfterBreak(ServerLevel p_222968_, BlockPos p_222969_, ItemStack p_222970_, boolean p_222971_) -
getDrops
-
use
public InteractionResult use(Level p_60665_, Player p_60666_, InteractionHand p_60667_, BlockHitResult p_60668_) -
attack
-
isSuffocating
-
isViewBlocking
-
updateShape
public BlockState updateShape(Direction p_60729_, BlockState p_60730_, LevelAccessor p_60731_, BlockPos p_60732_, BlockPos p_60733_) -
isPathfindable
public boolean isPathfindable(BlockGetter p_60648_, BlockPos p_60649_, PathComputationType p_60650_) -
canBeReplaced
-
canBeReplaced
-
canSurvive
-
hasPostProcess
-
getMenuProvider
-
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
-
getFluidState
-
isRandomlyTicking
public boolean isRandomlyTicking() -
getSeed
-
getSoundType
-
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() -
getOffsetType
-
IForgeBlockState.getLightEmission(BlockGetter, BlockPos)