Class SoftwareRenderer

java.lang.Object
com.soulfiremc.server.renderer.SoftwareRenderer

public final class SoftwareRenderer extends Object
Software 3D renderer using ray casting. Renders the Minecraft world from a player's perspective to a BufferedImage.
  • Method Summary

    Modifier and Type
    Method
    Description
    render(net.minecraft.client.multiplayer.ClientLevel level, net.minecraft.client.player.LocalPlayer player, int width, int height, double fov, int maxDistance)
    Renders the scene from the player's perspective.
    render(net.minecraft.client.multiplayer.ClientLevel level, net.minecraft.client.player.LocalPlayer localPlayer, net.minecraft.world.phys.Vec3 eyePos, float yRot, float xRot, int width, int height, double fov, int maxDistance)
    Renders the scene from a custom camera position.

    Methods inherited from class Object

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

    • render

      public static BufferedImage render(net.minecraft.client.multiplayer.ClientLevel level, net.minecraft.client.player.LocalPlayer player, int width, int height, double fov, int maxDistance)
      Renders the scene from the player's perspective.
      Parameters:
      level - The client level to render
      player - The player whose view to render from
      width - Image width in pixels
      height - Image height in pixels
      fov - Field of view in degrees
      maxDistance - Maximum render distance in blocks
      Returns:
      The rendered image
    • render

      public static BufferedImage render(net.minecraft.client.multiplayer.ClientLevel level, net.minecraft.client.player.LocalPlayer localPlayer, net.minecraft.world.phys.Vec3 eyePos, float yRot, float xRot, int width, int height, double fov, int maxDistance)
      Renders the scene from a custom camera position.
      Parameters:
      level - The client level to render
      localPlayer - The local player (excluded from rendering)
      eyePos - Camera eye position
      yRot - Camera yaw rotation in degrees
      xRot - Camera pitch rotation in degrees
      width - Image width in pixels
      height - Image height in pixels
      fov - Field of view in degrees
      maxDistance - Maximum render distance in blocks
      Returns:
      The rendered image