Class VisualizationUtil

java.lang.Object
de.z0rdak.yawp.api.visualization.VisualizationUtil

public final class VisualizationUtil extends Object
  • Method Details

    • updateDisplayBlock

      public static void updateDisplayBlock(net.minecraft.world.entity.Entity blockDisplayEntity, net.minecraft.resources.ResourceLocation blockRl)
    • updateDisplayGlow

      public static void updateDisplayGlow(net.minecraft.world.entity.Entity blockDisplayEntity, boolean glow)
    • updateDisplayLightLevel

      public static void updateDisplayLightLevel(net.minecraft.world.entity.Entity blockDisplayEntity, int lightLevel)
    • updateDisplayProperties

      public static void updateDisplayProperties(net.minecraft.world.entity.Entity blockDisplayEntity, BlockDisplayProperties properties)
    • createBlockDisplayRecursive

      @Deprecated public static net.minecraft.world.entity.Entity createBlockDisplayRecursive(net.minecraft.server.level.ServerLevel level, net.minecraft.core.BlockPos pos, net.minecraft.nbt.CompoundTag displayTag)
      Deprecated.
    • createDisplayEntity

      public static Optional<net.minecraft.world.entity.Entity> createDisplayEntity(net.minecraft.server.level.ServerLevel level, net.minecraft.core.BlockPos pos, net.minecraft.nbt.CompoundTag displayTag)
      Creates an entity in the level at the specified position with the provided tag.
      Parameters:
      level - level in which to spawn the entity
      pos - position at which to spawn the display entity
      displayTag - tag which provides data about the entity (e.g. text or block display entity)
      Returns:
      an optional with the entity inside if spawning was successfully, empty otherwise
    • createTextDisplayEntity

      public static Optional<net.minecraft.world.entity.Entity> createTextDisplayEntity(net.minecraft.server.level.ServerLevel level, String regionName, net.minecraft.core.BlockPos pos, TextDisplayProperties displayProperties)
      Parameters:
      regionName - a marker, stored in custom entity data for identification later
    • createBlockDisplayEntity

      public static Optional<net.minecraft.world.entity.Entity> createBlockDisplayEntity(net.minecraft.server.level.ServerLevel level, String regionName, net.minecraft.core.BlockPos pos, BlockDisplayProperties displayProperties)
      Parameters:
      regionName - a marker, stored in custom entity data for identification later
    • buildTeleportAnchorTextDisplayTag

      public static net.minecraft.nbt.CompoundTag buildTeleportAnchorTextDisplayTag(String regionName, TextDisplayProperties properties)
      SEE: https://minecraft.wiki/w/Display#Data_values
    • buildBlockDisplayTag

      public static net.minecraft.nbt.CompoundTag buildBlockDisplayTag(String regionName, BlockDisplayProperties properties)