Guest User

Untitled

a guest
Jul 19th, 2017
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.26 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.server.MinecraftServer;
  12. import net.minecraft.util.Mirror;
  13. import net.minecraft.util.ResourceLocation;
  14. import net.minecraft.util.Rotation;
  15. import net.minecraft.util.math.BlockPos;
  16. import net.minecraft.util.math.ChunkPos;
  17. import net.minecraft.world.World;
  18. import net.minecraft.world.gen.feature.WorldGenerator;
  19. import net.minecraft.world.gen.structure.StructureBoundingBox;
  20. import net.minecraft.world.gen.structure.template.PlacementSettings;
  21. import net.minecraft.world.gen.structure.template.Template;
  22. import net.minecraft.world.gen.structure.template.TemplateManager;
  23.  
  24. public class StructureDragonNests {
  25.  
  26. public boolean generate(World worldIn, Random rand, BlockPos pos) {
  27. int x = pos.getX();
  28. int y = pos.getY();
  29. int z = pos.getZ();
  30. //upper
  31. worldIn.setBlockState(new BlockPos(x+2,y+1,z+0), ModBlocks.pileofsticks.getStateFromMeta(0));
  32. worldIn.setBlockState(new BlockPos(x+3,y+1,z+0), ModBlocks.pileofsticks.getStateFromMeta(0));
  33. worldIn.setBlockState(new BlockPos(x+4,y+1,z+0), ModBlocks.pileofsticks.getStateFromMeta(0));
  34. worldIn.setBlockState(new BlockPos(x+0,y+1,z+2), ModBlocks.pileofsticks.getStateFromMeta(0));
  35. worldIn.setBlockState(new BlockPos(x+1,y+1,z+1), ModBlocks.pileofsticks.getStateFromMeta(0));
  36. worldIn.setBlockState(new BlockPos(x+1,y+1,z+5), ModBlocks.pileofsticks.getStateFromMeta(0));
  37. worldIn.setBlockState(new BlockPos(x+5,y+1,z+5), ModBlocks.pileofsticks.getStateFromMeta(0));
  38. worldIn.setBlockState(new BlockPos(x+2,y+1,z+6), ModBlocks.pileofsticks.getStateFromMeta(0));
  39. worldIn.setBlockState(new BlockPos(x+3,y+1,z+6), ModBlocks.pileofsticks.getStateFromMeta(0));
  40. worldIn.setBlockState(new BlockPos(x+4,y+1,z+6), ModBlocks.pileofsticks.getStateFromMeta(0));
  41. worldIn.setBlockState(new BlockPos(x+5,y+1,z+1), ModBlocks.pileofsticks.getStateFromMeta(0));
  42. worldIn.setBlockState(new BlockPos(x+0,y+1,z+2), ModBlocks.pileofsticks.getStateFromMeta(0));
  43. worldIn.setBlockState(new BlockPos(x+0,y+1,z+3), ModBlocks.pileofsticks.getStateFromMeta(0));
  44. worldIn.setBlockState(new BlockPos(x+0,y+1,z+4), ModBlocks.pileofsticks.getStateFromMeta(0));
  45. worldIn.setBlockState(new BlockPos(x+6,y+1,z+2), ModBlocks.pileofsticks.getStateFromMeta(0));
  46. worldIn.setBlockState(new BlockPos(x+6,y+1,z+3), ModBlocks.pileofsticks.getStateFromMeta(0));
  47. worldIn.setBlockState(new BlockPos(x+6,y+1,z+4), ModBlocks.pileofsticks.getStateFromMeta(0));
  48. //bottom
  49. worldIn.setBlockState(new BlockPos(x+1,y+0,z+2), ModBlocks.pileofsticks.getStateFromMeta(0));
  50. worldIn.setBlockState(new BlockPos(x+1,y+0,z+4), ModBlocks.pileofsticks.getStateFromMeta(0));
  51. worldIn.setBlockState(new BlockPos(x+2,y+0,z+1), ModBlocks.pileofsticks.getStateFromMeta(0));
  52. worldIn.setBlockState(new BlockPos(x+2,y+0,z+3), ModBlocks.pileofsticks.getStateFromMeta(0));
  53. worldIn.setBlockState(new BlockPos(x+2,y+0,z+4), ModBlocks.pileofsticks.getStateFromMeta(0));
  54. worldIn.setBlockState(new BlockPos(x+3,y+0,z+2), ModBlocks.pileofsticks.getStateFromMeta(0));
  55. worldIn.setBlockState(new BlockPos(x+3,y+0,z+3), ModBlocks.pileofsticks.getStateFromMeta(0));
  56. worldIn.setBlockState(new BlockPos(x+3,y+0,z+5), ModBlocks.pileofsticks.getStateFromMeta(0));
  57. worldIn.setBlockState(new BlockPos(x+4,y+0,z+1), ModBlocks.pileofsticks.getStateFromMeta(0));
  58. worldIn.setBlockState(new BlockPos(x+4,y+0,z+2), ModBlocks.pileofsticks.getStateFromMeta(0));
  59. worldIn.setBlockState(new BlockPos(x+4,y+0,z+3), ModBlocks.pileofsticks.getStateFromMeta(0));
  60. worldIn.setBlockState(new BlockPos(x+4,y+0,z+5), ModBlocks.pileofsticks.getStateFromMeta(0));
  61. worldIn.setBlockState(new BlockPos(x+5,y+0,z+3), ModBlocks.pileofsticks.getStateFromMeta(0));
  62. worldIn.setBlockState(new BlockPos(x+5,y+0,z+4), ModBlocks.pileofsticks.getStateFromMeta(0));
  63. worldIn.setBlockState(new BlockPos(x+1,y+0,z+3), Blocks.DIRT.getDefaultState().withProperty(BlockDirt.VARIANT, DirtType.COARSE_DIRT));
  64. worldIn.setBlockState(new BlockPos(x+2,y+0,z+5), Blocks.DIRT.getDefaultState().withProperty(BlockDirt.VARIANT, DirtType.COARSE_DIRT));
  65. worldIn.setBlockState(new BlockPos(x+2,y+0,z+2), Blocks.DIRT.getDefaultState().withProperty(BlockDirt.VARIANT, DirtType.COARSE_DIRT));
  66. worldIn.setBlockState(new BlockPos(x+3,y+0,z+1), Blocks.DIRT.getDefaultState().withProperty(BlockDirt.VARIANT, DirtType.COARSE_DIRT));
  67. worldIn.setBlockState(new BlockPos(x+3,y+0,z+4), Blocks.DIRT.getDefaultState().withProperty(BlockDirt.VARIANT, DirtType.COARSE_DIRT));
  68. worldIn.setBlockState(new BlockPos(x+4,y+0,z+4), Blocks.DIRT.getDefaultState().withProperty(BlockDirt.VARIANT, DirtType.COARSE_DIRT));
  69. worldIn.setBlockState(new BlockPos(x+5,y+0,z+2), Blocks.DIRT.getDefaultState().withProperty(BlockDirt.VARIANT, DirtType.COARSE_DIRT));
  70. worldIn.setBlockState(new BlockPos(x+3,y+1,z+3), BlockDragonBreedEgg.DRAGON_BREED_EGG.getStateFromMeta(worldIn.rand.nextInt(5)));
  71. return true;
  72. }
  73.  
  74. }
Add Comment
Please, Sign In to add comment