<commit_before>package com.khorn.terraincontrol.generator.resourcegens;

import com.khorn.terraincontrol.DefaultMaterial;
import com.khorn.terraincontrol.LocalWorld;
import com.khorn.terraincontrol.TerrainControl;
import com.khorn.terraincontrol.exception.InvalidConfigException;

import java.util.List;
import java.util.Random;

public class VinesGen extends Resource
{
    private int minAltitude;
    private int maxAltitude;

    @Override
    public void spawn(LocalWorld world, Random rand, boolean villageInChunk, int x, int z)
    {
        int _x = x;
        int _z = z;
        int y = minAltitude;

        while (y < maxAltitude)
        {
            if (world.isEmpty(_x, y, _z))
            {
                for (int direction = 2; direction <= 5; direction++)
                    if (canPlace(world, _x, y, _z, direction))
                    {
                        world.setBlock(_x, y, _z, DefaultMaterial.VINE.id, 1 << d[OPPOSITE_FACING[direction]]);
                        break;
                    }
            } else
            {
                _x = x + rand.nextInt(4) - rand.nextInt(4);
                _z = z + rand.nextInt(4) - rand.nextInt(4);
            }
            y++;
        }

    }

    public boolean canPlace(LocalWorld world, int x, int y, int z, int paramInt4)
    {
        int id;
        switch (paramInt4)
        {
            default:
                return false;
            case 1:
                id = (world.getTypeId(x, y + 1, z));
                break;
            case 2:
                id = (world.getTypeId(x, y, z + 1));
                break;
            case 3:
                id = (world.getTypeId(x, y, z - 1));
                break;
            case 5:<commit_msg>Test commit with small tuning.<commit_after>package com.khorn.terraincontrol.generator.resourcegens;

import com.khorn.terraincontrol.DefaultMaterial;
import com.khorn.terraincontrol.LocalWorld;
import com.khorn.terraincontrol.TerrainControl;
import com.khorn.terraincontrol.exception.InvalidConfigException;

import java.util.List;
import java.util.Random;

public class VinesGen extends Resource
{
    private int minAltitude;
    private int maxAltitude;

    @Override
    public void spawn(LocalWorld world, Random rand, boolean villageInChunk, int x, int z)
    {
        int _x = x;
        int _z = z;
        int y = minAltitude;

        while (y < maxAltitude)
        {
            if (world.isEmpty(_x, y, _z))
            {
                for (int direction = 2; direction <= 5; direction++)
                    if (canPlace(world, _x, y, _z, direction))
                    {
                        world.setBlock(_x, y, _z, DefaultMaterial.VINE.id, 1 << d[OPPOSITE_FACING[direction]], true, false, true);
                        break;
                    }
            } else
            {
                _x = x + rand.nextInt(4) - rand.nextInt(4);
                _z = z + rand.nextInt(4) - rand.nextInt(4);
            }
            y++;
        }

    }

    public boolean canPlace(LocalWorld world, int x, int y, int z, int paramInt4)
    {
        int id;
        switch (paramInt4)
        {
            default:
                return false;
            case 1:
                id = (world.getTypeId(x, y + 1, z));
                break;
            case 2:
                id = (world.getTypeId(x, y, z + 1));
                break;
            case 3:
                id = (world.getTypeId(x, y, z - 1));
                break;
            case 5:
{'fraction_non_alphanumeric': 0.10005685048322911, 'fraction_numerical': 0.009096077316657191, 'mean_word_length': 1.4764250527797327, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 3, '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': '4267621', 'n_tokens_mistral': 1079, 'n_tokens_neox': 1013, 'n_words': 264}