Package com.khorn.terraincontrol.util

Examples of com.khorn.terraincontrol.util.Rotation


    {
        for (int treeNumber = 0; treeNumber < trees.size(); treeNumber++)
        {
            if (random.nextInt(100) < treeChances.get(treeNumber))
            {
                Rotation rotation = trees.get(treeNumber).canRotateRandomly() ? Rotation.getRandomRotation(random) : Rotation.NORTH;
                if (trees.get(treeNumber).spawnForced(world, random, rotation, x, y, z))
                {
                    // Success!
                    return true;
                }
View Full Code Here


            y = world.getHighestBlockYAt(x, z);

        if (y < 0)
            return false;

        Rotation rotation = randomRotation ? Rotation.getRandomRotation(random) : Rotation.NORTH;

        if (!canSpawnAt(world, rotation, x, y, z))
            return false;

        boolean objectSpawned = spawnForced(world, random, rotation, x, y, z);
View Full Code Here

        return true;
    }

    protected boolean spawn(LocalWorld world, Random random, int x, int z)
    {
        Rotation rotation = settings.rotateRandomly ? Rotation.getRandomRotation(random) : Rotation.NORTH;
        int y = 0;
        if (settings.spawnHeight == SpawnHeightEnum.randomY)
        {
            y = MathHelper.getRandomNumberInRange(random, settings.minHeight, settings.maxHeight);
        }
View Full Code Here

    @Override
    public CustomObjectCoordinate makeCustomObjectCoordinate(Random random, int chunkX, int chunkZ)
    {
        if (settings.rarity > random.nextDouble() * 100.0)
        {
            Rotation rotation = settings.rotateRandomly ? Rotation.getRandomRotation(random) : Rotation.NORTH;
            int height = MathHelper.getRandomNumberInRange(random, settings.minHeight, settings.maxHeight);
            return new CustomObjectCoordinate(this, rotation, chunkX * 16 + 8 + random.nextInt(16), height, chunkZ * 16 + 8 + random.nextInt(16));
        }
        return null;
    }
View Full Code Here

TOP

Related Classes of com.khorn.terraincontrol.util.Rotation

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.