Canvas

constructor(image: BufferedImage)

Creates a new Canvas with the DefaultGuiItems.CANVAS (18x18 px) item.

Parameters

image

The image that is used to fill the canvas. Will be read from every time notifyWindows is called.


constructor(canvasItem: NovaItem, itemResolution: Int, image: BufferedImage)

Parameters

canvasItem

The canvas item, which uses a model created via ItemModelCreationScope.canvasModel. This model should be square and should completely fill an entire slot (18x18 px or multiples of that at non-1 scales).

itemResolution

The size of the canvas item in pixels (18 px or multiples of that at non-1 scales).

image

The image that is used to fill the canvas. Will be read from every time notifyWindows is called.