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
Modifier and TypeClassDescription(package private) static final class
-
Field Summary
Modifier and TypeFieldDescriptionprotected AbstractBlock.AbstractBlockState.Cache
private final boolean
private final float
private final AbstractBlock.IPositionPredicate
private final AbstractBlock.IPositionPredicate
private final boolean
private final AbstractBlock.IPositionPredicate
private final AbstractBlock.IPositionPredicate
private final AbstractBlock.IPositionPredicate
private final int
private final Material
private final MaterialColor
private final boolean
private final boolean
Fields inherited from class net.minecraft.state.StateHolder
owner, propertiesCodec
-
Constructor Summary
ModifierConstructorDescriptionprotected
AbstractBlockState
(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 BlockState
asState()
void
attack
(World p_196942_1_, BlockPos p_196942_2_, PlayerEntity p_196942_3_) boolean
canBeReplaced
(Fluid p_227032_1_) boolean
canBeReplaced
(BlockItemUseContext p_196953_1_) boolean
boolean
canSurvive
(IWorldReader p_196955_1_, BlockPos p_196955_2_) boolean
emissiveRendering
(IBlockReader p_227035_1_, BlockPos p_227035_2_) final boolean
entityCanStandOn
(IBlockReader p_235719_1_, BlockPos p_235719_2_, Entity p_235719_3_) final boolean
entityCanStandOnFace
(IBlockReader p_215682_1_, BlockPos p_215682_2_, Entity p_215682_3_, Direction p_215682_4_) void
entityInside
(World p_196950_1_, BlockPos p_196950_2_, Entity p_196950_3_) int
getAnalogOutputSignal
(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_) float
getDestroyProgress
(PlayerEntity p_185903_1_, IBlockReader p_185903_2_, BlockPos p_185903_3_) float
getDestroySpeed
(IBlockReader p_185887_1_, BlockPos p_185887_2_) int
getDirectSignal
(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_) int
getLightBlock
(IBlockReader p_200016_1_, BlockPos p_200016_2_) int
Deprecated.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_) long
float
getShadeBrightness
(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_) int
getSignal
(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_) boolean
boolean
boolean
hasPostProcess
(IBlockReader p_202065_1_, BlockPos p_202065_2_) void
boolean
boolean
boolean
is
(ITag<Block> p_235715_1_, Predicate<AbstractBlock.AbstractBlockState> p_235715_2_) boolean
isAir()
Deprecated.useIForgeBlockState.isAir(IBlockReader, BlockPos)
until 1.17, at which point this method will be undreprecated.boolean
isCollisionShapeFullBlock
(IBlockReader p_235785_1_, BlockPos p_235785_2_) boolean
isFaceSturdy
(IBlockReader p_224755_1_, BlockPos p_224755_2_, Direction p_224755_3_) boolean
isFaceSturdy
(IBlockReader p_242698_1_, BlockPos p_242698_2_, Direction p_242698_3_, BlockVoxelShape p_242698_4_) boolean
isPathfindable
(IBlockReader p_196957_1_, BlockPos p_196957_2_, PathType p_196957_3_) boolean
boolean
isRedstoneConductor
(IBlockReader p_215686_1_, BlockPos p_215686_2_) boolean
boolean
isSolidRender
(IBlockReader p_200015_1_, BlockPos p_200015_2_) boolean
isSuffocating
(IBlockReader p_229980_1_, BlockPos p_229980_2_) boolean
isValidSpawn
(IBlockReader p_215688_1_, BlockPos p_215688_2_, EntityType<?> p_215688_3_) boolean
isViewBlocking
(IBlockReader p_215696_1_, BlockPos p_215696_2_) void
neighborChanged
(World p_215697_1_, BlockPos p_215697_2_, Block p_215697_3_, BlockPos p_215697_4_, boolean p_215697_5_) void
onPlace
(World p_215705_1_, BlockPos p_215705_2_, BlockState p_215705_3_, boolean p_215705_4_) void
onProjectileHit
(World p_215690_1_, BlockState p_215690_2_, BlockRayTraceResult p_215690_3_, ProjectileEntity p_215690_4_) void
onRemove
(World p_196947_1_, BlockPos p_196947_2_, BlockState p_196947_3_, boolean p_196947_4_) boolean
propagatesSkylightDown
(IBlockReader p_200131_1_, BlockPos p_200131_2_) void
randomTick
(ServerWorld p_227034_1_, BlockPos p_227034_2_, Random p_227034_3_) boolean
Deprecated.boolean
skipRendering
(BlockState p_200017_1_, Direction p_200017_2_) void
spawnAfterBreak
(ServerWorld p_215706_1_, BlockPos p_215706_2_, ItemStack p_215706_3_) void
tick
(ServerWorld p_227033_1_, BlockPos p_227033_2_, Random p_227033_3_) boolean
triggerEvent
(World p_235728_1_, BlockPos p_235728_2_, int p_235728_3_, int p_235728_4_) final void
updateIndirectNeighbourShapes
(IWorld p_196948_1_, BlockPos p_196948_2_, int p_196948_3_) void
updateIndirectNeighbourShapes
(IWorld p_241483_1_, BlockPos p_241483_2_, int p_241483_3_, int p_241483_4_) final void
updateNeighbourShapes
(IWorld p_235734_1_, BlockPos p_235734_2_, int p_235734_3_) final void
updateNeighbourShapes
(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_) boolean
Methods 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)