public void teleport(Entity entity, Vec3d target) throws CommandException { if(entity == null) { throw new CommandException("entity must not be NULL!"); } if(target == null) { throw new CommandException("target must not be NULL!"); } // XXX DISABLED FUNCTIONALITY: This doesn't work as expected. if(Boolean.FALSE.booleanValue() && entity instanceof EntityPlayerMP) { // special case code EnumSet<EnumFlags> enumset = EnumSet.noneOf(SPacketPlayerPosLook.EnumFlags.class); float f = entity.rotationPitch; float f1 = entity.rotationYaw; entity.startRiding((Entity)null); ((EntityPlayerMP)entity).connection.setPlayerLocation(target.xCoord, target.yCoord, target.zCoord, f, f1, enumset); entity.velocityChanged = true; return; } entity.setPositionAndUpdate(target.xCoord, target.yCoord, target.zCoord); entity.velocityChanged = true; }
@Override public void setPlayerLocation(double x, double y, double z, float yaw, float pitch, @Nonnull Set<EnumFlags> relativeSet) { }
@Override public void setPlayerLocation(double x, double y, double z, float yaw, float pitch, Set<EnumFlags> relativeSet) { }