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>
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
     

    Nested classes/interfaces inherited from interface net.minecraft.server.packs.resources.PreparableReloadListener

    net.minecraft.server.packs.resources.PreparableReloadListener.PreparationBarrier
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addBlock(String namespace, String id, net.minecraft.world.level.block.SoundType sounds, BooleanSupplier condition)
    Adds a block with the specified namespace and id.
    void
    addBlock(String id, net.minecraft.world.level.block.SoundType sounds, BooleanSupplier condition)
    This will only work with vanilla blocks.
    void
    addBlock(net.minecraft.resources.ResourceLocation key, net.minecraft.world.level.block.SoundType sounds, BooleanSupplier condition)
    Adds a block with the specified ResourceLocation.
    void
    addBlock(net.minecraft.world.level.block.Block block, net.minecraft.world.level.block.SoundType sounds, BooleanSupplier condition)
     
    void
    addBlocks(net.minecraft.world.level.block.Block[] blocks, net.minecraft.world.level.block.SoundType sounds, BooleanSupplier condition)
     
    void
    addBlockTag(net.minecraft.tags.TagKey<net.minecraft.world.level.block.Block> tag, net.minecraft.world.level.block.SoundType sounds, BooleanSupplier condition)
     
    apply(BlockSoundGroupManager.SoundGroupLoader prepared, net.minecraft.server.packs.resources.ResourceManager manager, net.minecraft.util.profiling.ProfilerFiller profiler, Executor executor)
     
    @NotNull net.minecraft.resources.ResourceLocation
     
    getOverwrite(net.minecraft.resources.ResourceLocation id)
     
     
    static net.minecraft.resources.ResourceLocation
    getPath(net.minecraft.resources.ResourceLocation blockId)
     
    load(net.minecraft.server.packs.resources.ResourceManager manager, net.minecraft.util.profiling.ProfilerFiller profiler, Executor executor)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface net.fabricmc.fabric.api.resource.IdentifiableResourceReloadListener

    getFabricDependencies

    Methods inherited from interface net.minecraft.server.packs.resources.PreparableReloadListener

    getName

    Methods inherited from interface net.fabricmc.fabric.api.resource.SimpleResourceReloadListener

    reload
  • Field Details

  • Constructor Details

    • BlockSoundGroupManager

      public BlockSoundGroupManager()
  • Method Details

    • getOverwrites

      @Nullable public @Nullable List<BlockSoundGroupOverwrite> getOverwrites()
    • getOverwrite

      @Nullable public @Nullable BlockSoundGroupOverwrite getOverwrite(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[] 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(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