#is there a different way of splitting a
1 messages · Page 1 of 1 (latest)
.
Alright
So
Graphics#setClip will allow you to set a clip
you most likely want Graphics#setClip(in, int, int, int)
so Im currently doing it with canvas.drawImage(int, int, Image); and I use BufferedImage as image
so canvas.drawImage is for one map, so I can have an Image on a map. now I have a wall of 7x4 item frames and I want to cut one big image into 7x4 parts to display it on a big wall
yep
alright
so
BufferedImage myImage = //...
for(int x = 0; x < mapsX; x++) {
for(int y = 0; y < mapsY; y++) {
Map map = maps[mapsX * mapsY + mapsX];
BufferedImage subImage = myImage.getSubImage(x * 128, y * 128, 128, 128);
// Draw sub image on map
}
}
something like that
yea, and my question was if there is any better way of doing it, like an method in paper/spigot for maps
I don't really know, don't work with maps