GlowstoneMC / Glowstone-Legacy

An open-source server for the Bukkit Minecraft modding interface
Other
363 stars 122 forks source link

[WIP] Add some structures and their NBT storage #564

Open jimmikaelkael opened 9 years ago

jimmikaelkael commented 9 years ago

This PR will add some vanilla structures:

Related Links:

turt2live commented 9 years ago

As a note, I'm not a huge fan of the current system and have been reworking it at Turt2Live-Dev/Glowstone:io.

PRHOLD: #524 or similar

jimmikaelkael commented 9 years ago

This can be reworked too. I can't find your branch, would you mind to change it to a link please ?

turt2live commented 9 years ago

As mentioned in the comment, Turt2Live-Dev/Glowstone:io

jimmikaelkael commented 9 years ago

@turt2live As per requested, the content of #524 has been merged into this PR.

jimmikaelkael commented 9 years ago

~~@turt2live, @SpaceManiac: In my attempt to generate a structure chunk by chunk as it should be, I ran into a problem (sometimes structure is not fully generated). It seems I need to order the chunks to be populated (preserving ordering to be sent to player) so that population order is something predictable, ie from NW to SE direction. I tried to make some pictures to represent what I'm talking about.~~

Imagine you have a structure generated at chunk [4, -1] overlapping 4 chunks like represented below: StructureGeneration

Now take the actual chunk ordering (sort chunks by distance from player), so closest chunks to the player will be sent first (which is perfectly expected) but that ordering is used to populate the chunks too: StructureChunks

As you can see the problem is that structure chunks population order is not predictable, and that's a big problem to build something that is overlapping several chunks. I suggest If you agree that I reoder the chunks specifically for population.

EDIT: Nevermind I've found another solution.

jimmikaelkael commented 9 years ago

Seems I'm wrong with the above, at least with the fact it could solve the structure problem: with 2 or more players discovering chunks it can completely invalidate my chunk population scenario.

turt2live commented 9 years ago

@jimmikaelkael There has been no activity on this pull request for almost a month now. Is this still being worked on or is there some circumstance that has interfered? Please respond as soon as possible, thanks!

jimmikaelkael commented 9 years ago

@turt2live I've rebased on top of master and retested to be sure all still working. I think it's ready to be reviewed.

jimmikaelkael commented 9 years ago

I'm putting this back to WIP as I will need to check a few things regarding #607.

turt2live commented 9 years ago

@jimmikaelkael Just wanted to let you know that your pull request is no longer mergeable due to recent commits on the master branch. Considering this is a WIP pull request, it's not a huge issue, but it would be appreciated if the conflicts were resolved.