Package net.minecraft.block
Class AbstractBlock.AbstractBlockState
java.lang.Object
net.minecraft.state.StateHolder<Block,BlockState>
net.minecraft.block.AbstractBlock.AbstractBlockState
- Direct Known Subclasses:
BlockState
- Enclosing class:
- AbstractBlock
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static final class -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected AbstractBlock.AbstractBlockState.Cacheprivate final booleanprivate final floatprivate final AbstractBlock.IPositionPredicateprivate final AbstractBlock.IPositionPredicateprivate final booleanprivate final AbstractBlock.IPositionPredicateprivate final AbstractBlock.IPositionPredicateprivate final AbstractBlock.IPositionPredicateprivate final intprivate final Materialprivate final MaterialColorprivate final booleanprivate final booleanFields inherited from class net.minecraft.state.StateHolder
owner, propertiesCodec -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractBlockState(Block p_i231870_1_, com.google.common.collect.ImmutableMap<Property<?>, Comparable<?>> p_i231870_2_, com.mojang.serialization.MapCodec<BlockState> p_i231870_3_) -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract BlockStateasState()voidattack(World p_196942_1_, BlockPos p_196942_2_, PlayerEntity p_196942_3_) booleancanBeReplaced(Fluid p_227032_1_) booleancanBeReplaced(BlockItemUseContext p_196953_1_) booleanbooleancanSurvive(IWorldReader p_196955_1_, BlockPos p_196955_2_) booleanemissiveRendering(IBlockReader p_227035_1_, BlockPos p_227035_2_) final booleanentityCanStandOn(IBlockReader p_235719_1_, BlockPos p_235719_2_, Entity p_235719_3_) final booleanentityCanStandOnFace(IBlockReader p_215682_1_, BlockPos p_215682_2_, Entity p_215682_3_, Direction p_215682_4_) voidentityInside(World p_196950_1_, BlockPos p_196950_2_, Entity p_196950_3_) intgetAnalogOutputSignal(World p_185888_1_, BlockPos p_185888_2_) getBlock()getBlockSupportShape(IBlockReader p_196951_1_, BlockPos p_196951_2_) getCollisionShape(IBlockReader p_196952_1_, BlockPos p_196952_2_) getCollisionShape(IBlockReader p_215685_1_, BlockPos p_215685_2_, ISelectionContext p_215685_3_) floatgetDestroyProgress(PlayerEntity p_185903_1_, IBlockReader p_185903_2_, BlockPos p_185903_3_) floatgetDestroySpeed(IBlockReader p_185887_1_, BlockPos p_185887_2_) intgetDirectSignal(IBlockReader p_185893_1_, BlockPos p_185893_2_, Direction p_185893_3_) getDrops(LootContext.Builder p_215693_1_) getFaceOcclusionShape(IBlockReader p_215702_1_, BlockPos p_215702_2_, Direction p_215702_3_) getInteractionShape(IBlockReader p_235777_1_, BlockPos p_235777_2_) intgetLightBlock(IBlockReader p_200016_1_, BlockPos p_200016_2_) intDeprecated.getMapColor(IBlockReader p_185909_1_, BlockPos p_185909_2_) getMenuProvider(World p_215699_1_, BlockPos p_215699_2_) getOcclusionShape(IBlockReader p_235754_1_, BlockPos p_235754_2_) getOffset(IBlockReader p_191059_1_, BlockPos p_191059_2_) longfloatgetShadeBrightness(IBlockReader p_215703_1_, BlockPos p_215703_2_) getShape(IBlockReader p_196954_1_, BlockPos p_196954_2_) getShape(IBlockReader p_215700_1_, BlockPos p_215700_2_, ISelectionContext p_215700_3_) intgetSignal(IBlockReader p_185911_1_, BlockPos p_185911_2_, Direction p_185911_3_) getVisualShape(IBlockReader p_199611_1_, BlockPos p_199611_2_, ISelectionContext p_199611_3_) booleanbooleanbooleanhasPostProcess(IBlockReader p_202065_1_, BlockPos p_202065_2_) voidbooleanbooleanbooleanis(ITag<Block> p_235715_1_, Predicate<AbstractBlock.AbstractBlockState> p_235715_2_) booleanisAir()Deprecated.useIForgeBlockState.isAir(IBlockReader, BlockPos)until 1.17, at which point this method will be undreprecated.booleanisCollisionShapeFullBlock(IBlockReader p_235785_1_, BlockPos p_235785_2_) booleanisFaceSturdy(IBlockReader p_224755_1_, BlockPos p_224755_2_, Direction p_224755_3_) booleanisFaceSturdy(IBlockReader p_242698_1_, BlockPos p_242698_2_, Direction p_242698_3_, BlockVoxelShape p_242698_4_) booleanisPathfindable(IBlockReader p_196957_1_, BlockPos p_196957_2_, PathType p_196957_3_) booleanbooleanisRedstoneConductor(IBlockReader p_215686_1_, BlockPos p_215686_2_) booleanbooleanisSolidRender(IBlockReader p_200015_1_, BlockPos p_200015_2_) booleanisSuffocating(IBlockReader p_229980_1_, BlockPos p_229980_2_) booleanisValidSpawn(IBlockReader p_215688_1_, BlockPos p_215688_2_, EntityType<?> p_215688_3_) booleanisViewBlocking(IBlockReader p_215696_1_, BlockPos p_215696_2_) voidneighborChanged(World p_215697_1_, BlockPos p_215697_2_, Block p_215697_3_, BlockPos p_215697_4_, boolean p_215697_5_) voidonPlace(World p_215705_1_, BlockPos p_215705_2_, BlockState p_215705_3_, boolean p_215705_4_) voidonProjectileHit(World p_215690_1_, BlockState p_215690_2_, BlockRayTraceResult p_215690_3_, ProjectileEntity p_215690_4_) voidonRemove(World p_196947_1_, BlockPos p_196947_2_, BlockState p_196947_3_, boolean p_196947_4_) booleanpropagatesSkylightDown(IBlockReader p_200131_1_, BlockPos p_200131_2_) voidrandomTick(ServerWorld p_227034_1_, BlockPos p_227034_2_, Random p_227034_3_) booleanDeprecated.booleanskipRendering(BlockState p_200017_1_, Direction p_200017_2_) voidspawnAfterBreak(ServerWorld p_215706_1_, BlockPos p_215706_2_, ItemStack p_215706_3_) voidtick(ServerWorld p_227033_1_, BlockPos p_227033_2_, Random p_227033_3_) booleantriggerEvent(World p_235728_1_, BlockPos p_235728_2_, int p_235728_3_, int p_235728_4_) final voidupdateIndirectNeighbourShapes(IWorld p_196948_1_, BlockPos p_196948_2_, int p_196948_3_) voidupdateIndirectNeighbourShapes(IWorld p_241483_1_, BlockPos p_241483_2_, int p_241483_3_, int p_241483_4_) final voidupdateNeighbourShapes(IWorld p_235734_1_, BlockPos p_235734_2_, int p_235734_3_) final voidupdateNeighbourShapes(IWorld p_241482_1_, BlockPos p_241482_2_, int p_241482_3_, int p_241482_4_) updateShape(Direction p_196956_1_, BlockState p_196956_2_, IWorld p_196956_3_, BlockPos p_196956_4_, BlockPos p_196956_5_) use(World p_227031_1_, PlayerEntity p_227031_2_, Hand p_227031_3_, BlockRayTraceResult p_227031_4_) booleanMethods inherited from class net.minecraft.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
-
cache
-
-
Constructor Details
-
AbstractBlockState
protected AbstractBlockState(Block p_i231870_1_, com.google.common.collect.ImmutableMap<Property<?>, Comparable<?>> p_i231870_2_, com.mojang.serialization.MapCodec<BlockState> p_i231870_3_)
-
-
Method Details
-
initCache
public void initCache() -
getBlock
-
getMaterial
-
isValidSpawn
public boolean isValidSpawn(IBlockReader p_215688_1_, BlockPos p_215688_2_, EntityType<?> p_215688_3_) -
propagatesSkylightDown
-
getLightBlock
-
getFaceOcclusionShape
public VoxelShape getFaceOcclusionShape(IBlockReader p_215702_1_, BlockPos p_215702_2_, Direction p_215702_3_) -
getOcclusionShape
-
hasLargeCollisionShape
public boolean hasLargeCollisionShape() -
useShapeForLightOcclusion
public boolean useShapeForLightOcclusion() -
getLightEmission
Deprecated. -
isAir
Deprecated.useIForgeBlockState.isAir(IBlockReader, BlockPos)until 1.17, at which point this method will be undreprecated. See https://github.com/MinecraftForge/MinecraftForge/issues/7409 for more details -
getMapColor
-
rotate
Deprecated. -
mirror
-
getRenderShape
-
emissiveRendering
-
getShadeBrightness
-
isRedstoneConductor
-
isSignalSource
public boolean isSignalSource() -
getSignal
-
hasAnalogOutputSignal
public boolean hasAnalogOutputSignal() -
getAnalogOutputSignal
-
getDestroySpeed
-
getDestroyProgress
public float getDestroyProgress(PlayerEntity p_185903_1_, IBlockReader p_185903_2_, BlockPos p_185903_3_) -
getDirectSignal
-
getPistonPushReaction
-
isSolidRender
-
canOcclude
public boolean canOcclude() -
skipRendering
-
getShape
-
getShape
public VoxelShape getShape(IBlockReader p_215700_1_, BlockPos p_215700_2_, ISelectionContext p_215700_3_) -
getCollisionShape
-
getCollisionShape
public VoxelShape getCollisionShape(IBlockReader p_215685_1_, BlockPos p_215685_2_, ISelectionContext p_215685_3_) -
getBlockSupportShape
-
getVisualShape
public VoxelShape getVisualShape(IBlockReader p_199611_1_, BlockPos p_199611_2_, ISelectionContext p_199611_3_) -
getInteractionShape
-
entityCanStandOn
public final boolean entityCanStandOn(IBlockReader p_235719_1_, BlockPos p_235719_2_, Entity p_235719_3_) -
entityCanStandOnFace
public final boolean entityCanStandOnFace(IBlockReader p_215682_1_, BlockPos p_215682_2_, Entity p_215682_3_, Direction p_215682_4_) -
getOffset
-
triggerEvent
-
neighborChanged
-
updateNeighbourShapes
-
updateNeighbourShapes
-
updateIndirectNeighbourShapes
-
updateIndirectNeighbourShapes
-
onPlace
public void onPlace(World p_215705_1_, BlockPos p_215705_2_, BlockState p_215705_3_, boolean p_215705_4_) -
onRemove
public void onRemove(World p_196947_1_, BlockPos p_196947_2_, BlockState p_196947_3_, boolean p_196947_4_) -
tick
-
randomTick
-
entityInside
-
spawnAfterBreak
-
getDrops
-
use
public ActionResultType use(World p_227031_1_, PlayerEntity p_227031_2_, Hand p_227031_3_, BlockRayTraceResult p_227031_4_) -
attack
-
isSuffocating
-
isViewBlocking
-
updateShape
public BlockState updateShape(Direction p_196956_1_, BlockState p_196956_2_, IWorld p_196956_3_, BlockPos p_196956_4_, BlockPos p_196956_5_) -
isPathfindable
-
canBeReplaced
-
canBeReplaced
-
canSurvive
-
hasPostProcess
-
getMenuProvider
-
is
-
is
-
is
-
getFluidState
-
isRandomlyTicking
public boolean isRandomlyTicking() -
getSeed
-
getSoundType
-
onProjectileHit
public void onProjectileHit(World p_215690_1_, BlockState p_215690_2_, BlockRayTraceResult p_215690_3_, ProjectileEntity p_215690_4_) -
isFaceSturdy
-
isFaceSturdy
public boolean isFaceSturdy(IBlockReader p_242698_1_, BlockPos p_242698_2_, Direction p_242698_3_, BlockVoxelShape p_242698_4_) -
isCollisionShapeFullBlock
-
asState
-
requiresCorrectToolForDrops
public boolean requiresCorrectToolForDrops()
-
IForgeBlockState.getLightValue(IBlockReader, BlockPos)