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<?>>
allowsSpawningPredicate
private AbstractBlock.ContextPredicate
blockVisionPredicate
private boolean
collidable
private boolean
dynamicBounds
private AbstractBlock.ContextPredicate
emissiveLightingPredicate
private float
hardness
private boolean
isAir
private float
jumpVelocityMultiplier
private Identifier
lootTableId
private ToIntFunction<BlockState>
luminance
private Material
material
private Function<BlockState,MaterialColor>
materialColorFactory
private boolean
opaque
private AbstractBlock.ContextPredicate
postProcessPredicate
private boolean
randomTicks
private float
resistance
private float
slipperiness
private AbstractBlock.ContextPredicate
solidBlockPredicate
private BlockSoundGroup
soundGroup
private AbstractBlock.ContextPredicate
suffocationPredicate
private boolean
toolRequired
private float
velocityMultiplier
-
Constructor Summary
Constructors Modifier Constructor Description private
Settings(Material material, Function<BlockState,MaterialColor> materialColorFactory)
private
Settings(Material material, MaterialColor materialColorFactory)
-
Method Summary
-
Field Details
-
material
-
materialColorFactory
-
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,MaterialColor> materialColor) -
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
-