Class LargeGraphics2DFramebuffer

java.lang.Object
net.minestom.server.map.framebuffers.LargeGraphics2DFramebuffer
All Implemented Interfaces:
LargeFramebuffer

public class LargeGraphics2DFramebuffer extends Object implements LargeFramebuffer
LargeFramebuffer that embeds a BufferedImage, allowing for rendering directly via Graphics2D or its pixel array.
  • Constructor Details

    • LargeGraphics2DFramebuffer

      public LargeGraphics2DFramebuffer(int width, int height)
  • Method Details

    • getRenderer

      public Graphics2D getRenderer()
    • getBackingImage

      public BufferedImage getBackingImage()
    • get

      public int get(int x, int z)
    • set

      public LargeGraphics2DFramebuffer set(int x, int z, int rgb)
    • width

      public int width()
      Specified by:
      width in interface LargeFramebuffer
    • height

      public int height()
      Specified by:
      height in interface LargeFramebuffer
    • createSubView

      public Framebuffer createSubView(int left, int top)
      Description copied from interface: LargeFramebuffer
      Returns a new Framebuffer that represent a 128x128 sub-view of this framebuffer. Implementations are free (but not guaranteed) to throw exceptions if left & top produces out-of-bounds coordinates.
      Specified by:
      createSubView in interface LargeFramebuffer
      Parameters:
      left - the left coordinate of the sub view, in pixels
      top - the top coordinate of the sub view, in pixels
      Returns:
      the sub-view Framebuffer
    • getMapColor

      public byte getMapColor(int x, int y)
      Specified by:
      getMapColor in interface LargeFramebuffer