<commit_before>package stray.world;

import stray.Main;
import stray.blocks.Blocks;
import stray.effect.Effect;
import stray.entity.Entity;
import stray.util.AssetMap;
import stray.util.MathHelper;
import stray.util.Message;
import stray.util.Utils;

import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.graphics.glutils.ShapeRenderer.ShapeType;
import com.badlogic.gdx.math.MathUtils;
import com.badlogic.gdx.utils.Array;

public class WorldRenderer {

	World world;
	SpriteBatch batch;
	Main main;

	Array<GearPart> gearparts = new Array<GearPart>();

	public WorldRenderer(World world) {
		this.world = world;
		batch = world.batch;
		main = world.main;
	}

	public boolean showGrid = false;

	public void renderBlocks() {
		batch.begin();
		main.font.setColor(Color.BLACK);
		float maxx = world.sizex;
		float maxy = world.sizey;
		int prex = (int) MathUtils.clamp(((world.camera.camerax / World.tilesizex) - 1), 0f, maxx);
		int prey = (int) MathUtils.clamp(((world.camera.cameray / World.tilesizey) - 1), 0f, maxy);
		int postx = (int) MathUtils.clamp((world.camera.camerax / World.tilesizex) + 2
				+ (Gdx.graphics.getWidth() / World.tilesizex), 0f, maxx);
		int posty = (int) MathUtils.clamp((world.camera.cameray / World.tilesizey) + 2
				+ (Gdx.graphics.getHeight() / World.tilesizex), 0f, maxy);

		main.font.setColor(Color.WHITE);
		for (int x = prex; x < postx; x++) {
			for (int y = prey; y < posty; y++) {
				if (world.getBlock(x, y) != null) {
					world.getBlock(x, y).render(world, x, y);
				} else {
					Blocks.instance().getBlock("space").render(world, x, y);<commit_msg>Fixed world renderer default block to render<commit_after>package stray.world;

import stray.Main;
import stray.blocks.Blocks;
import stray.effect.Effect;
import stray.entity.Entity;
import stray.util.AssetMap;
import stray.util.MathHelper;
import stray.util.Message;
import stray.util.Utils;

import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.graphics.glutils.ShapeRenderer.ShapeType;
import com.badlogic.gdx.math.MathUtils;
import com.badlogic.gdx.utils.Array;

public class WorldRenderer {

	World world;
	SpriteBatch batch;
	Main main;

	Array<GearPart> gearparts = new Array<GearPart>();

	public WorldRenderer(World world) {
		this.world = world;
		batch = world.batch;
		main = world.main;
	}

	public boolean showGrid = false;

	public void renderBlocks() {
		batch.begin();
		main.font.setColor(Color.BLACK);
		float maxx = world.sizex;
		float maxy = world.sizey;
		int prex = (int) MathUtils.clamp(((world.camera.camerax / World.tilesizex) - 1), 0f, maxx);
		int prey = (int) MathUtils.clamp(((world.camera.cameray / World.tilesizey) - 1), 0f, maxy);
		int postx = (int) MathUtils.clamp((world.camera.camerax / World.tilesizex) + 2
				+ (Gdx.graphics.getWidth() / World.tilesizex), 0f, maxx);
		int posty = (int) MathUtils.clamp((world.camera.cameray / World.tilesizey) + 2
				+ (Gdx.graphics.getHeight() / World.tilesizex), 0f, maxy);

		main.font.setColor(Color.WHITE);
		for (int x = prex; x < postx; x++) {
			for (int y = prey; y < posty; y++) {
				if (world.getBlock(x, y) != null) {
					world.getBlock(x, y).render(world, x, y);
				} else {
					Blocks.defaultBlock().render(world, x, y);
{'fraction_non_alphanumeric': 0.14589928057553958, 'fraction_numerical': 0.005179856115107914, 'mean_word_length': 4.15727002967359, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '801676', 'n_tokens_mistral': 1390, 'n_tokens_neox': 1263, 'n_words': 269}