From 32646bd27198429c3f231f7870cc5440ada5b30d Mon Sep 17 00:00:00 2001 From: Gabber235 Date: Fri, 15 Nov 2024 10:48:49 +0100 Subject: [PATCH] Rename location to position --- ...Variable.kt => RelativePositionVariable.kt} | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) rename extensions/BasicExtension/src/main/kotlin/com/typewritermc/basic/entries/variables/{RelativeLocationVariable.kt => RelativePositionVariable.kt} (75%) diff --git a/extensions/BasicExtension/src/main/kotlin/com/typewritermc/basic/entries/variables/RelativeLocationVariable.kt b/extensions/BasicExtension/src/main/kotlin/com/typewritermc/basic/entries/variables/RelativePositionVariable.kt similarity index 75% rename from extensions/BasicExtension/src/main/kotlin/com/typewritermc/basic/entries/variables/RelativeLocationVariable.kt rename to extensions/BasicExtension/src/main/kotlin/com/typewritermc/basic/entries/variables/RelativePositionVariable.kt index db0949f5ab..bbdb0b902a 100644 --- a/extensions/BasicExtension/src/main/kotlin/com/typewritermc/basic/entries/variables/RelativeLocationVariable.kt +++ b/extensions/BasicExtension/src/main/kotlin/com/typewritermc/basic/entries/variables/RelativePositionVariable.kt @@ -4,6 +4,7 @@ import com.typewritermc.core.books.pages.Colors import com.typewritermc.core.extension.annotations.Entry import com.typewritermc.core.extension.annotations.GenericConstraint import com.typewritermc.core.extension.annotations.VariableData +import com.typewritermc.core.extension.annotations.WithRotation import com.typewritermc.core.utils.point.Coordinate import com.typewritermc.core.utils.point.Position import com.typewritermc.engine.paper.entry.entries.VarContext @@ -13,21 +14,21 @@ import com.typewritermc.engine.paper.utils.position import kotlin.reflect.safeCast @Entry( - "relative_location_variable", - "A variable that returns the location relative to the player", + "relative_position_variable", + "A variable that returns the position relative to the player", Colors.GREEN, "streamline:target-solid" ) @GenericConstraint(Position::class) -@VariableData(RelativeLocationVariableData::class) +@VariableData(RelativePositionVariableData::class) /** - * The `RelativeLocationVariable` is a variable that returns the location relative to the player. - * The location is calculated by adding the coordinate to the player's position. + * The `RelativePositionVariable` is a variable that returns the position relative to the player. + * The position is calculated by adding the coordinate to the player's position. * * ## How could this be used? - * This could be used to make a death cinematic that shows at player's location after they die. + * This could be used to make a death cinematic that shows at player's position after they die. */ -class RelativeLocationVariable( +class RelativePositionVariable( override val id: String = "", override val name: String = "", ) : VariableEntry { @@ -42,6 +43,7 @@ class RelativeLocationVariable( } } -data class RelativeLocationVariableData( +data class RelativePositionVariableData( + @WithRotation val coordinate: Coordinate = Coordinate.ORIGIN, ) \ No newline at end of file