diff --git a/src/main/kotlin/ru/dbotthepony/kstarbound/world/TileModification.kt b/src/main/kotlin/ru/dbotthepony/kstarbound/world/TileModification.kt index e20b9570..1c324500 100644 --- a/src/main/kotlin/ru/dbotthepony/kstarbound/world/TileModification.kt +++ b/src/main/kotlin/ru/dbotthepony/kstarbound/world/TileModification.kt @@ -56,7 +56,7 @@ sealed class TileModification { abstract fun apply(world: World<*, *>, position: Vector2i, allowEntityOverlap: Boolean) data class PlaceMaterial(val isBackground: Boolean, val material: Registry.Ref, val hueShift: Float?) : TileModification() { - constructor(stream: DataInputStream, isLegacy: Boolean) : this(stream.readBoolean(), if (isLegacy) Registries.tiles.ref(stream.readUnsignedShort()) else TODO(), if (isLegacy) stream.readNullable { stream.readUnsignedByte() / 255f } else stream.readNullableFloat()) + constructor(stream: DataInputStream, isLegacy: Boolean) : this(stream.readBoolean(), if (isLegacy) Registries.tiles.ref(stream.readUnsignedShort()) else TODO(), if (isLegacy) stream.readNullable { stream.readUnsignedByte() / 255f * 360f } else stream.readNullableFloat()) override fun write(stream: DataOutputStream, isLegacy: Boolean) { stream.writeByte(1) @@ -154,7 +154,7 @@ sealed class TileModification { } data class PlaceModifier(val isBackground: Boolean, val modifier: Registry.Ref, val hueShift: Float?) : TileModification() { - constructor(stream: DataInputStream, isLegacy: Boolean) : this(stream.readBoolean(), if (isLegacy) Registries.tileModifiers.ref(stream.readUnsignedShort()) else TODO(), if (isLegacy) stream.readNullable { stream.readUnsignedByte() / 255f } else stream.readNullableFloat()) + constructor(stream: DataInputStream, isLegacy: Boolean) : this(stream.readBoolean(), if (isLegacy) Registries.tileModifiers.ref(stream.readUnsignedShort()) else TODO(), if (isLegacy) stream.readNullable { stream.readUnsignedByte() / 255f * 360f } else stream.readNullableFloat()) override fun write(stream: DataOutputStream, isLegacy: Boolean) { stream.writeByte(2)