<commit_before>package openblocks.client.renderer;

import java.util.HashSet;
import java.util.List;
import java.util.Random;
import java.util.Set;

import org.lwjgl.opengl.GL11;

import openblocks.OpenBlocks;
import openblocks.client.renderer.tileentity.OpenRenderHelper;
import net.minecraft.block.Block;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.world.IBlockAccess;

public class BlockPathRenderer implements IBlockRenderer {

	private Random rnd = new Random();
	
	@Override
	public void renderInventoryBlock(Block block, int metadata, int modelID, RenderBlocks renderer) {

		GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
		renderWorldBlock(null, 0, 0, 0, OpenBlocks.Blocks.path, -1, renderer);
	}

	@Override
	public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer) {
		Set<AxisAlignedBB> boundingBoxes = new HashSet<AxisAlignedBB>();
		for (int i = 0; i < 10; i++) {
			rnd.setSeed(x + y + z + (i * 20));
			double width = rnd.nextDouble() * 0.3 + 0.1;
			double length = rnd.nextDouble() * 0.3 + 0.1;
			double pX = rnd.nextDouble() * (1.0 - width);
			double pZ = rnd.nextDouble() * (1.0 - length);
			AxisAlignedBB bb = AxisAlignedBB.getAABBPool().getAABB(pX, 0, pZ, pX + width, 1, pZ + length);
			boolean hit = false;
			for (AxisAlignedBB box : boundingBoxes) {
				if (box.intersectsWith(bb)) {
					hit = true;
					break;
				}
			}
			if (!hit) {
				renderer.setRenderBounds(pX, 0, pZ, pX + width, 0.05 * rnd.nextDouble() + 0.02, pZ + length);
				if (modelId == -1) {
					OpenRenderHelper.renderCube(
							renderer.renderMinX,
							renderer.renderMinY,
							renderer.renderMinZ,
							renderer.renderMaxX,
							renderer.renderMaxY,
							renderer.renderMaxZ, block, null);
				}else {<commit_msg>trying to make the path rendering a bit more random<commit_after>package openblocks.client.renderer;

import java.util.HashSet;
import java.util.List;
import java.util.Random;
import java.util.Set;

import org.lwjgl.opengl.GL11;

import openblocks.OpenBlocks;
import openblocks.client.renderer.tileentity.OpenRenderHelper;
import net.minecraft.block.Block;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.world.IBlockAccess;

public class BlockPathRenderer implements IBlockRenderer {

	private Random rnd = new Random();
	
	@Override
	public void renderInventoryBlock(Block block, int metadata, int modelID, RenderBlocks renderer) {

		GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
		renderWorldBlock(null, 0, 0, 0, OpenBlocks.Blocks.path, -1, renderer);
	}

	@Override
	public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer) {
		Set<AxisAlignedBB> boundingBoxes = new HashSet<AxisAlignedBB>();
		for (int i = 0; i < 10; i++) {
			rnd.setSeed((x + y + z + (int)Math.exp(i)) % 50);
			double width = rnd.nextDouble() * 0.3 + 0.1;
			double length = rnd.nextDouble() * 0.3 + 0.1;
			double pX = rnd.nextDouble() * (1.0 - width);
			double pZ = rnd.nextDouble() * (1.0 - length);
			AxisAlignedBB bb = AxisAlignedBB.getAABBPool().getAABB(pX, 0, pZ, pX + width, 1, pZ + length);
			boolean hit = false;
			for (AxisAlignedBB box : boundingBoxes) {
				if (box.intersectsWith(bb)) {
					hit = true;
					break;
				}
			}
			if (!hit) {
				renderer.setRenderBounds(pX, 0, pZ, pX + width, 0.05 * rnd.nextDouble() + 0.02, pZ + length);
				if (modelId == -1) {
					OpenRenderHelper.renderCube(
							renderer.renderMinX,
							renderer.renderMinY,
							renderer.renderMinZ,
							renderer.renderMaxX,
							renderer.renderMaxY,
							renderer.renderMaxZ, block, null);
				}else {
{'fraction_non_alphanumeric': 0.12715688877090522, 'fraction_numerical': 0.021767985134058934, 'mean_word_length': 3.692403486924035, 'pattern_counts': {'":': 0, '<': 9, '<?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': '975489', 'n_tokens_mistral': 1544, 'n_tokens_neox': 1341, 'n_words': 319}