Interface IRadarOverlay

All Known Implementing Classes:
DebugOverlay, ExampleOverlay, IDOverlay

public interface IRadarOverlay
An interface defining a radar overlay To implement this, you must override render(boolean, RadarRenderData, Object...) and getModID()
Since:
0.14.15.2
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    flipPose(com.mojang.blaze3d.vertex.PoseStack poseStack, com.mojang.math.Axis axis)
    Flips a PoseStack on the specified Axis.
    default net.minecraft.resources.ResourceLocation
    The ID of this overlay, defined by getModID() and getIDPath()
    default String
    If not overriden, this method returns the class name of the implementor converted to snake case
     
    default RadarMode
    getRadarMode(RadarRenderData radarRenderData)
    Get the RadarMode of the radar
    default void
    orientUpwards(com.mojang.blaze3d.vertex.PoseStack poseStack)
    Orients a PoseStack to face upwards.
    default void
    placeOnRadar(net.minecraft.world.phys.Vec3 location, com.mojang.blaze3d.vertex.PoseStack poseStack, RadarRenderData rrd)
    Goes to the given Vec3 relative to the radar's position.
    default void
    poseToRadarSpace(com.mojang.blaze3d.vertex.PoseStack poseStack, RadarRenderData rrd)
    Transforms and scales a pose so that 1 block in world space == 1 pixel in radar space.
    default void
    poseToWorldSpace(com.mojang.blaze3d.vertex.PoseStack poseStack, RadarRenderData rrd)
    Untransforms and scales a pose where 1 block in world space == 1 pixel in radar space.
    default net.minecraft.world.phys.Vec3
    radarToWorldCoords(double x, double z, net.minecraft.core.BlockPos radarPos, float sizeRenderDiameter, float simSize)
    Translates a Vec3 of radar coordinates to a Vec3 of absolute coordinates
    default net.minecraft.world.phys.Vec3
    radarToWorldCoords(double x, double z, RadarRenderData rrd)
    Translates a Vec3 of radar coordinates to a Vec3 of absolute coordinates
    default net.minecraft.world.phys.Vec3
    radarToWorldCoords(net.minecraft.world.phys.Vec3 pos, net.minecraft.core.BlockPos radarPos, float sizeRenderDiameter, float simSize)
    Translates a Vec3 of radar coordinates to a Vec3 of absolute coordinates
    default net.minecraft.world.phys.Vec3
    radarToWorldCoords(net.minecraft.world.phys.Vec3 pos, RadarRenderData rrd)
    Translates a Vec3 of radar coordinates to a Vec3 of absolute coordinates
    void
    render(boolean canRender, RadarRenderData radarRenderData, Object... args)
    Renders objects on top of the radar
    default void
    renderQuad(RadarRenderData radarRenderData, float qx, float qy, float qz, float scale, com.mojang.blaze3d.vertex.PoseStack poseStack, int color, int cli)
     
    default void
    renderQuad(RadarRenderData radarRenderData, net.minecraft.world.phys.Vec3 q, float scale, com.mojang.blaze3d.vertex.PoseStack pose, int color, int cli)
     
    default void
    renderText(net.minecraft.network.chat.Component component, RadarRenderData radarRenderData)
    Render the text given in the given Component
    default void
    renderText(net.minecraft.network.chat.Component component, RadarRenderData radarRenderData, com.mojang.blaze3d.vertex.PoseStack poseStack)
    Render the text given in the given Component
    default void
    renderText(net.minecraft.network.chat.Component component, RadarRenderData radarRenderData, com.mojang.blaze3d.vertex.PoseStack poseStack, int backgroundColor)
    Render the text given in the given Component with a background color
    default void
    renderTexture(net.minecraft.resources.ResourceLocation texture, RadarRenderData radarRenderData)
    Render a texture at the given ResourceLocation
    default void
    renderTexture(net.minecraft.resources.ResourceLocation texture, RadarRenderData radarRenderData, int color)
    Render a texture at the given ResourceLocation
    default void
    renderTexture(net.minecraft.resources.ResourceLocation texture, RadarRenderData radarRenderData, com.mojang.blaze3d.vertex.PoseStack poseStack)
    Render a texture at the given ResourceLocation
    default void
    renderTexture(net.minecraft.resources.ResourceLocation texture, RadarRenderData radarRenderData, com.mojang.blaze3d.vertex.PoseStack poseStack, int color)
    Render a texture at the given ResourceLocation
    default void
    renderTextureUpwards(net.minecraft.resources.ResourceLocation texture, RadarRenderData radarRenderData)
    Renders a texture from the given ResourceLocation facing upwards.
    default void
    renderTextureUpwards(net.minecraft.resources.ResourceLocation texture, RadarRenderData radarRenderData, int color)
    Renders a texture from the given ResourceLocation facing upwards.
    default void
    renderTextureUpwards(net.minecraft.resources.ResourceLocation texture, RadarRenderData radarRenderData, com.mojang.blaze3d.vertex.PoseStack poseStack)
    Renders a texture from the given ResourceLocation facing upwards.
    default void
    renderTextureUpwards(net.minecraft.resources.ResourceLocation texture, RadarRenderData radarRenderData, com.mojang.blaze3d.vertex.PoseStack poseStack, int color)
    Renders a texture from the given ResourceLocation facing upwards.
    default void
    scale(com.mojang.blaze3d.vertex.PoseStack pose, float scaleFactor)
    Scales a pose by a uniform scale factor
    default void
    texVertex(com.mojang.blaze3d.vertex.VertexConsumer buffer, com.mojang.blaze3d.vertex.PoseStack.Pose pose, int color, float x, float y, float z, float u, float v, int overlay)
     
    default void
    unorientUpwards(com.mojang.blaze3d.vertex.PoseStack poseStack)
    Unorients a PoseStack that is facing upwards.
    default net.minecraft.world.phys.Vec3
    worldToRadarCoords(double x, double z, net.minecraft.core.BlockPos radarPos, float sizeRenderDiameter, float simSize)
    Translates a Vec3 of absolute coordinates to a Vec3 of radar coordinates
    default net.minecraft.world.phys.Vec3
    worldToRadarCoords(double x, double z, RadarRenderData rrd)
    Translates absolute coordinates to a Vec3 of radar coordinates
    default net.minecraft.world.phys.Vec3
    worldToRadarCoords(net.minecraft.world.phys.Vec3 pos, net.minecraft.core.BlockPos radarPos, float sizeRenderDiameter, float simSize)
    Translates a Vec3 of absolute coordinates to a Vec3 of radar coordinates
    default net.minecraft.world.phys.Vec3
    worldToRadarCoords(net.minecraft.world.phys.Vec3 pos, RadarRenderData rrd)
    Translates a Vec3 of absolute coordinates to a Vec3 of radar coordinates
  • Method Details

    • render

      void render(boolean canRender, RadarRenderData radarRenderData, Object... args)
      Renders objects on top of the radar
      Parameters:
      canRender - true if either the server doesn't require WSR-88D or a WSR-88D is complete within 4 chunks of the radar
      radarRenderData - The data used to call BlockEntityRenderer.render(BlockEntity, float, PoseStack, MultiBufferSource, int, int)
      args - The arguments to pass to the Radar Overlay
      Since:
      0.14.15.2
    • getRadarMode

      default RadarMode getRadarMode(RadarRenderData radarRenderData)
      Get the RadarMode of the radar
      Parameters:
      radarRenderData - The RadarRenderData
      Returns:
      The radar's RadarMode
      Since:
      0.14.16.2
    • renderQuad

      default void renderQuad(RadarRenderData radarRenderData, net.minecraft.world.phys.Vec3 q, float scale, com.mojang.blaze3d.vertex.PoseStack pose, int color, int cli)
    • renderQuad

      default void renderQuad(RadarRenderData radarRenderData, float qx, float qy, float qz, float scale, com.mojang.blaze3d.vertex.PoseStack poseStack, int color, int cli)
    • texVertex

      default void texVertex(com.mojang.blaze3d.vertex.VertexConsumer buffer, com.mojang.blaze3d.vertex.PoseStack.Pose pose, int color, float x, float y, float z, float u, float v, int overlay)
    • renderTexture

      default void renderTexture(net.minecraft.resources.ResourceLocation texture, RadarRenderData radarRenderData, com.mojang.blaze3d.vertex.PoseStack poseStack, int color)
      Render a texture at the given ResourceLocation
      Parameters:
      texture - The ResourceLocation of the texture
      radarRenderData - The RadarRenderData
      poseStack - The PoseStack to render with
      color - The color
      Since:
      0.15.3.3
    • renderTextureUpwards

      default void renderTextureUpwards(net.minecraft.resources.ResourceLocation texture, RadarRenderData radarRenderData, com.mojang.blaze3d.vertex.PoseStack poseStack, int color)
      Renders a texture from the given ResourceLocation facing upwards. Not guaranteed to work when other rotation transformations are present!
      Parameters:
      texture - The ResourceLocation of the texture
      radarRenderData - The RadarRenderData
      poseStack - The PoseStack to render with
      color - The color
      Since:
      0.16.1.0-rc2
    • renderTexture

      default void renderTexture(net.minecraft.resources.ResourceLocation texture, RadarRenderData radarRenderData, com.mojang.blaze3d.vertex.PoseStack poseStack)
      Render a texture at the given ResourceLocation
      Parameters:
      texture - The ResourceLocation of the texture
      radarRenderData - The RadarRenderData
      poseStack - The PoseStack to render with
      Since:
      0.15.3.3
    • renderTextureUpwards

      default void renderTextureUpwards(net.minecraft.resources.ResourceLocation texture, RadarRenderData radarRenderData, com.mojang.blaze3d.vertex.PoseStack poseStack)
      Renders a texture from the given ResourceLocation facing upwards. Not guaranteed to work when other rotation transformations are present!
      Parameters:
      texture - The ResourceLocation of the texture
      radarRenderData - The RadarRenderData
      poseStack - The PoseStack to render with
      Since:
      0.16.1.0-rc2
    • renderTexture

      default void renderTexture(net.minecraft.resources.ResourceLocation texture, RadarRenderData radarRenderData, int color)
      Render a texture at the given ResourceLocation
      Parameters:
      texture - The ResourceLocation of the texture
      radarRenderData - The RadarRenderData
      color - The color
      Since:
      0.15.3.3
    • renderTextureUpwards

      default void renderTextureUpwards(net.minecraft.resources.ResourceLocation texture, RadarRenderData radarRenderData, int color)
      Renders a texture from the given ResourceLocation facing upwards. Not guaranteed to work when other rotation transformations are present!
      Parameters:
      texture - The ResourceLocation of the texture
      radarRenderData - The RadarRenderData
      color - The color
      Since:
      0.16.1.0-rc2
    • renderTexture

      default void renderTexture(net.minecraft.resources.ResourceLocation texture, RadarRenderData radarRenderData)
      Render a texture at the given ResourceLocation
      Parameters:
      texture - The ResourceLocation of the texture
      radarRenderData - The RadarRenderData
      Since:
      0.15.3.3
    • renderTextureUpwards

      default void renderTextureUpwards(net.minecraft.resources.ResourceLocation texture, RadarRenderData radarRenderData)
      Renders a texture from the given ResourceLocation facing upwards. Not guaranteed to work when other rotation transformations are present!
      Parameters:
      texture - The ResourceLocation of the texture
      radarRenderData - The RadarRenderData
      Since:
      0.16.1.0-rc2
    • renderText

      default void renderText(net.minecraft.network.chat.Component component, RadarRenderData radarRenderData, com.mojang.blaze3d.vertex.PoseStack poseStack, int backgroundColor)
      Render the text given in the given Component with a background color
      Parameters:
      component - The Component to render
      radarRenderData - The RadarRenderData
      poseStack - The PoseStack to render with
      backgroundColor - The background color to render
      Since:
      0.16.0.0
    • renderText

      default void renderText(net.minecraft.network.chat.Component component, RadarRenderData radarRenderData, com.mojang.blaze3d.vertex.PoseStack poseStack)
      Render the text given in the given Component
      Parameters:
      component - The Component to render
      radarRenderData - The RadarRenderData
      poseStack - The PoseStack to render with
      Since:
      0.14.16.2
    • renderText

      default void renderText(net.minecraft.network.chat.Component component, RadarRenderData radarRenderData)
      Render the text given in the given Component
      Parameters:
      component - The Component to render
      radarRenderData - The RadarRenderData
      Since:
      0.14.16.2
    • getModID

      String getModID()
      Returns:
      The Mod ID of the mod that registered this overlay
      Since:
      0.14.15.2
    • getIDPath

      default String getIDPath()
      If not overriden, this method returns the class name of the implementor converted to snake case
      Returns:
      The path to use for this overlay's ID
      Since:
      0.14.15.2
    • getID

      default net.minecraft.resources.ResourceLocation getID()
      The ID of this overlay, defined by getModID() and getIDPath()
      Returns:
      The ResourceLocation of this overlay
      Since:
      0.14.15.2
    • scale

      default void scale(com.mojang.blaze3d.vertex.PoseStack pose, float scaleFactor)
      Scales a pose by a uniform scale factor
      Parameters:
      pose - THe PoseStack to scale
      scaleFactor - The scale factor
      Since:
      0.16.1.0-rc2
    • poseToRadarSpace

      default void poseToRadarSpace(com.mojang.blaze3d.vertex.PoseStack poseStack, RadarRenderData rrd)
      Transforms and scales a pose so that 1 block in world space == 1 pixel in radar space.
      Parameters:
      poseStack - The PoseStack to transform
      rrd - The RadarRenderData
      Since:
      0.16.1.0-rc2
    • placeOnRadar

      default void placeOnRadar(net.minecraft.world.phys.Vec3 location, com.mojang.blaze3d.vertex.PoseStack poseStack, RadarRenderData rrd)
      Goes to the given Vec3 relative to the radar's position. Uses poseToRadarSpace(PoseStack, RadarRenderData) and poseToWorldSpace(PoseStack, RadarRenderData)
      Parameters:
      location - The Vec3 of the absolute location
      poseStack - The PoseStack
      rrd - The RadarRenderData
      Since:
      0.16.1.0-rc2
    • orientUpwards

      default void orientUpwards(com.mojang.blaze3d.vertex.PoseStack poseStack)
      Orients a PoseStack to face upwards. May not work if other rotations are present!
      Parameters:
      poseStack - The PoseStack to orient upwards
      Since:
      0.16.1.0-rc2
    • unorientUpwards

      default void unorientUpwards(com.mojang.blaze3d.vertex.PoseStack poseStack)
      Unorients a PoseStack that is facing upwards. May not work if other rotations are present!
      Parameters:
      poseStack - The PoseStack to unorient
      Since:
      0.16.1.0-rc2
    • flipPose

      default void flipPose(com.mojang.blaze3d.vertex.PoseStack poseStack, com.mojang.math.Axis axis)
      Flips a PoseStack on the specified Axis.
      Parameters:
      poseStack - The PoseStack to flip
      axis - The Axis to flip around
      Since:
      0.16.1.0-rc2
    • worldToRadarCoords

      default net.minecraft.world.phys.Vec3 worldToRadarCoords(net.minecraft.world.phys.Vec3 pos, RadarRenderData rrd)
      Translates a Vec3 of absolute coordinates to a Vec3 of radar coordinates
      Parameters:
      pos - The Vec3 of absolute coordinates
      rrd - The RadarRenderData
      Returns:
      The Vec3 of radar coordinates
      Since:
      0.16.1.0-rc2
    • worldToRadarCoords

      default net.minecraft.world.phys.Vec3 worldToRadarCoords(net.minecraft.world.phys.Vec3 pos, net.minecraft.core.BlockPos radarPos, float sizeRenderDiameter, float simSize)
      Translates a Vec3 of absolute coordinates to a Vec3 of radar coordinates
      Parameters:
      pos - The Vec3 of absolute coordinates
      radarPos - The BlockPos of the radar
      sizeRenderDiameter - The diameter of the radar size. Is 3 for small radars and 6 for big (unless 3x3 option is on)
      simSize - The simulation size of the radar. Is 2048 for small radars and 8192 for big radars
      Returns:
      The Vec3 of radar coordinates
      Since:
      0.16.1.0-rc2
    • worldToRadarCoords

      default net.minecraft.world.phys.Vec3 worldToRadarCoords(double x, double z, RadarRenderData rrd)
      Translates absolute coordinates to a Vec3 of radar coordinates
      Parameters:
      x - The x-coordinate of the absolute position
      z - The z-coordinate of the absolute position
      rrd - The RadarRenderData
      Returns:
      The Vec3 of radar coordinates
      Since:
      0.16.1.0-rc2
    • worldToRadarCoords

      default net.minecraft.world.phys.Vec3 worldToRadarCoords(double x, double z, net.minecraft.core.BlockPos radarPos, float sizeRenderDiameter, float simSize)
      Translates a Vec3 of absolute coordinates to a Vec3 of radar coordinates
      Parameters:
      x - The x-coordinate of the absolute position
      z - The z-coordinate of the absolute position
      sizeRenderDiameter - The diameter of the radar size. Is 3 for small radars and 6 for big (unless 3x3 option is on)
      simSize - The simulation size of the radar. Is 2048 for small radars and 8192 for big radars
      Returns:
      The Vec3 of radar coordinates
      Since:
      0.16.1.0-rc2
    • poseToWorldSpace

      default void poseToWorldSpace(com.mojang.blaze3d.vertex.PoseStack poseStack, RadarRenderData rrd)
      Untransforms and scales a pose where 1 block in world space == 1 pixel in radar space.
      Parameters:
      poseStack - The PoseStack to transform
      rrd - The RadarRenderData
      Since:
      0.16.1.0-rc2
    • radarToWorldCoords

      default net.minecraft.world.phys.Vec3 radarToWorldCoords(net.minecraft.world.phys.Vec3 pos, RadarRenderData rrd)
      Translates a Vec3 of radar coordinates to a Vec3 of absolute coordinates
      Parameters:
      pos - The Vec3 of radar coordinates
      rrd - The RadarRenderData
      Returns:
      The Vec3 of radar coordinates
      Since:
      0.16.1.0-rc2
    • radarToWorldCoords

      default net.minecraft.world.phys.Vec3 radarToWorldCoords(net.minecraft.world.phys.Vec3 pos, net.minecraft.core.BlockPos radarPos, float sizeRenderDiameter, float simSize)
      Translates a Vec3 of radar coordinates to a Vec3 of absolute coordinates
      Parameters:
      pos - The Vec3 of radar coordinates
      sizeRenderDiameter - The diameter of the radar size. Is 3 for small radars and 6 for big (unless 3x3 option is on)
      simSize - The simulation size of the radar. Is 2048 for small radars and 8192 for big radars
      Returns:
      The Vec3 of radar coordinates
      Since:
      0.16.1.0-rc2
    • radarToWorldCoords

      default net.minecraft.world.phys.Vec3 radarToWorldCoords(double x, double z, RadarRenderData rrd)
      Translates a Vec3 of radar coordinates to a Vec3 of absolute coordinates
      Parameters:
      x - The x-coordinate of the radar position
      z - The z-coordinate of the radar position
      rrd - The RadarRenderData
      Returns:
      The Vec3 of radar coordinates
      Since:
      0.16.1.0-rc2
    • radarToWorldCoords

      default net.minecraft.world.phys.Vec3 radarToWorldCoords(double x, double z, net.minecraft.core.BlockPos radarPos, float sizeRenderDiameter, float simSize)
      Translates a Vec3 of radar coordinates to a Vec3 of absolute coordinates
      Parameters:
      x - The x-coordinate of the radar position
      z - The z-coordinate of the radar position
      sizeRenderDiameter - The diameter of the radar size. Is 3 for small radars and 6 for big (unless 3x3 option is on)
      simSize - The simulation size of the radar. Is 2048 for small radars and 8192 for big radars
      Returns:
      The Vec3 of radar coordinates
      Since:
      0.16.1.0-rc2