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
Nested ClassesModifier and TypeClassDescription(package private) static final class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final boolean
private final float
private static final Direction[]
private final BlockBehaviour.StatePredicate
private static final VoxelShape[]
private FluidState
private static final VoxelShape[]
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 int
private final int
private final boolean
Deprecated.private final MapColor
private VoxelShape
private VoxelShape[]
private final BlockBehaviour.OffsetFunction
private boolean
private final PushReaction
private final boolean
private final boolean
private 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
ConstructorsModifierConstructorDescriptionprotected
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 TypeMethodDescriptionvoid
affectNeighborsAfterRemoval
(ServerLevel p_394387_, BlockPos p_394482_, boolean p_394128_) protected 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_, InsideBlockEffectApplier p_404722_) int
getAnalogOutputSignal
(Level p_60675_, BlockPos p_60676_) getBlock()
getBlockSupportShape
(BlockGetter p_60817_, BlockPos p_60818_) getCloneItemStack
(LevelReader p_382841_, BlockPos p_382980_, boolean p_387610_) 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_) getEntityInsideCollisionShape
(BlockGetter p_399863_, BlockPos p_371798_, Entity p_399825_) getFaceOcclusionShape
(Direction p_60658_) getInteractionShape
(BlockGetter p_60821_, BlockPos p_60822_) int
int
Deprecated.getMapColor
(BlockGetter p_285002_, BlockPos p_285293_) getMenuProvider
(Level p_60751_, BlockPos p_60752_) 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_, Orientation p_364063_, 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
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
(ServerLevel p_361755_, 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_) boolean
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
(LevelReader p_374280_, ScheduledTickAccess p_374430_, BlockPos p_60732_, Direction p_60729_, BlockPos p_60733_, BlockState p_60730_, RandomSource p_374164_) 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, equals, findNextInCollection, getOptionalValue, getProperties, getValue, getValueOrElse, getValues, hashCode, hasProperty, populateNeighbours, setValue, toString, trySetValue
-
Field Details
-
DIRECTIONS
-
EMPTY_OCCLUSION_SHAPES
-
FULL_BLOCK_OCCLUSION_SHAPES
-
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 -
solidRender
private boolean solidRender -
occlusionShape
-
occlusionShapesByFace
-
propagatesSkylightDown
private boolean propagatesSkylightDown -
lightBlock
private int lightBlock
-
-
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
public boolean propagatesSkylightDown() -
getLightBlock
public int getLightBlock() -
getFaceOcclusionShape
-
getOcclusionShape
-
hasLargeCollisionShape
public boolean hasLargeCollisionShape() -
useShapeForLightOcclusion
public boolean useShapeForLightOcclusion() -
getLightEmission
Deprecated.Neo: 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
public boolean isSolidRender() -
canOcclude
public boolean canOcclude() -
skipRendering
-
getShape
-
getShape
-
getCollisionShape
-
getCollisionShape
public VoxelShape getCollisionShape(BlockGetter p_60743_, BlockPos p_60744_, CollisionContext p_60745_) -
getEntityInsideCollisionShape
public VoxelShape getEntityInsideCollisionShape(BlockGetter p_399863_, BlockPos p_371798_, Entity p_399825_) -
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
public void handleNeighborChanged(Level p_60691_, BlockPos p_60692_, Block p_60693_, @Nullable Orientation p_364063_, boolean p_60695_) -
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
-
affectNeighborsAfterRemoval
public void affectNeighborsAfterRemoval(ServerLevel p_394387_, BlockPos p_394482_, boolean p_394128_) -
onExplosionHit
public void onExplosionHit(ServerLevel p_361755_, BlockPos p_311872_, Explosion p_312863_, BiConsumer<ItemStack, BlockPos> p_312559_) -
tick
-
randomTick
-
entityInside
public void entityInside(Level p_60683_, BlockPos p_60684_, Entity p_60685_, InsideBlockEffectApplier p_404722_) -
spawnAfterBreak
public void spawnAfterBreak(ServerLevel p_222968_, BlockPos p_222969_, ItemStack p_222970_, boolean p_222971_) -
getDrops
-
useItemOn
public InteractionResult 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(LevelReader p_374280_, ScheduledTickAccess p_374430_, BlockPos p_60732_, Direction p_60729_, BlockPos p_60733_, BlockState p_60730_, RandomSource p_374164_) -
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
-
getCloneItemStack
-
asState
-
requiresCorrectToolForDrops
public boolean requiresCorrectToolForDrops() -
shouldSpawnTerrainParticles
public boolean shouldSpawnTerrainParticles() -
instrument
-
IBlockStateExtension.getLightEmission(BlockGetter, BlockPos)
instead