Class LargeGraphics2DFramebuffer
java.lang.Object
net.minestom.server.map.framebuffers.LargeGraphics2DFramebuffer
- All Implemented Interfaces:
LargeFramebuffer
LargeFramebuffer that embeds a BufferedImage,
allowing for rendering directly via Graphics2D or its pixel array.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateSubView(int left, int top) Returns a newFramebufferthat represent a 128x128 sub-view of this framebuffer.intget(int x, int z) bytegetMapColor(int x, int y) intheight()set(int x, int z, int rgb) intwidth()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minestom.server.map.LargeFramebuffer
preparePacket
-
Constructor Details
-
LargeGraphics2DFramebuffer
public LargeGraphics2DFramebuffer(int width, int height)
-
-
Method Details
-
getRenderer
-
getBackingImage
-
get
public int get(int x, int z) -
set
-
width
public int width()- Specified by:
widthin interfaceLargeFramebuffer
-
height
public int height()- Specified by:
heightin interfaceLargeFramebuffer
-
createSubView
Description copied from interface:LargeFramebufferReturns a newFramebufferthat 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:
createSubViewin interfaceLargeFramebuffer- Parameters:
left-top-- Returns:
- the sub-view
Framebuffer
-
getMapColor
public byte getMapColor(int x, int y) - Specified by:
getMapColorin interfaceLargeFramebuffer
-