From 2bccfd97fd7d27570b8b5168ef38af7198385b78 Mon Sep 17 00:00:00 2001 From: VenomCodeDev <103589496+VenomCodeDev@users.noreply.github.com> Date: Wed, 16 Aug 2023 20:44:36 -0500 Subject: [PATCH] Attempt #1 at fixing requestTeleport() rejecting the request on the ServerPlayerEntity type and teleporting the player back. --- gradle.properties | 2 +- .../java/dev/venomcode/jumpvader/blocks/JumpVaderBlock.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gradle.properties b/gradle.properties index 9766b05..215f16d 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,7 +9,7 @@ yarn_mappings=1.20.1+build.2 loader_version=0.14.21 # Mod Properties -mod_version = 1.0.6b+1.20.1 +mod_version = 1.0.8+1.20.1 maven_group = dev.venomcode.jumpvader archives_base_name = jumpvader diff --git a/src/main/java/dev/venomcode/jumpvader/blocks/JumpVaderBlock.java b/src/main/java/dev/venomcode/jumpvader/blocks/JumpVaderBlock.java index ec7df08..7fa99fa 100644 --- a/src/main/java/dev/venomcode/jumpvader/blocks/JumpVaderBlock.java +++ b/src/main/java/dev/venomcode/jumpvader/blocks/JumpVaderBlock.java @@ -42,7 +42,7 @@ public class JumpVaderBlock extends SimplePolymerBlock implements IJumpVaderList if(w.getBlockState( tpPos ).getBlock().equals( Blocks.AIR ) && w.getBlockState( tpPos.up() ).getBlock().equals( Blocks.AIR )) { - player.networkHandler.requestTeleport( tpPos.getX() + 0.5f, tpPos.getY(), tpPos.getZ() + 0.5f, player.getHeadYaw(), 0f ); + player.requestTeleport( tpPos.getX() + 0.5f, tpPos.getY(), tpPos.getZ() + 0.5f ); w.playSound( null, tpPos, SoundEvents.ENTITY_ENDERMAN_TELEPORT, SoundCategory.PLAYERS, 0.5f, 1.5f ); w.spawnParticles( ParticleTypes.POOF, tpPos.getX() + 0.5f, tpPos.getY(), tpPos.getZ() + 0.5f, 5, 0, 0, 0, 0.25f ); @@ -76,7 +76,7 @@ public class JumpVaderBlock extends SimplePolymerBlock implements IJumpVaderList if(w.getBlockState( tpPos ).getBlock().equals( Blocks.AIR ) && w.getBlockState( tpPos.up() ).getBlock().equals( Blocks.AIR )) { - player.networkHandler.requestTeleport( tpPos.getX() + 0.5f, tpPos.getY(), tpPos.getZ() + 0.5f, player.getHeadYaw(), 0f ); + player.requestTeleport( tpPos.getX() + 0.5f, tpPos.getY(), tpPos.getZ() + 0.5f ); w.playSound( null, tpPos, SoundEvents.ENTITY_ENDERMAN_TELEPORT, SoundCategory.PLAYERS, 0.5f, 1.5f ); w.spawnParticles( ParticleTypes.POOF, tpPos.getX() + 0.5f, tpPos.getY(), tpPos.getZ() + 0.5f, 5, 0, 0, 0, 0.25f );