Class WorldBuilder
java.lang.Object
fr.fidorial.world.WorldBuilder
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic WorldBuilder.BuilderCreates a new builder for a world identified by the given key.Returns the custom chunk generator for the world, if one was supplied.inthashCode()key()Returns the namespaced identifier of the world.longseed()Returns the world seed.Returns a builder pre-populated with the values of this spec, so a modified copy can be derived without mutating the original.
-
Method Details
-
builder
Creates a new builder for a world identified by the given key.- Parameters:
key- the namespaced identifier of the world to create; also used as itsworld key- Returns:
- a fresh builder
- Since:
- 0.1.0
-
key
Returns the namespaced identifier of the world.This is the value that will be exposed as
Keyed.key()once the world exists and the value used to look the world up again throughServer.world(Key).- Returns:
- the world key
- Since:
- 0.1.0
-
seed
@Contract(pure=true) public long seed()Returns the world seed.- Returns:
- the world seed, or
0when none was set - Since:
- 0.1.0
-
generator
Returns the custom chunk generator for the world, if one was supplied.When empty, the server falls back to its built-in default generator.
- Returns:
- the generator, or an empty optional to use the server default
- Since:
- 0.1.0
-
toBuilder
Returns a builder pre-populated with the values of this spec, so a modified copy can be derived without mutating the original.- Returns:
- a builder seeded with this spec's values
- Since:
- 0.1.0
-
hashCode
-