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
-
Method Summary
Modifier and TypeMethodDescriptioncreateSubView
(int left, int top) Returns a newFramebuffer
that represent a 128x128 sub-view of this framebuffer.int
get
(int x, int z) byte
getMapColor
(int x, int y) int
height()
set
(int x, int z, int rgb) int
width()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:
width
in interfaceLargeFramebuffer
-
height
public int height()- Specified by:
height
in interfaceLargeFramebuffer
-
createSubView
Description copied from interface:LargeFramebuffer
Returns a newFramebuffer
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 interfaceLargeFramebuffer
- Parameters:
left
-top
-- Returns:
- the sub-view
Framebuffer
-
getMapColor
public byte getMapColor(int x, int y) - Specified by:
getMapColor
in interfaceLargeFramebuffer
-