Class BlockSoundGroupManager

java.lang.Object
net.frozenblock.lib.sound.impl.block_sound_group.BlockSoundGroupManager
All Implemented Interfaces:
net.fabricmc.fabric.api.resource.IdentifiableResourceReloadListener, net.fabricmc.fabric.api.resource.SimpleResourceReloadListener<BlockSoundGroupManager.SoundGroupLoader>, net.minecraft.server.packs.resources.PreparableReloadListener

@Internal public class BlockSoundGroupManager extends Object implements net.fabricmc.fabric.api.resource.SimpleResourceReloadListener<BlockSoundGroupManager.SoundGroupLoader>
  • Field Details

  • Constructor Details

    • BlockSoundGroupManager

      public BlockSoundGroupManager()
  • Method Details

    • getOverwrites

      public List<BlockSoundGroupOverwrite> getOverwrites()
    • getOverwrite

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

      public Optional<BlockSoundGroupOverwrite> getOptionalOverwrite(net.minecraft.resources.ResourceLocation id)
    • addBlock

      public 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 void addBlock(String id, net.minecraft.world.level.block.SoundType sounds, BooleanSupplier condition)
      This will only work with vanilla blocks.
    • addBlock

      public 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 void addBlock(net.minecraft.world.level.block.Block block, net.minecraft.world.level.block.SoundType sounds, BooleanSupplier condition)
    • addBlocks

      public void addBlocks(net.minecraft.world.level.block.Block @NotNull [] blocks, net.minecraft.world.level.block.SoundType sounds, BooleanSupplier condition)
    • addBlockTag

      public void addBlockTag(net.minecraft.tags.TagKey<net.minecraft.world.level.block.Block> tag, net.minecraft.world.level.block.SoundType sounds, BooleanSupplier condition)
    • getPath

      public static net.minecraft.resources.ResourceLocation getPath(net.minecraft.resources.ResourceLocation blockId)
    • load

      public CompletableFuture<BlockSoundGroupManager.SoundGroupLoader> load(net.minecraft.server.packs.resources.ResourceManager manager, net.minecraft.util.profiling.ProfilerFiller profiler, Executor executor)
      Specified by:
      load in interface net.fabricmc.fabric.api.resource.SimpleResourceReloadListener<BlockSoundGroupManager.SoundGroupLoader>
    • apply

      public CompletableFuture<Void> apply(@NotNull @NotNull BlockSoundGroupManager.SoundGroupLoader prepared, net.minecraft.server.packs.resources.ResourceManager manager, net.minecraft.util.profiling.ProfilerFiller profiler, Executor executor)
      Specified by:
      apply in interface net.fabricmc.fabric.api.resource.SimpleResourceReloadListener<BlockSoundGroupManager.SoundGroupLoader>
    • getFabricId

      @NotNull public @NotNull net.minecraft.resources.ResourceLocation getFabricId()
      Specified by:
      getFabricId in interface net.fabricmc.fabric.api.resource.IdentifiableResourceReloadListener