Search in sources :

Example 6 with WorldProviderSurface

use of net.minecraft.world.WorldProviderSurface in project takumicraft by TNTModders.

the class TakumiGunOreGenerator method generateOre.

private void generateOre(World world, Random random, int x, int z) {
    // 1チャンクで生成したい回数だけ繰り返す。
    if (world.provider instanceof WorldProviderSurface) {
        for (int i = 0; i < 10; i++) {
            int genX = x + random.nextInt(16);
            int genY = 1 + random.nextInt(64);
            int genZ = z + random.nextInt(16);
            new WorldGenMinable(random.nextInt(50) == 0 ? TakumiBlockCore.DUMMY_GUNORE.getDefaultState() : TakumiBlockCore.GUNORE.getDefaultState(), 25).generate(world, random, new BlockPos(genX, genY, genZ));
        }
    }
}
Also used : WorldProviderSurface(net.minecraft.world.WorldProviderSurface) BlockPos(net.minecraft.util.math.BlockPos) WorldGenMinable(net.minecraft.world.gen.feature.WorldGenMinable)

Aggregations

WorldProviderSurface (net.minecraft.world.WorldProviderSurface)6 File (java.io.File)3 World (net.minecraft.world.World)2 GameProfile (com.mojang.authlib.GameProfile)1 MinecraftProfileTexture (com.mojang.authlib.minecraft.MinecraftProfileTexture)1 Type (com.mojang.authlib.minecraft.MinecraftProfileTexture.Type)1 IOException (java.io.IOException)1 Iterator (java.util.Iterator)1 DataFormatException (java.util.zip.DataFormatException)1 IDetectableResource (micdoodle8.mods.galacticraft.api.block.IDetectableResource)1 IEntityNoisy (micdoodle8.mods.galacticraft.api.entity.IEntityNoisy)1 EntitySpaceshipBase (micdoodle8.mods.galacticraft.api.prefab.entity.EntitySpaceshipBase)1 BlockVec3 (micdoodle8.mods.galacticraft.api.vector.BlockVec3)1 IGalacticraftWorldProvider (micdoodle8.mods.galacticraft.api.world.IGalacticraftWorldProvider)1 GuiCelestialSelection (micdoodle8.mods.galacticraft.core.client.gui.screen.GuiCelestialSelection)1 WorldProviderMoon (micdoodle8.mods.galacticraft.core.dimension.WorldProviderMoon)1 WorldProviderSpaceStation (micdoodle8.mods.galacticraft.core.dimension.WorldProviderSpaceStation)1 FluidNetwork (micdoodle8.mods.galacticraft.core.fluid.FluidNetwork)1 ItemSensorGlasses (micdoodle8.mods.galacticraft.core.items.ItemSensorGlasses)1 GalacticraftPacketHandler (micdoodle8.mods.galacticraft.core.network.GalacticraftPacketHandler)1