A Minecraft server-side mod that adds various teleportation related commands
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

adjustment

+10 -8
+10 -8
src/main/java/dev/mrsnowy/teleport_commands/utils/tools.java
··· 27 27 } 28 28 29 29 private static void Teleporter(ServerPlayerEntity player, ServerWorld world, Vec3d coords) { 30 - world.spawnParticles(ParticleTypes.SNOWFLAKE, player.getX(), player.getY() + 1, player.getZ(), 15, 0.0D, 0.0D, 0.0D, 0.01); 31 - world.spawnParticles(ParticleTypes.WHITE_SMOKE, player.getX(), player.getY(), player.getZ(), 10, 0.0D, 1.0D, 0.0D, 0.03); 30 + world.spawnParticles(ParticleTypes.SNOWFLAKE, player.getX(), player.getY() + 1, player.getZ(), 20, 0.0D, 0.0D, 0.0D, 0.01); 31 + world.spawnParticles(ParticleTypes.WHITE_SMOKE, player.getX(), player.getY(), player.getZ(), 15, 0.0D, 1.0D, 0.0D, 0.03); 32 32 world.playSound(null, player.getBlockPos(), SoundEvent.of(ENTITY_ENDERMAN_TELEPORT.getId()), SoundCategory.PLAYERS, 0.4f, 1.0f); 33 33 34 34 FabricDimensions.teleport(player, world, new TeleportTarget(coords, Vec3d.ZERO, player.getYaw(), player.getPitch())); 35 - 36 - new Timer().schedule( 35 + 36 + world.playSound(null, player.getBlockPos(), SoundEvent.of(ENTITY_ENDERMAN_TELEPORT.getId()), SoundCategory.PLAYERS, 0.4f, 1.0f); 37 + Timer timer = new Timer(); 38 + 39 + timer.schedule( 37 40 new TimerTask() { 38 41 @Override 39 42 public void run() { 40 - world.playSound(null, player.getBlockPos(), SoundEvent.of(ENTITY_ENDERMAN_TELEPORT.getId()), SoundCategory.PLAYERS, 0.4f, 1.0f); 41 - world.spawnParticles(ParticleTypes.SNOWFLAKE, player.getX(), player.getY() , player.getZ(), 15, 0.0D, 1.0D, 0.0D, 0.01); 42 - world.spawnParticles(ParticleTypes.WHITE_SMOKE, player.getX(), player.getY(), player.getZ(), 10, 0.0D, 0.0D, 0.0D, 0.03); 43 + world.spawnParticles(ParticleTypes.SNOWFLAKE, player.getX(), player.getY() , player.getZ(), 20, 0.0D, 1.0D, 0.0D, 0.01); 44 + world.spawnParticles(ParticleTypes.WHITE_SMOKE, player.getX(), player.getY(), player.getZ(), 15, 0.0D, 0.0D, 0.0D, 0.03); 43 45 } 44 - }, 50 // 1 tick, i think? 46 + }, 100 // hopefully good 45 47 ); 46 48 } 47 49