Interface IClientBlockExtensions
public interface IClientBlockExtensions
Client-only extensions to 
Block.- See Also:
- 
Field SummaryFields
- 
Method SummaryModifier and TypeMethodDescriptiondefault booleanaddDestroyEffects(BlockState state, Level Level, BlockPos pos, ParticleEngine manager) Spawn particles for when the block is destroyed.default booleanaddHitEffects(BlockState state, Level level, HitResult target, ParticleEngine manager) Spawn a digging particle effect in the level, this is a wrapper around EffectRenderer.addBlockHitEffects to allow the block more control over the particles.default booleanareBreakingParticlesTinted(BlockState state, ClientLevel level, BlockPos pos) Returns true if the breaking particles created from theBlockStatepassed should be tinted with biome colors.default org.joml.Vector3dgetFogColor(BlockState state, LevelReader level, BlockPos pos, Entity entity, org.joml.Vector3d originalColor, float partialTick) NOT CURRENTLY IMPLEMENTEDstatic IClientBlockExtensionsstatic IClientBlockExtensionsof(BlockState state) 
- 
Field Details- 
DEFAULT
 
- 
- 
Method Details- 
of
- 
of
- 
addHitEffectsdefault boolean addHitEffects(BlockState state, Level level, HitResult target, ParticleEngine manager) Spawn a digging particle effect in the level, this is a wrapper around EffectRenderer.addBlockHitEffects to allow the block more control over the particles. Useful when you have entirely different texture sheets for different sides/locations in the level.- Parameters:
- state- The current state
- level- The current level
- target- The target the player is looking at {x/y/z/side/sub}
- manager- A reference to the current particle manager.
- Returns:
- True to prevent vanilla digging particles form spawning.
 
- 
addDestroyEffectsdefault boolean addDestroyEffects(BlockState state, Level Level, BlockPos pos, ParticleEngine manager) Spawn particles for when the block is destroyed. Due to the nature of how this is invoked, the x/y/z locations are not always guaranteed to host your block. So be sure to do proper sanity checks before assuming that the location is this block.- Parameters:
- Level- The current Level
- pos- Position to spawn the particle
- manager- A reference to the current particle manager.
- Returns:
- True to prevent vanilla break particles from spawning.
 
- 
getFogColordefault org.joml.Vector3d getFogColor(BlockState state, LevelReader level, BlockPos pos, Entity entity, org.joml.Vector3d originalColor, float partialTick) NOT CURRENTLY IMPLEMENTEDUse this to change the fog color used when the entity is "inside" a material. Vec3d is used here as "r/g/b" 0 - 1 values. - Parameters:
- level- The level.
- pos- The position at the entity viewport.
- state- The state at the entity viewport.
- entity- the entity
- originalColor- The current fog color, You are not expected to use this, Return as the default if applicable.
- Returns:
- The new fog color.
 
- 
areBreakingParticlesTintedReturns true if the breaking particles created from theBlockStatepassed should be tinted with biome colors.- Parameters:
- state- The state of this block
- level- The level the particles are spawning in
- pos- The position of the block
- Returns:
- trueif the particles should be tinted.
 
 
-