From a18b498804004dc2adc6c893cfdc84ae49de6973 Mon Sep 17 00:00:00 2001 From: Runemoro Date: Sat, 6 Jan 2018 11:28:30 -0500 Subject: [PATCH] Fix player not being teleported to pocket --- build.gradle | 2 +- .../org/dimdev/dimdoors/shared/commands/CommandPocket.java | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index ea71571e..5c012c3c 100644 --- a/build.gradle +++ b/build.gradle @@ -18,7 +18,7 @@ apply plugin: 'net.minecraftforge.gradle.forge' // Version info String baseversion = "3.0.0" // Set beta to 0 after changing this -int beta = 3 // Set this to 0 for a non-beta release +int beta = 4 // Set this to 0 for a non-beta release ext.mcversion = "1.12.2" ext.forgeversion = "14.23.1.2555" String mcpversion = "snapshot_20171007" diff --git a/src/main/java/org/dimdev/dimdoors/shared/commands/CommandPocket.java b/src/main/java/org/dimdev/dimdoors/shared/commands/CommandPocket.java index 2d552eb1..36ef08ef 100644 --- a/src/main/java/org/dimdev/dimdoors/shared/commands/CommandPocket.java +++ b/src/main/java/org/dimdev/dimdoors/shared/commands/CommandPocket.java @@ -1,5 +1,6 @@ package org.dimdev.dimdoors.shared.commands; +import net.minecraft.util.EnumFacing; import org.dimdev.dimdoors.DimDoors; import org.dimdev.dimdoors.shared.*; import org.dimdev.dimdoors.shared.pockets.*; @@ -98,7 +99,7 @@ public class CommandPocket extends CommandBase { TileEntityRift entrance = (TileEntityRift) player.world.getTileEntity(pocket.getEntrance().getPos()); entrance.teleportTo(player); } else { - TeleportUtils.teleport(player, new Location(player.world, pocket.getX(), 20, pocket.getZ()), 0, 0); + TeleportUtils.teleport(player, new Location(player.world, pocket.getOrigin().offset(EnumFacing.UP, 20))); } } else { DimDoors.log.info("Not executing command /" + getName() + " because it wasn't sent by a player.");