@Override
	public void draw() {
		texture.bind();
		
		//Center
		for (int x = 0; x < Main.xLen; x += 1) {
			for (int y = 0; y < Main.yLen; y += 1) {
				drawTexture(0, 0, 32, 32, Main.padding + x * Main.tileSize, Main.padding + y * Main.tileSize, Main.tileSize, Main.tileSize);
			}
		}
		//Edges
		for (int x = 0; x < Main.xLen * Main.tileSize; x += 24) {
			drawTexture(42, 0, 12, 10, x + Main.padding, 0, 24, 20);
			drawTexture(42, 22, 12, 10, x + Main.padding, Main.tileSize * Main.yLen + Main.padding, 24, 20);
		}
		for (int y = 0; y < Main.yLen * Main.tileSize; y += 24) {
			drawTexture(32, 10, 10, 12, 0, y + Main.padding, 20, 24);
			drawTexture(54, 10, 10, 12, Main.tileSize * Main.xLen + Main.padding, y + Main.padding, 20, 24);
		}
		//Corners
		drawTexture(32, 0, 10, 10, 0, 0, 20, 20);
		drawTexture(32, 22, 10, 10, 0, Main.tileSize * Main.yLen + Main.padding, 20, 20);
		drawTexture(54, 0, 10, 10, Main.tileSize * Main.xLen + Main.padding, 0, 20, 20);
		drawTexture(54, 22, 10, 10, Main.tileSize * Main.xLen + Main.padding, Main.tileSize * Main.yLen + Main.padding, 20, 20);

		for (int i = 0; i <= 4; i++) {
			if (Main.getGamestate().getEntities().containsKey(RenderPriority.getRenderPriorityFromId(i))) {
				for (Entity obj : Main.getGamestate().getEntities().get(RenderPriority.getRenderPriorityFromId(i))) {
					obj.draw(this);
				}
			}
		}
		
		toast.draw(this);
		
		pollInput();
	}