// STAMP
if (mouseButton == 3 && layer instanceof TileLayer) {
// Right mouse button dragged: create and set custom brush
TileLayer brushLayer = new TileLayer(bounds);
brushLayer.copyFrom(getCurrentLayer());
brushLayer.setOffset(tile.x - (int) bounds.width / 2, tile.y
- (int) bounds.height / 2);
// Do a quick check to make sure the selection is not empty
if (brushLayer.isEmpty()) {