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 TypeFieldDescriptionprotected BlockBehaviour.BlockStateBase.Cacheprivate final booleanprivate final floatprivate final BlockBehaviour.StatePredicateprivate FluidStateprivate final BlockBehaviour.StatePredicateprivate final booleanprivate final NoteBlockInstrumentprivate final booleanprivate booleanprivate final BlockBehaviour.StatePredicateprivate final BlockBehaviour.StatePredicateprivate final BlockBehaviour.StatePredicateprivate booleanDeprecated.private final intprivate final booleanDeprecated.private final MapColorprivate final BlockBehaviour.OffsetFunctionprivate final PushReactionprivate final booleanprivate final booleanprivate final booleanprivate final booleanFields inherited from class net.minecraft.world.level.block.state.StateHolder
NAME_TAG, owner, PROPERTIES_TAG, propertiesCodec -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedBlockStateBase(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 BlockStateasState()voidbooleanDeprecated.private booleanbooleanbooleancanBeReplaced(BlockPlaceContext p_60630_) booleancanBeReplaced(Fluid p_60723_) booleanbooleancanSurvive(LevelReader p_60711_, BlockPos p_60712_) booleanemissiveRendering(BlockGetter p_60789_, BlockPos p_60790_) final booleanentityCanStandOn(BlockGetter p_60635_, BlockPos p_60636_, Entity p_60637_) final booleanentityCanStandOnFace(BlockGetter p_60639_, BlockPos p_60640_, Entity p_60641_, Direction p_60642_) voidentityInside(Level p_60683_, BlockPos p_60684_, Entity p_60685_) intgetAnalogOutputSignal(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_) floatgetDestroyProgress(Player p_60626_, BlockGetter p_60627_, BlockPos p_60628_) floatgetDestroySpeed(BlockGetter p_60801_, BlockPos p_60802_) intgetDirectSignal(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_) intgetLightBlock(BlockGetter p_60740_, BlockPos p_60741_) intDeprecated.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_) longfloatgetShadeBrightness(BlockGetter p_60793_, BlockPos p_60794_) getShape(BlockGetter p_60809_, BlockPos p_60810_) getShape(BlockGetter p_60652_, BlockPos p_60653_, CollisionContext p_60654_) intgetSignal(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_) voidhandleNeighborChanged(Level p_60691_, BlockPos p_60692_, Block p_60693_, BlockPos p_60694_, boolean p_60695_) booleanbooleanbooleanbooleanbooleanhasPostProcess(BlockGetter p_60836_, BlockPos p_60837_) booleanvoidbooleanbooleanbooleanis(ResourceKey<Block> p_304668_) booleanbooleanis(TagKey<Block> p_204339_, Predicate<BlockBehaviour.BlockStateBase> p_204340_) booleanbooleanisAir()booleanisCollisionShapeFullBlock(BlockGetter p_60839_, BlockPos p_60840_) booleanisFaceSturdy(BlockGetter p_60784_, BlockPos p_60785_, Direction p_60786_) booleanisFaceSturdy(BlockGetter p_60660_, BlockPos p_60661_, Direction p_60662_, SupportType p_60663_) booleanisPathfindable(PathComputationType p_60650_) booleanbooleanisRedstoneConductor(BlockGetter p_60797_, BlockPos p_60798_) booleanbooleanisSolid()Deprecated.booleanisSolidRender(BlockGetter p_60805_, BlockPos p_60806_) booleanisSuffocating(BlockGetter p_60829_, BlockPos p_60830_) booleanisValidSpawn(BlockGetter p_60644_, BlockPos p_60645_, EntityType<?> p_60646_) booleanisViewBlocking(BlockGetter p_60832_, BlockPos p_60833_) booleanliquid()Deprecated.voidonExplosionHit(Level p_312839_, BlockPos p_311872_, Explosion p_312863_, BiConsumer<ItemStack, BlockPos> p_312559_) voidonPlace(Level p_60697_, BlockPos p_60698_, BlockState p_60699_, boolean p_60700_) voidonProjectileHit(Level p_60670_, BlockState p_60671_, BlockHitResult p_60672_, Projectile p_60673_) voidonRemove(Level p_60754_, BlockPos p_60755_, BlockState p_60756_, boolean p_60757_) booleanpropagatesSkylightDown(BlockGetter p_60632_, BlockPos p_60633_) voidrandomTick(ServerLevel p_222973_, BlockPos p_222974_, RandomSource p_222975_) booleanDeprecated.booleanbooleanskipRendering(BlockState p_60720_, Direction p_60721_) voidspawnAfterBreak(ServerLevel p_222968_, BlockPos p_222969_, ItemStack p_222970_, boolean p_222971_) voidtick(ServerLevel p_222964_, BlockPos p_222965_, RandomSource p_222966_) booleantriggerEvent(Level p_60678_, BlockPos p_60679_, int p_60680_, int p_60681_) final voidupdateIndirectNeighbourShapes(LevelAccessor p_60759_, BlockPos p_60760_, int p_60761_) voidupdateIndirectNeighbourShapes(LevelAccessor p_60763_, BlockPos p_60764_, int p_60765_, int p_60766_) final voidupdateNeighbourShapes(LevelAccessor p_60702_, BlockPos p_60703_, int p_60704_) final voidupdateNeighbourShapes(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_) booleanuseWithoutItem(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