Package net.minecraft.block
Class AbstractBlock.Settings
java.lang.Object
net.minecraft.block.AbstractBlock.Settings
- Enclosing class:
- AbstractBlock
public static class AbstractBlock.Settings extends Object
-
Field Summary
Fields Modifier and Type Field Description private AbstractBlock.TypedContextPredicate<EntityType<?>>allowsSpawningPredicateprivate AbstractBlock.ContextPredicateblockVisionPredicateprivate booleancollidableprivate booleandynamicBoundsprivate AbstractBlock.ContextPredicateemissiveLightingPredicateprivate floathardnessprivate booleanisAirprivate floatjumpVelocityMultiplierprivate IdentifierlootTableIdprivate ToIntFunction<BlockState>luminanceprivate Function<BlockState,MapColor>mapColorProviderprivate Materialmaterialprivate booleanopaqueprivate AbstractBlock.ContextPredicatepostProcessPredicateprivate booleanrandomTicksprivate floatresistanceprivate floatslipperinessprivate AbstractBlock.ContextPredicatesolidBlockPredicateprivate BlockSoundGroupsoundGroupprivate AbstractBlock.ContextPredicatesuffocationPredicateprivate booleantoolRequiredprivate floatvelocityMultiplier -
Constructor Summary
-
Method Summary
-
Field Details
-
material
-
mapColorProvider
-
collidable
private boolean collidable -
soundGroup
-
luminance
-
resistance
private float resistance -
hardness
private float hardness -
toolRequired
private boolean toolRequired -
randomTicks
private boolean randomTicks -
slipperiness
private float slipperiness -
velocityMultiplier
private float velocityMultiplier -
jumpVelocityMultiplier
private float jumpVelocityMultiplier -
lootTableId
-
opaque
private boolean opaque -
isAir
private boolean isAir -
allowsSpawningPredicate
-
solidBlockPredicate
-
suffocationPredicate
-
blockVisionPredicate
-
postProcessPredicate
-
emissiveLightingPredicate
-
dynamicBounds
private boolean dynamicBounds
-
-
Constructor Details
-
Settings
-
Settings
-
-
Method Details
-
of
-
of
-
of
-
of
public static AbstractBlock.Settings of(Material material, Function<BlockState,MapColor> mapColor) -
copy
-
noCollision
Specifies that a block should have no collision bounds.This also marks a block as non-opaque.
-
nonOpaque
Specifies that a block should be non-opaque and light should be allowed to pass through. -
slipperiness
-
velocityMultiplier
-
jumpVelocityMultiplier
-
sounds
-
luminance
Specifies the light level emitted by a block.- Parameters:
luminance- a per block state light level, with values between 0 and 15
-
strength
-
breakInstantly
Specifies that a block is broken instantly. -
strength
-
ticksRandomly
-
dynamicBounds
Specifies that a block's collision bounds can dynamically resize. By default, block collision bounds are cached for performance. By invoking this method, the game will not cache the block collision bounds and instead calculate the collision bounds when needed. -
dropsNothing
Specifies that a block drops nothing when broken. -
dropsLike
Specifies that a block should drop the same items as a provided block.- Parameters:
source- the block to copy item drops from
-
air
-
allowsSpawning
public AbstractBlock.Settings allowsSpawning(AbstractBlock.TypedContextPredicate<EntityType<?>> predicate)Specifies logic that calculates whether an entity can spawn on a block.- Parameters:
predicate- the predicate used to calculate whether an entity can spawn on this block
-
solidBlock
-
suffocates
Specifies logic that calculates whether an entity should suffocate if inside of a block. -
blockVision
-
postProcess
-
emissiveLighting
-
requiresTool
-
mapColor
-