Vec3 base interface for all vectors (replaces BlockPosition). Unifies "fine" (double) and "coarse" (integer) vectors, and provides a rich API thanks to Java 8 interface methods. MutableVec3 subtype provides mutation. VectorFactory service is used for construction i.e. Bukkit.vectors().
Transform interface representing spatial transforms, and CoarseTransform subtype for block transforms.
BlockRegion interface that extends Set<Vec3> and represents a set of block positions, which can be transformed, filtered, and "baked" (made immutable). CuboidBlockRegion is the only shape provided currently.
Expanded BlockImage that supports transforms and reading individual blocks as MaterialDatas (eventually it will also provide BlockStates, but that is tricky due to how they are constructed).
BlockReflection and BlockRotation enums reflecting the ones Mojang uses for structure blocks, and a BlockRotoflection class that combines them. These can all be converted to CoarseTransforms.
BlockFactory service to apply reflection and rotation to MaterialData for blocks (through the native API).
Various enhancements to BlockFace to support reorientation.
An Axis enum with values X, Y, Z
Lots of tests
Removed ImBlockVector because BlockVector semantics are pretty sketchy and caused problems. Recommend using a coarse Vec3 instead.
Location no longer extends Vector, also due to sketchy semantics, but it does contain a Vector that can be accessed directly (and mutated) through Location#position().
Breaking changes:
If you use any SportBukkit-specific features related to vectors/regions/images then this will probably break a lot. This was necessary to get all the power we wanted out of the API. Bukkit-compatible code should not break at all.
Vec3
base interface for all vectors (replacesBlockPosition
). Unifies "fine" (double) and "coarse" (integer) vectors, and provides a rich API thanks to Java 8 interface methods.MutableVec3
subtype provides mutation.VectorFactory
service is used for construction i.e.Bukkit.vectors()
.Transform
interface representing spatial transforms, andCoarseTransform
subtype for block transforms.BlockRegion
interface that extendsSet<Vec3>
and represents a set of block positions, which can be transformed, filtered, and "baked" (made immutable).CuboidBlockRegion
is the only shape provided currently.BlockImage
that supports transforms and reading individual blocks asMaterialData
s (eventually it will also provideBlockState
s, but that is tricky due to how they are constructed).BlockReflection
andBlockRotation
enums reflecting the ones Mojang uses for structure blocks, and aBlockRotoflection
class that combines them. These can all be converted toCoarseTransform
s.BlockFactory
service to apply reflection and rotation toMaterialData
for blocks (through the native API).BlockFace
to support reorientation.Axis
enum with values X, Y, ZImBlockVector
becauseBlockVector
semantics are pretty sketchy and caused problems. Recommend using a coarseVec3
instead.Location
no longer extendsVector
, also due to sketchy semantics, but it does contain aVector
that can be accessed directly (and mutated) throughLocation#position()
.Breaking changes:
If you use any SportBukkit-specific features related to vectors/regions/images then this will probably break a lot. This was necessary to get all the power we wanted out of the API. Bukkit-compatible code should not break at all.