Skip to content

Commit

Permalink
[1.2.1] backported to 1.21-1.21.1
Browse files Browse the repository at this point in the history
  • Loading branch information
MrSn0wy committed Dec 12, 2024
1 parent f7b7f71 commit ecc5a9e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ public static void Teleporter(ServerPlayer player, ServerLevel world, Vec3 coord
// before teleportation effects
world.sendParticles(ParticleTypes.SNOWFLAKE, player.getX(), player.getY() + 1, player.getZ(), 20, 0.0D, 0.0D, 0.0D, 0.01);
world.sendParticles(ParticleTypes.WHITE_SMOKE, player.getX(), player.getY(), player.getZ(), 15, 0.0D, 1.0D, 0.0D, 0.03);
world.playSound(null, player.blockPosition(), SoundEvent.createVariableRangeEvent(ENDERMAN_TELEPORT.location()), SoundSource.PLAYERS, 0.4f, 1.0f);
world.playSound(null, player.blockPosition(), SoundEvent.createVariableRangeEvent(ENDERMAN_TELEPORT.getLocation()), SoundSource.PLAYERS, 0.4f, 1.0f);

var flying = player.getAbilities().flying;

// teleport!
player.teleportTo(world, coords.x, coords.y, coords.z, Set.of(), player.getYRot(), player.getXRot(), false);
player.teleportTo(world, coords.x, coords.y, coords.z, player.getYRot(), player.getXRot());

// Restore flying when teleporting dimensions
if (flying) {
Expand All @@ -48,7 +48,7 @@ public static void Teleporter(ServerPlayer player, ServerLevel world, Vec3 coord
}


world.playSound(null, player.blockPosition(), SoundEvent.createVariableRangeEvent(ENDERMAN_TELEPORT.location()), SoundSource.PLAYERS, 0.4f, 1.0f);
world.playSound(null, player.blockPosition(), SoundEvent.createVariableRangeEvent(ENDERMAN_TELEPORT.getLocation()), SoundSource.PLAYERS, 0.4f, 1.0f);
Timer timer = new Timer();

// delay visual effects so the player can see it when switching dimensions
Expand Down
10 changes: 5 additions & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@ group=dev.mrsnowy.teleport_commands
java_version=21

# Common
minecraft_version=1.21.4
minecraft_version=1.21
mod_name=Teleport Commands
mod_author=Mr. Snowy
mod_id=teleport_commands
license=MIT
credits=Mr. Snowy
description=A server-side mod that adds various teleportation related commands.
minecraft_version_range=[1.21.4,1.22]
minecraft_version_range=[1.21,1.21.1]

# Fabric
fabric_loader_version=0.16.9
fabric_loader_version=0.15.11
#fabric_api=0.97.0+1.20.4
fabric_loom=1.9-SNAPSHOT

Expand All @@ -28,9 +28,9 @@ fabric_loom=1.9-SNAPSHOT


# NeoForge
neoforge_version=21.4.0-beta
neoforge_version=21.0.0-beta
neoforge_loader_version_range=[2,)
NeoGradle=7.0.171
NeoGradle=7.0.142

# Gradle
org.gradle.jvmargs=-Xmx6G
Expand Down

0 comments on commit ecc5a9e

Please sign in to comment.