If the map is loaded in through pixels, then the tile id's will be in a 2d array, so add something like this to your player class (if you have one, you might do tile-based rpgs completely differently):
public void move(int xs, int ys) {
xo += xs;
yo += ys;
if(Level.tiles[xo / 32][yo / 32] == 6) {
xo -= xs;
yo -= ys;
}
}
//xs and ys is the speed that the character is travelling at
//xo and yo is the player position
//Level.tiles[xo][yo] is the 2d array that stores the id of the tile
//the move method is the method that sets the player position after the xs/ys values have been set
xs and ys is the speed that the character is travelling at.
xo and yo is the player position
Level.tiles[xo][yo] is the 2d array that stores the id of the tile
the move method is the method that sets the player position after the xs/ys values have been set