This PR adds the concept of shapes and implements this system to Minecraft.
This system brings easy creation and management for 2D and 3D geometrical shapes in the Minecraft environment by mainly using Mojang's new Codec technology.
We also use the Terraformer's shapes API for constructing precise abstract shapes and for placing them in the world.
Main content
Shapes
[x] Shapes/shape processors are defined by a shape/shape processor type and its corresponding arguments (eg. width & height for rectangles, radii for ellipses)
[x] Shape types are managed in a registry (mods can add to it)
type | ID of shape type
type fields (see below)
Shape Types
[x] dawn:empty
no fields
[x] dawn:rectangle
width | float provider
height | float provider
[x] dawn:rectangular_prism
width | float provider
height | float provider
depth | float provider
[x] dawn:rectangular_pyramid
width | float provider
height | float provider, cannot contain zero
depth | float provider
[x] dawn:ellipse
a | float provider, cannot contain zero
b | float provider, cannot contain zero
[x] dawn:elliptical_prism
a | float provider, cannot contain zero
b | float provider, cannot contain zero
height | float provider
[x] dawn:elliptical_pyramid
a | float provider, cannot contain zero
b | float provider, cannot contain zero
height | float provider, cannot contain zero
[x] dawn:triangular_prism
width | float provider
height | float provider, cannot contain zero
depth | float provider
[x] dawn:ellipsoid
a | float provider, cannot contain zero
b | float provider, cannot contain zero
c | float provider, cannot contain zero
[x] dawn:hemi_ellipsoid
a | float provider, cannot contain zero
b | float provider, cannot contain zero
c | float provider, cannot contain zero
[ ] dawn:custom
equation | equation
variables | list of float providers?
Shape Processor
[x] All fields are providers, which means you can provide custom int and float providers for shape sizes (eg. make an height oscillate randomly between 3 and 4) but can also be parsed as literal
[x] Shape processor types are managed in a registry (mods can add to it)
processor | ID of shape processor type
type fields (see below)
Shape Processor Types
[x] dawn:add
shape | configured shape, ID reference or inline
[x] dawn:subtract
shape | configured shape, ID reference or inline
[x] dawn:exclude
shape | configured shape, ID reference or inline
[x] dawn:intersect
shape | configured shape, ID reference or inline
[x] dawn:translate
x | float provider, 0.0 by default
y | float provider, 0.0 by default
z | float provider, 0.0 by default
[x] dawn:rotate
x | float provider, 0.0 by default
y | float provider, 0.0 by default
z | float provider, 0.0 by default
degrees | boolean, true by default
[x] dawn:scale
x | float provider, 1.0 by default
y | float provider, 1.0 by default
z | float provider, 1.0 by default
[x] dawn:noise_translate
magnitude | float provider, 1.0 by default
seed | long, randomized by default
Configured Shapes
Configured shapes can be defined in two manners:
[x] A shape field and a configured shape processor list field
[x] A shape object itself
[x] Configured shapes are managed by a reloadable registry that retrieves data from data/<mod_id>/configured_shapes
shape | shape
processors | list of shape processors, can be empty but must be present
OR a plain, inline shape object
Configured Shape Processors
Configured shape processors can be defined in two manners:
[x] A shape processor field and the number of times the processor will get applied
[x] A shape processor object itself
processor | shape processor
repeat | int provider, must be positive
OR a plain, inline shape processor object
Extra content
Feature
[x] New feature type: dawn:shape, so that shapes can be used within configured features
shape | configured shape, ID reference or inline
state | block state provider
y_offset | float provider, 0.0 by default
Foliage Placer Type
[ ] New foliage placer type: dawn:shape, so that shapes can be used as foliage for trees
Command
[x] The /shape command can place shapes filled with a specified block
Syntax : /shape <configured shape> <pos> (fill) <block>
This PR adds the concept of shapes and implements this system to Minecraft. This system brings easy creation and management for 2D and 3D geometrical shapes in the Minecraft environment by mainly using Mojang's new Codec technology. We also use the Terraformer's shapes API for constructing precise abstract shapes and for placing them in the world.
Main content
Shapes
Shape Types
dawn:empty
dawn:rectangle
dawn:rectangular_prism
dawn:rectangular_pyramid
dawn:ellipse
dawn:elliptical_prism
dawn:elliptical_pyramid
dawn:triangular_prism
dawn:ellipsoid
dawn:hemi_ellipsoid
dawn:custom
Shape Processor
Shape Processor Types
dawn:add
dawn:subtract
dawn:exclude
dawn:intersect
dawn:translate
dawn:rotate
dawn:scale
dawn:noise_translate
Configured Shapes
data/<mod_id>/configured_shapes
Configured Shape Processors
Extra content
Feature
dawn:shape
, so that shapes can be used within configured featuresFoliage Placer Type
dawn:shape
, so that shapes can be used as foliage for treesCommand
/shape
command can place shapes filled with a specified block Syntax :/shape <configured shape> <pos> (fill) <block>
Showcase