Advertisement
Guest User

Untitled

a guest
Jul 1st, 2017
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.83 KB | None | 0 0
  1. package com.TheRPGAdventurer.server.world;
  2.  
  3. import java.util.Random;
  4.  
  5. import com.TheRPGAdventurer.client.blocks.BlockDragonBreedEgg;
  6. import com.TheRPGAdventurer.client.init.ModBlocks;
  7.  
  8. import net.minecraft.block.BlockDirt;
  9. import net.minecraft.block.BlockDirt.DirtType;
  10. import net.minecraft.init.Blocks;
  11. import net.minecraft.util.math.BlockPos;
  12. import net.minecraft.world.World;
  13.  
  14. public class StructureDragonNestRuby {
  15.  
  16. public boolean generate(World worldIn, Random rand, BlockPos pos) {
  17. int x = pos.getX();
  18. int y = pos.getY();
  19. int z = pos.getZ();
  20. //upper
  21. worldIn.setBlockState(new BlockPos(x+2,y+1,z+0), ModBlocks.pileofsticks.getStateFromMeta(0));
  22. worldIn.setBlockState(new BlockPos(x+3,y+1,z+0), ModBlocks.pileofsticks.getStateFromMeta(0));
  23. worldIn.setBlockState(new BlockPos(x+4,y+1,z+0), ModBlocks.pileofsticks.getStateFromMeta(0));
  24. worldIn.setBlockState(new BlockPos(x+0,y+1,z+2), ModBlocks.pileofsticks.getStateFromMeta(0));
  25. worldIn.setBlockState(new BlockPos(x+1,y+1,z+1), ModBlocks.pileofsticks.getStateFromMeta(0));
  26. worldIn.setBlockState(new BlockPos(x+1,y+1,z+5), ModBlocks.pileofsticks.getStateFromMeta(0));
  27. worldIn.setBlockState(new BlockPos(x+5,y+1,z+5), ModBlocks.pileofsticks.getStateFromMeta(0));
  28. worldIn.setBlockState(new BlockPos(x+2,y+1,z+6), ModBlocks.pileofsticks.getStateFromMeta(0));
  29. worldIn.setBlockState(new BlockPos(x+3,y+1,z+6), ModBlocks.pileofsticks.getStateFromMeta(0));
  30. worldIn.setBlockState(new BlockPos(x+4,y+1,z+6), ModBlocks.pileofsticks.getStateFromMeta(0));
  31. worldIn.setBlockState(new BlockPos(x+5,y+1,z+1), ModBlocks.pileofsticks.getStateFromMeta(0));
  32. worldIn.setBlockState(new BlockPos(x+0,y+1,z+2), ModBlocks.pileofsticks.getStateFromMeta(0));
  33. worldIn.setBlockState(new BlockPos(x+0,y+1,z+3), ModBlocks.pileofsticks.getStateFromMeta(0));
  34. worldIn.setBlockState(new BlockPos(x+0,y+1,z+4), ModBlocks.pileofsticks.getStateFromMeta(0));
  35. worldIn.setBlockState(new BlockPos(x+6,y+1,z+2), ModBlocks.pileofsticks.getStateFromMeta(0));
  36. worldIn.setBlockState(new BlockPos(x+6,y+1,z+3), ModBlocks.pileofsticks.getStateFromMeta(0));
  37. worldIn.setBlockState(new BlockPos(x+6,y+1,z+4), ModBlocks.pileofsticks.getStateFromMeta(0));
  38. //bottom
  39. worldIn.setBlockState(new BlockPos(x+1,y+0,z+2), ModBlocks.pileofsticks.getStateFromMeta(0));
  40. worldIn.setBlockState(new BlockPos(x+1,y+0,z+4), ModBlocks.pileofsticks.getStateFromMeta(0));
  41. worldIn.setBlockState(new BlockPos(x+2,y+0,z+1), ModBlocks.pileofsticks.getStateFromMeta(0));
  42. worldIn.setBlockState(new BlockPos(x+2,y+0,z+3), ModBlocks.pileofsticks.getStateFromMeta(0));
  43. worldIn.setBlockState(new BlockPos(x+2,y+0,z+4), ModBlocks.pileofsticks.getStateFromMeta(0));
  44. worldIn.setBlockState(new BlockPos(x+3,y+0,z+2), ModBlocks.pileofsticks.getStateFromMeta(0));
  45. worldIn.setBlockState(new BlockPos(x+3,y+0,z+3), ModBlocks.pileofsticks.getStateFromMeta(0));
  46. worldIn.setBlockState(new BlockPos(x+3,y+0,z+5), ModBlocks.pileofsticks.getStateFromMeta(0));
  47. worldIn.setBlockState(new BlockPos(x+4,y+0,z+1), ModBlocks.pileofsticks.getStateFromMeta(0));
  48. worldIn.setBlockState(new BlockPos(x+4,y+0,z+2), ModBlocks.pileofsticks.getStateFromMeta(0));
  49. worldIn.setBlockState(new BlockPos(x+4,y+0,z+3), ModBlocks.pileofsticks.getStateFromMeta(0));
  50. worldIn.setBlockState(new BlockPos(x+4,y+0,z+5), ModBlocks.pileofsticks.getStateFromMeta(0));
  51. worldIn.setBlockState(new BlockPos(x+5,y+0,z+3), ModBlocks.pileofsticks.getStateFromMeta(0));
  52. worldIn.setBlockState(new BlockPos(x+5,y+0,z+4), ModBlocks.pileofsticks.getStateFromMeta(0));
  53. worldIn.setBlockState(new BlockPos(x+1,y+0,z+3), Blocks.DIRT.getDefaultState().withProperty(BlockDirt.VARIANT, DirtType.COARSE_DIRT));
  54. worldIn.setBlockState(new BlockPos(x+2,y+0,z+5), Blocks.DIRT.getDefaultState().withProperty(BlockDirt.VARIANT, DirtType.COARSE_DIRT));
  55. worldIn.setBlockState(new BlockPos(x+2,y+0,z+2), Blocks.DIRT.getDefaultState().withProperty(BlockDirt.VARIANT, DirtType.COARSE_DIRT));
  56. worldIn.setBlockState(new BlockPos(x+3,y+0,z+1), Blocks.DIRT.getDefaultState().withProperty(BlockDirt.VARIANT, DirtType.COARSE_DIRT));
  57. worldIn.setBlockState(new BlockPos(x+3,y+0,z+4), Blocks.DIRT.getDefaultState().withProperty(BlockDirt.VARIANT, DirtType.COARSE_DIRT));
  58. worldIn.setBlockState(new BlockPos(x+4,y+0,z+4), Blocks.DIRT.getDefaultState().withProperty(BlockDirt.VARIANT, DirtType.COARSE_DIRT));
  59. worldIn.setBlockState(new BlockPos(x+5,y+0,z+2), Blocks.DIRT.getDefaultState().withProperty(BlockDirt.VARIANT, DirtType.COARSE_DIRT));
  60. 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.
  61.  
  62. return true;
  63. }
  64.  
  65. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement