Package be.seeseemelk.mockbukkit.map
Class MapCanvasMock
java.lang.Object
be.seeseemelk.mockbukkit.map.MapCanvasMock
- All Implemented Interfaces:
MapCanvas
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidstatic voidexecuteForAllPixels(@NotNull BiConsumer<Integer, Integer> consumer) Runs a Consumer for each pixel coordinate on a map.bytegetBasePixel(int x, int y) @NotNull ColorgetBasePixelColor(int x, int y) @NotNull MapCursorCollection@NotNull MapViewbytegetPixel(int x, int y) @NotNull ColorgetPixelColor(int x, int y) protected voidsetBase(byte[][] base) voidsetCursors(@NotNull MapCursorCollection cursors) voidsetPixel(int x, int y, byte color) voidsetPixelColor(int x, int y, @NotNull Color color)
-
Constructor Details
-
MapCanvasMock
-
-
Method Details
-
getMapView
- Specified by:
getMapViewin interfaceMapCanvas
-
getCursors
- Specified by:
getCursorsin interfaceMapCanvas
-
setCursors
- Specified by:
setCursorsin interfaceMapCanvas
-
setPixelColor
- Specified by:
setPixelColorin interfaceMapCanvas
-
getPixelColor
- Specified by:
getPixelColorin interfaceMapCanvas
-
getBasePixelColor
- Specified by:
getBasePixelColorin interfaceMapCanvas
-
setPixel
public void setPixel(int x, int y, byte color) -
getPixel
public byte getPixel(int x, int y) -
getBasePixel
public byte getBasePixel(int x, int y) - Specified by:
getBasePixelin interfaceMapCanvas
-
setBase
protected void setBase(byte[][] base) -
drawImage
-
drawText
-
executeForAllPixels
Runs a Consumer for each pixel coordinate on a map.- Parameters:
consumer- The consumer to run. First parameter is the X coordinate, second is the Y coordinate.
-