Class DomumOrnamentumUtils

java.lang.Object
com.minecolonies.core.util.DomumOrnamentumUtils

public class DomumOrnamentumUtils extends Object
Utility methods for interacting with Domum Ornamentum
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static String
    Nbt identifier for DO's texture data
  • Method Summary

    Modifier and Type
    Method
    Description
    static @Nullable com.ldtteam.domumornamentum.block.IMateriallyTexturedBlock
    getBlock(@NotNull net.minecraft.world.item.ItemStack stack)
    Extracts the Domum Ornamentum block type from the stack.
    static @NotNull net.minecraft.world.item.ItemStack
    getRequestedStack(@NotNull IRequest<?> request)
    Extracts the first acceptable Domum Ornamentum stack from the given request.
    static @NotNull com.ldtteam.domumornamentum.client.model.data.MaterialTextureData
    getTextureData(@NotNull net.minecraft.world.item.ItemStack stack)
    Gets the specific texture data from the given DO stack.
    static com.ldtteam.domumornamentum.client.model.data.MaterialTextureData
    getTextureDataFromNBT(net.minecraft.nbt.CompoundTag nbt)
    Get the texture data from nbt
    static boolean
    isDoBlock(net.minecraft.world.level.block.Block block)
    Checks if the given block belongs to DO

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • DO_NBT_TEXTURE_DATA

      public static String DO_NBT_TEXTURE_DATA
      Nbt identifier for DO's texture data
  • Method Details

    • getBlock

      @Nullable public static @Nullable com.ldtteam.domumornamentum.block.IMateriallyTexturedBlock getBlock(@NotNull @NotNull net.minecraft.world.item.ItemStack stack)
      Extracts the Domum Ornamentum block type from the stack.
      Parameters:
      stack - the stack to inspect.
      Returns:
      the IMateriallyTexturedBlock, or null if the stack doesn't have one.
    • getRequestedStack

      @NotNull public static @NotNull net.minecraft.world.item.ItemStack getRequestedStack(@NotNull @NotNull IRequest<?> request)
      Extracts the first acceptable Domum Ornamentum stack from the given request.
      Parameters:
      request - the request to inspect.
      Returns:
      the first acceptable DO stack, or empty if this isn't a request for a DO block.
    • getTextureData

      @NotNull public static @NotNull com.ldtteam.domumornamentum.client.model.data.MaterialTextureData getTextureData(@NotNull @NotNull net.minecraft.world.item.ItemStack stack)
      Gets the specific texture data from the given DO stack.
      Parameters:
      stack - the stack to inspect.
      Returns:
      the texture data, or MaterialTextureData.EMPTY if not a DO stack or otherwise unset.
    • isDoBlock

      public static boolean isDoBlock(net.minecraft.world.level.block.Block block)
      Checks if the given block belongs to DO
      Parameters:
      block -
      Returns:
    • getTextureDataFromNBT

      public static com.ldtteam.domumornamentum.client.model.data.MaterialTextureData getTextureDataFromNBT(net.minecraft.nbt.CompoundTag nbt)
      Get the texture data from nbt
      Parameters:
      nbt -
      Returns: