github.com/df-mc/dragonfly@v0.9.13/server/block/customblock/permutations.go (about) 1 package customblock 2 3 import ( 4 "github.com/df-mc/dragonfly/server/block/cube" 5 "github.com/go-gl/mathgl/mgl64" 6 ) 7 8 // Properties represents the different properties that can be applied to a block or a permutation. 9 type Properties struct { 10 // CollisionBox represents the bounding box of the block that the player can collide with. This cannot exceed the 11 // position of the current block in the world, otherwise it will be cut off at the edge. 12 CollisionBox cube.BBox 13 // Cube determines whether the block should inherit the default cube geometry. This will only be considered if the 14 // Geometry field is empty. 15 Cube bool 16 // Geometry represents the geometry identifier that should be used for the block. If you want to use the default 17 // cube geometry, leave this field empty and set Cube to true. 18 Geometry string 19 // MapColour represents the hex colour that should be used for the block on a map. 20 MapColour string 21 // Rotation represents the rotation of the block. Rotations are only applied in 90 degree increments, meaning 22 // 1 = 90 degrees, 2 = 180 degrees, 3 = 270 degrees and 4 = 360 degrees. 23 Rotation cube.Pos 24 // Scale is the scale of the block, with 1 being the default scale in all axes. When scaled, the block cannot 25 // exceed a 30x30x30 pixel area otherwise the client will not render the block. 26 Scale mgl64.Vec3 27 // SelectionBox represents the bounding box of the block that the player can interact with. This cannot exceed the 28 // position of the current block in the world, otherwise it will be cut off at the edge. 29 SelectionBox cube.BBox 30 // Textures define the textures that should be used for the block. The key is the target of the texture, such as 31 // "*" for all sides, or one of "up", "down", "north", "south", "east", "west" for a specific side. 32 Textures map[string]Material 33 // Translation is the translation of the block within itself. When translated, the block cannot exceed a 30x30x30 34 // pixel area otherwise the client will not render the block. 35 Translation mgl64.Vec3 36 } 37 38 // Permutation represents a specific permutation for a block that is only applied when the condition is met. 39 type Permutation struct { 40 Properties 41 // Condition is a molang query that is used to determine whether the permutation should be applied. 42 // Only the latest version of molang is supported. 43 Condition string 44 }