public static class AbstractBlock.Settings extends Object
Modifier and Type | Field and 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 |
Modifier | Constructor and Description |
---|---|
private |
Settings(Material material,
Function<BlockState,MaterialColor> materialColorFactory) |
private |
Settings(Material material,
MaterialColor materialColorFactory) |
private Material material
private Function<BlockState,MaterialColor> materialColorFactory
private boolean collidable
private BlockSoundGroup soundGroup
private ToIntFunction<BlockState> luminance
private float resistance
private float hardness
private boolean toolRequired
private boolean randomTicks
private float slipperiness
private float velocityMultiplier
private float jumpVelocityMultiplier
private Identifier lootTableId
private boolean opaque
private boolean isAir
private AbstractBlock.TypedContextPredicate<EntityType<?>> allowsSpawningPredicate
private AbstractBlock.ContextPredicate solidBlockPredicate
private AbstractBlock.ContextPredicate suffocationPredicate
private AbstractBlock.ContextPredicate blockVisionPredicate
private AbstractBlock.ContextPredicate postProcessPredicate
private AbstractBlock.ContextPredicate emissiveLightingPredicate
private boolean dynamicBounds
private Settings(Material material, MaterialColor materialColorFactory)
private Settings(Material material, Function<BlockState,MaterialColor> materialColorFactory)
public static AbstractBlock.Settings of(Material material)
public static AbstractBlock.Settings of(Material material, DyeColor color)
public static AbstractBlock.Settings of(Material material, MaterialColor color)
public static AbstractBlock.Settings of(Material material, Function<BlockState,MaterialColor> materialColor)
public static AbstractBlock.Settings copy(AbstractBlock block)
public AbstractBlock.Settings noCollision()
This also marks a block as non-opaque.
public AbstractBlock.Settings nonOpaque()
public AbstractBlock.Settings slipperiness(float slipperiness)
public AbstractBlock.Settings velocityMultiplier(float velocityMultiplier)
public AbstractBlock.Settings jumpVelocityMultiplier(float jumpVelocityMultiplier)
public AbstractBlock.Settings sounds(BlockSoundGroup soundGroup)
public AbstractBlock.Settings luminance(ToIntFunction<BlockState> luminance)
luminance
- a per block state light level, with values between 0 and 15public AbstractBlock.Settings strength(float hardness, float resistance)
public AbstractBlock.Settings breakInstantly()
public AbstractBlock.Settings strength(float strength)
public AbstractBlock.Settings ticksRandomly()
public AbstractBlock.Settings dynamicBounds()
public AbstractBlock.Settings dropsNothing()
public AbstractBlock.Settings dropsLike(Block source)
source
- the block to copy item drops frompublic AbstractBlock.Settings air()
public AbstractBlock.Settings allowsSpawning(AbstractBlock.TypedContextPredicate<EntityType<?>> predicate)
predicate
- the predicate used to calculate whether an entity can spawn on this blockpublic AbstractBlock.Settings solidBlock(AbstractBlock.ContextPredicate predicate)
public AbstractBlock.Settings suffocates(AbstractBlock.ContextPredicate predicate)
public AbstractBlock.Settings blockVision(AbstractBlock.ContextPredicate predicate)
public AbstractBlock.Settings postProcess(AbstractBlock.ContextPredicate predicate)
public AbstractBlock.Settings emissiveLighting(AbstractBlock.ContextPredicate predicate)
public AbstractBlock.Settings requiresTool()