mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-07 22:39:01 -04:00
remove Directions::campfireId
This was deprecated for long enough
This commit is contained in:
parent
16a8941f55
commit
702aee0974
@ -29,8 +29,7 @@ Versions marked with "lts" are long term supported. They (and the latest one) wi
|
||||
|
||||
## April fool
|
||||
|
||||
Mojang mostly did not change the version number of them, thus making it impossible to distinct between snapshots and
|
||||
them.
|
||||
Mojang mostly did not change the version number of them, thus making it impossible to distinct between snapshots and them.
|
||||
Also it is quite heavy to implement them. They might work, but are not supported at all.
|
||||
|
||||
## Snapshots
|
||||
|
@ -34,16 +34,15 @@ import de.bixilon.minosoft.protocol.protocol.ProtocolDefinition
|
||||
import kotlin.reflect.jvm.javaField
|
||||
|
||||
enum class Directions(
|
||||
@Deprecated("remove") val campfireId: Int,
|
||||
val vector: Vec3i,
|
||||
val index: Vec3i,
|
||||
) {
|
||||
DOWN(-1, Vec3i(0, -1, 0), Vec3i(1, -1, 1)),
|
||||
UP(-1, Vec3i(0, 1, 0), Vec3i(3, -1, 3)),
|
||||
NORTH(2, Vec3i(0, 0, -1), Vec3i(0, 0, -1)),
|
||||
SOUTH(0, Vec3i(0, 0, 1), Vec3i(2, 2, -1)),
|
||||
WEST(1, Vec3i(-1, 0, 0), Vec3i(-1, 3, 2)),
|
||||
EAST(3, Vec3i(1, 0, 0), Vec3i(-1, 1, 0)),
|
||||
DOWN(Vec3i(0, -1, 0), Vec3i(1, -1, 1)),
|
||||
UP(Vec3i(0, 1, 0), Vec3i(3, -1, 3)),
|
||||
NORTH(Vec3i(0, 0, -1), Vec3i(0, 0, -1)),
|
||||
SOUTH(Vec3i(0, 0, 1), Vec3i(2, 2, -1)),
|
||||
WEST(Vec3i(-1, 0, 0), Vec3i(-1, 3, 2)),
|
||||
EAST(Vec3i(1, 0, 0), Vec3i(-1, 1, 0)),
|
||||
;
|
||||
|
||||
val negative = ordinal % 2 == 0
|
||||
|
@ -16,6 +16,7 @@ package de.bixilon.minosoft.data.entities.block
|
||||
import de.bixilon.kotlinglm.vec3.Vec3d
|
||||
import de.bixilon.kotlinglm.vec3.Vec3i
|
||||
import de.bixilon.kutil.cast.CastUtil.unsafeCast
|
||||
import de.bixilon.kutil.exception.Broken
|
||||
import de.bixilon.kutil.primitive.IntUtil.toInt
|
||||
import de.bixilon.kutil.random.RandomUtil.chance
|
||||
import de.bixilon.minosoft.data.container.ItemStackUtil
|
||||
@ -100,6 +101,15 @@ class CampfireBlockEntity(connection: PlayConnection) : BlockEntity(connection)
|
||||
const val DIRECTION_OFFSET = 0.3125
|
||||
|
||||
|
||||
private val Directions.campfireId:Int get() = when(this) {
|
||||
Directions.NORTH -> 2
|
||||
Directions.SOUTH -> 0
|
||||
Directions.WEST -> 1
|
||||
Directions.EAST -> 3
|
||||
else -> Broken()
|
||||
}
|
||||
|
||||
|
||||
override fun build(connection: PlayConnection): CampfireBlockEntity {
|
||||
return CampfireBlockEntity(connection)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user