Terasology / JoshariasSurvival

Survival a la Josharias
1 stars 10 forks source link

Trees are being generated without leaves #28

Closed askneller closed 5 years ago

askneller commented 5 years ago

I am using the latest code from the module and Terasology. When I start a new game all the trees have no leaves.

no-leaves

Note that in order to run fro source I had to get the module sources for Hunger, Thirst, ManualLabor, MultiBlock, and IRLCorp, as they were having errors with the changes to Health events recently.

askneller commented 5 years ago

I added some logging in AbstractTreeGenerator.safelySetBlock so that it looked like this (sorry I didn't know how to properly indent the code block):

protected void safelySetBlock(CoreChunk chunk, int x, int y, int z, Block block) { if (ChunkConstants.CHUNK_REGION.encompasses(x, y, z)) { logger.info("Before chunk.setBlock({} {} {} {})", x, y, z, block.getURI().toString()); chunk.setBlock(x, y, z, block); logger.info("After chunk.setBlock({} {} {} {}) chuck.getBlock({}, {}, {}) returns {}", x, y, z, block.getURI().toString(), x, y, z, chunk.getBlock(x, y, z).getURI().toString()); } }

It sets the block to a grass block but when it is immediately read back out it comes back as air. Here are some logs:

19:20:18.447 [Chunk-Generator-2] INFO o.t.c.w.g.t.AbstractTreeGenerator - Before chunk.setBlock(0 21 31 core:DarkLeaf) 19:20:18.447 [Chunk-Generator-2] INFO o.t.c.w.g.t.AbstractTreeGenerator - After chunk.setBlock(0 21 31 core:DarkLeaf) chuck.getBlock(0, 21, 31) returns engine:air 19:20:18.447 [Chunk-Generator-2] INFO o.t.c.w.g.t.AbstractTreeGenerator - Before chunk.setBlock(1 26 31 core:DarkLeaf) 19:20:18.447 [Chunk-Generator-2] INFO o.t.c.w.g.t.AbstractTreeGenerator - After chunk.setBlock(1 26 31 core:DarkLeaf) chuck.getBlock(1, 26, 31) returns engine:air

Cervator commented 5 years ago

Hi @askneller thanks for the report! They're easy to miss off in the module repos so feel free to mention them on Discord as well or find a relevant issue in the engine repo to comment on as well :-)

We finally just fixed this over the last few weeks, all good now!