Jump to content

Karuberu

Members
  • Posts

    2
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

Karuberu's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Oh wow... I can't believe I didn't think of that. I converted to block coordinates later, but for some reason thought getBiomeGenForCoords took chunk coordinates. It works perfectly now - sorry for the false report.
  2. I have a world generator (implementing IWorldGenerator, of course) that checks for cold biomes and replaces some dirt with a new block. However, it seems that the biome data obtained by using "world.getBiomeGenForCoords(chunkX, chunkZ)" in my generate function is either offset or simply wrong. In some worlds, it seems to work just fine (namely flatland worlds with a single biome or worlds with large biomes), but in others, it's way off. I did some testing: I added a line to log the chunk coordinates/biome in the generate function and then traveled to those chunk coordinates in the game and checked the biome with F3. In the world I tested, I was in a Plains biome according to the game, but my log said it was an Ocean chunk. To verify that I hadn't screwed something up in my test, I had my world generator execute in Ocean biomes and recreated the world. My new block had replaced the dirt in the plains biome, even though I had just set it to work in ocean biomes. (And no, the chunk wasn't partially in an ocean biome or anything like that.) Am I doing something wrong or is this a genuine bug? public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) { float temperature = world.getBiomeGenForCoords(chunkX, chunkZ).getFloatTemperature(); System.out.println("[" + chunkX + "," + chunkZ + "] " + world.getBiomeGenForCoords(chunkX, chunkZ).biomeName + ": " + temperature); if (temperature <= 0.15F) { // do stuff (the code here works fine if it's ever reached, so I've omitted it for brevity's sake) } }
×
×
  • Create New...

Important Information

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