Glowstone-Legacy icon indicating copy to clipboard operation
Glowstone-Legacy copied to clipboard

World generation

Open SpaceManiac opened this issue 10 years ago • 29 comments

World generation is fairly bleh right now and does not feature biomes. It also does not use the updated generation API. The optimal solution to rectify this would be:

  • Adapting world generation from Spout vanilla to either:
    • a) Include in core as the default world gen.
    • b) Distribute as official plugin, with an extremely minimal flatlands core gen.

Alternate options that were considered:

  • (In plugin form ONLY - not core) Somehow linking with vanilla jar to get accurate terrain gen.
  • Creating new world generation by regular contributor.
  • Asking around for an existing Bukkit generator to include.

The generator should reasonably approximate the vanilla generator in terms of biome diversity and characteristics, and should not have obvious flaws.

SpaceManiac avatar Feb 11 '14 23:02 SpaceManiac

Can we use the NMS code and adapt it to GlowStone to implement this feature ?

zyuiop avatar Sep 07 '14 16:09 zyuiop

100% no. NMS is copyrighted code and would cause major legal issues if any of the code was copied from decompiled source code.

Nothing stopping people from viewing the code to get an idea of the implementation (ie to find out what each meta data bit does etc) however any sort of copying is out of the question.

TomCaserta avatar Sep 07 '14 17:09 TomCaserta

Can anyone tell me a world generation plugin that spawns only in-game biomes, and not some weird thing like "city" biome or "rainbow mountains" biome? That would be AWESOME

EpicSharkNoob avatar Oct 05 '14 17:10 EpicSharkNoob

This is way far to be a complete world gen, but I can help if needed. I already have implemented huge mushrooms in PR #374. After I will have completed this PR I think I can try to reproduce the different possible vanilla trees.

jimmikaelkael avatar Oct 09 '14 08:10 jimmikaelkael

Hi,

Thank you SO MUCH for the answers. It really bugs me to spawn a jungle world with ugly mountain-colored trees and grass. :)

Also, in response to Michael J, I would LOVE some help!! That would be awesome. Now I can get my Multiplayer Deathmatch server up!

Thank you both 1,000,000,000 times,

EpicSharkNoob

On Thu, Oct 9, 2014 at 3:19 AM, mastercoms [email protected] wrote:

@EpicSharkNoob https://github.com/EpicSharkNoob http://dev.bukkit.org/bukkit-plugins/terrain-control/

— Reply to this email directly or view it on GitHub https://github.com/GlowstoneMC/Glowstone/issues/76#issuecomment-58489597 .

EpicSharkNoob avatar Oct 10 '14 00:10 EpicSharkNoob

Terrain Control plugin works well. I use it on my Craftbukkit server and is compatible with Spigot, Cauldron and Forge. Here is the link: https://github.com/MCTCP/TerrainControl/wiki/Installation-instructions

MeanMaggie avatar Oct 14 '14 13:10 MeanMaggie

@MeanMaggie Except that uses nms, which is not in Glowstone

mastercoms avatar Oct 14 '14 22:10 mastercoms

Just an idea - if we are starting from scratch, build in the ability to loop. In essence making the world a sphere. You walk so far North, you eventually come back to your starting point

MeanMaggie avatar Oct 23 '14 15:10 MeanMaggie

@MeanMaggie that is way out of scope and not relevant to this PR. It would also be likely impossible with the current game structure.

EDIT: This is the last time I use my bot to comment on things. Whups. ~turt2live

turt2bot avatar Oct 23 '14 16:10 turt2bot

and not relevant to this PR

Also not a PR

dequis avatar Oct 23 '14 18:10 dequis

Whups. Thanks @dequis

turt2live avatar Oct 23 '14 18:10 turt2live

@MeanMaggie That would be more suited for a mod or plugin. We are trying to stay like vanilla unless it is uneccessary or it performs better to do it another way.

mastercoms avatar Oct 24 '14 03:10 mastercoms

Why not leave default functionality to be flatland/basic terrain and make a separate plugin to do wgen?

tyzoid avatar Oct 26 '14 14:10 tyzoid

@tyzoid why not include a basic feature?

PaulBGD avatar Oct 27 '14 22:10 PaulBGD

It's been pretty much decided that Glowstone needs a world generator. Plugins can modify the generator further if they please, but Glowstone needs a more realistic generator to survive as an out-of-the-box software application.

turt2live avatar Oct 27 '14 22:10 turt2live

Why not bundle the world generator in as an example plugin? I think that leaving it out of the server software would lead to reduced bloat of core code. On Oct 27, 2014 6:48 PM, "Travis Ralston" [email protected] wrote:

It's been pretty much decided that Glowstone needs a world generator. Plugins can modify the generator further if they please, but Glowstone needs a more realistic generator to survive as an out-of-the-box software application.

— Reply to this email directly or view it on GitHub https://github.com/GlowstoneMC/Glowstone/issues/76#issuecomment-60683524 .

tyzoid avatar Oct 27 '14 23:10 tyzoid

Pardon me, I was thinking of the word example but many to say default. On Oct 27, 2014 7:34 PM, "Tyler Dence" [email protected] wrote:

