Village class
A clearing with minHuts to maxHuts huts on a ring around a well, each hut sat on its own ground with its door to the well and a path from the door to it, and a fenced farm off to one side.
A hut is 5 x 5: a floor (and its foundation down to the ground), walls with corners, a window facing the door, a roof with a rim of roofRim; inside a chest and a bed at the back, a torch, and a workbench or a furnace in two of them. The well is a 3 x 3 wellRim around water, four corners holding a roof; lights stand beside it.
Constructors
- Village({required String floor, required String walls, required String corners, required String roof, required String path, required String wellRim, required String water, String? roofRim, String? window, String? chest, String? bed, String? torch, String? workbench, String? furnace, String? light, VillageFarm? farm, int minHuts = 4, int maxHuts = 7})
-
A village of these blocks; every one left null is left out.
const
Properties
- bed → String?
-
In every hut, at the back.
final
-
blockNames
→ Set<
String> -
Every block it draws, so a world fails to compile, naming the block,
when a game's table lacks one.
no setteroverride
- chest → String?
-
In every hut, at the back.
final
- clearing → int
-
How far around its site no tree roots, in blocks (the generator adds a
tree's own reach); by default its radius on the surface and nothing
under it, which is dug under the trees, never through them.
no setterinherited
- corners → String
-
The huts' corner posts and the well's.
final
- depth → int
-
How far under the surface its site sits (a dungeon), 0 on the surface.
no setterinherited
- farm → VillageFarm?
-
The fenced field, or null for none.
final
- floor → String
-
The huts' floors and foundations, and what levels the well.
final
- furnace → String?
-
In the fourth hut.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- light → String?
-
Beside the well, two.
final
- maxHuts → int
-
The most huts.
final
- minHuts → int
-
The fewest huts.
final
- path → String
-
The paths, laid in the ground.
final
- radius → int
-
How far it reaches from its site, in blocks, sideways: the site stays
that far inside its region, and other structures' sites that far away.
no setteroverride
- roof → String
-
The huts' ceilings and the well's roof.
final
- roofRim → String?
-
The rim and cap on a hut's roof, or null for a flat roof.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- torch → String?
-
In every hut.
final
- walls → String
-
The huts' walls.
final
- water → String
-
The well's water, and the farm's channel.
final
- wellRim → String
-
The well's ring.
final
- window → String?
-
A hut's window, or null for a wall there.
final
- workbench → String?
-
In the third hut.
final
Methods
-
build(
StructureSite site) → void -
Draws it around
site.override -
hutAt(
StructureSite site, int i) → ({int x, int z}) -
Where hut
iof the village atsitestands, site-relative. -
hutCount(
StructureSite site) → int -
How many huts the village at
sitehas. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited