diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/core/math/BlockRotationFreedom.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/core/math/BlockRotationFreedom.kt index 8a7328ca5..6cb7926f4 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/core/math/BlockRotationFreedom.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/core/math/BlockRotationFreedom.kt @@ -57,7 +57,9 @@ enum class BlockRotationFreedom(vararg values: BlockRotation) { BlockRotation.SOUTH_DOWN, BlockRotation.WEST_DOWN, BlockRotation.EAST_DOWN, - ); + ), + + NONE(BlockRotation.NORTH); val possibleValues: Collection get() = property.possibleValues val property: EnumProperty = EnumProperty.create("facing", BlockRotation::class.java, *values) @@ -66,14 +68,14 @@ enum class BlockRotationFreedom(vararg values: BlockRotation) { private val twoDirection = EnumMap>(Direction::class.java) init { - for (direction in Direction.values()) { + for (direction in Direction.entries) { oneDirection[direction] = possibleValues.firstOrNull { it.front == direction } ?: possibleValues.first() val second = EnumMap(Direction::class.java) twoDirection[direction] = second - for (direction2 in Direction.values()) { + for (direction2 in Direction.entries) { second[direction2] = possibleValues.firstOrNull { it.front == direction && it.top == direction2 } ?: possibleValues.firstOrNull { it.front == direction } ?: possibleValues.first()