Package com.ldtteam.structurize.api.util
Class Utils
java.lang.Object
com.ldtteam.structurize.api.util.Utils
General purpose utilities class.
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidcheckDirectory(File directory) Checks if directory exists, else creates it.static booleannbtContains(net.minecraft.nbt.CompoundTag originTag, net.minecraft.nbt.CompoundTag compareTag) Check if a comparison tag has the same or more nbt tags than an origin nbt tag.static voidplayErrorSound(@NotNull net.minecraft.world.entity.player.Player player) Play an error sound.static voidplaySuccessSound(@NotNull net.minecraft.world.entity.player.Player player) Play a success sound.
-
Method Details
-
playSuccessSound
public static void playSuccessSound(@NotNull @NotNull net.minecraft.world.entity.player.Player player) Play a success sound.- Parameters:
player- the player to play it for.
-
playErrorSound
public static void playErrorSound(@NotNull @NotNull net.minecraft.world.entity.player.Player player) Play an error sound.- Parameters:
player- the player to play it for.
-
checkDirectory
Checks if directory exists, else creates it.- Parameters:
directory- the directory to check.
-
nbtContains
public static boolean nbtContains(net.minecraft.nbt.CompoundTag originTag, net.minecraft.nbt.CompoundTag compareTag) Check if a comparison tag has the same or more nbt tags than an origin nbt tag.- Parameters:
originTag- the base tag to start the comparison from.compareTag- the tag we try to fit into the origin tag.- Returns:
- true if they match.
-