Why not bundle the world generator in as an example plugin? I think that leaving it out of the server software would lead to reduced bloat of core code. On Oct 27, 2014 6:48 PM, "Travis Ralston" [email protected] wrote:

It's been pretty much decided that Glowstone needs a world generator. Plugins can modify the generator further if they please, but Glowstone needs a more realistic generator to survive as an out-of-the-box software application.

— Reply to this email directly or view it on GitHub https://github.com/GlowstoneMC/Glowstone/issues/76#issuecomment-60683524 .

tyzoid avatar Oct 27 '14 23:10 tyzoid

How is providing a standard gameplay feature bloat?

turt2live avatar Oct 28 '14 01:10 turt2live

Hey. Wanted to give some pointers to available Vanilla world generators.

The first one is VanillaGenerator by @coelho. It requires VanillaNMS and that you own the Vanilla Server jar you want to use (Official links here, unofficial repositories available here and here). Supports MC 1.7 and 1.8, as well as MC Alpha 1.1.2.1 (0.2.1) and 1.2.6 (0.2.8). I don't know if @coelho plans to update it and/or add other versions to it. Note that it doesn't support Chests generation yet, but it's an easy fix now that I've implemented it, see next paragraph.

The second one is Pure by me. It's based on the work by @coelho. It just requires you to drop the jar into /plugins and setup the world(s) generator in bukkit.yml or glowstone.yml, or whatever multi-world plugin you're using. It will download the Vanilla jar files itself from the official location if available or from my own server. It doesn't require any dependencies. I fixed Chest generation and would be happy that @coelho use the code for VanillaGenerator :). It supports MC 1.6, 1.7 and 1.8, as well as MC Alpha 1.2.6 (0.2.8). I'm currently trying to implement MC Beta 1.7. You can find all the planned versions in the README.

I would like to know if there are other plugins like these, if you find one, please share :)

Ribesg avatar Jun 01 '15 10:06 Ribesg

Well, this certainly is a pleasant surprise. I'd like to know of any others as well, this is great news!

gdude2002 avatar Jun 01 '15 11:06 gdude2002

The remaining problem is the handling of structures that have to be saved for reasons, like Villages. No idea if it's the World Generator's problem to save them in a Villages.dat file.

I don't have the knowledge about Villages and other structures to know why exactly you need to save them, and I don't know if not having that is a huge issue or not. See https://github.com/Ribesg/Pure/issues/1.

I think that it depends on CraftBukkit. If CraftBukkit saves them itself, Glowstone should do it. If not, the plugin should do it.

Ribesg avatar Jun 01 '15 12:06 Ribesg

Do plugins have to specifically use VanillaNMS or can all plugins that use NMS use it?

mastercoms avatar Jun 01 '15 12:06 mastercoms

@mastercoms I don't understand your question. VanillaNMS and "plugins that use NMS" are unrelated.

Ribesg avatar Jun 02 '15 06:06 Ribesg

I was asking if VanillaNMS added the net.minecraft.server package to the server so that all plugins could use it.

mastercoms avatar Jun 02 '15 06:06 mastercoms

Well.

First, it doesn't add a net.minecraft.server package but something more like r1_8.net.minecraft.server. It's required: imagine if you want an Alpha map and an 1.8 map. You need to load both jars, and classes will overlap if you don't relocate.

Next, this has absolutly nothing to do with CraftBukkit's NMS. CraftBukkit's NMS is a heavily modified version of Vanilla NMS, which those plugins (Pure and VanillaNMS) provide. If you want to use one of them as a NMS provider (I recommend VanillaNMS for this, Pure is really a World Generator), you can, but note that you will need to use fully obfuscated code.

Finally, note that this NMS "instance" isn't connected nor related to Glowstone's server. Pure and VanillaGenerator use the World generation code of NMS as a module. You could use NMS parts as modules with this, but really nothing comparable to what you usually do with CraftBukkit. For example, you just can't get a NMS entity and expect it to be related to an in-game entity. It's not. Glowstone's entities aren't NMS entities. CraftBukkit entities were NMS entities.

Ribesg avatar Jun 02 '15 07:06 Ribesg

So it provides Mojang's nms. And nms isn't implemented in Glowstone so the server couldn't understand if plugins used it. VanillaGenerator just uses it to get a value, in this case the map.

Did I understand correctly?

mastercoms avatar Jun 02 '15 17:06 mastercoms

To make it clear, in CraftBukkit the classes in NMS are what is actually used to run the server. In Glowstone, there's no NMS, and there never will. Both plugins cited "just" use NMS to "get a value", yes, even if it's much more complex than that. But you can think about it as calling a method in NMS to generate chunks if you want. All the context of a real running server is missing and has to be stubbed.

Ribesg avatar Jun 02 '15 17:06 Ribesg

Yes, I understand that CraftBukkit wraps nms. And Glowstone is a project to "rewrite nms" in a clean room fashion.

Thanks for helping me understand VanillaNMS!

mastercoms avatar Jun 02 '15 17:06 mastercoms

Glowstone++ has advanced world generation.

mastercoms avatar Mar 12 '16 17:03 mastercoms