Jump to content

TheRPGAdventurer

Members
  • Posts

    642
  • Joined

  • Last visited

Everything posted by TheRPGAdventurer

  1. can you please make it easy or show me how you edit the code?
  2. but my structure is not a big ass dungeon, it will not be found easily because miners in survival can't see it in caves that's why It needs a cave.
  3. the new generate method I use will still not work? I thought I changed the value to 3, 7, 7,
  4. I am using a seed that spawns you in a plains biome I saved that seed so everytime I create a new world, I don't have trouble looking for a plains biome.
  5. oh sorry, I thought I posted it a minute ago, https://pastebin.com/p6DWTgMP
  6. here's an update public void generateNestUnderground(World world, Random random, int chunkX, int chunkZ, Random rand) { int x = chunkX * 16 + random.nextInt(16); int z = chunkZ * 16 + random.nextInt(16); int xy = x >> 4; int zy = z >> 4; int height = world.getChunkFromChunkCoords(xy, zy).getHeight(new BlockPos(x & 15, 0, z & 15)); int y = height - random.nextInt(43 - 30); if(world.getBiomeForCoordsBody(new BlockPos(x,y,z)).getBiomeClass().equals(BiomePlains.class)) { if((random.nextInt(10) + 1) <= 1) { boolean place = true; for(int Y = 0; Y < 3; Y++) { for(int Z = 0; Z < 7; Z++) { for(int X = 0; X < 7; X++) { if(world.getBlockState(new BlockPos(X + x, Y + y + 1, Z + z)).getBlock() != Blocks.AIR) { place = false; } } } } if(place) { dragonNest.generate(world, random, new BlockPos(x,y,z)); } } } } }
  7. my structure size btw is 7X2X7;
  8. the dragonNest.generate(world, random, new BlockPos(x,y,z)); issue tho, did I did the right thing by putting null on if(place) { dragonNest.generate(world, random, null); because I did not use it?
  9. ok gonna do a size count on my structure, my structure is a pretty small dragon nest that can fit in a cave.
  10. 9X11 more or 9X11 less? I mean does it really needs that the ground is exactly 9X11? Edit: bigger than 9X11 or less than 9X11 needed to spawn?
  11. Update tell me please what's wrong with it. public void generateNestUnderground(World world, Random random, int chunkX, int chunkZ, Random rand) { int x = chunkX * 16 + random.nextInt(16); int z = chunkZ * 16 + random.nextInt(16); int xy = x >> 4; int zy = z >> 4; int y = random.nextInt(43 - 30); if(world.getBiomeForCoordsBody(new BlockPos(x,y,z)).getBiomeClass().equals(BiomePlains.class)) { if((random.nextInt(45) + 1) <= 1) { boolean place = true; for(int Y = 0; Y < 6; Y++) { for(int Z = 0; Z < 9; Z++) { for(int X = 0; X < 11; X++) { if(world.getBlockState(new BlockPos(X + x, Y + y + 1, Z + z)).getBlock() != Blocks.AIR) { place = false; } } } } if(place) { dragonNest.generate(world, random, new BlockPos(x,y,z)); } } } } }
  12. small question, what is the method that makes mobs leashed or un leashed?
  13. like what biomes? so I can make and exception?
  14. so it only spawns only and exactly -78 right? How do I make it like 65 to 78?
  15. like int y = height - 78; // it used to be -1.
  16. above ground solved underground not.
  17. I haven't tested it yet, because it's midnight in my country, and I can't even assure if i can do it tommorow because it's saturday and I'm banned using it on sunday to thursday because when it is sunday, it is monday tommorow! and I can't wake up early, I know necro posts are banned but can you give me a permission to allow it?
  18. already tried that but gonna try it with higher chances!
  19. I know! I understand the first sentence because it was explained in the tutorial! I am calling this in an IWorldGenerator, and registered it but the tutorial just explains spawning it above ground and I can't find one that spawns below ground.
  20. I really need an answer, I am not killing you to get one tho, but last time I posted the same problem, it got 4000 views so a lot of people other than me seriously needs an answer and I don't really fully know this game, I mean I know how a game works like you need a model an AI to program a living creature in a game but my problem is I don't know how it works in code.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.