Class BlockSoundGroupOverwrites
java.lang.Object
net.frozenblock.lib.sound.api.block_sound_group.BlockSoundGroupOverwrites
Allows you to add any block by either adding its registry (Blocks.STONE) or its ID ("stone").
If you want to add a modded block, make sure to put the nameSpaceID in the first field, then the ID and soundGroup.
Or you could just be normal and add the block itself instead of the ID.
You can also add a LIST of blocks (IDs not allowed) by using new Block[]{block1, block2}.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddBlock(String namespace, String id, net.minecraft.world.level.block.SoundType sounds, BooleanSupplier condition) Adds a block with the specified namespace and id.static voidaddBlock(String id, net.minecraft.world.level.block.SoundType sounds, BooleanSupplier condition) This will only work with vanilla blocks.static voidaddBlock(net.minecraft.resources.ResourceLocation key, net.minecraft.world.level.block.SoundType sounds, BooleanSupplier condition) Adds a block with the specifiedResourceLocation.static voidaddBlock(net.minecraft.world.level.block.Block block, net.minecraft.world.level.block.SoundType sounds, BooleanSupplier condition) static voidaddBlocks(net.minecraft.world.level.block.Block[] blocks, net.minecraft.world.level.block.SoundType sounds, BooleanSupplier condition) static voidaddBlockTag(net.minecraft.tags.TagKey<net.minecraft.world.level.block.Block> tag, net.minecraft.world.level.block.SoundType sounds, BooleanSupplier condition) static @Nullable BlockSoundGroupOverwritegetOverwrite(net.minecraft.resources.ResourceLocation id) static @Nullable List<BlockSoundGroupOverwrite>
-
Constructor Details
-
BlockSoundGroupOverwrites
public BlockSoundGroupOverwrites()
-
-
Method Details
-
getOverwrites
-
getOverwrite
@Nullable public static @Nullable BlockSoundGroupOverwrite getOverwrite(net.minecraft.resources.ResourceLocation id) -
addBlock
public static void addBlock(String id, net.minecraft.world.level.block.SoundType sounds, BooleanSupplier condition) This will only work with vanilla blocks. -
addBlock
public static void addBlock(String namespace, String id, net.minecraft.world.level.block.SoundType sounds, BooleanSupplier condition) Adds a block with the specified namespace and id. -
addBlock
public static void addBlock(net.minecraft.resources.ResourceLocation key, net.minecraft.world.level.block.SoundType sounds, BooleanSupplier condition) Adds a block with the specifiedResourceLocation. -
addBlock
public static void addBlock(net.minecraft.world.level.block.Block block, net.minecraft.world.level.block.SoundType sounds, BooleanSupplier condition) -
addBlocks
public static void addBlocks(net.minecraft.world.level.block.Block[] blocks, net.minecraft.world.level.block.SoundType sounds, BooleanSupplier condition) -
addBlockTag
public static void addBlockTag(net.minecraft.tags.TagKey<net.minecraft.world.level.block.Block> tag, net.minecraft.world.level.block.SoundType sounds, BooleanSupplier condition)
-