@@ -112,7 +112,7 @@ object WarpCommand {
112
112
if (WarpModelUtils .warpModel.enableTeleportSound) {
113
113
DistExecutor .runWhenOn(Dist .CLIENT ) {
114
114
Runnable {
115
- Minecraft .getInstance().world.playSound(
115
+ Minecraft .getInstance().world? .playSound(
116
116
xPos, yPos + player.eyeHeight.toDouble(), zPos,
117
117
SoundEvents .ENTITY_ENDERMAN_TELEPORT ,
118
118
SoundCategory .HOSTILE ,
@@ -141,7 +141,7 @@ object WarpCommand {
141
141
DistExecutor .runWhenOn(Dist .CLIENT ) {
142
142
Runnable {
143
143
for (i in 0 .. 200 ) {
144
- Minecraft .getInstance().world.addParticle(
144
+ Minecraft .getInstance().world? .addParticle(
145
145
ParticleTypes .PORTAL ,
146
146
xPos + (random.nextDouble() - 0.5 ) * player.width.toDouble(),
147
147
yPos + random.nextDouble() * player.height.toDouble() - 0.25 ,
@@ -166,9 +166,9 @@ object WarpCommand {
166
166
for (i in 0 .. 200 ) {
167
167
player.serverWorld.spawnParticle(
168
168
ParticleTypes .PORTAL ,
169
- player.posX + (random.nextDouble() - 0.5 ) * player.width.toDouble(),
170
- player.posY + random.nextDouble() * player.height.toDouble() - 0.25 ,
171
- player.posZ + (random.nextDouble() - 0.5 ) * player.width.toDouble(),
169
+ player.positionVector.x + (random.nextDouble() - 0.5 ) * player.width.toDouble(),
170
+ player.positionVector.y + random.nextDouble() * player.height.toDouble() - 0.25 ,
171
+ player.positionVector.z + (random.nextDouble() - 0.5 ) * player.width.toDouble(),
172
172
1 ,
173
173
- 0.006 , - 0.006 , 0.0 ,
174
174
(random.nextDouble() - 0.5 ) * 2.0
0 commit comments