Abstract plushie Block

Package:              com.codex.composer.api.v1.block
Canonical Name: com.codex.composer.api.v1.block.AbstractPlushieBlock

Provides a rotatable, waterloggable plushie block.

Inheritors need to implement the following:

abstract void playSound(World world, BlockState state, BlockPos pos, PlayerEntity player);
abstract BlockEntityType<AbstractPlushieBlockEntity> getType()
/* Optional, defaults to composer's plush_boop statistic */
Identifier boopStat() { return ModStatistics.PLUSH_BOOP; }

Example implementation:

From [Composer]

public class PlushBlock extends AbstractPlushieBlock {
public PlushBlock(Settings settings) {... }
//? if minecraft: >=1.20.4 {
@Override
protected MapCodec<? extends BlockWithEntity> getCodec() {
return BlockWithEntity.createCodec(PlushBlock::new);
}
//? }
@Override
protected void playSound(World world, BlockState state, BlockPos pos, PlayerEntity player) {
Vec3d mid = pos.toCenterPos();
world.playSound(null, mid.x, mid.y, mid.z, ModSounds.LILBRO_SQUISH, SoundCategory.BLOCKS, 1f, 1f);
}
@Override
protected BlockEntityType<AbstractPlushieBlockEntity> getType() { return ModBlockEntities.PLUSH; }
@Override
public @Nullable BlockEntity createBlockEntity(BlockPos pos, BlockState state) {...}
}