Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.TheRPGAdventurer.server.world;
- import java.util.Random;
- import com.TheRPGAdventurer.client.blocks.BlockDragonBreedEgg;
- import com.TheRPGAdventurer.client.init.ModBlocks;
- import net.minecraft.block.BlockDirt;
- import net.minecraft.block.BlockDirt.DirtType;
- import net.minecraft.init.Blocks;
- import net.minecraft.util.math.BlockPos;
- import net.minecraft.world.World;
- public class StructureDragonNestRuby {
- public boolean generate(World worldIn, Random rand, BlockPos pos) {
- int x = pos.getX();
- int y = pos.getY();
- int z = pos.getZ();
- //upper
- worldIn.setBlockState(new BlockPos(x+2,y+1,z+0), ModBlocks.pileofsticks.getStateFromMeta(0));
- worldIn.setBlockState(new BlockPos(x+3,y+1,z+0), ModBlocks.pileofsticks.getStateFromMeta(0));
- worldIn.setBlockState(new BlockPos(x+4,y+1,z+0), ModBlocks.pileofsticks.getStateFromMeta(0));
- worldIn.setBlockState(new BlockPos(x+0,y+1,z+2), ModBlocks.pileofsticks.getStateFromMeta(0));
- worldIn.setBlockState(new BlockPos(x+1,y+1,z+1), ModBlocks.pileofsticks.getStateFromMeta(0));
- worldIn.setBlockState(new BlockPos(x+1,y+1,z+5), ModBlocks.pileofsticks.getStateFromMeta(0));
- worldIn.setBlockState(new BlockPos(x+5,y+1,z+5), ModBlocks.pileofsticks.getStateFromMeta(0));
- worldIn.setBlockState(new BlockPos(x+2,y+1,z+6), ModBlocks.pileofsticks.getStateFromMeta(0));
- worldIn.setBlockState(new BlockPos(x+3,y+1,z+6), ModBlocks.pileofsticks.getStateFromMeta(0));
- worldIn.setBlockState(new BlockPos(x+4,y+1,z+6), ModBlocks.pileofsticks.getStateFromMeta(0));
- worldIn.setBlockState(new BlockPos(x+5,y+1,z+1), ModBlocks.pileofsticks.getStateFromMeta(0));
- worldIn.setBlockState(new BlockPos(x+0,y+1,z+2), ModBlocks.pileofsticks.getStateFromMeta(0));
- worldIn.setBlockState(new BlockPos(x+0,y+1,z+3), ModBlocks.pileofsticks.getStateFromMeta(0));
- worldIn.setBlockState(new BlockPos(x+0,y+1,z+4), ModBlocks.pileofsticks.getStateFromMeta(0));
- worldIn.setBlockState(new BlockPos(x+6,y+1,z+2), ModBlocks.pileofsticks.getStateFromMeta(0));
- worldIn.setBlockState(new BlockPos(x+6,y+1,z+3), ModBlocks.pileofsticks.getStateFromMeta(0));
- worldIn.setBlockState(new BlockPos(x+6,y+1,z+4), ModBlocks.pileofsticks.getStateFromMeta(0));
- //bottom
- worldIn.setBlockState(new BlockPos(x+1,y+0,z+2), ModBlocks.pileofsticks.getStateFromMeta(0));
- worldIn.setBlockState(new BlockPos(x+1,y+0,z+4), ModBlocks.pileofsticks.getStateFromMeta(0));
- worldIn.setBlockState(new BlockPos(x+2,y+0,z+1), ModBlocks.pileofsticks.getStateFromMeta(0));
- worldIn.setBlockState(new BlockPos(x+2,y+0,z+3), ModBlocks.pileofsticks.getStateFromMeta(0));
- worldIn.setBlockState(new BlockPos(x+2,y+0,z+4), ModBlocks.pileofsticks.getStateFromMeta(0));
- worldIn.setBlockState(new BlockPos(x+3,y+0,z+2), ModBlocks.pileofsticks.getStateFromMeta(0));
- worldIn.setBlockState(new BlockPos(x+3,y+0,z+3), ModBlocks.pileofsticks.getStateFromMeta(0));
- worldIn.setBlockState(new BlockPos(x+3,y+0,z+5), ModBlocks.pileofsticks.getStateFromMeta(0));
- worldIn.setBlockState(new BlockPos(x+4,y+0,z+1), ModBlocks.pileofsticks.getStateFromMeta(0));
- worldIn.setBlockState(new BlockPos(x+4,y+0,z+2), ModBlocks.pileofsticks.getStateFromMeta(0));
- worldIn.setBlockState(new BlockPos(x+4,y+0,z+3), ModBlocks.pileofsticks.getStateFromMeta(0));
- worldIn.setBlockState(new BlockPos(x+4,y+0,z+5), ModBlocks.pileofsticks.getStateFromMeta(0));
- worldIn.setBlockState(new BlockPos(x+5,y+0,z+3), ModBlocks.pileofsticks.getStateFromMeta(0));
- worldIn.setBlockState(new BlockPos(x+5,y+0,z+4), ModBlocks.pileofsticks.getStateFromMeta(0));
- worldIn.setBlockState(new BlockPos(x+1,y+0,z+3), Blocks.DIRT.getDefaultState().withProperty(BlockDirt.VARIANT, DirtType.COARSE_DIRT));
- worldIn.setBlockState(new BlockPos(x+2,y+0,z+5), Blocks.DIRT.getDefaultState().withProperty(BlockDirt.VARIANT, DirtType.COARSE_DIRT));
- worldIn.setBlockState(new BlockPos(x+2,y+0,z+2), Blocks.DIRT.getDefaultState().withProperty(BlockDirt.VARIANT, DirtType.COARSE_DIRT));
- worldIn.setBlockState(new BlockPos(x+3,y+0,z+1), Blocks.DIRT.getDefaultState().withProperty(BlockDirt.VARIANT, DirtType.COARSE_DIRT));
- worldIn.setBlockState(new BlockPos(x+3,y+0,z+4), Blocks.DIRT.getDefaultState().withProperty(BlockDirt.VARIANT, DirtType.COARSE_DIRT));
- worldIn.setBlockState(new BlockPos(x+4,y+0,z+4), Blocks.DIRT.getDefaultState().withProperty(BlockDirt.VARIANT, DirtType.COARSE_DIRT));
- worldIn.setBlockState(new BlockPos(x+5,y+0,z+2), Blocks.DIRT.getDefaultState().withProperty(BlockDirt.VARIANT, DirtType.COARSE_DIRT));
- worldIn.setBlockState(new BlockPos(x+3,y+1,z+3), BlockDragonBreedEgg.INSTANCE.getStateFromMeta(2)); // this what I have problems with I want it to spawn with random metadata but I don't know how.
- return true;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement