Class BlockSoundGroupOverwrites

java.lang.Object
net.frozenblock.lib.sound.api.block_sound_group.BlockSoundGroupOverwrites

public class BlockSoundGroupOverwrites extends Object
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 Details

    • BlockSoundGroupOverwrites

      public BlockSoundGroupOverwrites()
  • Method Details

    • getOverwrites

      public static List<BlockSoundGroupOverwrite> getOverwrites()
    • getOverwrite

      @Nullable public static @Nullable BlockSoundGroupOverwrite getOverwrite(net.minecraft.resources.ResourceLocation id)
    • getOverwrite

      @NotNull public static @NotNull Optional<BlockSoundGroupOverwrite> getOverwrite(net.minecraft.world.level.block.Block block)
    • getOverwriteIfConditionIsMet

      public static Optional<BlockSoundGroupOverwrite> getOverwriteIfConditionIsMet(net.minecraft.world.level.block.Block block)
    • 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 specified ResourceLocation.
    • 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)