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 ClassesNested classes/interfaces inherited from interface net.minecraft.server.packs.resources.PreparableReloadListener
net.minecraft.server.packs.resources.PreparableReloadListener.PreparationBarrier -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddBlock(String namespace, String id, net.minecraft.world.level.block.SoundType sounds, BooleanSupplier condition) Adds a block with the specified namespace and id.voidaddBlock(String id, net.minecraft.world.level.block.SoundType sounds, BooleanSupplier condition) This will only work with vanilla blocks.voidaddBlock(net.minecraft.resources.ResourceLocation key, net.minecraft.world.level.block.SoundType sounds, BooleanSupplier condition) Adds a block with the specifiedResourceLocation.voidaddBlock(net.minecraft.world.level.block.Block block, net.minecraft.world.level.block.SoundType sounds, BooleanSupplier condition) voidaddBlocks(net.minecraft.world.level.block.Block @NotNull [] blocks, net.minecraft.world.level.block.SoundType sounds, BooleanSupplier condition) voidaddBlockTag(net.minecraft.tags.TagKey<net.minecraft.world.level.block.Block> tag, net.minecraft.world.level.block.SoundType sounds, BooleanSupplier condition) apply(@NotNull BlockSoundGroupManager.SoundGroupLoader prepared, net.minecraft.server.packs.resources.ResourceManager manager, net.minecraft.util.profiling.ProfilerFiller profiler, Executor executor) @NotNull net.minecraft.resources.ResourceLocationgetOptionalOverwrite(net.minecraft.resources.ResourceLocation id) @Nullable BlockSoundGroupOverwritegetOverwrite(net.minecraft.resources.ResourceLocation id) static net.minecraft.resources.ResourceLocationgetPath(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, waitMethods inherited from interface net.fabricmc.fabric.api.resource.IdentifiableResourceReloadListener
getFabricDependenciesMethods inherited from interface net.minecraft.server.packs.resources.PreparableReloadListener
getNameMethods inherited from interface net.fabricmc.fabric.api.resource.SimpleResourceReloadListener
reload
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
BlockSoundGroupManager
public BlockSoundGroupManager()
-
-
Method Details
-
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 specifiedResourceLocation. -
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:
loadin interfacenet.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:
applyin interfacenet.fabricmc.fabric.api.resource.SimpleResourceReloadListener<BlockSoundGroupManager.SoundGroupLoader>
-
getFabricId
@NotNull public @NotNull net.minecraft.resources.ResourceLocation getFabricId()- Specified by:
getFabricIdin interfacenet.fabricmc.fabric.api.resource.IdentifiableResourceReloadListener
-