@@ -112,7 +112,7 @@ object WarpCommand {
112112 if (WarpModelUtils .warpModel.enableTeleportSound) {
113113 DistExecutor .runWhenOn(Dist .CLIENT ) {
114114 Runnable {
115- Minecraft .getInstance().world.playSound(
115+ Minecraft .getInstance().world? .playSound(
116116 xPos, yPos + player.eyeHeight.toDouble(), zPos,
117117 SoundEvents .ENTITY_ENDERMAN_TELEPORT ,
118118 SoundCategory .HOSTILE ,
@@ -141,7 +141,7 @@ object WarpCommand {
141141 DistExecutor .runWhenOn(Dist .CLIENT ) {
142142 Runnable {
143143 for (i in 0 .. 200 ) {
144- Minecraft .getInstance().world.addParticle(
144+ Minecraft .getInstance().world? .addParticle(
145145 ParticleTypes .PORTAL ,
146146 xPos + (random.nextDouble() - 0.5 ) * player.width.toDouble(),
147147 yPos + random.nextDouble() * player.height.toDouble() - 0.25 ,
@@ -166,9 +166,9 @@ object WarpCommand {
166166 for (i in 0 .. 200 ) {
167167 player.serverWorld.spawnParticle(
168168 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(),
172172 1 ,
173173 - 0.006 , - 0.006 , 0.0 ,
174174 (random.nextDouble() - 0.5 ) * 2.0
0 commit comments