Skip to content

Commit 4b33733

Browse files
committed
Small refactor
1 parent 2d68336 commit 4b33733

File tree

3 files changed

+124
-127
lines changed

3 files changed

+124
-127
lines changed

src/main/kotlin/com/lambda/client/mixin/extension/Network.kt

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import net.minecraft.world.storage.MapDecoration
88
import java.util.*
99

1010
var CPacketChatMessage.chatMessage: String
11-
get() = this.message
11+
get() = message
1212
set(value) {
1313
(this as AccessorCPacketChatMessage).setMessage(value)
1414
}
@@ -21,37 +21,37 @@ val CPacketConfirmTransaction.accepted: Boolean
2121
get() = (this as AccessorCPacketConfirmTransaction).accepted
2222

2323
var CPacketPlayer.playerX: Double
24-
get() = this.getX(0.0)
24+
get() = getX(0.0)
2525
set(value) {
2626
(this as AccessorCPacketPlayer).setX(value)
2727
}
2828

2929
var CPacketPlayer.playerY: Double
30-
get() = this.getY(0.0)
30+
get() = getY(0.0)
3131
set(value) {
3232
(this as AccessorCPacketPlayer).setY(value)
3333
}
3434

3535
var CPacketPlayer.playerZ: Double
36-
get() = this.getZ(0.0)
36+
get() = getZ(0.0)
3737
set(value) {
3838
(this as AccessorCPacketPlayer).setZ(value)
3939
}
4040

4141
var CPacketPlayer.playerYaw: Float
42-
get() = this.getYaw(0.0f)
42+
get() = getYaw(0.0f)
4343
set(value) {
4444
(this as AccessorCPacketPlayer).setYaw(value)
4545
}
4646

4747
var CPacketPlayer.playerPitch: Float
48-
get() = this.getPitch(0.0f)
48+
get() = getPitch(0.0f)
4949
set(value) {
5050
(this as AccessorCPacketPlayer).setPitch(value)
5151
}
5252

5353
var CPacketPlayer.playerIsOnGround: Boolean
54-
get() = this.isOnGround
54+
get() = isOnGround
5555
set(value) {
5656
(this as AccessorCPacketPlayer).setOnGround(value)
5757
}
@@ -84,13 +84,13 @@ var CPacketUseEntity.useEntityId: Int
8484
}
8585

8686
var CPacketUseEntity.useEntityAction: CPacketUseEntity.Action
87-
get() = this.action
87+
get() = action
8888
set(value) {
8989
(this as AccessorCPacketUseEntity).setAction(value)
9090
}
9191

9292
var SPacketChat.textComponent: ITextComponent
93-
get() = this.chatComponent
93+
get() = chatComponent
9494
set(value) {
9595
(this as AccessorSPacketChat).setChatComponent(value)
9696
}
@@ -99,37 +99,37 @@ val SPacketCloseWindow.windowId: Int
9999
get() = (this as AccessorSPacketCloseWindow).windowId
100100

101101
var SPacketEntityVelocity.entityVelocityMotionX: Int
102-
get() = this.motionX
102+
get() = motionX
103103
set(value) {
104104
(this as AccessorSPacketEntityVelocity).setMotionX(value)
105105
}
106106

107107
var SPacketEntityVelocity.entityVelocityMotionY: Int
108-
get() = this.motionY
108+
get() = motionY
109109
set(value) {
110110
(this as AccessorSPacketEntityVelocity).setMotionY(value)
111111
}
112112

113113
var SPacketEntityVelocity.entityVelocityMotionZ: Int
114-
get() = this.motionZ
114+
get() = motionZ
115115
set(value) {
116116
(this as AccessorSPacketEntityVelocity).setMotionZ(value)
117117
}
118118

119119
var SPacketExplosion.explosionMotionX: Float
120-
get() = this.motionX
120+
get() = motionX
121121
set(value) {
122122
(this as AccessorSPacketExplosion).setMotionX(value)
123123
}
124124

125125
var SPacketExplosion.explosionMotionY: Float
126-
get() = this.motionY
126+
get() = motionY
127127
set(value) {
128128
(this as AccessorSPacketExplosion).setMotionY(value)
129129
}
130130

131131
var SPacketExplosion.explosionMotionZ: Float
132-
get() = this.motionZ
132+
get() = motionZ
133133
set(value) {
134134
(this as AccessorSPacketExplosion).setMotionZ(value)
135135
}
@@ -152,13 +152,13 @@ val SPacketMaps.mapDataBytes: ByteArray
152152
get() = (this as AccessorSPacketMaps).mapDataBytes
153153

154154
var SPacketPlayerPosLook.playerPosLookYaw: Float
155-
get() = this.yaw
155+
get() = yaw
156156
set(value) {
157157
(this as AccessorSPacketPosLook).setYaw(value)
158158
}
159159

160160
var SPacketPlayerPosLook.playerPosLookPitch: Float
161-
get() = this.pitch
161+
get() = pitch
162162
set(value) {
163163
(this as AccessorSPacketPosLook).setPitch(value)
164164
}

0 commit comments

Comments
 (0)