public void render(Graphics g)
	{
		sprite.startUse();
		for (Obj curr : positions)
		{
			if (curr.getT() != Mode.Wall.i())
			{
				Rectangle currRect = new Rectangle((int) curr.getPos().X, (int) curr.getPos().Y, gridW[curr.getT()], gridH[curr.getT()]);
				if (rect.contains(currRect) || rect.intersects(currRect))
				{
					int h = 0;
					for (int j = 0; j < curr.getT(); j++)
						h += gridH[j];

					sprite.drawEmbedded(
							(float) curr.getPos().X,
							(float) curr.getPos().Y,
							(float) curr.getPos().X + gridW[curr.getT()],
							(float) curr.getPos().Y + gridH[curr.getT()],
							curr.getId() * gridW[curr.getId()],
							h,
							curr.getId() * gridW[curr.getId()] + gridW[curr.getT()],
							h + gridH[curr.getT()]);
				}
			}
		}
		sprite.endUse();

		if (inEditor)
		{
			g.setColor(Color.darkGray);

			for (int i = rect.y / gridH[mode]; i * gridH[mode] <= 1080 + (rect.y); i++)
				g.drawLine(rect.x, i * gridH[mode], rect.x + 1920, i * gridH[mode]);

			for (int i = rect.x / gridW[mode]; i * gridW[mode] <= 1920 + (rect.x); i++)
				g.drawLine(i * gridW[mode], rect.y, i * gridW[mode], rect.y + 1080);
		}
	}